@windyroad/jtbd 0.12.4 → 0.12.5-preview.617
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/hooks/hooks.json
CHANGED
|
@@ -12,7 +12,7 @@
|
|
|
12
12
|
],
|
|
13
13
|
"PostToolUse": [
|
|
14
14
|
{ "matcher": "Agent", "hooks": [{ "type": "command", "command": "${CLAUDE_PLUGIN_ROOT}/hooks/jtbd-mark-reviewed.sh" }] },
|
|
15
|
-
{ "matcher": "Agent|Bash", "hooks": [{ "type": "command", "command": "${CLAUDE_PLUGIN_ROOT}/hooks/jtbd-slide-marker.sh" }] }
|
|
15
|
+
{ "matcher": "Agent|Bash|Skill", "hooks": [{ "type": "command", "command": "${CLAUDE_PLUGIN_ROOT}/hooks/jtbd-slide-marker.sh" }] }
|
|
16
16
|
]
|
|
17
17
|
}
|
|
18
18
|
}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
#!/bin/bash
|
|
2
|
-
# JTBD - PostToolUse:Agent|Bash slide-marker hook (P111).
|
|
2
|
+
# JTBD - PostToolUse:Agent|Bash|Skill slide-marker hook (P111 + P213).
|
|
3
3
|
# Slides the parent session's existing jtbd-reviewed marker forward on
|
|
4
4
|
# subprocess return, treating subprocess wall-clock as continuous parent-
|
|
5
5
|
# session work for TTL purposes. Only TOUCHES an existing marker — never
|
|
@@ -98,3 +98,21 @@ _backdate() {
|
|
|
98
98
|
# Fail-safe: when the hook input cannot be parsed, treat as error and skip
|
|
99
99
|
[ "$BEFORE" = "$AFTER" ]
|
|
100
100
|
}
|
|
101
|
+
|
|
102
|
+
@test "slide: triggers correctly on Skill tool_response shape (P213, ADR-009 2026-06-08 amendment)" {
|
|
103
|
+
# hooks.json matcher expansion Agent|Bash → Agent|Bash|Skill (P213 Option D)
|
|
104
|
+
# widens slide-marker coverage to PostToolUse:Skill completions (e.g. the
|
|
105
|
+
# /wr-risk-scorer:assess-* sibling assessor SKILLs run as long subprocesses
|
|
106
|
+
# by the AFK orchestrator). The Skill tool_response shape is identical to
|
|
107
|
+
# Agent|Bash (Claude Code's uniform PostToolUse contract), so the matcher-
|
|
108
|
+
# agnostic helper composes without code changes. This test documents that
|
|
109
|
+
# contract explicitly so a future hook_input shape divergence regression
|
|
110
|
+
# surfaces here rather than at the gate-denial site.
|
|
111
|
+
touch "$MARKER"
|
|
112
|
+
_backdate "$MARKER" 60
|
|
113
|
+
BEFORE=$(_mtime "$MARKER")
|
|
114
|
+
_HOOK_INPUT='{"tool_name":"Skill","tool_response":{"content":[{"type":"text","text":"OK"}]}}'
|
|
115
|
+
slide_marker_on_subprocess_return "$MARKER"
|
|
116
|
+
AFTER=$(_mtime "$MARKER")
|
|
117
|
+
[ "$AFTER" -gt "$BEFORE" ]
|
|
118
|
+
}
|