@skillcap/gdh 3.0.1 → 3.1.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/README.md +1 -0
- package/RELEASE-SPAN-UPDATE-CONTRACTS.json +147 -0
- package/node_modules/@gdh/adapters/dist/index.d.ts.map +1 -1
- package/node_modules/@gdh/adapters/dist/index.js +21 -8
- package/node_modules/@gdh/adapters/dist/index.js.map +1 -1
- 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.map +1 -1
- package/node_modules/@gdh/cli/dist/index.js +195 -4
- package/node_modules/@gdh/cli/dist/index.js.map +1 -1
- package/node_modules/@gdh/cli/package.json +11 -10
- package/node_modules/@gdh/core/dist/bridge-substrate.d.ts +20 -0
- package/node_modules/@gdh/core/dist/bridge-substrate.d.ts.map +1 -0
- package/node_modules/@gdh/core/dist/bridge-substrate.js +40 -0
- package/node_modules/@gdh/core/dist/bridge-substrate.js.map +1 -0
- package/node_modules/@gdh/core/dist/index.d.ts +28 -30
- package/node_modules/@gdh/core/dist/index.d.ts.map +1 -1
- package/node_modules/@gdh/core/dist/index.js +16 -12
- package/node_modules/@gdh/core/dist/index.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/editor/dist/index.d.ts +205 -0
- package/node_modules/@gdh/editor/dist/index.d.ts.map +1 -0
- package/node_modules/@gdh/editor/dist/index.js +1064 -0
- package/node_modules/@gdh/editor/dist/index.js.map +1 -0
- package/node_modules/@gdh/editor/package.json +17 -0
- package/node_modules/@gdh/mcp/dist/index.d.ts +1 -1
- package/node_modules/@gdh/mcp/dist/index.d.ts.map +1 -1
- package/node_modules/@gdh/mcp/dist/index.js +104 -7
- package/node_modules/@gdh/mcp/dist/index.js.map +1 -1
- package/node_modules/@gdh/mcp/package.json +10 -8
- package/node_modules/@gdh/observability/package.json +2 -2
- package/node_modules/@gdh/runtime/dist/bridge-broker-contract.d.ts +2 -2
- package/node_modules/@gdh/runtime/dist/bridge-broker-contract.d.ts.map +1 -1
- package/node_modules/@gdh/runtime/dist/bridge-broker-contract.js +2 -37
- package/node_modules/@gdh/runtime/dist/bridge-broker-contract.js.map +1 -1
- package/node_modules/@gdh/runtime/dist/bridge-surface.d.ts +1 -1
- package/node_modules/@gdh/runtime/dist/bridge-surface.d.ts.map +1 -1
- package/node_modules/@gdh/runtime/dist/bridge-surface.js +396 -73
- package/node_modules/@gdh/runtime/dist/bridge-surface.js.map +1 -1
- package/node_modules/@gdh/runtime/dist/index.d.ts +2 -3
- package/node_modules/@gdh/runtime/dist/index.d.ts.map +1 -1
- package/node_modules/@gdh/runtime/dist/index.js +2 -3
- package/node_modules/@gdh/runtime/dist/index.js.map +1 -1
- package/node_modules/@gdh/runtime/package.json +3 -2
- package/node_modules/@gdh/scan/package.json +3 -3
- package/node_modules/@gdh/verify/package.json +7 -7
- package/package.json +13 -11
|
@@ -8,6 +8,7 @@ import { buildGdhStatusResult, CLAUDE_CHECK_UPDATE_HOOK_RELATIVE_PATH, CLAUDE_MI
|
|
|
8
8
|
import { checkManagedLsp, doctorAuthoringDiagnostics, doctorManagedLsp, getAuthoringDiagnosticsStatus, getCurrentAuthoringDiagnostics, getManagedLspStatus, hasCompleteOnboardingSurface, inspectCacheState, pruneAuthoringDiagnostics, pruneCacheState, pruneManagedLsp, readProjectConfig, readWorktreeState, refreshAuthoringDiagnostics, resolveAuthoringStatus, resolveEffectiveTargetPath, resolvePinnedVersion, resolveProjectRoot, resolveTargetGodotDocsVersion, restartManagedLsp, runAuthoringCheck, runImportRefresh, runTargetPrepare, runWarmup, stopManagedLsp, warmupManagedLsp, } from "@gdh/authoring";
|
|
9
9
|
import { CODEX_RETRUST_REMINDER_TEXT, clearCodexRetrustReminder, definePackageBoundary, GDH_AUTHORING_DOGFOOD_VERSION, GDH_AUTHORING_SLICE_REPORT_VERSION, GDH_PRODUCT_NAME, readCodexRetrustReminder, resolveCurrentGdhInstall, resolveGdhProductMetadata, } from "@gdh/core";
|
|
10
10
|
import { fetchOfficialGodotDoc, getGuidanceStatus, resolveGuidanceQuery, searchOfficialGodotDocs, } from "@gdh/docs";
|
|
11
|
+
import { inspectEditorBridgeSession, runEditorOperation, } from "@gdh/editor";
|
|
11
12
|
import { createMcpManifest, invokeMcpTool, serveMcpOverStdio } from "@gdh/mcp";
|
|
12
13
|
import { inspectAuthoringEffectiveness, inspectAuthoringSessions, inspectGuidanceAudit, recordAuthoringSessionEvent, } from "@gdh/observability";
|
|
13
14
|
import { checkRuntimeRecipe, createRuntimeBridgeManager, inspectRuntimeBridgeSurface, installRuntimeBridgeSurface, listRuntimeRecipes, removeRuntimeBridgeSurface, repairRuntimeBridgeSurface, runRuntimeRecipe, serveRuntimeBridgeBroker, showRuntimeRecipe, } from "@gdh/runtime";
|
|
@@ -39,6 +40,7 @@ export const cliPackage = definePackageBoundary({
|
|
|
39
40
|
"@gdh/core",
|
|
40
41
|
"@gdh/authoring",
|
|
41
42
|
"@gdh/docs",
|
|
43
|
+
"@gdh/editor",
|
|
42
44
|
"@gdh/mcp",
|
|
43
45
|
"@gdh/observability",
|
|
44
46
|
"@gdh/runtime",
|
|
@@ -107,6 +109,9 @@ export async function runCli(args, io = { stdout: process.stdout, stderr: proces
|
|
|
107
109
|
if (command === "bridge") {
|
|
108
110
|
return runBridgeCommand(rest, io);
|
|
109
111
|
}
|
|
112
|
+
if (command === "editor") {
|
|
113
|
+
return runEditorCommand(rest, io);
|
|
114
|
+
}
|
|
110
115
|
if (command === "verification-scenario" || command === "scenario") {
|
|
111
116
|
return runScenarioCommand(rest, io);
|
|
112
117
|
}
|
|
@@ -1765,6 +1770,163 @@ async function runMcpCommand(args, io) {
|
|
|
1765
1770
|
].join("\n") + "\n");
|
|
1766
1771
|
return 1;
|
|
1767
1772
|
}
|
|
1773
|
+
async function runEditorCommand(args, io) {
|
|
1774
|
+
const [subcommand, ...rest] = args;
|
|
1775
|
+
if (!subcommand || subcommand === "--help" || subcommand === "help") {
|
|
1776
|
+
io.stdout.write([
|
|
1777
|
+
"Usage: gdh editor <command>",
|
|
1778
|
+
"",
|
|
1779
|
+
"Commands:",
|
|
1780
|
+
" session status [target] [--mode <mode>] [--godot-editor-bin <path>] Inspect Editor Bridge availability.",
|
|
1781
|
+
" operation run [target] --input-json <json> [--mode <mode>] [--godot-editor-bin <path>] Run one Godot-native editor operation.",
|
|
1782
|
+
].join("\n") + "\n");
|
|
1783
|
+
return 0;
|
|
1784
|
+
}
|
|
1785
|
+
if (subcommand === "session") {
|
|
1786
|
+
return runEditorSessionCommand(rest, io);
|
|
1787
|
+
}
|
|
1788
|
+
if (subcommand === "operation") {
|
|
1789
|
+
return runEditorOperationCommand(rest, io);
|
|
1790
|
+
}
|
|
1791
|
+
io.stderr.write([
|
|
1792
|
+
`Unknown editor command: ${subcommand}`,
|
|
1793
|
+
"",
|
|
1794
|
+
"Usage: gdh editor session status [target] [--mode <mode>] [--godot-editor-bin <path>]",
|
|
1795
|
+
"Usage: gdh editor operation run [target] --input-json <json> [--mode <mode>] [--godot-editor-bin <path>]",
|
|
1796
|
+
].join("\n") + "\n");
|
|
1797
|
+
return 1;
|
|
1798
|
+
}
|
|
1799
|
+
async function runEditorSessionCommand(args, io) {
|
|
1800
|
+
const [subcommand, ...rest] = args;
|
|
1801
|
+
if (!subcommand || subcommand === "--help" || subcommand === "help") {
|
|
1802
|
+
io.stdout.write([
|
|
1803
|
+
"Usage: gdh editor session status [target] [--mode <mode>] [--godot-editor-bin <path>]",
|
|
1804
|
+
"",
|
|
1805
|
+
"Inspect whether GDH can run editor operations for the exact target/worktree.",
|
|
1806
|
+
].join("\n") + "\n");
|
|
1807
|
+
return 0;
|
|
1808
|
+
}
|
|
1809
|
+
if (subcommand !== "status") {
|
|
1810
|
+
io.stderr.write(`Unknown editor session command: ${subcommand}\nUsage: gdh editor session status [target] [--mode <mode>] [--godot-editor-bin <path>]\n`);
|
|
1811
|
+
return 1;
|
|
1812
|
+
}
|
|
1813
|
+
const unsupportedOptionsError = findUnsupportedOptionsError(rest, {
|
|
1814
|
+
usage: "Usage: gdh editor session status [target] [--mode <mode>] [--godot-editor-bin <path>]\n",
|
|
1815
|
+
optionsWithValues: ["--mode", "--godot-editor-bin"],
|
|
1816
|
+
});
|
|
1817
|
+
if (unsupportedOptionsError !== null) {
|
|
1818
|
+
io.stderr.write(unsupportedOptionsError);
|
|
1819
|
+
return 1;
|
|
1820
|
+
}
|
|
1821
|
+
const { targetPath, error } = parseOptionalPositionalTargetPath(rest, {
|
|
1822
|
+
usage: "Usage: gdh editor session status [target] [--mode <mode>] [--godot-editor-bin <path>]\n",
|
|
1823
|
+
additionalOptionsWithValues: new Set(["--mode", "--godot-editor-bin"]),
|
|
1824
|
+
});
|
|
1825
|
+
if (error !== null) {
|
|
1826
|
+
io.stderr.write(error);
|
|
1827
|
+
return 1;
|
|
1828
|
+
}
|
|
1829
|
+
const mode = parseEditorSessionMode(readSingleOptionValue(rest, "--mode"));
|
|
1830
|
+
if (mode === null) {
|
|
1831
|
+
io.stderr.write("Usage error: --mode must be one of auto, headless_only, headless-only, adopt_only, adopt-only, or disabled.\n");
|
|
1832
|
+
return 1;
|
|
1833
|
+
}
|
|
1834
|
+
try {
|
|
1835
|
+
const projectConfig = await readProjectConfig(targetPath);
|
|
1836
|
+
const result = await inspectEditorBridgeSession({
|
|
1837
|
+
targetPath,
|
|
1838
|
+
projectConfig,
|
|
1839
|
+
mode,
|
|
1840
|
+
godotEditorBin: readSingleOptionValue(rest, "--godot-editor-bin"),
|
|
1841
|
+
});
|
|
1842
|
+
writeJsonResult(io, result);
|
|
1843
|
+
return result.state === "blocked" ? 1 : 0;
|
|
1844
|
+
}
|
|
1845
|
+
catch (error) {
|
|
1846
|
+
io.stderr.write(`Failed to inspect Editor Bridge session: ${formatCliError(error)}\n`);
|
|
1847
|
+
return 1;
|
|
1848
|
+
}
|
|
1849
|
+
}
|
|
1850
|
+
async function runEditorOperationCommand(args, io) {
|
|
1851
|
+
const [subcommand, ...rest] = args;
|
|
1852
|
+
if (!subcommand || subcommand === "--help" || subcommand === "help") {
|
|
1853
|
+
io.stdout.write([
|
|
1854
|
+
"Usage: gdh editor operation run [target] --input-json <json> [--mode <mode>] [--godot-editor-bin <path>] [--timeout-ms <ms>] [--retain-artifacts <count>]",
|
|
1855
|
+
"",
|
|
1856
|
+
"Run one targeted Editor Bridge operation and print the action-oriented result as JSON.",
|
|
1857
|
+
].join("\n") + "\n");
|
|
1858
|
+
return 0;
|
|
1859
|
+
}
|
|
1860
|
+
if (subcommand !== "run") {
|
|
1861
|
+
io.stderr.write(`Unknown editor operation command: ${subcommand}\nUsage: gdh editor operation run [target] --input-json <json> [--mode <mode>] [--godot-editor-bin <path>] [--timeout-ms <ms>] [--retain-artifacts <count>]\n`);
|
|
1862
|
+
return 1;
|
|
1863
|
+
}
|
|
1864
|
+
const unsupportedOptionsError = findUnsupportedOptionsError(rest, {
|
|
1865
|
+
usage: "Usage: gdh editor operation run [target] --input-json <json> [--mode <mode>] [--godot-editor-bin <path>] [--timeout-ms <ms>] [--retain-artifacts <count>]\n",
|
|
1866
|
+
optionsWithValues: [
|
|
1867
|
+
"--input-json",
|
|
1868
|
+
"--mode",
|
|
1869
|
+
"--godot-editor-bin",
|
|
1870
|
+
"--timeout-ms",
|
|
1871
|
+
"--retain-artifacts",
|
|
1872
|
+
],
|
|
1873
|
+
});
|
|
1874
|
+
if (unsupportedOptionsError !== null) {
|
|
1875
|
+
io.stderr.write(unsupportedOptionsError);
|
|
1876
|
+
return 1;
|
|
1877
|
+
}
|
|
1878
|
+
if (readSingleOptionValue(rest, "--input-json") === null) {
|
|
1879
|
+
io.stderr.write("Usage error: gdh editor operation run requires --input-json <json>.\n");
|
|
1880
|
+
return 1;
|
|
1881
|
+
}
|
|
1882
|
+
const { targetPath, error } = parseOptionalPositionalTargetPath(rest, {
|
|
1883
|
+
usage: "Usage: gdh editor operation run [target] --input-json <json> [--mode <mode>] [--godot-editor-bin <path>] [--timeout-ms <ms>] [--retain-artifacts <count>]\n",
|
|
1884
|
+
additionalOptionsWithValues: new Set([
|
|
1885
|
+
"--input-json",
|
|
1886
|
+
"--mode",
|
|
1887
|
+
"--godot-editor-bin",
|
|
1888
|
+
"--timeout-ms",
|
|
1889
|
+
"--retain-artifacts",
|
|
1890
|
+
]),
|
|
1891
|
+
});
|
|
1892
|
+
if (error !== null) {
|
|
1893
|
+
io.stderr.write(error);
|
|
1894
|
+
return 1;
|
|
1895
|
+
}
|
|
1896
|
+
const mode = parseEditorSessionMode(readSingleOptionValue(rest, "--mode"));
|
|
1897
|
+
if (mode === null) {
|
|
1898
|
+
io.stderr.write("Usage error: --mode must be one of auto, headless_only, headless-only, adopt_only, adopt-only, or disabled.\n");
|
|
1899
|
+
return 1;
|
|
1900
|
+
}
|
|
1901
|
+
const timeoutMs = parseOptionalPositiveIntegerOption(rest, "--timeout-ms");
|
|
1902
|
+
if (timeoutMs === null && rest.includes("--timeout-ms")) {
|
|
1903
|
+
io.stderr.write("Usage error: --timeout-ms must be a positive integer.\n");
|
|
1904
|
+
return 1;
|
|
1905
|
+
}
|
|
1906
|
+
const retainOperationArtifacts = parseOptionalPositiveIntegerOption(rest, "--retain-artifacts");
|
|
1907
|
+
if (retainOperationArtifacts === null && rest.includes("--retain-artifacts")) {
|
|
1908
|
+
io.stderr.write("Usage error: --retain-artifacts must be a positive integer.\n");
|
|
1909
|
+
return 1;
|
|
1910
|
+
}
|
|
1911
|
+
try {
|
|
1912
|
+
const projectConfig = await readProjectConfig(targetPath);
|
|
1913
|
+
const result = await runEditorOperation({
|
|
1914
|
+
targetPath,
|
|
1915
|
+
projectConfig,
|
|
1916
|
+
operation: parseEditorOperationJson(rest),
|
|
1917
|
+
mode,
|
|
1918
|
+
...(typeof timeoutMs === "number" && { timeoutMs }),
|
|
1919
|
+
...(typeof retainOperationArtifacts === "number" && { retainOperationArtifacts }),
|
|
1920
|
+
godotEditorBin: readSingleOptionValue(rest, "--godot-editor-bin"),
|
|
1921
|
+
});
|
|
1922
|
+
writeJsonResult(io, result);
|
|
1923
|
+
return result.state === "ok" ? 0 : 1;
|
|
1924
|
+
}
|
|
1925
|
+
catch (error) {
|
|
1926
|
+
io.stderr.write(`Failed to run Editor Bridge operation: ${formatCliError(error)}\n`);
|
|
1927
|
+
return 1;
|
|
1928
|
+
}
|
|
1929
|
+
}
|
|
1768
1930
|
async function runAuthoringDogfoodCommand(args, io) {
|
|
1769
1931
|
if (args.includes("--help")) {
|
|
1770
1932
|
io.stdout.write([
|
|
@@ -3407,8 +3569,8 @@ async function runVerifyDriftCommand(args, io) {
|
|
|
3407
3569
|
"the pinned value. Covers ROADMAP Success Criterion #3 (one source of truth).",
|
|
3408
3570
|
"Also recognises the pre-v3.0.0 hook layout (RFC 0010 / CPATH-10): when",
|
|
3409
3571
|
"`.claude/hooks/gdh-*.js` or `.codex/hooks/gdh-authoring-guard.js` is still on",
|
|
3410
|
-
|
|
3411
|
-
|
|
3572
|
+
'disk, the result emits `legacyLayout.state: "migration_pending"` (legacy only)',
|
|
3573
|
+
'or `"partially_migrated"` (legacy + canonical present) and points the',
|
|
3412
3574
|
"remediation action at `gdh self-update` rather than `gdh adapters install`.",
|
|
3413
3575
|
"This command does NOT validate runtime bridge, project lifecycle, or authoring health.",
|
|
3414
3576
|
"",
|
|
@@ -3484,8 +3646,7 @@ async function runVerifyDriftCommand(args, io) {
|
|
|
3484
3646
|
// `gdh self-update` instead of `gdh adapters install`; the migration entry
|
|
3485
3647
|
// owns the legacy-file cleanup that re-bake cannot perform.
|
|
3486
3648
|
const legacyLayout = await inspectVerifyDriftLegacyLayout(targetPath);
|
|
3487
|
-
const action = legacyLayout.state === "migration_pending" ||
|
|
3488
|
-
legacyLayout.state === "partially_migrated"
|
|
3649
|
+
const action = legacyLayout.state === "migration_pending" || legacyLayout.state === "partially_migrated"
|
|
3489
3650
|
? {
|
|
3490
3651
|
kind: "run_migration",
|
|
3491
3652
|
summary: legacyLayout.state === "migration_pending"
|
|
@@ -4547,6 +4708,8 @@ function renderHelp() {
|
|
|
4547
4708
|
" bridge install [target] [--dry-run] Install the GDH-managed runtime bridge surface.",
|
|
4548
4709
|
" bridge repair [target] [--dry-run] Repair drifted GDH-managed bridge files and autoload state.",
|
|
4549
4710
|
" bridge remove [target] [--dry-run] Remove the GDH-managed runtime bridge surface.",
|
|
4711
|
+
" editor session status [target] Inspect Editor Bridge availability for the exact target/worktree.",
|
|
4712
|
+
" editor operation run [target] --input-json <json> Run one Godot-native editor operation.",
|
|
4550
4713
|
" verification-scenario list [target] List verification scenarios.",
|
|
4551
4714
|
" verification-scenario show [target] <verification-scenario-id> Show one verification scenario.",
|
|
4552
4715
|
" guidance status [target] Inspect durable guidance and audit availability.",
|
|
@@ -4796,6 +4959,34 @@ function parseMcpInputJson(args) {
|
|
|
4796
4959
|
}
|
|
4797
4960
|
return parsed;
|
|
4798
4961
|
}
|
|
4962
|
+
function parseEditorOperationJson(args) {
|
|
4963
|
+
const parsed = parseMcpInputJson(args);
|
|
4964
|
+
const operation = parsed["operation"];
|
|
4965
|
+
if (operation !== null &&
|
|
4966
|
+
operation !== undefined &&
|
|
4967
|
+
!Array.isArray(operation) &&
|
|
4968
|
+
typeof operation === "object") {
|
|
4969
|
+
return operation;
|
|
4970
|
+
}
|
|
4971
|
+
return parsed;
|
|
4972
|
+
}
|
|
4973
|
+
function parseEditorSessionMode(value) {
|
|
4974
|
+
if (value === null || value === "auto")
|
|
4975
|
+
return "auto";
|
|
4976
|
+
if (value === "headless_only" || value === "headless-only")
|
|
4977
|
+
return "headless_only";
|
|
4978
|
+
if (value === "adopt_only" || value === "adopt-only")
|
|
4979
|
+
return "adopt_only";
|
|
4980
|
+
if (value === "disabled")
|
|
4981
|
+
return "disabled";
|
|
4982
|
+
return null;
|
|
4983
|
+
}
|
|
4984
|
+
function parseOptionalPositiveIntegerOption(args, optionName) {
|
|
4985
|
+
const value = readSingleOptionValue(args, optionName);
|
|
4986
|
+
if (value === null)
|
|
4987
|
+
return undefined;
|
|
4988
|
+
return parsePositiveIntegerOptionValue(value);
|
|
4989
|
+
}
|
|
4799
4990
|
function collectAdapterNames(args) {
|
|
4800
4991
|
const values = collectOptionValues(args, "--agent");
|
|
4801
4992
|
if (values.length === 0) {
|