gsd-pi 2.71.0 → 2.72.0-dev.593fa74
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 +57 -17
- package/dist/cli.js +29 -3
- 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/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/claude-code-cli/partial-builder.js +40 -12
- package/dist/resources/extensions/claude-code-cli/stream-adapter.js +113 -10
- package/dist/resources/extensions/gsd/auto/infra-errors.js +34 -0
- package/dist/resources/extensions/gsd/auto/loop.js +32 -1
- 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-prompts.js +88 -33
- 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 +56 -0
- package/dist/resources/extensions/gsd/bootstrap/db-tools.js +3 -3
- package/dist/resources/extensions/gsd/bootstrap/register-hooks.js +2 -0
- 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/dashboard-overlay.js +8 -3
- package/dist/resources/extensions/gsd/dispatch-guard.js +18 -1
- package/dist/resources/extensions/gsd/doctor-providers.js +23 -0
- 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/gsd-db.js +41 -0
- package/dist/resources/extensions/gsd/guided-flow.js +5 -10
- 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/prompt-validation.js +126 -0
- package/dist/resources/extensions/gsd/prompts/complete-slice.md +5 -3
- package/dist/resources/extensions/gsd/prompts/discuss.md +2 -0
- 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 +9 -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/ollama/index.js +13 -5
- 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 +1 -1
- 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 +1 -1
- package/dist/web/standalone/.next/server/app/api/terminal/sessions/route_client-reference-manifest.js +1 -1
- package/dist/web/standalone/.next/server/app/api/terminal/stream/route.js +2 -2
- 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/63.js +3 -3
- package/dist/web/standalone/.next/server/chunks/6897.js +1 -1
- package/dist/web/standalone/.next/server/middleware-build-manifest.js +1 -1
- package/dist/web/standalone/.next/server/middleware.js +2 -2
- package/dist/web/standalone/.next/server/next-font-manifest.js +1 -1
- package/dist/web/standalone/.next/server/next-font-manifest.json +1 -1
- package/dist/web/standalone/.next/server/pages/404.html +1 -1
- package/dist/web/standalone/.next/server/pages/500.html +1 -1
- package/dist/web/standalone/.next/server/server-reference-manifest.json +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/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/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-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 +22 -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 +38 -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 +22 -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 +45 -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/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/claude-code-cli/partial-builder.ts +45 -12
- package/src/resources/extensions/claude-code-cli/stream-adapter.ts +122 -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 +189 -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 +45 -1
- 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-prompts.ts +111 -33
- 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 +72 -0
- package/src/resources/extensions/gsd/bootstrap/db-tools.ts +3 -3
- package/src/resources/extensions/gsd/bootstrap/register-hooks.ts +2 -0
- 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/dashboard-overlay.ts +10 -3
- package/src/resources/extensions/gsd/dispatch-guard.ts +18 -1
- package/src/resources/extensions/gsd/doctor-providers.ts +24 -0
- 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/gsd-db.ts +51 -0
- 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/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/prompt-validation.ts +157 -0
- package/src/resources/extensions/gsd/prompts/complete-slice.md +5 -3
- package/src/resources/extensions/gsd/prompts/discuss.md +2 -0
- 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 +13 -2
- 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/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/dispatch-guard.test.ts +27 -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/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-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/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/pre-execution-checks.test.ts +49 -0
- package/src/resources/extensions/gsd/tests/prompt-contracts.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-shortcuts.test.ts +63 -5
- package/src/resources/extensions/gsd/tests/session-model-override.test.ts +35 -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/ollama/index.ts +13 -3
- package/src/resources/extensions/ollama/ollama-status-indicator.test.ts +28 -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/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/dist/web/standalone/.next/static/{nPky_WQC28aBD77eZsRAB → h8B07q4xc-ujHRD7esO6O}/_buildManifest.js +0 -0
- /package/dist/web/standalone/.next/static/{nPky_WQC28aBD77eZsRAB → h8B07q4xc-ujHRD7esO6O}/_ssgManifest.js +0 -0
|
@@ -7,6 +7,27 @@ import { theme } from "../theme/theme.js";
|
|
|
7
7
|
import { DynamicBorder } from "./dynamic-border.js";
|
|
8
8
|
import { keyHint } from "./keybinding-hints.js";
|
|
9
9
|
|
|
10
|
+
function wrapPlainText(text: string, width: number): string[] {
|
|
11
|
+
const lines: string[] = [];
|
|
12
|
+
const safeWidth = Math.max(1, width);
|
|
13
|
+
for (let idx = 0; idx < text.length; idx += safeWidth) {
|
|
14
|
+
lines.push(text.slice(idx, idx + safeWidth));
|
|
15
|
+
}
|
|
16
|
+
return lines.length > 0 ? lines : [""];
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
export function buildAuthUrlPresentation(url: string, terminalColumns: number): {
|
|
20
|
+
displayUrl: string;
|
|
21
|
+
fullUrlLines: string[];
|
|
22
|
+
} {
|
|
23
|
+
const maxUrlWidth = Math.max(20, terminalColumns - 4);
|
|
24
|
+
const displayUrl = truncateToWidth(url, maxUrlWidth);
|
|
25
|
+
return {
|
|
26
|
+
displayUrl,
|
|
27
|
+
fullUrlLines: displayUrl === url ? [] : wrapPlainText(url, maxUrlWidth),
|
|
28
|
+
};
|
|
29
|
+
}
|
|
30
|
+
|
|
10
31
|
/**
|
|
11
32
|
* Login dialog component - replaces editor during OAuth login flow.
|
|
12
33
|
*
|
|
@@ -124,14 +145,21 @@ export class LoginDialogComponent extends Container implements Focusable {
|
|
|
124
145
|
|
|
125
146
|
// Truncate the visible URL text so it never wraps (which would break
|
|
126
147
|
// the OSC 8 hyperlink). The full URL is still the link target.
|
|
127
|
-
const
|
|
128
|
-
const displayUrl = truncateToWidth(url, maxUrlWidth);
|
|
148
|
+
const { displayUrl, fullUrlLines } = buildAuthUrlPresentation(url, this.tui.terminal.columns);
|
|
129
149
|
const urlLink = `\x1b]8;;${url}\x07${theme.fg("accent", displayUrl)}\x1b]8;;\x07`;
|
|
130
150
|
this.contentContainer.addChild(new Text(urlLink, 1, 0));
|
|
131
151
|
|
|
132
152
|
const clickHint = process.platform === "darwin" ? "Cmd+click to open" : "Ctrl+click to open";
|
|
133
153
|
this.contentContainer.addChild(new Text(theme.fg("dim", clickHint), 1, 0));
|
|
134
154
|
|
|
155
|
+
if (fullUrlLines.length > 0) {
|
|
156
|
+
this.contentContainer.addChild(new Spacer(1));
|
|
157
|
+
this.contentContainer.addChild(new Text(theme.fg("dim", "Full URL:"), 1, 0));
|
|
158
|
+
for (const line of fullUrlLines) {
|
|
159
|
+
this.contentContainer.addChild(new Text(theme.fg("dim", line), 1, 0));
|
|
160
|
+
}
|
|
161
|
+
}
|
|
162
|
+
|
|
135
163
|
if (instructions) {
|
|
136
164
|
this.contentContainer.addChild(new Spacer(1));
|
|
137
165
|
this.contentContainer.addChild(new Text(theme.fg("warning", instructions), 1, 0));
|
|
@@ -120,7 +120,12 @@ export class ModelSelectorComponent extends Container implements Focusable {
|
|
|
120
120
|
this.settingsManager = settingsManager;
|
|
121
121
|
this.modelRegistry = modelRegistry;
|
|
122
122
|
this.scopedModels = scopedModels;
|
|
123
|
-
|
|
123
|
+
// Only land in "scoped" view when at least one scoped model has working
|
|
124
|
+
// auth — otherwise the user would see an empty picker (#unconfigured-models).
|
|
125
|
+
const hasReadyScopedModel = scopedModels.some((scoped) =>
|
|
126
|
+
modelRegistry.isProviderRequestReady(scoped.model.provider),
|
|
127
|
+
);
|
|
128
|
+
this.scope = hasReadyScopedModel ? "scoped" : "all";
|
|
124
129
|
this.onSelectCallback = onSelect;
|
|
125
130
|
this.onCancelCallback = onCancel;
|
|
126
131
|
|
|
@@ -215,12 +220,16 @@ export class ModelSelectorComponent extends Container implements Focusable {
|
|
|
215
220
|
}
|
|
216
221
|
|
|
217
222
|
this.allModels = this.sortModelsWithinProvider(models);
|
|
223
|
+
// Scoped models must also be filtered by provider readiness so users
|
|
224
|
+
// can't pick a scoped model whose provider has no API key / OAuth.
|
|
218
225
|
this.scopedModelItems = this.sortModelsWithinProvider(
|
|
219
|
-
this.scopedModels
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
226
|
+
this.scopedModels
|
|
227
|
+
.filter((scoped) => this.modelRegistry.isProviderRequestReady(scoped.model.provider))
|
|
228
|
+
.map((scoped) => ({
|
|
229
|
+
provider: scoped.model.provider,
|
|
230
|
+
id: scoped.model.id,
|
|
231
|
+
model: scoped.model,
|
|
232
|
+
})),
|
|
224
233
|
);
|
|
225
234
|
this.activeModels = this.scope === "scoped" ? this.scopedModelItems : this.allModels;
|
|
226
235
|
this.filteredModels = this.activeModels;
|
|
@@ -51,6 +51,60 @@ function str(value: unknown): string | null {
|
|
|
51
51
|
return null; // Invalid type
|
|
52
52
|
}
|
|
53
53
|
|
|
54
|
+
/**
|
|
55
|
+
* Split a Claude Code MCP tool name (`mcp__<server>__<tool>`) into its parts.
|
|
56
|
+
* Returns null for non-prefixed names. Duplicated from the claude-code-cli
|
|
57
|
+
* extension (parseMcpToolName) so this package doesn't have to import across
|
|
58
|
+
* the resources/extensions boundary.
|
|
59
|
+
*/
|
|
60
|
+
function parseMcpToolName(name: string): { server: string; tool: string } | null {
|
|
61
|
+
if (!name.startsWith("mcp__")) return null;
|
|
62
|
+
const rest = name.slice("mcp__".length);
|
|
63
|
+
const delim = rest.indexOf("__");
|
|
64
|
+
if (delim <= 0 || delim === rest.length - 2) return null;
|
|
65
|
+
return { server: rest.slice(0, delim), tool: rest.slice(delim + 2) };
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
const COMPACT_ARG_VALUE_LIMIT = 60;
|
|
69
|
+
const GENERIC_OUTPUT_PREVIEW_LINES = 10;
|
|
70
|
+
const GENERIC_ARGS_JSON_PREVIEW_LINES = 10;
|
|
71
|
+
|
|
72
|
+
/**
|
|
73
|
+
* Format tool args for the generic-renderer fallback. Produces a one-line
|
|
74
|
+
* `k=v, k=v` summary when every value is a primitive that fits inline; falls
|
|
75
|
+
* back to a truncated JSON dump for structurally complex args.
|
|
76
|
+
*/
|
|
77
|
+
function formatCompactArgs(args: unknown, expanded: boolean): string {
|
|
78
|
+
if (args == null) return "";
|
|
79
|
+
if (typeof args !== "object") return String(args);
|
|
80
|
+
|
|
81
|
+
const entries = Object.entries(args as Record<string, unknown>);
|
|
82
|
+
if (entries.length === 0) return "";
|
|
83
|
+
|
|
84
|
+
const allPrimitive = entries.every(([, value]) => {
|
|
85
|
+
const t = typeof value;
|
|
86
|
+
if (t === "number" || t === "boolean") return true;
|
|
87
|
+
if (t === "string") return (value as string).length <= COMPACT_ARG_VALUE_LIMIT;
|
|
88
|
+
return value == null;
|
|
89
|
+
});
|
|
90
|
+
|
|
91
|
+
if (allPrimitive) {
|
|
92
|
+
return entries
|
|
93
|
+
.map(([key, value]) => {
|
|
94
|
+
if (typeof value === "string") return `${key}=${JSON.stringify(value)}`;
|
|
95
|
+
if (value == null) return `${key}=null`;
|
|
96
|
+
return `${key}=${String(value)}`;
|
|
97
|
+
})
|
|
98
|
+
.join(", ");
|
|
99
|
+
}
|
|
100
|
+
|
|
101
|
+
// Complex args: show truncated JSON.
|
|
102
|
+
const lines = JSON.stringify(args, null, 2).split("\n");
|
|
103
|
+
const maxLines = expanded ? lines.length : GENERIC_ARGS_JSON_PREVIEW_LINES;
|
|
104
|
+
if (lines.length <= maxLines) return lines.join("\n");
|
|
105
|
+
return lines.slice(0, maxLines).join("\n") + "\n...";
|
|
106
|
+
}
|
|
107
|
+
|
|
54
108
|
export interface ToolExecutionOptions {
|
|
55
109
|
showImages?: boolean; // default: true (only used if terminal supports images)
|
|
56
110
|
}
|
|
@@ -325,6 +379,29 @@ export class ToolExecutionComponent extends Container {
|
|
|
325
379
|
this.maybeConvertImagesForKitty();
|
|
326
380
|
}
|
|
327
381
|
|
|
382
|
+
/**
|
|
383
|
+
* Finalize a pending tool call as failed/interrupted while preserving any streamed partial output.
|
|
384
|
+
*/
|
|
385
|
+
completeWithError(message?: string): void {
|
|
386
|
+
this.isPartial = false;
|
|
387
|
+
if (this.result) {
|
|
388
|
+
let content = this.result.content;
|
|
389
|
+
if (message) {
|
|
390
|
+
const alreadyHasMessage = content.some((block) => block.type === "text" && block.text === message);
|
|
391
|
+
if (!alreadyHasMessage) {
|
|
392
|
+
content = [...content, { type: "text", text: message }];
|
|
393
|
+
}
|
|
394
|
+
}
|
|
395
|
+
this.result = { ...this.result, content, isError: true };
|
|
396
|
+
} else {
|
|
397
|
+
this.result = {
|
|
398
|
+
content: message ? [{ type: "text", text: message }] : [],
|
|
399
|
+
isError: true,
|
|
400
|
+
};
|
|
401
|
+
}
|
|
402
|
+
this.updateDisplay();
|
|
403
|
+
}
|
|
404
|
+
|
|
328
405
|
/**
|
|
329
406
|
* Convert non-PNG images to PNG for Kitty graphics protocol.
|
|
330
407
|
* Kitty requires PNG format (f=100), so JPEG/GIF/WebP won't display.
|
|
@@ -652,6 +729,12 @@ export class ToolExecutionComponent extends Container {
|
|
|
652
729
|
text = `${theme.fg("toolTitle", theme.bold("read"))} ${pathDisplay}`;
|
|
653
730
|
|
|
654
731
|
if (this.result) {
|
|
732
|
+
if (this.result.isError) {
|
|
733
|
+
const errorText = this.getTextOutput().trim() || "read failed";
|
|
734
|
+
text += `\n\n${theme.fg("error", errorText)}`;
|
|
735
|
+
return text;
|
|
736
|
+
}
|
|
737
|
+
|
|
655
738
|
const rawOutput = this.getTextOutput();
|
|
656
739
|
// Strip hashline prefixes (e.g. "1#BQ:content") for TUI display
|
|
657
740
|
const output = rawOutput.replace(/^(\s*)\d+#[ZPMQVRWSNKTXJBYH]{2}:/gm, "$1");
|
|
@@ -804,6 +887,12 @@ export class ToolExecutionComponent extends Container {
|
|
|
804
887
|
}
|
|
805
888
|
|
|
806
889
|
if (this.result) {
|
|
890
|
+
if (this.result.isError) {
|
|
891
|
+
const errorText = this.getTextOutput().trim() || "ls failed";
|
|
892
|
+
text += `\n\n${theme.fg("error", errorText)}`;
|
|
893
|
+
return text;
|
|
894
|
+
}
|
|
895
|
+
|
|
807
896
|
const output = this.getTextOutput().trim();
|
|
808
897
|
if (output) {
|
|
809
898
|
const lines = output.split("\n");
|
|
@@ -846,6 +935,12 @@ export class ToolExecutionComponent extends Container {
|
|
|
846
935
|
}
|
|
847
936
|
|
|
848
937
|
if (this.result) {
|
|
938
|
+
if (this.result.isError) {
|
|
939
|
+
const errorText = this.getTextOutput().trim() || "find failed";
|
|
940
|
+
text += `\n\n${theme.fg("error", errorText)}`;
|
|
941
|
+
return text;
|
|
942
|
+
}
|
|
943
|
+
|
|
849
944
|
const output = this.getTextOutput().trim();
|
|
850
945
|
if (output) {
|
|
851
946
|
const lines = output.split("\n");
|
|
@@ -892,6 +987,12 @@ export class ToolExecutionComponent extends Container {
|
|
|
892
987
|
}
|
|
893
988
|
|
|
894
989
|
if (this.result) {
|
|
990
|
+
if (this.result.isError) {
|
|
991
|
+
const errorText = this.getTextOutput().trim() || "grep failed";
|
|
992
|
+
text += `\n\n${theme.fg("error", errorText)}`;
|
|
993
|
+
return text;
|
|
994
|
+
}
|
|
995
|
+
|
|
895
996
|
const output = this.getTextOutput().trim();
|
|
896
997
|
if (output) {
|
|
897
998
|
const lines = output.split("\n");
|
|
@@ -943,19 +1044,37 @@ export class ToolExecutionComponent extends Container {
|
|
|
943
1044
|
}
|
|
944
1045
|
}
|
|
945
1046
|
} else {
|
|
946
|
-
// Generic tool
|
|
947
|
-
|
|
948
|
-
|
|
949
|
-
|
|
950
|
-
|
|
951
|
-
const
|
|
952
|
-
|
|
953
|
-
|
|
1047
|
+
// Generic tool / MCP tool without a registered renderer.
|
|
1048
|
+
// MCP tool names from Claude Code arrive as `mcp__<server>__<tool>`;
|
|
1049
|
+
// render the server prefix in muted style so the tool name reads
|
|
1050
|
+
// cleanly. GSD-registered MCP tools have already had their prefix
|
|
1051
|
+
// stripped upstream in partial-builder.ts and won't reach this branch.
|
|
1052
|
+
const parsed = parseMcpToolName(this.toolName);
|
|
1053
|
+
const displayName = parsed ? parsed.tool : this.toolName;
|
|
1054
|
+
const serverPrefix = parsed ? theme.fg("muted", `${parsed.server}\u00b7`) : "";
|
|
1055
|
+
text = serverPrefix + theme.fg("toolTitle", theme.bold(displayName));
|
|
1056
|
+
|
|
1057
|
+
const argsText = formatCompactArgs(this.args, this.expanded);
|
|
1058
|
+
if (argsText) {
|
|
1059
|
+
if (argsText.includes("\n")) {
|
|
1060
|
+
text += `\n\n${theme.fg("toolOutput", argsText)}`;
|
|
1061
|
+
} else {
|
|
1062
|
+
text += " " + theme.fg("toolOutput", argsText);
|
|
1063
|
+
}
|
|
954
1064
|
}
|
|
955
|
-
|
|
956
|
-
|
|
957
|
-
|
|
958
|
-
|
|
1065
|
+
|
|
1066
|
+
if (this.result) {
|
|
1067
|
+
const output = this.getTextOutput().trim();
|
|
1068
|
+
if (output) {
|
|
1069
|
+
const lines = output.split("\n");
|
|
1070
|
+
const maxLines = this.expanded ? lines.length : GENERIC_OUTPUT_PREVIEW_LINES;
|
|
1071
|
+
const displayLines = lines.slice(0, maxLines);
|
|
1072
|
+
const remaining = lines.length - maxLines;
|
|
1073
|
+
text += `\n\n${displayLines.map((line: string) => theme.fg("toolOutput", line)).join("\n")}`;
|
|
1074
|
+
if (remaining > 0) {
|
|
1075
|
+
text += `${theme.fg("muted", `\n... (${remaining} more lines,`)} ${keyHint("expandTools", "to expand")})`;
|
|
1076
|
+
}
|
|
1077
|
+
}
|
|
959
1078
|
}
|
|
960
1079
|
}
|
|
961
1080
|
|
|
@@ -369,8 +369,13 @@ export async function handleAgentEvent(host: InteractiveModeStateHost & {
|
|
|
369
369
|
if (!errorMessage) {
|
|
370
370
|
errorMessage = host.streamingMessage.errorMessage || "Error";
|
|
371
371
|
}
|
|
372
|
-
|
|
373
|
-
|
|
372
|
+
const pendingComponents = Array.from(host.pendingTools.values());
|
|
373
|
+
if (pendingComponents.length > 0) {
|
|
374
|
+
const [first, ...rest] = pendingComponents;
|
|
375
|
+
first.completeWithError(errorMessage);
|
|
376
|
+
for (const component of rest) {
|
|
377
|
+
component.completeWithError();
|
|
378
|
+
}
|
|
374
379
|
}
|
|
375
380
|
host.pendingTools.clear();
|
|
376
381
|
} else {
|
|
@@ -52,7 +52,12 @@ export async function findExactModelMatch(host: any, searchTerm: string): Promis
|
|
|
52
52
|
|
|
53
53
|
export async function getModelCandidates(host: any): Promise<Model<any>[]> {
|
|
54
54
|
if (host.session.scopedModels.length > 0) {
|
|
55
|
-
|
|
55
|
+
// Filter scoped models by provider auth readiness so callers like
|
|
56
|
+
// findExactModelMatch can't resolve a scoped-but-unconfigured model.
|
|
57
|
+
const registry = host.session.modelRegistry;
|
|
58
|
+
return host.session.scopedModels
|
|
59
|
+
.filter((scoped: any) => registry.isProviderRequestReady(scoped.model.provider))
|
|
60
|
+
.map((scoped: any) => scoped.model);
|
|
56
61
|
}
|
|
57
62
|
|
|
58
63
|
host.session.modelRegistry.refresh();
|
|
@@ -1785,7 +1785,7 @@ export class InteractiveMode {
|
|
|
1785
1785
|
} else if (type === "warning") {
|
|
1786
1786
|
this.showWarning(message);
|
|
1787
1787
|
} else {
|
|
1788
|
-
this.showStatus(message);
|
|
1788
|
+
this.showStatus(message, { append: true });
|
|
1789
1789
|
}
|
|
1790
1790
|
}
|
|
1791
1791
|
|
|
@@ -2052,12 +2052,13 @@ export class InteractiveMode {
|
|
|
2052
2052
|
* If multiple status messages are emitted back-to-back (without anything else being added to the chat),
|
|
2053
2053
|
* we update the previous status line instead of appending new ones to avoid log spam.
|
|
2054
2054
|
*/
|
|
2055
|
-
private showStatus(message: string): void {
|
|
2055
|
+
private showStatus(message: string, options?: { append?: boolean }): void {
|
|
2056
|
+
const append = options?.append ?? false;
|
|
2056
2057
|
const children = this.chatContainer.children;
|
|
2057
2058
|
const last = children.length > 0 ? children[children.length - 1] : undefined;
|
|
2058
2059
|
const secondLast = children.length > 1 ? children[children.length - 2] : undefined;
|
|
2059
2060
|
|
|
2060
|
-
if (last && secondLast && last === this.lastStatusText && secondLast === this.lastStatusSpacer) {
|
|
2061
|
+
if (!append && last && secondLast && last === this.lastStatusText && secondLast === this.lastStatusSpacer) {
|
|
2061
2062
|
this.lastStatusText.setText(theme.fg("dim", message));
|
|
2062
2063
|
this.ui.requestRender();
|
|
2063
2064
|
return;
|
|
@@ -499,12 +499,14 @@ function handleHotkeysCommand(ctx: SlashCommandContext): void {
|
|
|
499
499
|
const suspend = getAppKeyDisplay(ctx.keybindings, "suspend");
|
|
500
500
|
const cycleThinkingLevel = getAppKeyDisplay(ctx.keybindings, "cycleThinkingLevel");
|
|
501
501
|
const cycleModelForward = getAppKeyDisplay(ctx.keybindings, "cycleModelForward");
|
|
502
|
+
const cycleModelBackward = getAppKeyDisplay(ctx.keybindings, "cycleModelBackward");
|
|
502
503
|
const selectModel = getAppKeyDisplay(ctx.keybindings, "selectModel");
|
|
503
504
|
const expandTools = getAppKeyDisplay(ctx.keybindings, "expandTools");
|
|
504
505
|
const toggleThinking = getAppKeyDisplay(ctx.keybindings, "toggleThinking");
|
|
505
506
|
const externalEditor = getAppKeyDisplay(ctx.keybindings, "externalEditor");
|
|
506
507
|
const followUp = getAppKeyDisplay(ctx.keybindings, "followUp");
|
|
507
508
|
const dequeue = getAppKeyDisplay(ctx.keybindings, "dequeue");
|
|
509
|
+
const pasteImage = getAppKeyDisplay(ctx.keybindings, "pasteImage");
|
|
508
510
|
|
|
509
511
|
let hotkeys = `
|
|
510
512
|
**Navigation**
|
|
@@ -540,14 +542,14 @@ function handleHotkeysCommand(ctx: SlashCommandContext): void {
|
|
|
540
542
|
| \`${exit}\` | Exit (when editor is empty) |
|
|
541
543
|
| \`${suspend}\` | Suspend to background |
|
|
542
544
|
| \`${cycleThinkingLevel}\` | Cycle thinking level |
|
|
543
|
-
| \`${cycleModelForward}\` | Cycle models |
|
|
545
|
+
| \`${cycleModelForward}\` / \`${cycleModelBackward}\` | Cycle models |
|
|
544
546
|
| \`${selectModel}\` | Open model selector |
|
|
545
547
|
| \`${expandTools}\` | Toggle tool output expansion |
|
|
546
548
|
| \`${toggleThinking}\` | Toggle thinking block visibility |
|
|
547
549
|
| \`${externalEditor}\` | Edit message in external editor |
|
|
548
550
|
| \`${followUp}\` | Queue follow-up message |
|
|
549
551
|
| \`${dequeue}\` | Restore queued messages |
|
|
550
|
-
| \`
|
|
552
|
+
| \`${pasteImage}\` | Paste image from clipboard |
|
|
551
553
|
| \`/\` | Slash commands |
|
|
552
554
|
| \`!\` | Run bash command |
|
|
553
555
|
| \`!!\` | Run bash command (excluded from context) |
|
package/pkg/package.json
CHANGED
|
@@ -275,7 +275,7 @@ Work flows through these phases. Each phase produces a file.
|
|
|
275
275
|
**How to do it manually:**
|
|
276
276
|
1. Read the roadmap to understand the scope.
|
|
277
277
|
2. Identify 3-5 gray areas — implementation decisions the user cares about.
|
|
278
|
-
3. Use `ask_user_questions` to discuss each area.
|
|
278
|
+
3. Use `ask_user_questions` to discuss each area, one round at a time. Never fabricate user input; wait for the user's actual response before the next round.
|
|
279
279
|
4. Write decisions to the appropriate context file (`M###-CONTEXT.md` or `S##-CONTEXT.md`).
|
|
280
280
|
5. Do NOT discuss how to implement — only what the user wants.
|
|
281
281
|
|
|
@@ -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.
|