@skillcap/gdh 0.25.3 → 0.25.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.
@@ -1,5 +1,5 @@
1
1
  {
2
2
  "product": "GDH",
3
- "version": "0.25.3",
3
+ "version": "0.25.4",
4
4
  "installMode": "packaged_install"
5
5
  }
@@ -2769,6 +2769,61 @@
2769
2769
  }
2770
2770
  ]
2771
2771
  }
2772
+ },
2773
+ {
2774
+ "version": "0.25.4",
2775
+ "releaseTag": "v0.25.4",
2776
+ "migrationStatus": "required",
2777
+ "summary": "v0.25.4 re-bakes managed authoring hook scripts so post-edit feedback is bounded, timeout-safe, and cleaner in Codex hook output. GDH_UPDATE_HOOK_VERSION bumps from 7 to 8.",
2778
+ "releaseHighlights": {
2779
+ "summary": "v0.25.4 makes managed post-edit authoring hooks faster and cleaner. Hooks now treat broker refresh as a bounded, non-fatal warmup, cap the post-edit authoring check, and only block when the compact check reports blocking diagnostics. Codex hook context no longer repeats the full diagnostic payload already present in feedback.",
2780
+ "operatorChanges": [
2781
+ "**Post-edit hooks are bounded.** Diagnostics broker refresh defaults to a 5s timeout and post-edit authoring check defaults to a 15s timeout instead of allowing each `npx` call to run for up to 120s.",
2782
+ "**Timeouts do not block edit flow.** If post-edit diagnostics time out, are unconfirmed, or fail before producing diagnostics, hooks continue without blocking and remind Codex agents to run final authoring validation before claiming code-validity.",
2783
+ "**Blocking output is easier to read.** Blocking diagnostics are separated from the hook preface by a blank line, long output is truncated with a rerun hint, and Codex `additionalContext` is a short summary instead of a duplicate copy of the diagnostics."
2784
+ ]
2785
+ },
2786
+ "updateContract": {
2787
+ "summary": "Managed targets must re-bake authoring hook scripts for v0.25.4. The update replaces long-running/noisy post-edit hook behavior with bounded opportunistic feedback.",
2788
+ "steps": [
2789
+ {
2790
+ "id": "install_v0_25_4",
2791
+ "kind": "mechanical",
2792
+ "summary": "Install the v0.25.4 GDH package.",
2793
+ "detail": "Run gdh self-update so the target uses the bounded authoring hook renderer.",
2794
+ "commands": [
2795
+ "gdh self-update --apply"
2796
+ ],
2797
+ "validationCommands": [
2798
+ "gdh status"
2799
+ ]
2800
+ },
2801
+ {
2802
+ "id": "rebake_authoring_hooks",
2803
+ "kind": "mechanical",
2804
+ "summary": "Re-bake managed hook scripts.",
2805
+ "detail": "Run migration/apply if the update reports pending lifecycle work. This rewrites managed Claude and Codex authoring hook scripts with hook version 8.",
2806
+ "commands": [
2807
+ "gdh migrate --apply"
2808
+ ],
2809
+ "validationCommands": [
2810
+ "gdh adapters status"
2811
+ ]
2812
+ },
2813
+ {
2814
+ "id": "confirm_hook_version",
2815
+ "kind": "agent_reasoning",
2816
+ "summary": "Confirm managed hook scripts report hook version 8.",
2817
+ "detail": "For managed Claude/Codex targets, inspect generated authoring hook headers or adapter status and confirm the hook surface has been refreshed.",
2818
+ "commands": [
2819
+ "gdh adapters status"
2820
+ ],
2821
+ "validationCommands": [
2822
+ "gdh adapters status"
2823
+ ]
2824
+ }
2825
+ ]
2826
+ }
2772
2827
  }
2773
2828
  ]
2774
2829
  }
@@ -10,6 +10,9 @@ const path = require('path');
10
10
  const { spawnSync } = require('child_process');
11
11
 
