agent-relay 1.2.0 → 1.2.3
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/.gitattributes +3 -0
- package/.nvmrc +1 -0
- package/.trajectories/completed/2026-01/traj_1dviorhnkcb5.json +65 -0
- package/.trajectories/completed/2026-01/traj_1dviorhnkcb5.md +37 -0
- package/.trajectories/completed/2026-01/traj_1k5if5snst2e.json +65 -0
- package/.trajectories/completed/2026-01/traj_1k5if5snst2e.md +37 -0
- package/.trajectories/completed/2026-01/traj_1rp3rges5811.json +49 -0
- package/.trajectories/completed/2026-01/traj_1rp3rges5811.md +31 -0
- package/.trajectories/completed/2026-01/traj_22bhyulruouw.json +113 -0
- package/.trajectories/completed/2026-01/traj_22bhyulruouw.md +57 -0
- package/.trajectories/completed/2026-01/traj_2dao7ddgnta0.json +53 -0
- package/.trajectories/completed/2026-01/traj_2dao7ddgnta0.md +32 -0
- package/.trajectories/completed/2026-01/traj_3t0440mjeunc.json +26 -0
- package/.trajectories/completed/2026-01/traj_3t0440mjeunc.md +6 -0
- package/.trajectories/completed/2026-01/traj_45x9494d9xnr.json +47 -0
- package/.trajectories/completed/2026-01/traj_45x9494d9xnr.md +32 -0
- package/.trajectories/completed/2026-01/traj_4aa0bb77s4nh.json +53 -0
- package/.trajectories/completed/2026-01/traj_4aa0bb77s4nh.md +32 -0
- package/.trajectories/completed/2026-01/traj_5lhmzq8rxpqv.json +59 -0
- package/.trajectories/completed/2026-01/traj_5lhmzq8rxpqv.md +33 -0
- package/.trajectories/completed/2026-01/traj_5vr4e9erb1fs.json +53 -0
- package/.trajectories/completed/2026-01/traj_5vr4e9erb1fs.md +32 -0
- package/.trajectories/completed/2026-01/traj_6fgiwdoklvym.json +48 -0
- package/.trajectories/completed/2026-01/traj_6fgiwdoklvym.md +24 -0
- package/.trajectories/completed/2026-01/traj_7ludwvz45veh.json +209 -0
- package/.trajectories/completed/2026-01/traj_7ludwvz45veh.md +97 -0
- package/.trajectories/completed/2026-01/traj_9921cuhel0pj.json +48 -0
- package/.trajectories/completed/2026-01/traj_9921cuhel0pj.md +24 -0
- package/.trajectories/completed/2026-01/traj_ajs7zqfux4wc.json +49 -0
- package/.trajectories/completed/2026-01/traj_ajs7zqfux4wc.md +23 -0
- package/.trajectories/completed/2026-01/traj_cvtqhlwcq9s0.json +53 -0
- package/.trajectories/completed/2026-01/traj_cvtqhlwcq9s0.md +32 -0
- package/.trajectories/completed/2026-01/traj_cxofprm2m2en.json +49 -0
- package/.trajectories/completed/2026-01/traj_cxofprm2m2en.md +31 -0
- package/.trajectories/completed/2026-01/traj_d2hhz3k0vrhn.json +26 -0
- package/.trajectories/completed/2026-01/traj_d2hhz3k0vrhn.md +6 -0
- package/.trajectories/completed/2026-01/traj_dfuvww9pege5.json +59 -0
- package/.trajectories/completed/2026-01/traj_dfuvww9pege5.md +37 -0
- package/.trajectories/completed/2026-01/traj_g0fisy9h51mf.json +77 -0
- package/.trajectories/completed/2026-01/traj_g0fisy9h51mf.md +42 -0
- package/.trajectories/completed/2026-01/traj_gjdre5voouod.json +53 -0
- package/.trajectories/completed/2026-01/traj_gjdre5voouod.md +32 -0
- package/.trajectories/completed/2026-01/traj_gtlyqtta3x8l.json +25 -0
- package/.trajectories/completed/2026-01/traj_gtlyqtta3x8l.md +15 -0
- package/.trajectories/completed/2026-01/traj_h4xijiuip3w4.json +101 -0
- package/.trajectories/completed/2026-01/traj_h4xijiuip3w4.md +44 -0
- package/.trajectories/completed/2026-01/traj_hhxte7w4gjjx.json +22 -0
- package/.trajectories/completed/2026-01/traj_hhxte7w4gjjx.md +5 -0
- package/.trajectories/completed/2026-01/traj_hpungyhoj6v5.json +53 -0
- package/.trajectories/completed/2026-01/traj_hpungyhoj6v5.md +32 -0
- package/.trajectories/completed/2026-01/traj_m2xkjv0w2sq7.json +25 -0
- package/.trajectories/completed/2026-01/traj_m2xkjv0w2sq7.md +15 -0
- package/.trajectories/completed/2026-01/traj_noq5zbvnrdvz.json +53 -0
- package/.trajectories/completed/2026-01/traj_noq5zbvnrdvz.md +32 -0
- package/.trajectories/completed/2026-01/traj_ntbs6ppopf46.json +53 -0
- package/.trajectories/completed/2026-01/traj_ntbs6ppopf46.md +32 -0
- package/.trajectories/completed/2026-01/traj_ozd98si6a7ns.json +48 -0
- package/.trajectories/completed/2026-01/traj_ozd98si6a7ns.md +24 -0
- package/.trajectories/completed/2026-01/traj_prdza7a5cxp5.json +53 -0
- package/.trajectories/completed/2026-01/traj_prdza7a5cxp5.md +32 -0
- package/.trajectories/completed/2026-01/traj_qb3twvvywfwi.json +77 -0
- package/.trajectories/completed/2026-01/traj_qb3twvvywfwi.md +42 -0
- package/.trajectories/completed/2026-01/traj_qft54mi7nfor.json +53 -0
- package/.trajectories/completed/2026-01/traj_qft54mi7nfor.md +32 -0
- package/.trajectories/completed/2026-01/traj_qx9uhf8whhxo.json +83 -0
- package/.trajectories/completed/2026-01/traj_qx9uhf8whhxo.md +47 -0
- package/.trajectories/completed/2026-01/traj_rd9toccj18a0.json +59 -0
- package/.trajectories/completed/2026-01/traj_rd9toccj18a0.md +37 -0
- package/.trajectories/completed/2026-01/traj_rt4fiw3ecp50.json +48 -0
- package/.trajectories/completed/2026-01/traj_rt4fiw3ecp50.md +16 -0
- package/.trajectories/completed/2026-01/traj_st8j35b0hrlc.json +59 -0
- package/.trajectories/completed/2026-01/traj_st8j35b0hrlc.md +37 -0
- package/.trajectories/completed/2026-01/traj_t1yy8m7hbuxp.json +53 -0
- package/.trajectories/completed/2026-01/traj_t1yy8m7hbuxp.md +32 -0
- package/.trajectories/completed/2026-01/traj_tmux_orchestrator_analysis.json +84 -0
- package/.trajectories/completed/2026-01/traj_tmux_orchestrator_analysis.md +109 -0
- package/.trajectories/completed/2026-01/traj_u9n9eqasw16k.json +53 -0
- package/.trajectories/completed/2026-01/traj_u9n9eqasw16k.md +32 -0
- package/.trajectories/completed/2026-01/traj_v87hypnongqx.json +71 -0
- package/.trajectories/completed/2026-01/traj_v87hypnongqx.md +42 -0
- package/.trajectories/completed/2026-01/traj_wkp2fgzdyinb.json +53 -0
- package/.trajectories/completed/2026-01/traj_wkp2fgzdyinb.md +32 -0
- package/.trajectories/completed/2026-01/traj_x14t8w8rn7xg.json +20 -0
- package/.trajectories/completed/2026-01/traj_x14t8w8rn7xg.md +6 -0
- package/.trajectories/completed/2026-01/traj_xnwbznkvv8ua.json +175 -0
- package/.trajectories/completed/2026-01/traj_xnwbznkvv8ua.md +82 -0
- package/.trajectories/completed/2026-01/traj_ysjc8zaeqtd3.json +47 -0
- package/.trajectories/completed/2026-01/traj_ysjc8zaeqtd3.md +32 -0
- package/.trajectories/completed/2026-01/traj_yvdadtvdgnz3.json +59 -0
- package/.trajectories/completed/2026-01/traj_yvdadtvdgnz3.md +37 -0
- package/.trajectories/completed/2026-01/traj_z0vcw1wrzide.json +53 -0
- package/.trajectories/completed/2026-01/traj_z0vcw1wrzide.md +32 -0
- package/.trajectories/index.json +314 -0
- package/ARCHITECTURE.md +1245 -0
- package/TESTING.md +278 -0
- package/deploy/init-db.sql +5 -0
- package/deploy/scripts/setup-fly-workspaces.sh +69 -0
- package/deploy/scripts/setup-railway.sh +75 -0
- package/deploy/workspace/entrypoint-browser.sh +118 -0
- package/deploy/workspace/entrypoint.sh +348 -0
- package/deploy/workspace/git-credential-relay +111 -0
- package/dist/cli/index.js +218 -1
- package/dist/cloud/api/billing.js +30 -9
- package/dist/cloud/api/codex-auth-helper.d.ts +15 -0
- package/dist/cloud/api/codex-auth-helper.js +100 -0
- package/dist/cloud/api/git.js +24 -3
- package/dist/cloud/api/onboarding.js +15 -2
- package/dist/cloud/api/repos.d.ts +1 -0
- package/dist/cloud/api/repos.js +186 -0
- package/dist/cloud/api/webhooks.d.ts +1 -0
- package/dist/cloud/api/webhooks.js +149 -0
- package/dist/cloud/api/workspaces.js +97 -6
- package/dist/cloud/billing/plans.js +19 -19
- package/dist/cloud/provisioner/index.d.ts +32 -0
- package/dist/cloud/provisioner/index.js +362 -21
- package/dist/cloud/server.js +6 -1
- package/dist/cloud/services/nango.d.ts +60 -0
- package/dist/cloud/services/nango.js +153 -0
- package/dist/cloud/services/planLimits.d.ts +22 -0
- package/dist/cloud/services/planLimits.js +58 -5
- package/dist/dashboard/out/404.html +1 -1
- package/dist/dashboard/out/_next/static/chunks/699-3b1cd6618a45d259.js +1 -0
- package/dist/dashboard/out/_next/static/chunks/766-1f2dd8cb7f766b0b.js +1 -0
- package/dist/dashboard/out/_next/static/chunks/app/app/onboarding/page-3fdfa60e53f2810d.js +1 -0
- package/dist/dashboard/out/_next/static/chunks/app/app/page-e6381e5a6e1fbcfd.js +1 -0
- package/dist/dashboard/out/_next/static/chunks/app/connect-repos/page-3538dfe0ffe984b8.js +1 -0
- package/dist/dashboard/out/_next/static/chunks/app/history/{page-56a8b4616a90dc43.js → page-abb9ab2d329f56e9.js} +1 -1
- package/dist/dashboard/out/_next/static/chunks/app/layout-c0d118c0f92d969c.js +1 -0
- package/dist/dashboard/out/_next/static/chunks/app/login/{page-3eac37ea6f5dd153.js → page-c22d080201cbd9fb.js} +1 -1
- package/dist/dashboard/out/_next/static/chunks/app/metrics/{page-1081dd190a331a91.js → page-67a3e98d9a43a6ed.js} +1 -1
- package/dist/dashboard/out/_next/static/chunks/app/{page-daf87e86f783f980.js → page-77e9c65420a06cfb.js} +1 -1
- package/dist/dashboard/out/_next/static/chunks/app/pricing/page-b08ed1c34d14434a.js +1 -0
- package/dist/dashboard/out/_next/static/chunks/app/providers/page-e88bc117ef7671c3.js +1 -0
- package/dist/dashboard/out/_next/static/chunks/app/signup/{page-fee4ed1709070bcd.js → page-68d34f50baa8ab6b.js} +1 -1
- package/dist/dashboard/out/_next/static/chunks/{main-app-5d692157a8eb1fd9.js → main-app-6e8e8d3ef4e0192a.js} +1 -1
- package/dist/dashboard/out/_next/static/chunks/{main-97850e03d723ea8c.js → main-ed4e1fb6f29c34cf.js} +1 -1
- package/dist/dashboard/out/_next/static/css/7c3ae9e8617d42a5.css +1 -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 -1
- package/dist/dashboard/out/app.txt +2 -2
- package/dist/dashboard/out/connect-repos.html +1 -1
- package/dist/dashboard/out/connect-repos.txt +2 -2
- package/dist/dashboard/out/history.html +1 -1
- package/dist/dashboard/out/history.txt +2 -2
- package/dist/dashboard/out/index.html +1 -1
- package/dist/dashboard/out/index.txt +2 -2
- package/dist/dashboard/out/login.html +2 -2
- package/dist/dashboard/out/login.txt +2 -2
- package/dist/dashboard/out/metrics.html +1 -1
- package/dist/dashboard/out/metrics.txt +2 -2
- package/dist/dashboard/out/pricing.html +3 -3
- package/dist/dashboard/out/pricing.txt +2 -2
- package/dist/dashboard/out/providers.html +1 -1
- package/dist/dashboard/out/providers.txt +2 -2
- package/dist/dashboard/out/signup.html +2 -2
- package/dist/dashboard/out/signup.txt +2 -2
- package/package.json +2 -11
- package/test-push.txt +1 -0
- package/bin/tmux +0 -0
- package/dist/bridge/config.d.ts.map +0 -1
- package/dist/bridge/config.js.map +0 -1
- package/dist/bridge/index.d.ts.map +0 -1
- package/dist/bridge/index.js.map +0 -1
- package/dist/bridge/multi-project-client.d.ts.map +0 -1
- package/dist/bridge/multi-project-client.js.map +0 -1
- package/dist/bridge/shadow-cli.d.ts.map +0 -1
- package/dist/bridge/shadow-cli.js.map +0 -1
- package/dist/bridge/shadow-config.d.ts.map +0 -1
- package/dist/bridge/shadow-config.js.map +0 -1
- package/dist/bridge/spawner.d.ts.map +0 -1
- package/dist/bridge/spawner.js.map +0 -1
- package/dist/bridge/teams-config.d.ts.map +0 -1
- package/dist/bridge/teams-config.js.map +0 -1
- package/dist/bridge/types.d.ts.map +0 -1
- package/dist/bridge/types.js.map +0 -1
- package/dist/bridge/utils.d.ts.map +0 -1
- package/dist/bridge/utils.js.map +0 -1
- package/dist/cli/index.d.ts.map +0 -1
- package/dist/cli/index.js.map +0 -1
- package/dist/cloud/api/auth.d.ts.map +0 -1
- package/dist/cloud/api/auth.js.map +0 -1
- package/dist/cloud/api/billing.d.ts.map +0 -1
- package/dist/cloud/api/billing.js.map +0 -1
- package/dist/cloud/api/cli-pty-runner.d.ts.map +0 -1
- package/dist/cloud/api/cli-pty-runner.js.map +0 -1
- package/dist/cloud/api/coordinators.d.ts.map +0 -1
- package/dist/cloud/api/coordinators.js.map +0 -1
- package/dist/cloud/api/daemons.d.ts.map +0 -1
- package/dist/cloud/api/daemons.js.map +0 -1
- package/dist/cloud/api/generic-webhooks.d.ts.map +0 -1
- package/dist/cloud/api/generic-webhooks.js.map +0 -1
- package/dist/cloud/api/git.d.ts.map +0 -1
- package/dist/cloud/api/git.js.map +0 -1
- package/dist/cloud/api/github-app.d.ts.map +0 -1
- package/dist/cloud/api/github-app.js.map +0 -1
- package/dist/cloud/api/middleware/planLimits.d.ts.map +0 -1
- package/dist/cloud/api/middleware/planLimits.js.map +0 -1
- package/dist/cloud/api/monitoring.d.ts.map +0 -1
- package/dist/cloud/api/monitoring.js.map +0 -1
- package/dist/cloud/api/nango-auth.d.ts.map +0 -1
- package/dist/cloud/api/nango-auth.js.map +0 -1
- package/dist/cloud/api/onboarding.d.ts.map +0 -1
- package/dist/cloud/api/onboarding.js.map +0 -1
- package/dist/cloud/api/policy.d.ts.map +0 -1
- package/dist/cloud/api/policy.js.map +0 -1
- package/dist/cloud/api/providers.d.ts.map +0 -1
- package/dist/cloud/api/providers.js.map +0 -1
- package/dist/cloud/api/repos.d.ts.map +0 -1
- package/dist/cloud/api/repos.js.map +0 -1
- package/dist/cloud/api/teams.d.ts.map +0 -1
- package/dist/cloud/api/teams.js.map +0 -1
- package/dist/cloud/api/test-helpers.d.ts.map +0 -1
- package/dist/cloud/api/test-helpers.js.map +0 -1
- package/dist/cloud/api/usage.d.ts.map +0 -1
- package/dist/cloud/api/usage.js.map +0 -1
- package/dist/cloud/api/webhooks.d.ts.map +0 -1
- package/dist/cloud/api/webhooks.js.map +0 -1
- package/dist/cloud/api/workspaces.d.ts.map +0 -1
- package/dist/cloud/api/workspaces.js.map +0 -1
- package/dist/cloud/billing/index.d.ts.map +0 -1
- package/dist/cloud/billing/index.js.map +0 -1
- package/dist/cloud/billing/plans.d.ts.map +0 -1
- package/dist/cloud/billing/plans.js.map +0 -1
- package/dist/cloud/billing/service.d.ts.map +0 -1
- package/dist/cloud/billing/service.js.map +0 -1
- package/dist/cloud/billing/types.d.ts.map +0 -1
- package/dist/cloud/billing/types.js.map +0 -1
- package/dist/cloud/config.d.ts.map +0 -1
- package/dist/cloud/config.js.map +0 -1
- package/dist/cloud/db/drizzle.d.ts.map +0 -1
- package/dist/cloud/db/drizzle.js.map +0 -1
- package/dist/cloud/db/index.d.ts.map +0 -1
- package/dist/cloud/db/index.js.map +0 -1
- package/dist/cloud/db/schema.d.ts.map +0 -1
- package/dist/cloud/db/schema.js.map +0 -1
- package/dist/cloud/index.d.ts.map +0 -1
- package/dist/cloud/index.js.map +0 -1
- package/dist/cloud/provisioner/index.d.ts.map +0 -1
- package/dist/cloud/provisioner/index.js.map +0 -1
- package/dist/cloud/server.d.ts.map +0 -1
- package/dist/cloud/server.js.map +0 -1
- package/dist/cloud/services/auto-scaler.d.ts.map +0 -1
- package/dist/cloud/services/auto-scaler.js.map +0 -1
- package/dist/cloud/services/capacity-manager.d.ts.map +0 -1
- package/dist/cloud/services/capacity-manager.js.map +0 -1
- package/dist/cloud/services/ci-agent-spawner.d.ts.map +0 -1
- package/dist/cloud/services/ci-agent-spawner.js.map +0 -1
- package/dist/cloud/services/coordinator.d.ts.map +0 -1
- package/dist/cloud/services/coordinator.js.map +0 -1
- package/dist/cloud/services/index.d.ts.map +0 -1
- package/dist/cloud/services/index.js.map +0 -1
- package/dist/cloud/services/mention-handler.d.ts.map +0 -1
- package/dist/cloud/services/mention-handler.js.map +0 -1
- package/dist/cloud/services/nango.d.ts.map +0 -1
- package/dist/cloud/services/nango.js.map +0 -1
- package/dist/cloud/services/persistence.d.ts.map +0 -1
- package/dist/cloud/services/persistence.js.map +0 -1
- package/dist/cloud/services/planLimits.d.ts.map +0 -1
- package/dist/cloud/services/planLimits.js.map +0 -1
- package/dist/cloud/services/scaling-orchestrator.d.ts.map +0 -1
- package/dist/cloud/services/scaling-orchestrator.js.map +0 -1
- package/dist/cloud/services/scaling-policy.d.ts.map +0 -1
- package/dist/cloud/services/scaling-policy.js.map +0 -1
- package/dist/cloud/vault/index.d.ts.map +0 -1
- package/dist/cloud/vault/index.js.map +0 -1
- package/dist/cloud/webhooks/index.d.ts.map +0 -1
- package/dist/cloud/webhooks/index.js.map +0 -1
- package/dist/cloud/webhooks/parsers/github.d.ts.map +0 -1
- package/dist/cloud/webhooks/parsers/github.js.map +0 -1
- package/dist/cloud/webhooks/parsers/index.d.ts.map +0 -1
- package/dist/cloud/webhooks/parsers/index.js.map +0 -1
- package/dist/cloud/webhooks/parsers/linear.d.ts.map +0 -1
- package/dist/cloud/webhooks/parsers/linear.js.map +0 -1
- package/dist/cloud/webhooks/parsers/slack.d.ts.map +0 -1
- package/dist/cloud/webhooks/parsers/slack.js.map +0 -1
- package/dist/cloud/webhooks/responders/github.d.ts.map +0 -1
- package/dist/cloud/webhooks/responders/github.js.map +0 -1
- package/dist/cloud/webhooks/responders/index.d.ts.map +0 -1
- package/dist/cloud/webhooks/responders/index.js.map +0 -1
- package/dist/cloud/webhooks/responders/linear.d.ts.map +0 -1
- package/dist/cloud/webhooks/responders/linear.js.map +0 -1
- package/dist/cloud/webhooks/responders/slack.d.ts.map +0 -1
- package/dist/cloud/webhooks/responders/slack.js.map +0 -1
- package/dist/cloud/webhooks/router.d.ts.map +0 -1
- package/dist/cloud/webhooks/router.js.map +0 -1
- package/dist/cloud/webhooks/rules-engine.d.ts.map +0 -1
- package/dist/cloud/webhooks/rules-engine.js.map +0 -1
- package/dist/cloud/webhooks/types.d.ts.map +0 -1
- package/dist/cloud/webhooks/types.js.map +0 -1
- package/dist/continuity/formatter.d.ts.map +0 -1
- package/dist/continuity/formatter.js.map +0 -1
- package/dist/continuity/handoff-store.d.ts.map +0 -1
- package/dist/continuity/handoff-store.js.map +0 -1
- package/dist/continuity/index.d.ts.map +0 -1
- package/dist/continuity/index.js.map +0 -1
- package/dist/continuity/ledger-store.d.ts.map +0 -1
- package/dist/continuity/ledger-store.js.map +0 -1
- package/dist/continuity/manager.d.ts.map +0 -1
- package/dist/continuity/manager.js.map +0 -1
- package/dist/continuity/parser.d.ts.map +0 -1
- package/dist/continuity/parser.js.map +0 -1
- package/dist/continuity/types.d.ts.map +0 -1
- package/dist/continuity/types.js.map +0 -1
- package/dist/daemon/agent-manager.d.ts.map +0 -1
- package/dist/daemon/agent-manager.js.map +0 -1
- package/dist/daemon/agent-registry.d.ts.map +0 -1
- package/dist/daemon/agent-registry.js.map +0 -1
- package/dist/daemon/api.d.ts.map +0 -1
- package/dist/daemon/api.js.map +0 -1
- package/dist/daemon/auth.d.ts.map +0 -1
- package/dist/daemon/auth.js.map +0 -1
- package/dist/daemon/cli-auth.d.ts.map +0 -1
- package/dist/daemon/cli-auth.js.map +0 -1
- package/dist/daemon/cloud-sync.d.ts.map +0 -1
- package/dist/daemon/cloud-sync.js.map +0 -1
- package/dist/daemon/connection.d.ts.map +0 -1
- package/dist/daemon/connection.js.map +0 -1
- package/dist/daemon/index.d.ts.map +0 -1
- package/dist/daemon/index.js.map +0 -1
- package/dist/daemon/orchestrator.d.ts.map +0 -1
- package/dist/daemon/orchestrator.js.map +0 -1
- package/dist/daemon/registry.d.ts.map +0 -1
- package/dist/daemon/registry.js.map +0 -1
- package/dist/daemon/router.d.ts.map +0 -1
- package/dist/daemon/router.js.map +0 -1
- package/dist/daemon/server.d.ts.map +0 -1
- package/dist/daemon/server.js.map +0 -1
- package/dist/daemon/services/browser-testing.d.ts.map +0 -1
- package/dist/daemon/services/browser-testing.js.map +0 -1
- package/dist/daemon/services/container-spawner.d.ts.map +0 -1
- package/dist/daemon/services/container-spawner.js.map +0 -1
- package/dist/daemon/types.d.ts.map +0 -1
- package/dist/daemon/types.js.map +0 -1
- package/dist/daemon/workspace-manager.d.ts.map +0 -1
- package/dist/daemon/workspace-manager.js.map +0 -1
- package/dist/dashboard/out/_next/static/chunks/480-2d4111711d4e473c.js +0 -1
- package/dist/dashboard/out/_next/static/chunks/766-c3a14283c88d815b.js +0 -1
- package/dist/dashboard/out/_next/static/chunks/app/app/page-7120be68bea622f3.js +0 -1
- package/dist/dashboard/out/_next/static/chunks/app/connect-repos/page-dc2e3a1a22478efc.js +0 -1
- package/dist/dashboard/out/_next/static/chunks/app/layout-2433bb48965f4333.js +0 -1
- package/dist/dashboard/out/_next/static/chunks/app/pricing/page-4d72d5a5d8a9b618.js +0 -1
- package/dist/dashboard/out/_next/static/chunks/app/providers/page-b68a681526eb145e.js +0 -1
- package/dist/dashboard/out/_next/static/css/411ce23ffeae9f76.css +0 -1
- package/dist/dashboard-server/metrics.d.ts.map +0 -1
- package/dist/dashboard-server/metrics.js.map +0 -1
- package/dist/dashboard-server/needs-attention.d.ts.map +0 -1
- package/dist/dashboard-server/needs-attention.js.map +0 -1
- package/dist/dashboard-server/server.d.ts.map +0 -1
- package/dist/dashboard-server/server.js.map +0 -1
- package/dist/dashboard-server/start.d.ts.map +0 -1
- package/dist/dashboard-server/start.js.map +0 -1
- package/dist/hooks/emitter.d.ts.map +0 -1
- package/dist/hooks/emitter.js.map +0 -1
- package/dist/hooks/inbox-check/hook.d.ts.map +0 -1
- package/dist/hooks/inbox-check/hook.js.map +0 -1
- package/dist/hooks/inbox-check/index.d.ts.map +0 -1
- package/dist/hooks/inbox-check/index.js.map +0 -1
- package/dist/hooks/inbox-check/types.d.ts.map +0 -1
- package/dist/hooks/inbox-check/types.js.map +0 -1
- package/dist/hooks/inbox-check/utils.d.ts.map +0 -1
- package/dist/hooks/inbox-check/utils.js.map +0 -1
- package/dist/hooks/index.d.ts.map +0 -1
- package/dist/hooks/index.js.map +0 -1
- package/dist/hooks/registry.d.ts.map +0 -1
- package/dist/hooks/registry.js.map +0 -1
- package/dist/hooks/trajectory-hooks.d.ts.map +0 -1
- package/dist/hooks/trajectory-hooks.js.map +0 -1
- package/dist/hooks/types.d.ts.map +0 -1
- package/dist/hooks/types.js.map +0 -1
- package/dist/index.d.ts.map +0 -1
- package/dist/index.js.map +0 -1
- package/dist/memory/adapters/index.d.ts.map +0 -1
- package/dist/memory/adapters/index.js.map +0 -1
- package/dist/memory/adapters/inmemory.d.ts.map +0 -1
- package/dist/memory/adapters/inmemory.js.map +0 -1
- package/dist/memory/adapters/supermemory.d.ts.map +0 -1
- package/dist/memory/adapters/supermemory.js.map +0 -1
- package/dist/memory/factory.d.ts.map +0 -1
- package/dist/memory/factory.js.map +0 -1
- package/dist/memory/index.d.ts.map +0 -1
- package/dist/memory/index.js.map +0 -1
- package/dist/memory/memory-hooks.d.ts.map +0 -1
- package/dist/memory/memory-hooks.js.map +0 -1
- package/dist/memory/service.d.ts.map +0 -1
- package/dist/memory/service.js.map +0 -1
- package/dist/memory/types.d.ts.map +0 -1
- package/dist/memory/types.js.map +0 -1
- package/dist/policy/agent-policy.d.ts.map +0 -1
- package/dist/policy/agent-policy.js.map +0 -1
- package/dist/policy/cloud-policy-fetcher.d.ts.map +0 -1
- package/dist/policy/cloud-policy-fetcher.js.map +0 -1
- package/dist/protocol/framing.d.ts.map +0 -1
- package/dist/protocol/framing.js.map +0 -1
- package/dist/protocol/index.d.ts.map +0 -1
- package/dist/protocol/index.js.map +0 -1
- package/dist/protocol/types.d.ts.map +0 -1
- package/dist/protocol/types.js.map +0 -1
- package/dist/resiliency/context-persistence.d.ts.map +0 -1
- package/dist/resiliency/context-persistence.js.map +0 -1
- package/dist/resiliency/crash-insights.d.ts.map +0 -1
- package/dist/resiliency/crash-insights.js.map +0 -1
- package/dist/resiliency/gossip-health.d.ts.map +0 -1
- package/dist/resiliency/gossip-health.js.map +0 -1
- package/dist/resiliency/health-monitor.d.ts.map +0 -1
- package/dist/resiliency/health-monitor.js.map +0 -1
- package/dist/resiliency/index.d.ts.map +0 -1
- package/dist/resiliency/index.js.map +0 -1
- package/dist/resiliency/leader-watchdog.d.ts.map +0 -1
- package/dist/resiliency/leader-watchdog.js.map +0 -1
- package/dist/resiliency/logger.d.ts.map +0 -1
- package/dist/resiliency/logger.js.map +0 -1
- package/dist/resiliency/memory-monitor.d.ts.map +0 -1
- package/dist/resiliency/memory-monitor.js.map +0 -1
- package/dist/resiliency/metrics.d.ts.map +0 -1
- package/dist/resiliency/metrics.js.map +0 -1
- package/dist/resiliency/provider-context.d.ts.map +0 -1
- package/dist/resiliency/provider-context.js.map +0 -1
- package/dist/resiliency/stateless-lead.d.ts.map +0 -1
- package/dist/resiliency/stateless-lead.js.map +0 -1
- package/dist/resiliency/supervisor.d.ts.map +0 -1
- package/dist/resiliency/supervisor.js.map +0 -1
- package/dist/shared/cli-auth-config.d.ts.map +0 -1
- package/dist/shared/cli-auth-config.js.map +0 -1
- package/dist/state/agent-state.d.ts.map +0 -1
- package/dist/state/agent-state.js.map +0 -1
- package/dist/storage/adapter.d.ts.map +0 -1
- package/dist/storage/adapter.js.map +0 -1
- package/dist/storage/sqlite-adapter.d.ts.map +0 -1
- package/dist/storage/sqlite-adapter.js.map +0 -1
- package/dist/trajectory/config.d.ts.map +0 -1
- package/dist/trajectory/config.js.map +0 -1
- package/dist/trajectory/index.d.ts.map +0 -1
- package/dist/trajectory/index.js.map +0 -1
- package/dist/trajectory/integration.d.ts.map +0 -1
- package/dist/trajectory/integration.js.map +0 -1
- package/dist/utils/agent-config.d.ts.map +0 -1
- package/dist/utils/agent-config.js.map +0 -1
- package/dist/utils/command-resolver.d.ts.map +0 -1
- package/dist/utils/command-resolver.js.map +0 -1
- package/dist/utils/index.d.ts.map +0 -1
- package/dist/utils/index.js.map +0 -1
- package/dist/utils/logger.d.ts.map +0 -1
- package/dist/utils/logger.js.map +0 -1
- package/dist/utils/name-generator.d.ts.map +0 -1
- package/dist/utils/name-generator.js.map +0 -1
- package/dist/utils/project-namespace.d.ts.map +0 -1
- package/dist/utils/project-namespace.js.map +0 -1
- package/dist/utils/tmux-resolver.d.ts.map +0 -1
- package/dist/utils/tmux-resolver.js.map +0 -1
- package/dist/utils/update-checker.d.ts.map +0 -1
- package/dist/utils/update-checker.js.map +0 -1
- package/dist/wrapper/client.d.ts.map +0 -1
- package/dist/wrapper/client.js.map +0 -1
- package/dist/wrapper/inbox.d.ts.map +0 -1
- package/dist/wrapper/inbox.js.map +0 -1
- package/dist/wrapper/index.d.ts.map +0 -1
- package/dist/wrapper/index.js.map +0 -1
- package/dist/wrapper/parser.d.ts.map +0 -1
- package/dist/wrapper/parser.js.map +0 -1
- package/dist/wrapper/pty-wrapper.d.ts.map +0 -1
- package/dist/wrapper/pty-wrapper.js.map +0 -1
- package/dist/wrapper/shared.d.ts.map +0 -1
- package/dist/wrapper/shared.js.map +0 -1
- package/dist/wrapper/tmux-wrapper.d.ts.map +0 -1
- package/dist/wrapper/tmux-wrapper.js.map +0 -1
- package/docs/AGENTS.md +0 -513
- package/docs/ARCHITECTURE_DECISIONS.md +0 -175
- package/docs/CLOUD-ARCHITECTURE.md +0 -804
- package/docs/CLOUD-ONBOARDING-DESIGN.md +0 -1983
- package/docs/CONTRIBUTING.md +0 -151
- package/docs/HOOKS_API.md +0 -394
- package/docs/INTEGRATION-GUIDE.md +0 -926
- package/docs/PROTOCOL.md +0 -325
- package/docs/WRAPPER_EVENTS.md +0 -358
- package/docs/agent-policy-snippet.md +0 -40
- package/docs/agent-relay-protocol.md +0 -238
- package/docs/agent-relay-snippet.md +0 -174
- package/docs/archive/CHANGELOG.md +0 -11
- package/docs/archive/CLI-SIMPLIFICATION-COMPLETE.md +0 -48
- package/docs/archive/DESIGN_BRIDGE_STAFFING.md +0 -878
- package/docs/archive/DESIGN_V2.md +0 -1079
- package/docs/archive/EXECUTIVE_SUMMARY.md +0 -358
- package/docs/archive/MONETIZATION.md +0 -1679
- package/docs/archive/PROPOSAL-trajectories.md +0 -1582
- package/docs/archive/ROADMAP.md +0 -329
- package/docs/archive/SCALING_ANALYSIS.md +0 -280
- package/docs/archive/TESTING_PRESENCE_FEATURES.md +0 -327
- package/docs/archive/TMUX_IMPLEMENTATION_NOTES.md +0 -364
- package/docs/archive/TMUX_IMPROVEMENTS.md +0 -968
- package/docs/archive/dashboard-v2-plan.md +0 -179
- package/docs/archive/removable-code-analysis.md +0 -24
- package/docs/competitive/GASTOWN.md +0 -451
- package/docs/competitive/MCP_AGENT_MAIL.md +0 -389
- package/docs/competitive/OVERVIEW.md +0 -898
- package/docs/competitive/README.md +0 -34
- package/docs/competitive/TMUX_ORCHESTRATOR.md +0 -605
- package/docs/dashboard.png +0 -0
- package/docs/design/ci-failure-webhooks.md +0 -812
- package/docs/design/comprehensive-integrations.md +0 -238
- package/docs/design/e2b-sandbox-integration.md +0 -504
- package/docs/design/github-app-permissions.md +0 -264
- package/docs/guides/CLOUD.md +0 -236
- package/docs/guides/LOCAL.md +0 -535
- package/docs/guides/SELF-HOSTED.md +0 -494
- package/docs/local-testing.md +0 -428
- package/docs/proposals/continuous-claude-integration.md +0 -622
- package/docs/proposals/custom-commands.md +0 -368
- package/docs/proposals/shadow-as-subagent.md +0 -765
- package/docs/proposals/slack-bot-integration.md +0 -1457
- package/docs/tasks/global-skills-system.tasks.md +0 -230
- package/docs/tasks/webhook-integrations.tasks.md +0 -184
- package/docs/tasks/workspace-capabilities.tasks.md +0 -121
- package/docs/testing/RESILIENCY-TEST-PLAN-2026-01-01.md +0 -366
- package/scripts/cloud-setup.sh +0 -96
- package/scripts/dev/PUBLIC_RELEASE_PLAN.md +0 -88
- package/scripts/dev/dev-team-setup.sh +0 -431
- package/scripts/e2e-test.sh +0 -119
- package/scripts/games/game-protocol.md +0 -79
- package/scripts/games/hearts-setup.sh +0 -264
- package/scripts/manual-qa.sh +0 -293
- package/scripts/run-cloud-qa.sh +0 -220
- package/scripts/test-cli-auth/Dockerfile +0 -44
- package/scripts/test-cli-auth/Dockerfile.real +0 -79
- package/scripts/test-cli-auth/README.md +0 -286
- package/scripts/test-cli-auth/ci-test-real-clis.ts +0 -251
- package/scripts/test-cli-auth/ci-test-runner.ts +0 -263
- package/scripts/test-cli-auth/mock-cli.sh +0 -147
- package/scripts/test-cli-auth/package.json +0 -14
- package/scripts/test-cli-auth/test-oauth-flow.ts +0 -220
- package/scripts/test-pty-input-auto.js +0 -222
- package/scripts/test-pty-input.js +0 -150
- package/scripts/tictactoe-setup.sh +0 -181
- /package/dist/dashboard/out/_next/static/chunks/{117-b100311aff8d5c61.js → 117-f7b8ab0809342e77.js} +0 -0
- /package/dist/dashboard/out/_next/static/chunks/{648-a13d3c2b1be45466.js → 648-5cc6e1921389a58a.js} +0 -0
- /package/dist/dashboard/out/_next/static/chunks/{724-73c1ee5f60abe860.js → 724-2dae7627550ab88f.js} +0 -0
- /package/dist/dashboard/out/_next/static/chunks/app/_not-found/{page-a4973f3e3c82fb67.js → page-53b8a69f76db17d0.js} +0 -0
- /package/dist/dashboard/out/_next/static/chunks/{fd9d1056-bf46c09eb57e019c.js → fd9d1056-609918ca7b6280bb.js} +0 -0
- /package/dist/dashboard/out/_next/static/{H5aWG0udPB4iOUIl_gytz → wPgKJtcOmTFLpUncDg16A}/_buildManifest.js +0 -0
- /package/dist/dashboard/out/_next/static/{H5aWG0udPB4iOUIl_gytz → wPgKJtcOmTFLpUncDg16A}/_ssgManifest.js +0 -0
package/docs/PROTOCOL.md
DELETED
|
@@ -1,325 +0,0 @@
|
|
|
1
|
-
# Agent Relay Protocol Specification
|
|
2
|
-
|
|
3
|
-
Version 1.0
|
|
4
|
-
|
|
5
|
-
## Goals
|
|
6
|
-
|
|
7
|
-
- Low-latency local IPC (<5ms)
|
|
8
|
-
- Strict framing with backpressure
|
|
9
|
-
- At-least-once delivery (optional exactly-once within session)
|
|
10
|
-
- Reconnect + state resync
|
|
11
|
-
- Simple to implement in Rust/Go/TypeScript
|
|
12
|
-
|
|
13
|
-
## Non-Goals
|
|
14
|
-
|
|
15
|
-
- Cross-host networking
|
|
16
|
-
- Encryption (local-only)
|
|
17
|
-
- Unbounded buffering
|
|
18
|
-
|
|
19
|
-
---
|
|
20
|
-
|
|
21
|
-
## 1. Transport
|
|
22
|
-
|
|
23
|
-
**Preferred:** Unix Domain Socket (stream)
|
|
24
|
-
- Path: `/tmp/agent-relay.sock` (configurable)
|
|
25
|
-
|
|
26
|
-
**Windows fallback:** Named Pipe
|
|
27
|
-
- Path: `\\.\pipe\agent-relay`
|
|
28
|
-
|
|
29
|
-
**Connection model:** Each wrapper opens 1 duplex stream to daemon.
|
|
30
|
-
|
|
31
|
-
---
|
|
32
|
-
|
|
33
|
-
## 2. Framing
|
|
34
|
-
|
|
35
|
-
Stream is a sequence of frames.
|
|
36
|
-
|
|
37
|
-
### Frame Header
|
|
38
|
-
- 4-byte big-endian unsigned length `N` (bytes)
|
|
39
|
-
- Followed by `N` bytes UTF-8 JSON
|
|
40
|
-
|
|
41
|
-
### Limits
|
|
42
|
-
- `N` MUST be <= `max_frame_bytes` (default: 1 MiB)
|
|
43
|
-
- If exceeded, daemon closes connection with error
|
|
44
|
-
- JSON payload MUST be an object
|
|
45
|
-
|
|
46
|
-
### Example (pseudo)
|
|
47
|
-
```
|
|
48
|
-
0000003A {"v":1,"type":"HELLO","agent":"claude-1",...}
|
|
49
|
-
```
|
|
50
|
-
Where `0x3A` (58) is the byte length of the JSON payload.
|
|
51
|
-
|
|
52
|
-
---
|
|
53
|
-
|
|
54
|
-
## 3. Envelope
|
|
55
|
-
|
|
56
|
-
All messages are `Envelope` objects:
|
|
57
|
-
|
|
58
|
-
```typescript
|
|
59
|
-
interface Envelope {
|
|
60
|
-
v: 1; // Protocol version
|
|
61
|
-
type: MessageType; // See below
|
|
62
|
-
id: string; // Unique per-sender (UUIDv4)
|
|
63
|
-
ts: number; // Milliseconds since epoch
|
|
64
|
-
from?: string; // Agent name (set by daemon)
|
|
65
|
-
to?: string | '*'; // Target or broadcast
|
|
66
|
-
topic?: string; // Optional topic/channel
|
|
67
|
-
payload: object; // Type-specific payload
|
|
68
|
-
}
|
|
69
|
-
```
|
|
70
|
-
|
|
71
|
-
### Message Types
|
|
72
|
-
|
|
73
|
-
| Type | Direction | Purpose |
|
|
74
|
-
|------|-----------|---------|
|
|
75
|
-
| `HELLO` | Client→Server | Initiate handshake |
|
|
76
|
-
| `WELCOME` | Server→Client | Confirm session |
|
|
77
|
-
| `SEND` | Client→Server | Send message |
|
|
78
|
-
| `DELIVER` | Server→Client | Deliver message |
|
|
79
|
-
| `ACK` | Both | Acknowledge receipt |
|
|
80
|
-
| `NACK` | Both | Negative acknowledgment |
|
|
81
|
-
| `PING` | Server→Client | Heartbeat |
|
|
82
|
-
| `PONG` | Client→Server | Heartbeat response |
|
|
83
|
-
| `ERROR` | Server→Client | Error notification |
|
|
84
|
-
| `BUSY` | Server→Client | Backpressure signal |
|
|
85
|
-
| `RESUME` | Client→Server | Resume session |
|
|
86
|
-
| `SYNC` | Server→Client | State sync info |
|
|
87
|
-
| `BYE` | Both | Graceful disconnect |
|
|
88
|
-
| `SUBSCRIBE` | Client→Server | Subscribe to topic |
|
|
89
|
-
| `UNSUBSCRIBE` | Client→Server | Unsubscribe from topic |
|
|
90
|
-
|
|
91
|
-
---
|
|
92
|
-
|
|
93
|
-
## 4. Handshake
|
|
94
|
-
|
|
95
|
-
### New Session
|
|
96
|
-
|
|
97
|
-
**Client → Server: HELLO**
|
|
98
|
-
```json
|
|
99
|
-
{
|
|
100
|
-
"v": 1,
|
|
101
|
-
"type": "HELLO",
|
|
102
|
-
"id": "uuid",
|
|
103
|
-
"ts": 1734440000000,
|
|
104
|
-
"payload": {
|
|
105
|
-
"agent": "claude-1",
|
|
106
|
-
"capabilities": {
|
|
107
|
-
"ack": true,
|
|
108
|
-
"resume": true,
|
|
109
|
-
"max_inflight": 256,
|
|
110
|
-
"supports_topics": true
|
|
111
|
-
},
|
|
112
|
-
"session": {
|
|
113
|
-
"resume_token": "optional-previous-token"
|
|
114
|
-
}
|
|
115
|
-
}
|
|
116
|
-
}
|
|
117
|
-
```
|
|
118
|
-
|
|
119
|
-
**Server → Client: WELCOME**
|
|
120
|
-
```json
|
|
121
|
-
{
|
|
122
|
-
"v": 1,
|
|
123
|
-
"type": "WELCOME",
|
|
124
|
-
"id": "uuid",
|
|
125
|
-
"ts": 1734440000001,
|
|
126
|
-
"payload": {
|
|
127
|
-
"session_id": "s-abc123",
|
|
128
|
-
"resume_token": "new-token-for-reconnect",
|
|
129
|
-
"server": {
|
|
130
|
-
"max_frame_bytes": 1048576,
|
|
131
|
-
"heartbeat_ms": 5000
|
|
132
|
-
}
|
|
133
|
-
}
|
|
134
|
-
}
|
|
135
|
-
```
|
|
136
|
-
|
|
137
|
-
---
|
|
138
|
-
|
|
139
|
-
## 5. Sending and Delivery
|
|
140
|
-
|
|
141
|
-
### Client → Server: SEND
|
|
142
|
-
```json
|
|
143
|
-
{
|
|
144
|
-
"v": 1,
|
|
145
|
-
"type": "SEND",
|
|
146
|
-
"id": "m-001",
|
|
147
|
-
"ts": 1734440000100,
|
|
148
|
-
"to": "codex-1",
|
|
149
|
-
"topic": "chat",
|
|
150
|
-
"payload": {
|
|
151
|
-
"kind": "message",
|
|
152
|
-
"body": "Your turn",
|
|
153
|
-
"data": {}
|
|
154
|
-
},
|
|
155
|
-
"payload_meta": {
|
|
156
|
-
"requires_ack": true,
|
|
157
|
-
"ttl_ms": 60000
|
|
158
|
-
}
|
|
159
|
-
}
|
|
160
|
-
```
|
|
161
|
-
|
|
162
|
-
### Server → Recipient: DELIVER
|
|
163
|
-
```json
|
|
164
|
-
{
|
|
165
|
-
"v": 1,
|
|
166
|
-
"type": "DELIVER",
|
|
167
|
-
"id": "d-001",
|
|
168
|
-
"ts": 1734440000102,
|
|
169
|
-
"from": "claude-1",
|
|
170
|
-
"to": "codex-1",
|
|
171
|
-
"topic": "chat",
|
|
172
|
-
"payload": {
|
|
173
|
-
"kind": "message",
|
|
174
|
-
"body": "Your turn",
|
|
175
|
-
"data": {}
|
|
176
|
-
},
|
|
177
|
-
"delivery": {
|
|
178
|
-
"seq": 42,
|
|
179
|
-
"session_id": "s-abc123"
|
|
180
|
-
}
|
|
181
|
-
}
|
|
182
|
-
```
|
|
183
|
-
|
|
184
|
-
### Recipient → Server: ACK
|
|
185
|
-
```json
|
|
186
|
-
{
|
|
187
|
-
"v": 1,
|
|
188
|
-
"type": "ACK",
|
|
189
|
-
"id": "uuid",
|
|
190
|
-
"ts": 1734440000103,
|
|
191
|
-
"payload": {
|
|
192
|
-
"ack_id": "d-001",
|
|
193
|
-
"seq": 42
|
|
194
|
-
}
|
|
195
|
-
}
|
|
196
|
-
```
|
|
197
|
-
|
|
198
|
-
### Ordering Guarantee
|
|
199
|
-
|
|
200
|
-
Per `(topic, from → to)` stream, daemon guarantees in-order DELIVER by `delivery.seq`.
|
|
201
|
-
|
|
202
|
-
No global ordering across topics.
|
|
203
|
-
|
|
204
|
-
---
|
|
205
|
-
|
|
206
|
-
## 6. Backpressure
|
|
207
|
-
|
|
208
|
-
Backpressure signaling is reserved for future versions. The current daemon is best-effort and does not implement bounded outbound queues or `BUSY` responses.
|
|
209
|
-
|
|
210
|
-
### Server → Client: BUSY
|
|
211
|
-
```json
|
|
212
|
-
{
|
|
213
|
-
"v": 1,
|
|
214
|
-
"type": "BUSY",
|
|
215
|
-
"id": "uuid",
|
|
216
|
-
"ts": 1734440000300,
|
|
217
|
-
"payload": {
|
|
218
|
-
"retry_after_ms": 50,
|
|
219
|
-
"queue_depth": 1000
|
|
220
|
-
}
|
|
221
|
-
}
|
|
222
|
-
```
|
|
223
|
-
|
|
224
|
-
Client should back off (exponential with jitter).
|
|
225
|
-
|
|
226
|
-
---
|
|
227
|
-
|
|
228
|
-
## 7. Heartbeats
|
|
229
|
-
|
|
230
|
-
- Daemon sends PING every `heartbeat_ms` if idle
|
|
231
|
-
- Wrapper replies PONG with same nonce
|
|
232
|
-
- Missing PONG for `2 * heartbeat_ms` → connection dead
|
|
233
|
-
|
|
234
|
-
---
|
|
235
|
-
|
|
236
|
-
## 8. Reconnect / Resume
|
|
237
|
-
|
|
238
|
-
### Client → Server: RESUME
|
|
239
|
-
```json
|
|
240
|
-
{
|
|
241
|
-
"v": 1,
|
|
242
|
-
"type": "RESUME",
|
|
243
|
-
"id": "uuid",
|
|
244
|
-
"ts": 1734440001000,
|
|
245
|
-
"payload": {
|
|
246
|
-
"session_id": "s-abc123",
|
|
247
|
-
"agent": "claude-1",
|
|
248
|
-
"streams": {
|
|
249
|
-
"chat": { "last_seq": 45 }
|
|
250
|
-
}
|
|
251
|
-
}
|
|
252
|
-
}
|
|
253
|
-
```
|
|
254
|
-
|
|
255
|
-
### Server → Client: SYNC
|
|
256
|
-
```json
|
|
257
|
-
{
|
|
258
|
-
"v": 1,
|
|
259
|
-
"type": "SYNC",
|
|
260
|
-
"id": "uuid",
|
|
261
|
-
"ts": 1734440001001,
|
|
262
|
-
"payload": {
|
|
263
|
-
"session_id": "s-abc123",
|
|
264
|
-
"streams": [
|
|
265
|
-
{ "topic": "chat", "peer": "codex-1", "last_seq": 45, "server_last_seq": 49 }
|
|
266
|
-
]
|
|
267
|
-
}
|
|
268
|
-
}
|
|
269
|
-
```
|
|
270
|
-
|
|
271
|
-
Server then replays DELIVER messages from `last_seq + 1` to `server_last_seq`.
|
|
272
|
-
|
|
273
|
-
### Stale Resume
|
|
274
|
-
|
|
275
|
-
If resume gap exceeds retention, server sends NACK with code "STALE".
|
|
276
|
-
Client should send fresh HELLO.
|
|
277
|
-
|
|
278
|
-
---
|
|
279
|
-
|
|
280
|
-
## 9. PTY Pattern Extractor
|
|
281
|
-
|
|
282
|
-
### Fenced Format (default, recommended)
|
|
283
|
-
|
|
284
|
-
```
|
|
285
|
-
->relay:codex-1 <<<
|
|
286
|
-
Your turn to play>>>
|
|
287
|
-
|
|
288
|
-
->relay:* <<<
|
|
289
|
-
Hello everyone>>>
|
|
290
|
-
```
|
|
291
|
-
|
|
292
|
-
**Always use the fenced format** for reliable message delivery. The `<<<` opens, `>>>` closes at end of last line.
|
|
293
|
-
|
|
294
|
-
### Block Format (structured data)
|
|
295
|
-
|
|
296
|
-
```
|
|
297
|
-
[[RELAY]]
|
|
298
|
-
{"to": "*", "type": "message", "body": "Hello everyone"}
|
|
299
|
-
[[/RELAY]]
|
|
300
|
-
```
|
|
301
|
-
|
|
302
|
-
### Rules
|
|
303
|
-
|
|
304
|
-
1. Fenced: `->relay:AgentName <<<` starts message, `>>>` ends it
|
|
305
|
-
2. Block: Only parse when `[[RELAY]]` at start of line
|
|
306
|
-
3. Pattern must be at start of line, not in code fences
|
|
307
|
-
4. Escape: `\->relay:` outputs literal `->relay:`
|
|
308
|
-
|
|
309
|
-
---
|
|
310
|
-
|
|
311
|
-
## 10. Connection Lifecycle
|
|
312
|
-
|
|
313
|
-
```
|
|
314
|
-
DISCONNECTED → CONNECTING → HANDSHAKING → READY
|
|
315
|
-
↑ ↓
|
|
316
|
-
BACKOFF ←─────── ERROR
|
|
317
|
-
```
|
|
318
|
-
|
|
319
|
-
### Backoff Strategy
|
|
320
|
-
|
|
321
|
-
- Initial: 100ms
|
|
322
|
-
- Multiplier: 2x
|
|
323
|
-
- Max: 30s
|
|
324
|
-
- Jitter: ±15%
|
|
325
|
-
- Max attempts: 10
|
package/docs/WRAPPER_EVENTS.md
DELETED
|
@@ -1,358 +0,0 @@
|
|
|
1
|
-
# PtyWrapper Events
|
|
2
|
-
|
|
3
|
-
PtyWrapper extends Node.js EventEmitter and emits events for monitoring agent behavior, handling persistence, and debugging. This document describes all available events and how to use them.
|
|
4
|
-
|
|
5
|
-
## Event Reference
|
|
6
|
-
|
|
7
|
-
### `output`
|
|
8
|
-
|
|
9
|
-
Emitted for every chunk of output from the agent's PTY.
|
|
10
|
-
|
|
11
|
-
```typescript
|
|
12
|
-
pty.on('output', (data: string) => {
|
|
13
|
-
console.log('Agent output:', data);
|
|
14
|
-
});
|
|
15
|
-
```
|
|
16
|
-
|
|
17
|
-
**Parameters:**
|
|
18
|
-
- `data` (string): Raw output data from the PTY
|
|
19
|
-
|
|
20
|
-
**Use cases:**
|
|
21
|
-
- Live log streaming to dashboard
|
|
22
|
-
- Output capture for analysis
|
|
23
|
-
- Debugging agent behavior
|
|
24
|
-
|
|
25
|
-
---
|
|
26
|
-
|
|
27
|
-
### `exit`
|
|
28
|
-
|
|
29
|
-
Emitted when the agent process exits.
|
|
30
|
-
|
|
31
|
-
```typescript
|
|
32
|
-
pty.on('exit', (code: number) => {
|
|
33
|
-
console.log(`Agent exited with code ${code}`);
|
|
34
|
-
});
|
|
35
|
-
```
|
|
36
|
-
|
|
37
|
-
**Parameters:**
|
|
38
|
-
- `code` (number): Exit code of the process (0 = success)
|
|
39
|
-
|
|
40
|
-
**Use cases:**
|
|
41
|
-
- Cleanup resources
|
|
42
|
-
- Trigger restart logic
|
|
43
|
-
- Update agent status
|
|
44
|
-
|
|
45
|
-
---
|
|
46
|
-
|
|
47
|
-
### `error`
|
|
48
|
-
|
|
49
|
-
Emitted when an error occurs in the wrapper.
|
|
50
|
-
|
|
51
|
-
```typescript
|
|
52
|
-
pty.on('error', (error: Error) => {
|
|
53
|
-
console.error('PTY error:', error);
|
|
54
|
-
});
|
|
55
|
-
```
|
|
56
|
-
|
|
57
|
-
**Parameters:**
|
|
58
|
-
- `error` (Error): The error that occurred
|
|
59
|
-
|
|
60
|
-
**Use cases:**
|
|
61
|
-
- Error logging
|
|
62
|
-
- Alerting
|
|
63
|
-
- Graceful error handling
|
|
64
|
-
|
|
65
|
-
---
|
|
66
|
-
|
|
67
|
-
### `injection-failed`
|
|
68
|
-
|
|
69
|
-
Emitted when message injection fails after all retry attempts.
|
|
70
|
-
|
|
71
|
-
```typescript
|
|
72
|
-
import type { InjectionFailedEvent } from './wrapper/pty-wrapper.js';
|
|
73
|
-
|
|
74
|
-
pty.on('injection-failed', (event: InjectionFailedEvent) => {
|
|
75
|
-
console.warn('Injection failed:', event);
|
|
76
|
-
});
|
|
77
|
-
```
|
|
78
|
-
|
|
79
|
-
**Parameters:**
|
|
80
|
-
- `event.messageId` (string): ID of the failed message
|
|
81
|
-
- `event.from` (string): Sender of the message
|
|
82
|
-
- `event.attempts` (number): Number of injection attempts made
|
|
83
|
-
|
|
84
|
-
**Use cases:**
|
|
85
|
-
- Alert on delivery failures
|
|
86
|
-
- Fallback to inbox-based delivery
|
|
87
|
-
- Dashboard warning indicators
|
|
88
|
-
|
|
89
|
-
---
|
|
90
|
-
|
|
91
|
-
### `summary`
|
|
92
|
-
|
|
93
|
-
Emitted when the agent outputs a `[[SUMMARY]]` block. Used for cloud persistence.
|
|
94
|
-
|
|
95
|
-
```typescript
|
|
96
|
-
import type { SummaryEvent } from './wrapper/pty-wrapper.js';
|
|
97
|
-
|
|
98
|
-
pty.on('summary', (event: SummaryEvent) => {
|
|
99
|
-
console.log(`${event.agentName} summary:`, event.summary);
|
|
100
|
-
});
|
|
101
|
-
```
|
|
102
|
-
|
|
103
|
-
**Parameters:**
|
|
104
|
-
- `event.agentName` (string): Name of the agent
|
|
105
|
-
- `event.summary` (ParsedSummary): Parsed summary object
|
|
106
|
-
- `currentTask?` (string): What the agent is currently working on
|
|
107
|
-
- `completedTasks?` (string[]): List of completed tasks
|
|
108
|
-
- `decisions?` (string[]): Key decisions made
|
|
109
|
-
- `context?` (string): Additional context
|
|
110
|
-
- `files?` (string[]): Files being worked on
|
|
111
|
-
|
|
112
|
-
**Agent output format:**
|
|
113
|
-
```
|
|
114
|
-
[[SUMMARY]]
|
|
115
|
-
{
|
|
116
|
-
"currentTask": "Implementing auth module",
|
|
117
|
-
"completedTasks": ["login flow", "session management"],
|
|
118
|
-
"context": "Using JWT for tokens",
|
|
119
|
-
"files": ["src/auth.ts", "src/session.ts"]
|
|
120
|
-
}
|
|
121
|
-
[[/SUMMARY]]
|
|
122
|
-
```
|
|
123
|
-
|
|
124
|
-
**Use cases:**
|
|
125
|
-
- Persist agent progress to database
|
|
126
|
-
- Resume interrupted sessions
|
|
127
|
-
- Dashboard progress indicators
|
|
128
|
-
|
|
129
|
-
---
|
|
130
|
-
|
|
131
|
-
### `session-end`
|
|
132
|
-
|
|
133
|
-
Emitted when the agent outputs a `[[SESSION_END]]` block. Marks explicit session completion.
|
|
134
|
-
|
|
135
|
-
```typescript
|
|
136
|
-
import type { SessionEndEvent } from './wrapper/pty-wrapper.js';
|
|
137
|
-
|
|
138
|
-
pty.on('session-end', (event: SessionEndEvent) => {
|
|
139
|
-
console.log(`${event.agentName} ended session:`, event.marker);
|
|
140
|
-
});
|
|
141
|
-
```
|
|
142
|
-
|
|
143
|
-
**Parameters:**
|
|
144
|
-
- `event.agentName` (string): Name of the agent
|
|
145
|
-
- `event.marker` (SessionEndMarker): End marker object
|
|
146
|
-
- `summary?` (string): Final session summary
|
|
147
|
-
- `completedTasks?` (string[]): Tasks completed in session
|
|
148
|
-
|
|
149
|
-
**Agent output format:**
|
|
150
|
-
```
|
|
151
|
-
[[SESSION_END]]
|
|
152
|
-
{
|
|
153
|
-
"summary": "Completed auth module implementation",
|
|
154
|
-
"completedTasks": ["login", "logout", "session management"]
|
|
155
|
-
}
|
|
156
|
-
[[/SESSION_END]]
|
|
157
|
-
```
|
|
158
|
-
|
|
159
|
-
Or empty for clean close:
|
|
160
|
-
```
|
|
161
|
-
[[SESSION_END]][[/SESSION_END]]
|
|
162
|
-
```
|
|
163
|
-
|
|
164
|
-
**Use cases:**
|
|
165
|
-
- Close session in database
|
|
166
|
-
- Trigger cleanup
|
|
167
|
-
- Update billing/usage
|
|
168
|
-
|
|
169
|
-
---
|
|
170
|
-
|
|
171
|
-
## Cloud Persistence Integration
|
|
172
|
-
|
|
173
|
-
For cloud deployments, use `CloudPersistenceService` to automatically persist summary and session-end events to PostgreSQL:
|
|
174
|
-
|
|
175
|
-
```typescript
|
|
176
|
-
import { PtyWrapper } from './wrapper/pty-wrapper.js';
|
|
177
|
-
import { CloudPersistenceService } from './cloud/services/persistence.js';
|
|
178
|
-
|
|
179
|
-
// Create persistence service
|
|
180
|
-
const persistence = new CloudPersistenceService({
|
|
181
|
-
workspaceId: 'workspace-123',
|
|
182
|
-
onSummaryPersisted: (agentName, summaryId) => {
|
|
183
|
-
console.log(`Summary saved: ${summaryId}`);
|
|
184
|
-
},
|
|
185
|
-
});
|
|
186
|
-
|
|
187
|
-
// Create and start PTY
|
|
188
|
-
const pty = new PtyWrapper(config);
|
|
189
|
-
await pty.start();
|
|
190
|
-
|
|
191
|
-
// Bind persistence to PTY - creates session record
|
|
192
|
-
const sessionId = await persistence.bindToPtyWrapper(pty);
|
|
193
|
-
|
|
194
|
-
// ... agent runs ...
|
|
195
|
-
|
|
196
|
-
// Cleanup when done
|
|
197
|
-
persistence.unbindFromPtyWrapper(pty);
|
|
198
|
-
```
|
|
199
|
-
|
|
200
|
-
### Database Schema
|
|
201
|
-
|
|
202
|
-
```sql
|
|
203
|
-
-- Agent sessions
|
|
204
|
-
CREATE TABLE agent_sessions (
|
|
205
|
-
id UUID PRIMARY KEY,
|
|
206
|
-
workspace_id UUID NOT NULL REFERENCES workspaces(id),
|
|
207
|
-
agent_name VARCHAR(255) NOT NULL,
|
|
208
|
-
status VARCHAR(50) DEFAULT 'active',
|
|
209
|
-
started_at TIMESTAMPTZ DEFAULT NOW(),
|
|
210
|
-
ended_at TIMESTAMPTZ,
|
|
211
|
-
end_marker JSONB,
|
|
212
|
-
metadata JSONB DEFAULT '{}'
|
|
213
|
-
);
|
|
214
|
-
|
|
215
|
-
-- Agent summaries
|
|
216
|
-
CREATE TABLE agent_summaries (
|
|
217
|
-
id UUID PRIMARY KEY,
|
|
218
|
-
session_id UUID NOT NULL REFERENCES agent_sessions(id),
|
|
219
|
-
agent_name VARCHAR(255) NOT NULL,
|
|
220
|
-
summary JSONB NOT NULL,
|
|
221
|
-
created_at TIMESTAMPTZ DEFAULT NOW()
|
|
222
|
-
);
|
|
223
|
-
```
|
|
224
|
-
|
|
225
|
-
---
|
|
226
|
-
|
|
227
|
-
## Daemon Event Integration
|
|
228
|
-
|
|
229
|
-
When using `AgentManager`, PtyWrapper events are automatically forwarded as daemon events:
|
|
230
|
-
|
|
231
|
-
| PtyWrapper Event | Daemon Event | Description |
|
|
232
|
-
|------------------|--------------|-------------|
|
|
233
|
-
| `summary` | `agent:summary` | Agent output a summary block |
|
|
234
|
-
| `session-end` | `agent:session-end` | Agent explicitly ended session |
|
|
235
|
-
| `injection-failed` | `agent:injection-failed` | Message delivery failed |
|
|
236
|
-
|
|
237
|
-
```typescript
|
|
238
|
-
const manager = getAgentManager();
|
|
239
|
-
|
|
240
|
-
// Optional: Enable cloud persistence
|
|
241
|
-
manager.setCloudPersistence({
|
|
242
|
-
onSummary: async (agentId, event) => {
|
|
243
|
-
await db.saveSummary(agentId, event.summary);
|
|
244
|
-
},
|
|
245
|
-
onSessionEnd: async (agentId, event) => {
|
|
246
|
-
await db.endSession(agentId, event.marker);
|
|
247
|
-
},
|
|
248
|
-
});
|
|
249
|
-
|
|
250
|
-
// Daemon events are emitted to connected dashboard clients
|
|
251
|
-
manager.on('event', (event) => {
|
|
252
|
-
if (event.type === 'agent:summary') {
|
|
253
|
-
broadcastToClients(event);
|
|
254
|
-
}
|
|
255
|
-
});
|
|
256
|
-
```
|
|
257
|
-
|
|
258
|
-
---
|
|
259
|
-
|
|
260
|
-
## Event Flow Diagram
|
|
261
|
-
|
|
262
|
-
```
|
|
263
|
-
Agent Output
|
|
264
|
-
│
|
|
265
|
-
▼
|
|
266
|
-
┌───────────────┐
|
|
267
|
-
│ PtyWrapper │
|
|
268
|
-
│ handleOutput()│
|
|
269
|
-
└───────┬───────┘
|
|
270
|
-
│
|
|
271
|
-
├──► emit('output', data)
|
|
272
|
-
│
|
|
273
|
-
├──► parseRelayCommands()
|
|
274
|
-
│
|
|
275
|
-
├──► checkForSummaryAndEmit()
|
|
276
|
-
│ │
|
|
277
|
-
│ ▼
|
|
278
|
-
│ emit('summary', event)
|
|
279
|
-
│ │
|
|
280
|
-
│ ▼
|
|
281
|
-
│ CloudPersistenceService
|
|
282
|
-
│ │
|
|
283
|
-
│ ▼
|
|
284
|
-
│ PostgreSQL
|
|
285
|
-
│
|
|
286
|
-
└──► checkForSessionEndAndEmit()
|
|
287
|
-
│
|
|
288
|
-
▼
|
|
289
|
-
emit('session-end', event)
|
|
290
|
-
```
|
|
291
|
-
|
|
292
|
-
---
|
|
293
|
-
|
|
294
|
-
## Best Practices
|
|
295
|
-
|
|
296
|
-
1. **Always unbind on cleanup** - Call `persistence.unbindFromPtyWrapper(pty)` or the listeners will leak
|
|
297
|
-
|
|
298
|
-
2. **Use resetSessionState() for reuse** - If reusing a wrapper instance, call `pty.resetSessionState()` to clear session-specific state
|
|
299
|
-
|
|
300
|
-
3. **Handle async errors** - Event handlers for `summary` and `session-end` can be async, but errors should be caught
|
|
301
|
-
|
|
302
|
-
4. **Deduplication is automatic** - PtyWrapper deduplicates summary events based on content, preventing repeated persistence of the same summary
|
|
303
|
-
|
|
304
|
-
---
|
|
305
|
-
|
|
306
|
-
## Environment Variables
|
|
307
|
-
|
|
308
|
-
Configure PtyWrapper and cloud persistence behavior via environment variables:
|
|
309
|
-
|
|
310
|
-
### Summary Reminders
|
|
311
|
-
|
|
312
|
-
| Variable | Default | Description |
|
|
313
|
-
|----------|---------|-------------|
|
|
314
|
-
| `RELAY_SUMMARY_REMINDER_ENABLED` | `true` | Set to `false` to disable automatic summary reminders |
|
|
315
|
-
| `RELAY_SUMMARY_INTERVAL_MINUTES` | `15` | Minutes of activity before injecting a summary reminder |
|
|
316
|
-
| `RELAY_SUMMARY_MIN_OUTPUTS` | `50` | Minimum significant outputs before reminding |
|
|
317
|
-
|
|
318
|
-
Example:
|
|
319
|
-
```bash
|
|
320
|
-
# Remind every 30 minutes after 100 outputs
|
|
321
|
-
export RELAY_SUMMARY_INTERVAL_MINUTES=30
|
|
322
|
-
export RELAY_SUMMARY_MIN_OUTPUTS=100
|
|
323
|
-
|
|
324
|
-
# Disable reminders entirely
|
|
325
|
-
export RELAY_SUMMARY_REMINDER_ENABLED=false
|
|
326
|
-
```
|
|
327
|
-
|
|
328
|
-
### Cloud Persistence (Pro+ Feature)
|
|
329
|
-
|
|
330
|
-
> **Note:** Session persistence is a premium feature requiring Pro plan or higher.
|
|
331
|
-
> In cloud deployments, access is enforced at the organization level via `canUseSessionPersistence()`.
|
|
332
|
-
|
|
333
|
-
| Variable | Default | Description |
|
|
334
|
-
|----------|---------|-------------|
|
|
335
|
-
| `RELAY_CLOUD_ENABLED` | `false` | Set to `true` to enable cloud persistence (for local dev/testing) |
|
|
336
|
-
| `RELAY_WORKSPACE_ID` | Auto-generated | UUID for workspace scoping (auto-generated from project path if not set) |
|
|
337
|
-
| `DATABASE_URL` | Required | PostgreSQL connection string (required when cloud enabled) |
|
|
338
|
-
|
|
339
|
-
**Local Development:**
|
|
340
|
-
```bash
|
|
341
|
-
# Enable cloud persistence for local testing
|
|
342
|
-
export RELAY_CLOUD_ENABLED=true
|
|
343
|
-
export DATABASE_URL=postgresql://user:pass@localhost:5432/relay
|
|
344
|
-
export RELAY_WORKSPACE_ID=550e8400-e29b-41d4-a716-446655440000
|
|
345
|
-
```
|
|
346
|
-
|
|
347
|
-
**Cloud Deployment:**
|
|
348
|
-
In cloud deployments, the `RELAY_CLOUD_ENABLED` env var is not used.
|
|
349
|
-
Instead, session persistence is enabled per-organization based on subscription:
|
|
350
|
-
- **Free plan:** Not available
|
|
351
|
-
- **Pro+ plans:** Session persistence enabled
|
|
352
|
-
|
|
353
|
-
### Priority
|
|
354
|
-
|
|
355
|
-
Environment variables take precedence over programmatic config:
|
|
356
|
-
1. Environment variable (highest priority)
|
|
357
|
-
2. `PtyWrapperConfig.summaryReminder` option
|
|
358
|
-
3. Default values (lowest priority)
|
|
@@ -1,40 +0,0 @@
|
|
|
1
|
-
# Agent Policy
|
|
2
|
-
|
|
3
|
-
You are operating under organizational agent policies. These policies govern your interactions with other agents and tools.
|
|
4
|
-
|
|
5
|
-
## Your Permissions
|
|
6
|
-
|
|
7
|
-
Check the policy service for your specific permissions. If no explicit restrictions are defined, you have full permissions.
|
|
8
|
-
|
|
9
|
-
## General Rules
|
|
10
|
-
|
|
11
|
-
1. **Spawn Authorization**: Only spawn agents you are authorized to spawn. Check with Lead before spawning if unsure.
|
|
12
|
-
|
|
13
|
-
2. **Message Routing**: Only message agents you are authorized to communicate with. Use proper channels.
|
|
14
|
-
|
|
15
|
-
3. **Tool Usage**: Only use tools you are authorized to use. Read-only operations are generally safer.
|
|
16
|
-
|
|
17
|
-
4. **Rate Limits**: Respect rate limits on messages. Don't spam other agents.
|
|
18
|
-
|
|
19
|
-
## Restricted Agents
|
|
20
|
-
|
|
21
|
-
Workers and non-lead agents typically have these restrictions:
|
|
22
|
-
- Cannot spawn other agents without Lead approval
|
|
23
|
-
- Can only message Lead, Coordinator, and their assigned peers
|
|
24
|
-
- Limited to read-only tools unless explicitly granted write access
|
|
25
|
-
|
|
26
|
-
## Lead Agents
|
|
27
|
-
|
|
28
|
-
Lead agents typically have elevated permissions:
|
|
29
|
-
- Can spawn Worker agents
|
|
30
|
-
- Can message all agents
|
|
31
|
-
- Can use all tools
|
|
32
|
-
- Responsible for enforcing policy on spawned agents
|
|
33
|
-
|
|
34
|
-
## Enforcement
|
|
35
|
-
|
|
36
|
-
Policy violations are blocked at runtime. If your action is blocked, you'll receive a denial message explaining why. Do not attempt to circumvent policy restrictions.
|
|
37
|
-
|
|
38
|
-
## Checking Your Policy
|
|
39
|
-
|
|
40
|
-
To see your current policy, ask Lead or check the dashboard at `/api/policy/:workspaceId`.
|