agent-relay 1.3.2 → 1.5.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/README.md +130 -158
- package/bin/relay-pty +0 -0
- package/bin/relay-pty-darwin-arm64 +0 -0
- package/bin/relay-pty-darwin-x64 +0 -0
- package/bin/relay-pty-linux-x64 +0 -0
- package/deploy/workspace/entrypoint.sh +9 -0
- package/dist/bridge/spawner.d.ts +4 -4
- package/dist/bridge/spawner.js +58 -92
- package/dist/cli/index.d.ts +8 -6
- package/dist/cli/index.js +282 -47
- package/dist/cloud/api/daemons.js +13 -32
- package/dist/cloud/api/onboarding.js +2 -4
- package/dist/cloud/api/providers.js +6 -0
- package/dist/cloud/config.d.ts +1 -0
- package/dist/cloud/config.js +2 -0
- package/dist/cloud/db/bulk-ingest.d.ts +2 -1
- package/dist/cloud/db/drizzle.d.ts +21 -26
- package/dist/cloud/db/drizzle.js +87 -100
- package/dist/cloud/db/index.d.ts +6 -5
- package/dist/cloud/db/index.js +9 -8
- package/dist/cloud/db/schema.d.ts +1049 -1076
- package/dist/cloud/db/schema.js +59 -71
- package/dist/cloud/server.js +854 -18
- package/dist/cloud/services/persistence.d.ts +15 -15
- package/dist/cloud/services/persistence.js +14 -14
- package/dist/daemon/agent-manager.d.ts +6 -5
- package/dist/daemon/agent-manager.js +12 -8
- package/dist/daemon/channel-membership-store.d.ts +48 -0
- package/dist/daemon/channel-membership-store.js +149 -0
- package/dist/daemon/cloud-sync.d.ts +2 -0
- package/dist/daemon/cloud-sync.js +4 -0
- package/dist/daemon/connection.js +17 -9
- package/dist/daemon/router.d.ts +37 -0
- package/dist/daemon/router.js +318 -79
- package/dist/daemon/server.d.ts +15 -0
- package/dist/daemon/server.js +141 -3
- package/dist/dashboard/out/404.html +1 -0
- package/dist/dashboard/out/_next/static/IxxVRv94L1w3ReRGAiI-k/_buildManifest.js +1 -0
- package/dist/dashboard/out/_next/static/IxxVRv94L1w3ReRGAiI-k/_ssgManifest.js +1 -0
- package/dist/dashboard/out/_next/static/chunks/116-eacf84a131b80db9.js +1 -0
- package/dist/dashboard/out/_next/static/chunks/117-c8afed19e821a35d.js +2 -0
- package/dist/dashboard/out/_next/static/chunks/282-980c2eb8fff20123.js +1 -0
- package/dist/dashboard/out/_next/static/chunks/532-bace199897eeab37.js +9 -0
- package/dist/dashboard/out/_next/static/chunks/64-87ab9cd6bcf2f737.js +1 -0
- package/dist/dashboard/out/_next/static/chunks/648-acb2ff9f77cbfbd3.js +1 -0
- package/dist/dashboard/out/_next/static/chunks/766-aa7c8c9900ff5f53.js +1 -0
- package/dist/dashboard/out/_next/static/chunks/83-4f08122d4e7e79a6.js +1 -0
- package/dist/dashboard/out/_next/static/chunks/847-f1f467060f32afff.js +1 -0
- package/dist/dashboard/out/_next/static/chunks/891-a024fbe4b619cf6f.js +1 -0
- package/dist/dashboard/out/_next/static/chunks/app/_not-found/page-60501fddbafba9dc.js +1 -0
- package/dist/dashboard/out/_next/static/chunks/app/app/onboarding/page-f746f29e01fffc43.js +1 -0
- package/dist/dashboard/out/_next/static/chunks/app/app/page-ffad986adfcc8b31.js +1 -0
- package/dist/dashboard/out/_next/static/chunks/app/cloud/link/page-cfeb437f08a12ed9.js +1 -0
- package/dist/dashboard/out/_next/static/chunks/app/connect-repos/page-03ac6f35a6654ea6.js +1 -0
- package/dist/dashboard/out/_next/static/chunks/app/history/page-240f91e8b06ba8ac.js +1 -0
- package/dist/dashboard/out/_next/static/chunks/app/layout-c0d118c0f92d969c.js +1 -0
- package/dist/dashboard/out/_next/static/chunks/app/login/page-6ec54eee75877971.js +1 -0
- package/dist/dashboard/out/_next/static/chunks/app/metrics/page-82938ab8fcf44694.js +1 -0
- package/dist/dashboard/out/_next/static/chunks/app/page-671037943b2f2e43.js +1 -0
- package/dist/dashboard/out/_next/static/chunks/app/pricing/page-0efa024c28ba4597.js +1 -0
- package/dist/dashboard/out/_next/static/chunks/app/providers/page-57cbd738c6a73859.js +1 -0
- package/dist/dashboard/out/_next/static/chunks/app/providers/setup/[provider]/page-5ab0854472b402b0.js +1 -0
- package/dist/dashboard/out/_next/static/chunks/app/signup/page-18a4665665f6be11.js +1 -0
- package/dist/dashboard/out/_next/static/chunks/e868780c-48e5f147c90a3a41.js +18 -0
- package/dist/dashboard/out/_next/static/chunks/fd9d1056-609918ca7b6280bb.js +1 -0
- package/dist/dashboard/out/_next/static/chunks/framework-f66176bb897dc684.js +1 -0
- package/dist/dashboard/out/_next/static/chunks/main-5a40a5ae29646e1b.js +1 -0
- package/dist/dashboard/out/_next/static/chunks/main-app-6e8e8d3ef4e0192a.js +1 -0
- package/dist/dashboard/out/_next/static/chunks/pages/_app-72b849fbd24ac258.js +1 -0
- package/dist/dashboard/out/_next/static/chunks/pages/_error-7ba65e1336b92748.js +1 -0
- package/dist/dashboard/out/_next/static/chunks/polyfills-42372ed130431b0a.js +1 -0
- package/dist/dashboard/out/_next/static/chunks/webpack-1cdd8ed57114d5e1.js +1 -0
- package/dist/dashboard/out/_next/static/css/4034f236dd1a3178.css +1 -0
- package/dist/dashboard/out/_next/static/css/8f9ed310f454e5a5.css +1 -0
- package/dist/dashboard/out/alt-logos/agent-relay-logo-128.png +0 -0
- package/dist/dashboard/out/alt-logos/agent-relay-logo-256.png +0 -0
- package/dist/dashboard/out/alt-logos/agent-relay-logo-32.png +0 -0
- package/dist/dashboard/out/alt-logos/agent-relay-logo-512.png +0 -0
- package/dist/dashboard/out/alt-logos/agent-relay-logo-64.png +0 -0
- package/dist/dashboard/out/alt-logos/agent-relay-logo.svg +45 -0
- package/dist/dashboard/out/alt-logos/logo.svg +38 -0
- package/dist/dashboard/out/alt-logos/monogram-logo-128.png +0 -0
- package/dist/dashboard/out/alt-logos/monogram-logo-256.png +0 -0
- package/dist/dashboard/out/alt-logos/monogram-logo-32.png +0 -0
- package/dist/dashboard/out/alt-logos/monogram-logo-512.png +0 -0
- package/dist/dashboard/out/alt-logos/monogram-logo-64.png +0 -0
- package/dist/dashboard/out/alt-logos/monogram-logo.svg +38 -0
- package/dist/dashboard/out/app/onboarding.html +1 -0
- package/dist/dashboard/out/app/onboarding.txt +7 -0
- package/dist/dashboard/out/app.html +1 -0
- package/dist/dashboard/out/app.txt +7 -0
- package/dist/dashboard/out/apple-icon.png +0 -0
- package/dist/dashboard/out/cloud/link.html +1 -0
- package/dist/dashboard/out/cloud/link.txt +7 -0
- package/dist/dashboard/out/connect-repos.html +1 -0
- package/dist/dashboard/out/connect-repos.txt +7 -0
- package/dist/dashboard/out/history.html +1 -0
- package/dist/dashboard/out/history.txt +7 -0
- package/dist/dashboard/out/index.html +1 -0
- package/dist/dashboard/out/index.txt +7 -0
- package/dist/dashboard/out/login.html +5 -0
- package/dist/dashboard/out/login.txt +7 -0
- package/dist/dashboard/out/metrics.html +1 -0
- package/dist/dashboard/out/metrics.txt +7 -0
- package/dist/dashboard/out/pricing.html +13 -0
- package/dist/dashboard/out/pricing.txt +7 -0
- package/dist/dashboard/out/providers/setup/claude.html +1 -0
- package/dist/dashboard/out/providers/setup/claude.txt +8 -0
- package/dist/dashboard/out/providers/setup/codex.html +1 -0
- package/dist/dashboard/out/providers/setup/codex.txt +8 -0
- package/dist/dashboard/out/providers.html +1 -0
- package/dist/dashboard/out/providers.txt +7 -0
- package/dist/dashboard/out/signup.html +6 -0
- package/dist/dashboard/out/signup.txt +7 -0
- package/dist/dashboard-server/metrics.d.ts +105 -0
- package/dist/dashboard-server/metrics.js +193 -0
- package/dist/dashboard-server/needs-attention.d.ts +24 -0
- package/dist/dashboard-server/needs-attention.js +78 -0
- package/dist/dashboard-server/server.d.ts +15 -0
- package/dist/dashboard-server/server.js +4753 -0
- package/dist/dashboard-server/start.d.ts +6 -0
- package/dist/dashboard-server/start.js +13 -0
- package/dist/dashboard-server/user-bridge.d.ts +132 -0
- package/dist/dashboard-server/user-bridge.js +317 -0
- package/dist/protocol/channels.d.ts +14 -8
- package/dist/protocol/channels.js +1 -1
- package/dist/protocol/index.d.ts +1 -0
- package/dist/protocol/index.js +1 -0
- package/dist/protocol/relay-pty-schemas.d.ts +209 -0
- package/dist/protocol/relay-pty-schemas.js +60 -0
- package/dist/wrapper/auth-detection.js +8 -1
- package/dist/wrapper/base-wrapper.d.ts +11 -1
- package/dist/wrapper/base-wrapper.js +67 -6
- package/dist/wrapper/client.d.ts +49 -1
- package/dist/wrapper/client.js +167 -0
- package/dist/wrapper/parser.d.ts +0 -4
- package/dist/wrapper/parser.js +38 -10
- package/dist/wrapper/pty-wrapper.d.ts +12 -1
- package/dist/wrapper/pty-wrapper.js +104 -5
- package/dist/wrapper/relay-pty-orchestrator.d.ts +270 -0
- package/dist/wrapper/relay-pty-orchestrator.js +970 -0
- package/dist/wrapper/shared.d.ts +1 -1
- package/dist/wrapper/shared.js +14 -4
- package/dist/wrapper/tmux-wrapper.d.ts +13 -1
- package/dist/wrapper/tmux-wrapper.js +143 -29
- package/package.json +9 -4
- package/scripts/postinstall.js +101 -11
- package/.trajectories/active/traj_3yx9dy148mge.json +0 -42
- package/.trajectories/agent-relay-322-324.md +0 -17
- package/.trajectories/completed/2026-01/traj_03zupyv1s7b9.json +0 -49
- package/.trajectories/completed/2026-01/traj_03zupyv1s7b9.md +0 -31
- package/.trajectories/completed/2026-01/traj_0zacdjl1g4ht.json +0 -125
- package/.trajectories/completed/2026-01/traj_0zacdjl1g4ht.md +0 -62
- package/.trajectories/completed/2026-01/traj_1dviorhnkcb5.json +0 -65
- package/.trajectories/completed/2026-01/traj_1dviorhnkcb5.md +0 -37
- package/.trajectories/completed/2026-01/traj_1g7yx6qtg4ai.json +0 -49
- package/.trajectories/completed/2026-01/traj_1g7yx6qtg4ai.md +0 -31
- package/.trajectories/completed/2026-01/traj_1k5if5snst2e.json +0 -65
- package/.trajectories/completed/2026-01/traj_1k5if5snst2e.md +0 -37
- package/.trajectories/completed/2026-01/traj_1rp3rges5811.json +0 -49
- package/.trajectories/completed/2026-01/traj_1rp3rges5811.md +0 -31
- package/.trajectories/completed/2026-01/traj_22bhyulruouw.json +0 -113
- package/.trajectories/completed/2026-01/traj_22bhyulruouw.md +0 -57
- package/.trajectories/completed/2026-01/traj_2dao7ddgnta0.json +0 -53
- package/.trajectories/completed/2026-01/traj_2dao7ddgnta0.md +0 -32
- package/.trajectories/completed/2026-01/traj_33iuy72sezbk.json +0 -49
- package/.trajectories/completed/2026-01/traj_33iuy72sezbk.md +0 -31
- package/.trajectories/completed/2026-01/traj_3t0440mjeunc.json +0 -26
- package/.trajectories/completed/2026-01/traj_3t0440mjeunc.md +0 -6
- package/.trajectories/completed/2026-01/traj_45x9494d9xnr.json +0 -47
- package/.trajectories/completed/2026-01/traj_45x9494d9xnr.md +0 -32
- package/.trajectories/completed/2026-01/traj_4aa0bb77s4nh.json +0 -53
- package/.trajectories/completed/2026-01/traj_4aa0bb77s4nh.md +0 -32
- package/.trajectories/completed/2026-01/traj_4qwd4zmhfwp4.json +0 -49
- package/.trajectories/completed/2026-01/traj_4qwd4zmhfwp4.md +0 -31
- package/.trajectories/completed/2026-01/traj_5ammh5qtvklq.json +0 -77
- package/.trajectories/completed/2026-01/traj_5ammh5qtvklq.md +0 -42
- package/.trajectories/completed/2026-01/traj_5lhmzq8rxpqv.json +0 -59
- package/.trajectories/completed/2026-01/traj_5lhmzq8rxpqv.md +0 -33
- package/.trajectories/completed/2026-01/traj_5vr4e9erb1fs.json +0 -53
- package/.trajectories/completed/2026-01/traj_5vr4e9erb1fs.md +0 -32
- package/.trajectories/completed/2026-01/traj_6fgiwdoklvym.json +0 -48
- package/.trajectories/completed/2026-01/traj_6fgiwdoklvym.md +0 -24
- package/.trajectories/completed/2026-01/traj_6mieijqyvaag.json +0 -77
- package/.trajectories/completed/2026-01/traj_6mieijqyvaag.md +0 -42
- package/.trajectories/completed/2026-01/traj_6unwwmgyj5sq.json +0 -109
- package/.trajectories/completed/2026-01/traj_78ffm31jn3uk.json +0 -77
- package/.trajectories/completed/2026-01/traj_78ffm31jn3uk.md +0 -42
- package/.trajectories/completed/2026-01/traj_7ludwvz45veh.json +0 -209
- package/.trajectories/completed/2026-01/traj_7ludwvz45veh.md +0 -97
- package/.trajectories/completed/2026-01/traj_94gnp3k30goq.json +0 -66
- package/.trajectories/completed/2026-01/traj_94gnp3k30goq.md +0 -36
- package/.trajectories/completed/2026-01/traj_9921cuhel0pj.json +0 -48
- package/.trajectories/completed/2026-01/traj_9921cuhel0pj.md +0 -24
- package/.trajectories/completed/2026-01/traj_a0tqx8biw9c4.json +0 -49
- package/.trajectories/completed/2026-01/traj_a0tqx8biw9c4.md +0 -31
- package/.trajectories/completed/2026-01/traj_ajs7zqfux4wc.json +0 -49
- package/.trajectories/completed/2026-01/traj_ajs7zqfux4wc.md +0 -23
- package/.trajectories/completed/2026-01/traj_avqeghu6pz5a.json +0 -40
- package/.trajectories/completed/2026-01/traj_avqeghu6pz5a.md +0 -22
- package/.trajectories/completed/2026-01/traj_ax8uungxz2qh.json +0 -66
- package/.trajectories/completed/2026-01/traj_ax8uungxz2qh.md +0 -36
- package/.trajectories/completed/2026-01/traj_c9izbh2snpzf.json +0 -49
- package/.trajectories/completed/2026-01/traj_c9izbh2snpzf.md +0 -31
- package/.trajectories/completed/2026-01/traj_cpn70dw066nt.json +0 -65
- package/.trajectories/completed/2026-01/traj_cpn70dw066nt.md +0 -37
- package/.trajectories/completed/2026-01/traj_cvtqhlwcq9s0.json +0 -53
- package/.trajectories/completed/2026-01/traj_cvtqhlwcq9s0.md +0 -32
- package/.trajectories/completed/2026-01/traj_cxofprm2m2en.json +0 -49
- package/.trajectories/completed/2026-01/traj_cxofprm2m2en.md +0 -31
- package/.trajectories/completed/2026-01/traj_d2hhz3k0vrhn.json +0 -26
- package/.trajectories/completed/2026-01/traj_d2hhz3k0vrhn.md +0 -6
- package/.trajectories/completed/2026-01/traj_dcsp9s8y01ra.json +0 -121
- package/.trajectories/completed/2026-01/traj_dcsp9s8y01ra.md +0 -29
- package/.trajectories/completed/2026-01/traj_dfuvww9pege5.json +0 -59
- package/.trajectories/completed/2026-01/traj_dfuvww9pege5.md +0 -37
- package/.trajectories/completed/2026-01/traj_erglv2f8t9eh.json +0 -36
- package/.trajectories/completed/2026-01/traj_erglv2f8t9eh.md +0 -21
- package/.trajectories/completed/2026-01/traj_fhx9irlckht6.json +0 -53
- package/.trajectories/completed/2026-01/traj_fhx9irlckht6.md +0 -32
- package/.trajectories/completed/2026-01/traj_fqduidx3xbtp.json +0 -101
- package/.trajectories/completed/2026-01/traj_fqduidx3xbtp.md +0 -52
- package/.trajectories/completed/2026-01/traj_g0fisy9h51mf.json +0 -77
- package/.trajectories/completed/2026-01/traj_g0fisy9h51mf.md +0 -42
- package/.trajectories/completed/2026-01/traj_gjdre5voouod.json +0 -53
- package/.trajectories/completed/2026-01/traj_gjdre5voouod.md +0 -32
- package/.trajectories/completed/2026-01/traj_gtlyqtta3x8l.json +0 -25
- package/.trajectories/completed/2026-01/traj_gtlyqtta3x8l.md +0 -15
- package/.trajectories/completed/2026-01/traj_h4xijiuip3w4.json +0 -101
- package/.trajectories/completed/2026-01/traj_h4xijiuip3w4.md +0 -44
- package/.trajectories/completed/2026-01/traj_he75f24d1xfm.json +0 -101
- package/.trajectories/completed/2026-01/traj_he75f24d1xfm.md +0 -52
- package/.trajectories/completed/2026-01/traj_hf81ey93uz6t.json +0 -49
- package/.trajectories/completed/2026-01/traj_hf81ey93uz6t.md +0 -31
- package/.trajectories/completed/2026-01/traj_hfmki2jr9d4r.json +0 -65
- package/.trajectories/completed/2026-01/traj_hfmki2jr9d4r.md +0 -37
- package/.trajectories/completed/2026-01/traj_hhxte7w4gjjx.json +0 -22
- package/.trajectories/completed/2026-01/traj_hhxte7w4gjjx.md +0 -5
- package/.trajectories/completed/2026-01/traj_hpungyhoj6v5.json +0 -53
- package/.trajectories/completed/2026-01/traj_hpungyhoj6v5.md +0 -32
- package/.trajectories/completed/2026-01/traj_lgtodco7dp1n.json +0 -61
- package/.trajectories/completed/2026-01/traj_lgtodco7dp1n.md +0 -36
- package/.trajectories/completed/2026-01/traj_lq450ly148uw.json +0 -49
- package/.trajectories/completed/2026-01/traj_lq450ly148uw.md +0 -31
- package/.trajectories/completed/2026-01/traj_m2xkjv0w2sq7.json +0 -25
- package/.trajectories/completed/2026-01/traj_m2xkjv0w2sq7.md +0 -15
- package/.trajectories/completed/2026-01/traj_multi_server_arch.md +0 -101
- package/.trajectories/completed/2026-01/traj_noq5zbvnrdvz.json +0 -53
- package/.trajectories/completed/2026-01/traj_noq5zbvnrdvz.md +0 -32
- package/.trajectories/completed/2026-01/traj_ntbs6ppopf46.json +0 -53
- package/.trajectories/completed/2026-01/traj_ntbs6ppopf46.md +0 -32
- package/.trajectories/completed/2026-01/traj_oszg9flv74pk.json +0 -73
- package/.trajectories/completed/2026-01/traj_oszg9flv74pk.md +0 -41
- package/.trajectories/completed/2026-01/traj_ozd98si6a7ns.json +0 -48
- package/.trajectories/completed/2026-01/traj_ozd98si6a7ns.md +0 -24
- package/.trajectories/completed/2026-01/traj_prdza7a5cxp5.json +0 -53
- package/.trajectories/completed/2026-01/traj_prdza7a5cxp5.md +0 -32
- package/.trajectories/completed/2026-01/traj_psd9ob0j2ru3.json +0 -27
- package/.trajectories/completed/2026-01/traj_psd9ob0j2ru3.md +0 -14
- package/.trajectories/completed/2026-01/traj_pulomd3y8cvj.json +0 -77
- package/.trajectories/completed/2026-01/traj_pulomd3y8cvj.md +0 -42
- package/.trajectories/completed/2026-01/traj_qb3twvvywfwi.json +0 -77
- package/.trajectories/completed/2026-01/traj_qb3twvvywfwi.md +0 -42
- package/.trajectories/completed/2026-01/traj_qft54mi7nfor.json +0 -53
- package/.trajectories/completed/2026-01/traj_qft54mi7nfor.md +0 -32
- package/.trajectories/completed/2026-01/traj_qx9uhf8whhxo.json +0 -83
- package/.trajectories/completed/2026-01/traj_qx9uhf8whhxo.md +0 -47
- package/.trajectories/completed/2026-01/traj_rd9toccj18a0.json +0 -59
- package/.trajectories/completed/2026-01/traj_rd9toccj18a0.md +0 -37
- package/.trajectories/completed/2026-01/traj_rsavt0jipi3c.json +0 -109
- package/.trajectories/completed/2026-01/traj_rsavt0jipi3c.md +0 -56
- package/.trajectories/completed/2026-01/traj_rt4fiw3ecp50.json +0 -48
- package/.trajectories/completed/2026-01/traj_rt4fiw3ecp50.md +0 -16
- package/.trajectories/completed/2026-01/traj_st8j35b0hrlc.json +0 -59
- package/.trajectories/completed/2026-01/traj_st8j35b0hrlc.md +0 -37
- package/.trajectories/completed/2026-01/traj_t1yy8m7hbuxp.json +0 -53
- package/.trajectories/completed/2026-01/traj_t1yy8m7hbuxp.md +0 -32
- package/.trajectories/completed/2026-01/traj_tmux_orchestrator_analysis.json +0 -84
- package/.trajectories/completed/2026-01/traj_tmux_orchestrator_analysis.md +0 -109
- package/.trajectories/completed/2026-01/traj_u9n9eqasw16k.json +0 -53
- package/.trajectories/completed/2026-01/traj_u9n9eqasw16k.md +0 -32
- package/.trajectories/completed/2026-01/traj_ub8csuv3lcv4.json +0 -53
- package/.trajectories/completed/2026-01/traj_ub8csuv3lcv4.md +0 -32
- package/.trajectories/completed/2026-01/traj_uc29tlso8i9s.json +0 -186
- package/.trajectories/completed/2026-01/traj_uc29tlso8i9s.md +0 -86
- package/.trajectories/completed/2026-01/traj_ui9b4tqxoa7j.json +0 -77
- package/.trajectories/completed/2026-01/traj_ui9b4tqxoa7j.md +0 -42
- package/.trajectories/completed/2026-01/traj_v87hypnongqx.json +0 -71
- package/.trajectories/completed/2026-01/traj_v87hypnongqx.md +0 -42
- package/.trajectories/completed/2026-01/traj_v9dkdoxylyid.json +0 -89
- package/.trajectories/completed/2026-01/traj_v9dkdoxylyid.md +0 -47
- package/.trajectories/completed/2026-01/traj_wkp2fgzdyinb.json +0 -53
- package/.trajectories/completed/2026-01/traj_wkp2fgzdyinb.md +0 -32
- package/.trajectories/completed/2026-01/traj_x14t8w8rn7xg.json +0 -20
- package/.trajectories/completed/2026-01/traj_x14t8w8rn7xg.md +0 -6
- package/.trajectories/completed/2026-01/traj_x721m1j9rzup.json +0 -113
- package/.trajectories/completed/2026-01/traj_x721m1j9rzup.md +0 -57
- package/.trajectories/completed/2026-01/traj_xjqvmep5ed3h.json +0 -61
- package/.trajectories/completed/2026-01/traj_xjqvmep5ed3h.md +0 -36
- package/.trajectories/completed/2026-01/traj_xnwbznkvv8ua.json +0 -175
- package/.trajectories/completed/2026-01/traj_xnwbznkvv8ua.md +0 -82
- package/.trajectories/completed/2026-01/traj_xy9vifpqet80.json +0 -65
- package/.trajectories/completed/2026-01/traj_xy9vifpqet80.md +0 -37
- package/.trajectories/completed/2026-01/traj_y7aiwijyfmmv.json +0 -49
- package/.trajectories/completed/2026-01/traj_y7aiwijyfmmv.md +0 -31
- package/.trajectories/completed/2026-01/traj_y7n6hfbf7dmg.json +0 -49
- package/.trajectories/completed/2026-01/traj_y7n6hfbf7dmg.md +0 -31
- package/.trajectories/completed/2026-01/traj_ysjc8zaeqtd3.json +0 -47
- package/.trajectories/completed/2026-01/traj_ysjc8zaeqtd3.md +0 -32
- package/.trajectories/completed/2026-01/traj_yvdadtvdgnz3.json +0 -59
- package/.trajectories/completed/2026-01/traj_yvdadtvdgnz3.md +0 -37
- package/.trajectories/completed/2026-01/traj_yvfkwnkdiso2.json +0 -49
- package/.trajectories/completed/2026-01/traj_yvfkwnkdiso2.md +0 -31
- package/.trajectories/completed/2026-01/traj_z0vcw1wrzide.json +0 -53
- package/.trajectories/completed/2026-01/traj_z0vcw1wrzide.md +0 -32
- package/.trajectories/consolidate-settings-panel.md +0 -24
- package/.trajectories/gh-cli-user-token.md +0 -26
- package/.trajectories/index.json +0 -607
package/dist/bridge/spawner.js
CHANGED
|
@@ -8,22 +8,39 @@ import path from 'node:path';
|
|
|
8
8
|
import { sleep } from './utils.js';
|
|
9
9
|
import { getProjectPaths } from '../utils/project-namespace.js';
|
|
10
10
|
import { resolveCommand } from '../utils/command-resolver.js';
|
|
11
|
-
import {
|
|
11
|
+
import { RelayPtyOrchestrator } from '../wrapper/relay-pty-orchestrator.js';
|
|
12
12
|
import { selectShadowCli } from './shadow-cli.js';
|
|
13
13
|
import { AgentPolicyService } from '../policy/agent-policy.js';
|
|
14
14
|
import { buildClaudeArgs } from '../utils/agent-config.js';
|
|
15
15
|
import { getUserDirectoryService } from '../daemon/user-directory.js';
|
|
16
16
|
/**
|
|
17
|
-
* Get a
|
|
18
|
-
*
|
|
19
|
-
* Loading full docs (400+ lines) overwhelms agents and causes "meandering".
|
|
17
|
+
* Get relay protocol instructions for a spawned agent.
|
|
18
|
+
* This provides the agent with the communication protocol it needs to work with the relay.
|
|
20
19
|
*/
|
|
21
|
-
function
|
|
22
|
-
return
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
20
|
+
function getRelayInstructions(agentName) {
|
|
21
|
+
return [
|
|
22
|
+
'# Agent Relay Protocol',
|
|
23
|
+
'',
|
|
24
|
+
`You are agent "${agentName}" connected to Agent Relay for multi-agent coordination.`,
|
|
25
|
+
'',
|
|
26
|
+
'## Sending Messages',
|
|
27
|
+
'',
|
|
28
|
+
'Use fenced format for all messages:',
|
|
29
|
+
'->relay:TargetAgent <<<',
|
|
30
|
+
'Your message here.>>>',
|
|
31
|
+
'',
|
|
32
|
+
'## Communication Rules',
|
|
33
|
+
'',
|
|
34
|
+
'1. **ACK immediately** - When you receive a task:',
|
|
35
|
+
' ->relay:Sender <<<',
|
|
36
|
+
' ACK: Brief description of task received>>>',
|
|
37
|
+
'',
|
|
38
|
+
'2. **Report completion** - When done:',
|
|
39
|
+
' ->relay:Sender <<<',
|
|
40
|
+
' DONE: Brief summary of what was completed>>>',
|
|
41
|
+
'',
|
|
42
|
+
'3. Close >>> must immediately follow content (no blank lines before it)',
|
|
43
|
+
].join('\n');
|
|
27
44
|
}
|
|
28
45
|
export class AgentSpawner {
|
|
29
46
|
activeWorkers = new Map();
|
|
@@ -40,7 +57,9 @@ export class AgentSpawner {
|
|
|
40
57
|
constructor(projectRoot, _tmuxSession, dashboardPort) {
|
|
41
58
|
const paths = getProjectPaths(projectRoot);
|
|
42
59
|
this.projectRoot = paths.projectRoot;
|
|
43
|
-
|
|
60
|
+
// Use connected-agents.json (live socket connections) instead of agents.json (historical registry)
|
|
61
|
+
// This ensures spawned agents have actual daemon connections for channel message delivery
|
|
62
|
+
this.agentsPath = path.join(paths.teamDir, 'connected-agents.json');
|
|
44
63
|
this.socketPath = paths.socketPath;
|
|
45
64
|
this.logsDir = path.join(paths.teamDir, 'worker-logs');
|
|
46
65
|
this.workersPath = path.join(paths.teamDir, 'workers.json');
|
|
@@ -94,7 +113,7 @@ export class AgentSpawner {
|
|
|
94
113
|
this.onAgentDeath = callback;
|
|
95
114
|
}
|
|
96
115
|
/**
|
|
97
|
-
* Set cloud persistence handler for forwarding
|
|
116
|
+
* Set cloud persistence handler for forwarding RelayPtyOrchestrator events.
|
|
98
117
|
* When set, 'summary' and 'session-end' events from spawned agents
|
|
99
118
|
* are forwarded to the handler for cloud persistence (PostgreSQL/Redis).
|
|
100
119
|
*
|
|
@@ -105,7 +124,7 @@ export class AgentSpawner {
|
|
|
105
124
|
console.log('[spawner] Cloud persistence handler set');
|
|
106
125
|
}
|
|
107
126
|
/**
|
|
108
|
-
* Bind cloud persistence event handlers to a
|
|
127
|
+
* Bind cloud persistence event handlers to a RelayPtyOrchestrator.
|
|
109
128
|
* Returns the listener references for cleanup.
|
|
110
129
|
*/
|
|
111
130
|
bindCloudPersistenceEvents(name, pty) {
|
|
@@ -132,7 +151,7 @@ export class AgentSpawner {
|
|
|
132
151
|
return { summary: summaryListener, sessionEnd: sessionEndListener };
|
|
133
152
|
}
|
|
134
153
|
/**
|
|
135
|
-
* Unbind all tracked listeners from a
|
|
154
|
+
* Unbind all tracked listeners from a RelayPtyOrchestrator.
|
|
136
155
|
*/
|
|
137
156
|
unbindListeners(pty, listeners) {
|
|
138
157
|
if (!listeners)
|
|
@@ -209,6 +228,14 @@ export class AgentSpawner {
|
|
|
209
228
|
if (isCodexCli && !args.includes('--dangerously-bypass-approvals-and-sandbox')) {
|
|
210
229
|
args.push('--dangerously-bypass-approvals-and-sandbox');
|
|
211
230
|
}
|
|
231
|
+
// Inject relay protocol instructions via CLI-specific system prompt
|
|
232
|
+
const relayInstructions = getRelayInstructions(name);
|
|
233
|
+
if (isClaudeCli && !args.includes('--append-system-prompt')) {
|
|
234
|
+
args.push('--append-system-prompt', relayInstructions);
|
|
235
|
+
}
|
|
236
|
+
else if (isCodexCli && !args.some(a => a.includes('developer_instructions'))) {
|
|
237
|
+
args.push('--config', `developer_instructions=${relayInstructions}`);
|
|
238
|
+
}
|
|
212
239
|
if (debug)
|
|
213
240
|
console.log(`[spawner:debug] Spawning ${name} with: ${command} ${args.join(' ')}`);
|
|
214
241
|
// Create PtyWrapper config
|
|
@@ -233,20 +260,22 @@ export class AgentSpawner {
|
|
|
233
260
|
});
|
|
234
261
|
}
|
|
235
262
|
}
|
|
263
|
+
if (debug)
|
|
264
|
+
console.log(`[spawner:debug] Socket path for ${name}: ${this.socketPath ?? 'undefined'}`);
|
|
236
265
|
const ptyConfig = {
|
|
237
266
|
name,
|
|
238
267
|
command,
|
|
239
268
|
args,
|
|
240
269
|
socketPath: this.socketPath,
|
|
241
270
|
cwd: agentCwd,
|
|
242
|
-
logsDir: this.logsDir,
|
|
243
271
|
dashboardPort: this.dashboardPort,
|
|
244
272
|
env: userEnv,
|
|
245
|
-
|
|
246
|
-
interactive: request.interactive,
|
|
273
|
+
streamLogs: true,
|
|
247
274
|
// Shadow agent configuration
|
|
248
275
|
shadowOf: request.shadowOf,
|
|
249
276
|
shadowSpeakOn: request.shadowSpeakOn,
|
|
277
|
+
// Skip continuity for spawned agents - they're short-lived workers
|
|
278
|
+
skipContinuity: true,
|
|
250
279
|
// Only use callbacks if dashboardPort is not set (for backwards compatibility)
|
|
251
280
|
onSpawn: this.dashboardPort ? undefined : async (workerName, workerCli, workerTask) => {
|
|
252
281
|
// Handle nested spawn requests (legacy path, may fail in non-TTY)
|
|
@@ -295,8 +324,8 @@ export class AgentSpawner {
|
|
|
295
324
|
}
|
|
296
325
|
},
|
|
297
326
|
};
|
|
298
|
-
// Create and start the pty
|
|
299
|
-
const pty = new
|
|
327
|
+
// Create and start the relay-pty orchestrator
|
|
328
|
+
const pty = new RelayPtyOrchestrator(ptyConfig);
|
|
300
329
|
// Track listener references for proper cleanup
|
|
301
330
|
const listeners = {};
|
|
302
331
|
// Hook up output events for live log streaming
|
|
@@ -330,72 +359,9 @@ export class AgentSpawner {
|
|
|
330
359
|
error,
|
|
331
360
|
};
|
|
332
361
|
}
|
|
333
|
-
//
|
|
334
|
-
//
|
|
335
|
-
|
|
336
|
-
// Only prepend relay reminder if we have an actual task
|
|
337
|
-
// Empty task = interactive mode, user will respond to prompts directly
|
|
338
|
-
if (fullMessage.trim()) {
|
|
339
|
-
// Prepend a brief relay reminder (agents have full docs via CLAUDE.md)
|
|
340
|
-
// Note: Previously loaded full 400+ line docs which overwhelmed agents
|
|
341
|
-
const relayReminder = getMinimalRelayReminder();
|
|
342
|
-
if (relayReminder) {
|
|
343
|
-
fullMessage = `${relayReminder}\n\n---\n\n${fullMessage}`;
|
|
344
|
-
if (debug)
|
|
345
|
-
console.log(`[spawner:debug] Prepended relay reminder for ${name}`);
|
|
346
|
-
}
|
|
347
|
-
}
|
|
348
|
-
// Prepend policy instructions if enforcement is enabled (only if we have a task)
|
|
349
|
-
if (fullMessage.trim() && this.policyEnforcementEnabled && this.policyService) {
|
|
350
|
-
const policyInstruction = await this.policyService.getPolicyInstruction(name);
|
|
351
|
-
if (policyInstruction) {
|
|
352
|
-
fullMessage = `${policyInstruction}\n\n${fullMessage}`;
|
|
353
|
-
if (debug)
|
|
354
|
-
console.log(`[spawner:debug] Prepended policy instructions to task for ${name}`);
|
|
355
|
-
}
|
|
356
|
-
}
|
|
357
|
-
// Send task via relay message if provided (not via direct PTY injection)
|
|
358
|
-
// This ensures the agent is ready to receive before processing the task
|
|
359
|
-
if (fullMessage && fullMessage.trim()) {
|
|
360
|
-
if (debug)
|
|
361
|
-
console.log(`[spawner:debug] Will send task via relay: ${fullMessage.substring(0, 50)}...`);
|
|
362
|
-
// If we have dashboard API, send task as relay message
|
|
363
|
-
if (this.dashboardPort) {
|
|
364
|
-
// Wait a moment for the agent's relay client to be ready
|
|
365
|
-
await sleep(1000);
|
|
366
|
-
try {
|
|
367
|
-
const response = await fetch(`http://localhost:${this.dashboardPort}/api/send`, {
|
|
368
|
-
method: 'POST',
|
|
369
|
-
headers: { 'Content-Type': 'application/json' },
|
|
370
|
-
body: JSON.stringify({
|
|
371
|
-
to: name,
|
|
372
|
-
message: fullMessage,
|
|
373
|
-
from: '__spawner__',
|
|
374
|
-
}),
|
|
375
|
-
});
|
|
376
|
-
const result = await response.json();
|
|
377
|
-
if (result.success) {
|
|
378
|
-
if (debug)
|
|
379
|
-
console.log(`[spawner:debug] Task sent via relay to ${name}`);
|
|
380
|
-
}
|
|
381
|
-
else {
|
|
382
|
-
console.warn(`[spawner] Failed to send task via relay: ${result.error}`);
|
|
383
|
-
// Fall back to direct injection
|
|
384
|
-
pty.write(fullMessage + '\r');
|
|
385
|
-
}
|
|
386
|
-
}
|
|
387
|
-
catch (err) {
|
|
388
|
-
console.warn(`[spawner] Relay send failed, falling back to direct injection: ${err.message}`);
|
|
389
|
-
pty.write(fullMessage + '\r');
|
|
390
|
-
}
|
|
391
|
-
}
|
|
392
|
-
else {
|
|
393
|
-
// No dashboard API available - use direct injection as fallback
|
|
394
|
-
if (debug)
|
|
395
|
-
console.log(`[spawner:debug] No dashboard API, using direct injection`);
|
|
396
|
-
pty.write(fullMessage + '\r');
|
|
397
|
-
}
|
|
398
|
-
}
|
|
362
|
+
// Note: Task is NOT sent here. The spawning agent (wrapper) waits for the worker
|
|
363
|
+
// to come online and then sends the task via normal relay message.
|
|
364
|
+
// This avoids race conditions with the agent's readyForMessages state.
|
|
399
365
|
// Track the worker
|
|
400
366
|
const workerInfo = {
|
|
401
367
|
name,
|
|
@@ -669,15 +635,15 @@ export class AgentSpawner {
|
|
|
669
635
|
return false;
|
|
670
636
|
try {
|
|
671
637
|
const raw = JSON.parse(fs.readFileSync(this.agentsPath, 'utf-8'));
|
|
672
|
-
|
|
673
|
-
|
|
674
|
-
|
|
675
|
-
|
|
676
|
-
|
|
677
|
-
return agents.some((a) => a
|
|
638
|
+
// connected-agents.json format: { agents: string[], users: string[], updatedAt: number }
|
|
639
|
+
// agents is a string array of connected agent names (not objects)
|
|
640
|
+
const agents = Array.isArray(raw?.agents) ? raw.agents : [];
|
|
641
|
+
// Case-insensitive check to match router behavior
|
|
642
|
+
const lowerName = name.toLowerCase();
|
|
643
|
+
return agents.some((a) => typeof a === 'string' && a.toLowerCase() === lowerName);
|
|
678
644
|
}
|
|
679
645
|
catch (err) {
|
|
680
|
-
console.error('[spawner] Failed to read agents
|
|
646
|
+
console.error('[spawner] Failed to read connected-agents.json:', err.message);
|
|
681
647
|
return false;
|
|
682
648
|
}
|
|
683
649
|
}
|
package/dist/cli/index.d.ts
CHANGED
|
@@ -3,12 +3,14 @@
|
|
|
3
3
|
* Agent Relay CLI
|
|
4
4
|
*
|
|
5
5
|
* Commands:
|
|
6
|
-
* relay
|
|
7
|
-
* relay -
|
|
8
|
-
* relay
|
|
9
|
-
* relay
|
|
10
|
-
* relay
|
|
11
|
-
* relay
|
|
6
|
+
* relay claude - Start daemon + Dashboard coordinator with Claude
|
|
7
|
+
* relay codex - Start daemon + Dasbboard coordinator with Codex
|
|
8
|
+
* relay create-agent <cmd> - Wrap agent with real-time messaging
|
|
9
|
+
* relay create-agent -n Name cmd - Wrap with specific agent name
|
|
10
|
+
* relay up - Start daemon + dashboard
|
|
11
|
+
* relay read <id> - Read full message by ID
|
|
12
|
+
* relay agents - List connected agents
|
|
13
|
+
* relay who - Show currently active agents
|
|
12
14
|
*/
|
|
13
15
|
export {};
|
|
14
16
|
//# sourceMappingURL=index.d.ts.map
|