gsd-pi 2.73.1 → 2.74.0-dev.0306a2e
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/dist/cli-web-branch.d.ts +4 -3
- package/dist/cli-web-branch.js +10 -7
- package/dist/cli.js +184 -206
- package/dist/headless-query.js +4 -1
- package/dist/help-text.js +23 -0
- package/dist/logo.d.ts +1 -1
- package/dist/logo.js +1 -1
- package/dist/onboarding.js +59 -53
- package/dist/resource-loader.js +2 -2
- package/dist/resources/extensions/claude-code-cli/stream-adapter.js +68 -4
- package/dist/resources/extensions/gsd/activity-log.js +16 -0
- package/dist/resources/extensions/gsd/auto/detect-stuck.js +11 -4
- package/dist/resources/extensions/gsd/auto/loop.js +147 -10
- package/dist/resources/extensions/gsd/auto/phases.js +173 -13
- package/dist/resources/extensions/gsd/auto/session.js +10 -0
- package/dist/resources/extensions/gsd/auto-dispatch.js +22 -4
- package/dist/resources/extensions/gsd/auto-model-selection.js +105 -16
- package/dist/resources/extensions/gsd/auto-post-unit.js +254 -15
- package/dist/resources/extensions/gsd/auto-prompts.js +12 -0
- package/dist/resources/extensions/gsd/auto-start.js +23 -6
- package/dist/resources/extensions/gsd/auto-timeout-recovery.js +13 -0
- package/dist/resources/extensions/gsd/auto-unit-closeout.js +18 -0
- package/dist/resources/extensions/gsd/auto-verification.js +186 -3
- package/dist/resources/extensions/gsd/auto.js +65 -12
- package/dist/resources/extensions/gsd/bootstrap/register-extension.js +30 -8
- package/dist/resources/extensions/gsd/bootstrap/register-hooks.js +41 -2
- package/dist/resources/extensions/gsd/commands/catalog.js +26 -1
- package/dist/resources/extensions/gsd/commands/handlers/ops.js +25 -0
- package/dist/resources/extensions/gsd/commands/handlers/workflow.js +68 -9
- package/dist/resources/extensions/gsd/commands-add-tests.js +111 -0
- package/dist/resources/extensions/gsd/commands-backlog.js +140 -0
- package/dist/resources/extensions/gsd/commands-do.js +79 -0
- package/dist/resources/extensions/gsd/commands-extract-learnings.js +225 -0
- package/dist/resources/extensions/gsd/commands-handlers.js +8 -2
- package/dist/resources/extensions/gsd/commands-maintenance.js +6 -6
- package/dist/resources/extensions/gsd/commands-pr-branch.js +180 -0
- package/dist/resources/extensions/gsd/commands-prefs-wizard.js +1 -1
- package/dist/resources/extensions/gsd/commands-session-report.js +82 -0
- package/dist/resources/extensions/gsd/commands-ship.js +187 -0
- package/dist/resources/extensions/gsd/db-writer.js +3 -5
- package/dist/resources/extensions/gsd/docs/preferences-reference.md +15 -2
- package/dist/resources/extensions/gsd/ecosystem/gsd-extension-api.js +144 -0
- package/dist/resources/extensions/gsd/ecosystem/loader.js +145 -0
- package/dist/resources/extensions/gsd/git-service.js +49 -1
- package/dist/resources/extensions/gsd/graph-context.js +157 -0
- package/dist/resources/extensions/gsd/gsd-db.js +581 -2
- package/dist/resources/extensions/gsd/guided-flow.js +23 -0
- package/dist/resources/extensions/gsd/index.js +15 -2
- package/dist/resources/extensions/gsd/init-wizard.js +1 -0
- package/dist/resources/extensions/gsd/journal.js +27 -0
- package/dist/resources/extensions/gsd/md-importer.js +3 -4
- package/dist/resources/extensions/gsd/memory-store.js +19 -51
- package/dist/resources/extensions/gsd/metrics.js +19 -0
- package/dist/resources/extensions/gsd/milestone-validation-gates.js +13 -12
- package/dist/resources/extensions/gsd/native-git-bridge.js +7 -4
- package/dist/resources/extensions/gsd/notification-widget.js +2 -2
- package/dist/resources/extensions/gsd/parallel-orchestrator.js +33 -1
- package/dist/resources/extensions/gsd/preferences-models.js +63 -3
- package/dist/resources/extensions/gsd/preferences-types.js +2 -0
- package/dist/resources/extensions/gsd/preferences-validation.js +130 -2
- package/dist/resources/extensions/gsd/preferences.js +26 -0
- package/dist/resources/extensions/gsd/prompts/add-tests.md +35 -0
- package/dist/resources/extensions/gsd/slice-parallel-orchestrator.js +12 -2
- package/dist/resources/extensions/gsd/state.js +66 -15
- package/dist/resources/extensions/gsd/templates/PREFERENCES.md +18 -0
- package/dist/resources/extensions/gsd/tools/complete-slice.js +20 -0
- package/dist/resources/extensions/gsd/tools/validate-milestone.js +39 -4
- package/dist/resources/extensions/gsd/tools/workflow-tool-executors.js +3 -14
- package/dist/resources/extensions/gsd/triage-resolution.js +2 -5
- package/dist/resources/extensions/gsd/unit-ownership.js +1 -1
- package/dist/resources/extensions/gsd/uok/audit-toggle.js +7 -0
- package/dist/resources/extensions/gsd/uok/audit.js +40 -0
- package/dist/resources/extensions/gsd/uok/contracts.js +1 -0
- package/dist/resources/extensions/gsd/uok/execution-graph.js +179 -0
- package/dist/resources/extensions/gsd/uok/flags.js +29 -0
- package/dist/resources/extensions/gsd/uok/gate-runner.js +109 -0
- package/dist/resources/extensions/gsd/uok/gitops.js +53 -0
- package/dist/resources/extensions/gsd/uok/kernel.js +80 -0
- package/dist/resources/extensions/gsd/uok/loop-adapter.js +133 -0
- package/dist/resources/extensions/gsd/uok/model-policy.js +66 -0
- package/dist/resources/extensions/gsd/uok/plan-v2.js +132 -0
- package/dist/resources/extensions/gsd/workflow-logger.js +22 -0
- package/dist/resources/extensions/gsd/workflow-manifest.js +8 -69
- package/dist/resources/extensions/gsd/workflow-migration.js +21 -22
- package/dist/resources/extensions/gsd/workflow-projections.js +4 -1
- package/dist/resources/extensions/gsd/workflow-reconcile.js +14 -11
- package/dist/resources/extensions/ttsr/ttsr-manager.js +3 -1
- package/dist/tsconfig.extensions.tsbuildinfo +1 -0
- package/dist/update-check.d.ts +1 -0
- package/dist/update-check.js +13 -5
- package/dist/update-cmd.js +4 -3
- package/dist/web/standalone/.next/BUILD_ID +1 -1
- package/dist/web/standalone/.next/app-path-routes-manifest.json +10 -10
- package/dist/web/standalone/.next/build-manifest.json +3 -3
- package/dist/web/standalone/.next/prerender-manifest.json +3 -3
- package/dist/web/standalone/.next/required-server-files.json +3 -3
- package/dist/web/standalone/.next/server/app/_global-error/page.js +3 -3
- package/dist/web/standalone/.next/server/app/_global-error/page_client-reference-manifest.js +1 -1
- package/dist/web/standalone/.next/server/app/_global-error.html +1 -1
- package/dist/web/standalone/.next/server/app/_global-error.rsc +1 -1
- package/dist/web/standalone/.next/server/app/_global-error.segments/_full.segment.rsc +1 -1
- package/dist/web/standalone/.next/server/app/_global-error.segments/_global-error/__PAGE__.segment.rsc +1 -1
- package/dist/web/standalone/.next/server/app/_global-error.segments/_global-error.segment.rsc +1 -1
- package/dist/web/standalone/.next/server/app/_global-error.segments/_head.segment.rsc +1 -1
- package/dist/web/standalone/.next/server/app/_global-error.segments/_index.segment.rsc +1 -1
- package/dist/web/standalone/.next/server/app/_global-error.segments/_tree.segment.rsc +1 -1
- package/dist/web/standalone/.next/server/app/_not-found/page.js +2 -2
- package/dist/web/standalone/.next/server/app/_not-found/page_client-reference-manifest.js +1 -1
- package/dist/web/standalone/.next/server/app/_not-found.html +1 -1
- package/dist/web/standalone/.next/server/app/_not-found.rsc +3 -3
- package/dist/web/standalone/.next/server/app/_not-found.segments/_full.segment.rsc +3 -3
- package/dist/web/standalone/.next/server/app/_not-found.segments/_head.segment.rsc +1 -1
- package/dist/web/standalone/.next/server/app/_not-found.segments/_index.segment.rsc +3 -3
- package/dist/web/standalone/.next/server/app/_not-found.segments/_not-found/__PAGE__.segment.rsc +1 -1
- package/dist/web/standalone/.next/server/app/_not-found.segments/_not-found.segment.rsc +1 -1
- package/dist/web/standalone/.next/server/app/_not-found.segments/_tree.segment.rsc +1 -1
- package/dist/web/standalone/.next/server/app/api/boot/route.js +1 -1
- package/dist/web/standalone/.next/server/app/api/boot/route_client-reference-manifest.js +1 -1
- package/dist/web/standalone/.next/server/app/api/bridge-terminal/input/route.js +1 -1
- package/dist/web/standalone/.next/server/app/api/bridge-terminal/input/route_client-reference-manifest.js +1 -1
- package/dist/web/standalone/.next/server/app/api/bridge-terminal/resize/route.js +1 -1
- package/dist/web/standalone/.next/server/app/api/bridge-terminal/resize/route_client-reference-manifest.js +1 -1
- package/dist/web/standalone/.next/server/app/api/bridge-terminal/stream/route.js +2 -2
- package/dist/web/standalone/.next/server/app/api/bridge-terminal/stream/route_client-reference-manifest.js +1 -1
- package/dist/web/standalone/.next/server/app/api/browse-directories/route.js +1 -1
- package/dist/web/standalone/.next/server/app/api/browse-directories/route_client-reference-manifest.js +1 -1
- package/dist/web/standalone/.next/server/app/api/captures/route.js +1 -1
- package/dist/web/standalone/.next/server/app/api/captures/route_client-reference-manifest.js +1 -1
- package/dist/web/standalone/.next/server/app/api/cleanup/route.js +1 -1
- package/dist/web/standalone/.next/server/app/api/cleanup/route_client-reference-manifest.js +1 -1
- package/dist/web/standalone/.next/server/app/api/dev-mode/route.js +1 -1
- package/dist/web/standalone/.next/server/app/api/dev-mode/route_client-reference-manifest.js +1 -1
- package/dist/web/standalone/.next/server/app/api/doctor/route.js +1 -1
- package/dist/web/standalone/.next/server/app/api/doctor/route_client-reference-manifest.js +1 -1
- package/dist/web/standalone/.next/server/app/api/experimental/route.js +2 -2
- package/dist/web/standalone/.next/server/app/api/experimental/route_client-reference-manifest.js +1 -1
- package/dist/web/standalone/.next/server/app/api/export-data/route.js +1 -1
- package/dist/web/standalone/.next/server/app/api/export-data/route_client-reference-manifest.js +1 -1
- package/dist/web/standalone/.next/server/app/api/files/route.js +1 -1
- package/dist/web/standalone/.next/server/app/api/files/route_client-reference-manifest.js +1 -1
- package/dist/web/standalone/.next/server/app/api/forensics/route.js +1 -1
- package/dist/web/standalone/.next/server/app/api/forensics/route_client-reference-manifest.js +1 -1
- package/dist/web/standalone/.next/server/app/api/git/route.js +1 -1
- package/dist/web/standalone/.next/server/app/api/git/route_client-reference-manifest.js +1 -1
- package/dist/web/standalone/.next/server/app/api/history/route.js +1 -1
- package/dist/web/standalone/.next/server/app/api/history/route_client-reference-manifest.js +1 -1
- package/dist/web/standalone/.next/server/app/api/hooks/route.js +1 -1
- package/dist/web/standalone/.next/server/app/api/hooks/route_client-reference-manifest.js +1 -1
- package/dist/web/standalone/.next/server/app/api/inspect/route.js +1 -1
- package/dist/web/standalone/.next/server/app/api/inspect/route_client-reference-manifest.js +1 -1
- package/dist/web/standalone/.next/server/app/api/knowledge/route.js +1 -1
- package/dist/web/standalone/.next/server/app/api/knowledge/route_client-reference-manifest.js +1 -1
- package/dist/web/standalone/.next/server/app/api/live-state/route.js +1 -1
- package/dist/web/standalone/.next/server/app/api/live-state/route_client-reference-manifest.js +1 -1
- package/dist/web/standalone/.next/server/app/api/notifications/route.js +2 -2
- package/dist/web/standalone/.next/server/app/api/notifications/route_client-reference-manifest.js +1 -1
- package/dist/web/standalone/.next/server/app/api/onboarding/route.js +1 -1
- package/dist/web/standalone/.next/server/app/api/onboarding/route_client-reference-manifest.js +1 -1
- package/dist/web/standalone/.next/server/app/api/preferences/route.js +1 -1
- package/dist/web/standalone/.next/server/app/api/preferences/route_client-reference-manifest.js +1 -1
- package/dist/web/standalone/.next/server/app/api/projects/route.js +1 -1
- package/dist/web/standalone/.next/server/app/api/projects/route_client-reference-manifest.js +1 -1
- package/dist/web/standalone/.next/server/app/api/recovery/route.js +1 -1
- package/dist/web/standalone/.next/server/app/api/recovery/route_client-reference-manifest.js +1 -1
- package/dist/web/standalone/.next/server/app/api/remote-questions/route.js +2 -2
- package/dist/web/standalone/.next/server/app/api/remote-questions/route_client-reference-manifest.js +1 -1
- package/dist/web/standalone/.next/server/app/api/session/browser/route.js +1 -1
- package/dist/web/standalone/.next/server/app/api/session/browser/route_client-reference-manifest.js +1 -1
- package/dist/web/standalone/.next/server/app/api/session/command/route.js +1 -1
- package/dist/web/standalone/.next/server/app/api/session/command/route_client-reference-manifest.js +1 -1
- package/dist/web/standalone/.next/server/app/api/session/events/route.js +2 -2
- package/dist/web/standalone/.next/server/app/api/session/events/route_client-reference-manifest.js +1 -1
- package/dist/web/standalone/.next/server/app/api/session/manage/route.js +1 -1
- package/dist/web/standalone/.next/server/app/api/session/manage/route_client-reference-manifest.js +1 -1
- package/dist/web/standalone/.next/server/app/api/settings-data/route.js +1 -1
- package/dist/web/standalone/.next/server/app/api/settings-data/route_client-reference-manifest.js +1 -1
- package/dist/web/standalone/.next/server/app/api/shutdown/route.js +1 -1
- package/dist/web/standalone/.next/server/app/api/shutdown/route_client-reference-manifest.js +1 -1
- package/dist/web/standalone/.next/server/app/api/skill-health/route.js +1 -1
- package/dist/web/standalone/.next/server/app/api/skill-health/route_client-reference-manifest.js +1 -1
- package/dist/web/standalone/.next/server/app/api/steer/route.js +1 -1
- package/dist/web/standalone/.next/server/app/api/steer/route_client-reference-manifest.js +1 -1
- package/dist/web/standalone/.next/server/app/api/switch-root/route.js +1 -1
- package/dist/web/standalone/.next/server/app/api/switch-root/route_client-reference-manifest.js +1 -1
- package/dist/web/standalone/.next/server/app/api/terminal/input/route.js +2 -2
- package/dist/web/standalone/.next/server/app/api/terminal/input/route_client-reference-manifest.js +1 -1
- package/dist/web/standalone/.next/server/app/api/terminal/resize/route.js +2 -2
- package/dist/web/standalone/.next/server/app/api/terminal/resize/route_client-reference-manifest.js +1 -1
- package/dist/web/standalone/.next/server/app/api/terminal/sessions/route.js +2 -2
- package/dist/web/standalone/.next/server/app/api/terminal/sessions/route_client-reference-manifest.js +1 -1
- package/dist/web/standalone/.next/server/app/api/terminal/stream/route.js +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 +10 -10
- package/dist/web/standalone/.next/server/chunks/63.js +3 -3
- package/dist/web/standalone/.next/server/chunks/6897.js +3 -3
- 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.js +2 -2
- package/dist/web/standalone/.next/server/next-font-manifest.js +1 -1
- package/dist/web/standalone/.next/server/next-font-manifest.json +1 -1
- package/dist/web/standalone/.next/server/pages/404.html +1 -1
- package/dist/web/standalone/.next/server/pages/500.html +1 -1
- package/dist/web/standalone/.next/server/server-reference-manifest.json +1 -1
- package/dist/web/standalone/.next/static/chunks/app/_not-found/{page-2f24283c162b6ab3.js → page-f2a7482d42a5614b.js} +1 -1
- package/dist/web/standalone/.next/static/chunks/app/{layout-9ecfd95f343793f0.js → layout-a16c7a7ecdf0c2cf.js} +1 -1
- package/dist/web/standalone/.next/static/chunks/app/page-f1e30ab6bb269149.js +1 -0
- package/dist/web/standalone/.next/static/chunks/main-app-fdab67f7802d7832.js +1 -0
- package/dist/web/standalone/.next/static/chunks/next/dist/client/components/builtin/global-error-459824ffb8c323dd.js +1 -0
- package/dist/web/standalone/node_modules/node-pty/build/Makefile +2 -2
- package/dist/web/standalone/node_modules/node-pty/build/Release/pty.node +0 -0
- package/dist/web/standalone/node_modules/node-pty/build/pty.target.mk +14 -14
- package/dist/web/standalone/node_modules/node-pty/node-addon-api/node_addon_api.target.mk +14 -14
- package/dist/web/standalone/node_modules/node-pty/node-addon-api/node_addon_api_except.target.mk +14 -14
- package/dist/web/standalone/node_modules/node-pty/node-addon-api/node_addon_api_maybe.target.mk +14 -14
- package/dist/web/standalone/server.js +1 -1
- package/package.json +3 -3
- package/packages/daemon/package.json +2 -2
- package/packages/mcp-server/dist/index.d.ts +3 -0
- package/packages/mcp-server/dist/index.d.ts.map +1 -1
- package/packages/mcp-server/dist/index.js +3 -0
- package/packages/mcp-server/dist/index.js.map +1 -1
- package/packages/mcp-server/dist/readers/graph.d.ts +87 -0
- package/packages/mcp-server/dist/readers/graph.d.ts.map +1 -0
- package/packages/mcp-server/dist/readers/graph.js +655 -0
- package/packages/mcp-server/dist/readers/graph.js.map +1 -0
- package/packages/mcp-server/dist/readers/index.d.ts +2 -0
- package/packages/mcp-server/dist/readers/index.d.ts.map +1 -1
- package/packages/mcp-server/dist/readers/index.js +1 -0
- package/packages/mcp-server/dist/readers/index.js.map +1 -1
- package/packages/mcp-server/dist/server.d.ts.map +1 -1
- package/packages/mcp-server/dist/server.js +65 -0
- package/packages/mcp-server/dist/server.js.map +1 -1
- package/packages/mcp-server/package.json +2 -2
- package/packages/mcp-server/src/index.ts +15 -0
- package/packages/mcp-server/src/readers/graph.test.ts +604 -0
- package/packages/mcp-server/src/readers/graph.ts +855 -0
- package/packages/mcp-server/src/readers/index.ts +12 -0
- package/packages/mcp-server/src/server.ts +83 -0
- package/packages/mcp-server/tsconfig.json +1 -0
- package/packages/mcp-server/tsconfig.tsbuildinfo +1 -0
- package/packages/native/package.json +2 -2
- package/packages/native/tsconfig.tsbuildinfo +1 -0
- package/packages/pi-agent-core/package.json +1 -1
- package/packages/pi-agent-core/tsconfig.json +1 -0
- package/packages/pi-agent-core/tsconfig.tsbuildinfo +1 -0
- package/packages/pi-ai/dist/index.d.ts +2 -9
- package/packages/pi-ai/dist/index.d.ts.map +1 -1
- package/packages/pi-ai/dist/index.js +2 -9
- package/packages/pi-ai/dist/index.js.map +1 -1
- package/packages/pi-ai/dist/models/capability-patches.d.ts +19 -0
- package/packages/pi-ai/dist/models/capability-patches.d.ts.map +1 -0
- package/packages/pi-ai/dist/models/capability-patches.js +36 -0
- package/packages/pi-ai/dist/models/capability-patches.js.map +1 -0
- package/packages/pi-ai/dist/{models.custom.d.ts → models/custom.d.ts} +1 -1
- package/packages/pi-ai/dist/models/custom.d.ts.map +1 -0
- package/packages/pi-ai/dist/{models.custom.js → models/custom.js} +4 -4
- package/packages/pi-ai/dist/models/custom.js.map +1 -0
- package/packages/pi-ai/dist/models/generated/amazon-bedrock.d.ts +1482 -0
- package/packages/pi-ai/dist/models/generated/amazon-bedrock.d.ts.map +1 -0
- package/packages/pi-ai/dist/models/generated/amazon-bedrock.js +1484 -0
- package/packages/pi-ai/dist/models/generated/amazon-bedrock.js.map +1 -0
- package/packages/pi-ai/dist/models/generated/anthropic.d.ts +377 -0
- package/packages/pi-ai/dist/models/generated/anthropic.d.ts.map +1 -0
- package/packages/pi-ai/dist/models/generated/anthropic.js +379 -0
- package/packages/pi-ai/dist/models/generated/anthropic.js.map +1 -0
- package/packages/pi-ai/dist/models/generated/azure-openai-responses.d.ts +700 -0
- package/packages/pi-ai/dist/models/generated/azure-openai-responses.d.ts.map +1 -0
- package/packages/pi-ai/dist/models/generated/azure-openai-responses.js +702 -0
- package/packages/pi-ai/dist/models/generated/azure-openai-responses.js.map +1 -0
- package/packages/pi-ai/dist/models/generated/cerebras.d.ts +71 -0
- package/packages/pi-ai/dist/models/generated/cerebras.d.ts.map +1 -0
- package/packages/pi-ai/dist/models/generated/cerebras.js +73 -0
- package/packages/pi-ai/dist/models/generated/cerebras.js.map +1 -0
- package/packages/pi-ai/dist/models/generated/github-copilot.d.ts +590 -0
- package/packages/pi-ai/dist/models/generated/github-copilot.d.ts.map +1 -0
- package/packages/pi-ai/dist/models/generated/github-copilot.js +444 -0
- package/packages/pi-ai/dist/models/generated/github-copilot.js.map +1 -0
- package/packages/pi-ai/dist/models/generated/google-antigravity.d.ts +156 -0
- package/packages/pi-ai/dist/models/generated/google-antigravity.d.ts.map +1 -0
- package/packages/pi-ai/dist/models/generated/google-antigravity.js +158 -0
- package/packages/pi-ai/dist/models/generated/google-antigravity.js.map +1 -0
- package/packages/pi-ai/dist/models/generated/google-gemini-cli.d.ts +105 -0
- package/packages/pi-ai/dist/models/generated/google-gemini-cli.d.ts.map +1 -0
- package/packages/pi-ai/dist/models/generated/google-gemini-cli.js +107 -0
- package/packages/pi-ai/dist/models/generated/google-gemini-cli.js.map +1 -0
- package/packages/pi-ai/dist/models/generated/google-vertex.d.ts +207 -0
- package/packages/pi-ai/dist/models/generated/google-vertex.d.ts.map +1 -0
- package/packages/pi-ai/dist/models/generated/google-vertex.js +209 -0
- package/packages/pi-ai/dist/models/generated/google-vertex.js.map +1 -0
- package/packages/pi-ai/dist/models/generated/google.d.ts +462 -0
- package/packages/pi-ai/dist/models/generated/google.d.ts.map +1 -0
- package/packages/pi-ai/dist/models/generated/google.js +464 -0
- package/packages/pi-ai/dist/models/generated/google.js.map +1 -0
- package/packages/pi-ai/dist/models/generated/groq.d.ts +309 -0
- package/packages/pi-ai/dist/models/generated/groq.d.ts.map +1 -0
- package/packages/pi-ai/dist/models/generated/groq.js +311 -0
- package/packages/pi-ai/dist/models/generated/groq.js.map +1 -0
- package/packages/pi-ai/dist/models/generated/huggingface.d.ts +383 -0
- package/packages/pi-ai/dist/models/generated/huggingface.d.ts.map +1 -0
- package/packages/pi-ai/dist/models/generated/huggingface.js +347 -0
- package/packages/pi-ai/dist/models/generated/huggingface.js.map +1 -0
- package/packages/pi-ai/dist/{models.generated.d.ts → models/generated/index.d.ts} +1 -1
- package/packages/pi-ai/dist/{models.generated.d.ts.map → models/generated/index.d.ts.map} +1 -1
- package/packages/pi-ai/dist/models/generated/index.js +51 -0
- package/packages/pi-ai/dist/models/generated/index.js.map +1 -0
- package/packages/pi-ai/dist/models/generated/kimi-coding.d.ts +37 -0
- package/packages/pi-ai/dist/models/generated/kimi-coding.d.ts.map +1 -0
- package/packages/pi-ai/dist/models/generated/kimi-coding.js +39 -0
- package/packages/pi-ai/dist/models/generated/kimi-coding.js.map +1 -0
- package/packages/pi-ai/dist/models/generated/minimax-cn.d.ts +105 -0
- package/packages/pi-ai/dist/models/generated/minimax-cn.d.ts.map +1 -0
- package/packages/pi-ai/dist/models/generated/minimax-cn.js +107 -0
- package/packages/pi-ai/dist/models/generated/minimax-cn.js.map +1 -0
- package/packages/pi-ai/dist/models/generated/minimax.d.ts +105 -0
- package/packages/pi-ai/dist/models/generated/minimax.d.ts.map +1 -0
- package/packages/pi-ai/dist/models/generated/minimax.js +107 -0
- package/packages/pi-ai/dist/models/generated/minimax.js.map +1 -0
- package/packages/pi-ai/dist/models/generated/mistral.d.ts +445 -0
- package/packages/pi-ai/dist/models/generated/mistral.d.ts.map +1 -0
- package/packages/pi-ai/dist/models/generated/mistral.js +447 -0
- package/packages/pi-ai/dist/models/generated/mistral.js.map +1 -0
- package/packages/pi-ai/dist/models/generated/openai-codex.d.ts +139 -0
- package/packages/pi-ai/dist/models/generated/openai-codex.d.ts.map +1 -0
- package/packages/pi-ai/dist/models/generated/openai-codex.js +141 -0
- package/packages/pi-ai/dist/models/generated/openai-codex.js.map +1 -0
- package/packages/pi-ai/dist/models/generated/openai.d.ts +700 -0
- package/packages/pi-ai/dist/models/generated/openai.d.ts.map +1 -0
- package/packages/pi-ai/dist/models/generated/openai.js +702 -0
- package/packages/pi-ai/dist/models/generated/openai.js.map +1 -0
- package/packages/pi-ai/dist/models/generated/opencode-go.d.ts +122 -0
- package/packages/pi-ai/dist/models/generated/opencode-go.d.ts.map +1 -0
- package/packages/pi-ai/dist/models/generated/opencode-go.js +124 -0
- package/packages/pi-ai/dist/models/generated/opencode-go.js.map +1 -0
- package/packages/pi-ai/dist/models/generated/opencode.d.ts +530 -0
- package/packages/pi-ai/dist/models/generated/opencode.d.ts.map +1 -0
- package/packages/pi-ai/dist/models/generated/opencode.js +532 -0
- package/packages/pi-ai/dist/models/generated/opencode.js.map +1 -0
- package/packages/pi-ai/dist/models/generated/openrouter.d.ts +4270 -0
- package/packages/pi-ai/dist/models/generated/openrouter.d.ts.map +1 -0
- package/packages/pi-ai/dist/models/generated/openrouter.js +4272 -0
- package/packages/pi-ai/dist/models/generated/openrouter.js.map +1 -0
- package/packages/pi-ai/dist/models/generated/vercel-ai-gateway.d.ts +2604 -0
- package/packages/pi-ai/dist/models/generated/vercel-ai-gateway.d.ts.map +1 -0
- package/packages/pi-ai/dist/models/generated/vercel-ai-gateway.js +2606 -0
- package/packages/pi-ai/dist/models/generated/vercel-ai-gateway.js.map +1 -0
- package/packages/pi-ai/dist/models/generated/xai.d.ts +411 -0
- package/packages/pi-ai/dist/models/generated/xai.d.ts.map +1 -0
- package/packages/pi-ai/dist/models/generated/xai.js +413 -0
- package/packages/pi-ai/dist/models/generated/xai.js.map +1 -0
- package/packages/pi-ai/dist/models/generated/zai.d.ts +276 -0
- package/packages/pi-ai/dist/models/generated/zai.d.ts.map +1 -0
- package/packages/pi-ai/dist/models/generated/zai.js +239 -0
- package/packages/pi-ai/dist/models/generated/zai.js.map +1 -0
- package/packages/pi-ai/dist/models/index.d.ts +27 -0
- package/packages/pi-ai/dist/models/index.d.ts.map +1 -0
- package/packages/pi-ai/dist/models/index.js +80 -0
- package/packages/pi-ai/dist/models/index.js.map +1 -0
- package/packages/pi-ai/dist/models.d.ts +1 -36
- package/packages/pi-ai/dist/models.d.ts.map +1 -1
- package/packages/pi-ai/dist/models.generated.test.js +1 -2
- package/packages/pi-ai/dist/models.generated.test.js.map +1 -1
- package/packages/pi-ai/dist/models.js +3 -112
- package/packages/pi-ai/dist/models.js.map +1 -1
- package/packages/pi-ai/dist/models.test.js +6 -5
- package/packages/pi-ai/dist/models.test.js.map +1 -1
- package/packages/pi-ai/dist/utils/overflow.d.ts.map +1 -1
- package/packages/pi-ai/dist/utils/overflow.js +12 -0
- package/packages/pi-ai/dist/utils/overflow.js.map +1 -1
- package/packages/pi-ai/dist/utils/tests/overflow.test.d.ts +2 -0
- package/packages/pi-ai/dist/utils/tests/overflow.test.d.ts.map +1 -0
- package/packages/pi-ai/dist/utils/tests/overflow.test.js +50 -0
- package/packages/pi-ai/dist/utils/tests/overflow.test.js.map +1 -0
- package/packages/pi-ai/package.json +1 -1
- package/packages/pi-ai/scripts/generate-models.ts +74 -40
- package/packages/pi-ai/src/index.ts +5 -9
- package/packages/pi-ai/src/models/capability-patches.ts +40 -0
- package/packages/pi-ai/src/{models.custom.ts → models/custom.ts} +4 -4
- package/packages/pi-ai/src/models/generated/amazon-bedrock.ts +1486 -0
- package/packages/pi-ai/src/models/generated/anthropic.ts +381 -0
- package/packages/pi-ai/src/models/generated/azure-openai-responses.ts +704 -0
- package/packages/pi-ai/src/models/generated/cerebras.ts +75 -0
- package/packages/pi-ai/src/models/generated/github-copilot.ts +446 -0
- package/packages/pi-ai/src/models/generated/google-antigravity.ts +160 -0
- package/packages/pi-ai/src/models/generated/google-gemini-cli.ts +109 -0
- package/packages/pi-ai/src/models/generated/google-vertex.ts +211 -0
- package/packages/pi-ai/src/models/generated/google.ts +466 -0
- package/packages/pi-ai/src/models/generated/groq.ts +313 -0
- package/packages/pi-ai/src/models/generated/huggingface.ts +349 -0
- package/packages/pi-ai/src/models/generated/index.ts +52 -0
- package/packages/pi-ai/src/models/generated/kimi-coding.ts +41 -0
- package/packages/pi-ai/src/models/generated/minimax-cn.ts +109 -0
- package/packages/pi-ai/src/models/generated/minimax.ts +109 -0
- package/packages/pi-ai/src/models/generated/mistral.ts +449 -0
- package/packages/pi-ai/src/models/generated/openai-codex.ts +143 -0
- package/packages/pi-ai/src/models/generated/openai.ts +704 -0
- package/packages/pi-ai/src/models/generated/opencode-go.ts +126 -0
- package/packages/pi-ai/src/models/generated/opencode.ts +534 -0
- package/packages/pi-ai/src/models/generated/openrouter.ts +4274 -0
- package/packages/pi-ai/src/models/generated/vercel-ai-gateway.ts +2608 -0
- package/packages/pi-ai/src/models/generated/xai.ts +415 -0
- package/packages/pi-ai/src/models/generated/zai.ts +241 -0
- package/packages/pi-ai/src/models/index.ts +106 -0
- package/packages/pi-ai/src/models.generated.test.ts +1 -2
- package/packages/pi-ai/src/models.test.ts +6 -5
- package/packages/pi-ai/src/models.ts +3 -153
- package/packages/pi-ai/src/utils/overflow.ts +14 -1
- package/packages/pi-ai/src/utils/tests/overflow.test.ts +58 -0
- package/packages/pi-ai/tsconfig.json +1 -0
- package/packages/pi-ai/tsconfig.tsbuildinfo +1 -0
- package/packages/pi-coding-agent/dist/core/chat-controller-ordering.test.js +721 -8
- package/packages/pi-coding-agent/dist/core/chat-controller-ordering.test.js.map +1 -1
- package/packages/pi-coding-agent/dist/core/compaction/utils.js +5 -5
- package/packages/pi-coding-agent/dist/core/compaction/utils.js.map +1 -1
- package/packages/pi-coding-agent/dist/core/compaction-utils.test.d.ts +2 -0
- package/packages/pi-coding-agent/dist/core/compaction-utils.test.d.ts.map +1 -0
- package/packages/pi-coding-agent/dist/core/compaction-utils.test.js +45 -0
- package/packages/pi-coding-agent/dist/core/compaction-utils.test.js.map +1 -0
- package/packages/pi-coding-agent/dist/core/model-registry-env-fallback.test.d.ts +2 -0
- package/packages/pi-coding-agent/dist/core/model-registry-env-fallback.test.d.ts.map +1 -0
- package/packages/pi-coding-agent/dist/core/model-registry-env-fallback.test.js +52 -0
- package/packages/pi-coding-agent/dist/core/model-registry-env-fallback.test.js.map +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 +2 -2
- package/packages/pi-coding-agent/dist/core/model-registry.js.map +1 -1
- package/packages/pi-coding-agent/dist/modes/interactive/components/assistant-message.d.ts +12 -2
- package/packages/pi-coding-agent/dist/modes/interactive/components/assistant-message.d.ts.map +1 -1
- package/packages/pi-coding-agent/dist/modes/interactive/components/assistant-message.js +65 -28
- package/packages/pi-coding-agent/dist/modes/interactive/components/assistant-message.js.map +1 -1
- package/packages/pi-coding-agent/dist/modes/interactive/components/dynamic-border.d.ts +2 -1
- package/packages/pi-coding-agent/dist/modes/interactive/components/dynamic-border.d.ts.map +1 -1
- package/packages/pi-coding-agent/dist/modes/interactive/components/dynamic-border.js +9 -3
- package/packages/pi-coding-agent/dist/modes/interactive/components/dynamic-border.js.map +1 -1
- package/packages/pi-coding-agent/dist/modes/interactive/components/dynamic-border.test.d.ts +2 -0
- package/packages/pi-coding-agent/dist/modes/interactive/components/dynamic-border.test.d.ts.map +1 -0
- package/packages/pi-coding-agent/dist/modes/interactive/components/dynamic-border.test.js +52 -0
- package/packages/pi-coding-agent/dist/modes/interactive/components/dynamic-border.test.js.map +1 -0
- package/packages/pi-coding-agent/dist/modes/interactive/controllers/chat-controller.d.ts.map +1 -1
- package/packages/pi-coding-agent/dist/modes/interactive/controllers/chat-controller.js +305 -20
- package/packages/pi-coding-agent/dist/modes/interactive/controllers/chat-controller.js.map +1 -1
- package/packages/pi-coding-agent/dist/modes/interactive/interactive-mode-ordering.test.d.ts +2 -0
- package/packages/pi-coding-agent/dist/modes/interactive/interactive-mode-ordering.test.d.ts.map +1 -0
- package/packages/pi-coding-agent/dist/modes/interactive/interactive-mode-ordering.test.js +38 -0
- package/packages/pi-coding-agent/dist/modes/interactive/interactive-mode-ordering.test.js.map +1 -0
- package/packages/pi-coding-agent/dist/modes/interactive/interactive-mode.d.ts +13 -0
- package/packages/pi-coding-agent/dist/modes/interactive/interactive-mode.d.ts.map +1 -1
- package/packages/pi-coding-agent/dist/modes/interactive/interactive-mode.js +59 -6
- package/packages/pi-coding-agent/dist/modes/interactive/interactive-mode.js.map +1 -1
- package/packages/pi-coding-agent/package.json +1 -1
- package/packages/pi-coding-agent/src/core/chat-controller-ordering.test.ts +884 -8
- package/packages/pi-coding-agent/src/core/compaction/utils.ts +5 -5
- package/packages/pi-coding-agent/src/core/compaction-utils.test.ts +50 -0
- package/packages/pi-coding-agent/src/core/model-registry-env-fallback.test.ts +59 -0
- package/packages/pi-coding-agent/src/core/model-registry.ts +2 -1
- package/packages/pi-coding-agent/src/modes/interactive/components/assistant-message.ts +78 -32
- package/packages/pi-coding-agent/src/modes/interactive/components/dynamic-border.test.ts +73 -0
- package/packages/pi-coding-agent/src/modes/interactive/components/dynamic-border.ts +9 -3
- package/packages/pi-coding-agent/src/modes/interactive/controllers/chat-controller.ts +381 -39
- package/packages/pi-coding-agent/src/modes/interactive/interactive-mode-ordering.test.ts +44 -0
- package/packages/pi-coding-agent/src/modes/interactive/interactive-mode.ts +79 -6
- package/packages/pi-coding-agent/src/types/ambient-modules.d.ts +69 -0
- package/packages/pi-coding-agent/tsconfig.json +3 -2
- package/packages/pi-coding-agent/tsconfig.tsbuildinfo +1 -0
- package/packages/pi-tui/dist/__tests__/tui.test.js +60 -1
- package/packages/pi-tui/dist/__tests__/tui.test.js.map +1 -1
- package/packages/pi-tui/dist/tui.d.ts +8 -0
- package/packages/pi-tui/dist/tui.d.ts.map +1 -1
- package/packages/pi-tui/dist/tui.js +32 -3
- package/packages/pi-tui/dist/tui.js.map +1 -1
- package/packages/pi-tui/package.json +1 -1
- package/packages/pi-tui/src/__tests__/tui.test.ts +76 -1
- package/packages/pi-tui/src/tui.ts +31 -3
- package/packages/pi-tui/tsconfig.json +1 -0
- package/packages/pi-tui/tsconfig.tsbuildinfo +1 -0
- package/packages/rpc-client/package.json +1 -1
- package/packages/rpc-client/tsconfig.json +1 -0
- package/packages/rpc-client/tsconfig.tsbuildinfo +1 -0
- package/pkg/package.json +1 -1
- package/src/resources/extensions/claude-code-cli/stream-adapter.ts +107 -5
- package/src/resources/extensions/claude-code-cli/tests/stream-adapter.test.ts +111 -2
- package/src/resources/extensions/gsd/activity-log.ts +21 -0
- package/src/resources/extensions/gsd/auto/detect-stuck.ts +12 -4
- package/src/resources/extensions/gsd/auto/loop-deps.ts +10 -0
- package/src/resources/extensions/gsd/auto/loop.ts +159 -10
- package/src/resources/extensions/gsd/auto/phases.ts +213 -13
- package/src/resources/extensions/gsd/auto/session.ts +10 -0
- package/src/resources/extensions/gsd/auto-dispatch.ts +26 -10
- package/src/resources/extensions/gsd/auto-model-selection.ts +151 -16
- package/src/resources/extensions/gsd/auto-post-unit.ts +278 -16
- package/src/resources/extensions/gsd/auto-prompts.ts +13 -0
- package/src/resources/extensions/gsd/auto-start.ts +30 -6
- package/src/resources/extensions/gsd/auto-timeout-recovery.ts +17 -0
- package/src/resources/extensions/gsd/auto-unit-closeout.ts +25 -1
- package/src/resources/extensions/gsd/auto-verification.ts +225 -3
- package/src/resources/extensions/gsd/auto.ts +72 -16
- package/src/resources/extensions/gsd/bootstrap/register-extension.ts +38 -8
- package/src/resources/extensions/gsd/bootstrap/register-hooks.ts +52 -2
- package/src/resources/extensions/gsd/commands/catalog.ts +26 -1
- package/src/resources/extensions/gsd/commands/handlers/ops.ts +25 -0
- package/src/resources/extensions/gsd/commands/handlers/workflow.ts +74 -9
- package/src/resources/extensions/gsd/commands-add-tests.ts +137 -0
- package/src/resources/extensions/gsd/commands-backlog.ts +182 -0
- package/src/resources/extensions/gsd/commands-do.ts +109 -0
- package/src/resources/extensions/gsd/commands-extract-learnings.ts +304 -0
- package/src/resources/extensions/gsd/commands-handlers.ts +8 -2
- package/src/resources/extensions/gsd/commands-maintenance.ts +6 -6
- package/src/resources/extensions/gsd/commands-pr-branch.ts +234 -0
- package/src/resources/extensions/gsd/commands-prefs-wizard.ts +1 -1
- package/src/resources/extensions/gsd/commands-session-report.ts +101 -0
- package/src/resources/extensions/gsd/commands-ship.ts +219 -0
- package/src/resources/extensions/gsd/db-writer.ts +3 -5
- package/src/resources/extensions/gsd/docs/preferences-reference.md +15 -2
- package/src/resources/extensions/gsd/ecosystem/gsd-extension-api.ts +228 -0
- package/src/resources/extensions/gsd/ecosystem/loader.ts +201 -0
- package/src/resources/extensions/gsd/git-service.ts +68 -0
- package/src/resources/extensions/gsd/graph-context.ts +212 -0
- package/src/resources/extensions/gsd/gsd-db.ts +788 -3
- package/src/resources/extensions/gsd/guided-flow.ts +32 -0
- package/src/resources/extensions/gsd/index.ts +18 -2
- package/src/resources/extensions/gsd/init-wizard.ts +3 -2
- package/src/resources/extensions/gsd/journal.ts +30 -0
- package/src/resources/extensions/gsd/md-importer.ts +3 -5
- package/src/resources/extensions/gsd/memory-store.ts +31 -62
- package/src/resources/extensions/gsd/metrics.ts +26 -0
- package/src/resources/extensions/gsd/milestone-validation-gates.ts +13 -14
- package/src/resources/extensions/gsd/native-git-bridge.ts +11 -12
- package/src/resources/extensions/gsd/notification-widget.ts +2 -2
- package/src/resources/extensions/gsd/parallel-orchestrator.ts +40 -1
- package/src/resources/extensions/gsd/preferences-models.ts +61 -3
- package/src/resources/extensions/gsd/preferences-types.ts +44 -0
- package/src/resources/extensions/gsd/preferences-validation.ts +130 -2
- package/src/resources/extensions/gsd/preferences.ts +28 -0
- package/src/resources/extensions/gsd/prompts/add-tests.md +35 -0
- package/src/resources/extensions/gsd/session-lock.ts +14 -2
- package/src/resources/extensions/gsd/slice-parallel-orchestrator.ts +20 -1
- package/src/resources/extensions/gsd/state.ts +80 -17
- package/src/resources/extensions/gsd/templates/PREFERENCES.md +18 -0
- package/src/resources/extensions/gsd/tests/auto-loop.test.ts +9 -5
- package/src/resources/extensions/gsd/tests/auto-model-selection.test.ts +20 -0
- package/src/resources/extensions/gsd/tests/auto-post-unit-step-message.test.ts +53 -0
- package/src/resources/extensions/gsd/tests/auto-project-root-env.test.ts +7 -3
- package/src/resources/extensions/gsd/tests/auto-start-model-capture.test.ts +51 -2
- package/src/resources/extensions/gsd/tests/cold-resume-db-reopen.test.ts +6 -2
- package/src/resources/extensions/gsd/tests/commands-backlog.test.ts +158 -0
- package/src/resources/extensions/gsd/tests/commands-do.test.ts +127 -0
- package/src/resources/extensions/gsd/tests/commands-extract-learnings.test.ts +340 -0
- package/src/resources/extensions/gsd/tests/commands-pr-branch.test.ts +68 -0
- package/src/resources/extensions/gsd/tests/commands-session-report.test.ts +82 -0
- package/src/resources/extensions/gsd/tests/commands-ship.test.ts +71 -0
- package/src/resources/extensions/gsd/tests/commands-workflow-custom.test.ts +14 -0
- package/src/resources/extensions/gsd/tests/complete-milestone-false-merge.test.ts +142 -0
- package/src/resources/extensions/gsd/tests/complete-slice.test.ts +2 -2
- package/src/resources/extensions/gsd/tests/complete-task.test.ts +2 -2
- package/src/resources/extensions/gsd/tests/completed-at-reconcile.test.ts +42 -0
- package/src/resources/extensions/gsd/tests/derive-state-crossval.test.ts +3 -2
- package/src/resources/extensions/gsd/tests/derive-state-db.test.ts +3 -2
- package/src/resources/extensions/gsd/tests/derive-state-helpers.test.ts +68 -8
- package/src/resources/extensions/gsd/tests/derive-state.test.ts +3 -3
- package/src/resources/extensions/gsd/tests/extension-bootstrap-isolation.test.ts +154 -0
- package/src/resources/extensions/gsd/tests/finalize-timeout-guard.test.ts +10 -7
- package/src/resources/extensions/gsd/tests/flat-rate-routing-guard.test.ts +137 -1
- package/src/resources/extensions/gsd/tests/graph-context.test.ts +337 -0
- package/src/resources/extensions/gsd/tests/gsd-db.test.ts +1 -1
- package/src/resources/extensions/gsd/tests/health-widget.test.ts +1 -1
- package/src/resources/extensions/gsd/tests/integration/state-machine-edge-cases.test.ts +4 -2
- package/src/resources/extensions/gsd/tests/journal-integration.test.ts +68 -1
- package/src/resources/extensions/gsd/tests/md-importer.test.ts +1 -2
- package/src/resources/extensions/gsd/tests/memory-store.test.ts +2 -3
- package/src/resources/extensions/gsd/tests/model-isolation.test.ts +91 -2
- package/src/resources/extensions/gsd/tests/native-git-bridge-exec-fallback.test.ts +140 -0
- package/src/resources/extensions/gsd/tests/post-exec-retry-bypass.test.ts +79 -1
- package/src/resources/extensions/gsd/tests/post-unit-state-rebuild.test.ts +2 -1
- package/src/resources/extensions/gsd/tests/pre-execution-pause-wiring.test.ts +40 -1
- package/src/resources/extensions/gsd/tests/preferences.test.ts +47 -0
- package/src/resources/extensions/gsd/tests/register-hooks-depth-verification.test.ts +1 -1
- package/src/resources/extensions/gsd/tests/single-writer-invariant.test.ts +180 -0
- package/src/resources/extensions/gsd/tests/state-machine-full-walkthrough.test.ts +5 -7
- package/src/resources/extensions/gsd/tests/token-profile.test.ts +9 -6
- package/src/resources/extensions/gsd/tests/uok-audit-unified.test.ts +101 -0
- package/src/resources/extensions/gsd/tests/uok-contracts.test.ts +85 -0
- package/src/resources/extensions/gsd/tests/uok-execution-graph.test.ts +69 -0
- package/src/resources/extensions/gsd/tests/uok-flags.test.ts +39 -0
- package/src/resources/extensions/gsd/tests/uok-gate-runner.test.ts +70 -0
- package/src/resources/extensions/gsd/tests/uok-gitops-turn-action.test.ts +85 -0
- package/src/resources/extensions/gsd/tests/uok-gitops-wiring.test.ts +35 -0
- package/src/resources/extensions/gsd/tests/uok-model-policy.test.ts +89 -0
- package/src/resources/extensions/gsd/tests/uok-plan-v2-wiring.test.ts +167 -0
- package/src/resources/extensions/gsd/tests/uok-preferences.test.ts +42 -0
- package/src/resources/extensions/gsd/tests/validate-milestone-stuck-guard.test.ts +179 -0
- package/src/resources/extensions/gsd/tests/validate-milestone-write-order.test.ts +39 -0
- package/src/resources/extensions/gsd/tests/workflow-logger-wiring.test.ts +223 -0
- package/src/resources/extensions/gsd/tools/complete-slice.ts +26 -0
- package/src/resources/extensions/gsd/tools/validate-milestone.ts +48 -3
- package/src/resources/extensions/gsd/tools/workflow-tool-executors.ts +3 -11
- package/src/resources/extensions/gsd/triage-resolution.ts +2 -7
- package/src/resources/extensions/gsd/types.ts +14 -1
- package/src/resources/extensions/gsd/unit-ownership.ts +2 -2
- package/src/resources/extensions/gsd/uok/audit-toggle.ts +9 -0
- package/src/resources/extensions/gsd/uok/audit.ts +51 -0
- package/src/resources/extensions/gsd/uok/contracts.ts +135 -0
- package/src/resources/extensions/gsd/uok/execution-graph.ts +241 -0
- package/src/resources/extensions/gsd/uok/flags.ts +45 -0
- package/src/resources/extensions/gsd/uok/gate-runner.ts +146 -0
- package/src/resources/extensions/gsd/uok/gitops.ts +75 -0
- package/src/resources/extensions/gsd/uok/kernel.ts +105 -0
- package/src/resources/extensions/gsd/uok/loop-adapter.ts +162 -0
- package/src/resources/extensions/gsd/uok/model-policy.ts +112 -0
- package/src/resources/extensions/gsd/uok/plan-v2.ts +156 -0
- package/src/resources/extensions/gsd/workflow-logger.ts +27 -1
- package/src/resources/extensions/gsd/workflow-manifest.ts +9 -104
- package/src/resources/extensions/gsd/workflow-migration.ts +21 -29
- package/src/resources/extensions/gsd/workflow-projections.ts +8 -1
- package/src/resources/extensions/gsd/workflow-reconcile.ts +15 -15
- package/src/resources/extensions/ttsr/ttsr-manager.ts +10 -5
- package/dist/web/standalone/.next/static/chunks/app/page-7115e62689b5fd84.js +0 -1
- package/dist/web/standalone/.next/static/chunks/main-app-d3d4c336195465f9.js +0 -1
- package/dist/web/standalone/.next/static/chunks/next/dist/client/components/builtin/global-error-ab5a8926e07ec673.js +0 -1
- package/packages/pi-ai/dist/models.custom.d.ts.map +0 -1
- package/packages/pi-ai/dist/models.custom.js.map +0 -1
- package/packages/pi-ai/dist/models.generated.js +0 -14343
- package/packages/pi-ai/dist/models.generated.js.map +0 -1
- package/packages/pi-ai/src/models.generated.ts +0 -14345
- /package/dist/web/standalone/.next/static/{Qr27MOHx0lxRGnJvlhxxu → tqdo0yKKYz6fJXQnIgbdx}/_buildManifest.js +0 -0
- /package/dist/web/standalone/.next/static/{Qr27MOHx0lxRGnJvlhxxu → tqdo0yKKYz6fJXQnIgbdx}/_ssgManifest.js +0 -0
package/dist/cli-web-branch.d.ts
CHANGED
|
@@ -1,9 +1,10 @@
|
|
|
1
1
|
import { launchWebMode, stopWebMode, type WebModeLaunchStatus, type WebModeStopOptions, type WebModeStopResult } from './web-mode.js';
|
|
2
2
|
export interface CliFlags {
|
|
3
|
-
mode?: 'text' | 'json' | 'rpc';
|
|
3
|
+
mode?: 'text' | 'json' | 'rpc' | 'mcp';
|
|
4
4
|
print?: boolean;
|
|
5
5
|
continue?: boolean;
|
|
6
6
|
noSession?: boolean;
|
|
7
|
+
worktree?: boolean | string;
|
|
7
8
|
model?: string;
|
|
8
9
|
listModels?: string | true;
|
|
9
10
|
extensions: string[];
|
|
@@ -19,8 +20,8 @@ export interface CliFlags {
|
|
|
19
20
|
webPort?: number;
|
|
20
21
|
/** Additional allowed origins for CORS: `--allowed-origins http://192.168.1.10:8080` */
|
|
21
22
|
webAllowedOrigins?: string[];
|
|
22
|
-
|
|
23
|
-
|
|
23
|
+
/** Set by `gsd sessions` when the user picks a specific session to resume */
|
|
24
|
+
_selectedSessionPath?: string;
|
|
24
25
|
}
|
|
25
26
|
type WritableLike = Pick<typeof process.stderr, 'write'>;
|
|
26
27
|
export interface RunWebCliBranchDeps {
|
package/dist/cli-web-branch.js
CHANGED
|
@@ -10,7 +10,7 @@ export function parseCliArgs(argv) {
|
|
|
10
10
|
const arg = args[i];
|
|
11
11
|
if (arg === '--mode' && i + 1 < args.length) {
|
|
12
12
|
const mode = args[++i];
|
|
13
|
-
if (mode === 'text' || mode === 'json' || mode === 'rpc')
|
|
13
|
+
if (mode === 'text' || mode === 'json' || mode === 'rpc' || mode === 'mcp')
|
|
14
14
|
flags.mode = mode;
|
|
15
15
|
}
|
|
16
16
|
else if (arg === '--print' || arg === '-p') {
|
|
@@ -22,6 +22,15 @@ export function parseCliArgs(argv) {
|
|
|
22
22
|
else if (arg === '--no-session') {
|
|
23
23
|
flags.noSession = true;
|
|
24
24
|
}
|
|
25
|
+
else if (arg === '--worktree' || arg === '-w') {
|
|
26
|
+
// -w with no value → auto-generate name; -w <name> → use that name
|
|
27
|
+
if (i + 1 < args.length && !args[i + 1].startsWith('-')) {
|
|
28
|
+
flags.worktree = args[++i];
|
|
29
|
+
}
|
|
30
|
+
else {
|
|
31
|
+
flags.worktree = true;
|
|
32
|
+
}
|
|
33
|
+
}
|
|
25
34
|
else if (arg === '--web') {
|
|
26
35
|
flags.web = true;
|
|
27
36
|
// Peek at next arg — if it looks like a path (not another flag), capture it
|
|
@@ -58,12 +67,6 @@ export function parseCliArgs(argv) {
|
|
|
58
67
|
else if (arg === '--list-models') {
|
|
59
68
|
flags.listModels = (i + 1 < args.length && !args[i + 1].startsWith('-')) ? args[++i] : true;
|
|
60
69
|
}
|
|
61
|
-
else if (arg === '--version' || arg === '-v') {
|
|
62
|
-
flags.version = true;
|
|
63
|
-
}
|
|
64
|
-
else if (arg === '--help' || arg === '-h') {
|
|
65
|
-
flags.help = true;
|
|
66
|
-
}
|
|
67
70
|
else if (!arg.startsWith('--') && !arg.startsWith('-')) {
|
|
68
71
|
flags.messages.push(arg);
|
|
69
72
|
}
|
package/dist/cli.js
CHANGED
|
@@ -5,13 +5,14 @@ import { agentDir, sessionsDir, authFilePath } from './app-paths.js';
|
|
|
5
5
|
import { initResources, buildResourceLoader, getNewerManagedResourceVersion } from './resource-loader.js';
|
|
6
6
|
import { ensureManagedTools } from './tool-bootstrap.js';
|
|
7
7
|
import { loadStoredEnvKeys } from './wizard.js';
|
|
8
|
-
import { migratePiCredentials
|
|
8
|
+
import { migratePiCredentials } from './pi-migration.js';
|
|
9
9
|
import { shouldRunOnboarding, runOnboarding } from './onboarding.js';
|
|
10
10
|
import chalk from 'chalk';
|
|
11
11
|
import { checkForUpdates } from './update-check.js';
|
|
12
12
|
import { printHelp, printSubcommandHelp } from './help-text.js';
|
|
13
13
|
import { applySecurityOverrides } from './security-overrides.js';
|
|
14
|
-
import {
|
|
14
|
+
import { validateConfiguredModel } from './startup-model-validation.js';
|
|
15
|
+
import { parseCliArgs, runWebCliBranch, migrateLegacyFlatSessions, } from './cli-web-branch.js';
|
|
15
16
|
import { stopWebMode } from './web-mode.js';
|
|
16
17
|
import { getProjectSessionsDir } from './project-sessions.js';
|
|
17
18
|
import { markStartup, printStartupTimings } from './startup-timings.js';
|
|
@@ -36,112 +37,85 @@ function exitIfManagedResourcesAreNewer(currentAgentDir) {
|
|
|
36
37
|
`[gsd] Run ${chalk.bold('npm install -g gsd-pi@latest')} or ${chalk.bold('gsd update')}, then try again.\n`);
|
|
37
38
|
process.exit(1);
|
|
38
39
|
}
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
flags.extensions.push(args[++i]);
|
|
63
|
-
}
|
|
64
|
-
else if (arg === '--append-system-prompt' && i + 1 < args.length) {
|
|
65
|
-
flags.appendSystemPrompt = args[++i];
|
|
66
|
-
}
|
|
67
|
-
else if (arg === '--tools' && i + 1 < args.length) {
|
|
68
|
-
flags.tools = args[++i].split(',');
|
|
69
|
-
}
|
|
70
|
-
else if (arg === '--list-models') {
|
|
71
|
-
flags.listModels = (i + 1 < args.length && !args[i + 1].startsWith('-')) ? args[++i] : true;
|
|
72
|
-
}
|
|
73
|
-
else if (arg === '--version' || arg === '-v') {
|
|
74
|
-
process.stdout.write((process.env.GSD_VERSION || '0.0.0') + '\n');
|
|
75
|
-
process.exit(0);
|
|
76
|
-
}
|
|
77
|
-
else if (arg === '--worktree' || arg === '-w') {
|
|
78
|
-
// -w with no value → auto-generate name; -w <name> → use that name
|
|
79
|
-
if (i + 1 < args.length && !args[i + 1].startsWith('-')) {
|
|
80
|
-
flags.worktree = args[++i];
|
|
81
|
-
}
|
|
82
|
-
else {
|
|
83
|
-
flags.worktree = true;
|
|
84
|
-
}
|
|
85
|
-
}
|
|
86
|
-
else if (arg === '--help' || arg === '-h') {
|
|
87
|
-
printHelp(process.env.GSD_VERSION || '0.0.0');
|
|
88
|
-
process.exit(0);
|
|
89
|
-
}
|
|
90
|
-
else if (arg === '--web') {
|
|
91
|
-
flags.web = true;
|
|
92
|
-
// Capture optional project path after --web (not a flag)
|
|
93
|
-
if (i + 1 < args.length && !args[i + 1].startsWith('-')) {
|
|
94
|
-
flags.webPath = args[++i];
|
|
95
|
-
}
|
|
96
|
-
}
|
|
97
|
-
else if (!arg.startsWith('--') && !arg.startsWith('-')) {
|
|
98
|
-
flags.messages.push(arg);
|
|
99
|
-
}
|
|
40
|
+
// ---------------------------------------------------------------------------
|
|
41
|
+
// Shared helpers used by both the print and interactive code paths
|
|
42
|
+
// ---------------------------------------------------------------------------
|
|
43
|
+
/**
|
|
44
|
+
* Print the non-interactive-mode error and exit. Called both from the early
|
|
45
|
+
* TTY gate (before heavy init) and from the interactive-mode TTY gate right
|
|
46
|
+
* before `InteractiveMode.run()`. The `includeWebHint` variant also lists
|
|
47
|
+
* `--web` and `headless` as alternatives.
|
|
48
|
+
*/
|
|
49
|
+
function printNonTtyErrorAndExit(missing, includeWebHint) {
|
|
50
|
+
const suffix = missing ? ` but ${missing} not a TTY` : '';
|
|
51
|
+
process.stderr.write(`[gsd] Error: Interactive mode requires a terminal (TTY)${suffix}.\n`);
|
|
52
|
+
process.stderr.write('[gsd] Non-interactive alternatives:\n');
|
|
53
|
+
process.stderr.write('[gsd] gsd auto Auto-mode (pipeable, no TUI)\n');
|
|
54
|
+
process.stderr.write('[gsd] gsd --print "your message" Single-shot prompt\n');
|
|
55
|
+
if (includeWebHint) {
|
|
56
|
+
process.stderr.write('[gsd] gsd --web [path] Browser-only web mode\n');
|
|
57
|
+
}
|
|
58
|
+
process.stderr.write('[gsd] gsd --mode rpc JSON-RPC over stdin/stdout\n');
|
|
59
|
+
process.stderr.write('[gsd] gsd --mode mcp MCP server over stdin/stdout\n');
|
|
60
|
+
process.stderr.write('[gsd] gsd --mode text "message" Text output mode\n');
|
|
61
|
+
if (includeWebHint) {
|
|
62
|
+
process.stderr.write('[gsd] gsd headless Auto-mode without TUI\n');
|
|
100
63
|
}
|
|
101
|
-
|
|
64
|
+
process.exit(1);
|
|
102
65
|
}
|
|
103
66
|
/**
|
|
104
|
-
*
|
|
105
|
-
*
|
|
106
|
-
* providers so that extension models (e.g. pi-claude-cli) are visible.
|
|
67
|
+
* Print extension load/conflict errors from an extensions result. Downgrades
|
|
68
|
+
* conflicts with built-in tools to warnings (#1347).
|
|
107
69
|
*/
|
|
108
|
-
function
|
|
109
|
-
const
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
70
|
+
function printExtensionErrors(errors) {
|
|
71
|
+
for (const err of errors) {
|
|
72
|
+
const isConflict = err.error.includes('supersedes') || err.error.includes('conflicts with');
|
|
73
|
+
const prefix = isConflict ? 'Extension conflict' : 'Extension load error';
|
|
74
|
+
process.stderr.write(`[gsd] ${prefix}: ${err.error}\n`);
|
|
75
|
+
}
|
|
76
|
+
}
|
|
77
|
+
/**
|
|
78
|
+
* Re-apply the validated model to the session when `createAgentSession()`
|
|
79
|
+
* reports that it had to use a fallback. Prevents silently overriding the
|
|
80
|
+
* persisted model of resumed conversations (#3534).
|
|
81
|
+
*/
|
|
82
|
+
async function reapplyValidatedModelOnFallback(session, modelRegistry, settingsManager, fallbackMessage) {
|
|
83
|
+
if (!fallbackMessage)
|
|
84
|
+
return;
|
|
85
|
+
const validatedProvider = settingsManager.getDefaultProvider();
|
|
86
|
+
const validatedModelId = settingsManager.getDefaultModel();
|
|
87
|
+
if (!validatedProvider || !validatedModelId)
|
|
88
|
+
return;
|
|
89
|
+
const correctModel = modelRegistry.getAvailable()
|
|
90
|
+
.find((m) => m.provider === validatedProvider && m.id === validatedModelId);
|
|
91
|
+
if (!correctModel)
|
|
92
|
+
return;
|
|
93
|
+
try {
|
|
94
|
+
await session.setModel(correctModel);
|
|
133
95
|
}
|
|
134
|
-
|
|
135
|
-
|
|
96
|
+
catch {
|
|
97
|
+
// Provider not ready — leave session on its current model
|
|
136
98
|
}
|
|
137
99
|
}
|
|
138
100
|
const cliFlags = parseCliArgs(process.argv);
|
|
139
101
|
const isPrintMode = cliFlags.print || cliFlags.mode !== undefined;
|
|
140
|
-
//
|
|
141
|
-
//
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
102
|
+
// `gsd [subcommand] --help` / `-h` — print help before any subcommand runs.
|
|
103
|
+
// loader.ts only catches --help/-h as the *first* arg; here we handle the
|
|
104
|
+
// case where it appears later (e.g. `gsd update --help`, `gsd --foo --help`).
|
|
105
|
+
// Prefer subcommand-specific help when the first positional is a known
|
|
106
|
+
// subcommand, otherwise fall back to general help.
|
|
107
|
+
if (process.argv.includes('--help') || process.argv.includes('-h')) {
|
|
108
|
+
const helpSubcommand = cliFlags.messages[0];
|
|
109
|
+
const version = process.env.GSD_VERSION || '0.0.0';
|
|
110
|
+
if (!helpSubcommand || !printSubcommandHelp(helpSubcommand, version)) {
|
|
111
|
+
printHelp(version);
|
|
112
|
+
}
|
|
113
|
+
process.exit(0);
|
|
114
|
+
}
|
|
115
|
+
// RTK bootstrap — runs once per process, memoized via a module-level promise
|
|
116
|
+
// so concurrent callers await the same initialization.
|
|
117
|
+
let rtkBootstrapPromise;
|
|
118
|
+
async function doRtkBootstrap() {
|
|
145
119
|
// RTK is opt-in via experimental.rtk preference. Default: disabled.
|
|
146
120
|
// Honor GSD_RTK_DISABLED if already explicitly set in the environment
|
|
147
121
|
// (env var takes precedence over preferences for manual override).
|
|
@@ -149,42 +123,115 @@ async function ensureRtkBootstrap() {
|
|
|
149
123
|
const prefs = loadEffectiveGSDPreferences();
|
|
150
124
|
const rtkEnabled = prefs?.preferences.experimental?.rtk === true;
|
|
151
125
|
if (!rtkEnabled) {
|
|
152
|
-
process.env[GSD_RTK_DISABLED_ENV] =
|
|
126
|
+
process.env[GSD_RTK_DISABLED_ENV] = '1';
|
|
153
127
|
}
|
|
154
128
|
}
|
|
155
129
|
const rtkStatus = await bootstrapRtk();
|
|
156
|
-
ensureRtkBootstrap._done = true;
|
|
157
130
|
markStartup('bootstrapRtk');
|
|
158
131
|
if (!rtkStatus.available && rtkStatus.supported && rtkStatus.enabled && rtkStatus.reason) {
|
|
159
132
|
process.stderr.write(`[gsd] Warning: RTK unavailable — continuing without shell-command compression (${rtkStatus.reason}).\n`);
|
|
160
133
|
}
|
|
161
134
|
}
|
|
135
|
+
function ensureRtkBootstrap() {
|
|
136
|
+
return (rtkBootstrapPromise ??= doRtkBootstrap());
|
|
137
|
+
}
|
|
162
138
|
// `gsd update` — update to the latest version via npm
|
|
163
139
|
if (cliFlags.messages[0] === 'update') {
|
|
164
140
|
const { runUpdate } = await import('./update-cmd.js');
|
|
165
141
|
await runUpdate();
|
|
166
142
|
process.exit(0);
|
|
167
143
|
}
|
|
144
|
+
// ---------------------------------------------------------------------------
|
|
145
|
+
// Graph subcommand — `gsd graph build|status|query|diff`
|
|
146
|
+
// ---------------------------------------------------------------------------
|
|
147
|
+
if (cliFlags.messages[0] === 'graph') {
|
|
148
|
+
const sub = cliFlags.messages[1];
|
|
149
|
+
const { buildGraph, writeGraph, graphStatus, graphQuery, graphDiff, resolveGsdRoot } = await import('@gsd-build/mcp-server');
|
|
150
|
+
const projectDir = process.cwd();
|
|
151
|
+
const gsdRoot = resolveGsdRoot(projectDir);
|
|
152
|
+
if (!sub || sub === 'build') {
|
|
153
|
+
try {
|
|
154
|
+
const graph = await buildGraph(projectDir);
|
|
155
|
+
await writeGraph(gsdRoot, graph);
|
|
156
|
+
process.stdout.write(`Graph built: ${graph.nodes.length} nodes, ${graph.edges.length} edges\n`);
|
|
157
|
+
}
|
|
158
|
+
catch (err) {
|
|
159
|
+
process.stderr.write(`[gsd] graph build failed: ${err instanceof Error ? err.message : String(err)}\n`);
|
|
160
|
+
process.exit(1);
|
|
161
|
+
}
|
|
162
|
+
}
|
|
163
|
+
else if (sub === 'status') {
|
|
164
|
+
try {
|
|
165
|
+
const result = await graphStatus(projectDir);
|
|
166
|
+
if (!result.exists) {
|
|
167
|
+
process.stdout.write('Graph: not built yet. Run: gsd graph build\n');
|
|
168
|
+
}
|
|
169
|
+
else {
|
|
170
|
+
process.stdout.write(`Graph status:\n`);
|
|
171
|
+
process.stdout.write(` exists: ${result.exists}\n`);
|
|
172
|
+
process.stdout.write(` nodes: ${result.nodeCount}\n`);
|
|
173
|
+
process.stdout.write(` edges: ${result.edgeCount}\n`);
|
|
174
|
+
process.stdout.write(` stale: ${result.stale}\n`);
|
|
175
|
+
process.stdout.write(` ageHours: ${result.ageHours !== undefined ? result.ageHours.toFixed(2) : 'n/a'}\n`);
|
|
176
|
+
process.stdout.write(` lastBuild: ${result.lastBuild ?? 'n/a'}\n`);
|
|
177
|
+
}
|
|
178
|
+
}
|
|
179
|
+
catch (err) {
|
|
180
|
+
process.stderr.write(`[gsd] graph status failed: ${err instanceof Error ? err.message : String(err)}\n`);
|
|
181
|
+
process.exit(1);
|
|
182
|
+
}
|
|
183
|
+
}
|
|
184
|
+
else if (sub === 'query') {
|
|
185
|
+
const term = cliFlags.messages[2];
|
|
186
|
+
if (!term) {
|
|
187
|
+
process.stderr.write('Usage: gsd graph query <term>\n');
|
|
188
|
+
process.exit(1);
|
|
189
|
+
}
|
|
190
|
+
try {
|
|
191
|
+
const result = await graphQuery(projectDir, term);
|
|
192
|
+
if (result.nodes.length === 0) {
|
|
193
|
+
process.stdout.write(`No nodes found for term: "${term}"\n`);
|
|
194
|
+
}
|
|
195
|
+
else {
|
|
196
|
+
process.stdout.write(`Query results for "${term}" (${result.nodes.length} nodes, ${result.edges.length} edges):\n`);
|
|
197
|
+
for (const node of result.nodes) {
|
|
198
|
+
process.stdout.write(` [${node.type}] ${node.label} (${node.confidence})\n`);
|
|
199
|
+
}
|
|
200
|
+
}
|
|
201
|
+
}
|
|
202
|
+
catch (err) {
|
|
203
|
+
process.stderr.write(`[gsd] graph query failed: ${err instanceof Error ? err.message : String(err)}\n`);
|
|
204
|
+
process.exit(1);
|
|
205
|
+
}
|
|
206
|
+
}
|
|
207
|
+
else if (sub === 'diff') {
|
|
208
|
+
try {
|
|
209
|
+
const result = await graphDiff(projectDir);
|
|
210
|
+
process.stdout.write(`Graph diff:\n`);
|
|
211
|
+
process.stdout.write(` nodes added: ${result.nodes.added.length}\n`);
|
|
212
|
+
process.stdout.write(` nodes removed: ${result.nodes.removed.length}\n`);
|
|
213
|
+
process.stdout.write(` nodes changed: ${result.nodes.changed.length}\n`);
|
|
214
|
+
process.stdout.write(` edges added: ${result.edges.added.length}\n`);
|
|
215
|
+
process.stdout.write(` edges removed: ${result.edges.removed.length}\n`);
|
|
216
|
+
}
|
|
217
|
+
catch (err) {
|
|
218
|
+
process.stderr.write(`[gsd] graph diff failed: ${err instanceof Error ? err.message : String(err)}\n`);
|
|
219
|
+
process.exit(1);
|
|
220
|
+
}
|
|
221
|
+
}
|
|
222
|
+
else {
|
|
223
|
+
process.stderr.write(`Unknown graph command: ${sub}\n`);
|
|
224
|
+
process.stderr.write('Commands: build, status, query <term>, diff\n');
|
|
225
|
+
process.exit(1);
|
|
226
|
+
}
|
|
227
|
+
process.exit(0);
|
|
228
|
+
}
|
|
168
229
|
exitIfManagedResourcesAreNewer(agentDir);
|
|
169
230
|
// Early TTY check — must come before heavy initialization to avoid dangling
|
|
170
231
|
// handles that prevent process.exit() from completing promptly.
|
|
171
232
|
const hasSubcommand = cliFlags.messages.length > 0;
|
|
172
233
|
if (!process.stdin.isTTY && !isPrintMode && !hasSubcommand && !cliFlags.listModels && !cliFlags.web) {
|
|
173
|
-
|
|
174
|
-
process.stderr.write('[gsd] Non-interactive alternatives:\n');
|
|
175
|
-
process.stderr.write('[gsd] gsd auto Auto-mode (pipeable, no TUI)\n');
|
|
176
|
-
process.stderr.write('[gsd] gsd --print "your message" Single-shot prompt\n');
|
|
177
|
-
process.stderr.write('[gsd] gsd --mode rpc JSON-RPC over stdin/stdout\n');
|
|
178
|
-
process.stderr.write('[gsd] gsd --mode mcp MCP server over stdin/stdout\n');
|
|
179
|
-
process.stderr.write('[gsd] gsd --mode text "message" Text output mode\n');
|
|
180
|
-
process.exit(1);
|
|
181
|
-
}
|
|
182
|
-
// `gsd <subcommand> --help` — show subcommand-specific help
|
|
183
|
-
const subcommand = cliFlags.messages[0];
|
|
184
|
-
if (subcommand && process.argv.includes('--help')) {
|
|
185
|
-
if (printSubcommandHelp(subcommand, process.env.GSD_VERSION || '0.0.0')) {
|
|
186
|
-
process.exit(0);
|
|
187
|
-
}
|
|
234
|
+
printNonTtyErrorAndExit(undefined, false);
|
|
188
235
|
}
|
|
189
236
|
const packageCommand = await runPackageCommand({
|
|
190
237
|
appName: 'gsd',
|
|
@@ -207,8 +254,7 @@ if (cliFlags.messages[0] === 'config') {
|
|
|
207
254
|
}
|
|
208
255
|
// `gsd web stop [path|all]` — stop web server before anything else
|
|
209
256
|
if (cliFlags.messages[0] === 'web' && cliFlags.messages[1] === 'stop') {
|
|
210
|
-
const
|
|
211
|
-
const webBranch = await runWebCliBranch(webFlags, {
|
|
257
|
+
const webBranch = await runWebCliBranch(cliFlags, {
|
|
212
258
|
stopWebMode,
|
|
213
259
|
stderr: process.stderr,
|
|
214
260
|
baseSessionsDir: sessionsDir,
|
|
@@ -221,8 +267,7 @@ if (cliFlags.messages[0] === 'web' && cliFlags.messages[1] === 'stop') {
|
|
|
221
267
|
// `gsd --web [path]` or `gsd web [start] [path]` — launch browser-only web mode
|
|
222
268
|
if (cliFlags.web || (cliFlags.messages[0] === 'web' && cliFlags.messages[1] !== 'stop')) {
|
|
223
269
|
await ensureRtkBootstrap();
|
|
224
|
-
const
|
|
225
|
-
const webBranch = await runWebCliBranch(webFlags, {
|
|
270
|
+
const webBranch = await runWebCliBranch(cliFlags, {
|
|
226
271
|
stderr: process.stderr,
|
|
227
272
|
baseSessionsDir: sessionsDir,
|
|
228
273
|
agentDir,
|
|
@@ -297,21 +342,23 @@ if (cliFlags.messages[0] === 'headless') {
|
|
|
297
342
|
await runHeadless(parseHeadlessArgs(process.argv));
|
|
298
343
|
process.exit(0);
|
|
299
344
|
}
|
|
345
|
+
/**
|
|
346
|
+
* Run a headless command by invoking the headless entrypoint with a synthetic
|
|
347
|
+
* argv. Shared by the `auto` shorthand (#2732) and the auto-piped-stdout
|
|
348
|
+
* redirect so they use the same bootstrap + dynamic-import dance.
|
|
349
|
+
*/
|
|
350
|
+
async function runHeadlessFromAuto(headlessArgs) {
|
|
351
|
+
await ensureRtkBootstrap();
|
|
352
|
+
const { runHeadless, parseHeadlessArgs } = await import('./headless.js');
|
|
353
|
+
const argv = [process.argv[0], process.argv[1], 'headless', ...headlessArgs];
|
|
354
|
+
await runHeadless(parseHeadlessArgs(argv));
|
|
355
|
+
process.exit(0);
|
|
356
|
+
}
|
|
300
357
|
// `gsd auto [args...]` — shorthand for `gsd headless auto [args...]` (#2732)
|
|
301
358
|
// Without this, `gsd auto` falls through to the interactive TUI which hangs
|
|
302
359
|
// when stdin/stdout are piped (non-TTY environments).
|
|
303
360
|
if (cliFlags.messages[0] === 'auto') {
|
|
304
|
-
await
|
|
305
|
-
const { runHeadless, parseHeadlessArgs } = await import('./headless.js');
|
|
306
|
-
// Rewrite argv so parseHeadlessArgs sees: [node, gsd, headless, auto, ...rest]
|
|
307
|
-
const rewrittenArgv = [
|
|
308
|
-
process.argv[0],
|
|
309
|
-
process.argv[1],
|
|
310
|
-
'headless',
|
|
311
|
-
...cliFlags.messages, // ['auto', ...extra args]
|
|
312
|
-
];
|
|
313
|
-
await runHeadless(parseHeadlessArgs(rewrittenArgv));
|
|
314
|
-
process.exit(0);
|
|
361
|
+
await runHeadlessFromAuto(cliFlags.messages);
|
|
315
362
|
}
|
|
316
363
|
// Pi's tool bootstrap can mis-detect already-installed fd/rg on some systems
|
|
317
364
|
// because spawnSync(..., ["--version"]) returns EPERM despite a zero exit code.
|
|
@@ -458,37 +505,8 @@ if (isPrintMode) {
|
|
|
458
505
|
// Before this, extension-provided models (e.g. claude-code/*) were not yet in the
|
|
459
506
|
// registry, causing the user's valid choice to be silently overwritten.
|
|
460
507
|
validateConfiguredModel(modelRegistry, settingsManager);
|
|
461
|
-
|
|
462
|
-
|
|
463
|
-
// overriding the persisted model of resumed conversations (#3534).
|
|
464
|
-
if (modelFallbackMessage) {
|
|
465
|
-
const validatedProvider = settingsManager.getDefaultProvider();
|
|
466
|
-
const validatedModelId = settingsManager.getDefaultModel();
|
|
467
|
-
if (validatedProvider && validatedModelId) {
|
|
468
|
-
const correctModel = modelRegistry.getAvailable()
|
|
469
|
-
.find((m) => m.provider === validatedProvider && m.id === validatedModelId);
|
|
470
|
-
if (correctModel) {
|
|
471
|
-
try {
|
|
472
|
-
await session.setModel(correctModel);
|
|
473
|
-
}
|
|
474
|
-
catch {
|
|
475
|
-
// Provider not ready — leave session on its current model
|
|
476
|
-
}
|
|
477
|
-
}
|
|
478
|
-
}
|
|
479
|
-
}
|
|
480
|
-
if (extensionsResult.errors.length > 0) {
|
|
481
|
-
for (const err of extensionsResult.errors) {
|
|
482
|
-
// Downgrade conflicts with built-in tools to warnings (#1347)
|
|
483
|
-
const isConflict = err.error.includes("supersedes") || err.error.includes("conflicts with");
|
|
484
|
-
const prefix = isConflict ? "Extension conflict" : "Extension load error";
|
|
485
|
-
process.stderr.write(`[gsd] ${prefix}: ${err.error}\n`);
|
|
486
|
-
}
|
|
487
|
-
}
|
|
488
|
-
// Validate configured model now that extension providers are registered.
|
|
489
|
-
// Must run after createAgentSession() which flushes pendingProviderRegistrations
|
|
490
|
-
// so extension models (e.g. pi-claude-cli) are visible in the registry.
|
|
491
|
-
validateConfiguredModel(modelRegistry, settingsManager);
|
|
508
|
+
await reapplyValidatedModelOnFallback(session, modelRegistry, settingsManager, modelFallbackMessage);
|
|
509
|
+
printExtensionErrors(extensionsResult.errors);
|
|
492
510
|
// Apply --model override if specified
|
|
493
511
|
if (cliFlags.model) {
|
|
494
512
|
const available = modelRegistry.getAvailable();
|
|
@@ -579,11 +597,8 @@ if (!cliFlags.worktree && !isPrintMode) {
|
|
|
579
597
|
// which handles non-interactive output gracefully.
|
|
580
598
|
// ---------------------------------------------------------------------------
|
|
581
599
|
if (cliFlags.messages[0] === 'auto' && !process.stdout.isTTY) {
|
|
582
|
-
await ensureRtkBootstrap();
|
|
583
|
-
const { runHeadless, parseHeadlessArgs } = await import('./headless.js');
|
|
584
600
|
process.stderr.write('[gsd] stdout is not a terminal — running auto-mode in headless mode.\n');
|
|
585
|
-
await
|
|
586
|
-
process.exit(0);
|
|
601
|
+
await runHeadlessFromAuto(cliFlags.messages.slice(1));
|
|
587
602
|
}
|
|
588
603
|
// ---------------------------------------------------------------------------
|
|
589
604
|
// Interactive mode — normal TTY session
|
|
@@ -627,36 +642,8 @@ markStartup('createAgentSession');
|
|
|
627
642
|
// Before this, extension-provided models (e.g. claude-code/*) were not yet in the
|
|
628
643
|
// registry, causing the user's valid choice to be silently overwritten.
|
|
629
644
|
validateConfiguredModel(modelRegistry, settingsManager);
|
|
630
|
-
|
|
631
|
-
|
|
632
|
-
// overriding the persisted model of resumed conversations (#3534).
|
|
633
|
-
if (interactiveFallbackMsg) {
|
|
634
|
-
const validatedProvider = settingsManager.getDefaultProvider();
|
|
635
|
-
const validatedModelId = settingsManager.getDefaultModel();
|
|
636
|
-
if (validatedProvider && validatedModelId) {
|
|
637
|
-
const correctModel = modelRegistry.getAvailable()
|
|
638
|
-
.find((m) => m.provider === validatedProvider && m.id === validatedModelId);
|
|
639
|
-
if (correctModel) {
|
|
640
|
-
try {
|
|
641
|
-
await session.setModel(correctModel);
|
|
642
|
-
}
|
|
643
|
-
catch {
|
|
644
|
-
// Provider not ready — leave session on its current model
|
|
645
|
-
}
|
|
646
|
-
}
|
|
647
|
-
}
|
|
648
|
-
}
|
|
649
|
-
if (extensionsResult.errors.length > 0) {
|
|
650
|
-
for (const err of extensionsResult.errors) {
|
|
651
|
-
const isConflict = err.error.includes("supersedes") || err.error.includes("conflicts with");
|
|
652
|
-
const prefix = isConflict ? "Extension conflict" : "Extension load error";
|
|
653
|
-
process.stderr.write(`[gsd] ${prefix}: ${err.error}\n`);
|
|
654
|
-
}
|
|
655
|
-
}
|
|
656
|
-
// Validate configured model now that extension providers are registered.
|
|
657
|
-
// Must run after createAgentSession() which flushes pendingProviderRegistrations
|
|
658
|
-
// so extension models (e.g. pi-claude-cli) are visible in the registry.
|
|
659
|
-
validateConfiguredModel(modelRegistry, settingsManager);
|
|
645
|
+
await reapplyValidatedModelOnFallback(session, modelRegistry, settingsManager, interactiveFallbackMsg);
|
|
646
|
+
printExtensionErrors(extensionsResult.errors);
|
|
660
647
|
// Restore scoped models from settings on startup.
|
|
661
648
|
// The upstream InteractiveMode reads enabledModels from settings when /scoped-models is opened,
|
|
662
649
|
// but doesn't apply them to the session at startup — so Ctrl+P cycles all models instead of
|
|
@@ -704,16 +691,7 @@ if (!process.stdin.isTTY || !process.stdout.isTTY) {
|
|
|
704
691
|
: !process.stdin.isTTY
|
|
705
692
|
? 'stdin is'
|
|
706
693
|
: 'stdout is';
|
|
707
|
-
|
|
708
|
-
process.stderr.write('[gsd] Non-interactive alternatives:\n');
|
|
709
|
-
process.stderr.write('[gsd] gsd auto Auto-mode (pipeable, no TUI)\n');
|
|
710
|
-
process.stderr.write('[gsd] gsd --print "your message" Single-shot prompt\n');
|
|
711
|
-
process.stderr.write('[gsd] gsd --web [path] Browser-only web mode\n');
|
|
712
|
-
process.stderr.write('[gsd] gsd --mode rpc JSON-RPC over stdin/stdout\n');
|
|
713
|
-
process.stderr.write('[gsd] gsd --mode mcp MCP server over stdin/stdout\n');
|
|
714
|
-
process.stderr.write('[gsd] gsd --mode text "message" Text output mode\n');
|
|
715
|
-
process.stderr.write('[gsd] gsd headless Auto-mode without TUI\n');
|
|
716
|
-
process.exit(1);
|
|
694
|
+
printNonTtyErrorAndExit(missing, true);
|
|
717
695
|
}
|
|
718
696
|
// Welcome screen — shown on every fresh interactive session before TUI takes over.
|
|
719
697
|
// Skip when the first-run banner was already printed in loader.ts (prevents double banner).
|
package/dist/headless-query.js
CHANGED
|
@@ -33,7 +33,9 @@ async function loadExtensionModules() {
|
|
|
33
33
|
const dispatchModule = await jiti.import(gsdExtensionPath('auto-dispatch.ts'), {});
|
|
34
34
|
const sessionModule = await jiti.import(gsdExtensionPath('session-status-io.ts'), {});
|
|
35
35
|
const prefsModule = await jiti.import(gsdExtensionPath('preferences.ts'), {});
|
|
36
|
+
const autoStartModule = await jiti.import(gsdExtensionPath('auto-start.ts'), {});
|
|
36
37
|
return {
|
|
38
|
+
openProjectDbIfPresent: autoStartModule.openProjectDbIfPresent,
|
|
37
39
|
deriveState: stateModule.deriveState,
|
|
38
40
|
resolveDispatch: dispatchModule.resolveDispatch,
|
|
39
41
|
readAllSessionStatuses: sessionModule.readAllSessionStatuses,
|
|
@@ -42,7 +44,8 @@ async function loadExtensionModules() {
|
|
|
42
44
|
}
|
|
43
45
|
// ─── Implementation ─────────────────────────────────────────────────────────
|
|
44
46
|
export async function handleQuery(basePath) {
|
|
45
|
-
const { deriveState, resolveDispatch, readAllSessionStatuses, loadEffectiveGSDPreferences } = await loadExtensionModules();
|
|
47
|
+
const { openProjectDbIfPresent, deriveState, resolveDispatch, readAllSessionStatuses, loadEffectiveGSDPreferences, } = await loadExtensionModules();
|
|
48
|
+
await openProjectDbIfPresent(basePath);
|
|
46
49
|
const state = await deriveState(basePath);
|
|
47
50
|
// Derive next dispatch action
|
|
48
51
|
let next;
|
package/dist/help-text.js
CHANGED
|
@@ -84,6 +84,28 @@ const SUBCOMMAND_HELP = {
|
|
|
84
84
|
' gsd worktree remove old-branch Remove a specific worktree',
|
|
85
85
|
' gsd worktree remove old-branch --force Remove even with unmerged changes',
|
|
86
86
|
].join('\n'),
|
|
87
|
+
graph: [
|
|
88
|
+
'Usage: gsd graph <subcommand> [options]',
|
|
89
|
+
'',
|
|
90
|
+
'Manage the GSD project knowledge graph. Reads .gsd/ artifacts and builds',
|
|
91
|
+
'a queryable graph of milestones, slices, tasks, rules, patterns, and lessons.',
|
|
92
|
+
'',
|
|
93
|
+
'Subcommands:',
|
|
94
|
+
' build Parse .gsd/ artifacts (STATE.md, milestone ROADMAPs, slice PLANs,',
|
|
95
|
+
' KNOWLEDGE.md) and write .gsd/graphs/graph.json atomically.',
|
|
96
|
+
' query Search graph nodes by term (BFS from seed matches, budget-trimmed).',
|
|
97
|
+
' Returns matching nodes and reachable edges within the token budget.',
|
|
98
|
+
' status Show whether graph.json exists, its age, node/edge counts, and',
|
|
99
|
+
' whether it is stale (built more than 24 hours ago).',
|
|
100
|
+
' diff Compare current graph.json with .last-build-snapshot.json.',
|
|
101
|
+
' Returns added, removed, and changed nodes and edges.',
|
|
102
|
+
'',
|
|
103
|
+
'Examples:',
|
|
104
|
+
' gsd graph build Build the graph from .gsd/ artifacts',
|
|
105
|
+
' gsd graph status Check graph age and node/edge counts',
|
|
106
|
+
' gsd graph query auth Find nodes related to "auth"',
|
|
107
|
+
' gsd graph diff Show changes since last snapshot',
|
|
108
|
+
].join('\n'),
|
|
87
109
|
headless: [
|
|
88
110
|
'Usage: gsd headless [flags] [command] [args...]',
|
|
89
111
|
'',
|
|
@@ -165,6 +187,7 @@ export function printHelp(version) {
|
|
|
165
187
|
process.stdout.write(' worktree <cmd> Manage worktrees (list, merge, clean, remove)\n');
|
|
166
188
|
process.stdout.write(' auto [args] Run auto-mode without TUI (pipeable)\n');
|
|
167
189
|
process.stdout.write(' headless [cmd] [args] Run /gsd commands without TUI (default: auto)\n');
|
|
190
|
+
process.stdout.write(' graph <subcommand> Manage knowledge graph (build, query, status, diff)\n');
|
|
168
191
|
process.stdout.write('\nRun gsd <subcommand> --help for subcommand-specific help.\n');
|
|
169
192
|
}
|
|
170
193
|
export function printSubcommandHelp(subcommand, version) {
|
package/dist/logo.d.ts
CHANGED
|
@@ -10,7 +10,7 @@ export declare const GSD_LOGO: readonly string[];
|
|
|
10
10
|
/**
|
|
11
11
|
* Render the logo block with a color function applied to each line.
|
|
12
12
|
*
|
|
13
|
-
* @param color — e.g. `(s) => `\x1b[36m${s}\x1b[0m`` or
|
|
13
|
+
* @param color — e.g. `(s) => `\x1b[36m${s}\x1b[0m`` or chalk.cyan
|
|
14
14
|
* @returns Ready-to-write string with leading/trailing newlines.
|
|
15
15
|
*/
|
|
16
16
|
export declare function renderLogo(color: (s: string) => string): string;
|
package/dist/logo.js
CHANGED
|
@@ -17,7 +17,7 @@ export const GSD_LOGO = [
|
|
|
17
17
|
/**
|
|
18
18
|
* Render the logo block with a color function applied to each line.
|
|
19
19
|
*
|
|
20
|
-
* @param color — e.g. `(s) => `\x1b[36m${s}\x1b[0m`` or
|
|
20
|
+
* @param color — e.g. `(s) => `\x1b[36m${s}\x1b[0m`` or chalk.cyan
|
|
21
21
|
* @returns Ready-to-write string with leading/trailing newlines.
|
|
22
22
|
*/
|
|
23
23
|
export function renderLogo(color) {
|