12
12
  const AUTHORING_EXTENSIONS = new Set(['.gd', '.tscn', '.tres']);
13
+ const REFRESH_TIMEOUT_MS = readBoundedPositiveIntEnv('GDH_AUTHORING_HOOK_REFRESH_TIMEOUT_MS', 5000, 30000);
14
+ const CHECK_TIMEOUT_MS = readBoundedPositiveIntEnv('GDH_AUTHORING_HOOK_CHECK_TIMEOUT_MS', 15000, 60000);
15
+ const MAX_BLOCK_OUTPUT_CHARS = 4000;
13
16
  let CURRENT_EVENT = '';
14
17
 
15
18
  main();
@@ -31,25 +34,47 @@ function handlePostEdit(input, targetRoot) {
31
34
  const changedArgs = authoring.flatMap((file) => ['--changed', file]);
32
35
  // Attempt to refresh the diagnostics broker for changed files.
33
36
  // Broker refresh failure is non-fatal: the authoring check falls back to direct LSP.
34
- runGdh(targetRoot, ['authoring', 'diagnostics', 'refresh', '--target', targetRoot, ...changedArgs]);
37
+ runGdh(targetRoot, ['authoring', 'diagnostics', 'refresh', '--target', targetRoot, ...changedArgs], {
38
+ timeoutMs: REFRESH_TIMEOUT_MS,
39
+ });
35
40
  // Run compact authoring check. When broker was refreshed, this uses the fresh snapshot.
36
41
  // When broker is unavailable, this falls back to direct LSP post-edit collection.
37
- const result = runGdh(targetRoot, ['authoring', 'check', '--target', targetRoot, '--mode', 'post-edit', '--format', 'compact', ...changedArgs]);
38
- if (!result.ok || !/Completion allowed\./.test(result.output)) {
39
- return block(`GDH post-edit authoring check needs attention.\n${result.output || result.error || 'No check output.'}`);
42
+ const result = runGdh(targetRoot, ['authoring', 'check', '--target', targetRoot, '--mode', 'post-edit', '--format', 'compact', ...changedArgs], {
43
+ timeoutMs: CHECK_TIMEOUT_MS,
44
+ });
45
+ if (result.timedOut) {
46
+ return context(`GDH post-edit authoring check timed out after ${CHECK_TIMEOUT_MS}ms; continuing without blocking. Run \`gdh authoring check --mode final\` before claiming code-validity.`);
47
+ }
48
+ if (/Completion blocked\./.test(result.output)) {
49
+ return block(formatBlockingReason(result.output));
50
+ }
51
+ if (/Completion allowed\./.test(result.output)) {
52
+ return allow();
53
+ }
54
+ if (/Completion unconfirmed\./.test(result.output)) {
55
+ return context('GDH post-edit authoring check was unconfirmed; continuing without blocking. Run `gdh authoring check --mode final` before claiming code-validity.');
56
+ }
57
+ if (!result.ok) {
58
+ return context(`GDH post-edit authoring check failed before producing diagnostics; continuing without blocking. ${compactOneLine(result.error || result.output || 'Run final authoring validation before claiming code-validity.')}`);
40
59
  }
41
60
  return allow();
42
61
  }
43
62
 
44
- function runGdh(targetRoot, args) {
63
+ function runGdh(targetRoot, args, options = {}) {
45
64
  const result = spawnSync('npx', ['-y', `@skillcap/gdh@${PINNED_VERSION}`, ...args], {
46
65
  cwd: targetRoot,
47
66
  encoding: 'utf8',
48
67
  windowsHide: true,
49
- timeout: 120000,
68
+ timeout: options.timeoutMs || CHECK_TIMEOUT_MS,
50
69
  });
51
70
  const output = `${result.stdout || ''}${result.stderr || ''}`.trim();
52
- return { ok: result.status === 0, output, error: result.error ? String(result.error.message || result.error) : '' };
71
+ const error = result.error ? String(result.error.message || result.error) : '';
72
+ return {
73
+ ok: result.status === 0 && !result.error,
74
+ output,
75
+ error,
76
+ timedOut: Boolean(result.error && result.error.code === 'ETIMEDOUT'),
77
+ };
53
78
  }
54
79
 
55
80
  function collectChangedFiles(input, targetRoot) {
@@ -118,11 +143,43 @@ function resolveTargetRoot(input) {
118
143
  function unique(values) { return [...new Set(values.filter(Boolean))].sort(); }
119
144
  function readHookInput() { try { return JSON.parse(fs.readFileSync(0, 'utf8') || '{}'); } catch { return {}; } }
120
145
 
146
+ function readBoundedPositiveIntEnv(name, fallback, max) {
147
+ const raw = process.env[name];
148
+ if (!raw) return fallback;
149
+ const parsed = Number(raw);
150
+ if (!Number.isFinite(parsed) || parsed <= 0) return fallback;
151
+ return Math.min(Math.floor(parsed), max);
152
+ }
153
+
154
+ function formatBlockingReason(output) {
155
+ return `GDH post-edit authoring check found blocking diagnostics.\n\n${truncate(output || 'No check output.', MAX_BLOCK_OUTPUT_CHARS)}`;
156
+ }
157
+
158
+ function truncate(value, maxChars) {
159
+ const text = String(value || '').trim();
160
+ if (text.length <= maxChars) return text;
161
+ return `${text.slice(0, maxChars - 80).trimEnd()}\n... GDH hook output truncated; run \`gdh authoring check --mode post-edit\` for full diagnostics.`;
162
+ }
163
+
164
+ function compactOneLine(value) {
165
+ return String(value || '').replace(/\s+/g, ' ').trim();
166
+ }
167
+
121
168
  function allow() { process.exit(0); }
169
+ function context(additionalContext) {
170
+ if (AGENT !== 'codex') return allow();
171
+ const payload = { hookSpecificOutput: { hookEventName: CURRENT_EVENT, additionalContext } };
172
+ process.stdout.write(`${JSON.stringify(payload)}\n`);
173
+ process.exit(0);
174
+ }
122
175
  function block(reason) {
123
176
  const payload = { decision: 'block', reason };
124
- if (AGENT === 'codex') payload.hookSpecificOutput = { hookEventName: CURRENT_EVENT, additionalContext: reason };
177
+ if (AGENT === 'codex') {
178
+ payload.hookSpecificOutput = {
179
+ hookEventName: CURRENT_EVENT,
180
+ additionalContext: 'GDH found blocking authoring diagnostics after this edit. Fix the diagnostics in feedback before continuing.',
181
+ };
182
+ }
125
183
  process.stdout.write(`${JSON.stringify(payload)}\n`);
126
184
  process.exit(0);
127
185
  }
128
-
@@ -11,13 +11,13 @@
11
11
  }
12
12
  },
13
13
  "dependencies": {
14
- "@gdh/authoring": "0.25.3",
15
- "@gdh/core": "0.25.3",
16
- "@gdh/docs": "0.25.3",
17
- "@gdh/observability": "0.25.3",
18
- "@gdh/runtime": "0.25.3",
19
- "@gdh/scan": "0.25.3",
20
- "@gdh/verify": "0.25.3"
14
+ "@gdh/authoring": "0.25.4",
15
+ "@gdh/core": "0.25.4",
16
+ "@gdh/docs": "0.25.4",
17
+ "@gdh/observability": "0.25.4",
18
+ "@gdh/runtime": "0.25.4",
19
+ "@gdh/scan": "0.25.4",
20
+ "@gdh/verify": "0.25.4"
21
21
  },
22
- "version": "0.25.3"
22
+ "version": "0.25.4"
23
23
  }
@@ -14,7 +14,7 @@
14
14
  "test": "vitest run"
15
15
  },
