Files
claude-mem/plugin/hooks/hooks.json
T

82 lines
2.3 KiB
JSON

{
"description": "Claude-mem memory system hooks",
"hooks": {
"SessionStart": [
{
"hooks": [
{
"type": "command",
"command": "[ ! -d \"${CLAUDE_PLUGIN_ROOT}/scripts/node_modules\" ] && cd \"${CLAUDE_PLUGIN_ROOT}/scripts\" && npm install || true",
"timeout": 60000
},
{
"type": "command",
"command": "node ${CLAUDE_PLUGIN_ROOT}/scripts/context-hook.js",
"timeout": 180000
}
]
}
],
"UserPromptSubmit": [
{
"hooks": [
{
"type": "command",
"command": "[ ! -d \"${CLAUDE_PLUGIN_ROOT}/scripts/node_modules\" ] && echo \"Installing better-sqlite3\" && cd \"${CLAUDE_PLUGIN_ROOT}/scripts\" && npm install || node ${CLAUDE_PLUGIN_ROOT}/scripts/new-hook.js",
"timeout": 60000
}
]
}
],
"PostToolUse": [
{
"matcher": "*",
"hooks": [
{
"type": "command",
"command": "[ ! -d \"${CLAUDE_PLUGIN_ROOT}/scripts/node_modules\" ] && cd \"${CLAUDE_PLUGIN_ROOT}/scripts\" && npm install || true",
"timeout": 60000
},
{
"type": "command",
"command": "node ${CLAUDE_PLUGIN_ROOT}/scripts/save-hook.js",
"timeout": 180000
}
]
}
],
"Stop": [
{
"hooks": [
{
"type": "command",
"command": "[ ! -d \"${CLAUDE_PLUGIN_ROOT}/scripts/node_modules\" ] && cd \"${CLAUDE_PLUGIN_ROOT}/scripts\" && npm install || true",
"timeout": 60000
},
{
"type": "command",
"command": "node ${CLAUDE_PLUGIN_ROOT}/scripts/summary-hook.js",
"timeout": 60000
}
]
}
],
"SessionEnd": [
{
"hooks": [
{
"type": "command",
"command": "[ ! -d \"${CLAUDE_PLUGIN_ROOT}/scripts/node_modules\" ] && cd \"${CLAUDE_PLUGIN_ROOT}/scripts\" && npm install || true",
"timeout": 60000
},
{
"type": "command",
"command": "node ${CLAUDE_PLUGIN_ROOT}/scripts/cleanup-hook.js",
"timeout": 60000
}
]
}
]
}
}