gsd-pi 2.75.0-next.9c0ec0ba1 → 2.76.0-dev.b072ebb73
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 +145 -125
- package/dist/claude-cli-check.d.ts +10 -0
- package/dist/claude-cli-check.js +13 -3
- package/dist/onboarding.d.ts +20 -1
- package/dist/onboarding.js +60 -25
- package/dist/resources/agents/researcher.md +1 -1
- package/dist/resources/extensions/ask-user-questions.js +6 -3
- package/dist/resources/extensions/claude-code-cli/readiness.js +34 -2
- package/dist/resources/extensions/claude-code-cli/stream-adapter.js +44 -2
- package/dist/resources/extensions/gsd/auto/phases.js +48 -6
- package/dist/resources/extensions/gsd/auto-artifact-paths.js +20 -0
- package/dist/resources/extensions/gsd/auto-dashboard.js +37 -8
- package/dist/resources/extensions/gsd/auto-direct-dispatch.js +8 -2
- package/dist/resources/extensions/gsd/auto-dispatch.js +87 -9
- package/dist/resources/extensions/gsd/auto-model-selection.js +27 -6
- package/dist/resources/extensions/gsd/auto-post-unit.js +7 -5
- package/dist/resources/extensions/gsd/auto-prompts.js +188 -44
- package/dist/resources/extensions/gsd/auto-recovery.js +48 -0
- package/dist/resources/extensions/gsd/auto-start.js +5 -3
- package/dist/resources/extensions/gsd/auto-verification.js +33 -0
- package/dist/resources/extensions/gsd/auto-worktree.js +71 -2
- package/dist/resources/extensions/gsd/auto.js +25 -3
- 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 +131 -0
- package/dist/resources/extensions/gsd/bootstrap/query-tools.js +29 -0
- package/dist/resources/extensions/gsd/bootstrap/register-extension.js +12 -0
- package/dist/resources/extensions/gsd/bootstrap/register-hooks.js +22 -0
- package/dist/resources/extensions/gsd/bootstrap/system-context.js +84 -10
- package/dist/resources/extensions/gsd/commands/catalog.js +15 -7
- package/dist/resources/extensions/gsd/commands/handlers/core.js +58 -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 +10 -0
- package/dist/resources/extensions/gsd/commands-config.js +5 -0
- package/dist/resources/extensions/gsd/commands-extract-learnings.js +200 -77
- package/dist/resources/extensions/gsd/commands-memory.js +462 -0
- package/dist/resources/extensions/gsd/commands-prefs-wizard.js +39 -11
- package/dist/resources/extensions/gsd/custom-workflow-engine.js +74 -54
- package/dist/resources/extensions/gsd/db-writer.js +89 -16
- package/dist/resources/extensions/gsd/docs/preferences-reference.md +2 -2
- package/dist/resources/extensions/gsd/doctor-environment.js +2 -1
- package/dist/resources/extensions/gsd/doctor-git-checks.js +50 -32
- package/dist/resources/extensions/gsd/doctor-proactive.js +4 -1
- package/dist/resources/extensions/gsd/doctor-providers.js +51 -5
- package/dist/resources/extensions/gsd/doctor-runtime-checks.js +21 -1
- package/dist/resources/extensions/gsd/doctor.js +7 -1
- package/dist/resources/extensions/gsd/ecosystem/gsd-extension-api.js +1 -0
- package/dist/resources/extensions/gsd/error-classifier.js +5 -2
- package/dist/resources/extensions/gsd/escalation.js +321 -0
- package/dist/resources/extensions/gsd/graph.js +26 -0
- package/dist/resources/extensions/gsd/gsd-db.js +517 -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/hook-emitter.js +108 -0
- 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-backfill.js +126 -0
- 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 +318 -6
- package/dist/resources/extensions/gsd/metrics.js +1 -0
- package/dist/resources/extensions/gsd/model-cost-table.js +1 -0
- package/dist/resources/extensions/gsd/model-router.js +12 -5
- package/dist/resources/extensions/gsd/native-git-bridge.js +121 -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/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 +98 -8
- 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/prompts/add-tests.md +1 -0
- package/dist/resources/extensions/gsd/prompts/complete-milestone.md +4 -1
- package/dist/resources/extensions/gsd/prompts/complete-slice.md +2 -2
- package/dist/resources/extensions/gsd/prompts/debug-diagnose.md +2 -0
- package/dist/resources/extensions/gsd/prompts/execute-task.md +16 -3
- package/dist/resources/extensions/gsd/prompts/plan-milestone.md +12 -0
- package/dist/resources/extensions/gsd/prompts/plan-slice.md +2 -0
- package/dist/resources/extensions/gsd/prompts/refine-slice.md +69 -0
- package/dist/resources/extensions/gsd/prompts/research-slice.md +1 -0
- package/dist/resources/extensions/gsd/python-resolver.js +70 -0
- package/dist/resources/extensions/gsd/setup-catalog.js +75 -0
- package/dist/resources/extensions/gsd/state.js +90 -7
- package/dist/resources/extensions/gsd/templates/PREFERENCES.md +1 -1
- package/dist/resources/extensions/gsd/tools/complete-task.js +80 -0
- package/dist/resources/extensions/gsd/tools/memory-tools.js +331 -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/tools/workflow-tool-executors.js +14 -0
- package/dist/resources/extensions/gsd/uok/flags.js +1 -1
- package/dist/resources/extensions/gsd/verification-gate.js +2 -1
- package/dist/resources/extensions/gsd/workflow-manifest.js +8 -0
- package/dist/resources/extensions/gsd/workflow-mcp.js +1 -0
- package/dist/resources/extensions/gsd/workflow-projections.js +17 -15
- package/dist/resources/extensions/gsd/workflow-templates/spike.md +6 -0
- package/dist/resources/extensions/gsd/worktree-resolver.js +42 -1
- package/dist/resources/extensions/remote-questions/manager.js +11 -1
- package/dist/resources/extensions/search-the-web/command-search-provider.js +4 -1
- package/dist/resources/extensions/search-the-web/native-search.js +13 -2
- package/dist/resources/skills/api-design/SKILL.md +190 -0
- package/dist/resources/skills/create-mcp-server/SKILL.md +121 -0
- package/dist/resources/skills/decompose-into-slices/SKILL.md +139 -0
- package/dist/resources/skills/dependency-upgrade/SKILL.md +158 -0
- package/dist/resources/skills/design-an-interface/SKILL.md +102 -0
- package/dist/resources/skills/forensics/SKILL.md +153 -0
- package/dist/resources/skills/grill-me/SKILL.md +93 -0
- package/dist/resources/skills/handoff/SKILL.md +121 -0
- package/dist/resources/skills/observability/SKILL.md +174 -0
- package/dist/resources/skills/security-review/SKILL.md +181 -0
- package/dist/resources/skills/spike-wrap-up/SKILL.md +138 -0
- package/dist/resources/skills/tdd/SKILL.md +112 -0
- package/dist/resources/skills/verify-before-complete/SKILL.md +97 -0
- package/dist/resources/skills/write-docs/SKILL.md +81 -0
- package/dist/resources/skills/write-milestone-brief/SKILL.md +135 -0
- package/dist/tsconfig.extensions.tsbuildinfo +1 -1
- package/dist/web/standalone/.next/BUILD_ID +1 -1
- package/dist/web/standalone/.next/app-path-routes-manifest.json +11 -11
- 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/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 +11 -11
- 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.02df9631042cc18e.js → 2826.e59e8578e2e28639.js} +2 -2
- 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-6c7cda3e318eedb6.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/package.json +1 -1
- package/packages/daemon/package.json +2 -2
- 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 +2 -1
- package/packages/mcp-server/dist/workflow-tools.d.ts.map +1 -1
- package/packages/mcp-server/dist/workflow-tools.js +306 -71
- package/packages/mcp-server/dist/workflow-tools.js.map +1 -1
- package/packages/mcp-server/package.json +2 -2
- 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 +346 -1
- package/packages/mcp-server/src/workflow-tools.ts +359 -75
- package/packages/mcp-server/tsconfig.tsbuildinfo +1 -1
- package/packages/native/package.json +1 -1
- package/packages/pi-agent-core/dist/agent-loop.js +12 -0
- package/packages/pi-agent-core/dist/agent-loop.js.map +1 -1
- package/packages/pi-agent-core/dist/types.d.ts +30 -0
- package/packages/pi-agent-core/dist/types.d.ts.map +1 -1
- package/packages/pi-agent-core/dist/types.js.map +1 -1
- package/packages/pi-agent-core/package.json +1 -1
- package/packages/pi-agent-core/src/agent-loop.ts +14 -0
- package/packages/pi-agent-core/src/types.ts +34 -0
- package/packages/pi-agent-core/tsconfig.tsbuildinfo +1 -1
- package/packages/pi-ai/dist/index.d.ts +1 -0
- package/packages/pi-ai/dist/index.d.ts.map +1 -1
- package/packages/pi-ai/dist/index.js +1 -0
- package/packages/pi-ai/dist/index.js.map +1 -1
- package/packages/pi-ai/dist/models/generated/index.d.ts +17 -0
- 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.test.js +1 -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 -7
- 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-bearer-auth.test.d.ts +2 -0
- package/packages/pi-ai/dist/providers/anthropic-bearer-auth.test.d.ts.map +1 -0
- package/packages/pi-ai/dist/providers/anthropic-bearer-auth.test.js +13 -0
- package/packages/pi-ai/dist/providers/anthropic-bearer-auth.test.js.map +1 -0
- package/packages/pi-ai/dist/providers/anthropic-shared.d.ts +19 -0
- package/packages/pi-ai/dist/providers/anthropic-shared.d.ts.map +1 -1
- package/packages/pi-ai/dist/providers/anthropic-shared.js +25 -1
- package/packages/pi-ai/dist/providers/anthropic-shared.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 +23 -2
- package/packages/pi-ai/dist/providers/anthropic.js.map +1 -1
- package/packages/pi-ai/dist/providers/api-family.d.ts +27 -0
- package/packages/pi-ai/dist/providers/api-family.d.ts.map +1 -0
- package/packages/pi-ai/dist/providers/api-family.js +47 -0
- package/packages/pi-ai/dist/providers/api-family.js.map +1 -0
- package/packages/pi-ai/dist/providers/api-family.test.d.ts +2 -0
- package/packages/pi-ai/dist/providers/api-family.test.d.ts.map +1 -0
- package/packages/pi-ai/dist/providers/api-family.test.js +101 -0
- package/packages/pi-ai/dist/providers/api-family.test.js.map +1 -0
- package/packages/pi-ai/dist/utils/oauth/github-copilot.d.ts.map +1 -1
- package/packages/pi-ai/dist/utils/oauth/github-copilot.js +12 -2
- package/packages/pi-ai/dist/utils/oauth/github-copilot.js.map +1 -1
- package/packages/pi-ai/dist/utils/oauth/github-copilot.test.js +164 -14
- package/packages/pi-ai/dist/utils/oauth/github-copilot.test.js.map +1 -1
- package/packages/pi-ai/dist/utils/oauth/google-antigravity.d.ts.map +1 -1
- package/packages/pi-ai/dist/utils/oauth/google-antigravity.js +15 -3
- package/packages/pi-ai/dist/utils/oauth/google-antigravity.js.map +1 -1
- package/packages/pi-ai/dist/utils/oauth/google-antigravity.test.d.ts +2 -0
- package/packages/pi-ai/dist/utils/oauth/google-antigravity.test.d.ts.map +1 -0
- package/packages/pi-ai/dist/utils/oauth/google-antigravity.test.js +67 -0
- package/packages/pi-ai/dist/utils/oauth/google-antigravity.test.js.map +1 -0
- package/packages/pi-ai/dist/utils/oauth/google-gemini-cli.d.ts.map +1 -1
- package/packages/pi-ai/dist/utils/oauth/google-gemini-cli.js +16 -3
- package/packages/pi-ai/dist/utils/oauth/google-gemini-cli.js.map +1 -1
- package/packages/pi-ai/dist/utils/oauth/google-gemini-cli.test.d.ts +2 -0
- package/packages/pi-ai/dist/utils/oauth/google-gemini-cli.test.d.ts.map +1 -0
- package/packages/pi-ai/dist/utils/oauth/google-gemini-cli.test.js +67 -0
- package/packages/pi-ai/dist/utils/oauth/google-gemini-cli.test.js.map +1 -0
- package/packages/pi-ai/dist/utils/oauth/oauth-providers.test.d.ts +2 -0
- package/packages/pi-ai/dist/utils/oauth/oauth-providers.test.d.ts.map +1 -0
- package/packages/pi-ai/dist/utils/oauth/oauth-providers.test.js +289 -0
- package/packages/pi-ai/dist/utils/oauth/oauth-providers.test.js.map +1 -0
- 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 +12 -0
- package/packages/pi-ai/src/index.ts +1 -0
- package/packages/pi-ai/src/models/generated/openai-codex.ts +17 -0
- package/packages/pi-ai/src/models.generated.test.ts +1 -0
- package/packages/pi-ai/src/providers/amazon-bedrock.test.ts +164 -0
- package/packages/pi-ai/src/providers/amazon-bedrock.ts +41 -8
- package/packages/pi-ai/src/providers/anthropic-auth.test.ts +47 -1
- package/packages/pi-ai/src/providers/anthropic-bearer-auth.test.ts +26 -0
- package/packages/pi-ai/src/providers/anthropic-shared.ts +30 -1
- package/packages/pi-ai/src/providers/anthropic.ts +25 -2
- package/packages/pi-ai/src/providers/api-family.test.ts +129 -0
- package/packages/pi-ai/src/providers/api-family.ts +57 -0
- package/packages/pi-ai/src/utils/oauth/github-copilot.test.ts +200 -23
- package/packages/pi-ai/src/utils/oauth/github-copilot.ts +12 -2
- package/packages/pi-ai/src/utils/oauth/google-antigravity.test.ts +84 -0
- package/packages/pi-ai/src/utils/oauth/google-antigravity.ts +15 -5
- package/packages/pi-ai/src/utils/oauth/google-gemini-cli.test.ts +84 -0
- package/packages/pi-ai/src/utils/oauth/google-gemini-cli.ts +16 -5
- package/packages/pi-ai/src/utils/oauth/oauth-providers.test.ts +363 -0
- 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/cli/args.d.ts +6 -0
- package/packages/pi-coding-agent/dist/cli/args.d.ts.map +1 -1
- package/packages/pi-coding-agent/dist/cli/args.js +14 -4
- package/packages/pi-coding-agent/dist/cli/args.js.map +1 -1
- package/packages/pi-coding-agent/dist/cli/args.test.d.ts +2 -0
- package/packages/pi-coding-agent/dist/cli/args.test.d.ts.map +1 -0
- package/packages/pi-coding-agent/dist/cli/args.test.js +38 -0
- package/packages/pi-coding-agent/dist/cli/args.test.js.map +1 -0
- package/packages/pi-coding-agent/dist/core/agent-session.d.ts.map +1 -1
- package/packages/pi-coding-agent/dist/core/agent-session.js +25 -2
- package/packages/pi-coding-agent/dist/core/agent-session.js.map +1 -1
- package/packages/pi-coding-agent/dist/core/auth-storage.d.ts +7 -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 +25 -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 +38 -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/extensions/index.d.ts +1 -1
- package/packages/pi-coding-agent/dist/core/extensions/index.d.ts.map +1 -1
- package/packages/pi-coding-agent/dist/core/extensions/index.js.map +1 -1
- package/packages/pi-coding-agent/dist/core/extensions/loader.d.ts.map +1 -1
- package/packages/pi-coding-agent/dist/core/extensions/loader.js +4 -0
- package/packages/pi-coding-agent/dist/core/extensions/loader.js.map +1 -1
- package/packages/pi-coding-agent/dist/core/extensions/runner.d.ts +34 -2
- package/packages/pi-coding-agent/dist/core/extensions/runner.d.ts.map +1 -1
- package/packages/pi-coding-agent/dist/core/extensions/runner.js +233 -0
- package/packages/pi-coding-agent/dist/core/extensions/runner.js.map +1 -1
- package/packages/pi-coding-agent/dist/core/extensions/types.d.ts +200 -3
- package/packages/pi-coding-agent/dist/core/extensions/types.d.ts.map +1 -1
- package/packages/pi-coding-agent/dist/core/extensions/types.js.map +1 -1
- package/packages/pi-coding-agent/dist/core/hooks-runner.d.ts +53 -0
- package/packages/pi-coding-agent/dist/core/hooks-runner.d.ts.map +1 -0
- package/packages/pi-coding-agent/dist/core/hooks-runner.js +337 -0
- package/packages/pi-coding-agent/dist/core/hooks-runner.js.map +1 -0
- package/packages/pi-coding-agent/dist/core/hooks-runner.test.d.ts +2 -0
- package/packages/pi-coding-agent/dist/core/hooks-runner.test.d.ts.map +1 -0
- package/packages/pi-coding-agent/dist/core/hooks-runner.test.js +234 -0
- package/packages/pi-coding-agent/dist/core/hooks-runner.test.js.map +1 -0
- package/packages/pi-coding-agent/dist/core/index.d.ts +1 -0
- package/packages/pi-coding-agent/dist/core/index.d.ts.map +1 -1
- package/packages/pi-coding-agent/dist/core/index.js +1 -0
- package/packages/pi-coding-agent/dist/core/index.js.map +1 -1
- package/packages/pi-coding-agent/dist/core/model-registry-auth-header.test.d.ts +2 -0
- package/packages/pi-coding-agent/dist/core/model-registry-auth-header.test.d.ts.map +1 -0
- package/packages/pi-coding-agent/dist/core/model-registry-auth-header.test.js +40 -0
- package/packages/pi-coding-agent/dist/core/model-registry-auth-header.test.js.map +1 -0
- 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/retry-handler.d.ts.map +1 -1
- package/packages/pi-coding-agent/dist/core/retry-handler.js +4 -1
- package/packages/pi-coding-agent/dist/core/retry-handler.js.map +1 -1
- package/packages/pi-coding-agent/dist/core/sdk.d.ts +10 -0
- package/packages/pi-coding-agent/dist/core/sdk.d.ts.map +1 -1
- package/packages/pi-coding-agent/dist/core/sdk.js +33 -5
- package/packages/pi-coding-agent/dist/core/sdk.js.map +1 -1
- package/packages/pi-coding-agent/dist/core/settings-manager.d.ts +55 -0
- package/packages/pi-coding-agent/dist/core/settings-manager.d.ts.map +1 -1
- package/packages/pi-coding-agent/dist/core/settings-manager.js.map +1 -1
- package/packages/pi-coding-agent/dist/index.d.ts +1 -1
- package/packages/pi-coding-agent/dist/index.d.ts.map +1 -1
- package/packages/pi-coding-agent/dist/index.js.map +1 -1
- package/packages/pi-coding-agent/dist/main.d.ts.map +1 -1
- package/packages/pi-coding-agent/dist/main.js +3 -0
- package/packages/pi-coding-agent/dist/main.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 +1 -0
- package/packages/pi-coding-agent/dist/modes/interactive/theme/theme-schema.d.ts.map +1 -1
- package/packages/pi-coding-agent/dist/modes/interactive/theme/theme-schema.js +1 -0
- package/packages/pi-coding-agent/dist/modes/interactive/theme/theme-schema.js.map +1 -1
- package/packages/pi-coding-agent/dist/modes/interactive/theme/theme.d.ts +1 -1
- 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.map +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 +13 -9
- package/packages/pi-coding-agent/dist/modes/interactive/theme/themes.js.map +1 -1
- package/packages/pi-coding-agent/package.json +1 -1
- package/packages/pi-coding-agent/src/cli/args.test.ts +44 -0
- package/packages/pi-coding-agent/src/cli/args.ts +21 -6
- package/packages/pi-coding-agent/src/core/agent-session.ts +27 -2
- package/packages/pi-coding-agent/src/core/auth-storage.test.ts +42 -0
- package/packages/pi-coding-agent/src/core/auth-storage.ts +25 -0
- package/packages/pi-coding-agent/src/core/chat-controller-ordering.test.ts +4 -1
- package/packages/pi-coding-agent/src/core/extensions/index.ts +16 -0
- package/packages/pi-coding-agent/src/core/extensions/loader.ts +5 -0
- package/packages/pi-coding-agent/src/core/extensions/runner.ts +353 -1
- package/packages/pi-coding-agent/src/core/extensions/types.ts +253 -2
- package/packages/pi-coding-agent/src/core/hooks-runner.test.ts +269 -0
- package/packages/pi-coding-agent/src/core/hooks-runner.ts +460 -0
- package/packages/pi-coding-agent/src/core/index.ts +10 -0
- package/packages/pi-coding-agent/src/core/model-registry-auth-header.test.ts +44 -0
- package/packages/pi-coding-agent/src/core/model-registry-auth-mode.test.ts +37 -1
- package/packages/pi-coding-agent/src/core/retry-handler.ts +4 -1
- package/packages/pi-coding-agent/src/core/sdk.ts +48 -5
- package/packages/pi-coding-agent/src/core/settings-manager.ts +57 -0
- package/packages/pi-coding-agent/src/index.ts +16 -0
- package/packages/pi-coding-agent/src/main.ts +4 -0
- 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 +1 -0
- package/packages/pi-coding-agent/src/modes/interactive/theme/theme.ts +1 -0
- package/packages/pi-coding-agent/src/modes/interactive/theme/themes.ts +13 -9
- package/packages/pi-coding-agent/tsconfig.tsbuildinfo +1 -1
- package/packages/pi-tui/package.json +1 -1
- package/packages/rpc-client/package.json +1 -1
- package/pkg/dist/modes/interactive/theme/theme-schema.d.ts +1 -0
- package/pkg/dist/modes/interactive/theme/theme-schema.d.ts.map +1 -1
- package/pkg/dist/modes/interactive/theme/theme-schema.js +1 -0
- package/pkg/dist/modes/interactive/theme/theme-schema.js.map +1 -1
- package/pkg/dist/modes/interactive/theme/theme.d.ts +1 -1
- package/pkg/dist/modes/interactive/theme/theme.d.ts.map +1 -1
- package/pkg/dist/modes/interactive/theme/theme.js.map +1 -1
- package/pkg/dist/modes/interactive/theme/themes.d.ts.map +1 -1
- package/pkg/dist/modes/interactive/theme/themes.js +13 -9
- package/pkg/dist/modes/interactive/theme/themes.js.map +1 -1
- package/pkg/package.json +1 -1
- package/src/resources/agents/researcher.md +1 -1
- package/src/resources/extensions/ask-user-questions.ts +7 -4
- package/src/resources/extensions/claude-code-cli/readiness.ts +36 -2
- package/src/resources/extensions/claude-code-cli/stream-adapter.ts +59 -1
- package/src/resources/extensions/claude-code-cli/tests/stream-adapter.test.ts +66 -0
- package/src/resources/extensions/gsd/auto/loop-deps.ts +2 -10
- package/src/resources/extensions/gsd/auto/phases.ts +52 -6
- package/src/resources/extensions/gsd/auto-artifact-paths.ts +20 -0
- package/src/resources/extensions/gsd/auto-dashboard.ts +46 -5
- package/src/resources/extensions/gsd/auto-direct-dispatch.ts +15 -2
- package/src/resources/extensions/gsd/auto-dispatch.ts +96 -4
- package/src/resources/extensions/gsd/auto-model-selection.ts +37 -6
- package/src/resources/extensions/gsd/auto-post-unit.ts +7 -5
- package/src/resources/extensions/gsd/auto-prompts.ts +225 -45
- package/src/resources/extensions/gsd/auto-recovery.ts +47 -0
- package/src/resources/extensions/gsd/auto-start.ts +8 -6
- package/src/resources/extensions/gsd/auto-verification.ts +33 -0
- package/src/resources/extensions/gsd/auto-worktree.ts +81 -1
- package/src/resources/extensions/gsd/auto.ts +27 -2
- 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 +163 -0
- package/src/resources/extensions/gsd/bootstrap/query-tools.ts +31 -0
- package/src/resources/extensions/gsd/bootstrap/register-extension.ts +15 -0
- package/src/resources/extensions/gsd/bootstrap/register-hooks.ts +22 -0
- package/src/resources/extensions/gsd/bootstrap/system-context.ts +89 -10
- package/src/resources/extensions/gsd/commands/catalog.ts +15 -7
- package/src/resources/extensions/gsd/commands/handlers/core.ts +63 -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 +10 -0
- package/src/resources/extensions/gsd/commands-config.ts +10 -0
- package/src/resources/extensions/gsd/commands-extract-learnings.ts +262 -78
- package/src/resources/extensions/gsd/commands-memory.ts +551 -0
- package/src/resources/extensions/gsd/commands-prefs-wizard.ts +48 -11
- package/src/resources/extensions/gsd/custom-workflow-engine.ts +85 -60
- package/src/resources/extensions/gsd/db-writer.ts +91 -17
- package/src/resources/extensions/gsd/docs/preferences-reference.md +2 -2
- package/src/resources/extensions/gsd/doctor-environment.ts +2 -1
- package/src/resources/extensions/gsd/doctor-git-checks.ts +51 -30
- package/src/resources/extensions/gsd/doctor-proactive.ts +4 -1
- package/src/resources/extensions/gsd/doctor-providers.ts +59 -6
- package/src/resources/extensions/gsd/doctor-runtime-checks.ts +22 -1
- package/src/resources/extensions/gsd/doctor-types.ts +1 -0
- package/src/resources/extensions/gsd/doctor.ts +7 -1
- package/src/resources/extensions/gsd/ecosystem/gsd-extension-api.ts +2 -0
- package/src/resources/extensions/gsd/error-classifier.ts +5 -2
- package/src/resources/extensions/gsd/escalation.ts +367 -0
- package/src/resources/extensions/gsd/graph.ts +33 -0
- package/src/resources/extensions/gsd/gsd-db.ts +617 -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/hook-emitter.ts +188 -0
- 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-backfill.ts +140 -0
- 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 +377 -7
- package/src/resources/extensions/gsd/metrics.ts +1 -0
- package/src/resources/extensions/gsd/model-cost-table.ts +1 -0
- package/src/resources/extensions/gsd/model-router.ts +21 -5
- package/src/resources/extensions/gsd/native-git-bridge.ts +118 -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/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 +100 -12
- package/src/resources/extensions/gsd/preferences-models.ts +1 -0
- package/src/resources/extensions/gsd/preferences-types.ts +9 -1
- package/src/resources/extensions/gsd/preferences-validation.ts +33 -7
- package/src/resources/extensions/gsd/prompts/add-tests.md +1 -0
- package/src/resources/extensions/gsd/prompts/complete-milestone.md +4 -1
- package/src/resources/extensions/gsd/prompts/complete-slice.md +2 -2
- package/src/resources/extensions/gsd/prompts/debug-diagnose.md +2 -0
- package/src/resources/extensions/gsd/prompts/execute-task.md +16 -3
- package/src/resources/extensions/gsd/prompts/plan-milestone.md +12 -0
- package/src/resources/extensions/gsd/prompts/plan-slice.md +2 -0
- package/src/resources/extensions/gsd/prompts/refine-slice.md +69 -0
- package/src/resources/extensions/gsd/prompts/research-slice.md +1 -0
- package/src/resources/extensions/gsd/python-resolver.ts +76 -0
- package/src/resources/extensions/gsd/setup-catalog.ts +105 -0
- package/src/resources/extensions/gsd/state.ts +95 -6
- package/src/resources/extensions/gsd/templates/PREFERENCES.md +1 -1
- package/src/resources/extensions/gsd/tests/artifact-corruption-2630.test.ts +7 -0
- package/src/resources/extensions/gsd/tests/auto-dashboard.test.ts +49 -0
- package/src/resources/extensions/gsd/tests/auto-migrating-recovery.test.ts +63 -0
- package/src/resources/extensions/gsd/tests/auto-model-selection.test.ts +95 -1
- 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/bundled-skill-triggers.test.ts +54 -0
- package/src/resources/extensions/gsd/tests/commands-extract-learnings.test.ts +335 -21
- 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/derive-state-db.test.ts +42 -0
- package/src/resources/extensions/gsd/tests/derive-state-helpers.test.ts +8 -4
- package/src/resources/extensions/gsd/tests/doctor-providers.test.ts +117 -3
- package/src/resources/extensions/gsd/tests/enhanced-verification-integration.test.ts +5 -0
- package/src/resources/extensions/gsd/tests/ensure-db-open.test.ts +306 -1
- package/src/resources/extensions/gsd/tests/escalation.test.ts +818 -0
- package/src/resources/extensions/gsd/tests/flat-rate-routing-guard.test.ts +145 -8
- package/src/resources/extensions/gsd/tests/freeform-decisions.test.ts +62 -0
- 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-symlink-cwd.test.ts +90 -0
- package/src/resources/extensions/gsd/tests/integration/doctor-git.test.ts +117 -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 +32 -1
- package/src/resources/extensions/gsd/tests/integration/git-service.test.ts +72 -5
- 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/interactive-routing-bypass.test.ts +1 -1
- package/src/resources/extensions/gsd/tests/journal-integration.test.ts +35 -0
- package/src/resources/extensions/gsd/tests/load-memory-block.test.ts +36 -0
- 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 +317 -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 +159 -8
- package/src/resources/extensions/gsd/tests/prompt-contracts.test.ts +24 -0
- package/src/resources/extensions/gsd/tests/prompts-no-gitignored-test-refs.test.ts +56 -0
- package/src/resources/extensions/gsd/tests/provider-errors.test.ts +41 -4
- 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/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/stash-queued-context-files.test.ts +54 -0
- package/src/resources/extensions/gsd/tests/state-corruption-2945.test.ts +3 -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 +1 -1
- package/src/resources/extensions/gsd/tests/validate-milestone.test.ts +9 -3
- package/src/resources/extensions/gsd/tests/verification-gate.test.ts +35 -0
- package/src/resources/extensions/gsd/tests/workflow-projections.test.ts +7 -0
- package/src/resources/extensions/gsd/tests/workflow-tool-executors.test.ts +97 -0
- 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 +410 -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/tools/workflow-tool-executors.ts +14 -0
- package/src/resources/extensions/gsd/types.ts +62 -0
- package/src/resources/extensions/gsd/uok/contracts.ts +2 -1
- package/src/resources/extensions/gsd/uok/flags.ts +1 -1
- package/src/resources/extensions/gsd/verification-gate.ts +2 -1
- package/src/resources/extensions/gsd/workflow-logger.ts +4 -1
- package/src/resources/extensions/gsd/workflow-manifest.ts +8 -0
- package/src/resources/extensions/gsd/workflow-mcp.ts +1 -0
- package/src/resources/extensions/gsd/workflow-projections.ts +18 -16
- package/src/resources/extensions/gsd/workflow-templates/spike.md +6 -0
- package/src/resources/extensions/gsd/worktree-resolver.ts +47 -1
- package/src/resources/extensions/remote-questions/manager.ts +13 -1
- package/src/resources/extensions/remote-questions/tests/remote-answer-normalization.test.ts +92 -0
- package/src/resources/extensions/search-the-web/command-search-provider.ts +4 -1
- package/src/resources/extensions/search-the-web/native-search.ts +13 -3
- package/src/resources/skills/api-design/SKILL.md +190 -0
- package/src/resources/skills/create-mcp-server/SKILL.md +121 -0
- package/src/resources/skills/decompose-into-slices/SKILL.md +139 -0
- package/src/resources/skills/dependency-upgrade/SKILL.md +158 -0
- package/src/resources/skills/design-an-interface/SKILL.md +102 -0
- package/src/resources/skills/forensics/SKILL.md +153 -0
- package/src/resources/skills/grill-me/SKILL.md +93 -0
- package/src/resources/skills/handoff/SKILL.md +121 -0
- package/src/resources/skills/observability/SKILL.md +174 -0
- package/src/resources/skills/security-review/SKILL.md +181 -0
- package/src/resources/skills/spike-wrap-up/SKILL.md +138 -0
- package/src/resources/skills/tdd/SKILL.md +112 -0
- package/src/resources/skills/verify-before-complete/SKILL.md +97 -0
- package/src/resources/skills/write-docs/SKILL.md +81 -0
- package/src/resources/skills/write-milestone-brief/SKILL.md +135 -0
- package/dist/web/standalone/.next/static/css/3e9cdadb4d23b8a4.css +0 -1
- /package/dist/web/standalone/.next/static/{JncJywFxCugMuXGs56m-b → pBwmOoye64ZrRp-_rf0v1}/_buildManifest.js +0 -0
- /package/dist/web/standalone/.next/static/{JncJywFxCugMuXGs56m-b → pBwmOoye64ZrRp-_rf0v1}/_ssgManifest.js +0 -0
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
// GSD Extension — Notification History Overlay
|
|
2
2
|
// Scrollable panel showing all persisted notifications with severity filtering.
|
|
3
3
|
// Toggled with Ctrl+Alt+N (⌃⌥N on macOS), Ctrl+Shift+N fallback, or /gsd notifications.
|
|
4
|
-
import { truncateToWidth, visibleWidth, matchesKey, Key } from "@gsd/pi-tui";
|
|
4
|
+
import { truncateToWidth, visibleWidth, wrapTextWithAnsi, matchesKey, Key } from "@gsd/pi-tui";
|
|
5
5
|
import { readNotifications, markAllRead, clearNotifications, onNotificationStoreChange, } from "./notification-store.js";
|
|
6
6
|
import { formattedShortcutPair } from "./shortcut-defs.js";
|
|
7
7
|
import { padRight, joinColumns } from "../shared/mod.js";
|
|
@@ -15,29 +15,14 @@ function severityIcon(severity) {
|
|
|
15
15
|
default: return "●";
|
|
16
16
|
}
|
|
17
17
|
}
|
|
18
|
-
/**
|
|
18
|
+
/** Column-aware word wrap using pi-tui's native wrapper (handles unicode/ANSI). */
|
|
19
19
|
function wrapText(text, maxWidth) {
|
|
20
|
-
if (
|
|
20
|
+
if (maxWidth <= 0)
|
|
21
21
|
return [text];
|
|
22
|
-
const
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
if (current.length === 0) {
|
|
27
|
-
current = word;
|
|
28
|
-
}
|
|
29
|
-
else if (current.length + 1 + word.length <= maxWidth) {
|
|
30
|
-
current += " " + word;
|
|
31
|
-
}
|
|
32
|
-
else {
|
|
33
|
-
lines.push(current);
|
|
34
|
-
current = word;
|
|
35
|
-
}
|
|
36
|
-
}
|
|
37
|
-
if (current.length > 0)
|
|
38
|
-
lines.push(current);
|
|
39
|
-
// If a single word exceeds maxWidth, truncate it
|
|
40
|
-
return lines.map((l) => l.length > maxWidth ? l.slice(0, maxWidth - 1) + "…" : l);
|
|
22
|
+
const lines = wrapTextWithAnsi(text, maxWidth);
|
|
23
|
+
// Safety clamp: if any line still exceeds maxWidth (e.g. unbreakable long token),
|
|
24
|
+
// truncate it with an ellipsis so it cannot bleed past the box border.
|
|
25
|
+
return lines.map((l) => visibleWidth(l) > maxWidth ? truncateToWidth(l, maxWidth, "…") : l);
|
|
41
26
|
}
|
|
42
27
|
function formatTimestamp(ts) {
|
|
43
28
|
try {
|
|
@@ -1,49 +1,34 @@
|
|
|
1
|
-
// GSD Extension — Notification
|
|
2
|
-
// Always-on ambient
|
|
3
|
-
//
|
|
4
|
-
//
|
|
1
|
+
// GSD Extension — Notification Status
|
|
2
|
+
// Always-on ambient notification chip surfaced as an extension status on the
|
|
3
|
+
// footer pwd row. Refreshes on store change + on a 30s timer. Hidden when
|
|
4
|
+
// unread=0. Key sorts late so the chip renders to the right of other
|
|
5
|
+
// extension statuses.
|
|
5
6
|
import { getUnreadCount, onNotificationStoreChange } from "./notification-store.js";
|
|
6
7
|
import { formattedShortcutPair } from "./shortcut-defs.js";
|
|
7
|
-
//
|
|
8
|
-
|
|
8
|
+
// Key chosen to sort after alphabetic extension keys so the chip lands on the
|
|
9
|
+
// far right of the extension-status block.
|
|
10
|
+
const STATUS_KEY = "zz-notifications";
|
|
11
|
+
export function buildNotificationChip() {
|
|
9
12
|
const unread = getUnreadCount();
|
|
10
13
|
if (unread === 0)
|
|
11
|
-
return
|
|
12
|
-
return
|
|
14
|
+
return "";
|
|
15
|
+
return `🔔 ${unread} unread (${formattedShortcutPair("notifications")})`;
|
|
16
|
+
}
|
|
17
|
+
// Retained for backwards compatibility with tests and the RPC fallback path
|
|
18
|
+
// that still expected a line-array widget. Returns empty when no unread.
|
|
19
|
+
export function buildNotificationWidgetLines() {
|
|
20
|
+
const chip = buildNotificationChip();
|
|
21
|
+
return chip ? [` ${chip}`] : [];
|
|
13
22
|
}
|
|
14
|
-
// ─── Widget init ────────────────────────────────────────────────────────
|
|
15
23
|
const REFRESH_INTERVAL_MS = 30_000;
|
|
16
|
-
/**
|
|
17
|
-
* Initialize the always-on notification widget (belowEditor).
|
|
18
|
-
* Call once from session_start after the notification store is initialized.
|
|
19
|
-
*/
|
|
20
24
|
export function initNotificationWidget(ctx) {
|
|
21
25
|
if (!ctx.hasUI)
|
|
22
26
|
return;
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
_tui.requestRender();
|
|
31
|
-
};
|
|
32
|
-
const unsubscribe = onNotificationStoreChange(refresh);
|
|
33
|
-
const refreshTimer = setInterval(refresh, REFRESH_INTERVAL_MS);
|
|
34
|
-
return {
|
|
35
|
-
render(_width) {
|
|
36
|
-
if (!cachedLines)
|
|
37
|
-
cachedLines = buildNotificationWidgetLines();
|
|
38
|
-
return cachedLines;
|
|
39
|
-
},
|
|
40
|
-
invalidate() {
|
|
41
|
-
cachedLines = undefined;
|
|
42
|
-
},
|
|
43
|
-
dispose() {
|
|
44
|
-
unsubscribe();
|
|
45
|
-
clearInterval(refreshTimer);
|
|
46
|
-
},
|
|
47
|
-
};
|
|
48
|
-
}, { placement: "belowEditor" });
|
|
27
|
+
const push = () => {
|
|
28
|
+
const chip = buildNotificationChip();
|
|
29
|
+
ctx.ui.setStatus(STATUS_KEY, chip.length > 0 ? chip : undefined);
|
|
30
|
+
};
|
|
31
|
+
push();
|
|
32
|
+
onNotificationStoreChange(push);
|
|
33
|
+
setInterval(push, REFRESH_INTERVAL_MS).unref?.();
|
|
49
34
|
}
|
|
@@ -0,0 +1,133 @@
|
|
|
1
|
+
// GSD — Onboarding completion record (~/.gsd/agent/onboarding.json)
|
|
2
|
+
//
|
|
3
|
+
// First-class state for the onboarding wizard so re-entry, resume, and the
|
|
4
|
+
// web boot probe all read the same source of truth. Replaces the implicit
|
|
5
|
+
// "settings.defaultProvider exists" heuristic.
|
|
6
|
+
import { existsSync, mkdirSync, readFileSync, renameSync, unlinkSync, writeFileSync } from "node:fs";
|
|
7
|
+
import { homedir } from "node:os";
|
|
8
|
+
import { dirname, join } from "node:path";
|
|
9
|
+
import { logWarning } from "./workflow-logger.js";
|
|
10
|
+
/**
|
|
11
|
+
* Bump `FLOW_VERSION` whenever a new required step is added to ONBOARDING_STEPS.
|
|
12
|
+
* Records with an older flowVersion are treated as "needs partial re-onboarding"
|
|
13
|
+
* by isOnboardingComplete().
|
|
14
|
+
*/
|
|
15
|
+
export const FLOW_VERSION = 1;
|
|
16
|
+
const RECORD_VERSION = 1;
|
|
17
|
+
// Inline agentDir computation (mirrors src/app-paths.ts) — keep this module
|
|
18
|
+
// rootDir-clean for the resources tsconfig; importing from src/ pulls files
|
|
19
|
+
// outside src/resources and breaks the build.
|
|
20
|
+
const AGENT_DIR = process.env.GSD_CODING_AGENT_DIR ||
|
|
21
|
+
join(process.env.GSD_HOME || join(homedir(), ".gsd"), "agent");
|
|
22
|
+
const FILE = join(AGENT_DIR, "onboarding.json");
|
|
23
|
+
const DEFAULT = {
|
|
24
|
+
version: RECORD_VERSION,
|
|
25
|
+
flowVersion: FLOW_VERSION,
|
|
26
|
+
completedAt: null,
|
|
27
|
+
completedSteps: [],
|
|
28
|
+
skippedSteps: [],
|
|
29
|
+
lastResumePoint: null,
|
|
30
|
+
};
|
|
31
|
+
export function readOnboardingRecord() {
|
|
32
|
+
if (!existsSync(FILE))
|
|
33
|
+
return { ...DEFAULT };
|
|
34
|
+
try {
|
|
35
|
+
const raw = JSON.parse(readFileSync(FILE, "utf-8"));
|
|
36
|
+
return {
|
|
37
|
+
version: typeof raw.version === "number" ? raw.version : RECORD_VERSION,
|
|
38
|
+
flowVersion: typeof raw.flowVersion === "number" ? raw.flowVersion : 0,
|
|
39
|
+
completedAt: typeof raw.completedAt === "string" ? raw.completedAt : null,
|
|
40
|
+
completedSteps: Array.isArray(raw.completedSteps) ? raw.completedSteps.filter(s => typeof s === "string") : [],
|
|
41
|
+
skippedSteps: Array.isArray(raw.skippedSteps) ? raw.skippedSteps.filter(s => typeof s === "string") : [],
|
|
42
|
+
lastResumePoint: typeof raw.lastResumePoint === "string" ? raw.lastResumePoint : null,
|
|
43
|
+
};
|
|
44
|
+
}
|
|
45
|
+
catch {
|
|
46
|
+
// Corrupt/unreadable — fall back to defaults rather than crashing onboarding flow
|
|
47
|
+
return { ...DEFAULT };
|
|
48
|
+
}
|
|
49
|
+
}
|
|
50
|
+
function atomicWrite(record) {
|
|
51
|
+
mkdirSync(dirname(FILE), { recursive: true });
|
|
52
|
+
const tmp = `${FILE}.tmp.${process.pid}.${Date.now()}`;
|
|
53
|
+
try {
|
|
54
|
+
writeFileSync(tmp, JSON.stringify(record, null, 2), "utf-8");
|
|
55
|
+
renameSync(tmp, FILE);
|
|
56
|
+
}
|
|
57
|
+
catch (err) {
|
|
58
|
+
// Best-effort: drop the tmp file if the rename failed (don't leak stale tmps)
|
|
59
|
+
try {
|
|
60
|
+
if (existsSync(tmp))
|
|
61
|
+
unlinkSync(tmp);
|
|
62
|
+
}
|
|
63
|
+
catch { /* swallow secondary error */ }
|
|
64
|
+
throw err;
|
|
65
|
+
}
|
|
66
|
+
}
|
|
67
|
+
export function writeOnboardingRecord(patch) {
|
|
68
|
+
const current = readOnboardingRecord();
|
|
69
|
+
const next = {
|
|
70
|
+
...current,
|
|
71
|
+
...patch,
|
|
72
|
+
version: RECORD_VERSION,
|
|
73
|
+
// flowVersion is sticky on writes unless explicitly patched
|
|
74
|
+
flowVersion: typeof patch.flowVersion === "number" ? patch.flowVersion : current.flowVersion,
|
|
75
|
+
};
|
|
76
|
+
try {
|
|
77
|
+
atomicWrite(next);
|
|
78
|
+
}
|
|
79
|
+
catch (err) {
|
|
80
|
+
// Non-fatal for the wizard, but make the failure diagnosable. The next boot
|
|
81
|
+
// will re-prompt for onboarding because the record didn't persist; the
|
|
82
|
+
// logWarning entry tells the user why.
|
|
83
|
+
logWarning("state", `Failed to persist onboarding record: ${err instanceof Error ? err.message : String(err)}`, {
|
|
84
|
+
file: FILE,
|
|
85
|
+
});
|
|
86
|
+
}
|
|
87
|
+
return next;
|
|
88
|
+
}
|
|
89
|
+
/**
|
|
90
|
+
* Onboarding is "complete" when there's a completedAt timestamp AND the
|
|
91
|
+
* flowVersion matches the current FLOW_VERSION. A flowVersion bump means
|
|
92
|
+
* a new required step exists and the user should re-enter to configure it.
|
|
93
|
+
*/
|
|
94
|
+
export function isOnboardingComplete() {
|
|
95
|
+
const r = readOnboardingRecord();
|
|
96
|
+
return r.completedAt !== null && r.flowVersion === FLOW_VERSION;
|
|
97
|
+
}
|
|
98
|
+
export function markStepCompleted(stepId) {
|
|
99
|
+
const r = readOnboardingRecord();
|
|
100
|
+
if (r.completedSteps.includes(stepId)) {
|
|
101
|
+
writeOnboardingRecord({ lastResumePoint: stepId });
|
|
102
|
+
return;
|
|
103
|
+
}
|
|
104
|
+
writeOnboardingRecord({
|
|
105
|
+
completedSteps: [...r.completedSteps, stepId],
|
|
106
|
+
skippedSteps: r.skippedSteps.filter(s => s !== stepId),
|
|
107
|
+
lastResumePoint: stepId,
|
|
108
|
+
});
|
|
109
|
+
}
|
|
110
|
+
export function markStepSkipped(stepId) {
|
|
111
|
+
const r = readOnboardingRecord();
|
|
112
|
+
if (r.skippedSteps.includes(stepId) || r.completedSteps.includes(stepId))
|
|
113
|
+
return;
|
|
114
|
+
writeOnboardingRecord({
|
|
115
|
+
skippedSteps: [...r.skippedSteps, stepId],
|
|
116
|
+
lastResumePoint: stepId,
|
|
117
|
+
});
|
|
118
|
+
}
|
|
119
|
+
export function markOnboardingComplete(completedSteps) {
|
|
120
|
+
writeOnboardingRecord({
|
|
121
|
+
completedAt: new Date().toISOString(),
|
|
122
|
+
flowVersion: FLOW_VERSION,
|
|
123
|
+
completedSteps,
|
|
124
|
+
});
|
|
125
|
+
}
|
|
126
|
+
export function resetOnboarding() {
|
|
127
|
+
writeOnboardingRecord({
|
|
128
|
+
completedAt: null,
|
|
129
|
+
completedSteps: [],
|
|
130
|
+
skippedSteps: [],
|
|
131
|
+
lastResumePoint: null,
|
|
132
|
+
});
|
|
133
|
+
}
|
|
@@ -75,12 +75,36 @@ export function extractRelativeImports(source) {
|
|
|
75
75
|
}
|
|
76
76
|
/**
|
|
77
77
|
* Check if a relative import resolves to an existing file.
|
|
78
|
-
*
|
|
79
|
-
*
|
|
78
|
+
* Resolution order:
|
|
79
|
+
* 1. Imports carrying an explicit extension are checked as-is (handles assets
|
|
80
|
+
* like .css/.scss/images/fonts and .json, not just code extensions).
|
|
81
|
+
* 2. TypeScript ESM convention where .js imports resolve to .ts files.
|
|
82
|
+
* 3. Extensionless imports resolved against .ts/.tsx/.js/.jsx/.mjs/.cjs.
|
|
83
|
+
* 4. Directory imports resolved against index.{ts,tsx,js,jsx,mjs,cjs}.
|
|
80
84
|
*/
|
|
81
85
|
export function resolveImportPath(importPath, sourceFile, basePath) {
|
|
82
86
|
const sourceDir = dirname(resolve(basePath, sourceFile));
|
|
83
87
|
const extensions = [".ts", ".tsx", ".js", ".jsx", ".mjs", ".cjs"];
|
|
88
|
+
// If the import already has an explicit extension, check it as-is first.
|
|
89
|
+
// This correctly resolves asset imports like .css, .scss, images, fonts
|
|
90
|
+
// without requiring each extension to be enumerated (issue #4411). We only
|
|
91
|
+
// do this when the import carries an extension so that extensionless module
|
|
92
|
+
// imports still flow through the TS ESM convention and index-file resolvers.
|
|
93
|
+
const explicitExt = extname(importPath);
|
|
94
|
+
if (explicitExt !== "") {
|
|
95
|
+
const directPath = resolve(sourceDir, importPath);
|
|
96
|
+
if (existsSync(directPath)) {
|
|
97
|
+
return { exists: true, resolvedPath: directPath };
|
|
98
|
+
}
|
|
99
|
+
// Only .js/.jsx/.mjs/.cjs imports legitimately fall through for the TS
|
|
100
|
+
// ESM convention (.js → .ts). Any other explicit extension (.css, .json,
|
|
101
|
+
// .svg, images, fonts, .ts, .tsx, …) must stay unresolved when the direct
|
|
102
|
+
// path is missing — otherwise a stray `./missing.css.ts` could shadow a
|
|
103
|
+
// genuinely missing `./missing.css` import.
|
|
104
|
+
if (![".js", ".jsx", ".mjs", ".cjs"].includes(explicitExt)) {
|
|
105
|
+
return { exists: false, resolvedPath: null };
|
|
106
|
+
}
|
|
107
|
+
}
|
|
84
108
|
// Handle TypeScript ESM convention: .js imports resolve to .ts files
|
|
85
109
|
// e.g., import './types.js' -> ./types.ts
|
|
86
110
|
let normalizedPath = importPath;
|
|
@@ -96,7 +120,7 @@ export function resolveImportPath(importPath, sourceFile, basePath) {
|
|
|
96
120
|
else if (importPath.endsWith(".cjs")) {
|
|
97
121
|
normalizedPath = importPath.slice(0, -4);
|
|
98
122
|
}
|
|
99
|
-
// Try the normalized path with common extensions
|
|
123
|
+
// Try the normalized path with common extensions
|
|
100
124
|
for (const ext of extensions) {
|
|
101
125
|
const fullPath = resolve(sourceDir, normalizedPath + ext);
|
|
102
126
|
if (existsSync(fullPath)) {
|
|
@@ -110,14 +134,6 @@ export function resolveImportPath(importPath, sourceFile, basePath) {
|
|
|
110
134
|
return { exists: true, resolvedPath: indexPath };
|
|
111
135
|
}
|
|
112
136
|
}
|
|
113
|
-
// Check if path already has extension (for .json, etc.)
|
|
114
|
-
const hasExt = [".ts", ".tsx", ".js", ".jsx", ".mjs", ".cjs", ".json"].some((ext) => importPath.endsWith(ext));
|
|
115
|
-
if (hasExt) {
|
|
116
|
-
const fullPath = resolve(sourceDir, importPath);
|
|
117
|
-
if (existsSync(fullPath)) {
|
|
118
|
-
return { exists: true, resolvedPath: fullPath };
|
|
119
|
-
}
|
|
120
|
-
}
|
|
121
137
|
return { exists: false, resolvedPath: null };
|
|
122
138
|
}
|
|
123
139
|
/**
|
|
@@ -15,6 +15,7 @@
|
|
|
15
15
|
*/
|
|
16
16
|
import { existsSync } from "node:fs";
|
|
17
17
|
import { spawn } from "node:child_process";
|
|
18
|
+
import { homedir } from "node:os";
|
|
18
19
|
import { resolve } from "node:path";
|
|
19
20
|
const NPM_COMMAND = process.platform === "win32" ? "npm.cmd" : "npm";
|
|
20
21
|
// ─── Package Existence Check ─────────────────────────────────────────────────
|
|
@@ -202,6 +203,16 @@ export function normalizeFilePath(filePath) {
|
|
|
202
203
|
let normalized = extractPathFromAnnotation(filePath);
|
|
203
204
|
// Normalize path separators to forward slashes
|
|
204
205
|
normalized = normalized.replace(/\\/g, "/");
|
|
206
|
+
// Expand a leading ~ or ~/ so downstream resolve()/set lookups hit the real
|
|
207
|
+
// home directory instead of treating the tilde as a literal path segment.
|
|
208
|
+
if (normalized === "~") {
|
|
209
|
+
normalized = homedir();
|
|
210
|
+
}
|
|
211
|
+
else if (normalized.startsWith("~/")) {
|
|
212
|
+
normalized = resolve(homedir(), normalized.slice(2));
|
|
213
|
+
}
|
|
214
|
+
// homedir()/resolve() can emit platform separators (e.g. "\" on Windows).
|
|
215
|
+
normalized = normalized.replace(/\\/g, "/");
|
|
205
216
|
// Remove leading ./
|
|
206
217
|
while (normalized.startsWith("./")) {
|
|
207
218
|
normalized = normalized.slice(2);
|
|
@@ -214,6 +225,49 @@ export function normalizeFilePath(filePath) {
|
|
|
214
225
|
}
|
|
215
226
|
return normalized;
|
|
216
227
|
}
|
|
228
|
+
/**
|
|
229
|
+
* Planning units sometimes pass a directory reference as task.inputs
|
|
230
|
+
* (e.g. `artifacts/M009-S03/`). The trailing slash is meaningful — the task
|
|
231
|
+
* reads whatever lands inside — but normalizeFilePath strips it, so call this
|
|
232
|
+
* helper against the raw input before normalization.
|
|
233
|
+
*/
|
|
234
|
+
function isDirectoryReference(raw) {
|
|
235
|
+
const candidate = extractPathFromAnnotation(raw.trim());
|
|
236
|
+
if (!candidate)
|
|
237
|
+
return false;
|
|
238
|
+
if (containsGlobPattern(candidate))
|
|
239
|
+
return false;
|
|
240
|
+
return candidate.endsWith("/");
|
|
241
|
+
}
|
|
242
|
+
/**
|
|
243
|
+
* True when any of `knownOutputs` lives under `normalizedDir` (i.e. the task
|
|
244
|
+
* directory input is the parent of something a prior/same task produces).
|
|
245
|
+
*/
|
|
246
|
+
function anyOutputUnderDirectory(normalizedDir, knownOutputs) {
|
|
247
|
+
const prefix = normalizedDir + "/";
|
|
248
|
+
for (const output of knownOutputs) {
|
|
249
|
+
if (output === normalizedDir)
|
|
250
|
+
return true;
|
|
251
|
+
if (output.startsWith(prefix))
|
|
252
|
+
return true;
|
|
253
|
+
}
|
|
254
|
+
return false;
|
|
255
|
+
}
|
|
256
|
+
const URL_SCHEME_PATTERN = /^(https?|ftp|file|ssh|git):\/\//i;
|
|
257
|
+
const SCP_PATTERN = /^[\w.-]+@[\w.-]+:[^/]/;
|
|
258
|
+
function looksLikePathOrUrl(token) {
|
|
259
|
+
if (URL_SCHEME_PATTERN.test(token))
|
|
260
|
+
return true;
|
|
261
|
+
if (SCP_PATTERN.test(token))
|
|
262
|
+
return true;
|
|
263
|
+
if (/^[./~]/.test(token))
|
|
264
|
+
return true;
|
|
265
|
+
if (/[\\/]/.test(token))
|
|
266
|
+
return true;
|
|
267
|
+
if (/\.[A-Za-z0-9]{1,8}$/.test(token))
|
|
268
|
+
return true;
|
|
269
|
+
return false;
|
|
270
|
+
}
|
|
217
271
|
function extractPathFromAnnotation(raw) {
|
|
218
272
|
const trimmed = raw.trim();
|
|
219
273
|
if (!trimmed)
|
|
@@ -226,6 +280,19 @@ function extractPathFromAnnotation(raw) {
|
|
|
226
280
|
if (annotatedMatch) {
|
|
227
281
|
return annotatedMatch[1].trim();
|
|
228
282
|
}
|
|
283
|
+
// Fallback: scan all backticked tokens and return the first one that looks
|
|
284
|
+
// like a path or URL. Handles prose-annotated bullets such as:
|
|
285
|
+
// `path/` directory listing (...)
|
|
286
|
+
// Prefix prose `https://...` suffix prose
|
|
287
|
+
// Citing `.gsd/REQUIREMENTS.md` mid-sentence
|
|
288
|
+
// Skips non-path backticked tokens like `note` or `npm test`.
|
|
289
|
+
const backtickTokens = trimmed.matchAll(/`([^`]+)`/g);
|
|
290
|
+
for (const match of backtickTokens) {
|
|
291
|
+
const token = match[1].trim();
|
|
292
|
+
if (looksLikePathOrUrl(token)) {
|
|
293
|
+
return token;
|
|
294
|
+
}
|
|
295
|
+
}
|
|
229
296
|
// Fall back to the original behavior for already-plain paths.
|
|
230
297
|
return trimmed.replace(/`/g, "");
|
|
231
298
|
}
|
|
@@ -240,12 +307,17 @@ function shouldValidateInputAsPath(raw) {
|
|
|
240
307
|
const trimmed = raw.trim();
|
|
241
308
|
if (!trimmed)
|
|
242
309
|
return false;
|
|
243
|
-
if (/^`+[^`]+`+/.test(trimmed)) {
|
|
244
|
-
return true;
|
|
245
|
-
}
|
|
246
310
|
const candidate = extractPathFromAnnotation(trimmed);
|
|
247
311
|
if (!candidate)
|
|
248
312
|
return false;
|
|
313
|
+
// URLs and remote repo refs are not filesystem paths.
|
|
314
|
+
if (URL_SCHEME_PATTERN.test(candidate))
|
|
315
|
+
return false;
|
|
316
|
+
if (SCP_PATTERN.test(candidate))
|
|
317
|
+
return false;
|
|
318
|
+
if (/^`+[^`]+`+/.test(trimmed)) {
|
|
319
|
+
return true;
|
|
320
|
+
}
|
|
249
321
|
if (!/\s/.test(candidate)) {
|
|
250
322
|
return true;
|
|
251
323
|
}
|
|
@@ -275,10 +347,13 @@ function getExpectedOutputsUpTo(tasks, taskIndex) {
|
|
|
275
347
|
/**
|
|
276
348
|
* Check that all files referenced in task.inputs either:
|
|
277
349
|
* 1. Exist on disk, OR
|
|
278
|
-
* 2. Are in a prior task's expected_output
|
|
350
|
+
* 2. Are in a prior task's expected_output, OR
|
|
351
|
+
* 3. Are in the current task's own expected_output — the task produces them,
|
|
352
|
+
* so they don't need to pre-exist (#4459, mirroring the exemption #3626
|
|
353
|
+
* introduced for task.files).
|
|
279
354
|
*
|
|
280
|
-
* task.files ("files likely touched") is excluded
|
|
281
|
-
* files the task will create
|
|
355
|
+
* task.files ("files likely touched") is excluded entirely from this check —
|
|
356
|
+
* it intentionally includes files the task will create (#3626).
|
|
282
357
|
*
|
|
283
358
|
* All paths are normalized before comparison to ensure ./src/a.ts matches src/a.ts.
|
|
284
359
|
*/
|
|
@@ -287,6 +362,7 @@ export function checkFilePathConsistency(tasks, basePath) {
|
|
|
287
362
|
for (let i = 0; i < tasks.length; i++) {
|
|
288
363
|
const task = tasks[i];
|
|
289
364
|
const priorOutputs = getExpectedOutputsUpTo(tasks, i);
|
|
365
|
+
const ownOutputs = new Set(task.expected_output.map(normalizeFilePath));
|
|
290
366
|
const filesToCheck = [...task.inputs];
|
|
291
367
|
for (const file of filesToCheck) {
|
|
292
368
|
// Skip empty strings
|
|
@@ -303,12 +379,21 @@ export function checkFilePathConsistency(tasks, basePath) {
|
|
|
303
379
|
const existsOnDisk = existsSync(absolutePath);
|
|
304
380
|
// Check if file is in prior expected outputs (priorOutputs already normalized)
|
|
305
381
|
const inPriorOutputs = priorOutputs.has(normalizedFile);
|
|
306
|
-
|
|
382
|
+
const inOwnOutputs = ownOutputs.has(normalizedFile);
|
|
383
|
+
// Directory inputs are satisfied when something produces a file beneath
|
|
384
|
+
// them — either a prior task or the current task itself.
|
|
385
|
+
let directorySatisfied = false;
|
|
386
|
+
if (!existsOnDisk && !inPriorOutputs && !inOwnOutputs && isDirectoryReference(file)) {
|
|
387
|
+
directorySatisfied =
|
|
388
|
+
anyOutputUnderDirectory(normalizedFile, priorOutputs) ||
|
|
389
|
+
anyOutputUnderDirectory(normalizedFile, ownOutputs);
|
|
390
|
+
}
|
|
391
|
+
if (!existsOnDisk && !inPriorOutputs && !inOwnOutputs && !directorySatisfied) {
|
|
307
392
|
results.push({
|
|
308
393
|
category: "file",
|
|
309
394
|
target: file,
|
|
310
395
|
passed: false,
|
|
311
|
-
message: `Task ${task.id} references '${file}' which doesn't exist and isn't created by prior
|
|
396
|
+
message: `Task ${task.id} references '${file}' which doesn't exist and isn't created by prior or same-task outputs`,
|
|
312
397
|
blocking: true,
|
|
313
398
|
});
|
|
314
399
|
}
|
|
@@ -348,6 +433,11 @@ export function checkTaskOrdering(tasks, basePath) {
|
|
|
348
433
|
const normalizedFile = normalizeFilePath(file);
|
|
349
434
|
if (containsGlobPattern(normalizedFile))
|
|
350
435
|
continue;
|
|
436
|
+
// A directory reference like `artifacts/M009-S03/` is never a concrete
|
|
437
|
+
// read-before-create dependency: the fileCreators map is keyed by leaf
|
|
438
|
+
// files, and a same-task output under the directory satisfies it.
|
|
439
|
+
if (isDirectoryReference(file))
|
|
440
|
+
continue;
|
|
351
441
|
const creator = fileCreators.get(normalizedFile);
|
|
352
442
|
const absolutePath = resolve(basePath, normalizedFile);
|
|
353
443
|
const existsOnDisk = existsSync(absolutePath);
|
|
@@ -86,10 +86,11 @@ export const KNOWN_PREFERENCE_KEYS = new Set([
|
|
|
86
86
|
"discuss_depth",
|
|
87
87
|
"flat_rate_providers",
|
|
88
88
|
"language",
|
|
89
|
+
"context_window_override",
|
|
89
90
|
]);
|
|
90
91
|
/** Canonical list of all dispatch unit types. */
|
|
91
92
|
export const KNOWN_UNIT_TYPES = [
|
|
92
|
-
"research-milestone", "plan-milestone", "research-slice", "plan-slice",
|
|
93
|
+
"research-milestone", "plan-milestone", "research-slice", "plan-slice", "refine-slice",
|
|
93
94
|
"execute-task", "reactive-execute", "gate-evaluate", "complete-slice", "replan-slice", "reassess-roadmap",
|
|
94
95
|
"run-uat", "complete-milestone", "validate-milestone", "rewrite-docs",
|
|
95
96
|
"discuss-milestone", "discuss-slice", "worktree-merge",
|
|
@@ -288,20 +288,48 @@ export function validatePreferences(preferences) {
|
|
|
288
288
|
if (typeof preferences.phases === "object" && preferences.phases !== null) {
|
|
289
289
|
const validatedPhases = {};
|
|
290
290
|
const p = preferences.phases;
|
|
291
|
+
// Strict boolean parsing — YAML usually delivers real booleans, but
|
|
292
|
+
// hand-edits like `progressive_planning: "false"` otherwise coerce to
|
|
293
|
+
// truthy via `!!`. Accept only real booleans or the literal strings
|
|
294
|
+
// "true"/"false"; anything else becomes a warning + ignored.
|
|
295
|
+
const parseStrictBoolean = (key, raw) => {
|
|
296
|
+
if (typeof raw === "boolean")
|
|
297
|
+
return raw;
|
|
298
|
+
if (typeof raw === "string") {
|
|
299
|
+
if (raw === "true")
|
|
300
|
+
return true;
|
|
301
|
+
if (raw === "false")
|
|
302
|
+
return false;
|
|
303
|
+
}
|
|
304
|
+
warnings.push(`phases.${key} must be a boolean (got ${typeof raw}: ${JSON.stringify(raw)}) — ignored`);
|
|
305
|
+
return undefined;
|
|
306
|
+
};
|
|
307
|
+
const assignBool = (key, raw) => {
|
|
308
|
+
const v = parseStrictBoolean(String(key), raw);
|
|
309
|
+
if (v !== undefined)
|
|
310
|
+
validatedPhases[key] = v;
|
|
311
|
+
};
|
|
291
312
|
if (p.skip_research !== undefined)
|
|
292
|
-
|
|
313
|
+
assignBool("skip_research", p.skip_research);
|
|
293
314
|
if (p.skip_reassess !== undefined)
|
|
294
|
-
|
|
315
|
+
assignBool("skip_reassess", p.skip_reassess);
|
|
295
316
|
if (p.skip_slice_research !== undefined)
|
|
296
|
-
|
|
317
|
+
assignBool("skip_slice_research", p.skip_slice_research);
|
|
297
318
|
if (p.skip_milestone_validation !== undefined)
|
|
298
|
-
|
|
319
|
+
assignBool("skip_milestone_validation", p.skip_milestone_validation);
|
|
299
320
|
if (p.reassess_after_slice !== undefined)
|
|
300
|
-
|
|
301
|
-
if (p.require_slice_discussion !== undefined)
|
|
302
|
-
|
|
321
|
+
assignBool("reassess_after_slice", p.reassess_after_slice);
|
|
322
|
+
if (p.require_slice_discussion !== undefined) {
|
|
323
|
+
const v = parseStrictBoolean("require_slice_discussion", p.require_slice_discussion);
|
|
324
|
+
if (v !== undefined)
|
|
325
|
+
validatedPhases.require_slice_discussion = v;
|
|
326
|
+
}
|
|
327
|
+
if (p.mid_execution_escalation !== undefined)
|
|
328
|
+
assignBool("mid_execution_escalation", p.mid_execution_escalation);
|
|
329
|
+
if (p.progressive_planning !== undefined)
|
|
330
|
+
assignBool("progressive_planning", p.progressive_planning);
|
|
303
331
|
// Warn on unknown phase keys
|
|
304
|
-
const knownPhaseKeys = new Set(["skip_research", "skip_reassess", "skip_slice_research", "skip_milestone_validation", "reassess_after_slice", "require_slice_discussion"]);
|
|
332
|
+
const knownPhaseKeys = new Set(["skip_research", "skip_reassess", "skip_slice_research", "skip_milestone_validation", "reassess_after_slice", "require_slice_discussion", "mid_execution_escalation", "progressive_planning"]);
|
|
305
333
|
for (const key of Object.keys(p)) {
|
|
306
334
|
if (!knownPhaseKeys.has(key)) {
|
|
307
335
|
warnings.push(`unknown phases key "${key}" — ignored`);
|
|
@@ -559,6 +587,12 @@ export function validatePreferences(preferences) {
|
|
|
559
587
|
else
|
|
560
588
|
errors.push("dynamic_routing.capability_routing must be a boolean");
|
|
561
589
|
}
|
|
590
|
+
if (dr.allow_flat_rate_providers !== undefined) {
|
|
591
|
+
if (typeof dr.allow_flat_rate_providers === "boolean")
|
|
592
|
+
validDr.allow_flat_rate_providers = dr.allow_flat_rate_providers;
|
|
593
|
+
else
|
|
594
|
+
errors.push("dynamic_routing.allow_flat_rate_providers must be a boolean");
|
|
595
|
+
}
|
|
562
596
|
if (dr.tier_models !== undefined) {
|
|
563
597
|
if (typeof dr.tier_models === "object" && dr.tier_models !== null) {
|
|
564
598
|
const tm = dr.tier_models;
|
|
@@ -31,5 +31,6 @@ You are generating tests for recently completed GSD work.
|
|
|
31
31
|
- Do NOT modify implementation files — only create or update test files
|
|
32
32
|
- Name test files consistently with the project's conventions
|
|
33
33
|
- Keep tests focused and readable
|
|
34
|
+
- Tests must only reference files that are tracked in git. Do NOT import, read, or depend on paths listed in `.gitignore` — in particular GSD-local state such as `.gsd/`, `.planning/`, and `.audits/`. If a test seems to need one of those files, replace it with an inline fixture or a tracked sample; otherwise the test will fail for everyone but the author.
|
|
34
35
|
|
|
35
36
|
{{skillActivation}}
|
|
@@ -59,7 +59,10 @@ Then:
|
|
|
59
59
|
- `followUps` (string) — Follow-up items for future milestones
|
|
60
60
|
- `deviations` (string) — Deviations from the original plan
|
|
61
61
|
11. Update `.gsd/PROJECT.md`: use the `write` tool with `path: ".gsd/PROJECT.md"` and `content` containing the full updated document reflecting milestone completion and current project state. Do NOT use the `edit` tool for this — PROJECT.md is a full-document refresh.
|
|
62
|
-
12.
|
|
62
|
+
12. Extract structured learnings from this milestone and persist them to the GSD memory store. Follow the procedure block immediately below — it writes `{{milestoneId}}-LEARNINGS.md` as the audit trail and persists Patterns, Lessons, and Decisions via `capture_thought` (categories: pattern, gotcha/convention, architecture). The memory store is the single source of truth for cross-session durable knowledge (ADR-013).
|
|
63
|
+
|
|
64
|
+
{{extractLearningsSteps}}
|
|
65
|
+
|
|
63
66
|
13. Do not commit manually — the system auto-commits your changes after this unit completes.
|
|
64
67
|
- Say: "Milestone {{milestoneId}} complete."
|
|
65
68
|
|
|
@@ -29,8 +29,8 @@ Then:
|
|
|
29
29
|
6. If this slice produced evidence that a requirement changed status (Active → Validated, Active → Deferred, etc.), call `gsd_requirement_update` with the requirement ID, updated `status`, and `validation` evidence. Do NOT write `.gsd/REQUIREMENTS.md` directly — the engine renders it from the database.
|
|
30
30
|
7. Prepare the slice completion content you will pass to `gsd_complete_slice` using the camelCase fields `milestoneId`, `sliceId`, `sliceTitle`, `oneLiner`, `narrative`, `verification`, and `uatContent`. Do **not** manually write `{{sliceSummaryPath}}`. Do **not** manually write `{{sliceUatPath}}` — the DB-backed tool is the canonical write path for both artifacts.
|
|
31
31
|
8. Draft the UAT content you will pass as `uatContent` — a concrete UAT script with real test cases derived from the slice plan and task summaries. Include preconditions, numbered steps with expected outcomes, and edge cases. This must NOT be a placeholder or generic template — tailor every test case to what this slice actually built.
|
|
32
|
-
9. Review task summaries for `key_decisions`.
|
|
33
|
-
10. Review task summaries for patterns, gotchas, or non-obvious lessons learned.
|
|
32
|
+
9. Review task summaries for `key_decisions`. For each significant decision, call `capture_thought` with `category: "architecture"` (or `"pattern"`) and a `structuredFields` payload of `{ scope, decision, choice, rationale, made_by: "agent", revisable }`.
|
|
33
|
+
10. Review task summaries for patterns, gotchas, or non-obvious lessons learned. For each one that would save future agents from repeating investigation, call `capture_thought` with the matching category (`gotcha`, `convention`, `pattern`, `environment`). The memory store is the single source of truth (ADR-013); do not append to `.gsd/DECISIONS.md` or `.gsd/KNOWLEDGE.md` directly.
|
|
34
34
|
11. Call `gsd_complete_slice` with the camelCase fields `milestoneId`, `sliceId`, `sliceTitle`, `oneLiner`, `narrative`, `verification`, and `uatContent`, plus any optional enrichment fields you have. Do NOT manually mark the roadmap checkbox — the tool writes to the DB, renders `{{sliceSummaryPath}}` and `{{sliceUatPath}}`, and updates the ROADMAP.md projection automatically.
|
|
35
35
|
12. Do not run git commands — the system commits your changes and handles any merge after this unit succeeds.
|
|
36
36
|
13. Update `.gsd/PROJECT.md` if it exists — refresh current state if needed: use the `write` tool with `path: ".gsd/PROJECT.md"` and `content` containing the full updated document reflecting current project state. Do NOT use the `edit` tool for this — PROJECT.md is a full-document refresh.
|
|
@@ -18,8 +18,10 @@ Goal semantics:
|
|
|
18
18
|
## Instructions
|
|
19
19
|
|
|
20
20
|
1. Read `.gsd/debug/sessions/{{slug}}.json` for any prior session context.
|
|
21
|
+
1a. Call `memory_query` with keywords from the issue (error text, subsystem, file paths). A prior session may have captured this exact gotcha — finding it now saves the investigation.
|
|
21
22
|
2. Investigate the reported issue in `{{workingDirectory}}`.
|
|
22
23
|
3. Follow the goal constraint above strictly.
|
|
23
24
|
4. When complete, surface a clear summary: what failed, why, and what was done (or what a fix would require for root-cause-only mode).
|
|
25
|
+
5. Once root cause is identified, call `capture_thought` with `category: "gotcha"` so future debug sessions can find it via `memory_query`. Keep the content to 1–3 sentences — the symptom, the root cause, and the fix or guard.
|
|
24
26
|
|
|
25
27
|
{{skillActivation}}
|