agent-relay 1.0.22 → 1.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +1 -1
- package/dist/bridge/shadow-cli.d.ts +17 -0
- package/dist/bridge/shadow-cli.d.ts.map +1 -0
- package/dist/bridge/shadow-cli.js +75 -0
- package/dist/bridge/shadow-cli.js.map +1 -0
- package/dist/bridge/shadow-config.d.ts +87 -0
- package/dist/bridge/shadow-config.d.ts.map +1 -0
- package/dist/bridge/shadow-config.js +134 -0
- package/dist/bridge/shadow-config.js.map +1 -0
- package/dist/bridge/spawner.d.ts +68 -1
- package/dist/bridge/spawner.d.ts.map +1 -1
- package/dist/bridge/spawner.js +360 -16
- package/dist/bridge/spawner.js.map +1 -1
- package/dist/bridge/types.d.ts +67 -0
- package/dist/bridge/types.d.ts.map +1 -1
- package/dist/cli/index.js +1196 -15
- package/dist/cli/index.js.map +1 -1
- package/dist/cloud/api/auth.d.ts +20 -0
- package/dist/cloud/api/auth.d.ts.map +1 -0
- package/dist/cloud/api/auth.js +128 -0
- package/dist/cloud/api/auth.js.map +1 -0
- package/dist/cloud/api/billing.d.ts +17 -0
- package/dist/cloud/api/billing.d.ts.map +1 -0
- package/dist/cloud/api/billing.js +353 -0
- package/dist/cloud/api/billing.js.map +1 -0
- package/dist/cloud/api/cli-pty-runner.d.ts +54 -0
- package/dist/cloud/api/cli-pty-runner.d.ts.map +1 -0
- package/dist/cloud/api/cli-pty-runner.js +119 -0
- package/dist/cloud/api/cli-pty-runner.js.map +1 -0
- package/dist/cloud/api/coordinators.d.ts +8 -0
- package/dist/cloud/api/coordinators.d.ts.map +1 -0
- package/dist/cloud/api/coordinators.js +347 -0
- package/dist/cloud/api/coordinators.js.map +1 -0
- package/dist/cloud/api/daemons.d.ts +12 -0
- package/dist/cloud/api/daemons.d.ts.map +1 -0
- package/dist/cloud/api/daemons.js +320 -0
- package/dist/cloud/api/daemons.js.map +1 -0
- package/dist/cloud/api/generic-webhooks.d.ts +8 -0
- package/dist/cloud/api/generic-webhooks.d.ts.map +1 -0
- package/dist/cloud/api/generic-webhooks.js +129 -0
- package/dist/cloud/api/generic-webhooks.js.map +1 -0
- package/dist/cloud/api/git.d.ts +8 -0
- package/dist/cloud/api/git.d.ts.map +1 -0
- package/dist/cloud/api/git.js +131 -0
- package/dist/cloud/api/git.js.map +1 -0
- package/dist/cloud/api/github-app.d.ts +11 -0
- package/dist/cloud/api/github-app.d.ts.map +1 -0
- package/dist/cloud/api/github-app.js +189 -0
- package/dist/cloud/api/github-app.js.map +1 -0
- package/dist/cloud/api/middleware/planLimits.d.ts +43 -0
- package/dist/cloud/api/middleware/planLimits.d.ts.map +1 -0
- package/dist/cloud/api/middleware/planLimits.js +202 -0
- package/dist/cloud/api/middleware/planLimits.js.map +1 -0
- package/dist/cloud/api/monitoring.d.ts +11 -0
- package/dist/cloud/api/monitoring.d.ts.map +1 -0
- package/dist/cloud/api/monitoring.js +578 -0
- package/dist/cloud/api/monitoring.js.map +1 -0
- package/dist/cloud/api/nango-auth.d.ts +9 -0
- package/dist/cloud/api/nango-auth.d.ts.map +1 -0
- package/dist/cloud/api/nango-auth.js +377 -0
- package/dist/cloud/api/nango-auth.js.map +1 -0
- package/dist/cloud/api/onboarding.d.ts +15 -0
- package/dist/cloud/api/onboarding.d.ts.map +1 -0
- package/dist/cloud/api/onboarding.js +588 -0
- package/dist/cloud/api/onboarding.js.map +1 -0
- package/dist/cloud/api/policy.d.ts +8 -0
- package/dist/cloud/api/policy.d.ts.map +1 -0
- package/dist/cloud/api/policy.js +229 -0
- package/dist/cloud/api/policy.js.map +1 -0
- package/dist/cloud/api/providers.d.ts +7 -0
- package/dist/cloud/api/providers.d.ts.map +1 -0
- package/dist/cloud/api/providers.js +507 -0
- package/dist/cloud/api/providers.js.map +1 -0
- package/dist/cloud/api/repos.d.ts +7 -0
- package/dist/cloud/api/repos.d.ts.map +1 -0
- package/dist/cloud/api/repos.js +314 -0
- package/dist/cloud/api/repos.js.map +1 -0
- package/dist/cloud/api/teams.d.ts +7 -0
- package/dist/cloud/api/teams.d.ts.map +1 -0
- package/dist/cloud/api/teams.js +279 -0
- package/dist/cloud/api/teams.js.map +1 -0
- package/dist/cloud/api/test-helpers.d.ts +10 -0
- package/dist/cloud/api/test-helpers.d.ts.map +1 -0
- package/dist/cloud/api/test-helpers.js +575 -0
- package/dist/cloud/api/test-helpers.js.map +1 -0
- package/dist/cloud/api/usage.d.ts +7 -0
- package/dist/cloud/api/usage.d.ts.map +1 -0
- package/dist/cloud/api/usage.js +98 -0
- package/dist/cloud/api/usage.js.map +1 -0
- package/dist/cloud/api/webhooks.d.ts +7 -0
- package/dist/cloud/api/webhooks.d.ts.map +1 -0
- package/dist/cloud/api/webhooks.js +496 -0
- package/dist/cloud/api/webhooks.js.map +1 -0
- package/dist/cloud/api/workspaces.d.ts +7 -0
- package/dist/cloud/api/workspaces.d.ts.map +1 -0
- package/dist/cloud/api/workspaces.js +727 -0
- package/dist/cloud/api/workspaces.js.map +1 -0
- package/dist/cloud/billing/index.d.ts +9 -0
- package/dist/cloud/billing/index.d.ts.map +1 -0
- package/dist/cloud/billing/index.js +9 -0
- package/dist/cloud/billing/index.js.map +1 -0
- package/dist/cloud/billing/plans.d.ts +39 -0
- package/dist/cloud/billing/plans.d.ts.map +1 -0
- package/dist/cloud/billing/plans.js +245 -0
- package/dist/cloud/billing/plans.js.map +1 -0
- package/dist/cloud/billing/service.d.ts +80 -0
- package/dist/cloud/billing/service.d.ts.map +1 -0
- package/dist/cloud/billing/service.js +388 -0
- package/dist/cloud/billing/service.js.map +1 -0
- package/dist/cloud/billing/types.d.ts +141 -0
- package/dist/cloud/billing/types.d.ts.map +1 -0
- package/dist/cloud/billing/types.js +7 -0
- package/dist/cloud/billing/types.js.map +1 -0
- package/dist/cloud/config.d.ts +66 -0
- package/dist/cloud/config.d.ts.map +1 -0
- package/dist/cloud/config.js +92 -0
- package/dist/cloud/config.js.map +1 -0
- package/dist/cloud/db/drizzle.d.ts +215 -0
- package/dist/cloud/db/drizzle.d.ts.map +1 -0
- package/dist/cloud/db/drizzle.js +1083 -0
- package/dist/cloud/db/drizzle.js.map +1 -0
- package/dist/cloud/db/index.d.ts +35 -0
- package/dist/cloud/db/index.d.ts.map +1 -0
- package/dist/cloud/db/index.js +52 -0
- package/dist/cloud/db/index.js.map +1 -0
- package/dist/cloud/db/schema.d.ts +4519 -0
- package/dist/cloud/db/schema.d.ts.map +1 -0
- package/dist/cloud/db/schema.js +547 -0
- package/dist/cloud/db/schema.js.map +1 -0
- package/dist/cloud/index.d.ts +12 -0
- package/dist/cloud/index.d.ts.map +1 -0
- package/dist/cloud/index.js +39 -0
- package/dist/cloud/index.js.map +1 -0
- package/dist/cloud/provisioner/index.d.ts +75 -0
- package/dist/cloud/provisioner/index.d.ts.map +1 -0
- package/dist/cloud/provisioner/index.js +977 -0
- package/dist/cloud/provisioner/index.js.map +1 -0
- package/dist/cloud/server.d.ts +17 -0
- package/dist/cloud/server.d.ts.map +1 -0
- package/dist/cloud/server.js +534 -0
- package/dist/cloud/server.js.map +1 -0
- package/dist/cloud/services/auto-scaler.d.ts +152 -0
- package/dist/cloud/services/auto-scaler.d.ts.map +1 -0
- package/dist/cloud/services/auto-scaler.js +439 -0
- package/dist/cloud/services/auto-scaler.js.map +1 -0
- package/dist/cloud/services/capacity-manager.d.ts +148 -0
- package/dist/cloud/services/capacity-manager.d.ts.map +1 -0
- package/dist/cloud/services/capacity-manager.js +449 -0
- package/dist/cloud/services/capacity-manager.js.map +1 -0
- package/dist/cloud/services/ci-agent-spawner.d.ts +49 -0
- package/dist/cloud/services/ci-agent-spawner.d.ts.map +1 -0
- package/dist/cloud/services/ci-agent-spawner.js +373 -0
- package/dist/cloud/services/ci-agent-spawner.js.map +1 -0
- package/dist/cloud/services/coordinator.d.ts +62 -0
- package/dist/cloud/services/coordinator.d.ts.map +1 -0
- package/dist/cloud/services/coordinator.js +389 -0
- package/dist/cloud/services/coordinator.js.map +1 -0
- package/dist/cloud/services/index.d.ts +12 -0
- package/dist/cloud/services/index.d.ts.map +1 -0
- package/dist/cloud/services/index.js +15 -0
- package/dist/cloud/services/index.js.map +1 -0
- package/dist/cloud/services/mention-handler.d.ts +65 -0
- package/dist/cloud/services/mention-handler.d.ts.map +1 -0
- package/dist/cloud/services/mention-handler.js +405 -0
- package/dist/cloud/services/mention-handler.js.map +1 -0
- package/dist/cloud/services/nango.d.ts +126 -0
- package/dist/cloud/services/nango.d.ts.map +1 -0
- package/dist/cloud/services/nango.js +191 -0
- package/dist/cloud/services/nango.js.map +1 -0
- package/dist/cloud/services/persistence.d.ts +131 -0
- package/dist/cloud/services/persistence.d.ts.map +1 -0
- package/dist/cloud/services/persistence.js +200 -0
- package/dist/cloud/services/persistence.js.map +1 -0
- package/dist/cloud/services/planLimits.d.ts +125 -0
- package/dist/cloud/services/planLimits.d.ts.map +1 -0
- package/dist/cloud/services/planLimits.js +282 -0
- package/dist/cloud/services/planLimits.js.map +1 -0
- package/dist/cloud/services/scaling-orchestrator.d.ts +159 -0
- package/dist/cloud/services/scaling-orchestrator.d.ts.map +1 -0
- package/dist/cloud/services/scaling-orchestrator.js +502 -0
- package/dist/cloud/services/scaling-orchestrator.js.map +1 -0
- package/dist/cloud/services/scaling-policy.d.ts +121 -0
- package/dist/cloud/services/scaling-policy.d.ts.map +1 -0
- package/dist/cloud/services/scaling-policy.js +415 -0
- package/dist/cloud/services/scaling-policy.js.map +1 -0
- package/dist/cloud/vault/index.d.ts +76 -0
- package/dist/cloud/vault/index.d.ts.map +1 -0
- package/dist/cloud/vault/index.js +219 -0
- package/dist/cloud/vault/index.js.map +1 -0
- package/dist/cloud/webhooks/index.d.ts +24 -0
- package/dist/cloud/webhooks/index.d.ts.map +1 -0
- package/dist/cloud/webhooks/index.js +29 -0
- package/dist/cloud/webhooks/index.js.map +1 -0
- package/dist/cloud/webhooks/parsers/github.d.ts +8 -0
- package/dist/cloud/webhooks/parsers/github.d.ts.map +1 -0
- package/dist/cloud/webhooks/parsers/github.js +234 -0
- package/dist/cloud/webhooks/parsers/github.js.map +1 -0
- package/dist/cloud/webhooks/parsers/index.d.ts +23 -0
- package/dist/cloud/webhooks/parsers/index.d.ts.map +1 -0
- package/dist/cloud/webhooks/parsers/index.js +30 -0
- package/dist/cloud/webhooks/parsers/index.js.map +1 -0
- package/dist/cloud/webhooks/parsers/linear.d.ts +9 -0
- package/dist/cloud/webhooks/parsers/linear.d.ts.map +1 -0
- package/dist/cloud/webhooks/parsers/linear.js +258 -0
- package/dist/cloud/webhooks/parsers/linear.js.map +1 -0
- package/dist/cloud/webhooks/parsers/slack.d.ts +9 -0
- package/dist/cloud/webhooks/parsers/slack.d.ts.map +1 -0
- package/dist/cloud/webhooks/parsers/slack.js +214 -0
- package/dist/cloud/webhooks/parsers/slack.js.map +1 -0
- package/dist/cloud/webhooks/responders/github.d.ts +8 -0
- package/dist/cloud/webhooks/responders/github.d.ts.map +1 -0
- package/dist/cloud/webhooks/responders/github.js +73 -0
- package/dist/cloud/webhooks/responders/github.js.map +1 -0
- package/dist/cloud/webhooks/responders/index.d.ts +23 -0
- package/dist/cloud/webhooks/responders/index.d.ts.map +1 -0
- package/dist/cloud/webhooks/responders/index.js +30 -0
- package/dist/cloud/webhooks/responders/index.js.map +1 -0
- package/dist/cloud/webhooks/responders/linear.d.ts +9 -0
- package/dist/cloud/webhooks/responders/linear.d.ts.map +1 -0
- package/dist/cloud/webhooks/responders/linear.js +149 -0
- package/dist/cloud/webhooks/responders/linear.js.map +1 -0
- package/dist/cloud/webhooks/responders/slack.d.ts +20 -0
- package/dist/cloud/webhooks/responders/slack.d.ts.map +1 -0
- package/dist/cloud/webhooks/responders/slack.js +178 -0
- package/dist/cloud/webhooks/responders/slack.js.map +1 -0
- package/dist/cloud/webhooks/router.d.ts +25 -0
- package/dist/cloud/webhooks/router.d.ts.map +1 -0
- package/dist/cloud/webhooks/router.js +504 -0
- package/dist/cloud/webhooks/router.js.map +1 -0
- package/dist/cloud/webhooks/rules-engine.d.ts +24 -0
- package/dist/cloud/webhooks/rules-engine.d.ts.map +1 -0
- package/dist/cloud/webhooks/rules-engine.js +287 -0
- package/dist/cloud/webhooks/rules-engine.js.map +1 -0
- package/dist/cloud/webhooks/types.d.ts +186 -0
- package/dist/cloud/webhooks/types.d.ts.map +1 -0
- package/dist/cloud/webhooks/types.js +8 -0
- package/dist/cloud/webhooks/types.js.map +1 -0
- package/dist/continuity/formatter.d.ts +51 -0
- package/dist/continuity/formatter.d.ts.map +1 -0
- package/dist/continuity/formatter.js +313 -0
- package/dist/continuity/formatter.js.map +1 -0
- package/dist/continuity/handoff-store.d.ts +67 -0
- package/dist/continuity/handoff-store.d.ts.map +1 -0
- package/dist/continuity/handoff-store.js +472 -0
- package/dist/continuity/handoff-store.js.map +1 -0
- package/dist/continuity/index.d.ts +45 -0
- package/dist/continuity/index.d.ts.map +1 -0
- package/dist/continuity/index.js +48 -0
- package/dist/continuity/index.js.map +1 -0
- package/dist/continuity/ledger-store.d.ts +110 -0
- package/dist/continuity/ledger-store.d.ts.map +1 -0
- package/dist/continuity/ledger-store.js +500 -0
- package/dist/continuity/ledger-store.js.map +1 -0
- package/dist/continuity/manager.d.ts +178 -0
- package/dist/continuity/manager.d.ts.map +1 -0
- package/dist/continuity/manager.js +562 -0
- package/dist/continuity/manager.js.map +1 -0
- package/dist/continuity/parser.d.ts +76 -0
- package/dist/continuity/parser.d.ts.map +1 -0
- package/dist/continuity/parser.js +579 -0
- package/dist/continuity/parser.js.map +1 -0
- package/dist/continuity/types.d.ts +180 -0
- package/dist/continuity/types.d.ts.map +1 -0
- package/dist/continuity/types.js +9 -0
- package/dist/continuity/types.js.map +1 -0
- package/dist/daemon/agent-manager.d.ts +114 -0
- package/dist/daemon/agent-manager.d.ts.map +1 -0
- package/dist/daemon/agent-manager.js +513 -0
- package/dist/daemon/agent-manager.js.map +1 -0
- package/dist/daemon/agent-registry.d.ts +34 -0
- package/dist/daemon/agent-registry.d.ts.map +1 -1
- package/dist/daemon/agent-registry.js +45 -2
- package/dist/daemon/agent-registry.js.map +1 -1
- package/dist/daemon/api.d.ts +81 -0
- package/dist/daemon/api.d.ts.map +1 -0
- package/dist/daemon/api.js +554 -0
- package/dist/daemon/api.js.map +1 -0
- package/dist/daemon/cli-auth.d.ts +67 -0
- package/dist/daemon/cli-auth.d.ts.map +1 -0
- package/dist/daemon/cli-auth.js +537 -0
- package/dist/daemon/cli-auth.js.map +1 -0
- package/dist/daemon/cloud-sync.d.ts +101 -0
- package/dist/daemon/cloud-sync.d.ts.map +1 -0
- package/dist/daemon/cloud-sync.js +263 -0
- package/dist/daemon/cloud-sync.js.map +1 -0
- package/dist/daemon/index.d.ts +4 -0
- package/dist/daemon/index.d.ts.map +1 -1
- package/dist/daemon/index.js +6 -0
- package/dist/daemon/index.js.map +1 -1
- package/dist/daemon/orchestrator.d.ts +155 -0
- package/dist/daemon/orchestrator.d.ts.map +1 -0
- package/dist/daemon/orchestrator.js +766 -0
- package/dist/daemon/orchestrator.js.map +1 -0
- package/dist/daemon/router.d.ts +29 -0
- package/dist/daemon/router.d.ts.map +1 -1
- package/dist/daemon/router.js +143 -21
- package/dist/daemon/router.js.map +1 -1
- package/dist/daemon/server.d.ts +42 -0
- package/dist/daemon/server.d.ts.map +1 -1
- package/dist/daemon/server.js +199 -16
- package/dist/daemon/server.js.map +1 -1
- package/dist/daemon/services/browser-testing.d.ts +88 -0
- package/dist/daemon/services/browser-testing.d.ts.map +1 -0
- package/dist/daemon/services/browser-testing.js +244 -0
- package/dist/daemon/services/browser-testing.js.map +1 -0
- package/dist/daemon/services/container-spawner.d.ts +135 -0
- package/dist/daemon/services/container-spawner.d.ts.map +1 -0
- package/dist/daemon/services/container-spawner.js +313 -0
- package/dist/daemon/services/container-spawner.js.map +1 -0
- package/dist/daemon/types.d.ts +131 -0
- package/dist/daemon/types.d.ts.map +1 -0
- package/dist/daemon/types.js +6 -0
- package/dist/daemon/types.js.map +1 -0
- package/dist/daemon/workspace-manager.d.ts +75 -0
- package/dist/daemon/workspace-manager.d.ts.map +1 -0
- package/dist/daemon/workspace-manager.js +289 -0
- package/dist/daemon/workspace-manager.js.map +1 -0
- package/dist/dashboard/out/404.html +1 -1
- package/dist/dashboard/out/_next/static/chunks/116-2502180def231162.js +1 -0
- package/dist/dashboard/out/_next/static/chunks/282-980c2eb8fff20123.js +1 -0
- package/dist/dashboard/out/_next/static/chunks/480-2d4111711d4e473c.js +1 -0
- package/dist/dashboard/out/_next/static/chunks/724-73c1ee5f60abe860.js +9 -0
- package/dist/dashboard/out/_next/static/chunks/766-c3a14283c88d815b.js +1 -0
- package/dist/dashboard/out/_next/static/chunks/app/app/page-7120be68bea622f3.js +1 -0
- package/dist/dashboard/out/_next/static/chunks/app/connect-repos/page-dc2e3a1a22478efc.js +1 -0
- package/dist/dashboard/out/_next/static/chunks/app/history/page-56a8b4616a90dc43.js +1 -0
- package/dist/dashboard/out/_next/static/chunks/app/layout-2433bb48965f4333.js +1 -0
- package/dist/dashboard/out/_next/static/chunks/app/login/page-3eac37ea6f5dd153.js +1 -0
- package/dist/dashboard/out/_next/static/chunks/app/metrics/page-1081dd190a331a91.js +1 -0
- package/dist/dashboard/out/_next/static/chunks/app/page-daf87e86f783f980.js +1 -0
- package/dist/dashboard/out/_next/static/chunks/app/pricing/page-4d72d5a5d8a9b618.js +1 -0
- package/dist/dashboard/out/_next/static/chunks/app/providers/page-b68a681526eb145e.js +1 -0
- package/dist/dashboard/out/_next/static/chunks/app/signup/page-fee4ed1709070bcd.js +1 -0
- package/dist/dashboard/out/_next/static/chunks/e868780c-48e5f147c90a3a41.js +18 -0
- package/dist/dashboard/out/_next/static/chunks/{main-e0a1f53fe0617a63.js → main-97850e03d723ea8c.js} +1 -1
- package/dist/dashboard/out/_next/static/chunks/main-app-5d692157a8eb1fd9.js +1 -0
- package/dist/dashboard/out/_next/static/chunks/webpack-1cdd8ed57114d5e1.js +1 -0
- package/dist/dashboard/out/_next/static/css/29852f26181969a0.css +1 -0
- package/dist/dashboard/out/_next/static/css/411ce23ffeae9f76.css +1 -0
- package/dist/dashboard/out/alt-logos/agent-relay-logo-128.png +0 -0
- package/dist/dashboard/out/alt-logos/agent-relay-logo-256.png +0 -0
- package/dist/dashboard/out/alt-logos/agent-relay-logo-32.png +0 -0
- package/dist/dashboard/out/alt-logos/agent-relay-logo-512.png +0 -0
- package/dist/dashboard/out/alt-logos/agent-relay-logo-64.png +0 -0
- package/dist/dashboard/out/alt-logos/agent-relay-logo.svg +45 -0
- package/dist/dashboard/out/alt-logos/logo.svg +38 -0
- package/dist/dashboard/out/alt-logos/monogram-logo-128.png +0 -0
- package/dist/dashboard/out/alt-logos/monogram-logo-256.png +0 -0
- package/dist/dashboard/out/alt-logos/monogram-logo-32.png +0 -0
- package/dist/dashboard/out/alt-logos/monogram-logo-512.png +0 -0
- package/dist/dashboard/out/alt-logos/monogram-logo-64.png +0 -0
- package/dist/dashboard/out/alt-logos/monogram-logo.svg +38 -0
- package/dist/dashboard/out/app.html +1 -0
- package/dist/dashboard/out/app.txt +7 -0
- package/dist/dashboard/out/connect-repos.html +1 -0
- package/dist/dashboard/out/connect-repos.txt +7 -0
- package/dist/dashboard/out/history.html +1 -0
- package/dist/dashboard/out/history.txt +7 -0
- package/dist/dashboard/out/index.html +1 -1
- package/dist/dashboard/out/index.txt +2 -2
- package/dist/dashboard/out/login.html +6 -0
- package/dist/dashboard/out/login.txt +7 -0
- package/dist/dashboard/out/metrics.html +1 -515
- package/dist/dashboard/out/metrics.txt +2 -2
- package/dist/dashboard/out/pricing.html +13 -0
- package/dist/dashboard/out/pricing.txt +7 -0
- package/dist/dashboard/out/providers.html +1 -0
- package/dist/dashboard/out/providers.txt +7 -0
- package/dist/dashboard/out/signup.html +6 -0
- package/dist/dashboard/out/signup.txt +7 -0
- package/dist/dashboard-server/metrics.d.ts.map +1 -1
- package/dist/dashboard-server/metrics.js +3 -2
- package/dist/dashboard-server/metrics.js.map +1 -1
- package/dist/dashboard-server/server.d.ts.map +1 -1
- package/dist/dashboard-server/server.js +2653 -130
- package/dist/dashboard-server/server.js.map +1 -1
- package/dist/hooks/emitter.d.ts +40 -0
- package/dist/hooks/emitter.d.ts.map +1 -0
- package/dist/hooks/emitter.js +63 -0
- package/dist/hooks/emitter.js.map +1 -0
- package/dist/hooks/index.d.ts +3 -0
- package/dist/hooks/index.d.ts.map +1 -1
- package/dist/hooks/index.js +3 -0
- package/dist/hooks/index.js.map +1 -1
- package/dist/hooks/registry.d.ts +173 -0
- package/dist/hooks/registry.d.ts.map +1 -0
- package/dist/hooks/registry.js +476 -0
- package/dist/hooks/registry.js.map +1 -0
- package/dist/hooks/trajectory-hooks.d.ts +52 -0
- package/dist/hooks/trajectory-hooks.d.ts.map +1 -0
- package/dist/hooks/trajectory-hooks.js +183 -0
- package/dist/hooks/trajectory-hooks.js.map +1 -0
- package/dist/hooks/types.d.ts +141 -0
- package/dist/hooks/types.d.ts.map +1 -1
- package/dist/index.d.ts +2 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +3 -0
- package/dist/index.js.map +1 -1
- package/dist/memory/adapters/index.d.ts +8 -0
- package/dist/memory/adapters/index.d.ts.map +1 -0
- package/dist/memory/adapters/index.js +8 -0
- package/dist/memory/adapters/index.js.map +1 -0
- package/dist/memory/adapters/inmemory.d.ts +59 -0
- package/dist/memory/adapters/inmemory.d.ts.map +1 -0
- package/dist/memory/adapters/inmemory.js +195 -0
- package/dist/memory/adapters/inmemory.js.map +1 -0
- package/dist/memory/adapters/supermemory.d.ts +71 -0
- package/dist/memory/adapters/supermemory.d.ts.map +1 -0
- package/dist/memory/adapters/supermemory.js +338 -0
- package/dist/memory/adapters/supermemory.js.map +1 -0
- package/dist/memory/factory.d.ts +48 -0
- package/dist/memory/factory.d.ts.map +1 -0
- package/dist/memory/factory.js +143 -0
- package/dist/memory/factory.js.map +1 -0
- package/dist/memory/index.d.ts +32 -0
- package/dist/memory/index.d.ts.map +1 -0
- package/dist/memory/index.js +32 -0
- package/dist/memory/index.js.map +1 -0
- package/dist/memory/memory-hooks.d.ts +60 -0
- package/dist/memory/memory-hooks.d.ts.map +1 -0
- package/dist/memory/memory-hooks.js +313 -0
- package/dist/memory/memory-hooks.js.map +1 -0
- package/dist/memory/service.d.ts +49 -0
- package/dist/memory/service.d.ts.map +1 -0
- package/dist/memory/service.js +146 -0
- package/dist/memory/service.js.map +1 -0
- package/dist/memory/types.d.ts +195 -0
- package/dist/memory/types.d.ts.map +1 -0
- package/dist/memory/types.js +8 -0
- package/dist/memory/types.js.map +1 -0
- package/dist/policy/agent-policy.d.ts +225 -0
- package/dist/policy/agent-policy.d.ts.map +1 -0
- package/dist/policy/agent-policy.js +665 -0
- package/dist/policy/agent-policy.js.map +1 -0
- package/dist/policy/cloud-policy-fetcher.d.ts +12 -0
- package/dist/policy/cloud-policy-fetcher.d.ts.map +1 -0
- package/dist/policy/cloud-policy-fetcher.js +64 -0
- package/dist/policy/cloud-policy-fetcher.js.map +1 -0
- package/dist/protocol/types.d.ts +10 -1
- package/dist/protocol/types.d.ts.map +1 -1
- package/dist/resiliency/context-persistence.d.ts +140 -0
- package/dist/resiliency/context-persistence.d.ts.map +1 -0
- package/dist/resiliency/context-persistence.js +397 -0
- package/dist/resiliency/context-persistence.js.map +1 -0
- package/dist/resiliency/crash-insights.d.ts +156 -0
- package/dist/resiliency/crash-insights.d.ts.map +1 -0
- package/dist/resiliency/crash-insights.js +492 -0
- package/dist/resiliency/crash-insights.js.map +1 -0
- package/dist/resiliency/gossip-health.d.ts +137 -0
- package/dist/resiliency/gossip-health.d.ts.map +1 -0
- package/dist/resiliency/gossip-health.js +241 -0
- package/dist/resiliency/gossip-health.js.map +1 -0
- package/dist/resiliency/health-monitor.d.ts +97 -0
- package/dist/resiliency/health-monitor.d.ts.map +1 -0
- package/dist/resiliency/health-monitor.js +291 -0
- package/dist/resiliency/health-monitor.js.map +1 -0
- package/dist/resiliency/index.d.ts +68 -0
- package/dist/resiliency/index.d.ts.map +1 -0
- package/dist/resiliency/index.js +68 -0
- package/dist/resiliency/index.js.map +1 -0
- package/dist/resiliency/leader-watchdog.d.ts +109 -0
- package/dist/resiliency/leader-watchdog.d.ts.map +1 -0
- package/dist/resiliency/leader-watchdog.js +189 -0
- package/dist/resiliency/leader-watchdog.js.map +1 -0
- package/dist/resiliency/logger.d.ts +114 -0
- package/dist/resiliency/logger.d.ts.map +1 -0
- package/dist/resiliency/logger.js +250 -0
- package/dist/resiliency/logger.js.map +1 -0
- package/dist/resiliency/memory-monitor.d.ts +172 -0
- package/dist/resiliency/memory-monitor.d.ts.map +1 -0
- package/dist/resiliency/memory-monitor.js +593 -0
- package/dist/resiliency/memory-monitor.js.map +1 -0
- package/dist/resiliency/metrics.d.ts +115 -0
- package/dist/resiliency/metrics.d.ts.map +1 -0
- package/dist/resiliency/metrics.js +239 -0
- package/dist/resiliency/metrics.js.map +1 -0
- package/dist/resiliency/provider-context.d.ts +100 -0
- package/dist/resiliency/provider-context.d.ts.map +1 -0
- package/dist/resiliency/provider-context.js +360 -0
- package/dist/resiliency/provider-context.js.map +1 -0
- package/dist/resiliency/stateless-lead.d.ts +149 -0
- package/dist/resiliency/stateless-lead.d.ts.map +1 -0
- package/dist/resiliency/stateless-lead.js +308 -0
- package/dist/resiliency/stateless-lead.js.map +1 -0
- package/dist/resiliency/supervisor.d.ts +147 -0
- package/dist/resiliency/supervisor.d.ts.map +1 -0
- package/dist/resiliency/supervisor.js +459 -0
- package/dist/resiliency/supervisor.js.map +1 -0
- package/dist/shared/cli-auth-config.d.ts +91 -0
- package/dist/shared/cli-auth-config.d.ts.map +1 -0
- package/dist/shared/cli-auth-config.js +264 -0
- package/dist/shared/cli-auth-config.js.map +1 -0
- package/dist/storage/adapter.d.ts +3 -1
- package/dist/storage/adapter.d.ts.map +1 -1
- package/dist/storage/adapter.js +12 -2
- package/dist/storage/adapter.js.map +1 -1
- package/dist/storage/sqlite-adapter.d.ts.map +1 -1
- package/dist/storage/sqlite-adapter.js +18 -14
- package/dist/storage/sqlite-adapter.js.map +1 -1
- package/dist/trajectory/config.d.ts +84 -0
- package/dist/trajectory/config.d.ts.map +1 -0
- package/dist/trajectory/config.js +163 -0
- package/dist/trajectory/config.js.map +1 -0
- package/dist/trajectory/index.d.ts +8 -0
- package/dist/trajectory/index.d.ts.map +1 -0
- package/dist/trajectory/index.js +8 -0
- package/dist/trajectory/index.js.map +1 -0
- package/dist/trajectory/integration.d.ts +292 -0
- package/dist/trajectory/integration.d.ts.map +1 -0
- package/dist/trajectory/integration.js +834 -0
- package/dist/trajectory/integration.js.map +1 -0
- package/dist/utils/index.d.ts +1 -0
- package/dist/utils/index.d.ts.map +1 -1
- package/dist/utils/index.js +1 -0
- package/dist/utils/index.js.map +1 -1
- package/dist/utils/logger.d.ts +40 -0
- package/dist/utils/logger.d.ts.map +1 -0
- package/dist/utils/logger.js +84 -0
- package/dist/utils/logger.js.map +1 -0
- package/dist/utils/project-namespace.d.ts +24 -0
- package/dist/utils/project-namespace.d.ts.map +1 -1
- package/dist/utils/project-namespace.js +84 -0
- package/dist/utils/project-namespace.js.map +1 -1
- package/dist/wrapper/client.d.ts +16 -1
- package/dist/wrapper/client.d.ts.map +1 -1
- package/dist/wrapper/client.js +32 -1
- package/dist/wrapper/client.js.map +1 -1
- package/dist/wrapper/parser.d.ts +13 -0
- package/dist/wrapper/parser.d.ts.map +1 -1
- package/dist/wrapper/parser.js +217 -47
- package/dist/wrapper/parser.js.map +1 -1
- package/dist/wrapper/pty-wrapper.d.ts +219 -17
- package/dist/wrapper/pty-wrapper.d.ts.map +1 -1
- package/dist/wrapper/pty-wrapper.js +1050 -104
- package/dist/wrapper/pty-wrapper.js.map +1 -1
- package/dist/wrapper/shared.d.ts +165 -0
- package/dist/wrapper/shared.d.ts.map +1 -0
- package/dist/wrapper/shared.js +270 -0
- package/dist/wrapper/shared.js.map +1 -0
- package/dist/wrapper/tmux-wrapper.d.ts +78 -11
- package/dist/wrapper/tmux-wrapper.d.ts.map +1 -1
- package/dist/wrapper/tmux-wrapper.js +567 -106
- package/dist/wrapper/tmux-wrapper.js.map +1 -1
- package/docs/CLOUD-ARCHITECTURE.md +804 -0
- package/docs/CLOUD-ONBOARDING-DESIGN.md +1983 -0
- package/docs/HOOKS_API.md +394 -0
- package/docs/WRAPPER_EVENTS.md +358 -0
- package/docs/agent-policy-snippet.md +40 -0
- package/docs/agent-relay-protocol.md +238 -0
- package/docs/agent-relay-snippet.md +115 -6
- package/docs/archive/EXECUTIVE_SUMMARY.md +358 -0
- package/docs/archive/ROADMAP.md +329 -0
- package/docs/archive/TESTING_PRESENCE_FEATURES.md +327 -0
- package/docs/competitive/GASTOWN.md +451 -0
- package/docs/{COMPETITIVE_ANALYSIS.md → competitive/OVERVIEW.md} +1 -0
- package/docs/competitive/README.md +34 -0
- package/docs/competitive/TMUX_ORCHESTRATOR.md +605 -0
- package/docs/dashboard.png +0 -0
- package/docs/design/ci-failure-webhooks.md +812 -0
- package/docs/design/comprehensive-integrations.md +238 -0
- package/docs/design/e2b-sandbox-integration.md +504 -0
- package/docs/design/github-app-permissions.md +264 -0
- package/docs/guides/CLOUD.md +236 -0
- package/docs/guides/LOCAL.md +535 -0
- package/docs/guides/SELF-HOSTED.md +494 -0
- package/docs/local-testing.md +428 -0
- package/docs/proposals/continuous-claude-integration.md +622 -0
- package/docs/proposals/custom-commands.md +368 -0
- package/docs/proposals/shadow-as-subagent.md +765 -0
- package/docs/proposals/slack-bot-integration.md +1457 -0
- package/docs/tasks/global-skills-system.tasks.md +230 -0
- package/docs/tasks/webhook-integrations.tasks.md +184 -0
- package/docs/tasks/workspace-capabilities.tasks.md +121 -0
- package/docs/testing/RESILIENCY-TEST-PLAN-2026-01-01.md +366 -0
- package/package.json +45 -7
- package/scripts/cloud-setup.sh +96 -0
- package/scripts/manual-qa.sh +293 -0
- package/scripts/postinstall.js +60 -0
- package/scripts/run-cloud-qa.sh +220 -0
- package/scripts/test-cli-auth/Dockerfile +44 -0
- package/scripts/test-cli-auth/Dockerfile.real +79 -0
- package/scripts/test-cli-auth/README.md +286 -0
- package/scripts/test-cli-auth/ci-test-real-clis.ts +251 -0
- package/scripts/test-cli-auth/ci-test-runner.ts +263 -0
- package/scripts/test-cli-auth/mock-cli.sh +147 -0
- package/scripts/test-cli-auth/package.json +14 -0
- package/scripts/test-cli-auth/test-oauth-flow.ts +220 -0
- package/scripts/test-pty-input-auto.js +222 -0
- package/scripts/test-pty-input.js +150 -0
- package/dist/dashboard/out/_next/static/chunks/app/layout-c9d8c5d95e48c6bf.js +0 -1
- package/dist/dashboard/out/_next/static/chunks/app/metrics/page-8aa9936bc6c771ab.js +0 -1
- package/dist/dashboard/out/_next/static/chunks/app/page-4498be09a5157759.js +0 -1
- package/dist/dashboard/out/_next/static/chunks/main-app-bae2e535de00de50.js +0 -1
- package/dist/dashboard/out/_next/static/chunks/webpack-c81f7fd28659d64f.js +0 -1
- package/dist/dashboard/out/_next/static/css/50ed6996e3df7bdd.css +0 -1
- /package/dist/dashboard/out/_next/static/{DXFA-jj8wb3PcY5DX2xcU → H5aWG0udPB4iOUIl_gytz}/_buildManifest.js +0 -0
- /package/dist/dashboard/out/_next/static/{DXFA-jj8wb3PcY5DX2xcU → H5aWG0udPB4iOUIl_gytz}/_ssgManifest.js +0 -0
- /package/dist/dashboard/out/_next/static/chunks/{117-3bef7b19f3e60751.js → 117-b100311aff8d5c61.js} +0 -0
- /package/dist/dashboard/out/_next/static/chunks/{648-6cf686106c891ad3.js → 648-a13d3c2b1be45466.js} +0 -0
- /package/dist/dashboard/out/_next/static/chunks/app/_not-found/{page-8ff6572bc7c9bc61.js → page-a4973f3e3c82fb67.js} +0 -0
- /package/dist/dashboard/out/_next/static/chunks/{fd9d1056-26bd8d656b496dba.js → fd9d1056-bf46c09eb57e019c.js} +0 -0
- /package/docs/{CHANGELOG.md → archive/CHANGELOG.md} +0 -0
- /package/docs/{CLI-SIMPLIFICATION-COMPLETE.md → archive/CLI-SIMPLIFICATION-COMPLETE.md} +0 -0
- /package/docs/{DESIGN_BRIDGE_STAFFING.md → archive/DESIGN_BRIDGE_STAFFING.md} +0 -0
- /package/docs/{DESIGN_V2.md → archive/DESIGN_V2.md} +0 -0
- /package/docs/{MONETIZATION.md → archive/MONETIZATION.md} +0 -0
- /package/docs/{PROPOSAL-trajectories.md → archive/PROPOSAL-trajectories.md} +0 -0
- /package/docs/{SCALING_ANALYSIS.md → archive/SCALING_ANALYSIS.md} +0 -0
- /package/docs/{TMUX_IMPLEMENTATION_NOTES.md → archive/TMUX_IMPLEMENTATION_NOTES.md} +0 -0
- /package/docs/{TMUX_IMPROVEMENTS.md → archive/TMUX_IMPROVEMENTS.md} +0 -0
- /package/docs/{dashboard-v2-plan.md → archive/dashboard-v2-plan.md} +0 -0
- /package/docs/{removable-code-analysis.md → archive/removable-code-analysis.md} +0 -0
- /package/docs/{competitive-analysis-mcp-agent-mail.md → competitive/MCP_AGENT_MAIL.md} +0 -0
|
@@ -0,0 +1,1083 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Agent Relay Cloud - Drizzle Database Client
|
|
3
|
+
*
|
|
4
|
+
* Type-safe database access using Drizzle ORM.
|
|
5
|
+
* Use this instead of the raw pg client for new code.
|
|
6
|
+
*/
|
|
7
|
+
import { drizzle } from 'drizzle-orm/node-postgres';
|
|
8
|
+
import { Pool } from 'pg';
|
|
9
|
+
import { eq, and, sql, desc, lt, isNull, isNotNull } from 'drizzle-orm';
|
|
10
|
+
import * as schema from './schema.js';
|
|
11
|
+
import { getConfig } from '../config.js';
|
|
12
|
+
// Re-export schema for direct table access
|
|
13
|
+
export * from './schema.js';
|
|
14
|
+
// Initialize pool and drizzle lazily
|
|
15
|
+
let pool = null;
|
|
16
|
+
let drizzleDb = null;
|
|
17
|
+
function getPool() {
|
|
18
|
+
if (!pool) {
|
|
19
|
+
const config = getConfig();
|
|
20
|
+
pool = new Pool({ connectionString: config.databaseUrl });
|
|
21
|
+
}
|
|
22
|
+
return pool;
|
|
23
|
+
}
|
|
24
|
+
export function getDb() {
|
|
25
|
+
if (!drizzleDb) {
|
|
26
|
+
drizzleDb = drizzle(getPool(), { schema });
|
|
27
|
+
}
|
|
28
|
+
return drizzleDb;
|
|
29
|
+
}
|
|
30
|
+
export const userQueries = {
|
|
31
|
+
async findById(id) {
|
|
32
|
+
const db = getDb();
|
|
33
|
+
const result = await db.select().from(schema.users).where(eq(schema.users.id, id));
|
|
34
|
+
return result[0] ?? null;
|
|
35
|
+
},
|
|
36
|
+
async findByGithubId(githubId) {
|
|
37
|
+
const db = getDb();
|
|
38
|
+
const result = await db.select().from(schema.users).where(eq(schema.users.githubId, githubId));
|
|
39
|
+
return result[0] ?? null;
|
|
40
|
+
},
|
|
41
|
+
async findByGithubUsername(username) {
|
|
42
|
+
const db = getDb();
|
|
43
|
+
const result = await db.select().from(schema.users).where(eq(schema.users.githubUsername, username));
|
|
44
|
+
return result[0] ?? null;
|
|
45
|
+
},
|
|
46
|
+
async findByEmail(email) {
|
|
47
|
+
const db = getDb();
|
|
48
|
+
const result = await db.select().from(schema.users).where(eq(schema.users.email, email));
|
|
49
|
+
return result[0] ?? null;
|
|
50
|
+
},
|
|
51
|
+
async findByNangoConnectionId(connectionId) {
|
|
52
|
+
const db = getDb();
|
|
53
|
+
const result = await db
|
|
54
|
+
.select()
|
|
55
|
+
.from(schema.users)
|
|
56
|
+
.where(eq(schema.users.nangoConnectionId, connectionId));
|
|
57
|
+
return result[0] ?? null;
|
|
58
|
+
},
|
|
59
|
+
async findByIncomingConnectionId(connectionId) {
|
|
60
|
+
const db = getDb();
|
|
61
|
+
const result = await db.select().from(schema.users).where(eq(schema.users.incomingConnectionId, connectionId));
|
|
62
|
+
return result[0] ?? null;
|
|
63
|
+
},
|
|
64
|
+
async upsert(data) {
|
|
65
|
+
const db = getDb();
|
|
66
|
+
const result = await db
|
|
67
|
+
.insert(schema.users)
|
|
68
|
+
.values(data)
|
|
69
|
+
.onConflictDoUpdate({
|
|
70
|
+
target: schema.users.githubId,
|
|
71
|
+
set: {
|
|
72
|
+
githubUsername: data.githubUsername,
|
|
73
|
+
email: data.email,
|
|
74
|
+
avatarUrl: data.avatarUrl,
|
|
75
|
+
updatedAt: new Date(),
|
|
76
|
+
},
|
|
77
|
+
})
|
|
78
|
+
.returning();
|
|
79
|
+
return result[0];
|
|
80
|
+
},
|
|
81
|
+
async completeOnboarding(userId) {
|
|
82
|
+
const db = getDb();
|
|
83
|
+
await db
|
|
84
|
+
.update(schema.users)
|
|
85
|
+
.set({ onboardingCompletedAt: new Date(), updatedAt: new Date() })
|
|
86
|
+
.where(eq(schema.users.id, userId));
|
|
87
|
+
},
|
|
88
|
+
async update(id, data) {
|
|
89
|
+
const db = getDb();
|
|
90
|
+
await db
|
|
91
|
+
.update(schema.users)
|
|
92
|
+
.set({ ...data, updatedAt: new Date() })
|
|
93
|
+
.where(eq(schema.users.id, id));
|
|
94
|
+
},
|
|
95
|
+
async clearIncomingConnectionId(userId) {
|
|
96
|
+
const db = getDb();
|
|
97
|
+
await db
|
|
98
|
+
.update(schema.users)
|
|
99
|
+
.set({ incomingConnectionId: null, updatedAt: new Date() })
|
|
100
|
+
.where(eq(schema.users.id, userId));
|
|
101
|
+
},
|
|
102
|
+
async setPendingInstallationRequest(userId) {
|
|
103
|
+
const db = getDb();
|
|
104
|
+
await db
|
|
105
|
+
.update(schema.users)
|
|
106
|
+
.set({ pendingInstallationRequest: new Date(), updatedAt: new Date() })
|
|
107
|
+
.where(eq(schema.users.id, userId));
|
|
108
|
+
},
|
|
109
|
+
async clearPendingInstallationRequest(userId) {
|
|
110
|
+
const db = getDb();
|
|
111
|
+
await db
|
|
112
|
+
.update(schema.users)
|
|
113
|
+
.set({ pendingInstallationRequest: null, updatedAt: new Date() })
|
|
114
|
+
.where(eq(schema.users.id, userId));
|
|
115
|
+
},
|
|
116
|
+
};
|
|
117
|
+
export const githubInstallationQueries = {
|
|
118
|
+
async findById(id) {
|
|
119
|
+
const db = getDb();
|
|
120
|
+
const result = await db.select().from(schema.githubInstallations).where(eq(schema.githubInstallations.id, id));
|
|
121
|
+
return result[0] ?? null;
|
|
122
|
+
},
|
|
123
|
+
async findByInstallationId(installationId) {
|
|
124
|
+
const db = getDb();
|
|
125
|
+
const result = await db
|
|
126
|
+
.select()
|
|
127
|
+
.from(schema.githubInstallations)
|
|
128
|
+
.where(eq(schema.githubInstallations.installationId, installationId));
|
|
129
|
+
return result[0] ?? null;
|
|
130
|
+
},
|
|
131
|
+
async findByAccountLogin(accountLogin) {
|
|
132
|
+
const db = getDb();
|
|
133
|
+
const result = await db
|
|
134
|
+
.select()
|
|
135
|
+
.from(schema.githubInstallations)
|
|
136
|
+
.where(eq(schema.githubInstallations.accountLogin, accountLogin));
|
|
137
|
+
return result[0] ?? null;
|
|
138
|
+
},
|
|
139
|
+
async findByInstalledBy(userId) {
|
|
140
|
+
const db = getDb();
|
|
141
|
+
return db
|
|
142
|
+
.select()
|
|
143
|
+
.from(schema.githubInstallations)
|
|
144
|
+
.where(eq(schema.githubInstallations.installedById, userId));
|
|
145
|
+
},
|
|
146
|
+
async findAll() {
|
|
147
|
+
const db = getDb();
|
|
148
|
+
return db.select().from(schema.githubInstallations).orderBy(schema.githubInstallations.accountLogin);
|
|
149
|
+
},
|
|
150
|
+
async upsert(data) {
|
|
151
|
+
const db = getDb();
|
|
152
|
+
const result = await db
|
|
153
|
+
.insert(schema.githubInstallations)
|
|
154
|
+
.values(data)
|
|
155
|
+
.onConflictDoUpdate({
|
|
156
|
+
target: schema.githubInstallations.installationId,
|
|
157
|
+
set: {
|
|
158
|
+
accountType: data.accountType,
|
|
159
|
+
accountLogin: data.accountLogin,
|
|
160
|
+
accountId: data.accountId,
|
|
161
|
+
permissions: data.permissions,
|
|
162
|
+
events: data.events,
|
|
163
|
+
installedById: data.installedById,
|
|
164
|
+
updatedAt: new Date(),
|
|
165
|
+
},
|
|
166
|
+
})
|
|
167
|
+
.returning();
|
|
168
|
+
return result[0];
|
|
169
|
+
},
|
|
170
|
+
async updatePermissions(installationId, permissions, events) {
|
|
171
|
+
const db = getDb();
|
|
172
|
+
await db
|
|
173
|
+
.update(schema.githubInstallations)
|
|
174
|
+
.set({ permissions, events, updatedAt: new Date() })
|
|
175
|
+
.where(eq(schema.githubInstallations.installationId, installationId));
|
|
176
|
+
},
|
|
177
|
+
async suspend(installationId, suspendedBy) {
|
|
178
|
+
const db = getDb();
|
|
179
|
+
await db
|
|
180
|
+
.update(schema.githubInstallations)
|
|
181
|
+
.set({ suspended: true, suspendedAt: new Date(), suspendedBy, updatedAt: new Date() })
|
|
182
|
+
.where(eq(schema.githubInstallations.installationId, installationId));
|
|
183
|
+
},
|
|
184
|
+
async unsuspend(installationId) {
|
|
185
|
+
const db = getDb();
|
|
186
|
+
await db
|
|
187
|
+
.update(schema.githubInstallations)
|
|
188
|
+
.set({ suspended: false, suspendedAt: null, suspendedBy: null, updatedAt: new Date() })
|
|
189
|
+
.where(eq(schema.githubInstallations.installationId, installationId));
|
|
190
|
+
},
|
|
191
|
+
async delete(installationId) {
|
|
192
|
+
const db = getDb();
|
|
193
|
+
await db.delete(schema.githubInstallations).where(eq(schema.githubInstallations.installationId, installationId));
|
|
194
|
+
},
|
|
195
|
+
};
|
|
196
|
+
export const credentialQueries = {
|
|
197
|
+
async findByUserId(userId) {
|
|
198
|
+
const db = getDb();
|
|
199
|
+
return db.select().from(schema.credentials).where(eq(schema.credentials.userId, userId));
|
|
200
|
+
},
|
|
201
|
+
async findByUserAndProvider(userId, provider) {
|
|
202
|
+
const db = getDb();
|
|
203
|
+
const result = await db
|
|
204
|
+
.select()
|
|
205
|
+
.from(schema.credentials)
|
|
206
|
+
.where(and(eq(schema.credentials.userId, userId), eq(schema.credentials.provider, provider)));
|
|
207
|
+
return result[0] ?? null;
|
|
208
|
+
},
|
|
209
|
+
async upsert(data) {
|
|
210
|
+
const db = getDb();
|
|
211
|
+
const result = await db
|
|
212
|
+
.insert(schema.credentials)
|
|
213
|
+
.values(data)
|
|
214
|
+
.onConflictDoUpdate({
|
|
215
|
+
target: [schema.credentials.userId, schema.credentials.provider],
|
|
216
|
+
set: {
|
|
217
|
+
accessToken: data.accessToken,
|
|
218
|
+
refreshToken: data.refreshToken ?? sql `credentials.refresh_token`,
|
|
219
|
+
tokenExpiresAt: data.tokenExpiresAt,
|
|
220
|
+
scopes: data.scopes,
|
|
221
|
+
providerAccountId: data.providerAccountId,
|
|
222
|
+
providerAccountEmail: data.providerAccountEmail,
|
|
223
|
+
updatedAt: new Date(),
|
|
224
|
+
},
|
|
225
|
+
})
|
|
226
|
+
.returning();
|
|
227
|
+
return result[0];
|
|
228
|
+
},
|
|
229
|
+
async updateTokens(userId, provider, accessToken, refreshToken, expiresAt) {
|
|
230
|
+
const db = getDb();
|
|
231
|
+
const updates = {
|
|
232
|
+
accessToken,
|
|
233
|
+
updatedAt: new Date(),
|
|
234
|
+
};
|
|
235
|
+
if (refreshToken !== undefined) {
|
|
236
|
+
updates.refreshToken = refreshToken;
|
|
237
|
+
}
|
|
238
|
+
if (expiresAt !== undefined) {
|
|
239
|
+
updates.tokenExpiresAt = expiresAt;
|
|
240
|
+
}
|
|
241
|
+
await db
|
|
242
|
+
.update(schema.credentials)
|
|
243
|
+
.set(updates)
|
|
244
|
+
.where(and(eq(schema.credentials.userId, userId), eq(schema.credentials.provider, provider)));
|
|
245
|
+
},
|
|
246
|
+
async delete(userId, provider) {
|
|
247
|
+
const db = getDb();
|
|
248
|
+
await db
|
|
249
|
+
.delete(schema.credentials)
|
|
250
|
+
.where(and(eq(schema.credentials.userId, userId), eq(schema.credentials.provider, provider)));
|
|
251
|
+
},
|
|
252
|
+
};
|
|
253
|
+
export const workspaceQueries = {
|
|
254
|
+
async findById(id) {
|
|
255
|
+
const db = getDb();
|
|
256
|
+
const result = await db.select().from(schema.workspaces).where(eq(schema.workspaces.id, id));
|
|
257
|
+
return result[0] ?? null;
|
|
258
|
+
},
|
|
259
|
+
async findByUserId(userId) {
|
|
260
|
+
const db = getDb();
|
|
261
|
+
return db
|
|
262
|
+
.select()
|
|
263
|
+
.from(schema.workspaces)
|
|
264
|
+
.where(eq(schema.workspaces.userId, userId))
|
|
265
|
+
.orderBy(desc(schema.workspaces.createdAt));
|
|
266
|
+
},
|
|
267
|
+
async findByCustomDomain(domain) {
|
|
268
|
+
const db = getDb();
|
|
269
|
+
const result = await db
|
|
270
|
+
.select()
|
|
271
|
+
.from(schema.workspaces)
|
|
272
|
+
.where(eq(schema.workspaces.customDomain, domain));
|
|
273
|
+
return result[0] ?? null;
|
|
274
|
+
},
|
|
275
|
+
async create(data) {
|
|
276
|
+
const db = getDb();
|
|
277
|
+
const result = await db.insert(schema.workspaces).values(data).returning();
|
|
278
|
+
return result[0];
|
|
279
|
+
},
|
|
280
|
+
async updateStatus(id, status, options) {
|
|
281
|
+
const db = getDb();
|
|
282
|
+
await db
|
|
283
|
+
.update(schema.workspaces)
|
|
284
|
+
.set({
|
|
285
|
+
status,
|
|
286
|
+
computeId: options?.computeId,
|
|
287
|
+
publicUrl: options?.publicUrl,
|
|
288
|
+
errorMessage: options?.errorMessage,
|
|
289
|
+
updatedAt: new Date(),
|
|
290
|
+
})
|
|
291
|
+
.where(eq(schema.workspaces.id, id));
|
|
292
|
+
},
|
|
293
|
+
async updateConfig(id, config) {
|
|
294
|
+
const db = getDb();
|
|
295
|
+
await db
|
|
296
|
+
.update(schema.workspaces)
|
|
297
|
+
.set({
|
|
298
|
+
config,
|
|
299
|
+
updatedAt: new Date(),
|
|
300
|
+
})
|
|
301
|
+
.where(eq(schema.workspaces.id, id));
|
|
302
|
+
},
|
|
303
|
+
async setCustomDomain(id, customDomain, status = 'pending') {
|
|
304
|
+
const db = getDb();
|
|
305
|
+
await db
|
|
306
|
+
.update(schema.workspaces)
|
|
307
|
+
.set({ customDomain, customDomainStatus: status, updatedAt: new Date() })
|
|
308
|
+
.where(eq(schema.workspaces.id, id));
|
|
309
|
+
},
|
|
310
|
+
async updateCustomDomainStatus(id, status) {
|
|
311
|
+
const db = getDb();
|
|
312
|
+
await db
|
|
313
|
+
.update(schema.workspaces)
|
|
314
|
+
.set({ customDomainStatus: status, updatedAt: new Date() })
|
|
315
|
+
.where(eq(schema.workspaces.id, id));
|
|
316
|
+
},
|
|
317
|
+
async removeCustomDomain(id) {
|
|
318
|
+
const db = getDb();
|
|
319
|
+
await db
|
|
320
|
+
.update(schema.workspaces)
|
|
321
|
+
.set({ customDomain: null, customDomainStatus: null, updatedAt: new Date() })
|
|
322
|
+
.where(eq(schema.workspaces.id, id));
|
|
323
|
+
},
|
|
324
|
+
async delete(id) {
|
|
325
|
+
const db = getDb();
|
|
326
|
+
await db.delete(schema.workspaces).where(eq(schema.workspaces.id, id));
|
|
327
|
+
},
|
|
328
|
+
};
|
|
329
|
+
export const workspaceMemberQueries = {
|
|
330
|
+
async findByWorkspaceId(workspaceId) {
|
|
331
|
+
const db = getDb();
|
|
332
|
+
return db
|
|
333
|
+
.select()
|
|
334
|
+
.from(schema.workspaceMembers)
|
|
335
|
+
.where(eq(schema.workspaceMembers.workspaceId, workspaceId));
|
|
336
|
+
},
|
|
337
|
+
async findByUserId(userId) {
|
|
338
|
+
const db = getDb();
|
|
339
|
+
return db
|
|
340
|
+
.select()
|
|
341
|
+
.from(schema.workspaceMembers)
|
|
342
|
+
.where(and(eq(schema.workspaceMembers.userId, userId), isNotNull(schema.workspaceMembers.acceptedAt)));
|
|
343
|
+
},
|
|
344
|
+
async findMembership(workspaceId, userId) {
|
|
345
|
+
const db = getDb();
|
|
346
|
+
const result = await db
|
|
347
|
+
.select()
|
|
348
|
+
.from(schema.workspaceMembers)
|
|
349
|
+
.where(and(eq(schema.workspaceMembers.workspaceId, workspaceId), eq(schema.workspaceMembers.userId, userId)));
|
|
350
|
+
return result[0] ?? null;
|
|
351
|
+
},
|
|
352
|
+
async addMember(data) {
|
|
353
|
+
const db = getDb();
|
|
354
|
+
const result = await db
|
|
355
|
+
.insert(schema.workspaceMembers)
|
|
356
|
+
.values({
|
|
357
|
+
workspaceId: data.workspaceId,
|
|
358
|
+
userId: data.userId,
|
|
359
|
+
role: data.role,
|
|
360
|
+
invitedBy: data.invitedBy,
|
|
361
|
+
})
|
|
362
|
+
.returning();
|
|
363
|
+
return result[0];
|
|
364
|
+
},
|
|
365
|
+
async acceptInvite(workspaceId, userId) {
|
|
366
|
+
const db = getDb();
|
|
367
|
+
await db
|
|
368
|
+
.update(schema.workspaceMembers)
|
|
369
|
+
.set({ acceptedAt: new Date() })
|
|
370
|
+
.where(and(eq(schema.workspaceMembers.workspaceId, workspaceId), eq(schema.workspaceMembers.userId, userId)));
|
|
371
|
+
},
|
|
372
|
+
async updateRole(workspaceId, userId, role) {
|
|
373
|
+
const db = getDb();
|
|
374
|
+
await db
|
|
375
|
+
.update(schema.workspaceMembers)
|
|
376
|
+
.set({ role })
|
|
377
|
+
.where(and(eq(schema.workspaceMembers.workspaceId, workspaceId), eq(schema.workspaceMembers.userId, userId)));
|
|
378
|
+
},
|
|
379
|
+
async removeMember(workspaceId, userId) {
|
|
380
|
+
const db = getDb();
|
|
381
|
+
await db
|
|
382
|
+
.delete(schema.workspaceMembers)
|
|
383
|
+
.where(and(eq(schema.workspaceMembers.workspaceId, workspaceId), eq(schema.workspaceMembers.userId, userId)));
|
|
384
|
+
},
|
|
385
|
+
async getPendingInvites(userId) {
|
|
386
|
+
const db = getDb();
|
|
387
|
+
return db
|
|
388
|
+
.select()
|
|
389
|
+
.from(schema.workspaceMembers)
|
|
390
|
+
.where(and(eq(schema.workspaceMembers.userId, userId), isNull(schema.workspaceMembers.acceptedAt)));
|
|
391
|
+
},
|
|
392
|
+
async isOwner(workspaceId, userId) {
|
|
393
|
+
const db = getDb();
|
|
394
|
+
const result = await db
|
|
395
|
+
.select()
|
|
396
|
+
.from(schema.workspaceMembers)
|
|
397
|
+
.where(and(eq(schema.workspaceMembers.workspaceId, workspaceId), eq(schema.workspaceMembers.userId, userId), eq(schema.workspaceMembers.role, 'owner')));
|
|
398
|
+
return result.length > 0;
|
|
399
|
+
},
|
|
400
|
+
async canEdit(workspaceId, userId) {
|
|
401
|
+
const db = getDb();
|
|
402
|
+
const result = await db
|
|
403
|
+
.select()
|
|
404
|
+
.from(schema.workspaceMembers)
|
|
405
|
+
.where(and(eq(schema.workspaceMembers.workspaceId, workspaceId), eq(schema.workspaceMembers.userId, userId), isNotNull(schema.workspaceMembers.acceptedAt)));
|
|
406
|
+
const member = result[0];
|
|
407
|
+
return !!member && ['owner', 'admin', 'member'].includes(member.role);
|
|
408
|
+
},
|
|
409
|
+
async canView(workspaceId, userId) {
|
|
410
|
+
const db = getDb();
|
|
411
|
+
const result = await db
|
|
412
|
+
.select()
|
|
413
|
+
.from(schema.workspaceMembers)
|
|
414
|
+
.where(and(eq(schema.workspaceMembers.workspaceId, workspaceId), eq(schema.workspaceMembers.userId, userId), isNotNull(schema.workspaceMembers.acceptedAt)));
|
|
415
|
+
return result.length > 0;
|
|
416
|
+
},
|
|
417
|
+
};
|
|
418
|
+
export const linkedDaemonQueries = {
|
|
419
|
+
async findById(id) {
|
|
420
|
+
const db = getDb();
|
|
421
|
+
const result = await db.select().from(schema.linkedDaemons).where(eq(schema.linkedDaemons.id, id));
|
|
422
|
+
return result[0] ?? null;
|
|
423
|
+
},
|
|
424
|
+
async findByUserId(userId) {
|
|
425
|
+
const db = getDb();
|
|
426
|
+
return db
|
|
427
|
+
.select()
|
|
428
|
+
.from(schema.linkedDaemons)
|
|
429
|
+
.where(eq(schema.linkedDaemons.userId, userId))
|
|
430
|
+
.orderBy(desc(schema.linkedDaemons.lastSeenAt));
|
|
431
|
+
},
|
|
432
|
+
async findByMachineId(userId, machineId) {
|
|
433
|
+
const db = getDb();
|
|
434
|
+
const result = await db
|
|
435
|
+
.select()
|
|
436
|
+
.from(schema.linkedDaemons)
|
|
437
|
+
.where(and(eq(schema.linkedDaemons.userId, userId), eq(schema.linkedDaemons.machineId, machineId)));
|
|
438
|
+
return result[0] ?? null;
|
|
439
|
+
},
|
|
440
|
+
async findByApiKeyHash(apiKeyHash) {
|
|
441
|
+
const db = getDb();
|
|
442
|
+
const result = await db
|
|
443
|
+
.select()
|
|
444
|
+
.from(schema.linkedDaemons)
|
|
445
|
+
.where(eq(schema.linkedDaemons.apiKeyHash, apiKeyHash));
|
|
446
|
+
return result[0] ?? null;
|
|
447
|
+
},
|
|
448
|
+
async create(data) {
|
|
449
|
+
const db = getDb();
|
|
450
|
+
const result = await db
|
|
451
|
+
.insert(schema.linkedDaemons)
|
|
452
|
+
.values({ ...data, lastSeenAt: new Date() })
|
|
453
|
+
.returning();
|
|
454
|
+
return result[0];
|
|
455
|
+
},
|
|
456
|
+
async update(id, data) {
|
|
457
|
+
const db = getDb();
|
|
458
|
+
await db
|
|
459
|
+
.update(schema.linkedDaemons)
|
|
460
|
+
.set({ ...data, updatedAt: new Date() })
|
|
461
|
+
.where(eq(schema.linkedDaemons.id, id));
|
|
462
|
+
},
|
|
463
|
+
async updateLastSeen(id) {
|
|
464
|
+
const db = getDb();
|
|
465
|
+
await db
|
|
466
|
+
.update(schema.linkedDaemons)
|
|
467
|
+
.set({ lastSeenAt: new Date(), status: 'online', updatedAt: new Date() })
|
|
468
|
+
.where(eq(schema.linkedDaemons.id, id));
|
|
469
|
+
},
|
|
470
|
+
async delete(id) {
|
|
471
|
+
const db = getDb();
|
|
472
|
+
await db.delete(schema.linkedDaemons).where(eq(schema.linkedDaemons.id, id));
|
|
473
|
+
},
|
|
474
|
+
async markStale() {
|
|
475
|
+
const db = getDb();
|
|
476
|
+
const twoMinutesAgo = new Date(Date.now() - 2 * 60 * 1000);
|
|
477
|
+
const result = await db
|
|
478
|
+
.update(schema.linkedDaemons)
|
|
479
|
+
.set({ status: 'offline' })
|
|
480
|
+
.where(and(eq(schema.linkedDaemons.status, 'online'), lt(schema.linkedDaemons.lastSeenAt, twoMinutesAgo)));
|
|
481
|
+
return result.rowCount ?? 0;
|
|
482
|
+
},
|
|
483
|
+
async getAllAgentsForUser(userId) {
|
|
484
|
+
const db = getDb();
|
|
485
|
+
const daemons = await db
|
|
486
|
+
.select()
|
|
487
|
+
.from(schema.linkedDaemons)
|
|
488
|
+
.where(eq(schema.linkedDaemons.userId, userId));
|
|
489
|
+
return daemons.map((d) => ({
|
|
490
|
+
daemonId: d.id,
|
|
491
|
+
daemonName: d.name,
|
|
492
|
+
machineId: d.machineId,
|
|
493
|
+
agents: d.metadata?.agents || [],
|
|
494
|
+
}));
|
|
495
|
+
},
|
|
496
|
+
async getPendingUpdates(id) {
|
|
497
|
+
const db = getDb();
|
|
498
|
+
const result = await db.select().from(schema.linkedDaemons).where(eq(schema.linkedDaemons.id, id));
|
|
499
|
+
const daemon = result[0];
|
|
500
|
+
if (!daemon)
|
|
501
|
+
return [];
|
|
502
|
+
const updates = daemon.pendingUpdates || [];
|
|
503
|
+
// Clear after reading
|
|
504
|
+
if (updates.length > 0) {
|
|
505
|
+
await db
|
|
506
|
+
.update(schema.linkedDaemons)
|
|
507
|
+
.set({ pendingUpdates: [] })
|
|
508
|
+
.where(eq(schema.linkedDaemons.id, id));
|
|
509
|
+
}
|
|
510
|
+
return updates;
|
|
511
|
+
},
|
|
512
|
+
async queueUpdate(id, update) {
|
|
513
|
+
const db = getDb();
|
|
514
|
+
const result = await db.select().from(schema.linkedDaemons).where(eq(schema.linkedDaemons.id, id));
|
|
515
|
+
const daemon = result[0];
|
|
516
|
+
if (!daemon)
|
|
517
|
+
return;
|
|
518
|
+
const existing = daemon.pendingUpdates || [];
|
|
519
|
+
await db
|
|
520
|
+
.update(schema.linkedDaemons)
|
|
521
|
+
.set({ pendingUpdates: [...existing, update], updatedAt: new Date() })
|
|
522
|
+
.where(eq(schema.linkedDaemons.id, id));
|
|
523
|
+
},
|
|
524
|
+
async queueMessage(id, message) {
|
|
525
|
+
const db = getDb();
|
|
526
|
+
const result = await db.select().from(schema.linkedDaemons).where(eq(schema.linkedDaemons.id, id));
|
|
527
|
+
const daemon = result[0];
|
|
528
|
+
if (!daemon)
|
|
529
|
+
return;
|
|
530
|
+
const existing = daemon.messageQueue || [];
|
|
531
|
+
await db
|
|
532
|
+
.update(schema.linkedDaemons)
|
|
533
|
+
.set({ messageQueue: [...existing, message], updatedAt: new Date() })
|
|
534
|
+
.where(eq(schema.linkedDaemons.id, id));
|
|
535
|
+
},
|
|
536
|
+
async getQueuedMessages(id) {
|
|
537
|
+
const db = getDb();
|
|
538
|
+
const result = await db.select().from(schema.linkedDaemons).where(eq(schema.linkedDaemons.id, id));
|
|
539
|
+
const daemon = result[0];
|
|
540
|
+
return daemon?.messageQueue || [];
|
|
541
|
+
},
|
|
542
|
+
async clearMessageQueue(id) {
|
|
543
|
+
const db = getDb();
|
|
544
|
+
await db
|
|
545
|
+
.update(schema.linkedDaemons)
|
|
546
|
+
.set({ messageQueue: [] })
|
|
547
|
+
.where(eq(schema.linkedDaemons.id, id));
|
|
548
|
+
},
|
|
549
|
+
};
|
|
550
|
+
export const projectGroupQueries = {
|
|
551
|
+
async findById(id) {
|
|
552
|
+
const db = getDb();
|
|
553
|
+
const result = await db.select().from(schema.projectGroups).where(eq(schema.projectGroups.id, id));
|
|
554
|
+
return result[0] ?? null;
|
|
555
|
+
},
|
|
556
|
+
async findByUserId(userId) {
|
|
557
|
+
const db = getDb();
|
|
558
|
+
return db
|
|
559
|
+
.select()
|
|
560
|
+
.from(schema.projectGroups)
|
|
561
|
+
.where(eq(schema.projectGroups.userId, userId))
|
|
562
|
+
.orderBy(schema.projectGroups.sortOrder, schema.projectGroups.name);
|
|
563
|
+
},
|
|
564
|
+
async findByName(userId, name) {
|
|
565
|
+
const db = getDb();
|
|
566
|
+
const result = await db
|
|
567
|
+
.select()
|
|
568
|
+
.from(schema.projectGroups)
|
|
569
|
+
.where(and(eq(schema.projectGroups.userId, userId), eq(schema.projectGroups.name, name)));
|
|
570
|
+
return result[0] ?? null;
|
|
571
|
+
},
|
|
572
|
+
async create(data) {
|
|
573
|
+
const db = getDb();
|
|
574
|
+
const result = await db.insert(schema.projectGroups).values(data).returning();
|
|
575
|
+
return result[0];
|
|
576
|
+
},
|
|
577
|
+
async update(id, data) {
|
|
578
|
+
const db = getDb();
|
|
579
|
+
await db
|
|
580
|
+
.update(schema.projectGroups)
|
|
581
|
+
.set({ ...data, updatedAt: new Date() })
|
|
582
|
+
.where(eq(schema.projectGroups.id, id));
|
|
583
|
+
},
|
|
584
|
+
async delete(id) {
|
|
585
|
+
const db = getDb();
|
|
586
|
+
// Repositories in this group will have projectGroupId set to null (ON DELETE SET NULL)
|
|
587
|
+
await db.delete(schema.projectGroups).where(eq(schema.projectGroups.id, id));
|
|
588
|
+
},
|
|
589
|
+
async findWithRepositories(id) {
|
|
590
|
+
const db = getDb();
|
|
591
|
+
const group = await db.select().from(schema.projectGroups).where(eq(schema.projectGroups.id, id));
|
|
592
|
+
if (!group[0])
|
|
593
|
+
return null;
|
|
594
|
+
const repos = await db
|
|
595
|
+
.select()
|
|
596
|
+
.from(schema.repositories)
|
|
597
|
+
.where(eq(schema.repositories.projectGroupId, id))
|
|
598
|
+
.orderBy(schema.repositories.githubFullName);
|
|
599
|
+
return { ...group[0], repositories: repos };
|
|
600
|
+
},
|
|
601
|
+
async findAllWithRepositories(userId) {
|
|
602
|
+
const db = getDb();
|
|
603
|
+
const groups = await db
|
|
604
|
+
.select()
|
|
605
|
+
.from(schema.projectGroups)
|
|
606
|
+
.where(eq(schema.projectGroups.userId, userId))
|
|
607
|
+
.orderBy(schema.projectGroups.sortOrder, schema.projectGroups.name);
|
|
608
|
+
// Get repositories for each group
|
|
609
|
+
const result = await Promise.all(groups.map(async (group) => {
|
|
610
|
+
const repos = await db
|
|
611
|
+
.select()
|
|
612
|
+
.from(schema.repositories)
|
|
613
|
+
.where(eq(schema.repositories.projectGroupId, group.id))
|
|
614
|
+
.orderBy(schema.repositories.githubFullName);
|
|
615
|
+
return { ...group, repositories: repos };
|
|
616
|
+
}));
|
|
617
|
+
// Also get ungrouped repositories
|
|
618
|
+
const ungroupedRepos = await db
|
|
619
|
+
.select()
|
|
620
|
+
.from(schema.repositories)
|
|
621
|
+
.where(and(eq(schema.repositories.userId, userId), isNull(schema.repositories.projectGroupId)))
|
|
622
|
+
.orderBy(schema.repositories.githubFullName);
|
|
623
|
+
return { groups: result, ungroupedRepositories: ungroupedRepos };
|
|
624
|
+
},
|
|
625
|
+
async updateCoordinatorAgent(id, config) {
|
|
626
|
+
const db = getDb();
|
|
627
|
+
await db
|
|
628
|
+
.update(schema.projectGroups)
|
|
629
|
+
.set({ coordinatorAgent: config, updatedAt: new Date() })
|
|
630
|
+
.where(eq(schema.projectGroups.id, id));
|
|
631
|
+
},
|
|
632
|
+
async reorder(userId, orderedIds) {
|
|
633
|
+
const db = getDb();
|
|
634
|
+
// Update sort_order for each group
|
|
635
|
+
await Promise.all(orderedIds.map((id, index) => db
|
|
636
|
+
.update(schema.projectGroups)
|
|
637
|
+
.set({ sortOrder: index, updatedAt: new Date() })
|
|
638
|
+
.where(and(eq(schema.projectGroups.id, id), eq(schema.projectGroups.userId, userId)))));
|
|
639
|
+
},
|
|
640
|
+
};
|
|
641
|
+
export const repositoryQueries = {
|
|
642
|
+
async findById(id) {
|
|
643
|
+
const db = getDb();
|
|
644
|
+
const result = await db.select().from(schema.repositories).where(eq(schema.repositories.id, id));
|
|
645
|
+
return result[0] ?? null;
|
|
646
|
+
},
|
|
647
|
+
async findByFullName(fullName) {
|
|
648
|
+
const db = getDb();
|
|
649
|
+
const result = await db
|
|
650
|
+
.select()
|
|
651
|
+
.from(schema.repositories)
|
|
652
|
+
.where(eq(schema.repositories.githubFullName, fullName));
|
|
653
|
+
return result[0] ?? null;
|
|
654
|
+
},
|
|
655
|
+
async findByUserId(userId) {
|
|
656
|
+
const db = getDb();
|
|
657
|
+
return db
|
|
658
|
+
.select()
|
|
659
|
+
.from(schema.repositories)
|
|
660
|
+
.where(eq(schema.repositories.userId, userId))
|
|
661
|
+
.orderBy(schema.repositories.githubFullName);
|
|
662
|
+
},
|
|
663
|
+
async findByWorkspaceId(workspaceId) {
|
|
664
|
+
const db = getDb();
|
|
665
|
+
return db
|
|
666
|
+
.select()
|
|
667
|
+
.from(schema.repositories)
|
|
668
|
+
.where(eq(schema.repositories.workspaceId, workspaceId));
|
|
669
|
+
},
|
|
670
|
+
async findByProjectGroupId(projectGroupId) {
|
|
671
|
+
const db = getDb();
|
|
672
|
+
return db
|
|
673
|
+
.select()
|
|
674
|
+
.from(schema.repositories)
|
|
675
|
+
.where(eq(schema.repositories.projectGroupId, projectGroupId))
|
|
676
|
+
.orderBy(schema.repositories.githubFullName);
|
|
677
|
+
},
|
|
678
|
+
async upsert(data) {
|
|
679
|
+
const db = getDb();
|
|
680
|
+
const result = await db
|
|
681
|
+
.insert(schema.repositories)
|
|
682
|
+
.values(data)
|
|
683
|
+
.onConflictDoUpdate({
|
|
684
|
+
target: [schema.repositories.userId, schema.repositories.githubFullName],
|
|
685
|
+
set: {
|
|
686
|
+
githubId: data.githubId,
|
|
687
|
+
defaultBranch: data.defaultBranch,
|
|
688
|
+
isPrivate: data.isPrivate,
|
|
689
|
+
updatedAt: new Date(),
|
|
690
|
+
},
|
|
691
|
+
})
|
|
692
|
+
.returning();
|
|
693
|
+
return result[0];
|
|
694
|
+
},
|
|
695
|
+
async assignToWorkspace(repoId, workspaceId) {
|
|
696
|
+
const db = getDb();
|
|
697
|
+
await db
|
|
698
|
+
.update(schema.repositories)
|
|
699
|
+
.set({ workspaceId, updatedAt: new Date() })
|
|
700
|
+
.where(eq(schema.repositories.id, repoId));
|
|
701
|
+
},
|
|
702
|
+
async assignToGroup(repoId, projectGroupId) {
|
|
703
|
+
const db = getDb();
|
|
704
|
+
await db
|
|
705
|
+
.update(schema.repositories)
|
|
706
|
+
.set({ projectGroupId, updatedAt: new Date() })
|
|
707
|
+
.where(eq(schema.repositories.id, repoId));
|
|
708
|
+
},
|
|
709
|
+
async updateProjectAgent(id, config) {
|
|
710
|
+
const db = getDb();
|
|
711
|
+
await db
|
|
712
|
+
.update(schema.repositories)
|
|
713
|
+
.set({ projectAgent: config, updatedAt: new Date() })
|
|
714
|
+
.where(eq(schema.repositories.id, id));
|
|
715
|
+
},
|
|
716
|
+
async updateSyncStatus(id, status, lastSyncedAt) {
|
|
717
|
+
const db = getDb();
|
|
718
|
+
const updates = { syncStatus: status, updatedAt: new Date() };
|
|
719
|
+
if (lastSyncedAt) {
|
|
720
|
+
updates.lastSyncedAt = lastSyncedAt;
|
|
721
|
+
}
|
|
722
|
+
await db
|
|
723
|
+
.update(schema.repositories)
|
|
724
|
+
.set(updates)
|
|
725
|
+
.where(eq(schema.repositories.id, id));
|
|
726
|
+
},
|
|
727
|
+
async delete(id) {
|
|
728
|
+
const db = getDb();
|
|
729
|
+
await db.delete(schema.repositories).where(eq(schema.repositories.id, id));
|
|
730
|
+
},
|
|
731
|
+
};
|
|
732
|
+
export const agentSessionQueries = {
|
|
733
|
+
async findById(id) {
|
|
734
|
+
const db = getDb();
|
|
735
|
+
const result = await db.select().from(schema.agentSessions).where(eq(schema.agentSessions.id, id));
|
|
736
|
+
return result[0] ?? null;
|
|
737
|
+
},
|
|
738
|
+
async findByWorkspaceId(workspaceId) {
|
|
739
|
+
const db = getDb();
|
|
740
|
+
return db
|
|
741
|
+
.select()
|
|
742
|
+
.from(schema.agentSessions)
|
|
743
|
+
.where(eq(schema.agentSessions.workspaceId, workspaceId))
|
|
744
|
+
.orderBy(desc(schema.agentSessions.startedAt));
|
|
745
|
+
},
|
|
746
|
+
async findActiveByWorkspace(workspaceId) {
|
|
747
|
+
const db = getDb();
|
|
748
|
+
return db
|
|
749
|
+
.select()
|
|
750
|
+
.from(schema.agentSessions)
|
|
751
|
+
.where(and(eq(schema.agentSessions.workspaceId, workspaceId), eq(schema.agentSessions.status, 'active')));
|
|
752
|
+
},
|
|
753
|
+
async create(data) {
|
|
754
|
+
const db = getDb();
|
|
755
|
+
const result = await db.insert(schema.agentSessions).values(data).returning();
|
|
756
|
+
return result[0];
|
|
757
|
+
},
|
|
758
|
+
async endSession(id, endMarker) {
|
|
759
|
+
const db = getDb();
|
|
760
|
+
await db
|
|
761
|
+
.update(schema.agentSessions)
|
|
762
|
+
.set({
|
|
763
|
+
status: 'ended',
|
|
764
|
+
endedAt: new Date(),
|
|
765
|
+
endMarker: endMarker ?? null,
|
|
766
|
+
})
|
|
767
|
+
.where(eq(schema.agentSessions.id, id));
|
|
768
|
+
},
|
|
769
|
+
async delete(id) {
|
|
770
|
+
const db = getDb();
|
|
771
|
+
await db.delete(schema.agentSessions).where(eq(schema.agentSessions.id, id));
|
|
772
|
+
},
|
|
773
|
+
};
|
|
774
|
+
export const agentSummaryQueries = {
|
|
775
|
+
async findBySessionId(sessionId) {
|
|
776
|
+
const db = getDb();
|
|
777
|
+
return db
|
|
778
|
+
.select()
|
|
779
|
+
.from(schema.agentSummaries)
|
|
780
|
+
.where(eq(schema.agentSummaries.sessionId, sessionId))
|
|
781
|
+
.orderBy(schema.agentSummaries.createdAt);
|
|
782
|
+
},
|
|
783
|
+
async findLatestByAgent(agentName) {
|
|
784
|
+
const db = getDb();
|
|
785
|
+
const result = await db
|
|
786
|
+
.select()
|
|
787
|
+
.from(schema.agentSummaries)
|
|
788
|
+
.where(eq(schema.agentSummaries.agentName, agentName))
|
|
789
|
+
.orderBy(desc(schema.agentSummaries.createdAt))
|
|
790
|
+
.limit(1);
|
|
791
|
+
return result[0] ?? null;
|
|
792
|
+
},
|
|
793
|
+
async create(data) {
|
|
794
|
+
const db = getDb();
|
|
795
|
+
const result = await db.insert(schema.agentSummaries).values(data).returning();
|
|
796
|
+
return result[0];
|
|
797
|
+
},
|
|
798
|
+
async deleteBySession(sessionId) {
|
|
799
|
+
const db = getDb();
|
|
800
|
+
await db.delete(schema.agentSummaries).where(eq(schema.agentSummaries.sessionId, sessionId));
|
|
801
|
+
},
|
|
802
|
+
};
|
|
803
|
+
export const ciFailureEventQueries = {
|
|
804
|
+
async findById(id) {
|
|
805
|
+
const db = getDb();
|
|
806
|
+
const result = await db.select().from(schema.ciFailureEvents).where(eq(schema.ciFailureEvents.id, id));
|
|
807
|
+
return result[0] ?? null;
|
|
808
|
+
},
|
|
809
|
+
async findByRepository(repository, limit = 50) {
|
|
810
|
+
const db = getDb();
|
|
811
|
+
return db
|
|
812
|
+
.select()
|
|
813
|
+
.from(schema.ciFailureEvents)
|
|
814
|
+
.where(eq(schema.ciFailureEvents.repository, repository))
|
|
815
|
+
.orderBy(desc(schema.ciFailureEvents.createdAt))
|
|
816
|
+
.limit(limit);
|
|
817
|
+
},
|
|
818
|
+
async findByPR(repository, prNumber) {
|
|
819
|
+
const db = getDb();
|
|
820
|
+
return db
|
|
821
|
+
.select()
|
|
822
|
+
.from(schema.ciFailureEvents)
|
|
823
|
+
.where(and(eq(schema.ciFailureEvents.repository, repository), eq(schema.ciFailureEvents.prNumber, prNumber)))
|
|
824
|
+
.orderBy(desc(schema.ciFailureEvents.createdAt));
|
|
825
|
+
},
|
|
826
|
+
async findRecentUnprocessed(limit = 100) {
|
|
827
|
+
const db = getDb();
|
|
828
|
+
return db
|
|
829
|
+
.select()
|
|
830
|
+
.from(schema.ciFailureEvents)
|
|
831
|
+
.where(isNull(schema.ciFailureEvents.processedAt))
|
|
832
|
+
.orderBy(schema.ciFailureEvents.createdAt)
|
|
833
|
+
.limit(limit);
|
|
834
|
+
},
|
|
835
|
+
async create(data) {
|
|
836
|
+
const db = getDb();
|
|
837
|
+
const result = await db.insert(schema.ciFailureEvents).values(data).returning();
|
|
838
|
+
return result[0];
|
|
839
|
+
},
|
|
840
|
+
async markProcessed(id, agentSpawned) {
|
|
841
|
+
const db = getDb();
|
|
842
|
+
await db
|
|
843
|
+
.update(schema.ciFailureEvents)
|
|
844
|
+
.set({ processedAt: new Date(), agentSpawned })
|
|
845
|
+
.where(eq(schema.ciFailureEvents.id, id));
|
|
846
|
+
},
|
|
847
|
+
async delete(id) {
|
|
848
|
+
const db = getDb();
|
|
849
|
+
await db.delete(schema.ciFailureEvents).where(eq(schema.ciFailureEvents.id, id));
|
|
850
|
+
},
|
|
851
|
+
};
|
|
852
|
+
export const ciFixAttemptQueries = {
|
|
853
|
+
async findById(id) {
|
|
854
|
+
const db = getDb();
|
|
855
|
+
const result = await db.select().from(schema.ciFixAttempts).where(eq(schema.ciFixAttempts.id, id));
|
|
856
|
+
return result[0] ?? null;
|
|
857
|
+
},
|
|
858
|
+
async findByFailureEvent(failureEventId) {
|
|
859
|
+
const db = getDb();
|
|
860
|
+
return db
|
|
861
|
+
.select()
|
|
862
|
+
.from(schema.ciFixAttempts)
|
|
863
|
+
.where(eq(schema.ciFixAttempts.failureEventId, failureEventId))
|
|
864
|
+
.orderBy(desc(schema.ciFixAttempts.startedAt));
|
|
865
|
+
},
|
|
866
|
+
async findActiveByRepository(repository) {
|
|
867
|
+
const db = getDb();
|
|
868
|
+
// Find active fix attempts by joining with failure events
|
|
869
|
+
return db
|
|
870
|
+
.select({
|
|
871
|
+
id: schema.ciFixAttempts.id,
|
|
872
|
+
failureEventId: schema.ciFixAttempts.failureEventId,
|
|
873
|
+
agentId: schema.ciFixAttempts.agentId,
|
|
874
|
+
agentName: schema.ciFixAttempts.agentName,
|
|
875
|
+
status: schema.ciFixAttempts.status,
|
|
876
|
+
commitSha: schema.ciFixAttempts.commitSha,
|
|
877
|
+
errorMessage: schema.ciFixAttempts.errorMessage,
|
|
878
|
+
startedAt: schema.ciFixAttempts.startedAt,
|
|
879
|
+
completedAt: schema.ciFixAttempts.completedAt,
|
|
880
|
+
})
|
|
881
|
+
.from(schema.ciFixAttempts)
|
|
882
|
+
.innerJoin(schema.ciFailureEvents, eq(schema.ciFixAttempts.failureEventId, schema.ciFailureEvents.id))
|
|
883
|
+
.where(and(eq(schema.ciFailureEvents.repository, repository), sql `${schema.ciFixAttempts.status} IN ('pending', 'in_progress')`));
|
|
884
|
+
},
|
|
885
|
+
async create(data) {
|
|
886
|
+
const db = getDb();
|
|
887
|
+
const result = await db.insert(schema.ciFixAttempts).values(data).returning();
|
|
888
|
+
return result[0];
|
|
889
|
+
},
|
|
890
|
+
async updateStatus(id, status, errorMessage) {
|
|
891
|
+
const db = getDb();
|
|
892
|
+
const updates = { status };
|
|
893
|
+
if (errorMessage) {
|
|
894
|
+
updates.errorMessage = errorMessage;
|
|
895
|
+
}
|
|
896
|
+
await db
|
|
897
|
+
.update(schema.ciFixAttempts)
|
|
898
|
+
.set(updates)
|
|
899
|
+
.where(eq(schema.ciFixAttempts.id, id));
|
|
900
|
+
},
|
|
901
|
+
async complete(id, status, commitSha, errorMessage) {
|
|
902
|
+
const db = getDb();
|
|
903
|
+
await db
|
|
904
|
+
.update(schema.ciFixAttempts)
|
|
905
|
+
.set({
|
|
906
|
+
status,
|
|
907
|
+
completedAt: new Date(),
|
|
908
|
+
commitSha: commitSha ?? null,
|
|
909
|
+
errorMessage: errorMessage ?? null,
|
|
910
|
+
})
|
|
911
|
+
.where(eq(schema.ciFixAttempts.id, id));
|
|
912
|
+
},
|
|
913
|
+
};
|
|
914
|
+
export const issueAssignmentQueries = {
|
|
915
|
+
async findById(id) {
|
|
916
|
+
const db = getDb();
|
|
917
|
+
const result = await db.select().from(schema.issueAssignments).where(eq(schema.issueAssignments.id, id));
|
|
918
|
+
return result[0] ?? null;
|
|
919
|
+
},
|
|
920
|
+
async findByRepository(repository, limit = 50) {
|
|
921
|
+
const db = getDb();
|
|
922
|
+
return db
|
|
923
|
+
.select()
|
|
924
|
+
.from(schema.issueAssignments)
|
|
925
|
+
.where(eq(schema.issueAssignments.repository, repository))
|
|
926
|
+
.orderBy(desc(schema.issueAssignments.createdAt))
|
|
927
|
+
.limit(limit);
|
|
928
|
+
},
|
|
929
|
+
async findByIssue(repository, issueNumber) {
|
|
930
|
+
const db = getDb();
|
|
931
|
+
const result = await db
|
|
932
|
+
.select()
|
|
933
|
+
.from(schema.issueAssignments)
|
|
934
|
+
.where(and(eq(schema.issueAssignments.repository, repository), eq(schema.issueAssignments.issueNumber, issueNumber)));
|
|
935
|
+
return result[0] ?? null;
|
|
936
|
+
},
|
|
937
|
+
async findByAgent(agentId) {
|
|
938
|
+
const db = getDb();
|
|
939
|
+
return db
|
|
940
|
+
.select()
|
|
941
|
+
.from(schema.issueAssignments)
|
|
942
|
+
.where(eq(schema.issueAssignments.agentId, agentId))
|
|
943
|
+
.orderBy(desc(schema.issueAssignments.createdAt));
|
|
944
|
+
},
|
|
945
|
+
async findPending(limit = 100) {
|
|
946
|
+
const db = getDb();
|
|
947
|
+
return db
|
|
948
|
+
.select()
|
|
949
|
+
.from(schema.issueAssignments)
|
|
950
|
+
.where(eq(schema.issueAssignments.status, 'pending'))
|
|
951
|
+
.orderBy(schema.issueAssignments.createdAt)
|
|
952
|
+
.limit(limit);
|
|
953
|
+
},
|
|
954
|
+
async create(data) {
|
|
955
|
+
const db = getDb();
|
|
956
|
+
const result = await db.insert(schema.issueAssignments).values(data).returning();
|
|
957
|
+
return result[0];
|
|
958
|
+
},
|
|
959
|
+
async assignAgent(id, agentId, agentName) {
|
|
960
|
+
const db = getDb();
|
|
961
|
+
await db
|
|
962
|
+
.update(schema.issueAssignments)
|
|
963
|
+
.set({
|
|
964
|
+
agentId,
|
|
965
|
+
agentName,
|
|
966
|
+
assignedAt: new Date(),
|
|
967
|
+
status: 'assigned',
|
|
968
|
+
updatedAt: new Date(),
|
|
969
|
+
})
|
|
970
|
+
.where(eq(schema.issueAssignments.id, id));
|
|
971
|
+
},
|
|
972
|
+
async updateStatus(id, status, resolution) {
|
|
973
|
+
const db = getDb();
|
|
974
|
+
const updates = { status, updatedAt: new Date() };
|
|
975
|
+
if (resolution) {
|
|
976
|
+
updates.resolution = resolution;
|
|
977
|
+
}
|
|
978
|
+
await db
|
|
979
|
+
.update(schema.issueAssignments)
|
|
980
|
+
.set(updates)
|
|
981
|
+
.where(eq(schema.issueAssignments.id, id));
|
|
982
|
+
},
|
|
983
|
+
async linkPR(id, prNumber) {
|
|
984
|
+
const db = getDb();
|
|
985
|
+
await db
|
|
986
|
+
.update(schema.issueAssignments)
|
|
987
|
+
.set({ linkedPrNumber: prNumber, updatedAt: new Date() })
|
|
988
|
+
.where(eq(schema.issueAssignments.id, id));
|
|
989
|
+
},
|
|
990
|
+
};
|
|
991
|
+
export const commentMentionQueries = {
|
|
992
|
+
async findById(id) {
|
|
993
|
+
const db = getDb();
|
|
994
|
+
const result = await db.select().from(schema.commentMentions).where(eq(schema.commentMentions.id, id));
|
|
995
|
+
return result[0] ?? null;
|
|
996
|
+
},
|
|
997
|
+
async findByRepository(repository, limit = 50) {
|
|
998
|
+
const db = getDb();
|
|
999
|
+
return db
|
|
1000
|
+
.select()
|
|
1001
|
+
.from(schema.commentMentions)
|
|
1002
|
+
.where(eq(schema.commentMentions.repository, repository))
|
|
1003
|
+
.orderBy(desc(schema.commentMentions.createdAt))
|
|
1004
|
+
.limit(limit);
|
|
1005
|
+
},
|
|
1006
|
+
async findBySource(sourceType, sourceId) {
|
|
1007
|
+
const db = getDb();
|
|
1008
|
+
const result = await db
|
|
1009
|
+
.select()
|
|
1010
|
+
.from(schema.commentMentions)
|
|
1011
|
+
.where(and(eq(schema.commentMentions.sourceType, sourceType), eq(schema.commentMentions.sourceId, sourceId)));
|
|
1012
|
+
return result[0] ?? null;
|
|
1013
|
+
},
|
|
1014
|
+
async findPending(limit = 100) {
|
|
1015
|
+
const db = getDb();
|
|
1016
|
+
return db
|
|
1017
|
+
.select()
|
|
1018
|
+
.from(schema.commentMentions)
|
|
1019
|
+
.where(eq(schema.commentMentions.status, 'pending'))
|
|
1020
|
+
.orderBy(schema.commentMentions.createdAt)
|
|
1021
|
+
.limit(limit);
|
|
1022
|
+
},
|
|
1023
|
+
async findByMentionedAgent(mentionedAgent, limit = 50) {
|
|
1024
|
+
const db = getDb();
|
|
1025
|
+
return db
|
|
1026
|
+
.select()
|
|
1027
|
+
.from(schema.commentMentions)
|
|
1028
|
+
.where(eq(schema.commentMentions.mentionedAgent, mentionedAgent))
|
|
1029
|
+
.orderBy(desc(schema.commentMentions.createdAt))
|
|
1030
|
+
.limit(limit);
|
|
1031
|
+
},
|
|
1032
|
+
async create(data) {
|
|
1033
|
+
const db = getDb();
|
|
1034
|
+
const result = await db.insert(schema.commentMentions).values(data).returning();
|
|
1035
|
+
return result[0];
|
|
1036
|
+
},
|
|
1037
|
+
async markProcessing(id, agentId, agentName) {
|
|
1038
|
+
const db = getDb();
|
|
1039
|
+
await db
|
|
1040
|
+
.update(schema.commentMentions)
|
|
1041
|
+
.set({ status: 'processing', agentId, agentName })
|
|
1042
|
+
.where(eq(schema.commentMentions.id, id));
|
|
1043
|
+
},
|
|
1044
|
+
async markResponded(id, responseCommentId, responseBody) {
|
|
1045
|
+
const db = getDb();
|
|
1046
|
+
await db
|
|
1047
|
+
.update(schema.commentMentions)
|
|
1048
|
+
.set({
|
|
1049
|
+
status: 'responded',
|
|
1050
|
+
responseCommentId,
|
|
1051
|
+
responseBody,
|
|
1052
|
+
respondedAt: new Date(),
|
|
1053
|
+
})
|
|
1054
|
+
.where(eq(schema.commentMentions.id, id));
|
|
1055
|
+
},
|
|
1056
|
+
async markIgnored(id) {
|
|
1057
|
+
const db = getDb();
|
|
1058
|
+
await db
|
|
1059
|
+
.update(schema.commentMentions)
|
|
1060
|
+
.set({ status: 'ignored' })
|
|
1061
|
+
.where(eq(schema.commentMentions.id, id));
|
|
1062
|
+
},
|
|
1063
|
+
};
|
|
1064
|
+
// ============================================================================
|
|
1065
|
+
// Migration helper
|
|
1066
|
+
// ============================================================================
|
|
1067
|
+
export async function runMigrations() {
|
|
1068
|
+
const { migrate } = await import('drizzle-orm/node-postgres/migrator');
|
|
1069
|
+
const db = getDb();
|
|
1070
|
+
await migrate(db, { migrationsFolder: './src/cloud/db/migrations' });
|
|
1071
|
+
console.log('Migrations complete');
|
|
1072
|
+
}
|
|
1073
|
+
// ============================================================================
|
|
1074
|
+
// Close connections
|
|
1075
|
+
// ============================================================================
|
|
1076
|
+
export async function closeDb() {
|
|
1077
|
+
if (pool) {
|
|
1078
|
+
await pool.end();
|
|
1079
|
+
pool = null;
|
|
1080
|
+
drizzleDb = null;
|
|
1081
|
+
}
|
|
1082
|
+
}
|
|
1083
|
+
//# sourceMappingURL=drizzle.js.map
|