@skillcap/gdh 0.26.3 → 0.26.4
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/INSTALL-BUNDLE.json +1 -1
- package/RELEASE-SPAN-UPDATE-CONTRACTS.json +57 -0
- package/node_modules/@gdh/adapters/dist/templates/authoring-hook.js.tpl +89 -38
- package/node_modules/@gdh/adapters/package.json +8 -8
- package/node_modules/@gdh/authoring/package.json +2 -2
- package/node_modules/@gdh/cli/package.json +10 -10
- package/node_modules/@gdh/core/dist/index.d.ts +1 -1
- package/node_modules/@gdh/core/dist/index.js +1 -1
- package/node_modules/@gdh/core/package.json +1 -1
- package/node_modules/@gdh/docs/package.json +2 -2
- package/node_modules/@gdh/mcp/package.json +8 -8
- package/node_modules/@gdh/observability/package.json +2 -2
- package/node_modules/@gdh/runtime/package.json +2 -2
- package/node_modules/@gdh/scan/package.json +3 -3
- package/node_modules/@gdh/verify/package.json +7 -7
- package/package.json +11 -11
package/INSTALL-BUNDLE.json
CHANGED
|
@@ -3119,6 +3119,63 @@
|
|
|
3119
3119
|
}
|
|
3120
3120
|
]
|
|
3121
3121
|
}
|
|
3122
|
+
},
|
|
3123
|
+
{
|
|
3124
|
+
"version": "0.26.4",
|
|
3125
|
+
"releaseTag": "v0.26.4",
|
|
3126
|
+
"migrationStatus": "required",
|
|
3127
|
+
"summary": "v0.26.4 bumps GDH_UPDATE_HOOK_VERSION 12 -> 13 to land a three-bug fix in the managed authoring-hook.js. Bug A: spawnDetachedWarmup running `gdh lsp warmup` only booted Godot LSP and never primed diagnostics-broker/snapshot.json, so the embedded reader returned `[pending] broker_not_yet_primed` indefinitely; replaced with spawnDetachedRefresh running `gdh authoring diagnostics refresh --target ROOT --changed FILE...` (calls refreshAuthoringDiagnostics which writes snapshot.json + primed marker, per-file 10 s drain timeout). Bug B: Stop hook emitted `{\"hookSpecificOutput\":{\"hookEventName\":\"Stop\",\"additionalContext\":\"...\"}}` for Claude, which Claude Stop schema rejects (Stop accepts only decision/reason/continue/stopReason/suppressOutput/systemMessage); Claude Stop now silent-allow, Codex Stop unchanged. Bug C: same gate silently swallowed Claude PostToolUse [pending]/[stale]/[timeout] hints; gate narrowed to Stop-only on Claude, plus new reasonHint(output, targetRoot) helper appended to context messages so the agent gets per-edit actionable next-step text per broker reason class. Class-1 deterministic re-bake (D-09 / D-03 exempt — GDH_UPDATE_HOOK_VERSION is in CLASS_ONE_REBAKE_EXEMPT). Managed targets re-bake via gdh self-update or gdh migrate --apply. No surface-schema changes; no AGENTS.md contract bump; no broker schema bump.",
|
|
3128
|
+
"releaseHighlights": {
|
|
3129
|
+
"summary": "v0.26.4 is a patch release that fixes a three-bug stack in the managed authoring hook (`packages/adapters/src/templates/authoring-hook.js.tpl`) that was preventing the post-edit dispatch from ever reaching `[fresh]` on Claude. v0.26.3 eliminated the per-edit npx tax via the embedded broker-snapshot reader, but the detached spawn still ran `gdh lsp warmup` — which only boots Godot LSP and writes `lsp-instance.json`, never priming the broker `snapshot.json` that the embedded reader requires. The hook also emitted Claude-invalid Stop JSON and silently dropped Claude PostToolUse hints. v0.26.4 replaces the bare warmup with a scoped `gdh authoring diagnostics refresh --target ROOT --changed FILE...` spawn, makes Claude Stop silent-allow, and adds agent-actionable per-edit `reasonHint` text on `[pending]/[stale]/[timeout]` PostToolUse events.",
|
|
3130
|
+
"operatorChanges": [
|
|
3131
|
+
"**Hook spawns scoped diagnostics refresh, not bare warmup.** `spawnDetachedWarmup(targetRoot)` renamed to `spawnDetachedRefresh(targetRoot, files)`; the spawned argv is `npx -y @skillcap/gdh@PINNED authoring diagnostics refresh --target <root> --changed <file>...` with `detached: true`, `stdio: 'ignore'`, `windowsHide: true`, `.unref()` invariants preserved (Pitfall 1). All four call sites updated (PostToolUse, PostToolBatch, Stop cold-broker × 2). The new CLI verb runs `getManagedLspStatus({ launchPolicy: \"launch_if_needed\" })` (boots Godot if needed), opens scoped files via LSP, drains diagnostics with per-file 10 s timeout, and writes `diagnostics-broker/snapshot.json` plus the `primed` marker via `writePersistedSnapshot` (`packages/authoring/src/diagnostics-broker.ts:316`). Result: post-edit hooks now reach `[fresh]` on the second edit instead of looping forever on `[pending] broker_not_yet_primed`.",
|
|
3132
|
+
"**Claude Stop hook silent-allow.** The Stop hook previously emitted `{\"hookSpecificOutput\":{\"hookEventName\":\"Stop\",\"additionalContext\":\"...\"}}`, which Claude rejects with `error: hook returned invalid stop hook JSON output` because the documented Stop schema only accepts `decision` / `reason` / `continue` / `stopReason` / `suppressOutput` / `systemMessage`. The `context()` gate now returns `allow()` (empty stdout, exit 0) for Claude Stop. Codex Stop is unchanged — Codex accepts `additionalContext` on every event.",
|
|
3133
|
+
"**Per-edit `reasonHint` on Claude PostToolUse / PostToolBatch.** The same `context()` gate previously silently swallowed Claude PostToolUse `[pending]/[stale]/[timeout]` results, so the agent received no per-edit signal. The fix narrows the gate to `if (AGENT !== 'codex' && CURRENT_EVENT === 'Stop') return allow();`, so Claude PostToolUse / PostToolBatch / FileChanged now emit `hookSpecificOutput.additionalContext`. A new `reasonHint(output, targetRoot)` helper appends an agent-actionable next step keyed on the broker reason class (`lsp_instance_not_running`, `broker_not_yet_primed`, `file_not_in_snapshot`, `content_hash_mismatch`, `freshness_expired`, `lsp_instance_identity_mismatch`, generic). Each hint embeds the target path so the agent has copy-paste-ready commands like `gdh authoring diagnostics refresh --target \"<root>\"` or `gdh lsp prune --target \"<root>\"`.",
|
|
3134
|
+
"**`GDH_UPDATE_HOOK_VERSION` 12 → 13.** Forces deterministic re-bake on the existing class-1 deterministic surface mechanism. No agentContract bump, no `MIGRATION_REGISTRY_ENTRIES` entry, no schema change."
|
|
3135
|
+
]
|
|
3136
|
+
},
|
|
3137
|
+
"updateContract": {
|
|
3138
|
+
"summary": "Managed targets must re-bake the managed authoring-hook.js so the detached spawn switches from bare `lsp warmup` to scoped `authoring diagnostics refresh --target ROOT --changed FILE...`, Claude Stop becomes silent-allow (instead of emitting the Claude-invalid `hookSpecificOutput.additionalContext` JSON), and PostToolUse / PostToolBatch [pending]/[stale]/[timeout] events on Claude now deliver agent-actionable reasonHint text. Re-render is deterministic; no manual editor steps. Operators see two visible behavior deltas: post-edit dispatch now reaches `[fresh]` on the second edit instead of looping forever on `broker_not_yet_primed`, and the `Stop hook (failed): hook returned invalid stop hook JSON output` Claude error stops appearing.",
|
|
3139
|
+
"steps": [
|
|
3140
|
+
{
|
|
3141
|
+
"id": "install_v0_26_4",
|
|
3142
|
+
"kind": "mechanical",
|
|
3143
|
+
"summary": "Install the v0.26.4 GDH package.",
|
|
3144
|
+
"detail": "Run gdh self-update so the target uses the new managed authoring-hook.js fingerprint (hook version 13) with the scoped diagnostics-refresh spawn, Claude Stop silent-allow, and reasonHint helper.",
|
|
3145
|
+
"commands": [
|
|
3146
|
+
"gdh self-update --apply"
|
|
3147
|
+
],
|
|
3148
|
+
"validationCommands": [
|
|
3149
|
+
"gdh status",
|
|
3150
|
+
"gdh adapters status"
|
|
3151
|
+
]
|
|
3152
|
+
},
|
|
3153
|
+
{
|
|
3154
|
+
"id": "rebake_authoring_hook",
|
|
3155
|
+
"kind": "mechanical",
|
|
3156
|
+
"summary": "Re-bake managed authoring-hook.js via gdh migrate --apply.",
|
|
3157
|
+
"detail": "If gdh self-update reports pending lifecycle work, run gdh migrate --apply. The migrate path re-renders the managed Codex authoring hook and the Claude authoring hook templates with hook version 13: spawnDetachedRefresh replaces spawnDetachedWarmup (argv: authoring diagnostics refresh --target ROOT --changed FILE...), context() Stop branch returns allow() on Claude (silent), and reasonHint(output, targetRoot) is appended to PostToolUse / PostToolBatch / Stop pending-stale-timeout context messages. The new behavior is opaque to AGENTS.md contract surfaces, settings, and skill bodies; no other re-bake required for this release.",
|
|
3158
|
+
"commands": [
|
|
3159
|
+
"gdh migrate --apply"
|
|
3160
|
+
],
|
|
3161
|
+
"validationCommands": [
|
|
3162
|
+
"gdh adapters status"
|
|
3163
|
+
]
|
|
3164
|
+
},
|
|
3165
|
+
{
|
|
3166
|
+
"id": "confirm_post_edit_reaches_fresh",
|
|
3167
|
+
"kind": "agent_reasoning",
|
|
3168
|
+
"summary": "Confirm post-edit dispatch now reaches `[fresh]` and Claude Stop no longer fails.",
|
|
3169
|
+
"detail": "Inspect the rendered authoring-hook.js header for `gdh-hook-version: 13` and confirm `spawnDetachedRefresh` (or equivalent symbol) plus `reasonHint` appear in the script. Optionally exercise: edit a `.gd` file in the configured Godot target; the first PostToolUse hook returns `[pending] broker_not_yet_primed` plus a `reasonHint` snippet pointing at `gdh authoring diagnostics refresh --target <root>`, and the detached refresh primes `<integrationRoot>/.gdh-state/authoring/diagnostics-broker/snapshot.json` within ~10 s. Subsequent edits to the same file return silent allow ([fresh]) from the embedded reader. End-of-session Stop on Claude no longer surfaces `Stop hook (failed): hook returned invalid stop hook JSON output`.",
|
|
3170
|
+
"commands": [
|
|
3171
|
+
"gdh adapters status"
|
|
3172
|
+
],
|
|
3173
|
+
"validationCommands": [
|
|
3174
|
+
"gdh adapters status"
|
|
3175
|
+
]
|
|
3176
|
+
}
|
|
3177
|
+
]
|
|
3178
|
+
}
|
|
3122
3179
|
}
|
|
3123
3180
|
]
|
|
3124
3181
|
}
|
|
@@ -52,12 +52,14 @@ function handlePostEdit(input, targetRoot) {
|
|
|
52
52
|
const changed = collectChangedFiles(input, targetRoot);
|
|
53
53
|
const authoring = changed.filter(isAuthoringValidationPath);
|
|
54
54
|
if (authoring.length === 0) return allow();
|
|
55
|
-
// Phase 82 / LSP-02: fire-and-forget
|
|
56
|
-
//
|
|
57
|
-
//
|
|
58
|
-
//
|
|
59
|
-
//
|
|
60
|
-
|
|
55
|
+
// Phase 82 / LSP-02: fire-and-forget scoped diagnostics refresh BEFORE the
|
|
56
|
+
// bounded read. The verb calls `refreshAuthoringDiagnostics` which boots
|
|
57
|
+
// Godot LSP if needed, opens scoped files via LSP, drains diagnostics, and
|
|
58
|
+
// writes `diagnostics-broker/snapshot.json` + `primed` marker. Hook still
|
|
59
|
+
// returns within CHECK_TIMEOUT_MS regardless of refresh outcome (Pitfall 1:
|
|
60
|
+
// detached + stdio:'ignore' + .unref() means the parent never blocks on
|
|
61
|
+
// the child).
|
|
62
|
+
spawnDetachedRefresh(targetRoot, authoring);
|
|
61
63
|
// Quick task 260504-ix2: embedded broker-snapshot reader. Replaces the
|
|
62
64
|
// per-edit synchronous `npx -y @skillcap/gdh@PINNED authoring check ...`
|
|
63
65
|
// shellout (which was eating the full `CHECK_TIMEOUT_MS` budget on the npx
|
|
@@ -84,10 +86,10 @@ function handlePostEdit(input, targetRoot) {
|
|
|
84
86
|
return allow();
|
|
85
87
|
}
|
|
86
88
|
if (/^\[pending\]/m.test(output) || /^\[stale\]/m.test(output)) {
|
|
87
|
-
return context(`GDH post-edit authoring check could not prove this edit quickly; continuing without blocking. ${compactOneLine(output || 'Run final authoring validation before claiming code-validity.')}`);
|
|
89
|
+
return context(`GDH post-edit authoring check could not prove this edit quickly; continuing without blocking. ${compactOneLine(output || 'Run final authoring validation before claiming code-validity.')} ${reasonHint(output, targetRoot)}`);
|
|
88
90
|
}
|
|
89
91
|
if (/^\[timeout\]/m.test(output)) {
|
|
90
|
-
return context(`GDH post-edit authoring check returned a timeout status; continuing without blocking. ${compactOneLine(output || 'Run final authoring validation before claiming code-validity.')}`);
|
|
92
|
+
return context(`GDH post-edit authoring check returned a timeout status; continuing without blocking. ${compactOneLine(output || 'Run final authoring validation before claiming code-validity.')} ${reasonHint(output, targetRoot)}`);
|
|
91
93
|
}
|
|
92
94
|
return allow();
|
|
93
95
|
}
|
|
@@ -130,10 +132,10 @@ function handlePostToolBatch(input, targetRoot) {
|
|
|
130
132
|
const authoring = unique(files).filter(isAuthoringValidationPath);
|
|
131
133
|
if (authoring.length === 0) return allow(); // Pitfall 2: no authoring files — no work
|
|
132
134
|
|
|
133
|
-
// SC2:
|
|
134
|
-
// per-edit
|
|
135
|
-
//
|
|
136
|
-
|
|
135
|
+
// SC2: spawnDetachedRefresh reuses the lsp.lock-serialized helper. If a
|
|
136
|
+
// per-edit refresh is already in flight when this fires, the broker side
|
|
137
|
+
// serializes via the lock primitive — no double-spawn of Godot.
|
|
138
|
+
spawnDetachedRefresh(targetRoot, authoring);
|
|
137
139
|
|
|
138
140
|
// Quick task 260504-ix2: embedded broker-snapshot reader replaces the
|
|
139
141
|
// synchronous `npx ... authoring check` shellout. The reader is invoked
|
|
@@ -160,10 +162,10 @@ function handlePostToolBatch(input, targetRoot) {
|
|
|
160
162
|
return allow();
|
|
161
163
|
}
|
|
162
164
|
if (/^\[pending\]/m.test(output) || /^\[stale\]/m.test(output)) {
|
|
163
|
-
return context(`GDH PostToolBatch authoring check could not prove this batch quickly; continuing without blocking. ${compactOneLine(output || 'Run final authoring validation before claiming code-validity.')}`);
|
|
165
|
+
return context(`GDH PostToolBatch authoring check could not prove this batch quickly; continuing without blocking. ${compactOneLine(output || 'Run final authoring validation before claiming code-validity.')} ${reasonHint(output, targetRoot)}`);
|
|
164
166
|
}
|
|
165
167
|
if (/^\[timeout\]/m.test(output)) {
|
|
166
|
-
return context(`GDH PostToolBatch authoring check returned a timeout status; continuing without blocking. ${compactOneLine(output || 'Run final authoring validation before claiming code-validity.')}`);
|
|
168
|
+
return context(`GDH PostToolBatch authoring check returned a timeout status; continuing without blocking. ${compactOneLine(output || 'Run final authoring validation before claiming code-validity.')} ${reasonHint(output, targetRoot)}`);
|
|
167
169
|
}
|
|
168
170
|
return allow();
|
|
169
171
|
}
|
|
@@ -171,24 +173,39 @@ function handlePostToolBatch(input, targetRoot) {
|
|
|
171
173
|
// Quick task 260504-ix2: `runGdh` deleted. The function previously wrapped
|
|
172
174
|
// `spawnSync('npx', ['-y', '@skillcap/gdh@PINNED', ...args])` for the three
|
|
173
175
|
// event handlers (handlePostEdit, handlePostToolBatch, handleStop). All three
|
|
174
|
-
// now call `runEmbeddedDiagnosticsRead` instead. `
|
|
176
|
+
// now call `runEmbeddedDiagnosticsRead` instead. `spawnDetachedRefresh` uses
|
|
175
177
|
// `child_process.spawn` directly (always did — it was never a `runGdh`
|
|
176
|
-
// caller), so removing the helper has no effect on the
|
|
177
|
-
|
|
178
|
-
//
|
|
179
|
-
//
|
|
180
|
-
//
|
|
178
|
+
// caller), so removing the helper has no effect on the refresh path.
|
|
179
|
+
// Quick task 260504-o6w renamed `spawnDetachedWarmup` → `spawnDetachedRefresh`
|
|
180
|
+
// and switched the spawn argv from `lsp warmup` to `authoring diagnostics
|
|
181
|
+
// refresh --changed`. Detached spawn still uses `child_process.spawn` directly
|
|
182
|
+
// (always did).
|
|
183
|
+
|
|
184
|
+
// Quick task 260504-o6w. Fire-and-forget scoped diagnostics refresh from the
|
|
185
|
+
// post-edit hook. The CLI verb calls `refreshAuthoringDiagnostics` which boots
|
|
186
|
+
// Godot LSP if needed, opens scoped files via LSP, drains diagnostics, and
|
|
187
|
+
// writes `diagnostics-broker/snapshot.json` + `primed` marker — so this single
|
|
188
|
+
// fire-and-forget call covers BOTH warmup and broker priming. The previous
|
|
189
|
+
// `lsp warmup` argv only wrote `lsp-instance.json` and left the broker empty,
|
|
190
|
+
// leaving the embedded reader stuck on `[pending] broker_not_yet_primed`
|
|
191
|
+
// indefinitely (verified live on TheBeacon, 2026-05-04 dogfooding session 14).
|
|
181
192
|
//
|
|
182
193
|
// All three options are required (Pitfall 1):
|
|
183
194
|
// - detached: true — child gets its own process group, survives parent exit
|
|
184
195
|
// - stdio: 'ignore' — no fds tether the child to the parent's lifecycle
|
|
185
196
|
// - windowsHide: true — prevents a console flash on Windows
|
|
186
197
|
// .unref() is required so the Node event loop does not wait on the child.
|
|
187
|
-
function
|
|
198
|
+
function spawnDetachedRefresh(targetRoot, files) {
|
|
188
199
|
try {
|
|
200
|
+
const args = ['-y', `@skillcap/gdh@${PINNED_VERSION}`, 'authoring', 'diagnostics', 'refresh', '--target', targetRoot];
|
|
201
|
+
if (Array.isArray(files)) {
|
|
202
|
+
for (const f of files) {
|
|
203
|
+
args.push('--changed', f);
|
|
204
|
+
}
|
|
205
|
+
}
|
|
189
206
|
const child = require('child_process').spawn(
|
|
190
207
|
'npx',
|
|
191
|
-
|
|
208
|
+
args,
|
|
192
209
|
{
|
|
193
210
|
cwd: targetRoot,
|
|
194
211
|
detached: true,
|
|
@@ -198,7 +215,7 @@ function spawnDetachedWarmup(targetRoot) {
|
|
|
198
215
|
);
|
|
199
216
|
child.unref();
|
|
200
217
|
} catch (_error) {
|
|
201
|
-
// Silent failure —
|
|
218
|
+
// Silent failure — refresh is fire-and-forget. The bounded read below still runs.
|
|
202
219
|
}
|
|
203
220
|
}
|
|
204
221
|
|
|
@@ -262,27 +279,27 @@ function handleStop(input, targetRoot) {
|
|
|
262
279
|
return allow();
|
|
263
280
|
}
|
|
264
281
|
if (/^\[failed\]/m.test(output) || /^\[partial\]/m.test(output) || /^\[stale\]/m.test(output)) {
|
|
265
|
-
return stopContext(`GDH session-end check found unresolved diagnostics: ${compactOneLine(output)}`);
|
|
282
|
+
return stopContext(`GDH session-end check found unresolved diagnostics: ${compactOneLine(output)} ${reasonHint(output, targetRoot)}`);
|
|
266
283
|
}
|
|
267
284
|
if (/^\[pending\]/m.test(output) || /^\[timeout\]/m.test(output)) {
|
|
268
|
-
// Cold/missing broker: spawn detached
|
|
285
|
+
// Cold/missing broker: spawn detached refresh so the NEXT session benefits.
|
|
269
286
|
// The current Stop returns additionalContext recommending manual
|
|
270
287
|
// `gdh authoring check --mode final` (the relaxed contract — see RFC 0009
|
|
271
|
-
// addendum 2026-05-04).
|
|
288
|
+
// addendum 2026-05-04). spawnDetachedRefresh is fire-and-forget; it never
|
|
272
289
|
// blocks hook return.
|
|
273
|
-
|
|
290
|
+
spawnDetachedRefresh(targetRoot, authoringFiles);
|
|
274
291
|
return stopContext(
|
|
275
292
|
'GDH session-end check could not prove final code-validity from the cached broker snapshot; continuing without blocking. ' +
|
|
276
293
|
'Run `gdh authoring check --mode final` manually before claiming code-validity. ' +
|
|
277
|
-
compactOneLine(output),
|
|
294
|
+
compactOneLine(output) + ' ' + reasonHint(output, targetRoot),
|
|
278
295
|
);
|
|
279
296
|
}
|
|
280
297
|
// Unknown status: degrade to additionalContext (NEVER block).
|
|
281
|
-
|
|
298
|
+
spawnDetachedRefresh(targetRoot, authoringFiles);
|
|
282
299
|
return stopContext(
|
|
283
300
|
'GDH session-end check could not produce a final result; continuing without blocking. ' +
|
|
284
301
|
'Run `gdh authoring check --mode final` manually before claiming code-validity. ' +
|
|
285
|
-
compactOneLine(output),
|
|
302
|
+
compactOneLine(output) + ' ' + reasonHint(output, targetRoot),
|
|
286
303
|
);
|
|
287
304
|
}
|
|
288
305
|
|
|
@@ -626,15 +643,49 @@ function compactOneLine(value) {
|
|
|
626
643
|
}
|
|
627
644
|
|
|
628
645
|
function allow() { process.exit(0); }
|
|
646
|
+
// Quick task 260504-o6w: agent-actionable hint derived from the Reasons: line in
|
|
647
|
+
// the embedded reader's output. The mapping covers all reason classes emitted by
|
|
648
|
+
// `formatStatus` so the agent receives a copy-paste-ready command rather than a
|
|
649
|
+
// generic "authoring check failed" message.
|
|
650
|
+
function reasonHint(output, targetRoot) {
|
|
651
|
+
const text = String(output || '');
|
|
652
|
+
const match = text.match(/^Reasons:\s*(.+)$/m);
|
|
653
|
+
const reasons = match ? match[1].split(',').map(r => r.trim()).filter(Boolean) : [];
|
|
654
|
+
// JSON.stringify embeds the path so spaces and quotes survive shell re-use.
|
|
655
|
+
const targetArg = JSON.stringify(targetRoot);
|
|
656
|
+
// First-match-wins ordering: more specific reasons before generic.
|
|
657
|
+
if (reasons.includes('lsp_instance_identity_mismatch')) {
|
|
658
|
+
return `Cross-worktree LSP from another checkout. Run \`gdh lsp prune --target ${targetArg}\` then retry the edit.`;
|
|
659
|
+
}
|
|
660
|
+
if (reasons.includes('lsp_instance_not_running')) {
|
|
661
|
+
return `LSP launching in background; next edit will report fresh diagnostics. Force-prime: \`gdh authoring diagnostics refresh --target ${targetArg}\``;
|
|
662
|
+
}
|
|
663
|
+
if (reasons.includes('broker_not_yet_primed') || reasons.includes('file_not_in_snapshot')) {
|
|
664
|
+
return `Broker priming in background; next edit will be fresh. Force-prime: \`gdh authoring diagnostics refresh --target ${targetArg}\``;
|
|
665
|
+
}
|
|
666
|
+
if (reasons.includes('content_hash_mismatch') || reasons.includes('freshness_expired')) {
|
|
667
|
+
return `Broker snapshot stale; background refresh running. Force-prime: \`gdh authoring diagnostics refresh --target ${targetArg}\``;
|
|
668
|
+
}
|
|
669
|
+
return `Run \`gdh authoring check --mode final --target ${targetArg}\` to prime broker before claiming code-validity.`;
|
|
670
|
+
}
|
|
671
|
+
// Codex always receives hookSpecificOutput.additionalContext (any event — Codex's
|
|
672
|
+
// hook contract accepts it on PreToolUse / PostToolUse / Stop / etc.).
|
|
673
|
+
//
|
|
674
|
+
// Claude receives hookSpecificOutput.additionalContext on PostToolUse / PostToolBatch
|
|
675
|
+
// / FileChanged. Claude Stop is silent-allow because the Stop hook schema does NOT
|
|
676
|
+
// accept additionalContext (only decision/reason/continue/stopReason/suppressOutput/
|
|
677
|
+
// systemMessage). The previous gate emitted the wrong shape on every Claude Stop
|
|
678
|
+
// and Claude rejected it as "invalid stop hook JSON output" (quick task 260504-o6w
|
|
679
|
+
// bug B, verified live on TheBeacon 2026-05-04).
|
|
629
680
|
function context(additionalContext) {
|
|
630
|
-
//
|
|
631
|
-
//
|
|
632
|
-
//
|
|
633
|
-
//
|
|
634
|
-
//
|
|
635
|
-
|
|
636
|
-
|
|
637
|
-
|
|
681
|
+
// Claude: Stop hook schema does NOT accept hookSpecificOutput.additionalContext
|
|
682
|
+
// (only decision/reason/continue/stopReason/suppressOutput/systemMessage). Emitting
|
|
683
|
+
// the wrong shape causes Claude to reject the hook with "invalid stop hook JSON
|
|
684
|
+
// output" — verified locally 2026-05-04 (quick task 260504-o6w bug B). Drop to
|
|
685
|
+
// silent-allow on Claude Stop. Claude PostToolUse / PostToolBatch DO accept
|
|
686
|
+
// additionalContext, so those branches still flow through. Codex accepts
|
|
687
|
+
// additionalContext on every event.
|
|
688
|
+
if (AGENT !== 'codex' && CURRENT_EVENT === 'Stop') return allow();
|
|
638
689
|
const payload = { hookSpecificOutput: { hookEventName: CURRENT_EVENT, additionalContext } };
|
|
639
690
|
process.stdout.write(`${JSON.stringify(payload)}\n`);
|
|
640
691
|
process.exit(0);
|
|
@@ -11,13 +11,13 @@
|
|
|
11
11
|
}
|
|
12
12
|
},
|
|
13
13
|
"dependencies": {
|
|
14
|
-
"@gdh/authoring": "0.26.
|
|
15
|
-
"@gdh/core": "0.26.
|
|
16
|
-
"@gdh/docs": "0.26.
|
|
17
|
-
"@gdh/observability": "0.26.
|
|
18
|
-
"@gdh/runtime": "0.26.
|
|
19
|
-
"@gdh/scan": "0.26.
|
|
20
|
-
"@gdh/verify": "0.26.
|
|
14
|
+
"@gdh/authoring": "0.26.4",
|
|
15
|
+
"@gdh/core": "0.26.4",
|
|
16
|
+
"@gdh/docs": "0.26.4",
|
|
17
|
+
"@gdh/observability": "0.26.4",
|
|
18
|
+
"@gdh/runtime": "0.26.4",
|
|
19
|
+
"@gdh/scan": "0.26.4",
|
|
20
|
+
"@gdh/verify": "0.26.4"
|
|
21
21
|
},
|
|
22
|
-
"version": "0.26.
|
|
22
|
+
"version": "0.26.4"
|
|
23
23
|
}
|
|
@@ -15,16 +15,16 @@
|
|
|
15
15
|
},
|
|
16
16
|
"dependencies": {
|
|
17
17
|
"@clack/prompts": "^1.2.0",
|
|
18
|
-
"@gdh/adapters": "0.26.
|
|
19
|
-
"@gdh/authoring": "0.26.
|
|
20
|
-
"@gdh/core": "0.26.
|
|
21
|
-
"@gdh/docs": "0.26.
|
|
22
|
-
"@gdh/mcp": "0.26.
|
|
23
|
-
"@gdh/observability": "0.26.
|
|
24
|
-
"@gdh/runtime": "0.26.
|
|
25
|
-
"@gdh/scan": "0.26.
|
|
26
|
-
"@gdh/verify": "0.26.
|
|
18
|
+
"@gdh/adapters": "0.26.4",
|
|
19
|
+
"@gdh/authoring": "0.26.4",
|
|
20
|
+
"@gdh/core": "0.26.4",
|
|
21
|
+
"@gdh/docs": "0.26.4",
|
|
22
|
+
"@gdh/mcp": "0.26.4",
|
|
23
|
+
"@gdh/observability": "0.26.4",
|
|
24
|
+
"@gdh/runtime": "0.26.4",
|
|
25
|
+
"@gdh/scan": "0.26.4",
|
|
26
|
+
"@gdh/verify": "0.26.4",
|
|
27
27
|
"picocolors": "^1.1.1"
|
|
28
28
|
},
|
|
29
|
-
"version": "0.26.
|
|
29
|
+
"version": "0.26.4"
|
|
30
30
|
}
|
|
@@ -55,7 +55,7 @@ export declare const GDH_AUTHORING_DOGFOOD_VERSION = 1;
|
|
|
55
55
|
export declare const GDH_AUTHORING_SLICE_REPORT_VERSION = 1;
|
|
56
56
|
export declare const GDH_MCP_MANIFEST_VERSION = 1;
|
|
57
57
|
export declare const GDH_CURSOR_RULE_VERSION = 4;
|
|
58
|
-
export declare const GDH_UPDATE_HOOK_VERSION =
|
|
58
|
+
export declare const GDH_UPDATE_HOOK_VERSION = 13;
|
|
59
59
|
export declare const GDH_RUNTIME_RECIPE_RUN_VERSION = 1;
|
|
60
60
|
export declare const GDH_RUNTIME_RUN_BUNDLE_VERSION = 1;
|
|
61
61
|
export declare const GDH_RUNTIME_CORPUS_ARTIFACT_VERSION = 1;
|
|
@@ -47,7 +47,7 @@ export const GDH_AUTHORING_DOGFOOD_VERSION = 1;
|
|
|
47
47
|
export const GDH_AUTHORING_SLICE_REPORT_VERSION = 1;
|
|
48
48
|
export const GDH_MCP_MANIFEST_VERSION = 1;
|
|
49
49
|
export const GDH_CURSOR_RULE_VERSION = 4;
|
|
50
|
-
export const GDH_UPDATE_HOOK_VERSION =
|
|
50
|
+
export const GDH_UPDATE_HOOK_VERSION = 13;
|
|
51
51
|
export const GDH_RUNTIME_RECIPE_RUN_VERSION = 1;
|
|
52
52
|
export const GDH_RUNTIME_RUN_BUNDLE_VERSION = 1;
|
|
53
53
|
export const GDH_RUNTIME_CORPUS_ARTIFACT_VERSION = 1;
|
|
@@ -11,14 +11,14 @@
|
|
|
11
11
|
}
|
|
12
12
|
},
|
|
13
13
|
"dependencies": {
|
|
14
|
-
"@gdh/adapters": "0.26.
|
|
15
|
-
"@gdh/authoring": "0.26.
|
|
16
|
-
"@gdh/core": "0.26.
|
|
17
|
-
"@gdh/docs": "0.26.
|
|
18
|
-
"@gdh/observability": "0.26.
|
|
19
|
-
"@gdh/scan": "0.26.
|
|
20
|
-
"@gdh/verify": "0.26.
|
|
14
|
+
"@gdh/adapters": "0.26.4",
|
|
15
|
+
"@gdh/authoring": "0.26.4",
|
|
16
|
+
"@gdh/core": "0.26.4",
|
|
17
|
+
"@gdh/docs": "0.26.4",
|
|
18
|
+
"@gdh/observability": "0.26.4",
|
|
19
|
+
"@gdh/scan": "0.26.4",
|
|
20
|
+
"@gdh/verify": "0.26.4",
|
|
21
21
|
"@modelcontextprotocol/sdk": "1.29.0"
|
|
22
22
|
},
|
|
23
|
-
"version": "0.26.
|
|
23
|
+
"version": "0.26.4"
|
|
24
24
|
}
|
|
@@ -11,13 +11,13 @@
|
|
|
11
11
|
}
|
|
12
12
|
},
|
|
13
13
|
"dependencies": {
|
|
14
|
-
"@gdh/authoring": "0.26.
|
|
15
|
-
"@gdh/core": "0.26.
|
|
16
|
-
"@gdh/docs": "0.26.
|
|
17
|
-
"@gdh/observability": "0.26.
|
|
18
|
-
"@gdh/runtime": "0.26.
|
|
19
|
-
"@gdh/scan": "0.26.
|
|
14
|
+
"@gdh/authoring": "0.26.4",
|
|
15
|
+
"@gdh/core": "0.26.4",
|
|
16
|
+
"@gdh/docs": "0.26.4",
|
|
17
|
+
"@gdh/observability": "0.26.4",
|
|
18
|
+
"@gdh/runtime": "0.26.4",
|
|
19
|
+
"@gdh/scan": "0.26.4",
|
|
20
20
|
"yaml": "^2.8.3"
|
|
21
21
|
},
|
|
22
|
-
"version": "0.26.
|
|
22
|
+
"version": "0.26.4"
|
|
23
23
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@skillcap/gdh",
|
|
3
|
-
"version": "0.26.
|
|
3
|
+
"version": "0.26.4",
|
|
4
4
|
"description": "Godot-specific authoring and validation harness for agentic development.",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"type": "module",
|
|
@@ -31,17 +31,17 @@
|
|
|
31
31
|
"releaseStage": "broader_internal_release"
|
|
32
32
|
},
|
|
33
33
|
"dependencies": {
|
|
34
|
-
"@gdh/cli": "0.26.
|
|
34
|
+
"@gdh/cli": "0.26.4",
|
|
35
35
|
"@clack/prompts": "^1.2.0",
|
|
36
|
-
"@gdh/adapters": "0.26.
|
|
37
|
-
"@gdh/authoring": "0.26.
|
|
38
|
-
"@gdh/core": "0.26.
|
|
39
|
-
"@gdh/docs": "0.26.
|
|
40
|
-
"@gdh/mcp": "0.26.
|
|
41
|
-
"@gdh/observability": "0.26.
|
|
42
|
-
"@gdh/runtime": "0.26.
|
|
43
|
-
"@gdh/scan": "0.26.
|
|
44
|
-
"@gdh/verify": "0.26.
|
|
36
|
+
"@gdh/adapters": "0.26.4",
|
|
37
|
+
"@gdh/authoring": "0.26.4",
|
|
38
|
+
"@gdh/core": "0.26.4",
|
|
39
|
+
"@gdh/docs": "0.26.4",
|
|
40
|
+
"@gdh/mcp": "0.26.4",
|
|
41
|
+
"@gdh/observability": "0.26.4",
|
|
42
|
+
"@gdh/runtime": "0.26.4",
|
|
43
|
+
"@gdh/scan": "0.26.4",
|
|
44
|
+
"@gdh/verify": "0.26.4",
|
|
45
45
|
"picocolors": "^1.1.1"
|
|
46
46
|
},
|
|
47
47
|
"bundledDependencies": [
|