16
16
  "dependencies": {
17
- "@gdh/core": "0.25.3"
17
+ "@gdh/core": "0.25.4"
18
18
  },
19
- "version": "0.25.3"
19
+ "version": "0.25.4"
20
20
  }
@@ -15,16 +15,16 @@
15
15
  },
16
16
  "dependencies": {
17
17
  "@clack/prompts": "^1.2.0",
18
- "@gdh/adapters": "0.25.3",
19
- "@gdh/authoring": "0.25.3",
20
- "@gdh/core": "0.25.3",
21
- "@gdh/docs": "0.25.3",
22
- "@gdh/mcp": "0.25.3",
23
- "@gdh/observability": "0.25.3",
24
- "@gdh/runtime": "0.25.3",
25
- "@gdh/scan": "0.25.3",
26
- "@gdh/verify": "0.25.3",
18
+ "@gdh/adapters": "0.25.4",
19
+ "@gdh/authoring": "0.25.4",
20
+ "@gdh/core": "0.25.4",
21
+ "@gdh/docs": "0.25.4",
22
+ "@gdh/mcp": "0.25.4",
23
+ "@gdh/observability": "0.25.4",
24
+ "@gdh/runtime": "0.25.4",
25
+ "@gdh/scan": "0.25.4",
26
+ "@gdh/verify": "0.25.4",
27
27
  "picocolors": "^1.1.1"
28
28
  },
