@cluesmith/codev 3.2.3 → 3.3.0
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-JCbkpAcV.js} +33 -33
- package/dashboard-dist/assets/index-JCbkpAcV.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 +173 -0
- package/dist/agent-farm/cli.js.map +1 -1
- package/dist/agent-farm/commands/attach.js +2 -2
- package/dist/agent-farm/commands/attach.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 +19 -0
- package/dist/agent-farm/commands/reset.d.ts.map +1 -0
- package/dist/agent-farm/commands/reset.js +292 -0
- package/dist/agent-farm/commands/reset.js.map +1 -0
- package/dist/agent-farm/commands/send.d.ts +2 -2
- package/dist/agent-farm/commands/send.d.ts.map +1 -1
- package/dist/agent-farm/commands/send.js +52 -11
- package/dist/agent-farm/commands/send.js.map +1 -1
- package/dist/agent-farm/commands/setup.d.ts +4 -1
- package/dist/agent-farm/commands/setup.d.ts.map +1 -1
- package/dist/agent-farm/commands/setup.js +8 -4
- package/dist/agent-farm/commands/setup.js.map +1 -1
- package/dist/agent-farm/commands/spawn-worktree.d.ts +116 -6
- package/dist/agent-farm/commands/spawn-worktree.d.ts.map +1 -1
- package/dist/agent-farm/commands/spawn-worktree.js +345 -74
- 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 +105 -9
- package/dist/agent-farm/commands/status.js.map +1 -1
- package/dist/agent-farm/commands/tower-sweep-husks.d.ts +6 -0
- package/dist/agent-farm/commands/tower-sweep-husks.d.ts.map +1 -0
- package/dist/agent-farm/commands/tower-sweep-husks.js +77 -0
- package/dist/agent-farm/commands/tower-sweep-husks.js.map +1 -0
- package/dist/agent-farm/commands/tower.d.ts.map +1 -1
- package/dist/agent-farm/commands/tower.js +34 -0
- package/dist/agent-farm/commands/tower.js.map +1 -1
- package/dist/agent-farm/commands/whoami.d.ts +65 -0
- package/dist/agent-farm/commands/whoami.d.ts.map +1 -0
- package/dist/agent-farm/commands/whoami.js +196 -0
- package/dist/agent-farm/commands/whoami.js.map +1 -0
- 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 +54 -0
- package/dist/agent-farm/lib/reconnect-backoff.d.ts.map +1 -0
- package/dist/agent-farm/lib/reconnect-backoff.js +47 -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 +218 -27
- package/dist/agent-farm/lib/tunnel-client.js.map +1 -1
- package/dist/agent-farm/servers/architect-session-holder.d.ts +133 -0
- package/dist/agent-farm/servers/architect-session-holder.d.ts.map +1 -0
- package/dist/agent-farm/servers/architect-session-holder.js +268 -0
- package/dist/agent-farm/servers/architect-session-holder.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.map +1 -1
- package/dist/agent-farm/servers/overview.js +23 -4
- package/dist/agent-farm/servers/overview.js.map +1 -1
- package/dist/agent-farm/servers/process-census.d.ts +41 -0
- package/dist/agent-farm/servers/process-census.d.ts.map +1 -0
- package/dist/agent-farm/servers/process-census.js +62 -0
- package/dist/agent-farm/servers/process-census.js.map +1 -0
- 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-log-sweep.d.ts +93 -0
- package/dist/agent-farm/servers/session-log-sweep.d.ts.map +1 -0
- package/dist/agent-farm/servers/session-log-sweep.js +165 -0
- package/dist/agent-farm/servers/session-log-sweep.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/shellper-husk-sweep.d.ts +87 -0
- package/dist/agent-farm/servers/shellper-husk-sweep.d.ts.map +1 -0
- package/dist/agent-farm/servers/shellper-husk-sweep.js +129 -0
- package/dist/agent-farm/servers/shellper-husk-sweep.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 +128 -19
- 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 +807 -99
- package/dist/agent-farm/servers/tower-routes.js.map +1 -1
- package/dist/agent-farm/servers/tower-server.js +241 -15
- package/dist/agent-farm/servers/tower-server.js.map +1 -1
- package/dist/agent-farm/servers/tower-terminals.d.ts +17 -2
- package/dist/agent-farm/servers/tower-terminals.d.ts.map +1 -1
- package/dist/agent-farm/servers/tower-terminals.js +139 -124
- 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 +99 -1
- package/dist/agent-farm/servers/tower-utils.d.ts.map +1 -1
- package/dist/agent-farm/servers/tower-utils.js +242 -6
- package/dist/agent-farm/servers/tower-utils.js.map +1 -1
- package/dist/agent-farm/servers/tower-websocket.d.ts.map +1 -1
- package/dist/agent-farm/servers/tower-websocket.js +6 -21
- 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/state.d.ts +6 -1
- package/dist/agent-farm/state.d.ts.map +1 -1
- package/dist/agent-farm/state.js +5 -2
- package/dist/agent-farm/state.js.map +1 -1
- 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/cli.d.ts.map +1 -1
- package/dist/cli.js +6 -32
- package/dist/cli.js.map +1 -1
- package/dist/commands/adopt.d.ts +3 -2
- package/dist/commands/adopt.d.ts.map +1 -1
- package/dist/commands/adopt.js +7 -6
- package/dist/commands/adopt.js.map +1 -1
- package/dist/commands/consult/agy-auth-cache.d.ts +97 -0
- package/dist/commands/consult/agy-auth-cache.d.ts.map +1 -0
- package/dist/commands/consult/agy-auth-cache.js +320 -0
- package/dist/commands/consult/agy-auth-cache.js.map +1 -0
- 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 +330 -27
- 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 +28 -0
- package/dist/commands/doctor.d.ts.map +1 -1
- package/dist/commands/doctor.js +258 -22
- package/dist/commands/doctor.js.map +1 -1
- package/dist/commands/init.d.ts +3 -2
- package/dist/commands/init.d.ts.map +1 -1
- package/dist/commands/init.js +7 -6
- package/dist/commands/init.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.d.ts.map +1 -1
- package/dist/commands/porch/index.js +32 -36
- 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/commands/update.d.ts +4 -4
- package/dist/commands/update.d.ts.map +1 -1
- package/dist/commands/update.js +9 -11
- package/dist/commands/update.js.map +1 -1
- package/dist/lib/config.d.ts +70 -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/default-branch.d.ts +1 -1
- package/dist/lib/default-branch.js +1 -1
- package/dist/lib/github.js +1 -1
- package/dist/lib/github.js.map +1 -1
- package/dist/lib/gitignore.d.ts +25 -2
- package/dist/lib/gitignore.d.ts.map +1 -1
- package/dist/lib/gitignore.js +70 -0
- package/dist/lib/gitignore.js.map +1 -1
- package/dist/lib/migration-backup-audit.d.ts +64 -0
- package/dist/lib/migration-backup-audit.d.ts.map +1 -0
- package/dist/lib/migration-backup-audit.js +145 -0
- package/dist/lib/migration-backup-audit.js.map +1 -0
- 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/protocol-drift-audit.d.ts +118 -0
- package/dist/lib/protocol-drift-audit.d.ts.map +1 -0
- package/dist/lib/protocol-drift-audit.js +217 -0
- package/dist/lib/protocol-drift-audit.js.map +1 -0
- package/dist/lib/scaffold.d.ts +10 -3
- package/dist/lib/scaffold.d.ts.map +1 -1
- package/dist/lib/scaffold.js +29 -26
- package/dist/lib/scaffold.js.map +1 -1
- 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/pty-manager.d.ts +9 -0
- package/dist/terminal/pty-manager.d.ts.map +1 -1
- package/dist/terminal/pty-manager.js +32 -6
- package/dist/terminal/pty-manager.js.map +1 -1
- package/dist/terminal/pty-session.d.ts +156 -4
- package/dist/terminal/pty-session.d.ts.map +1 -1
- package/dist/terminal/pty-session.js +307 -42
- 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 +129 -0
- package/dist/terminal/session-manager.d.ts.map +1 -1
- package/dist/terminal/session-manager.js +337 -44
- package/dist/terminal/session-manager.js.map +1 -1
- package/dist/terminal/session-screen.d.ts +91 -0
- package/dist/terminal/session-screen.d.ts.map +1 -0
- package/dist/terminal/session-screen.js +135 -0
- package/dist/terminal/session-screen.js.map +1 -0
- package/dist/terminal/shellper-client.d.ts +19 -4
- package/dist/terminal/shellper-client.d.ts.map +1 -1
- package/dist/terminal/shellper-client.js +70 -8
- package/dist/terminal/shellper-client.js.map +1 -1
- 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 +33 -9
- package/dist/terminal/shellper-process.js.map +1 -1
- package/dist/terminal/shellper-protocol.d.ts +40 -2
- package/dist/terminal/shellper-protocol.d.ts.map +1 -1
- package/dist/terminal/shellper-protocol.js +72 -5
- package/dist/terminal/shellper-protocol.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 +11 -9
- package/skeleton/.claude/skills/afx/SKILL.md +27 -1
- package/skeleton/.claude/skills/arch-init/SKILL.md +135 -0
- package/skeleton/.claude/skills/arch-save/SKILL.md +183 -0
- package/skeleton/.claude/skills/codev/SKILL.md +33 -2
- package/skeleton/.claude/skills/runnable-worktrees/SKILL.md +119 -0
- package/skeleton/.codex/skills/afx/SKILL.md +170 -0
- package/skeleton/.codex/skills/arch-init/SKILL.md +135 -0
- package/skeleton/.codex/skills/arch-save/SKILL.md +183 -0
- package/skeleton/.codex/skills/codev/SKILL.md +90 -0
- package/skeleton/.codex/skills/consult/SKILL.md +96 -0
- package/skeleton/.codex/skills/generate-image/SKILL.md +45 -0
- package/skeleton/.codex/skills/porch/SKILL.md +60 -0
- package/skeleton/.codex/skills/runnable-worktrees/SKILL.md +119 -0
- package/skeleton/.codex/skills/update-arch-docs/SKILL.md +132 -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 +30 -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 +1 -2
- package/skeleton/protocols/pir/prompts/plan.md +0 -3
- package/skeleton/protocols/pir/prompts/review.md +1 -1
- 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 +348 -0
- package/skeleton/resources/commands/codev.md +5 -0
- package/skeleton/resources/commands/consult.md +262 -8
- package/skeleton/resources/commands/overview.md +1 -0
- package/skeleton/roles/architect.md +67 -306
- package/skeleton/roles/builder.md +77 -191
- package/skeleton/templates/AGENTS.md +2 -0
- package/skeleton/templates/CLAUDE.md +2 -0
- package/templates/tower.html +39 -2
- 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 -103
- 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
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Private reconnect-backoff copy for Tower internals (issue #1189).
|
|
3
|
+
*
|
|
4
|
+
* `@cluesmith/codev-sdk/reconnect-policy` is the canonical home of this
|
|
5
|
+
* logic, but Tower itself needs two pieces of it server-side: the backoff
|
|
6
|
+
* curve for the tunnel control channel (`tunnel-client.ts`, Tower acting as a
|
|
7
|
+
* WS client of the cloud relay) and the session-unknown close code that
|
|
8
|
+
* `tower-websocket.ts` emits. The server must not import the client sdk
|
|
9
|
+
* (the issue's isolation invariant), and putting algorithm code in
|
|
10
|
+
* `@cluesmith/codev-types` breaks its wire-contracts-only rule, so this
|
|
11
|
+
* deliberate ~50-line duplication is the recorded resolution. If you change
|
|
12
|
+
* the curve or the close code, change both copies.
|
|
13
|
+
*/
|
|
14
|
+
const DEFAULT_BASE_MS = 1000;
|
|
15
|
+
const DEFAULT_CAP_MS = 30_000;
|
|
16
|
+
/**
|
|
17
|
+
* Compute the backoff delay for a given attempt index:
|
|
18
|
+
* `min(base * 2^attempt + jitter, cap)`, with an optional floor short-circuit
|
|
19
|
+
* applied first. The `attempt` index is explicit so each call site owns its
|
|
20
|
+
* own counter and increment ordering.
|
|
21
|
+
*/
|
|
22
|
+
export function backoffDelayMs(attempt, opts = {}) {
|
|
23
|
+
const { floor } = opts;
|
|
24
|
+
if (floor && attempt >= floor.afterAttempts) {
|
|
25
|
+
return floor.delayMs;
|
|
26
|
+
}
|
|
27
|
+
const base = opts.baseMs ?? DEFAULT_BASE_MS;
|
|
28
|
+
const cap = opts.capMs ?? DEFAULT_CAP_MS;
|
|
29
|
+
const jitterMs = opts.jitterMs ?? 0;
|
|
30
|
+
const random = opts.random ?? Math.random;
|
|
31
|
+
const safeAttempt = Math.max(0, attempt);
|
|
32
|
+
let jitter = 0;
|
|
33
|
+
if (jitterMs > 0) {
|
|
34
|
+
jitter = Math.floor(random() * jitterMs);
|
|
35
|
+
}
|
|
36
|
+
return Math.min(base * 2 ** safeAttempt + jitter, cap);
|
|
37
|
+
}
|
|
38
|
+
/**
|
|
39
|
+
* Application-range WebSocket close code Tower uses to tell a browser client
|
|
40
|
+
* that the terminal session is unknown/gone. Browsers can't read a failed
|
|
41
|
+
* *upgrade*'s HTTP status (they only see close `1006`), so Tower accepts the
|
|
42
|
+
* upgrade for browser clients and immediately closes with this code, which the
|
|
43
|
+
* dashboard reads via `CloseEvent.code` (#971). In the WS-spec private range
|
|
44
|
+
* (`4000–4999`); the mnemonic `4404` echoes HTTP 404.
|
|
45
|
+
*/
|
|
46
|
+
export const WS_CLOSE_SESSION_UNKNOWN = 4404;
|
|
47
|
+
//# sourceMappingURL=reconnect-backoff.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"reconnect-backoff.js","sourceRoot":"","sources":["../../../src/agent-farm/lib/reconnect-backoff.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;GAYG;AAwBH,MAAM,eAAe,GAAG,IAAI,CAAC;AAC7B,MAAM,cAAc,GAAG,MAAM,CAAC;AAE9B;;;;;GAKG;AACH,MAAM,UAAU,cAAc,CAAC,OAAe,EAAE,OAAuB,EAAE;IACvE,MAAM,EAAE,KAAK,EAAE,GAAG,IAAI,CAAC;IACvB,IAAI,KAAK,IAAI,OAAO,IAAI,KAAK,CAAC,aAAa,EAAE,CAAC;QAC5C,OAAO,KAAK,CAAC,OAAO,CAAC;IACvB,CAAC;IACD,MAAM,IAAI,GAAG,IAAI,CAAC,MAAM,IAAI,eAAe,CAAC;IAC5C,MAAM,GAAG,GAAG,IAAI,CAAC,KAAK,IAAI,cAAc,CAAC;IACzC,MAAM,QAAQ,GAAG,IAAI,CAAC,QAAQ,IAAI,CAAC,CAAC;IACpC,MAAM,MAAM,GAAG,IAAI,CAAC,MAAM,IAAI,IAAI,CAAC,MAAM,CAAC;IAC1C,MAAM,WAAW,GAAG,IAAI,CAAC,GAAG,CAAC,CAAC,EAAE,OAAO,CAAC,CAAC;IACzC,IAAI,MAAM,GAAG,CAAC,CAAC;IACf,IAAI,QAAQ,GAAG,CAAC,EAAE,CAAC;QACjB,MAAM,GAAG,IAAI,CAAC,KAAK,CAAC,MAAM,EAAE,GAAG,QAAQ,CAAC,CAAC;IAC3C,CAAC;IACD,OAAO,IAAI,CAAC,GAAG,CAAC,IAAI,GAAG,CAAC,IAAI,WAAW,GAAG,MAAM,EAAE,GAAG,CAAC,CAAC;AACzD,CAAC;AAED;;;;;;;GAOG;AACH,MAAM,CAAC,MAAM,wBAAwB,GAAG,IAAI,CAAC"}
|
|
@@ -1,10 +1,20 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* Tower API Client —
|
|
2
|
+
* Tower API Client — the CLI's composition of `@cluesmith/codev-sdk`.
|
|
3
3
|
*
|
|
4
|
-
*
|
|
5
|
-
*
|
|
4
|
+
* The sdk client is environment-agnostic and defaults to NO auth (issue
|
|
5
|
+
* #1189); this wrapper is where the CLI's Node entitlements are injected:
|
|
6
|
+
* the disk-backed local key (issuing it if missing, via codev-core) and the
|
|
7
|
+
* `BRIDGE_TOWER_HOST` environment override. Every CLI/Tower call site
|
|
8
|
+
* constructs through this module, so their behavior is identical to the
|
|
9
|
+
* pre-split client. Import path preserved for existing consumers.
|
|
6
10
|
*/
|
|
7
|
-
|
|
8
|
-
export
|
|
9
|
-
|
|
11
|
+
import { TowerClient as SdkTowerClient, type TowerClientOptions } from '@cluesmith/codev-sdk/tower-client';
|
|
12
|
+
export declare class TowerClient extends SdkTowerClient {
|
|
13
|
+
constructor(portOrOptions?: number | TowerClientOptions);
|
|
14
|
+
}
|
|
15
|
+
export { type TowerClientOptions, type TowerWorkspace, type TowerWorkspaceStatus, type TowerHealth, type TowerTunnelStatus, type TowerStatus, type TowerTerminal, type TerminalType, type HuskCandidate, type HuskPreview, type HuskSweepResult, } from '@cluesmith/codev-sdk/tower-client';
|
|
16
|
+
export { encodeWorkspacePath, decodeWorkspacePath } from '@cluesmith/codev-sdk/workspace';
|
|
17
|
+
export { DEFAULT_TOWER_PORT } from '@cluesmith/codev-sdk/constants';
|
|
18
|
+
export { AGENT_FARM_DIR } from '@cluesmith/codev-core/constants';
|
|
19
|
+
export declare function getTowerClient(port?: number): TowerClient;
|
|
10
20
|
//# sourceMappingURL=tower-client.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"tower-client.d.ts","sourceRoot":"","sources":["../../../src/agent-farm/lib/tower-client.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"tower-client.d.ts","sourceRoot":"","sources":["../../../src/agent-farm/lib/tower-client.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AAEH,OAAO,EACL,WAAW,IAAI,cAAc,EAC7B,KAAK,kBAAkB,EACxB,MAAM,mCAAmC,CAAC;AAI3C,qBAAa,WAAY,SAAQ,cAAc;gBACjC,aAAa,CAAC,EAAE,MAAM,GAAG,kBAAkB;CAaxD;AAED,OAAO,EACL,KAAK,kBAAkB,EACvB,KAAK,cAAc,EACnB,KAAK,oBAAoB,EACzB,KAAK,WAAW,EAChB,KAAK,iBAAiB,EACtB,KAAK,WAAW,EAChB,KAAK,aAAa,EAClB,KAAK,YAAY,EACjB,KAAK,aAAa,EAClB,KAAK,WAAW,EAChB,KAAK,eAAe,GACrB,MAAM,mCAAmC,CAAC;AAE3C,OAAO,EAAE,mBAAmB,EAAE,mBAAmB,EAAE,MAAM,gCAAgC,CAAC;AAC1F,OAAO,EAAE,kBAAkB,EAAE,MAAM,gCAAgC,CAAC;AACpE,OAAO,EAAE,cAAc,EAAE,MAAM,iCAAiC,CAAC;AAMjE,wBAAgB,cAAc,CAAC,IAAI,CAAC,EAAE,MAAM,GAAG,WAAW,CAKzD"}
|
|
@@ -1,10 +1,41 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* Tower API Client —
|
|
2
|
+
* Tower API Client — the CLI's composition of `@cluesmith/codev-sdk`.
|
|
3
3
|
*
|
|
4
|
-
*
|
|
5
|
-
*
|
|
4
|
+
* The sdk client is environment-agnostic and defaults to NO auth (issue
|
|
5
|
+
* #1189); this wrapper is where the CLI's Node entitlements are injected:
|
|
6
|
+
* the disk-backed local key (issuing it if missing, via codev-core) and the
|
|
7
|
+
* `BRIDGE_TOWER_HOST` environment override. Every CLI/Tower call site
|
|
8
|
+
* constructs through this module, so their behavior is identical to the
|
|
9
|
+
* pre-split client. Import path preserved for existing consumers.
|
|
6
10
|
*/
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
11
|
+
import { TowerClient as SdkTowerClient, } from '@cluesmith/codev-sdk/tower-client';
|
|
12
|
+
import { DEFAULT_TOWER_PORT } from '@cluesmith/codev-sdk/constants';
|
|
13
|
+
import { ensureLocalKey } from '@cluesmith/codev-core/auth';
|
|
14
|
+
export class TowerClient extends SdkTowerClient {
|
|
15
|
+
constructor(portOrOptions) {
|
|
16
|
+
let options;
|
|
17
|
+
if (typeof portOrOptions === 'number') {
|
|
18
|
+
options = { port: portOrOptions };
|
|
19
|
+
}
|
|
20
|
+
else {
|
|
21
|
+
options = portOrOptions ?? {};
|
|
22
|
+
}
|
|
23
|
+
super({
|
|
24
|
+
getAuthKey: ensureLocalKey,
|
|
25
|
+
host: process.env.BRIDGE_TOWER_HOST,
|
|
26
|
+
...options,
|
|
27
|
+
});
|
|
28
|
+
}
|
|
29
|
+
}
|
|
30
|
+
export { encodeWorkspacePath, decodeWorkspacePath } from '@cluesmith/codev-sdk/workspace';
|
|
31
|
+
export { DEFAULT_TOWER_PORT } from '@cluesmith/codev-sdk/constants';
|
|
32
|
+
export { AGENT_FARM_DIR } from '@cluesmith/codev-core/constants';
|
|
33
|
+
// ── Default client ─────────────────────────────────────────────
|
|
34
|
+
let defaultClient = null;
|
|
35
|
+
export function getTowerClient(port) {
|
|
36
|
+
if (!defaultClient || (port && port !== DEFAULT_TOWER_PORT)) {
|
|
37
|
+
defaultClient = new TowerClient({ port });
|
|
38
|
+
}
|
|
39
|
+
return defaultClient;
|
|
40
|
+
}
|
|
10
41
|
//# sourceMappingURL=tower-client.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"tower-client.js","sourceRoot":"","sources":["../../../src/agent-farm/lib/tower-client.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"tower-client.js","sourceRoot":"","sources":["../../../src/agent-farm/lib/tower-client.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AAEH,OAAO,EACL,WAAW,IAAI,cAAc,GAE9B,MAAM,mCAAmC,CAAC;AAC3C,OAAO,EAAE,kBAAkB,EAAE,MAAM,gCAAgC,CAAC;AACpE,OAAO,EAAE,cAAc,EAAE,MAAM,4BAA4B,CAAC;AAE5D,MAAM,OAAO,WAAY,SAAQ,cAAc;IAC7C,YAAY,aAA2C;QACrD,IAAI,OAA2B,CAAC;QAChC,IAAI,OAAO,aAAa,KAAK,QAAQ,EAAE,CAAC;YACtC,OAAO,GAAG,EAAE,IAAI,EAAE,aAAa,EAAE,CAAC;QACpC,CAAC;aAAM,CAAC;YACN,OAAO,GAAG,aAAa,IAAI,EAAE,CAAC;QAChC,CAAC;QACD,KAAK,CAAC;YACJ,UAAU,EAAE,cAAc;YAC1B,IAAI,EAAE,OAAO,CAAC,GAAG,CAAC,iBAAiB;YACnC,GAAG,OAAO;SACX,CAAC,CAAC;IACL,CAAC;CACF;AAgBD,OAAO,EAAE,mBAAmB,EAAE,mBAAmB,EAAE,MAAM,gCAAgC,CAAC;AAC1F,OAAO,EAAE,kBAAkB,EAAE,MAAM,gCAAgC,CAAC;AACpE,OAAO,EAAE,cAAc,EAAE,MAAM,iCAAiC,CAAC;AAEjE,kEAAkE;AAElE,IAAI,aAAa,GAAuB,IAAI,CAAC;AAE7C,MAAM,UAAU,cAAc,CAAC,IAAa;IAC1C,IAAI,CAAC,aAAa,IAAI,CAAC,IAAI,IAAI,IAAI,KAAK,kBAAkB,CAAC,EAAE,CAAC;QAC5D,aAAa,GAAG,IAAI,WAAW,CAAC,EAAE,IAAI,EAAE,CAAC,CAAC;IAC5C,CAAC;IACD,OAAO,aAAa,CAAC;AACvB,CAAC"}
|
|
@@ -30,11 +30,50 @@ export interface TowerMetadata {
|
|
|
30
30
|
workspacePath: string;
|
|
31
31
|
}>;
|
|
32
32
|
}
|
|
33
|
-
type StateChangeCallback = (state: TunnelState, previousState: TunnelState) => void;
|
|
33
|
+
type StateChangeCallback = (state: TunnelState, previousState: TunnelState, reason?: string) => void;
|
|
34
|
+
/**
|
|
35
|
+
* Header stamped on every request this client proxies in from the cloud (#1370).
|
|
36
|
+
*
|
|
37
|
+
* Requests reaching Tower through the tunnel arrive over localhost, so the
|
|
38
|
+
* socket address alone cannot tell them apart from a genuinely local caller.
|
|
39
|
+
* This marker makes the distinction explicit — Tower uses it both for source
|
|
40
|
+
* attribution in the log and to refuse cloud-originated management calls.
|
|
41
|
+
*
|
|
42
|
+
* Any inbound copy is stripped before stamping, so a cloud-side actor cannot
|
|
43
|
+
* forge or suppress it.
|
|
44
|
+
*/
|
|
45
|
+
export declare const TUNNEL_PROXY_HEADER = "x-codev-tunnel-proxy";
|
|
34
46
|
/** Heartbeat ping interval — send a WebSocket ping every 30 seconds */
|
|
35
47
|
export declare const PING_INTERVAL_MS = 30000;
|
|
36
48
|
/** Pong timeout — if no pong received within 10 seconds, declare connection dead */
|
|
37
49
|
export declare const PONG_TIMEOUT_MS = 10000;
|
|
50
|
+
/**
|
|
51
|
+
* Connect watchdog (#1372) — maximum time the client may sit in `connecting`.
|
|
52
|
+
*
|
|
53
|
+
* Neither the WebSocket handshake nor the auth-response wait has a deadline of
|
|
54
|
+
* its own: `ws` only enforces one when `handshakeTimeout` is passed, and Node
|
|
55
|
+
* applies no socket timeout by default. After an uplink flap a half-open path
|
|
56
|
+
* (stale NAT/conntrack entry) accepts the TCP connection and then goes silent,
|
|
57
|
+
* so no `error` or `close` event ever fires. The heartbeat can't help — it is
|
|
58
|
+
* armed only after `connected`. Without this watchdog the client parks in
|
|
59
|
+
* `connecting` forever and only a brand-new TunnelClient recovers it.
|
|
60
|
+
*/
|
|
61
|
+
export declare const CONNECT_TIMEOUT_MS = 20000;
|
|
62
|
+
/**
|
|
63
|
+
* Auth circuit-breaker half-open interval (#1372).
|
|
64
|
+
*
|
|
65
|
+
* `invalid_api_key` used to be terminal, which turns any misclassified auth
|
|
66
|
+
* error during a network blip into a permanent cloud outage. Retrying at a long
|
|
67
|
+
* interval costs one cheap round-trip every 15 minutes; a genuinely revoked key
|
|
68
|
+
* just fails again and re-parks.
|
|
69
|
+
*/
|
|
70
|
+
export declare const AUTH_RETRY_INTERVAL_MS: number;
|
|
71
|
+
/**
|
|
72
|
+
* Marks an `auth_failed` transition as a *repeat* park after a half-open retry
|
|
73
|
+
* (#1372). `tower-tunnel.ts` keys its "log the alarm once" rule off this, so it
|
|
74
|
+
* is a shared contract, not a free-form string — do not inline the literal.
|
|
75
|
+
*/
|
|
76
|
+
export declare const AUTH_RETRY_FAILED_MARKER = "half-open retry failed";
|
|
38
77
|
/**
|
|
39
78
|
* Calculate reconnection backoff with exponential increase and jitter.
|
|
40
79
|
* Exported for unit testing.
|
|
@@ -60,6 +99,14 @@ export declare function isBlockedPath(path: string): boolean;
|
|
|
60
99
|
* Exported for unit testing.
|
|
61
100
|
*/
|
|
62
101
|
export declare function filterHopByHopHeaders(headers: Record<string, string | string[] | undefined>): Record<string, string | string[]>;
|
|
102
|
+
/**
|
|
103
|
+
* Make any relay-supplied text safe to log: strip control characters (a
|
|
104
|
+
* newline would otherwise forge a tower log entry) and cap the length (an
|
|
105
|
+
* oversized payload would otherwise inflate the log). Every externally derived
|
|
106
|
+
* string that reaches a state-change reason must pass through here.
|
|
107
|
+
* Exported for testing.
|
|
108
|
+
*/
|
|
109
|
+
export declare function sanitizeRemoteDetail(text: string): string;
|
|
63
110
|
export declare class TunnelClient {
|
|
64
111
|
private options;
|
|
65
112
|
private state;
|
|
@@ -70,6 +117,7 @@ export declare class TunnelClient {
|
|
|
70
117
|
private h2Server;
|
|
71
118
|
private h2Session;
|
|
72
119
|
private reconnectTimer;
|
|
120
|
+
private connectTimeout;
|
|
73
121
|
private consecutiveFailures;
|
|
74
122
|
private rateLimitCount;
|
|
75
123
|
private destroyed;
|
|
@@ -77,6 +125,8 @@ export declare class TunnelClient {
|
|
|
77
125
|
private pongTimeout;
|
|
78
126
|
private pongReceived;
|
|
79
127
|
private heartbeatWs;
|
|
128
|
+
/** Suppresses repeat auth-failure alarms while the breaker half-opens (#1372) */
|
|
129
|
+
private authFailureLogged;
|
|
80
130
|
constructor(options: TunnelClientOptions);
|
|
81
131
|
getState(): TunnelState;
|
|
82
132
|
getUptime(): number | null;
|
|
@@ -114,13 +164,31 @@ export declare class TunnelClient {
|
|
|
114
164
|
*/
|
|
115
165
|
private pushMetadataViaHttp;
|
|
116
166
|
private clearReconnectTimer;
|
|
167
|
+
/**
|
|
168
|
+
* Schedule the next connect attempt.
|
|
169
|
+
*
|
|
170
|
+
* Callers increment `consecutiveFailures` *before* calling this (#1372).
|
|
171
|
+
* Previously the pong-timeout and close paths incremented first while the
|
|
172
|
+
* error and auth paths incremented after, so the same failure drew a
|
|
173
|
+
* different delay depending on which event happened to surface it — and for
|
|
174
|
+
* a WebSocket an `error` is always followed by a `close`, making that
|
|
175
|
+
* arbitrary. Unified on increment-first (what the majority of paths already
|
|
176
|
+
* did); the error path's first retry moves ~1.5s → ~2.5s.
|
|
177
|
+
*/
|
|
117
178
|
private scheduleReconnect;
|
|
179
|
+
private clearConnectTimeout;
|
|
118
180
|
private cleanup;
|
|
119
181
|
private startHeartbeat;
|
|
120
182
|
private stopHeartbeat;
|
|
121
183
|
private doConnect;
|
|
122
184
|
private onWsOpen;
|
|
123
185
|
private handleAuthError;
|
|
186
|
+
/**
|
|
187
|
+
* Half-open the auth circuit breaker (#1372): after AUTH_RETRY_INTERVAL_MS,
|
|
188
|
+
* leave `auth_failed` and try once more. A genuinely revoked key fails again
|
|
189
|
+
* and re-parks here, so the cost is one round-trip per interval.
|
|
190
|
+
*/
|
|
191
|
+
private scheduleAuthRetry;
|
|
124
192
|
private handleConnectionError;
|
|
125
193
|
private startH2Server;
|
|
126
194
|
private handleH2Stream;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"tunnel-client.d.ts","sourceRoot":"","sources":["../../../src/agent-farm/lib/tunnel-client.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AAWH,MAAM,WAAW,mBAAmB;IAClC,SAAS,EAAE,MAAM,CAAC;IAClB,MAAM,EAAE,MAAM,CAAC;IACf,OAAO,EAAE,MAAM,CAAC;IAChB,SAAS,EAAE,MAAM,CAAC;IAClB,mEAAmE;IACnE,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,sEAAsE;IACtE,WAAW,CAAC,EAAE,OAAO,CAAC;CACvB;AAED,MAAM,MAAM,WAAW,GAAG,cAAc,GAAG,YAAY,GAAG,WAAW,GAAG,aAAa,CAAC;AAEtF,MAAM,WAAW,aAAa;IAC5B,UAAU,EAAE,KAAK,CAAC;QAAE,IAAI,EAAE,MAAM,CAAC;QAAC,IAAI,EAAE,MAAM,CAAA;KAAE,CAAC,CAAC;IAClD,SAAS,EAAE,KAAK,CAAC;QAAE,EAAE,EAAE,MAAM,CAAC;QAAC,aAAa,EAAE,MAAM,CAAA;KAAE,CAAC,CAAC;CACzD;AAED,KAAK,mBAAmB,GAAG,
|
|
1
|
+
{"version":3,"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