@opengsd/gsd-pi 1.1.1-dev.a5a2de8 → 1.1.1-dev.b2556262
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/headless-recover.js +56 -1
- package/dist/resources/.managed-resources-content-hash +1 -1
- package/dist/resources/extensions/browser-tools/engine/managed-gsd-browser.js +18 -2
- package/dist/resources/extensions/browser-tools/engine/selection.js +1 -1
- package/dist/resources/extensions/browser-tools/extension-manifest.json +1 -1
- package/dist/resources/extensions/browser-tools/index.js +68 -24
- 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/browser-tools/web-app-detect.js +52 -0
- package/dist/resources/extensions/gsd/auto/loop.js +4 -2
- package/dist/resources/extensions/gsd/auto/phases.js +87 -12
- package/dist/resources/extensions/gsd/auto/session.js +22 -1
- package/dist/resources/extensions/gsd/auto/workflow-kernel.js +1 -0
- package/dist/resources/extensions/gsd/auto-dispatch.js +81 -13
- package/dist/resources/extensions/gsd/auto-model-selection.js +154 -9
- package/dist/resources/extensions/gsd/auto-post-unit.js +19 -2
- package/dist/resources/extensions/gsd/auto-prompts.js +26 -21
- package/dist/resources/extensions/gsd/auto-recovery.js +4 -2
- package/dist/resources/extensions/gsd/auto-runtime-state.js +3 -0
- package/dist/resources/extensions/gsd/auto-start.js +1 -1
- package/dist/resources/extensions/gsd/auto-timers.js +24 -10
- package/dist/resources/extensions/gsd/auto.js +40 -15
- package/dist/resources/extensions/gsd/bootstrap/db-tools.js +3 -3
- package/dist/resources/extensions/gsd/bootstrap/register-hooks.js +192 -77
- package/dist/resources/extensions/gsd/bootstrap/system-context.js +1 -1
- package/dist/resources/extensions/gsd/closeout-wizard.js +32 -9
- package/dist/resources/extensions/gsd/commands/handlers/auto.js +10 -0
- package/dist/resources/extensions/gsd/commands/handlers/ops.js +2 -9
- package/dist/resources/extensions/gsd/commands-maintenance.js +93 -15
- package/dist/resources/extensions/gsd/commands-mcp-status.js +1 -1
- package/dist/resources/extensions/gsd/commands-prefs-wizard.js +2 -2
- package/dist/resources/extensions/gsd/config-overlay.js +1 -0
- package/dist/resources/extensions/gsd/context-masker.js +129 -5
- package/dist/resources/extensions/gsd/db-writer.js +35 -0
- package/dist/resources/extensions/gsd/docs/preferences-reference.md +50 -1
- package/dist/resources/extensions/gsd/gsd-db.js +480 -172
- package/dist/resources/extensions/gsd/guided-flow.js +4 -1
- package/dist/resources/extensions/gsd/markdown-renderer.js +37 -53
- package/dist/resources/extensions/gsd/md-importer.js +38 -3
- package/dist/resources/extensions/gsd/migration-auto-check.js +126 -31
- package/dist/resources/extensions/gsd/parsers-legacy.js +23 -0
- package/dist/resources/extensions/gsd/planner-handoff.js +98 -0
- package/dist/resources/extensions/gsd/planning-path-scope.js +22 -4
- package/dist/resources/extensions/gsd/pre-execution-checks.js +10 -2
- package/dist/resources/extensions/gsd/preferences-models.js +111 -43
- package/dist/resources/extensions/gsd/preferences-types.js +13 -0
- package/dist/resources/extensions/gsd/preferences-validation.js +68 -3
- package/dist/resources/extensions/gsd/preferences.js +4 -1
- package/dist/resources/extensions/gsd/prompts/gate-evaluate.md +1 -1
- package/dist/resources/extensions/gsd/prompts/plan-milestone.md +1 -1
- package/dist/resources/extensions/gsd/prompts/plan-slice.md +1 -1
- package/dist/resources/extensions/gsd/prompts/refine-slice.md +1 -1
- package/dist/resources/extensions/gsd/prompts/run-uat.md +2 -2
- package/dist/resources/extensions/gsd/prompts/system.md +1 -1
- package/dist/resources/extensions/gsd/roadmap-slices.js +5 -1
- package/dist/resources/extensions/gsd/safety/content-validator.js +6 -4
- package/dist/resources/extensions/gsd/skill-manifest.js +12 -0
- package/dist/resources/extensions/gsd/source-observations.js +306 -0
- package/dist/resources/extensions/gsd/state-reconciliation/drift/completion.js +15 -8
- package/dist/resources/extensions/gsd/state-reconciliation/drift/stale-render.js +33 -5
- package/dist/resources/extensions/gsd/state-reconciliation/drift/stale-worker.js +34 -13
- package/dist/resources/extensions/gsd/state-reconciliation/index.js +39 -14
- package/dist/resources/extensions/gsd/state-reconciliation/spawn-gate.js +4 -4
- package/dist/resources/extensions/gsd/state.js +7 -3
- package/dist/resources/extensions/gsd/tool-contract.js +15 -1
- package/dist/resources/extensions/gsd/tool-presentation-plan.js +24 -2
- package/dist/resources/extensions/gsd/tools/complete-slice.js +28 -0
- package/dist/resources/extensions/gsd/tools/plan-slice.js +42 -11
- package/dist/resources/extensions/gsd/tools/plan-task.js +7 -1
- package/dist/resources/extensions/gsd/tools/workflow-tool-executors.js +62 -406
- package/dist/resources/extensions/gsd/uat-policy.js +130 -0
- package/dist/resources/extensions/gsd/uat-run.js +414 -0
- package/dist/resources/extensions/gsd/unit-context-manifest.js +3 -4
- package/dist/resources/extensions/gsd/unit-tool-contracts.js +38 -14
- package/dist/resources/extensions/gsd/verdict-parser.js +3 -8
- package/dist/resources/extensions/gsd/workflow-manifest.js +132 -5
- package/dist/resources/extensions/gsd/workflow-mcp.js +2 -3
- package/dist/resources/extensions/gsd/workflow-projections.js +8 -0
- package/dist/resources/extensions/gsd/worktree-manager.js +26 -0
- package/dist/resources/extensions/gsd/worktree-reentry.js +96 -0
- package/dist/resources/extensions/gsd/worktree-state-projection.js +18 -17
- package/dist/resources/extensions/shared/gsd-browser-cli.js +6 -0
- package/dist/resources/extensions/subagent/agents.js +1 -0
- package/dist/resources/extensions/subagent/index.js +27 -12
- package/dist/resources/extensions/subagent/launch.js +7 -2
- 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/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/8357.js +1 -1
- 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/@gsd/native/dist/native.js +22 -0
- package/dist/web/standalone/node_modules/node-pty/build/Makefile +1 -1
- package/package.json +4 -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/tool-execution.d.ts +3 -0
- package/packages/gsd-agent-modes/dist/modes/interactive/components/tool-execution.d.ts.map +1 -1
- package/packages/gsd-agent-modes/dist/modes/interactive/components/tool-execution.js +25 -0
- package/packages/gsd-agent-modes/dist/modes/interactive/components/tool-execution.js.map +1 -1
- package/packages/gsd-agent-modes/dist/modes/interactive/components/transcript-design.d.ts +1 -0
- package/packages/gsd-agent-modes/dist/modes/interactive/components/transcript-design.d.ts.map +1 -1
- package/packages/gsd-agent-modes/dist/modes/interactive/components/transcript-design.js +66 -12
- 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/dist/workflow-tools.js +1 -1
- package/packages/mcp-server/dist/workflow-tools.js.map +1 -1
- package/packages/mcp-server/package.json +3 -3
- package/packages/native/dist/native.js +22 -0
- package/packages/native/package.json +1 -1
- package/packages/pi-agent-core/package.json +1 -1
- package/packages/pi-ai/dist/image-models.generated.d.ts +30 -0
- package/packages/pi-ai/dist/image-models.generated.d.ts.map +1 -1
- package/packages/pi-ai/dist/image-models.generated.js +30 -0
- package/packages/pi-ai/dist/image-models.generated.js.map +1 -1
- package/packages/pi-ai/dist/models.generated.d.ts +174 -29
- package/packages/pi-ai/dist/models.generated.d.ts.map +1 -1
- package/packages/pi-ai/dist/models.generated.js +178 -54
- package/packages/pi-ai/dist/models.generated.js.map +1 -1
- package/packages/pi-ai/dist/providers/transform-messages.d.ts.map +1 -1
- package/packages/pi-ai/dist/providers/transform-messages.js +8 -1
- package/packages/pi-ai/dist/providers/transform-messages.js.map +1 -1
- package/packages/pi-ai/package.json +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/dist/theme/themes.js +1 -1
- package/packages/pi-coding-agent/dist/theme/themes.js.map +1 -1
- package/packages/pi-coding-agent/package.json +7 -7
- package/packages/pi-tui/dist/utils.d.ts +11 -0
- package/packages/pi-tui/dist/utils.d.ts.map +1 -1
- package/packages/pi-tui/dist/utils.js +119 -6
- package/packages/pi-tui/dist/utils.js.map +1 -1
- package/packages/pi-tui/package.json +2 -1
- package/packages/rpc-client/package.json +2 -2
- package/pkg/dist/theme/themes.js +1 -1
- package/pkg/dist/theme/themes.js.map +1 -1
- package/pkg/package.json +1 -1
- package/scripts/install/handoff.js +16 -3
- package/src/resources/extensions/browser-tools/engine/managed-gsd-browser.ts +21 -2
- package/src/resources/extensions/browser-tools/engine/selection.ts +1 -1
- package/src/resources/extensions/browser-tools/extension-manifest.json +1 -1
- package/src/resources/extensions/browser-tools/index.ts +75 -27
- package/src/resources/extensions/browser-tools/state.ts +13 -0
- package/src/resources/extensions/browser-tools/tests/browser-engine-selection.test.mjs +2 -2
- package/src/resources/extensions/browser-tools/tests/browser-tools-unit.test.cjs +57 -0
- package/src/resources/extensions/browser-tools/tests/gsd-browser-launch-config.test.mjs +37 -0
- package/src/resources/extensions/browser-tools/tests/web-app-detect.test.mjs +68 -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/browser-tools/web-app-detect.ts +63 -0
- package/src/resources/extensions/gsd/auto/loop-deps.ts +1 -0
- package/src/resources/extensions/gsd/auto/loop.ts +4 -2
- package/src/resources/extensions/gsd/auto/phases.ts +89 -15
- package/src/resources/extensions/gsd/auto/session.ts +24 -1
- package/src/resources/extensions/gsd/auto/workflow-kernel.ts +1 -0
- package/src/resources/extensions/gsd/auto-dispatch.ts +117 -12
- package/src/resources/extensions/gsd/auto-model-selection.ts +190 -12
- package/src/resources/extensions/gsd/auto-post-unit.ts +20 -2
- package/src/resources/extensions/gsd/auto-prompts.ts +25 -22
- package/src/resources/extensions/gsd/auto-recovery.ts +22 -3
- package/src/resources/extensions/gsd/auto-runtime-state.ts +5 -0
- package/src/resources/extensions/gsd/auto-start.ts +1 -1
- package/src/resources/extensions/gsd/auto-timers.ts +25 -9
- package/src/resources/extensions/gsd/auto.ts +41 -14
- package/src/resources/extensions/gsd/bootstrap/db-tools.ts +3 -3
- package/src/resources/extensions/gsd/bootstrap/register-hooks.ts +250 -78
- package/src/resources/extensions/gsd/bootstrap/system-context.ts +1 -1
- package/src/resources/extensions/gsd/closeout-wizard.ts +47 -13
- package/src/resources/extensions/gsd/commands/handlers/auto.ts +9 -0
- package/src/resources/extensions/gsd/commands/handlers/ops.ts +2 -17
- package/src/resources/extensions/gsd/commands-maintenance.ts +124 -13
- package/src/resources/extensions/gsd/commands-mcp-status.ts +1 -1
- package/src/resources/extensions/gsd/commands-prefs-wizard.ts +2 -2
- package/src/resources/extensions/gsd/config-overlay.ts +1 -0
- package/src/resources/extensions/gsd/context-masker.ts +152 -5
- package/src/resources/extensions/gsd/db-writer.ts +38 -0
- package/src/resources/extensions/gsd/docs/preferences-reference.md +50 -1
- package/src/resources/extensions/gsd/gsd-db.ts +564 -186
- package/src/resources/extensions/gsd/guided-flow.ts +4 -1
- package/src/resources/extensions/gsd/markdown-renderer.ts +44 -66
- package/src/resources/extensions/gsd/md-importer.ts +49 -2
- package/src/resources/extensions/gsd/migration-auto-check.ts +154 -34
- package/src/resources/extensions/gsd/parsers-legacy.ts +20 -0
- package/src/resources/extensions/gsd/planner-handoff.ts +149 -0
- package/src/resources/extensions/gsd/planning-path-scope.ts +22 -4
- package/src/resources/extensions/gsd/pre-execution-checks.ts +9 -2
- package/src/resources/extensions/gsd/preferences-models.ts +113 -43
- package/src/resources/extensions/gsd/preferences-types.ts +47 -0
- package/src/resources/extensions/gsd/preferences-validation.ts +76 -2
- package/src/resources/extensions/gsd/preferences.ts +5 -0
- package/src/resources/extensions/gsd/prompts/gate-evaluate.md +1 -1
- package/src/resources/extensions/gsd/prompts/plan-milestone.md +1 -1
- package/src/resources/extensions/gsd/prompts/plan-slice.md +1 -1
- package/src/resources/extensions/gsd/prompts/refine-slice.md +1 -1
- package/src/resources/extensions/gsd/prompts/run-uat.md +2 -2
- package/src/resources/extensions/gsd/prompts/system.md +1 -1
- package/src/resources/extensions/gsd/roadmap-slices.ts +6 -1
- package/src/resources/extensions/gsd/safety/content-validator.ts +8 -5
- package/src/resources/extensions/gsd/skill-manifest.ts +12 -0
- package/src/resources/extensions/gsd/source-observations.ts +402 -0
- package/src/resources/extensions/gsd/state-reconciliation/drift/completion.ts +20 -8
- package/src/resources/extensions/gsd/state-reconciliation/drift/stale-render.ts +44 -5
- package/src/resources/extensions/gsd/state-reconciliation/drift/stale-worker.ts +39 -11
- package/src/resources/extensions/gsd/state-reconciliation/index.ts +45 -15
- package/src/resources/extensions/gsd/state-reconciliation/spawn-gate.ts +4 -4
- package/src/resources/extensions/gsd/state.ts +7 -4
- package/src/resources/extensions/gsd/tests/auto-loop.test.ts +114 -0
- package/src/resources/extensions/gsd/tests/auto-model-selection-tool-poisoning.test.ts +66 -4
- package/src/resources/extensions/gsd/tests/auto-model-selection.test.ts +299 -1
- package/src/resources/extensions/gsd/tests/auto-paused-ui-cleanup.test.ts +32 -0
- package/src/resources/extensions/gsd/tests/auto-phases-lifecycle.test.ts +75 -3
- package/src/resources/extensions/gsd/tests/auto-recovery.test.ts +22 -1
- package/src/resources/extensions/gsd/tests/auto-supervisor.test.mjs +4 -0
- package/src/resources/extensions/gsd/tests/before-provider-context-management.test.ts +145 -0
- package/src/resources/extensions/gsd/tests/bundled-skill-triggers.test.ts +9 -0
- package/src/resources/extensions/gsd/tests/closeout-wizard.test.ts +44 -0
- package/src/resources/extensions/gsd/tests/commands-dispatcher-unmerged-milestone.test.ts +26 -1
- package/src/resources/extensions/gsd/tests/complete-slice-verification-gate.test.ts +118 -0
- package/src/resources/extensions/gsd/tests/content-validator.test.ts +74 -0
- package/src/resources/extensions/gsd/tests/context-masker.test.ts +56 -1
- package/src/resources/extensions/gsd/tests/custom-engine-loop-integration.test.ts +17 -2
- package/src/resources/extensions/gsd/tests/dispatch-rule-coverage.test.ts +24 -0
- package/src/resources/extensions/gsd/tests/doctor-scope-db-unavailable.test.ts +1 -11
- package/src/resources/extensions/gsd/tests/gate-dispatch.test.ts +64 -0
- package/src/resources/extensions/gsd/tests/gate-storage.test.ts +15 -0
- package/src/resources/extensions/gsd/tests/gsd-recover.test.ts +62 -1
- package/src/resources/extensions/gsd/tests/integration/run-uat.test.ts +4 -1
- package/src/resources/extensions/gsd/tests/interrupted-session-auto.test.ts +27 -0
- package/src/resources/extensions/gsd/tests/journal-integration.test.ts +16 -0
- package/src/resources/extensions/gsd/tests/markdown-renderer.test.ts +42 -0
- package/src/resources/extensions/gsd/tests/mcp-project-config.test.ts +7 -1
- package/src/resources/extensions/gsd/tests/mcp-status.test.ts +1 -1
- package/src/resources/extensions/gsd/tests/migration-auto-check.test.ts +99 -0
- package/src/resources/extensions/gsd/tests/plan-slice.test.ts +99 -2
- package/src/resources/extensions/gsd/tests/plan-task.test.ts +19 -0
- package/src/resources/extensions/gsd/tests/planner-handoff.test.ts +100 -0
- package/src/resources/extensions/gsd/tests/preferences.test.ts +14 -0
- package/src/resources/extensions/gsd/tests/prefs-wizard-coverage.test.ts +1 -0
- package/src/resources/extensions/gsd/tests/prompt-contracts.test.ts +133 -0
- package/src/resources/extensions/gsd/tests/provider-switch-observer.test.ts +55 -0
- package/src/resources/extensions/gsd/tests/register-hooks-depth-verification.test.ts +101 -1
- package/src/resources/extensions/gsd/tests/repository-registry.test.ts +2 -2
- package/src/resources/extensions/gsd/tests/runtime-invariant-modules.test.ts +28 -0
- package/src/resources/extensions/gsd/tests/schema-v21-sequence.test.ts +5 -3
- package/src/resources/extensions/gsd/tests/schema-v27-v28-sequence.test.ts +162 -18
- package/src/resources/extensions/gsd/tests/skill-manifest.test.ts +4 -3
- package/src/resources/extensions/gsd/tests/skipped-validation-db-atomicity.test.ts +8 -0
- package/src/resources/extensions/gsd/tests/source-observations.test.ts +275 -0
- package/src/resources/extensions/gsd/tests/stale-queued-milestone.test.ts +43 -0
- package/src/resources/extensions/gsd/tests/state-reconciliation-drift.test.ts +76 -21
- package/src/resources/extensions/gsd/tests/thinking-level-resolution.test.ts +203 -0
- package/src/resources/extensions/gsd/tests/uat-policy.test.ts +170 -0
- package/src/resources/extensions/gsd/tests/unit-context-manifest.test.ts +7 -1
- package/src/resources/extensions/gsd/tests/workflow-kernel.test.ts +7 -0
- package/src/resources/extensions/gsd/tests/workflow-manifest.test.ts +306 -1
- package/src/resources/extensions/gsd/tests/workflow-mcp.test.ts +77 -10
- package/src/resources/extensions/gsd/tests/workflow-tool-executors.test.ts +260 -5
- package/src/resources/extensions/gsd/tests/worktree-db.test.ts +511 -1
- package/src/resources/extensions/gsd/tests/worktree-reentry.test.ts +102 -0
- package/src/resources/extensions/gsd/tests/worktree-state-projection.test.ts +44 -0
- package/src/resources/extensions/gsd/tool-contract.ts +29 -1
- package/src/resources/extensions/gsd/tool-presentation-plan.ts +41 -6
- package/src/resources/extensions/gsd/tools/complete-slice.ts +29 -0
- package/src/resources/extensions/gsd/tools/plan-slice.ts +54 -12
- package/src/resources/extensions/gsd/tools/plan-task.ts +8 -1
- package/src/resources/extensions/gsd/tools/workflow-tool-executors.ts +71 -489
- package/src/resources/extensions/gsd/types.ts +1 -0
- package/src/resources/extensions/gsd/uat-policy.ts +191 -0
- package/src/resources/extensions/gsd/uat-run.ts +550 -0
- package/src/resources/extensions/gsd/unit-context-manifest.ts +3 -4
- package/src/resources/extensions/gsd/unit-tool-contracts.ts +38 -14
- package/src/resources/extensions/gsd/verdict-parser.ts +3 -10
- package/src/resources/extensions/gsd/workflow-manifest.ts +193 -7
- package/src/resources/extensions/gsd/workflow-mcp.ts +2 -3
- package/src/resources/extensions/gsd/workflow-projections.ts +9 -0
- package/src/resources/extensions/gsd/worktree-manager.ts +32 -0
- package/src/resources/extensions/gsd/worktree-reentry.ts +103 -0
- package/src/resources/extensions/gsd/worktree-state-projection.ts +22 -22
- package/src/resources/extensions/shared/gsd-browser-cli.ts +6 -0
- package/src/resources/extensions/shared/tests/format-utils.test.ts +8 -3
- package/src/resources/extensions/subagent/agents.ts +4 -0
- package/src/resources/extensions/subagent/index.ts +28 -3
- package/src/resources/extensions/subagent/launch.ts +8 -0
- package/src/resources/extensions/subagent/tests/model-override.test.ts +31 -0
- /package/dist/web/standalone/.next/static/{9y3LeeR2uGr2yRj9RjY3D → tJOKQbQRO-9MiFDO8DIDS}/_buildManifest.js +0 -0
- /package/dist/web/standalone/.next/static/{9y3LeeR2uGr2yRj9RjY3D → tJOKQbQRO-9MiFDO8DIDS}/_ssgManifest.js +0 -0
|
@@ -3,6 +3,7 @@
|
|
|
3
3
|
import { resolveManifest, } from "./unit-context-manifest.js";
|
|
4
4
|
import { getRequiredWorkflowToolsForAutoUnit } from "./workflow-mcp.js";
|
|
5
5
|
import { getUnitToolSurfaceContract } from "./unit-tool-contracts.js";
|
|
6
|
+
import { WHOLE_FILE_OBSERVATION_MAX_BYTES, WHOLE_FILE_OBSERVATION_MAX_LINES, } from "./source-observations.js";
|
|
6
7
|
export function compileUnitToolContract(unitType) {
|
|
7
8
|
const manifest = resolveManifest(unitType);
|
|
8
9
|
const surfaceContract = getUnitToolSurfaceContract(unitType);
|
|
@@ -16,7 +17,7 @@ export function compileUnitToolContract(unitType) {
|
|
|
16
17
|
const requiredWorkflowTools = getRequiredWorkflowToolsForAutoUnit(unitType);
|
|
17
18
|
const forbiddenWorkflowTools = Object.entries(surfaceContract?.forbiddenGsdTools ?? {})
|
|
18
19
|
.map(([name, reason]) => ({ name, reason }));
|
|
19
|
-
const closeoutTools = requiredWorkflowTools.filter((tool) => /^gsd_(?:task|slice|milestone|complete|validate|save|summary)/.test(tool));
|
|
20
|
+
const closeoutTools = requiredWorkflowTools.filter((tool) => /^gsd_(?:task|slice|milestone|complete|validate|save|summary|uat)/.test(tool));
|
|
20
21
|
if (requiresCloseoutTool(unitType) && closeoutTools.length === 0) {
|
|
21
22
|
return {
|
|
22
23
|
ok: false,
|
|
@@ -40,8 +41,10 @@ export function compileUnitToolContract(unitType) {
|
|
|
40
41
|
"unit-manifest-present",
|
|
41
42
|
"workflow-tool-surface-present",
|
|
42
43
|
...(requiresCloseoutTool(unitType) ? ["closeout-tool-present"] : []),
|
|
44
|
+
...(unitType === "execute-task" ? ["source-observation-contract-present"] : []),
|
|
43
45
|
],
|
|
44
46
|
closeoutTools,
|
|
47
|
+
sourceObservations: sourceObservationContractForUnit(unitType),
|
|
45
48
|
artifacts: {
|
|
46
49
|
inline: manifest.artifacts.inline,
|
|
47
50
|
excerpt: manifest.artifacts.excerpt,
|
|
@@ -50,6 +53,17 @@ export function compileUnitToolContract(unitType) {
|
|
|
50
53
|
},
|
|
51
54
|
};
|
|
52
55
|
}
|
|
56
|
+
function sourceObservationContractForUnit(unitType) {
|
|
57
|
+
if (unitType !== "execute-task")
|
|
58
|
+
return { mode: "none" };
|
|
59
|
+
return {
|
|
60
|
+
mode: "whole-file-active-unit",
|
|
61
|
+
seedFields: ["task.files", "task.inputs"],
|
|
62
|
+
excludedFields: ["expectedOutput"],
|
|
63
|
+
maxBytes: WHOLE_FILE_OBSERVATION_MAX_BYTES,
|
|
64
|
+
maxLines: WHOLE_FILE_OBSERVATION_MAX_LINES,
|
|
65
|
+
};
|
|
66
|
+
}
|
|
53
67
|
function requiresCloseoutTool(unitType) {
|
|
54
68
|
return /^(execute-task|reactive-execute|complete-slice|validate-milestone|complete-milestone|run-uat|gate-evaluate)$/.test(unitType);
|
|
55
69
|
}
|
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
// Project/App: gsd-pi
|
|
2
2
|
// File Purpose: Resolve phase-aware tool surfaces for GSD model presentations.
|
|
3
|
-
import { RUN_UAT_READ_ONLY_TOOL_NAMES, RUN_UAT_TOOL_PRESENTATION_PLAN_ID, RUN_UAT_WORKFLOW_TOOL_NAMES, } from "./unit-tool-contracts.js";
|
|
4
|
-
|
|
3
|
+
import { RUN_UAT_BROWSER_TOOL_NAMES, RUN_UAT_READ_ONLY_TOOL_NAMES, RUN_UAT_TOOL_PRESENTATION_PLAN_ID, RUN_UAT_WORKFLOW_TOOL_NAMES, } from "./unit-tool-contracts.js";
|
|
4
|
+
import { uatTypeIncludesBrowser } from "./uat-policy.js";
|
|
5
|
+
export { RUN_UAT_BROWSER_TOOL_NAMES, RUN_UAT_READ_ONLY_TOOL_NAMES, RUN_UAT_TOOL_PRESENTATION_PLAN_ID, RUN_UAT_WORKFLOW_TOOL_NAMES, } from "./unit-tool-contracts.js";
|
|
5
6
|
export const RUN_UAT_FORBIDDEN_TOOL_NAMES = [
|
|
6
7
|
"edit",
|
|
7
8
|
"write",
|
|
@@ -73,6 +74,27 @@ export function buildRunUatCanonicalToolNames(options = {}) {
|
|
|
73
74
|
...(options.includeBrowserTools ?? []),
|
|
74
75
|
]);
|
|
75
76
|
}
|
|
77
|
+
// UAT modes whose run-uat instructions direct the runner to exercise the live
|
|
78
|
+
// app in a browser. These modes receive the browser tool surface so the runner
|
|
79
|
+
// can actually drive the page instead of silently deferring browser checks to a
|
|
80
|
+
// human. See run-uat.md automation rules: `browser-executable`, `live-runtime`,
|
|
81
|
+
// and `mixed` are all told to drive a browser/runtime path, and
|
|
82
|
+
// `human-experience` is told to capture screenshots. Without this, a webpage
|
|
83
|
+
// UAT classified as anything but `browser-executable` had no browser tools and
|
|
84
|
+
// downgraded its live checks to NEEDS-HUMAN (M001/S03 regression).
|
|
85
|
+
export function runUatBrowserToolsForType(uatType) {
|
|
86
|
+
return uatTypeIncludesBrowser(uatType) ? RUN_UAT_BROWSER_TOOL_NAMES : [];
|
|
87
|
+
}
|
|
88
|
+
export function runUatPresentationSurfaceForType(uatType) {
|
|
89
|
+
return uatTypeIncludesBrowser(uatType) ? "hybrid" : "mcp";
|
|
90
|
+
}
|
|
91
|
+
export function buildRunUatPresentationForType(uatType, options = {}) {
|
|
92
|
+
return buildRunUatResultPresentation({
|
|
93
|
+
...options,
|
|
94
|
+
surface: options.surface ?? runUatPresentationSurfaceForType(uatType),
|
|
95
|
+
includeBrowserTools: runUatBrowserToolsForType(uatType),
|
|
96
|
+
});
|
|
97
|
+
}
|
|
76
98
|
export function buildRunUatResultPresentation(options = {}) {
|
|
77
99
|
const presentedTools = options.presentedTools
|
|
78
100
|
? dedupe(options.presentedTools)
|
|
@@ -18,6 +18,7 @@ import { gsdProjectionRoot, clearPathCache, resolveMilestoneFile } from "../path
|
|
|
18
18
|
import { resolveCanonicalMilestoneRoot } from "../worktree-manager.js";
|
|
19
19
|
import { checkOwnership, sliceUnitKey } from "../unit-ownership.js";
|
|
20
20
|
import { saveFile, clearParseCache } from "../files.js";
|
|
21
|
+
import { getDeclaredUatType, shouldEscalateArtifactUatToBrowser } from "../uat-policy.js";
|
|
21
22
|
import { invalidateStateCache } from "../state.js";
|
|
22
23
|
import { renderRoadmapFromDb } from "../markdown-renderer.js";
|
|
23
24
|
import { parseRoadmap } from "../parsers-legacy.js";
|
|
@@ -267,6 +268,33 @@ export async function handleCompleteSlice(params, basePath) {
|
|
|
267
268
|
if (BLOCKED_SIGNALS.test(params.verification || "") || BLOCKED_SIGNALS.test(params.uatContent || "")) {
|
|
268
269
|
return { error: `slice verification indicates blocked/failed state — do not complete a slice that has not passed verification. Address the blockers and re-verify first.` };
|
|
269
270
|
}
|
|
271
|
+
// ── Browser/web UAT classification gate ────────────────────────────────
|
|
272
|
+
// A UAT that drives a running web UI (opening a page in a browser,
|
|
273
|
+
// navigating to a page/localhost) must declare a browser-capable mode so the
|
|
274
|
+
// run-uat runner surfaces browser tools and actually launches a browser.
|
|
275
|
+
// Otherwise the browser checks get silently deferred to a human and the slice
|
|
276
|
+
// passes on static checks alone (M001/S03 regression). `browser-executable`,
|
|
277
|
+
// `live-runtime`, and `mixed` all receive browser tools (see
|
|
278
|
+
// UAT_MODE_POLICIES); only the non-browser modes are rejected here.
|
|
279
|
+
//
|
|
280
|
+
// Reuse the canonical hasBrowserRequiredText detector (also used by dispatch
|
|
281
|
+
// and milestone validation): it skips Not-Proven/Out-of-Scope disclaimer
|
|
282
|
+
// sections and only treats verbs like navigate/open as web when they sit next
|
|
283
|
+
// to browser/page/localhost — avoiding false positives on CLI/file/API steps.
|
|
284
|
+
//
|
|
285
|
+
// Only `artifact-driven` is gated. It is the one mode that performs no
|
|
286
|
+
// execution at all (static/file checks), so a browser-requiring UAT under it
|
|
287
|
+
// genuinely defers verification to a human. Every other mode has a real
|
|
288
|
+
// verification path: `runtime-executable` runs browser test commands like
|
|
289
|
+
// `npx playwright test` via gsd_uat_exec, and live-runtime/mixed/
|
|
290
|
+
// browser-executable receive browser tools (UAT_MODE_POLICIES).
|
|
291
|
+
const uatContent = params.uatContent || "";
|
|
292
|
+
const declaredUatMode = getDeclaredUatType(uatContent);
|
|
293
|
+
if (shouldEscalateArtifactUatToBrowser(uatContent)) {
|
|
294
|
+
return {
|
|
295
|
+
error: `UAT requires browser verification (opening a page in a browser, navigating to a page or localhost, screenshots) but declares "UAT mode: artifact-driven", which only runs static/file checks and would defer the browser work to a human. Use a mode that actually verifies the UI: "browser-executable" (interactive browser tools), "runtime-executable" (a browser test command such as playwright), or a browser-inclusive "mixed"/"live-runtime". Re-author the UAT Type section and complete the slice again.`,
|
|
296
|
+
};
|
|
297
|
+
}
|
|
270
298
|
// ── Guards + DB writes inside a single transaction (prevents TOCTOU) ───
|
|
271
299
|
const completedAt = new Date().toISOString();
|
|
272
300
|
let guardError = null;
|
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
import { existsSync, rmSync } from "node:fs";
|
|
2
|
-
import { join, relative } from "node:path";
|
|
2
|
+
import { join, relative, resolve } from "node:path";
|
|
3
3
|
import { clearParseCache } from "../files.js";
|
|
4
4
|
import { isClosedStatus, isDeferredStatus } from "../status-guards.js";
|
|
5
5
|
import { isNonEmptyString, validateStringArray } from "../validation.js";
|
|
6
|
+
import { getGateIdsForTurn } from "../gate-registry.js";
|
|
6
7
|
import { transaction, getMilestone, getSlice, getSliceTasks, insertTask, upsertSlicePlanning, upsertTaskPlanning, insertGateRow, updateSliceStatus, setSliceSketchFlag, deleteTask, deleteArtifactByPath, } from "../gsd-db.js";
|
|
7
8
|
import { invalidateStateCache } from "../state.js";
|
|
8
9
|
import { renderPlanFromDb } from "../markdown-renderer.js";
|
|
@@ -10,7 +11,7 @@ import { renderAllProjections } from "../workflow-projections.js";
|
|
|
10
11
|
import { writeManifest } from "../workflow-manifest.js";
|
|
11
12
|
import { appendEvent } from "../workflow-events.js";
|
|
12
13
|
import { logWarning } from "../workflow-logger.js";
|
|
13
|
-
import { validatePlanningPathScope } from "../planning-path-scope.js";
|
|
14
|
+
import { validatePathOnlyPlanningFields, validatePlanningPathScope } from "../planning-path-scope.js";
|
|
14
15
|
import { checkFilePathConsistency, checkTaskOrdering } from "../pre-execution-checks.js";
|
|
15
16
|
import { buildTaskFileName, gsdProjectionRoot } from "../paths.js";
|
|
16
17
|
import { loadEffectiveGSDPreferences } from "../preferences.js";
|
|
@@ -100,9 +101,24 @@ function validateParams(params) {
|
|
|
100
101
|
tasks: validateTasks(params.tasks),
|
|
101
102
|
};
|
|
102
103
|
}
|
|
103
|
-
function
|
|
104
|
+
function loadPlanningContext(basePath) {
|
|
104
105
|
const loaded = loadEffectiveGSDPreferences(basePath);
|
|
105
|
-
return
|
|
106
|
+
return {
|
|
107
|
+
repositoryRegistry: createRepositoryRegistryFromPreferences(basePath, loaded?.preferences),
|
|
108
|
+
gateEvaluation: loaded?.preferences?.gate_evaluation,
|
|
109
|
+
};
|
|
110
|
+
}
|
|
111
|
+
function resolveGateEvaluateSliceGates(config) {
|
|
112
|
+
const ownedGateIds = [...getGateIdsForTurn("gate-evaluate")];
|
|
113
|
+
if (!config?.slice_gates?.length)
|
|
114
|
+
return ownedGateIds;
|
|
115
|
+
const owned = new Set(ownedGateIds);
|
|
116
|
+
return config.slice_gates.filter((gateId) => owned.has(gateId));
|
|
117
|
+
}
|
|
118
|
+
function resolveTaskGates(config) {
|
|
119
|
+
if (config?.task_gates === false)
|
|
120
|
+
return [];
|
|
121
|
+
return [...getGateIdsForTurn("execute-task")];
|
|
106
122
|
}
|
|
107
123
|
function validateReferencedRepositories(params, registry, defaultTargets) {
|
|
108
124
|
const known = new Set(registry.repositories.map((repo) => repo.id));
|
|
@@ -171,11 +187,16 @@ function toTaskRows(params, defaultTargets) {
|
|
|
171
187
|
escalation_override_applied_at: null,
|
|
172
188
|
}));
|
|
173
189
|
}
|
|
174
|
-
function validateTaskPathsBeforePersist(params, basePath, defaultTargets) {
|
|
190
|
+
function validateTaskPathsBeforePersist(params, basePath, defaultTargets, allowedRoots) {
|
|
175
191
|
const taskRows = toTaskRows(params, defaultTargets);
|
|
192
|
+
const baseRoot = resolve(basePath);
|
|
193
|
+
const additionalRoots = allowedRoots
|
|
194
|
+
.map((root) => resolve(root))
|
|
195
|
+
.filter((root) => root !== baseRoot);
|
|
196
|
+
const context = additionalRoots.length > 0 ? { additionalRoots } : undefined;
|
|
176
197
|
const checks = [
|
|
177
|
-
...checkFilePathConsistency(taskRows, basePath),
|
|
178
|
-
...checkTaskOrdering(taskRows, basePath),
|
|
198
|
+
...checkFilePathConsistency(taskRows, basePath, context),
|
|
199
|
+
...checkTaskOrdering(taskRows, basePath, context),
|
|
179
200
|
];
|
|
180
201
|
const blocking = checks.filter((check) => !check.passed && check.blocking);
|
|
181
202
|
if (blocking.length === 0)
|
|
@@ -193,8 +214,11 @@ export async function handlePlanSlice(rawParams, basePath) {
|
|
|
193
214
|
return { error: `validation failed: ${err.message}` };
|
|
194
215
|
}
|
|
195
216
|
let repositoryRegistry;
|
|
217
|
+
let gateEvaluation;
|
|
196
218
|
try {
|
|
197
|
-
|
|
219
|
+
const context = loadPlanningContext(basePath);
|
|
220
|
+
repositoryRegistry = context.repositoryRegistry;
|
|
221
|
+
gateEvaluation = context.gateEvaluation;
|
|
198
222
|
}
|
|
199
223
|
catch (err) {
|
|
200
224
|
const message = err instanceof Error ? err.message : String(err);
|
|
@@ -206,6 +230,13 @@ export async function handlePlanSlice(rawParams, basePath) {
|
|
|
206
230
|
return { error: `validation failed: ${repoValidationError}` };
|
|
207
231
|
}
|
|
208
232
|
const allowedAbsoluteRoots = resolveAllowedRootsForPathScope(params, repositoryRegistry, defaultTargets);
|
|
233
|
+
const pathOnlyError = validatePathOnlyPlanningFields(params.tasks.map((task, index) => ({
|
|
234
|
+
field: `tasks[${index}].expectedOutput`,
|
|
235
|
+
values: task.expectedOutput,
|
|
236
|
+
})));
|
|
237
|
+
if (pathOnlyError) {
|
|
238
|
+
return { error: `validation failed: ${pathOnlyError}` };
|
|
239
|
+
}
|
|
209
240
|
const pathScopeError = validatePlanningPathScope(basePath, params.tasks.flatMap((task, index) => [
|
|
210
241
|
{ field: `tasks[${index}].files`, values: task.files },
|
|
211
242
|
{ field: `tasks[${index}].inputs`, values: task.inputs },
|
|
@@ -214,7 +245,7 @@ export async function handlePlanSlice(rawParams, basePath) {
|
|
|
214
245
|
if (pathScopeError) {
|
|
215
246
|
return { error: `validation failed: ${pathScopeError}` };
|
|
216
247
|
}
|
|
217
|
-
const pathError = validateTaskPathsBeforePersist(params, basePath, defaultTargets);
|
|
248
|
+
const pathError = validateTaskPathsBeforePersist(params, basePath, defaultTargets, allowedAbsoluteRoots);
|
|
218
249
|
if (pathError) {
|
|
219
250
|
return { error: `pre-execution validation failed:\n${pathError}` };
|
|
220
251
|
}
|
|
@@ -296,11 +327,11 @@ export async function handlePlanSlice(rawParams, basePath) {
|
|
|
296
327
|
}
|
|
297
328
|
// Seed quality gate rows inside the transaction — all-or-nothing with
|
|
298
329
|
// the plan data so a crash can't leave orphaned gates without tasks.
|
|
299
|
-
const sliceGates =
|
|
330
|
+
const sliceGates = resolveGateEvaluateSliceGates(gateEvaluation);
|
|
300
331
|
for (const gid of sliceGates) {
|
|
301
332
|
insertGateRow({ milestoneId: params.milestoneId, sliceId: params.sliceId, gateId: gid, scope: "slice" });
|
|
302
333
|
}
|
|
303
|
-
const taskGates =
|
|
334
|
+
const taskGates = resolveTaskGates(gateEvaluation);
|
|
304
335
|
for (const task of params.tasks) {
|
|
305
336
|
for (const gid of taskGates) {
|
|
306
337
|
insertGateRow({ milestoneId: params.milestoneId, sliceId: params.sliceId, gateId: gid, scope: "task", taskId: task.taskId });
|
|
@@ -8,7 +8,7 @@ import { renderAllProjections } from "../workflow-projections.js";
|
|
|
8
8
|
import { writeManifest } from "../workflow-manifest.js";
|
|
9
9
|
import { appendEvent } from "../workflow-events.js";
|
|
10
10
|
import { logWarning } from "../workflow-logger.js";
|
|
11
|
-
import { validatePlanningPathScope } from "../planning-path-scope.js";
|
|
11
|
+
import { validatePathOnlyPlanningFields, validatePlanningPathScope } from "../planning-path-scope.js";
|
|
12
12
|
function validateParams(params) {
|
|
13
13
|
if (!isNonEmptyString(params?.milestoneId))
|
|
14
14
|
throw new Error("milestoneId is required");
|
|
@@ -42,6 +42,12 @@ export async function handlePlanTask(rawParams, basePath) {
|
|
|
42
42
|
catch (err) {
|
|
43
43
|
return { error: `validation failed: ${err.message}` };
|
|
44
44
|
}
|
|
45
|
+
const pathOnlyError = validatePathOnlyPlanningFields([
|
|
46
|
+
{ field: "expectedOutput", values: params.expectedOutput },
|
|
47
|
+
]);
|
|
48
|
+
if (pathOnlyError) {
|
|
49
|
+
return { error: `validation failed: ${pathOnlyError}` };
|
|
50
|
+
}
|
|
45
51
|
const pathScopeError = validatePlanningPathScope(basePath, [
|
|
46
52
|
{ field: "files", values: params.files },
|
|
47
53
|
{ field: "inputs", values: params.inputs },
|