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
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { describe, test } from 'node:test';
|
|
2
2
|
import assert from 'node:assert/strict';
|
|
3
|
-
import { mkdtempSync, mkdirSync, writeFileSync, rmSync, existsSync, symlinkSync } from "node:fs";
|
|
3
|
+
import { mkdtempSync, mkdirSync, writeFileSync, rmSync, existsSync, symlinkSync, readFileSync } from "node:fs";
|
|
4
4
|
import { join, dirname } from "node:path";
|
|
5
5
|
import { tmpdir } from "node:os";
|
|
6
6
|
import { execSync } from "node:child_process";
|
|
@@ -1247,8 +1247,8 @@ describe('git-service', async () => {
|
|
|
1247
1247
|
|
|
1248
1248
|
test('nativeAddAllWithExclusions: symlinked .gsd fallback', () => {
|
|
1249
1249
|
// When .gsd is a symlink, git rejects `:!.gsd/...` pathspecs with
|
|
1250
|
-
// "fatal: pathspec '...' is beyond a symbolic link".
|
|
1251
|
-
//
|
|
1250
|
+
// "fatal: pathspec '...' is beyond a symbolic link". When `.gsd` is
|
|
1251
|
+
// already gitignored, the fallback should still stage untracked real files.
|
|
1252
1252
|
const repo = initTempRepo();
|
|
1253
1253
|
|
|
1254
1254
|
// Create the real .gsd directory outside the repo, then symlink it
|
|
@@ -1269,9 +1269,9 @@ describe('git-service', async () => {
|
|
|
1269
1269
|
run('git commit -m "add app"', repo);
|
|
1270
1270
|
writeFileSync(join(repo, "src/app.ts"), "export const x = 2;");
|
|
1271
1271
|
|
|
1272
|
-
// Create an untracked file
|
|
1273
|
-
//
|
|
1274
|
-
createFile(repo, "
|
|
1272
|
+
// Create an untracked file that should still be staged by the fallback
|
|
1273
|
+
// because `.gsd` itself is already protected by .gitignore.
|
|
1274
|
+
createFile(repo, "src/new-feature.ts", "export const fresh = true;");
|
|
1275
1275
|
|
|
1276
1276
|
// nativeAddAllWithExclusions should NOT throw despite .gsd being a symlink
|
|
1277
1277
|
let threw = false;
|
|
@@ -1287,17 +1287,115 @@ describe('git-service', async () => {
|
|
|
1287
1287
|
const staged = run("git diff --cached --name-only", repo);
|
|
1288
1288
|
assert.ok(staged.includes("src/app.ts"), "modified tracked file staged despite symlinked .gsd");
|
|
1289
1289
|
|
|
1290
|
-
|
|
1291
|
-
|
|
1292
|
-
// Using `git add -A` on a repo with large untracked data dirs hangs. (#1977)
|
|
1293
|
-
assert.ok(!staged.includes("data/large-model.bin"),
|
|
1294
|
-
"symlink fallback must not stage untracked files (would hang on large repos)");
|
|
1290
|
+
assert.ok(staged.includes("src/new-feature.ts"),
|
|
1291
|
+
"symlink fallback should still stage new real files when .gsd is gitignored");
|
|
1295
1292
|
assert.ok(!staged.includes(".gsd"), ".gsd content not staged");
|
|
1296
1293
|
|
|
1297
1294
|
rmSync(repo, { recursive: true, force: true });
|
|
1298
1295
|
rmSync(externalGsd, { recursive: true, force: true });
|
|
1299
1296
|
});
|
|
1300
1297
|
|
|
1298
|
+
test('nativeAddAllWithExclusions: self-heals symlinked .gsd when .gitignore lacks it (#4423)', () => {
|
|
1299
|
+
// When `.gsd` is a symlink AND not listed in `.gitignore`, the staging
|
|
1300
|
+
// fallback must self-heal by appending `.gsd` to `.gitignore` and retrying
|
|
1301
|
+
// `git add -A`. Without this, new user files are silently dropped.
|
|
1302
|
+
const repo = initTempRepo();
|
|
1303
|
+
|
|
1304
|
+
const externalGsd = mkdtempSync(join(tmpdir(), "gsd-external-unignored-"));
|
|
1305
|
+
mkdirSync(join(externalGsd, "activity"), { recursive: true });
|
|
1306
|
+
writeFileSync(join(externalGsd, "activity", "log.jsonl"), "log data");
|
|
1307
|
+
writeFileSync(join(externalGsd, "STATE.md"), "# State");
|
|
1308
|
+
|
|
1309
|
+
symlinkSync(externalGsd, join(repo, ".gsd"));
|
|
1310
|
+
|
|
1311
|
+
createFile(repo, "src/app.ts", "export const x = 1;");
|
|
1312
|
+
run("git add -A", repo);
|
|
1313
|
+
run('git commit -m "add app"', repo);
|
|
1314
|
+
writeFileSync(join(repo, "src/app.ts"), "export const x = 2;");
|
|
1315
|
+
createFile(repo, "src/new-feature.ts", "export const fresh = true;");
|
|
1316
|
+
|
|
1317
|
+
let threw = false;
|
|
1318
|
+
try {
|
|
1319
|
+
nativeAddAllWithExclusions(repo, RUNTIME_EXCLUSION_PATHS);
|
|
1320
|
+
} catch (e) {
|
|
1321
|
+
threw = true;
|
|
1322
|
+
console.error(" unexpected error:", e);
|
|
1323
|
+
}
|
|
1324
|
+
assert.ok(!threw, "nativeAddAllWithExclusions does not throw with symlinked .gsd when .gsd is not gitignored");
|
|
1325
|
+
|
|
1326
|
+
const staged = run("git diff --cached --name-only", repo);
|
|
1327
|
+
assert.ok(staged.includes("src/app.ts"), "tracked modifications stage");
|
|
1328
|
+
assert.ok(
|
|
1329
|
+
staged.includes("src/new-feature.ts"),
|
|
1330
|
+
"self-heal adds .gsd to .gitignore so new user files are staged",
|
|
1331
|
+
);
|
|
1332
|
+
assert.ok(!staged.includes(".gsd"), ".gsd contents stay unstaged after self-heal");
|
|
1333
|
+
|
|
1334
|
+
// Verify the self-heal actually wrote to .gitignore
|
|
1335
|
+
const gitignore = readFileSync(join(repo, ".gitignore"), "utf-8");
|
|
1336
|
+
assert.ok(/^\.gsd\/?$/m.test(gitignore), ".gitignore contains .gsd entry after self-heal");
|
|
1337
|
+
|
|
1338
|
+
rmSync(repo, { recursive: true, force: true });
|
|
1339
|
+
rmSync(externalGsd, { recursive: true, force: true });
|
|
1340
|
+
});
|
|
1341
|
+
|
|
1342
|
+
test('nativeAddAllWithExclusions: explicit staging protects work when manage_gitignore:false (#4423)', () => {
|
|
1343
|
+
// When `git.manage_gitignore: false` is set in PREFERENCES.md, the
|
|
1344
|
+
// self-heal path is disabled. The fallback must still protect user work
|
|
1345
|
+
// by explicitly staging untracked real files while skipping `.gsd`.
|
|
1346
|
+
const repo = initTempRepo();
|
|
1347
|
+
|
|
1348
|
+
const externalGsd = mkdtempSync(join(tmpdir(), "gsd-external-optout-"));
|
|
1349
|
+
mkdirSync(join(externalGsd, "activity"), { recursive: true });
|
|
1350
|
+
writeFileSync(join(externalGsd, "activity", "log.jsonl"), "log data");
|
|
1351
|
+
writeFileSync(join(externalGsd, "STATE.md"), "# State");
|
|
1352
|
+
|
|
1353
|
+
symlinkSync(externalGsd, join(repo, ".gsd"));
|
|
1354
|
+
|
|
1355
|
+
// Create PREFERENCES.md inside the symlink target (the linked .gsd dir)
|
|
1356
|
+
// with the opt-out flag. The regex matches a top-level occurrence.
|
|
1357
|
+
writeFileSync(
|
|
1358
|
+
join(repo, ".gsd", "PREFERENCES.md"),
|
|
1359
|
+
"---\nversion: 1\ngit:\n manage_gitignore: false\n---\n",
|
|
1360
|
+
);
|
|
1361
|
+
|
|
1362
|
+
createFile(repo, "src/app.ts", "export const x = 1;");
|
|
1363
|
+
run("git add -A", repo);
|
|
1364
|
+
run('git commit -m "add app"', repo);
|
|
1365
|
+
writeFileSync(join(repo, "src/app.ts"), "export const x = 2;");
|
|
1366
|
+
createFile(repo, "src/new-feature.ts", "export const fresh = true;");
|
|
1367
|
+
|
|
1368
|
+
let threw = false;
|
|
1369
|
+
try {
|
|
1370
|
+
nativeAddAllWithExclusions(repo, RUNTIME_EXCLUSION_PATHS);
|
|
1371
|
+
} catch (e) {
|
|
1372
|
+
threw = true;
|
|
1373
|
+
console.error(" unexpected error:", e);
|
|
1374
|
+
}
|
|
1375
|
+
assert.ok(!threw, "nativeAddAllWithExclusions does not throw under manage_gitignore:false");
|
|
1376
|
+
|
|
1377
|
+
const staged = run("git diff --cached --name-only", repo);
|
|
1378
|
+
assert.ok(staged.includes("src/app.ts"), "tracked modifications stage");
|
|
1379
|
+
assert.ok(
|
|
1380
|
+
staged.includes("src/new-feature.ts"),
|
|
1381
|
+
"explicit staging protects new files even when self-heal is disabled",
|
|
1382
|
+
);
|
|
1383
|
+
assert.ok(!staged.includes(".gsd"), ".gsd contents stay unstaged");
|
|
1384
|
+
|
|
1385
|
+
// Self-heal must NOT have written to .gitignore
|
|
1386
|
+
const gitignoreExists = existsSync(join(repo, ".gitignore"));
|
|
1387
|
+
if (gitignoreExists) {
|
|
1388
|
+
const gitignore = readFileSync(join(repo, ".gitignore"), "utf-8");
|
|
1389
|
+
assert.ok(
|
|
1390
|
+
!/^\.gsd\/?$/m.test(gitignore),
|
|
1391
|
+
"manage_gitignore:false must prevent writes to .gitignore",
|
|
1392
|
+
);
|
|
1393
|
+
}
|
|
1394
|
+
|
|
1395
|
+
rmSync(repo, { recursive: true, force: true });
|
|
1396
|
+
rmSync(externalGsd, { recursive: true, force: true });
|
|
1397
|
+
});
|
|
1398
|
+
|
|
1301
1399
|
// ─── nativeAddAllWithExclusions: non-symlinked .gsd still works ───────
|
|
1302
1400
|
|
|
1303
1401
|
test('nativeAddAllWithExclusions: non-symlinked .gsd still works', () => {
|
|
@@ -358,6 +358,57 @@ test('writeBlockerPlaceholder: does NOT update DB for non-execute-task types', a
|
|
|
358
358
|
}
|
|
359
359
|
});
|
|
360
360
|
|
|
361
|
+
test('writeBlockerPlaceholder: updates execute-task plan checkbox after DB recovery (#4126)', async () => {
|
|
362
|
+
const base = createFixtureBase();
|
|
363
|
+
try {
|
|
364
|
+
const {
|
|
365
|
+
openDatabase,
|
|
366
|
+
closeDatabase,
|
|
367
|
+
insertMilestone,
|
|
368
|
+
insertSlice,
|
|
369
|
+
insertTask,
|
|
370
|
+
getTask,
|
|
371
|
+
isDbAvailable,
|
|
372
|
+
} = await import("../../gsd-db.ts");
|
|
373
|
+
|
|
374
|
+
const dbPath = join(base, ".gsd", "gsd.db");
|
|
375
|
+
const sliceDir = join(base, ".gsd", "milestones", "M001", "slices", "S01");
|
|
376
|
+
const tasksDir = join(sliceDir, "tasks");
|
|
377
|
+
|
|
378
|
+
mkdirSync(tasksDir, { recursive: true });
|
|
379
|
+
writeFileSync(join(sliceDir, "S01-PLAN.md"), [
|
|
380
|
+
"# S01: Test Slice",
|
|
381
|
+
"",
|
|
382
|
+
"## Tasks",
|
|
383
|
+
"",
|
|
384
|
+
"- [ ] **T01: Recoverable task** `est:5m`",
|
|
385
|
+
].join("\n"));
|
|
386
|
+
|
|
387
|
+
openDatabase(dbPath);
|
|
388
|
+
try {
|
|
389
|
+
insertMilestone({ id: "M001", title: "Test", status: "active" });
|
|
390
|
+
insertSlice({ id: "S01", milestoneId: "M001", title: "Slice", status: "active" });
|
|
391
|
+
insertTask({ id: "T01", sliceId: "S01", milestoneId: "M001", title: "Recoverable task", status: "pending" });
|
|
392
|
+
|
|
393
|
+
writeBlockerPlaceholder("execute-task", "M001/S01/T01", base, "context exhaustion recovery");
|
|
394
|
+
|
|
395
|
+
const task = getTask("M001", "S01", "T01");
|
|
396
|
+
assert.equal(task?.status, "complete", "execute-task recovery should still mark the DB task complete");
|
|
397
|
+
|
|
398
|
+
const planContent = readFileSync(join(sliceDir, "S01-PLAN.md"), "utf-8");
|
|
399
|
+
assert.match(
|
|
400
|
+
planContent,
|
|
401
|
+
/\- \[x\] \*\*T01: Recoverable task\*\*/,
|
|
402
|
+
"execute-task recovery should re-render the slice plan checkbox after marking the DB row complete",
|
|
403
|
+
);
|
|
404
|
+
} finally {
|
|
405
|
+
if (isDbAvailable()) closeDatabase();
|
|
406
|
+
}
|
|
407
|
+
} finally {
|
|
408
|
+
cleanup(base);
|
|
409
|
+
}
|
|
410
|
+
});
|
|
411
|
+
|
|
361
412
|
test('writeBlockerPlaceholder: updates DB slice status for complete-slice (#2653)', async () => {
|
|
362
413
|
const base = createFixtureBase();
|
|
363
414
|
try {
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Test isolation utilities for integration tests.
|
|
3
|
+
*
|
|
4
|
+
* Integration tests often call `mergeMilestoneToMain` and other functions that
|
|
5
|
+
* load preferences. If the user's global ~/.gsd/preferences.md has
|
|
6
|
+
* `git.main_branch: master`, tests fail because test repos use `main`.
|
|
7
|
+
*
|
|
8
|
+
* These utilities isolate tests from the user's global environment.
|
|
9
|
+
*/
|
|
10
|
+
|
|
11
|
+
import { mkdtempSync, rmSync, realpathSync } from "node:fs";
|
|
12
|
+
import { tmpdir } from "node:os";
|
|
13
|
+
import { join } from "node:path";
|
|
14
|
+
|
|
15
|
+
import { _resetServiceCache } from "../../worktree.ts";
|
|
16
|
+
import { _clearGsdRootCache } from "../../paths.ts";
|
|
17
|
+
|
|
18
|
+
let originalHome: string | undefined;
|
|
19
|
+
let fakeHome: string | null = null;
|
|
20
|
+
|
|
21
|
+
/**
|
|
22
|
+
* Isolate the test environment from user's global preferences.
|
|
23
|
+
* Creates a fake HOME directory so loadEffectiveGSDPreferences() returns
|
|
24
|
+
* empty global preferences instead of the user's ~/.gsd/preferences.md.
|
|
25
|
+
*
|
|
26
|
+
* Call this in a test.before() hook.
|
|
27
|
+
*/
|
|
28
|
+
export function isolateFromGlobalPreferences(): void {
|
|
29
|
+
originalHome = process.env.HOME;
|
|
30
|
+
fakeHome = realpathSync(mkdtempSync(join(tmpdir(), "gsd-test-home-")));
|
|
31
|
+
process.env.HOME = fakeHome;
|
|
32
|
+
_clearGsdRootCache();
|
|
33
|
+
_resetServiceCache();
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
/**
|
|
37
|
+
* Restore the original HOME and clean up the fake home directory.
|
|
38
|
+
*
|
|
39
|
+
* Call this in a test.after() hook.
|
|
40
|
+
*/
|
|
41
|
+
export function restoreGlobalPreferences(): void {
|
|
42
|
+
if (originalHome !== undefined) {
|
|
43
|
+
process.env.HOME = originalHome;
|
|
44
|
+
} else {
|
|
45
|
+
delete process.env.HOME;
|
|
46
|
+
}
|
|
47
|
+
_clearGsdRootCache();
|
|
48
|
+
_resetServiceCache();
|
|
49
|
+
if (fakeHome) {
|
|
50
|
+
rmSync(fakeHome, { recursive: true, force: true });
|
|
51
|
+
fakeHome = null;
|
|
52
|
+
}
|
|
53
|
+
}
|
|
@@ -10,13 +10,17 @@
|
|
|
10
10
|
import test from "node:test";
|
|
11
11
|
import assert from "node:assert/strict";
|
|
12
12
|
import { randomUUID } from "node:crypto";
|
|
13
|
+
import { execFileSync } from "node:child_process";
|
|
14
|
+
import { mkdirSync, mkdtempSync, rmSync, writeFileSync } from "node:fs";
|
|
15
|
+
import { tmpdir } from "node:os";
|
|
13
16
|
import { join } from "node:path";
|
|
14
17
|
|
|
15
18
|
import type { JournalEntry } from "../journal.js";
|
|
16
19
|
import type { LoopDeps } from "../auto/loop-deps.js";
|
|
17
20
|
import type { IterationContext, LoopState, PreDispatchData, IterationData } from "../auto/types.js";
|
|
18
21
|
import type { SessionLockStatus } from "../session-lock.js";
|
|
19
|
-
import { runDispatch, runUnitPhase, runPreDispatch } from "../auto/phases.js";
|
|
22
|
+
import { runDispatch, runUnitPhase, runPreDispatch, runFinalize } from "../auto/phases.js";
|
|
23
|
+
import { readUnitRuntimeRecord } from "../unit-runtime.js";
|
|
20
24
|
|
|
21
25
|
// ─── Helpers ─────────────────────────────────────────────────────────────────
|
|
22
26
|
|
|
@@ -317,6 +321,75 @@ test("runDispatch checks prior-slice completion against the project root in work
|
|
|
317
321
|
]);
|
|
318
322
|
});
|
|
319
323
|
|
|
324
|
+
test("runDispatch pauses when complete-milestone summary exists on disk but the unit is still stuck (#4289)", async (t) => {
|
|
325
|
+
const capture = createEventCapture();
|
|
326
|
+
let pauseCalls = 0;
|
|
327
|
+
let stopCalls = 0;
|
|
328
|
+
const base = join(tmpdir(), `gsd-stuck-complete-${randomUUID()}`);
|
|
329
|
+
t.after(() => {
|
|
330
|
+
rmSync(base, { recursive: true, force: true });
|
|
331
|
+
});
|
|
332
|
+
|
|
333
|
+
mkdirSync(join(base, ".gsd", "milestones", "M001"), { recursive: true });
|
|
334
|
+
mkdirSync(join(base, "src"), { recursive: true });
|
|
335
|
+
writeFileSync(join(base, ".gsd", "milestones", "M001", "M001-SUMMARY.md"), "# Summary\nDone.\n");
|
|
336
|
+
writeFileSync(join(base, "src", "app.ts"), "export const ok = true;\n");
|
|
337
|
+
|
|
338
|
+
execFileSync("git", ["init", "-b", "main"], { cwd: base, stdio: "ignore" });
|
|
339
|
+
execFileSync("git", ["config", "user.name", "Codex"], { cwd: base, stdio: "ignore" });
|
|
340
|
+
execFileSync("git", ["config", "user.email", "codex@example.com"], { cwd: base, stdio: "ignore" });
|
|
341
|
+
writeFileSync(join(base, "README.md"), "# test\n");
|
|
342
|
+
execFileSync("git", ["add", "README.md"], { cwd: base, stdio: "ignore" });
|
|
343
|
+
execFileSync("git", ["commit", "-m", "chore: seed"], { cwd: base, stdio: "ignore" });
|
|
344
|
+
execFileSync("git", ["checkout", "-b", "fix/test"], { cwd: base, stdio: "ignore" });
|
|
345
|
+
execFileSync("git", ["add", ".gsd/milestones/M001/M001-SUMMARY.md", "src/app.ts"], { cwd: base, stdio: "ignore" });
|
|
346
|
+
execFileSync("git", ["commit", "-m", "feat: summary exists but db is stale"], { cwd: base, stdio: "ignore" });
|
|
347
|
+
|
|
348
|
+
const deps = makeMockDeps(capture, {
|
|
349
|
+
pauseAuto: async () => { pauseCalls++; },
|
|
350
|
+
stopAuto: async () => { stopCalls++; },
|
|
351
|
+
resolveDispatch: async () => ({
|
|
352
|
+
action: "dispatch" as const,
|
|
353
|
+
unitType: "complete-milestone",
|
|
354
|
+
unitId: "M001",
|
|
355
|
+
prompt: "complete the milestone",
|
|
356
|
+
matchedRule: "completing-milestone-rule",
|
|
357
|
+
}),
|
|
358
|
+
});
|
|
359
|
+
|
|
360
|
+
const ic = makeIC(deps, {
|
|
361
|
+
s: {
|
|
362
|
+
...makeSession(),
|
|
363
|
+
basePath: base,
|
|
364
|
+
currentMilestoneId: "M001",
|
|
365
|
+
} as any,
|
|
366
|
+
});
|
|
367
|
+
const preData: PreDispatchData = {
|
|
368
|
+
state: {
|
|
369
|
+
phase: "completing-milestone",
|
|
370
|
+
activeMilestone: { id: "M001", title: "Test", status: "active" },
|
|
371
|
+
registry: [{ id: "M001", status: "active" }],
|
|
372
|
+
blockers: [],
|
|
373
|
+
} as any,
|
|
374
|
+
mid: "M001",
|
|
375
|
+
midTitle: "Test Milestone",
|
|
376
|
+
};
|
|
377
|
+
|
|
378
|
+
const result = await runDispatch(ic, preData, {
|
|
379
|
+
recentUnits: [
|
|
380
|
+
{ key: "complete-milestone/M001" },
|
|
381
|
+
{ key: "complete-milestone/M001" },
|
|
382
|
+
],
|
|
383
|
+
stuckRecoveryAttempts: 0,
|
|
384
|
+
consecutiveFinalizeTimeouts: 0,
|
|
385
|
+
});
|
|
386
|
+
|
|
387
|
+
assert.equal(result.action, "break");
|
|
388
|
+
assert.equal((result as any).reason, "complete-milestone-artifact-db-mismatch");
|
|
389
|
+
assert.equal(pauseCalls, 1, "complete-milestone disk/db mismatch should pause auto-mode");
|
|
390
|
+
assert.equal(stopCalls, 0, "mismatch pause should not hard-stop the loop");
|
|
391
|
+
});
|
|
392
|
+
|
|
320
393
|
test("runUnitPhase emits unit-start and unit-end with causedBy reference", async () => {
|
|
321
394
|
const capture = createEventCapture();
|
|
322
395
|
|
|
@@ -380,6 +453,41 @@ test("runUnitPhase emits unit-start and unit-end with causedBy reference", async
|
|
|
380
453
|
assert.equal(endEvents[0].causedBy!.seq, startEvents[0].seq, "unit-end causedBy.seq must match unit-start.seq");
|
|
381
454
|
});
|
|
382
455
|
|
|
456
|
+
test("runUnitPhase increments unitDispatchCount for repeated artifact-missing retries", async () => {
|
|
457
|
+
const capture = createEventCapture();
|
|
458
|
+
const { resolveAgentEnd, _resetPendingResolve } = await import("../auto-loop.js");
|
|
459
|
+
_resetPendingResolve();
|
|
460
|
+
|
|
461
|
+
const deps = makeMockDeps(capture);
|
|
462
|
+
const ic = makeIC(deps);
|
|
463
|
+
const iterData: IterationData = {
|
|
464
|
+
unitType: "execute-task",
|
|
465
|
+
unitId: "M001/S01/T01",
|
|
466
|
+
prompt: "do stuff",
|
|
467
|
+
finalPrompt: "do stuff",
|
|
468
|
+
pauseAfterUatDispatch: false,
|
|
469
|
+
state: { phase: "executing", activeMilestone: { id: "M001" }, activeSlice: { id: "S01" }, registry: [], blockers: [] } as any,
|
|
470
|
+
mid: "M001",
|
|
471
|
+
midTitle: "Test",
|
|
472
|
+
isRetry: false,
|
|
473
|
+
previousTier: undefined,
|
|
474
|
+
};
|
|
475
|
+
const loopState: LoopState = { recentUnits: [{ key: "execute-task/M001/S01/T01" }], stuckRecoveryAttempts: 0, consecutiveFinalizeTimeouts: 0 };
|
|
476
|
+
|
|
477
|
+
const firstRun = runUnitPhase(ic, iterData, loopState);
|
|
478
|
+
await new Promise(r => setTimeout(r, 50));
|
|
479
|
+
resolveAgentEnd({ messages: [{ role: "assistant" }] });
|
|
480
|
+
await firstRun;
|
|
481
|
+
assert.equal(ic.s.unitDispatchCount.get("execute-task/M001/S01/T01"), 1);
|
|
482
|
+
|
|
483
|
+
_resetPendingResolve();
|
|
484
|
+
const secondRun = runUnitPhase(ic, iterData, loopState);
|
|
485
|
+
await new Promise(r => setTimeout(r, 50));
|
|
486
|
+
resolveAgentEnd({ messages: [{ role: "assistant" }] });
|
|
487
|
+
await secondRun;
|
|
488
|
+
assert.equal(ic.s.unitDispatchCount.get("execute-task/M001/S01/T01"), 2);
|
|
489
|
+
});
|
|
490
|
+
|
|
383
491
|
test("all events from a mock iteration have monotonically increasing seq and same flowId", async () => {
|
|
384
492
|
const capture = createEventCapture();
|
|
385
493
|
const { resolveAgentEnd, _resetPendingResolve } = await import("../auto-loop.js");
|
|
@@ -667,3 +775,65 @@ test("session-failed cancellations close out and emit unit-end before hard stop"
|
|
|
667
775
|
assert.equal((endEvents[0].data as any).artifactVerified, false);
|
|
668
776
|
assert.equal((endEvents[0].data as any).errorContext.category, "session-failed");
|
|
669
777
|
});
|
|
778
|
+
|
|
779
|
+
test("runFinalize pauses and emits unit-end when pre-verification times out", async () => {
|
|
780
|
+
const capture = createEventCapture();
|
|
781
|
+
let pauseCalls = 0;
|
|
782
|
+
const basePath = mkdtempSync(join(tmpdir(), "gsd-finalize-timeout-"));
|
|
783
|
+
|
|
784
|
+
const deps = makeMockDeps(capture, {
|
|
785
|
+
pauseAuto: async () => { pauseCalls++; },
|
|
786
|
+
postUnitPreVerification: async () => {
|
|
787
|
+
await new Promise(() => {});
|
|
788
|
+
return "continue" as const;
|
|
789
|
+
},
|
|
790
|
+
});
|
|
791
|
+
|
|
792
|
+
const ic = makeIC(deps, {
|
|
793
|
+
s: {
|
|
794
|
+
...makeSession(),
|
|
795
|
+
basePath,
|
|
796
|
+
currentUnit: { type: "execute-task", id: "M001/S01/T01", startedAt: 1234 },
|
|
797
|
+
} as any,
|
|
798
|
+
});
|
|
799
|
+
const iterData: IterationData = {
|
|
800
|
+
unitType: "execute-task",
|
|
801
|
+
unitId: "M001/S01/T01",
|
|
802
|
+
prompt: "do stuff",
|
|
803
|
+
finalPrompt: "do stuff",
|
|
804
|
+
pauseAfterUatDispatch: false,
|
|
805
|
+
state: { phase: "executing", activeMilestone: { id: "M001" }, activeSlice: { id: "S01" }, registry: [], blockers: [] } as any,
|
|
806
|
+
mid: "M001",
|
|
807
|
+
midTitle: "Test",
|
|
808
|
+
isRetry: false,
|
|
809
|
+
previousTier: undefined,
|
|
810
|
+
};
|
|
811
|
+
const loopState: LoopState = { recentUnits: [], stuckRecoveryAttempts: 0, consecutiveFinalizeTimeouts: 0 };
|
|
812
|
+
|
|
813
|
+
const originalSetTimeout = globalThis.setTimeout;
|
|
814
|
+
try {
|
|
815
|
+
globalThis.setTimeout = ((handler: (...args: any[]) => void, _timeout?: number, ...args: any[]) =>
|
|
816
|
+
originalSetTimeout(handler, 0, ...args)) as typeof setTimeout;
|
|
817
|
+
|
|
818
|
+
const result = await runFinalize(ic, iterData, loopState);
|
|
819
|
+
assert.equal(result.action, "break");
|
|
820
|
+
assert.equal((result as any).reason, "finalize-pre-timeout");
|
|
821
|
+
} finally {
|
|
822
|
+
globalThis.setTimeout = originalSetTimeout;
|
|
823
|
+
}
|
|
824
|
+
|
|
825
|
+
assert.equal(pauseCalls, 1, "pre-verification timeout should pause auto-mode");
|
|
826
|
+
assert.equal(loopState.consecutiveFinalizeTimeouts, 1, "timeout should increment finalize timeout counter");
|
|
827
|
+
assert.equal(ic.s.currentUnit, null, "timed-out finalize should detach currentUnit");
|
|
828
|
+
|
|
829
|
+
const runtime = readUnitRuntimeRecord(basePath, "execute-task", "M001/S01/T01");
|
|
830
|
+
assert.ok(runtime, "timed-out finalize should persist a runtime record");
|
|
831
|
+
assert.equal(runtime?.phase, "finalize-timeout");
|
|
832
|
+
assert.equal(runtime?.lastProgressKind, "finalize-pre-timeout");
|
|
833
|
+
|
|
834
|
+
const endEvents = capture.events.filter((e) => e.eventType === "unit-end");
|
|
835
|
+
assert.equal(endEvents.length, 1, "timed-out finalize should emit terminal unit-end");
|
|
836
|
+
assert.equal((endEvents[0].data as any).status, "timed-out-finalize");
|
|
837
|
+
assert.equal((endEvents[0].data as any).artifactVerified, false);
|
|
838
|
+
assert.equal((endEvents[0].data as any).finalizeStage, "pre");
|
|
839
|
+
});
|
|
@@ -363,7 +363,7 @@ test('md-importer: schema v1→v2 migration', () => {
|
|
|
363
363
|
openDatabase(':memory:');
|
|
364
364
|
const adapter = _getAdapter();
|
|
365
365
|
const version = adapter?.prepare('SELECT MAX(version) as v FROM schema_version').get();
|
|
366
|
-
assert.deepStrictEqual(version?.v,
|
|
366
|
+
assert.deepStrictEqual(version?.v, 17, 'new DB should be at schema version 17');
|
|
367
367
|
|
|
368
368
|
// Artifacts table should exist
|
|
369
369
|
const tableCheck = adapter?.prepare("SELECT count(*) as c FROM sqlite_master WHERE type='table' AND name='artifacts'").get();
|
|
@@ -323,9 +323,9 @@ test('memory-store: schema includes memories table', () => {
|
|
|
323
323
|
const viewCount = adapter.prepare('SELECT count(*) as cnt FROM active_memories').get();
|
|
324
324
|
assert.deepStrictEqual(viewCount?.['cnt'], 0, 'active_memories view should exist');
|
|
325
325
|
|
|
326
|
-
// Verify schema version is
|
|
326
|
+
// Verify schema version is 17 (ADR-011 P2 escalation columns included)
|
|
327
327
|
const version = adapter.prepare('SELECT MAX(version) as v FROM schema_version').get();
|
|
328
|
-
assert.deepStrictEqual(version?.['v'],
|
|
328
|
+
assert.deepStrictEqual(version?.['v'], 17, 'schema version should be 17');
|
|
329
329
|
|
|
330
330
|
closeDatabase();
|
|
331
331
|
});
|
|
@@ -79,8 +79,9 @@ function seedTask(milestoneId: string, sliceId: string, taskId: string, status:
|
|
|
79
79
|
test("registerQueryTools registers gsd_milestone_status tool", () => {
|
|
80
80
|
const pi = makeMockPi();
|
|
81
81
|
registerQueryTools(pi);
|
|
82
|
-
|
|
83
|
-
assert.
|
|
82
|
+
const names = pi.tools.map((t: { name: string }) => t.name);
|
|
83
|
+
assert.ok(names.includes("gsd_milestone_status"), "Should register gsd_milestone_status");
|
|
84
|
+
assert.ok(names.includes("gsd_checkpoint_db"), "Should register gsd_checkpoint_db");
|
|
84
85
|
});
|
|
85
86
|
|
|
86
87
|
test("gsd_milestone_status has promptGuidelines mentioning prohibited alternatives", () => {
|
|
@@ -74,7 +74,7 @@ test("#2885: cost table includes openai-codex provider models", () => {
|
|
|
74
74
|
const ids = BUNDLED_COST_TABLE.map(e => e.id);
|
|
75
75
|
const codexModels = [
|
|
76
76
|
"gpt-5.1", "gpt-5.1-codex-max", "gpt-5.1-codex-mini",
|
|
77
|
-
"gpt-5.2", "gpt-5.2-codex", "gpt-5.3-codex", "gpt-5.3-codex-spark", "gpt-5.4",
|
|
77
|
+
"gpt-5.2", "gpt-5.2-codex", "gpt-5.3-codex", "gpt-5.3-codex-spark", "gpt-5.4", "gpt-5.4-mini",
|
|
78
78
|
];
|
|
79
79
|
for (const model of codexModels) {
|
|
80
80
|
assert.ok(ids.includes(model), `cost table should include openai-codex model "${model}"`);
|
|
@@ -94,7 +94,7 @@ test("#2885: cost table includes modern OpenAI models", () => {
|
|
|
94
94
|
});
|
|
95
95
|
|
|
96
96
|
test("#2885: lookupModelCost returns costs for new models (not 999 fallback)", () => {
|
|
97
|
-
const newModels = ["o4-mini", "gpt-4.1", "gpt-5", "gpt-5.4", "gpt-5.1-codex-mini"];
|
|
97
|
+
const newModels = ["o4-mini", "gpt-4.1", "gpt-5", "gpt-5.4", "gpt-5.4-mini", "gpt-5.1-codex-mini"];
|
|
98
98
|
for (const model of newModels) {
|
|
99
99
|
const entry = lookupModelCost(model);
|
|
100
100
|
assert.ok(entry, `lookupModelCost should find "${model}"`);
|
|
@@ -298,7 +298,7 @@ test("MODEL_CAPABILITY_PROFILES has entries for all tier-mapped models", () => {
|
|
|
298
298
|
|
|
299
299
|
test("#2885: openai-codex light-tier models are recognized", () => {
|
|
300
300
|
const config = { ...defaultRoutingConfig(), enabled: true };
|
|
301
|
-
const lightModels = ["gpt-4.1-mini", "gpt-4.1-nano", "gpt-5-mini", "gpt-5-nano", "gpt-5.1-codex-mini", "gpt-5.3-codex-spark"];
|
|
301
|
+
const lightModels = ["gpt-4.1-mini", "gpt-4.1-nano", "gpt-5-mini", "gpt-5-nano", "gpt-5.1-codex-mini", "gpt-5.3-codex-spark", "gpt-5.4-mini"];
|
|
302
302
|
for (const model of lightModels) {
|
|
303
303
|
const result = resolveModelForComplexity(
|
|
304
304
|
makeClassification("light"),
|
|
@@ -215,6 +215,65 @@ test("unitVerb handles discuss-slice", () => {
|
|
|
215
215
|
// auto-artifact-paths.ts: artifact resolution
|
|
216
216
|
// ═══════════════════════════════════════════════════════════════════════════
|
|
217
217
|
|
|
218
|
+
// ═══════════════════════════════════════════════════════════════════════════
|
|
219
|
+
// ADR-011: meta-test — every KNOWN_UNIT_TYPES entry must appear in all four
|
|
220
|
+
// downstream registries so a future unit type added to KNOWN_UNIT_TYPES can't
|
|
221
|
+
// silently fall through to wrong defaults in metrics/dashboard/artifacts/post-unit.
|
|
222
|
+
// ═══════════════════════════════════════════════════════════════════════════
|
|
223
|
+
|
|
224
|
+
// Intentional exceptions — unit types that legitimately rely on default/null
|
|
225
|
+
// behavior in a specific registry. Entries captured here reflect the current
|
|
226
|
+
// baseline at the time ADR-011 landed; adding to this allowlist for a NEW unit
|
|
227
|
+
// type requires explicit justification in the commit.
|
|
228
|
+
//
|
|
229
|
+
// Test intent: catch the case where someone adds a new unit type to
|
|
230
|
+
// KNOWN_UNIT_TYPES but forgets to wire it into one of the four registries.
|
|
231
|
+
// The allowlist freezes the baseline so pre-existing omissions do not block
|
|
232
|
+
// the test, but any brand-new addition must be either handled or justified.
|
|
233
|
+
const REGISTRY_EXCEPTIONS: Record<string, Set<string>> = {
|
|
234
|
+
// metrics.ts classifyUnitPhase uses default → "execution" for most unit types.
|
|
235
|
+
"metrics.ts": new Set([
|
|
236
|
+
"worktree-merge", "custom-step",
|
|
237
|
+
"rewrite-docs", "run-uat", "gate-evaluate", "replan-slice",
|
|
238
|
+
"reactive-execute", "validate-milestone", "complete-milestone",
|
|
239
|
+
]),
|
|
240
|
+
"auto-dashboard.ts": new Set([
|
|
241
|
+
"worktree-merge",
|
|
242
|
+
"gate-evaluate", "reactive-execute", "validate-milestone", "complete-milestone",
|
|
243
|
+
]),
|
|
244
|
+
"auto-artifact-paths.ts": new Set([
|
|
245
|
+
"rewrite-docs", "gate-evaluate", "reactive-execute", "discuss-slice", "worktree-merge",
|
|
246
|
+
]),
|
|
247
|
+
"auto-post-unit.ts": new Set([
|
|
248
|
+
"execute-task", "reactive-execute", "gate-evaluate", "worktree-merge",
|
|
249
|
+
]),
|
|
250
|
+
};
|
|
251
|
+
|
|
252
|
+
const REGISTRY_SOURCES: Array<[string, string]> = [
|
|
253
|
+
["metrics.ts", metricsSrc],
|
|
254
|
+
["auto-dashboard.ts", dashboardSrc],
|
|
255
|
+
["auto-artifact-paths.ts", artifactSrc],
|
|
256
|
+
["auto-post-unit.ts", postUnitSrc],
|
|
257
|
+
];
|
|
258
|
+
|
|
259
|
+
test("ADR-011 meta: every KNOWN_UNIT_TYPES entry appears in all 4 downstream registries", () => {
|
|
260
|
+
const missing: Array<{ registry: string; unitType: string }> = [];
|
|
261
|
+
for (const [registry, src] of REGISTRY_SOURCES) {
|
|
262
|
+
for (const ut of ALL_KNOWN_UNIT_TYPES) {
|
|
263
|
+
if (REGISTRY_EXCEPTIONS[registry]?.has(ut)) continue;
|
|
264
|
+
if (!src.includes(`"${ut}"`)) {
|
|
265
|
+
missing.push({ registry, unitType: ut });
|
|
266
|
+
}
|
|
267
|
+
}
|
|
268
|
+
}
|
|
269
|
+
assert.deepEqual(
|
|
270
|
+
missing,
|
|
271
|
+
[],
|
|
272
|
+
"Each listed unit type is absent from the given registry — either add a handler or add to REGISTRY_EXCEPTIONS with justification:\n" +
|
|
273
|
+
missing.map((m) => ` ${m.registry}: "${m.unitType}"`).join("\n"),
|
|
274
|
+
);
|
|
275
|
+
});
|
|
276
|
+
|
|
218
277
|
test("resolveExpectedArtifactPath handles discuss-slice", () => {
|
|
219
278
|
assert.ok(artifactSrc.includes('"discuss-slice"'), "missing discuss-slice in artifact paths");
|
|
220
279
|
});
|
|
@@ -17,7 +17,7 @@ test("buildNotificationWidgetLines shows unread count with shortcut pair", () =>
|
|
|
17
17
|
|
|
18
18
|
const lines = buildNotificationWidgetLines();
|
|
19
19
|
assert.equal(lines.length, 1);
|
|
20
|
-
assert.match(lines[0]!,
|
|
20
|
+
assert.match(lines[0]!, /🔔\s+1 unread/);
|
|
21
21
|
assert.match(lines[0]!, /\(.+\/.+\)/);
|
|
22
22
|
} finally {
|
|
23
23
|
_resetNotificationStore();
|
|
@@ -148,6 +148,23 @@ test('handlePlanSlice surfaces render failures without changing parse-visible ta
|
|
|
148
148
|
}
|
|
149
149
|
});
|
|
150
150
|
|
|
151
|
+
test('handlePlanSlice reactivates a deferred parent slice to pending', async (t) => {
|
|
152
|
+
const base = makeTmpBase();
|
|
153
|
+
t.after(() => cleanup(base));
|
|
154
|
+
openDatabase(join(base, '.gsd', 'gsd.db'));
|
|
155
|
+
|
|
156
|
+
insertMilestone({ id: 'M001', title: 'Milestone', status: 'active' });
|
|
157
|
+
insertSlice({ id: 'S02', milestoneId: 'M001', title: 'Planning slice', status: 'deferred', demo: 'Rendered plans exist.' });
|
|
158
|
+
|
|
159
|
+
const result = await handlePlanSlice(validParams(), base);
|
|
160
|
+
assert.ok(!('error' in result), `unexpected error: ${'error' in result ? result.error : ''}`);
|
|
161
|
+
|
|
162
|
+
const slice = getSlice('M001', 'S02');
|
|
163
|
+
assert.ok(slice);
|
|
164
|
+
assert.equal(slice?.status, 'pending', 'deferred slice must be reactivated to pending so auto-mode can dispatch it');
|
|
165
|
+
assert.equal(slice?.goal, 'Persist slice planning through the DB.');
|
|
166
|
+
});
|
|
167
|
+
|
|
151
168
|
test('handlePlanSlice reruns idempotently and refreshes parse-visible state', async () => {
|
|
152
169
|
const base = makeTmpBase();
|
|
153
170
|
openDatabase(join(base, '.gsd', 'gsd.db'));
|