gsd-pi 2.63.0 → 2.64.0-dev.1a85e85
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/help-text.js +4 -1
- package/dist/onboarding.js +15 -8
- package/dist/resource-loader.js +18 -3
- 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 +147 -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 +19 -18
- 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 +19 -18
- 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/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/.next/static/ffabZXz8JdN3EzX9EKt-R/_buildManifest.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/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/pkg/package.json +1 -1
- 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 +160 -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 +211 -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 → ffabZXz8JdN3EzX9EKt-R}/_ssgManifest.js +0 -0
|
@@ -0,0 +1,526 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* enhanced-verification-integration.test.ts — Integration tests for enhanced verification.
|
|
3
|
+
*
|
|
4
|
+
* Exercises all 7 enhanced verification checks against GSD-2's actual source files.
|
|
5
|
+
* This proves:
|
|
6
|
+
* - R012: No false positives on production code
|
|
7
|
+
* - R013: Speed targets met (<2000ms pre-execution, <1000ms post-execution per task)
|
|
8
|
+
*
|
|
9
|
+
* The test constructs realistic TaskRow fixtures that reference real GSD source files,
|
|
10
|
+
* then runs both pre-execution and post-execution checks against them.
|
|
11
|
+
*/
|
|
12
|
+
|
|
13
|
+
import { describe, test } from "node:test";
|
|
14
|
+
import assert from "node:assert/strict";
|
|
15
|
+
import { existsSync } from "node:fs";
|
|
16
|
+
import { join, dirname } from "node:path";
|
|
17
|
+
import { fileURLToPath } from "node:url";
|
|
18
|
+
|
|
19
|
+
import {
|
|
20
|
+
runPreExecutionChecks,
|
|
21
|
+
type PreExecutionResult,
|
|
22
|
+
} from "../pre-execution-checks.ts";
|
|
23
|
+
import {
|
|
24
|
+
runPostExecutionChecks,
|
|
25
|
+
type PostExecutionResult,
|
|
26
|
+
} from "../post-execution-checks.ts";
|
|
27
|
+
import type { TaskRow } from "../gsd-db.ts";
|
|
28
|
+
|
|
29
|
+
// ─── Constants ───────────────────────────────────────────────────────────────
|
|
30
|
+
|
|
31
|
+
const __filename = fileURLToPath(import.meta.url);
|
|
32
|
+
const __dirname = dirname(__filename);
|
|
33
|
+
|
|
34
|
+
// Path to the GSD extension source directory (relative to test file)
|
|
35
|
+
const GSD_SRC_DIR = join(__dirname, "..");
|
|
36
|
+
|
|
37
|
+
// Speed targets from R013
|
|
38
|
+
const PRE_EXECUTION_TIMEOUT_MS = 2000;
|
|
39
|
+
const POST_EXECUTION_TIMEOUT_MS = 1000;
|
|
40
|
+
|
|
41
|
+
// ─── Test Fixtures ───────────────────────────────────────────────────────────
|
|
42
|
+
|
|
43
|
+
/**
|
|
44
|
+
* Create a minimal TaskRow for testing.
|
|
45
|
+
*/
|
|
46
|
+
function createTask(overrides: Partial<TaskRow> = {}): TaskRow {
|
|
47
|
+
return {
|
|
48
|
+
milestone_id: "M001",
|
|
49
|
+
slice_id: "S01",
|
|
50
|
+
id: overrides.id ?? "T01",
|
|
51
|
+
title: overrides.title ?? "Test Task",
|
|
52
|
+
status: overrides.status ?? "pending",
|
|
53
|
+
one_liner: "",
|
|
54
|
+
narrative: "",
|
|
55
|
+
verification_result: "",
|
|
56
|
+
duration: "",
|
|
57
|
+
completed_at: overrides.status === "complete" ? new Date().toISOString() : null,
|
|
58
|
+
blocker_discovered: false,
|
|
59
|
+
deviations: "",
|
|
60
|
+
known_issues: "",
|
|
61
|
+
key_files: overrides.key_files ?? [],
|
|
62
|
+
key_decisions: [],
|
|
63
|
+
full_summary_md: "",
|
|
64
|
+
description: overrides.description ?? "",
|
|
65
|
+
estimate: "",
|
|
66
|
+
files: overrides.files ?? [],
|
|
67
|
+
verify: "",
|
|
68
|
+
inputs: overrides.inputs ?? [],
|
|
69
|
+
expected_output: overrides.expected_output ?? [],
|
|
70
|
+
observability_impact: "",
|
|
71
|
+
full_plan_md: "",
|
|
72
|
+
sequence: overrides.sequence ?? 0,
|
|
73
|
+
...overrides,
|
|
74
|
+
};
|
|
75
|
+
}
|
|
76
|
+
|
|
77
|
+
// ─── Real GSD Source Files for Testing ───────────────────────────────────────
|
|
78
|
+
|
|
79
|
+
// These are actual GSD extension source files that exist in the codebase
|
|
80
|
+
const REAL_GSD_FILES = [
|
|
81
|
+
"gsd-db.ts",
|
|
82
|
+
"auto-verification.ts",
|
|
83
|
+
"pre-execution-checks.ts",
|
|
84
|
+
"post-execution-checks.ts",
|
|
85
|
+
"state.ts",
|
|
86
|
+
"errors.ts",
|
|
87
|
+
"types.ts",
|
|
88
|
+
"cache.ts",
|
|
89
|
+
"atomic-write.ts",
|
|
90
|
+
];
|
|
91
|
+
|
|
92
|
+
// Verify the test fixture files actually exist
|
|
93
|
+
function verifyTestFixturesExist(): void {
|
|
94
|
+
for (const file of REAL_GSD_FILES) {
|
|
95
|
+
const fullPath = join(GSD_SRC_DIR, file);
|
|
96
|
+
if (!existsSync(fullPath)) {
|
|
97
|
+
throw new Error(`Test fixture file does not exist: ${fullPath}`);
|
|
98
|
+
}
|
|
99
|
+
}
|
|
100
|
+
}
|
|
101
|
+
|
|
102
|
+
// ─── Integration Tests ───────────────────────────────────────────────────────
|
|
103
|
+
|
|
104
|
+
describe("Enhanced Verification Integration Tests", () => {
|
|
105
|
+
// Verify fixtures before running tests
|
|
106
|
+
test("test fixture files exist", () => {
|
|
107
|
+
verifyTestFixturesExist();
|
|
108
|
+
});
|
|
109
|
+
|
|
110
|
+
describe("Pre-Execution Checks on Real GSD Code", () => {
|
|
111
|
+
test("runs pre-execution checks on realistic tasks referencing real files", async () => {
|
|
112
|
+
// Simulate tasks that reference real GSD source files
|
|
113
|
+
const tasks: TaskRow[] = [
|
|
114
|
+
createTask({
|
|
115
|
+
id: "T01",
|
|
116
|
+
sequence: 0,
|
|
117
|
+
title: "Add validation to gsd-db",
|
|
118
|
+
description: `
|
|
119
|
+
## Steps
|
|
120
|
+
1. Update src/resources/extensions/gsd/gsd-db.ts to add validation
|
|
121
|
+
2. Read from src/resources/extensions/gsd/types.ts for type definitions
|
|
122
|
+
3. Update src/resources/extensions/gsd/errors.ts with new error types
|
|
123
|
+
4. Run tests to verify changes
|
|
124
|
+
`.trim(),
|
|
125
|
+
files: REAL_GSD_FILES.slice(0, 4).map((f) => join(GSD_SRC_DIR, f)),
|
|
126
|
+
inputs: [
|
|
127
|
+
join(GSD_SRC_DIR, "types.ts"),
|
|
128
|
+
join(GSD_SRC_DIR, "errors.ts"),
|
|
129
|
+
],
|
|
130
|
+
expected_output: [
|
|
131
|
+
join(GSD_SRC_DIR, "gsd-db.ts"),
|
|
132
|
+
],
|
|
133
|
+
}),
|
|
134
|
+
];
|
|
135
|
+
|
|
136
|
+
const start = performance.now();
|
|
137
|
+
const result = await runPreExecutionChecks(tasks, GSD_SRC_DIR);
|
|
138
|
+
const duration = performance.now() - start;
|
|
139
|
+
|
|
140
|
+
// R012: No blocking failures (false positives) on production code
|
|
141
|
+
const blockingFailures = result.checks.filter((c) => !c.passed && c.blocking);
|
|
142
|
+
assert.equal(
|
|
143
|
+
blockingFailures.length,
|
|
144
|
+
0,
|
|
145
|
+
`Expected zero blocking failures, got: ${JSON.stringify(blockingFailures, null, 2)}`
|
|
146
|
+
);
|
|
147
|
+
|
|
148
|
+
// Overall status should not be fail
|
|
149
|
+
assert.notEqual(result.status, "fail", "Pre-execution checks should not fail on real GSD code");
|
|
150
|
+
|
|
151
|
+
// R013: Speed target met
|
|
152
|
+
assert.ok(
|
|
153
|
+
duration < PRE_EXECUTION_TIMEOUT_MS,
|
|
154
|
+
`Pre-execution checks took ${duration.toFixed(0)}ms, expected <${PRE_EXECUTION_TIMEOUT_MS}ms`
|
|
155
|
+
);
|
|
156
|
+
});
|
|
157
|
+
|
|
158
|
+
test("handles task with code block references to real packages", async () => {
|
|
159
|
+
// Task description with realistic code blocks using actual Node.js built-ins
|
|
160
|
+
const tasks: TaskRow[] = [
|
|
161
|
+
createTask({
|
|
162
|
+
id: "T01",
|
|
163
|
+
sequence: 0,
|
|
164
|
+
title: "Implement file watcher",
|
|
165
|
+
description: `
|
|
166
|
+
## Implementation
|
|
167
|
+
|
|
168
|
+
\`\`\`typescript
|
|
169
|
+
import { readFileSync, writeFileSync } from "node:fs";
|
|
170
|
+
import { join, dirname } from "node:path";
|
|
171
|
+
import { existsSync } from "node:fs";
|
|
172
|
+
|
|
173
|
+
// Use existing GSD types
|
|
174
|
+
import type { TaskRow } from "./gsd-db.ts";
|
|
175
|
+
\`\`\`
|
|
176
|
+
|
|
177
|
+
Update the file watcher to use these imports.
|
|
178
|
+
`.trim(),
|
|
179
|
+
files: [join(GSD_SRC_DIR, "auto-verification.ts")],
|
|
180
|
+
}),
|
|
181
|
+
];
|
|
182
|
+
|
|
183
|
+
const start = performance.now();
|
|
184
|
+
const result = await runPreExecutionChecks(tasks, GSD_SRC_DIR);
|
|
185
|
+
const duration = performance.now() - start;
|
|
186
|
+
|
|
187
|
+
// No blocking failures
|
|
188
|
+
const blockingFailures = result.checks.filter((c) => !c.passed && c.blocking);
|
|
189
|
+
assert.equal(
|
|
190
|
+
blockingFailures.length,
|
|
191
|
+
0,
|
|
192
|
+
`Unexpected blocking failures: ${JSON.stringify(blockingFailures, null, 2)}`
|
|
193
|
+
);
|
|
194
|
+
|
|
195
|
+
// Speed target met
|
|
196
|
+
assert.ok(
|
|
197
|
+
duration < PRE_EXECUTION_TIMEOUT_MS,
|
|
198
|
+
`Pre-execution checks took ${duration.toFixed(0)}ms, expected <${PRE_EXECUTION_TIMEOUT_MS}ms`
|
|
199
|
+
);
|
|
200
|
+
});
|
|
201
|
+
|
|
202
|
+
test("handles multi-task sequence with file dependencies", async () => {
|
|
203
|
+
// Simulate a realistic task sequence where T02 depends on T01's output
|
|
204
|
+
const tasks: TaskRow[] = [
|
|
205
|
+
createTask({
|
|
206
|
+
id: "T01",
|
|
207
|
+
sequence: 0,
|
|
208
|
+
title: "Create types file",
|
|
209
|
+
status: "complete",
|
|
210
|
+
expected_output: [join(GSD_SRC_DIR, "types.ts")],
|
|
211
|
+
}),
|
|
212
|
+
createTask({
|
|
213
|
+
id: "T02",
|
|
214
|
+
sequence: 1,
|
|
215
|
+
title: "Use types in implementation",
|
|
216
|
+
description: `
|
|
217
|
+
Read the types from src/resources/extensions/gsd/types.ts and use them.
|
|
218
|
+
`.trim(),
|
|
219
|
+
inputs: [join(GSD_SRC_DIR, "types.ts")],
|
|
220
|
+
files: [join(GSD_SRC_DIR, "gsd-db.ts")],
|
|
221
|
+
}),
|
|
222
|
+
];
|
|
223
|
+
|
|
224
|
+
const start = performance.now();
|
|
225
|
+
const result = await runPreExecutionChecks(tasks, GSD_SRC_DIR);
|
|
226
|
+
const duration = performance.now() - start;
|
|
227
|
+
|
|
228
|
+
// No blocking failures
|
|
229
|
+
const blockingFailures = result.checks.filter((c) => !c.passed && c.blocking);
|
|
230
|
+
assert.equal(
|
|
231
|
+
blockingFailures.length,
|
|
232
|
+
0,
|
|
233
|
+
`Unexpected blocking failures: ${JSON.stringify(blockingFailures, null, 2)}`
|
|
234
|
+
);
|
|
235
|
+
|
|
236
|
+
// Speed target met
|
|
237
|
+
assert.ok(
|
|
238
|
+
duration < PRE_EXECUTION_TIMEOUT_MS,
|
|
239
|
+
`Pre-execution checks took ${duration.toFixed(0)}ms, expected <${PRE_EXECUTION_TIMEOUT_MS}ms`
|
|
240
|
+
);
|
|
241
|
+
});
|
|
242
|
+
});
|
|
243
|
+
|
|
244
|
+
describe("Post-Execution Checks on Real GSD Code", () => {
|
|
245
|
+
test("runs post-execution checks on real GSD source files", () => {
|
|
246
|
+
// Simulate a completed task that modified real files
|
|
247
|
+
const completedTask = createTask({
|
|
248
|
+
id: "T01",
|
|
249
|
+
title: "Update gsd-db validation",
|
|
250
|
+
status: "complete",
|
|
251
|
+
key_files: [
|
|
252
|
+
join(GSD_SRC_DIR, "gsd-db.ts"),
|
|
253
|
+
join(GSD_SRC_DIR, "types.ts"),
|
|
254
|
+
],
|
|
255
|
+
});
|
|
256
|
+
|
|
257
|
+
const start = performance.now();
|
|
258
|
+
const result = runPostExecutionChecks(completedTask, [], GSD_SRC_DIR);
|
|
259
|
+
const duration = performance.now() - start;
|
|
260
|
+
|
|
261
|
+
// R012: No blocking failures (false positives) on production code
|
|
262
|
+
const blockingFailures = result.checks.filter((c) => !c.passed && c.blocking);
|
|
263
|
+
assert.equal(
|
|
264
|
+
blockingFailures.length,
|
|
265
|
+
0,
|
|
266
|
+
`Expected zero blocking failures, got: ${JSON.stringify(blockingFailures, null, 2)}`
|
|
267
|
+
);
|
|
268
|
+
|
|
269
|
+
// Overall status should not be fail
|
|
270
|
+
assert.notEqual(result.status, "fail", "Post-execution checks should not fail on real GSD code");
|
|
271
|
+
|
|
272
|
+
// R013: Speed target met
|
|
273
|
+
assert.ok(
|
|
274
|
+
duration < POST_EXECUTION_TIMEOUT_MS,
|
|
275
|
+
`Post-execution checks took ${duration.toFixed(0)}ms, expected <${POST_EXECUTION_TIMEOUT_MS}ms`
|
|
276
|
+
);
|
|
277
|
+
});
|
|
278
|
+
|
|
279
|
+
test("analyzes imports in real TypeScript files", () => {
|
|
280
|
+
// Use auto-verification.ts which imports from multiple other GSD files
|
|
281
|
+
const completedTask = createTask({
|
|
282
|
+
id: "T02",
|
|
283
|
+
title: "Verify auto-verification imports",
|
|
284
|
+
status: "complete",
|
|
285
|
+
key_files: [join(GSD_SRC_DIR, "auto-verification.ts")],
|
|
286
|
+
});
|
|
287
|
+
|
|
288
|
+
const start = performance.now();
|
|
289
|
+
const result = runPostExecutionChecks(completedTask, [], GSD_SRC_DIR);
|
|
290
|
+
const duration = performance.now() - start;
|
|
291
|
+
|
|
292
|
+
// No blocking failures
|
|
293
|
+
const blockingFailures = result.checks.filter((c) => !c.passed && c.blocking);
|
|
294
|
+
assert.equal(
|
|
295
|
+
blockingFailures.length,
|
|
296
|
+
0,
|
|
297
|
+
`Unexpected blocking failures: ${JSON.stringify(blockingFailures, null, 2)}`
|
|
298
|
+
);
|
|
299
|
+
|
|
300
|
+
// Speed target met
|
|
301
|
+
assert.ok(
|
|
302
|
+
duration < POST_EXECUTION_TIMEOUT_MS,
|
|
303
|
+
`Post-execution checks took ${duration.toFixed(0)}ms, expected <${POST_EXECUTION_TIMEOUT_MS}ms`
|
|
304
|
+
);
|
|
305
|
+
});
|
|
306
|
+
|
|
307
|
+
test("handles multi-file task with cross-file dependencies", () => {
|
|
308
|
+
// Task that touched multiple related files
|
|
309
|
+
const completedTask = createTask({
|
|
310
|
+
id: "T03",
|
|
311
|
+
title: "Refactor state management",
|
|
312
|
+
status: "complete",
|
|
313
|
+
key_files: [
|
|
314
|
+
join(GSD_SRC_DIR, "state.ts"),
|
|
315
|
+
join(GSD_SRC_DIR, "gsd-db.ts"),
|
|
316
|
+
join(GSD_SRC_DIR, "cache.ts"),
|
|
317
|
+
],
|
|
318
|
+
});
|
|
319
|
+
|
|
320
|
+
const start = performance.now();
|
|
321
|
+
const result = runPostExecutionChecks(completedTask, [], GSD_SRC_DIR);
|
|
322
|
+
const duration = performance.now() - start;
|
|
323
|
+
|
|
324
|
+
// No blocking failures
|
|
325
|
+
const blockingFailures = result.checks.filter((c) => !c.passed && c.blocking);
|
|
326
|
+
assert.equal(
|
|
327
|
+
blockingFailures.length,
|
|
328
|
+
0,
|
|
329
|
+
`Unexpected blocking failures: ${JSON.stringify(blockingFailures, null, 2)}`
|
|
330
|
+
);
|
|
331
|
+
|
|
332
|
+
// Speed target met
|
|
333
|
+
assert.ok(
|
|
334
|
+
duration < POST_EXECUTION_TIMEOUT_MS,
|
|
335
|
+
`Post-execution checks took ${duration.toFixed(0)}ms, expected <${POST_EXECUTION_TIMEOUT_MS}ms`
|
|
336
|
+
);
|
|
337
|
+
});
|
|
338
|
+
|
|
339
|
+
test("handles task sequence with signature analysis", () => {
|
|
340
|
+
// Simulate checking for signature consistency across tasks
|
|
341
|
+
const priorTasks: TaskRow[] = [
|
|
342
|
+
createTask({
|
|
343
|
+
id: "T01",
|
|
344
|
+
sequence: 0,
|
|
345
|
+
title: "Define TaskRow interface",
|
|
346
|
+
status: "complete",
|
|
347
|
+
key_files: [join(GSD_SRC_DIR, "gsd-db.ts")],
|
|
348
|
+
}),
|
|
349
|
+
];
|
|
350
|
+
|
|
351
|
+
const completedTask = createTask({
|
|
352
|
+
id: "T02",
|
|
353
|
+
sequence: 1,
|
|
354
|
+
title: "Use TaskRow in state module",
|
|
355
|
+
status: "complete",
|
|
356
|
+
key_files: [join(GSD_SRC_DIR, "state.ts")],
|
|
357
|
+
});
|
|
358
|
+
|
|
359
|
+
const start = performance.now();
|
|
360
|
+
const result = runPostExecutionChecks(completedTask, priorTasks, GSD_SRC_DIR);
|
|
361
|
+
const duration = performance.now() - start;
|
|
362
|
+
|
|
363
|
+
// No blocking failures
|
|
364
|
+
const blockingFailures = result.checks.filter((c) => !c.passed && c.blocking);
|
|
365
|
+
assert.equal(
|
|
366
|
+
blockingFailures.length,
|
|
367
|
+
0,
|
|
368
|
+
`Unexpected blocking failures: ${JSON.stringify(blockingFailures, null, 2)}`
|
|
369
|
+
);
|
|
370
|
+
|
|
371
|
+
// Speed target met
|
|
372
|
+
assert.ok(
|
|
373
|
+
duration < POST_EXECUTION_TIMEOUT_MS,
|
|
374
|
+
`Post-execution checks took ${duration.toFixed(0)}ms, expected <${POST_EXECUTION_TIMEOUT_MS}ms`
|
|
375
|
+
);
|
|
376
|
+
});
|
|
377
|
+
});
|
|
378
|
+
|
|
379
|
+
describe("Combined Pre and Post Execution Flow", () => {
|
|
380
|
+
test("full verification flow on realistic task lifecycle", async () => {
|
|
381
|
+
// Simulate a complete task lifecycle
|
|
382
|
+
const tasks: TaskRow[] = [
|
|
383
|
+
createTask({
|
|
384
|
+
id: "T01",
|
|
385
|
+
sequence: 0,
|
|
386
|
+
title: "Implement enhanced verification",
|
|
387
|
+
status: "pending",
|
|
388
|
+
description: `
|
|
389
|
+
## Steps
|
|
390
|
+
1. Update pre-execution-checks.ts with new validation
|
|
391
|
+
2. Update post-execution-checks.ts with signature analysis
|
|
392
|
+
3. Add integration tests
|
|
393
|
+
|
|
394
|
+
\`\`\`typescript
|
|
395
|
+
import { runPreExecutionChecks } from "./pre-execution-checks.ts";
|
|
396
|
+
import { runPostExecutionChecks } from "./post-execution-checks.ts";
|
|
397
|
+
\`\`\`
|
|
398
|
+
`.trim(),
|
|
399
|
+
files: [
|
|
400
|
+
join(GSD_SRC_DIR, "pre-execution-checks.ts"),
|
|
401
|
+
join(GSD_SRC_DIR, "post-execution-checks.ts"),
|
|
402
|
+
],
|
|
403
|
+
inputs: [
|
|
404
|
+
join(GSD_SRC_DIR, "types.ts"),
|
|
405
|
+
join(GSD_SRC_DIR, "gsd-db.ts"),
|
|
406
|
+
],
|
|
407
|
+
expected_output: [
|
|
408
|
+
join(GSD_SRC_DIR, "tests/enhanced-verification-integration.test.ts"),
|
|
409
|
+
],
|
|
410
|
+
}),
|
|
411
|
+
];
|
|
412
|
+
|
|
413
|
+
// Run pre-execution checks
|
|
414
|
+
const preStart = performance.now();
|
|
415
|
+
const preResult = await runPreExecutionChecks(tasks, GSD_SRC_DIR);
|
|
416
|
+
const preDuration = performance.now() - preStart;
|
|
417
|
+
|
|
418
|
+
// Verify pre-execution results
|
|
419
|
+
const preBlockingFailures = preResult.checks.filter((c) => !c.passed && c.blocking);
|
|
420
|
+
assert.equal(
|
|
421
|
+
preBlockingFailures.length,
|
|
422
|
+
0,
|
|
423
|
+
`Pre-execution had blocking failures: ${JSON.stringify(preBlockingFailures, null, 2)}`
|
|
424
|
+
);
|
|
425
|
+
assert.ok(
|
|
426
|
+
preDuration < PRE_EXECUTION_TIMEOUT_MS,
|
|
427
|
+
`Pre-execution took ${preDuration.toFixed(0)}ms, expected <${PRE_EXECUTION_TIMEOUT_MS}ms`
|
|
428
|
+
);
|
|
429
|
+
|
|
430
|
+
// Task after execution (simulated completion)
|
|
431
|
+
const completedTask = createTask({
|
|
432
|
+
...tasks[0],
|
|
433
|
+
status: "complete",
|
|
434
|
+
key_files: tasks[0].files,
|
|
435
|
+
});
|
|
436
|
+
|
|
437
|
+
// Run post-execution checks
|
|
438
|
+
const postStart = performance.now();
|
|
439
|
+
const postResult = runPostExecutionChecks(completedTask, [], GSD_SRC_DIR);
|
|
440
|
+
const postDuration = performance.now() - postStart;
|
|
441
|
+
|
|
442
|
+
// Verify post-execution results
|
|
443
|
+
const postBlockingFailures = postResult.checks.filter((c) => !c.passed && c.blocking);
|
|
444
|
+
assert.equal(
|
|
445
|
+
postBlockingFailures.length,
|
|
446
|
+
0,
|
|
447
|
+
`Post-execution had blocking failures: ${JSON.stringify(postBlockingFailures, null, 2)}`
|
|
448
|
+
);
|
|
449
|
+
assert.ok(
|
|
450
|
+
postDuration < POST_EXECUTION_TIMEOUT_MS,
|
|
451
|
+
`Post-execution took ${postDuration.toFixed(0)}ms, expected <${POST_EXECUTION_TIMEOUT_MS}ms`
|
|
452
|
+
);
|
|
453
|
+
});
|
|
454
|
+
|
|
455
|
+
test("handles large number of files without timeout", () => {
|
|
456
|
+
// Use all available GSD source files to stress test
|
|
457
|
+
const allGsdFiles = REAL_GSD_FILES.map((f) => join(GSD_SRC_DIR, f));
|
|
458
|
+
|
|
459
|
+
const task = createTask({
|
|
460
|
+
id: "T01",
|
|
461
|
+
title: "Large refactor touching many files",
|
|
462
|
+
status: "complete",
|
|
463
|
+
key_files: allGsdFiles,
|
|
464
|
+
files: allGsdFiles,
|
|
465
|
+
});
|
|
466
|
+
|
|
467
|
+
const start = performance.now();
|
|
468
|
+
const result = runPostExecutionChecks(task, [], GSD_SRC_DIR);
|
|
469
|
+
const duration = performance.now() - start;
|
|
470
|
+
|
|
471
|
+
// No blocking failures
|
|
472
|
+
const blockingFailures = result.checks.filter((c) => !c.passed && c.blocking);
|
|
473
|
+
assert.equal(
|
|
474
|
+
blockingFailures.length,
|
|
475
|
+
0,
|
|
476
|
+
`Unexpected blocking failures: ${JSON.stringify(blockingFailures, null, 2)}`
|
|
477
|
+
);
|
|
478
|
+
|
|
479
|
+
// Should still be fast even with many files
|
|
480
|
+
// Allow slightly more time for multi-file analysis but still within target
|
|
481
|
+
assert.ok(
|
|
482
|
+
duration < POST_EXECUTION_TIMEOUT_MS * 2, // Allow 2x for stress test
|
|
483
|
+
`Multi-file post-execution took ${duration.toFixed(0)}ms, expected <${POST_EXECUTION_TIMEOUT_MS * 2}ms`
|
|
484
|
+
);
|
|
485
|
+
});
|
|
486
|
+
});
|
|
487
|
+
|
|
488
|
+
describe("Warning Quality", () => {
|
|
489
|
+
test("warnings on real code are actionable, not spurious", () => {
|
|
490
|
+
// Run checks on well-formed production code
|
|
491
|
+
const task = createTask({
|
|
492
|
+
id: "T01",
|
|
493
|
+
title: "Review code quality",
|
|
494
|
+
status: "complete",
|
|
495
|
+
key_files: [
|
|
496
|
+
join(GSD_SRC_DIR, "pre-execution-checks.ts"),
|
|
497
|
+
join(GSD_SRC_DIR, "post-execution-checks.ts"),
|
|
498
|
+
],
|
|
499
|
+
});
|
|
500
|
+
|
|
501
|
+
const result = runPostExecutionChecks(task, [], GSD_SRC_DIR);
|
|
502
|
+
|
|
503
|
+
// Extract warnings (either non-passed non-blocking, or passed with warning messages)
|
|
504
|
+
const warnings = result.checks.filter(
|
|
505
|
+
(c) => (!c.passed && !c.blocking) || (c.passed && c.message?.startsWith("Warning:"))
|
|
506
|
+
);
|
|
507
|
+
|
|
508
|
+
// Warnings are acceptable but should be few on well-maintained code
|
|
509
|
+
// If we get many warnings, it suggests the checks are too aggressive
|
|
510
|
+
assert.ok(
|
|
511
|
+
warnings.length <= 10,
|
|
512
|
+
`Too many warnings (${warnings.length}) suggests overly aggressive checks: ${JSON.stringify(warnings, null, 2)}`
|
|
513
|
+
);
|
|
514
|
+
|
|
515
|
+
// Each warning should have a clear message
|
|
516
|
+
for (const warning of warnings) {
|
|
517
|
+
assert.ok(warning.category, "Warning missing category");
|
|
518
|
+
assert.ok(warning.message, "Warning missing message");
|
|
519
|
+
assert.ok(
|
|
520
|
+
warning.message.length > 10,
|
|
521
|
+
`Warning message too short to be actionable: "${warning.message}"`
|
|
522
|
+
);
|
|
523
|
+
}
|
|
524
|
+
});
|
|
525
|
+
});
|
|
526
|
+
});
|
|
@@ -0,0 +1,116 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Regression test for #2344: Auto-loop hangs after plan-slice completes
|
|
3
|
+
* because postUnitPostVerification() never resolves.
|
|
4
|
+
*
|
|
5
|
+
* When postUnitPostVerification() hangs (e.g., due to a module import
|
|
6
|
+
* deadlock or SQLite transaction hang), the auto-loop blocks forever
|
|
7
|
+
* with no error message, no notification, and no recovery.
|
|
8
|
+
*
|
|
9
|
+
* The fix adds a timeout guard around postUnitPostVerification() in
|
|
10
|
+
* runFinalize(). If it doesn't resolve within the timeout, the function
|
|
11
|
+
* force-returns "continue" and logs an error, allowing the loop to
|
|
12
|
+
* proceed to the next iteration.
|
|
13
|
+
*
|
|
14
|
+
* This test verifies the timeout utility used by the fix, since the
|
|
15
|
+
* full runFinalize function has too many transitive dependencies for
|
|
16
|
+
* isolated unit testing.
|
|
17
|
+
*/
|
|
18
|
+
|
|
19
|
+
import { createTestContext } from "./test-helpers.ts";
|
|
20
|
+
import {
|
|
21
|
+
withTimeout,
|
|
22
|
+
FINALIZE_POST_TIMEOUT_MS,
|
|
23
|
+
} from "../auto/finalize-timeout.ts";
|
|
24
|
+
|
|
25
|
+
const { assertTrue, assertEq, report } = createTestContext();
|
|
26
|
+
|
|
27
|
+
// ═══ Test: withTimeout resolves when inner promise resolves promptly ══════════
|
|
28
|
+
|
|
29
|
+
{
|
|
30
|
+
console.log("\n=== #2344: withTimeout passes through when promise resolves ===");
|
|
31
|
+
|
|
32
|
+
const result = await withTimeout(
|
|
33
|
+
Promise.resolve("ok"),
|
|
34
|
+
1000,
|
|
35
|
+
"test-timeout",
|
|
36
|
+
);
|
|
37
|
+
assertEq(result.value, "ok", "should return inner value");
|
|
38
|
+
assertEq(result.timedOut, false, "should not be timed out");
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
// ═══ Test: withTimeout returns fallback when inner promise hangs ══════════════
|
|
42
|
+
|
|
43
|
+
{
|
|
44
|
+
console.log("\n=== #2344: withTimeout returns fallback on hang ===");
|
|
45
|
+
|
|
46
|
+
const startTime = Date.now();
|
|
47
|
+
const result = await withTimeout(
|
|
48
|
+
new Promise<string>(() => {
|
|
49
|
+
// Never resolves
|
|
50
|
+
}),
|
|
51
|
+
100, // short timeout for testing
|
|
52
|
+
"test-timeout",
|
|
53
|
+
);
|
|
54
|
+
const elapsed = Date.now() - startTime;
|
|
55
|
+
|
|
56
|
+
assertEq(result.timedOut, true, "should report timeout");
|
|
57
|
+
assertEq(result.value, undefined, "value should be undefined on timeout");
|
|
58
|
+
assertTrue(elapsed >= 90, `should wait at least 90ms (took ${elapsed}ms)`);
|
|
59
|
+
assertTrue(elapsed < 500, `should not wait too long (took ${elapsed}ms)`);
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
// ═══ Test: withTimeout handles rejection gracefully ═══════════════════════════
|
|
63
|
+
|
|
64
|
+
{
|
|
65
|
+
console.log("\n=== #2344: withTimeout propagates rejection ===");
|
|
66
|
+
|
|
67
|
+
let caught = false;
|
|
68
|
+
try {
|
|
69
|
+
await withTimeout(
|
|
70
|
+
Promise.reject(new Error("boom")),
|
|
71
|
+
1000,
|
|
72
|
+
"test-timeout",
|
|
73
|
+
);
|
|
74
|
+
} catch (err: any) {
|
|
75
|
+
caught = true;
|
|
76
|
+
assertEq(err.message, "boom", "should propagate the error");
|
|
77
|
+
}
|
|
78
|
+
assertTrue(caught, "rejection should propagate");
|
|
79
|
+
}
|
|
80
|
+
|
|
81
|
+
// ═══ Test: FINALIZE_POST_TIMEOUT_MS is defined and reasonable ═════════════════
|
|
82
|
+
|
|
83
|
+
{
|
|
84
|
+
console.log("\n=== #2344: timeout constant is defined and reasonable ===");
|
|
85
|
+
|
|
86
|
+
assertTrue(
|
|
87
|
+
typeof FINALIZE_POST_TIMEOUT_MS === "number",
|
|
88
|
+
"FINALIZE_POST_TIMEOUT_MS should be a number",
|
|
89
|
+
);
|
|
90
|
+
assertTrue(
|
|
91
|
+
FINALIZE_POST_TIMEOUT_MS >= 30_000,
|
|
92
|
+
`timeout should be >= 30s (got ${FINALIZE_POST_TIMEOUT_MS}ms)`,
|
|
93
|
+
);
|
|
94
|
+
assertTrue(
|
|
95
|
+
FINALIZE_POST_TIMEOUT_MS <= 120_000,
|
|
96
|
+
`timeout should be <= 120s (got ${FINALIZE_POST_TIMEOUT_MS}ms)`,
|
|
97
|
+
);
|
|
98
|
+
}
|
|
99
|
+
|
|
100
|
+
// ═══ Test: withTimeout cleans up timer on success ════════════════════════════
|
|
101
|
+
|
|
102
|
+
{
|
|
103
|
+
console.log("\n=== #2344: withTimeout cleans up timer on success ===");
|
|
104
|
+
|
|
105
|
+
// If the timer isn't cleaned up, this test would keep the process alive.
|
|
106
|
+
// Relying on process.exit behavior — if test completes, timers were cleaned.
|
|
107
|
+
const result = await withTimeout(
|
|
108
|
+
new Promise<string>((r) => setTimeout(() => r("delayed"), 50)),
|
|
109
|
+
5000,
|
|
110
|
+
"cleanup-test",
|
|
111
|
+
);
|
|
112
|
+
assertEq(result.value, "delayed", "should resolve with delayed value");
|
|
113
|
+
assertEq(result.timedOut, false, "should not time out");
|
|
114
|
+
}
|
|
115
|
+
|
|
116
|
+
report();
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Regression test for #3453: dynamic model routing must be disabled for
|
|
3
|
+
* flat-rate providers like GitHub Copilot where all models cost the same
|
|
4
|
+
* per request — routing only degrades quality with no cost benefit.
|
|
5
|
+
*/
|
|
6
|
+
|
|
7
|
+
import { describe, test } from "node:test";
|
|
8
|
+
import assert from "node:assert/strict";
|
|
9
|
+
import { isFlatRateProvider, resolvePreferredModelConfig } from "../auto-model-selection.ts";
|
|
10
|
+
|
|
11
|
+
describe("flat-rate provider routing guard (#3453)", () => {
|
|
12
|
+
|
|
13
|
+
test("isFlatRateProvider returns true for github-copilot", () => {
|
|
14
|
+
assert.equal(isFlatRateProvider("github-copilot"), true);
|
|
15
|
+
});
|
|
16
|
+
|
|
17
|
+
test("isFlatRateProvider returns true for copilot alias", () => {
|
|
18
|
+
assert.equal(isFlatRateProvider("copilot"), true);
|
|
19
|
+
});
|
|
20
|
+
|
|
21
|
+
test("isFlatRateProvider is case-insensitive", () => {
|
|
22
|
+
assert.equal(isFlatRateProvider("GitHub-Copilot"), true);
|
|
23
|
+
assert.equal(isFlatRateProvider("GITHUB-COPILOT"), true);
|
|
24
|
+
assert.equal(isFlatRateProvider("Copilot"), true);
|
|
25
|
+
});
|
|
26
|
+
|
|
27
|
+
test("isFlatRateProvider returns false for anthropic", () => {
|
|
28
|
+
assert.equal(isFlatRateProvider("anthropic"), false);
|
|
29
|
+
});
|
|
30
|
+
|
|
31
|
+
test("isFlatRateProvider returns false for openai", () => {
|
|
32
|
+
assert.equal(isFlatRateProvider("openai"), false);
|
|
33
|
+
});
|
|
34
|
+
|
|
35
|
+
test("resolvePreferredModelConfig returns undefined for copilot start model", () => {
|
|
36
|
+
// When the user's start model is on a flat-rate provider,
|
|
37
|
+
// resolvePreferredModelConfig should not synthesize a routing
|
|
38
|
+
// config from tier_models — it should return undefined so the
|
|
39
|
+
// user's selected model is preserved.
|
|
40
|
+
const result = resolvePreferredModelConfig("execute-task", {
|
|
41
|
+
provider: "github-copilot",
|
|
42
|
+
id: "claude-sonnet-4",
|
|
43
|
+
});
|
|
44
|
+
|
|
45
|
+
// Should be undefined (no routing config created for flat-rate)
|
|
46
|
+
// Note: this only tests the guard — if explicit per-unit config exists
|
|
47
|
+
// in preferences, that takes precedence regardless.
|
|
48
|
+
assert.equal(result, undefined, "Should not create routing config for copilot");
|
|
49
|
+
});
|
|
50
|
+
});
|