gsd-pi 2.71.0 → 2.72.0-dev.3159350
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 +69 -19
- package/dist/cli.js +88 -6
- package/dist/headless-events.d.ts +2 -0
- package/dist/headless-events.js +7 -0
- package/dist/headless.js +16 -3
- package/dist/mcp-server.js +40 -17
- package/dist/onboarding.js +10 -0
- package/dist/provider-migrations.d.ts +10 -0
- package/dist/provider-migrations.js +12 -0
- package/dist/resource-loader.js +139 -13
- package/dist/resources/GSD-WORKFLOW.md +1 -1
- package/dist/resources/agents/debugger.md +58 -0
- package/dist/resources/agents/doc-writer.md +43 -0
- package/dist/resources/agents/git-ops.md +56 -0
- package/dist/resources/agents/javascript-pro.md +46 -271
- package/dist/resources/agents/planner.md +55 -0
- package/dist/resources/agents/refactorer.md +47 -0
- package/dist/resources/agents/reviewer.md +48 -0
- package/dist/resources/agents/security.md +59 -0
- package/dist/resources/agents/tester.md +50 -0
- package/dist/resources/agents/typescript-pro.md +41 -235
- package/dist/resources/extensions/async-jobs/await-tool.js +7 -4
- package/dist/resources/extensions/async-jobs/job-manager.js +28 -3
- package/dist/resources/extensions/claude-code-cli/partial-builder.js +40 -12
- package/dist/resources/extensions/claude-code-cli/stream-adapter.js +142 -14
- package/dist/resources/extensions/gsd/auto/infra-errors.js +34 -0
- package/dist/resources/extensions/gsd/auto/loop.js +116 -2
- package/dist/resources/extensions/gsd/auto/phases.js +5 -1
- package/dist/resources/extensions/gsd/auto/session.js +11 -0
- package/dist/resources/extensions/gsd/auto-dashboard.js +22 -16
- package/dist/resources/extensions/gsd/auto-model-selection.js +10 -2
- package/dist/resources/extensions/gsd/auto-post-unit.js +6 -0
- package/dist/resources/extensions/gsd/auto-prompts.js +88 -33
- package/dist/resources/extensions/gsd/auto-recovery.js +11 -0
- package/dist/resources/extensions/gsd/auto-start.js +34 -7
- package/dist/resources/extensions/gsd/auto-tool-tracking.js +1 -1
- package/dist/resources/extensions/gsd/auto-worktree.js +1 -1
- package/dist/resources/extensions/gsd/auto.js +81 -19
- package/dist/resources/extensions/gsd/bootstrap/db-tools.js +3 -3
- package/dist/resources/extensions/gsd/bootstrap/register-hooks.js +11 -11
- package/dist/resources/extensions/gsd/bootstrap/register-shortcuts.js +63 -51
- package/dist/resources/extensions/gsd/bootstrap/system-context.js +6 -0
- package/dist/resources/extensions/gsd/commands/context.js +15 -6
- package/dist/resources/extensions/gsd/commands/dispatcher.js +12 -2
- package/dist/resources/extensions/gsd/commands/handlers/auto.js +10 -33
- package/dist/resources/extensions/gsd/commands/handlers/core.js +56 -11
- package/dist/resources/extensions/gsd/commands/handlers/notifications-handler.js +15 -6
- package/dist/resources/extensions/gsd/commands/handlers/workflow.js +4 -10
- package/dist/resources/extensions/gsd/commands-handlers.js +4 -1
- package/dist/resources/extensions/gsd/context-injector.js +1 -1
- package/dist/resources/extensions/gsd/custom-workflow-engine.js +3 -7
- package/dist/resources/extensions/gsd/dashboard-overlay.js +8 -3
- package/dist/resources/extensions/gsd/definition-io.js +15 -0
- package/dist/resources/extensions/gsd/dispatch-guard.js +22 -1
- package/dist/resources/extensions/gsd/doctor-providers.js +23 -0
- package/dist/resources/extensions/gsd/doctor-runtime-checks.js +6 -3
- package/dist/resources/extensions/gsd/error-classifier.js +5 -2
- package/dist/resources/extensions/gsd/forensics.js +19 -6
- package/dist/resources/extensions/gsd/gate-registry.js +208 -0
- package/dist/resources/extensions/gsd/git-service.js +11 -8
- package/dist/resources/extensions/gsd/gitignore.js +12 -6
- package/dist/resources/extensions/gsd/gsd-db.js +90 -6
- package/dist/resources/extensions/gsd/guided-flow.js +5 -10
- package/dist/resources/extensions/gsd/key-manager.js +2 -0
- package/dist/resources/extensions/gsd/metrics.js +1 -0
- package/dist/resources/extensions/gsd/milestone-actions.js +10 -4
- package/dist/resources/extensions/gsd/milestone-validation-gates.js +11 -12
- package/dist/resources/extensions/gsd/notification-overlay.js +42 -13
- package/dist/resources/extensions/gsd/notification-store.js +56 -5
- package/dist/resources/extensions/gsd/notification-widget.js +5 -13
- package/dist/resources/extensions/gsd/parallel-monitor-overlay.js +8 -3
- package/dist/resources/extensions/gsd/pre-execution-checks.js +35 -2
- package/dist/resources/extensions/gsd/preferences-skills.js +2 -34
- package/dist/resources/extensions/gsd/preferences-types.js +15 -0
- package/dist/resources/extensions/gsd/preferences.js +16 -3
- package/dist/resources/extensions/gsd/prompt-loader.js +4 -1
- package/dist/resources/extensions/gsd/prompt-validation.js +126 -0
- package/dist/resources/extensions/gsd/prompts/complete-slice.md +5 -3
- package/dist/resources/extensions/gsd/prompts/discuss.md +123 -12
- package/dist/resources/extensions/gsd/prompts/execute-task.md +22 -19
- package/dist/resources/extensions/gsd/prompts/guided-discuss-milestone.md +2 -0
- package/dist/resources/extensions/gsd/prompts/guided-discuss-slice.md +2 -0
- package/dist/resources/extensions/gsd/prompts/guided-resume-task.md +1 -1
- package/dist/resources/extensions/gsd/prompts/queue.md +3 -2
- package/dist/resources/extensions/gsd/prompts/system.md +1 -0
- package/dist/resources/extensions/gsd/prompts/validate-milestone.md +4 -1
- package/dist/resources/extensions/gsd/session-model-override.js +25 -0
- package/dist/resources/extensions/gsd/shortcut-defs.js +40 -0
- package/dist/resources/extensions/gsd/state.js +29 -2
- package/dist/resources/extensions/gsd/tools/complete-slice.js +52 -1
- package/dist/resources/extensions/gsd/tools/complete-task.js +51 -1
- package/dist/resources/extensions/gsd/tools/workflow-tool-executors.js +4 -1
- package/dist/resources/extensions/gsd/workflow-projections.js +7 -0
- package/dist/resources/extensions/gsd/worktree-manager.js +30 -3
- package/dist/resources/extensions/gsd/write-intercept.js +10 -1
- package/dist/resources/extensions/ollama/index.js +17 -10
- package/dist/resources/extensions/ollama/ollama-client.js +35 -6
- package/dist/resources/extensions/ollama/ollama-discovery.js +32 -6
- package/dist/resources/extensions/shared/gsd-phase-state.js +35 -0
- package/dist/resources/extensions/subagent/agents.js +8 -0
- package/dist/resources/extensions/subagent/index.js +17 -0
- package/dist/resources/skills/create-skill/SKILL.md +2 -0
- package/dist/startup-model-validation.d.ts +0 -1
- package/dist/startup-model-validation.js +6 -2
- package/dist/web/standalone/.next/BUILD_ID +1 -1
- package/dist/web/standalone/.next/app-path-routes-manifest.json +12 -12
- 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 +3 -3
- 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 +1 -1
- package/dist/web/standalone/.next/server/app/_global-error.rsc +1 -1
- package/dist/web/standalone/.next/server/app/_global-error.segments/_full.segment.rsc +1 -1
- package/dist/web/standalone/.next/server/app/_global-error.segments/_global-error/__PAGE__.segment.rsc +1 -1
- package/dist/web/standalone/.next/server/app/_global-error.segments/_global-error.segment.rsc +1 -1
- package/dist/web/standalone/.next/server/app/_global-error.segments/_head.segment.rsc +1 -1
- package/dist/web/standalone/.next/server/app/_global-error.segments/_index.segment.rsc +1 -1
- package/dist/web/standalone/.next/server/app/_global-error.segments/_tree.segment.rsc +1 -1
- package/dist/web/standalone/.next/server/app/_not-found/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_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_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_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_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_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_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_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_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_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_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_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_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_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_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_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_client-reference-manifest.js +1 -1
- package/dist/web/standalone/.next/server/app/api/notifications/route.js +2 -2
- package/dist/web/standalone/.next/server/app/api/notifications/route_client-reference-manifest.js +1 -1
- package/dist/web/standalone/.next/server/app/api/onboarding/route.js +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_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_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_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_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_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_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_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_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_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_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_client-reference-manifest.js +1 -1
- package/dist/web/standalone/.next/server/app/api/terminal/stream/route.js +3 -3
- 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_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_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 +12 -12
- package/dist/web/standalone/.next/server/chunks/2331.js +16 -16
- package/dist/web/standalone/.next/server/chunks/4741.js +12 -12
- package/dist/web/standalone/.next/server/chunks/5822.js +2 -2
- package/dist/web/standalone/.next/server/chunks/63.js +8 -8
- package/dist/web/standalone/.next/server/chunks/6897.js +3 -3
- package/dist/web/standalone/.next/server/edge-runtime-webpack.js +2 -0
- package/dist/web/standalone/.next/server/functions-config-manifest.json +0 -9
- package/dist/web/standalone/.next/server/middleware-build-manifest.js +1 -1
- package/dist/web/standalone/.next/server/middleware-manifest.json +29 -2
- package/dist/web/standalone/.next/server/middleware.js +4 -12
- 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 +1 -1
- package/dist/web/standalone/.next/server/server-reference-manifest.json +1 -1
- package/dist/web/standalone/.next/server/webpack-runtime.js +1 -1
- 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/{layout-9ecfd95f343793f0.js → layout-a16c7a7ecdf0c2cf.js} +1 -1
- package/dist/web/standalone/.next/static/chunks/app/page-f1e30ab6bb269149.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/global-error-459824ffb8c323dd.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/package.json +1 -1
- package/packages/mcp-server/dist/server.d.ts +12 -1
- package/packages/mcp-server/dist/server.d.ts.map +1 -1
- package/packages/mcp-server/dist/server.js +90 -42
- package/packages/mcp-server/dist/server.js.map +1 -1
- package/packages/mcp-server/dist/workflow-tools.d.ts.map +1 -1
- package/packages/mcp-server/dist/workflow-tools.js +22 -12
- package/packages/mcp-server/dist/workflow-tools.js.map +1 -1
- package/packages/mcp-server/src/server.ts +110 -38
- package/packages/mcp-server/src/workflow-tools.test.ts +110 -0
- package/packages/mcp-server/src/workflow-tools.ts +32 -12
- package/packages/pi-ai/dist/env-api-keys.js +1 -0
- package/packages/pi-ai/dist/env-api-keys.js.map +1 -1
- package/packages/pi-ai/dist/models.custom.d.ts +105 -0
- package/packages/pi-ai/dist/models.custom.d.ts.map +1 -1
- package/packages/pi-ai/dist/models.custom.js +97 -0
- package/packages/pi-ai/dist/models.custom.js.map +1 -1
- package/packages/pi-ai/dist/models.generated.d.ts +648 -140
- package/packages/pi-ai/dist/models.generated.d.ts.map +1 -1
- package/packages/pi-ai/dist/models.generated.js +867 -370
- package/packages/pi-ai/dist/models.generated.js.map +1 -1
- package/packages/pi-ai/dist/models.generated.test.d.ts +2 -0
- package/packages/pi-ai/dist/models.generated.test.d.ts.map +1 -0
- package/packages/pi-ai/dist/models.generated.test.js +334 -0
- package/packages/pi-ai/dist/models.generated.test.js.map +1 -0
- package/packages/pi-ai/dist/models.test.js +105 -0
- package/packages/pi-ai/dist/models.test.js.map +1 -1
- package/packages/pi-ai/dist/providers/amazon-bedrock.js +11 -2
- package/packages/pi-ai/dist/providers/amazon-bedrock.js.map +1 -1
- package/packages/pi-ai/dist/providers/anthropic-auth.test.d.ts +2 -0
- package/packages/pi-ai/dist/providers/anthropic-auth.test.d.ts.map +1 -0
- package/packages/pi-ai/dist/providers/anthropic-auth.test.js +20 -0
- package/packages/pi-ai/dist/providers/anthropic-auth.test.js.map +1 -0
- package/packages/pi-ai/dist/providers/anthropic-shared.d.ts +4 -1
- package/packages/pi-ai/dist/providers/anthropic-shared.d.ts.map +1 -1
- package/packages/pi-ai/dist/providers/anthropic-shared.js +8 -3
- package/packages/pi-ai/dist/providers/anthropic-shared.js.map +1 -1
- package/packages/pi-ai/dist/providers/anthropic-shared.test.js +44 -1
- package/packages/pi-ai/dist/providers/anthropic-shared.test.js.map +1 -1
- package/packages/pi-ai/dist/providers/anthropic.d.ts +2 -1
- package/packages/pi-ai/dist/providers/anthropic.d.ts.map +1 -1
- package/packages/pi-ai/dist/providers/anthropic.js +7 -4
- package/packages/pi-ai/dist/providers/anthropic.js.map +1 -1
- package/packages/pi-ai/dist/providers/openai-completions.d.ts.map +1 -1
- package/packages/pi-ai/dist/providers/openai-completions.js +11 -0
- package/packages/pi-ai/dist/providers/openai-completions.js.map +1 -1
- package/packages/pi-ai/dist/types.d.ts +1 -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/dist/utils/oauth/github-copilot.d.ts.map +1 -1
- package/packages/pi-ai/dist/utils/oauth/github-copilot.js +5 -1
- package/packages/pi-ai/dist/utils/oauth/github-copilot.js.map +1 -1
- package/packages/pi-ai/dist/utils/oauth/github-copilot.test.d.ts +2 -0
- package/packages/pi-ai/dist/utils/oauth/github-copilot.test.d.ts.map +1 -0
- package/packages/pi-ai/dist/utils/oauth/github-copilot.test.js +57 -0
- package/packages/pi-ai/dist/utils/oauth/github-copilot.test.js.map +1 -0
- package/packages/pi-ai/src/env-api-keys.ts +1 -0
- package/packages/pi-ai/src/models.custom.ts +98 -0
- package/packages/pi-ai/src/models.generated.test.ts +373 -0
- package/packages/pi-ai/src/models.generated.ts +867 -370
- package/packages/pi-ai/src/models.test.ts +135 -0
- package/packages/pi-ai/src/providers/amazon-bedrock.ts +13 -1
- package/packages/pi-ai/src/providers/anthropic-auth.test.ts +32 -0
- package/packages/pi-ai/src/providers/anthropic-shared.test.ts +55 -1
- package/packages/pi-ai/src/providers/anthropic-shared.ts +14 -3
- package/packages/pi-ai/src/providers/anthropic.ts +8 -4
- package/packages/pi-ai/src/providers/openai-completions.ts +14 -0
- package/packages/pi-ai/src/types.ts +1 -0
- package/packages/pi-ai/src/utils/oauth/github-copilot.test.ts +71 -0
- package/packages/pi-ai/src/utils/oauth/github-copilot.ts +4 -1
- package/packages/pi-coding-agent/dist/core/agent-session-renderable-tools.test.d.ts +2 -0
- package/packages/pi-coding-agent/dist/core/agent-session-renderable-tools.test.d.ts.map +1 -0
- package/packages/pi-coding-agent/dist/core/agent-session-renderable-tools.test.js +61 -0
- package/packages/pi-coding-agent/dist/core/agent-session-renderable-tools.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 +2 -1
- package/packages/pi-coding-agent/dist/core/agent-session.js.map +1 -1
- package/packages/pi-coding-agent/dist/core/auth-storage.d.ts +10 -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 +27 -0
- package/packages/pi-coding-agent/dist/core/auth-storage.js.map +1 -1
- package/packages/pi-coding-agent/dist/core/auth-storage.test.js +85 -0
- package/packages/pi-coding-agent/dist/core/auth-storage.test.js.map +1 -1
- package/packages/pi-coding-agent/dist/core/model-resolver-initial-model-auth.test.d.ts +2 -0
- package/packages/pi-coding-agent/dist/core/model-resolver-initial-model-auth.test.d.ts.map +1 -0
- package/packages/pi-coding-agent/dist/core/model-resolver-initial-model-auth.test.js +64 -0
- package/packages/pi-coding-agent/dist/core/model-resolver-initial-model-auth.test.js.map +1 -0
- package/packages/pi-coding-agent/dist/core/model-resolver.d.ts.map +1 -1
- package/packages/pi-coding-agent/dist/core/model-resolver.js +23 -18
- package/packages/pi-coding-agent/dist/core/model-resolver.js.map +1 -1
- package/packages/pi-coding-agent/dist/core/model-resolver.test.d.ts +8 -0
- package/packages/pi-coding-agent/dist/core/model-resolver.test.d.ts.map +1 -0
- package/packages/pi-coding-agent/dist/core/model-resolver.test.js +75 -0
- package/packages/pi-coding-agent/dist/core/model-resolver.test.js.map +1 -0
- package/packages/pi-coding-agent/dist/core/retry-handler.d.ts +5 -0
- package/packages/pi-coding-agent/dist/core/retry-handler.d.ts.map +1 -1
- package/packages/pi-coding-agent/dist/core/retry-handler.js +55 -1
- package/packages/pi-coding-agent/dist/core/retry-handler.js.map +1 -1
- package/packages/pi-coding-agent/dist/core/retry-handler.test.js +57 -0
- package/packages/pi-coding-agent/dist/core/retry-handler.test.js.map +1 -1
- package/packages/pi-coding-agent/dist/core/sdk.d.ts +11 -0
- package/packages/pi-coding-agent/dist/core/sdk.d.ts.map +1 -1
- package/packages/pi-coding-agent/dist/core/sdk.js +47 -5
- package/packages/pi-coding-agent/dist/core/sdk.js.map +1 -1
- package/packages/pi-coding-agent/dist/core/sdk.test.d.ts +2 -0
- package/packages/pi-coding-agent/dist/core/sdk.test.d.ts.map +1 -0
- package/packages/pi-coding-agent/dist/core/sdk.test.js +71 -0
- package/packages/pi-coding-agent/dist/core/sdk.test.js.map +1 -0
- package/packages/pi-coding-agent/dist/index.d.ts +1 -1
- package/packages/pi-coding-agent/dist/index.d.ts.map +1 -1
- package/packages/pi-coding-agent/dist/index.js +1 -1
- package/packages/pi-coding-agent/dist/index.js.map +1 -1
- package/packages/pi-coding-agent/dist/modes/interactive/components/__tests__/login-dialog.test.d.ts +2 -0
- package/packages/pi-coding-agent/dist/modes/interactive/components/__tests__/login-dialog.test.d.ts.map +1 -0
- package/packages/pi-coding-agent/dist/modes/interactive/components/__tests__/login-dialog.test.js +13 -0
- package/packages/pi-coding-agent/dist/modes/interactive/components/__tests__/login-dialog.test.js.map +1 -0
- package/packages/pi-coding-agent/dist/modes/interactive/components/__tests__/tool-execution.test.js +36 -0
- package/packages/pi-coding-agent/dist/modes/interactive/components/__tests__/tool-execution.test.js.map +1 -1
- package/packages/pi-coding-agent/dist/modes/interactive/components/login-dialog.d.ts +4 -0
- package/packages/pi-coding-agent/dist/modes/interactive/components/login-dialog.d.ts.map +1 -1
- package/packages/pi-coding-agent/dist/modes/interactive/components/login-dialog.js +24 -2
- package/packages/pi-coding-agent/dist/modes/interactive/components/login-dialog.js.map +1 -1
- package/packages/pi-coding-agent/dist/modes/interactive/components/model-selector.d.ts.map +1 -1
- package/packages/pi-coding-agent/dist/modes/interactive/components/model-selector.js +9 -2
- package/packages/pi-coding-agent/dist/modes/interactive/components/model-selector.js.map +1 -1
- package/packages/pi-coding-agent/dist/modes/interactive/components/tool-execution.d.ts +4 -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 +130 -12
- package/packages/pi-coding-agent/dist/modes/interactive/components/tool-execution.js.map +1 -1
- package/packages/pi-coding-agent/dist/modes/interactive/controllers/chat-controller.d.ts.map +1 -1
- package/packages/pi-coding-agent/dist/modes/interactive/controllers/chat-controller.js +7 -2
- package/packages/pi-coding-agent/dist/modes/interactive/controllers/chat-controller.js.map +1 -1
- package/packages/pi-coding-agent/dist/modes/interactive/controllers/model-controller.d.ts.map +1 -1
- package/packages/pi-coding-agent/dist/modes/interactive/controllers/model-controller.js +6 -1
- package/packages/pi-coding-agent/dist/modes/interactive/controllers/model-controller.js.map +1 -1
- 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 +4 -3
- package/packages/pi-coding-agent/dist/modes/interactive/interactive-mode.js.map +1 -1
- package/packages/pi-coding-agent/dist/modes/interactive/slash-command-handlers.js +4 -2
- package/packages/pi-coding-agent/dist/modes/interactive/slash-command-handlers.js.map +1 -1
- package/packages/pi-coding-agent/package.json +1 -1
- package/packages/pi-coding-agent/src/core/agent-session-renderable-tools.test.ts +70 -0
- package/packages/pi-coding-agent/src/core/agent-session.ts +2 -1
- package/packages/pi-coding-agent/src/core/auth-storage.test.ts +108 -0
- package/packages/pi-coding-agent/src/core/auth-storage.ts +30 -0
- package/packages/pi-coding-agent/src/core/model-resolver-initial-model-auth.test.ts +78 -0
- package/packages/pi-coding-agent/src/core/model-resolver.test.ts +85 -0
- package/packages/pi-coding-agent/src/core/model-resolver.ts +23 -18
- package/packages/pi-coding-agent/src/core/retry-handler.test.ts +83 -0
- package/packages/pi-coding-agent/src/core/retry-handler.ts +60 -1
- package/packages/pi-coding-agent/src/core/sdk.test.ts +89 -0
- package/packages/pi-coding-agent/src/core/sdk.ts +55 -9
- package/packages/pi-coding-agent/src/index.ts +1 -0
- package/packages/pi-coding-agent/src/modes/interactive/components/__tests__/login-dialog.test.ts +24 -0
- package/packages/pi-coding-agent/src/modes/interactive/components/__tests__/tool-execution.test.ts +72 -0
- package/packages/pi-coding-agent/src/modes/interactive/components/login-dialog.ts +30 -2
- package/packages/pi-coding-agent/src/modes/interactive/components/model-selector.ts +15 -6
- package/packages/pi-coding-agent/src/modes/interactive/components/tool-execution.ts +131 -12
- package/packages/pi-coding-agent/src/modes/interactive/controllers/chat-controller.ts +7 -2
- package/packages/pi-coding-agent/src/modes/interactive/controllers/model-controller.ts +6 -1
- package/packages/pi-coding-agent/src/modes/interactive/interactive-mode.ts +4 -3
- package/packages/pi-coding-agent/src/modes/interactive/slash-command-handlers.ts +4 -2
- package/packages/pi-tui/dist/components/__tests__/editor.test.js +12 -0
- package/packages/pi-tui/dist/components/__tests__/editor.test.js.map +1 -1
- package/packages/pi-tui/dist/components/__tests__/input.test.js +12 -0
- package/packages/pi-tui/dist/components/__tests__/input.test.js.map +1 -1
- package/packages/pi-tui/dist/keys.d.ts.map +1 -1
- package/packages/pi-tui/dist/keys.js +27 -0
- package/packages/pi-tui/dist/keys.js.map +1 -1
- package/packages/pi-tui/src/components/__tests__/editor.test.ts +18 -0
- package/packages/pi-tui/src/components/__tests__/input.test.ts +18 -0
- package/packages/pi-tui/src/keys.ts +32 -0
- package/pkg/package.json +1 -1
- package/src/resources/GSD-WORKFLOW.md +1 -1
- package/src/resources/agents/debugger.md +58 -0
- package/src/resources/agents/doc-writer.md +43 -0
- package/src/resources/agents/git-ops.md +56 -0
- package/src/resources/agents/javascript-pro.md +46 -271
- package/src/resources/agents/planner.md +55 -0
- package/src/resources/agents/refactorer.md +47 -0
- package/src/resources/agents/reviewer.md +48 -0
- package/src/resources/agents/security.md +59 -0
- package/src/resources/agents/tester.md +50 -0
- package/src/resources/agents/typescript-pro.md +41 -235
- package/src/resources/extensions/async-jobs/await-tool.test.ts +40 -7
- package/src/resources/extensions/async-jobs/await-tool.ts +7 -4
- package/src/resources/extensions/async-jobs/job-manager.ts +33 -3
- package/src/resources/extensions/claude-code-cli/partial-builder.ts +45 -12
- package/src/resources/extensions/claude-code-cli/stream-adapter.ts +152 -13
- package/src/resources/extensions/claude-code-cli/tests/partial-builder.test.ts +91 -2
- package/src/resources/extensions/claude-code-cli/tests/stream-adapter.test.ts +301 -6
- package/src/resources/extensions/gsd/auto/infra-errors.ts +38 -0
- package/src/resources/extensions/gsd/auto/loop-deps.ts +2 -0
- package/src/resources/extensions/gsd/auto/loop.ts +134 -2
- package/src/resources/extensions/gsd/auto/phases.ts +6 -0
- package/src/resources/extensions/gsd/auto/session.ts +11 -0
- package/src/resources/extensions/gsd/auto-dashboard.ts +29 -18
- package/src/resources/extensions/gsd/auto-model-selection.ts +9 -1
- package/src/resources/extensions/gsd/auto-post-unit.ts +7 -0
- package/src/resources/extensions/gsd/auto-prompts.ts +111 -33
- package/src/resources/extensions/gsd/auto-recovery.ts +10 -0
- package/src/resources/extensions/gsd/auto-start.ts +41 -7
- package/src/resources/extensions/gsd/auto-tool-tracking.ts +1 -1
- package/src/resources/extensions/gsd/auto-worktree.ts +1 -1
- package/src/resources/extensions/gsd/auto.ts +97 -20
- package/src/resources/extensions/gsd/bootstrap/db-tools.ts +3 -3
- package/src/resources/extensions/gsd/bootstrap/register-hooks.ts +10 -10
- package/src/resources/extensions/gsd/bootstrap/register-shortcuts.ts +79 -60
- package/src/resources/extensions/gsd/bootstrap/system-context.ts +7 -0
- package/src/resources/extensions/gsd/commands/context.ts +16 -5
- package/src/resources/extensions/gsd/commands/dispatcher.ts +14 -2
- package/src/resources/extensions/gsd/commands/handlers/auto.ts +10 -36
- package/src/resources/extensions/gsd/commands/handlers/core.ts +58 -11
- package/src/resources/extensions/gsd/commands/handlers/notifications-handler.ts +17 -7
- package/src/resources/extensions/gsd/commands/handlers/workflow.ts +4 -10
- package/src/resources/extensions/gsd/commands-handlers.ts +5 -1
- package/src/resources/extensions/gsd/context-injector.ts +1 -1
- package/src/resources/extensions/gsd/custom-workflow-engine.ts +4 -8
- package/src/resources/extensions/gsd/dashboard-overlay.ts +10 -3
- package/src/resources/extensions/gsd/definition-io.ts +18 -0
- package/src/resources/extensions/gsd/dispatch-guard.ts +23 -1
- package/src/resources/extensions/gsd/doctor-providers.ts +24 -0
- package/src/resources/extensions/gsd/doctor-runtime-checks.ts +6 -3
- package/src/resources/extensions/gsd/error-classifier.ts +5 -2
- package/src/resources/extensions/gsd/forensics.ts +23 -7
- package/src/resources/extensions/gsd/gate-registry.ts +251 -0
- package/src/resources/extensions/gsd/git-service.ts +11 -8
- package/src/resources/extensions/gsd/gitignore.ts +12 -6
- package/src/resources/extensions/gsd/gsd-db.ts +105 -6
- package/src/resources/extensions/gsd/guided-flow.ts +5 -10
- package/src/resources/extensions/gsd/interrupted-session.ts +1 -0
- package/src/resources/extensions/gsd/key-manager.ts +2 -0
- package/src/resources/extensions/gsd/metrics.ts +12 -1
- package/src/resources/extensions/gsd/milestone-actions.ts +10 -3
- package/src/resources/extensions/gsd/milestone-validation-gates.ts +11 -13
- package/src/resources/extensions/gsd/notification-overlay.ts +47 -14
- package/src/resources/extensions/gsd/notification-store.ts +54 -5
- package/src/resources/extensions/gsd/notification-widget.ts +5 -14
- package/src/resources/extensions/gsd/parallel-monitor-overlay.ts +10 -3
- package/src/resources/extensions/gsd/pre-execution-checks.ts +39 -2
- package/src/resources/extensions/gsd/preferences-skills.ts +2 -36
- package/src/resources/extensions/gsd/preferences-types.ts +16 -0
- package/src/resources/extensions/gsd/preferences.ts +19 -6
- package/src/resources/extensions/gsd/prompt-loader.ts +6 -1
- package/src/resources/extensions/gsd/prompt-validation.ts +157 -0
- package/src/resources/extensions/gsd/prompts/complete-slice.md +5 -3
- package/src/resources/extensions/gsd/prompts/discuss.md +123 -12
- package/src/resources/extensions/gsd/prompts/execute-task.md +22 -19
- package/src/resources/extensions/gsd/prompts/guided-discuss-milestone.md +2 -0
- package/src/resources/extensions/gsd/prompts/guided-discuss-slice.md +2 -0
- package/src/resources/extensions/gsd/prompts/guided-resume-task.md +1 -1
- package/src/resources/extensions/gsd/prompts/queue.md +3 -2
- package/src/resources/extensions/gsd/prompts/system.md +1 -0
- package/src/resources/extensions/gsd/prompts/validate-milestone.md +4 -1
- package/src/resources/extensions/gsd/session-model-override.ts +36 -0
- package/src/resources/extensions/gsd/shortcut-defs.ts +56 -0
- package/src/resources/extensions/gsd/state.ts +33 -2
- package/src/resources/extensions/gsd/tests/auto-paused-ui-cleanup.test.ts +27 -0
- package/src/resources/extensions/gsd/tests/auto-start-model-capture.test.ts +25 -9
- package/src/resources/extensions/gsd/tests/auto-start-worktree-db-path.test.ts +28 -0
- package/src/resources/extensions/gsd/tests/block-db-writes.test.ts +63 -0
- package/src/resources/extensions/gsd/tests/bootstrap-derive-state-db-open.test.ts +39 -0
- package/src/resources/extensions/gsd/tests/complete-slice-gate-closure.test.ts +167 -0
- package/src/resources/extensions/gsd/tests/complete-slice-prompt-task-summary-layout.test.ts +18 -0
- package/src/resources/extensions/gsd/tests/definition-io.test.ts +57 -0
- package/src/resources/extensions/gsd/tests/dispatch-guard.test.ts +53 -0
- package/src/resources/extensions/gsd/tests/doctor-heal-fixable-warnings.test.ts +14 -0
- package/src/resources/extensions/gsd/tests/doctor-providers.test.ts +36 -0
- package/src/resources/extensions/gsd/tests/execute-task-prompt-existing-artifact-guard.test.ts +33 -0
- package/src/resources/extensions/gsd/tests/false-degraded-mode-warning.test.ts +104 -0
- package/src/resources/extensions/gsd/tests/forensics-stuck-loops.test.ts +62 -0
- package/src/resources/extensions/gsd/tests/format-shortcut.test.ts +31 -0
- package/src/resources/extensions/gsd/tests/gate-dispatch.test.ts +27 -0
- package/src/resources/extensions/gsd/tests/gate-registry.test.ts +140 -0
- package/src/resources/extensions/gsd/tests/gsd-db.test.ts +107 -5
- package/src/resources/extensions/gsd/tests/gsd-no-project-error.test.ts +73 -0
- package/src/resources/extensions/gsd/tests/infra-errors-cooldown.test.ts +180 -0
- package/src/resources/extensions/gsd/tests/integration/auto-worktree-milestone-merge.test.ts +66 -1
- package/src/resources/extensions/gsd/tests/integration/git-service.test.ts +8 -6
- package/src/resources/extensions/gsd/tests/key-manager.test.ts +63 -0
- package/src/resources/extensions/gsd/tests/memory-pressure-stuck-state.test.ts +54 -0
- package/src/resources/extensions/gsd/tests/model-isolation.test.ts +36 -51
- package/src/resources/extensions/gsd/tests/notification-store.test.ts +35 -0
- package/src/resources/extensions/gsd/tests/notification-widget.test.ts +26 -0
- package/src/resources/extensions/gsd/tests/notifications-handler.test.ts +90 -0
- package/src/resources/extensions/gsd/tests/parallel-monitor-overlay.test.ts +1 -0
- package/src/resources/extensions/gsd/tests/park-db-sync.test.ts +18 -0
- package/src/resources/extensions/gsd/tests/plan-milestone-artifact-verification.test.ts +62 -0
- package/src/resources/extensions/gsd/tests/post-unit-state-rebuild.test.ts +34 -0
- package/src/resources/extensions/gsd/tests/pre-execution-checks.test.ts +49 -0
- package/src/resources/extensions/gsd/tests/preferences-formatting.test.ts +87 -0
- package/src/resources/extensions/gsd/tests/preferences.test.ts +53 -0
- package/src/resources/extensions/gsd/tests/projection-regression.test.ts +96 -1
- package/src/resources/extensions/gsd/tests/prompt-contracts.test.ts +19 -0
- package/src/resources/extensions/gsd/tests/prompt-loader-working-directory.test.ts +19 -0
- package/src/resources/extensions/gsd/tests/prompt-system-gate-coverage.test.ts +208 -0
- package/src/resources/extensions/gsd/tests/provider-errors.test.ts +16 -0
- package/src/resources/extensions/gsd/tests/register-hooks-depth-verification.test.ts +97 -0
- package/src/resources/extensions/gsd/tests/register-shortcuts.test.ts +63 -5
- package/src/resources/extensions/gsd/tests/session-model-override.test.ts +35 -0
- package/src/resources/extensions/gsd/tests/stale-slice-rows.test.ts +41 -0
- package/src/resources/extensions/gsd/tests/start-auto-detached.test.ts +90 -0
- package/src/resources/extensions/gsd/tests/tool-invocation-error-loop-break.test.ts +7 -0
- package/src/resources/extensions/gsd/tests/validate-milestone-prompt-verification-classes.test.ts +18 -0
- package/src/resources/extensions/gsd/tools/complete-slice.ts +63 -0
- package/src/resources/extensions/gsd/tools/complete-task.ts +63 -0
- package/src/resources/extensions/gsd/tools/workflow-tool-executors.ts +4 -1
- package/src/resources/extensions/gsd/types.ts +26 -0
- package/src/resources/extensions/gsd/workflow-projections.ts +8 -0
- package/src/resources/extensions/gsd/worktree-manager.ts +29 -3
- package/src/resources/extensions/gsd/write-intercept.ts +10 -1
- package/src/resources/extensions/ollama/index.ts +17 -8
- package/src/resources/extensions/ollama/ollama-client.ts +35 -6
- package/src/resources/extensions/ollama/ollama-discovery.ts +37 -6
- package/src/resources/extensions/ollama/ollama-status-indicator.test.ts +28 -0
- package/src/resources/extensions/ollama/tests/ollama-discovery.test.ts +54 -0
- package/src/resources/extensions/shared/gsd-phase-state.ts +42 -0
- package/src/resources/extensions/shared/tests/gsd-phase-state.test.ts +48 -0
- package/src/resources/extensions/subagent/agents.ts +10 -0
- package/src/resources/extensions/subagent/index.ts +18 -0
- package/src/resources/extensions/subagent/tests/agents-conflicts.test.ts +33 -0
- package/src/resources/skills/create-skill/SKILL.md +2 -0
- package/dist/resources/extensions/gsd/auto-observability.js +0 -54
- package/dist/resources/extensions/gsd/file-watcher.js +0 -80
- package/dist/resources/extensions/gsd/rtk-status.js +0 -43
- package/dist/web/standalone/.next/static/chunks/app/page-7115e62689b5fd84.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/global-error-ab5a8926e07ec673.js +0 -1
- package/src/resources/extensions/gsd/auto-observability.ts +0 -72
- package/src/resources/extensions/gsd/file-watcher.ts +0 -100
- package/src/resources/extensions/gsd/rtk-status.ts +0 -53
- /package/dist/web/standalone/.next/static/{nPky_WQC28aBD77eZsRAB → eR2tLKungpmiiOyUIhqjF}/_buildManifest.js +0 -0
- /package/dist/web/standalone/.next/static/{nPky_WQC28aBD77eZsRAB → eR2tLKungpmiiOyUIhqjF}/_ssgManifest.js +0 -0
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
// Canonical GSD shortcut definitions used by registration, help text, and overlays.
|
|
2
|
+
|
|
3
|
+
import { formatShortcut } from "./files.js";
|
|
4
|
+
|
|
5
|
+
export type GSDShortcutId = "dashboard" | "notifications" | "parallel";
|
|
6
|
+
|
|
7
|
+
type GSDShortcutDef = {
|
|
8
|
+
key: "g" | "n" | "p";
|
|
9
|
+
action: string;
|
|
10
|
+
command: string;
|
|
11
|
+
/** Whether the Ctrl+Shift fallback is registered (false when it conflicts with an app keybinding). */
|
|
12
|
+
hasFallback: boolean;
|
|
13
|
+
};
|
|
14
|
+
|
|
15
|
+
export const GSD_SHORTCUTS: Record<GSDShortcutId, GSDShortcutDef> = {
|
|
16
|
+
dashboard: {
|
|
17
|
+
key: "g",
|
|
18
|
+
action: "Open GSD dashboard",
|
|
19
|
+
command: "/gsd status",
|
|
20
|
+
hasFallback: true,
|
|
21
|
+
},
|
|
22
|
+
notifications: {
|
|
23
|
+
key: "n",
|
|
24
|
+
action: "Open notification history",
|
|
25
|
+
command: "/gsd notifications",
|
|
26
|
+
hasFallback: true,
|
|
27
|
+
},
|
|
28
|
+
parallel: {
|
|
29
|
+
key: "p",
|
|
30
|
+
action: "Open parallel worker monitor",
|
|
31
|
+
command: "/gsd parallel watch",
|
|
32
|
+
hasFallback: false, // Ctrl+Shift+P conflicts with cycleModelBackward
|
|
33
|
+
},
|
|
34
|
+
};
|
|
35
|
+
|
|
36
|
+
function combo(prefix: "Ctrl+Alt+" | "Ctrl+Shift+", key: string): string {
|
|
37
|
+
return `${prefix}${key.toUpperCase()}`;
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
export function primaryShortcutCombo(id: GSDShortcutId): string {
|
|
41
|
+
return combo("Ctrl+Alt+", GSD_SHORTCUTS[id].key);
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
export function fallbackShortcutCombo(id: GSDShortcutId): string {
|
|
45
|
+
return combo("Ctrl+Shift+", GSD_SHORTCUTS[id].key);
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
export function shortcutPair(id: GSDShortcutId, formatter: (combo: string) => string = (combo) => combo): string {
|
|
49
|
+
const primary = formatter(primaryShortcutCombo(id));
|
|
50
|
+
if (!GSD_SHORTCUTS[id].hasFallback) return primary;
|
|
51
|
+
return `${primary} / ${formatter(fallbackShortcutCombo(id))}`;
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
export function formattedShortcutPair(id: GSDShortcutId): string {
|
|
55
|
+
return shortcutPair(id, formatShortcut);
|
|
56
|
+
}
|
|
@@ -57,8 +57,9 @@ import {
|
|
|
57
57
|
insertMilestone,
|
|
58
58
|
insertSlice,
|
|
59
59
|
insertTask,
|
|
60
|
+
updateSliceStatus,
|
|
60
61
|
updateTaskStatus,
|
|
61
|
-
|
|
62
|
+
getPendingGateCountForTurn,
|
|
62
63
|
type MilestoneRow,
|
|
63
64
|
type SliceRow,
|
|
64
65
|
type TaskRow,
|
|
@@ -358,6 +359,25 @@ function reconcileDiskToDb(basePath: string): MilestoneRow[] {
|
|
|
358
359
|
depends: s.depends, demo: s.demo,
|
|
359
360
|
});
|
|
360
361
|
}
|
|
362
|
+
|
|
363
|
+
// Reconcile stale *existing* slice rows (#3599): a slice row may exist in
|
|
364
|
+
// the DB with status "pending" even though disk artifacts (SUMMARY) prove
|
|
365
|
+
// completion — the same class of desync that task-level reconciliation
|
|
366
|
+
// (further below) already handles. Without this, the dependency resolver
|
|
367
|
+
// builds doneSliceIds from stale DB rows and downstream slices stay blocked
|
|
368
|
+
// forever with "No slice eligible".
|
|
369
|
+
for (const dbSlice of dbSlices) {
|
|
370
|
+
if (isStatusDone(dbSlice.status)) continue;
|
|
371
|
+
const summaryPath = resolveSliceFile(basePath, mid, dbSlice.id, "SUMMARY");
|
|
372
|
+
if (summaryPath) {
|
|
373
|
+
try {
|
|
374
|
+
updateSliceStatus(mid, dbSlice.id, "complete");
|
|
375
|
+
logWarning("reconcile", `slice ${mid}/${dbSlice.id} status reconciled from "${dbSlice.status}" to "complete" (#3599)`, { mid, sid: dbSlice.id });
|
|
376
|
+
} catch (e) {
|
|
377
|
+
logError("reconcile", `failed to update slice ${dbSlice.id}`, { sid: dbSlice.id, error: (e as Error).message });
|
|
378
|
+
}
|
|
379
|
+
}
|
|
380
|
+
}
|
|
361
381
|
}
|
|
362
382
|
return allMilestones;
|
|
363
383
|
}
|
|
@@ -864,7 +884,18 @@ export async function deriveStateFromDb(basePath: string): Promise<GSDState> {
|
|
|
864
884
|
}
|
|
865
885
|
}
|
|
866
886
|
|
|
867
|
-
|
|
887
|
+
// ── Quality gate evaluation check ──────────────────────────────────
|
|
888
|
+
// Pause before execution only when gates owned by the `gate-evaluate`
|
|
889
|
+
// turn (Q3/Q4) are still pending. Q8 is also `scope:"slice"` but is
|
|
890
|
+
// owned by `complete-slice`, so it must NOT block the evaluating-gates
|
|
891
|
+
// phase — otherwise auto-loop stalls forever waiting for a gate that
|
|
892
|
+
// this turn never evaluates. See gate-registry.ts for the ownership map.
|
|
893
|
+
// Slices with zero gate rows (pre-feature or simple) skip straight through.
|
|
894
|
+
const pendingGateCount = getPendingGateCountForTurn(
|
|
895
|
+
activeMilestone.id,
|
|
896
|
+
activeSlice.id,
|
|
897
|
+
"gate-evaluate",
|
|
898
|
+
);
|
|
868
899
|
if (pendingGateCount > 0) {
|
|
869
900
|
return {
|
|
870
901
|
activeMilestone, activeSlice, activeTask: null,
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import { test } from "node:test";
|
|
2
|
+
import assert from "node:assert/strict";
|
|
3
|
+
import { readFileSync } from "node:fs";
|
|
4
|
+
import { dirname, join } from "node:path";
|
|
5
|
+
import { fileURLToPath } from "node:url";
|
|
6
|
+
|
|
7
|
+
const __dirname = dirname(fileURLToPath(import.meta.url));
|
|
8
|
+
const autoSource = readFileSync(join(__dirname, "..", "auto.ts"), "utf-8");
|
|
9
|
+
|
|
10
|
+
test("#3370: cleanupAfterLoopExit preserves paused auto badge after provider pause", () => {
|
|
11
|
+
const cleanupIdx = autoSource.indexOf("function cleanupAfterLoopExit");
|
|
12
|
+
assert.ok(cleanupIdx > -1, "auto.ts should define cleanupAfterLoopExit");
|
|
13
|
+
|
|
14
|
+
const dispatchIdx = autoSource.indexOf("export async function dispatchHookUnit", cleanupIdx);
|
|
15
|
+
assert.ok(dispatchIdx > cleanupIdx, "cleanupAfterLoopExit body should be bounded by the next export");
|
|
16
|
+
|
|
17
|
+
const cleanupBody = autoSource.slice(cleanupIdx, dispatchIdx);
|
|
18
|
+
const pausedGuardIdx = cleanupBody.indexOf("if (!s.paused) {");
|
|
19
|
+
const clearStatusIdx = cleanupBody.indexOf('ctx.ui.setStatus("gsd-auto", undefined);');
|
|
20
|
+
|
|
21
|
+
assert.ok(pausedGuardIdx > -1, "loop-exit cleanup must guard UI clearing when auto is paused");
|
|
22
|
+
assert.ok(clearStatusIdx > pausedGuardIdx, "status clearing must live behind the paused guard");
|
|
23
|
+
assert.ok(
|
|
24
|
+
autoSource.includes('ctx?.ui.setStatus("gsd-auto", "paused");'),
|
|
25
|
+
"pauseAuto must still set the paused badge for transient provider pauses",
|
|
26
|
+
);
|
|
27
|
+
});
|
|
@@ -7,9 +7,8 @@ const sourcePath = join(import.meta.dirname, "..", "auto-start.ts");
|
|
|
7
7
|
const source = readFileSync(sourcePath, "utf-8");
|
|
8
8
|
|
|
9
9
|
test("bootstrapAutoSession snapshots ctx.model before guided-flow entry (#2829)", () => {
|
|
10
|
-
//
|
|
11
|
-
|
|
12
|
-
const snapshotIdx = source.indexOf("const startModelSnapshot = preferredModel");
|
|
10
|
+
// The snapshot ordering guarantee still holds: build snapshot before guided-flow.
|
|
11
|
+
const snapshotIdx = source.indexOf("const startModelSnapshot = manualSessionOverride");
|
|
13
12
|
assert.ok(snapshotIdx > -1, "auto-start.ts should snapshot model at bootstrap start");
|
|
14
13
|
|
|
15
14
|
const firstDiscussIdx = source.indexOf('await showSmartEntry(ctx, pi, base, { step: requestedStepMode });');
|
|
@@ -29,8 +28,11 @@ test("bootstrapAutoSession restores autoModeStartModel from the early snapshot (
|
|
|
29
28
|
assert.ok(snapshotRefIdx > -1, "autoModeStartModel should be restored from startModelSnapshot");
|
|
30
29
|
});
|
|
31
30
|
|
|
32
|
-
test("bootstrapAutoSession
|
|
33
|
-
|
|
31
|
+
test("bootstrapAutoSession checks manual session override before preferences", () => {
|
|
32
|
+
const manualIdx = source.indexOf("const manualSessionOverride = getSessionModelOverride(");
|
|
33
|
+
assert.ok(manualIdx > -1, "auto-start.ts should read session model override first");
|
|
34
|
+
|
|
35
|
+
// resolveDefaultSessionModel() should still be called for fallback behavior
|
|
34
36
|
const preferredIdx = source.indexOf("const preferredModel = resolveDefaultSessionModel(");
|
|
35
37
|
assert.ok(preferredIdx > -1, "auto-start.ts should call resolveDefaultSessionModel()");
|
|
36
38
|
|
|
@@ -38,11 +40,25 @@ test("bootstrapAutoSession prefers GSD PREFERENCES.md over settings.json for sta
|
|
|
38
40
|
const withProviderIdx = source.indexOf("resolveDefaultSessionModel(ctx.model?.provider)");
|
|
39
41
|
assert.ok(withProviderIdx > -1, "auto-start.ts should pass ctx.model?.provider for bare ID resolution");
|
|
40
42
|
|
|
41
|
-
const snapshotIdx = source.indexOf("const startModelSnapshot =
|
|
42
|
-
assert.ok(snapshotIdx > -1, "startModelSnapshot should
|
|
43
|
+
const snapshotIdx = source.indexOf("const startModelSnapshot = manualSessionOverride");
|
|
44
|
+
assert.ok(snapshotIdx > -1, "startModelSnapshot should prefer manual session override");
|
|
43
45
|
|
|
44
46
|
assert.ok(
|
|
45
|
-
preferredIdx < snapshotIdx,
|
|
46
|
-
"
|
|
47
|
+
manualIdx < snapshotIdx && preferredIdx < snapshotIdx,
|
|
48
|
+
"manual override and preference fallback must be resolved before building startModelSnapshot",
|
|
47
49
|
);
|
|
48
50
|
});
|
|
51
|
+
|
|
52
|
+
test("bootstrapAutoSession validates preferred model against live registry auth (#unconfigured-models)", () => {
|
|
53
|
+
// The raw PREFERENCES.md value must be validated against getAvailable()
|
|
54
|
+
// before being captured as the snapshot, so an unconfigured provider
|
|
55
|
+
// (no API key / OAuth) can't become autoModeStartModel.
|
|
56
|
+
const validationIdx = source.indexOf("ctx.modelRegistry.getAvailable()");
|
|
57
|
+
assert.ok(validationIdx > -1, "auto-start.ts should validate preferred model against getAvailable()");
|
|
58
|
+
|
|
59
|
+
const resolveModelIdIdx = source.indexOf("resolveModelId");
|
|
60
|
+
assert.ok(resolveModelIdIdx > -1, "auto-start.ts should resolve preferred model against the registry");
|
|
61
|
+
|
|
62
|
+
const warningIdx = source.indexOf("is not configured; falling back to session default");
|
|
63
|
+
assert.ok(warningIdx > -1, "auto-start.ts should warn when preferred model is unconfigured");
|
|
64
|
+
});
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import { readFileSync } from "node:fs";
|
|
2
|
+
import { join } from "node:path";
|
|
3
|
+
|
|
4
|
+
import { createTestContext } from "./test-helpers.ts";
|
|
5
|
+
|
|
6
|
+
const { assertTrue, report } = createTestContext();
|
|
7
|
+
|
|
8
|
+
const srcPath = join(import.meta.dirname, "..", "auto-start.ts");
|
|
9
|
+
const src = readFileSync(srcPath, "utf-8");
|
|
10
|
+
|
|
11
|
+
console.log("\n=== #3822: worktree bootstrap uses project DB path ===");
|
|
12
|
+
|
|
13
|
+
const dbLifecycleIdx = src.indexOf("// ── DB lifecycle ──");
|
|
14
|
+
assertTrue(dbLifecycleIdx > 0, "auto-start.ts has a DB lifecycle section");
|
|
15
|
+
|
|
16
|
+
const dbLifecycleRegion = dbLifecycleIdx > 0 ? src.slice(dbLifecycleIdx, dbLifecycleIdx + 600) : "";
|
|
17
|
+
|
|
18
|
+
assertTrue(
|
|
19
|
+
dbLifecycleRegion.includes("const gsdDbPath = resolveProjectRootDbPath(s.basePath);"),
|
|
20
|
+
"DB lifecycle resolves the project-root DB path after worktree entry (#3822)",
|
|
21
|
+
);
|
|
22
|
+
|
|
23
|
+
assertTrue(
|
|
24
|
+
!dbLifecycleRegion.includes('join(s.basePath, ".gsd", "gsd.db")'),
|
|
25
|
+
"DB lifecycle no longer derives gsd.db directly from the worktree path (#3822)",
|
|
26
|
+
);
|
|
27
|
+
|
|
28
|
+
report();
|
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Regression test for #3674 — block direct writes to gsd.db
|
|
3
|
+
*
|
|
4
|
+
* When gsd_complete_task was unavailable, agents fell back to shell-based
|
|
5
|
+
* sqlite3 writes, corrupting the WAL-backed database. The fix extends
|
|
6
|
+
* write-intercept to block file writes and bash commands targeting gsd.db.
|
|
7
|
+
*/
|
|
8
|
+
|
|
9
|
+
import { describe, test } from 'node:test';
|
|
10
|
+
import assert from 'node:assert/strict';
|
|
11
|
+
import { isBlockedStateFile, isBashWriteToStateFile } from '../write-intercept.ts';
|
|
12
|
+
|
|
13
|
+
describe('isBlockedStateFile blocks gsd.db paths (#3674)', () => {
|
|
14
|
+
test('blocks .gsd/gsd.db', () => {
|
|
15
|
+
assert.ok(isBlockedStateFile('/project/.gsd/gsd.db'));
|
|
16
|
+
});
|
|
17
|
+
|
|
18
|
+
test('blocks .gsd/gsd.db-wal', () => {
|
|
19
|
+
assert.ok(isBlockedStateFile('/project/.gsd/gsd.db-wal'));
|
|
20
|
+
});
|
|
21
|
+
|
|
22
|
+
test('blocks .gsd/gsd.db-shm', () => {
|
|
23
|
+
assert.ok(isBlockedStateFile('/project/.gsd/gsd.db-shm'));
|
|
24
|
+
});
|
|
25
|
+
|
|
26
|
+
test('blocks resolved symlink path under .gsd/projects/', () => {
|
|
27
|
+
assert.ok(isBlockedStateFile('/home/user/.gsd/projects/myproj/gsd.db'));
|
|
28
|
+
});
|
|
29
|
+
|
|
30
|
+
test('still blocks STATE.md', () => {
|
|
31
|
+
assert.ok(isBlockedStateFile('/project/.gsd/STATE.md'));
|
|
32
|
+
});
|
|
33
|
+
|
|
34
|
+
test('does not block other .gsd files', () => {
|
|
35
|
+
assert.ok(!isBlockedStateFile('/project/.gsd/DECISIONS.md'));
|
|
36
|
+
});
|
|
37
|
+
});
|
|
38
|
+
|
|
39
|
+
describe('isBashWriteToStateFile blocks DB shell commands (#3674)', () => {
|
|
40
|
+
test('blocks sqlite3 targeting gsd.db', () => {
|
|
41
|
+
assert.ok(isBashWriteToStateFile('sqlite3 .gsd/gsd.db "INSERT INTO ..."'));
|
|
42
|
+
});
|
|
43
|
+
|
|
44
|
+
test('blocks better-sqlite3 targeting gsd.db', () => {
|
|
45
|
+
assert.ok(isBashWriteToStateFile('node -e "require(\'better-sqlite3\')(\'.gsd/gsd.db\')"'));
|
|
46
|
+
});
|
|
47
|
+
|
|
48
|
+
test('blocks shell redirect to gsd.db', () => {
|
|
49
|
+
assert.ok(isBashWriteToStateFile('echo data > .gsd/gsd.db'));
|
|
50
|
+
});
|
|
51
|
+
|
|
52
|
+
test('blocks cp to gsd.db', () => {
|
|
53
|
+
assert.ok(isBashWriteToStateFile('cp backup.db .gsd/gsd.db'));
|
|
54
|
+
});
|
|
55
|
+
|
|
56
|
+
test('blocks mv to gsd.db', () => {
|
|
57
|
+
assert.ok(isBashWriteToStateFile('mv temp.db .gsd/gsd.db'));
|
|
58
|
+
});
|
|
59
|
+
|
|
60
|
+
test('does not block reading gsd.db with cat', () => {
|
|
61
|
+
assert.ok(!isBashWriteToStateFile('cat .gsd/gsd.db'));
|
|
62
|
+
});
|
|
63
|
+
});
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
import { describe, test } from "node:test";
|
|
2
|
+
import assert from "node:assert/strict";
|
|
3
|
+
import { readFileSync } from "node:fs";
|
|
4
|
+
import { join } from "node:path";
|
|
5
|
+
|
|
6
|
+
const systemContextSrc = readFileSync(
|
|
7
|
+
join(import.meta.dirname, "..", "bootstrap", "system-context.ts"),
|
|
8
|
+
"utf-8",
|
|
9
|
+
);
|
|
10
|
+
const registerHooksSrc = readFileSync(
|
|
11
|
+
join(import.meta.dirname, "..", "bootstrap", "register-hooks.ts"),
|
|
12
|
+
"utf-8",
|
|
13
|
+
);
|
|
14
|
+
|
|
15
|
+
describe("bootstrap deriveState DB guards (#3844)", () => {
|
|
16
|
+
test("system-context opens DB before deriveState in resume flows", () => {
|
|
17
|
+
const helperIdx = systemContextSrc.indexOf("const ensureStateDbOpen = async () => {");
|
|
18
|
+
const firstDeriveIdx = systemContextSrc.indexOf("const state = await deriveState(basePath);");
|
|
19
|
+
assert.ok(helperIdx > -1, "system-context should define a DB-open helper for deriveState callers");
|
|
20
|
+
assert.ok(firstDeriveIdx > -1, "system-context should still derive state for resume flows");
|
|
21
|
+
assert.ok(helperIdx < firstDeriveIdx, "system-context should prepare DB opening before deriveState resume calls");
|
|
22
|
+
assert.match(
|
|
23
|
+
systemContextSrc,
|
|
24
|
+
/await ensureStateDbOpen\(\);\s*\n\s*const state = await deriveState\(basePath\);/g,
|
|
25
|
+
"system-context resume flows should open DB before deriveState",
|
|
26
|
+
);
|
|
27
|
+
});
|
|
28
|
+
|
|
29
|
+
test("register-hooks opens DB before deriveState in session_before_compact", () => {
|
|
30
|
+
const compactIdx = registerHooksSrc.indexOf('pi.on("session_before_compact"');
|
|
31
|
+
assert.ok(compactIdx > -1, "register-hooks should define session_before_compact");
|
|
32
|
+
const compactSection = registerHooksSrc.slice(compactIdx, compactIdx + 1600);
|
|
33
|
+
const ensureIdx = compactSection.indexOf("ensureDbOpen()");
|
|
34
|
+
const deriveIdx = compactSection.indexOf("deriveState(basePath)");
|
|
35
|
+
assert.ok(ensureIdx > -1, "session_before_compact should call ensureDbOpen()");
|
|
36
|
+
assert.ok(deriveIdx > -1, "session_before_compact should derive state");
|
|
37
|
+
assert.ok(ensureIdx < deriveIdx, "session_before_compact should open DB before deriveState");
|
|
38
|
+
});
|
|
39
|
+
});
|
|
@@ -0,0 +1,167 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* complete-slice gate closure integration test.
|
|
3
|
+
*
|
|
4
|
+
* Pins the fix for the Q8-stall bug: complete-slice must close every gate
|
|
5
|
+
* owned by the complete-slice turn based on the content of the matching
|
|
6
|
+
* CompleteSliceParams field. Without this, Q8 stays pending forever and
|
|
7
|
+
* blocks state derivation on subsequent loops.
|
|
8
|
+
*/
|
|
9
|
+
|
|
10
|
+
import { describe, test, beforeEach, afterEach } from "node:test";
|
|
11
|
+
import assert from "node:assert/strict";
|
|
12
|
+
import * as fs from "node:fs";
|
|
13
|
+
import * as path from "node:path";
|
|
14
|
+
import * as os from "node:os";
|
|
15
|
+
|
|
16
|
+
import {
|
|
17
|
+
openDatabase,
|
|
18
|
+
closeDatabase,
|
|
19
|
+
insertMilestone,
|
|
20
|
+
insertSlice,
|
|
21
|
+
insertTask,
|
|
22
|
+
insertGateRow,
|
|
23
|
+
getGateResults,
|
|
24
|
+
} from "../gsd-db.ts";
|
|
25
|
+
import { handleCompleteSlice } from "../tools/complete-slice.ts";
|
|
26
|
+
import type { CompleteSliceParams } from "../types.ts";
|
|
27
|
+
|
|
28
|
+
function makeValidSliceParams(overrides: Partial<CompleteSliceParams> = {}): CompleteSliceParams {
|
|
29
|
+
return {
|
|
30
|
+
sliceId: "S01",
|
|
31
|
+
milestoneId: "M001",
|
|
32
|
+
sliceTitle: "Test Slice",
|
|
33
|
+
oneLiner: "Implemented test slice",
|
|
34
|
+
narrative: "Built and tested.",
|
|
35
|
+
verification: "All tests pass.",
|
|
36
|
+
deviations: "None.",
|
|
37
|
+
knownLimitations: "None.",
|
|
38
|
+
followUps: "None.",
|
|
39
|
+
keyFiles: ["src/foo.ts"],
|
|
40
|
+
keyDecisions: [],
|
|
41
|
+
patternsEstablished: [],
|
|
42
|
+
observabilitySurfaces: [],
|
|
43
|
+
provides: [],
|
|
44
|
+
requirementsSurfaced: [],
|
|
45
|
+
drillDownPaths: [],
|
|
46
|
+
affects: [],
|
|
47
|
+
requirementsAdvanced: [],
|
|
48
|
+
requirementsValidated: [],
|
|
49
|
+
requirementsInvalidated: [],
|
|
50
|
+
filesModified: [],
|
|
51
|
+
requires: [],
|
|
52
|
+
uatContent: "## Smoke Test\n\nVerify happy path.",
|
|
53
|
+
...overrides,
|
|
54
|
+
};
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
describe("complete-slice closes complete-slice-owned gates", () => {
|
|
58
|
+
let dbPath: string;
|
|
59
|
+
let basePath: string;
|
|
60
|
+
|
|
61
|
+
beforeEach(() => {
|
|
62
|
+
dbPath = path.join(
|
|
63
|
+
fs.mkdtempSync(path.join(os.tmpdir(), "gsd-slice-gate-")),
|
|
64
|
+
"test.db",
|
|
65
|
+
);
|
|
66
|
+
openDatabase(dbPath);
|
|
67
|
+
|
|
68
|
+
basePath = fs.mkdtempSync(path.join(os.tmpdir(), "gsd-slice-gate-handler-"));
|
|
69
|
+
const sliceDir = path.join(
|
|
70
|
+
basePath, ".gsd", "milestones", "M001", "slices", "S01", "tasks",
|
|
71
|
+
);
|
|
72
|
+
fs.mkdirSync(sliceDir, { recursive: true });
|
|
73
|
+
fs.writeFileSync(
|
|
74
|
+
path.join(basePath, ".gsd", "milestones", "M001", "M001-ROADMAP.md"),
|
|
75
|
+
[
|
|
76
|
+
"# M001: Test Milestone",
|
|
77
|
+
"",
|
|
78
|
+
"## Slices",
|
|
79
|
+
"",
|
|
80
|
+
'- [ ] **S01: Test Slice** `risk:medium` `depends:[]`',
|
|
81
|
+
" - After this: basic functionality works",
|
|
82
|
+
].join("\n"),
|
|
83
|
+
);
|
|
84
|
+
|
|
85
|
+
insertMilestone({ id: "M001" });
|
|
86
|
+
insertSlice({ id: "S01", milestoneId: "M001" });
|
|
87
|
+
insertTask({
|
|
88
|
+
id: "T01", sliceId: "S01", milestoneId: "M001",
|
|
89
|
+
status: "complete", title: "Task 1",
|
|
90
|
+
});
|
|
91
|
+
|
|
92
|
+
// Seed Q8 as pending — this is what plan-slice does today.
|
|
93
|
+
insertGateRow({
|
|
94
|
+
milestoneId: "M001", sliceId: "S01",
|
|
95
|
+
gateId: "Q8", scope: "slice",
|
|
96
|
+
});
|
|
97
|
+
});
|
|
98
|
+
|
|
99
|
+
afterEach(() => {
|
|
100
|
+
closeDatabase();
|
|
101
|
+
fs.rmSync(path.dirname(dbPath), { recursive: true, force: true });
|
|
102
|
+
fs.rmSync(basePath, { recursive: true, force: true });
|
|
103
|
+
});
|
|
104
|
+
|
|
105
|
+
test("Q8 closes as 'pass' when operationalReadiness is populated", async () => {
|
|
106
|
+
const params = makeValidSliceParams({
|
|
107
|
+
operationalReadiness: [
|
|
108
|
+
"- Health signal: /health endpoint returns 200",
|
|
109
|
+
"- Failure signal: error rate alert in observability dashboard",
|
|
110
|
+
"- Recovery: systemd auto-restart",
|
|
111
|
+
].join("\n"),
|
|
112
|
+
});
|
|
113
|
+
|
|
114
|
+
const result = await handleCompleteSlice(params, basePath);
|
|
115
|
+
assert.ok(!("error" in result), `handler failed: ${(result as any).error}`);
|
|
116
|
+
|
|
117
|
+
const gates = getGateResults("M001", "S01", "slice");
|
|
118
|
+
const q8 = gates.find((g) => g.gate_id === "Q8");
|
|
119
|
+
assert.ok(q8, "Q8 row must exist after complete-slice");
|
|
120
|
+
assert.equal(q8.status, "complete");
|
|
121
|
+
assert.equal(q8.verdict, "pass");
|
|
122
|
+
assert.ok(
|
|
123
|
+
q8.findings.includes("Health signal"),
|
|
124
|
+
"Q8 findings must capture the operationalReadiness content",
|
|
125
|
+
);
|
|
126
|
+
});
|
|
127
|
+
|
|
128
|
+
test("Q8 closes as 'omitted' when operationalReadiness is empty", async () => {
|
|
129
|
+
const params = makeValidSliceParams({ operationalReadiness: "" });
|
|
130
|
+
|
|
131
|
+
const result = await handleCompleteSlice(params, basePath);
|
|
132
|
+
assert.ok(!("error" in result), `handler failed: ${(result as any).error}`);
|
|
133
|
+
|
|
134
|
+
const gates = getGateResults("M001", "S01", "slice");
|
|
135
|
+
const q8 = gates.find((g) => g.gate_id === "Q8");
|
|
136
|
+
assert.ok(q8, "Q8 row must exist after complete-slice");
|
|
137
|
+
assert.equal(q8.status, "complete");
|
|
138
|
+
assert.equal(q8.verdict, "omitted");
|
|
139
|
+
});
|
|
140
|
+
|
|
141
|
+
test("Q8 also closes when operationalReadiness is omitted entirely", async () => {
|
|
142
|
+
// A model that doesn't pass operationalReadiness at all must still
|
|
143
|
+
// move Q8 out of 'pending' — leaving it pending produces the stall.
|
|
144
|
+
const params = makeValidSliceParams();
|
|
145
|
+
const result = await handleCompleteSlice(params, basePath);
|
|
146
|
+
assert.ok(!("error" in result), `handler failed: ${(result as any).error}`);
|
|
147
|
+
|
|
148
|
+
const gates = getGateResults("M001", "S01", "slice");
|
|
149
|
+
const q8 = gates.find((g) => g.gate_id === "Q8");
|
|
150
|
+
assert.ok(q8);
|
|
151
|
+
assert.notEqual(q8.status, "pending", "Q8 must never remain pending after complete-slice");
|
|
152
|
+
assert.equal(q8.verdict, "omitted");
|
|
153
|
+
});
|
|
154
|
+
|
|
155
|
+
test("summary markdown contains Operational Readiness section", async () => {
|
|
156
|
+
const params = makeValidSliceParams({
|
|
157
|
+
operationalReadiness: "- Health signal: /health\n- Failure signal: alert",
|
|
158
|
+
});
|
|
159
|
+
const result = await handleCompleteSlice(params, basePath);
|
|
160
|
+
assert.ok(!("error" in result));
|
|
161
|
+
if (!("error" in result)) {
|
|
162
|
+
const summary = fs.readFileSync(result.summaryPath, "utf-8");
|
|
163
|
+
assert.match(summary, /^## Operational Readiness/m);
|
|
164
|
+
assert.match(summary, /Health signal: \/health/);
|
|
165
|
+
}
|
|
166
|
+
});
|
|
167
|
+
});
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import test from "node:test";
|
|
2
|
+
import assert from "node:assert/strict";
|
|
3
|
+
import { readFileSync } from "node:fs";
|
|
4
|
+
import { join } from "node:path";
|
|
5
|
+
|
|
6
|
+
const promptPath = join(process.cwd(), "src/resources/extensions/gsd/prompts/complete-slice.md");
|
|
7
|
+
const prompt = readFileSync(promptPath, "utf-8");
|
|
8
|
+
|
|
9
|
+
test("complete-slice prompt explains the flat task summary layout", () => {
|
|
10
|
+
assert.match(prompt, /flat file layout/i);
|
|
11
|
+
assert.match(prompt, /T01-SUMMARY\.md/);
|
|
12
|
+
assert.match(prompt, /not inside per-task subdirectories like `tasks\/T01\/SUMMARY\.md`/i);
|
|
13
|
+
});
|
|
14
|
+
|
|
15
|
+
test("complete-slice prompt forbids the wrong task summary glob", () => {
|
|
16
|
+
assert.match(prompt, /find .*tasks -name "\*-SUMMARY\.md"/i);
|
|
17
|
+
assert.match(prompt, /Never use `tasks\/\*\/SUMMARY\.md`/);
|
|
18
|
+
});
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* definition-io.ts — unit tests for readFrozenDefinition.
|
|
3
|
+
*/
|
|
4
|
+
|
|
5
|
+
import { describe, test, beforeEach, afterEach } from "node:test";
|
|
6
|
+
import assert from "node:assert/strict";
|
|
7
|
+
import { mkdtempSync, mkdirSync, writeFileSync, rmSync, realpathSync } from "node:fs";
|
|
8
|
+
import { join } from "node:path";
|
|
9
|
+
import { tmpdir } from "node:os";
|
|
10
|
+
|
|
11
|
+
import { readFrozenDefinition } from "../definition-io.ts";
|
|
12
|
+
|
|
13
|
+
function createTmpDir(): string {
|
|
14
|
+
return realpathSync(mkdtempSync(join(tmpdir(), "gsd-defio-test-")));
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
describe("readFrozenDefinition", () => {
|
|
18
|
+
let runDir: string;
|
|
19
|
+
|
|
20
|
+
beforeEach(() => {
|
|
21
|
+
runDir = createTmpDir();
|
|
22
|
+
});
|
|
23
|
+
|
|
24
|
+
afterEach(() => {
|
|
25
|
+
rmSync(runDir, { recursive: true, force: true });
|
|
26
|
+
});
|
|
27
|
+
|
|
28
|
+
test("parses a valid DEFINITION.yaml", () => {
|
|
29
|
+
const yaml = [
|
|
30
|
+
"version: 1",
|
|
31
|
+
"name: test-workflow",
|
|
32
|
+
"description: A test workflow",
|
|
33
|
+
"steps:",
|
|
34
|
+
" - id: step-1",
|
|
35
|
+
" prompt: do the thing",
|
|
36
|
+
].join("\n");
|
|
37
|
+
writeFileSync(join(runDir, "DEFINITION.yaml"), yaml, "utf-8");
|
|
38
|
+
|
|
39
|
+
const def = readFrozenDefinition(runDir);
|
|
40
|
+
assert.equal(def.version, 1);
|
|
41
|
+
assert.equal(def.name, "test-workflow");
|
|
42
|
+
assert.equal(def.description, "A test workflow");
|
|
43
|
+
assert.equal(def.steps.length, 1);
|
|
44
|
+
assert.equal(def.steps[0].id, "step-1");
|
|
45
|
+
});
|
|
46
|
+
|
|
47
|
+
test("throws when DEFINITION.yaml is missing", () => {
|
|
48
|
+
assert.throws(() => readFrozenDefinition(runDir), {
|
|
49
|
+
code: "ENOENT",
|
|
50
|
+
});
|
|
51
|
+
});
|
|
52
|
+
|
|
53
|
+
test("throws on malformed YAML", () => {
|
|
54
|
+
writeFileSync(join(runDir, "DEFINITION.yaml"), ": : : not valid yaml [", "utf-8");
|
|
55
|
+
assert.throws(() => readFrozenDefinition(runDir));
|
|
56
|
+
});
|
|
57
|
+
});
|
|
@@ -145,6 +145,59 @@ test("dispatch guard falls back to positional ordering when no dependencies decl
|
|
|
145
145
|
);
|
|
146
146
|
});
|
|
147
147
|
|
|
148
|
+
test("dispatch guard ignores positionally-earlier reverse dependents for zero-dependency slices (#3720)", (t) => {
|
|
149
|
+
const repo = setupRepo();
|
|
150
|
+
t.after(() => teardownRepo(repo));
|
|
151
|
+
|
|
152
|
+
mkdirSync(join(repo, ".gsd", "milestones", "M015"), { recursive: true });
|
|
153
|
+
|
|
154
|
+
insertMilestone({ id: "M015", title: "Reverse dependency fallback" });
|
|
155
|
+
insertSlice({ id: "S03", milestoneId: "M015", title: "Complete prerequisite", status: "complete", depends: [], sequence: 0 });
|
|
156
|
+
insertSlice({ id: "S04", milestoneId: "M015", title: "Depends on S04A", status: "pending", depends: ["S03", "S04A"], sequence: 0 });
|
|
157
|
+
insertSlice({ id: "S04A", milestoneId: "M015", title: "No explicit deps", status: "pending", depends: [], sequence: 0 });
|
|
158
|
+
|
|
159
|
+
writeFileSync(join(repo, ".gsd", "milestones", "M015", "M015-ROADMAP.md"), "# M015\n");
|
|
160
|
+
|
|
161
|
+
// S04A has no declared dependencies and should not be blocked by S04, because
|
|
162
|
+
// S04 itself depends on S04A. With sequence=0, DB ordering falls back to id.
|
|
163
|
+
assert.equal(
|
|
164
|
+
getPriorSliceCompletionBlocker(repo, "main", "execute-task", "M015/S04A/T02"),
|
|
165
|
+
null,
|
|
166
|
+
);
|
|
167
|
+
|
|
168
|
+
// The reverse direction is still blocked normally.
|
|
169
|
+
assert.equal(
|
|
170
|
+
getPriorSliceCompletionBlocker(repo, "main", "execute-task", "M015/S04/T01"),
|
|
171
|
+
"Cannot dispatch execute-task M015/S04/T01: dependency slice M015/S04A is not complete.",
|
|
172
|
+
);
|
|
173
|
+
});
|
|
174
|
+
|
|
175
|
+
test("dispatch guard treats zero-dependency slices as independent when a milestone uses explicit deps (#3998)", (t) => {
|
|
176
|
+
const repo = setupRepo();
|
|
177
|
+
t.after(() => teardownRepo(repo));
|
|
178
|
+
|
|
179
|
+
mkdirSync(join(repo, ".gsd", "milestones", "M022"), { recursive: true });
|
|
180
|
+
|
|
181
|
+
insertMilestone({ id: "M022", title: "Mixed dependency milestone" });
|
|
182
|
+
insertSlice({ id: "S02", milestoneId: "M022", title: "Core A", status: "complete", depends: [], sequence: 2 });
|
|
183
|
+
insertSlice({ id: "S03", milestoneId: "M022", title: "Core B", status: "complete", depends: [], sequence: 3 });
|
|
184
|
+
insertSlice({ id: "S05", milestoneId: "M022", title: "Blocked integration", status: "pending", depends: ["S02", "S03", "S07"], sequence: 5 });
|
|
185
|
+
insertSlice({ id: "S06", milestoneId: "M022", title: "Independent zero-dep slice", status: "pending", depends: [], sequence: 6 });
|
|
186
|
+
insertSlice({ id: "S07", milestoneId: "M022", title: "Late prerequisite", status: "pending", depends: ["S02"], sequence: 7 });
|
|
187
|
+
|
|
188
|
+
writeFileSync(join(repo, ".gsd", "milestones", "M022", "M022-ROADMAP.md"), "# M022\n");
|
|
189
|
+
|
|
190
|
+
assert.equal(
|
|
191
|
+
getPriorSliceCompletionBlocker(repo, "main", "execute-task", "M022/S06/T02"),
|
|
192
|
+
null,
|
|
193
|
+
);
|
|
194
|
+
|
|
195
|
+
assert.equal(
|
|
196
|
+
getPriorSliceCompletionBlocker(repo, "main", "execute-task", "M022/S05/T01"),
|
|
197
|
+
"Cannot dispatch execute-task M022/S05/T01: dependency slice M022/S07 is not complete.",
|
|
198
|
+
);
|
|
199
|
+
});
|
|
200
|
+
|
|
148
201
|
test("dispatch guard allows slice with all declared dependencies complete", (t) => {
|
|
149
202
|
const repo = setupRepo();
|
|
150
203
|
t.after(() => teardownRepo(repo));
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import test from "node:test";
|
|
2
|
+
import assert from "node:assert/strict";
|
|
3
|
+
import { isDoctorHealActionable } from "../commands-handlers.js";
|
|
4
|
+
|
|
5
|
+
test("doctor heal actionable filter keeps fixable warnings and errors", () => {
|
|
6
|
+
assert.equal(isDoctorHealActionable({ fixable: true, severity: "warning" }), true);
|
|
7
|
+
assert.equal(isDoctorHealActionable({ fixable: true, severity: "error" }), true);
|
|
8
|
+
});
|
|
9
|
+
|
|
10
|
+
test("doctor heal actionable filter excludes info and non-fixable issues", () => {
|
|
11
|
+
assert.equal(isDoctorHealActionable({ fixable: true, severity: "info" }), false);
|
|
12
|
+
assert.equal(isDoctorHealActionable({ fixable: false, severity: "warning" }), false);
|
|
13
|
+
assert.equal(isDoctorHealActionable({ fixable: false, severity: "error" }), false);
|
|
14
|
+
});
|