@opengsd/gsd-core 1.7.0-rc.4 → 1.7.0-rc.6

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.
Files changed (113) hide show
  1. package/.claude-plugin/marketplace.json +1 -1
  2. package/.claude-plugin/plugin.json +1 -1
  3. package/.opencode/plugins/gsd-core.js +20 -0
  4. package/agents/gsd-doc-classifier.md +105 -0
  5. package/agents/gsd-doc-synthesizer.md +61 -0
  6. package/agents/gsd-ui-checker.md +30 -0
  7. package/agents/gsd-ui-researcher.md +1 -0
  8. package/bin/install.js +1568 -622
  9. package/gsd-core/bin/gsd-tools.cjs +40 -1
  10. package/gsd-core/bin/lib/api-coverage.cjs +466 -0
  11. package/gsd-core/bin/lib/audit.cjs +6 -3
  12. package/gsd-core/bin/lib/capability-loader.cjs +11 -9
  13. package/gsd-core/bin/lib/capability-registry.cjs +761 -84
  14. package/gsd-core/bin/lib/capability-validator.cjs +56 -18
  15. package/gsd-core/bin/lib/capability-writer.cjs +10 -1
  16. package/gsd-core/bin/lib/check-command-router.cjs +242 -3
  17. package/gsd-core/bin/lib/commands.cjs +7 -5
  18. package/gsd-core/bin/lib/config-loader.cjs +1 -0
  19. package/gsd-core/bin/lib/config.cjs +96 -0
  20. package/gsd-core/bin/lib/core-utils.cjs +4 -1
  21. package/gsd-core/bin/lib/host-integration-adapters/cline-sdk-binding.cjs +234 -0
  22. package/gsd-core/bin/lib/host-integration-adapters/imperative-hook-bus.cjs +145 -0
  23. package/gsd-core/bin/lib/host-integration.cjs +45 -4
  24. package/gsd-core/bin/lib/init.cjs +76 -39
  25. package/gsd-core/bin/lib/install-effort-resolver.cjs +213 -0
  26. package/gsd-core/bin/lib/install-engine.cjs +228 -18
  27. package/gsd-core/bin/lib/installer-migration-report.cjs +7 -0
  28. package/gsd-core/bin/lib/loop-resolver.cjs +68 -17
  29. package/gsd-core/bin/lib/markdown-sectionizer.cjs +50 -11
  30. package/gsd-core/bin/lib/mcp-server.cjs +18 -7
  31. package/gsd-core/bin/lib/milestone.cjs +3 -3
  32. package/gsd-core/bin/lib/normalize-test-command.cjs +187 -0
  33. package/gsd-core/bin/lib/phase-id.cjs +132 -3
  34. package/gsd-core/bin/lib/phase.cjs +78 -16
  35. package/gsd-core/bin/lib/planning-workspace.cjs +17 -0
  36. package/gsd-core/bin/lib/review-reviewer-selection.cjs +24 -7
  37. package/gsd-core/bin/lib/roadmap-command-router.cjs +5 -4
  38. package/gsd-core/bin/lib/roadmap-parser.cjs +21 -30
  39. package/gsd-core/bin/lib/roadmap-upgrade.cjs +9 -9
  40. package/gsd-core/bin/lib/roadmap.cjs +42 -56
  41. package/gsd-core/bin/lib/runtime-artifact-conversion.cjs +248 -44
  42. package/gsd-core/bin/lib/runtime-artifact-install-plan.cjs +2 -2
  43. package/gsd-core/bin/lib/runtime-artifact-layout.cjs +39 -23
  44. package/gsd-core/bin/lib/runtime-config-adapter-registry.cjs +19 -5
  45. package/gsd-core/bin/lib/runtime-homes.cjs +30 -0
  46. package/gsd-core/bin/lib/runtime-hooks-surface.cjs +534 -37
  47. package/gsd-core/bin/lib/runtime-name-policy.cjs +63 -5
  48. package/gsd-core/bin/lib/security.cjs +6 -36
  49. package/gsd-core/bin/lib/shell-command-projection.cjs +115 -2
  50. package/gsd-core/bin/lib/spec-section.cjs +111 -0
  51. package/gsd-core/bin/lib/stale-bake-guard.cjs +30 -10
  52. package/gsd-core/bin/lib/state-transition.cjs +1 -1
  53. package/gsd-core/bin/lib/state.cjs +24 -24
  54. package/gsd-core/bin/lib/surface.cjs +40 -6
  55. package/gsd-core/bin/lib/uat.cjs +4 -1
  56. package/gsd-core/bin/lib/ui-consideration-probe.cjs +249 -0
  57. package/gsd-core/bin/lib/validate.cjs +15 -6
  58. package/gsd-core/bin/lib/verify.cjs +33 -37
  59. package/gsd-core/bin/shared/config-schema.manifest.json +2 -0
  60. package/gsd-core/bin/shared/model-catalog.json +14 -9
  61. package/gsd-core/references/api-coverage.md +104 -0
  62. package/gsd-core/references/model-profiles.md +2 -2
  63. package/gsd-core/references/planning-config.md +2 -0
  64. package/gsd-core/references/specless-probe-fallback.md +172 -0
  65. package/gsd-core/references/ui-consideration-probe.md +73 -0
  66. package/gsd-core/templates/UI-SPEC.md +25 -0
  67. package/gsd-core/templates/VALIDATION.md +2 -0
  68. package/gsd-core/templates/config.json +2 -1
  69. package/gsd-core/workflows/audit-fix.md +9 -1
  70. package/gsd-core/workflows/audit-milestone.md +7 -4
  71. package/gsd-core/workflows/code-review-fix.md +7 -3
  72. package/gsd-core/workflows/code-review.md +4 -1
  73. package/gsd-core/workflows/discuss-phase-assumptions.md +4 -1
  74. package/gsd-core/workflows/execute-phase/steps/post-merge-gate.md +8 -4
  75. package/gsd-core/workflows/execute-phase/steps/regression-gate.md +42 -0
  76. package/gsd-core/workflows/execute-phase.md +1 -25
  77. package/gsd-core/workflows/plan-phase.md +37 -2
  78. package/gsd-core/workflows/quick.md +2 -2
  79. package/gsd-core/workflows/review.md +59 -13
  80. package/gsd-core/workflows/settings-advanced.md +12 -9
  81. package/gsd-core/workflows/settings.md +2 -2
  82. package/gsd-core/workflows/ui-phase.md +146 -1
  83. package/gsd-core/workflows/validate-phase.md +2 -2
  84. package/gsd-core/workflows/verify-phase.md +3 -2
  85. package/gsd-core/workflows/verify-work.md +38 -0
  86. package/hooks/dist/gsd-cursor-pre-tool.js +76 -0
  87. package/hooks/dist/gsd-cursor-stop.js +48 -0
  88. package/hooks/dist/gsd-cursor-subagent-start.js +50 -0
  89. package/hooks/dist/gsd-cursor-subagent-stop.js +40 -0
  90. package/hooks/dist/gsd-windsurf-pre-command.js +275 -0
  91. package/hooks/dist/gsd-windsurf-pre-write.js +132 -0
  92. package/hooks/dist/managed-hooks-registry.cjs +6 -0
  93. package/hooks/gsd-cursor-pre-tool.js +76 -0
  94. package/hooks/gsd-cursor-stop.js +48 -0
  95. package/hooks/gsd-cursor-subagent-start.js +50 -0
  96. package/hooks/gsd-cursor-subagent-stop.js +40 -0
  97. package/hooks/gsd-windsurf-pre-command.js +275 -0
  98. package/hooks/gsd-windsurf-pre-write.js +132 -0
  99. package/hooks/managed-hooks-registry.cjs +6 -0
  100. package/package.json +9 -4
  101. package/pi/gsd.cjs +354 -0
  102. package/scripts/build-hooks.js +8 -1
  103. package/scripts/gen-golden-install-parity-zcode.cjs +11 -1
  104. package/scripts/gen-registry.cjs +128 -0
  105. package/scripts/lint-phase-id-drift.cjs +150 -0
  106. package/scripts/lint-test-file-count.allowlist.json +2 -1
  107. package/scripts/registry-schema.cjs +565 -0
  108. package/scripts/run-tests.cjs +21 -1
  109. package/scripts/validate-registry.cjs +117 -0
  110. package/vscode/browser.js +197 -0
  111. package/vscode/extension.js +383 -0
  112. package/vscode/host-binding.js +113 -0
  113. package/vscode/package.json +96 -0
