834cf4095e
- 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.
51 lines
1.0 KiB
JSON
51 lines
1.0 KiB
JSON
{
|
|
"description": "Claude-mem memory system hooks",
|
|
"hooks": {
|
|
"SessionStart": [
|
|
{
|
|
"hooks": [
|
|
{
|
|
"type": "command",
|
|
"command": "bun ${CLAUDE_PLUGIN_ROOT}/scripts/hooks/context-hook.js",
|
|
"timeout": 180000
|
|
}
|
|
]
|
|
}
|
|
],
|
|
"UserPromptSubmit": [
|
|
{
|
|
"hooks": [
|
|
{
|
|
"type": "command",
|
|
"command": "bun ${CLAUDE_PLUGIN_ROOT}/scripts/hooks/new-hook.js",
|
|
"timeout": 60000
|
|
}
|
|
]
|
|
}
|
|
],
|
|
"PostToolUse": [
|
|
{
|
|
"matcher": "*",
|
|
"hooks": [
|
|
{
|
|
"type": "command",
|
|
"command": "bun ${CLAUDE_PLUGIN_ROOT}/scripts/hooks/save-hook.js",
|
|
"timeout": 180000
|
|
}
|
|
]
|
|
}
|
|
],
|
|
"Stop": [
|
|
{
|
|
"hooks": [
|
|
{
|
|
"type": "command",
|
|
"command": "bun ${CLAUDE_PLUGIN_ROOT}/scripts/hooks/summary-hook.js",
|
|
"timeout": 60000
|
|
}
|
|
]
|
|
}
|
|
]
|
|
}
|
|
}
|