@opengsd/gsd-core 1.20.0 → 1.21.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/.opencode/plugins/gsd-core.js +33 -2
- package/agents/gsd-executor.md +1 -1
- package/agents/gsd-plan-checker.md +1 -1
- package/agents/gsd-planner.md +3 -3
- package/agents/gsd-verifier.md +2 -2
- package/bin/install.js +265 -161
- package/commands/gsd/autonomous.md +1 -1
- package/commands/gsd/new-milestone.md +2 -2
- package/commands/gsd/new-project.md +2 -2
- package/gsd-core/bin/gsd-tools.cjs +554 -823
- package/gsd-core/bin/lib/capability-activation.cjs +8 -2
- package/gsd-core/bin/lib/capability-command-router.cjs +6 -2
- package/gsd-core/bin/lib/capability-ledger.cjs +1 -1
- package/gsd-core/bin/lib/capability-lock.cjs +19 -27
- package/gsd-core/bin/lib/capability-registry.cjs +74 -71
- package/gsd-core/bin/lib/capability-validator.cjs +1 -0
- package/gsd-core/bin/lib/capability-writer.cjs +7 -4
- package/gsd-core/bin/lib/claude-orchestration-command-router.cjs +142 -62
- package/gsd-core/bin/lib/claude-orchestration.cjs +214 -122
- package/gsd-core/bin/lib/cli-surface.cjs +545 -0
- package/gsd-core/bin/lib/command-arg-projection.cjs +356 -103
- package/gsd-core/bin/lib/commands.cjs +99 -2
- package/gsd-core/bin/lib/config-file-read.cjs +85 -0
- package/gsd-core/bin/lib/config-loader.cjs +23 -15
- package/gsd-core/bin/lib/config.cjs +139 -101
- package/gsd-core/bin/lib/configuration.cjs +41 -2
- package/gsd-core/bin/lib/criterion-baseline.cjs +346 -0
- package/gsd-core/bin/lib/criterion-replay.cjs +380 -0
- package/gsd-core/bin/lib/estimate-cli.cjs +5 -1
- package/gsd-core/bin/lib/gap-checker.cjs +12 -1
- package/gsd-core/bin/lib/gate-evaluation-scope.cjs +593 -27
- package/gsd-core/bin/lib/gate-phase-context.cjs +16 -4
- package/gsd-core/bin/lib/graphify.cjs +19 -2
- package/gsd-core/bin/lib/gsd-tool-dir.cjs +134 -0
- package/gsd-core/bin/lib/health-diagnostic.cjs +5 -1
- package/gsd-core/bin/lib/init.cjs +20 -18
- package/gsd-core/bin/lib/install-effort-resolver.cjs +24 -4
- package/gsd-core/bin/lib/install-engine.cjs +20 -28
- package/gsd-core/bin/lib/install-fs-adapter.cjs +5 -1
- package/gsd-core/bin/lib/install-manifest-record.cjs +86 -0
- package/gsd-core/bin/lib/install-model-override-resolver.cjs +33 -3
- package/gsd-core/bin/lib/install-profiles.cjs +4 -2
- package/gsd-core/bin/lib/io.cjs +6 -0
- package/gsd-core/bin/lib/markdown-sectionizer.cjs +62 -31
- package/gsd-core/bin/lib/markdown-table.cjs +39 -1
- package/gsd-core/bin/lib/milestone.cjs +8 -6
- package/gsd-core/bin/lib/model-resolver.cjs +8 -4
- package/gsd-core/bin/lib/phase-entry-grammar.cjs +14 -0
- package/gsd-core/bin/lib/phase-id.cjs +26 -9
- package/gsd-core/bin/lib/phase-locator.cjs +8 -3
- package/gsd-core/bin/lib/phase.cjs +170 -45
- package/gsd-core/bin/lib/plan-dependency-graph.cjs +46 -23
- package/gsd-core/bin/lib/planning-snapshot.cjs +10 -6
- package/gsd-core/bin/lib/planning-workspace.cjs +20 -10
- package/gsd-core/bin/lib/profile-output.cjs +9 -6
- package/gsd-core/bin/lib/project-context.cjs +439 -0
- package/gsd-core/bin/lib/project-root.cjs +9 -230
- package/gsd-core/bin/lib/quick-batch-dispatch.cjs +1 -1
- package/gsd-core/bin/lib/report-parser.cjs +16 -0
- package/gsd-core/bin/lib/roadmap-parser.cjs +357 -50
- package/gsd-core/bin/lib/roadmap-upgrade.cjs +24 -5
- package/gsd-core/bin/lib/roadmap.cjs +2 -2
- package/gsd-core/bin/lib/runtime-artifact-conversion.cjs +317 -134
- package/gsd-core/bin/lib/runtime-artifact-install-plan.cjs +81 -3
- package/gsd-core/bin/lib/runtime-artifact-layout.cjs +6 -0
- package/gsd-core/bin/lib/runtime-hooks-surface.cjs +279 -8
- package/gsd-core/bin/lib/runtime-slash.cjs +7 -2
- package/gsd-core/bin/lib/shell-command-projection.cjs +1010 -10
- package/gsd-core/bin/lib/stale-bake-guard.cjs +4 -1
- package/gsd-core/bin/lib/state-transition.cjs +103 -46
- package/gsd-core/bin/lib/state.cjs +448 -63
- package/gsd-core/bin/lib/surface.cjs +4 -7
- package/gsd-core/bin/lib/tdd-red-evidence.cjs +10 -3
- package/gsd-core/bin/lib/verify-command-router.cjs +6 -1
- package/gsd-core/bin/lib/verify.cjs +49 -6
- package/gsd-core/bin/lib/workstream-inventory.cjs +4 -4
- package/gsd-core/bin/lib/worktree-base-ref.cjs +32 -2
- package/gsd-core/bin/lib/worktree-safety.cjs +8 -111
- package/gsd-core/bin/shared/config-schema.manifest.json +1 -0
- package/gsd-core/references/autonomous-smart-discuss.md +99 -18
- package/gsd-core/references/checkpoints.md +1 -1
- package/gsd-core/references/planner-guidance.md +11 -0
- package/gsd-core/references/planner-human-verify-mode.md +1 -1
- package/gsd-core/references/planner-reversibility.md +2 -0
- package/gsd-core/references/planner-verify-command-grounding.md +22 -6
- package/gsd-core/workflows/autonomous.md +4 -4
- package/gsd-core/workflows/code-review-fix.md +5 -7
- package/gsd-core/workflows/execute-phase.md +21 -7
- package/gsd-core/workflows/plan-phase/steps/plan-pre-dispatch.md +101 -0
- package/gsd-core/workflows/plan-phase.md +18 -19
- package/hooks/dist/gsd-agent-isolation-guard.js +4 -3
- package/hooks/dist/gsd-config-reload.js +2 -2
- package/hooks/dist/gsd-context-monitor.js +2 -1
- package/hooks/dist/gsd-cursor-subagent-start.js +9 -6
- package/hooks/dist/gsd-read-injection-scanner.js +2 -2
- package/hooks/dist/gsd-secret-read-guard.js +141 -6
- package/hooks/dist/gsd-statusline.js +3 -2
- package/hooks/dist/gsd-workflow-guard.js +2 -1
- package/hooks/dist/lib/config-read.js +49 -0
- package/hooks/dist/lib/git-cmd.js +3 -1
- package/hooks/dist/lib/git-head-tree.js +474 -0
- package/hooks/dist/lib/isolation-sentinel.js +168 -13
- package/hooks/dist/lib/secret-read-exemptions.js +161 -0
- package/hooks/gsd-agent-isolation-guard.js +4 -3
- package/hooks/gsd-config-reload.js +2 -2
- package/hooks/gsd-context-monitor.js +2 -1
- package/hooks/gsd-cursor-subagent-start.js +9 -6
- package/hooks/gsd-read-injection-scanner.js +2 -2
- package/hooks/gsd-secret-read-guard.js +141 -6
- package/hooks/gsd-statusline.js +3 -2
- package/hooks/gsd-workflow-guard.js +2 -1
- package/hooks/lib/config-read.js +49 -0
- package/hooks/lib/git-cmd.js +3 -1
- package/hooks/lib/git-head-tree.js +474 -0
- package/hooks/lib/isolation-sentinel.js +168 -13
- package/hooks/lib/secret-read-exemptions.js +161 -0
- package/package.json +7 -2
- package/pi/package-agents/gsd-executor.md +1 -1
- package/pi/package-agents/gsd-plan-checker.md +1 -1
- package/pi/package-agents/gsd-planner.md +3 -3
- package/pi/package-agents/gsd-verifier.md +2 -2
- package/pi/package-agents/manifest.json +4 -4
- package/pi/package-skills/gsd-autonomous/SKILL.md +1 -1
- package/pi/package-skills/gsd-new-milestone/SKILL.md +1 -1
- package/pi/package-skills/gsd-new-project/SKILL.md +1 -1
- package/scripts/changeset/cli.cjs +2 -2
- package/scripts/changeset/lint.cjs +28 -3
- package/scripts/changeset/serialize.cjs +12 -2
- package/scripts/ci-compact-v8-coverage.cjs +204 -0
- package/scripts/ci-fix-next-rerun.cjs +149 -0
- package/scripts/ci-next-health.cjs +52 -9
- package/scripts/ci-test-scope.cjs +77 -71
- package/scripts/command-contract-helpers.cjs +56 -7
- package/scripts/docs-guard-registry.cjs +3 -0
- package/scripts/gen-cli-surface-manifest.cjs +287 -0
- package/scripts/gen-platform-conformance-tier.cjs +258 -19
- package/scripts/lib/macos-conformance-tier.generated.cjs +59 -47
- package/scripts/lib/platform-conformance-tier.generated.cjs +23 -64
- package/scripts/lib/shellcheck-fetch.cjs +71 -4
- package/scripts/lint-removed-but-needed.cjs +562 -50
- package/scripts/merge-commit-pr.cjs +186 -0
- package/scripts/release-ancestry.cjs +86 -0
- package/scripts/release-notes/changelog-release-notes.cjs +345 -0
- package/scripts/release-notes/discord-release-summary.cjs +82 -1
- package/scripts/release-pipeline-pr.cjs +92 -0
- package/scripts/require-issue-link-policy.cjs +18 -9
- package/scripts/sync-next-version.cjs +11 -2
- package/scripts/timeout-evidence-from-ci.cjs +964 -0
- package/skills/gsd-autonomous/SKILL.md +1 -1
- package/skills/gsd-new-milestone/SKILL.md +1 -1
- package/skills/gsd-new-project/SKILL.md +1 -1
- package/vscode/package.json +1 -1
|
@@ -14,6 +14,9 @@ const node_fs_1 = __importDefault(require("node:fs"));
|
|
|
14
14
|
const node_path_1 = __importDefault(require("node:path"));
|
|
15
15
|
const shell_command_projection_cjs_1 = require("./shell-command-projection.cjs");
|
|
16
16
|
const phase_entry_grammar_cjs_1 = require("./phase-entry-grammar.cjs");
|
|
17
|
+
// eslint-disable-next-line @typescript-eslint/no-require-imports -- config-file-read.cjs is an export= CommonJS module
|
|
18
|
+
const configFileReadMod = require("./config-file-read.cjs");
|
|
19
|
+
const { readConfigFileBounded } = configFileReadMod;
|
|
17
20
|
// eslint-disable-next-line @typescript-eslint/no-require-imports
|
|
18
21
|
const planningWorkspace = require("./planning-workspace.cjs");
|
|
19
22
|
// eslint-disable-next-line @typescript-eslint/no-require-imports
|
|
@@ -882,7 +885,10 @@ function computeBracketPlan(cwd) {
|
|
|
882
885
|
};
|
|
883
886
|
let configData = {};
|
|
884
887
|
try {
|
|
885
|
-
|
|
888
|
+
// Bounded read (#5759): a FIFO/device/oversized config is treated like an absent one.
|
|
889
|
+
const rawConfig = readConfigFileBounded(configPath);
|
|
890
|
+
if (rawConfig !== null)
|
|
891
|
+
configData = JSON.parse(rawConfig);
|
|
886
892
|
}
|
|
887
893
|
catch { /* config may not exist */ }
|
|
888
894
|
const projectCode = typeof configData['project_code'] === 'string' && configData['project_code'].length > 0
|
|
@@ -1086,7 +1092,7 @@ function computeBracketPlan(cwd) {
|
|
|
1086
1092
|
// never `null` (unlimited). Comparing under a DIFFERENT rule than the one
|
|
1087
1093
|
// that created the directory refused two-milestone roadmaps the
|
|
1088
1094
|
// tooling's own commands produced.
|
|
1089
|
-
const slugify = (text) => (coreUtilsMod.generateSlugInternal(
|
|
1095
|
+
const slugify = (text) => (coreUtilsMod.generateSlugInternal((0, phase_entry_grammar_cjs_1.stripInsertedMarker)(text)) ?? '');
|
|
1090
1096
|
// #4144 round 7 W2, corrected round 8 B1: a plan-level ambiguity check
|
|
1091
1097
|
// that runs BEFORE the resolution loop below and never touches its
|
|
1092
1098
|
// (unmodified, round-6) algorithm. For every directory that structurally
|
|
@@ -1621,7 +1627,10 @@ function computeMigrationPlan(cwd, options = {}) {
|
|
|
1621
1627
|
// ── Check config for existing convention ─────────────────────────────────
|
|
1622
1628
|
let configData = {};
|
|
1623
1629
|
try {
|
|
1624
|
-
|
|
1630
|
+
// Bounded read (#5759): a FIFO/device/oversized config is treated like an absent one.
|
|
1631
|
+
const rawConfig = readConfigFileBounded(configPath);
|
|
1632
|
+
if (rawConfig !== null)
|
|
1633
|
+
configData = JSON.parse(rawConfig);
|
|
1625
1634
|
}
|
|
1626
1635
|
catch { /* config may not exist */ }
|
|
1627
1636
|
if (configData['phase_id_convention'] === 'milestone-prefixed') {
|
|
@@ -2110,9 +2119,19 @@ function applyMigration(cwd, plan, options = {}) {
|
|
|
2110
2119
|
if (plan.phases.length > 0 || plan.roadmapEdits.length > 0) {
|
|
2111
2120
|
let configData = {};
|
|
2112
2121
|
try {
|
|
2113
|
-
|
|
2122
|
+
// Bounded read (#5759): the stamp below is written to configPath, so a FIFO/device/
|
|
2123
|
+
// oversized config is refused (and rolled back) rather than read or written blindly.
|
|
2124
|
+
const rawConfig = readConfigFileBounded(configPath);
|
|
2125
|
+
if (rawConfig !== null)
|
|
2126
|
+
configData = JSON.parse(rawConfig);
|
|
2127
|
+
}
|
|
2128
|
+
catch (err) {
|
|
2129
|
+
const code = err.code;
|
|
2130
|
+
if (code === 'ENXIO' || code === 'EISDIR' || code === 'EFBIG') {
|
|
2131
|
+
throw new Error(`config.json cannot be updated: it is not a regular file within the size limit (${code})`);
|
|
2132
|
+
}
|
|
2133
|
+
/* config may not exist yet, or may not parse */
|
|
2114
2134
|
}
|
|
2115
|
-
catch { /* config may not exist yet */ }
|
|
2116
2135
|
configData['phase_id_convention'] = plan.targetConvention ?? 'milestone-prefixed';
|
|
2117
2136
|
snapshotFile(configPath);
|
|
2118
2137
|
try {
|
|
@@ -171,7 +171,7 @@ function searchPhaseInContent(content, escapedPhase, phaseNum, convention) {
|
|
|
171
171
|
}
|
|
172
172
|
return null;
|
|
173
173
|
}
|
|
174
|
-
const phaseName = headerMatch[1]
|
|
174
|
+
const phaseName = (0, phase_entry_grammar_cjs_1.stripInsertedMarker)(headerMatch[1]);
|
|
175
175
|
const headerIndex = headings[headingIndex].offset;
|
|
176
176
|
const currentHeading = headings[headingIndex];
|
|
177
177
|
const nextHeading = headings
|
|
@@ -395,7 +395,7 @@ function collectAnalyzePhases(cwd, content, phasesDir, phaseDirNames, convention
|
|
|
395
395
|
if (isSentinelPhase(phaseNum, bracketId))
|
|
396
396
|
continue;
|
|
397
397
|
detailKeys.add(occurrenceKey(phaseNum, bracketId));
|
|
398
|
-
const phaseName = match[2 + G]
|
|
398
|
+
const phaseName = (0, phase_entry_grammar_cjs_1.stripInsertedMarker)(match[2 + G]);
|
|
399
399
|
// Extract goal from the section
|
|
400
400
|
const sectionStart = match.index;
|
|
401
401
|
const restOfContent = content.slice(sectionStart);
|