@opengsd/gsd-pi 1.1.1-dev.154fd443 → 1.1.1-dev.1854a79a
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/dist/project-sessions.js +4 -2
- package/dist/resources/.managed-resources-content-hash +1 -1
- package/dist/resources/extensions/browser-tools/index.js +39 -22
- package/dist/resources/extensions/browser-tools/state.js +12 -0
- package/dist/resources/extensions/browser-tools/tools/session.js +3 -2
- package/dist/resources/extensions/browser-tools/utils.js +3 -3
- package/dist/resources/extensions/claude-code-cli/stream-adapter.js +17 -9
- package/dist/resources/extensions/gsd/auto/contracts.js +8 -1
- package/dist/resources/extensions/gsd/auto/orchestrator.js +659 -57
- package/dist/resources/extensions/gsd/auto-prompts.js +14 -1
- package/dist/resources/extensions/gsd/auto-runtime-state.js +3 -0
- package/dist/resources/extensions/gsd/auto-tool-tracking.js +5 -0
- package/dist/resources/extensions/gsd/auto-unit-tool-scope.js +29 -0
- package/dist/resources/extensions/gsd/auto.js +62 -464
- package/dist/resources/extensions/gsd/bootstrap/register-hooks.js +2 -1
- package/dist/resources/extensions/gsd/debug-logger.js +10 -0
- package/dist/resources/extensions/gsd/doctor-proactive.js +7 -2
- package/dist/resources/extensions/gsd/markdown-renderer.js +31 -32
- package/dist/resources/extensions/gsd/mcp-filter.js +6 -0
- package/dist/resources/extensions/gsd/native-git-bridge.js +9 -0
- package/dist/resources/extensions/gsd/prompts/plan-slice.md +1 -1
- package/dist/resources/extensions/gsd/schemas/parsers.js +6 -1
- package/dist/resources/extensions/gsd/state-reconciliation/drift/artifact-db.js +21 -1
- package/dist/resources/extensions/gsd/tools/workflow-tool-executors.js +169 -20
- package/dist/web/standalone/.next/BUILD_ID +1 -1
- package/dist/web/standalone/.next/app-path-routes-manifest.json +6 -6
- package/dist/web/standalone/.next/build-manifest.json +2 -2
- package/dist/web/standalone/.next/prerender-manifest.json +3 -3
- package/dist/web/standalone/.next/server/app/_global-error.html +1 -1
- package/dist/web/standalone/.next/server/app/_global-error.rsc +1 -1
- package/dist/web/standalone/.next/server/app/_global-error.segments/_full.segment.rsc +1 -1
- package/dist/web/standalone/.next/server/app/_global-error.segments/_global-error/__PAGE__.segment.rsc +1 -1
- package/dist/web/standalone/.next/server/app/_global-error.segments/_global-error.segment.rsc +1 -1
- package/dist/web/standalone/.next/server/app/_global-error.segments/_head.segment.rsc +1 -1
- package/dist/web/standalone/.next/server/app/_global-error.segments/_index.segment.rsc +1 -1
- package/dist/web/standalone/.next/server/app/_global-error.segments/_tree.segment.rsc +1 -1
- package/dist/web/standalone/.next/server/app/_not-found.html +1 -1
- package/dist/web/standalone/.next/server/app/_not-found.rsc +1 -1
- package/dist/web/standalone/.next/server/app/_not-found.segments/_full.segment.rsc +1 -1
- package/dist/web/standalone/.next/server/app/_not-found.segments/_head.segment.rsc +1 -1
- package/dist/web/standalone/.next/server/app/_not-found.segments/_index.segment.rsc +1 -1
- package/dist/web/standalone/.next/server/app/_not-found.segments/_not-found/__PAGE__.segment.rsc +1 -1
- package/dist/web/standalone/.next/server/app/_not-found.segments/_not-found.segment.rsc +1 -1
- package/dist/web/standalone/.next/server/app/_not-found.segments/_tree.segment.rsc +1 -1
- package/dist/web/standalone/.next/server/app/api/boot/route.js.nft.json +1 -1
- package/dist/web/standalone/.next/server/app/api/bridge-terminal/input/route.js.nft.json +1 -1
- package/dist/web/standalone/.next/server/app/api/bridge-terminal/resize/route.js.nft.json +1 -1
- package/dist/web/standalone/.next/server/app/api/bridge-terminal/stream/route.js.nft.json +1 -1
- package/dist/web/standalone/.next/server/app/api/captures/route.js.nft.json +1 -1
- package/dist/web/standalone/.next/server/app/api/cleanup/route.js.nft.json +1 -1
- package/dist/web/standalone/.next/server/app/api/doctor/route.js.nft.json +1 -1
- package/dist/web/standalone/.next/server/app/api/export-data/route.js.nft.json +1 -1
- package/dist/web/standalone/.next/server/app/api/files/route.js.nft.json +1 -1
- package/dist/web/standalone/.next/server/app/api/forensics/route.js.nft.json +1 -1
- package/dist/web/standalone/.next/server/app/api/git/route.js +1 -1
- package/dist/web/standalone/.next/server/app/api/git/route.js.nft.json +1 -1
- package/dist/web/standalone/.next/server/app/api/history/route.js.nft.json +1 -1
- package/dist/web/standalone/.next/server/app/api/hooks/route.js.nft.json +1 -1
- package/dist/web/standalone/.next/server/app/api/inspect/route.js.nft.json +1 -1
- package/dist/web/standalone/.next/server/app/api/knowledge/route.js.nft.json +1 -1
- package/dist/web/standalone/.next/server/app/api/live-state/route.js.nft.json +1 -1
- package/dist/web/standalone/.next/server/app/api/mcp-connections/route.js.nft.json +1 -1
- package/dist/web/standalone/.next/server/app/api/notifications/route.js.nft.json +1 -1
- package/dist/web/standalone/.next/server/app/api/onboarding/route.js.nft.json +1 -1
- package/dist/web/standalone/.next/server/app/api/projects/route.js.nft.json +1 -1
- package/dist/web/standalone/.next/server/app/api/recovery/route.js.nft.json +1 -1
- package/dist/web/standalone/.next/server/app/api/session/browser/route.js.nft.json +1 -1
- package/dist/web/standalone/.next/server/app/api/session/command/route.js.nft.json +1 -1
- package/dist/web/standalone/.next/server/app/api/session/events/route.js.nft.json +1 -1
- package/dist/web/standalone/.next/server/app/api/session/manage/route.js.nft.json +1 -1
- package/dist/web/standalone/.next/server/app/api/settings-data/route.js.nft.json +1 -1
- package/dist/web/standalone/.next/server/app/api/shutdown/route.js.nft.json +1 -1
- package/dist/web/standalone/.next/server/app/api/skill-health/route.js.nft.json +1 -1
- package/dist/web/standalone/.next/server/app/api/steer/route.js.nft.json +1 -1
- package/dist/web/standalone/.next/server/app/api/switch-root/route.js.nft.json +1 -1
- package/dist/web/standalone/.next/server/app/api/terminal/sessions/route.js.nft.json +1 -1
- package/dist/web/standalone/.next/server/app/api/terminal/stream/route.js.nft.json +1 -1
- package/dist/web/standalone/.next/server/app/api/undo/route.js.nft.json +1 -1
- package/dist/web/standalone/.next/server/app/api/visualizer/route.js.nft.json +1 -1
- package/dist/web/standalone/.next/server/app/index.html +1 -1
- package/dist/web/standalone/.next/server/app/index.rsc +1 -1
- package/dist/web/standalone/.next/server/app/index.segments/__PAGE__.segment.rsc +1 -1
- package/dist/web/standalone/.next/server/app/index.segments/_full.segment.rsc +1 -1
- package/dist/web/standalone/.next/server/app/index.segments/_head.segment.rsc +1 -1
- package/dist/web/standalone/.next/server/app/index.segments/_index.segment.rsc +1 -1
- package/dist/web/standalone/.next/server/app/index.segments/_tree.segment.rsc +1 -1
- package/dist/web/standalone/.next/server/app-paths-manifest.json +6 -6
- package/dist/web/standalone/.next/server/chunks/5047.js +2 -0
- package/dist/web/standalone/.next/server/chunks/5124.js +1 -0
- package/dist/web/standalone/.next/server/chunks/8357.js +2 -2
- package/dist/web/standalone/.next/server/middleware-build-manifest.js +1 -1
- package/dist/web/standalone/.next/server/pages/404.html +1 -1
- package/dist/web/standalone/.next/server/pages/500.html +1 -1
- package/dist/web/standalone/.next/server/server-reference-manifest.json +1 -1
- package/dist/web/standalone/node_modules/node-pty/build/Makefile +1 -1
- package/package.json +6 -4
- package/packages/cloud-mcp-gateway/package.json +2 -2
- package/packages/contracts/package.json +1 -1
- package/packages/daemon/package.json +4 -4
- package/packages/gsd-agent-core/package.json +5 -5
- package/packages/gsd-agent-modes/dist/modes/interactive/components/assistant-message.d.ts.map +1 -1
- package/packages/gsd-agent-modes/dist/modes/interactive/components/assistant-message.js +21 -23
- package/packages/gsd-agent-modes/dist/modes/interactive/components/assistant-message.js.map +1 -1
- package/packages/gsd-agent-modes/dist/modes/interactive/components/transcript-design.js +1 -1
- package/packages/gsd-agent-modes/dist/modes/interactive/components/transcript-design.js.map +1 -1
- package/packages/gsd-agent-modes/dist/modes/interactive/controllers/chat-controller.d.ts.map +1 -1
- package/packages/gsd-agent-modes/dist/modes/interactive/controllers/chat-controller.js +18 -11
- package/packages/gsd-agent-modes/dist/modes/interactive/controllers/chat-controller.js.map +1 -1
- package/packages/gsd-agent-modes/dist/modes/interactive/interactive-chat-render.d.ts.map +1 -1
- package/packages/gsd-agent-modes/dist/modes/interactive/interactive-chat-render.js +16 -0
- package/packages/gsd-agent-modes/dist/modes/interactive/interactive-chat-render.js.map +1 -1
- package/packages/gsd-agent-modes/package.json +7 -7
- package/packages/mcp-server/package.json +3 -3
- package/packages/native/package.json +1 -1
- package/packages/pi-agent-core/package.json +1 -1
- package/packages/pi-ai/dist/models.generated.d.ts +0 -34
- package/packages/pi-ai/dist/models.generated.d.ts.map +1 -1
- package/packages/pi-ai/dist/models.generated.js +0 -34
- package/packages/pi-ai/dist/models.generated.js.map +1 -1
- package/packages/pi-ai/package.json +1 -1
- package/packages/pi-coding-agent/dist/core/auth-storage.d.ts.map +1 -1
- package/packages/pi-coding-agent/dist/core/auth-storage.js +11 -3
- package/packages/pi-coding-agent/dist/core/auth-storage.js.map +1 -1
- package/packages/pi-coding-agent/dist/core/settings-manager.js +1 -1
- package/packages/pi-coding-agent/dist/core/settings-manager.js.map +1 -1
- package/packages/pi-coding-agent/package.json +7 -7
- package/packages/pi-tui/package.json +2 -2
- package/packages/rpc-client/package.json +2 -2
- package/pkg/package.json +1 -1
- package/src/resources/extensions/browser-tools/index.ts +39 -22
- package/src/resources/extensions/browser-tools/state.ts +13 -0
- package/src/resources/extensions/browser-tools/tests/browser-tools-unit.test.cjs +57 -0
- package/src/resources/extensions/browser-tools/tools/session.ts +4 -2
- package/src/resources/extensions/browser-tools/utils.ts +3 -3
- package/src/resources/extensions/claude-code-cli/stream-adapter.ts +18 -8
- package/src/resources/extensions/claude-code-cli/tests/stream-adapter.test.ts +2 -2
- package/src/resources/extensions/gsd/auto/contracts.ts +8 -119
- package/src/resources/extensions/gsd/auto/orchestrator.ts +794 -58
- package/src/resources/extensions/gsd/auto-prompts.ts +21 -1
- package/src/resources/extensions/gsd/auto-runtime-state.ts +4 -0
- package/src/resources/extensions/gsd/auto-tool-tracking.ts +5 -0
- package/src/resources/extensions/gsd/auto-unit-tool-scope.ts +33 -0
- package/src/resources/extensions/gsd/auto.ts +81 -500
- package/src/resources/extensions/gsd/bootstrap/register-hooks.ts +2 -0
- package/src/resources/extensions/gsd/debug-logger.ts +11 -0
- package/src/resources/extensions/gsd/doctor-proactive.ts +8 -2
- package/src/resources/extensions/gsd/markdown-renderer.ts +38 -19
- package/src/resources/extensions/gsd/mcp-filter.ts +7 -0
- package/src/resources/extensions/gsd/native-git-bridge.ts +9 -0
- package/src/resources/extensions/gsd/prompts/plan-slice.md +1 -1
- package/src/resources/extensions/gsd/schemas/parsers.ts +6 -1
- package/src/resources/extensions/gsd/state-reconciliation/drift/artifact-db.ts +31 -10
- package/src/resources/extensions/gsd/tests/artifact-db-drift-memo.test.ts +66 -0
- package/src/resources/extensions/gsd/tests/auto-dispatch-baseline-harness.test.ts +53 -0
- package/src/resources/extensions/gsd/tests/auto-orchestrator.test.ts +590 -855
- package/src/resources/extensions/gsd/tests/auto-paused-ui-cleanup.test.ts +38 -10
- package/src/resources/extensions/gsd/tests/debug-logger.test.ts +15 -0
- package/src/resources/extensions/gsd/tests/execute-summary-save-empty-project.test.ts +64 -1
- package/src/resources/extensions/gsd/tests/markdown-renderer-parse-cache.test.ts +75 -0
- package/src/resources/extensions/gsd/tests/orchestrator-legacy-parity.test.ts +127 -0
- package/src/resources/extensions/gsd/tests/parse-project-milestone-bridge.test.ts +77 -0
- package/src/resources/extensions/gsd/tests/plan-slice-prompt.test.ts +4 -2
- package/src/resources/extensions/gsd/tests/start-auto-detached.test.ts +19 -5
- package/src/resources/extensions/gsd/tests/worktree-safety.test.ts +24 -0
- package/src/resources/extensions/gsd/tests/write-gate-planning-unit.test.ts +15 -3
- package/src/resources/extensions/gsd/tools/workflow-tool-executors.ts +183 -21
- package/dist/web/standalone/.next/server/chunks/678.js +0 -2
- /package/dist/web/standalone/.next/static/{vAecbJ3K9eO213bAxU8Mi → h38jfi0dnRY0y3hbyBszg}/_buildManifest.js +0 -0
- /package/dist/web/standalone/.next/static/{vAecbJ3K9eO213bAxU8Mi → h38jfi0dnRY0y3hbyBszg}/_ssgManifest.js +0 -0
|
@@ -3679,6 +3679,22 @@ export async function buildReactiveExecutePrompt(
|
|
|
3679
3679
|
// derivation, and tool handlers all consult the same source of truth.
|
|
3680
3680
|
// See gate-registry.ts for the full ownership map.
|
|
3681
3681
|
|
|
3682
|
+
/**
|
|
3683
|
+
* Adapt gate-registry guidance for section-close phases.
|
|
3684
|
+
*
|
|
3685
|
+
* Gate-registry text is shared with the gate-evaluate subagent, where
|
|
3686
|
+
* "Return verdict ..." is literal. Section-close units write artifact sections
|
|
3687
|
+
* instead, so translate that wording at render time without mutating the
|
|
3688
|
+
* canonical guidance.
|
|
3689
|
+
*/
|
|
3690
|
+
function sectionModeGuidance(guidance: string): string {
|
|
3691
|
+
return guidance.replace(
|
|
3692
|
+
/Return verdict '([^']+)'/g,
|
|
3693
|
+
(_match, verdict: string) =>
|
|
3694
|
+
verdict === "omitted" ? "Leave the section empty" : `Record a \`${verdict}\``,
|
|
3695
|
+
);
|
|
3696
|
+
}
|
|
3697
|
+
|
|
3682
3698
|
/**
|
|
3683
3699
|
* Render a "Gates to Close" block for turns like `complete-slice` and
|
|
3684
3700
|
* `validate-milestone` that own gates which are closed as a side-effect
|
|
@@ -3702,12 +3718,16 @@ function renderGatesToCloseBlock(
|
|
|
3702
3718
|
"These quality gates are still pending for this unit. You MUST address every one before calling the closing tool — the handler closes the DB row based on whether the corresponding artifact section is present.",
|
|
3703
3719
|
);
|
|
3704
3720
|
lines.push("");
|
|
3721
|
+
lines.push(
|
|
3722
|
+
"**Do NOT call `gsd_save_gate_result` (or any gate-result tool) for these gates** — that tool belongs to a different phase and the call will be blocked. You close each gate purely by writing its named section: a populated section records `pass`, an empty section records `omitted`, and the completion handler persists the verdict for you. Treat any \"return verdict\" wording in the guidance below as describing that section outcome, not as an instruction to call a tool.",
|
|
3723
|
+
);
|
|
3724
|
+
lines.push("");
|
|
3705
3725
|
for (const def of applicable) {
|
|
3706
3726
|
lines.push(`### ${def.id} — ${def.promptSection}`);
|
|
3707
3727
|
lines.push("");
|
|
3708
3728
|
lines.push(`**Question:** ${def.question}`);
|
|
3709
3729
|
lines.push("");
|
|
3710
|
-
lines.push(def.guidance);
|
|
3730
|
+
lines.push(sectionModeGuidance(def.guidance));
|
|
3711
3731
|
if (opts.allowOmit) {
|
|
3712
3732
|
lines.push("");
|
|
3713
3733
|
lines.push(
|
|
@@ -47,6 +47,10 @@ export function isAutoCompletionStopInProgress(): boolean {
|
|
|
47
47
|
return autoSession.completionStopInProgress;
|
|
48
48
|
}
|
|
49
49
|
|
|
50
|
+
export function clearAutoCompletionStopInProgress(): void {
|
|
51
|
+
autoSession.completionStopInProgress = false;
|
|
52
|
+
}
|
|
53
|
+
|
|
50
54
|
export function markToolStart(toolCallId: string, toolName?: string): void {
|
|
51
55
|
markTrackedToolStart(toolCallId, autoSession.active, toolName);
|
|
52
56
|
}
|
|
@@ -136,6 +136,11 @@ export const DETERMINISTIC_POLICY_ERROR_STRINGS = [
|
|
|
136
136
|
// "Cannot write to milestone CONTEXT.md without depth verification." for direct
|
|
137
137
|
// write tool calls to *-CONTEXT.md paths (different code path than gsd_summary_save).
|
|
138
138
|
"CONTEXT.md without depth verification",
|
|
139
|
+
// Section-close gate units (execute-task, complete-slice, validate-milestone) that
|
|
140
|
+
// reach for gsd_save_gate_result get the calm redirect from softGateToolRedirect
|
|
141
|
+
// (auto-unit-tool-scope.ts) instead of a HARD BLOCK. Still deterministic — those
|
|
142
|
+
// phases never own that tool, so a retry hits the same redirect every time.
|
|
143
|
+
"closes its quality gates by writing summary sections",
|
|
139
144
|
] as const;
|
|
140
145
|
|
|
141
146
|
/**
|
|
@@ -35,6 +35,17 @@ const EXECUTE_TASK_UNIT_TYPES = new Set([
|
|
|
35
35
|
"reactive-execute",
|
|
36
36
|
]);
|
|
37
37
|
|
|
38
|
+
// These units own quality gates, but their completion handlers persist verdicts
|
|
39
|
+
// from artifact sections. gsd_save_gate_result belongs to gate-evaluate, so keep
|
|
40
|
+
// blocking it here with a calm redirect to the section-write path.
|
|
41
|
+
const SECTION_CLOSE_GATE_UNIT_TYPES = new Set([
|
|
42
|
+
"execute-task",
|
|
43
|
+
"execute-task-simple",
|
|
44
|
+
"reactive-execute",
|
|
45
|
+
"complete-slice",
|
|
46
|
+
"validate-milestone",
|
|
47
|
+
]);
|
|
48
|
+
|
|
38
49
|
const EXTRA_SCOPED_GSD_LIFECYCLE_TOOLS = [
|
|
39
50
|
"gsd_skip_slice",
|
|
40
51
|
"gsd_slice_reopen",
|
|
@@ -52,6 +63,8 @@ const SCOPED_GSD_LIFECYCLE_TOOLS = new Set(
|
|
|
52
63
|
);
|
|
53
64
|
|
|
54
65
|
export const GSD_PHASE_SCOPE_DISPLAY_REASON = "This GSD phase only allows its scoped workflow tools.";
|
|
66
|
+
export const GSD_SECTION_CLOSE_GATE_DISPLAY_REASON =
|
|
67
|
+
"Gates here close by writing summary sections — gsd_save_gate_result isn't needed.";
|
|
55
68
|
|
|
56
69
|
type AutoUnitToolScopeResult = {
|
|
57
70
|
block: boolean;
|
|
@@ -90,6 +103,22 @@ function hardBlock(unitType: string, what: string): AutoUnitToolScopeResult {
|
|
|
90
103
|
};
|
|
91
104
|
}
|
|
92
105
|
|
|
106
|
+
// This stable marker is registered in auto-tool-tracking.ts so auto-mode treats
|
|
107
|
+
// the redirect as deterministic policy, not a retryable execution failure.
|
|
108
|
+
function softGateToolRedirect(unitType: string): AutoUnitToolScopeResult {
|
|
109
|
+
return {
|
|
110
|
+
block: true,
|
|
111
|
+
reason: [
|
|
112
|
+
`Skip this call — the "${unitType}" phase closes its quality gates by writing summary sections,`,
|
|
113
|
+
"not by calling gsd_save_gate_result (that tool belongs to the gate-evaluate phase).",
|
|
114
|
+
"Record each gate by filling its named section in your summary: a populated section records `pass`,",
|
|
115
|
+
"an empty one records `omitted`. Then call your completion tool and the handler persists every verdict.",
|
|
116
|
+
"This is expected, not an error — continue without gsd_save_gate_result.",
|
|
117
|
+
].join(" "),
|
|
118
|
+
displayReason: GSD_SECTION_CLOSE_GATE_DISPLAY_REASON,
|
|
119
|
+
};
|
|
120
|
+
}
|
|
121
|
+
|
|
93
122
|
function allowedGsdToolsForUnit(unitType: string): string[] {
|
|
94
123
|
return [...new Set(
|
|
95
124
|
(AUTO_UNIT_SCOPED_TOOLS[unitType] ?? [])
|
|
@@ -171,6 +200,10 @@ export function shouldBlockAutoUnitToolCall(
|
|
|
171
200
|
);
|
|
172
201
|
}
|
|
173
202
|
|
|
203
|
+
if (canonicalTool === "gsd_save_gate_result" && SECTION_CLOSE_GATE_UNIT_TYPES.has(unitType)) {
|
|
204
|
+
return softGateToolRedirect(unitType);
|
|
205
|
+
}
|
|
206
|
+
|
|
174
207
|
return hardBlock(
|
|
175
208
|
unitType,
|
|
176
209
|
`GSD lifecycle tool "${canonicalTool}" is not permitted; allowed GSD tools: ${allowedTools.length > 0 ? allowedTools.join(", ") : "(none)"}`,
|