diff --git a/.claude-plugin/marketplace.json b/.claude-plugin/marketplace.json index d1f621a..1681f88 100644 --- a/.claude-plugin/marketplace.json +++ b/.claude-plugin/marketplace.json @@ -8,7 +8,7 @@ "name": "compaction-advisor", "source": "./", "description": "Automatic context monitoring that prevents mid-task compaction. Shows real-time free space in status line and injects context state so Claude knows when to recommend /compact.", - "version": "2.0.0", + "version": "2.0.1", "license": "MIT" } ] diff --git a/.claude-plugin/plugin.json b/.claude-plugin/plugin.json index cb6b98e..341593c 100644 --- a/.claude-plugin/plugin.json +++ b/.claude-plugin/plugin.json @@ -1,8 +1,7 @@ { "name": "compaction-advisor", - "version": "2.0.0", + "version": "2.0.1", "description": "Automatic context monitoring that prevents mid-task compaction. Shows real-time free space in status line and injects context state so Claude knows when to recommend /compact.", "skills": "./", - "hooks": "./hooks/hooks.json", "commands": "./commands" } diff --git a/hooks/hooks.json b/hooks/hooks.json index dc80396..af8b452 100644 --- a/hooks/hooks.json +++ b/hooks/hooks.json @@ -1,35 +1,37 @@ { - "UserPromptSubmit": [ - { - "matcher": "", - "hooks": [ - { - "type": "command", - "command": "${CLAUDE_PLUGIN_ROOT}/scripts/inject_context.sh" - } - ] - } - ], - "PostToolUse": [ - { - "matcher": "*", - "hooks": [ - { - "type": "command", - "command": "${CLAUDE_PLUGIN_ROOT}/scripts/checkpoint_advisor.sh" - } - ] - } - ], - "PreCompact": [ - { - "matcher": "", - "hooks": [ - { - "type": "command", - "command": "${CLAUDE_PLUGIN_ROOT}/scripts/precompact_advisor.sh" - } - ] - } - ] + "hooks": { + "UserPromptSubmit": [ + { + "matcher": "", + "hooks": [ + { + "type": "command", + "command": "${CLAUDE_PLUGIN_ROOT}/scripts/inject_context.sh" + } + ] + } + ], + "PostToolUse": [ + { + "matcher": "*", + "hooks": [ + { + "type": "command", + "command": "${CLAUDE_PLUGIN_ROOT}/scripts/checkpoint_advisor.sh" + } + ] + } + ], + "PreCompact": [ + { + "matcher": "", + "hooks": [ + { + "type": "command", + "command": "${CLAUDE_PLUGIN_ROOT}/scripts/precompact_advisor.sh" + } + ] + } + ] + } } diff --git a/scripts/inject_context.sh b/scripts/inject_context.sh index f6f72aa..01c019d 100755 --- a/scripts/inject_context.sh +++ b/scripts/inject_context.sh @@ -4,7 +4,7 @@ # Reads session-specific context state and outputs warning if concerning. # Only outputs when context is concerning (caution/warning/critical). -set -euo pipefail +# No set -euo pipefail — causes hook errors on Linux # Read hook input to get session ID input=$(cat)