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
|
@@ -12,7 +12,7 @@
|
|
|
12
12
|
* - Chunk processing for memory efficiency
|
|
13
13
|
*/
|
|
14
14
|
import { Pool } from 'pg';
|
|
15
|
-
|
|
15
|
+
type NewAgentMessage = Record<string, unknown>;
|
|
16
16
|
export interface PoolConfig {
|
|
17
17
|
connectionString: string;
|
|
18
18
|
/** Maximum number of connections in pool (default: 20) */
|
|
@@ -85,4 +85,5 @@ export declare function checkPoolHealth(pool: Pool): Promise<{
|
|
|
85
85
|
latencyMs: number;
|
|
86
86
|
error?: string;
|
|
87
87
|
}>;
|
|
88
|
+
export {};
|
|
88
89
|
//# sourceMappingURL=bulk-ingest.d.ts.map
|
|
@@ -116,7 +116,6 @@ export interface LinkedDaemonQueries {
|
|
|
116
116
|
delete(id: string): Promise<void>;
|
|
117
117
|
markStale(): Promise<number>;
|
|
118
118
|
getAllAgentsForUser(userId: string): Promise<DaemonAgentInfo[]>;
|
|
119
|
-
getAgentsForWorkspace(workspaceId: string): Promise<DaemonAgentInfo[]>;
|
|
120
119
|
getPendingUpdates(id: string): Promise<DaemonUpdate[]>;
|
|
121
120
|
queueUpdate(id: string, update: DaemonUpdate): Promise<void>;
|
|
122
121
|
queueMessage(id: string, message: Record<string, unknown>): Promise<void>;
|
|
@@ -221,31 +220,27 @@ export interface CommentMentionQueries {
|
|
|
221
220
|
markIgnored(id: string): Promise<void>;
|
|
222
221
|
}
|
|
223
222
|
export declare const commentMentionQueries: CommentMentionQueries;
|
|
224
|
-
export interface
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
countByWorkspace(workspaceId: string): Promise<number>;
|
|
246
|
-
getThreadMessages(workspaceId: string, thread: string, limit?: number): Promise<schema.AgentMessage[]>;
|
|
247
|
-
}
|
|
248
|
-
export declare const agentMessageQueries: AgentMessageQueries;
|
|
223
|
+
export interface ChannelQueries {
|
|
224
|
+
findById(id: string): Promise<schema.Channel | null>;
|
|
225
|
+
findByWorkspaceId(workspaceId: string): Promise<schema.Channel[]>;
|
|
226
|
+
findByWorkspaceAndChannelId(workspaceId: string, channelId: string): Promise<schema.Channel | null>;
|
|
227
|
+
create(channel: schema.NewChannel): Promise<schema.Channel>;
|
|
228
|
+
update(id: string, updates: Partial<schema.NewChannel>): Promise<void>;
|
|
229
|
+
archive(id: string): Promise<void>;
|
|
230
|
+
unarchive(id: string): Promise<void>;
|
|
231
|
+
delete(id: string): Promise<void>;
|
|
232
|
+
}
|
|
233
|
+
export declare const channelQueries: ChannelQueries;
|
|
234
|
+
export interface ChannelMemberQueries {
|
|
235
|
+
findByChannelId(channelId: string): Promise<schema.ChannelMember[]>;
|
|
236
|
+
findByMemberId(memberId: string): Promise<schema.ChannelMember[]>;
|
|
237
|
+
findMembership(channelId: string, memberId: string): Promise<schema.ChannelMember | null>;
|
|
238
|
+
addMember(member: schema.NewChannelMember): Promise<schema.ChannelMember>;
|
|
239
|
+
removeMember(channelId: string, memberId: string): Promise<void>;
|
|
240
|
+
updateRole(channelId: string, memberId: string, role: string): Promise<void>;
|
|
241
|
+
countByChannelIds(channelIds: string[]): Promise<Map<string, number>>;
|
|
242
|
+
}
|
|
243
|
+
export declare const channelMemberQueries: ChannelMemberQueries;
|
|
249
244
|
export declare function runMigrations(): Promise<void>;
|
|
250
245
|
export declare function closeDb(): Promise<void>;
|
|
251
246
|
//# sourceMappingURL=drizzle.d.ts.map
|
package/dist/cloud/db/drizzle.js
CHANGED
|
@@ -537,19 +537,6 @@ export const linkedDaemonQueries = {
|
|
|
537
537
|
agents: d.metadata?.agents || [],
|
|
538
538
|
}));
|
|
539
539
|
},
|
|
540
|
-
async getAgentsForWorkspace(workspaceId) {
|
|
541
|
-
const db = getDb();
|
|
542
|
-
const daemons = await db
|
|
543
|
-
.select()
|
|
544
|
-
.from(schema.linkedDaemons)
|
|
545
|
-
.where(eq(schema.linkedDaemons.workspaceId, workspaceId));
|
|
546
|
-
return daemons.map((d) => ({
|
|
547
|
-
daemonId: d.id,
|
|
548
|
-
daemonName: d.name,
|
|
549
|
-
machineId: d.machineId,
|
|
550
|
-
agents: d.metadata?.agents || [],
|
|
551
|
-
}));
|
|
552
|
-
},
|
|
553
540
|
async getPendingUpdates(id) {
|
|
554
541
|
const db = getDb();
|
|
555
542
|
const result = await db.select().from(schema.linkedDaemons).where(eq(schema.linkedDaemons.id, id));
|
|
@@ -1126,118 +1113,118 @@ export const commentMentionQueries = {
|
|
|
1126
1113
|
.where(eq(schema.commentMentions.id, id));
|
|
1127
1114
|
},
|
|
1128
1115
|
};
|
|
1129
|
-
export const
|
|
1130
|
-
async
|
|
1116
|
+
export const channelQueries = {
|
|
1117
|
+
async findById(id) {
|
|
1131
1118
|
const db = getDb();
|
|
1132
|
-
const result = await db.
|
|
1133
|
-
return result[0];
|
|
1119
|
+
const result = await db.select().from(schema.channels).where(eq(schema.channels.id, id));
|
|
1120
|
+
return result[0] ?? null;
|
|
1134
1121
|
},
|
|
1135
|
-
async
|
|
1136
|
-
if (data.length === 0)
|
|
1137
|
-
return [];
|
|
1122
|
+
async findByWorkspaceId(workspaceId) {
|
|
1138
1123
|
const db = getDb();
|
|
1139
|
-
|
|
1140
|
-
.
|
|
1141
|
-
.
|
|
1142
|
-
.
|
|
1143
|
-
.
|
|
1144
|
-
return result;
|
|
1124
|
+
return db
|
|
1125
|
+
.select()
|
|
1126
|
+
.from(schema.channels)
|
|
1127
|
+
.where(eq(schema.channels.workspaceId, workspaceId))
|
|
1128
|
+
.orderBy(desc(schema.channels.lastActivityAt));
|
|
1145
1129
|
},
|
|
1146
|
-
async
|
|
1130
|
+
async findByWorkspaceAndChannelId(workspaceId, channelId) {
|
|
1147
1131
|
const db = getDb();
|
|
1148
1132
|
const result = await db
|
|
1149
1133
|
.select()
|
|
1150
|
-
.from(schema.
|
|
1151
|
-
.where(eq(schema.
|
|
1134
|
+
.from(schema.channels)
|
|
1135
|
+
.where(and(eq(schema.channels.workspaceId, workspaceId), eq(schema.channels.channelId, channelId)));
|
|
1152
1136
|
return result[0] ?? null;
|
|
1153
1137
|
},
|
|
1154
|
-
async
|
|
1138
|
+
async create(channel) {
|
|
1155
1139
|
const db = getDb();
|
|
1156
|
-
const result = await db
|
|
1157
|
-
|
|
1158
|
-
.from(schema.agentMessages)
|
|
1159
|
-
.where(and(eq(schema.agentMessages.workspaceId, workspaceId), eq(schema.agentMessages.originalId, originalId)));
|
|
1160
|
-
return result[0] ?? null;
|
|
1140
|
+
const result = await db.insert(schema.channels).values(channel).returning();
|
|
1141
|
+
return result[0];
|
|
1161
1142
|
},
|
|
1162
|
-
async
|
|
1143
|
+
async update(id, updates) {
|
|
1163
1144
|
const db = getDb();
|
|
1164
|
-
|
|
1165
|
-
|
|
1166
|
-
|
|
1167
|
-
|
|
1168
|
-
if (params.toAgent) {
|
|
1169
|
-
conditions.push(eq(schema.agentMessages.toAgent, params.toAgent));
|
|
1170
|
-
}
|
|
1171
|
-
if (params.thread) {
|
|
1172
|
-
conditions.push(eq(schema.agentMessages.thread, params.thread));
|
|
1173
|
-
}
|
|
1174
|
-
if (params.channel) {
|
|
1175
|
-
conditions.push(eq(schema.agentMessages.channel, params.channel));
|
|
1176
|
-
}
|
|
1177
|
-
if (params.sinceTs) {
|
|
1178
|
-
conditions.push(sql `${schema.agentMessages.messageTs} >= ${params.sinceTs}`);
|
|
1179
|
-
}
|
|
1180
|
-
if (params.beforeTs) {
|
|
1181
|
-
conditions.push(sql `${schema.agentMessages.messageTs} < ${params.beforeTs}`);
|
|
1182
|
-
}
|
|
1183
|
-
if (!params.includeExpired) {
|
|
1184
|
-
conditions.push(sql `(${schema.agentMessages.expiresAt} IS NULL OR ${schema.agentMessages.expiresAt} > NOW())`);
|
|
1185
|
-
}
|
|
1186
|
-
let query = db
|
|
1187
|
-
.select()
|
|
1188
|
-
.from(schema.agentMessages)
|
|
1189
|
-
.where(and(...conditions))
|
|
1190
|
-
.orderBy(desc(schema.agentMessages.messageTs));
|
|
1191
|
-
if (params.limit) {
|
|
1192
|
-
query = query.limit(params.limit);
|
|
1193
|
-
}
|
|
1194
|
-
if (params.offset) {
|
|
1195
|
-
query = query.offset(params.offset);
|
|
1196
|
-
}
|
|
1197
|
-
return query;
|
|
1145
|
+
await db
|
|
1146
|
+
.update(schema.channels)
|
|
1147
|
+
.set({ ...updates, updatedAt: new Date() })
|
|
1148
|
+
.where(eq(schema.channels.id, id));
|
|
1198
1149
|
},
|
|
1199
|
-
async
|
|
1150
|
+
async archive(id) {
|
|
1200
1151
|
const db = getDb();
|
|
1201
|
-
|
|
1202
|
-
.
|
|
1203
|
-
.
|
|
1204
|
-
.where(
|
|
1205
|
-
.orderBy(schema.agentMessages.messageTs)
|
|
1206
|
-
.limit(limit);
|
|
1152
|
+
await db
|
|
1153
|
+
.update(schema.channels)
|
|
1154
|
+
.set({ status: 'archived', updatedAt: new Date() })
|
|
1155
|
+
.where(eq(schema.channels.id, id));
|
|
1207
1156
|
},
|
|
1208
|
-
async
|
|
1209
|
-
if (ids.length === 0)
|
|
1210
|
-
return;
|
|
1157
|
+
async unarchive(id) {
|
|
1211
1158
|
const db = getDb();
|
|
1212
1159
|
await db
|
|
1213
|
-
.update(schema.
|
|
1214
|
-
.set({
|
|
1215
|
-
.where(
|
|
1160
|
+
.update(schema.channels)
|
|
1161
|
+
.set({ status: 'active', updatedAt: new Date() })
|
|
1162
|
+
.where(eq(schema.channels.id, id));
|
|
1216
1163
|
},
|
|
1217
|
-
async
|
|
1164
|
+
async delete(id) {
|
|
1218
1165
|
const db = getDb();
|
|
1219
|
-
|
|
1220
|
-
.delete(schema.agentMessages)
|
|
1221
|
-
.where(and(isNotNull(schema.agentMessages.expiresAt), lt(schema.agentMessages.expiresAt, new Date())))
|
|
1222
|
-
.returning({ id: schema.agentMessages.id });
|
|
1223
|
-
return result.length;
|
|
1166
|
+
await db.delete(schema.channels).where(eq(schema.channels.id, id));
|
|
1224
1167
|
},
|
|
1225
|
-
|
|
1168
|
+
};
|
|
1169
|
+
export const channelMemberQueries = {
|
|
1170
|
+
async findByChannelId(channelId) {
|
|
1226
1171
|
const db = getDb();
|
|
1227
|
-
|
|
1228
|
-
.select(
|
|
1229
|
-
.from(schema.
|
|
1230
|
-
.where(eq(schema.
|
|
1231
|
-
return Number(result[0]?.count ?? 0);
|
|
1172
|
+
return db
|
|
1173
|
+
.select()
|
|
1174
|
+
.from(schema.channelMembers)
|
|
1175
|
+
.where(eq(schema.channelMembers.channelId, channelId));
|
|
1232
1176
|
},
|
|
1233
|
-
async
|
|
1177
|
+
async findByMemberId(memberId) {
|
|
1234
1178
|
const db = getDb();
|
|
1235
1179
|
return db
|
|
1236
1180
|
.select()
|
|
1237
|
-
.from(schema.
|
|
1238
|
-
.where(
|
|
1239
|
-
|
|
1240
|
-
|
|
1181
|
+
.from(schema.channelMembers)
|
|
1182
|
+
.where(eq(schema.channelMembers.memberId, memberId));
|
|
1183
|
+
},
|
|
1184
|
+
async findMembership(channelId, memberId) {
|
|
1185
|
+
const db = getDb();
|
|
1186
|
+
const result = await db
|
|
1187
|
+
.select()
|
|
1188
|
+
.from(schema.channelMembers)
|
|
1189
|
+
.where(and(eq(schema.channelMembers.channelId, channelId), eq(schema.channelMembers.memberId, memberId)));
|
|
1190
|
+
return result[0] ?? null;
|
|
1191
|
+
},
|
|
1192
|
+
async addMember(member) {
|
|
1193
|
+
const db = getDb();
|
|
1194
|
+
const result = await db.insert(schema.channelMembers).values(member).returning();
|
|
1195
|
+
return result[0];
|
|
1196
|
+
},
|
|
1197
|
+
async removeMember(channelId, memberId) {
|
|
1198
|
+
const db = getDb();
|
|
1199
|
+
await db
|
|
1200
|
+
.delete(schema.channelMembers)
|
|
1201
|
+
.where(and(eq(schema.channelMembers.channelId, channelId), eq(schema.channelMembers.memberId, memberId)));
|
|
1202
|
+
},
|
|
1203
|
+
async updateRole(channelId, memberId, role) {
|
|
1204
|
+
const db = getDb();
|
|
1205
|
+
await db
|
|
1206
|
+
.update(schema.channelMembers)
|
|
1207
|
+
.set({ role })
|
|
1208
|
+
.where(and(eq(schema.channelMembers.channelId, channelId), eq(schema.channelMembers.memberId, memberId)));
|
|
1209
|
+
},
|
|
1210
|
+
async countByChannelIds(channelIds) {
|
|
1211
|
+
if (channelIds.length === 0) {
|
|
1212
|
+
return new Map();
|
|
1213
|
+
}
|
|
1214
|
+
const db = getDb();
|
|
1215
|
+
const results = await db
|
|
1216
|
+
.select({
|
|
1217
|
+
channelId: schema.channelMembers.channelId,
|
|
1218
|
+
count: sql `count(*)::int`,
|
|
1219
|
+
})
|
|
1220
|
+
.from(schema.channelMembers)
|
|
1221
|
+
.where(inArray(schema.channelMembers.channelId, channelIds))
|
|
1222
|
+
.groupBy(schema.channelMembers.channelId);
|
|
1223
|
+
const countMap = new Map();
|
|
1224
|
+
for (const row of results) {
|
|
1225
|
+
countMap.set(row.channelId, row.count);
|
|
1226
|
+
}
|
|
1227
|
+
return countMap;
|
|
1241
1228
|
},
|
|
1242
1229
|
};
|
|
1243
1230
|
// ============================================================================
|
package/dist/cloud/db/index.d.ts
CHANGED
|
@@ -7,9 +7,9 @@
|
|
|
7
7
|
* Generate migrations: npm run db:generate
|
|
8
8
|
* Run migrations: npm run db:migrate
|
|
9
9
|
*/
|
|
10
|
-
export type { User, NewUser, GitHubInstallation, NewGitHubInstallation, Credential, NewCredential, Workspace, NewWorkspace, WorkspaceConfig, WorkspaceAgentPolicy, AgentPolicyRule, WorkspaceMember, NewWorkspaceMember, ProjectGroup, NewProjectGroup, CoordinatorAgentConfig, ProjectAgentConfig, Repository, NewRepository, LinkedDaemon, NewLinkedDaemon, Subscription, NewSubscription, UsageRecord, NewUsageRecord, CIAnnotation, CIFailureEvent, NewCIFailureEvent, CIFixAttempt, NewCIFixAttempt, CICheckStrategy, CIWebhookConfig, IssueAssignment, NewIssueAssignment, CommentMention, NewCommentMention, AgentTriggerConfig,
|
|
11
|
-
export { users as usersTable, githubInstallations as githubInstallationsTable, credentials as credentialsTable, workspaces as workspacesTable, workspaceMembers as workspaceMembersTable, projectGroups as projectGroupsTable, repositories as repositoriesTable, linkedDaemons as linkedDaemonsTable, subscriptions as subscriptionsTable, usageRecords as usageRecordsTable, ciFailureEvents as ciFailureEventsTable, ciFixAttempts as ciFixAttemptsTable, issueAssignments as issueAssignmentsTable, commentMentions as commentMentionsTable,
|
|
12
|
-
import { getDb, closeDb, runMigrations, getRawPool, userQueries, githubInstallationQueries, credentialQueries, workspaceQueries, workspaceMemberQueries, linkedDaemonQueries, projectGroupQueries, repositoryQueries, ciFailureEventQueries, ciFixAttemptQueries, issueAssignmentQueries, commentMentionQueries
|
|
10
|
+
export type { User, NewUser, GitHubInstallation, NewGitHubInstallation, Credential, NewCredential, Workspace, NewWorkspace, WorkspaceConfig, WorkspaceAgentPolicy, AgentPolicyRule, WorkspaceMember, NewWorkspaceMember, ProjectGroup, NewProjectGroup, CoordinatorAgentConfig, ProjectAgentConfig, Repository, NewRepository, LinkedDaemon, NewLinkedDaemon, Subscription, NewSubscription, UsageRecord, NewUsageRecord, CIAnnotation, CIFailureEvent, NewCIFailureEvent, CIFixAttempt, NewCIFixAttempt, CICheckStrategy, CIWebhookConfig, IssueAssignment, NewIssueAssignment, CommentMention, NewCommentMention, AgentTriggerConfig, Channel, NewChannel, ChannelMember, NewChannelMember, } from './schema.js';
|
|
11
|
+
export { users as usersTable, githubInstallations as githubInstallationsTable, credentials as credentialsTable, workspaces as workspacesTable, workspaceMembers as workspaceMembersTable, projectGroups as projectGroupsTable, repositories as repositoriesTable, linkedDaemons as linkedDaemonsTable, subscriptions as subscriptionsTable, usageRecords as usageRecordsTable, ciFailureEvents as ciFailureEventsTable, ciFixAttempts as ciFixAttemptsTable, issueAssignments as issueAssignmentsTable, commentMentions as commentMentionsTable, channels as channelsTable, channelMembers as channelMembersTable, } from './schema.js';
|
|
12
|
+
import { getDb, closeDb, runMigrations, getRawPool, userQueries, githubInstallationQueries, credentialQueries, workspaceQueries, workspaceMemberQueries, linkedDaemonQueries, projectGroupQueries, repositoryQueries, ciFailureEventQueries, ciFixAttemptQueries, issueAssignmentQueries, commentMentionQueries } from './drizzle.js';
|
|
13
13
|
import { bulkInsertMessages, streamingBulkInsert, optimizedBulkInsert, getPoolStats, checkPoolHealth, type BulkInsertResult } from './bulk-ingest.js';
|
|
14
14
|
export type PlanType = 'free' | 'pro' | 'team' | 'enterprise';
|
|
15
15
|
export type WorkspaceMemberRole = 'owner' | 'admin' | 'member' | 'viewer';
|
|
@@ -26,7 +26,8 @@ export declare const db: {
|
|
|
26
26
|
ciFixAttempts: import("./drizzle.js").CIFixAttemptQueries;
|
|
27
27
|
issueAssignments: import("./drizzle.js").IssueAssignmentQueries;
|
|
28
28
|
commentMentions: import("./drizzle.js").CommentMentionQueries;
|
|
29
|
-
|
|
29
|
+
channels: import("./drizzle.js").ChannelQueries;
|
|
30
|
+
channelMembers: import("./drizzle.js").ChannelMemberQueries;
|
|
30
31
|
bulk: {
|
|
31
32
|
insertMessages: typeof bulkInsertMessages;
|
|
32
33
|
streamingInsert: typeof streamingBulkInsert;
|
|
@@ -47,7 +48,7 @@ export declare const db: {
|
|
|
47
48
|
close: typeof closeDb;
|
|
48
49
|
runMigrations: typeof runMigrations;
|
|
49
50
|
};
|
|
50
|
-
export { userQueries, githubInstallationQueries, credentialQueries, workspaceQueries, workspaceMemberQueries, projectGroupQueries, repositoryQueries, linkedDaemonQueries, ciFailureEventQueries, ciFixAttemptQueries, issueAssignmentQueries, commentMentionQueries,
|
|
51
|
+
export { userQueries, githubInstallationQueries, credentialQueries, workspaceQueries, workspaceMemberQueries, projectGroupQueries, repositoryQueries, linkedDaemonQueries, ciFailureEventQueries, ciFixAttemptQueries, issueAssignmentQueries, commentMentionQueries, };
|
|
51
52
|
export { getDb, closeDb, runMigrations, getRawPool };
|
|
52
53
|
export { bulkInsertMessages, streamingBulkInsert, optimizedBulkInsert, getPoolStats, checkPoolHealth, type BulkInsertResult, };
|
|
53
54
|
export declare function initializeDatabase(): Promise<void>;
|
package/dist/cloud/db/index.js
CHANGED
|
@@ -8,10 +8,10 @@
|
|
|
8
8
|
* Run migrations: npm run db:migrate
|
|
9
9
|
*/
|
|
10
10
|
// Re-export schema tables for direct access if needed
|
|
11
|
-
export { users as usersTable, githubInstallations as githubInstallationsTable, credentials as credentialsTable, workspaces as workspacesTable, workspaceMembers as workspaceMembersTable, projectGroups as projectGroupsTable, repositories as repositoriesTable, linkedDaemons as linkedDaemonsTable, subscriptions as subscriptionsTable, usageRecords as usageRecordsTable, ciFailureEvents as ciFailureEventsTable, ciFixAttempts as ciFixAttemptsTable, issueAssignments as issueAssignmentsTable, commentMentions as commentMentionsTable,
|
|
11
|
+
export { users as usersTable, githubInstallations as githubInstallationsTable, credentials as credentialsTable, workspaces as workspacesTable, workspaceMembers as workspaceMembersTable, projectGroups as projectGroupsTable, repositories as repositoriesTable, linkedDaemons as linkedDaemonsTable, subscriptions as subscriptionsTable, usageRecords as usageRecordsTable, ciFailureEvents as ciFailureEventsTable, ciFixAttempts as ciFixAttemptsTable, issueAssignments as issueAssignmentsTable, commentMentions as commentMentionsTable, channels as channelsTable, channelMembers as channelMembersTable, } from './schema.js';
|
|
12
12
|
// Import query modules
|
|
13
|
-
import { getDb, closeDb, runMigrations, getRawPool, userQueries, githubInstallationQueries, credentialQueries, workspaceQueries, workspaceMemberQueries, linkedDaemonQueries, projectGroupQueries, repositoryQueries, ciFailureEventQueries, ciFixAttemptQueries, issueAssignmentQueries, commentMentionQueries,
|
|
14
|
-
//
|
|
13
|
+
import { getDb, closeDb, runMigrations, getRawPool, userQueries, githubInstallationQueries, credentialQueries, workspaceQueries, workspaceMemberQueries, linkedDaemonQueries, projectGroupQueries, repositoryQueries, ciFailureEventQueries, ciFixAttemptQueries, issueAssignmentQueries, commentMentionQueries, channelQueries, channelMemberQueries, } from './drizzle.js';
|
|
14
|
+
// Bulk ingest utilities for high-volume message sync to cloud
|
|
15
15
|
import { bulkInsertMessages, streamingBulkInsert, optimizedBulkInsert, getPoolStats, checkPoolHealth, } from './bulk-ingest.js';
|
|
16
16
|
// Export the db object with all query namespaces
|
|
17
17
|
export const db = {
|
|
@@ -37,9 +37,10 @@ export const db = {
|
|
|
37
37
|
// Issue and comment tracking
|
|
38
38
|
issueAssignments: issueAssignmentQueries,
|
|
39
39
|
commentMentions: commentMentionQueries,
|
|
40
|
-
//
|
|
41
|
-
|
|
42
|
-
|
|
40
|
+
// Channel operations (workspace-scoped messaging)
|
|
41
|
+
channels: channelQueries,
|
|
42
|
+
channelMembers: channelMemberQueries,
|
|
43
|
+
// Bulk ingest utilities for high-volume message sync
|
|
43
44
|
bulk: {
|
|
44
45
|
insertMessages: bulkInsertMessages,
|
|
45
46
|
streamingInsert: streamingBulkInsert,
|
|
@@ -54,10 +55,10 @@ export const db = {
|
|
|
54
55
|
runMigrations,
|
|
55
56
|
};
|
|
56
57
|
// Export query objects for direct import
|
|
57
|
-
export { userQueries, githubInstallationQueries, credentialQueries, workspaceQueries, workspaceMemberQueries, projectGroupQueries, repositoryQueries, linkedDaemonQueries, ciFailureEventQueries, ciFixAttemptQueries, issueAssignmentQueries, commentMentionQueries,
|
|
58
|
+
export { userQueries, githubInstallationQueries, credentialQueries, workspaceQueries, workspaceMemberQueries, projectGroupQueries, repositoryQueries, linkedDaemonQueries, ciFailureEventQueries, ciFixAttemptQueries, issueAssignmentQueries, commentMentionQueries, };
|
|
58
59
|
// Export database utilities
|
|
59
60
|
export { getDb, closeDb, runMigrations, getRawPool };
|
|
60
|
-
//
|
|
61
|
+
// Bulk ingest utilities for direct import
|
|
61
62
|
export { bulkInsertMessages, streamingBulkInsert, optimizedBulkInsert, getPoolStats, checkPoolHealth, };
|
|
62
63
|
// Legacy function - use runMigrations instead
|
|
63
64
|
export async function initializeDatabase() {
|