fix: prevent internal prompts and duplicates in memory database

- Add server-side detection of SDK processor's internal system prompt
  in handleSessionInit, since CLAUDE_MNEMONIC_INTERNAL env var is not
  propagated by Claude Code to hook subprocesses
- Add cross-session duplicate detection (FindRecentPromptByTextGlobal)
  to catch same prompt text arriving from different session IDs
- Add hooks, mcpServers, and commands references to plugin.json per
  Claude Code plugin spec
- Remove MCP server injection from register-plugin.sh (now in plugin.json)
- Use ${CLAUDE_PLUGIN_ROOT} for statusline path instead of hardcoded path
- Add python3 fallback for plugin registration when jq is unavailable
- Replace hardcoded 1.0.0 version in findWorkerBinary with glob lookup
- Add cache copy verification in register-plugin.sh
- Add update-version Makefile target to keep metadata in sync
This commit is contained in:
2026-03-07 01:27:25 +00:00
parent 49e7efd27d
commit 7b979a3f95
11 changed files with 261 additions and 60 deletions
+10 -1
View File
@@ -5,5 +5,14 @@
"author": {
"name": "lukaszraczylo",
"email": "lukaszraczylo@users.noreply.github.com"
}
},
"hooks": "./hooks/hooks.json",
"mcpServers": {
"claude-mnemonic": {
"command": "${CLAUDE_PLUGIN_ROOT}/mcp-server",
"args": ["--project", "${CLAUDE_PROJECT}"],
"env": {}
}
},
"commands": ["./commands/restart.md"]
}