29
- "version": "0.25.3"
29
+ "version": "0.25.4"
30
30
  }
@@ -46,7 +46,7 @@ export declare const GDH_AUTHORING_DOGFOOD_VERSION = 1;
46
46
  export declare const GDH_AUTHORING_SLICE_REPORT_VERSION = 1;
47
47
  export declare const GDH_MCP_MANIFEST_VERSION = 1;
48
48
  export declare const GDH_CURSOR_RULE_VERSION = 4;
49
- export declare const GDH_UPDATE_HOOK_VERSION = 7;
49
+ export declare const GDH_UPDATE_HOOK_VERSION = 8;
50
50
  export declare const GDH_RUNTIME_RECIPE_RUN_VERSION = 1;
51
51
  export declare const GDH_RUNTIME_RUN_BUNDLE_VERSION = 1;
52
52
  export declare const GDH_RUNTIME_CORPUS_ARTIFACT_VERSION = 1;
@@ -38,7 +38,7 @@ export const GDH_AUTHORING_DOGFOOD_VERSION = 1;
38
38
  export const GDH_AUTHORING_SLICE_REPORT_VERSION = 1;
39
39
  export const GDH_MCP_MANIFEST_VERSION = 1;
40
40
  export const GDH_CURSOR_RULE_VERSION = 4;
41
- export const GDH_UPDATE_HOOK_VERSION = 7;
41
+ export const GDH_UPDATE_HOOK_VERSION = 8;
42
42
  export const GDH_RUNTIME_RECIPE_RUN_VERSION = 1;
43
43
  export const GDH_RUNTIME_RUN_BUNDLE_VERSION = 1;
44
44
  export const GDH_RUNTIME_CORPUS_ARTIFACT_VERSION = 1;
@@ -10,5 +10,5 @@
10
10
  "import": "./dist/index.js"
11
11
  }
12
12
  },
13
- "version": "0.25.3"
13
+ "version": "0.25.4"
14
14
  }
@@ -11,8 +11,8 @@
11
11
  }
12
12
  },
13
13
  "dependencies": {
14
- "@gdh/core": "0.25.3",
14
+ "@gdh/core": "0.25.4",
15
15
  "yaml": "^2.8.3"
16
16
  },
17
- "version": "0.25.3"
17
+ "version": "0.25.4"
18
18
  }
@@ -11,14 +11,14 @@
11
11
  }
12
12
  },
