Add standalone hook entry points for context, new, save, summary, and worker

- Implemented context-hook.ts for handling session start events.
- Created new-hook.ts for user prompt submission events.
- Developed save-hook.ts for post tool use events.
- Added summary-hook.ts for handling stop events.
- Introduced worker.ts as a standalone background process for the SDK agent.
- Each hook reads input from stdin, processes it, and handles errors gracefully.
This commit is contained in:
Alex Newman
2025-10-16 15:39:30 -04:00
parent 723f1f5374
commit 834cf4095e
20 changed files with 1563 additions and 63 deletions
+4 -1
View File
@@ -36,7 +36,9 @@
"claude-mem": "./dist/claude-mem.min.js"
},
"scripts": {
"build": "node scripts/build.js",
"build": "node scripts/build.js && node scripts/build-hooks.js",
"build:cli": "node scripts/build.js",
"build:hooks": "node scripts/build-hooks.js",
"publish:npm": "node scripts/publish.js",
"dev": "bun run src/bin/cli.ts",
"prepublishOnly": "npm run build",
@@ -56,6 +58,7 @@
"dist",
"commands",
"hooks",
"scripts",
".claude-plugin",
"src",
"docs",