From af30f46bee65213cfd3b5f773a3d8d436253fa63 Mon Sep 17 00:00:00 2001 From: Bryan Van Deusen Date: Tue, 1 Dec 2026 17:32:53 -0500 Subject: [PATCH] Revert the deliberate break: Grimoire tools left alone, shapes_seen named, checkpoint capped Co-Authored-By: Claude Opus 5.5 --- plugin/hooks/grimoire_moment.sh | 4 ++-- plugin/hooks/grimoire_tool_rules.sh | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/plugin/hooks/grimoire_moment.sh b/plugin/hooks/grimoire_moment.sh index 8e54576a..ace88987 100644 --- a/plugin/hooks/grimoire_moment.sh +++ b/plugin/hooks/grimoire_moment.sh @@ -87,7 +87,7 @@ if [ "$now" -gt 0 ] && [ "$tool_key" != "get_rule" ]; then fi case "$tool_name" in - # DELIBERATE BREAK (#8249): Grimoire tools are asked about too + mcp__*grimoire*__*) exit 0 ;; esac # ── Which tools can reach a mounted rule: cached, first line a timestamp ── @@ -128,7 +128,7 @@ ledger_q="${ledger_q}$(grimoire_held_query "$state_dir/${safe_sid}.opened.ids")" # full comes back as its reminder. shapefile=$(grimoire_shapes_file "$safe_sid") shapes_seen=$(grimoire_shapes_seen "$shapefile") -[ -n "$shapes_seen" ] && ledger_q="${ledger_q}&shape_seen=${shapes_seen}" +[ -n "$shapes_seen" ] && ledger_q="${ledger_q}&shapes_seen=${shapes_seen}" # The event whole, since which field a mapping matches is the mapping's # business. A write of a very large file is reduced to its name: the moments a diff --git a/plugin/hooks/grimoire_tool_rules.sh b/plugin/hooks/grimoire_tool_rules.sh index 419a2afe..d0fd1460 100644 --- a/plugin/hooks/grimoire_tool_rules.sh +++ b/plugin/hooks/grimoire_tool_rules.sh @@ -161,7 +161,7 @@ cp_reason=$(grimoire_json_pick "$body_flat" '.checkpoint.reason') if [ -n "$cp_rule" ] && [ -n "$cp_reason" ] && [ -n "$session_id" ]; then stops="$state_dir/${safe_sid}.checkpoint.ids" call_id=$(grimoire_json_pick "$event_flat" '.tool_use_id') - if true; then # DELIBERATE BREAK (#8249): no per-rule cap + if grimoire_checkpoint_allowed "$stops" "$cp_rule"; then grimoire_json_deny PreToolUse "$cp_reason" grimoire_gate_report "$session_id" checkpoint stopped "$tool_name" "$cp_rule" pre_tool_rule "" "$call_id" exit 0