@skillcap/gdh 2.0.1 → 3.0.0
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 +56 -0
- package/node_modules/@gdh/adapters/dist/authoring-hook-render.d.ts +3 -18
- package/node_modules/@gdh/adapters/dist/authoring-hook-render.d.ts.map +1 -1
- package/node_modules/@gdh/adapters/dist/authoring-hook-render.js +11 -6
- package/node_modules/@gdh/adapters/dist/authoring-hook-render.js.map +1 -1
- package/node_modules/@gdh/adapters/dist/claude-settings-patch.d.ts +15 -3
- package/node_modules/@gdh/adapters/dist/claude-settings-patch.d.ts.map +1 -1
- package/node_modules/@gdh/adapters/dist/claude-settings-patch.js +14 -2
- package/node_modules/@gdh/adapters/dist/claude-settings-patch.js.map +1 -1
- package/node_modules/@gdh/adapters/dist/claude-statusline-render.d.ts +18 -9
- package/node_modules/@gdh/adapters/dist/claude-statusline-render.d.ts.map +1 -1
- package/node_modules/@gdh/adapters/dist/claude-statusline-render.js +18 -9
- package/node_modules/@gdh/adapters/dist/claude-statusline-render.js.map +1 -1
- package/node_modules/@gdh/adapters/dist/claude-update-hook-render.d.ts +8 -2
- package/node_modules/@gdh/adapters/dist/claude-update-hook-render.d.ts.map +1 -1
- package/node_modules/@gdh/adapters/dist/claude-update-hook-render.js +8 -2
- package/node_modules/@gdh/adapters/dist/claude-update-hook-render.js.map +1 -1
- package/node_modules/@gdh/adapters/dist/claude-update-worker-render.d.ts +2 -2
- package/node_modules/@gdh/adapters/dist/claude-update-worker-render.js +2 -2
- package/node_modules/@gdh/adapters/dist/index.d.ts +2 -5
- package/node_modules/@gdh/adapters/dist/index.d.ts.map +1 -1
- package/node_modules/@gdh/adapters/dist/index.js +10 -72
- package/node_modules/@gdh/adapters/dist/index.js.map +1 -1
- package/node_modules/@gdh/adapters/dist/templates/authoring-hook.js.tpl +49 -43
- package/node_modules/@gdh/adapters/package.json +8 -8
- package/node_modules/@gdh/authoring/dist/project.d.ts.map +1 -1
- package/node_modules/@gdh/authoring/dist/project.js +39 -12
- package/node_modules/@gdh/authoring/dist/project.js.map +1 -1
- package/node_modules/@gdh/authoring/package.json +2 -2
- package/node_modules/@gdh/cli/dist/index.d.ts.map +1 -1
- package/node_modules/@gdh/cli/dist/index.js +121 -80
- package/node_modules/@gdh/cli/dist/index.js.map +1 -1
- package/node_modules/@gdh/cli/dist/self-update.d.ts.map +1 -1
- package/node_modules/@gdh/cli/dist/self-update.js +62 -1
- package/node_modules/@gdh/cli/dist/self-update.js.map +1 -1
- package/node_modules/@gdh/cli/dist/setup.d.ts +7 -0
- package/node_modules/@gdh/cli/dist/setup.d.ts.map +1 -1
- package/node_modules/@gdh/cli/dist/setup.js +43 -11
- package/node_modules/@gdh/cli/dist/setup.js.map +1 -1
- package/node_modules/@gdh/cli/package.json +10 -10
- package/node_modules/@gdh/core/dist/git-root.d.ts +8 -0
- package/node_modules/@gdh/core/dist/git-root.d.ts.map +1 -0
- package/node_modules/@gdh/core/dist/git-root.js +39 -0
- package/node_modules/@gdh/core/dist/git-root.js.map +1 -0
- package/node_modules/@gdh/core/dist/index.d.ts +15 -18
- package/node_modules/@gdh/core/dist/index.d.ts.map +1 -1
- package/node_modules/@gdh/core/dist/index.js +13 -2
- package/node_modules/@gdh/core/dist/index.js.map +1 -1
- package/node_modules/@gdh/core/dist/migrations/entries/s3c21_to_s3c22_canonical_hook_paths.d.ts +3 -0
- package/node_modules/@gdh/core/dist/migrations/entries/s3c21_to_s3c22_canonical_hook_paths.d.ts.map +1 -0
- package/node_modules/@gdh/core/dist/migrations/entries/s3c21_to_s3c22_canonical_hook_paths.js +336 -0
- package/node_modules/@gdh/core/dist/migrations/entries/s3c21_to_s3c22_canonical_hook_paths.js.map +1 -0
- package/node_modules/@gdh/core/dist/migrations/managed-surface-classes.d.ts +13 -11
- package/node_modules/@gdh/core/dist/migrations/managed-surface-classes.d.ts.map +1 -1
- package/node_modules/@gdh/core/dist/migrations/managed-surface-classes.js +13 -11
- package/node_modules/@gdh/core/dist/migrations/managed-surface-classes.js.map +1 -1
- package/node_modules/@gdh/core/dist/migrations/registry.d.ts +1 -1
- package/node_modules/@gdh/core/dist/migrations/registry.d.ts.map +1 -1
- package/node_modules/@gdh/core/dist/migrations/registry.js +2 -0
- package/node_modules/@gdh/core/dist/migrations/registry.js.map +1 -1
- package/node_modules/@gdh/core/dist/state/codex-retrust-reminder.d.ts +40 -0
- package/node_modules/@gdh/core/dist/state/codex-retrust-reminder.d.ts.map +1 -0
- package/node_modules/@gdh/core/dist/state/codex-retrust-reminder.js +66 -0
- package/node_modules/@gdh/core/dist/state/codex-retrust-reminder.js.map +1 -0
- package/node_modules/@gdh/core/dist/state/migration-trace.d.ts +61 -0
- package/node_modules/@gdh/core/dist/state/migration-trace.d.ts.map +1 -0
- package/node_modules/@gdh/core/dist/state/migration-trace.js +103 -0
- package/node_modules/@gdh/core/dist/state/migration-trace.js.map +1 -0
- package/node_modules/@gdh/core/dist/update-probe.d.ts +1 -2
- package/node_modules/@gdh/core/dist/update-probe.d.ts.map +1 -1
- package/node_modules/@gdh/core/dist/update-probe.js +1 -2
- package/node_modules/@gdh/core/dist/update-probe.js.map +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/node_modules/@gdh/adapters/dist/authoring-hook-state-path.d.ts +0 -17
- package/node_modules/@gdh/adapters/dist/authoring-hook-state-path.d.ts.map +0 -1
- package/node_modules/@gdh/adapters/dist/authoring-hook-state-path.js +0 -23
- package/node_modules/@gdh/adapters/dist/authoring-hook-state-path.js.map +0 -1
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
import fs from "node:fs/promises";
|
|
2
|
+
import path from "node:path";
|
|
3
|
+
/**
|
|
4
|
+
* Codex re-trust reminder marker (RFC 0010 / CPATH-16 / PR-1).
|
|
5
|
+
*
|
|
6
|
+
* Codex CLI 0.124.0+ silently disables hooks whose `command` literal differs
|
|
7
|
+
* from the trusted hash. The v3.0.0 canonical-path migration rewrites the
|
|
8
|
+
* managed authoring-hook command literal in `.codex/config.toml` (legacy
|
|
9
|
+
* `node -e ... walk-up ...` → `sh -c 'node "$(git rev-parse ...)/...".js codex'`),
|
|
10
|
+
* so every existing Codex-managed target ends up with a `Modified` hook
|
|
11
|
+
* entry until the operator manually re-trusts via `/hooks` → `t` in the
|
|
12
|
+
* Codex TUI. GDH cannot detect re-trust state from outside Codex (the hash
|
|
13
|
+
* is internal), so the best we can do is print the reminder unconditionally
|
|
14
|
+
* the first time post-migration the operator runs `gdh status` against a
|
|
15
|
+
* Codex-managed target — and clear the marker after surfacing it once.
|
|
16
|
+
*
|
|
17
|
+
* Storage: `<targetPath>/.gdh-state/codex-retrust-reminder.json`
|
|
18
|
+
*
|
|
19
|
+
* Lifecycle:
|
|
20
|
+
* 1. Migration entry sets the marker after rewriting the
|
|
21
|
+
* `.codex/config.toml` envelope.
|
|
22
|
+
* 2. `gdh self-update` post-success surfaces the reminder on stderr
|
|
23
|
+
* immediately (CPATH-16 first part).
|
|
24
|
+
* 3. `gdh status` reads + emits the reminder on its first invocation
|
|
25
|
+
* against a Codex-managed target post-migration (CPATH-16 second part)
|
|
26
|
+
* and clears the marker.
|
|
27
|
+
*
|
|
28
|
+
* The marker is a single line; the structured JSON shape is for future
|
|
29
|
+
* extensibility (set_at timestamp + entry_id provenance).
|
|
30
|
+
*/
|
|
31
|
+
export const CODEX_RETRUST_REMINDER_RELATIVE_PATH = ".gdh-state/codex-retrust-reminder.json";
|
|
32
|
+
export const CODEX_RETRUST_REMINDER_TEXT = "Codex CLI users must re-trust the GDH hooks: open Codex, run `/hooks`, " +
|
|
33
|
+
"press `t` on each Modified GDH entry. Until re-trusted, the Codex " +
|
|
34
|
+
"authoring guard does not fire on PostToolUse / Stop and edits proceed " +
|
|
35
|
+
"without managed validation.";
|
|
36
|
+
export async function setCodexRetrustReminder(targetPath, setBy) {
|
|
37
|
+
const filePath = path.join(targetPath, CODEX_RETRUST_REMINDER_RELATIVE_PATH);
|
|
38
|
+
await fs.mkdir(path.dirname(filePath), { recursive: true });
|
|
39
|
+
const payload = {
|
|
40
|
+
setBy,
|
|
41
|
+
setAt: new Date().toISOString(),
|
|
42
|
+
};
|
|
43
|
+
await fs.writeFile(filePath, `${JSON.stringify(payload, null, 2)}\n`, "utf8");
|
|
44
|
+
}
|
|
45
|
+
export async function readCodexRetrustReminder(targetPath) {
|
|
46
|
+
const filePath = path.join(targetPath, CODEX_RETRUST_REMINDER_RELATIVE_PATH);
|
|
47
|
+
const raw = await fs.readFile(filePath, "utf8").catch(() => null);
|
|
48
|
+
if (raw === null)
|
|
49
|
+
return null;
|
|
50
|
+
try {
|
|
51
|
+
const parsed = JSON.parse(raw);
|
|
52
|
+
if (typeof parsed.setBy !== "string")
|
|
53
|
+
return null;
|
|
54
|
+
if (typeof parsed.setAt !== "string")
|
|
55
|
+
return null;
|
|
56
|
+
return { setBy: parsed.setBy, setAt: parsed.setAt };
|
|
57
|
+
}
|
|
58
|
+
catch {
|
|
59
|
+
return null;
|
|
60
|
+
}
|
|
61
|
+
}
|
|
62
|
+
export async function clearCodexRetrustReminder(targetPath) {
|
|
63
|
+
const filePath = path.join(targetPath, CODEX_RETRUST_REMINDER_RELATIVE_PATH);
|
|
64
|
+
await fs.rm(filePath, { force: true });
|
|
65
|
+
}
|
|
66
|
+
//# sourceMappingURL=codex-retrust-reminder.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"codex-retrust-reminder.js","sourceRoot":"","sources":["../../src/state/codex-retrust-reminder.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,kBAAk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AAE,OAAO,IAAI,CAAC;QAClD,IAAI,OAAO,MAAM,CAAC,KAAK,KAAK,QAAQ;YAAE,OAAO,IAAI,CAAC;QAClD,OAAO,EAAE,KAAK,EAAE,MAAM,CAAC,KAAK,EAAE,KAAK,EAAE,MAAM,CAAC,KAAK,EAAE,CAAC;IACtD,CAAC;IAAC,MAAM,CAAC;QACP,OAAO,IAAI,CAAC;IACd,CAAC;AACH,CAAC;AAED,MAAM,CAAC,KAAK,UAAU,yBAAyB,CAC7C,UAAkB;IAElB,MAAM,QAAQ,GAAG,IAAI,CAAC,IAAI,CAAC,UAAU,EAAE,oCAAoC,CAAC,CAAC;IAC7E,MAAM,EAAE,CAAC,EAAE,CAAC,QAAQ,EAAE,EAAE,KAAK,EAAE,IAAI,EAAE,CAAC,CAAC;AACzC,CAAC"}
|
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Per-entry migration trace state (RFC 0010 / CPATH-15).
|
|
3
|
+
*
|
|
4
|
+
* When a class-1 migration entry runs as part of `bumpAndRebakePin`, it
|
|
5
|
+
* records each file moved and each command literal rewritten as a structured
|
|
6
|
+
* trace event. The orchestrator reads these events post-apply and surfaces
|
|
7
|
+
* them via `gdh self-update` stdout/stderr in the same shape `gdh prepare`
|
|
8
|
+
* uses for migration actions (kind / relativePath / summary).
|
|
9
|
+
*
|
|
10
|
+
* Storage layout:
|
|
11
|
+
* <targetPath>/.gdh-state/migration-trace/<entryId>.json
|
|
12
|
+
*
|
|
13
|
+
* One file per entry. Append-only within a single transform; the orchestrator
|
|
14
|
+
* reads the file after `applyMigrationChain` returns `applied` and clears it
|
|
15
|
+
* with `clearMigrationTrace()` after the events are surfaced (so re-running
|
|
16
|
+
* self-update on an already-migrated target reports an empty trace, not the
|
|
17
|
+
* historic one).
|
|
18
|
+
*
|
|
19
|
+
* The trace is intentionally NOT durable post-self-update: it lives only as
|
|
20
|
+
* long as the apply path needs it. Migration receipts (already-applied vs not)
|
|
21
|
+
* live in `.gdh-state/migration.json` (`migration-state.ts`); migration trace
|
|
22
|
+
* is the human-readable detail emitted at apply time only.
|
|
23
|
+
*/
|
|
24
|
+
export declare const MIGRATION_TRACE_RELATIVE_DIR = ".gdh-state/migration-trace";
|
|
25
|
+
/**
|
|
26
|
+
* Closed-kind enum for trace events produced by the v3.0.0 canonical-path
|
|
27
|
+
* migration entry. Future migrations may extend this union; consumers MUST
|
|
28
|
+
* handle unknown kinds defensively (treat as opaque "operator-readable
|
|
29
|
+
* change").
|
|
30
|
+
*/
|
|
31
|
+
export type GdhMigrationTraceEventKind = "file_deleted" | "directory_removed" | "claude_settings_rewritten" | "codex_config_rewritten";
|
|
32
|
+
export interface GdhMigrationTraceEvent {
|
|
33
|
+
readonly kind: GdhMigrationTraceEventKind;
|
|
34
|
+
readonly relativePath: string;
|
|
35
|
+
/** Operator-readable one-line description of the change. */
|
|
36
|
+
readonly summary: string;
|
|
37
|
+
}
|
|
38
|
+
export interface GdhMigrationTraceFile {
|
|
39
|
+
readonly entryId: string;
|
|
40
|
+
readonly events: readonly GdhMigrationTraceEvent[];
|
|
41
|
+
}
|
|
42
|
+
/**
|
|
43
|
+
* Append a single trace event for `entryId`. Creates the trace file if it
|
|
44
|
+
* does not yet exist. Idempotency: callers that re-run on an already-migrated
|
|
45
|
+
* target SHOULD not call this when no work was performed (the entry's
|
|
46
|
+
* transform already short-circuits in that case).
|
|
47
|
+
*/
|
|
48
|
+
export declare function appendMigrationTraceEvent(targetPath: string, entryId: string, event: GdhMigrationTraceEvent): Promise<void>;
|
|
49
|
+
/**
|
|
50
|
+
* Read the trace files for every entry that recorded events during the
|
|
51
|
+
* apply path. Returns one envelope per entry id, in filename-sort order.
|
|
52
|
+
* Missing trace dir → empty array.
|
|
53
|
+
*/
|
|
54
|
+
export declare function readMigrationTraceFiles(targetPath: string): Promise<readonly GdhMigrationTraceFile[]>;
|
|
55
|
+
/**
|
|
56
|
+
* Remove the trace dir entirely after the orchestrator has surfaced the
|
|
57
|
+
* events. Best-effort: missing dir is a no-op; non-empty subdirs (foreign
|
|
58
|
+
* content) are not touched.
|
|
59
|
+
*/
|
|
60
|
+
export declare function clearMigrationTrace(targetPath: string): Promise<void>;
|
|
61
|
+
//# sourceMappingURL=migration-trace.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"migration-trace.d.ts","sourceRoot":"","sources":["../../src/state/migration-trace.ts"],"names":[],"mappings":"AAGA;;;;;;;;;;;;;;;;;;;;;;GAsBG;AAEH,eAAO,MAAM,4BAA4B,+BAA+B,CAAC;AAEzE;;;;;GAKG;AACH,MAAM,MAAM,0BAA0B,GAClC,cAAc,GACd,mBAAmB,GACnB,2BAA2B,GAC3B,wBAAwB,CAAC;AAE7B,MAAM,WAAW,sBAAsB;IACrC,QAAQ,CAAC,IAAI,EAAE,0BAA0B,CAAC;IAC1C,QAAQ,CAAC,YAAY,EAAE,MAAM,CAAC;IAC9B,4DAA4D;IAC5D,QAAQ,CAAC,OAAO,EAAE,MAAM,CAAC;CAC1B;AAED,MAAM,WAAW,qBAAqB;IACpC,QAAQ,CAAC,OAAO,EAAE,MAAM,CAAC;IACzB,QAAQ,CAAC,MAAM,EAAE,SAAS,sBAAsB,EAAE,CAAC;CACpD;AAMD;;;;;GAKG;AACH,wBAAsB,yBAAyB,CAC7C,UAAU,EAAE,MAAM,EAClB,OAAO,EAAE,MAAM,EACf,KAAK,EAAE,sBAAsB,GAC5B,OAAO,CAAC,IAAI,CAAC,CAmBf;AAED;;;;GAIG;AACH,wBAAsB,uBAAuB,CAC3C,UAAU,EAAE,MAAM,GACjB,OAAO,CAAC,SAAS,qBAAqB,EAAE,CAAC,CA6B3C;AAED;;;;GAIG;AACH,wBAAsB,mBAAmB,CAAC,UAAU,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC,CAG3E"}
|
|
@@ -0,0 +1,103 @@
|
|
|
1
|
+
import fs from "node:fs/promises";
|
|
2
|
+
import path from "node:path";
|
|
3
|
+
/**
|
|
4
|
+
* Per-entry migration trace state (RFC 0010 / CPATH-15).
|
|
5
|
+
*
|
|
6
|
+
* When a class-1 migration entry runs as part of `bumpAndRebakePin`, it
|
|
7
|
+
* records each file moved and each command literal rewritten as a structured
|
|
8
|
+
* trace event. The orchestrator reads these events post-apply and surfaces
|
|
9
|
+
* them via `gdh self-update` stdout/stderr in the same shape `gdh prepare`
|
|
10
|
+
* uses for migration actions (kind / relativePath / summary).
|
|
11
|
+
*
|
|
12
|
+
* Storage layout:
|
|
13
|
+
* <targetPath>/.gdh-state/migration-trace/<entryId>.json
|
|
14
|
+
*
|
|
15
|
+
* One file per entry. Append-only within a single transform; the orchestrator
|
|
16
|
+
* reads the file after `applyMigrationChain` returns `applied` and clears it
|
|
17
|
+
* with `clearMigrationTrace()` after the events are surfaced (so re-running
|
|
18
|
+
* self-update on an already-migrated target reports an empty trace, not the
|
|
19
|
+
* historic one).
|
|
20
|
+
*
|
|
21
|
+
* The trace is intentionally NOT durable post-self-update: it lives only as
|
|
22
|
+
* long as the apply path needs it. Migration receipts (already-applied vs not)
|
|
23
|
+
* live in `.gdh-state/migration.json` (`migration-state.ts`); migration trace
|
|
24
|
+
* is the human-readable detail emitted at apply time only.
|
|
25
|
+
*/
|
|
26
|
+
export const MIGRATION_TRACE_RELATIVE_DIR = ".gdh-state/migration-trace";
|
|
27
|
+
function traceFilePath(targetPath, entryId) {
|
|
28
|
+
return path.join(targetPath, MIGRATION_TRACE_RELATIVE_DIR, `${entryId}.json`);
|
|
29
|
+
}
|
|
30
|
+
/**
|
|
31
|
+
* Append a single trace event for `entryId`. Creates the trace file if it
|
|
32
|
+
* does not yet exist. Idempotency: callers that re-run on an already-migrated
|
|
33
|
+
* target SHOULD not call this when no work was performed (the entry's
|
|
34
|
+
* transform already short-circuits in that case).
|
|
35
|
+
*/
|
|
36
|
+
export async function appendMigrationTraceEvent(targetPath, entryId, event) {
|
|
37
|
+
const filePath = traceFilePath(targetPath, entryId);
|
|
38
|
+
await fs.mkdir(path.dirname(filePath), { recursive: true });
|
|
39
|
+
const existing = await fs
|
|
40
|
+
.readFile(filePath, "utf8")
|
|
41
|
+
.then((raw) => {
|
|
42
|
+
try {
|
|
43
|
+
const parsed = JSON.parse(raw);
|
|
44
|
+
return Array.isArray(parsed.events) ? parsed.events : [];
|
|
45
|
+
}
|
|
46
|
+
catch {
|
|
47
|
+
return [];
|
|
48
|
+
}
|
|
49
|
+
})
|
|
50
|
+
.catch(() => []);
|
|
51
|
+
const next = {
|
|
52
|
+
entryId,
|
|
53
|
+
events: [...existing, event],
|
|
54
|
+
};
|
|
55
|
+
await fs.writeFile(filePath, `${JSON.stringify(next, null, 2)}\n`, "utf8");
|
|
56
|
+
}
|
|
57
|
+
/**
|
|
58
|
+
* Read the trace files for every entry that recorded events during the
|
|
59
|
+
* apply path. Returns one envelope per entry id, in filename-sort order.
|
|
60
|
+
* Missing trace dir → empty array.
|
|
61
|
+
*/
|
|
62
|
+
export async function readMigrationTraceFiles(targetPath) {
|
|
63
|
+
const dirPath = path.join(targetPath, MIGRATION_TRACE_RELATIVE_DIR);
|
|
64
|
+
const entries = await fs
|
|
65
|
+
.readdir(dirPath, { withFileTypes: true })
|
|
66
|
+
.catch(() => null);
|
|
67
|
+
if (entries === null)
|
|
68
|
+
return [];
|
|
69
|
+
const files = [];
|
|
70
|
+
for (const entry of entries.sort((a, b) => a.name.localeCompare(b.name))) {
|
|
71
|
+
if (!entry.isFile() || !entry.name.endsWith(".json"))
|
|
72
|
+
continue;
|
|
73
|
+
const raw = await fs
|
|
74
|
+
.readFile(path.join(dirPath, entry.name), "utf8")
|
|
75
|
+
.catch(() => null);
|
|
76
|
+
if (raw === null)
|
|
77
|
+
continue;
|
|
78
|
+
try {
|
|
79
|
+
const parsed = JSON.parse(raw);
|
|
80
|
+
if (typeof parsed.entryId === "string" &&
|
|
81
|
+
Array.isArray(parsed.events)) {
|
|
82
|
+
files.push({
|
|
83
|
+
entryId: parsed.entryId,
|
|
84
|
+
events: parsed.events,
|
|
85
|
+
});
|
|
86
|
+
}
|
|
87
|
+
}
|
|
88
|
+
catch {
|
|
89
|
+
// Ignore malformed trace files — they are advisory output only.
|
|
90
|
+
}
|
|
91
|
+
}
|
|
92
|
+
return files;
|
|
93
|
+
}
|
|
94
|
+
/**
|
|
95
|
+
* Remove the trace dir entirely after the orchestrator has surfaced the
|
|
96
|
+
* events. Best-effort: missing dir is a no-op; non-empty subdirs (foreign
|
|
97
|
+
* content) are not touched.
|
|
98
|
+
*/
|
|
99
|
+
export async function clearMigrationTrace(targetPath) {
|
|
100
|
+
const dirPath = path.join(targetPath, MIGRATION_TRACE_RELATIVE_DIR);
|
|
101
|
+
await fs.rm(dirPath, { recursive: true, force: true });
|
|
102
|
+
}
|
|
103
|
+
//# sourceMappingURL=migration-trace.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"migration-trace.js","sourceRoot":"","sources":["../../src/state/migration-trace.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,kBAAkB,CAAC;AAClC,OAAO,IAAI,MAAM,WAAW,CAAC;AAE7B;;;;;;;;;;;;;;;;;;;;;;GAsBG;AAEH,MAAM,CAAC,MAAM,4BAA4B,GAAG,4BAA4B,CAAC;AA0BzE,SAAS,aAAa,CAAC,UAAkB,EAAE,OAAe;IACxD,OAAO,IAAI,CAAC,IAAI,CAAC,UAAU,EAAE,4BAA4B,EAAE,GAAG,OAAO,OAAO,CAAC,CAAC;AAChF,CAAC;AAED;;;;;GAKG;AACH,MAAM,CAAC,KAAK,UAAU,yBAAyB,CAC7C,UAAkB,EAClB,OAAe,EACf,KAA6B;IAE7B,MAAM,QAAQ,GAAG,aAAa,CAAC,UAAU,EAAE,OAAO,CAAC,CAAC;IACpD,MAAM,EAAE,CAAC,KAAK,CAAC,IAAI,CAAC,OAAO,CAAC,QAAQ,CAAC,EAAE,EAAE,SAAS,EAAE,IAAI,EAAE,CAAC,CAAC;IAC5D,MAAM,QAAQ,GAAG,M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release suffixes per the discretion note in 11-CONTEXT.md (GDH
|
|
29
|
-
* publishes only stable to npm `latest` today).
|
|
30
|
-
* shape from `.claude/hooks/gsd-check-update-worker.js:22-30`.
|
|
29
|
+
* publishes only stable to npm `latest` today).
|
|
31
30
|
*/
|
|
32
31
|
export declare function isNewerGdhVersion(a: string | null, b: string | null): boolean;
|
|
33
32
|
/**
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"update-probe.d.ts","sourceRoot":"","sources":["../src/update-probe.ts"],"names":[],"mappings":"AACA,OAAO,EAGL,KAAK,qBAAqB,EAC3B,MAAM,mBAAmB,CAAC;AAE3B;;;;;;GAMG;AACH,eAAO,MAAM,2BAA2B,gCAAgC,CAAC;AAEzE;;;;GAIG;AACH,eAAO,MAAM,uBAAuB,oDACe,CAAC;AAEpD;;;GAGG;AACH,MAAM,WAAW,aAAa;IAC5B,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAC;IACxB,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAC;IACxB,QAAQ,CAAC,SAAS,EAAE,MAAM,CAAC;IAC3B,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;CACvB;AAED
|
|
1
|
+
{"version":3,"file":"update-probe.d.ts","sourceRoot":"","sources":["../src/update-probe.ts"],"names":[],"mappings":"AACA,OAAO,EAGL,KAAK,qBAAqB,EAC3B,MAAM,mBAAmB,CAAC;AAE3B;;;;;;GAMG;AACH,eAAO,MAAM,2BAA2B,gCAAgC,CAAC;AAEzE;;;;GAIG;AACH,eAAO,MAAM,uBAAuB,oDACe,CAAC;AAEpD;;;GAGG;AACH,MAAM,WAAW,aAAa;IAC5B,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAC;IACxB,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAC;IACxB,QAAQ,CAAC,SAAS,EAAE,MAAM,CAAC;IAC3B,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;CACvB;AAED;;;;GAIG;AACH,wBAAgB,iBA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@ export const GDH_UPDATE_REGISTRY_URL = "https://registry.npmjs.org/@skillcap/gdh
|
|
|
17
17
|
/**
|
|
18
18
|
* Semver compare: returns true iff `a` is strictly newer than `b`. Strips
|
|
19
19
|
* pre-release suffixes per the discretion note in 11-CONTEXT.md (GDH
|
|
20
|
-
* publishes only stable to npm `latest` today).
|
|
21
|
-
* shape from `.claude/hooks/gsd-check-update-worker.js:22-30`.
|
|
20
|
+
* publishes only stable to npm `latest` today).
|
|
22
21
|
*/
|
|
23
22
|
export function isNewerGdhVersion(a, b) {
|
|
24
23
|
const pa = (a ?? "").split(".").map((s) => Number(s.replace(/-.*/, "")) || 0);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"update-probe.js","sourceRoot":"","sources":["../src/update-probe.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,2BAA2B,EAAE,MAAM,eAAe,CAAC;AAC5D,OAAO,EACL,kBAAkB,EAClB,mBAAmB,GAEpB,MAAM,mBAAmB,CAAC;AAE3B;;;;;;GAMG;AACH,MAAM,CAAC,MAAM,2BAA2B,GAAG,6BAA6B,CAAC;AAEzE;;;;GAIG;AACH,MAAM,CAAC,MAAM,uBAAuB,GAClC,iDAAiD,CAAC;AAapD
|
|
1
|
+
{"version":3,"file":"update-probe.js","sourceRoot":"","sources":["../src/update-probe.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,2BAA2B,EAAE,MAAM,eAAe,CAAC;AAC5D,OAAO,EACL,kBAAkB,EAClB,mBAAmB,GAEpB,MAAM,mBAAmB,CAAC;AAE3B;;;;;;GAMG;AACH,MAAM,CAAC,MAAM,2BAA2B,GAAG,6BAA6B,CAAC;AAEzE;;;;GAIG;AACH,MAAM,CAAC,MAAM,uBAAuB,GAClC,iDAAiD,CAAC;AAapD;;;;GAIG;AACH,MAAM,UAAU,iBAAiB,CAAC,CAAgB,EAAE,CAAgB;IAClE,MAAM,EAAE,GAAG,CAAC,CAAC,IAAI,EAAE,CAAC,CAAC,KAAK,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adapters": "
|
|
15
|
-
"@gdh/authoring": "
|
|
16
|
-
"@gdh/core": "
|
|
17
|
-
"@gdh/docs": "
|
|
18
|
-
"@gdh/observability": "
|
|
19
|
-
"@gdh/scan": "
|
|
20
|
-
"@gdh/verify": "
|
|
14
|
+
"@gdh/adapters": "3.0.0",
|
|
15
|
+
"@gdh/authoring": "3.0.0",
|
|
16
|
+
"@gdh/core": "3.0.0",
|
|
17
|
+
"@gdh/docs": "3.0.0",
|
|
18
|
+
"@gdh/observability": "3.0.0",
|
|
19
|
+
"@gdh/scan": "3.0.0",
|
|
20
|
+
"@gdh/verify": "3.0.0",
|
|
21
21
|
"@modelcontextprotocol/sdk": "1.29.0"
|
|
22
22
|
},
|
|
23
|
-
"version": "
|
|
23
|
+
"version": "3.0.0"
|
|
24
24
|
}
|
|
@@ -11,13 +11,13 @@
|
|
|
11
11
|
}
|
|
12
12
|
},
|
|
13
13
|
"dependencies": {
|
|
14
|
-
"@gdh/authoring": "
|
|
15
|
-
"@gdh/core": "
|
|
16
|
-
"@gdh/docs": "
|
|
17
|
-
"@gdh/observability": "
|
|
18
|
-
"@gdh/runtime": "
|
|
19
|
-
"@gdh/scan": "
|
|
14
|
+
"@gdh/authoring": "3.0.0",
|
|
15
|
+
"@gdh/core": "3.0.0",
|
|
16
|
+
"@gdh/docs": "3.0.0",
|
|
17
|
+
"@gdh/observability": "3.0.0",
|
|
18
|
+
"@gdh/runtime": "3.0.0",
|
|
19
|
+
"@gdh/scan": "3.0.0",
|
|
20
20
|
"yaml": "^2.8.3"
|
|
21
21
|
},
|
|
22
|
-
"version": "
|
|
22
|
+
"version": "3.0.0"
|
|
23
23
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@skillcap/gdh",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "3.0.0",
|
|
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": "
|
|
34
|
+
"@gdh/cli": "3.0.0",
|
|
35
35
|
"@clack/prompts": "^1.2.0",
|
|
36
|
-
"@gdh/adapters": "
|
|
37
|
-
"@gdh/authoring": "
|
|
38
|
-
"@gdh/core": "
|
|
39
|
-
"@gdh/docs": "
|
|
40
|
-
"@gdh/mcp": "
|
|
41
|
-
"@gdh/observability": "
|
|
42
|
-
"@gdh/runtime": "
|
|
43
|
-
"@gdh/scan": "
|
|
44
|
-
"@gdh/verify": "
|
|
36
|
+
"@gdh/adapters": "3.0.0",
|
|
37
|
+
"@gdh/authoring": "3.0.0",
|
|
38
|
+
"@gdh/core": "3.0.0",
|
|
39
|
+
"@gdh/docs": "3.0.0",
|
|
40
|
+
"@gdh/mcp": "3.0.0",
|
|
41
|
+
"@gdh/observability": "3.0.0",
|
|
42
|
+
"@gdh/runtime": "3.0.0",
|
|
43
|
+
"@gdh/scan": "3.0.0",
|
|
44
|
+
"@gdh/verify": "3.0.0",
|
|
45
45
|
"picocolors": "^1.1.1"
|
|
46
46
|
},
|
|
47
47
|
"bundledDependencies": [
|
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Compute the POSIX-normalised relative path from the directory of an installed
|
|
3
|
-
* authoring hook to the integration root's `.gdh-state/` directory. Used to
|
|
4
|
-
* bake `STATE_RELATIVE_PATH_FROM_HOOK` into the rendered hook so its embedded
|
|
5
|
-
* broker-snapshot reader can resolve `path.resolve(__dirname, …)` to the state
|
|
6
|
-
* files at runtime regardless of `process.cwd()`.
|
|
7
|
-
*
|
|
8
|
-
* @param installRoot Absolute directory at which the hook file's relative path
|
|
9
|
-
* is anchored (Codex install: `integrationRootPath`; Claude same-repo target
|
|
10
|
-
* install: `targetPath`).
|
|
11
|
-
* @param hookRelativePath Hook path relative to `installRoot` (e.g.
|
|
12
|
-
* `.codex/hooks/gdh-authoring-guard.js`).
|
|
13
|
-
* @param integrationRootAbsolute Absolute integration-root path containing the
|
|
14
|
-
* shared `.gdh-state/` directory.
|
|
15
|
-
*/
|
|
16
|
-
export declare function computeStateRelativePathFromHook(installRoot: string, hookRelativePath: string, integrationRootAbsolute: string): string;
|
|
17
|
-
//# sourceMappingURL=authoring-hook-state-path.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"authoring-hook-state-path.d.ts","sourceRoot":"","sources":["../src/authoring-hook-state-path.ts"],"names":[],"mappings":"AAEA;;;;;;;;;;;;;;GAcG;AACH,wBAAgB,gCAAgC,CAC9C,WAAW,EAAE,MAAM,EACnB,gBAAgB,EAAE,MAAM,EACxB,uBAAuB,EAAE,MAAM,GAC9B,MAAM,CAKR"}
|
|
@@ -1,23 +0,0 @@
|
|
|
1
|
-
import path from "node:path";
|
|
2
|
-
/**
|
|
3
|
-
* Compute the POSIX-normalised relative path from the directory of an installed
|
|
4
|
-
* authoring hook to the integration root's `.gdh-state/` directory. Used to
|
|
5
|
-
* bake `STATE_RELATIVE_PATH_FROM_HOOK` into the rendered hook so its embedded
|
|
6
|
-
* broker-snapshot reader can resolve `path.resolve(__dirname, …)` to the state
|
|
7
|
-
* files at runtime regardless of `process.cwd()`.
|
|
8
|
-
*
|
|
9
|
-
* @param installRoot Absolute directory at which the hook file's relative path
|
|
10
|
-
* is anchored (Codex install: `integrationRootPath`; Claude same-repo target
|
|
11
|
-
* install: `targetPath`).
|
|
12
|
-
* @param hookRelativePath Hook path relative to `installRoot` (e.g.
|
|
13
|
-
* `.codex/hooks/gdh-authoring-guard.js`).
|
|
14
|
-
* @param integrationRootAbsolute Absolute integration-root path containing the
|
|
15
|
-
* shared `.gdh-state/` directory.
|
|
16
|
-
*/
|
|
17
|
-
export function computeStateRelativePathFromHook(installRoot, hookRelativePath, integrationRootAbsolute) {
|
|
18
|
-
const stateAbsolute = path.join(integrationRootAbsolute, ".gdh-state");
|
|
19
|
-
const hookDirAbsolute = path.dirname(path.join(installRoot, hookRelativePath));
|
|
20
|
-
const relative = path.relative(hookDirAbsolute, stateAbsolute) || ".";
|
|
21
|
-
return relative.split(path.sep).join("/");
|
|
22
|
-
}
|
|
23
|
-
//# sourceMappingURL=authoring-hook-state-path.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"authoring-hook-state-path.js","sourceRoot":"","sources":["../src/authoring-hook-state-path.ts"],"names":[],"mappings":"AAAA,OAAO,IAAI,MAAM,WAAW,CAAC;AAE7B;;;;;;;;;;;;;;GAcG;AACH,MAAM,UAAU,gCAAgC,CAC9C,WAAmB,EACnB,gBAAwB,EACxB,uBAA+B;IAE/B,MAAM,aAAa,GAAG,IAAI,CAAC,IAAI,CAAC,uBAAuB,EAAE,YAAY,CAAC,CAAC;IACvE,MAAM,eAAe,GAAG,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,IAAI,CAAC,WAAW,EAAE,gBAAgB,CAAC,CAAC,CAAC;IAC/E,MAAM,QAAQ,GAAG,IAAI,CAAC,QAAQ,CAAC,eAAe,EAAE,aAAa,CAAC,IAAI,GAAG,CAAC;IACtE,OAAO,QAAQ,CAAC,KAAK,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;AAC5C,CAAC"}
|