gsd-pi 2.63.0-dev.026d309 → 2.63.0-dev.351157b
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +46 -134
- package/dist/cli.js +44 -6
- package/dist/help-text.js +4 -1
- package/dist/onboarding.js +15 -8
- package/dist/resource-loader.js +18 -3
- package/dist/resources/extensions/cmux/index.js +21 -12
- package/dist/resources/extensions/gsd/auto/finalize-timeout.js +40 -0
- package/dist/resources/extensions/gsd/auto/loop.js +4 -0
- package/dist/resources/extensions/gsd/auto/phases.js +123 -22
- package/dist/resources/extensions/gsd/auto/session.js +8 -0
- package/dist/resources/extensions/gsd/auto-dashboard.js +9 -3
- package/dist/resources/extensions/gsd/auto-post-unit.js +45 -10
- package/dist/resources/extensions/gsd/auto-prompts.js +25 -0
- package/dist/resources/extensions/gsd/auto-recovery.js +15 -7
- package/dist/resources/extensions/gsd/auto-start.js +10 -21
- package/dist/resources/extensions/gsd/auto-tool-tracking.js +17 -0
- package/dist/resources/extensions/gsd/auto-worktree.js +13 -7
- package/dist/resources/extensions/gsd/auto.js +19 -2
- package/dist/resources/extensions/gsd/bootstrap/db-tools.js +73 -60
- package/dist/resources/extensions/gsd/bootstrap/dynamic-tools.js +13 -0
- package/dist/resources/extensions/gsd/bootstrap/query-tools.js +85 -0
- package/dist/resources/extensions/gsd/bootstrap/register-extension.js +3 -0
- package/dist/resources/extensions/gsd/bootstrap/register-hooks.js +9 -1
- package/dist/resources/extensions/gsd/bootstrap/sanitize-complete-milestone.js +54 -0
- package/dist/resources/extensions/gsd/commands-handlers.js +9 -4
- package/dist/resources/extensions/gsd/constants.js +42 -0
- package/dist/resources/extensions/gsd/db-writer.js +72 -4
- package/dist/resources/extensions/gsd/forensics.js +20 -4
- package/dist/resources/extensions/gsd/gsd-db.js +64 -17
- package/dist/resources/extensions/gsd/guided-flow.js +19 -0
- package/dist/resources/extensions/gsd/metrics.js +27 -1
- package/dist/resources/extensions/gsd/native-git-bridge.js +5 -3
- package/dist/resources/extensions/gsd/preferences-types.js +1 -0
- package/dist/resources/extensions/gsd/preferences.js +7 -2
- package/dist/resources/extensions/gsd/prompts/complete-milestone.md +2 -0
- package/dist/resources/extensions/gsd/prompts/complete-slice.md +2 -0
- package/dist/resources/extensions/gsd/prompts/doctor-heal.md +1 -0
- package/dist/resources/extensions/gsd/prompts/forensics.md +2 -0
- package/dist/resources/extensions/gsd/prompts/reassess-roadmap.md +2 -0
- package/dist/resources/extensions/gsd/prompts/system.md +1 -0
- package/dist/resources/extensions/gsd/prompts/validate-milestone.md +2 -0
- package/dist/resources/extensions/gsd/roadmap-mutations.js +1 -1
- package/dist/resources/extensions/gsd/roadmap-slices.js +9 -5
- package/dist/resources/extensions/gsd/slice-parallel-conflict.js +67 -0
- package/dist/resources/extensions/gsd/slice-parallel-eligibility.js +51 -0
- package/dist/resources/extensions/gsd/slice-parallel-orchestrator.js +378 -0
- package/dist/resources/extensions/gsd/state.js +74 -14
- package/dist/resources/extensions/gsd/status-guards.js +11 -0
- package/dist/resources/extensions/gsd/tools/complete-milestone.js +17 -12
- package/dist/resources/extensions/gsd/tools/complete-slice.js +40 -26
- package/dist/resources/extensions/gsd/tools/complete-task.js +12 -12
- package/dist/resources/extensions/gsd/tools/plan-milestone.js +33 -25
- package/dist/resources/extensions/gsd/tools/plan-slice.js +5 -8
- package/dist/resources/extensions/gsd/workflow-projections.js +21 -5
- package/dist/resources/extensions/gsd/worktree-manager.js +82 -29
- package/dist/resources/extensions/gsd/worktree-resolver.js +4 -3
- package/dist/resources/extensions/mcp-client/auth.js +101 -0
- package/dist/resources/extensions/mcp-client/index.js +10 -1
- package/dist/resources/extensions/ollama/index.js +6 -12
- package/dist/resources/extensions/ollama/model-capabilities.js +37 -34
- package/dist/resources/extensions/ollama/ndjson-stream.js +54 -0
- package/dist/resources/extensions/ollama/ollama-chat-provider.js +380 -0
- package/dist/resources/extensions/ollama/ollama-client.js +23 -32
- package/dist/resources/extensions/ollama/ollama-discovery.js +2 -7
- package/dist/resources/extensions/ollama/ollama-tool.js +62 -0
- package/dist/resources/extensions/ollama/thinking-parser.js +104 -0
- package/dist/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.html +2 -2
- package/dist/web/standalone/.next/server/app/_global-error.rsc +1 -1
- package/dist/web/standalone/.next/server/app/_global-error.segments/_full.segment.rsc +1 -1
- package/dist/web/standalone/.next/server/app/_global-error.segments/_global-error/__PAGE__.segment.rsc +1 -1
- package/dist/web/standalone/.next/server/app/_global-error.segments/_global-error.segment.rsc +1 -1
- package/dist/web/standalone/.next/server/app/_global-error.segments/_head.segment.rsc +1 -1
- package/dist/web/standalone/.next/server/app/_global-error.segments/_index.segment.rsc +1 -1
- package/dist/web/standalone/.next/server/app/_global-error.segments/_tree.segment.rsc +1 -1
- package/dist/web/standalone/.next/server/app/_not-found.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/boot/route.js.nft.json +1 -1
- package/dist/web/standalone/.next/server/app/api/bridge-terminal/input/route.js +1 -1
- package/dist/web/standalone/.next/server/app/api/bridge-terminal/input/route.js.nft.json +1 -1
- package/dist/web/standalone/.next/server/app/api/bridge-terminal/resize/route.js +1 -1
- package/dist/web/standalone/.next/server/app/api/bridge-terminal/resize/route.js.nft.json +1 -1
- package/dist/web/standalone/.next/server/app/api/bridge-terminal/stream/route.js +2 -2
- package/dist/web/standalone/.next/server/app/api/bridge-terminal/stream/route.js.nft.json +1 -1
- package/dist/web/standalone/.next/server/app/api/captures/route.js +1 -1
- package/dist/web/standalone/.next/server/app/api/captures/route.js.nft.json +1 -1
- package/dist/web/standalone/.next/server/app/api/cleanup/route.js +1 -1
- package/dist/web/standalone/.next/server/app/api/cleanup/route.js.nft.json +1 -1
- package/dist/web/standalone/.next/server/app/api/doctor/route.js +1 -1
- package/dist/web/standalone/.next/server/app/api/doctor/route.js.nft.json +1 -1
- package/dist/web/standalone/.next/server/app/api/export-data/route.js +1 -1
- package/dist/web/standalone/.next/server/app/api/export-data/route.js.nft.json +1 -1
- package/dist/web/standalone/.next/server/app/api/files/route.js +1 -1
- package/dist/web/standalone/.next/server/app/api/files/route.js.nft.json +1 -1
- package/dist/web/standalone/.next/server/app/api/forensics/route.js +1 -1
- package/dist/web/standalone/.next/server/app/api/forensics/route.js.nft.json +1 -1
- package/dist/web/standalone/.next/server/app/api/git/route.js +1 -1
- package/dist/web/standalone/.next/server/app/api/git/route.js.nft.json +1 -1
- package/dist/web/standalone/.next/server/app/api/history/route.js +1 -1
- package/dist/web/standalone/.next/server/app/api/history/route.js.nft.json +1 -1
- package/dist/web/standalone/.next/server/app/api/hooks/route.js +1 -1
- package/dist/web/standalone/.next/server/app/api/hooks/route.js.nft.json +1 -1
- package/dist/web/standalone/.next/server/app/api/inspect/route.js +1 -1
- package/dist/web/standalone/.next/server/app/api/inspect/route.js.nft.json +1 -1
- package/dist/web/standalone/.next/server/app/api/knowledge/route.js +1 -1
- package/dist/web/standalone/.next/server/app/api/knowledge/route.js.nft.json +1 -1
- package/dist/web/standalone/.next/server/app/api/live-state/route.js +1 -1
- package/dist/web/standalone/.next/server/app/api/live-state/route.js.nft.json +1 -1
- package/dist/web/standalone/.next/server/app/api/onboarding/route.js +1 -1
- package/dist/web/standalone/.next/server/app/api/onboarding/route.js.nft.json +1 -1
- package/dist/web/standalone/.next/server/app/api/projects/route.js +1 -1
- package/dist/web/standalone/.next/server/app/api/projects/route.js.nft.json +1 -1
- package/dist/web/standalone/.next/server/app/api/recovery/route.js +1 -1
- package/dist/web/standalone/.next/server/app/api/recovery/route.js.nft.json +1 -1
- package/dist/web/standalone/.next/server/app/api/session/browser/route.js +1 -1
- package/dist/web/standalone/.next/server/app/api/session/browser/route.js.nft.json +1 -1
- package/dist/web/standalone/.next/server/app/api/session/command/route.js +1 -1
- package/dist/web/standalone/.next/server/app/api/session/command/route.js.nft.json +1 -1
- package/dist/web/standalone/.next/server/app/api/session/events/route.js +2 -2
- package/dist/web/standalone/.next/server/app/api/session/events/route.js.nft.json +1 -1
- package/dist/web/standalone/.next/server/app/api/session/manage/route.js +1 -1
- package/dist/web/standalone/.next/server/app/api/session/manage/route.js.nft.json +1 -1
- package/dist/web/standalone/.next/server/app/api/settings-data/route.js +1 -1
- package/dist/web/standalone/.next/server/app/api/settings-data/route.js.nft.json +1 -1
- package/dist/web/standalone/.next/server/app/api/skill-health/route.js +1 -1
- package/dist/web/standalone/.next/server/app/api/skill-health/route.js.nft.json +1 -1
- package/dist/web/standalone/.next/server/app/api/steer/route.js +1 -1
- package/dist/web/standalone/.next/server/app/api/steer/route.js.nft.json +1 -1
- package/dist/web/standalone/.next/server/app/api/switch-root/route.js +1 -1
- package/dist/web/standalone/.next/server/app/api/switch-root/route.js.nft.json +1 -1
- package/dist/web/standalone/.next/server/app/api/terminal/sessions/route.js +2 -2
- package/dist/web/standalone/.next/server/app/api/terminal/sessions/route.js.nft.json +1 -1
- package/dist/web/standalone/.next/server/app/api/terminal/stream/route.js +2 -2
- package/dist/web/standalone/.next/server/app/api/terminal/stream/route.js.nft.json +1 -1
- package/dist/web/standalone/.next/server/app/api/undo/route.js +1 -1
- package/dist/web/standalone/.next/server/app/api/undo/route.js.nft.json +1 -1
- package/dist/web/standalone/.next/server/app/api/visualizer/route.js +1 -1
- package/dist/web/standalone/.next/server/app/api/visualizer/route.js.nft.json +1 -1
- package/dist/web/standalone/.next/server/app/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-paths-manifest.json +14 -14
- package/dist/web/standalone/.next/server/chunks/6897.js +12 -0
- package/dist/web/standalone/.next/server/pages/404.html +1 -1
- package/dist/web/standalone/.next/server/pages/500.html +2 -2
- package/dist/web/standalone/.next/server/server-reference-manifest.json +1 -1
- package/package.json +1 -1
- package/packages/pi-agent-core/dist/agent-loop.d.ts +8 -0
- package/packages/pi-agent-core/dist/agent-loop.d.ts.map +1 -1
- package/packages/pi-agent-core/dist/agent-loop.js +50 -0
- package/packages/pi-agent-core/dist/agent-loop.js.map +1 -1
- package/packages/pi-agent-core/src/agent-loop.test.ts +221 -5
- package/packages/pi-agent-core/src/agent-loop.ts +53 -0
- package/packages/pi-ai/dist/types.d.ts +16 -1
- package/packages/pi-ai/dist/types.d.ts.map +1 -1
- package/packages/pi-ai/dist/types.js.map +1 -1
- package/packages/pi-ai/src/types.ts +18 -1
- package/packages/pi-coding-agent/dist/core/auth-storage.d.ts +9 -0
- package/packages/pi-coding-agent/dist/core/auth-storage.d.ts.map +1 -1
- package/packages/pi-coding-agent/dist/core/auth-storage.js +50 -1
- package/packages/pi-coding-agent/dist/core/auth-storage.js.map +1 -1
- package/packages/pi-coding-agent/dist/core/auth-storage.test.js +41 -0
- package/packages/pi-coding-agent/dist/core/auth-storage.test.js.map +1 -1
- package/packages/pi-coding-agent/dist/core/extensions/loader.d.ts +7 -0
- package/packages/pi-coding-agent/dist/core/extensions/loader.d.ts.map +1 -1
- package/packages/pi-coding-agent/dist/core/extensions/loader.js +31 -4
- package/packages/pi-coding-agent/dist/core/extensions/loader.js.map +1 -1
- package/packages/pi-coding-agent/dist/core/extensions/loader.test.js +28 -1
- package/packages/pi-coding-agent/dist/core/extensions/loader.test.js.map +1 -1
- package/packages/pi-coding-agent/dist/core/extensions/types.d.ts +2 -0
- package/packages/pi-coding-agent/dist/core/extensions/types.d.ts.map +1 -1
- package/packages/pi-coding-agent/dist/core/extensions/types.js.map +1 -1
- package/packages/pi-coding-agent/dist/core/model-registry.d.ts +1 -0
- package/packages/pi-coding-agent/dist/core/model-registry.d.ts.map +1 -1
- package/packages/pi-coding-agent/dist/core/model-registry.js +1 -0
- package/packages/pi-coding-agent/dist/core/model-registry.js.map +1 -1
- package/packages/pi-coding-agent/dist/core/model-resolver.js +3 -3
- package/packages/pi-coding-agent/dist/core/model-resolver.js.map +1 -1
- package/packages/pi-coding-agent/dist/core/resource-loader.d.ts +23 -1
- package/packages/pi-coding-agent/dist/core/resource-loader.d.ts.map +1 -1
- package/packages/pi-coding-agent/dist/core/resource-loader.js +80 -56
- package/packages/pi-coding-agent/dist/core/resource-loader.js.map +1 -1
- package/packages/pi-coding-agent/dist/core/sdk.d.ts.map +1 -1
- package/packages/pi-coding-agent/dist/core/sdk.js +10 -0
- package/packages/pi-coding-agent/dist/core/sdk.js.map +1 -1
- package/packages/pi-coding-agent/src/core/auth-storage.test.ts +53 -0
- package/packages/pi-coding-agent/src/core/auth-storage.ts +66 -1
- package/packages/pi-coding-agent/src/core/extensions/loader.test.ts +39 -1
- package/packages/pi-coding-agent/src/core/extensions/loader.ts +34 -4
- package/packages/pi-coding-agent/src/core/extensions/types.ts +2 -0
- package/packages/pi-coding-agent/src/core/model-registry.ts +2 -0
- package/packages/pi-coding-agent/src/core/model-resolver.ts +3 -3
- package/packages/pi-coding-agent/src/core/resource-loader.ts +89 -56
- package/packages/pi-coding-agent/src/core/sdk.ts +11 -0
- package/src/resources/extensions/cmux/index.ts +18 -12
- package/src/resources/extensions/gsd/auto/finalize-timeout.ts +46 -0
- package/src/resources/extensions/gsd/auto/loop.ts +5 -0
- package/src/resources/extensions/gsd/auto/phases.ts +156 -34
- package/src/resources/extensions/gsd/auto/session.ts +9 -0
- package/src/resources/extensions/gsd/auto-dashboard.ts +11 -3
- package/src/resources/extensions/gsd/auto-post-unit.ts +53 -12
- package/src/resources/extensions/gsd/auto-prompts.ts +21 -0
- package/src/resources/extensions/gsd/auto-recovery.ts +9 -8
- package/src/resources/extensions/gsd/auto-start.ts +11 -20
- package/src/resources/extensions/gsd/auto-tool-tracking.ts +19 -0
- package/src/resources/extensions/gsd/auto-worktree.ts +14 -6
- package/src/resources/extensions/gsd/auto.ts +22 -1
- package/src/resources/extensions/gsd/bootstrap/db-tools.ts +74 -60
- package/src/resources/extensions/gsd/bootstrap/dynamic-tools.ts +15 -0
- package/src/resources/extensions/gsd/bootstrap/query-tools.ts +98 -0
- package/src/resources/extensions/gsd/bootstrap/register-extension.ts +4 -0
- package/src/resources/extensions/gsd/bootstrap/register-hooks.ts +9 -1
- package/src/resources/extensions/gsd/bootstrap/sanitize-complete-milestone.ts +57 -0
- package/src/resources/extensions/gsd/commands-handlers.ts +10 -4
- package/src/resources/extensions/gsd/constants.ts +44 -0
- package/src/resources/extensions/gsd/db-writer.ts +78 -4
- package/src/resources/extensions/gsd/forensics.ts +21 -5
- package/src/resources/extensions/gsd/gsd-db.ts +64 -17
- package/src/resources/extensions/gsd/guided-flow.ts +22 -0
- package/src/resources/extensions/gsd/metrics.ts +28 -1
- package/src/resources/extensions/gsd/native-git-bridge.ts +5 -3
- package/src/resources/extensions/gsd/preferences-types.ts +3 -0
- package/src/resources/extensions/gsd/preferences.ts +9 -2
- package/src/resources/extensions/gsd/prompts/complete-milestone.md +2 -0
- package/src/resources/extensions/gsd/prompts/complete-slice.md +2 -0
- package/src/resources/extensions/gsd/prompts/doctor-heal.md +1 -0
- package/src/resources/extensions/gsd/prompts/forensics.md +2 -0
- package/src/resources/extensions/gsd/prompts/reassess-roadmap.md +2 -0
- package/src/resources/extensions/gsd/prompts/system.md +1 -0
- package/src/resources/extensions/gsd/prompts/validate-milestone.md +2 -0
- package/src/resources/extensions/gsd/roadmap-mutations.ts +1 -1
- package/src/resources/extensions/gsd/roadmap-slices.ts +10 -5
- package/src/resources/extensions/gsd/slice-parallel-conflict.ts +86 -0
- package/src/resources/extensions/gsd/slice-parallel-eligibility.ts +73 -0
- package/src/resources/extensions/gsd/slice-parallel-orchestrator.ts +477 -0
- package/src/resources/extensions/gsd/state.ts +67 -12
- package/src/resources/extensions/gsd/status-guards.ts +13 -0
- package/src/resources/extensions/gsd/tests/artifact-corruption-2630.test.ts +288 -0
- package/src/resources/extensions/gsd/tests/auto-loop.test.ts +34 -13
- package/src/resources/extensions/gsd/tests/cmux.test.ts +58 -0
- package/src/resources/extensions/gsd/tests/cold-resume-db-reopen.test.ts +51 -0
- package/src/resources/extensions/gsd/tests/complete-milestone.test.ts +140 -0
- package/src/resources/extensions/gsd/tests/complete-task.test.ts +39 -0
- package/src/resources/extensions/gsd/tests/dashboard-model-label-ordering.test.ts +107 -0
- package/src/resources/extensions/gsd/tests/db-access-guardrails.test.ts +109 -0
- package/src/resources/extensions/gsd/tests/db-path-worktree-symlink.test.ts +13 -9
- package/src/resources/extensions/gsd/tests/db-writer.test.ts +134 -0
- package/src/resources/extensions/gsd/tests/deferred-slice-dispatch.test.ts +203 -0
- package/src/resources/extensions/gsd/tests/discuss-tool-scoping.test.ts +130 -0
- package/src/resources/extensions/gsd/tests/doctor-fix-flag.test.ts +92 -0
- package/src/resources/extensions/gsd/tests/finalize-timeout-guard.test.ts +116 -0
- package/src/resources/extensions/gsd/tests/forensics-stuck-loops.test.ts +103 -0
- package/src/resources/extensions/gsd/tests/insert-slice-no-wipe.test.ts +88 -0
- package/src/resources/extensions/gsd/tests/integration/git-service.test.ts +27 -7
- package/src/resources/extensions/gsd/tests/integration/idle-recovery.test.ts +34 -0
- package/src/resources/extensions/gsd/tests/metrics.test.ts +116 -1
- package/src/resources/extensions/gsd/tests/milestone-status-tool.test.ts +201 -0
- package/src/resources/extensions/gsd/tests/plan-milestone-title.test.ts +2 -1
- package/src/resources/extensions/gsd/tests/plan-milestone.test.ts +82 -18
- package/src/resources/extensions/gsd/tests/preferences.test.ts +10 -0
- package/src/resources/extensions/gsd/tests/prompt-contracts.test.ts +25 -0
- package/src/resources/extensions/gsd/tests/roadmap-slices.test.ts +69 -0
- package/src/resources/extensions/gsd/tests/shared-wal.test.ts +30 -0
- package/src/resources/extensions/gsd/tests/slice-context-injection.test.ts +50 -0
- package/src/resources/extensions/gsd/tests/slice-parallel-conflict.test.ts +92 -0
- package/src/resources/extensions/gsd/tests/slice-parallel-eligibility.test.ts +95 -0
- package/src/resources/extensions/gsd/tests/slice-parallel-orchestrator.test.ts +83 -0
- package/src/resources/extensions/gsd/tests/tool-invocation-error-loop-break.test.ts +103 -0
- package/src/resources/extensions/gsd/tests/tool-param-optionality.test.ts +349 -0
- package/src/resources/extensions/gsd/tests/worktree-health-dispatch.test.ts +35 -2
- package/src/resources/extensions/gsd/tests/worktree-health-monorepo.test.ts +73 -0
- package/src/resources/extensions/gsd/tests/worktree-resolver.test.ts +34 -0
- package/src/resources/extensions/gsd/tests/worktree-submodule-safety.test.ts +1 -1
- package/src/resources/extensions/gsd/tests/worktree-teardown-safety.test.ts +148 -0
- package/src/resources/extensions/gsd/tools/complete-milestone.ts +34 -20
- package/src/resources/extensions/gsd/tools/complete-slice.ts +41 -26
- package/src/resources/extensions/gsd/tools/complete-task.ts +12 -12
- package/src/resources/extensions/gsd/tools/plan-milestone.ts +55 -30
- package/src/resources/extensions/gsd/tools/plan-slice.ts +13 -8
- package/src/resources/extensions/gsd/types.ts +44 -22
- package/src/resources/extensions/gsd/workflow-projections.ts +23 -5
- package/src/resources/extensions/gsd/worktree-manager.ts +76 -28
- package/src/resources/extensions/gsd/worktree-resolver.ts +4 -3
- package/src/resources/extensions/mcp-client/auth.ts +149 -0
- package/src/resources/extensions/mcp-client/index.ts +16 -1
- package/src/resources/extensions/ollama/index.ts +6 -14
- package/src/resources/extensions/ollama/model-capabilities.ts +41 -34
- package/src/resources/extensions/ollama/ndjson-stream.ts +63 -0
- package/src/resources/extensions/ollama/ollama-chat-provider.ts +459 -0
- package/src/resources/extensions/ollama/ollama-client.ts +30 -30
- package/src/resources/extensions/ollama/ollama-discovery.ts +5 -8
- package/src/resources/extensions/ollama/ollama-tool.ts +69 -0
- package/src/resources/extensions/ollama/tests/ollama-discovery.test.ts +0 -27
- package/src/resources/extensions/ollama/thinking-parser.ts +116 -0
- package/src/resources/extensions/ollama/types.ts +23 -0
- package/dist/web/standalone/.next/server/chunks/2229.js +0 -12
- /package/dist/web/standalone/.next/static/{TTlAguZQ5vR9EOv6G8cel → QmuF-eAbuU_2MQ03t38qr}/_buildManifest.js +0 -0
- /package/dist/web/standalone/.next/static/{TTlAguZQ5vR9EOv6G8cel → QmuF-eAbuU_2MQ03t38qr}/_ssgManifest.js +0 -0
package/README.md
CHANGED
|
@@ -27,152 +27,59 @@ One command. Walk away. Come back to a built project with clean git history.
|
|
|
27
27
|
|
|
28
28
|
---
|
|
29
29
|
|
|
30
|
-
## What's New in v2.
|
|
30
|
+
## What's New in v2.63.0
|
|
31
31
|
|
|
32
|
-
###
|
|
32
|
+
### MCP Server & Integrations
|
|
33
33
|
|
|
34
|
-
- **
|
|
35
|
-
- **
|
|
36
|
-
- **
|
|
34
|
+
- **MCP server** — 6 read-only project state tools for external integrations, auto-wrapup guard, and question dedup.
|
|
35
|
+
- **Ollama extension** — first-class local LLM support via Ollama, with dynamic routing enabled by default.
|
|
36
|
+
- **Discord bot & daemon** — dedicated daemon package, Discord bot with 6 discord.js shard event listeners, and headless text mode with tool calls.
|
|
37
37
|
|
|
38
|
-
###
|
|
38
|
+
### Intelligent Model Routing
|
|
39
39
|
|
|
40
|
-
- **Capability-
|
|
40
|
+
- **Capability-aware model routing (ADR-004)** — capability scoring, `before_model_select` hook, and task metadata extraction replace pattern-based model selection.
|
|
41
|
+
- **Stop/backtrack capture classifications** — context optimization with model routing and masking.
|
|
41
42
|
|
|
42
|
-
###
|
|
43
|
+
### VS Code & TUI
|
|
43
44
|
|
|
44
|
-
-
|
|
45
|
-
-
|
|
46
|
-
- **
|
|
47
|
-
- **Comprehensive SQLite audit** — indexes, caching, safety, and reconciliation fixes across gsd-db.
|
|
48
|
-
- **Unified error classifier** — three overlapping error classifiers consolidated into a single classify-decide-act pipeline.
|
|
45
|
+
- **VS Code sidebar redesign** — SCM provider, checkpoints, diagnostics panel, activity feed, workflow controls, session forking, and enhanced code lens.
|
|
46
|
+
- **`/gsd parallel watch`** — native TUI overlay for real-time worker monitoring.
|
|
47
|
+
- **Real-time TUI monitor dashboard** — self-healing dashboard with colorized headless verbose output.
|
|
49
48
|
|
|
50
|
-
###
|
|
49
|
+
### Agent & Auto-Mode
|
|
51
50
|
|
|
52
|
-
-
|
|
53
|
-
- **
|
|
54
|
-
-
|
|
55
|
-
- **
|
|
56
|
-
- **
|
|
57
|
-
- **Docker overhaul** — fragile setup replaced with proven container patterns. (#2716)
|
|
58
|
-
- **Windows** — EINVAL prevented by disabling detached process groups on Win32. (#2744)
|
|
59
|
-
- **Audit log** — `setLogBasePath` wired into engine init to resurrect audit logging. (#2745)
|
|
51
|
+
- **`/btw` skill** — ephemeral side questions without interrupting the main workflow.
|
|
52
|
+
- **Codebase map** — automatic codebase map injection for fresh agent contexts.
|
|
53
|
+
- **`--resume` flag** — resume previous sessions from the CLI.
|
|
54
|
+
- **Concurrent invocation guard** — prevents overlapping auto-mode runs with parallel worker reliability improvements.
|
|
55
|
+
- **Safety mechanisms on by default** — snapshots and pre-merge checks enabled out of the box.
|
|
60
56
|
|
|
61
|
-
###
|
|
57
|
+
### Infrastructure & Performance
|
|
62
58
|
|
|
63
|
-
-
|
|
64
|
-
- **
|
|
65
|
-
- **
|
|
66
|
-
- **
|
|
59
|
+
- **Topological sort for extensions** — correct load ordering for dependent extensions.
|
|
60
|
+
- **Headless integration hardening** — real-time streaming, verbose output, and observability improvements across v2.54–v2.55.
|
|
61
|
+
- **GLM-5.1 model** — new model support added.
|
|
62
|
+
- **80+ bug fixes** — worktree safety, parallel mode scoping, state corruption, and more.
|
|
67
63
|
|
|
68
|
-
|
|
64
|
+
See the full [Changelog](./CHANGELOG.md) for details on every release.
|
|
69
65
|
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
### v2.49.0 — Git Trailers & Yolo Mode
|
|
74
|
-
|
|
75
|
-
- **`--yolo` flag** — `/gsd auto --yolo` for non-interactive project init.
|
|
76
|
-
- **Git trailers** — GSD metadata moved from commit subject scopes to git trailers.
|
|
77
|
-
|
|
78
|
-
### v2.48.0 — Forensics & Discussion
|
|
79
|
-
|
|
80
|
-
- **`/gsd discuss` for queued milestones** — target milestones still in the queue. (#2349)
|
|
81
|
-
- **Enhanced forensics** — journal and activity log awareness added to `/gsd forensics`.
|
|
82
|
-
|
|
83
|
-
### v2.47.0 — External Providers
|
|
84
|
-
|
|
85
|
-
- **External tool execution mode** — `externalToolExecution` mode for external providers in agent-core.
|
|
86
|
-
- **Claude Code CLI provider** — new provider extension for Claude Code CLI. (#2382)
|
|
87
|
-
|
|
88
|
-
### Previous highlights (v2.42–v2.46)
|
|
89
|
-
|
|
90
|
-
- **Single-writer state engine** — disciplined state transitions with machine guards, actor identity, reversibility, and TOCTOU hardening. (#2494)
|
|
91
|
-
- **`/gsd rethink`** — conversational project reorganization. (#2459)
|
|
92
|
-
- **`/gsd mcp`** — MCP server status and connectivity. (#2362)
|
|
93
|
-
- **Complete offline mode** — fully offline with local models. (#2429)
|
|
94
|
-
- **Global KNOWLEDGE.md injection** — cross-project knowledge via `~/.gsd/agent/KNOWLEDGE.md`. (#2331)
|
|
95
|
-
- **Mobile-responsive web UI** — browser interface works on phones and tablets. (#2354)
|
|
96
|
-
- **Default isolation mode changed to `none`** — set `git.isolation: worktree` explicitly if needed. (#2481)
|
|
97
|
-
- **Non-API-key provider extensions** — support for Claude Code CLI and similar providers. (#2382)
|
|
98
|
-
- **Docker sandbox template** — official Docker template for isolated auto mode. (#2360)
|
|
99
|
-
- **DB-backed planning tools** — write-side state transitions use atomic SQLite tool calls. (#2141)
|
|
100
|
-
- **Declarative workflow engine** — YAML workflows through auto-loop. (#2024)
|
|
101
|
-
- **`/gsd fast`** — toggle service tier for prioritized API routing. (#1862)
|
|
102
|
-
|
|
103
|
-
---
|
|
104
|
-
|
|
105
|
-
## What's New in v2.41.0
|
|
106
|
-
|
|
107
|
-
### New Features
|
|
108
|
-
|
|
109
|
-
- **Browser-based web interface** — run GSD from the browser with `gsd --web`. Full project management, real-time progress, and multi-project support via server-sent events. (#1717)
|
|
110
|
-
- **Doctor: worktree lifecycle checks** — `/gsd doctor` now validates worktree health, detects orphaned worktrees, consolidates cleanup, and enhances `/worktree list` with lifecycle status. (#1814)
|
|
111
|
-
- **CI: docs-only PR detection** — PRs that only change documentation skip build and test steps, with a new prompt injection scan for security. (#1699)
|
|
112
|
-
- **Custom Models guide** — new documentation for adding custom providers (Ollama, vLLM, LM Studio, proxies) via `models.json`. (#1670)
|
|
113
|
-
|
|
114
|
-
### Data Loss Prevention (Critical Fixes)
|
|
115
|
-
|
|
116
|
-
This release includes 7 fixes preventing silent data loss in auto-mode:
|
|
117
|
-
|
|
118
|
-
- **Hallucination guard** — execute-task agents that complete with zero tool calls are now rejected as hallucinated. Previously, agents could produce detailed but fabricated summaries without writing any code, wasting ~$25/milestone. (#1838)
|
|
119
|
-
- **Merge anchor verification** — before deleting a milestone worktree/branch, GSD now verifies the code is actually on the integration branch. Prevents orphaning commits when squash-merge produces an empty diff. (#1829)
|
|
120
|
-
- **Dirty working tree detection** — `nativeMergeSquash` now distinguishes dirty-tree rejections from content conflicts, preventing silent commit loss when synced `.gsd/` files block the merge. (#1752)
|
|
121
|
-
- **Doctor cleanup safety** — the `orphaned_completed_units` check no longer auto-fixes during post-task health checks. Previously, timing races could cause the doctor to remove valid completion keys, reverting users to earlier tasks. (#1825)
|
|
122
|
-
- **Root file reverse-sync** — worktree teardown now syncs root-level `.gsd/` files (PROJECT.md, REQUIREMENTS.md, completed-units.json) back to the project root. Previously these were lost on milestone closeout. (#1831)
|
|
123
|
-
- **Empty merge guard** — milestone branches with unanchored code changes are preserved instead of deleted when squash-merge produces nothing to commit. (#1755)
|
|
124
|
-
- **Crash-safe task closeout** — orphaned checkboxes in PLAN.md are unchecked on retry, preventing phantom task completion. (#1759)
|
|
125
|
-
|
|
126
|
-
### Auto-Mode Stability
|
|
127
|
-
|
|
128
|
-
- **Terminal hang fix** — `stopAuto()` now resolves pending promises, preventing the terminal from freezing permanently after stopping auto-mode. (#1818)
|
|
129
|
-
- **Signal handler coverage** — SIGHUP and SIGINT now clean up lock files, not just SIGTERM. Prevents stranded locks on VS-Code crash. (#1821)
|
|
130
|
-
- **Needs-discussion routing** — milestones in `needs-discussion` phase now route to the smart entry UI instead of hard-stopping, breaking the infinite loop. (#1820)
|
|
131
|
-
- **Infrastructure error handling** — auto-mode stops immediately on ENOSPC, ENOMEM, and similar unrecoverable errors instead of retrying. (#1780)
|
|
132
|
-
- **Dependency-aware dispatch** — slice dispatch now uses declared `depends_on` instead of positional ordering. (#1770)
|
|
133
|
-
- **Queue mode depth verification** — the write gate now processes depth verification in queue mode, fixing a deadlock where CONTEXT.md writes were permanently blocked. (#1823)
|
|
134
|
-
|
|
135
|
-
### Roadmap Parser Improvements
|
|
136
|
-
|
|
137
|
-
- **Table format support** — roadmaps using markdown tables (`| S01 | Title | Risk | Status |`) are now parsed correctly. (#1741)
|
|
138
|
-
- **Prose header fallback** — when `## Slices` contains H3 headers instead of checkboxes, the prose parser is invoked as a fallback. (#1744)
|
|
139
|
-
- **Completion marker detection** — prose headers with `✓` or `(Complete)` markers are correctly identified as done. (#1816)
|
|
140
|
-
- **Zero-slice stub handling** — stub roadmaps from `/gsd queue` return `pre-planning` instead of `blocked`. (#1826)
|
|
141
|
-
- **Immediate roadmap fix** — roadmap checkbox and UAT stub are fixed immediately after last task instead of deferring to `complete-slice`. (#1819)
|
|
142
|
-
|
|
143
|
-
### State & Git Improvements
|
|
144
|
-
|
|
145
|
-
- **CONTEXT-DRAFT.md fallback** — `depends_on` is read from CONTEXT-DRAFT.md when CONTEXT.md doesn't exist, preventing draft milestones from being promoted past dependency constraints. (#1743)
|
|
146
|
-
- **Unborn branch support** — `nativeBranchExists` handles repos with zero commits, preventing dispatch deadlock on new repos. (#1815)
|
|
147
|
-
- **Ghost milestone detection** — empty `.gsd/milestones/` directories are skipped instead of crashing `deriveState()`. (#1817)
|
|
148
|
-
- **Default branch detection** — milestone merge detects `master` vs `main` instead of hardcoding. (#1669)
|
|
149
|
-
- **Milestone title extraction** — titles are pulled from CONTEXT.md headings when no ROADMAP exists. (#1729)
|
|
150
|
-
|
|
151
|
-
### Windows & Platform
|
|
152
|
-
|
|
153
|
-
- **Windows path handling** — 8.3 short paths, `pathToFileURL` for ESM imports, and `realpathSync.native` fixes across the test suite and verification gate. (#1804)
|
|
154
|
-
- **DEP0190 fix** — `spawnSync` deprecation warning eliminated by passing commands to shell explicitly. (#1827)
|
|
155
|
-
- **Web build skip on Windows** — Next.js webpack EPERM errors on system directories are handled gracefully.
|
|
156
|
-
|
|
157
|
-
### Developer Experience
|
|
158
|
-
|
|
159
|
-
- **@ file finder fix** — typing `@` no longer freezes the TUI. The fix adds debounce, dedup, and empty-query short-circuit. (#1832)
|
|
160
|
-
- **Tool-call loop guard** — detects and breaks infinite tool-call loops within a single unit, preventing stack overflow. (#1801)
|
|
161
|
-
- **Completion deferral fix** — roadmap checkbox and UAT stub are fixed at task level, closing the fragile handoff window between last task and `complete-slice`. (#1819)
|
|
162
|
-
|
|
163
|
-
See the full [Changelog](./CHANGELOG.md) for all 70+ fixes in this release.
|
|
164
|
-
|
|
165
|
-
### Previous highlights (v2.39–v2.41)
|
|
66
|
+
<details>
|
|
67
|
+
<summary>Previous highlights (v2.52 and earlier)</summary>
|
|
166
68
|
|
|
69
|
+
- **VS Code integration** — status bar, file decorations, bash terminal, session tree, conversation history, and code lens
|
|
70
|
+
- **Capability-based model selection** — replaced model-ID pattern matching with capability metadata
|
|
71
|
+
- **Skills overhaul** — 30+ skill packs covering major frameworks, databases, and cloud platforms
|
|
72
|
+
- **Quality gates** — 8-question quality gates for planning and completion templates
|
|
73
|
+
- **Single-writer state engine** — disciplined state transitions with machine guards and TOCTOU hardening
|
|
74
|
+
- **`/gsd rethink`** — conversational project reorganization
|
|
75
|
+
- **Complete offline mode** — fully offline with local models
|
|
167
76
|
- **Browser-based web interface** — run GSD from the browser with `gsd --web`
|
|
168
|
-
- **
|
|
169
|
-
- **
|
|
170
|
-
- **Health check phase 2** — real-time doctor issues in dashboard and visualizer
|
|
171
|
-
- **Forensics upgrade** — full-access GSD debugger with anomaly detection
|
|
77
|
+
- **DB-backed planning tools** — atomic SQLite tool calls for state transitions
|
|
78
|
+
- **Declarative workflow engine** — YAML workflows through auto-loop
|
|
172
79
|
- **7 data-loss prevention fixes** — hallucination guard, merge anchor verification, dirty tree detection, and more
|
|
173
|
-
- **
|
|
174
|
-
|
|
175
|
-
|
|
80
|
+
- **Doctor: worktree lifecycle checks** — validates worktree health, detects orphans, consolidates cleanup
|
|
81
|
+
|
|
82
|
+
</details>
|
|
176
83
|
|
|
177
84
|
---
|
|
178
85
|
|
|
@@ -626,7 +533,7 @@ See the full [Token Optimization Guide](./docs/token-optimization.md) for detail
|
|
|
626
533
|
|
|
627
534
|
### Bundled Tools
|
|
628
535
|
|
|
629
|
-
GSD ships with
|
|
536
|
+
GSD ships with 24 extensions, all loaded automatically:
|
|
630
537
|
|
|
631
538
|
| Extension | What it provides |
|
|
632
539
|
| ---------------------- | ---------------------------------------------------------------------------------------------------------------------- |
|
|
@@ -648,7 +555,12 @@ GSD ships with 19 extensions, all loaded automatically:
|
|
|
648
555
|
| **Remote Questions** | Route decisions to Slack/Discord when human input is needed in headless/CI mode |
|
|
649
556
|
| **Universal Config** | Discover and import MCP servers and rules from other AI coding tools |
|
|
650
557
|
| **AWS Auth** | Automatic Bedrock credential refresh for AWS-hosted models |
|
|
651
|
-
| **
|
|
558
|
+
| **Ollama** | First-class local LLM support via Ollama |
|
|
559
|
+
| **Claude Code CLI** | External provider extension for Claude Code CLI |
|
|
560
|
+
| **cmux** | Claude multiplexer integration — desktop notifications, sidebar metadata, visual subagent splits |
|
|
561
|
+
| **GitHub Sync** | Auto-sync milestones to GitHub Issues, PRs, and Milestones |
|
|
562
|
+
| **LSP** | Language Server Protocol — diagnostics, definitions, references, hover, rename |
|
|
563
|
+
| **TTSR** | Tool-triggered system rules — conditional context injection based on tool usage |
|
|
652
564
|
|
|
653
565
|
### Bundled Agents
|
|
654
566
|
|
|
@@ -733,7 +645,7 @@ gsd (CLI binary)
|
|
|
733
645
|
├─ resource-loader.ts Syncs bundled extensions + agents to ~/.gsd/agent/
|
|
734
646
|
└─ src/resources/
|
|
735
647
|
├─ extensions/gsd/ Core GSD extension (auto, state, commands, ...)
|
|
736
|
-
├─ extensions/...
|
|
648
|
+
├─ extensions/... 23 supporting extensions
|
|
737
649
|
├─ agents/ scout, researcher, worker
|
|
738
650
|
├─ AGENTS.md Agent routing instructions
|
|
739
651
|
└─ GSD-WORKFLOW.md Manual bootstrap protocol
|
package/dist/cli.js
CHANGED
|
@@ -385,7 +385,7 @@ if (isPrintMode) {
|
|
|
385
385
|
});
|
|
386
386
|
await resourceLoader.reload();
|
|
387
387
|
markStartup('resourceLoader.reload');
|
|
388
|
-
const { session, extensionsResult } = await createAgentSession({
|
|
388
|
+
const { session, extensionsResult, modelFallbackMessage } = await createAgentSession({
|
|
389
389
|
authStorage,
|
|
390
390
|
modelRegistry,
|
|
391
391
|
settingsManager,
|
|
@@ -397,11 +397,30 @@ if (isPrintMode) {
|
|
|
397
397
|
// Before this, extension-provided models (e.g. claude-code/*) were not yet in the
|
|
398
398
|
// registry, causing the user's valid choice to be silently overwritten.
|
|
399
399
|
validateConfiguredModel(modelRegistry, settingsManager);
|
|
400
|
+
// Re-apply the validated model to the session only when findInitialModel() used a
|
|
401
|
+
// fallback (not when restoring an existing session's model). This prevents silently
|
|
402
|
+
// overriding the persisted model of resumed conversations (#3534).
|
|
403
|
+
if (modelFallbackMessage) {
|
|
404
|
+
const validatedProvider = settingsManager.getDefaultProvider();
|
|
405
|
+
const validatedModelId = settingsManager.getDefaultModel();
|
|
406
|
+
if (validatedProvider && validatedModelId) {
|
|
407
|
+
const correctModel = modelRegistry.getAvailable()
|
|
408
|
+
.find((m) => m.provider === validatedProvider && m.id === validatedModelId);
|
|
409
|
+
if (correctModel) {
|
|
410
|
+
try {
|
|
411
|
+
await session.setModel(correctModel);
|
|
412
|
+
}
|
|
413
|
+
catch {
|
|
414
|
+
// Provider not ready — leave session on its current model
|
|
415
|
+
}
|
|
416
|
+
}
|
|
417
|
+
}
|
|
418
|
+
}
|
|
400
419
|
if (extensionsResult.errors.length > 0) {
|
|
401
420
|
for (const err of extensionsResult.errors) {
|
|
402
421
|
// Downgrade conflicts with built-in tools to warnings (#1347)
|
|
403
|
-
const
|
|
404
|
-
const prefix =
|
|
422
|
+
const isConflict = err.error.includes("supersedes") || err.error.includes("conflicts with");
|
|
423
|
+
const prefix = isConflict ? "Extension conflict" : "Extension load error";
|
|
405
424
|
process.stderr.write(`[gsd] ${prefix}: ${err.error}\n`);
|
|
406
425
|
}
|
|
407
426
|
}
|
|
@@ -521,7 +540,7 @@ const resourceLoadPromise = resourceLoader.reload();
|
|
|
521
540
|
// Then await the resource promise before creating the agent session.
|
|
522
541
|
await resourceLoadPromise;
|
|
523
542
|
markStartup('resourceLoader.reload');
|
|
524
|
-
const { session, extensionsResult } = await createAgentSession({
|
|
543
|
+
const { session, extensionsResult, modelFallbackMessage: interactiveFallbackMsg } = await createAgentSession({
|
|
525
544
|
authStorage,
|
|
526
545
|
modelRegistry,
|
|
527
546
|
settingsManager,
|
|
@@ -533,10 +552,29 @@ markStartup('createAgentSession');
|
|
|
533
552
|
// Before this, extension-provided models (e.g. claude-code/*) were not yet in the
|
|
534
553
|
// registry, causing the user's valid choice to be silently overwritten.
|
|
535
554
|
validateConfiguredModel(modelRegistry, settingsManager);
|
|
555
|
+
// Re-apply the validated model to the session only when findInitialModel() used a
|
|
556
|
+
// fallback (not when restoring an existing session's model). This prevents silently
|
|
557
|
+
// overriding the persisted model of resumed conversations (#3534).
|
|
558
|
+
if (interactiveFallbackMsg) {
|
|
559
|
+
const validatedProvider = settingsManager.getDefaultProvider();
|
|
560
|
+
const validatedModelId = settingsManager.getDefaultModel();
|
|
561
|
+
if (validatedProvider && validatedModelId) {
|
|
562
|
+
const correctModel = modelRegistry.getAvailable()
|
|
563
|
+
.find((m) => m.provider === validatedProvider && m.id === validatedModelId);
|
|
564
|
+
if (correctModel) {
|
|
565
|
+
try {
|
|
566
|
+
await session.setModel(correctModel);
|
|
567
|
+
}
|
|
568
|
+
catch {
|
|
569
|
+
// Provider not ready — leave session on its current model
|
|
570
|
+
}
|
|
571
|
+
}
|
|
572
|
+
}
|
|
573
|
+
}
|
|
536
574
|
if (extensionsResult.errors.length > 0) {
|
|
537
575
|
for (const err of extensionsResult.errors) {
|
|
538
|
-
const
|
|
539
|
-
const prefix =
|
|
576
|
+
const isConflict = err.error.includes("supersedes") || err.error.includes("conflicts with");
|
|
577
|
+
const prefix = isConflict ? "Extension conflict" : "Extension load error";
|
|
540
578
|
process.stderr.write(`[gsd] ${prefix}: ${err.error}\n`);
|
|
541
579
|
}
|
|
542
580
|
}
|
package/dist/help-text.js
CHANGED
|
@@ -3,12 +3,15 @@ const SUBCOMMAND_HELP = {
|
|
|
3
3
|
'Usage: gsd config',
|
|
4
4
|
'',
|
|
5
5
|
'Re-run the interactive setup wizard to configure:',
|
|
6
|
-
' - LLM provider (Anthropic, OpenAI, Google, etc.)',
|
|
6
|
+
' - LLM provider (Anthropic, OpenAI, Google, OpenRouter, Ollama, LM Studio, etc.)',
|
|
7
7
|
' - Web search provider (Brave, Tavily, built-in)',
|
|
8
8
|
' - Remote questions (Discord, Slack, Telegram)',
|
|
9
9
|
' - Tool API keys (Context7, Jina, Groq)',
|
|
10
10
|
'',
|
|
11
11
|
'All steps are skippable and can be changed later with /login or /search-provider.',
|
|
12
|
+
'',
|
|
13
|
+
'For detailed provider setup instructions (OpenRouter, Ollama, LM Studio, vLLM,',
|
|
14
|
+
'and other OpenAI-compatible endpoints), see docs/providers.md.',
|
|
12
15
|
].join('\n'),
|
|
13
16
|
update: [
|
|
14
17
|
'Usage: gsd update',
|
package/dist/onboarding.js
CHANGED
|
@@ -59,14 +59,13 @@ const API_KEY_PREFIXES = {
|
|
|
59
59
|
openai: ['sk-'],
|
|
60
60
|
};
|
|
61
61
|
const OTHER_PROVIDERS = [
|
|
62
|
-
{ value: 'google', label: 'Google (Gemini)' },
|
|
63
|
-
{ value: 'groq', label: 'Groq' },
|
|
64
|
-
{ value: 'xai', label: 'xAI (Grok)' },
|
|
65
|
-
{ value: 'openrouter', label: 'OpenRouter' },
|
|
66
|
-
{ value: 'mistral', label: 'Mistral' },
|
|
67
|
-
{ value: 'ollama', label: 'Ollama (Local)' },
|
|
62
|
+
{ value: 'google', label: 'Google (Gemini)', hint: 'aistudio.google.com/app/apikey' },
|
|
63
|
+
{ value: 'groq', label: 'Groq', hint: 'console.groq.com/keys' },
|
|
64
|
+
{ value: 'xai', label: 'xAI (Grok)', hint: 'console.x.ai' },
|
|
65
|
+
{ value: 'openrouter', label: 'OpenRouter', hint: '200+ models — openrouter.ai/keys' },
|
|
66
|
+
{ value: 'mistral', label: 'Mistral', hint: 'console.mistral.ai/api-keys' },
|
|
68
67
|
{ value: 'ollama-cloud', label: 'Ollama Cloud' },
|
|
69
|
-
{ value: 'custom-openai', label: 'Custom (OpenAI-compatible)' },
|
|
68
|
+
{ value: 'custom-openai', label: 'Custom (OpenAI-compatible)', hint: 'Ollama, LM Studio, vLLM, proxies — see docs/providers.md' },
|
|
70
69
|
];
|
|
71
70
|
// ─── Dynamic imports ──────────────────────────────────────────────────────────
|
|
72
71
|
/**
|
|
@@ -385,6 +384,11 @@ async function runApiKeyFlow(p, pc, authStorage, providerId, providerLabel) {
|
|
|
385
384
|
}
|
|
386
385
|
authStorage.set(providerId, { type: 'api_key', key: trimmed });
|
|
387
386
|
p.log.success(`API key saved for ${pc.green(providerLabel)}`);
|
|
387
|
+
// Provider-specific post-setup hints
|
|
388
|
+
if (providerId === 'openrouter') {
|
|
389
|
+
p.log.info(`Use ${pc.cyan('/model')} inside GSD to pick an OpenRouter model.`);
|
|
390
|
+
p.log.info(`To add custom models or control routing, see ${pc.dim('docs/providers.md#openrouter')}`);
|
|
391
|
+
}
|
|
388
392
|
return true;
|
|
389
393
|
}
|
|
390
394
|
// ─── Ollama Local Flow ───────────────────────────────────────────────────────
|
|
@@ -428,10 +432,11 @@ async function runOllamaLocalFlow(p, pc, authStorage) {
|
|
|
428
432
|
}
|
|
429
433
|
// ─── Custom OpenAI-compatible Flow ────────────────────────────────────────────
|
|
430
434
|
async function runCustomOpenAIFlow(p, pc, authStorage) {
|
|
435
|
+
p.log.info(pc.dim('Common endpoints:\n Ollama: http://localhost:11434/v1\n LM Studio: http://localhost:1234/v1\n vLLM: http://localhost:8000/v1'));
|
|
431
436
|
// Prompt for base URL
|
|
432
437
|
const baseUrl = await p.text({
|
|
433
438
|
message: 'Base URL of your OpenAI-compatible endpoint:',
|
|
434
|
-
placeholder: '
|
|
439
|
+
placeholder: 'http://localhost:11434/v1',
|
|
435
440
|
validate: (val) => {
|
|
436
441
|
const trimmed = val?.trim();
|
|
437
442
|
if (!trimmed)
|
|
@@ -512,6 +517,8 @@ async function runCustomOpenAIFlow(p, pc, authStorage) {
|
|
|
512
517
|
p.log.success(`Custom endpoint saved: ${pc.green(trimmedUrl)}`);
|
|
513
518
|
p.log.info(`Model: ${pc.cyan(trimmedModelId)}`);
|
|
514
519
|
p.log.info(`Config written to ${pc.dim(modelsJsonPath)}`);
|
|
520
|
+
p.log.info(`If you get role or streaming errors, add compat settings to models.json.`);
|
|
521
|
+
p.log.info(`See ${pc.dim('docs/providers.md#common-pitfalls')} for details.`);
|
|
515
522
|
return true;
|
|
516
523
|
}
|
|
517
524
|
// ─── Web Search Provider Step ─────────────────────────────────────────────────
|
package/dist/resource-loader.js
CHANGED
|
@@ -62,9 +62,13 @@ function writeManagedResourceManifest(agentDir) {
|
|
|
62
62
|
installedExtensionDirs = entries
|
|
63
63
|
.filter(e => e.isDirectory())
|
|
64
64
|
.filter(e => {
|
|
65
|
-
//
|
|
65
|
+
// Track directories that are actual extensions — identified by an
|
|
66
|
+
// index.js/index.ts entry point OR an extension-manifest.json (e.g.
|
|
67
|
+
// remote-questions which uses mod.ts instead of index.ts).
|
|
66
68
|
const dirPath = join(bundledExtensionsDir, e.name);
|
|
67
|
-
return existsSync(join(dirPath, 'index.js'))
|
|
69
|
+
return existsSync(join(dirPath, 'index.js'))
|
|
70
|
+
|| existsSync(join(dirPath, 'index.ts'))
|
|
71
|
+
|| existsSync(join(dirPath, 'extension-manifest.json'));
|
|
68
72
|
})
|
|
69
73
|
.map(e => e.name);
|
|
70
74
|
}
|
|
@@ -341,6 +345,17 @@ function pruneRemovedBundledExtensions(manifest, agentDir) {
|
|
|
341
345
|
removeDirIfStale(prevDir);
|
|
342
346
|
}
|
|
343
347
|
}
|
|
348
|
+
// Sweep-based: also remove any installed extension subdirectory not in the current bundle,
|
|
349
|
+
// even if it was never tracked in the manifest (e.g. installed by a pre-manifest version).
|
|
350
|
+
try {
|
|
351
|
+
if (existsSync(extensionsDir)) {
|
|
352
|
+
for (const e of readdirSync(extensionsDir, { withFileTypes: true })) {
|
|
353
|
+
if (e.isDirectory())
|
|
354
|
+
removeDirIfStale(e.name);
|
|
355
|
+
}
|
|
356
|
+
}
|
|
357
|
+
}
|
|
358
|
+
catch { /* non-fatal */ }
|
|
344
359
|
// Always remove known stale files regardless of manifest state.
|
|
345
360
|
// These were installed by pre-manifest versions so they may not appear in
|
|
346
361
|
// installedExtensionRootFiles even when a manifest exists.
|
|
@@ -583,7 +598,7 @@ export function buildResourceLoader(agentDir) {
|
|
|
583
598
|
return new DefaultResourceLoader({
|
|
584
599
|
agentDir,
|
|
585
600
|
additionalExtensionPaths: piExtensionPaths,
|
|
586
|
-
|
|
601
|
+
bundledExtensionKeys: bundledKeys,
|
|
587
602
|
extensionPathsTransform: (paths) => {
|
|
588
603
|
// 1. Filter community extensions through the GSD registry
|
|
589
604
|
const filteredPaths = paths.filter((entryPath) => {
|
|
@@ -1,7 +1,5 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { execFileSync, spawn } from "node:child_process";
|
|
2
2
|
import { existsSync } from "node:fs";
|
|
3
|
-
import { promisify } from "node:util";
|
|
4
|
-
const execFileAsync = promisify(execFile);
|
|
5
3
|
const DEFAULT_SOCKET_PATH = "/tmp/cmux.sock";
|
|
6
4
|
const STATUS_KEY = "gsd";
|
|
7
5
|
const lastSidebarSnapshots = new Map();
|
|
@@ -147,6 +145,7 @@ export class CmuxClient {
|
|
|
147
145
|
return execFileSync("cmux", args, {
|
|
148
146
|
encoding: "utf-8",
|
|
149
147
|
timeout: 3000,
|
|
148
|
+
stdio: ["ignore", "pipe", "pipe"],
|
|
150
149
|
env: process.env,
|
|
151
150
|
});
|
|
152
151
|
}
|
|
@@ -157,17 +156,27 @@ export class CmuxClient {
|
|
|
157
156
|
async runAsync(args) {
|
|
158
157
|
if (!this.canRun())
|
|
159
158
|
return null;
|
|
160
|
-
|
|
161
|
-
const
|
|
162
|
-
|
|
163
|
-
timeout: 5000,
|
|
159
|
+
return new Promise((resolve) => {
|
|
160
|
+
const child = spawn("cmux", args, {
|
|
161
|
+
stdio: ["ignore", "pipe", "pipe"],
|
|
164
162
|
env: process.env,
|
|
165
163
|
});
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
164
|
+
const chunks = [];
|
|
165
|
+
let settled = false;
|
|
166
|
+
const done = (result) => {
|
|
167
|
+
if (!settled) {
|
|
168
|
+
settled = true;
|
|
169
|
+
resolve(result);
|
|
170
|
+
}
|
|
171
|
+
};
|
|
172
|
+
const timer = setTimeout(() => { child.kill(); done(null); }, 5000);
|
|
173
|
+
child.stdout.on("data", (chunk) => chunks.push(chunk));
|
|
174
|
+
child.on("close", (code) => {
|
|
175
|
+
clearTimeout(timer);
|
|
176
|
+
done(code === 0 ? Buffer.concat(chunks).toString("utf-8") : null);
|
|
177
|
+
});
|
|
178
|
+
child.on("error", () => { clearTimeout(timer); done(null); });
|
|
179
|
+
});
|
|
171
180
|
}
|
|
172
181
|
getCapabilities() {
|
|
173
182
|
const stdout = this.runSync(["capabilities", "--json"]);
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* auto/finalize-timeout.ts — Timeout guard for post-unit finalization.
|
|
3
|
+
*
|
|
4
|
+
* Prevents the auto-loop from hanging indefinitely when
|
|
5
|
+
* postUnitPostVerification() never resolves (#2344).
|
|
6
|
+
*
|
|
7
|
+
* Leaf module — no imports from auto/ to avoid circular dependencies.
|
|
8
|
+
*/
|
|
9
|
+
/** Timeout for postUnitPostVerification in runFinalize (ms). */
|
|
10
|
+
export const FINALIZE_POST_TIMEOUT_MS = 60_000;
|
|
11
|
+
/**
|
|
12
|
+
* Race a promise against a timeout. Returns an object indicating whether
|
|
13
|
+
* the timeout fired and the resolved value (if any).
|
|
14
|
+
*
|
|
15
|
+
* Unlike Promise.race with a rejection, this returns a discriminated
|
|
16
|
+
* result so callers can handle timeouts as a recoverable condition
|
|
17
|
+
* rather than an exception.
|
|
18
|
+
*
|
|
19
|
+
* The timeout timer is always cleaned up, whether the promise resolves
|
|
20
|
+
* or the timeout fires.
|
|
21
|
+
*/
|
|
22
|
+
export async function withTimeout(promise, timeoutMs, label) {
|
|
23
|
+
let timeoutHandle;
|
|
24
|
+
const timeoutPromise = new Promise((resolve) => {
|
|
25
|
+
timeoutHandle = setTimeout(() => {
|
|
26
|
+
resolve({ value: undefined, timedOut: true });
|
|
27
|
+
}, timeoutMs);
|
|
28
|
+
});
|
|
29
|
+
try {
|
|
30
|
+
const result = await Promise.race([
|
|
31
|
+
promise.then((value) => ({ value, timedOut: false })),
|
|
32
|
+
timeoutPromise,
|
|
33
|
+
]);
|
|
34
|
+
return result;
|
|
35
|
+
}
|
|
36
|
+
finally {
|
|
37
|
+
if (timeoutHandle)
|
|
38
|
+
clearTimeout(timeoutHandle);
|
|
39
|
+
}
|
|
40
|
+
}
|
|
@@ -215,6 +215,10 @@ export async function autoLoop(ctx, pi, s, deps) {
|
|
|
215
215
|
catch (loopErr) {
|
|
216
216
|
// ── Blanket catch: absorb unexpected exceptions, apply graduated recovery ──
|
|
217
217
|
const msg = loopErr instanceof Error ? loopErr.message : String(loopErr);
|
|
218
|
+
// Always emit iteration-end on error so the journal records iteration
|
|
219
|
+
// completion even on failure (#2344). Without this, errors in
|
|
220
|
+
// runFinalize leave the journal incomplete, making diagnosis harder.
|
|
221
|
+
deps.emitJournalEvent({ ts: new Date().toISOString(), flowId, seq: nextSeq(), eventType: "iteration-end", data: { iteration, error: msg } });
|
|
218
222
|
// ── Infrastructure errors: immediate stop, no retry ──
|
|
219
223
|
// These are unrecoverable (disk full, OOM, etc.). Retrying just burns
|
|
220
224
|
// LLM budget on guaranteed failures.
|