mirror of
https://github.com/supermemoryai/claude-supermemory.git
synced 2026-09-14 14:58:03 +08:00
a4ecd312b1
* feat: fail open with 3s network cap on all hooks; async capture; token count in recall banner - All hook API calls hard-capped at 3s (was 15s default, 4s recall); every failure path continues the session with a visible error - Stop/capture hook runs with "async": true — fire-and-forget save, so the user gets their prompt back immediately. Injection hooks stay sync (async hooks' output is discarded, which would kill recall injection and auto-approval); tightened their backstop timeouts - Network failures now say "Supermemory unreachable" instead of raw fetch errors, and session-start no longer claims "no previous memories" when the fetch failed — only a 404 means empty - Recall banner shows the injected context cost: "recalled 5 memories (32 tok)" Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01PfsBZgW6vDm8GEcy9ML3dT * feat: statusline tally counts recalled memories in context, not recall events Search state accumulates a cumulative memories counter (fresh injections only); the resting tally shows "9 recalled" instead of "6 recalls". Sessions with only MCP-tool searches (nothing hook-injected) keep the event-count fallback. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01PfsBZgW6vDm8GEcy9ML3dT --------- Co-authored-by: Claude Fable 5 <noreply@anthropic.com>
52 lines
1.4 KiB
JSON
52 lines
1.4 KiB
JSON
{
|
|
"description": "Supermemory: persistent memory for Claude Code. Injection hooks (SessionStart, UserPromptSubmit, PreToolUse) must stay synchronous — async hooks' output is discarded, which would silently kill context injection and auto-approval. They fail open instead: every network call is capped at 3s and the hook timeout is a backstop, so a dead network never stalls the session. Capture has no output anyone reads, so it runs async.",
|
|
"hooks": {
|
|
"SessionStart": [
|
|
{
|
|
"hooks": [
|
|
{
|
|
"type": "command",
|
|
"command": "node \"${CLAUDE_PLUGIN_ROOT}/hooks/session-start.js\"",
|
|
"timeout": 30
|
|
}
|
|
]
|
|
}
|
|
],
|
|
"UserPromptSubmit": [
|
|
{
|
|
"hooks": [
|
|
{
|
|
"type": "command",
|
|
"command": "node \"${CLAUDE_PLUGIN_ROOT}/hooks/recall-directive.js\"",
|
|
"timeout": 5
|
|
}
|
|
]
|
|
}
|
|
],
|
|
"PreToolUse": [
|
|
{
|
|
"matcher": "mcp__.*supermemory.*",
|
|
"hooks": [
|
|
{
|
|
"type": "command",
|
|
"command": "node \"${CLAUDE_PLUGIN_ROOT}/hooks/recall-approve.js\"",
|
|
"timeout": 5
|
|
}
|
|
]
|
|
}
|
|
],
|
|
"Stop": [
|
|
{
|
|
"hooks": [
|
|
{
|
|
"type": "command",
|
|
"command": "node \"${CLAUDE_PLUGIN_ROOT}/hooks/capture.js\"",
|
|
"async": true,
|
|
"timeout": 30
|
|
}
|
|
]
|
|
}
|
|
]
|
|
}
|
|
}
|