@@ -21,17 +21,30 @@
21
21
  * false for codex / copilot / kilo / cursor / windsurf / trae / cline / kimi (legacy exclusion list).
22
22
  * true for all other runtimes.
23
23
  * - `finishPermissionWriter` names the finishInstall-phase dedicated config writer:
24
- * 'opencode' → writes BOTH shared settings AND its own permissions file.
25
- * 'kilo' → writes only its own permissions file.
26
- * null → no dedicated permission writer.
24
+ * 'opencode' → writes BOTH shared settings AND its own permissions file.
25
+ * 'kilo' → writes only its own permissions file.
26
+ * 'antigravity' → writes BOTH shared settings.json permissions.allow AND a
27
+ * standalone mcp_config.json MCP companion profile (#2096
28
+ * Phase B Upgrades 1+2).
29
+ * null → no dedicated permission writer.
27
30
  */
28
31
  // eslint-disable-next-line @typescript-eslint/no-require-imports
29
32
  const { runtimes } = require('./capability-registry.cjs');
30
33
  /** Valid sandboxTier enum values — mirrors the gen-capability-registry validator vocabulary. */
31
34
  const VALID_SANDBOX_TIERS = new Set(['none', 'codex-agent-sandbox']);
32
- /** The complete set of 16 supported runtimes for config-adapter dispatch. */
35
+ /**
36
+ * The complete set of 16 supported runtimes for config-adapter dispatch.
37
+ *
38
+ * Excludes runtimes whose installSurface is 'none' (#2103 — e.g. VS Code): a
39
+ * 'none' installSurface means the runtime has NO CLI install surface at all
40
+ * (Marketplace/VSIX-distributed, never dispatched through
41
+ * install()/finishInstall()), so it is not a "config-adapter runtime" by
42
+ * definition. This keeps this set in lockstep with bin/install.js's
43
+ * `allRuntimes` (see tests/issue-57-runtime-install-no-drift.test.cjs) without
44
+ * needing a separate hand-kept exclusion list.
45
+ */
33
46
  const ALLOWED_CONFIG_RUNTIMES = new Set(Object.entries(runtimes)
34
- .filter(([, cap]) => cap && cap.runtime && typeof cap.runtime['installSurface'] === 'string')
47
+ .filter(([, cap]) => cap && cap.runtime && typeof cap.runtime['installSurface'] === 'string' && cap.runtime['installSurface'] !== 'none')
35
48
  .map(([id]) => id));
