gsd-pi 2.63.0 → 2.64.0-dev.05b8a94
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/README.md +46 -134
- package/dist/cli.js +48 -6
- package/dist/headless-query.js +11 -1
- package/dist/headless.js +3 -1
- package/dist/help-text.js +4 -1
- package/dist/onboarding.js +15 -8
- package/dist/resource-loader.js +18 -3
- package/dist/resources/extensions/bg-shell/bg-shell-lifecycle.js +22 -7
- package/dist/resources/extensions/bg-shell/process-manager.js +6 -1
- package/dist/resources/extensions/cmux/index.js +21 -12
- package/dist/resources/extensions/gsd/auto/detect-stuck.js +27 -0
- package/dist/resources/extensions/gsd/auto/finalize-timeout.js +40 -0
- package/dist/resources/extensions/gsd/auto/loop.js +4 -0
- package/dist/resources/extensions/gsd/auto/phases.js +157 -22
- package/dist/resources/extensions/gsd/auto/session.js +12 -0
- package/dist/resources/extensions/gsd/auto-dashboard.js +14 -8
- package/dist/resources/extensions/gsd/auto-model-selection.js +32 -0
- package/dist/resources/extensions/gsd/auto-post-unit.js +222 -11
- package/dist/resources/extensions/gsd/auto-prompts.js +25 -0
- package/dist/resources/extensions/gsd/auto-recovery.js +15 -7
- package/dist/resources/extensions/gsd/auto-start.js +10 -21
- package/dist/resources/extensions/gsd/auto-timers.js +2 -1
- package/dist/resources/extensions/gsd/auto-tool-tracking.js +17 -0
- package/dist/resources/extensions/gsd/auto-verification.js +138 -1
- package/dist/resources/extensions/gsd/auto-worktree.js +13 -7
- package/dist/resources/extensions/gsd/auto.js +24 -2
- package/dist/resources/extensions/gsd/bootstrap/db-tools.js +158 -75
- package/dist/resources/extensions/gsd/bootstrap/dynamic-tools.js +13 -0
- package/dist/resources/extensions/gsd/bootstrap/notify-interceptor.js +28 -0
- package/dist/resources/extensions/gsd/bootstrap/query-tools.js +85 -0
- package/dist/resources/extensions/gsd/bootstrap/register-extension.js +3 -0
- package/dist/resources/extensions/gsd/bootstrap/register-hooks.js +40 -1
- package/dist/resources/extensions/gsd/bootstrap/register-shortcuts.js +15 -0
- package/dist/resources/extensions/gsd/bootstrap/sanitize-complete-milestone.js +54 -0
- package/dist/resources/extensions/gsd/bootstrap/system-context.js +50 -2
- package/dist/resources/extensions/gsd/commands/catalog.js +7 -1
- package/dist/resources/extensions/gsd/commands/handlers/core.js +1 -0
- package/dist/resources/extensions/gsd/commands/handlers/notifications-handler.js +103 -0
- package/dist/resources/extensions/gsd/commands/handlers/ops.js +5 -0
- package/dist/resources/extensions/gsd/commands-handlers.js +9 -4
- package/dist/resources/extensions/gsd/constants.js +42 -0
- package/dist/resources/extensions/gsd/db-writer.js +72 -4
- package/dist/resources/extensions/gsd/forensics.js +20 -4
- package/dist/resources/extensions/gsd/gsd-db.js +64 -17
- package/dist/resources/extensions/gsd/guided-flow.js +19 -0
- package/dist/resources/extensions/gsd/metrics.js +27 -1
- package/dist/resources/extensions/gsd/native-git-bridge.js +5 -3
- package/dist/resources/extensions/gsd/notification-overlay.js +224 -0
- package/dist/resources/extensions/gsd/notification-store.js +268 -0
- package/dist/resources/extensions/gsd/notification-widget.js +56 -0
- package/dist/resources/extensions/gsd/post-execution-checks.js +407 -0
- package/dist/resources/extensions/gsd/pre-execution-checks.js +464 -0
- package/dist/resources/extensions/gsd/preferences-types.js +6 -0
- package/dist/resources/extensions/gsd/preferences-validation.js +33 -0
- package/dist/resources/extensions/gsd/preferences.js +11 -2
- package/dist/resources/extensions/gsd/prompt-loader.js +7 -0
- package/dist/resources/extensions/gsd/prompts/complete-milestone.md +2 -0
- package/dist/resources/extensions/gsd/prompts/complete-slice.md +2 -0
- package/dist/resources/extensions/gsd/prompts/doctor-heal.md +1 -0
- package/dist/resources/extensions/gsd/prompts/forensics.md +2 -0
- package/dist/resources/extensions/gsd/prompts/reassess-roadmap.md +2 -0
- package/dist/resources/extensions/gsd/prompts/system.md +4 -7
- package/dist/resources/extensions/gsd/prompts/validate-milestone.md +2 -0
- package/dist/resources/extensions/gsd/roadmap-mutations.js +1 -1
- package/dist/resources/extensions/gsd/roadmap-slices.js +9 -5
- package/dist/resources/extensions/gsd/safety/content-validator.js +73 -0
- package/dist/resources/extensions/gsd/safety/destructive-guard.js +34 -0
- package/dist/resources/extensions/gsd/safety/evidence-collector.js +109 -0
- package/dist/resources/extensions/gsd/safety/evidence-cross-ref.js +83 -0
- package/dist/resources/extensions/gsd/safety/file-change-validator.js +71 -0
- package/dist/resources/extensions/gsd/safety/git-checkpoint.js +91 -0
- package/dist/resources/extensions/gsd/safety/safety-harness.js +64 -0
- package/dist/resources/extensions/gsd/slice-parallel-conflict.js +67 -0
- package/dist/resources/extensions/gsd/slice-parallel-eligibility.js +51 -0
- package/dist/resources/extensions/gsd/slice-parallel-orchestrator.js +378 -0
- package/dist/resources/extensions/gsd/state.js +74 -14
- package/dist/resources/extensions/gsd/status-guards.js +11 -0
- package/dist/resources/extensions/gsd/tools/complete-milestone.js +17 -12
- package/dist/resources/extensions/gsd/tools/complete-slice.js +40 -26
- package/dist/resources/extensions/gsd/tools/complete-task.js +12 -12
- package/dist/resources/extensions/gsd/tools/plan-milestone.js +33 -25
- package/dist/resources/extensions/gsd/tools/plan-slice.js +5 -8
- package/dist/resources/extensions/gsd/verification-evidence.js +18 -0
- package/dist/resources/extensions/gsd/workflow-logger.js +8 -0
- package/dist/resources/extensions/gsd/workflow-projections.js +21 -5
- package/dist/resources/extensions/gsd/worktree-manager.js +82 -29
- package/dist/resources/extensions/gsd/worktree-resolver.js +4 -3
- package/dist/resources/extensions/mcp-client/auth.js +101 -0
- package/dist/resources/extensions/mcp-client/index.js +10 -1
- package/dist/resources/extensions/ollama/index.js +28 -22
- package/dist/resources/extensions/ollama/model-capabilities.js +37 -34
- package/dist/resources/extensions/ollama/ndjson-stream.js +54 -0
- package/dist/resources/extensions/ollama/ollama-chat-provider.js +380 -0
- package/dist/resources/extensions/ollama/ollama-client.js +23 -32
- package/dist/resources/extensions/ollama/ollama-discovery.js +2 -7
- package/dist/resources/extensions/ollama/ollama-tool.js +62 -0
- package/dist/resources/extensions/ollama/thinking-parser.js +104 -0
- package/dist/update-cmd.js +4 -2
- package/dist/web/standalone/.next/BUILD_ID +1 -1
- package/dist/web/standalone/.next/app-path-routes-manifest.json +20 -19
- package/dist/web/standalone/.next/build-manifest.json +3 -3
- package/dist/web/standalone/.next/prerender-manifest.json +3 -3
- package/dist/web/standalone/.next/required-server-files.json +4 -4
- package/dist/web/standalone/.next/routes-manifest.json +6 -0
- package/dist/web/standalone/.next/server/app/_global-error/page.js +3 -3
- package/dist/web/standalone/.next/server/app/_global-error/page_client-reference-manifest.js +1 -1
- package/dist/web/standalone/.next/server/app/_global-error.html +2 -2
- 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/page.js +2 -2
- package/dist/web/standalone/.next/server/app/_not-found/page_client-reference-manifest.js +1 -1
- package/dist/web/standalone/.next/server/app/_not-found.html +1 -1
- package/dist/web/standalone/.next/server/app/_not-found.rsc +3 -3
- package/dist/web/standalone/.next/server/app/_not-found.segments/_full.segment.rsc +3 -3
- 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 +3 -3
- 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 +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/boot/route_client-reference-manifest.js +1 -1
- package/dist/web/standalone/.next/server/app/api/bridge-terminal/input/route.js +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/input/route_client-reference-manifest.js +1 -1
- package/dist/web/standalone/.next/server/app/api/bridge-terminal/resize/route.js +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/resize/route_client-reference-manifest.js +1 -1
- package/dist/web/standalone/.next/server/app/api/bridge-terminal/stream/route.js +2 -2
- 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/bridge-terminal/stream/route_client-reference-manifest.js +1 -1
- package/dist/web/standalone/.next/server/app/api/browse-directories/route.js +1 -1
- package/dist/web/standalone/.next/server/app/api/browse-directories/route_client-reference-manifest.js +1 -1
- package/dist/web/standalone/.next/server/app/api/captures/route.js +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/captures/route_client-reference-manifest.js +1 -1
- package/dist/web/standalone/.next/server/app/api/cleanup/route.js +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/cleanup/route_client-reference-manifest.js +1 -1
- package/dist/web/standalone/.next/server/app/api/dev-mode/route.js +1 -1
- package/dist/web/standalone/.next/server/app/api/dev-mode/route_client-reference-manifest.js +1 -1
- package/dist/web/standalone/.next/server/app/api/doctor/route.js +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/doctor/route_client-reference-manifest.js +1 -1
- package/dist/web/standalone/.next/server/app/api/experimental/route.js +2 -2
- package/dist/web/standalone/.next/server/app/api/experimental/route_client-reference-manifest.js +1 -1
- package/dist/web/standalone/.next/server/app/api/export-data/route.js +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/export-data/route_client-reference-manifest.js +1 -1
- package/dist/web/standalone/.next/server/app/api/files/route.js +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/files/route_client-reference-manifest.js +1 -1
- package/dist/web/standalone/.next/server/app/api/forensics/route.js +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/forensics/route_client-reference-manifest.js +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/git/route_client-reference-manifest.js +1 -1
- package/dist/web/standalone/.next/server/app/api/history/route.js +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/history/route_client-reference-manifest.js +1 -1
- package/dist/web/standalone/.next/server/app/api/hooks/route.js +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/hooks/route_client-reference-manifest.js +1 -1
- package/dist/web/standalone/.next/server/app/api/inspect/route.js +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/inspect/route_client-reference-manifest.js +1 -1
- package/dist/web/standalone/.next/server/app/api/knowledge/route.js +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/knowledge/route_client-reference-manifest.js +1 -1
- package/dist/web/standalone/.next/server/app/api/live-state/route.js +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/live-state/route_client-reference-manifest.js +1 -1
- package/dist/web/standalone/.next/server/app/api/notifications/route.js +3 -0
- package/dist/web/standalone/.next/server/app/api/notifications/route.js.nft.json +1 -0
- package/dist/web/standalone/.next/server/app/api/notifications/route_client-reference-manifest.js +1 -0
- package/dist/web/standalone/.next/server/app/api/onboarding/route.js +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/onboarding/route_client-reference-manifest.js +1 -1
- package/dist/web/standalone/.next/server/app/api/preferences/route.js +1 -1
- package/dist/web/standalone/.next/server/app/api/preferences/route_client-reference-manifest.js +1 -1
- package/dist/web/standalone/.next/server/app/api/projects/route.js +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/projects/route_client-reference-manifest.js +1 -1
- package/dist/web/standalone/.next/server/app/api/recovery/route.js +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/recovery/route_client-reference-manifest.js +1 -1
- package/dist/web/standalone/.next/server/app/api/remote-questions/route.js +2 -2
- package/dist/web/standalone/.next/server/app/api/remote-questions/route_client-reference-manifest.js +1 -1
- package/dist/web/standalone/.next/server/app/api/session/browser/route.js +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/browser/route_client-reference-manifest.js +1 -1
- package/dist/web/standalone/.next/server/app/api/session/command/route.js +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/command/route_client-reference-manifest.js +1 -1
- package/dist/web/standalone/.next/server/app/api/session/events/route.js +2 -2
- 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/events/route_client-reference-manifest.js +1 -1
- package/dist/web/standalone/.next/server/app/api/session/manage/route.js +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/session/manage/route_client-reference-manifest.js +1 -1
- package/dist/web/standalone/.next/server/app/api/settings-data/route.js +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/settings-data/route_client-reference-manifest.js +1 -1
- package/dist/web/standalone/.next/server/app/api/shutdown/route.js +1 -1
- package/dist/web/standalone/.next/server/app/api/shutdown/route_client-reference-manifest.js +1 -1
- package/dist/web/standalone/.next/server/app/api/skill-health/route.js +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/skill-health/route_client-reference-manifest.js +1 -1
- package/dist/web/standalone/.next/server/app/api/steer/route.js +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/steer/route_client-reference-manifest.js +1 -1
- package/dist/web/standalone/.next/server/app/api/switch-root/route.js +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/switch-root/route_client-reference-manifest.js +1 -1
- package/dist/web/standalone/.next/server/app/api/terminal/input/route.js +2 -2
- package/dist/web/standalone/.next/server/app/api/terminal/input/route_client-reference-manifest.js +1 -1
- package/dist/web/standalone/.next/server/app/api/terminal/resize/route.js +2 -2
- package/dist/web/standalone/.next/server/app/api/terminal/resize/route_client-reference-manifest.js +1 -1
- package/dist/web/standalone/.next/server/app/api/terminal/sessions/route.js +2 -2
- 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/sessions/route_client-reference-manifest.js +1 -1
- package/dist/web/standalone/.next/server/app/api/terminal/stream/route.js +4 -4
- package/dist/web/standalone/.next/server/app/api/terminal/stream/route.js.nft.json +1 -1
- package/dist/web/standalone/.next/server/app/api/terminal/stream/route_client-reference-manifest.js +1 -1
- package/dist/web/standalone/.next/server/app/api/terminal/upload/route.js +1 -1
- package/dist/web/standalone/.next/server/app/api/terminal/upload/route_client-reference-manifest.js +1 -1
- package/dist/web/standalone/.next/server/app/api/undo/route.js +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/undo/route_client-reference-manifest.js +1 -1
- package/dist/web/standalone/.next/server/app/api/update/route.js +1 -1
- package/dist/web/standalone/.next/server/app/api/update/route_client-reference-manifest.js +1 -1
- package/dist/web/standalone/.next/server/app/api/visualizer/route.js +1 -1
- package/dist/web/standalone/.next/server/app/api/visualizer/route.js.nft.json +1 -1
- package/dist/web/standalone/.next/server/app/api/visualizer/route_client-reference-manifest.js +1 -1
- package/dist/web/standalone/.next/server/app/index.html +1 -1
- package/dist/web/standalone/.next/server/app/index.rsc +4 -4
- package/dist/web/standalone/.next/server/app/index.segments/__PAGE__.segment.rsc +2 -2
- package/dist/web/standalone/.next/server/app/index.segments/_full.segment.rsc +4 -4
- 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 +3 -3
- package/dist/web/standalone/.next/server/app/index.segments/_tree.segment.rsc +1 -1
- package/dist/web/standalone/.next/server/app/page.js +2 -2
- package/dist/web/standalone/.next/server/app/page_client-reference-manifest.js +1 -1
- package/dist/web/standalone/.next/server/app-paths-manifest.json +20 -19
- package/dist/web/standalone/.next/server/chunks/6897.js +12 -0
- package/dist/web/standalone/.next/server/chunks/7471.js +3 -3
- package/dist/web/standalone/.next/server/functions-config-manifest.json +1 -0
- package/dist/web/standalone/.next/server/middleware-build-manifest.js +1 -1
- package/dist/web/standalone/.next/server/middleware.js +2 -2
- package/dist/web/standalone/.next/server/next-font-manifest.js +1 -1
- package/dist/web/standalone/.next/server/next-font-manifest.json +1 -1
- package/dist/web/standalone/.next/server/pages/404.html +1 -1
- package/dist/web/standalone/.next/server/pages/500.html +2 -2
- package/dist/web/standalone/.next/server/server-reference-manifest.json +1 -1
- package/dist/web/standalone/.next/static/Vbx2-SrSBOgta6576xj9m/_buildManifest.js +1 -0
- package/dist/web/standalone/.next/static/chunks/app/_global-error/page-8805a20e15762c3c.js +1 -0
- package/dist/web/standalone/.next/static/chunks/app/_not-found/{page-2f24283c162b6ab3.js → page-f2a7482d42a5614b.js} +1 -1
- package/dist/web/standalone/.next/static/chunks/app/api/boot/route-8805a20e15762c3c.js +1 -0
- package/dist/web/standalone/.next/static/chunks/app/api/bridge-terminal/input/route-8805a20e15762c3c.js +1 -0
- package/dist/web/standalone/.next/static/chunks/app/api/bridge-terminal/resize/route-8805a20e15762c3c.js +1 -0
- package/dist/web/standalone/.next/static/chunks/app/api/bridge-terminal/stream/route-8805a20e15762c3c.js +1 -0
- package/dist/web/standalone/.next/static/chunks/app/api/browse-directories/route-8805a20e15762c3c.js +1 -0
- package/dist/web/standalone/.next/static/chunks/app/api/captures/route-8805a20e15762c3c.js +1 -0
- package/dist/web/standalone/.next/static/chunks/app/api/cleanup/route-8805a20e15762c3c.js +1 -0
- package/dist/web/standalone/.next/static/chunks/app/api/dev-mode/route-8805a20e15762c3c.js +1 -0
- package/dist/web/standalone/.next/static/chunks/app/api/doctor/route-8805a20e15762c3c.js +1 -0
- package/dist/web/standalone/.next/static/chunks/app/api/experimental/route-8805a20e15762c3c.js +1 -0
- package/dist/web/standalone/.next/static/chunks/app/api/export-data/route-8805a20e15762c3c.js +1 -0
- package/dist/web/standalone/.next/static/chunks/app/api/files/route-8805a20e15762c3c.js +1 -0
- package/dist/web/standalone/.next/static/chunks/app/api/forensics/route-8805a20e15762c3c.js +1 -0
- package/dist/web/standalone/.next/static/chunks/app/api/git/route-8805a20e15762c3c.js +1 -0
- package/dist/web/standalone/.next/static/chunks/app/api/history/route-8805a20e15762c3c.js +1 -0
- package/dist/web/standalone/.next/static/chunks/app/api/hooks/route-8805a20e15762c3c.js +1 -0
- package/dist/web/standalone/.next/static/chunks/app/api/inspect/route-8805a20e15762c3c.js +1 -0
- package/dist/web/standalone/.next/static/chunks/app/api/knowledge/route-8805a20e15762c3c.js +1 -0
- package/dist/web/standalone/.next/static/chunks/app/api/live-state/route-8805a20e15762c3c.js +1 -0
- package/dist/web/standalone/.next/static/chunks/app/api/notifications/route-8805a20e15762c3c.js +1 -0
- package/dist/web/standalone/.next/static/chunks/app/api/onboarding/route-8805a20e15762c3c.js +1 -0
- package/dist/web/standalone/.next/static/chunks/app/api/preferences/route-8805a20e15762c3c.js +1 -0
- package/dist/web/standalone/.next/static/chunks/app/api/projects/route-8805a20e15762c3c.js +1 -0
- package/dist/web/standalone/.next/static/chunks/app/api/recovery/route-8805a20e15762c3c.js +1 -0
- package/dist/web/standalone/.next/static/chunks/app/api/remote-questions/route-8805a20e15762c3c.js +1 -0
- package/dist/web/standalone/.next/static/chunks/app/api/session/browser/route-8805a20e15762c3c.js +1 -0
- package/dist/web/standalone/.next/static/chunks/app/api/session/command/route-8805a20e15762c3c.js +1 -0
- package/dist/web/standalone/.next/static/chunks/app/api/session/events/route-8805a20e15762c3c.js +1 -0
- package/dist/web/standalone/.next/static/chunks/app/api/session/manage/route-8805a20e15762c3c.js +1 -0
- package/dist/web/standalone/.next/static/chunks/app/api/settings-data/route-8805a20e15762c3c.js +1 -0
- package/dist/web/standalone/.next/static/chunks/app/api/shutdown/route-8805a20e15762c3c.js +1 -0
- package/dist/web/standalone/.next/static/chunks/app/api/skill-health/route-8805a20e15762c3c.js +1 -0
- package/dist/web/standalone/.next/static/chunks/app/api/steer/route-8805a20e15762c3c.js +1 -0
- package/dist/web/standalone/.next/static/chunks/app/api/switch-root/route-8805a20e15762c3c.js +1 -0
- package/dist/web/standalone/.next/static/chunks/app/api/terminal/input/route-8805a20e15762c3c.js +1 -0
- package/dist/web/standalone/.next/static/chunks/app/api/terminal/resize/route-8805a20e15762c3c.js +1 -0
- package/dist/web/standalone/.next/static/chunks/app/api/terminal/sessions/route-8805a20e15762c3c.js +1 -0
- package/dist/web/standalone/.next/static/chunks/app/api/terminal/stream/route-8805a20e15762c3c.js +1 -0
- package/dist/web/standalone/.next/static/chunks/app/api/terminal/upload/route-8805a20e15762c3c.js +1 -0
- package/dist/web/standalone/.next/static/chunks/app/api/undo/route-8805a20e15762c3c.js +1 -0
- package/dist/web/standalone/.next/static/chunks/app/api/update/route-8805a20e15762c3c.js +1 -0
- package/dist/web/standalone/.next/static/chunks/app/api/visualizer/route-8805a20e15762c3c.js +1 -0
- package/dist/web/standalone/.next/static/chunks/app/{layout-9ecfd95f343793f0.js → layout-a16c7a7ecdf0c2cf.js} +1 -1
- package/dist/web/standalone/.next/static/chunks/app/page-0c485498795110d6.js +1 -0
- package/dist/web/standalone/.next/static/chunks/main-app-fdab67f7802d7832.js +1 -0
- package/dist/web/standalone/.next/static/chunks/next/dist/client/components/builtin/app-error-8805a20e15762c3c.js +1 -0
- package/dist/web/standalone/.next/static/chunks/next/dist/client/components/builtin/forbidden-8805a20e15762c3c.js +1 -0
- package/dist/web/standalone/.next/static/chunks/next/dist/client/components/builtin/global-error-459824ffb8c323dd.js +1 -0
- package/dist/web/standalone/.next/static/chunks/next/dist/client/components/builtin/not-found-8805a20e15762c3c.js +1 -0
- package/dist/web/standalone/.next/static/chunks/next/dist/client/components/builtin/unauthorized-8805a20e15762c3c.js +1 -0
- package/dist/web/standalone/node_modules/node-pty/build/Makefile +2 -2
- package/dist/web/standalone/node_modules/node-pty/build/Release/pty.node +0 -0
- package/dist/web/standalone/node_modules/node-pty/build/pty.target.mk +14 -14
- package/dist/web/standalone/node_modules/node-pty/node-addon-api/node_addon_api.target.mk +14 -14
- package/dist/web/standalone/node_modules/node-pty/node-addon-api/node_addon_api_except.target.mk +14 -14
- package/dist/web/standalone/node_modules/node-pty/node-addon-api/node_addon_api_maybe.target.mk +14 -14
- package/dist/web/standalone/server.js +1 -1
- package/dist/welcome-screen.js +1 -1
- package/package.json +1 -1
- package/packages/pi-agent-core/dist/agent-loop.d.ts +8 -0
- package/packages/pi-agent-core/dist/agent-loop.d.ts.map +1 -1
- package/packages/pi-agent-core/dist/agent-loop.js +70 -3
- package/packages/pi-agent-core/dist/agent-loop.js.map +1 -1
- package/packages/pi-agent-core/src/agent-loop.test.ts +317 -5
- package/packages/pi-agent-core/src/agent-loop.ts +90 -6
- package/packages/pi-ai/dist/types.d.ts +16 -1
- package/packages/pi-ai/dist/types.d.ts.map +1 -1
- package/packages/pi-ai/dist/types.js.map +1 -1
- package/packages/pi-ai/src/types.ts +18 -1
- package/packages/pi-coding-agent/dist/core/agent-session-tool-refresh.test.d.ts +2 -0
- package/packages/pi-coding-agent/dist/core/agent-session-tool-refresh.test.d.ts.map +1 -0
- package/packages/pi-coding-agent/dist/core/agent-session-tool-refresh.test.js +38 -0
- package/packages/pi-coding-agent/dist/core/agent-session-tool-refresh.test.js.map +1 -0
- package/packages/pi-coding-agent/dist/core/agent-session.d.ts.map +1 -1
- package/packages/pi-coding-agent/dist/core/agent-session.js +11 -0
- package/packages/pi-coding-agent/dist/core/agent-session.js.map +1 -1
- package/packages/pi-coding-agent/dist/core/auth-storage.d.ts +9 -0
- package/packages/pi-coding-agent/dist/core/auth-storage.d.ts.map +1 -1
- package/packages/pi-coding-agent/dist/core/auth-storage.js +50 -1
- package/packages/pi-coding-agent/dist/core/auth-storage.js.map +1 -1
- package/packages/pi-coding-agent/dist/core/auth-storage.test.js +41 -0
- package/packages/pi-coding-agent/dist/core/auth-storage.test.js.map +1 -1
- package/packages/pi-coding-agent/dist/core/extensions/loader.d.ts +7 -0
- package/packages/pi-coding-agent/dist/core/extensions/loader.d.ts.map +1 -1
- package/packages/pi-coding-agent/dist/core/extensions/loader.js +31 -4
- package/packages/pi-coding-agent/dist/core/extensions/loader.js.map +1 -1
- package/packages/pi-coding-agent/dist/core/extensions/loader.test.js +28 -1
- package/packages/pi-coding-agent/dist/core/extensions/loader.test.js.map +1 -1
- package/packages/pi-coding-agent/dist/core/extensions/provider-registration.test.d.ts +2 -0
- package/packages/pi-coding-agent/dist/core/extensions/provider-registration.test.d.ts.map +1 -0
- package/packages/pi-coding-agent/dist/core/extensions/provider-registration.test.js +46 -0
- package/packages/pi-coding-agent/dist/core/extensions/provider-registration.test.js.map +1 -0
- package/packages/pi-coding-agent/dist/core/extensions/types.d.ts +2 -0
- package/packages/pi-coding-agent/dist/core/extensions/types.d.ts.map +1 -1
- package/packages/pi-coding-agent/dist/core/extensions/types.js.map +1 -1
- package/packages/pi-coding-agent/dist/core/model-registry.d.ts +1 -0
- package/packages/pi-coding-agent/dist/core/model-registry.d.ts.map +1 -1
- package/packages/pi-coding-agent/dist/core/model-registry.js +12 -0
- package/packages/pi-coding-agent/dist/core/model-registry.js.map +1 -1
- package/packages/pi-coding-agent/dist/core/model-resolver.js +3 -3
- package/packages/pi-coding-agent/dist/core/model-resolver.js.map +1 -1
- package/packages/pi-coding-agent/dist/core/resource-loader-cache-reset.test.d.ts +2 -0
- package/packages/pi-coding-agent/dist/core/resource-loader-cache-reset.test.d.ts.map +1 -0
- package/packages/pi-coding-agent/dist/core/resource-loader-cache-reset.test.js +24 -0
- package/packages/pi-coding-agent/dist/core/resource-loader-cache-reset.test.js.map +1 -0
- package/packages/pi-coding-agent/dist/core/resource-loader.d.ts +23 -1
- package/packages/pi-coding-agent/dist/core/resource-loader.d.ts.map +1 -1
- package/packages/pi-coding-agent/dist/core/resource-loader.js +84 -57
- package/packages/pi-coding-agent/dist/core/resource-loader.js.map +1 -1
- package/packages/pi-coding-agent/dist/core/sdk.d.ts.map +1 -1
- package/packages/pi-coding-agent/dist/core/sdk.js +9 -0
- package/packages/pi-coding-agent/dist/core/sdk.js.map +1 -1
- package/packages/pi-coding-agent/dist/modes/interactive/components/tool-execution.d.ts +1 -0
- package/packages/pi-coding-agent/dist/modes/interactive/components/tool-execution.d.ts.map +1 -1
- package/packages/pi-coding-agent/dist/modes/interactive/components/tool-execution.js +8 -0
- package/packages/pi-coding-agent/dist/modes/interactive/components/tool-execution.js.map +1 -1
- package/packages/pi-coding-agent/dist/modes/interactive/interactive-mode.d.ts +6 -0
- package/packages/pi-coding-agent/dist/modes/interactive/interactive-mode.d.ts.map +1 -1
- package/packages/pi-coding-agent/dist/modes/interactive/interactive-mode.js +36 -0
- package/packages/pi-coding-agent/dist/modes/interactive/interactive-mode.js.map +1 -1
- package/packages/pi-coding-agent/package.json +1 -1
- package/packages/pi-coding-agent/src/core/agent-session-tool-refresh.test.ts +64 -0
- package/packages/pi-coding-agent/src/core/agent-session.ts +10 -0
- package/packages/pi-coding-agent/src/core/auth-storage.test.ts +53 -0
- package/packages/pi-coding-agent/src/core/auth-storage.ts +66 -1
- package/packages/pi-coding-agent/src/core/extensions/loader.test.ts +39 -1
- package/packages/pi-coding-agent/src/core/extensions/loader.ts +34 -4
- package/packages/pi-coding-agent/src/core/extensions/provider-registration.test.ts +81 -0
- package/packages/pi-coding-agent/src/core/extensions/types.ts +2 -0
- package/packages/pi-coding-agent/src/core/model-registry.ts +14 -0
- package/packages/pi-coding-agent/src/core/model-resolver.ts +3 -3
- package/packages/pi-coding-agent/src/core/resource-loader-cache-reset.test.ts +42 -0
- package/packages/pi-coding-agent/src/core/resource-loader.ts +94 -57
- package/packages/pi-coding-agent/src/core/sdk.ts +10 -0
- package/packages/pi-coding-agent/src/modes/interactive/components/tool-execution.ts +9 -0
- package/packages/pi-coding-agent/src/modes/interactive/interactive-mode.ts +33 -0
- package/packages/pi-tui/dist/components/loader.d.ts +4 -2
- package/packages/pi-tui/dist/components/loader.d.ts.map +1 -1
- package/packages/pi-tui/dist/components/loader.js +27 -9
- package/packages/pi-tui/dist/components/loader.js.map +1 -1
- package/packages/pi-tui/dist/components/text.d.ts.map +1 -1
- package/packages/pi-tui/dist/components/text.js +2 -0
- package/packages/pi-tui/dist/components/text.js.map +1 -1
- package/packages/pi-tui/dist/tui.d.ts +2 -0
- package/packages/pi-tui/dist/tui.d.ts.map +1 -1
- package/packages/pi-tui/dist/tui.js +35 -0
- package/packages/pi-tui/dist/tui.js.map +1 -1
- package/packages/pi-tui/src/components/loader.ts +27 -10
- package/packages/pi-tui/src/components/text.ts +1 -0
- package/packages/pi-tui/src/tui.ts +32 -0
- package/pkg/package.json +1 -1
- package/src/resources/extensions/bg-shell/bg-shell-lifecycle.ts +19 -7
- package/src/resources/extensions/bg-shell/process-manager.ts +8 -2
- package/src/resources/extensions/cmux/index.ts +18 -12
- package/src/resources/extensions/gsd/auto/detect-stuck.ts +27 -0
- package/src/resources/extensions/gsd/auto/finalize-timeout.ts +46 -0
- package/src/resources/extensions/gsd/auto/loop.ts +5 -0
- package/src/resources/extensions/gsd/auto/phases.ts +194 -33
- package/src/resources/extensions/gsd/auto/session.ts +14 -0
- package/src/resources/extensions/gsd/auto-dashboard.ts +16 -7
- package/src/resources/extensions/gsd/auto-model-selection.ts +36 -0
- package/src/resources/extensions/gsd/auto-post-unit.ts +263 -12
- package/src/resources/extensions/gsd/auto-prompts.ts +21 -0
- package/src/resources/extensions/gsd/auto-recovery.ts +9 -8
- package/src/resources/extensions/gsd/auto-start.ts +11 -20
- package/src/resources/extensions/gsd/auto-timers.ts +2 -1
- package/src/resources/extensions/gsd/auto-tool-tracking.ts +19 -0
- package/src/resources/extensions/gsd/auto-verification.ts +190 -2
- package/src/resources/extensions/gsd/auto-worktree.ts +14 -6
- package/src/resources/extensions/gsd/auto.ts +26 -1
- package/src/resources/extensions/gsd/bootstrap/db-tools.ts +172 -88
- package/src/resources/extensions/gsd/bootstrap/dynamic-tools.ts +15 -0
- package/src/resources/extensions/gsd/bootstrap/notify-interceptor.ts +34 -0
- package/src/resources/extensions/gsd/bootstrap/query-tools.ts +98 -0
- package/src/resources/extensions/gsd/bootstrap/register-extension.ts +4 -0
- package/src/resources/extensions/gsd/bootstrap/register-hooks.ts +44 -1
- package/src/resources/extensions/gsd/bootstrap/register-shortcuts.ts +19 -0
- package/src/resources/extensions/gsd/bootstrap/sanitize-complete-milestone.ts +57 -0
- package/src/resources/extensions/gsd/bootstrap/system-context.ts +59 -2
- package/src/resources/extensions/gsd/commands/catalog.ts +7 -1
- package/src/resources/extensions/gsd/commands/handlers/core.ts +1 -0
- package/src/resources/extensions/gsd/commands/handlers/notifications-handler.ts +139 -0
- package/src/resources/extensions/gsd/commands/handlers/ops.ts +5 -0
- package/src/resources/extensions/gsd/commands-handlers.ts +10 -4
- package/src/resources/extensions/gsd/constants.ts +44 -0
- package/src/resources/extensions/gsd/db-writer.ts +78 -4
- package/src/resources/extensions/gsd/forensics.ts +21 -5
- package/src/resources/extensions/gsd/gsd-db.ts +64 -17
- package/src/resources/extensions/gsd/guided-flow.ts +22 -0
- package/src/resources/extensions/gsd/metrics.ts +28 -1
- package/src/resources/extensions/gsd/native-git-bridge.ts +5 -3
- package/src/resources/extensions/gsd/notification-overlay.ts +267 -0
- package/src/resources/extensions/gsd/notification-store.ts +288 -0
- package/src/resources/extensions/gsd/notification-widget.ts +68 -0
- package/src/resources/extensions/gsd/post-execution-checks.ts +539 -0
- package/src/resources/extensions/gsd/pre-execution-checks.ts +573 -0
- package/src/resources/extensions/gsd/preferences-types.ts +44 -0
- package/src/resources/extensions/gsd/preferences-validation.ts +33 -0
- package/src/resources/extensions/gsd/preferences.ts +13 -2
- package/src/resources/extensions/gsd/prompt-loader.ts +8 -0
- package/src/resources/extensions/gsd/prompts/complete-milestone.md +2 -0
- package/src/resources/extensions/gsd/prompts/complete-slice.md +2 -0
- package/src/resources/extensions/gsd/prompts/doctor-heal.md +1 -0
- package/src/resources/extensions/gsd/prompts/forensics.md +2 -0
- package/src/resources/extensions/gsd/prompts/reassess-roadmap.md +2 -0
- package/src/resources/extensions/gsd/prompts/system.md +4 -7
- package/src/resources/extensions/gsd/prompts/validate-milestone.md +2 -0
- package/src/resources/extensions/gsd/roadmap-mutations.ts +1 -1
- package/src/resources/extensions/gsd/roadmap-slices.ts +10 -5
- package/src/resources/extensions/gsd/safety/content-validator.ts +98 -0
- package/src/resources/extensions/gsd/safety/destructive-guard.ts +49 -0
- package/src/resources/extensions/gsd/safety/evidence-collector.ts +151 -0
- package/src/resources/extensions/gsd/safety/evidence-cross-ref.ts +120 -0
- package/src/resources/extensions/gsd/safety/file-change-validator.ts +108 -0
- package/src/resources/extensions/gsd/safety/git-checkpoint.ts +106 -0
- package/src/resources/extensions/gsd/safety/safety-harness.ts +105 -0
- package/src/resources/extensions/gsd/slice-parallel-conflict.ts +86 -0
- package/src/resources/extensions/gsd/slice-parallel-eligibility.ts +73 -0
- package/src/resources/extensions/gsd/slice-parallel-orchestrator.ts +477 -0
- package/src/resources/extensions/gsd/state.ts +67 -12
- package/src/resources/extensions/gsd/status-guards.ts +13 -0
- package/src/resources/extensions/gsd/tests/artifact-corruption-2630.test.ts +288 -0
- package/src/resources/extensions/gsd/tests/auto-loop.test.ts +34 -13
- package/src/resources/extensions/gsd/tests/auto-start-time-persistence.test.ts +50 -0
- package/src/resources/extensions/gsd/tests/cmux.test.ts +58 -0
- package/src/resources/extensions/gsd/tests/cold-resume-db-reopen.test.ts +51 -0
- package/src/resources/extensions/gsd/tests/complete-milestone.test.ts +140 -0
- package/src/resources/extensions/gsd/tests/complete-slice-string-coercion.test.ts +247 -0
- package/src/resources/extensions/gsd/tests/complete-task.test.ts +39 -0
- package/src/resources/extensions/gsd/tests/dashboard-model-label-ordering.test.ts +107 -0
- package/src/resources/extensions/gsd/tests/db-access-guardrails.test.ts +109 -0
- package/src/resources/extensions/gsd/tests/db-path-worktree-symlink.test.ts +13 -9
- package/src/resources/extensions/gsd/tests/db-writer.test.ts +134 -0
- package/src/resources/extensions/gsd/tests/deferred-slice-dispatch.test.ts +203 -0
- package/src/resources/extensions/gsd/tests/discuss-tool-scope-leak.test.ts +76 -0
- package/src/resources/extensions/gsd/tests/discuss-tool-scoping.test.ts +130 -0
- package/src/resources/extensions/gsd/tests/doctor-fix-flag.test.ts +92 -0
- package/src/resources/extensions/gsd/tests/enhanced-verification-integration.test.ts +526 -0
- package/src/resources/extensions/gsd/tests/finalize-timeout-guard.test.ts +116 -0
- package/src/resources/extensions/gsd/tests/flat-rate-routing-guard.test.ts +50 -0
- package/src/resources/extensions/gsd/tests/forensics-stuck-loops.test.ts +103 -0
- package/src/resources/extensions/gsd/tests/git-checkpoint.test.ts +94 -0
- package/src/resources/extensions/gsd/tests/insert-slice-no-wipe.test.ts +88 -0
- package/src/resources/extensions/gsd/tests/integration/git-service.test.ts +27 -7
- package/src/resources/extensions/gsd/tests/integration/idle-recovery.test.ts +34 -0
- package/src/resources/extensions/gsd/tests/metrics.test.ts +116 -1
- package/src/resources/extensions/gsd/tests/milestone-status-tool.test.ts +201 -0
- package/src/resources/extensions/gsd/tests/notification-store.test.ts +249 -0
- package/src/resources/extensions/gsd/tests/plan-milestone-title.test.ts +2 -1
- package/src/resources/extensions/gsd/tests/plan-milestone.test.ts +82 -18
- package/src/resources/extensions/gsd/tests/post-exec-retry-bypass.test.ts +312 -0
- package/src/resources/extensions/gsd/tests/post-execution-checks.test.ts +813 -0
- package/src/resources/extensions/gsd/tests/pre-execution-checks.test.ts +999 -0
- package/src/resources/extensions/gsd/tests/pre-execution-fail-closed.test.ts +266 -0
- package/src/resources/extensions/gsd/tests/pre-execution-pause-wiring.test.ts +457 -0
- package/src/resources/extensions/gsd/tests/preferences.test.ts +10 -0
- package/src/resources/extensions/gsd/tests/prompt-contracts.test.ts +25 -0
- package/src/resources/extensions/gsd/tests/roadmap-slices.test.ts +69 -0
- package/src/resources/extensions/gsd/tests/shared-wal.test.ts +30 -0
- package/src/resources/extensions/gsd/tests/slice-context-injection.test.ts +50 -0
- package/src/resources/extensions/gsd/tests/slice-parallel-conflict.test.ts +92 -0
- package/src/resources/extensions/gsd/tests/slice-parallel-eligibility.test.ts +95 -0
- package/src/resources/extensions/gsd/tests/slice-parallel-orchestrator.test.ts +83 -0
- package/src/resources/extensions/gsd/tests/stuck-detection-coverage.test.ts +42 -0
- package/src/resources/extensions/gsd/tests/tool-invocation-error-loop-break.test.ts +103 -0
- package/src/resources/extensions/gsd/tests/tool-param-optionality.test.ts +349 -0
- package/src/resources/extensions/gsd/tests/unstructured-continue-context-injection.test.ts +163 -0
- package/src/resources/extensions/gsd/tests/worktree-health-dispatch.test.ts +35 -2
- package/src/resources/extensions/gsd/tests/worktree-health-monorepo.test.ts +73 -0
- package/src/resources/extensions/gsd/tests/worktree-resolver.test.ts +34 -0
- package/src/resources/extensions/gsd/tests/worktree-submodule-safety.test.ts +1 -1
- package/src/resources/extensions/gsd/tests/worktree-teardown-safety.test.ts +148 -0
- package/src/resources/extensions/gsd/tools/complete-milestone.ts +34 -20
- package/src/resources/extensions/gsd/tools/complete-slice.ts +41 -26
- package/src/resources/extensions/gsd/tools/complete-task.ts +12 -12
- package/src/resources/extensions/gsd/tools/plan-milestone.ts +55 -30
- package/src/resources/extensions/gsd/tools/plan-slice.ts +13 -8
- package/src/resources/extensions/gsd/types.ts +44 -22
- package/src/resources/extensions/gsd/verification-evidence.ts +68 -0
- package/src/resources/extensions/gsd/workflow-logger.ts +15 -1
- package/src/resources/extensions/gsd/workflow-projections.ts +23 -5
- package/src/resources/extensions/gsd/worktree-manager.ts +76 -28
- package/src/resources/extensions/gsd/worktree-resolver.ts +4 -3
- package/src/resources/extensions/mcp-client/auth.ts +149 -0
- package/src/resources/extensions/mcp-client/index.ts +16 -1
- package/src/resources/extensions/ollama/index.ts +26 -25
- package/src/resources/extensions/ollama/model-capabilities.ts +41 -34
- package/src/resources/extensions/ollama/ndjson-stream.ts +63 -0
- package/src/resources/extensions/ollama/ollama-auth-mode.test.ts +20 -0
- package/src/resources/extensions/ollama/ollama-chat-provider.ts +459 -0
- package/src/resources/extensions/ollama/ollama-client.ts +30 -30
- package/src/resources/extensions/ollama/ollama-discovery.ts +5 -8
- package/src/resources/extensions/ollama/ollama-tool.ts +69 -0
- package/src/resources/extensions/ollama/tests/ollama-chat-provider-stream.test.ts +82 -0
- package/src/resources/extensions/ollama/tests/ollama-discovery.test.ts +0 -27
- package/src/resources/extensions/ollama/thinking-parser.ts +116 -0
- package/src/resources/extensions/ollama/types.ts +23 -0
- package/dist/web/standalone/.next/server/chunks/2229.js +0 -12
- package/dist/web/standalone/.next/static/5FLUBNdqolRyyehCyChPd/_buildManifest.js +0 -1
- package/dist/web/standalone/.next/static/chunks/app/_global-error/page-c4cc189e7b117ea2.js +0 -1
- package/dist/web/standalone/.next/static/chunks/app/api/boot/route-c4cc189e7b117ea2.js +0 -1
- package/dist/web/standalone/.next/static/chunks/app/api/bridge-terminal/input/route-c4cc189e7b117ea2.js +0 -1
- package/dist/web/standalone/.next/static/chunks/app/api/bridge-terminal/resize/route-c4cc189e7b117ea2.js +0 -1
- package/dist/web/standalone/.next/static/chunks/app/api/bridge-terminal/stream/route-c4cc189e7b117ea2.js +0 -1
- package/dist/web/standalone/.next/static/chunks/app/api/browse-directories/route-c4cc189e7b117ea2.js +0 -1
- package/dist/web/standalone/.next/static/chunks/app/api/captures/route-c4cc189e7b117ea2.js +0 -1
- package/dist/web/standalone/.next/static/chunks/app/api/cleanup/route-c4cc189e7b117ea2.js +0 -1
- package/dist/web/standalone/.next/static/chunks/app/api/dev-mode/route-c4cc189e7b117ea2.js +0 -1
- package/dist/web/standalone/.next/static/chunks/app/api/doctor/route-c4cc189e7b117ea2.js +0 -1
- package/dist/web/standalone/.next/static/chunks/app/api/experimental/route-c4cc189e7b117ea2.js +0 -1
- package/dist/web/standalone/.next/static/chunks/app/api/export-data/route-c4cc189e7b117ea2.js +0 -1
- package/dist/web/standalone/.next/static/chunks/app/api/files/route-c4cc189e7b117ea2.js +0 -1
- package/dist/web/standalone/.next/static/chunks/app/api/forensics/route-c4cc189e7b117ea2.js +0 -1
- package/dist/web/standalone/.next/static/chunks/app/api/git/route-c4cc189e7b117ea2.js +0 -1
- package/dist/web/standalone/.next/static/chunks/app/api/history/route-c4cc189e7b117ea2.js +0 -1
- package/dist/web/standalone/.next/static/chunks/app/api/hooks/route-c4cc189e7b117ea2.js +0 -1
- package/dist/web/standalone/.next/static/chunks/app/api/inspect/route-c4cc189e7b117ea2.js +0 -1
- package/dist/web/standalone/.next/static/chunks/app/api/knowledge/route-c4cc189e7b117ea2.js +0 -1
- package/dist/web/standalone/.next/static/chunks/app/api/live-state/route-c4cc189e7b117ea2.js +0 -1
- package/dist/web/standalone/.next/static/chunks/app/api/onboarding/route-c4cc189e7b117ea2.js +0 -1
- package/dist/web/standalone/.next/static/chunks/app/api/preferences/route-c4cc189e7b117ea2.js +0 -1
- package/dist/web/standalone/.next/static/chunks/app/api/projects/route-c4cc189e7b117ea2.js +0 -1
- package/dist/web/standalone/.next/static/chunks/app/api/recovery/route-c4cc189e7b117ea2.js +0 -1
- package/dist/web/standalone/.next/static/chunks/app/api/remote-questions/route-c4cc189e7b117ea2.js +0 -1
- package/dist/web/standalone/.next/static/chunks/app/api/session/browser/route-c4cc189e7b117ea2.js +0 -1
- package/dist/web/standalone/.next/static/chunks/app/api/session/command/route-c4cc189e7b117ea2.js +0 -1
- package/dist/web/standalone/.next/static/chunks/app/api/session/events/route-c4cc189e7b117ea2.js +0 -1
- package/dist/web/standalone/.next/static/chunks/app/api/session/manage/route-c4cc189e7b117ea2.js +0 -1
- package/dist/web/standalone/.next/static/chunks/app/api/settings-data/route-c4cc189e7b117ea2.js +0 -1
- package/dist/web/standalone/.next/static/chunks/app/api/shutdown/route-c4cc189e7b117ea2.js +0 -1
- package/dist/web/standalone/.next/static/chunks/app/api/skill-health/route-c4cc189e7b117ea2.js +0 -1
- package/dist/web/standalone/.next/static/chunks/app/api/steer/route-c4cc189e7b117ea2.js +0 -1
- package/dist/web/standalone/.next/static/chunks/app/api/switch-root/route-c4cc189e7b117ea2.js +0 -1
- package/dist/web/standalone/.next/static/chunks/app/api/terminal/input/route-c4cc189e7b117ea2.js +0 -1
- package/dist/web/standalone/.next/static/chunks/app/api/terminal/resize/route-c4cc189e7b117ea2.js +0 -1
- package/dist/web/standalone/.next/static/chunks/app/api/terminal/sessions/route-c4cc189e7b117ea2.js +0 -1
- package/dist/web/standalone/.next/static/chunks/app/api/terminal/stream/route-c4cc189e7b117ea2.js +0 -1
- package/dist/web/standalone/.next/static/chunks/app/api/terminal/upload/route-c4cc189e7b117ea2.js +0 -1
- package/dist/web/standalone/.next/static/chunks/app/api/undo/route-c4cc189e7b117ea2.js +0 -1
- package/dist/web/standalone/.next/static/chunks/app/api/update/route-c4cc189e7b117ea2.js +0 -1
- package/dist/web/standalone/.next/static/chunks/app/api/visualizer/route-c4cc189e7b117ea2.js +0 -1
- package/dist/web/standalone/.next/static/chunks/app/page-62be3b5fa91e4c8f.js +0 -1
- package/dist/web/standalone/.next/static/chunks/main-app-d3d4c336195465f9.js +0 -1
- package/dist/web/standalone/.next/static/chunks/next/dist/client/components/builtin/app-error-c4cc189e7b117ea2.js +0 -1
- package/dist/web/standalone/.next/static/chunks/next/dist/client/components/builtin/forbidden-c4cc189e7b117ea2.js +0 -1
- package/dist/web/standalone/.next/static/chunks/next/dist/client/components/builtin/global-error-ab5a8926e07ec673.js +0 -1
- package/dist/web/standalone/.next/static/chunks/next/dist/client/components/builtin/not-found-c4cc189e7b117ea2.js +0 -1
- package/dist/web/standalone/.next/static/chunks/next/dist/client/components/builtin/unauthorized-c4cc189e7b117ea2.js +0 -1
- /package/dist/web/standalone/.next/static/{5FLUBNdqolRyyehCyChPd → Vbx2-SrSBOgta6576xj9m}/_ssgManifest.js +0 -0
|
@@ -9,13 +9,15 @@
|
|
|
9
9
|
* value instead of calling return/pauseAuto directly — the caller
|
|
10
10
|
* checks the result and handles control flow.
|
|
11
11
|
*/
|
|
12
|
+
import { mkdirSync, writeFileSync } from "node:fs";
|
|
12
13
|
import { resolveSlicePath } from "./paths.js";
|
|
13
14
|
import { parseUnitId } from "./unit-id.js";
|
|
14
|
-
import { isDbAvailable, getTask } from "./gsd-db.js";
|
|
15
|
+
import { isDbAvailable, getTask, getSliceTasks } from "./gsd-db.js";
|
|
15
16
|
import { loadEffectiveGSDPreferences } from "./preferences.js";
|
|
16
17
|
import { runVerificationGate, formatFailureContext, captureRuntimeErrors, runDependencyAudit, } from "./verification-gate.js";
|
|
17
18
|
import { writeVerificationJSON } from "./verification-evidence.js";
|
|
18
19
|
import { logWarning } from "./workflow-logger.js";
|
|
20
|
+
import { runPostExecutionChecks } from "./post-execution-checks.js";
|
|
19
21
|
import { join } from "node:path";
|
|
20
22
|
function isInfraVerificationFailure(stderr) {
|
|
21
23
|
return /\b(ENOENT|ENOTFOUND|ETIMEDOUT|ECONNRESET|EAI_AGAIN|spawn\s+\S+\s+ENOENT|command not found)\b/i.test(stderr);
|
|
@@ -128,12 +130,104 @@ export async function runPostUnitVerification(vctx, pauseAuto) {
|
|
|
128
130
|
: "Verification failed due to infrastructure/runtime environment issues — treating as advisory.", "warning");
|
|
129
131
|
return "continue";
|
|
130
132
|
}
|
|
133
|
+
// ── Post-execution checks (run after main verification passes for execute-task units) ──
|
|
134
|
+
let postExecChecks;
|
|
135
|
+
let postExecBlockingFailure = false;
|
|
136
|
+
if (result.passed && mid && sid && tid) {
|
|
137
|
+
// Check preferences — respect enhanced_verification and enhanced_verification_post
|
|
138
|
+
const enhancedEnabled = prefs?.enhanced_verification !== false; // default true
|
|
139
|
+
const postEnabled = prefs?.enhanced_verification_post !== false; // default true
|
|
140
|
+
if (enhancedEnabled && postEnabled && isDbAvailable()) {
|
|
141
|
+
try {
|
|
142
|
+
// Get the completed task from DB
|
|
143
|
+
const taskRow = getTask(mid, sid, tid);
|
|
144
|
+
if (taskRow && taskRow.key_files && taskRow.key_files.length > 0) {
|
|
145
|
+
// Get all tasks in the slice
|
|
146
|
+
const allTasks = getSliceTasks(mid, sid);
|
|
147
|
+
// Filter to prior completed tasks (status = 'complete' or 'done', before current task)
|
|
148
|
+
const priorTasks = allTasks.filter((t) => (t.status === "complete" || t.status === "done") &&
|
|
149
|
+
t.id !== tid &&
|
|
150
|
+
t.sequence < taskRow.sequence);
|
|
151
|
+
// Run post-execution checks
|
|
152
|
+
const postExecResult = runPostExecutionChecks(taskRow, priorTasks, s.basePath);
|
|
153
|
+
// Store checks for evidence JSON
|
|
154
|
+
postExecChecks = postExecResult.checks;
|
|
155
|
+
// Log summary to stderr with gsd-post-exec: prefix
|
|
156
|
+
const emoji = postExecResult.status === "pass"
|
|
157
|
+
? "✅"
|
|
158
|
+
: postExecResult.status === "warn"
|
|
159
|
+
? "⚠️"
|
|
160
|
+
: "❌";
|
|
161
|
+
process.stderr.write(`gsd-post-exec: ${emoji} Post-execution checks ${postExecResult.status} for ${mid}/${sid}/${tid} (${postExecResult.durationMs}ms)\n`);
|
|
162
|
+
// Log individual check results
|
|
163
|
+
for (const check of postExecResult.checks) {
|
|
164
|
+
const checkEmoji = check.passed
|
|
165
|
+
? "✓"
|
|
166
|
+
: check.blocking
|
|
167
|
+
? "✗"
|
|
168
|
+
: "⚠";
|
|
169
|
+
process.stderr.write(`gsd-post-exec: ${checkEmoji} [${check.category}] ${check.target}: ${check.message}\n`);
|
|
170
|
+
}
|
|
171
|
+
// Check for blocking failures
|
|
172
|
+
if (postExecResult.status === "fail") {
|
|
173
|
+
postExecBlockingFailure = true;
|
|
174
|
+
const blockingCount = postExecResult.checks.filter((c) => !c.passed && c.blocking).length;
|
|
175
|
+
ctx.ui.notify(`Post-execution checks failed: ${blockingCount} blocking issue${blockingCount === 1 ? "" : "s"} found`, "error");
|
|
176
|
+
}
|
|
177
|
+
else if (postExecResult.status === "warn") {
|
|
178
|
+
ctx.ui.notify(`Post-execution checks passed with warnings`, "warning");
|
|
179
|
+
// Strict mode: treat warnings as blocking
|
|
180
|
+
if (prefs?.enhanced_verification_strict === true) {
|
|
181
|
+
postExecBlockingFailure = true;
|
|
182
|
+
}
|
|
183
|
+
}
|
|
184
|
+
}
|
|
185
|
+
}
|
|
186
|
+
catch (postExecErr) {
|
|
187
|
+
// Post-execution check errors are non-fatal — log and continue
|
|
188
|
+
logWarning("engine", `gsd-post-exec: error — ${postExecErr.message}`);
|
|
189
|
+
}
|
|
190
|
+
}
|
|
191
|
+
}
|
|
192
|
+
// Re-write verification evidence JSON with post-execution checks
|
|
193
|
+
if (postExecChecks && postExecChecks.length > 0 && mid && sid && tid) {
|
|
194
|
+
try {
|
|
195
|
+
const sDir = resolveSlicePath(s.basePath, mid, sid);
|
|
196
|
+
if (sDir) {
|
|
197
|
+
const tasksDir = join(sDir, "tasks");
|
|
198
|
+
// Add postExecutionChecks to the result for the JSON write
|
|
199
|
+
const resultWithPostExec = {
|
|
200
|
+
...result,
|
|
201
|
+
// Mark as failed if there was a blocking post-exec failure
|
|
202
|
+
passed: result.passed && !postExecBlockingFailure,
|
|
203
|
+
};
|
|
204
|
+
// Manually write with postExecutionChecks field
|
|
205
|
+
writeVerificationJSONWithPostExec(resultWithPostExec, tasksDir, tid, s.currentUnit.id, postExecChecks, postExecBlockingFailure ? attempt + 1 : undefined, postExecBlockingFailure ? maxRetries : undefined);
|
|
206
|
+
}
|
|
207
|
+
}
|
|
208
|
+
catch (evidenceErr) {
|
|
209
|
+
logWarning("engine", `verification-evidence: post-exec write error — ${evidenceErr.message}`);
|
|
210
|
+
}
|
|
211
|
+
}
|
|
212
|
+
// Update result.passed based on post-execution checks
|
|
213
|
+
if (postExecBlockingFailure) {
|
|
214
|
+
result.passed = false;
|
|
215
|
+
}
|
|
131
216
|
// ── Auto-fix retry logic ──
|
|
132
217
|
if (result.passed) {
|
|
133
218
|
s.verificationRetryCount.delete(s.currentUnit.id);
|
|
134
219
|
s.pendingVerificationRetry = null;
|
|
135
220
|
return "continue";
|
|
136
221
|
}
|
|
222
|
+
else if (postExecBlockingFailure) {
|
|
223
|
+
// Post-execution failures are cross-task consistency issues — retrying the same task won't fix them.
|
|
224
|
+
// Skip retry and pause immediately for human review.
|
|
225
|
+
s.verificationRetryCount.delete(s.currentUnit.id);
|
|
226
|
+
s.pendingVerificationRetry = null;
|
|
227
|
+
ctx.ui.notify(`Post-execution checks failed — cross-task consistency issue detected, pausing for human review`, "error");
|
|
228
|
+
await pauseAuto(ctx, pi);
|
|
229
|
+
return "pause";
|
|
230
|
+
}
|
|
137
231
|
else if (autoFixEnabled && attempt + 1 <= maxRetries) {
|
|
138
232
|
const nextAttempt = attempt + 1;
|
|
139
233
|
s.verificationRetryCount.set(s.currentUnit.id, nextAttempt);
|
|
@@ -173,3 +267,46 @@ export async function runPostUnitVerification(vctx, pauseAuto) {
|
|
|
173
267
|
return "continue";
|
|
174
268
|
}
|
|
175
269
|
}
|
|
270
|
+
/**
|
|
271
|
+
* Write verification evidence JSON with post-execution checks included.
|
|
272
|
+
* This is a variant of writeVerificationJSON that adds the postExecutionChecks field.
|
|
273
|
+
*/
|
|
274
|
+
function writeVerificationJSONWithPostExec(result, tasksDir, taskId, unitId, postExecutionChecks, retryAttempt, maxRetries) {
|
|
275
|
+
mkdirSync(tasksDir, { recursive: true });
|
|
276
|
+
const evidence = {
|
|
277
|
+
schemaVersion: 1,
|
|
278
|
+
taskId,
|
|
279
|
+
unitId: unitId ?? taskId,
|
|
280
|
+
timestamp: result.timestamp,
|
|
281
|
+
passed: result.passed,
|
|
282
|
+
discoverySource: result.discoverySource,
|
|
283
|
+
checks: result.checks.map((check) => ({
|
|
284
|
+
command: check.command,
|
|
285
|
+
exitCode: check.exitCode,
|
|
286
|
+
durationMs: check.durationMs,
|
|
287
|
+
verdict: check.exitCode === 0 ? "pass" : "fail",
|
|
288
|
+
})),
|
|
289
|
+
...(retryAttempt !== undefined ? { retryAttempt } : {}),
|
|
290
|
+
...(maxRetries !== undefined ? { maxRetries } : {}),
|
|
291
|
+
postExecutionChecks,
|
|
292
|
+
};
|
|
293
|
+
if (result.runtimeErrors && result.runtimeErrors.length > 0) {
|
|
294
|
+
evidence.runtimeErrors = result.runtimeErrors.map(e => ({
|
|
295
|
+
source: e.source,
|
|
296
|
+
severity: e.severity,
|
|
297
|
+
message: e.message,
|
|
298
|
+
blocking: e.blocking,
|
|
299
|
+
}));
|
|
300
|
+
}
|
|
301
|
+
if (result.auditWarnings && result.auditWarnings.length > 0) {
|
|
302
|
+
evidence.auditWarnings = result.auditWarnings.map(w => ({
|
|
303
|
+
name: w.name,
|
|
304
|
+
severity: w.severity,
|
|
305
|
+
title: w.title,
|
|
306
|
+
url: w.url,
|
|
307
|
+
fixAvailable: w.fixAvailable,
|
|
308
|
+
}));
|
|
309
|
+
}
|
|
310
|
+
const filePath = join(tasksDir, `${taskId}-VERIFY.json`);
|
|
311
|
+
writeFileSync(filePath, JSON.stringify(evidence, null, 2) + "\n", "utf-8");
|
|
312
|
+
}
|
|
@@ -14,7 +14,7 @@ import { atomicWriteSync } from "./atomic-write.js";
|
|
|
14
14
|
import { execFileSync } from "node:child_process";
|
|
15
15
|
import { safeCopy, safeCopyRecursive } from "./safe-fs.js";
|
|
16
16
|
import { gsdRoot } from "./paths.js";
|
|
17
|
-
import { createWorktree, removeWorktree, resolveGitDir, worktreePath, } from "./worktree-manager.js";
|
|
17
|
+
import { createWorktree, removeWorktree, resolveGitDir, worktreePath, isInsideWorktreesDir, } from "./worktree-manager.js";
|
|
18
18
|
import { detectWorktreeName, nudgeGitBranchCache, } from "./worktree.js";
|
|
19
19
|
import { MergeConflictError, readIntegrationBranch, RUNTIME_EXCLUSION_PATHS } from "./git-service.js";
|
|
20
20
|
import { debugLog } from "./debug-logger.js";
|
|
@@ -1025,13 +1025,19 @@ export function teardownAutoWorktree(originalBasePath, milestoneId, opts = {}) {
|
|
|
1025
1025
|
logWarning("reconcile", `Worktree directory still exists after teardown: ${wtDir}. ` +
|
|
1026
1026
|
`This is likely an orphaned directory consuming disk space. ` +
|
|
1027
1027
|
`Remove it manually with: rm -rf "${wtDir.replaceAll("\\", "/")}"`, { worktree: milestoneId });
|
|
1028
|
-
// Attempt a direct filesystem removal as a fallback
|
|
1029
|
-
|
|
1030
|
-
|
|
1028
|
+
// Attempt a direct filesystem removal as a fallback — but ONLY if the
|
|
1029
|
+
// path is safely inside .gsd/worktrees/ to prevent #2365 data loss.
|
|
1030
|
+
if (isInsideWorktreesDir(originalBasePath, wtDir)) {
|
|
1031
|
+
try {
|
|
1032
|
+
rmSync(wtDir, { recursive: true, force: true });
|
|
1033
|
+
}
|
|
1034
|
+
catch (err) {
|
|
1035
|
+
// Non-fatal — the warning above tells the user how to clean up
|
|
1036
|
+
logWarning("worktree", `worktree directory removal failed: ${err instanceof Error ? err.message : String(err)}`);
|
|
1037
|
+
}
|
|
1031
1038
|
}
|
|
1032
|
-
|
|
1033
|
-
|
|
1034
|
-
logWarning("worktree", `worktree directory removal failed: ${err instanceof Error ? err.message : String(err)}`);
|
|
1039
|
+
else {
|
|
1040
|
+
console.error(`[GSD] REFUSING fallback rmSync — path is outside .gsd/worktrees/: ${wtDir}`);
|
|
1035
1041
|
}
|
|
1036
1042
|
}
|
|
1037
1043
|
}
|
|
@@ -23,7 +23,7 @@ import { acquireSessionLock, getSessionLockStatus, releaseSessionLock, updateSes
|
|
|
23
23
|
import { resolveAutoSupervisorConfig, loadEffectiveGSDPreferences, getIsolationMode, } from "./preferences.js";
|
|
24
24
|
import { sendDesktopNotification } from "./notifications.js";
|
|
25
25
|
import { getBudgetAlertLevel, getNewBudgetAlertLevel, getBudgetEnforcementAction, } from "./auto-budget.js";
|
|
26
|
-
import { markToolStart as _markToolStart, markToolEnd as _markToolEnd, getOldestInFlightToolAgeMs as _getOldestInFlightToolAgeMs, clearInFlightTools, } from "./auto-tool-tracking.js";
|
|
26
|
+
import { markToolStart as _markToolStart, markToolEnd as _markToolEnd, getOldestInFlightToolAgeMs as _getOldestInFlightToolAgeMs, clearInFlightTools, isToolInvocationError, } from "./auto-tool-tracking.js";
|
|
27
27
|
import { closeoutUnit } from "./auto-unit-closeout.js";
|
|
28
28
|
import { selectAndApplyModel, resolveModelId } from "./auto-model-selection.js";
|
|
29
29
|
import { resetRoutingHistory, recordOutcome } from "./routing-history.js";
|
|
@@ -57,7 +57,7 @@ import { clearCmuxSidebar, logCmuxEvent, syncCmuxSidebar } from "../cmux/index.j
|
|
|
57
57
|
import { startUnitSupervision } from "./auto-timers.js";
|
|
58
58
|
import { runPostUnitVerification } from "./auto-verification.js";
|
|
59
59
|
import { postUnitPreVerification, postUnitPostVerification, } from "./auto-post-unit.js";
|
|
60
|
-
import { bootstrapAutoSession } from "./auto-start.js";
|
|
60
|
+
import { bootstrapAutoSession, openProjectDbIfPresent } from "./auto-start.js";
|
|
61
61
|
import { autoLoop, resolveAgentEnd, resolveAgentEndCancelled, _resetPendingResolve, isSessionSwitchInFlight } from "./auto-loop.js";
|
|
62
62
|
import { WorktreeResolver, } from "./worktree-resolver.js";
|
|
63
63
|
import { reorderForCaching } from "./prompt-ordering.js";
|
|
@@ -192,6 +192,19 @@ export function markToolStart(toolCallId, toolName) {
|
|
|
192
192
|
export function markToolEnd(toolCallId) {
|
|
193
193
|
_markToolEnd(toolCallId);
|
|
194
194
|
}
|
|
195
|
+
/**
|
|
196
|
+
* Record a tool invocation error on the current session (#2883).
|
|
197
|
+
* Called from tool_execution_end when a GSD tool fails with isError.
|
|
198
|
+
* Only stores the error if it matches the tool-invocation-error pattern
|
|
199
|
+
* (malformed/truncated JSON), not normal business-logic errors.
|
|
200
|
+
*/
|
|
201
|
+
export function recordToolInvocationError(toolName, errorMsg) {
|
|
202
|
+
if (!s.active)
|
|
203
|
+
return;
|
|
204
|
+
if (isToolInvocationError(errorMsg)) {
|
|
205
|
+
s.lastToolInvocationError = `${toolName}: ${errorMsg}`;
|
|
206
|
+
}
|
|
207
|
+
}
|
|
195
208
|
export function getOldestInFlightToolAgeMs() {
|
|
196
209
|
return _getOldestInFlightToolAgeMs();
|
|
197
210
|
}
|
|
@@ -630,6 +643,7 @@ export async function pauseAuto(ctx, _pi, _errorContext) {
|
|
|
630
643
|
sessionFile: s.pausedSessionFile,
|
|
631
644
|
activeEngineId: s.activeEngineId,
|
|
632
645
|
activeRunDir: s.activeRunDir,
|
|
646
|
+
autoStartTime: s.autoStartTime,
|
|
633
647
|
};
|
|
634
648
|
const runtimeDir = join(gsdRoot(s.originalBasePath || s.basePath), "runtime");
|
|
635
649
|
mkdirSync(runtimeDir, { recursive: true });
|
|
@@ -829,6 +843,7 @@ export async function startAuto(ctx, pi, base, verboseMode, options) {
|
|
|
829
843
|
s.activeRunDir = meta.activeRunDir ?? null;
|
|
830
844
|
s.originalBasePath = meta.originalBasePath || base;
|
|
831
845
|
s.stepMode = meta.stepMode ?? requestedStepMode;
|
|
846
|
+
s.autoStartTime = meta.autoStartTime || Date.now();
|
|
832
847
|
s.paused = true;
|
|
833
848
|
try {
|
|
834
849
|
unlinkSync(pausedPath);
|
|
@@ -856,6 +871,7 @@ export async function startAuto(ctx, pi, base, verboseMode, options) {
|
|
|
856
871
|
s.currentMilestoneId = meta.milestoneId;
|
|
857
872
|
s.originalBasePath = meta.originalBasePath || base;
|
|
858
873
|
s.stepMode = meta.stepMode ?? requestedStepMode;
|
|
874
|
+
s.autoStartTime = meta.autoStartTime || Date.now();
|
|
859
875
|
s.paused = true;
|
|
860
876
|
// Clean up the persisted file — we're consuming it
|
|
861
877
|
try {
|
|
@@ -887,6 +903,8 @@ export async function startAuto(ctx, pi, base, verboseMode, options) {
|
|
|
887
903
|
s.cmdCtx = ctx;
|
|
888
904
|
s.basePath = base;
|
|
889
905
|
setLogBasePath(base);
|
|
906
|
+
if (!s.autoStartTime || s.autoStartTime <= 0)
|
|
907
|
+
s.autoStartTime = Date.now();
|
|
890
908
|
s.unitDispatchCount.clear();
|
|
891
909
|
s.unitLifetimeDispatches.clear();
|
|
892
910
|
if (!getLedger())
|
|
@@ -909,6 +927,9 @@ export async function startAuto(ctx, pi, base, verboseMode, options) {
|
|
|
909
927
|
ctx.ui.setFooter(hideFooter);
|
|
910
928
|
ctx.ui.notify(s.stepMode ? "Step-mode resumed." : "Auto-mode resumed.", "info");
|
|
911
929
|
restoreHookState(s.basePath);
|
|
930
|
+
// Open the project DB before rebuild/derive so resume uses DB-backed
|
|
931
|
+
// state instead of falling back to stale markdown parsing (#2940).
|
|
932
|
+
await openProjectDbIfPresent(s.basePath);
|
|
912
933
|
try {
|
|
913
934
|
await rebuildState(s.basePath);
|
|
914
935
|
syncCmuxSidebar(loadEffectiveGSDPreferences()?.preferences, await deriveState(s.basePath));
|
|
@@ -1005,6 +1026,7 @@ const widgetStateAccessors = {
|
|
|
1005
1026
|
getBasePath: () => s.basePath,
|
|
1006
1027
|
isVerbose: () => s.verbose,
|
|
1007
1028
|
isSessionSwitching: isSessionSwitchInFlight,
|
|
1029
|
+
getCurrentDispatchedModelId: () => s.currentDispatchedModelId,
|
|
1008
1030
|
};
|
|
1009
1031
|
// ─── Preconditions ────────────────────────────────────────────────────────────
|
|
1010
1032
|
/**
|
|
@@ -486,28 +486,10 @@ export function registerDbTools(pi) {
|
|
|
486
486
|
"Use the canonical name gsd_plan_milestone; gsd_milestone_plan is only an alias.",
|
|
487
487
|
],
|
|
488
488
|
parameters: Type.Object({
|
|
489
|
+
// ── Core identification + content (required) ──────────────────────
|
|
489
490
|
milestoneId: Type.String({ description: "Milestone ID (e.g. M001)" }),
|
|
490
491
|
title: Type.String({ description: "Milestone title" }),
|
|
491
|
-
status: Type.Optional(Type.String({ description: "Milestone status (defaults to active)" })),
|
|
492
|
-
dependsOn: Type.Optional(Type.Array(Type.String(), { description: "Milestone dependencies" })),
|
|
493
492
|
vision: Type.String({ description: "Milestone vision" }),
|
|
494
|
-
successCriteria: Type.Array(Type.String(), { description: "Top-level success criteria bullets" }),
|
|
495
|
-
keyRisks: Type.Array(Type.Object({
|
|
496
|
-
risk: Type.String({ description: "Risk statement" }),
|
|
497
|
-
whyItMatters: Type.String({ description: "Why the risk matters" }),
|
|
498
|
-
}), { description: "Structured risk entries" }),
|
|
499
|
-
proofStrategy: Type.Array(Type.Object({
|
|
500
|
-
riskOrUnknown: Type.String({ description: "Risk or unknown to retire" }),
|
|
501
|
-
retireIn: Type.String({ description: "Where it will be retired" }),
|
|
502
|
-
whatWillBeProven: Type.String({ description: "What proof will be produced" }),
|
|
503
|
-
}), { description: "Structured proof strategy entries" }),
|
|
504
|
-
verificationContract: Type.String({ description: "Verification contract text" }),
|
|
505
|
-
verificationIntegration: Type.String({ description: "Integration verification text" }),
|
|
506
|
-
verificationOperational: Type.String({ description: "Operational verification text" }),
|
|
507
|
-
verificationUat: Type.String({ description: "UAT verification text" }),
|
|
508
|
-
definitionOfDone: Type.Array(Type.String(), { description: "Definition of done bullets" }),
|
|
509
|
-
requirementCoverage: Type.String({ description: "Requirement coverage text" }),
|
|
510
|
-
boundaryMapMarkdown: Type.String({ description: "Boundary map markdown block" }),
|
|
511
493
|
slices: Type.Array(Type.Object({
|
|
512
494
|
sliceId: Type.String({ description: "Slice ID (e.g. S01)" }),
|
|
513
495
|
title: Type.String({ description: "Slice title" }),
|
|
@@ -520,6 +502,26 @@ export function registerDbTools(pi) {
|
|
|
520
502
|
integrationClosure: Type.String({ description: "Slice integration closure" }),
|
|
521
503
|
observabilityImpact: Type.String({ description: "Slice observability impact" }),
|
|
522
504
|
}), { description: "Planned slices for the milestone" }),
|
|
505
|
+
// ── Enrichment metadata (optional — defaults to empty) ────────────
|
|
506
|
+
status: Type.Optional(Type.String({ description: "Milestone status (defaults to active)" })),
|
|
507
|
+
dependsOn: Type.Optional(Type.Array(Type.String(), { description: "Milestone dependencies" })),
|
|
508
|
+
successCriteria: Type.Optional(Type.Array(Type.String(), { description: "Top-level success criteria bullets" })),
|
|
509
|
+
keyRisks: Type.Optional(Type.Array(Type.Object({
|
|
510
|
+
risk: Type.String({ description: "Risk statement" }),
|
|
511
|
+
whyItMatters: Type.String({ description: "Why the risk matters" }),
|
|
512
|
+
}), { description: "Structured risk entries" })),
|
|
513
|
+
proofStrategy: Type.Optional(Type.Array(Type.Object({
|
|
514
|
+
riskOrUnknown: Type.String({ description: "Risk or unknown to retire" }),
|
|
515
|
+
retireIn: Type.String({ description: "Where it will be retired" }),
|
|
516
|
+
whatWillBeProven: Type.String({ description: "What proof will be produced" }),
|
|
517
|
+
}), { description: "Structured proof strategy entries" })),
|
|
518
|
+
verificationContract: Type.Optional(Type.String({ description: "Verification contract text" })),
|
|
519
|
+
verificationIntegration: Type.Optional(Type.String({ description: "Integration verification text" })),
|
|
520
|
+
verificationOperational: Type.Optional(Type.String({ description: "Operational verification text" })),
|
|
521
|
+
verificationUat: Type.Optional(Type.String({ description: "UAT verification text" })),
|
|
522
|
+
definitionOfDone: Type.Optional(Type.Array(Type.String(), { description: "Definition of done bullets" })),
|
|
523
|
+
requirementCoverage: Type.Optional(Type.String({ description: "Requirement coverage text" })),
|
|
524
|
+
boundaryMapMarkdown: Type.Optional(Type.String({ description: "Boundary map markdown block" })),
|
|
523
525
|
}),
|
|
524
526
|
execute: planMilestoneExecute,
|
|
525
527
|
};
|
|
@@ -575,13 +577,10 @@ export function registerDbTools(pi) {
|
|
|
575
577
|
"Use the canonical name gsd_plan_slice; gsd_slice_plan is only an alias.",
|
|
576
578
|
],
|
|
577
579
|
parameters: Type.Object({
|
|
580
|
+
// ── Core identification + content (required) ──────────────────────
|
|
578
581
|
milestoneId: Type.String({ description: "Milestone ID (e.g. M001)" }),
|
|
579
582
|
sliceId: Type.String({ description: "Slice ID (e.g. S01)" }),
|
|
580
583
|
goal: Type.String({ description: "Slice goal" }),
|
|
581
|
-
successCriteria: Type.String({ description: "Slice success criteria block" }),
|
|
582
|
-
proofLevel: Type.String({ description: "Slice proof level" }),
|
|
583
|
-
integrationClosure: Type.String({ description: "Slice integration closure" }),
|
|
584
|
-
observabilityImpact: Type.String({ description: "Slice observability impact" }),
|
|
585
584
|
tasks: Type.Array(Type.Object({
|
|
586
585
|
taskId: Type.String({ description: "Task ID (e.g. T01)" }),
|
|
587
586
|
title: Type.String({ description: "Task title" }),
|
|
@@ -593,6 +592,11 @@ export function registerDbTools(pi) {
|
|
|
593
592
|
expectedOutput: Type.Array(Type.String(), { description: "Expected output files or artifacts" }),
|
|
594
593
|
observabilityImpact: Type.Optional(Type.String({ description: "Task observability impact" })),
|
|
595
594
|
}), { description: "Planned tasks for the slice" }),
|
|
595
|
+
// ── Enrichment metadata (optional — defaults to empty) ────────────
|
|
596
|
+
successCriteria: Type.Optional(Type.String({ description: "Slice success criteria block" })),
|
|
597
|
+
proofLevel: Type.Optional(Type.String({ description: "Slice proof level" })),
|
|
598
|
+
integrationClosure: Type.Optional(Type.String({ description: "Slice integration closure" })),
|
|
599
|
+
observabilityImpact: Type.Optional(Type.String({ description: "Slice observability impact" })),
|
|
596
600
|
}),
|
|
597
601
|
execute: planSliceExecute,
|
|
598
602
|
};
|
|
@@ -674,8 +678,11 @@ export function registerDbTools(pi) {
|
|
|
674
678
|
};
|
|
675
679
|
}
|
|
676
680
|
try {
|
|
681
|
+
// Coerce string items to objects for verificationEvidence (#3541).
|
|
682
|
+
const coerced = { ...params };
|
|
683
|
+
coerced.verificationEvidence = (params.verificationEvidence ?? []).map((v) => typeof v === "string" ? { command: v, exitCode: -1, verdict: "unknown (coerced from string)", durationMs: 0 } : v);
|
|
677
684
|
const { handleCompleteTask } = await import("../tools/complete-task.js");
|
|
678
|
-
const result = await handleCompleteTask(
|
|
685
|
+
const result = await handleCompleteTask(coerced, process.cwd());
|
|
679
686
|
if ("error" in result) {
|
|
680
687
|
return {
|
|
681
688
|
content: [{ type: "text", text: `Error completing task: ${result.error}` }],
|
|
@@ -716,23 +723,28 @@ export function registerDbTools(pi) {
|
|
|
716
723
|
"Idempotent — calling with the same params twice will upsert (INSERT OR REPLACE) without error.",
|
|
717
724
|
],
|
|
718
725
|
parameters: Type.Object({
|
|
726
|
+
// ── Core identification + content (required) ──────────────────────
|
|
719
727
|
taskId: Type.String({ description: "Task ID (e.g. T01)" }),
|
|
720
728
|
sliceId: Type.String({ description: "Slice ID (e.g. S01)" }),
|
|
721
729
|
milestoneId: Type.String({ description: "Milestone ID (e.g. M001)" }),
|
|
722
730
|
oneLiner: Type.String({ description: "One-line summary of what was accomplished" }),
|
|
723
731
|
narrative: Type.String({ description: "Detailed narrative of what happened during the task" }),
|
|
724
732
|
verification: Type.String({ description: "What was verified and how — commands run, tests passed, behavior confirmed" }),
|
|
725
|
-
|
|
726
|
-
|
|
727
|
-
|
|
728
|
-
|
|
729
|
-
|
|
730
|
-
|
|
731
|
-
|
|
732
|
-
|
|
733
|
-
|
|
734
|
-
|
|
735
|
-
|
|
733
|
+
// ── Enrichment metadata (optional — defaults to empty) ────────────
|
|
734
|
+
deviations: Type.Optional(Type.String({ description: "Deviations from the task plan, or 'None.'" })),
|
|
735
|
+
knownIssues: Type.Optional(Type.String({ description: "Known issues discovered but not fixed, or 'None.'" })),
|
|
736
|
+
keyFiles: Type.Optional(Type.Array(Type.String(), { description: "List of key files created or modified" })),
|
|
737
|
+
keyDecisions: Type.Optional(Type.Array(Type.String(), { description: "List of key decisions made during this task" })),
|
|
738
|
+
blockerDiscovered: Type.Optional(Type.Boolean({ description: "Whether a plan-invalidating blocker was discovered" })),
|
|
739
|
+
verificationEvidence: Type.Optional(Type.Array(Type.Union([
|
|
740
|
+
Type.Object({
|
|
741
|
+
command: Type.String({ description: "Verification command that was run" }),
|
|
742
|
+
exitCode: Type.Number({ description: "Exit code of the command" }),
|
|
743
|
+
verdict: Type.String({ description: "Pass/fail verdict (e.g. '✅ pass', '❌ fail')" }),
|
|
744
|
+
durationMs: Type.Number({ description: "Duration of the command in milliseconds" }),
|
|
745
|
+
}),
|
|
746
|
+
Type.String({ description: "Fallback: verification summary string" }),
|
|
747
|
+
]), { description: "Array of verification evidence entries" })),
|
|
736
748
|
}),
|
|
737
749
|
execute: taskCompleteExecute,
|
|
738
750
|
};
|
|
@@ -748,8 +760,57 @@ export function registerDbTools(pi) {
|
|
|
748
760
|
};
|
|
749
761
|
}
|
|
750
762
|
try {
|
|
763
|
+
// Coerce string items to objects for fields where LLMs sometimes pass
|
|
764
|
+
// plain strings instead of the expected { key, value } shape (#3541).
|
|
765
|
+
// Parses "key — value" or "key - value" format when possible.
|
|
766
|
+
const splitPair = (s) => {
|
|
767
|
+
const m = s.match(/^(.+?)\s*(?:—|-)\s+(.+)$/);
|
|
768
|
+
return m ? [m[1].trim(), m[2].trim()] : [s.trim(), ""];
|
|
769
|
+
};
|
|
770
|
+
const coerced = { ...params };
|
|
771
|
+
// Coerce simple string-array fields: LLMs sometimes pass a plain string
|
|
772
|
+
// instead of a single-element array (#3585).
|
|
773
|
+
const wrapArray = (v) => v == null ? [] : Array.isArray(v) ? v : [v];
|
|
774
|
+
coerced.provides = wrapArray(params.provides);
|
|
775
|
+
coerced.keyFiles = wrapArray(params.keyFiles);
|
|
776
|
+
coerced.keyDecisions = wrapArray(params.keyDecisions);
|
|
777
|
+
coerced.patternsEstablished = wrapArray(params.patternsEstablished);
|
|
778
|
+
coerced.observabilitySurfaces = wrapArray(params.observabilitySurfaces);
|
|
779
|
+
coerced.requirementsSurfaced = wrapArray(params.requirementsSurfaced);
|
|
780
|
+
coerced.drillDownPaths = wrapArray(params.drillDownPaths);
|
|
781
|
+
coerced.affects = wrapArray(params.affects);
|
|
782
|
+
coerced.filesModified = wrapArray(params.filesModified).map((f) => {
|
|
783
|
+
if (typeof f !== "string")
|
|
784
|
+
return f;
|
|
785
|
+
const [path, description] = splitPair(f);
|
|
786
|
+
return { path, description };
|
|
787
|
+
});
|
|
788
|
+
coerced.requires = wrapArray(params.requires).map((r) => {
|
|
789
|
+
if (typeof r !== "string")
|
|
790
|
+
return r;
|
|
791
|
+
const [slice, provides] = splitPair(r);
|
|
792
|
+
return { slice, provides };
|
|
793
|
+
});
|
|
794
|
+
coerced.requirementsAdvanced = wrapArray(params.requirementsAdvanced).map((r) => {
|
|
795
|
+
if (typeof r !== "string")
|
|
796
|
+
return r;
|
|
797
|
+
const [id, how] = splitPair(r);
|
|
798
|
+
return { id, how };
|
|
799
|
+
});
|
|
800
|
+
coerced.requirementsValidated = wrapArray(params.requirementsValidated).map((r) => {
|
|
801
|
+
if (typeof r !== "string")
|
|
802
|
+
return r;
|
|
803
|
+
const [id, proof] = splitPair(r);
|
|
804
|
+
return { id, proof };
|
|
805
|
+
});
|
|
806
|
+
coerced.requirementsInvalidated = wrapArray(params.requirementsInvalidated).map((r) => {
|
|
807
|
+
if (typeof r !== "string")
|
|
808
|
+
return r;
|
|
809
|
+
const [id, what] = splitPair(r);
|
|
810
|
+
return { id, what };
|
|
811
|
+
});
|
|
751
812
|
const { handleCompleteSlice } = await import("../tools/complete-slice.js");
|
|
752
|
-
const result = await handleCompleteSlice(
|
|
813
|
+
const result = await handleCompleteSlice(coerced, process.cwd());
|
|
753
814
|
if ("error" in result) {
|
|
754
815
|
return {
|
|
755
816
|
content: [{ type: "text", text: `Error completing slice: ${result.error}` }],
|
|
@@ -789,44 +850,61 @@ export function registerDbTools(pi) {
|
|
|
789
850
|
"Idempotent — calling with the same params twice will not crash.",
|
|
790
851
|
],
|
|
791
852
|
parameters: Type.Object({
|
|
853
|
+
// ── Core identification + content (required) ──────────────────────
|
|
792
854
|
sliceId: Type.String({ description: "Slice ID (e.g. S01)" }),
|
|
793
855
|
milestoneId: Type.String({ description: "Milestone ID (e.g. M001)" }),
|
|
794
856
|
sliceTitle: Type.String({ description: "Title of the slice" }),
|
|
795
857
|
oneLiner: Type.String({ description: "One-line summary of what the slice accomplished" }),
|
|
796
858
|
narrative: Type.String({ description: "Detailed narrative of what happened across all tasks" }),
|
|
797
859
|
verification: Type.String({ description: "What was verified across all tasks" }),
|
|
798
|
-
deviations: Type.String({ description: "Deviations from the slice plan, or 'None.'" }),
|
|
799
|
-
knownLimitations: Type.String({ description: "Known limitations or gaps, or 'None.'" }),
|
|
800
|
-
followUps: Type.String({ description: "Follow-up work discovered during execution, or 'None.'" }),
|
|
801
|
-
keyFiles: Type.Array(Type.String(), { description: "Key files created or modified" }),
|
|
802
|
-
keyDecisions: Type.Array(Type.String(), { description: "Key decisions made during this slice" }),
|
|
803
|
-
patternsEstablished: Type.Array(Type.String(), { description: "Patterns established by this slice" }),
|
|
804
|
-
observabilitySurfaces: Type.Array(Type.String(), { description: "Observability surfaces added" }),
|
|
805
|
-
provides: Type.Array(Type.String(), { description: "What this slice provides to downstream slices" }),
|
|
806
|
-
requirementsSurfaced: Type.Array(Type.String(), { description: "New requirements surfaced" }),
|
|
807
|
-
drillDownPaths: Type.Array(Type.String(), { description: "Paths to task summaries for drill-down" }),
|
|
808
|
-
affects: Type.Array(Type.String(), { description: "Downstream slices affected" }),
|
|
809
|
-
requirementsAdvanced: Type.Array(Type.Object({
|
|
810
|
-
id: Type.String({ description: "Requirement ID" }),
|
|
811
|
-
how: Type.String({ description: "How it was advanced" }),
|
|
812
|
-
}), { description: "Requirements advanced by this slice" }),
|
|
813
|
-
requirementsValidated: Type.Array(Type.Object({
|
|
814
|
-
id: Type.String({ description: "Requirement ID" }),
|
|
815
|
-
proof: Type.String({ description: "What proof validates it" }),
|
|
816
|
-
}), { description: "Requirements validated by this slice" }),
|
|
817
|
-
requirementsInvalidated: Type.Array(Type.Object({
|
|
818
|
-
id: Type.String({ description: "Requirement ID" }),
|
|
819
|
-
what: Type.String({ description: "What changed" }),
|
|
820
|
-
}), { description: "Requirements invalidated or re-scoped" }),
|
|
821
|
-
filesModified: Type.Array(Type.Object({
|
|
822
|
-
path: Type.String({ description: "File path" }),
|
|
823
|
-
description: Type.String({ description: "What changed" }),
|
|
824
|
-
}), { description: "Files modified with descriptions" }),
|
|
825
|
-
requires: Type.Array(Type.Object({
|
|
826
|
-
slice: Type.String({ description: "Dependency slice ID" }),
|
|
827
|
-
provides: Type.String({ description: "What was consumed from it" }),
|
|
828
|
-
}), { description: "Upstream slice dependencies consumed" }),
|
|
829
860
|
uatContent: Type.String({ description: "UAT test content (markdown body)" }),
|
|
861
|
+
// ── Enrichment metadata (optional — defaults to empty) ────────────
|
|
862
|
+
deviations: Type.Optional(Type.String({ description: "Deviations from the slice plan, or 'None.'" })),
|
|
863
|
+
knownLimitations: Type.Optional(Type.String({ description: "Known limitations or gaps, or 'None.'" })),
|
|
864
|
+
followUps: Type.Optional(Type.String({ description: "Follow-up work discovered during execution, or 'None.'" })),
|
|
865
|
+
keyFiles: Type.Optional(Type.Union([Type.Array(Type.String()), Type.String()], { description: "Key files created or modified" })),
|
|
866
|
+
keyDecisions: Type.Optional(Type.Union([Type.Array(Type.String()), Type.String()], { description: "Key decisions made during this slice" })),
|
|
867
|
+
patternsEstablished: Type.Optional(Type.Union([Type.Array(Type.String()), Type.String()], { description: "Patterns established by this slice" })),
|
|
868
|
+
observabilitySurfaces: Type.Optional(Type.Union([Type.Array(Type.String()), Type.String()], { description: "Observability surfaces added" })),
|
|
869
|
+
provides: Type.Optional(Type.Union([Type.Array(Type.String()), Type.String()], { description: "What this slice provides to downstream slices" })),
|
|
870
|
+
requirementsSurfaced: Type.Optional(Type.Union([Type.Array(Type.String()), Type.String()], { description: "New requirements surfaced" })),
|
|
871
|
+
drillDownPaths: Type.Optional(Type.Union([Type.Array(Type.String()), Type.String()], { description: "Paths to task summaries for drill-down" })),
|
|
872
|
+
affects: Type.Optional(Type.Union([Type.Array(Type.String()), Type.String()], { description: "Downstream slices affected" })),
|
|
873
|
+
requirementsAdvanced: Type.Optional(Type.Array(Type.Union([
|
|
874
|
+
Type.Object({
|
|
875
|
+
id: Type.String({ description: "Requirement ID" }),
|
|
876
|
+
how: Type.String({ description: "How it was advanced" }),
|
|
877
|
+
}),
|
|
878
|
+
Type.String({ description: "Fallback: 'ID — how' string" }),
|
|
879
|
+
]), { description: "Requirements advanced by this slice" })),
|
|
880
|
+
requirementsValidated: Type.Optional(Type.Array(Type.Union([
|
|
881
|
+
Type.Object({
|
|
882
|
+
id: Type.String({ description: "Requirement ID" }),
|
|
883
|
+
proof: Type.String({ description: "What proof validates it" }),
|
|
884
|
+
}),
|
|
885
|
+
Type.String({ description: "Fallback: 'ID — proof' string" }),
|
|
886
|
+
]), { description: "Requirements validated by this slice" })),
|
|
887
|
+
requirementsInvalidated: Type.Optional(Type.Array(Type.Union([
|
|
888
|
+
Type.Object({
|
|
889
|
+
id: Type.String({ description: "Requirement ID" }),
|
|
890
|
+
what: Type.String({ description: "What changed" }),
|
|
891
|
+
}),
|
|
892
|
+
Type.String({ description: "Fallback: 'ID — what' string" }),
|
|
893
|
+
]), { description: "Requirements invalidated or re-scoped" })),
|
|
894
|
+
filesModified: Type.Optional(Type.Array(Type.Union([
|
|
895
|
+
Type.Object({
|
|
896
|
+
path: Type.String({ description: "File path" }),
|
|
897
|
+
description: Type.String({ description: "What changed" }),
|
|
898
|
+
}),
|
|
899
|
+
Type.String({ description: "Fallback: file path string" }),
|
|
900
|
+
]), { description: "Files modified with descriptions" })),
|
|
901
|
+
requires: Type.Optional(Type.Array(Type.Union([
|
|
902
|
+
Type.Object({
|
|
903
|
+
slice: Type.String({ description: "Dependency slice ID" }),
|
|
904
|
+
provides: Type.String({ description: "What was consumed from it" }),
|
|
905
|
+
}),
|
|
906
|
+
Type.String({ description: "Fallback: slice ID string" }),
|
|
907
|
+
]), { description: "Upstream slice dependencies consumed" })),
|
|
830
908
|
}),
|
|
831
909
|
execute: sliceCompleteExecute,
|
|
832
910
|
};
|
|
@@ -912,8 +990,11 @@ export function registerDbTools(pi) {
|
|
|
912
990
|
};
|
|
913
991
|
}
|
|
914
992
|
try {
|
|
993
|
+
// ── Input sanitization: normalize markdown parameters (#3013) ──────
|
|
994
|
+
const { sanitizeCompleteMilestoneParams } = await import("./sanitize-complete-milestone.js");
|
|
995
|
+
const sanitized = sanitizeCompleteMilestoneParams(params);
|
|
915
996
|
const { handleCompleteMilestone } = await import("../tools/complete-milestone.js");
|
|
916
|
-
const result = await handleCompleteMilestone(
|
|
997
|
+
const result = await handleCompleteMilestone(sanitized, process.cwd());
|
|
917
998
|
if ("error" in result) {
|
|
918
999
|
return {
|
|
919
1000
|
content: [{ type: "text", text: `Error completing milestone: ${result.error}` }],
|
|
@@ -951,19 +1032,21 @@ export function registerDbTools(pi) {
|
|
|
951
1032
|
"On success, returns summaryPath where the MILESTONE-SUMMARY.md was written.",
|
|
952
1033
|
],
|
|
953
1034
|
parameters: Type.Object({
|
|
1035
|
+
// ── Core identification + content (required) ──────────────────────
|
|
954
1036
|
milestoneId: Type.String({ description: "Milestone ID (e.g. M001)" }),
|
|
955
1037
|
title: Type.String({ description: "Milestone title" }),
|
|
956
1038
|
oneLiner: Type.String({ description: "One-sentence summary of what the milestone achieved" }),
|
|
957
1039
|
narrative: Type.String({ description: "Detailed narrative of what happened during the milestone" }),
|
|
958
|
-
|
|
959
|
-
|
|
960
|
-
|
|
961
|
-
|
|
962
|
-
|
|
963
|
-
|
|
1040
|
+
verificationPassed: Type.Boolean({ description: "Must be true — confirms that code change verification, success criteria, and definition of done checks all passed before completion" }),
|
|
1041
|
+
// ── Enrichment metadata (optional — defaults to empty) ────────────
|
|
1042
|
+
successCriteriaResults: Type.Optional(Type.String({ description: "Markdown detailing how each success criterion was met or not met" })),
|
|
1043
|
+
definitionOfDoneResults: Type.Optional(Type.String({ description: "Markdown detailing how each definition-of-done item was met" })),
|
|
1044
|
+
requirementOutcomes: Type.Optional(Type.String({ description: "Markdown detailing requirement status transitions with evidence" })),
|
|
1045
|
+
keyDecisions: Type.Optional(Type.Array(Type.String(), { description: "Key architectural/pattern decisions made during the milestone" })),
|
|
1046
|
+
keyFiles: Type.Optional(Type.Array(Type.String(), { description: "Key files created or modified during the milestone" })),
|
|
1047
|
+
lessonsLearned: Type.Optional(Type.Array(Type.String(), { description: "Lessons learned during the milestone" })),
|
|
964
1048
|
followUps: Type.Optional(Type.String({ description: "Follow-up items for future milestones" })),
|
|
965
1049
|
deviations: Type.Optional(Type.String({ description: "Deviations from the original plan" })),
|
|
966
|
-
verificationPassed: Type.Boolean({ description: "Must be true — confirms that code change verification, success criteria, and definition of done checks all passed before completion" }),
|
|
967
1050
|
}),
|
|
968
1051
|
execute: milestoneCompleteExecute,
|
|
969
1052
|
};
|