@opengsd/gsd-core 1.7.0-rc.5 → 1.7.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/.claude-plugin/marketplace.json +1 -1
- package/.claude-plugin/plugin.json +1 -1
- package/agents/gsd-executor.md +2 -1
- package/agents/gsd-security-auditor.md +13 -15
- package/agents/gsd-ui-checker.md +2 -0
- package/agents/gsd-ui-researcher.md +1 -0
- package/bin/install.js +975 -196
- package/commands/gsd/mempalace-capture.md +27 -1
- package/commands/gsd/surface.md +6 -6
- package/gsd-core/bin/gsd-tools.cjs +63 -2
- package/gsd-core/bin/lib/api-coverage.cjs +3 -4
- package/gsd-core/bin/lib/audit.cjs +7 -6
- package/gsd-core/bin/lib/capability-registry.cjs +503 -87
- package/gsd-core/bin/lib/capability-validator.cjs +56 -18
- package/gsd-core/bin/lib/check-command-router.cjs +1 -1
- package/gsd-core/bin/lib/clock.cjs +19 -0
- package/gsd-core/bin/lib/commands.cjs +48 -9
- package/gsd-core/bin/lib/config-loader.cjs +6 -2
- package/gsd-core/bin/lib/config.cjs +12 -0
- package/gsd-core/bin/lib/core-utils.cjs +8 -2
- package/gsd-core/bin/lib/drift.cjs +4 -4
- package/gsd-core/bin/lib/frontmatter.cjs +22 -0
- package/gsd-core/bin/lib/gsd2-import.cjs +2 -1
- package/gsd-core/bin/lib/host-integration.cjs +33 -8
- package/gsd-core/bin/lib/init.cjs +60 -53
- package/gsd-core/bin/lib/install-engine.cjs +93 -22
- package/gsd-core/bin/lib/installer-migration-authoring.cjs +2 -1
- package/gsd-core/bin/lib/installer-migration-report.cjs +3 -0
- package/gsd-core/bin/lib/installer-migrations.cjs +1 -1
- package/gsd-core/bin/lib/markdown-sectionizer.cjs +342 -0
- package/gsd-core/bin/lib/markdown-table.cjs +698 -0
- package/gsd-core/bin/lib/mcp-server.cjs +18 -7
- package/gsd-core/bin/lib/milestone.cjs +217 -31
- package/gsd-core/bin/lib/phase-command-router.cjs +50 -2
- package/gsd-core/bin/lib/phase-lifecycle.cjs +62 -36
- package/gsd-core/bin/lib/phase-locator.cjs +23 -2
- package/gsd-core/bin/lib/phase.cjs +436 -61
- package/gsd-core/bin/lib/plan-scan.cjs +3 -0
- package/gsd-core/bin/lib/review-reviewer-selection.cjs +24 -7
- package/gsd-core/bin/lib/roadmap-parser.cjs +218 -13
- package/gsd-core/bin/lib/roadmap.cjs +100 -49
- package/gsd-core/bin/lib/runtime-artifact-conversion.cjs +242 -44
- package/gsd-core/bin/lib/runtime-artifact-install-plan.cjs +3 -2
- package/gsd-core/bin/lib/runtime-artifact-layout.cjs +24 -14
- package/gsd-core/bin/lib/runtime-config-adapter-registry.cjs +19 -5
- package/gsd-core/bin/lib/runtime-homes.cjs +22 -0
- package/gsd-core/bin/lib/runtime-hooks-surface.cjs +526 -29
- package/gsd-core/bin/lib/runtime-name-policy.cjs +63 -5
- package/gsd-core/bin/lib/schema-detect.cjs +2 -1
- package/gsd-core/bin/lib/security.cjs +7 -37
- package/gsd-core/bin/lib/shell-command-projection.cjs +176 -27
- package/gsd-core/bin/lib/smart-entry.cjs +4 -3
- package/gsd-core/bin/lib/stale-bake-guard.cjs +30 -10
- package/gsd-core/bin/lib/state-transition.cjs +100 -45
- package/gsd-core/bin/lib/state.cjs +391 -126
- package/gsd-core/bin/lib/surface.cjs +12 -8
- package/gsd-core/bin/lib/template.cjs +2 -1
- package/gsd-core/bin/lib/uat.cjs +54 -8
- package/gsd-core/bin/lib/ui-consideration-probe.cjs +249 -0
- package/gsd-core/bin/lib/ui-safety-gate.cjs +23 -1
- package/gsd-core/bin/lib/verify.cjs +4 -3
- package/gsd-core/bin/lib/workstream.cjs +3 -2
- package/gsd-core/bin/lib/worktree-safety.cjs +1 -1
- package/gsd-core/bin/lib/write-set.cjs +38 -0
- package/gsd-core/bin/shared/config-schema.manifest.json +2 -0
- package/gsd-core/bin/shared/model-catalog.json +8 -3
- package/gsd-core/references/checkpoints.md +12 -0
- package/gsd-core/references/ui-consideration-probe.md +73 -0
- package/gsd-core/templates/UI-SPEC.md +25 -0
- package/gsd-core/templates/VALIDATION.md +2 -0
- package/gsd-core/workflows/add-tests.md +1 -1
- package/gsd-core/workflows/audit-milestone.md +7 -4
- package/gsd-core/workflows/debug.md +2 -0
- package/gsd-core/workflows/execute-phase.md +5 -3
- package/gsd-core/workflows/fast.md +8 -22
- package/gsd-core/workflows/plan-phase.md +6 -0
- package/gsd-core/workflows/progress.md +2 -2
- package/gsd-core/workflows/quick.md +2 -0
- package/gsd-core/workflows/review.md +42 -3
- package/gsd-core/workflows/secure-phase.md +1 -1
- package/gsd-core/workflows/settings-advanced.md +7 -4
- package/gsd-core/workflows/ship.md +8 -2
- package/gsd-core/workflows/spec-phase.md +1 -1
- package/gsd-core/workflows/transition.md +1 -1
- package/gsd-core/workflows/ui-phase.md +146 -1
- package/gsd-core/workflows/validate-phase.md +2 -2
- package/hooks/dist/gsd-statusline.js +164 -14
- package/hooks/dist/gsd-windsurf-pre-command.js +275 -0
- package/hooks/dist/gsd-windsurf-pre-write.js +132 -0
- package/hooks/dist/managed-hooks-registry.cjs +2 -0
- package/hooks/gsd-statusline.js +164 -14
- package/hooks/gsd-windsurf-pre-command.js +275 -0
- package/hooks/gsd-windsurf-pre-write.js +132 -0
- package/hooks/managed-hooks-registry.cjs +2 -0
- package/package.json +10 -4
- package/pi/gsd.cjs +354 -0
- package/scripts/build-hooks.js +3 -0
- package/scripts/ci-test-scope.cjs +39 -1
- package/scripts/gen-golden-install-parity-zcode.cjs +35 -35
- package/scripts/gen-install-tree-fixtures.cjs +75 -0
- package/scripts/gen-registry.cjs +128 -0
- package/scripts/lint-allow-test-rule-refs.allowlist.json +0 -1
- package/scripts/lint-table-schema-drift.cjs +157 -0
- package/scripts/lint-test-file-count.allowlist.json +2 -1
- package/scripts/registry-schema.cjs +565 -0
- package/scripts/validate-registry.cjs +117 -0
- package/skills/gsd-mempalace-capture/SKILL.md +27 -1
- package/skills/gsd-surface/SKILL.md +6 -6
- package/vscode/browser.js +197 -0
- package/vscode/extension.js +383 -0
- package/vscode/host-binding.js +113 -0
- package/vscode/package.json +96 -0
|
@@ -0,0 +1,113 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* VS Code IDE host binding for GSD (ADR-1239 Phase D / #1933, shipped #2103).
|
|
5
|
+
*
|
|
6
|
+
* VS Code is the IDE-profile reference host. This module composes the Phase-3
|
|
7
|
+
* engine seams for the negotiated `ide` profile (host-integration.cts
|
|
8
|
+
* PROFILE_BASELINES):
|
|
9
|
+
*
|
|
10
|
+
* - modelMode: 'active' → createModelAdapter({modelMode:'active'}, {sendRequest})
|
|
11
|
+
* backed by `vscode.lm` (LanguageModelChat). There is NO
|
|
12
|
+
* `vscode.lm.sendRequest` — the real API is
|
|
13
|
+
* `const [model] = await vscode.lm.selectChatModels(selector?);
|
|
14
|
+
* const response = await model.sendRequest(messages, options?, token?);`
|
|
15
|
+
* (Context7-verified #2103). The injected `sendRequest` wrapper
|
|
16
|
+
* below selects a model on every call and delegates to IT. VS Code
|
|
17
|
+
* rejects system-role messages, so the request mapper uses User
|
|
18
|
+
* role only.
|
|
19
|
+
* - hookBus: 'engine' → createHookBus({bus:'engine'}) — VS Code has NO host event bus,
|
|
20
|
+
* so GSD owns the bus in-process (full subscribe + emit).
|
|
21
|
+
* - stateIO: 'sandboxed-storage' → createStateIO({io:'sandboxed-storage'}, {backend}) bound to a
|
|
22
|
+
* host-supplied storage (no arbitrary FS — web/no-child_process safe
|
|
23
|
+
* AT THE STATE-IO SEAM ITSELF; see the DESKTOP-ONLY note below for
|
|
24
|
+
* why the module as a WHOLE is not safe to require from browser.js).
|
|
25
|
+
* - embeddingMode: 'imperative' → createImperativeAdapter({runtime:'vscode'}) — engine-as-library.
|
|
26
|
+
*
|
|
27
|
+
* Distribution: VS Code is shipped as an EXTENSION (Marketplace), NOT file-projected onto a
|
|
28
|
+
* config dir, so it intentionally has NO runtime descriptor / `--vscode` installer entry — the
|
|
29
|
+
* extension IS the host. This module is the binding `vscode/extension.js` (the Node/desktop
|
|
30
|
+
* `main` entry) runs in activate().
|
|
31
|
+
*
|
|
32
|
+
* DESKTOP-ONLY (#2103 finding — do NOT require this from vscode/browser.js):
|
|
33
|
+
* despite the per-seam design above being conceptually host-agnostic, the CONCRETE engine-lib
|
|
34
|
+
* modules this file requires are NOT web-safe today — each pulls in Node's `fs`/`os`/`path`
|
|
35
|
+
* at module-load time (eagerly, regardless of which code path actually runs):
|
|
36
|
+
* - gsd-core/bin/lib/state-io.cjs → requires 'node:fs' directly.
|
|
37
|
+
* - gsd-core/bin/lib/adapter-imperative.cjs → requires install-engine.cjs (fs/os/path) and
|
|
38
|
+
* capability-loader.cjs (fs/os/path).
|
|
39
|
+
* - gsd-core/bin/lib/model-adapter.cjs → requires model-resolver.cjs → config-loader.cjs
|
|
40
|
+
* (fs/os/path) and configuration.cjs (fs/path).
|
|
41
|
+
* - gsd-core/bin/lib/hook-bus.cjs → no requires; this one alone is web-safe.
|
|
42
|
+
* In a real VS Code Web Extension host (webworker context) `require('node:fs')` does not
|
|
43
|
+
* resolve — activation would throw immediately. This is why `vscode/browser.js` does NOT
|
|
44
|
+
* require this module (or any of the engine-lib adapters) and instead implements its own
|
|
45
|
+
* minimal, genuinely-zero-Node-API composition directly against `vscode.lm`. See browser.js's
|
|
46
|
+
* header comment for the full rationale. Fixing the engine-lib modules to be fs-free is a
|
|
47
|
+
* separate, much larger engine-wide refactor (config-loader/capability-loader/install-engine
|
|
48
|
+
* all read real files from disk) — out of scope for the extension-surface stage; flagged here
|
|
49
|
+
* for visibility rather than silently routed around.
|
|
50
|
+
*
|
|
51
|
+
* Mock-friendly: takes `vscode` (with `vscode.lm`) + `hostStorage` ({read,write}) so it is
|
|
52
|
+
* behaviorally testable without a live VS Code host.
|
|
53
|
+
*
|
|
54
|
+
* @param {{ lm: { selectChatModels: (selector?: unknown) => Promise<Array<{ sendRequest: (messages: unknown, options?: unknown, token?: unknown) => unknown }>> } }} vscode
|
|
55
|
+
* VS Code namespace (vscode.lm.selectChatModels — NOT vscode.lm.sendRequest, which does not exist).
|
|
56
|
+
* @param {{ read: (path: string) => string, write: (path: string, content: string) => void }} hostStorage
|
|
57
|
+
* sandboxed-storage backend (e.g. globalState/workspaceState/secrets).
|
|
58
|
+
* @returns {object} the composed IDE host surface: { runtime, model, hookBus, stateIO, adapter, commands }
|
|
59
|
+
*/
|
|
60
|
+
module.exports = function bindGsdToVscode(vscode, hostStorage) {
|
|
61
|
+
if (!vscode || !vscode.lm || typeof vscode.lm.selectChatModels !== 'function') {
|
|
62
|
+
throw new TypeError('bindGsdToVscode: vscode.lm.selectChatModels is required (active model provider — VS Code exposes no vscode.lm.sendRequest; a model is selected via selectChatModels() and ITS sendRequest is called)');
|
|
63
|
+
}
|
|
64
|
+
if (!hostStorage || typeof hostStorage.read !== 'function' || typeof hostStorage.write !== 'function') {
|
|
65
|
+
throw new TypeError('bindGsdToVscode: hostStorage {read,write} is required (sandboxed-storage backend)');
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
const { createImperativeAdapter } = require('../gsd-core/bin/lib/adapter-imperative.cjs');
|
|
69
|
+
const { createModelAdapter } = require('../gsd-core/bin/lib/model-adapter.cjs');
|
|
70
|
+
const { createHookBus } = require('../gsd-core/bin/lib/hook-bus.cjs');
|
|
71
|
+
const { createStateIO } = require('../gsd-core/bin/lib/state-io.cjs');
|
|
72
|
+
|
|
73
|
+
// Active model: GSD model calls route through vscode.lm. There is no
|
|
74
|
+
// `vscode.lm.sendRequest` — a model must be selected first
|
|
75
|
+
// (`vscode.lm.selectChatModels()`, async → LanguageModelChat[]), then THAT
|
|
76
|
+
// model's own `.sendRequest(messages, options?, token?)` is called. Selects
|
|
77
|
+
// fresh on every call (no cross-call caching) so a model becoming available/
|
|
78
|
+
// unavailable between calls is always reflected; gsd-core/bin/lib/model-adapter.cjs's
|
|
79
|
+
// ActiveModelAdapter.sendRequest is a plain (non-async) pass-through that
|
|
80
|
+
// returns whatever the injected function returns, so an async injected
|
|
81
|
+
// function composes transparently — no adapter-side change needed (verified
|
|
82
|
+
// by reading model-adapter.cjs: `sendRequest(req) { return sendRequest(req); }`).
|
|
83
|
+
// No system-role messages — VS Code rejects them; a full extension builds
|
|
84
|
+
// LanguageModelChatMessages with User role only.
|
|
85
|
+
const model = createModelAdapter({ modelMode: 'active' }, {
|
|
86
|
+
async sendRequest(req) {
|
|
87
|
+
const models = await vscode.lm.selectChatModels();
|
|
88
|
+
const [chatModel] = models || [];
|
|
89
|
+
if (!chatModel || typeof chatModel.sendRequest !== 'function') {
|
|
90
|
+
throw new Error('bindGsdToVscode: vscode.lm.selectChatModels() returned no usable model (no active model available)');
|
|
91
|
+
}
|
|
92
|
+
return chatModel.sendRequest(req);
|
|
93
|
+
},
|
|
94
|
+
});
|
|
95
|
+
|
|
96
|
+
// Engine-owned hook bus: VS Code has no host bus, so GSD owns it in-process.
|
|
97
|
+
const hookBus = createHookBus({ bus: 'engine' });
|
|
98
|
+
|
|
99
|
+
// Sandboxed-storage stateIO bound to the host storage backend (no fs / no child_process).
|
|
100
|
+
const stateIO = createStateIO({ io: 'sandboxed-storage' }, { backend: hostStorage });
|
|
101
|
+
|
|
102
|
+
// Imperative adapter: the engine-as-library for the VS Code runtime.
|
|
103
|
+
const adapter = createImperativeAdapter({ runtime: 'vscode' });
|
|
104
|
+
|
|
105
|
+
// Command surface: Command Palette + Chat participant entries bound to the
|
|
106
|
+
// GSD command-routing hub via the imperative adapter (interface point 1).
|
|
107
|
+
const commands = Object.freeze({
|
|
108
|
+
'gsd.invoke': Object.freeze({ description: 'Invoke a GSD command via the embedded engine (palette/chat).' }),
|
|
109
|
+
'gsd.help': Object.freeze({ description: 'List GSD commands available in the IDE host.' }),
|
|
110
|
+
});
|
|
111
|
+
|
|
112
|
+
return Object.freeze({ runtime: 'vscode', model, hookBus, stateIO, adapter, commands });
|
|
113
|
+
};
|
|
@@ -0,0 +1,96 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "gsd-core-vscode",
|
|
3
|
+
"displayName": "GSD Core",
|
|
4
|
+
"description": "GSD orchestration engine embedded in VS Code (ADR-1239 IDE profile).",
|
|
5
|
+
"version": "1.7.0",
|
|
6
|
+
"publisher": "opengsd",
|
|
7
|
+
"engines": {
|
|
8
|
+
"vscode": "^1.105.0"
|
|
9
|
+
},
|
|
10
|
+
"categories": [
|
|
11
|
+
"Other"
|
|
12
|
+
],
|
|
13
|
+
"activationEvents": [
|
|
14
|
+
"onCommand:gsd.invoke"
|
|
15
|
+
],
|
|
16
|
+
"main": "./extension.js",
|
|
17
|
+
"browser": "./browser.js",
|
|
18
|
+
"contributes": {
|
|
19
|
+
"commands": [
|
|
20
|
+
{
|
|
21
|
+
"command": "gsd.invoke",
|
|
22
|
+
"title": "GSD: Invoke Command"
|
|
23
|
+
}
|
|
24
|
+
],
|
|
25
|
+
"chatParticipants": [
|
|
26
|
+
{
|
|
27
|
+
"id": "gsd",
|
|
28
|
+
"name": "gsd",
|
|
29
|
+
"fullName": "GSD Core",
|
|
30
|
+
"description": "Invoke GSD orchestration commands from chat.",
|
|
31
|
+
"isSticky": true
|
|
32
|
+
}
|
|
33
|
+
],
|
|
34
|
+
"languageModelTools": [
|
|
35
|
+
{
|
|
36
|
+
"name": "gsd_progress",
|
|
37
|
+
"tags": [
|
|
38
|
+
"gsd",
|
|
39
|
+
"status"
|
|
40
|
+
],
|
|
41
|
+
"toolReferenceName": "gsd-progress",
|
|
42
|
+
"displayName": "GSD Progress",
|
|
43
|
+
"modelDescription": "Reports GSD milestone/phase progress (percent complete, plan and summary counts) for the current project.",
|
|
44
|
+
"userDescription": "Check GSD project progress.",
|
|
45
|
+
"canBeReferencedInPrompt": true,
|
|
46
|
+
"inputSchema": {
|
|
47
|
+
"type": "object",
|
|
48
|
+
"properties": {},
|
|
49
|
+
"additionalProperties": false
|
|
50
|
+
}
|
|
51
|
+
},
|
|
52
|
+
{
|
|
53
|
+
"name": "gsd_workstreams",
|
|
54
|
+
"tags": [
|
|
55
|
+
"gsd",
|
|
56
|
+
"status"
|
|
57
|
+
],
|
|
58
|
+
"toolReferenceName": "gsd-workstreams",
|
|
59
|
+
"displayName": "GSD Workstreams",
|
|
60
|
+
"modelDescription": "Lists the GSD parallel workstreams for the current project (or reports flat/single-workstream mode).",
|
|
61
|
+
"userDescription": "List GSD workstreams.",
|
|
62
|
+
"canBeReferencedInPrompt": true,
|
|
63
|
+
"inputSchema": {
|
|
64
|
+
"type": "object",
|
|
65
|
+
"properties": {},
|
|
66
|
+
"additionalProperties": false
|
|
67
|
+
}
|
|
68
|
+
},
|
|
69
|
+
{
|
|
70
|
+
"name": "gsd_plan_phase",
|
|
71
|
+
"tags": [
|
|
72
|
+
"gsd",
|
|
73
|
+
"plan"
|
|
74
|
+
],
|
|
75
|
+
"toolReferenceName": "gsd-plan-phase",
|
|
76
|
+
"displayName": "GSD Plan Phase",
|
|
77
|
+
"modelDescription": "Looks up the plan index (plans, waves, checkpoints) for a named GSD phase. Read-only — does not create or modify a phase plan; use the /gsd-plan-phase chat workflow for full phase planning.",
|
|
78
|
+
"userDescription": "Look up a GSD phase's plan index.",
|
|
79
|
+
"canBeReferencedInPrompt": true,
|
|
80
|
+
"inputSchema": {
|
|
81
|
+
"type": "object",
|
|
82
|
+
"properties": {
|
|
83
|
+
"phase": {
|
|
84
|
+
"type": "string",
|
|
85
|
+
"description": "The GSD phase name to look up (e.g. \"01-core\")."
|
|
86
|
+
}
|
|
87
|
+
},
|
|
88
|
+
"required": [
|
|
89
|
+
"phase"
|
|
90
|
+
],
|
|
91
|
+
"additionalProperties": false
|
|
92
|
+
}
|
|
93
|
+
}
|
|
94
|
+
]
|
|
95
|
+
}
|
|
96
|
+
}
|