36
49
  /** All valid installSurface values. */
37
50
  const INSTALL_SURFACES = Object.freeze([
@@ -41,6 +54,7 @@ const INSTALL_SURFACES = Object.freeze([
41
54
  'cline-rules',
42
55
  'cursor-hooks-json',
43
56
  'profile-marker-only',
57
+ 'none',
44
58
  ]);
45
59
  /**
46
60
  * Resolve the config adapter intent for a given runtime.
@@ -38,6 +38,7 @@ exports.resolveConfigHomeFromDescriptor = resolveConfigHomeFromDescriptor;
38
38
  exports.resolveAntigravityGlobalDir = resolveAntigravityGlobalDir;
39
39
  exports.detectAntigravityDirAmbiguity = detectAntigravityDirAmbiguity;
40
40
  exports.resolveKimiGlobalDir = resolveKimiGlobalDir;
41
+ exports.resolveKimiHooksTomlDir = resolveKimiHooksTomlDir;
41
42
  exports.getGlobalConfigDir = getGlobalConfigDir;
42
43
  exports.resolveSkillsBaseFromDescriptor = resolveSkillsBaseFromDescriptor;
43
44
  exports.getGlobalSkillsBase = getGlobalSkillsBase;
@@ -255,6 +256,27 @@ function resolveKimiGlobalDir(opts = {}) {
255
256
  probeExists: 'skills',
256
257
  }, { env, home, existsSync: existsSyncFn });
257
258
  }
259
+ /**
260
+ * Resolve the directory holding Kimi CLI's OWN native config.toml (the file
261
+ * Kimi itself reads for providers/models/hooks/etc — see
262
+ * moonshotai.github.io/kimi-cli/en/configuration/data-locations.html and
263
+ * .../reference/kimi-command.html). Default `~/.kimi`, overridden by
264
+ * `KIMI_SHARE_DIR` per Kimi's own upstream env-var (NOT `KIMI_CONFIG_DIR`,
265
+ * which is a GSD-installer write-location override for the unrelated generic
266
+ * Agent-Skills root resolved by resolveKimiGlobalDir above).
267
+ *
268
+ * This is deliberately a SEPARATE directory from GSD's kimi configHome
269
+ * (~/.config/agents): Kimi's own docs confirm the Agent-Skills search path is
270
+ * independent of KIMI_SHARE_DIR ("This variable does not affect Agent Skills
271
+ * search paths, which are handled separately"). #2095 Upgrade 1 writes GSD's
272
+ * native [[hooks]] entries into `<this dir>/config.toml`, never into the
273
+ * skills configDir.
274
+ */
275
+ function resolveKimiHooksTomlDir(opts = {}) {
276
+ const env = opts.env ?? process.env;
277
+ const home = opts.home ?? node_os_1.default.homedir();
278
+ return resolveConfigHomeFromDescriptor({ kind: 'dot-home', name: '.kimi', env: ['KIMI_SHARE_DIR'] }, { env, home });
279
+ }
258
280
  /**
259
281
  * Return the global config base directory for the given runtime.
260
282
  * Respects the same env-var overrides as bin/install.js getGlobalDir().
@@ -296,6 +318,14 @@ function getGlobalSkillsBase(runtime) {
296
318
  const runtimeEntry = getRegistry().runtimes[runtime];
297
319
  const descriptor = runtimeEntry?.runtime;
298
320
  const globalSkillsKind = descriptor?.artifactLayout?.global?.find((entry) => entry.kind === 'skills');
321
+ // ADR-1239 upgrade 3 (#2088): honor a skills-kind `home` override (e.g. Codex
322
+ // → $HOME/.agents/skills, independent of $CODEX_HOME) so the reported skills
323
+ // root matches where the installer actually writes (the artifact layout /
324
+ // _resolveSkillsRootDir). Without this, `--skills-root` and the sync-skills
325
+ // workflow would look under configHome/skills while skills live under ~/.agents.
326
+ if (globalSkillsKind?.home && globalSkillsKind?.destSubpath) {
327
+ return node_path_1.default.join(node_os_1.default.homedir(), globalSkillsKind.home, globalSkillsKind.destSubpath);
328
+ }
299
329
  if (descriptor?.configHome && globalSkillsKind?.destSubpath) {
300
330
  return resolveSkillsBaseFromDescriptor(descriptor.configHome, { env: process.env, home: node_os_1.default.homedir(), existsSync: node_fs_1.default.existsSync }, globalSkillsKind.destSubpath);
301
331
  }