13
13
  "dependencies": {
14
- "@gdh/adapters": "0.25.3",
15
- "@gdh/authoring": "0.25.3",
16
- "@gdh/core": "0.25.3",
17
- "@gdh/docs": "0.25.3",
18
- "@gdh/observability": "0.25.3",
19
- "@gdh/scan": "0.25.3",
20
- "@gdh/verify": "0.25.3",
14
+ "@gdh/adapters": "0.25.4",
15
+ "@gdh/authoring": "0.25.4",
16
+ "@gdh/core": "0.25.4",
17
+ "@gdh/docs": "0.25.4",
18
+ "@gdh/observability": "0.25.4",
19
+ "@gdh/scan": "0.25.4",
20
+ "@gdh/verify": "0.25.4",
21
21
  "@modelcontextprotocol/sdk": "1.29.0"
22
22
  },
23
- "version": "0.25.3"
23
+ "version": "0.25.4"
24
24
  }
@@ -11,7 +11,7 @@
11
11
  }
12
12
  },
13
13
  "dependencies": {
14
- "@gdh/core": "0.25.3"
14
+ "@gdh/core": "0.25.4"
15
15
  },
16
- "version": "0.25.3"
16
+ "version": "0.25.4"
17
17
  }
@@ -11,9 +11,9 @@
11
11
  }
12
12
  },
13
13
  "dependencies": {
14
- "@gdh/core": "0.25.3",
14
+ "@gdh/core": "0.25.4",
15
15
  "ws": "^8.18.3",
16
16
  "yaml": "^2.8.3"
17
17
  },
18
- "version": "0.25.3"
18
+ "version": "0.25.4"
19
19
  }
@@ -11,8 +11,8 @@
11
11
  }
12
12
  },
13
13
  "dependencies": {
14
- "@gdh/core": "0.25.3",
15
- "@gdh/docs": "0.25.3"
14
+ "@gdh/core": "0.25.4",
15
+ "@gdh/docs": "0.25.4"
16
16
  },
17
- "version": "0.25.3"
17
+ "version": "0.25.4"
18
18
  }
@@ -11,13 +11,13 @@
11
11
  }
12
12
  },
13
13
  "dependencies": {
14
- "@gdh/authoring": "0.25.3",
15
- "@gdh/core": "0.25.3",
16
- "@gdh/docs": "0.25.3",
17
- "@gdh/observability": "0.25.3",
18
- "@gdh/runtime": "0.25.3",
19
- "@gdh/scan": "0.25.3",
14
+ "@gdh/authoring": "0.25.4",
15
+ "@gdh/core": "0.25.4",
16
+ "@gdh/docs": "0.25.4",
17
+ "@gdh/observability": "0.25.4",
18
+ "@gdh/runtime": "0.25.4",
19
+ "@gdh/scan": "0.25.4",
20
20
  "yaml": "^2.8.3"
21
21
  },
22
- "version": "0.25.3"
22
+ "version": "0.25.4"
23
23
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@skillcap/gdh",
3
- "version": "0.25.3",
3
+ "version": "0.25.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.25.3",
34
+ "@gdh/cli": "0.25.4",
35
35
  "@clack/prompts": "^1.2.0",
36
- "@gdh/adapters": "0.25.3",
37
- "@gdh/authoring": "0.25.3",
38
- "@gdh/core": "0.25.3",
39
- "@gdh/docs": "0.25.3",
40
- "@gdh/mcp": "0.25.3",
41
- "@gdh/observability": "0.25.3",
42
- "@gdh/runtime": "0.25.3",
43
- "@gdh/scan": "0.25.3",
44
- "@gdh/verify": "0.25.3",
36
+ "@gdh/adapters": "0.25.4",
37
+ "@gdh/authoring": "0.25.4",
38
+ "@gdh/core": "0.25.4",
39
+ "@gdh/docs": "0.25.4",
40
+ "@gdh/mcp": "0.25.4",
41
+ "@gdh/observability": "0.25.4",
42
+ "@gdh/runtime": "0.25.4",
43
+ "@gdh/scan": "0.25.4",
44
+ "@gdh/verify": "0.25.4",
45
45
  "picocolors": "^1.1.1"
46
46
  },
47
47
  "bundledDependencies": [