gsd-pi 2.71.0 → 2.72.0-dev.3118184
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 +69 -19
- package/dist/cli.js +88 -6
- package/dist/headless-events.d.ts +2 -0
- package/dist/headless-events.js +7 -0
- package/dist/headless.js +16 -3
- package/dist/mcp-server.js +40 -17
- package/dist/onboarding.js +10 -0
- package/dist/provider-migrations.d.ts +10 -0
- package/dist/provider-migrations.js +12 -0
- package/dist/resource-loader.js +139 -13
- package/dist/resources/GSD-WORKFLOW.md +1 -1
- package/dist/resources/agents/debugger.md +58 -0
- package/dist/resources/agents/doc-writer.md +43 -0
- package/dist/resources/agents/git-ops.md +56 -0
- package/dist/resources/agents/javascript-pro.md +46 -271
- package/dist/resources/agents/planner.md +55 -0
- package/dist/resources/agents/refactorer.md +47 -0
- package/dist/resources/agents/reviewer.md +48 -0
- package/dist/resources/agents/security.md +59 -0
- package/dist/resources/agents/tester.md +50 -0
- package/dist/resources/agents/typescript-pro.md +41 -235
- package/dist/resources/extensions/async-jobs/await-tool.js +7 -4
- package/dist/resources/extensions/async-jobs/job-manager.js +28 -3
- package/dist/resources/extensions/claude-code-cli/partial-builder.js +40 -12
- package/dist/resources/extensions/claude-code-cli/stream-adapter.js +142 -14
- package/dist/resources/extensions/gsd/auto/infra-errors.js +34 -0
- package/dist/resources/extensions/gsd/auto/loop.js +116 -2
- package/dist/resources/extensions/gsd/auto/phases.js +5 -1
- package/dist/resources/extensions/gsd/auto/session.js +11 -0
- package/dist/resources/extensions/gsd/auto-dashboard.js +22 -16
- package/dist/resources/extensions/gsd/auto-model-selection.js +10 -2
- package/dist/resources/extensions/gsd/auto-post-unit.js +6 -0
- package/dist/resources/extensions/gsd/auto-prompts.js +88 -33
- package/dist/resources/extensions/gsd/auto-recovery.js +11 -0
- package/dist/resources/extensions/gsd/auto-start.js +34 -7
- package/dist/resources/extensions/gsd/auto-tool-tracking.js +1 -1
- package/dist/resources/extensions/gsd/auto-worktree.js +1 -1
- package/dist/resources/extensions/gsd/auto.js +81 -19
- package/dist/resources/extensions/gsd/bootstrap/db-tools.js +3 -3
- package/dist/resources/extensions/gsd/bootstrap/register-hooks.js +11 -11
- package/dist/resources/extensions/gsd/bootstrap/register-shortcuts.js +63 -51
- package/dist/resources/extensions/gsd/bootstrap/system-context.js +6 -0
- package/dist/resources/extensions/gsd/commands/context.js +15 -6
- package/dist/resources/extensions/gsd/commands/dispatcher.js +12 -2
- package/dist/resources/extensions/gsd/commands/handlers/auto.js +10 -33
- package/dist/resources/extensions/gsd/commands/handlers/core.js +56 -11
- package/dist/resources/extensions/gsd/commands/handlers/notifications-handler.js +15 -6
- package/dist/resources/extensions/gsd/commands/handlers/workflow.js +4 -10
- package/dist/resources/extensions/gsd/commands-handlers.js +4 -1
- package/dist/resources/extensions/gsd/context-injector.js +1 -1
- package/dist/resources/extensions/gsd/custom-workflow-engine.js +3 -7
- package/dist/resources/extensions/gsd/dashboard-overlay.js +8 -3
- package/dist/resources/extensions/gsd/definition-io.js +15 -0
- package/dist/resources/extensions/gsd/dispatch-guard.js +22 -1
- package/dist/resources/extensions/gsd/doctor-providers.js +23 -0
- package/dist/resources/extensions/gsd/doctor-runtime-checks.js +6 -3
- package/dist/resources/extensions/gsd/error-classifier.js +5 -2
- package/dist/resources/extensions/gsd/forensics.js +19 -6
- package/dist/resources/extensions/gsd/gate-registry.js +208 -0
- package/dist/resources/extensions/gsd/git-service.js +11 -8
- package/dist/resources/extensions/gsd/gitignore.js +12 -6
- package/dist/resources/extensions/gsd/gsd-db.js +90 -6
- package/dist/resources/extensions/gsd/guided-flow.js +5 -10
- package/dist/resources/extensions/gsd/key-manager.js +2 -0
- package/dist/resources/extensions/gsd/metrics.js +1 -0
- package/dist/resources/extensions/gsd/milestone-actions.js +10 -4
- package/dist/resources/extensions/gsd/milestone-validation-gates.js +11 -12
- package/dist/resources/extensions/gsd/notification-overlay.js +42 -13
- package/dist/resources/extensions/gsd/notification-store.js +56 -5
- package/dist/resources/extensions/gsd/notification-widget.js +5 -13
- package/dist/resources/extensions/gsd/parallel-monitor-overlay.js +8 -3
- package/dist/resources/extensions/gsd/pre-execution-checks.js +35 -2
- package/dist/resources/extensions/gsd/preferences-skills.js +2 -34
- package/dist/resources/extensions/gsd/preferences-types.js +15 -0
- package/dist/resources/extensions/gsd/preferences.js +16 -3
- package/dist/resources/extensions/gsd/prompt-loader.js +4 -1
- package/dist/resources/extensions/gsd/prompt-validation.js +126 -0
- package/dist/resources/extensions/gsd/prompts/complete-slice.md +5 -3
- package/dist/resources/extensions/gsd/prompts/discuss.md +123 -12
- package/dist/resources/extensions/gsd/prompts/execute-task.md +22 -19
- package/dist/resources/extensions/gsd/prompts/guided-discuss-milestone.md +2 -0
- package/dist/resources/extensions/gsd/prompts/guided-discuss-slice.md +2 -0
- package/dist/resources/extensions/gsd/prompts/guided-resume-task.md +1 -1
- package/dist/resources/extensions/gsd/prompts/queue.md +3 -2
- package/dist/resources/extensions/gsd/prompts/system.md +1 -0
- package/dist/resources/extensions/gsd/prompts/validate-milestone.md +4 -1
- package/dist/resources/extensions/gsd/session-model-override.js +25 -0
- package/dist/resources/extensions/gsd/shortcut-defs.js +40 -0
- package/dist/resources/extensions/gsd/state.js +29 -2
- package/dist/resources/extensions/gsd/tools/complete-slice.js +52 -1
- package/dist/resources/extensions/gsd/tools/complete-task.js +51 -1
- package/dist/resources/extensions/gsd/tools/workflow-tool-executors.js +4 -1
- package/dist/resources/extensions/gsd/workflow-projections.js +7 -0
- package/dist/resources/extensions/gsd/worktree-manager.js +30 -3
- package/dist/resources/extensions/gsd/write-intercept.js +10 -1
- package/dist/resources/extensions/ollama/index.js +17 -10
- package/dist/resources/extensions/ollama/ollama-client.js +35 -6
- package/dist/resources/extensions/ollama/ollama-discovery.js +32 -6
- package/dist/resources/extensions/shared/gsd-phase-state.js +35 -0
- package/dist/resources/extensions/subagent/agents.js +8 -0
- package/dist/resources/extensions/subagent/index.js +17 -0
- package/dist/resources/skills/create-skill/SKILL.md +2 -0
- package/dist/startup-model-validation.d.ts +0 -1
- package/dist/startup-model-validation.js +6 -2
- package/dist/web/standalone/.next/BUILD_ID +1 -1
- package/dist/web/standalone/.next/app-path-routes-manifest.json +15 -15
- package/dist/web/standalone/.next/build-manifest.json +3 -3
- package/dist/web/standalone/.next/prerender-manifest.json +3 -3
- package/dist/web/standalone/.next/required-server-files.json +3 -3
- package/dist/web/standalone/.next/server/app/_global-error/page.js +3 -3
- package/dist/web/standalone/.next/server/app/_global-error/page_client-reference-manifest.js +1 -1
- package/dist/web/standalone/.next/server/app/_global-error.html +1 -1
- package/dist/web/standalone/.next/server/app/_global-error.rsc +1 -1
- package/dist/web/standalone/.next/server/app/_global-error.segments/_full.segment.rsc +1 -1
- package/dist/web/standalone/.next/server/app/_global-error.segments/_global-error/__PAGE__.segment.rsc +1 -1
- package/dist/web/standalone/.next/server/app/_global-error.segments/_global-error.segment.rsc +1 -1
- package/dist/web/standalone/.next/server/app/_global-error.segments/_head.segment.rsc +1 -1
- package/dist/web/standalone/.next/server/app/_global-error.segments/_index.segment.rsc +1 -1
- package/dist/web/standalone/.next/server/app/_global-error.segments/_tree.segment.rsc +1 -1
- package/dist/web/standalone/.next/server/app/_not-found/page.js +2 -2
- package/dist/web/standalone/.next/server/app/_not-found/page_client-reference-manifest.js +1 -1
- package/dist/web/standalone/.next/server/app/_not-found.html +1 -1
- package/dist/web/standalone/.next/server/app/_not-found.rsc +3 -3
- package/dist/web/standalone/.next/server/app/_not-found.segments/_full.segment.rsc +3 -3
- package/dist/web/standalone/.next/server/app/_not-found.segments/_head.segment.rsc +1 -1
- package/dist/web/standalone/.next/server/app/_not-found.segments/_index.segment.rsc +3 -3
- package/dist/web/standalone/.next/server/app/_not-found.segments/_not-found/__PAGE__.segment.rsc +1 -1
- package/dist/web/standalone/.next/server/app/_not-found.segments/_not-found.segment.rsc +1 -1
- package/dist/web/standalone/.next/server/app/_not-found.segments/_tree.segment.rsc +1 -1
- package/dist/web/standalone/.next/server/app/api/boot/route.js +1 -1
- package/dist/web/standalone/.next/server/app/api/boot/route_client-reference-manifest.js +1 -1
- package/dist/web/standalone/.next/server/app/api/bridge-terminal/input/route.js +1 -1
- package/dist/web/standalone/.next/server/app/api/bridge-terminal/input/route_client-reference-manifest.js +1 -1
- package/dist/web/standalone/.next/server/app/api/bridge-terminal/resize/route.js +1 -1
- package/dist/web/standalone/.next/server/app/api/bridge-terminal/resize/route_client-reference-manifest.js +1 -1
- package/dist/web/standalone/.next/server/app/api/bridge-terminal/stream/route.js +2 -2
- package/dist/web/standalone/.next/server/app/api/bridge-terminal/stream/route_client-reference-manifest.js +1 -1
- package/dist/web/standalone/.next/server/app/api/browse-directories/route.js +1 -1
- package/dist/web/standalone/.next/server/app/api/browse-directories/route_client-reference-manifest.js +1 -1
- package/dist/web/standalone/.next/server/app/api/captures/route.js +1 -1
- package/dist/web/standalone/.next/server/app/api/captures/route_client-reference-manifest.js +1 -1
- package/dist/web/standalone/.next/server/app/api/cleanup/route.js +1 -1
- package/dist/web/standalone/.next/server/app/api/cleanup/route_client-reference-manifest.js +1 -1
- package/dist/web/standalone/.next/server/app/api/dev-mode/route.js +1 -1
- package/dist/web/standalone/.next/server/app/api/dev-mode/route_client-reference-manifest.js +1 -1
- package/dist/web/standalone/.next/server/app/api/doctor/route.js +1 -1
- package/dist/web/standalone/.next/server/app/api/doctor/route_client-reference-manifest.js +1 -1
- package/dist/web/standalone/.next/server/app/api/experimental/route.js +2 -2
- package/dist/web/standalone/.next/server/app/api/experimental/route_client-reference-manifest.js +1 -1
- package/dist/web/standalone/.next/server/app/api/export-data/route.js +1 -1
- package/dist/web/standalone/.next/server/app/api/export-data/route_client-reference-manifest.js +1 -1
- package/dist/web/standalone/.next/server/app/api/files/route.js +1 -1
- package/dist/web/standalone/.next/server/app/api/files/route_client-reference-manifest.js +1 -1
- package/dist/web/standalone/.next/server/app/api/forensics/route.js +1 -1
- package/dist/web/standalone/.next/server/app/api/forensics/route_client-reference-manifest.js +1 -1
- package/dist/web/standalone/.next/server/app/api/git/route.js +1 -1
- package/dist/web/standalone/.next/server/app/api/git/route_client-reference-manifest.js +1 -1
- package/dist/web/standalone/.next/server/app/api/history/route.js +1 -1
- package/dist/web/standalone/.next/server/app/api/history/route_client-reference-manifest.js +1 -1
- package/dist/web/standalone/.next/server/app/api/hooks/route.js +1 -1
- package/dist/web/standalone/.next/server/app/api/hooks/route_client-reference-manifest.js +1 -1
- package/dist/web/standalone/.next/server/app/api/inspect/route.js +1 -1
- package/dist/web/standalone/.next/server/app/api/inspect/route_client-reference-manifest.js +1 -1
- package/dist/web/standalone/.next/server/app/api/knowledge/route.js +1 -1
- package/dist/web/standalone/.next/server/app/api/knowledge/route_client-reference-manifest.js +1 -1
- package/dist/web/standalone/.next/server/app/api/live-state/route.js +1 -1
- package/dist/web/standalone/.next/server/app/api/live-state/route_client-reference-manifest.js +1 -1
- package/dist/web/standalone/.next/server/app/api/notifications/route.js +2 -2
- package/dist/web/standalone/.next/server/app/api/notifications/route_client-reference-manifest.js +1 -1
- package/dist/web/standalone/.next/server/app/api/onboarding/route.js +1 -1
- package/dist/web/standalone/.next/server/app/api/onboarding/route_client-reference-manifest.js +1 -1
- package/dist/web/standalone/.next/server/app/api/preferences/route.js +1 -1
- package/dist/web/standalone/.next/server/app/api/preferences/route_client-reference-manifest.js +1 -1
- package/dist/web/standalone/.next/server/app/api/projects/route.js +1 -1
- package/dist/web/standalone/.next/server/app/api/projects/route_client-reference-manifest.js +1 -1
- package/dist/web/standalone/.next/server/app/api/recovery/route.js +1 -1
- package/dist/web/standalone/.next/server/app/api/recovery/route_client-reference-manifest.js +1 -1
- package/dist/web/standalone/.next/server/app/api/remote-questions/route.js +2 -2
- package/dist/web/standalone/.next/server/app/api/remote-questions/route_client-reference-manifest.js +1 -1
- package/dist/web/standalone/.next/server/app/api/session/browser/route.js +1 -1
- package/dist/web/standalone/.next/server/app/api/session/browser/route_client-reference-manifest.js +1 -1
- package/dist/web/standalone/.next/server/app/api/session/command/route.js +1 -1
- package/dist/web/standalone/.next/server/app/api/session/command/route_client-reference-manifest.js +1 -1
- package/dist/web/standalone/.next/server/app/api/session/events/route.js +2 -2
- package/dist/web/standalone/.next/server/app/api/session/events/route_client-reference-manifest.js +1 -1
- package/dist/web/standalone/.next/server/app/api/session/manage/route.js +1 -1
- package/dist/web/standalone/.next/server/app/api/session/manage/route_client-reference-manifest.js +1 -1
- package/dist/web/standalone/.next/server/app/api/settings-data/route.js +1 -1
- package/dist/web/standalone/.next/server/app/api/settings-data/route_client-reference-manifest.js +1 -1
- package/dist/web/standalone/.next/server/app/api/shutdown/route.js +1 -1
- package/dist/web/standalone/.next/server/app/api/shutdown/route_client-reference-manifest.js +1 -1
- package/dist/web/standalone/.next/server/app/api/skill-health/route.js +1 -1
- package/dist/web/standalone/.next/server/app/api/skill-health/route_client-reference-manifest.js +1 -1
- package/dist/web/standalone/.next/server/app/api/steer/route.js +1 -1
- package/dist/web/standalone/.next/server/app/api/steer/route_client-reference-manifest.js +1 -1
- package/dist/web/standalone/.next/server/app/api/switch-root/route.js +1 -1
- package/dist/web/standalone/.next/server/app/api/switch-root/route_client-reference-manifest.js +1 -1
- package/dist/web/standalone/.next/server/app/api/terminal/input/route.js +2 -2
- package/dist/web/standalone/.next/server/app/api/terminal/input/route_client-reference-manifest.js +1 -1
- package/dist/web/standalone/.next/server/app/api/terminal/resize/route.js +2 -2
- package/dist/web/standalone/.next/server/app/api/terminal/resize/route_client-reference-manifest.js +1 -1
- package/dist/web/standalone/.next/server/app/api/terminal/sessions/route.js +2 -2
- package/dist/web/standalone/.next/server/app/api/terminal/sessions/route_client-reference-manifest.js +1 -1
- package/dist/web/standalone/.next/server/app/api/terminal/stream/route.js +3 -3
- package/dist/web/standalone/.next/server/app/api/terminal/stream/route_client-reference-manifest.js +1 -1
- package/dist/web/standalone/.next/server/app/api/terminal/upload/route.js +1 -1
- package/dist/web/standalone/.next/server/app/api/terminal/upload/route_client-reference-manifest.js +1 -1
- package/dist/web/standalone/.next/server/app/api/undo/route.js +1 -1
- package/dist/web/standalone/.next/server/app/api/undo/route_client-reference-manifest.js +1 -1
- package/dist/web/standalone/.next/server/app/api/update/route.js +1 -1
- package/dist/web/standalone/.next/server/app/api/update/route_client-reference-manifest.js +1 -1
- package/dist/web/standalone/.next/server/app/api/visualizer/route.js +1 -1
- package/dist/web/standalone/.next/server/app/api/visualizer/route_client-reference-manifest.js +1 -1
- package/dist/web/standalone/.next/server/app/index.html +1 -1
- package/dist/web/standalone/.next/server/app/index.rsc +4 -4
- package/dist/web/standalone/.next/server/app/index.segments/__PAGE__.segment.rsc +2 -2
- package/dist/web/standalone/.next/server/app/index.segments/_full.segment.rsc +4 -4
- package/dist/web/standalone/.next/server/app/index.segments/_head.segment.rsc +1 -1
- package/dist/web/standalone/.next/server/app/index.segments/_index.segment.rsc +3 -3
- package/dist/web/standalone/.next/server/app/index.segments/_tree.segment.rsc +1 -1
- package/dist/web/standalone/.next/server/app/page.js +2 -2
- package/dist/web/standalone/.next/server/app/page_client-reference-manifest.js +1 -1
- package/dist/web/standalone/.next/server/app-paths-manifest.json +15 -15
- package/dist/web/standalone/.next/server/chunks/2331.js +16 -16
- package/dist/web/standalone/.next/server/chunks/4741.js +12 -12
- package/dist/web/standalone/.next/server/chunks/5822.js +2 -2
- package/dist/web/standalone/.next/server/chunks/63.js +8 -8
- package/dist/web/standalone/.next/server/chunks/6897.js +3 -3
- package/dist/web/standalone/.next/server/edge-runtime-webpack.js +2 -0
- package/dist/web/standalone/.next/server/functions-config-manifest.json +0 -9
- package/dist/web/standalone/.next/server/middleware-build-manifest.js +1 -1
- package/dist/web/standalone/.next/server/middleware-manifest.json +29 -2
- package/dist/web/standalone/.next/server/middleware.js +4 -12
- package/dist/web/standalone/.next/server/next-font-manifest.js +1 -1
- package/dist/web/standalone/.next/server/next-font-manifest.json +1 -1
- package/dist/web/standalone/.next/server/pages/404.html +1 -1
- package/dist/web/standalone/.next/server/pages/500.html +1 -1
- package/dist/web/standalone/.next/server/server-reference-manifest.json +1 -1
- package/dist/web/standalone/.next/server/webpack-runtime.js +1 -1
- package/dist/web/standalone/.next/static/chunks/app/_not-found/{page-2f24283c162b6ab3.js → page-f2a7482d42a5614b.js} +1 -1
- package/dist/web/standalone/.next/static/chunks/app/{layout-9ecfd95f343793f0.js → layout-a16c7a7ecdf0c2cf.js} +1 -1
- package/dist/web/standalone/.next/static/chunks/app/page-f1e30ab6bb269149.js +1 -0
- package/dist/web/standalone/.next/static/chunks/main-app-fdab67f7802d7832.js +1 -0
- package/dist/web/standalone/.next/static/chunks/next/dist/client/components/builtin/global-error-459824ffb8c323dd.js +1 -0
- package/dist/web/standalone/node_modules/node-pty/build/Makefile +2 -2
- package/dist/web/standalone/node_modules/node-pty/build/Release/pty.node +0 -0
- package/dist/web/standalone/node_modules/node-pty/build/pty.target.mk +14 -14
- package/dist/web/standalone/node_modules/node-pty/node-addon-api/node_addon_api.target.mk +14 -14
- package/dist/web/standalone/node_modules/node-pty/node-addon-api/node_addon_api_except.target.mk +14 -14
- package/dist/web/standalone/node_modules/node-pty/node-addon-api/node_addon_api_maybe.target.mk +14 -14
- package/dist/web/standalone/server.js +1 -1
- package/package.json +1 -1
- package/packages/mcp-server/dist/server.d.ts +12 -1
- package/packages/mcp-server/dist/server.d.ts.map +1 -1
- package/packages/mcp-server/dist/server.js +90 -42
- package/packages/mcp-server/dist/server.js.map +1 -1
- package/packages/mcp-server/dist/workflow-tools.d.ts.map +1 -1
- package/packages/mcp-server/dist/workflow-tools.js +22 -12
- package/packages/mcp-server/dist/workflow-tools.js.map +1 -1
- package/packages/mcp-server/src/server.ts +110 -38
- package/packages/mcp-server/src/workflow-tools.test.ts +110 -0
- package/packages/mcp-server/src/workflow-tools.ts +32 -12
- package/packages/pi-ai/dist/env-api-keys.js +1 -0
- package/packages/pi-ai/dist/env-api-keys.js.map +1 -1
- package/packages/pi-ai/dist/models.custom.d.ts +105 -0
- package/packages/pi-ai/dist/models.custom.d.ts.map +1 -1
- package/packages/pi-ai/dist/models.custom.js +97 -0
- package/packages/pi-ai/dist/models.custom.js.map +1 -1
- package/packages/pi-ai/dist/models.generated.d.ts +648 -140
- package/packages/pi-ai/dist/models.generated.d.ts.map +1 -1
- package/packages/pi-ai/dist/models.generated.js +867 -370
- package/packages/pi-ai/dist/models.generated.js.map +1 -1
- package/packages/pi-ai/dist/models.generated.test.d.ts +2 -0
- package/packages/pi-ai/dist/models.generated.test.d.ts.map +1 -0
- package/packages/pi-ai/dist/models.generated.test.js +334 -0
- package/packages/pi-ai/dist/models.generated.test.js.map +1 -0
- package/packages/pi-ai/dist/models.test.js +105 -0
- package/packages/pi-ai/dist/models.test.js.map +1 -1
- package/packages/pi-ai/dist/providers/amazon-bedrock.js +11 -2
- package/packages/pi-ai/dist/providers/amazon-bedrock.js.map +1 -1
- package/packages/pi-ai/dist/providers/anthropic-auth.test.d.ts +2 -0
- package/packages/pi-ai/dist/providers/anthropic-auth.test.d.ts.map +1 -0
- package/packages/pi-ai/dist/providers/anthropic-auth.test.js +20 -0
- package/packages/pi-ai/dist/providers/anthropic-auth.test.js.map +1 -0
- package/packages/pi-ai/dist/providers/anthropic-shared.d.ts +4 -1
- package/packages/pi-ai/dist/providers/anthropic-shared.d.ts.map +1 -1
- package/packages/pi-ai/dist/providers/anthropic-shared.js +8 -3
- package/packages/pi-ai/dist/providers/anthropic-shared.js.map +1 -1
- package/packages/pi-ai/dist/providers/anthropic-shared.test.js +44 -1
- package/packages/pi-ai/dist/providers/anthropic-shared.test.js.map +1 -1
- package/packages/pi-ai/dist/providers/anthropic.d.ts +2 -1
- package/packages/pi-ai/dist/providers/anthropic.d.ts.map +1 -1
- package/packages/pi-ai/dist/providers/anthropic.js +7 -4
- package/packages/pi-ai/dist/providers/anthropic.js.map +1 -1
- package/packages/pi-ai/dist/providers/openai-completions.d.ts.map +1 -1
- package/packages/pi-ai/dist/providers/openai-completions.js +11 -0
- package/packages/pi-ai/dist/providers/openai-completions.js.map +1 -1
- package/packages/pi-ai/dist/types.d.ts +1 -1
- package/packages/pi-ai/dist/types.d.ts.map +1 -1
- package/packages/pi-ai/dist/types.js.map +1 -1
- package/packages/pi-ai/dist/utils/oauth/github-copilot.d.ts.map +1 -1
- package/packages/pi-ai/dist/utils/oauth/github-copilot.js +5 -1
- package/packages/pi-ai/dist/utils/oauth/github-copilot.js.map +1 -1
- package/packages/pi-ai/dist/utils/oauth/github-copilot.test.d.ts +2 -0
- package/packages/pi-ai/dist/utils/oauth/github-copilot.test.d.ts.map +1 -0
- package/packages/pi-ai/dist/utils/oauth/github-copilot.test.js +57 -0
- package/packages/pi-ai/dist/utils/oauth/github-copilot.test.js.map +1 -0
- package/packages/pi-ai/src/env-api-keys.ts +1 -0
- package/packages/pi-ai/src/models.custom.ts +98 -0
- package/packages/pi-ai/src/models.generated.test.ts +373 -0
- package/packages/pi-ai/src/models.generated.ts +867 -370
- package/packages/pi-ai/src/models.test.ts +135 -0
- package/packages/pi-ai/src/providers/amazon-bedrock.ts +13 -1
- package/packages/pi-ai/src/providers/anthropic-auth.test.ts +32 -0
- package/packages/pi-ai/src/providers/anthropic-shared.test.ts +55 -1
- package/packages/pi-ai/src/providers/anthropic-shared.ts +14 -3
- package/packages/pi-ai/src/providers/anthropic.ts +8 -4
- package/packages/pi-ai/src/providers/openai-completions.ts +14 -0
- package/packages/pi-ai/src/types.ts +1 -0
- package/packages/pi-ai/src/utils/oauth/github-copilot.test.ts +71 -0
- package/packages/pi-ai/src/utils/oauth/github-copilot.ts +4 -1
- package/packages/pi-coding-agent/dist/core/agent-session-renderable-tools.test.d.ts +2 -0
- package/packages/pi-coding-agent/dist/core/agent-session-renderable-tools.test.d.ts.map +1 -0
- package/packages/pi-coding-agent/dist/core/agent-session-renderable-tools.test.js +61 -0
- package/packages/pi-coding-agent/dist/core/agent-session-renderable-tools.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 +2 -1
- package/packages/pi-coding-agent/dist/core/agent-session.js.map +1 -1
- package/packages/pi-coding-agent/dist/core/auth-storage.d.ts +10 -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 +27 -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 +85 -0
- package/packages/pi-coding-agent/dist/core/auth-storage.test.js.map +1 -1
- package/packages/pi-coding-agent/dist/core/model-resolver-initial-model-auth.test.d.ts +2 -0
- package/packages/pi-coding-agent/dist/core/model-resolver-initial-model-auth.test.d.ts.map +1 -0
- package/packages/pi-coding-agent/dist/core/model-resolver-initial-model-auth.test.js +64 -0
- package/packages/pi-coding-agent/dist/core/model-resolver-initial-model-auth.test.js.map +1 -0
- package/packages/pi-coding-agent/dist/core/model-resolver.d.ts.map +1 -1
- package/packages/pi-coding-agent/dist/core/model-resolver.js +23 -18
- package/packages/pi-coding-agent/dist/core/model-resolver.js.map +1 -1
- package/packages/pi-coding-agent/dist/core/model-resolver.test.d.ts +8 -0
- package/packages/pi-coding-agent/dist/core/model-resolver.test.d.ts.map +1 -0
- package/packages/pi-coding-agent/dist/core/model-resolver.test.js +75 -0
- package/packages/pi-coding-agent/dist/core/model-resolver.test.js.map +1 -0
- package/packages/pi-coding-agent/dist/core/retry-handler.d.ts +5 -0
- package/packages/pi-coding-agent/dist/core/retry-handler.d.ts.map +1 -1
- package/packages/pi-coding-agent/dist/core/retry-handler.js +55 -1
- package/packages/pi-coding-agent/dist/core/retry-handler.js.map +1 -1
- package/packages/pi-coding-agent/dist/core/retry-handler.test.js +57 -0
- package/packages/pi-coding-agent/dist/core/retry-handler.test.js.map +1 -1
- package/packages/pi-coding-agent/dist/core/sdk.d.ts +11 -0
- package/packages/pi-coding-agent/dist/core/sdk.d.ts.map +1 -1
- package/packages/pi-coding-agent/dist/core/sdk.js +47 -5
- package/packages/pi-coding-agent/dist/core/sdk.js.map +1 -1
- package/packages/pi-coding-agent/dist/core/sdk.test.d.ts +2 -0
- package/packages/pi-coding-agent/dist/core/sdk.test.d.ts.map +1 -0
- package/packages/pi-coding-agent/dist/core/sdk.test.js +71 -0
- package/packages/pi-coding-agent/dist/core/sdk.test.js.map +1 -0
- 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 +1 -1
- package/packages/pi-coding-agent/dist/index.js.map +1 -1
- package/packages/pi-coding-agent/dist/modes/interactive/components/__tests__/login-dialog.test.d.ts +2 -0
- package/packages/pi-coding-agent/dist/modes/interactive/components/__tests__/login-dialog.test.d.ts.map +1 -0
- package/packages/pi-coding-agent/dist/modes/interactive/components/__tests__/login-dialog.test.js +13 -0
- package/packages/pi-coding-agent/dist/modes/interactive/components/__tests__/login-dialog.test.js.map +1 -0
- package/packages/pi-coding-agent/dist/modes/interactive/components/__tests__/tool-execution.test.js +36 -0
- package/packages/pi-coding-agent/dist/modes/interactive/components/__tests__/tool-execution.test.js.map +1 -1
- package/packages/pi-coding-agent/dist/modes/interactive/components/login-dialog.d.ts +4 -0
- package/packages/pi-coding-agent/dist/modes/interactive/components/login-dialog.d.ts.map +1 -1
- package/packages/pi-coding-agent/dist/modes/interactive/components/login-dialog.js +24 -2
- package/packages/pi-coding-agent/dist/modes/interactive/components/login-dialog.js.map +1 -1
- package/packages/pi-coding-agent/dist/modes/interactive/components/model-selector.d.ts.map +1 -1
- package/packages/pi-coding-agent/dist/modes/interactive/components/model-selector.js +9 -2
- package/packages/pi-coding-agent/dist/modes/interactive/components/model-selector.js.map +1 -1
- package/packages/pi-coding-agent/dist/modes/interactive/components/tool-execution.d.ts +4 -0
- package/packages/pi-coding-agent/dist/modes/interactive/components/tool-execution.d.ts.map +1 -1
- package/packages/pi-coding-agent/dist/modes/interactive/components/tool-execution.js +130 -12
- package/packages/pi-coding-agent/dist/modes/interactive/components/tool-execution.js.map +1 -1
- 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 +7 -2
- package/packages/pi-coding-agent/dist/modes/interactive/controllers/chat-controller.js.map +1 -1
- package/packages/pi-coding-agent/dist/modes/interactive/controllers/model-controller.d.ts.map +1 -1
- package/packages/pi-coding-agent/dist/modes/interactive/controllers/model-controller.js +6 -1
- package/packages/pi-coding-agent/dist/modes/interactive/controllers/model-controller.js.map +1 -1
- package/packages/pi-coding-agent/dist/modes/interactive/interactive-mode.d.ts.map +1 -1
- package/packages/pi-coding-agent/dist/modes/interactive/interactive-mode.js +4 -3
- package/packages/pi-coding-agent/dist/modes/interactive/interactive-mode.js.map +1 -1
- package/packages/pi-coding-agent/dist/modes/interactive/slash-command-handlers.js +4 -2
- package/packages/pi-coding-agent/dist/modes/interactive/slash-command-handlers.js.map +1 -1
- package/packages/pi-coding-agent/package.json +1 -1
- package/packages/pi-coding-agent/src/core/agent-session-renderable-tools.test.ts +70 -0
- package/packages/pi-coding-agent/src/core/agent-session.ts +2 -1
- package/packages/pi-coding-agent/src/core/auth-storage.test.ts +108 -0
- package/packages/pi-coding-agent/src/core/auth-storage.ts +30 -0
- package/packages/pi-coding-agent/src/core/model-resolver-initial-model-auth.test.ts +78 -0
- package/packages/pi-coding-agent/src/core/model-resolver.test.ts +85 -0
- package/packages/pi-coding-agent/src/core/model-resolver.ts +23 -18
- package/packages/pi-coding-agent/src/core/retry-handler.test.ts +83 -0
- package/packages/pi-coding-agent/src/core/retry-handler.ts +60 -1
- package/packages/pi-coding-agent/src/core/sdk.test.ts +89 -0
- package/packages/pi-coding-agent/src/core/sdk.ts +55 -9
- package/packages/pi-coding-agent/src/index.ts +1 -0
- package/packages/pi-coding-agent/src/modes/interactive/components/__tests__/login-dialog.test.ts +24 -0
- package/packages/pi-coding-agent/src/modes/interactive/components/__tests__/tool-execution.test.ts +72 -0
- package/packages/pi-coding-agent/src/modes/interactive/components/login-dialog.ts +30 -2
- package/packages/pi-coding-agent/src/modes/interactive/components/model-selector.ts +15 -6
- package/packages/pi-coding-agent/src/modes/interactive/components/tool-execution.ts +131 -12
- package/packages/pi-coding-agent/src/modes/interactive/controllers/chat-controller.ts +7 -2
- package/packages/pi-coding-agent/src/modes/interactive/controllers/model-controller.ts +6 -1
- package/packages/pi-coding-agent/src/modes/interactive/interactive-mode.ts +4 -3
- package/packages/pi-coding-agent/src/modes/interactive/slash-command-handlers.ts +4 -2
- package/packages/pi-tui/dist/components/__tests__/editor.test.js +12 -0
- package/packages/pi-tui/dist/components/__tests__/editor.test.js.map +1 -1
- package/packages/pi-tui/dist/components/__tests__/input.test.js +12 -0
- package/packages/pi-tui/dist/components/__tests__/input.test.js.map +1 -1
- package/packages/pi-tui/dist/keys.d.ts.map +1 -1
- package/packages/pi-tui/dist/keys.js +27 -0
- package/packages/pi-tui/dist/keys.js.map +1 -1
- package/packages/pi-tui/src/components/__tests__/editor.test.ts +18 -0
- package/packages/pi-tui/src/components/__tests__/input.test.ts +18 -0
- package/packages/pi-tui/src/keys.ts +32 -0
- package/pkg/package.json +1 -1
- package/src/resources/GSD-WORKFLOW.md +1 -1
- package/src/resources/agents/debugger.md +58 -0
- package/src/resources/agents/doc-writer.md +43 -0
- package/src/resources/agents/git-ops.md +56 -0
- package/src/resources/agents/javascript-pro.md +46 -271
- package/src/resources/agents/planner.md +55 -0
- package/src/resources/agents/refactorer.md +47 -0
- package/src/resources/agents/reviewer.md +48 -0
- package/src/resources/agents/security.md +59 -0
- package/src/resources/agents/tester.md +50 -0
- package/src/resources/agents/typescript-pro.md +41 -235
- package/src/resources/extensions/async-jobs/await-tool.test.ts +40 -7
- package/src/resources/extensions/async-jobs/await-tool.ts +7 -4
- package/src/resources/extensions/async-jobs/job-manager.ts +33 -3
- package/src/resources/extensions/claude-code-cli/partial-builder.ts +45 -12
- package/src/resources/extensions/claude-code-cli/stream-adapter.ts +152 -13
- package/src/resources/extensions/claude-code-cli/tests/partial-builder.test.ts +91 -2
- package/src/resources/extensions/claude-code-cli/tests/stream-adapter.test.ts +301 -6
- package/src/resources/extensions/gsd/auto/infra-errors.ts +38 -0
- package/src/resources/extensions/gsd/auto/loop-deps.ts +2 -0
- package/src/resources/extensions/gsd/auto/loop.ts +134 -2
- package/src/resources/extensions/gsd/auto/phases.ts +6 -0
- package/src/resources/extensions/gsd/auto/session.ts +11 -0
- package/src/resources/extensions/gsd/auto-dashboard.ts +29 -18
- package/src/resources/extensions/gsd/auto-model-selection.ts +9 -1
- package/src/resources/extensions/gsd/auto-post-unit.ts +7 -0
- package/src/resources/extensions/gsd/auto-prompts.ts +111 -33
- package/src/resources/extensions/gsd/auto-recovery.ts +10 -0
- package/src/resources/extensions/gsd/auto-start.ts +41 -7
- package/src/resources/extensions/gsd/auto-tool-tracking.ts +1 -1
- package/src/resources/extensions/gsd/auto-worktree.ts +1 -1
- package/src/resources/extensions/gsd/auto.ts +97 -20
- package/src/resources/extensions/gsd/bootstrap/db-tools.ts +3 -3
- package/src/resources/extensions/gsd/bootstrap/register-hooks.ts +10 -10
- package/src/resources/extensions/gsd/bootstrap/register-shortcuts.ts +79 -60
- package/src/resources/extensions/gsd/bootstrap/system-context.ts +7 -0
- package/src/resources/extensions/gsd/commands/context.ts +16 -5
- package/src/resources/extensions/gsd/commands/dispatcher.ts +14 -2
- package/src/resources/extensions/gsd/commands/handlers/auto.ts +10 -36
- package/src/resources/extensions/gsd/commands/handlers/core.ts +58 -11
- package/src/resources/extensions/gsd/commands/handlers/notifications-handler.ts +17 -7
- package/src/resources/extensions/gsd/commands/handlers/workflow.ts +4 -10
- package/src/resources/extensions/gsd/commands-handlers.ts +5 -1
- package/src/resources/extensions/gsd/context-injector.ts +1 -1
- package/src/resources/extensions/gsd/custom-workflow-engine.ts +4 -8
- package/src/resources/extensions/gsd/dashboard-overlay.ts +10 -3
- package/src/resources/extensions/gsd/definition-io.ts +18 -0
- package/src/resources/extensions/gsd/dispatch-guard.ts +23 -1
- package/src/resources/extensions/gsd/doctor-providers.ts +24 -0
- package/src/resources/extensions/gsd/doctor-runtime-checks.ts +6 -3
- package/src/resources/extensions/gsd/error-classifier.ts +5 -2
- package/src/resources/extensions/gsd/forensics.ts +23 -7
- package/src/resources/extensions/gsd/gate-registry.ts +251 -0
- package/src/resources/extensions/gsd/git-service.ts +11 -8
- package/src/resources/extensions/gsd/gitignore.ts +12 -6
- package/src/resources/extensions/gsd/gsd-db.ts +105 -6
- package/src/resources/extensions/gsd/guided-flow.ts +5 -10
- package/src/resources/extensions/gsd/interrupted-session.ts +1 -0
- package/src/resources/extensions/gsd/key-manager.ts +2 -0
- package/src/resources/extensions/gsd/metrics.ts +12 -1
- package/src/resources/extensions/gsd/milestone-actions.ts +10 -3
- package/src/resources/extensions/gsd/milestone-validation-gates.ts +11 -13
- package/src/resources/extensions/gsd/notification-overlay.ts +47 -14
- package/src/resources/extensions/gsd/notification-store.ts +54 -5
- package/src/resources/extensions/gsd/notification-widget.ts +5 -14
- package/src/resources/extensions/gsd/parallel-monitor-overlay.ts +10 -3
- package/src/resources/extensions/gsd/pre-execution-checks.ts +39 -2
- package/src/resources/extensions/gsd/preferences-skills.ts +2 -36
- package/src/resources/extensions/gsd/preferences-types.ts +16 -0
- package/src/resources/extensions/gsd/preferences.ts +19 -6
- package/src/resources/extensions/gsd/prompt-loader.ts +6 -1
- package/src/resources/extensions/gsd/prompt-validation.ts +157 -0
- package/src/resources/extensions/gsd/prompts/complete-slice.md +5 -3
- package/src/resources/extensions/gsd/prompts/discuss.md +123 -12
- package/src/resources/extensions/gsd/prompts/execute-task.md +22 -19
- package/src/resources/extensions/gsd/prompts/guided-discuss-milestone.md +2 -0
- package/src/resources/extensions/gsd/prompts/guided-discuss-slice.md +2 -0
- package/src/resources/extensions/gsd/prompts/guided-resume-task.md +1 -1
- package/src/resources/extensions/gsd/prompts/queue.md +3 -2
- package/src/resources/extensions/gsd/prompts/system.md +1 -0
- package/src/resources/extensions/gsd/prompts/validate-milestone.md +4 -1
- package/src/resources/extensions/gsd/session-model-override.ts +36 -0
- package/src/resources/extensions/gsd/shortcut-defs.ts +56 -0
- package/src/resources/extensions/gsd/state.ts +33 -2
- package/src/resources/extensions/gsd/tests/auto-paused-ui-cleanup.test.ts +27 -0
- package/src/resources/extensions/gsd/tests/auto-start-model-capture.test.ts +25 -9
- package/src/resources/extensions/gsd/tests/auto-start-worktree-db-path.test.ts +28 -0
- package/src/resources/extensions/gsd/tests/block-db-writes.test.ts +63 -0
- package/src/resources/extensions/gsd/tests/bootstrap-derive-state-db-open.test.ts +39 -0
- package/src/resources/extensions/gsd/tests/complete-slice-gate-closure.test.ts +167 -0
- package/src/resources/extensions/gsd/tests/complete-slice-prompt-task-summary-layout.test.ts +18 -0
- package/src/resources/extensions/gsd/tests/definition-io.test.ts +57 -0
- package/src/resources/extensions/gsd/tests/dispatch-guard.test.ts +53 -0
- package/src/resources/extensions/gsd/tests/doctor-heal-fixable-warnings.test.ts +14 -0
- package/src/resources/extensions/gsd/tests/doctor-providers.test.ts +36 -0
- package/src/resources/extensions/gsd/tests/execute-task-prompt-existing-artifact-guard.test.ts +33 -0
- package/src/resources/extensions/gsd/tests/false-degraded-mode-warning.test.ts +104 -0
- package/src/resources/extensions/gsd/tests/forensics-stuck-loops.test.ts +62 -0
- package/src/resources/extensions/gsd/tests/format-shortcut.test.ts +31 -0
- package/src/resources/extensions/gsd/tests/gate-dispatch.test.ts +27 -0
- package/src/resources/extensions/gsd/tests/gate-registry.test.ts +140 -0
- package/src/resources/extensions/gsd/tests/gsd-db.test.ts +107 -5
- package/src/resources/extensions/gsd/tests/gsd-no-project-error.test.ts +73 -0
- package/src/resources/extensions/gsd/tests/infra-errors-cooldown.test.ts +180 -0
- package/src/resources/extensions/gsd/tests/integration/auto-worktree-milestone-merge.test.ts +66 -1
- package/src/resources/extensions/gsd/tests/integration/git-service.test.ts +8 -6
- package/src/resources/extensions/gsd/tests/key-manager.test.ts +63 -0
- package/src/resources/extensions/gsd/tests/memory-pressure-stuck-state.test.ts +54 -0
- package/src/resources/extensions/gsd/tests/model-isolation.test.ts +36 -51
- package/src/resources/extensions/gsd/tests/notification-store.test.ts +35 -0
- package/src/resources/extensions/gsd/tests/notification-widget.test.ts +26 -0
- package/src/resources/extensions/gsd/tests/notifications-handler.test.ts +90 -0
- package/src/resources/extensions/gsd/tests/parallel-monitor-overlay.test.ts +1 -0
- package/src/resources/extensions/gsd/tests/park-db-sync.test.ts +18 -0
- package/src/resources/extensions/gsd/tests/plan-milestone-artifact-verification.test.ts +62 -0
- package/src/resources/extensions/gsd/tests/post-unit-state-rebuild.test.ts +34 -0
- package/src/resources/extensions/gsd/tests/pre-execution-checks.test.ts +49 -0
- package/src/resources/extensions/gsd/tests/preferences-formatting.test.ts +87 -0
- package/src/resources/extensions/gsd/tests/preferences.test.ts +53 -0
- package/src/resources/extensions/gsd/tests/projection-regression.test.ts +96 -1
- package/src/resources/extensions/gsd/tests/prompt-contracts.test.ts +19 -0
- package/src/resources/extensions/gsd/tests/prompt-loader-working-directory.test.ts +19 -0
- package/src/resources/extensions/gsd/tests/prompt-system-gate-coverage.test.ts +208 -0
- package/src/resources/extensions/gsd/tests/provider-errors.test.ts +16 -0
- package/src/resources/extensions/gsd/tests/register-hooks-depth-verification.test.ts +97 -0
- package/src/resources/extensions/gsd/tests/register-shortcuts.test.ts +63 -5
- package/src/resources/extensions/gsd/tests/session-model-override.test.ts +35 -0
- package/src/resources/extensions/gsd/tests/stale-slice-rows.test.ts +41 -0
- package/src/resources/extensions/gsd/tests/start-auto-detached.test.ts +90 -0
- package/src/resources/extensions/gsd/tests/tool-invocation-error-loop-break.test.ts +7 -0
- package/src/resources/extensions/gsd/tests/validate-milestone-prompt-verification-classes.test.ts +18 -0
- package/src/resources/extensions/gsd/tools/complete-slice.ts +63 -0
- package/src/resources/extensions/gsd/tools/complete-task.ts +63 -0
- package/src/resources/extensions/gsd/tools/workflow-tool-executors.ts +4 -1
- package/src/resources/extensions/gsd/types.ts +26 -0
- package/src/resources/extensions/gsd/workflow-projections.ts +8 -0
- package/src/resources/extensions/gsd/worktree-manager.ts +29 -3
- package/src/resources/extensions/gsd/write-intercept.ts +10 -1
- package/src/resources/extensions/ollama/index.ts +17 -8
- package/src/resources/extensions/ollama/ollama-client.ts +35 -6
- package/src/resources/extensions/ollama/ollama-discovery.ts +37 -6
- package/src/resources/extensions/ollama/ollama-status-indicator.test.ts +28 -0
- package/src/resources/extensions/ollama/tests/ollama-discovery.test.ts +54 -0
- package/src/resources/extensions/shared/gsd-phase-state.ts +42 -0
- package/src/resources/extensions/shared/tests/gsd-phase-state.test.ts +48 -0
- package/src/resources/extensions/subagent/agents.ts +10 -0
- package/src/resources/extensions/subagent/index.ts +18 -0
- package/src/resources/extensions/subagent/tests/agents-conflicts.test.ts +33 -0
- package/src/resources/skills/create-skill/SKILL.md +2 -0
- package/dist/web/standalone/.next/static/chunks/app/page-7115e62689b5fd84.js +0 -1
- package/dist/web/standalone/.next/static/chunks/main-app-d3d4c336195465f9.js +0 -1
- package/dist/web/standalone/.next/static/chunks/next/dist/client/components/builtin/global-error-ab5a8926e07ec673.js +0 -1
- /package/dist/web/standalone/.next/static/{nPky_WQC28aBD77eZsRAB → NzO79SOz9jHX-VY5-0t2O}/_buildManifest.js +0 -0
- /package/dist/web/standalone/.next/static/{nPky_WQC28aBD77eZsRAB → NzO79SOz9jHX-VY5-0t2O}/_ssgManifest.js +0 -0
|
@@ -6,19 +6,13 @@
|
|
|
6
6
|
* records in the DB. This module inserts milestone-level validation gates
|
|
7
7
|
* that correspond to the validation checks performed.
|
|
8
8
|
*
|
|
9
|
-
* Gate IDs for milestone validation
|
|
10
|
-
*
|
|
11
|
-
*
|
|
12
|
-
* MV03 — Cross-slice integration
|
|
13
|
-
* MV04 — Requirement coverage
|
|
14
|
-
*
|
|
15
|
-
* These use the existing quality_gates table with scope "milestone".
|
|
9
|
+
* Gate IDs for milestone validation (MV01–MV04) are sourced from the
|
|
10
|
+
* gate registry so the definitions stay in lockstep with prompt builders,
|
|
11
|
+
* dispatch rules, and state derivation. See gate-registry.ts.
|
|
16
12
|
*/
|
|
17
13
|
|
|
18
14
|
import { _getAdapter } from "./gsd-db.js";
|
|
19
|
-
|
|
20
|
-
/** Milestone validation gate IDs. */
|
|
21
|
-
const MILESTONE_GATE_IDS = ["MV01", "MV02", "MV03", "MV04"] as const;
|
|
15
|
+
import { getGatesForTurn } from "./gate-registry.js";
|
|
22
16
|
|
|
23
17
|
/**
|
|
24
18
|
* Insert milestone-level quality_gates records for a validation run.
|
|
@@ -27,6 +21,9 @@ const MILESTONE_GATE_IDS = ["MV01", "MV02", "MV03", "MV04"] as const;
|
|
|
27
21
|
* from the overall milestone validation verdict. Individual gate-level
|
|
28
22
|
* verdicts are not available (the handler receives a single verdict),
|
|
29
23
|
* so all gates share the overall verdict.
|
|
24
|
+
*
|
|
25
|
+
* Gate IDs come from the registry — adding/removing an MV-scoped gate
|
|
26
|
+
* in gate-registry.ts automatically flows through here.
|
|
30
27
|
*/
|
|
31
28
|
export function insertMilestoneValidationGates(
|
|
32
29
|
milestoneId: string,
|
|
@@ -38,8 +35,9 @@ export function insertMilestoneValidationGates(
|
|
|
38
35
|
if (!db) return;
|
|
39
36
|
|
|
40
37
|
const gateVerdict = verdict === "pass" ? "pass" : "flag";
|
|
38
|
+
const milestoneGates = getGatesForTurn("validate-milestone");
|
|
41
39
|
|
|
42
|
-
for (const
|
|
40
|
+
for (const def of milestoneGates) {
|
|
43
41
|
db.prepare(
|
|
44
42
|
`INSERT OR REPLACE INTO quality_gates
|
|
45
43
|
(milestone_id, slice_id, gate_id, scope, task_id, status, verdict, rationale, findings, evaluated_at)
|
|
@@ -47,9 +45,9 @@ export function insertMilestoneValidationGates(
|
|
|
47
45
|
).run({
|
|
48
46
|
":mid": milestoneId,
|
|
49
47
|
":sid": sliceId,
|
|
50
|
-
":gid":
|
|
48
|
+
":gid": def.id,
|
|
51
49
|
":verdict": gateVerdict,
|
|
52
|
-
":rationale":
|
|
50
|
+
":rationale": `${def.promptSection} — milestone validation verdict: ${verdict}`,
|
|
53
51
|
":evaluated_at": evaluatedAt,
|
|
54
52
|
});
|
|
55
53
|
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
// GSD Extension — Notification History Overlay
|
|
2
2
|
// Scrollable panel showing all persisted notifications with severity filtering.
|
|
3
|
-
// Toggled with Ctrl+Alt+N (⌃⌥N on macOS)
|
|
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
6
|
import { truncateToWidth, visibleWidth, matchesKey, Key } from "@gsd/pi-tui";
|
|
@@ -9,11 +9,12 @@ import {
|
|
|
9
9
|
readNotifications,
|
|
10
10
|
markAllRead,
|
|
11
11
|
clearNotifications,
|
|
12
|
-
|
|
12
|
+
onNotificationStoreChange,
|
|
13
13
|
type NotificationEntry,
|
|
14
14
|
type NotifySeverity,
|
|
15
15
|
} from "./notification-store.js";
|
|
16
|
-
import {
|
|
16
|
+
import { formattedShortcutPair } from "./shortcut-defs.js";
|
|
17
|
+
import { padRight, joinColumns } from "../shared/mod.js";
|
|
17
18
|
|
|
18
19
|
type FilterMode = "all" | "error" | "warning" | "info";
|
|
19
20
|
const FILTER_CYCLE: FilterMode[] = ["all", "error", "warning", "info"];
|
|
@@ -63,6 +64,12 @@ function formatTimestamp(ts: string): string {
|
|
|
63
64
|
}
|
|
64
65
|
}
|
|
65
66
|
|
|
67
|
+
function notificationSignature(entries: readonly NotificationEntry[]): string {
|
|
68
|
+
return entries
|
|
69
|
+
.map((entry) => `${entry.ts}|${entry.severity}|${entry.read ? 1 : 0}|${entry.message}`)
|
|
70
|
+
.join("\n");
|
|
71
|
+
}
|
|
72
|
+
|
|
66
73
|
export class GSDNotificationOverlay {
|
|
67
74
|
private tui: { requestRender: () => void };
|
|
68
75
|
private theme: Theme;
|
|
@@ -72,9 +79,11 @@ export class GSDNotificationOverlay {
|
|
|
72
79
|
private scrollOffset = 0;
|
|
73
80
|
private filterIndex = 0;
|
|
74
81
|
private entries: NotificationEntry[] = [];
|
|
82
|
+
private entriesSignature = "";
|
|
75
83
|
private refreshTimer: ReturnType<typeof setInterval>;
|
|
76
84
|
private disposed = false;
|
|
77
85
|
private resizeHandler: (() => void) | null = null;
|
|
86
|
+
private unsubscribeStore: (() => void) | null = null;
|
|
78
87
|
|
|
79
88
|
constructor(
|
|
80
89
|
tui: { requestRender: () => void },
|
|
@@ -88,6 +97,7 @@ export class GSDNotificationOverlay {
|
|
|
88
97
|
// Mark all as read on open
|
|
89
98
|
markAllRead();
|
|
90
99
|
this.entries = readNotifications();
|
|
100
|
+
this.entriesSignature = notificationSignature(this.entries);
|
|
91
101
|
|
|
92
102
|
// Resize handler
|
|
93
103
|
this.resizeHandler = () => {
|
|
@@ -97,17 +107,17 @@ export class GSDNotificationOverlay {
|
|
|
97
107
|
};
|
|
98
108
|
process.stdout.on("resize", this.resizeHandler);
|
|
99
109
|
|
|
100
|
-
//
|
|
110
|
+
// Subscribe to store mutations for immediate updates
|
|
111
|
+
this.unsubscribeStore = onNotificationStoreChange(() => {
|
|
112
|
+
if (this.disposed) return;
|
|
113
|
+
this._refreshFromDisk();
|
|
114
|
+
});
|
|
115
|
+
|
|
116
|
+
// 30s safety-net for cross-process edits (web subprocess, parallel workers)
|
|
101
117
|
this.refreshTimer = setInterval(() => {
|
|
102
118
|
if (this.disposed) return;
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
this.entries = fresh;
|
|
106
|
-
markAllRead();
|
|
107
|
-
this.invalidate();
|
|
108
|
-
this.tui.requestRender();
|
|
109
|
-
}
|
|
110
|
-
}, 3000);
|
|
119
|
+
this._refreshFromDisk();
|
|
120
|
+
}, 30_000);
|
|
111
121
|
}
|
|
112
122
|
|
|
113
123
|
private get filter(): FilterMode {
|
|
@@ -120,7 +130,12 @@ export class GSDNotificationOverlay {
|
|
|
120
130
|
}
|
|
121
131
|
|
|
122
132
|
handleInput(data: string): void {
|
|
123
|
-
if (
|
|
133
|
+
if (
|
|
134
|
+
matchesKey(data, Key.escape) ||
|
|
135
|
+
matchesKey(data, Key.ctrl("c")) ||
|
|
136
|
+
matchesKey(data, Key.ctrlAlt("n")) ||
|
|
137
|
+
matchesKey(data, Key.ctrlShift("n"))
|
|
138
|
+
) {
|
|
124
139
|
this.dispose();
|
|
125
140
|
this.onClose();
|
|
126
141
|
return;
|
|
@@ -165,6 +180,7 @@ export class GSDNotificationOverlay {
|
|
|
165
180
|
if (data === "c") {
|
|
166
181
|
clearNotifications();
|
|
167
182
|
this.entries = [];
|
|
183
|
+
this.entriesSignature = notificationSignature(this.entries);
|
|
168
184
|
this.scrollOffset = 0;
|
|
169
185
|
this.invalidate();
|
|
170
186
|
this.tui.requestRender();
|
|
@@ -199,12 +215,28 @@ export class GSDNotificationOverlay {
|
|
|
199
215
|
dispose(): void {
|
|
200
216
|
this.disposed = true;
|
|
201
217
|
clearInterval(this.refreshTimer);
|
|
218
|
+
if (this.unsubscribeStore) {
|
|
219
|
+
this.unsubscribeStore();
|
|
220
|
+
this.unsubscribeStore = null;
|
|
221
|
+
}
|
|
202
222
|
if (this.resizeHandler) {
|
|
203
223
|
process.stdout.removeListener("resize", this.resizeHandler);
|
|
204
224
|
this.resizeHandler = null;
|
|
205
225
|
}
|
|
206
226
|
}
|
|
207
227
|
|
|
228
|
+
private _refreshFromDisk(): void {
|
|
229
|
+
const fresh = readNotifications();
|
|
230
|
+
const signature = notificationSignature(fresh);
|
|
231
|
+
if (signature !== this.entriesSignature) {
|
|
232
|
+
markAllRead();
|
|
233
|
+
this.entries = readNotifications();
|
|
234
|
+
this.entriesSignature = notificationSignature(this.entries);
|
|
235
|
+
this.invalidate();
|
|
236
|
+
this.tui.requestRender();
|
|
237
|
+
}
|
|
238
|
+
}
|
|
239
|
+
|
|
208
240
|
private wrapInBox(inner: string[], width: number): string[] {
|
|
209
241
|
const th = this.theme;
|
|
210
242
|
const border = (s: string) => th.fg("borderAccent", s);
|
|
@@ -250,7 +282,8 @@ export class GSDNotificationOverlay {
|
|
|
250
282
|
lines.push(hr());
|
|
251
283
|
|
|
252
284
|
// Controls
|
|
253
|
-
|
|
285
|
+
const closeShortcut = formattedShortcutPair("notifications");
|
|
286
|
+
lines.push(row(th.fg("dim", `↑/↓ scroll f filter c clear Esc close (${closeShortcut})`)));
|
|
254
287
|
lines.push(blank());
|
|
255
288
|
|
|
256
289
|
// Entries
|
|
@@ -26,12 +26,16 @@ export interface NotificationEntry {
|
|
|
26
26
|
const MAX_ENTRIES = 500;
|
|
27
27
|
const FILENAME = "notifications.jsonl";
|
|
28
28
|
const LOCKFILE = "notifications.lock";
|
|
29
|
+
const DEDUP_WINDOW_MS = 30_000;
|
|
30
|
+
const DEDUP_PRUNE_THRESHOLD = 200;
|
|
29
31
|
|
|
30
32
|
// ─── Module State ───────────────────────────────────────────────────────
|
|
31
33
|
|
|
32
34
|
let _basePath: string | null = null;
|
|
33
35
|
let _lineCount = 0; // Hint for rotation — not authoritative for public API
|
|
34
36
|
let _suppressCount = 0;
|
|
37
|
+
let _recentMessageTimestamps = new Map<string, number>();
|
|
38
|
+
const _changeListeners = new Set<() => void>();
|
|
35
39
|
|
|
36
40
|
// ─── Public API ─────────────────────────────────────────────────────────
|
|
37
41
|
|
|
@@ -40,6 +44,9 @@ let _suppressCount = 0;
|
|
|
40
44
|
* project root. Seeds in-memory counters from the existing file on disk.
|
|
41
45
|
*/
|
|
42
46
|
export function initNotificationStore(basePath: string): void {
|
|
47
|
+
if (_basePath !== basePath) {
|
|
48
|
+
_recentMessageTimestamps.clear();
|
|
49
|
+
}
|
|
43
50
|
_basePath = basePath;
|
|
44
51
|
// Seed line count hint for rotation — public counters read from disk
|
|
45
52
|
_lineCount = _readEntriesFromDisk(basePath).length;
|
|
@@ -56,12 +63,23 @@ export function appendNotification(
|
|
|
56
63
|
): void {
|
|
57
64
|
if (!_basePath) return;
|
|
58
65
|
if (_suppressCount > 0) return;
|
|
66
|
+
const persistedMessage = message.length > 500 ? message.slice(0, 500) + "…" : message;
|
|
67
|
+
const dedupKey = `${_basePath}:${severity}:${source}:${persistedMessage}`;
|
|
68
|
+
const now = Date.now();
|
|
69
|
+
const lastSeen = _recentMessageTimestamps.get(dedupKey);
|
|
70
|
+
if (lastSeen !== undefined && now - lastSeen < DEDUP_WINDOW_MS) return;
|
|
71
|
+
_recentMessageTimestamps.set(dedupKey, now);
|
|
72
|
+
if (_recentMessageTimestamps.size > DEDUP_PRUNE_THRESHOLD) {
|
|
73
|
+
for (const [key, ts] of _recentMessageTimestamps) {
|
|
74
|
+
if (now - ts > DEDUP_WINDOW_MS) _recentMessageTimestamps.delete(key);
|
|
75
|
+
}
|
|
76
|
+
}
|
|
59
77
|
|
|
60
78
|
const entry: NotificationEntry = {
|
|
61
79
|
id: randomUUID(),
|
|
62
80
|
ts: new Date().toISOString(),
|
|
63
81
|
severity,
|
|
64
|
-
message:
|
|
82
|
+
message: persistedMessage,
|
|
65
83
|
source,
|
|
66
84
|
read: false,
|
|
67
85
|
};
|
|
@@ -76,6 +94,7 @@ export function appendNotification(
|
|
|
76
94
|
if (_lineCount > MAX_ENTRIES) {
|
|
77
95
|
_rotate();
|
|
78
96
|
}
|
|
97
|
+
_emitChange();
|
|
79
98
|
} catch {
|
|
80
99
|
// Non-fatal — never let persistence break the caller
|
|
81
100
|
}
|
|
@@ -104,6 +123,7 @@ export function markAllRead(basePath?: string): void {
|
|
|
104
123
|
const hasUnread = entries.some((e) => !e.read);
|
|
105
124
|
if (!hasUnread) return;
|
|
106
125
|
|
|
126
|
+
let changed = false;
|
|
107
127
|
try {
|
|
108
128
|
_withLock(bp, () => {
|
|
109
129
|
// Re-read inside lock to get freshest state
|
|
@@ -111,10 +131,12 @@ export function markAllRead(basePath?: string): void {
|
|
|
111
131
|
if (fresh.length === 0 || !fresh.some((e) => !e.read)) return;
|
|
112
132
|
const lines = fresh.map((e) => JSON.stringify({ ...e, read: true }));
|
|
113
133
|
_atomicWrite(bp, lines.join("\n") + "\n");
|
|
134
|
+
changed = true;
|
|
114
135
|
});
|
|
115
136
|
} catch {
|
|
116
137
|
// Non-fatal
|
|
117
138
|
}
|
|
139
|
+
if (changed) _emitChange();
|
|
118
140
|
}
|
|
119
141
|
|
|
120
142
|
/**
|
|
@@ -128,6 +150,8 @@ export function clearNotifications(basePath?: string): void {
|
|
|
128
150
|
_withLock(bp, () => {
|
|
129
151
|
_atomicWrite(bp, "");
|
|
130
152
|
});
|
|
153
|
+
_lineCount = 0;
|
|
154
|
+
_emitChange();
|
|
131
155
|
} catch {
|
|
132
156
|
// Non-fatal
|
|
133
157
|
}
|
|
@@ -172,6 +196,17 @@ export function unsuppressPersistence(): void {
|
|
|
172
196
|
_suppressCount = Math.max(0, _suppressCount - 1);
|
|
173
197
|
}
|
|
174
198
|
|
|
199
|
+
/**
|
|
200
|
+
* Subscribe to notification-store mutations (append, mark-read, clear).
|
|
201
|
+
* Returns an unsubscribe function.
|
|
202
|
+
*/
|
|
203
|
+
export function onNotificationStoreChange(listener: () => void): () => void {
|
|
204
|
+
_changeListeners.add(listener);
|
|
205
|
+
return () => {
|
|
206
|
+
_changeListeners.delete(listener);
|
|
207
|
+
};
|
|
208
|
+
}
|
|
209
|
+
|
|
175
210
|
// ─── Test Helpers ───────────────────────────────────────────────────────
|
|
176
211
|
|
|
177
212
|
/**
|
|
@@ -181,6 +216,8 @@ export function _resetNotificationStore(): void {
|
|
|
181
216
|
_basePath = null;
|
|
182
217
|
_lineCount = 0;
|
|
183
218
|
_suppressCount = 0;
|
|
219
|
+
_recentMessageTimestamps = new Map();
|
|
220
|
+
_changeListeners.clear();
|
|
184
221
|
}
|
|
185
222
|
|
|
186
223
|
// ─── Internal ───────────────────────────────────────────────────────────
|
|
@@ -216,12 +253,23 @@ function _rotate(): void {
|
|
|
216
253
|
const trimmed = entries.slice(entries.length - MAX_ENTRIES);
|
|
217
254
|
const lines = trimmed.map((e) => JSON.stringify(e));
|
|
218
255
|
_atomicWrite(_basePath!, lines.join("\n") + "\n");
|
|
256
|
+
_lineCount = trimmed.length;
|
|
219
257
|
});
|
|
220
258
|
} catch {
|
|
221
259
|
// Non-fatal
|
|
222
260
|
}
|
|
223
261
|
}
|
|
224
262
|
|
|
263
|
+
function _emitChange(): void {
|
|
264
|
+
for (const listener of _changeListeners) {
|
|
265
|
+
try {
|
|
266
|
+
listener();
|
|
267
|
+
} catch {
|
|
268
|
+
// Non-fatal
|
|
269
|
+
}
|
|
270
|
+
}
|
|
271
|
+
}
|
|
272
|
+
|
|
225
273
|
/**
|
|
226
274
|
* Atomic file rewrite via temp-file + rename. Prevents partial reads
|
|
227
275
|
* by other processes (web API subprocess, parallel workers).
|
|
@@ -275,10 +323,11 @@ function _withLock<T>(basePath: string, fn: () => T): T {
|
|
|
275
323
|
}
|
|
276
324
|
}
|
|
277
325
|
|
|
278
|
-
//
|
|
279
|
-
|
|
326
|
+
// Best-effort: mutation runs regardless of lock status (idempotent overwrites).
|
|
327
|
+
// createdLock gates cleanup only — never skip fn() on lock failure.
|
|
328
|
+
const createdLock = fd !== null;
|
|
280
329
|
try {
|
|
281
|
-
if (
|
|
330
|
+
if (createdLock && fd !== null) {
|
|
282
331
|
// Write our PID timestamp into the lock for stale detection
|
|
283
332
|
writeFileSync(lockPath, String(Date.now()), "utf-8");
|
|
284
333
|
closeSync(fd);
|
|
@@ -286,7 +335,7 @@ function _withLock<T>(basePath: string, fn: () => T): T {
|
|
|
286
335
|
return fn();
|
|
287
336
|
} finally {
|
|
288
337
|
// Only delete the lock if we created it — never remove another process's lock
|
|
289
|
-
if (
|
|
338
|
+
if (createdLock) {
|
|
290
339
|
try { unlinkSync(lockPath); } catch { /* best-effort cleanup */ }
|
|
291
340
|
}
|
|
292
341
|
}
|
|
@@ -5,8 +5,8 @@
|
|
|
5
5
|
|
|
6
6
|
import type { ExtensionContext } from "@gsd/pi-coding-agent";
|
|
7
7
|
|
|
8
|
-
import { getUnreadCount,
|
|
9
|
-
import {
|
|
8
|
+
import { getUnreadCount, onNotificationStoreChange } from "./notification-store.js";
|
|
9
|
+
import { formattedShortcutPair } from "./shortcut-defs.js";
|
|
10
10
|
|
|
11
11
|
// ─── Pure rendering ──���────────────────────────���─────────────────────────
|
|
12
12
|
|
|
@@ -14,18 +14,7 @@ export function buildNotificationWidgetLines(): string[] {
|
|
|
14
14
|
const unread = getUnreadCount();
|
|
15
15
|
if (unread === 0) return [];
|
|
16
16
|
|
|
17
|
-
|
|
18
|
-
const latest = entries[0]; // newest-first
|
|
19
|
-
if (!latest) return [];
|
|
20
|
-
|
|
21
|
-
const icon = latest.severity === "error" ? "✗" : latest.severity === "warning" ? "⚠" : "●";
|
|
22
|
-
const badge = `${unread} unread`;
|
|
23
|
-
const msgMax = 80;
|
|
24
|
-
const truncated = latest.message.length > msgMax
|
|
25
|
-
? latest.message.slice(0, msgMax - 1) + "…"
|
|
26
|
-
: latest.message;
|
|
27
|
-
|
|
28
|
-
return [` ${icon} [${badge}] ${truncated} (${formatShortcut("Ctrl+Alt+N")} to view)`];
|
|
17
|
+
return [` 🔔 Notifications: ${unread} unread (${formattedShortcutPair("notifications")})`];
|
|
29
18
|
}
|
|
30
19
|
|
|
31
20
|
// ─── Widget init ────────────────────────────────────────────────────────
|
|
@@ -51,6 +40,7 @@ export function initNotificationWidget(ctx: ExtensionContext): void {
|
|
|
51
40
|
_tui.requestRender();
|
|
52
41
|
};
|
|
53
42
|
|
|
43
|
+
const unsubscribe = onNotificationStoreChange(refresh);
|
|
54
44
|
const refreshTimer = setInterval(refresh, REFRESH_INTERVAL_MS);
|
|
55
45
|
|
|
56
46
|
return {
|
|
@@ -62,6 +52,7 @@ export function initNotificationWidget(ctx: ExtensionContext): void {
|
|
|
62
52
|
cachedLines = undefined;
|
|
63
53
|
},
|
|
64
54
|
dispose(): void {
|
|
55
|
+
unsubscribe();
|
|
65
56
|
clearInterval(refreshTimer);
|
|
66
57
|
},
|
|
67
58
|
};
|
|
@@ -2,7 +2,8 @@
|
|
|
2
2
|
* GSD Parallel Monitor Overlay
|
|
3
3
|
*
|
|
4
4
|
* Full-screen TUI overlay showing real-time parallel worker progress.
|
|
5
|
-
* Opened via `/gsd parallel watch
|
|
5
|
+
* Opened via `/gsd parallel watch`, Ctrl+Alt+P (⌃⌥P on macOS),
|
|
6
|
+
* or Ctrl+Shift+P fallback.
|
|
6
7
|
* Reads the same data sources as `scripts/parallel-monitor.mjs` but
|
|
7
8
|
* renders as a native pi-tui overlay with theme integration.
|
|
8
9
|
*/
|
|
@@ -15,6 +16,7 @@ import type { Theme } from "@gsd/pi-coding-agent";
|
|
|
15
16
|
import { truncateToWidth, visibleWidth, matchesKey, Key } from "@gsd/pi-tui";
|
|
16
17
|
|
|
17
18
|
import { formatDuration, STATUS_GLYPH, STATUS_COLOR } from "../shared/mod.js";
|
|
19
|
+
import { formattedShortcutPair } from "./shortcut-defs.js";
|
|
18
20
|
|
|
19
21
|
// ─── Types ────────────────────────────────────────────────────────────────
|
|
20
22
|
|
|
@@ -347,7 +349,12 @@ export class ParallelMonitorOverlay {
|
|
|
347
349
|
}
|
|
348
350
|
|
|
349
351
|
handleInput(data: string): void {
|
|
350
|
-
if (
|
|
352
|
+
if (
|
|
353
|
+
matchesKey(data, Key.escape) ||
|
|
354
|
+
matchesKey(data, Key.ctrlAlt("p")) ||
|
|
355
|
+
matchesKey(data, Key.ctrlShift("p")) ||
|
|
356
|
+
data === "q"
|
|
357
|
+
) {
|
|
351
358
|
this.dispose();
|
|
352
359
|
this.onClose();
|
|
353
360
|
return;
|
|
@@ -486,7 +493,7 @@ export class ParallelMonitorOverlay {
|
|
|
486
493
|
}
|
|
487
494
|
lines.push(` ${t.bold("Total: $" + this.workers.reduce((s, wk) => s + wk.cost, 0).toFixed(2))}`);
|
|
488
495
|
}
|
|
489
|
-
lines.push(t.fg("muted",
|
|
496
|
+
lines.push(t.fg("muted", ` ESC/q/${formattedShortcutPair("parallel")} close │ ↑↓ scroll`));
|
|
490
497
|
|
|
491
498
|
// Apply scroll — use terminal rows as height estimate
|
|
492
499
|
const termHeight = process.stdout.rows || 40;
|
|
@@ -280,6 +280,38 @@ function extractPathFromAnnotation(raw: string): string {
|
|
|
280
280
|
return trimmed.replace(/`/g, "");
|
|
281
281
|
}
|
|
282
282
|
|
|
283
|
+
/**
|
|
284
|
+
* Planning units sometimes use task.inputs for prose like "Current enum shape"
|
|
285
|
+
* instead of concrete file paths. Those entries should not fail path checks.
|
|
286
|
+
* Keep validation for anything that still looks like a real file reference:
|
|
287
|
+
* explicit backticks, globs, separators, dot-paths, or single-token basenames
|
|
288
|
+
* like Dockerfile.
|
|
289
|
+
*/
|
|
290
|
+
function shouldValidateInputAsPath(raw: string): boolean {
|
|
291
|
+
const trimmed = raw.trim();
|
|
292
|
+
if (!trimmed) return false;
|
|
293
|
+
|
|
294
|
+
if (/^`+[^`]+`+/.test(trimmed)) {
|
|
295
|
+
return true;
|
|
296
|
+
}
|
|
297
|
+
|
|
298
|
+
const candidate = extractPathFromAnnotation(trimmed);
|
|
299
|
+
if (!candidate) return false;
|
|
300
|
+
|
|
301
|
+
if (!/\s/.test(candidate)) {
|
|
302
|
+
return true;
|
|
303
|
+
}
|
|
304
|
+
|
|
305
|
+
return (
|
|
306
|
+
candidate.startsWith("/") ||
|
|
307
|
+
candidate.startsWith("./") ||
|
|
308
|
+
candidate.startsWith("../") ||
|
|
309
|
+
candidate.startsWith("~/") ||
|
|
310
|
+
/[\\/]/.test(candidate) ||
|
|
311
|
+
/[*?[\]{}]/.test(candidate)
|
|
312
|
+
);
|
|
313
|
+
}
|
|
314
|
+
|
|
283
315
|
/**
|
|
284
316
|
* Build a set of files that will be created by tasks up to (but not including) taskIndex.
|
|
285
317
|
* All paths are normalized for consistent comparison.
|
|
@@ -318,6 +350,7 @@ export function checkFilePathConsistency(
|
|
|
318
350
|
for (const file of filesToCheck) {
|
|
319
351
|
// Skip empty strings
|
|
320
352
|
if (!file.trim()) continue;
|
|
353
|
+
if (!shouldValidateInputAsPath(file)) continue;
|
|
321
354
|
|
|
322
355
|
// Normalize path for consistent comparison
|
|
323
356
|
const normalizedFile = normalizeFilePath(file);
|
|
@@ -354,7 +387,7 @@ export function checkFilePathConsistency(
|
|
|
354
387
|
*/
|
|
355
388
|
export function checkTaskOrdering(
|
|
356
389
|
tasks: TaskRow[],
|
|
357
|
-
|
|
390
|
+
basePath: string
|
|
358
391
|
): PreExecutionCheckJSON[] {
|
|
359
392
|
const results: PreExecutionCheckJSON[] = [];
|
|
360
393
|
|
|
@@ -378,9 +411,13 @@ export function checkTaskOrdering(
|
|
|
378
411
|
const filesToCheck = [...task.inputs];
|
|
379
412
|
|
|
380
413
|
for (const file of filesToCheck) {
|
|
414
|
+
if (!shouldValidateInputAsPath(file)) continue;
|
|
415
|
+
|
|
381
416
|
const normalizedFile = normalizeFilePath(file);
|
|
382
417
|
const creator = fileCreators.get(normalizedFile);
|
|
383
|
-
|
|
418
|
+
const absolutePath = resolve(basePath, normalizedFile);
|
|
419
|
+
const existsOnDisk = existsSync(absolutePath);
|
|
420
|
+
if (creator && creator.index > i && !existsOnDisk) {
|
|
384
421
|
// Task reads file that is created later — impossible ordering
|
|
385
422
|
results.push({
|
|
386
423
|
category: "file",
|
|
@@ -17,7 +17,6 @@ import type {
|
|
|
17
17
|
SkillResolutionReport,
|
|
18
18
|
} from "./preferences-types.js";
|
|
19
19
|
import { validatePreferences } from "./preferences-validation.js";
|
|
20
|
-
import { loadEffectiveGSDPreferences } from "./preferences.js";
|
|
21
20
|
|
|
22
21
|
// Re-export types so existing consumers of ./preferences-skills.js keep working
|
|
23
22
|
export type { GSDSkillRule, SkillDiscoveryMode, SkillResolution, SkillResolutionReport } from "./preferences-types.js";
|
|
@@ -143,38 +142,5 @@ export function resolveAllSkillReferences(preferences: GSDPreferences, cwd: stri
|
|
|
143
142
|
return { resolutions, warnings };
|
|
144
143
|
}
|
|
145
144
|
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
* If resolved, shows the path so the agent knows exactly where to read.
|
|
149
|
-
* If unresolved, marks it clearly.
|
|
150
|
-
*/
|
|
151
|
-
export function formatSkillRef(ref: string, resolutions: Map<string, SkillResolution>): string {
|
|
152
|
-
const resolution = resolutions.get(ref);
|
|
153
|
-
if (!resolution || resolution.method === "unresolved") {
|
|
154
|
-
return `${ref} (⚠ not found — check skill name or path)`;
|
|
155
|
-
}
|
|
156
|
-
// For absolute paths where SKILL.md is just appended, don't clutter the output
|
|
157
|
-
if (resolution.method === "absolute-path" || resolution.method === "absolute-dir") {
|
|
158
|
-
return ref;
|
|
159
|
-
}
|
|
160
|
-
// For bare names resolved from skill directories, show the resolved path
|
|
161
|
-
return `${ref} → \`${resolution.resolvedPath}\``;
|
|
162
|
-
}
|
|
163
|
-
|
|
164
|
-
/**
|
|
165
|
-
* Resolve the skill discovery mode from effective preferences.
|
|
166
|
-
* Defaults to "suggest" -- skills are identified during research but not installed automatically.
|
|
167
|
-
*/
|
|
168
|
-
export function resolveSkillDiscoveryMode(): SkillDiscoveryMode {
|
|
169
|
-
const prefs = loadEffectiveGSDPreferences();
|
|
170
|
-
return prefs?.preferences.skill_discovery ?? "suggest";
|
|
171
|
-
}
|
|
172
|
-
|
|
173
|
-
/**
|
|
174
|
-
* Resolve the skill staleness threshold in days.
|
|
175
|
-
* Returns 0 if disabled, default 60 if not configured.
|
|
176
|
-
*/
|
|
177
|
-
export function resolveSkillStalenessDays(): number {
|
|
178
|
-
const prefs = loadEffectiveGSDPreferences();
|
|
179
|
-
return prefs?.preferences.skill_staleness_days ?? 60;
|
|
180
|
-
}
|
|
145
|
+
// resolveSkillDiscoveryMode and resolveSkillStalenessDays moved to
|
|
146
|
+
// preferences.ts to break circular dependency (they need loadEffectiveGSDPreferences).
|
|
@@ -384,3 +384,19 @@ export interface SkillResolutionReport {
|
|
|
384
384
|
/** References that could not be resolved. */
|
|
385
385
|
warnings: string[];
|
|
386
386
|
}
|
|
387
|
+
|
|
388
|
+
/**
|
|
389
|
+
* Format a skill reference for the system prompt.
|
|
390
|
+
* If resolved, shows the path so the agent knows exactly where to read.
|
|
391
|
+
* If unresolved, marks it clearly.
|
|
392
|
+
*/
|
|
393
|
+
export function formatSkillRef(ref: string, resolutions: Map<string, SkillResolution>): string {
|
|
394
|
+
const resolution = resolutions.get(ref);
|
|
395
|
+
if (!resolution || resolution.method === "unresolved") {
|
|
396
|
+
return `${ref} (⚠ not found — check skill name or path)`;
|
|
397
|
+
}
|
|
398
|
+
if (resolution.method === "absolute-path" || resolution.method === "absolute-dir") {
|
|
399
|
+
return ref;
|
|
400
|
+
}
|
|
401
|
+
return `${ref} → \`${resolution.resolvedPath}\``;
|
|
402
|
+
}
|
|
@@ -29,9 +29,10 @@ import {
|
|
|
29
29
|
type GSDPreferences,
|
|
30
30
|
type LoadedGSDPreferences,
|
|
31
31
|
type SkillResolution,
|
|
32
|
+
type SkillDiscoveryMode,
|
|
33
|
+
formatSkillRef,
|
|
32
34
|
} from "./preferences-types.js";
|
|
33
35
|
import { validatePreferences } from "./preferences-validation.js";
|
|
34
|
-
import { formatSkillRef } from "./preferences-skills.js";
|
|
35
36
|
|
|
36
37
|
// ─── Re-exports: types ──────────────────────────────────────────────────────
|
|
37
38
|
// Every type/interface that was previously exported from this file is
|
|
@@ -60,11 +61,20 @@ export type {
|
|
|
60
61
|
export { validatePreferences } from "./preferences-validation.js";
|
|
61
62
|
|
|
62
63
|
// ─── Re-exports: skills ─────────────────────────────────────────────────────
|
|
63
|
-
export {
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
64
|
+
export { resolveAllSkillReferences } from "./preferences-skills.js";
|
|
65
|
+
|
|
66
|
+
// These lived in preferences-skills.ts but imported loadEffectiveGSDPreferences
|
|
67
|
+
// back from this file, creating a circular dependency. Moved here since they
|
|
68
|
+
// are trivial wrappers over loadEffectiveGSDPreferences.
|
|
69
|
+
export function resolveSkillDiscoveryMode(): SkillDiscoveryMode {
|
|
70
|
+
const prefs = loadEffectiveGSDPreferences();
|
|
71
|
+
return prefs?.preferences.skill_discovery ?? "suggest";
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
export function resolveSkillStalenessDays(): number {
|
|
75
|
+
const prefs = loadEffectiveGSDPreferences();
|
|
76
|
+
return prefs?.preferences.skill_staleness_days ?? 60;
|
|
77
|
+
}
|
|
68
78
|
|
|
69
79
|
// ─── Re-exports: models ─────────────────────────────────────────────────────
|
|
70
80
|
export {
|
|
@@ -389,6 +399,9 @@ function mergePreferences(base: GSDPreferences, override: GSDPreferences): GSDPr
|
|
|
389
399
|
github: (base.github || override.github)
|
|
390
400
|
? { ...(base.github ?? {}), ...(override.github ?? {}) } as import("../github-sync/types.js").GitHubSyncConfig
|
|
391
401
|
: undefined,
|
|
402
|
+
experimental: (base.experimental || override.experimental)
|
|
403
|
+
? { ...(base.experimental ?? {}), ...(override.experimental ?? {}) }
|
|
404
|
+
: undefined,
|
|
392
405
|
service_tier: override.service_tier ?? base.service_tier,
|
|
393
406
|
forensics_dedup: override.forensics_dedup ?? base.forensics_dedup,
|
|
394
407
|
show_token_cost: override.show_token_cost ?? base.show_token_cost,
|
|
@@ -143,10 +143,15 @@ export function loadPrompt(name: string, vars: Record<string, string> = {}): str
|
|
|
143
143
|
}
|
|
144
144
|
|
|
145
145
|
for (const [key, value] of Object.entries(effectiveVars)) {
|
|
146
|
+
const safeValue =
|
|
147
|
+
key === "workingDirectory" && typeof value === "string"
|
|
148
|
+
? value.replaceAll("\\", "/")
|
|
149
|
+
: value;
|
|
150
|
+
|
|
146
151
|
// Use split/join instead of replaceAll to avoid JavaScript's special
|
|
147
152
|
// replacement patterns ($', $`, $&) being interpreted in the value.
|
|
148
153
|
// See: https://github.com/gsd-build/gsd-2/issues/2968
|
|
149
|
-
content = content.split(`{{${key}}}`).join(
|
|
154
|
+
content = content.split(`{{${key}}}`).join(safeValue);
|
|
150
155
|
}
|
|
151
156
|
|
|
152
157
|
return content.trim();
|