@skillcap/gdh 0.23.0 → 0.25.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 +122 -0
- package/node_modules/@gdh/adapters/dist/authoring-hook-render.d.ts.map +1 -1
- package/node_modules/@gdh/adapters/dist/authoring-hook-render.js +9 -131
- package/node_modules/@gdh/adapters/dist/authoring-hook-render.js.map +1 -1
- package/node_modules/@gdh/adapters/dist/claude-statusline-render.d.ts.map +1 -1
- package/node_modules/@gdh/adapters/dist/claude-statusline-render.js +6 -28
- 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.map +1 -1
- package/node_modules/@gdh/adapters/dist/claude-update-hook-render.js +7 -40
- 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.map +1 -1
- package/node_modules/@gdh/adapters/dist/claude-update-worker-render.js +7 -68
- package/node_modules/@gdh/adapters/dist/claude-update-worker-render.js.map +1 -1
- package/node_modules/@gdh/adapters/dist/deferred-actions-advisory.d.ts +71 -0
- package/node_modules/@gdh/adapters/dist/deferred-actions-advisory.d.ts.map +1 -0
- package/node_modules/@gdh/adapters/dist/deferred-actions-advisory.js +89 -0
- package/node_modules/@gdh/adapters/dist/deferred-actions-advisory.js.map +1 -0
- package/node_modules/@gdh/adapters/dist/durable-backup.d.ts +209 -0
- package/node_modules/@gdh/adapters/dist/durable-backup.d.ts.map +1 -0
- package/node_modules/@gdh/adapters/dist/durable-backup.js +346 -0
- package/node_modules/@gdh/adapters/dist/durable-backup.js.map +1 -0
- package/node_modules/@gdh/adapters/dist/index.d.ts +11 -3
- package/node_modules/@gdh/adapters/dist/index.d.ts.map +1 -1
- package/node_modules/@gdh/adapters/dist/index.js +79 -43
- package/node_modules/@gdh/adapters/dist/index.js.map +1 -1
- package/node_modules/@gdh/adapters/dist/inventory-sweep.d.ts +53 -0
- package/node_modules/@gdh/adapters/dist/inventory-sweep.d.ts.map +1 -0
- package/node_modules/@gdh/adapters/dist/inventory-sweep.js +98 -0
- package/node_modules/@gdh/adapters/dist/inventory-sweep.js.map +1 -0
- package/node_modules/@gdh/adapters/dist/process-orchestration.d.ts +223 -0
- package/node_modules/@gdh/adapters/dist/process-orchestration.d.ts.map +1 -0
- package/node_modules/@gdh/adapters/dist/process-orchestration.js +368 -0
- package/node_modules/@gdh/adapters/dist/process-orchestration.js.map +1 -0
- package/node_modules/@gdh/adapters/dist/self-update-mechanics.d.ts +157 -14
- package/node_modules/@gdh/adapters/dist/self-update-mechanics.d.ts.map +1 -1
- package/node_modules/@gdh/adapters/dist/self-update-mechanics.js +570 -89
- package/node_modules/@gdh/adapters/dist/self-update-mechanics.js.map +1 -1
- package/node_modules/@gdh/adapters/dist/skill-rendering.d.ts +2 -5
- package/node_modules/@gdh/adapters/dist/skill-rendering.d.ts.map +1 -1
- package/node_modules/@gdh/adapters/dist/skill-rendering.js +39 -56
- package/node_modules/@gdh/adapters/dist/skill-rendering.js.map +1 -1
- package/node_modules/@gdh/adapters/dist/template-assets.d.ts +2 -0
- package/node_modules/@gdh/adapters/dist/template-assets.d.ts.map +1 -0
- package/node_modules/@gdh/adapters/dist/template-assets.js +26 -0
- package/node_modules/@gdh/adapters/dist/template-assets.js.map +1 -0
- package/node_modules/@gdh/adapters/dist/templates/authoring-hook.js.tpl +128 -0
- package/node_modules/@gdh/adapters/dist/templates/claude-check-update-hook.js.tpl +37 -0
- package/node_modules/@gdh/adapters/dist/templates/claude-check-update-worker.js.tpl +65 -0
- package/node_modules/@gdh/adapters/dist/templates/claude-statusline.js.tpl +25 -0
- package/node_modules/@gdh/adapters/package.json +8 -8
- package/node_modules/@gdh/authoring/package.json +2 -2
- package/node_modules/@gdh/cli/dist/index.d.ts +9 -0
- package/node_modules/@gdh/cli/dist/index.d.ts.map +1 -1
- package/node_modules/@gdh/cli/dist/index.js +249 -6
- package/node_modules/@gdh/cli/dist/index.js.map +1 -1
- package/node_modules/@gdh/cli/dist/migrate.d.ts +152 -1
- package/node_modules/@gdh/cli/dist/migrate.d.ts.map +1 -1
- package/node_modules/@gdh/cli/dist/migrate.js +355 -8
- package/node_modules/@gdh/cli/dist/migrate.js.map +1 -1
- package/node_modules/@gdh/cli/dist/self-update.d.ts +14 -0
- package/node_modules/@gdh/cli/dist/self-update.d.ts.map +1 -1
- package/node_modules/@gdh/cli/dist/self-update.js +197 -15
- package/node_modules/@gdh/cli/dist/self-update.js.map +1 -1
- package/node_modules/@gdh/cli/dist/setup.d.ts +4 -0
- package/node_modules/@gdh/cli/dist/setup.d.ts.map +1 -1
- package/node_modules/@gdh/cli/dist/setup.js +8 -67
- 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/index.d.ts +99 -5
- package/node_modules/@gdh/core/dist/index.d.ts.map +1 -1
- package/node_modules/@gdh/core/dist/index.js +24 -5
- package/node_modules/@gdh/core/dist/index.js.map +1 -1
- package/node_modules/@gdh/core/dist/migrations/entries/s2c2_to_s2c3_rules_schema_v2_to_v3.d.ts +3 -0
- package/node_modules/@gdh/core/dist/migrations/entries/s2c2_to_s2c3_rules_schema_v2_to_v3.d.ts.map +1 -0
- package/node_modules/@gdh/core/dist/migrations/entries/s2c2_to_s2c3_rules_schema_v2_to_v3.js +247 -0
- package/node_modules/@gdh/core/dist/migrations/entries/s2c2_to_s2c3_rules_schema_v2_to_v3.js.map +1 -0
- package/node_modules/@gdh/core/dist/migrations/entries/s3c8_to_s3c9_register_runtime_bridge_autoload.d.ts +3 -0
- package/node_modules/@gdh/core/dist/migrations/entries/s3c8_to_s3c9_register_runtime_bridge_autoload.d.ts.map +1 -0
- package/node_modules/@gdh/core/dist/migrations/entries/s3c8_to_s3c9_register_runtime_bridge_autoload.js +152 -0
- package/node_modules/@gdh/core/dist/migrations/entries/s3c8_to_s3c9_register_runtime_bridge_autoload.js.map +1 -0
- package/node_modules/@gdh/core/dist/migrations/envelopes/envelope-output-validator.d.ts +3 -0
- package/node_modules/@gdh/core/dist/migrations/envelopes/envelope-output-validator.d.ts.map +1 -0
- package/node_modules/@gdh/core/dist/migrations/envelopes/envelope-output-validator.js +67 -0
- package/node_modules/@gdh/core/dist/migrations/envelopes/envelope-output-validator.js.map +1 -0
- package/node_modules/@gdh/core/dist/migrations/envelopes/index.d.ts +37 -0
- package/node_modules/@gdh/core/dist/migrations/envelopes/index.d.ts.map +1 -0
- package/node_modules/@gdh/core/dist/migrations/envelopes/index.js +60 -0
- package/node_modules/@gdh/core/dist/migrations/envelopes/index.js.map +1 -0
- package/node_modules/@gdh/core/dist/migrations/envelopes/types.d.ts +121 -0
- package/node_modules/@gdh/core/dist/migrations/envelopes/types.d.ts.map +1 -0
- package/node_modules/@gdh/core/dist/migrations/envelopes/types.js +2 -0
- package/node_modules/@gdh/core/dist/migrations/envelopes/types.js.map +1 -0
- package/node_modules/@gdh/core/dist/migrations/golden-harness.d.ts +40 -0
- package/node_modules/@gdh/core/dist/migrations/golden-harness.d.ts.map +1 -0
- package/node_modules/@gdh/core/dist/migrations/golden-harness.js +71 -0
- package/node_modules/@gdh/core/dist/migrations/golden-harness.js.map +1 -0
- package/node_modules/@gdh/core/dist/migrations/managed-surface-classes.d.ts +322 -0
- package/node_modules/@gdh/core/dist/migrations/managed-surface-classes.d.ts.map +1 -0
- package/node_modules/@gdh/core/dist/migrations/managed-surface-classes.js +384 -0
- package/node_modules/@gdh/core/dist/migrations/managed-surface-classes.js.map +1 -0
- package/node_modules/@gdh/core/dist/migrations/managed-target-surface-inventory.d.ts +294 -0
- package/node_modules/@gdh/core/dist/migrations/managed-target-surface-inventory.d.ts.map +1 -0
- package/node_modules/@gdh/core/dist/migrations/managed-target-surface-inventory.js +365 -0
- package/node_modules/@gdh/core/dist/migrations/managed-target-surface-inventory.js.map +1 -0
- package/node_modules/@gdh/core/dist/migrations/probes.d.ts +58 -0
- package/node_modules/@gdh/core/dist/migrations/probes.d.ts.map +1 -0
- package/node_modules/@gdh/core/dist/migrations/probes.js +112 -0
- package/node_modules/@gdh/core/dist/migrations/probes.js.map +1 -0
- package/node_modules/@gdh/core/dist/migrations/registry.d.ts +205 -0
- package/node_modules/@gdh/core/dist/migrations/registry.d.ts.map +1 -0
- package/node_modules/@gdh/core/dist/migrations/registry.js +214 -0
- package/node_modules/@gdh/core/dist/migrations/registry.js.map +1 -0
- package/node_modules/@gdh/core/dist/state/atomic-write.d.ts +19 -0
- package/node_modules/@gdh/core/dist/state/atomic-write.d.ts.map +1 -0
- package/node_modules/@gdh/core/dist/state/atomic-write.js +34 -0
- package/node_modules/@gdh/core/dist/state/atomic-write.js.map +1 -0
- package/node_modules/@gdh/core/dist/state/migration-state.d.ts +135 -0
- package/node_modules/@gdh/core/dist/state/migration-state.d.ts.map +1 -0
- package/node_modules/@gdh/core/dist/state/migration-state.js +186 -0
- package/node_modules/@gdh/core/dist/state/migration-state.js.map +1 -0
- package/node_modules/@gdh/core/dist/state/processes-snapshot.d.ts +72 -0
- package/node_modules/@gdh/core/dist/state/processes-snapshot.d.ts.map +1 -0
- package/node_modules/@gdh/core/dist/state/processes-snapshot.js +113 -0
- package/node_modules/@gdh/core/dist/state/processes-snapshot.js.map +1 -0
- package/node_modules/@gdh/core/dist/state/render-inventory.d.ts +54 -0
- package/node_modules/@gdh/core/dist/state/render-inventory.d.ts.map +1 -0
- package/node_modules/@gdh/core/dist/state/render-inventory.js +77 -0
- package/node_modules/@gdh/core/dist/state/render-inventory.js.map +1 -0
- package/node_modules/@gdh/core/package.json +1 -1
- package/node_modules/@gdh/docs/dist/agent-contract.d.ts +2 -1
- package/node_modules/@gdh/docs/dist/agent-contract.d.ts.map +1 -1
- package/node_modules/@gdh/docs/dist/agent-contract.js +5 -3
- package/node_modules/@gdh/docs/dist/agent-contract.js.map +1 -1
- package/node_modules/@gdh/docs/dist/guidance.d.ts +2 -0
- package/node_modules/@gdh/docs/dist/guidance.d.ts.map +1 -1
- package/node_modules/@gdh/docs/dist/guidance.js +29 -255
- package/node_modules/@gdh/docs/dist/guidance.js.map +1 -1
- package/node_modules/@gdh/docs/dist/index.d.ts +1 -1
- package/node_modules/@gdh/docs/dist/index.d.ts.map +1 -1
- package/node_modules/@gdh/docs/dist/index.js +1 -1
- package/node_modules/@gdh/docs/dist/index.js.map +1 -1
- package/node_modules/@gdh/docs/dist/query.d.ts.map +1 -1
- package/node_modules/@gdh/docs/dist/query.js +4 -5
- package/node_modules/@gdh/docs/dist/query.js.map +1 -1
- package/node_modules/@gdh/docs/dist/recovery-hints.js +1 -1
- package/node_modules/@gdh/docs/dist/recovery-hints.js.map +1 -1
- package/node_modules/@gdh/docs/dist/template-assets.d.ts +2 -0
- package/node_modules/@gdh/docs/dist/template-assets.d.ts.map +1 -0
- package/node_modules/@gdh/docs/dist/template-assets.js +26 -0
- package/node_modules/@gdh/docs/dist/template-assets.js.map +1 -0
- package/node_modules/@gdh/docs/dist/templates/guidance/authoring-and-validation.md.tpl +111 -0
- package/node_modules/@gdh/docs/dist/templates/guidance/gdh-glossary.md.tpl +34 -0
- package/node_modules/@gdh/docs/dist/templates/guidance/persistence-semantics.md.tpl +24 -0
- package/node_modules/@gdh/docs/dist/templates/guidance/project-migration.md.tpl +19 -0
- package/node_modules/@gdh/docs/dist/templates/guidance/project-surfaces.md.tpl +14 -0
- 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/dist/bridge-surface.js +63 -2
- package/node_modules/@gdh/runtime/dist/bridge-surface.js.map +1 -1
- 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
|
@@ -11,13 +11,13 @@
|
|
|
11
11
|
}
|
|
12
12
|
},
|
|
13
13
|
"dependencies": {
|
|
14
|
-
"@gdh/authoring": "0.
|
|
15
|
-
"@gdh/core": "0.
|
|
16
|
-
"@gdh/docs": "0.
|
|
17
|
-
"@gdh/observability": "0.
|
|
18
|
-
"@gdh/runtime": "0.
|
|
19
|
-
"@gdh/scan": "0.
|
|
20
|
-
"@gdh/verify": "0.
|
|
14
|
+
"@gdh/authoring": "0.25.0",
|
|
15
|
+
"@gdh/core": "0.25.0",
|
|
16
|
+
"@gdh/docs": "0.25.0",
|
|
17
|
+
"@gdh/observability": "0.25.0",
|
|
18
|
+
"@gdh/runtime": "0.25.0",
|
|
19
|
+
"@gdh/scan": "0.25.0",
|
|
20
|
+
"@gdh/verify": "0.25.0"
|
|
21
21
|
},
|
|
22
|
-
"version": "0.
|
|
22
|
+
"version": "0.25.0"
|
|
23
23
|
}
|
|
@@ -1,4 +1,12 @@
|
|
|
1
1
|
import { recordAuthoringSessionEvent } from "@gdh/observability";
|
|
2
|
+
/**
|
|
3
|
+
* Re-export of `runSelfUpdateCommand` so the integration test in
|
|
4
|
+
* `packages/cli/src/self-update.integration.test.ts` (Plan 73-06) can drive
|
|
5
|
+
* the dispatcher directly without depending on the self-update module's
|
|
6
|
+
* surface evolving. The implementation lives in `./self-update.js`; this
|
|
7
|
+
* is a thin pass-through that preserves identical signature and behavior.
|
|
8
|
+
*/
|
|
9
|
+
export declare function runSelfUpdateCommand(args: readonly string[], io: CliIo): Promise<number>;
|
|
2
10
|
export declare const cliPackage: import("@gdh/core").GdhPackageBoundary;
|
|
3
11
|
export interface CliIo {
|
|
4
12
|
readonly stdout: Pick<NodeJS.WriteStream, "write">;
|
|
@@ -8,6 +16,7 @@ export declare function runCli(args: readonly string[], io?: CliIo): Promise<num
|
|
|
8
16
|
export declare function writeJsonResult(io: CliIo, value: unknown, options?: {
|
|
9
17
|
readonly presentRuntimeTerms?: boolean;
|
|
10
18
|
}): void;
|
|
19
|
+
export declare function runMigrationCommand(args: readonly string[], io: CliIo): Promise<number>;
|
|
11
20
|
export declare function formatCliError(error: unknown): string;
|
|
12
21
|
export declare function readSingleOptionValue(args: readonly string[], optionName: string): string | null;
|
|
13
22
|
export declare function findUnsupportedOptionsError(args: readonly string[], options: {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAqFA,OAAO,EAIL,2BAA2B,EAC5B,MAAM,oBAAoB,CAAC;AA0C5B;;;;;;GAMG;AACH,wBAAsB,oBAAoB,CACxC,IAAI,EAAE,SAAS,MAAM,EAAE,EACvB,EAAE,EAAE,KAAK,GACR,OAAO,CAAC,MAAM,CAAC,CAEjB;AAWD,eAAO,MAAM,UAAU,wCAerB,CAAC;AAEH,MAAM,WAAW,KAAK;IACpB,QAAQ,CAAC,MAAM,EAAE,IAAI,CAAC,MAAM,CAAC,WAAW,EAAE,OAAO,CAAC,CAAC;IACnD,QAAQ,CAAC,MAAM,EAAE,IAAI,CAAC,MAAM,CAAC,WAAW,EAAE,OAAO,CAAC,CAAC;CACpD;AAED,wBAAsB,MAAM,CAC1B,IAAI,EAAE,SAAS,MAAM,EAAE,EACvB,EAAE,GAAE,KAA0D,GAC7D,OAAO,CAAC,MAAM,CAAC,CAoIjB;AA+CD,wBAAgB,eAAe,CAC7B,EAAE,EAAE,KAAK,EACT,KAAK,EAAE,OAAO,EACd,OAAO,GAAE;IAAE,QAAQ,CAAC,mBAAmB,CAAC,EAAE,OAAO,CAAA;CAAO,GACvD,IAAI,CAGN;AA2oED,wBAAsB,mBAAmB,CACvC,IAAI,EAAE,SAAS,MAAM,EAAE,EACvB,EAAE,EAAE,KAAK,GACR,OAAO,CAAC,MAAM,CAAC,CAoCjB;AAi5FD,wBAAgB,cAAc,CAAC,KAAK,EAAE,OAAO,GAAG,MAAM,CAErD;AAyDD,wBAAgB,qBAAqB,CAAC,IAAI,EAAE,SAAS,MAAM,EAAE,EAAE,UAAU,EAAE,MAAM,GAAG,MAAM,GAAG,IAAI,CAchG;AAED,wBAAgB,2BAA2B,CACzC,IAAI,EAAE,SAAS,MAAM,EAAE,EACvB,OAAO,EAAE;IACP,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAC;IACvB,QAAQ,CAAC,iBAAiB,CAAC,EAAE,SAAS,MAAM,EAAE,CAAC;IAC/C,QAAQ,CAAC,cAAc,CAAC,EAAE,SAAS,MAAM,EAAE,CAAC;CAC7C,GACA,MAAM,GAAG,IAAI,CAYf;AAED;;;;;;GAMG;AACH,wBAAgB,wBAAwB,CACtC,IAAI,EAAE,SAAS,MAAM,EAAE,EACvB,OAAO,EAAE;IACP,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAC;IACvB,QAAQ,CAAC,iBAAiB,CAAC,EAAE,OAAO,CAAC;CACtC,GACA;IACD,QAAQ,CAAC,UAAU,EAAE,MAAM,CAAC;IAC5B,QAAQ,CAAC,KAAK,EAAE,MAAM,GAAG,IAAI,CAAC;CAC/B,CA2CA;AAED;;;;;;;;;;;;;GAaG;AACH,wBAAgB,iCAAiC,CAC/C,IAAI,EAAE,SAAS,MAAM,EAAE,EACvB,OAAO,EAAE;IACP,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAC;IACvB,QAAQ,CAAC,2BAA2B,CAAC,EAAE,WAAW,CAAC,MAAM,CAAC,CAAC;CAC5D,GACA;IACD,QAAQ,CAAC,UAAU,EAAE,MAAM,CAAC;IAC5B,QAAQ,CAAC,KAAK,EAAE,MAAM,GAAG,IAAI,CAAC;CAC/B,CAeA;AAuBD,wBAAsB,kBAAkB,CACtC,UAAU,EAAE,MAAM,EAClB,KAAK,EAAE,UAAU,CAAC,OAAO,2BAA2B,CAAC,CAAC,CAAC,CAAC,GAAG;IACzD,QAAQ,CAAC,kBAAkB,CAAC,EAAE,MAAM,CAAC;CACtC,GACA,OAAO,CAAC,IAAI,CAAC,CAoBf;AAiED,wBAAgB,qBAAqB,CACnC,IAAI,EAAE,SAAS,MAAM,EAAE,EACvB,iBAAiB,EAAE,WAAW,CAAC,MAAM,CAAC,GACrC,SAAS,MAAM,EAAE,CAuBnB"}
|
|
@@ -4,7 +4,7 @@ import fs from "node:fs/promises";
|
|
|
4
4
|
import os from "node:os";
|
|
5
5
|
import path from "node:path";
|
|
6
6
|
import { fileURLToPath } from "node:url";
|
|
7
|
-
import { buildGdhStatusResult,
|
|
7
|
+
import { buildGdhStatusResult, CLAUDE_CHECK_UPDATE_HOOK_RELATIVE_PATH, CLAUDE_MIGRATE_SKILL_RELATIVE_PATH, CLAUDE_ONBOARD_SKILL_RELATIVE_PATH, CLAUDE_PREPARE_SKILL_RELATIVE_PATH, CLAUDE_SCAN_SKILL_RELATIVE_PATH, CLAUDE_STATUS_SKILL_RELATIVE_PATH, CODEX_MIGRATE_SKILL_RELATIVE_PATH, CODEX_ONBOARD_SKILL_RELATIVE_PATH, CODEX_PREPARE_SKILL_RELATIVE_PATH, CODEX_SCAN_SKILL_RELATIVE_PATH, CODEX_STATUS_SKILL_RELATIVE_PATH, CURSOR_MIGRATE_SKILL_RELATIVE_PATH, CURSOR_ONBOARD_SKILL_RELATIVE_PATH, CURSOR_PREPARE_SKILL_RELATIVE_PATH, CURSOR_SCAN_SKILL_RELATIVE_PATH, CURSOR_STATUS_SKILL_RELATIVE_PATH, createGsdSnapshot, getSupportedAgentAdaptersStatus, installSupportedAgentAdapters, } from "@gdh/adapters";
|
|
8
8
|
import { checkManagedLsp, doctorAuthoringDiagnostics, doctorManagedLsp, getAuthoringDiagnosticsStatus, getCurrentAuthoringDiagnostics, getManagedLspStatus, hasCompleteOnboardingSurface, inspectCacheState, pruneCacheState, pruneAuthoringDiagnostics, pruneManagedLsp, readProjectConfig, readWorktreeState, refreshAuthoringDiagnostics, resolveAuthoringStatus, resolveEffectiveTargetPath, resolvePinnedVersion, resolveProjectRoot, resolveTargetGodotDocsVersion, restartManagedLsp, runAuthoringCheck, runImportRefresh, runTargetPrepare, runWarmup, stopManagedLsp, } from "@gdh/authoring";
|
|
9
9
|
import { definePackageBoundary, GDH_AUTHORING_DOGFOOD_VERSION, GDH_AUTHORING_SLICE_REPORT_VERSION, GDH_PRODUCT_NAME, resolveCurrentGdhInstall, resolveGdhProductMetadata, } from "@gdh/core";
|
|
10
10
|
import { fetchOfficialGodotDoc, getGuidanceStatus, resolveGuidanceQuery, searchOfficialGodotDocs, } from "@gdh/docs";
|
|
@@ -13,11 +13,21 @@ import { inspectAuthoringEffectiveness, inspectAuthoringSessions, inspectGuidanc
|
|
|
13
13
|
import { checkRuntimeRecipe, createRuntimeBridgeManager, serveRuntimeBridgeBroker, inspectRuntimeBridgeSurface, installRuntimeBridgeSurface, listRuntimeRecipes, removeRuntimeBridgeSurface, repairRuntimeBridgeSurface, runRuntimeRecipe, showRuntimeRecipe, } from "@gdh/runtime";
|
|
14
14
|
import { applyRepairableOnboardingWrites, onboardGodotProject, persistInventoryForTarget, readInventoryCacheOrScan, scanGodotProjectInventory, } from "@gdh/scan";
|
|
15
15
|
import { exerciseRuntimeCorpusEntry, inspectRuntimeCorpusStatus, inspectRuntimeVerificationBundleState, inspectRuntimeVerificationReadiness, listRuntimeScenarios, materializeRuntimeCorpusEntry, recordRuntimeCorpusValidation, runRuntimeVerificationScenario, showRuntimeScenario, } from "@gdh/verify";
|
|
16
|
-
import { migrateProjectLifecycleSurface } from "./migrate.js";
|
|
16
|
+
import { clearEnvelope, clearMigrationBackups, migrateProjectLifecycleSurface, recordEnvelopeResult, } from "./migrate.js";
|
|
17
17
|
import { runBridgeSessionCommand } from "./bridge-session.js";
|
|
18
18
|
import { cleanupGdhMcpProcesses } from "./mcp-cleanup.js";
|
|
19
19
|
import { presentPublicRuntimeTerms } from "./public-terms.js";
|
|
20
|
-
import { runSelfUpdateCommand } from "./self-update.js";
|
|
20
|
+
import { runSelfUpdateCommand as runSelfUpdateCommandImpl } from "./self-update.js";
|
|
21
|
+
/**
|
|
22
|
+
* Re-export of `runSelfUpdateCommand` so the integration test in
|
|
23
|
+
* `packages/cli/src/self-update.integration.test.ts` (Plan 73-06) can drive
|
|
24
|
+
* the dispatcher directly without depending on the self-update module's
|
|
25
|
+
* surface evolving. The implementation lives in `./self-update.js`; this
|
|
26
|
+
* is a thin pass-through that preserves identical signature and behavior.
|
|
27
|
+
*/
|
|
28
|
+
export async function runSelfUpdateCommand(args, io) {
|
|
29
|
+
return runSelfUpdateCommandImpl(args, io);
|
|
30
|
+
}
|
|
21
31
|
import { executeSetupCommand, isSetupCanceledError, renderDurableTruthCollisionHint, renderSetupIntro, renderSetupOutro, renderSetupSummary, } from "./setup.js";
|
|
22
32
|
import { emitUpdateBannerIfStale } from "./update-banner.js";
|
|
23
33
|
export const cliPackage = definePackageBoundary({
|
|
@@ -124,6 +134,9 @@ export async function runCli(args, io = { stdout: process.stdout, stderr: proces
|
|
|
124
134
|
if (command === "migrate") {
|
|
125
135
|
return runMigrateCommand(rest, io);
|
|
126
136
|
}
|
|
137
|
+
if (command === "migration") {
|
|
138
|
+
return runMigrationCommand(rest, io);
|
|
139
|
+
}
|
|
127
140
|
if (command === "self-update") {
|
|
128
141
|
return runSelfUpdateCommand(rest, io);
|
|
129
142
|
}
|
|
@@ -1966,6 +1979,235 @@ async function runMigrateCommand(args, io) {
|
|
|
1966
1979
|
return 1;
|
|
1967
1980
|
}
|
|
1968
1981
|
}
|
|
1982
|
+
export async function runMigrationCommand(args, io) {
|
|
1983
|
+
const [subcommand, ...rest] = args;
|
|
1984
|
+
if (!subcommand || subcommand === "--help" || subcommand === "help") {
|
|
1985
|
+
io.stdout.write([
|
|
1986
|
+
"Usage: gdh migration <command>",
|
|
1987
|
+
"",
|
|
1988
|
+
"Commands:",
|
|
1989
|
+
" clear-backups [target] Remove .gdh-state/backup/ when all deferred-action probes are clean (idempotent).",
|
|
1990
|
+
" record-envelope-result <slug> --result-file <path> Record a Phase 73 envelope output_contract from a JSON file.",
|
|
1991
|
+
" record-envelope-result <slug> --result <inline-json> Record a Phase 73 envelope output_contract inline (JSON string).",
|
|
1992
|
+
" clear-envelope <slug> [target] Drop the recorded envelopes slot for <slug> from migration.json (testing/debug).",
|
|
1993
|
+
].join("\n") + "\n");
|
|
1994
|
+
return 0;
|
|
1995
|
+
}
|
|
1996
|
+
if (subcommand === "clear-backups") {
|
|
1997
|
+
return runMigrationClearBackupsCommand(rest, io);
|
|
1998
|
+
}
|
|
1999
|
+
if (subcommand === "record-envelope-result") {
|
|
2000
|
+
return runMigrationRecordEnvelopeResultCommand(rest, io);
|
|
2001
|
+
}
|
|
2002
|
+
if (subcommand === "clear-envelope") {
|
|
2003
|
+
return runMigrationClearEnvelopeCommand(rest, io);
|
|
2004
|
+
}
|
|
2005
|
+
io.stderr.write([
|
|
2006
|
+
`Unknown migration command: ${subcommand}`,
|
|
2007
|
+
"",
|
|
2008
|
+
"Run `gdh migration --help` for the list of supported subcommands.",
|
|
2009
|
+
].join("\n") + "\n");
|
|
2010
|
+
return 1;
|
|
2011
|
+
}
|
|
2012
|
+
async function runMigrationClearBackupsCommand(args, io) {
|
|
2013
|
+
if (args.includes("--help")) {
|
|
2014
|
+
io.stdout.write([
|
|
2015
|
+
"Usage: gdh migration clear-backups [target]",
|
|
2016
|
+
"",
|
|
2017
|
+
"Remove .gdh-state/backup/ when all deferred-action probes are clean.",
|
|
2018
|
+
"Exits 0 on cleared and noop, 1 on blocked_by_pending_probes.",
|
|
2019
|
+
].join("\n") + "\n");
|
|
2020
|
+
return 0;
|
|
2021
|
+
}
|
|
2022
|
+
const unsupportedOptionsError = findUnsupportedOptionsError(args, {
|
|
2023
|
+
usage: "Usage: gdh migration clear-backups [target]\n",
|
|
2024
|
+
});
|
|
2025
|
+
if (unsupportedOptionsError !== null) {
|
|
2026
|
+
io.stderr.write(unsupportedOptionsError);
|
|
2027
|
+
return 1;
|
|
2028
|
+
}
|
|
2029
|
+
const { targetPath, error: targetPathError } = parseOptionalPositionalTargetPath(args, {
|
|
2030
|
+
usage: "Usage: gdh migration clear-backups [target]\n",
|
|
2031
|
+
});
|
|
2032
|
+
if (targetPathError !== null) {
|
|
2033
|
+
io.stderr.write(targetPathError);
|
|
2034
|
+
return 1;
|
|
2035
|
+
}
|
|
2036
|
+
try {
|
|
2037
|
+
const result = await clearMigrationBackups({ targetPath });
|
|
2038
|
+
writeJsonResult(io, result);
|
|
2039
|
+
return result.state === "blocked_by_pending_probes" ? 1 : 0;
|
|
2040
|
+
}
|
|
2041
|
+
catch (error) {
|
|
2042
|
+
io.stderr.write(`Failed to clear migration backups for "${targetPath}": ${formatCliError(error)}\n`);
|
|
2043
|
+
return 1;
|
|
2044
|
+
}
|
|
2045
|
+
}
|
|
2046
|
+
// ---------------------------------------------------------------------------
|
|
2047
|
+
// Phase 73 — gdh migration record-envelope-result (D-07 / D-13)
|
|
2048
|
+
// ---------------------------------------------------------------------------
|
|
2049
|
+
const RECORD_ENVELOPE_RESULT_USAGE = "Usage: gdh migration record-envelope-result <slug> [--result-file <path> | --result <json>] [--target <path>]\n";
|
|
2050
|
+
/**
|
|
2051
|
+
* Subcommand `"record-envelope-result"` for `gdh migration` (Phase 73 D-07).
|
|
2052
|
+
* Mutually-exclusive `--result-file` / `--result` gate; resolves `--target`
|
|
2053
|
+
* via {@link parseSingleTargetPathArg} after stripping the slug positional;
|
|
2054
|
+
* delegates validation and atomic write to {@link recordEnvelopeResult} in
|
|
2055
|
+
* `./migrate.js`. Exit 0 on `recorded`, exit 1 on `blocked`.
|
|
2056
|
+
*/
|
|
2057
|
+
async function runMigrationRecordEnvelopeResultCommand(args, io) {
|
|
2058
|
+
if (args.includes("--help")) {
|
|
2059
|
+
io.stdout.write([
|
|
2060
|
+
"Usage: gdh migration record-envelope-result <slug> --result-file <path> [--target <path>]",
|
|
2061
|
+
"Usage: gdh migration record-envelope-result <slug> --result <inline-json> [--target <path>]",
|
|
2062
|
+
"",
|
|
2063
|
+
"Record a Phase 73 envelope output_contract block. Validates against the",
|
|
2064
|
+
"GdhMigrationEnvelopeOutput typed union (apply / abort / needs_clarification);",
|
|
2065
|
+
"appends to migration.json.envelopes[<slug>] and migration.json.envelopes[<slug>].attempts[].",
|
|
2066
|
+
'Does NOT advance the chain — re-run `gdh self-update` after recording.',
|
|
2067
|
+
"",
|
|
2068
|
+
'Exits 0 on { state: "recorded" }, 1 on { state: "blocked" }.',
|
|
2069
|
+
].join("\n") + "\n");
|
|
2070
|
+
return 0;
|
|
2071
|
+
}
|
|
2072
|
+
const unsupportedOptionsError = findUnsupportedOptionsError(args, {
|
|
2073
|
+
usage: RECORD_ENVELOPE_RESULT_USAGE,
|
|
2074
|
+
optionsWithValues: ["--result-file", "--result", "--target"],
|
|
2075
|
+
});
|
|
2076
|
+
if (unsupportedOptionsError !== null) {
|
|
2077
|
+
io.stderr.write(unsupportedOptionsError);
|
|
2078
|
+
return 1;
|
|
2079
|
+
}
|
|
2080
|
+
// Walk argv and skip the value following each value-bearing flag so it is
|
|
2081
|
+
// not misinterpreted as a positional. Boolean flags would belong here too
|
|
2082
|
+
// if any were supported (none currently).
|
|
2083
|
+
const resolvedPositionals = [];
|
|
2084
|
+
for (let i = 0; i < args.length; i++) {
|
|
2085
|
+
const arg = args[i] ?? "";
|
|
2086
|
+
if (arg === "--result" || arg === "--result-file" || arg === "--target") {
|
|
2087
|
+
i++; // skip value
|
|
2088
|
+
continue;
|
|
2089
|
+
}
|
|
2090
|
+
if (arg.startsWith("--"))
|
|
2091
|
+
continue;
|
|
2092
|
+
resolvedPositionals.push(arg);
|
|
2093
|
+
}
|
|
2094
|
+
if (resolvedPositionals.length === 0) {
|
|
2095
|
+
io.stderr.write("Usage error: gdh migration record-envelope-result requires a <slug> positional argument.\n");
|
|
2096
|
+
return 1;
|
|
2097
|
+
}
|
|
2098
|
+
if (resolvedPositionals.length > 1) {
|
|
2099
|
+
io.stderr.write(`Usage error: gdh migration record-envelope-result accepts a single <slug>; received ${resolvedPositionals.length}.\n`);
|
|
2100
|
+
return 1;
|
|
2101
|
+
}
|
|
2102
|
+
const slug = resolvedPositionals[0];
|
|
2103
|
+
const resultFile = readSingleOptionValue(args, "--result-file");
|
|
2104
|
+
const resultInline = readSingleOptionValue(args, "--result");
|
|
2105
|
+
// Mutually exclusive: exactly one of the two MUST be present.
|
|
2106
|
+
if ((resultFile === null) === (resultInline === null)) {
|
|
2107
|
+
io.stderr.write("Usage error: provide exactly one of --result-file <path> or --result <inline-json>.\n");
|
|
2108
|
+
return 1;
|
|
2109
|
+
}
|
|
2110
|
+
// Use the canonical helper so --target resolution is symmetric with
|
|
2111
|
+
// runStatusCommand and the other migration dispatchers (no ad-hoc
|
|
2112
|
+
// path.resolve(targetExplicit) here). Strip the slug positional + the
|
|
2113
|
+
// value-bearing flags' values before delegating so the helper sees only
|
|
2114
|
+
// [--target <path>] (or nothing).
|
|
2115
|
+
const argsForTargetParse = [];
|
|
2116
|
+
for (let i = 0; i < args.length; i++) {
|
|
2117
|
+
const arg = args[i] ?? "";
|
|
2118
|
+
if (arg === "--target") {
|
|
2119
|
+
argsForTargetParse.push(arg);
|
|
2120
|
+
const next = args[i + 1];
|
|
2121
|
+
if (next !== undefined)
|
|
2122
|
+
argsForTargetParse.push(next);
|
|
2123
|
+
i++;
|
|
2124
|
+
continue;
|
|
2125
|
+
}
|
|
2126
|
+
if (arg === "--result" || arg === "--result-file") {
|
|
2127
|
+
i++; // skip value
|
|
2128
|
+
continue;
|
|
2129
|
+
}
|
|
2130
|
+
if (arg === slug)
|
|
2131
|
+
continue; // strip the consumed positional
|
|
2132
|
+
if (arg.startsWith("--"))
|
|
2133
|
+
continue; // strip help and other flags
|
|
2134
|
+
// Any leftover positional would have been caught above.
|
|
2135
|
+
}
|
|
2136
|
+
const { targetPath, error: targetError } = parseSingleTargetPathArg(argsForTargetParse, {
|
|
2137
|
+
usage: RECORD_ENVELOPE_RESULT_USAGE,
|
|
2138
|
+
allowTargetOption: true,
|
|
2139
|
+
});
|
|
2140
|
+
if (targetError !== null) {
|
|
2141
|
+
io.stderr.write(targetError);
|
|
2142
|
+
return 1;
|
|
2143
|
+
}
|
|
2144
|
+
try {
|
|
2145
|
+
const result = await recordEnvelopeResult({
|
|
2146
|
+
targetPath,
|
|
2147
|
+
envelopeRef: slug,
|
|
2148
|
+
resultSource: resultFile !== null
|
|
2149
|
+
? { kind: "file", absolutePath: path.resolve(resultFile) }
|
|
2150
|
+
: { kind: "inline", json: resultInline },
|
|
2151
|
+
});
|
|
2152
|
+
writeJsonResult(io, result);
|
|
2153
|
+
return result.state === "blocked" ? 1 : 0;
|
|
2154
|
+
}
|
|
2155
|
+
catch (error) {
|
|
2156
|
+
io.stderr.write(`Failed to record envelope result for "${targetPath}": ${formatCliError(error)}\n`);
|
|
2157
|
+
return 1;
|
|
2158
|
+
}
|
|
2159
|
+
}
|
|
2160
|
+
// ---------------------------------------------------------------------------
|
|
2161
|
+
// Phase 73 — gdh migration clear-envelope (testing/debug)
|
|
2162
|
+
// ---------------------------------------------------------------------------
|
|
2163
|
+
/**
|
|
2164
|
+
* Subcommand `"clear-envelope"` for `gdh migration` (testing/debug companion).
|
|
2165
|
+
* Removes the per-slug slot from `migration.json.envelopes`; idempotent noop
|
|
2166
|
+
* on missing slot or missing migration state. Does NOT touch
|
|
2167
|
+
* `pending_envelope_resume` (mirrors D-13 isolation in
|
|
2168
|
+
* {@link recordEnvelopeResult}). Exit 0 always.
|
|
2169
|
+
*/
|
|
2170
|
+
async function runMigrationClearEnvelopeCommand(args, io) {
|
|
2171
|
+
if (args.includes("--help")) {
|
|
2172
|
+
io.stdout.write([
|
|
2173
|
+
"Usage: gdh migration clear-envelope <slug> [target]",
|
|
2174
|
+
"",
|
|
2175
|
+
"Remove the recorded envelopes slot for <slug> from migration.json.",
|
|
2176
|
+
"Does NOT touch pending_envelope_resume. Idempotent.",
|
|
2177
|
+
"",
|
|
2178
|
+
"Exits 0 on cleared and noop.",
|
|
2179
|
+
].join("\n") + "\n");
|
|
2180
|
+
return 0;
|
|
2181
|
+
}
|
|
2182
|
+
const unsupportedOptionsError = findUnsupportedOptionsError(args, {
|
|
2183
|
+
usage: "Usage: gdh migration clear-envelope <slug> [target]\n",
|
|
2184
|
+
});
|
|
2185
|
+
if (unsupportedOptionsError !== null) {
|
|
2186
|
+
io.stderr.write(unsupportedOptionsError);
|
|
2187
|
+
return 1;
|
|
2188
|
+
}
|
|
2189
|
+
const positional = args.filter((a) => !a.startsWith("--"));
|
|
2190
|
+
if (positional.length === 0) {
|
|
2191
|
+
io.stderr.write("Usage error: gdh migration clear-envelope requires a <slug> positional argument.\n");
|
|
2192
|
+
return 1;
|
|
2193
|
+
}
|
|
2194
|
+
if (positional.length > 2) {
|
|
2195
|
+
io.stderr.write("Usage error: gdh migration clear-envelope accepts at most <slug> and an optional [target].\n");
|
|
2196
|
+
return 1;
|
|
2197
|
+
}
|
|
2198
|
+
const slug = positional[0];
|
|
2199
|
+
const targetCandidate = positional[1] ?? null;
|
|
2200
|
+
const targetPath = targetCandidate !== null ? path.resolve(targetCandidate) : process.cwd();
|
|
2201
|
+
try {
|
|
2202
|
+
const result = await clearEnvelope({ targetPath, envelopeRef: slug });
|
|
2203
|
+
writeJsonResult(io, result);
|
|
2204
|
+
return 0;
|
|
2205
|
+
}
|
|
2206
|
+
catch (error) {
|
|
2207
|
+
io.stderr.write(`Failed to clear envelope "${slug}" for "${targetPath}": ${formatCliError(error)}\n`);
|
|
2208
|
+
return 1;
|
|
2209
|
+
}
|
|
2210
|
+
}
|
|
1969
2211
|
async function runBridgeStatusCommand(args, io) {
|
|
1970
2212
|
if (args.includes("--help")) {
|
|
1971
2213
|
io.stdout.write([
|
|
@@ -2989,21 +3231,22 @@ const VERIFY_DRIFT_SCANNED_FILES = [
|
|
|
2989
3231
|
{ relativePath: CODEX_ONBOARD_SKILL_RELATIVE_PATH, description: "Codex gdh-onboard skill" },
|
|
2990
3232
|
{ relativePath: CODEX_STATUS_SKILL_RELATIVE_PATH, description: "Codex gdh-status skill" },
|
|
2991
3233
|
{ relativePath: CODEX_MIGRATE_SKILL_RELATIVE_PATH, description: "Codex gdh-migrate skill" },
|
|
2992
|
-
{ relativePath: CODEX_CHECK_SKILL_RELATIVE_PATH, description: "Codex gdh-check skill" },
|
|
2993
3234
|
{ relativePath: CODEX_PREPARE_SKILL_RELATIVE_PATH, description: "Codex gdh-prepare skill" },
|
|
2994
3235
|
{ relativePath: CODEX_SCAN_SKILL_RELATIVE_PATH, description: "Codex gdh-scan skill" },
|
|
2995
3236
|
{ relativePath: CURSOR_ONBOARD_SKILL_RELATIVE_PATH, description: "Cursor gdh-onboard skill" },
|
|
2996
3237
|
{ relativePath: CURSOR_STATUS_SKILL_RELATIVE_PATH, description: "Cursor gdh-status skill" },
|
|
2997
3238
|
{ relativePath: CURSOR_MIGRATE_SKILL_RELATIVE_PATH, description: "Cursor gdh-migrate skill" },
|
|
2998
|
-
{ relativePath: CURSOR_CHECK_SKILL_RELATIVE_PATH, description: "Cursor gdh-check skill" },
|
|
2999
3239
|
{ relativePath: CURSOR_PREPARE_SKILL_RELATIVE_PATH, description: "Cursor gdh-prepare skill" },
|
|
3000
3240
|
{ relativePath: CURSOR_SCAN_SKILL_RELATIVE_PATH, description: "Cursor gdh-scan skill" },
|
|
3001
3241
|
{ relativePath: CLAUDE_ONBOARD_SKILL_RELATIVE_PATH, description: "Claude gdh-onboard skill" },
|
|
3002
3242
|
{ relativePath: CLAUDE_STATUS_SKILL_RELATIVE_PATH, description: "Claude gdh-status skill" },
|
|
3003
3243
|
{ relativePath: CLAUDE_MIGRATE_SKILL_RELATIVE_PATH, description: "Claude gdh-migrate skill" },
|
|
3004
|
-
{ relativePath: CLAUDE_CHECK_SKILL_RELATIVE_PATH, description: "Claude gdh-check skill" },
|
|
3005
3244
|
{ relativePath: CLAUDE_PREPARE_SKILL_RELATIVE_PATH, description: "Claude gdh-prepare skill" },
|
|
3006
3245
|
{ relativePath: CLAUDE_SCAN_SKILL_RELATIVE_PATH, description: "Claude gdh-scan skill" },
|
|
3246
|
+
// Intentionally excluded: generated gdh-check skills for Claude, Codex, and Cursor.
|
|
3247
|
+
// v0.25 retires the validation skill surface; validation evidence belongs to hooks,
|
|
3248
|
+
// MCP/CLI status, and explicit authoring-check commands. Scanning the retired paths
|
|
3249
|
+
// reports a false missing-file drift after a correct migration removes them.
|
|
3007
3250
|
// Phase 12 extension — close the Phase 11 coverage gap (research §Baked Version Surface Inventory rows 26-28).
|
|
3008
3251
|
// These files are re-baked at pin time and must be audited by MIG-02's post-condition invariant.
|
|
3009
3252
|
//
|