gsd-pi 2.80.0-dev.b62439b9f → 2.80.0-dev.c5c38454b
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/dist/{cli/cli-web-branch.d.ts → cli-web-branch.d.ts} +1 -1
- package/dist/{cli/cli-web-branch.js → cli-web-branch.js} +3 -3
- package/dist/{cli/cli.js → cli.js} +25 -25
- package/dist/{extension-runtime/extension-registry.js → extension-registry.js} +1 -1
- package/dist/{headless/headless-query.d.ts → headless-query.d.ts} +1 -1
- package/dist/{headless/headless-query.js → headless-query.js} +2 -3
- package/dist/{headless/headless-recover.js → headless-recover.js} +2 -3
- package/dist/{headless/headless.js → headless.js} +3 -3
- package/dist/loader.js +10 -10
- package/dist/{providers/models-resolver.js → models-resolver.js} +1 -1
- package/dist/{onboarding/onboarding.js → onboarding.js} +8 -8
- package/dist/{providers/remote-questions-config.js → remote-questions-config.js} +1 -1
- package/dist/{resource-runtime/resource-loader.d.ts → resource-loader.d.ts} +1 -1
- package/dist/{resource-runtime/resource-loader.js → resource-loader.js} +6 -6
- package/dist/resources/.managed-resources-content-hash +1 -1
- package/dist/resources/extensions/github-sync/templates.js +39 -8
- package/dist/resources/extensions/gsd/auto/loop.js +13 -9
- package/dist/resources/extensions/gsd/auto/run-unit.js +19 -15
- package/dist/resources/extensions/gsd/auto-dashboard.js +51 -15
- package/dist/resources/extensions/gsd/auto-dispatch.js +10 -0
- package/dist/resources/extensions/gsd/auto-recovery.js +154 -8
- package/dist/resources/extensions/gsd/auto-start.js +2 -3
- package/dist/resources/extensions/gsd/auto-worktree.js +6 -4
- package/dist/resources/extensions/gsd/auto.js +3 -3
- package/dist/resources/extensions/gsd/bootstrap/agent-end-recovery.js +15 -1
- package/dist/resources/extensions/gsd/bootstrap/register-hooks.js +11 -1
- package/dist/resources/extensions/gsd/bootstrap/write-gate.js +129 -1
- package/dist/resources/extensions/gsd/commands-extract-learnings.js +17 -12
- package/dist/resources/extensions/gsd/db-base-schema.js +14 -0
- package/dist/resources/extensions/gsd/db-migration-steps.js +16 -0
- package/dist/resources/extensions/gsd/gsd-db.js +102 -2
- package/dist/resources/extensions/gsd/guided-flow.js +2 -2
- package/dist/resources/extensions/gsd/pr-evidence.js +57 -16
- package/dist/resources/extensions/gsd/working-output-messages.js +64 -0
- package/dist/{security/security-overrides.js → security-overrides.js} +1 -1
- package/dist/{startup/startup-model-validation.js → startup-model-validation.js} +1 -1
- package/dist/tsconfig.extensions.tsbuildinfo +1 -1
- package/dist/{update/update-check.js → update-check.js} +1 -1
- package/dist/web/standalone/.next/BUILD_ID +1 -1
- package/dist/web/standalone/.next/app-path-routes-manifest.json +11 -11
- package/dist/web/standalone/.next/build-manifest.json +3 -3
- package/dist/web/standalone/.next/prerender-manifest.json +3 -3
- package/dist/web/standalone/.next/react-loadable-manifest.json +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.html +1 -1
- package/dist/web/standalone/.next/server/app/_not-found.rsc +1 -1
- package/dist/web/standalone/.next/server/app/_not-found.segments/_full.segment.rsc +1 -1
- 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 +1 -1
- package/dist/web/standalone/.next/server/app/_not-found.segments/_not-found/__PAGE__.segment.rsc +1 -1
- package/dist/web/standalone/.next/server/app/_not-found.segments/_not-found.segment.rsc +1 -1
- package/dist/web/standalone/.next/server/app/_not-found.segments/_tree.segment.rsc +1 -1
- package/dist/web/standalone/.next/server/app/api/boot/route.js +1 -1
- package/dist/web/standalone/.next/server/app/api/boot/route.js.nft.json +1 -1
- package/dist/web/standalone/.next/server/app/api/bridge-terminal/input/route.js +1 -1
- package/dist/web/standalone/.next/server/app/api/bridge-terminal/input/route.js.nft.json +1 -1
- package/dist/web/standalone/.next/server/app/api/bridge-terminal/resize/route.js +1 -1
- package/dist/web/standalone/.next/server/app/api/bridge-terminal/resize/route.js.nft.json +1 -1
- package/dist/web/standalone/.next/server/app/api/bridge-terminal/stream/route.js +2 -2
- package/dist/web/standalone/.next/server/app/api/bridge-terminal/stream/route.js.nft.json +1 -1
- package/dist/web/standalone/.next/server/app/api/captures/route.js +1 -1
- package/dist/web/standalone/.next/server/app/api/captures/route.js.nft.json +1 -1
- package/dist/web/standalone/.next/server/app/api/cleanup/route.js +1 -1
- package/dist/web/standalone/.next/server/app/api/cleanup/route.js.nft.json +1 -1
- package/dist/web/standalone/.next/server/app/api/doctor/route.js +1 -1
- package/dist/web/standalone/.next/server/app/api/doctor/route.js.nft.json +1 -1
- package/dist/web/standalone/.next/server/app/api/export-data/route.js +1 -1
- package/dist/web/standalone/.next/server/app/api/export-data/route.js.nft.json +1 -1
- package/dist/web/standalone/.next/server/app/api/files/route.js +1 -1
- package/dist/web/standalone/.next/server/app/api/files/route.js.nft.json +1 -1
- package/dist/web/standalone/.next/server/app/api/forensics/route.js +1 -1
- package/dist/web/standalone/.next/server/app/api/forensics/route.js.nft.json +1 -1
- package/dist/web/standalone/.next/server/app/api/git/route.js +1 -1
- package/dist/web/standalone/.next/server/app/api/git/route.js.nft.json +1 -1
- package/dist/web/standalone/.next/server/app/api/history/route.js +1 -1
- package/dist/web/standalone/.next/server/app/api/history/route.js.nft.json +1 -1
- package/dist/web/standalone/.next/server/app/api/hooks/route.js +1 -1
- package/dist/web/standalone/.next/server/app/api/hooks/route.js.nft.json +1 -1
- package/dist/web/standalone/.next/server/app/api/inspect/route.js +1 -1
- package/dist/web/standalone/.next/server/app/api/inspect/route.js.nft.json +1 -1
- package/dist/web/standalone/.next/server/app/api/knowledge/route.js +1 -1
- package/dist/web/standalone/.next/server/app/api/knowledge/route.js.nft.json +1 -1
- package/dist/web/standalone/.next/server/app/api/live-state/route.js +1 -1
- package/dist/web/standalone/.next/server/app/api/live-state/route.js.nft.json +1 -1
- package/dist/web/standalone/.next/server/app/api/notifications/route.js +2 -2
- package/dist/web/standalone/.next/server/app/api/notifications/route.js.nft.json +1 -1
- package/dist/web/standalone/.next/server/app/api/onboarding/route.js +1 -1
- package/dist/web/standalone/.next/server/app/api/onboarding/route.js.nft.json +1 -1
- package/dist/web/standalone/.next/server/app/api/preferences/route.js +1 -1
- package/dist/web/standalone/.next/server/app/api/projects/route.js +1 -1
- package/dist/web/standalone/.next/server/app/api/projects/route.js.nft.json +1 -1
- package/dist/web/standalone/.next/server/app/api/recovery/route.js +1 -1
- package/dist/web/standalone/.next/server/app/api/recovery/route.js.nft.json +1 -1
- package/dist/web/standalone/.next/server/app/api/session/browser/route.js +1 -1
- package/dist/web/standalone/.next/server/app/api/session/browser/route.js.nft.json +1 -1
- package/dist/web/standalone/.next/server/app/api/session/command/route.js +1 -1
- package/dist/web/standalone/.next/server/app/api/session/command/route.js.nft.json +1 -1
- package/dist/web/standalone/.next/server/app/api/session/events/route.js +2 -2
- package/dist/web/standalone/.next/server/app/api/session/events/route.js.nft.json +1 -1
- package/dist/web/standalone/.next/server/app/api/session/manage/route.js +1 -1
- package/dist/web/standalone/.next/server/app/api/session/manage/route.js.nft.json +1 -1
- package/dist/web/standalone/.next/server/app/api/settings-data/route.js +1 -1
- package/dist/web/standalone/.next/server/app/api/settings-data/route.js.nft.json +1 -1
- package/dist/web/standalone/.next/server/app/api/skill-health/route.js +1 -1
- package/dist/web/standalone/.next/server/app/api/skill-health/route.js.nft.json +1 -1
- package/dist/web/standalone/.next/server/app/api/steer/route.js +1 -1
- package/dist/web/standalone/.next/server/app/api/steer/route.js.nft.json +1 -1
- package/dist/web/standalone/.next/server/app/api/switch-root/route.js +1 -1
- package/dist/web/standalone/.next/server/app/api/switch-root/route.js.nft.json +1 -1
- package/dist/web/standalone/.next/server/app/api/terminal/input/route.js +2 -2
- package/dist/web/standalone/.next/server/app/api/terminal/resize/route.js +2 -2
- package/dist/web/standalone/.next/server/app/api/terminal/sessions/route.js +2 -2
- package/dist/web/standalone/.next/server/app/api/terminal/sessions/route.js.nft.json +1 -1
- package/dist/web/standalone/.next/server/app/api/terminal/stream/route.js +3 -3
- package/dist/web/standalone/.next/server/app/api/terminal/stream/route.js.nft.json +1 -1
- package/dist/web/standalone/.next/server/app/api/undo/route.js +1 -1
- package/dist/web/standalone/.next/server/app/api/undo/route.js.nft.json +1 -1
- package/dist/web/standalone/.next/server/app/api/update/route.js +1 -1
- package/dist/web/standalone/.next/server/app/api/visualizer/route.js +1 -1
- package/dist/web/standalone/.next/server/app/api/visualizer/route.js.nft.json +1 -1
- package/dist/web/standalone/.next/server/app/index.html +1 -1
- package/dist/web/standalone/.next/server/app/index.rsc +1 -1
- 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 +1 -1
- 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 +1 -1
- package/dist/web/standalone/.next/server/app/index.segments/_tree.segment.rsc +1 -1
- package/dist/web/standalone/.next/server/app-paths-manifest.json +11 -11
- package/dist/web/standalone/.next/server/chunks/6897.js +12 -0
- package/dist/web/standalone/.next/server/middleware-build-manifest.js +1 -1
- 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/{8336.6f6f30e410419aff.js → 8336.631939fb583761fa.js} +1 -1
- package/dist/web/standalone/.next/static/chunks/{webpack-d82dbee6356c1733.js → webpack-0481f1221120a7c6.js} +1 -1
- package/dist/{cli/web-mode.js → web-mode.js} +3 -3
- package/dist/{onboarding/welcome-screen.js → welcome-screen.js} +1 -1
- package/dist/{worktrees/worktree-cli.js → worktree-cli.js} +2 -3
- package/package.json +7 -3
- package/packages/pi-ai/dist/models/fake-model.d.ts +12 -0
- package/packages/pi-ai/dist/models/fake-model.d.ts.map +1 -0
- package/packages/pi-ai/dist/models/fake-model.js +27 -0
- package/packages/pi-ai/dist/models/fake-model.js.map +1 -0
- package/packages/pi-ai/dist/models/index.d.ts.map +1 -1
- package/packages/pi-ai/dist/models/index.js +8 -0
- package/packages/pi-ai/dist/models/index.js.map +1 -1
- package/packages/pi-ai/dist/providers/fake.d.ts +42 -0
- package/packages/pi-ai/dist/providers/fake.d.ts.map +1 -0
- package/packages/pi-ai/dist/providers/fake.js +319 -0
- package/packages/pi-ai/dist/providers/fake.js.map +1 -0
- package/packages/pi-ai/dist/providers/register-builtins.d.ts.map +1 -1
- package/packages/pi-ai/dist/providers/register-builtins.js +24 -0
- package/packages/pi-ai/dist/providers/register-builtins.js.map +1 -1
- package/packages/pi-ai/src/models/fake-model.ts +30 -0
- package/packages/pi-ai/src/models/index.ts +9 -0
- package/packages/pi-ai/src/providers/fake.ts +376 -0
- package/packages/pi-ai/src/providers/register-builtins.ts +23 -0
- package/packages/pi-ai/tsconfig.tsbuildinfo +1 -1
- package/packages/pi-coding-agent/dist/core/chat-controller-ordering.test.js +44 -0
- package/packages/pi-coding-agent/dist/core/chat-controller-ordering.test.js.map +1 -1
- package/packages/pi-coding-agent/dist/core/extensions/runner.d.ts +2 -0
- package/packages/pi-coding-agent/dist/core/extensions/runner.d.ts.map +1 -1
- package/packages/pi-coding-agent/dist/core/extensions/runner.js +14 -1
- package/packages/pi-coding-agent/dist/core/extensions/runner.js.map +1 -1
- package/packages/pi-coding-agent/dist/core/extensions/runner.test.js +97 -0
- package/packages/pi-coding-agent/dist/core/extensions/runner.test.js.map +1 -1
- package/packages/pi-coding-agent/dist/core/model-registry.d.ts.map +1 -1
- package/packages/pi-coding-agent/dist/core/model-registry.js +5 -0
- package/packages/pi-coding-agent/dist/core/model-registry.js.map +1 -1
- package/packages/pi-coding-agent/dist/core/settings-manager.d.ts +4 -0
- package/packages/pi-coding-agent/dist/core/settings-manager.d.ts.map +1 -1
- package/packages/pi-coding-agent/dist/core/settings-manager.js +8 -0
- package/packages/pi-coding-agent/dist/core/settings-manager.js.map +1 -1
- package/packages/pi-coding-agent/dist/core/slash-commands.d.ts.map +1 -1
- package/packages/pi-coding-agent/dist/core/slash-commands.js +1 -0
- package/packages/pi-coding-agent/dist/core/slash-commands.js.map +1 -1
- package/packages/pi-coding-agent/dist/modes/interactive/components/__tests__/chat-frame-compaction-tone.test.js +6 -4
- package/packages/pi-coding-agent/dist/modes/interactive/components/__tests__/chat-frame-compaction-tone.test.js.map +1 -1
- package/packages/pi-coding-agent/dist/modes/interactive/components/__tests__/tool-execution.test.js +54 -15
- package/packages/pi-coding-agent/dist/modes/interactive/components/__tests__/tool-execution.test.js.map +1 -1
- package/packages/pi-coding-agent/dist/modes/interactive/components/adaptive-layout.d.ts +26 -0
- package/packages/pi-coding-agent/dist/modes/interactive/components/adaptive-layout.d.ts.map +1 -0
- package/packages/pi-coding-agent/dist/modes/interactive/components/adaptive-layout.js +112 -0
- package/packages/pi-coding-agent/dist/modes/interactive/components/adaptive-layout.js.map +1 -0
- package/packages/pi-coding-agent/dist/modes/interactive/components/adaptive-layout.test.d.ts +2 -0
- package/packages/pi-coding-agent/dist/modes/interactive/components/adaptive-layout.test.d.ts.map +1 -0
- package/packages/pi-coding-agent/dist/modes/interactive/components/adaptive-layout.test.js +51 -0
- package/packages/pi-coding-agent/dist/modes/interactive/components/adaptive-layout.test.js.map +1 -0
- package/packages/pi-coding-agent/dist/modes/interactive/components/assistant-message.d.ts.map +1 -1
- package/packages/pi-coding-agent/dist/modes/interactive/components/assistant-message.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 +10 -9
- package/packages/pi-coding-agent/dist/modes/interactive/components/chat-frame.js.map +1 -1
- package/packages/pi-coding-agent/dist/modes/interactive/components/settings-selector.d.ts +3 -0
- package/packages/pi-coding-agent/dist/modes/interactive/components/settings-selector.d.ts.map +1 -1
- package/packages/pi-coding-agent/dist/modes/interactive/components/settings-selector.js +11 -0
- package/packages/pi-coding-agent/dist/modes/interactive/components/settings-selector.js.map +1 -1
- package/packages/pi-coding-agent/dist/modes/interactive/components/tool-card-cleanup-and-success-runtime.test.js +7 -6
- package/packages/pi-coding-agent/dist/modes/interactive/components/tool-card-cleanup-and-success-runtime.test.js.map +1 -1
- package/packages/pi-coding-agent/dist/modes/interactive/components/tool-execution.d.ts +16 -0
- package/packages/pi-coding-agent/dist/modes/interactive/components/tool-execution.d.ts.map +1 -1
- package/packages/pi-coding-agent/dist/modes/interactive/components/tool-execution.js +106 -17
- package/packages/pi-coding-agent/dist/modes/interactive/components/tool-execution.js.map +1 -1
- package/packages/pi-coding-agent/dist/modes/interactive/controllers/chat-controller.d.ts.map +1 -1
- package/packages/pi-coding-agent/dist/modes/interactive/controllers/chat-controller.js +58 -1
- package/packages/pi-coding-agent/dist/modes/interactive/controllers/chat-controller.js.map +1 -1
- package/packages/pi-coding-agent/dist/modes/interactive/controllers/chat-controller.test.js +40 -1
- package/packages/pi-coding-agent/dist/modes/interactive/controllers/chat-controller.test.js.map +1 -1
- package/packages/pi-coding-agent/dist/modes/interactive/controllers/input-controller.test.js +1 -0
- package/packages/pi-coding-agent/dist/modes/interactive/controllers/input-controller.test.js.map +1 -1
- package/packages/pi-coding-agent/dist/modes/interactive/interactive-mode-state.d.ts +1 -0
- package/packages/pi-coding-agent/dist/modes/interactive/interactive-mode-state.d.ts.map +1 -1
- package/packages/pi-coding-agent/dist/modes/interactive/interactive-mode-state.js.map +1 -1
- package/packages/pi-coding-agent/dist/modes/interactive/interactive-mode.d.ts +3 -0
- package/packages/pi-coding-agent/dist/modes/interactive/interactive-mode.d.ts.map +1 -1
- package/packages/pi-coding-agent/dist/modes/interactive/interactive-mode.js +23 -0
- package/packages/pi-coding-agent/dist/modes/interactive/interactive-mode.js.map +1 -1
- package/packages/pi-coding-agent/dist/modes/interactive/slash-command-handlers.d.ts.map +1 -1
- package/packages/pi-coding-agent/dist/modes/interactive/slash-command-handlers.js +20 -0
- package/packages/pi-coding-agent/dist/modes/interactive/slash-command-handlers.js.map +1 -1
- package/packages/pi-coding-agent/dist/modes/interactive/slash-command-handlers.test.d.ts +2 -0
- package/packages/pi-coding-agent/dist/modes/interactive/slash-command-handlers.test.d.ts.map +1 -0
- package/packages/pi-coding-agent/dist/modes/interactive/slash-command-handlers.test.js +79 -0
- package/packages/pi-coding-agent/dist/modes/interactive/slash-command-handlers.test.js.map +1 -0
- package/packages/pi-coding-agent/dist/modes/interactive/theme/theme-schema.d.ts +12 -0
- package/packages/pi-coding-agent/dist/modes/interactive/theme/theme-schema.d.ts.map +1 -1
- package/packages/pi-coding-agent/dist/modes/interactive/theme/theme-schema.js +13 -0
- package/packages/pi-coding-agent/dist/modes/interactive/theme/theme-schema.js.map +1 -1
- package/packages/pi-coding-agent/dist/modes/interactive/theme/theme.d.ts +1 -1
- package/packages/pi-coding-agent/dist/modes/interactive/theme/theme.d.ts.map +1 -1
- package/packages/pi-coding-agent/dist/modes/interactive/theme/theme.js +18 -1
- package/packages/pi-coding-agent/dist/modes/interactive/theme/theme.js.map +1 -1
- package/packages/pi-coding-agent/dist/modes/interactive/theme/themes.d.ts.map +1 -1
- package/packages/pi-coding-agent/dist/modes/interactive/theme/themes.js +36 -27
- package/packages/pi-coding-agent/dist/modes/interactive/theme/themes.js.map +1 -1
- package/packages/pi-coding-agent/dist/modes/interactive/tui-mode.d.ts +11 -0
- package/packages/pi-coding-agent/dist/modes/interactive/tui-mode.d.ts.map +1 -0
- package/packages/pi-coding-agent/dist/modes/interactive/tui-mode.js +18 -0
- package/packages/pi-coding-agent/dist/modes/interactive/tui-mode.js.map +1 -0
- package/packages/pi-coding-agent/dist/modes/interactive/tui-mode.test.d.ts +2 -0
- package/packages/pi-coding-agent/dist/modes/interactive/tui-mode.test.d.ts.map +1 -0
- package/packages/pi-coding-agent/dist/modes/interactive/tui-mode.test.js +48 -0
- package/packages/pi-coding-agent/dist/modes/interactive/tui-mode.test.js.map +1 -0
- package/packages/pi-coding-agent/src/core/chat-controller-ordering.test.ts +51 -0
- package/packages/pi-coding-agent/src/core/extensions/runner.test.ts +108 -0
- package/packages/pi-coding-agent/src/core/extensions/runner.ts +16 -1
- package/packages/pi-coding-agent/src/core/model-registry.ts +4 -0
- package/packages/pi-coding-agent/src/core/settings-manager.ts +12 -0
- package/packages/pi-coding-agent/src/core/slash-commands.ts +1 -0
- package/packages/pi-coding-agent/src/modes/interactive/components/__tests__/chat-frame-compaction-tone.test.ts +7 -5
- package/packages/pi-coding-agent/src/modes/interactive/components/__tests__/tool-execution.test.ts +78 -15
- package/packages/pi-coding-agent/src/modes/interactive/components/adaptive-layout.test.ts +59 -0
- package/packages/pi-coding-agent/src/modes/interactive/components/adaptive-layout.ts +160 -0
- package/packages/pi-coding-agent/src/modes/interactive/components/assistant-message.ts +1 -0
- package/packages/pi-coding-agent/src/modes/interactive/components/chat-frame.ts +10 -9
- package/packages/pi-coding-agent/src/modes/interactive/components/settings-selector.ts +15 -0
- package/packages/pi-coding-agent/src/modes/interactive/components/tool-card-cleanup-and-success-runtime.test.ts +10 -9
- package/packages/pi-coding-agent/src/modes/interactive/components/tool-execution.ts +118 -17
- package/packages/pi-coding-agent/src/modes/interactive/controllers/chat-controller.test.ts +43 -1
- package/packages/pi-coding-agent/src/modes/interactive/controllers/chat-controller.ts +73 -1
- package/packages/pi-coding-agent/src/modes/interactive/controllers/input-controller.test.ts +1 -0
- package/packages/pi-coding-agent/src/modes/interactive/interactive-mode-state.ts +1 -1
- package/packages/pi-coding-agent/src/modes/interactive/interactive-mode.ts +25 -0
- package/packages/pi-coding-agent/src/modes/interactive/slash-command-handlers.test.ts +95 -0
- package/packages/pi-coding-agent/src/modes/interactive/slash-command-handlers.ts +24 -1
- package/packages/pi-coding-agent/src/modes/interactive/theme/theme-schema.ts +13 -0
- package/packages/pi-coding-agent/src/modes/interactive/theme/theme.ts +32 -2
- package/packages/pi-coding-agent/src/modes/interactive/theme/themes.ts +36 -27
- package/packages/pi-coding-agent/src/modes/interactive/tui-mode.test.ts +65 -0
- package/packages/pi-coding-agent/src/modes/interactive/tui-mode.ts +29 -0
- package/packages/pi-coding-agent/tsconfig.tsbuildinfo +1 -1
- package/packages/pi-tui/dist/__tests__/style.test.d.ts +2 -0
- package/packages/pi-tui/dist/__tests__/style.test.d.ts.map +1 -0
- package/packages/pi-tui/dist/__tests__/style.test.js +63 -0
- package/packages/pi-tui/dist/__tests__/style.test.js.map +1 -0
- package/packages/pi-tui/dist/__tests__/tui.test.js +1 -2
- package/packages/pi-tui/dist/__tests__/tui.test.js.map +1 -1
- package/packages/pi-tui/dist/index.d.ts +1 -0
- package/packages/pi-tui/dist/index.d.ts.map +1 -1
- package/packages/pi-tui/dist/index.js +2 -0
- package/packages/pi-tui/dist/index.js.map +1 -1
- package/packages/pi-tui/dist/style.d.ts +41 -0
- package/packages/pi-tui/dist/style.d.ts.map +1 -0
- package/packages/pi-tui/dist/style.js +158 -0
- package/packages/pi-tui/dist/style.js.map +1 -0
- package/packages/pi-tui/dist/tui.d.ts +1 -3
- package/packages/pi-tui/dist/tui.d.ts.map +1 -1
- package/packages/pi-tui/dist/tui.js +2 -3
- package/packages/pi-tui/dist/tui.js.map +1 -1
- package/packages/pi-tui/src/__tests__/style.test.ts +76 -0
- package/packages/pi-tui/src/__tests__/tui.test.ts +1 -2
- package/packages/pi-tui/src/index.ts +9 -0
- package/packages/pi-tui/src/style.ts +225 -0
- package/packages/pi-tui/src/tui.ts +2 -3
- package/packages/pi-tui/tsconfig.tsbuildinfo +1 -1
- package/pkg/dist/modes/interactive/theme/theme-schema.d.ts +12 -0
- package/pkg/dist/modes/interactive/theme/theme-schema.d.ts.map +1 -1
- package/pkg/dist/modes/interactive/theme/theme-schema.js +13 -0
- package/pkg/dist/modes/interactive/theme/theme-schema.js.map +1 -1
- package/pkg/dist/modes/interactive/theme/theme.d.ts +1 -1
- package/pkg/dist/modes/interactive/theme/theme.d.ts.map +1 -1
- package/pkg/dist/modes/interactive/theme/theme.js +18 -1
- package/pkg/dist/modes/interactive/theme/theme.js.map +1 -1
- package/pkg/dist/modes/interactive/theme/themes.d.ts.map +1 -1
- package/pkg/dist/modes/interactive/theme/themes.js +36 -27
- package/pkg/dist/modes/interactive/theme/themes.js.map +1 -1
- package/src/resources/extensions/github-sync/templates.ts +38 -8
- package/src/resources/extensions/github-sync/tests/inline-code.test.ts +66 -0
- package/src/resources/extensions/gsd/auto/loop.ts +14 -10
- package/src/resources/extensions/gsd/auto/run-unit.ts +24 -14
- package/src/resources/extensions/gsd/auto-dashboard.ts +57 -8
- package/src/resources/extensions/gsd/auto-dispatch.ts +17 -0
- package/src/resources/extensions/gsd/auto-recovery.ts +153 -7
- package/src/resources/extensions/gsd/auto-start.ts +7 -6
- package/src/resources/extensions/gsd/auto-worktree.ts +6 -4
- package/src/resources/extensions/gsd/auto.ts +3 -3
- package/src/resources/extensions/gsd/bootstrap/agent-end-recovery.ts +16 -1
- package/src/resources/extensions/gsd/bootstrap/register-hooks.ts +17 -1
- package/src/resources/extensions/gsd/bootstrap/write-gate.ts +135 -1
- package/src/resources/extensions/gsd/commands-extract-learnings.ts +17 -12
- package/src/resources/extensions/gsd/db-base-schema.ts +15 -0
- package/src/resources/extensions/gsd/db-migration-steps.ts +17 -0
- package/src/resources/extensions/gsd/gsd-db.ts +119 -1
- package/src/resources/extensions/gsd/guided-flow.ts +2 -2
- package/src/resources/extensions/gsd/pr-evidence.ts +63 -5
- package/src/resources/extensions/gsd/tests/auto-abort-pause-regression.test.ts +7 -1
- package/src/resources/extensions/gsd/tests/auto-dashboard.test.ts +33 -0
- package/src/resources/extensions/gsd/tests/auto-loop.test.ts +83 -4
- package/src/resources/extensions/gsd/tests/auto-recovery.test.ts +170 -1
- package/src/resources/extensions/gsd/tests/commands-extract-learnings.test.ts +9 -0
- package/src/resources/extensions/gsd/tests/db-migration-steps.integration.test.ts +428 -0
- package/src/resources/extensions/gsd/tests/db-schema-metadata.test.ts +2 -2
- package/src/resources/extensions/gsd/tests/fixtures/pr-body/commands-ship-basic.md +52 -0
- package/src/resources/extensions/gsd/tests/fixtures/pr-body/commands-ship-empty-optionals.md +42 -0
- package/src/resources/extensions/gsd/tests/fixtures/pr-body/swarm-lane-no-blockers.md +55 -0
- package/src/resources/extensions/gsd/tests/fixtures/pr-body/swarm-lane-with-blockers.md +60 -0
- package/src/resources/extensions/gsd/tests/gsd-db.test.ts +44 -0
- package/src/resources/extensions/gsd/tests/has-pending-deep-stage.test.ts +33 -1
- package/src/resources/extensions/gsd/tests/headless-answers.test.ts +1 -1
- package/src/resources/extensions/gsd/tests/headless-query.test.ts +2 -2
- package/src/resources/extensions/gsd/tests/pr-evidence-equivalence.test.ts +102 -0
- package/src/resources/extensions/gsd/tests/pr-evidence-hardening.test.ts +165 -0
- package/src/resources/extensions/gsd/tests/resource-loader-import-path.test.ts +1 -1
- package/src/resources/extensions/gsd/tests/uok-plan-v2-wiring.test.ts +1 -1
- package/src/resources/extensions/gsd/tests/workflow-mcp.test.ts +7 -8
- package/src/resources/extensions/gsd/tests/working-output-messages.test.ts +93 -0
- package/src/resources/extensions/gsd/tests/worktree-submodule-safety.test.ts +1 -1
- package/src/resources/extensions/gsd/tests/worktree-write-gate.test.ts +179 -0
- package/src/resources/extensions/gsd/working-output-messages.ts +120 -0
- package/dist/web/standalone/.next/server/chunks/7020.js +0 -12
- /package/dist/{app/app-paths.d.ts → app-paths.d.ts} +0 -0
- /package/dist/{app/app-paths.js → app-paths.js} +0 -0
- /package/dist/{extension-runtime/bundled-extension-paths.d.ts → bundled-extension-paths.d.ts} +0 -0
- /package/dist/{extension-runtime/bundled-extension-paths.js → bundled-extension-paths.js} +0 -0
- /package/dist/{extension-runtime/bundled-resource-path.d.ts → bundled-resource-path.d.ts} +0 -0
- /package/dist/{extension-runtime/bundled-resource-path.js → bundled-resource-path.js} +0 -0
- /package/dist/{startup/claude-cli-check.d.ts → claude-cli-check.d.ts} +0 -0
- /package/dist/{startup/claude-cli-check.js → claude-cli-check.js} +0 -0
- /package/dist/{cli/cli-auto-routing.d.ts → cli-auto-routing.d.ts} +0 -0
- /package/dist/{cli/cli-auto-routing.js → cli-auto-routing.js} +0 -0
- /package/dist/{cli/cli-policy.d.ts → cli-policy.d.ts} +0 -0
- /package/dist/{cli/cli-policy.js → cli-policy.js} +0 -0
- /package/dist/{cli/cli.d.ts → cli.d.ts} +0 -0
- /package/dist/{extension-runtime/extension-discovery.d.ts → extension-discovery.d.ts} +0 -0
- /package/dist/{extension-runtime/extension-discovery.js → extension-discovery.js} +0 -0
- /package/dist/{extension-runtime/extension-registry.d.ts → extension-registry.d.ts} +0 -0
- /package/dist/{extension-runtime/extension-sort.d.ts → extension-sort.d.ts} +0 -0
- /package/dist/{extension-runtime/extension-sort.js → extension-sort.js} +0 -0
- /package/dist/{extension-runtime/extension-validator.d.ts → extension-validator.d.ts} +0 -0
- /package/dist/{extension-runtime/extension-validator.js → extension-validator.js} +0 -0
- /package/dist/{headless/headless-answers.d.ts → headless-answers.d.ts} +0 -0
- /package/dist/{headless/headless-answers.js → headless-answers.js} +0 -0
- /package/dist/{headless/headless-context.d.ts → headless-context.d.ts} +0 -0
- /package/dist/{headless/headless-context.js → headless-context.js} +0 -0
- /package/dist/{headless/headless-events.d.ts → headless-events.d.ts} +0 -0
- /package/dist/{headless/headless-events.js → headless-events.js} +0 -0
- /package/dist/{headless/headless-recover.d.ts → headless-recover.d.ts} +0 -0
- /package/dist/{headless/headless-types.d.ts → headless-types.d.ts} +0 -0
- /package/dist/{headless/headless-types.js → headless-types.js} +0 -0
- /package/dist/{headless/headless-ui.d.ts → headless-ui.d.ts} +0 -0
- /package/dist/{headless/headless-ui.js → headless-ui.js} +0 -0
- /package/dist/{headless/headless.d.ts → headless.d.ts} +0 -0
- /package/dist/{cli/help-text.d.ts → help-text.d.ts} +0 -0
- /package/dist/{cli/help-text.js → help-text.js} +0 -0
- /package/dist/{cli/logo.d.ts → logo.d.ts} +0 -0
- /package/dist/{cli/logo.js → logo.js} +0 -0
- /package/dist/{mcp/mcp-server.d.ts → mcp-server.d.ts} +0 -0
- /package/dist/{mcp/mcp-server.js → mcp-server.js} +0 -0
- /package/dist/{providers/models-resolver.d.ts → models-resolver.d.ts} +0 -0
- /package/dist/{onboarding/onboarding.d.ts → onboarding.d.ts} +0 -0
- /package/dist/{providers/pi-migration.d.ts → pi-migration.d.ts} +0 -0
- /package/dist/{providers/pi-migration.js → pi-migration.js} +0 -0
- /package/dist/{app/project-sessions.d.ts → project-sessions.d.ts} +0 -0
- /package/dist/{app/project-sessions.js → project-sessions.js} +0 -0
- /package/dist/{providers/provider-migrations.d.ts → provider-migrations.d.ts} +0 -0
- /package/dist/{providers/provider-migrations.js → provider-migrations.js} +0 -0
- /package/dist/{providers/remote-questions-config.d.ts → remote-questions-config.d.ts} +0 -0
- /package/dist/{rtk/rtk-shared.d.ts → rtk-shared.d.ts} +0 -0
- /package/dist/{rtk/rtk-shared.js → rtk-shared.js} +0 -0
- /package/dist/{rtk/rtk.d.ts → rtk.d.ts} +0 -0
- /package/dist/{rtk/rtk.js → rtk.js} +0 -0
- /package/dist/{startup/runtime-checks.d.ts → runtime-checks.d.ts} +0 -0
- /package/dist/{startup/runtime-checks.js → runtime-checks.js} +0 -0
- /package/dist/{security/security-overrides.d.ts → security-overrides.d.ts} +0 -0
- /package/dist/{startup/startup-model-validation.d.ts → startup-model-validation.d.ts} +0 -0
- /package/dist/{startup/startup-timings.d.ts → startup-timings.d.ts} +0 -0
- /package/dist/{startup/startup-timings.js → startup-timings.js} +0 -0
- /package/dist/{app/tool-bootstrap.d.ts → tool-bootstrap.d.ts} +0 -0
- /package/dist/{app/tool-bootstrap.js → tool-bootstrap.js} +0 -0
- /package/dist/{update/update-check.d.ts → update-check.d.ts} +0 -0
- /package/dist/{update/update-cmd.d.ts → update-cmd.d.ts} +0 -0
- /package/dist/{update/update-cmd.js → update-cmd.js} +0 -0
- /package/dist/web/standalone/.next/static/{-WDXZiiJHGZDbYH75Mu6f → TCSim36ZpcPu2WgeoC45g}/_buildManifest.js +0 -0
- /package/dist/web/standalone/.next/static/{-WDXZiiJHGZDbYH75Mu6f → TCSim36ZpcPu2WgeoC45g}/_ssgManifest.js +0 -0
- /package/dist/{cli/web-mode.d.ts → web-mode.d.ts} +0 -0
- /package/dist/{onboarding/welcome-screen.d.ts → welcome-screen.d.ts} +0 -0
- /package/dist/{onboarding/wizard.d.ts → wizard.d.ts} +0 -0
- /package/dist/{onboarding/wizard.js → wizard.js} +0 -0
- /package/dist/{worktrees/worktree-cli.d.ts → worktree-cli.d.ts} +0 -0
- /package/dist/{worktrees/worktree-name-gen.d.ts → worktree-name-gen.d.ts} +0 -0
- /package/dist/{worktrees/worktree-name-gen.js → worktree-name-gen.js} +0 -0
- /package/dist/{worktrees/worktree-status-banner.d.ts → worktree-status-banner.d.ts} +0 -0
- /package/dist/{worktrees/worktree-status-banner.js → worktree-status-banner.js} +0 -0
|
@@ -35,7 +35,7 @@ export interface RunWebCliBranchDeps {
|
|
|
35
35
|
}
|
|
36
36
|
export declare function parseCliArgs(argv: string[]): CliFlags;
|
|
37
37
|
export declare function buildHeadlessAutoArgs(flags: Pick<CliFlags, 'messages' | 'model'>): string[];
|
|
38
|
-
export { getProjectSessionsDir } from '
|
|
38
|
+
export { getProjectSessionsDir } from './project-sessions.js';
|
|
39
39
|
export declare function migrateLegacyFlatSessions(baseSessionsDir: string, projectSessionsDir: string): void;
|
|
40
40
|
/**
|
|
41
41
|
* Resolve the working directory for context-aware launch detection.
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { existsSync, mkdirSync, readFileSync, readdirSync, renameSync } from 'node:fs';
|
|
2
2
|
import { join, resolve, sep } from 'node:path';
|
|
3
|
-
import { agentDir as defaultAgentDir, sessionsDir as defaultSessionsDir, webPreferencesPath as defaultWebPreferencesPath } from '
|
|
4
|
-
import { getProjectSessionsDir } from '
|
|
3
|
+
import { agentDir as defaultAgentDir, sessionsDir as defaultSessionsDir, webPreferencesPath as defaultWebPreferencesPath } from './app-paths.js';
|
|
4
|
+
import { getProjectSessionsDir } from './project-sessions.js';
|
|
5
5
|
import { launchWebMode, stopWebMode } from './web-mode.js';
|
|
6
6
|
export function parseCliArgs(argv) {
|
|
7
7
|
const flags = { extensions: [], messages: [] };
|
|
@@ -76,7 +76,7 @@ export function parseCliArgs(argv) {
|
|
|
76
76
|
export function buildHeadlessAutoArgs(flags) {
|
|
77
77
|
return flags.model ? ['--model', flags.model, ...flags.messages] : [...flags.messages];
|
|
78
78
|
}
|
|
79
|
-
export { getProjectSessionsDir } from '
|
|
79
|
+
export { getProjectSessionsDir } from './project-sessions.js';
|
|
80
80
|
export function migrateLegacyFlatSessions(baseSessionsDir, projectSessionsDir) {
|
|
81
81
|
if (!existsSync(baseSessionsDir))
|
|
82
82
|
return;
|
|
@@ -1,24 +1,24 @@
|
|
|
1
1
|
import { readFileSync } from 'node:fs';
|
|
2
2
|
import { join } from 'node:path';
|
|
3
|
-
import { agentDir, sessionsDir, authFilePath } from '
|
|
4
|
-
import { initResources, buildResourceLoader, getNewerManagedResourceVersion } from '
|
|
5
|
-
import { ensureManagedTools } from '
|
|
6
|
-
import { loadStoredEnvKeys } from '
|
|
7
|
-
import { migratePiCredentials } from '
|
|
8
|
-
import { shouldRunOnboarding, runOnboarding } from '
|
|
3
|
+
import { agentDir, sessionsDir, authFilePath } from './app-paths.js';
|
|
4
|
+
import { initResources, buildResourceLoader, getNewerManagedResourceVersion } from './resource-loader.js';
|
|
5
|
+
import { ensureManagedTools } from './tool-bootstrap.js';
|
|
6
|
+
import { loadStoredEnvKeys } from './wizard.js';
|
|
7
|
+
import { migratePiCredentials } from './pi-migration.js';
|
|
8
|
+
import { shouldRunOnboarding, runOnboarding } from './onboarding.js';
|
|
9
9
|
import chalk from 'chalk';
|
|
10
|
-
import { checkForUpdates } from '
|
|
10
|
+
import { checkForUpdates } from './update-check.js';
|
|
11
11
|
import { shouldBypassManagedResourceMismatchGate } from './cli-policy.js';
|
|
12
12
|
import { shouldRedirectAutoToHeadless } from './cli-auto-routing.js';
|
|
13
13
|
import { printHelp, printSubcommandHelp } from './help-text.js';
|
|
14
|
-
import { applySecurityOverrides } from '
|
|
15
|
-
import { validateConfiguredModel } from '
|
|
16
|
-
import { migrateAnthropicDefaultToClaudeCode } from '
|
|
14
|
+
import { applySecurityOverrides } from './security-overrides.js';
|
|
15
|
+
import { validateConfiguredModel } from './startup-model-validation.js';
|
|
16
|
+
import { migrateAnthropicDefaultToClaudeCode } from './provider-migrations.js';
|
|
17
17
|
import { buildHeadlessAutoArgs, parseCliArgs, runWebCliBranch, migrateLegacyFlatSessions, } from './cli-web-branch.js';
|
|
18
18
|
import { stopWebMode } from './web-mode.js';
|
|
19
|
-
import { getProjectSessionsDir } from '
|
|
20
|
-
import { markStartup, printStartupTimings } from '
|
|
21
|
-
import { applyRtkProcessEnv, GSD_RTK_DISABLED_ENV, isTruthy } from '
|
|
19
|
+
import { getProjectSessionsDir } from './project-sessions.js';
|
|
20
|
+
import { markStartup, printStartupTimings } from './startup-timings.js';
|
|
21
|
+
import { applyRtkProcessEnv, GSD_RTK_DISABLED_ENV, isTruthy } from './rtk-shared.js';
|
|
22
22
|
let piCodingAgentModulePromise;
|
|
23
23
|
function loadPiCodingAgentModule() {
|
|
24
24
|
return (piCodingAgentModulePromise ??= import('@gsd/pi-coding-agent'));
|
|
@@ -139,7 +139,7 @@ async function doRtkBootstrap() {
|
|
|
139
139
|
// Honor GSD_RTK_DISABLED if already explicitly set in the environment
|
|
140
140
|
// (env var takes precedence over preferences for manual override).
|
|
141
141
|
if (!rtkDisabled) {
|
|
142
|
-
const { loadEffectiveGSDPreferences } = await import('
|
|
142
|
+
const { loadEffectiveGSDPreferences } = await import('./resources/extensions/gsd/preferences.js');
|
|
143
143
|
const prefs = loadEffectiveGSDPreferences();
|
|
144
144
|
const rtkEnabled = prefs?.preferences.experimental?.rtk === true;
|
|
145
145
|
if (!rtkEnabled) {
|
|
@@ -159,7 +159,7 @@ async function doRtkBootstrap() {
|
|
|
159
159
|
};
|
|
160
160
|
}
|
|
161
161
|
else {
|
|
162
|
-
const { bootstrapRtk } = await import('
|
|
162
|
+
const { bootstrapRtk } = await import('./rtk.js');
|
|
163
163
|
rtkStatus = await bootstrapRtk();
|
|
164
164
|
}
|
|
165
165
|
markStartup('bootstrapRtk');
|
|
@@ -180,7 +180,7 @@ function ensureRtkBootstrap() {
|
|
|
180
180
|
// command is blocked — only `update` should bypass the gate so the user can
|
|
181
181
|
// actually upgrade out of the broken state. See shouldBypassManagedResourceMismatchGate.
|
|
182
182
|
if (shouldBypassManagedResourceMismatchGate(cliFlags.messages[0])) {
|
|
183
|
-
const { runUpdate } = await import('
|
|
183
|
+
const { runUpdate } = await import('./update-cmd.js');
|
|
184
184
|
await runUpdate();
|
|
185
185
|
process.exit(0);
|
|
186
186
|
}
|
|
@@ -387,7 +387,7 @@ if (cliFlags.messages[0] === 'headless') {
|
|
|
387
387
|
// headless-query loads from src/resources/ while auto/interactive load
|
|
388
388
|
// from ~/.gsd/agent/extensions/ — different extension copies diverge.
|
|
389
389
|
initResources(agentDir);
|
|
390
|
-
const { runHeadless, parseHeadlessArgs } = await import('
|
|
390
|
+
const { runHeadless, parseHeadlessArgs } = await import('./headless.js');
|
|
391
391
|
await runHeadless(parseHeadlessArgs(process.argv));
|
|
392
392
|
process.exit(0);
|
|
393
393
|
}
|
|
@@ -398,7 +398,7 @@ if (cliFlags.messages[0] === 'headless') {
|
|
|
398
398
|
*/
|
|
399
399
|
async function runHeadlessFromAuto(headlessArgs) {
|
|
400
400
|
await ensureRtkBootstrap();
|
|
401
|
-
const { runHeadless, parseHeadlessArgs } = await import('
|
|
401
|
+
const { runHeadless, parseHeadlessArgs } = await import('./headless.js');
|
|
402
402
|
const argv = [process.argv[0], process.argv[1], 'headless', ...headlessArgs];
|
|
403
403
|
await runHeadless(parseHeadlessArgs(argv));
|
|
404
404
|
process.exit(0);
|
|
@@ -422,7 +422,7 @@ if (shouldRedirectAutoToHeadless(cliFlags.messages[0], process.stdin.isTTY, proc
|
|
|
422
422
|
if (!isPrintMode &&
|
|
423
423
|
cliFlags.listModels === undefined &&
|
|
424
424
|
(cliFlags.messages[0] === 'worktree' || cliFlags.messages[0] === 'wt')) {
|
|
425
|
-
const { handleList, handleMerge, handleClean, handleRemove } = await import('
|
|
425
|
+
const { handleList, handleMerge, handleClean, handleRemove } = await import('./worktree-cli.js');
|
|
426
426
|
const sub = cliFlags.messages[1];
|
|
427
427
|
const subArgs = cliFlags.messages.slice(2);
|
|
428
428
|
if (!sub || sub === 'list') {
|
|
@@ -455,7 +455,7 @@ markStartup('AuthStorage.create');
|
|
|
455
455
|
loadStoredEnvKeys(authStorage);
|
|
456
456
|
migratePiCredentials(authStorage);
|
|
457
457
|
// Resolve models.json path with fallback to ~/.pi/agent/models.json
|
|
458
|
-
const { resolveModelsJsonPath } = await import('
|
|
458
|
+
const { resolveModelsJsonPath } = await import('./models-resolver.js');
|
|
459
459
|
const modelsJsonPath = resolveModelsJsonPath();
|
|
460
460
|
const modelRegistry = new ModelRegistry(authStorage, modelsJsonPath);
|
|
461
461
|
markStartup('ModelRegistry');
|
|
@@ -614,7 +614,7 @@ if (isPrintMode) {
|
|
|
614
614
|
}
|
|
615
615
|
if (mode === 'mcp') {
|
|
616
616
|
printStartupTimings();
|
|
617
|
-
const { startMcpServer } = await import('
|
|
617
|
+
const { startMcpServer } = await import('./mcp-server.js');
|
|
618
618
|
// Activate every registered tool before starting the MCP transport.
|
|
619
619
|
// `session.agent.state.tools` is the *active* subset, not the full
|
|
620
620
|
// registry — if we expose only the active set, extension-registered
|
|
@@ -642,7 +642,7 @@ if (isPrintMode) {
|
|
|
642
642
|
// Worktree flag (-w) — create/resume a worktree for the interactive session
|
|
643
643
|
// ---------------------------------------------------------------------------
|
|
644
644
|
if (cliFlags.worktree) {
|
|
645
|
-
const { handleWorktreeFlag } = await import('
|
|
645
|
+
const { handleWorktreeFlag } = await import('./worktree-cli.js');
|
|
646
646
|
await handleWorktreeFlag(cliFlags.worktree);
|
|
647
647
|
}
|
|
648
648
|
// ---------------------------------------------------------------------------
|
|
@@ -650,7 +650,7 @@ if (cliFlags.worktree) {
|
|
|
650
650
|
// ---------------------------------------------------------------------------
|
|
651
651
|
if (!cliFlags.worktree && !isPrintMode) {
|
|
652
652
|
try {
|
|
653
|
-
const { showWorktreeStatusBanner } = await import('
|
|
653
|
+
const { showWorktreeStatusBanner } = await import('./worktree-status-banner.js');
|
|
654
654
|
showWorktreeStatusBanner(process.cwd());
|
|
655
655
|
}
|
|
656
656
|
catch { /* non-fatal */ }
|
|
@@ -763,10 +763,10 @@ if (!process.stdin.isTTY || !process.stdout.isTTY) {
|
|
|
763
763
|
// Welcome screen — shown on every fresh interactive session before TUI takes over.
|
|
764
764
|
// Skip when the first-run banner was already printed in loader.ts (prevents double banner).
|
|
765
765
|
if (!process.env.GSD_FIRST_RUN_BANNER) {
|
|
766
|
-
const { printWelcomeScreen } = await import('
|
|
766
|
+
const { printWelcomeScreen } = await import('./welcome-screen.js');
|
|
767
767
|
let remoteChannel;
|
|
768
768
|
try {
|
|
769
|
-
const { resolveRemoteConfig } = await import('
|
|
769
|
+
const { resolveRemoteConfig } = await import('./resources/extensions/remote-questions/config.js');
|
|
770
770
|
const rc = resolveRemoteConfig();
|
|
771
771
|
if (rc)
|
|
772
772
|
remoteChannel = rc.channel;
|
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
* The only way an extension stops loading is an explicit `gsd extensions disable <id>`.
|
|
7
7
|
*/
|
|
8
8
|
import { existsSync, mkdirSync, readFileSync, readdirSync, renameSync, writeFileSync } from "node:fs";
|
|
9
|
-
import { appRoot } from "
|
|
9
|
+
import { appRoot } from "./app-paths.js";
|
|
10
10
|
import { dirname, join } from "node:path";
|
|
11
11
|
// ─── Validation ─────────────────────────────────────────────────────────────
|
|
12
12
|
function isRegistry(data) {
|
|
@@ -13,7 +13,7 @@
|
|
|
13
13
|
* We use createJiti() here because this module is imported directly from cli.ts,
|
|
14
14
|
* bypassing the extension loader's jiti setup (#1137).
|
|
15
15
|
*/
|
|
16
|
-
import type { GSDState } from '
|
|
16
|
+
import type { GSDState } from './resources/extensions/gsd/types.js';
|
|
17
17
|
/**
|
|
18
18
|
* Resolve the GSD extensions root for headless-query. Prefers the synced
|
|
19
19
|
* agent directory (so headless-query loads the same extension copy as
|
|
@@ -17,7 +17,7 @@ import { createJiti } from '@mariozechner/jiti';
|
|
|
17
17
|
import { fileURLToPath } from 'node:url';
|
|
18
18
|
import { join } from 'node:path';
|
|
19
19
|
import { homedir } from 'node:os';
|
|
20
|
-
import { resolveBundledGsdExtensionModule } from '
|
|
20
|
+
import { resolveBundledGsdExtensionModule } from './bundled-resource-path.js';
|
|
21
21
|
const jiti = createJiti(fileURLToPath(import.meta.url), { interopDefault: true, debug: false });
|
|
22
22
|
const { existsSync } = await import('node:fs');
|
|
23
23
|
/**
|
|
@@ -49,10 +49,9 @@ export function shouldUseAgentExtensionsDir(opts) {
|
|
|
49
49
|
}
|
|
50
50
|
const agentExtensionsDir = resolveGsdAgentExtensionsDir();
|
|
51
51
|
const { useAgentDir } = shouldUseAgentExtensionsDir({ env: process.env });
|
|
52
|
-
const bundledResourceImportUrl = new URL('../loader.js', import.meta.url).href;
|
|
53
52
|
const gsdExtensionPath = (...segments) => useAgentDir
|
|
54
53
|
? resolveAgentExtensionModule(agentExtensionsDir, segments)
|
|
55
|
-
: resolveBundledGsdExtensionModule(
|
|
54
|
+
: resolveBundledGsdExtensionModule(import.meta.url, segments.join('/'));
|
|
56
55
|
function resolveAgentExtensionModule(agentDir, segments) {
|
|
57
56
|
const requested = join(agentDir, ...segments);
|
|
58
57
|
if (existsSync(requested))
|
|
@@ -21,16 +21,15 @@
|
|
|
21
21
|
import { createJiti } from '@mariozechner/jiti';
|
|
22
22
|
import { fileURLToPath } from 'node:url';
|
|
23
23
|
import { resolveGsdAgentExtensionsDir, shouldUseAgentExtensionsDir } from './headless-query.js';
|
|
24
|
-
import { resolveBundledGsdExtensionModule } from '
|
|
24
|
+
import { resolveBundledGsdExtensionModule } from './bundled-resource-path.js';
|
|
25
25
|
import { join } from 'node:path';
|
|
26
26
|
import { existsSync } from 'node:fs';
|
|
27
27
|
const jiti = createJiti(fileURLToPath(import.meta.url), { interopDefault: true, debug: false });
|
|
28
28
|
const agentExtensionsDir = resolveGsdAgentExtensionsDir();
|
|
29
29
|
const { useAgentDir } = shouldUseAgentExtensionsDir({ env: process.env });
|
|
30
|
-
const bundledResourceImportUrl = new URL('../loader.js', import.meta.url).href;
|
|
31
30
|
const gsdExtensionPath = (...segments) => useAgentDir
|
|
32
31
|
? resolveAgentExtensionModule(agentExtensionsDir, segments)
|
|
33
|
-
: resolveBundledGsdExtensionModule(
|
|
32
|
+
: resolveBundledGsdExtensionModule(import.meta.url, segments.join('/'));
|
|
34
33
|
function resolveAgentExtensionModule(agentDir, segments) {
|
|
35
34
|
const requested = join(agentDir, ...segments);
|
|
36
35
|
if (existsSync(requested))
|
|
@@ -15,7 +15,7 @@ import { existsSync, mkdirSync, writeFileSync, writeSync } from 'node:fs';
|
|
|
15
15
|
import { join } from 'node:path';
|
|
16
16
|
import { resolve } from 'node:path';
|
|
17
17
|
import { RpcClient, SessionManager } from '@gsd/pi-coding-agent';
|
|
18
|
-
import { getProjectSessionsDir } from '
|
|
18
|
+
import { getProjectSessionsDir } from './project-sessions.js';
|
|
19
19
|
import { loadAndValidateAnswerFile, AnswerInjector } from './headless-answers.js';
|
|
20
20
|
import { isTerminalNotification, isBlockedNotification, isMilestoneReadyNotification, isQuickCommand, FIRE_AND_FORGET_METHODS, IDLE_TIMEOUT_MS, NEW_MILESTONE_IDLE_TIMEOUT_MS, isInteractiveHeadlessTool, shouldArmHeadlessIdleTimeout, EXIT_SUCCESS, EXIT_ERROR, EXIT_BLOCKED, EXIT_CANCELLED, mapStatusToExitCode, } from './headless-events.js';
|
|
21
21
|
import { VALID_OUTPUT_FORMATS } from './headless-types.js';
|
|
@@ -280,8 +280,8 @@ async function runHeadlessOnce(options, restartCount) {
|
|
|
280
280
|
// suite) get the same diagnostic without a TTY.
|
|
281
281
|
if (options.command === 'doctor') {
|
|
282
282
|
const wantsJson = options.json || options.commandArgs.includes('--json');
|
|
283
|
-
const { runGSDDoctor } = await import('
|
|
284
|
-
const { formatDoctorReport, formatDoctorReportJson } = await import('
|
|
283
|
+
const { runGSDDoctor } = await import('./resources/extensions/gsd/doctor.js');
|
|
284
|
+
const { formatDoctorReport, formatDoctorReportJson } = await import('./resources/extensions/gsd/doctor-format.js');
|
|
285
285
|
let exitCode = 1;
|
|
286
286
|
try {
|
|
287
287
|
const report = await runGSDDoctor(process.cwd());
|
package/dist/loader.js
CHANGED
|
@@ -21,7 +21,7 @@ if (firstArg === '--version' || firstArg === '-v') {
|
|
|
21
21
|
process.exit(0);
|
|
22
22
|
}
|
|
23
23
|
if (firstArg === '--help' || firstArg === '-h') {
|
|
24
|
-
const { printHelp } = await import('./
|
|
24
|
+
const { printHelp } = await import('./help-text.js');
|
|
25
25
|
printHelp(gsdVersion);
|
|
26
26
|
process.exit(0);
|
|
27
27
|
}
|
|
@@ -31,7 +31,7 @@ if (firstArg === '--help' || firstArg === '-h') {
|
|
|
31
31
|
// package.json (already parsed above) and verifies git is available.
|
|
32
32
|
// ---------------------------------------------------------------------------
|
|
33
33
|
{
|
|
34
|
-
const { MIN_NODE_MAJOR, checkNodeVersion, requireGit } = await import('./
|
|
34
|
+
const { MIN_NODE_MAJOR, checkNodeVersion, requireGit } = await import('./runtime-checks.js');
|
|
35
35
|
const red = '\x1b[31m';
|
|
36
36
|
const bold = '\x1b[1m';
|
|
37
37
|
const dim = '\x1b[2m';
|
|
@@ -57,13 +57,13 @@ if (firstArg === '--help' || firstArg === '-h') {
|
|
|
57
57
|
process.exit(1);
|
|
58
58
|
}
|
|
59
59
|
}
|
|
60
|
-
import { agentDir, appRoot } from './app
|
|
61
|
-
import { applyRtkProcessEnv } from './rtk
|
|
62
|
-
import { serializeBundledExtensionPaths } from './
|
|
63
|
-
import { resolveBundledResourcesDirFromPackageRoot } from './
|
|
64
|
-
import { discoverExtensionEntryPaths } from './extension-
|
|
65
|
-
import { loadRegistry, readManifestFromEntryPath, isExtensionEnabled } from './extension-
|
|
66
|
-
import { renderLogo } from './
|
|
60
|
+
import { agentDir, appRoot } from './app-paths.js';
|
|
61
|
+
import { applyRtkProcessEnv } from './rtk-shared.js';
|
|
62
|
+
import { serializeBundledExtensionPaths } from './bundled-extension-paths.js';
|
|
63
|
+
import { resolveBundledResourcesDirFromPackageRoot } from './bundled-resource-path.js';
|
|
64
|
+
import { discoverExtensionEntryPaths } from './extension-discovery.js';
|
|
65
|
+
import { loadRegistry, readManifestFromEntryPath, isExtensionEnabled } from './extension-registry.js';
|
|
66
|
+
import { renderLogo } from './logo.js';
|
|
67
67
|
// pkg/ is a shim directory: contains gsd's piConfig (package.json) and pi's
|
|
68
68
|
// theme assets (dist/modes/interactive/theme/) without a src/ directory.
|
|
69
69
|
// This allows config.js to:
|
|
@@ -235,4 +235,4 @@ if (missingPackages.length > 0) {
|
|
|
235
235
|
process.exit(1);
|
|
236
236
|
}
|
|
237
237
|
// Dynamic import defers ESM evaluation — config.js will see PI_PACKAGE_DIR above
|
|
238
|
-
await import('./cli
|
|
238
|
+
await import('./cli.js');
|
|
@@ -11,7 +11,7 @@
|
|
|
11
11
|
import { existsSync } from 'node:fs';
|
|
12
12
|
import { homedir } from 'node:os';
|
|
13
13
|
import { join } from 'node:path';
|
|
14
|
-
import { agentDir } from '
|
|
14
|
+
import { agentDir } from './app-paths.js';
|
|
15
15
|
const GSD_MODELS_PATH = join(agentDir, 'models.json');
|
|
16
16
|
const PI_MODELS_PATH = join(homedir(), '.pi', 'agent', 'models.json');
|
|
17
17
|
/**
|
|
@@ -12,11 +12,11 @@
|
|
|
12
12
|
import { execFile } from 'node:child_process';
|
|
13
13
|
import { existsSync, mkdirSync, readFileSync, writeFileSync } from 'node:fs';
|
|
14
14
|
import { dirname, join } from 'node:path';
|
|
15
|
-
import { renderLogo } from '
|
|
16
|
-
import { agentDir } from '
|
|
17
|
-
import { isClaudeCliReady } from '
|
|
18
|
-
import { markOnboardingComplete, markStepCompleted, markStepSkipped, isOnboardingComplete, } from '
|
|
19
|
-
import { getLlmProviderIds } from '
|
|
15
|
+
import { renderLogo } from './logo.js';
|
|
16
|
+
import { agentDir } from './app-paths.js';
|
|
17
|
+
import { isClaudeCliReady } from './claude-cli-check.js';
|
|
18
|
+
import { markOnboardingComplete, markStepCompleted, markStepSkipped, isOnboardingComplete, } from './resources/extensions/gsd/onboarding-state.js';
|
|
19
|
+
import { getLlmProviderIds } from './resources/extensions/gsd/setup-catalog.js';
|
|
20
20
|
// ─── Constants ────────────────────────────────────────────────────────────────
|
|
21
21
|
const TOOL_KEYS = [
|
|
22
22
|
{
|
|
@@ -825,7 +825,7 @@ export async function runRemoteQuestionsStep(p, pc, authStorage) {
|
|
|
825
825
|
});
|
|
826
826
|
if (p.isCancel(channelId) || !channelId)
|
|
827
827
|
return null;
|
|
828
|
-
const { saveRemoteQuestionsConfig } = await import('
|
|
828
|
+
const { saveRemoteQuestionsConfig } = await import('./remote-questions-config.js');
|
|
829
829
|
saveRemoteQuestionsConfig('slack', channelId.trim());
|
|
830
830
|
p.log.success(`Slack channel: ${pc.green(channelId.trim())}`);
|
|
831
831
|
return 'Slack';
|
|
@@ -893,7 +893,7 @@ export async function runRemoteQuestionsStep(p, pc, authStorage) {
|
|
|
893
893
|
ts.stop('Could not reach Telegram API');
|
|
894
894
|
return null;
|
|
895
895
|
}
|
|
896
|
-
const { saveRemoteQuestionsConfig } = await import('
|
|
896
|
+
const { saveRemoteQuestionsConfig } = await import('./remote-questions-config.js');
|
|
897
897
|
saveRemoteQuestionsConfig('telegram', trimmedChatId);
|
|
898
898
|
p.log.success(`Telegram chat: ${pc.green(trimmedChatId)}`);
|
|
899
899
|
return 'Telegram';
|
|
@@ -1002,7 +1002,7 @@ async function runDiscordChannelStep(p, pc, token) {
|
|
|
1002
1002
|
channelId = channelChoice;
|
|
1003
1003
|
}
|
|
1004
1004
|
// Save remote questions config
|
|
1005
|
-
const { saveRemoteQuestionsConfig } = await import('
|
|
1005
|
+
const { saveRemoteQuestionsConfig } = await import('./remote-questions-config.js');
|
|
1006
1006
|
saveRemoteQuestionsConfig('discord', channelId);
|
|
1007
1007
|
const channelName = channels.find(ch => ch.id === channelId)?.name;
|
|
1008
1008
|
p.log.success(`Discord channel: ${pc.green(channelName ? `#${channelName}` : channelId)}`);
|
|
@@ -9,7 +9,7 @@
|
|
|
9
9
|
*/
|
|
10
10
|
import { existsSync, readFileSync, writeFileSync, mkdirSync } from "node:fs";
|
|
11
11
|
import { dirname, join } from "node:path";
|
|
12
|
-
import { appRoot } from "
|
|
12
|
+
import { appRoot } from "./app-paths.js";
|
|
13
13
|
// Inlined from preferences.ts to avoid crossing the compiled/uncompiled
|
|
14
14
|
// boundary — this file is compiled by tsc, but preferences.ts is loaded
|
|
15
15
|
// via jiti at runtime. Importing it as .js fails because no .js exists
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { DefaultResourceLoader as DefaultResourceLoaderType } from '@gsd/pi-coding-agent';
|
|
2
|
-
export { discoverExtensionEntryPaths } from '
|
|
2
|
+
export { discoverExtensionEntryPaths } from './extension-discovery.js';
|
|
3
3
|
export declare function getExtensionKey(entryPath: string, extensionsDir: string): string;
|
|
4
4
|
export declare function readManagedResourceVersion(agentDir: string): string | null;
|
|
5
5
|
/**
|
|
@@ -3,10 +3,10 @@ import { homedir } from 'node:os';
|
|
|
3
3
|
import { chmodSync, copyFileSync, cpSync, existsSync, lstatSync, mkdirSync, openSync, closeSync, readFileSync, readlinkSync, readdirSync, rmSync, statSync, symlinkSync, unlinkSync, writeFileSync } from 'node:fs';
|
|
4
4
|
import { basename, dirname, join, relative, resolve } from 'node:path';
|
|
5
5
|
import { fileURLToPath } from 'node:url';
|
|
6
|
-
import { compareSemver } from '
|
|
7
|
-
import { discoverExtensionEntryPaths } from '
|
|
8
|
-
import { loadRegistry, readManifestFromEntryPath, isExtensionEnabled, ensureRegistryEntries } from '
|
|
9
|
-
import { resolveBundledResourcesDirFromPackageRoot } from '
|
|
6
|
+
import { compareSemver } from './update-check.js';
|
|
7
|
+
import { discoverExtensionEntryPaths } from './extension-discovery.js';
|
|
8
|
+
import { loadRegistry, readManifestFromEntryPath, isExtensionEnabled, ensureRegistryEntries } from './extension-registry.js';
|
|
9
|
+
import { resolveBundledResourcesDirFromPackageRoot } from './bundled-resource-path.js';
|
|
10
10
|
let piCodingAgentModulePromise;
|
|
11
11
|
function loadPiCodingAgentModule() {
|
|
12
12
|
return (piCodingAgentModulePromise ??= import('@gsd/pi-coding-agent'));
|
|
@@ -19,12 +19,12 @@ function loadPiCodingAgentModule() {
|
|
|
19
19
|
// that use gsd — causing stale/broken extensions to be synced to ~/.gsd/agent/.
|
|
20
20
|
// dist/resources/ is populated by the build step (`npm run copy-resources`) and
|
|
21
21
|
// reflects the built state, not the currently checked-out branch.
|
|
22
|
-
const packageRoot = resolve(dirname(fileURLToPath(import.meta.url)), '..'
|
|
22
|
+
const packageRoot = resolve(dirname(fileURLToPath(import.meta.url)), '..');
|
|
23
23
|
const resourcesDir = resolveBundledResourcesDirFromPackageRoot(packageRoot);
|
|
24
24
|
const bundledExtensionsDir = join(resourcesDir, 'extensions');
|
|
25
25
|
const resourceVersionManifestName = 'managed-resources.json';
|
|
26
26
|
const resourceFingerprintFileName = '.managed-resources-content-hash';
|
|
27
|
-
export { discoverExtensionEntryPaths } from '
|
|
27
|
+
export { discoverExtensionEntryPaths } from './extension-discovery.js';
|
|
28
28
|
export function getExtensionKey(entryPath, extensionsDir) {
|
|
29
29
|
const relPath = relative(extensionsDir, entryPath);
|
|
30
30
|
return relPath.split(/[\\/]/)[0].replace(/\.(?:ts|js)$/, '');
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
7088672cce649c64
|
|
@@ -8,6 +8,37 @@
|
|
|
8
8
|
* for the `gh` CLI body parameters.
|
|
9
9
|
*/
|
|
10
10
|
import { buildPrEvidence } from "../gsd/pr-evidence.js";
|
|
11
|
+
// ─── Helpers ────────────────────────────────────────────────────────────────
|
|
12
|
+
/**
|
|
13
|
+
* Wrap a string in a CommonMark inline-code span, escaping any embedded
|
|
14
|
+
* backticks by selecting a fence longer than the longest backtick run inside
|
|
15
|
+
* the input. If the input begins or ends with a backtick, pad with a single
|
|
16
|
+
* space inside the fence (CommonMark requirement).
|
|
17
|
+
*
|
|
18
|
+
* Empty input returns an empty string (no fence) — there is nothing to render
|
|
19
|
+
* as code, and emitting an empty pair of backticks would produce literal
|
|
20
|
+
* backticks in GitHub-flavored markdown.
|
|
21
|
+
*/
|
|
22
|
+
export function inlineCode(s) {
|
|
23
|
+
if (s.length === 0)
|
|
24
|
+
return "";
|
|
25
|
+
let longestRun = 0;
|
|
26
|
+
let currentRun = 0;
|
|
27
|
+
for (const ch of s) {
|
|
28
|
+
if (ch === "`") {
|
|
29
|
+
currentRun++;
|
|
30
|
+
if (currentRun > longestRun)
|
|
31
|
+
longestRun = currentRun;
|
|
32
|
+
}
|
|
33
|
+
else {
|
|
34
|
+
currentRun = 0;
|
|
35
|
+
}
|
|
36
|
+
}
|
|
37
|
+
const fence = "`".repeat(longestRun + 1);
|
|
38
|
+
const needsPad = s.startsWith("`") || s.endsWith("`");
|
|
39
|
+
const pad = needsPad ? " " : "";
|
|
40
|
+
return `${fence}${pad}${s}${pad}${fence}`;
|
|
41
|
+
}
|
|
11
42
|
export function formatMilestoneIssueBody(data) {
|
|
12
43
|
const lines = [];
|
|
13
44
|
lines.push(`# ${data.id}: ${data.title}`);
|
|
@@ -78,7 +109,7 @@ export function formatTaskIssueBody(data) {
|
|
|
78
109
|
if (data.files?.length) {
|
|
79
110
|
lines.push("### Files");
|
|
80
111
|
for (const file of data.files) {
|
|
81
|
-
lines.push(`-
|
|
112
|
+
lines.push(`- ${inlineCode(file)}`);
|
|
82
113
|
}
|
|
83
114
|
lines.push("");
|
|
84
115
|
}
|
|
@@ -132,15 +163,14 @@ export function formatSwarmLanePRBody(data) {
|
|
|
132
163
|
const summaries = [
|
|
133
164
|
[
|
|
134
165
|
"### Swarm lane",
|
|
135
|
-
`**Lane:**
|
|
136
|
-
`**Branch:**
|
|
166
|
+
`**Lane:** ${inlineCode(laneLabel)}`,
|
|
167
|
+
`**Branch:** ${inlineCode(data.lane.branch)}`,
|
|
137
168
|
data.lane.owner ? `**Owner:** ${data.lane.owner}` : "",
|
|
138
|
-
data.lane.latestCommit ? `**Latest commit:**
|
|
169
|
+
data.lane.latestCommit ? `**Latest commit:** ${inlineCode(data.lane.latestCommit)}` : "",
|
|
139
170
|
].filter(Boolean).join("\n"),
|
|
140
171
|
`### Impact area\n${data.impactArea}`,
|
|
141
172
|
`### Changed contracts\n${checkedList(data.lane.changedContracts, "No shared contracts changed").join("\n")}`,
|
|
142
173
|
`### Transition risks\n${checkedList(data.transitionRisks, "No transition risks identified").join("\n")}`,
|
|
143
|
-
data.lane.blockers?.length ? `### Blockers\n${data.lane.blockers.map((blocker) => `- ${blocker}`).join("\n")}` : "",
|
|
144
174
|
].filter(Boolean);
|
|
145
175
|
return buildPrEvidence({
|
|
146
176
|
milestoneId: laneLabel,
|
|
@@ -150,6 +180,7 @@ export function formatSwarmLanePRBody(data) {
|
|
|
150
180
|
changeType: "refactor",
|
|
151
181
|
linkedIssue: data.linkedIssue ? `Closes #${data.linkedIssue}` : undefined,
|
|
152
182
|
summaries,
|
|
183
|
+
blockers: data.lane.blockers ?? [],
|
|
153
184
|
testsRun: data.lane.testEvidence,
|
|
154
185
|
rollbackNotes: data.rollbackPlan,
|
|
155
186
|
how: "Generated by GSD GitHub Sync swarm routines from lane evidence.",
|
|
@@ -159,7 +190,7 @@ export function formatSwarmReleaseChecklistBody(data) {
|
|
|
159
190
|
const lines = [];
|
|
160
191
|
lines.push(`# UOK Swarm Release Checklist`);
|
|
161
192
|
lines.push("");
|
|
162
|
-
lines.push(`**Integration branch:**
|
|
193
|
+
lines.push(`**Integration branch:** ${inlineCode(data.integrationBranch)}`);
|
|
163
194
|
lines.push("");
|
|
164
195
|
lines.push("## Lane summary");
|
|
165
196
|
lines.push("");
|
|
@@ -167,9 +198,9 @@ export function formatSwarmReleaseChecklistBody(data) {
|
|
|
167
198
|
lines.push("|------|--------|-------|--------|--------|");
|
|
168
199
|
for (const lane of data.lanes) {
|
|
169
200
|
const owner = lane.owner ?? "";
|
|
170
|
-
const commit = lane.latestCommit ?
|
|
201
|
+
const commit = lane.latestCommit ? inlineCode(lane.latestCommit) : "";
|
|
171
202
|
const status = lane.blockers?.length ? "blocked" : "ready";
|
|
172
|
-
lines.push(`|
|
|
203
|
+
lines.push(`| ${inlineCode(SWARM_LANE_LABELS[lane.id])} | ${inlineCode(lane.branch)} | ${owner} | ${commit} | ${status} |`);
|
|
173
204
|
}
|
|
174
205
|
lines.push("");
|
|
175
206
|
lines.push("## Required evidence");
|
|
@@ -268,6 +268,19 @@ export async function autoLoop(ctx, pi, s, deps, options) {
|
|
|
268
268
|
// ── Blanket try/catch: one bad iteration must not kill the session
|
|
269
269
|
const prefs = deps.loadEffectiveGSDPreferences()?.preferences;
|
|
270
270
|
const uokFlags = resolveUokFlags(prefs);
|
|
271
|
+
// ── Check sidecar queue before deriveState ──
|
|
272
|
+
// NOTE: Sidecar dequeue MUST run before validateWorkflowSessionLock so a
|
|
273
|
+
// queued item is popped (and the `sidecar-dequeue` journal event emitted)
|
|
274
|
+
// even when the session lock invalidates this iteration. Inverting this
|
|
275
|
+
// order silently drops queued items on lock-loss. Refs #5308.
|
|
276
|
+
const sidecarItem = await dequeueSidecarItem({
|
|
277
|
+
queue: s.sidecarQueue,
|
|
278
|
+
executionGraphEnabled: uokFlags.executionGraph,
|
|
279
|
+
scheduleQueue: scheduleSidecarQueue,
|
|
280
|
+
warnSchedulingFailure: message => logWarning("dispatch", `sidecar queue scheduling failed: ${message}`),
|
|
281
|
+
logDequeue: payload => debugLog("autoLoop", { phase: "sidecar-dequeue", ...payload }),
|
|
282
|
+
emitDequeue: payload => journalReporter.emit("sidecar-dequeue", payload),
|
|
283
|
+
});
|
|
271
284
|
const sessionLockOutcome = validateWorkflowSessionLock({
|
|
272
285
|
active: s.active,
|
|
273
286
|
iteration,
|
|
@@ -290,15 +303,6 @@ export async function autoLoop(ctx, pi, s, deps, options) {
|
|
|
290
303
|
finishTurn("stopped", "manual-attention", sessionLockOutcome.reason);
|
|
291
304
|
break;
|
|
292
305
|
}
|
|
293
|
-
// ── Check sidecar queue before deriveState ──
|
|
294
|
-
const sidecarItem = await dequeueSidecarItem({
|
|
295
|
-
queue: s.sidecarQueue,
|
|
296
|
-
executionGraphEnabled: uokFlags.executionGraph,
|
|
297
|
-
scheduleQueue: scheduleSidecarQueue,
|
|
298
|
-
warnSchedulingFailure: message => logWarning("dispatch", `sidecar queue scheduling failed: ${message}`),
|
|
299
|
-
logDequeue: payload => debugLog("autoLoop", { phase: "sidecar-dequeue", ...payload }),
|
|
300
|
-
emitDequeue: payload => journalReporter.emit("sidecar-dequeue", payload),
|
|
301
|
-
});
|
|
302
306
|
const ic = { ctx, pi, s, deps, prefs, iteration, flowId, nextSeq };
|
|
303
307
|
journalReporter.emit("iteration-start", { iteration });
|
|
304
308
|
let iterData;
|
|
@@ -1,14 +1,11 @@
|
|
|
1
|
-
|
|
2
|
-
* auto/run-unit.ts — Single unit execution: session create → prompt → await agent_end.
|
|
3
|
-
*
|
|
4
|
-
* Imports from: auto/types, auto/resolve
|
|
5
|
-
*/
|
|
1
|
+
// GSD-2 + src/resources/extensions/gsd/auto/run-unit.ts - Runs one GSD auto-mode unit from session creation through agent completion.
|
|
6
2
|
import { NEW_SESSION_TIMEOUT_MS } from "./session.js";
|
|
7
3
|
import { _clearCurrentResolve, _setCurrentResolve, _setSessionSwitchInFlight } from "./resolve.js";
|
|
8
4
|
import { getCurrentTurnGeneration, runWithTurnGeneration, } from "./turn-epoch.js";
|
|
9
5
|
import { debugLog } from "../debug-logger.js";
|
|
10
6
|
import { logWarning } from "../workflow-logger.js";
|
|
11
7
|
import { resolveAutoSupervisorConfig } from "../preferences.js";
|
|
8
|
+
import { formatAutoUnitWorkingMessage } from "../working-output-messages.js";
|
|
12
9
|
// Tracks the latest session-switch attempt so a late timeout settlement from an
|
|
13
10
|
// older runUnit() call cannot clear the guard for a newer one.
|
|
14
11
|
let sessionSwitchGeneration = 0;
|
|
@@ -151,22 +148,29 @@ export async function runUnit(ctx, pi, s, unitType, unitId, prompt) {
|
|
|
151
148
|
// ── Send the prompt ──
|
|
152
149
|
debugLog("runUnit", { phase: "send-message", unitType, unitId });
|
|
153
150
|
const requestDispatchedAt = Date.now();
|
|
154
|
-
|
|
151
|
+
ctx.ui.setWorkingMessage?.(formatAutoUnitWorkingMessage(unitType, unitId));
|
|
155
152
|
// ── Await agent_end with absolute timeout (H4 fix) ──
|
|
156
153
|
// If supervision fails to resolve unitPromise within 30s, treat as cancelled.
|
|
157
154
|
// Without this, a crashed agent that never emits agent_end hangs the loop (#3161).
|
|
158
|
-
debugLog("runUnit", { phase: "awaiting-agent-end", unitType, unitId });
|
|
159
155
|
const supervisor = resolveAutoSupervisorConfig();
|
|
160
156
|
const UNIT_HARD_TIMEOUT_MS = Math.max(30_000, ((supervisor.hard_timeout_minutes ?? 30) * 60 * 1000) + 30_000);
|
|
161
157
|
let unitTimeoutHandle;
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
158
|
+
let result;
|
|
159
|
+
try {
|
|
160
|
+
pi.sendMessage({ customType: "gsd-auto", content: prompt, display: s.verbose }, { triggerTurn: true });
|
|
161
|
+
debugLog("runUnit", { phase: "awaiting-agent-end", unitType, unitId });
|
|
162
|
+
const timeoutResult = new Promise((resolve) => {
|
|
163
|
+
unitTimeoutHandle = setTimeout(() => {
|
|
164
|
+
resolve({ status: "cancelled", errorContext: { message: "Unit hard timeout — supervision may have failed", category: "timeout", isTransient: true } });
|
|
165
|
+
}, UNIT_HARD_TIMEOUT_MS);
|
|
166
|
+
});
|
|
167
|
+
result = await runWithTurnGeneration(capturedTurnGen, () => Promise.race([unitPromise, timeoutResult]));
|
|
168
|
+
}
|
|
169
|
+
finally {
|
|
170
|
+
if (unitTimeoutHandle)
|
|
171
|
+
clearTimeout(unitTimeoutHandle);
|
|
172
|
+
ctx.ui.setWorkingMessage?.(undefined);
|
|
173
|
+
}
|
|
170
174
|
debugLog("runUnit", {
|
|
171
175
|
phase: "agent-end-received",
|
|
172
176
|
unitType,
|