gsd-pi 2.75.0-dev.063e5a3 → 2.75.0-dev.fd2382b9f
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +186 -149
- package/dist/claude-cli-check.d.ts +10 -0
- package/dist/claude-cli-check.js +13 -3
- package/dist/headless-events.d.ts +1 -1
- package/dist/headless-events.js +5 -2
- package/dist/headless.js +5 -6
- package/dist/loader.js +0 -0
- package/dist/onboarding.js +39 -14
- package/dist/resources/extensions/ask-user-questions.js +17 -5
- package/dist/resources/extensions/claude-code-cli/models.js +9 -0
- package/dist/resources/extensions/claude-code-cli/readiness.js +12 -2
- package/dist/resources/extensions/claude-code-cli/stream-adapter.js +76 -4
- package/dist/resources/extensions/gsd/auto/detect-stuck.js +9 -0
- package/dist/resources/extensions/gsd/auto/loop.js +67 -4
- package/dist/resources/extensions/gsd/auto/phases.js +70 -47
- package/dist/resources/extensions/gsd/auto/resolve.js +1 -1
- package/dist/resources/extensions/gsd/auto/run-unit.js +10 -1
- package/dist/resources/extensions/gsd/auto/session.js +5 -0
- package/dist/resources/extensions/gsd/auto-artifact-paths.js +20 -0
- package/dist/resources/extensions/gsd/auto-dashboard.js +15 -7
- package/dist/resources/extensions/gsd/auto-dispatch.js +112 -6
- package/dist/resources/extensions/gsd/auto-loop.js +1 -1
- package/dist/resources/extensions/gsd/auto-model-selection.js +10 -2
- package/dist/resources/extensions/gsd/auto-post-unit.js +9 -7
- package/dist/resources/extensions/gsd/auto-prompts.js +151 -37
- package/dist/resources/extensions/gsd/auto-recovery.js +57 -0
- package/dist/resources/extensions/gsd/auto-start.js +5 -3
- package/dist/resources/extensions/gsd/auto-verification.js +3 -3
- package/dist/resources/extensions/gsd/auto-worktree.js +55 -1
- package/dist/resources/extensions/gsd/auto.js +50 -25
- package/dist/resources/extensions/gsd/bootstrap/agent-end-recovery.js +8 -21
- package/dist/resources/extensions/gsd/bootstrap/db-tools.js +22 -4
- package/dist/resources/extensions/gsd/bootstrap/query-tools.js +29 -0
- package/dist/resources/extensions/gsd/bootstrap/register-hooks.js +22 -0
- package/dist/resources/extensions/gsd/commands/catalog.js +67 -3
- package/dist/resources/extensions/gsd/commands/handlers/core.js +6 -0
- package/dist/resources/extensions/gsd/commands/handlers/escalate.js +171 -0
- package/dist/resources/extensions/gsd/commands/handlers/ops.js +16 -0
- package/dist/resources/extensions/gsd/commands/handlers/workflow.js +228 -29
- package/dist/resources/extensions/gsd/commands-cmux.js +5 -2
- package/dist/resources/extensions/gsd/commands-debug.js +388 -0
- package/dist/resources/extensions/gsd/commands-do.js +1 -0
- package/dist/resources/extensions/gsd/commands-handlers.js +21 -2
- package/dist/resources/extensions/gsd/commands-prefs-wizard.js +1 -1
- package/dist/resources/extensions/gsd/commands-scan.js +94 -0
- package/dist/resources/extensions/gsd/commands-workflow-templates.js +101 -2
- package/dist/resources/extensions/gsd/custom-workflow-engine.js +74 -54
- package/dist/resources/extensions/gsd/db-writer.js +1 -0
- package/dist/resources/extensions/gsd/debug-session-store.js +238 -0
- package/dist/resources/extensions/gsd/definition-loader.js +7 -0
- package/dist/resources/extensions/gsd/docs/preferences-reference.md +9 -9
- package/dist/resources/extensions/gsd/doctor-git-checks.js +5 -1
- package/dist/resources/extensions/gsd/doctor-proactive.js +4 -1
- package/dist/resources/extensions/gsd/doctor-providers.js +48 -20
- package/dist/resources/extensions/gsd/doctor-runtime-checks.js +22 -4
- package/dist/resources/extensions/gsd/doctor.js +7 -1
- package/dist/resources/extensions/gsd/error-classifier.js +6 -3
- package/dist/resources/extensions/gsd/escalation.js +321 -0
- package/dist/resources/extensions/gsd/forensics.js +26 -29
- package/dist/resources/extensions/gsd/git-service.js +0 -1
- package/dist/resources/extensions/gsd/graph.js +26 -2
- package/dist/resources/extensions/gsd/gsd-db.js +254 -29
- 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/metrics.js +1 -0
- package/dist/resources/extensions/gsd/model-cost-table.js +3 -1
- package/dist/resources/extensions/gsd/model-router.js +7 -1
- package/dist/resources/extensions/gsd/native-git-bridge.js +137 -5
- package/dist/resources/extensions/gsd/notification-widget.js +24 -39
- package/dist/resources/extensions/gsd/notifications.js +4 -0
- package/dist/resources/extensions/gsd/post-execution-checks.js +27 -11
- package/dist/resources/extensions/gsd/pre-execution-checks.js +97 -4
- package/dist/resources/extensions/gsd/preferences-models.js +1 -0
- package/dist/resources/extensions/gsd/preferences-types.js +2 -1
- package/dist/resources/extensions/gsd/preferences-validation.js +42 -8
- package/dist/resources/extensions/gsd/preferences.js +10 -10
- package/dist/resources/extensions/gsd/prompts/debug-diagnose.md +25 -0
- package/dist/resources/extensions/gsd/prompts/debug-session-manager.md +80 -0
- package/dist/resources/extensions/gsd/prompts/execute-task.md +12 -0
- package/dist/resources/extensions/gsd/prompts/plan-milestone.md +12 -0
- package/dist/resources/extensions/gsd/prompts/refine-slice.md +69 -0
- package/dist/resources/extensions/gsd/prompts/scan.md +79 -0
- package/dist/resources/extensions/gsd/prompts/workflow-oneshot.md +26 -0
- package/dist/resources/extensions/gsd/run-manager.js +37 -17
- package/dist/resources/extensions/gsd/state.js +47 -3
- package/dist/resources/extensions/gsd/templates/PREFERENCES.md +7 -7
- package/dist/resources/extensions/gsd/tools/complete-task.js +80 -0
- package/dist/resources/extensions/gsd/tools/plan-milestone.js +37 -12
- package/dist/resources/extensions/gsd/tools/plan-slice.js +5 -2
- package/dist/resources/extensions/gsd/uok/flags.js +7 -7
- package/dist/resources/extensions/gsd/uok/kernel.js +8 -3
- package/dist/resources/extensions/gsd/workflow-dispatch.js +64 -0
- package/dist/resources/extensions/gsd/workflow-install.js +327 -0
- package/dist/resources/extensions/gsd/workflow-manifest.js +8 -0
- package/dist/resources/extensions/gsd/workflow-mcp.js +1 -6
- package/dist/resources/extensions/gsd/workflow-plugins.js +346 -0
- package/dist/resources/extensions/gsd/workflow-templates/accessibility-audit.md +88 -0
- package/dist/resources/extensions/gsd/workflow-templates/api-breaking-change.md +117 -0
- package/dist/resources/extensions/gsd/workflow-templates/bugfix.md +1 -0
- package/dist/resources/extensions/gsd/workflow-templates/changelog-gen.md +82 -0
- package/dist/resources/extensions/gsd/workflow-templates/ci-bootstrap.md +144 -0
- package/dist/resources/extensions/gsd/workflow-templates/dead-code.md +81 -0
- package/dist/resources/extensions/gsd/workflow-templates/dep-upgrade.md +1 -0
- package/dist/resources/extensions/gsd/workflow-templates/docs-sync.yaml +76 -0
- package/dist/resources/extensions/gsd/workflow-templates/env-audit.yaml +88 -0
- package/dist/resources/extensions/gsd/workflow-templates/full-project.md +1 -0
- package/dist/resources/extensions/gsd/workflow-templates/hotfix.md +1 -0
- package/dist/resources/extensions/gsd/workflow-templates/issue-triage.md +84 -0
- package/dist/resources/extensions/gsd/workflow-templates/observability-setup.md +133 -0
- package/dist/resources/extensions/gsd/workflow-templates/onboarding-check.md +74 -0
- package/dist/resources/extensions/gsd/workflow-templates/performance-audit.md +125 -0
- package/dist/resources/extensions/gsd/workflow-templates/pr-review.md +67 -0
- package/dist/resources/extensions/gsd/workflow-templates/pr-triage.md +83 -0
- package/dist/resources/extensions/gsd/workflow-templates/refactor.md +1 -0
- package/dist/resources/extensions/gsd/workflow-templates/registry.json +184 -0
- package/dist/resources/extensions/gsd/workflow-templates/release.md +118 -0
- package/dist/resources/extensions/gsd/workflow-templates/rename-symbol.yaml +99 -0
- package/dist/resources/extensions/gsd/workflow-templates/security-audit.md +1 -0
- package/dist/resources/extensions/gsd/workflow-templates/small-feature.md +1 -0
- package/dist/resources/extensions/gsd/workflow-templates/spike.md +1 -0
- package/dist/resources/extensions/gsd/workflow-templates/test-backfill.yaml +73 -0
- package/dist/resources/extensions/gsd/worktree-resolver.js +42 -1
- package/dist/resources/extensions/remote-questions/commands.js +380 -0
- package/dist/resources/extensions/remote-questions/manager.js +39 -5
- package/dist/resources/extensions/remote-questions/telegram-adapter.js +79 -4
- package/dist/resources/extensions/shared/interview-ui.js +189 -1
- package/dist/resources/extensions/shared/layout-utils.js +17 -0
- package/dist/resources/extensions/shared/rtk-shared.js +47 -0
- package/dist/resources/extensions/shared/rtk.js +3 -46
- package/dist/resources/skills/create-workflow/SKILL.md +33 -6
- package/dist/rtk-shared.d.ts +10 -0
- package/dist/rtk-shared.js +47 -0
- package/dist/rtk.d.ts +2 -6
- package/dist/rtk.js +3 -48
- package/dist/shared/workspace-types.d.ts +52 -0
- package/dist/shared/workspace-types.js +1 -0
- package/dist/tsconfig.extensions.tsbuildinfo +1 -1
- package/dist/update-check.d.ts +10 -0
- package/dist/update-check.js +24 -3
- package/dist/web/standalone/.next/BUILD_ID +1 -1
- package/dist/web/standalone/.next/app-path-routes-manifest.json +6 -6
- 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 +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/git/route.js +1 -1
- package/dist/web/standalone/.next/server/app/api/update/route.js +1 -1
- package/dist/web/standalone/.next/server/app/index.html +1 -1
- package/dist/web/standalone/.next/server/app/index.rsc +2 -2
- package/dist/web/standalone/.next/server/app/index.segments/__PAGE__.segment.rsc +1 -1
- package/dist/web/standalone/.next/server/app/index.segments/_full.segment.rsc +2 -2
- 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 +6 -6
- package/dist/web/standalone/.next/server/chunks/6897.js +2 -2
- 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 +9 -0
- package/dist/web/standalone/.next/static/chunks/{webpack-b868033a5834586d.js → webpack-6c7cda3e318eedb6.js} +1 -1
- package/dist/web/standalone/.next/static/css/3e9cdadb4d23b8a4.css +1 -0
- package/dist/welcome-screen.js +48 -24
- package/dist/wizard.js +2 -2
- package/dist/worktree-cli.d.ts +6 -5
- package/dist/worktree-cli.js +23 -7
- package/package.json +3 -3
- package/packages/mcp-server/tsconfig.tsbuildinfo +1 -1
- package/packages/native/tsconfig.tsbuildinfo +1 -1
- package/packages/pi-agent-core/tsconfig.tsbuildinfo +1 -1
- package/packages/pi-ai/dist/models/capability-patches.d.ts.map +1 -1
- package/packages/pi-ai/dist/models/capability-patches.js +3 -2
- package/packages/pi-ai/dist/models/capability-patches.js.map +1 -1
- package/packages/pi-ai/dist/models/generated/amazon-bedrock.d.ts +68 -0
- package/packages/pi-ai/dist/models/generated/amazon-bedrock.d.ts.map +1 -1
- package/packages/pi-ai/dist/models/generated/amazon-bedrock.js +68 -0
- package/packages/pi-ai/dist/models/generated/amazon-bedrock.js.map +1 -1
- package/packages/pi-ai/dist/models/generated/anthropic.d.ts +17 -0
- package/packages/pi-ai/dist/models/generated/anthropic.d.ts.map +1 -1
- package/packages/pi-ai/dist/models/generated/anthropic.js +17 -0
- package/packages/pi-ai/dist/models/generated/anthropic.js.map +1 -1
- package/packages/pi-ai/dist/models/generated/google-antigravity.d.ts +17 -0
- package/packages/pi-ai/dist/models/generated/google-antigravity.d.ts.map +1 -1
- package/packages/pi-ai/dist/models/generated/google-antigravity.js +17 -0
- package/packages/pi-ai/dist/models/generated/google-antigravity.js.map +1 -1
- package/packages/pi-ai/dist/models/generated/groq.d.ts +0 -153
- package/packages/pi-ai/dist/models/generated/groq.d.ts.map +1 -1
- package/packages/pi-ai/dist/models/generated/groq.js +0 -153
- package/packages/pi-ai/dist/models/generated/groq.js.map +1 -1
- package/packages/pi-ai/dist/models/generated/index.d.ts +136 -153
- package/packages/pi-ai/dist/models/generated/index.d.ts.map +1 -1
- package/packages/pi-ai/dist/models/generated/openai-codex.d.ts +17 -0
- package/packages/pi-ai/dist/models/generated/openai-codex.d.ts.map +1 -1
- package/packages/pi-ai/dist/models/generated/openai-codex.js +17 -0
- package/packages/pi-ai/dist/models/generated/openai-codex.js.map +1 -1
- package/packages/pi-ai/dist/models/generated/openrouter.d.ts +17 -0
- package/packages/pi-ai/dist/models/generated/openrouter.d.ts.map +1 -1
- package/packages/pi-ai/dist/models/generated/openrouter.js +17 -0
- package/packages/pi-ai/dist/models/generated/openrouter.js.map +1 -1
- package/packages/pi-ai/dist/models.generated.test.js +17 -0
- package/packages/pi-ai/dist/models.generated.test.js.map +1 -1
- package/packages/pi-ai/dist/providers/amazon-bedrock.d.ts +22 -1
- package/packages/pi-ai/dist/providers/amazon-bedrock.d.ts.map +1 -1
- package/packages/pi-ai/dist/providers/amazon-bedrock.js +40 -6
- package/packages/pi-ai/dist/providers/amazon-bedrock.js.map +1 -1
- package/packages/pi-ai/dist/providers/amazon-bedrock.test.d.ts +2 -0
- package/packages/pi-ai/dist/providers/amazon-bedrock.test.d.ts.map +1 -0
- package/packages/pi-ai/dist/providers/amazon-bedrock.test.js +106 -0
- package/packages/pi-ai/dist/providers/amazon-bedrock.test.js.map +1 -0
- package/packages/pi-ai/dist/providers/anthropic-auth.test.js +42 -1
- package/packages/pi-ai/dist/providers/anthropic-auth.test.js.map +1 -1
- package/packages/pi-ai/dist/providers/anthropic-shared.d.ts +20 -1
- package/packages/pi-ai/dist/providers/anthropic-shared.d.ts.map +1 -1
- package/packages/pi-ai/dist/providers/anthropic-shared.js +32 -2
- package/packages/pi-ai/dist/providers/anthropic-shared.js.map +1 -1
- package/packages/pi-ai/dist/providers/anthropic-shared.test.js +12 -1
- package/packages/pi-ai/dist/providers/anthropic-shared.test.js.map +1 -1
- package/packages/pi-ai/dist/providers/anthropic.d.ts +11 -0
- package/packages/pi-ai/dist/providers/anthropic.d.ts.map +1 -1
- package/packages/pi-ai/dist/providers/anthropic.js +18 -1
- package/packages/pi-ai/dist/providers/anthropic.js.map +1 -1
- package/packages/pi-ai/dist/utils/oauth/openai-codex.d.ts.map +1 -1
- package/packages/pi-ai/dist/utils/oauth/openai-codex.js +12 -0
- package/packages/pi-ai/dist/utils/oauth/openai-codex.js.map +1 -1
- package/packages/pi-ai/package.json +1 -1
- package/packages/pi-ai/scripts/generate-models.ts +50 -0
- package/packages/pi-ai/src/models/capability-patches.ts +5 -2
- package/packages/pi-ai/src/models/generated/amazon-bedrock.ts +68 -0
- package/packages/pi-ai/src/models/generated/anthropic.ts +17 -0
- package/packages/pi-ai/src/models/generated/google-antigravity.ts +17 -0
- package/packages/pi-ai/src/models/generated/groq.ts +0 -153
- package/packages/pi-ai/src/models/generated/openai-codex.ts +17 -0
- package/packages/pi-ai/src/models/generated/openrouter.ts +17 -0
- package/packages/pi-ai/src/models.generated.test.ts +17 -0
- package/packages/pi-ai/src/providers/amazon-bedrock.test.ts +164 -0
- package/packages/pi-ai/src/providers/amazon-bedrock.ts +41 -7
- package/packages/pi-ai/src/providers/anthropic-auth.test.ts +47 -1
- package/packages/pi-ai/src/providers/anthropic-shared.test.ts +15 -1
- package/packages/pi-ai/src/providers/anthropic-shared.ts +36 -3
- package/packages/pi-ai/src/providers/anthropic.ts +19 -1
- package/packages/pi-ai/src/utils/oauth/openai-codex.ts +15 -0
- package/packages/pi-ai/tsconfig.tsbuildinfo +1 -1
- package/packages/pi-coding-agent/dist/core/agent-session-abort-order.test.d.ts +2 -0
- package/packages/pi-coding-agent/dist/core/agent-session-abort-order.test.d.ts.map +1 -0
- package/packages/pi-coding-agent/dist/core/agent-session-abort-order.test.js +38 -0
- package/packages/pi-coding-agent/dist/core/agent-session-abort-order.test.js.map +1 -0
- package/packages/pi-coding-agent/dist/core/auth-storage.d.ts +14 -0
- package/packages/pi-coding-agent/dist/core/auth-storage.d.ts.map +1 -1
- package/packages/pi-coding-agent/dist/core/auth-storage.js +34 -0
- package/packages/pi-coding-agent/dist/core/auth-storage.js.map +1 -1
- package/packages/pi-coding-agent/dist/core/auth-storage.test.js +74 -0
- package/packages/pi-coding-agent/dist/core/auth-storage.test.js.map +1 -1
- package/packages/pi-coding-agent/dist/core/chat-controller-ordering.test.js +4 -1
- package/packages/pi-coding-agent/dist/core/chat-controller-ordering.test.js.map +1 -1
- package/packages/pi-coding-agent/dist/core/model-registry-auth-mode.test.js +32 -0
- package/packages/pi-coding-agent/dist/core/model-registry-auth-mode.test.js.map +1 -1
- package/packages/pi-coding-agent/dist/core/sdk.d.ts.map +1 -1
- package/packages/pi-coding-agent/dist/core/sdk.js +32 -0
- package/packages/pi-coding-agent/dist/core/sdk.js.map +1 -1
- package/packages/pi-coding-agent/dist/core/skill-tool.test.js +2 -2
- package/packages/pi-coding-agent/dist/core/skill-tool.test.js.map +1 -1
- package/packages/pi-coding-agent/dist/modes/interactive/components/chat-frame.d.ts.map +1 -1
- package/packages/pi-coding-agent/dist/modes/interactive/components/chat-frame.js +17 -7
- package/packages/pi-coding-agent/dist/modes/interactive/components/chat-frame.js.map +1 -1
- package/packages/pi-coding-agent/dist/modes/interactive/components/footer.d.ts.map +1 -1
- package/packages/pi-coding-agent/dist/modes/interactive/components/footer.js +48 -34
- package/packages/pi-coding-agent/dist/modes/interactive/components/footer.js.map +1 -1
- package/packages/pi-coding-agent/dist/modes/interactive/controllers/chat-controller.d.ts +4 -0
- package/packages/pi-coding-agent/dist/modes/interactive/controllers/chat-controller.d.ts.map +1 -1
- package/packages/pi-coding-agent/dist/modes/interactive/controllers/chat-controller.js +83 -33
- package/packages/pi-coding-agent/dist/modes/interactive/controllers/chat-controller.js.map +1 -1
- package/packages/pi-coding-agent/dist/modes/interactive/theme/theme-schema.d.ts +70 -0
- package/packages/pi-coding-agent/dist/modes/interactive/theme/theme-schema.d.ts.map +1 -0
- package/packages/pi-coding-agent/dist/modes/interactive/theme/theme-schema.js +77 -0
- package/packages/pi-coding-agent/dist/modes/interactive/theme/theme-schema.js.map +1 -0
- package/packages/pi-coding-agent/dist/modes/interactive/theme/theme.d.ts +1 -66
- package/packages/pi-coding-agent/dist/modes/interactive/theme/theme.d.ts.map +1 -1
- package/packages/pi-coding-agent/dist/modes/interactive/theme/theme.js +1 -75
- package/packages/pi-coding-agent/dist/modes/interactive/theme/theme.js.map +1 -1
- package/packages/pi-coding-agent/dist/modes/interactive/theme/themes.d.ts +1 -1
- package/packages/pi-coding-agent/dist/modes/interactive/theme/themes.d.ts.map +1 -1
- package/packages/pi-coding-agent/dist/modes/interactive/theme/themes.js +192 -24
- package/packages/pi-coding-agent/dist/modes/interactive/theme/themes.js.map +1 -1
- package/packages/pi-coding-agent/src/core/agent-session-abort-order.test.ts +56 -0
- package/packages/pi-coding-agent/src/core/auth-storage.test.ts +83 -0
- package/packages/pi-coding-agent/src/core/auth-storage.ts +35 -0
- package/packages/pi-coding-agent/src/core/chat-controller-ordering.test.ts +4 -1
- package/packages/pi-coding-agent/src/core/model-registry-auth-mode.test.ts +37 -1
- package/packages/pi-coding-agent/src/core/sdk.ts +41 -0
- package/packages/pi-coding-agent/src/core/skill-tool.test.ts +2 -2
- package/packages/pi-coding-agent/src/modes/interactive/components/chat-frame.ts +19 -7
- package/packages/pi-coding-agent/src/modes/interactive/components/footer.ts +53 -31
- package/packages/pi-coding-agent/src/modes/interactive/controllers/chat-controller.ts +88 -36
- package/packages/pi-coding-agent/src/modes/interactive/theme/theme-schema.ts +83 -0
- package/packages/pi-coding-agent/src/modes/interactive/theme/theme.ts +2 -83
- package/packages/pi-coding-agent/src/modes/interactive/theme/themes.ts +208 -27
- package/packages/pi-coding-agent/tsconfig.tsbuildinfo +1 -1
- package/packages/pi-tui/tsconfig.tsbuildinfo +1 -1
- package/packages/rpc-client/tsconfig.tsbuildinfo +1 -1
- package/pkg/dist/modes/interactive/theme/theme-schema.d.ts +70 -0
- package/pkg/dist/modes/interactive/theme/theme-schema.d.ts.map +1 -0
- package/pkg/dist/modes/interactive/theme/theme-schema.js +77 -0
- package/pkg/dist/modes/interactive/theme/theme-schema.js.map +1 -0
- package/pkg/dist/modes/interactive/theme/theme.d.ts +1 -66
- package/pkg/dist/modes/interactive/theme/theme.d.ts.map +1 -1
- package/pkg/dist/modes/interactive/theme/theme.js +1 -75
- package/pkg/dist/modes/interactive/theme/theme.js.map +1 -1
- package/pkg/dist/modes/interactive/theme/themes.d.ts +1 -1
- package/pkg/dist/modes/interactive/theme/themes.d.ts.map +1 -1
- package/pkg/dist/modes/interactive/theme/themes.js +192 -24
- package/pkg/dist/modes/interactive/theme/themes.js.map +1 -1
- package/src/resources/extensions/ask-user-questions.ts +24 -6
- package/src/resources/extensions/claude-code-cli/models.ts +9 -0
- package/src/resources/extensions/claude-code-cli/readiness.ts +13 -2
- package/src/resources/extensions/claude-code-cli/stream-adapter.ts +94 -4
- package/src/resources/extensions/claude-code-cli/tests/stream-adapter.test.ts +84 -0
- package/src/resources/extensions/gsd/auto/detect-stuck.ts +10 -0
- package/src/resources/extensions/gsd/auto/loop-deps.ts +1 -0
- package/src/resources/extensions/gsd/auto/loop.ts +109 -3
- package/src/resources/extensions/gsd/auto/phases.ts +94 -60
- package/src/resources/extensions/gsd/auto/resolve.ts +1 -1
- package/src/resources/extensions/gsd/auto/run-unit.ts +11 -1
- package/src/resources/extensions/gsd/auto/session.ts +7 -0
- package/src/resources/extensions/gsd/auto-artifact-paths.ts +20 -0
- package/src/resources/extensions/gsd/auto-dashboard.ts +21 -4
- package/src/resources/extensions/gsd/auto-dispatch.ts +123 -5
- package/src/resources/extensions/gsd/auto-loop.ts +1 -1
- package/src/resources/extensions/gsd/auto-model-selection.ts +13 -2
- package/src/resources/extensions/gsd/auto-post-unit.ts +9 -7
- package/src/resources/extensions/gsd/auto-prompts.ts +178 -38
- package/src/resources/extensions/gsd/auto-recovery.ts +63 -1
- package/src/resources/extensions/gsd/auto-start.ts +8 -6
- package/src/resources/extensions/gsd/auto-verification.ts +3 -3
- package/src/resources/extensions/gsd/auto-worktree.ts +65 -0
- package/src/resources/extensions/gsd/auto.ts +53 -28
- package/src/resources/extensions/gsd/bootstrap/agent-end-recovery.ts +8 -21
- package/src/resources/extensions/gsd/bootstrap/db-tools.ts +22 -4
- package/src/resources/extensions/gsd/bootstrap/query-tools.ts +31 -0
- package/src/resources/extensions/gsd/bootstrap/register-hooks.ts +22 -0
- package/src/resources/extensions/gsd/commands/catalog.ts +60 -3
- package/src/resources/extensions/gsd/commands/handlers/core.ts +6 -0
- package/src/resources/extensions/gsd/commands/handlers/escalate.ts +216 -0
- package/src/resources/extensions/gsd/commands/handlers/ops.ts +16 -0
- package/src/resources/extensions/gsd/commands/handlers/workflow.ts +279 -29
- package/src/resources/extensions/gsd/commands-cmux.ts +6 -2
- package/src/resources/extensions/gsd/commands-debug.ts +484 -0
- package/src/resources/extensions/gsd/commands-do.ts +1 -0
- package/src/resources/extensions/gsd/commands-handlers.ts +19 -2
- package/src/resources/extensions/gsd/commands-prefs-wizard.ts +1 -1
- package/src/resources/extensions/gsd/commands-scan.ts +125 -0
- package/src/resources/extensions/gsd/commands-workflow-templates.ts +129 -2
- package/src/resources/extensions/gsd/custom-workflow-engine.ts +85 -60
- package/src/resources/extensions/gsd/db-writer.ts +3 -0
- package/src/resources/extensions/gsd/debug-session-store.ts +377 -0
- package/src/resources/extensions/gsd/definition-loader.ts +7 -0
- package/src/resources/extensions/gsd/docs/preferences-reference.md +9 -9
- package/src/resources/extensions/gsd/doctor-git-checks.ts +5 -1
- package/src/resources/extensions/gsd/doctor-proactive.ts +4 -1
- package/src/resources/extensions/gsd/doctor-providers.ts +52 -22
- package/src/resources/extensions/gsd/doctor-runtime-checks.ts +23 -4
- package/src/resources/extensions/gsd/doctor-types.ts +1 -0
- package/src/resources/extensions/gsd/doctor.ts +7 -1
- package/src/resources/extensions/gsd/error-classifier.ts +6 -3
- package/src/resources/extensions/gsd/escalation.ts +367 -0
- package/src/resources/extensions/gsd/forensics.ts +25 -29
- package/src/resources/extensions/gsd/git-service.ts +0 -1
- package/src/resources/extensions/gsd/graph.ts +33 -3
- package/src/resources/extensions/gsd/gsd-db.ts +306 -29
- 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/metrics.ts +1 -0
- package/src/resources/extensions/gsd/model-cost-table.ts +3 -1
- package/src/resources/extensions/gsd/model-router.ts +15 -1
- package/src/resources/extensions/gsd/native-git-bridge.ts +134 -6
- package/src/resources/extensions/gsd/notification-widget.ts +25 -43
- package/src/resources/extensions/gsd/notifications.ts +6 -0
- package/src/resources/extensions/gsd/post-execution-checks.ts +37 -14
- package/src/resources/extensions/gsd/pre-execution-checks.ts +98 -8
- package/src/resources/extensions/gsd/preferences-models.ts +1 -0
- package/src/resources/extensions/gsd/preferences-types.ts +10 -2
- package/src/resources/extensions/gsd/preferences-validation.ts +33 -7
- package/src/resources/extensions/gsd/preferences.ts +10 -10
- package/src/resources/extensions/gsd/prompts/debug-diagnose.md +25 -0
- package/src/resources/extensions/gsd/prompts/debug-session-manager.md +80 -0
- package/src/resources/extensions/gsd/prompts/execute-task.md +12 -0
- package/src/resources/extensions/gsd/prompts/plan-milestone.md +12 -0
- package/src/resources/extensions/gsd/prompts/refine-slice.md +69 -0
- package/src/resources/extensions/gsd/prompts/scan.md +79 -0
- package/src/resources/extensions/gsd/prompts/workflow-oneshot.md +26 -0
- package/src/resources/extensions/gsd/run-manager.ts +53 -19
- package/src/resources/extensions/gsd/state.ts +50 -2
- package/src/resources/extensions/gsd/templates/PREFERENCES.md +7 -7
- package/src/resources/extensions/gsd/tests/agent-end-retry.test.ts +1 -34
- package/src/resources/extensions/gsd/tests/artifact-corruption-2630.test.ts +7 -0
- package/src/resources/extensions/gsd/tests/auto-loop.test.ts +45 -31
- package/src/resources/extensions/gsd/tests/auto-recovery.test.ts +123 -1
- package/src/resources/extensions/gsd/tests/auto-wrapup-inflight-guard.test.ts +39 -0
- package/src/resources/extensions/gsd/tests/autocomplete-regressions-1675.test.ts +39 -0
- package/src/resources/extensions/gsd/tests/commands-do.test.ts +48 -0
- package/src/resources/extensions/gsd/tests/commands-scan.test.ts +351 -0
- package/src/resources/extensions/gsd/tests/commands-workflow-custom.test.ts +8 -6
- package/src/resources/extensions/gsd/tests/complete-slice.test.ts +2 -2
- package/src/resources/extensions/gsd/tests/complete-task.test.ts +2 -2
- package/src/resources/extensions/gsd/tests/custom-workflow-engine.test.ts +63 -0
- package/src/resources/extensions/gsd/tests/debug-command-handler.test.ts +905 -0
- package/src/resources/extensions/gsd/tests/debug-command-lifecycle.integration.test.ts +1229 -0
- package/src/resources/extensions/gsd/tests/debug-session-store.test.ts +565 -0
- package/src/resources/extensions/gsd/tests/discuss-milestone-structured-questions.test.ts +64 -0
- package/src/resources/extensions/gsd/tests/dispatch-complete-milestone-guard.test.ts +67 -0
- package/src/resources/extensions/gsd/tests/doctor-providers.test.ts +62 -18
- package/src/resources/extensions/gsd/tests/enhanced-verification-integration.test.ts +5 -0
- package/src/resources/extensions/gsd/tests/escalation.test.ts +818 -0
- package/src/resources/extensions/gsd/tests/finalize-timeout-guard.test.ts +29 -12
- package/src/resources/extensions/gsd/tests/flat-rate-routing-guard.test.ts +106 -0
- package/src/resources/extensions/gsd/tests/forensics-hook-key-parse.test.ts +74 -0
- package/src/resources/extensions/gsd/tests/graph-operations.test.ts +0 -4
- package/src/resources/extensions/gsd/tests/gsd-db.test.ts +44 -1
- package/src/resources/extensions/gsd/tests/health-widget.test.ts +8 -2
- package/src/resources/extensions/gsd/tests/integration/doctor-git.test.ts +39 -0
- package/src/resources/extensions/gsd/tests/integration/doctor-proactive.test.ts +44 -0
- package/src/resources/extensions/gsd/tests/integration/doctor-runtime.test.ts +68 -1
- package/src/resources/extensions/gsd/tests/integration/git-service.test.ts +109 -11
- package/src/resources/extensions/gsd/tests/integration/idle-recovery.test.ts +51 -0
- package/src/resources/extensions/gsd/tests/integration/test-isolation.ts +53 -0
- package/src/resources/extensions/gsd/tests/journal-integration.test.ts +171 -1
- package/src/resources/extensions/gsd/tests/md-importer.test.ts +1 -1
- package/src/resources/extensions/gsd/tests/memory-store.test.ts +2 -2
- 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 +1 -1
- package/src/resources/extensions/gsd/tests/model-unittype-mapping.test.ts +59 -0
- package/src/resources/extensions/gsd/tests/notification-widget.test.ts +1 -1
- package/src/resources/extensions/gsd/tests/plan-slice.test.ts +17 -0
- package/src/resources/extensions/gsd/tests/post-execution-checks.test.ts +105 -1
- package/src/resources/extensions/gsd/tests/pre-execution-checks.test.ts +275 -6
- package/src/resources/extensions/gsd/tests/preferences.test.ts +69 -1
- package/src/resources/extensions/gsd/tests/progressive-planning.test.ts +539 -0
- package/src/resources/extensions/gsd/tests/projection-regression.test.ts +7 -0
- package/src/resources/extensions/gsd/tests/prompt-budget-enforcement.test.ts +27 -0
- package/src/resources/extensions/gsd/tests/prompt-contracts.test.ts +24 -0
- package/src/resources/extensions/gsd/tests/prompt-db.test.ts +1 -1
- package/src/resources/extensions/gsd/tests/provider-errors.test.ts +33 -0
- package/src/resources/extensions/gsd/tests/register-hooks-depth-verification.test.ts +67 -0
- package/src/resources/extensions/gsd/tests/remote-notification-from-desktop.test.ts +107 -0
- package/src/resources/extensions/gsd/tests/requirements.test.ts +9 -0
- package/src/resources/extensions/gsd/tests/session-start-footer.test.ts +153 -0
- package/src/resources/extensions/gsd/tests/slice-context-injection.test.ts +16 -4
- package/src/resources/extensions/gsd/tests/state-corruption-2945.test.ts +3 -0
- package/src/resources/extensions/gsd/tests/stuck-detection-coverage.test.ts +15 -0
- package/src/resources/extensions/gsd/tests/summary-render-parity.test.ts +5 -0
- package/src/resources/extensions/gsd/tests/uok-contracts.test.ts +2 -1
- package/src/resources/extensions/gsd/tests/uok-flags.test.ts +31 -1
- package/src/resources/extensions/gsd/tests/uok-kernel-path.test.ts +166 -0
- package/src/resources/extensions/gsd/tests/workflow-install.test.ts +113 -0
- package/src/resources/extensions/gsd/tests/workflow-logger-wiring.test.ts +15 -6
- package/src/resources/extensions/gsd/tests/workflow-mcp.test.ts +2 -2
- package/src/resources/extensions/gsd/tests/workflow-plugins.test.ts +310 -0
- package/src/resources/extensions/gsd/tests/workflow-projections.test.ts +7 -0
- package/src/resources/extensions/gsd/tests/workflow-templates.test.ts +8 -2
- package/src/resources/extensions/gsd/tests/worktree-journal-events.test.ts +2 -1
- package/src/resources/extensions/gsd/tests/worktree-resolver.test.ts +77 -2
- package/src/resources/extensions/gsd/tools/complete-task.ts +87 -0
- package/src/resources/extensions/gsd/tools/plan-milestone.ts +42 -8
- package/src/resources/extensions/gsd/tools/plan-slice.ts +6 -1
- package/src/resources/extensions/gsd/types.ts +62 -0
- package/src/resources/extensions/gsd/unit-runtime.ts +1 -0
- package/src/resources/extensions/gsd/uok/contracts.ts +2 -1
- package/src/resources/extensions/gsd/uok/flags.ts +7 -7
- package/src/resources/extensions/gsd/uok/kernel.ts +16 -4
- package/src/resources/extensions/gsd/workflow-dispatch.ts +106 -0
- package/src/resources/extensions/gsd/workflow-install.ts +423 -0
- package/src/resources/extensions/gsd/workflow-manifest.ts +8 -0
- package/src/resources/extensions/gsd/workflow-mcp.ts +1 -6
- package/src/resources/extensions/gsd/workflow-plugins.ts +403 -0
- package/src/resources/extensions/gsd/workflow-templates/accessibility-audit.md +88 -0
- package/src/resources/extensions/gsd/workflow-templates/api-breaking-change.md +117 -0
- package/src/resources/extensions/gsd/workflow-templates/bugfix.md +1 -0
- package/src/resources/extensions/gsd/workflow-templates/changelog-gen.md +82 -0
- package/src/resources/extensions/gsd/workflow-templates/ci-bootstrap.md +144 -0
- package/src/resources/extensions/gsd/workflow-templates/dead-code.md +81 -0
- package/src/resources/extensions/gsd/workflow-templates/dep-upgrade.md +1 -0
- package/src/resources/extensions/gsd/workflow-templates/docs-sync.yaml +76 -0
- package/src/resources/extensions/gsd/workflow-templates/env-audit.yaml +88 -0
- package/src/resources/extensions/gsd/workflow-templates/full-project.md +1 -0
- package/src/resources/extensions/gsd/workflow-templates/hotfix.md +1 -0
- package/src/resources/extensions/gsd/workflow-templates/issue-triage.md +84 -0
- package/src/resources/extensions/gsd/workflow-templates/observability-setup.md +133 -0
- package/src/resources/extensions/gsd/workflow-templates/onboarding-check.md +74 -0
- package/src/resources/extensions/gsd/workflow-templates/performance-audit.md +125 -0
- package/src/resources/extensions/gsd/workflow-templates/pr-review.md +67 -0
- package/src/resources/extensions/gsd/workflow-templates/pr-triage.md +83 -0
- package/src/resources/extensions/gsd/workflow-templates/refactor.md +1 -0
- package/src/resources/extensions/gsd/workflow-templates/registry.json +184 -0
- package/src/resources/extensions/gsd/workflow-templates/release.md +118 -0
- package/src/resources/extensions/gsd/workflow-templates/rename-symbol.yaml +99 -0
- package/src/resources/extensions/gsd/workflow-templates/security-audit.md +1 -0
- package/src/resources/extensions/gsd/workflow-templates/small-feature.md +1 -0
- package/src/resources/extensions/gsd/workflow-templates/spike.md +1 -0
- package/src/resources/extensions/gsd/workflow-templates/test-backfill.yaml +73 -0
- package/src/resources/extensions/gsd/workflow-templates.ts +7 -0
- package/src/resources/extensions/gsd/workspace-index.ts +9 -4
- package/src/resources/extensions/gsd/worktree-resolver.ts +47 -1
- package/src/resources/extensions/remote-questions/commands.ts +480 -0
- package/src/resources/extensions/remote-questions/manager.ts +49 -4
- package/src/resources/extensions/remote-questions/telegram-adapter.ts +86 -4
- package/src/resources/extensions/remote-questions/tests/command-polling.test.ts +246 -0
- package/src/resources/extensions/remote-questions/tests/remote-answer-normalization.test.ts +92 -0
- package/src/resources/extensions/remote-questions/tests/telegram-commands.test.ts +267 -0
- package/src/resources/extensions/shared/interview-ui.ts +195 -1
- package/src/resources/extensions/shared/layout-utils.ts +26 -0
- package/src/resources/extensions/shared/rtk-shared.ts +58 -0
- package/src/resources/extensions/shared/rtk.ts +12 -52
- package/src/resources/extensions/shared/tests/interview-preview.test.ts +177 -0
- package/src/resources/extensions/shared/tests/preview-layout.test.ts +120 -0
- package/src/resources/skills/create-workflow/SKILL.md +33 -6
- package/dist/web/standalone/.next/static/chunks/2826.dd3dc8bbd3025fa5.js +0 -9
- package/dist/web/standalone/.next/static/css/f6e8833d46e738d8.css +0 -1
- package/packages/native/dist/ps/types.d.ts +0 -5
- package/packages/native/dist/ps/types.js +0 -2
- package/packages/native/src/ps/types.ts +0 -5
- package/packages/pi-ai/node_modules/@smithy/node-http-handler/LICENSE +0 -201
- package/packages/pi-ai/node_modules/@smithy/node-http-handler/README.md +0 -9
- package/packages/pi-ai/node_modules/@smithy/node-http-handler/dist-cjs/index.js +0 -762
- package/packages/pi-ai/node_modules/@smithy/node-http-handler/dist-es/build-abort-error.js +0 -19
- package/packages/pi-ai/node_modules/@smithy/node-http-handler/dist-es/constants.js +0 -1
- package/packages/pi-ai/node_modules/@smithy/node-http-handler/dist-es/get-transformed-headers.js +0 -9
- package/packages/pi-ai/node_modules/@smithy/node-http-handler/dist-es/index.js +0 -3
- package/packages/pi-ai/node_modules/@smithy/node-http-handler/dist-es/node-http-handler.js +0 -230
- package/packages/pi-ai/node_modules/@smithy/node-http-handler/dist-es/node-http2-connection-manager.js +0 -87
- package/packages/pi-ai/node_modules/@smithy/node-http-handler/dist-es/node-http2-connection-pool.js +0 -32
- package/packages/pi-ai/node_modules/@smithy/node-http-handler/dist-es/node-http2-handler.js +0 -169
- package/packages/pi-ai/node_modules/@smithy/node-http-handler/dist-es/readable.mock.js +0 -21
- package/packages/pi-ai/node_modules/@smithy/node-http-handler/dist-es/server.mock.js +0 -88
- package/packages/pi-ai/node_modules/@smithy/node-http-handler/dist-es/set-connection-timeout.js +0 -36
- package/packages/pi-ai/node_modules/@smithy/node-http-handler/dist-es/set-request-timeout.js +0 -21
- package/packages/pi-ai/node_modules/@smithy/node-http-handler/dist-es/set-socket-keep-alive.js +0 -22
- package/packages/pi-ai/node_modules/@smithy/node-http-handler/dist-es/set-socket-timeout.js +0 -23
- package/packages/pi-ai/node_modules/@smithy/node-http-handler/dist-es/stream-collector/collector.js +0 -8
- package/packages/pi-ai/node_modules/@smithy/node-http-handler/dist-es/stream-collector/index.js +0 -41
- package/packages/pi-ai/node_modules/@smithy/node-http-handler/dist-es/stream-collector/readable.mock.js +0 -21
- package/packages/pi-ai/node_modules/@smithy/node-http-handler/dist-es/timing.js +0 -4
- package/packages/pi-ai/node_modules/@smithy/node-http-handler/dist-es/write-request-body.js +0 -63
- package/packages/pi-ai/node_modules/@smithy/node-http-handler/dist-types/build-abort-error.d.ts +0 -10
- package/packages/pi-ai/node_modules/@smithy/node-http-handler/dist-types/constants.d.ts +0 -5
- package/packages/pi-ai/node_modules/@smithy/node-http-handler/dist-types/get-transformed-headers.d.ts +0 -4
- package/packages/pi-ai/node_modules/@smithy/node-http-handler/dist-types/index.d.ts +0 -3
- package/packages/pi-ai/node_modules/@smithy/node-http-handler/dist-types/node-http-handler.d.ts +0 -46
- package/packages/pi-ai/node_modules/@smithy/node-http-handler/dist-types/node-http2-connection-manager.d.ts +0 -24
- package/packages/pi-ai/node_modules/@smithy/node-http-handler/dist-types/node-http2-connection-pool.d.ts +0 -12
- package/packages/pi-ai/node_modules/@smithy/node-http-handler/dist-types/node-http2-handler.d.ts +0 -63
- package/packages/pi-ai/node_modules/@smithy/node-http-handler/dist-types/readable.mock.d.ts +0 -13
- package/packages/pi-ai/node_modules/@smithy/node-http-handler/dist-types/server.mock.d.ts +0 -12
- package/packages/pi-ai/node_modules/@smithy/node-http-handler/dist-types/set-connection-timeout.d.ts +0 -2
- package/packages/pi-ai/node_modules/@smithy/node-http-handler/dist-types/set-request-timeout.d.ts +0 -6
- package/packages/pi-ai/node_modules/@smithy/node-http-handler/dist-types/set-socket-keep-alive.d.ts +0 -6
- package/packages/pi-ai/node_modules/@smithy/node-http-handler/dist-types/set-socket-timeout.d.ts +0 -2
- package/packages/pi-ai/node_modules/@smithy/node-http-handler/dist-types/stream-collector/collector.d.ts +0 -5
- package/packages/pi-ai/node_modules/@smithy/node-http-handler/dist-types/stream-collector/index.d.ts +0 -6
- package/packages/pi-ai/node_modules/@smithy/node-http-handler/dist-types/stream-collector/readable.mock.d.ts +0 -13
- package/packages/pi-ai/node_modules/@smithy/node-http-handler/dist-types/timing.d.ts +0 -8
- package/packages/pi-ai/node_modules/@smithy/node-http-handler/dist-types/ts3.4/build-abort-error.d.ts +0 -10
- package/packages/pi-ai/node_modules/@smithy/node-http-handler/dist-types/ts3.4/constants.d.ts +0 -5
- package/packages/pi-ai/node_modules/@smithy/node-http-handler/dist-types/ts3.4/get-transformed-headers.d.ts +0 -4
- package/packages/pi-ai/node_modules/@smithy/node-http-handler/dist-types/ts3.4/index.d.ts +0 -3
- package/packages/pi-ai/node_modules/@smithy/node-http-handler/dist-types/ts3.4/node-http-handler.d.ts +0 -46
- package/packages/pi-ai/node_modules/@smithy/node-http-handler/dist-types/ts3.4/node-http2-connection-manager.d.ts +0 -24
- package/packages/pi-ai/node_modules/@smithy/node-http-handler/dist-types/ts3.4/node-http2-connection-pool.d.ts +0 -12
- package/packages/pi-ai/node_modules/@smithy/node-http-handler/dist-types/ts3.4/node-http2-handler.d.ts +0 -63
- package/packages/pi-ai/node_modules/@smithy/node-http-handler/dist-types/ts3.4/readable.mock.d.ts +0 -13
- package/packages/pi-ai/node_modules/@smithy/node-http-handler/dist-types/ts3.4/server.mock.d.ts +0 -12
- package/packages/pi-ai/node_modules/@smithy/node-http-handler/dist-types/ts3.4/set-connection-timeout.d.ts +0 -2
- package/packages/pi-ai/node_modules/@smithy/node-http-handler/dist-types/ts3.4/set-request-timeout.d.ts +0 -6
- package/packages/pi-ai/node_modules/@smithy/node-http-handler/dist-types/ts3.4/set-socket-keep-alive.d.ts +0 -6
- package/packages/pi-ai/node_modules/@smithy/node-http-handler/dist-types/ts3.4/set-socket-timeout.d.ts +0 -2
- package/packages/pi-ai/node_modules/@smithy/node-http-handler/dist-types/ts3.4/stream-collector/collector.d.ts +0 -5
- package/packages/pi-ai/node_modules/@smithy/node-http-handler/dist-types/ts3.4/stream-collector/index.d.ts +0 -6
- package/packages/pi-ai/node_modules/@smithy/node-http-handler/dist-types/ts3.4/stream-collector/readable.mock.d.ts +0 -13
- package/packages/pi-ai/node_modules/@smithy/node-http-handler/dist-types/ts3.4/timing.d.ts +0 -8
- package/packages/pi-ai/node_modules/@smithy/node-http-handler/dist-types/ts3.4/write-request-body.d.ts +0 -12
- package/packages/pi-ai/node_modules/@smithy/node-http-handler/dist-types/write-request-body.d.ts +0 -12
- package/packages/pi-ai/node_modules/@smithy/node-http-handler/package.json +0 -68
- package/packages/pi-ai/oauth.d.ts +0 -1
- package/packages/pi-ai/oauth.js +0 -1
- /package/dist/web/standalone/.next/static/{j7IBD35UgrL2b298GLK3V → jaWw1Jh0TYayjbfOrFe8D}/_buildManifest.js +0 -0
- /package/dist/web/standalone/.next/static/{j7IBD35UgrL2b298GLK3V → jaWw1Jh0TYayjbfOrFe8D}/_ssgManifest.js +0 -0
|
@@ -61,9 +61,10 @@ function truncateMessage(msg: string, maxLen: number): string {
|
|
|
61
61
|
|
|
62
62
|
/**
|
|
63
63
|
* Build compact health lines for the widget.
|
|
64
|
-
*
|
|
64
|
+
* When `width` is provided, system + budget render left and last-commit
|
|
65
|
+
* right-aligned. Without width, all parts are joined inline (RPC fallback).
|
|
65
66
|
*/
|
|
66
|
-
export function buildHealthLines(data: HealthWidgetData): string[] {
|
|
67
|
+
export function buildHealthLines(data: HealthWidgetData, width?: number): string[] {
|
|
67
68
|
if (data.projectState === "none") {
|
|
68
69
|
return [" GSD No project loaded — run /gsd to start"];
|
|
69
70
|
}
|
|
@@ -72,40 +73,68 @@ export function buildHealthLines(data: HealthWidgetData): string[] {
|
|
|
72
73
|
return [" GSD Project initialized — run /gsd to continue setup"];
|
|
73
74
|
}
|
|
74
75
|
|
|
75
|
-
const
|
|
76
|
+
const leftParts: string[] = [];
|
|
76
77
|
|
|
77
78
|
const totalIssues = data.environmentErrorCount + data.environmentWarningCount + (data.providerIssue ? 1 : 0);
|
|
78
79
|
if (totalIssues === 0) {
|
|
79
|
-
|
|
80
|
+
leftParts.push("● System OK");
|
|
80
81
|
} else if (data.environmentErrorCount > 0 || data.providerIssue?.includes("✗")) {
|
|
81
|
-
|
|
82
|
+
leftParts.push(`✗ ${totalIssues} issue${totalIssues > 1 ? "s" : ""}`);
|
|
82
83
|
} else {
|
|
83
|
-
|
|
84
|
+
leftParts.push(`⚠ ${totalIssues} warning${totalIssues > 1 ? "s" : ""}`);
|
|
84
85
|
}
|
|
85
86
|
|
|
86
87
|
if (data.budgetCeiling !== undefined && data.budgetCeiling > 0) {
|
|
87
88
|
const pct = Math.min(100, (data.budgetSpent / data.budgetCeiling) * 100);
|
|
88
|
-
|
|
89
|
+
leftParts.push(`Budget: ${formatCost(data.budgetSpent)}/${formatCost(data.budgetCeiling)} (${pct.toFixed(0)}%)`);
|
|
89
90
|
} else if (data.budgetSpent > 0) {
|
|
90
|
-
|
|
91
|
+
leftParts.push(`Spent: ${formatCost(data.budgetSpent)}`);
|
|
91
92
|
}
|
|
92
93
|
|
|
93
94
|
if (data.providerIssue) {
|
|
94
|
-
|
|
95
|
+
leftParts.push(data.providerIssue);
|
|
95
96
|
}
|
|
96
97
|
|
|
97
98
|
if (data.environmentErrorCount > 0) {
|
|
98
|
-
|
|
99
|
+
leftParts.push(`Env: ${data.environmentErrorCount} error${data.environmentErrorCount > 1 ? "s" : ""}`);
|
|
99
100
|
} else if (data.environmentWarningCount > 0) {
|
|
100
|
-
|
|
101
|
+
leftParts.push(`Env: ${data.environmentWarningCount} warning${data.environmentWarningCount > 1 ? "s" : ""}`);
|
|
101
102
|
}
|
|
102
103
|
|
|
103
|
-
//
|
|
104
|
+
// Last commit goes on the right-hand side when width is known.
|
|
105
|
+
let rightText = "";
|
|
104
106
|
if (data.lastCommitEpoch !== null && data.lastCommitEpoch > 0) {
|
|
105
107
|
const relTime = formatRelativeTime(data.lastCommitEpoch);
|
|
106
108
|
const msg = data.lastCommitMessage ? ` — ${truncateMessage(data.lastCommitMessage, 50)}` : "";
|
|
107
|
-
|
|
109
|
+
rightText = `Last commit: ${relTime}${msg}`;
|
|
108
110
|
}
|
|
109
111
|
|
|
110
|
-
|
|
112
|
+
const leftText = leftParts.join(" │ ");
|
|
113
|
+
|
|
114
|
+
if (width === undefined) {
|
|
115
|
+
const inline = rightText ? `${leftText} │ ${rightText}` : leftText;
|
|
116
|
+
return [` ${inline}`];
|
|
117
|
+
}
|
|
118
|
+
|
|
119
|
+
const prefix = " ";
|
|
120
|
+
const innerWidth = Math.max(0, width - prefix.length);
|
|
121
|
+
const leftVis = leftText.length;
|
|
122
|
+
const rightVis = rightText.length;
|
|
123
|
+
|
|
124
|
+
if (!rightText) return [`${prefix}${truncateMessage(leftText, innerWidth)}`];
|
|
125
|
+
const MIN_GAP = 2;
|
|
126
|
+
if (leftVis + MIN_GAP + rightVis > innerWidth) {
|
|
127
|
+
// Preserve the left (status + budget) and truncate the right side
|
|
128
|
+
// (last commit) with an ellipsis so the combined line never exceeds
|
|
129
|
+
// innerWidth. If even the left alone overflows, clamp it too.
|
|
130
|
+
const leftRoom = Math.max(1, Math.min(leftVis, innerWidth - MIN_GAP - 1));
|
|
131
|
+
const clampedLeft = truncateMessage(leftText, leftRoom);
|
|
132
|
+
const rightRoom = Math.max(0, innerWidth - clampedLeft.length - MIN_GAP);
|
|
133
|
+
const clampedRight = rightRoom > 0 ? truncateMessage(rightText, rightRoom) : "";
|
|
134
|
+
if (!clampedRight) return [`${prefix}${clampedLeft}`];
|
|
135
|
+
const pad = " ".repeat(Math.max(MIN_GAP, innerWidth - clampedLeft.length - clampedRight.length));
|
|
136
|
+
return [`${prefix}${clampedLeft}${pad}${clampedRight}`];
|
|
137
|
+
}
|
|
138
|
+
const padding = " ".repeat(innerWidth - leftVis - rightVis);
|
|
139
|
+
return [`${prefix}${leftText}${padding}${rightText}`];
|
|
111
140
|
}
|
|
@@ -129,12 +129,16 @@ export function initHealthWidget(ctx: ExtensionContext): void {
|
|
|
129
129
|
void refresh();
|
|
130
130
|
}, REFRESH_INTERVAL_MS);
|
|
131
131
|
|
|
132
|
+
let cachedWidth: number | undefined;
|
|
132
133
|
return {
|
|
133
|
-
render(
|
|
134
|
-
if (!cachedLines
|
|
134
|
+
render(width: number): string[] {
|
|
135
|
+
if (!cachedLines || cachedWidth !== width) {
|
|
136
|
+
cachedLines = buildHealthLines(data, width);
|
|
137
|
+
cachedWidth = width;
|
|
138
|
+
}
|
|
135
139
|
return cachedLines;
|
|
136
140
|
},
|
|
137
|
-
invalidate(): void { cachedLines = undefined; },
|
|
141
|
+
invalidate(): void { cachedLines = undefined; cachedWidth = undefined; },
|
|
138
142
|
dispose(): void {
|
|
139
143
|
clearInterval(refreshTimer);
|
|
140
144
|
},
|
|
@@ -22,7 +22,8 @@ export interface ModelCostEntry {
|
|
|
22
22
|
*/
|
|
23
23
|
export const BUNDLED_COST_TABLE: ModelCostEntry[] = [
|
|
24
24
|
// Anthropic
|
|
25
|
-
{ id: "claude-opus-4-6", inputPer1k: 0.
|
|
25
|
+
{ id: "claude-opus-4-6", inputPer1k: 0.005, outputPer1k: 0.025, updatedAt: "2026-04-16" },
|
|
26
|
+
{ id: "claude-opus-4-7", inputPer1k: 0.005, outputPer1k: 0.025, updatedAt: "2026-04-16" },
|
|
26
27
|
{ id: "claude-sonnet-4-6", inputPer1k: 0.003, outputPer1k: 0.015, updatedAt: "2025-03-15" },
|
|
27
28
|
{ id: "claude-haiku-4-5", inputPer1k: 0.0008, outputPer1k: 0.004, updatedAt: "2025-03-15" },
|
|
28
29
|
{ id: "claude-sonnet-4-5-20250514", inputPer1k: 0.003, outputPer1k: 0.015, updatedAt: "2025-03-15" },
|
|
@@ -55,6 +56,7 @@ export const BUNDLED_COST_TABLE: ModelCostEntry[] = [
|
|
|
55
56
|
{ id: "gpt-5.3-codex", inputPer1k: 0.005, outputPer1k: 0.02, updatedAt: "2026-03-29" },
|
|
56
57
|
{ id: "gpt-5.3-codex-spark", inputPer1k: 0.0003, outputPer1k: 0.0012, updatedAt: "2026-03-29" },
|
|
57
58
|
{ id: "gpt-5.4", inputPer1k: 0.005, outputPer1k: 0.02, updatedAt: "2026-03-29" },
|
|
59
|
+
{ id: "gpt-5.4-mini", inputPer1k: 0.00075, outputPer1k: 0.0045, updatedAt: "2026-04-18" },
|
|
58
60
|
|
|
59
61
|
// Google
|
|
60
62
|
{ id: "gemini-2.0-flash", inputPer1k: 0.0001, outputPer1k: 0.0004, updatedAt: "2025-03-15" },
|
|
@@ -23,6 +23,14 @@ export interface DynamicRoutingConfig {
|
|
|
23
23
|
budget_pressure?: boolean; // default: true
|
|
24
24
|
cross_provider?: boolean; // default: true
|
|
25
25
|
hooks?: boolean; // default: true
|
|
26
|
+
/**
|
|
27
|
+
* Opt into dynamic routing for flat-rate providers (e.g. claude-code,
|
|
28
|
+
* GitHub Copilot). Default false preserves the #3453 bypass that skips
|
|
29
|
+
* routing when the subscription makes per-request cost identical.
|
|
30
|
+
* Enable only when you want per-task model selection across a flat-rate
|
|
31
|
+
* subscription (e.g. haiku for research, opus for architecture). (#4386)
|
|
32
|
+
*/
|
|
33
|
+
allow_flat_rate_providers?: boolean;
|
|
26
34
|
}
|
|
27
35
|
|
|
28
36
|
export interface RoutingDecision {
|
|
@@ -73,6 +81,7 @@ export const MODEL_CAPABILITY_TIER: Record<string, ComplexityTier> = {
|
|
|
73
81
|
"gpt-4.1-nano": "light",
|
|
74
82
|
"gpt-5-mini": "light",
|
|
75
83
|
"gpt-5-nano": "light",
|
|
84
|
+
"gpt-5.4-mini": "light",
|
|
76
85
|
"gpt-5.1-codex-mini": "light",
|
|
77
86
|
"gpt-5.3-codex-spark": "light",
|
|
78
87
|
"gemini-2.0-flash": "light",
|
|
@@ -90,6 +99,7 @@ export const MODEL_CAPABILITY_TIER: Record<string, ComplexityTier> = {
|
|
|
90
99
|
|
|
91
100
|
// Heavy-tier models (most capable)
|
|
92
101
|
"claude-opus-4-6": "heavy",
|
|
102
|
+
"claude-opus-4-7": "heavy",
|
|
93
103
|
"claude-3-opus-latest": "heavy",
|
|
94
104
|
"gpt-4-turbo": "heavy",
|
|
95
105
|
"gpt-5": "heavy",
|
|
@@ -114,7 +124,8 @@ const MODEL_COST_PER_1K_INPUT: Record<string, number> = {
|
|
|
114
124
|
"claude-3-5-haiku-latest": 0.0008,
|
|
115
125
|
"claude-sonnet-4-6": 0.003,
|
|
116
126
|
"claude-sonnet-4-5-20250514": 0.003,
|
|
117
|
-
"claude-opus-4-6": 0.
|
|
127
|
+
"claude-opus-4-6": 0.005,
|
|
128
|
+
"claude-opus-4-7": 0.005,
|
|
118
129
|
"gpt-4o-mini": 0.00015,
|
|
119
130
|
"gpt-4o": 0.0025,
|
|
120
131
|
"gpt-4.1": 0.002,
|
|
@@ -123,6 +134,7 @@ const MODEL_COST_PER_1K_INPUT: Record<string, number> = {
|
|
|
123
134
|
"gpt-5": 0.01,
|
|
124
135
|
"gpt-5-mini": 0.0003,
|
|
125
136
|
"gpt-5-nano": 0.0001,
|
|
137
|
+
"gpt-5.4-mini": 0.00075,
|
|
126
138
|
"gpt-5-pro": 0.015,
|
|
127
139
|
"gpt-5.1": 0.005,
|
|
128
140
|
"gpt-5.1-codex-max": 0.003,
|
|
@@ -146,6 +158,7 @@ const MODEL_COST_PER_1K_INPUT: Record<string, number> = {
|
|
|
146
158
|
export const MODEL_CAPABILITY_PROFILES: Record<string, ModelCapabilities> = {
|
|
147
159
|
// ── Anthropic ──────────────────────────────────────────────────────────────
|
|
148
160
|
"claude-opus-4-6": { coding: 95, debugging: 90, research: 85, reasoning: 95, speed: 30, longContext: 80, instruction: 90 },
|
|
161
|
+
"claude-opus-4-7": { coding: 95, debugging: 90, research: 85, reasoning: 95, speed: 30, longContext: 80, instruction: 90 },
|
|
149
162
|
"claude-sonnet-4-6": { coding: 85, debugging: 80, research: 75, reasoning: 80, speed: 60, longContext: 75, instruction: 85 },
|
|
150
163
|
"claude-sonnet-4-5-20250514": { coding: 85, debugging: 80, research: 75, reasoning: 80, speed: 60, longContext: 75, instruction: 85 },
|
|
151
164
|
"claude-3-5-sonnet-latest": { coding: 82, debugging: 78, research: 72, reasoning: 78, speed: 62, longContext: 70, instruction: 82 },
|
|
@@ -164,6 +177,7 @@ export const MODEL_CAPABILITY_PROFILES: Record<string, ModelCapabilities> = {
|
|
|
164
177
|
"gpt-5": { coding: 92, debugging: 88, research: 85, reasoning: 92, speed: 40, longContext: 85, instruction: 90 },
|
|
165
178
|
"gpt-5-mini": { coding: 62, debugging: 52, research: 48, reasoning: 52, speed: 88, longContext: 52, instruction: 74 },
|
|
166
179
|
"gpt-5-nano": { coding: 42, debugging: 32, research: 28, reasoning: 32, speed: 95, longContext: 32, instruction: 62 },
|
|
180
|
+
"gpt-5.4-mini": { coding: 70, debugging: 60, research: 55, reasoning: 60, speed: 84, longContext: 60, instruction: 78 },
|
|
167
181
|
"gpt-5-pro": { coding: 94, debugging: 90, research: 88, reasoning: 94, speed: 35, longContext: 88, instruction: 92 },
|
|
168
182
|
"gpt-5.1": { coding: 93, debugging: 89, research: 86, reasoning: 93, speed: 42, longContext: 86, instruction: 91 },
|
|
169
183
|
"gpt-5.1-codex-max": { coding: 90, debugging: 85, research: 70, reasoning: 85, speed: 55, longContext: 75, instruction: 85 },
|
|
@@ -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";
|
|
@@ -690,6 +690,134 @@ export function nativeAddTracked(basePath: string): void {
|
|
|
690
690
|
gitFileExec(basePath, ["add", "-u"]);
|
|
691
691
|
}
|
|
692
692
|
|
|
693
|
+
function isDotGsdIgnored(basePath: string): boolean {
|
|
694
|
+
for (const path of [".gsd", ".gsd/"]) {
|
|
695
|
+
try {
|
|
696
|
+
execFileSync("git", ["check-ignore", "-q", path], {
|
|
697
|
+
cwd: basePath,
|
|
698
|
+
stdio: "pipe",
|
|
699
|
+
env: GIT_NO_PROMPT_ENV,
|
|
700
|
+
});
|
|
701
|
+
return true;
|
|
702
|
+
} catch {
|
|
703
|
+
// exit 1 means this form is not ignored; try the next variant
|
|
704
|
+
}
|
|
705
|
+
}
|
|
706
|
+
return false;
|
|
707
|
+
}
|
|
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
|
+
|
|
693
821
|
/**
|
|
694
822
|
* Stage all files with pathspec exclusions (git add -A -- ':!pattern' ...).
|
|
695
823
|
* Excluded paths are never hashed by git, preventing hangs on large
|
|
@@ -724,12 +852,12 @@ export function nativeAddAllWithExclusions(basePath: string, exclusions: readonl
|
|
|
724
852
|
return;
|
|
725
853
|
}
|
|
726
854
|
// When .gsd is a symlink, git rejects `:!.gsd/...` pathspecs with
|
|
727
|
-
// "beyond a symbolic link".
|
|
728
|
-
//
|
|
729
|
-
//
|
|
730
|
-
//
|
|
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.
|
|
731
859
|
if (stderr.includes("beyond a symbolic link")) {
|
|
732
|
-
|
|
860
|
+
fallbackStageWithSymlinkedDotGsd(basePath);
|
|
733
861
|
return;
|
|
734
862
|
}
|
|
735
863
|
throw new GSDError(GSD_GIT_ERROR, `git add -A with exclusions failed in ${basePath}: ${getErrorMessage(err)}`);
|
|
@@ -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
|
}
|
|
@@ -5,6 +5,7 @@ import { execFileSync } from "node:child_process";
|
|
|
5
5
|
import type { NotificationPreferences } from "./types.js";
|
|
6
6
|
import { loadEffectiveGSDPreferences } from "./preferences.js";
|
|
7
7
|
import { CmuxClient, emitOsc777Notification, resolveCmuxConfig } from "../cmux/index.js";
|
|
8
|
+
import { sendRemoteNotification } from "../remote-questions/notify.js";
|
|
8
9
|
|
|
9
10
|
export type NotifyLevel = "info" | "success" | "warning" | "error";
|
|
10
11
|
export type NotificationKind = "complete" | "error" | "budget" | "milestone" | "attention";
|
|
@@ -31,6 +32,11 @@ export function sendDesktopNotification(
|
|
|
31
32
|
title = formatNotificationTitle(projectName);
|
|
32
33
|
}
|
|
33
34
|
const loaded = loadEffectiveGSDPreferences()?.preferences;
|
|
35
|
+
|
|
36
|
+
// Remote notifications fire independently of desktop preferences.
|
|
37
|
+
// sendRemoteNotification handles "not configured" gracefully (early return).
|
|
38
|
+
void sendRemoteNotification(title, message).catch(() => {});
|
|
39
|
+
|
|
34
40
|
if (!shouldSendDesktopNotification(kind, loaded?.notifications)) return;
|
|
35
41
|
|
|
36
42
|
const cmux = resolveCmuxConfig(loaded);
|
|
@@ -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
|
|