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
|
@@ -25,6 +25,61 @@ const WORKFLOW_USAGE = [
|
|
|
25
25
|
" pause — Pause custom workflow auto-mode",
|
|
26
26
|
" resume — Resume paused custom workflow auto-mode",
|
|
27
27
|
].join("\n");
|
|
28
|
+
function splitWorkflowRunArgs(input) {
|
|
29
|
+
const tokens = [];
|
|
30
|
+
let current = "";
|
|
31
|
+
let quote = null;
|
|
32
|
+
let escapeNext = false;
|
|
33
|
+
for (const ch of input) {
|
|
34
|
+
if (escapeNext) {
|
|
35
|
+
current += ch;
|
|
36
|
+
escapeNext = false;
|
|
37
|
+
continue;
|
|
38
|
+
}
|
|
39
|
+
if (ch === "\\") {
|
|
40
|
+
escapeNext = true;
|
|
41
|
+
continue;
|
|
42
|
+
}
|
|
43
|
+
if (quote) {
|
|
44
|
+
if (ch === quote) {
|
|
45
|
+
quote = null;
|
|
46
|
+
}
|
|
47
|
+
else {
|
|
48
|
+
current += ch;
|
|
49
|
+
}
|
|
50
|
+
continue;
|
|
51
|
+
}
|
|
52
|
+
if (ch === '"' || ch === "'") {
|
|
53
|
+
quote = ch;
|
|
54
|
+
continue;
|
|
55
|
+
}
|
|
56
|
+
if (/\s/.test(ch)) {
|
|
57
|
+
if (current) {
|
|
58
|
+
tokens.push(current);
|
|
59
|
+
current = "";
|
|
60
|
+
}
|
|
61
|
+
continue;
|
|
62
|
+
}
|
|
63
|
+
current += ch;
|
|
64
|
+
}
|
|
65
|
+
if (escapeNext)
|
|
66
|
+
current += "\\";
|
|
67
|
+
if (current)
|
|
68
|
+
tokens.push(current);
|
|
69
|
+
return tokens;
|
|
70
|
+
}
|
|
71
|
+
export function parseWorkflowRunArgs(args) {
|
|
72
|
+
const parts = splitWorkflowRunArgs(args);
|
|
73
|
+
const defName = parts[0] ?? "";
|
|
74
|
+
const overrides = {};
|
|
75
|
+
for (let i = 1; i < parts.length; i++) {
|
|
76
|
+
const eqIdx = parts[i].indexOf("=");
|
|
77
|
+
if (eqIdx > 0) {
|
|
78
|
+
overrides[parts[i].slice(0, eqIdx)] = parts[i].slice(eqIdx + 1);
|
|
79
|
+
}
|
|
80
|
+
}
|
|
81
|
+
return { defName, overrides };
|
|
82
|
+
}
|
|
28
83
|
async function handleCustomWorkflow(sub, ctx, pi) {
|
|
29
84
|
// Bare `/gsd workflow` — show usage
|
|
30
85
|
if (!sub) {
|
|
@@ -43,15 +98,7 @@ async function handleCustomWorkflow(sub, ctx, pi) {
|
|
|
43
98
|
ctx.ui.notify("Usage: /gsd workflow run <name> [param=value ...]", "warning");
|
|
44
99
|
return true;
|
|
45
100
|
}
|
|
46
|
-
const
|
|
47
|
-
const defName = parts[0];
|
|
48
|
-
const overrides = {};
|
|
49
|
-
for (let i = 1; i < parts.length; i++) {
|
|
50
|
-
const eqIdx = parts[i].indexOf("=");
|
|
51
|
-
if (eqIdx > 0) {
|
|
52
|
-
overrides[parts[i].slice(0, eqIdx)] = parts[i].slice(eqIdx + 1);
|
|
53
|
-
}
|
|
54
|
-
}
|
|
101
|
+
const { defName, overrides } = parseWorkflowRunArgs(args);
|
|
55
102
|
try {
|
|
56
103
|
const base = projectRoot();
|
|
57
104
|
const runDir = createRun(base, defName, Object.keys(overrides).length > 0 ? overrides : undefined);
|
|
@@ -146,6 +193,18 @@ async function handleCustomWorkflow(sub, ctx, pi) {
|
|
|
146
193
|
return true;
|
|
147
194
|
}
|
|
148
195
|
export async function handleWorkflowCommand(trimmed, ctx, pi) {
|
|
196
|
+
// ── /gsd do — natural language routing (must be early to route to other commands) ──
|
|
197
|
+
if (trimmed === "do" || trimmed.startsWith("do ")) {
|
|
198
|
+
const { handleDo } = await import("../../commands-do.js");
|
|
199
|
+
await handleDo(trimmed.replace(/^do\s*/, "").trim(), ctx, pi);
|
|
200
|
+
return true;
|
|
201
|
+
}
|
|
202
|
+
// ── Backlog management ──
|
|
203
|
+
if (trimmed === "backlog" || trimmed.startsWith("backlog ")) {
|
|
204
|
+
const { handleBacklog } = await import("../../commands-backlog.js");
|
|
205
|
+
await handleBacklog(trimmed.replace(/^backlog\s*/, "").trim(), ctx, pi);
|
|
206
|
+
return true;
|
|
207
|
+
}
|
|
149
208
|
// ── Custom workflow commands (`/gsd workflow ...`) ──
|
|
150
209
|
if (trimmed === "workflow" || trimmed.startsWith("workflow ")) {
|
|
151
210
|
const sub = trimmed.slice("workflow".length).trim();
|
|
@@ -0,0 +1,111 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* GSD Command — /gsd add-tests
|
|
3
|
+
*
|
|
4
|
+
* Generates tests for a completed slice by dispatching an LLM prompt
|
|
5
|
+
* with implementation context (summaries, changed files, test patterns).
|
|
6
|
+
*/
|
|
7
|
+
import { existsSync, readFileSync, readdirSync } from "node:fs";
|
|
8
|
+
import { join } from "node:path";
|
|
9
|
+
import { deriveState } from "./state.js";
|
|
10
|
+
import { gsdRoot, resolveSliceFile } from "./paths.js";
|
|
11
|
+
import { loadPrompt } from "./prompt-loader.js";
|
|
12
|
+
function findLastCompletedSlice(basePath, milestoneId) {
|
|
13
|
+
// Scan disk for slices that have a SUMMARY.md (indicating completion)
|
|
14
|
+
const slicesDir = join(gsdRoot(basePath), "milestones", milestoneId, "slices");
|
|
15
|
+
if (!existsSync(slicesDir))
|
|
16
|
+
return null;
|
|
17
|
+
try {
|
|
18
|
+
const entries = readdirSync(slicesDir, { withFileTypes: true })
|
|
19
|
+
.filter((e) => e.isDirectory() && /^S\d+$/.test(e.name))
|
|
20
|
+
.sort((a, b) => b.name.localeCompare(a.name)); // reverse order — latest first
|
|
21
|
+
for (const entry of entries) {
|
|
22
|
+
const summaryPath = join(slicesDir, entry.name, `${entry.name}-SUMMARY.md`);
|
|
23
|
+
if (existsSync(summaryPath))
|
|
24
|
+
return entry.name;
|
|
25
|
+
}
|
|
26
|
+
}
|
|
27
|
+
catch {
|
|
28
|
+
// non-fatal
|
|
29
|
+
}
|
|
30
|
+
return null;
|
|
31
|
+
}
|
|
32
|
+
function readSliceSummary(basePath, milestoneId, sliceId) {
|
|
33
|
+
const summaryPath = resolveSliceFile(basePath, milestoneId, sliceId, "SUMMARY");
|
|
34
|
+
if (summaryPath && existsSync(summaryPath)) {
|
|
35
|
+
const content = readFileSync(summaryPath, "utf-8");
|
|
36
|
+
const titleMatch = content.match(/^#\s+(.+)/m);
|
|
37
|
+
return { title: titleMatch?.[1] ?? sliceId, content };
|
|
38
|
+
}
|
|
39
|
+
return { title: sliceId, content: "(no summary available)" };
|
|
40
|
+
}
|
|
41
|
+
function detectTestPatterns(basePath) {
|
|
42
|
+
const patterns = [];
|
|
43
|
+
// Check for common test configs
|
|
44
|
+
const checks = [
|
|
45
|
+
{ file: "jest.config.ts", name: "Jest" },
|
|
46
|
+
{ file: "jest.config.js", name: "Jest" },
|
|
47
|
+
{ file: "vitest.config.ts", name: "Vitest" },
|
|
48
|
+
{ file: "vitest.config.js", name: "Vitest" },
|
|
49
|
+
{ file: ".mocharc.yml", name: "Mocha" },
|
|
50
|
+
];
|
|
51
|
+
for (const check of checks) {
|
|
52
|
+
if (existsSync(join(basePath, check.file))) {
|
|
53
|
+
patterns.push(`Framework: ${check.name} (${check.file})`);
|
|
54
|
+
}
|
|
55
|
+
}
|
|
56
|
+
// Look for existing test files to infer patterns
|
|
57
|
+
const testDirs = ["tests", "test", "src/__tests__", "__tests__"];
|
|
58
|
+
for (const dir of testDirs) {
|
|
59
|
+
const fullDir = join(basePath, dir);
|
|
60
|
+
if (existsSync(fullDir)) {
|
|
61
|
+
try {
|
|
62
|
+
const files = readdirSync(fullDir).filter((f) => f.endsWith(".test.ts") || f.endsWith(".spec.ts") || f.endsWith(".test.js"));
|
|
63
|
+
if (files.length > 0) {
|
|
64
|
+
patterns.push(`Test directory: ${dir}/ (${files.length} test files)`);
|
|
65
|
+
// Read first test file for patterns
|
|
66
|
+
const samplePath = join(fullDir, files[0]);
|
|
67
|
+
const sample = readFileSync(samplePath, "utf-8").slice(0, 500);
|
|
68
|
+
patterns.push(`Sample pattern from ${files[0]}:\n${sample}`);
|
|
69
|
+
break;
|
|
70
|
+
}
|
|
71
|
+
}
|
|
72
|
+
catch {
|
|
73
|
+
// non-fatal
|
|
74
|
+
}
|
|
75
|
+
}
|
|
76
|
+
}
|
|
77
|
+
return patterns.length > 0 ? patterns.join("\n") : "No test framework detected. Use Node.js built-in test runner.";
|
|
78
|
+
}
|
|
79
|
+
export async function handleAddTests(args, ctx, pi) {
|
|
80
|
+
const basePath = process.cwd();
|
|
81
|
+
const state = await deriveState(basePath);
|
|
82
|
+
if (!state.activeMilestone) {
|
|
83
|
+
ctx.ui.notify("No active milestone.", "warning");
|
|
84
|
+
return;
|
|
85
|
+
}
|
|
86
|
+
const milestoneId = state.activeMilestone.id;
|
|
87
|
+
// Determine target
|
|
88
|
+
const targetId = args.trim() || findLastCompletedSlice(basePath, milestoneId);
|
|
89
|
+
if (!targetId) {
|
|
90
|
+
ctx.ui.notify("No completed slices found. Specify a slice ID: /gsd add-tests S03", "warning");
|
|
91
|
+
return;
|
|
92
|
+
}
|
|
93
|
+
// Gather context
|
|
94
|
+
const summary = readSliceSummary(basePath, milestoneId, targetId);
|
|
95
|
+
const testPatterns = detectTestPatterns(basePath);
|
|
96
|
+
ctx.ui.notify(`Generating tests for ${targetId}: "${summary.title}"...`, "info");
|
|
97
|
+
try {
|
|
98
|
+
const prompt = loadPrompt("add-tests", {
|
|
99
|
+
sliceId: targetId,
|
|
100
|
+
sliceTitle: summary.title,
|
|
101
|
+
sliceSummary: summary.content,
|
|
102
|
+
existingTestPatterns: testPatterns,
|
|
103
|
+
workingDirectory: basePath,
|
|
104
|
+
});
|
|
105
|
+
pi.sendMessage({ customType: "gsd-add-tests", content: prompt, display: false }, { triggerTurn: true });
|
|
106
|
+
}
|
|
107
|
+
catch (err) {
|
|
108
|
+
const msg = err instanceof Error ? err.message : String(err);
|
|
109
|
+
ctx.ui.notify(`Failed to dispatch test generation: ${msg}`, "error");
|
|
110
|
+
}
|
|
111
|
+
}
|
|
@@ -0,0 +1,140 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* GSD Command — /gsd backlog
|
|
3
|
+
*
|
|
4
|
+
* Structured backlog management with 999.x numbering.
|
|
5
|
+
* Items stored in .gsd/BACKLOG.md as markdown checklist.
|
|
6
|
+
* Items can be promoted to active slices via add-slice.
|
|
7
|
+
*/
|
|
8
|
+
import { existsSync, readFileSync, writeFileSync, mkdirSync } from "node:fs";
|
|
9
|
+
import { join, dirname } from "node:path";
|
|
10
|
+
import { gsdRoot } from "./paths.js";
|
|
11
|
+
function backlogPath(basePath) {
|
|
12
|
+
return join(gsdRoot(basePath), "BACKLOG.md");
|
|
13
|
+
}
|
|
14
|
+
function parseBacklog(basePath) {
|
|
15
|
+
const filePath = backlogPath(basePath);
|
|
16
|
+
if (!existsSync(filePath))
|
|
17
|
+
return [];
|
|
18
|
+
const content = readFileSync(filePath, "utf-8");
|
|
19
|
+
const items = [];
|
|
20
|
+
for (const line of content.split("\n")) {
|
|
21
|
+
const match = line.match(/^- \[([ x])\] (999\.\d+) — (.+?)(?:\s*\((.+)\))?$/);
|
|
22
|
+
if (match) {
|
|
23
|
+
items.push({
|
|
24
|
+
id: match[2],
|
|
25
|
+
title: match[3].trim(),
|
|
26
|
+
done: match[1] === "x",
|
|
27
|
+
note: match[4] ?? "",
|
|
28
|
+
});
|
|
29
|
+
}
|
|
30
|
+
}
|
|
31
|
+
return items;
|
|
32
|
+
}
|
|
33
|
+
function writeBacklog(basePath, items) {
|
|
34
|
+
const filePath = backlogPath(basePath);
|
|
35
|
+
mkdirSync(dirname(filePath), { recursive: true });
|
|
36
|
+
const lines = ["# Backlog\n"];
|
|
37
|
+
for (const item of items) {
|
|
38
|
+
const check = item.done ? "x" : " ";
|
|
39
|
+
const note = item.note ? ` (${item.note})` : "";
|
|
40
|
+
lines.push(`- [${check}] ${item.id} — ${item.title}${note}`);
|
|
41
|
+
}
|
|
42
|
+
lines.push(""); // trailing newline
|
|
43
|
+
writeFileSync(filePath, lines.join("\n"), "utf-8");
|
|
44
|
+
}
|
|
45
|
+
function nextBacklogId(items) {
|
|
46
|
+
let maxNum = 0;
|
|
47
|
+
for (const item of items) {
|
|
48
|
+
const match = item.id.match(/^999\.(\d+)$/);
|
|
49
|
+
if (match) {
|
|
50
|
+
const num = parseInt(match[1], 10);
|
|
51
|
+
if (num > maxNum)
|
|
52
|
+
maxNum = num;
|
|
53
|
+
}
|
|
54
|
+
}
|
|
55
|
+
return `999.${maxNum + 1}`;
|
|
56
|
+
}
|
|
57
|
+
async function listBacklog(basePath, ctx) {
|
|
58
|
+
const items = parseBacklog(basePath);
|
|
59
|
+
if (items.length === 0) {
|
|
60
|
+
ctx.ui.notify("Backlog is empty. Add items with /gsd backlog add <title>", "info");
|
|
61
|
+
return;
|
|
62
|
+
}
|
|
63
|
+
const lines = ["Backlog:\n"];
|
|
64
|
+
for (const item of items) {
|
|
65
|
+
const status = item.done ? "✓" : "○";
|
|
66
|
+
const note = item.note ? ` (${item.note})` : "";
|
|
67
|
+
lines.push(` ${status} ${item.id} — ${item.title}${note}`);
|
|
68
|
+
}
|
|
69
|
+
const pending = items.filter((i) => !i.done).length;
|
|
70
|
+
lines.push(`\n${pending} pending, ${items.length - pending} promoted/done`);
|
|
71
|
+
ctx.ui.notify(lines.join("\n"), "info");
|
|
72
|
+
}
|
|
73
|
+
async function addBacklogItem(basePath, title, ctx) {
|
|
74
|
+
if (!title) {
|
|
75
|
+
ctx.ui.notify("Usage: /gsd backlog add <title>", "warning");
|
|
76
|
+
return;
|
|
77
|
+
}
|
|
78
|
+
const items = parseBacklog(basePath);
|
|
79
|
+
const id = nextBacklogId(items);
|
|
80
|
+
const date = new Date().toISOString().slice(0, 10);
|
|
81
|
+
items.push({ id, title: title.replace(/^['"]|['"]$/g, ""), done: false, note: `added ${date}` });
|
|
82
|
+
writeBacklog(basePath, items);
|
|
83
|
+
ctx.ui.notify(`Added ${id}: "${title}"`, "success");
|
|
84
|
+
}
|
|
85
|
+
async function promoteBacklogItem(basePath, itemId, ctx, pi) {
|
|
86
|
+
if (!itemId) {
|
|
87
|
+
ctx.ui.notify("Usage: /gsd backlog promote <id>\nExample: /gsd backlog promote 999.1", "warning");
|
|
88
|
+
return;
|
|
89
|
+
}
|
|
90
|
+
const items = parseBacklog(basePath);
|
|
91
|
+
const item = items.find((i) => i.id === itemId);
|
|
92
|
+
if (!item) {
|
|
93
|
+
ctx.ui.notify(`Backlog item ${itemId} not found.`, "warning");
|
|
94
|
+
return;
|
|
95
|
+
}
|
|
96
|
+
if (item.done) {
|
|
97
|
+
ctx.ui.notify(`${itemId} is already promoted/done.`, "info");
|
|
98
|
+
return;
|
|
99
|
+
}
|
|
100
|
+
// Promote — currently requires single-writer engine (not yet available)
|
|
101
|
+
// Mark as promoted in backlog for now; slice creation will be available with the engine.
|
|
102
|
+
item.done = true;
|
|
103
|
+
item.note = `promoted ${new Date().toISOString().slice(0, 10)}`;
|
|
104
|
+
writeBacklog(basePath, items);
|
|
105
|
+
ctx.ui.notify(`Promoted ${itemId}: "${item.title}" — add it to the roadmap manually or wait for engine slice commands.`, "info");
|
|
106
|
+
}
|
|
107
|
+
async function removeBacklogItem(basePath, itemId, ctx) {
|
|
108
|
+
if (!itemId) {
|
|
109
|
+
ctx.ui.notify("Usage: /gsd backlog remove <id>", "warning");
|
|
110
|
+
return;
|
|
111
|
+
}
|
|
112
|
+
const items = parseBacklog(basePath);
|
|
113
|
+
const idx = items.findIndex((i) => i.id === itemId);
|
|
114
|
+
if (idx === -1) {
|
|
115
|
+
ctx.ui.notify(`Backlog item ${itemId} not found.`, "warning");
|
|
116
|
+
return;
|
|
117
|
+
}
|
|
118
|
+
const removed = items.splice(idx, 1)[0];
|
|
119
|
+
writeBacklog(basePath, items);
|
|
120
|
+
ctx.ui.notify(`Removed ${removed.id}: "${removed.title}"`, "success");
|
|
121
|
+
}
|
|
122
|
+
export async function handleBacklog(args, ctx, pi) {
|
|
123
|
+
const basePath = process.cwd();
|
|
124
|
+
const parts = args.trim().split(/\s+/);
|
|
125
|
+
const sub = parts[0] ?? "";
|
|
126
|
+
const rest = parts.slice(1).join(" ");
|
|
127
|
+
switch (sub) {
|
|
128
|
+
case "":
|
|
129
|
+
return listBacklog(basePath, ctx);
|
|
130
|
+
case "add":
|
|
131
|
+
return addBacklogItem(basePath, rest, ctx);
|
|
132
|
+
case "promote":
|
|
133
|
+
return promoteBacklogItem(basePath, rest.trim(), ctx, pi);
|
|
134
|
+
case "remove":
|
|
135
|
+
return removeBacklogItem(basePath, rest.trim(), ctx);
|
|
136
|
+
default:
|
|
137
|
+
// Treat as implicit add
|
|
138
|
+
return addBacklogItem(basePath, args, ctx);
|
|
139
|
+
}
|
|
140
|
+
}
|
|
@@ -0,0 +1,79 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* GSD Command — /gsd do
|
|
3
|
+
*
|
|
4
|
+
* Routes freeform natural language to the correct /gsd subcommand
|
|
5
|
+
* using keyword matching. Falls back to /gsd quick for task-like input.
|
|
6
|
+
*/
|
|
7
|
+
const ROUTES = [
|
|
8
|
+
{ keywords: ["progress", "status", "dashboard", "how far", "where are we"], command: "status" },
|
|
9
|
+
{ keywords: ["auto", "autonomous", "run all", "keep going", "start auto"], command: "auto" },
|
|
10
|
+
{ keywords: ["stop", "halt", "abort"], command: "stop" },
|
|
11
|
+
{ keywords: ["pause", "break", "take a break"], command: "pause" },
|
|
12
|
+
{ keywords: ["history", "past", "what happened", "previous"], command: "history" },
|
|
13
|
+
{ keywords: ["doctor", "health", "diagnose", "check health"], command: "doctor" },
|
|
14
|
+
{ keywords: ["clean up", "cleanup", "remove old", "prune", "tidy"], command: "cleanup" },
|
|
15
|
+
{ keywords: ["export", "report", "share results"], command: "export" },
|
|
16
|
+
{ keywords: ["ship", "pull request", "create pr", "open pr", "merge"], command: "ship" },
|
|
17
|
+
{ keywords: ["discuss", "talk about", "architecture", "design"], command: "discuss" },
|
|
18
|
+
{ keywords: ["undo", "revert", "rollback", "take back"], command: "undo" },
|
|
19
|
+
{ keywords: ["skip", "skip task", "skip this"], command: "skip" },
|
|
20
|
+
{ keywords: ["queue", "reorder", "milestone order", "order milestones"], command: "queue" },
|
|
21
|
+
{ keywords: ["visualize", "viz", "graph", "chart", "show graph"], command: "visualize" },
|
|
22
|
+
{ keywords: ["capture", "note", "idea", "thought", "remember"], command: "capture" },
|
|
23
|
+
{ keywords: ["inspect", "database", "sqlite", "db state"], command: "inspect" },
|
|
24
|
+
{ keywords: ["knowledge", "rule", "pattern", "lesson"], command: "knowledge" },
|
|
25
|
+
{ keywords: ["session report", "session summary", "cost summary", "how much"], command: "session-report" },
|
|
26
|
+
{ keywords: ["backlog", "parking lot", "later", "someday"], command: "backlog" },
|
|
27
|
+
{ keywords: ["pr branch", "clean branch", "filter commits"], command: "pr-branch" },
|
|
28
|
+
{ keywords: ["add tests", "write tests", "generate tests", "test coverage"], command: "add-tests" },
|
|
29
|
+
{ keywords: ["next", "step", "next step", "what's next"], command: "next" },
|
|
30
|
+
{ keywords: ["migrate", "migration", "convert", "upgrade"], command: "migrate" },
|
|
31
|
+
{ keywords: ["steer", "change direction", "pivot", "redirect"], command: "steer" },
|
|
32
|
+
{ keywords: ["park", "shelve", "set aside"], command: "park" },
|
|
33
|
+
{ keywords: ["widget", "toggle widget"], command: "widget" },
|
|
34
|
+
{ keywords: ["logs", "debug logs", "log files"], command: "logs" },
|
|
35
|
+
];
|
|
36
|
+
function matchRoute(input) {
|
|
37
|
+
const lower = input.toLowerCase();
|
|
38
|
+
let bestMatch = null;
|
|
39
|
+
for (const route of ROUTES) {
|
|
40
|
+
for (const keyword of route.keywords) {
|
|
41
|
+
if (lower.includes(keyword)) {
|
|
42
|
+
const score = keyword.length; // Longer match = higher confidence
|
|
43
|
+
if (!bestMatch || score > bestMatch.score) {
|
|
44
|
+
// Strip the matched keyword from input to get remaining args
|
|
45
|
+
const idx = lower.indexOf(keyword);
|
|
46
|
+
const remaining = (input.slice(0, idx) + input.slice(idx + keyword.length)).trim();
|
|
47
|
+
bestMatch = { command: route.command, remainingArgs: remaining, score };
|
|
48
|
+
}
|
|
49
|
+
}
|
|
50
|
+
}
|
|
51
|
+
}
|
|
52
|
+
return bestMatch;
|
|
53
|
+
}
|
|
54
|
+
export async function handleDo(args, ctx, pi) {
|
|
55
|
+
if (!args.trim()) {
|
|
56
|
+
ctx.ui.notify("Usage: /gsd do <what you want to do>\n\n" +
|
|
57
|
+
"Examples:\n" +
|
|
58
|
+
" /gsd do show me progress\n" +
|
|
59
|
+
" /gsd do run autonomously\n" +
|
|
60
|
+
" /gsd do clean up old branches\n" +
|
|
61
|
+
" /gsd do fix the login bug", "warning");
|
|
62
|
+
return;
|
|
63
|
+
}
|
|
64
|
+
const match = matchRoute(args);
|
|
65
|
+
if (match) {
|
|
66
|
+
const fullCommand = match.remainingArgs
|
|
67
|
+
? `${match.command} ${match.remainingArgs}`
|
|
68
|
+
: match.command;
|
|
69
|
+
ctx.ui.notify(`→ /gsd ${fullCommand}`, "info");
|
|
70
|
+
// Re-dispatch through the main dispatcher
|
|
71
|
+
const { handleGSDCommand } = await import("./commands/dispatcher.js");
|
|
72
|
+
await handleGSDCommand(fullCommand, ctx, pi);
|
|
73
|
+
return;
|
|
74
|
+
}
|
|
75
|
+
// No keyword match → treat as quick task
|
|
76
|
+
ctx.ui.notify(`→ /gsd quick ${args}`, "info");
|
|
77
|
+
const { handleQuick } = await import("./quick.js");
|
|
78
|
+
await handleQuick(args, ctx, pi);
|
|
79
|
+
}
|
|
@@ -0,0 +1,225 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* GSD Command — /gsd extract-learnings
|
|
3
|
+
*
|
|
4
|
+
* Analyses completed milestone artefacts and dispatches an LLM turn that
|
|
5
|
+
* extracts structured knowledge into 4 categories:
|
|
6
|
+
* Decisions · Lessons · Patterns · Surprises
|
|
7
|
+
*/
|
|
8
|
+
import { existsSync, readFileSync } from "node:fs";
|
|
9
|
+
import { join, basename } from "node:path";
|
|
10
|
+
import { gsdRoot, resolveMilestonePath } from "./paths.js";
|
|
11
|
+
import { projectRoot } from "./commands/context.js";
|
|
12
|
+
// ─── Pure functions ───────────────────────────────────────────────────────────
|
|
13
|
+
export function parseExtractLearningsArgs(args) {
|
|
14
|
+
const trimmed = args.trim();
|
|
15
|
+
return { milestoneId: trimmed || null };
|
|
16
|
+
}
|
|
17
|
+
export function buildLearningsOutputPath(milestoneDir, milestoneId) {
|
|
18
|
+
return join(milestoneDir, `${milestoneId}-LEARNINGS.md`);
|
|
19
|
+
}
|
|
20
|
+
export function resolvePhaseArtifacts(milestoneDir, milestoneId) {
|
|
21
|
+
const missingRequired = [];
|
|
22
|
+
const planFile = `${milestoneId}-PLAN.md`;
|
|
23
|
+
const summaryFile = `${milestoneId}-SUMMARY.md`;
|
|
24
|
+
const verificationFile = `${milestoneId}-VERIFICATION.md`;
|
|
25
|
+
const uatFile = `${milestoneId}-UAT.md`;
|
|
26
|
+
const planPath = join(milestoneDir, planFile);
|
|
27
|
+
const summaryPath = join(milestoneDir, summaryFile);
|
|
28
|
+
const verificationPath = join(milestoneDir, verificationFile);
|
|
29
|
+
const uatPath = join(milestoneDir, uatFile);
|
|
30
|
+
const plan = existsSync(planPath) ? planPath : null;
|
|
31
|
+
const summary = existsSync(summaryPath) ? summaryPath : null;
|
|
32
|
+
const verification = existsSync(verificationPath) ? verificationPath : null;
|
|
33
|
+
const uat = existsSync(uatPath) ? uatPath : null;
|
|
34
|
+
if (!plan)
|
|
35
|
+
missingRequired.push(planFile);
|
|
36
|
+
if (!summary)
|
|
37
|
+
missingRequired.push(summaryFile);
|
|
38
|
+
return { plan, summary, verification, uat, missingRequired };
|
|
39
|
+
}
|
|
40
|
+
export function buildExtractLearningsPrompt(ctx) {
|
|
41
|
+
const optionalSections = [];
|
|
42
|
+
if (ctx.verificationContent) {
|
|
43
|
+
optionalSections.push(`## Verification Report\n\n${ctx.verificationContent}`);
|
|
44
|
+
}
|
|
45
|
+
if (ctx.uatContent) {
|
|
46
|
+
optionalSections.push(`## UAT Report\n\n${ctx.uatContent}`);
|
|
47
|
+
}
|
|
48
|
+
const missingNote = ctx.missingArtifacts.length > 0
|
|
49
|
+
? `\nNote: The following optional artefacts were not available: ${ctx.missingArtifacts.join(", ")}\n`
|
|
50
|
+
: "";
|
|
51
|
+
return `# Extract Learnings — ${ctx.milestoneId}: ${ctx.milestoneName}
|
|
52
|
+
|
|
53
|
+
**Project:** ${ctx.projectName}
|
|
54
|
+
**Output file:** ${ctx.outputPath}
|
|
55
|
+
|
|
56
|
+
## Your Task
|
|
57
|
+
|
|
58
|
+
Analyse the artefacts below and extract structured knowledge from milestone **${ctx.milestoneId}**.
|
|
59
|
+
|
|
60
|
+
Write a LEARNINGS document to \`${ctx.outputPath}\` with the following 4 sections:
|
|
61
|
+
|
|
62
|
+
### Decisions
|
|
63
|
+
Key architectural and design decisions made during this milestone, including the rationale and alternatives considered.
|
|
64
|
+
|
|
65
|
+
### Lessons
|
|
66
|
+
What the team learned — technical discoveries, process insights, and knowledge gaps that were filled.
|
|
67
|
+
|
|
68
|
+
### Patterns
|
|
69
|
+
Reusable patterns, approaches, or solutions that emerged and should be applied in future work.
|
|
70
|
+
|
|
71
|
+
### Surprises
|
|
72
|
+
Unexpected challenges, discoveries, or outcomes — things that deviated from assumptions.
|
|
73
|
+
|
|
74
|
+
### Source Attribution (REQUIRED)
|
|
75
|
+
|
|
76
|
+
Every extracted item MUST include a \`Source:\` line immediately after the item text.
|
|
77
|
+
Format: \`Source: {artifact-filename}/{section}\`
|
|
78
|
+
Example: \`Source: M001-PLAN.md/Architecture Decisions\`
|
|
79
|
+
|
|
80
|
+
Items without a Source attribution are invalid and must not be included in the output.
|
|
81
|
+
|
|
82
|
+
---
|
|
83
|
+
|
|
84
|
+
## Artefacts
|
|
85
|
+
|
|
86
|
+
### Plan
|
|
87
|
+
|
|
88
|
+
${ctx.planContent}
|
|
89
|
+
|
|
90
|
+
---
|
|
91
|
+
|
|
92
|
+
### Summary
|
|
93
|
+
|
|
94
|
+
${ctx.summaryContent}
|
|
95
|
+
|
|
96
|
+
${optionalSections.join("\n\n---\n\n")}
|
|
97
|
+
${missingNote}
|
|
98
|
+
---
|
|
99
|
+
|
|
100
|
+
## Output Format
|
|
101
|
+
|
|
102
|
+
Write the LEARNINGS file to \`${ctx.relativeOutputPath}\` with YAML frontmatter followed by the 4 sections above.
|
|
103
|
+
Each section should contain concise, actionable bullet points.
|
|
104
|
+
Every bullet point MUST be followed by a source line, for example:
|
|
105
|
+
|
|
106
|
+
\`\`\`
|
|
107
|
+
### Decisions
|
|
108
|
+
- Chose PostgreSQL over SQLite for concurrent write support.
|
|
109
|
+
Source: M001-PLAN.md/Architecture Decisions
|
|
110
|
+
\`\`\`
|
|
111
|
+
|
|
112
|
+
Items without a \`Source:\` line are invalid.
|
|
113
|
+
|
|
114
|
+
---
|
|
115
|
+
|
|
116
|
+
## Optional: Capture Individual Learnings
|
|
117
|
+
|
|
118
|
+
If the \`capture_thought\` tool is available, call it once for each extracted item with:
|
|
119
|
+
- category: "decision" | "lesson" | "pattern" | "surprise"
|
|
120
|
+
- phase: "${ctx.milestoneId}"
|
|
121
|
+
- content: {the learning text}
|
|
122
|
+
- source: {artifact filename}
|
|
123
|
+
|
|
124
|
+
If \`capture_thought\` is not available, skip this step silently — do not report an error.
|
|
125
|
+
|
|
126
|
+
---
|
|
127
|
+
|
|
128
|
+
## Rebuild Knowledge Graph
|
|
129
|
+
|
|
130
|
+
After writing LEARNINGS.md, call the \`gsd_graph\` tool with \`{ "mode": "build" }\` to rebuild the knowledge graph so the new learnings are immediately queryable by future milestone prompts.
|
|
131
|
+
|
|
132
|
+
If the \`gsd_graph\` tool is not available, skip this step silently.
|
|
133
|
+
`;
|
|
134
|
+
}
|
|
135
|
+
export function buildFrontmatter(ctx) {
|
|
136
|
+
const missingList = ctx.missingArtifacts.length > 0
|
|
137
|
+
? ctx.missingArtifacts.map((a) => ` - ${a}`).join("\n")
|
|
138
|
+
: " []";
|
|
139
|
+
const missingValue = ctx.missingArtifacts.length > 0
|
|
140
|
+
? `\n${missingList}`
|
|
141
|
+
: " []";
|
|
142
|
+
return `---
|
|
143
|
+
phase: ${ctx.milestoneId}
|
|
144
|
+
phase_name: ${ctx.milestoneName}
|
|
145
|
+
project: ${ctx.projectName}
|
|
146
|
+
generated: ${ctx.generatedAt}
|
|
147
|
+
counts:
|
|
148
|
+
decisions: ${ctx.counts.decisions}
|
|
149
|
+
lessons: ${ctx.counts.lessons}
|
|
150
|
+
patterns: ${ctx.counts.patterns}
|
|
151
|
+
surprises: ${ctx.counts.surprises}
|
|
152
|
+
missing_artifacts:${missingValue}
|
|
153
|
+
---`;
|
|
154
|
+
}
|
|
155
|
+
export function extractProjectName(basePath) {
|
|
156
|
+
const projectMdPath = join(gsdRoot(basePath), "PROJECT.md");
|
|
157
|
+
if (existsSync(projectMdPath)) {
|
|
158
|
+
try {
|
|
159
|
+
const content = readFileSync(projectMdPath, "utf-8");
|
|
160
|
+
const match = content.match(/^name:\s*(.+)$/m);
|
|
161
|
+
if (match)
|
|
162
|
+
return match[1].trim();
|
|
163
|
+
}
|
|
164
|
+
catch {
|
|
165
|
+
// non-fatal
|
|
166
|
+
}
|
|
167
|
+
}
|
|
168
|
+
return basename(basePath);
|
|
169
|
+
}
|
|
170
|
+
// ─── Handler ──────────────────────────────────────────────────────────────────
|
|
171
|
+
export async function handleExtractLearnings(args, ctx, pi) {
|
|
172
|
+
const { milestoneId } = parseExtractLearningsArgs(args);
|
|
173
|
+
if (!milestoneId) {
|
|
174
|
+
ctx.ui.notify("Usage: /gsd extract-learnings <milestoneId> (e.g. M001)", "warning");
|
|
175
|
+
return;
|
|
176
|
+
}
|
|
177
|
+
// projectRoot() throws GSDNoProjectError if no project found — intentional, handled by dispatcher
|
|
178
|
+
const basePath = projectRoot();
|
|
179
|
+
const milestoneDir = resolveMilestonePath(basePath, milestoneId);
|
|
180
|
+
if (!milestoneDir) {
|
|
181
|
+
ctx.ui.notify(`Milestone not found: ${milestoneId}`, "error");
|
|
182
|
+
return;
|
|
183
|
+
}
|
|
184
|
+
const artifacts = resolvePhaseArtifacts(milestoneDir, milestoneId);
|
|
185
|
+
if (artifacts.missingRequired.length > 0) {
|
|
186
|
+
ctx.ui.notify(`Cannot extract learnings — required artefacts missing: ${artifacts.missingRequired.join(", ")}`, "error");
|
|
187
|
+
return;
|
|
188
|
+
}
|
|
189
|
+
// Read required artefacts
|
|
190
|
+
const planContent = readFileSync(artifacts.plan, "utf-8");
|
|
191
|
+
const summaryContent = readFileSync(artifacts.summary, "utf-8");
|
|
192
|
+
// Read optional artefacts
|
|
193
|
+
const verificationContent = artifacts.verification
|
|
194
|
+
? readFileSync(artifacts.verification, "utf-8")
|
|
195
|
+
: null;
|
|
196
|
+
const uatContent = artifacts.uat
|
|
197
|
+
? readFileSync(artifacts.uat, "utf-8")
|
|
198
|
+
: null;
|
|
199
|
+
// Determine missing optional artefacts for context
|
|
200
|
+
const missingArtifacts = [];
|
|
201
|
+
if (!artifacts.verification)
|
|
202
|
+
missingArtifacts.push(`${milestoneId}-VERIFICATION.md`);
|
|
203
|
+
if (!artifacts.uat)
|
|
204
|
+
missingArtifacts.push(`${milestoneId}-UAT.md`);
|
|
205
|
+
// Extract milestone name from Plan H1 or fall back to milestoneId
|
|
206
|
+
const h1Match = planContent.match(/^#\s+(.+)$/m);
|
|
207
|
+
const milestoneName = h1Match?.[1]?.trim() ?? milestoneId;
|
|
208
|
+
const projectName = extractProjectName(basePath);
|
|
209
|
+
const outputPath = buildLearningsOutputPath(milestoneDir, milestoneId);
|
|
210
|
+
const relativeOutputPath = outputPath.replace(basePath + "/", "");
|
|
211
|
+
const prompt = buildExtractLearningsPrompt({
|
|
212
|
+
milestoneId,
|
|
213
|
+
milestoneName,
|
|
214
|
+
outputPath,
|
|
215
|
+
relativeOutputPath,
|
|
216
|
+
planContent,
|
|
217
|
+
summaryContent,
|
|
218
|
+
verificationContent,
|
|
219
|
+
uatContent,
|
|
220
|
+
missingArtifacts,
|
|
221
|
+
projectName,
|
|
222
|
+
});
|
|
223
|
+
ctx.ui.notify(`Extracting learnings for ${milestoneId}: "${milestoneName}"...`, "info");
|
|
224
|
+
pi.sendMessage({ customType: "gsd-extract-learnings", content: prompt, display: false }, { triggerTurn: true });
|
|
225
|
+
}
|
|
@@ -17,6 +17,11 @@ import { projectRoot } from "./commands/context.js";
|
|
|
17
17
|
import { loadPrompt } from "./prompt-loader.js";
|
|
18
18
|
const UPDATE_REGISTRY_URL = "https://registry.npmjs.org/gsd-pi/latest";
|
|
19
19
|
const UPDATE_FETCH_TIMEOUT_MS = 5000;
|
|
20
|
+
function resolveInstallCommand(pkg) {
|
|
21
|
+
if ('bun' in process.versions)
|
|
22
|
+
return `bun add -g ${pkg}`;
|
|
23
|
+
return `npm install -g ${pkg}`;
|
|
24
|
+
}
|
|
20
25
|
async function fetchLatestVersionForCommand() {
|
|
21
26
|
const controller = new AbortController();
|
|
22
27
|
const timeout = setTimeout(() => controller.abort(), UPDATE_FETCH_TIMEOUT_MS);
|
|
@@ -344,13 +349,14 @@ export async function handleUpdate(ctx) {
|
|
|
344
349
|
return;
|
|
345
350
|
}
|
|
346
351
|
ctx.ui.notify(`Updating: v${current} → v${latest}...`, "info");
|
|
352
|
+
const installCmd = resolveInstallCommand(`${NPM_PACKAGE}@latest`);
|
|
347
353
|
try {
|
|
348
|
-
execSync(
|
|
354
|
+
execSync(installCmd, {
|
|
349
355
|
stdio: ["ignore", "pipe", "ignore"],
|
|
350
356
|
});
|
|
351
357
|
ctx.ui.notify(`Updated to v${latest}. Restart your GSD session to use the new version.`, "info");
|
|
352
358
|
}
|
|
353
359
|
catch {
|
|
354
|
-
ctx.ui.notify(`Update failed. Try manually:
|
|
360
|
+
ctx.ui.notify(`Update failed. Try manually: ${installCmd}`, "error");
|
|
355
361
|
}
|
|
356
362
|
}
|