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
|
@@ -0,0 +1,153 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* session-start-footer.test.ts
|
|
3
|
+
*
|
|
4
|
+
* Verifies that register-hooks.ts suppresses the built-in footer by calling
|
|
5
|
+
* ctx.ui.setFooter(hideFooter) in both session_start and session_switch when
|
|
6
|
+
* isAutoActive() is true.
|
|
7
|
+
*
|
|
8
|
+
* Testing strategy:
|
|
9
|
+
* Two layers:
|
|
10
|
+
* 1. Source-code regression guard: ensures the guard and setFooter call are
|
|
11
|
+
* structurally present in register-hooks.ts for both event handlers.
|
|
12
|
+
* (node:test does not support mock.module without --experimental-test-module-mocks,
|
|
13
|
+
* so structural analysis is the correct approach here.)
|
|
14
|
+
* 2. Behavioral integration test: fires the live session_start handler with a
|
|
15
|
+
* fake ctx when isAutoActive() is false (its default at test time) and
|
|
16
|
+
* confirms setFooter is NOT called — verifying the guard is conditional.
|
|
17
|
+
*
|
|
18
|
+
* Relates to #4314.
|
|
19
|
+
*/
|
|
20
|
+
|
|
21
|
+
import test from "node:test";
|
|
22
|
+
import assert from "node:assert/strict";
|
|
23
|
+
import { mkdirSync, readFileSync, rmSync } from "node:fs";
|
|
24
|
+
import { join, dirname } from "node:path";
|
|
25
|
+
import { tmpdir } from "node:os";
|
|
26
|
+
import { fileURLToPath } from "node:url";
|
|
27
|
+
|
|
28
|
+
import { registerHooks } from "../bootstrap/register-hooks.ts";
|
|
29
|
+
|
|
30
|
+
const __dirname = dirname(fileURLToPath(import.meta.url));
|
|
31
|
+
const HOOKS_SOURCE = readFileSync(
|
|
32
|
+
join(__dirname, "..", "bootstrap", "register-hooks.ts"),
|
|
33
|
+
"utf-8",
|
|
34
|
+
);
|
|
35
|
+
|
|
36
|
+
// ─── Source-code regression guards ──────────────────────────────────────────
|
|
37
|
+
|
|
38
|
+
test("register-hooks.ts imports hideFooter from auto-dashboard", () => {
|
|
39
|
+
assert.ok(
|
|
40
|
+
HOOKS_SOURCE.includes('import { hideFooter } from "../auto-dashboard.js"') ||
|
|
41
|
+
HOOKS_SOURCE.includes("import { hideFooter } from '../auto-dashboard.js'"),
|
|
42
|
+
"register-hooks.ts must import hideFooter from auto-dashboard.js",
|
|
43
|
+
);
|
|
44
|
+
});
|
|
45
|
+
|
|
46
|
+
test("session_start handler calls ctx.ui.setFooter(hideFooter) when isAutoActive()", () => {
|
|
47
|
+
// Locate the session_start handler body (up to the next pi.on call)
|
|
48
|
+
const sessionStartIdx = HOOKS_SOURCE.indexOf('"session_start"');
|
|
49
|
+
assert.ok(sessionStartIdx > -1, "session_start handler must exist");
|
|
50
|
+
|
|
51
|
+
const sessionSwitchIdx = HOOKS_SOURCE.indexOf('"session_switch"');
|
|
52
|
+
assert.ok(sessionSwitchIdx > sessionStartIdx, "session_switch handler must follow session_start");
|
|
53
|
+
|
|
54
|
+
const sessionStartBody = HOOKS_SOURCE.slice(sessionStartIdx, sessionSwitchIdx);
|
|
55
|
+
|
|
56
|
+
assert.ok(
|
|
57
|
+
sessionStartBody.includes("isAutoActive()"),
|
|
58
|
+
"session_start handler must call isAutoActive()",
|
|
59
|
+
);
|
|
60
|
+
assert.ok(
|
|
61
|
+
sessionStartBody.includes("ctx.ui.setFooter(hideFooter)"),
|
|
62
|
+
"session_start handler must call ctx.ui.setFooter(hideFooter)",
|
|
63
|
+
);
|
|
64
|
+
|
|
65
|
+
// Guard must wrap the setFooter call
|
|
66
|
+
const guardIdx = sessionStartBody.indexOf("isAutoActive()");
|
|
67
|
+
const setFooterIdx = sessionStartBody.indexOf("ctx.ui.setFooter(hideFooter)");
|
|
68
|
+
assert.ok(
|
|
69
|
+
guardIdx < setFooterIdx,
|
|
70
|
+
"isAutoActive() guard must appear before ctx.ui.setFooter(hideFooter) in session_start",
|
|
71
|
+
);
|
|
72
|
+
});
|
|
73
|
+
|
|
74
|
+
test("session_switch handler calls ctx.ui.setFooter(hideFooter) when isAutoActive()", () => {
|
|
75
|
+
const sessionSwitchIdx = HOOKS_SOURCE.indexOf('"session_switch"');
|
|
76
|
+
assert.ok(sessionSwitchIdx > -1, "session_switch handler must exist");
|
|
77
|
+
|
|
78
|
+
const beforeAgentStartIdx = HOOKS_SOURCE.indexOf('"before_agent_start"');
|
|
79
|
+
assert.ok(beforeAgentStartIdx > sessionSwitchIdx, "before_agent_start handler must follow session_switch");
|
|
80
|
+
|
|
81
|
+
const sessionSwitchBody = HOOKS_SOURCE.slice(sessionSwitchIdx, beforeAgentStartIdx);
|
|
82
|
+
|
|
83
|
+
assert.ok(
|
|
84
|
+
sessionSwitchBody.includes("isAutoActive()"),
|
|
85
|
+
"session_switch handler must call isAutoActive()",
|
|
86
|
+
);
|
|
87
|
+
assert.ok(
|
|
88
|
+
sessionSwitchBody.includes("ctx.ui.setFooter(hideFooter)"),
|
|
89
|
+
"session_switch handler must call ctx.ui.setFooter(hideFooter)",
|
|
90
|
+
);
|
|
91
|
+
|
|
92
|
+
const guardIdx = sessionSwitchBody.indexOf("isAutoActive()");
|
|
93
|
+
const setFooterIdx = sessionSwitchBody.indexOf("ctx.ui.setFooter(hideFooter)");
|
|
94
|
+
assert.ok(
|
|
95
|
+
guardIdx < setFooterIdx,
|
|
96
|
+
"isAutoActive() guard must appear before ctx.ui.setFooter(hideFooter) in session_switch",
|
|
97
|
+
);
|
|
98
|
+
});
|
|
99
|
+
|
|
100
|
+
// ─── Behavioral test: setFooter NOT called when auto-mode is inactive ────────
|
|
101
|
+
|
|
102
|
+
test("session_start does NOT call setFooter when isAutoActive() is false (default)", async (t) => {
|
|
103
|
+
const dir = join(
|
|
104
|
+
tmpdir(),
|
|
105
|
+
`gsd-footer-test-${Date.now()}-${Math.random().toString(36).slice(2, 8)}`,
|
|
106
|
+
);
|
|
107
|
+
mkdirSync(dir, { recursive: true });
|
|
108
|
+
|
|
109
|
+
const originalCwd = process.cwd();
|
|
110
|
+
process.chdir(dir);
|
|
111
|
+
t.after(() => {
|
|
112
|
+
process.chdir(originalCwd);
|
|
113
|
+
try { rmSync(dir, { recursive: true, force: true }); } catch { /* best-effort */ }
|
|
114
|
+
});
|
|
115
|
+
|
|
116
|
+
let setFooterCallCount = 0;
|
|
117
|
+
|
|
118
|
+
const handlers = new Map<string, (event: unknown, ctx: any) => Promise<void> | void>();
|
|
119
|
+
const pi = {
|
|
120
|
+
on(event: string, handler: (event: unknown, ctx: any) => Promise<void> | void) {
|
|
121
|
+
handlers.set(event, handler);
|
|
122
|
+
},
|
|
123
|
+
} as any;
|
|
124
|
+
|
|
125
|
+
registerHooks(pi, []);
|
|
126
|
+
|
|
127
|
+
const sessionStart = handlers.get("session_start");
|
|
128
|
+
assert.ok(sessionStart, "session_start handler must be registered");
|
|
129
|
+
|
|
130
|
+
await sessionStart!({}, {
|
|
131
|
+
hasUI: true,
|
|
132
|
+
ui: {
|
|
133
|
+
notify: () => {},
|
|
134
|
+
setStatus: () => {},
|
|
135
|
+
setFooter: (_footer: unknown) => {
|
|
136
|
+
setFooterCallCount++;
|
|
137
|
+
},
|
|
138
|
+
setWorkingMessage: () => {},
|
|
139
|
+
onTerminalInput: () => () => {},
|
|
140
|
+
setWidget: () => {},
|
|
141
|
+
},
|
|
142
|
+
sessionManager: { getSessionId: () => null },
|
|
143
|
+
model: null,
|
|
144
|
+
} as any);
|
|
145
|
+
|
|
146
|
+
// isAutoActive() is false at test time (no auto session started),
|
|
147
|
+
// so setFooter must not be called.
|
|
148
|
+
assert.equal(
|
|
149
|
+
setFooterCallCount,
|
|
150
|
+
0,
|
|
151
|
+
"setFooter must NOT be called when isAutoActive() returns false",
|
|
152
|
+
);
|
|
153
|
+
});
|
|
@@ -0,0 +1,125 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Regression test for #4375: gsd_skip_slice must cascade "skipped" status to
|
|
3
|
+
* all non-closed tasks in the slice.
|
|
4
|
+
*
|
|
5
|
+
* Without the cascade, executeCompleteMilestone's deep-task check finds
|
|
6
|
+
* pending tasks inside a skipped slice and refuses to complete the milestone,
|
|
7
|
+
* causing auto-mode to loop on complete-milestone until stuck-recovery aborts.
|
|
8
|
+
*/
|
|
9
|
+
|
|
10
|
+
import { describe, test, beforeEach, afterEach } from "node:test";
|
|
11
|
+
import assert from "node:assert/strict";
|
|
12
|
+
import { mkdtempSync, rmSync } from "node:fs";
|
|
13
|
+
import { join } from "node:path";
|
|
14
|
+
import { tmpdir } from "node:os";
|
|
15
|
+
|
|
16
|
+
import {
|
|
17
|
+
openDatabase,
|
|
18
|
+
closeDatabase,
|
|
19
|
+
insertMilestone,
|
|
20
|
+
insertSlice,
|
|
21
|
+
insertTask,
|
|
22
|
+
getSlice,
|
|
23
|
+
getSliceTasks,
|
|
24
|
+
updateSliceStatus,
|
|
25
|
+
updateTaskStatus,
|
|
26
|
+
} from "../gsd-db.ts";
|
|
27
|
+
import { handleSkipSlice } from "../tools/skip-slice.ts";
|
|
28
|
+
|
|
29
|
+
describe("handleSkipSlice cascades skip to tasks (#4375)", () => {
|
|
30
|
+
let dir: string;
|
|
31
|
+
let dbPath: string;
|
|
32
|
+
|
|
33
|
+
beforeEach(() => {
|
|
34
|
+
dir = mkdtempSync(join(tmpdir(), "gsd-skip-cascade-"));
|
|
35
|
+
dbPath = join(dir, "test.db");
|
|
36
|
+
openDatabase(dbPath);
|
|
37
|
+
insertMilestone({ id: "M001", title: "Test", status: "active" });
|
|
38
|
+
insertSlice({ milestoneId: "M001", id: "S03", title: "Deferred", status: "pending", sequence: 3 });
|
|
39
|
+
insertTask({ milestoneId: "M001", sliceId: "S03", id: "T01", title: "task 1", status: "pending", sequence: 1 });
|
|
40
|
+
insertTask({ milestoneId: "M001", sliceId: "S03", id: "T02", title: "task 2", status: "active", sequence: 2 });
|
|
41
|
+
insertTask({ milestoneId: "M001", sliceId: "S03", id: "T03", title: "task 3", status: "pending", sequence: 3 });
|
|
42
|
+
});
|
|
43
|
+
|
|
44
|
+
afterEach(() => {
|
|
45
|
+
closeDatabase();
|
|
46
|
+
rmSync(dir, { recursive: true, force: true });
|
|
47
|
+
});
|
|
48
|
+
|
|
49
|
+
test("sets slice to skipped and cascades pending/active tasks to skipped", () => {
|
|
50
|
+
const result = handleSkipSlice({ milestoneId: "M001", sliceId: "S03", reason: "deferred" });
|
|
51
|
+
|
|
52
|
+
assert.equal(result.error, undefined, `expected success, got error: ${result.error ?? ""}`);
|
|
53
|
+
assert.equal(result.sliceId, "S03");
|
|
54
|
+
assert.equal(result.milestoneId, "M001");
|
|
55
|
+
assert.equal(result.tasksSkipped, 3, "all three non-closed tasks should be cascaded");
|
|
56
|
+
|
|
57
|
+
const slice = getSlice("M001", "S03");
|
|
58
|
+
assert.equal(slice?.status, "skipped", "slice status must be skipped");
|
|
59
|
+
|
|
60
|
+
const tasks = getSliceTasks("M001", "S03");
|
|
61
|
+
for (const t of tasks) {
|
|
62
|
+
assert.equal(t.status, "skipped", `task ${t.id} must be skipped after cascade`);
|
|
63
|
+
}
|
|
64
|
+
});
|
|
65
|
+
|
|
66
|
+
test("does not downgrade already-closed tasks", () => {
|
|
67
|
+
updateTaskStatus("M001", "S03", "T01", "complete", new Date().toISOString());
|
|
68
|
+
|
|
69
|
+
const result = handleSkipSlice({ milestoneId: "M001", sliceId: "S03" });
|
|
70
|
+
|
|
71
|
+
assert.equal(result.error, undefined);
|
|
72
|
+
assert.equal(result.tasksSkipped, 2, "only the two non-closed tasks should be cascaded");
|
|
73
|
+
|
|
74
|
+
const tasks = getSliceTasks("M001", "S03");
|
|
75
|
+
const byId = new Map(tasks.map((t) => [t.id, t.status]));
|
|
76
|
+
assert.equal(byId.get("T01"), "complete", "completed task must not be downgraded");
|
|
77
|
+
assert.equal(byId.get("T02"), "skipped");
|
|
78
|
+
assert.equal(byId.get("T03"), "skipped");
|
|
79
|
+
});
|
|
80
|
+
|
|
81
|
+
test("re-running skip on an already-skipped slice heals leftover pending tasks (#4375 recovery)", () => {
|
|
82
|
+
const first = handleSkipSlice({ milestoneId: "M001", sliceId: "S03" });
|
|
83
|
+
assert.equal(first.error, undefined);
|
|
84
|
+
assert.equal(first.tasksSkipped, 3);
|
|
85
|
+
|
|
86
|
+
// Simulate historical inconsistent state: slice skipped but a task was
|
|
87
|
+
// later recreated or reset to pending by some migration/bug path.
|
|
88
|
+
updateTaskStatus("M001", "S03", "T01", "pending");
|
|
89
|
+
|
|
90
|
+
const second = handleSkipSlice({ milestoneId: "M001", sliceId: "S03" });
|
|
91
|
+
assert.equal(second.error, undefined, "re-running must succeed (no 'already skipped' hard error)");
|
|
92
|
+
assert.equal(second.tasksSkipped, 1, "only the leftover pending task should be cascaded");
|
|
93
|
+
assert.equal(second.wasAlreadySkipped, true);
|
|
94
|
+
|
|
95
|
+
const tasks = getSliceTasks("M001", "S03");
|
|
96
|
+
for (const t of tasks) {
|
|
97
|
+
assert.equal(t.status, "skipped", `task ${t.id} must be skipped after recovery`);
|
|
98
|
+
}
|
|
99
|
+
});
|
|
100
|
+
|
|
101
|
+
test("refuses to skip an already-complete slice", () => {
|
|
102
|
+
updateSliceStatus("M001", "S03", "complete");
|
|
103
|
+
|
|
104
|
+
const result = handleSkipSlice({ milestoneId: "M001", sliceId: "S03" });
|
|
105
|
+
assert.ok(result.error, "expected error when slice is already complete");
|
|
106
|
+
assert.match(result.error!, /already complete/i);
|
|
107
|
+
assert.equal(result.errorCode, "already_complete");
|
|
108
|
+
});
|
|
109
|
+
|
|
110
|
+
test("refuses to skip a slice in the legacy 'done' status", () => {
|
|
111
|
+
updateSliceStatus("M001", "S03", "done");
|
|
112
|
+
|
|
113
|
+
const result = handleSkipSlice({ milestoneId: "M001", sliceId: "S03" });
|
|
114
|
+
assert.ok(result.error, "expected error when slice is already done");
|
|
115
|
+
assert.match(result.error!, /already complete/i);
|
|
116
|
+
assert.equal(result.errorCode, "already_complete");
|
|
117
|
+
});
|
|
118
|
+
|
|
119
|
+
test("returns error for unknown slice", () => {
|
|
120
|
+
const result = handleSkipSlice({ milestoneId: "M001", sliceId: "S99" });
|
|
121
|
+
assert.ok(result.error);
|
|
122
|
+
assert.match(result.error!, /not found/i);
|
|
123
|
+
assert.equal(result.errorCode, "slice_not_found");
|
|
124
|
+
});
|
|
125
|
+
});
|
|
@@ -31,18 +31,30 @@ describe("slice CONTEXT.md injection into prompt builders (#3452)", () => {
|
|
|
31
31
|
const fnStart = source.indexOf(`export async function ${builder}`);
|
|
32
32
|
assert.ok(fnStart !== -1, `${builder} should exist in auto-prompts.ts`);
|
|
33
33
|
|
|
34
|
-
// Get a reasonable chunk after the function start
|
|
34
|
+
// Get a reasonable chunk after the function start
|
|
35
35
|
const chunk = source.slice(fnStart, fnStart + 3000);
|
|
36
36
|
|
|
37
|
+
// ADR-011: buildPlanSlicePrompt / buildRefineSlicePrompt now delegate to
|
|
38
|
+
// a shared helper (renderSlicePrompt) that performs the slice CONTEXT
|
|
39
|
+
// resolve. When a builder delegates, scan the helper's body instead.
|
|
40
|
+
const delegatesToHelper = chunk.includes("renderSlicePrompt(");
|
|
41
|
+
const bodyToCheck = delegatesToHelper
|
|
42
|
+
? (() => {
|
|
43
|
+
const helperStart = source.indexOf("async function renderSlicePrompt");
|
|
44
|
+
assert.ok(helperStart !== -1, "renderSlicePrompt helper must exist");
|
|
45
|
+
return source.slice(helperStart, helperStart + 3000);
|
|
46
|
+
})()
|
|
47
|
+
: chunk;
|
|
48
|
+
|
|
37
49
|
// Must resolve the slice CONTEXT path
|
|
38
50
|
assert.ok(
|
|
39
|
-
|
|
40
|
-
`${builder} should call resolveSliceFile with "CONTEXT"`,
|
|
51
|
+
bodyToCheck.includes('resolveSliceFile(base, mid,') && bodyToCheck.includes('"CONTEXT"'),
|
|
52
|
+
`${builder} should call resolveSliceFile with "CONTEXT" (directly or via renderSlicePrompt)`,
|
|
41
53
|
);
|
|
42
54
|
|
|
43
55
|
// Must inline it with inlineFileOptional
|
|
44
56
|
assert.ok(
|
|
45
|
-
|
|
57
|
+
bodyToCheck.includes("Slice Context"),
|
|
46
58
|
`${builder} should inline slice CONTEXT with a "Slice Context" label`,
|
|
47
59
|
);
|
|
48
60
|
});
|
|
@@ -21,6 +21,8 @@ import {
|
|
|
21
21
|
existsSync,
|
|
22
22
|
readFileSync,
|
|
23
23
|
realpathSync,
|
|
24
|
+
symlinkSync,
|
|
25
|
+
lstatSync,
|
|
24
26
|
} from "node:fs";
|
|
25
27
|
import { join } from "node:path";
|
|
26
28
|
import { tmpdir } from "node:os";
|
|
@@ -76,6 +78,20 @@ function createTempRepo(): string {
|
|
|
76
78
|
return dir;
|
|
77
79
|
}
|
|
78
80
|
|
|
81
|
+
function createTempRepoWithSymlinkedGsd(): { repo: string; stateDir: string } {
|
|
82
|
+
const repo = realpathSync(mkdtempSync(join(tmpdir(), "wt-symlink-stash-test-")));
|
|
83
|
+
const stateDir = realpathSync(mkdtempSync(join(tmpdir(), "wt-symlink-state-")));
|
|
84
|
+
run("git init", repo);
|
|
85
|
+
run("git config user.email test@test.com", repo);
|
|
86
|
+
run("git config user.name Test", repo);
|
|
87
|
+
writeFileSync(join(repo, "README.md"), "# test\n");
|
|
88
|
+
symlinkSync(stateDir, join(repo, ".gsd"));
|
|
89
|
+
run("git add README.md", repo);
|
|
90
|
+
run("git commit -m init", repo);
|
|
91
|
+
run("git branch -M main", repo);
|
|
92
|
+
return { repo, stateDir };
|
|
93
|
+
}
|
|
94
|
+
|
|
79
95
|
function makeRoadmap(
|
|
80
96
|
milestoneId: string,
|
|
81
97
|
title: string,
|
|
@@ -259,6 +275,44 @@ test("#2505: mergeMilestoneToMain preserves queued CONTEXT files (not swept into
|
|
|
259
275
|
}
|
|
260
276
|
});
|
|
261
277
|
|
|
278
|
+
test("#2505: pre-merge stash handles symlinked .gsd without traversing it", () => {
|
|
279
|
+
const { repo, stateDir } = createTempRepoWithSymlinkedGsd();
|
|
280
|
+
try {
|
|
281
|
+
const wtPath = createAutoWorktree(repo, "M016");
|
|
282
|
+
const normalizedPath = wtPath.replaceAll("\\", "/");
|
|
283
|
+
const worktreeName = normalizedPath.split("/").pop() || "M016";
|
|
284
|
+
const sliceBranch = `slice/${worktreeName}/S01`;
|
|
285
|
+
run(`git checkout -b "${sliceBranch}"`, wtPath);
|
|
286
|
+
writeFileSync(join(wtPath, "app.ts"), "export const app = true;\n");
|
|
287
|
+
run("git add app.ts", wtPath);
|
|
288
|
+
run('git commit -m "add app feature"', wtPath);
|
|
289
|
+
run("git checkout milestone/M016", wtPath);
|
|
290
|
+
run(`git merge --no-ff "${sliceBranch}" -m "merge S01"`, wtPath);
|
|
291
|
+
|
|
292
|
+
const queuedDir = join(stateDir, "milestones", "M017");
|
|
293
|
+
mkdirSync(queuedDir, { recursive: true });
|
|
294
|
+
writeFileSync(join(queuedDir, "M017-CONTEXT.md"), "# M017: Queued\n");
|
|
295
|
+
|
|
296
|
+
// Trigger the pre-merge stash with both tracked and untracked project files.
|
|
297
|
+
writeFileSync(join(repo, "README.md"), "# test\n\nDirty change.\n");
|
|
298
|
+
writeFileSync(join(repo, "local-note.txt"), "local scratch\n");
|
|
299
|
+
|
|
300
|
+
const result = mergeMilestoneToMain(repo, "M016", makeRoadmap("M016", "App Feature", [
|
|
301
|
+
{ id: "S01", title: "Feature" },
|
|
302
|
+
]));
|
|
303
|
+
|
|
304
|
+
assert.ok(result.commitMessage.includes("GSD-Milestone: M016"), "merge should succeed");
|
|
305
|
+
assert.ok(existsSync(join(repo, "app.ts")), "milestone code merged to main");
|
|
306
|
+
assert.equal(lstatSync(join(repo, ".gsd")).isSymbolicLink(), true, ".gsd symlink remains in place");
|
|
307
|
+
assert.ok(existsSync(join(queuedDir, "M017-CONTEXT.md")), "queued context remains in external state");
|
|
308
|
+
assert.equal(readFileSync(join(repo, "README.md"), "utf-8").replace(/\r\n/g, "\n"), "# test\n\nDirty change.\n");
|
|
309
|
+
assert.equal(readFileSync(join(repo, "local-note.txt"), "utf-8"), "local scratch\n");
|
|
310
|
+
} finally {
|
|
311
|
+
rmSync(repo, { recursive: true, force: true });
|
|
312
|
+
rmSync(stateDir, { recursive: true, force: true });
|
|
313
|
+
}
|
|
314
|
+
});
|
|
315
|
+
|
|
262
316
|
test("#2505: back-to-back merges preserve queued CONTEXT files", () => {
|
|
263
317
|
const repo = createTempRepo();
|
|
264
318
|
try {
|
|
@@ -93,6 +93,8 @@ function makeSliceRow(id: string, overrides: Partial<SliceRow> = {}): SliceRow {
|
|
|
93
93
|
integration_closure: "",
|
|
94
94
|
observability_impact: "",
|
|
95
95
|
replan_triggered_at: null,
|
|
96
|
+
is_sketch: 0,
|
|
97
|
+
sketch_scope: "",
|
|
96
98
|
...overrides,
|
|
97
99
|
};
|
|
98
100
|
}
|
|
@@ -295,6 +297,7 @@ describe("#2945 Bug 3: mergeAndExit must teardown worktree after successful merg
|
|
|
295
297
|
loadEffectiveGSDPreferences: () => undefined,
|
|
296
298
|
invalidateAllCaches: () => {},
|
|
297
299
|
captureIntegrationBranch: () => {},
|
|
300
|
+
enterBranchModeForMilestone: () => {},
|
|
298
301
|
};
|
|
299
302
|
|
|
300
303
|
// Import and create resolver
|
|
@@ -50,6 +50,11 @@ const taskRow: TaskRow = {
|
|
|
50
50
|
observability_impact: "",
|
|
51
51
|
full_plan_md: "",
|
|
52
52
|
sequence: 1,
|
|
53
|
+
blocker_source: "",
|
|
54
|
+
escalation_pending: 0,
|
|
55
|
+
escalation_awaiting_review: 0,
|
|
56
|
+
escalation_artifact_path: null,
|
|
57
|
+
escalation_override_applied_at: null,
|
|
53
58
|
};
|
|
54
59
|
|
|
55
60
|
const verificationEvidence = [
|
|
@@ -64,8 +64,9 @@ test("uok contracts include required DAG node kinds", () => {
|
|
|
64
64
|
"team-worker",
|
|
65
65
|
"verification",
|
|
66
66
|
"reprocess",
|
|
67
|
+
"refine",
|
|
67
68
|
];
|
|
68
|
-
assert.deepEqual(required.length,
|
|
69
|
+
assert.deepEqual(required.length, 7);
|
|
69
70
|
});
|
|
70
71
|
|
|
71
72
|
test("uok audit envelope includes trace/turn/causality fields", () => {
|
|
@@ -13,7 +13,7 @@ test("uok flags default to enabled when preference is unset", () => {
|
|
|
13
13
|
assert.equal(flags.gitops, true);
|
|
14
14
|
assert.equal(flags.auditUnified, true);
|
|
15
15
|
assert.equal(flags.planV2, true);
|
|
16
|
-
assert.equal(flags.gitopsTurnAction, "
|
|
16
|
+
assert.equal(flags.gitopsTurnAction, "commit");
|
|
17
17
|
assert.equal(flags.gitopsTurnPush, false);
|
|
18
18
|
});
|
|
19
19
|
|
|
@@ -177,16 +177,22 @@ test("deriveState returns completing-milestone when VALIDATION exists with termi
|
|
|
177
177
|
}
|
|
178
178
|
});
|
|
179
179
|
|
|
180
|
-
test("deriveState
|
|
180
|
+
test("deriveState returns blocked when needs-remediation has no incomplete slices (#4506)", async () => {
|
|
181
181
|
const base = makeTmpBase();
|
|
182
182
|
try {
|
|
183
183
|
writeRoadmap(base, "M001", ALL_DONE_ROADMAP);
|
|
184
184
|
writeValidation(base, "M001", "---\nverdict: needs-remediation\nremediation_round: 0\n---\n\n# Validation\nNeeds fixes.");
|
|
185
185
|
|
|
186
186
|
const state = await deriveState(base);
|
|
187
|
-
// needs-remediation
|
|
188
|
-
|
|
187
|
+
// All slices done + needs-remediation → blocked (prevents infinite
|
|
188
|
+
// validate-milestone dispatch loop). Previously returned
|
|
189
|
+
// validating-milestone, which caused #4506.
|
|
190
|
+
assert.equal(state.phase, "blocked");
|
|
189
191
|
assert.equal(state.activeMilestone?.id, "M001");
|
|
192
|
+
assert.ok(
|
|
193
|
+
state.blockers.some(b => b.includes("needs-remediation") && b.includes("M001")),
|
|
194
|
+
"blocker message should mention milestone and verdict",
|
|
195
|
+
);
|
|
190
196
|
} finally {
|
|
191
197
|
cleanup(base);
|
|
192
198
|
}
|
|
@@ -997,3 +997,38 @@ test("dependency-audit: subdirectory package.json does not trigger audit", () =>
|
|
|
997
997
|
assert.equal(npmAuditCalled, false, "subdirectory dependency files should not trigger audit");
|
|
998
998
|
assert.deepStrictEqual(result, []);
|
|
999
999
|
});
|
|
1000
|
+
|
|
1001
|
+
// ─── Python normalization (regression: #4416) ────────────────────────────────
|
|
1002
|
+
// Verification commands using python3/python must succeed even when only the
|
|
1003
|
+
// alternate interpreter name is available. The gate rewrites the command via
|
|
1004
|
+
// normalizePythonCommand before spawning — tested here end-to-end on this host.
|
|
1005
|
+
|
|
1006
|
+
describe("verification-gate: python normalization (#4416)", () => {
|
|
1007
|
+
let tmp: string;
|
|
1008
|
+
beforeEach(() => { tmp = makeTempDir("vg-python"); });
|
|
1009
|
+
afterEach(() => { rmSync(tmp, { recursive: true, force: true }); });
|
|
1010
|
+
|
|
1011
|
+
test("python3 --version command succeeds on this host (gate uses normalized invocation)", () => {
|
|
1012
|
+
// This test verifies that runVerificationGate can execute a python command
|
|
1013
|
+
// without hard-failing due to interpreter name mismatch. On hosts where
|
|
1014
|
+
// python3 is available it runs directly; on hosts where only python or py
|
|
1015
|
+
// exists, normalizePythonCommand rewrites the token before spawnSync.
|
|
1016
|
+
const result = runVerificationGate({
|
|
1017
|
+
cwd: tmp,
|
|
1018
|
+
preferenceCommands: ["python3 --version"],
|
|
1019
|
+
});
|
|
1020
|
+
assert.equal(typeof result.passed, "boolean");
|
|
1021
|
+
assert.equal(result.checks.length, 1);
|
|
1022
|
+
assert.ok(result.checks[0].durationMs >= 0);
|
|
1023
|
+
});
|
|
1024
|
+
|
|
1025
|
+
test("python --version command produces a VerificationResult (not a crash)", () => {
|
|
1026
|
+
const result = runVerificationGate({
|
|
1027
|
+
cwd: tmp,
|
|
1028
|
+
preferenceCommands: ["python --version"],
|
|
1029
|
+
});
|
|
1030
|
+
assert.equal(typeof result.passed, "boolean");
|
|
1031
|
+
assert.equal(result.checks.length, 1);
|
|
1032
|
+
assert.ok(result.checks[0].durationMs >= 0);
|
|
1033
|
+
});
|
|
1034
|
+
});
|
|
@@ -28,6 +28,8 @@ function makeSlice(overrides: Partial<SliceRow> = {}): SliceRow {
|
|
|
28
28
|
completed_at: null,
|
|
29
29
|
sequence: 1,
|
|
30
30
|
replan_triggered_at: null,
|
|
31
|
+
is_sketch: 0,
|
|
32
|
+
sketch_scope: '',
|
|
31
33
|
...overrides,
|
|
32
34
|
};
|
|
33
35
|
}
|
|
@@ -59,6 +61,11 @@ function makeTask(overrides: Partial<TaskRow> = {}): TaskRow {
|
|
|
59
61
|
expected_output: [],
|
|
60
62
|
observability_impact: '',
|
|
61
63
|
sequence: 1,
|
|
64
|
+
blocker_source: '',
|
|
65
|
+
escalation_pending: 0,
|
|
66
|
+
escalation_awaiting_review: 0,
|
|
67
|
+
escalation_artifact_path: null,
|
|
68
|
+
escalation_override_applied_at: null,
|
|
62
69
|
...overrides,
|
|
63
70
|
};
|
|
64
71
|
}
|
|
@@ -11,6 +11,7 @@ import {
|
|
|
11
11
|
_getAdapter,
|
|
12
12
|
insertGateRow,
|
|
13
13
|
} from "../gsd-db.ts";
|
|
14
|
+
import { markDepthVerified, clearDiscussionFlowState } from "../bootstrap/write-gate.ts";
|
|
14
15
|
import {
|
|
15
16
|
executeCompleteMilestone,
|
|
16
17
|
executePlanMilestone,
|
|
@@ -645,3 +646,99 @@ test("executeReplanSlice rewrites pending tasks and renders replan artifacts", a
|
|
|
645
646
|
cleanup(base);
|
|
646
647
|
}
|
|
647
648
|
});
|
|
649
|
+
|
|
650
|
+
test("executeSummarySave removes sibling CONTEXT-DRAFT when writing milestone CONTEXT (#4442)", async () => {
|
|
651
|
+
const base = makeTmpBase();
|
|
652
|
+
try {
|
|
653
|
+
openTestDb(base);
|
|
654
|
+
markDepthVerified("M001", base);
|
|
655
|
+
|
|
656
|
+
const milestoneDir = join(base, ".gsd", "milestones", "M001");
|
|
657
|
+
mkdirSync(milestoneDir, { recursive: true });
|
|
658
|
+
const draftPath = join(milestoneDir, "M001-CONTEXT-DRAFT.md");
|
|
659
|
+
writeFileSync(draftPath, "# Draft\n\nincremental notes");
|
|
660
|
+
assert.ok(existsSync(draftPath), "precondition: draft exists");
|
|
661
|
+
|
|
662
|
+
const result = await inProjectDir(base, () => executeSummarySave({
|
|
663
|
+
milestone_id: "M001",
|
|
664
|
+
artifact_type: "CONTEXT",
|
|
665
|
+
content: "# Context\n\nfinal discussion output",
|
|
666
|
+
}, base));
|
|
667
|
+
|
|
668
|
+
assert.equal(result.details.operation, "save_summary");
|
|
669
|
+
assert.equal(result.details.artifact_type, "CONTEXT");
|
|
670
|
+
|
|
671
|
+
const contextPath = join(milestoneDir, "M001-CONTEXT.md");
|
|
672
|
+
assert.ok(existsSync(contextPath), "CONTEXT.md should be written");
|
|
673
|
+
assert.equal(
|
|
674
|
+
existsSync(draftPath),
|
|
675
|
+
false,
|
|
676
|
+
"CONTEXT-DRAFT.md should be removed after final CONTEXT.md is written",
|
|
677
|
+
);
|
|
678
|
+
} finally {
|
|
679
|
+
clearDiscussionFlowState();
|
|
680
|
+
closeDatabase();
|
|
681
|
+
cleanup(base);
|
|
682
|
+
}
|
|
683
|
+
});
|
|
684
|
+
|
|
685
|
+
test("executeSummarySave removes sibling CONTEXT-DRAFT when writing slice CONTEXT (#4442)", async () => {
|
|
686
|
+
const base = makeTmpBase();
|
|
687
|
+
try {
|
|
688
|
+
openTestDb(base);
|
|
689
|
+
|
|
690
|
+
const sliceDir = join(base, ".gsd", "milestones", "M001", "slices", "S01");
|
|
691
|
+
mkdirSync(sliceDir, { recursive: true });
|
|
692
|
+
const draftPath = join(sliceDir, "S01-CONTEXT-DRAFT.md");
|
|
693
|
+
writeFileSync(draftPath, "# Slice Draft\n\nincremental slice notes");
|
|
694
|
+
assert.ok(existsSync(draftPath), "precondition: slice draft exists");
|
|
695
|
+
|
|
696
|
+
const result = await inProjectDir(base, () => executeSummarySave({
|
|
697
|
+
milestone_id: "M001",
|
|
698
|
+
slice_id: "S01",
|
|
699
|
+
artifact_type: "CONTEXT",
|
|
700
|
+
content: "# Slice Context\n\nfinal slice output",
|
|
701
|
+
}, base));
|
|
702
|
+
|
|
703
|
+
assert.equal(result.details.operation, "save_summary");
|
|
704
|
+
assert.equal(result.details.artifact_type, "CONTEXT");
|
|
705
|
+
|
|
706
|
+
const contextPath = join(sliceDir, "S01-CONTEXT.md");
|
|
707
|
+
assert.ok(existsSync(contextPath), "slice CONTEXT.md should be written");
|
|
708
|
+
assert.equal(
|
|
709
|
+
existsSync(draftPath),
|
|
710
|
+
false,
|
|
711
|
+
"slice CONTEXT-DRAFT.md should be removed after final CONTEXT.md is written",
|
|
712
|
+
);
|
|
713
|
+
} finally {
|
|
714
|
+
closeDatabase();
|
|
715
|
+
cleanup(base);
|
|
716
|
+
}
|
|
717
|
+
});
|
|
718
|
+
|
|
719
|
+
test("executeSummarySave leaves sibling CONTEXT-DRAFT intact for non-CONTEXT artifacts (#4442)", async () => {
|
|
720
|
+
const base = makeTmpBase();
|
|
721
|
+
try {
|
|
722
|
+
openTestDb(base);
|
|
723
|
+
|
|
724
|
+
const milestoneDir = join(base, ".gsd", "milestones", "M001");
|
|
725
|
+
mkdirSync(milestoneDir, { recursive: true });
|
|
726
|
+
const draftPath = join(milestoneDir, "M001-CONTEXT-DRAFT.md");
|
|
727
|
+
writeFileSync(draftPath, "# Draft\n\nstill in progress");
|
|
728
|
+
|
|
729
|
+
const result = await inProjectDir(base, () => executeSummarySave({
|
|
730
|
+
milestone_id: "M001",
|
|
731
|
+
artifact_type: "RESEARCH",
|
|
732
|
+
content: "# Research\n\nresearch notes",
|
|
733
|
+
}, base));
|
|
734
|
+
|
|
735
|
+
assert.equal(result.details.artifact_type, "RESEARCH");
|
|
736
|
+
assert.ok(
|
|
737
|
+
existsSync(draftPath),
|
|
738
|
+
"CONTEXT-DRAFT.md must survive RESEARCH/SUMMARY/ASSESSMENT writes",
|
|
739
|
+
);
|
|
740
|
+
} finally {
|
|
741
|
+
closeDatabase();
|
|
742
|
+
cleanup(base);
|
|
743
|
+
}
|
|
744
|
+
});
|
|
@@ -49,6 +49,7 @@ function makeDeps(
|
|
|
49
49
|
loadEffectiveGSDPreferences: () => ({ preferences: { git: {} } }),
|
|
50
50
|
invalidateAllCaches: () => {},
|
|
51
51
|
captureIntegrationBranch: () => {},
|
|
52
|
+
enterBranchModeForMilestone: () => {},
|
|
52
53
|
...overrides,
|
|
53
54
|
};
|
|
54
55
|
return deps;
|
|
@@ -127,7 +128,7 @@ describe("worktree journal events", () => {
|
|
|
127
128
|
|
|
128
129
|
test("enterMilestone emits worktree-skip when isolation disabled", () => {
|
|
129
130
|
const s = makeSession({ basePath: tmp, originalBasePath: tmp });
|
|
130
|
-
const deps = makeDeps({ shouldUseWorktreeIsolation: () => false });
|
|
131
|
+
const deps = makeDeps({ shouldUseWorktreeIsolation: () => false, getIsolationMode: () => "none" });
|
|
131
132
|
const resolver = new WorktreeResolver(s, deps);
|
|
132
133
|
|
|
133
134
|
resolver.enterMilestone("M001", makeNotifyCtx());
|