gsd-pi 2.78.0 → 2.78.1-dev.82bcf6b71
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 +60 -23
- package/dist/bundled-resource-path.d.ts +7 -0
- package/dist/bundled-resource-path.js +34 -2
- package/dist/claude-cli-check.js +104 -33
- package/dist/cli-policy.d.ts +13 -0
- package/dist/cli-policy.js +17 -0
- package/dist/cli.js +95 -55
- package/dist/headless-query.d.ts +22 -0
- package/dist/headless-query.js +43 -8
- package/dist/headless.d.ts +10 -0
- package/dist/headless.js +16 -1
- package/dist/loader.js +9 -13
- package/dist/onboarding.d.ts +10 -0
- package/dist/onboarding.js +2 -2
- package/dist/provider-migrations.d.ts +2 -2
- package/dist/provider-migrations.js +5 -2
- package/dist/resource-loader.d.ts +5 -2
- package/dist/resource-loader.js +30 -13
- package/dist/resources/.managed-resources-content-hash +1 -0
- package/dist/resources/extensions/claude-code-cli/readiness.js +128 -32
- package/dist/resources/extensions/google-search/index.js +2 -6
- package/dist/resources/extensions/gsd/auto/loop.js +23 -0
- package/dist/resources/extensions/gsd/auto/phases.js +5 -13
- package/dist/resources/extensions/gsd/auto/run-unit.js +26 -12
- package/dist/resources/extensions/gsd/auto/session.js +5 -6
- package/dist/resources/extensions/gsd/auto-dashboard.js +3 -2
- package/dist/resources/extensions/gsd/auto-direct-dispatch.js +55 -21
- package/dist/resources/extensions/gsd/auto-dispatch.js +18 -6
- package/dist/resources/extensions/gsd/auto-prompts.js +69 -2
- package/dist/resources/extensions/gsd/auto-recovery.js +43 -4
- package/dist/resources/extensions/gsd/auto-runtime-state.js +31 -0
- package/dist/resources/extensions/gsd/auto-start.js +1 -1
- package/dist/resources/extensions/gsd/auto-tool-tracking.js +2 -2
- package/dist/resources/extensions/gsd/auto-worktree.js +75 -13
- package/dist/resources/extensions/gsd/auto.js +39 -14
- package/dist/resources/extensions/gsd/bootstrap/db-tools.js +14 -2
- package/dist/resources/extensions/gsd/bootstrap/exec-tools.js +7 -5
- package/dist/resources/extensions/gsd/bootstrap/query-tools.js +2 -2
- package/dist/resources/extensions/gsd/bootstrap/register-extension.js +5 -4
- package/dist/resources/extensions/gsd/bootstrap/register-hooks.js +112 -31
- package/dist/resources/extensions/gsd/bootstrap/register-shortcuts.js +11 -6
- package/dist/resources/extensions/gsd/bootstrap/subagent-input.js +22 -0
- package/dist/resources/extensions/gsd/bootstrap/system-context.js +45 -8
- package/dist/resources/extensions/gsd/bootstrap/write-gate.js +121 -3
- package/dist/resources/extensions/gsd/commands/catalog.js +76 -5
- package/dist/resources/extensions/gsd/commands/handlers/core.js +23 -1
- package/dist/resources/extensions/gsd/commands/handlers/ops.js +8 -0
- package/dist/resources/extensions/gsd/commands-config.js +3 -2
- package/dist/resources/extensions/gsd/commands-extensions.js +46 -3
- package/dist/resources/extensions/gsd/commands-handlers.js +3 -2
- package/dist/resources/extensions/gsd/commands-mcp-status.js +3 -1
- package/dist/resources/extensions/gsd/commands-prefs-wizard.js +10 -1
- package/dist/resources/extensions/gsd/commands-worktree.js +309 -0
- package/dist/resources/extensions/gsd/dashboard-overlay.js +1 -1
- package/dist/resources/extensions/gsd/docs/preferences-reference.md +10 -0
- package/dist/resources/extensions/gsd/doctor-providers.js +2 -1
- package/dist/resources/extensions/gsd/doctor-runtime-checks.js +39 -1
- package/dist/resources/extensions/gsd/error-classifier.js +1 -1
- package/dist/resources/extensions/gsd/forensics.js +10 -8
- package/dist/resources/extensions/gsd/git-service.js +12 -5
- package/dist/resources/extensions/gsd/gsd-db.js +11 -2
- package/dist/resources/extensions/gsd/guided-flow.js +25 -24
- package/dist/resources/extensions/gsd/home-dir.js +16 -0
- package/dist/resources/extensions/gsd/key-manager.js +2 -1
- package/dist/resources/extensions/gsd/memory-store.js +66 -31
- package/dist/resources/extensions/gsd/migrate/command.js +3 -2
- package/dist/resources/extensions/gsd/milestone-id-reservation.js +36 -0
- package/dist/resources/extensions/gsd/model-router.js +114 -9
- package/dist/resources/extensions/gsd/native-git-bridge.js +7 -1
- package/dist/resources/extensions/gsd/preferences-models.js +91 -15
- package/dist/resources/extensions/gsd/preferences-types.js +2 -0
- package/dist/resources/extensions/gsd/preferences-validation.js +32 -0
- package/dist/resources/extensions/gsd/preferences.js +5 -3
- package/dist/resources/extensions/gsd/prompt-loader.js +23 -12
- package/dist/resources/extensions/gsd/prompts/complete-milestone.md +10 -0
- package/dist/resources/extensions/gsd/prompts/complete-slice.md +10 -0
- package/dist/resources/extensions/gsd/prompts/guided-discuss-milestone.md +2 -0
- package/dist/resources/extensions/gsd/prompts/parallel-research-slices.md +2 -0
- package/dist/resources/extensions/gsd/prompts/plan-slice.md +10 -0
- package/dist/resources/extensions/gsd/prompts/refine-slice.md +10 -0
- package/dist/resources/extensions/gsd/prompts/rewrite-docs.md +2 -0
- package/dist/resources/extensions/gsd/slice-parallel-orchestrator.js +9 -3
- package/dist/resources/extensions/gsd/state.js +42 -0
- package/dist/resources/extensions/gsd/templates/PREFERENCES.md +1 -0
- package/dist/resources/extensions/gsd/tools/memory-tools.js +18 -1
- package/dist/resources/extensions/gsd/unit-context-manifest.js +29 -4
- package/dist/resources/extensions/gsd/visualizer-overlay.js +1 -1
- package/dist/resources/extensions/gsd/watch/header-renderer.js +3 -1
- package/dist/resources/extensions/gsd/worktree-command.js +26 -46
- package/dist/resources/extensions/gsd/worktree-manager.js +20 -1
- package/dist/resources/extensions/gsd/worktree-resolver.js +28 -13
- package/dist/resources/extensions/gsd/worktree-root.js +124 -0
- package/dist/resources/extensions/gsd/worktree-session-state.js +33 -0
- package/dist/resources/extensions/gsd/worktree.js +4 -115
- package/dist/resources/extensions/mcp-client/index.js +6 -9
- package/dist/resources/extensions/ollama/index.js +15 -2
- package/dist/resources/extensions/ollama/model-capabilities.js +31 -0
- package/dist/resources/extensions/ollama/ollama-client.js +40 -4
- package/dist/resources/extensions/slash-commands/create-extension.js +36 -22
- package/dist/resources/extensions/subagent/index.js +324 -178
- package/dist/resources/skills/create-gsd-extension/SKILL.md +9 -5
- package/dist/resources/skills/create-gsd-extension/references/custom-commands.md +1 -1
- package/dist/resources/skills/create-gsd-extension/references/custom-rendering.md +5 -5
- package/dist/resources/skills/create-gsd-extension/references/custom-tools.md +4 -4
- package/dist/resources/skills/create-gsd-extension/references/custom-ui.md +6 -6
- package/dist/resources/skills/create-gsd-extension/references/events-reference.md +3 -3
- package/dist/resources/skills/create-gsd-extension/references/packaging-distribution.md +1 -1
- package/dist/resources/skills/create-gsd-extension/references/remote-execution-overrides.md +3 -3
- package/dist/resources/skills/create-gsd-extension/workflows/create-extension.md +32 -12
- package/dist/resources/skills/lint/SKILL.md +4 -0
- package/dist/resources/skills/review/SKILL.md +4 -0
- package/dist/resources/skills/test/SKILL.md +3 -0
- package/dist/rtk-shared.d.ts +3 -0
- package/dist/rtk-shared.js +17 -0
- package/dist/rtk.d.ts +2 -5
- package/dist/rtk.js +3 -20
- package/dist/runtime-checks.d.ts +27 -0
- package/dist/runtime-checks.js +38 -0
- package/dist/tsconfig.extensions.tsbuildinfo +1 -1
- package/dist/web/standalone/.next/BUILD_ID +1 -1
- package/dist/web/standalone/.next/app-path-routes-manifest.json +19 -19
- package/dist/web/standalone/.next/build-manifest.json +4 -4
- package/dist/web/standalone/.next/prerender-manifest.json +3 -3
- package/dist/web/standalone/.next/react-loadable-manifest.json +44 -4
- 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 +4 -2
- package/dist/web/standalone/.next/server/app/api/session/events/route_client-reference-manifest.js +1 -1
- package/dist/web/standalone/.next/server/app/api/session/manage/route.js +1 -1
- package/dist/web/standalone/.next/server/app/api/session/manage/route_client-reference-manifest.js +1 -1
- package/dist/web/standalone/.next/server/app/api/settings-data/route.js +1 -1
- package/dist/web/standalone/.next/server/app/api/settings-data/route_client-reference-manifest.js +1 -1
- package/dist/web/standalone/.next/server/app/api/shutdown/route.js +1 -1
- package/dist/web/standalone/.next/server/app/api/shutdown/route_client-reference-manifest.js +1 -1
- package/dist/web/standalone/.next/server/app/api/skill-health/route.js +1 -1
- package/dist/web/standalone/.next/server/app/api/skill-health/route_client-reference-manifest.js +1 -1
- package/dist/web/standalone/.next/server/app/api/steer/route.js +1 -1
- package/dist/web/standalone/.next/server/app/api/steer/route_client-reference-manifest.js +1 -1
- package/dist/web/standalone/.next/server/app/api/switch-root/route.js +1 -1
- package/dist/web/standalone/.next/server/app/api/switch-root/route_client-reference-manifest.js +1 -1
- package/dist/web/standalone/.next/server/app/api/terminal/input/route.js +2 -2
- package/dist/web/standalone/.next/server/app/api/terminal/input/route_client-reference-manifest.js +1 -1
- package/dist/web/standalone/.next/server/app/api/terminal/resize/route.js +2 -2
- package/dist/web/standalone/.next/server/app/api/terminal/resize/route_client-reference-manifest.js +1 -1
- package/dist/web/standalone/.next/server/app/api/terminal/sessions/route.js +2 -2
- package/dist/web/standalone/.next/server/app/api/terminal/sessions/route_client-reference-manifest.js +1 -1
- package/dist/web/standalone/.next/server/app/api/terminal/stream/route.js +4 -4
- 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 +19 -19
- 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-manifest.json +5 -5
- package/dist/web/standalone/.next/server/middleware-react-loadable-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/server/webpack-runtime.js +1 -1
- package/dist/web/standalone/.next/static/chunks/2556.0527fea66e123b7f.js +1 -0
- package/dist/web/standalone/.next/static/chunks/2824.08296bc2f9654698.js +1 -0
- package/dist/web/standalone/.next/static/chunks/3026.3af53b279375f082.js +1 -0
- package/dist/web/standalone/.next/static/chunks/315.6f68ae79b67d25cf.js +1 -0
- package/dist/web/standalone/.next/static/chunks/3497.4bfc60a3b3dea717.js +1 -0
- package/dist/web/standalone/.next/static/chunks/5516.4a07c872b5c3a663.js +1 -0
- package/dist/web/standalone/.next/static/chunks/8336.31b019697882acfb.js +10 -0
- package/dist/web/standalone/.next/static/chunks/8845.c9702695e8c5a9c5.js +2 -0
- package/dist/web/standalone/.next/static/chunks/9058.01ef3a463bda88f1.js +20 -0
- package/dist/web/standalone/.next/static/chunks/9441.1081da1125d1764f.js +1 -0
- package/dist/web/standalone/.next/static/chunks/app/_not-found/{page-2f24283c162b6ab3.js → page-f2a7482d42a5614b.js} +1 -1
- package/dist/web/standalone/.next/static/chunks/app/{layout-9ecfd95f343793f0.js → layout-a16c7a7ecdf0c2cf.js} +1 -1
- package/dist/web/standalone/.next/static/chunks/app/page-9bf2e0c50fb2ca05.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/.next/static/chunks/webpack-f9f0dc45e4f3ac10.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/package.json +2 -1
- package/dist/web/standalone/server.js +1 -1
- package/dist/welcome-screen.js +27 -1
- package/dist/worktree-cli.d.ts +1 -0
- package/dist/worktree-cli.js +9 -3
- package/dist/worktree-status-banner.d.ts +1 -0
- package/dist/worktree-status-banner.js +132 -0
- package/package.json +1 -3
- package/packages/daemon/package.json +2 -2
- package/packages/mcp-server/dist/alias-telemetry.d.ts +8 -0
- package/packages/mcp-server/dist/alias-telemetry.d.ts.map +1 -0
- package/packages/mcp-server/dist/alias-telemetry.js +30 -0
- package/packages/mcp-server/dist/alias-telemetry.js.map +1 -0
- package/packages/mcp-server/dist/workflow-tools.d.ts.map +1 -1
- package/packages/mcp-server/dist/workflow-tools.js +74 -46
- package/packages/mcp-server/dist/workflow-tools.js.map +1 -1
- package/packages/mcp-server/package.json +2 -2
- package/packages/mcp-server/src/alias-telemetry.test.ts +78 -0
- package/packages/mcp-server/src/alias-telemetry.ts +30 -0
- package/packages/mcp-server/src/workflow-tools.test.ts +78 -0
- package/packages/mcp-server/src/workflow-tools.ts +93 -58
- package/packages/mcp-server/tsconfig.tsbuildinfo +1 -1
- package/packages/native/package.json +1 -1
- package/packages/native/tsconfig.tsbuildinfo +1 -1
- package/packages/pi-agent-core/package.json +1 -1
- package/packages/pi-agent-core/tsconfig.tsbuildinfo +1 -1
- package/packages/pi-ai/dist/providers/anthropic-shared.cache-breakpoint.test.d.ts +2 -0
- package/packages/pi-ai/dist/providers/anthropic-shared.cache-breakpoint.test.d.ts.map +1 -0
- package/packages/pi-ai/dist/providers/anthropic-shared.cache-breakpoint.test.js +231 -0
- package/packages/pi-ai/dist/providers/anthropic-shared.cache-breakpoint.test.js.map +1 -0
- package/packages/pi-ai/dist/providers/anthropic-shared.d.ts.map +1 -1
- package/packages/pi-ai/dist/providers/anthropic-shared.js +48 -19
- package/packages/pi-ai/dist/providers/anthropic-shared.js.map +1 -1
- package/packages/pi-ai/dist/types.d.ts +13 -0
- package/packages/pi-ai/dist/types.d.ts.map +1 -1
- package/packages/pi-ai/dist/types.js.map +1 -1
- package/packages/pi-ai/dist/utils/repair-tool-json.d.ts.map +1 -1
- package/packages/pi-ai/dist/utils/repair-tool-json.js +24 -3
- package/packages/pi-ai/dist/utils/repair-tool-json.js.map +1 -1
- package/packages/pi-ai/dist/utils/tests/repair-tool-json.test.js +26 -0
- package/packages/pi-ai/dist/utils/tests/repair-tool-json.test.js.map +1 -1
- package/packages/pi-ai/package.json +1 -1
- package/packages/pi-ai/src/providers/anthropic-shared.cache-breakpoint.test.ts +289 -0
- package/packages/pi-ai/src/providers/anthropic-shared.ts +52 -20
- package/packages/pi-ai/src/types.ts +13 -0
- package/packages/pi-ai/src/utils/repair-tool-json.ts +24 -3
- package/packages/pi-ai/src/utils/tests/repair-tool-json.test.ts +32 -0
- package/packages/pi-ai/tsconfig.tsbuildinfo +1 -1
- package/packages/pi-coding-agent/dist/core/agent-session.d.ts.map +1 -1
- package/packages/pi-coding-agent/dist/core/agent-session.js +6 -0
- package/packages/pi-coding-agent/dist/core/agent-session.js.map +1 -1
- package/packages/pi-coding-agent/dist/core/messages.d.ts.map +1 -1
- package/packages/pi-coding-agent/dist/core/messages.js +4 -0
- package/packages/pi-coding-agent/dist/core/messages.js.map +1 -1
- package/packages/pi-coding-agent/dist/core/model-registry-auth-mode.test.js +19 -2
- package/packages/pi-coding-agent/dist/core/model-registry-auth-mode.test.js.map +1 -1
- package/packages/pi-coding-agent/dist/core/model-registry.d.ts +10 -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 +18 -0
- package/packages/pi-coding-agent/dist/core/model-registry.js.map +1 -1
- package/packages/pi-coding-agent/dist/core/system-prompt.d.ts +13 -0
- package/packages/pi-coding-agent/dist/core/system-prompt.d.ts.map +1 -1
- package/packages/pi-coding-agent/dist/core/system-prompt.js +20 -16
- package/packages/pi-coding-agent/dist/core/system-prompt.js.map +1 -1
- package/packages/pi-coding-agent/dist/core/token-telemetry.d.ts +37 -0
- package/packages/pi-coding-agent/dist/core/token-telemetry.d.ts.map +1 -0
- package/packages/pi-coding-agent/dist/core/token-telemetry.js +49 -0
- package/packages/pi-coding-agent/dist/core/token-telemetry.js.map +1 -0
- package/packages/pi-coding-agent/dist/modes/interactive/components/tool-card-cleanup-and-success-runtime.test.d.ts +2 -0
- package/packages/pi-coding-agent/dist/modes/interactive/components/tool-card-cleanup-and-success-runtime.test.d.ts.map +1 -0
- package/packages/pi-coding-agent/dist/modes/interactive/components/tool-card-cleanup-and-success-runtime.test.js +133 -0
- package/packages/pi-coding-agent/dist/modes/interactive/components/tool-card-cleanup-and-success-runtime.test.js.map +1 -0
- package/packages/pi-coding-agent/dist/modes/interactive/controllers/input-controller.js +1 -1
- package/packages/pi-coding-agent/dist/modes/interactive/controllers/input-controller.js.map +1 -1
- package/packages/pi-coding-agent/dist/modes/interactive/controllers/input-controller.test.js +14 -1
- package/packages/pi-coding-agent/dist/modes/interactive/controllers/input-controller.test.js.map +1 -1
- package/packages/pi-coding-agent/dist/tests/system-prompt-cache-stability.test.d.ts +2 -0
- package/packages/pi-coding-agent/dist/tests/system-prompt-cache-stability.test.d.ts.map +1 -0
- package/packages/pi-coding-agent/dist/tests/system-prompt-cache-stability.test.js +78 -0
- package/packages/pi-coding-agent/dist/tests/system-prompt-cache-stability.test.js.map +1 -0
- package/packages/pi-coding-agent/dist/tests/token-telemetry.test.d.ts +2 -0
- package/packages/pi-coding-agent/dist/tests/token-telemetry.test.d.ts.map +1 -0
- package/packages/pi-coding-agent/dist/tests/token-telemetry.test.js +181 -0
- package/packages/pi-coding-agent/dist/tests/token-telemetry.test.js.map +1 -0
- package/packages/pi-coding-agent/package.json +1 -1
- package/packages/pi-coding-agent/src/core/agent-session.ts +7 -0
- package/packages/pi-coding-agent/src/core/messages.ts +4 -0
- package/packages/pi-coding-agent/src/core/model-registry-auth-mode.test.ts +32 -2
- package/packages/pi-coding-agent/src/core/model-registry.ts +21 -0
- package/packages/pi-coding-agent/src/core/system-prompt.ts +33 -15
- package/packages/pi-coding-agent/src/core/token-telemetry.ts +77 -0
- package/packages/pi-coding-agent/src/modes/interactive/components/tool-card-cleanup-and-success-runtime.test.ts +212 -0
- package/packages/pi-coding-agent/src/modes/interactive/controllers/input-controller.test.ts +17 -1
- package/packages/pi-coding-agent/src/modes/interactive/controllers/input-controller.ts +1 -1
- package/packages/pi-coding-agent/src/tests/system-prompt-cache-stability.test.ts +102 -0
- package/packages/pi-coding-agent/src/tests/token-telemetry.test.ts +200 -0
- package/packages/pi-coding-agent/tsconfig.tsbuildinfo +1 -1
- package/packages/pi-tui/dist/__tests__/autocomplete.test.js +17 -3
- package/packages/pi-tui/dist/__tests__/autocomplete.test.js.map +1 -1
- package/packages/pi-tui/dist/components/__tests__/leak-fixes-runtime.test.d.ts +2 -0
- package/packages/pi-tui/dist/components/__tests__/leak-fixes-runtime.test.d.ts.map +1 -0
- package/packages/pi-tui/dist/components/__tests__/leak-fixes-runtime.test.js +161 -0
- package/packages/pi-tui/dist/components/__tests__/leak-fixes-runtime.test.js.map +1 -0
- package/packages/pi-tui/package.json +1 -1
- package/packages/pi-tui/src/__tests__/autocomplete.test.ts +20 -3
- package/packages/pi-tui/src/components/__tests__/leak-fixes-runtime.test.ts +219 -0
- package/packages/pi-tui/tsconfig.tsbuildinfo +1 -1
- package/packages/rpc-client/package.json +1 -1
- package/pkg/package.json +1 -1
- package/src/resources/extensions/claude-code-cli/readiness.ts +130 -30
- package/src/resources/extensions/google-search/index.ts +2 -9
- package/src/resources/extensions/gsd/auto/loop.ts +24 -2
- package/src/resources/extensions/gsd/auto/phases.ts +6 -14
- package/src/resources/extensions/gsd/auto/run-unit.ts +26 -12
- package/src/resources/extensions/gsd/auto/session.ts +5 -6
- package/src/resources/extensions/gsd/auto/types.ts +1 -0
- package/src/resources/extensions/gsd/auto-dashboard.ts +3 -2
- package/src/resources/extensions/gsd/auto-direct-dispatch.ts +60 -24
- package/src/resources/extensions/gsd/auto-dispatch.ts +18 -6
- package/src/resources/extensions/gsd/auto-prompts.ts +66 -2
- package/src/resources/extensions/gsd/auto-recovery.ts +46 -8
- package/src/resources/extensions/gsd/auto-runtime-state.ts +51 -0
- package/src/resources/extensions/gsd/auto-start.ts +1 -1
- package/src/resources/extensions/gsd/auto-tool-tracking.ts +2 -4
- package/src/resources/extensions/gsd/auto-worktree.ts +97 -12
- package/src/resources/extensions/gsd/auto.ts +37 -10
- package/src/resources/extensions/gsd/bootstrap/db-tools.ts +15 -13
- package/src/resources/extensions/gsd/bootstrap/exec-tools.ts +8 -7
- package/src/resources/extensions/gsd/bootstrap/query-tools.ts +2 -2
- package/src/resources/extensions/gsd/bootstrap/register-extension.ts +10 -9
- package/src/resources/extensions/gsd/bootstrap/register-hooks.ts +121 -31
- package/src/resources/extensions/gsd/bootstrap/register-shortcuts.ts +12 -6
- package/src/resources/extensions/gsd/bootstrap/subagent-input.ts +20 -0
- package/src/resources/extensions/gsd/bootstrap/system-context.ts +50 -8
- package/src/resources/extensions/gsd/bootstrap/write-gate.ts +141 -11
- package/src/resources/extensions/gsd/commands/catalog.ts +82 -5
- package/src/resources/extensions/gsd/commands/handlers/core.ts +23 -1
- package/src/resources/extensions/gsd/commands/handlers/ops.ts +10 -0
- package/src/resources/extensions/gsd/commands-config.ts +3 -2
- package/src/resources/extensions/gsd/commands-extensions.ts +43 -3
- package/src/resources/extensions/gsd/commands-handlers.ts +3 -2
- package/src/resources/extensions/gsd/commands-mcp-status.ts +3 -1
- package/src/resources/extensions/gsd/commands-prefs-wizard.ts +15 -1
- package/src/resources/extensions/gsd/commands-worktree.ts +383 -0
- package/src/resources/extensions/gsd/dashboard-overlay.ts +1 -1
- package/src/resources/extensions/gsd/docs/preferences-reference.md +10 -0
- package/src/resources/extensions/gsd/doctor-providers.ts +2 -1
- package/src/resources/extensions/gsd/doctor-runtime-checks.ts +39 -1
- package/src/resources/extensions/gsd/doctor-types.ts +3 -1
- package/src/resources/extensions/gsd/error-classifier.ts +1 -1
- package/src/resources/extensions/gsd/forensics.ts +12 -7
- package/src/resources/extensions/gsd/git-service.ts +13 -5
- package/src/resources/extensions/gsd/gsd-db.ts +12 -2
- package/src/resources/extensions/gsd/guided-flow.ts +27 -26
- package/src/resources/extensions/gsd/home-dir.ts +19 -0
- package/src/resources/extensions/gsd/journal.ts +4 -1
- package/src/resources/extensions/gsd/key-manager.ts +2 -1
- package/src/resources/extensions/gsd/memory-store.ts +81 -28
- package/src/resources/extensions/gsd/migrate/command.ts +3 -2
- package/src/resources/extensions/gsd/milestone-id-reservation.ts +47 -0
- package/src/resources/extensions/gsd/model-router.ts +172 -9
- package/src/resources/extensions/gsd/native-git-bridge.ts +7 -1
- package/src/resources/extensions/gsd/preferences-models.ts +101 -15
- package/src/resources/extensions/gsd/preferences-types.ts +6 -0
- package/src/resources/extensions/gsd/preferences-validation.ts +35 -0
- package/src/resources/extensions/gsd/preferences.ts +16 -2
- package/src/resources/extensions/gsd/prompt-loader.ts +26 -12
- package/src/resources/extensions/gsd/prompts/complete-milestone.md +10 -0
- package/src/resources/extensions/gsd/prompts/complete-slice.md +10 -0
- package/src/resources/extensions/gsd/prompts/guided-discuss-milestone.md +2 -0
- package/src/resources/extensions/gsd/prompts/parallel-research-slices.md +2 -0
- package/src/resources/extensions/gsd/prompts/plan-slice.md +10 -0
- package/src/resources/extensions/gsd/prompts/refine-slice.md +10 -0
- package/src/resources/extensions/gsd/prompts/rewrite-docs.md +2 -0
- package/src/resources/extensions/gsd/slice-parallel-orchestrator.ts +9 -3
- package/src/resources/extensions/gsd/state.ts +42 -0
- package/src/resources/extensions/gsd/templates/PREFERENCES.md +1 -0
- package/src/resources/extensions/gsd/tests/auto-loop.test.ts +179 -1
- package/src/resources/extensions/gsd/tests/auto-recovery.test.ts +58 -0
- package/src/resources/extensions/gsd/tests/auto-session-encapsulation.test.ts +24 -5
- package/src/resources/extensions/gsd/tests/auto-supervisor.test.mjs +21 -4
- package/src/resources/extensions/gsd/tests/bootstrap-derive-state-db-open.test.ts +1 -1
- package/src/resources/extensions/gsd/tests/budget-prediction.test.ts +138 -211
- package/src/resources/extensions/gsd/tests/bundled-skill-triggers.test.ts +50 -27
- package/src/resources/extensions/gsd/tests/commands-extensions-version-compare.test.ts +58 -0
- package/src/resources/extensions/gsd/tests/commands-worktree-clean.test.ts +48 -0
- package/src/resources/extensions/gsd/tests/complete-slice-verification-gate.test.ts +142 -59
- package/src/resources/extensions/gsd/tests/complete-slice.test.ts +7 -4
- package/src/resources/extensions/gsd/tests/completed-at-reconcile.test.ts +89 -32
- package/src/resources/extensions/gsd/tests/custom-engine-loop-integration.test.ts +41 -23
- package/src/resources/extensions/gsd/tests/db-path-worktree-symlink.test.ts +3 -43
- package/src/resources/extensions/gsd/tests/debug-logger.test.ts +5 -3
- package/src/resources/extensions/gsd/tests/deferred-milestone-dir-4996.test.ts +116 -0
- package/src/resources/extensions/gsd/tests/discuss-empty-db-fallback.test.ts +22 -87
- package/src/resources/extensions/gsd/tests/discuss-queued-milestones.test.ts +7 -118
- package/src/resources/extensions/gsd/tests/discuss-tool-scope-leak.test.ts +18 -60
- package/src/resources/extensions/gsd/tests/doctor-orphan-milestone-4996.test.ts +100 -0
- package/src/resources/extensions/gsd/tests/double-merge-guard.test.ts +14 -76
- package/src/resources/extensions/gsd/tests/ensure-preconditions-guard-4996.test.ts +93 -0
- package/src/resources/extensions/gsd/tests/false-degraded-mode-warning.test.ts +22 -83
- package/src/resources/extensions/gsd/tests/finalize-timeout-guard.test.ts +1 -63
- package/src/resources/extensions/gsd/tests/find-missing-summaries-closed-runtime.test.ts +47 -0
- package/src/resources/extensions/gsd/tests/forensics-stuck-loops.test.ts +26 -1
- package/src/resources/extensions/gsd/tests/gitignore-bg-shell-runtime.test.ts +63 -0
- package/src/resources/extensions/gsd/tests/google-search-stub.test.ts +25 -65
- package/src/resources/extensions/gsd/tests/gsd-db.test.ts +30 -0
- package/src/resources/extensions/gsd/tests/gsd-no-project-error-runtime.test.ts +81 -0
- package/src/resources/extensions/gsd/tests/headless-answers.test.ts +14 -4
- package/src/resources/extensions/gsd/tests/health-widget.test.ts +22 -12
- package/src/resources/extensions/gsd/tests/help-menu-coverage.test.ts +57 -0
- package/src/resources/extensions/gsd/tests/home-dir.test.ts +52 -0
- package/src/resources/extensions/gsd/tests/import-done-milestones-runtime.test.ts +145 -0
- package/src/resources/extensions/gsd/tests/init-prefs-routing.test.ts +64 -1
- package/src/resources/extensions/gsd/tests/integration/auto-worktree.test.ts +72 -1
- package/src/resources/extensions/gsd/tests/integration/token-savings.test.ts +0 -23
- package/src/resources/extensions/gsd/tests/memory-store.test.ts +128 -0
- package/src/resources/extensions/gsd/tests/memory-tools.test.ts +33 -1
- package/src/resources/extensions/gsd/tests/merge-self-branch-guard.test.ts +124 -0
- package/src/resources/extensions/gsd/tests/milestone-id-gap-reuse-4996.test.ts +152 -0
- package/src/resources/extensions/gsd/tests/milestone-report-path.test.ts +18 -1
- package/src/resources/extensions/gsd/tests/model-router.test.ts +169 -8
- package/src/resources/extensions/gsd/tests/native-git-infra-errors.test.ts +50 -0
- package/src/resources/extensions/gsd/tests/orphaned-worktree-audit.test.ts +8 -0
- package/src/resources/extensions/gsd/tests/parallel-crash-recovery.test.ts +32 -43
- package/src/resources/extensions/gsd/tests/phases-merge-error-stops-auto.test.ts +4 -10
- package/src/resources/extensions/gsd/tests/preferences.test.ts +127 -0
- package/src/resources/extensions/gsd/tests/prompt-step-ordering.test.ts +16 -0
- package/src/resources/extensions/gsd/tests/provider-errors.test.ts +7 -0
- package/src/resources/extensions/gsd/tests/quick-turn-end-cleanup.test.ts +6 -6
- package/src/resources/extensions/gsd/tests/register-hooks-compaction-checkpoint.test.ts +93 -0
- package/src/resources/extensions/gsd/tests/safety-harness-false-positives.test.ts +34 -0
- package/src/resources/extensions/gsd/tests/session-start-footer.test.ts +168 -19
- package/src/resources/extensions/gsd/tests/slice-parallel-orchestrator.test.ts +7 -1
- package/src/resources/extensions/gsd/tests/smart-entry-complete.test.ts +23 -1
- package/src/resources/extensions/gsd/tests/stash-pop-gsd-conflict.test.ts +8 -2
- package/src/resources/extensions/gsd/tests/stash-queued-context-files.test.ts +12 -6
- package/src/resources/extensions/gsd/tests/steer-worktree-path.test.ts +17 -1
- package/src/resources/extensions/gsd/tests/system-context-message-routing.test.ts +101 -0
- package/src/resources/extensions/gsd/tests/token-profile.test.ts +51 -4
- package/src/resources/extensions/gsd/tests/turn-epoch.test.ts +7 -16
- package/src/resources/extensions/gsd/tests/unit-context-manifest.test.ts +38 -3
- package/src/resources/extensions/gsd/tests/unstructured-continue-context-injection.test.ts +5 -7
- package/src/resources/extensions/gsd/tests/uok-gitops-turn-action.test.ts +15 -1
- package/src/resources/extensions/gsd/tests/visualizer-overlay.test.ts +6 -6
- package/src/resources/extensions/gsd/tests/worktree-path-injection.test.ts +235 -0
- package/src/resources/extensions/gsd/tests/worktree-resolver.test.ts +85 -0
- package/src/resources/extensions/gsd/tests/worktree-symlink-removal.test.ts +34 -33
- package/src/resources/extensions/gsd/tests/worktree.test.ts +8 -0
- package/src/resources/extensions/gsd/tests/write-gate-planning-unit.test.ts +131 -1
- package/src/resources/extensions/gsd/tools/memory-tools.ts +17 -1
- package/src/resources/extensions/gsd/unit-context-manifest.ts +44 -12
- package/src/resources/extensions/gsd/visualizer-overlay.ts +1 -1
- package/src/resources/extensions/gsd/watch/header-renderer.ts +3 -1
- package/src/resources/extensions/gsd/workflow-logger.ts +1 -0
- package/src/resources/extensions/gsd/worktree-command.ts +31 -44
- package/src/resources/extensions/gsd/worktree-manager.ts +40 -1
- package/src/resources/extensions/gsd/worktree-resolver.ts +28 -14
- package/src/resources/extensions/gsd/worktree-root.ts +144 -0
- package/src/resources/extensions/gsd/worktree-session-state.ts +35 -0
- package/src/resources/extensions/gsd/worktree.ts +8 -119
- package/src/resources/extensions/mcp-client/index.ts +6 -10
- package/src/resources/extensions/mcp-client/tests/global-config.test.ts +91 -0
- package/src/resources/extensions/ollama/index.ts +16 -2
- package/src/resources/extensions/ollama/model-capabilities.ts +34 -0
- package/src/resources/extensions/ollama/ollama-client.ts +41 -4
- package/src/resources/extensions/ollama/tests/model-capabilities.test.ts +96 -0
- package/src/resources/extensions/ollama/tests/ollama-client-timeout-env.test.ts +147 -0
- package/src/resources/extensions/slash-commands/create-extension.ts +38 -24
- package/src/resources/extensions/subagent/index.ts +165 -7
- package/src/resources/skills/create-gsd-extension/SKILL.md +9 -5
- package/src/resources/skills/create-gsd-extension/references/custom-commands.md +1 -1
- package/src/resources/skills/create-gsd-extension/references/custom-rendering.md +5 -5
- package/src/resources/skills/create-gsd-extension/references/custom-tools.md +4 -4
- package/src/resources/skills/create-gsd-extension/references/custom-ui.md +6 -6
- package/src/resources/skills/create-gsd-extension/references/events-reference.md +3 -3
- package/src/resources/skills/create-gsd-extension/references/packaging-distribution.md +1 -1
- package/src/resources/skills/create-gsd-extension/references/remote-execution-overrides.md +3 -3
- package/src/resources/skills/create-gsd-extension/templates/extension-skeleton.ts +2 -2
- package/src/resources/skills/create-gsd-extension/templates/stateful-tool-skeleton.ts +3 -3
- package/src/resources/skills/create-gsd-extension/templates/templates.test.ts +58 -0
- package/src/resources/skills/create-gsd-extension/workflows/create-extension.md +32 -12
- package/src/resources/skills/lint/SKILL.md +4 -0
- package/src/resources/skills/review/SKILL.md +4 -0
- package/src/resources/skills/test/SKILL.md +3 -0
- package/dist/resources/extensions/browser-tools/tests/browser-tools-integration.test.mjs +0 -601
- package/dist/resources/extensions/browser-tools/tests/browser-tools-unit.test.cjs +0 -651
- package/dist/resources/extensions/browser-tools/tests/capture-sharp-optional.test.cjs +0 -91
- package/dist/resources/extensions/gsd/tests/auto-supervisor.test.mjs +0 -53
- package/dist/resources/extensions/gsd/tests/dist-redirect.mjs +0 -112
- package/dist/resources/extensions/gsd/tests/resolve-ts-hooks.mjs +0 -23
- package/dist/resources/extensions/gsd/tests/resolve-ts.mjs +0 -5
- package/dist/resources/skills/github-workflows/references/gh/tests/__init__.py +0 -0
- package/dist/resources/skills/github-workflows/references/gh/tests/test_github_project_setup.py +0 -608
- package/dist/web/standalone/.next/static/chunks/2826.e9f5195e91f9cad2.js +0 -11
- package/dist/web/standalone/.next/static/chunks/3621.fc7480022c972438.js +0 -20
- package/dist/web/standalone/.next/static/chunks/app/page-151349214571e2b6.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/chunks/webpack-2e68521d7c82f7c2.js +0 -1
- package/src/resources/extensions/gsd/tests/copy-planning-artifacts-samepath.test.ts +0 -22
- package/src/resources/extensions/gsd/tests/discuss-slice-structured-questions.test.ts +0 -47
- package/src/resources/extensions/gsd/tests/empty-content-abort-loop.test.ts +0 -75
- /package/dist/web/standalone/.next/static/{C1zT2kEfoLhDdbWPWKrXd → hcvW7f3yv1JHzlWe7tIc6}/_buildManifest.js +0 -0
- /package/dist/web/standalone/.next/static/{C1zT2kEfoLhDdbWPWKrXd → hcvW7f3yv1JHzlWe7tIc6}/_ssgManifest.js +0 -0
|
@@ -8,7 +8,7 @@
|
|
|
8
8
|
import { existsSync, readFileSync, writeFileSync } from "node:fs";
|
|
9
9
|
import { homedir } from "node:os";
|
|
10
10
|
import { join } from "node:path";
|
|
11
|
-
import { defaultRoutingConfig } from "./model-router.js";
|
|
11
|
+
import { canonicalModelForTier, defaultRoutingConfig, resolveModelForTier } from "./model-router.js";
|
|
12
12
|
import { loadEffectiveGSDPreferences, getGlobalGSDPreferencesPath } from "./preferences.js";
|
|
13
13
|
/**
|
|
14
14
|
* Resolve which model ID to use for a given auto-mode unit type.
|
|
@@ -27,7 +27,7 @@ export function resolveModelForUnit(unitType) {
|
|
|
27
27
|
* - Extended: `planning: { model: claude-opus-4-6, fallbacks: [glm-5, minimax-m2.5] }`
|
|
28
28
|
*/
|
|
29
29
|
export function resolveModelWithFallbacksForUnit(unitType) {
|
|
30
|
-
const prefs = loadEffectiveGSDPreferences();
|
|
30
|
+
const prefs = loadEffectiveGSDPreferences(undefined, { availableModelIds: [] });
|
|
31
31
|
if (!prefs?.preferences.models)
|
|
32
32
|
return undefined;
|
|
33
33
|
const m = prefs.preferences.models;
|
|
@@ -110,7 +110,7 @@ export function resolveModelWithFallbacksForUnit(unitType) {
|
|
|
110
110
|
* configured.
|
|
111
111
|
*/
|
|
112
112
|
export function resolveDefaultSessionModel(sessionProvider) {
|
|
113
|
-
const prefs = loadEffectiveGSDPreferences();
|
|
113
|
+
const prefs = loadEffectiveGSDPreferences(undefined, { availableModelIds: [] });
|
|
114
114
|
if (!prefs?.preferences.models)
|
|
115
115
|
return undefined;
|
|
116
116
|
const m = prefs.preferences.models;
|
|
@@ -323,22 +323,80 @@ export function resolveAutoSupervisorConfig() {
|
|
|
323
323
|
}
|
|
324
324
|
// ─── Token Profile Resolution ─────────────────────────────────────────────
|
|
325
325
|
const VALID_TOKEN_PROFILES = new Set(["budget", "balanced", "quality", "burn-max"]);
|
|
326
|
+
/**
|
|
327
|
+
* Per-phase tier intentions for each token profile.
|
|
328
|
+
* Profiles express capability tiers, not model IDs. Concrete model
|
|
329
|
+
* resolution happens at runtime via resolveModelForTier() which is
|
|
330
|
+
* provider-agnostic — it picks the best available model at each tier.
|
|
331
|
+
*/
|
|
332
|
+
const PROFILE_TIER_MAP = {
|
|
333
|
+
budget: {
|
|
334
|
+
planning: "standard",
|
|
335
|
+
research: "light",
|
|
336
|
+
execution: "standard",
|
|
337
|
+
execution_simple: "light",
|
|
338
|
+
completion: "light",
|
|
339
|
+
subagent: "light",
|
|
340
|
+
},
|
|
341
|
+
balanced: {
|
|
342
|
+
planning: "standard",
|
|
343
|
+
research: "standard",
|
|
344
|
+
execution: "standard",
|
|
345
|
+
execution_simple: "light",
|
|
346
|
+
completion: "light",
|
|
347
|
+
subagent: "light",
|
|
348
|
+
},
|
|
349
|
+
quality: {
|
|
350
|
+
planning: "heavy",
|
|
351
|
+
research: "standard",
|
|
352
|
+
execution: "standard",
|
|
353
|
+
execution_simple: "light",
|
|
354
|
+
completion: "light",
|
|
355
|
+
subagent: "standard",
|
|
356
|
+
},
|
|
357
|
+
// burn-max intentionally omits a tier map: it never writes model defaults
|
|
358
|
+
// (it preserves the user's explicit model selection), so resolveProfileDefaults
|
|
359
|
+
// skips model resolution for this profile.
|
|
360
|
+
"burn-max": {},
|
|
361
|
+
};
|
|
326
362
|
/**
|
|
327
363
|
* Resolve profile defaults for a given token profile tier.
|
|
328
364
|
* Returns a partial GSDPreferences that is used as the base layer --
|
|
329
365
|
* explicit user preferences always override these defaults.
|
|
366
|
+
*
|
|
367
|
+
* Model IDs are resolved from capability tiers, not hardcoded to any
|
|
368
|
+
* provider. When available models are known (runtime), the resolver picks
|
|
369
|
+
* the best match across all configured providers. When not known (e.g.,
|
|
370
|
+
* early startup), falls back to canonical Anthropic model IDs.
|
|
371
|
+
*
|
|
372
|
+
* @param profile The token profile to resolve
|
|
373
|
+
* @param availableModelIds Optional list of available model IDs for cross-provider resolution.
|
|
374
|
+
* Undefined means the registry is unavailable.
|
|
375
|
+
* @param routingConfig Optional routing config for tier model pins.
|
|
330
376
|
*/
|
|
331
|
-
export function resolveProfileDefaults(profile) {
|
|
377
|
+
export function resolveProfileDefaults(profile, availableModelIds, routingConfig = defaultRoutingConfig()) {
|
|
378
|
+
// burn-max never writes model defaults — preserve user-selected models.
|
|
379
|
+
// For the other three profiles, derive concrete model IDs from the tier map
|
|
380
|
+
// against the available-model list when the registry is provided. If callers
|
|
381
|
+
// omit the registry entirely, use canonical fallbacks explicitly.
|
|
382
|
+
const tierMap = PROFILE_TIER_MAP[profile];
|
|
383
|
+
const resolveTierModel = (tier) => Array.isArray(availableModelIds)
|
|
384
|
+
? resolveModelForTier(tier, availableModelIds, routingConfig)
|
|
385
|
+
: canonicalModelForTier(tier);
|
|
386
|
+
const models = profile === "burn-max"
|
|
387
|
+
? undefined
|
|
388
|
+
: {
|
|
389
|
+
planning: resolveTierModel(tierMap.planning),
|
|
390
|
+
research: resolveTierModel(tierMap.research),
|
|
391
|
+
execution: resolveTierModel(tierMap.execution),
|
|
392
|
+
execution_simple: resolveTierModel(tierMap.execution_simple),
|
|
393
|
+
completion: resolveTierModel(tierMap.completion),
|
|
394
|
+
subagent: resolveTierModel(tierMap.subagent),
|
|
395
|
+
};
|
|
332
396
|
switch (profile) {
|
|
333
397
|
case "budget":
|
|
334
398
|
return {
|
|
335
|
-
models
|
|
336
|
-
planning: "claude-sonnet-4-5-20250514",
|
|
337
|
-
execution: "claude-sonnet-4-5-20250514",
|
|
338
|
-
execution_simple: "claude-haiku-4-5-20250414",
|
|
339
|
-
completion: "claude-haiku-4-5-20250414",
|
|
340
|
-
subagent: "claude-haiku-4-5-20250414",
|
|
341
|
-
},
|
|
399
|
+
models,
|
|
342
400
|
phases: {
|
|
343
401
|
skip_research: true,
|
|
344
402
|
skip_reassess: true,
|
|
@@ -348,9 +406,7 @@ export function resolveProfileDefaults(profile) {
|
|
|
348
406
|
};
|
|
349
407
|
case "balanced":
|
|
350
408
|
return {
|
|
351
|
-
models
|
|
352
|
-
subagent: "claude-sonnet-4-5-20250514",
|
|
353
|
-
},
|
|
409
|
+
models,
|
|
354
410
|
phases: {
|
|
355
411
|
skip_research: true,
|
|
356
412
|
skip_reassess: true,
|
|
@@ -359,7 +415,7 @@ export function resolveProfileDefaults(profile) {
|
|
|
359
415
|
};
|
|
360
416
|
case "quality":
|
|
361
417
|
return {
|
|
362
|
-
models
|
|
418
|
+
models,
|
|
363
419
|
phases: {
|
|
364
420
|
skip_research: true,
|
|
365
421
|
skip_slice_research: true,
|
|
@@ -384,6 +440,13 @@ export function resolveProfileDefaults(profile) {
|
|
|
384
440
|
};
|
|
385
441
|
}
|
|
386
442
|
}
|
|
443
|
+
/**
|
|
444
|
+
* Get the tier intentions for a profile without resolving to model IDs.
|
|
445
|
+
* Useful for display, debugging, and testing.
|
|
446
|
+
*/
|
|
447
|
+
export function getProfileTierMap(profile) {
|
|
448
|
+
return { ...PROFILE_TIER_MAP[profile] };
|
|
449
|
+
}
|
|
387
450
|
/**
|
|
388
451
|
* Resolve the effective token profile from preferences.
|
|
389
452
|
* Returns "balanced" when no profile is set (D046).
|
|
@@ -428,3 +491,16 @@ export function resolveSearchProviderFromPreferences() {
|
|
|
428
491
|
const prefs = loadEffectiveGSDPreferences();
|
|
429
492
|
return prefs?.preferences.search_provider;
|
|
430
493
|
}
|
|
494
|
+
/**
|
|
495
|
+
* Resolve provider IDs excluded from model selection/routing.
|
|
496
|
+
* Returns a normalized, de-duplicated list.
|
|
497
|
+
*/
|
|
498
|
+
export function resolveDisabledModelProvidersFromPreferences() {
|
|
499
|
+
const prefs = loadEffectiveGSDPreferences();
|
|
500
|
+
const raw = prefs?.preferences.disabled_model_providers;
|
|
501
|
+
if (!Array.isArray(raw))
|
|
502
|
+
return [];
|
|
503
|
+
return Array.from(new Set(raw
|
|
504
|
+
.map((provider) => provider.trim())
|
|
505
|
+
.filter((provider) => provider.length > 0)));
|
|
506
|
+
}
|
|
@@ -61,6 +61,7 @@ export const KNOWN_PREFERENCE_KEYS = new Set([
|
|
|
61
61
|
"post_unit_hooks",
|
|
62
62
|
"pre_dispatch_hooks",
|
|
63
63
|
"dynamic_routing",
|
|
64
|
+
"disabled_model_providers",
|
|
64
65
|
"uok",
|
|
65
66
|
"token_profile",
|
|
66
67
|
"phases",
|
|
@@ -79,6 +80,7 @@ export const KNOWN_PREFERENCE_KEYS = new Set([
|
|
|
79
80
|
"service_tier",
|
|
80
81
|
"forensics_dedup",
|
|
81
82
|
"show_token_cost",
|
|
83
|
+
"min_request_interval_ms",
|
|
82
84
|
"stale_commit_threshold_minutes",
|
|
83
85
|
"context_management",
|
|
84
86
|
"experimental",
|
|
@@ -620,6 +620,26 @@ export function validatePreferences(preferences) {
|
|
|
620
620
|
errors.push("dynamic_routing must be an object");
|
|
621
621
|
}
|
|
622
622
|
}
|
|
623
|
+
// ─── Disabled Model Providers ───────────────────────────────────────
|
|
624
|
+
if (preferences.disabled_model_providers !== undefined) {
|
|
625
|
+
if (Array.isArray(preferences.disabled_model_providers)) {
|
|
626
|
+
const allStrings = preferences.disabled_model_providers.every((provider) => typeof provider === "string");
|
|
627
|
+
if (!allStrings) {
|
|
628
|
+
errors.push("disabled_model_providers must be an array of strings");
|
|
629
|
+
}
|
|
630
|
+
else {
|
|
631
|
+
const normalized = preferences.disabled_model_providers
|
|
632
|
+
.map((provider) => provider.trim())
|
|
633
|
+
.filter((provider) => provider.length > 0);
|
|
634
|
+
if (normalized.length > 0) {
|
|
635
|
+
validated.disabled_model_providers = Array.from(new Set(normalized));
|
|
636
|
+
}
|
|
637
|
+
}
|
|
638
|
+
}
|
|
639
|
+
else {
|
|
640
|
+
errors.push("disabled_model_providers must be an array of strings");
|
|
641
|
+
}
|
|
642
|
+
}
|
|
623
643
|
// ─── Context Management ──────────────────────────────────────────────
|
|
624
644
|
if (preferences.context_management !== undefined) {
|
|
625
645
|
if (typeof preferences.context_management === "object" && preferences.context_management !== null) {
|
|
@@ -1153,6 +1173,18 @@ export function validatePreferences(preferences) {
|
|
|
1153
1173
|
errors.push("show_token_cost must be a boolean");
|
|
1154
1174
|
}
|
|
1155
1175
|
}
|
|
1176
|
+
// ─── Auto-Mode Request Interval ───────────────────────────────────
|
|
1177
|
+
if (preferences.min_request_interval_ms !== undefined) {
|
|
1178
|
+
if (typeof preferences.min_request_interval_ms === "number" &&
|
|
1179
|
+
Number.isFinite(preferences.min_request_interval_ms) &&
|
|
1180
|
+
preferences.min_request_interval_ms >= 0 &&
|
|
1181
|
+
preferences.min_request_interval_ms <= 2_147_483_647) {
|
|
1182
|
+
validated.min_request_interval_ms = Math.floor(preferences.min_request_interval_ms);
|
|
1183
|
+
}
|
|
1184
|
+
else {
|
|
1185
|
+
errors.push("min_request_interval_ms must be a non-negative number <= 2147483647");
|
|
1186
|
+
}
|
|
1187
|
+
}
|
|
1156
1188
|
// ─── Experimental Features ────────────────────────────────────────
|
|
1157
1189
|
if (preferences.experimental !== undefined) {
|
|
1158
1190
|
if (typeof preferences.experimental === "object" && preferences.experimental !== null) {
|
|
@@ -35,7 +35,7 @@ export function resolveSkillStalenessDays(basePath) {
|
|
|
35
35
|
return prefs?.preferences.skill_staleness_days ?? 60;
|
|
36
36
|
}
|
|
37
37
|
// ─── Re-exports: models ─────────────────────────────────────────────────────
|
|
38
|
-
export { resolveModelForUnit, resolveModelWithFallbacksForUnit, getNextFallbackModel, isTransientNetworkError, validateModelId, updatePreferencesModels, resolveDynamicRoutingConfig, resolveAutoSupervisorConfig, resolveProfileDefaults, resolveEffectiveProfile, resolveInlineLevel, resolveContextSelection, resolveSearchProviderFromPreferences, } from "./preferences-models.js";
|
|
38
|
+
export { resolveModelForUnit, resolveModelWithFallbacksForUnit, getNextFallbackModel, isTransientNetworkError, validateModelId, updatePreferencesModels, resolveDynamicRoutingConfig, resolveAutoSupervisorConfig, resolveProfileDefaults, getProfileTierMap, resolveEffectiveProfile, resolveInlineLevel, resolveContextSelection, resolveSearchProviderFromPreferences, resolveDisabledModelProvidersFromPreferences, } from "./preferences-models.js";
|
|
39
39
|
// ─── Path Constants & Getters ───────────────────────────────────────────────
|
|
40
40
|
function gsdHome() {
|
|
41
41
|
return process.env.GSD_HOME || join(homedir(), ".gsd");
|
|
@@ -76,7 +76,7 @@ export function loadProjectGSDPreferences(basePath) {
|
|
|
76
76
|
return loadPreferencesFile(projectPreferencesPath(basePath), "project")
|
|
77
77
|
?? loadPreferencesFile(legacyProjectPreferencesPathLowercase(basePath), "project");
|
|
78
78
|
}
|
|
79
|
-
export function loadEffectiveGSDPreferences(basePath) {
|
|
79
|
+
export function loadEffectiveGSDPreferences(basePath, opts) {
|
|
80
80
|
const globalPreferences = loadGlobalGSDPreferences();
|
|
81
81
|
const projectPreferences = loadProjectGSDPreferences(basePath);
|
|
82
82
|
if (!globalPreferences && !projectPreferences)
|
|
@@ -105,7 +105,7 @@ export function loadEffectiveGSDPreferences(basePath) {
|
|
|
105
105
|
// Explicit user preferences always override profile defaults.
|
|
106
106
|
const profile = result.preferences.token_profile;
|
|
107
107
|
if (profile) {
|
|
108
|
-
const profileDefaults = _resolveProfileDefaults(profile);
|
|
108
|
+
const profileDefaults = _resolveProfileDefaults(profile, opts?.availableModelIds, result.preferences.dynamic_routing);
|
|
109
109
|
result = {
|
|
110
110
|
...result,
|
|
111
111
|
preferences: mergePreferences(profileDefaults, result.preferences),
|
|
@@ -293,6 +293,7 @@ function mergePreferences(base, override) {
|
|
|
293
293
|
dynamic_routing: (base.dynamic_routing || override.dynamic_routing)
|
|
294
294
|
? { ...(base.dynamic_routing ?? {}), ...(override.dynamic_routing ?? {}) }
|
|
295
295
|
: undefined,
|
|
296
|
+
disabled_model_providers: mergeStringLists(base.disabled_model_providers, override.disabled_model_providers),
|
|
296
297
|
uok: (base.uok || override.uok)
|
|
297
298
|
? {
|
|
298
299
|
enabled: override.uok?.enabled ?? base.uok?.enabled,
|
|
@@ -346,6 +347,7 @@ function mergePreferences(base, override) {
|
|
|
346
347
|
service_tier: override.service_tier ?? base.service_tier,
|
|
347
348
|
forensics_dedup: override.forensics_dedup ?? base.forensics_dedup,
|
|
348
349
|
show_token_cost: override.show_token_cost ?? base.show_token_cost,
|
|
350
|
+
min_request_interval_ms: override.min_request_interval_ms ?? base.min_request_interval_ms,
|
|
349
351
|
codebase: (base.codebase || override.codebase)
|
|
350
352
|
? {
|
|
351
353
|
...(base.codebase ?? {}),
|
|
@@ -7,14 +7,13 @@
|
|
|
7
7
|
* Templates live at prompts/ relative to this module's directory.
|
|
8
8
|
* They use {{variableName}} syntax for substitution.
|
|
9
9
|
*
|
|
10
|
-
*
|
|
11
|
-
* This
|
|
12
|
-
*
|
|
13
|
-
*
|
|
14
|
-
* set A) can read a newer
|
|
15
|
-
*
|
|
16
|
-
*
|
|
17
|
-
* that aren't read until the end of a long auto-mode run.
|
|
10
|
+
* Templates are snapshotted shortly after module init via warmCache().
|
|
11
|
+
* This keeps import/extension-registration fast while still preventing a
|
|
12
|
+
* running session from being invalidated when another `gsd` launch overwrites
|
|
13
|
+
* ~/.gsd/agent/ with newer templates via initResources(). Without caching, the
|
|
14
|
+
* in-memory extension code (which knows variable set A) can read a newer
|
|
15
|
+
* template from disk (which expects variable set B), causing a
|
|
16
|
+
* "template declares {{X}} but no value was provided" crash mid-session.
|
|
18
17
|
*/
|
|
19
18
|
import { readFileSync, readdirSync, existsSync } from "node:fs";
|
|
20
19
|
import { GSDError, GSD_PARSE_ERROR } from "./errors.js";
|
|
@@ -69,8 +68,8 @@ const templatesDir = join(__extensionDir, "templates");
|
|
|
69
68
|
export function getTemplatesDir() {
|
|
70
69
|
return templatesDir;
|
|
71
70
|
}
|
|
72
|
-
// Cache all templates
|
|
73
|
-
// template versions that were on disk
|
|
71
|
+
// Cache all templates from a startup snapshot — a running session uses the
|
|
72
|
+
// template versions that were on disk near startup, immune to later overwrites.
|
|
74
73
|
const templateCache = new Map();
|
|
75
74
|
/**
|
|
76
75
|
* Eagerly read all .md files from prompts/ and templates/ into cache.
|
|
@@ -112,8 +111,20 @@ function warmCache() {
|
|
|
112
111
|
}
|
|
113
112
|
}
|
|
114
113
|
}
|
|
115
|
-
|
|
116
|
-
|
|
114
|
+
let warmCacheScheduled = false;
|
|
115
|
+
function scheduleWarmCache() {
|
|
116
|
+
if (warmCacheScheduled)
|
|
117
|
+
return;
|
|
118
|
+
warmCacheScheduled = true;
|
|
119
|
+
const run = () => {
|
|
120
|
+
warmCache();
|
|
121
|
+
};
|
|
122
|
+
const timer = setTimeout(run, 1000);
|
|
123
|
+
timer.unref?.();
|
|
124
|
+
}
|
|
125
|
+
// Snapshot the full prompt/template tree after import so extension startup only
|
|
126
|
+
// pays for prompts that are actually needed immediately.
|
|
127
|
+
scheduleWarmCache();
|
|
117
128
|
/**
|
|
118
129
|
* Load a prompt template and substitute variables.
|
|
119
130
|
*
|
|
@@ -16,6 +16,16 @@ Start with what the excerpts give you. Read full files when the section heads si
|
|
|
16
16
|
|
|
17
17
|
**On-demand Read ordering:** Complete all slice SUMMARY Reads you need for cross-slice synthesis, the Decision Re-evaluation table, and LEARNINGS **before** calling `gsd_complete_milestone` (step 10). Once that tool runs, the milestone is marked complete in the DB — running out of tool budget between step 10 and the LEARNINGS write (step 12) leaves the milestone committed without its LEARNINGS artifact.
|
|
18
18
|
|
|
19
|
+
### Delegate Review Work
|
|
20
|
+
|
|
21
|
+
This unit runs under the `planning-dispatch` tools-policy: you may use the `subagent` tool to delegate review work that benefits from a fresh context window. For non-trivial milestones, delegate before drafting LEARNINGS:
|
|
22
|
+
|
|
23
|
+
- **Cross-slice integrations or new public APIs** → dispatch the **reviewer** agent with the milestone diff and roadmap; treat its findings as input to your Decision Re-evaluation and LEARNINGS sections.
|
|
24
|
+
- **Touched auth, network, parsing, file IO, shell exec, or crypto** → dispatch the **security** agent for an OWASP-style audit across the merged slices.
|
|
25
|
+
- **Significant test surface added or changed** → dispatch the **tester** agent to assess coverage gaps relative to the milestone success criteria.
|
|
26
|
+
|
|
27
|
+
Subagents read the diff and report findings — they do **not** write user source. Apply their feedback into the milestone summary and any captured decisions before calling `gsd_complete_milestone`.
|
|
28
|
+
|
|
19
29
|
{{inlinedContext}}
|
|
20
30
|
|
|
21
31
|
Then:
|
|
@@ -20,6 +20,16 @@ All relevant context has been preloaded below — the slice plan, all task summa
|
|
|
20
20
|
|
|
21
21
|
**Match effort to complexity.** A simple slice with 1-2 tasks needs a brief summary and lightweight verification. A complex slice with 5 tasks across multiple subsystems needs thorough verification and a detailed summary. Scale the work below accordingly.
|
|
22
22
|
|
|
23
|
+
### Delegate Review Work
|
|
24
|
+
|
|
25
|
+
This unit runs under the `planning-dispatch` tools-policy: you may use the `subagent` tool to delegate review work that benefits from a fresh context window. Strongly consider delegating when the slice is non-trivial:
|
|
26
|
+
|
|
27
|
+
- **Cross-cutting code or new abstractions** → dispatch the **reviewer** agent with the slice diff and plan; apply High/Critical findings before completing.
|
|
28
|
+
- **Touched auth, network, parsing, file IO, shell exec, or crypto** → dispatch the **security** agent for an OWASP-style audit.
|
|
29
|
+
- **Added or modified tests** → dispatch the **tester** agent to assess coverage gaps relative to the slice plan.
|
|
30
|
+
|
|
31
|
+
Subagents read the diff and report findings — they do **not** write user source. You remain responsible for acting on their feedback before calling `gsd_complete_slice` with `milestoneId` and `sliceId`.
|
|
32
|
+
|
|
23
33
|
Then:
|
|
24
34
|
1. Use the **Slice Summary** and **UAT** output templates from the inlined context above
|
|
25
35
|
2. {{skillActivation}}
|
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
**Working directory:** `{{workingDirectory}}`. All file reads, writes, and shell commands MUST operate relative to this directory. Do NOT `cd` to any other directory.
|
|
2
|
+
|
|
1
3
|
Discuss milestone {{milestoneId}} ("{{milestoneTitle}}"). Identify gray areas, ask the user about them, and write `{{milestoneId}}-CONTEXT.md` in the milestone directory with the decisions. Use the **Context** output template below. If a `GSD Skill Preferences` block is present in system context, use it to decide which skills to load and follow; do not override required artifact rules.
|
|
2
4
|
|
|
3
5
|
**Structured questions available: {{structuredQuestionsAvailable}}**
|
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
# Parallel Slice Research
|
|
2
2
|
|
|
3
|
+
**Working directory:** `{{workingDirectory}}`. All file reads, writes, and shell commands MUST operate relative to this directory. Do NOT `cd` to any other directory.
|
|
4
|
+
|
|
3
5
|
You are dispatching parallel research agents for **{{sliceCount}} slices** in milestone **{{mid}} — {{midTitle}}**.
|
|
4
6
|
|
|
5
7
|
## Slices to Research
|
|
@@ -20,6 +20,16 @@ Pay particular attention to **Forward Intelligence** sections — they contain h
|
|
|
20
20
|
|
|
21
21
|
You have full tool access. Before decomposing, explore the relevant code to ground your plan in reality.
|
|
22
22
|
|
|
23
|
+
### Delegate Recon and Sub-Decomposition When Useful
|
|
24
|
+
|
|
25
|
+
This unit runs under the `planning-dispatch` tools-policy: you may use the `subagent` tool to delegate work that benefits from an isolated context window. Prefer delegation over inline work when:
|
|
26
|
+
|
|
27
|
+
- You'd otherwise read more than ~3 files to understand a subsystem → dispatch the **scout** agent for codebase recon and work from its compressed report.
|
|
28
|
+
- The slice spans multiple subsystems and the decomposition isn't obvious → dispatch the **planner** agent or use the **decompose-into-slices** skill on a focused sub-area, then integrate.
|
|
29
|
+
- You need current external information (library docs, API behavior, recent changes) → dispatch the **researcher** agent.
|
|
30
|
+
|
|
31
|
+
**Do not** dispatch implementation-tier agents (`worker`, `refactorer`, `tester`) from this unit — they would write user source and bypass this unit's write isolation. Implementation belongs in `execute-task`.
|
|
32
|
+
|
|
23
33
|
### Verify Roadmap Assumptions (JIT Reassessment — ADR-003 §4)
|
|
24
34
|
|
|
25
35
|
Before planning this slice, verify that the roadmap's assumptions still hold given prior slice summaries. Check inlined dependency summaries (below) for discovered constraints, changed approaches, or flagged fragility.
|
|
@@ -20,6 +20,16 @@ Pay particular attention to **Forward Intelligence** sections — they contain h
|
|
|
20
20
|
|
|
21
21
|
## Your Role in the Pipeline
|
|
22
22
|
|
|
23
|
+
### Delegate Recon When Useful
|
|
24
|
+
|
|
25
|
+
This unit runs under the `planning-dispatch` tools-policy: you may use the `subagent` tool to delegate recon and sub-decomposition. Prefer delegation over inline work when:
|
|
26
|
+
|
|
27
|
+
- You'd otherwise read more than ~3 files to understand a subsystem touched by the sketch → dispatch the **scout** agent and work from its compressed report.
|
|
28
|
+
- A specific area of the refinement needs deeper architectural analysis → dispatch the **planner** agent for a focused sub-plan, then integrate.
|
|
29
|
+
- You need current external information (library docs, API behavior) → dispatch the **researcher** agent.
|
|
30
|
+
|
|
31
|
+
**Do not** dispatch implementation-tier agents (`worker`, `refactorer`, `tester`) — they would write user source and bypass write isolation. Implementation belongs in `execute-task`.
|
|
32
|
+
|
|
23
33
|
### Respect the Sketch Scope
|
|
24
34
|
|
|
25
35
|
The sketch scope inlined above is a **hard constraint**. Plan within it. If, after exploring the codebase, the scope is too narrow to deliver the goal, surface this as a deviation in the plan's narrative and still produce the plan — do not silently expand the scope.
|
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
You are executing GSD auto-mode.
|
|
2
2
|
|
|
3
|
+
**Working directory:** `{{workingDirectory}}`. All file reads, writes, and shell commands MUST operate relative to this directory. Do NOT `cd` to any other directory.
|
|
4
|
+
|
|
3
5
|
## UNIT: Rewrite Documents — Apply Override(s) for Milestone {{milestoneId}} ("{{milestoneTitle}}")
|
|
4
6
|
|
|
5
7
|
An override was issued by the user that changes a fundamental decision or approach. Your job is to propagate this change across all active planning documents so they are internally consistent and future tasks execute correctly.
|
|
@@ -32,6 +32,7 @@ let sliceState = null;
|
|
|
32
32
|
// on next session start. (Issue #4980 HIGH-8)
|
|
33
33
|
const SLICE_ORCHESTRATOR_STATE_FILE = "slice-orchestrator.json";
|
|
34
34
|
const TMP_SUFFIX = ".tmp";
|
|
35
|
+
export const SLICE_WORKER_AUTO_ARGS = ["headless", "--json", "auto"];
|
|
35
36
|
function sliceStateFilePath(basePath) {
|
|
36
37
|
return join(gsdRoot(basePath), SLICE_ORCHESTRATOR_STATE_FILE);
|
|
37
38
|
}
|
|
@@ -272,7 +273,7 @@ export function getSliceOrchestratorState() {
|
|
|
272
273
|
/**
|
|
273
274
|
* Start parallel execution for eligible slices within a milestone.
|
|
274
275
|
*
|
|
275
|
-
* For each eligible slice: create a worktree, spawn `gsd --
|
|
276
|
+
* For each eligible slice: create a worktree, spawn `gsd headless --json auto`
|
|
276
277
|
* with env GSD_SLICE_LOCK=<SID> + GSD_MILESTONE_LOCK=<MID> + GSD_PARALLEL_WORKER=1.
|
|
277
278
|
*/
|
|
278
279
|
export async function startSliceParallel(basePath, milestoneId, eligibleSlices, opts = {}) {
|
|
@@ -482,8 +483,13 @@ function resolveGsdBin() {
|
|
|
482
483
|
}
|
|
483
484
|
/**
|
|
484
485
|
* Spawn a worker process for a slice.
|
|
485
|
-
* The worker runs `gsd --
|
|
486
|
+
* The worker runs `gsd headless --json auto` in the slice's worktree
|
|
486
487
|
* with GSD_SLICE_LOCK, GSD_MILESTONE_LOCK, and GSD_PARALLEL_WORKER set.
|
|
488
|
+
*
|
|
489
|
+
* Print-mode slash commands return after the command handler schedules
|
|
490
|
+
* auto-mode, so the worker process can exit before doing any LLM work. The
|
|
491
|
+
* headless auto entrypoint keeps the process alive until auto-mode reaches a
|
|
492
|
+
* terminal notification, matching milestone-level parallel workers.
|
|
487
493
|
*/
|
|
488
494
|
function spawnSliceWorker(basePath, milestoneId, sliceId) {
|
|
489
495
|
if (!sliceState)
|
|
@@ -498,7 +504,7 @@ function spawnSliceWorker(basePath, milestoneId, sliceId) {
|
|
|
498
504
|
return false;
|
|
499
505
|
let child;
|
|
500
506
|
try {
|
|
501
|
-
child = spawn(process.execPath, [binPath,
|
|
507
|
+
child = spawn(process.execPath, [binPath, ...SLICE_WORKER_AUTO_ARGS], {
|
|
502
508
|
cwd: worker.worktreePath,
|
|
503
509
|
env: {
|
|
504
510
|
...process.env,
|
|
@@ -60,6 +60,48 @@ export function isGhostMilestone(basePath, mid) {
|
|
|
60
60
|
const summary = resolveMilestoneFile(basePath, mid, "SUMMARY");
|
|
61
61
|
return !context && !draft && !roadmap && !summary;
|
|
62
62
|
}
|
|
63
|
+
/**
|
|
64
|
+
* A "reusable ghost" milestone is an orphaned filesystem stub that is safe
|
|
65
|
+
* to reclaim as the next milestone ID.
|
|
66
|
+
*
|
|
67
|
+
* Stricter than `isGhostMilestone`: returns true ONLY when ALL of the
|
|
68
|
+
* following hold:
|
|
69
|
+
* 1. No DB row exists for `mid` (any status, including "queued") — a DB row
|
|
70
|
+
* means the milestone was intentionally registered by
|
|
71
|
+
* `gsd_milestone_generate_id` and may have an in-flight discuss flow.
|
|
72
|
+
* Reusing it would collide with that flow. (#4996 race window)
|
|
73
|
+
* 2. No worktree directory exists at `gsdRoot/worktrees/{mid}` — a worktree
|
|
74
|
+
* means the milestone is legitimately in-flight.
|
|
75
|
+
* 3. No content files exist (CONTEXT, CONTEXT-DRAFT, ROADMAP, SUMMARY) —
|
|
76
|
+
* any content means the discuss flow already ran.
|
|
77
|
+
*
|
|
78
|
+
* The looser `isGhostMilestone` also classifies queued-row-without-content as
|
|
79
|
+
* a ghost to help state queries filter phantoms. `isReusableGhostMilestone`
|
|
80
|
+
* intentionally does NOT reclaim those — a queued row is sufficient proof of
|
|
81
|
+
* a live in-flight ID reservation.
|
|
82
|
+
*
|
|
83
|
+
* Used by `nextMilestoneIdReserved` and both MCP ID-generator tools to fill
|
|
84
|
+
* gaps left by phantom directories before resorting to max+1.
|
|
85
|
+
*/
|
|
86
|
+
export function isReusableGhostMilestone(basePath, mid) {
|
|
87
|
+
// Condition 1: no DB row (any status).
|
|
88
|
+
if (!isDbAvailable())
|
|
89
|
+
return false;
|
|
90
|
+
const dbRow = getMilestone(mid);
|
|
91
|
+
if (dbRow != null)
|
|
92
|
+
return false;
|
|
93
|
+
// Condition 2: no worktree.
|
|
94
|
+
const root = gsdRoot(basePath);
|
|
95
|
+
const wtPath = join(root, 'worktrees', mid);
|
|
96
|
+
if (existsSync(wtPath))
|
|
97
|
+
return false;
|
|
98
|
+
// Condition 3: no content files.
|
|
99
|
+
const context = resolveMilestoneFile(basePath, mid, "CONTEXT");
|
|
100
|
+
const draft = resolveMilestoneFile(basePath, mid, "CONTEXT-DRAFT");
|
|
101
|
+
const roadmap = resolveMilestoneFile(basePath, mid, "ROADMAP");
|
|
102
|
+
const summary = resolveMilestoneFile(basePath, mid, "SUMMARY");
|
|
103
|
+
return !context && !draft && !roadmap && !summary;
|
|
104
|
+
}
|
|
63
105
|
// ─── Query Functions ───────────────────────────────────────────────────────
|
|
64
106
|
/**
|
|
65
107
|
* Check if all tasks in a slice plan are done.
|
|
@@ -59,8 +59,25 @@ export function executeMemoryCapture(params) {
|
|
|
59
59
|
const scope = normalizeScope(params.scope);
|
|
60
60
|
const tags = normalizeTags(params.tags);
|
|
61
61
|
const structuredFields = normalizeStructuredFields(params.structuredFields);
|
|
62
|
-
|
|
62
|
+
let id;
|
|
63
|
+
try {
|
|
64
|
+
id = createMemory({ category, content, confidence, scope, tags, structuredFields });
|
|
65
|
+
}
|
|
66
|
+
catch (err) {
|
|
67
|
+
// Surface the underlying SQL message (e.g. "database disk image is
|
|
68
|
+
// malformed", "no such table: memories") so the operator gets the
|
|
69
|
+
// actionable signal instead of an opaque "create_failed". See #4967.
|
|
70
|
+
const message = err instanceof Error ? err.message : String(err);
|
|
71
|
+
return {
|
|
72
|
+
content: [{ type: "text", text: `Error: failed to create memory: ${message}` }],
|
|
73
|
+
details: { operation: "memory_capture", error: message },
|
|
74
|
+
isError: true,
|
|
75
|
+
};
|
|
76
|
+
}
|
|
63
77
|
if (!id) {
|
|
78
|
+
// DB unavailable or adapter missing — distinct from the SQL-error path
|
|
79
|
+
// above. Keep the legacy create_failed token here so any consumers that
|
|
80
|
+
// explicitly key on the unavailable case continue to work.
|
|
64
81
|
return {
|
|
65
82
|
content: [{ type: "text", text: "Error: failed to create memory." }],
|
|
66
83
|
details: { operation: "memory_capture", error: "create_failed" },
|
|
@@ -73,6 +73,18 @@ const COMMON_BUDGET_SMALL = 250_000; // ~65K tokens
|
|
|
73
73
|
// allowed-path set for the docs policy lives in one reviewable place.
|
|
74
74
|
const TOOLS_ALL = { mode: "all" };
|
|
75
75
|
const TOOLS_PLANNING = { mode: "planning" };
|
|
76
|
+
// Like TOOLS_PLANNING but permits dispatch to read-only recon/planning
|
|
77
|
+
// specialists. Runtime-enforced by write-gate.ts before the subagent tool runs.
|
|
78
|
+
const TOOLS_PLANNING_DISPATCH_RECON = {
|
|
79
|
+
mode: "planning-dispatch",
|
|
80
|
+
allowedSubagents: ["scout", "planner"],
|
|
81
|
+
};
|
|
82
|
+
// Like TOOLS_PLANNING_DISPATCH_RECON, but for closeout units that fan out
|
|
83
|
+
// verification work to review-tier specialists.
|
|
84
|
+
const TOOLS_PLANNING_DISPATCH_REVIEW = {
|
|
85
|
+
mode: "planning-dispatch",
|
|
86
|
+
allowedSubagents: ["reviewer", "security", "tester"],
|
|
87
|
+
};
|
|
76
88
|
const TOOLS_DOCS = {
|
|
77
89
|
mode: "docs",
|
|
78
90
|
// Globs are resolved relative to project basePath. The set is intentionally
|
|
@@ -177,7 +189,11 @@ export const UNIT_MANIFESTS = {
|
|
|
177
189
|
memory: "prompt-relevant",
|
|
178
190
|
codebaseMap: false,
|
|
179
191
|
preferences: "active-only",
|
|
180
|
-
|
|
192
|
+
// planning-dispatch: completion is a high-leverage place to fan out to
|
|
193
|
+
// reviewer / security / tester subagents. They read the diff and report
|
|
194
|
+
// findings; they do not write user source. Write isolation to .gsd/ is
|
|
195
|
+
// preserved.
|
|
196
|
+
tools: TOOLS_PLANNING_DISPATCH_REVIEW,
|
|
181
197
|
artifacts: {
|
|
182
198
|
// #4780 landed slice-summary as excerpt for this unit; phase 2 of
|
|
183
199
|
// the architecture will read this manifest as the source of truth
|
|
@@ -209,7 +225,10 @@ export const UNIT_MANIFESTS = {
|
|
|
209
225
|
memory: "prompt-relevant",
|
|
210
226
|
codebaseMap: true,
|
|
211
227
|
preferences: "active-only",
|
|
212
|
-
|
|
228
|
+
// planning-dispatch: allows subagent dispatch so the planner can fan out
|
|
229
|
+
// to scout for codebase recon and to planner/decompose-style specialists
|
|
230
|
+
// for sub-decomposition. Write-isolation to .gsd/ is preserved.
|
|
231
|
+
tools: TOOLS_PLANNING_DISPATCH_RECON,
|
|
213
232
|
artifacts: {
|
|
214
233
|
inline: ["roadmap", "slice-research", "dependency-summaries", "requirements", "decisions", "templates"],
|
|
215
234
|
excerpt: [],
|
|
@@ -223,7 +242,10 @@ export const UNIT_MANIFESTS = {
|
|
|
223
242
|
memory: "prompt-relevant",
|
|
224
243
|
codebaseMap: true,
|
|
225
244
|
preferences: "active-only",
|
|
226
|
-
|
|
245
|
+
// See plan-slice — same rationale: dispatch to scout/planner-style
|
|
246
|
+
// specialists during refinement is materially better than re-doing recon
|
|
247
|
+
// inline.
|
|
248
|
+
tools: TOOLS_PLANNING_DISPATCH_RECON,
|
|
227
249
|
artifacts: {
|
|
228
250
|
inline: ["slice-plan", "slice-research", "dependency-summaries", "templates"],
|
|
229
251
|
excerpt: [],
|
|
@@ -251,7 +273,10 @@ export const UNIT_MANIFESTS = {
|
|
|
251
273
|
memory: "prompt-relevant",
|
|
252
274
|
codebaseMap: false,
|
|
253
275
|
preferences: "active-only",
|
|
254
|
-
|
|
276
|
+
// See complete-milestone — same rationale: dispatch to reviewer / security /
|
|
277
|
+
// tester subagents to fan out review work without bloating this unit's
|
|
278
|
+
// context.
|
|
279
|
+
tools: TOOLS_PLANNING_DISPATCH_REVIEW,
|
|
255
280
|
artifacts: {
|
|
256
281
|
// Phase 3 migration (#4782): matches today's actual
|
|
257
282
|
// buildCompleteSlicePrompt inlining order. Overrides prepend +
|
|
@@ -6,7 +6,7 @@ import { join } from "node:path";
|
|
|
6
6
|
import { writeExportFile } from "./export.js";
|
|
7
7
|
import { gsdRoot } from "./paths.js";
|
|
8
8
|
import { stripAnsi } from "../shared/mod.js";
|
|
9
|
-
const TAB_COUNT = 10;
|
|
9
|
+
export const TAB_COUNT = 10;
|
|
10
10
|
const TAB_LABELS = [
|
|
11
11
|
"1 Progress",
|
|
12
12
|
"2 Timeline",
|
|
@@ -96,13 +96,15 @@ export function readGitBranch(projectRoot) {
|
|
|
96
96
|
}
|
|
97
97
|
}
|
|
98
98
|
/**
|
|
99
|
-
* Read MCP server names from .mcp.json
|
|
99
|
+
* Read MCP server names from .mcp.json, .gsd/mcp.json, and the global
|
|
100
|
+
* ~/.gsd/mcp.json (or $GSD_HOME/mcp.json).
|
|
100
101
|
* Returns array of server name strings.
|
|
101
102
|
*/
|
|
102
103
|
export function readMcpServerNames(projectRoot) {
|
|
103
104
|
const configPaths = [
|
|
104
105
|
join(projectRoot, ".mcp.json"),
|
|
105
106
|
join(projectRoot, ".gsd", "mcp.json"),
|
|
107
|
+
join(process.env.GSD_HOME || join(homedir(), ".gsd"), "mcp.json"),
|
|
106
108
|
];
|
|
107
109
|
const names = [];
|
|
108
110
|
const seen = new Set();
|