@skillcap/gdh 0.18.2 → 0.19.1
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 +4 -4
- package/RELEASE-SPAN-UPDATE-CONTRACTS.json +145 -8
- package/node_modules/@gdh/adapters/dist/authoring-hook-render.d.ts +10 -0
- package/node_modules/@gdh/adapters/dist/authoring-hook-render.d.ts.map +1 -0
- package/node_modules/@gdh/adapters/dist/authoring-hook-render.js +150 -0
- package/node_modules/@gdh/adapters/dist/authoring-hook-render.js.map +1 -0
- package/node_modules/@gdh/adapters/dist/claude-settings-patch.d.ts +16 -13
- package/node_modules/@gdh/adapters/dist/claude-settings-patch.d.ts.map +1 -1
- package/node_modules/@gdh/adapters/dist/claude-settings-patch.js +92 -40
- package/node_modules/@gdh/adapters/dist/claude-settings-patch.js.map +1 -1
- package/node_modules/@gdh/adapters/dist/claude-statusline-render.d.ts +12 -13
- package/node_modules/@gdh/adapters/dist/claude-statusline-render.d.ts.map +1 -1
- package/node_modules/@gdh/adapters/dist/claude-statusline-render.js +12 -13
- package/node_modules/@gdh/adapters/dist/claude-statusline-render.js.map +1 -1
- package/node_modules/@gdh/adapters/dist/index.d.ts +18 -30
- package/node_modules/@gdh/adapters/dist/index.d.ts.map +1 -1
- package/node_modules/@gdh/adapters/dist/index.js +375 -1137
- package/node_modules/@gdh/adapters/dist/index.js.map +1 -1
- package/node_modules/@gdh/adapters/dist/skill-rendering.d.ts +45 -0
- package/node_modules/@gdh/adapters/dist/skill-rendering.d.ts.map +1 -0
- package/node_modules/@gdh/adapters/dist/skill-rendering.js +431 -0
- package/node_modules/@gdh/adapters/dist/skill-rendering.js.map +1 -0
- package/node_modules/@gdh/adapters/package.json +8 -8
- package/node_modules/@gdh/authoring/dist/diagnostics-summary.d.ts +8 -0
- package/node_modules/@gdh/authoring/dist/diagnostics-summary.d.ts.map +1 -0
- package/node_modules/@gdh/authoring/dist/diagnostics-summary.js +22 -0
- package/node_modules/@gdh/authoring/dist/diagnostics-summary.js.map +1 -0
- package/node_modules/@gdh/authoring/dist/index.d.ts +4 -1
- package/node_modules/@gdh/authoring/dist/index.d.ts.map +1 -1
- package/node_modules/@gdh/authoring/dist/index.js +17 -2
- package/node_modules/@gdh/authoring/dist/index.js.map +1 -1
- package/node_modules/@gdh/authoring/dist/lsp.d.ts +5 -1
- package/node_modules/@gdh/authoring/dist/lsp.d.ts.map +1 -1
- package/node_modules/@gdh/authoring/dist/lsp.js +95 -1
- package/node_modules/@gdh/authoring/dist/lsp.js.map +1 -1
- package/node_modules/@gdh/authoring/dist/project.d.ts.map +1 -1
- package/node_modules/@gdh/authoring/dist/project.js +1 -0
- package/node_modules/@gdh/authoring/dist/project.js.map +1 -1
- package/node_modules/@gdh/authoring/dist/scene-resource.d.ts +2 -0
- package/node_modules/@gdh/authoring/dist/scene-resource.d.ts.map +1 -1
- package/node_modules/@gdh/authoring/dist/scene-resource.js +15 -1
- package/node_modules/@gdh/authoring/dist/scene-resource.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 +206 -280
- package/node_modules/@gdh/cli/dist/index.js.map +1 -1
- package/node_modules/@gdh/cli/package.json +10 -10
- package/node_modules/@gdh/core/dist/index.d.ts +78 -83
- package/node_modules/@gdh/core/dist/index.d.ts.map +1 -1
- package/node_modules/@gdh/core/dist/index.js +4 -4
- 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/dist/agent-contract.js +1 -1
- package/node_modules/@gdh/docs/dist/agent-contract.js.map +1 -1
- package/node_modules/@gdh/docs/dist/guidance.d.ts.map +1 -1
- package/node_modules/@gdh/docs/dist/guidance.js +84 -15
- package/node_modules/@gdh/docs/dist/guidance.js.map +1 -1
- package/node_modules/@gdh/docs/dist/rules.js +3 -3
- package/node_modules/@gdh/docs/dist/rules.js.map +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/dist/guidance-audit.d.ts.map +1 -1
- package/node_modules/@gdh/observability/dist/guidance-audit.js +1 -50
- package/node_modules/@gdh/observability/dist/guidance-audit.js.map +1 -1
- package/node_modules/@gdh/observability/package.json +2 -2
- package/node_modules/@gdh/runtime/dist/bridge-broker-contract.d.ts +23 -0
- package/node_modules/@gdh/runtime/dist/bridge-broker-contract.d.ts.map +1 -0
- package/node_modules/@gdh/runtime/dist/bridge-broker-contract.js +120 -0
- package/node_modules/@gdh/runtime/dist/bridge-broker-contract.js.map +1 -0
- package/node_modules/@gdh/runtime/dist/index.d.ts +2 -1
- package/node_modules/@gdh/runtime/dist/index.d.ts.map +1 -1
- package/node_modules/@gdh/runtime/dist/index.js +28 -62
- package/node_modules/@gdh/runtime/dist/index.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/dist/index.d.ts +0 -1
- package/node_modules/@gdh/verify/dist/index.d.ts.map +1 -1
- package/node_modules/@gdh/verify/dist/index.js +1 -2
- package/node_modules/@gdh/verify/dist/index.js.map +1 -1
- package/node_modules/@gdh/verify/package.json +7 -7
- package/package.json +11 -11
|
@@ -0,0 +1,431 @@
|
|
|
1
|
+
const PREVIEW_HEADER_LITERAL = "Preview (dry-run) — not applied";
|
|
2
|
+
const ONBOARD_TERMS = [
|
|
3
|
+
"`target`: the Godot project root GDH should inspect or manage.",
|
|
4
|
+
"`onboard`: first-time GDH setup that writes durable `.gdh/` project truth, generated agent surfaces, and derived `.gdh-state/` inventory.",
|
|
5
|
+
"`authoring`: editing or validating Godot-facing files such as `.gd`, `.tscn`, `.tres`, and `project.godot`.",
|
|
6
|
+
"`readiness`: GDH's structured status for whether the target is detected, onboarded, authorable, blocked, degraded, or unavailable.",
|
|
7
|
+
"`inventory cache`: `.gdh-state/inventory.json`, derived machine-local project discovery data.",
|
|
8
|
+
"`target prepare`: GDH's worktree/import readiness check; it can report a cold worktree before validation is trustworthy.",
|
|
9
|
+
"`guidance status`: GDH's report for generated `docs/agent/` guidance visibility and freshness.",
|
|
10
|
+
"`run config`: a project-owned GDH recipe for launching the game or related processes.",
|
|
11
|
+
"`verification scenario`: a project-owned runtime proof recipe that can be run after a run config launches.",
|
|
12
|
+
"`machine-local path`: a path valid only on this computer, such as the Godot editor binary path; keep it in `.gdh-state/`, not committed config.",
|
|
13
|
+
];
|
|
14
|
+
const STATUS_TERMS = [
|
|
15
|
+
"`readiness`: the structured GDH answer for whether the target can be used normally, needs migration, or is degraded.",
|
|
16
|
+
"`capability`: an available GDH feature surface such as scan, authoring readiness, or authoring LSP lifecycle.",
|
|
17
|
+
"`recoveryHints`: GDH-provided routing for known problems; prefer it over guessed commands.",
|
|
18
|
+
"`projectLifecycle.state`: compatibility state for managed GDH project surfaces.",
|
|
19
|
+
"`runtimeKnowledge`: status for `.gdh/runtime-knowledge/`, where project-owned scene routes, waypoints, transitions, and runtime notes live.",
|
|
20
|
+
"`inventory cache`: `.gdh-state/inventory.json`; the status command reads it or falls back to live scan, but does not write it.",
|
|
21
|
+
"`validation evidence`: diagnostics from the GDH authoring-check command; capability availability alone is not validation evidence.",
|
|
22
|
+
];
|
|
23
|
+
const SCAN_TERMS = [
|
|
24
|
+
"`inventory`: discovered Godot projects, addons, scenes, tests, and related filesystem evidence.",
|
|
25
|
+
"`inventory cache`: `.gdh-state/inventory.json`, derived machine-local discovery data used by onboarded targets.",
|
|
26
|
+
"`persisted`: the scan stdout field that says whether the inventory cache was created, overwritten, unchanged, or not written.",
|
|
27
|
+
"`onboarded target`: a target with durable `.gdh/project.yaml`; only onboarded targets have a GDH inventory cache to update.",
|
|
28
|
+
"`discovery evidence`: filesystem facts from scan; it is not readiness or code-validity proof.",
|
|
29
|
+
];
|
|
30
|
+
const MIGRATE_TERMS = [
|
|
31
|
+
"`migration preview`: dry-run migrate output; it describes what would change, not what already changed.",
|
|
32
|
+
"`managed surface`: a GDH-owned or GDH-merge-managed file such as guidance, rules, agent adapters, MCP config, or runtime bridge output.",
|
|
33
|
+
"`terminal.state`: the structured migrate/apply outcome (`healthy`, `follow_up_required`, `manual_review_required`, or `blocked`).",
|
|
34
|
+
"`manual review`: project-owned judgment GDH cannot safely automate; stop for the user after surfaced commands and validations.",
|
|
35
|
+
"`validationCommands`: exact GDH-surfaced commands to run after apply or follow-up work.",
|
|
36
|
+
];
|
|
37
|
+
const UPDATE_TERMS = [
|
|
38
|
+
"`pin`: the project-selected GDH npm version baked into managed agent and MCP surfaces.",
|
|
39
|
+
"`self-update`: GDH's update flow that previews, bumps the pin, and re-bakes managed surfaces.",
|
|
40
|
+
"`managed surface`: a GDH-owned or GDH-merge-managed file that must match the selected GDH version.",
|
|
41
|
+
"`stale MCP session`: a long-lived GDH MCP process still running the old package version after an update.",
|
|
42
|
+
"`drift verification`: `gdh verify drift`, the baked managed-surface pin audit; it is not lifecycle, runtime, or bridge validation.",
|
|
43
|
+
"`terminal.state`: the structured apply outcome; use it instead of prose or action count guesses.",
|
|
44
|
+
];
|
|
45
|
+
const CHECK_TERMS = [
|
|
46
|
+
"`authoring`: editing or validating Godot-facing files such as `.gd`, `.tscn`, `.tres`, and `project.godot`.",
|
|
47
|
+
"`authoring check`: the GDH command that collects validator diagnostics and blocking summaries.",
|
|
48
|
+
"`validation evidence`: concrete diagnostics from validators; LSP lifecycle health alone is not evidence.",
|
|
49
|
+
"`LSP lifecycle`: whether GDH can launch, reuse, or clean up the editor-backed Godot LSP service.",
|
|
50
|
+
"`validator family`: the source of diagnostics, such as `gdscript_lsp` for `.gd` or `godot_scene_resource` for `.tscn`/`.tres`.",
|
|
51
|
+
"`blockingSummary`: the authoring-check decision about whether errors or configured warnings block completion.",
|
|
52
|
+
];
|
|
53
|
+
const PREPARE_TERMS = [
|
|
54
|
+
"`target`: the Godot project root GDH should prepare.",
|
|
55
|
+
"`authoring`: editing or validating Godot-facing files such as `.gd`, `.tscn`, `.tres`, and `project.godot`.",
|
|
56
|
+
"`cold worktree`: a checkout/worktree whose generated Godot editor/import state is missing, stale, or incomplete.",
|
|
57
|
+
"`.godot/ generated state`: Godot's editor/import cache; useful for validation, but not durable project truth.",
|
|
58
|
+
"`hydration`: copying reusable `.godot/` generated state from another local checkout to make this worktree ready faster.",
|
|
59
|
+
"`import refresh`: running Godot to rebuild or update generated import state for the target.",
|
|
60
|
+
"`source target`: a sibling checkout used as the source for `.godot/` hydration.",
|
|
61
|
+
];
|
|
62
|
+
function pin(version, mode = "pinned") {
|
|
63
|
+
return mode === "latest" ? "npx -y @skillcap/gdh@latest" : `npx -y @skillcap/gdh@${version}`;
|
|
64
|
+
}
|
|
65
|
+
export const GDH_SKILL_DEFINITIONS = {
|
|
66
|
+
onboard: {
|
|
67
|
+
id: "onboard",
|
|
68
|
+
name: "gdh-onboard",
|
|
69
|
+
description: "Finish GDH setup handoff and report project readiness",
|
|
70
|
+
objective: "Finish the first-time GDH handoff after `gdh setup` and turn the generated GDH surface into a trustworthy starting point for real work.",
|
|
71
|
+
terms: ONBOARD_TERMS,
|
|
72
|
+
claudeTools: ["Read", "Grep", "Glob", "Bash", "AskUserQuestion"],
|
|
73
|
+
userQuestions: [
|
|
74
|
+
"Ask only narrow follow-up questions when GDH cannot infer the missing setup fact safely.",
|
|
75
|
+
"If structured user-input tooling is unavailable, ask concise plain-text questions instead.",
|
|
76
|
+
],
|
|
77
|
+
process: (version) => [
|
|
78
|
+
`Confirm the selected target and current GDH state with \`${pin(version)} status\`.`,
|
|
79
|
+
"Read `.gdh/project.yaml`, `docs/agent/README.md`, and `docs/agent/00-gdh-onboarding.md` before asking for facts GDH already knows.",
|
|
80
|
+
`Check immediate readiness with \`${pin(version)} guidance status\` and \`${pin(version)} target prepare --dry-run\`.`,
|
|
81
|
+
"If `target prepare --dry-run` reports cold, missing, or stale generated Godot state, ask for a reusable sibling checkout before using `target prepare --source-target <path>`; do not guess a source target.",
|
|
82
|
+
"If `status` reports an incompatible lifecycle, missing project config, or blocking setup reason, stop broad probing and surface GDH recovery hints before running optional authoring/runtime inventory commands.",
|
|
83
|
+
`Run \`${pin(version)} authoring check\` only when structured GDH status shows authoring capability is available or degraded; say why it was skipped when it is unavailable.`,
|
|
84
|
+
`Run \`${pin(version)} lsp status\` only when \`authoring check\` reports LSP unavailable/degraded, changed files include \`.gd\`, or the user explicitly asks about LSP. Treat this as lifecycle visibility only, never as code-validity evidence.`,
|
|
85
|
+
`Inspect \`${pin(version)} run-config list\` and \`${pin(version)} verification-scenario list\` and call out anything draft, missing, or blocked.`,
|
|
86
|
+
"If GDH reports `godot_editor_not_configured`, explain that the Godot binary path is machine-local; ask for the local path and explicit permission before recording `.gdh-state/local-paths.json` `godotEditorBinPath`.",
|
|
87
|
+
"Ask the human only for narrow unresolved environment or target facts.",
|
|
88
|
+
"End with a concise readiness summary and the exact next development step.",
|
|
89
|
+
],
|
|
90
|
+
rules: () => [
|
|
91
|
+
"Do not start editing code during `/gdh-onboard` unless the human explicitly asks.",
|
|
92
|
+
"Prefer GDH structured surfaces over repo guesswork.",
|
|
93
|
+
"Keep output short, operational, and specific.",
|
|
94
|
+
"For cache/persistence behavior of scan, status, onboard: see `docs/agent/persistence-semantics.md`.",
|
|
95
|
+
],
|
|
96
|
+
},
|
|
97
|
+
status: {
|
|
98
|
+
id: "status",
|
|
99
|
+
name: "gdh-status",
|
|
100
|
+
description: "Check GDH project readiness, surface migration needs, and suggest next step",
|
|
101
|
+
objective: "Check GDH project readiness, surface migration needs, and suggest the most productive next step.",
|
|
102
|
+
terms: STATUS_TERMS,
|
|
103
|
+
claudeTools: ["Read", "Grep", "Glob", "Bash"],
|
|
104
|
+
userQuestions: [
|
|
105
|
+
"Ask only narrow follow-up questions when GDH cannot infer the missing fact safely.",
|
|
106
|
+
"If structured user-input tooling is unavailable, ask concise plain-text questions instead.",
|
|
107
|
+
],
|
|
108
|
+
process: (version) => [
|
|
109
|
+
`Run \`${pin(version)} status\` and parse the stdout JSON. Treat stderr/prose as context only; do not infer readiness from it.`,
|
|
110
|
+
"Build a compact structured summary with these fields: `readiness`, `projectLifecycle.state`, `projectLifecycle.blockingReasons`, `projectLifecycle.coupledReasons`, `recoveryHints`, notable `capabilities`, `runtimeKnowledge.state`, and one agent-chosen `recommendedNextStep` derived from those fields.",
|
|
111
|
+
"Remember status is cache-consuming, not cache-writing: it reads `.gdh-state/inventory.json` when usable and falls back to a live scan when the cache is missing, corrupt, or schema-mismatched.",
|
|
112
|
+
"Use `recoveryHints` as the first source for action routing. If a blocking reason has no recovery hint, report the reason literally and avoid inventing a command.",
|
|
113
|
+
`Run \`${pin(version)} migrate\` as a dry-run only when \`projectLifecycle.coupledReasons\` is non-empty, \`projectLifecycle.state\` is not \`compatible\`, or the status payload otherwise indicates pending migration work.`,
|
|
114
|
+
`${PREVIEW_HEADER_LITERAL} — migrate output at this step describes planned actions ("would delete ...") not applied ones ("deleted").`,
|
|
115
|
+
"Surface degraded/unavailable capabilities, including operational/diagnostic capability fields when present.",
|
|
116
|
+
"Do not treat capability availability as validation evidence. If the user needs code validity evidence, route to `/gdh-check`.",
|
|
117
|
+
"Suggest one most productive next step based on the structured fields; do not claim GDH emitted a top-level `nextStep` field.",
|
|
118
|
+
],
|
|
119
|
+
rules: () => [
|
|
120
|
+
"Do not start editing code.",
|
|
121
|
+
"Prefer structured GDH surfaces over repo guesswork.",
|
|
122
|
+
"Keep output short and operational.",
|
|
123
|
+
"For cache/persistence behavior of scan, status, onboard: see `docs/agent/persistence-semantics.md`.",
|
|
124
|
+
],
|
|
125
|
+
},
|
|
126
|
+
scan: {
|
|
127
|
+
id: "scan",
|
|
128
|
+
name: "gdh-scan",
|
|
129
|
+
description: "Discover Godot project inventory and explain cache persistence",
|
|
130
|
+
shortDescription: "Discover inventory and cache effect",
|
|
131
|
+
objective: "Discover Godot project inventory and explain whether the inventory cache (`.gdh-state/inventory.json`) was written.",
|
|
132
|
+
terms: SCAN_TERMS,
|
|
133
|
+
claudeTools: ["Read", "Grep", "Glob", "Bash"],
|
|
134
|
+
userQuestions: [
|
|
135
|
+
"Ask only narrow follow-up questions when GDH cannot infer the missing fact safely.",
|
|
136
|
+
"If structured user-input tooling is unavailable, ask concise plain-text questions instead.",
|
|
137
|
+
],
|
|
138
|
+
process: (version) => [
|
|
139
|
+
`Run \`${pin(version)} scan\` and parse the stdout JSON envelope \`{ inventory, persisted }\`.`,
|
|
140
|
+
"Treat the inventory cache as `.gdh-state/inventory.json`; do not assume the user or agent already knows that term.",
|
|
141
|
+
"If `persisted` is non-null, check `persisted.mode`: `create`, `unchanged`, or `overwrite`, and report `persisted.relativePath`.",
|
|
142
|
+
"If `persisted` is `null`, explain that no onboarded ancestor was found, so the scan was stdout-only and no cache was written.",
|
|
143
|
+
"Summarize: detected projects, key inventory evidence, persistence result, cache path when present, and one next step (`/gdh-onboard`, `/gdh-status`, or none).",
|
|
144
|
+
],
|
|
145
|
+
rules: () => [
|
|
146
|
+
"Do not edit the persisted inventory directly.",
|
|
147
|
+
"The scan command is discovery/cache evidence, not readiness or validation proof.",
|
|
148
|
+
"Do not run scan before status unless the user asked for fresh inventory, project files changed, setup/onboarding needs discovery, or cache freshness is in question.",
|
|
149
|
+
"For cache/persistence behavior of scan, status, onboard: see `docs/agent/persistence-semantics.md`.",
|
|
150
|
+
],
|
|
151
|
+
},
|
|
152
|
+
migrate: {
|
|
153
|
+
id: "migrate",
|
|
154
|
+
name: "gdh-migrate",
|
|
155
|
+
description: "Preview and apply GDH project migrations",
|
|
156
|
+
objective: "Preview and apply GDH project migrations safely with explicit user approval.",
|
|
157
|
+
terms: MIGRATE_TERMS,
|
|
158
|
+
claudeTools: ["Read", "Grep", "Glob", "Bash", "AskUserQuestion"],
|
|
159
|
+
claudeManualOnly: true,
|
|
160
|
+
userQuestions: [
|
|
161
|
+
"Always ask before applying migrations.",
|
|
162
|
+
"If structured user-input tooling is unavailable, ask concise plain-text questions instead.",
|
|
163
|
+
],
|
|
164
|
+
process: (version) => [
|
|
165
|
+
`Run \`${pin(version)} migrate\` to preview pending migrations (this is a dry-run; the stdout JSON \`mode\` field will be \`"preview"\`).`,
|
|
166
|
+
"Parse stdout JSON as the source of truth. If the command exits non-zero but stdout contains JSON, still classify that JSON; treat stderr or prose as context only.",
|
|
167
|
+
'Confirm `mode` is `"preview"`. If stdout is not parseable JSON or the mode is missing, stop and report that the migration contract could not be read.',
|
|
168
|
+
"Summarize `state`, `changedActionCount`, `actionCounts`, `compatibility.blockingReasons`, `compatibility.coupledReasons`, and `terminal.state`.",
|
|
169
|
+
'Summarize each `actions[]` entry using its exact `id`, `kind`, `state`, `relativePath`, `summary`, `reasons`, `command`, `validationCommands`, and `manualSteps` fields when present. In preview, use "would" verb forms: "would delete", "would create", "would refresh".',
|
|
170
|
+
"If preview `state` is `noop` or `changedActionCount` is `0` and `terminal.state` is `healthy`, say no migration apply is needed and stop.",
|
|
171
|
+
"If preview `state` is `blocked`, do not offer or run migrate apply. Surface `terminal.summary`, reasons, `terminal.commands`, `terminal.validationCommands`, and `terminal.manualSteps`; run only exact surfaced auto-applicable commands if the user approves them, and do not invent `/gdh-update` or repo-local repair steps.",
|
|
172
|
+
`Otherwise, offer to run \`${pin(version)} migrate --apply\` if the user explicitly approves. Do not treat the preview as already applied.`,
|
|
173
|
+
'After apply, parse stdout JSON again, confirm `mode` is `"applied"`, and switch to past-tense summaries only for actions whose returned `state` is `applied`.',
|
|
174
|
+
"After apply, classify the outcome from `terminal.state`, not from stderr, action count alone, or prose summaries.",
|
|
175
|
+
"If `terminal.state` is `healthy`, confirm no further migration action is required and stop.",
|
|
176
|
+
"If `terminal.state` is `follow_up_required`, run the surfaced `terminal.commands`, then run the surfaced `terminal.validationCommands`, and confirm the follow-up results before stopping.",
|
|
177
|
+
"If `terminal.state` is `manual_review_required`, run any surfaced `terminal.commands` first because they are auto-applicable, then run surfaced `terminal.validationCommands` when useful for current-state evidence, explain the remaining `terminal.manualSteps`, and stop for review instead of improvising a repair.",
|
|
178
|
+
"If `terminal.state` is `blocked`, surface `terminal.summary` plus the reasons and stop.",
|
|
179
|
+
],
|
|
180
|
+
rules: (version) => [
|
|
181
|
+
"Never apply migrations without explicit user approval.",
|
|
182
|
+
"Show the dry-run output first.",
|
|
183
|
+
`When a surfaced command array starts with \`gdh\`, execute the equivalent pinned package command with \`${pin(version)}\` and preserve the remaining arguments.`,
|
|
184
|
+
"Run only GDH-surfaced commands and validation commands; do not substitute guessed recovery commands.",
|
|
185
|
+
"Keep explanations concise.",
|
|
186
|
+
],
|
|
187
|
+
},
|
|
188
|
+
update: {
|
|
189
|
+
id: "update",
|
|
190
|
+
name: "gdh-update",
|
|
191
|
+
description: "Update GDH to npm latest (bump pinned version + re-bake managed surfaces)",
|
|
192
|
+
shortDescription: "Update GDH to npm latest",
|
|
193
|
+
objective: "Update this project's GDH pinning to npm latest and re-bake every managed surface at the new pin.",
|
|
194
|
+
terms: UPDATE_TERMS,
|
|
195
|
+
versionMode: "latest",
|
|
196
|
+
claudeTools: ["Read", "Bash"],
|
|
197
|
+
claudeManualOnly: true,
|
|
198
|
+
process: () => [
|
|
199
|
+
"Preview: run `npx -y @skillcap/gdh@latest self-update [version] --dry-run --target <target>` when the target is not the current directory; omit `[version]` to preview against npm latest.",
|
|
200
|
+
"Parse stdout JSON as the source of truth even if the command exits non-zero; stderr/prose is context only. If stdout JSON is absent or invalid, stop and report that the update contract could not be read.",
|
|
201
|
+
"Read the `preview` field in the stdout JSON. If `preview.state` is `blocked`, surface the issues and stop. If `preview.state` is `noop`, explain the project is already at the target version and stop.",
|
|
202
|
+
"When `preview.state` is `ready`, summarize the current version, target version, intervening releases, bounded release highlights, ordered steps, and which work is `mechanical`, `agent_reasoning`, or `manual_review`.",
|
|
203
|
+
"Ask for explicit approval before apply.",
|
|
204
|
+
"Apply: run `npx -y @skillcap/gdh@latest self-update [version] --target <target>` when needed (omit `[version]` to apply against npm latest; forward whatever positional the user passed to `/gdh-update`).",
|
|
205
|
+
"Parse the apply stdout JSON even when the command exits non-zero, because `manual_review_required` and `follow_up_required` can intentionally return a nonzero exit while still carrying the terminal contract.",
|
|
206
|
+
"Read `terminal.state` in the apply stdout JSON before running extra validation and treat it as the lifecycle/runtime truth.",
|
|
207
|
+
"If this chat or editor keeps a long-lived GDH MCP session alive, do MCP cleanup before trusting MCP follow-up output: stop stale `gdh mcp serve` / `@skillcap/gdh ... mcp serve` processes only after checking the process command/cwd/target belongs to this target, then let the next MCP connection restart from updated config. If ownership cannot be proven or the client owns reconnection, report that limitation and ask the user to restart or refresh the host agent session.",
|
|
208
|
+
"Verify baked pinning after apply or surfaced follow-up commands: run `npx -y @skillcap/gdh@latest verify drift <target>` to confirm every managed skill and hook surface matches the new pin. This does not validate runtime bridge, lifecycle, or code validity.",
|
|
209
|
+
"If `terminal.state` is `healthy`, confirm the update completed and stop.",
|
|
210
|
+
"If `terminal.state` is `follow_up_required`, run the surfaced `terminal.commands`, then run the surfaced `terminal.validationCommands`, and confirm the follow-up results before stopping.",
|
|
211
|
+
"If `terminal.state` is `manual_review_required`, run any surfaced `terminal.commands` first because they are auto-applicable, then run the surfaced `terminal.validationCommands`, explain the remaining `terminal.manualSteps`, and stop for review instead of inventing a repair.",
|
|
212
|
+
"If `terminal.state` is `blocked`, surface `terminal.summary` plus the reasons and stop.",
|
|
213
|
+
],
|
|
214
|
+
rules: () => [
|
|
215
|
+
"Do ask for explicit approval after the structured preview and before apply.",
|
|
216
|
+
"Do not invent migration steps from prose docs; use the machine-readable `preview` payload.",
|
|
217
|
+
"Do treat `terminal.state` as the primary apply truth; the additive compatibility fields are not the main follow-through contract.",
|
|
218
|
+
"`terminal.commands` contains only GDH-classified auto-applicable follow-up; project-owned review stays in `terminal.manualSteps`.",
|
|
219
|
+
"When a surfaced command array starts with `gdh`, execute the equivalent latest package command with `npx -y @skillcap/gdh@latest` and preserve the remaining arguments.",
|
|
220
|
+
"Bake literal `@latest` in the shellout so the new CLI performs the update, not the old one.",
|
|
221
|
+
"If `self-update` returns `rolled_back` or `blocked`, surface the failure reason and stop (do not retry).",
|
|
222
|
+
"If `self-update` returns `skipped_dev_mode`, explain that dev-from-source mode bypasses pinning; no action needed.",
|
|
223
|
+
],
|
|
224
|
+
},
|
|
225
|
+
check: {
|
|
226
|
+
id: "check",
|
|
227
|
+
name: "gdh-check",
|
|
228
|
+
description: "Run GDH authoring checks and explain diagnostics",
|
|
229
|
+
objective: "Run GDH authoring checks and explain diagnostics in human-readable terms.",
|
|
230
|
+
terms: CHECK_TERMS,
|
|
231
|
+
claudeTools: ["Read", "Grep", "Glob", "Bash"],
|
|
232
|
+
userQuestions: [
|
|
233
|
+
"Ask only narrow follow-up questions when GDH cannot infer the missing fact safely.",
|
|
234
|
+
"If structured user-input tooling is unavailable, ask concise plain-text questions instead.",
|
|
235
|
+
],
|
|
236
|
+
process: (version) => [
|
|
237
|
+
`Run \`${pin(version)} authoring check --mode final\` to collect validator evidence (the gdh authoring check).`,
|
|
238
|
+
`Run \`${pin(version)} lsp status\` only when authoring check reports LSP degraded/unavailable, changed files include \`.gd\`, or the user explicitly asks about LSP lifecycle.`,
|
|
239
|
+
"Explain each diagnostic finding with severity, provenance, and validator family (`gdscript_lsp` for `.gd`, `godot_scene_resource` for `.tscn`/`.tres`).",
|
|
240
|
+
"Report `blockingSummary`: errors block by default, warnings are informational unless project guidance or `--severity-policy all` says otherwise.",
|
|
241
|
+
"Surface any import-state caveats or editor-side warnings.",
|
|
242
|
+
`If stale managed LSP state is suspected, use bounded GDH cleanup such as \`${pin(version)} lsp doctor\`, \`${pin(version)} lsp restart\`, \`${pin(version)} lsp prune\`, or \`${pin(version)} lsp stop\`; do not hand-manage Godot LSP processes.`,
|
|
243
|
+
"If issues found, suggest concrete remediation steps.",
|
|
244
|
+
],
|
|
245
|
+
rules: () => [
|
|
246
|
+
"Do not fix issues automatically unless asked.",
|
|
247
|
+
"Do not hand-manage Godot LSP processes; use GDH lifecycle commands.",
|
|
248
|
+
"LSP lifecycle health is not diagnostic evidence; use authoring-check diagnostics for code-validity evidence.",
|
|
249
|
+
"The gdh lsp lifecycle commands are status, check, doctor, restart, prune, and stop.",
|
|
250
|
+
"Explain diagnostics in human-readable terms.",
|
|
251
|
+
"A ready `authoring.lsp` lifecycle is not proof that the authoring check collected diagnostics.",
|
|
252
|
+
"For agent hooks, post-edit checks should use `authoring check --mode post-edit --changed <path> --format compact`; final/stop checks should use `authoring check --mode final`.",
|
|
253
|
+
"Report both hard failures and informational caveats.",
|
|
254
|
+
],
|
|
255
|
+
},
|
|
256
|
+
prepare: {
|
|
257
|
+
id: "prepare",
|
|
258
|
+
name: "gdh-prepare",
|
|
259
|
+
description: "Prepare a Godot target for authoring or runtime work",
|
|
260
|
+
objective: "Prepare a Godot target for authoring or runtime work using GDH target preparation.",
|
|
261
|
+
terms: PREPARE_TERMS,
|
|
262
|
+
claudeTools: ["Read", "Grep", "Glob", "Bash", "AskUserQuestion"],
|
|
263
|
+
userQuestions: [
|
|
264
|
+
"Ask before running preparation if the user has not explicitly approved.",
|
|
265
|
+
"If structured user-input tooling is unavailable, ask concise plain-text questions instead.",
|
|
266
|
+
],
|
|
267
|
+
process: (version) => [
|
|
268
|
+
`Run \`${pin(version)} target prepare --dry-run [target]\` first to preview planned actions. Include an explicit target path when the current working directory is not the Godot target root.`,
|
|
269
|
+
"Parse stdout JSON as the source of truth. Read `state`, `summary`, `reasons`, `actions[]`, `sourceTargets`, `selectedSourceTargetPath`, and `importRefresh`.",
|
|
270
|
+
"Explain what `.godot` hydration and import refresh would do, using the structured action fields rather than prose guesses.",
|
|
271
|
+
"If dry-run `state` is `blocked`, do not run apply yet. Surface the blocking reasons and the concrete next fix.",
|
|
272
|
+
"If the only blocker is `godot_editor_not_configured`, explain that the Godot editor path is machine-local; ask for the local path and explicit permission before recording `.gdh-state/local-paths.json` `godotEditorBinPath`.",
|
|
273
|
+
"If a cold worktree has a reusable sibling checkout, explain `--source-target <path>` or `.gdh-state/local-paths.json` `sourceTargets`; GDH copies only `.godot/`, not project env files.",
|
|
274
|
+
`If the user approves and dry-run is not blocked, run \`${pin(version)} target prepare [target]\` with the same target/source options.`,
|
|
275
|
+
`Verify preparation state with \`${pin(version)} status [target]\`. If the user needs code-validity evidence, route to \`/gdh-check\`.`,
|
|
276
|
+
],
|
|
277
|
+
rules: () => [
|
|
278
|
+
"Always show dry-run first.",
|
|
279
|
+
"Do not treat command exit code 0 as success; `state` in stdout JSON decides whether preparation is ready or blocked.",
|
|
280
|
+
"A `hydrate_godot_state` action can be blocked while overall `state` is `ready` when import refresh can rebuild generated state; do not misreport that as failure.",
|
|
281
|
+
"Do not skip import refresh with `--no-refresh-imports` unless the user explicitly asked or there is a concrete reason, and report that reason.",
|
|
282
|
+
"Do not write machine-local paths into committed project config.",
|
|
283
|
+
],
|
|
284
|
+
},
|
|
285
|
+
};
|
|
286
|
+
export const GDH_SKILL_IDS = Object.keys(GDH_SKILL_DEFINITIONS);
|
|
287
|
+
export const GDH_MANAGED_AGENT_SKILL_MARKER = "GDH_MANAGED_AGENT_SKILL";
|
|
288
|
+
export function renderGdhSkill(agent, skillId, pinnedVersion) {
|
|
289
|
+
const definition = GDH_SKILL_DEFINITIONS[skillId];
|
|
290
|
+
const lines = [
|
|
291
|
+
...renderFrontmatter(agent, definition),
|
|
292
|
+
"",
|
|
293
|
+
`<!-- ${GDH_MANAGED_AGENT_SKILL_MARKER} v1 agent=${agent} skill=${definition.name} -->`,
|
|
294
|
+
"",
|
|
295
|
+
"## Invocation",
|
|
296
|
+
...renderInvocation(agent, definition),
|
|
297
|
+
"",
|
|
298
|
+
"## Objective",
|
|
299
|
+
definition.objective.replace("`gdh setup`", `\`${pin(pinnedVersion)} setup\``),
|
|
300
|
+
...(definition.id === "update"
|
|
301
|
+
? [
|
|
302
|
+
"Treat any positional argument (e.g., `/gdh-update 0.6.0`) as an explicit version; otherwise default to npm latest.",
|
|
303
|
+
]
|
|
304
|
+
: []),
|
|
305
|
+
"",
|
|
306
|
+
"## Terms Used Here",
|
|
307
|
+
...definition.terms.map((term) => `- ${term}`),
|
|
308
|
+
"",
|
|
309
|
+
"## Process",
|
|
310
|
+
"Follow this order:",
|
|
311
|
+
"",
|
|
312
|
+
...definition.process(pinnedVersion).map((step, index) => `${index + 1}. ${step}`),
|
|
313
|
+
"",
|
|
314
|
+
"## Rules",
|
|
315
|
+
...definition.rules(pinnedVersion).map((rule) => `- ${rule}`),
|
|
316
|
+
"",
|
|
317
|
+
];
|
|
318
|
+
return `${lines.join("\n")}`;
|
|
319
|
+
}
|
|
320
|
+
export function renderManagedSkillMarker(agent, skillName) {
|
|
321
|
+
return `<!-- ${GDH_MANAGED_AGENT_SKILL_MARKER} v1 agent=${agent} skill=${skillName} -->`;
|
|
322
|
+
}
|
|
323
|
+
function renderFrontmatter(agent, definition) {
|
|
324
|
+
if (agent === "codex") {
|
|
325
|
+
return [
|
|
326
|
+
"---",
|
|
327
|
+
`name: "${definition.name}"`,
|
|
328
|
+
`description: "${definition.description}"`,
|
|
329
|
+
"metadata:",
|
|
330
|
+
` short-description: "${definition.shortDescription ?? definition.description}"`,
|
|
331
|
+
"---",
|
|
332
|
+
];
|
|
333
|
+
}
|
|
334
|
+
if (agent === "cursor") {
|
|
335
|
+
return ["---", `name: ${definition.name}`, `description: "${definition.description}"`, "---"];
|
|
336
|
+
}
|
|
337
|
+
const frontmatter = [
|
|
338
|
+
"---",
|
|
339
|
+
`name: ${definition.name}`,
|
|
340
|
+
`description: ${definition.description}`,
|
|
341
|
+
];
|
|
342
|
+
if (definition.claudeManualOnly === true) {
|
|
343
|
+
frontmatter.push("disable-model-invocation: true");
|
|
344
|
+
}
|
|
345
|
+
if (definition.claudeTools.length > 0) {
|
|
346
|
+
frontmatter.push("allowed-tools:");
|
|
347
|
+
frontmatter.push(...definition.claudeTools.map((tool) => ` - ${tool}`));
|
|
348
|
+
}
|
|
349
|
+
frontmatter.push("---");
|
|
350
|
+
return frontmatter;
|
|
351
|
+
}
|
|
352
|
+
function renderInvocation(agent, definition) {
|
|
353
|
+
const mention = agent === "codex" ? `$${definition.name}` : agent === "cursor" ? definition.name : `/${definition.name}`;
|
|
354
|
+
const lines = [
|
|
355
|
+
`- This skill is invoked when the user says \`/${definition.name}\` or mentions \`${mention}\`.`,
|
|
356
|
+
];
|
|
357
|
+
if (definition.id === "update") {
|
|
358
|
+
lines.push("- Treat any positional argument (e.g., `/gdh-update 0.6.0`) as an explicit version; otherwise default to npm latest.");
|
|
359
|
+
}
|
|
360
|
+
else {
|
|
361
|
+
lines.push(`- Treat any extra user text as additional ${definition.id} context.`);
|
|
362
|
+
}
|
|
363
|
+
if (definition.userQuestions !== undefined) {
|
|
364
|
+
lines.push("", "### User Questions", ...definition.userQuestions.map((line) => `- ${line}`));
|
|
365
|
+
}
|
|
366
|
+
return lines;
|
|
367
|
+
}
|
|
368
|
+
export function renderClaudeOnboardSkill(pinnedVersion) {
|
|
369
|
+
return renderGdhSkill("claude", "onboard", pinnedVersion);
|
|
370
|
+
}
|
|
371
|
+
export function renderCodexOnboardSkill(pinnedVersion) {
|
|
372
|
+
return renderGdhSkill("codex", "onboard", pinnedVersion);
|
|
373
|
+
}
|
|
374
|
+
export function renderCursorOnboardSkill(pinnedVersion) {
|
|
375
|
+
return renderGdhSkill("cursor", "onboard", pinnedVersion);
|
|
376
|
+
}
|
|
377
|
+
export function renderClaudeStatusSkill(pinnedVersion) {
|
|
378
|
+
return renderGdhSkill("claude", "status", pinnedVersion);
|
|
379
|
+
}
|
|
380
|
+
export function renderCodexStatusSkill(pinnedVersion) {
|
|
381
|
+
return renderGdhSkill("codex", "status", pinnedVersion);
|
|
382
|
+
}
|
|
383
|
+
export function renderCursorStatusSkill(pinnedVersion) {
|
|
384
|
+
return renderGdhSkill("cursor", "status", pinnedVersion);
|
|
385
|
+
}
|
|
386
|
+
export function renderClaudeScanSkill(pinnedVersion) {
|
|
387
|
+
return renderGdhSkill("claude", "scan", pinnedVersion);
|
|
388
|
+
}
|
|
389
|
+
export function renderCodexScanSkill(pinnedVersion) {
|
|
390
|
+
return renderGdhSkill("codex", "scan", pinnedVersion);
|
|
391
|
+
}
|
|
392
|
+
export function renderCursorScanSkill(pinnedVersion) {
|
|
393
|
+
return renderGdhSkill("cursor", "scan", pinnedVersion);
|
|
394
|
+
}
|
|
395
|
+
export function renderClaudeMigrateSkill(pinnedVersion) {
|
|
396
|
+
return renderGdhSkill("claude", "migrate", pinnedVersion);
|
|
397
|
+
}
|
|
398
|
+
export function renderCodexMigrateSkill(pinnedVersion) {
|
|
399
|
+
return renderGdhSkill("codex", "migrate", pinnedVersion);
|
|
400
|
+
}
|
|
401
|
+
export function renderCursorMigrateSkill(pinnedVersion) {
|
|
402
|
+
return renderGdhSkill("cursor", "migrate", pinnedVersion);
|
|
403
|
+
}
|
|
404
|
+
export function renderClaudeUpdateSkill(pinnedVersion) {
|
|
405
|
+
return renderGdhSkill("claude", "update", pinnedVersion);
|
|
406
|
+
}
|
|
407
|
+
export function renderCodexUpdateSkill(pinnedVersion) {
|
|
408
|
+
return renderGdhSkill("codex", "update", pinnedVersion);
|
|
409
|
+
}
|
|
410
|
+
export function renderCursorUpdateSkill(pinnedVersion) {
|
|
411
|
+
return renderGdhSkill("cursor", "update", pinnedVersion);
|
|
412
|
+
}
|
|
413
|
+
export function renderClaudeCheckSkill(pinnedVersion) {
|
|
414
|
+
return renderGdhSkill("claude", "check", pinnedVersion);
|
|
415
|
+
}
|
|
416
|
+
export function renderCodexCheckSkill(pinnedVersion) {
|
|
417
|
+
return renderGdhSkill("codex", "check", pinnedVersion);
|
|
418
|
+
}
|
|
419
|
+
export function renderCursorCheckSkill(pinnedVersion) {
|
|
420
|
+
return renderGdhSkill("cursor", "check", pinnedVersion);
|
|
421
|
+
}
|
|
422
|
+
export function renderClaudePrepareSkill(pinnedVersion) {
|
|
423
|
+
return renderGdhSkill("claude", "prepare", pinnedVersion);
|
|
424
|
+
}
|
|
425
|
+
export function renderCodexPrepareSkill(pinnedVersion) {
|
|
426
|
+
return renderGdhSkill("codex", "prepare", pinnedVersion);
|
|
427
|
+
}
|
|
428
|
+
export function renderCursorPrepareSkill(pinnedVersion) {
|
|
429
|
+
return renderGdhSkill("cursor", "prepare", pinnedVersion);
|
|
430
|
+
}
|
|
431
|
+
//# sourceMappingURL=skill-rendering.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"skill-rendering.js","sourceRoot":"","sources":["../src/skill-rendering.ts"],"names":[],"mappings":"AA4BA,MAAM,sBAAsB,GAAG,iCAAiC,CAAC;AAEjE,MAAM,aAAa,GAAG;IACpB,gEAAgE;IAChE,2IAA2I;IAC3I,6GAA6G;IAC7G,oIAAoI;IACpI,+FAA+F;IAC/F,0HAA0H;IAC1H,gGAAgG;IAChG,uFAAuF;IACvF,4GAA4G;IAC5G,iJAAiJ;CACzI,CAAC;AAEX,MAAM,YAAY,GAAG;IACnB,sHAAsH;IACtH,+GAA+G;IAC/G,4FAA4F;IAC5F,iFAAiF;IACjF,6IAA6I;IAC7I,gIAAgI;IAChI,oIAAoI;CAC5H,CAAC;AAEX,MAAM,UAAU,GAAG;IACjB,iGAAiG;IACjG,iHAAiH;IACjH,+HAA+H;IAC/H,6HAA6H;IAC7H,+FAA+F;CACvF,CAAC;AAEX,MAAM,aAAa,GAAG;IACpB,wGAAwG;IACxG,yIAAyI;IACzI,mIAAmI;IACnI,gIAAgI;IAChI,yFAAyF;CACjF,CAAC;AAEX,MAAM,YAAY,GAAG;IACnB,wFAAwF;IACxF,+FAA+F;IAC/F,oGAAoG;IACpG,0GAA0G;IAC1G,oIAAoI;IACpI,kGAAkG;CAC1F,CAAC;AAEX,MAAM,WAAW,GAAG;IAClB,6GAA6G;IAC7G,gGAAgG;IAChG,0GAA0G;IAC1G,kGAAkG;IAClG,gIAAgI;IAChI,+GAA+G;CACvG,CAAC;AAEX,MAAM,aAAa,GAAG;IACpB,sDAAsD;IACtD,6GAA6G;IAC7G,kHAAkH;IA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
|
@@ -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.19.1",
|
|
15
|
+
"@gdh/core": "0.19.1",
|
|
16
|
+
"@gdh/docs": "0.19.1",
|
|
17
|
+
"@gdh/observability": "0.19.1",
|
|
18
|
+
"@gdh/runtime": "0.19.1",
|
|
19
|
+
"@gdh/scan": "0.19.1",
|
|
20
|
+
"@gdh/verify": "0.19.1"
|
|
21
21
|
},
|
|
22
|
-
"version": "0.
|
|
22
|
+
"version": "0.19.1"
|
|
23
23
|
}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import type { GdhAuthoringBlockingSummary, GdhAuthoringCheckResult, GdhAuthoringDiagnostic, GdhAuthoringSeverityPolicy } from "@gdh/core";
|
|
2
|
+
export declare function summarizeBlockingDiagnostics(input: {
|
|
3
|
+
readonly status: GdhAuthoringCheckResult["status"];
|
|
4
|
+
readonly diagnostics: readonly GdhAuthoringDiagnostic[];
|
|
5
|
+
readonly policy: GdhAuthoringSeverityPolicy;
|
|
6
|
+
readonly reasons: readonly string[];
|
|
7
|
+
}): GdhAuthoringBlockingSummary;
|
|
8
|
+
//# sourceMappingURL=diagnostics-summary.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"diagnostics-summary.d.ts","sourceRoot":"","sources":["../src/diagnostics-summary.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,2BAA2B,EAC3B,uBAAuB,EACvB,sBAAsB,EACtB,0BAA0B,EAC3B,MAAM,WAAW,CAAC;AAEnB,wBAAgB,4BAA4B,CAAC,KAAK,EAAE;IAClD,QAAQ,CAAC,MAAM,EAAE,uBAAuB,CAAC,QAAQ,CAAC,CAAC;IACnD,QAAQ,CAAC,WAAW,EAAE,SAAS,sBAAsB,EAAE,CAAC;IACxD,QAAQ,CAAC,MAAM,EAAE,0BAA0B,CAAC;IAC5C,QAAQ,CAAC,OAAO,EAAE,SAAS,MAAM,EAAE,CAAC;CACrC,GAAG,2BAA2B,CA2B9B"}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
export function summarizeBlockingDiagnostics(input) {
|
|
2
|
+
const errorCount = input.diagnostics.filter((diagnostic) => diagnostic.severity === "error").length;
|
|
3
|
+
const warningCount = input.diagnostics.filter((diagnostic) => diagnostic.severity === "warning").length;
|
|
4
|
+
const infoCount = input.diagnostics.filter((diagnostic) => diagnostic.severity === "info").length;
|
|
5
|
+
const blockingDiagnosticCount = input.policy === "all" ? input.diagnostics.length : errorCount;
|
|
6
|
+
const unconfirmedReasons = input.status === "degraded" || input.status === "unavailable" ? input.reasons : [];
|
|
7
|
+
const state = unconfirmedReasons.length > 0
|
|
8
|
+
? "unconfirmed"
|
|
9
|
+
: blockingDiagnosticCount > 0
|
|
10
|
+
? "blocked"
|
|
11
|
+
: "allowed";
|
|
12
|
+
return {
|
|
13
|
+
policy: input.policy,
|
|
14
|
+
state,
|
|
15
|
+
errorCount,
|
|
16
|
+
warningCount,
|
|
17
|
+
infoCount,
|
|
18
|
+
blockingDiagnosticCount,
|
|
19
|
+
reasons: unconfirmedReasons,
|
|
20
|
+
};
|
|
21
|
+
}
|
|
22
|
+
//# sourceMappingURL=diagnostics-summary.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"diagnostics-summary.js","sourceRoot":"","sources":["../src/diagnostics-summary.ts"],"names":[],"mappings":"AAOA,MAAM,UAAU,4BAA4B,CAAC,KAK5C;IACC,MAAM,UAAU,GAAG,KAAK,CAAC,WAAW,CAAC,MAAM,CACzC,CAAC,UAAU,EAAE,EAAE,CAAC,UAAU,CAAC,QAAQ,KAAK,OAAO,CAChD,CAAC,MAAM,CAAC;IACT,MAAM,YAAY,GAAG,KAAK,CAAC,WAAW,CAAC,MAAM,CAC3C,CAAC,UAAU,EAAE,EAAE,CAAC,UAAU,CAAC,QAAQ,KAAK,SAAS,CAClD,CAAC,MAAM,CAAC;IACT,MAAM,SAAS,GAAG,KAAK,CAAC,WAAW,CAAC,MAAM,CAAC,CAAC,UAAU,EAAE,EAAE,CAAC,UAAU,CAAC,QAAQ,KAAK,MAAM,CAAC,CAAC,MAAM,CAAC;IAClG,MAAM,uBAAuB,GAAG,KAAK,CAAC,MAAM,KAAK,KAAK,CAAC,CAAC,CAAC,KAAK,CAAC,WAAW,CAAC,MAAM,CAAC,CAAC,CAAC,UAAU,CAAC;IAC/F,MAAM,kBAAkB,GACtB,KAAK,CAAC,MAAM,KAAK,UAAU,IAAI,KAAK,CAAC,MAAM,KAAK,aAAa,CAAC,CAAC,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC,CAAC,EAAE,CAAC;IACrF,MAAM,KAAK,GACT,kBAAkB,CAAC,MAAM,GAAG,CAAC;QAC3B,CAAC,CAAC,aAAa;QACf,CAAC,CAAC,uBAAuB,GAAG,CAAC;YAC3B,CAAC,CAAC,SAAS;YACX,CAAC,CAAC,SAAS,CAAC;IAElB,OAAO;QACL,MAAM,EAAE,KAAK,CAAC,MAAM;QACpB,KAAK;QACL,UAAU;QACV,YAAY;QACZ,SAAS;QACT,uBAAuB;QACvB,OAAO,EAAE,kBAAkB;KAC5B,CAAC;AACJ,CAAC"}
|
|
@@ -1,9 +1,12 @@
|
|
|
1
|
-
import { type GdhAuthoringCheckResult, type GdhAuthoringStatusResult, type GdhProjectConfig } from "@gdh/core";
|
|
1
|
+
import { type GdhAuthoringCheckResult, type GdhAuthoringSeverityPolicy, type GdhAuthoringStatusResult, type GdhProjectConfig } from "@gdh/core";
|
|
2
2
|
export declare const authoringPackage: import("@gdh/core").GdhPackageBoundary;
|
|
3
3
|
export declare function runAuthoringCheck(input: {
|
|
4
4
|
readonly targetPath: string;
|
|
5
5
|
readonly status: GdhAuthoringStatusResult;
|
|
6
6
|
readonly projectConfig: GdhProjectConfig | null;
|
|
7
|
+
readonly mode?: "final" | "post_edit";
|
|
8
|
+
readonly changedFiles?: readonly string[];
|
|
9
|
+
readonly severityPolicy?: GdhAuthoringSeverityPolicy;
|
|
7
10
|
}): Promise<GdhAuthoringCheckResult>;
|
|
8
11
|
export { inspectCacheState, pruneCacheState, resolveCacheNamespace } from "./cache.js";
|
|
9
12
|
export { checkManagedLsp, doctorManagedLsp, getManagedLspStatus, pruneManagedLsp, resetManagedLspTestState, restartManagedLsp, runManagedAuthoringCheck, stopManagedLsp, } from "./lsp.js";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAEL,KAAK,uBAAuB,EAC5B,KAAK,wBAAwB,EAC7B,KAAK,gBAAgB,EACtB,MAAM,WAAW,CAAC;
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAEL,KAAK,uBAAuB,EAC5B,KAAK,0BAA0B,EAC/B,KAAK,wBAAwB,EAC7B,KAAK,gBAAgB,EACtB,MAAM,WAAW,CAAC;AAMnB,eAAO,MAAM,gBAAgB,wCAM3B,CAAC;AAEH,wBAAsB,iBAAiB,CAAC,KAAK,EAAE;IAC7C,QAAQ,CAAC,UAAU,EAAE,MAAM,CAAC;IAC5B,QAAQ,CAAC,MAAM,EAAE,wBAAwB,CAAC;IAC1C,QAAQ,CAAC,aAAa,EAAE,gBAAgB,GAAG,IAAI,CAAC;IAChD,QAAQ,CAAC,IAAI,CAAC,EAAE,OAAO,GAAG,WAAW,CAAC;IACtC,QAAQ,CAAC,YAAY,CAAC,EAAE,SAAS,MAAM,EAAE,CAAC;IAC1C,QAAQ,CAAC,cAAc,CAAC,EAAE,0BAA0B,CAAC;CACtD,GAAG,OAAO,CAAC,uBAAuB,CAAC,CA0CnC;AAqFD,OAAO,EAAE,iBAAiB,EAAE,eAAe,EAAE,qBAAqB,EAAE,MAAM,YAAY,CAAC;AACvF,OAAO,EACL,eAAe,EACf,gBAAgB,EAChB,mBAAmB,EACnB,eAAe,EACf,wBAAwB,EACxB,iBAAiB,EACjB,wBAAwB,EACxB,cAAc,GACf,MAAM,UAAU,CAAC;AAClB,OAAO,EAAE,gBAAgB,EAAE,gBAAgB,EAAE,MAAM,cAAc,CAAC;AAClE,OAAO,EACL,4BAA4B,EAC5B,sBAAsB,EACtB,iBAAiB,EACjB,iBAAiB,EACjB,sBAAsB,EACtB,6BAA6B,EAC7B,oBAAoB,EACpB,0BAA0B,EAC1B,kBAAkB,EAClB,6BAA6B,GAC9B,MAAM,cAAc,CAAC;AACtB,OAAO,EAAE,0BAA0B,EAAE,MAAM,qBAAqB,CAAC;AACjE,OAAO,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;AACxC,OAAO,EAAE,kBAAkB,EAAE,MAAM,yBAAyB,CAAC"}
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { definePackageBoundary, } from "@gdh/core";
|
|
2
|
+
import { summarizeBlockingDiagnostics } from "./diagnostics-summary.js";
|
|
2
3
|
import { getManagedLspStatus, runManagedAuthoringCheck } from "./lsp.js";
|
|
3
4
|
import { enrichAuthoringCheckResult } from "./report.js";
|
|
4
5
|
import { runSceneResourceValidation } from "./scene-resource.js";
|
|
@@ -9,6 +10,9 @@ export const authoringPackage = definePackageBoundary({
|
|
|
9
10
|
allowedInternalDependencies: ["@gdh/core"],
|
|
10
11
|
});
|
|
11
12
|
export async function runAuthoringCheck(input) {
|
|
13
|
+
const mode = input.mode ?? "final";
|
|
14
|
+
const changedFiles = input.changedFiles ?? [];
|
|
15
|
+
const severityPolicy = input.severityPolicy ?? "errors";
|
|
12
16
|
const lspStatus = await getManagedLspStatus({
|
|
13
17
|
targetPath: input.targetPath,
|
|
14
18
|
status: input.status,
|
|
@@ -20,6 +24,9 @@ export async function runAuthoringCheck(input) {
|
|
|
20
24
|
status: input.status,
|
|
21
25
|
projectConfig: input.projectConfig,
|
|
22
26
|
lspStatus,
|
|
27
|
+
mode,
|
|
28
|
+
changedFiles,
|
|
29
|
+
severityPolicy,
|
|
23
30
|
});
|
|
24
31
|
const enrichedLspResult = await enrichAuthoringCheckResult({
|
|
25
32
|
targetPath: input.targetPath,
|
|
@@ -34,11 +41,13 @@ export async function runAuthoringCheck(input) {
|
|
|
34
41
|
targetPath: input.targetPath,
|
|
35
42
|
status: input.status,
|
|
36
43
|
projectConfig: input.projectConfig,
|
|
44
|
+
mode,
|
|
45
|
+
changedFiles,
|
|
37
46
|
importState: enrichedLspResult.importState,
|
|
38
47
|
});
|
|
39
|
-
return composeAuthoringCheckResult(enrichedLspResult, sceneResourceResult);
|
|
48
|
+
return composeAuthoringCheckResult(enrichedLspResult, sceneResourceResult, severityPolicy);
|
|
40
49
|
}
|
|
41
|
-
function composeAuthoringCheckResult(lspResult, sceneResourceResult) {
|
|
50
|
+
function composeAuthoringCheckResult(lspResult, sceneResourceResult, severityPolicy) {
|
|
42
51
|
const diagnostics = [...lspResult.diagnostics, ...sceneResourceResult.diagnostics];
|
|
43
52
|
const reasons = dedupe([...lspResult.reasons, ...sceneResourceResult.reasons]);
|
|
44
53
|
const status = diagnostics.length > 0
|
|
@@ -55,6 +64,12 @@ function composeAuthoringCheckResult(lspResult, sceneResourceResult) {
|
|
|
55
64
|
status,
|
|
56
65
|
summary: summarizeCompositeAuthoringStatus(status, lspResult, sceneResourceResult),
|
|
57
66
|
diagnostics,
|
|
67
|
+
blockingSummary: summarizeBlockingDiagnostics({
|
|
68
|
+
status,
|
|
69
|
+
diagnostics,
|
|
70
|
+
policy: severityPolicy,
|
|
71
|
+
reasons,
|
|
72
|
+
}),
|
|
58
73
|
reasons,
|
|
59
74
|
provenance: {
|
|
60
75
|
...lspResult.provenance,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,qBAAqB,
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,qBAAqB,GAKtB,MAAM,WAAW,CAAC;AACnB,OAAO,EAAE,4BAA4B,EAAE,MAAM,0BAA0B,CAAC;AACxE,OAAO,EAAE,mBAAmB,EAAE,wBAAwB,EAAE,MAAM,UAAU,CAAC;AACzE,OAAO,EAAE,0BAA0B,EAAE,MAAM,aAAa,CAAC;AACzD,OAAO,EAAE,0BAA0B,EAAE,MAAM,qBAAqB,CAAC;AAEjE,MAAM,CAAC,MAAM,gBAAgB,GAAG,qBAAqB,CAAC;IACpD,IAAI,EAAE,gBAAgB;IACtB,KAAK,EAAE,YAAY;IACnB,cAAc,EACZ,kGAAkG;IACpG,2BAA2B,EAAE,CAAC,WAAW,CAAC;CAC3C,CAAC,CAAC;AAEH,MAAM,CAAC,KAAK,UAAU,iBAAiB,CAAC,KAOvC;IACC,MAAM,IAAI,GAAG,KAAK,CAAC,IAAI,IAAI,OAAO,CAAC;IACnC,MAAM,YAAY,GAAG,KAAK,CAAC,YAAY,IAAI,EAAE,CAAC;IAC9C,MAAM,cAAc,GAAG,KAAK,CAAC,cAAc,IAAI,QAAQ,CAAC;IACxD,MAAM,SAAS,GAAG,MAAM,mBAAmB,CAAC;QAC1C,UAAU,EAAE,KAAK,CAAC,UAAU;QAC5B,MAAM,EAAE,KAAK,CAAC,MAAM;QACpB,aAAa,EAAE,KAAK,CAAC,aAAa;QAClC,KAAK,EAAE,qBAAqB;KAC7B,CAAC,CAAC;IAEH,MAAM,SAAS,GAAG,MAAM,wBAAwB,CAAC;QAC/C,UAAU,EAAE,KAAK,CAAC,UAAU;QAC5B,MAAM,EAAE,KAAK,CAAC,MAAM;QACpB,aAAa,EAAE,KAAK,CAAC,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