@cluesmith/codev 3.2.4 → 3.3.1
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/dashboard-dist/assets/index-BZRTEMtH.css +32 -0
- package/dashboard-dist/assets/{index-BZ1x7x1X.js → index-D3XaKpZW.js} +46 -44
- package/dashboard-dist/assets/index-D3XaKpZW.js.map +1 -0
- package/dashboard-dist/index.html +2 -2
- package/dist/agent-farm/cli.d.ts.map +1 -1
- package/dist/agent-farm/cli.js +154 -0
- package/dist/agent-farm/cli.js.map +1 -1
- package/dist/agent-farm/commands/cleanup.d.ts.map +1 -1
- package/dist/agent-farm/commands/cleanup.js +16 -0
- package/dist/agent-farm/commands/cleanup.js.map +1 -1
- package/dist/agent-farm/commands/inbox.d.ts +42 -0
- package/dist/agent-farm/commands/inbox.d.ts.map +1 -0
- package/dist/agent-farm/commands/inbox.js +129 -0
- package/dist/agent-farm/commands/inbox.js.map +1 -0
- package/dist/agent-farm/commands/interrupt.d.ts +20 -0
- package/dist/agent-farm/commands/interrupt.d.ts.map +1 -0
- package/dist/agent-farm/commands/interrupt.js +65 -0
- package/dist/agent-farm/commands/interrupt.js.map +1 -0
- package/dist/agent-farm/commands/reset/constants.d.ts +52 -0
- package/dist/agent-farm/commands/reset/constants.d.ts.map +1 -0
- package/dist/agent-farm/commands/reset/constants.js +52 -0
- package/dist/agent-farm/commands/reset/constants.js.map +1 -0
- package/dist/agent-farm/commands/reset/context.d.ts +230 -0
- package/dist/agent-farm/commands/reset/context.d.ts.map +1 -0
- package/dist/agent-farm/commands/reset/context.js +428 -0
- package/dist/agent-farm/commands/reset/context.js.map +1 -0
- package/dist/agent-farm/commands/reset/index.d.ts +192 -0
- package/dist/agent-farm/commands/reset/index.d.ts.map +1 -0
- package/dist/agent-farm/commands/reset/index.js +488 -0
- package/dist/agent-farm/commands/reset/index.js.map +1 -0
- package/dist/agent-farm/commands/reset/receipt.d.ts +97 -0
- package/dist/agent-farm/commands/reset/receipt.d.ts.map +1 -0
- package/dist/agent-farm/commands/reset/receipt.js +149 -0
- package/dist/agent-farm/commands/reset/receipt.js.map +1 -0
- package/dist/agent-farm/commands/reset/reorient.d.ts +117 -0
- package/dist/agent-farm/commands/reset/reorient.d.ts.map +1 -0
- package/dist/agent-farm/commands/reset/reorient.js +313 -0
- package/dist/agent-farm/commands/reset/reorient.js.map +1 -0
- package/dist/agent-farm/commands/reset.d.ts +34 -0
- package/dist/agent-farm/commands/reset.d.ts.map +1 -0
- package/dist/agent-farm/commands/reset.js +309 -0
- package/dist/agent-farm/commands/reset.js.map +1 -0
- package/dist/agent-farm/commands/send.d.ts.map +1 -1
- package/dist/agent-farm/commands/send.js +49 -8
- package/dist/agent-farm/commands/send.js.map +1 -1
- package/dist/agent-farm/commands/spawn-worktree.d.ts +105 -6
- package/dist/agent-farm/commands/spawn-worktree.d.ts.map +1 -1
- package/dist/agent-farm/commands/spawn-worktree.js +289 -66
- package/dist/agent-farm/commands/spawn-worktree.js.map +1 -1
- package/dist/agent-farm/commands/spawn.d.ts.map +1 -1
- package/dist/agent-farm/commands/spawn.js +13 -1
- package/dist/agent-farm/commands/spawn.js.map +1 -1
- package/dist/agent-farm/commands/status.d.ts.map +1 -1
- package/dist/agent-farm/commands/status.js +80 -8
- package/dist/agent-farm/commands/status.js.map +1 -1
- package/dist/agent-farm/commands/tower.d.ts.map +1 -1
- package/dist/agent-farm/commands/tower.js +13 -0
- package/dist/agent-farm/commands/tower.js.map +1 -1
- package/dist/agent-farm/db/index.d.ts +1 -1
- package/dist/agent-farm/db/index.d.ts.map +1 -1
- package/dist/agent-farm/db/index.js +80 -1
- package/dist/agent-farm/db/index.js.map +1 -1
- package/dist/agent-farm/db/mailbox.d.ts +222 -0
- package/dist/agent-farm/db/mailbox.d.ts.map +1 -0
- package/dist/agent-farm/db/mailbox.js +304 -0
- package/dist/agent-farm/db/mailbox.js.map +1 -0
- package/dist/agent-farm/db/schema.d.ts +1 -1
- package/dist/agent-farm/db/schema.d.ts.map +1 -1
- package/dist/agent-farm/db/schema.js +35 -0
- package/dist/agent-farm/db/schema.js.map +1 -1
- package/dist/agent-farm/db/types.d.ts +45 -0
- package/dist/agent-farm/db/types.d.ts.map +1 -1
- package/dist/agent-farm/db/types.js.map +1 -1
- package/dist/agent-farm/lib/builder-lookup.d.ts +1 -1
- package/dist/agent-farm/lib/builder-lookup.js +2 -2
- package/dist/agent-farm/lib/builder-lookup.js.map +1 -1
- package/dist/agent-farm/lib/reconnect-backoff.d.ts +64 -0
- package/dist/agent-farm/lib/reconnect-backoff.d.ts.map +1 -0
- package/dist/agent-farm/lib/reconnect-backoff.js +57 -0
- package/dist/agent-farm/lib/reconnect-backoff.js.map +1 -0
- package/dist/agent-farm/lib/tower-client.d.ts +16 -6
- package/dist/agent-farm/lib/tower-client.d.ts.map +1 -1
- package/dist/agent-farm/lib/tower-client.js +37 -6
- package/dist/agent-farm/lib/tower-client.js.map +1 -1
- package/dist/agent-farm/lib/tunnel-client.d.ts +69 -1
- package/dist/agent-farm/lib/tunnel-client.d.ts.map +1 -1
- package/dist/agent-farm/lib/tunnel-client.js +225 -30
- package/dist/agent-farm/lib/tunnel-client.js.map +1 -1
- package/dist/agent-farm/servers/canvas-relay.d.ts +60 -0
- package/dist/agent-farm/servers/canvas-relay.d.ts.map +1 -0
- package/dist/agent-farm/servers/canvas-relay.js +376 -0
- package/dist/agent-farm/servers/canvas-relay.js.map +1 -0
- package/dist/agent-farm/servers/cron-delivery.d.ts +72 -0
- package/dist/agent-farm/servers/cron-delivery.d.ts.map +1 -0
- package/dist/agent-farm/servers/cron-delivery.js +80 -0
- package/dist/agent-farm/servers/cron-delivery.js.map +1 -0
- package/dist/agent-farm/servers/delayed-send.d.ts +85 -0
- package/dist/agent-farm/servers/delayed-send.d.ts.map +1 -0
- package/dist/agent-farm/servers/delayed-send.js +165 -0
- package/dist/agent-farm/servers/delayed-send.js.map +1 -0
- package/dist/agent-farm/servers/gate-profiles.d.ts +67 -0
- package/dist/agent-farm/servers/gate-profiles.d.ts.map +1 -0
- package/dist/agent-farm/servers/gate-profiles.js +113 -0
- package/dist/agent-farm/servers/gate-profiles.js.map +1 -0
- package/dist/agent-farm/servers/mailbox-delivery.d.ts +370 -0
- package/dist/agent-farm/servers/mailbox-delivery.d.ts.map +1 -0
- package/dist/agent-farm/servers/mailbox-delivery.js +617 -0
- package/dist/agent-farm/servers/mailbox-delivery.js.map +1 -0
- package/dist/agent-farm/servers/mailbox-wiring.d.ts +125 -0
- package/dist/agent-farm/servers/mailbox-wiring.d.ts.map +1 -0
- package/dist/agent-farm/servers/mailbox-wiring.js +425 -0
- package/dist/agent-farm/servers/mailbox-wiring.js.map +1 -0
- package/dist/agent-farm/servers/message-write.d.ts +53 -1
- package/dist/agent-farm/servers/message-write.d.ts.map +1 -1
- package/dist/agent-farm/servers/message-write.js +63 -0
- package/dist/agent-farm/servers/message-write.js.map +1 -1
- package/dist/agent-farm/servers/overview.d.ts +19 -0
- package/dist/agent-farm/servers/overview.d.ts.map +1 -1
- package/dist/agent-farm/servers/overview.js +100 -4
- package/dist/agent-farm/servers/overview.js.map +1 -1
- package/dist/agent-farm/servers/render-gate.d.ts +141 -0
- package/dist/agent-farm/servers/render-gate.d.ts.map +1 -0
- package/dist/agent-farm/servers/render-gate.js +251 -0
- package/dist/agent-farm/servers/render-gate.js.map +1 -0
- package/dist/agent-farm/servers/session-submit.d.ts +90 -0
- package/dist/agent-farm/servers/session-submit.d.ts.map +1 -0
- package/dist/agent-farm/servers/session-submit.js +127 -0
- package/dist/agent-farm/servers/session-submit.js.map +1 -0
- package/dist/agent-farm/servers/tower-cron.d.ts +10 -7
- package/dist/agent-farm/servers/tower-cron.d.ts.map +1 -1
- package/dist/agent-farm/servers/tower-cron.js +58 -53
- package/dist/agent-farm/servers/tower-cron.js.map +1 -1
- package/dist/agent-farm/servers/tower-instances.d.ts +14 -2
- package/dist/agent-farm/servers/tower-instances.d.ts.map +1 -1
- package/dist/agent-farm/servers/tower-instances.js +78 -16
- package/dist/agent-farm/servers/tower-instances.js.map +1 -1
- package/dist/agent-farm/servers/tower-messages.d.ts +38 -1
- package/dist/agent-farm/servers/tower-messages.d.ts.map +1 -1
- package/dist/agent-farm/servers/tower-messages.js +106 -1
- package/dist/agent-farm/servers/tower-messages.js.map +1 -1
- package/dist/agent-farm/servers/tower-routes.d.ts +16 -4
- package/dist/agent-farm/servers/tower-routes.d.ts.map +1 -1
- package/dist/agent-farm/servers/tower-routes.js +826 -145
- package/dist/agent-farm/servers/tower-routes.js.map +1 -1
- package/dist/agent-farm/servers/tower-server.js +188 -34
- package/dist/agent-farm/servers/tower-server.js.map +1 -1
- package/dist/agent-farm/servers/tower-terminals.d.ts +23 -2
- package/dist/agent-farm/servers/tower-terminals.d.ts.map +1 -1
- package/dist/agent-farm/servers/tower-terminals.js +134 -127
- package/dist/agent-farm/servers/tower-terminals.js.map +1 -1
- package/dist/agent-farm/servers/tower-tunnel.d.ts.map +1 -1
- package/dist/agent-farm/servers/tower-tunnel.js +63 -4
- package/dist/agent-farm/servers/tower-tunnel.js.map +1 -1
- package/dist/agent-farm/servers/tower-types.d.ts +2 -1
- package/dist/agent-farm/servers/tower-types.d.ts.map +1 -1
- package/dist/agent-farm/servers/tower-utils.d.ts +64 -1
- package/dist/agent-farm/servers/tower-utils.d.ts.map +1 -1
- package/dist/agent-farm/servers/tower-utils.js +168 -1
- package/dist/agent-farm/servers/tower-utils.js.map +1 -1
- package/dist/agent-farm/servers/tower-websocket.d.ts +6 -1
- package/dist/agent-farm/servers/tower-websocket.d.ts.map +1 -1
- package/dist/agent-farm/servers/tower-websocket.js +95 -57
- package/dist/agent-farm/servers/tower-websocket.js.map +1 -1
- package/dist/agent-farm/servers/write-queue.d.ts +35 -0
- package/dist/agent-farm/servers/write-queue.d.ts.map +1 -0
- package/dist/agent-farm/servers/write-queue.js +56 -0
- package/dist/agent-farm/servers/write-queue.js.map +1 -0
- package/dist/agent-farm/types.d.ts +39 -0
- package/dist/agent-farm/types.d.ts.map +1 -1
- package/dist/agent-farm/utils/agent-names.d.ts +2 -2
- package/dist/agent-farm/utils/agent-names.d.ts.map +1 -1
- package/dist/agent-farm/utils/agent-names.js +3 -3
- package/dist/agent-farm/utils/agent-names.js.map +1 -1
- package/dist/agent-farm/utils/architect-name.d.ts +2 -2
- package/dist/agent-farm/utils/architect-name.d.ts.map +1 -1
- package/dist/agent-farm/utils/architect-name.js +3 -3
- package/dist/agent-farm/utils/architect-name.js.map +1 -1
- package/dist/agent-farm/utils/config.d.ts +13 -0
- package/dist/agent-farm/utils/config.d.ts.map +1 -1
- package/dist/agent-farm/utils/config.js +33 -1
- package/dist/agent-farm/utils/config.js.map +1 -1
- package/dist/agent-farm/utils/harness.d.ts +103 -7
- package/dist/agent-farm/utils/harness.d.ts.map +1 -1
- package/dist/agent-farm/utils/harness.js +126 -19
- package/dist/agent-farm/utils/harness.js.map +1 -1
- package/dist/agent-farm/utils/message-format.d.ts +8 -0
- package/dist/agent-farm/utils/message-format.d.ts.map +1 -1
- package/dist/agent-farm/utils/message-format.js +20 -0
- package/dist/agent-farm/utils/message-format.js.map +1 -1
- package/dist/agent-farm/utils/server-utils.d.ts +80 -4
- package/dist/agent-farm/utils/server-utils.d.ts.map +1 -1
- package/dist/agent-farm/utils/server-utils.js +286 -5
- package/dist/agent-farm/utils/server-utils.js.map +1 -1
- package/dist/cli.d.ts.map +1 -1
- package/dist/cli.js +6 -32
- package/dist/cli.js.map +1 -1
- package/dist/commands/consult/cli-options.d.ts +34 -0
- package/dist/commands/consult/cli-options.d.ts.map +1 -0
- package/dist/commands/consult/cli-options.js +67 -0
- package/dist/commands/consult/cli-options.js.map +1 -0
- package/dist/commands/consult/index.d.ts +56 -2
- package/dist/commands/consult/index.d.ts.map +1 -1
- package/dist/commands/consult/index.js +272 -28
- package/dist/commands/consult/index.js.map +1 -1
- package/dist/commands/consult/metrics.d.ts +42 -0
- package/dist/commands/consult/metrics.d.ts.map +1 -1
- package/dist/commands/consult/metrics.js +129 -9
- package/dist/commands/consult/metrics.js.map +1 -1
- package/dist/commands/doctor.d.ts.map +1 -1
- package/dist/commands/doctor.js +71 -19
- package/dist/commands/doctor.js.map +1 -1
- package/dist/commands/porch/checks.d.ts +23 -0
- package/dist/commands/porch/checks.d.ts.map +1 -1
- package/dist/commands/porch/checks.js +60 -0
- package/dist/commands/porch/checks.js.map +1 -1
- package/dist/commands/porch/config.d.ts +20 -0
- package/dist/commands/porch/config.d.ts.map +1 -1
- package/dist/commands/porch/config.js +20 -0
- package/dist/commands/porch/config.js.map +1 -1
- package/dist/commands/porch/index.js +21 -28
- package/dist/commands/porch/index.js.map +1 -1
- package/dist/commands/porch/next.d.ts.map +1 -1
- package/dist/commands/porch/next.js +2 -41
- package/dist/commands/porch/next.js.map +1 -1
- package/dist/lib/config.d.ts +69 -3
- package/dist/lib/config.d.ts.map +1 -1
- package/dist/lib/config.js +67 -3
- package/dist/lib/config.js.map +1 -1
- package/dist/lib/consult-lanes.d.ts +149 -0
- package/dist/lib/consult-lanes.d.ts.map +1 -0
- package/dist/lib/consult-lanes.js +360 -0
- package/dist/lib/consult-lanes.js.map +1 -0
- package/dist/lib/forge-contracts.d.ts +9 -0
- package/dist/lib/forge-contracts.d.ts.map +1 -1
- package/dist/lib/forge-contracts.js.map +1 -1
- package/dist/lib/github.d.ts +15 -1
- package/dist/lib/github.d.ts.map +1 -1
- package/dist/lib/github.js +18 -1
- package/dist/lib/github.js.map +1 -1
- package/dist/lib/prompt-behavior-metrics.d.ts +67 -0
- package/dist/lib/prompt-behavior-metrics.d.ts.map +1 -0
- package/dist/lib/prompt-behavior-metrics.js +290 -0
- package/dist/lib/prompt-behavior-metrics.js.map +1 -0
- package/dist/lib/skeleton.d.ts +22 -1
- package/dist/lib/skeleton.d.ts.map +1 -1
- package/dist/lib/skeleton.js +120 -0
- package/dist/lib/skeleton.js.map +1 -1
- package/dist/lib/test-env.d.ts +74 -0
- package/dist/lib/test-env.d.ts.map +1 -0
- package/dist/lib/test-env.js +92 -0
- package/dist/lib/test-env.js.map +1 -0
- package/dist/terminal/attach-replay.d.ts +39 -0
- package/dist/terminal/attach-replay.d.ts.map +1 -0
- package/dist/terminal/attach-replay.js +76 -0
- package/dist/terminal/attach-replay.js.map +1 -0
- package/dist/terminal/pty-manager.d.ts +2 -0
- package/dist/terminal/pty-manager.d.ts.map +1 -1
- package/dist/terminal/pty-manager.js +51 -23
- package/dist/terminal/pty-manager.js.map +1 -1
- package/dist/terminal/pty-session.d.ts +201 -1
- package/dist/terminal/pty-session.d.ts.map +1 -1
- package/dist/terminal/pty-session.js +327 -46
- package/dist/terminal/pty-session.js.map +1 -1
- package/dist/terminal/ring-buffer.d.ts +39 -6
- package/dist/terminal/ring-buffer.d.ts.map +1 -1
- package/dist/terminal/ring-buffer.js +74 -6
- package/dist/terminal/ring-buffer.js.map +1 -1
- package/dist/terminal/session-manager.d.ts +53 -0
- package/dist/terminal/session-manager.d.ts.map +1 -1
- package/dist/terminal/session-manager.js +94 -9
- package/dist/terminal/session-manager.js.map +1 -1
- package/dist/terminal/session-screen.d.ts +116 -0
- package/dist/terminal/session-screen.d.ts.map +1 -0
- package/dist/terminal/session-screen.js +180 -0
- package/dist/terminal/session-screen.js.map +1 -0
- package/dist/terminal/shellper-main.js +2 -1
- package/dist/terminal/shellper-main.js.map +1 -1
- package/dist/terminal/shellper-process.d.ts +1 -1
- package/dist/terminal/shellper-process.d.ts.map +1 -1
- package/dist/terminal/shellper-process.js +17 -8
- package/dist/terminal/shellper-process.js.map +1 -1
- package/dist/terminal/shellper-replay-buffer.d.ts +69 -7
- package/dist/terminal/shellper-replay-buffer.d.ts.map +1 -1
- package/dist/terminal/shellper-replay-buffer.js +167 -31
- package/dist/terminal/shellper-replay-buffer.js.map +1 -1
- package/package.json +13 -8
- package/scripts/forge/gitea/pr-view.sh +4 -1
- package/scripts/forge/github/pr-view.sh +1 -1
- package/scripts/forge/gitlab/pr-view.sh +4 -1
- package/skeleton/.claude/skills/afx/SKILL.md +68 -1
- package/skeleton/.claude/skills/arch-init/SKILL.md +22 -9
- package/skeleton/.claude/skills/arch-save/SKILL.md +183 -0
- package/skeleton/.claude/skills/codev/SKILL.md +31 -0
- package/skeleton/.claude/skills/runnable-worktrees/SKILL.md +119 -0
- package/skeleton/.codex/skills/afx/SKILL.md +68 -1
- package/skeleton/.codex/skills/arch-init/SKILL.md +22 -9
- package/skeleton/.codex/skills/arch-save/SKILL.md +183 -0
- package/skeleton/.codex/skills/codev/SKILL.md +31 -0
- package/skeleton/.codex/skills/runnable-worktrees/SKILL.md +119 -0
- package/skeleton/protocols/air/builder-prompt.md +28 -47
- package/skeleton/protocols/air/consult-types/impl-review.md +17 -34
- package/skeleton/protocols/air/consult-types/pr-review.md +14 -37
- package/skeleton/protocols/air/prompts/implement.md +20 -73
- package/skeleton/protocols/air/prompts/pr.md +22 -54
- package/skeleton/protocols/air/protocol.md +40 -71
- package/skeleton/protocols/aspir/builder-prompt.md +29 -66
- package/skeleton/protocols/aspir/consult-types/impl-review.md +17 -44
- package/skeleton/protocols/aspir/consult-types/phase-review.md +17 -44
- package/skeleton/protocols/aspir/consult-types/plan-review.md +14 -38
- package/skeleton/protocols/aspir/consult-types/pr-review.md +13 -39
- package/skeleton/protocols/aspir/consult-types/spec-review.md +13 -33
- package/skeleton/protocols/aspir/prompts/implement.md +27 -196
- package/skeleton/protocols/aspir/prompts/plan.md +21 -85
- package/skeleton/protocols/aspir/prompts/review.md +29 -228
- package/skeleton/protocols/aspir/prompts/specify.md +25 -111
- package/skeleton/protocols/aspir/protocol.json +10 -0
- package/skeleton/protocols/aspir/protocol.md +36 -82
- package/skeleton/protocols/bugfix/builder-prompt.md +23 -45
- package/skeleton/protocols/bugfix/consult-types/impl-review.md +21 -45
- package/skeleton/protocols/bugfix/consult-types/pr-review.md +18 -52
- package/skeleton/protocols/bugfix/prompts/fix.md +16 -61
- package/skeleton/protocols/bugfix/prompts/investigate.md +18 -62
- package/skeleton/protocols/bugfix/prompts/pr.md +22 -57
- package/skeleton/protocols/bugfix/protocol.md +44 -50
- package/skeleton/protocols/experiment/builder-prompt.md +25 -58
- package/skeleton/protocols/experiment/protocol.md +22 -188
- package/skeleton/protocols/experiment/templates/notes.md +11 -71
- package/skeleton/protocols/maintain/builder-prompt.md +24 -45
- package/skeleton/protocols/maintain/consult-types/impl-review.md +17 -44
- package/skeleton/protocols/maintain/consult-types/pr-review.md +13 -39
- package/skeleton/protocols/maintain/prompts/maintain.md +1 -1
- package/skeleton/protocols/maintain/protocol.md +32 -266
- package/skeleton/protocols/maintain/templates/maintenance-run.md +11 -0
- package/skeleton/protocols/pir/builder-prompt.md +31 -64
- package/skeleton/protocols/pir/consult-types/impl-review.md +17 -50
- package/skeleton/protocols/pir/consult-types/pr-review.md +11 -40
- package/skeleton/protocols/pir/prompts/implement.md +2 -3
- package/skeleton/protocols/pir/prompts/plan.md +1 -4
- package/skeleton/protocols/pir/prompts/review.md +2 -2
- package/skeleton/protocols/pir/protocol.md +54 -177
- package/skeleton/protocols/research/builder-prompt.md +27 -58
- package/skeleton/protocols/research/protocol.md +28 -153
- package/skeleton/protocols/spike/builder-prompt.md +30 -48
- package/skeleton/protocols/spike/protocol.md +24 -107
- package/skeleton/protocols/spike/templates/findings.md +9 -39
- package/skeleton/protocols/spir/builder-prompt.md +33 -62
- package/skeleton/protocols/spir/consult-types/impl-review.md +17 -44
- package/skeleton/protocols/spir/consult-types/phase-review.md +17 -44
- package/skeleton/protocols/spir/consult-types/plan-review.md +14 -38
- package/skeleton/protocols/spir/consult-types/pr-review.md +13 -39
- package/skeleton/protocols/spir/consult-types/spec-review.md +13 -33
- package/skeleton/protocols/spir/prompts/implement.md +26 -195
- package/skeleton/protocols/spir/prompts/plan.md +20 -84
- package/skeleton/protocols/spir/prompts/review.md +28 -227
- package/skeleton/protocols/spir/prompts/specify.md +24 -110
- package/skeleton/protocols/spir/protocol.json +10 -0
- package/skeleton/protocols/spir/protocol.md +84 -633
- package/skeleton/protocols/spir/templates/plan.md +28 -147
- package/skeleton/protocols/spir/templates/review.md +21 -80
- package/skeleton/protocols/spir/templates/spec.md +24 -118
- package/skeleton/resources/commands/agent-farm.md +262 -0
- package/skeleton/resources/commands/consult.md +236 -8
- package/skeleton/resources/commands/overview.md +1 -0
- package/skeleton/roles/architect.md +67 -317
- package/skeleton/roles/builder.md +76 -191
- package/skeleton/templates/AGENTS.md +2 -0
- package/skeleton/templates/CLAUDE.md +2 -0
- package/templates/3d-viewer.html +32 -4
- package/templates/open.html +58 -12
- package/templates/tower.html +65 -9
- package/templates/vendor/three-3MFLoader.js +1478 -0
- package/templates/vendor/three-STLLoader.js +410 -0
- package/templates/vendor/three-TrackballControls.js +828 -0
- package/templates/vendor/three-fflate.module.js +2474 -0
- package/templates/vendor/three.module.js +53044 -0
- package/dashboard-dist/assets/index-BZ1x7x1X.js.map +0 -1
- package/dashboard-dist/assets/index-DB1KBSNE.css +0 -32
- package/dist/agent-farm/servers/send-buffer.d.ts +0 -59
- package/dist/agent-farm/servers/send-buffer.d.ts.map +0 -1
- package/dist/agent-farm/servers/send-buffer.js +0 -116
- package/dist/agent-farm/servers/send-buffer.js.map +0 -1
- package/skeleton/porch/prompts/defend.md +0 -108
- package/skeleton/porch/prompts/diagnose.md +0 -70
- package/skeleton/porch/prompts/evaluate.md +0 -132
- package/skeleton/porch/prompts/fix.md +0 -59
- package/skeleton/porch/prompts/implement.md +0 -88
- package/skeleton/porch/prompts/plan.md +0 -74
- package/skeleton/porch/prompts/pr.md +0 -84
- package/skeleton/porch/prompts/review.md +0 -249
- package/skeleton/porch/prompts/specify.md +0 -53
- package/skeleton/porch/prompts/test.md +0 -63
- package/skeleton/protocols/aspir/templates/plan.md +0 -184
- package/skeleton/protocols/aspir/templates/review.md +0 -120
- package/skeleton/protocols/aspir/templates/spec.md +0 -154
|
@@ -6,9 +6,11 @@
|
|
|
6
6
|
* WebSocket upgrade routing (direct + workspace-scoped).
|
|
7
7
|
*/
|
|
8
8
|
import { WebSocket } from 'ws';
|
|
9
|
-
import { WS_CLOSE_SESSION_UNKNOWN } from '
|
|
9
|
+
import { WS_CLOSE_SESSION_UNKNOWN, WS_CLOSE_UNAUTHORIZED } from '../lib/reconnect-backoff.js';
|
|
10
|
+
import { isWebSocketAllowed } from '../utils/server-utils.js';
|
|
10
11
|
import { encodeData, encodeControl, decodeFrame } from '../../terminal/ws-protocol.js';
|
|
11
|
-
import {
|
|
12
|
+
import { attachWithReplay } from '../../terminal/attach-replay.js';
|
|
13
|
+
import { getTerminalManager, isStartupReconcileSettled, whenStartupReconcileSettled, logTerminal } from './tower-terminals.js';
|
|
12
14
|
import { normalizeWorkspacePath } from './tower-utils.js';
|
|
13
15
|
import { decodeWorkspacePath } from '../lib/tower-client.js';
|
|
14
16
|
import { addSubscriber, removeSubscriber } from './tower-messages.js';
|
|
@@ -26,8 +28,13 @@ const WS_HIGH_WATER_MARK = 1 * 1024 * 1024; // 1 MB
|
|
|
26
28
|
* Uses hybrid binary protocol (Spec 0085):
|
|
27
29
|
* - 0x00 prefix: Control frame (JSON)
|
|
28
30
|
* - 0x01 prefix: Data frame (raw PTY bytes)
|
|
31
|
+
*
|
|
32
|
+
* Async since PIR #1354: the replay payload is the session mirror's serialized
|
|
33
|
+
* O(screen) snapshot, whose parser flush awaits. Input/close handlers are
|
|
34
|
+
* registered BEFORE that await so the client can type during the flush and a
|
|
35
|
+
* close can never race the registration.
|
|
29
36
|
*/
|
|
30
|
-
export function handleTerminalWebSocket(ws, session, req) {
|
|
37
|
+
export async function handleTerminalWebSocket(ws, session, req) {
|
|
31
38
|
// Support resume via header (server-to-server) or query param (browser WebSocket)
|
|
32
39
|
const reqUrl = new URL(req.url || '/', `http://localhost`);
|
|
33
40
|
const resumeSeq = req.headers['x-session-resume'] || reqUrl.searchParams.get('resume');
|
|
@@ -41,52 +48,17 @@ export function handleTerminalWebSocket(ws, session, req) {
|
|
|
41
48
|
}
|
|
42
49
|
},
|
|
43
50
|
};
|
|
44
|
-
//
|
|
45
|
-
let
|
|
46
|
-
if (resumeSeq && typeof resumeSeq === 'string') {
|
|
47
|
-
replayLines = session.attachResume(client, parseInt(resumeSeq, 10));
|
|
48
|
-
}
|
|
49
|
-
else {
|
|
50
|
-
replayLines = session.attach(client);
|
|
51
|
-
}
|
|
52
|
-
// Send replay data as binary data frame, bracketed by pause/resume control
|
|
53
|
-
// frames (#1047). The bracket tells the client "this is the one-shot buffer
|
|
54
|
-
// snapshot" so it paces the write and excludes it from its live-backpressure
|
|
55
|
-
// budget. Without it, a client counts a large replay as live overload and
|
|
56
|
-
// (historically) looped forever reconnecting for the same oversized replay.
|
|
57
|
-
if (replayLines.length > 0) {
|
|
58
|
-
const replayData = replayLines.join('\n');
|
|
59
|
-
if (ws.readyState === WebSocket.OPEN) {
|
|
60
|
-
ws.send(encodeControl({ type: 'pause', payload: {} }));
|
|
61
|
-
ws.send(encodeData(replayData));
|
|
62
|
-
ws.send(encodeControl({ type: 'resume', payload: {} }));
|
|
63
|
-
}
|
|
64
|
-
}
|
|
65
|
-
// Send current sequence number so client can resume from this point (Bugfix #442)
|
|
66
|
-
const sendSeq = () => {
|
|
67
|
-
if (ws.readyState === WebSocket.OPEN) {
|
|
68
|
-
ws.send(encodeControl({ type: 'seq', payload: { seq: session.ringBuffer.currentSeq } }));
|
|
69
|
-
}
|
|
70
|
-
};
|
|
71
|
-
sendSeq();
|
|
72
|
-
// Periodic seq heartbeat so client always has a recent sequence number
|
|
73
|
-
const seqInterval = setInterval(sendSeq, 10_000);
|
|
51
|
+
// Created only after the replay lands; the close handler must tolerate null.
|
|
52
|
+
let seqInterval = null;
|
|
74
53
|
// Handle incoming messages from client (binary protocol)
|
|
75
54
|
ws.on('message', (rawData) => {
|
|
76
55
|
try {
|
|
77
56
|
const frame = decodeFrame(Buffer.from(rawData));
|
|
78
57
|
if (frame.type === 'data') {
|
|
79
|
-
//
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
if (data.includes('\r') || data.includes('\n')) {
|
|
84
|
-
session.stopComposing();
|
|
85
|
-
}
|
|
86
|
-
else {
|
|
87
|
-
session.startComposing();
|
|
88
|
-
}
|
|
89
|
-
session.write(data);
|
|
58
|
+
// Spec 403 typing-awareness + Bugfix #450 composing/submit detection are
|
|
59
|
+
// consolidated in PtySession.handleUserInput so every live input path stays
|
|
60
|
+
// consistent (Spec 1313 Phase 5 — its 'submit' fast trigger fires from there).
|
|
61
|
+
session.handleUserInput(frame.data.toString('utf-8'));
|
|
90
62
|
}
|
|
91
63
|
else if (frame.type === 'control') {
|
|
92
64
|
// Handle control messages
|
|
@@ -108,15 +80,7 @@ export function handleTerminalWebSocket(ws, session, req) {
|
|
|
108
80
|
catch {
|
|
109
81
|
// If decode fails, try treating as raw UTF-8 input (for simpler clients)
|
|
110
82
|
try {
|
|
111
|
-
session.
|
|
112
|
-
const rawStr = rawData.toString('utf-8');
|
|
113
|
-
if (rawStr.includes('\r') || rawStr.includes('\n')) {
|
|
114
|
-
session.stopComposing();
|
|
115
|
-
}
|
|
116
|
-
else {
|
|
117
|
-
session.startComposing();
|
|
118
|
-
}
|
|
119
|
-
session.write(rawStr);
|
|
83
|
+
session.handleUserInput(rawData.toString('utf-8'));
|
|
120
84
|
}
|
|
121
85
|
catch {
|
|
122
86
|
// Ignore malformed input
|
|
@@ -124,13 +88,54 @@ export function handleTerminalWebSocket(ws, session, req) {
|
|
|
124
88
|
}
|
|
125
89
|
});
|
|
126
90
|
ws.on('close', () => {
|
|
127
|
-
|
|
91
|
+
if (seqInterval)
|
|
92
|
+
clearInterval(seqInterval);
|
|
128
93
|
session.detach(client);
|
|
129
94
|
});
|
|
130
95
|
ws.on('error', () => {
|
|
131
|
-
|
|
96
|
+
if (seqInterval)
|
|
97
|
+
clearInterval(seqInterval);
|
|
132
98
|
session.detach(client);
|
|
133
99
|
});
|
|
100
|
+
// Attach and compute the replay payload: the O(screen) snapshot, or raw ring
|
|
101
|
+
// lines on the normal-buffer delta-resume path and on snapshot fallback
|
|
102
|
+
// (PIR #1354; routing and fallback logging live in attachWithReplay).
|
|
103
|
+
let sinceSeq = null;
|
|
104
|
+
if (resumeSeq && typeof resumeSeq === 'string') {
|
|
105
|
+
sinceSeq = parseInt(resumeSeq, 10);
|
|
106
|
+
}
|
|
107
|
+
const replay = await attachWithReplay(session, client, sinceSeq, logTerminal);
|
|
108
|
+
if (ws.readyState !== WebSocket.OPEN) {
|
|
109
|
+
// Closed while the snapshot flushed — undo the attach registration.
|
|
110
|
+
session.detach(client);
|
|
111
|
+
return;
|
|
112
|
+
}
|
|
113
|
+
// Send replay as a binary data frame, bracketed by pause/resume control
|
|
114
|
+
// frames (#1047). The bracket tells the client "this is the one-shot buffer
|
|
115
|
+
// snapshot" so it paces the write and excludes it from its live-backpressure
|
|
116
|
+
// budget. Without it, a client counts a large replay as live overload and
|
|
117
|
+
// (historically) looped forever reconnecting for the same oversized replay.
|
|
118
|
+
let replayData = '';
|
|
119
|
+
if (replay.kind === 'snapshot') {
|
|
120
|
+
replayData = replay.data;
|
|
121
|
+
}
|
|
122
|
+
else if (replay.lines.length > 0) {
|
|
123
|
+
replayData = replay.lines.join('\n');
|
|
124
|
+
}
|
|
125
|
+
if (replayData.length > 0) {
|
|
126
|
+
ws.send(encodeControl({ type: 'pause', payload: {} }));
|
|
127
|
+
ws.send(encodeData(replayData));
|
|
128
|
+
ws.send(encodeControl({ type: 'resume', payload: {} }));
|
|
129
|
+
}
|
|
130
|
+
// Send current sequence number so client can resume from this point (Bugfix #442)
|
|
131
|
+
const sendSeq = () => {
|
|
132
|
+
if (ws.readyState === WebSocket.OPEN) {
|
|
133
|
+
ws.send(encodeControl({ type: 'seq', payload: { seq: session.ringBuffer.currentSeq } }));
|
|
134
|
+
}
|
|
135
|
+
};
|
|
136
|
+
sendSeq();
|
|
137
|
+
// Periodic seq heartbeat so client always has a recent sequence number
|
|
138
|
+
seqInterval = setInterval(sendSeq, 10_000);
|
|
134
139
|
}
|
|
135
140
|
// ============================================================================
|
|
136
141
|
// WebSocket upgrade routing
|
|
@@ -163,6 +168,25 @@ function rejectUnknownSession(req, socket, head, wss) {
|
|
|
163
168
|
socket.write('HTTP/1.1 404 Not Found\r\n\r\n');
|
|
164
169
|
socket.destroy();
|
|
165
170
|
}
|
|
171
|
+
/**
|
|
172
|
+
* Reject an upgrade that failed request authentication (advisory
|
|
173
|
+
* GHSA-xvjp-7748-v88v). Mirrors {@link rejectUnknownSession}'s two client
|
|
174
|
+
* shapes: a browser (has `Origin`, can't read a failed upgrade's HTTP status)
|
|
175
|
+
* gets an accepted-then-closed handshake with {@link WS_CLOSE_UNAUTHORIZED};
|
|
176
|
+
* a Node `ws` client gets the HTTP-stage `401`. This runs BEFORE any session
|
|
177
|
+
* lookup and is independent of `Origin`, so a missing `Origin` cannot degrade
|
|
178
|
+
* into an auth bypass.
|
|
179
|
+
*/
|
|
180
|
+
function rejectUnauthorized(req, socket, head, wss) {
|
|
181
|
+
if (req.headers.origin) {
|
|
182
|
+
wss.handleUpgrade(req, socket, head, (ws) => {
|
|
183
|
+
ws.close(WS_CLOSE_UNAUTHORIZED, 'unauthorized');
|
|
184
|
+
});
|
|
185
|
+
return;
|
|
186
|
+
}
|
|
187
|
+
socket.write('HTTP/1.1 401 Unauthorized\r\n\r\n');
|
|
188
|
+
socket.destroy();
|
|
189
|
+
}
|
|
166
190
|
/**
|
|
167
191
|
* Set up the WebSocket upgrade handler on the HTTP server.
|
|
168
192
|
* Parses upgrade requests and routes them to the appropriate terminal session:
|
|
@@ -172,6 +196,14 @@ function rejectUnknownSession(req, socket, head, wss) {
|
|
|
172
196
|
export function setupUpgradeHandler(server, wss, port) {
|
|
173
197
|
server.on('upgrade', async (req, socket, head) => {
|
|
174
198
|
const reqUrl = new URL(req.url || '/', `http://localhost:${port}`);
|
|
199
|
+
// Request authentication (advisory GHSA-xvjp-7748-v88v): validate the key at
|
|
200
|
+
// the handshake, before any session lookup or PTY attach, for every WS route.
|
|
201
|
+
// Independent of the Origin header so a missing Origin cannot bypass auth.
|
|
202
|
+
if (!isWebSocketAllowed(req)) {
|
|
203
|
+
logTerminal('WARN', `WS upgrade 401 ${reqUrl.pathname} — disallowed Host or missing/invalid key`);
|
|
204
|
+
rejectUnauthorized(req, socket, head, wss);
|
|
205
|
+
return;
|
|
206
|
+
}
|
|
175
207
|
// Phase 2: Handle /ws/terminal/:id routes directly
|
|
176
208
|
const terminalMatch = reqUrl.pathname.match(/^\/ws\/terminal\/([^/]+)$/);
|
|
177
209
|
if (terminalMatch) {
|
|
@@ -189,7 +221,10 @@ export function setupUpgradeHandler(server, wss, port) {
|
|
|
189
221
|
return;
|
|
190
222
|
}
|
|
191
223
|
wss.handleUpgrade(req, socket, head, (ws) => {
|
|
192
|
-
handleTerminalWebSocket(ws, session, req)
|
|
224
|
+
handleTerminalWebSocket(ws, session, req).catch((err) => {
|
|
225
|
+
logTerminal('ERROR', `terminal WS handler failed for ${terminalId}: ${String(err)}`);
|
|
226
|
+
ws.close();
|
|
227
|
+
});
|
|
193
228
|
});
|
|
194
229
|
return;
|
|
195
230
|
}
|
|
@@ -254,7 +289,10 @@ export function setupUpgradeHandler(server, wss, port) {
|
|
|
254
289
|
return;
|
|
255
290
|
}
|
|
256
291
|
wss.handleUpgrade(req, socket, head, (ws) => {
|
|
257
|
-
handleTerminalWebSocket(ws, session, req)
|
|
292
|
+
handleTerminalWebSocket(ws, session, req).catch((err) => {
|
|
293
|
+
logTerminal('ERROR', `terminal WS handler failed for ${terminalId}: ${String(err)}`);
|
|
294
|
+
ws.close();
|
|
295
|
+
});
|
|
258
296
|
});
|
|
259
297
|
return;
|
|
260
298
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"tower-websocket.js","sourceRoot":"","sources":["../../../src/agent-farm/servers/tower-websocket.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAIH,OAAO,EAAmB,SAAS,EAAE,MAAM,IAAI,CAAC;AAChD,OAAO,EAAE,wBAAwB,EAAE,MAAM,
|
|
1
|
+
{"version":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,CAAC;YACL,CAAC,CAAC,CAAC;YACH,OAAO;QACT,CAAC;QAED,4BAA4B;QAC5B,MAAM,CAAC,KAAK,CAAC,gCAAgC,CAAC,CAAC;QAC/C,MAAM,CAAC,OAAO,EAAE,CAAC;IACnB,CAAC,CAAC,CAAC;AACL,CAAC"}
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Per-key FIFO serialization with completion chaining (Spec 1313, Phase 4).
|
|
3
|
+
*
|
|
4
|
+
* `run(key, fn)` runs `fn` only after every earlier `run(key, …)` for the same
|
|
5
|
+
* key has fully settled, and resolves with `fn`'s result. Different keys run
|
|
6
|
+
* concurrently. This is the "a message's text + its Enter are one unit, and
|
|
7
|
+
* concurrent sends to one session never interleave" primitive: the send path and
|
|
8
|
+
* the backstop drainer both funnel per-agent delivery through one serializer, so a
|
|
9
|
+
* pick → gate → write → mark critical section can never overlap another for the
|
|
10
|
+
* same agent — which is what makes the spike `w1a` blob (two concurrent sends
|
|
11
|
+
* fusing into one submit) impossible by construction.
|
|
12
|
+
*
|
|
13
|
+
* Chaining is **completion-based**, not fire-and-forget: the next `fn` starts only
|
|
14
|
+
* after the previous one settles. When `fn` awaits the paced-write completion
|
|
15
|
+
* (text + trailing Enter fully written), the following delivery therefore observes
|
|
16
|
+
* the line only after the prior submit is entirely on the wire.
|
|
17
|
+
*
|
|
18
|
+
* Robustness invariants:
|
|
19
|
+
* - A rejected `fn` never wedges the key: the successor runs regardless of the
|
|
20
|
+
* predecessor's outcome, and the original caller still observes the rejection on
|
|
21
|
+
* its own returned promise.
|
|
22
|
+
* - The per-key tail is dropped once it settles with no successor queued, so the
|
|
23
|
+
* map never grows unbounded across many short-lived keys (one per agent).
|
|
24
|
+
*/
|
|
25
|
+
export declare class KeyedSerializer {
|
|
26
|
+
private readonly tails;
|
|
27
|
+
/**
|
|
28
|
+
* Queue `fn` behind any in-flight/queued work for `key`. Returns a promise that
|
|
29
|
+
* settles with `fn`'s result (or rejection). `fn` is not invoked until its turn.
|
|
30
|
+
*/
|
|
31
|
+
run<T>(key: string, fn: () => Promise<T>): Promise<T>;
|
|
32
|
+
/** True while any work is queued or in flight for `key` (tests/telemetry). */
|
|
33
|
+
isActive(key: string): boolean;
|
|
34
|
+
}
|
|
35
|
+
//# sourceMappingURL=write-queue.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"write-queue.d.ts","sourceRoot":"","sources":["../../../src/agent-farm/servers/write-queue.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;GAuBG;AACH,qBAAa,eAAe;IAC1B,OAAO,CAAC,QAAQ,CAAC,KAAK,CAAuC;IAE7D;;;OAGG;IACH,GAAG,CAAC,CAAC,EAAE,GAAG,EAAE,MAAM,EAAE,EAAE,EAAE,MAAM,OAAO,CAAC,CAAC,CAAC,GAAG,OAAO,CAAC,CAAC,CAAC;IAuBrD,8EAA8E;IAC9E,QAAQ,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO;CAG/B"}
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Per-key FIFO serialization with completion chaining (Spec 1313, Phase 4).
|
|
3
|
+
*
|
|
4
|
+
* `run(key, fn)` runs `fn` only after every earlier `run(key, …)` for the same
|
|
5
|
+
* key has fully settled, and resolves with `fn`'s result. Different keys run
|
|
6
|
+
* concurrently. This is the "a message's text + its Enter are one unit, and
|
|
7
|
+
* concurrent sends to one session never interleave" primitive: the send path and
|
|
8
|
+
* the backstop drainer both funnel per-agent delivery through one serializer, so a
|
|
9
|
+
* pick → gate → write → mark critical section can never overlap another for the
|
|
10
|
+
* same agent — which is what makes the spike `w1a` blob (two concurrent sends
|
|
11
|
+
* fusing into one submit) impossible by construction.
|
|
12
|
+
*
|
|
13
|
+
* Chaining is **completion-based**, not fire-and-forget: the next `fn` starts only
|
|
14
|
+
* after the previous one settles. When `fn` awaits the paced-write completion
|
|
15
|
+
* (text + trailing Enter fully written), the following delivery therefore observes
|
|
16
|
+
* the line only after the prior submit is entirely on the wire.
|
|
17
|
+
*
|
|
18
|
+
* Robustness invariants:
|
|
19
|
+
* - A rejected `fn` never wedges the key: the successor runs regardless of the
|
|
20
|
+
* predecessor's outcome, and the original caller still observes the rejection on
|
|
21
|
+
* its own returned promise.
|
|
22
|
+
* - The per-key tail is dropped once it settles with no successor queued, so the
|
|
23
|
+
* map never grows unbounded across many short-lived keys (one per agent).
|
|
24
|
+
*/
|
|
25
|
+
export class KeyedSerializer {
|
|
26
|
+
tails = new Map();
|
|
27
|
+
/**
|
|
28
|
+
* Queue `fn` behind any in-flight/queued work for `key`. Returns a promise that
|
|
29
|
+
* settles with `fn`'s result (or rejection). `fn` is not invoked until its turn.
|
|
30
|
+
*/
|
|
31
|
+
run(key, fn) {
|
|
32
|
+
const prev = this.tails.get(key) ?? Promise.resolve();
|
|
33
|
+
// Run fn once prev settles, regardless of whether prev resolved or rejected
|
|
34
|
+
// (the stored tail below already swallows outcomes, so prev never rejects —
|
|
35
|
+
// passing fn as both handlers is defensive and keeps the chain moving).
|
|
36
|
+
const result = prev.then(fn, fn);
|
|
37
|
+
// The tail successors chain after. Swallow its settlement so (a) a rejected
|
|
38
|
+
// fn never surfaces as an unhandled rejection here, and (b) the successor is
|
|
39
|
+
// never blocked by the predecessor's failure.
|
|
40
|
+
const tail = result.then(() => { }, () => { });
|
|
41
|
+
this.tails.set(key, tail);
|
|
42
|
+
// GC: once this tail settles, drop the key IFF nothing chained after it. If a
|
|
43
|
+
// successor was queued in the meantime, `tails.get(key)` is that newer tail,
|
|
44
|
+
// so we leave it in place.
|
|
45
|
+
void tail.then(() => {
|
|
46
|
+
if (this.tails.get(key) === tail)
|
|
47
|
+
this.tails.delete(key);
|
|
48
|
+
});
|
|
49
|
+
return result;
|
|
50
|
+
}
|
|
51
|
+
/** True while any work is queued or in flight for `key` (tests/telemetry). */
|
|
52
|
+
isActive(key) {
|
|
53
|
+
return this.tails.has(key);
|
|
54
|
+
}
|
|
55
|
+
}
|
|
56
|
+
//# sourceMappingURL=write-queue.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"write-queue.js","sourceRoot":"","sources":["../../../src/agent-farm/servers/write-queue.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;GAuBG;AACH,MAAM,OAAO,eAAe;IACT,KAAK,GAAG,IAAI,GAAG,EAA4B,CAAC;IAE7D;;;OAGG;IACH,GAAG,CAAI,GAAW,EAAE,EAAoB;QACtC,MAAM,IAAI,GAAG,IAAI,CAAC,KAAK,CAAC,GAAG,CAAC,GAAG,CAAC,IAAI,OAAO,CAAC,OAAO,EAAE,CAAC;QACtD,4EAA4E;QAC5E,4EAA4E;QAC5E,wEAAwE;QACxE,MAAM,MAAM,GAAG,IAAI,CAAC,IAAI,CAAC,EAAE,EAAE,EAAE,CAAC,CAAC;QACjC,4EAA4E;QAC5E,6EAA6E;QAC7E,8CAA8C;QAC9C,MAAM,IAAI,GAAG,MAAM,CAAC,IAAI,CACtB,GAAG,EAAE,GAAE,CAAC,EACR,GAAG,EAAE,GAAE,CAAC,CACT,CAAC;QACF,IAAI,CAAC,KAAK,CAAC,GAAG,CAAC,GAAG,EAAE,IAAI,CAAC,CAAC;QAC1B,8EAA8E;QAC9E,6EAA6E;QAC7E,2BAA2B;QAC3B,KAAK,IAAI,CAAC,IAAI,CAAC,GAAG,EAAE;YAClB,IAAI,IAAI,CAAC,KAAK,CAAC,GAAG,CAAC,GAAG,CAAC,KAAK,IAAI;gBAAE,IAAI,CAAC,KAAK,CAAC,MAAM,CAAC,GAAG,CAAC,CAAC;QAC3D,CAAC,CAAC,CAAC;QACH,OAAO,MAAM,CAAC;IAChB,CAAC;IAED,8EAA8E;IAC9E,QAAQ,CAAC,GAAW;QAClB,OAAO,IAAI,CAAC,KAAK,CAAC,GAAG,CAAC,GAAG,CAAC,CAAC;IAC7B,CAAC;CACF"}
|
|
@@ -124,6 +124,45 @@ export interface SendOptions {
|
|
|
124
124
|
interrupt?: boolean;
|
|
125
125
|
raw?: boolean;
|
|
126
126
|
noEnter?: boolean;
|
|
127
|
+
/**
|
|
128
|
+
* Spec 1307: hold in Tower and deliver after this many seconds. Resolution
|
|
129
|
+
* and authorization still happen at request time; only delivery is deferred.
|
|
130
|
+
* Not persisted — a Tower restart drops pending sends.
|
|
131
|
+
*
|
|
132
|
+
* Named `delay` here to match the user-facing `--delay` flag; it becomes
|
|
133
|
+
* `deliverAfter` at the client and wire layers, where the question is *when
|
|
134
|
+
* to deliver* rather than *how long the caller asked to wait*. The two names
|
|
135
|
+
* are deliberate, not drift.
|
|
136
|
+
*/
|
|
137
|
+
delay?: number;
|
|
138
|
+
}
|
|
139
|
+
/**
|
|
140
|
+
* Options for `afx interrupt` (Spec 1273).
|
|
141
|
+
*
|
|
142
|
+
* Sends a bare ESC keystroke into a builder's PTY — the only recovery that
|
|
143
|
+
* reaches a builder mid-turn, ending the turn so queued messages process.
|
|
144
|
+
*/
|
|
145
|
+
export interface InterruptOptions {
|
|
146
|
+
builder?: string;
|
|
147
|
+
noEnter?: boolean;
|
|
148
|
+
}
|
|
149
|
+
/**
|
|
150
|
+
* Options for `afx refresh` — save-state → /clear → re-orient (Spec 1273).
|
|
151
|
+
*
|
|
152
|
+
* The timing knobs exist because the safe failure of every gate is "abort
|
|
153
|
+
* without clearing". A builder that legitimately needs longer than a default
|
|
154
|
+
* should be given longer, not have the gate weakened.
|
|
155
|
+
*/
|
|
156
|
+
export interface ResetOptions {
|
|
157
|
+
builder?: string;
|
|
158
|
+
note?: string;
|
|
159
|
+
file?: string;
|
|
160
|
+
dryRun?: boolean;
|
|
161
|
+
interruptFirst?: boolean;
|
|
162
|
+
mode?: 'strict' | 'soft';
|
|
163
|
+
timeout?: number;
|
|
164
|
+
minBytes?: number;
|
|
165
|
+
quietWindow?: number;
|
|
127
166
|
}
|
|
128
167
|
/**
|
|
129
168
|
* User-facing config.json structure
|
|
@@ -1 +1 @@
|
|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C9C,GAAG,CAAC,EAAE,MAAM,CAAC;QACb,UAAU,CAAC,EAAE,OAAO,CAAC;KACtB,CAAC,CAAC;CACJ;AAED;;GAEG;AACH,MAAM,WAAW,gBAAgB;IAC/B,SAAS,EAAE,MAAM,CAAC;IAClB,OAAO,EAAE,MAAM,CAAC;IAChB,KAAK,EAAE,MAAM,CAAC;CACf;AAED;;GAEG;AACH,MAAM,WAAW,aAAa;IAC5B,aAAa,EAAE,MAAM,CAAC;IACtB,WAAW,EAAE,MAAM,CAAC;IACpB,cAAc,EAAE,MAAM,EAAE,CAAC;IACzB,aAAa,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IACtC,SAAS,EAAE,MAAM,CAAC;IAClB,YAAY,EAAE,MAAM,CAAC;CACtB;AAED,MAAM,WAAW,eAAe;IAC9B,KAAK,CAAC,EAAE,OAAO,CAAC;IAChB,IAAI,CAAC,EAAE,OAAO,CAAC;IACf,MAAM,CAAC,EAAE,OAAO,CAAC;CAClB"}
|
|
@@ -9,12 +9,12 @@
|
|
|
9
9
|
*
|
|
10
10
|
* All names are stored and compared in lowercase per spec.
|
|
11
11
|
*
|
|
12
|
-
* `stripLeadingZeros` and `resolveAgentName` live in codev-
|
|
12
|
+
* `stripLeadingZeros` and `resolveAgentName` live in codev-sdk so the
|
|
13
13
|
* VS Code extension can use the same matching semantics; we re-export
|
|
14
14
|
* them here so existing agent-farm callsites are unaffected.
|
|
15
15
|
*/
|
|
16
16
|
import type { BuilderType } from '../types.js';
|
|
17
|
-
export { stripLeadingZeros, resolveAgentName } from '@cluesmith/codev-
|
|
17
|
+
export { stripLeadingZeros, resolveAgentName } from '@cluesmith/codev-sdk/agent-names';
|
|
18
18
|
/**
|
|
19
19
|
* Build a canonical agent name from builder type and ID.
|
|
20
20
|
* Returns lowercase with leading zeros stripped from numeric IDs.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"agent-names.d.ts","sourceRoot":"","sources":["../../../src/agent-farm/utils/agent-names.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAEH,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,aAAa,CAAC;AAC/C,OAAO,EAAE,iBAAiB,EAAE,gBAAgB,EAAE,MAAM,
|
|
1
|
+
{"version":3,"file":"agent-names.d.ts","sourceRoot":"","sources":["../../../src/agent-farm/utils/agent-names.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAEH,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,aAAa,CAAC;AAC/C,OAAO,EAAE,iBAAiB,EAAE,gBAAgB,EAAE,MAAM,kCAAkC,CAAC;AAGvF;;;;;;;;;;;;GAYG;AACH,wBAAgB,cAAc,CAAC,IAAI,EAAE,WAAW,EAAE,EAAE,EAAE,MAAM,EAAE,QAAQ,CAAC,EAAE,MAAM,GAAG,MAAM,CA2BvF;AAED;;;;;;;;;GASG;AACH,wBAAgB,cAAc,CAAC,IAAI,EAAE,MAAM,GAAG;IAAE,QAAQ,EAAE,MAAM,CAAC;IAAC,EAAE,EAAE,MAAM,CAAA;CAAE,GAAG,IAAI,CAKpF;AAED;;;;;;;;;GASG;AACH,wBAAgB,YAAY,CAAC,MAAM,EAAE,MAAM,GAAG;IAAE,OAAO,CAAC,EAAE,MAAM,CAAC;IAAC,KAAK,EAAE,MAAM,CAAA;CAAE,CAShF"}
|
|
@@ -9,12 +9,12 @@
|
|
|
9
9
|
*
|
|
10
10
|
* All names are stored and compared in lowercase per spec.
|
|
11
11
|
*
|
|
12
|
-
* `stripLeadingZeros` and `resolveAgentName` live in codev-
|
|
12
|
+
* `stripLeadingZeros` and `resolveAgentName` live in codev-sdk so the
|
|
13
13
|
* VS Code extension can use the same matching semantics; we re-export
|
|
14
14
|
* them here so existing agent-farm callsites are unaffected.
|
|
15
15
|
*/
|
|
16
|
-
export { stripLeadingZeros, resolveAgentName } from '@cluesmith/codev-
|
|
17
|
-
import { stripLeadingZeros } from '@cluesmith/codev-
|
|
16
|
+
export { stripLeadingZeros, resolveAgentName } from '@cluesmith/codev-sdk/agent-names';
|
|
17
|
+
import { stripLeadingZeros } from '@cluesmith/codev-sdk/agent-names';
|
|
18
18
|
/**
|
|
19
19
|
* Build a canonical agent name from builder type and ID.
|
|
20
20
|
* Returns lowercase with leading zeros stripped from numeric IDs.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"agent-names.js","sourceRoot":"","sources":["../../../src/agent-farm/utils/agent-names.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAGH,OAAO,EAAE,iBAAiB,EAAE,gBAAgB,EAAE,MAAM,
|
|
1
|
+
{"version":3,"file":"agent-names.js","sourceRoot":"","sources":["../../../src/agent-farm/utils/agent-names.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAGH,OAAO,EAAE,iBAAiB,EAAE,gBAAgB,EAAE,MAAM,kCAAkC,CAAC;AACvF,OAAO,EAAE,iBAAiB,EAAE,MAAM,kCAAkC,CAAC;AAErE;;;;;;;;;;;;GAYG;AACH,MAAM,UAAU,cAAc,CAAC,IAAiB,EAAE,EAAU,EAAE,QAAiB;IAC7E,MAAM,UAAU,GAAG,iBAAiB,CAAC,EAAE,CAAC,CAAC;IAEzC,iCAAiC;IACjC,IAAI,eAAuB,CAAC;IAC5B,QAAQ,IAAI,EAAE,CAAC;QACb,KAAK,MAAM;YACT,eAAe,GAAG,QAAQ,IAAI,MAAM,CAAC;YACrC,MAAM;QACR,KAAK,QAAQ;YACX,eAAe,GAAG,QAAQ,CAAC;YAC3B,MAAM;QACR,KAAK,KAAK;YACR,eAAe,GAAG,KAAK,CAAC;YACxB,MAAM;QACR,KAAK,MAAM;YACT,eAAe,GAAG,MAAM,CAAC;YACzB,MAAM;QACR,KAAK,UAAU;YACb,eAAe,GAAG,QAAQ,IAAI,UAAU,CAAC;YACzC,MAAM;QACR;YACE,qDAAqD;YACrD,OAAO,GAAG,IAAI,IAAI,UAAU,EAAE,CAAC,WAAW,EAAE,CAAC;IACjD,CAAC;IAED,OAAO,WAAW,eAAe,IAAI,UAAU,EAAE,CAAC,WAAW,EAAE,CAAC;AAClE,CAAC;AAED;;;;;;;;;GASG;AACH,MAAM,UAAU,cAAc,CAAC,IAAY;IACzC,MAAM,KAAK,GAAG,IAAI,CAAC,WAAW,EAAE,CAAC;IACjC,MAAM,KAAK,GAAG,KAAK,CAAC,KAAK,CAAC,4BAA4B,CAAC,CAAC;IACxD,IAAI,CAAC,KAAK;QAAE,OAAO,IAAI,CAAC;IACxB,OAAO,EAAE,QAAQ,EAAE,KAAK,CAAC,CAAC,CAAC,EAAE,EAAE,EAAE,KAAK,CAAC,CAAC,CAAC,EAAE,CAAC;AAC9C,CAAC;AAED;;;;;;;;;GASG;AACH,MAAM,UAAU,YAAY,CAAC,MAAc;IACzC,MAAM,UAAU,GAAG,MAAM,CAAC,OAAO,CAAC,GAAG,CAAC,CAAC;IACvC,IAAI,UAAU,GAAG,CAAC,EAAE,CAAC;QACnB,OAAO;YACL,OAAO,EAAE,MAAM,CAAC,SAAS,CAAC,CAAC,EAAE,UAAU,CAAC,CAAC,WAAW,EAAE;YACtD,KAAK,EAAE,MAAM,CAAC,SAAS,CAAC,UAAU,GAAG,CAAC,CAAC,CAAC,WAAW,EAAE;SACtD,CAAC;IACJ,CAAC;IACD,OAAO,EAAE,KAAK,EAAE,MAAM,CAAC,WAAW,EAAE,EAAE,CAAC;AACzC,CAAC"}
|
|
@@ -6,12 +6,12 @@
|
|
|
6
6
|
* (smallest unused integer ≥ 2) given the set of already-registered names.
|
|
7
7
|
*
|
|
8
8
|
* `validateArchitectName`, `autoNumberArchitectName`, and the name constants
|
|
9
|
-
* live in codev-
|
|
9
|
+
* live in codev-sdk (Issue 841) so the VS Code extension's "Add Architect"
|
|
10
10
|
* InputBox validates with the exact same rule Tower enforces server-side; we
|
|
11
11
|
* re-export them here so existing agent-farm callsites are unaffected.
|
|
12
12
|
* `currentArchitectName` reads the process env and stays local to this package.
|
|
13
13
|
*/
|
|
14
|
-
export { ARCHITECT_NAME_PATTERN, MAX_ARCHITECT_NAME_LENGTH, DEFAULT_ARCHITECT_NAME, validateArchitectName, autoNumberArchitectName, } from '@cluesmith/codev-
|
|
14
|
+
export { ARCHITECT_NAME_PATTERN, MAX_ARCHITECT_NAME_LENGTH, DEFAULT_ARCHITECT_NAME, validateArchitectName, autoNumberArchitectName, } from '@cluesmith/codev-sdk/architect-name';
|
|
15
15
|
/**
|
|
16
16
|
* Resolve the *current* terminal session's architect name (Spec 1057).
|
|
17
17
|
*
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"architect-name.d.ts","sourceRoot":"","sources":["../../../src/agent-farm/utils/architect-name.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;GAYG;AAEH,OAAO,EACL,sBAAsB,EACtB,yBAAyB,EACzB,sBAAsB,EACtB,qBAAqB,EACrB,uBAAuB,GACxB,MAAM,
|
|
1
|
+
{"version":3,"file":"architect-name.d.ts","sourceRoot":"","sources":["../../../src/agent-farm/utils/architect-name.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;GAYG;AAEH,OAAO,EACL,sBAAsB,EACtB,yBAAyB,EACzB,sBAAsB,EACtB,qBAAqB,EACrB,uBAAuB,GACxB,MAAM,qCAAqC,CAAC;AAG7C;;;;;;;;;;;GAWG;AACH,wBAAgB,oBAAoB,CAAC,GAAG,GAAE,MAAM,CAAC,UAAwB,GAAG,MAAM,CAGjF"}
|
|
@@ -6,13 +6,13 @@
|
|
|
6
6
|
* (smallest unused integer ≥ 2) given the set of already-registered names.
|
|
7
7
|
*
|
|
8
8
|
* `validateArchitectName`, `autoNumberArchitectName`, and the name constants
|
|
9
|
-
* live in codev-
|
|
9
|
+
* live in codev-sdk (Issue 841) so the VS Code extension's "Add Architect"
|
|
10
10
|
* InputBox validates with the exact same rule Tower enforces server-side; we
|
|
11
11
|
* re-export them here so existing agent-farm callsites are unaffected.
|
|
12
12
|
* `currentArchitectName` reads the process env and stays local to this package.
|
|
13
13
|
*/
|
|
14
|
-
export { ARCHITECT_NAME_PATTERN, MAX_ARCHITECT_NAME_LENGTH, DEFAULT_ARCHITECT_NAME, validateArchitectName, autoNumberArchitectName, } from '@cluesmith/codev-
|
|
15
|
-
import { DEFAULT_ARCHITECT_NAME } from '@cluesmith/codev-
|
|
14
|
+
export { ARCHITECT_NAME_PATTERN, MAX_ARCHITECT_NAME_LENGTH, DEFAULT_ARCHITECT_NAME, validateArchitectName, autoNumberArchitectName, } from '@cluesmith/codev-sdk/architect-name';
|
|
15
|
+
import { DEFAULT_ARCHITECT_NAME } from '@cluesmith/codev-sdk/architect-name';
|
|
16
16
|
/**
|
|
17
17
|
* Resolve the *current* terminal session's architect name (Spec 1057).
|
|
18
18
|
*
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"architect-name.js","sourceRoot":"","sources":["../../../src/agent-farm/utils/architect-name.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;GAYG;AAEH,OAAO,EACL,sBAAsB,EACtB,yBAAyB,EACzB,sBAAsB,EACtB,qBAAqB,EACrB,uBAAuB,GACxB,MAAM,
|
|
1
|
+
{"version":3,"file":"architect-name.js","sourceRoot":"","sources":["../../../src/agent-farm/utils/architect-name.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;GAYG;AAEH,OAAO,EACL,sBAAsB,EACtB,yBAAyB,EACzB,sBAAsB,EACtB,qBAAqB,EACrB,uBAAuB,GACxB,MAAM,qCAAqC,CAAC;AAC7C,OAAO,EAAE,sBAAsB,EAAE,MAAM,qCAAqC,CAAC;AAE7E;;;;;;;;;;;GAWG;AACH,MAAM,UAAU,oBAAoB,CAAC,MAAyB,OAAO,CAAC,GAAG;IACvE,MAAM,KAAK,GAAG,GAAG,CAAC,oBAAoB,EAAE,IAAI,EAAE,CAAC;IAC/C,OAAO,KAAK,IAAI,sBAAsB,CAAC;AACzC,CAAC"}
|
|
@@ -51,6 +51,19 @@ export declare function getArchitectHarness(workspaceRoot?: string): HarnessProv
|
|
|
51
51
|
* resolves the gemini harness, not claude — see #929).
|
|
52
52
|
*/
|
|
53
53
|
export declare function getBuilderHarness(workspaceRoot?: string): HarnessProvider;
|
|
54
|
+
/**
|
|
55
|
+
* Spawn pre-flight (Issue #1338): throw if the configured builder harness resolves
|
|
56
|
+
* to a retired built-in (e.g. gemini). Call this BEFORE any worktree / porch / db
|
|
57
|
+
* state is created so a retired selection fails closed with no orphaned state,
|
|
58
|
+
* rather than only surfacing at the later `getBuilderHarness` call site.
|
|
59
|
+
*
|
|
60
|
+
* The retirement decision — including the custom-harness escape hatch — is
|
|
61
|
+
* delegated to `getBuilderHarness`, the single source of truth. Only the
|
|
62
|
+
* retirement aborts here; any other resolution error (e.g. an unknown harness
|
|
63
|
+
* name) is left to surface at its existing call site, so this changes behavior
|
|
64
|
+
* for retired harnesses only.
|
|
65
|
+
*/
|
|
66
|
+
export declare function assertBuilderHarnessNotRetired(workspaceRoot?: string): void;
|
|
54
67
|
/**
|
|
55
68
|
* Load the `worktree` block from .codev/config.json, applying defaults.
|
|
56
69
|
* Unconfigured repos get `{ symlinks: [], postSpawn: [], devCommand: null }`
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"config.d.ts","sourceRoot":"","sources":["../../../src/agent-farm/utils/config.ts"],"names":[],"mappings":"AAAA;;GAEG;AAOH,OAAO,KAAK,EAAE,MAAM,EAAc,gBAAgB,EAAE,MAAM,aAAa,CAAC;AAIxE,OAAO,
|
|
1
|
+
{"version":3,"file":"config.d.ts","sourceRoot":"","sources":["../../../src/agent-farm/utils/config.ts"],"names":[],"mappings":"AAAA;;GAEG;AAOH,OAAO,KAAK,EAAE,MAAM,EAAc,gBAAgB,EAAE,MAAM,aAAa,CAAC;AAIxE,OAAO,EAAuC,KAAK,eAAe,EAA4B,MAAM,cAAc,CAAC;AAEnH,OAAO,KAAK,EAAE,sBAAsB,EAAE,cAAc,EAAE,qBAAqB,EAA+B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eleton.js';
|
|
10
10
|
import { loadConfig } from '../../lib/config.js';
|
|
11
|
-
import { resolveHarness } from './harness.js';
|
|
11
|
+
import { resolveHarness, RetiredHarnessError } from './harness.js';
|
|
12
|
+
import { logger } from './logger.js';
|
|
12
13
|
const __filename = fileURLToPath(import.meta.url);
|
|
13
14
|
const __dirname = dirname(__filename);
|
|
14
15
|
// Default commands
|
|
@@ -240,6 +241,37 @@ export function getBuilderHarness(workspaceRoot) {
|
|
|
240
241
|
const builderCmd = getResolvedCommands(root).builder;
|
|
241
242
|
return resolveHarness(userConfig?.shell?.builderHarness, userConfig?.harness, builderCmd);
|
|
242
243
|
}
|
|
244
|
+
/**
|
|
245
|
+
* Spawn pre-flight (Issue #1338): throw if the configured builder harness resolves
|
|
246
|
+
* to a retired built-in (e.g. gemini). Call this BEFORE any worktree / porch / db
|
|
247
|
+
* state is created so a retired selection fails closed with no orphaned state,
|
|
248
|
+
* rather than only surfacing at the later `getBuilderHarness` call site.
|
|
249
|
+
*
|
|
250
|
+
* The retirement decision — including the custom-harness escape hatch — is
|
|
251
|
+
* delegated to `getBuilderHarness`, the single source of truth. Only the
|
|
252
|
+
* retirement aborts here; any other resolution error (e.g. an unknown harness
|
|
253
|
+
* name) is left to surface at its existing call site, so this changes behavior
|
|
254
|
+
* for retired harnesses only.
|
|
255
|
+
*/
|
|
256
|
+
export function assertBuilderHarnessNotRetired(workspaceRoot) {
|
|
257
|
+
try {
|
|
258
|
+
getBuilderHarness(workspaceRoot);
|
|
259
|
+
}
|
|
260
|
+
catch (err) {
|
|
261
|
+
if (err instanceof RetiredHarnessError)
|
|
262
|
+
throw err;
|
|
263
|
+
// A non-retirement resolution error (e.g. an unknown harness name) is left to
|
|
264
|
+
// re-surface at the real `getBuilderHarness` call site for worktree modes.
|
|
265
|
+
// Shell mode never resolves a harness downstream (`spawnShell` runs
|
|
266
|
+
// `commands.builder` as a raw command), so this preflight is the only place
|
|
267
|
+
// such an error is seen — log it rather than swallowing it silently, so a
|
|
268
|
+
// misconfigured `builderHarness` stays diagnosable (Issue #1338 review). Route
|
|
269
|
+
// through `logger.debug` (DEBUG-gated), not `console.debug`: Tower imports this
|
|
270
|
+
// module, and a bare console.debug always writes to stdout and pollutes Tower's
|
|
271
|
+
// log stream. `logger.debug` stays silent unless DEBUG is set.
|
|
272
|
+
logger.debug(`[spawn preflight] builder harness resolution error (non-retirement, deferred): ${err.message}`);
|
|
273
|
+
}
|
|
274
|
+
}
|
|
243
275
|
// ResolvedWorktreeConfig + WorktreeDevUrl now live in
|
|
244
276
|
// @cluesmith/codev-types (they cross HTTP via /api/worktree-config).
|
|
245
277
|
// Re-exported from this module at the top of the file so existing
|