gsd-pi 2.75.0-dev.063e5a3 → 2.75.0-dev.96d4bb599
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +186 -149
- package/dist/claude-cli-check.d.ts +10 -0
- package/dist/claude-cli-check.js +13 -3
- package/dist/headless-events.d.ts +1 -1
- package/dist/headless-events.js +5 -2
- package/dist/headless.js +5 -6
- package/dist/loader.js +0 -0
- package/dist/onboarding.d.ts +20 -1
- package/dist/onboarding.js +99 -39
- package/dist/resources/extensions/ask-user-questions.js +17 -5
- package/dist/resources/extensions/claude-code-cli/models.js +9 -0
- package/dist/resources/extensions/claude-code-cli/readiness.js +12 -2
- package/dist/resources/extensions/claude-code-cli/stream-adapter.js +76 -4
- package/dist/resources/extensions/gsd/auto/detect-stuck.js +9 -0
- package/dist/resources/extensions/gsd/auto/loop.js +67 -4
- package/dist/resources/extensions/gsd/auto/phases.js +70 -47
- package/dist/resources/extensions/gsd/auto/resolve.js +1 -1
- package/dist/resources/extensions/gsd/auto/run-unit.js +10 -1
- package/dist/resources/extensions/gsd/auto/session.js +5 -0
- package/dist/resources/extensions/gsd/auto-artifact-paths.js +20 -0
- package/dist/resources/extensions/gsd/auto-dashboard.js +15 -7
- package/dist/resources/extensions/gsd/auto-dispatch.js +112 -6
- package/dist/resources/extensions/gsd/auto-loop.js +1 -1
- package/dist/resources/extensions/gsd/auto-model-selection.js +11 -3
- package/dist/resources/extensions/gsd/auto-post-unit.js +10 -8
- package/dist/resources/extensions/gsd/auto-prompts.js +173 -39
- package/dist/resources/extensions/gsd/auto-recovery.js +57 -0
- package/dist/resources/extensions/gsd/auto-start.js +5 -3
- package/dist/resources/extensions/gsd/auto-verification.js +3 -3
- package/dist/resources/extensions/gsd/auto-worktree.js +55 -1
- package/dist/resources/extensions/gsd/auto.js +57 -25
- package/dist/resources/extensions/gsd/bootstrap/agent-end-recovery.js +8 -21
- package/dist/resources/extensions/gsd/bootstrap/db-tools.js +45 -23
- package/dist/resources/extensions/gsd/bootstrap/memory-tools.js +128 -0
- package/dist/resources/extensions/gsd/bootstrap/query-tools.js +29 -0
- package/dist/resources/extensions/gsd/bootstrap/register-extension.js +2 -0
- package/dist/resources/extensions/gsd/bootstrap/register-hooks.js +22 -0
- package/dist/resources/extensions/gsd/bootstrap/system-context.js +17 -4
- package/dist/resources/extensions/gsd/commands/catalog.js +81 -9
- package/dist/resources/extensions/gsd/commands/handlers/core.js +64 -24
- package/dist/resources/extensions/gsd/commands/handlers/escalate.js +171 -0
- package/dist/resources/extensions/gsd/commands/handlers/onboarding.js +159 -0
- package/dist/resources/extensions/gsd/commands/handlers/ops.js +21 -0
- package/dist/resources/extensions/gsd/commands/handlers/workflow.js +228 -29
- package/dist/resources/extensions/gsd/commands-cmux.js +5 -2
- package/dist/resources/extensions/gsd/commands-config.js +5 -0
- package/dist/resources/extensions/gsd/commands-debug.js +388 -0
- package/dist/resources/extensions/gsd/commands-do.js +1 -0
- package/dist/resources/extensions/gsd/commands-extract-learnings.js +233 -75
- package/dist/resources/extensions/gsd/commands-handlers.js +21 -2
- package/dist/resources/extensions/gsd/commands-memory.js +462 -0
- package/dist/resources/extensions/gsd/commands-prefs-wizard.js +40 -12
- package/dist/resources/extensions/gsd/commands-scan.js +94 -0
- package/dist/resources/extensions/gsd/commands-workflow-templates.js +101 -2
- package/dist/resources/extensions/gsd/custom-workflow-engine.js +74 -54
- package/dist/resources/extensions/gsd/db-writer.js +1 -0
- package/dist/resources/extensions/gsd/debug-session-store.js +238 -0
- package/dist/resources/extensions/gsd/definition-loader.js +7 -0
- package/dist/resources/extensions/gsd/docs/preferences-reference.md +9 -9
- package/dist/resources/extensions/gsd/doctor-environment.js +2 -1
- package/dist/resources/extensions/gsd/doctor-git-checks.js +5 -1
- package/dist/resources/extensions/gsd/doctor-proactive.js +4 -1
- package/dist/resources/extensions/gsd/doctor-providers.js +48 -20
- package/dist/resources/extensions/gsd/doctor-runtime-checks.js +22 -4
- package/dist/resources/extensions/gsd/doctor.js +7 -1
- package/dist/resources/extensions/gsd/error-classifier.js +6 -3
- package/dist/resources/extensions/gsd/escalation.js +321 -0
- package/dist/resources/extensions/gsd/forensics.js +26 -29
- package/dist/resources/extensions/gsd/git-service.js +0 -1
- package/dist/resources/extensions/gsd/graph.js +26 -2
- package/dist/resources/extensions/gsd/gsd-db.js +490 -32
- package/dist/resources/extensions/gsd/health-widget-core.js +42 -14
- package/dist/resources/extensions/gsd/health-widget.js +7 -4
- package/dist/resources/extensions/gsd/init-wizard.js +86 -45
- package/dist/resources/extensions/gsd/markdown-renderer.js +5 -5
- package/dist/resources/extensions/gsd/memory-embeddings.js +219 -0
- package/dist/resources/extensions/gsd/memory-extractor.js +78 -27
- package/dist/resources/extensions/gsd/memory-ingest.js +218 -0
- package/dist/resources/extensions/gsd/memory-relations.js +189 -0
- package/dist/resources/extensions/gsd/memory-source-store.js +113 -0
- package/dist/resources/extensions/gsd/memory-store.js +299 -6
- package/dist/resources/extensions/gsd/metrics.js +1 -0
- package/dist/resources/extensions/gsd/model-cost-table.js +3 -1
- package/dist/resources/extensions/gsd/model-router.js +16 -6
- package/dist/resources/extensions/gsd/native-git-bridge.js +137 -5
- package/dist/resources/extensions/gsd/notification-overlay.js +7 -22
- package/dist/resources/extensions/gsd/notification-widget.js +24 -39
- package/dist/resources/extensions/gsd/notifications.js +4 -0
- package/dist/resources/extensions/gsd/onboarding-state.js +133 -0
- package/dist/resources/extensions/gsd/post-execution-checks.js +27 -11
- package/dist/resources/extensions/gsd/pre-execution-checks.js +97 -4
- package/dist/resources/extensions/gsd/preferences-models.js +1 -0
- package/dist/resources/extensions/gsd/preferences-types.js +2 -1
- package/dist/resources/extensions/gsd/preferences-validation.js +42 -8
- package/dist/resources/extensions/gsd/preferences.js +10 -10
- package/dist/resources/extensions/gsd/prompts/complete-milestone.md +4 -1
- package/dist/resources/extensions/gsd/prompts/debug-diagnose.md +25 -0
- package/dist/resources/extensions/gsd/prompts/debug-session-manager.md +80 -0
- package/dist/resources/extensions/gsd/prompts/execute-task.md +12 -0
- package/dist/resources/extensions/gsd/prompts/plan-milestone.md +12 -0
- package/dist/resources/extensions/gsd/prompts/refine-slice.md +69 -0
- package/dist/resources/extensions/gsd/prompts/scan.md +79 -0
- package/dist/resources/extensions/gsd/prompts/workflow-oneshot.md +26 -0
- package/dist/resources/extensions/gsd/python-resolver.js +70 -0
- package/dist/resources/extensions/gsd/run-manager.js +37 -17
- package/dist/resources/extensions/gsd/setup-catalog.js +75 -0
- package/dist/resources/extensions/gsd/state.js +47 -3
- package/dist/resources/extensions/gsd/templates/PREFERENCES.md +7 -7
- package/dist/resources/extensions/gsd/tools/complete-task.js +80 -0
- package/dist/resources/extensions/gsd/tools/memory-tools.js +306 -0
- package/dist/resources/extensions/gsd/tools/plan-milestone.js +37 -12
- package/dist/resources/extensions/gsd/tools/plan-slice.js +5 -2
- package/dist/resources/extensions/gsd/tools/skip-slice.js +78 -0
- package/dist/resources/extensions/gsd/uok/flags.js +7 -7
- package/dist/resources/extensions/gsd/uok/kernel.js +8 -3
- package/dist/resources/extensions/gsd/verification-gate.js +2 -1
- package/dist/resources/extensions/gsd/workflow-dispatch.js +64 -0
- package/dist/resources/extensions/gsd/workflow-install.js +327 -0
- package/dist/resources/extensions/gsd/workflow-manifest.js +8 -0
- package/dist/resources/extensions/gsd/workflow-mcp.js +1 -6
- package/dist/resources/extensions/gsd/workflow-plugins.js +346 -0
- package/dist/resources/extensions/gsd/workflow-projections.js +17 -15
- package/dist/resources/extensions/gsd/workflow-templates/accessibility-audit.md +88 -0
- package/dist/resources/extensions/gsd/workflow-templates/api-breaking-change.md +117 -0
- package/dist/resources/extensions/gsd/workflow-templates/bugfix.md +1 -0
- package/dist/resources/extensions/gsd/workflow-templates/changelog-gen.md +82 -0
- package/dist/resources/extensions/gsd/workflow-templates/ci-bootstrap.md +144 -0
- package/dist/resources/extensions/gsd/workflow-templates/dead-code.md +81 -0
- package/dist/resources/extensions/gsd/workflow-templates/dep-upgrade.md +1 -0
- package/dist/resources/extensions/gsd/workflow-templates/docs-sync.yaml +76 -0
- package/dist/resources/extensions/gsd/workflow-templates/env-audit.yaml +88 -0
- package/dist/resources/extensions/gsd/workflow-templates/full-project.md +1 -0
- package/dist/resources/extensions/gsd/workflow-templates/hotfix.md +1 -0
- package/dist/resources/extensions/gsd/workflow-templates/issue-triage.md +84 -0
- package/dist/resources/extensions/gsd/workflow-templates/observability-setup.md +133 -0
- package/dist/resources/extensions/gsd/workflow-templates/onboarding-check.md +74 -0
- package/dist/resources/extensions/gsd/workflow-templates/performance-audit.md +125 -0
- package/dist/resources/extensions/gsd/workflow-templates/pr-review.md +67 -0
- package/dist/resources/extensions/gsd/workflow-templates/pr-triage.md +83 -0
- package/dist/resources/extensions/gsd/workflow-templates/refactor.md +1 -0
- package/dist/resources/extensions/gsd/workflow-templates/registry.json +184 -0
- package/dist/resources/extensions/gsd/workflow-templates/release.md +118 -0
- package/dist/resources/extensions/gsd/workflow-templates/rename-symbol.yaml +99 -0
- package/dist/resources/extensions/gsd/workflow-templates/security-audit.md +1 -0
- package/dist/resources/extensions/gsd/workflow-templates/small-feature.md +1 -0
- package/dist/resources/extensions/gsd/workflow-templates/spike.md +1 -0
- package/dist/resources/extensions/gsd/workflow-templates/test-backfill.yaml +73 -0
- package/dist/resources/extensions/gsd/worktree-resolver.js +42 -1
- package/dist/resources/extensions/remote-questions/commands.js +380 -0
- package/dist/resources/extensions/remote-questions/manager.js +39 -5
- package/dist/resources/extensions/remote-questions/telegram-adapter.js +79 -4
- package/dist/resources/extensions/shared/interview-ui.js +189 -1
- package/dist/resources/extensions/shared/layout-utils.js +17 -0
- package/dist/resources/extensions/shared/rtk-shared.js +47 -0
- package/dist/resources/extensions/shared/rtk.js +3 -46
- package/dist/resources/skills/create-workflow/SKILL.md +33 -6
- package/dist/rtk-shared.d.ts +10 -0
- package/dist/rtk-shared.js +47 -0
- package/dist/rtk.d.ts +2 -6
- package/dist/rtk.js +3 -48
- package/dist/shared/workspace-types.d.ts +52 -0
- package/dist/shared/workspace-types.js +1 -0
- package/dist/tsconfig.extensions.tsbuildinfo +1 -1
- package/dist/update-check.d.ts +10 -0
- package/dist/update-check.js +24 -3
- package/dist/web/standalone/.next/BUILD_ID +1 -1
- package/dist/web/standalone/.next/app-path-routes-manifest.json +5 -5
- 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/react-loadable-manifest.json +2 -2
- package/dist/web/standalone/.next/required-server-files.json +1 -1
- 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_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 +2 -2
- package/dist/web/standalone/.next/server/app/_not-found.segments/_full.segment.rsc +2 -2
- 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 +2 -2
- 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 +2 -2
- package/dist/web/standalone/.next/server/app/api/boot/route.js +1 -1
- package/dist/web/standalone/.next/server/app/api/boot/route.js.nft.json +1 -1
- package/dist/web/standalone/.next/server/app/api/bridge-terminal/input/route.js +1 -1
- package/dist/web/standalone/.next/server/app/api/bridge-terminal/input/route.js.nft.json +1 -1
- package/dist/web/standalone/.next/server/app/api/bridge-terminal/resize/route.js +1 -1
- package/dist/web/standalone/.next/server/app/api/bridge-terminal/resize/route.js.nft.json +1 -1
- package/dist/web/standalone/.next/server/app/api/bridge-terminal/stream/route.js +2 -2
- package/dist/web/standalone/.next/server/app/api/bridge-terminal/stream/route.js.nft.json +1 -1
- package/dist/web/standalone/.next/server/app/api/captures/route.js +1 -1
- package/dist/web/standalone/.next/server/app/api/captures/route.js.nft.json +1 -1
- package/dist/web/standalone/.next/server/app/api/cleanup/route.js +1 -1
- package/dist/web/standalone/.next/server/app/api/cleanup/route.js.nft.json +1 -1
- package/dist/web/standalone/.next/server/app/api/doctor/route.js +1 -1
- package/dist/web/standalone/.next/server/app/api/doctor/route.js.nft.json +1 -1
- package/dist/web/standalone/.next/server/app/api/export-data/route.js +1 -1
- package/dist/web/standalone/.next/server/app/api/export-data/route.js.nft.json +1 -1
- package/dist/web/standalone/.next/server/app/api/files/route.js +1 -1
- package/dist/web/standalone/.next/server/app/api/files/route.js.nft.json +1 -1
- package/dist/web/standalone/.next/server/app/api/forensics/route.js +1 -1
- package/dist/web/standalone/.next/server/app/api/forensics/route.js.nft.json +1 -1
- package/dist/web/standalone/.next/server/app/api/git/route.js +1 -1
- package/dist/web/standalone/.next/server/app/api/git/route.js.nft.json +1 -1
- package/dist/web/standalone/.next/server/app/api/history/route.js +1 -1
- package/dist/web/standalone/.next/server/app/api/history/route.js.nft.json +1 -1
- package/dist/web/standalone/.next/server/app/api/hooks/route.js +1 -1
- package/dist/web/standalone/.next/server/app/api/hooks/route.js.nft.json +1 -1
- package/dist/web/standalone/.next/server/app/api/inspect/route.js +1 -1
- package/dist/web/standalone/.next/server/app/api/inspect/route.js.nft.json +1 -1
- package/dist/web/standalone/.next/server/app/api/knowledge/route.js +1 -1
- package/dist/web/standalone/.next/server/app/api/knowledge/route.js.nft.json +1 -1
- package/dist/web/standalone/.next/server/app/api/live-state/route.js +1 -1
- package/dist/web/standalone/.next/server/app/api/live-state/route.js.nft.json +1 -1
- package/dist/web/standalone/.next/server/app/api/notifications/route.js +2 -2
- package/dist/web/standalone/.next/server/app/api/notifications/route.js.nft.json +1 -1
- package/dist/web/standalone/.next/server/app/api/onboarding/route.js +1 -1
- package/dist/web/standalone/.next/server/app/api/onboarding/route.js.nft.json +1 -1
- package/dist/web/standalone/.next/server/app/api/projects/route.js +1 -1
- package/dist/web/standalone/.next/server/app/api/projects/route.js.nft.json +1 -1
- package/dist/web/standalone/.next/server/app/api/recovery/route.js +1 -1
- package/dist/web/standalone/.next/server/app/api/recovery/route.js.nft.json +1 -1
- package/dist/web/standalone/.next/server/app/api/session/browser/route.js +1 -1
- package/dist/web/standalone/.next/server/app/api/session/browser/route.js.nft.json +1 -1
- package/dist/web/standalone/.next/server/app/api/session/command/route.js +1 -1
- package/dist/web/standalone/.next/server/app/api/session/command/route.js.nft.json +1 -1
- package/dist/web/standalone/.next/server/app/api/session/events/route.js +2 -2
- package/dist/web/standalone/.next/server/app/api/session/events/route.js.nft.json +1 -1
- package/dist/web/standalone/.next/server/app/api/session/manage/route.js +1 -1
- package/dist/web/standalone/.next/server/app/api/session/manage/route.js.nft.json +1 -1
- package/dist/web/standalone/.next/server/app/api/settings-data/route.js +1 -1
- package/dist/web/standalone/.next/server/app/api/settings-data/route.js.nft.json +1 -1
- package/dist/web/standalone/.next/server/app/api/skill-health/route.js +1 -1
- package/dist/web/standalone/.next/server/app/api/skill-health/route.js.nft.json +1 -1
- package/dist/web/standalone/.next/server/app/api/steer/route.js +1 -1
- package/dist/web/standalone/.next/server/app/api/steer/route.js.nft.json +1 -1
- package/dist/web/standalone/.next/server/app/api/switch-root/route.js +1 -1
- package/dist/web/standalone/.next/server/app/api/switch-root/route.js.nft.json +1 -1
- package/dist/web/standalone/.next/server/app/api/terminal/sessions/route.js +2 -2
- package/dist/web/standalone/.next/server/app/api/terminal/sessions/route.js.nft.json +1 -1
- package/dist/web/standalone/.next/server/app/api/terminal/stream/route.js +2 -2
- package/dist/web/standalone/.next/server/app/api/terminal/stream/route.js.nft.json +1 -1
- package/dist/web/standalone/.next/server/app/api/undo/route.js +1 -1
- package/dist/web/standalone/.next/server/app/api/undo/route.js.nft.json +1 -1
- package/dist/web/standalone/.next/server/app/api/update/route.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.js.nft.json +1 -1
- package/dist/web/standalone/.next/server/app/index.html +1 -1
- package/dist/web/standalone/.next/server/app/index.rsc +3 -3
- 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 +3 -3
- 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 +2 -2
- package/dist/web/standalone/.next/server/app/index.segments/_tree.segment.rsc +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 +5 -5
- package/dist/web/standalone/.next/server/chunks/6897.js +2 -2
- package/dist/web/standalone/.next/server/chunks/7461.js +1 -0
- package/dist/web/standalone/.next/server/middleware-build-manifest.js +1 -1
- package/dist/web/standalone/.next/server/middleware-manifest.json +5 -5
- package/dist/web/standalone/.next/server/middleware-react-loadable-manifest.js +1 -1
- package/dist/web/standalone/.next/server/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/2826.e59e8578e2e28639.js +9 -0
- package/dist/web/standalone/.next/static/chunks/{2008.71ee9230ad78df21.js → 3621.fc7480022c972438.js} +2 -2
- package/dist/web/standalone/.next/static/chunks/app/{page-f1e30ab6bb269149.js → page-5b113fd32bc2a1c3.js} +1 -1
- package/dist/web/standalone/.next/static/chunks/{webpack-b868033a5834586d.js → webpack-5fc74f13a25fa1bb.js} +1 -1
- package/dist/web/standalone/.next/static/css/632cd626b1731d88.css +1 -0
- package/dist/web/standalone/server.js +1 -1
- package/dist/welcome-screen.js +48 -24
- package/dist/wizard.js +2 -2
- package/dist/worktree-cli.d.ts +6 -5
- package/dist/worktree-cli.js +23 -7
- package/package.json +3 -3
- package/packages/mcp-server/dist/server.d.ts.map +1 -1
- package/packages/mcp-server/dist/server.js +12 -10
- package/packages/mcp-server/dist/server.js.map +1 -1
- package/packages/mcp-server/dist/session-manager.d.ts.map +1 -1
- package/packages/mcp-server/dist/session-manager.js +8 -1
- package/packages/mcp-server/dist/session-manager.js.map +1 -1
- package/packages/mcp-server/dist/workflow-tools.d.ts +1 -0
- package/packages/mcp-server/dist/workflow-tools.d.ts.map +1 -1
- package/packages/mcp-server/dist/workflow-tools.js +113 -14
- package/packages/mcp-server/dist/workflow-tools.js.map +1 -1
- package/packages/mcp-server/src/mcp-server.test.ts +40 -4
- package/packages/mcp-server/src/server.ts +12 -10
- package/packages/mcp-server/src/session-manager.ts +10 -3
- package/packages/mcp-server/src/workflow-tools.test.ts +91 -1
- package/packages/mcp-server/src/workflow-tools.ts +128 -18
- package/packages/mcp-server/tsconfig.tsbuildinfo +1 -1
- package/packages/native/tsconfig.tsbuildinfo +1 -1
- package/packages/pi-agent-core/tsconfig.tsbuildinfo +1 -1
- package/packages/pi-ai/dist/models/capability-patches.d.ts.map +1 -1
- package/packages/pi-ai/dist/models/capability-patches.js +3 -2
- package/packages/pi-ai/dist/models/capability-patches.js.map +1 -1
- package/packages/pi-ai/dist/models/generated/amazon-bedrock.d.ts +68 -0
- package/packages/pi-ai/dist/models/generated/amazon-bedrock.d.ts.map +1 -1
- package/packages/pi-ai/dist/models/generated/amazon-bedrock.js +68 -0
- package/packages/pi-ai/dist/models/generated/amazon-bedrock.js.map +1 -1
- package/packages/pi-ai/dist/models/generated/anthropic.d.ts +17 -0
- package/packages/pi-ai/dist/models/generated/anthropic.d.ts.map +1 -1
- package/packages/pi-ai/dist/models/generated/anthropic.js +17 -0
- package/packages/pi-ai/dist/models/generated/anthropic.js.map +1 -1
- package/packages/pi-ai/dist/models/generated/google-antigravity.d.ts +17 -0
- package/packages/pi-ai/dist/models/generated/google-antigravity.d.ts.map +1 -1
- package/packages/pi-ai/dist/models/generated/google-antigravity.js +17 -0
- package/packages/pi-ai/dist/models/generated/google-antigravity.js.map +1 -1
- package/packages/pi-ai/dist/models/generated/groq.d.ts +0 -153
- package/packages/pi-ai/dist/models/generated/groq.d.ts.map +1 -1
- package/packages/pi-ai/dist/models/generated/groq.js +0 -153
- package/packages/pi-ai/dist/models/generated/groq.js.map +1 -1
- package/packages/pi-ai/dist/models/generated/index.d.ts +136 -153
- package/packages/pi-ai/dist/models/generated/index.d.ts.map +1 -1
- package/packages/pi-ai/dist/models/generated/openai-codex.d.ts +17 -0
- package/packages/pi-ai/dist/models/generated/openai-codex.d.ts.map +1 -1
- package/packages/pi-ai/dist/models/generated/openai-codex.js +17 -0
- package/packages/pi-ai/dist/models/generated/openai-codex.js.map +1 -1
- package/packages/pi-ai/dist/models/generated/openrouter.d.ts +17 -0
- package/packages/pi-ai/dist/models/generated/openrouter.d.ts.map +1 -1
- package/packages/pi-ai/dist/models/generated/openrouter.js +17 -0
- package/packages/pi-ai/dist/models/generated/openrouter.js.map +1 -1
- package/packages/pi-ai/dist/models.generated.test.js +17 -0
- package/packages/pi-ai/dist/models.generated.test.js.map +1 -1
- package/packages/pi-ai/dist/providers/amazon-bedrock.d.ts +22 -1
- package/packages/pi-ai/dist/providers/amazon-bedrock.d.ts.map +1 -1
- package/packages/pi-ai/dist/providers/amazon-bedrock.js +40 -6
- package/packages/pi-ai/dist/providers/amazon-bedrock.js.map +1 -1
- package/packages/pi-ai/dist/providers/amazon-bedrock.test.d.ts +2 -0
- package/packages/pi-ai/dist/providers/amazon-bedrock.test.d.ts.map +1 -0
- package/packages/pi-ai/dist/providers/amazon-bedrock.test.js +106 -0
- package/packages/pi-ai/dist/providers/amazon-bedrock.test.js.map +1 -0
- package/packages/pi-ai/dist/providers/anthropic-auth.test.js +42 -1
- package/packages/pi-ai/dist/providers/anthropic-auth.test.js.map +1 -1
- package/packages/pi-ai/dist/providers/anthropic-shared.d.ts +20 -1
- package/packages/pi-ai/dist/providers/anthropic-shared.d.ts.map +1 -1
- package/packages/pi-ai/dist/providers/anthropic-shared.js +32 -2
- package/packages/pi-ai/dist/providers/anthropic-shared.js.map +1 -1
- package/packages/pi-ai/dist/providers/anthropic-shared.test.js +12 -1
- package/packages/pi-ai/dist/providers/anthropic-shared.test.js.map +1 -1
- package/packages/pi-ai/dist/providers/anthropic.d.ts +11 -0
- package/packages/pi-ai/dist/providers/anthropic.d.ts.map +1 -1
- package/packages/pi-ai/dist/providers/anthropic.js +18 -1
- package/packages/pi-ai/dist/providers/anthropic.js.map +1 -1
- package/packages/pi-ai/dist/utils/oauth/openai-codex.d.ts.map +1 -1
- package/packages/pi-ai/dist/utils/oauth/openai-codex.js +12 -0
- package/packages/pi-ai/dist/utils/oauth/openai-codex.js.map +1 -1
- package/packages/pi-ai/package.json +1 -1
- package/packages/pi-ai/scripts/generate-models.ts +50 -0
- package/packages/pi-ai/src/models/capability-patches.ts +5 -2
- package/packages/pi-ai/src/models/generated/amazon-bedrock.ts +68 -0
- package/packages/pi-ai/src/models/generated/anthropic.ts +17 -0
- package/packages/pi-ai/src/models/generated/google-antigravity.ts +17 -0
- package/packages/pi-ai/src/models/generated/groq.ts +0 -153
- package/packages/pi-ai/src/models/generated/openai-codex.ts +17 -0
- package/packages/pi-ai/src/models/generated/openrouter.ts +17 -0
- package/packages/pi-ai/src/models.generated.test.ts +17 -0
- package/packages/pi-ai/src/providers/amazon-bedrock.test.ts +164 -0
- package/packages/pi-ai/src/providers/amazon-bedrock.ts +41 -7
- package/packages/pi-ai/src/providers/anthropic-auth.test.ts +47 -1
- package/packages/pi-ai/src/providers/anthropic-shared.test.ts +15 -1
- package/packages/pi-ai/src/providers/anthropic-shared.ts +36 -3
- package/packages/pi-ai/src/providers/anthropic.ts +19 -1
- package/packages/pi-ai/src/utils/oauth/openai-codex.ts +15 -0
- package/packages/pi-ai/tsconfig.tsbuildinfo +1 -1
- package/packages/pi-coding-agent/dist/core/agent-session-abort-order.test.d.ts +2 -0
- package/packages/pi-coding-agent/dist/core/agent-session-abort-order.test.d.ts.map +1 -0
- package/packages/pi-coding-agent/dist/core/agent-session-abort-order.test.js +38 -0
- package/packages/pi-coding-agent/dist/core/agent-session-abort-order.test.js.map +1 -0
- package/packages/pi-coding-agent/dist/core/auth-storage.d.ts +14 -0
- package/packages/pi-coding-agent/dist/core/auth-storage.d.ts.map +1 -1
- package/packages/pi-coding-agent/dist/core/auth-storage.js +34 -0
- package/packages/pi-coding-agent/dist/core/auth-storage.js.map +1 -1
- package/packages/pi-coding-agent/dist/core/auth-storage.test.js +74 -0
- package/packages/pi-coding-agent/dist/core/auth-storage.test.js.map +1 -1
- package/packages/pi-coding-agent/dist/core/chat-controller-ordering.test.js +4 -1
- package/packages/pi-coding-agent/dist/core/chat-controller-ordering.test.js.map +1 -1
- package/packages/pi-coding-agent/dist/core/model-registry-auth-mode.test.js +32 -0
- package/packages/pi-coding-agent/dist/core/model-registry-auth-mode.test.js.map +1 -1
- package/packages/pi-coding-agent/dist/core/sdk.d.ts.map +1 -1
- package/packages/pi-coding-agent/dist/core/sdk.js +32 -0
- package/packages/pi-coding-agent/dist/core/sdk.js.map +1 -1
- package/packages/pi-coding-agent/dist/core/skill-tool.test.js +2 -2
- package/packages/pi-coding-agent/dist/core/skill-tool.test.js.map +1 -1
- package/packages/pi-coding-agent/dist/modes/interactive/components/chat-frame.d.ts.map +1 -1
- package/packages/pi-coding-agent/dist/modes/interactive/components/chat-frame.js +17 -7
- package/packages/pi-coding-agent/dist/modes/interactive/components/chat-frame.js.map +1 -1
- package/packages/pi-coding-agent/dist/modes/interactive/components/footer.d.ts.map +1 -1
- package/packages/pi-coding-agent/dist/modes/interactive/components/footer.js +48 -34
- package/packages/pi-coding-agent/dist/modes/interactive/components/footer.js.map +1 -1
- package/packages/pi-coding-agent/dist/modes/interactive/controllers/chat-controller.d.ts +4 -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 +83 -33
- package/packages/pi-coding-agent/dist/modes/interactive/controllers/chat-controller.js.map +1 -1
- package/packages/pi-coding-agent/dist/modes/interactive/theme/theme-schema.d.ts +70 -0
- package/packages/pi-coding-agent/dist/modes/interactive/theme/theme-schema.d.ts.map +1 -0
- package/packages/pi-coding-agent/dist/modes/interactive/theme/theme-schema.js +77 -0
- package/packages/pi-coding-agent/dist/modes/interactive/theme/theme-schema.js.map +1 -0
- package/packages/pi-coding-agent/dist/modes/interactive/theme/theme.d.ts +1 -66
- package/packages/pi-coding-agent/dist/modes/interactive/theme/theme.d.ts.map +1 -1
- package/packages/pi-coding-agent/dist/modes/interactive/theme/theme.js +1 -75
- package/packages/pi-coding-agent/dist/modes/interactive/theme/theme.js.map +1 -1
- package/packages/pi-coding-agent/dist/modes/interactive/theme/themes.d.ts +1 -1
- package/packages/pi-coding-agent/dist/modes/interactive/theme/themes.d.ts.map +1 -1
- package/packages/pi-coding-agent/dist/modes/interactive/theme/themes.js +192 -24
- package/packages/pi-coding-agent/dist/modes/interactive/theme/themes.js.map +1 -1
- package/packages/pi-coding-agent/src/core/agent-session-abort-order.test.ts +56 -0
- package/packages/pi-coding-agent/src/core/auth-storage.test.ts +83 -0
- package/packages/pi-coding-agent/src/core/auth-storage.ts +35 -0
- package/packages/pi-coding-agent/src/core/chat-controller-ordering.test.ts +4 -1
- package/packages/pi-coding-agent/src/core/model-registry-auth-mode.test.ts +37 -1
- package/packages/pi-coding-agent/src/core/sdk.ts +41 -0
- package/packages/pi-coding-agent/src/core/skill-tool.test.ts +2 -2
- package/packages/pi-coding-agent/src/modes/interactive/components/chat-frame.ts +19 -7
- package/packages/pi-coding-agent/src/modes/interactive/components/footer.ts +53 -31
- package/packages/pi-coding-agent/src/modes/interactive/controllers/chat-controller.ts +88 -36
- package/packages/pi-coding-agent/src/modes/interactive/theme/theme-schema.ts +83 -0
- package/packages/pi-coding-agent/src/modes/interactive/theme/theme.ts +2 -83
- package/packages/pi-coding-agent/src/modes/interactive/theme/themes.ts +208 -27
- package/packages/pi-coding-agent/tsconfig.tsbuildinfo +1 -1
- package/packages/pi-tui/tsconfig.tsbuildinfo +1 -1
- package/packages/rpc-client/tsconfig.tsbuildinfo +1 -1
- package/pkg/dist/modes/interactive/theme/theme-schema.d.ts +70 -0
- package/pkg/dist/modes/interactive/theme/theme-schema.d.ts.map +1 -0
- package/pkg/dist/modes/interactive/theme/theme-schema.js +77 -0
- package/pkg/dist/modes/interactive/theme/theme-schema.js.map +1 -0
- package/pkg/dist/modes/interactive/theme/theme.d.ts +1 -66
- package/pkg/dist/modes/interactive/theme/theme.d.ts.map +1 -1
- package/pkg/dist/modes/interactive/theme/theme.js +1 -75
- package/pkg/dist/modes/interactive/theme/theme.js.map +1 -1
- package/pkg/dist/modes/interactive/theme/themes.d.ts +1 -1
- package/pkg/dist/modes/interactive/theme/themes.d.ts.map +1 -1
- package/pkg/dist/modes/interactive/theme/themes.js +192 -24
- package/pkg/dist/modes/interactive/theme/themes.js.map +1 -1
- package/src/resources/extensions/ask-user-questions.ts +24 -6
- package/src/resources/extensions/claude-code-cli/models.ts +9 -0
- package/src/resources/extensions/claude-code-cli/readiness.ts +13 -2
- package/src/resources/extensions/claude-code-cli/stream-adapter.ts +94 -4
- package/src/resources/extensions/claude-code-cli/tests/stream-adapter.test.ts +84 -0
- package/src/resources/extensions/gsd/auto/detect-stuck.ts +10 -0
- package/src/resources/extensions/gsd/auto/loop-deps.ts +1 -0
- package/src/resources/extensions/gsd/auto/loop.ts +109 -3
- package/src/resources/extensions/gsd/auto/phases.ts +94 -60
- package/src/resources/extensions/gsd/auto/resolve.ts +1 -1
- package/src/resources/extensions/gsd/auto/run-unit.ts +11 -1
- package/src/resources/extensions/gsd/auto/session.ts +7 -0
- package/src/resources/extensions/gsd/auto-artifact-paths.ts +20 -0
- package/src/resources/extensions/gsd/auto-dashboard.ts +21 -4
- package/src/resources/extensions/gsd/auto-dispatch.ts +123 -5
- package/src/resources/extensions/gsd/auto-loop.ts +1 -1
- package/src/resources/extensions/gsd/auto-model-selection.ts +14 -3
- package/src/resources/extensions/gsd/auto-post-unit.ts +10 -8
- package/src/resources/extensions/gsd/auto-prompts.ts +201 -40
- package/src/resources/extensions/gsd/auto-recovery.ts +63 -1
- package/src/resources/extensions/gsd/auto-start.ts +8 -6
- package/src/resources/extensions/gsd/auto-verification.ts +3 -3
- package/src/resources/extensions/gsd/auto-worktree.ts +65 -0
- package/src/resources/extensions/gsd/auto.ts +61 -28
- package/src/resources/extensions/gsd/bootstrap/agent-end-recovery.ts +8 -21
- package/src/resources/extensions/gsd/bootstrap/db-tools.ts +46 -24
- package/src/resources/extensions/gsd/bootstrap/memory-tools.ts +158 -0
- package/src/resources/extensions/gsd/bootstrap/query-tools.ts +31 -0
- package/src/resources/extensions/gsd/bootstrap/register-extension.ts +2 -0
- package/src/resources/extensions/gsd/bootstrap/register-hooks.ts +22 -0
- package/src/resources/extensions/gsd/bootstrap/system-context.ts +20 -4
- package/src/resources/extensions/gsd/commands/catalog.ts +74 -9
- package/src/resources/extensions/gsd/commands/handlers/core.ts +69 -27
- package/src/resources/extensions/gsd/commands/handlers/escalate.ts +216 -0
- package/src/resources/extensions/gsd/commands/handlers/onboarding.ts +196 -0
- package/src/resources/extensions/gsd/commands/handlers/ops.ts +21 -0
- package/src/resources/extensions/gsd/commands/handlers/workflow.ts +279 -29
- package/src/resources/extensions/gsd/commands-cmux.ts +6 -2
- package/src/resources/extensions/gsd/commands-config.ts +10 -0
- package/src/resources/extensions/gsd/commands-debug.ts +484 -0
- package/src/resources/extensions/gsd/commands-do.ts +1 -0
- package/src/resources/extensions/gsd/commands-extract-learnings.ts +295 -76
- package/src/resources/extensions/gsd/commands-handlers.ts +19 -2
- package/src/resources/extensions/gsd/commands-memory.ts +551 -0
- package/src/resources/extensions/gsd/commands-prefs-wizard.ts +49 -12
- package/src/resources/extensions/gsd/commands-scan.ts +125 -0
- package/src/resources/extensions/gsd/commands-workflow-templates.ts +129 -2
- package/src/resources/extensions/gsd/custom-workflow-engine.ts +85 -60
- package/src/resources/extensions/gsd/db-writer.ts +3 -0
- package/src/resources/extensions/gsd/debug-session-store.ts +377 -0
- package/src/resources/extensions/gsd/definition-loader.ts +7 -0
- package/src/resources/extensions/gsd/docs/preferences-reference.md +9 -9
- package/src/resources/extensions/gsd/doctor-environment.ts +2 -1
- package/src/resources/extensions/gsd/doctor-git-checks.ts +5 -1
- package/src/resources/extensions/gsd/doctor-proactive.ts +4 -1
- package/src/resources/extensions/gsd/doctor-providers.ts +52 -22
- package/src/resources/extensions/gsd/doctor-runtime-checks.ts +23 -4
- package/src/resources/extensions/gsd/doctor-types.ts +1 -0
- package/src/resources/extensions/gsd/doctor.ts +7 -1
- package/src/resources/extensions/gsd/error-classifier.ts +6 -3
- package/src/resources/extensions/gsd/escalation.ts +367 -0
- package/src/resources/extensions/gsd/forensics.ts +25 -29
- package/src/resources/extensions/gsd/git-service.ts +0 -1
- package/src/resources/extensions/gsd/graph.ts +33 -3
- package/src/resources/extensions/gsd/gsd-db.ts +578 -32
- package/src/resources/extensions/gsd/health-widget-core.ts +43 -14
- package/src/resources/extensions/gsd/health-widget.ts +7 -3
- package/src/resources/extensions/gsd/init-wizard.ts +87 -54
- package/src/resources/extensions/gsd/markdown-renderer.ts +5 -5
- package/src/resources/extensions/gsd/memory-embeddings.ts +235 -0
- package/src/resources/extensions/gsd/memory-extractor.ts +100 -34
- package/src/resources/extensions/gsd/memory-ingest.ts +286 -0
- package/src/resources/extensions/gsd/memory-relations.ts +240 -0
- package/src/resources/extensions/gsd/memory-source-store.ts +138 -0
- package/src/resources/extensions/gsd/memory-store.ts +351 -7
- package/src/resources/extensions/gsd/metrics.ts +1 -0
- package/src/resources/extensions/gsd/model-cost-table.ts +3 -1
- package/src/resources/extensions/gsd/model-router.ts +25 -6
- package/src/resources/extensions/gsd/native-git-bridge.ts +134 -6
- package/src/resources/extensions/gsd/notification-overlay.ts +9 -19
- package/src/resources/extensions/gsd/notification-widget.ts +25 -43
- package/src/resources/extensions/gsd/notifications.ts +6 -0
- package/src/resources/extensions/gsd/onboarding-state.ts +146 -0
- package/src/resources/extensions/gsd/post-execution-checks.ts +37 -14
- package/src/resources/extensions/gsd/pre-execution-checks.ts +98 -8
- package/src/resources/extensions/gsd/preferences-models.ts +1 -0
- package/src/resources/extensions/gsd/preferences-types.ts +10 -2
- package/src/resources/extensions/gsd/preferences-validation.ts +33 -7
- package/src/resources/extensions/gsd/preferences.ts +10 -10
- package/src/resources/extensions/gsd/prompts/complete-milestone.md +4 -1
- package/src/resources/extensions/gsd/prompts/debug-diagnose.md +25 -0
- package/src/resources/extensions/gsd/prompts/debug-session-manager.md +80 -0
- package/src/resources/extensions/gsd/prompts/execute-task.md +12 -0
- package/src/resources/extensions/gsd/prompts/plan-milestone.md +12 -0
- package/src/resources/extensions/gsd/prompts/refine-slice.md +69 -0
- package/src/resources/extensions/gsd/prompts/scan.md +79 -0
- package/src/resources/extensions/gsd/prompts/workflow-oneshot.md +26 -0
- package/src/resources/extensions/gsd/python-resolver.ts +76 -0
- package/src/resources/extensions/gsd/run-manager.ts +53 -19
- package/src/resources/extensions/gsd/setup-catalog.ts +105 -0
- package/src/resources/extensions/gsd/state.ts +50 -2
- package/src/resources/extensions/gsd/templates/PREFERENCES.md +7 -7
- package/src/resources/extensions/gsd/tests/agent-end-retry.test.ts +1 -34
- package/src/resources/extensions/gsd/tests/artifact-corruption-2630.test.ts +7 -0
- package/src/resources/extensions/gsd/tests/auto-loop.test.ts +45 -31
- package/src/resources/extensions/gsd/tests/auto-migrating-recovery.test.ts +63 -0
- package/src/resources/extensions/gsd/tests/auto-model-selection.test.ts +12 -0
- package/src/resources/extensions/gsd/tests/auto-prompts-fallback.test.ts +35 -0
- package/src/resources/extensions/gsd/tests/auto-recovery.test.ts +123 -1
- package/src/resources/extensions/gsd/tests/auto-wrapup-inflight-guard.test.ts +39 -0
- package/src/resources/extensions/gsd/tests/autocomplete-regressions-1675.test.ts +39 -0
- package/src/resources/extensions/gsd/tests/commands-do.test.ts +48 -0
- package/src/resources/extensions/gsd/tests/commands-extract-learnings.test.ts +333 -21
- package/src/resources/extensions/gsd/tests/commands-scan.test.ts +351 -0
- package/src/resources/extensions/gsd/tests/commands-workflow-custom.test.ts +8 -6
- package/src/resources/extensions/gsd/tests/complete-slice.test.ts +6 -8
- package/src/resources/extensions/gsd/tests/complete-task.test.ts +2 -2
- package/src/resources/extensions/gsd/tests/custom-workflow-engine.test.ts +63 -0
- package/src/resources/extensions/gsd/tests/debug-command-handler.test.ts +905 -0
- package/src/resources/extensions/gsd/tests/debug-command-lifecycle.integration.test.ts +1229 -0
- package/src/resources/extensions/gsd/tests/debug-session-store.test.ts +565 -0
- package/src/resources/extensions/gsd/tests/discuss-milestone-structured-questions.test.ts +64 -0
- package/src/resources/extensions/gsd/tests/dispatch-complete-milestone-guard.test.ts +67 -0
- package/src/resources/extensions/gsd/tests/doctor-providers.test.ts +62 -18
- package/src/resources/extensions/gsd/tests/enhanced-verification-integration.test.ts +5 -0
- package/src/resources/extensions/gsd/tests/escalation.test.ts +818 -0
- package/src/resources/extensions/gsd/tests/finalize-timeout-guard.test.ts +29 -12
- package/src/resources/extensions/gsd/tests/flat-rate-routing-guard.test.ts +106 -0
- package/src/resources/extensions/gsd/tests/forensics-hook-key-parse.test.ts +74 -0
- package/src/resources/extensions/gsd/tests/graph-operations.test.ts +0 -4
- package/src/resources/extensions/gsd/tests/gsd-db.test.ts +44 -1
- package/src/resources/extensions/gsd/tests/health-widget.test.ts +8 -2
- package/src/resources/extensions/gsd/tests/init-prefs-routing.test.ts +190 -0
- package/src/resources/extensions/gsd/tests/integration/doctor-git.test.ts +39 -0
- package/src/resources/extensions/gsd/tests/integration/doctor-proactive.test.ts +44 -0
- package/src/resources/extensions/gsd/tests/integration/doctor-runtime.test.ts +68 -1
- package/src/resources/extensions/gsd/tests/integration/git-service.test.ts +109 -11
- package/src/resources/extensions/gsd/tests/integration/idle-recovery.test.ts +51 -0
- package/src/resources/extensions/gsd/tests/integration/integration-proof.test.ts +2 -2
- package/src/resources/extensions/gsd/tests/integration/test-isolation.ts +53 -0
- package/src/resources/extensions/gsd/tests/journal-integration.test.ts +171 -1
- package/src/resources/extensions/gsd/tests/md-importer.test.ts +1 -1
- package/src/resources/extensions/gsd/tests/memory-embeddings.test.ts +213 -0
- package/src/resources/extensions/gsd/tests/memory-ingest.test.ts +153 -0
- package/src/resources/extensions/gsd/tests/memory-maintenance.test.ts +107 -0
- package/src/resources/extensions/gsd/tests/memory-relations.test.ts +175 -0
- package/src/resources/extensions/gsd/tests/memory-store.test.ts +2 -2
- package/src/resources/extensions/gsd/tests/memory-tools.test.ts +295 -0
- package/src/resources/extensions/gsd/tests/milestone-status-tool.test.ts +3 -2
- package/src/resources/extensions/gsd/tests/model-cost-table.test.ts +2 -2
- package/src/resources/extensions/gsd/tests/model-router.test.ts +51 -1
- package/src/resources/extensions/gsd/tests/model-unittype-mapping.test.ts +59 -0
- package/src/resources/extensions/gsd/tests/notification-overlay.test.ts +56 -37
- package/src/resources/extensions/gsd/tests/notification-widget.test.ts +1 -1
- package/src/resources/extensions/gsd/tests/onboarding-state.test.ts +105 -0
- package/src/resources/extensions/gsd/tests/plan-milestone-boundary-map-preservation.test.ts +114 -0
- package/src/resources/extensions/gsd/tests/plan-milestone.test.ts +4 -5
- package/src/resources/extensions/gsd/tests/plan-slice.test.ts +17 -0
- package/src/resources/extensions/gsd/tests/post-execution-checks.test.ts +105 -1
- package/src/resources/extensions/gsd/tests/pre-execution-checks.test.ts +275 -6
- package/src/resources/extensions/gsd/tests/preferences.test.ts +69 -1
- package/src/resources/extensions/gsd/tests/progressive-planning.test.ts +539 -0
- package/src/resources/extensions/gsd/tests/projection-no-plan-overwrite.test.ts +11 -2
- package/src/resources/extensions/gsd/tests/projection-regression.test.ts +7 -0
- package/src/resources/extensions/gsd/tests/prompt-budget-enforcement.test.ts +27 -0
- package/src/resources/extensions/gsd/tests/prompt-contracts.test.ts +24 -0
- package/src/resources/extensions/gsd/tests/prompt-db.test.ts +1 -1
- package/src/resources/extensions/gsd/tests/provider-errors.test.ts +33 -0
- package/src/resources/extensions/gsd/tests/python-resolver.test.ts +131 -0
- package/src/resources/extensions/gsd/tests/register-hooks-depth-verification.test.ts +67 -0
- package/src/resources/extensions/gsd/tests/remote-notification-from-desktop.test.ts +107 -0
- package/src/resources/extensions/gsd/tests/requirements.test.ts +9 -0
- package/src/resources/extensions/gsd/tests/session-start-footer.test.ts +153 -0
- package/src/resources/extensions/gsd/tests/skip-slice-cascades-tasks.test.ts +125 -0
- package/src/resources/extensions/gsd/tests/slice-context-injection.test.ts +16 -4
- package/src/resources/extensions/gsd/tests/state-corruption-2945.test.ts +3 -0
- package/src/resources/extensions/gsd/tests/stuck-detection-coverage.test.ts +15 -0
- package/src/resources/extensions/gsd/tests/summary-render-parity.test.ts +5 -0
- package/src/resources/extensions/gsd/tests/uok-contracts.test.ts +2 -1
- package/src/resources/extensions/gsd/tests/uok-flags.test.ts +31 -1
- package/src/resources/extensions/gsd/tests/uok-kernel-path.test.ts +166 -0
- package/src/resources/extensions/gsd/tests/verification-gate.test.ts +35 -0
- package/src/resources/extensions/gsd/tests/workflow-install.test.ts +113 -0
- package/src/resources/extensions/gsd/tests/workflow-logger-wiring.test.ts +15 -6
- package/src/resources/extensions/gsd/tests/workflow-mcp.test.ts +2 -2
- package/src/resources/extensions/gsd/tests/workflow-plugins.test.ts +310 -0
- package/src/resources/extensions/gsd/tests/workflow-projections.test.ts +7 -0
- package/src/resources/extensions/gsd/tests/workflow-templates.test.ts +8 -2
- package/src/resources/extensions/gsd/tests/worktree-journal-events.test.ts +2 -1
- package/src/resources/extensions/gsd/tests/worktree-resolver.test.ts +77 -2
- package/src/resources/extensions/gsd/tools/complete-task.ts +87 -0
- package/src/resources/extensions/gsd/tools/memory-tools.ts +380 -0
- package/src/resources/extensions/gsd/tools/plan-milestone.ts +42 -8
- package/src/resources/extensions/gsd/tools/plan-slice.ts +6 -1
- package/src/resources/extensions/gsd/tools/skip-slice.ts +133 -0
- package/src/resources/extensions/gsd/types.ts +62 -0
- package/src/resources/extensions/gsd/unit-runtime.ts +1 -0
- package/src/resources/extensions/gsd/uok/contracts.ts +2 -1
- package/src/resources/extensions/gsd/uok/flags.ts +7 -7
- package/src/resources/extensions/gsd/uok/kernel.ts +16 -4
- package/src/resources/extensions/gsd/verification-gate.ts +2 -1
- package/src/resources/extensions/gsd/workflow-dispatch.ts +106 -0
- package/src/resources/extensions/gsd/workflow-install.ts +423 -0
- package/src/resources/extensions/gsd/workflow-logger.ts +3 -1
- package/src/resources/extensions/gsd/workflow-manifest.ts +8 -0
- package/src/resources/extensions/gsd/workflow-mcp.ts +1 -6
- package/src/resources/extensions/gsd/workflow-plugins.ts +403 -0
- package/src/resources/extensions/gsd/workflow-projections.ts +18 -16
- package/src/resources/extensions/gsd/workflow-templates/accessibility-audit.md +88 -0
- package/src/resources/extensions/gsd/workflow-templates/api-breaking-change.md +117 -0
- package/src/resources/extensions/gsd/workflow-templates/bugfix.md +1 -0
- package/src/resources/extensions/gsd/workflow-templates/changelog-gen.md +82 -0
- package/src/resources/extensions/gsd/workflow-templates/ci-bootstrap.md +144 -0
- package/src/resources/extensions/gsd/workflow-templates/dead-code.md +81 -0
- package/src/resources/extensions/gsd/workflow-templates/dep-upgrade.md +1 -0
- package/src/resources/extensions/gsd/workflow-templates/docs-sync.yaml +76 -0
- package/src/resources/extensions/gsd/workflow-templates/env-audit.yaml +88 -0
- package/src/resources/extensions/gsd/workflow-templates/full-project.md +1 -0
- package/src/resources/extensions/gsd/workflow-templates/hotfix.md +1 -0
- package/src/resources/extensions/gsd/workflow-templates/issue-triage.md +84 -0
- package/src/resources/extensions/gsd/workflow-templates/observability-setup.md +133 -0
- package/src/resources/extensions/gsd/workflow-templates/onboarding-check.md +74 -0
- package/src/resources/extensions/gsd/workflow-templates/performance-audit.md +125 -0
- package/src/resources/extensions/gsd/workflow-templates/pr-review.md +67 -0
- package/src/resources/extensions/gsd/workflow-templates/pr-triage.md +83 -0
- package/src/resources/extensions/gsd/workflow-templates/refactor.md +1 -0
- package/src/resources/extensions/gsd/workflow-templates/registry.json +184 -0
- package/src/resources/extensions/gsd/workflow-templates/release.md +118 -0
- package/src/resources/extensions/gsd/workflow-templates/rename-symbol.yaml +99 -0
- package/src/resources/extensions/gsd/workflow-templates/security-audit.md +1 -0
- package/src/resources/extensions/gsd/workflow-templates/small-feature.md +1 -0
- package/src/resources/extensions/gsd/workflow-templates/spike.md +1 -0
- package/src/resources/extensions/gsd/workflow-templates/test-backfill.yaml +73 -0
- package/src/resources/extensions/gsd/workflow-templates.ts +7 -0
- package/src/resources/extensions/gsd/workspace-index.ts +9 -4
- package/src/resources/extensions/gsd/worktree-resolver.ts +47 -1
- package/src/resources/extensions/remote-questions/commands.ts +480 -0
- package/src/resources/extensions/remote-questions/manager.ts +49 -4
- package/src/resources/extensions/remote-questions/telegram-adapter.ts +86 -4
- package/src/resources/extensions/remote-questions/tests/command-polling.test.ts +246 -0
- package/src/resources/extensions/remote-questions/tests/remote-answer-normalization.test.ts +92 -0
- package/src/resources/extensions/remote-questions/tests/telegram-commands.test.ts +267 -0
- package/src/resources/extensions/shared/interview-ui.ts +195 -1
- package/src/resources/extensions/shared/layout-utils.ts +26 -0
- package/src/resources/extensions/shared/rtk-shared.ts +58 -0
- package/src/resources/extensions/shared/rtk.ts +12 -52
- package/src/resources/extensions/shared/tests/interview-preview.test.ts +177 -0
- package/src/resources/extensions/shared/tests/preview-layout.test.ts +120 -0
- package/src/resources/skills/create-workflow/SKILL.md +33 -6
- package/dist/web/standalone/.next/static/chunks/2826.dd3dc8bbd3025fa5.js +0 -9
- package/dist/web/standalone/.next/static/css/f6e8833d46e738d8.css +0 -1
- package/packages/native/dist/ps/types.d.ts +0 -5
- package/packages/native/dist/ps/types.js +0 -2
- package/packages/native/src/ps/types.ts +0 -5
- package/packages/pi-ai/node_modules/@smithy/node-http-handler/LICENSE +0 -201
- package/packages/pi-ai/node_modules/@smithy/node-http-handler/README.md +0 -9
- package/packages/pi-ai/node_modules/@smithy/node-http-handler/dist-cjs/index.js +0 -762
- package/packages/pi-ai/node_modules/@smithy/node-http-handler/dist-es/build-abort-error.js +0 -19
- package/packages/pi-ai/node_modules/@smithy/node-http-handler/dist-es/constants.js +0 -1
- package/packages/pi-ai/node_modules/@smithy/node-http-handler/dist-es/get-transformed-headers.js +0 -9
- package/packages/pi-ai/node_modules/@smithy/node-http-handler/dist-es/index.js +0 -3
- package/packages/pi-ai/node_modules/@smithy/node-http-handler/dist-es/node-http-handler.js +0 -230
- package/packages/pi-ai/node_modules/@smithy/node-http-handler/dist-es/node-http2-connection-manager.js +0 -87
- package/packages/pi-ai/node_modules/@smithy/node-http-handler/dist-es/node-http2-connection-pool.js +0 -32
- package/packages/pi-ai/node_modules/@smithy/node-http-handler/dist-es/node-http2-handler.js +0 -169
- package/packages/pi-ai/node_modules/@smithy/node-http-handler/dist-es/readable.mock.js +0 -21
- package/packages/pi-ai/node_modules/@smithy/node-http-handler/dist-es/server.mock.js +0 -88
- package/packages/pi-ai/node_modules/@smithy/node-http-handler/dist-es/set-connection-timeout.js +0 -36
- package/packages/pi-ai/node_modules/@smithy/node-http-handler/dist-es/set-request-timeout.js +0 -21
- package/packages/pi-ai/node_modules/@smithy/node-http-handler/dist-es/set-socket-keep-alive.js +0 -22
- package/packages/pi-ai/node_modules/@smithy/node-http-handler/dist-es/set-socket-timeout.js +0 -23
- package/packages/pi-ai/node_modules/@smithy/node-http-handler/dist-es/stream-collector/collector.js +0 -8
- package/packages/pi-ai/node_modules/@smithy/node-http-handler/dist-es/stream-collector/index.js +0 -41
- package/packages/pi-ai/node_modules/@smithy/node-http-handler/dist-es/stream-collector/readable.mock.js +0 -21
- package/packages/pi-ai/node_modules/@smithy/node-http-handler/dist-es/timing.js +0 -4
- package/packages/pi-ai/node_modules/@smithy/node-http-handler/dist-es/write-request-body.js +0 -63
- package/packages/pi-ai/node_modules/@smithy/node-http-handler/dist-types/build-abort-error.d.ts +0 -10
- package/packages/pi-ai/node_modules/@smithy/node-http-handler/dist-types/constants.d.ts +0 -5
- package/packages/pi-ai/node_modules/@smithy/node-http-handler/dist-types/get-transformed-headers.d.ts +0 -4
- package/packages/pi-ai/node_modules/@smithy/node-http-handler/dist-types/index.d.ts +0 -3
- package/packages/pi-ai/node_modules/@smithy/node-http-handler/dist-types/node-http-handler.d.ts +0 -46
- package/packages/pi-ai/node_modules/@smithy/node-http-handler/dist-types/node-http2-connection-manager.d.ts +0 -24
- package/packages/pi-ai/node_modules/@smithy/node-http-handler/dist-types/node-http2-connection-pool.d.ts +0 -12
- package/packages/pi-ai/node_modules/@smithy/node-http-handler/dist-types/node-http2-handler.d.ts +0 -63
- package/packages/pi-ai/node_modules/@smithy/node-http-handler/dist-types/readable.mock.d.ts +0 -13
- package/packages/pi-ai/node_modules/@smithy/node-http-handler/dist-types/server.mock.d.ts +0 -12
- package/packages/pi-ai/node_modules/@smithy/node-http-handler/dist-types/set-connection-timeout.d.ts +0 -2
- package/packages/pi-ai/node_modules/@smithy/node-http-handler/dist-types/set-request-timeout.d.ts +0 -6
- package/packages/pi-ai/node_modules/@smithy/node-http-handler/dist-types/set-socket-keep-alive.d.ts +0 -6
- package/packages/pi-ai/node_modules/@smithy/node-http-handler/dist-types/set-socket-timeout.d.ts +0 -2
- package/packages/pi-ai/node_modules/@smithy/node-http-handler/dist-types/stream-collector/collector.d.ts +0 -5
- package/packages/pi-ai/node_modules/@smithy/node-http-handler/dist-types/stream-collector/index.d.ts +0 -6
- package/packages/pi-ai/node_modules/@smithy/node-http-handler/dist-types/stream-collector/readable.mock.d.ts +0 -13
- package/packages/pi-ai/node_modules/@smithy/node-http-handler/dist-types/timing.d.ts +0 -8
- package/packages/pi-ai/node_modules/@smithy/node-http-handler/dist-types/ts3.4/build-abort-error.d.ts +0 -10
- package/packages/pi-ai/node_modules/@smithy/node-http-handler/dist-types/ts3.4/constants.d.ts +0 -5
- package/packages/pi-ai/node_modules/@smithy/node-http-handler/dist-types/ts3.4/get-transformed-headers.d.ts +0 -4
- package/packages/pi-ai/node_modules/@smithy/node-http-handler/dist-types/ts3.4/index.d.ts +0 -3
- package/packages/pi-ai/node_modules/@smithy/node-http-handler/dist-types/ts3.4/node-http-handler.d.ts +0 -46
- package/packages/pi-ai/node_modules/@smithy/node-http-handler/dist-types/ts3.4/node-http2-connection-manager.d.ts +0 -24
- package/packages/pi-ai/node_modules/@smithy/node-http-handler/dist-types/ts3.4/node-http2-connection-pool.d.ts +0 -12
- package/packages/pi-ai/node_modules/@smithy/node-http-handler/dist-types/ts3.4/node-http2-handler.d.ts +0 -63
- package/packages/pi-ai/node_modules/@smithy/node-http-handler/dist-types/ts3.4/readable.mock.d.ts +0 -13
- package/packages/pi-ai/node_modules/@smithy/node-http-handler/dist-types/ts3.4/server.mock.d.ts +0 -12
- package/packages/pi-ai/node_modules/@smithy/node-http-handler/dist-types/ts3.4/set-connection-timeout.d.ts +0 -2
- package/packages/pi-ai/node_modules/@smithy/node-http-handler/dist-types/ts3.4/set-request-timeout.d.ts +0 -6
- package/packages/pi-ai/node_modules/@smithy/node-http-handler/dist-types/ts3.4/set-socket-keep-alive.d.ts +0 -6
- package/packages/pi-ai/node_modules/@smithy/node-http-handler/dist-types/ts3.4/set-socket-timeout.d.ts +0 -2
- package/packages/pi-ai/node_modules/@smithy/node-http-handler/dist-types/ts3.4/stream-collector/collector.d.ts +0 -5
- package/packages/pi-ai/node_modules/@smithy/node-http-handler/dist-types/ts3.4/stream-collector/index.d.ts +0 -6
- package/packages/pi-ai/node_modules/@smithy/node-http-handler/dist-types/ts3.4/stream-collector/readable.mock.d.ts +0 -13
- package/packages/pi-ai/node_modules/@smithy/node-http-handler/dist-types/ts3.4/timing.d.ts +0 -8
- package/packages/pi-ai/node_modules/@smithy/node-http-handler/dist-types/ts3.4/write-request-body.d.ts +0 -12
- package/packages/pi-ai/node_modules/@smithy/node-http-handler/dist-types/write-request-body.d.ts +0 -12
- package/packages/pi-ai/node_modules/@smithy/node-http-handler/package.json +0 -68
- package/packages/pi-ai/oauth.d.ts +0 -1
- package/packages/pi-ai/oauth.js +0 -1
- /package/dist/web/standalone/.next/static/{j7IBD35UgrL2b298GLK3V → o61X3klsB6C0UE0X1x3PA}/_buildManifest.js +0 -0
- /package/dist/web/standalone/.next/static/{j7IBD35UgrL2b298GLK3V → o61X3klsB6C0UE0X1x3PA}/_ssgManifest.js +0 -0
|
@@ -0,0 +1,377 @@
|
|
|
1
|
+
import { existsSync, mkdirSync, readdirSync, readFileSync } from "node:fs";
|
|
2
|
+
import { join } from "node:path";
|
|
3
|
+
import { atomicWriteSync, type AtomicWriteSyncOps } from "./atomic-write.js";
|
|
4
|
+
import { gsdRoot } from "./paths.js";
|
|
5
|
+
|
|
6
|
+
export type DebugSessionStatus = "active" | "paused" | "resolved" | "failed";
|
|
7
|
+
|
|
8
|
+
export interface DebugCheckpoint {
|
|
9
|
+
type: "human-verify" | "human-action" | "decision" | "root-cause-found" | "inconclusive";
|
|
10
|
+
summary: string;
|
|
11
|
+
awaitingResponse: boolean;
|
|
12
|
+
userResponse?: string;
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
export interface DebugTddGate {
|
|
16
|
+
enabled: boolean;
|
|
17
|
+
phase: "pending" | "red" | "green";
|
|
18
|
+
testFile?: string;
|
|
19
|
+
testName?: string;
|
|
20
|
+
failureOutput?: string;
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
export interface DebugSpecialistReview {
|
|
24
|
+
hint: string;
|
|
25
|
+
skill: string | null;
|
|
26
|
+
verdict: string;
|
|
27
|
+
detail: string;
|
|
28
|
+
reviewedAt: number;
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
export interface DebugSessionArtifact {
|
|
32
|
+
version: 1;
|
|
33
|
+
mode: "debug" | "diagnose";
|
|
34
|
+
slug: string;
|
|
35
|
+
issue: string;
|
|
36
|
+
status: DebugSessionStatus;
|
|
37
|
+
phase: string;
|
|
38
|
+
createdAt: number;
|
|
39
|
+
updatedAt: number;
|
|
40
|
+
logPath: string;
|
|
41
|
+
lastError: string | null;
|
|
42
|
+
checkpoint?: DebugCheckpoint | null;
|
|
43
|
+
tddGate?: DebugTddGate | null;
|
|
44
|
+
specialistReview?: DebugSpecialistReview | null;
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
export interface DebugSessionRecord {
|
|
48
|
+
artifactPath: string;
|
|
49
|
+
session: DebugSessionArtifact;
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
export interface DebugMalformedSessionArtifact {
|
|
53
|
+
artifactPath: string;
|
|
54
|
+
message: string;
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
export interface DebugSessionListResult {
|
|
58
|
+
sessions: DebugSessionRecord[];
|
|
59
|
+
malformed: DebugMalformedSessionArtifact[];
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
export interface CreateDebugSessionInput {
|
|
63
|
+
issue: string;
|
|
64
|
+
mode?: "debug" | "diagnose";
|
|
65
|
+
status?: DebugSessionStatus;
|
|
66
|
+
phase?: string;
|
|
67
|
+
createdAt?: number;
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
export interface UpdateDebugSessionInput {
|
|
71
|
+
status?: DebugSessionStatus;
|
|
72
|
+
phase?: string;
|
|
73
|
+
issue?: string;
|
|
74
|
+
lastError?: string | null;
|
|
75
|
+
updatedAt?: number;
|
|
76
|
+
checkpoint?: DebugCheckpoint | null;
|
|
77
|
+
tddGate?: DebugTddGate | null;
|
|
78
|
+
specialistReview?: DebugSpecialistReview | null;
|
|
79
|
+
}
|
|
80
|
+
|
|
81
|
+
export interface DebugSessionStoreDeps {
|
|
82
|
+
atomicWrite?: (filePath: string, content: string, encoding?: BufferEncoding) => void;
|
|
83
|
+
readFile?: (filePath: string, encoding: BufferEncoding) => string;
|
|
84
|
+
listDir?: (dirPath: string) => string[];
|
|
85
|
+
exists?: (filePath: string) => boolean;
|
|
86
|
+
now?: () => number;
|
|
87
|
+
}
|
|
88
|
+
|
|
89
|
+
const DEFAULT_PHASE = "queued";
|
|
90
|
+
const DEFAULT_STATUS: DebugSessionStatus = "active";
|
|
91
|
+
const SESSION_FILE_SUFFIX = ".json";
|
|
92
|
+
const MAX_SLUG_LENGTH = 64;
|
|
93
|
+
const MAX_COLLISION_ATTEMPTS = 10_000;
|
|
94
|
+
|
|
95
|
+
function debugRoot(basePath: string): string {
|
|
96
|
+
return join(gsdRoot(basePath), "debug");
|
|
97
|
+
}
|
|
98
|
+
|
|
99
|
+
export function debugSessionsDir(basePath: string): string {
|
|
100
|
+
return join(debugRoot(basePath), "sessions");
|
|
101
|
+
}
|
|
102
|
+
|
|
103
|
+
export function debugSessionArtifactPath(basePath: string, slug: string): string {
|
|
104
|
+
assertValidDebugSessionSlug(slug);
|
|
105
|
+
return join(debugSessionsDir(basePath), `${slug}${SESSION_FILE_SUFFIX}`);
|
|
106
|
+
}
|
|
107
|
+
|
|
108
|
+
export function debugSessionLogPath(basePath: string, slug: string): string {
|
|
109
|
+
assertValidDebugSessionSlug(slug);
|
|
110
|
+
return join(debugRoot(basePath), `${slug}.log`);
|
|
111
|
+
}
|
|
112
|
+
|
|
113
|
+
function ensureSessionsDir(basePath: string): string {
|
|
114
|
+
const dir = debugSessionsDir(basePath);
|
|
115
|
+
if (!existsSync(dir)) mkdirSync(dir, { recursive: true });
|
|
116
|
+
return dir;
|
|
117
|
+
}
|
|
118
|
+
|
|
119
|
+
export function slugifyDebugSessionIssue(issue: string): string {
|
|
120
|
+
const normalized = issue
|
|
121
|
+
.trim()
|
|
122
|
+
.toLowerCase()
|
|
123
|
+
.replace(/[^a-z0-9]+/g, "-")
|
|
124
|
+
.replace(/^-+|-+$/g, "")
|
|
125
|
+
.replace(/-{2,}/g, "-")
|
|
126
|
+
.slice(0, MAX_SLUG_LENGTH)
|
|
127
|
+
.replace(/-+$/g, "");
|
|
128
|
+
|
|
129
|
+
if (!normalized) {
|
|
130
|
+
throw new Error("Issue text must contain at least one alphanumeric character.");
|
|
131
|
+
}
|
|
132
|
+
return normalized;
|
|
133
|
+
}
|
|
134
|
+
|
|
135
|
+
export function assertValidDebugSessionSlug(slug: string): void {
|
|
136
|
+
if (!/^[a-z0-9]+(?:-[a-z0-9]+)*$/.test(slug)) {
|
|
137
|
+
throw new Error(`Invalid debug session slug: ${slug}`);
|
|
138
|
+
}
|
|
139
|
+
}
|
|
140
|
+
|
|
141
|
+
function isDebugSessionStatus(value: unknown): value is DebugSessionStatus {
|
|
142
|
+
return value === "active" || value === "paused" || value === "resolved" || value === "failed";
|
|
143
|
+
}
|
|
144
|
+
|
|
145
|
+
function isDebugCheckpointShape(value: unknown): value is DebugCheckpoint {
|
|
146
|
+
if (!value || typeof value !== "object") return false;
|
|
147
|
+
const o = value as Record<string, unknown>;
|
|
148
|
+
const validTypes = ["human-verify", "human-action", "decision", "root-cause-found", "inconclusive"];
|
|
149
|
+
return (
|
|
150
|
+
validTypes.includes(o.type as string)
|
|
151
|
+
&& typeof o.summary === "string"
|
|
152
|
+
&& typeof o.awaitingResponse === "boolean"
|
|
153
|
+
&& (o.userResponse === undefined || typeof o.userResponse === "string")
|
|
154
|
+
);
|
|
155
|
+
}
|
|
156
|
+
|
|
157
|
+
function isDebugTddGateShape(value: unknown): value is DebugTddGate {
|
|
158
|
+
if (!value || typeof value !== "object") return false;
|
|
159
|
+
const o = value as Record<string, unknown>;
|
|
160
|
+
const validPhases = ["pending", "red", "green"];
|
|
161
|
+
return (
|
|
162
|
+
typeof o.enabled === "boolean"
|
|
163
|
+
&& validPhases.includes(o.phase as string)
|
|
164
|
+
&& (o.testFile === undefined || typeof o.testFile === "string")
|
|
165
|
+
&& (o.testName === undefined || typeof o.testName === "string")
|
|
166
|
+
&& (o.failureOutput === undefined || typeof o.failureOutput === "string")
|
|
167
|
+
);
|
|
168
|
+
}
|
|
169
|
+
|
|
170
|
+
function isDebugSpecialistReviewShape(value: unknown): value is DebugSpecialistReview {
|
|
171
|
+
if (!value || typeof value !== "object") return false;
|
|
172
|
+
const o = value as Record<string, unknown>;
|
|
173
|
+
return (
|
|
174
|
+
typeof o.hint === "string"
|
|
175
|
+
&& (typeof o.skill === "string" || o.skill === null)
|
|
176
|
+
&& typeof o.verdict === "string"
|
|
177
|
+
&& typeof o.detail === "string"
|
|
178
|
+
&& typeof o.reviewedAt === "number"
|
|
179
|
+
);
|
|
180
|
+
}
|
|
181
|
+
|
|
182
|
+
function isDebugSessionArtifact(value: unknown): value is DebugSessionArtifact {
|
|
183
|
+
if (!value || typeof value !== "object") return false;
|
|
184
|
+
const o = value as Record<string, unknown>;
|
|
185
|
+
return (
|
|
186
|
+
o.version === 1
|
|
187
|
+
&& (o.mode === "debug" || o.mode === "diagnose")
|
|
188
|
+
&& typeof o.slug === "string"
|
|
189
|
+
&& typeof o.issue === "string"
|
|
190
|
+
&& isDebugSessionStatus(o.status)
|
|
191
|
+
&& typeof o.phase === "string"
|
|
192
|
+
&& typeof o.createdAt === "number"
|
|
193
|
+
&& typeof o.updatedAt === "number"
|
|
194
|
+
&& typeof o.logPath === "string"
|
|
195
|
+
&& (typeof o.lastError === "string" || o.lastError === null)
|
|
196
|
+
&& (o.checkpoint === undefined || o.checkpoint === null || isDebugCheckpointShape(o.checkpoint))
|
|
197
|
+
&& (o.tddGate === undefined || o.tddGate === null || isDebugTddGateShape(o.tddGate))
|
|
198
|
+
&& (o.specialistReview === undefined || o.specialistReview === null || isDebugSpecialistReviewShape(o.specialistReview))
|
|
199
|
+
);
|
|
200
|
+
}
|
|
201
|
+
|
|
202
|
+
function parseDebugSessionArtifact(filePath: string, raw: string): DebugSessionArtifact {
|
|
203
|
+
let parsed: unknown;
|
|
204
|
+
try {
|
|
205
|
+
parsed = JSON.parse(raw);
|
|
206
|
+
} catch (error) {
|
|
207
|
+
const message = error instanceof Error ? error.message : String(error);
|
|
208
|
+
throw new Error(`Failed to parse debug session artifact ${filePath}: ${message}`);
|
|
209
|
+
}
|
|
210
|
+
|
|
211
|
+
if (!isDebugSessionArtifact(parsed)) {
|
|
212
|
+
throw new Error(`Malformed debug session artifact ${filePath}: schema validation failed`);
|
|
213
|
+
}
|
|
214
|
+
return parsed;
|
|
215
|
+
}
|
|
216
|
+
|
|
217
|
+
function defaultDeps(deps: DebugSessionStoreDeps) {
|
|
218
|
+
return {
|
|
219
|
+
atomicWrite: deps.atomicWrite ?? atomicWriteSync,
|
|
220
|
+
readFile: deps.readFile ?? ((filePath: string, encoding: BufferEncoding) => readFileSync(filePath, encoding)),
|
|
221
|
+
listDir: deps.listDir ?? ((dirPath: string) => readdirSync(dirPath)),
|
|
222
|
+
exists: deps.exists ?? ((filePath: string) => existsSync(filePath)),
|
|
223
|
+
now: deps.now ?? (() => Date.now()),
|
|
224
|
+
};
|
|
225
|
+
}
|
|
226
|
+
|
|
227
|
+
function nextSlug(basePath: string, baseSlug: string, deps: ReturnType<typeof defaultDeps>): string {
|
|
228
|
+
const baseArtifactPath = debugSessionArtifactPath(basePath, baseSlug);
|
|
229
|
+
if (!deps.exists(baseArtifactPath)) return baseSlug;
|
|
230
|
+
|
|
231
|
+
for (let n = 2; n < MAX_COLLISION_ATTEMPTS; n++) {
|
|
232
|
+
const candidate = `${baseSlug}-${n}`;
|
|
233
|
+
const candidatePath = debugSessionArtifactPath(basePath, candidate);
|
|
234
|
+
if (!deps.exists(candidatePath)) return candidate;
|
|
235
|
+
}
|
|
236
|
+
|
|
237
|
+
throw new Error(`Unable to allocate unique debug session slug for '${baseSlug}'`);
|
|
238
|
+
}
|
|
239
|
+
|
|
240
|
+
function serializeArtifact(session: DebugSessionArtifact): string {
|
|
241
|
+
return JSON.stringify(session, null, 2) + "\n";
|
|
242
|
+
}
|
|
243
|
+
|
|
244
|
+
export function createDebugSession(
|
|
245
|
+
basePath: string,
|
|
246
|
+
input: CreateDebugSessionInput,
|
|
247
|
+
deps: DebugSessionStoreDeps = {},
|
|
248
|
+
): DebugSessionRecord {
|
|
249
|
+
const d = defaultDeps(deps);
|
|
250
|
+
const issue = input.issue?.trim() ?? "";
|
|
251
|
+
if (!issue) {
|
|
252
|
+
throw new Error("Issue text is required to create a debug session.");
|
|
253
|
+
}
|
|
254
|
+
|
|
255
|
+
ensureSessionsDir(basePath);
|
|
256
|
+
|
|
257
|
+
const baseSlug = slugifyDebugSessionIssue(issue);
|
|
258
|
+
const slug = nextSlug(basePath, baseSlug, d);
|
|
259
|
+
const now = input.createdAt ?? d.now();
|
|
260
|
+
const session: DebugSessionArtifact = {
|
|
261
|
+
version: 1,
|
|
262
|
+
mode: input.mode ?? "debug",
|
|
263
|
+
slug,
|
|
264
|
+
issue,
|
|
265
|
+
status: input.status ?? DEFAULT_STATUS,
|
|
266
|
+
phase: input.phase ?? DEFAULT_PHASE,
|
|
267
|
+
createdAt: now,
|
|
268
|
+
updatedAt: now,
|
|
269
|
+
logPath: debugSessionLogPath(basePath, slug),
|
|
270
|
+
lastError: null,
|
|
271
|
+
};
|
|
272
|
+
|
|
273
|
+
const artifactPath = debugSessionArtifactPath(basePath, slug);
|
|
274
|
+
d.atomicWrite(artifactPath, serializeArtifact(session), "utf-8");
|
|
275
|
+
|
|
276
|
+
return { artifactPath, session };
|
|
277
|
+
}
|
|
278
|
+
|
|
279
|
+
export function loadDebugSession(
|
|
280
|
+
basePath: string,
|
|
281
|
+
slug: string,
|
|
282
|
+
deps: DebugSessionStoreDeps = {},
|
|
283
|
+
): DebugSessionRecord | null {
|
|
284
|
+
assertValidDebugSessionSlug(slug);
|
|
285
|
+
const d = defaultDeps(deps);
|
|
286
|
+
|
|
287
|
+
const artifactPath = debugSessionArtifactPath(basePath, slug);
|
|
288
|
+
if (!d.exists(artifactPath)) return null;
|
|
289
|
+
|
|
290
|
+
const raw = d.readFile(artifactPath, "utf-8");
|
|
291
|
+
const session = parseDebugSessionArtifact(artifactPath, raw);
|
|
292
|
+
return { artifactPath, session };
|
|
293
|
+
}
|
|
294
|
+
|
|
295
|
+
export function listDebugSessions(
|
|
296
|
+
basePath: string,
|
|
297
|
+
deps: DebugSessionStoreDeps = {},
|
|
298
|
+
): DebugSessionListResult {
|
|
299
|
+
const d = defaultDeps(deps);
|
|
300
|
+
const dir = debugSessionsDir(basePath);
|
|
301
|
+
if (!d.exists(dir)) return { sessions: [], malformed: [] };
|
|
302
|
+
|
|
303
|
+
const entries = d.listDir(dir)
|
|
304
|
+
.filter(entry => entry.endsWith(SESSION_FILE_SUFFIX))
|
|
305
|
+
.sort((a, b) => a.localeCompare(b));
|
|
306
|
+
|
|
307
|
+
const sessions: DebugSessionRecord[] = [];
|
|
308
|
+
const malformed: DebugMalformedSessionArtifact[] = [];
|
|
309
|
+
|
|
310
|
+
for (const entry of entries) {
|
|
311
|
+
const artifactPath = join(dir, entry);
|
|
312
|
+
try {
|
|
313
|
+
const raw = d.readFile(artifactPath, "utf-8");
|
|
314
|
+
const session = parseDebugSessionArtifact(artifactPath, raw);
|
|
315
|
+
sessions.push({ artifactPath, session });
|
|
316
|
+
} catch (error) {
|
|
317
|
+
malformed.push({
|
|
318
|
+
artifactPath,
|
|
319
|
+
message: error instanceof Error ? error.message : String(error),
|
|
320
|
+
});
|
|
321
|
+
}
|
|
322
|
+
}
|
|
323
|
+
|
|
324
|
+
sessions.sort((a, b) => {
|
|
325
|
+
if (a.session.updatedAt !== b.session.updatedAt) {
|
|
326
|
+
return b.session.updatedAt - a.session.updatedAt;
|
|
327
|
+
}
|
|
328
|
+
if (a.session.createdAt !== b.session.createdAt) {
|
|
329
|
+
return b.session.createdAt - a.session.createdAt;
|
|
330
|
+
}
|
|
331
|
+
return a.session.slug.localeCompare(b.session.slug);
|
|
332
|
+
});
|
|
333
|
+
|
|
334
|
+
return { sessions, malformed };
|
|
335
|
+
}
|
|
336
|
+
|
|
337
|
+
export function updateDebugSession(
|
|
338
|
+
basePath: string,
|
|
339
|
+
slug: string,
|
|
340
|
+
update: UpdateDebugSessionInput,
|
|
341
|
+
deps: DebugSessionStoreDeps = {},
|
|
342
|
+
): DebugSessionRecord {
|
|
343
|
+
const d = defaultDeps(deps);
|
|
344
|
+
const loaded = loadDebugSession(basePath, slug, d);
|
|
345
|
+
if (!loaded) {
|
|
346
|
+
throw new Error(`Debug session not found for slug: ${slug}`);
|
|
347
|
+
}
|
|
348
|
+
|
|
349
|
+
const nextIssue = update.issue?.trim() ?? loaded.session.issue;
|
|
350
|
+
if (!nextIssue) {
|
|
351
|
+
throw new Error("Issue text cannot be empty.");
|
|
352
|
+
}
|
|
353
|
+
|
|
354
|
+
const nextStatus = update.status ?? loaded.session.status;
|
|
355
|
+
if (!isDebugSessionStatus(nextStatus)) {
|
|
356
|
+
throw new Error(`Invalid debug session status: ${String(update.status)}`);
|
|
357
|
+
}
|
|
358
|
+
|
|
359
|
+
const nextUpdatedAt = update.updatedAt ?? d.now();
|
|
360
|
+
const session: DebugSessionArtifact = {
|
|
361
|
+
...loaded.session,
|
|
362
|
+
issue: nextIssue,
|
|
363
|
+
status: nextStatus,
|
|
364
|
+
phase: update.phase ?? loaded.session.phase,
|
|
365
|
+
lastError: update.lastError === undefined ? loaded.session.lastError : update.lastError,
|
|
366
|
+
checkpoint: update.checkpoint === undefined ? loaded.session.checkpoint : update.checkpoint,
|
|
367
|
+
tddGate: update.tddGate === undefined ? loaded.session.tddGate : update.tddGate,
|
|
368
|
+
specialistReview: update.specialistReview === undefined ? loaded.session.specialistReview : update.specialistReview,
|
|
369
|
+
updatedAt: nextUpdatedAt,
|
|
370
|
+
};
|
|
371
|
+
|
|
372
|
+
d.atomicWrite(loaded.artifactPath, serializeArtifact(session), "utf-8");
|
|
373
|
+
return { artifactPath: loaded.artifactPath, session };
|
|
374
|
+
}
|
|
375
|
+
|
|
376
|
+
// Keep this exported for focused fault-injection tests around rename retry behavior.
|
|
377
|
+
export type { AtomicWriteSyncOps };
|
|
@@ -331,7 +331,14 @@ export function validateDefinition(parsed: unknown): { valid: boolean; errors: s
|
|
|
331
331
|
*/
|
|
332
332
|
export function loadDefinition(defsDir: string, name: string): WorkflowDefinition {
|
|
333
333
|
const filePath = join(defsDir, `${name}.yaml`);
|
|
334
|
+
return loadDefinitionFromFile(filePath);
|
|
335
|
+
}
|
|
334
336
|
|
|
337
|
+
/**
|
|
338
|
+
* Load and validate a YAML workflow definition from an absolute file path.
|
|
339
|
+
* Accepts both `.yaml` and `.yml` extensions.
|
|
340
|
+
*/
|
|
341
|
+
export function loadDefinitionFromFile(filePath: string): WorkflowDefinition {
|
|
335
342
|
if (!existsSync(filePath)) {
|
|
336
343
|
throw new Error(`Definition file not found: ${filePath}`);
|
|
337
344
|
}
|
|
@@ -130,7 +130,7 @@ Setting `prefer_skills: []` does **not** disable skill discovery — it just mea
|
|
|
130
130
|
- `auto_push`: boolean — automatically push commits to the remote after committing. Default: `false`.
|
|
131
131
|
- `push_branches`: boolean — push the milestone branch to the remote after commits. Default: `false`.
|
|
132
132
|
- `remote`: string — git remote name to push to. Default: `"origin"`.
|
|
133
|
-
- `snapshots`: boolean — create snapshot commits (
|
|
133
|
+
- `snapshots`: boolean — create WIP snapshot commits (e.g. pre-dispatch and stale-uncommitted-changes safety commits emitted by the doctor). Set to `false` to suppress all doctor-initiated `gsd snapshot:` commits. Default: `true`.
|
|
134
134
|
- `pre_merge_check`: boolean or `"auto"` — run pre-merge checks before merging a worktree back to the integration branch. `true` always runs, `false` never runs, `"auto"` runs when CI is detected. Default: `"auto"`.
|
|
135
135
|
- `commit_type`: string — override the conventional commit type prefix. Must be one of: `feat`, `fix`, `refactor`, `docs`, `test`, `chore`, `perf`, `ci`, `build`, `style`. Default: inferred from diff content.
|
|
136
136
|
- `main_branch`: string — the primary branch name for new git repos (e.g., `"main"`, `"master"`, `"trunk"`). Also used by `getMainBranch()` as the preferred branch when auto-detection is ambiguous. Default: `"main"`.
|
|
@@ -197,14 +197,14 @@ Setting `prefer_skills: []` does **not** disable skill discovery — it just mea
|
|
|
197
197
|
- `enabled`: boolean — enable kernel wrappers and contract observers. Default: `true`.
|
|
198
198
|
- `legacy_fallback.enabled`: boolean — emergency release fallback that forces legacy orchestration behavior even when `uok.enabled` is `true`. Default: `false`.
|
|
199
199
|
- Runtime override: set `GSD_UOK_FORCE_LEGACY=1` (or `GSD_UOK_LEGACY_FALLBACK=1`) to force legacy behavior for the current process.
|
|
200
|
-
- `gates.enabled`: boolean — route checks through the unified gate runner and persist `gate_runs`.
|
|
201
|
-
- `model_policy.enabled`: boolean — enforce policy filtering before model capability scoring.
|
|
202
|
-
- `execution_graph.enabled`: boolean — enable DAG scheduler facade/adapters for execution.
|
|
203
|
-
- `gitops.enabled`: boolean — persist turn-level git transaction records.
|
|
204
|
-
- `gitops.turn_action`: `"commit"` | `"snapshot"` | `"status-only"` — turn transaction mode.
|
|
205
|
-
- `gitops.turn_push`: boolean — whether turn transactions should include push intent metadata.
|
|
206
|
-
- `audit_unified.enabled`: boolean — dual-write unified audit envelope events.
|
|
207
|
-
- `plan_v2.enabled`: boolean — enable bounded clarify/research/draft/compile planning flow.
|
|
200
|
+
- `gates.enabled`: boolean — route checks through the unified gate runner and persist `gate_runs`. Default: `true`.
|
|
201
|
+
- `model_policy.enabled`: boolean — enforce policy filtering before model capability scoring. Default: `true`.
|
|
202
|
+
- `execution_graph.enabled`: boolean — enable DAG scheduler facade/adapters for execution. Default: `true`.
|
|
203
|
+
- `gitops.enabled`: boolean — persist turn-level git transaction records. Default: `true`.
|
|
204
|
+
- `gitops.turn_action`: `"commit"` | `"snapshot"` | `"status-only"` — turn transaction mode. Default: `"commit"` (per-task atomic commits).
|
|
205
|
+
- `gitops.turn_push`: boolean — whether turn transactions should include push intent metadata. Default: `false`.
|
|
206
|
+
- `audit_unified.enabled`: boolean — dual-write unified audit envelope events. Default: `true`.
|
|
207
|
+
- `plan_v2.enabled`: boolean — enable bounded clarify/research/draft/compile planning flow. Default: `true`.
|
|
208
208
|
|
|
209
209
|
- `context_management`: configures context hygiene for auto-mode sessions. Keys:
|
|
210
210
|
- `observation_masking`: boolean — mask old tool results to reduce context bloat. Default: `true`.
|
|
@@ -14,6 +14,7 @@ import { execSync } from "node:child_process";
|
|
|
14
14
|
import { join } from "node:path";
|
|
15
15
|
|
|
16
16
|
import type { DoctorIssue, DoctorIssueCode } from "./doctor-types.js";
|
|
17
|
+
import { detectPythonExecutable } from "./python-resolver.js";
|
|
17
18
|
|
|
18
19
|
// ── Types ──────────────────────────────────────────────────────────────────
|
|
19
20
|
|
|
@@ -402,7 +403,7 @@ function checkProjectTools(basePath: string): EnvironmentCheckResult[] {
|
|
|
402
403
|
|
|
403
404
|
// Check for Python if pyproject.toml or requirements.txt exists
|
|
404
405
|
if (existsSync(join(basePath, "pyproject.toml")) || existsSync(join(basePath, "requirements.txt"))) {
|
|
405
|
-
if (
|
|
406
|
+
if (detectPythonExecutable() === null) {
|
|
406
407
|
results.push({
|
|
407
408
|
name: "python",
|
|
408
409
|
status: "warning",
|
|
@@ -369,9 +369,13 @@ export async function checkGitHealth(
|
|
|
369
369
|
// auto-commit a safety snapshot so work isn't lost.
|
|
370
370
|
try {
|
|
371
371
|
const prefs = loadEffectiveGSDPreferences()?.preferences ?? {};
|
|
372
|
+
// `git.snapshots: false` is the canonical toggle that disables WIP
|
|
373
|
+
// snapshot commits — honour it here as well so both the proactive gate
|
|
374
|
+
// and the doctor-run path stay consistent (#4420).
|
|
375
|
+
const snapshotsEnabled = prefs.git?.snapshots !== false;
|
|
372
376
|
const thresholdMinutes = prefs.stale_commit_threshold_minutes ?? 30;
|
|
373
377
|
|
|
374
|
-
if (thresholdMinutes > 0) {
|
|
378
|
+
if (snapshotsEnabled && thresholdMinutes > 0) {
|
|
375
379
|
const dirty = nativeHasChanges(basePath);
|
|
376
380
|
if (dirty) {
|
|
377
381
|
const branch = nativeGetCurrentBranch(basePath);
|
|
@@ -301,9 +301,12 @@ export async function preDispatchHealthGate(basePath: string): Promise<PreDispat
|
|
|
301
301
|
try {
|
|
302
302
|
if (nativeIsRepo(basePath)) {
|
|
303
303
|
const prefs = loadEffectiveGSDPreferences()?.preferences ?? {};
|
|
304
|
+
// `git.snapshots: false` is the canonical toggle that disables WIP
|
|
305
|
+
// snapshot commits — honour it before touching the threshold path (#4420).
|
|
306
|
+
const snapshotsEnabled = prefs.git?.snapshots !== false;
|
|
304
307
|
const thresholdMinutes = prefs.stale_commit_threshold_minutes ?? 30;
|
|
305
308
|
|
|
306
|
-
if (thresholdMinutes > 0 && nativeHasChanges(basePath)) {
|
|
309
|
+
if (snapshotsEnabled && thresholdMinutes > 0 && nativeHasChanges(basePath)) {
|
|
307
310
|
const branch = nativeGetCurrentBranch(basePath);
|
|
308
311
|
const lastEpoch = nativeLastCommitEpoch(basePath, branch || "HEAD");
|
|
309
312
|
const nowEpoch = Math.floor(Date.now() / 1000);
|
|
@@ -37,6 +37,30 @@ export interface ProviderCheckResult {
|
|
|
37
37
|
required: boolean;
|
|
38
38
|
}
|
|
39
39
|
|
|
40
|
+
// ── Provider routing constants ────────────────────────────────────────────────
|
|
41
|
+
|
|
42
|
+
/**
|
|
43
|
+
* Providers that use external CLI authentication (not API keys).
|
|
44
|
+
* These are always considered "found" — the host CLI handles auth.
|
|
45
|
+
*/
|
|
46
|
+
const CLI_AUTH_PROVIDERS = new Set([
|
|
47
|
+
"claude-code",
|
|
48
|
+
"openai-codex",
|
|
49
|
+
"google-gemini-cli",
|
|
50
|
+
"google-antigravity",
|
|
51
|
+
]);
|
|
52
|
+
|
|
53
|
+
/**
|
|
54
|
+
* Providers that can serve models normally associated with another provider.
|
|
55
|
+
* Key = the provider whose models can be served, Value = alternative providers to check.
|
|
56
|
+
* e.g. GitHub Copilot subscriptions can access Claude and GPT models.
|
|
57
|
+
*/
|
|
58
|
+
const PROVIDER_ROUTES: Record<string, string[]> = {
|
|
59
|
+
anthropic: ["github-copilot", "claude-code"],
|
|
60
|
+
openai: ["github-copilot", "openai-codex"],
|
|
61
|
+
google: ["google-gemini-cli"],
|
|
62
|
+
};
|
|
63
|
+
|
|
40
64
|
// ── Model → Provider ID mapping ───────────────────────────────────────────────
|
|
41
65
|
|
|
42
66
|
/**
|
|
@@ -125,9 +149,37 @@ interface KeyLookup {
|
|
|
125
149
|
backedOff: boolean;
|
|
126
150
|
}
|
|
127
151
|
|
|
152
|
+
/**
|
|
153
|
+
* Map of CLI provider IDs to their binary names on disk.
|
|
154
|
+
* Used for lightweight binary-presence checks (PATH scan, no subprocess).
|
|
155
|
+
*/
|
|
156
|
+
const CLI_BINARY_MAP: Record<string, string> = {
|
|
157
|
+
"claude-code": "claude",
|
|
158
|
+
"openai-codex": "codex",
|
|
159
|
+
"google-gemini-cli": "gemini",
|
|
160
|
+
"google-antigravity": "antigravity",
|
|
161
|
+
};
|
|
162
|
+
|
|
163
|
+
/**
|
|
164
|
+
* Check if a CLI provider's binary exists anywhere in PATH.
|
|
165
|
+
* Fast filesystem scan — no subprocess, no network, sub-1ms.
|
|
166
|
+
*/
|
|
167
|
+
function isCliBinaryInPath(providerId: string): boolean {
|
|
168
|
+
const binary = CLI_BINARY_MAP[providerId];
|
|
169
|
+
if (!binary) return false;
|
|
170
|
+
const pathDirs = (process.env.PATH ?? "").split(":");
|
|
171
|
+
return pathDirs.some(dir => dir && existsSync(join(dir, binary)));
|
|
172
|
+
}
|
|
173
|
+
|
|
128
174
|
function resolveKey(providerId: string): KeyLookup {
|
|
129
175
|
const info = PROVIDER_REGISTRY.find(p => p.id === providerId);
|
|
130
176
|
|
|
177
|
+
// claude-code never stores credentials in auth.json — GSD delegates entirely to
|
|
178
|
+
// the local CLI binary. Presence of the binary in PATH is the only signal.
|
|
179
|
+
if (providerId === "claude-code") {
|
|
180
|
+
return { found: isCliBinaryInPath("claude-code"), source: "env", backedOff: false };
|
|
181
|
+
}
|
|
182
|
+
|
|
131
183
|
if (providerId === "anthropic-vertex" && process.env.ANTHROPIC_VERTEX_PROJECT_ID) {
|
|
132
184
|
return { found: true, source: "env", backedOff: false };
|
|
133
185
|
}
|
|
@@ -174,28 +226,6 @@ function resolveKey(providerId: string): KeyLookup {
|
|
|
174
226
|
|
|
175
227
|
// ── Individual check groups ────────────────────────────────────────────────────
|
|
176
228
|
|
|
177
|
-
/**
|
|
178
|
-
* Providers that can serve models normally associated with another provider.
|
|
179
|
-
* Key = the provider whose models can be served, Value = alternative providers to check.
|
|
180
|
-
* e.g. GitHub Copilot subscriptions can access Claude and GPT models.
|
|
181
|
-
*/
|
|
182
|
-
const PROVIDER_ROUTES: Record<string, string[]> = {
|
|
183
|
-
anthropic: ["github-copilot"],
|
|
184
|
-
openai: ["github-copilot", "openai-codex"],
|
|
185
|
-
google: ["google-gemini-cli"],
|
|
186
|
-
};
|
|
187
|
-
|
|
188
|
-
/**
|
|
189
|
-
* Providers that use external CLI authentication (not API keys).
|
|
190
|
-
* These are always considered "ok" — the host CLI handles auth.
|
|
191
|
-
*/
|
|
192
|
-
const CLI_AUTH_PROVIDERS = new Set([
|
|
193
|
-
"claude-code",
|
|
194
|
-
"openai-codex",
|
|
195
|
-
"google-gemini-cli",
|
|
196
|
-
"google-antigravity",
|
|
197
|
-
]);
|
|
198
|
-
|
|
199
229
|
function checkLlmProviders(): ProviderCheckResult[] {
|
|
200
230
|
const required = collectConfiguredModelProviders();
|
|
201
231
|
const results: ProviderCheckResult[] = [];
|
|
@@ -8,9 +8,10 @@ import { deriveState } from "./state.js";
|
|
|
8
8
|
import { saveFile } from "./files.js";
|
|
9
9
|
import { nativeIsRepo, nativeForEachRef, nativeUpdateRef } from "./native-git-bridge.js";
|
|
10
10
|
import { readCrashLock, isLockProcessAlive, clearLock } from "./crash-recovery.js";
|
|
11
|
-
import { ensureGitignore } from "./gitignore.js";
|
|
11
|
+
import { ensureGitignore, isGsdGitignored } from "./gitignore.js";
|
|
12
12
|
import { readAllSessionStatuses, isSessionStale, removeSessionStatus } from "./session-status-io.js";
|
|
13
13
|
import { recoverFailedMigration } from "./migrate-external.js";
|
|
14
|
+
import { splitCompletedKey } from "./forensics.js";
|
|
14
15
|
|
|
15
16
|
export async function checkRuntimeHealth(
|
|
16
17
|
basePath: string,
|
|
@@ -118,9 +119,6 @@ export async function checkRuntimeHealth(
|
|
|
118
119
|
const orphaned: string[] = [];
|
|
119
120
|
|
|
120
121
|
for (const key of keys) {
|
|
121
|
-
// Key format: "unitType/unitId" e.g. "execute-task/M001/S01/T01"
|
|
122
|
-
// Hook units have compound types: "hook/<hookName>/unitId"
|
|
123
|
-
const { splitCompletedKey } = await import("./forensics.js");
|
|
124
122
|
const parsed = splitCompletedKey(key);
|
|
125
123
|
if (!parsed) continue;
|
|
126
124
|
const { unitType, unitId } = parsed;
|
|
@@ -383,6 +381,27 @@ export async function checkRuntimeHealth(
|
|
|
383
381
|
fixable: false,
|
|
384
382
|
});
|
|
385
383
|
}
|
|
384
|
+
|
|
385
|
+
// ── Symlinked .gsd without .gitignore entry (#4423) ──
|
|
386
|
+
// When `.gsd` is a symlink AND not gitignored, `git add -A -- :!.gsd/...`
|
|
387
|
+
// pathspecs fail with "beyond a symbolic link". Without self-heal this
|
|
388
|
+
// silently drops new user files during auto-commit.
|
|
389
|
+
if (nativeIsRepo(basePath) && !isGsdGitignored(basePath)) {
|
|
390
|
+
issues.push({
|
|
391
|
+
severity: "warning",
|
|
392
|
+
code: "symlinked_gsd_unignored",
|
|
393
|
+
scope: "project",
|
|
394
|
+
unitId: "project",
|
|
395
|
+
message: ".gsd is a symlink to external state but is not listed in .gitignore. This causes git pathspec exclusions to fail and can lead to silently dropped new files during auto-commit. Add `.gsd` to .gitignore.",
|
|
396
|
+
file: ".gitignore",
|
|
397
|
+
fixable: true,
|
|
398
|
+
});
|
|
399
|
+
|
|
400
|
+
if (shouldFix("symlinked_gsd_unignored")) {
|
|
401
|
+
const modified = ensureGitignore(basePath);
|
|
402
|
+
if (modified) fixesApplied.push("added .gsd to .gitignore (symlinked external state)");
|
|
403
|
+
}
|
|
404
|
+
}
|
|
386
405
|
}
|
|
387
406
|
}
|
|
388
407
|
} catch {
|
|
@@ -172,8 +172,14 @@ function auditRequirements(content: string | null): DoctorIssue[] {
|
|
|
172
172
|
const notes = block.match(/^-\s+Notes:\s+(.+)$/m)?.[1]?.trim().toLowerCase() ?? "";
|
|
173
173
|
|
|
174
174
|
if (status === "active" && (!owner || owner === "none" || owner === "none yet")) {
|
|
175
|
+
// #4414: Downgrade to warning. A newly-created requirement has
|
|
176
|
+
// primary_owner='' by default until the planning agent wires it to
|
|
177
|
+
// a slice via gsd_requirement_update. Flagging this as an error
|
|
178
|
+
// during normal planning is noisy — the real failure mode is when
|
|
179
|
+
// it persists past milestone completion, which is covered by other
|
|
180
|
+
// audits. Keep the signal but don't treat it as a blocker.
|
|
175
181
|
issues.push({
|
|
176
|
-
severity: "
|
|
182
|
+
severity: "warning",
|
|
177
183
|
code: "active_requirement_missing_owner",
|
|
178
184
|
scope: "project",
|
|
179
185
|
unitId: requirementId,
|
|
@@ -43,11 +43,14 @@ export function resetRetryState(state: RetryState): void {
|
|
|
43
43
|
// ── Classification ──────────────────────────────────────────────────────────
|
|
44
44
|
|
|
45
45
|
const PERMANENT_RE = /auth|unauthorized|forbidden|invalid.*key|invalid.*api|billing|quota exceeded|account/i;
|
|
46
|
-
|
|
46
|
+
// Include provider-specific quota-window phrasing like:
|
|
47
|
+
// - "You've hit your limit"
|
|
48
|
+
// - "usage limit" / "quota reached"
|
|
49
|
+
const RATE_LIMIT_RE = /rate.?limit|too many requests|429|hit your limit|usage limit|quota (?:reached|hit)|limit.*resets?/i;
|
|
47
50
|
// OpenRouter affordability-style quota errors should be treated as transient
|
|
48
51
|
// so core retry logic can lower maxTokens and continue in-session.
|
|
49
52
|
const AFFORDABILITY_RE = /requires more credits|can only afford|insufficient credits|not enough credits|fewer max_tokens/i;
|
|
50
|
-
const NETWORK_RE = /network|ECONNRESET|ETIMEDOUT|ECONNREFUSED|socket hang up|fetch failed|connection.*reset|dns/i;
|
|
53
|
+
const NETWORK_RE = /network|ECONNRESET|ETIMEDOUT|ECONNREFUSED|socket hang up|fetch failed|connection.*reset|dns|unexpected eof/i;
|
|
51
54
|
const SERVER_RE = /internal server error|500|502|503|overloaded|server_error|api_error|service.?unavailable/i;
|
|
52
55
|
// ECONNRESET/ECONNREFUSED are in NETWORK_RE (same-model retry first).
|
|
53
56
|
const CONNECTION_RE = /terminated|connection.?(?:refused|error)|other side closed|EPIPE|network.?(?:is\s+)?unavailable|stream_exhausted(?:_without_result)?/i;
|
|
@@ -61,7 +64,7 @@ const RESET_DELAY_RE = /reset in (\d+)s/i;
|
|
|
61
64
|
*
|
|
62
65
|
* Classification order:
|
|
63
66
|
* 1. Permanent (auth/billing/quota) — unless also rate-limited
|
|
64
|
-
* 2. Rate limit (429, rate.?limit, too many requests)
|
|
67
|
+
* 2. Rate limit (429, rate.?limit, too many requests, hit-your-limit/quota-window phrasing)
|
|
65
68
|
* 3. Network (ECONNRESET, ETIMEDOUT, socket hang up, fetch failed, dns)
|
|
66
69
|
* 4. Stream truncation (malformed JSON from mid-stream cut)
|
|
67
70
|
* 5. Server (500/502/503, overloaded, server_error)
|