diff --git a/plugin/hooks/hooks.json b/plugin/hooks/hooks.json index 9628ad4578..b8afb4a6dc 100644 --- a/plugin/hooks/hooks.json +++ b/plugin/hooks/hooks.json @@ -24,12 +24,12 @@ }, { "type": "command", -"command": "export PATH=\"$($SHELL -lc 'echo $PATH' 2>/dev/null):$PATH\"; _R=\"${CLAUDE_PLUGIN_ROOT}\"; [ -z \"$_R\" ] && _R=$(ls -dt $HOME/.claude/plugins/cache/thedotmack/claude-mem/[0-9]*/ 2>/dev/null | head -1); _R=\"${_R%/}\"; [ -z \"$_R\" ] && _R=\"$HOME/.claude/plugins/marketplaces/thedotmack/plugin\"; node \"$_R/scripts/bun-runner.js\" \"$_R/scripts/worker-service.cjs\" start; for i in 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20; do curl -sf http://localhost:37777/health >/dev/null 2>&1 && break; sleep 1; done; curl -sf http://localhost:37777/health >/dev/null 2>&1 || true; echo '{\"continue\":true,\"suppressOutput\":true}'", +"command": "export PATH=\"$($SHELL -lc 'echo $PATH' 2>/dev/null):$PATH\"; _R=\"${CLAUDE_PLUGIN_ROOT}\"; [ -z \"$_R\" ] && _R=$(ls -dt $HOME/.claude/plugins/cache/thedotmack/claude-mem/[0-9]*/ 2>/dev/null | head -1); _R=\"${_R%/}\"; [ -z \"$_R\" ] && _R=\"$HOME/.claude/plugins/marketplaces/thedotmack/plugin\"; PORT=\"${CLAUDE_MEM_WORKER_PORT:-}\"; HOST=\"${CLAUDE_MEM_WORKER_HOST:-}\"; [ -z \"$PORT\" ] && PORT=$(sed -n 's/.*\"CLAUDE_MEM_WORKER_PORT\"[^0-9]*\\([0-9][0-9]*\\).*/\\1/p' \"$HOME/.claude-mem/settings.json\" 2>/dev/null | head -1); [ -z \"$HOST\" ] && HOST=$(sed -n 's/.*\"CLAUDE_MEM_WORKER_HOST\"[^\"]*\"\\([^\"]*\\)\".*/\\1/p' \"$HOME/.claude-mem/settings.json\" 2>/dev/null | head -1); if [ -z \"$PORT\" ]; then case \"$(uname -s 2>/dev/null)\" in MINGW*|CYGWIN*|MSYS*) PORT=37777;; *) PORT=$((37700 + $(id -u 2>/dev/null || echo 77) % 100));; esac; fi; [ -z \"$HOST\" ] && HOST=127.0.0.1; node \"$_R/scripts/bun-runner.js\" \"$_R/scripts/worker-service.cjs\" start; for i in 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20; do curl -sf http://$HOST:$PORT/health >/dev/null 2>&1 && break; sleep 1; done; curl -sf http://$HOST:$PORT/health >/dev/null 2>&1 || true; echo '{\"continue\":true,\"suppressOutput\":true}'", "timeout": 60 }, { "type": "command", -"command": "export PATH=\"$($SHELL -lc 'echo $PATH' 2>/dev/null):$PATH\"; _R=\"${CLAUDE_PLUGIN_ROOT}\"; [ -z \"$_R\" ] && _R=$(ls -dt $HOME/.claude/plugins/cache/thedotmack/claude-mem/[0-9]*/ 2>/dev/null | head -1); _R=\"${_R%/}\"; [ -z \"$_R\" ] && _R=\"$HOME/.claude/plugins/marketplaces/thedotmack/plugin\"; for i in 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20; do curl -sf http://localhost:37777/health >/dev/null 2>&1 && break; sleep 1; done; if curl -sf http://localhost:37777/health >/dev/null 2>&1; then node \"$_R/scripts/bun-runner.js\" \"$_R/scripts/worker-service.cjs\" hook claude-code context || true; fi", +"command": "export PATH=\"$($SHELL -lc 'echo $PATH' 2>/dev/null):$PATH\"; _R=\"${CLAUDE_PLUGIN_ROOT}\"; [ -z \"$_R\" ] && _R=$(ls -dt $HOME/.claude/plugins/cache/thedotmack/claude-mem/[0-9]*/ 2>/dev/null | head -1); _R=\"${_R%/}\"; [ -z \"$_R\" ] && _R=\"$HOME/.claude/plugins/marketplaces/thedotmack/plugin\"; PORT=\"${CLAUDE_MEM_WORKER_PORT:-}\"; HOST=\"${CLAUDE_MEM_WORKER_HOST:-}\"; [ -z \"$PORT\" ] && PORT=$(sed -n 's/.*\"CLAUDE_MEM_WORKER_PORT\"[^0-9]*\\([0-9][0-9]*\\).*/\\1/p' \"$HOME/.claude-mem/settings.json\" 2>/dev/null | head -1); [ -z \"$HOST\" ] && HOST=$(sed -n 's/.*\"CLAUDE_MEM_WORKER_HOST\"[^\"]*\"\\([^\"]*\\)\".*/\\1/p' \"$HOME/.claude-mem/settings.json\" 2>/dev/null | head -1); if [ -z \"$PORT\" ]; then case \"$(uname -s 2>/dev/null)\" in MINGW*|CYGWIN*|MSYS*) PORT=37777;; *) PORT=$((37700 + $(id -u 2>/dev/null || echo 77) % 100));; esac; fi; [ -z \"$HOST\" ] && HOST=127.0.0.1; for i in 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20; do curl -sf http://$HOST:$PORT/health >/dev/null 2>&1 && break; sleep 1; done; if curl -sf http://$HOST:$PORT/health >/dev/null 2>&1; then node \"$_R/scripts/bun-runner.js\" \"$_R/scripts/worker-service.cjs\" hook claude-code context || true; fi", "timeout": 60 } ] @@ -40,7 +40,7 @@ "hooks": [ { "type": "command", - "command": "export PATH=\"$($SHELL -lc 'echo $PATH' 2>/dev/null):$PATH\"; _R=\"${CLAUDE_PLUGIN_ROOT}\"; [ -z \"$_R\" ] && _R=$(ls -dt $HOME/.claude/plugins/cache/thedotmack/claude-mem/[0-9]*/ 2>/dev/null | head -1); _R=\"${_R%/}\"; [ -z \"$_R\" ] && _R=\"$HOME/.claude/plugins/marketplaces/thedotmack/plugin\"; node \"$_R/scripts/bun-runner.js\" \"$_R/scripts/worker-service.cjs\" hook claude-code session-init", + "command": "export PATH=\"$($SHELL -lc 'echo $PATH' 2>/dev/null):$PATH\"; _R=\"${CLAUDE_PLUGIN_ROOT}\"; [ -z \"$_R\" ] && _R=$(ls -dt $HOME/.claude/plugins/cache/thedotmack/claude-mem/[0-9]*/ 2>/dev/null | head -1); _R=\"${_R%/}\"; [ -z \"$_R\" ] && _R=\"$HOME/.claude/plugins/marketplaces/thedotmack/plugin\"; PORT=\"${CLAUDE_MEM_WORKER_PORT:-}\"; HOST=\"${CLAUDE_MEM_WORKER_HOST:-}\"; [ -z \"$PORT\" ] && PORT=$(sed -n 's/.*\"CLAUDE_MEM_WORKER_PORT\"[^0-9]*\\([0-9][0-9]*\\).*/\\1/p' \"$HOME/.claude-mem/settings.json\" 2>/dev/null | head -1); [ -z \"$HOST\" ] && HOST=$(sed -n 's/.*\"CLAUDE_MEM_WORKER_HOST\"[^\"]*\"\\([^\"]*\\)\".*/\\1/p' \"$HOME/.claude-mem/settings.json\" 2>/dev/null | head -1); if [ -z \"$PORT\" ]; then case \"$(uname -s 2>/dev/null)\" in MINGW*|CYGWIN*|MSYS*) PORT=37777;; *) PORT=$((37700 + $(id -u 2>/dev/null || echo 77) % 100));; esac; fi; [ -z \"$HOST\" ] && HOST=127.0.0.1; _HEALTH=0; curl -sf http://$HOST:$PORT/health >/dev/null 2>&1 && _HEALTH=1 || for i in 1 2 3 4 5 6 7 8 9 10; do sleep 1; curl -sf http://$HOST:$PORT/health >/dev/null 2>&1 && _HEALTH=1 && break; done; [ \"$_HEALTH\" = \"1\" ] && node \"$_R/scripts/bun-runner.js\" \"$_R/scripts/worker-service.cjs\" hook claude-code session-init", "timeout": 60 } ]