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
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
// execSync calls because git2 credential handling is too complex.
|
|
7
7
|
|
|
8
8
|
import { execSync, execFileSync } from "node:child_process";
|
|
9
|
-
import { existsSync, readFileSync, unlinkSync, rmSync } from "node:fs";
|
|
9
|
+
import { existsSync, readFileSync, unlinkSync, rmSync, writeFileSync } from "node:fs";
|
|
10
10
|
import { join } from "node:path";
|
|
11
11
|
import { GSDError, GSD_GIT_ERROR } from "./errors.js";
|
|
12
12
|
import { GIT_NO_PROMPT_ENV } from "./git-constants.js";
|
|
@@ -706,6 +706,118 @@ function isDotGsdIgnored(basePath: string): boolean {
|
|
|
706
706
|
return false;
|
|
707
707
|
}
|
|
708
708
|
|
|
709
|
+
/**
|
|
710
|
+
* Determine whether the project opts out of GSD-managed `.gitignore` via
|
|
711
|
+
* `git.manage_gitignore: false` in `.gsd/PREFERENCES.md`. Uses a minimal
|
|
712
|
+
* inline parser to avoid importing the full preferences module (which would
|
|
713
|
+
* introduce a circular dependency back into this low-level bridge).
|
|
714
|
+
*
|
|
715
|
+
* Returns true when management is disabled. Any parse failure or missing
|
|
716
|
+
* file returns false (default: GSD may manage `.gitignore`).
|
|
717
|
+
*/
|
|
718
|
+
function isGitignoreManagementDisabled(basePath: string): boolean {
|
|
719
|
+
const prefsPath = join(basePath, ".gsd", "PREFERENCES.md");
|
|
720
|
+
if (!existsSync(prefsPath)) return false;
|
|
721
|
+
try {
|
|
722
|
+
const content = readFileSync(prefsPath, "utf-8");
|
|
723
|
+
// Look for `manage_gitignore: false` under a `git:` block. The preference
|
|
724
|
+
// is indented; a loose regex is sufficient since we only care about the
|
|
725
|
+
// explicit opt-out case.
|
|
726
|
+
return /^\s*manage_gitignore\s*:\s*false\s*$/m.test(content);
|
|
727
|
+
} catch {
|
|
728
|
+
return false;
|
|
729
|
+
}
|
|
730
|
+
}
|
|
731
|
+
|
|
732
|
+
/**
|
|
733
|
+
* Self-heal path for the symlinked-`.gsd` staging failure: append `.gsd` to
|
|
734
|
+
* `.gitignore` so subsequent `git add -A` calls succeed without the symlink
|
|
735
|
+
* pathspec error. Honors the `git.manage_gitignore: false` opt-out.
|
|
736
|
+
*
|
|
737
|
+
* Returns true when `.gitignore` now contains an entry covering `.gsd`
|
|
738
|
+
* (either pre-existing or newly appended). Returns false when the opt-out
|
|
739
|
+
* is set or the write fails.
|
|
740
|
+
*/
|
|
741
|
+
function trySelfHealGsdGitignore(basePath: string): boolean {
|
|
742
|
+
if (isGitignoreManagementDisabled(basePath)) return false;
|
|
743
|
+
|
|
744
|
+
const gitignorePath = join(basePath, ".gitignore");
|
|
745
|
+
try {
|
|
746
|
+
const existing = existsSync(gitignorePath) ? readFileSync(gitignorePath, "utf-8") : "";
|
|
747
|
+
const lines = new Set(
|
|
748
|
+
existing.split("\n").map(l => l.trim()).filter(l => l && !l.startsWith("#")),
|
|
749
|
+
);
|
|
750
|
+
if (lines.has(".gsd") || lines.has(".gsd/")) return true;
|
|
751
|
+
|
|
752
|
+
const prefix = existing.length > 0 && !existing.endsWith("\n") ? "\n" : "";
|
|
753
|
+
const block = `${prefix}\n# ── GSD self-heal: .gsd is a symlink to external state ──\n.gsd\n`;
|
|
754
|
+
writeFileSync(gitignorePath, existing + block, "utf-8");
|
|
755
|
+
return true;
|
|
756
|
+
} catch {
|
|
757
|
+
return false;
|
|
758
|
+
}
|
|
759
|
+
}
|
|
760
|
+
|
|
761
|
+
/**
|
|
762
|
+
* Stage untracked files individually while skipping anything under `.gsd`.
|
|
763
|
+
* Used as a last-resort when `.gsd` is a symlink, not gitignored, and
|
|
764
|
+
* `git.manage_gitignore: false` forbids the self-heal path. Protects user
|
|
765
|
+
* work by never silently dropping new real files.
|
|
766
|
+
*/
|
|
767
|
+
function stageUntrackedExcludingDotGsd(basePath: string): void {
|
|
768
|
+
// Stage tracked modifications first. `git add -u` never fails on pathspec
|
|
769
|
+
// issues because it doesn't walk untracked trees.
|
|
770
|
+
gitFileExec(basePath, ["add", "-u"]);
|
|
771
|
+
|
|
772
|
+
// Enumerate untracked paths via porcelain output. `?? ` prefix marks
|
|
773
|
+
// untracked files (status respects `.gitignore`).
|
|
774
|
+
const status = gitFileExec(basePath, ["status", "--porcelain=v1", "-z"], true);
|
|
775
|
+
if (!status) return;
|
|
776
|
+
|
|
777
|
+
const untracked: string[] = [];
|
|
778
|
+
for (const entry of status.split("\0")) {
|
|
779
|
+
if (!entry) continue;
|
|
780
|
+
// Porcelain format: "XY path" where XY is the 2-char status code.
|
|
781
|
+
if (entry.length < 4) continue;
|
|
782
|
+
const code = entry.slice(0, 2);
|
|
783
|
+
const path = entry.slice(3);
|
|
784
|
+
if (code !== "??") continue;
|
|
785
|
+
// Skip GSD runtime artifacts. Under `manage_gitignore: false` the user
|
|
786
|
+
// may not have these in `.gitignore`, so we filter explicitly to avoid
|
|
787
|
+
// committing transient state (.gsd external link, migration lock,
|
|
788
|
+
// background shell scratch dir).
|
|
789
|
+
if (path === ".gsd" || path.startsWith(".gsd/")) continue;
|
|
790
|
+
if (path === ".gsd-id" || path === ".gsd.migrating") continue;
|
|
791
|
+
if (path === ".bg-shell" || path.startsWith(".bg-shell/")) continue;
|
|
792
|
+
untracked.push(path);
|
|
793
|
+
}
|
|
794
|
+
|
|
795
|
+
if (untracked.length === 0) return;
|
|
796
|
+
// Stage in chunks to avoid exceeding ARG_MAX on large change sets.
|
|
797
|
+
const CHUNK = 200;
|
|
798
|
+
for (let i = 0; i < untracked.length; i += CHUNK) {
|
|
799
|
+
gitFileExec(basePath, ["add", "--", ...untracked.slice(i, i + CHUNK)]);
|
|
800
|
+
}
|
|
801
|
+
}
|
|
802
|
+
|
|
803
|
+
/**
|
|
804
|
+
* Handle `nativeAddAllWithExclusions` failing with "beyond a symbolic link"
|
|
805
|
+
* when `.gsd` is a symlink. Self-heals by adding `.gsd` to `.gitignore`, or
|
|
806
|
+
* falls back to explicit per-file staging so user work is never dropped.
|
|
807
|
+
*/
|
|
808
|
+
function fallbackStageWithSymlinkedDotGsd(basePath: string): void {
|
|
809
|
+
if (isDotGsdIgnored(basePath)) {
|
|
810
|
+
gitFileExec(basePath, ["add", "-A"]);
|
|
811
|
+
return;
|
|
812
|
+
}
|
|
813
|
+
if (trySelfHealGsdGitignore(basePath)) {
|
|
814
|
+
gitFileExec(basePath, ["add", "-A"]);
|
|
815
|
+
return;
|
|
816
|
+
}
|
|
817
|
+
// `manage_gitignore: false` — protect work by staging files explicitly.
|
|
818
|
+
stageUntrackedExcludingDotGsd(basePath);
|
|
819
|
+
}
|
|
820
|
+
|
|
709
821
|
/**
|
|
710
822
|
* Stage all files with pathspec exclusions (git add -A -- ':!pattern' ...).
|
|
711
823
|
* Excluded paths are never hashed by git, preventing hangs on large
|
|
@@ -740,12 +852,12 @@ export function nativeAddAllWithExclusions(basePath: string, exclusions: readonl
|
|
|
740
852
|
return;
|
|
741
853
|
}
|
|
742
854
|
// When .gsd is a symlink, git rejects `:!.gsd/...` pathspecs with
|
|
743
|
-
// "beyond a symbolic link".
|
|
744
|
-
//
|
|
745
|
-
//
|
|
746
|
-
//
|
|
855
|
+
// "beyond a symbolic link". Hand off to the self-heal fallback which
|
|
856
|
+
// either adds `.gsd` to `.gitignore` and retries `git add -A`, or stages
|
|
857
|
+
// real files explicitly when `git.manage_gitignore: false` forbids the
|
|
858
|
+
// self-heal path. Either way, user work is protected from silent drops.
|
|
747
859
|
if (stderr.includes("beyond a symbolic link")) {
|
|
748
|
-
|
|
860
|
+
fallbackStageWithSymlinkedDotGsd(basePath);
|
|
749
861
|
return;
|
|
750
862
|
}
|
|
751
863
|
throw new GSDError(GSD_GIT_ERROR, `git add -A with exclusions failed in ${basePath}: ${getErrorMessage(err)}`);
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
// Toggled with Ctrl+Alt+N (⌃⌥N on macOS), Ctrl+Shift+N fallback, or /gsd notifications.
|
|
4
4
|
|
|
5
5
|
import type { Theme } from "@gsd/pi-coding-agent";
|
|
6
|
-
import { truncateToWidth, visibleWidth, matchesKey, Key } from "@gsd/pi-tui";
|
|
6
|
+
import { truncateToWidth, visibleWidth, wrapTextWithAnsi, matchesKey, Key } from "@gsd/pi-tui";
|
|
7
7
|
|
|
8
8
|
import {
|
|
9
9
|
readNotifications,
|
|
@@ -29,25 +29,15 @@ function severityIcon(severity: NotifySeverity): string {
|
|
|
29
29
|
}
|
|
30
30
|
}
|
|
31
31
|
|
|
32
|
-
/**
|
|
32
|
+
/** Column-aware word wrap using pi-tui's native wrapper (handles unicode/ANSI). */
|
|
33
33
|
function wrapText(text: string, maxWidth: number): string[] {
|
|
34
|
-
if (
|
|
35
|
-
const
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
} else if (current.length + 1 + word.length <= maxWidth) {
|
|
42
|
-
current += " " + word;
|
|
43
|
-
} else {
|
|
44
|
-
lines.push(current);
|
|
45
|
-
current = word;
|
|
46
|
-
}
|
|
47
|
-
}
|
|
48
|
-
if (current.length > 0) lines.push(current);
|
|
49
|
-
// If a single word exceeds maxWidth, truncate it
|
|
50
|
-
return lines.map((l) => l.length > maxWidth ? l.slice(0, maxWidth - 1) + "…" : l);
|
|
34
|
+
if (maxWidth <= 0) return [text];
|
|
35
|
+
const lines = wrapTextWithAnsi(text, maxWidth);
|
|
36
|
+
// Safety clamp: if any line still exceeds maxWidth (e.g. unbreakable long token),
|
|
37
|
+
// truncate it with an ellipsis so it cannot bleed past the box border.
|
|
38
|
+
return lines.map((l) =>
|
|
39
|
+
visibleWidth(l) > maxWidth ? truncateToWidth(l, maxWidth, "…") : l,
|
|
40
|
+
);
|
|
51
41
|
}
|
|
52
42
|
|
|
53
43
|
function formatTimestamp(ts: string): string {
|
|
@@ -1,60 +1,42 @@
|
|
|
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
|
|
|
6
7
|
import type { ExtensionContext } from "@gsd/pi-coding-agent";
|
|
7
8
|
|
|
8
9
|
import { getUnreadCount, onNotificationStoreChange } from "./notification-store.js";
|
|
9
10
|
import { formattedShortcutPair } from "./shortcut-defs.js";
|
|
10
11
|
|
|
11
|
-
//
|
|
12
|
+
// Key chosen to sort after alphabetic extension keys so the chip lands on the
|
|
13
|
+
// far right of the extension-status block.
|
|
14
|
+
const STATUS_KEY = "zz-notifications";
|
|
12
15
|
|
|
13
|
-
export function
|
|
16
|
+
export function buildNotificationChip(): string {
|
|
14
17
|
const unread = getUnreadCount();
|
|
15
|
-
if (unread === 0) return
|
|
16
|
-
|
|
17
|
-
return [` 🔔 Notifications: ${unread} unread (${formattedShortcutPair("notifications")})`];
|
|
18
|
+
if (unread === 0) return "";
|
|
19
|
+
return `🔔 ${unread} unread (${formattedShortcutPair("notifications")})`;
|
|
18
20
|
}
|
|
19
21
|
|
|
20
|
-
//
|
|
22
|
+
// Retained for backwards compatibility with tests and the RPC fallback path
|
|
23
|
+
// that still expected a line-array widget. Returns empty when no unread.
|
|
24
|
+
export function buildNotificationWidgetLines(): string[] {
|
|
25
|
+
const chip = buildNotificationChip();
|
|
26
|
+
return chip ? [` ${chip}`] : [];
|
|
27
|
+
}
|
|
21
28
|
|
|
22
29
|
const REFRESH_INTERVAL_MS = 30_000;
|
|
23
30
|
|
|
24
|
-
/**
|
|
25
|
-
* Initialize the always-on notification widget (belowEditor).
|
|
26
|
-
* Call once from session_start after the notification store is initialized.
|
|
27
|
-
*/
|
|
28
31
|
export function initNotificationWidget(ctx: ExtensionContext): void {
|
|
29
32
|
if (!ctx.hasUI) return;
|
|
30
33
|
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
cachedLines = undefined;
|
|
40
|
-
_tui.requestRender();
|
|
41
|
-
};
|
|
42
|
-
|
|
43
|
-
const unsubscribe = onNotificationStoreChange(refresh);
|
|
44
|
-
const refreshTimer = setInterval(refresh, REFRESH_INTERVAL_MS);
|
|
45
|
-
|
|
46
|
-
return {
|
|
47
|
-
render(_width: number): string[] {
|
|
48
|
-
if (!cachedLines) cachedLines = buildNotificationWidgetLines();
|
|
49
|
-
return cachedLines;
|
|
50
|
-
},
|
|
51
|
-
invalidate(): void {
|
|
52
|
-
cachedLines = undefined;
|
|
53
|
-
},
|
|
54
|
-
dispose(): void {
|
|
55
|
-
unsubscribe();
|
|
56
|
-
clearInterval(refreshTimer);
|
|
57
|
-
},
|
|
58
|
-
};
|
|
59
|
-
}, { placement: "belowEditor" });
|
|
34
|
+
const push = () => {
|
|
35
|
+
const chip = buildNotificationChip();
|
|
36
|
+
ctx.ui.setStatus(STATUS_KEY, chip.length > 0 ? chip : undefined);
|
|
37
|
+
};
|
|
38
|
+
push();
|
|
39
|
+
|
|
40
|
+
onNotificationStoreChange(push);
|
|
41
|
+
setInterval(push, REFRESH_INTERVAL_MS).unref?.();
|
|
60
42
|
}
|
|
@@ -0,0 +1,146 @@
|
|
|
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
|
+
|
|
7
|
+
import { existsSync, mkdirSync, readFileSync, renameSync, unlinkSync, writeFileSync } from "node:fs"
|
|
8
|
+
import { homedir } from "node:os"
|
|
9
|
+
import { dirname, join } from "node:path"
|
|
10
|
+
import { logWarning } from "./workflow-logger.js"
|
|
11
|
+
|
|
12
|
+
/**
|
|
13
|
+
* Bump `FLOW_VERSION` whenever a new required step is added to ONBOARDING_STEPS.
|
|
14
|
+
* Records with an older flowVersion are treated as "needs partial re-onboarding"
|
|
15
|
+
* by isOnboardingComplete().
|
|
16
|
+
*/
|
|
17
|
+
export const FLOW_VERSION = 1
|
|
18
|
+
|
|
19
|
+
const RECORD_VERSION = 1
|
|
20
|
+
// Inline agentDir computation (mirrors src/app-paths.ts) — keep this module
|
|
21
|
+
// rootDir-clean for the resources tsconfig; importing from src/ pulls files
|
|
22
|
+
// outside src/resources and breaks the build.
|
|
23
|
+
const AGENT_DIR =
|
|
24
|
+
process.env.GSD_CODING_AGENT_DIR ||
|
|
25
|
+
join(process.env.GSD_HOME || join(homedir(), ".gsd"), "agent")
|
|
26
|
+
const FILE = join(AGENT_DIR, "onboarding.json")
|
|
27
|
+
|
|
28
|
+
export interface OnboardingRecord {
|
|
29
|
+
version: number
|
|
30
|
+
flowVersion: number
|
|
31
|
+
completedAt: string | null
|
|
32
|
+
completedSteps: string[]
|
|
33
|
+
skippedSteps: string[]
|
|
34
|
+
lastResumePoint: string | null
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
const DEFAULT: OnboardingRecord = {
|
|
38
|
+
version: RECORD_VERSION,
|
|
39
|
+
flowVersion: FLOW_VERSION,
|
|
40
|
+
completedAt: null,
|
|
41
|
+
completedSteps: [],
|
|
42
|
+
skippedSteps: [],
|
|
43
|
+
lastResumePoint: null,
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
export function readOnboardingRecord(): OnboardingRecord {
|
|
47
|
+
if (!existsSync(FILE)) return { ...DEFAULT }
|
|
48
|
+
try {
|
|
49
|
+
const raw = JSON.parse(readFileSync(FILE, "utf-8")) as Partial<OnboardingRecord>
|
|
50
|
+
return {
|
|
51
|
+
version: typeof raw.version === "number" ? raw.version : RECORD_VERSION,
|
|
52
|
+
flowVersion: typeof raw.flowVersion === "number" ? raw.flowVersion : 0,
|
|
53
|
+
completedAt: typeof raw.completedAt === "string" ? raw.completedAt : null,
|
|
54
|
+
completedSteps: Array.isArray(raw.completedSteps) ? raw.completedSteps.filter(s => typeof s === "string") : [],
|
|
55
|
+
skippedSteps: Array.isArray(raw.skippedSteps) ? raw.skippedSteps.filter(s => typeof s === "string") : [],
|
|
56
|
+
lastResumePoint: typeof raw.lastResumePoint === "string" ? raw.lastResumePoint : null,
|
|
57
|
+
}
|
|
58
|
+
} catch {
|
|
59
|
+
// Corrupt/unreadable — fall back to defaults rather than crashing onboarding flow
|
|
60
|
+
return { ...DEFAULT }
|
|
61
|
+
}
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
function atomicWrite(record: OnboardingRecord): void {
|
|
65
|
+
mkdirSync(dirname(FILE), { recursive: true })
|
|
66
|
+
const tmp = `${FILE}.tmp.${process.pid}.${Date.now()}`
|
|
67
|
+
try {
|
|
68
|
+
writeFileSync(tmp, JSON.stringify(record, null, 2), "utf-8")
|
|
69
|
+
renameSync(tmp, FILE)
|
|
70
|
+
} catch (err) {
|
|
71
|
+
// Best-effort: drop the tmp file if the rename failed (don't leak stale tmps)
|
|
72
|
+
try { if (existsSync(tmp)) unlinkSync(tmp) } catch { /* swallow secondary error */ }
|
|
73
|
+
throw err
|
|
74
|
+
}
|
|
75
|
+
}
|
|
76
|
+
|
|
77
|
+
export function writeOnboardingRecord(patch: Partial<OnboardingRecord>): OnboardingRecord {
|
|
78
|
+
const current = readOnboardingRecord()
|
|
79
|
+
const next: OnboardingRecord = {
|
|
80
|
+
...current,
|
|
81
|
+
...patch,
|
|
82
|
+
version: RECORD_VERSION,
|
|
83
|
+
// flowVersion is sticky on writes unless explicitly patched
|
|
84
|
+
flowVersion: typeof patch.flowVersion === "number" ? patch.flowVersion : current.flowVersion,
|
|
85
|
+
}
|
|
86
|
+
try {
|
|
87
|
+
atomicWrite(next)
|
|
88
|
+
} catch (err) {
|
|
89
|
+
// Non-fatal for the wizard, but make the failure diagnosable. The next boot
|
|
90
|
+
// will re-prompt for onboarding because the record didn't persist; the
|
|
91
|
+
// logWarning entry tells the user why.
|
|
92
|
+
logWarning("state", `Failed to persist onboarding record: ${err instanceof Error ? err.message : String(err)}`, {
|
|
93
|
+
file: FILE,
|
|
94
|
+
})
|
|
95
|
+
}
|
|
96
|
+
return next
|
|
97
|
+
}
|
|
98
|
+
|
|
99
|
+
/**
|
|
100
|
+
* Onboarding is "complete" when there's a completedAt timestamp AND the
|
|
101
|
+
* flowVersion matches the current FLOW_VERSION. A flowVersion bump means
|
|
102
|
+
* a new required step exists and the user should re-enter to configure it.
|
|
103
|
+
*/
|
|
104
|
+
export function isOnboardingComplete(): boolean {
|
|
105
|
+
const r = readOnboardingRecord()
|
|
106
|
+
return r.completedAt !== null && r.flowVersion === FLOW_VERSION
|
|
107
|
+
}
|
|
108
|
+
|
|
109
|
+
export function markStepCompleted(stepId: string): void {
|
|
110
|
+
const r = readOnboardingRecord()
|
|
111
|
+
if (r.completedSteps.includes(stepId)) {
|
|
112
|
+
writeOnboardingRecord({ lastResumePoint: stepId })
|
|
113
|
+
return
|
|
114
|
+
}
|
|
115
|
+
writeOnboardingRecord({
|
|
116
|
+
completedSteps: [...r.completedSteps, stepId],
|
|
117
|
+
skippedSteps: r.skippedSteps.filter(s => s !== stepId),
|
|
118
|
+
lastResumePoint: stepId,
|
|
119
|
+
})
|
|
120
|
+
}
|
|
121
|
+
|
|
122
|
+
export function markStepSkipped(stepId: string): void {
|
|
123
|
+
const r = readOnboardingRecord()
|
|
124
|
+
if (r.skippedSteps.includes(stepId) || r.completedSteps.includes(stepId)) return
|
|
125
|
+
writeOnboardingRecord({
|
|
126
|
+
skippedSteps: [...r.skippedSteps, stepId],
|
|
127
|
+
lastResumePoint: stepId,
|
|
128
|
+
})
|
|
129
|
+
}
|
|
130
|
+
|
|
131
|
+
export function markOnboardingComplete(completedSteps: string[]): void {
|
|
132
|
+
writeOnboardingRecord({
|
|
133
|
+
completedAt: new Date().toISOString(),
|
|
134
|
+
flowVersion: FLOW_VERSION,
|
|
135
|
+
completedSteps,
|
|
136
|
+
})
|
|
137
|
+
}
|
|
138
|
+
|
|
139
|
+
export function resetOnboarding(): void {
|
|
140
|
+
writeOnboardingRecord({
|
|
141
|
+
completedAt: null,
|
|
142
|
+
completedSteps: [],
|
|
143
|
+
skippedSteps: [],
|
|
144
|
+
lastResumePoint: null,
|
|
145
|
+
})
|
|
146
|
+
}
|
|
@@ -118,8 +118,12 @@ export function extractRelativeImports(
|
|
|
118
118
|
|
|
119
119
|
/**
|
|
120
120
|
* Check if a relative import resolves to an existing file.
|
|
121
|
-
*
|
|
122
|
-
*
|
|
121
|
+
* Resolution order:
|
|
122
|
+
* 1. Imports carrying an explicit extension are checked as-is (handles assets
|
|
123
|
+
* like .css/.scss/images/fonts and .json, not just code extensions).
|
|
124
|
+
* 2. TypeScript ESM convention where .js imports resolve to .ts files.
|
|
125
|
+
* 3. Extensionless imports resolved against .ts/.tsx/.js/.jsx/.mjs/.cjs.
|
|
126
|
+
* 4. Directory imports resolved against index.{ts,tsx,js,jsx,mjs,cjs}.
|
|
123
127
|
*/
|
|
124
128
|
export function resolveImportPath(
|
|
125
129
|
importPath: string,
|
|
@@ -129,6 +133,27 @@ export function resolveImportPath(
|
|
|
129
133
|
const sourceDir = dirname(resolve(basePath, sourceFile));
|
|
130
134
|
const extensions = [".ts", ".tsx", ".js", ".jsx", ".mjs", ".cjs"];
|
|
131
135
|
|
|
136
|
+
// If the import already has an explicit extension, check it as-is first.
|
|
137
|
+
// This correctly resolves asset imports like .css, .scss, images, fonts
|
|
138
|
+
// without requiring each extension to be enumerated (issue #4411). We only
|
|
139
|
+
// do this when the import carries an extension so that extensionless module
|
|
140
|
+
// imports still flow through the TS ESM convention and index-file resolvers.
|
|
141
|
+
const explicitExt = extname(importPath);
|
|
142
|
+
if (explicitExt !== "") {
|
|
143
|
+
const directPath = resolve(sourceDir, importPath);
|
|
144
|
+
if (existsSync(directPath)) {
|
|
145
|
+
return { exists: true, resolvedPath: directPath };
|
|
146
|
+
}
|
|
147
|
+
// Only .js/.jsx/.mjs/.cjs imports legitimately fall through for the TS
|
|
148
|
+
// ESM convention (.js → .ts). Any other explicit extension (.css, .json,
|
|
149
|
+
// .svg, images, fonts, .ts, .tsx, …) must stay unresolved when the direct
|
|
150
|
+
// path is missing — otherwise a stray `./missing.css.ts` could shadow a
|
|
151
|
+
// genuinely missing `./missing.css` import.
|
|
152
|
+
if (![".js", ".jsx", ".mjs", ".cjs"].includes(explicitExt)) {
|
|
153
|
+
return { exists: false, resolvedPath: null };
|
|
154
|
+
}
|
|
155
|
+
}
|
|
156
|
+
|
|
132
157
|
// Handle TypeScript ESM convention: .js imports resolve to .ts files
|
|
133
158
|
// e.g., import './types.js' -> ./types.ts
|
|
134
159
|
let normalizedPath = importPath;
|
|
@@ -142,7 +167,7 @@ export function resolveImportPath(
|
|
|
142
167
|
normalizedPath = importPath.slice(0, -4);
|
|
143
168
|
}
|
|
144
169
|
|
|
145
|
-
// Try the normalized path with common extensions
|
|
170
|
+
// Try the normalized path with common extensions
|
|
146
171
|
for (const ext of extensions) {
|
|
147
172
|
const fullPath = resolve(sourceDir, normalizedPath + ext);
|
|
148
173
|
if (existsSync(fullPath)) {
|
|
@@ -158,17 +183,6 @@ export function resolveImportPath(
|
|
|
158
183
|
}
|
|
159
184
|
}
|
|
160
185
|
|
|
161
|
-
// Check if path already has extension (for .json, etc.)
|
|
162
|
-
const hasExt = [".ts", ".tsx", ".js", ".jsx", ".mjs", ".cjs", ".json"].some(
|
|
163
|
-
(ext) => importPath.endsWith(ext)
|
|
164
|
-
);
|
|
165
|
-
if (hasExt) {
|
|
166
|
-
const fullPath = resolve(sourceDir, importPath);
|
|
167
|
-
if (existsSync(fullPath)) {
|
|
168
|
-
return { exists: true, resolvedPath: fullPath };
|
|
169
|
-
}
|
|
170
|
-
}
|
|
171
|
-
|
|
172
186
|
return { exists: false, resolvedPath: null };
|
|
173
187
|
}
|
|
174
188
|
|
|
@@ -227,11 +241,20 @@ export function checkImportResolution(
|
|
|
227
241
|
|
|
228
242
|
// ─── Cross-Task Signature Check ──────────────────────────────────────────────
|
|
229
243
|
|
|
244
|
+
/**
|
|
245
|
+
* Normalized function signature extracted from a source file.
|
|
246
|
+
* Used to compare definitions across tasks and detect signature drift.
|
|
247
|
+
*/
|
|
230
248
|
interface FunctionSignature {
|
|
249
|
+
/** Function or exported const name. */
|
|
231
250
|
name: string;
|
|
251
|
+
/** Parameter list with defaults and comments stripped. */
|
|
232
252
|
params: string;
|
|
253
|
+
/** Declared return type, or "void" when none is annotated. */
|
|
233
254
|
returnType: string;
|
|
255
|
+
/** Source file the signature was extracted from. */
|
|
234
256
|
file: string;
|
|
257
|
+
/** 1-based line number of the declaration. */
|
|
235
258
|
lineNum: number;
|
|
236
259
|
}
|
|
237
260
|
|