agent-relay 1.6.0 → 2.0.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/.cursor/mcp.json +11 -0
- package/.gitleaks.toml +26 -0
- package/.mcp.json +11 -0
- package/.nvmrc +1 -1
- package/.turbo/cache/013415461711937f-meta.json +1 -0
- package/.turbo/cache/013415461711937f.tar.zst +0 -0
- package/.turbo/cache/0562b1ff326acd6d-meta.json +1 -0
- package/.turbo/cache/0562b1ff326acd6d.tar.zst +0 -0
- package/.turbo/cache/0b46e0e17254882f-meta.json +1 -0
- package/.turbo/cache/0b46e0e17254882f.tar.zst +0 -0
- package/.turbo/cache/3799eda981d53d14-meta.json +1 -0
- package/.turbo/cache/3799eda981d53d14.tar.zst +0 -0
- package/.turbo/cache/47e9d8f404ed064d-meta.json +1 -0
- package/.turbo/cache/47e9d8f404ed064d.tar.zst +0 -0
- package/.turbo/cache/4cde1d1e5b298099-meta.json +1 -0
- package/.turbo/cache/4cde1d1e5b298099.tar.zst +0 -0
- package/.turbo/cache/538eea955c0936ef-meta.json +1 -0
- package/.turbo/cache/538eea955c0936ef.tar.zst +0 -0
- package/.turbo/cache/5dceac7f229f5d5d-meta.json +1 -0
- package/.turbo/cache/5dceac7f229f5d5d.tar.zst +0 -0
- package/.turbo/cache/64c15b201819367d-meta.json +1 -0
- package/.turbo/cache/64c15b201819367d.tar.zst +0 -0
- package/.turbo/cache/6d6a21a05efca434-meta.json +1 -0
- package/.turbo/cache/6d6a21a05efca434.tar.zst +0 -0
- package/.turbo/cache/7562610cb03ec040-meta.json +1 -0
- package/.turbo/cache/7562610cb03ec040.tar.zst +0 -0
- package/.turbo/cache/81a2456e17af4d7f-meta.json +1 -0
- package/.turbo/cache/81a2456e17af4d7f.tar.zst +0 -0
- package/.turbo/cache/823fc2a7b12f724c-meta.json +1 -0
- package/.turbo/cache/823fc2a7b12f724c.tar.zst +0 -0
- package/.turbo/cache/9daad16a073d1f91-meta.json +1 -0
- package/.turbo/cache/9daad16a073d1f91.tar.zst +0 -0
- package/.turbo/cache/b81ccbab0a606b60-meta.json +1 -0
- package/.turbo/cache/b81ccbab0a606b60.tar.zst +0 -0
- package/.turbo/cache/cf98487988bfcf91-meta.json +1 -0
- package/.turbo/cache/cf98487988bfcf91.tar.zst +0 -0
- package/.turbo/cache/cfdf7c57dca71f27-meta.json +1 -0
- package/.turbo/cache/cfdf7c57dca71f27.tar.zst +0 -0
- package/.turbo/cache/d3063ef43811b1e5-meta.json +1 -0
- package/.turbo/cache/d3063ef43811b1e5.tar.zst +0 -0
- package/.turbo/cache/de28892eb7678e65-meta.json +1 -0
- package/.turbo/cache/de28892eb7678e65.tar.zst +0 -0
- package/.turbo/cache/ec29adce408132ba-meta.json +1 -0
- package/.turbo/cache/ec29adce408132ba.tar.zst +0 -0
- package/.turbo/cache/f70450d8d305f172-meta.json +1 -0
- package/.turbo/cache/f70450d8d305f172.tar.zst +0 -0
- package/.turbo/cache/fe384d5d6b7a983a-meta.json +1 -0
- package/.turbo/cache/fe384d5d6b7a983a.tar.zst +0 -0
- package/ARCHITECTURE.md +10 -10
- package/CHANGELOG.md +38 -0
- package/LICENSE +185 -17
- package/README.md +43 -5
- package/SESSION_HANDOFF.md +67 -0
- 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 +79 -11
- package/deploy/workspace/git-credential-relay +152 -27
- package/deploy/workspace/git-credential-relay.test.sh +230 -0
- package/dist/dashboard/out/404.html +1 -1
- package/dist/dashboard/out/_next/static/chunks/116-a883fca163f3a5bc.js +1 -0
- package/dist/dashboard/out/_next/static/chunks/320-900169c942e31422.js +1 -0
- package/dist/dashboard/out/_next/static/chunks/631-af51bad94027527a.js +1 -0
- package/dist/dashboard/out/_next/static/chunks/766-2aea80818f7eb0d8.js +1 -0
- package/dist/dashboard/out/_next/static/chunks/891-5cb1513eeb97a891.js +1 -0
- package/dist/dashboard/out/_next/static/chunks/app/app/page-2e525b1dcc790967.js +1 -0
- package/dist/dashboard/out/_next/static/chunks/app/page-4e64923d73c35bc9.js +1 -0
- package/dist/dashboard/out/_next/static/chunks/app/providers/page-e65a0010da6ea5be.js +1 -0
- package/dist/dashboard/out/_next/static/chunks/app/providers/setup/[provider]/page-84161c802b020a1f.js +1 -0
- package/dist/dashboard/out/_next/static/css/99c2552394077586.css +1 -0
- package/dist/dashboard/out/app/onboarding.html +1 -1
- package/dist/dashboard/out/app/onboarding.txt +1 -1
- package/dist/dashboard/out/app.html +1 -1
- package/dist/dashboard/out/app.txt +2 -2
- package/dist/dashboard/out/cloud/link.html +1 -1
- package/dist/dashboard/out/cloud/link.txt +2 -2
- package/dist/dashboard/out/connect-repos.html +1 -1
- package/dist/dashboard/out/connect-repos.txt +1 -1
- 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 +1 -1
- 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/setup/claude.html +1 -1
- package/dist/dashboard/out/providers/setup/claude.txt +2 -2
- package/dist/dashboard/out/providers/setup/codex.html +1 -1
- package/dist/dashboard/out/providers/setup/codex.txt +2 -2
- package/dist/dashboard/out/providers/setup/cursor.html +1 -0
- package/dist/dashboard/out/providers/setup/cursor.txt +8 -0
- 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 +1 -1
- package/dist/src/bridge/index.d.ts +8 -0
- package/dist/src/bridge/index.js +8 -0
- package/dist/src/cli/index.js +3089 -0
- package/dist/src/cloud/index.d.ts +8 -0
- package/dist/src/cloud/index.js +8 -0
- package/dist/src/config/relay-config.d.ts +5 -0
- package/dist/src/config/relay-config.js +5 -0
- package/dist/src/continuity/index.d.ts +5 -0
- package/dist/src/continuity/index.js +5 -0
- package/dist/src/daemon/index.d.ts +8 -0
- package/dist/src/daemon/index.js +9 -0
- package/dist/src/dashboard-server/index.d.ts +8 -0
- package/dist/src/dashboard-server/index.js +8 -0
- package/dist/src/hooks/index.d.ts +10 -0
- package/dist/src/hooks/index.js +10 -0
- package/dist/src/index.d.ts +13 -0
- package/dist/src/index.js +16 -0
- package/dist/src/memory/index.d.ts +5 -0
- package/dist/src/memory/index.js +5 -0
- package/dist/src/policy/index.d.ts +5 -0
- package/dist/src/policy/index.js +5 -0
- package/dist/src/protocol/index.d.ts +8 -0
- package/dist/src/protocol/index.js +8 -0
- package/dist/src/resiliency/index.d.ts +5 -0
- package/dist/src/resiliency/index.js +5 -0
- package/dist/src/shared/cli-auth-config.d.ts +5 -0
- package/dist/src/shared/cli-auth-config.js +5 -0
- package/dist/src/state/index.d.ts +5 -0
- package/dist/src/state/index.js +5 -0
- package/dist/src/storage/index.d.ts +8 -0
- package/dist/src/storage/index.js +8 -0
- package/dist/src/trajectory/index.d.ts +5 -0
- package/dist/src/trajectory/index.js +5 -0
- package/dist/src/utils/index.d.ts +5 -0
- package/dist/src/utils/index.js +5 -0
- package/dist/src/wrapper/index.d.ts +8 -0
- package/dist/src/wrapper/index.js +11 -0
- package/package.json +64 -19
- package/packages/api-types/dist/index.d.ts +21 -0
- package/packages/api-types/dist/index.js +22 -0
- package/packages/api-types/dist/schemas/agent.d.ts +259 -0
- package/packages/api-types/dist/schemas/agent.js +102 -0
- package/packages/api-types/dist/schemas/api.d.ts +290 -0
- package/packages/api-types/dist/schemas/api.js +162 -0
- package/packages/api-types/dist/schemas/decision.d.ts +230 -0
- package/packages/api-types/dist/schemas/decision.js +104 -0
- package/packages/api-types/dist/schemas/fleet.d.ts +615 -0
- package/packages/api-types/dist/schemas/fleet.js +71 -0
- package/packages/api-types/dist/schemas/history.d.ts +180 -0
- package/packages/api-types/dist/schemas/history.js +72 -0
- package/packages/api-types/dist/schemas/index.d.ts +14 -0
- package/packages/api-types/dist/schemas/index.js +22 -0
- package/packages/api-types/dist/schemas/message.d.ts +456 -0
- package/packages/api-types/dist/schemas/message.js +88 -0
- package/packages/api-types/dist/schemas/session.d.ts +60 -0
- package/packages/api-types/dist/schemas/session.js +36 -0
- package/packages/api-types/dist/schemas/task.d.ts +111 -0
- package/packages/api-types/dist/schemas/task.js +64 -0
- package/packages/api-types/package.json +61 -0
- package/packages/api-types/scripts/generate-openapi.ts +106 -0
- package/packages/bridge/dist/index.d.ts +8 -0
- package/packages/bridge/dist/index.js +9 -0
- package/packages/bridge/dist/multi-project-client.d.ts +99 -0
- package/packages/bridge/dist/multi-project-client.js +389 -0
- package/packages/bridge/dist/shadow-cli.js +75 -0
- package/packages/bridge/dist/spawner.d.ts +210 -0
- package/packages/bridge/dist/spawner.js +1276 -0
- package/packages/bridge/dist/types.d.ts +131 -0
- package/packages/bridge/dist/utils.d.ts +15 -0
- package/packages/bridge/dist/utils.js +60 -0
- package/packages/bridge/package.json +40 -0
- package/packages/cloud/dist/api/admin.js +225 -0
- package/packages/cloud/dist/api/billing.js +564 -0
- package/packages/cloud/dist/api/cli-pty-runner.d.ts +53 -0
- package/packages/cloud/dist/api/cli-pty-runner.js +193 -0
- package/packages/cloud/dist/api/codex-auth-helper.js +327 -0
- package/packages/cloud/dist/api/consensus.js +261 -0
- package/packages/cloud/dist/api/coordinators.js +750 -0
- package/packages/cloud/dist/api/daemons.js +535 -0
- package/packages/cloud/dist/api/generic-webhooks.js +129 -0
- package/packages/cloud/dist/api/github-app.js +223 -0
- package/packages/cloud/dist/api/monitoring.js +578 -0
- package/packages/cloud/dist/api/nango-auth.js +674 -0
- package/packages/cloud/dist/api/onboarding.d.ts +15 -0
- package/packages/cloud/dist/api/onboarding.js +679 -0
- package/packages/cloud/dist/api/policy.js +229 -0
- package/packages/cloud/dist/api/provider-env.d.ts +14 -0
- package/packages/cloud/dist/api/provider-env.js +75 -0
- package/packages/cloud/dist/api/providers.js +564 -0
- package/packages/cloud/dist/api/repos.js +577 -0
- package/packages/cloud/dist/api/sessions.d.ts +11 -0
- package/packages/cloud/dist/api/sessions.js +302 -0
- package/packages/cloud/dist/api/teams.js +281 -0
- package/packages/cloud/dist/api/test-helpers.js +745 -0
- package/packages/cloud/dist/api/workspaces.js +1799 -0
- package/packages/cloud/dist/billing/plans.js +245 -0
- package/packages/cloud/dist/config.d.ts +5 -0
- package/packages/cloud/dist/config.js +5 -0
- package/packages/cloud/dist/db/drizzle.d.ts +256 -0
- package/packages/cloud/dist/db/drizzle.js +1286 -0
- package/packages/cloud/dist/db/schema.d.ts +4873 -0
- package/packages/cloud/dist/db/schema.js +620 -0
- package/packages/cloud/dist/index.d.ts +11 -0
- package/packages/cloud/dist/index.js +38 -0
- package/packages/cloud/dist/provisioner/index.d.ts +207 -0
- package/packages/cloud/dist/provisioner/index.js +2114 -0
- package/packages/cloud/dist/server.js +1924 -0
- package/packages/cloud/dist/services/index.d.ts +17 -0
- package/packages/cloud/dist/services/index.js +25 -0
- package/packages/cloud/dist/services/intro-expiration.d.ts +60 -0
- package/packages/cloud/dist/services/intro-expiration.js +252 -0
- package/packages/cloud/dist/services/nango.d.ts +201 -0
- package/packages/cloud/dist/services/nango.js +392 -0
- package/packages/cloud/dist/services/persistence.d.ts +131 -0
- package/packages/cloud/dist/shims/consensus.d.ts +23 -0
- package/packages/cloud/dist/shims/consensus.js +5 -0
- package/packages/cloud/package.json +55 -0
- package/packages/config/dist/bridge-config.d.ts +52 -0
- package/packages/config/dist/bridge-config.js +143 -0
- package/packages/config/dist/bridge-utils.d.ts +30 -0
- package/packages/config/dist/bridge-utils.js +54 -0
- package/packages/config/dist/cli-auth-config.js +391 -0
- package/packages/config/dist/cloud-config.d.ts +75 -0
- package/packages/config/dist/cloud-config.js +109 -0
- package/packages/config/dist/index.d.ts +13 -0
- package/packages/config/dist/index.js +13 -0
- package/packages/config/dist/project-namespace.d.ts +73 -0
- package/packages/config/dist/project-namespace.js +280 -0
- package/packages/config/dist/relay-config.d.ts +25 -0
- package/packages/config/dist/relay-config.js +25 -0
- package/packages/config/dist/relay-file-writer.d.ts +200 -0
- package/packages/config/dist/relay-file-writer.js +407 -0
- package/packages/config/dist/schemas.d.ts +672 -0
- package/packages/config/dist/schemas.js +180 -0
- package/packages/config/dist/shadow-config.d.ts +87 -0
- package/packages/config/dist/trajectory-config.d.ts +102 -0
- package/packages/config/dist/trajectory-config.js +185 -0
- package/packages/config/package.json +98 -0
- package/packages/continuity/dist/index.d.ts +9 -0
- package/packages/continuity/dist/index.js +9 -0
- package/packages/continuity/dist/types.d.ts +180 -0
- package/packages/continuity/dist/types.js +2 -0
- package/packages/continuity/package.json +32 -0
- package/packages/daemon/dist/agent-manager.d.ts +134 -0
- package/packages/daemon/dist/agent-manager.js +578 -0
- package/packages/daemon/dist/agent-registry.js +213 -0
- package/packages/daemon/dist/api.d.ts +106 -0
- package/packages/daemon/dist/api.js +876 -0
- package/packages/daemon/dist/channel-membership-store.d.ts +55 -0
- package/packages/daemon/dist/channel-membership-store.js +176 -0
- package/packages/daemon/dist/cli-auth.d.ts +89 -0
- package/packages/daemon/dist/cli-auth.js +792 -0
- package/packages/daemon/dist/cloud-sync.d.ts +150 -0
- package/packages/daemon/dist/cloud-sync.js +446 -0
- package/packages/daemon/dist/connection.d.ts +130 -0
- package/packages/daemon/dist/connection.js +438 -0
- package/packages/daemon/dist/consensus-integration.js +371 -0
- package/packages/daemon/dist/delivery-tracker.d.ts +34 -0
- package/packages/daemon/dist/delivery-tracker.js +104 -0
- package/packages/daemon/dist/enhanced-features.d.ts +118 -0
- package/packages/daemon/dist/enhanced-features.js +176 -0
- package/packages/daemon/dist/index.d.ts +31 -0
- package/packages/daemon/dist/index.js +37 -0
- package/packages/daemon/dist/migrations/index.d.ts +73 -0
- package/packages/daemon/dist/migrations/index.js +241 -0
- package/packages/daemon/dist/orchestrator.d.ts +217 -0
- package/packages/daemon/dist/orchestrator.js +1143 -0
- package/packages/daemon/dist/relay-ledger.d.ts +261 -0
- package/packages/daemon/dist/relay-ledger.js +532 -0
- package/packages/daemon/dist/relay-watchdog.d.ts +125 -0
- package/packages/daemon/dist/relay-watchdog.js +611 -0
- package/packages/daemon/dist/repo-manager.js +384 -0
- package/packages/daemon/dist/router.d.ts +370 -0
- package/packages/daemon/dist/router.js +1437 -0
- package/packages/daemon/dist/server.d.ts +174 -0
- package/packages/daemon/dist/server.js +1001 -0
- package/packages/daemon/dist/spawn-manager.d.ts +78 -0
- package/packages/daemon/dist/spawn-manager.js +165 -0
- package/packages/daemon/dist/sync-queue.d.ts +116 -0
- package/packages/daemon/dist/sync-queue.js +361 -0
- package/packages/daemon/dist/types.d.ts +133 -0
- package/packages/daemon/dist/workspace-manager.js +314 -0
- package/packages/daemon/package.json +52 -0
- package/packages/dashboard/README.md +48 -0
- package/packages/dashboard/dist/health-worker-manager.d.ts +62 -0
- package/packages/dashboard/dist/health-worker-manager.js +144 -0
- package/packages/dashboard/dist/health-worker.d.ts +9 -0
- package/packages/dashboard/dist/health-worker.js +79 -0
- package/packages/dashboard/dist/index.d.ts +20 -0
- package/packages/dashboard/dist/index.js +19 -0
- package/packages/dashboard/dist/metrics.d.ts +105 -0
- package/packages/dashboard/dist/metrics.js +193 -0
- package/packages/dashboard/dist/needs-attention.d.ts +24 -0
- package/packages/dashboard/dist/needs-attention.js +78 -0
- package/packages/dashboard/dist/server.d.ts +25 -0
- package/packages/dashboard/dist/server.js +5107 -0
- package/packages/dashboard/dist/start.d.ts +6 -0
- package/packages/dashboard/dist/start.js +13 -0
- package/packages/dashboard/dist/types/threading.d.ts +8 -0
- package/packages/dashboard/dist/types/threading.js +2 -0
- package/packages/dashboard/dist/user-bridge.d.ts +154 -0
- package/packages/dashboard/dist/user-bridge.js +372 -0
- package/packages/dashboard/package.json +72 -0
- package/packages/dashboard/ui/.next/BUILD_ID +1 -0
- package/packages/dashboard/ui/.next/app-build-manifest.json +135 -0
- package/packages/dashboard/ui/.next/app-path-routes-manifest.json +1 -0
- package/packages/dashboard/ui/.next/build-manifest.json +32 -0
- package/packages/dashboard/ui/.next/cache/config.json +7 -0
- package/packages/dashboard/ui/.next/cache/eslint/.cache_1asv1h5 +1 -0
- package/packages/dashboard/ui/.next/cache/webpack/client-production/0.pack +0 -0
- package/packages/dashboard/ui/.next/cache/webpack/client-production/index.pack +0 -0
- package/packages/dashboard/ui/.next/cache/webpack/edge-server-production/0.pack +0 -0
- package/packages/dashboard/ui/.next/cache/webpack/edge-server-production/index.pack +0 -0
- package/packages/dashboard/ui/.next/cache/webpack/server-production/0.pack +0 -0
- package/packages/dashboard/ui/.next/cache/webpack/server-production/index.pack +0 -0
- package/packages/dashboard/ui/.next/export-detail.json +1 -0
- package/packages/dashboard/ui/.next/export-marker.json +1 -0
- package/packages/dashboard/ui/.next/images-manifest.json +1 -0
- package/packages/dashboard/ui/.next/next-minimal-server.js.nft.json +1 -0
- package/packages/dashboard/ui/.next/next-server.js.nft.json +1 -0
- package/packages/dashboard/ui/.next/package.json +1 -0
- package/packages/dashboard/ui/.next/prerender-manifest.json +1 -0
- package/packages/dashboard/ui/.next/react-loadable-manifest.json +1970 -0
- package/packages/dashboard/ui/.next/required-server-files.json +1 -0
- package/packages/dashboard/ui/.next/routes-manifest.json +1 -0
- package/packages/dashboard/ui/.next/server/app/_not-found/page.js +1 -0
- package/packages/dashboard/ui/.next/server/app/_not-found/page.js.nft.json +1 -0
- package/packages/dashboard/ui/.next/server/app/_not-found/page_client-reference-manifest.js +1 -0
- package/packages/dashboard/ui/.next/server/app/_not-found.html +1 -0
- package/packages/dashboard/ui/.next/server/app/_not-found.meta +6 -0
- package/packages/dashboard/ui/.next/server/app/_not-found.rsc +9 -0
- package/packages/dashboard/ui/.next/server/app/app/onboarding/page.js +6 -0
- package/packages/dashboard/ui/.next/server/app/app/onboarding/page.js.nft.json +1 -0
- package/packages/dashboard/ui/.next/server/app/app/onboarding/page_client-reference-manifest.js +1 -0
- package/packages/dashboard/ui/.next/server/app/app/onboarding.html +1 -0
- package/packages/dashboard/ui/.next/server/app/app/onboarding.meta +5 -0
- package/packages/dashboard/ui/.next/server/app/app/onboarding.rsc +7 -0
- package/packages/dashboard/ui/.next/server/app/app/page.js +436 -0
- package/packages/dashboard/ui/.next/server/app/app/page.js.nft.json +1 -0
- package/packages/dashboard/ui/.next/server/app/app/page_client-reference-manifest.js +1 -0
- package/packages/dashboard/ui/.next/server/app/app.html +1 -0
- package/packages/dashboard/ui/.next/server/app/app.meta +5 -0
- package/packages/dashboard/ui/.next/server/app/app.rsc +7 -0
- package/packages/dashboard/ui/.next/server/app/apple-icon.png/route.js +12 -0
- package/packages/dashboard/ui/.next/server/app/apple-icon.png/route.js.nft.json +1 -0
- package/packages/dashboard/ui/.next/server/app/apple-icon.png.body +0 -0
- package/packages/dashboard/ui/.next/server/app/apple-icon.png.meta +1 -0
- package/packages/dashboard/ui/.next/server/app/cloud/link/page.js +1 -0
- package/packages/dashboard/ui/.next/server/app/cloud/link/page.js.nft.json +1 -0
- package/packages/dashboard/ui/.next/server/app/cloud/link/page_client-reference-manifest.js +1 -0
- package/packages/dashboard/ui/.next/server/app/cloud/link.html +1 -0
- package/packages/dashboard/ui/.next/server/app/cloud/link.meta +5 -0
- package/packages/dashboard/ui/.next/server/app/cloud/link.rsc +7 -0
- package/packages/dashboard/ui/.next/server/app/connect-repos/page.js +6 -0
- package/packages/dashboard/ui/.next/server/app/connect-repos/page.js.nft.json +1 -0
- package/packages/dashboard/ui/.next/server/app/connect-repos/page_client-reference-manifest.js +1 -0
- package/packages/dashboard/ui/.next/server/app/connect-repos.html +1 -0
- package/packages/dashboard/ui/.next/server/app/connect-repos.meta +5 -0
- package/packages/dashboard/ui/.next/server/app/connect-repos.rsc +7 -0
- package/packages/dashboard/ui/.next/server/app/history/page.js +1 -0
- package/packages/dashboard/ui/.next/server/app/history/page.js.nft.json +1 -0
- package/packages/dashboard/ui/.next/server/app/history/page_client-reference-manifest.js +1 -0
- package/packages/dashboard/ui/.next/server/app/history.html +1 -0
- package/packages/dashboard/ui/.next/server/app/history.meta +5 -0
- package/packages/dashboard/ui/.next/server/app/history.rsc +7 -0
- package/packages/dashboard/ui/.next/server/app/index.html +1 -0
- package/packages/dashboard/ui/.next/server/app/index.meta +5 -0
- package/packages/dashboard/ui/.next/server/app/index.rsc +7 -0
- package/packages/dashboard/ui/.next/server/app/login/page.js +6 -0
- package/packages/dashboard/ui/.next/server/app/login/page.js.nft.json +1 -0
- package/packages/dashboard/ui/.next/server/app/login/page_client-reference-manifest.js +1 -0
- package/packages/dashboard/ui/.next/server/app/login.html +5 -0
- package/packages/dashboard/ui/.next/server/app/login.meta +5 -0
- package/packages/dashboard/ui/.next/server/app/login.rsc +7 -0
- package/packages/dashboard/ui/.next/server/app/metrics/page.js +1 -0
- package/packages/dashboard/ui/.next/server/app/metrics/page.js.nft.json +1 -0
- package/packages/dashboard/ui/.next/server/app/metrics/page_client-reference-manifest.js +1 -0
- package/packages/dashboard/ui/.next/server/app/metrics.html +1 -0
- package/packages/dashboard/ui/.next/server/app/metrics.meta +5 -0
- package/packages/dashboard/ui/.next/server/app/metrics.rsc +7 -0
- package/packages/dashboard/ui/.next/server/app/page.js +1 -0
- package/packages/dashboard/ui/.next/server/app/page.js.nft.json +1 -0
- package/packages/dashboard/ui/.next/server/app/page_client-reference-manifest.js +1 -0
- package/packages/dashboard/ui/.next/server/app/pricing/page.js +5 -0
- package/packages/dashboard/ui/.next/server/app/pricing/page.js.nft.json +1 -0
- package/packages/dashboard/ui/.next/server/app/pricing/page_client-reference-manifest.js +1 -0
- package/packages/dashboard/ui/.next/server/app/pricing.html +13 -0
- package/packages/dashboard/ui/.next/server/app/pricing.meta +5 -0
- package/packages/dashboard/ui/.next/server/app/pricing.rsc +7 -0
- package/packages/dashboard/ui/.next/server/app/providers/page.js +2 -0
- package/packages/dashboard/ui/.next/server/app/providers/page.js.nft.json +1 -0
- package/packages/dashboard/ui/.next/server/app/providers/page_client-reference-manifest.js +1 -0
- package/packages/dashboard/ui/.next/server/app/providers/setup/[provider]/page.js +1 -0
- package/packages/dashboard/ui/.next/server/app/providers/setup/[provider]/page.js.nft.json +1 -0
- package/packages/dashboard/ui/.next/server/app/providers/setup/[provider]/page_client-reference-manifest.js +1 -0
- package/packages/dashboard/ui/.next/server/app/providers/setup/claude.html +1 -0
- package/packages/dashboard/ui/.next/server/app/providers/setup/claude.meta +5 -0
- package/packages/dashboard/ui/.next/server/app/providers/setup/claude.rsc +8 -0
- package/packages/dashboard/ui/.next/server/app/providers/setup/codex.html +1 -0
- package/packages/dashboard/ui/.next/server/app/providers/setup/codex.meta +5 -0
- package/packages/dashboard/ui/.next/server/app/providers/setup/codex.rsc +8 -0
- package/packages/dashboard/ui/.next/server/app/providers/setup/cursor.html +1 -0
- package/packages/dashboard/ui/.next/server/app/providers/setup/cursor.meta +5 -0
- package/packages/dashboard/ui/.next/server/app/providers/setup/cursor.rsc +8 -0
- package/packages/dashboard/ui/.next/server/app/providers.html +1 -0
- package/packages/dashboard/ui/.next/server/app/providers.meta +5 -0
- package/packages/dashboard/ui/.next/server/app/providers.rsc +7 -0
- package/packages/dashboard/ui/.next/server/app/signup/page.js +6 -0
- package/packages/dashboard/ui/.next/server/app/signup/page.js.nft.json +1 -0
- package/packages/dashboard/ui/.next/server/app/signup/page_client-reference-manifest.js +1 -0
- package/packages/dashboard/ui/.next/server/app/signup.html +6 -0
- package/packages/dashboard/ui/.next/server/app/signup.meta +5 -0
- package/packages/dashboard/ui/.next/server/app/signup.rsc +7 -0
- package/packages/dashboard/ui/.next/server/app-paths-manifest.json +16 -0
- package/packages/dashboard/ui/.next/server/chunks/190.js +1 -0
- package/packages/dashboard/ui/.next/server/chunks/205.js +1 -0
- package/packages/dashboard/ui/.next/server/chunks/251.js +9 -0
- package/packages/dashboard/ui/.next/server/chunks/288.js +1 -0
- package/packages/dashboard/ui/.next/server/chunks/434.js +1 -0
- package/packages/dashboard/ui/.next/server/chunks/471.js +2 -0
- package/packages/dashboard/ui/.next/server/chunks/621.js +1 -0
- package/packages/dashboard/ui/.next/server/chunks/680.js +5 -0
- package/packages/dashboard/ui/.next/server/chunks/682.js +6 -0
- package/packages/dashboard/ui/.next/server/chunks/684.js +1 -0
- package/packages/dashboard/ui/.next/server/chunks/71.js +196 -0
- package/packages/dashboard/ui/.next/server/chunks/711.js +1 -0
- package/packages/dashboard/ui/.next/server/chunks/90.js +17 -0
- package/packages/dashboard/ui/.next/server/chunks/948.js +2 -0
- package/packages/dashboard/ui/.next/server/chunks/font-manifest.json +1 -0
- package/packages/dashboard/ui/.next/server/font-manifest.json +1 -0
- package/packages/dashboard/ui/.next/server/functions-config-manifest.json +1 -0
- package/packages/dashboard/ui/.next/server/interception-route-rewrite-manifest.js +1 -0
- package/packages/dashboard/ui/.next/server/middleware-build-manifest.js +1 -0
- package/packages/dashboard/ui/.next/server/middleware-manifest.json +6 -0
- package/packages/dashboard/ui/.next/server/middleware-react-loadable-manifest.js +1 -0
- package/packages/dashboard/ui/.next/server/next-font-manifest.js +1 -0
- package/packages/dashboard/ui/.next/server/next-font-manifest.json +1 -0
- package/packages/dashboard/ui/.next/server/pages/404.html +1 -0
- package/packages/dashboard/ui/.next/server/pages/500.html +1 -0
- package/packages/dashboard/ui/.next/server/pages/_app.js +1 -0
- package/packages/dashboard/ui/.next/server/pages/_app.js.nft.json +1 -0
- package/packages/dashboard/ui/.next/server/pages/_document.js +1 -0
- package/packages/dashboard/ui/.next/server/pages/_document.js.nft.json +1 -0
- package/packages/dashboard/ui/.next/server/pages/_error.js +1 -0
- package/packages/dashboard/ui/.next/server/pages/_error.js.nft.json +1 -0
- package/packages/dashboard/ui/.next/server/pages-manifest.json +1 -0
- package/packages/dashboard/ui/.next/server/server-reference-manifest.js +1 -0
- package/packages/dashboard/ui/.next/server/server-reference-manifest.json +1 -0
- package/packages/dashboard/ui/.next/server/webpack-runtime.js +1 -0
- package/packages/dashboard/ui/.next/static/HR7W9z1PPVPFqUboUVZFZ/_buildManifest.js +1 -0
- package/packages/dashboard/ui/.next/static/HR7W9z1PPVPFqUboUVZFZ/_ssgManifest.js +1 -0
- package/packages/dashboard/ui/.next/static/chunks/116-a883fca163f3a5bc.js +1 -0
- package/packages/dashboard/ui/.next/static/chunks/117-c8afed19e821a35d.js +2 -0
- package/packages/dashboard/ui/.next/static/chunks/282-980c2eb8fff20123.js +1 -0
- package/packages/dashboard/ui/.next/static/chunks/532-bace199897eeab37.js +9 -0
- package/packages/dashboard/ui/.next/static/chunks/631-af51bad94027527a.js +1 -0
- package/packages/dashboard/ui/.next/static/chunks/648-acb2ff9f77cbfbd3.js +1 -0
- package/packages/dashboard/ui/.next/static/chunks/677-30e60cb0b47875b6.js +1 -0
- package/packages/dashboard/ui/.next/static/chunks/766-2aea80818f7eb0d8.js +1 -0
- package/packages/dashboard/ui/.next/static/chunks/83-4f08122d4e7e79a6.js +1 -0
- package/packages/dashboard/ui/.next/static/chunks/847-f1f467060f32afff.js +1 -0
- package/packages/dashboard/ui/.next/static/chunks/891-5cb1513eeb97a891.js +1 -0
- package/packages/dashboard/ui/.next/static/chunks/app/_not-found/page-60501fddbafba9dc.js +1 -0
- package/packages/dashboard/ui/.next/static/chunks/app/app/onboarding/page-9914652442f7e4fb.js +1 -0
- package/packages/dashboard/ui/.next/static/chunks/app/app/page-44813aa26ad19681.js +1 -0
- package/packages/dashboard/ui/.next/static/chunks/app/cloud/link/page-fa1d5842aa90e8a6.js +1 -0
- package/packages/dashboard/ui/.next/static/chunks/app/connect-repos/page-113060009ef35bc2.js +1 -0
- package/packages/dashboard/ui/.next/static/chunks/app/history/page-9965d2483011b846.js +1 -0
- package/packages/dashboard/ui/.next/static/chunks/app/layout-6b91e33784c20610.js +1 -0
- package/packages/dashboard/ui/.next/static/chunks/app/login/page-a0ca6f7ca6a100b8.js +1 -0
- package/packages/dashboard/ui/.next/static/chunks/app/metrics/page-1e37ef8e73940b40.js +1 -0
- package/packages/dashboard/ui/.next/static/chunks/app/page-7993778218818ace.js +1 -0
- package/packages/dashboard/ui/.next/static/chunks/app/pricing/page-9db3ebdfa567a7c9.js +1 -0
- package/packages/dashboard/ui/.next/static/chunks/app/providers/page-bcf46064ac4474ce.js +1 -0
- package/packages/dashboard/ui/.next/static/chunks/app/providers/setup/[provider]/page-4dbe33f0f7691b7c.js +1 -0
- package/packages/dashboard/ui/.next/static/chunks/app/signup/page-1ede2205b58649ca.js +1 -0
- package/packages/dashboard/ui/.next/static/chunks/e868780c-48e5f147c90a3a41.js +18 -0
- package/packages/dashboard/ui/.next/static/chunks/fd9d1056-609918ca7b6280bb.js +1 -0
- package/packages/dashboard/ui/.next/static/chunks/framework-f66176bb897dc684.js +1 -0
- package/packages/dashboard/ui/.next/static/chunks/main-5a40a5ae29646e1b.js +1 -0
- package/packages/dashboard/ui/.next/static/chunks/main-app-fdbeb09028f57c9f.js +1 -0
- package/packages/dashboard/ui/.next/static/chunks/pages/_app-72b849fbd24ac258.js +1 -0
- package/packages/dashboard/ui/.next/static/chunks/pages/_error-7ba65e1336b92748.js +1 -0
- package/packages/dashboard/ui/.next/static/chunks/polyfills-42372ed130431b0a.js +1 -0
- package/packages/dashboard/ui/.next/static/chunks/webpack-1cdd8ed57114d5e1.js +1 -0
- package/packages/dashboard/ui/.next/static/css/4034f236dd1a3178.css +1 -0
- package/packages/dashboard/ui/.next/static/css/99c2552394077586.css +1 -0
- package/packages/dashboard/ui/.next/trace +63 -0
- package/packages/dashboard/ui/.next/types/app/app/onboarding/page.ts +79 -0
- package/packages/dashboard/ui/.next/types/app/app/page.ts +79 -0
- package/packages/dashboard/ui/.next/types/app/cloud/link/page.ts +79 -0
- package/packages/dashboard/ui/.next/types/app/connect-repos/page.ts +79 -0
- package/packages/dashboard/ui/.next/types/app/history/page.ts +79 -0
- package/packages/dashboard/ui/.next/types/app/layout.ts +79 -0
- package/packages/dashboard/ui/.next/types/app/login/page.ts +79 -0
- package/packages/dashboard/ui/.next/types/app/metrics/page.ts +79 -0
- package/packages/dashboard/ui/.next/types/app/page.ts +79 -0
- package/packages/dashboard/ui/.next/types/app/pricing/page.ts +79 -0
- package/packages/dashboard/ui/.next/types/app/providers/page.ts +79 -0
- package/packages/dashboard/ui/.next/types/app/providers/setup/[provider]/page.ts +79 -0
- package/packages/dashboard/ui/.next/types/app/signup/page.ts +79 -0
- package/packages/dashboard/ui/.next/types/package.json +1 -0
- package/packages/dashboard/ui/app/app/onboarding/page.tsx +394 -0
- package/packages/dashboard/ui/app/app/page.tsx +667 -0
- package/packages/dashboard/ui/app/apple-icon.png +0 -0
- package/packages/dashboard/ui/app/cloud/link/page.tsx +464 -0
- package/packages/dashboard/ui/app/connect-repos/page.tsx +410 -0
- package/packages/dashboard/ui/app/favicon.png +0 -0
- package/packages/dashboard/ui/app/globals.css +59 -0
- package/packages/dashboard/ui/app/history/page.tsx +658 -0
- package/packages/dashboard/ui/app/layout.tsx +25 -0
- package/packages/dashboard/ui/app/login/page.tsx +280 -0
- package/packages/dashboard/ui/app/metrics/page.tsx +751 -0
- package/packages/dashboard/ui/app/page.tsx +59 -0
- package/packages/dashboard/ui/app/pricing/page.tsx +7 -0
- package/packages/dashboard/ui/app/providers/page.tsx +193 -0
- package/packages/dashboard/ui/app/providers/setup/[provider]/ProviderSetupClient.tsx +148 -0
- package/packages/dashboard/ui/app/providers/setup/[provider]/constants.ts +35 -0
- package/packages/dashboard/ui/app/providers/setup/[provider]/page.tsx +42 -0
- package/packages/dashboard/ui/app/signup/page.tsx +343 -0
- package/packages/dashboard/ui/index.ts +49 -0
- package/packages/dashboard/ui/landing/LandingPage.tsx +713 -0
- package/packages/dashboard/ui/landing/PricingPage.tsx +559 -0
- package/packages/dashboard/ui/landing/index.ts +6 -0
- package/packages/dashboard/ui/landing/styles.css +2850 -0
- package/packages/dashboard/ui/lib/agent-merge.ts +35 -0
- package/packages/dashboard/ui/lib/api.ts +1155 -0
- package/packages/dashboard/ui/lib/cloudApi.ts +876 -0
- package/packages/dashboard/ui/lib/colors.ts +218 -0
- package/packages/dashboard/ui/lib/hierarchy.ts +242 -0
- package/packages/dashboard/ui/lib/stuckDetection.ts +142 -0
- package/packages/dashboard/ui/next-env.d.ts +5 -0
- package/packages/dashboard/ui/next.config.js +41 -0
- package/packages/dashboard/ui/package-lock.json +2882 -0
- package/packages/dashboard/ui/package.json +33 -0
- package/packages/dashboard/ui/postcss.config.js +5 -0
- package/packages/dashboard/ui/react-components/ActivityFeed.tsx +216 -0
- package/packages/dashboard/ui/react-components/AddWorkspaceModal.tsx +170 -0
- package/packages/dashboard/ui/react-components/AgentCard.tsx +587 -0
- package/packages/dashboard/ui/react-components/AgentList.tsx +411 -0
- package/packages/dashboard/ui/react-components/AgentProfilePanel.tsx +564 -0
- package/packages/dashboard/ui/react-components/App.tsx +3447 -0
- package/packages/dashboard/ui/react-components/BillingPanel.tsx +922 -0
- package/packages/dashboard/ui/react-components/BillingResult.tsx +447 -0
- package/packages/dashboard/ui/react-components/BroadcastComposer.tsx +690 -0
- package/packages/dashboard/ui/react-components/ChannelAdminPanel.tsx +773 -0
- package/packages/dashboard/ui/react-components/ChannelBrowser.tsx +385 -0
- package/packages/dashboard/ui/react-components/ChannelChat.tsx +307 -0
- package/packages/dashboard/ui/react-components/ChannelSidebar.tsx +399 -0
- package/packages/dashboard/ui/react-components/CloudSessionProvider.tsx +130 -0
- package/packages/dashboard/ui/react-components/CommandPalette.tsx +815 -0
- package/packages/dashboard/ui/react-components/ConfirmationDialog.tsx +133 -0
- package/packages/dashboard/ui/react-components/ConversationHistory.tsx +518 -0
- package/packages/dashboard/ui/react-components/CoordinatorPanel.tsx +944 -0
- package/packages/dashboard/ui/react-components/DecisionQueue.tsx +717 -0
- package/packages/dashboard/ui/react-components/DirectMessageView.tsx +164 -0
- package/packages/dashboard/ui/react-components/FileAutocomplete.tsx +368 -0
- package/packages/dashboard/ui/react-components/FleetOverview.tsx +278 -0
- package/packages/dashboard/ui/react-components/LogViewer.tsx +310 -0
- package/packages/dashboard/ui/react-components/LogViewerPanel.tsx +482 -0
- package/packages/dashboard/ui/react-components/Logo.tsx +284 -0
- package/packages/dashboard/ui/react-components/MentionAutocomplete.tsx +384 -0
- package/packages/dashboard/ui/react-components/MessageList.tsx +649 -0
- package/packages/dashboard/ui/react-components/MessageSenderName.tsx +91 -0
- package/packages/dashboard/ui/react-components/MessageStatusIndicator.tsx +142 -0
- package/packages/dashboard/ui/react-components/NewConversationModal.tsx +400 -0
- package/packages/dashboard/ui/react-components/NotificationToast.tsx +488 -0
- package/packages/dashboard/ui/react-components/OnlineUsersIndicator.tsx +164 -0
- package/packages/dashboard/ui/react-components/Pagination.tsx +124 -0
- package/packages/dashboard/ui/react-components/PricingPlans.tsx +386 -0
- package/packages/dashboard/ui/react-components/ProjectList.tsx +625 -0
- package/packages/dashboard/ui/react-components/ProviderAuthFlow.tsx +843 -0
- package/packages/dashboard/ui/react-components/ProviderConnectionList.tsx +363 -0
- package/packages/dashboard/ui/react-components/ProvisioningProgress.tsx +730 -0
- package/packages/dashboard/ui/react-components/RepoAccessPanel.tsx +392 -0
- package/packages/dashboard/ui/react-components/ServerCard.tsx +202 -0
- package/packages/dashboard/ui/react-components/SessionExpiredModal.tsx +128 -0
- package/packages/dashboard/ui/react-components/SpawnModal.tsx +704 -0
- package/packages/dashboard/ui/react-components/TaskAssignmentUI.tsx +375 -0
- package/packages/dashboard/ui/react-components/TerminalProviderSetup.tsx +608 -0
- package/packages/dashboard/ui/react-components/ThemeProvider.tsx +325 -0
- package/packages/dashboard/ui/react-components/ThinkingIndicator.tsx +231 -0
- package/packages/dashboard/ui/react-components/ThreadList.tsx +198 -0
- package/packages/dashboard/ui/react-components/ThreadPanel.tsx +346 -0
- package/packages/dashboard/ui/react-components/TrajectoryViewer.tsx +698 -0
- package/packages/dashboard/ui/react-components/TypingIndicator.tsx +69 -0
- package/packages/dashboard/ui/react-components/UsageBanner.tsx +231 -0
- package/packages/dashboard/ui/react-components/UserProfilePanel.tsx +233 -0
- package/packages/dashboard/ui/react-components/WorkspaceContext.tsx +107 -0
- package/packages/dashboard/ui/react-components/WorkspaceSelector.tsx +234 -0
- package/packages/dashboard/ui/react-components/WorkspaceStatusIndicator.tsx +370 -0
- package/packages/dashboard/ui/react-components/XTermInteractive.tsx +510 -0
- package/packages/dashboard/ui/react-components/XTermLogViewer.tsx +719 -0
- package/packages/dashboard/ui/react-components/channels/ChannelDialogs.tsx +1411 -0
- package/packages/dashboard/ui/react-components/channels/ChannelHeader.tsx +317 -0
- package/packages/dashboard/ui/react-components/channels/ChannelMessageList.tsx +463 -0
- package/packages/dashboard/ui/react-components/channels/ChannelViewV1.tsx +146 -0
- package/packages/dashboard/ui/react-components/channels/MessageInput.tsx +288 -0
- package/packages/dashboard/ui/react-components/channels/SearchInput.tsx +172 -0
- package/packages/dashboard/ui/react-components/channels/SearchResults.tsx +336 -0
- package/packages/dashboard/ui/react-components/channels/api.ts +697 -0
- package/packages/dashboard/ui/react-components/channels/index.ts +76 -0
- package/packages/dashboard/ui/react-components/channels/mockApi.ts +344 -0
- package/packages/dashboard/ui/react-components/channels/types.ts +566 -0
- package/packages/dashboard/ui/react-components/hooks/index.ts +57 -0
- package/packages/dashboard/ui/react-components/hooks/useAgentLogs.ts +394 -0
- package/packages/dashboard/ui/react-components/hooks/useAgents.ts +127 -0
- package/packages/dashboard/ui/react-components/hooks/useBroadcastDedup.ts +86 -0
- package/packages/dashboard/ui/react-components/hooks/useChannelAdmin.ts +329 -0
- package/packages/dashboard/ui/react-components/hooks/useChannelBrowser.ts +239 -0
- package/packages/dashboard/ui/react-components/hooks/useChannelCommands.ts +138 -0
- package/packages/dashboard/ui/react-components/hooks/useChannels.ts +328 -0
- package/packages/dashboard/ui/react-components/hooks/useDebounce.ts +29 -0
- package/packages/dashboard/ui/react-components/hooks/useDirectMessage.ts +141 -0
- package/packages/dashboard/ui/react-components/hooks/useMessages.ts +309 -0
- package/packages/dashboard/ui/react-components/hooks/useOrchestrator.ts +364 -0
- package/packages/dashboard/ui/react-components/hooks/usePinnedAgents.ts +140 -0
- package/packages/dashboard/ui/react-components/hooks/usePresence.ts +340 -0
- package/packages/dashboard/ui/react-components/hooks/useRecentRepos.ts +130 -0
- package/packages/dashboard/ui/react-components/hooks/useSession.ts +209 -0
- package/packages/dashboard/ui/react-components/hooks/useTrajectory.ts +265 -0
- package/packages/dashboard/ui/react-components/hooks/useWebSocket.ts +169 -0
- package/packages/dashboard/ui/react-components/hooks/useWorkspaceMembers.ts +120 -0
- package/packages/dashboard/ui/react-components/hooks/useWorkspaceRepos.ts +73 -0
- package/packages/dashboard/ui/react-components/hooks/useWorkspaceStatus.ts +237 -0
- package/packages/dashboard/ui/react-components/index.ts +81 -0
- package/packages/dashboard/ui/react-components/layout/Header.tsx +355 -0
- package/packages/dashboard/ui/react-components/layout/RepoContextHeader.tsx +361 -0
- package/packages/dashboard/ui/react-components/layout/Sidebar.archive.test.tsx +126 -0
- package/packages/dashboard/ui/react-components/layout/Sidebar.test.tsx +691 -0
- package/packages/dashboard/ui/react-components/layout/Sidebar.tsx +930 -0
- package/packages/dashboard/ui/react-components/layout/index.ts +7 -0
- package/packages/dashboard/ui/react-components/settings/BillingSettingsPanel.tsx +564 -0
- package/packages/dashboard/ui/react-components/settings/SettingsPage.tsx +544 -0
- package/packages/dashboard/ui/react-components/settings/TeamSettingsPanel.tsx +560 -0
- package/packages/dashboard/ui/react-components/settings/WorkspaceSettingsPanel.tsx +1329 -0
- package/packages/dashboard/ui/react-components/settings/index.ts +11 -0
- package/packages/dashboard/ui/react-components/settings/types.ts +53 -0
- package/packages/dashboard/ui/react-components/utils/messageFormatting.tsx +370 -0
- package/packages/dashboard/ui/tailwind.config.js +148 -0
- package/packages/dashboard/ui/types/index.ts +304 -0
- package/packages/dashboard/ui/types/threading.ts +7 -0
- package/packages/dashboard/ui-dist/404.html +1 -0
- package/packages/dashboard/ui-dist/_next/static/HR7W9z1PPVPFqUboUVZFZ/_buildManifest.js +1 -0
- package/packages/dashboard/ui-dist/_next/static/HR7W9z1PPVPFqUboUVZFZ/_ssgManifest.js +1 -0
- package/packages/dashboard/ui-dist/_next/static/ZCFjHbkF8yDKS2md3lVgb/_buildManifest.js +1 -0
- package/packages/dashboard/ui-dist/_next/static/ZCFjHbkF8yDKS2md3lVgb/_ssgManifest.js +1 -0
- package/packages/dashboard/ui-dist/_next/static/chunks/116-a883fca163f3a5bc.js +1 -0
- package/packages/dashboard/ui-dist/_next/static/chunks/117-c8afed19e821a35d.js +2 -0
- package/packages/dashboard/ui-dist/_next/static/chunks/282-980c2eb8fff20123.js +1 -0
- package/packages/dashboard/ui-dist/_next/static/chunks/320-900169c942e31422.js +1 -0
- package/packages/dashboard/ui-dist/_next/static/chunks/532-bace199897eeab37.js +9 -0
- package/packages/dashboard/ui-dist/_next/static/chunks/631-af51bad94027527a.js +1 -0
- package/packages/dashboard/ui-dist/_next/static/chunks/648-acb2ff9f77cbfbd3.js +1 -0
- package/packages/dashboard/ui-dist/_next/static/chunks/677-30e60cb0b47875b6.js +1 -0
- package/packages/dashboard/ui-dist/_next/static/chunks/766-2aea80818f7eb0d8.js +1 -0
- package/packages/dashboard/ui-dist/_next/static/chunks/83-4f08122d4e7e79a6.js +1 -0
- package/packages/dashboard/ui-dist/_next/static/chunks/847-f1f467060f32afff.js +1 -0
- package/packages/dashboard/ui-dist/_next/static/chunks/891-5cb1513eeb97a891.js +1 -0
- package/packages/dashboard/ui-dist/_next/static/chunks/app/_not-found/page-60501fddbafba9dc.js +1 -0
- package/packages/dashboard/ui-dist/_next/static/chunks/app/app/onboarding/page-9914652442f7e4fb.js +1 -0
- package/packages/dashboard/ui-dist/_next/static/chunks/app/app/onboarding/page-f746f29e01fffc43.js +1 -0
- package/packages/dashboard/ui-dist/_next/static/chunks/app/app/page-2e525b1dcc790967.js +1 -0
- package/packages/dashboard/ui-dist/_next/static/chunks/app/app/page-44813aa26ad19681.js +1 -0
- package/packages/dashboard/ui-dist/_next/static/chunks/app/cloud/link/page-5011ae044b90449d.js +1 -0
- package/packages/dashboard/ui-dist/_next/static/chunks/app/cloud/link/page-fa1d5842aa90e8a6.js +1 -0
- package/packages/dashboard/ui-dist/_next/static/chunks/app/connect-repos/page-03ac6f35a6654ea6.js +1 -0
- package/packages/dashboard/ui-dist/_next/static/chunks/app/connect-repos/page-113060009ef35bc2.js +1 -0
- package/packages/dashboard/ui-dist/_next/static/chunks/app/history/page-9965d2483011b846.js +1 -0
- package/packages/dashboard/ui-dist/_next/static/chunks/app/history/page-b2ce7c96ed0931da.js +1 -0
- package/packages/dashboard/ui-dist/_next/static/chunks/app/layout-6b91e33784c20610.js +1 -0
- package/packages/dashboard/ui-dist/_next/static/chunks/app/layout-c0d118c0f92d969c.js +1 -0
- package/packages/dashboard/ui-dist/_next/static/chunks/app/login/page-6ec54eee75877971.js +1 -0
- package/packages/dashboard/ui-dist/_next/static/chunks/app/login/page-a0ca6f7ca6a100b8.js +1 -0
- package/packages/dashboard/ui-dist/_next/static/chunks/app/metrics/page-1e37ef8e73940b40.js +1 -0
- package/packages/dashboard/ui-dist/_next/static/chunks/app/metrics/page-bf2cb1e5915bc92d.js +1 -0
- package/packages/dashboard/ui-dist/_next/static/chunks/app/page-4e64923d73c35bc9.js +1 -0
- package/packages/dashboard/ui-dist/_next/static/chunks/app/page-7993778218818ace.js +1 -0
- package/packages/dashboard/ui-dist/_next/static/chunks/app/pricing/page-0efa024c28ba4597.js +1 -0
- package/packages/dashboard/ui-dist/_next/static/chunks/app/pricing/page-9db3ebdfa567a7c9.js +1 -0
- package/packages/dashboard/ui-dist/_next/static/chunks/app/providers/page-bcf46064ac4474ce.js +1 -0
- package/packages/dashboard/ui-dist/_next/static/chunks/app/providers/page-e65a0010da6ea5be.js +1 -0
- package/packages/dashboard/ui-dist/_next/static/chunks/app/providers/setup/[provider]/page-4dbe33f0f7691b7c.js +1 -0
- package/packages/dashboard/ui-dist/_next/static/chunks/app/providers/setup/[provider]/page-84161c802b020a1f.js +1 -0
- package/packages/dashboard/ui-dist/_next/static/chunks/app/signup/page-18a4665665f6be11.js +1 -0
- package/packages/dashboard/ui-dist/_next/static/chunks/app/signup/page-1ede2205b58649ca.js +1 -0
- package/packages/dashboard/ui-dist/_next/static/chunks/e868780c-48e5f147c90a3a41.js +18 -0
- package/packages/dashboard/ui-dist/_next/static/chunks/fd9d1056-609918ca7b6280bb.js +1 -0
- package/packages/dashboard/ui-dist/_next/static/chunks/framework-f66176bb897dc684.js +1 -0
- package/packages/dashboard/ui-dist/_next/static/chunks/main-5a40a5ae29646e1b.js +1 -0
- package/packages/dashboard/ui-dist/_next/static/chunks/main-app-6e8e8d3ef4e0192a.js +1 -0
- package/packages/dashboard/ui-dist/_next/static/chunks/main-app-fdbeb09028f57c9f.js +1 -0
- package/packages/dashboard/ui-dist/_next/static/chunks/pages/_app-72b849fbd24ac258.js +1 -0
- package/packages/dashboard/ui-dist/_next/static/chunks/pages/_error-7ba65e1336b92748.js +1 -0
- package/packages/dashboard/ui-dist/_next/static/chunks/polyfills-42372ed130431b0a.js +1 -0
- package/packages/dashboard/ui-dist/_next/static/chunks/webpack-1cdd8ed57114d5e1.js +1 -0
- package/packages/dashboard/ui-dist/_next/static/css/4034f236dd1a3178.css +1 -0
- package/packages/dashboard/ui-dist/_next/static/css/99c2552394077586.css +1 -0
- package/packages/dashboard/ui-dist/alt-logos/agent-relay-logo-128.png +0 -0
- package/packages/dashboard/ui-dist/alt-logos/agent-relay-logo-256.png +0 -0
- package/packages/dashboard/ui-dist/alt-logos/agent-relay-logo-32.png +0 -0
- package/packages/dashboard/ui-dist/alt-logos/agent-relay-logo-512.png +0 -0
- package/packages/dashboard/ui-dist/alt-logos/agent-relay-logo-64.png +0 -0
- package/packages/dashboard/ui-dist/alt-logos/agent-relay-logo.svg +45 -0
- package/packages/dashboard/ui-dist/alt-logos/logo.svg +38 -0
- package/packages/dashboard/ui-dist/alt-logos/monogram-logo-128.png +0 -0
- package/packages/dashboard/ui-dist/alt-logos/monogram-logo-256.png +0 -0
- package/packages/dashboard/ui-dist/alt-logos/monogram-logo-32.png +0 -0
- package/packages/dashboard/ui-dist/alt-logos/monogram-logo-512.png +0 -0
- package/packages/dashboard/ui-dist/alt-logos/monogram-logo-64.png +0 -0
- package/packages/dashboard/ui-dist/alt-logos/monogram-logo.svg +38 -0
- package/packages/dashboard/ui-dist/app/onboarding.html +1 -0
- package/packages/dashboard/ui-dist/app/onboarding.txt +7 -0
- package/packages/dashboard/ui-dist/app.html +1 -0
- package/packages/dashboard/ui-dist/app.txt +7 -0
- package/packages/dashboard/ui-dist/apple-icon.png +0 -0
- package/packages/dashboard/ui-dist/cloud/link.html +1 -0
- package/packages/dashboard/ui-dist/cloud/link.txt +7 -0
- package/packages/dashboard/ui-dist/connect-repos.html +1 -0
- package/packages/dashboard/ui-dist/connect-repos.txt +7 -0
- package/packages/dashboard/ui-dist/history.html +1 -0
- package/packages/dashboard/ui-dist/history.txt +7 -0
- package/packages/dashboard/ui-dist/index.html +1 -0
- package/packages/dashboard/ui-dist/index.txt +7 -0
- package/packages/dashboard/ui-dist/login.html +5 -0
- package/packages/dashboard/ui-dist/login.txt +7 -0
- package/packages/dashboard/ui-dist/metrics.html +1 -0
- package/packages/dashboard/ui-dist/metrics.txt +7 -0
- package/packages/dashboard/ui-dist/pricing.html +13 -0
- package/packages/dashboard/ui-dist/pricing.txt +7 -0
- package/packages/dashboard/ui-dist/providers/setup/claude.html +1 -0
- package/packages/dashboard/ui-dist/providers/setup/claude.txt +8 -0
- package/packages/dashboard/ui-dist/providers/setup/codex.html +1 -0
- package/packages/dashboard/ui-dist/providers/setup/codex.txt +8 -0
- package/packages/dashboard/ui-dist/providers/setup/cursor.html +1 -0
- package/packages/dashboard/ui-dist/providers/setup/cursor.txt +8 -0
- package/packages/dashboard/ui-dist/providers.html +1 -0
- package/packages/dashboard/ui-dist/providers.txt +7 -0
- package/packages/dashboard/ui-dist/signup.html +6 -0
- package/packages/dashboard/ui-dist/signup.txt +7 -0
- package/packages/dashboard-server/dist/health-worker-manager.d.ts +62 -0
- package/packages/dashboard-server/dist/health-worker-manager.js +144 -0
- package/packages/dashboard-server/dist/health-worker.d.ts +9 -0
- package/packages/dashboard-server/dist/health-worker.js +79 -0
- package/packages/dashboard-server/dist/index.d.ts +18 -0
- package/packages/dashboard-server/dist/index.js +17 -0
- package/packages/dashboard-server/dist/server.js +5099 -0
- package/packages/dashboard-server/dist/start.js +13 -0
- package/packages/dashboard-server/dist/types/threading.d.ts +8 -0
- package/packages/dashboard-server/dist/types/threading.js +2 -0
- package/packages/dashboard-server/dist/user-bridge.d.ts +154 -0
- package/packages/dashboard-server/dist/user-bridge.js +372 -0
- package/packages/dashboard-server/package.json +49 -0
- package/packages/hooks/dist/browser.d.ts +2 -0
- package/packages/hooks/dist/browser.js +3 -0
- package/packages/hooks/dist/index.d.ts +11 -0
- package/packages/hooks/dist/index.js +11 -0
- package/packages/hooks/dist/registry.js +476 -0
- package/packages/hooks/dist/trajectory-hooks.js +183 -0
- package/packages/hooks/dist/types.d.ts +285 -0
- package/packages/hooks/dist/types.js +10 -0
- package/packages/hooks/package.json +52 -0
- package/packages/mcp/LICENSE +190 -0
- package/packages/mcp/README.md +214 -0
- package/packages/mcp/SPEC.md +1922 -0
- package/packages/mcp/STAFFING_PLAN.md +294 -0
- package/packages/mcp/dist/bin.d.ts +12 -0
- package/packages/mcp/dist/bin.js +127 -0
- package/packages/mcp/dist/client.d.ts +68 -0
- package/packages/mcp/dist/client.js +115 -0
- package/packages/mcp/dist/cloud.d.ts +108 -0
- package/packages/mcp/dist/cloud.js +279 -0
- package/packages/mcp/dist/errors.d.ts +27 -0
- package/packages/mcp/dist/errors.js +48 -0
- package/packages/mcp/dist/index.d.ts +10 -0
- package/packages/mcp/dist/index.js +16 -0
- package/packages/mcp/dist/install-cli.d.ts +35 -0
- package/packages/mcp/dist/install-cli.js +157 -0
- package/packages/mcp/dist/install.d.ts +101 -0
- package/packages/mcp/dist/install.js +398 -0
- package/packages/mcp/dist/prompts/index.d.ts +2 -0
- package/packages/mcp/dist/prompts/index.js +2 -0
- package/packages/mcp/dist/prompts/protocol.d.ts +11 -0
- package/packages/mcp/dist/prompts/protocol.js +168 -0
- package/packages/mcp/dist/resources/agents.d.ts +11 -0
- package/packages/mcp/dist/resources/agents.js +17 -0
- package/packages/mcp/dist/resources/inbox.d.ts +11 -0
- package/packages/mcp/dist/resources/inbox.js +17 -0
- package/packages/mcp/dist/resources/index.d.ts +4 -0
- package/packages/mcp/dist/resources/index.js +4 -0
- package/packages/mcp/dist/resources/project.d.ts +11 -0
- package/packages/mcp/dist/resources/project.js +21 -0
- package/packages/mcp/dist/server.d.ts +19 -0
- package/packages/mcp/dist/server.js +215 -0
- package/packages/mcp/dist/simple.d.ts +173 -0
- package/packages/mcp/dist/simple.js +120 -0
- package/packages/mcp/dist/tools/index.d.ts +10 -0
- package/packages/mcp/dist/tools/index.js +10 -0
- package/packages/mcp/dist/tools/relay-health.d.ts +23 -0
- package/packages/mcp/dist/tools/relay-health.js +138 -0
- package/packages/mcp/dist/tools/relay-inbox.d.ts +26 -0
- package/packages/mcp/dist/tools/relay-inbox.js +58 -0
- package/packages/mcp/dist/tools/relay-logs.d.ts +20 -0
- package/packages/mcp/dist/tools/relay-logs.js +88 -0
- package/packages/mcp/dist/tools/relay-metrics.d.ts +20 -0
- package/packages/mcp/dist/tools/relay-metrics.js +135 -0
- package/packages/mcp/dist/tools/relay-release.d.ts +20 -0
- package/packages/mcp/dist/tools/relay-release.js +44 -0
- package/packages/mcp/dist/tools/relay-send.d.ts +29 -0
- package/packages/mcp/dist/tools/relay-send.js +71 -0
- package/packages/mcp/dist/tools/relay-spawn.d.ts +36 -0
- package/packages/mcp/dist/tools/relay-spawn.js +73 -0
- package/packages/mcp/dist/tools/relay-status.d.ts +11 -0
- package/packages/mcp/dist/tools/relay-status.js +43 -0
- package/packages/mcp/dist/tools/relay-who.d.ts +20 -0
- package/packages/mcp/dist/tools/relay-who.js +47 -0
- package/packages/mcp/package.json +69 -0
- package/packages/memory/dist/memory-hooks.d.ts +60 -0
- package/packages/memory/package.json +35 -0
- package/packages/policy/dist/agent-policy.js +665 -0
- package/packages/policy/dist/index.d.ts +12 -0
- package/packages/policy/dist/index.js +12 -0
- package/packages/policy/package.json +35 -0
- package/packages/protocol/dist/channels.d.ts +137 -0
- package/packages/protocol/dist/channels.js +154 -0
- package/packages/protocol/dist/framing.d.ts +80 -0
- package/packages/protocol/dist/framing.js +206 -0
- package/packages/protocol/dist/index.d.ts +5 -0
- package/packages/protocol/dist/index.js +5 -0
- package/packages/protocol/dist/relay-pty-schemas.d.ts +258 -0
- package/packages/protocol/dist/types.d.ts +341 -0
- package/packages/protocol/dist/types.js +8 -0
- package/packages/protocol/package.json +56 -0
- package/packages/resiliency/dist/memory-monitor.js +599 -0
- package/packages/resiliency/dist/provider-context.d.ts +100 -0
- package/packages/resiliency/package.json +33 -0
- package/packages/sdk/README.md +171 -0
- package/packages/sdk/dist/client.d.ts +181 -0
- package/packages/sdk/dist/client.js +695 -0
- package/packages/sdk/dist/index.d.ts +32 -0
- package/packages/sdk/dist/index.js +36 -0
- package/packages/sdk/dist/protocol/framing.d.ts +80 -0
- package/packages/sdk/dist/protocol/framing.js +206 -0
- package/packages/sdk/dist/protocol/index.d.ts +6 -0
- package/packages/sdk/dist/protocol/index.js +6 -0
- package/packages/sdk/dist/protocol/types.d.ts +341 -0
- package/packages/sdk/dist/protocol/types.js +8 -0
- package/packages/sdk/dist/standalone.d.ts +87 -0
- package/packages/sdk/dist/standalone.js +126 -0
- package/packages/sdk/package.json +80 -0
- package/packages/spawner/API.md +256 -0
- package/packages/spawner/dist/index.d.ts +8 -0
- package/packages/spawner/dist/index.js +8 -0
- package/packages/spawner/dist/types.d.ts +552 -0
- package/packages/spawner/dist/types.js +193 -0
- package/packages/spawner/package.json +47 -0
- package/packages/state/dist/agent-state.js +120 -0
- package/packages/state/dist/index.d.ts +8 -0
- package/packages/state/dist/index.js +8 -0
- package/packages/state/package.json +32 -0
- package/packages/storage/dist/adapter.d.ts +156 -0
- package/packages/storage/dist/batched-sqlite-adapter.d.ts +75 -0
- package/packages/storage/dist/batched-sqlite-adapter.js +189 -0
- package/packages/storage/dist/index.d.ts +5 -0
- package/packages/storage/dist/index.js +6 -0
- package/packages/storage/dist/sqlite-adapter.d.ts +113 -0
- package/packages/storage/dist/sqlite-adapter.js +752 -0
- package/packages/storage/package.json +69 -0
- package/packages/trajectory/dist/index.d.ts +2 -0
- package/packages/trajectory/dist/index.js +2 -0
- package/packages/trajectory/dist/integration.js +987 -0
- package/packages/trajectory/package.json +35 -0
- package/packages/user-directory/dist/index.d.ts +7 -0
- package/packages/user-directory/dist/index.js +7 -0
- package/packages/user-directory/dist/user-directory.d.ts +121 -0
- package/packages/user-directory/dist/user-directory.js +267 -0
- package/packages/user-directory/package.json +35 -0
- package/packages/utils/dist/command-resolver.js +80 -0
- package/packages/utils/dist/error-tracking.d.ts +103 -0
- package/packages/utils/dist/error-tracking.js +149 -0
- package/packages/utils/dist/index.d.ts +9 -0
- package/packages/utils/dist/index.js +9 -0
- package/packages/utils/dist/model-mapping.d.ts +28 -0
- package/packages/utils/dist/model-mapping.js +55 -0
- package/packages/utils/package.json +75 -0
- package/packages/wrapper/dist/__fixtures__/claude-outputs.d.ts +49 -0
- package/packages/wrapper/dist/__fixtures__/claude-outputs.js +443 -0
- package/packages/wrapper/dist/__fixtures__/codex-outputs.d.ts +9 -0
- package/packages/wrapper/dist/__fixtures__/codex-outputs.js +94 -0
- package/packages/wrapper/dist/__fixtures__/gemini-outputs.d.ts +19 -0
- package/packages/wrapper/dist/__fixtures__/gemini-outputs.js +144 -0
- package/packages/wrapper/dist/__fixtures__/index.d.ts +68 -0
- package/packages/wrapper/dist/__fixtures__/index.js +44 -0
- package/packages/wrapper/dist/base-wrapper.d.ts +225 -0
- package/packages/wrapper/dist/base-wrapper.js +572 -0
- package/packages/wrapper/dist/client.d.ts +254 -0
- package/packages/wrapper/dist/client.js +801 -0
- package/packages/wrapper/dist/id-generator.d.ts +35 -0
- package/packages/wrapper/dist/id-generator.js +60 -0
- package/packages/wrapper/dist/idle-detector.d.ts +110 -0
- package/packages/wrapper/dist/idle-detector.js +304 -0
- package/packages/wrapper/dist/index.d.ts +37 -0
- package/packages/wrapper/dist/index.js +47 -0
- package/packages/wrapper/dist/parser.d.ts +236 -0
- package/packages/wrapper/dist/parser.js +1238 -0
- package/packages/wrapper/dist/relay-pty-orchestrator.d.ts +407 -0
- package/packages/wrapper/dist/relay-pty-orchestrator.js +1885 -0
- package/packages/wrapper/dist/shared.d.ts +201 -0
- package/packages/wrapper/dist/shared.js +341 -0
- package/packages/wrapper/dist/stuck-detector.d.ts +161 -0
- package/packages/wrapper/dist/stuck-detector.js +402 -0
- package/packages/wrapper/dist/tmux-wrapper.d.ts +345 -0
- package/packages/wrapper/dist/tmux-wrapper.js +1747 -0
- package/packages/wrapper/dist/trajectory-integration.d.ts +292 -0
- package/packages/wrapper/dist/trajectory-integration.js +979 -0
- package/packages/wrapper/dist/wrapper-types.d.ts +41 -0
- package/packages/wrapper/dist/wrapper-types.js +7 -0
- package/packages/wrapper/package.json +63 -0
- package/scripts/setup-stripe-products.ts +312 -0
- package/scripts/stress-test-orchestrator-integration.mts +1366 -0
- package/scripts/stress-test-orchestrator.mjs +584 -0
- package/scripts/stress-test-relay-pty.sh +452 -0
- package/scripts/verify-schema.js +1 -1
- package/turbo.json +37 -0
- package/dist/bridge/config.d.ts +0 -41
- package/dist/bridge/config.js +0 -143
- package/dist/bridge/index.d.ts +0 -10
- package/dist/bridge/index.js +0 -10
- package/dist/bridge/multi-project-client.d.ts +0 -99
- package/dist/bridge/multi-project-client.js +0 -389
- package/dist/bridge/shadow-cli.js +0 -75
- package/dist/bridge/shadow-config.d.ts +0 -87
- package/dist/bridge/spawner.d.ts +0 -186
- package/dist/bridge/spawner.js +0 -920
- package/dist/bridge/types.d.ts +0 -129
- package/dist/bridge/utils.d.ts +0 -30
- package/dist/bridge/utils.js +0 -54
- package/dist/cli/index.js +0 -2784
- package/dist/cloud/api/admin.js +0 -225
- package/dist/cloud/api/billing.js +0 -564
- package/dist/cloud/api/cli-pty-runner.d.ts +0 -54
- package/dist/cloud/api/cli-pty-runner.js +0 -119
- package/dist/cloud/api/codex-auth-helper.js +0 -327
- package/dist/cloud/api/consensus.js +0 -259
- package/dist/cloud/api/coordinators.js +0 -749
- package/dist/cloud/api/daemons.js +0 -535
- package/dist/cloud/api/generic-webhooks.js +0 -129
- package/dist/cloud/api/github-app.js +0 -223
- package/dist/cloud/api/monitoring.js +0 -578
- package/dist/cloud/api/nango-auth.js +0 -658
- package/dist/cloud/api/onboarding.d.ts +0 -15
- package/dist/cloud/api/onboarding.js +0 -666
- package/dist/cloud/api/policy.js +0 -229
- package/dist/cloud/api/provider-env.d.ts +0 -5
- package/dist/cloud/api/provider-env.js +0 -27
- package/dist/cloud/api/providers.js +0 -511
- package/dist/cloud/api/repos.js +0 -576
- package/dist/cloud/api/teams.js +0 -279
- package/dist/cloud/api/test-helpers.js +0 -745
- package/dist/cloud/api/workspaces.js +0 -1783
- package/dist/cloud/billing/plans.js +0 -245
- package/dist/cloud/config.d.ts +0 -75
- package/dist/cloud/config.js +0 -109
- package/dist/cloud/db/drizzle.d.ts +0 -246
- package/dist/cloud/db/drizzle.js +0 -1249
- package/dist/cloud/db/schema.d.ts +0 -4854
- package/dist/cloud/db/schema.js +0 -610
- package/dist/cloud/index.d.ts +0 -11
- package/dist/cloud/index.js +0 -38
- package/dist/cloud/provisioner/index.d.ts +0 -207
- package/dist/cloud/provisioner/index.js +0 -2069
- package/dist/cloud/server.js +0 -1599
- package/dist/cloud/services/index.d.ts +0 -17
- package/dist/cloud/services/index.js +0 -25
- package/dist/cloud/services/intro-expiration.d.ts +0 -55
- package/dist/cloud/services/intro-expiration.js +0 -211
- package/dist/cloud/services/nango.d.ts +0 -199
- package/dist/cloud/services/nango.js +0 -382
- package/dist/cloud/services/persistence.d.ts +0 -131
- package/dist/config/relay-config.d.ts +0 -23
- package/dist/config/relay-config.js +0 -23
- package/dist/continuity/index.d.ts +0 -45
- package/dist/continuity/index.js +0 -48
- package/dist/continuity/types.d.ts +0 -180
- package/dist/continuity/types.js +0 -9
- package/dist/daemon/agent-manager.d.ts +0 -134
- package/dist/daemon/agent-manager.js +0 -564
- package/dist/daemon/agent-registry.js +0 -213
- package/dist/daemon/api.d.ts +0 -83
- package/dist/daemon/api.js +0 -780
- package/dist/daemon/channel-membership-store.d.ts +0 -48
- package/dist/daemon/channel-membership-store.js +0 -149
- package/dist/daemon/cli-auth.d.ts +0 -82
- package/dist/daemon/cli-auth.js +0 -700
- package/dist/daemon/cloud-sync.d.ts +0 -150
- package/dist/daemon/cloud-sync.js +0 -424
- package/dist/daemon/connection.d.ts +0 -130
- package/dist/daemon/connection.js +0 -438
- package/dist/daemon/consensus-integration.js +0 -371
- package/dist/daemon/delivery-tracker.d.ts +0 -34
- package/dist/daemon/delivery-tracker.js +0 -104
- package/dist/daemon/enhanced-features.d.ts +0 -118
- package/dist/daemon/enhanced-features.js +0 -178
- package/dist/daemon/index.d.ts +0 -14
- package/dist/daemon/index.js +0 -17
- package/dist/daemon/orchestrator.d.ts +0 -157
- package/dist/daemon/orchestrator.js +0 -792
- package/dist/daemon/repo-manager.js +0 -384
- package/dist/daemon/router.d.ts +0 -358
- package/dist/daemon/router.js +0 -1333
- package/dist/daemon/server.d.ts +0 -159
- package/dist/daemon/server.js +0 -788
- package/dist/daemon/services/browser-testing.d.ts +0 -88
- package/dist/daemon/services/browser-testing.js +0 -244
- package/dist/daemon/services/container-spawner.d.ts +0 -135
- package/dist/daemon/services/container-spawner.js +0 -313
- package/dist/daemon/sync-queue.d.ts +0 -116
- package/dist/daemon/sync-queue.js +0 -361
- package/dist/daemon/types.d.ts +0 -131
- package/dist/daemon/user-directory.d.ts +0 -111
- package/dist/daemon/user-directory.js +0 -233
- package/dist/daemon/workspace-manager.js +0 -314
- package/dist/dashboard/out/_next/static/chunks/116-eacf84a131b80db9.js +0 -1
- package/dist/dashboard/out/_next/static/chunks/64-f4268c2ac6f4d7d4.js +0 -1
- package/dist/dashboard/out/_next/static/chunks/766-aa7c8c9900ff5f53.js +0 -1
- package/dist/dashboard/out/_next/static/chunks/891-a024fbe4b619cf6f.js +0 -1
- package/dist/dashboard/out/_next/static/chunks/app/app/page-ffad986adfcc8b31.js +0 -1
- package/dist/dashboard/out/_next/static/chunks/app/page-671037943b2f2e43.js +0 -1
- package/dist/dashboard/out/_next/static/chunks/app/providers/page-57cbd738c6a73859.js +0 -1
- package/dist/dashboard/out/_next/static/chunks/app/providers/setup/[provider]/page-5ab0854472b402b0.js +0 -1
- package/dist/dashboard/out/_next/static/css/8f9ed310f454e5a5.css +0 -1
- package/dist/dashboard-server/server.js +0 -4806
- package/dist/dashboard-server/start.js +0 -13
- package/dist/dashboard-server/user-bridge.d.ts +0 -138
- package/dist/dashboard-server/user-bridge.js +0 -348
- package/dist/hooks/index.d.ts +0 -10
- package/dist/hooks/index.js +0 -10
- package/dist/hooks/registry.js +0 -476
- package/dist/hooks/trajectory-hooks.js +0 -183
- package/dist/hooks/types.d.ts +0 -284
- package/dist/hooks/types.js +0 -8
- package/dist/index.d.ts +0 -13
- package/dist/index.js +0 -16
- package/dist/memory/memory-hooks.d.ts +0 -60
- package/dist/policy/agent-policy.js +0 -665
- package/dist/protocol/channels.d.ts +0 -211
- package/dist/protocol/channels.js +0 -154
- package/dist/protocol/framing.d.ts +0 -94
- package/dist/protocol/framing.js +0 -240
- package/dist/protocol/index.d.ts +0 -4
- package/dist/protocol/index.js +0 -4
- package/dist/protocol/relay-pty-schemas.d.ts +0 -209
- package/dist/protocol/types.d.ts +0 -168
- package/dist/protocol/types.js +0 -6
- package/dist/resiliency/memory-monitor.js +0 -593
- package/dist/resiliency/provider-context.d.ts +0 -100
- package/dist/shared/cli-auth-config.js +0 -320
- package/dist/state/agent-state.js +0 -120
- package/dist/storage/adapter.d.ts +0 -154
- package/dist/storage/batched-sqlite-adapter.d.ts +0 -71
- package/dist/storage/batched-sqlite-adapter.js +0 -183
- package/dist/storage/sqlite-adapter.d.ts +0 -107
- package/dist/storage/sqlite-adapter.js +0 -717
- package/dist/trajectory/config.d.ts +0 -102
- package/dist/trajectory/config.js +0 -185
- package/dist/trajectory/index.d.ts +0 -8
- package/dist/trajectory/index.js +0 -8
- package/dist/trajectory/integration.js +0 -987
- package/dist/utils/command-resolver.js +0 -76
- package/dist/utils/index.d.ts +0 -4
- package/dist/utils/index.js +0 -4
- package/dist/utils/project-namespace.d.ts +0 -70
- package/dist/utils/project-namespace.js +0 -216
- package/dist/wrapper/base-wrapper.d.ts +0 -217
- package/dist/wrapper/base-wrapper.js +0 -538
- package/dist/wrapper/client.d.ts +0 -199
- package/dist/wrapper/client.js +0 -677
- package/dist/wrapper/idle-detector.d.ts +0 -102
- package/dist/wrapper/idle-detector.js +0 -279
- package/dist/wrapper/index.d.ts +0 -4
- package/dist/wrapper/index.js +0 -7
- package/dist/wrapper/parser.d.ts +0 -230
- package/dist/wrapper/parser.js +0 -1178
- package/dist/wrapper/pty-wrapper.d.ts +0 -343
- package/dist/wrapper/pty-wrapper.js +0 -1593
- package/dist/wrapper/relay-pty-orchestrator.d.ts +0 -296
- package/dist/wrapper/relay-pty-orchestrator.js +0 -1088
- package/dist/wrapper/shared.d.ts +0 -168
- package/dist/wrapper/shared.js +0 -291
- package/dist/wrapper/stuck-detector.d.ts +0 -101
- package/dist/wrapper/stuck-detector.js +0 -228
- package/dist/wrapper/tmux-wrapper.d.ts +0 -344
- package/dist/wrapper/tmux-wrapper.js +0 -1711
- /package/dist/dashboard/out/_next/static/{BffXAqxm-_rUlj2mAnK26 → ZCFjHbkF8yDKS2md3lVgb}/_buildManifest.js +0 -0
- /package/dist/dashboard/out/_next/static/{BffXAqxm-_rUlj2mAnK26 → ZCFjHbkF8yDKS2md3lVgb}/_ssgManifest.js +0 -0
- /package/dist/dashboard/out/_next/static/chunks/app/cloud/link/{page-cfeb437f08a12ed9.js → page-5011ae044b90449d.js} +0 -0
- /package/dist/dashboard/out/_next/static/chunks/app/history/{page-240f91e8b06ba8ac.js → page-b2ce7c96ed0931da.js} +0 -0
- /package/dist/dashboard/out/_next/static/chunks/app/metrics/{page-82938ab8fcf44694.js → page-bf2cb1e5915bc92d.js} +0 -0
- /package/dist/{cli → src/cli}/index.d.ts +0 -0
- /package/dist/{health-worker-manager.d.ts → src/health-worker-manager.d.ts} +0 -0
- /package/dist/{health-worker-manager.js → src/health-worker-manager.js} +0 -0
- /package/dist/{health-worker.d.ts → src/health-worker.d.ts} +0 -0
- /package/dist/{health-worker.js → src/health-worker.js} +0 -0
- /package/{dist/bridge → packages/bridge/dist}/shadow-cli.d.ts +0 -0
- /package/{dist/bridge → packages/bridge/dist}/types.js +0 -0
- /package/{dist/cloud → packages/cloud/dist}/api/admin.d.ts +0 -0
- /package/{dist/cloud → packages/cloud/dist}/api/auth.d.ts +0 -0
- /package/{dist/cloud → packages/cloud/dist}/api/auth.js +0 -0
- /package/{dist/cloud → packages/cloud/dist}/api/billing.d.ts +0 -0
- /package/{dist/cloud → packages/cloud/dist}/api/codex-auth-helper.d.ts +0 -0
- /package/{dist/cloud → packages/cloud/dist}/api/consensus.d.ts +0 -0
- /package/{dist/cloud → packages/cloud/dist}/api/coordinators.d.ts +0 -0
- /package/{dist/cloud → packages/cloud/dist}/api/daemons.d.ts +0 -0
- /package/{dist/cloud → packages/cloud/dist}/api/generic-webhooks.d.ts +0 -0
- /package/{dist/cloud → packages/cloud/dist}/api/git.d.ts +0 -0
- /package/{dist/cloud → packages/cloud/dist}/api/git.js +0 -0
- /package/{dist/cloud → packages/cloud/dist}/api/github-app.d.ts +0 -0
- /package/{dist/cloud → packages/cloud/dist}/api/middleware/planLimits.d.ts +0 -0
- /package/{dist/cloud → packages/cloud/dist}/api/middleware/planLimits.js +0 -0
- /package/{dist/cloud → packages/cloud/dist}/api/monitoring.d.ts +0 -0
- /package/{dist/cloud → packages/cloud/dist}/api/nango-auth.d.ts +0 -0
- /package/{dist/cloud → packages/cloud/dist}/api/policy.d.ts +0 -0
- /package/{dist/cloud → packages/cloud/dist}/api/providers.d.ts +0 -0
- /package/{dist/cloud → packages/cloud/dist}/api/repos.d.ts +0 -0
- /package/{dist/cloud → packages/cloud/dist}/api/teams.d.ts +0 -0
- /package/{dist/cloud → packages/cloud/dist}/api/test-helpers.d.ts +0 -0
- /package/{dist/cloud → packages/cloud/dist}/api/usage.d.ts +0 -0
- /package/{dist/cloud → packages/cloud/dist}/api/usage.js +0 -0
- /package/{dist/cloud → packages/cloud/dist}/api/webhooks.d.ts +0 -0
- /package/{dist/cloud → packages/cloud/dist}/api/webhooks.js +0 -0
- /package/{dist/cloud → packages/cloud/dist}/api/workspaces.d.ts +0 -0
- /package/{dist/cloud → packages/cloud/dist}/billing/index.d.ts +0 -0
- /package/{dist/cloud → packages/cloud/dist}/billing/index.js +0 -0
- /package/{dist/cloud → packages/cloud/dist}/billing/plans.d.ts +0 -0
- /package/{dist/cloud → packages/cloud/dist}/billing/service.d.ts +0 -0
- /package/{dist/cloud → packages/cloud/dist}/billing/service.js +0 -0
- /package/{dist/cloud → packages/cloud/dist}/billing/types.d.ts +0 -0
- /package/{dist/cloud → packages/cloud/dist}/billing/types.js +0 -0
- /package/{dist/cloud → packages/cloud/dist}/db/bulk-ingest.d.ts +0 -0
- /package/{dist/cloud → packages/cloud/dist}/db/bulk-ingest.js +0 -0
- /package/{dist/cloud → packages/cloud/dist}/db/index.d.ts +0 -0
- /package/{dist/cloud → packages/cloud/dist}/db/index.js +0 -0
- /package/{dist/cloud → packages/cloud/dist}/server.d.ts +0 -0
- /package/{dist/cloud → packages/cloud/dist}/services/auto-scaler.d.ts +0 -0
- /package/{dist/cloud → packages/cloud/dist}/services/auto-scaler.js +0 -0
- /package/{dist/cloud → packages/cloud/dist}/services/capacity-manager.d.ts +0 -0
- /package/{dist/cloud → packages/cloud/dist}/services/capacity-manager.js +0 -0
- /package/{dist/cloud → packages/cloud/dist}/services/ci-agent-spawner.d.ts +0 -0
- /package/{dist/cloud → packages/cloud/dist}/services/ci-agent-spawner.js +0 -0
- /package/{dist/cloud → packages/cloud/dist}/services/cloud-message-bus.d.ts +0 -0
- /package/{dist/cloud → packages/cloud/dist}/services/cloud-message-bus.js +0 -0
- /package/{dist/cloud → packages/cloud/dist}/services/compute-enforcement.d.ts +0 -0
- /package/{dist/cloud → packages/cloud/dist}/services/compute-enforcement.js +0 -0
- /package/{dist/cloud → packages/cloud/dist}/services/coordinator.d.ts +0 -0
- /package/{dist/cloud → packages/cloud/dist}/services/coordinator.js +0 -0
- /package/{dist/cloud → packages/cloud/dist}/services/mention-handler.d.ts +0 -0
- /package/{dist/cloud → packages/cloud/dist}/services/mention-handler.js +0 -0
- /package/{dist/cloud → packages/cloud/dist}/services/persistence.js +0 -0
- /package/{dist/cloud → packages/cloud/dist}/services/planLimits.d.ts +0 -0
- /package/{dist/cloud → packages/cloud/dist}/services/planLimits.js +0 -0
- /package/{dist/cloud → packages/cloud/dist}/services/presence-registry.d.ts +0 -0
- /package/{dist/cloud → packages/cloud/dist}/services/presence-registry.js +0 -0
- /package/{dist/cloud → packages/cloud/dist}/services/scaling-orchestrator.d.ts +0 -0
- /package/{dist/cloud → packages/cloud/dist}/services/scaling-orchestrator.js +0 -0
- /package/{dist/cloud → packages/cloud/dist}/services/scaling-policy.d.ts +0 -0
- /package/{dist/cloud → packages/cloud/dist}/services/scaling-policy.js +0 -0
- /package/{dist/cloud → packages/cloud/dist}/services/ssh-security.d.ts +0 -0
- /package/{dist/cloud → packages/cloud/dist}/services/ssh-security.js +0 -0
- /package/{dist/cloud → packages/cloud/dist}/services/workspace-keepalive.d.ts +0 -0
- /package/{dist/cloud → packages/cloud/dist}/services/workspace-keepalive.js +0 -0
- /package/{dist/cloud → packages/cloud/dist}/webhooks/index.d.ts +0 -0
- /package/{dist/cloud → packages/cloud/dist}/webhooks/index.js +0 -0
- /package/{dist/cloud → packages/cloud/dist}/webhooks/parsers/github.d.ts +0 -0
- /package/{dist/cloud → packages/cloud/dist}/webhooks/parsers/github.js +0 -0
- /package/{dist/cloud → packages/cloud/dist}/webhooks/parsers/index.d.ts +0 -0
- /package/{dist/cloud → packages/cloud/dist}/webhooks/parsers/index.js +0 -0
- /package/{dist/cloud → packages/cloud/dist}/webhooks/parsers/linear.d.ts +0 -0
- /package/{dist/cloud → packages/cloud/dist}/webhooks/parsers/linear.js +0 -0
- /package/{dist/cloud → packages/cloud/dist}/webhooks/parsers/slack.d.ts +0 -0
- /package/{dist/cloud → packages/cloud/dist}/webhooks/parsers/slack.js +0 -0
- /package/{dist/cloud → packages/cloud/dist}/webhooks/responders/github.d.ts +0 -0
- /package/{dist/cloud → packages/cloud/dist}/webhooks/responders/github.js +0 -0
- /package/{dist/cloud → packages/cloud/dist}/webhooks/responders/index.d.ts +0 -0
- /package/{dist/cloud → packages/cloud/dist}/webhooks/responders/index.js +0 -0
- /package/{dist/cloud → packages/cloud/dist}/webhooks/responders/linear.d.ts +0 -0
- /package/{dist/cloud → packages/cloud/dist}/webhooks/responders/linear.js +0 -0
- /package/{dist/cloud → packages/cloud/dist}/webhooks/responders/slack.d.ts +0 -0
- /package/{dist/cloud → packages/cloud/dist}/webhooks/responders/slack.js +0 -0
- /package/{dist/cloud → packages/cloud/dist}/webhooks/router.d.ts +0 -0
- /package/{dist/cloud → packages/cloud/dist}/webhooks/router.js +0 -0
- /package/{dist/cloud → packages/cloud/dist}/webhooks/rules-engine.d.ts +0 -0
- /package/{dist/cloud → packages/cloud/dist}/webhooks/rules-engine.js +0 -0
- /package/{dist/cloud → packages/cloud/dist}/webhooks/types.d.ts +0 -0
- /package/{dist/cloud → packages/cloud/dist}/webhooks/types.js +0 -0
- /package/{dist/utils → packages/config/dist}/agent-config.d.ts +0 -0
- /package/{dist/utils → packages/config/dist}/agent-config.js +0 -0
- /package/{dist/shared → packages/config/dist}/cli-auth-config.d.ts +0 -0
- /package/{dist/bridge → packages/config/dist}/shadow-config.js +0 -0
- /package/{dist/bridge → packages/config/dist}/teams-config.d.ts +0 -0
- /package/{dist/bridge → packages/config/dist}/teams-config.js +0 -0
- /package/{dist/continuity → packages/continuity/dist}/formatter.d.ts +0 -0
- /package/{dist/continuity → packages/continuity/dist}/formatter.js +0 -0
- /package/{dist/continuity → packages/continuity/dist}/handoff-store.d.ts +0 -0
- /package/{dist/continuity → packages/continuity/dist}/handoff-store.js +0 -0
- /package/{dist/continuity → packages/continuity/dist}/ledger-store.d.ts +0 -0
- /package/{dist/continuity → packages/continuity/dist}/ledger-store.js +0 -0
- /package/{dist/continuity → packages/continuity/dist}/manager.d.ts +0 -0
- /package/{dist/continuity → packages/continuity/dist}/manager.js +0 -0
- /package/{dist/continuity → packages/continuity/dist}/parser.d.ts +0 -0
- /package/{dist/continuity → packages/continuity/dist}/parser.js +0 -0
- /package/{dist/daemon → packages/daemon/dist}/agent-registry.d.ts +0 -0
- /package/{dist/daemon → packages/daemon/dist}/agent-signing.d.ts +0 -0
- /package/{dist/daemon → packages/daemon/dist}/agent-signing.js +0 -0
- /package/{dist/daemon → packages/daemon/dist}/auth.d.ts +0 -0
- /package/{dist/daemon → packages/daemon/dist}/auth.js +0 -0
- /package/{dist/daemon → packages/daemon/dist}/consensus-integration.d.ts +0 -0
- /package/{dist/daemon → packages/daemon/dist}/consensus.d.ts +0 -0
- /package/{dist/daemon → packages/daemon/dist}/consensus.js +0 -0
- /package/{dist/daemon → packages/daemon/dist}/rate-limiter.d.ts +0 -0
- /package/{dist/daemon → packages/daemon/dist}/rate-limiter.js +0 -0
- /package/{dist/daemon → packages/daemon/dist}/registry.d.ts +0 -0
- /package/{dist/daemon → packages/daemon/dist}/registry.js +0 -0
- /package/{dist/daemon → packages/daemon/dist}/repo-manager.d.ts +0 -0
- /package/{dist/daemon → packages/daemon/dist}/types.js +0 -0
- /package/{dist/daemon → packages/daemon/dist}/workspace-manager.d.ts +0 -0
- /package/{dist/dashboard-server → packages/dashboard-server/dist}/metrics.d.ts +0 -0
- /package/{dist/dashboard-server → packages/dashboard-server/dist}/metrics.js +0 -0
- /package/{dist/dashboard-server → packages/dashboard-server/dist}/needs-attention.d.ts +0 -0
- /package/{dist/dashboard-server → packages/dashboard-server/dist}/needs-attention.js +0 -0
- /package/{dist/dashboard-server → packages/dashboard-server/dist}/server.d.ts +0 -0
- /package/{dist/dashboard-server → packages/dashboard-server/dist}/start.d.ts +0 -0
- /package/{dist/hooks → packages/hooks/dist}/emitter.d.ts +0 -0
- /package/{dist/hooks → packages/hooks/dist}/emitter.js +0 -0
- /package/{dist/hooks → packages/hooks/dist}/inbox-check/hook.d.ts +0 -0
- /package/{dist/hooks → packages/hooks/dist}/inbox-check/hook.js +0 -0
- /package/{dist/hooks → packages/hooks/dist}/inbox-check/index.d.ts +0 -0
- /package/{dist/hooks → packages/hooks/dist}/inbox-check/index.js +0 -0
- /package/{dist/hooks → packages/hooks/dist}/inbox-check/types.d.ts +0 -0
- /package/{dist/hooks → packages/hooks/dist}/inbox-check/types.js +0 -0
- /package/{dist/hooks → packages/hooks/dist}/inbox-check/utils.d.ts +0 -0
- /package/{dist/hooks → packages/hooks/dist}/inbox-check/utils.js +0 -0
- /package/{dist/hooks → packages/hooks/dist}/registry.d.ts +0 -0
- /package/{dist/hooks → packages/hooks/dist}/trajectory-hooks.d.ts +0 -0
- /package/{dist/memory → packages/memory/dist}/adapters/index.d.ts +0 -0
- /package/{dist/memory → packages/memory/dist}/adapters/index.js +0 -0
- /package/{dist/memory → packages/memory/dist}/adapters/inmemory.d.ts +0 -0
- /package/{dist/memory → packages/memory/dist}/adapters/inmemory.js +0 -0
- /package/{dist/memory → packages/memory/dist}/adapters/supermemory.d.ts +0 -0
- /package/{dist/memory → packages/memory/dist}/adapters/supermemory.js +0 -0
- /package/{dist/memory → packages/memory/dist}/context-compaction.d.ts +0 -0
- /package/{dist/memory → packages/memory/dist}/context-compaction.js +0 -0
- /package/{dist/memory → packages/memory/dist}/factory.d.ts +0 -0
- /package/{dist/memory → packages/memory/dist}/factory.js +0 -0
- /package/{dist/memory → packages/memory/dist}/index.d.ts +0 -0
- /package/{dist/memory → packages/memory/dist}/index.js +0 -0
- /package/{dist/memory → packages/memory/dist}/memory-hooks.js +0 -0
- /package/{dist/memory → packages/memory/dist}/service.d.ts +0 -0
- /package/{dist/memory → packages/memory/dist}/service.js +0 -0
- /package/{dist/memory → packages/memory/dist}/types.d.ts +0 -0
- /package/{dist/memory → packages/memory/dist}/types.js +0 -0
- /package/{dist/policy → packages/policy/dist}/agent-policy.d.ts +0 -0
- /package/{dist/policy → packages/policy/dist}/cloud-policy-fetcher.d.ts +0 -0
- /package/{dist/policy → packages/policy/dist}/cloud-policy-fetcher.js +0 -0
- /package/{dist/utils → packages/protocol/dist}/id-generator.d.ts +0 -0
- /package/{dist/utils → packages/protocol/dist}/id-generator.js +0 -0
- /package/{dist/protocol → packages/protocol/dist}/relay-pty-schemas.js +0 -0
- /package/{dist/resiliency → packages/resiliency/dist}/context-persistence.d.ts +0 -0
- /package/{dist/resiliency → packages/resiliency/dist}/context-persistence.js +0 -0
- /package/{dist/resiliency → packages/resiliency/dist}/crash-insights.d.ts +0 -0
- /package/{dist/resiliency → packages/resiliency/dist}/crash-insights.js +0 -0
- /package/{dist/resiliency → packages/resiliency/dist}/gossip-health.d.ts +0 -0
- /package/{dist/resiliency → packages/resiliency/dist}/gossip-health.js +0 -0
- /package/{dist/resiliency → packages/resiliency/dist}/health-monitor.d.ts +0 -0
- /package/{dist/resiliency → packages/resiliency/dist}/health-monitor.js +0 -0
- /package/{dist/resiliency → packages/resiliency/dist}/index.d.ts +0 -0
- /package/{dist/resiliency → packages/resiliency/dist}/index.js +0 -0
- /package/{dist/resiliency → packages/resiliency/dist}/leader-watchdog.d.ts +0 -0
- /package/{dist/resiliency → packages/resiliency/dist}/leader-watchdog.js +0 -0
- /package/{dist/resiliency → packages/resiliency/dist}/logger.d.ts +0 -0
- /package/{dist/resiliency → packages/resiliency/dist}/logger.js +0 -0
- /package/{dist/resiliency → packages/resiliency/dist}/memory-monitor.d.ts +0 -0
- /package/{dist/resiliency → packages/resiliency/dist}/metrics.d.ts +0 -0
- /package/{dist/resiliency → packages/resiliency/dist}/metrics.js +0 -0
- /package/{dist/resiliency → packages/resiliency/dist}/provider-context.js +0 -0
- /package/{dist/resiliency → packages/resiliency/dist}/stateless-lead.d.ts +0 -0
- /package/{dist/resiliency → packages/resiliency/dist}/stateless-lead.js +0 -0
- /package/{dist/resiliency → packages/resiliency/dist}/supervisor.d.ts +0 -0
- /package/{dist/resiliency → packages/resiliency/dist}/supervisor.js +0 -0
- /package/{dist/state → packages/state/dist}/agent-state.d.ts +0 -0
- /package/{dist/storage → packages/storage/dist}/adapter.js +0 -0
- /package/{dist/storage → packages/storage/dist}/dead-letter-queue.d.ts +0 -0
- /package/{dist/storage → packages/storage/dist}/dead-letter-queue.js +0 -0
- /package/{dist/storage → packages/storage/dist}/dlq-adapter.d.ts +0 -0
- /package/{dist/storage → packages/storage/dist}/dlq-adapter.js +0 -0
- /package/{dist/trajectory → packages/trajectory/dist}/integration.d.ts +0 -0
- /package/{dist/utils → packages/utils/dist}/command-resolver.d.ts +0 -0
- /package/{dist/utils → packages/utils/dist}/git-remote.d.ts +0 -0
- /package/{dist/utils → packages/utils/dist}/git-remote.js +0 -0
- /package/{dist/utils → packages/utils/dist}/logger.d.ts +0 -0
- /package/{dist/utils → packages/utils/dist}/logger.js +0 -0
- /package/{dist/utils → packages/utils/dist}/name-generator.d.ts +0 -0
- /package/{dist/utils → packages/utils/dist}/name-generator.js +0 -0
- /package/{dist/utils → packages/utils/dist}/precompiled-patterns.d.ts +0 -0
- /package/{dist/utils → packages/utils/dist}/precompiled-patterns.js +0 -0
- /package/{dist/utils → packages/utils/dist}/update-checker.d.ts +0 -0
- /package/{dist/utils → packages/utils/dist}/update-checker.js +0 -0
- /package/{dist/wrapper → packages/wrapper/dist}/auth-detection.d.ts +0 -0
- /package/{dist/wrapper → packages/wrapper/dist}/auth-detection.js +0 -0
- /package/{dist/wrapper → packages/wrapper/dist}/inbox.d.ts +0 -0
- /package/{dist/wrapper → packages/wrapper/dist}/inbox.js +0 -0
- /package/{dist/wrapper → packages/wrapper/dist}/prompt-composer.d.ts +0 -0
- /package/{dist/wrapper → packages/wrapper/dist}/prompt-composer.js +0 -0
- /package/{dist/utils → packages/wrapper/dist}/tmux-resolver.d.ts +0 -0
- /package/{dist/utils → packages/wrapper/dist}/tmux-resolver.js +0 -0
|
@@ -0,0 +1,1922 @@
|
|
|
1
|
+
# @agent-relay/mcp - Implementation Specification
|
|
2
|
+
|
|
3
|
+
> Comprehensive specification for the Agent Relay MCP Server package.
|
|
4
|
+
> This enables AI agents (Claude, Codex, Gemini, Cursor, etc.) to use Relay
|
|
5
|
+
> as a native tool for inter-agent communication.
|
|
6
|
+
|
|
7
|
+
## Overview
|
|
8
|
+
|
|
9
|
+
The MCP (Model Context Protocol) server provides AI agents with native tools to:
|
|
10
|
+
- Send messages to other agents, channels, or broadcast
|
|
11
|
+
- Spawn and release worker agents
|
|
12
|
+
- Check inbox for pending messages
|
|
13
|
+
- List online agents
|
|
14
|
+
- Query connection status
|
|
15
|
+
|
|
16
|
+
**Key Design Decisions:**
|
|
17
|
+
- Separate package: `@agent-relay/mcp` (not bundled with main agent-relay)
|
|
18
|
+
- Full protocol spec included in prompts (not abbreviated)
|
|
19
|
+
- Error if daemon not running (don't auto-start - user should know)
|
|
20
|
+
- Socket discovery with priority: env var → cwd → scan data dir
|
|
21
|
+
- Cloud: Pre-baked in Docker image for all CLI tools
|
|
22
|
+
- Local: Frictionless `npx` one-liner installation
|
|
23
|
+
|
|
24
|
+
---
|
|
25
|
+
|
|
26
|
+
## Package Structure
|
|
27
|
+
|
|
28
|
+
```
|
|
29
|
+
packages/mcp/
|
|
30
|
+
├── package.json
|
|
31
|
+
├── tsconfig.json
|
|
32
|
+
├── README.md
|
|
33
|
+
├── SPEC.md # This file
|
|
34
|
+
├── src/
|
|
35
|
+
│ ├── index.ts # MCP server entry point
|
|
36
|
+
│ ├── bin.ts # CLI binary entry (npx @agent-relay/mcp)
|
|
37
|
+
│ ├── install-cli.ts # Install command implementation
|
|
38
|
+
│ ├── install.ts # Editor installation logic
|
|
39
|
+
│ ├── tools/
|
|
40
|
+
│ │ ├── index.ts # Tool exports
|
|
41
|
+
│ │ ├── relay-send.ts # Send message tool
|
|
42
|
+
│ │ ├── relay-spawn.ts # Spawn agent tool
|
|
43
|
+
│ │ ├── relay-release.ts # Release agent tool
|
|
44
|
+
│ │ ├── relay-inbox.ts # Check inbox tool
|
|
45
|
+
│ │ ├── relay-who.ts # List agents tool
|
|
46
|
+
│ │ └── relay-status.ts # Connection status tool
|
|
47
|
+
│ ├── prompts/
|
|
48
|
+
│ │ ├── index.ts # Prompt exports
|
|
49
|
+
│ │ └── protocol.ts # Full protocol documentation
|
|
50
|
+
│ ├── resources/
|
|
51
|
+
│ │ ├── index.ts # Resource exports
|
|
52
|
+
│ │ ├── agents.ts # relay://agents resource
|
|
53
|
+
│ │ ├── inbox.ts # relay://inbox resource
|
|
54
|
+
│ │ └── project.ts # relay://project resource
|
|
55
|
+
│ ├── client.ts # Relay daemon connection client
|
|
56
|
+
│ ├── discover.ts # Socket/project discovery
|
|
57
|
+
│ └── errors.ts # Error types and messages
|
|
58
|
+
└── tests/
|
|
59
|
+
├── tools.test.ts
|
|
60
|
+
├── discover.test.ts
|
|
61
|
+
└── install.test.ts
|
|
62
|
+
```
|
|
63
|
+
|
|
64
|
+
---
|
|
65
|
+
|
|
66
|
+
## Package Configuration
|
|
67
|
+
|
|
68
|
+
### package.json
|
|
69
|
+
|
|
70
|
+
```json
|
|
71
|
+
{
|
|
72
|
+
"name": "@agent-relay/mcp",
|
|
73
|
+
"version": "0.1.0",
|
|
74
|
+
"description": "MCP server for Agent Relay - gives AI agents native relay tools",
|
|
75
|
+
"type": "module",
|
|
76
|
+
"main": "dist/index.js",
|
|
77
|
+
"types": "dist/index.d.ts",
|
|
78
|
+
"bin": {
|
|
79
|
+
"agent-relay-mcp": "./dist/bin.js"
|
|
80
|
+
},
|
|
81
|
+
"exports": {
|
|
82
|
+
".": {
|
|
83
|
+
"types": "./dist/index.d.ts",
|
|
84
|
+
"import": "./dist/index.js"
|
|
85
|
+
},
|
|
86
|
+
"./install": {
|
|
87
|
+
"types": "./dist/install.d.ts",
|
|
88
|
+
"import": "./dist/install.js"
|
|
89
|
+
}
|
|
90
|
+
},
|
|
91
|
+
"scripts": {
|
|
92
|
+
"build": "tsc",
|
|
93
|
+
"clean": "rm -rf dist",
|
|
94
|
+
"test": "vitest run",
|
|
95
|
+
"prepublishOnly": "npm run build"
|
|
96
|
+
},
|
|
97
|
+
"dependencies": {
|
|
98
|
+
"@anthropic-ai/sdk": "^0.52.0",
|
|
99
|
+
"@modelcontextprotocol/sdk": "^1.0.0",
|
|
100
|
+
"@agent-relay/protocol": "0.1.0"
|
|
101
|
+
},
|
|
102
|
+
"devDependencies": {
|
|
103
|
+
"@types/node": "^22.19.3",
|
|
104
|
+
"typescript": "^5.9.3",
|
|
105
|
+
"vitest": "^3.2.4"
|
|
106
|
+
},
|
|
107
|
+
"peerDependencies": {
|
|
108
|
+
"agent-relay": ">=0.1.0"
|
|
109
|
+
},
|
|
110
|
+
"peerDependenciesMeta": {
|
|
111
|
+
"agent-relay": {
|
|
112
|
+
"optional": true
|
|
113
|
+
}
|
|
114
|
+
},
|
|
115
|
+
"keywords": ["mcp", "agent-relay", "ai-agents", "claude", "cursor"],
|
|
116
|
+
"publishConfig": {
|
|
117
|
+
"access": "public"
|
|
118
|
+
}
|
|
119
|
+
}
|
|
120
|
+
```
|
|
121
|
+
|
|
122
|
+
---
|
|
123
|
+
|
|
124
|
+
## MCP Tools
|
|
125
|
+
|
|
126
|
+
### 1. relay_send
|
|
127
|
+
|
|
128
|
+
Send a message to another agent, channel, or broadcast.
|
|
129
|
+
|
|
130
|
+
```typescript
|
|
131
|
+
// src/tools/relay-send.ts
|
|
132
|
+
import { z } from 'zod';
|
|
133
|
+
import type { Tool } from '@modelcontextprotocol/sdk/types.js';
|
|
134
|
+
|
|
135
|
+
export const relaySendSchema = z.object({
|
|
136
|
+
to: z.string().describe(
|
|
137
|
+
'Target: agent name, #channel, or * for broadcast'
|
|
138
|
+
),
|
|
139
|
+
message: z.string().describe('Message content'),
|
|
140
|
+
thread: z.string().optional().describe('Optional thread ID for threaded conversations'),
|
|
141
|
+
await_response: z.boolean().optional().default(false).describe(
|
|
142
|
+
'If true, wait for a response (blocks until reply or timeout)'
|
|
143
|
+
),
|
|
144
|
+
timeout_ms: z.number().optional().default(30000).describe(
|
|
145
|
+
'Timeout in milliseconds when await_response is true'
|
|
146
|
+
),
|
|
147
|
+
});
|
|
148
|
+
|
|
149
|
+
export type RelaySendInput = z.infer<typeof relaySendSchema>;
|
|
150
|
+
|
|
151
|
+
export const relaySendTool: Tool = {
|
|
152
|
+
name: 'relay_send',
|
|
153
|
+
description: `Send a message via Agent Relay.
|
|
154
|
+
|
|
155
|
+
Examples:
|
|
156
|
+
- Direct message: to="Alice", message="Hello"
|
|
157
|
+
- Channel: to="#general", message="Team update"
|
|
158
|
+
- Broadcast: to="*", message="System notice"
|
|
159
|
+
- Threaded: to="Bob", message="Follow up", thread="task-123"
|
|
160
|
+
- Await reply: to="Worker", message="Process this", await_response=true`,
|
|
161
|
+
inputSchema: {
|
|
162
|
+
type: 'object',
|
|
163
|
+
properties: {
|
|
164
|
+
to: {
|
|
165
|
+
type: 'string',
|
|
166
|
+
description: 'Target: agent name, #channel, or * for broadcast',
|
|
167
|
+
},
|
|
168
|
+
message: {
|
|
169
|
+
type: 'string',
|
|
170
|
+
description: 'Message content',
|
|
171
|
+
},
|
|
172
|
+
thread: {
|
|
173
|
+
type: 'string',
|
|
174
|
+
description: 'Optional thread ID for threaded conversations',
|
|
175
|
+
},
|
|
176
|
+
await_response: {
|
|
177
|
+
type: 'boolean',
|
|
178
|
+
description: 'If true, wait for a response',
|
|
179
|
+
default: false,
|
|
180
|
+
},
|
|
181
|
+
timeout_ms: {
|
|
182
|
+
type: 'number',
|
|
183
|
+
description: 'Timeout in ms when await_response is true',
|
|
184
|
+
default: 30000,
|
|
185
|
+
},
|
|
186
|
+
},
|
|
187
|
+
required: ['to', 'message'],
|
|
188
|
+
},
|
|
189
|
+
};
|
|
190
|
+
|
|
191
|
+
export async function handleRelaySend(
|
|
192
|
+
client: RelayClient,
|
|
193
|
+
input: RelaySendInput
|
|
194
|
+
): Promise<string> {
|
|
195
|
+
const { to, message, thread, await_response, timeout_ms } = input;
|
|
196
|
+
|
|
197
|
+
if (await_response) {
|
|
198
|
+
const response = await client.sendAndWait(to, message, {
|
|
199
|
+
thread,
|
|
200
|
+
timeoutMs: timeout_ms,
|
|
201
|
+
});
|
|
202
|
+
return `Response from ${response.from}: ${response.content}`;
|
|
203
|
+
}
|
|
204
|
+
|
|
205
|
+
await client.send(to, message, { thread });
|
|
206
|
+
return `Message sent to ${to}`;
|
|
207
|
+
}
|
|
208
|
+
```
|
|
209
|
+
|
|
210
|
+
### 2. relay_spawn
|
|
211
|
+
|
|
212
|
+
Spawn a worker agent to handle a subtask.
|
|
213
|
+
|
|
214
|
+
```typescript
|
|
215
|
+
// src/tools/relay-spawn.ts
|
|
216
|
+
import { z } from 'zod';
|
|
217
|
+
import type { Tool } from '@modelcontextprotocol/sdk/types.js';
|
|
218
|
+
|
|
219
|
+
export const relaySpawnSchema = z.object({
|
|
220
|
+
name: z.string().describe('Unique name for the worker agent'),
|
|
221
|
+
cli: z.enum(['claude', 'codex', 'gemini', 'droid', 'opencode']).describe(
|
|
222
|
+
'CLI tool to use for the worker'
|
|
223
|
+
),
|
|
224
|
+
task: z.string().describe('Task description/prompt for the worker'),
|
|
225
|
+
model: z.string().optional().describe('Model override (e.g., "claude-3-5-sonnet")'),
|
|
226
|
+
cwd: z.string().optional().describe('Working directory for the worker'),
|
|
227
|
+
});
|
|
228
|
+
|
|
229
|
+
export type RelaySpawnInput = z.infer<typeof relaySpawnSchema>;
|
|
230
|
+
|
|
231
|
+
export const relaySpawnTool: Tool = {
|
|
232
|
+
name: 'relay_spawn',
|
|
233
|
+
description: `Spawn a worker agent to handle a subtask.
|
|
234
|
+
|
|
235
|
+
The worker runs in a separate process with its own CLI instance.
|
|
236
|
+
You'll receive a confirmation when the worker is ready.
|
|
237
|
+
|
|
238
|
+
Example:
|
|
239
|
+
name="TestRunner"
|
|
240
|
+
cli="claude"
|
|
241
|
+
task="Run the test suite and report failures"`,
|
|
242
|
+
inputSchema: {
|
|
243
|
+
type: 'object',
|
|
244
|
+
properties: {
|
|
245
|
+
name: {
|
|
246
|
+
type: 'string',
|
|
247
|
+
description: 'Unique name for the worker agent',
|
|
248
|
+
},
|
|
249
|
+
cli: {
|
|
250
|
+
type: 'string',
|
|
251
|
+
enum: ['claude', 'codex', 'gemini', 'droid', 'opencode'],
|
|
252
|
+
description: 'CLI tool to use',
|
|
253
|
+
},
|
|
254
|
+
task: {
|
|
255
|
+
type: 'string',
|
|
256
|
+
description: 'Task description for the worker',
|
|
257
|
+
},
|
|
258
|
+
model: {
|
|
259
|
+
type: 'string',
|
|
260
|
+
description: 'Optional model override',
|
|
261
|
+
},
|
|
262
|
+
cwd: {
|
|
263
|
+
type: 'string',
|
|
264
|
+
description: 'Working directory for the worker',
|
|
265
|
+
},
|
|
266
|
+
},
|
|
267
|
+
required: ['name', 'cli', 'task'],
|
|
268
|
+
},
|
|
269
|
+
};
|
|
270
|
+
|
|
271
|
+
export async function handleRelaySpawn(
|
|
272
|
+
client: RelayClient,
|
|
273
|
+
input: RelaySpawnInput
|
|
274
|
+
): Promise<string> {
|
|
275
|
+
const { name, cli, task, model, cwd } = input;
|
|
276
|
+
|
|
277
|
+
const result = await client.spawn({
|
|
278
|
+
name,
|
|
279
|
+
cli,
|
|
280
|
+
task,
|
|
281
|
+
model,
|
|
282
|
+
cwd,
|
|
283
|
+
});
|
|
284
|
+
|
|
285
|
+
if (result.success) {
|
|
286
|
+
return `Worker "${name}" spawned successfully. It will message you when ready.`;
|
|
287
|
+
} else {
|
|
288
|
+
return `Failed to spawn worker: ${result.error}`;
|
|
289
|
+
}
|
|
290
|
+
}
|
|
291
|
+
```
|
|
292
|
+
|
|
293
|
+
### 3. relay_release
|
|
294
|
+
|
|
295
|
+
Release (terminate) a worker agent.
|
|
296
|
+
|
|
297
|
+
```typescript
|
|
298
|
+
// src/tools/relay-release.ts
|
|
299
|
+
import { z } from 'zod';
|
|
300
|
+
import type { Tool } from '@modelcontextprotocol/sdk/types.js';
|
|
301
|
+
|
|
302
|
+
export const relayReleaseSchema = z.object({
|
|
303
|
+
name: z.string().describe('Name of the worker to release'),
|
|
304
|
+
reason: z.string().optional().describe('Optional reason for release'),
|
|
305
|
+
});
|
|
306
|
+
|
|
307
|
+
export type RelayReleaseInput = z.infer<typeof relayReleaseSchema>;
|
|
308
|
+
|
|
309
|
+
export const relayReleaseTool: Tool = {
|
|
310
|
+
name: 'relay_release',
|
|
311
|
+
description: `Release (terminate) a worker agent.
|
|
312
|
+
|
|
313
|
+
Use this when a worker has completed its task or is no longer needed.
|
|
314
|
+
The worker will be gracefully terminated.
|
|
315
|
+
|
|
316
|
+
Example:
|
|
317
|
+
name="TestRunner"
|
|
318
|
+
reason="Tests completed successfully"`,
|
|
319
|
+
inputSchema: {
|
|
320
|
+
type: 'object',
|
|
321
|
+
properties: {
|
|
322
|
+
name: {
|
|
323
|
+
type: 'string',
|
|
324
|
+
description: 'Name of the worker to release',
|
|
325
|
+
},
|
|
326
|
+
reason: {
|
|
327
|
+
type: 'string',
|
|
328
|
+
description: 'Optional reason for release',
|
|
329
|
+
},
|
|
330
|
+
},
|
|
331
|
+
required: ['name'],
|
|
332
|
+
},
|
|
333
|
+
};
|
|
334
|
+
|
|
335
|
+
export async function handleRelayRelease(
|
|
336
|
+
client: RelayClient,
|
|
337
|
+
input: RelayReleaseInput
|
|
338
|
+
): Promise<string> {
|
|
339
|
+
const { name, reason } = input;
|
|
340
|
+
|
|
341
|
+
const result = await client.release(name, reason);
|
|
342
|
+
|
|
343
|
+
if (result.success) {
|
|
344
|
+
return `Worker "${name}" released.`;
|
|
345
|
+
} else {
|
|
346
|
+
return `Failed to release worker: ${result.error}`;
|
|
347
|
+
}
|
|
348
|
+
}
|
|
349
|
+
```
|
|
350
|
+
|
|
351
|
+
### 4. relay_inbox
|
|
352
|
+
|
|
353
|
+
Check for pending messages in your inbox.
|
|
354
|
+
|
|
355
|
+
```typescript
|
|
356
|
+
// src/tools/relay-inbox.ts
|
|
357
|
+
import { z } from 'zod';
|
|
358
|
+
import type { Tool } from '@modelcontextprotocol/sdk/types.js';
|
|
359
|
+
|
|
360
|
+
export const relayInboxSchema = z.object({
|
|
361
|
+
limit: z.number().optional().default(10).describe('Max messages to return'),
|
|
362
|
+
unread_only: z.boolean().optional().default(true).describe('Only return unread messages'),
|
|
363
|
+
from: z.string().optional().describe('Filter by sender'),
|
|
364
|
+
channel: z.string().optional().describe('Filter by channel'),
|
|
365
|
+
});
|
|
366
|
+
|
|
367
|
+
export type RelayInboxInput = z.infer<typeof relayInboxSchema>;
|
|
368
|
+
|
|
369
|
+
export const relayInboxTool: Tool = {
|
|
370
|
+
name: 'relay_inbox',
|
|
371
|
+
description: `Check your inbox for pending messages.
|
|
372
|
+
|
|
373
|
+
Returns messages sent to you by other agents or in channels you're subscribed to.
|
|
374
|
+
|
|
375
|
+
Examples:
|
|
376
|
+
- Get all unread: (no params)
|
|
377
|
+
- From specific agent: from="Alice"
|
|
378
|
+
- From channel: channel="#general"`,
|
|
379
|
+
inputSchema: {
|
|
380
|
+
type: 'object',
|
|
381
|
+
properties: {
|
|
382
|
+
limit: {
|
|
383
|
+
type: 'number',
|
|
384
|
+
description: 'Max messages to return',
|
|
385
|
+
default: 10,
|
|
386
|
+
},
|
|
387
|
+
unread_only: {
|
|
388
|
+
type: 'boolean',
|
|
389
|
+
description: 'Only return unread messages',
|
|
390
|
+
default: true,
|
|
391
|
+
},
|
|
392
|
+
from: {
|
|
393
|
+
type: 'string',
|
|
394
|
+
description: 'Filter by sender',
|
|
395
|
+
},
|
|
396
|
+
channel: {
|
|
397
|
+
type: 'string',
|
|
398
|
+
description: 'Filter by channel',
|
|
399
|
+
},
|
|
400
|
+
},
|
|
401
|
+
required: [],
|
|
402
|
+
},
|
|
403
|
+
};
|
|
404
|
+
|
|
405
|
+
export async function handleRelayInbox(
|
|
406
|
+
client: RelayClient,
|
|
407
|
+
input: RelayInboxInput
|
|
408
|
+
): Promise<string> {
|
|
409
|
+
const messages = await client.getInbox(input);
|
|
410
|
+
|
|
411
|
+
if (messages.length === 0) {
|
|
412
|
+
return 'No messages in inbox.';
|
|
413
|
+
}
|
|
414
|
+
|
|
415
|
+
const formatted = messages.map((m) => {
|
|
416
|
+
const channel = m.channel ? ` [${m.channel}]` : '';
|
|
417
|
+
const thread = m.thread ? ` (thread: ${m.thread})` : '';
|
|
418
|
+
return `[${m.id}] From ${m.from}${channel}${thread}:\n${m.content}`;
|
|
419
|
+
});
|
|
420
|
+
|
|
421
|
+
return `${messages.length} message(s):\n\n${formatted.join('\n\n---\n\n')}`;
|
|
422
|
+
}
|
|
423
|
+
```
|
|
424
|
+
|
|
425
|
+
### 5. relay_who
|
|
426
|
+
|
|
427
|
+
List online agents and their status.
|
|
428
|
+
|
|
429
|
+
```typescript
|
|
430
|
+
// src/tools/relay-who.ts
|
|
431
|
+
import { z } from 'zod';
|
|
432
|
+
import type { Tool } from '@modelcontextprotocol/sdk/types.js';
|
|
433
|
+
|
|
434
|
+
export const relayWhoSchema = z.object({
|
|
435
|
+
include_idle: z.boolean().optional().default(true).describe('Include idle agents'),
|
|
436
|
+
project: z.string().optional().describe('Filter by project (for multi-project setups)'),
|
|
437
|
+
});
|
|
438
|
+
|
|
439
|
+
export type RelayWhoInput = z.infer<typeof relayWhoSchema>;
|
|
440
|
+
|
|
441
|
+
export const relayWhoTool: Tool = {
|
|
442
|
+
name: 'relay_who',
|
|
443
|
+
description: `List online agents in the relay network.
|
|
444
|
+
|
|
445
|
+
Shows agent names, their CLI type, and current status.
|
|
446
|
+
|
|
447
|
+
Example output:
|
|
448
|
+
- Alice (claude) - active
|
|
449
|
+
- Bob (codex) - idle
|
|
450
|
+
- TestRunner (claude) - active [worker of: Alice]`,
|
|
451
|
+
inputSchema: {
|
|
452
|
+
type: 'object',
|
|
453
|
+
properties: {
|
|
454
|
+
include_idle: {
|
|
455
|
+
type: 'boolean',
|
|
456
|
+
description: 'Include idle agents',
|
|
457
|
+
default: true,
|
|
458
|
+
},
|
|
459
|
+
project: {
|
|
460
|
+
type: 'string',
|
|
461
|
+
description: 'Filter by project',
|
|
462
|
+
},
|
|
463
|
+
},
|
|
464
|
+
required: [],
|
|
465
|
+
},
|
|
466
|
+
};
|
|
467
|
+
|
|
468
|
+
export async function handleRelayWho(
|
|
469
|
+
client: RelayClient,
|
|
470
|
+
input: RelayWhoInput
|
|
471
|
+
): Promise<string> {
|
|
472
|
+
const agents = await client.listAgents(input);
|
|
473
|
+
|
|
474
|
+
if (agents.length === 0) {
|
|
475
|
+
return 'No agents online.';
|
|
476
|
+
}
|
|
477
|
+
|
|
478
|
+
const formatted = agents.map((a) => {
|
|
479
|
+
const status = a.idle ? 'idle' : 'active';
|
|
480
|
+
const worker = a.parent ? ` [worker of: ${a.parent}]` : '';
|
|
481
|
+
return `- ${a.name} (${a.cli}) - ${status}${worker}`;
|
|
482
|
+
});
|
|
483
|
+
|
|
484
|
+
return `${agents.length} agent(s) online:\n${formatted.join('\n')}`;
|
|
485
|
+
}
|
|
486
|
+
```
|
|
487
|
+
|
|
488
|
+
### 6. relay_status
|
|
489
|
+
|
|
490
|
+
Get connection status and diagnostics.
|
|
491
|
+
|
|
492
|
+
```typescript
|
|
493
|
+
// src/tools/relay-status.ts
|
|
494
|
+
import { z } from 'zod';
|
|
495
|
+
import type { Tool } from '@modelcontextprotocol/sdk/types.js';
|
|
496
|
+
|
|
497
|
+
export const relayStatusSchema = z.object({});
|
|
498
|
+
|
|
499
|
+
export type RelayStatusInput = z.infer<typeof relayStatusSchema>;
|
|
500
|
+
|
|
501
|
+
export const relayStatusTool: Tool = {
|
|
502
|
+
name: 'relay_status',
|
|
503
|
+
description: `Get relay connection status and diagnostics.
|
|
504
|
+
|
|
505
|
+
Returns:
|
|
506
|
+
- Connection state (connected/disconnected)
|
|
507
|
+
- Your agent name
|
|
508
|
+
- Project/socket info
|
|
509
|
+
- Daemon version`,
|
|
510
|
+
inputSchema: {
|
|
511
|
+
type: 'object',
|
|
512
|
+
properties: {},
|
|
513
|
+
required: [],
|
|
514
|
+
},
|
|
515
|
+
};
|
|
516
|
+
|
|
517
|
+
export async function handleRelayStatus(
|
|
518
|
+
client: RelayClient,
|
|
519
|
+
_input: RelayStatusInput
|
|
520
|
+
): Promise<string> {
|
|
521
|
+
const status = await client.getStatus();
|
|
522
|
+
|
|
523
|
+
return `Relay Status:
|
|
524
|
+
- Connected: ${status.connected ? 'Yes' : 'No'}
|
|
525
|
+
- Agent Name: ${status.agentName || 'Not registered'}
|
|
526
|
+
- Project: ${status.project || 'Unknown'}
|
|
527
|
+
- Socket: ${status.socketPath}
|
|
528
|
+
- Daemon Version: ${status.daemonVersion || 'Unknown'}
|
|
529
|
+
- Uptime: ${status.uptime || 'N/A'}`;
|
|
530
|
+
}
|
|
531
|
+
```
|
|
532
|
+
|
|
533
|
+
---
|
|
534
|
+
|
|
535
|
+
## MCP Prompts
|
|
536
|
+
|
|
537
|
+
### Protocol Documentation Prompt
|
|
538
|
+
|
|
539
|
+
This prompt is included automatically when an agent connects. It provides the full protocol documentation.
|
|
540
|
+
|
|
541
|
+
```typescript
|
|
542
|
+
// src/prompts/protocol.ts
|
|
543
|
+
import type { Prompt } from '@modelcontextprotocol/sdk/types.js';
|
|
544
|
+
|
|
545
|
+
export const protocolPrompt: Prompt = {
|
|
546
|
+
name: 'relay_protocol',
|
|
547
|
+
description: 'Full Agent Relay protocol documentation',
|
|
548
|
+
arguments: [],
|
|
549
|
+
};
|
|
550
|
+
|
|
551
|
+
export const PROTOCOL_DOCUMENTATION = `
|
|
552
|
+
# Agent Relay Protocol
|
|
553
|
+
|
|
554
|
+
You are connected to Agent Relay, a real-time messaging system for AI agent coordination.
|
|
555
|
+
|
|
556
|
+
## Communication Patterns
|
|
557
|
+
|
|
558
|
+
### Direct Messages
|
|
559
|
+
Send a message to a specific agent by name:
|
|
560
|
+
\`\`\`
|
|
561
|
+
relay_send(to="Alice", message="Can you review this PR?")
|
|
562
|
+
\`\`\`
|
|
563
|
+
|
|
564
|
+
### Channel Messages
|
|
565
|
+
Send to a channel (prefix with #):
|
|
566
|
+
\`\`\`
|
|
567
|
+
relay_send(to="#engineering", message="Build complete")
|
|
568
|
+
\`\`\`
|
|
569
|
+
Channel messages are visible to all agents subscribed to that channel.
|
|
570
|
+
|
|
571
|
+
### Broadcast
|
|
572
|
+
Send to all online agents:
|
|
573
|
+
\`\`\`
|
|
574
|
+
relay_send(to="*", message="System maintenance in 5 minutes")
|
|
575
|
+
\`\`\`
|
|
576
|
+
Use sparingly - broadcasts interrupt all agents.
|
|
577
|
+
|
|
578
|
+
### Threaded Conversations
|
|
579
|
+
For multi-turn conversations, use thread IDs:
|
|
580
|
+
\`\`\`
|
|
581
|
+
relay_send(to="Bob", message="Starting task", thread="task-123")
|
|
582
|
+
relay_send(to="Bob", message="Task update", thread="task-123")
|
|
583
|
+
\`\`\`
|
|
584
|
+
|
|
585
|
+
### Await Response
|
|
586
|
+
Block and wait for a reply:
|
|
587
|
+
\`\`\`
|
|
588
|
+
relay_send(to="Worker", message="Process this file", await_response=true, timeout_ms=60000)
|
|
589
|
+
\`\`\`
|
|
590
|
+
|
|
591
|
+
## Spawning Workers
|
|
592
|
+
|
|
593
|
+
Create worker agents to parallelize work:
|
|
594
|
+
|
|
595
|
+
\`\`\`
|
|
596
|
+
relay_spawn(
|
|
597
|
+
name="TestRunner",
|
|
598
|
+
cli="claude",
|
|
599
|
+
task="Run the test suite in src/tests/ and report any failures"
|
|
600
|
+
)
|
|
601
|
+
\`\`\`
|
|
602
|
+
|
|
603
|
+
Workers:
|
|
604
|
+
- Run in separate processes
|
|
605
|
+
- Have their own CLI instance
|
|
606
|
+
- Can use relay to communicate back
|
|
607
|
+
- Should be released when done
|
|
608
|
+
|
|
609
|
+
### Worker Lifecycle
|
|
610
|
+
1. Spawn worker with task
|
|
611
|
+
2. Worker sends ACK when ready
|
|
612
|
+
3. Worker sends progress updates
|
|
613
|
+
4. Worker sends DONE when complete
|
|
614
|
+
5. Lead releases worker
|
|
615
|
+
|
|
616
|
+
### Release Workers
|
|
617
|
+
\`\`\`
|
|
618
|
+
relay_release(name="TestRunner", reason="Tests completed")
|
|
619
|
+
\`\`\`
|
|
620
|
+
|
|
621
|
+
## Message Protocol
|
|
622
|
+
|
|
623
|
+
When you receive messages, they follow this format:
|
|
624
|
+
\`\`\`
|
|
625
|
+
Relay message from Alice [msg-id-123]: Content here
|
|
626
|
+
\`\`\`
|
|
627
|
+
|
|
628
|
+
Channel messages include the channel:
|
|
629
|
+
\`\`\`
|
|
630
|
+
Relay message from Alice [msg-id-456] [#general]: Hello team!
|
|
631
|
+
\`\`\`
|
|
632
|
+
|
|
633
|
+
### ACK/DONE Protocol
|
|
634
|
+
When assigned a task:
|
|
635
|
+
1. Send ACK immediately: "ACK: Starting work on X"
|
|
636
|
+
2. Send progress updates as needed
|
|
637
|
+
3. Send DONE when complete: "DONE: Completed X with result Y"
|
|
638
|
+
|
|
639
|
+
Example:
|
|
640
|
+
\`\`\`
|
|
641
|
+
# When receiving a task
|
|
642
|
+
relay_send(to="Lead", message="ACK: Starting test suite run")
|
|
643
|
+
|
|
644
|
+
# ... do work ...
|
|
645
|
+
|
|
646
|
+
relay_send(to="Lead", message="DONE: All 42 tests passed")
|
|
647
|
+
\`\`\`
|
|
648
|
+
|
|
649
|
+
## Best Practices
|
|
650
|
+
|
|
651
|
+
### For Lead Agents
|
|
652
|
+
- Spawn workers for parallelizable tasks
|
|
653
|
+
- Keep track of spawned workers
|
|
654
|
+
- Release workers when done
|
|
655
|
+
- Use channels for team announcements
|
|
656
|
+
|
|
657
|
+
### For Worker Agents
|
|
658
|
+
- ACK immediately when receiving tasks
|
|
659
|
+
- Send progress updates for long tasks
|
|
660
|
+
- Send DONE with results when complete
|
|
661
|
+
- Ask clarifying questions if needed
|
|
662
|
+
|
|
663
|
+
### Message Etiquette
|
|
664
|
+
- Keep messages concise
|
|
665
|
+
- Include relevant context
|
|
666
|
+
- Use threads for related messages
|
|
667
|
+
- Don't spam broadcasts
|
|
668
|
+
|
|
669
|
+
## Checking Messages
|
|
670
|
+
|
|
671
|
+
Proactively check your inbox:
|
|
672
|
+
\`\`\`
|
|
673
|
+
relay_inbox()
|
|
674
|
+
relay_inbox(from="Lead")
|
|
675
|
+
relay_inbox(channel="#urgent")
|
|
676
|
+
\`\`\`
|
|
677
|
+
|
|
678
|
+
## Seeing Who's Online
|
|
679
|
+
|
|
680
|
+
\`\`\`
|
|
681
|
+
relay_who()
|
|
682
|
+
\`\`\`
|
|
683
|
+
|
|
684
|
+
## Error Handling
|
|
685
|
+
|
|
686
|
+
If relay returns an error:
|
|
687
|
+
- "Daemon not running" - The relay daemon needs to be started
|
|
688
|
+
- "Agent not found" - Target agent is offline
|
|
689
|
+
- "Channel not found" - Channel doesn't exist
|
|
690
|
+
- "Timeout" - No response within timeout period
|
|
691
|
+
|
|
692
|
+
## Multi-Project Communication
|
|
693
|
+
|
|
694
|
+
In multi-project setups, specify project:
|
|
695
|
+
\`\`\`
|
|
696
|
+
relay_send(to="frontend:Designer", message="Need UI mockup")
|
|
697
|
+
\`\`\`
|
|
698
|
+
|
|
699
|
+
Special targets:
|
|
700
|
+
- \`project:lead\` - Lead agent of that project
|
|
701
|
+
- \`project:*\` - Broadcast to project
|
|
702
|
+
- \`*:*\` - Broadcast to all projects
|
|
703
|
+
`;
|
|
704
|
+
|
|
705
|
+
export function getProtocolPrompt(): string {
|
|
706
|
+
return PROTOCOL_DOCUMENTATION;
|
|
707
|
+
}
|
|
708
|
+
```
|
|
709
|
+
|
|
710
|
+
---
|
|
711
|
+
|
|
712
|
+
## MCP Resources
|
|
713
|
+
|
|
714
|
+
### relay://agents
|
|
715
|
+
|
|
716
|
+
Live list of online agents.
|
|
717
|
+
|
|
718
|
+
```typescript
|
|
719
|
+
// src/resources/agents.ts
|
|
720
|
+
import type { Resource } from '@modelcontextprotocol/sdk/types.js';
|
|
721
|
+
|
|
722
|
+
export const agentsResource: Resource = {
|
|
723
|
+
uri: 'relay://agents',
|
|
724
|
+
name: 'Online Agents',
|
|
725
|
+
description: 'Live list of agents currently connected to relay',
|
|
726
|
+
mimeType: 'application/json',
|
|
727
|
+
};
|
|
728
|
+
|
|
729
|
+
export async function getAgentsResource(client: RelayClient): Promise<string> {
|
|
730
|
+
const agents = await client.listAgents({ include_idle: true });
|
|
731
|
+
return JSON.stringify(agents, null, 2);
|
|
732
|
+
}
|
|
733
|
+
```
|
|
734
|
+
|
|
735
|
+
### relay://inbox
|
|
736
|
+
|
|
737
|
+
Current inbox contents.
|
|
738
|
+
|
|
739
|
+
```typescript
|
|
740
|
+
// src/resources/inbox.ts
|
|
741
|
+
import type { Resource } from '@modelcontextprotocol/sdk/types.js';
|
|
742
|
+
|
|
743
|
+
export const inboxResource: Resource = {
|
|
744
|
+
uri: 'relay://inbox',
|
|
745
|
+
name: 'Message Inbox',
|
|
746
|
+
description: 'Your pending messages',
|
|
747
|
+
mimeType: 'application/json',
|
|
748
|
+
};
|
|
749
|
+
|
|
750
|
+
export async function getInboxResource(client: RelayClient): Promise<string> {
|
|
751
|
+
const messages = await client.getInbox({ unread_only: true, limit: 50 });
|
|
752
|
+
return JSON.stringify(messages, null, 2);
|
|
753
|
+
}
|
|
754
|
+
```
|
|
755
|
+
|
|
756
|
+
### relay://project
|
|
757
|
+
|
|
758
|
+
Current project configuration.
|
|
759
|
+
|
|
760
|
+
```typescript
|
|
761
|
+
// src/resources/project.ts
|
|
762
|
+
import type { Resource } from '@modelcontextprotocol/sdk/types.js';
|
|
763
|
+
|
|
764
|
+
export const projectResource: Resource = {
|
|
765
|
+
uri: 'relay://project',
|
|
766
|
+
name: 'Project Info',
|
|
767
|
+
description: 'Current relay project configuration',
|
|
768
|
+
mimeType: 'application/json',
|
|
769
|
+
};
|
|
770
|
+
|
|
771
|
+
export async function getProjectResource(client: RelayClient): Promise<string> {
|
|
772
|
+
const status = await client.getStatus();
|
|
773
|
+
return JSON.stringify({
|
|
774
|
+
project: status.project,
|
|
775
|
+
socketPath: status.socketPath,
|
|
776
|
+
daemonVersion: status.daemonVersion,
|
|
777
|
+
}, null, 2);
|
|
778
|
+
}
|
|
779
|
+
```
|
|
780
|
+
|
|
781
|
+
---
|
|
782
|
+
|
|
783
|
+
## Socket Discovery
|
|
784
|
+
|
|
785
|
+
The MCP server must find the relay daemon socket. Priority order:
|
|
786
|
+
|
|
787
|
+
```typescript
|
|
788
|
+
// src/discover.ts
|
|
789
|
+
import { existsSync, readdirSync, readFileSync } from 'node:fs';
|
|
790
|
+
import { join } from 'node:path';
|
|
791
|
+
import { homedir } from 'node:os';
|
|
792
|
+
|
|
793
|
+
export interface DiscoveryResult {
|
|
794
|
+
socketPath: string;
|
|
795
|
+
project: string;
|
|
796
|
+
source: 'env' | 'cwd' | 'scan';
|
|
797
|
+
}
|
|
798
|
+
|
|
799
|
+
/**
|
|
800
|
+
* Discover relay daemon socket.
|
|
801
|
+
*
|
|
802
|
+
* Priority:
|
|
803
|
+
* 1. RELAY_SOCKET environment variable (explicit path)
|
|
804
|
+
* 2. RELAY_PROJECT environment variable (project name → data dir)
|
|
805
|
+
* 3. Current working directory .relay/config.json
|
|
806
|
+
* 4. Scan data directory for active sockets
|
|
807
|
+
*/
|
|
808
|
+
export function discoverSocket(): DiscoveryResult | null {
|
|
809
|
+
// 1. Explicit socket path
|
|
810
|
+
const socketEnv = process.env.RELAY_SOCKET;
|
|
811
|
+
if (socketEnv && existsSync(socketEnv)) {
|
|
812
|
+
return {
|
|
813
|
+
socketPath: socketEnv,
|
|
814
|
+
project: process.env.RELAY_PROJECT || 'unknown',
|
|
815
|
+
source: 'env',
|
|
816
|
+
};
|
|
817
|
+
}
|
|
818
|
+
|
|
819
|
+
// 2. Project name → data dir lookup
|
|
820
|
+
const projectEnv = process.env.RELAY_PROJECT;
|
|
821
|
+
if (projectEnv) {
|
|
822
|
+
const dataDir = getDataDir();
|
|
823
|
+
const projectSocket = join(dataDir, 'projects', projectEnv, 'daemon.sock');
|
|
824
|
+
if (existsSync(projectSocket)) {
|
|
825
|
+
return {
|
|
826
|
+
socketPath: projectSocket,
|
|
827
|
+
project: projectEnv,
|
|
828
|
+
source: 'env',
|
|
829
|
+
};
|
|
830
|
+
}
|
|
831
|
+
}
|
|
832
|
+
|
|
833
|
+
// 3. Current working directory config
|
|
834
|
+
const cwdConfig = join(process.cwd(), '.relay', 'config.json');
|
|
835
|
+
if (existsSync(cwdConfig)) {
|
|
836
|
+
try {
|
|
837
|
+
const config = JSON.parse(readFileSync(cwdConfig, 'utf-8'));
|
|
838
|
+
if (config.socketPath && existsSync(config.socketPath)) {
|
|
839
|
+
return {
|
|
840
|
+
socketPath: config.socketPath,
|
|
841
|
+
project: config.project || 'local',
|
|
842
|
+
source: 'cwd',
|
|
843
|
+
};
|
|
844
|
+
}
|
|
845
|
+
} catch {
|
|
846
|
+
// Invalid config, continue
|
|
847
|
+
}
|
|
848
|
+
}
|
|
849
|
+
|
|
850
|
+
// 4. Scan data directory for active sockets
|
|
851
|
+
const dataDir = getDataDir();
|
|
852
|
+
const projectsDir = join(dataDir, 'projects');
|
|
853
|
+
|
|
854
|
+
if (existsSync(projectsDir)) {
|
|
855
|
+
const projects = readdirSync(projectsDir, { withFileTypes: true })
|
|
856
|
+
.filter(d => d.isDirectory())
|
|
857
|
+
.map(d => d.name);
|
|
858
|
+
|
|
859
|
+
for (const project of projects) {
|
|
860
|
+
const socketPath = join(projectsDir, project, 'daemon.sock');
|
|
861
|
+
if (existsSync(socketPath)) {
|
|
862
|
+
return {
|
|
863
|
+
socketPath,
|
|
864
|
+
project,
|
|
865
|
+
source: 'scan',
|
|
866
|
+
};
|
|
867
|
+
}
|
|
868
|
+
}
|
|
869
|
+
}
|
|
870
|
+
|
|
871
|
+
return null;
|
|
872
|
+
}
|
|
873
|
+
|
|
874
|
+
function getDataDir(): string {
|
|
875
|
+
// Platform-specific data directory
|
|
876
|
+
const platform = process.platform;
|
|
877
|
+
|
|
878
|
+
if (platform === 'darwin') {
|
|
879
|
+
return join(homedir(), 'Library', 'Application Support', 'agent-relay');
|
|
880
|
+
} else if (platform === 'win32') {
|
|
881
|
+
return join(process.env.APPDATA || homedir(), 'agent-relay');
|
|
882
|
+
} else {
|
|
883
|
+
return join(process.env.XDG_DATA_HOME || join(homedir(), '.local', 'share'), 'agent-relay');
|
|
884
|
+
}
|
|
885
|
+
}
|
|
886
|
+
```
|
|
887
|
+
|
|
888
|
+
---
|
|
889
|
+
|
|
890
|
+
## Relay Client
|
|
891
|
+
|
|
892
|
+
Connection to the daemon:
|
|
893
|
+
|
|
894
|
+
```typescript
|
|
895
|
+
// src/client.ts
|
|
896
|
+
import { connect, type Socket } from 'node:net';
|
|
897
|
+
import { EventEmitter } from 'node:events';
|
|
898
|
+
import { FrameParser, encodeFrame } from '@agent-relay/protocol/framing';
|
|
899
|
+
import type { Envelope } from '@agent-relay/protocol/types';
|
|
900
|
+
import { discoverSocket, type DiscoveryResult } from './discover.js';
|
|
901
|
+
import { RelayError, DaemonNotRunningError } from './errors.js';
|
|
902
|
+
|
|
903
|
+
export interface RelayClientOptions {
|
|
904
|
+
agentName?: string;
|
|
905
|
+
autoConnect?: boolean;
|
|
906
|
+
}
|
|
907
|
+
|
|
908
|
+
export class RelayClient extends EventEmitter {
|
|
909
|
+
private socket: Socket | null = null;
|
|
910
|
+
private parser: FrameParser;
|
|
911
|
+
private discovery: DiscoveryResult | null = null;
|
|
912
|
+
private agentName: string;
|
|
913
|
+
private connected = false;
|
|
914
|
+
private messageHandlers = new Map<string, (response: any) => void>();
|
|
915
|
+
|
|
916
|
+
constructor(options: RelayClientOptions = {}) {
|
|
917
|
+
super();
|
|
918
|
+
this.parser = new FrameParser();
|
|
919
|
+
this.agentName = options.agentName || `mcp-${process.pid}`;
|
|
920
|
+
|
|
921
|
+
if (options.autoConnect !== false) {
|
|
922
|
+
this.connect();
|
|
923
|
+
}
|
|
924
|
+
}
|
|
925
|
+
|
|
926
|
+
async connect(): Promise<void> {
|
|
927
|
+
this.discovery = discoverSocket();
|
|
928
|
+
|
|
929
|
+
if (!this.discovery) {
|
|
930
|
+
throw new DaemonNotRunningError(
|
|
931
|
+
'Relay daemon not running. Start with: agent-relay daemon start'
|
|
932
|
+
);
|
|
933
|
+
}
|
|
934
|
+
|
|
935
|
+
return new Promise((resolve, reject) => {
|
|
936
|
+
this.socket = connect(this.discovery!.socketPath);
|
|
937
|
+
|
|
938
|
+
this.socket.on('connect', () => {
|
|
939
|
+
this.connected = true;
|
|
940
|
+
this.handshake();
|
|
941
|
+
resolve();
|
|
942
|
+
});
|
|
943
|
+
|
|
944
|
+
this.socket.on('data', (data) => {
|
|
945
|
+
this.parser.push(data);
|
|
946
|
+
let frame;
|
|
947
|
+
while ((frame = this.parser.read())) {
|
|
948
|
+
this.handleFrame(frame);
|
|
949
|
+
}
|
|
950
|
+
});
|
|
951
|
+
|
|
952
|
+
this.socket.on('error', (err) => {
|
|
953
|
+
if (!this.connected) {
|
|
954
|
+
reject(new DaemonNotRunningError(
|
|
955
|
+
`Cannot connect to relay daemon: ${err.message}`
|
|
956
|
+
));
|
|
957
|
+
} else {
|
|
958
|
+
this.emit('error', err);
|
|
959
|
+
}
|
|
960
|
+
});
|
|
961
|
+
|
|
962
|
+
this.socket.on('close', () => {
|
|
963
|
+
this.connected = false;
|
|
964
|
+
this.emit('disconnect');
|
|
965
|
+
});
|
|
966
|
+
});
|
|
967
|
+
}
|
|
968
|
+
|
|
969
|
+
private handshake(): void {
|
|
970
|
+
this.sendEnvelope({
|
|
971
|
+
v: 1,
|
|
972
|
+
type: 'HELLO',
|
|
973
|
+
id: crypto.randomUUID(),
|
|
974
|
+
ts: Date.now(),
|
|
975
|
+
payload: {
|
|
976
|
+
name: this.agentName,
|
|
977
|
+
capabilities: ['mcp'],
|
|
978
|
+
},
|
|
979
|
+
});
|
|
980
|
+
}
|
|
981
|
+
|
|
982
|
+
private handleFrame(envelope: Envelope): void {
|
|
983
|
+
switch (envelope.type) {
|
|
984
|
+
case 'WELCOME':
|
|
985
|
+
this.emit('ready');
|
|
986
|
+
break;
|
|
987
|
+
case 'DELIVER':
|
|
988
|
+
this.emit('message', envelope.payload);
|
|
989
|
+
break;
|
|
990
|
+
case 'ACK':
|
|
991
|
+
const handler = this.messageHandlers.get(envelope.payload.id);
|
|
992
|
+
if (handler) {
|
|
993
|
+
handler(envelope.payload);
|
|
994
|
+
this.messageHandlers.delete(envelope.payload.id);
|
|
995
|
+
}
|
|
996
|
+
break;
|
|
997
|
+
case 'ERROR':
|
|
998
|
+
this.emit('error', new RelayError(envelope.payload.message));
|
|
999
|
+
break;
|
|
1000
|
+
}
|
|
1001
|
+
}
|
|
1002
|
+
|
|
1003
|
+
private sendEnvelope(envelope: Envelope): void {
|
|
1004
|
+
if (!this.socket || !this.connected) {
|
|
1005
|
+
throw new RelayError('Not connected to relay daemon');
|
|
1006
|
+
}
|
|
1007
|
+
this.socket.write(encodeFrame(envelope));
|
|
1008
|
+
}
|
|
1009
|
+
|
|
1010
|
+
async send(
|
|
1011
|
+
to: string,
|
|
1012
|
+
message: string,
|
|
1013
|
+
options: { thread?: string } = {}
|
|
1014
|
+
): Promise<void> {
|
|
1015
|
+
const id = crypto.randomUUID();
|
|
1016
|
+
|
|
1017
|
+
this.sendEnvelope({
|
|
1018
|
+
v: 1,
|
|
1019
|
+
type: 'SEND',
|
|
1020
|
+
id,
|
|
1021
|
+
ts: Date.now(),
|
|
1022
|
+
payload: {
|
|
1023
|
+
to,
|
|
1024
|
+
content: message,
|
|
1025
|
+
thread: options.thread,
|
|
1026
|
+
},
|
|
1027
|
+
});
|
|
1028
|
+
}
|
|
1029
|
+
|
|
1030
|
+
async sendAndWait(
|
|
1031
|
+
to: string,
|
|
1032
|
+
message: string,
|
|
1033
|
+
options: { thread?: string; timeoutMs?: number } = {}
|
|
1034
|
+
): Promise<{ from: string; content: string }> {
|
|
1035
|
+
const timeoutMs = options.timeoutMs || 30000;
|
|
1036
|
+
|
|
1037
|
+
return new Promise((resolve, reject) => {
|
|
1038
|
+
const timeout = setTimeout(() => {
|
|
1039
|
+
reject(new RelayError(`Timeout waiting for response from ${to}`));
|
|
1040
|
+
}, timeoutMs);
|
|
1041
|
+
|
|
1042
|
+
const handler = (msg: any) => {
|
|
1043
|
+
if (msg.from === to || msg.thread === options.thread) {
|
|
1044
|
+
clearTimeout(timeout);
|
|
1045
|
+
this.off('message', handler);
|
|
1046
|
+
resolve(msg);
|
|
1047
|
+
}
|
|
1048
|
+
};
|
|
1049
|
+
|
|
1050
|
+
this.on('message', handler);
|
|
1051
|
+
this.send(to, message, options);
|
|
1052
|
+
});
|
|
1053
|
+
}
|
|
1054
|
+
|
|
1055
|
+
async spawn(options: {
|
|
1056
|
+
name: string;
|
|
1057
|
+
cli: string;
|
|
1058
|
+
task: string;
|
|
1059
|
+
model?: string;
|
|
1060
|
+
cwd?: string;
|
|
1061
|
+
}): Promise<{ success: boolean; error?: string }> {
|
|
1062
|
+
const id = crypto.randomUUID();
|
|
1063
|
+
|
|
1064
|
+
this.sendEnvelope({
|
|
1065
|
+
v: 1,
|
|
1066
|
+
type: 'SPAWN',
|
|
1067
|
+
id,
|
|
1068
|
+
ts: Date.now(),
|
|
1069
|
+
payload: options,
|
|
1070
|
+
});
|
|
1071
|
+
|
|
1072
|
+
// Wait for ACK
|
|
1073
|
+
return new Promise((resolve) => {
|
|
1074
|
+
this.messageHandlers.set(id, (response) => {
|
|
1075
|
+
resolve({ success: response.success, error: response.error });
|
|
1076
|
+
});
|
|
1077
|
+
});
|
|
1078
|
+
}
|
|
1079
|
+
|
|
1080
|
+
async release(
|
|
1081
|
+
name: string,
|
|
1082
|
+
reason?: string
|
|
1083
|
+
): Promise<{ success: boolean; error?: string }> {
|
|
1084
|
+
const id = crypto.randomUUID();
|
|
1085
|
+
|
|
1086
|
+
this.sendEnvelope({
|
|
1087
|
+
v: 1,
|
|
1088
|
+
type: 'RELEASE',
|
|
1089
|
+
id,
|
|
1090
|
+
ts: Date.now(),
|
|
1091
|
+
payload: { name, reason },
|
|
1092
|
+
});
|
|
1093
|
+
|
|
1094
|
+
return new Promise((resolve) => {
|
|
1095
|
+
this.messageHandlers.set(id, (response) => {
|
|
1096
|
+
resolve({ success: response.success, error: response.error });
|
|
1097
|
+
});
|
|
1098
|
+
});
|
|
1099
|
+
}
|
|
1100
|
+
|
|
1101
|
+
async getInbox(options: {
|
|
1102
|
+
limit?: number;
|
|
1103
|
+
unread_only?: boolean;
|
|
1104
|
+
from?: string;
|
|
1105
|
+
channel?: string;
|
|
1106
|
+
} = {}): Promise<any[]> {
|
|
1107
|
+
const id = crypto.randomUUID();
|
|
1108
|
+
|
|
1109
|
+
this.sendEnvelope({
|
|
1110
|
+
v: 1,
|
|
1111
|
+
type: 'INBOX',
|
|
1112
|
+
id,
|
|
1113
|
+
ts: Date.now(),
|
|
1114
|
+
payload: options,
|
|
1115
|
+
});
|
|
1116
|
+
|
|
1117
|
+
return new Promise((resolve) => {
|
|
1118
|
+
this.messageHandlers.set(id, (response) => {
|
|
1119
|
+
resolve(response.messages || []);
|
|
1120
|
+
});
|
|
1121
|
+
});
|
|
1122
|
+
}
|
|
1123
|
+
|
|
1124
|
+
async listAgents(options: {
|
|
1125
|
+
include_idle?: boolean;
|
|
1126
|
+
project?: string;
|
|
1127
|
+
} = {}): Promise<any[]> {
|
|
1128
|
+
const id = crypto.randomUUID();
|
|
1129
|
+
|
|
1130
|
+
this.sendEnvelope({
|
|
1131
|
+
v: 1,
|
|
1132
|
+
type: 'WHO',
|
|
1133
|
+
id,
|
|
1134
|
+
ts: Date.now(),
|
|
1135
|
+
payload: options,
|
|
1136
|
+
});
|
|
1137
|
+
|
|
1138
|
+
return new Promise((resolve) => {
|
|
1139
|
+
this.messageHandlers.set(id, (response) => {
|
|
1140
|
+
resolve(response.agents || []);
|
|
1141
|
+
});
|
|
1142
|
+
});
|
|
1143
|
+
}
|
|
1144
|
+
|
|
1145
|
+
async getStatus(): Promise<{
|
|
1146
|
+
connected: boolean;
|
|
1147
|
+
agentName: string;
|
|
1148
|
+
project: string;
|
|
1149
|
+
socketPath: string;
|
|
1150
|
+
daemonVersion?: string;
|
|
1151
|
+
uptime?: string;
|
|
1152
|
+
}> {
|
|
1153
|
+
return {
|
|
1154
|
+
connected: this.connected,
|
|
1155
|
+
agentName: this.agentName,
|
|
1156
|
+
project: this.discovery?.project || 'unknown',
|
|
1157
|
+
socketPath: this.discovery?.socketPath || 'unknown',
|
|
1158
|
+
daemonVersion: '0.1.0', // TODO: Get from daemon
|
|
1159
|
+
};
|
|
1160
|
+
}
|
|
1161
|
+
|
|
1162
|
+
disconnect(): void {
|
|
1163
|
+
if (this.socket) {
|
|
1164
|
+
this.socket.end();
|
|
1165
|
+
this.socket = null;
|
|
1166
|
+
}
|
|
1167
|
+
this.connected = false;
|
|
1168
|
+
}
|
|
1169
|
+
}
|
|
1170
|
+
```
|
|
1171
|
+
|
|
1172
|
+
---
|
|
1173
|
+
|
|
1174
|
+
## Error Handling
|
|
1175
|
+
|
|
1176
|
+
```typescript
|
|
1177
|
+
// src/errors.ts
|
|
1178
|
+
|
|
1179
|
+
export class RelayError extends Error {
|
|
1180
|
+
constructor(message: string) {
|
|
1181
|
+
super(message);
|
|
1182
|
+
this.name = 'RelayError';
|
|
1183
|
+
}
|
|
1184
|
+
}
|
|
1185
|
+
|
|
1186
|
+
export class DaemonNotRunningError extends RelayError {
|
|
1187
|
+
constructor(message?: string) {
|
|
1188
|
+
super(message || 'Relay daemon is not running. Start with: agent-relay daemon start');
|
|
1189
|
+
this.name = 'DaemonNotRunningError';
|
|
1190
|
+
}
|
|
1191
|
+
}
|
|
1192
|
+
|
|
1193
|
+
export class AgentNotFoundError extends RelayError {
|
|
1194
|
+
constructor(agentName: string) {
|
|
1195
|
+
super(`Agent not found: ${agentName}`);
|
|
1196
|
+
this.name = 'AgentNotFoundError';
|
|
1197
|
+
}
|
|
1198
|
+
}
|
|
1199
|
+
|
|
1200
|
+
export class TimeoutError extends RelayError {
|
|
1201
|
+
constructor(operation: string, timeoutMs: number) {
|
|
1202
|
+
super(`Timeout after ${timeoutMs}ms: ${operation}`);
|
|
1203
|
+
this.name = 'TimeoutError';
|
|
1204
|
+
}
|
|
1205
|
+
}
|
|
1206
|
+
|
|
1207
|
+
export class ConnectionError extends RelayError {
|
|
1208
|
+
constructor(message: string) {
|
|
1209
|
+
super(`Connection error: ${message}`);
|
|
1210
|
+
this.name = 'ConnectionError';
|
|
1211
|
+
}
|
|
1212
|
+
}
|
|
1213
|
+
```
|
|
1214
|
+
|
|
1215
|
+
---
|
|
1216
|
+
|
|
1217
|
+
## MCP Server Entry Point
|
|
1218
|
+
|
|
1219
|
+
```typescript
|
|
1220
|
+
// src/index.ts
|
|
1221
|
+
import { Server } from '@modelcontextprotocol/sdk/server/index.js';
|
|
1222
|
+
import { StdioServerTransport } from '@modelcontextprotocol/sdk/server/stdio.js';
|
|
1223
|
+
import {
|
|
1224
|
+
CallToolRequestSchema,
|
|
1225
|
+
GetPromptRequestSchema,
|
|
1226
|
+
ListPromptsRequestSchema,
|
|
1227
|
+
ListResourcesRequestSchema,
|
|
1228
|
+
ListToolsRequestSchema,
|
|
1229
|
+
ReadResourceRequestSchema,
|
|
1230
|
+
} from '@modelcontextprotocol/sdk/types.js';
|
|
1231
|
+
|
|
1232
|
+
import { RelayClient } from './client.js';
|
|
1233
|
+
import { DaemonNotRunningError } from './errors.js';
|
|
1234
|
+
|
|
1235
|
+
// Tools
|
|
1236
|
+
import {
|
|
1237
|
+
relaySendTool,
|
|
1238
|
+
handleRelaySend,
|
|
1239
|
+
relaySpawnTool,
|
|
1240
|
+
handleRelaySpawn,
|
|
1241
|
+
relayReleaseTool,
|
|
1242
|
+
handleRelayRelease,
|
|
1243
|
+
relayInboxTool,
|
|
1244
|
+
handleRelayInbox,
|
|
1245
|
+
relayWhoTool,
|
|
1246
|
+
handleRelayWho,
|
|
1247
|
+
relayStatusTool,
|
|
1248
|
+
handleRelayStatus,
|
|
1249
|
+
} from './tools/index.js';
|
|
1250
|
+
|
|
1251
|
+
// Prompts
|
|
1252
|
+
import { protocolPrompt, getProtocolPrompt } from './prompts/protocol.js';
|
|
1253
|
+
|
|
1254
|
+
// Resources
|
|
1255
|
+
import {
|
|
1256
|
+
agentsResource,
|
|
1257
|
+
getAgentsResource,
|
|
1258
|
+
inboxResource,
|
|
1259
|
+
getInboxResource,
|
|
1260
|
+
projectResource,
|
|
1261
|
+
getProjectResource,
|
|
1262
|
+
} from './resources/index.js';
|
|
1263
|
+
|
|
1264
|
+
const TOOLS = [
|
|
1265
|
+
relaySendTool,
|
|
1266
|
+
relaySpawnTool,
|
|
1267
|
+
relayReleaseTool,
|
|
1268
|
+
relayInboxTool,
|
|
1269
|
+
relayWhoTool,
|
|
1270
|
+
relayStatusTool,
|
|
1271
|
+
];
|
|
1272
|
+
|
|
1273
|
+
const PROMPTS = [protocolPrompt];
|
|
1274
|
+
|
|
1275
|
+
const RESOURCES = [agentsResource, inboxResource, projectResource];
|
|
1276
|
+
|
|
1277
|
+
export async function createServer(): Promise<Server> {
|
|
1278
|
+
// Connect to relay daemon
|
|
1279
|
+
let client: RelayClient;
|
|
1280
|
+
try {
|
|
1281
|
+
client = new RelayClient();
|
|
1282
|
+
await client.connect();
|
|
1283
|
+
} catch (err) {
|
|
1284
|
+
if (err instanceof DaemonNotRunningError) {
|
|
1285
|
+
console.error('ERROR: ' + err.message);
|
|
1286
|
+
console.error('');
|
|
1287
|
+
console.error('To start the daemon:');
|
|
1288
|
+
console.error(' agent-relay daemon start');
|
|
1289
|
+
console.error('');
|
|
1290
|
+
console.error('Or for cloud workspaces, ensure the daemon is running.');
|
|
1291
|
+
process.exit(1);
|
|
1292
|
+
}
|
|
1293
|
+
throw err;
|
|
1294
|
+
}
|
|
1295
|
+
|
|
1296
|
+
const server = new Server(
|
|
1297
|
+
{
|
|
1298
|
+
name: 'agent-relay-mcp',
|
|
1299
|
+
version: '0.1.0',
|
|
1300
|
+
},
|
|
1301
|
+
{
|
|
1302
|
+
capabilities: {
|
|
1303
|
+
tools: {},
|
|
1304
|
+
prompts: {},
|
|
1305
|
+
resources: {},
|
|
1306
|
+
},
|
|
1307
|
+
}
|
|
1308
|
+
);
|
|
1309
|
+
|
|
1310
|
+
// List tools
|
|
1311
|
+
server.setRequestHandler(ListToolsRequestSchema, async () => ({
|
|
1312
|
+
tools: TOOLS,
|
|
1313
|
+
}));
|
|
1314
|
+
|
|
1315
|
+
// Call tool
|
|
1316
|
+
server.setRequestHandler(CallToolRequestSchema, async (request) => {
|
|
1317
|
+
const { name, arguments: args } = request.params;
|
|
1318
|
+
|
|
1319
|
+
try {
|
|
1320
|
+
switch (name) {
|
|
1321
|
+
case 'relay_send':
|
|
1322
|
+
return { content: [{ type: 'text', text: await handleRelaySend(client, args) }] };
|
|
1323
|
+
case 'relay_spawn':
|
|
1324
|
+
return { content: [{ type: 'text', text: await handleRelaySpawn(client, args) }] };
|
|
1325
|
+
case 'relay_release':
|
|
1326
|
+
return { content: [{ type: 'text', text: await handleRelayRelease(client, args) }] };
|
|
1327
|
+
case 'relay_inbox':
|
|
1328
|
+
return { content: [{ type: 'text', text: await handleRelayInbox(client, args) }] };
|
|
1329
|
+
case 'relay_who':
|
|
1330
|
+
return { content: [{ type: 'text', text: await handleRelayWho(client, args) }] };
|
|
1331
|
+
case 'relay_status':
|
|
1332
|
+
return { content: [{ type: 'text', text: await handleRelayStatus(client, args) }] };
|
|
1333
|
+
default:
|
|
1334
|
+
throw new Error(`Unknown tool: ${name}`);
|
|
1335
|
+
}
|
|
1336
|
+
} catch (err) {
|
|
1337
|
+
return {
|
|
1338
|
+
content: [{ type: 'text', text: `Error: ${err.message}` }],
|
|
1339
|
+
isError: true,
|
|
1340
|
+
};
|
|
1341
|
+
}
|
|
1342
|
+
});
|
|
1343
|
+
|
|
1344
|
+
// List prompts
|
|
1345
|
+
server.setRequestHandler(ListPromptsRequestSchema, async () => ({
|
|
1346
|
+
prompts: PROMPTS,
|
|
1347
|
+
}));
|
|
1348
|
+
|
|
1349
|
+
// Get prompt
|
|
1350
|
+
server.setRequestHandler(GetPromptRequestSchema, async (request) => {
|
|
1351
|
+
const { name } = request.params;
|
|
1352
|
+
|
|
1353
|
+
if (name === 'relay_protocol') {
|
|
1354
|
+
return {
|
|
1355
|
+
description: 'Agent Relay protocol documentation',
|
|
1356
|
+
messages: [
|
|
1357
|
+
{
|
|
1358
|
+
role: 'user',
|
|
1359
|
+
content: { type: 'text', text: getProtocolPrompt() },
|
|
1360
|
+
},
|
|
1361
|
+
],
|
|
1362
|
+
};
|
|
1363
|
+
}
|
|
1364
|
+
|
|
1365
|
+
throw new Error(`Unknown prompt: ${name}`);
|
|
1366
|
+
});
|
|
1367
|
+
|
|
1368
|
+
// List resources
|
|
1369
|
+
server.setRequestHandler(ListResourcesRequestSchema, async () => ({
|
|
1370
|
+
resources: RESOURCES,
|
|
1371
|
+
}));
|
|
1372
|
+
|
|
1373
|
+
// Read resource
|
|
1374
|
+
server.setRequestHandler(ReadResourceRequestSchema, async (request) => {
|
|
1375
|
+
const { uri } = request.params;
|
|
1376
|
+
|
|
1377
|
+
switch (uri) {
|
|
1378
|
+
case 'relay://agents':
|
|
1379
|
+
return {
|
|
1380
|
+
contents: [{ uri, mimeType: 'application/json', text: await getAgentsResource(client) }],
|
|
1381
|
+
};
|
|
1382
|
+
case 'relay://inbox':
|
|
1383
|
+
return {
|
|
1384
|
+
contents: [{ uri, mimeType: 'application/json', text: await getInboxResource(client) }],
|
|
1385
|
+
};
|
|
1386
|
+
case 'relay://project':
|
|
1387
|
+
return {
|
|
1388
|
+
contents: [{ uri, mimeType: 'application/json', text: await getProjectResource(client) }],
|
|
1389
|
+
};
|
|
1390
|
+
default:
|
|
1391
|
+
throw new Error(`Unknown resource: ${uri}`);
|
|
1392
|
+
}
|
|
1393
|
+
});
|
|
1394
|
+
|
|
1395
|
+
return server;
|
|
1396
|
+
}
|
|
1397
|
+
|
|
1398
|
+
// Main entry point
|
|
1399
|
+
async function main() {
|
|
1400
|
+
const server = await createServer();
|
|
1401
|
+
const transport = new StdioServerTransport();
|
|
1402
|
+
await server.connect(transport);
|
|
1403
|
+
}
|
|
1404
|
+
|
|
1405
|
+
main().catch((err) => {
|
|
1406
|
+
console.error('Fatal error:', err);
|
|
1407
|
+
process.exit(1);
|
|
1408
|
+
});
|
|
1409
|
+
```
|
|
1410
|
+
|
|
1411
|
+
---
|
|
1412
|
+
|
|
1413
|
+
## CLI Binary
|
|
1414
|
+
|
|
1415
|
+
```typescript
|
|
1416
|
+
// src/bin.ts
|
|
1417
|
+
#!/usr/bin/env node
|
|
1418
|
+
import { parseArgs } from 'node:util';
|
|
1419
|
+
import { runInstall } from './install-cli.js';
|
|
1420
|
+
|
|
1421
|
+
const { values, positionals } = parseArgs({
|
|
1422
|
+
allowPositionals: true,
|
|
1423
|
+
options: {
|
|
1424
|
+
help: { type: 'boolean', short: 'h' },
|
|
1425
|
+
version: { type: 'boolean', short: 'v' },
|
|
1426
|
+
editor: { type: 'string', short: 'e' },
|
|
1427
|
+
global: { type: 'boolean', short: 'g' },
|
|
1428
|
+
},
|
|
1429
|
+
});
|
|
1430
|
+
|
|
1431
|
+
const command = positionals[0];
|
|
1432
|
+
|
|
1433
|
+
if (values.help || !command) {
|
|
1434
|
+
console.log(`
|
|
1435
|
+
@agent-relay/mcp - MCP Server for Agent Relay
|
|
1436
|
+
|
|
1437
|
+
Usage:
|
|
1438
|
+
npx @agent-relay/mcp <command> [options]
|
|
1439
|
+
|
|
1440
|
+
Commands:
|
|
1441
|
+
install Install MCP server for your editor
|
|
1442
|
+
serve Run the MCP server (used by editors)
|
|
1443
|
+
|
|
1444
|
+
Install Options:
|
|
1445
|
+
-e, --editor <name> Editor to configure (claude, cursor, vscode, auto)
|
|
1446
|
+
-g, --global Install globally (not project-specific)
|
|
1447
|
+
|
|
1448
|
+
Examples:
|
|
1449
|
+
npx @agent-relay/mcp install # Auto-detect editor
|
|
1450
|
+
npx @agent-relay/mcp install --editor claude # Claude Code only
|
|
1451
|
+
npx @agent-relay/mcp install --editor cursor # Cursor only
|
|
1452
|
+
npx @agent-relay/mcp serve # Run server (for editors)
|
|
1453
|
+
`);
|
|
1454
|
+
process.exit(0);
|
|
1455
|
+
}
|
|
1456
|
+
|
|
1457
|
+
if (values.version) {
|
|
1458
|
+
console.log('0.1.0');
|
|
1459
|
+
process.exit(0);
|
|
1460
|
+
}
|
|
1461
|
+
|
|
1462
|
+
switch (command) {
|
|
1463
|
+
case 'install':
|
|
1464
|
+
runInstall({
|
|
1465
|
+
editor: values.editor as string | undefined,
|
|
1466
|
+
global: values.global as boolean | undefined,
|
|
1467
|
+
});
|
|
1468
|
+
break;
|
|
1469
|
+
|
|
1470
|
+
case 'serve':
|
|
1471
|
+
// Import and run the server
|
|
1472
|
+
import('./index.js');
|
|
1473
|
+
break;
|
|
1474
|
+
|
|
1475
|
+
default:
|
|
1476
|
+
console.error(`Unknown command: ${command}`);
|
|
1477
|
+
console.error('Run with --help for usage');
|
|
1478
|
+
process.exit(1);
|
|
1479
|
+
}
|
|
1480
|
+
```
|
|
1481
|
+
|
|
1482
|
+
---
|
|
1483
|
+
|
|
1484
|
+
## Installation System
|
|
1485
|
+
|
|
1486
|
+
```typescript
|
|
1487
|
+
// src/install-cli.ts
|
|
1488
|
+
import { existsSync, mkdirSync, readFileSync, writeFileSync } from 'node:fs';
|
|
1489
|
+
import { join } from 'node:path';
|
|
1490
|
+
import { homedir } from 'node:os';
|
|
1491
|
+
|
|
1492
|
+
interface InstallOptions {
|
|
1493
|
+
editor?: string;
|
|
1494
|
+
global?: boolean;
|
|
1495
|
+
}
|
|
1496
|
+
|
|
1497
|
+
interface EditorConfig {
|
|
1498
|
+
name: string;
|
|
1499
|
+
configPath: string;
|
|
1500
|
+
configKey: string;
|
|
1501
|
+
format: 'json' | 'jsonc';
|
|
1502
|
+
}
|
|
1503
|
+
|
|
1504
|
+
const EDITORS: Record<string, EditorConfig> = {
|
|
1505
|
+
claude: {
|
|
1506
|
+
name: 'Claude Code',
|
|
1507
|
+
configPath: join(homedir(), '.claude', 'settings.json'),
|
|
1508
|
+
configKey: 'mcpServers',
|
|
1509
|
+
format: 'json',
|
|
1510
|
+
},
|
|
1511
|
+
cursor: {
|
|
1512
|
+
name: 'Cursor',
|
|
1513
|
+
configPath: join(homedir(), '.cursor', 'mcp.json'),
|
|
1514
|
+
configKey: 'mcpServers',
|
|
1515
|
+
format: 'json',
|
|
1516
|
+
},
|
|
1517
|
+
vscode: {
|
|
1518
|
+
name: 'VS Code',
|
|
1519
|
+
configPath: join(homedir(), '.vscode', 'mcp.json'),
|
|
1520
|
+
configKey: 'mcpServers',
|
|
1521
|
+
format: 'jsonc',
|
|
1522
|
+
},
|
|
1523
|
+
};
|
|
1524
|
+
|
|
1525
|
+
const MCP_SERVER_CONFIG = {
|
|
1526
|
+
command: 'npx',
|
|
1527
|
+
args: ['@agent-relay/mcp', 'serve'],
|
|
1528
|
+
};
|
|
1529
|
+
|
|
1530
|
+
export function runInstall(options: InstallOptions): void {
|
|
1531
|
+
const editors = options.editor
|
|
1532
|
+
? [options.editor]
|
|
1533
|
+
: detectInstalledEditors();
|
|
1534
|
+
|
|
1535
|
+
if (editors.length === 0) {
|
|
1536
|
+
console.log('No supported editors detected.');
|
|
1537
|
+
console.log('Supported editors: claude, cursor, vscode');
|
|
1538
|
+
console.log('');
|
|
1539
|
+
console.log('Specify manually with: npx @agent-relay/mcp install --editor <name>');
|
|
1540
|
+
process.exit(1);
|
|
1541
|
+
}
|
|
1542
|
+
|
|
1543
|
+
console.log('Installing Agent Relay MCP server...');
|
|
1544
|
+
console.log('');
|
|
1545
|
+
|
|
1546
|
+
for (const editorKey of editors) {
|
|
1547
|
+
const editor = EDITORS[editorKey];
|
|
1548
|
+
if (!editor) {
|
|
1549
|
+
console.log(`Unknown editor: ${editorKey}`);
|
|
1550
|
+
continue;
|
|
1551
|
+
}
|
|
1552
|
+
|
|
1553
|
+
try {
|
|
1554
|
+
installForEditor(editor, options.global);
|
|
1555
|
+
console.log(` ✓ ${editor.name} configured`);
|
|
1556
|
+
} catch (err) {
|
|
1557
|
+
console.log(` ✗ ${editor.name}: ${err.message}`);
|
|
1558
|
+
}
|
|
1559
|
+
}
|
|
1560
|
+
|
|
1561
|
+
console.log('');
|
|
1562
|
+
console.log('Installation complete!');
|
|
1563
|
+
console.log('');
|
|
1564
|
+
console.log('The relay tools will be available when you start your editor.');
|
|
1565
|
+
console.log('Make sure the relay daemon is running: agent-relay daemon start');
|
|
1566
|
+
}
|
|
1567
|
+
|
|
1568
|
+
function detectInstalledEditors(): string[] {
|
|
1569
|
+
const detected: string[] = [];
|
|
1570
|
+
|
|
1571
|
+
for (const [key, editor] of Object.entries(EDITORS)) {
|
|
1572
|
+
// Check if config directory exists
|
|
1573
|
+
const configDir = join(editor.configPath, '..');
|
|
1574
|
+
if (existsSync(configDir)) {
|
|
1575
|
+
detected.push(key);
|
|
1576
|
+
}
|
|
1577
|
+
}
|
|
1578
|
+
|
|
1579
|
+
return detected;
|
|
1580
|
+
}
|
|
1581
|
+
|
|
1582
|
+
function installForEditor(editor: EditorConfig, global?: boolean): void {
|
|
1583
|
+
// Ensure directory exists
|
|
1584
|
+
const configDir = join(editor.configPath, '..');
|
|
1585
|
+
if (!existsSync(configDir)) {
|
|
1586
|
+
mkdirSync(configDir, { recursive: true });
|
|
1587
|
+
}
|
|
1588
|
+
|
|
1589
|
+
// Read existing config or create new
|
|
1590
|
+
let config: Record<string, any> = {};
|
|
1591
|
+
if (existsSync(editor.configPath)) {
|
|
1592
|
+
const content = readFileSync(editor.configPath, 'utf-8');
|
|
1593
|
+
// Handle JSONC (comments) by stripping them
|
|
1594
|
+
const jsonContent = editor.format === 'jsonc'
|
|
1595
|
+
? content.replace(/\/\*[\s\S]*?\*\/|\/\/.*/g, '')
|
|
1596
|
+
: content;
|
|
1597
|
+
try {
|
|
1598
|
+
config = JSON.parse(jsonContent);
|
|
1599
|
+
} catch {
|
|
1600
|
+
// Start fresh if invalid
|
|
1601
|
+
config = {};
|
|
1602
|
+
}
|
|
1603
|
+
}
|
|
1604
|
+
|
|
1605
|
+
// Add MCP server config
|
|
1606
|
+
if (!config[editor.configKey]) {
|
|
1607
|
+
config[editor.configKey] = {};
|
|
1608
|
+
}
|
|
1609
|
+
|
|
1610
|
+
config[editor.configKey]['agent-relay'] = MCP_SERVER_CONFIG;
|
|
1611
|
+
|
|
1612
|
+
// Write config
|
|
1613
|
+
writeFileSync(editor.configPath, JSON.stringify(config, null, 2));
|
|
1614
|
+
}
|
|
1615
|
+
```
|
|
1616
|
+
|
|
1617
|
+
---
|
|
1618
|
+
|
|
1619
|
+
## Cloud Dockerfile Integration
|
|
1620
|
+
|
|
1621
|
+
Add to `deploy/workspace/Dockerfile`:
|
|
1622
|
+
|
|
1623
|
+
```dockerfile
|
|
1624
|
+
# === MCP Server for Agent Relay ===
|
|
1625
|
+
# Pre-install the MCP server so all CLIs have relay tools available
|
|
1626
|
+
|
|
1627
|
+
# Install the MCP package globally
|
|
1628
|
+
RUN npm install -g @agent-relay/mcp
|
|
1629
|
+
|
|
1630
|
+
# Configure for Claude Code (workspace user)
|
|
1631
|
+
RUN mkdir -p /home/workspace/.claude && \
|
|
1632
|
+
echo '{"mcpServers":{"agent-relay":{"command":"npx","args":["@agent-relay/mcp","serve"]}}}' \
|
|
1633
|
+
> /home/workspace/.claude/settings.json && \
|
|
1634
|
+
chown -R workspace:workspace /home/workspace/.claude
|
|
1635
|
+
|
|
1636
|
+
# Configure for Cursor
|
|
1637
|
+
RUN mkdir -p /home/workspace/.cursor && \
|
|
1638
|
+
echo '{"mcpServers":{"agent-relay":{"command":"npx","args":["@agent-relay/mcp","serve"]}}}' \
|
|
1639
|
+
> /home/workspace/.cursor/mcp.json && \
|
|
1640
|
+
chown -R workspace:workspace /home/workspace/.cursor
|
|
1641
|
+
|
|
1642
|
+
# Set environment for socket discovery
|
|
1643
|
+
ENV RELAY_PROJECT=${WORKSPACE_NAME:-default}
|
|
1644
|
+
```
|
|
1645
|
+
|
|
1646
|
+
---
|
|
1647
|
+
|
|
1648
|
+
## CLI Integration
|
|
1649
|
+
|
|
1650
|
+
Add to main `agent-relay` CLI in `packages/cli/src/commands/mcp.ts`:
|
|
1651
|
+
|
|
1652
|
+
```typescript
|
|
1653
|
+
// packages/cli/src/commands/mcp.ts
|
|
1654
|
+
import { Command } from 'commander';
|
|
1655
|
+
|
|
1656
|
+
export const mcpCommand = new Command('mcp')
|
|
1657
|
+
.description('MCP server management')
|
|
1658
|
+
.addCommand(
|
|
1659
|
+
new Command('install')
|
|
1660
|
+
.description('Install MCP server for editors')
|
|
1661
|
+
.option('-e, --editor <name>', 'Editor to configure')
|
|
1662
|
+
.option('-g, --global', 'Install globally')
|
|
1663
|
+
.action(async (options) => {
|
|
1664
|
+
// Dynamic import to avoid bundling mcp package
|
|
1665
|
+
const { runInstall } = await import('@agent-relay/mcp/install');
|
|
1666
|
+
runInstall(options);
|
|
1667
|
+
})
|
|
1668
|
+
)
|
|
1669
|
+
.addCommand(
|
|
1670
|
+
new Command('serve')
|
|
1671
|
+
.description('Run MCP server')
|
|
1672
|
+
.action(async () => {
|
|
1673
|
+
await import('@agent-relay/mcp');
|
|
1674
|
+
})
|
|
1675
|
+
);
|
|
1676
|
+
```
|
|
1677
|
+
|
|
1678
|
+
Add to `agent-relay setup` command:
|
|
1679
|
+
|
|
1680
|
+
```typescript
|
|
1681
|
+
// In setup command
|
|
1682
|
+
async function setupWorkspace(): Promise<void> {
|
|
1683
|
+
// ... existing setup ...
|
|
1684
|
+
|
|
1685
|
+
// Offer MCP installation
|
|
1686
|
+
const { installMcp } = await prompt({
|
|
1687
|
+
type: 'confirm',
|
|
1688
|
+
name: 'installMcp',
|
|
1689
|
+
message: 'Install MCP server for AI editors? (Claude Code, Cursor)',
|
|
1690
|
+
default: true,
|
|
1691
|
+
});
|
|
1692
|
+
|
|
1693
|
+
if (installMcp) {
|
|
1694
|
+
const { runInstall } = await import('@agent-relay/mcp/install');
|
|
1695
|
+
runInstall({ editor: 'auto' });
|
|
1696
|
+
}
|
|
1697
|
+
}
|
|
1698
|
+
```
|
|
1699
|
+
|
|
1700
|
+
---
|
|
1701
|
+
|
|
1702
|
+
## Testing
|
|
1703
|
+
|
|
1704
|
+
### Unit Tests
|
|
1705
|
+
|
|
1706
|
+
```typescript
|
|
1707
|
+
// tests/tools.test.ts
|
|
1708
|
+
import { describe, it, expect, vi, beforeEach } from 'vitest';
|
|
1709
|
+
import { handleRelaySend, handleRelaySpawn, handleRelayWho } from '../src/tools/index.js';
|
|
1710
|
+
|
|
1711
|
+
describe('relay_send', () => {
|
|
1712
|
+
const mockClient = {
|
|
1713
|
+
send: vi.fn(),
|
|
1714
|
+
sendAndWait: vi.fn(),
|
|
1715
|
+
};
|
|
1716
|
+
|
|
1717
|
+
beforeEach(() => {
|
|
1718
|
+
vi.clearAllMocks();
|
|
1719
|
+
});
|
|
1720
|
+
|
|
1721
|
+
it('sends direct message', async () => {
|
|
1722
|
+
mockClient.send.mockResolvedValue(undefined);
|
|
1723
|
+
|
|
1724
|
+
const result = await handleRelaySend(mockClient, {
|
|
1725
|
+
to: 'Alice',
|
|
1726
|
+
message: 'Hello',
|
|
1727
|
+
});
|
|
1728
|
+
|
|
1729
|
+
expect(result).toBe('Message sent to Alice');
|
|
1730
|
+
expect(mockClient.send).toHaveBeenCalledWith('Alice', 'Hello', {});
|
|
1731
|
+
});
|
|
1732
|
+
|
|
1733
|
+
it('sends to channel', async () => {
|
|
1734
|
+
mockClient.send.mockResolvedValue(undefined);
|
|
1735
|
+
|
|
1736
|
+
const result = await handleRelaySend(mockClient, {
|
|
1737
|
+
to: '#general',
|
|
1738
|
+
message: 'Team update',
|
|
1739
|
+
});
|
|
1740
|
+
|
|
1741
|
+
expect(result).toBe('Message sent to #general');
|
|
1742
|
+
});
|
|
1743
|
+
|
|
1744
|
+
it('awaits response when requested', async () => {
|
|
1745
|
+
mockClient.sendAndWait.mockResolvedValue({
|
|
1746
|
+
from: 'Worker',
|
|
1747
|
+
content: 'Done!',
|
|
1748
|
+
});
|
|
1749
|
+
|
|
1750
|
+
const result = await handleRelaySend(mockClient, {
|
|
1751
|
+
to: 'Worker',
|
|
1752
|
+
message: 'Process this',
|
|
1753
|
+
await_response: true,
|
|
1754
|
+
});
|
|
1755
|
+
|
|
1756
|
+
expect(result).toBe('Response from Worker: Done!');
|
|
1757
|
+
});
|
|
1758
|
+
});
|
|
1759
|
+
|
|
1760
|
+
describe('relay_spawn', () => {
|
|
1761
|
+
const mockClient = {
|
|
1762
|
+
spawn: vi.fn(),
|
|
1763
|
+
};
|
|
1764
|
+
|
|
1765
|
+
it('spawns worker successfully', async () => {
|
|
1766
|
+
mockClient.spawn.mockResolvedValue({ success: true });
|
|
1767
|
+
|
|
1768
|
+
const result = await handleRelaySpawn(mockClient, {
|
|
1769
|
+
name: 'TestRunner',
|
|
1770
|
+
cli: 'claude',
|
|
1771
|
+
task: 'Run tests',
|
|
1772
|
+
});
|
|
1773
|
+
|
|
1774
|
+
expect(result).toContain('spawned successfully');
|
|
1775
|
+
});
|
|
1776
|
+
|
|
1777
|
+
it('handles spawn failure', async () => {
|
|
1778
|
+
mockClient.spawn.mockResolvedValue({ success: false, error: 'Out of resources' });
|
|
1779
|
+
|
|
1780
|
+
const result = await handleRelaySpawn(mockClient, {
|
|
1781
|
+
name: 'TestRunner',
|
|
1782
|
+
cli: 'claude',
|
|
1783
|
+
task: 'Run tests',
|
|
1784
|
+
});
|
|
1785
|
+
|
|
1786
|
+
expect(result).toContain('Failed to spawn');
|
|
1787
|
+
expect(result).toContain('Out of resources');
|
|
1788
|
+
});
|
|
1789
|
+
});
|
|
1790
|
+
```
|
|
1791
|
+
|
|
1792
|
+
### Discovery Tests
|
|
1793
|
+
|
|
1794
|
+
```typescript
|
|
1795
|
+
// tests/discover.test.ts
|
|
1796
|
+
import { describe, it, expect, vi, beforeEach, afterEach } from 'vitest';
|
|
1797
|
+
import { discoverSocket } from '../src/discover.js';
|
|
1798
|
+
import { existsSync } from 'node:fs';
|
|
1799
|
+
|
|
1800
|
+
vi.mock('node:fs');
|
|
1801
|
+
|
|
1802
|
+
describe('discoverSocket', () => {
|
|
1803
|
+
beforeEach(() => {
|
|
1804
|
+
vi.clearAllMocks();
|
|
1805
|
+
delete process.env.RELAY_SOCKET;
|
|
1806
|
+
delete process.env.RELAY_PROJECT;
|
|
1807
|
+
});
|
|
1808
|
+
|
|
1809
|
+
it('uses RELAY_SOCKET env var first', () => {
|
|
1810
|
+
process.env.RELAY_SOCKET = '/tmp/test.sock';
|
|
1811
|
+
vi.mocked(existsSync).mockReturnValue(true);
|
|
1812
|
+
|
|
1813
|
+
const result = discoverSocket();
|
|
1814
|
+
|
|
1815
|
+
expect(result?.socketPath).toBe('/tmp/test.sock');
|
|
1816
|
+
expect(result?.source).toBe('env');
|
|
1817
|
+
});
|
|
1818
|
+
|
|
1819
|
+
it('uses RELAY_PROJECT env var second', () => {
|
|
1820
|
+
process.env.RELAY_PROJECT = 'myproject';
|
|
1821
|
+
vi.mocked(existsSync).mockImplementation((path) => {
|
|
1822
|
+
return String(path).includes('myproject');
|
|
1823
|
+
});
|
|
1824
|
+
|
|
1825
|
+
const result = discoverSocket();
|
|
1826
|
+
|
|
1827
|
+
expect(result?.project).toBe('myproject');
|
|
1828
|
+
expect(result?.source).toBe('env');
|
|
1829
|
+
});
|
|
1830
|
+
|
|
1831
|
+
it('returns null when no socket found', () => {
|
|
1832
|
+
vi.mocked(existsSync).mockReturnValue(false);
|
|
1833
|
+
|
|
1834
|
+
const result = discoverSocket();
|
|
1835
|
+
|
|
1836
|
+
expect(result).toBeNull();
|
|
1837
|
+
});
|
|
1838
|
+
});
|
|
1839
|
+
```
|
|
1840
|
+
|
|
1841
|
+
### Integration Tests
|
|
1842
|
+
|
|
1843
|
+
```typescript
|
|
1844
|
+
// tests/integration.test.ts
|
|
1845
|
+
import { describe, it, expect, beforeAll, afterAll } from 'vitest';
|
|
1846
|
+
import { createServer } from '../src/index.js';
|
|
1847
|
+
import { spawn } from 'node:child_process';
|
|
1848
|
+
|
|
1849
|
+
describe('MCP Server Integration', () => {
|
|
1850
|
+
let daemonProcess: any;
|
|
1851
|
+
|
|
1852
|
+
beforeAll(async () => {
|
|
1853
|
+
// Start a test daemon
|
|
1854
|
+
daemonProcess = spawn('agent-relay', ['daemon', 'start', '--test']);
|
|
1855
|
+
await new Promise(resolve => setTimeout(resolve, 1000));
|
|
1856
|
+
});
|
|
1857
|
+
|
|
1858
|
+
afterAll(() => {
|
|
1859
|
+
daemonProcess?.kill();
|
|
1860
|
+
});
|
|
1861
|
+
|
|
1862
|
+
it('connects to daemon and lists tools', async () => {
|
|
1863
|
+
const server = await createServer();
|
|
1864
|
+
// Test would interact with server here
|
|
1865
|
+
});
|
|
1866
|
+
});
|
|
1867
|
+
```
|
|
1868
|
+
|
|
1869
|
+
---
|
|
1870
|
+
|
|
1871
|
+
## Implementation Order
|
|
1872
|
+
|
|
1873
|
+
### Phase 1: Core Infrastructure
|
|
1874
|
+
1. Create package structure (`packages/mcp/`)
|
|
1875
|
+
2. Implement socket discovery (`discover.ts`)
|
|
1876
|
+
3. Implement relay client (`client.ts`)
|
|
1877
|
+
4. Implement error types (`errors.ts`)
|
|
1878
|
+
|
|
1879
|
+
### Phase 2: MCP Tools
|
|
1880
|
+
1. Implement `relay_send` tool
|
|
1881
|
+
2. Implement `relay_inbox` tool
|
|
1882
|
+
3. Implement `relay_who` tool
|
|
1883
|
+
4. Implement `relay_status` tool
|
|
1884
|
+
5. Implement `relay_spawn` tool
|
|
1885
|
+
6. Implement `relay_release` tool
|
|
1886
|
+
|
|
1887
|
+
### Phase 3: MCP Server
|
|
1888
|
+
1. Implement MCP server entry point (`index.ts`)
|
|
1889
|
+
2. Add protocol prompt (`prompts/protocol.ts`)
|
|
1890
|
+
3. Add resources (`resources/*.ts`)
|
|
1891
|
+
4. Implement CLI binary (`bin.ts`)
|
|
1892
|
+
|
|
1893
|
+
### Phase 4: Installation
|
|
1894
|
+
1. Implement editor installation (`install.ts`, `install-cli.ts`)
|
|
1895
|
+
2. Add to main CLI (`agent-relay mcp install`)
|
|
1896
|
+
3. Add to setup command
|
|
1897
|
+
|
|
1898
|
+
### Phase 5: Cloud Integration
|
|
1899
|
+
1. Update workspace Dockerfile
|
|
1900
|
+
2. Add environment variables
|
|
1901
|
+
3. Test with all CLI tools (Claude, Codex, Gemini, Droid, OpenCode)
|
|
1902
|
+
|
|
1903
|
+
---
|
|
1904
|
+
|
|
1905
|
+
## Success Criteria
|
|
1906
|
+
|
|
1907
|
+
1. **Local Install**: `npx @agent-relay/mcp install` works and configures Claude Code
|
|
1908
|
+
2. **Cloud Install**: Workspaces have MCP pre-configured for all CLI tools
|
|
1909
|
+
3. **All Tools Work**: All 6 tools function correctly
|
|
1910
|
+
4. **Protocol Doc**: Full protocol documentation available via prompts
|
|
1911
|
+
5. **Error Messages**: Clear errors when daemon not running
|
|
1912
|
+
6. **Multi-Project**: Socket discovery works across projects
|
|
1913
|
+
|
|
1914
|
+
---
|
|
1915
|
+
|
|
1916
|
+
## Dependencies
|
|
1917
|
+
|
|
1918
|
+
- `@modelcontextprotocol/sdk` - MCP SDK
|
|
1919
|
+
- `@agent-relay/protocol` - Protocol types and framing
|
|
1920
|
+
- `zod` - Schema validation (already in protocol)
|
|
1921
|
+
|
|
1922
|
+
No new external dependencies required beyond MCP SDK.
|