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/cloud/db/schema.js
CHANGED
|
@@ -118,8 +118,6 @@ export const workspacesRelations = relations(workspaces, ({ one, many }) => ({
|
|
|
118
118
|
}),
|
|
119
119
|
members: many(workspaceMembers),
|
|
120
120
|
repositories: many(repositories),
|
|
121
|
-
linkedDaemons: many(linkedDaemons),
|
|
122
|
-
messages: many(agentMessages),
|
|
123
121
|
}));
|
|
124
122
|
// ============================================================================
|
|
125
123
|
// Workspace Members
|
|
@@ -231,7 +229,6 @@ export const repositoriesRelations = relations(repositories, ({ one }) => ({
|
|
|
231
229
|
export const linkedDaemons = pgTable('linked_daemons', {
|
|
232
230
|
id: uuid('id').primaryKey().defaultRandom(),
|
|
233
231
|
userId: uuid('user_id').notNull().references(() => users.id, { onDelete: 'cascade' }),
|
|
234
|
-
workspaceId: uuid('workspace_id').references(() => workspaces.id, { onDelete: 'set null' }),
|
|
235
232
|
name: varchar('name', { length: 255 }).notNull(),
|
|
236
233
|
machineId: varchar('machine_id', { length: 255 }).notNull(),
|
|
237
234
|
apiKeyHash: varchar('api_key_hash', { length: 255 }).notNull(),
|
|
@@ -240,16 +237,17 @@ export const linkedDaemons = pgTable('linked_daemons', {
|
|
|
240
237
|
metadata: jsonb('metadata').notNull().default({}),
|
|
241
238
|
pendingUpdates: jsonb('pending_updates').notNull().default([]),
|
|
242
239
|
messageQueue: jsonb('message_queue').notNull().default([]),
|
|
240
|
+
workspaceId: uuid('workspace_id').references(() => workspaces.id, { onDelete: 'set null' }),
|
|
243
241
|
createdAt: timestamp('created_at').defaultNow().notNull(),
|
|
244
242
|
updatedAt: timestamp('updated_at').defaultNow().notNull(),
|
|
245
243
|
}, (table) => ({
|
|
246
244
|
userMachineIdx: unique('linked_daemons_user_machine_unique').on(table.userId, table.machineId),
|
|
247
245
|
userIdIdx: index('idx_linked_daemons_user_id').on(table.userId),
|
|
248
|
-
workspaceIdIdx: index('idx_linked_daemons_workspace_id').on(table.workspaceId),
|
|
249
246
|
apiKeyHashIdx: index('idx_linked_daemons_api_key_hash').on(table.apiKeyHash),
|
|
250
247
|
statusIdx: index('idx_linked_daemons_status').on(table.status),
|
|
248
|
+
workspaceIdIdx: index('idx_linked_daemons_workspace_id').on(table.workspaceId),
|
|
251
249
|
}));
|
|
252
|
-
export const linkedDaemonsRelations = relations(linkedDaemons, ({ one
|
|
250
|
+
export const linkedDaemonsRelations = relations(linkedDaemons, ({ one }) => ({
|
|
253
251
|
user: one(users, {
|
|
254
252
|
fields: [linkedDaemons.userId],
|
|
255
253
|
references: [users.id],
|
|
@@ -258,7 +256,6 @@ export const linkedDaemonsRelations = relations(linkedDaemons, ({ one, many }) =
|
|
|
258
256
|
fields: [linkedDaemons.workspaceId],
|
|
259
257
|
references: [workspaces.id],
|
|
260
258
|
}),
|
|
261
|
-
messages: many(agentMessages),
|
|
262
259
|
}));
|
|
263
260
|
// ============================================================================
|
|
264
261
|
// Subscriptions (billing)
|
|
@@ -290,6 +287,62 @@ export const usageRecords = pgTable('usage_records', {
|
|
|
290
287
|
recordedAtIdx: index('idx_usage_records_recorded_at').on(table.recordedAt),
|
|
291
288
|
}));
|
|
292
289
|
// ============================================================================
|
|
290
|
+
// Channels (workspace-scoped messaging channels)
|
|
291
|
+
// ============================================================================
|
|
292
|
+
export const channels = pgTable('channels', {
|
|
293
|
+
id: uuid('id').primaryKey().defaultRandom(),
|
|
294
|
+
workspaceId: uuid('workspace_id').notNull().references(() => workspaces.id, { onDelete: 'cascade' }),
|
|
295
|
+
/** Channel identifier (e.g., '#general', '#random', 'dm:user1:user2') */
|
|
296
|
+
channelId: varchar('channel_id', { length: 255 }).notNull(),
|
|
297
|
+
/** Display name (without # prefix) */
|
|
298
|
+
name: varchar('name', { length: 255 }).notNull(),
|
|
299
|
+
description: text('description'),
|
|
300
|
+
/** Channel type: 'public', 'private', 'dm' */
|
|
301
|
+
visibility: varchar('visibility', { length: 50 }).notNull().default('public'),
|
|
302
|
+
/** Channel status: 'active', 'archived' */
|
|
303
|
+
status: varchar('status', { length: 50 }).notNull().default('active'),
|
|
304
|
+
createdBy: varchar('created_by', { length: 255 }),
|
|
305
|
+
createdAt: timestamp('created_at').defaultNow().notNull(),
|
|
306
|
+
updatedAt: timestamp('updated_at').defaultNow().notNull(),
|
|
307
|
+
lastActivityAt: timestamp('last_activity_at'),
|
|
308
|
+
}, (table) => ({
|
|
309
|
+
workspaceChannelIdx: unique('channels_workspace_channel_unique').on(table.workspaceId, table.channelId),
|
|
310
|
+
workspaceIdIdx: index('idx_channels_workspace_id').on(table.workspaceId),
|
|
311
|
+
statusIdx: index('idx_channels_status').on(table.status),
|
|
312
|
+
}));
|
|
313
|
+
export const channelsRelations = relations(channels, ({ one, many }) => ({
|
|
314
|
+
workspace: one(workspaces, {
|
|
315
|
+
fields: [channels.workspaceId],
|
|
316
|
+
references: [workspaces.id],
|
|
317
|
+
}),
|
|
318
|
+
members: many(channelMembers),
|
|
319
|
+
}));
|
|
320
|
+
// ============================================================================
|
|
321
|
+
// Channel Members (who's in each channel)
|
|
322
|
+
// ============================================================================
|
|
323
|
+
export const channelMembers = pgTable('channel_members', {
|
|
324
|
+
id: uuid('id').primaryKey().defaultRandom(),
|
|
325
|
+
channelId: uuid('channel_id').notNull().references(() => channels.id, { onDelete: 'cascade' }),
|
|
326
|
+
/** Member identifier (username or agent name) */
|
|
327
|
+
memberId: varchar('member_id', { length: 255 }).notNull(),
|
|
328
|
+
/** Member type: 'user' or 'agent' */
|
|
329
|
+
memberType: varchar('member_type', { length: 50 }).notNull().default('user'),
|
|
330
|
+
/** Role in channel: 'owner', 'admin', 'member' */
|
|
331
|
+
role: varchar('role', { length: 50 }).notNull().default('member'),
|
|
332
|
+
joinedAt: timestamp('joined_at').defaultNow().notNull(),
|
|
333
|
+
invitedBy: varchar('invited_by', { length: 255 }),
|
|
334
|
+
}, (table) => ({
|
|
335
|
+
channelMemberIdx: unique('channel_members_channel_member_unique').on(table.channelId, table.memberId),
|
|
336
|
+
channelIdIdx: index('idx_channel_members_channel_id').on(table.channelId),
|
|
337
|
+
memberIdIdx: index('idx_channel_members_member_id').on(table.memberId),
|
|
338
|
+
}));
|
|
339
|
+
export const channelMembersRelations = relations(channelMembers, ({ one }) => ({
|
|
340
|
+
channel: one(channels, {
|
|
341
|
+
fields: [channelMembers.channelId],
|
|
342
|
+
references: [channels.id],
|
|
343
|
+
}),
|
|
344
|
+
}));
|
|
345
|
+
// ============================================================================
|
|
293
346
|
// Agent Sessions (cloud persistence for PtyWrapper agents)
|
|
294
347
|
// ============================================================================
|
|
295
348
|
export const agentSessions = pgTable('agent_sessions', {
|
|
@@ -554,69 +607,4 @@ export const commentMentionsRelations = relations(commentMentions, ({ one }) =>
|
|
|
554
607
|
references: [repositories.id],
|
|
555
608
|
}),
|
|
556
609
|
}));
|
|
557
|
-
/**
|
|
558
|
-
* Agent messages table - stores all relay messages for search and history.
|
|
559
|
-
*
|
|
560
|
-
* Retention policy:
|
|
561
|
-
* - Free tier: 30 days (enforced via expires_at)
|
|
562
|
-
* - Pro tier: 90 days
|
|
563
|
-
* - Enterprise: Unlimited (no expires_at set)
|
|
564
|
-
*
|
|
565
|
-
* Messages are synced from daemon SQLite to cloud PostgreSQL.
|
|
566
|
-
*/
|
|
567
|
-
export const agentMessages = pgTable('agent_messages', {
|
|
568
|
-
id: uuid('id').primaryKey().defaultRandom(),
|
|
569
|
-
// Scoping
|
|
570
|
-
workspaceId: uuid('workspace_id').notNull().references(() => workspaces.id, { onDelete: 'cascade' }),
|
|
571
|
-
daemonId: uuid('daemon_id').references(() => linkedDaemons.id, { onDelete: 'set null' }),
|
|
572
|
-
// Original message ID from daemon (for deduplication)
|
|
573
|
-
originalId: varchar('original_id', { length: 255 }).notNull(),
|
|
574
|
-
// Core message fields (aligned with StoredMessage)
|
|
575
|
-
fromAgent: varchar('from_agent', { length: 255 }).notNull(),
|
|
576
|
-
toAgent: varchar('to_agent', { length: 255 }).notNull(), // '*' for broadcast
|
|
577
|
-
body: text('body').notNull(),
|
|
578
|
-
// Message classification
|
|
579
|
-
kind: varchar('kind', { length: 50 }).notNull().default('message'), // message, action, state, thinking
|
|
580
|
-
topic: varchar('topic', { length: 255 }),
|
|
581
|
-
thread: varchar('thread', { length: 255 }), // Thread ID for grouping
|
|
582
|
-
channel: varchar('channel', { length: 255 }), // Channel name if channel message
|
|
583
|
-
// Flags
|
|
584
|
-
isBroadcast: boolean('is_broadcast').notNull().default(false),
|
|
585
|
-
isUrgent: boolean('is_urgent').notNull().default(false),
|
|
586
|
-
// Optional structured data
|
|
587
|
-
data: jsonb('data').$type(),
|
|
588
|
-
payloadMeta: jsonb('payload_meta').$type(),
|
|
589
|
-
// Timestamps
|
|
590
|
-
messageTs: timestamp('message_ts').notNull(), // Original message timestamp from daemon
|
|
591
|
-
createdAt: timestamp('created_at').defaultNow().notNull(), // When synced to cloud
|
|
592
|
-
expiresAt: timestamp('expires_at'), // Retention policy - null = never expires
|
|
593
|
-
// Search/indexing tracking
|
|
594
|
-
indexedAt: timestamp('indexed_at'), // When sent to Algolia (null = not indexed)
|
|
595
|
-
}, (table) => ({
|
|
596
|
-
// Primary lookups
|
|
597
|
-
workspaceIdIdx: index('idx_agent_messages_workspace_id').on(table.workspaceId),
|
|
598
|
-
daemonIdIdx: index('idx_agent_messages_daemon_id').on(table.daemonId),
|
|
599
|
-
// Deduplication - prevent duplicate sync
|
|
600
|
-
workspaceOriginalIdx: unique('agent_messages_workspace_original_unique').on(table.workspaceId, table.originalId),
|
|
601
|
-
// Query patterns
|
|
602
|
-
fromAgentIdx: index('idx_agent_messages_from_agent').on(table.fromAgent),
|
|
603
|
-
toAgentIdx: index('idx_agent_messages_to_agent').on(table.toAgent),
|
|
604
|
-
threadIdx: index('idx_agent_messages_thread').on(table.thread),
|
|
605
|
-
channelIdx: index('idx_agent_messages_channel').on(table.channel),
|
|
606
|
-
messageTsIdx: index('idx_agent_messages_message_ts').on(table.messageTs),
|
|
607
|
-
// Retention cleanup
|
|
608
|
-
expiresAtIdx: index('idx_agent_messages_expires_at').on(table.expiresAt),
|
|
609
|
-
// Search indexing queue
|
|
610
|
-
indexedAtIdx: index('idx_agent_messages_indexed_at').on(table.indexedAt),
|
|
611
|
-
}));
|
|
612
|
-
export const agentMessagesRelations = relations(agentMessages, ({ one }) => ({
|
|
613
|
-
workspace: one(workspaces, {
|
|
614
|
-
fields: [agentMessages.workspaceId],
|
|
615
|
-
references: [workspaces.id],
|
|
616
|
-
}),
|
|
617
|
-
daemon: one(linkedDaemons, {
|
|
618
|
-
fields: [agentMessages.daemonId],
|
|
619
|
-
references: [linkedDaemons.id],
|
|
620
|
-
}),
|
|
621
|
-
}));
|
|
622
610
|
//# sourceMappingURL=schema.js.map
|