gsd-pi 2.71.0-dev.e17e0ce → 2.72.0-dev.3118184
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 -3
- package/dist/cli.js +76 -3
- package/dist/mcp-server.js +37 -14
- package/dist/onboarding.js +10 -0
- 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 +132 -10
- package/dist/resources/extensions/gsd/auto/loop.js +84 -1
- package/dist/resources/extensions/gsd/auto/phases.js +4 -0
- 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 +24 -4
- package/dist/resources/extensions/gsd/auto.js +29 -19
- package/dist/resources/extensions/gsd/bootstrap/db-tools.js +3 -3
- package/dist/resources/extensions/gsd/bootstrap/register-hooks.js +9 -11
- package/dist/resources/extensions/gsd/bootstrap/register-shortcuts.js +2 -5
- 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/definition-io.js +15 -0
- package/dist/resources/extensions/gsd/dispatch-guard.js +4 -0
- 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 +4 -1
- 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/key-manager.js +2 -0
- package/dist/resources/extensions/gsd/milestone-validation-gates.js +11 -12
- package/dist/resources/extensions/gsd/notification-overlay.js +26 -12
- package/dist/resources/extensions/gsd/notification-store.js +5 -4
- 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 +3 -1
- package/dist/resources/extensions/gsd/prompts/discuss.md +122 -13
- package/dist/resources/extensions/gsd/prompts/execute-task.md +2 -0
- package/dist/resources/extensions/gsd/prompts/system.md +1 -1
- package/dist/resources/extensions/gsd/prompts/validate-milestone.md +2 -0
- package/dist/resources/extensions/gsd/shortcut-defs.js +7 -1
- 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/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 +14 -14
- package/dist/web/standalone/.next/build-manifest.json +2 -2
- package/dist/web/standalone/.next/prerender-manifest.json +3 -3
- package/dist/web/standalone/.next/server/app/_global-error/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 +1 -1
- package/dist/web/standalone/.next/server/app/_not-found.segments/_full.segment.rsc +1 -1
- package/dist/web/standalone/.next/server/app/_not-found.segments/_head.segment.rsc +1 -1
- package/dist/web/standalone/.next/server/app/_not-found.segments/_index.segment.rsc +1 -1
- package/dist/web/standalone/.next/server/app/_not-found.segments/_not-found/__PAGE__.segment.rsc +1 -1
- package/dist/web/standalone/.next/server/app/_not-found.segments/_not-found.segment.rsc +1 -1
- package/dist/web/standalone/.next/server/app/_not-found.segments/_tree.segment.rsc +1 -1
- package/dist/web/standalone/.next/server/app/api/boot/route.js +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/resize/route.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/browse-directories/route.js +1 -1
- package/dist/web/standalone/.next/server/app/api/captures/route.js +1 -1
- package/dist/web/standalone/.next/server/app/api/cleanup/route.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/doctor/route.js +1 -1
- package/dist/web/standalone/.next/server/app/api/experimental/route.js +2 -2
- package/dist/web/standalone/.next/server/app/api/export-data/route.js +1 -1
- package/dist/web/standalone/.next/server/app/api/files/route.js +1 -1
- package/dist/web/standalone/.next/server/app/api/forensics/route.js +1 -1
- package/dist/web/standalone/.next/server/app/api/git/route.js +1 -1
- package/dist/web/standalone/.next/server/app/api/history/route.js +1 -1
- package/dist/web/standalone/.next/server/app/api/hooks/route.js +1 -1
- package/dist/web/standalone/.next/server/app/api/inspect/route.js +1 -1
- package/dist/web/standalone/.next/server/app/api/knowledge/route.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/notifications/route.js +2 -2
- package/dist/web/standalone/.next/server/app/api/onboarding/route.js +1 -1
- package/dist/web/standalone/.next/server/app/api/preferences/route.js +1 -1
- package/dist/web/standalone/.next/server/app/api/projects/route.js +1 -1
- package/dist/web/standalone/.next/server/app/api/recovery/route.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/session/browser/route.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/events/route.js +2 -2
- package/dist/web/standalone/.next/server/app/api/session/manage/route.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/shutdown/route.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/steer/route.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/terminal/input/route.js +2 -2
- package/dist/web/standalone/.next/server/app/api/terminal/resize/route.js +2 -2
- package/dist/web/standalone/.next/server/app/api/terminal/sessions/route.js +2 -2
- package/dist/web/standalone/.next/server/app/api/terminal/stream/route.js +3 -3
- package/dist/web/standalone/.next/server/app/api/terminal/upload/route.js +1 -1
- package/dist/web/standalone/.next/server/app/api/undo/route.js +1 -1
- package/dist/web/standalone/.next/server/app/api/update/route.js +1 -1
- package/dist/web/standalone/.next/server/app/api/visualizer/route.js +1 -1
- package/dist/web/standalone/.next/server/app/index.html +1 -1
- package/dist/web/standalone/.next/server/app/index.rsc +1 -1
- package/dist/web/standalone/.next/server/app/index.segments/__PAGE__.segment.rsc +1 -1
- package/dist/web/standalone/.next/server/app/index.segments/_full.segment.rsc +1 -1
- package/dist/web/standalone/.next/server/app/index.segments/_head.segment.rsc +1 -1
- package/dist/web/standalone/.next/server/app/index.segments/_index.segment.rsc +1 -1
- package/dist/web/standalone/.next/server/app/index.segments/_tree.segment.rsc +1 -1
- package/dist/web/standalone/.next/server/app/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 +14 -14
- 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/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/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.js +1 -1
- 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.ts +1 -1
- 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/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/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/model-resolver.d.ts.map +1 -1
- package/packages/pi-coding-agent/dist/core/model-resolver.js +1 -0
- 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.map +1 -1
- package/packages/pi-coding-agent/dist/core/sdk.js +9 -0
- package/packages/pi-coding-agent/dist/core/sdk.js.map +1 -1
- package/packages/pi-coding-agent/dist/modes/interactive/components/__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/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.map +1 -1
- package/packages/pi-coding-agent/dist/modes/interactive/components/tool-execution.js +87 -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/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/package.json +1 -1
- package/packages/pi-coding-agent/src/core/model-resolver.test.ts +85 -0
- package/packages/pi-coding-agent/src/core/model-resolver.ts +1 -0
- 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.ts +10 -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/model-selector.ts +15 -6
- package/packages/pi-coding-agent/src/modes/interactive/components/tool-execution.ts +84 -12
- package/packages/pi-coding-agent/src/modes/interactive/controllers/model-controller.ts +6 -1
- 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/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 +139 -8
- 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 +245 -2
- package/src/resources/extensions/gsd/auto/loop.ts +89 -1
- package/src/resources/extensions/gsd/auto/phases.ts +4 -0
- 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 +31 -4
- package/src/resources/extensions/gsd/auto.ts +29 -20
- package/src/resources/extensions/gsd/bootstrap/db-tools.ts +3 -3
- package/src/resources/extensions/gsd/bootstrap/register-hooks.ts +8 -10
- package/src/resources/extensions/gsd/bootstrap/register-shortcuts.ts +2 -5
- 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/definition-io.ts +18 -0
- package/src/resources/extensions/gsd/dispatch-guard.ts +5 -0
- 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 +4 -1
- 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/key-manager.ts +2 -0
- package/src/resources/extensions/gsd/milestone-validation-gates.ts +11 -13
- package/src/resources/extensions/gsd/notification-overlay.ts +27 -11
- package/src/resources/extensions/gsd/notification-store.ts +5 -4
- 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 +3 -1
- package/src/resources/extensions/gsd/prompts/discuss.md +122 -13
- package/src/resources/extensions/gsd/prompts/execute-task.md +2 -0
- package/src/resources/extensions/gsd/prompts/system.md +1 -1
- package/src/resources/extensions/gsd/prompts/validate-milestone.md +2 -0
- package/src/resources/extensions/gsd/shortcut-defs.ts +8 -1
- 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 +14 -0
- package/src/resources/extensions/gsd/tests/block-db-writes.test.ts +63 -0
- package/src/resources/extensions/gsd/tests/complete-slice-gate-closure.test.ts +167 -0
- package/src/resources/extensions/gsd/tests/definition-io.test.ts +57 -0
- package/src/resources/extensions/gsd/tests/dispatch-guard.test.ts +26 -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/false-degraded-mode-warning.test.ts +104 -0
- package/src/resources/extensions/gsd/tests/format-shortcut.test.ts +16 -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/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/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/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-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 +9 -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 +3 -2
- package/src/resources/extensions/gsd/tests/stale-slice-rows.test.ts +41 -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/dist/web/standalone/.next/static/{cYPZv_bAhZk2ms-Pz6vsY → NzO79SOz9jHX-VY5-0t2O}/_buildManifest.js +0 -0
- /package/dist/web/standalone/.next/static/{cYPZv_bAhZk2ms-Pz6vsY → NzO79SOz9jHX-VY5-0t2O}/_ssgManifest.js +0 -0
package/README.md
CHANGED
|
@@ -40,12 +40,34 @@ One command. Walk away. Come back to a built project with clean git history.
|
|
|
40
40
|
- **isError flag propagation** — workflow tool execution failures now correctly return `isError: true`, so MCP clients can distinguish success from failure.
|
|
41
41
|
- **Multi-round discuss questions** — new-project discuss phase supports multi-round questioning with structured question gates.
|
|
42
42
|
|
|
43
|
-
###
|
|
43
|
+
### Model Selection Hardening
|
|
44
44
|
|
|
45
|
+
- **Unconfigured models blocked** — models without a configured provider are filtered from selection surfaces, preventing dispatch failures.
|
|
46
|
+
- **Provider readiness required** — saved default model selection now verifies the provider is ready before accepting it.
|
|
47
|
+
- **Session override honored** — `/gsd model` selection persists as a session override across all dispatch phases.
|
|
48
|
+
- **Minimal context guard** — model override logic is skipped in minimal command contexts where it doesn't apply.
|
|
49
|
+
|
|
50
|
+
### Auto-Mode Resilience
|
|
51
|
+
|
|
52
|
+
- **Credential cooldown recovery** — auto-mode survives transient 429 rate-limit responses with structured cooldown errors and a bounded retry budget.
|
|
53
|
+
- **Fire-and-forget auto start** — auto start is detached from active turns to prevent blocking.
|
|
54
|
+
- **Scoped forensics** — stuck-loop forensics are now scoped to auto sessions only, preventing false positives in interactive use.
|
|
55
|
+
|
|
56
|
+
### TUI Improvements
|
|
57
|
+
|
|
58
|
+
- **Overlay subscription fix** — resolved overlay subscription lifecycle and `Ctrl+Shift+P` shortcut conflict.
|
|
59
|
+
- **Improved overlays and shortcuts** — GSD overlays, keyboard shortcuts, and notification flows redesigned for consistency.
|
|
45
60
|
- **Pinned output restored** — pinned output bar displays above the editor during tool execution again.
|
|
46
61
|
- **Turn completion cleanup** — pinned latest output is cleared on turn completion, preventing stale output from persisting.
|
|
47
62
|
- **Secure input masking** — extension input values are masked in interactive mode when collecting secrets.
|
|
48
63
|
|
|
64
|
+
### Provider Fixes
|
|
65
|
+
|
|
66
|
+
- **Full OAuth login URLs** — OAuth login URLs are now displayed in full instead of being truncated.
|
|
67
|
+
- **MiniMax bearer auth** — MiniMax Anthropic API requests use proper bearer authentication.
|
|
68
|
+
- **Case-insensitive tool rendering** — renderable tool matching is now case-insensitive, fixing missed tool output.
|
|
69
|
+
- **Headless idle timeout** — idle timeout is kept off during interactive tool execution in headless mode.
|
|
70
|
+
|
|
49
71
|
### Reliability & Internals
|
|
50
72
|
|
|
51
73
|
- **TOCTOU file locking** — race conditions in event log and custom workflow graph file locking are fixed with proper atomic lock acquisition.
|
|
@@ -54,6 +76,9 @@ One command. Walk away. Come back to a built project with clean git history.
|
|
|
54
76
|
- **Model routing transparency** — dynamic routing is skipped for interactive dispatches; model changes are always shown in the banner.
|
|
55
77
|
- **Capability-aware routing (ADR-004)** — full implementation of capability scoring, `before_model_select` hook, and task metadata extraction.
|
|
56
78
|
- **Multi-model provider strategy (ADR-005)** — infrastructure for multi-provider model selection wired into live paths.
|
|
79
|
+
- **Anti-fabrication guardrails** — discuss prompts enforce turn-taking to prevent fabricated user responses.
|
|
80
|
+
- **Milestone worktree cleanup** — merged worktree cleanup uses the milestone branch instead of generic lookups.
|
|
81
|
+
- **Tool cache control** — `cache_control` breakpoints added to tool definitions for improved prompt caching.
|
|
57
82
|
|
|
58
83
|
See the full [Changelog](./CHANGELOG.md) for details on every release.
|
|
59
84
|
|
|
@@ -598,8 +623,10 @@ The best practice for working in teams is to ensure unique milestone names acros
|
|
|
598
623
|
# ── GSD: Runtime / Ephemeral (per-developer, per-session) ──────────────────
|
|
599
624
|
# Crash detection sentinel — PID lock, written per auto-mode session
|
|
600
625
|
.gsd/auto.lock
|
|
601
|
-
# Auto-mode dispatch tracker — prevents re-running completed units
|
|
602
|
-
.gsd/completed-units
|
|
626
|
+
# Auto-mode dispatch tracker — prevents re-running completed units (includes archived per-milestone files)
|
|
627
|
+
.gsd/completed-units*.json
|
|
628
|
+
# State manifest — workflow state for recovery
|
|
629
|
+
.gsd/state-manifest.json
|
|
603
630
|
# Derived state cache — regenerated from plan/roadmap files on disk
|
|
604
631
|
.gsd/STATE.md
|
|
605
632
|
# Per-developer token/cost accumulator
|
|
@@ -612,6 +639,14 @@ The best practice for working in teams is to ensure unique milestone names acros
|
|
|
612
639
|
.gsd/worktrees/
|
|
613
640
|
# Parallel orchestration IPC and worker status
|
|
614
641
|
.gsd/parallel/
|
|
642
|
+
# SQLite database and WAL sidecars — checkpoint state, forensics data
|
|
643
|
+
.gsd/gsd.db*
|
|
644
|
+
# Daily-rotated event journal — structured event log for forensics
|
|
645
|
+
.gsd/journal/
|
|
646
|
+
# Doctor run history — diagnostic check results
|
|
647
|
+
.gsd/doctor-history.jsonl
|
|
648
|
+
# Workflow event log — structured event stream
|
|
649
|
+
.gsd/event-log.jsonl
|
|
615
650
|
# Generated HTML reports (regenerable via /gsd export --html)
|
|
616
651
|
.gsd/reports/
|
|
617
652
|
# Session-specific interrupted-work markers
|
|
@@ -732,6 +767,14 @@ Use expensive models where quality matters (planning, complex execution) and che
|
|
|
732
767
|
|
|
733
768
|
---
|
|
734
769
|
|
|
770
|
+
## Ecosystem
|
|
771
|
+
|
|
772
|
+
| Project | Description |
|
|
773
|
+
| ------- | ----------- |
|
|
774
|
+
| [GSD2 Config Utility](https://github.com/jeremymcs/gsd2-config) | Standalone configuration tool for managing GSD preferences, providers, and API keys |
|
|
775
|
+
|
|
776
|
+
---
|
|
777
|
+
|
|
735
778
|
## Star History
|
|
736
779
|
|
|
737
780
|
<a href="https://star-history.com/#gsd-build/gsd-2&Date">
|
package/dist/cli.js
CHANGED
|
@@ -5,8 +5,7 @@ import { agentDir, sessionsDir, authFilePath } from './app-paths.js';
|
|
|
5
5
|
import { initResources, buildResourceLoader, getNewerManagedResourceVersion } from './resource-loader.js';
|
|
6
6
|
import { ensureManagedTools } from './tool-bootstrap.js';
|
|
7
7
|
import { loadStoredEnvKeys } from './wizard.js';
|
|
8
|
-
import { migratePiCredentials } from './pi-migration.js';
|
|
9
|
-
import { validateConfiguredModel } from './startup-model-validation.js';
|
|
8
|
+
import { migratePiCredentials, getPiDefaultModelAndProvider } from './pi-migration.js';
|
|
10
9
|
import { shouldMigrateAnthropicToClaudeCode } from './provider-migrations.js';
|
|
11
10
|
import { shouldRunOnboarding, runOnboarding } from './onboarding.js';
|
|
12
11
|
import chalk from 'chalk';
|
|
@@ -102,6 +101,41 @@ function parseCliArgs(argv) {
|
|
|
102
101
|
}
|
|
103
102
|
return flags;
|
|
104
103
|
}
|
|
104
|
+
/**
|
|
105
|
+
* Validate the configured default model against the registry and reset it if
|
|
106
|
+
* it no longer exists. Must run AFTER extensions have registered their
|
|
107
|
+
* providers so that extension models (e.g. pi-claude-cli) are visible.
|
|
108
|
+
*/
|
|
109
|
+
function validateConfiguredModel(modelRegistry, settingsManager) {
|
|
110
|
+
const configuredProvider = settingsManager.getDefaultProvider();
|
|
111
|
+
const configuredModel = settingsManager.getDefaultModel();
|
|
112
|
+
const allModels = modelRegistry.getAll();
|
|
113
|
+
const availableModels = modelRegistry.getAvailable();
|
|
114
|
+
const configuredExists = configuredProvider && configuredModel &&
|
|
115
|
+
allModels.some((m) => m.provider === configuredProvider && m.id === configuredModel);
|
|
116
|
+
const configuredAvailable = configuredProvider && configuredModel &&
|
|
117
|
+
availableModels.some((m) => m.provider === configuredProvider && m.id === configuredModel);
|
|
118
|
+
if (!configuredModel || !configuredExists) {
|
|
119
|
+
// Model not configured at all, or removed from registry — pick a fallback.
|
|
120
|
+
// Only fires when the model is genuinely unknown (not just temporarily unavailable).
|
|
121
|
+
const piDefault = getPiDefaultModelAndProvider();
|
|
122
|
+
const preferred = (piDefault
|
|
123
|
+
? availableModels.find((m) => m.provider === piDefault.provider && m.id === piDefault.model)
|
|
124
|
+
: undefined) ||
|
|
125
|
+
availableModels.find((m) => m.provider === 'openai' && m.id === 'gpt-5.4') ||
|
|
126
|
+
availableModels.find((m) => m.provider === 'openai') ||
|
|
127
|
+
availableModels.find((m) => m.provider === 'anthropic' && m.id === 'claude-opus-4-6') ||
|
|
128
|
+
availableModels.find((m) => m.provider === 'anthropic' && m.id.includes('opus')) ||
|
|
129
|
+
availableModels.find((m) => m.provider === 'anthropic') ||
|
|
130
|
+
availableModels[0];
|
|
131
|
+
if (preferred) {
|
|
132
|
+
settingsManager.setDefaultModelAndProvider(preferred.provider, preferred.id);
|
|
133
|
+
}
|
|
134
|
+
}
|
|
135
|
+
if (settingsManager.getDefaultThinkingLevel() !== 'off' && !configuredExists) {
|
|
136
|
+
settingsManager.setDefaultThinkingLevel('off');
|
|
137
|
+
}
|
|
138
|
+
}
|
|
105
139
|
const cliFlags = parseCliArgs(process.argv);
|
|
106
140
|
const isPrintMode = cliFlags.print || cliFlags.mode !== undefined;
|
|
107
141
|
// Early resource-skew check — must run before TTY gate so version mismatch
|
|
@@ -234,6 +268,14 @@ if (cliFlags.messages[0] === 'sessions') {
|
|
|
234
268
|
rl.question(chalk.bold(' Enter session number to resume (or q to quit): '), resolve);
|
|
235
269
|
});
|
|
236
270
|
rl.close();
|
|
271
|
+
// Clean up stdin state left by readline.createInterface().
|
|
272
|
+
// Without this, downstream TUI initialization gets corrupted listeners and exhibits
|
|
273
|
+
// duplicate terminal I/O. Match the pattern used after onboarding cleanup.
|
|
274
|
+
process.stdin.removeAllListeners('data');
|
|
275
|
+
process.stdin.removeAllListeners('keypress');
|
|
276
|
+
if (process.stdin.setRawMode)
|
|
277
|
+
process.stdin.setRawMode(false);
|
|
278
|
+
process.stdin.pause();
|
|
237
279
|
const choice = parseInt(answer, 10);
|
|
238
280
|
if (isNaN(choice) || choice < 1 || choice > toShow.length) {
|
|
239
281
|
process.stderr.write(chalk.dim('Cancelled.\n'));
|
|
@@ -312,8 +354,22 @@ if (!isPrintMode) {
|
|
|
312
354
|
if (!isPrintMode && process.stdout.columns && process.stdout.columns < 40) {
|
|
313
355
|
process.stderr.write(chalk.yellow(`[gsd] Terminal width is ${process.stdout.columns} columns (minimum recommended: 40). Output may be unreadable.\n`));
|
|
314
356
|
}
|
|
315
|
-
// --list-models:
|
|
357
|
+
// --list-models: load extensions so that extension-registered providers (e.g.
|
|
358
|
+
// pi-claude-cli) appear in the listing, then flush their pending registrations
|
|
359
|
+
// into the model registry before printing.
|
|
316
360
|
if (cliFlags.listModels !== undefined) {
|
|
361
|
+
exitIfManagedResourcesAreNewer(agentDir);
|
|
362
|
+
initResources(agentDir);
|
|
363
|
+
const listModelsLoader = new DefaultResourceLoader({
|
|
364
|
+
agentDir,
|
|
365
|
+
additionalExtensionPaths: cliFlags.extensions.length > 0 ? cliFlags.extensions : undefined,
|
|
366
|
+
});
|
|
367
|
+
await listModelsLoader.reload();
|
|
368
|
+
const listModelsExtensions = listModelsLoader.getExtensions();
|
|
369
|
+
for (const { name, config } of listModelsExtensions.runtime.pendingProviderRegistrations) {
|
|
370
|
+
modelRegistry.registerProvider(name, config);
|
|
371
|
+
}
|
|
372
|
+
listModelsExtensions.runtime.pendingProviderRegistrations = [];
|
|
317
373
|
const models = modelRegistry.getAvailable();
|
|
318
374
|
if (models.length === 0) {
|
|
319
375
|
console.log('No models available. Set API keys in environment variables.');
|
|
@@ -453,6 +509,10 @@ if (isPrintMode) {
|
|
|
453
509
|
process.stderr.write(`[gsd] ${prefix}: ${err.error}\n`);
|
|
454
510
|
}
|
|
455
511
|
}
|
|
512
|
+
// Validate configured model now that extension providers are registered.
|
|
513
|
+
// Must run after createAgentSession() which flushes pendingProviderRegistrations
|
|
514
|
+
// so extension models (e.g. pi-claude-cli) are visible in the registry.
|
|
515
|
+
validateConfiguredModel(modelRegistry, settingsManager);
|
|
456
516
|
// Apply --model override if specified
|
|
457
517
|
if (cliFlags.model) {
|
|
458
518
|
const available = modelRegistry.getAvailable();
|
|
@@ -471,6 +531,15 @@ if (isPrintMode) {
|
|
|
471
531
|
if (mode === 'mcp') {
|
|
472
532
|
printStartupTimings();
|
|
473
533
|
const { startMcpServer } = await import('./mcp-server.js');
|
|
534
|
+
// Activate every registered tool before starting the MCP transport.
|
|
535
|
+
// `session.agent.state.tools` is the *active* subset, not the full
|
|
536
|
+
// registry — if we expose only the active set, extension-registered
|
|
537
|
+
// tools (gsd workflow, browser-tools, mac-tools, search-the-web, …)
|
|
538
|
+
// are invisible to MCP clients. Flipping the active set to every
|
|
539
|
+
// known tool name makes `state.tools` mirror the full registry for
|
|
540
|
+
// this MCP session, which is what an external client expects.
|
|
541
|
+
const allToolNames = session.getAllTools().map((t) => t.name);
|
|
542
|
+
session.setActiveToolsByName(allToolNames);
|
|
474
543
|
await startMcpServer({
|
|
475
544
|
tools: session.agent.state.tools ?? [],
|
|
476
545
|
version: process.env.GSD_VERSION || '0.0.0',
|
|
@@ -631,6 +700,10 @@ if (extensionsResult.errors.length > 0) {
|
|
|
631
700
|
process.stderr.write(`[gsd] ${prefix}: ${err.error}\n`);
|
|
632
701
|
}
|
|
633
702
|
}
|
|
703
|
+
// Validate configured model now that extension providers are registered.
|
|
704
|
+
// Must run after createAgentSession() which flushes pendingProviderRegistrations
|
|
705
|
+
// so extension models (e.g. pi-claude-cli) are visible in the registry.
|
|
706
|
+
validateConfiguredModel(modelRegistry, settingsManager);
|
|
634
707
|
// Restore scoped models from settings on startup.
|
|
635
708
|
// The upstream InteractiveMode reads enabledModels from settings when /scoped-models is opened,
|
|
636
709
|
// but doesn't apply them to the session at startup — so Ctrl+P cycles all models instead of
|
package/dist/mcp-server.js
CHANGED
|
@@ -1,10 +1,15 @@
|
|
|
1
|
-
// MCP SDK subpath imports use wildcard exports (./*)
|
|
2
|
-
//
|
|
3
|
-
//
|
|
1
|
+
// MCP SDK subpath imports use wildcard exports (./*) in @modelcontextprotocol/sdk's
|
|
2
|
+
// package.json export map. The wildcard maps "./foo" → "./dist/cjs/foo" (no .js
|
|
3
|
+
// suffix), so bare subpath specifiers like `${MCP_PKG}/server/stdio` resolve to
|
|
4
|
+
// a non-existent file. Historically the workaround (#3603) used createRequire so
|
|
5
|
+
// the CJS resolver could auto-append `.js`; that no longer works with current
|
|
6
|
+
// Node + SDK releases (#3914) — `_require.resolve` also fails with
|
|
7
|
+
// "Cannot find module .../dist/cjs/server/stdio".
|
|
4
8
|
//
|
|
5
|
-
//
|
|
6
|
-
//
|
|
7
|
-
//
|
|
9
|
+
// The reliable convention (matching packages/mcp-server/{server,cli}.ts) is to
|
|
10
|
+
// write the `.js` suffix explicitly on every wildcard subpath. Specifiers are
|
|
11
|
+
// built via a template string so TypeScript's NodeNext resolver treats them as
|
|
12
|
+
// `any` and skips static checking.
|
|
8
13
|
const MCP_PKG = '@modelcontextprotocol/sdk';
|
|
9
14
|
/**
|
|
10
15
|
* Starts a native MCP (Model Context Protocol) server over stdin/stdout.
|
|
@@ -22,7 +27,7 @@ const MCP_PKG = '@modelcontextprotocol/sdk';
|
|
|
22
27
|
*/
|
|
23
28
|
export async function startMcpServer(options) {
|
|
24
29
|
const { tools, version = '0.0.0' } = options;
|
|
25
|
-
const serverMod = await import(`${MCP_PKG}/server`);
|
|
30
|
+
const serverMod = await import(`${MCP_PKG}/server/index.js`);
|
|
26
31
|
const stdioMod = await import(`${MCP_PKG}/server/stdio.js`);
|
|
27
32
|
const typesMod = await import(`${MCP_PKG}/types.js`);
|
|
28
33
|
const Server = serverMod.Server;
|
|
@@ -42,8 +47,14 @@ export async function startMcpServer(options) {
|
|
|
42
47
|
inputSchema: t.parameters,
|
|
43
48
|
})),
|
|
44
49
|
}));
|
|
45
|
-
// tools/call — execute the requested tool and return content blocks
|
|
46
|
-
|
|
50
|
+
// tools/call — execute the requested tool and return content blocks.
|
|
51
|
+
//
|
|
52
|
+
// The MCP SDK passes an `extra` argument to request handlers that includes
|
|
53
|
+
// an AbortSignal scoped to the RPC request (cancelled when the client
|
|
54
|
+
// cancels the tool call or the transport closes). Threading it into
|
|
55
|
+
// AgentTool.execute ensures long-running tools (Bash, WebFetch, grep on
|
|
56
|
+
// huge trees) actually stop when the client gives up on the result.
|
|
57
|
+
server.setRequestHandler(CallToolRequestSchema, async (request, extra) => {
|
|
47
58
|
const { name, arguments: args } = request.params;
|
|
48
59
|
const tool = toolMap.get(name);
|
|
49
60
|
if (!tool) {
|
|
@@ -52,20 +63,32 @@ export async function startMcpServer(options) {
|
|
|
52
63
|
content: [{ type: 'text', text: `Unknown tool: ${name}` }],
|
|
53
64
|
};
|
|
54
65
|
}
|
|
66
|
+
const signal = extra?.signal;
|
|
55
67
|
try {
|
|
56
|
-
const result = await tool.execute(`mcp-${Date.now()}`, args ?? {},
|
|
57
|
-
|
|
58
|
-
//
|
|
68
|
+
const result = await tool.execute(`mcp-${Date.now()}`, args ?? {}, signal, undefined);
|
|
69
|
+
// Convert AgentToolResult content blocks to MCP content format.
|
|
70
|
+
// text and image pass through; any other shape is serialized as text
|
|
71
|
+
// so the client sees the payload rather than an empty response.
|
|
59
72
|
const content = result.content.map((block) => {
|
|
60
73
|
if (block.type === 'text')
|
|
61
74
|
return { type: 'text', text: block.text ?? '' };
|
|
62
|
-
if (block.type === 'image')
|
|
63
|
-
return {
|
|
75
|
+
if (block.type === 'image') {
|
|
76
|
+
return {
|
|
77
|
+
type: 'image',
|
|
78
|
+
data: block.data ?? '',
|
|
79
|
+
mimeType: block.mimeType ?? 'image/png',
|
|
80
|
+
};
|
|
81
|
+
}
|
|
82
|
+
// Preserve unknown block types (resource, resource_link, audio, ...)
|
|
83
|
+
// by stringifying into a text block so clients see the payload.
|
|
64
84
|
return { type: 'text', text: JSON.stringify(block) };
|
|
65
85
|
});
|
|
66
86
|
return { content };
|
|
67
87
|
}
|
|
68
88
|
catch (err) {
|
|
89
|
+
// AbortError from a cancelled tool surfaces as a normal error — MCP
|
|
90
|
+
// clients interpret `isError: true` as a failed call, which is the
|
|
91
|
+
// correct behaviour for a cancelled request.
|
|
69
92
|
const message = err instanceof Error ? err.message : String(err);
|
|
70
93
|
return { isError: true, content: [{ type: 'text', text: message }] };
|
|
71
94
|
}
|
package/dist/onboarding.js
CHANGED
|
@@ -277,6 +277,16 @@ async function runLlmStep(p, pc, authStorage) {
|
|
|
277
277
|
p.log.info('Your Claude subscription will be used for inference. No API key needed.');
|
|
278
278
|
// Store sentinel so hasAuth('claude-code') returns true on future boots
|
|
279
279
|
authStorage.set('claude-code', { type: 'api_key', key: 'cli' });
|
|
280
|
+
// Persist claude-code as the default provider so the startup migration in
|
|
281
|
+
// cli.ts does not need to fire and the user is not left on "anthropic".
|
|
282
|
+
const settingsPath = join(agentDir, 'settings.json');
|
|
283
|
+
try {
|
|
284
|
+
const raw = existsSync(settingsPath) ? JSON.parse(readFileSync(settingsPath, 'utf-8')) : {};
|
|
285
|
+
raw.defaultProvider = 'claude-code';
|
|
286
|
+
mkdirSync(dirname(settingsPath), { recursive: true });
|
|
287
|
+
writeFileSync(settingsPath, JSON.stringify(raw, null, 2), 'utf-8');
|
|
288
|
+
}
|
|
289
|
+
catch { /* non-fatal — startup migration will catch it */ }
|
|
280
290
|
return true;
|
|
281
291
|
}
|
|
282
292
|
// ── Step 2: Which provider? ──────────────────────────────────────────────
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: debugger
|
|
3
|
+
description: Hypothesis-driven bug investigation with root cause analysis
|
|
4
|
+
model: sonnet
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
You are a debugger. Investigate bugs using a systematic, hypothesis-driven approach. Your goal is to find the root cause, not just suppress symptoms.
|
|
8
|
+
|
|
9
|
+
## Process
|
|
10
|
+
|
|
11
|
+
1. **Reproduce**: Understand the symptoms — what happens vs. what should happen
|
|
12
|
+
2. **Hypothesize**: List 2-3 most likely causes based on symptoms
|
|
13
|
+
3. **Investigate**: For each hypothesis, gather evidence (read code, check logs, trace execution)
|
|
14
|
+
4. **Narrow**: Eliminate hypotheses that don't match the evidence
|
|
15
|
+
5. **Root cause**: Identify the actual cause with file:line references
|
|
16
|
+
6. **Fix**: Propose the minimal change that addresses the root cause
|
|
17
|
+
|
|
18
|
+
## Investigation Tools
|
|
19
|
+
|
|
20
|
+
- Read source files at specific line ranges
|
|
21
|
+
- Grep for error messages, function names, variable usage
|
|
22
|
+
- Check git blame for recent changes to suspect areas
|
|
23
|
+
- Read test files to understand expected behavior
|
|
24
|
+
- Run tests to reproduce failures
|
|
25
|
+
|
|
26
|
+
## Output Format
|
|
27
|
+
|
|
28
|
+
## Symptoms
|
|
29
|
+
|
|
30
|
+
What's happening vs. what's expected.
|
|
31
|
+
|
|
32
|
+
## Hypotheses
|
|
33
|
+
|
|
34
|
+
1. **[hypothesis]** — why this could be the cause
|
|
35
|
+
2. **[hypothesis]** — why this could be the cause
|
|
36
|
+
|
|
37
|
+
## Investigation
|
|
38
|
+
|
|
39
|
+
### Hypothesis 1: [name]
|
|
40
|
+
|
|
41
|
+
Evidence gathered, files read, what was found.
|
|
42
|
+
**Verdict:** Confirmed / Eliminated — reason.
|
|
43
|
+
|
|
44
|
+
### Hypothesis 2: [name]
|
|
45
|
+
|
|
46
|
+
(same structure)
|
|
47
|
+
|
|
48
|
+
## Root Cause
|
|
49
|
+
|
|
50
|
+
**File:** `path/to/file.ts:42`
|
|
51
|
+
**Cause:** Clear explanation of the bug.
|
|
52
|
+
**Why it wasn't caught:** Missing test, edge case, etc.
|
|
53
|
+
|
|
54
|
+
## Recommended Fix
|
|
55
|
+
|
|
56
|
+
```typescript
|
|
57
|
+
// minimal fix with explanation
|
|
58
|
+
```
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: doc-writer
|
|
3
|
+
description: Documentation generation from code — API docs, inline comments, READMEs
|
|
4
|
+
model: sonnet
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
You are a documentation specialist. You read code and produce clear, accurate documentation. You write for the reader, not the author — explain what they need to know to use or maintain the code.
|
|
8
|
+
|
|
9
|
+
## Process
|
|
10
|
+
|
|
11
|
+
1. Read the code thoroughly — understand what it does, not just how
|
|
12
|
+
2. Identify the audience — users (API docs), maintainers (inline docs), or newcomers (guides)
|
|
13
|
+
3. Write documentation that answers the reader's actual questions
|
|
14
|
+
4. Verify accuracy — every code reference must match the current implementation
|
|
15
|
+
|
|
16
|
+
## Documentation Types
|
|
17
|
+
|
|
18
|
+
- **API docs**: Function signatures, parameters, return values, examples, error cases
|
|
19
|
+
- **Inline comments**: Explain *why*, not *what* — the code shows what, comments explain intent
|
|
20
|
+
- **Module docs**: What this module does, its public API, and how it fits in the architecture
|
|
21
|
+
- **Guides**: Step-by-step instructions for common tasks with working examples
|
|
22
|
+
|
|
23
|
+
## Quality Rules
|
|
24
|
+
|
|
25
|
+
- Every claim must be verifiable against the current code
|
|
26
|
+
- Examples must be working code, not pseudocode
|
|
27
|
+
- Don't document the obvious — focus on non-obvious behavior, gotchas, and edge cases
|
|
28
|
+
- Keep it concise — more docs isn't better docs
|
|
29
|
+
- Use the project's existing documentation style and format
|
|
30
|
+
|
|
31
|
+
## Output Format
|
|
32
|
+
|
|
33
|
+
## Documentation Plan
|
|
34
|
+
|
|
35
|
+
What to document and for whom.
|
|
36
|
+
|
|
37
|
+
## Documentation
|
|
38
|
+
|
|
39
|
+
(The actual documentation content, formatted appropriately for its type)
|
|
40
|
+
|
|
41
|
+
## Accuracy Check
|
|
42
|
+
|
|
43
|
+
Files referenced and verified against current implementation.
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: git-ops
|
|
3
|
+
description: Conflict resolution, rebase strategy, PR preparation, and changelog generation
|
|
4
|
+
model: sonnet
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
You are a git operations specialist. You handle merge conflicts, plan rebase strategies, prepare pull requests, and generate changelogs. You understand git internals well enough to choose the right strategy for each situation.
|
|
8
|
+
|
|
9
|
+
## Capabilities
|
|
10
|
+
|
|
11
|
+
### Conflict Resolution
|
|
12
|
+
- Analyze conflict markers and understand both sides' intent
|
|
13
|
+
- Choose the correct resolution based on code context, not just recency
|
|
14
|
+
- Verify resolved code compiles and tests pass
|
|
15
|
+
|
|
16
|
+
### Rebase Strategy
|
|
17
|
+
- Assess whether rebase or merge is appropriate for the situation
|
|
18
|
+
- Plan interactive rebase sequences (squash, reorder, edit)
|
|
19
|
+
- Handle complex rebase conflicts with minimal manual intervention
|
|
20
|
+
|
|
21
|
+
### PR Preparation
|
|
22
|
+
- Write clear PR titles and descriptions from commit history
|
|
23
|
+
- Organize commits into logical, reviewable units
|
|
24
|
+
- Ensure CI checks will pass before pushing
|
|
25
|
+
|
|
26
|
+
### Changelog Generation
|
|
27
|
+
- Extract user-facing changes from commit messages and code diffs
|
|
28
|
+
- Categorize changes (features, fixes, breaking changes)
|
|
29
|
+
- Write changelog entries for the target audience (users, not developers)
|
|
30
|
+
|
|
31
|
+
## Process
|
|
32
|
+
|
|
33
|
+
1. Assess the git state — branches, commits, conflicts, divergence
|
|
34
|
+
2. Determine the goal — clean history, resolved conflicts, PR ready
|
|
35
|
+
3. Plan the steps — in order, with rollback points
|
|
36
|
+
4. Execute carefully — verify after each step
|
|
37
|
+
5. Confirm the result — clean history, passing tests
|
|
38
|
+
|
|
39
|
+
## Output Format
|
|
40
|
+
|
|
41
|
+
## Git State
|
|
42
|
+
|
|
43
|
+
Current branch, commits, conflicts, or divergence summary.
|
|
44
|
+
|
|
45
|
+
## Strategy
|
|
46
|
+
|
|
47
|
+
What to do and why this approach.
|
|
48
|
+
|
|
49
|
+
## Steps
|
|
50
|
+
|
|
51
|
+
1. Command or action — with expected outcome
|
|
52
|
+
2. Command or action — with verification
|
|
53
|
+
|
|
54
|
+
## Result
|
|
55
|
+
|
|
56
|
+
Final state after operations complete.
|