gsd-pi 2.76.0-dev.fe143342a → 2.77.0-dev.1d17f366c
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 +17 -35
- package/dist/claude-cli-check.js +32 -3
- package/dist/cli-web-branch.d.ts +1 -0
- package/dist/cli-web-branch.js +3 -0
- package/dist/cli.js +38 -2
- package/dist/extension-discovery.d.ts +6 -0
- package/dist/extension-discovery.js +37 -0
- package/dist/extension-registry.d.ts +3 -0
- package/dist/extension-sort.d.ts +18 -0
- package/dist/extension-sort.js +114 -0
- package/dist/extension-validator.d.ts +47 -0
- package/dist/extension-validator.js +127 -0
- package/dist/loader.js +35 -7
- package/dist/onboarding.js +45 -0
- package/dist/provider-migrations.d.ts +18 -0
- package/dist/provider-migrations.js +14 -0
- package/dist/resources/extensions/claude-code-cli/readiness.js +4 -3
- package/dist/resources/extensions/claude-code-cli/stream-adapter.js +78 -59
- package/dist/resources/extensions/cmux/index.js +20 -0
- package/dist/resources/extensions/github-sync/templates.js +103 -0
- package/dist/resources/extensions/google-search/extension-manifest.json +5 -4
- package/dist/resources/extensions/google-search/index.js +3 -375
- package/dist/resources/extensions/gsd/abandon-detect.js +44 -0
- package/dist/resources/extensions/gsd/auto/loop.js +90 -2
- package/dist/resources/extensions/gsd/auto/phases.js +95 -21
- package/dist/resources/extensions/gsd/auto/resolve.js +24 -0
- package/dist/resources/extensions/gsd/auto/run-unit.js +48 -4
- package/dist/resources/extensions/gsd/auto/session.js +18 -1
- package/dist/resources/extensions/gsd/auto/turn-epoch.js +95 -0
- package/dist/resources/extensions/gsd/auto-dispatch.js +115 -17
- package/dist/resources/extensions/gsd/auto-loop.js +1 -1
- package/dist/resources/extensions/gsd/auto-model-selection.js +1 -1
- package/dist/resources/extensions/gsd/auto-post-unit.js +90 -2
- package/dist/resources/extensions/gsd/auto-prompts.js +14 -0
- package/dist/resources/extensions/gsd/auto-recovery.js +46 -1
- package/dist/resources/extensions/gsd/auto-start.js +45 -39
- package/dist/resources/extensions/gsd/auto-timeout-recovery.js +11 -5
- package/dist/resources/extensions/gsd/auto-unit-closeout.js +11 -2
- package/dist/resources/extensions/gsd/auto-worktree.js +109 -61
- package/dist/resources/extensions/gsd/auto.js +97 -31
- package/dist/resources/extensions/gsd/bootstrap/agent-end-recovery.js +27 -1
- package/dist/resources/extensions/gsd/bootstrap/provider-error-resume.js +4 -2
- package/dist/resources/extensions/gsd/bootstrap/register-extension.js +11 -0
- package/dist/resources/extensions/gsd/bootstrap/register-hooks.js +17 -6
- package/dist/resources/extensions/gsd/bootstrap/system-context.js +11 -6
- package/dist/resources/extensions/gsd/bootstrap/write-gate.js +34 -2
- package/dist/resources/extensions/gsd/clean-root-preflight.js +93 -0
- package/dist/resources/extensions/gsd/commands/handlers/workflow.js +31 -4
- package/dist/resources/extensions/gsd/commands-cmux.js +9 -6
- package/dist/resources/extensions/gsd/commands-extensions.js +634 -43
- package/dist/resources/extensions/gsd/commands-prefs-wizard.js +968 -23
- package/dist/resources/extensions/gsd/dispatch-guard.js +29 -3
- package/dist/resources/extensions/gsd/file-lock.js +49 -9
- package/dist/resources/extensions/gsd/git-service.js +1 -0
- package/dist/resources/extensions/gsd/gitignore.js +2 -0
- package/dist/resources/extensions/gsd/gsd-db.js +90 -30
- package/dist/resources/extensions/gsd/guided-flow-queue.js +4 -1
- package/dist/resources/extensions/gsd/guided-flow.js +212 -9
- package/dist/resources/extensions/gsd/health-widget.js +4 -1
- package/dist/resources/extensions/gsd/journal.js +17 -2
- package/dist/resources/extensions/gsd/key-manager.js +22 -0
- package/dist/resources/extensions/gsd/milestone-actions.js +15 -0
- package/dist/resources/extensions/gsd/milestone-summary-classifier.js +37 -0
- package/dist/resources/extensions/gsd/model-router.js +36 -3
- package/dist/resources/extensions/gsd/notifications.js +30 -16
- package/dist/resources/extensions/gsd/pre-execution-checks.js +31 -6
- package/dist/resources/extensions/gsd/prompts/discuss-headless.md +29 -2
- package/dist/resources/extensions/gsd/prompts/discuss.md +29 -2
- package/dist/resources/extensions/gsd/prompts/doctor-heal.md +5 -4
- package/dist/resources/extensions/gsd/prompts/parallel-research-slices.md +5 -2
- package/dist/resources/extensions/gsd/prompts/system.md +1 -0
- package/dist/resources/extensions/gsd/reports.js +5 -4
- package/dist/resources/extensions/gsd/safety/evidence-collector.js +96 -0
- package/dist/resources/extensions/gsd/safety/file-change-validator.js +12 -4
- package/dist/resources/extensions/gsd/safety/safety-harness.js +5 -1
- package/dist/resources/extensions/gsd/state-transition-matrix.js +118 -0
- package/dist/resources/extensions/gsd/state.js +25 -25
- package/dist/resources/extensions/gsd/token-counter.js +22 -5
- package/dist/resources/extensions/gsd/tools/complete-milestone.js +16 -10
- package/dist/resources/extensions/gsd/tools/complete-slice.js +21 -0
- package/dist/resources/extensions/gsd/tools/complete-task.js +31 -0
- package/dist/resources/extensions/gsd/uok/audit.js +18 -2
- package/dist/resources/extensions/gsd/uok/dispatch-envelope.js +33 -0
- package/dist/resources/extensions/gsd/uok/execution-graph.js +10 -0
- package/dist/resources/extensions/gsd/uok/gitops.js +2 -1
- package/dist/resources/extensions/gsd/uok/loop-adapter.js +37 -10
- package/dist/resources/extensions/gsd/uok/parity-report.js +58 -0
- package/dist/resources/extensions/gsd/uok/plan-v2.js +30 -7
- package/dist/resources/extensions/gsd/uok/writer.js +82 -0
- package/dist/resources/extensions/gsd/workflow-logger.js +10 -2
- package/dist/resources/extensions/gsd/worktree-manager.js +1 -0
- package/dist/resources/extensions/gsd/worktree-resolver.js +50 -10
- package/dist/resources/extensions/mcp-client/auth.js +10 -1
- package/dist/resources/extensions/mcp-client/index.js +118 -9
- package/dist/resources/extensions/shared/cmux-events.js +12 -0
- package/dist/resources/extensions/shared/rtk-session-stats.js +1 -2
- package/dist/resources/skills/create-skill/SKILL.md +2 -2
- package/dist/resources/skills/create-skill/references/gsd-skill-ecosystem.md +4 -4
- package/dist/resources/skills/create-skill/workflows/audit-skill.md +4 -4
- package/dist/resources/skills/create-skill/workflows/create-new-skill.md +5 -5
- package/dist/resources/skills/verify-before-complete/SKILL.md +2 -1
- package/dist/resources/skills/write-docs/SKILL.md +2 -1
- package/dist/tsconfig.extensions.tsbuildinfo +1 -1
- package/dist/web/standalone/.next/BUILD_ID +1 -1
- package/dist/web/standalone/.next/app-path-routes-manifest.json +9 -9
- 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 +1 -1
- 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 +1 -1
- package/dist/web/standalone/.next/server/app/api/notifications/route.js.nft.json +1 -1
- package/dist/web/standalone/.next/server/app/api/onboarding/route.js +1 -1
- package/dist/web/standalone/.next/server/app/api/onboarding/route.js.nft.json +1 -1
- package/dist/web/standalone/.next/server/app/api/projects/route.js +1 -1
- package/dist/web/standalone/.next/server/app/api/projects/route.js.nft.json +1 -1
- package/dist/web/standalone/.next/server/app/api/recovery/route.js +1 -1
- package/dist/web/standalone/.next/server/app/api/recovery/route.js.nft.json +1 -1
- package/dist/web/standalone/.next/server/app/api/session/browser/route.js +1 -1
- package/dist/web/standalone/.next/server/app/api/session/browser/route.js.nft.json +1 -1
- package/dist/web/standalone/.next/server/app/api/session/command/route.js +1 -1
- package/dist/web/standalone/.next/server/app/api/session/command/route.js.nft.json +1 -1
- package/dist/web/standalone/.next/server/app/api/session/events/route.js +1 -1
- package/dist/web/standalone/.next/server/app/api/session/events/route.js.nft.json +1 -1
- package/dist/web/standalone/.next/server/app/api/session/manage/route.js +1 -1
- package/dist/web/standalone/.next/server/app/api/session/manage/route.js.nft.json +1 -1
- package/dist/web/standalone/.next/server/app/api/settings-data/route.js +1 -1
- package/dist/web/standalone/.next/server/app/api/settings-data/route.js.nft.json +1 -1
- package/dist/web/standalone/.next/server/app/api/skill-health/route.js +1 -1
- package/dist/web/standalone/.next/server/app/api/skill-health/route.js.nft.json +1 -1
- package/dist/web/standalone/.next/server/app/api/steer/route.js +1 -1
- package/dist/web/standalone/.next/server/app/api/steer/route.js.nft.json +1 -1
- package/dist/web/standalone/.next/server/app/api/switch-root/route.js +1 -1
- package/dist/web/standalone/.next/server/app/api/switch-root/route.js.nft.json +1 -1
- package/dist/web/standalone/.next/server/app/api/terminal/sessions/route.js +1 -1
- 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 +1 -1
- package/dist/web/standalone/.next/server/app/api/terminal/stream/route.js.nft.json +1 -1
- package/dist/web/standalone/.next/server/app/api/undo/route.js +1 -1
- package/dist/web/standalone/.next/server/app/api/undo/route.js.nft.json +1 -1
- package/dist/web/standalone/.next/server/app/api/visualizer/route.js +1 -1
- package/dist/web/standalone/.next/server/app/api/visualizer/route.js.nft.json +1 -1
- package/dist/web/standalone/.next/server/app/index.html +1 -1
- package/dist/web/standalone/.next/server/app/index.rsc +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 +9 -9
- package/dist/web/standalone/.next/server/chunks/1926.js +1 -0
- 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.e9f5195e91f9cad2.js +11 -0
- package/dist/web/standalone/.next/static/chunks/{webpack-5fc74f13a25fa1bb.js → webpack-2e68521d7c82f7c2.js} +1 -1
- package/dist/welcome-screen.js +6 -1
- package/dist/wizard.js +2 -0
- package/package.json +16 -14
- package/packages/daemon/package.json +2 -2
- package/packages/mcp-server/README.md +3 -3
- package/packages/mcp-server/dist/env-writer.d.ts +1 -0
- package/packages/mcp-server/dist/env-writer.d.ts.map +1 -1
- package/packages/mcp-server/dist/env-writer.js +74 -6
- package/packages/mcp-server/dist/env-writer.js.map +1 -1
- package/packages/mcp-server/dist/remote-questions.d.ts +45 -0
- package/packages/mcp-server/dist/remote-questions.d.ts.map +1 -0
- package/packages/mcp-server/dist/remote-questions.js +732 -0
- package/packages/mcp-server/dist/remote-questions.js.map +1 -0
- package/packages/mcp-server/dist/server.d.ts +7 -0
- package/packages/mcp-server/dist/server.d.ts.map +1 -1
- package/packages/mcp-server/dist/server.js +95 -10
- package/packages/mcp-server/dist/server.js.map +1 -1
- package/packages/mcp-server/dist/session-manager.d.ts +14 -0
- package/packages/mcp-server/dist/session-manager.d.ts.map +1 -1
- package/packages/mcp-server/dist/session-manager.js +49 -1
- package/packages/mcp-server/dist/session-manager.js.map +1 -1
- package/packages/mcp-server/dist/workflow-tools.d.ts.map +1 -1
- package/packages/mcp-server/dist/workflow-tools.js +15 -6
- package/packages/mcp-server/dist/workflow-tools.js.map +1 -1
- package/packages/mcp-server/package.json +9 -3
- package/packages/mcp-server/src/env-writer.test.ts +79 -1
- package/packages/mcp-server/src/env-writer.ts +76 -6
- package/packages/mcp-server/src/mcp-server.test.ts +67 -0
- package/packages/mcp-server/src/readers/readers.test.ts +5 -1
- package/packages/mcp-server/src/remote-questions.test.ts +294 -0
- package/packages/mcp-server/src/remote-questions.ts +916 -0
- package/packages/mcp-server/src/server.ts +118 -16
- package/packages/mcp-server/src/session-manager.ts +43 -1
- package/packages/mcp-server/src/workflow-tools.test.ts +44 -0
- package/packages/mcp-server/src/workflow-tools.ts +19 -6
- package/packages/mcp-server/tsconfig.test.json +19 -0
- package/packages/mcp-server/tsconfig.tsbuildinfo +1 -1
- package/packages/native/package.json +6 -1
- package/packages/native/src/__tests__/clipboard.test.mjs +69 -23
- package/packages/native/tsconfig.tsbuildinfo +1 -1
- package/packages/pi-agent-core/package.json +6 -1
- package/packages/pi-agent-core/src/agent-loop.test.ts +220 -15
- package/packages/pi-ai/dist/models/custom.d.ts +38 -0
- package/packages/pi-ai/dist/models/custom.d.ts.map +1 -1
- package/packages/pi-ai/dist/models/custom.js +41 -0
- package/packages/pi-ai/dist/models/custom.js.map +1 -1
- package/packages/pi-ai/dist/providers/anthropic-auth.test.js +1 -1
- package/packages/pi-ai/dist/providers/anthropic-auth.test.js.map +1 -1
- package/packages/pi-ai/dist/providers/anthropic-shared.d.ts.map +1 -1
- package/packages/pi-ai/dist/providers/anthropic-shared.js +27 -4
- package/packages/pi-ai/dist/providers/anthropic-shared.js.map +1 -1
- package/packages/pi-ai/dist/providers/anthropic.d.ts.map +1 -1
- package/packages/pi-ai/dist/providers/anthropic.js +8 -3
- package/packages/pi-ai/dist/providers/anthropic.js.map +1 -1
- package/packages/pi-ai/dist/providers/minimax-tool-name.test.d.ts +2 -0
- package/packages/pi-ai/dist/providers/minimax-tool-name.test.d.ts.map +1 -0
- package/packages/pi-ai/dist/providers/minimax-tool-name.test.js +80 -0
- package/packages/pi-ai/dist/providers/minimax-tool-name.test.js.map +1 -0
- package/packages/pi-ai/dist/providers/simple-options.d.ts +10 -0
- package/packages/pi-ai/dist/providers/simple-options.d.ts.map +1 -1
- package/packages/pi-ai/dist/providers/simple-options.js +16 -1
- package/packages/pi-ai/dist/providers/simple-options.js.map +1 -1
- package/packages/pi-ai/package.json +6 -1
- package/packages/pi-ai/src/models/custom.ts +42 -0
- package/packages/pi-ai/src/providers/anthropic-auth.test.ts +1 -1
- package/packages/pi-ai/src/providers/anthropic-shared.ts +26 -5
- package/packages/pi-ai/src/providers/anthropic.ts +9 -3
- package/packages/pi-ai/src/providers/minimax-tool-name.test.ts +98 -0
- package/packages/pi-ai/src/providers/simple-options.ts +17 -1
- package/packages/pi-ai/tsconfig.tsbuildinfo +1 -1
- package/packages/pi-coding-agent/dist/core/agent-session-abort-order.test.js +3 -2
- package/packages/pi-coding-agent/dist/core/agent-session-abort-order.test.js.map +1 -1
- package/packages/pi-coding-agent/dist/core/agent-session.d.ts +2 -0
- package/packages/pi-coding-agent/dist/core/agent-session.d.ts.map +1 -1
- package/packages/pi-coding-agent/dist/core/agent-session.js +7 -0
- package/packages/pi-coding-agent/dist/core/agent-session.js.map +1 -1
- package/packages/pi-coding-agent/dist/core/compaction/compaction.d.ts +25 -0
- package/packages/pi-coding-agent/dist/core/compaction/compaction.d.ts.map +1 -1
- package/packages/pi-coding-agent/dist/core/compaction/compaction.js +105 -6
- package/packages/pi-coding-agent/dist/core/compaction/compaction.js.map +1 -1
- package/packages/pi-coding-agent/dist/core/compaction/compaction.test.js +230 -28
- package/packages/pi-coding-agent/dist/core/compaction/compaction.test.js.map +1 -1
- package/packages/pi-coding-agent/dist/core/compaction/utils.d.ts +30 -2
- package/packages/pi-coding-agent/dist/core/compaction/utils.d.ts.map +1 -1
- package/packages/pi-coding-agent/dist/core/compaction/utils.js +113 -12
- package/packages/pi-coding-agent/dist/core/compaction/utils.js.map +1 -1
- package/packages/pi-coding-agent/dist/core/compaction-orchestrator.d.ts +1 -0
- package/packages/pi-coding-agent/dist/core/compaction-orchestrator.d.ts.map +1 -1
- package/packages/pi-coding-agent/dist/core/compaction-orchestrator.js +29 -18
- package/packages/pi-coding-agent/dist/core/compaction-orchestrator.js.map +1 -1
- package/packages/pi-coding-agent/dist/core/compaction-orchestrator.test.d.ts +2 -0
- package/packages/pi-coding-agent/dist/core/compaction-orchestrator.test.d.ts.map +1 -0
- package/packages/pi-coding-agent/dist/core/compaction-orchestrator.test.js +130 -0
- package/packages/pi-coding-agent/dist/core/compaction-orchestrator.test.js.map +1 -0
- package/packages/pi-coding-agent/dist/core/compaction-utils.test.js +56 -1
- package/packages/pi-coding-agent/dist/core/compaction-utils.test.js.map +1 -1
- package/packages/pi-coding-agent/dist/core/discovery-cache.test.js +8 -15
- package/packages/pi-coding-agent/dist/core/discovery-cache.test.js.map +1 -1
- package/packages/pi-coding-agent/dist/core/extensions/extension-discovery.d.ts +25 -0
- package/packages/pi-coding-agent/dist/core/extensions/extension-discovery.d.ts.map +1 -0
- package/packages/pi-coding-agent/dist/core/extensions/extension-discovery.js +109 -0
- package/packages/pi-coding-agent/dist/core/extensions/extension-discovery.js.map +1 -0
- package/packages/pi-coding-agent/dist/core/extensions/extension-registry.d.ts +67 -0
- package/packages/pi-coding-agent/dist/core/extensions/extension-registry.d.ts.map +1 -0
- package/packages/pi-coding-agent/dist/core/extensions/extension-registry.js +167 -0
- package/packages/pi-coding-agent/dist/core/extensions/extension-registry.js.map +1 -0
- package/packages/pi-coding-agent/dist/core/extensions/loader.d.ts +3 -2
- package/packages/pi-coding-agent/dist/core/extensions/loader.d.ts.map +1 -1
- package/packages/pi-coding-agent/dist/core/extensions/loader.js +24 -8
- package/packages/pi-coding-agent/dist/core/extensions/loader.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.map +1 -1
- package/packages/pi-coding-agent/dist/core/extensions/types.d.ts +14 -0
- package/packages/pi-coding-agent/dist/core/extensions/types.d.ts.map +1 -1
- package/packages/pi-coding-agent/dist/core/extensions/types.js.map +1 -1
- package/packages/pi-coding-agent/dist/core/lsp/lsp-integration.test.js +11 -0
- package/packages/pi-coding-agent/dist/core/lsp/lsp-integration.test.js.map +1 -1
- package/packages/pi-coding-agent/dist/core/model-registry-auth-mode.test.js +2 -2
- package/packages/pi-coding-agent/dist/core/model-registry-auth-mode.test.js.map +1 -1
- package/packages/pi-coding-agent/dist/core/model-registry-custom-caps.test.d.ts +2 -0
- package/packages/pi-coding-agent/dist/core/model-registry-custom-caps.test.d.ts.map +1 -0
- package/packages/pi-coding-agent/dist/core/model-registry-custom-caps.test.js +203 -0
- package/packages/pi-coding-agent/dist/core/model-registry-custom-caps.test.js.map +1 -0
- package/packages/pi-coding-agent/dist/core/model-registry.d.ts.map +1 -1
- package/packages/pi-coding-agent/dist/core/model-registry.js +14 -0
- package/packages/pi-coding-agent/dist/core/model-registry.js.map +1 -1
- package/packages/pi-coding-agent/dist/core/resource-loader.js +1 -1
- package/packages/pi-coding-agent/dist/core/resource-loader.js.map +1 -1
- package/packages/pi-coding-agent/dist/core/sdk.d.ts +1 -0
- package/packages/pi-coding-agent/dist/core/sdk.d.ts.map +1 -1
- package/packages/pi-coding-agent/dist/core/sdk.js +4 -1
- package/packages/pi-coding-agent/dist/core/sdk.js.map +1 -1
- package/packages/pi-coding-agent/dist/core/sdk.test.js +19 -1
- package/packages/pi-coding-agent/dist/core/sdk.test.js.map +1 -1
- package/packages/pi-coding-agent/dist/core/session-manager.js +1 -1
- package/packages/pi-coding-agent/dist/core/session-manager.js.map +1 -1
- package/packages/pi-coding-agent/dist/core/session-manager.test.js +21 -1
- package/packages/pi-coding-agent/dist/core/session-manager.test.js.map +1 -1
- package/packages/pi-coding-agent/dist/core/system-prompt.js +3 -3
- package/packages/pi-coding-agent/dist/core/system-prompt.js.map +1 -1
- package/packages/pi-coding-agent/dist/core/tools/path-utils.test.js +2 -1
- package/packages/pi-coding-agent/dist/core/tools/path-utils.test.js.map +1 -1
- package/packages/pi-coding-agent/dist/modes/interactive/components/__tests__/provider-display-name.test.js +15 -6
- package/packages/pi-coding-agent/dist/modes/interactive/components/__tests__/provider-display-name.test.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 +14 -5
- package/packages/pi-coding-agent/dist/modes/interactive/components/footer.js.map +1 -1
- package/packages/pi-coding-agent/dist/modes/interactive/components/model-selector.d.ts +7 -1
- package/packages/pi-coding-agent/dist/modes/interactive/components/model-selector.d.ts.map +1 -1
- package/packages/pi-coding-agent/dist/modes/interactive/components/model-selector.js +31 -9
- package/packages/pi-coding-agent/dist/modes/interactive/components/model-selector.js.map +1 -1
- package/packages/pi-coding-agent/dist/modes/interactive/controllers/input-controller.test.js +14 -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.d.ts.map +1 -1
- package/packages/pi-coding-agent/dist/modes/interactive/interactive-mode.js +13 -1
- package/packages/pi-coding-agent/dist/modes/interactive/interactive-mode.js.map +1 -1
- package/packages/pi-coding-agent/package.json +6 -1
- package/packages/pi-coding-agent/src/core/agent-session-abort-order.test.ts +3 -2
- package/packages/pi-coding-agent/src/core/agent-session.ts +11 -0
- package/packages/pi-coding-agent/src/core/compaction/compaction.test.ts +368 -28
- package/packages/pi-coding-agent/src/core/compaction/compaction.ts +122 -6
- package/packages/pi-coding-agent/src/core/compaction/utils.ts +111 -13
- package/packages/pi-coding-agent/src/core/compaction-orchestrator.test.ts +154 -0
- package/packages/pi-coding-agent/src/core/compaction-orchestrator.ts +32 -18
- package/packages/pi-coding-agent/src/core/compaction-utils.test.ts +68 -1
- package/packages/pi-coding-agent/src/core/discovery-cache.test.ts +9 -18
- package/packages/pi-coding-agent/src/core/extensions/extension-discovery.ts +119 -0
- package/packages/pi-coding-agent/src/core/extensions/extension-registry.ts +222 -0
- package/packages/pi-coding-agent/src/core/extensions/loader.ts +24 -11
- package/packages/pi-coding-agent/src/core/extensions/runner.ts +2 -0
- package/packages/pi-coding-agent/src/core/extensions/types.ts +15 -0
- package/packages/pi-coding-agent/src/core/lsp/lsp-integration.test.ts +13 -0
- package/packages/pi-coding-agent/src/core/model-registry-auth-mode.test.ts +2 -2
- package/packages/pi-coding-agent/src/core/model-registry-custom-caps.test.ts +245 -0
- package/packages/pi-coding-agent/src/core/model-registry.ts +16 -0
- package/packages/pi-coding-agent/src/core/resource-loader.ts +1 -1
- package/packages/pi-coding-agent/src/core/sdk.test.ts +25 -1
- package/packages/pi-coding-agent/src/core/sdk.ts +10 -3
- package/packages/pi-coding-agent/src/core/session-manager.test.ts +30 -1
- package/packages/pi-coding-agent/src/core/session-manager.ts +1 -1
- package/packages/pi-coding-agent/src/core/system-prompt.ts +3 -3
- package/packages/pi-coding-agent/src/core/tools/path-utils.test.ts +2 -1
- package/packages/pi-coding-agent/src/modes/interactive/components/__tests__/provider-display-name.test.ts +17 -7
- package/packages/pi-coding-agent/src/modes/interactive/components/footer.ts +14 -5
- package/packages/pi-coding-agent/src/modes/interactive/components/model-selector.ts +45 -11
- package/packages/pi-coding-agent/src/modes/interactive/controllers/input-controller.test.ts +14 -0
- package/packages/pi-coding-agent/src/modes/interactive/interactive-mode.ts +13 -1
- package/packages/pi-coding-agent/tsconfig.tsbuildinfo +1 -1
- package/packages/pi-tui/dist/__tests__/autocomplete.test.js +12 -5
- package/packages/pi-tui/dist/__tests__/autocomplete.test.js.map +1 -1
- package/packages/pi-tui/dist/__tests__/stdin-buffer.test.js +21 -0
- package/packages/pi-tui/dist/__tests__/stdin-buffer.test.js.map +1 -1
- package/packages/pi-tui/dist/stdin-buffer.d.ts +7 -0
- package/packages/pi-tui/dist/stdin-buffer.d.ts.map +1 -1
- package/packages/pi-tui/dist/stdin-buffer.js +20 -0
- package/packages/pi-tui/dist/stdin-buffer.js.map +1 -1
- package/packages/pi-tui/package.json +6 -1
- package/packages/pi-tui/src/__tests__/autocomplete.test.ts +20 -5
- package/packages/pi-tui/src/__tests__/stdin-buffer.test.ts +27 -0
- package/packages/pi-tui/src/stdin-buffer.ts +26 -0
- package/packages/pi-tui/tsconfig.tsbuildinfo +1 -1
- package/packages/rpc-client/package.json +6 -1
- package/pkg/package.json +1 -1
- package/scripts/install.js +512 -0
- package/scripts/lib/workspace-manifest.cjs +86 -0
- package/scripts/link-workspace-packages.cjs +5 -17
- package/scripts/postinstall.js +9 -178
- package/src/resources/extensions/claude-code-cli/readiness.ts +4 -3
- package/src/resources/extensions/claude-code-cli/stream-adapter.ts +91 -63
- package/src/resources/extensions/claude-code-cli/tests/stream-adapter.test.ts +114 -12
- package/src/resources/extensions/cmux/index.ts +35 -10
- package/src/resources/extensions/github-sync/templates.ts +151 -0
- package/src/resources/extensions/github-sync/tests/templates.test.ts +59 -0
- package/src/resources/extensions/google-search/extension-manifest.json +5 -4
- package/src/resources/extensions/google-search/index.ts +9 -470
- package/src/resources/extensions/gsd/abandon-detect.ts +62 -0
- package/src/resources/extensions/gsd/auto/loop-deps.ts +14 -1
- package/src/resources/extensions/gsd/auto/loop.ts +104 -2
- package/src/resources/extensions/gsd/auto/phases.ts +123 -21
- package/src/resources/extensions/gsd/auto/resolve.ts +29 -0
- package/src/resources/extensions/gsd/auto/run-unit.ts +56 -4
- package/src/resources/extensions/gsd/auto/session.ts +28 -1
- package/src/resources/extensions/gsd/auto/turn-epoch.ts +108 -0
- package/src/resources/extensions/gsd/auto/types.ts +1 -1
- package/src/resources/extensions/gsd/auto-dispatch.ts +117 -16
- package/src/resources/extensions/gsd/auto-loop.ts +1 -1
- package/src/resources/extensions/gsd/auto-model-selection.ts +1 -1
- package/src/resources/extensions/gsd/auto-post-unit.ts +92 -3
- package/src/resources/extensions/gsd/auto-prompts.ts +28 -1
- package/src/resources/extensions/gsd/auto-recovery.ts +40 -1
- package/src/resources/extensions/gsd/auto-start.ts +48 -52
- package/src/resources/extensions/gsd/auto-timeout-recovery.ts +12 -5
- package/src/resources/extensions/gsd/auto-unit-closeout.ts +14 -3
- package/src/resources/extensions/gsd/auto-worktree.ts +122 -68
- package/src/resources/extensions/gsd/auto.ts +105 -35
- package/src/resources/extensions/gsd/bootstrap/agent-end-recovery.ts +34 -1
- package/src/resources/extensions/gsd/bootstrap/provider-error-resume.ts +6 -2
- package/src/resources/extensions/gsd/bootstrap/register-extension.ts +11 -0
- package/src/resources/extensions/gsd/bootstrap/register-hooks.ts +18 -6
- package/src/resources/extensions/gsd/bootstrap/system-context.ts +13 -9
- package/src/resources/extensions/gsd/bootstrap/write-gate.ts +35 -2
- package/src/resources/extensions/gsd/clean-root-preflight.ts +111 -0
- package/src/resources/extensions/gsd/commands/handlers/workflow.ts +27 -8
- package/src/resources/extensions/gsd/commands-cmux.ts +10 -6
- package/src/resources/extensions/gsd/commands-extensions.ts +747 -41
- package/src/resources/extensions/gsd/commands-prefs-wizard.ts +898 -32
- package/src/resources/extensions/gsd/dispatch-guard.ts +26 -2
- package/src/resources/extensions/gsd/file-lock.ts +84 -11
- package/src/resources/extensions/gsd/git-service.ts +1 -0
- package/src/resources/extensions/gsd/gitignore.ts +2 -1
- package/src/resources/extensions/gsd/gsd-db.ts +92 -32
- package/src/resources/extensions/gsd/guided-flow-queue.ts +4 -1
- package/src/resources/extensions/gsd/guided-flow.ts +259 -10
- package/src/resources/extensions/gsd/health-widget.ts +3 -1
- package/src/resources/extensions/gsd/journal.ts +29 -3
- package/src/resources/extensions/gsd/key-manager.ts +22 -0
- package/src/resources/extensions/gsd/milestone-actions.ts +18 -0
- package/src/resources/extensions/gsd/milestone-summary-classifier.ts +42 -0
- package/src/resources/extensions/gsd/model-router.ts +42 -1
- package/src/resources/extensions/gsd/notifications.ts +27 -15
- package/src/resources/extensions/gsd/pre-execution-checks.ts +33 -7
- package/src/resources/extensions/gsd/preferences-types.ts +8 -0
- package/src/resources/extensions/gsd/prompts/discuss-headless.md +29 -2
- package/src/resources/extensions/gsd/prompts/discuss.md +29 -2
- package/src/resources/extensions/gsd/prompts/doctor-heal.md +5 -4
- package/src/resources/extensions/gsd/prompts/parallel-research-slices.md +5 -2
- package/src/resources/extensions/gsd/prompts/system.md +1 -0
- package/src/resources/extensions/gsd/reports.ts +5 -4
- package/src/resources/extensions/gsd/safety/evidence-collector.ts +119 -0
- package/src/resources/extensions/gsd/safety/file-change-validator.ts +16 -3
- package/src/resources/extensions/gsd/safety/safety-harness.ts +9 -0
- package/src/resources/extensions/gsd/state-transition-matrix.ts +152 -0
- package/src/resources/extensions/gsd/state.ts +35 -30
- package/src/resources/extensions/gsd/tests/auto-loop.test.ts +238 -4
- package/src/resources/extensions/gsd/tests/auto-mode-guards.test.ts +79 -0
- package/src/resources/extensions/gsd/tests/auto-paused-session-validation.test.ts +12 -0
- package/src/resources/extensions/gsd/tests/auto-recovery.test.ts +122 -0
- package/src/resources/extensions/gsd/tests/auto-start-bootstrap-await-3420.test.ts +141 -0
- package/src/resources/extensions/gsd/tests/auto-start-clean-runtime-db-gated.test.ts +63 -0
- package/src/resources/extensions/gsd/tests/auto-wrapup-inflight-guard.test.ts +23 -0
- package/src/resources/extensions/gsd/tests/clean-root-preflight.test.ts +186 -0
- package/src/resources/extensions/gsd/tests/cmux.test.ts +5 -9
- package/src/resources/extensions/gsd/tests/complete-milestone-false-merge.test.ts +15 -0
- package/src/resources/extensions/gsd/tests/complete-milestone.test.ts +61 -1
- 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-engine-loop-integration.test.ts +161 -0
- package/src/resources/extensions/gsd/tests/db-access-guardrails.test.ts +1 -0
- package/src/resources/extensions/gsd/tests/derive-state.test.ts +1 -2
- package/src/resources/extensions/gsd/tests/dispatch-complete-milestone-guard.test.ts +14 -9
- package/src/resources/extensions/gsd/tests/dispatch-guard-summary-db-mismatch.test.ts +77 -0
- package/src/resources/extensions/gsd/tests/dispatch-guard.test.ts +25 -0
- package/src/resources/extensions/gsd/tests/dispatch-missing-task-plans.test.ts +14 -0
- package/src/resources/extensions/gsd/tests/doctor-providers.test.ts +31 -0
- package/src/resources/extensions/gsd/tests/double-merge-guard.test.ts +1 -1
- package/src/resources/extensions/gsd/tests/ensure-db-open.test.ts +1 -1
- package/src/resources/extensions/gsd/tests/escalation.test.ts +1 -1
- package/src/resources/extensions/gsd/tests/exec-history.test.ts +113 -0
- package/src/resources/extensions/gsd/tests/execution-entry-missing-context-4671.test.ts +173 -0
- package/src/resources/extensions/gsd/tests/file-change-validator.test.ts +38 -0
- package/src/resources/extensions/gsd/tests/file-lock.test.ts +86 -12
- package/src/resources/extensions/gsd/tests/google-search-stub.test.ts +131 -0
- package/src/resources/extensions/gsd/tests/gsd-db.test.ts +296 -1
- package/src/resources/extensions/gsd/tests/headless-milestone-parity.test.ts +117 -0
- package/src/resources/extensions/gsd/tests/integration/auto-worktree-milestone-merge.test.ts +30 -0
- package/src/resources/extensions/gsd/tests/integration/git-service.test.ts +4 -2
- package/src/resources/extensions/gsd/tests/integration/gitignore-tracked-gsd.test.ts +1 -0
- package/src/resources/extensions/gsd/tests/integration/idle-recovery.test.ts +30 -0
- package/src/resources/extensions/gsd/tests/integration/worktree-e2e.test.ts +11 -0
- package/src/resources/extensions/gsd/tests/issue-4540-regressions.test.ts +288 -0
- package/src/resources/extensions/gsd/tests/journal-integration.test.ts +66 -0
- package/src/resources/extensions/gsd/tests/key-manager.test.ts +2 -0
- package/src/resources/extensions/gsd/tests/mcp-client-security.test.ts +76 -0
- package/src/resources/extensions/gsd/tests/md-importer.test.ts +1 -1
- package/src/resources/extensions/gsd/tests/memory-pressure-stuck-state.test.ts +12 -0
- package/src/resources/extensions/gsd/tests/memory-store.test.ts +2 -2
- package/src/resources/extensions/gsd/tests/milestone-status-authoritative.test.ts +3 -3
- package/src/resources/extensions/gsd/tests/milestone-summary-classifier.test.ts +30 -0
- package/src/resources/extensions/gsd/tests/milestone-transition-state-rebuild.test.ts +4 -2
- package/src/resources/extensions/gsd/tests/parallel-commit-scope.test.ts +5 -0
- package/src/resources/extensions/gsd/tests/parallel-research-dispatch.test.ts +19 -0
- package/src/resources/extensions/gsd/tests/parallel-skill-prompt-integration.test.ts +150 -0
- package/src/resources/extensions/gsd/tests/plan-gate-failed-doctor-heal-hint.test.ts +37 -0
- package/src/resources/extensions/gsd/tests/pre-exec-gate-loop.test.ts +272 -0
- package/src/resources/extensions/gsd/tests/pre-execution-checks.test.ts +337 -0
- package/src/resources/extensions/gsd/tests/prefs-wizard-coverage.test.ts +44 -0
- package/src/resources/extensions/gsd/tests/provider-errors.test.ts +39 -25
- package/src/resources/extensions/gsd/tests/queue-auto-guard.test.ts +181 -0
- package/src/resources/extensions/gsd/tests/quick-auto-guard.test.ts +13 -7
- package/src/resources/extensions/gsd/tests/ready-phrase-no-files-4573.test.ts +388 -0
- package/src/resources/extensions/gsd/tests/require-slice-discussion-dispatch.test.ts +170 -0
- package/src/resources/extensions/gsd/tests/restore-tools-after-discuss.test.ts +9 -3
- package/src/resources/extensions/gsd/tests/resume-dispatch-worktree.test.ts +230 -0
- package/src/resources/extensions/gsd/tests/rewrite-docs-abandon-detect.test.ts +195 -0
- package/src/resources/extensions/gsd/tests/safety-harness-false-positives.test.ts +205 -0
- package/src/resources/extensions/gsd/tests/schema-v21-sequence.test.ts +413 -0
- package/src/resources/extensions/gsd/tests/session-start-footer.test.ts +32 -40
- package/src/resources/extensions/gsd/tests/stale-dirlistcache-4648.test.ts +112 -0
- package/src/resources/extensions/gsd/tests/stash-queued-context-files.test.ts +56 -0
- package/src/resources/extensions/gsd/tests/state-machine-full-walkthrough.test.ts +24 -0
- package/src/resources/extensions/gsd/tests/state-transition-matrix.test.ts +44 -0
- package/src/resources/extensions/gsd/tests/stuck-detection-coverage.test.ts +2 -2
- package/src/resources/extensions/gsd/tests/token-counter.test.ts +105 -1
- package/src/resources/extensions/gsd/tests/tool-compatibility.test.ts +107 -0
- package/src/resources/extensions/gsd/tests/triage-resolution.test.ts +50 -2
- package/src/resources/extensions/gsd/tests/turn-epoch.test.ts +162 -0
- package/src/resources/extensions/gsd/tests/uok-contracts.test.ts +51 -0
- package/src/resources/extensions/gsd/tests/uok-execution-graph.test.ts +16 -0
- package/src/resources/extensions/gsd/tests/uok-loop-adapter-writer.test.ts +65 -0
- package/src/resources/extensions/gsd/tests/uok-parity-report.test.ts +42 -0
- package/src/resources/extensions/gsd/tests/uok-plan-v2-wiring.test.ts +42 -2
- package/src/resources/extensions/gsd/tests/uok-writer.test.ts +75 -0
- package/src/resources/extensions/gsd/tests/validate-extension-package.test.ts +168 -0
- package/src/resources/extensions/gsd/tests/validate-milestone.test.ts +138 -5
- package/src/resources/extensions/gsd/tests/workflow-mcp.test.ts +25 -2
- package/src/resources/extensions/gsd/tests/workflow-tool-executors.test.ts +65 -2
- package/src/resources/extensions/gsd/tests/worktree-db.test.ts +35 -0
- package/src/resources/extensions/gsd/tests/worktree-journal-events.test.ts +6 -1
- package/src/resources/extensions/gsd/tests/worktree-resolver.test.ts +78 -5
- package/src/resources/extensions/gsd/tests/write-gate.test.ts +64 -0
- package/src/resources/extensions/gsd/token-counter.ts +22 -5
- package/src/resources/extensions/gsd/tools/complete-milestone.ts +15 -9
- package/src/resources/extensions/gsd/tools/complete-slice.ts +38 -0
- package/src/resources/extensions/gsd/tools/complete-task.ts +49 -0
- package/src/resources/extensions/gsd/uok/audit.ts +20 -2
- package/src/resources/extensions/gsd/uok/contracts.ts +65 -0
- package/src/resources/extensions/gsd/uok/dispatch-envelope.ts +56 -0
- package/src/resources/extensions/gsd/uok/execution-graph.ts +22 -0
- package/src/resources/extensions/gsd/uok/gitops.ts +6 -1
- package/src/resources/extensions/gsd/uok/loop-adapter.ts +45 -10
- package/src/resources/extensions/gsd/uok/parity-report.ts +84 -0
- package/src/resources/extensions/gsd/uok/plan-v2.ts +39 -8
- package/src/resources/extensions/gsd/uok/writer.ts +113 -0
- package/src/resources/extensions/gsd/workflow-logger.ts +23 -3
- package/src/resources/extensions/gsd/worktree-manager.ts +1 -0
- package/src/resources/extensions/gsd/worktree-resolver.ts +54 -9
- package/src/resources/extensions/mcp-client/auth.ts +12 -1
- package/src/resources/extensions/mcp-client/index.ts +129 -10
- package/src/resources/extensions/shared/cmux-events.ts +59 -0
- package/src/resources/extensions/shared/rtk-session-stats.ts +1 -2
- package/src/resources/skills/create-skill/SKILL.md +2 -2
- package/src/resources/skills/create-skill/references/gsd-skill-ecosystem.md +4 -4
- package/src/resources/skills/create-skill/workflows/audit-skill.md +4 -4
- package/src/resources/skills/create-skill/workflows/create-new-skill.md +5 -5
- package/src/resources/skills/verify-before-complete/SKILL.md +2 -1
- package/src/resources/skills/write-docs/SKILL.md +2 -1
- package/dist/web/standalone/.next/server/chunks/7461.js +0 -1
- package/dist/web/standalone/.next/static/chunks/2826.e59e8578e2e28639.js +0 -9
- /package/dist/web/standalone/.next/static/{n21VtX2hZlkpdEUO_nU4z → vidAVJkURvTJ0_V2-64ro}/_buildManifest.js +0 -0
- /package/dist/web/standalone/.next/static/{n21VtX2hZlkpdEUO_nU4z → vidAVJkURvTJ0_V2-64ro}/_ssgManifest.js +0 -0
package/dist/loader.js
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
// Copyright (c) 2026 Jeremy McSpadden <jeremy@fluxlabs.net>
|
|
4
4
|
import { fileURLToPath } from 'url';
|
|
5
5
|
import { dirname, resolve, join, relative, delimiter } from 'path';
|
|
6
|
-
import { existsSync, readFileSync, mkdirSync, symlinkSync, cpSync } from 'fs';
|
|
6
|
+
import { existsSync, readFileSync, readdirSync, statSync, mkdirSync, symlinkSync, cpSync } from 'fs';
|
|
7
7
|
// Fast-path: handle --version/-v and --help/-h before importing any heavy
|
|
8
8
|
// dependencies. This avoids loading the entire pi-coding-agent barrel import
|
|
9
9
|
// (~1s) just to print a version string.
|
|
@@ -155,15 +155,42 @@ if (process.env.HTTP_PROXY || process.env.HTTPS_PROXY || process.env.http_proxy
|
|
|
155
155
|
// On Windows without Developer Mode or admin rights, symlinkSync will throw even for
|
|
156
156
|
// 'junction' type — so we fall back to cpSync (a full directory copy) which works
|
|
157
157
|
// everywhere without elevated permissions.
|
|
158
|
-
|
|
158
|
+
// Discover linkable workspace packages by scanning packages/*/package.json for
|
|
159
|
+
// `gsd.linkable === true`. This is the single source of truth — the same list
|
|
160
|
+
// read by scripts/link-workspace-packages.cjs and scripts/validate-pack.js.
|
|
161
|
+
// Adding a new linkable package requires only setting `gsd.linkable` in its
|
|
162
|
+
// package.json; there is no enumeration to keep in sync here.
|
|
159
163
|
const packagesDir = join(gsdRoot, 'packages');
|
|
160
|
-
const wsPackages = [
|
|
164
|
+
const wsPackages = [];
|
|
165
|
+
try {
|
|
166
|
+
if (existsSync(packagesDir)) {
|
|
167
|
+
for (const dir of readdirSync(packagesDir)) {
|
|
168
|
+
const pkgPath = join(packagesDir, dir);
|
|
169
|
+
if (!statSync(pkgPath).isDirectory())
|
|
170
|
+
continue;
|
|
171
|
+
const pkgJsonPath = join(pkgPath, 'package.json');
|
|
172
|
+
if (!existsSync(pkgJsonPath))
|
|
173
|
+
continue;
|
|
174
|
+
try {
|
|
175
|
+
const pkg = JSON.parse(readFileSync(pkgJsonPath, 'utf-8'));
|
|
176
|
+
const gsd = pkg.gsd;
|
|
177
|
+
if (!gsd || gsd.linkable !== true)
|
|
178
|
+
continue;
|
|
179
|
+
if (gsd.scope && gsd.name)
|
|
180
|
+
wsPackages.push({ dir, scope: gsd.scope, name: gsd.name });
|
|
181
|
+
}
|
|
182
|
+
catch { /* ignore malformed package.json */ }
|
|
183
|
+
}
|
|
184
|
+
}
|
|
185
|
+
}
|
|
186
|
+
catch { /* non-fatal — validation below catches missing critical packages */ }
|
|
161
187
|
try {
|
|
162
|
-
if (!existsSync(gsdScopeDir))
|
|
163
|
-
mkdirSync(gsdScopeDir, { recursive: true });
|
|
164
188
|
for (const pkg of wsPackages) {
|
|
165
|
-
const
|
|
166
|
-
|
|
189
|
+
const scopeDir = join(gsdNodeModules, pkg.scope);
|
|
190
|
+
if (!existsSync(scopeDir))
|
|
191
|
+
mkdirSync(scopeDir, { recursive: true });
|
|
192
|
+
const target = join(scopeDir, pkg.name);
|
|
193
|
+
const source = join(packagesDir, pkg.dir);
|
|
167
194
|
if (!existsSync(source) || existsSync(target))
|
|
168
195
|
continue;
|
|
169
196
|
try {
|
|
@@ -180,6 +207,7 @@ try {
|
|
|
180
207
|
}
|
|
181
208
|
}
|
|
182
209
|
catch { /* non-fatal */ }
|
|
210
|
+
const gsdScopeDir = join(gsdNodeModules, '@gsd');
|
|
183
211
|
// Validate critical workspace packages are resolvable. If still missing after the
|
|
184
212
|
// symlink+copy attempts, emit a clear diagnostic instead of a cryptic
|
|
185
213
|
// ERR_MODULE_NOT_FOUND from deep inside cli.js.
|
package/dist/onboarding.js
CHANGED
|
@@ -60,6 +60,8 @@ const OTHER_PROVIDERS = [
|
|
|
60
60
|
{ value: 'xai', label: 'xAI (Grok)', hint: 'console.x.ai' },
|
|
61
61
|
{ value: 'openrouter', label: 'OpenRouter', hint: '200+ models — openrouter.ai/keys' },
|
|
62
62
|
{ value: 'mistral', label: 'Mistral', hint: 'console.mistral.ai/api-keys' },
|
|
63
|
+
{ value: 'minimax', label: 'MiniMax', hint: 'platform.minimax.io (Anthropic-compatible recommended)' },
|
|
64
|
+
{ value: 'minimax-cn', label: 'MiniMax CN', hint: 'api.minimaxi.com (Anthropic-compatible)' },
|
|
63
65
|
{ value: 'ollama-cloud', label: 'Ollama Cloud' },
|
|
64
66
|
{ value: 'custom-openai', label: 'Custom (OpenAI-compatible)', hint: 'Ollama, LM Studio, vLLM, proxies — see docs/providers.md' },
|
|
65
67
|
];
|
|
@@ -131,6 +133,36 @@ function persistDefaultProvider(providerId) {
|
|
|
131
133
|
// Non-fatal: startup fallback logic will still run.
|
|
132
134
|
}
|
|
133
135
|
}
|
|
136
|
+
/**
|
|
137
|
+
* Persist the selected default model to settings.json.
|
|
138
|
+
*/
|
|
139
|
+
function persistDefaultModel(modelId) {
|
|
140
|
+
const settingsPath = join(agentDir, 'settings.json');
|
|
141
|
+
try {
|
|
142
|
+
const raw = existsSync(settingsPath) ? JSON.parse(readFileSync(settingsPath, 'utf-8')) : {};
|
|
143
|
+
raw.defaultModel = modelId;
|
|
144
|
+
mkdirSync(dirname(settingsPath), { recursive: true });
|
|
145
|
+
writeFileSync(settingsPath, JSON.stringify(raw, null, 2), 'utf-8');
|
|
146
|
+
}
|
|
147
|
+
catch {
|
|
148
|
+
// Non-fatal: startup fallback logic will still run.
|
|
149
|
+
}
|
|
150
|
+
}
|
|
151
|
+
function detectNativeProviderFromBaseUrl(baseUrl) {
|
|
152
|
+
try {
|
|
153
|
+
const hostname = new URL(baseUrl).hostname.toLowerCase();
|
|
154
|
+
if (hostname === 'api.minimax.io' || hostname.endsWith('.minimax.io')) {
|
|
155
|
+
return 'minimax';
|
|
156
|
+
}
|
|
157
|
+
if (hostname === 'api.minimaxi.com' || hostname.endsWith('.minimaxi.com')) {
|
|
158
|
+
return 'minimax-cn';
|
|
159
|
+
}
|
|
160
|
+
}
|
|
161
|
+
catch {
|
|
162
|
+
// ignore parse failures; handled by prior validation
|
|
163
|
+
}
|
|
164
|
+
return null;
|
|
165
|
+
}
|
|
134
166
|
/** Sentinel returned by runStep when the user cancels — tells the caller
|
|
135
167
|
* to abort the entire wizard. */
|
|
136
168
|
const STEP_CANCELLED = Symbol('step-cancelled');
|
|
@@ -558,9 +590,22 @@ async function runCustomOpenAIFlow(p, pc, authStorage) {
|
|
|
558
590
|
if (p.isCancel(modelId) || !modelId)
|
|
559
591
|
return false;
|
|
560
592
|
const trimmedModelId = modelId.trim();
|
|
593
|
+
const nativeProvider = detectNativeProviderFromBaseUrl(trimmedUrl);
|
|
594
|
+
if (nativeProvider) {
|
|
595
|
+
const envVar = nativeProvider === 'minimax' ? 'MINIMAX_API_KEY' : 'MINIMAX_CN_API_KEY';
|
|
596
|
+
authStorage.set(nativeProvider, { type: 'api_key', key: trimmedKey });
|
|
597
|
+
persistDefaultProvider(nativeProvider);
|
|
598
|
+
persistDefaultModel(trimmedModelId);
|
|
599
|
+
process.env[envVar] = trimmedKey;
|
|
600
|
+
p.log.success(`${pc.green('MiniMax')} detected — configured as native provider (${pc.cyan(nativeProvider)})`);
|
|
601
|
+
p.log.info(`Model: ${pc.cyan(trimmedModelId)}`);
|
|
602
|
+
p.log.info(pc.dim('Using Anthropic-compatible MiniMax integration for full model metadata and clean thinking output.'));
|
|
603
|
+
return true;
|
|
604
|
+
}
|
|
561
605
|
// Save API key to auth storage
|
|
562
606
|
authStorage.set('custom-openai', { type: 'api_key', key: trimmedKey });
|
|
563
607
|
persistDefaultProvider('custom-openai');
|
|
608
|
+
persistDefaultModel(trimmedModelId);
|
|
564
609
|
// Write or merge into models.json
|
|
565
610
|
const modelsJsonPath = join(agentDir, 'models.json');
|
|
566
611
|
let config = { providers: {} };
|
|
@@ -5,6 +5,24 @@ type AnthropicMigrationDeps = {
|
|
|
5
5
|
defaultProvider: string | undefined;
|
|
6
6
|
env?: NodeJS.ProcessEnv;
|
|
7
7
|
};
|
|
8
|
+
type MigrationModel = {
|
|
9
|
+
provider: string;
|
|
10
|
+
id: string;
|
|
11
|
+
};
|
|
12
|
+
type AnthropicDefaultMigrationDeps = {
|
|
13
|
+
authStorage: Pick<AuthStorage, "getCredentialsForProvider">;
|
|
14
|
+
isClaudeCodeReady: boolean;
|
|
15
|
+
settingsManager: {
|
|
16
|
+
getDefaultProvider(): string | undefined;
|
|
17
|
+
getDefaultModel(): string | undefined;
|
|
18
|
+
setDefaultModelAndProvider(provider: string, modelId: string): void;
|
|
19
|
+
};
|
|
20
|
+
modelRegistry: {
|
|
21
|
+
getAvailable(): MigrationModel[];
|
|
22
|
+
};
|
|
23
|
+
env?: NodeJS.ProcessEnv;
|
|
24
|
+
};
|
|
8
25
|
export declare function hasDirectAnthropicApiKey(authStorage: Pick<AuthStorage, "getCredentialsForProvider">, env?: NodeJS.ProcessEnv): boolean;
|
|
9
26
|
export declare function shouldMigrateAnthropicToClaudeCode({ authStorage, isClaudeCodeReady, defaultProvider, env, }: AnthropicMigrationDeps): boolean;
|
|
27
|
+
export declare function migrateAnthropicDefaultToClaudeCode({ authStorage, isClaudeCodeReady, settingsManager, modelRegistry, env, }: AnthropicDefaultMigrationDeps): boolean;
|
|
10
28
|
export {};
|
|
@@ -10,3 +10,17 @@ export function shouldMigrateAnthropicToClaudeCode({ authStorage, isClaudeCodeRe
|
|
|
10
10
|
}
|
|
11
11
|
return !hasDirectAnthropicApiKey(authStorage, env);
|
|
12
12
|
}
|
|
13
|
+
export function migrateAnthropicDefaultToClaudeCode({ authStorage, isClaudeCodeReady, settingsManager, modelRegistry, env = process.env, }) {
|
|
14
|
+
const defaultProvider = settingsManager.getDefaultProvider();
|
|
15
|
+
if (!shouldMigrateAnthropicToClaudeCode({ authStorage, isClaudeCodeReady, defaultProvider, env })) {
|
|
16
|
+
return false;
|
|
17
|
+
}
|
|
18
|
+
const defaultModel = settingsManager.getDefaultModel();
|
|
19
|
+
const target = modelRegistry.getAvailable().find((model) => model.provider === "claude-code" && model.id === defaultModel) ||
|
|
20
|
+
modelRegistry.getAvailable().find((model) => model.provider === "claude-code");
|
|
21
|
+
if (!target) {
|
|
22
|
+
return false;
|
|
23
|
+
}
|
|
24
|
+
settingsManager.setDefaultModelAndProvider(target.provider, target.id);
|
|
25
|
+
return true;
|
|
26
|
+
}
|
|
@@ -18,10 +18,11 @@ import { execFileSync } from "node:child_process";
|
|
|
18
18
|
const CLAUDE_COMMAND = process.platform === "win32" ? "claude.cmd" : "claude";
|
|
19
19
|
/**
|
|
20
20
|
* Windows installs vary: some environments expose `claude.cmd` (npm shim),
|
|
21
|
-
*
|
|
22
|
-
* Try
|
|
21
|
+
* `claude.exe` (direct binary install), or a bare `claude` shim on PATH
|
|
22
|
+
* (for example Git Bash wrappers). Try all three to avoid false "not
|
|
23
|
+
* installed" results in readiness checks.
|
|
23
24
|
*/
|
|
24
|
-
const CLAUDE_COMMAND_CANDIDATES = process.platform === "win32" ? [CLAUDE_COMMAND, "claude"] : [CLAUDE_COMMAND];
|
|
25
|
+
const CLAUDE_COMMAND_CANDIDATES = process.platform === "win32" ? [CLAUDE_COMMAND, "claude.exe", "claude"] : [CLAUDE_COMMAND];
|
|
25
26
|
function execClaude(args) {
|
|
26
27
|
let lastError;
|
|
27
28
|
for (const command of CLAUDE_COMMAND_CANDIDATES) {
|
|
@@ -3,8 +3,9 @@
|
|
|
3
3
|
*
|
|
4
4
|
* The SDK runs the full agentic loop (multi-turn, tool execution, compaction)
|
|
5
5
|
* in one call. This adapter translates the SDK's streaming output into
|
|
6
|
-
* AssistantMessageEvents for TUI rendering, then
|
|
7
|
-
* the final AssistantMessage so
|
|
6
|
+
* AssistantMessageEvents for TUI rendering, then preserves externally executed
|
|
7
|
+
* tool-call blocks on the final AssistantMessage so Agent Core can render them
|
|
8
|
+
* while `externalToolExecution` prevents local redispatch.
|
|
8
9
|
*/
|
|
9
10
|
import { EventStream } from "@gsd/pi-ai";
|
|
10
11
|
import { execSync } from "node:child_process";
|
|
@@ -484,24 +485,32 @@ export function makeAbortedMessage(model, lastTextContent) {
|
|
|
484
485
|
/**
|
|
485
486
|
* Resolve the Claude Code permission mode for the current run.
|
|
486
487
|
*
|
|
487
|
-
*
|
|
488
|
-
*
|
|
489
|
-
*
|
|
490
|
-
*
|
|
491
|
-
*
|
|
492
|
-
*
|
|
493
|
-
* users opt into a stricter mode (`acceptEdits`, `default`, `plan`).
|
|
488
|
+
* Defaults to `acceptEdits`, which auto-approves file reads/edits but
|
|
489
|
+
* surfaces a permission dialog for dangerous operations (e.g. general Bash,
|
|
490
|
+
* Agent, WebFetch). This prevents tools outside the allowlist from being
|
|
491
|
+
* silently denied — the SDK emits an `extension_ui_request` event so the
|
|
492
|
+
* user sees a prompt instead of a silent refusal that Claude Code mistakes
|
|
493
|
+
* for user rejection (#4383).
|
|
494
494
|
*
|
|
495
|
-
*
|
|
496
|
-
*
|
|
497
|
-
*
|
|
498
|
-
*
|
|
495
|
+
* Set `GSD_CLAUDE_CODE_PERMISSION_MODE` to `bypassPermissions` to restore
|
|
496
|
+
* the old always-approve behaviour, or to `default` / `plan` for stricter
|
|
497
|
+
* modes.
|
|
498
|
+
*
|
|
499
|
+
* When `GSD_HEADLESS=1` is set (auto-mode / non-interactive runs), the
|
|
500
|
+
* default flips to `bypassPermissions` because there is no UI to approve
|
|
501
|
+
* permission dialogs — `acceptEdits` would hang verification commands like
|
|
502
|
+
* `npx tsc --noEmit` or `npx vitest run` indefinitely (#4657). Explicit
|
|
503
|
+
* overrides still win, so users can opt back into `acceptEdits` in headless.
|
|
499
504
|
*/
|
|
500
505
|
export async function resolveClaudePermissionMode(env = process.env) {
|
|
501
506
|
const override = env.GSD_CLAUDE_CODE_PERMISSION_MODE?.trim();
|
|
502
507
|
if (override === "bypassPermissions" || override === "acceptEdits" || override === "default" || override === "plan") {
|
|
503
508
|
return override;
|
|
504
509
|
}
|
|
510
|
+
if (env.GSD_HEADLESS === "1") {
|
|
511
|
+
console.warn("[claude-code-cli] Headless mode detected (GSD_HEADLESS=1): defaulting permissionMode to 'bypassPermissions' so verification Bash commands can run. Set GSD_CLAUDE_CODE_PERMISSION_MODE=acceptEdits to opt out.");
|
|
512
|
+
return "bypassPermissions";
|
|
513
|
+
}
|
|
505
514
|
return "bypassPermissions";
|
|
506
515
|
}
|
|
507
516
|
// NOTE: These helpers intentionally mirror @gsd/pi-ai anthropic-shared
|
|
@@ -555,20 +564,24 @@ export function buildSdkOptions(modelId, prompt, overrides, extraOptions = {}) {
|
|
|
555
564
|
const { reasoning, ...sdkExtraOptions } = extraOptions;
|
|
556
565
|
const mcpServers = buildWorkflowMcpServers();
|
|
557
566
|
const permissionMode = overrides?.permissionMode ?? "bypassPermissions";
|
|
558
|
-
|
|
559
|
-
//
|
|
560
|
-
//
|
|
561
|
-
//
|
|
562
|
-
// every `
|
|
563
|
-
//
|
|
567
|
+
// Globally unblock all tools. Users reported that the `acceptEdits` default
|
|
568
|
+
// plus a narrow allowlist silently declined most Bash/Agent/WebFetch calls
|
|
569
|
+
// when `extensionUIContext` wasn't threaded through. Default to
|
|
570
|
+
// bypassPermissions and an empty disallow list so every tool — including
|
|
571
|
+
// `AskUserQuestion` and every `mcp__*` workflow tool — is auto-approved.
|
|
572
|
+
// Opt back into gated mode with GSD_CLAUDE_CODE_PERMISSION_MODE=acceptEdits.
|
|
573
|
+
const disallowedTools = [];
|
|
564
574
|
const allowedTools = [
|
|
565
575
|
"Read",
|
|
566
576
|
"Write",
|
|
567
577
|
"Edit",
|
|
568
578
|
"Glob",
|
|
569
579
|
"Grep",
|
|
570
|
-
"Bash
|
|
571
|
-
"
|
|
580
|
+
"Bash",
|
|
581
|
+
"Agent",
|
|
582
|
+
"WebFetch",
|
|
583
|
+
"WebSearch",
|
|
584
|
+
"AskUserQuestion",
|
|
572
585
|
...(mcpServers ? Object.keys(mcpServers).map((serverName) => `mcp__${serverName}__*`) : []),
|
|
573
586
|
];
|
|
574
587
|
const supportsAdaptive = modelSupportsAdaptiveThinking(modelId);
|
|
@@ -755,6 +768,39 @@ function attachExternalResultsToToolBlocks(toolBlocks, toolResultsById) {
|
|
|
755
768
|
block.externalResult = externalResult;
|
|
756
769
|
}
|
|
757
770
|
}
|
|
771
|
+
/**
|
|
772
|
+
* Build the final assistant content that Agent Core consumes in
|
|
773
|
+
* `externalToolExecution` mode. This preserves tool-call blocks, attaches any
|
|
774
|
+
* SDK-produced external results by tool-call id, and then appends the final
|
|
775
|
+
* text/thinking blocks for the completed turn.
|
|
776
|
+
*/
|
|
777
|
+
export function buildFinalAssistantContent(params) {
|
|
778
|
+
const mergedToolBlocks = [...params.intermediateToolBlocks];
|
|
779
|
+
if (params.pendingContent) {
|
|
780
|
+
mergePendingToolCalls(mergedToolBlocks, params.pendingContent);
|
|
781
|
+
}
|
|
782
|
+
attachExternalResultsToToolBlocks(mergedToolBlocks, params.toolResultsById);
|
|
783
|
+
const finalContent = [...mergedToolBlocks];
|
|
784
|
+
if (params.pendingContent && params.pendingContent.length > 0) {
|
|
785
|
+
for (const block of params.pendingContent) {
|
|
786
|
+
if (block.type === "text" || block.type === "thinking") {
|
|
787
|
+
finalContent.push(block);
|
|
788
|
+
}
|
|
789
|
+
}
|
|
790
|
+
}
|
|
791
|
+
else {
|
|
792
|
+
if (params.lastThinkingContent) {
|
|
793
|
+
finalContent.push({ type: "thinking", thinking: params.lastThinkingContent });
|
|
794
|
+
}
|
|
795
|
+
if (params.lastTextContent) {
|
|
796
|
+
finalContent.push({ type: "text", text: params.lastTextContent });
|
|
797
|
+
}
|
|
798
|
+
}
|
|
799
|
+
if (finalContent.length === 0 && params.fallbackResultText) {
|
|
800
|
+
finalContent.push({ type: "text", text: params.fallbackResultText });
|
|
801
|
+
}
|
|
802
|
+
return finalContent;
|
|
803
|
+
}
|
|
758
804
|
/**
|
|
759
805
|
* Merge tool-call blocks from the active partial-message builder into the
|
|
760
806
|
* running list of intermediate tool calls, preserving order and de-duping
|
|
@@ -784,8 +830,9 @@ export function mergePendingToolCalls(intermediate, pending) {
|
|
|
784
830
|
* GSD streamSimple function that delegates to the Claude Agent SDK.
|
|
785
831
|
*
|
|
786
832
|
* Emits AssistantMessageEvent deltas for real-time TUI rendering
|
|
787
|
-
* (thinking, text, tool calls). The final AssistantMessage
|
|
788
|
-
*
|
|
833
|
+
* (thinking, text, tool calls). The final AssistantMessage preserves
|
|
834
|
+
* SDK-executed tool-call blocks for Agent Core's `externalToolExecution`
|
|
835
|
+
* path, which renders the results without dispatching the tools locally.
|
|
789
836
|
*/
|
|
790
837
|
export function streamViaClaudeCode(model, context, options) {
|
|
791
838
|
const stream = createAssistantStream();
|
|
@@ -948,42 +995,14 @@ async function pumpSdkMessages(model, context, options, stream) {
|
|
|
948
995
|
// -- Result (terminal) --
|
|
949
996
|
case "result": {
|
|
950
997
|
const result = msg;
|
|
951
|
-
|
|
952
|
-
|
|
953
|
-
|
|
954
|
-
|
|
955
|
-
|
|
956
|
-
|
|
957
|
-
|
|
958
|
-
|
|
959
|
-
// `intermediateToolBlocks`. Fold them in here so they aren't
|
|
960
|
-
// dropped from the final AssistantMessage.
|
|
961
|
-
if (builder) {
|
|
962
|
-
mergePendingToolCalls(intermediateToolBlocks, builder.message.content);
|
|
963
|
-
}
|
|
964
|
-
// Add tool calls from intermediate turns first (renders above text)
|
|
965
|
-
attachExternalResultsToToolBlocks(intermediateToolBlocks, toolResultsById);
|
|
966
|
-
finalContent.push(...intermediateToolBlocks);
|
|
967
|
-
// Add text/thinking from the last turn
|
|
968
|
-
if (builder && builder.message.content.length > 0) {
|
|
969
|
-
for (const block of builder.message.content) {
|
|
970
|
-
if (block.type === "text" || block.type === "thinking") {
|
|
971
|
-
finalContent.push(block);
|
|
972
|
-
}
|
|
973
|
-
}
|
|
974
|
-
}
|
|
975
|
-
else {
|
|
976
|
-
if (lastThinkingContent) {
|
|
977
|
-
finalContent.push({ type: "thinking", thinking: lastThinkingContent });
|
|
978
|
-
}
|
|
979
|
-
if (lastTextContent) {
|
|
980
|
-
finalContent.push({ type: "text", text: lastTextContent });
|
|
981
|
-
}
|
|
982
|
-
}
|
|
983
|
-
// Fallback: use the SDK's result text if we have no content
|
|
984
|
-
if (finalContent.length === 0 && result.subtype === "success" && result.result) {
|
|
985
|
-
finalContent.push({ type: "text", text: result.result });
|
|
986
|
-
}
|
|
998
|
+
const finalContent = buildFinalAssistantContent({
|
|
999
|
+
intermediateToolBlocks,
|
|
1000
|
+
pendingContent: builder?.message.content,
|
|
1001
|
+
toolResultsById,
|
|
1002
|
+
lastThinkingContent,
|
|
1003
|
+
lastTextContent,
|
|
1004
|
+
fallbackResultText: result.subtype === "success" && result.result ? result.result : undefined,
|
|
1005
|
+
});
|
|
987
1006
|
const finalMessage = {
|
|
988
1007
|
role: "assistant",
|
|
989
1008
|
content: finalContent,
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { execFileSync, spawn } from "node:child_process";
|
|
2
2
|
import { existsSync } from "node:fs";
|
|
3
|
+
import { CMUX_CHANNELS } from "../shared/cmux-events.js";
|
|
3
4
|
const DEFAULT_SOCKET_PATH = "/tmp/cmux.sock";
|
|
4
5
|
const STATUS_KEY = "gsd";
|
|
5
6
|
const lastSidebarSnapshots = new Map();
|
|
@@ -382,3 +383,22 @@ function extractSurfaceIds(value) {
|
|
|
382
383
|
visit(value);
|
|
383
384
|
return Array.from(found);
|
|
384
385
|
}
|
|
386
|
+
/**
|
|
387
|
+
* Wire event subscriptions so cmux reacts to gsd events.
|
|
388
|
+
* Called by the gsd extension during registration, passing pi.events.
|
|
389
|
+
*/
|
|
390
|
+
export function initCmuxEventListeners(events) {
|
|
391
|
+
events.on(CMUX_CHANNELS.SIDEBAR, (data) => {
|
|
392
|
+
const event = data;
|
|
393
|
+
if (event.action === "sync" && event.state) {
|
|
394
|
+
syncCmuxSidebar(event.preferences, event.state);
|
|
395
|
+
}
|
|
396
|
+
if (event.action === "clear") {
|
|
397
|
+
clearCmuxSidebar(event.preferences);
|
|
398
|
+
}
|
|
399
|
+
});
|
|
400
|
+
events.on(CMUX_CHANNELS.LOG, (data) => {
|
|
401
|
+
const event = data;
|
|
402
|
+
logCmuxEvent(event.preferences, event.message, event.level);
|
|
403
|
+
});
|
|
404
|
+
}
|
|
@@ -116,3 +116,106 @@ export function formatSummaryComment(data) {
|
|
|
116
116
|
}
|
|
117
117
|
return lines.join("\n");
|
|
118
118
|
}
|
|
119
|
+
export const SWARM_LANE_LABELS = {
|
|
120
|
+
workflow: "lane/workflow",
|
|
121
|
+
state: "lane/state",
|
|
122
|
+
writer: "lane/writer",
|
|
123
|
+
uok: "lane/uok",
|
|
124
|
+
github: "lane/github",
|
|
125
|
+
};
|
|
126
|
+
function checkedList(items, emptyLabel) {
|
|
127
|
+
if (!items?.length)
|
|
128
|
+
return [`- [ ] ${emptyLabel}`];
|
|
129
|
+
return items.map((item) => `- [ ] ${item}`);
|
|
130
|
+
}
|
|
131
|
+
export function formatSwarmLanePRBody(data) {
|
|
132
|
+
const lines = [];
|
|
133
|
+
const laneLabel = SWARM_LANE_LABELS[data.lane.id];
|
|
134
|
+
lines.push("## Swarm lane");
|
|
135
|
+
lines.push("");
|
|
136
|
+
lines.push(`**Lane:** \`${laneLabel}\``);
|
|
137
|
+
lines.push(`**Branch:** \`${data.lane.branch}\``);
|
|
138
|
+
if (data.lane.owner)
|
|
139
|
+
lines.push(`**Owner:** ${data.lane.owner}`);
|
|
140
|
+
if (data.lane.latestCommit)
|
|
141
|
+
lines.push(`**Latest commit:** \`${data.lane.latestCommit}\``);
|
|
142
|
+
lines.push("");
|
|
143
|
+
lines.push("## Impact area");
|
|
144
|
+
lines.push("");
|
|
145
|
+
lines.push(data.impactArea);
|
|
146
|
+
lines.push("");
|
|
147
|
+
lines.push("## Changed contracts");
|
|
148
|
+
lines.push(...checkedList(data.lane.changedContracts, "No shared contracts changed"));
|
|
149
|
+
lines.push("");
|
|
150
|
+
lines.push("## Transition risks");
|
|
151
|
+
lines.push(...checkedList(data.transitionRisks, "No transition risks identified"));
|
|
152
|
+
lines.push("");
|
|
153
|
+
lines.push("## Rollback plan");
|
|
154
|
+
lines.push(...checkedList(data.rollbackPlan, "Revert this lane PR"));
|
|
155
|
+
lines.push("");
|
|
156
|
+
lines.push("## Test evidence");
|
|
157
|
+
lines.push(...checkedList(data.lane.testEvidence, "Test evidence pending"));
|
|
158
|
+
lines.push("");
|
|
159
|
+
if (data.lane.blockers?.length) {
|
|
160
|
+
lines.push("## Blockers");
|
|
161
|
+
for (const blocker of data.lane.blockers)
|
|
162
|
+
lines.push(`- ${blocker}`);
|
|
163
|
+
lines.push("");
|
|
164
|
+
}
|
|
165
|
+
if (data.linkedIssue) {
|
|
166
|
+
lines.push(`Closes #${data.linkedIssue}`);
|
|
167
|
+
lines.push("");
|
|
168
|
+
}
|
|
169
|
+
lines.push("---");
|
|
170
|
+
lines.push("*Auto-generated by GSD GitHub Sync swarm routines*");
|
|
171
|
+
return lines.join("\n");
|
|
172
|
+
}
|
|
173
|
+
export function formatSwarmReleaseChecklistBody(data) {
|
|
174
|
+
const lines = [];
|
|
175
|
+
lines.push(`# UOK Swarm Release Checklist`);
|
|
176
|
+
lines.push("");
|
|
177
|
+
lines.push(`**Integration branch:** \`${data.integrationBranch}\``);
|
|
178
|
+
lines.push("");
|
|
179
|
+
lines.push("## Lane summary");
|
|
180
|
+
lines.push("");
|
|
181
|
+
lines.push("| Lane | Branch | Owner | Commit | Status |");
|
|
182
|
+
lines.push("|------|--------|-------|--------|--------|");
|
|
183
|
+
for (const lane of data.lanes) {
|
|
184
|
+
const owner = lane.owner ?? "";
|
|
185
|
+
const commit = lane.latestCommit ? `\`${lane.latestCommit}\`` : "";
|
|
186
|
+
const status = lane.blockers?.length ? "blocked" : "ready";
|
|
187
|
+
lines.push(`| \`${SWARM_LANE_LABELS[lane.id]}\` | \`${lane.branch}\` | ${owner} | ${commit} | ${status} |`);
|
|
188
|
+
}
|
|
189
|
+
lines.push("");
|
|
190
|
+
lines.push("## Required evidence");
|
|
191
|
+
lines.push("- [ ] Changed contracts summarized");
|
|
192
|
+
lines.push("- [ ] Transition matrix diff attached or linked");
|
|
193
|
+
lines.push("- [ ] Writer sequence proof attached or linked");
|
|
194
|
+
lines.push("- [ ] UOK parity report attached or linked");
|
|
195
|
+
lines.push("- [ ] Rollback drill evidence attached or linked");
|
|
196
|
+
lines.push("");
|
|
197
|
+
if (data.requiredChecks?.length) {
|
|
198
|
+
lines.push("## Required checks");
|
|
199
|
+
for (const check of data.requiredChecks)
|
|
200
|
+
lines.push(`- [ ] ${check}`);
|
|
201
|
+
lines.push("");
|
|
202
|
+
}
|
|
203
|
+
lines.push("## Parity report");
|
|
204
|
+
lines.push(data.parityReport ?? "Pending.");
|
|
205
|
+
lines.push("");
|
|
206
|
+
lines.push("## Rollback drill");
|
|
207
|
+
lines.push(data.rollbackDrill ?? "Pending.");
|
|
208
|
+
lines.push("");
|
|
209
|
+
lines.push("## Open risks");
|
|
210
|
+
if (data.openRisks?.length) {
|
|
211
|
+
for (const risk of data.openRisks)
|
|
212
|
+
lines.push(`- ${risk}`);
|
|
213
|
+
}
|
|
214
|
+
else {
|
|
215
|
+
lines.push("None.");
|
|
216
|
+
}
|
|
217
|
+
lines.push("");
|
|
218
|
+
lines.push("---");
|
|
219
|
+
lines.push("*Auto-generated by GSD GitHub Sync swarm routines*");
|
|
220
|
+
return lines.join("\n");
|
|
221
|
+
}
|
|
@@ -1,12 +1,13 @@
|
|
|
1
1
|
{
|
|
2
2
|
"id": "google-search",
|
|
3
|
-
"name": "Google Search",
|
|
3
|
+
"name": "Google Search (deprecated stub)",
|
|
4
4
|
"version": "1.0.0",
|
|
5
|
-
"description": "
|
|
5
|
+
"description": "Deprecation stub. The google_search tool moved to @gsd-extensions/google-search. Install with: gsd extensions install @gsd-extensions/google-search",
|
|
6
6
|
"tier": "bundled",
|
|
7
|
+
"deprecated": true,
|
|
7
8
|
"requires": { "platform": ">=2.29.0" },
|
|
8
9
|
"provides": {
|
|
9
|
-
"tools": [
|
|
10
|
-
"hooks": ["session_start"
|
|
10
|
+
"tools": [],
|
|
11
|
+
"hooks": ["session_start"]
|
|
11
12
|
}
|
|
12
13
|
}
|