Skip to content

The open-source app everyone uses to manage agents at work

Connect and configure GitHub Copilot through Apps (#15705)

Dotta92b238137ba7
diff --git a/cli/src/__tests__/company-import-export-e2e.test.ts b/cli/src/__tests__/company-import-export-e2e.test.ts
index 79172615e4..d0efacf8e1 100644
--- a/cli/src/__tests__/company-import-export-e2e.test.ts
+++ b/cli/src/__tests__/company-import-export-e2e.test.ts
@@ -1,5 +1,6 @@
import { execFile, spawn } from "node:child_process";
import { existsSync, mkdirSync, mkdtempSync, readFileSync, readdirSync, rmSync, writeFileSync } from "node:fs";
+import { createRequire } from "node:module";
import net from "node:net";
import os from "node:os";
import path from "node:path";
@@ -302,8 +303,8 @@ describeEmbeddedPostgres("paperclipai company import/export e2e", () => {
const repoRoot = path.resolve(path.dirname(fileURLToPath(import.meta.url)), "../../..");
const output = { stdout: [] as string[], stderr: [] as string[] };
const child = spawn(
- "pnpm",
- ["paperclipai", "run", "--config", configPath],
+ process.execPath,
+ ["--import", createRequire(import.meta.url).resolve("tsx"), path.join(repoRoot, "cli/src/index.ts"), "run", "--config", configPath],
{
cwd: repoRoot,
env: createServerEnv(configPath, port, tempDb.connectionString, {
diff --git a/doc/connections/github-copilot.md b/doc/connections/github-copilot.md
new file mode 100644
index 0000000000..8031ec8523
--- /dev/null
+++ b/doc/connections/github-copilot.md
@@ -0,0 +1,72 @@
+# GitHub Copilot runtime connection
+
+GitHub Copilot uses a saved GitHub token and the packaged Copilot CLI **1.0.88**.
+Runtime profile **v47** passed the local and Daytona qualification campaign.
+The [qualification record](../plans/2026-10-20-copilot-qualification-v47.json)
+identifies the tested build, retained failures, and remaining release gates.
+
+On first setup, choose **GitHub Copilot** when creating your first agent. In an
+existing organization, open **Connectors → GitHub → Connect Copilot**. Create a
+fine-grained personal access token owned by your personal GitHub account and
+add the **Copilot Requests** account permission. Organization-owned tokens and
+classic personal tokens are unsupported for this setup. Follow
+[GitHub's authentication instructions](https://docs.github.com/en/copilot/how-tos/copilot-cli/set-up-copilot-cli/authenticate-copilot-cli).
+
+Save the token as a personal or shared AI connection and select the execution
+environment. Paperclip uses its encrypted credential store, grants, access
+checks, reconnect/revocation, and activity logging. GitHub repository/MCP access
+uses its separate connection and grants. Copilot execution receives only the
+selected runtime token as `COPILOT_GITHUB_TOKEN`; ambient GitHub credentials
+are not adopted.
+
+Connection verification runs the pinned packaged runtime in the selected
+environment with a private temporary home. It initializes a session, discovers
+models, and confirms an explicitly selected model when testing an agent. It
+sends no model prompt. Authentication, entitlement/policy, installation, and
+unavailable-model errors are reported separately. Remote verification releases
+its owned login lease and does not fall back to the controller host.
+
+In an agent's **Harness / Runtime** settings, select **Paperclip Runner**,
+**ACP agents**, **GitHub Copilot**, and a model from authenticated discovery.
+Saving and reopening retain `provider: acpx`, `acpxAgent: copilot`, and that exact
+model. Auto/default and unavailable models are rejected. The qualification
+model is `gpt-5.6-luna`, subject to current authenticated availability. Reconnecting
+the same saved account refreshes its discovered models and clears the old selection.
+
+Normal package installation materializes the pinned runtime for macOS ARM64,
+macOS x64, and Linux x64. Keep installation scripts enabled. No qualification
+environment override or ambient GitHub login is required. **Test configuration**
+verifies the saved connection and exact model without sending a prompt.
+
+For Daytona, install the first-party Daytona provider and configure an execution
+environment with its saved API key and the matching release image. Environment
+assignment currently uses Paperclip's existing **Enable Environments** instance
+setting. Select that environment for connection verification and agent execution;
+successful local verification alone does not establish remote readiness. The
+admitted daemon and provider assets must belong to the same verified build.
+
+Core workflows use Paperclip's semantic questions, plans, and completion tools.
+Permission cards identify actual targets. Denied writes have no effects; Stop
+cancels unanswered permissions and refuses late answers. Provider death must
+expire stale input without replay. Detached work, native steering, native plan
+mode, and additional native event presentation are outside this release.
+Unsupported native blocking callbacks fail explicitly.
+
+Usage is attributed to **GitHub**. Provider credits and model multipliers are
+supplemental notices, not USD billing receipts. USD cost remains unknown when
+GitHub supplies no invoice value; included credits are not recorded as measured
+zero-dollar usage. Session-scoped notices cannot establish task completion,
+artifacts, or charges.
+
+Model discovery uses the selected environment and can create a short-lived Daytona sandbox. Copilot model choices refresh when opening a task selector, changing an account or environment, reconnecting, or explicitly refreshing. Background live-data reconciliation does not repeat this probe.
+
+The qualification record retains one Daytona tool-dispatch timeout whose exact
+cause is unresolved. Its unchanged instrumented recheck passed after independent
+ordinary remote delivery and the other19 Product cases passed. No timeout or
+completion check was weakened. Qualification does not establish deployment: use
+the release record to verify the shipped package and canary.
+
+Discovering models for an existing agent requires permission to update that
+agent configuration. The probe uses the saved environment unless an authorized
+editor selects another environment. Read-only configuration access does not
+resolve the token or start a discovery probe.
diff --git a/packages/adapter-utils/src/paperclip-runner-permissions.test.ts b/packages/adapter-utils/src/paperclip-runner-permissions.test.ts
index 31bc6acc4b..cd61414cc4 100644
--- a/packages/adapter-utils/src/paperclip-runner-permissions.test.ts
+++ b/packages/adapter-utils/src/paperclip-runner-permissions.test.ts
@@ -12,12 +12,11 @@ import {
} from "./paperclip-runner-permissions.js";
describe("Paperclip Runner permission defaults", () => {
- it("admits Pi with provider credentials while keeping Copilot pending", () => {
+ it("marks Pi and Copilot qualified with their provider credential bindings", () => {
expect(PAPERCLIP_RUNNER_ACPX_PROFILES.find(profile => profile.value === "pi"))
.toMatchObject({ qualified: true, credentialEnvironment: expect.arrayContaining(["OPENROUTER_API_KEY", "OPENAI_API_KEY", "ANTHROPIC_API_KEY", "GEMINI_API_KEY"]) });
- for (const agent of ["copilot"]) {
- expect(PAPERCLIP_RUNNER_ACPX_PROFILES.find(profile => profile.value === agent)?.qualified).toBe(false);
- }
+ expect(PAPERCLIP_RUNNER_ACPX_PROFILES.find(profile => profile.value === "copilot"))
+ .toMatchObject({ qualified: true, credentialEnvironment: ["COPILOT_GITHUB_TOKEN"] });
});
it("defaults Codex to the only qualified non-interactive mode", () => {
expect(resolvePaperclipRunnerPermissionMode("codex", undefined)).toBe(
diff --git a/packages/adapter-utils/src/paperclip-runner-permissions.ts b/packages/adapter-utils/src/paperclip-runner-permissions.ts
index 61f6936647..bb162657f7 100644
--- a/packages/adapter-utils/src/paperclip-runner-permissions.ts
+++ b/packages/adapter-utils/src/paperclip-runner-permissions.ts
@@ -247,7 +247,7 @@ export const PAPERCLIP_RUNNER_ACPX_PROFILES = Object.freeze([
{ value: "grok", label: "Grok Build", qualified: true, credentialEnvironment: ["XAI_API_KEY"] },
{ value: "claude", label: "Claude", qualified: true, credentialEnvironment: ["ANTHROPIC_API_KEY", "CLAUDE_CODE_OAUTH_TOKEN"] },
{ value: "cursor", label: "Cursor", qualified: true, credentialEnvironment: ["CURSOR_API_KEY", "CURSOR_AUTH_TOKEN"] },
- { value: "copilot", label: "GitHub Copilot", qualified: false, credentialEnvironment: ["COPILOT_GITHUB_TOKEN"] },
+ { value: "copilot", label: "GitHub Copilot", qualified: true, credentialEnvironment: ["COPILOT_GITHUB_TOKEN"] },
{ value: "pi", label: "Pi", qualified: true, credentialEnvironment: ["OPENROUTER_API_KEY", "OPENAI_API_KEY", "ANTHROPIC_API_KEY", "GEMINI_API_KEY"] },
] as const);
diff --git a/packages/adapters/codex-local/src/ui/build-config.test.ts b/packages/adapters/codex-local/src/ui/build-config.test.ts
index 12df8af81d..0557e3c6a5 100644
--- a/packages/adapters/codex-local/src/ui/build-config.test.ts
+++ b/packages/adapters/codex-local/src/ui/build-config.test.ts
@@ -36,6 +36,17 @@ function makeValues(overrides: Partial<CreateConfigValues> = {}): CreateConfigVa
}
describe("buildCodexLocalConfig", () => {
+ describe("qualified Copilot config", () => {
+ it("round-trips Copilot with the exact selected model", () => {
+ const first = buildPaperclipRunnerConfig(makeValues({ model: "gpt-5.6-luna", adapterSchemaValues: { provider: "acpx", acpxAgent: "copilot" } }));
+ const reopened = buildPaperclipRunnerConfig(makeValues({ model: "", adapterSchemaValues: JSON.parse(JSON.stringify(first)) }));
+ expect(reopened).toMatchObject({ provider: "acpx", acpxAgent: "copilot", model: "gpt-5.6-luna" });
+ });
+ it.each(["", "auto", "default", "Auto", "DEFAULT"])("rejects a missing or implicit Copilot model (%s)", model => {
+ expect(() => buildPaperclipRunnerConfig(makeValues({ model, adapterSchemaValues: { provider: "acpx", acpxAgent: "copilot" } }))).toThrow("Select an available Copilot model");
+ });
+ });
+
it.each([undefined, "approve-all", "approve-paperclip", "approve-reads", "deny-all"])(
"defaults Grok to full auto while preserving an explicit %s permission mode",
(acpxPermissionMode) => {
@@ -245,16 +256,7 @@ describe("buildPaperclipRunnerConfig", () => {
expect(config).not.toHaveProperty("acpxAgent");
});
- it.each(["copilot"])("rejects unavailable ACPX %s without selecting another provider", (acpxAgent) => {
- expect(() => buildPaperclipRunnerConfig(makeValues({
- adapterType: "paperclip_runner",
- model: "explicit-provider-model",
- adapterSchemaValues: {
- provider: "acpx",
- acpxAgent,
- },
- }))).toThrow(/is not enabled for production/);
- });
+
it.each(["agent", "plan", "ask"])("preserves Cursor's explicit model and %s mode", (mode) => {
expect(buildPaperclipRunnerConfig(makeValues({
diff --git a/packages/adapters/codex-local/src/ui/build-config.ts b/packages/adapters/codex-local/src/ui/build-config.ts
index a83f0c19e9..b23172938e 100644
--- a/packages/adapters/codex-local/src/ui/build-config.ts
+++ b/packages/adapters/codex-local/src/ui/build-config.ts
@@ -123,7 +123,10 @@ export function buildPaperclipRunnerConfig(v: CreateConfigValues): Record<string
const configuredModel = typeof config.model === "string"
? config.model.trim()
: "";
- if (provider === "acpx" && ["cursor", "pi", "copilot"].includes(acpxAgent) && !configuredModel && !schemaModel) {
+ if (provider === "acpx" && acpxAgent === "copilot" && (!configuredModel && !schemaModel || ["auto", "default"].includes((configuredModel || schemaModel).toLowerCase()))) {
+ throw new Error("Select an available Copilot model before saving.");
+ }
+ if (provider === "acpx" && ["cursor", "pi"].includes(acpxAgent) && !configuredModel && !schemaModel) {
throw new Error(`${acpxAgent} requires an explicit provider model`);
}
const managedProfileId = typeof schemaValues.managedProfileId === "string"
diff --git a/packages/adapters/cursor-local/src/server/execute.test.ts b/packages/adapters/cursor-local/src/server/execute.test.ts
index 61f5a05dd3..03410406e1 100644
--- a/packages/adapters/cursor-local/src/server/execute.test.ts
+++ b/packages/adapters/cursor-local/src/server/execute.test.ts
@@ -85,10 +85,14 @@ function createFreshLeaseSandboxRunner(options: {
}) {
let counter = 0;
const installCommands: string[] = [];
+ const fixtureBin = path.join(options.homeDir, "fixture-system-bin");
+ const fixtureReady = (async () => {
+ await fs.mkdir(fixtureBin, { recursive: true });
+ await fs.symlink(process.execPath, path.join(fixtureBin, "node"));
+ await fs.writeFile(path.join(fixtureBin, "curl"), "#!/bin/sh\nexit 97\n", { mode: 0o755 });
+ })();
const systemPath = [
- "/usr/local/bin",
- "/opt/homebrew/bin",
- "/usr/local/sbin",
+ fixtureBin,
"/usr/bin",
"/bin",
"/usr/sbin",
@@ -107,6 +111,7 @@ function createFreshLeaseSandboxRunner(options: {
onLog?: (stream: "stdout" | "stderr", chunk: string) => Promise<void>;
onSpawn?: (meta: { pid: number; startedAt: string }) => Promise<void>;
}) => {
+ await fixtureReady;
counter += 1;
const args = [...(input.args ?? [])];
if (args[1] === SANDBOX_INSTALL_COMMAND) {
@@ -114,7 +119,8 @@ function createFreshLeaseSandboxRunner(options: {
args[1] = buildInstallSimulationCommand(options.installCommandPath, options.captureDir);
}
- const inheritedPath = input.env?.PATH ?? systemPath;
+ // A fresh remote lease has its own PATH, independent of installed host agents.
+ const inheritedPath = systemPath;
const pathWithLocalBin = `${path.join(options.homeDir, ".local", "bin")}${path.delimiter}${inheritedPath}`;
const env = {
...(input.env ?? {}),
@@ -122,6 +128,9 @@ function createFreshLeaseSandboxRunner(options: {
PATH: pathWithLocalBin,
};
+ if (["agent", "cursor-agent"].includes(path.basename(input.command)) && input.command !== options.installCommandPath) {
+ throw new Error("Fresh sandbox fixture refused an agent outside its installation path");
+ }
return await runChildProcess(`cursor-fresh-lease-${counter}`, input.command, args, {
cwd: input.cwd ?? process.cwd(),
env,
diff --git a/packages/db/src/migrations/0361_mighty_dracula.sql b/packages/db/src/migrations/0361_mighty_dracula.sql
new file mode 100644
index 0000000000..e88a2f702b
--- /dev/null
+++ b/packages/db/src/migrations/0361_mighty_dracula.sql
@@ -0,0 +1,4 @@
+ALTER TABLE "ai_connection_defaults" DROP CONSTRAINT "ai_connection_defaults_provider_check";--> statement-breakpoint
+ALTER TABLE "ai_provider_defaults" DROP CONSTRAINT "ai_provider_defaults_provider_check";--> statement-breakpoint
+ALTER TABLE "ai_connection_defaults" ADD CONSTRAINT "ai_connection_defaults_provider_check" CHECK ("ai_connection_defaults"."provider" in ('anthropic','openai','openrouter','xai','google','github'));--> statement-breakpoint
+ALTER TABLE "ai_provider_defaults" ADD CONSTRAINT "ai_provider_defaults_provider_check" CHECK ("ai_provider_defaults"."provider" in ('anthropic','openai','openrouter','xai','google','github'));
\ No newline at end of file
diff --git a/packages/db/src/migrations/meta/0356_snapshot.json b/packages/db/src/migrations/meta/0361_snapshot.json
similarity index 93%
rename from packages/db/src/migrations/meta/0356_snapshot.json
rename to packages/db/src/migrations/meta/0361_snapshot.json
index 3fb8074350..0663d4fcc3 100644
--- a/packages/db/src/migrations/meta/0356_snapshot.json
+++ b/packages/db/src/migrations/meta/0361_snapshot.json
@@ -1,6 +1,6 @@
{
- "id": "043fa318-32fd-4ed6-955f-bf5437ace611",
- "prevId": "cdc3c40b-07fc-4ccf-896d-4ece518c4826",
+ "id": "d34e0f36-d7d1-409e-b868-6e4262e8adca",
+ "prevId": "a69ba991-0ea0-4cf4-8dcc-53f547aacaeb",
"version": "7",
"dialect": "postgresql",
"tables": {
@@ -64,37 +64,37 @@
}
],
"isUnique": false,
- "with": {},
+ "concurrently": false,
"method": "btree",
- "concurrently": false
+ "with": {}
}
},
"foreignKeys": {
"accounting_runtime_baselines_agent_id_agents_id_fk": {
"name": "accounting_runtime_baselines_agent_id_agents_id_fk",
"tableFrom": "accounting_runtime_baselines",
+ "tableTo": "agents",
"columnsFrom": [
"agent_id"
],
- "tableTo": "agents",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "cascade"
+ "onDelete": "cascade",
+ "onUpdate": "no action"
},
"accounting_runtime_baselines_company_id_companies_id_fk": {
"name": "accounting_runtime_baselines_company_id_companies_id_fk",
"tableFrom": "accounting_runtime_baselines",
+ "tableTo": "companies",
"columnsFrom": [
"company_id"
],
- "tableTo": "companies",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "cascade"
+ "onDelete": "cascade",
+ "onUpdate": "no action"
}
},
"compositePrimaryKeys": {},
@@ -200,9 +200,9 @@
}
],
"isUnique": true,
- "with": {},
+ "concurrently": false,
"method": "btree",
- "concurrently": false
+ "with": {}
},
"billing_invoice_lines_company_idx": {
"name": "billing_invoice_lines_company_idx",
@@ -221,50 +221,50 @@
}
],
"isUnique": false,
- "with": {},
+ "concurrently": false,
"method": "btree",
- "concurrently": false
+ "with": {}
}
},
"foreignKeys": {
"billing_invoice_lines_company_id_companies_id_fk": {
"name": "billing_invoice_lines_company_id_companies_id_fk",
"tableFrom": "billing_invoice_lines",
+ "tableTo": "companies",
"columnsFrom": [
"company_id"
],
- "tableTo": "companies",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "cascade"
+ "onDelete": "cascade",
+ "onUpdate": "no action"
},
"billing_invoice_lines_invoice_id_billing_invoices_id_fk": {
"name": "billing_invoice_lines_invoice_id_billing_invoices_id_fk",
"tableFrom": "billing_invoice_lines",
+ "tableTo": "billing_invoices",
"columnsFrom": [
"invoice_id"
],
- "tableTo": "billing_invoices",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "cascade"
+ "onDelete": "cascade",
+ "onUpdate": "no action"
},
"billing_invoice_lines_cost_event_id_cost_events_id_fk": {
"name": "billing_invoice_lines_cost_event_id_cost_events_id_fk",
"tableFrom": "billing_invoice_lines",
+ "tableTo": "cost_events",
"columnsFrom": [
"cost_event_id"
],
- "tableTo": "cost_events",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "cascade"
+ "onDelete": "cascade",
+ "onUpdate": "no action"
}
},
"compositePrimaryKeys": {},
@@ -361,24 +361,24 @@
}
],
"isUnique": true,
- "with": {},
+ "concurrently": false,
"method": "btree",
- "concurrently": false
+ "with": {}
}
},
"foreignKeys": {
"billing_invoices_company_id_companies_id_fk": {
"name": "billing_invoices_company_id_companies_id_fk",
"tableFrom": "billing_invoices",
+ "tableTo": "companies",
"columnsFrom": [
"company_id"
],
- "tableTo": "companies",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "cascade"
+ "onDelete": "cascade",
+ "onUpdate": "no action"
}
},
"compositePrimaryKeys": {},
@@ -485,9 +485,9 @@
}
],
"isUnique": true,
- "with": {},
+ "concurrently": false,
"method": "btree",
- "concurrently": false
+ "with": {}
},
"budget_reservations_decision_idx": {
"name": "budget_reservations_decision_idx",
@@ -506,9 +506,9 @@
}
],
"isUnique": true,
- "with": {},
+ "concurrently": false,
"method": "btree",
- "concurrently": false
+ "with": {}
},
"budget_reservations_run_idx": {
"name": "budget_reservations_run_idx",
@@ -527,9 +527,9 @@
}
],
"isUnique": true,
- "with": {},
+ "concurrently": false,
"method": "btree",
- "concurrently": false
+ "with": {}
},
"budget_reservations_active_idx": {
"name": "budget_reservations_active_idx",
@@ -554,51 +554,51 @@
}
],
"isUnique": false,
- "with": {},
- "method": "btree",
"where": "\"budget_reservations\".\"state\" = 'held'",
- "concurrently": false
+ "concurrently": false,
+ "method": "btree",
+ "with": {}
}
},
"foreignKeys": {
"budget_reservations_company_id_companies_id_fk": {
"name": "budget_reservations_company_id_companies_id_fk",
"tableFrom": "budget_reservations",
+ "tableTo": "companies",
"columnsFrom": [
"company_id"
],
- "tableTo": "companies",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "cascade"
+ "onDelete": "cascade",
+ "onUpdate": "no action"
},
"budget_reservations_run_id_heartbeat_runs_id_fk": {
"name": "budget_reservations_run_id_heartbeat_runs_id_fk",
"tableFrom": "budget_reservations",
+ "tableTo": "heartbeat_runs",
"columnsFrom": [
"run_id"
],
- "tableTo": "heartbeat_runs",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "cascade"
+ "onDelete": "cascade",
+ "onUpdate": "no action"
},
"budget_reservations_agent_id_agents_id_fk": {
"name": "budget_reservations_agent_id_agents_id_fk",
"tableFrom": "budget_reservations",
+ "tableTo": "agents",
"columnsFrom": [
"agent_id"
],
- "tableTo": "agents",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "cascade"
+ "onDelete": "cascade",
+ "onUpdate": "no action"
}
},
"compositePrimaryKeys": {},
@@ -731,9 +731,9 @@
}
],
"isUnique": true,
- "with": {},
+ "concurrently": false,
"method": "btree",
- "concurrently": false
+ "with": {}
},
"cost_adjustments_event_idx": {
"name": "cost_adjustments_event_idx",
@@ -758,9 +758,9 @@
}
],
"isUnique": false,
- "with": {},
+ "concurrently": false,
"method": "btree",
- "concurrently": false
+ "with": {}
},
"cost_adjustments_invoice_line_idx": {
"name": "cost_adjustments_invoice_line_idx",
@@ -779,50 +779,50 @@
}
],
"isUnique": true,
- "with": {},
+ "concurrently": false,
"method": "btree",
- "concurrently": false
+ "with": {}
}
},
"foreignKeys": {
"cost_adjustments_company_id_companies_id_fk": {
"name": "cost_adjustments_company_id_companies_id_fk",
"tableFrom": "cost_adjustments",
+ "tableTo": "companies",
"columnsFrom": [
"company_id"
],
- "tableTo": "companies",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "cascade"
+ "onDelete": "cascade",
+ "onUpdate": "no action"
},
"cost_adjustments_cost_event_id_cost_events_id_fk": {
"name": "cost_adjustments_cost_event_id_cost_events_id_fk",
"tableFrom": "cost_adjustments",
+ "tableTo": "cost_events",
"columnsFrom": [
"cost_event_id"
],
- "tableTo": "cost_events",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "cascade"
+ "onDelete": "cascade",
+ "onUpdate": "no action"
},
"cost_adjustments_invoice_line_id_billing_invoice_lines_id_fk": {
"name": "cost_adjustments_invoice_line_id_billing_invoice_lines_id_fk",
"tableFrom": "cost_adjustments",
+ "tableTo": "billing_invoice_lines",
"columnsFrom": [
"invoice_line_id"
],
- "tableTo": "billing_invoice_lines",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "cascade"
+ "onDelete": "cascade",
+ "onUpdate": "no action"
}
},
"compositePrimaryKeys": {},
@@ -934,24 +934,24 @@
}
],
"isUnique": true,
- "with": {},
+ "concurrently": false,
"method": "btree",
- "concurrently": false
+ "with": {}
}
},
"foreignKeys": {
"provider_billing_snapshots_company_id_companies_id_fk": {
"name": "provider_billing_snapshots_company_id_companies_id_fk",
"tableFrom": "provider_billing_snapshots",
+ "tableTo": "companies",
"columnsFrom": [
"company_id"
],
- "tableTo": "companies",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "cascade"
+ "onDelete": "cascade",
+ "onUpdate": "no action"
}
},
"compositePrimaryKeys": {},
@@ -1061,9 +1061,9 @@
}
],
"isUnique": true,
- "with": {},
+ "concurrently": false,
"method": "btree",
- "concurrently": false
+ "with": {}
},
"run_usage_receipts_run_latest_idx": {
"name": "run_usage_receipts_run_latest_idx",
@@ -1088,37 +1088,37 @@
}
],
"isUnique": false,
- "with": {},
+ "concurrently": false,
"method": "btree",
- "concurrently": false
+ "with": {}
}
},
"foreignKeys": {
"run_usage_receipts_company_id_companies_id_fk": {
"name": "run_usage_receipts_company_id_companies_id_fk",
"tableFrom": "run_usage_receipts",
+ "tableTo": "companies",
"columnsFrom": [
"company_id"
],
- "tableTo": "companies",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "cascade"
+ "onDelete": "cascade",
+ "onUpdate": "no action"
},
"run_usage_receipts_run_id_heartbeat_runs_id_fk": {
"name": "run_usage_receipts_run_id_heartbeat_runs_id_fk",
"tableFrom": "run_usage_receipts",
+ "tableTo": "heartbeat_runs",
"columnsFrom": [
"run_id"
],
- "tableTo": "heartbeat_runs",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "cascade"
+ "onDelete": "cascade",
+ "onUpdate": "no action"
}
},
"compositePrimaryKeys": {},
@@ -1230,9 +1230,9 @@
}
],
"isUnique": false,
- "with": {},
+ "concurrently": false,
"method": "btree",
- "concurrently": false
+ "with": {}
},
"activity_log_company_agent_created_idx": {
"name": "activity_log_company_agent_created_idx",
@@ -1257,9 +1257,9 @@
}
],
"isUnique": false,
- "with": {},
+ "concurrently": false,
"method": "btree",
- "concurrently": false
+ "with": {}
},
"activity_log_company_responsible_user_created_idx": {
"name": "activity_log_company_responsible_user_created_idx",
@@ -1284,9 +1284,9 @@
}
],
"isUnique": false,
- "with": {},
+ "concurrently": false,
"method": "btree",
- "concurrently": false
+ "with": {}
},
"activity_log_run_id_idx": {
"name": "activity_log_run_id_idx",
@@ -1299,9 +1299,9 @@
}
],
"isUnique": false,
- "with": {},
+ "concurrently": false,
"method": "btree",
- "concurrently": false
+ "with": {}
},
"activity_log_entity_type_id_idx": {
"name": "activity_log_entity_type_id_idx",
@@ -1320,50 +1320,50 @@
}
],
"isUnique": false,
- "with": {},
+ "concurrently": false,
"method": "btree",
- "concurrently": false
+ "with": {}
}
},
"foreignKeys": {
"activity_log_company_id_companies_id_fk": {
"name": "activity_log_company_id_companies_id_fk",
"tableFrom": "activity_log",
+ "tableTo": "companies",
"columnsFrom": [
"company_id"
],
- "tableTo": "companies",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "no action"
+ "onDelete": "no action",
+ "onUpdate": "no action"
},
"activity_log_agent_id_agents_id_fk": {
"name": "activity_log_agent_id_agents_id_fk",
"tableFrom": "activity_log",
+ "tableTo": "agents",
"columnsFrom": [
"agent_id"
],
- "tableTo": "agents",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "no action"
+ "onDelete": "no action",
+ "onUpdate": "no action"
},
"activity_log_run_id_heartbeat_runs_id_fk": {
"name": "activity_log_run_id_heartbeat_runs_id_fk",
"tableFrom": "activity_log",
+ "tableTo": "heartbeat_runs",
"columnsFrom": [
"run_id"
],
- "tableTo": "heartbeat_runs",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "no action"
+ "onDelete": "no action",
+ "onUpdate": "no action"
}
},
"compositePrimaryKeys": {},
@@ -1519,9 +1519,9 @@
}
],
"isUnique": false,
- "with": {},
+ "concurrently": false,
"method": "btree",
- "concurrently": false
+ "with": {}
},
"adapter_auth_sessions_company_owner_adapter_active_uq": {
"name": "adapter_auth_sessions_company_owner_adapter_active_uq",
@@ -1546,10 +1546,10 @@
}
],
"isUnique": true,
- "with": {},
- "method": "btree",
"where": "\"adapter_auth_sessions\".\"status\" IN ('starting', 'waiting_for_user', 'promoting', 'awaiting_code', 'submitting')",
- "concurrently": false
+ "concurrently": false,
+ "method": "btree",
+ "with": {}
},
"adapter_auth_sessions_public_session_id_uq": {
"name": "adapter_auth_sessions_public_session_id_uq",
@@ -1562,9 +1562,9 @@
}
],
"isUnique": true,
- "with": {},
+ "concurrently": false,
"method": "btree",
- "concurrently": false
+ "with": {}
},
"adapter_auth_sessions_environment_idx": {
"name": "adapter_auth_sessions_environment_idx",
@@ -1577,9 +1577,9 @@
}
],
"isUnique": false,
- "with": {},
+ "concurrently": false,
"method": "btree",
- "concurrently": false
+ "with": {}
},
"adapter_auth_sessions_expires_idx": {
"name": "adapter_auth_sessions_expires_idx",
@@ -1592,9 +1592,9 @@
}
],
"isUnique": false,
- "with": {},
+ "concurrently": false,
"method": "btree",
- "concurrently": false
+ "with": {}
},
"adapter_auth_sessions_provider_lease_idx": {
"name": "adapter_auth_sessions_provider_lease_idx",
@@ -1607,37 +1607,37 @@
}
],
"isUnique": false,
- "with": {},
+ "concurrently": false,
"method": "btree",
- "concurrently": false
+ "with": {}
}
},
"foreignKeys": {
"adapter_auth_sessions_company_id_companies_id_fk": {
"name": "adapter_auth_sessions_company_id_companies_id_fk",
"tableFrom": "adapter_auth_sessions",
+ "tableTo": "companies",
"columnsFrom": [
"company_id"
],
- "tableTo": "companies",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "cascade"
+ "onDelete": "cascade",
+ "onUpdate": "no action"
},
"adapter_auth_sessions_environment_id_environments_id_fk": {
"name": "adapter_auth_sessions_environment_id_environments_id_fk",
"tableFrom": "adapter_auth_sessions",
+ "tableTo": "environments",
"columnsFrom": [
"environment_id"
],
- "tableTo": "environments",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "cascade"
+ "onDelete": "cascade",
+ "onUpdate": "no action"
}
},
"compositePrimaryKeys": {},
@@ -1725,9 +1725,9 @@
}
],
"isUnique": false,
- "with": {},
+ "concurrently": false,
"method": "btree",
- "concurrently": false
+ "with": {}
},
"agent_api_keys_company_agent_idx": {
"name": "agent_api_keys_company_agent_idx",
@@ -1746,37 +1746,37 @@
}
],
"isUnique": false,
- "with": {},
+ "concurrently": false,
"method": "btree",
- "concurrently": false
+ "with": {}
}
},
"foreignKeys": {
"agent_api_keys_agent_id_agents_id_fk": {
"name": "agent_api_keys_agent_id_agents_id_fk",
"tableFrom": "agent_api_keys",
+ "tableTo": "agents",
"columnsFrom": [
"agent_id"
],
- "tableTo": "agents",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "no action"
+ "onDelete": "no action",
+ "onUpdate": "no action"
},
"agent_api_keys_company_id_companies_id_fk": {
"name": "agent_api_keys_company_id_companies_id_fk",
"tableFrom": "agent_api_keys",
+ "tableTo": "companies",
"columnsFrom": [
"company_id"
],
- "tableTo": "companies",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "no action"
+ "onDelete": "no action",
+ "onUpdate": "no action"
}
},
"compositePrimaryKeys": {},
@@ -1876,9 +1876,9 @@
}
],
"isUnique": true,
- "with": {},
+ "concurrently": false,
"method": "btree",
- "concurrently": false
+ "with": {}
},
"agent_commentary_company_kind_created_idx": {
"name": "agent_commentary_company_kind_created_idx",
@@ -1903,63 +1903,63 @@
}
],
"isUnique": false,
- "with": {},
+ "concurrently": false,
"method": "btree",
- "concurrently": false
+ "with": {}
}
},
"foreignKeys": {
"agent_commentary_company_id_companies_id_fk": {
"name": "agent_commentary_company_id_companies_id_fk",
"tableFrom": "agent_commentary",
+ "tableTo": "companies",
"columnsFrom": [
"company_id"
],
- "tableTo": "companies",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "cascade"
+ "onDelete": "cascade",
+ "onUpdate": "no action"
},
"agent_commentary_agent_id_agents_id_fk": {
"name": "agent_commentary_agent_id_agents_id_fk",
"tableFrom": "agent_commentary",
+ "tableTo": "agents",
"columnsFrom": [
"agent_id"
],
- "tableTo": "agents",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "cascade"
+ "onDelete": "cascade",
+ "onUpdate": "no action"
},
"agent_commentary_run_id_heartbeat_runs_id_fk": {
"name": "agent_commentary_run_id_heartbeat_runs_id_fk",
"tableFrom": "agent_commentary",
+ "tableTo": "heartbeat_runs",
"columnsFrom": [
"run_id"
],
- "tableTo": "heartbeat_runs",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "cascade"
+ "onDelete": "cascade",
+ "onUpdate": "no action"
},
"agent_commentary_issue_id_issues_id_fk": {
"name": "agent_commentary_issue_id_issues_id_fk",
"tableFrom": "agent_commentary",
+ "tableTo": "issues",
"columnsFrom": [
"issue_id"
],
- "tableTo": "issues",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "set null"
+ "onDelete": "set null",
+ "onUpdate": "no action"
}
},
"compositePrimaryKeys": {},
@@ -2072,9 +2072,9 @@
}
],
"isUnique": false,
- "with": {},
+ "concurrently": false,
"method": "btree",
- "concurrently": false
+ "with": {}
},
"agent_config_revisions_agent_created_idx": {
"name": "agent_config_revisions_agent_created_idx",
@@ -2093,50 +2093,50 @@
}
],
"isUnique": false,
- "with": {},
+ "concurrently": false,
"method": "btree",
- "concurrently": false
+ "with": {}
}
},
"foreignKeys": {
"agent_config_revisions_company_id_companies_id_fk": {
"name": "agent_config_revisions_company_id_companies_id_fk",
"tableFrom": "agent_config_revisions",
+ "tableTo": "companies",
"columnsFrom": [
"company_id"
],
- "tableTo": "companies",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "no action"
+ "onDelete": "no action",
+ "onUpdate": "no action"
},
"agent_config_revisions_agent_id_agents_id_fk": {
"name": "agent_config_revisions_agent_id_agents_id_fk",
"tableFrom": "agent_config_revisions",
+ "tableTo": "agents",
"columnsFrom": [
"agent_id"
],
- "tableTo": "agents",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "cascade"
+ "onDelete": "cascade",
+ "onUpdate": "no action"
},
"agent_config_revisions_created_by_agent_id_agents_id_fk": {
"name": "agent_config_revisions_created_by_agent_id_agents_id_fk",
"tableFrom": "agent_config_revisions",
+ "tableTo": "agents",
"columnsFrom": [
"created_by_agent_id"
],
- "tableTo": "agents",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "set null"
+ "onDelete": "set null",
+ "onUpdate": "no action"
}
},
"compositePrimaryKeys": {},
@@ -2198,17 +2198,17 @@
"agent_identity_keys_owner_fk": {
"name": "agent_identity_keys_owner_fk",
"tableFrom": "agent_identity_keys",
+ "tableTo": "agents",
"columnsFrom": [
"company_id",
"agent_id"
],
- "tableTo": "agents",
"columnsTo": [
"company_id",
"id"
],
- "onUpdate": "no action",
- "onDelete": "cascade"
+ "onDelete": "cascade",
+ "onUpdate": "no action"
}
},
"compositePrimaryKeys": {},
@@ -2263,33 +2263,33 @@
"agent_instruction_heads_company_id_agent_id_entry_file_revision_id_agent_instruction_revisions_company_id_agent_id_entry_file_id_fk": {
"name": "agent_instruction_heads_company_id_agent_id_entry_file_revision_id_agent_instruction_revisions_company_id_agent_id_entry_file_id_fk",
"tableFrom": "agent_instruction_heads",
+ "tableTo": "agent_instruction_revisions",
"columnsFrom": [
"company_id",
"agent_id",
"entry_file",
"revision_id"
],
- "tableTo": "agent_instruction_revisions",
"columnsTo": [
"company_id",
"agent_id",
"entry_file",
"id"
],
- "onUpdate": "no action",
- "onDelete": "cascade"
+ "onDelete": "cascade",
+ "onUpdate": "no action"
}
},
"compositePrimaryKeys": {},
"uniqueConstraints": {
"agent_instruction_heads_identity_uq": {
"name": "agent_instruction_heads_identity_uq",
+ "nullsNotDistinct": false,
"columns": [
"company_id",
"agent_id",
"entry_file"
- ],
- "nullsNotDistinct": false
+ ]
}
},
"policies": {},
@@ -2435,39 +2435,39 @@
}
],
"isUnique": false,
- "with": {},
+ "concurrently": false,
"method": "btree",
- "concurrently": false
+ "with": {}
}
},
"foreignKeys": {
"agent_instruction_revisions_company_id_agent_id_agents_company_id_id_fk": {
"name": "agent_instruction_revisions_company_id_agent_id_agents_company_id_id_fk",
"tableFrom": "agent_instruction_revisions",
+ "tableTo": "agents",
"columnsFrom": [
"company_id",
"agent_id"
],
- "tableTo": "agents",
"columnsTo": [
"company_id",
"id"
],
- "onUpdate": "no action",
- "onDelete": "cascade"
+ "onDelete": "cascade",
+ "onUpdate": "no action"
}
},
"compositePrimaryKeys": {},
"uniqueConstraints": {
"agent_instruction_revisions_identity_uq": {
"name": "agent_instruction_revisions_identity_uq",
+ "nullsNotDistinct": false,
"columns": [
"company_id",
"agent_id",
"entry_file",
"id"
- ],
- "nullsNotDistinct": false
+ ]
}
},
"policies": {},
@@ -2627,9 +2627,9 @@
}
],
"isUnique": false,
- "with": {},
+ "concurrently": false,
"method": "btree",
- "concurrently": false
+ "with": {}
},
"agent_instruction_copies_agent_idx": {
"name": "agent_instruction_copies_agent_idx",
@@ -2654,39 +2654,39 @@
}
],
"isUnique": false,
- "with": {},
+ "concurrently": false,
"method": "btree",
- "concurrently": false
+ "with": {}
}
},
"foreignKeys": {
"agent_instruction_working_copies_run_id_heartbeat_runs_id_fk": {
"name": "agent_instruction_working_copies_run_id_heartbeat_runs_id_fk",
"tableFrom": "agent_instruction_working_copies",
+ "tableTo": "heartbeat_runs",
"columnsFrom": [
"run_id"
],
- "tableTo": "heartbeat_runs",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "cascade"
+ "onDelete": "cascade",
+ "onUpdate": "no action"
},
"agent_instruction_working_copies_company_id_agent_id_agents_company_id_id_fk": {
"name": "agent_instruction_working_copies_company_id_agent_id_agents_company_id_id_fk",
"tableFrom": "agent_instruction_working_copies",
+ "tableTo": "agents",
"columnsFrom": [
"company_id",
"agent_id"
],
- "tableTo": "agents",
"columnsTo": [
"company_id",
"id"
],
- "onUpdate": "no action",
- "onDelete": "cascade"
+ "onDelete": "cascade",
+ "onUpdate": "no action"
}
},
"compositePrimaryKeys": {},
@@ -2770,9 +2770,9 @@
}
],
"isUnique": false,
- "with": {},
+ "concurrently": false,
"method": "btree",
- "concurrently": false
+ "with": {}
},
"agent_memberships_company_user_starred_idx": {
"name": "agent_memberships_company_user_starred_idx",
@@ -2797,9 +2797,9 @@
}
],
"isUnique": false,
- "with": {},
+ "concurrently": false,
"method": "btree",
- "concurrently": false
+ "with": {}
},
"agent_memberships_agent_idx": {
"name": "agent_memberships_agent_idx",
@@ -2812,9 +2812,9 @@
}
],
"isUnique": false,
- "with": {},
+ "concurrently": false,
"method": "btree",
- "concurrently": false
+ "with": {}
},
"agent_memberships_company_user_agent_uq": {
"name": "agent_memberships_company_user_agent_uq",
@@ -2839,37 +2839,37 @@
}
],
"isUnique": true,
- "with": {},
+ "concurrently": false,
"method": "btree",
- "concurrently": false
+ "with": {}
}
},
"foreignKeys": {
"agent_memberships_company_id_companies_id_fk": {
"name": "agent_memberships_company_id_companies_id_fk",
"tableFrom": "agent_memberships",
+ "tableTo": "companies",
"columnsFrom": [
"company_id"
],
- "tableTo": "companies",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "cascade"
+ "onDelete": "cascade",
+ "onUpdate": "no action"
},
"agent_memberships_agent_id_agents_id_fk": {
"name": "agent_memberships_agent_id_agents_id_fk",
"tableFrom": "agent_memberships",
+ "tableTo": "agents",
"columnsFrom": [
"agent_id"
],
- "tableTo": "agents",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "cascade"
+ "onDelete": "cascade",
+ "onUpdate": "no action"
}
},
"compositePrimaryKeys": {},
@@ -2992,9 +2992,9 @@
}
],
"isUnique": false,
- "with": {},
+ "concurrently": false,
"method": "btree",
- "concurrently": false
+ "with": {}
},
"agent_runtime_state_company_updated_idx": {
"name": "agent_runtime_state_company_updated_idx",
@@ -3013,37 +3013,37 @@
}
],
"isUnique": false,
- "with": {},
+ "concurrently": false,
"method": "btree",
- "concurrently": false
+ "with": {}
}
},
"foreignKeys": {
"agent_runtime_state_agent_id_agents_id_fk": {
"name": "agent_runtime_state_agent_id_agents_id_fk",
"tableFrom": "agent_runtime_state",
+ "tableTo": "agents",
"columnsFrom": [
"agent_id"
],
- "tableTo": "agents",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "no action"
+ "onDelete": "no action",
+ "onUpdate": "no action"
},
"agent_runtime_state_company_id_companies_id_fk": {
"name": "agent_runtime_state_company_id_companies_id_fk",
"tableFrom": "agent_runtime_state",
+ "tableTo": "companies",
"columnsFrom": [
"company_id"
],
- "tableTo": "companies",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "no action"
+ "onDelete": "no action",
+ "onUpdate": "no action"
}
},
"compositePrimaryKeys": {},
@@ -3157,9 +3157,9 @@
}
],
"isUnique": true,
- "with": {},
+ "concurrently": false,
"method": "btree",
- "concurrently": false
+ "with": {}
},
"agent_session_goal_actions_company_status_created_idx": {
"name": "agent_session_goal_actions_company_status_created_idx",
@@ -3184,9 +3184,9 @@
}
],
"isUnique": false,
- "with": {},
+ "concurrently": false,
"method": "btree",
- "concurrently": false
+ "with": {}
},
"agent_session_goal_actions_session_created_idx": {
"name": "agent_session_goal_actions_session_created_idx",
@@ -3205,37 +3205,37 @@
}
],
"isUnique": false,
- "with": {},
+ "concurrently": false,
"method": "btree",
- "concurrently": false
+ "with": {}
}
},
"foreignKeys": {
"agent_session_goal_actions_company_id_companies_id_fk": {
"name": "agent_session_goal_actions_company_id_companies_id_fk",
"tableFrom": "agent_session_goal_actions",
+ "tableTo": "companies",
"columnsFrom": [
"company_id"
],
- "tableTo": "companies",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "no action"
+ "onDelete": "no action",
+ "onUpdate": "no action"
},
"agent_session_goal_actions_session_id_agent_task_sessions_id_fk": {
"name": "agent_session_goal_actions_session_id_agent_task_sessions_id_fk",
"tableFrom": "agent_session_goal_actions",
+ "tableTo": "agent_task_sessions",
"columnsFrom": [
"session_id"
],
- "tableTo": "agent_task_sessions",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "cascade"
+ "onDelete": "cascade",
+ "onUpdate": "no action"
}
},
"compositePrimaryKeys": {},
@@ -3397,9 +3397,9 @@
}
],
"isUnique": true,
- "with": {},
+ "concurrently": false,
"method": "btree",
- "concurrently": false
+ "with": {}
},
"agent_task_sessions_company_agent_updated_idx": {
"name": "agent_task_sessions_company_agent_updated_idx",
@@ -3424,9 +3424,9 @@
}
],
"isUnique": false,
- "with": {},
+ "concurrently": false,
"method": "btree",
- "concurrently": false
+ "with": {}
},
"agent_task_sessions_company_task_updated_idx": {
"name": "agent_task_sessions_company_task_updated_idx",
@@ -3451,50 +3451,50 @@
}
],
"isUnique": false,
- "with": {},
+ "concurrently": false,
"method": "btree",
- "concurrently": false
+ "with": {}
}
},
"foreignKeys": {
"agent_task_sessions_company_id_companies_id_fk": {
"name": "agent_task_sessions_company_id_companies_id_fk",
"tableFrom": "agent_task_sessions",
+ "tableTo": "companies",
"columnsFrom": [
"company_id"
],
- "tableTo": "companies",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "no action"
+ "onDelete": "no action",
+ "onUpdate": "no action"
},
"agent_task_sessions_agent_id_agents_id_fk": {
"name": "agent_task_sessions_agent_id_agents_id_fk",
"tableFrom": "agent_task_sessions",
+ "tableTo": "agents",
"columnsFrom": [
"agent_id"
],
- "tableTo": "agents",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "no action"
+ "onDelete": "no action",
+ "onUpdate": "no action"
},
"agent_task_sessions_last_run_id_heartbeat_runs_id_fk": {
"name": "agent_task_sessions_last_run_id_heartbeat_runs_id_fk",
"tableFrom": "agent_task_sessions",
+ "tableTo": "heartbeat_runs",
"columnsFrom": [
"last_run_id"
],
- "tableTo": "heartbeat_runs",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "no action"
+ "onDelete": "no action",
+ "onUpdate": "no action"
}
},
"compositePrimaryKeys": {},
@@ -3652,9 +3652,9 @@
}
],
"isUnique": false,
- "with": {},
+ "concurrently": false,
"method": "btree",
- "concurrently": false
+ "with": {}
},
"agent_wakeup_requests_company_requested_idx": {
"name": "agent_wakeup_requests_company_requested_idx",
@@ -3673,9 +3673,9 @@
}
],
"isUnique": false,
- "with": {},
+ "concurrently": false,
"method": "btree",
- "concurrently": false
+ "with": {}
},
"agent_wakeup_requests_agent_requested_idx": {
"name": "agent_wakeup_requests_agent_requested_idx",
@@ -3694,9 +3694,9 @@
}
],
"isUnique": false,
- "with": {},
+ "concurrently": false,
"method": "btree",
- "concurrently": false
+ "with": {}
},
"agent_wakeup_requests_review_path_recovery_idempotency_uq": {
"name": "agent_wakeup_requests_review_path_recovery_idempotency_uq",
@@ -3715,10 +3715,10 @@
}
],
"isUnique": true,
- "with": {},
- "method": "btree",
"where": "\"agent_wakeup_requests\".\"idempotency_key\" LIKE 'issue_review_path_lost:%' AND \"agent_wakeup_requests\".\"status\" <> 'skipped'",
- "concurrently": false
+ "concurrently": false,
+ "method": "btree",
+ "with": {}
},
"agent_wakeup_requests_disposition_repair_idempotency_uq": {
"name": "agent_wakeup_requests_disposition_repair_idempotency_uq",
@@ -3737,10 +3737,10 @@
}
],
"isUnique": true,
- "with": {},
- "method": "btree",
"where": "\"agent_wakeup_requests\".\"idempotency_key\" LIKE 'issue_disposition_repair:%' AND \"agent_wakeup_requests\".\"status\" <> 'skipped'",
- "concurrently": false
+ "concurrently": false,
+ "method": "btree",
+ "with": {}
},
"agent_wakeup_requests_question_response_delivery_idempotency_uq": {
"name": "agent_wakeup_requests_question_response_delivery_idempotency_uq",
@@ -3759,10 +3759,10 @@
}
],
"isUnique": true,
- "with": {},
- "method": "btree",
"where": "(\"agent_wakeup_requests\".\"idempotency_key\" LIKE 'question-response:%' OR \"agent_wakeup_requests\".\"idempotency_key\" LIKE 'interaction:%') AND \"agent_wakeup_requests\".\"status\" NOT IN ('skipped', 'failed', 'cancelled')",
- "concurrently": false
+ "concurrently": false,
+ "method": "btree",
+ "with": {}
},
"agent_wakeup_requests_question_response_history_idx": {
"name": "agent_wakeup_requests_question_response_history_idx",
@@ -3781,10 +3781,10 @@
}
],
"isUnique": false,
- "with": {},
- "method": "btree",
"where": "\"agent_wakeup_requests\".\"idempotency_key\" LIKE 'question-response:%'",
- "concurrently": true
+ "concurrently": true,
+ "method": "btree",
+ "with": {}
},
"agent_wakeup_requests_connection_intent_delivery_idempotency_uq": {
"name": "agent_wakeup_requests_connection_intent_delivery_idempotency_uq",
@@ -3803,10 +3803,10 @@
}
],
"isUnique": true,
- "with": {},
- "method": "btree",
"where": "\"agent_wakeup_requests\".\"idempotency_key\" LIKE 'connection-intent:%' AND \"agent_wakeup_requests\".\"status\" NOT IN ('skipped', 'failed', 'cancelled')",
- "concurrently": false
+ "concurrently": false,
+ "method": "btree",
+ "with": {}
},
"agent_wakeup_requests_tool_action_delivery_uq": {
"name": "agent_wakeup_requests_tool_action_delivery_uq",
@@ -3825,10 +3825,10 @@
}
],
"isUnique": true,
- "with": {},
- "method": "btree",
"where": "\"agent_wakeup_requests\".\"idempotency_key\" LIKE 'tool-action-response:%' AND \"agent_wakeup_requests\".\"status\" NOT IN ('skipped', 'failed', 'cancelled')",
- "concurrently": false
+ "concurrently": false,
+ "method": "btree",
+ "with": {}
},
"agent_wakeup_requests_chat_completion_uq": {
"name": "agent_wakeup_requests_chat_completion_uq",
@@ -3847,10 +3847,10 @@
}
],
"isUnique": true,
- "with": {},
- "method": "btree",
"where": "\"agent_wakeup_requests\".\"idempotency_key\" LIKE 'chat-completion:%'",
- "concurrently": false
+ "concurrently": false,
+ "method": "btree",
+ "with": {}
},
"agent_wakeup_requests_company_payload_issue_idx": {
"name": "agent_wakeup_requests_company_payload_issue_idx",
@@ -3863,43 +3863,43 @@
},
{
"expression": "(\"payload\" ->> 'issueId')",
- "isExpression": true,
"asc": true,
+ "isExpression": true,
"nulls": "last"
}
],
"isUnique": false,
- "with": {},
+ "concurrently": false,
"method": "btree",
- "concurrently": false
+ "with": {}
}
},
"foreignKeys": {
"agent_wakeup_requests_company_id_companies_id_fk": {
"name": "agent_wakeup_requests_company_id_companies_id_fk",
"tableFrom": "agent_wakeup_requests",
+ "tableTo": "companies",
"columnsFrom": [
"company_id"
],
- "tableTo": "companies",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "no action"
+ "onDelete": "no action",
+ "onUpdate": "no action"
},
"agent_wakeup_requests_agent_id_agents_id_fk": {
"name": "agent_wakeup_requests_agent_id_agents_id_fk",
"tableFrom": "agent_wakeup_requests",
+ "tableTo": "agents",
"columnsFrom": [
"agent_id"
],
- "tableTo": "agents",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "no action"
+ "onDelete": "no action",
+ "onUpdate": "no action"
}
},
"compositePrimaryKeys": {},
@@ -4143,9 +4143,9 @@
}
],
"isUnique": false,
- "with": {},
+ "concurrently": false,
"method": "btree",
- "concurrently": false
+ "with": {}
},
"agents_company_status_idx": {
"name": "agents_company_status_idx",
@@ -4164,9 +4164,9 @@
}
],
"isUnique": false,
- "with": {},
+ "concurrently": false,
"method": "btree",
- "concurrently": false
+ "with": {}
},
"agents_company_reports_to_idx": {
"name": "agents_company_reports_to_idx",
@@ -4185,9 +4185,9 @@
}
],
"isUnique": false,
- "with": {},
+ "concurrently": false,
"method": "btree",
- "concurrently": false
+ "with": {}
},
"agents_company_default_environment_idx": {
"name": "agents_company_default_environment_idx",
@@ -4206,61 +4206,61 @@
}
],
"isUnique": false,
- "with": {},
+ "concurrently": false,
"method": "btree",
- "concurrently": false
+ "with": {}
}
},
"foreignKeys": {
"agents_company_id_companies_id_fk": {
"name": "agents_company_id_companies_id_fk",
"tableFrom": "agents",
+ "tableTo": "companies",
"columnsFrom": [
"company_id"
],
- "tableTo": "companies",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "no action"
+ "onDelete": "no action",
+ "onUpdate": "no action"
},
"agents_reports_to_agents_id_fk": {
"name": "agents_reports_to_agents_id_fk",
"tableFrom": "agents",
+ "tableTo": "agents",
"columnsFrom": [
"reports_to"
],
- "tableTo": "agents",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "no action"
+ "onDelete": "no action",
+ "onUpdate": "no action"
},
"agents_default_environment_id_environments_id_fk": {
"name": "agents_default_environment_id_environments_id_fk",
"tableFrom": "agents",
+ "tableTo": "environments",
"columnsFrom": [
"default_environment_id"
],
- "tableTo": "environments",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "set null"
+ "onDelete": "set null",
+ "onUpdate": "no action"
}
},
"compositePrimaryKeys": {},
"uniqueConstraints": {
"agents_company_id_uq": {
"name": "agents_company_id_uq",
+ "nullsNotDistinct": false,
"columns": [
"company_id",
"id"
- ],
- "nullsNotDistinct": false
+ ]
}
},
"policies": {},
@@ -4346,39 +4346,39 @@
}
],
"isUnique": true,
- "with": {},
+ "concurrently": false,
"method": "btree",
- "concurrently": false
+ "with": {}
}
},
"foreignKeys": {
"ai_connection_defaults_company_id_companies_id_fk": {
"name": "ai_connection_defaults_company_id_companies_id_fk",
"tableFrom": "ai_connection_defaults",
+ "tableTo": "companies",
"columnsFrom": [
"company_id"
],
- "tableTo": "companies",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "cascade"
+ "onDelete": "cascade",
+ "onUpdate": "no action"
},
"ai_connection_defaults_company_grant_fk": {
"name": "ai_connection_defaults_company_grant_fk",
"tableFrom": "ai_connection_defaults",
+ "tableTo": "connection_grants",
"columnsFrom": [
"company_id",
"grant_id"
],
- "tableTo": "connection_grants",
"columnsTo": [
"company_id",
"id"
],
- "onUpdate": "no action",
- "onDelete": "no action"
+ "onDelete": "no action",
+ "onUpdate": "no action"
}
},
"compositePrimaryKeys": {},
@@ -4387,7 +4387,7 @@
"checkConstraints": {
"ai_connection_defaults_provider_check": {
"name": "ai_connection_defaults_provider_check",
- "value": "\"ai_connection_defaults\".\"provider\" in ('anthropic','openai','openrouter','xai','google')"
+ "value": "\"ai_connection_defaults\".\"provider\" in ('anthropic','openai','openrouter','xai','google','github')"
},
"ai_connection_defaults_method_check": {
"name": "ai_connection_defaults_method_check",
@@ -4451,54 +4451,54 @@
"ai_connection_pools_id_tool_connections_id_fk": {
"name": "ai_connection_pools_id_tool_connections_id_fk",
"tableFrom": "ai_connection_pools",
+ "tableTo": "tool_connections",
"columnsFrom": [
"id"
],
- "tableTo": "tool_connections",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "cascade"
+ "onDelete": "cascade",
+ "onUpdate": "no action"
},
"ai_connection_pools_company_id_companies_id_fk": {
"name": "ai_connection_pools_company_id_companies_id_fk",
"tableFrom": "ai_connection_pools",
+ "tableTo": "companies",
"columnsFrom": [
"company_id"
],
- "tableTo": "companies",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "cascade"
+ "onDelete": "cascade",
+ "onUpdate": "no action"
},
"ai_connection_pools_company_connection_fk": {
"name": "ai_connection_pools_company_connection_fk",
"tableFrom": "ai_connection_pools",
+ "tableTo": "tool_connections",
"columnsFrom": [
"company_id",
"id"
],
- "tableTo": "tool_connections",
"columnsTo": [
"company_id",
"id"
],
- "onUpdate": "no action",
- "onDelete": "cascade"
+ "onDelete": "cascade",
+ "onUpdate": "no action"
}
},
"compositePrimaryKeys": {},
"uniqueConstraints": {
"ai_connection_pools_company_id_uq": {
"name": "ai_connection_pools_company_id_uq",
+ "nullsNotDistinct": false,
"columns": [
"company_id",
"id"
- ],
- "nullsNotDistinct": false
+ ]
}
},
"policies": {},
@@ -4540,43 +4540,43 @@
"ai_connection_router_cursors_pool_id_ai_connection_pools_id_fk": {
"name": "ai_connection_router_cursors_pool_id_ai_connection_pools_id_fk",
"tableFrom": "ai_connection_router_cursors",
+ "tableTo": "ai_connection_pools",
"columnsFrom": [
"pool_id"
],
- "tableTo": "ai_connection_pools",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "cascade"
+ "onDelete": "cascade",
+ "onUpdate": "no action"
},
"ai_connection_router_cursors_company_id_companies_id_fk": {
"name": "ai_connection_router_cursors_company_id_companies_id_fk",
"tableFrom": "ai_connection_router_cursors",
+ "tableTo": "companies",
"columnsFrom": [
"company_id"
],
- "tableTo": "companies",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "cascade"
+ "onDelete": "cascade",
+ "onUpdate": "no action"
},
"ai_connection_router_cursors_company_pool_fk": {
"name": "ai_connection_router_cursors_company_pool_fk",
"tableFrom": "ai_connection_router_cursors",
+ "tableTo": "ai_connection_pools",
"columnsFrom": [
"company_id",
"pool_id"
],
- "tableTo": "ai_connection_pools",
"columnsTo": [
"company_id",
"id"
],
- "onUpdate": "no action",
- "onDelete": "cascade"
+ "onDelete": "cascade",
+ "onUpdate": "no action"
}
},
"compositePrimaryKeys": {},
@@ -4670,80 +4670,80 @@
}
],
"isUnique": true,
- "with": {},
+ "concurrently": false,
"method": "btree",
- "concurrently": false
+ "with": {}
}
},
"foreignKeys": {
"ai_connection_task_pins_company_id_companies_id_fk": {
"name": "ai_connection_task_pins_company_id_companies_id_fk",
"tableFrom": "ai_connection_task_pins",
+ "tableTo": "companies",
"columnsFrom": [
"company_id"
],
- "tableTo": "companies",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "cascade"
+ "onDelete": "cascade",
+ "onUpdate": "no action"
},
"ai_connection_task_pins_pool_id_ai_connection_pools_id_fk": {
"name": "ai_connection_task_pins_pool_id_ai_connection_pools_id_fk",
"tableFrom": "ai_connection_task_pins",
+ "tableTo": "ai_connection_pools",
"columnsFrom": [
"pool_id"
],
- "tableTo": "ai_connection_pools",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "cascade"
+ "onDelete": "cascade",
+ "onUpdate": "no action"
},
"ai_connection_task_pins_agent_id_agents_id_fk": {
"name": "ai_connection_task_pins_agent_id_agents_id_fk",
"tableFrom": "ai_connection_task_pins",
+ "tableTo": "agents",
"columnsFrom": [
"agent_id"
],
- "tableTo": "agents",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "cascade"
+ "onDelete": "cascade",
+ "onUpdate": "no action"
},
"ai_connection_task_pins_company_pool_fk": {
"name": "ai_connection_task_pins_company_pool_fk",
"tableFrom": "ai_connection_task_pins",
+ "tableTo": "ai_connection_pools",
"columnsFrom": [
"company_id",
"pool_id"
],
- "tableTo": "ai_connection_pools",
"columnsTo": [
"company_id",
"id"
],
- "onUpdate": "no action",
- "onDelete": "cascade"
+ "onDelete": "cascade",
+ "onUpdate": "no action"
},
"ai_connection_task_pins_company_agent_fk": {
"name": "ai_connection_task_pins_company_agent_fk",
"tableFrom": "ai_connection_task_pins",
+ "tableTo": "agents",
"columnsFrom": [
"company_id",
"agent_id"
],
- "tableTo": "agents",
"columnsTo": [
"company_id",
"id"
],
- "onUpdate": "no action",
- "onDelete": "cascade"
+ "onDelete": "cascade",
+ "onUpdate": "no action"
}
},
"compositePrimaryKeys": {},
@@ -4819,39 +4819,39 @@
}
],
"isUnique": true,
- "with": {},
+ "concurrently": false,
"method": "btree",
- "concurrently": false
+ "with": {}
}
},
"foreignKeys": {
"ai_provider_defaults_company_id_companies_id_fk": {
"name": "ai_provider_defaults_company_id_companies_id_fk",
"tableFrom": "ai_provider_defaults",
+ "tableTo": "companies",
"columnsFrom": [
"company_id"
],
- "tableTo": "companies",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "cascade"
+ "onDelete": "cascade",
+ "onUpdate": "no action"
},
"ai_provider_defaults_company_grant_fk": {
"name": "ai_provider_defaults_company_grant_fk",
"tableFrom": "ai_provider_defaults",
+ "tableTo": "connection_grants",
"columnsFrom": [
"company_id",
"grant_id"
],
- "tableTo": "connection_grants",
"columnsTo": [
"company_id",
"id"
],
- "onUpdate": "no action",
- "onDelete": "no action"
+ "onDelete": "no action",
+ "onUpdate": "no action"
}
},
"compositePrimaryKeys": {},
@@ -4860,7 +4860,7 @@
"checkConstraints": {
"ai_provider_defaults_provider_check": {
"name": "ai_provider_defaults_provider_check",
- "value": "\"ai_provider_defaults\".\"provider\" in ('anthropic','openai','openrouter','xai','google')"
+ "value": "\"ai_provider_defaults\".\"provider\" in ('anthropic','openai','openrouter','xai','google','github')"
}
},
"isRLSEnabled": false
@@ -4925,9 +4925,9 @@
}
],
"isUnique": true,
- "with": {},
+ "concurrently": false,
"method": "btree",
- "concurrently": false
+ "with": {}
},
"ai_subscription_connections_credential_idx": {
"name": "ai_subscription_connections_credential_idx",
@@ -4946,9 +4946,9 @@
}
],
"isUnique": false,
- "with": {},
+ "concurrently": false,
"method": "btree",
- "concurrently": false
+ "with": {}
},
"ai_subscription_connections_account_idx": {
"name": "ai_subscription_connections_account_idx",
@@ -4967,63 +4967,63 @@
}
],
"isUnique": false,
- "with": {},
+ "concurrently": false,
"method": "btree",
- "concurrently": false
+ "with": {}
}
},
"foreignKeys": {
"ai_subscription_connections_company_id_companies_id_fk": {
"name": "ai_subscription_connections_company_id_companies_id_fk",
"tableFrom": "ai_subscription_connections",
+ "tableTo": "companies",
"columnsFrom": [
"company_id"
],
- "tableTo": "companies",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "cascade"
+ "onDelete": "cascade",
+ "onUpdate": "no action"
},
"ai_subscription_connections_connection_id_tool_connections_id_fk": {
"name": "ai_subscription_connections_connection_id_tool_connections_id_fk",
"tableFrom": "ai_subscription_connections",
+ "tableTo": "tool_connections",
"columnsFrom": [
"connection_id"
],
- "tableTo": "tool_connections",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "cascade"
+ "onDelete": "cascade",
+ "onUpdate": "no action"
},
"ai_subscription_connections_grant_id_connection_grants_id_fk": {
"name": "ai_subscription_connections_grant_id_connection_grants_id_fk",
"tableFrom": "ai_subscription_connections",
+ "tableTo": "connection_grants",
"columnsFrom": [
"grant_id"
],
- "tableTo": "connection_grants",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "cascade"
+ "onDelete": "cascade",
+ "onUpdate": "no action"
},
"ai_subscription_connections_subscription_id_ai_subscriptions_id_fk": {
"name": "ai_subscription_connections_subscription_id_ai_subscriptions_id_fk",
"tableFrom": "ai_subscription_connections",
+ "tableTo": "ai_subscriptions",
"columnsFrom": [
"subscription_id"
],
- "tableTo": "ai_subscriptions",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "cascade"
+ "onDelete": "cascade",
+ "onUpdate": "no action"
}
},
"compositePrimaryKeys": {},
@@ -5132,9 +5132,9 @@
}
],
"isUnique": true,
- "with": {},
+ "concurrently": false,
"method": "btree",
- "concurrently": false
+ "with": {}
},
"ai_subscription_prices_company_idx": {
"name": "ai_subscription_prices_company_idx",
@@ -5147,37 +5147,37 @@
}
],
"isUnique": false,
- "with": {},
+ "concurrently": false,
"method": "btree",
- "concurrently": false
+ "with": {}
}
},
"foreignKeys": {
"ai_subscription_prices_company_id_companies_id_fk": {
"name": "ai_subscription_prices_company_id_companies_id_fk",
"tableFrom": "ai_subscription_prices",
+ "tableTo": "companies",
"columnsFrom": [
"company_id"
],
- "tableTo": "companies",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "cascade"
+ "onDelete": "cascade",
+ "onUpdate": "no action"
},
"ai_subscription_prices_subscription_id_ai_subscriptions_id_fk": {
"name": "ai_subscription_prices_subscription_id_ai_subscriptions_id_fk",
"tableFrom": "ai_subscription_prices",
+ "tableTo": "ai_subscriptions",
"columnsFrom": [
"subscription_id"
],
- "tableTo": "ai_subscriptions",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "cascade"
+ "onDelete": "cascade",
+ "onUpdate": "no action"
}
},
"compositePrimaryKeys": {},
@@ -5316,9 +5316,9 @@
}
],
"isUnique": true,
- "with": {},
+ "concurrently": false,
"method": "btree",
- "concurrently": false
+ "with": {}
},
"ai_subscriptions_company_idx": {
"name": "ai_subscriptions_company_idx",
@@ -5331,37 +5331,37 @@
}
],
"isUnique": false,
- "with": {},
+ "concurrently": false,
"method": "btree",
- "concurrently": false
+ "with": {}
}
},
"foreignKeys": {
"ai_subscriptions_company_id_companies_id_fk": {
"name": "ai_subscriptions_company_id_companies_id_fk",
"tableFrom": "ai_subscriptions",
+ "tableTo": "companies",
"columnsFrom": [
"company_id"
],
- "tableTo": "companies",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "cascade"
+ "onDelete": "cascade",
+ "onUpdate": "no action"
},
"ai_subscriptions_merged_into_id_ai_subscriptions_id_fk": {
"name": "ai_subscriptions_merged_into_id_ai_subscriptions_id_fk",
"tableFrom": "ai_subscriptions",
+ "tableTo": "ai_subscriptions",
"columnsFrom": [
"merged_into_id"
],
- "tableTo": "ai_subscriptions",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "no action"
+ "onDelete": "no action",
+ "onUpdate": "no action"
}
},
"compositePrimaryKeys": {},
@@ -5502,9 +5502,9 @@
}
],
"isUnique": false,
- "with": {},
+ "concurrently": false,
"method": "btree",
- "concurrently": false
+ "with": {}
},
"approval_comments_approval_idx": {
"name": "approval_comments_approval_idx",
@@ -5517,9 +5517,9 @@
}
],
"isUnique": false,
- "with": {},
+ "concurrently": false,
"method": "btree",
- "concurrently": false
+ "with": {}
},
"approval_comments_approval_created_idx": {
"name": "approval_comments_approval_created_idx",
@@ -5538,50 +5538,50 @@
}
],
"isUnique": false,
- "with": {},
+ "concurrently": false,
"method": "btree",
- "concurrently": false
+ "with": {}
}
},
"foreignKeys": {
"approval_comments_company_id_companies_id_fk": {
"name": "approval_comments_company_id_companies_id_fk",
"tableFrom": "approval_comments",
+ "tableTo": "companies",
"columnsFrom": [
"company_id"
],
- "tableTo": "companies",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "no action"
+ "onDelete": "no action",
+ "onUpdate": "no action"
},
"approval_comments_approval_id_approvals_id_fk": {
"name": "approval_comments_approval_id_approvals_id_fk",
"tableFrom": "approval_comments",
+ "tableTo": "approvals",
"columnsFrom": [
"approval_id"
],
- "tableTo": "approvals",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "no action"
+ "onDelete": "no action",
+ "onUpdate": "no action"
},
"approval_comments_author_agent_id_agents_id_fk": {
"name": "approval_comments_author_agent_id_agents_id_fk",
"tableFrom": "approval_comments",
+ "tableTo": "agents",
"columnsFrom": [
"author_agent_id"
],
- "tableTo": "agents",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "no action"
+ "onDelete": "no action",
+ "onUpdate": "no action"
}
},
"compositePrimaryKeys": {},
@@ -5695,37 +5695,37 @@
}
],
"isUnique": false,
- "with": {},
+ "concurrently": false,
"method": "btree",
- "concurrently": false
+ "with": {}
}
},
"foreignKeys": {
"approvals_company_id_companies_id_fk": {
"name": "approvals_company_id_companies_id_fk",
"tableFrom": "approvals",
+ "tableTo": "companies",
"columnsFrom": [
"company_id"
],
- "tableTo": "companies",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "no action"
+ "onDelete": "no action",
+ "onUpdate": "no action"
},
"approvals_requested_by_agent_id_agents_id_fk": {
"name": "approvals_requested_by_agent_id_agents_id_fk",
"tableFrom": "approvals",
+ "tableTo": "agents",
"columnsFrom": [
"requested_by_agent_id"
],
- "tableTo": "agents",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "no action"
+ "onDelete": "no action",
+ "onUpdate": "no action"
}
},
"compositePrimaryKeys": {},
@@ -5832,9 +5832,9 @@
}
],
"isUnique": false,
- "with": {},
+ "concurrently": false,
"method": "btree",
- "concurrently": false
+ "with": {}
},
"assets_company_provider_idx": {
"name": "assets_company_provider_idx",
@@ -5853,9 +5853,9 @@
}
],
"isUnique": false,
- "with": {},
+ "concurrently": false,
"method": "btree",
- "concurrently": false
+ "with": {}
},
"assets_company_object_key_uq": {
"name": "assets_company_object_key_uq",
@@ -5874,37 +5874,37 @@
}
],
"isUnique": true,
- "with": {},
+ "concurrently": false,
"method": "btree",
- "concurrently": false
+ "with": {}
}
},
"foreignKeys": {
"assets_company_id_companies_id_fk": {
"name": "assets_company_id_companies_id_fk",
"tableFrom": "assets",
+ "tableTo": "companies",
"columnsFrom": [
"company_id"
],
- "tableTo": "companies",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "no action"
+ "onDelete": "no action",
+ "onUpdate": "no action"
},
"assets_created_by_agent_id_agents_id_fk": {
"name": "assets_created_by_agent_id_agents_id_fk",
"tableFrom": "assets",
+ "tableTo": "agents",
"columnsFrom": [
"created_by_agent_id"
],
- "tableTo": "agents",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "no action"
+ "onDelete": "no action",
+ "onUpdate": "no action"
}
},
"compositePrimaryKeys": {},
@@ -6020,24 +6020,24 @@
}
],
"isUnique": true,
- "with": {},
+ "concurrently": false,
"method": "btree",
- "concurrently": false
+ "with": {}
}
},
"foreignKeys": {
"account_user_id_user_id_fk": {
"name": "account_user_id_user_id_fk",
"tableFrom": "account",
+ "tableTo": "user",
"columnsFrom": [
"user_id"
],
- "tableTo": "user",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "cascade"
+ "onDelete": "cascade",
+ "onUpdate": "no action"
}
},
"compositePrimaryKeys": {},
@@ -6104,15 +6104,15 @@
"session_user_id_user_id_fk": {
"name": "session_user_id_user_id_fk",
"tableFrom": "session",
+ "tableTo": "user",
"columnsFrom": [
"user_id"
],
- "tableTo": "user",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "cascade"
+ "onDelete": "cascade",
+ "onUpdate": "no action"
}
},
"compositePrimaryKeys": {},
@@ -6293,9 +6293,9 @@
}
],
"isUnique": true,
- "with": {},
+ "concurrently": false,
"method": "btree",
- "concurrently": false
+ "with": {}
},
"board_api_keys_user_idx": {
"name": "board_api_keys_user_idx",
@@ -6308,24 +6308,24 @@
}
],
"isUnique": false,
- "with": {},
+ "concurrently": false,
"method": "btree",
- "concurrently": false
+ "with": {}
}
},
"foreignKeys": {
"board_api_keys_user_id_user_id_fk": {
"name": "board_api_keys_user_id_user_id_fk",
"tableFrom": "board_api_keys",
+ "tableTo": "user",
"columnsFrom": [
"user_id"
],
- "tableTo": "user",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "cascade"
+ "onDelete": "cascade",
+ "onUpdate": "no action"
}
},
"compositePrimaryKeys": {},
@@ -6396,9 +6396,9 @@
}
],
"isUnique": true,
- "with": {},
+ "concurrently": false,
"method": "btree",
- "concurrently": false
+ "with": {}
},
"browser_use_browsers_session_idx": {
"name": "browser_use_browsers_session_idx",
@@ -6411,37 +6411,37 @@
}
],
"isUnique": false,
- "with": {},
+ "concurrently": false,
"method": "btree",
- "concurrently": false
+ "with": {}
}
},
"foreignKeys": {
"browser_use_browsers_company_id_companies_id_fk": {
"name": "browser_use_browsers_company_id_companies_id_fk",
"tableFrom": "browser_use_browsers",
+ "tableTo": "companies",
"columnsFrom": [
"company_id"
],
- "tableTo": "companies",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "no action"
+ "onDelete": "no action",
+ "onUpdate": "no action"
},
"browser_use_browsers_session_id_browser_use_sessions_id_fk": {
"name": "browser_use_browsers_session_id_browser_use_sessions_id_fk",
"tableFrom": "browser_use_browsers",
+ "tableTo": "browser_use_sessions",
"columnsFrom": [
"session_id"
],
- "tableTo": "browser_use_sessions",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "no action"
+ "onDelete": "no action",
+ "onUpdate": "no action"
}
},
"compositePrimaryKeys": {},
@@ -6563,9 +6563,9 @@
}
],
"isUnique": true,
- "with": {},
+ "concurrently": false,
"method": "btree",
- "concurrently": false
+ "with": {}
},
"browser_use_runs_provider_uq": {
"name": "browser_use_runs_provider_uq",
@@ -6578,9 +6578,9 @@
}
],
"isUnique": true,
- "with": {},
+ "concurrently": false,
"method": "btree",
- "concurrently": false
+ "with": {}
},
"browser_use_runs_session_idx": {
"name": "browser_use_runs_session_idx",
@@ -6593,50 +6593,50 @@
}
],
"isUnique": false,
- "with": {},
+ "concurrently": false,
"method": "btree",
- "concurrently": false
+ "with": {}
}
},
"foreignKeys": {
"browser_use_runs_company_id_companies_id_fk": {
"name": "browser_use_runs_company_id_companies_id_fk",
"tableFrom": "browser_use_runs",
+ "tableTo": "companies",
"columnsFrom": [
"company_id"
],
- "tableTo": "companies",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "no action"
+ "onDelete": "no action",
+ "onUpdate": "no action"
},
"browser_use_runs_session_id_browser_use_sessions_id_fk": {
"name": "browser_use_runs_session_id_browser_use_sessions_id_fk",
"tableFrom": "browser_use_runs",
+ "tableTo": "browser_use_sessions",
"columnsFrom": [
"session_id"
],
- "tableTo": "browser_use_sessions",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "no action"
+ "onDelete": "no action",
+ "onUpdate": "no action"
},
"browser_use_runs_heartbeat_run_id_heartbeat_runs_id_fk": {
"name": "browser_use_runs_heartbeat_run_id_heartbeat_runs_id_fk",
"tableFrom": "browser_use_runs",
+ "tableTo": "heartbeat_runs",
"columnsFrom": [
"heartbeat_run_id"
],
- "tableTo": "heartbeat_runs",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "no action"
+ "onDelete": "no action",
+ "onUpdate": "no action"
}
},
"compositePrimaryKeys": {},
@@ -6769,9 +6769,9 @@
}
],
"isUnique": false,
- "with": {},
+ "concurrently": false,
"method": "btree",
- "concurrently": false
+ "with": {}
},
"browser_use_sessions_provider_uq": {
"name": "browser_use_sessions_provider_uq",
@@ -6784,76 +6784,76 @@
}
],
"isUnique": true,
- "with": {},
+ "concurrently": false,
"method": "btree",
- "concurrently": false
+ "with": {}
}
},
"foreignKeys": {
"browser_use_sessions_company_id_companies_id_fk": {
"name": "browser_use_sessions_company_id_companies_id_fk",
"tableFrom": "browser_use_sessions",
+ "tableTo": "companies",
"columnsFrom": [
"company_id"
],
- "tableTo": "companies",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "no action"
+ "onDelete": "no action",
+ "onUpdate": "no action"
},
"browser_use_sessions_issue_id_issues_id_fk": {
"name": "browser_use_sessions_issue_id_issues_id_fk",
"tableFrom": "browser_use_sessions",
+ "tableTo": "issues",
"columnsFrom": [
"issue_id"
],
- "tableTo": "issues",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "no action"
+ "onDelete": "no action",
+ "onUpdate": "no action"
},
"browser_use_sessions_agent_id_agents_id_fk": {
"name": "browser_use_sessions_agent_id_agents_id_fk",
"tableFrom": "browser_use_sessions",
+ "tableTo": "agents",
"columnsFrom": [
"agent_id"
],
- "tableTo": "agents",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "no action"
+ "onDelete": "no action",
+ "onUpdate": "no action"
},
"browser_use_sessions_connection_id_tool_connections_id_fk": {
"name": "browser_use_sessions_connection_id_tool_connections_id_fk",
"tableFrom": "browser_use_sessions",
+ "tableTo": "tool_connections",
"columnsFrom": [
"connection_id"
],
- "tableTo": "tool_connections",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "no action"
+ "onDelete": "no action",
+ "onUpdate": "no action"
},
"browser_use_sessions_grant_id_connection_grants_id_fk": {
"name": "browser_use_sessions_grant_id_connection_grants_id_fk",
"tableFrom": "browser_use_sessions",
+ "tableTo": "connection_grants",
"columnsFrom": [
"grant_id"
],
- "tableTo": "connection_grants",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "no action"
+ "onDelete": "no action",
+ "onUpdate": "no action"
}
},
"compositePrimaryKeys": {},
@@ -6897,28 +6897,28 @@
"browser_use_settings_grant_id_connection_grants_id_fk": {
"name": "browser_use_settings_grant_id_connection_grants_id_fk",
"tableFrom": "browser_use_settings",
+ "tableTo": "connection_grants",
"columnsFrom": [
"grant_id"
],
- "tableTo": "connection_grants",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "no action"
+ "onDelete": "no action",
+ "onUpdate": "no action"
},
"browser_use_settings_company_id_companies_id_fk": {
"name": "browser_use_settings_company_id_companies_id_fk",
"tableFrom": "browser_use_settings",
+ "tableTo": "companies",
"columnsFrom": [
"company_id"
],
- "tableTo": "companies",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "no action"
+ "onDelete": "no action",
+ "onUpdate": "no action"
}
},
"compositePrimaryKeys": {},
@@ -7056,9 +7056,9 @@
}
],
"isUnique": false,
- "with": {},
+ "concurrently": false,
"method": "btree",
- "concurrently": false
+ "with": {}
},
"budget_incidents_company_scope_idx": {
"name": "budget_incidents_company_scope_idx",
@@ -7089,9 +7089,9 @@
}
],
"isUnique": false,
- "with": {},
+ "concurrently": false,
"method": "btree",
- "concurrently": false
+ "with": {}
},
"budget_incidents_policy_window_threshold_idx": {
"name": "budget_incidents_policy_window_threshold_idx",
@@ -7116,51 +7116,51 @@
}
],
"isUnique": true,
- "with": {},
- "method": "btree",
"where": "\"budget_incidents\".\"status\" = 'open'",
- "concurrently": false
+ "concurrently": false,
+ "method": "btree",
+ "with": {}
}
},
"foreignKeys": {
"budget_incidents_company_id_companies_id_fk": {
"name": "budget_incidents_company_id_companies_id_fk",
"tableFrom": "budget_incidents",
+ "tableTo": "companies",
"columnsFrom": [
"company_id"
],
- "tableTo": "companies",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "no action"
+ "onDelete": "no action",
+ "onUpdate": "no action"
},
"budget_incidents_policy_id_budget_policies_id_fk": {
"name": "budget_incidents_policy_id_budget_policies_id_fk",
"tableFrom": "budget_incidents",
+ "tableTo": "budget_policies",
"columnsFrom": [
"policy_id"
],
- "tableTo": "budget_policies",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "no action"
+ "onDelete": "no action",
+ "onUpdate": "no action"
},
"budget_incidents_approval_id_approvals_id_fk": {
"name": "budget_incidents_approval_id_approvals_id_fk",
"tableFrom": "budget_incidents",
+ "tableTo": "approvals",
"columnsFrom": [
"approval_id"
],
- "tableTo": "approvals",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "no action"
+ "onDelete": "no action",
+ "onUpdate": "no action"
}
},
"compositePrimaryKeys": {},
@@ -7331,9 +7331,9 @@
}
],
"isUnique": false,
- "with": {},
+ "concurrently": false,
"method": "btree",
- "concurrently": false
+ "with": {}
},
"budget_policies_company_window_idx": {
"name": "budget_policies_company_window_idx",
@@ -7358,9 +7358,9 @@
}
],
"isUnique": false,
- "with": {},
+ "concurrently": false,
"method": "btree",
- "concurrently": false
+ "with": {}
},
"budget_policies_company_scope_metric_unique_idx": {
"name": "budget_policies_company_scope_metric_unique_idx",
@@ -7397,24 +7397,24 @@
}
],
"isUnique": true,
- "with": {},
+ "concurrently": false,
"method": "btree",
- "concurrently": false
+ "with": {}
}
},
"foreignKeys": {
"budget_policies_company_id_companies_id_fk": {
"name": "budget_policies_company_id_companies_id_fk",
"tableFrom": "budget_policies",
+ "tableTo": "companies",
"columnsFrom": [
"company_id"
],
- "tableTo": "companies",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "no action"
+ "onDelete": "no action",
+ "onUpdate": "no action"
}
},
"compositePrimaryKeys": {},
@@ -7515,9 +7515,9 @@
}
],
"isUnique": false,
- "with": {},
+ "concurrently": false,
"method": "btree",
- "concurrently": false
+ "with": {}
},
"built_in_managed_resources_resource_idx": {
"name": "built_in_managed_resources_resource_idx",
@@ -7536,9 +7536,9 @@
}
],
"isUnique": false,
- "with": {},
+ "concurrently": false,
"method": "btree",
- "concurrently": false
+ "with": {}
},
"built_in_managed_resources_company_bundle_resource_uq": {
"name": "built_in_managed_resources_company_bundle_resource_uq",
@@ -7569,24 +7569,24 @@
}
],
"isUnique": true,
- "with": {},
+ "concurrently": false,
"method": "btree",
- "concurrently": false
+ "with": {}
}
},
"foreignKeys": {
"built_in_managed_resources_company_id_companies_id_fk": {
"name": "built_in_managed_resources_company_id_companies_id_fk",
"tableFrom": "built_in_managed_resources",
+ "tableTo": "companies",
"columnsFrom": [
"company_id"
],
- "tableTo": "companies",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "cascade"
+ "onDelete": "cascade",
+ "onUpdate": "no action"
}
},
"compositePrimaryKeys": {},
@@ -7657,9 +7657,9 @@
}
],
"isUnique": false,
- "with": {},
+ "concurrently": false,
"method": "btree",
- "concurrently": false
+ "with": {}
},
"case_attachments_asset_uq": {
"name": "case_attachments_asset_uq",
@@ -7672,50 +7672,50 @@
}
],
"isUnique": true,
- "with": {},
+ "concurrently": false,
"method": "btree",
- "concurrently": false
+ "with": {}
}
},
"foreignKeys": {
"case_attachments_company_id_companies_id_fk": {
"name": "case_attachments_company_id_companies_id_fk",
"tableFrom": "case_attachments",
+ "tableTo": "companies",
"columnsFrom": [
"company_id"
],
- "tableTo": "companies",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "cascade"
+ "onDelete": "cascade",
+ "onUpdate": "no action"
},
"case_attachments_case_id_cases_id_fk": {
"name": "case_attachments_case_id_cases_id_fk",
"tableFrom": "case_attachments",
+ "tableTo": "cases",
"columnsFrom": [
"case_id"
],
- "tableTo": "cases",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "cascade"
+ "onDelete": "cascade",
+ "onUpdate": "no action"
},
"case_attachments_asset_id_assets_id_fk": {
"name": "case_attachments_asset_id_assets_id_fk",
"tableFrom": "case_attachments",
+ "tableTo": "assets",
"columnsFrom": [
"asset_id"
],
- "tableTo": "assets",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "cascade"
+ "onDelete": "cascade",
+ "onUpdate": "no action"
}
},
"compositePrimaryKeys": {},
@@ -7798,9 +7798,9 @@
}
],
"isUnique": true,
- "with": {},
+ "concurrently": false,
"method": "btree",
- "concurrently": false
+ "with": {}
},
"case_documents_document_uq": {
"name": "case_documents_document_uq",
@@ -7813,9 +7813,9 @@
}
],
"isUnique": true,
- "with": {},
+ "concurrently": false,
"method": "btree",
- "concurrently": false
+ "with": {}
},
"case_documents_company_case_updated_idx": {
"name": "case_documents_company_case_updated_idx",
@@ -7840,50 +7840,50 @@
}
],
"isUnique": false,
- "with": {},
+ "concurrently": false,
"method": "btree",
- "concurrently": false
+ "with": {}
}
},
"foreignKeys": {
"case_documents_company_id_companies_id_fk": {
"name": "case_documents_company_id_companies_id_fk",
"tableFrom": "case_documents",
+ "tableTo": "companies",
"columnsFrom": [
"company_id"
],
- "tableTo": "companies",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "cascade"
+ "onDelete": "cascade",
+ "onUpdate": "no action"
},
"case_documents_case_id_cases_id_fk": {
"name": "case_documents_case_id_cases_id_fk",
"tableFrom": "case_documents",
+ "tableTo": "cases",
"columnsFrom": [
"case_id"
],
- "tableTo": "cases",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "cascade"
+ "onDelete": "cascade",
+ "onUpdate": "no action"
},
"case_documents_document_id_documents_id_fk": {
"name": "case_documents_document_id_documents_id_fk",
"tableFrom": "case_documents",
+ "tableTo": "documents",
"columnsFrom": [
"document_id"
],
- "tableTo": "documents",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "cascade"
+ "onDelete": "cascade",
+ "onUpdate": "no action"
}
},
"compositePrimaryKeys": {},
@@ -7985,9 +7985,9 @@
}
],
"isUnique": false,
- "with": {},
+ "concurrently": false,
"method": "btree",
- "concurrently": false
+ "with": {}
},
"case_events_company_case_idx": {
"name": "case_events_company_case_idx",
@@ -8006,50 +8006,50 @@
}
],
"isUnique": false,
- "with": {},
+ "concurrently": false,
"method": "btree",
- "concurrently": false
+ "with": {}
}
},
"foreignKeys": {
"case_events_company_id_companies_id_fk": {
"name": "case_events_company_id_companies_id_fk",
"tableFrom": "case_events",
+ "tableTo": "companies",
"columnsFrom": [
"company_id"
],
- "tableTo": "companies",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "cascade"
+ "onDelete": "cascade",
+ "onUpdate": "no action"
},
"case_events_case_id_cases_id_fk": {
"name": "case_events_case_id_cases_id_fk",
"tableFrom": "case_events",
+ "tableTo": "cases",
"columnsFrom": [
"case_id"
],
- "tableTo": "cases",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "cascade"
+ "onDelete": "cascade",
+ "onUpdate": "no action"
},
"case_events_actor_agent_id_agents_id_fk": {
"name": "case_events_actor_agent_id_agents_id_fk",
"tableFrom": "case_events",
+ "tableTo": "agents",
"columnsFrom": [
"actor_agent_id"
],
- "tableTo": "agents",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "set null"
+ "onDelete": "set null",
+ "onUpdate": "no action"
}
},
"compositePrimaryKeys": {},
@@ -8141,9 +8141,9 @@
}
],
"isUnique": true,
- "with": {},
+ "concurrently": false,
"method": "btree",
- "concurrently": false
+ "with": {}
},
"case_issue_links_company_case_idx": {
"name": "case_issue_links_company_case_idx",
@@ -8162,9 +8162,9 @@
}
],
"isUnique": false,
- "with": {},
+ "concurrently": false,
"method": "btree",
- "concurrently": false
+ "with": {}
},
"case_issue_links_issue_idx": {
"name": "case_issue_links_issue_idx",
@@ -8177,50 +8177,50 @@
}
],
"isUnique": false,
- "with": {},
+ "concurrently": false,
"method": "btree",
- "concurrently": false
+ "with": {}
}
},
"foreignKeys": {
"case_issue_links_company_id_companies_id_fk": {
"name": "case_issue_links_company_id_companies_id_fk",
"tableFrom": "case_issue_links",
+ "tableTo": "companies",
"columnsFrom": [
"company_id"
],
- "tableTo": "companies",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "cascade"
+ "onDelete": "cascade",
+ "onUpdate": "no action"
},
"case_issue_links_case_id_cases_id_fk": {
"name": "case_issue_links_case_id_cases_id_fk",
"tableFrom": "case_issue_links",
+ "tableTo": "cases",
"columnsFrom": [
"case_id"
],
- "tableTo": "cases",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "cascade"
+ "onDelete": "cascade",
+ "onUpdate": "no action"
},
"case_issue_links_issue_id_issues_id_fk": {
"name": "case_issue_links_issue_id_issues_id_fk",
"tableFrom": "case_issue_links",
+ "tableTo": "issues",
"columnsFrom": [
"issue_id"
],
- "tableTo": "issues",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "cascade"
+ "onDelete": "cascade",
+ "onUpdate": "no action"
}
},
"compositePrimaryKeys": {},
@@ -8296,9 +8296,9 @@
}
],
"isUnique": true,
- "with": {},
+ "concurrently": false,
"method": "btree",
- "concurrently": false
+ "with": {}
},
"case_labels_company_case_idx": {
"name": "case_labels_company_case_idx",
@@ -8317,9 +8317,9 @@
}
],
"isUnique": false,
- "with": {},
+ "concurrently": false,
"method": "btree",
- "concurrently": false
+ "with": {}
},
"case_labels_label_idx": {
"name": "case_labels_label_idx",
@@ -8332,50 +8332,50 @@
}
],
"isUnique": false,
- "with": {},
+ "concurrently": false,
"method": "btree",
- "concurrently": false
+ "with": {}
}
},
"foreignKeys": {
"case_labels_company_id_companies_id_fk": {
"name": "case_labels_company_id_companies_id_fk",
"tableFrom": "case_labels",
+ "tableTo": "companies",
"columnsFrom": [
"company_id"
],
- "tableTo": "companies",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "cascade"
+ "onDelete": "cascade",
+ "onUpdate": "no action"
},
"case_labels_case_id_cases_id_fk": {
"name": "case_labels_case_id_cases_id_fk",
"tableFrom": "case_labels",
+ "tableTo": "cases",
"columnsFrom": [
"case_id"
],
- "tableTo": "cases",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "cascade"
+ "onDelete": "cascade",
+ "onUpdate": "no action"
},
"case_labels_label_id_labels_id_fk": {
"name": "case_labels_label_id_labels_id_fk",
"tableFrom": "case_labels",
+ "tableTo": "labels",
"columnsFrom": [
"label_id"
],
- "tableTo": "labels",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "cascade"
+ "onDelete": "cascade",
+ "onUpdate": "no action"
}
},
"compositePrimaryKeys": {},
@@ -8514,9 +8514,9 @@
}
],
"isUnique": true,
- "with": {},
+ "concurrently": false,
"method": "btree",
- "concurrently": false
+ "with": {}
},
"cases_identifier_uq": {
"name": "cases_identifier_uq",
@@ -8529,9 +8529,9 @@
}
],
"isUnique": true,
- "with": {},
+ "concurrently": false,
"method": "btree",
- "concurrently": false
+ "with": {}
},
"cases_company_type_key_uq": {
"name": "cases_company_type_key_uq",
@@ -8556,9 +8556,9 @@
}
],
"isUnique": true,
- "with": {},
+ "concurrently": false,
"method": "btree",
- "concurrently": false
+ "with": {}
},
"cases_company_status_idx": {
"name": "cases_company_status_idx",
@@ -8577,9 +8577,9 @@
}
],
"isUnique": false,
- "with": {},
+ "concurrently": false,
"method": "btree",
- "concurrently": false
+ "with": {}
},
"cases_company_type_idx": {
"name": "cases_company_type_idx",
@@ -8598,9 +8598,9 @@
}
],
"isUnique": false,
- "with": {},
+ "concurrently": false,
"method": "btree",
- "concurrently": false
+ "with": {}
},
"cases_company_project_idx": {
"name": "cases_company_project_idx",
@@ -8619,9 +8619,9 @@
}
],
"isUnique": false,
- "with": {},
+ "concurrently": false,
"method": "btree",
- "concurrently": false
+ "with": {}
},
"cases_parent_idx": {
"name": "cases_parent_idx",
@@ -8634,9 +8634,9 @@
}
],
"isUnique": false,
- "with": {},
+ "concurrently": false,
"method": "btree",
- "concurrently": false
+ "with": {}
},
"cases_title_search_idx": {
"name": "cases_title_search_idx",
@@ -8650,9 +8650,9 @@
}
],
"isUnique": false,
- "with": {},
+ "concurrently": false,
"method": "gin",
- "concurrently": false
+ "with": {}
},
"cases_identifier_search_idx": {
"name": "cases_identifier_search_idx",
@@ -8666,9 +8666,9 @@
}
],
"isUnique": false,
- "with": {},
+ "concurrently": false,
"method": "gin",
- "concurrently": false
+ "with": {}
},
"cases_summary_search_idx": {
"name": "cases_summary_search_idx",
@@ -8682,63 +8682,63 @@
}
],
"isUnique": false,
- "with": {},
+ "concurrently": false,
"method": "gin",
- "concurrently": false
+ "with": {}
}
},
"foreignKeys": {
"cases_company_id_companies_id_fk": {
"name": "cases_company_id_companies_id_fk",
"tableFrom": "cases",
+ "tableTo": "companies",
"columnsFrom": [
"company_id"
],
- "tableTo": "companies",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "cascade"
+ "onDelete": "cascade",
+ "onUpdate": "no action"
},
"cases_project_id_projects_id_fk": {
"name": "cases_project_id_projects_id_fk",
"tableFrom": "cases",
+ "tableTo": "projects",
"columnsFrom": [
"project_id"
],
- "tableTo": "projects",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "set null"
+ "onDelete": "set null",
+ "onUpdate": "no action"
},
"cases_parent_case_id_cases_id_fk": {
"name": "cases_parent_case_id_cases_id_fk",
"tableFrom": "cases",
+ "tableTo": "cases",
"columnsFrom": [
"parent_case_id"
],
- "tableTo": "cases",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "set null"
+ "onDelete": "set null",
+ "onUpdate": "no action"
},
"cases_created_by_agent_id_agents_id_fk": {
"name": "cases_created_by_agent_id_agents_id_fk",
"tableFrom": "cases",
+ "tableTo": "agents",
"columnsFrom": [
"created_by_agent_id"
],
- "tableTo": "agents",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "set null"
+ "onDelete": "set null",
+ "onUpdate": "no action"
}
},
"compositePrimaryKeys": {},
@@ -8858,97 +8858,97 @@
}
],
"isUnique": true,
- "with": {},
+ "concurrently": false,
"method": "btree",
- "concurrently": false
+ "with": {}
}
},
"foreignKeys": {
"chat_actions_company_id_companies_id_fk": {
"name": "chat_actions_company_id_companies_id_fk",
"tableFrom": "chat_actions",
+ "tableTo": "companies",
"columnsFrom": [
"company_id"
],
- "tableTo": "companies",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "cascade"
+ "onDelete": "cascade",
+ "onUpdate": "no action"
},
"chat_actions_delivery_id_chat_deliveries_id_fk": {
"name": "chat_actions_delivery_id_chat_deliveries_id_fk",
"tableFrom": "chat_actions",
+ "tableTo": "chat_deliveries",
"columnsFrom": [
"delivery_id"
],
- "tableTo": "chat_deliveries",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "set null"
+ "onDelete": "set null",
+ "onUpdate": "no action"
},
"chat_actions_company_delivery_fk": {
"name": "chat_actions_company_delivery_fk",
"tableFrom": "chat_actions",
+ "tableTo": "chat_deliveries",
"columnsFrom": [
"company_id",
"delivery_id"
],
- "tableTo": "chat_deliveries",
"columnsTo": [
"company_id",
"id"
],
- "onUpdate": "no action",
- "onDelete": "no action"
+ "onDelete": "no action",
+ "onUpdate": "no action"
},
"chat_actions_company_conversation_fk": {
"name": "chat_actions_company_conversation_fk",
"tableFrom": "chat_actions",
+ "tableTo": "chat_conversations",
"columnsFrom": [
"company_id",
"conversation_id"
],
- "tableTo": "chat_conversations",
"columnsTo": [
"company_id",
"id"
],
- "onUpdate": "no action",
- "onDelete": "no action"
+ "onDelete": "no action",
+ "onUpdate": "no action"
},
"chat_actions_company_principal_fk": {
"name": "chat_actions_company_principal_fk",
"tableFrom": "chat_actions",
+ "tableTo": "chat_external_principals",
"columnsFrom": [
"company_id",
"principal_id"
],
- "tableTo": "chat_external_principals",
"columnsTo": [
"company_id",
"id"
],
- "onUpdate": "no action",
- "onDelete": "no action"
+ "onDelete": "no action",
+ "onUpdate": "no action"
},
"chat_actions_company_endpoint_fk": {
"name": "chat_actions_company_endpoint_fk",
"tableFrom": "chat_actions",
+ "tableTo": "chat_endpoints",
"columnsFrom": [
"company_id",
"endpoint_id"
],
- "tableTo": "chat_endpoints",
"columnsTo": [
"company_id",
"id"
],
- "onUpdate": "no action",
- "onDelete": "cascade"
+ "onDelete": "cascade",
+ "onUpdate": "no action"
}
},
"compositePrimaryKeys": {},
@@ -9046,54 +9046,54 @@
}
],
"isUnique": true,
- "with": {},
+ "concurrently": false,
"method": "btree",
- "concurrently": false
+ "with": {}
}
},
"foreignKeys": {
"chat_agent_routes_company_id_companies_id_fk": {
"name": "chat_agent_routes_company_id_companies_id_fk",
"tableFrom": "chat_agent_routes",
+ "tableTo": "companies",
"columnsFrom": [
"company_id"
],
- "tableTo": "companies",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "cascade"
+ "onDelete": "cascade",
+ "onUpdate": "no action"
},
"chat_agent_routes_company_source_fk": {
"name": "chat_agent_routes_company_source_fk",
"tableFrom": "chat_agent_routes",
+ "tableTo": "chat_endpoints",
"columnsFrom": [
"company_id",
"source_endpoint_id"
],
- "tableTo": "chat_endpoints",
"columnsTo": [
"company_id",
"id"
],
- "onUpdate": "no action",
- "onDelete": "cascade"
+ "onDelete": "cascade",
+ "onUpdate": "no action"
},
"chat_agent_routes_company_destination_fk": {
"name": "chat_agent_routes_company_destination_fk",
"tableFrom": "chat_agent_routes",
+ "tableTo": "chat_endpoints",
"columnsFrom": [
"company_id",
"destination_endpoint_id"
],
- "tableTo": "chat_endpoints",
"columnsTo": [
"company_id",
"id"
],
- "onUpdate": "no action",
- "onDelete": "cascade"
+ "onDelete": "cascade",
+ "onUpdate": "no action"
}
},
"compositePrimaryKeys": {},
@@ -9233,9 +9233,9 @@
}
],
"isUnique": false,
- "with": {},
+ "concurrently": false,
"method": "btree",
- "concurrently": false
+ "with": {}
},
"chat_conversations_thread_uq": {
"name": "chat_conversations_thread_uq",
@@ -9266,106 +9266,106 @@
}
],
"isUnique": true,
- "with": {},
+ "concurrently": false,
"method": "btree",
- "concurrently": false
+ "with": {}
}
},
"foreignKeys": {
"chat_conversations_company_id_companies_id_fk": {
"name": "chat_conversations_company_id_companies_id_fk",
"tableFrom": "chat_conversations",
+ "tableTo": "companies",
"columnsFrom": [
"company_id"
],
- "tableTo": "companies",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "cascade"
+ "onDelete": "cascade",
+ "onUpdate": "no action"
},
"chat_conversations_resource_id_chat_endpoint_resources_id_fk": {
"name": "chat_conversations_resource_id_chat_endpoint_resources_id_fk",
"tableFrom": "chat_conversations",
+ "tableTo": "chat_endpoint_resources",
"columnsFrom": [
"resource_id"
],
- "tableTo": "chat_endpoint_resources",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "set null"
+ "onDelete": "set null",
+ "onUpdate": "no action"
},
"chat_conversations_issue_id_issues_id_fk": {
"name": "chat_conversations_issue_id_issues_id_fk",
"tableFrom": "chat_conversations",
+ "tableTo": "issues",
"columnsFrom": [
"issue_id"
],
- "tableTo": "issues",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "restrict"
+ "onDelete": "restrict",
+ "onUpdate": "no action"
},
"chat_conversations_company_issue_fk": {
"name": "chat_conversations_company_issue_fk",
"tableFrom": "chat_conversations",
+ "tableTo": "issues",
"columnsFrom": [
"company_id",
"issue_id"
],
- "tableTo": "issues",
"columnsTo": [
"company_id",
"id"
],
- "onUpdate": "no action",
- "onDelete": "no action"
+ "onDelete": "no action",
+ "onUpdate": "no action"
},
"chat_conversations_company_endpoint_fk": {
"name": "chat_conversations_company_endpoint_fk",
"tableFrom": "chat_conversations",
+ "tableTo": "chat_endpoints",
"columnsFrom": [
"company_id",
"endpoint_id"
],
- "tableTo": "chat_endpoints",
"columnsTo": [
"company_id",
"id"
],
- "onUpdate": "no action",
- "onDelete": "cascade"
+ "onDelete": "cascade",
+ "onUpdate": "no action"
},
"chat_conversations_company_resource_fk": {
"name": "chat_conversations_company_resource_fk",
"tableFrom": "chat_conversations",
+ "tableTo": "chat_endpoint_resources",
"columnsFrom": [
"company_id",
"resource_id"
],
- "tableTo": "chat_endpoint_resources",
"columnsTo": [
"company_id",
"id"
],
- "onUpdate": "no action",
- "onDelete": "no action"
+ "onDelete": "no action",
+ "onUpdate": "no action"
}
},
"compositePrimaryKeys": {},
"uniqueConstraints": {
"chat_conversations_company_id_uq": {
"name": "chat_conversations_company_id_uq",
+ "nullsNotDistinct": false,
"columns": [
"company_id",
"id"
- ],
- "nullsNotDistinct": false
+ ]
}
},
"policies": {},
@@ -9508,9 +9508,9 @@
}
],
"isUnique": false,
- "with": {},
+ "concurrently": false,
"method": "btree",
- "concurrently": false
+ "with": {}
},
"chat_deliveries_event_uq": {
"name": "chat_deliveries_event_uq",
@@ -9529,9 +9529,9 @@
}
],
"isUnique": true,
- "with": {},
+ "concurrently": false,
"method": "btree",
- "concurrently": false
+ "with": {}
},
"chat_deliveries_dedupe_uq": {
"name": "chat_deliveries_dedupe_uq",
@@ -9550,106 +9550,106 @@
}
],
"isUnique": true,
- "with": {},
+ "concurrently": false,
"method": "btree",
- "concurrently": false
+ "with": {}
}
},
"foreignKeys": {
"chat_deliveries_company_id_companies_id_fk": {
"name": "chat_deliveries_company_id_companies_id_fk",
"tableFrom": "chat_deliveries",
+ "tableTo": "companies",
"columnsFrom": [
"company_id"
],
- "tableTo": "companies",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "cascade"
+ "onDelete": "cascade",
+ "onUpdate": "no action"
},
"chat_deliveries_conversation_id_chat_conversations_id_fk": {
"name": "chat_deliveries_conversation_id_chat_conversations_id_fk",
"tableFrom": "chat_deliveries",
+ "tableTo": "chat_conversations",
"columnsFrom": [
"conversation_id"
],
- "tableTo": "chat_conversations",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "set null"
+ "onDelete": "set null",
+ "onUpdate": "no action"
},
"chat_deliveries_principal_id_chat_external_principals_id_fk": {
"name": "chat_deliveries_principal_id_chat_external_principals_id_fk",
"tableFrom": "chat_deliveries",
+ "tableTo": "chat_external_principals",
"columnsFrom": [
"principal_id"
],
- "tableTo": "chat_external_principals",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "set null"
+ "onDelete": "set null",
+ "onUpdate": "no action"
},
"chat_deliveries_company_endpoint_fk": {
"name": "chat_deliveries_company_endpoint_fk",
"tableFrom": "chat_deliveries",
+ "tableTo": "chat_endpoints",
"columnsFrom": [
"company_id",
"endpoint_id"
],
- "tableTo": "chat_endpoints",
"columnsTo": [
"company_id",
"id"
],
- "onUpdate": "no action",
- "onDelete": "cascade"
+ "onDelete": "cascade",
+ "onUpdate": "no action"
},
"chat_deliveries_company_conversation_fk": {
"name": "chat_deliveries_company_conversation_fk",
"tableFrom": "chat_deliveries",
+ "tableTo": "chat_conversations",
"columnsFrom": [
"company_id",
"conversation_id"
],
- "tableTo": "chat_conversations",
"columnsTo": [
"company_id",
"id"
],
- "onUpdate": "no action",
- "onDelete": "no action"
+ "onDelete": "no action",
+ "onUpdate": "no action"
},
"chat_deliveries_company_principal_fk": {
"name": "chat_deliveries_company_principal_fk",
"tableFrom": "chat_deliveries",
+ "tableTo": "chat_external_principals",
"columnsFrom": [
"company_id",
"principal_id"
],
- "tableTo": "chat_external_principals",
"columnsTo": [
"company_id",
"id"
],
- "onUpdate": "no action",
- "onDelete": "no action"
+ "onDelete": "no action",
+ "onUpdate": "no action"
}
},
"compositePrimaryKeys": {},
"uniqueConstraints": {
"chat_deliveries_company_id_uq": {
"name": "chat_deliveries_company_id_uq",
+ "nullsNotDistinct": false,
"columns": [
"company_id",
"id"
- ],
- "nullsNotDistinct": false
+ ]
}
},
"policies": {},
@@ -9735,9 +9735,9 @@
}
],
"isUnique": true,
- "with": {},
+ "concurrently": false,
"method": "btree",
- "concurrently": false
+ "with": {}
},
"chat_endpoint_leases_expiry_idx": {
"name": "chat_endpoint_leases_expiry_idx",
@@ -9750,39 +9750,39 @@
}
],
"isUnique": false,
- "with": {},
+ "concurrently": false,
"method": "btree",
- "concurrently": false
+ "with": {}
}
},
"foreignKeys": {
"chat_endpoint_leases_company_id_companies_id_fk": {
"name": "chat_endpoint_leases_company_id_companies_id_fk",
"tableFrom": "chat_endpoint_leases",
+ "tableTo": "companies",
"columnsFrom": [
"company_id"
],
- "tableTo": "companies",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "cascade"
+ "onDelete": "cascade",
+ "onUpdate": "no action"
},
"chat_endpoint_leases_company_endpoint_fk": {
"name": "chat_endpoint_leases_company_endpoint_fk",
"tableFrom": "chat_endpoint_leases",
+ "tableTo": "chat_endpoints",
"columnsFrom": [
"company_id",
"endpoint_id"
],
- "tableTo": "chat_endpoints",
"columnsTo": [
"company_id",
"id"
],
- "onUpdate": "no action",
- "onDelete": "cascade"
+ "onDelete": "cascade",
+ "onUpdate": "no action"
}
},
"compositePrimaryKeys": {},
@@ -9910,9 +9910,9 @@
}
],
"isUnique": false,
- "with": {},
+ "concurrently": false,
"method": "btree",
- "concurrently": false
+ "with": {}
},
"chat_endpoint_resources_external_uq": {
"name": "chat_endpoint_resources_external_uq",
@@ -9937,50 +9937,50 @@
}
],
"isUnique": true,
- "with": {},
+ "concurrently": false,
"method": "btree",
- "concurrently": false
+ "with": {}
}
},
"foreignKeys": {
"chat_endpoint_resources_company_id_companies_id_fk": {
"name": "chat_endpoint_resources_company_id_companies_id_fk",
"tableFrom": "chat_endpoint_resources",
+ "tableTo": "companies",
"columnsFrom": [
"company_id"
],
- "tableTo": "companies",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "cascade"
+ "onDelete": "cascade",
+ "onUpdate": "no action"
},
"chat_endpoint_resources_company_endpoint_fk": {
"name": "chat_endpoint_resources_company_endpoint_fk",
"tableFrom": "chat_endpoint_resources",
+ "tableTo": "chat_endpoints",
"columnsFrom": [
"company_id",
"endpoint_id"
],
- "tableTo": "chat_endpoints",
"columnsTo": [
"company_id",
"id"
],
- "onUpdate": "no action",
- "onDelete": "cascade"
+ "onDelete": "cascade",
+ "onUpdate": "no action"
}
},
"compositePrimaryKeys": {},
"uniqueConstraints": {
"chat_endpoint_resources_company_id_uq": {
"name": "chat_endpoint_resources_company_id_uq",
+ "nullsNotDistinct": false,
"columns": [
"company_id",
"id"
- ],
- "nullsNotDistinct": false
+ ]
}
},
"policies": {},
@@ -10228,9 +10228,9 @@
}
],
"isUnique": false,
- "with": {},
+ "concurrently": false,
"method": "btree",
- "concurrently": false
+ "with": {}
},
"chat_endpoints_agent_idx": {
"name": "chat_endpoints_agent_idx",
@@ -10249,9 +10249,9 @@
}
],
"isUnique": false,
- "with": {},
+ "concurrently": false,
"method": "btree",
- "concurrently": false
+ "with": {}
},
"chat_endpoints_status_idx": {
"name": "chat_endpoints_status_idx",
@@ -10270,9 +10270,9 @@
}
],
"isUnique": false,
- "with": {},
+ "concurrently": false,
"method": "btree",
- "concurrently": false
+ "with": {}
},
"chat_endpoints_public_id_uq": {
"name": "chat_endpoints_public_id_uq",
@@ -10285,9 +10285,9 @@
}
],
"isUnique": true,
- "with": {},
+ "concurrently": false,
"method": "btree",
- "concurrently": false
+ "with": {}
},
"chat_endpoints_agentmail_inbox_uq": {
"name": "chat_endpoints_agentmail_inbox_uq",
@@ -10300,10 +10300,10 @@
}
],
"isUnique": true,
- "with": {},
- "method": "btree",
"where": "\"chat_endpoints\".\"provider\" = 'agentmail' and \"chat_endpoints\".\"status\" != 'archived' and \"chat_endpoints\".\"bot_external_id\" is not null",
- "concurrently": false
+ "concurrently": false,
+ "method": "btree",
+ "with": {}
},
"chat_endpoints_connection_uq": {
"name": "chat_endpoints_connection_uq",
@@ -10316,9 +10316,9 @@
}
],
"isUnique": true,
- "with": {},
+ "concurrently": false,
"method": "btree",
- "concurrently": false
+ "with": {}
},
"chat_endpoints_live_bot_external_uq": {
"name": "chat_endpoints_live_bot_external_uq",
@@ -10343,10 +10343,10 @@
}
],
"isUnique": true,
- "with": {},
- "method": "btree",
"where": "\"chat_endpoints\".\"status\" in ('verifying', 'active', 'paused', 'attention')\n and \"chat_endpoints\".\"provider_account_id\" is not null\n and \"chat_endpoints\".\"bot_external_id\" is not null",
- "concurrently": false
+ "concurrently": false,
+ "method": "btree",
+ "with": {}
},
"chat_endpoints_photon_number_uq": {
"name": "chat_endpoints_photon_number_uq",
@@ -10359,10 +10359,10 @@
}
],
"isUnique": true,
- "with": {},
- "method": "btree",
"where": "\"chat_endpoints\".\"provider\" = 'imessage-photon' and \"chat_endpoints\".\"status\" <> 'archived' and \"chat_endpoints\".\"bot_external_id\" is not null",
- "concurrently": false
+ "concurrently": false,
+ "method": "btree",
+ "with": {}
},
"chat_endpoints_live_discord_bot_external_uq": {
"name": "chat_endpoints_live_discord_bot_external_uq",
@@ -10381,10 +10381,10 @@
}
],
"isUnique": true,
- "with": {},
- "method": "btree",
"where": "\"chat_endpoints\".\"provider\" = 'discord'\n and \"chat_endpoints\".\"status\" in ('verifying', 'active', 'paused', 'attention')\n and \"chat_endpoints\".\"bot_external_id\" is not null",
- "concurrently": false
+ "concurrently": false,
+ "method": "btree",
+ "with": {}
},
"chat_endpoints_live_global_app_bot_external_uq": {
"name": "chat_endpoints_live_global_app_bot_external_uq",
@@ -10403,10 +10403,10 @@
}
],
"isUnique": true,
- "with": {},
- "method": "btree",
"where": "\"chat_endpoints\".\"provider\" in ('github', 'microsoft-teams')\n and \"chat_endpoints\".\"status\" in ('verifying', 'active', 'paused', 'attention')\n and \"chat_endpoints\".\"bot_external_id\" is not null",
- "concurrently": false
+ "concurrently": false,
+ "method": "btree",
+ "with": {}
},
"chat_endpoints_live_bot_username_uq": {
"name": "chat_endpoints_live_bot_username_uq",
@@ -10431,79 +10431,79 @@
}
],
"isUnique": true,
- "with": {},
- "method": "btree",
"where": "\"chat_endpoints\".\"status\" in ('verifying', 'active', 'paused', 'attention')\n and \"chat_endpoints\".\"provider_account_id\" is not null\n and \"chat_endpoints\".\"bot_username\" is not null",
- "concurrently": false
+ "concurrently": false,
+ "method": "btree",
+ "with": {}
}
},
"foreignKeys": {
"chat_endpoints_company_id_companies_id_fk": {
"name": "chat_endpoints_company_id_companies_id_fk",
"tableFrom": "chat_endpoints",
+ "tableTo": "companies",
"columnsFrom": [
"company_id"
],
- "tableTo": "companies",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "cascade"
+ "onDelete": "cascade",
+ "onUpdate": "no action"
},
"chat_endpoints_assigned_agent_id_agents_id_fk": {
"name": "chat_endpoints_assigned_agent_id_agents_id_fk",
"tableFrom": "chat_endpoints",
+ "tableTo": "agents",
"columnsFrom": [
"assigned_agent_id"
],
- "tableTo": "agents",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "restrict"
+ "onDelete": "restrict",
+ "onUpdate": "no action"
},
"chat_endpoints_company_agent_fk": {
"name": "chat_endpoints_company_agent_fk",
"tableFrom": "chat_endpoints",
+ "tableTo": "agents",
"columnsFrom": [
"company_id",
"assigned_agent_id"
],
- "tableTo": "agents",
"columnsTo": [
"company_id",
"id"
],
- "onUpdate": "no action",
- "onDelete": "no action"
+ "onDelete": "no action",
+ "onUpdate": "no action"
},
"chat_endpoints_company_connection_fk": {
"name": "chat_endpoints_company_connection_fk",
"tableFrom": "chat_endpoints",
+ "tableTo": "tool_connections",
"columnsFrom": [
"company_id",
"connection_id"
],
- "tableTo": "tool_connections",
"columnsTo": [
"company_id",
"id"
],
- "onUpdate": "no action",
- "onDelete": "cascade"
+ "onDelete": "cascade",
+ "onUpdate": "no action"
}
},
"compositePrimaryKeys": {},
"uniqueConstraints": {
"chat_endpoints_company_id_uq": {
"name": "chat_endpoints_company_id_uq",
+ "nullsNotDistinct": false,
"columns": [
"company_id",
"id"
- ],
- "nullsNotDistinct": false
+ ]
}
},
"policies": {},
@@ -10639,9 +10639,9 @@
}
],
"isUnique": false,
- "with": {},
+ "concurrently": false,
"method": "btree",
- "concurrently": false
+ "with": {}
},
"chat_external_principals_external_uq": {
"name": "chat_external_principals_external_uq",
@@ -10672,35 +10672,35 @@
}
],
"isUnique": true,
- "with": {},
+ "concurrently": false,
"method": "btree",
- "concurrently": false
+ "with": {}
}
},
"foreignKeys": {
"chat_external_principals_company_id_companies_id_fk": {
"name": "chat_external_principals_company_id_companies_id_fk",
"tableFrom": "chat_external_principals",
+ "tableTo": "companies",
"columnsFrom": [
"company_id"
],
- "tableTo": "companies",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "cascade"
+ "onDelete": "cascade",
+ "onUpdate": "no action"
}
},
"compositePrimaryKeys": {},
"uniqueConstraints": {
"chat_external_principals_company_id_uq": {
"name": "chat_external_principals_company_id_uq",
+ "nullsNotDistinct": false,
"columns": [
"company_id",
"id"
- ],
- "nullsNotDistinct": false
+ ]
}
},
"policies": {},
@@ -10815,9 +10815,9 @@
}
],
"isUnique": false,
- "with": {},
+ "concurrently": false,
"method": "btree",
- "concurrently": false
+ "with": {}
},
"chat_identity_links_endpoint_principal_uq": {
"name": "chat_identity_links_endpoint_principal_uq",
@@ -10836,54 +10836,54 @@
}
],
"isUnique": true,
- "with": {},
+ "concurrently": false,
"method": "btree",
- "concurrently": false
+ "with": {}
}
},
"foreignKeys": {
"chat_identity_links_company_id_companies_id_fk": {
"name": "chat_identity_links_company_id_companies_id_fk",
"tableFrom": "chat_identity_links",
+ "tableTo": "companies",
"columnsFrom": [
"company_id"
],
- "tableTo": "companies",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "cascade"
+ "onDelete": "cascade",
+ "onUpdate": "no action"
},
"chat_identity_links_company_endpoint_fk": {
"name": "chat_identity_links_company_endpoint_fk",
"tableFrom": "chat_identity_links",
+ "tableTo": "chat_endpoints",
"columnsFrom": [
"company_id",
"endpoint_id"
],
- "tableTo": "chat_endpoints",
"columnsTo": [
"company_id",
"id"
],
- "onUpdate": "no action",
- "onDelete": "cascade"
+ "onDelete": "cascade",
+ "onUpdate": "no action"
},
"chat_identity_links_company_principal_fk": {
"name": "chat_identity_links_company_principal_fk",
"tableFrom": "chat_identity_links",
+ "tableTo": "chat_external_principals",
"columnsFrom": [
"company_id",
"principal_id"
],
- "tableTo": "chat_external_principals",
"columnsTo": [
"company_id",
"id"
],
- "onUpdate": "no action",
- "onDelete": "cascade"
+ "onDelete": "cascade",
+ "onUpdate": "no action"
}
},
"compositePrimaryKeys": {},
@@ -10988,138 +10988,138 @@
}
],
"isUnique": true,
- "with": {},
+ "concurrently": false,
"method": "btree",
- "concurrently": false
+ "with": {}
}
},
"foreignKeys": {
"chat_message_links_company_id_companies_id_fk": {
"name": "chat_message_links_company_id_companies_id_fk",
"tableFrom": "chat_message_links",
+ "tableTo": "companies",
"columnsFrom": [
"company_id"
],
- "tableTo": "companies",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "cascade"
+ "onDelete": "cascade",
+ "onUpdate": "no action"
},
"chat_message_links_delivery_id_chat_deliveries_id_fk": {
"name": "chat_message_links_delivery_id_chat_deliveries_id_fk",
"tableFrom": "chat_message_links",
+ "tableTo": "chat_deliveries",
"columnsFrom": [
"delivery_id"
],
- "tableTo": "chat_deliveries",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "set null"
+ "onDelete": "set null",
+ "onUpdate": "no action"
},
"chat_message_links_publication_id_chat_publications_id_fk": {
"name": "chat_message_links_publication_id_chat_publications_id_fk",
"tableFrom": "chat_message_links",
+ "tableTo": "chat_publications",
"columnsFrom": [
"publication_id"
],
- "tableTo": "chat_publications",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "set null"
+ "onDelete": "set null",
+ "onUpdate": "no action"
},
"chat_message_links_comment_id_issue_comments_id_fk": {
"name": "chat_message_links_comment_id_issue_comments_id_fk",
"tableFrom": "chat_message_links",
+ "tableTo": "issue_comments",
"columnsFrom": [
"comment_id"
],
- "tableTo": "issue_comments",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "set null"
+ "onDelete": "set null",
+ "onUpdate": "no action"
},
"chat_message_links_company_endpoint_fk": {
"name": "chat_message_links_company_endpoint_fk",
"tableFrom": "chat_message_links",
+ "tableTo": "chat_endpoints",
"columnsFrom": [
"company_id",
"endpoint_id"
],
- "tableTo": "chat_endpoints",
"columnsTo": [
"company_id",
"id"
],
- "onUpdate": "no action",
- "onDelete": "cascade"
+ "onDelete": "cascade",
+ "onUpdate": "no action"
},
"chat_message_links_company_delivery_fk": {
"name": "chat_message_links_company_delivery_fk",
"tableFrom": "chat_message_links",
+ "tableTo": "chat_deliveries",
"columnsFrom": [
"company_id",
"delivery_id"
],
- "tableTo": "chat_deliveries",
"columnsTo": [
"company_id",
"id"
],
- "onUpdate": "no action",
- "onDelete": "no action"
+ "onDelete": "no action",
+ "onUpdate": "no action"
},
"chat_message_links_company_publication_fk": {
"name": "chat_message_links_company_publication_fk",
"tableFrom": "chat_message_links",
+ "tableTo": "chat_publications",
"columnsFrom": [
"company_id",
"publication_id"
],
- "tableTo": "chat_publications",
"columnsTo": [
"company_id",
"id"
],
- "onUpdate": "no action",
- "onDelete": "no action"
+ "onDelete": "no action",
+ "onUpdate": "no action"
},
"chat_message_links_company_comment_fk": {
"name": "chat_message_links_company_comment_fk",
"tableFrom": "chat_message_links",
+ "tableTo": "issue_comments",
"columnsFrom": [
"company_id",
"comment_id"
],
- "tableTo": "issue_comments",
"columnsTo": [
"company_id",
"id"
],
- "onUpdate": "no action",
- "onDelete": "no action"
+ "onDelete": "no action",
+ "onUpdate": "no action"
},
"chat_message_links_company_conversation_fk": {
"name": "chat_message_links_company_conversation_fk",
"tableFrom": "chat_message_links",
+ "tableTo": "chat_conversations",
"columnsFrom": [
"company_id",
"conversation_id"
],
- "tableTo": "chat_conversations",
"columnsTo": [
"company_id",
"id"
],
- "onUpdate": "no action",
- "onDelete": "cascade"
+ "onDelete": "cascade",
+ "onUpdate": "no action"
}
},
"compositePrimaryKeys": {},
@@ -11263,9 +11263,9 @@
}
],
"isUnique": true,
- "with": {},
+ "concurrently": false,
"method": "btree",
- "concurrently": false
+ "with": {}
},
"chat_publications_work_idx": {
"name": "chat_publications_work_idx",
@@ -11284,9 +11284,9 @@
}
],
"isUnique": false,
- "with": {},
+ "concurrently": false,
"method": "btree",
- "concurrently": false
+ "with": {}
},
"chat_publications_idempotency_uq": {
"name": "chat_publications_idempotency_uq",
@@ -11305,110 +11305,110 @@
}
],
"isUnique": true,
- "with": {},
+ "concurrently": false,
"method": "btree",
- "concurrently": false
+ "with": {}
}
},
"foreignKeys": {
"chat_publications_company_id_companies_id_fk": {
"name": "chat_publications_company_id_companies_id_fk",
"tableFrom": "chat_publications",
+ "tableTo": "companies",
"columnsFrom": [
"company_id"
],
- "tableTo": "companies",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "cascade"
+ "onDelete": "cascade",
+ "onUpdate": "no action"
},
"chat_publications_issue_id_issues_id_fk": {
"name": "chat_publications_issue_id_issues_id_fk",
"tableFrom": "chat_publications",
+ "tableTo": "issues",
"columnsFrom": [
"issue_id"
],
- "tableTo": "issues",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "restrict"
+ "onDelete": "restrict",
+ "onUpdate": "no action"
},
"chat_publications_comment_id_issue_comments_id_fk": {
"name": "chat_publications_comment_id_issue_comments_id_fk",
"tableFrom": "chat_publications",
+ "tableTo": "issue_comments",
"columnsFrom": [
"comment_id"
],
- "tableTo": "issue_comments",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "set null"
+ "onDelete": "set null",
+ "onUpdate": "no action"
},
"chat_publications_company_issue_fk": {
"name": "chat_publications_company_issue_fk",
"tableFrom": "chat_publications",
+ "tableTo": "issues",
"columnsFrom": [
"company_id",
"issue_id"
],
- "tableTo": "issues",
"columnsTo": [
"company_id",
"id"
],
- "onUpdate": "no action",
- "onDelete": "no action"
+ "onDelete": "no action",
+ "onUpdate": "no action"
},
"chat_publications_company_comment_fk": {
"name": "chat_publications_company_comment_fk",
"tableFrom": "chat_publications",
+ "tableTo": "issue_comments",
"columnsFrom": [
"company_id",
"comment_id"
],
- "tableTo": "issue_comments",
"columnsTo": [
"company_id",
"id"
],
- "onUpdate": "no action",
- "onDelete": "no action"
+ "onDelete": "no action",
+ "onUpdate": "no action"
},
"chat_publications_company_endpoint_fk": {
"name": "chat_publications_company_endpoint_fk",
"tableFrom": "chat_publications",
+ "tableTo": "chat_endpoints",
"columnsFrom": [
"company_id",
"endpoint_id"
],
- "tableTo": "chat_endpoints",
"columnsTo": [
"company_id",
"id"
],
- "onUpdate": "no action",
- "onDelete": "cascade"
+ "onDelete": "cascade",
+ "onUpdate": "no action"
},
"chat_publications_company_conversation_fk": {
"name": "chat_publications_company_conversation_fk",
"tableFrom": "chat_publications",
+ "tableTo": "chat_conversations",
"columnsFrom": [
"company_id",
"conversation_id"
],
- "tableTo": "chat_conversations",
"columnsTo": [
"company_id",
"id"
],
- "onUpdate": "no action",
- "onDelete": "cascade"
+ "onDelete": "cascade",
+ "onUpdate": "no action"
}
},
"compositePrimaryKeys": {},
@@ -11503,9 +11503,9 @@
}
],
"isUnique": true,
- "with": {},
+ "concurrently": false,
"method": "btree",
- "concurrently": false
+ "with": {}
},
"chat_sdk_state_expiry_idx": {
"name": "chat_sdk_state_expiry_idx",
@@ -11518,39 +11518,39 @@
}
],
"isUnique": false,
- "with": {},
+ "concurrently": false,
"method": "btree",
- "concurrently": false
+ "with": {}
}
},
"foreignKeys": {
"chat_sdk_state_company_id_companies_id_fk": {
"name": "chat_sdk_state_company_id_companies_id_fk",
"tableFrom": "chat_sdk_state",
+ "tableTo": "companies",
"columnsFrom": [
"company_id"
],
- "tableTo": "companies",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "cascade"
+ "onDelete": "cascade",
+ "onUpdate": "no action"
},
"chat_sdk_state_company_endpoint_fk": {
"name": "chat_sdk_state_company_endpoint_fk",
"tableFrom": "chat_sdk_state",
+ "tableTo": "chat_endpoints",
"columnsFrom": [
"company_id",
"endpoint_id"
],
- "tableTo": "chat_endpoints",
"columnsTo": [
"company_id",
"id"
],
- "onUpdate": "no action",
- "onDelete": "cascade"
+ "onDelete": "cascade",
+ "onUpdate": "no action"
}
},
"compositePrimaryKeys": {},
@@ -11653,9 +11653,9 @@
}
],
"isUnique": true,
- "with": {},
+ "concurrently": false,
"method": "btree",
- "concurrently": false
+ "with": {}
},
"chat_completion_deliveries_pending_idx": {
"name": "chat_completion_deliveries_pending_idx",
@@ -11674,63 +11674,63 @@
}
],
"isUnique": false,
- "with": {},
+ "concurrently": false,
"method": "btree",
- "concurrently": false
+ "with": {}
}
},
"foreignKeys": {
"chat_completion_deliveries_company_id_companies_id_fk": {
"name": "chat_completion_deliveries_company_id_companies_id_fk",
"tableFrom": "chat_completion_deliveries",
+ "tableTo": "companies",
"columnsFrom": [
"company_id"
],
- "tableTo": "companies",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "cascade"
+ "onDelete": "cascade",
+ "onUpdate": "no action"
},
"chat_completion_deliveries_task_id_chat_task_handoffs_task_id_fk": {
"name": "chat_completion_deliveries_task_id_chat_task_handoffs_task_id_fk",
"tableFrom": "chat_completion_deliveries",
+ "tableTo": "chat_task_handoffs",
"columnsFrom": [
"task_id"
],
- "tableTo": "chat_task_handoffs",
"columnsTo": [
"task_id"
],
- "onUpdate": "no action",
- "onDelete": "cascade"
+ "onDelete": "cascade",
+ "onUpdate": "no action"
},
"chat_completion_deliveries_target_run_id_heartbeat_runs_id_fk": {
"name": "chat_completion_deliveries_target_run_id_heartbeat_runs_id_fk",
"tableFrom": "chat_completion_deliveries",
+ "tableTo": "heartbeat_runs",
"columnsFrom": [
"target_run_id"
],
- "tableTo": "heartbeat_runs",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "set null"
+ "onDelete": "set null",
+ "onUpdate": "no action"
},
"chat_completion_deliveries_response_comment_id_issue_comments_id_fk": {
"name": "chat_completion_deliveries_response_comment_id_issue_comments_id_fk",
"tableFrom": "chat_completion_deliveries",
+ "tableTo": "issue_comments",
"columnsFrom": [
"response_comment_id"
],
- "tableTo": "issue_comments",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "set null"
+ "onDelete": "set null",
+ "onUpdate": "no action"
}
},
"compositePrimaryKeys": {},
@@ -11799,63 +11799,63 @@
}
],
"isUnique": false,
- "with": {},
+ "concurrently": false,
"method": "btree",
- "concurrently": false
+ "with": {}
}
},
"foreignKeys": {
"chat_task_handoffs_task_id_issues_id_fk": {
"name": "chat_task_handoffs_task_id_issues_id_fk",
"tableFrom": "chat_task_handoffs",
+ "tableTo": "issues",
"columnsFrom": [
"task_id"
],
- "tableTo": "issues",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "cascade"
+ "onDelete": "cascade",
+ "onUpdate": "no action"
},
"chat_task_handoffs_company_id_companies_id_fk": {
"name": "chat_task_handoffs_company_id_companies_id_fk",
"tableFrom": "chat_task_handoffs",
+ "tableTo": "companies",
"columnsFrom": [
"company_id"
],
- "tableTo": "companies",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "cascade"
+ "onDelete": "cascade",
+ "onUpdate": "no action"
},
"chat_task_handoffs_conversation_id_issues_id_fk": {
"name": "chat_task_handoffs_conversation_id_issues_id_fk",
"tableFrom": "chat_task_handoffs",
+ "tableTo": "issues",
"columnsFrom": [
"conversation_id"
],
- "tableTo": "issues",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "cascade"
+ "onDelete": "cascade",
+ "onUpdate": "no action"
},
"chat_task_handoffs_agent_id_agents_id_fk": {
"name": "chat_task_handoffs_agent_id_agents_id_fk",
"tableFrom": "chat_task_handoffs",
+ "tableTo": "agents",
"columnsFrom": [
"agent_id"
],
- "tableTo": "agents",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "cascade"
+ "onDelete": "cascade",
+ "onUpdate": "no action"
}
},
"compositePrimaryKeys": {},
@@ -11968,17 +11968,17 @@
"chat_github_configurations_company_id_endpoint_id_chat_endpoints_company_id_id_fk": {
"name": "chat_github_configurations_company_id_endpoint_id_chat_endpoints_company_id_id_fk",
"tableFrom": "chat_github_configurations",
+ "tableTo": "chat_endpoints",
"columnsFrom": [
"company_id",
"endpoint_id"
],
- "tableTo": "chat_endpoints",
"columnsTo": [
"company_id",
"id"
],
- "onUpdate": "no action",
- "onDelete": "cascade"
+ "onDelete": "cascade",
+ "onUpdate": "no action"
}
},
"compositePrimaryKeys": {},
@@ -12097,9 +12097,9 @@
}
],
"isUnique": true,
- "with": {},
+ "concurrently": false,
"method": "btree",
- "concurrently": false
+ "with": {}
},
"chat_github_registration_endpoint_idx": {
"name": "chat_github_registration_endpoint_idx",
@@ -12118,26 +12118,26 @@
}
],
"isUnique": false,
- "with": {},
+ "concurrently": false,
"method": "btree",
- "concurrently": false
+ "with": {}
}
},
"foreignKeys": {
"chat_github_registrations_company_id_endpoint_id_chat_endpoints_company_id_id_fk": {
"name": "chat_github_registrations_company_id_endpoint_id_chat_endpoints_company_id_id_fk",
"tableFrom": "chat_github_registrations",
+ "tableTo": "chat_endpoints",
"columnsFrom": [
"company_id",
"endpoint_id"
],
- "tableTo": "chat_endpoints",
"columnsTo": [
"company_id",
"id"
],
- "onUpdate": "no action",
- "onDelete": "cascade"
+ "onDelete": "cascade",
+ "onUpdate": "no action"
}
},
"compositePrimaryKeys": {},
@@ -12317,9 +12317,9 @@
}
],
"isUnique": true,
- "with": {},
+ "concurrently": false,
"method": "btree",
- "concurrently": false
+ "with": {}
},
"chat_github_reviews_pull_idx": {
"name": "chat_github_reviews_pull_idx",
@@ -12350,9 +12350,9 @@
}
],
"isUnique": false,
- "with": {},
+ "concurrently": false,
"method": "btree",
- "concurrently": false
+ "with": {}
},
"chat_github_reviews_task_idx": {
"name": "chat_github_reviews_task_idx",
@@ -12377,65 +12377,65 @@
}
],
"isUnique": false,
- "with": {},
+ "concurrently": false,
"method": "btree",
- "concurrently": false
+ "with": {}
}
},
"foreignKeys": {
"chat_github_reviews_run_id_heartbeat_runs_id_fk": {
"name": "chat_github_reviews_run_id_heartbeat_runs_id_fk",
"tableFrom": "chat_github_reviews",
+ "tableTo": "heartbeat_runs",
"columnsFrom": [
"run_id"
],
- "tableTo": "heartbeat_runs",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "set null"
+ "onDelete": "set null",
+ "onUpdate": "no action"
},
"chat_github_reviews_company_id_endpoint_id_chat_endpoints_company_id_id_fk": {
"name": "chat_github_reviews_company_id_endpoint_id_chat_endpoints_company_id_id_fk",
"tableFrom": "chat_github_reviews",
+ "tableTo": "chat_endpoints",
"columnsFrom": [
"company_id",
"endpoint_id"
],
- "tableTo": "chat_endpoints",
"columnsTo": [
"company_id",
"id"
],
- "onUpdate": "no action",
- "onDelete": "cascade"
+ "onDelete": "cascade",
+ "onUpdate": "no action"
},
"chat_github_reviews_company_id_issue_id_issues_company_id_id_fk": {
"name": "chat_github_reviews_company_id_issue_id_issues_company_id_id_fk",
"tableFrom": "chat_github_reviews",
+ "tableTo": "issues",
"columnsFrom": [
"company_id",
"issue_id"
],
- "tableTo": "issues",
"columnsTo": [
"company_id",
"id"
],
- "onUpdate": "no action",
- "onDelete": "restrict"
+ "onDelete": "restrict",
+ "onUpdate": "no action"
}
},
"compositePrimaryKeys": {},
"uniqueConstraints": {
"chat_github_reviews_company_id_uq": {
"name": "chat_github_reviews_company_id_uq",
+ "nullsNotDistinct": false,
"columns": [
"company_id",
"id"
- ],
- "nullsNotDistinct": false
+ ]
}
},
"policies": {},
@@ -12570,9 +12570,9 @@
}
],
"isUnique": true,
- "with": {},
+ "concurrently": false,
"method": "btree",
- "concurrently": false
+ "with": {}
},
"chat_slack_manager_grants_owner_idx": {
"name": "chat_slack_manager_grants_owner_idx",
@@ -12603,24 +12603,24 @@
}
],
"isUnique": true,
- "with": {},
+ "concurrently": false,
"method": "btree",
- "concurrently": false
+ "with": {}
}
},
"foreignKeys": {
"chat_slack_manager_grants_company_id_companies_id_fk": {
"name": "chat_slack_manager_grants_company_id_companies_id_fk",
"tableFrom": "chat_slack_manager_grants",
+ "tableTo": "companies",
"columnsFrom": [
"company_id"
],
- "tableTo": "companies",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "cascade"
+ "onDelete": "cascade",
+ "onUpdate": "no action"
}
},
"compositePrimaryKeys": {},
@@ -12749,32 +12749,32 @@
"chat_slack_registrations_company_id_manager_grant_id_chat_slack_manager_grants_company_id_id_fk": {
"name": "chat_slack_registrations_company_id_manager_grant_id_chat_slack_manager_grants_company_id_id_fk",
"tableFrom": "chat_slack_registrations",
+ "tableTo": "chat_slack_manager_grants",
"columnsFrom": [
"company_id",
"manager_grant_id"
],
- "tableTo": "chat_slack_manager_grants",
"columnsTo": [
"company_id",
"id"
],
- "onUpdate": "no action",
- "onDelete": "no action"
+ "onDelete": "no action",
+ "onUpdate": "no action"
},
"chat_slack_registrations_company_id_endpoint_id_chat_endpoints_company_id_id_fk": {
"name": "chat_slack_registrations_company_id_endpoint_id_chat_endpoints_company_id_id_fk",
"tableFrom": "chat_slack_registrations",
+ "tableTo": "chat_endpoints",
"columnsFrom": [
"company_id",
"endpoint_id"
],
- "tableTo": "chat_endpoints",
"columnsTo": [
"company_id",
"id"
],
- "onUpdate": "no action",
- "onDelete": "cascade"
+ "onDelete": "cascade",
+ "onUpdate": "no action"
}
},
"compositePrimaryKeys": {},
@@ -13038,9 +13038,9 @@
}
],
"isUnique": true,
- "with": {},
+ "concurrently": false,
"method": "btree",
- "concurrently": false
+ "with": {}
},
"chat_teams_file_transfers_token_uq": {
"name": "chat_teams_file_transfers_token_uq",
@@ -13059,9 +13059,9 @@
}
],
"isUnique": true,
- "with": {},
+ "concurrently": false,
"method": "btree",
- "concurrently": false
+ "with": {}
},
"chat_teams_file_transfers_work_idx": {
"name": "chat_teams_file_transfers_work_idx",
@@ -13086,97 +13086,97 @@
}
],
"isUnique": false,
- "with": {},
+ "concurrently": false,
"method": "btree",
- "concurrently": false
+ "with": {}
}
},
"foreignKeys": {
"chat_teams_file_transfers_company_id_companies_id_fk": {
"name": "chat_teams_file_transfers_company_id_companies_id_fk",
"tableFrom": "chat_teams_file_transfers",
+ "tableTo": "companies",
"columnsFrom": [
"company_id"
],
- "tableTo": "companies",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "cascade"
+ "onDelete": "cascade",
+ "onUpdate": "no action"
},
"chat_teams_file_transfers_issue_id_issues_id_fk": {
"name": "chat_teams_file_transfers_issue_id_issues_id_fk",
"tableFrom": "chat_teams_file_transfers",
+ "tableTo": "issues",
"columnsFrom": [
"issue_id"
],
- "tableTo": "issues",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "restrict"
+ "onDelete": "restrict",
+ "onUpdate": "no action"
},
"chat_teams_file_transfers_company_id_endpoint_id_chat_endpoints_company_id_id_fk": {
"name": "chat_teams_file_transfers_company_id_endpoint_id_chat_endpoints_company_id_id_fk",
"tableFrom": "chat_teams_file_transfers",
+ "tableTo": "chat_endpoints",
"columnsFrom": [
"company_id",
"endpoint_id"
],
- "tableTo": "chat_endpoints",
"columnsTo": [
"company_id",
"id"
],
- "onUpdate": "no action",
- "onDelete": "cascade"
+ "onDelete": "cascade",
+ "onUpdate": "no action"
},
"chat_teams_file_transfers_company_id_publication_id_chat_publications_company_id_id_fk": {
"name": "chat_teams_file_transfers_company_id_publication_id_chat_publications_company_id_id_fk",
"tableFrom": "chat_teams_file_transfers",
+ "tableTo": "chat_publications",
"columnsFrom": [
"company_id",
"publication_id"
],
- "tableTo": "chat_publications",
"columnsTo": [
"company_id",
"id"
],
- "onUpdate": "no action",
- "onDelete": "cascade"
+ "onDelete": "cascade",
+ "onUpdate": "no action"
},
"chat_teams_file_transfers_company_id_conversation_id_chat_conversations_company_id_id_fk": {
"name": "chat_teams_file_transfers_company_id_conversation_id_chat_conversations_company_id_id_fk",
"tableFrom": "chat_teams_file_transfers",
+ "tableTo": "chat_conversations",
"columnsFrom": [
"company_id",
"conversation_id"
],
- "tableTo": "chat_conversations",
"columnsTo": [
"company_id",
"id"
],
- "onUpdate": "no action",
- "onDelete": "cascade"
+ "onDelete": "cascade",
+ "onUpdate": "no action"
},
"chat_teams_file_transfers_company_id_principal_id_chat_external_principals_company_id_id_fk": {
"name": "chat_teams_file_transfers_company_id_principal_id_chat_external_principals_company_id_id_fk",
"tableFrom": "chat_teams_file_transfers",
+ "tableTo": "chat_external_principals",
"columnsFrom": [
"company_id",
"principal_id"
],
- "tableTo": "chat_external_principals",
"columnsTo": [
"company_id",
"id"
],
- "onUpdate": "no action",
- "onDelete": "no action"
+ "onDelete": "no action",
+ "onUpdate": "no action"
}
},
"compositePrimaryKeys": {},
@@ -13276,26 +13276,26 @@
}
],
"isUnique": true,
- "with": {},
+ "concurrently": false,
"method": "btree",
- "concurrently": false
+ "with": {}
}
},
"foreignKeys": {
"chat_voice_callbacks_endpoint_fk": {
"name": "chat_voice_callbacks_endpoint_fk",
"tableFrom": "chat_voice_callbacks",
+ "tableTo": "chat_endpoints",
"columnsFrom": [
"company_id",
"endpoint_id"
],
- "tableTo": "chat_endpoints",
"columnsTo": [
"company_id",
"id"
],
- "onUpdate": "no action",
- "onDelete": "cascade"
+ "onDelete": "cascade",
+ "onUpdate": "no action"
}
},
"compositePrimaryKeys": {},
@@ -13444,81 +13444,81 @@
}
],
"isUnique": false,
- "with": {},
+ "concurrently": false,
"method": "btree",
- "concurrently": false
+ "with": {}
}
},
"foreignKeys": {
"chat_voice_inbound_endpoint_fk": {
"name": "chat_voice_inbound_endpoint_fk",
"tableFrom": "chat_voice_inbound_calls",
+ "tableTo": "chat_endpoints",
"columnsFrom": [
"company_id",
"endpoint_id"
],
- "tableTo": "chat_endpoints",
"columnsTo": [
"company_id",
"id"
],
- "onUpdate": "no action",
- "onDelete": "cascade"
+ "onDelete": "cascade",
+ "onUpdate": "no action"
},
"chat_voice_inbound_session_fk": {
"name": "chat_voice_inbound_session_fk",
"tableFrom": "chat_voice_inbound_calls",
+ "tableTo": "chat_voice_sessions",
"columnsFrom": [
"company_id",
"session_id"
],
- "tableTo": "chat_voice_sessions",
"columnsTo": [
"company_id",
"id"
],
- "onUpdate": "no action",
- "onDelete": "no action"
+ "onDelete": "no action",
+ "onUpdate": "no action"
},
"chat_voice_inbound_intake_fk": {
"name": "chat_voice_inbound_intake_fk",
"tableFrom": "chat_voice_inbound_calls",
+ "tableTo": "issues",
"columnsFrom": [
"company_id",
"intake_issue_id"
],
- "tableTo": "issues",
"columnsTo": [
"company_id",
"id"
],
- "onUpdate": "no action",
- "onDelete": "no action"
+ "onDelete": "no action",
+ "onUpdate": "no action"
},
"chat_voice_inbound_requested_issue_fk": {
"name": "chat_voice_inbound_requested_issue_fk",
"tableFrom": "chat_voice_inbound_calls",
+ "tableTo": "issues",
"columnsFrom": [
"company_id",
"requested_issue_id"
],
- "tableTo": "issues",
"columnsTo": [
"company_id",
"id"
],
- "onUpdate": "no action",
- "onDelete": "no action"
+ "onDelete": "no action",
+ "onUpdate": "no action"
}
},
"compositePrimaryKeys": {},
"uniqueConstraints": {
"chat_voice_inbound_provider_uq": {
"name": "chat_voice_inbound_provider_uq",
+ "nullsNotDistinct": false,
"columns": [
"provider_session_id"
- ],
- "nullsNotDistinct": false
+ ]
}
},
"policies": {},
@@ -13603,40 +13603,40 @@
"chat_voice_phone_lines_low_trust_environment_id_environments_id_fk": {
"name": "chat_voice_phone_lines_low_trust_environment_id_environments_id_fk",
"tableFrom": "chat_voice_phone_lines",
+ "tableTo": "environments",
"columnsFrom": [
"low_trust_environment_id"
],
- "tableTo": "environments",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "no action"
+ "onDelete": "no action",
+ "onUpdate": "no action"
},
"chat_voice_phone_lines_endpoint_fk": {
"name": "chat_voice_phone_lines_endpoint_fk",
"tableFrom": "chat_voice_phone_lines",
+ "tableTo": "chat_endpoints",
"columnsFrom": [
"company_id",
"endpoint_id"
],
- "tableTo": "chat_endpoints",
"columnsTo": [
"company_id",
"id"
],
- "onUpdate": "no action",
- "onDelete": "cascade"
+ "onDelete": "cascade",
+ "onUpdate": "no action"
}
},
"compositePrimaryKeys": {},
"uniqueConstraints": {
"chat_voice_phone_lines_number_uq": {
"name": "chat_voice_phone_lines_number_uq",
+ "nullsNotDistinct": false,
"columns": [
"provider_number_id"
- ],
- "nullsNotDistinct": false
+ ]
}
},
"policies": {},
@@ -13736,26 +13736,26 @@
}
],
"isUnique": false,
- "with": {},
+ "concurrently": false,
"method": "btree",
- "concurrently": false
+ "with": {}
}
},
"foreignKeys": {
"chat_voice_reports_session_fk": {
"name": "chat_voice_reports_session_fk",
"tableFrom": "chat_voice_reports",
+ "tableTo": "chat_voice_sessions",
"columnsFrom": [
"company_id",
"session_id"
],
- "tableTo": "chat_voice_sessions",
"columnsTo": [
"company_id",
"id"
],
- "onUpdate": "no action",
- "onDelete": "cascade"
+ "onDelete": "cascade",
+ "onUpdate": "no action"
}
},
"compositePrimaryKeys": {},
@@ -13854,9 +13854,9 @@
}
],
"isUnique": true,
- "with": {},
+ "concurrently": false,
"method": "btree",
- "concurrently": false
+ "with": {}
},
"chat_voice_replies_cursor_uq": {
"name": "chat_voice_replies_cursor_uq",
@@ -13875,54 +13875,54 @@
}
],
"isUnique": true,
- "with": {},
+ "concurrently": false,
"method": "btree",
- "concurrently": false
+ "with": {}
}
},
"foreignKeys": {
"chat_voice_replies_company_id_companies_id_fk": {
"name": "chat_voice_replies_company_id_companies_id_fk",
"tableFrom": "chat_voice_replies",
+ "tableTo": "companies",
"columnsFrom": [
"company_id"
],
- "tableTo": "companies",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "cascade"
+ "onDelete": "cascade",
+ "onUpdate": "no action"
},
"chat_voice_replies_session_fk": {
"name": "chat_voice_replies_session_fk",
"tableFrom": "chat_voice_replies",
+ "tableTo": "chat_voice_sessions",
"columnsFrom": [
"company_id",
"session_id"
],
- "tableTo": "chat_voice_sessions",
"columnsTo": [
"company_id",
"id"
],
- "onUpdate": "no action",
- "onDelete": "no action"
+ "onDelete": "no action",
+ "onUpdate": "no action"
},
"chat_voice_replies_publication_fk": {
"name": "chat_voice_replies_publication_fk",
"tableFrom": "chat_voice_replies",
+ "tableTo": "chat_publications",
"columnsFrom": [
"company_id",
"publication_id"
],
- "tableTo": "chat_publications",
"columnsTo": [
"company_id",
"id"
],
- "onUpdate": "no action",
- "onDelete": "no action"
+ "onDelete": "no action",
+ "onUpdate": "no action"
}
},
"compositePrimaryKeys": {},
@@ -14100,9 +14100,9 @@
}
],
"isUnique": true,
- "with": {},
+ "concurrently": false,
"method": "btree",
- "concurrently": false
+ "with": {}
},
"chat_voice_sessions_request_uq": {
"name": "chat_voice_sessions_request_uq",
@@ -14127,9 +14127,9 @@
}
],
"isUnique": true,
- "with": {},
+ "concurrently": false,
"method": "btree",
- "concurrently": false
+ "with": {}
},
"chat_voice_sessions_live_caller_task_uq": {
"name": "chat_voice_sessions_live_caller_task_uq",
@@ -14154,10 +14154,10 @@
}
],
"isUnique": true,
- "with": {},
- "method": "btree",
"where": "\"chat_voice_sessions\".\"state\" not in ('ended', 'failed', 'expired')",
- "concurrently": false
+ "concurrently": false,
+ "method": "btree",
+ "with": {}
},
"chat_voice_sessions_expiry_idx": {
"name": "chat_voice_sessions_expiry_idx",
@@ -14176,95 +14176,95 @@
}
],
"isUnique": false,
- "with": {},
+ "concurrently": false,
"method": "btree",
- "concurrently": false
+ "with": {}
}
},
"foreignKeys": {
"chat_voice_sessions_company_id_companies_id_fk": {
"name": "chat_voice_sessions_company_id_companies_id_fk",
"tableFrom": "chat_voice_sessions",
+ "tableTo": "companies",
"columnsFrom": [
"company_id"
],
- "tableTo": "companies",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "cascade"
+ "onDelete": "cascade",
+ "onUpdate": "no action"
},
"chat_voice_sessions_endpoint_fk": {
"name": "chat_voice_sessions_endpoint_fk",
"tableFrom": "chat_voice_sessions",
+ "tableTo": "chat_endpoints",
"columnsFrom": [
"company_id",
"endpoint_id"
],
- "tableTo": "chat_endpoints",
"columnsTo": [
"company_id",
"id"
],
- "onUpdate": "no action",
- "onDelete": "no action"
+ "onDelete": "no action",
+ "onUpdate": "no action"
},
"chat_voice_sessions_conversation_fk": {
"name": "chat_voice_sessions_conversation_fk",
"tableFrom": "chat_voice_sessions",
+ "tableTo": "chat_conversations",
"columnsFrom": [
"company_id",
"conversation_id"
],
- "tableTo": "chat_conversations",
"columnsTo": [
"company_id",
"id"
],
- "onUpdate": "no action",
- "onDelete": "no action"
+ "onDelete": "no action",
+ "onUpdate": "no action"
},
"chat_voice_sessions_issue_fk": {
"name": "chat_voice_sessions_issue_fk",
"tableFrom": "chat_voice_sessions",
+ "tableTo": "issues",
"columnsFrom": [
"company_id",
"issue_id"
],
- "tableTo": "issues",
"columnsTo": [
"company_id",
"id"
],
- "onUpdate": "no action",
- "onDelete": "no action"
+ "onDelete": "no action",
+ "onUpdate": "no action"
},
"chat_voice_sessions_agent_fk": {
"name": "chat_voice_sessions_agent_fk",
"tableFrom": "chat_voice_sessions",
+ "tableTo": "agents",
"columnsFrom": [
"company_id",
"assigned_agent_id"
],
- "tableTo": "agents",
"columnsTo": [
"company_id",
"id"
],
- "onUpdate": "no action",
- "onDelete": "no action"
+ "onDelete": "no action",
+ "onUpdate": "no action"
}
},
"compositePrimaryKeys": {},
"uniqueConstraints": {
"chat_voice_sessions_company_id_uq": {
"name": "chat_voice_sessions_company_id_uq",
+ "nullsNotDistinct": false,
"columns": [
"company_id",
"id"
- ],
- "nullsNotDistinct": false
+ ]
}
},
"policies": {},
@@ -14381,9 +14381,9 @@
}
],
"isUnique": true,
- "with": {},
+ "concurrently": false,
"method": "btree",
- "concurrently": false
+ "with": {}
},
"chat_voice_tool_calls_webhook_uq": {
"name": "chat_voice_tool_calls_webhook_uq",
@@ -14402,54 +14402,54 @@
}
],
"isUnique": true,
- "with": {},
+ "concurrently": false,
"method": "btree",
- "concurrently": false
+ "with": {}
}
},
"foreignKeys": {
"chat_voice_tool_calls_company_id_companies_id_fk": {
"name": "chat_voice_tool_calls_company_id_companies_id_fk",
"tableFrom": "chat_voice_tool_calls",
+ "tableTo": "companies",
"columnsFrom": [
"company_id"
],
- "tableTo": "companies",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "cascade"
+ "onDelete": "cascade",
+ "onUpdate": "no action"
},
"chat_voice_tool_calls_session_fk": {
"name": "chat_voice_tool_calls_session_fk",
"tableFrom": "chat_voice_tool_calls",
+ "tableTo": "chat_voice_sessions",
"columnsFrom": [
"company_id",
"session_id"
],
- "tableTo": "chat_voice_sessions",
"columnsTo": [
"company_id",
"id"
],
- "onUpdate": "no action",
- "onDelete": "no action"
+ "onDelete": "no action",
+ "onUpdate": "no action"
},
"chat_voice_tool_calls_delivery_fk": {
"name": "chat_voice_tool_calls_delivery_fk",
"tableFrom": "chat_voice_tool_calls",
+ "tableTo": "chat_deliveries",
"columnsFrom": [
"company_id",
"delivery_id"
],
- "tableTo": "chat_deliveries",
"columnsTo": [
"company_id",
"id"
],
- "onUpdate": "no action",
- "onDelete": "no action"
+ "onDelete": "no action",
+ "onUpdate": "no action"
}
},
"compositePrimaryKeys": {},
@@ -14574,9 +14574,9 @@
}
],
"isUnique": false,
- "with": {},
+ "concurrently": false,
"method": "btree",
- "concurrently": false
+ "with": {}
},
"cli_auth_challenges_approved_by_idx": {
"name": "cli_auth_challenges_approved_by_idx",
@@ -14589,9 +14589,9 @@
}
],
"isUnique": false,
- "with": {},
+ "concurrently": false,
"method": "btree",
- "concurrently": false
+ "with": {}
},
"cli_auth_challenges_requested_company_idx": {
"name": "cli_auth_challenges_requested_company_idx",
@@ -14604,50 +14604,50 @@
}
],
"isUnique": false,
- "with": {},
+ "concurrently": false,
"method": "btree",
- "concurrently": false
+ "with": {}
}
},
"foreignKeys": {
"cli_auth_challenges_requested_company_id_companies_id_fk": {
"name": "cli_auth_challenges_requested_company_id_companies_id_fk",
"tableFrom": "cli_auth_challenges",
+ "tableTo": "companies",
"columnsFrom": [
"requested_company_id"
],
- "tableTo": "companies",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "set null"
+ "onDelete": "set null",
+ "onUpdate": "no action"
},
"cli_auth_challenges_approved_by_user_id_user_id_fk": {
"name": "cli_auth_challenges_approved_by_user_id_user_id_fk",
"tableFrom": "cli_auth_challenges",
+ "tableTo": "user",
"columnsFrom": [
"approved_by_user_id"
],
- "tableTo": "user",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "set null"
+ "onDelete": "set null",
+ "onUpdate": "no action"
},
"cli_auth_challenges_board_api_key_id_board_api_keys_id_fk": {
"name": "cli_auth_challenges_board_api_key_id_board_api_keys_id_fk",
"tableFrom": "cli_auth_challenges",
+ "tableTo": "board_api_keys",
"columnsFrom": [
"board_api_key_id"
],
- "tableTo": "board_api_keys",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "set null"
+ "onDelete": "set null",
+ "onUpdate": "no action"
}
},
"compositePrimaryKeys": {},
@@ -14804,9 +14804,9 @@
}
],
"isUnique": true,
- "with": {},
+ "concurrently": false,
"method": "btree",
- "concurrently": false
+ "with": {}
}
},
"foreignKeys": {},
@@ -14866,9 +14866,9 @@
}
],
"isUnique": true,
- "with": {},
+ "concurrently": false,
"method": "btree",
- "concurrently": false
+ "with": {}
},
"company_logos_asset_uq": {
"name": "company_logos_asset_uq",
@@ -14881,37 +14881,37 @@
}
],
"isUnique": true,
- "with": {},
+ "concurrently": false,
"method": "btree",
- "concurrently": false
+ "with": {}
}
},
"foreignKeys": {
"company_logos_company_id_companies_id_fk": {
"name": "company_logos_company_id_companies_id_fk",
"tableFrom": "company_logos",
+ "tableTo": "companies",
"columnsFrom": [
"company_id"
],
- "tableTo": "companies",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "cascade"
+ "onDelete": "cascade",
+ "onUpdate": "no action"
},
"company_logos_asset_id_assets_id_fk": {
"name": "company_logos_asset_id_assets_id_fk",
"tableFrom": "company_logos",
+ "tableTo": "assets",
"columnsFrom": [
"asset_id"
],
- "tableTo": "assets",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "cascade"
+ "onDelete": "cascade",
+ "onUpdate": "no action"
}
},
"compositePrimaryKeys": {},
@@ -15001,9 +15001,9 @@
}
],
"isUnique": true,
- "with": {},
+ "concurrently": false,
"method": "btree",
- "concurrently": false
+ "with": {}
},
"company_memberships_principal_status_idx": {
"name": "company_memberships_principal_status_idx",
@@ -15028,9 +15028,9 @@
}
],
"isUnique": false,
- "with": {},
+ "concurrently": false,
"method": "btree",
- "concurrently": false
+ "with": {}
},
"company_memberships_company_status_idx": {
"name": "company_memberships_company_status_idx",
@@ -15049,24 +15049,128 @@
}
],
"isUnique": false,
- "with": {},
+ "concurrently": false,
"method": "btree",
- "concurrently": false
+ "with": {}
}
},
"foreignKeys": {
"company_memberships_company_id_companies_id_fk": {
"name": "company_memberships_company_id_companies_id_fk",
"tableFrom": "company_memberships",
+ "tableTo": "companies",
"columnsFrom": [
"company_id"
],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.company_observability": {
+ "name": "company_observability",
+ "schema": "",
+ "columns": {
+ "company_id": {
+ "name": "company_id",
+ "type": "uuid",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "revision": {
+ "name": "revision",
+ "type": "uuid",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "enabled": {
+ "name": "enabled",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "destination": {
+ "name": "destination",
+ "type": "jsonb",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "capture": {
+ "name": "capture",
+ "type": "jsonb",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "credentials_secret_id": {
+ "name": "credentials_secret_id",
+ "type": "uuid",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "header_names": {
+ "name": "header_names",
+ "type": "jsonb",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "'[]'::jsonb"
+ },
+ "last_test": {
+ "name": "last_test",
+ "type": "jsonb",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp with time zone",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp with time zone",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "company_observability_company_id_companies_id_fk": {
+ "name": "company_observability_company_id_companies_id_fk",
+ "tableFrom": "company_observability",
"tableTo": "companies",
+ "columnsFrom": [
+ "company_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "company_observability_credentials_secret_id_company_secrets_id_fk": {
+ "name": "company_observability_credentials_secret_id_company_secrets_id_fk",
+ "tableFrom": "company_observability",
+ "tableTo": "company_secrets",
+ "columnsFrom": [
+ "credentials_secret_id"
+ ],
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "no action"
+ "onDelete": "set null",
+ "onUpdate": "no action"
}
},
"compositePrimaryKeys": {},
@@ -15180,63 +15284,63 @@
}
],
"isUnique": true,
- "with": {},
+ "concurrently": false,
"method": "btree",
- "concurrently": false
+ "with": {}
}
},
"foreignKeys": {
"company_onboarding_seeds_company_id_companies_id_fk": {
"name": "company_onboarding_seeds_company_id_companies_id_fk",
"tableFrom": "company_onboarding_seeds",
+ "tableTo": "companies",
"columnsFrom": [
"company_id"
],
- "tableTo": "companies",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "cascade"
+ "onDelete": "cascade",
+ "onUpdate": "no action"
},
"company_onboarding_seeds_goal_id_goals_id_fk": {
"name": "company_onboarding_seeds_goal_id_goals_id_fk",
"tableFrom": "company_onboarding_seeds",
+ "tableTo": "goals",
"columnsFrom": [
"goal_id"
],
- "tableTo": "goals",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "set null"
+ "onDelete": "set null",
+ "onUpdate": "no action"
},
"company_onboarding_seeds_agent_id_agents_id_fk": {
"name": "company_onboarding_seeds_agent_id_agents_id_fk",
"tableFrom": "company_onboarding_seeds",
+ "tableTo": "agents",
"columnsFrom": [
"agent_id"
],
- "tableTo": "agents",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "set null"
+ "onDelete": "set null",
+ "onUpdate": "no action"
},
"company_onboarding_seeds_issue_id_issues_id_fk": {
"name": "company_onboarding_seeds_issue_id_issues_id_fk",
"tableFrom": "company_onboarding_seeds",
+ "tableTo": "issues",
"columnsFrom": [
"issue_id"
],
- "tableTo": "issues",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "set null"
+ "onDelete": "set null",
+ "onUpdate": "no action"
}
},
"compositePrimaryKeys": {},
@@ -15346,9 +15450,9 @@
}
],
"isUnique": false,
- "with": {},
+ "concurrently": false,
"method": "btree",
- "concurrently": false
+ "with": {}
},
"company_secret_bindings_secret_idx": {
"name": "company_secret_bindings_secret_idx",
@@ -15361,9 +15465,9 @@
}
],
"isUnique": false,
- "with": {},
+ "concurrently": false,
"method": "btree",
- "concurrently": false
+ "with": {}
},
"company_secret_bindings_target_idx": {
"name": "company_secret_bindings_target_idx",
@@ -15388,9 +15492,9 @@
}
],
"isUnique": false,
- "with": {},
+ "concurrently": false,
"method": "btree",
- "concurrently": false
+ "with": {}
},
"company_secret_bindings_target_path_uq": {
"name": "company_secret_bindings_target_path_uq",
@@ -15421,37 +15525,37 @@
}
],
"isUnique": true,
- "with": {},
+ "concurrently": false,
"method": "btree",
- "concurrently": false
+ "with": {}
}
},
"foreignKeys": {
"company_secret_bindings_company_id_companies_id_fk": {
"name": "company_secret_bindings_company_id_companies_id_fk",
"tableFrom": "company_secret_bindings",
+ "tableTo": "companies",
"columnsFrom": [
"company_id"
],
- "tableTo": "companies",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "no action"
+ "onDelete": "no action",
+ "onUpdate": "no action"
},
"company_secret_bindings_secret_id_company_secrets_id_fk": {
"name": "company_secret_bindings_secret_id_company_secrets_id_fk",
"tableFrom": "company_secret_bindings",
+ "tableTo": "company_secrets",
"columnsFrom": [
"secret_id"
],
- "tableTo": "company_secrets",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "cascade"
+ "onDelete": "cascade",
+ "onUpdate": "no action"
}
},
"compositePrimaryKeys": {},
@@ -15686,9 +15790,9 @@
}
],
"isUnique": false,
- "with": {},
+ "concurrently": false,
"method": "btree",
- "concurrently": false
+ "with": {}
},
"company_secret_proposals_proposer_status_idx": {
"name": "company_secret_proposals_proposer_status_idx",
@@ -15707,9 +15811,9 @@
}
],
"isUnique": false,
- "with": {},
+ "concurrently": false,
"method": "btree",
- "concurrently": false
+ "with": {}
},
"company_secret_proposals_expiry_idx": {
"name": "company_secret_proposals_expiry_idx",
@@ -15728,9 +15832,9 @@
}
],
"isUnique": false,
- "with": {},
+ "concurrently": false,
"method": "btree",
- "concurrently": false
+ "with": {}
},
"company_secret_proposals_secret_proposal_idx": {
"name": "company_secret_proposals_secret_proposal_idx",
@@ -15743,9 +15847,9 @@
}
],
"isUnique": false,
- "with": {},
+ "concurrently": false,
"method": "btree",
- "concurrently": false
+ "with": {}
},
"company_secret_proposals_interaction_idx": {
"name": "company_secret_proposals_interaction_idx",
@@ -15758,128 +15862,128 @@
}
],
"isUnique": false,
- "with": {},
+ "concurrently": false,
"method": "btree",
- "concurrently": false
+ "with": {}
}
},
"foreignKeys": {
"company_secret_proposals_company_id_companies_id_fk": {
"name": "company_secret_proposals_company_id_companies_id_fk",
"tableFrom": "company_secret_proposals",
+ "tableTo": "companies",
"columnsFrom": [
"company_id"
],
- "tableTo": "companies",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "no action"
+ "onDelete": "no action",
+ "onUpdate": "no action"
},
"company_secret_proposals_secret_id_company_secrets_id_fk": {
"name": "company_secret_proposals_secret_id_company_secrets_id_fk",
"tableFrom": "company_secret_proposals",
+ "tableTo": "company_secrets",
"columnsFrom": [
"secret_id"
],
- "tableTo": "company_secrets",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "set null"
+ "onDelete": "set null",
+ "onUpdate": "no action"
},
"company_secret_proposals_secret_proposal_id_company_secret_proposals_id_fk": {
"name": "company_secret_proposals_secret_proposal_id_company_secret_proposals_id_fk",
"tableFrom": "company_secret_proposals",
+ "tableTo": "company_secret_proposals",
"columnsFrom": [
"secret_proposal_id"
],
- "tableTo": "company_secret_proposals",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "cascade"
+ "onDelete": "cascade",
+ "onUpdate": "no action"
},
"company_secret_proposals_target_id_agents_id_fk": {
"name": "company_secret_proposals_target_id_agents_id_fk",
"tableFrom": "company_secret_proposals",
+ "tableTo": "agents",
"columnsFrom": [
"target_id"
],
- "tableTo": "agents",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "cascade"
+ "onDelete": "cascade",
+ "onUpdate": "no action"
},
"company_secret_proposals_proposed_by_agent_id_agents_id_fk": {
"name": "company_secret_proposals_proposed_by_agent_id_agents_id_fk",
"tableFrom": "company_secret_proposals",
+ "tableTo": "agents",
"columnsFrom": [
"proposed_by_agent_id"
],
- "tableTo": "agents",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "cascade"
+ "onDelete": "cascade",
+ "onUpdate": "no action"
},
"company_secret_proposals_origin_issue_id_issues_id_fk": {
"name": "company_secret_proposals_origin_issue_id_issues_id_fk",
"tableFrom": "company_secret_proposals",
+ "tableTo": "issues",
"columnsFrom": [
"origin_issue_id"
],
- "tableTo": "issues",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "set null"
+ "onDelete": "set null",
+ "onUpdate": "no action"
},
"company_secret_proposals_origin_run_id_heartbeat_runs_id_fk": {
"name": "company_secret_proposals_origin_run_id_heartbeat_runs_id_fk",
"tableFrom": "company_secret_proposals",
+ "tableTo": "heartbeat_runs",
"columnsFrom": [
"origin_run_id"
],
- "tableTo": "heartbeat_runs",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "cascade"
+ "onDelete": "cascade",
+ "onUpdate": "no action"
},
"company_secret_proposals_interaction_id_issue_thread_interactions_id_fk": {
"name": "company_secret_proposals_interaction_id_issue_thread_interactions_id_fk",
"tableFrom": "company_secret_proposals",
+ "tableTo": "issue_thread_interactions",
"columnsFrom": [
"interaction_id"
],
- "tableTo": "issue_thread_interactions",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "set null"
+ "onDelete": "set null",
+ "onUpdate": "no action"
},
"company_secret_proposals_created_secret_id_company_secrets_id_fk": {
"name": "company_secret_proposals_created_secret_id_company_secrets_id_fk",
"tableFrom": "company_secret_proposals",
+ "tableTo": "company_secrets",
"columnsFrom": [
"created_secret_id"
],
- "tableTo": "company_secrets",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "set null"
+ "onDelete": "set null",
+ "onUpdate": "no action"
}
},
"compositePrimaryKeys": {},
@@ -16024,9 +16128,9 @@
}
],
"isUnique": false,
- "with": {},
+ "concurrently": false,
"method": "btree",
- "concurrently": false
+ "with": {}
},
"company_secret_provider_configs_company_provider_idx": {
"name": "company_secret_provider_configs_company_provider_idx",
@@ -16045,9 +16149,9 @@
}
],
"isUnique": false,
- "with": {},
+ "concurrently": false,
"method": "btree",
- "concurrently": false
+ "with": {}
},
"company_secret_provider_configs_default_uq": {
"name": "company_secret_provider_configs_default_uq",
@@ -16066,38 +16170,38 @@
}
],
"isUnique": true,
- "with": {},
- "method": "btree",
"where": "\"company_secret_provider_configs\".\"is_default\" = true",
- "concurrently": false
+ "concurrently": false,
+ "method": "btree",
+ "with": {}
}
},
"foreignKeys": {
"company_secret_provider_configs_company_id_companies_id_fk": {
"name": "company_secret_provider_configs_company_id_companies_id_fk",
"tableFrom": "company_secret_provider_configs",
+ "tableTo": "companies",
"columnsFrom": [
"company_id"
],
- "tableTo": "companies",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "cascade"
+ "onDelete": "cascade",
+ "onUpdate": "no action"
},
"company_secret_provider_configs_created_by_agent_id_agents_id_fk": {
"name": "company_secret_provider_configs_created_by_agent_id_agents_id_fk",
"tableFrom": "company_secret_provider_configs",
+ "tableTo": "agents",
"columnsFrom": [
"created_by_agent_id"
],
- "tableTo": "agents",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "set null"
+ "onDelete": "set null",
+ "onUpdate": "no action"
}
},
"compositePrimaryKeys": {},
@@ -16210,9 +16314,9 @@
}
],
"isUnique": false,
- "with": {},
+ "concurrently": false,
"method": "btree",
- "concurrently": false
+ "with": {}
},
"company_secret_versions_value_sha256_idx": {
"name": "company_secret_versions_value_sha256_idx",
@@ -16225,9 +16329,9 @@
}
],
"isUnique": false,
- "with": {},
+ "concurrently": false,
"method": "btree",
- "concurrently": false
+ "with": {}
},
"company_secret_versions_fingerprint_idx": {
"name": "company_secret_versions_fingerprint_idx",
@@ -16240,9 +16344,9 @@
}
],
"isUnique": false,
- "with": {},
+ "concurrently": false,
"method": "btree",
- "concurrently": false
+ "with": {}
},
"company_secret_versions_secret_version_uq": {
"name": "company_secret_versions_secret_version_uq",
@@ -16261,37 +16365,37 @@
}
],
"isUnique": true,
- "with": {},
+ "concurrently": false,
"method": "btree",
- "concurrently": false
+ "with": {}
}
},
"foreignKeys": {
"company_secret_versions_secret_id_company_secrets_id_fk": {
"name": "company_secret_versions_secret_id_company_secrets_id_fk",
"tableFrom": "company_secret_versions",
+ "tableTo": "company_secrets",
"columnsFrom": [
"secret_id"
],
- "tableTo": "company_secrets",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "cascade"
+ "onDelete": "cascade",
+ "onUpdate": "no action"
},
"company_secret_versions_created_by_agent_id_agents_id_fk": {
"name": "company_secret_versions_created_by_agent_id_agents_id_fk",
"tableFrom": "company_secret_versions",
+ "tableTo": "agents",
"columnsFrom": [
"created_by_agent_id"
],
- "tableTo": "agents",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "set null"
+ "onDelete": "set null",
+ "onUpdate": "no action"
}
},
"compositePrimaryKeys": {},
@@ -16476,9 +16580,9 @@
}
],
"isUnique": false,
- "with": {},
+ "concurrently": false,
"method": "btree",
- "concurrently": false
+ "with": {}
},
"company_secrets_company_scope_idx": {
"name": "company_secrets_company_scope_idx",
@@ -16497,9 +16601,9 @@
}
],
"isUnique": false,
- "with": {},
+ "concurrently": false,
"method": "btree",
- "concurrently": false
+ "with": {}
},
"company_secrets_company_owner_idx": {
"name": "company_secrets_company_owner_idx",
@@ -16518,9 +16622,9 @@
}
],
"isUnique": false,
- "with": {},
+ "concurrently": false,
"method": "btree",
- "concurrently": false
+ "with": {}
},
"company_secrets_user_definition_owner_idx": {
"name": "company_secrets_user_definition_owner_idx",
@@ -16545,9 +16649,9 @@
}
],
"isUnique": false,
- "with": {},
+ "concurrently": false,
"method": "btree",
- "concurrently": false
+ "with": {}
},
"company_secrets_company_provider_idx": {
"name": "company_secrets_company_provider_idx",
@@ -16566,9 +16670,9 @@
}
],
"isUnique": false,
- "with": {},
+ "concurrently": false,
"method": "btree",
- "concurrently": false
+ "with": {}
},
"company_secrets_instance_owner_key_uq": {
"name": "company_secrets_instance_owner_key_uq",
@@ -16599,10 +16703,10 @@
}
],
"isUnique": true,
- "with": {},
- "method": "btree",
"where": "\"company_secrets\".\"scope\" = 'instance' and \"company_secrets\".\"deleted_at\" is null",
- "concurrently": false
+ "concurrently": false,
+ "method": "btree",
+ "with": {}
},
"company_secrets_provider_config_idx": {
"name": "company_secrets_provider_config_idx",
@@ -16615,9 +16719,9 @@
}
],
"isUnique": false,
- "with": {},
+ "concurrently": false,
"method": "btree",
- "concurrently": false
+ "with": {}
},
"company_secrets_company_name_uq": {
"name": "company_secrets_company_name_uq",
@@ -16636,10 +16740,10 @@
}
],
"isUnique": true,
- "with": {},
- "method": "btree",
"where": "\"company_secrets\".\"scope\" = 'company' and \"company_secrets\".\"deleted_at\" is null",
- "concurrently": false
+ "concurrently": false,
+ "method": "btree",
+ "with": {}
},
"company_secrets_company_key_uq": {
"name": "company_secrets_company_key_uq",
@@ -16658,10 +16762,10 @@
}
],
"isUnique": true,
- "with": {},
- "method": "btree",
"where": "\"company_secrets\".\"scope\" = 'company' and \"company_secrets\".\"deleted_at\" is null",
- "concurrently": false
+ "concurrently": false,
+ "method": "btree",
+ "with": {}
},
"company_secrets_user_definition_owner_uq": {
"name": "company_secrets_user_definition_owner_uq",
@@ -16686,92 +16790,92 @@
}
],
"isUnique": true,
- "with": {},
- "method": "btree",
"where": "\"company_secrets\".\"scope\" = 'user' and \"company_secrets\".\"deleted_at\" is null",
- "concurrently": false
+ "concurrently": false,
+ "method": "btree",
+ "with": {}
}
},
"foreignKeys": {
"company_secrets_company_id_companies_id_fk": {
"name": "company_secrets_company_id_companies_id_fk",
"tableFrom": "company_secrets",
+ "tableTo": "companies",
"columnsFrom": [
"company_id"
],
- "tableTo": "companies",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "no action"
+ "onDelete": "no action",
+ "onUpdate": "no action"
},
"company_secrets_owner_plugin_id_plugins_id_fk": {
"name": "company_secrets_owner_plugin_id_plugins_id_fk",
"tableFrom": "company_secrets",
+ "tableTo": "plugins",
"columnsFrom": [
"owner_plugin_id"
],
- "tableTo": "plugins",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "cascade"
+ "onDelete": "cascade",
+ "onUpdate": "no action"
},
"company_secrets_user_secret_definition_id_user_secret_definitions_id_fk": {
"name": "company_secrets_user_secret_definition_id_user_secret_definitions_id_fk",
"tableFrom": "company_secrets",
+ "tableTo": "user_secret_definitions",
"columnsFrom": [
"user_secret_definition_id"
],
- "tableTo": "user_secret_definitions",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "set null"
+ "onDelete": "set null",
+ "onUpdate": "no action"
},
"company_secrets_provider_config_id_company_secret_provider_configs_id_fk": {
"name": "company_secrets_provider_config_id_company_secret_provider_configs_id_fk",
"tableFrom": "company_secrets",
+ "tableTo": "company_secret_provider_configs",
"columnsFrom": [
"provider_config_id"
],
- "tableTo": "company_secret_provider_configs",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "set null"
+ "onDelete": "set null",
+ "onUpdate": "no action"
},
"company_secrets_created_by_agent_id_agents_id_fk": {
"name": "company_secrets_created_by_agent_id_agents_id_fk",
"tableFrom": "company_secrets",
+ "tableTo": "agents",
"columnsFrom": [
"created_by_agent_id"
],
- "tableTo": "agents",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "set null"
+ "onDelete": "set null",
+ "onUpdate": "no action"
},
"company_secrets_company_id_owner_agent_id_agents_company_id_id_fk": {
"name": "company_secrets_company_id_owner_agent_id_agents_company_id_id_fk",
"tableFrom": "company_secrets",
+ "tableTo": "agents",
"columnsFrom": [
"company_id",
"owner_agent_id"
],
- "tableTo": "agents",
"columnsTo": [
"company_id",
"id"
],
- "onUpdate": "no action",
- "onDelete": "cascade"
+ "onDelete": "cascade",
+ "onUpdate": "no action"
}
},
"compositePrimaryKeys": {},
@@ -16841,15 +16945,15 @@
"company_skill_policies_company_id_companies_id_fk": {
"name": "company_skill_policies_company_id_companies_id_fk",
"tableFrom": "company_skill_policies",
+ "tableTo": "companies",
"columnsFrom": [
"company_id"
],
- "tableTo": "companies",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "cascade"
+ "onDelete": "cascade",
+ "onUpdate": "no action"
}
},
"compositePrimaryKeys": {},
@@ -16888,15 +16992,15 @@
"company_skill_import_budgets_company_id_companies_id_fk": {
"name": "company_skill_import_budgets_company_id_companies_id_fk",
"tableFrom": "company_skill_import_budgets",
+ "tableTo": "companies",
"columnsFrom": [
"company_id"
],
- "tableTo": "companies",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "cascade"
+ "onDelete": "cascade",
+ "onUpdate": "no action"
}
},
"compositePrimaryKeys": {},
@@ -16997,9 +17101,9 @@
}
],
"isUnique": true,
- "with": {},
+ "concurrently": false,
"method": "btree",
- "concurrently": false
+ "with": {}
},
"company_skill_source_entries_company_skill_idx": {
"name": "company_skill_source_entries_company_skill_idx",
@@ -17018,50 +17122,50 @@
}
],
"isUnique": false,
- "with": {},
+ "concurrently": false,
"method": "btree",
- "concurrently": false
+ "with": {}
}
},
"foreignKeys": {
"company_skill_source_entries_company_id_companies_id_fk": {
"name": "company_skill_source_entries_company_id_companies_id_fk",
"tableFrom": "company_skill_source_entries",
+ "tableTo": "companies",
"columnsFrom": [
"company_id"
],
- "tableTo": "companies",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "cascade"
+ "onDelete": "cascade",
+ "onUpdate": "no action"
},
"company_skill_source_entries_source_id_company_skill_sources_id_fk": {
"name": "company_skill_source_entries_source_id_company_skill_sources_id_fk",
"tableFrom": "company_skill_source_entries",
+ "tableTo": "company_skill_sources",
"columnsFrom": [
"source_id"
],
- "tableTo": "company_skill_sources",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "cascade"
+ "onDelete": "cascade",
+ "onUpdate": "no action"
},
"company_skill_source_entries_skill_id_company_skills_id_fk": {
"name": "company_skill_source_entries_skill_id_company_skills_id_fk",
"tableFrom": "company_skill_source_entries",
+ "tableTo": "company_skills",
"columnsFrom": [
"skill_id"
],
- "tableTo": "company_skills",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "set null"
+ "onDelete": "set null",
+ "onUpdate": "no action"
}
},
"compositePrimaryKeys": {},
@@ -17305,10 +17409,10 @@
}
],
"isUnique": true,
- "with": {},
- "method": "btree",
"where": "\"company_skill_sources\".\"removed_at\" is null",
- "concurrently": false
+ "concurrently": false,
+ "method": "btree",
+ "with": {}
},
"company_skill_sources_identity_ref_idx": {
"name": "company_skill_sources_identity_ref_idx",
@@ -17333,25 +17437,25 @@
}
],
"isUnique": true,
- "with": {},
- "method": "btree",
"where": "\"company_skill_sources\".\"removed_at\" is null",
- "concurrently": false
+ "concurrently": false,
+ "method": "btree",
+ "with": {}
}
},
"foreignKeys": {
"company_skill_sources_company_id_companies_id_fk": {
"name": "company_skill_sources_company_id_companies_id_fk",
"tableFrom": "company_skill_sources",
+ "tableTo": "companies",
"columnsFrom": [
"company_id"
],
- "tableTo": "companies",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "cascade"
+ "onDelete": "cascade",
+ "onUpdate": "no action"
}
},
"compositePrimaryKeys": {},
@@ -17516,9 +17620,9 @@
}
],
"isUnique": true,
- "with": {},
+ "concurrently": false,
"method": "btree",
- "concurrently": false
+ "with": {}
},
"project_skill_sources_source_project_idx": {
"name": "project_skill_sources_source_project_idx",
@@ -17543,9 +17647,9 @@
}
],
"isUnique": false,
- "with": {},
+ "concurrently": false,
"method": "btree",
- "concurrently": false
+ "with": {}
},
"project_skill_sources_sync_idx": {
"name": "project_skill_sources_sync_idx",
@@ -17570,63 +17674,63 @@
}
],
"isUnique": false,
- "with": {},
+ "concurrently": false,
"method": "btree",
- "concurrently": false
+ "with": {}
}
},
"foreignKeys": {
"project_skill_sources_company_id_companies_id_fk": {
"name": "project_skill_sources_company_id_companies_id_fk",
"tableFrom": "project_skill_sources",
+ "tableTo": "companies",
"columnsFrom": [
"company_id"
],
- "tableTo": "companies",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "cascade"
+ "onDelete": "cascade",
+ "onUpdate": "no action"
},
"project_skill_sources_project_id_projects_id_fk": {
"name": "project_skill_sources_project_id_projects_id_fk",
"tableFrom": "project_skill_sources",
+ "tableTo": "projects",
"columnsFrom": [
"project_id"
],
- "tableTo": "projects",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "cascade"
+ "onDelete": "cascade",
+ "onUpdate": "no action"
},
"project_skill_sources_workspace_id_project_workspaces_id_fk": {
"name": "project_skill_sources_workspace_id_project_workspaces_id_fk",
"tableFrom": "project_skill_sources",
+ "tableTo": "project_workspaces",
"columnsFrom": [
"workspace_id"
],
- "tableTo": "project_workspaces",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "set null"
+ "onDelete": "set null",
+ "onUpdate": "no action"
},
"project_skill_sources_source_id_company_skill_sources_id_fk": {
"name": "project_skill_sources_source_id_company_skill_sources_id_fk",
"tableFrom": "project_skill_sources",
+ "tableTo": "company_skill_sources",
"columnsFrom": [
"source_id"
],
- "tableTo": "company_skill_sources",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "set null"
+ "onDelete": "set null",
+ "onUpdate": "no action"
}
},
"compositePrimaryKeys": {},
@@ -17727,9 +17831,9 @@
}
],
"isUnique": false,
- "with": {},
+ "concurrently": false,
"method": "btree",
- "concurrently": false
+ "with": {}
},
"company_skill_comments_parent_idx": {
"name": "company_skill_comments_parent_idx",
@@ -17742,63 +17846,63 @@
}
],
"isUnique": false,
- "with": {},
+ "concurrently": false,
"method": "btree",
- "concurrently": false
+ "with": {}
}
},
"foreignKeys": {
"company_skill_comments_company_id_companies_id_fk": {
"name": "company_skill_comments_company_id_companies_id_fk",
"tableFrom": "company_skill_comments",
+ "tableTo": "companies",
"columnsFrom": [
"company_id"
],
- "tableTo": "companies",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "cascade"
+ "onDelete": "cascade",
+ "onUpdate": "no action"
},
"company_skill_comments_company_skill_id_company_skills_id_fk": {
"name": "company_skill_comments_company_skill_id_company_skills_id_fk",
"tableFrom": "company_skill_comments",
+ "tableTo": "company_skills",
"columnsFrom": [
"company_skill_id"
],
- "tableTo": "company_skills",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "cascade"
+ "onDelete": "cascade",
+ "onUpdate": "no action"
},
"company_skill_comments_parent_comment_id_company_skill_comments_id_fk": {
"name": "company_skill_comments_parent_comment_id_company_skill_comments_id_fk",
"tableFrom": "company_skill_comments",
+ "tableTo": "company_skill_comments",
"columnsFrom": [
"parent_comment_id"
],
- "tableTo": "company_skill_comments",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "set null"
+ "onDelete": "set null",
+ "onUpdate": "no action"
},
"company_skill_comments_author_agent_id_agents_id_fk": {
"name": "company_skill_comments_author_agent_id_agents_id_fk",
"tableFrom": "company_skill_comments",
+ "tableTo": "agents",
"columnsFrom": [
"author_agent_id"
],
- "tableTo": "agents",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "set null"
+ "onDelete": "set null",
+ "onUpdate": "no action"
}
},
"compositePrimaryKeys": {},
@@ -17862,24 +17966,24 @@
}
],
"isUnique": true,
- "with": {},
+ "concurrently": false,
"method": "btree",
- "concurrently": false
+ "with": {}
}
},
"foreignKeys": {
"company_skill_repository_snapshots_company_id_companies_id_fk": {
"name": "company_skill_repository_snapshots_company_id_companies_id_fk",
"tableFrom": "company_skill_repository_snapshots",
+ "tableTo": "companies",
"columnsFrom": [
"company_id"
],
- "tableTo": "companies",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "cascade"
+ "onDelete": "cascade",
+ "onUpdate": "no action"
}
},
"compositePrimaryKeys": {},
@@ -17949,9 +18053,9 @@
}
],
"isUnique": true,
- "with": {},
+ "concurrently": false,
"method": "btree",
- "concurrently": false
+ "with": {}
},
"company_skill_stars_skill_user_idx": {
"name": "company_skill_stars_skill_user_idx",
@@ -17970,9 +18074,9 @@
}
],
"isUnique": true,
- "with": {},
+ "concurrently": false,
"method": "btree",
- "concurrently": false
+ "with": {}
},
"company_skill_stars_company_skill_created_idx": {
"name": "company_skill_stars_company_skill_created_idx",
@@ -17997,50 +18101,50 @@
}
],
"isUnique": false,
- "with": {},
+ "concurrently": false,
"method": "btree",
- "concurrently": false
+ "with": {}
}
},
"foreignKeys": {
"company_skill_stars_company_id_companies_id_fk": {
"name": "company_skill_stars_company_id_companies_id_fk",
"tableFrom": "company_skill_stars",
+ "tableTo": "companies",
"columnsFrom": [
"company_id"
],
- "tableTo": "companies",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "cascade"
+ "onDelete": "cascade",
+ "onUpdate": "no action"
},
"company_skill_stars_company_skill_id_company_skills_id_fk": {
"name": "company_skill_stars_company_skill_id_company_skills_id_fk",
"tableFrom": "company_skill_stars",
+ "tableTo": "company_skills",
"columnsFrom": [
"company_skill_id"
],
- "tableTo": "company_skills",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "cascade"
+ "onDelete": "cascade",
+ "onUpdate": "no action"
},
"company_skill_stars_agent_id_agents_id_fk": {
"name": "company_skill_stars_agent_id_agents_id_fk",
"tableFrom": "company_skill_stars",
+ "tableTo": "agents",
"columnsFrom": [
"agent_id"
],
- "tableTo": "agents",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "cascade"
+ "onDelete": "cascade",
+ "onUpdate": "no action"
}
},
"compositePrimaryKeys": {},
@@ -18135,9 +18239,9 @@
}
],
"isUnique": false,
- "with": {},
+ "concurrently": false,
"method": "btree",
- "concurrently": false
+ "with": {}
},
"company_skill_test_inputs_company_skill_active_idx": {
"name": "company_skill_test_inputs_company_skill_active_idx",
@@ -18162,37 +18266,37 @@
}
],
"isUnique": false,
- "with": {},
+ "concurrently": false,
"method": "btree",
- "concurrently": false
+ "with": {}
}
},
"foreignKeys": {
"company_skill_test_inputs_company_id_companies_id_fk": {
"name": "company_skill_test_inputs_company_id_companies_id_fk",
"tableFrom": "company_skill_test_inputs",
+ "tableTo": "companies",
"columnsFrom": [
"company_id"
],
- "tableTo": "companies",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "cascade"
+ "onDelete": "cascade",
+ "onUpdate": "no action"
},
"company_skill_test_inputs_skill_id_company_skills_id_fk": {
"name": "company_skill_test_inputs_skill_id_company_skills_id_fk",
"tableFrom": "company_skill_test_inputs",
+ "tableTo": "company_skills",
"columnsFrom": [
"skill_id"
],
- "tableTo": "company_skills",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "cascade"
+ "onDelete": "cascade",
+ "onUpdate": "no action"
}
},
"compositePrimaryKeys": {},
@@ -18305,50 +18409,50 @@
}
],
"isUnique": false,
- "with": {},
+ "concurrently": false,
"method": "btree",
- "concurrently": false
+ "with": {}
}
},
"foreignKeys": {
"company_skill_test_run_templates_company_id_companies_id_fk": {
"name": "company_skill_test_run_templates_company_id_companies_id_fk",
"tableFrom": "company_skill_test_run_templates",
+ "tableTo": "companies",
"columnsFrom": [
"company_id"
],
- "tableTo": "companies",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "cascade"
+ "onDelete": "cascade",
+ "onUpdate": "no action"
},
"company_skill_test_run_templates_created_by_agent_id_agents_id_fk": {
"name": "company_skill_test_run_templates_created_by_agent_id_agents_id_fk",
"tableFrom": "company_skill_test_run_templates",
+ "tableTo": "agents",
"columnsFrom": [
"created_by_agent_id"
],
- "tableTo": "agents",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "set null"
+ "onDelete": "set null",
+ "onUpdate": "no action"
},
"company_skill_test_run_templates_updated_by_agent_id_agents_id_fk": {
"name": "company_skill_test_run_templates_updated_by_agent_id_agents_id_fk",
"tableFrom": "company_skill_test_run_templates",
+ "tableTo": "agents",
"columnsFrom": [
"updated_by_agent_id"
],
- "tableTo": "agents",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "set null"
+ "onDelete": "set null",
+ "onUpdate": "no action"
}
},
"compositePrimaryKeys": {},
@@ -18538,9 +18642,9 @@
}
],
"isUnique": false,
- "with": {},
+ "concurrently": false,
"method": "btree",
- "concurrently": false
+ "with": {}
},
"company_skill_test_runs_company_issue_idx": {
"name": "company_skill_test_runs_company_issue_idx",
@@ -18559,9 +18663,9 @@
}
],
"isUnique": true,
- "with": {},
+ "concurrently": false,
"method": "btree",
- "concurrently": false
+ "with": {}
},
"company_skill_test_runs_company_input_created_idx": {
"name": "company_skill_test_runs_company_input_created_idx",
@@ -18586,9 +18690,9 @@
}
],
"isUnique": false,
- "with": {},
+ "concurrently": false,
"method": "btree",
- "concurrently": false
+ "with": {}
},
"company_skill_test_runs_company_status_idx": {
"name": "company_skill_test_runs_company_status_idx",
@@ -18607,9 +18711,9 @@
}
],
"isUnique": false,
- "with": {},
+ "concurrently": false,
"method": "btree",
- "concurrently": false
+ "with": {}
},
"company_skill_test_runs_company_harness_expires_idx": {
"name": "company_skill_test_runs_company_harness_expires_idx",
@@ -18628,89 +18732,89 @@
}
],
"isUnique": false,
- "with": {},
+ "concurrently": false,
"method": "btree",
- "concurrently": false
+ "with": {}
}
},
"foreignKeys": {
"company_skill_test_runs_company_id_companies_id_fk": {
"name": "company_skill_test_runs_company_id_companies_id_fk",
"tableFrom": "company_skill_test_runs",
+ "tableTo": "companies",
"columnsFrom": [
"company_id"
],
- "tableTo": "companies",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "cascade"
+ "onDelete": "cascade",
+ "onUpdate": "no action"
},
"company_skill_test_runs_skill_id_company_skills_id_fk": {
"name": "company_skill_test_runs_skill_id_company_skills_id_fk",
"tableFrom": "company_skill_test_runs",
+ "tableTo": "company_skills",
"columnsFrom": [
"skill_id"
],
- "tableTo": "company_skills",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "cascade"
+ "onDelete": "cascade",
+ "onUpdate": "no action"
},
"company_skill_test_runs_input_id_company_skill_test_inputs_id_fk": {
"name": "company_skill_test_runs_input_id_company_skill_test_inputs_id_fk",
"tableFrom": "company_skill_test_runs",
+ "tableTo": "company_skill_test_inputs",
"columnsFrom": [
"input_id"
],
- "tableTo": "company_skill_test_inputs",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "set null"
+ "onDelete": "set null",
+ "onUpdate": "no action"
},
"company_skill_test_runs_skill_version_id_company_skill_versions_id_fk": {
"name": "company_skill_test_runs_skill_version_id_company_skill_versions_id_fk",
"tableFrom": "company_skill_test_runs",
+ "tableTo": "company_skill_versions",
"columnsFrom": [
"skill_version_id"
],
- "tableTo": "company_skill_versions",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "restrict"
+ "onDelete": "restrict",
+ "onUpdate": "no action"
},
"company_skill_test_runs_agent_id_agents_id_fk": {
"name": "company_skill_test_runs_agent_id_agents_id_fk",
"tableFrom": "company_skill_test_runs",
+ "tableTo": "agents",
"columnsFrom": [
"agent_id"
],
- "tableTo": "agents",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "restrict"
+ "onDelete": "restrict",
+ "onUpdate": "no action"
},
"company_skill_test_runs_issue_id_issues_id_fk": {
"name": "company_skill_test_runs_issue_id_issues_id_fk",
"tableFrom": "company_skill_test_runs",
+ "tableTo": "issues",
"columnsFrom": [
"issue_id"
],
- "tableTo": "issues",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "restrict"
+ "onDelete": "restrict",
+ "onUpdate": "no action"
}
},
"compositePrimaryKeys": {},
@@ -18829,9 +18933,9 @@
}
],
"isUnique": true,
- "with": {},
+ "concurrently": false,
"method": "btree",
- "concurrently": false
+ "with": {}
},
"company_skill_versions_skill_release_idx": {
"name": "company_skill_versions_skill_release_idx",
@@ -18850,10 +18954,10 @@
}
],
"isUnique": true,
- "with": {},
- "method": "btree",
"where": "\"company_skill_versions\".\"release_id\" is not null",
- "concurrently": false
+ "concurrently": false,
+ "method": "btree",
+ "with": {}
},
"company_skill_versions_company_skill_created_idx": {
"name": "company_skill_versions_company_skill_created_idx",
@@ -18878,63 +18982,63 @@
}
],
"isUnique": false,
- "with": {},
+ "concurrently": false,
"method": "btree",
- "concurrently": false
+ "with": {}
}
},
"foreignKeys": {
"company_skill_versions_company_id_companies_id_fk": {
"name": "company_skill_versions_company_id_companies_id_fk",
"tableFrom": "company_skill_versions",
+ "tableTo": "companies",
"columnsFrom": [
"company_id"
],
- "tableTo": "companies",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "cascade"
+ "onDelete": "cascade",
+ "onUpdate": "no action"
},
"company_skill_versions_company_skill_id_company_skills_id_fk": {
"name": "company_skill_versions_company_skill_id_company_skills_id_fk",
"tableFrom": "company_skill_versions",
+ "tableTo": "company_skills",
"columnsFrom": [
"company_skill_id"
],
- "tableTo": "company_skills",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "cascade"
+ "onDelete": "cascade",
+ "onUpdate": "no action"
},
"company_skill_versions_repository_snapshot_id_company_skill_repository_snapshots_id_fk": {
"name": "company_skill_versions_repository_snapshot_id_company_skill_repository_snapshots_id_fk",
"tableFrom": "company_skill_versions",
+ "tableTo": "company_skill_repository_snapshots",
"columnsFrom": [
"repository_snapshot_id"
],
- "tableTo": "company_skill_repository_snapshots",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "restrict"
+ "onDelete": "restrict",
+ "onUpdate": "no action"
},
"company_skill_versions_author_agent_id_agents_id_fk": {
"name": "company_skill_versions_author_agent_id_agents_id_fk",
"tableFrom": "company_skill_versions",
+ "tableTo": "agents",
"columnsFrom": [
"author_agent_id"
],
- "tableTo": "agents",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "set null"
+ "onDelete": "set null",
+ "onUpdate": "no action"
}
},
"compositePrimaryKeys": {},
@@ -19170,9 +19274,9 @@
}
],
"isUnique": true,
- "with": {},
+ "concurrently": false,
"method": "btree",
- "concurrently": false
+ "with": {}
},
"company_skills_company_name_idx": {
"name": "company_skills_company_name_idx",
@@ -19191,9 +19295,9 @@
}
],
"isUnique": false,
- "with": {},
+ "concurrently": false,
"method": "btree",
- "concurrently": false
+ "with": {}
},
"company_skills_company_folder_idx": {
"name": "company_skills_company_folder_idx",
@@ -19212,9 +19316,9 @@
}
],
"isUnique": false,
- "with": {},
+ "concurrently": false,
"method": "btree",
- "concurrently": false
+ "with": {}
},
"company_skills_company_categories_idx": {
"name": "company_skills_company_categories_idx",
@@ -19227,9 +19331,9 @@
}
],
"isUnique": false,
- "with": {},
+ "concurrently": false,
"method": "gin",
- "concurrently": false
+ "with": {}
},
"company_skills_company_sharing_scope_idx": {
"name": "company_skills_company_sharing_scope_idx",
@@ -19248,9 +19352,9 @@
}
],
"isUnique": false,
- "with": {},
+ "concurrently": false,
"method": "btree",
- "concurrently": false
+ "with": {}
},
"company_skills_company_current_version_idx": {
"name": "company_skills_company_current_version_idx",
@@ -19269,9 +19373,9 @@
}
],
"isUnique": false,
- "with": {},
+ "concurrently": false,
"method": "btree",
- "concurrently": false
+ "with": {}
},
"company_skills_company_forked_from_idx": {
"name": "company_skills_company_forked_from_idx",
@@ -19290,76 +19394,76 @@
}
],
"isUnique": false,
- "with": {},
+ "concurrently": false,
"method": "btree",
- "concurrently": false
+ "with": {}
}
},
"foreignKeys": {
"company_skills_company_id_companies_id_fk": {
"name": "company_skills_company_id_companies_id_fk",
"tableFrom": "company_skills",
+ "tableTo": "companies",
"columnsFrom": [
"company_id"
],
- "tableTo": "companies",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "no action"
+ "onDelete": "no action",
+ "onUpdate": "no action"
},
"company_skills_folder_id_folders_id_fk": {
"name": "company_skills_folder_id_folders_id_fk",
"tableFrom": "company_skills",
+ "tableTo": "folders",
"columnsFrom": [
"folder_id"
],
- "tableTo": "folders",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "set null"
+ "onDelete": "set null",
+ "onUpdate": "no action"
},
"company_skills_forked_from_skill_id_company_skills_id_fk": {
"name": "company_skills_forked_from_skill_id_company_skills_id_fk",
"tableFrom": "company_skills",
+ "tableTo": "company_skills",
"columnsFrom": [
"forked_from_skill_id"
],
- "tableTo": "company_skills",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "set null"
+ "onDelete": "set null",
+ "onUpdate": "no action"
},
"company_skills_forked_from_company_id_companies_id_fk": {
"name": "company_skills_forked_from_company_id_companies_id_fk",
"tableFrom": "company_skills",
+ "tableTo": "companies",
"columnsFrom": [
"forked_from_company_id"
],
- "tableTo": "companies",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "set null"
+ "onDelete": "set null",
+ "onUpdate": "no action"
},
"company_skills_current_version_id_company_skill_versions_id_fk": {
"name": "company_skills_current_version_id_company_skill_versions_id_fk",
"tableFrom": "company_skills",
+ "tableTo": "company_skill_versions",
"columnsFrom": [
"current_version_id"
],
- "tableTo": "company_skill_versions",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "set null"
+ "onDelete": "set null",
+ "onUpdate": "no action"
}
},
"compositePrimaryKeys": {},
@@ -19494,9 +19598,9 @@
}
],
"isUnique": false,
- "with": {},
+ "concurrently": false,
"method": "btree",
- "concurrently": false
+ "with": {}
},
"company_transfer_runs_idempotency_direction_idx": {
"name": "company_transfer_runs_idempotency_direction_idx",
@@ -19515,9 +19619,9 @@
}
],
"isUnique": false,
- "with": {},
+ "concurrently": false,
"method": "btree",
- "concurrently": false
+ "with": {}
},
"company_transfer_runs_actor_status_idx": {
"name": "company_transfer_runs_actor_status_idx",
@@ -19536,24 +19640,24 @@
}
],
"isUnique": false,
- "with": {},
+ "concurrently": false,
"method": "btree",
- "concurrently": false
+ "with": {}
}
},
"foreignKeys": {
"company_transfer_runs_company_id_companies_id_fk": {
"name": "company_transfer_runs_company_id_companies_id_fk",
"tableFrom": "company_transfer_runs",
+ "tableTo": "companies",
"columnsFrom": [
"company_id"
],
- "tableTo": "companies",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "set null"
+ "onDelete": "set null",
+ "onUpdate": "no action"
}
},
"compositePrimaryKeys": {},
@@ -19619,9 +19723,9 @@
}
],
"isUnique": false,
- "with": {},
+ "concurrently": false,
"method": "btree",
- "concurrently": false
+ "with": {}
},
"company_user_sidebar_preferences_user_idx": {
"name": "company_user_sidebar_preferences_user_idx",
@@ -19634,9 +19738,9 @@
}
],
"isUnique": false,
- "with": {},
+ "concurrently": false,
"method": "btree",
- "concurrently": false
+ "with": {}
},
"company_user_sidebar_preferences_company_user_uq": {
"name": "company_user_sidebar_preferences_company_user_uq",
@@ -19655,24 +19759,24 @@
}
],
"isUnique": true,
- "with": {},
+ "concurrently": false,
"method": "btree",
- "concurrently": false
+ "with": {}
}
},
"foreignKeys": {
"company_user_sidebar_preferences_company_id_companies_id_fk": {
"name": "company_user_sidebar_preferences_company_id_companies_id_fk",
"tableFrom": "company_user_sidebar_preferences",
+ "tableTo": "companies",
"columnsFrom": [
"company_id"
],
- "tableTo": "companies",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "cascade"
+ "onDelete": "cascade",
+ "onUpdate": "no action"
}
},
"compositePrimaryKeys": {},
@@ -19796,9 +19900,9 @@
}
],
"isUnique": true,
- "with": {},
+ "concurrently": false,
"method": "btree",
- "concurrently": false
+ "with": {}
},
"completion_contracts_issue_hash_uq": {
"name": "completion_contracts_issue_hash_uq",
@@ -19817,68 +19921,68 @@
}
],
"isUnique": true,
- "with": {},
+ "concurrently": false,
"method": "btree",
- "concurrently": false
+ "with": {}
}
},
"foreignKeys": {
"completion_contracts_company_id_companies_id_fk": {
"name": "completion_contracts_company_id_companies_id_fk",
"tableFrom": "completion_contracts",
+ "tableTo": "companies",
"columnsFrom": [
"company_id"
],
- "tableTo": "companies",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "no action"
+ "onDelete": "no action",
+ "onUpdate": "no action"
},
"completion_contracts_issue_company_fk": {
"name": "completion_contracts_issue_company_fk",
"tableFrom": "completion_contracts",
+ "tableTo": "issues",
"columnsFrom": [
"company_id",
"issue_id"
],
- "tableTo": "issues",
"columnsTo": [
"company_id",
"id"
],
- "onUpdate": "no action",
- "onDelete": "no action"
+ "onDelete": "no action",
+ "onUpdate": "no action"
},
"completion_contracts_supersedes_owner_fk": {
"name": "completion_contracts_supersedes_owner_fk",
"tableFrom": "completion_contracts",
+ "tableTo": "completion_contracts",
"columnsFrom": [
"company_id",
"issue_id",
"supersedes_contract_id"
],
- "tableTo": "completion_contracts",
"columnsTo": [
"company_id",
"issue_id",
"id"
],
- "onUpdate": "no action",
- "onDelete": "no action"
+ "onDelete": "no action",
+ "onUpdate": "no action"
}
},
"compositePrimaryKeys": {},
"uniqueConstraints": {
"completion_contracts_company_issue_id_uq": {
"name": "completion_contracts_company_issue_id_uq",
+ "nullsNotDistinct": false,
"columns": [
"company_id",
"issue_id",
"id"
- ],
- "nullsNotDistinct": false
+ ]
}
},
"policies": {},
@@ -20016,9 +20120,9 @@
}
],
"isUnique": true,
- "with": {},
+ "concurrently": false,
"method": "btree",
- "concurrently": false
+ "with": {}
},
"connection_event_deliveries_company_status_idx": {
"name": "connection_event_deliveries_company_status_idx",
@@ -20043,24 +20147,24 @@
}
],
"isUnique": false,
- "with": {},
+ "concurrently": false,
"method": "btree",
- "concurrently": false
+ "with": {}
}
},
"foreignKeys": {
"connection_event_deliveries_company_id_companies_id_fk": {
"name": "connection_event_deliveries_company_id_companies_id_fk",
"tableFrom": "connection_event_deliveries",
+ "tableTo": "companies",
"columnsFrom": [
"company_id"
],
- "tableTo": "companies",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "cascade"
+ "onDelete": "cascade",
+ "onUpdate": "no action"
}
},
"compositePrimaryKeys": {},
@@ -20124,37 +20228,37 @@
}
],
"isUnique": false,
- "with": {},
+ "concurrently": false,
"method": "btree",
- "concurrently": false
+ "with": {}
}
},
"foreignKeys": {
"connection_intent_deliveries_interaction_id_issue_thread_interactions_id_fk": {
"name": "connection_intent_deliveries_interaction_id_issue_thread_interactions_id_fk",
"tableFrom": "connection_intent_deliveries",
+ "tableTo": "issue_thread_interactions",
"columnsFrom": [
"interaction_id"
],
- "tableTo": "issue_thread_interactions",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "cascade"
+ "onDelete": "cascade",
+ "onUpdate": "no action"
},
"connection_intent_deliveries_company_id_companies_id_fk": {
"name": "connection_intent_deliveries_company_id_companies_id_fk",
"tableFrom": "connection_intent_deliveries",
+ "tableTo": "companies",
"columnsFrom": [
"company_id"
],
- "tableTo": "companies",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "cascade"
+ "onDelete": "cascade",
+ "onUpdate": "no action"
}
},
"compositePrimaryKeys": {},
@@ -20357,9 +20461,9 @@
}
],
"isUnique": true,
- "with": {},
+ "concurrently": false,
"method": "btree",
- "concurrently": false
+ "with": {}
},
"cost_events_provider_request_idx": {
"name": "cost_events_provider_request_idx",
@@ -20384,9 +20488,9 @@
}
],
"isUnique": false,
- "with": {},
+ "concurrently": false,
"method": "btree",
- "concurrently": false
+ "with": {}
},
"cost_events_company_project_occurred_idx": {
"name": "cost_events_company_project_occurred_idx",
@@ -20411,9 +20515,9 @@
}
],
"isUnique": false,
- "with": {},
+ "concurrently": false,
"method": "btree",
- "concurrently": false
+ "with": {}
},
"cost_events_unpriced_idx": {
"name": "cost_events_unpriced_idx",
@@ -20438,10 +20542,10 @@
}
],
"isUnique": false,
- "with": {},
- "method": "btree",
"where": "\"cost_events\".\"cost_status\" = 'unpriced' and \"cost_events\".\"billing_type\" <> 'subscription_included'",
- "concurrently": false
+ "concurrently": false,
+ "method": "btree",
+ "with": {}
},
"cost_events_data_quality_idx": {
"name": "cost_events_data_quality_idx",
@@ -20466,10 +20570,10 @@
}
],
"isUnique": false,
- "with": {},
- "method": "btree",
"where": "\"cost_events\".\"billing_type\" = 'unknown' or (\"cost_events\".\"cost_status\" = 'unpriced' and \"cost_events\".\"billing_type\" <> 'subscription_included')",
- "concurrently": false
+ "concurrently": false,
+ "method": "btree",
+ "with": {}
},
"cost_events_company_occurred_idx": {
"name": "cost_events_company_occurred_idx",
@@ -20488,9 +20592,9 @@
}
],
"isUnique": false,
- "with": {},
+ "concurrently": false,
"method": "btree",
- "concurrently": false
+ "with": {}
},
"cost_events_company_subscription_occurred_idx": {
"name": "cost_events_company_subscription_occurred_idx",
@@ -20515,9 +20619,9 @@
}
],
"isUnique": false,
- "with": {},
+ "concurrently": false,
"method": "btree",
- "concurrently": false
+ "with": {}
},
"cost_events_company_agent_occurred_idx": {
"name": "cost_events_company_agent_occurred_idx",
@@ -20542,9 +20646,9 @@
}
],
"isUnique": false,
- "with": {},
+ "concurrently": false,
"method": "btree",
- "concurrently": false
+ "with": {}
},
"cost_events_company_provider_occurred_idx": {
"name": "cost_events_company_provider_occurred_idx",
@@ -20569,9 +20673,9 @@
}
],
"isUnique": false,
- "with": {},
+ "concurrently": false,
"method": "btree",
- "concurrently": false
+ "with": {}
},
"cost_events_company_biller_occurred_idx": {
"name": "cost_events_company_biller_occurred_idx",
@@ -20596,9 +20700,9 @@
}
],
"isUnique": false,
- "with": {},
+ "concurrently": false,
"method": "btree",
- "concurrently": false
+ "with": {}
},
"cost_events_company_heartbeat_run_idx": {
"name": "cost_events_company_heartbeat_run_idx",
@@ -20617,102 +20721,102 @@
}
],
"isUnique": false,
- "with": {},
+ "concurrently": false,
"method": "btree",
- "concurrently": false
+ "with": {}
}
},
"foreignKeys": {
"cost_events_company_id_companies_id_fk": {
"name": "cost_events_company_id_companies_id_fk",
"tableFrom": "cost_events",
+ "tableTo": "companies",
"columnsFrom": [
"company_id"
],
- "tableTo": "companies",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "no action"
+ "onDelete": "no action",
+ "onUpdate": "no action"
},
"cost_events_agent_id_agents_id_fk": {
"name": "cost_events_agent_id_agents_id_fk",
"tableFrom": "cost_events",
+ "tableTo": "agents",
"columnsFrom": [
"agent_id"
],
- "tableTo": "agents",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "no action"
+ "onDelete": "no action",
+ "onUpdate": "no action"
},
"cost_events_issue_id_issues_id_fk": {
"name": "cost_events_issue_id_issues_id_fk",
"tableFrom": "cost_events",
+ "tableTo": "issues",
"columnsFrom": [
"issue_id"
],
- "tableTo": "issues",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "set null"
+ "onDelete": "set null",
+ "onUpdate": "no action"
},
"cost_events_project_id_projects_id_fk": {
"name": "cost_events_project_id_projects_id_fk",
"tableFrom": "cost_events",
+ "tableTo": "projects",
"columnsFrom": [
"project_id"
],
- "tableTo": "projects",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "no action"
+ "onDelete": "no action",
+ "onUpdate": "no action"
},
"cost_events_goal_id_goals_id_fk": {
"name": "cost_events_goal_id_goals_id_fk",
"tableFrom": "cost_events",
+ "tableTo": "goals",
"columnsFrom": [
"goal_id"
],
- "tableTo": "goals",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "no action"
+ "onDelete": "no action",
+ "onUpdate": "no action"
},
"cost_events_heartbeat_run_id_heartbeat_runs_id_fk": {
"name": "cost_events_heartbeat_run_id_heartbeat_runs_id_fk",
"tableFrom": "cost_events",
+ "tableTo": "heartbeat_runs",
"columnsFrom": [
"heartbeat_run_id"
],
- "tableTo": "heartbeat_runs",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "no action"
+ "onDelete": "no action",
+ "onUpdate": "no action"
},
"cost_events_subscription_id_ai_subscriptions_id_fk": {
"name": "cost_events_subscription_id_ai_subscriptions_id_fk",
"tableFrom": "cost_events",
+ "tableTo": "ai_subscriptions",
"columnsFrom": [
"subscription_id"
],
- "tableTo": "ai_subscriptions",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "no action"
+ "onDelete": "no action",
+ "onUpdate": "no action"
}
},
"compositePrimaryKeys": {},
@@ -20791,15 +20895,15 @@
"company_decision_models_company_id_companies_id_fk": {
"name": "company_decision_models_company_id_companies_id_fk",
"tableFrom": "company_decision_models",
+ "tableTo": "companies",
"columnsFrom": [
"company_id"
],
- "tableTo": "companies",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "cascade"
+ "onDelete": "cascade",
+ "onUpdate": "no action"
}
},
"compositePrimaryKeys": {},
@@ -20995,9 +21099,9 @@
}
],
"isUnique": false,
- "with": {},
+ "concurrently": false,
"method": "btree",
- "concurrently": false
+ "with": {}
},
"decision_invocations_pending_idx": {
"name": "decision_invocations_pending_idx",
@@ -21010,10 +21114,10 @@
}
],
"isUnique": false,
- "with": {},
- "method": "btree",
"where": "\"decision_invocations\".\"status\" = 'running'",
- "concurrently": false
+ "concurrently": false,
+ "method": "btree",
+ "with": {}
},
"decision_invocations_cost_idx": {
"name": "decision_invocations_cost_idx",
@@ -21026,37 +21130,37 @@
}
],
"isUnique": false,
- "with": {},
+ "concurrently": false,
"method": "btree",
- "concurrently": false
+ "with": {}
}
},
"foreignKeys": {
"decision_invocations_company_id_companies_id_fk": {
"name": "decision_invocations_company_id_companies_id_fk",
"tableFrom": "decision_invocations",
+ "tableTo": "companies",
"columnsFrom": [
"company_id"
],
- "tableTo": "companies",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "cascade"
+ "onDelete": "cascade",
+ "onUpdate": "no action"
},
"decision_invocations_cost_event_id_cost_events_id_fk": {
"name": "decision_invocations_cost_event_id_cost_events_id_fk",
"tableFrom": "decision_invocations",
+ "tableTo": "cost_events",
"columnsFrom": [
"cost_event_id"
],
- "tableTo": "cost_events",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "no action"
+ "onDelete": "no action",
+ "onUpdate": "no action"
}
},
"compositePrimaryKeys": {},
@@ -21194,9 +21298,9 @@
}
],
"isUnique": true,
- "with": {},
+ "concurrently": false,
"method": "btree",
- "concurrently": false
+ "with": {}
},
"decision_archive_notification_outbox_pending_idx": {
"name": "decision_archive_notification_outbox_pending_idx",
@@ -21215,37 +21319,37 @@
}
],
"isUnique": false,
- "with": {},
+ "concurrently": false,
"method": "btree",
- "concurrently": false
+ "with": {}
}
},
"foreignKeys": {
"decision_archive_notification_outbox_company_id_companies_id_fk": {
"name": "decision_archive_notification_outbox_company_id_companies_id_fk",
"tableFrom": "decision_archive_notification_outbox",
+ "tableTo": "companies",
"columnsFrom": [
"company_id"
],
- "tableTo": "companies",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "cascade"
+ "onDelete": "cascade",
+ "onUpdate": "no action"
},
"decision_archive_notification_outbox_origin_agent_id_agents_id_fk": {
"name": "decision_archive_notification_outbox_origin_agent_id_agents_id_fk",
"tableFrom": "decision_archive_notification_outbox",
+ "tableTo": "agents",
"columnsFrom": [
"origin_agent_id"
],
- "tableTo": "agents",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "no action"
+ "onDelete": "no action",
+ "onUpdate": "no action"
}
},
"compositePrimaryKeys": {},
@@ -21362,9 +21466,9 @@
}
],
"isUnique": true,
- "with": {},
+ "concurrently": false,
"method": "btree",
- "concurrently": false
+ "with": {}
},
"decision_queue_items_company_source_idx": {
"name": "decision_queue_items_company_source_idx",
@@ -21389,78 +21493,78 @@
}
],
"isUnique": false,
- "with": {},
+ "concurrently": false,
"method": "btree",
- "concurrently": false
+ "with": {}
}
},
"foreignKeys": {
"decision_queue_items_company_id_companies_id_fk": {
"name": "decision_queue_items_company_id_companies_id_fk",
"tableFrom": "decision_queue_items",
+ "tableTo": "companies",
"columnsFrom": [
"company_id"
],
- "tableTo": "companies",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "cascade"
+ "onDelete": "cascade",
+ "onUpdate": "no action"
},
"decision_queue_items_added_by_agent_id_agents_id_fk": {
"name": "decision_queue_items_added_by_agent_id_agents_id_fk",
"tableFrom": "decision_queue_items",
+ "tableTo": "agents",
"columnsFrom": [
"added_by_agent_id"
],
- "tableTo": "agents",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "no action"
+ "onDelete": "no action",
+ "onUpdate": "no action"
},
"decision_queue_items_added_by_run_id_heartbeat_runs_id_fk": {
"name": "decision_queue_items_added_by_run_id_heartbeat_runs_id_fk",
"tableFrom": "decision_queue_items",
+ "tableTo": "heartbeat_runs",
"columnsFrom": [
"added_by_run_id"
],
- "tableTo": "heartbeat_runs",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "no action"
+ "onDelete": "no action",
+ "onUpdate": "no action"
},
"decision_queue_items_added_by_agent_api_key_id_agent_api_keys_id_fk": {
"name": "decision_queue_items_added_by_agent_api_key_id_agent_api_keys_id_fk",
"tableFrom": "decision_queue_items",
+ "tableTo": "agent_api_keys",
"columnsFrom": [
"added_by_agent_api_key_id"
],
- "tableTo": "agent_api_keys",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "no action"
+ "onDelete": "no action",
+ "onUpdate": "no action"
},
"decision_queue_items_queue_company_fk": {
"name": "decision_queue_items_queue_company_fk",
"tableFrom": "decision_queue_items",
+ "tableTo": "decision_queues",
"columnsFrom": [
"queue_id",
"company_id"
],
- "tableTo": "decision_queues",
"columnsTo": [
"id",
"company_id"
],
- "onUpdate": "no action",
- "onDelete": "cascade"
+ "onDelete": "cascade",
+ "onUpdate": "no action"
}
},
"compositePrimaryKeys": {},
@@ -21592,9 +21696,9 @@
}
],
"isUnique": true,
- "with": {},
+ "concurrently": false,
"method": "btree",
- "concurrently": false
+ "with": {}
},
"decision_queues_company_updated_idx": {
"name": "decision_queues_company_updated_idx",
@@ -21613,74 +21717,74 @@
}
],
"isUnique": false,
- "with": {},
+ "concurrently": false,
"method": "btree",
- "concurrently": false
+ "with": {}
}
},
"foreignKeys": {
"decision_queues_company_id_companies_id_fk": {
"name": "decision_queues_company_id_companies_id_fk",
"tableFrom": "decision_queues",
+ "tableTo": "companies",
"columnsFrom": [
"company_id"
],
- "tableTo": "companies",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "cascade"
+ "onDelete": "cascade",
+ "onUpdate": "no action"
},
"decision_queues_created_by_agent_id_agents_id_fk": {
"name": "decision_queues_created_by_agent_id_agents_id_fk",
"tableFrom": "decision_queues",
+ "tableTo": "agents",
"columnsFrom": [
"created_by_agent_id"
],
- "tableTo": "agents",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "no action"
+ "onDelete": "no action",
+ "onUpdate": "no action"
},
"decision_queues_created_by_run_id_heartbeat_runs_id_fk": {
"name": "decision_queues_created_by_run_id_heartbeat_runs_id_fk",
"tableFrom": "decision_queues",
+ "tableTo": "heartbeat_runs",
"columnsFrom": [
"created_by_run_id"
],
- "tableTo": "heartbeat_runs",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "no action"
+ "onDelete": "no action",
+ "onUpdate": "no action"
},
"decision_queues_created_by_agent_api_key_id_agent_api_keys_id_fk": {
"name": "decision_queues_created_by_agent_api_key_id_agent_api_keys_id_fk",
"tableFrom": "decision_queues",
+ "tableTo": "agent_api_keys",
"columnsFrom": [
"created_by_agent_api_key_id"
],
- "tableTo": "agent_api_keys",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "no action"
+ "onDelete": "no action",
+ "onUpdate": "no action"
}
},
"compositePrimaryKeys": {},
"uniqueConstraints": {
"decision_queues_id_company_uq": {
"name": "decision_queues_id_company_uq",
+ "nullsNotDistinct": false,
"columns": [
"id",
"company_id"
- ],
- "nullsNotDistinct": false
+ ]
}
},
"policies": {},
@@ -21827,9 +21931,9 @@
}
],
"isUnique": true,
- "with": {},
+ "concurrently": false,
"method": "btree",
- "concurrently": false
+ "with": {}
},
"decision_retention_company_archived_idx": {
"name": "decision_retention_company_archived_idx",
@@ -21848,50 +21952,50 @@
}
],
"isUnique": false,
- "with": {},
+ "concurrently": false,
"method": "btree",
- "concurrently": false
+ "with": {}
}
},
"foreignKeys": {
"decision_retention_company_id_companies_id_fk": {
"name": "decision_retention_company_id_companies_id_fk",
"tableFrom": "decision_retention",
+ "tableTo": "companies",
"columnsFrom": [
"company_id"
],
- "tableTo": "companies",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "cascade"
+ "onDelete": "cascade",
+ "onUpdate": "no action"
},
"decision_retention_archived_by_agent_id_agents_id_fk": {
"name": "decision_retention_archived_by_agent_id_agents_id_fk",
"tableFrom": "decision_retention",
+ "tableTo": "agents",
"columnsFrom": [
"archived_by_agent_id"
],
- "tableTo": "agents",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "no action"
+ "onDelete": "no action",
+ "onUpdate": "no action"
},
"decision_retention_archived_by_run_id_heartbeat_runs_id_fk": {
"name": "decision_retention_archived_by_run_id_heartbeat_runs_id_fk",
"tableFrom": "decision_retention",
+ "tableTo": "heartbeat_runs",
"columnsFrom": [
"archived_by_run_id"
],
- "tableTo": "heartbeat_runs",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "no action"
+ "onDelete": "no action",
+ "onUpdate": "no action"
}
},
"compositePrimaryKeys": {},
@@ -22034,9 +22138,9 @@
}
],
"isUnique": true,
- "with": {},
+ "concurrently": false,
"method": "btree",
- "concurrently": false
+ "with": {}
},
"decision_triage_company_decide_by_idx": {
"name": "decision_triage_company_decide_by_idx",
@@ -22055,63 +22159,63 @@
}
],
"isUnique": false,
- "with": {},
+ "concurrently": false,
"method": "btree",
- "concurrently": false
+ "with": {}
}
},
"foreignKeys": {
"decision_triage_company_id_companies_id_fk": {
"name": "decision_triage_company_id_companies_id_fk",
"tableFrom": "decision_triage",
+ "tableTo": "companies",
"columnsFrom": [
"company_id"
],
- "tableTo": "companies",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "cascade"
+ "onDelete": "cascade",
+ "onUpdate": "no action"
},
"decision_triage_set_by_agent_id_agents_id_fk": {
"name": "decision_triage_set_by_agent_id_agents_id_fk",
"tableFrom": "decision_triage",
+ "tableTo": "agents",
"columnsFrom": [
"set_by_agent_id"
],
- "tableTo": "agents",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "no action"
+ "onDelete": "no action",
+ "onUpdate": "no action"
},
"decision_triage_set_by_run_id_heartbeat_runs_id_fk": {
"name": "decision_triage_set_by_run_id_heartbeat_runs_id_fk",
"tableFrom": "decision_triage",
+ "tableTo": "heartbeat_runs",
"columnsFrom": [
"set_by_run_id"
],
- "tableTo": "heartbeat_runs",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "no action"
+ "onDelete": "no action",
+ "onUpdate": "no action"
},
"decision_triage_set_by_agent_api_key_id_agent_api_keys_id_fk": {
"name": "decision_triage_set_by_agent_api_key_id_agent_api_keys_id_fk",
"tableFrom": "decision_triage",
+ "tableTo": "agent_api_keys",
"columnsFrom": [
"set_by_agent_api_key_id"
],
- "tableTo": "agent_api_keys",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "no action"
+ "onDelete": "no action",
+ "onUpdate": "no action"
}
},
"compositePrimaryKeys": {},
@@ -22251,9 +22355,9 @@
}
],
"isUnique": false,
- "with": {},
+ "concurrently": false,
"method": "btree",
- "concurrently": false
+ "with": {}
},
"decision_triage_events_queue_created_idx": {
"name": "decision_triage_events_queue_created_idx",
@@ -22272,76 +22376,76 @@
}
],
"isUnique": false,
- "with": {},
+ "concurrently": false,
"method": "btree",
- "concurrently": false
+ "with": {}
}
},
"foreignKeys": {
"decision_triage_events_company_id_companies_id_fk": {
"name": "decision_triage_events_company_id_companies_id_fk",
"tableFrom": "decision_triage_events",
+ "tableTo": "companies",
"columnsFrom": [
"company_id"
],
- "tableTo": "companies",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "cascade"
+ "onDelete": "cascade",
+ "onUpdate": "no action"
},
"decision_triage_events_queue_id_decision_queues_id_fk": {
"name": "decision_triage_events_queue_id_decision_queues_id_fk",
"tableFrom": "decision_triage_events",
+ "tableTo": "decision_queues",
"columnsFrom": [
"queue_id"
],
- "tableTo": "decision_queues",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "no action"
+ "onDelete": "no action",
+ "onUpdate": "no action"
},
"decision_triage_events_actor_agent_id_agents_id_fk": {
"name": "decision_triage_events_actor_agent_id_agents_id_fk",
"tableFrom": "decision_triage_events",
+ "tableTo": "agents",
"columnsFrom": [
"actor_agent_id"
],
- "tableTo": "agents",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "no action"
+ "onDelete": "no action",
+ "onUpdate": "no action"
},
"decision_triage_events_actor_run_id_heartbeat_runs_id_fk": {
"name": "decision_triage_events_actor_run_id_heartbeat_runs_id_fk",
"tableFrom": "decision_triage_events",
+ "tableTo": "heartbeat_runs",
"columnsFrom": [
"actor_run_id"
],
- "tableTo": "heartbeat_runs",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "no action"
+ "onDelete": "no action",
+ "onUpdate": "no action"
},
"decision_triage_events_agent_api_key_id_agent_api_keys_id_fk": {
"name": "decision_triage_events_agent_api_key_id_agent_api_keys_id_fk",
"tableFrom": "decision_triage_events",
+ "tableTo": "agent_api_keys",
"columnsFrom": [
"agent_api_key_id"
],
- "tableTo": "agent_api_keys",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "no action"
+ "onDelete": "no action",
+ "onUpdate": "no action"
}
},
"compositePrimaryKeys": {},
@@ -22468,9 +22572,9 @@
}
],
"isUnique": false,
- "with": {},
+ "concurrently": false,
"method": "btree",
- "concurrently": false
+ "with": {}
},
"decision_training_examples_issue_idx": {
"name": "decision_training_examples_issue_idx",
@@ -22483,9 +22587,9 @@
}
],
"isUnique": false,
- "with": {},
+ "concurrently": false,
"method": "btree",
- "concurrently": false
+ "with": {}
},
"decision_training_examples_source_author_uq": {
"name": "decision_training_examples_source_author_uq",
@@ -22510,37 +22614,37 @@
}
],
"isUnique": true,
- "with": {},
+ "concurrently": false,
"method": "btree",
- "concurrently": false
+ "with": {}
}
},
"foreignKeys": {
"decision_training_examples_company_id_companies_id_fk": {
"name": "decision_training_examples_company_id_companies_id_fk",
"tableFrom": "decision_training_examples",
+ "tableTo": "companies",
"columnsFrom": [
"company_id"
],
- "tableTo": "companies",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "cascade"
+ "onDelete": "cascade",
+ "onUpdate": "no action"
},
"decision_training_examples_issue_id_issues_id_fk": {
"name": "decision_training_examples_issue_id_issues_id_fk",
"tableFrom": "decision_training_examples",
+ "tableTo": "issues",
"columnsFrom": [
"issue_id"
],
- "tableTo": "issues",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "cascade"
+ "onDelete": "cascade",
+ "onUpdate": "no action"
}
},
"compositePrimaryKeys": {},
@@ -22622,63 +22726,63 @@
}
],
"isUnique": false,
- "with": {},
+ "concurrently": false,
"method": "btree",
- "concurrently": false
+ "with": {}
}
},
"foreignKeys": {
"decision_bundles_company_id_companies_id_fk": {
"name": "decision_bundles_company_id_companies_id_fk",
"tableFrom": "decision_bundles",
+ "tableTo": "companies",
"columnsFrom": [
"company_id"
],
- "tableTo": "companies",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "no action"
+ "onDelete": "no action",
+ "onUpdate": "no action"
},
"decision_bundles_origin_agent_id_agents_id_fk": {
"name": "decision_bundles_origin_agent_id_agents_id_fk",
"tableFrom": "decision_bundles",
+ "tableTo": "agents",
"columnsFrom": [
"origin_agent_id"
],
- "tableTo": "agents",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "no action"
+ "onDelete": "no action",
+ "onUpdate": "no action"
},
"decision_bundles_origin_issue_id_issues_id_fk": {
"name": "decision_bundles_origin_issue_id_issues_id_fk",
"tableFrom": "decision_bundles",
+ "tableTo": "issues",
"columnsFrom": [
"origin_issue_id"
],
- "tableTo": "issues",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "no action"
+ "onDelete": "no action",
+ "onUpdate": "no action"
},
"decision_bundles_origin_run_id_heartbeat_runs_id_fk": {
"name": "decision_bundles_origin_run_id_heartbeat_runs_id_fk",
"tableFrom": "decision_bundles",
+ "tableTo": "heartbeat_runs",
"columnsFrom": [
"origin_run_id"
],
- "tableTo": "heartbeat_runs",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "no action"
+ "onDelete": "no action",
+ "onUpdate": "no action"
}
},
"compositePrimaryKeys": {},
@@ -22772,9 +22876,9 @@
}
],
"isUnique": true,
- "with": {},
+ "concurrently": false,
"method": "btree",
- "concurrently": false
+ "with": {}
},
"decision_effect_executions_target_issue_idx": {
"name": "decision_effect_executions_target_issue_idx",
@@ -22787,50 +22891,50 @@
}
],
"isUnique": false,
- "with": {},
+ "concurrently": false,
"method": "btree",
- "concurrently": false
+ "with": {}
}
},
"foreignKeys": {
"decision_effect_executions_decision_id_decisions_id_fk": {
"name": "decision_effect_executions_decision_id_decisions_id_fk",
"tableFrom": "decision_effect_executions",
+ "tableTo": "decisions",
"columnsFrom": [
"decision_id"
],
- "tableTo": "decisions",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "cascade"
+ "onDelete": "cascade",
+ "onUpdate": "no action"
},
"decision_effect_executions_target_issue_id_issues_id_fk": {
"name": "decision_effect_executions_target_issue_id_issues_id_fk",
"tableFrom": "decision_effect_executions",
+ "tableTo": "issues",
"columnsFrom": [
"target_issue_id"
],
- "tableTo": "issues",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "no action"
+ "onDelete": "no action",
+ "onUpdate": "no action"
},
"decision_effect_executions_activity_log_id_activity_log_id_fk": {
"name": "decision_effect_executions_activity_log_id_activity_log_id_fk",
"tableFrom": "decision_effect_executions",
+ "tableTo": "activity_log",
"columnsFrom": [
"activity_log_id"
],
- "tableTo": "activity_log",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "set null"
+ "onDelete": "set null",
+ "onUpdate": "no action"
}
},
"compositePrimaryKeys": {},
@@ -22874,9 +22978,9 @@
}
],
"isUnique": false,
- "with": {},
+ "concurrently": false,
"method": "btree",
- "concurrently": false
+ "with": {}
},
"decision_target_issues_issue_idx": {
"name": "decision_target_issues_issue_idx",
@@ -22889,50 +22993,50 @@
}
],
"isUnique": false,
- "with": {},
+ "concurrently": false,
"method": "btree",
- "concurrently": false
+ "with": {}
}
},
"foreignKeys": {
"decision_target_issues_decision_id_decisions_id_fk": {
"name": "decision_target_issues_decision_id_decisions_id_fk",
"tableFrom": "decision_target_issues",
+ "tableTo": "decisions",
"columnsFrom": [
"decision_id"
],
- "tableTo": "decisions",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "cascade"
+ "onDelete": "cascade",
+ "onUpdate": "no action"
},
"decision_target_issues_issue_id_issues_id_fk": {
"name": "decision_target_issues_issue_id_issues_id_fk",
"tableFrom": "decision_target_issues",
+ "tableTo": "issues",
"columnsFrom": [
"issue_id"
],
- "tableTo": "issues",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "cascade"
+ "onDelete": "cascade",
+ "onUpdate": "no action"
},
"decision_target_issues_company_id_companies_id_fk": {
"name": "decision_target_issues_company_id_companies_id_fk",
"tableFrom": "decision_target_issues",
+ "tableTo": "companies",
"columnsFrom": [
"company_id"
],
- "tableTo": "companies",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "no action"
+ "onDelete": "no action",
+ "onUpdate": "no action"
}
},
"compositePrimaryKeys": {
@@ -23134,9 +23238,9 @@
}
],
"isUnique": false,
- "with": {},
+ "concurrently": false,
"method": "btree",
- "concurrently": false
+ "with": {}
},
"decisions_bundle_idx": {
"name": "decisions_bundle_idx",
@@ -23149,9 +23253,9 @@
}
],
"isUnique": false,
- "with": {},
+ "concurrently": false,
"method": "btree",
- "concurrently": false
+ "with": {}
},
"decisions_origin_issue_idx": {
"name": "decisions_origin_issue_idx",
@@ -23164,9 +23268,9 @@
}
],
"isUnique": false,
- "with": {},
+ "concurrently": false,
"method": "btree",
- "concurrently": false
+ "with": {}
},
"decisions_company_idempotency_uq": {
"name": "decisions_company_idempotency_uq",
@@ -23185,77 +23289,77 @@
}
],
"isUnique": true,
- "with": {},
- "method": "btree",
"where": "\"decisions\".\"idempotency_key\" IS NOT NULL",
- "concurrently": false
+ "concurrently": false,
+ "method": "btree",
+ "with": {}
}
},
"foreignKeys": {
"decisions_company_id_companies_id_fk": {
"name": "decisions_company_id_companies_id_fk",
"tableFrom": "decisions",
+ "tableTo": "companies",
"columnsFrom": [
"company_id"
],
- "tableTo": "companies",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "no action"
+ "onDelete": "no action",
+ "onUpdate": "no action"
},
"decisions_bundle_id_decision_bundles_id_fk": {
"name": "decisions_bundle_id_decision_bundles_id_fk",
"tableFrom": "decisions",
+ "tableTo": "decision_bundles",
"columnsFrom": [
"bundle_id"
],
- "tableTo": "decision_bundles",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "set null"
+ "onDelete": "set null",
+ "onUpdate": "no action"
},
"decisions_origin_agent_id_agents_id_fk": {
"name": "decisions_origin_agent_id_agents_id_fk",
"tableFrom": "decisions",
+ "tableTo": "agents",
"columnsFrom": [
"origin_agent_id"
],
- "tableTo": "agents",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "no action"
+ "onDelete": "no action",
+ "onUpdate": "no action"
},
"decisions_origin_issue_id_issues_id_fk": {
"name": "decisions_origin_issue_id_issues_id_fk",
"tableFrom": "decisions",
+ "tableTo": "issues",
"columnsFrom": [
"origin_issue_id"
],
- "tableTo": "issues",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "no action"
+ "onDelete": "no action",
+ "onUpdate": "no action"
},
"decisions_origin_run_id_heartbeat_runs_id_fk": {
"name": "decisions_origin_run_id_heartbeat_runs_id_fk",
"tableFrom": "decisions",
+ "tableTo": "heartbeat_runs",
"columnsFrom": [
"origin_run_id"
],
- "tableTo": "heartbeat_runs",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "no action"
+ "onDelete": "no action",
+ "onUpdate": "no action"
}
},
"compositePrimaryKeys": {},
@@ -23379,9 +23483,9 @@
}
],
"isUnique": false,
- "with": {},
+ "concurrently": false,
"method": "btree",
- "concurrently": false
+ "with": {}
},
"document_annotation_anchor_snapshots_company_document_revision_idx": {
"name": "document_annotation_anchor_snapshots_company_document_revision_idx",
@@ -23406,76 +23510,76 @@
}
],
"isUnique": false,
- "with": {},
+ "concurrently": false,
"method": "btree",
- "concurrently": false
+ "with": {}
}
},
"foreignKeys": {
"document_annotation_anchor_snapshots_company_id_companies_id_fk": {
"name": "document_annotation_anchor_snapshots_company_id_companies_id_fk",
"tableFrom": "document_annotation_anchor_snapshots",
+ "tableTo": "companies",
"columnsFrom": [
"company_id"
],
- "tableTo": "companies",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "no action"
+ "onDelete": "no action",
+ "onUpdate": "no action"
},
"document_annotation_anchor_snapshots_thread_id_document_annotation_threads_id_fk": {
"name": "document_annotation_anchor_snapshots_thread_id_document_annotation_threads_id_fk",
"tableFrom": "document_annotation_anchor_snapshots",
+ "tableTo": "document_annotation_threads",
"columnsFrom": [
"thread_id"
],
- "tableTo": "document_annotation_threads",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "cascade"
+ "onDelete": "cascade",
+ "onUpdate": "no action"
},
"document_annotation_anchor_snapshots_document_id_documents_id_fk": {
"name": "document_annotation_anchor_snapshots_document_id_documents_id_fk",
"tableFrom": "document_annotation_anchor_snapshots",
+ "tableTo": "documents",
"columnsFrom": [
"document_id"
],
- "tableTo": "documents",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "cascade"
+ "onDelete": "cascade",
+ "onUpdate": "no action"
},
"document_annotation_anchor_snapshots_from_revision_id_document_revisions_id_fk": {
"name": "document_annotation_anchor_snapshots_from_revision_id_document_revisions_id_fk",
"tableFrom": "document_annotation_anchor_snapshots",
+ "tableTo": "document_revisions",
"columnsFrom": [
"from_revision_id"
],
- "tableTo": "document_revisions",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "set null"
+ "onDelete": "set null",
+ "onUpdate": "no action"
},
"document_annotation_anchor_snapshots_to_revision_id_document_revisions_id_fk": {
"name": "document_annotation_anchor_snapshots_to_revision_id_document_revisions_id_fk",
"tableFrom": "document_annotation_anchor_snapshots",
+ "tableTo": "document_revisions",
"columnsFrom": [
"to_revision_id"
],
- "tableTo": "document_revisions",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "set null"
+ "onDelete": "set null",
+ "onUpdate": "no action"
}
},
"compositePrimaryKeys": {},
@@ -23612,9 +23716,9 @@
}
],
"isUnique": false,
- "with": {},
+ "concurrently": false,
"method": "btree",
- "concurrently": false
+ "with": {}
},
"document_annotation_comments_company_issue_created_at_idx": {
"name": "document_annotation_comments_company_issue_created_at_idx",
@@ -23639,9 +23743,9 @@
}
],
"isUnique": false,
- "with": {},
+ "concurrently": false,
"method": "btree",
- "concurrently": false
+ "with": {}
},
"document_annotation_comments_company_routine_created_at_idx": {
"name": "document_annotation_comments_company_routine_created_at_idx",
@@ -23666,9 +23770,9 @@
}
],
"isUnique": false,
- "with": {},
+ "concurrently": false,
"method": "btree",
- "concurrently": false
+ "with": {}
},
"document_annotation_comments_company_case_created_at_idx": {
"name": "document_annotation_comments_company_case_created_at_idx",
@@ -23693,9 +23797,9 @@
}
],
"isUnique": false,
- "with": {},
+ "concurrently": false,
"method": "btree",
- "concurrently": false
+ "with": {}
},
"document_annotation_comments_company_document_created_at_idx": {
"name": "document_annotation_comments_company_document_created_at_idx",
@@ -23720,9 +23824,9 @@
}
],
"isUnique": false,
- "with": {},
+ "concurrently": false,
"method": "btree",
- "concurrently": false
+ "with": {}
},
"document_annotation_comments_issue_comment_idx": {
"name": "document_annotation_comments_issue_comment_idx",
@@ -23735,9 +23839,9 @@
}
],
"isUnique": false,
- "with": {},
+ "concurrently": false,
"method": "btree",
- "concurrently": false
+ "with": {}
},
"document_annotation_comments_body_search_idx": {
"name": "document_annotation_comments_body_search_idx",
@@ -23751,128 +23855,128 @@
}
],
"isUnique": false,
- "with": {},
+ "concurrently": false,
"method": "gin",
- "concurrently": false
+ "with": {}
}
},
"foreignKeys": {
"document_annotation_comments_company_id_companies_id_fk": {
"name": "document_annotation_comments_company_id_companies_id_fk",
"tableFrom": "document_annotation_comments",
+ "tableTo": "companies",
"columnsFrom": [
"company_id"
],
- "tableTo": "companies",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "no action"
+ "onDelete": "no action",
+ "onUpdate": "no action"
},
"document_annotation_comments_thread_id_document_annotation_threads_id_fk": {
"name": "document_annotation_comments_thread_id_document_annotation_threads_id_fk",
"tableFrom": "document_annotation_comments",
+ "tableTo": "document_annotation_threads",
"columnsFrom": [
"thread_id"
],
- "tableTo": "document_annotation_threads",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "cascade"
+ "onDelete": "cascade",
+ "onUpdate": "no action"
},
"document_annotation_comments_issue_id_issues_id_fk": {
"name": "document_annotation_comments_issue_id_issues_id_fk",
"tableFrom": "document_annotation_comments",
+ "tableTo": "issues",
"columnsFrom": [
"issue_id"
],
- "tableTo": "issues",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "cascade"
+ "onDelete": "cascade",
+ "onUpdate": "no action"
},
"document_annotation_comments_routine_id_routines_id_fk": {
"name": "document_annotation_comments_routine_id_routines_id_fk",
"tableFrom": "document_annotation_comments",
+ "tableTo": "routines",
"columnsFrom": [
"routine_id"
],
- "tableTo": "routines",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "cascade"
+ "onDelete": "cascade",
+ "onUpdate": "no action"
},
"document_annotation_comments_case_id_cases_id_fk": {
"name": "document_annotation_comments_case_id_cases_id_fk",
"tableFrom": "document_annotation_comments",
+ "tableTo": "cases",
"columnsFrom": [
"case_id"
],
- "tableTo": "cases",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "cascade"
+ "onDelete": "cascade",
+ "onUpdate": "no action"
},
"document_annotation_comments_document_id_documents_id_fk": {
"name": "document_annotation_comments_document_id_documents_id_fk",
"tableFrom": "document_annotation_comments",
+ "tableTo": "documents",
"columnsFrom": [
"document_id"
],
- "tableTo": "documents",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "cascade"
+ "onDelete": "cascade",
+ "onUpdate": "no action"
},
"document_annotation_comments_author_agent_id_agents_id_fk": {
"name": "document_annotation_comments_author_agent_id_agents_id_fk",
"tableFrom": "document_annotation_comments",
+ "tableTo": "agents",
"columnsFrom": [
"author_agent_id"
],
- "tableTo": "agents",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "set null"
+ "onDelete": "set null",
+ "onUpdate": "no action"
},
"document_annotation_comments_created_by_run_id_heartbeat_runs_id_fk": {
"name": "document_annotation_comments_created_by_run_id_heartbeat_runs_id_fk",
"tableFrom": "document_annotation_comments",
+ "tableTo": "heartbeat_runs",
"columnsFrom": [
"created_by_run_id"
],
- "tableTo": "heartbeat_runs",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "set null"
+ "onDelete": "set null",
+ "onUpdate": "no action"
},
"document_annotation_comments_issue_comment_id_issue_comments_id_fk": {
"name": "document_annotation_comments_issue_comment_id_issue_comments_id_fk",
"tableFrom": "document_annotation_comments",
+ "tableTo": "issue_comments",
"columnsFrom": [
"issue_comment_id"
],
- "tableTo": "issue_comments",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "set null"
+ "onDelete": "set null",
+ "onUpdate": "no action"
}
},
"compositePrimaryKeys": {},
@@ -24097,9 +24201,9 @@
}
],
"isUnique": false,
- "with": {},
+ "concurrently": false,
"method": "btree",
- "concurrently": false
+ "with": {}
},
"document_annotation_threads_company_issue_status_idx": {
"name": "document_annotation_threads_company_issue_status_idx",
@@ -24124,9 +24228,9 @@
}
],
"isUnique": false,
- "with": {},
+ "concurrently": false,
"method": "btree",
- "concurrently": false
+ "with": {}
},
"document_annotation_threads_company_routine_status_idx": {
"name": "document_annotation_threads_company_routine_status_idx",
@@ -24151,9 +24255,9 @@
}
],
"isUnique": false,
- "with": {},
+ "concurrently": false,
"method": "btree",
- "concurrently": false
+ "with": {}
},
"document_annotation_threads_company_case_status_idx": {
"name": "document_annotation_threads_company_case_status_idx",
@@ -24178,9 +24282,9 @@
}
],
"isUnique": false,
- "with": {},
+ "concurrently": false,
"method": "btree",
- "concurrently": false
+ "with": {}
},
"document_annotation_threads_company_current_revision_open_idx": {
"name": "document_annotation_threads_company_current_revision_open_idx",
@@ -24211,9 +24315,9 @@
}
],
"isUnique": false,
- "with": {},
+ "concurrently": false,
"method": "btree",
- "concurrently": false
+ "with": {}
},
"document_annotation_threads_company_anchor_state_idx": {
"name": "document_annotation_threads_company_anchor_state_idx",
@@ -24232,128 +24336,128 @@
}
],
"isUnique": false,
- "with": {},
+ "concurrently": false,
"method": "btree",
- "concurrently": false
+ "with": {}
}
},
"foreignKeys": {
"document_annotation_threads_company_id_companies_id_fk": {
"name": "document_annotation_threads_company_id_companies_id_fk",
"tableFrom": "document_annotation_threads",
+ "tableTo": "companies",
"columnsFrom": [
"company_id"
],
- "tableTo": "companies",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "no action"
+ "onDelete": "no action",
+ "onUpdate": "no action"
},
"document_annotation_threads_issue_id_issues_id_fk": {
"name": "document_annotation_threads_issue_id_issues_id_fk",
"tableFrom": "document_annotation_threads",
+ "tableTo": "issues",
"columnsFrom": [
"issue_id"
],
- "tableTo": "issues",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "cascade"
+ "onDelete": "cascade",
+ "onUpdate": "no action"
},
"document_annotation_threads_routine_id_routines_id_fk": {
"name": "document_annotation_threads_routine_id_routines_id_fk",
"tableFrom": "document_annotation_threads",
+ "tableTo": "routines",
"columnsFrom": [
"routine_id"
],
- "tableTo": "routines",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "cascade"
+ "onDelete": "cascade",
+ "onUpdate": "no action"
},
"document_annotation_threads_case_id_cases_id_fk": {
"name": "document_annotation_threads_case_id_cases_id_fk",
"tableFrom": "document_annotation_threads",
+ "tableTo": "cases",
"columnsFrom": [
"case_id"
],
- "tableTo": "cases",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "cascade"
+ "onDelete": "cascade",
+ "onUpdate": "no action"
},
"document_annotation_threads_document_id_documents_id_fk": {
"name": "document_annotation_threads_document_id_documents_id_fk",
"tableFrom": "document_annotation_threads",
+ "tableTo": "documents",
"columnsFrom": [
"document_id"
],
- "tableTo": "documents",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "cascade"
+ "onDelete": "cascade",
+ "onUpdate": "no action"
},
"document_annotation_threads_original_revision_id_document_revisions_id_fk": {
"name": "document_annotation_threads_original_revision_id_document_revisions_id_fk",
"tableFrom": "document_annotation_threads",
+ "tableTo": "document_revisions",
"columnsFrom": [
"original_revision_id"
],
- "tableTo": "document_revisions",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "set null"
+ "onDelete": "set null",
+ "onUpdate": "no action"
},
"document_annotation_threads_current_revision_id_document_revisions_id_fk": {
"name": "document_annotation_threads_current_revision_id_document_revisions_id_fk",
"tableFrom": "document_annotation_threads",
+ "tableTo": "document_revisions",
"columnsFrom": [
"current_revision_id"
],
- "tableTo": "document_revisions",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "set null"
+ "onDelete": "set null",
+ "onUpdate": "no action"
},
"document_annotation_threads_created_by_agent_id_agents_id_fk": {
"name": "document_annotation_threads_created_by_agent_id_agents_id_fk",
"tableFrom": "document_annotation_threads",
+ "tableTo": "agents",
"columnsFrom": [
"created_by_agent_id"
],
- "tableTo": "agents",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "set null"
+ "onDelete": "set null",
+ "onUpdate": "no action"
},
"document_annotation_threads_resolved_by_agent_id_agents_id_fk": {
"name": "document_annotation_threads_resolved_by_agent_id_agents_id_fk",
"tableFrom": "document_annotation_threads",
+ "tableTo": "agents",
"columnsFrom": [
"resolved_by_agent_id"
],
- "tableTo": "agents",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "set null"
+ "onDelete": "set null",
+ "onUpdate": "no action"
}
},
"compositePrimaryKeys": {},
@@ -24441,9 +24545,9 @@
}
],
"isUnique": false,
- "with": {},
+ "concurrently": false,
"method": "btree",
- "concurrently": false
+ "with": {}
},
"document_memberships_company_user_document_uq": {
"name": "document_memberships_company_user_document_uq",
@@ -24468,37 +24572,37 @@
}
],
"isUnique": true,
- "with": {},
+ "concurrently": false,
"method": "btree",
- "concurrently": false
+ "with": {}
}
},
"foreignKeys": {
"document_memberships_company_id_companies_id_fk": {
"name": "document_memberships_company_id_companies_id_fk",
"tableFrom": "document_memberships",
+ "tableTo": "companies",
"columnsFrom": [
"company_id"
],
- "tableTo": "companies",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "cascade"
+ "onDelete": "cascade",
+ "onUpdate": "no action"
},
"document_memberships_document_id_documents_id_fk": {
"name": "document_memberships_document_id_documents_id_fk",
"tableFrom": "document_memberships",
+ "tableTo": "documents",
"columnsFrom": [
"document_id"
],
- "tableTo": "documents",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "cascade"
+ "onDelete": "cascade",
+ "onUpdate": "no action"
}
},
"compositePrimaryKeys": {},
@@ -24605,9 +24709,9 @@
}
],
"isUnique": true,
- "with": {},
+ "concurrently": false,
"method": "btree",
- "concurrently": false
+ "with": {}
},
"document_revisions_company_document_created_idx": {
"name": "document_revisions_company_document_created_idx",
@@ -24632,63 +24736,63 @@
}
],
"isUnique": false,
- "with": {},
+ "concurrently": false,
"method": "btree",
- "concurrently": false
+ "with": {}
}
},
"foreignKeys": {
"document_revisions_company_id_companies_id_fk": {
"name": "document_revisions_company_id_companies_id_fk",
"tableFrom": "document_revisions",
+ "tableTo": "companies",
"columnsFrom": [
"company_id"
],
- "tableTo": "companies",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "cascade"
+ "onDelete": "cascade",
+ "onUpdate": "no action"
},
"document_revisions_document_id_documents_id_fk": {
"name": "document_revisions_document_id_documents_id_fk",
"tableFrom": "document_revisions",
+ "tableTo": "documents",
"columnsFrom": [
"document_id"
],
- "tableTo": "documents",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "cascade"
+ "onDelete": "cascade",
+ "onUpdate": "no action"
},
"document_revisions_created_by_agent_id_agents_id_fk": {
"name": "document_revisions_created_by_agent_id_agents_id_fk",
"tableFrom": "document_revisions",
+ "tableTo": "agents",
"columnsFrom": [
"created_by_agent_id"
],
- "tableTo": "agents",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "set null"
+ "onDelete": "set null",
+ "onUpdate": "no action"
},
"document_revisions_created_by_run_id_heartbeat_runs_id_fk": {
"name": "document_revisions_created_by_run_id_heartbeat_runs_id_fk",
"tableFrom": "document_revisions",
+ "tableTo": "heartbeat_runs",
"columnsFrom": [
"created_by_run_id"
],
- "tableTo": "heartbeat_runs",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "set null"
+ "onDelete": "set null",
+ "onUpdate": "no action"
}
},
"compositePrimaryKeys": {},
@@ -24827,9 +24931,9 @@
}
],
"isUnique": false,
- "with": {},
+ "concurrently": false,
"method": "btree",
- "concurrently": false
+ "with": {}
},
"documents_company_created_idx": {
"name": "documents_company_created_idx",
@@ -24848,9 +24952,9 @@
}
],
"isUnique": false,
- "with": {},
+ "concurrently": false,
"method": "btree",
- "concurrently": false
+ "with": {}
},
"documents_title_search_idx": {
"name": "documents_title_search_idx",
@@ -24864,9 +24968,9 @@
}
],
"isUnique": false,
- "with": {},
+ "concurrently": false,
"method": "gin",
- "concurrently": false
+ "with": {}
},
"documents_latest_body_search_idx": {
"name": "documents_latest_body_search_idx",
@@ -24880,63 +24984,63 @@
}
],
"isUnique": false,
- "with": {},
+ "concurrently": false,
"method": "gin",
- "concurrently": false
+ "with": {}
}
},
"foreignKeys": {
"documents_company_id_companies_id_fk": {
"name": "documents_company_id_companies_id_fk",
"tableFrom": "documents",
+ "tableTo": "companies",
"columnsFrom": [
"company_id"
],
- "tableTo": "companies",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "cascade"
+ "onDelete": "cascade",
+ "onUpdate": "no action"
},
"documents_created_by_agent_id_agents_id_fk": {
"name": "documents_created_by_agent_id_agents_id_fk",
"tableFrom": "documents",
+ "tableTo": "agents",
"columnsFrom": [
"created_by_agent_id"
],
- "tableTo": "agents",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "set null"
+ "onDelete": "set null",
+ "onUpdate": "no action"
},
"documents_updated_by_agent_id_agents_id_fk": {
"name": "documents_updated_by_agent_id_agents_id_fk",
"tableFrom": "documents",
+ "tableTo": "agents",
"columnsFrom": [
"updated_by_agent_id"
],
- "tableTo": "agents",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "set null"
+ "onDelete": "set null",
+ "onUpdate": "no action"
},
"documents_locked_by_agent_id_agents_id_fk": {
"name": "documents_locked_by_agent_id_agents_id_fk",
"tableFrom": "documents",
+ "tableTo": "agents",
"columnsFrom": [
"locked_by_agent_id"
],
- "tableTo": "agents",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "set null"
+ "onDelete": "set null",
+ "onUpdate": "no action"
}
},
"compositePrimaryKeys": {},
@@ -25076,10 +25180,10 @@
}
],
"isUnique": true,
- "with": {},
- "method": "btree",
"where": "\"dot_agent_bindings\".\"revoked_at\" IS NULL",
- "concurrently": false
+ "concurrently": false,
+ "method": "btree",
+ "with": {}
},
"dot_bindings_active_grant_uq": {
"name": "dot_bindings_active_grant_uq",
@@ -25092,10 +25196,10 @@
}
],
"isUnique": true,
- "with": {},
- "method": "btree",
"where": "\"dot_agent_bindings\".\"revoked_at\" IS NULL AND \"dot_agent_bindings\".\"grant_id\" IS NOT NULL",
- "concurrently": false
+ "concurrently": false,
+ "method": "btree",
+ "with": {}
},
"dot_bindings_pairing_code_uq": {
"name": "dot_bindings_pairing_code_uq",
@@ -25108,50 +25212,50 @@
}
],
"isUnique": true,
- "with": {},
+ "concurrently": false,
"method": "btree",
- "concurrently": false
+ "with": {}
}
},
"foreignKeys": {
"dot_agent_bindings_company_id_companies_id_fk": {
"name": "dot_agent_bindings_company_id_companies_id_fk",
"tableFrom": "dot_agent_bindings",
+ "tableTo": "companies",
"columnsFrom": [
"company_id"
],
- "tableTo": "companies",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "cascade"
+ "onDelete": "cascade",
+ "onUpdate": "no action"
},
"dot_agent_bindings_agent_id_agents_id_fk": {
"name": "dot_agent_bindings_agent_id_agents_id_fk",
"tableFrom": "dot_agent_bindings",
+ "tableTo": "agents",
"columnsFrom": [
"agent_id"
],
- "tableTo": "agents",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "cascade"
+ "onDelete": "cascade",
+ "onUpdate": "no action"
},
"dot_agent_bindings_grant_id_mcp_oauth_grants_id_fk": {
"name": "dot_agent_bindings_grant_id_mcp_oauth_grants_id_fk",
"tableFrom": "dot_agent_bindings",
+ "tableTo": "mcp_oauth_grants",
"columnsFrom": [
"grant_id"
],
- "tableTo": "mcp_oauth_grants",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "set null"
+ "onDelete": "set null",
+ "onUpdate": "no action"
}
},
"compositePrimaryKeys": {},
@@ -25244,9 +25348,9 @@
}
],
"isUnique": true,
- "with": {},
+ "concurrently": false,
"method": "btree",
- "concurrently": false
+ "with": {}
},
"dot_mailbox_binding_cursor_idx": {
"name": "dot_mailbox_binding_cursor_idx",
@@ -25271,50 +25375,50 @@
}
],
"isUnique": false,
- "with": {},
+ "concurrently": false,
"method": "btree",
- "concurrently": false
+ "with": {}
}
},
"foreignKeys": {
"dot_mailbox_items_company_id_companies_id_fk": {
"name": "dot_mailbox_items_company_id_companies_id_fk",
"tableFrom": "dot_mailbox_items",
+ "tableTo": "companies",
"columnsFrom": [
"company_id"
],
- "tableTo": "companies",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "cascade"
+ "onDelete": "cascade",
+ "onUpdate": "no action"
},
"dot_mailbox_items_binding_id_dot_agent_bindings_id_fk": {
"name": "dot_mailbox_items_binding_id_dot_agent_bindings_id_fk",
"tableFrom": "dot_mailbox_items",
+ "tableTo": "dot_agent_bindings",
"columnsFrom": [
"binding_id"
],
- "tableTo": "dot_agent_bindings",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "cascade"
+ "onDelete": "cascade",
+ "onUpdate": "no action"
},
"dot_mailbox_items_assignment_id_dot_runner_assignments_id_fk": {
"name": "dot_mailbox_items_assignment_id_dot_runner_assignments_id_fk",
"tableFrom": "dot_mailbox_items",
+ "tableTo": "dot_runner_assignments",
"columnsFrom": [
"assignment_id"
],
- "tableTo": "dot_runner_assignments",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "cascade"
+ "onDelete": "cascade",
+ "onUpdate": "no action"
}
},
"compositePrimaryKeys": {},
@@ -25464,9 +25568,9 @@
}
],
"isUnique": true,
- "with": {},
+ "concurrently": false,
"method": "btree",
- "concurrently": false
+ "with": {}
},
"dot_assignments_active_binding_uq": {
"name": "dot_assignments_active_binding_uq",
@@ -25479,10 +25583,10 @@
}
],
"isUnique": true,
- "with": {},
- "method": "btree",
"where": "\"dot_runner_assignments\".\"status\" IN ('offered', 'accepted')",
- "concurrently": false
+ "concurrently": false,
+ "method": "btree",
+ "with": {}
},
"dot_assignments_company_idx": {
"name": "dot_assignments_company_idx",
@@ -25495,63 +25599,63 @@
}
],
"isUnique": false,
- "with": {},
+ "concurrently": false,
"method": "btree",
- "concurrently": false
+ "with": {}
}
},
"foreignKeys": {
"dot_runner_assignments_company_id_companies_id_fk": {
"name": "dot_runner_assignments_company_id_companies_id_fk",
"tableFrom": "dot_runner_assignments",
+ "tableTo": "companies",
"columnsFrom": [
"company_id"
],
- "tableTo": "companies",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "cascade"
+ "onDelete": "cascade",
+ "onUpdate": "no action"
},
"dot_runner_assignments_binding_id_dot_agent_bindings_id_fk": {
"name": "dot_runner_assignments_binding_id_dot_agent_bindings_id_fk",
"tableFrom": "dot_runner_assignments",
+ "tableTo": "dot_agent_bindings",
"columnsFrom": [
"binding_id"
],
- "tableTo": "dot_agent_bindings",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "cascade"
+ "onDelete": "cascade",
+ "onUpdate": "no action"
},
"dot_runner_assignments_run_id_heartbeat_runs_id_fk": {
"name": "dot_runner_assignments_run_id_heartbeat_runs_id_fk",
"tableFrom": "dot_runner_assignments",
+ "tableTo": "heartbeat_runs",
"columnsFrom": [
"run_id"
],
- "tableTo": "heartbeat_runs",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "cascade"
+ "onDelete": "cascade",
+ "onUpdate": "no action"
},
"dot_runner_assignments_agent_id_agents_id_fk": {
"name": "dot_runner_assignments_agent_id_agents_id_fk",
"tableFrom": "dot_runner_assignments",
+ "tableTo": "agents",
"columnsFrom": [
"agent_id"
],
- "tableTo": "agents",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "cascade"
+ "onDelete": "cascade",
+ "onUpdate": "no action"
}
},
"compositePrimaryKeys": {},
@@ -25665,37 +25769,37 @@
}
],
"isUnique": true,
- "with": {},
+ "concurrently": false,
"method": "btree",
- "concurrently": false
+ "with": {}
}
},
"foreignKeys": {
"dot_runner_operations_company_id_companies_id_fk": {
"name": "dot_runner_operations_company_id_companies_id_fk",
"tableFrom": "dot_runner_operations",
+ "tableTo": "companies",
"columnsFrom": [
"company_id"
],
- "tableTo": "companies",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "cascade"
+ "onDelete": "cascade",
+ "onUpdate": "no action"
},
"dot_runner_operations_assignment_id_dot_runner_assignments_id_fk": {
"name": "dot_runner_operations_assignment_id_dot_runner_assignments_id_fk",
"tableFrom": "dot_runner_operations",
+ "tableTo": "dot_runner_assignments",
"columnsFrom": [
"assignment_id"
],
- "tableTo": "dot_runner_assignments",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "cascade"
+ "onDelete": "cascade",
+ "onUpdate": "no action"
}
},
"compositePrimaryKeys": {},
@@ -25762,17 +25866,17 @@
"email_endpoints_company_id_endpoint_id_chat_endpoints_company_id_id_fk": {
"name": "email_endpoints_company_id_endpoint_id_chat_endpoints_company_id_id_fk",
"tableFrom": "email_endpoints",
+ "tableTo": "chat_endpoints",
"columnsFrom": [
"company_id",
"endpoint_id"
],
- "tableTo": "chat_endpoints",
"columnsTo": [
"company_id",
"id"
],
- "onUpdate": "no action",
- "onDelete": "cascade"
+ "onDelete": "cascade",
+ "onUpdate": "no action"
}
},
"compositePrimaryKeys": {},
@@ -25885,9 +25989,9 @@
}
],
"isUnique": true,
- "with": {},
+ "concurrently": false,
"method": "btree",
- "concurrently": false
+ "with": {}
},
"email_messages_conversation_idx": {
"name": "email_messages_conversation_idx",
@@ -25912,41 +26016,41 @@
}
],
"isUnique": false,
- "with": {},
+ "concurrently": false,
"method": "btree",
- "concurrently": false
+ "with": {}
}
},
"foreignKeys": {
"email_messages_company_id_endpoint_id_chat_endpoints_company_id_id_fk": {
"name": "email_messages_company_id_endpoint_id_chat_endpoints_company_id_id_fk",
"tableFrom": "email_messages",
+ "tableTo": "chat_endpoints",
"columnsFrom": [
"company_id",
"endpoint_id"
],
- "tableTo": "chat_endpoints",
"columnsTo": [
"company_id",
"id"
],
- "onUpdate": "no action",
- "onDelete": "cascade"
+ "onDelete": "cascade",
+ "onUpdate": "no action"
},
"email_messages_company_id_conversation_id_chat_conversations_company_id_id_fk": {
"name": "email_messages_company_id_conversation_id_chat_conversations_company_id_id_fk",
"tableFrom": "email_messages",
+ "tableTo": "chat_conversations",
"columnsFrom": [
"company_id",
"conversation_id"
],
- "tableTo": "chat_conversations",
"columnsTo": [
"company_id",
"id"
],
- "onUpdate": "no action",
- "onDelete": "cascade"
+ "onDelete": "cascade",
+ "onUpdate": "no action"
}
},
"compositePrimaryKeys": {},
@@ -26032,42 +26136,42 @@
}
],
"isUnique": false,
- "with": {},
- "method": "btree",
"where": "\"email_sends\".\"outcome\" in ('queued', 'uncertain')",
- "concurrently": false
+ "concurrently": false,
+ "method": "btree",
+ "with": {}
}
},
"foreignKeys": {
"email_sends_company_id_endpoint_id_chat_endpoints_company_id_id_fk": {
"name": "email_sends_company_id_endpoint_id_chat_endpoints_company_id_id_fk",
"tableFrom": "email_sends",
+ "tableTo": "chat_endpoints",
"columnsFrom": [
"company_id",
"endpoint_id"
],
- "tableTo": "chat_endpoints",
"columnsTo": [
"company_id",
"id"
],
- "onUpdate": "no action",
- "onDelete": "cascade"
+ "onDelete": "cascade",
+ "onUpdate": "no action"
},
"email_sends_company_id_publication_id_chat_publications_company_id_id_fk": {
"name": "email_sends_company_id_publication_id_chat_publications_company_id_id_fk",
"tableFrom": "email_sends",
+ "tableTo": "chat_publications",
"columnsFrom": [
"company_id",
"publication_id"
],
- "tableTo": "chat_publications",
"columnsTo": [
"company_id",
"id"
],
- "onUpdate": "no action",
- "onDelete": "cascade"
+ "onDelete": "cascade",
+ "onUpdate": "no action"
}
},
"compositePrimaryKeys": {},
@@ -26222,9 +26326,9 @@
}
],
"isUnique": false,
- "with": {},
+ "concurrently": false,
"method": "btree",
- "concurrently": false
+ "with": {}
},
"environment_custom_image_setup_sessions_environment_active_uq": {
"name": "environment_custom_image_setup_sessions_environment_active_uq",
@@ -26237,10 +26341,10 @@
}
],
"isUnique": true,
- "with": {},
- "method": "btree",
"where": "\"environment_custom_image_setup_sessions\".\"status\" IN ('starting', 'waiting_for_user', 'capturing')",
- "concurrently": false
+ "concurrently": false,
+ "method": "btree",
+ "with": {}
},
"environment_custom_image_setup_sessions_template_idx": {
"name": "environment_custom_image_setup_sessions_template_idx",
@@ -26253,9 +26357,9 @@
}
],
"isUnique": false,
- "with": {},
+ "concurrently": false,
"method": "btree",
- "concurrently": false
+ "with": {}
},
"environment_custom_image_setup_sessions_promoted_template_idx": {
"name": "environment_custom_image_setup_sessions_promoted_template_idx",
@@ -26268,9 +26372,9 @@
}
],
"isUnique": false,
- "with": {},
+ "concurrently": false,
"method": "btree",
- "concurrently": false
+ "with": {}
},
"environment_custom_image_setup_sessions_expires_idx": {
"name": "environment_custom_image_setup_sessions_expires_idx",
@@ -26283,9 +26387,9 @@
}
],
"isUnique": false,
- "with": {},
+ "concurrently": false,
"method": "btree",
- "concurrently": false
+ "with": {}
},
"environment_custom_image_setup_sessions_provider_lease_idx": {
"name": "environment_custom_image_setup_sessions_provider_lease_idx",
@@ -26304,76 +26408,76 @@
}
],
"isUnique": false,
- "with": {},
+ "concurrently": false,
"method": "btree",
- "concurrently": false
+ "with": {}
}
},
"foreignKeys": {
"environment_custom_image_setup_sessions_environment_id_environments_id_fk": {
"name": "environment_custom_image_setup_sessions_environment_id_environments_id_fk",
"tableFrom": "environment_custom_image_setup_sessions",
+ "tableTo": "environments",
"columnsFrom": [
"environment_id"
],
- "tableTo": "environments",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "cascade"
+ "onDelete": "cascade",
+ "onUpdate": "no action"
},
"environment_custom_image_setup_sessions_template_id_environment_custom_image_templates_id_fk": {
"name": "environment_custom_image_setup_sessions_template_id_environment_custom_image_templates_id_fk",
"tableFrom": "environment_custom_image_setup_sessions",
+ "tableTo": "environment_custom_image_templates",
"columnsFrom": [
"template_id"
],
- "tableTo": "environment_custom_image_templates",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "set null"
+ "onDelete": "set null",
+ "onUpdate": "no action"
},
"environment_custom_image_setup_sessions_promoted_template_id_environment_custom_image_templates_id_fk": {
"name": "environment_custom_image_setup_sessions_promoted_template_id_environment_custom_image_templates_id_fk",
"tableFrom": "environment_custom_image_setup_sessions",
+ "tableTo": "environment_custom_image_templates",
"columnsFrom": [
"promoted_template_id"
],
- "tableTo": "environment_custom_image_templates",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "set null"
+ "onDelete": "set null",
+ "onUpdate": "no action"
},
"environment_custom_image_setup_sessions_environment_lease_id_environment_leases_id_fk": {
"name": "environment_custom_image_setup_sessions_environment_lease_id_environment_leases_id_fk",
"tableFrom": "environment_custom_image_setup_sessions",
+ "tableTo": "environment_leases",
"columnsFrom": [
"environment_lease_id"
],
- "tableTo": "environment_leases",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "set null"
+ "onDelete": "set null",
+ "onUpdate": "no action"
},
"environment_custom_image_setup_sessions_started_by_agent_id_agents_id_fk": {
"name": "environment_custom_image_setup_sessions_started_by_agent_id_agents_id_fk",
"tableFrom": "environment_custom_image_setup_sessions",
+ "tableTo": "agents",
"columnsFrom": [
"started_by_agent_id"
],
- "tableTo": "agents",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "set null"
+ "onDelete": "set null",
+ "onUpdate": "no action"
}
},
"compositePrimaryKeys": {},
@@ -26506,9 +26610,9 @@
}
],
"isUnique": false,
- "with": {},
+ "concurrently": false,
"method": "btree",
- "concurrently": false
+ "with": {}
},
"environment_custom_image_templates_environment_provider_status_idx": {
"name": "environment_custom_image_templates_environment_provider_status_idx",
@@ -26533,9 +26637,9 @@
}
],
"isUnique": false,
- "with": {},
+ "concurrently": false,
"method": "btree",
- "concurrently": false
+ "with": {}
},
"environment_custom_image_templates_environment_active_uq": {
"name": "environment_custom_image_templates_environment_active_uq",
@@ -26548,10 +26652,10 @@
}
],
"isUnique": true,
- "with": {},
- "method": "btree",
"where": "\"environment_custom_image_templates\".\"status\" = 'active'",
- "concurrently": false
+ "concurrently": false,
+ "method": "btree",
+ "with": {}
},
"environment_custom_image_templates_superseded_by_idx": {
"name": "environment_custom_image_templates_superseded_by_idx",
@@ -26564,9 +26668,9 @@
}
],
"isUnique": false,
- "with": {},
+ "concurrently": false,
"method": "btree",
- "concurrently": false
+ "with": {}
},
"environment_custom_image_templates_last_used_idx": {
"name": "environment_custom_image_templates_last_used_idx",
@@ -26579,50 +26683,50 @@
}
],
"isUnique": false,
- "with": {},
+ "concurrently": false,
"method": "btree",
- "concurrently": false
+ "with": {}
}
},
"foreignKeys": {
"environment_custom_image_templates_environment_id_environments_id_fk": {
"name": "environment_custom_image_templates_environment_id_environments_id_fk",
"tableFrom": "environment_custom_image_templates",
+ "tableTo": "environments",
"columnsFrom": [
"environment_id"
],
- "tableTo": "environments",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "cascade"
+ "onDelete": "cascade",
+ "onUpdate": "no action"
},
"environment_custom_image_templates_created_by_agent_id_agents_id_fk": {
"name": "environment_custom_image_templates_created_by_agent_id_agents_id_fk",
"tableFrom": "environment_custom_image_templates",
+ "tableTo": "agents",
"columnsFrom": [
"created_by_agent_id"
],
- "tableTo": "agents",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "set null"
+ "onDelete": "set null",
+ "onUpdate": "no action"
},
"environment_custom_image_templates_superseded_by_template_id_environment_custom_image_templates_id_fk": {
"name": "environment_custom_image_templates_superseded_by_template_id_environment_custom_image_templates_id_fk",
"tableFrom": "environment_custom_image_templates",
+ "tableTo": "environment_custom_image_templates",
"columnsFrom": [
"superseded_by_template_id"
],
- "tableTo": "environment_custom_image_templates",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "set null"
+ "onDelete": "set null",
+ "onUpdate": "no action"
}
},
"compositePrimaryKeys": {},
@@ -26781,9 +26885,9 @@
}
],
"isUnique": false,
- "with": {},
+ "concurrently": false,
"method": "btree",
- "concurrently": false
+ "with": {}
},
"environment_leases_company_execution_workspace_idx": {
"name": "environment_leases_company_execution_workspace_idx",
@@ -26802,9 +26906,9 @@
}
],
"isUnique": false,
- "with": {},
+ "concurrently": false,
"method": "btree",
- "concurrently": false
+ "with": {}
},
"environment_leases_company_issue_idx": {
"name": "environment_leases_company_issue_idx",
@@ -26823,9 +26927,9 @@
}
],
"isUnique": false,
- "with": {},
+ "concurrently": false,
"method": "btree",
- "concurrently": false
+ "with": {}
},
"environment_leases_heartbeat_run_idx": {
"name": "environment_leases_heartbeat_run_idx",
@@ -26838,9 +26942,9 @@
}
],
"isUnique": false,
- "with": {},
+ "concurrently": false,
"method": "btree",
- "concurrently": false
+ "with": {}
},
"environment_leases_company_last_used_idx": {
"name": "environment_leases_company_last_used_idx",
@@ -26859,9 +26963,9 @@
}
],
"isUnique": false,
- "with": {},
+ "concurrently": false,
"method": "btree",
- "concurrently": false
+ "with": {}
},
"environment_leases_provider_lease_idx": {
"name": "environment_leases_provider_lease_idx",
@@ -26874,76 +26978,76 @@
}
],
"isUnique": false,
- "with": {},
+ "concurrently": false,
"method": "btree",
- "concurrently": false
+ "with": {}
}
},
"foreignKeys": {
"environment_leases_company_id_companies_id_fk": {
"name": "environment_leases_company_id_companies_id_fk",
"tableFrom": "environment_leases",
+ "tableTo": "companies",
"columnsFrom": [
"company_id"
],
- "tableTo": "companies",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "cascade"
+ "onDelete": "cascade",
+ "onUpdate": "no action"
},
"environment_leases_environment_id_environments_id_fk": {
"name": "environment_leases_environment_id_environments_id_fk",
"tableFrom": "environment_leases",
+ "tableTo": "environments",
"columnsFrom": [
"environment_id"
],
- "tableTo": "environments",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "set null"
+ "onDelete": "set null",
+ "onUpdate": "no action"
},
"environment_leases_execution_workspace_id_execution_workspaces_id_fk": {
"name": "environment_leases_execution_workspace_id_execution_workspaces_id_fk",
"tableFrom": "environment_leases",
+ "tableTo": "execution_workspaces",
"columnsFrom": [
"execution_workspace_id"
],
- "tableTo": "execution_workspaces",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "set null"
+ "onDelete": "set null",
+ "onUpdate": "no action"
},
"environment_leases_issue_id_issues_id_fk": {
"name": "environment_leases_issue_id_issues_id_fk",
"tableFrom": "environment_leases",
+ "tableTo": "issues",
"columnsFrom": [
"issue_id"
],
- "tableTo": "issues",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "set null"
+ "onDelete": "set null",
+ "onUpdate": "no action"
},
"environment_leases_heartbeat_run_id_heartbeat_runs_id_fk": {
"name": "environment_leases_heartbeat_run_id_heartbeat_runs_id_fk",
"tableFrom": "environment_leases",
+ "tableTo": "heartbeat_runs",
"columnsFrom": [
"heartbeat_run_id"
],
- "tableTo": "heartbeat_runs",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "set null"
+ "onDelete": "set null",
+ "onUpdate": "no action"
}
},
"compositePrimaryKeys": {},
@@ -27036,9 +27140,9 @@
}
],
"isUnique": false,
- "with": {},
+ "concurrently": false,
"method": "btree",
- "concurrently": false
+ "with": {}
},
"environments_local_driver_idx": {
"name": "environments_local_driver_idx",
@@ -27051,10 +27155,10 @@
}
],
"isUnique": true,
- "with": {},
- "method": "btree",
"where": "\"environments\".\"driver\" = 'local'",
- "concurrently": false
+ "concurrently": false,
+ "method": "btree",
+ "with": {}
},
"environments_managed_sandbox_idx": {
"name": "environments_managed_sandbox_idx",
@@ -27067,10 +27171,10 @@
}
],
"isUnique": true,
- "with": {},
- "method": "btree",
"where": "\"environments\".\"driver\" = 'sandbox' AND (\"environments\".\"metadata\" ->> 'managedByPaperclip')::boolean = true",
- "concurrently": false
+ "concurrently": false,
+ "method": "btree",
+ "with": {}
},
"environments_name_idx": {
"name": "environments_name_idx",
@@ -27083,9 +27187,9 @@
}
],
"isUnique": true,
- "with": {},
+ "concurrently": false,
"method": "btree",
- "concurrently": false
+ "with": {}
}
},
"foreignKeys": {},
@@ -27226,9 +27330,9 @@
}
],
"isUnique": true,
- "with": {},
+ "concurrently": false,
"method": "btree",
- "concurrently": false
+ "with": {}
},
"execution_workspace_repositories_path_idx": {
"name": "execution_workspace_repositories_path_idx",
@@ -27247,9 +27351,9 @@
}
],
"isUnique": true,
- "with": {},
+ "concurrently": false,
"method": "btree",
- "concurrently": false
+ "with": {}
},
"execution_workspace_repositories_request_idx": {
"name": "execution_workspace_repositories_request_idx",
@@ -27268,9 +27372,9 @@
}
],
"isUnique": true,
- "with": {},
+ "concurrently": false,
"method": "btree",
- "concurrently": false
+ "with": {}
},
"execution_workspace_repositories_company_workspace_idx": {
"name": "execution_workspace_repositories_company_workspace_idx",
@@ -27289,50 +27393,50 @@
}
],
"isUnique": false,
- "with": {},
+ "concurrently": false,
"method": "btree",
- "concurrently": false
+ "with": {}
}
},
"foreignKeys": {
"execution_workspace_repositories_company_id_companies_id_fk": {
"name": "execution_workspace_repositories_company_id_companies_id_fk",
"tableFrom": "execution_workspace_repositories",
+ "tableTo": "companies",
"columnsFrom": [
"company_id"
],
- "tableTo": "companies",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "cascade"
+ "onDelete": "cascade",
+ "onUpdate": "no action"
},
"execution_workspace_repositories_execution_workspace_id_execution_workspaces_id_fk": {
"name": "execution_workspace_repositories_execution_workspace_id_execution_workspaces_id_fk",
"tableFrom": "execution_workspace_repositories",
+ "tableTo": "execution_workspaces",
"columnsFrom": [
"execution_workspace_id"
],
- "tableTo": "execution_workspaces",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "cascade"
+ "onDelete": "cascade",
+ "onUpdate": "no action"
},
"execution_workspace_repositories_requested_by_issue_id_issues_id_fk": {
"name": "execution_workspace_repositories_requested_by_issue_id_issues_id_fk",
"tableFrom": "execution_workspace_repositories",
+ "tableTo": "issues",
"columnsFrom": [
"requested_by_issue_id"
],
- "tableTo": "issues",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "set null"
+ "onDelete": "set null",
+ "onUpdate": "no action"
}
},
"compositePrimaryKeys": {},
@@ -27445,24 +27549,24 @@
}
],
"isUnique": true,
- "with": {},
+ "concurrently": false,
"method": "btree",
- "concurrently": false
+ "with": {}
}
},
"foreignKeys": {
"execution_workspace_repository_access_company_id_companies_id_fk": {
"name": "execution_workspace_repository_access_company_id_companies_id_fk",
"tableFrom": "execution_workspace_repository_access",
+ "tableTo": "companies",
"columnsFrom": [
"company_id"
],
- "tableTo": "companies",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "cascade"
+ "onDelete": "cascade",
+ "onUpdate": "no action"
}
},
"compositePrimaryKeys": {},
@@ -27539,24 +27643,24 @@
}
],
"isUnique": true,
- "with": {},
+ "concurrently": false,
"method": "btree",
- "concurrently": false
+ "with": {}
}
},
"foreignKeys": {
"execution_workspace_repository_roots_company_id_companies_id_fk": {
"name": "execution_workspace_repository_roots_company_id_companies_id_fk",
"tableFrom": "execution_workspace_repository_roots",
+ "tableTo": "companies",
"columnsFrom": [
"company_id"
],
- "tableTo": "companies",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "cascade"
+ "onDelete": "cascade",
+ "onUpdate": "no action"
}
},
"compositePrimaryKeys": {},
@@ -27677,9 +27781,9 @@
}
],
"isUnique": false,
- "with": {},
+ "concurrently": false,
"method": "btree",
- "concurrently": false
+ "with": {}
},
"execution_workspace_runtime_leases_company_owner_idx": {
"name": "execution_workspace_runtime_leases_company_owner_idx",
@@ -27698,9 +27802,9 @@
}
],
"isUnique": false,
- "with": {},
+ "concurrently": false,
"method": "btree",
- "concurrently": false
+ "with": {}
},
"execution_workspace_runtime_leases_expires_at_idx": {
"name": "execution_workspace_runtime_leases_expires_at_idx",
@@ -27713,86 +27817,86 @@
}
],
"isUnique": false,
- "with": {},
+ "concurrently": false,
"method": "btree",
- "concurrently": false
+ "with": {}
}
},
"foreignKeys": {
"execution_workspace_runtime_leases_company_id_companies_id_fk": {
"name": "execution_workspace_runtime_leases_company_id_companies_id_fk",
"tableFrom": "execution_workspace_runtime_leases",
+ "tableTo": "companies",
"columnsFrom": [
"company_id"
],
- "tableTo": "companies",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "cascade"
+ "onDelete": "cascade",
+ "onUpdate": "no action"
},
"execution_workspace_runtime_leases_execution_workspace_id_execution_workspaces_id_fk": {
"name": "execution_workspace_runtime_leases_execution_workspace_id_execution_workspaces_id_fk",
"tableFrom": "execution_workspace_runtime_leases",
+ "tableTo": "execution_workspaces",
"columnsFrom": [
"execution_workspace_id"
],
- "tableTo": "execution_workspaces",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "cascade"
+ "onDelete": "cascade",
+ "onUpdate": "no action"
},
"execution_workspace_runtime_leases_owner_issue_id_issues_id_fk": {
"name": "execution_workspace_runtime_leases_owner_issue_id_issues_id_fk",
"tableFrom": "execution_workspace_runtime_leases",
+ "tableTo": "issues",
"columnsFrom": [
"owner_issue_id"
],
- "tableTo": "issues",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "set null"
+ "onDelete": "set null",
+ "onUpdate": "no action"
},
"execution_workspace_runtime_leases_owner_run_id_heartbeat_runs_id_fk": {
"name": "execution_workspace_runtime_leases_owner_run_id_heartbeat_runs_id_fk",
"tableFrom": "execution_workspace_runtime_leases",
+ "tableTo": "heartbeat_runs",
"columnsFrom": [
"owner_run_id"
],
- "tableTo": "heartbeat_runs",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "set null"
+ "onDelete": "set null",
+ "onUpdate": "no action"
},
"execution_workspace_runtime_leases_owner_agent_id_agents_id_fk": {
"name": "execution_workspace_runtime_leases_owner_agent_id_agents_id_fk",
"tableFrom": "execution_workspace_runtime_leases",
+ "tableTo": "agents",
"columnsFrom": [
"owner_agent_id"
],
- "tableTo": "agents",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "set null"
+ "onDelete": "set null",
+ "onUpdate": "no action"
}
},
"compositePrimaryKeys": {},
"uniqueConstraints": {
"execution_workspace_runtime_leases_execution_workspace_id_unique": {
"name": "execution_workspace_runtime_leases_execution_workspace_id_unique",
+ "nullsNotDistinct": false,
"columns": [
"execution_workspace_id"
- ],
- "nullsNotDistinct": false
+ ]
}
},
"policies": {},
@@ -27979,9 +28083,9 @@
}
],
"isUnique": false,
- "with": {},
+ "concurrently": false,
"method": "btree",
- "concurrently": false
+ "with": {}
},
"execution_workspaces_company_project_workspace_status_idx": {
"name": "execution_workspaces_company_project_workspace_status_idx",
@@ -28006,9 +28110,9 @@
}
],
"isUnique": false,
- "with": {},
+ "concurrently": false,
"method": "btree",
- "concurrently": false
+ "with": {}
},
"execution_workspaces_company_source_issue_idx": {
"name": "execution_workspaces_company_source_issue_idx",
@@ -28027,9 +28131,9 @@
}
],
"isUnique": false,
- "with": {},
+ "concurrently": false,
"method": "btree",
- "concurrently": false
+ "with": {}
},
"execution_workspaces_company_last_used_idx": {
"name": "execution_workspaces_company_last_used_idx",
@@ -28048,9 +28152,9 @@
}
],
"isUnique": false,
- "with": {},
+ "concurrently": false,
"method": "btree",
- "concurrently": false
+ "with": {}
},
"execution_workspaces_company_branch_idx": {
"name": "execution_workspaces_company_branch_idx",
@@ -28069,76 +28173,76 @@
}
],
"isUnique": false,
- "with": {},
+ "concurrently": false,
"method": "btree",
- "concurrently": false
+ "with": {}
}
},
"foreignKeys": {
"execution_workspaces_company_id_companies_id_fk": {
"name": "execution_workspaces_company_id_companies_id_fk",
"tableFrom": "execution_workspaces",
+ "tableTo": "companies",
"columnsFrom": [
"company_id"
],
- "tableTo": "companies",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "cascade"
+ "onDelete": "cascade",
+ "onUpdate": "no action"
},
"execution_workspaces_project_id_projects_id_fk": {
"name": "execution_workspaces_project_id_projects_id_fk",
"tableFrom": "execution_workspaces",
+ "tableTo": "projects",
"columnsFrom": [
"project_id"
],
- "tableTo": "projects",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "restrict"
+ "onDelete": "restrict",
+ "onUpdate": "no action"
},
"execution_workspaces_project_workspace_id_project_workspaces_id_fk": {
"name": "execution_workspaces_project_workspace_id_project_workspaces_id_fk",
"tableFrom": "execution_workspaces",
+ "tableTo": "project_workspaces",
"columnsFrom": [
"project_workspace_id"
],
- "tableTo": "project_workspaces",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "set null"
+ "onDelete": "set null",
+ "onUpdate": "no action"
},
"execution_workspaces_source_issue_id_issues_id_fk": {
"name": "execution_workspaces_source_issue_id_issues_id_fk",
"tableFrom": "execution_workspaces",
+ "tableTo": "issues",
"columnsFrom": [
"source_issue_id"
],
- "tableTo": "issues",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "set null"
+ "onDelete": "set null",
+ "onUpdate": "no action"
},
"execution_workspaces_derived_from_execution_workspace_id_execution_workspaces_id_fk": {
"name": "execution_workspaces_derived_from_execution_workspace_id_execution_workspaces_id_fk",
"tableFrom": "execution_workspaces",
+ "tableTo": "execution_workspaces",
"columnsFrom": [
"derived_from_execution_workspace_id"
],
- "tableTo": "execution_workspaces",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "set null"
+ "onDelete": "set null",
+ "onUpdate": "no action"
}
},
"compositePrimaryKeys": {},
@@ -28288,9 +28392,9 @@
}
],
"isUnique": false,
- "with": {},
+ "concurrently": false,
"method": "btree",
- "concurrently": false
+ "with": {}
},
"external_object_mentions_company_object_idx": {
"name": "external_object_mentions_company_object_idx",
@@ -28309,9 +28413,9 @@
}
],
"isUnique": false,
- "with": {},
+ "concurrently": false,
"method": "btree",
- "concurrently": false
+ "with": {}
},
"external_object_mentions_company_provider_idx": {
"name": "external_object_mentions_company_provider_idx",
@@ -28336,9 +28440,9 @@
}
],
"isUnique": false,
- "with": {},
+ "concurrently": false,
"method": "btree",
- "concurrently": false
+ "with": {}
},
"external_object_mentions_company_source_record_uq": {
"name": "external_object_mentions_company_source_record_uq",
@@ -28387,10 +28491,10 @@
}
],
"isUnique": true,
- "with": {},
- "method": "btree",
"where": "\"external_object_mentions\".\"source_record_id\" is not null and \"external_object_mentions\".\"canonical_identity_hash\" is not null",
- "concurrently": false
+ "concurrently": false,
+ "method": "btree",
+ "with": {}
},
"external_object_mentions_company_source_null_record_uq": {
"name": "external_object_mentions_company_source_null_record_uq",
@@ -28433,64 +28537,64 @@
}
],
"isUnique": true,
- "with": {},
- "method": "btree",
"where": "\"external_object_mentions\".\"source_record_id\" is null and \"external_object_mentions\".\"canonical_identity_hash\" is not null",
- "concurrently": false
+ "concurrently": false,
+ "method": "btree",
+ "with": {}
}
},
"foreignKeys": {
"external_object_mentions_company_id_companies_id_fk": {
"name": "external_object_mentions_company_id_companies_id_fk",
"tableFrom": "external_object_mentions",
+ "tableTo": "companies",
"columnsFrom": [
"company_id"
],
- "tableTo": "companies",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "cascade"
+ "onDelete": "cascade",
+ "onUpdate": "no action"
},
"external_object_mentions_source_issue_id_issues_id_fk": {
"name": "external_object_mentions_source_issue_id_issues_id_fk",
"tableFrom": "external_object_mentions",
+ "tableTo": "issues",
"columnsFrom": [
"source_issue_id"
],
- "tableTo": "issues",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "cascade"
+ "onDelete": "cascade",
+ "onUpdate": "no action"
},
"external_object_mentions_object_id_external_objects_id_fk": {
"name": "external_object_mentions_object_id_external_objects_id_fk",
"tableFrom": "external_object_mentions",
+ "tableTo": "external_objects",
"columnsFrom": [
"object_id"
],
- "tableTo": "external_objects",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "set null"
+ "onDelete": "set null",
+ "onUpdate": "no action"
},
"external_object_mentions_created_by_plugin_id_plugins_id_fk": {
"name": "external_object_mentions_created_by_plugin_id_plugins_id_fk",
"tableFrom": "external_object_mentions",
+ "tableTo": "plugins",
"columnsFrom": [
"created_by_plugin_id"
],
- "tableTo": "plugins",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "set null"
+ "onDelete": "set null",
+ "onUpdate": "no action"
}
},
"compositePrimaryKeys": {},
@@ -28722,9 +28826,9 @@
}
],
"isUnique": false,
- "with": {},
+ "concurrently": false,
"method": "btree",
- "concurrently": false
+ "with": {}
},
"external_objects_company_provider_status_idx": {
"name": "external_objects_company_provider_status_idx",
@@ -28749,9 +28853,9 @@
}
],
"isUnique": false,
- "with": {},
+ "concurrently": false,
"method": "btree",
- "concurrently": false
+ "with": {}
},
"external_objects_company_refresh_idx": {
"name": "external_objects_company_refresh_idx",
@@ -28770,9 +28874,9 @@
}
],
"isUnique": false,
- "with": {},
+ "concurrently": false,
"method": "btree",
- "concurrently": false
+ "with": {}
},
"external_objects_company_external_id_uq": {
"name": "external_objects_company_external_id_uq",
@@ -28803,9 +28907,9 @@
}
],
"isUnique": true,
- "with": {},
+ "concurrently": false,
"method": "btree",
- "concurrently": false
+ "with": {}
},
"external_objects_company_identity_uq": {
"name": "external_objects_company_identity_uq",
@@ -28836,37 +28940,37 @@
}
],
"isUnique": true,
- "with": {},
+ "concurrently": false,
"method": "btree",
- "concurrently": false
+ "with": {}
}
},
"foreignKeys": {
"external_objects_company_id_companies_id_fk": {
"name": "external_objects_company_id_companies_id_fk",
"tableFrom": "external_objects",
+ "tableTo": "companies",
"columnsFrom": [
"company_id"
],
- "tableTo": "companies",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "cascade"
+ "onDelete": "cascade",
+ "onUpdate": "no action"
},
"external_objects_plugin_id_plugins_id_fk": {
"name": "external_objects_plugin_id_plugins_id_fk",
"tableFrom": "external_objects",
+ "tableTo": "plugins",
"columnsFrom": [
"plugin_id"
],
- "tableTo": "plugins",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "set null"
+ "onDelete": "set null",
+ "onUpdate": "no action"
}
},
"compositePrimaryKeys": {},
@@ -28936,15 +29040,15 @@
"company_fast_responses_company_id_companies_id_fk": {
"name": "company_fast_responses_company_id_companies_id_fk",
"tableFrom": "company_fast_responses",
+ "tableTo": "companies",
"columnsFrom": [
"company_id"
],
- "tableTo": "companies",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "cascade"
+ "onDelete": "cascade",
+ "onUpdate": "no action"
}
},
"compositePrimaryKeys": {},
@@ -29166,9 +29270,9 @@
}
],
"isUnique": true,
- "with": {},
+ "concurrently": false,
"method": "btree",
- "concurrently": false
+ "with": {}
},
"fast_response_requests_history_idx": {
"name": "fast_response_requests_history_idx",
@@ -29187,9 +29291,9 @@
}
],
"isUnique": false,
- "with": {},
+ "concurrently": false,
"method": "btree",
- "concurrently": false
+ "with": {}
},
"fast_response_requests_work_idx": {
"name": "fast_response_requests_work_idx",
@@ -29202,38 +29306,38 @@
}
],
"isUnique": false,
- "with": {},
- "method": "btree",
"where": "\"fast_response_requests\".\"status\" in ('pending', 'running')",
- "concurrently": false
+ "concurrently": false,
+ "method": "btree",
+ "with": {}
}
},
"foreignKeys": {
"fast_response_requests_company_id_companies_id_fk": {
"name": "fast_response_requests_company_id_companies_id_fk",
"tableFrom": "fast_response_requests",
+ "tableTo": "companies",
"columnsFrom": [
"company_id"
],
- "tableTo": "companies",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "cascade"
+ "onDelete": "cascade",
+ "onUpdate": "no action"
},
"fast_response_requests_cost_event_id_cost_events_id_fk": {
"name": "fast_response_requests_cost_event_id_cost_events_id_fk",
"tableFrom": "fast_response_requests",
+ "tableTo": "cost_events",
"columnsFrom": [
"cost_event_id"
],
- "tableTo": "cost_events",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "no action"
+ "onDelete": "no action",
+ "onUpdate": "no action"
}
},
"compositePrimaryKeys": {},
@@ -29428,9 +29532,9 @@
}
],
"isUnique": true,
- "with": {},
+ "concurrently": false,
"method": "btree",
- "concurrently": false
+ "with": {}
},
"feedback_exports_company_created_idx": {
"name": "feedback_exports_company_created_idx",
@@ -29449,9 +29553,9 @@
}
],
"isUnique": false,
- "with": {},
+ "concurrently": false,
"method": "btree",
- "concurrently": false
+ "with": {}
},
"feedback_exports_company_status_idx": {
"name": "feedback_exports_company_status_idx",
@@ -29476,9 +29580,9 @@
}
],
"isUnique": false,
- "with": {},
+ "concurrently": false,
"method": "btree",
- "concurrently": false
+ "with": {}
},
"feedback_exports_company_issue_idx": {
"name": "feedback_exports_company_issue_idx",
@@ -29503,9 +29607,9 @@
}
],
"isUnique": false,
- "with": {},
+ "concurrently": false,
"method": "btree",
- "concurrently": false
+ "with": {}
},
"feedback_exports_company_project_idx": {
"name": "feedback_exports_company_project_idx",
@@ -29530,9 +29634,9 @@
}
],
"isUnique": false,
- "with": {},
+ "concurrently": false,
"method": "btree",
- "concurrently": false
+ "with": {}
},
"feedback_exports_company_author_idx": {
"name": "feedback_exports_company_author_idx",
@@ -29557,63 +29661,63 @@
}
],
"isUnique": false,
- "with": {},
+ "concurrently": false,
"method": "btree",
- "concurrently": false
+ "with": {}
}
},
"foreignKeys": {
"feedback_exports_company_id_companies_id_fk": {
"name": "feedback_exports_company_id_companies_id_fk",
"tableFrom": "feedback_exports",
+ "tableTo": "companies",
"columnsFrom": [
"company_id"
],
- "tableTo": "companies",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "no action"
+ "onDelete": "no action",
+ "onUpdate": "no action"
},
"feedback_exports_feedback_vote_id_feedback_votes_id_fk": {
"name": "feedback_exports_feedback_vote_id_feedback_votes_id_fk",
"tableFrom": "feedback_exports",
+ "tableTo": "feedback_votes",
"columnsFrom": [
"feedback_vote_id"
],
- "tableTo": "feedback_votes",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "cascade"
+ "onDelete": "cascade",
+ "onUpdate": "no action"
},
"feedback_exports_issue_id_issues_id_fk": {
"name": "feedback_exports_issue_id_issues_id_fk",
"tableFrom": "feedback_exports",
+ "tableTo": "issues",
"columnsFrom": [
"issue_id"
],
- "tableTo": "issues",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "cascade"
+ "onDelete": "cascade",
+ "onUpdate": "no action"
},
"feedback_exports_project_id_projects_id_fk": {
"name": "feedback_exports_project_id_projects_id_fk",
"tableFrom": "feedback_exports",
+ "tableTo": "projects",
"columnsFrom": [
"project_id"
],
- "tableTo": "projects",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "set null"
+ "onDelete": "set null",
+ "onUpdate": "no action"
}
},
"compositePrimaryKeys": {},
@@ -29733,9 +29837,9 @@
}
],
"isUnique": false,
- "with": {},
+ "concurrently": false,
"method": "btree",
- "concurrently": false
+ "with": {}
},
"feedback_votes_issue_target_idx": {
"name": "feedback_votes_issue_target_idx",
@@ -29760,9 +29864,9 @@
}
],
"isUnique": false,
- "with": {},
+ "concurrently": false,
"method": "btree",
- "concurrently": false
+ "with": {}
},
"feedback_votes_author_idx": {
"name": "feedback_votes_author_idx",
@@ -29781,9 +29885,9 @@
}
],
"isUnique": false,
- "with": {},
+ "concurrently": false,
"method": "btree",
- "concurrently": false
+ "with": {}
},
"feedback_votes_company_target_author_idx": {
"name": "feedback_votes_company_target_author_idx",
@@ -29814,37 +29918,37 @@
}
],
"isUnique": true,
- "with": {},
+ "concurrently": false,
"method": "btree",
- "concurrently": false
+ "with": {}
}
},
"foreignKeys": {
"feedback_votes_company_id_companies_id_fk": {
"name": "feedback_votes_company_id_companies_id_fk",
"tableFrom": "feedback_votes",
+ "tableTo": "companies",
"columnsFrom": [
"company_id"
],
- "tableTo": "companies",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "no action"
+ "onDelete": "no action",
+ "onUpdate": "no action"
},
"feedback_votes_issue_id_issues_id_fk": {
"name": "feedback_votes_issue_id_issues_id_fk",
"tableFrom": "feedback_votes",
+ "tableTo": "issues",
"columnsFrom": [
"issue_id"
],
- "tableTo": "issues",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "cascade"
+ "onDelete": "cascade",
+ "onUpdate": "no action"
}
},
"compositePrimaryKeys": {},
@@ -30055,9 +30159,9 @@
}
],
"isUnique": true,
- "with": {},
+ "concurrently": false,
"method": "btree",
- "concurrently": false
+ "with": {}
},
"finance_events_company_occurred_idx": {
"name": "finance_events_company_occurred_idx",
@@ -30076,9 +30180,9 @@
}
],
"isUnique": false,
- "with": {},
+ "concurrently": false,
"method": "btree",
- "concurrently": false
+ "with": {}
},
"finance_events_company_biller_occurred_idx": {
"name": "finance_events_company_biller_occurred_idx",
@@ -30103,9 +30207,9 @@
}
],
"isUnique": false,
- "with": {},
+ "concurrently": false,
"method": "btree",
- "concurrently": false
+ "with": {}
},
"finance_events_company_kind_occurred_idx": {
"name": "finance_events_company_kind_occurred_idx",
@@ -30130,9 +30234,9 @@
}
],
"isUnique": false,
- "with": {},
+ "concurrently": false,
"method": "btree",
- "concurrently": false
+ "with": {}
},
"finance_events_company_direction_occurred_idx": {
"name": "finance_events_company_direction_occurred_idx",
@@ -30157,9 +30261,9 @@
}
],
"isUnique": false,
- "with": {},
+ "concurrently": false,
"method": "btree",
- "concurrently": false
+ "with": {}
},
"finance_events_company_heartbeat_run_idx": {
"name": "finance_events_company_heartbeat_run_idx",
@@ -30178,9 +30282,9 @@
}
],
"isUnique": false,
- "with": {},
+ "concurrently": false,
"method": "btree",
- "concurrently": false
+ "with": {}
},
"finance_events_company_cost_event_idx": {
"name": "finance_events_company_cost_event_idx",
@@ -30199,102 +30303,102 @@
}
],
"isUnique": false,
- "with": {},
+ "concurrently": false,
"method": "btree",
- "concurrently": false
+ "with": {}
}
},
"foreignKeys": {
"finance_events_company_id_companies_id_fk": {
"name": "finance_events_company_id_companies_id_fk",
"tableFrom": "finance_events",
+ "tableTo": "companies",
"columnsFrom": [
"company_id"
],
- "tableTo": "companies",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "no action"
+ "onDelete": "no action",
+ "onUpdate": "no action"
},
"finance_events_agent_id_agents_id_fk": {
"name": "finance_events_agent_id_agents_id_fk",
"tableFrom": "finance_events",
+ "tableTo": "agents",
"columnsFrom": [
"agent_id"
],
- "tableTo": "agents",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "no action"
+ "onDelete": "no action",
+ "onUpdate": "no action"
},
"finance_events_issue_id_issues_id_fk": {
"name": "finance_events_issue_id_issues_id_fk",
"tableFrom": "finance_events",
+ "tableTo": "issues",
"columnsFrom": [
"issue_id"
],
- "tableTo": "issues",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "set null"
+ "onDelete": "set null",
+ "onUpdate": "no action"
},
"finance_events_project_id_projects_id_fk": {
"name": "finance_events_project_id_projects_id_fk",
"tableFrom": "finance_events",
+ "tableTo": "projects",
"columnsFrom": [
"project_id"
],
- "tableTo": "projects",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "no action"
+ "onDelete": "no action",
+ "onUpdate": "no action"
},
"finance_events_goal_id_goals_id_fk": {
"name": "finance_events_goal_id_goals_id_fk",
"tableFrom": "finance_events",
+ "tableTo": "goals",
"columnsFrom": [
"goal_id"
],
- "tableTo": "goals",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "no action"
+ "onDelete": "no action",
+ "onUpdate": "no action"
},
"finance_events_heartbeat_run_id_heartbeat_runs_id_fk": {
"name": "finance_events_heartbeat_run_id_heartbeat_runs_id_fk",
"tableFrom": "finance_events",
+ "tableTo": "heartbeat_runs",
"columnsFrom": [
"heartbeat_run_id"
],
- "tableTo": "heartbeat_runs",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "no action"
+ "onDelete": "no action",
+ "onUpdate": "no action"
},
"finance_events_cost_event_id_cost_events_id_fk": {
"name": "finance_events_cost_event_id_cost_events_id_fk",
"tableFrom": "finance_events",
+ "tableTo": "cost_events",
"columnsFrom": [
"cost_event_id"
],
- "tableTo": "cost_events",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "no action"
+ "onDelete": "no action",
+ "onUpdate": "no action"
}
},
"compositePrimaryKeys": {},
@@ -30408,9 +30512,9 @@
}
],
"isUnique": false,
- "with": {},
+ "concurrently": false,
"method": "btree",
- "concurrently": false
+ "with": {}
},
"folders_company_kind_root_slug_uq": {
"name": "folders_company_kind_root_slug_uq",
@@ -30435,10 +30539,10 @@
}
],
"isUnique": true,
- "with": {},
- "method": "btree",
"where": "\"folders\".\"parent_id\" is null",
- "concurrently": false
+ "concurrently": false,
+ "method": "btree",
+ "with": {}
},
"folders_company_kind_parent_slug_uq": {
"name": "folders_company_kind_parent_slug_uq",
@@ -30469,10 +30573,10 @@
}
],
"isUnique": true,
- "with": {},
- "method": "btree",
"where": "\"folders\".\"parent_id\" is not null",
- "concurrently": false
+ "concurrently": false,
+ "method": "btree",
+ "with": {}
},
"folders_company_kind_system_key_uq": {
"name": "folders_company_kind_system_key_uq",
@@ -30497,10 +30601,10 @@
}
],
"isUnique": true,
- "with": {},
- "method": "btree",
"where": "\"folders\".\"system_key\" is not null",
- "concurrently": false
+ "concurrently": false,
+ "method": "btree",
+ "with": {}
},
"folders_company_kind_parent_position_idx": {
"name": "folders_company_kind_parent_position_idx",
@@ -30537,37 +30641,37 @@
}
],
"isUnique": false,
- "with": {},
+ "concurrently": false,
"method": "btree",
- "concurrently": false
+ "with": {}
}
},
"foreignKeys": {
"folders_company_id_companies_id_fk": {
"name": "folders_company_id_companies_id_fk",
"tableFrom": "folders",
+ "tableTo": "companies",
"columnsFrom": [
"company_id"
],
- "tableTo": "companies",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "cascade"
+ "onDelete": "cascade",
+ "onUpdate": "no action"
},
"folders_parent_id_folders_id_fk": {
"name": "folders_parent_id_folders_id_fk",
"tableFrom": "folders",
+ "tableTo": "folders",
"columnsFrom": [
"parent_id"
],
- "tableTo": "folders",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "restrict"
+ "onDelete": "restrict",
+ "onUpdate": "no action"
}
},
"compositePrimaryKeys": {},
@@ -30658,50 +30762,50 @@
}
],
"isUnique": false,
- "with": {},
+ "concurrently": false,
"method": "btree",
- "concurrently": false
+ "with": {}
}
},
"foreignKeys": {
"goals_company_id_companies_id_fk": {
"name": "goals_company_id_companies_id_fk",
"tableFrom": "goals",
+ "tableTo": "companies",
"columnsFrom": [
"company_id"
],
- "tableTo": "companies",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "no action"
+ "onDelete": "no action",
+ "onUpdate": "no action"
},
"goals_parent_id_goals_id_fk": {
"name": "goals_parent_id_goals_id_fk",
"tableFrom": "goals",
+ "tableTo": "goals",
"columnsFrom": [
"parent_id"
],
- "tableTo": "goals",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "no action"
+ "onDelete": "no action",
+ "onUpdate": "no action"
},
"goals_owner_agent_id_agents_id_fk": {
"name": "goals_owner_agent_id_agents_id_fk",
"tableFrom": "goals",
+ "tableTo": "agents",
"columnsFrom": [
"owner_agent_id"
],
- "tableTo": "agents",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "no action"
+ "onDelete": "no action",
+ "onUpdate": "no action"
}
},
"compositePrimaryKeys": {},
@@ -30863,9 +30967,9 @@
}
],
"isUnique": true,
- "with": {},
+ "concurrently": false,
"method": "btree",
- "concurrently": false
+ "with": {}
},
"grok_dispatch_company_status_idx": {
"name": "grok_dispatch_company_status_idx",
@@ -30884,9 +30988,9 @@
}
],
"isUnique": false,
- "with": {},
+ "concurrently": false,
"method": "btree",
- "concurrently": false
+ "with": {}
},
"grok_dispatch_assignment_kind_idx": {
"name": "grok_dispatch_assignment_kind_idx",
@@ -30905,76 +31009,76 @@
}
],
"isUnique": false,
- "with": {},
+ "concurrently": false,
"method": "btree",
- "concurrently": false
+ "with": {}
}
},
"foreignKeys": {
"grok_bot_dispatches_company_id_companies_id_fk": {
"name": "grok_bot_dispatches_company_id_companies_id_fk",
"tableFrom": "grok_bot_dispatches",
+ "tableTo": "companies",
"columnsFrom": [
"company_id"
],
- "tableTo": "companies",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "cascade"
+ "onDelete": "cascade",
+ "onUpdate": "no action"
},
"grok_bot_dispatches_routine_id_grok_bot_routines_id_fk": {
"name": "grok_bot_dispatches_routine_id_grok_bot_routines_id_fk",
"tableFrom": "grok_bot_dispatches",
+ "tableTo": "grok_bot_routines",
"columnsFrom": [
"routine_id"
],
- "tableTo": "grok_bot_routines",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "cascade"
+ "onDelete": "cascade",
+ "onUpdate": "no action"
},
"grok_bot_dispatches_binding_id_dot_agent_bindings_id_fk": {
"name": "grok_bot_dispatches_binding_id_dot_agent_bindings_id_fk",
"tableFrom": "grok_bot_dispatches",
+ "tableTo": "dot_agent_bindings",
"columnsFrom": [
"binding_id"
],
- "tableTo": "dot_agent_bindings",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "cascade"
+ "onDelete": "cascade",
+ "onUpdate": "no action"
},
"grok_bot_dispatches_grant_id_mcp_oauth_grants_id_fk": {
"name": "grok_bot_dispatches_grant_id_mcp_oauth_grants_id_fk",
"tableFrom": "grok_bot_dispatches",
+ "tableTo": "mcp_oauth_grants",
"columnsFrom": [
"grant_id"
],
- "tableTo": "mcp_oauth_grants",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "cascade"
+ "onDelete": "cascade",
+ "onUpdate": "no action"
},
"grok_bot_dispatches_assignment_id_dot_runner_assignments_id_fk": {
"name": "grok_bot_dispatches_assignment_id_dot_runner_assignments_id_fk",
"tableFrom": "grok_bot_dispatches",
+ "tableTo": "dot_runner_assignments",
"columnsFrom": [
"assignment_id"
],
- "tableTo": "dot_runner_assignments",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "cascade"
+ "onDelete": "cascade",
+ "onUpdate": "no action"
}
},
"compositePrimaryKeys": {},
@@ -31100,9 +31204,9 @@
}
],
"isUnique": true,
- "with": {},
+ "concurrently": false,
"method": "btree",
- "concurrently": false
+ "with": {}
},
"grok_routines_company_agent_idx": {
"name": "grok_routines_company_agent_idx",
@@ -31121,76 +31225,76 @@
}
],
"isUnique": false,
- "with": {},
+ "concurrently": false,
"method": "btree",
- "concurrently": false
+ "with": {}
}
},
"foreignKeys": {
"grok_bot_routines_company_id_companies_id_fk": {
"name": "grok_bot_routines_company_id_companies_id_fk",
"tableFrom": "grok_bot_routines",
+ "tableTo": "companies",
"columnsFrom": [
"company_id"
],
- "tableTo": "companies",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "cascade"
+ "onDelete": "cascade",
+ "onUpdate": "no action"
},
"grok_bot_routines_agent_id_agents_id_fk": {
"name": "grok_bot_routines_agent_id_agents_id_fk",
"tableFrom": "grok_bot_routines",
+ "tableTo": "agents",
"columnsFrom": [
"agent_id"
],
- "tableTo": "agents",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "cascade"
+ "onDelete": "cascade",
+ "onUpdate": "no action"
},
"grok_bot_routines_binding_id_dot_agent_bindings_id_fk": {
"name": "grok_bot_routines_binding_id_dot_agent_bindings_id_fk",
"tableFrom": "grok_bot_routines",
+ "tableTo": "dot_agent_bindings",
"columnsFrom": [
"binding_id"
],
- "tableTo": "dot_agent_bindings",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "cascade"
+ "onDelete": "cascade",
+ "onUpdate": "no action"
},
"grok_bot_routines_secret_id_company_secrets_id_fk": {
"name": "grok_bot_routines_secret_id_company_secrets_id_fk",
"tableFrom": "grok_bot_routines",
+ "tableTo": "company_secrets",
"columnsFrom": [
"secret_id"
],
- "tableTo": "company_secrets",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "no action"
+ "onDelete": "no action",
+ "onUpdate": "no action"
},
"grok_bot_routines_verified_grant_id_mcp_oauth_grants_id_fk": {
"name": "grok_bot_routines_verified_grant_id_mcp_oauth_grants_id_fk",
"tableFrom": "grok_bot_routines",
+ "tableTo": "mcp_oauth_grants",
"columnsFrom": [
"verified_grant_id"
],
- "tableTo": "mcp_oauth_grants",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "set null"
+ "onDelete": "set null",
+ "onUpdate": "no action"
}
},
"compositePrimaryKeys": {},
@@ -31325,9 +31429,9 @@
}
],
"isUnique": true,
- "with": {},
+ "concurrently": false,
"method": "btree",
- "concurrently": false
+ "with": {}
},
"heartbeat_run_events_run_source_event_uq": {
"name": "heartbeat_run_events_run_source_event_uq",
@@ -31346,10 +31450,10 @@
}
],
"isUnique": true,
- "with": {},
- "method": "btree",
"where": "\"heartbeat_run_events\".\"source_event_id\" is not null",
- "concurrently": false
+ "concurrently": false,
+ "method": "btree",
+ "with": {}
},
"heartbeat_run_events_run_source_seq_uq": {
"name": "heartbeat_run_events_run_source_seq_uq",
@@ -31374,10 +31478,10 @@
}
],
"isUnique": true,
- "with": {},
- "method": "btree",
"where": "\"heartbeat_run_events\".\"source_instance_id\" is not null and \"heartbeat_run_events\".\"source_seq\" is not null",
- "concurrently": false
+ "concurrently": false,
+ "method": "btree",
+ "with": {}
},
"heartbeat_run_events_company_run_idx": {
"name": "heartbeat_run_events_company_run_idx",
@@ -31396,9 +31500,9 @@
}
],
"isUnique": false,
- "with": {},
+ "concurrently": false,
"method": "btree",
- "concurrently": false
+ "with": {}
},
"heartbeat_run_events_company_created_idx": {
"name": "heartbeat_run_events_company_created_idx",
@@ -31417,50 +31521,50 @@
}
],
"isUnique": false,
- "with": {},
+ "concurrently": false,
"method": "btree",
- "concurrently": false
+ "with": {}
}
},
"foreignKeys": {
"heartbeat_run_events_company_id_companies_id_fk": {
"name": "heartbeat_run_events_company_id_companies_id_fk",
"tableFrom": "heartbeat_run_events",
+ "tableTo": "companies",
"columnsFrom": [
"company_id"
],
- "tableTo": "companies",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "no action"
+ "onDelete": "no action",
+ "onUpdate": "no action"
},
"heartbeat_run_events_run_id_heartbeat_runs_id_fk": {
"name": "heartbeat_run_events_run_id_heartbeat_runs_id_fk",
"tableFrom": "heartbeat_run_events",
+ "tableTo": "heartbeat_runs",
"columnsFrom": [
"run_id"
],
- "tableTo": "heartbeat_runs",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "no action"
+ "onDelete": "no action",
+ "onUpdate": "no action"
},
"heartbeat_run_events_agent_id_agents_id_fk": {
"name": "heartbeat_run_events_agent_id_agents_id_fk",
"tableFrom": "heartbeat_run_events",
+ "tableTo": "agents",
"columnsFrom": [
"agent_id"
],
- "tableTo": "agents",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "no action"
+ "onDelete": "no action",
+ "onUpdate": "no action"
}
},
"compositePrimaryKeys": {},
@@ -31566,9 +31670,9 @@
}
],
"isUnique": false,
- "with": {},
+ "concurrently": false,
"method": "btree",
- "concurrently": false
+ "with": {}
},
"heartbeat_run_watchdog_decisions_company_run_snooze_idx": {
"name": "heartbeat_run_watchdog_decisions_company_run_snooze_idx",
@@ -31593,76 +31697,76 @@
}
],
"isUnique": false,
- "with": {},
+ "concurrently": false,
"method": "btree",
- "concurrently": false
+ "with": {}
}
},
"foreignKeys": {
"heartbeat_run_watchdog_decisions_company_id_companies_id_fk": {
"name": "heartbeat_run_watchdog_decisions_company_id_companies_id_fk",
"tableFrom": "heartbeat_run_watchdog_decisions",
+ "tableTo": "companies",
"columnsFrom": [
"company_id"
],
- "tableTo": "companies",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "no action"
+ "onDelete": "no action",
+ "onUpdate": "no action"
},
"heartbeat_run_watchdog_decisions_run_id_heartbeat_runs_id_fk": {
"name": "heartbeat_run_watchdog_decisions_run_id_heartbeat_runs_id_fk",
"tableFrom": "heartbeat_run_watchdog_decisions",
+ "tableTo": "heartbeat_runs",
"columnsFrom": [
"run_id"
],
- "tableTo": "heartbeat_runs",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "cascade"
+ "onDelete": "cascade",
+ "onUpdate": "no action"
},
"heartbeat_run_watchdog_decisions_evaluation_issue_id_issues_id_fk": {
"name": "heartbeat_run_watchdog_decisions_evaluation_issue_id_issues_id_fk",
"tableFrom": "heartbeat_run_watchdog_decisions",
+ "tableTo": "issues",
"columnsFrom": [
"evaluation_issue_id"
],
- "tableTo": "issues",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "set null"
+ "onDelete": "set null",
+ "onUpdate": "no action"
},
"heartbeat_run_watchdog_decisions_created_by_agent_id_agents_id_fk": {
"name": "heartbeat_run_watchdog_decisions_created_by_agent_id_agents_id_fk",
"tableFrom": "heartbeat_run_watchdog_decisions",
+ "tableTo": "agents",
"columnsFrom": [
"created_by_agent_id"
],
- "tableTo": "agents",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "set null"
+ "onDelete": "set null",
+ "onUpdate": "no action"
},
"heartbeat_run_watchdog_decisions_created_by_run_id_heartbeat_runs_id_fk": {
"name": "heartbeat_run_watchdog_decisions_created_by_run_id_heartbeat_runs_id_fk",
"tableFrom": "heartbeat_run_watchdog_decisions",
+ "tableTo": "heartbeat_runs",
"columnsFrom": [
"created_by_run_id"
],
- "tableTo": "heartbeat_runs",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "set null"
+ "onDelete": "set null",
+ "onUpdate": "no action"
}
},
"compositePrimaryKeys": {},
@@ -32178,10 +32282,10 @@
}
],
"isUnique": false,
- "with": {},
- "method": "btree",
"where": "\"heartbeat_runs\".\"cost_accounting_pending\" = true",
- "concurrently": false
+ "concurrently": false,
+ "method": "btree",
+ "with": {}
},
"heartbeat_runs_cost_data_quality_idx": {
"name": "heartbeat_runs_cost_data_quality_idx",
@@ -32194,8 +32298,8 @@
},
{
"expression": "coalesce(\"finished_at\", \"created_at\") desc",
- "isExpression": true,
"asc": true,
+ "isExpression": true,
"nulls": "last"
},
{
@@ -32206,10 +32310,10 @@
}
],
"isUnique": false,
- "with": {},
- "method": "btree",
"where": "\"heartbeat_runs\".\"cost_accounting_pending\" = true and \"heartbeat_runs\".\"status\" in ('succeeded','failed','timed_out','cancelled','interrupted')",
- "concurrently": false
+ "concurrently": false,
+ "method": "btree",
+ "with": {}
},
"heartbeat_runs_execution_status_delivery_idx": {
"name": "heartbeat_runs_execution_status_delivery_idx",
@@ -32222,10 +32326,10 @@
}
],
"isUnique": false,
- "with": {},
- "method": "btree",
"where": "\"heartbeat_runs\".\"execution_status_delivery_id\" is not null",
- "concurrently": false
+ "concurrently": false,
+ "method": "btree",
+ "with": {}
},
"heartbeat_runs_execution_control_deadline_idx": {
"name": "heartbeat_runs_execution_control_deadline_idx",
@@ -32238,10 +32342,10 @@
}
],
"isUnique": false,
- "with": {},
- "method": "btree",
"where": "\"heartbeat_runs\".\"execution_control_deadline_at\" is not null",
- "concurrently": false
+ "concurrently": false,
+ "method": "btree",
+ "with": {}
},
"heartbeat_runs_native_replacement_predecessor_uq": {
"name": "heartbeat_runs_native_replacement_predecessor_uq",
@@ -32260,10 +32364,10 @@
}
],
"isUnique": true,
- "with": {},
- "method": "btree",
"where": "\"heartbeat_runs\".\"scheduled_retry_reason\" = 'native_safe_replacement'",
- "concurrently": false
+ "concurrently": false,
+ "method": "btree",
+ "with": {}
},
"heartbeat_runs_company_agent_started_idx": {
"name": "heartbeat_runs_company_agent_started_idx",
@@ -32288,9 +32392,9 @@
}
],
"isUnique": false,
- "with": {},
+ "concurrently": false,
"method": "btree",
- "concurrently": false
+ "with": {}
},
"heartbeat_runs_company_issue_created_idx": {
"name": "heartbeat_runs_company_issue_created_idx",
@@ -32315,9 +32419,9 @@
}
],
"isUnique": false,
- "with": {},
+ "concurrently": false,
"method": "btree",
- "concurrently": false
+ "with": {}
},
"heartbeat_runs_company_responsible_user_idx": {
"name": "heartbeat_runs_company_responsible_user_idx",
@@ -32342,9 +32446,9 @@
}
],
"isUnique": false,
- "with": {},
+ "concurrently": false,
"method": "btree",
- "concurrently": false
+ "with": {}
},
"heartbeat_runs_company_liveness_idx": {
"name": "heartbeat_runs_company_liveness_idx",
@@ -32369,9 +32473,9 @@
}
],
"isUnique": false,
- "with": {},
+ "concurrently": false,
"method": "btree",
- "concurrently": false
+ "with": {}
},
"heartbeat_runs_company_status_last_output_idx": {
"name": "heartbeat_runs_company_status_last_output_idx",
@@ -32396,9 +32500,9 @@
}
],
"isUnique": false,
- "with": {},
+ "concurrently": false,
"method": "btree",
- "concurrently": false
+ "with": {}
},
"heartbeat_runs_company_status_process_started_idx": {
"name": "heartbeat_runs_company_status_process_started_idx",
@@ -32423,9 +32527,9 @@
}
],
"isUnique": false,
- "with": {},
+ "concurrently": false,
"method": "btree",
- "concurrently": false
+ "with": {}
},
"heartbeat_runs_company_created_at_desc_idx": {
"name": "heartbeat_runs_company_created_at_desc_idx",
@@ -32444,9 +32548,9 @@
}
],
"isUnique": false,
- "with": {},
+ "concurrently": false,
"method": "btree",
- "concurrently": false
+ "with": {}
},
"heartbeat_runs_company_ctx_issue_created_idx": {
"name": "heartbeat_runs_company_ctx_issue_created_idx",
@@ -32459,8 +32563,8 @@
},
{
"expression": "(\"context_snapshot\" ->> 'issueId')",
- "isExpression": true,
"asc": true,
+ "isExpression": true,
"nulls": "last"
},
{
@@ -32471,9 +32575,9 @@
}
],
"isUnique": false,
- "with": {},
+ "concurrently": false,
"method": "btree",
- "concurrently": false
+ "with": {}
},
"heartbeat_runs_company_ctx_task_created_idx": {
"name": "heartbeat_runs_company_ctx_task_created_idx",
@@ -32486,8 +32590,8 @@
},
{
"expression": "(\"context_snapshot\" ->> 'taskId')",
- "isExpression": true,
"asc": true,
+ "isExpression": true,
"nulls": "last"
},
{
@@ -32498,9 +32602,9 @@
}
],
"isUnique": false,
- "with": {},
+ "concurrently": false,
"method": "btree",
- "concurrently": false
+ "with": {}
},
"heartbeat_runs_company_ctx_taskkey_created_idx": {
"name": "heartbeat_runs_company_ctx_taskkey_created_idx",
@@ -32513,8 +32617,8 @@
},
{
"expression": "(\"context_snapshot\" ->> 'taskKey')",
- "isExpression": true,
"asc": true,
+ "isExpression": true,
"nulls": "last"
},
{
@@ -32525,9 +32629,9 @@
}
],
"isUnique": false,
- "with": {},
+ "concurrently": false,
"method": "btree",
- "concurrently": false
+ "with": {}
},
"heartbeat_runs_company_ctx_paperclip_issue_created_idx": {
"name": "heartbeat_runs_company_ctx_paperclip_issue_created_idx",
@@ -32540,8 +32644,8 @@
},
{
"expression": "(\"context_snapshot\" -> 'paperclipIssue' ->> 'id')",
- "isExpression": true,
"asc": true,
+ "isExpression": true,
"nulls": "last"
},
{
@@ -32552,9 +32656,9 @@
}
],
"isUnique": false,
- "with": {},
+ "concurrently": true,
"method": "btree",
- "concurrently": true
+ "with": {}
},
"heartbeat_runs_company_origin_issue_idx": {
"name": "heartbeat_runs_company_origin_issue_idx",
@@ -32567,104 +32671,104 @@
},
{
"expression": "coalesce(\n \"native_issue_id\"::text,\n nullif(\"context_snapshot\"->>'issueId', ''),\n nullif(\"context_snapshot\"->>'taskId', ''),\n nullif(\"context_snapshot\"->>'taskKey', '')\n )",
- "isExpression": true,
"asc": true,
+ "isExpression": true,
"nulls": "last"
}
],
"isUnique": false,
- "with": {},
+ "concurrently": true,
"method": "btree",
- "concurrently": true
+ "with": {}
}
},
"foreignKeys": {
"heartbeat_runs_company_id_companies_id_fk": {
"name": "heartbeat_runs_company_id_companies_id_fk",
"tableFrom": "heartbeat_runs",
+ "tableTo": "companies",
"columnsFrom": [
"company_id"
],
- "tableTo": "companies",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "no action"
+ "onDelete": "no action",
+ "onUpdate": "no action"
},
"heartbeat_runs_agent_id_agents_id_fk": {
"name": "heartbeat_runs_agent_id_agents_id_fk",
"tableFrom": "heartbeat_runs",
+ "tableTo": "agents",
"columnsFrom": [
"agent_id"
],
- "tableTo": "agents",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "no action"
+ "onDelete": "no action",
+ "onUpdate": "no action"
},
"heartbeat_runs_issue_id_issues_id_fk": {
"name": "heartbeat_runs_issue_id_issues_id_fk",
"tableFrom": "heartbeat_runs",
+ "tableTo": "issues",
"columnsFrom": [
"issue_id"
],
- "tableTo": "issues",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "set null"
+ "onDelete": "set null",
+ "onUpdate": "no action"
},
"heartbeat_runs_wakeup_request_id_agent_wakeup_requests_id_fk": {
"name": "heartbeat_runs_wakeup_request_id_agent_wakeup_requests_id_fk",
"tableFrom": "heartbeat_runs",
+ "tableTo": "agent_wakeup_requests",
"columnsFrom": [
"wakeup_request_id"
],
- "tableTo": "agent_wakeup_requests",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "no action"
+ "onDelete": "no action",
+ "onUpdate": "no action"
},
"heartbeat_runs_retry_of_run_id_heartbeat_runs_id_fk": {
"name": "heartbeat_runs_retry_of_run_id_heartbeat_runs_id_fk",
"tableFrom": "heartbeat_runs",
+ "tableTo": "heartbeat_runs",
"columnsFrom": [
"retry_of_run_id"
],
- "tableTo": "heartbeat_runs",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "set null"
+ "onDelete": "set null",
+ "onUpdate": "no action"
}
},
"compositePrimaryKeys": {},
"uniqueConstraints": {
"heartbeat_runs_company_native_issue_id_uq": {
"name": "heartbeat_runs_company_native_issue_id_uq",
+ "nullsNotDistinct": false,
"columns": [
"company_id",
"native_issue_id",
"id"
- ],
- "nullsNotDistinct": false
+ ]
},
"heartbeat_runs_company_native_issue_contract_id_uq": {
"name": "heartbeat_runs_company_native_issue_contract_id_uq",
+ "nullsNotDistinct": false,
"columns": [
"company_id",
"native_issue_id",
"id",
"completion_contract_id"
- ],
- "nullsNotDistinct": false
+ ]
}
},
"policies": {},
@@ -32758,9 +32862,9 @@
}
],
"isUnique": false,
- "with": {},
+ "concurrently": false,
"method": "btree",
- "concurrently": false
+ "with": {}
},
"inbox_dismissals_company_item_idx": {
"name": "inbox_dismissals_company_item_idx",
@@ -32779,9 +32883,9 @@
}
],
"isUnique": false,
- "with": {},
+ "concurrently": false,
"method": "btree",
- "concurrently": false
+ "with": {}
},
"inbox_dismissals_company_user_item_idx": {
"name": "inbox_dismissals_company_user_item_idx",
@@ -32806,24 +32910,24 @@
}
],
"isUnique": true,
- "with": {},
+ "concurrently": false,
"method": "btree",
- "concurrently": false
+ "with": {}
}
},
"foreignKeys": {
"inbox_dismissals_company_id_companies_id_fk": {
"name": "inbox_dismissals_company_id_companies_id_fk",
"tableFrom": "inbox_dismissals",
+ "tableTo": "companies",
"columnsFrom": [
"company_id"
],
- "tableTo": "companies",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "no action"
+ "onDelete": "no action",
+ "onUpdate": "no action"
}
},
"compositePrimaryKeys": {},
@@ -32893,9 +32997,9 @@
}
],
"isUnique": false,
- "with": {},
+ "concurrently": false,
"method": "btree",
- "concurrently": false
+ "with": {}
},
"connection_grant_delegations_grant_agent_uq": {
"name": "connection_grant_delegations_grant_agent_uq",
@@ -32914,52 +33018,52 @@
}
],
"isUnique": true,
- "with": {},
+ "concurrently": false,
"method": "btree",
- "concurrently": false
+ "with": {}
}
},
"foreignKeys": {
"connection_grant_delegations_company_id_companies_id_fk": {
"name": "connection_grant_delegations_company_id_companies_id_fk",
"tableFrom": "connection_grant_delegations",
+ "tableTo": "companies",
"columnsFrom": [
"company_id"
],
- "tableTo": "companies",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "cascade"
+ "onDelete": "cascade",
+ "onUpdate": "no action"
},
"connection_grant_delegations_agent_id_agents_id_fk": {
"name": "connection_grant_delegations_agent_id_agents_id_fk",
"tableFrom": "connection_grant_delegations",
+ "tableTo": "agents",
"columnsFrom": [
"agent_id"
],
- "tableTo": "agents",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "cascade"
+ "onDelete": "cascade",
+ "onUpdate": "no action"
},
"connection_grant_delegations_company_grant_fk": {
"name": "connection_grant_delegations_company_grant_fk",
"tableFrom": "connection_grant_delegations",
+ "tableTo": "connection_grants",
"columnsFrom": [
"company_id",
"grant_id"
],
- "tableTo": "connection_grants",
"columnsTo": [
"company_id",
"id"
],
- "onUpdate": "no action",
- "onDelete": "cascade"
+ "onDelete": "cascade",
+ "onUpdate": "no action"
}
},
"compositePrimaryKeys": {},
@@ -33035,9 +33139,9 @@
}
],
"isUnique": false,
- "with": {},
+ "concurrently": false,
"method": "btree",
- "concurrently": false
+ "with": {}
},
"connection_grant_members_grant_subject_uq": {
"name": "connection_grant_members_grant_subject_uq",
@@ -33062,39 +33166,39 @@
}
],
"isUnique": true,
- "with": {},
+ "concurrently": false,
"method": "btree",
- "concurrently": false
+ "with": {}
}
},
"foreignKeys": {
"connection_grant_members_company_id_companies_id_fk": {
"name": "connection_grant_members_company_id_companies_id_fk",
"tableFrom": "connection_grant_members",
+ "tableTo": "companies",
"columnsFrom": [
"company_id"
],
- "tableTo": "companies",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "cascade"
+ "onDelete": "cascade",
+ "onUpdate": "no action"
},
"connection_grant_members_company_grant_fk": {
"name": "connection_grant_members_company_grant_fk",
"tableFrom": "connection_grant_members",
+ "tableTo": "connection_grants",
"columnsFrom": [
"company_id",
"grant_id"
],
- "tableTo": "connection_grants",
"columnsTo": [
"company_id",
"id"
],
- "onUpdate": "no action",
- "onDelete": "cascade"
+ "onDelete": "cascade",
+ "onUpdate": "no action"
}
},
"compositePrimaryKeys": {},
@@ -33251,9 +33355,9 @@
}
],
"isUnique": false,
- "with": {},
+ "concurrently": false,
"method": "btree",
- "concurrently": false
+ "with": {}
},
"connection_grants_subject_user_idx": {
"name": "connection_grants_subject_user_idx",
@@ -33272,9 +33376,9 @@
}
],
"isUnique": false,
- "with": {},
+ "concurrently": false,
"method": "btree",
- "concurrently": false
+ "with": {}
},
"connection_grants_subject_agent_idx": {
"name": "connection_grants_subject_agent_idx",
@@ -33293,9 +33397,9 @@
}
],
"isUnique": false,
- "with": {},
+ "concurrently": false,
"method": "btree",
- "concurrently": false
+ "with": {}
},
"connection_grants_user_uq": {
"name": "connection_grants_user_uq",
@@ -33314,9 +33418,9 @@
}
],
"isUnique": true,
- "with": {},
+ "concurrently": false,
"method": "btree",
- "concurrently": false
+ "with": {}
},
"connection_grants_agent_uq": {
"name": "connection_grants_agent_uq",
@@ -33335,9 +33439,9 @@
}
],
"isUnique": true,
- "with": {},
+ "concurrently": false,
"method": "btree",
- "concurrently": false
+ "with": {}
},
"connection_grants_default_uq": {
"name": "connection_grants_default_uq",
@@ -33350,90 +33454,90 @@
}
],
"isUnique": true,
- "with": {},
- "method": "btree",
"where": "\"connection_grants\".\"is_default\" = true and \"connection_grants\".\"kind\" = 'organization'",
- "concurrently": false
+ "concurrently": false,
+ "method": "btree",
+ "with": {}
}
},
"foreignKeys": {
"connection_grants_company_id_companies_id_fk": {
"name": "connection_grants_company_id_companies_id_fk",
"tableFrom": "connection_grants",
+ "tableTo": "companies",
"columnsFrom": [
"company_id"
],
- "tableTo": "companies",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "cascade"
+ "onDelete": "cascade",
+ "onUpdate": "no action"
},
"connection_grants_subject_agent_id_agents_id_fk": {
"name": "connection_grants_subject_agent_id_agents_id_fk",
"tableFrom": "connection_grants",
+ "tableTo": "agents",
"columnsFrom": [
"subject_agent_id"
],
- "tableTo": "agents",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "cascade"
+ "onDelete": "cascade",
+ "onUpdate": "no action"
},
"connection_grants_created_by_agent_id_agents_id_fk": {
"name": "connection_grants_created_by_agent_id_agents_id_fk",
"tableFrom": "connection_grants",
+ "tableTo": "agents",
"columnsFrom": [
"created_by_agent_id"
],
- "tableTo": "agents",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "set null"
+ "onDelete": "set null",
+ "onUpdate": "no action"
},
"connection_grants_revoked_by_agent_id_agents_id_fk": {
"name": "connection_grants_revoked_by_agent_id_agents_id_fk",
"tableFrom": "connection_grants",
+ "tableTo": "agents",
"columnsFrom": [
"revoked_by_agent_id"
],
- "tableTo": "agents",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "set null"
+ "onDelete": "set null",
+ "onUpdate": "no action"
},
"connection_grants_company_connection_fk": {
"name": "connection_grants_company_connection_fk",
"tableFrom": "connection_grants",
+ "tableTo": "tool_connections",
"columnsFrom": [
"company_id",
"connection_id"
],
- "tableTo": "tool_connections",
"columnsTo": [
"company_id",
"id"
],
- "onUpdate": "no action",
- "onDelete": "cascade"
+ "onDelete": "cascade",
+ "onUpdate": "no action"
}
},
"compositePrimaryKeys": {},
"uniqueConstraints": {
"connection_grants_company_id_uq": {
"name": "connection_grants_company_id_uq",
+ "nullsNotDistinct": false,
"columns": [
"company_id",
"id"
- ],
- "nullsNotDistinct": false
+ ]
}
},
"policies": {},
@@ -33603,9 +33707,9 @@
}
],
"isUnique": false,
- "with": {},
+ "concurrently": false,
"method": "btree",
- "concurrently": false
+ "with": {}
},
"connection_token_issuances_connection_created_idx": {
"name": "connection_token_issuances_connection_created_idx",
@@ -33630,9 +33734,9 @@
}
],
"isUnique": false,
- "with": {},
+ "concurrently": false,
"method": "btree",
- "concurrently": false
+ "with": {}
},
"connection_token_issuances_agent_connection_idx": {
"name": "connection_token_issuances_agent_connection_idx",
@@ -33663,9 +33767,9 @@
}
],
"isUnique": false,
- "with": {},
+ "concurrently": false,
"method": "btree",
- "concurrently": false
+ "with": {}
},
"connection_token_issuances_run_idx": {
"name": "connection_token_issuances_run_idx",
@@ -33684,102 +33788,102 @@
}
],
"isUnique": false,
- "with": {},
+ "concurrently": false,
"method": "btree",
- "concurrently": false
+ "with": {}
}
},
"foreignKeys": {
"connection_token_issuances_company_id_companies_id_fk": {
"name": "connection_token_issuances_company_id_companies_id_fk",
"tableFrom": "connection_token_issuances",
+ "tableTo": "companies",
"columnsFrom": [
"company_id"
],
- "tableTo": "companies",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "cascade"
+ "onDelete": "cascade",
+ "onUpdate": "no action"
},
"connection_token_issuances_application_id_tool_applications_id_fk": {
"name": "connection_token_issuances_application_id_tool_applications_id_fk",
"tableFrom": "connection_token_issuances",
+ "tableTo": "tool_applications",
"columnsFrom": [
"application_id"
],
- "tableTo": "tool_applications",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "set null"
+ "onDelete": "set null",
+ "onUpdate": "no action"
},
"connection_token_issuances_connection_id_tool_connections_id_fk": {
"name": "connection_token_issuances_connection_id_tool_connections_id_fk",
"tableFrom": "connection_token_issuances",
+ "tableTo": "tool_connections",
"columnsFrom": [
"connection_id"
],
- "tableTo": "tool_connections",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "cascade"
+ "onDelete": "cascade",
+ "onUpdate": "no action"
},
"connection_token_issuances_agent_id_agents_id_fk": {
"name": "connection_token_issuances_agent_id_agents_id_fk",
"tableFrom": "connection_token_issuances",
+ "tableTo": "agents",
"columnsFrom": [
"agent_id"
],
- "tableTo": "agents",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "cascade"
+ "onDelete": "cascade",
+ "onUpdate": "no action"
},
"connection_token_issuances_run_id_heartbeat_runs_id_fk": {
"name": "connection_token_issuances_run_id_heartbeat_runs_id_fk",
"tableFrom": "connection_token_issuances",
+ "tableTo": "heartbeat_runs",
"columnsFrom": [
"run_id"
],
- "tableTo": "heartbeat_runs",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "set null"
+ "onDelete": "set null",
+ "onUpdate": "no action"
},
"connection_token_issuances_issue_id_issues_id_fk": {
"name": "connection_token_issuances_issue_id_issues_id_fk",
"tableFrom": "connection_token_issuances",
+ "tableTo": "issues",
"columnsFrom": [
"issue_id"
],
- "tableTo": "issues",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "set null"
+ "onDelete": "set null",
+ "onUpdate": "no action"
},
"connection_token_issuances_project_id_projects_id_fk": {
"name": "connection_token_issuances_project_id_projects_id_fk",
"tableFrom": "connection_token_issuances",
+ "tableTo": "projects",
"columnsFrom": [
"project_id"
],
- "tableTo": "projects",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "set null"
+ "onDelete": "set null",
+ "onUpdate": "no action"
}
},
"compositePrimaryKeys": {},
@@ -33853,24 +33957,24 @@
}
],
"isUnique": true,
- "with": {},
+ "concurrently": false,
"method": "btree",
- "concurrently": false
+ "with": {}
}
},
"foreignKeys": {
"instance_settings_default_environment_id_environments_id_fk": {
"name": "instance_settings_default_environment_id_environments_id_fk",
"tableFrom": "instance_settings",
+ "tableTo": "environments",
"columnsFrom": [
"default_environment_id"
],
- "tableTo": "environments",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "set null"
+ "onDelete": "set null",
+ "onUpdate": "no action"
}
},
"compositePrimaryKeys": {},
@@ -33936,9 +34040,9 @@
}
],
"isUnique": true,
- "with": {},
+ "concurrently": false,
"method": "btree",
- "concurrently": false
+ "with": {}
},
"instance_user_roles_role_idx": {
"name": "instance_user_roles_role_idx",
@@ -33951,9 +34055,9 @@
}
],
"isUnique": false,
- "with": {},
+ "concurrently": false,
"method": "btree",
- "concurrently": false
+ "with": {}
}
},
"foreignKeys": {},
@@ -34057,9 +34161,9 @@
}
],
"isUnique": true,
- "with": {},
+ "concurrently": false,
"method": "btree",
- "concurrently": false
+ "with": {}
},
"invites_company_invite_state_idx": {
"name": "invites_company_invite_state_idx",
@@ -34090,24 +34194,24 @@
}
],
"isUnique": false,
- "with": {},
+ "concurrently": false,
"method": "btree",
- "concurrently": false
+ "with": {}
}
},
"foreignKeys": {
"invites_company_id_companies_id_fk": {
"name": "invites_company_id_companies_id_fk",
"tableFrom": "invites",
+ "tableTo": "companies",
"columnsFrom": [
"company_id"
],
- "tableTo": "companies",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "no action"
+ "onDelete": "no action",
+ "onUpdate": "no action"
}
},
"compositePrimaryKeys": {},
@@ -34207,9 +34311,9 @@
}
],
"isUnique": false,
- "with": {},
+ "concurrently": false,
"method": "btree",
- "concurrently": false
+ "with": {}
},
"issue_access_grants_issue_idx": {
"name": "issue_access_grants_issue_idx",
@@ -34228,37 +34332,37 @@
}
],
"isUnique": false,
- "with": {},
+ "concurrently": false,
"method": "btree",
- "concurrently": false
+ "with": {}
}
},
"foreignKeys": {
"issue_access_grants_issue_id_issues_id_fk": {
"name": "issue_access_grants_issue_id_issues_id_fk",
"tableFrom": "issue_access_grants",
+ "tableTo": "issues",
"columnsFrom": [
"issue_id"
],
- "tableTo": "issues",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "cascade"
+ "onDelete": "cascade",
+ "onUpdate": "no action"
},
"issue_access_grants_granted_by_agent_id_agents_id_fk": {
"name": "issue_access_grants_granted_by_agent_id_agents_id_fk",
"tableFrom": "issue_access_grants",
+ "tableTo": "agents",
"columnsFrom": [
"granted_by_agent_id"
],
- "tableTo": "agents",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "set null"
+ "onDelete": "set null",
+ "onUpdate": "no action"
}
},
"compositePrimaryKeys": {},
@@ -34330,9 +34434,9 @@
}
],
"isUnique": false,
- "with": {},
+ "concurrently": false,
"method": "btree",
- "concurrently": false
+ "with": {}
},
"issue_approvals_approval_idx": {
"name": "issue_approvals_approval_idx",
@@ -34345,9 +34449,9 @@
}
],
"isUnique": false,
- "with": {},
+ "concurrently": false,
"method": "btree",
- "concurrently": false
+ "with": {}
},
"issue_approvals_company_idx": {
"name": "issue_approvals_company_idx",
@@ -34360,63 +34464,63 @@
}
],
"isUnique": false,
- "with": {},
+ "concurrently": false,
"method": "btree",
- "concurrently": false
+ "with": {}
}
},
"foreignKeys": {
"issue_approvals_company_id_companies_id_fk": {
"name": "issue_approvals_company_id_companies_id_fk",
"tableFrom": "issue_approvals",
+ "tableTo": "companies",
"columnsFrom": [
"company_id"
],
- "tableTo": "companies",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "no action"
+ "onDelete": "no action",
+ "onUpdate": "no action"
},
"issue_approvals_issue_id_issues_id_fk": {
"name": "issue_approvals_issue_id_issues_id_fk",
"tableFrom": "issue_approvals",
+ "tableTo": "issues",
"columnsFrom": [
"issue_id"
],
- "tableTo": "issues",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "cascade"
+ "onDelete": "cascade",
+ "onUpdate": "no action"
},
"issue_approvals_approval_id_approvals_id_fk": {
"name": "issue_approvals_approval_id_approvals_id_fk",
"tableFrom": "issue_approvals",
+ "tableTo": "approvals",
"columnsFrom": [
"approval_id"
],
- "tableTo": "approvals",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "cascade"
+ "onDelete": "cascade",
+ "onUpdate": "no action"
},
"issue_approvals_linked_by_agent_id_agents_id_fk": {
"name": "issue_approvals_linked_by_agent_id_agents_id_fk",
"tableFrom": "issue_approvals",
+ "tableTo": "agents",
"columnsFrom": [
"linked_by_agent_id"
],
- "tableTo": "agents",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "set null"
+ "onDelete": "set null",
+ "onUpdate": "no action"
}
},
"compositePrimaryKeys": {
@@ -34507,9 +34611,9 @@
}
],
"isUnique": false,
- "with": {},
+ "concurrently": false,
"method": "btree",
- "concurrently": false
+ "with": {}
},
"issue_attachments_issue_comment_idx": {
"name": "issue_attachments_issue_comment_idx",
@@ -34522,9 +34626,9 @@
}
],
"isUnique": false,
- "with": {},
+ "concurrently": false,
"method": "btree",
- "concurrently": false
+ "with": {}
},
"issue_attachments_originating_run_idx": {
"name": "issue_attachments_originating_run_idx",
@@ -34537,9 +34641,9 @@
}
],
"isUnique": false,
- "with": {},
+ "concurrently": false,
"method": "btree",
- "concurrently": false
+ "with": {}
},
"issue_attachments_asset_uq": {
"name": "issue_attachments_asset_uq",
@@ -34552,76 +34656,76 @@
}
],
"isUnique": true,
- "with": {},
+ "concurrently": false,
"method": "btree",
- "concurrently": false
+ "with": {}
}
},
"foreignKeys": {
"issue_attachments_company_id_companies_id_fk": {
"name": "issue_attachments_company_id_companies_id_fk",
"tableFrom": "issue_attachments",
+ "tableTo": "companies",
"columnsFrom": [
"company_id"
],
- "tableTo": "companies",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "no action"
+ "onDelete": "no action",
+ "onUpdate": "no action"
},
"issue_attachments_issue_id_issues_id_fk": {
"name": "issue_attachments_issue_id_issues_id_fk",
"tableFrom": "issue_attachments",
+ "tableTo": "issues",
"columnsFrom": [
"issue_id"
],
- "tableTo": "issues",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "cascade"
+ "onDelete": "cascade",
+ "onUpdate": "no action"
},
"issue_attachments_asset_id_assets_id_fk": {
"name": "issue_attachments_asset_id_assets_id_fk",
"tableFrom": "issue_attachments",
+ "tableTo": "assets",
"columnsFrom": [
"asset_id"
],
- "tableTo": "assets",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "cascade"
+ "onDelete": "cascade",
+ "onUpdate": "no action"
},
"issue_attachments_issue_comment_id_issue_comments_id_fk": {
"name": "issue_attachments_issue_comment_id_issue_comments_id_fk",
"tableFrom": "issue_attachments",
+ "tableTo": "issue_comments",
"columnsFrom": [
"issue_comment_id"
],
- "tableTo": "issue_comments",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "set null"
+ "onDelete": "set null",
+ "onUpdate": "no action"
},
"issue_attachments_originating_run_id_heartbeat_runs_id_fk": {
"name": "issue_attachments_originating_run_id_heartbeat_runs_id_fk",
"tableFrom": "issue_attachments",
+ "tableTo": "heartbeat_runs",
"columnsFrom": [
"originating_run_id"
],
- "tableTo": "heartbeat_runs",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "set null"
+ "onDelete": "set null",
+ "onUpdate": "no action"
}
},
"compositePrimaryKeys": {},
@@ -34807,9 +34911,9 @@
}
],
"isUnique": false,
- "with": {},
+ "concurrently": false,
"method": "btree",
- "concurrently": false
+ "with": {}
},
"issue_comments_company_idx": {
"name": "issue_comments_company_idx",
@@ -34822,9 +34926,9 @@
}
],
"isUnique": false,
- "with": {},
+ "concurrently": false,
"method": "btree",
- "concurrently": false
+ "with": {}
},
"issue_comments_company_issue_created_at_idx": {
"name": "issue_comments_company_issue_created_at_idx",
@@ -34849,9 +34953,9 @@
}
],
"isUnique": false,
- "with": {},
+ "concurrently": false,
"method": "btree",
- "concurrently": false
+ "with": {}
},
"issue_comments_company_author_issue_created_at_idx": {
"name": "issue_comments_company_author_issue_created_at_idx",
@@ -34882,9 +34986,9 @@
}
],
"isUnique": false,
- "with": {},
+ "concurrently": false,
"method": "btree",
- "concurrently": false
+ "with": {}
},
"issue_comments_body_search_idx": {
"name": "issue_comments_body_search_idx",
@@ -34898,148 +35002,148 @@
}
],
"isUnique": false,
- "with": {},
+ "concurrently": false,
"method": "gin",
- "concurrently": false
+ "with": {}
}
},
"foreignKeys": {
"issue_comments_company_id_companies_id_fk": {
"name": "issue_comments_company_id_companies_id_fk",
"tableFrom": "issue_comments",
+ "tableTo": "companies",
"columnsFrom": [
"company_id"
],
- "tableTo": "companies",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "no action"
+ "onDelete": "no action",
+ "onUpdate": "no action"
},
"issue_comments_issue_id_issues_id_fk": {
"name": "issue_comments_issue_id_issues_id_fk",
"tableFrom": "issue_comments",
+ "tableTo": "issues",
"columnsFrom": [
"issue_id"
],
- "tableTo": "issues",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "cascade"
+ "onDelete": "cascade",
+ "onUpdate": "no action"
},
"issue_comments_author_agent_id_agents_id_fk": {
"name": "issue_comments_author_agent_id_agents_id_fk",
"tableFrom": "issue_comments",
+ "tableTo": "agents",
"columnsFrom": [
"author_agent_id"
],
- "tableTo": "agents",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "no action"
+ "onDelete": "no action",
+ "onUpdate": "no action"
},
"issue_comments_on_behalf_of_user_id_user_id_fk": {
"name": "issue_comments_on_behalf_of_user_id_user_id_fk",
"tableFrom": "issue_comments",
+ "tableTo": "user",
"columnsFrom": [
"on_behalf_of_user_id"
],
- "tableTo": "user",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "set null"
+ "onDelete": "set null",
+ "onUpdate": "no action"
},
"issue_comments_created_by_run_id_heartbeat_runs_id_fk": {
"name": "issue_comments_created_by_run_id_heartbeat_runs_id_fk",
"tableFrom": "issue_comments",
+ "tableTo": "heartbeat_runs",
"columnsFrom": [
"created_by_run_id"
],
- "tableTo": "heartbeat_runs",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "set null"
+ "onDelete": "set null",
+ "onUpdate": "no action"
},
"issue_comments_derived_author_agent_id_agents_id_fk": {
"name": "issue_comments_derived_author_agent_id_agents_id_fk",
"tableFrom": "issue_comments",
+ "tableTo": "agents",
"columnsFrom": [
"derived_author_agent_id"
],
- "tableTo": "agents",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "set null"
+ "onDelete": "set null",
+ "onUpdate": "no action"
},
"issue_comments_derived_created_by_run_id_heartbeat_runs_id_fk": {
"name": "issue_comments_derived_created_by_run_id_heartbeat_runs_id_fk",
"tableFrom": "issue_comments",
+ "tableTo": "heartbeat_runs",
"columnsFrom": [
"derived_created_by_run_id"
],
- "tableTo": "heartbeat_runs",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "set null"
+ "onDelete": "set null",
+ "onUpdate": "no action"
},
"issue_comments_deleted_by_agent_id_agents_id_fk": {
"name": "issue_comments_deleted_by_agent_id_agents_id_fk",
"tableFrom": "issue_comments",
+ "tableTo": "agents",
"columnsFrom": [
"deleted_by_agent_id"
],
- "tableTo": "agents",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "set null"
+ "onDelete": "set null",
+ "onUpdate": "no action"
},
"issue_comments_deleted_by_run_id_heartbeat_runs_id_fk": {
"name": "issue_comments_deleted_by_run_id_heartbeat_runs_id_fk",
"tableFrom": "issue_comments",
+ "tableTo": "heartbeat_runs",
"columnsFrom": [
"deleted_by_run_id"
],
- "tableTo": "heartbeat_runs",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "set null"
+ "onDelete": "set null",
+ "onUpdate": "no action"
}
},
"compositePrimaryKeys": {},
"uniqueConstraints": {
"issue_comments_client_request_uq": {
"name": "issue_comments_client_request_uq",
+ "nullsNotDistinct": false,
"columns": [
"issue_id",
"author_user_id",
"client_request_id"
- ],
- "nullsNotDistinct": false
+ ]
},
"issue_comments_company_id_uq": {
"name": "issue_comments_company_id_uq",
+ "nullsNotDistinct": false,
"columns": [
"company_id",
"id"
- ],
- "nullsNotDistinct": false
+ ]
}
},
"policies": {},
@@ -35101,9 +35205,9 @@
}
],
"isUnique": true,
- "with": {},
+ "concurrently": false,
"method": "btree",
- "concurrently": false
+ "with": {}
},
"issue_create_idempotency_keys_issue_idx": {
"name": "issue_create_idempotency_keys_issue_idx",
@@ -35116,9 +35220,9 @@
}
],
"isUnique": false,
- "with": {},
+ "concurrently": false,
"method": "btree",
- "concurrently": false
+ "with": {}
},
"issue_create_idempotency_keys_company_created_at_idx": {
"name": "issue_create_idempotency_keys_company_created_at_idx",
@@ -35137,37 +35241,37 @@
}
],
"isUnique": false,
- "with": {},
+ "concurrently": false,
"method": "btree",
- "concurrently": false
+ "with": {}
}
},
"foreignKeys": {
"issue_create_idempotency_keys_company_id_companies_id_fk": {
"name": "issue_create_idempotency_keys_company_id_companies_id_fk",
"tableFrom": "issue_create_idempotency_keys",
+ "tableTo": "companies",
"columnsFrom": [
"company_id"
],
- "tableTo": "companies",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "cascade"
+ "onDelete": "cascade",
+ "onUpdate": "no action"
},
"issue_create_idempotency_keys_issue_id_issues_id_fk": {
"name": "issue_create_idempotency_keys_issue_id_issues_id_fk",
"tableFrom": "issue_create_idempotency_keys",
+ "tableTo": "issues",
"columnsFrom": [
"issue_id"
],
- "tableTo": "issues",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "cascade"
+ "onDelete": "cascade",
+ "onUpdate": "no action"
}
},
"compositePrimaryKeys": {},
@@ -35250,9 +35354,9 @@
}
],
"isUnique": true,
- "with": {},
+ "concurrently": false,
"method": "btree",
- "concurrently": false
+ "with": {}
},
"issue_documents_document_uq": {
"name": "issue_documents_document_uq",
@@ -35265,9 +35369,9 @@
}
],
"isUnique": true,
- "with": {},
+ "concurrently": false,
"method": "btree",
- "concurrently": false
+ "with": {}
},
"issue_documents_company_issue_updated_idx": {
"name": "issue_documents_company_issue_updated_idx",
@@ -35292,50 +35396,50 @@
}
],
"isUnique": false,
- "with": {},
+ "concurrently": false,
"method": "btree",
- "concurrently": false
+ "with": {}
}
},
"foreignKeys": {
"issue_documents_company_id_companies_id_fk": {
"name": "issue_documents_company_id_companies_id_fk",
"tableFrom": "issue_documents",
+ "tableTo": "companies",
"columnsFrom": [
"company_id"
],
- "tableTo": "companies",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "no action"
+ "onDelete": "no action",
+ "onUpdate": "no action"
},
"issue_documents_issue_id_issues_id_fk": {
"name": "issue_documents_issue_id_issues_id_fk",
"tableFrom": "issue_documents",
+ "tableTo": "issues",
"columnsFrom": [
"issue_id"
],
- "tableTo": "issues",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "cascade"
+ "onDelete": "cascade",
+ "onUpdate": "no action"
},
"issue_documents_document_id_documents_id_fk": {
"name": "issue_documents_document_id_documents_id_fk",
"tableFrom": "issue_documents",
+ "tableTo": "documents",
"columnsFrom": [
"document_id"
],
- "tableTo": "documents",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "cascade"
+ "onDelete": "cascade",
+ "onUpdate": "no action"
}
},
"compositePrimaryKeys": {},
@@ -35442,9 +35546,9 @@
}
],
"isUnique": false,
- "with": {},
+ "concurrently": false,
"method": "btree",
- "concurrently": false
+ "with": {}
},
"issue_execution_decisions_stage_idx": {
"name": "issue_execution_decisions_stage_idx",
@@ -35469,63 +35573,63 @@
}
],
"isUnique": false,
- "with": {},
+ "concurrently": false,
"method": "btree",
- "concurrently": false
+ "with": {}
}
},
"foreignKeys": {
"issue_execution_decisions_company_id_companies_id_fk": {
"name": "issue_execution_decisions_company_id_companies_id_fk",
"tableFrom": "issue_execution_decisions",
+ "tableTo": "companies",
"columnsFrom": [
"company_id"
],
- "tableTo": "companies",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "no action"
+ "onDelete": "no action",
+ "onUpdate": "no action"
},
"issue_execution_decisions_issue_id_issues_id_fk": {
"name": "issue_execution_decisions_issue_id_issues_id_fk",
"tableFrom": "issue_execution_decisions",
+ "tableTo": "issues",
"columnsFrom": [
"issue_id"
],
- "tableTo": "issues",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "cascade"
+ "onDelete": "cascade",
+ "onUpdate": "no action"
},
"issue_execution_decisions_actor_agent_id_agents_id_fk": {
"name": "issue_execution_decisions_actor_agent_id_agents_id_fk",
"tableFrom": "issue_execution_decisions",
+ "tableTo": "agents",
"columnsFrom": [
"actor_agent_id"
],
- "tableTo": "agents",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "no action"
+ "onDelete": "no action",
+ "onUpdate": "no action"
},
"issue_execution_decisions_created_by_run_id_heartbeat_runs_id_fk": {
"name": "issue_execution_decisions_created_by_run_id_heartbeat_runs_id_fk",
"tableFrom": "issue_execution_decisions",
+ "tableTo": "heartbeat_runs",
"columnsFrom": [
"created_by_run_id"
],
- "tableTo": "heartbeat_runs",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "set null"
+ "onDelete": "set null",
+ "onUpdate": "no action"
}
},
"compositePrimaryKeys": {},
@@ -35622,9 +35726,9 @@
}
],
"isUnique": false,
- "with": {},
+ "concurrently": false,
"method": "btree",
- "concurrently": false
+ "with": {}
},
"issue_inbox_archives_company_user_idx": {
"name": "issue_inbox_archives_company_user_idx",
@@ -35643,9 +35747,9 @@
}
],
"isUnique": false,
- "with": {},
+ "concurrently": false,
"method": "btree",
- "concurrently": false
+ "with": {}
},
"issue_inbox_archives_company_issue_user_idx": {
"name": "issue_inbox_archives_company_issue_user_idx",
@@ -35670,63 +35774,63 @@
}
],
"isUnique": true,
- "with": {},
+ "concurrently": false,
"method": "btree",
- "concurrently": false
+ "with": {}
}
},
"foreignKeys": {
"issue_inbox_archives_company_id_companies_id_fk": {
"name": "issue_inbox_archives_company_id_companies_id_fk",
"tableFrom": "issue_inbox_archives",
+ "tableTo": "companies",
"columnsFrom": [
"company_id"
],
- "tableTo": "companies",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "no action"
+ "onDelete": "no action",
+ "onUpdate": "no action"
},
"issue_inbox_archives_issue_id_issues_id_fk": {
"name": "issue_inbox_archives_issue_id_issues_id_fk",
"tableFrom": "issue_inbox_archives",
+ "tableTo": "issues",
"columnsFrom": [
"issue_id"
],
- "tableTo": "issues",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "cascade"
+ "onDelete": "cascade",
+ "onUpdate": "no action"
},
"issue_inbox_archives_archived_by_agent_id_agents_id_fk": {
"name": "issue_inbox_archives_archived_by_agent_id_agents_id_fk",
"tableFrom": "issue_inbox_archives",
+ "tableTo": "agents",
"columnsFrom": [
"archived_by_agent_id"
],
- "tableTo": "agents",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "set null"
+ "onDelete": "set null",
+ "onUpdate": "no action"
},
"issue_inbox_archives_archived_by_run_id_heartbeat_runs_id_fk": {
"name": "issue_inbox_archives_archived_by_run_id_heartbeat_runs_id_fk",
"tableFrom": "issue_inbox_archives",
+ "tableTo": "heartbeat_runs",
"columnsFrom": [
"archived_by_run_id"
],
- "tableTo": "heartbeat_runs",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "set null"
+ "onDelete": "set null",
+ "onUpdate": "no action"
}
},
"compositePrimaryKeys": {},
@@ -35782,9 +35886,9 @@
}
],
"isUnique": false,
- "with": {},
+ "concurrently": false,
"method": "btree",
- "concurrently": false
+ "with": {}
},
"issue_labels_label_idx": {
"name": "issue_labels_label_idx",
@@ -35797,9 +35901,9 @@
}
],
"isUnique": false,
- "with": {},
+ "concurrently": false,
"method": "btree",
- "concurrently": false
+ "with": {}
},
"issue_labels_company_idx": {
"name": "issue_labels_company_idx",
@@ -35812,50 +35916,50 @@
}
],
"isUnique": false,
- "with": {},
+ "concurrently": false,
"method": "btree",
- "concurrently": false
+ "with": {}
}
},
"foreignKeys": {
"issue_labels_issue_id_issues_id_fk": {
"name": "issue_labels_issue_id_issues_id_fk",
"tableFrom": "issue_labels",
+ "tableTo": "issues",
"columnsFrom": [
"issue_id"
],
- "tableTo": "issues",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "cascade"
+ "onDelete": "cascade",
+ "onUpdate": "no action"
},
"issue_labels_label_id_labels_id_fk": {
"name": "issue_labels_label_id_labels_id_fk",
"tableFrom": "issue_labels",
+ "tableTo": "labels",
"columnsFrom": [
"label_id"
],
- "tableTo": "labels",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "cascade"
+ "onDelete": "cascade",
+ "onUpdate": "no action"
},
"issue_labels_company_id_companies_id_fk": {
"name": "issue_labels_company_id_companies_id_fk",
"tableFrom": "issue_labels",
+ "tableTo": "companies",
"columnsFrom": [
"company_id"
],
- "tableTo": "companies",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "cascade"
+ "onDelete": "cascade",
+ "onUpdate": "no action"
}
},
"compositePrimaryKeys": {
@@ -36004,9 +36108,9 @@
}
],
"isUnique": false,
- "with": {},
+ "concurrently": false,
"method": "btree",
- "concurrently": false
+ "with": {}
},
"issue_plan_decompositions_active_owner_idx": {
"name": "issue_plan_decompositions_active_owner_idx",
@@ -36025,10 +36129,10 @@
}
],
"isUnique": false,
- "with": {},
- "method": "btree",
"where": "\"issue_plan_decompositions\".\"status\" = 'in_flight'",
- "concurrently": false
+ "concurrently": false,
+ "method": "btree",
+ "with": {}
},
"issue_plan_decompositions_source_revision_uq": {
"name": "issue_plan_decompositions_source_revision_uq",
@@ -36053,89 +36157,89 @@
}
],
"isUnique": true,
- "with": {},
+ "concurrently": false,
"method": "btree",
- "concurrently": false
+ "with": {}
}
},
"foreignKeys": {
"issue_plan_decompositions_company_id_companies_id_fk": {
"name": "issue_plan_decompositions_company_id_companies_id_fk",
"tableFrom": "issue_plan_decompositions",
+ "tableTo": "companies",
"columnsFrom": [
"company_id"
],
- "tableTo": "companies",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "no action"
+ "onDelete": "no action",
+ "onUpdate": "no action"
},
"issue_plan_decompositions_source_issue_id_issues_id_fk": {
"name": "issue_plan_decompositions_source_issue_id_issues_id_fk",
"tableFrom": "issue_plan_decompositions",
+ "tableTo": "issues",
"columnsFrom": [
"source_issue_id"
],
- "tableTo": "issues",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "cascade"
+ "onDelete": "cascade",
+ "onUpdate": "no action"
},
"issue_plan_decompositions_accepted_plan_revision_id_document_revisions_id_fk": {
"name": "issue_plan_decompositions_accepted_plan_revision_id_document_revisions_id_fk",
"tableFrom": "issue_plan_decompositions",
+ "tableTo": "document_revisions",
"columnsFrom": [
"accepted_plan_revision_id"
],
- "tableTo": "document_revisions",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "cascade"
+ "onDelete": "cascade",
+ "onUpdate": "no action"
},
"issue_plan_decompositions_accepted_interaction_id_issue_thread_interactions_id_fk": {
"name": "issue_plan_decompositions_accepted_interaction_id_issue_thread_interactions_id_fk",
"tableFrom": "issue_plan_decompositions",
+ "tableTo": "issue_thread_interactions",
"columnsFrom": [
"accepted_interaction_id"
],
- "tableTo": "issue_thread_interactions",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "set null"
+ "onDelete": "set null",
+ "onUpdate": "no action"
},
"issue_plan_decompositions_owner_agent_id_agents_id_fk": {
"name": "issue_plan_decompositions_owner_agent_id_agents_id_fk",
"tableFrom": "issue_plan_decompositions",
+ "tableTo": "agents",
"columnsFrom": [
"owner_agent_id"
],
- "tableTo": "agents",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "set null"
+ "onDelete": "set null",
+ "onUpdate": "no action"
},
"issue_plan_decompositions_owner_run_id_heartbeat_runs_id_fk": {
"name": "issue_plan_decompositions_owner_run_id_heartbeat_runs_id_fk",
"tableFrom": "issue_plan_decompositions",
+ "tableTo": "heartbeat_runs",
"columnsFrom": [
"owner_run_id"
],
- "tableTo": "heartbeat_runs",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "set null"
+ "onDelete": "set null",
+ "onUpdate": "no action"
}
},
"compositePrimaryKeys": {},
@@ -36275,9 +36379,9 @@
}
],
"isUnique": true,
- "with": {},
+ "concurrently": false,
"method": "btree",
- "concurrently": false
+ "with": {}
},
"issue_question_response_deliveries_correlation_uq": {
"name": "issue_question_response_deliveries_correlation_uq",
@@ -36290,9 +36394,9 @@
}
],
"isUnique": true,
- "with": {},
+ "concurrently": false,
"method": "btree",
- "concurrently": false
+ "with": {}
},
"issue_question_response_deliveries_pending_idx": {
"name": "issue_question_response_deliveries_pending_idx",
@@ -36311,9 +36415,9 @@
}
],
"isUnique": false,
- "with": {},
+ "concurrently": false,
"method": "btree",
- "concurrently": false
+ "with": {}
},
"issue_question_response_deliveries_company_issue_idx": {
"name": "issue_question_response_deliveries_company_issue_idx",
@@ -36338,76 +36442,76 @@
}
],
"isUnique": false,
- "with": {},
+ "concurrently": false,
"method": "btree",
- "concurrently": false
+ "with": {}
}
},
"foreignKeys": {
"issue_question_response_deliveries_company_id_companies_id_fk": {
"name": "issue_question_response_deliveries_company_id_companies_id_fk",
"tableFrom": "issue_question_response_deliveries",
+ "tableTo": "companies",
"columnsFrom": [
"company_id"
],
- "tableTo": "companies",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "cascade"
+ "onDelete": "cascade",
+ "onUpdate": "no action"
},
"issue_question_response_deliveries_issue_id_issues_id_fk": {
"name": "issue_question_response_deliveries_issue_id_issues_id_fk",
"tableFrom": "issue_question_response_deliveries",
+ "tableTo": "issues",
"columnsFrom": [
"issue_id"
],
- "tableTo": "issues",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "cascade"
+ "onDelete": "cascade",
+ "onUpdate": "no action"
},
"issue_question_response_deliveries_interaction_id_issue_thread_interactions_id_fk": {
"name": "issue_question_response_deliveries_interaction_id_issue_thread_interactions_id_fk",
"tableFrom": "issue_question_response_deliveries",
+ "tableTo": "issue_thread_interactions",
"columnsFrom": [
"interaction_id"
],
- "tableTo": "issue_thread_interactions",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "cascade"
+ "onDelete": "cascade",
+ "onUpdate": "no action"
},
"issue_question_response_deliveries_source_run_id_heartbeat_runs_id_fk": {
"name": "issue_question_response_deliveries_source_run_id_heartbeat_runs_id_fk",
"tableFrom": "issue_question_response_deliveries",
+ "tableTo": "heartbeat_runs",
"columnsFrom": [
"source_run_id"
],
- "tableTo": "heartbeat_runs",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "set null"
+ "onDelete": "set null",
+ "onUpdate": "no action"
},
"issue_question_response_deliveries_target_run_id_heartbeat_runs_id_fk": {
"name": "issue_question_response_deliveries_target_run_id_heartbeat_runs_id_fk",
"tableFrom": "issue_question_response_deliveries",
+ "tableTo": "heartbeat_runs",
"columnsFrom": [
"target_run_id"
],
- "tableTo": "heartbeat_runs",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "set null"
+ "onDelete": "set null",
+ "onUpdate": "no action"
}
},
"compositePrimaryKeys": {},
@@ -36494,9 +36598,9 @@
}
],
"isUnique": false,
- "with": {},
+ "concurrently": false,
"method": "btree",
- "concurrently": false
+ "with": {}
},
"issue_read_states_company_user_idx": {
"name": "issue_read_states_company_user_idx",
@@ -36515,9 +36619,9 @@
}
],
"isUnique": false,
- "with": {},
+ "concurrently": false,
"method": "btree",
- "concurrently": false
+ "with": {}
},
"issue_read_states_company_issue_user_idx": {
"name": "issue_read_states_company_issue_user_idx",
@@ -36542,37 +36646,37 @@
}
],
"isUnique": true,
- "with": {},
+ "concurrently": false,
"method": "btree",
- "concurrently": false
+ "with": {}
}
},
"foreignKeys": {
"issue_read_states_company_id_companies_id_fk": {
"name": "issue_read_states_company_id_companies_id_fk",
"tableFrom": "issue_read_states",
+ "tableTo": "companies",
"columnsFrom": [
"company_id"
],
- "tableTo": "companies",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "no action"
+ "onDelete": "no action",
+ "onUpdate": "no action"
},
"issue_read_states_issue_id_issues_id_fk": {
"name": "issue_read_states_issue_id_issues_id_fk",
"tableFrom": "issue_read_states",
+ "tableTo": "issues",
"columnsFrom": [
"issue_id"
],
- "tableTo": "issues",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "cascade"
+ "onDelete": "cascade",
+ "onUpdate": "no action"
}
},
"compositePrimaryKeys": {},
@@ -36750,6 +36854,22 @@
}
},
"indexes": {
+ "issue_recovery_actions_retained_workspace_recovery_idx": {
+ "name": "issue_recovery_actions_retained_workspace_recovery_idx",
+ "columns": [
+ {
+ "expression": "id",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ }
+ ],
+ "isUnique": false,
+ "where": "\n (\"issue_recovery_actions\".\"evidence\"->'workspaceRestoreRecovery'->>'schema' = 'paperclip.workspace-restore-recovery.v1'\n or \"issue_recovery_actions\".\"cause\" in ('native_workspace_sync_out_unrecoverable', 'native_workspace_sync_out_retry_exhausted'))\n and (\"issue_recovery_actions\".\"evidence\"->'executionReconciliation' is null\n or \"issue_recovery_actions\".\"evidence\"#>>'{workspaceRecovery,status}' = 'recovered')\n ",
+ "concurrently": false,
+ "method": "btree",
+ "with": {}
+ },
"issue_recovery_actions_company_source_status_idx": {
"name": "issue_recovery_actions_company_source_status_idx",
"columns": [
@@ -36773,9 +36893,9 @@
}
],
"isUnique": false,
- "with": {},
+ "concurrently": false,
"method": "btree",
- "concurrently": false
+ "with": {}
},
"issue_recovery_actions_company_owner_status_idx": {
"name": "issue_recovery_actions_company_owner_status_idx",
@@ -36800,9 +36920,9 @@
}
],
"isUnique": false,
- "with": {},
+ "concurrently": false,
"method": "btree",
- "concurrently": false
+ "with": {}
},
"issue_recovery_actions_company_recovery_issue_idx": {
"name": "issue_recovery_actions_company_recovery_issue_idx",
@@ -36821,9 +36941,9 @@
}
],
"isUnique": false,
- "with": {},
+ "concurrently": false,
"method": "btree",
- "concurrently": false
+ "with": {}
},
"issue_recovery_actions_active_source_uq": {
"name": "issue_recovery_actions_active_source_uq",
@@ -36842,10 +36962,10 @@
}
],
"isUnique": true,
- "with": {},
- "method": "btree",
"where": "\"issue_recovery_actions\".\"status\" in ('active', 'escalated')",
- "concurrently": false
+ "concurrently": false,
+ "method": "btree",
+ "with": {}
},
"issue_recovery_actions_active_fingerprint_uq": {
"name": "issue_recovery_actions_active_fingerprint_uq",
@@ -36876,90 +36996,90 @@
}
],
"isUnique": true,
- "with": {},
- "method": "btree",
"where": "\"issue_recovery_actions\".\"status\" in ('active', 'escalated')",
- "concurrently": false
+ "concurrently": false,
+ "method": "btree",
+ "with": {}
}
},
"foreignKeys": {
"issue_recovery_actions_company_id_companies_id_fk": {
"name": "issue_recovery_actions_company_id_companies_id_fk",
"tableFrom": "issue_recovery_actions",
+ "tableTo": "companies",
"columnsFrom": [
"company_id"
],
- "tableTo": "companies",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "no action"
+ "onDelete": "no action",
+ "onUpdate": "no action"
},
"issue_recovery_actions_source_issue_id_issues_id_fk": {
"name": "issue_recovery_actions_source_issue_id_issues_id_fk",
"tableFrom": "issue_recovery_actions",
+ "tableTo": "issues",
"columnsFrom": [
"source_issue_id"
],
- "tableTo": "issues",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "cascade"
+ "onDelete": "cascade",
+ "onUpdate": "no action"
},
"issue_recovery_actions_recovery_issue_id_issues_id_fk": {
"name": "issue_recovery_actions_recovery_issue_id_issues_id_fk",
"tableFrom": "issue_recovery_actions",
+ "tableTo": "issues",
"columnsFrom": [
"recovery_issue_id"
],
- "tableTo": "issues",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "set null"
+ "onDelete": "set null",
+ "onUpdate": "no action"
},
"issue_recovery_actions_owner_agent_id_agents_id_fk": {
"name": "issue_recovery_actions_owner_agent_id_agents_id_fk",
"tableFrom": "issue_recovery_actions",
+ "tableTo": "agents",
"columnsFrom": [
"owner_agent_id"
],
- "tableTo": "agents",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "set null"
+ "onDelete": "set null",
+ "onUpdate": "no action"
},
"issue_recovery_actions_previous_owner_agent_id_agents_id_fk": {
"name": "issue_recovery_actions_previous_owner_agent_id_agents_id_fk",
"tableFrom": "issue_recovery_actions",
+ "tableTo": "agents",
"columnsFrom": [
"previous_owner_agent_id"
],
- "tableTo": "agents",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "set null"
+ "onDelete": "set null",
+ "onUpdate": "no action"
},
"issue_recovery_actions_return_owner_agent_id_agents_id_fk": {
"name": "issue_recovery_actions_return_owner_agent_id_agents_id_fk",
"tableFrom": "issue_recovery_actions",
+ "tableTo": "agents",
"columnsFrom": [
"return_owner_agent_id"
],
- "tableTo": "agents",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "set null"
+ "onDelete": "set null",
+ "onUpdate": "no action"
}
},
"compositePrimaryKeys": {},
@@ -37054,9 +37174,9 @@
}
],
"isUnique": false,
- "with": {},
+ "concurrently": false,
"method": "btree",
- "concurrently": false
+ "with": {}
},
"issue_reference_mentions_company_target_issue_idx": {
"name": "issue_reference_mentions_company_target_issue_idx",
@@ -37075,9 +37195,9 @@
}
],
"isUnique": false,
- "with": {},
+ "concurrently": false,
"method": "btree",
- "concurrently": false
+ "with": {}
},
"issue_reference_mentions_company_issue_pair_idx": {
"name": "issue_reference_mentions_company_issue_pair_idx",
@@ -37102,9 +37222,9 @@
}
],
"isUnique": false,
- "with": {},
+ "concurrently": false,
"method": "btree",
- "concurrently": false
+ "with": {}
},
"issue_reference_mentions_company_source_mention_record_uq": {
"name": "issue_reference_mentions_company_source_mention_record_uq",
@@ -37141,10 +37261,10 @@
}
],
"isUnique": true,
- "with": {},
- "method": "btree",
"where": "\"issue_reference_mentions\".\"source_record_id\" is not null",
- "concurrently": false
+ "concurrently": false,
+ "method": "btree",
+ "with": {}
},
"issue_reference_mentions_company_source_mention_null_record_uq": {
"name": "issue_reference_mentions_company_source_mention_null_record_uq",
@@ -37175,51 +37295,51 @@
}
],
"isUnique": true,
- "with": {},
- "method": "btree",
"where": "\"issue_reference_mentions\".\"source_record_id\" is null",
- "concurrently": false
+ "concurrently": false,
+ "method": "btree",
+ "with": {}
}
},
"foreignKeys": {
"issue_reference_mentions_company_id_companies_id_fk": {
"name": "issue_reference_mentions_company_id_companies_id_fk",
"tableFrom": "issue_reference_mentions",
+ "tableTo": "companies",
"columnsFrom": [
"company_id"
],
- "tableTo": "companies",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "no action"
+ "onDelete": "no action",
+ "onUpdate": "no action"
},
"issue_reference_mentions_source_issue_id_issues_id_fk": {
"name": "issue_reference_mentions_source_issue_id_issues_id_fk",
"tableFrom": "issue_reference_mentions",
+ "tableTo": "issues",
"columnsFrom": [
"source_issue_id"
],
- "tableTo": "issues",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "cascade"
+ "onDelete": "cascade",
+ "onUpdate": "no action"
},
"issue_reference_mentions_target_issue_id_issues_id_fk": {
"name": "issue_reference_mentions_target_issue_id_issues_id_fk",
"tableFrom": "issue_reference_mentions",
+ "tableTo": "issues",
"columnsFrom": [
"target_issue_id"
],
- "tableTo": "issues",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "cascade"
+ "onDelete": "cascade",
+ "onUpdate": "no action"
}
},
"compositePrimaryKeys": {},
@@ -37308,9 +37428,9 @@
}
],
"isUnique": false,
- "with": {},
+ "concurrently": false,
"method": "btree",
- "concurrently": false
+ "with": {}
},
"issue_relations_company_related_issue_idx": {
"name": "issue_relations_company_related_issue_idx",
@@ -37329,9 +37449,9 @@
}
],
"isUnique": false,
- "with": {},
+ "concurrently": false,
"method": "btree",
- "concurrently": false
+ "with": {}
},
"issue_relations_company_type_idx": {
"name": "issue_relations_company_type_idx",
@@ -37350,9 +37470,9 @@
}
],
"isUnique": false,
- "with": {},
+ "concurrently": false,
"method": "btree",
- "concurrently": false
+ "with": {}
},
"issue_relations_company_edge_uq": {
"name": "issue_relations_company_edge_uq",
@@ -37383,63 +37503,63 @@
}
],
"isUnique": true,
- "with": {},
+ "concurrently": false,
"method": "btree",
- "concurrently": false
+ "with": {}
}
},
"foreignKeys": {
"issue_relations_company_id_companies_id_fk": {
"name": "issue_relations_company_id_companies_id_fk",
"tableFrom": "issue_relations",
+ "tableTo": "companies",
"columnsFrom": [
"company_id"
],
- "tableTo": "companies",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "no action"
+ "onDelete": "no action",
+ "onUpdate": "no action"
},
"issue_relations_issue_id_issues_id_fk": {
"name": "issue_relations_issue_id_issues_id_fk",
"tableFrom": "issue_relations",
+ "tableTo": "issues",
"columnsFrom": [
"issue_id"
],
- "tableTo": "issues",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "cascade"
+ "onDelete": "cascade",
+ "onUpdate": "no action"
},
"issue_relations_related_issue_id_issues_id_fk": {
"name": "issue_relations_related_issue_id_issues_id_fk",
"tableFrom": "issue_relations",
+ "tableTo": "issues",
"columnsFrom": [
"related_issue_id"
],
- "tableTo": "issues",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "cascade"
+ "onDelete": "cascade",
+ "onUpdate": "no action"
},
"issue_relations_created_by_agent_id_agents_id_fk": {
"name": "issue_relations_created_by_agent_id_agents_id_fk",
"tableFrom": "issue_relations",
+ "tableTo": "agents",
"columnsFrom": [
"created_by_agent_id"
],
- "tableTo": "agents",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "set null"
+ "onDelete": "set null",
+ "onUpdate": "no action"
}
},
"compositePrimaryKeys": {},
@@ -37649,9 +37769,9 @@
}
],
"isUnique": false,
- "with": {},
+ "concurrently": false,
"method": "btree",
- "concurrently": false
+ "with": {}
},
"issue_thread_interactions_company_issue_created_at_idx": {
"name": "issue_thread_interactions_company_issue_created_at_idx",
@@ -37676,9 +37796,9 @@
}
],
"isUnique": false,
- "with": {},
+ "concurrently": false,
"method": "btree",
- "concurrently": false
+ "with": {}
},
"issue_thread_interactions_company_issue_status_idx": {
"name": "issue_thread_interactions_company_issue_status_idx",
@@ -37703,9 +37823,9 @@
}
],
"isUnique": false,
- "with": {},
+ "concurrently": false,
"method": "btree",
- "concurrently": false
+ "with": {}
},
"issue_thread_interactions_company_issue_idempotency_uq": {
"name": "issue_thread_interactions_company_issue_idempotency_uq",
@@ -37730,10 +37850,10 @@
}
],
"isUnique": true,
- "with": {},
- "method": "btree",
"where": "\"issue_thread_interactions\".\"idempotency_key\" IS NOT NULL",
- "concurrently": false
+ "concurrently": false,
+ "method": "btree",
+ "with": {}
},
"issue_thread_interactions_source_comment_idx": {
"name": "issue_thread_interactions_source_comment_idx",
@@ -37746,9 +37866,9 @@
}
],
"isUnique": false,
- "with": {},
+ "concurrently": false,
"method": "btree",
- "concurrently": false
+ "with": {}
},
"issue_thread_interactions_addressee_agent_idx": {
"name": "issue_thread_interactions_addressee_agent_idx",
@@ -37761,9 +37881,9 @@
}
],
"isUnique": false,
- "with": {},
+ "concurrently": false,
"method": "btree",
- "concurrently": false
+ "with": {}
},
"issue_thread_interactions_addressee_user_idx": {
"name": "issue_thread_interactions_addressee_user_idx",
@@ -37776,115 +37896,115 @@
}
],
"isUnique": false,
- "with": {},
+ "concurrently": false,
"method": "btree",
- "concurrently": false
+ "with": {}
}
},
"foreignKeys": {
"issue_thread_interactions_company_id_companies_id_fk": {
"name": "issue_thread_interactions_company_id_companies_id_fk",
"tableFrom": "issue_thread_interactions",
+ "tableTo": "companies",
"columnsFrom": [
"company_id"
],
- "tableTo": "companies",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "no action"
+ "onDelete": "no action",
+ "onUpdate": "no action"
},
"issue_thread_interactions_issue_id_issues_id_fk": {
"name": "issue_thread_interactions_issue_id_issues_id_fk",
"tableFrom": "issue_thread_interactions",
+ "tableTo": "issues",
"columnsFrom": [
"issue_id"
],
- "tableTo": "issues",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "cascade"
+ "onDelete": "cascade",
+ "onUpdate": "no action"
},
"issue_thread_interactions_source_comment_id_issue_comments_id_fk": {
"name": "issue_thread_interactions_source_comment_id_issue_comments_id_fk",
"tableFrom": "issue_thread_interactions",
+ "tableTo": "issue_comments",
"columnsFrom": [
"source_comment_id"
],
- "tableTo": "issue_comments",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "set null"
+ "onDelete": "set null",
+ "onUpdate": "no action"
},
"issue_thread_interactions_source_run_id_heartbeat_runs_id_fk": {
"name": "issue_thread_interactions_source_run_id_heartbeat_runs_id_fk",
"tableFrom": "issue_thread_interactions",
+ "tableTo": "heartbeat_runs",
"columnsFrom": [
"source_run_id"
],
- "tableTo": "heartbeat_runs",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "set null"
+ "onDelete": "set null",
+ "onUpdate": "no action"
},
"issue_thread_interactions_created_by_agent_id_agents_id_fk": {
"name": "issue_thread_interactions_created_by_agent_id_agents_id_fk",
"tableFrom": "issue_thread_interactions",
+ "tableTo": "agents",
"columnsFrom": [
"created_by_agent_id"
],
- "tableTo": "agents",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "no action"
+ "onDelete": "no action",
+ "onUpdate": "no action"
},
"issue_thread_interactions_addressee_agent_id_agents_id_fk": {
"name": "issue_thread_interactions_addressee_agent_id_agents_id_fk",
"tableFrom": "issue_thread_interactions",
+ "tableTo": "agents",
"columnsFrom": [
"addressee_agent_id"
],
- "tableTo": "agents",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "set null"
+ "onDelete": "set null",
+ "onUpdate": "no action"
},
"issue_thread_interactions_resolved_by_agent_id_agents_id_fk": {
"name": "issue_thread_interactions_resolved_by_agent_id_agents_id_fk",
"tableFrom": "issue_thread_interactions",
+ "tableTo": "agents",
"columnsFrom": [
"resolved_by_agent_id"
],
- "tableTo": "agents",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "no action"
+ "onDelete": "no action",
+ "onUpdate": "no action"
},
"issue_thread_interactions_resolved_by_run_id_heartbeat_runs_id_fk": {
"name": "issue_thread_interactions_resolved_by_run_id_heartbeat_runs_id_fk",
"tableFrom": "issue_thread_interactions",
+ "tableTo": "heartbeat_runs",
"columnsFrom": [
"resolved_by_run_id"
],
- "tableTo": "heartbeat_runs",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "set null"
+ "onDelete": "set null",
+ "onUpdate": "no action"
}
},
"compositePrimaryKeys": {},
@@ -38016,9 +38136,9 @@
}
],
"isUnique": true,
- "with": {},
+ "concurrently": false,
"method": "btree",
- "concurrently": false
+ "with": {}
},
"issue_tree_hold_members_company_issue_idx": {
"name": "issue_tree_hold_members_company_issue_idx",
@@ -38037,9 +38157,9 @@
}
],
"isUnique": false,
- "with": {},
+ "concurrently": false,
"method": "btree",
- "concurrently": false
+ "with": {}
},
"issue_tree_hold_members_hold_depth_idx": {
"name": "issue_tree_hold_members_hold_depth_idx",
@@ -38058,89 +38178,89 @@
}
],
"isUnique": false,
- "with": {},
+ "concurrently": false,
"method": "btree",
- "concurrently": false
+ "with": {}
}
},
"foreignKeys": {
"issue_tree_hold_members_company_id_companies_id_fk": {
"name": "issue_tree_hold_members_company_id_companies_id_fk",
"tableFrom": "issue_tree_hold_members",
+ "tableTo": "companies",
"columnsFrom": [
"company_id"
],
- "tableTo": "companies",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "no action"
+ "onDelete": "no action",
+ "onUpdate": "no action"
},
"issue_tree_hold_members_hold_id_issue_tree_holds_id_fk": {
"name": "issue_tree_hold_members_hold_id_issue_tree_holds_id_fk",
"tableFrom": "issue_tree_hold_members",
+ "tableTo": "issue_tree_holds",
"columnsFrom": [
"hold_id"
],
- "tableTo": "issue_tree_holds",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "cascade"
+ "onDelete": "cascade",
+ "onUpdate": "no action"
},
"issue_tree_hold_members_issue_id_issues_id_fk": {
"name": "issue_tree_hold_members_issue_id_issues_id_fk",
"tableFrom": "issue_tree_hold_members",
+ "tableTo": "issues",
"columnsFrom": [
"issue_id"
],
- "tableTo": "issues",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "cascade"
+ "onDelete": "cascade",
+ "onUpdate": "no action"
},
"issue_tree_hold_members_parent_issue_id_issues_id_fk": {
"name": "issue_tree_hold_members_parent_issue_id_issues_id_fk",
"tableFrom": "issue_tree_hold_members",
+ "tableTo": "issues",
"columnsFrom": [
"parent_issue_id"
],
- "tableTo": "issues",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "set null"
+ "onDelete": "set null",
+ "onUpdate": "no action"
},
"issue_tree_hold_members_assignee_agent_id_agents_id_fk": {
"name": "issue_tree_hold_members_assignee_agent_id_agents_id_fk",
"tableFrom": "issue_tree_hold_members",
+ "tableTo": "agents",
"columnsFrom": [
"assignee_agent_id"
],
- "tableTo": "agents",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "set null"
+ "onDelete": "set null",
+ "onUpdate": "no action"
},
"issue_tree_hold_members_active_run_id_heartbeat_runs_id_fk": {
"name": "issue_tree_hold_members_active_run_id_heartbeat_runs_id_fk",
"tableFrom": "issue_tree_hold_members",
+ "tableTo": "heartbeat_runs",
"columnsFrom": [
"active_run_id"
],
- "tableTo": "heartbeat_runs",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "set null"
+ "onDelete": "set null",
+ "onUpdate": "no action"
}
},
"compositePrimaryKeys": {},
@@ -38303,9 +38423,9 @@
}
],
"isUnique": false,
- "with": {},
+ "concurrently": false,
"method": "btree",
- "concurrently": false
+ "with": {}
},
"issue_tree_holds_company_status_mode_idx": {
"name": "issue_tree_holds_company_status_mode_idx",
@@ -38330,89 +38450,89 @@
}
],
"isUnique": false,
- "with": {},
+ "concurrently": false,
"method": "btree",
- "concurrently": false
+ "with": {}
}
},
"foreignKeys": {
"issue_tree_holds_company_id_companies_id_fk": {
"name": "issue_tree_holds_company_id_companies_id_fk",
"tableFrom": "issue_tree_holds",
+ "tableTo": "companies",
"columnsFrom": [
"company_id"
],
- "tableTo": "companies",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "no action"
+ "onDelete": "no action",
+ "onUpdate": "no action"
},
"issue_tree_holds_root_issue_id_issues_id_fk": {
"name": "issue_tree_holds_root_issue_id_issues_id_fk",
"tableFrom": "issue_tree_holds",
+ "tableTo": "issues",
"columnsFrom": [
"root_issue_id"
],
- "tableTo": "issues",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "cascade"
+ "onDelete": "cascade",
+ "onUpdate": "no action"
},
"issue_tree_holds_created_by_agent_id_agents_id_fk": {
"name": "issue_tree_holds_created_by_agent_id_agents_id_fk",
"tableFrom": "issue_tree_holds",
+ "tableTo": "agents",
"columnsFrom": [
"created_by_agent_id"
],
- "tableTo": "agents",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "set null"
+ "onDelete": "set null",
+ "onUpdate": "no action"
},
"issue_tree_holds_created_by_run_id_heartbeat_runs_id_fk": {
"name": "issue_tree_holds_created_by_run_id_heartbeat_runs_id_fk",
"tableFrom": "issue_tree_holds",
+ "tableTo": "heartbeat_runs",
"columnsFrom": [
"created_by_run_id"
],
- "tableTo": "heartbeat_runs",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "set null"
+ "onDelete": "set null",
+ "onUpdate": "no action"
},
"issue_tree_holds_released_by_agent_id_agents_id_fk": {
"name": "issue_tree_holds_released_by_agent_id_agents_id_fk",
"tableFrom": "issue_tree_holds",
+ "tableTo": "agents",
"columnsFrom": [
"released_by_agent_id"
],
- "tableTo": "agents",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "set null"
+ "onDelete": "set null",
+ "onUpdate": "no action"
},
"issue_tree_holds_released_by_run_id_heartbeat_runs_id_fk": {
"name": "issue_tree_holds_released_by_run_id_heartbeat_runs_id_fk",
"tableFrom": "issue_tree_holds",
+ "tableTo": "heartbeat_runs",
"columnsFrom": [
"released_by_run_id"
],
- "tableTo": "heartbeat_runs",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "set null"
+ "onDelete": "set null",
+ "onUpdate": "no action"
}
},
"compositePrimaryKeys": {},
@@ -38581,9 +38701,9 @@
}
],
"isUnique": true,
- "with": {},
+ "concurrently": false,
"method": "btree",
- "concurrently": false
+ "with": {}
},
"issue_watchdogs_company_status_idx": {
"name": "issue_watchdogs_company_status_idx",
@@ -38602,9 +38722,9 @@
}
],
"isUnique": false,
- "with": {},
+ "concurrently": false,
"method": "btree",
- "concurrently": false
+ "with": {}
},
"issue_watchdogs_company_agent_idx": {
"name": "issue_watchdogs_company_agent_idx",
@@ -38623,9 +38743,9 @@
}
],
"isUnique": false,
- "with": {},
+ "concurrently": false,
"method": "btree",
- "concurrently": false
+ "with": {}
},
"issue_watchdogs_company_watchdog_issue_uq": {
"name": "issue_watchdogs_company_watchdog_issue_uq",
@@ -38644,116 +38764,116 @@
}
],
"isUnique": true,
- "with": {},
- "method": "btree",
"where": "\"issue_watchdogs\".\"watchdog_issue_id\" is not null",
- "concurrently": false
+ "concurrently": false,
+ "method": "btree",
+ "with": {}
}
},
"foreignKeys": {
"issue_watchdogs_company_id_companies_id_fk": {
"name": "issue_watchdogs_company_id_companies_id_fk",
"tableFrom": "issue_watchdogs",
+ "tableTo": "companies",
"columnsFrom": [
"company_id"
],
- "tableTo": "companies",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "cascade"
+ "onDelete": "cascade",
+ "onUpdate": "no action"
},
"issue_watchdogs_issue_id_issues_id_fk": {
"name": "issue_watchdogs_issue_id_issues_id_fk",
"tableFrom": "issue_watchdogs",
+ "tableTo": "issues",
"columnsFrom": [
"issue_id"
],
- "tableTo": "issues",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "cascade"
+ "onDelete": "cascade",
+ "onUpdate": "no action"
},
"issue_watchdogs_watchdog_agent_id_agents_id_fk": {
"name": "issue_watchdogs_watchdog_agent_id_agents_id_fk",
"tableFrom": "issue_watchdogs",
+ "tableTo": "agents",
"columnsFrom": [
"watchdog_agent_id"
],
- "tableTo": "agents",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "no action"
+ "onDelete": "no action",
+ "onUpdate": "no action"
},
"issue_watchdogs_watchdog_issue_id_issues_id_fk": {
"name": "issue_watchdogs_watchdog_issue_id_issues_id_fk",
"tableFrom": "issue_watchdogs",
+ "tableTo": "issues",
"columnsFrom": [
"watchdog_issue_id"
],
- "tableTo": "issues",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "set null"
+ "onDelete": "set null",
+ "onUpdate": "no action"
},
"issue_watchdogs_created_by_agent_id_agents_id_fk": {
"name": "issue_watchdogs_created_by_agent_id_agents_id_fk",
"tableFrom": "issue_watchdogs",
+ "tableTo": "agents",
"columnsFrom": [
"created_by_agent_id"
],
- "tableTo": "agents",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "set null"
+ "onDelete": "set null",
+ "onUpdate": "no action"
},
"issue_watchdogs_created_by_run_id_heartbeat_runs_id_fk": {
"name": "issue_watchdogs_created_by_run_id_heartbeat_runs_id_fk",
"tableFrom": "issue_watchdogs",
+ "tableTo": "heartbeat_runs",
"columnsFrom": [
"created_by_run_id"
],
- "tableTo": "heartbeat_runs",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "set null"
+ "onDelete": "set null",
+ "onUpdate": "no action"
},
"issue_watchdogs_updated_by_agent_id_agents_id_fk": {
"name": "issue_watchdogs_updated_by_agent_id_agents_id_fk",
"tableFrom": "issue_watchdogs",
+ "tableTo": "agents",
"columnsFrom": [
"updated_by_agent_id"
],
- "tableTo": "agents",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "set null"
+ "onDelete": "set null",
+ "onUpdate": "no action"
},
"issue_watchdogs_updated_by_run_id_heartbeat_runs_id_fk": {
"name": "issue_watchdogs_updated_by_run_id_heartbeat_runs_id_fk",
"tableFrom": "issue_watchdogs",
+ "tableTo": "heartbeat_runs",
"columnsFrom": [
"updated_by_run_id"
],
- "tableTo": "heartbeat_runs",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "set null"
+ "onDelete": "set null",
+ "onUpdate": "no action"
}
},
"compositePrimaryKeys": {},
@@ -38923,9 +39043,9 @@
}
],
"isUnique": false,
- "with": {},
+ "concurrently": false,
"method": "btree",
- "concurrently": false
+ "with": {}
},
"issue_work_products_company_execution_workspace_type_idx": {
"name": "issue_work_products_company_execution_workspace_type_idx",
@@ -38950,9 +39070,9 @@
}
],
"isUnique": false,
- "with": {},
+ "concurrently": false,
"method": "btree",
- "concurrently": false
+ "with": {}
},
"issue_work_products_company_provider_external_id_idx": {
"name": "issue_work_products_company_provider_external_id_idx",
@@ -38977,9 +39097,9 @@
}
],
"isUnique": false,
- "with": {},
+ "concurrently": false,
"method": "btree",
- "concurrently": false
+ "with": {}
},
"issue_work_products_company_updated_idx": {
"name": "issue_work_products_company_updated_idx",
@@ -38998,89 +39118,89 @@
}
],
"isUnique": false,
- "with": {},
+ "concurrently": false,
"method": "btree",
- "concurrently": false
+ "with": {}
}
},
"foreignKeys": {
"issue_work_products_company_id_companies_id_fk": {
"name": "issue_work_products_company_id_companies_id_fk",
"tableFrom": "issue_work_products",
+ "tableTo": "companies",
"columnsFrom": [
"company_id"
],
- "tableTo": "companies",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "no action"
+ "onDelete": "no action",
+ "onUpdate": "no action"
},
"issue_work_products_project_id_projects_id_fk": {
"name": "issue_work_products_project_id_projects_id_fk",
"tableFrom": "issue_work_products",
+ "tableTo": "projects",
"columnsFrom": [
"project_id"
],
- "tableTo": "projects",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "set null"
+ "onDelete": "set null",
+ "onUpdate": "no action"
},
"issue_work_products_issue_id_issues_id_fk": {
"name": "issue_work_products_issue_id_issues_id_fk",
"tableFrom": "issue_work_products",
+ "tableTo": "issues",
"columnsFrom": [
"issue_id"
],
- "tableTo": "issues",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "cascade"
+ "onDelete": "cascade",
+ "onUpdate": "no action"
},
"issue_work_products_execution_workspace_id_execution_workspaces_id_fk": {
"name": "issue_work_products_execution_workspace_id_execution_workspaces_id_fk",
"tableFrom": "issue_work_products",
+ "tableTo": "execution_workspaces",
"columnsFrom": [
"execution_workspace_id"
],
- "tableTo": "execution_workspaces",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "set null"
+ "onDelete": "set null",
+ "onUpdate": "no action"
},
"issue_work_products_runtime_service_id_workspace_runtime_services_id_fk": {
"name": "issue_work_products_runtime_service_id_workspace_runtime_services_id_fk",
"tableFrom": "issue_work_products",
+ "tableTo": "workspace_runtime_services",
"columnsFrom": [
"runtime_service_id"
],
- "tableTo": "workspace_runtime_services",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "set null"
+ "onDelete": "set null",
+ "onUpdate": "no action"
},
"issue_work_products_created_by_run_id_heartbeat_runs_id_fk": {
"name": "issue_work_products_created_by_run_id_heartbeat_runs_id_fk",
"tableFrom": "issue_work_products",
+ "tableTo": "heartbeat_runs",
"columnsFrom": [
"created_by_run_id"
],
- "tableTo": "heartbeat_runs",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "set null"
+ "onDelete": "set null",
+ "onUpdate": "no action"
}
},
"compositePrimaryKeys": {},
@@ -39541,9 +39661,9 @@
}
],
"isUnique": true,
- "with": {},
+ "concurrently": false,
"method": "btree",
- "concurrently": false
+ "with": {}
},
"issues_company_status_idx": {
"name": "issues_company_status_idx",
@@ -39562,9 +39682,9 @@
}
],
"isUnique": false,
- "with": {},
+ "concurrently": false,
"method": "btree",
- "concurrently": false
+ "with": {}
},
"issues_company_harness_kind_idx": {
"name": "issues_company_harness_kind_idx",
@@ -39583,9 +39703,9 @@
}
],
"isUnique": false,
- "with": {},
+ "concurrently": false,
"method": "btree",
- "concurrently": false
+ "with": {}
},
"issues_company_assignee_status_idx": {
"name": "issues_company_assignee_status_idx",
@@ -39610,9 +39730,9 @@
}
],
"isUnique": false,
- "with": {},
+ "concurrently": false,
"method": "btree",
- "concurrently": false
+ "with": {}
},
"issues_company_assignee_user_status_idx": {
"name": "issues_company_assignee_user_status_idx",
@@ -39637,9 +39757,9 @@
}
],
"isUnique": false,
- "with": {},
+ "concurrently": false,
"method": "btree",
- "concurrently": false
+ "with": {}
},
"issues_company_responsible_user_idx": {
"name": "issues_company_responsible_user_idx",
@@ -39658,9 +39778,9 @@
}
],
"isUnique": false,
- "with": {},
+ "concurrently": false,
"method": "btree",
- "concurrently": false
+ "with": {}
},
"issues_company_parent_idx": {
"name": "issues_company_parent_idx",
@@ -39679,9 +39799,9 @@
}
],
"isUnique": false,
- "with": {},
+ "concurrently": false,
"method": "btree",
- "concurrently": false
+ "with": {}
},
"issues_company_privacy_parent_idx": {
"name": "issues_company_privacy_parent_idx",
@@ -39700,9 +39820,9 @@
}
],
"isUnique": false,
- "with": {},
+ "concurrently": false,
"method": "btree",
- "concurrently": false
+ "with": {}
},
"issues_company_privacy_root_idx": {
"name": "issues_company_privacy_root_idx",
@@ -39721,9 +39841,9 @@
}
],
"isUnique": false,
- "with": {},
+ "concurrently": false,
"method": "btree",
- "concurrently": false
+ "with": {}
},
"issues_company_project_idx": {
"name": "issues_company_project_idx",
@@ -39742,9 +39862,9 @@
}
],
"isUnique": false,
- "with": {},
+ "concurrently": false,
"method": "btree",
- "concurrently": false
+ "with": {}
},
"issues_company_origin_idx": {
"name": "issues_company_origin_idx",
@@ -39769,9 +39889,9 @@
}
],
"isUnique": false,
- "with": {},
+ "concurrently": false,
"method": "btree",
- "concurrently": false
+ "with": {}
},
"issues_company_project_workspace_idx": {
"name": "issues_company_project_workspace_idx",
@@ -39790,9 +39910,9 @@
}
],
"isUnique": false,
- "with": {},
+ "concurrently": false,
"method": "btree",
- "concurrently": false
+ "with": {}
},
"issues_company_execution_workspace_idx": {
"name": "issues_company_execution_workspace_idx",
@@ -39811,9 +39931,9 @@
}
],
"isUnique": false,
- "with": {},
+ "concurrently": false,
"method": "btree",
- "concurrently": false
+ "with": {}
},
"issues_company_monitor_due_idx": {
"name": "issues_company_monitor_due_idx",
@@ -39832,9 +39952,9 @@
}
],
"isUnique": false,
- "with": {},
+ "concurrently": false,
"method": "btree",
- "concurrently": false
+ "with": {}
},
"issues_company_updated_idx": {
"name": "issues_company_updated_idx",
@@ -39853,9 +39973,9 @@
}
],
"isUnique": false,
- "with": {},
+ "concurrently": false,
"method": "btree",
- "concurrently": false
+ "with": {}
},
"issues_company_created_idx": {
"name": "issues_company_created_idx",
@@ -39874,9 +39994,9 @@
}
],
"isUnique": false,
- "with": {},
+ "concurrently": false,
"method": "btree",
- "concurrently": false
+ "with": {}
},
"issues_open_normalized_title_created_idx": {
"name": "issues_open_normalized_title_created_idx",
@@ -39895,8 +40015,8 @@
},
{
"expression": "lower(regexp_replace(btrim(\"title\"), '\\s+', ' ', 'g'))",
- "isExpression": true,
"asc": true,
+ "isExpression": true,
"nulls": "last"
},
{
@@ -39907,10 +40027,10 @@
}
],
"isUnique": false,
- "with": {},
- "method": "btree",
"where": "\"issues\".\"hidden_at\" is null and \"issues\".\"status\" not in ('done', 'cancelled')",
- "concurrently": false
+ "concurrently": false,
+ "method": "btree",
+ "with": {}
},
"issues_company_priority_idx": {
"name": "issues_company_priority_idx",
@@ -39929,9 +40049,9 @@
}
],
"isUnique": false,
- "with": {},
+ "concurrently": false,
"method": "btree",
- "concurrently": false
+ "with": {}
},
"issues_identifier_idx": {
"name": "issues_identifier_idx",
@@ -39944,9 +40064,9 @@
}
],
"isUnique": true,
- "with": {},
+ "concurrently": false,
"method": "btree",
- "concurrently": false
+ "with": {}
},
"issues_title_search_idx": {
"name": "issues_title_search_idx",
@@ -39960,9 +40080,9 @@
}
],
"isUnique": false,
- "with": {},
+ "concurrently": false,
"method": "gin",
- "concurrently": false
+ "with": {}
},
"issues_identifier_search_idx": {
"name": "issues_identifier_search_idx",
@@ -39976,9 +40096,9 @@
}
],
"isUnique": false,
- "with": {},
+ "concurrently": false,
"method": "gin",
- "concurrently": false
+ "with": {}
},
"issues_description_search_idx": {
"name": "issues_description_search_idx",
@@ -39992,9 +40112,9 @@
}
],
"isUnique": false,
- "with": {},
+ "concurrently": false,
"method": "gin",
- "concurrently": false
+ "with": {}
},
"issues_open_routine_execution_uq": {
"name": "issues_open_routine_execution_uq",
@@ -40025,10 +40145,10 @@
}
],
"isUnique": true,
- "with": {},
- "method": "btree",
"where": "\"issues\".\"origin_kind\" = 'routine_execution'\n and \"issues\".\"origin_id\" is not null\n and \"issues\".\"hidden_at\" is null\n and \"issues\".\"execution_run_id\" is not null\n and \"issues\".\"status\" in ('backlog', 'todo', 'in_progress', 'in_review', 'blocked')",
- "concurrently": false
+ "concurrently": false,
+ "method": "btree",
+ "with": {}
},
"issues_active_liveness_recovery_incident_uq": {
"name": "issues_active_liveness_recovery_incident_uq",
@@ -40053,10 +40173,10 @@
}
],
"isUnique": true,
- "with": {},
- "method": "btree",
"where": "\"issues\".\"origin_kind\" = 'harness_liveness_escalation'\n and \"issues\".\"origin_id\" is not null\n and \"issues\".\"hidden_at\" is null\n and \"issues\".\"status\" not in ('done', 'cancelled')",
- "concurrently": false
+ "concurrently": false,
+ "method": "btree",
+ "with": {}
},
"issues_active_liveness_recovery_leaf_uq": {
"name": "issues_active_liveness_recovery_leaf_uq",
@@ -40081,10 +40201,10 @@
}
],
"isUnique": true,
- "with": {},
- "method": "btree",
"where": "\"issues\".\"origin_kind\" = 'harness_liveness_escalation'\n and \"issues\".\"origin_fingerprint\" <> 'default'\n and \"issues\".\"hidden_at\" is null\n and \"issues\".\"status\" not in ('done', 'cancelled')",
- "concurrently": false
+ "concurrently": false,
+ "method": "btree",
+ "with": {}
},
"issues_active_stale_run_evaluation_uq": {
"name": "issues_active_stale_run_evaluation_uq",
@@ -40109,10 +40229,10 @@
}
],
"isUnique": true,
- "with": {},
- "method": "btree",
"where": "\"issues\".\"origin_kind\" = 'stale_active_run_evaluation'\n and \"issues\".\"origin_id\" is not null\n and \"issues\".\"hidden_at\" is null\n and \"issues\".\"status\" not in ('done', 'cancelled')",
- "concurrently": false
+ "concurrently": false,
+ "method": "btree",
+ "with": {}
},
"issues_active_task_watchdog_uq": {
"name": "issues_active_task_watchdog_uq",
@@ -40137,10 +40257,10 @@
}
],
"isUnique": true,
- "with": {},
- "method": "btree",
"where": "\"issues\".\"origin_kind\" = 'task_watchdog'\n and \"issues\".\"origin_id\" is not null\n and \"issues\".\"hidden_at\" is null\n and \"issues\".\"status\" not in ('done', 'cancelled')",
- "concurrently": false
+ "concurrently": false,
+ "method": "btree",
+ "with": {}
},
"issues_active_productivity_review_uq": {
"name": "issues_active_productivity_review_uq",
@@ -40165,10 +40285,10 @@
}
],
"isUnique": true,
- "with": {},
- "method": "btree",
"where": "\"issues\".\"origin_kind\" = 'issue_productivity_review'\n and \"issues\".\"origin_id\" is not null\n and \"issues\".\"hidden_at\" is null\n and \"issues\".\"status\" not in ('done', 'cancelled')",
- "concurrently": false
+ "concurrently": false,
+ "method": "btree",
+ "with": {}
},
"issues_active_stranded_issue_recovery_uq": {
"name": "issues_active_stranded_issue_recovery_uq",
@@ -40193,10 +40313,10 @@
}
],
"isUnique": true,
- "with": {},
- "method": "btree",
"where": "\"issues\".\"origin_kind\" = 'stranded_issue_recovery'\n and \"issues\".\"origin_id\" is not null\n and \"issues\".\"hidden_at\" is null\n and \"issues\".\"status\" not in ('done', 'cancelled')",
- "concurrently": false
+ "concurrently": false,
+ "method": "btree",
+ "with": {}
},
"issues_onboarding_first_task_uq": {
"name": "issues_onboarding_first_task_uq",
@@ -40209,192 +40329,192 @@
}
],
"isUnique": true,
- "with": {},
- "method": "btree",
"where": "\"issues\".\"origin_kind\" = 'onboarding_first_task'",
- "concurrently": false
+ "concurrently": false,
+ "method": "btree",
+ "with": {}
}
},
"foreignKeys": {
"issues_company_id_companies_id_fk": {
"name": "issues_company_id_companies_id_fk",
"tableFrom": "issues",
+ "tableTo": "companies",
"columnsFrom": [
"company_id"
],
- "tableTo": "companies",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "no action"
+ "onDelete": "no action",
+ "onUpdate": "no action"
},
"issues_conversation_agent_id_agents_id_fk": {
"name": "issues_conversation_agent_id_agents_id_fk",
"tableFrom": "issues",
+ "tableTo": "agents",
"columnsFrom": [
"conversation_agent_id"
],
- "tableTo": "agents",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "no action"
+ "onDelete": "no action",
+ "onUpdate": "no action"
},
"issues_project_id_projects_id_fk": {
"name": "issues_project_id_projects_id_fk",
"tableFrom": "issues",
+ "tableTo": "projects",
"columnsFrom": [
"project_id"
],
- "tableTo": "projects",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "no action"
+ "onDelete": "no action",
+ "onUpdate": "no action"
},
"issues_project_workspace_id_project_workspaces_id_fk": {
"name": "issues_project_workspace_id_project_workspaces_id_fk",
"tableFrom": "issues",
+ "tableTo": "project_workspaces",
"columnsFrom": [
"project_workspace_id"
],
- "tableTo": "project_workspaces",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "set null"
+ "onDelete": "set null",
+ "onUpdate": "no action"
},
"issues_goal_id_goals_id_fk": {
"name": "issues_goal_id_goals_id_fk",
"tableFrom": "issues",
+ "tableTo": "goals",
"columnsFrom": [
"goal_id"
],
- "tableTo": "goals",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "no action"
+ "onDelete": "no action",
+ "onUpdate": "no action"
},
"issues_parent_id_issues_id_fk": {
"name": "issues_parent_id_issues_id_fk",
"tableFrom": "issues",
+ "tableTo": "issues",
"columnsFrom": [
"parent_id"
],
- "tableTo": "issues",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "no action"
+ "onDelete": "no action",
+ "onUpdate": "no action"
},
"issues_privacy_root_issue_id_issues_id_fk": {
"name": "issues_privacy_root_issue_id_issues_id_fk",
"tableFrom": "issues",
+ "tableTo": "issues",
"columnsFrom": [
"privacy_root_issue_id"
],
- "tableTo": "issues",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "no action"
+ "onDelete": "no action",
+ "onUpdate": "no action"
},
"issues_privacy_parent_issue_id_issues_id_fk": {
"name": "issues_privacy_parent_issue_id_issues_id_fk",
"tableFrom": "issues",
+ "tableTo": "issues",
"columnsFrom": [
"privacy_parent_issue_id"
],
- "tableTo": "issues",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "set null"
+ "onDelete": "set null",
+ "onUpdate": "no action"
},
"issues_assignee_agent_id_agents_id_fk": {
"name": "issues_assignee_agent_id_agents_id_fk",
"tableFrom": "issues",
+ "tableTo": "agents",
"columnsFrom": [
"assignee_agent_id"
],
- "tableTo": "agents",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "no action"
+ "onDelete": "no action",
+ "onUpdate": "no action"
},
"issues_checkout_run_id_heartbeat_runs_id_fk": {
"name": "issues_checkout_run_id_heartbeat_runs_id_fk",
"tableFrom": "issues",
+ "tableTo": "heartbeat_runs",
"columnsFrom": [
"checkout_run_id"
],
- "tableTo": "heartbeat_runs",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "set null"
+ "onDelete": "set null",
+ "onUpdate": "no action"
},
"issues_execution_run_id_heartbeat_runs_id_fk": {
"name": "issues_execution_run_id_heartbeat_runs_id_fk",
"tableFrom": "issues",
+ "tableTo": "heartbeat_runs",
"columnsFrom": [
"execution_run_id"
],
- "tableTo": "heartbeat_runs",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "set null"
+ "onDelete": "set null",
+ "onUpdate": "no action"
},
"issues_created_by_agent_id_agents_id_fk": {
"name": "issues_created_by_agent_id_agents_id_fk",
"tableFrom": "issues",
+ "tableTo": "agents",
"columnsFrom": [
"created_by_agent_id"
],
- "tableTo": "agents",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "no action"
+ "onDelete": "no action",
+ "onUpdate": "no action"
},
"issues_execution_workspace_id_execution_workspaces_id_fk": {
"name": "issues_execution_workspace_id_execution_workspaces_id_fk",
"tableFrom": "issues",
+ "tableTo": "execution_workspaces",
"columnsFrom": [
"execution_workspace_id"
],
- "tableTo": "execution_workspaces",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "set null"
+ "onDelete": "set null",
+ "onUpdate": "no action"
}
},
"compositePrimaryKeys": {},
"uniqueConstraints": {
"issues_company_id_uq": {
"name": "issues_company_id_uq",
+ "nullsNotDistinct": false,
"columns": [
"company_id",
"id"
- ],
- "nullsNotDistinct": false
+ ]
}
},
"policies": {},
@@ -40563,9 +40683,9 @@
}
],
"isUnique": true,
- "with": {},
+ "concurrently": false,
"method": "btree",
- "concurrently": false
+ "with": {}
},
"join_requests_company_status_type_created_idx": {
"name": "join_requests_company_status_type_created_idx",
@@ -40596,9 +40716,9 @@
}
],
"isUnique": false,
- "with": {},
+ "concurrently": false,
"method": "btree",
- "concurrently": false
+ "with": {}
},
"join_requests_pending_human_user_uq": {
"name": "join_requests_pending_human_user_uq",
@@ -40617,10 +40737,10 @@
}
],
"isUnique": true,
- "with": {},
- "method": "btree",
"where": "\"join_requests\".\"request_type\" = 'human' AND \"join_requests\".\"status\" = 'pending_approval' AND \"join_requests\".\"requesting_user_id\" IS NOT NULL",
- "concurrently": false
+ "concurrently": false,
+ "method": "btree",
+ "with": {}
},
"join_requests_pending_human_email_uq": {
"name": "join_requests_pending_human_email_uq",
@@ -40633,57 +40753,57 @@
},
{
"expression": "lower(\"request_email_snapshot\")",
- "isExpression": true,
"asc": true,
+ "isExpression": true,
"nulls": "last"
}
],
"isUnique": true,
- "with": {},
- "method": "btree",
"where": "\"join_requests\".\"request_type\" = 'human' AND \"join_requests\".\"status\" = 'pending_approval' AND \"join_requests\".\"request_email_snapshot\" IS NOT NULL",
- "concurrently": false
+ "concurrently": false,
+ "method": "btree",
+ "with": {}
}
},
"foreignKeys": {
"join_requests_invite_id_invites_id_fk": {
"name": "join_requests_invite_id_invites_id_fk",
"tableFrom": "join_requests",
+ "tableTo": "invites",
"columnsFrom": [
"invite_id"
],
- "tableTo": "invites",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "no action"
+ "onDelete": "no action",
+ "onUpdate": "no action"
},
"join_requests_company_id_companies_id_fk": {
"name": "join_requests_company_id_companies_id_fk",
"tableFrom": "join_requests",
+ "tableTo": "companies",
"columnsFrom": [
"company_id"
],
- "tableTo": "companies",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "no action"
+ "onDelete": "no action",
+ "onUpdate": "no action"
},
"join_requests_created_agent_id_agents_id_fk": {
"name": "join_requests_created_agent_id_agents_id_fk",
"tableFrom": "join_requests",
+ "tableTo": "agents",
"columnsFrom": [
"created_agent_id"
],
- "tableTo": "agents",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "no action"
+ "onDelete": "no action",
+ "onUpdate": "no action"
}
},
"compositePrimaryKeys": {},
@@ -40748,9 +40868,9 @@
}
],
"isUnique": false,
- "with": {},
+ "concurrently": false,
"method": "btree",
- "concurrently": false
+ "with": {}
},
"labels_company_name_idx": {
"name": "labels_company_name_idx",
@@ -40769,24 +40889,24 @@
}
],
"isUnique": true,
- "with": {},
+ "concurrently": false,
"method": "btree",
- "concurrently": false
+ "with": {}
}
},
"foreignKeys": {
"labels_company_id_companies_id_fk": {
"name": "labels_company_id_companies_id_fk",
"tableFrom": "labels",
+ "tableTo": "companies",
"columnsFrom": [
"company_id"
],
- "tableTo": "companies",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "cascade"
+ "onDelete": "cascade",
+ "onUpdate": "no action"
}
},
"compositePrimaryKeys": {},
@@ -40936,9 +41056,9 @@
}
],
"isUnique": false,
- "with": {},
+ "concurrently": false,
"method": "btree",
- "concurrently": false
+ "with": {}
},
"managed_agent_profiles_company_key_uq": {
"name": "managed_agent_profiles_company_key_uq",
@@ -40957,9 +41077,9 @@
}
],
"isUnique": true,
- "with": {},
+ "concurrently": false,
"method": "btree",
- "concurrently": false
+ "with": {}
},
"managed_agent_profiles_company_resource_uq": {
"name": "managed_agent_profiles_company_resource_uq",
@@ -40990,37 +41110,37 @@
}
],
"isUnique": true,
- "with": {},
+ "concurrently": false,
"method": "btree",
- "concurrently": false
+ "with": {}
}
},
"foreignKeys": {
"managed_agent_profiles_company_id_companies_id_fk": {
"name": "managed_agent_profiles_company_id_companies_id_fk",
"tableFrom": "managed_agent_profiles",
+ "tableTo": "companies",
"columnsFrom": [
"company_id"
],
- "tableTo": "companies",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "cascade"
+ "onDelete": "cascade",
+ "onUpdate": "no action"
},
"managed_agent_profiles_api_key_secret_id_company_secrets_id_fk": {
"name": "managed_agent_profiles_api_key_secret_id_company_secrets_id_fk",
"tableFrom": "managed_agent_profiles",
+ "tableTo": "company_secrets",
"columnsFrom": [
"api_key_secret_id"
],
- "tableTo": "company_secrets",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "restrict"
+ "onDelete": "restrict",
+ "onUpdate": "no action"
}
},
"compositePrimaryKeys": {},
@@ -41206,99 +41326,100 @@
}
],
"isUnique": false,
- "with": {},
- "method": "btree",
"where": "\"native_run_finalizations\".\"control_deadline_at\" is not null",
- "concurrently": false
+ "concurrently": false,
+ "method": "btree",
+ "with": {}
}
},
"foreignKeys": {
"native_run_finalizations_company_id_companies_id_fk": {
"name": "native_run_finalizations_company_id_companies_id_fk",
"tableFrom": "native_run_finalizations",
+ "tableTo": "companies",
"columnsFrom": [
"company_id"
],
- "tableTo": "companies",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "no action"
+ "onDelete": "no action",
+ "onUpdate": "no action"
},
"native_run_finalizations_issue_company_fk": {
"name": "native_run_finalizations_issue_company_fk",
"tableFrom": "native_run_finalizations",
+ "tableTo": "issues",
"columnsFrom": [
"company_id",
"issue_id"
],
- "tableTo": "issues",
"columnsTo": [
"company_id",
"id"
],
- "onUpdate": "no action",
- "onDelete": "no action"
+ "onDelete": "no action",
+ "onUpdate": "no action"
},
"native_run_finalizations_run_owner_fk": {
"name": "native_run_finalizations_run_owner_fk",
"tableFrom": "native_run_finalizations",
+ "tableTo": "heartbeat_runs",
"columnsFrom": [
"company_id",
"issue_id",
"run_id"
],
- "tableTo": "heartbeat_runs",
"columnsTo": [
"company_id",
"native_issue_id",
"id"
],
- "onUpdate": "no action",
- "onDelete": "no action"
+ "onDelete": "no action",
+ "onUpdate": "no action"
},
"native_run_finalizations_result_owner_fk": {
"name": "native_run_finalizations_result_owner_fk",
"tableFrom": "native_run_finalizations",
+ "tableTo": "native_run_results",
"columnsFrom": [
"company_id",
"issue_id",
"run_id",
"result_id"
],
- "tableTo": "native_run_results",
"columnsTo": [
"company_id",
"issue_id",
"run_id",
"id"
],
- "onUpdate": "no action",
- "onDelete": "no action"
+ "onDelete": "no action",
+ "onUpdate": "no action"
},
"native_run_finalizations_assessment_owner_fk": {
"name": "native_run_finalizations_assessment_owner_fk",
"tableFrom": "native_run_finalizations",
+ "tableTo": "work_assessments",
"columnsFrom": [
"company_id",
"issue_id",
"run_id",
"assessment_id"
],
- "tableTo": "work_assessments",
"columnsTo": [
"company_id",
"issue_id",
"run_id",
"id"
],
- "onUpdate": "no action",
- "onDelete": "no action"
+ "onDelete": "no action",
+ "onUpdate": "no action"
},
"native_run_finalizations_decision_owner_fk": {
"name": "native_run_finalizations_decision_owner_fk",
"tableFrom": "native_run_finalizations",
+ "tableTo": "status_decisions",
"columnsFrom": [
"company_id",
"issue_id",
@@ -41306,7 +41427,6 @@
"assessment_id",
"decision_id"
],
- "tableTo": "status_decisions",
"columnsTo": [
"company_id",
"issue_id",
@@ -41314,8 +41434,8 @@
"assessment_id",
"id"
],
- "onUpdate": "no action",
- "onDelete": "no action"
+ "onDelete": "no action",
+ "onUpdate": "no action"
}
},
"compositePrimaryKeys": {},
@@ -41442,9 +41562,9 @@
}
],
"isUnique": true,
- "with": {},
+ "concurrently": false,
"method": "btree",
- "concurrently": false
+ "with": {}
},
"native_run_results_run_caller_result_uq": {
"name": "native_run_results_run_caller_result_uq",
@@ -41463,9 +41583,9 @@
}
],
"isUnique": true,
- "with": {},
+ "concurrently": false,
"method": "btree",
- "concurrently": false
+ "with": {}
},
"native_run_results_run_caller_dedupe_uq": {
"name": "native_run_results_run_caller_dedupe_uq",
@@ -41484,88 +41604,88 @@
}
],
"isUnique": true,
- "with": {},
+ "concurrently": false,
"method": "btree",
- "concurrently": false
+ "with": {}
}
},
"foreignKeys": {
"native_run_results_company_id_companies_id_fk": {
"name": "native_run_results_company_id_companies_id_fk",
"tableFrom": "native_run_results",
+ "tableTo": "companies",
"columnsFrom": [
"company_id"
],
- "tableTo": "companies",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "no action"
+ "onDelete": "no action",
+ "onUpdate": "no action"
},
"native_run_results_issue_company_fk": {
"name": "native_run_results_issue_company_fk",
"tableFrom": "native_run_results",
+ "tableTo": "issues",
"columnsFrom": [
"company_id",
"issue_id"
],
- "tableTo": "issues",
"columnsTo": [
"company_id",
"id"
],
- "onUpdate": "no action",
- "onDelete": "no action"
+ "onDelete": "no action",
+ "onUpdate": "no action"
},
"native_run_results_run_contract_owner_fk": {
"name": "native_run_results_run_contract_owner_fk",
"tableFrom": "native_run_results",
+ "tableTo": "heartbeat_runs",
"columnsFrom": [
"company_id",
"issue_id",
"run_id",
"completion_contract_id"
],
- "tableTo": "heartbeat_runs",
"columnsTo": [
"company_id",
"native_issue_id",
"id",
"completion_contract_id"
],
- "onUpdate": "no action",
- "onDelete": "no action"
+ "onDelete": "no action",
+ "onUpdate": "no action"
},
"native_run_results_completion_contract_owner_fk": {
"name": "native_run_results_completion_contract_owner_fk",
"tableFrom": "native_run_results",
+ "tableTo": "completion_contracts",
"columnsFrom": [
"company_id",
"issue_id",
"completion_contract_id"
],
- "tableTo": "completion_contracts",
"columnsTo": [
"company_id",
"issue_id",
"id"
],
- "onUpdate": "no action",
- "onDelete": "no action"
+ "onDelete": "no action",
+ "onUpdate": "no action"
}
},
"compositePrimaryKeys": {},
"uniqueConstraints": {
"native_run_results_company_issue_run_id_uq": {
"name": "native_run_results_company_issue_run_id_uq",
+ "nullsNotDistinct": false,
"columns": [
"company_id",
"issue_id",
"run_id",
"id"
- ],
- "nullsNotDistinct": false
+ ]
}
},
"policies": {},
@@ -41683,9 +41803,9 @@
}
],
"isUnique": true,
- "with": {},
+ "concurrently": false,
"method": "btree",
- "concurrently": false
+ "with": {}
},
"pipeline_automation_executions_company_case_idx": {
"name": "pipeline_automation_executions_company_case_idx",
@@ -41704,9 +41824,9 @@
}
],
"isUnique": false,
- "with": {},
+ "concurrently": false,
"method": "btree",
- "concurrently": false
+ "with": {}
},
"pipeline_automation_executions_routine_idx": {
"name": "pipeline_automation_executions_routine_idx",
@@ -41719,9 +41839,9 @@
}
],
"isUnique": false,
- "with": {},
+ "concurrently": false,
"method": "btree",
- "concurrently": false
+ "with": {}
},
"pipeline_automation_executions_execution_issue_idx": {
"name": "pipeline_automation_executions_execution_issue_idx",
@@ -41734,9 +41854,9 @@
}
],
"isUnique": false,
- "with": {},
+ "concurrently": false,
"method": "btree",
- "concurrently": false
+ "with": {}
},
"pipeline_automation_executions_retry_of_execution_idx": {
"name": "pipeline_automation_executions_retry_of_execution_idx",
@@ -41749,63 +41869,63 @@
}
],
"isUnique": false,
- "with": {},
+ "concurrently": false,
"method": "btree",
- "concurrently": false
+ "with": {}
}
},
"foreignKeys": {
"pipeline_automation_executions_company_id_companies_id_fk": {
"name": "pipeline_automation_executions_company_id_companies_id_fk",
"tableFrom": "pipeline_automation_executions",
+ "tableTo": "companies",
"columnsFrom": [
"company_id"
],
- "tableTo": "companies",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "cascade"
+ "onDelete": "cascade",
+ "onUpdate": "no action"
},
"pipeline_automation_executions_case_id_pipeline_cases_id_fk": {
"name": "pipeline_automation_executions_case_id_pipeline_cases_id_fk",
"tableFrom": "pipeline_automation_executions",
+ "tableTo": "pipeline_cases",
"columnsFrom": [
"case_id"
],
- "tableTo": "pipeline_cases",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "cascade"
+ "onDelete": "cascade",
+ "onUpdate": "no action"
},
"pipeline_automation_executions_routine_id_routines_id_fk": {
"name": "pipeline_automation_executions_routine_id_routines_id_fk",
"tableFrom": "pipeline_automation_executions",
+ "tableTo": "routines",
"columnsFrom": [
"routine_id"
],
- "tableTo": "routines",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "cascade"
+ "onDelete": "cascade",
+ "onUpdate": "no action"
},
"pipeline_automation_executions_execution_issue_id_issues_id_fk": {
"name": "pipeline_automation_executions_execution_issue_id_issues_id_fk",
"tableFrom": "pipeline_automation_executions",
+ "tableTo": "issues",
"columnsFrom": [
"execution_issue_id"
],
- "tableTo": "issues",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "set null"
+ "onDelete": "set null",
+ "onUpdate": "no action"
}
},
"compositePrimaryKeys": {},
@@ -41881,9 +42001,9 @@
}
],
"isUnique": true,
- "with": {},
+ "concurrently": false,
"method": "btree",
- "concurrently": false
+ "with": {}
},
"pipeline_case_blockers_blocked_by_idx": {
"name": "pipeline_case_blockers_blocked_by_idx",
@@ -41896,9 +42016,9 @@
}
],
"isUnique": false,
- "with": {},
+ "concurrently": false,
"method": "btree",
- "concurrently": false
+ "with": {}
},
"pipeline_case_blockers_company_case_idx": {
"name": "pipeline_case_blockers_company_case_idx",
@@ -41917,50 +42037,50 @@
}
],
"isUnique": false,
- "with": {},
+ "concurrently": false,
"method": "btree",
- "concurrently": false
+ "with": {}
}
},
"foreignKeys": {
"pipeline_case_blockers_company_id_companies_id_fk": {
"name": "pipeline_case_blockers_company_id_companies_id_fk",
"tableFrom": "pipeline_case_blockers",
+ "tableTo": "companies",
"columnsFrom": [
"company_id"
],
- "tableTo": "companies",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "cascade"
+ "onDelete": "cascade",
+ "onUpdate": "no action"
},
"pipeline_case_blockers_case_id_pipeline_cases_id_fk": {
"name": "pipeline_case_blockers_case_id_pipeline_cases_id_fk",
"tableFrom": "pipeline_case_blockers",
+ "tableTo": "pipeline_cases",
"columnsFrom": [
"case_id"
],
- "tableTo": "pipeline_cases",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "cascade"
+ "onDelete": "cascade",
+ "onUpdate": "no action"
},
"pipeline_case_blockers_blocked_by_case_id_pipeline_cases_id_fk": {
"name": "pipeline_case_blockers_blocked_by_case_id_pipeline_cases_id_fk",
"tableFrom": "pipeline_case_blockers",
+ "tableTo": "pipeline_cases",
"columnsFrom": [
"blocked_by_case_id"
],
- "tableTo": "pipeline_cases",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "cascade"
+ "onDelete": "cascade",
+ "onUpdate": "no action"
}
},
"compositePrimaryKeys": {},
@@ -42048,9 +42168,9 @@
}
],
"isUnique": true,
- "with": {},
+ "concurrently": false,
"method": "btree",
- "concurrently": false
+ "with": {}
},
"pipeline_case_documents_document_uq": {
"name": "pipeline_case_documents_document_uq",
@@ -42063,9 +42183,9 @@
}
],
"isUnique": true,
- "with": {},
+ "concurrently": false,
"method": "btree",
- "concurrently": false
+ "with": {}
},
"pipeline_case_documents_company_case_updated_idx": {
"name": "pipeline_case_documents_company_case_updated_idx",
@@ -42090,50 +42210,50 @@
}
],
"isUnique": false,
- "with": {},
+ "concurrently": false,
"method": "btree",
- "concurrently": false
+ "with": {}
}
},
"foreignKeys": {
"pipeline_case_documents_company_id_companies_id_fk": {
"name": "pipeline_case_documents_company_id_companies_id_fk",
"tableFrom": "pipeline_case_documents",
+ "tableTo": "companies",
"columnsFrom": [
"company_id"
],
- "tableTo": "companies",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "cascade"
+ "onDelete": "cascade",
+ "onUpdate": "no action"
},
"pipeline_case_documents_case_id_pipeline_cases_id_fk": {
"name": "pipeline_case_documents_case_id_pipeline_cases_id_fk",
"tableFrom": "pipeline_case_documents",
+ "tableTo": "pipeline_cases",
"columnsFrom": [
"case_id"
],
- "tableTo": "pipeline_cases",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "cascade"
+ "onDelete": "cascade",
+ "onUpdate": "no action"
},
"pipeline_case_documents_document_id_documents_id_fk": {
"name": "pipeline_case_documents_document_id_documents_id_fk",
"tableFrom": "pipeline_case_documents",
+ "tableTo": "documents",
"columnsFrom": [
"document_id"
],
- "tableTo": "documents",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "cascade"
+ "onDelete": "cascade",
+ "onUpdate": "no action"
}
},
"compositePrimaryKeys": {},
@@ -42247,9 +42367,9 @@
}
],
"isUnique": false,
- "with": {},
+ "concurrently": false,
"method": "btree",
- "concurrently": false
+ "with": {}
},
"pipeline_case_events_company_case_idx": {
"name": "pipeline_case_events_company_case_idx",
@@ -42268,76 +42388,76 @@
}
],
"isUnique": false,
- "with": {},
+ "concurrently": false,
"method": "btree",
- "concurrently": false
+ "with": {}
}
},
"foreignKeys": {
"pipeline_case_events_company_id_companies_id_fk": {
"name": "pipeline_case_events_company_id_companies_id_fk",
"tableFrom": "pipeline_case_events",
+ "tableTo": "companies",
"columnsFrom": [
"company_id"
],
- "tableTo": "companies",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "cascade"
+ "onDelete": "cascade",
+ "onUpdate": "no action"
},
"pipeline_case_events_case_id_pipeline_cases_id_fk": {
"name": "pipeline_case_events_case_id_pipeline_cases_id_fk",
"tableFrom": "pipeline_case_events",
+ "tableTo": "pipeline_cases",
"columnsFrom": [
"case_id"
],
- "tableTo": "pipeline_cases",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "cascade"
+ "onDelete": "cascade",
+ "onUpdate": "no action"
},
"pipeline_case_events_actor_agent_id_agents_id_fk": {
"name": "pipeline_case_events_actor_agent_id_agents_id_fk",
"tableFrom": "pipeline_case_events",
+ "tableTo": "agents",
"columnsFrom": [
"actor_agent_id"
],
- "tableTo": "agents",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "set null"
+ "onDelete": "set null",
+ "onUpdate": "no action"
},
"pipeline_case_events_from_stage_id_pipeline_stages_id_fk": {
"name": "pipeline_case_events_from_stage_id_pipeline_stages_id_fk",
"tableFrom": "pipeline_case_events",
+ "tableTo": "pipeline_stages",
"columnsFrom": [
"from_stage_id"
],
- "tableTo": "pipeline_stages",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "set null"
+ "onDelete": "set null",
+ "onUpdate": "no action"
},
"pipeline_case_events_to_stage_id_pipeline_stages_id_fk": {
"name": "pipeline_case_events_to_stage_id_pipeline_stages_id_fk",
"tableFrom": "pipeline_case_events",
+ "tableTo": "pipeline_stages",
"columnsFrom": [
"to_stage_id"
],
- "tableTo": "pipeline_stages",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "set null"
+ "onDelete": "set null",
+ "onUpdate": "no action"
}
},
"compositePrimaryKeys": {},
@@ -42457,9 +42577,9 @@
}
],
"isUnique": true,
- "with": {},
+ "concurrently": false,
"method": "btree",
- "concurrently": false
+ "with": {}
},
"pipeline_case_issue_links_issue_idx": {
"name": "pipeline_case_issue_links_issue_idx",
@@ -42472,9 +42592,9 @@
}
],
"isUnique": false,
- "with": {},
+ "concurrently": false,
"method": "btree",
- "concurrently": false
+ "with": {}
},
"pipeline_case_issue_links_company_case_idx": {
"name": "pipeline_case_issue_links_company_case_idx",
@@ -42493,9 +42613,9 @@
}
],
"isUnique": false,
- "with": {},
+ "concurrently": false,
"method": "btree",
- "concurrently": false
+ "with": {}
},
"pipeline_case_issue_links_automation_attempt_idx": {
"name": "pipeline_case_issue_links_automation_attempt_idx",
@@ -42508,50 +42628,50 @@
}
],
"isUnique": false,
- "with": {},
+ "concurrently": false,
"method": "btree",
- "concurrently": false
+ "with": {}
}
},
"foreignKeys": {
"pipeline_case_issue_links_company_id_companies_id_fk": {
"name": "pipeline_case_issue_links_company_id_companies_id_fk",
"tableFrom": "pipeline_case_issue_links",
+ "tableTo": "companies",
"columnsFrom": [
"company_id"
],
- "tableTo": "companies",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "cascade"
+ "onDelete": "cascade",
+ "onUpdate": "no action"
},
"pipeline_case_issue_links_case_id_pipeline_cases_id_fk": {
"name": "pipeline_case_issue_links_case_id_pipeline_cases_id_fk",
"tableFrom": "pipeline_case_issue_links",
+ "tableTo": "pipeline_cases",
"columnsFrom": [
"case_id"
],
- "tableTo": "pipeline_cases",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "cascade"
+ "onDelete": "cascade",
+ "onUpdate": "no action"
},
"pipeline_case_issue_links_issue_id_issues_id_fk": {
"name": "pipeline_case_issue_links_issue_id_issues_id_fk",
"tableFrom": "pipeline_case_issue_links",
+ "tableTo": "issues",
"columnsFrom": [
"issue_id"
],
- "tableTo": "issues",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "cascade"
+ "onDelete": "cascade",
+ "onUpdate": "no action"
}
},
"compositePrimaryKeys": {},
@@ -42793,9 +42913,9 @@
}
],
"isUnique": true,
- "with": {},
+ "concurrently": false,
"method": "btree",
- "concurrently": false
+ "with": {}
},
"pipeline_cases_parent_request_key_uq": {
"name": "pipeline_cases_parent_request_key_uq",
@@ -42814,10 +42934,10 @@
}
],
"isUnique": true,
- "with": {},
- "method": "btree",
"where": "\"pipeline_cases\".\"request_key\" is not null and \"pipeline_cases\".\"retired_at\" is null",
- "concurrently": false
+ "concurrently": false,
+ "method": "btree",
+ "with": {}
},
"pipeline_cases_company_idx": {
"name": "pipeline_cases_company_idx",
@@ -42830,9 +42950,9 @@
}
],
"isUnique": false,
- "with": {},
+ "concurrently": false,
"method": "btree",
- "concurrently": false
+ "with": {}
},
"pipeline_cases_pipeline_stage_idx": {
"name": "pipeline_cases_pipeline_stage_idx",
@@ -42851,9 +42971,9 @@
}
],
"isUnique": false,
- "with": {},
+ "concurrently": false,
"method": "btree",
- "concurrently": false
+ "with": {}
},
"pipeline_cases_parent_idx": {
"name": "pipeline_cases_parent_idx",
@@ -42866,9 +42986,9 @@
}
],
"isUnique": false,
- "with": {},
+ "concurrently": false,
"method": "btree",
- "concurrently": false
+ "with": {}
},
"pipeline_cases_automation_attempt_idx": {
"name": "pipeline_cases_automation_attempt_idx",
@@ -42881,9 +43001,9 @@
}
],
"isUnique": false,
- "with": {},
+ "concurrently": false,
"method": "btree",
- "concurrently": false
+ "with": {}
},
"pipeline_cases_retired_idx": {
"name": "pipeline_cases_retired_idx",
@@ -42902,9 +43022,9 @@
}
],
"isUnique": false,
- "with": {},
+ "concurrently": false,
"method": "btree",
- "concurrently": false
+ "with": {}
},
"pipeline_cases_lease_expires_idx": {
"name": "pipeline_cases_lease_expires_idx",
@@ -42917,90 +43037,90 @@
}
],
"isUnique": false,
- "with": {},
- "method": "btree",
"where": "\"pipeline_cases\".\"lease_expires_at\" is not null",
- "concurrently": false
+ "concurrently": false,
+ "method": "btree",
+ "with": {}
}
},
"foreignKeys": {
"pipeline_cases_company_id_companies_id_fk": {
"name": "pipeline_cases_company_id_companies_id_fk",
"tableFrom": "pipeline_cases",
+ "tableTo": "companies",
"columnsFrom": [
"company_id"
],
- "tableTo": "companies",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "cascade"
+ "onDelete": "cascade",
+ "onUpdate": "no action"
},
"pipeline_cases_pipeline_id_pipelines_id_fk": {
"name": "pipeline_cases_pipeline_id_pipelines_id_fk",
"tableFrom": "pipeline_cases",
+ "tableTo": "pipelines",
"columnsFrom": [
"pipeline_id"
],
- "tableTo": "pipelines",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "cascade"
+ "onDelete": "cascade",
+ "onUpdate": "no action"
},
"pipeline_cases_stage_id_pipeline_stages_id_fk": {
"name": "pipeline_cases_stage_id_pipeline_stages_id_fk",
"tableFrom": "pipeline_cases",
+ "tableTo": "pipeline_stages",
"columnsFrom": [
"stage_id"
],
- "tableTo": "pipeline_stages",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "no action"
+ "onDelete": "no action",
+ "onUpdate": "no action"
},
"pipeline_cases_parent_case_id_pipeline_cases_id_fk": {
"name": "pipeline_cases_parent_case_id_pipeline_cases_id_fk",
"tableFrom": "pipeline_cases",
+ "tableTo": "pipeline_cases",
"columnsFrom": [
"parent_case_id"
],
- "tableTo": "pipeline_cases",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "set null"
+ "onDelete": "set null",
+ "onUpdate": "no action"
},
"pipeline_cases_lease_agent_id_agents_id_fk": {
"name": "pipeline_cases_lease_agent_id_agents_id_fk",
"tableFrom": "pipeline_cases",
+ "tableTo": "agents",
"columnsFrom": [
"lease_agent_id"
],
- "tableTo": "agents",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "set null"
+ "onDelete": "set null",
+ "onUpdate": "no action"
},
"pipeline_cases_created_by_agent_id_agents_id_fk": {
"name": "pipeline_cases_created_by_agent_id_agents_id_fk",
"tableFrom": "pipeline_cases",
+ "tableTo": "agents",
"columnsFrom": [
"created_by_agent_id"
],
- "tableTo": "agents",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "set null"
+ "onDelete": "set null",
+ "onUpdate": "no action"
}
},
"compositePrimaryKeys": {},
@@ -43092,9 +43212,9 @@
}
],
"isUnique": true,
- "with": {},
+ "concurrently": false,
"method": "btree",
- "concurrently": false
+ "with": {}
},
"pipeline_documents_document_uq": {
"name": "pipeline_documents_document_uq",
@@ -43107,9 +43227,9 @@
}
],
"isUnique": true,
- "with": {},
+ "concurrently": false,
"method": "btree",
- "concurrently": false
+ "with": {}
},
"pipeline_documents_company_pipeline_updated_idx": {
"name": "pipeline_documents_company_pipeline_updated_idx",
@@ -43134,50 +43254,50 @@
}
],
"isUnique": false,
- "with": {},
+ "concurrently": false,
"method": "btree",
- "concurrently": false
+ "with": {}
}
},
"foreignKeys": {
"pipeline_documents_company_id_companies_id_fk": {
"name": "pipeline_documents_company_id_companies_id_fk",
"tableFrom": "pipeline_documents",
+ "tableTo": "companies",
"columnsFrom": [
"company_id"
],
- "tableTo": "companies",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "cascade"
+ "onDelete": "cascade",
+ "onUpdate": "no action"
},
"pipeline_documents_pipeline_id_pipelines_id_fk": {
"name": "pipeline_documents_pipeline_id_pipelines_id_fk",
"tableFrom": "pipeline_documents",
+ "tableTo": "pipelines",
"columnsFrom": [
"pipeline_id"
],
- "tableTo": "pipelines",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "cascade"
+ "onDelete": "cascade",
+ "onUpdate": "no action"
},
"pipeline_documents_document_id_documents_id_fk": {
"name": "pipeline_documents_document_id_documents_id_fk",
"tableFrom": "pipeline_documents",
+ "tableTo": "documents",
"columnsFrom": [
"document_id"
],
- "tableTo": "documents",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "cascade"
+ "onDelete": "cascade",
+ "onUpdate": "no action"
}
},
"compositePrimaryKeys": {},
@@ -43267,9 +43387,9 @@
}
],
"isUnique": true,
- "with": {},
+ "concurrently": false,
"method": "btree",
- "concurrently": false
+ "with": {}
},
"pipeline_stages_pipeline_position_idx": {
"name": "pipeline_stages_pipeline_position_idx",
@@ -43288,24 +43408,24 @@
}
],
"isUnique": false,
- "with": {},
+ "concurrently": false,
"method": "btree",
- "concurrently": false
+ "with": {}
}
},
"foreignKeys": {
"pipeline_stages_pipeline_id_pipelines_id_fk": {
"name": "pipeline_stages_pipeline_id_pipelines_id_fk",
"tableFrom": "pipeline_stages",
+ "tableTo": "pipelines",
"columnsFrom": [
"pipeline_id"
],
- "tableTo": "pipelines",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "cascade"
+ "onDelete": "cascade",
+ "onUpdate": "no action"
}
},
"compositePrimaryKeys": {},
@@ -43393,9 +43513,9 @@
}
],
"isUnique": true,
- "with": {},
+ "concurrently": false,
"method": "btree",
- "concurrently": false
+ "with": {}
},
"pipeline_transitions_pipeline_from_idx": {
"name": "pipeline_transitions_pipeline_from_idx",
@@ -43414,9 +43534,9 @@
}
],
"isUnique": false,
- "with": {},
+ "concurrently": false,
"method": "btree",
- "concurrently": false
+ "with": {}
},
"pipeline_transitions_pipeline_to_idx": {
"name": "pipeline_transitions_pipeline_to_idx",
@@ -43435,50 +43555,50 @@
}
],
"isUnique": false,
- "with": {},
+ "concurrently": false,
"method": "btree",
- "concurrently": false
+ "with": {}
}
},
"foreignKeys": {
"pipeline_transitions_pipeline_id_pipelines_id_fk": {
"name": "pipeline_transitions_pipeline_id_pipelines_id_fk",
"tableFrom": "pipeline_transitions",
+ "tableTo": "pipelines",
"columnsFrom": [
"pipeline_id"
],
- "tableTo": "pipelines",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "cascade"
+ "onDelete": "cascade",
+ "onUpdate": "no action"
},
"pipeline_transitions_from_stage_id_pipeline_stages_id_fk": {
"name": "pipeline_transitions_from_stage_id_pipeline_stages_id_fk",
"tableFrom": "pipeline_transitions",
+ "tableTo": "pipeline_stages",
"columnsFrom": [
"from_stage_id"
],
- "tableTo": "pipeline_stages",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "cascade"
+ "onDelete": "cascade",
+ "onUpdate": "no action"
},
"pipeline_transitions_to_stage_id_pipeline_stages_id_fk": {
"name": "pipeline_transitions_to_stage_id_pipeline_stages_id_fk",
"tableFrom": "pipeline_transitions",
+ "tableTo": "pipeline_stages",
"columnsFrom": [
"to_stage_id"
],
- "tableTo": "pipeline_stages",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "cascade"
+ "onDelete": "cascade",
+ "onUpdate": "no action"
}
},
"compositePrimaryKeys": {},
@@ -43586,9 +43706,9 @@
}
],
"isUnique": true,
- "with": {},
+ "concurrently": false,
"method": "btree",
- "concurrently": false
+ "with": {}
},
"pipelines_company_idx": {
"name": "pipelines_company_idx",
@@ -43601,9 +43721,9 @@
}
],
"isUnique": false,
- "with": {},
+ "concurrently": false,
"method": "btree",
- "concurrently": false
+ "with": {}
},
"pipelines_company_project_idx": {
"name": "pipelines_company_project_idx",
@@ -43622,50 +43742,50 @@
}
],
"isUnique": false,
- "with": {},
+ "concurrently": false,
"method": "btree",
- "concurrently": false
+ "with": {}
}
},
"foreignKeys": {
"pipelines_company_id_companies_id_fk": {
"name": "pipelines_company_id_companies_id_fk",
"tableFrom": "pipelines",
+ "tableTo": "companies",
"columnsFrom": [
"company_id"
],
- "tableTo": "companies",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "cascade"
+ "onDelete": "cascade",
+ "onUpdate": "no action"
},
"pipelines_project_id_projects_id_fk": {
"name": "pipelines_project_id_projects_id_fk",
"tableFrom": "pipelines",
+ "tableTo": "projects",
"columnsFrom": [
"project_id"
],
- "tableTo": "projects",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "set null"
+ "onDelete": "set null",
+ "onUpdate": "no action"
},
"pipelines_created_by_agent_id_agents_id_fk": {
"name": "pipelines_created_by_agent_id_agents_id_fk",
"tableFrom": "pipelines",
+ "tableTo": "agents",
"columnsFrom": [
"created_by_agent_id"
],
- "tableTo": "agents",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "set null"
+ "onDelete": "set null",
+ "onUpdate": "no action"
}
},
"compositePrimaryKeys": {},
@@ -43744,9 +43864,9 @@
}
],
"isUnique": false,
- "with": {},
+ "concurrently": false,
"method": "btree",
- "concurrently": false
+ "with": {}
},
"plugin_company_settings_plugin_idx": {
"name": "plugin_company_settings_plugin_idx",
@@ -43759,9 +43879,9 @@
}
],
"isUnique": false,
- "with": {},
+ "concurrently": false,
"method": "btree",
- "concurrently": false
+ "with": {}
},
"plugin_company_settings_company_plugin_uq": {
"name": "plugin_company_settings_company_plugin_uq",
@@ -43780,37 +43900,37 @@
}
],
"isUnique": true,
- "with": {},
+ "concurrently": false,
"method": "btree",
- "concurrently": false
+ "with": {}
}
},
"foreignKeys": {
"plugin_company_settings_company_id_companies_id_fk": {
"name": "plugin_company_settings_company_id_companies_id_fk",
"tableFrom": "plugin_company_settings",
+ "tableTo": "companies",
"columnsFrom": [
"company_id"
],
- "tableTo": "companies",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "cascade"
+ "onDelete": "cascade",
+ "onUpdate": "no action"
},
"plugin_company_settings_plugin_id_plugins_id_fk": {
"name": "plugin_company_settings_plugin_id_plugins_id_fk",
"tableFrom": "plugin_company_settings",
+ "tableTo": "plugins",
"columnsFrom": [
"plugin_id"
],
- "tableTo": "plugins",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "cascade"
+ "onDelete": "cascade",
+ "onUpdate": "no action"
}
},
"compositePrimaryKeys": {},
@@ -43888,37 +44008,37 @@
}
],
"isUnique": true,
- "with": {},
+ "concurrently": false,
"method": "btree",
- "concurrently": false
+ "with": {}
}
},
"foreignKeys": {
"plugin_config_plugin_id_plugins_id_fk": {
"name": "plugin_config_plugin_id_plugins_id_fk",
"tableFrom": "plugin_config",
+ "tableTo": "plugins",
"columnsFrom": [
"plugin_id"
],
- "tableTo": "plugins",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "cascade"
+ "onDelete": "cascade",
+ "onUpdate": "no action"
},
"plugin_config_company_id_companies_id_fk": {
"name": "plugin_config_company_id_companies_id_fk",
"tableFrom": "plugin_config",
+ "tableTo": "companies",
"columnsFrom": [
"company_id"
],
- "tableTo": "companies",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "cascade"
+ "onDelete": "cascade",
+ "onUpdate": "no action"
}
},
"compositePrimaryKeys": {},
@@ -43997,9 +44117,9 @@
}
],
"isUnique": true,
- "with": {},
+ "concurrently": false,
"method": "btree",
- "concurrently": false
+ "with": {}
},
"plugin_database_namespaces_namespace_idx": {
"name": "plugin_database_namespaces_namespace_idx",
@@ -44012,9 +44132,9 @@
}
],
"isUnique": true,
- "with": {},
+ "concurrently": false,
"method": "btree",
- "concurrently": false
+ "with": {}
},
"plugin_database_namespaces_status_idx": {
"name": "plugin_database_namespaces_status_idx",
@@ -44027,24 +44147,24 @@
}
],
"isUnique": false,
- "with": {},
+ "concurrently": false,
"method": "btree",
- "concurrently": false
+ "with": {}
}
},
"foreignKeys": {
"plugin_database_namespaces_plugin_id_plugins_id_fk": {
"name": "plugin_database_namespaces_plugin_id_plugins_id_fk",
"tableFrom": "plugin_database_namespaces",
+ "tableTo": "plugins",
"columnsFrom": [
"plugin_id"
],
- "tableTo": "plugins",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "cascade"
+ "onDelete": "cascade",
+ "onUpdate": "no action"
}
},
"compositePrimaryKeys": {},
@@ -44146,9 +44266,9 @@
}
],
"isUnique": false,
- "with": {},
+ "concurrently": false,
"method": "btree",
- "concurrently": false
+ "with": {}
},
"plugin_entities_company_idx": {
"name": "plugin_entities_company_idx",
@@ -44161,9 +44281,9 @@
}
],
"isUnique": false,
- "with": {},
+ "concurrently": false,
"method": "btree",
- "concurrently": false
+ "with": {}
},
"plugin_entities_type_idx": {
"name": "plugin_entities_type_idx",
@@ -44176,9 +44296,9 @@
}
],
"isUnique": false,
- "with": {},
+ "concurrently": false,
"method": "btree",
- "concurrently": false
+ "with": {}
},
"plugin_entities_scope_idx": {
"name": "plugin_entities_scope_idx",
@@ -44197,50 +44317,50 @@
}
],
"isUnique": false,
- "with": {},
+ "concurrently": false,
"method": "btree",
- "concurrently": false
+ "with": {}
}
},
"foreignKeys": {
"plugin_entities_plugin_id_plugins_id_fk": {
"name": "plugin_entities_plugin_id_plugins_id_fk",
"tableFrom": "plugin_entities",
+ "tableTo": "plugins",
"columnsFrom": [
"plugin_id"
],
- "tableTo": "plugins",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "cascade"
+ "onDelete": "cascade",
+ "onUpdate": "no action"
},
"plugin_entities_company_id_companies_id_fk": {
"name": "plugin_entities_company_id_companies_id_fk",
"tableFrom": "plugin_entities",
+ "tableTo": "companies",
"columnsFrom": [
"company_id"
],
- "tableTo": "companies",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "cascade"
+ "onDelete": "cascade",
+ "onUpdate": "no action"
}
},
"compositePrimaryKeys": {},
"uniqueConstraints": {
"plugin_entities_external_idx": {
"name": "plugin_entities_external_idx",
+ "nullsNotDistinct": true,
"columns": [
"company_id",
"plugin_id",
"entity_type",
"external_id"
- ],
- "nullsNotDistinct": true
+ ]
}
},
"policies": {},
@@ -44340,9 +44460,9 @@
}
],
"isUnique": false,
- "with": {},
+ "concurrently": false,
"method": "btree",
- "concurrently": false
+ "with": {}
},
"plugin_job_runs_plugin_idx": {
"name": "plugin_job_runs_plugin_idx",
@@ -44355,9 +44475,9 @@
}
],
"isUnique": false,
- "with": {},
+ "concurrently": false,
"method": "btree",
- "concurrently": false
+ "with": {}
},
"plugin_job_runs_company_idx": {
"name": "plugin_job_runs_company_idx",
@@ -44370,9 +44490,9 @@
}
],
"isUnique": false,
- "with": {},
+ "concurrently": false,
"method": "btree",
- "concurrently": false
+ "with": {}
},
"plugin_job_runs_status_idx": {
"name": "plugin_job_runs_status_idx",
@@ -44385,50 +44505,50 @@
}
],
"isUnique": false,
- "with": {},
+ "concurrently": false,
"method": "btree",
- "concurrently": false
+ "with": {}
}
},
"foreignKeys": {
"plugin_job_runs_job_id_plugin_jobs_id_fk": {
"name": "plugin_job_runs_job_id_plugin_jobs_id_fk",
"tableFrom": "plugin_job_runs",
+ "tableTo": "plugin_jobs",
"columnsFrom": [
"job_id"
],
- "tableTo": "plugin_jobs",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "cascade"
+ "onDelete": "cascade",
+ "onUpdate": "no action"
},
"plugin_job_runs_plugin_id_plugins_id_fk": {
"name": "plugin_job_runs_plugin_id_plugins_id_fk",
"tableFrom": "plugin_job_runs",
+ "tableTo": "plugins",
"columnsFrom": [
"plugin_id"
],
- "tableTo": "plugins",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "cascade"
+ "onDelete": "cascade",
+ "onUpdate": "no action"
},
"plugin_job_runs_company_id_companies_id_fk": {
"name": "plugin_job_runs_company_id_companies_id_fk",
"tableFrom": "plugin_job_runs",
+ "tableTo": "companies",
"columnsFrom": [
"company_id"
],
- "tableTo": "companies",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "cascade"
+ "onDelete": "cascade",
+ "onUpdate": "no action"
}
},
"compositePrimaryKeys": {},
@@ -44512,9 +44632,9 @@
}
],
"isUnique": false,
- "with": {},
+ "concurrently": false,
"method": "btree",
- "concurrently": false
+ "with": {}
},
"plugin_jobs_next_run_idx": {
"name": "plugin_jobs_next_run_idx",
@@ -44527,9 +44647,9 @@
}
],
"isUnique": false,
- "with": {},
+ "concurrently": false,
"method": "btree",
- "concurrently": false
+ "with": {}
},
"plugin_jobs_unique_idx": {
"name": "plugin_jobs_unique_idx",
@@ -44548,24 +44668,24 @@
}
],
"isUnique": true,
- "with": {},
+ "concurrently": false,
"method": "btree",
- "concurrently": false
+ "with": {}
}
},
"foreignKeys": {
"plugin_jobs_plugin_id_plugins_id_fk": {
"name": "plugin_jobs_plugin_id_plugins_id_fk",
"tableFrom": "plugin_jobs",
+ "tableTo": "plugins",
"columnsFrom": [
"plugin_id"
],
- "tableTo": "plugins",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "cascade"
+ "onDelete": "cascade",
+ "onUpdate": "no action"
}
},
"compositePrimaryKeys": {},
@@ -44610,37 +44730,37 @@
}
],
"isUnique": false,
- "with": {},
+ "concurrently": false,
"method": "btree",
- "concurrently": false
+ "with": {}
}
},
"foreignKeys": {
"plugin_lifecycle_acknowledgments_plugin_id_plugins_id_fk": {
"name": "plugin_lifecycle_acknowledgments_plugin_id_plugins_id_fk",
"tableFrom": "plugin_lifecycle_acknowledgments",
+ "tableTo": "plugins",
"columnsFrom": [
"plugin_id"
],
- "tableTo": "plugins",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "cascade"
+ "onDelete": "cascade",
+ "onUpdate": "no action"
},
"plugin_lifecycle_acknowledgments_event_id_resource_lifecycle_events_id_fk": {
"name": "plugin_lifecycle_acknowledgments_event_id_resource_lifecycle_events_id_fk",
"tableFrom": "plugin_lifecycle_acknowledgments",
+ "tableTo": "resource_lifecycle_events",
"columnsFrom": [
"event_id"
],
- "tableTo": "resource_lifecycle_events",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "cascade"
+ "onDelete": "cascade",
+ "onUpdate": "no action"
}
},
"compositePrimaryKeys": {
@@ -44725,9 +44845,9 @@
}
],
"isUnique": false,
- "with": {},
+ "concurrently": false,
"method": "btree",
- "concurrently": false
+ "with": {}
},
"plugin_logs_company_idx": {
"name": "plugin_logs_company_idx",
@@ -44740,9 +44860,9 @@
}
],
"isUnique": false,
- "with": {},
+ "concurrently": false,
"method": "btree",
- "concurrently": false
+ "with": {}
},
"plugin_logs_level_idx": {
"name": "plugin_logs_level_idx",
@@ -44755,37 +44875,37 @@
}
],
"isUnique": false,
- "with": {},
+ "concurrently": false,
"method": "btree",
- "concurrently": false
+ "with": {}
}
},
"foreignKeys": {
"plugin_logs_plugin_id_plugins_id_fk": {
"name": "plugin_logs_plugin_id_plugins_id_fk",
"tableFrom": "plugin_logs",
+ "tableTo": "plugins",
"columnsFrom": [
"plugin_id"
],
- "tableTo": "plugins",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "cascade"
+ "onDelete": "cascade",
+ "onUpdate": "no action"
},
"plugin_logs_company_id_companies_id_fk": {
"name": "plugin_logs_company_id_companies_id_fk",
"tableFrom": "plugin_logs",
+ "tableTo": "companies",
"columnsFrom": [
"company_id"
],
- "tableTo": "companies",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "cascade"
+ "onDelete": "cascade",
+ "onUpdate": "no action"
}
},
"compositePrimaryKeys": {},
@@ -44875,9 +44995,9 @@
}
],
"isUnique": false,
- "with": {},
+ "concurrently": false,
"method": "btree",
- "concurrently": false
+ "with": {}
},
"plugin_managed_resources_plugin_idx": {
"name": "plugin_managed_resources_plugin_idx",
@@ -44890,9 +45010,9 @@
}
],
"isUnique": false,
- "with": {},
+ "concurrently": false,
"method": "btree",
- "concurrently": false
+ "with": {}
},
"plugin_managed_resources_resource_idx": {
"name": "plugin_managed_resources_resource_idx",
@@ -44911,9 +45031,9 @@
}
],
"isUnique": false,
- "with": {},
+ "concurrently": false,
"method": "btree",
- "concurrently": false
+ "with": {}
},
"plugin_managed_resources_company_plugin_resource_uq": {
"name": "plugin_managed_resources_company_plugin_resource_uq",
@@ -44944,37 +45064,37 @@
}
],
"isUnique": true,
- "with": {},
+ "concurrently": false,
"method": "btree",
- "concurrently": false
+ "with": {}
}
},
"foreignKeys": {
"plugin_managed_resources_company_id_companies_id_fk": {
"name": "plugin_managed_resources_company_id_companies_id_fk",
"tableFrom": "plugin_managed_resources",
+ "tableTo": "companies",
"columnsFrom": [
"company_id"
],
- "tableTo": "companies",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "cascade"
+ "onDelete": "cascade",
+ "onUpdate": "no action"
},
"plugin_managed_resources_plugin_id_plugins_id_fk": {
"name": "plugin_managed_resources_plugin_id_plugins_id_fk",
"tableFrom": "plugin_managed_resources",
+ "tableTo": "plugins",
"columnsFrom": [
"plugin_id"
],
- "tableTo": "plugins",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "cascade"
+ "onDelete": "cascade",
+ "onUpdate": "no action"
}
},
"compositePrimaryKeys": {},
@@ -45074,9 +45194,9 @@
}
],
"isUnique": true,
- "with": {},
+ "concurrently": false,
"method": "btree",
- "concurrently": false
+ "with": {}
},
"plugin_migrations_plugin_idx": {
"name": "plugin_migrations_plugin_idx",
@@ -45089,9 +45209,9 @@
}
],
"isUnique": false,
- "with": {},
+ "concurrently": false,
"method": "btree",
- "concurrently": false
+ "with": {}
},
"plugin_migrations_status_idx": {
"name": "plugin_migrations_status_idx",
@@ -45104,24 +45224,24 @@
}
],
"isUnique": false,
- "with": {},
+ "concurrently": false,
"method": "btree",
- "concurrently": false
+ "with": {}
}
},
"foreignKeys": {
"plugin_migrations_plugin_id_plugins_id_fk": {
"name": "plugin_migrations_plugin_id_plugins_id_fk",
"tableFrom": "plugin_migrations",
+ "tableTo": "plugins",
"columnsFrom": [
"plugin_id"
],
- "tableTo": "plugins",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "cascade"
+ "onDelete": "cascade",
+ "onUpdate": "no action"
}
},
"compositePrimaryKeys": {},
@@ -45204,38 +45324,38 @@
}
],
"isUnique": false,
- "with": {},
+ "concurrently": false,
"method": "btree",
- "concurrently": false
+ "with": {}
}
},
"foreignKeys": {
"plugin_state_plugin_id_plugins_id_fk": {
"name": "plugin_state_plugin_id_plugins_id_fk",
"tableFrom": "plugin_state",
+ "tableTo": "plugins",
"columnsFrom": [
"plugin_id"
],
- "tableTo": "plugins",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "cascade"
+ "onDelete": "cascade",
+ "onUpdate": "no action"
}
},
"compositePrimaryKeys": {},
"uniqueConstraints": {
"plugin_state_unique_entry_idx": {
"name": "plugin_state_unique_entry_idx",
+ "nullsNotDistinct": true,
"columns": [
"plugin_id",
"scope_kind",
"scope_id",
"namespace",
"state_key"
- ],
- "nullsNotDistinct": true
+ ]
}
},
"policies": {},
@@ -45341,9 +45461,9 @@
}
],
"isUnique": false,
- "with": {},
+ "concurrently": false,
"method": "btree",
- "concurrently": false
+ "with": {}
},
"plugin_webhook_deliveries_company_idx": {
"name": "plugin_webhook_deliveries_company_idx",
@@ -45356,9 +45476,9 @@
}
],
"isUnique": false,
- "with": {},
+ "concurrently": false,
"method": "btree",
- "concurrently": false
+ "with": {}
},
"plugin_webhook_deliveries_status_idx": {
"name": "plugin_webhook_deliveries_status_idx",
@@ -45371,9 +45491,9 @@
}
],
"isUnique": false,
- "with": {},
+ "concurrently": false,
"method": "btree",
- "concurrently": false
+ "with": {}
},
"plugin_webhook_deliveries_key_idx": {
"name": "plugin_webhook_deliveries_key_idx",
@@ -45386,37 +45506,37 @@
}
],
"isUnique": false,
- "with": {},
+ "concurrently": false,
"method": "btree",
- "concurrently": false
+ "with": {}
}
},
"foreignKeys": {
"plugin_webhook_deliveries_plugin_id_plugins_id_fk": {
"name": "plugin_webhook_deliveries_plugin_id_plugins_id_fk",
"tableFrom": "plugin_webhook_deliveries",
+ "tableTo": "plugins",
"columnsFrom": [
"plugin_id"
],
- "tableTo": "plugins",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "cascade"
+ "onDelete": "cascade",
+ "onUpdate": "no action"
},
"plugin_webhook_deliveries_company_id_companies_id_fk": {
"name": "plugin_webhook_deliveries_company_id_companies_id_fk",
"tableFrom": "plugin_webhook_deliveries",
+ "tableTo": "companies",
"columnsFrom": [
"company_id"
],
- "tableTo": "companies",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "cascade"
+ "onDelete": "cascade",
+ "onUpdate": "no action"
}
},
"compositePrimaryKeys": {},
@@ -45526,9 +45646,9 @@
}
],
"isUnique": true,
- "with": {},
+ "concurrently": false,
"method": "btree",
- "concurrently": false
+ "with": {}
},
"plugins_status_idx": {
"name": "plugins_status_idx",
@@ -45541,9 +45661,9 @@
}
],
"isUnique": false,
- "with": {},
+ "concurrently": false,
"method": "btree",
- "concurrently": false
+ "with": {}
}
},
"foreignKeys": {},
@@ -45645,9 +45765,9 @@
}
],
"isUnique": true,
- "with": {},
+ "concurrently": false,
"method": "btree",
- "concurrently": false
+ "with": {}
},
"principal_permission_grants_company_permission_idx": {
"name": "principal_permission_grants_company_permission_idx",
@@ -45666,24 +45786,24 @@
}
],
"isUnique": false,
- "with": {},
+ "concurrently": false,
"method": "btree",
- "concurrently": false
+ "with": {}
}
},
"foreignKeys": {
"principal_permission_grants_company_id_companies_id_fk": {
"name": "principal_permission_grants_company_id_companies_id_fk",
"tableFrom": "principal_permission_grants",
+ "tableTo": "companies",
"columnsFrom": [
"company_id"
],
- "tableTo": "companies",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "no action"
+ "onDelete": "no action",
+ "onUpdate": "no action"
}
},
"compositePrimaryKeys": {},
@@ -45759,9 +45879,9 @@
}
],
"isUnique": true,
- "with": {},
+ "concurrently": false,
"method": "btree",
- "concurrently": false
+ "with": {}
},
"project_access_members_subject_lookup_idx": {
"name": "project_access_members_subject_lookup_idx",
@@ -45792,37 +45912,37 @@
}
],
"isUnique": false,
- "with": {},
+ "concurrently": false,
"method": "btree",
- "concurrently": false
+ "with": {}
}
},
"foreignKeys": {
"project_access_members_company_id_companies_id_fk": {
"name": "project_access_members_company_id_companies_id_fk",
"tableFrom": "project_access_members",
+ "tableTo": "companies",
"columnsFrom": [
"company_id"
],
- "tableTo": "companies",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "cascade"
+ "onDelete": "cascade",
+ "onUpdate": "no action"
},
"project_access_members_project_id_projects_id_fk": {
"name": "project_access_members_project_id_projects_id_fk",
"tableFrom": "project_access_members",
+ "tableTo": "projects",
"columnsFrom": [
"project_id"
],
- "tableTo": "projects",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "cascade"
+ "onDelete": "cascade",
+ "onUpdate": "no action"
}
},
"compositePrimaryKeys": {},
@@ -45885,9 +46005,9 @@
}
],
"isUnique": false,
- "with": {},
+ "concurrently": false,
"method": "btree",
- "concurrently": false
+ "with": {}
},
"project_goals_goal_idx": {
"name": "project_goals_goal_idx",
@@ -45900,9 +46020,9 @@
}
],
"isUnique": false,
- "with": {},
+ "concurrently": false,
"method": "btree",
- "concurrently": false
+ "with": {}
},
"project_goals_company_idx": {
"name": "project_goals_company_idx",
@@ -45915,50 +46035,50 @@
}
],
"isUnique": false,
- "with": {},
+ "concurrently": false,
"method": "btree",
- "concurrently": false
+ "with": {}
}
},
"foreignKeys": {
"project_goals_project_id_projects_id_fk": {
"name": "project_goals_project_id_projects_id_fk",
"tableFrom": "project_goals",
+ "tableTo": "projects",
"columnsFrom": [
"project_id"
],
- "tableTo": "projects",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "cascade"
+ "onDelete": "cascade",
+ "onUpdate": "no action"
},
"project_goals_goal_id_goals_id_fk": {
"name": "project_goals_goal_id_goals_id_fk",
"tableFrom": "project_goals",
+ "tableTo": "goals",
"columnsFrom": [
"goal_id"
],
- "tableTo": "goals",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "cascade"
+ "onDelete": "cascade",
+ "onUpdate": "no action"
},
"project_goals_company_id_companies_id_fk": {
"name": "project_goals_company_id_companies_id_fk",
"tableFrom": "project_goals",
+ "tableTo": "companies",
"columnsFrom": [
"company_id"
],
- "tableTo": "companies",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "no action"
+ "onDelete": "no action",
+ "onUpdate": "no action"
}
},
"compositePrimaryKeys": {
@@ -46050,9 +46170,9 @@
}
],
"isUnique": false,
- "with": {},
+ "concurrently": false,
"method": "btree",
- "concurrently": false
+ "with": {}
},
"project_memberships_company_user_starred_idx": {
"name": "project_memberships_company_user_starred_idx",
@@ -46077,9 +46197,9 @@
}
],
"isUnique": false,
- "with": {},
+ "concurrently": false,
"method": "btree",
- "concurrently": false
+ "with": {}
},
"project_memberships_project_idx": {
"name": "project_memberships_project_idx",
@@ -46092,9 +46212,9 @@
}
],
"isUnique": false,
- "with": {},
+ "concurrently": false,
"method": "btree",
- "concurrently": false
+ "with": {}
},
"project_memberships_company_user_project_uq": {
"name": "project_memberships_company_user_project_uq",
@@ -46119,37 +46239,37 @@
}
],
"isUnique": true,
- "with": {},
+ "concurrently": false,
"method": "btree",
- "concurrently": false
+ "with": {}
}
},
"foreignKeys": {
"project_memberships_company_id_companies_id_fk": {
"name": "project_memberships_company_id_companies_id_fk",
"tableFrom": "project_memberships",
+ "tableTo": "companies",
"columnsFrom": [
"company_id"
],
- "tableTo": "companies",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "cascade"
+ "onDelete": "cascade",
+ "onUpdate": "no action"
},
"project_memberships_project_id_projects_id_fk": {
"name": "project_memberships_project_id_projects_id_fk",
"tableFrom": "project_memberships",
+ "tableTo": "projects",
"columnsFrom": [
"project_id"
],
- "tableTo": "projects",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "cascade"
+ "onDelete": "cascade",
+ "onUpdate": "no action"
}
},
"compositePrimaryKeys": {},
@@ -46301,9 +46421,9 @@
}
],
"isUnique": false,
- "with": {},
+ "concurrently": false,
"method": "btree",
- "concurrently": false
+ "with": {}
},
"project_workspaces_project_primary_idx": {
"name": "project_workspaces_project_primary_idx",
@@ -46322,9 +46442,9 @@
}
],
"isUnique": false,
- "with": {},
+ "concurrently": false,
"method": "btree",
- "concurrently": false
+ "with": {}
},
"project_workspaces_project_source_type_idx": {
"name": "project_workspaces_project_source_type_idx",
@@ -46343,9 +46463,9 @@
}
],
"isUnique": false,
- "with": {},
+ "concurrently": false,
"method": "btree",
- "concurrently": false
+ "with": {}
},
"project_workspaces_company_shared_key_idx": {
"name": "project_workspaces_company_shared_key_idx",
@@ -46364,9 +46484,9 @@
}
],
"isUnique": false,
- "with": {},
+ "concurrently": false,
"method": "btree",
- "concurrently": false
+ "with": {}
},
"project_workspaces_project_remote_ref_idx": {
"name": "project_workspaces_project_remote_ref_idx",
@@ -46391,37 +46511,37 @@
}
],
"isUnique": true,
- "with": {},
+ "concurrently": false,
"method": "btree",
- "concurrently": false
+ "with": {}
}
},
"foreignKeys": {
"project_workspaces_company_id_companies_id_fk": {
"name": "project_workspaces_company_id_companies_id_fk",
"tableFrom": "project_workspaces",
+ "tableTo": "companies",
"columnsFrom": [
"company_id"
],
- "tableTo": "companies",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "no action"
+ "onDelete": "no action",
+ "onUpdate": "no action"
},
"project_workspaces_project_id_projects_id_fk": {
"name": "project_workspaces_project_id_projects_id_fk",
"tableFrom": "project_workspaces",
+ "tableTo": "projects",
"columnsFrom": [
"project_id"
],
- "tableTo": "projects",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "cascade"
+ "onDelete": "cascade",
+ "onUpdate": "no action"
}
},
"compositePrimaryKeys": {},
@@ -46572,9 +46692,9 @@
}
],
"isUnique": false,
- "with": {},
+ "concurrently": false,
"method": "btree",
- "concurrently": false
+ "with": {}
},
"projects_company_personal_owner_uq": {
"name": "projects_company_personal_owner_uq",
@@ -46593,51 +46713,51 @@
}
],
"isUnique": true,
- "with": {},
- "method": "btree",
"where": "\"projects\".\"personal_owner_user_id\" is not null",
- "concurrently": false
+ "concurrently": false,
+ "method": "btree",
+ "with": {}
}
},
"foreignKeys": {
"projects_company_id_companies_id_fk": {
"name": "projects_company_id_companies_id_fk",
"tableFrom": "projects",
+ "tableTo": "companies",
"columnsFrom": [
"company_id"
],
- "tableTo": "companies",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "no action"
+ "onDelete": "no action",
+ "onUpdate": "no action"
},
"projects_goal_id_goals_id_fk": {
"name": "projects_goal_id_goals_id_fk",
"tableFrom": "projects",
+ "tableTo": "goals",
"columnsFrom": [
"goal_id"
],
- "tableTo": "goals",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "no action"
+ "onDelete": "no action",
+ "onUpdate": "no action"
},
"projects_lead_agent_id_agents_id_fk": {
"name": "projects_lead_agent_id_agents_id_fk",
"tableFrom": "projects",
+ "tableTo": "agents",
"columnsFrom": [
"lead_agent_id"
],
- "tableTo": "agents",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "no action"
+ "onDelete": "no action",
+ "onUpdate": "no action"
}
},
"compositePrimaryKeys": {},
@@ -46764,9 +46884,9 @@
}
],
"isUnique": true,
- "with": {},
+ "concurrently": false,
"method": "btree",
- "concurrently": false
+ "with": {}
},
"provider_trace_records_expiry_idx": {
"name": "provider_trace_records_expiry_idx",
@@ -46785,9 +46905,9 @@
}
],
"isUnique": false,
- "with": {},
+ "concurrently": false,
"method": "btree",
- "concurrently": false
+ "with": {}
},
"provider_trace_records_company_created_idx": {
"name": "provider_trace_records_company_created_idx",
@@ -46806,37 +46926,37 @@
}
],
"isUnique": false,
- "with": {},
+ "concurrently": false,
"method": "btree",
- "concurrently": false
+ "with": {}
}
},
"foreignKeys": {
"provider_trace_records_company_id_companies_id_fk": {
"name": "provider_trace_records_company_id_companies_id_fk",
"tableFrom": "provider_trace_records",
+ "tableTo": "companies",
"columnsFrom": [
"company_id"
],
- "tableTo": "companies",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "no action"
+ "onDelete": "no action",
+ "onUpdate": "no action"
},
"provider_trace_records_run_id_heartbeat_runs_id_fk": {
"name": "provider_trace_records_run_id_heartbeat_runs_id_fk",
"tableFrom": "provider_trace_records",
+ "tableTo": "heartbeat_runs",
"columnsFrom": [
"run_id"
],
- "tableTo": "heartbeat_runs",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "cascade"
+ "onDelete": "cascade",
+ "onUpdate": "no action"
}
},
"compositePrimaryKeys": {},
@@ -46947,9 +47067,9 @@
}
],
"isUnique": false,
- "with": {},
+ "concurrently": false,
"method": "btree",
- "concurrently": false
+ "with": {}
},
"remote_agent_profiles_company_key_uq": {
"name": "remote_agent_profiles_company_key_uq",
@@ -46968,24 +47088,24 @@
}
],
"isUnique": true,
- "with": {},
+ "concurrently": false,
"method": "btree",
- "concurrently": false
+ "with": {}
}
},
"foreignKeys": {
"remote_agent_profiles_company_id_companies_id_fk": {
"name": "remote_agent_profiles_company_id_companies_id_fk",
"tableFrom": "remote_agent_profiles",
+ "tableTo": "companies",
"columnsFrom": [
"company_id"
],
- "tableTo": "companies",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "cascade"
+ "onDelete": "cascade",
+ "onUpdate": "no action"
}
},
"compositePrimaryKeys": {},
@@ -47013,15 +47133,15 @@
"primaryKey": true,
"notNull": true,
"identity": {
+ "type": "always",
"name": "resource_lifecycle_events_id_seq",
+ "schema": "public",
"increment": "1",
+ "startWith": "1",
"minValue": "1",
"maxValue": "9223372036854775807",
- "startWith": "1",
"cache": "1",
- "cycle": false,
- "schema": "public",
- "type": "always"
+ "cycle": false
}
},
"company_id": {
@@ -47080,10 +47200,10 @@
}
],
"isUnique": true,
- "with": {},
- "method": "btree",
"where": "\"resource_lifecycle_events\".\"action\" = 'create'",
- "concurrently": false
+ "concurrently": false,
+ "method": "btree",
+ "with": {}
},
"resource_lifecycle_events_company_idx": {
"name": "resource_lifecycle_events_company_idx",
@@ -47102,9 +47222,9 @@
}
],
"isUnique": false,
- "with": {},
+ "concurrently": false,
"method": "btree",
- "concurrently": false
+ "with": {}
},
"resource_lifecycle_events_resource_order_idx": {
"name": "resource_lifecycle_events_resource_order_idx",
@@ -47135,24 +47255,24 @@
}
],
"isUnique": false,
- "with": {},
+ "concurrently": false,
"method": "btree",
- "concurrently": false
+ "with": {}
}
},
"foreignKeys": {
"resource_lifecycle_events_company_id_companies_id_fk": {
"name": "resource_lifecycle_events_company_id_companies_id_fk",
"tableFrom": "resource_lifecycle_events",
+ "tableTo": "companies",
"columnsFrom": [
"company_id"
],
- "tableTo": "companies",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "cascade"
+ "onDelete": "cascade",
+ "onUpdate": "no action"
}
},
"compositePrimaryKeys": {},
@@ -47244,9 +47364,9 @@
}
],
"isUnique": true,
- "with": {},
+ "concurrently": false,
"method": "btree",
- "concurrently": false
+ "with": {}
},
"routine_documents_document_uq": {
"name": "routine_documents_document_uq",
@@ -47259,9 +47379,9 @@
}
],
"isUnique": true,
- "with": {},
+ "concurrently": false,
"method": "btree",
- "concurrently": false
+ "with": {}
},
"routine_documents_company_routine_updated_idx": {
"name": "routine_documents_company_routine_updated_idx",
@@ -47286,50 +47406,50 @@
}
],
"isUnique": false,
- "with": {},
+ "concurrently": false,
"method": "btree",
- "concurrently": false
+ "with": {}
}
},
"foreignKeys": {
"routine_documents_company_id_companies_id_fk": {
"name": "routine_documents_company_id_companies_id_fk",
"tableFrom": "routine_documents",
+ "tableTo": "companies",
"columnsFrom": [
"company_id"
],
- "tableTo": "companies",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "no action"
+ "onDelete": "no action",
+ "onUpdate": "no action"
},
"routine_documents_routine_id_routines_id_fk": {
"name": "routine_documents_routine_id_routines_id_fk",
"tableFrom": "routine_documents",
+ "tableTo": "routines",
"columnsFrom": [
"routine_id"
],
- "tableTo": "routines",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "cascade"
+ "onDelete": "cascade",
+ "onUpdate": "no action"
},
"routine_documents_document_id_documents_id_fk": {
"name": "routine_documents_document_id_documents_id_fk",
"tableFrom": "routine_documents",
+ "tableTo": "documents",
"columnsFrom": [
"document_id"
],
- "tableTo": "documents",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "cascade"
+ "onDelete": "cascade",
+ "onUpdate": "no action"
}
},
"compositePrimaryKeys": {},
@@ -47447,9 +47567,9 @@
}
],
"isUnique": true,
- "with": {},
+ "concurrently": false,
"method": "btree",
- "concurrently": false
+ "with": {}
},
"routine_revisions_company_routine_created_idx": {
"name": "routine_revisions_company_routine_created_idx",
@@ -47474,9 +47594,9 @@
}
],
"isUnique": false,
- "with": {},
+ "concurrently": false,
"method": "btree",
- "concurrently": false
+ "with": {}
},
"routine_revisions_company_responsible_user_idx": {
"name": "routine_revisions_company_responsible_user_idx",
@@ -47501,76 +47621,76 @@
}
],
"isUnique": false,
- "with": {},
+ "concurrently": false,
"method": "btree",
- "concurrently": false
+ "with": {}
}
},
"foreignKeys": {
"routine_revisions_company_id_companies_id_fk": {
"name": "routine_revisions_company_id_companies_id_fk",
"tableFrom": "routine_revisions",
+ "tableTo": "companies",
"columnsFrom": [
"company_id"
],
- "tableTo": "companies",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "cascade"
+ "onDelete": "cascade",
+ "onUpdate": "no action"
},
"routine_revisions_routine_id_routines_id_fk": {
"name": "routine_revisions_routine_id_routines_id_fk",
"tableFrom": "routine_revisions",
+ "tableTo": "routines",
"columnsFrom": [
"routine_id"
],
- "tableTo": "routines",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "cascade"
+ "onDelete": "cascade",
+ "onUpdate": "no action"
},
"routine_revisions_restored_from_revision_id_routine_revisions_id_fk": {
"name": "routine_revisions_restored_from_revision_id_routine_revisions_id_fk",
"tableFrom": "routine_revisions",
+ "tableTo": "routine_revisions",
"columnsFrom": [
"restored_from_revision_id"
],
- "tableTo": "routine_revisions",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "set null"
+ "onDelete": "set null",
+ "onUpdate": "no action"
},
"routine_revisions_created_by_agent_id_agents_id_fk": {
"name": "routine_revisions_created_by_agent_id_agents_id_fk",
"tableFrom": "routine_revisions",
+ "tableTo": "agents",
"columnsFrom": [
"created_by_agent_id"
],
- "tableTo": "agents",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "set null"
+ "onDelete": "set null",
+ "onUpdate": "no action"
},
"routine_revisions_created_by_run_id_heartbeat_runs_id_fk": {
"name": "routine_revisions_created_by_run_id_heartbeat_runs_id_fk",
"tableFrom": "routine_revisions",
+ "tableTo": "heartbeat_runs",
"columnsFrom": [
"created_by_run_id"
],
- "tableTo": "heartbeat_runs",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "set null"
+ "onDelete": "set null",
+ "onUpdate": "no action"
}
},
"compositePrimaryKeys": {},
@@ -47721,9 +47841,9 @@
}
],
"isUnique": false,
- "with": {},
+ "concurrently": false,
"method": "btree",
- "concurrently": false
+ "with": {}
},
"routine_runs_revision_idx": {
"name": "routine_runs_revision_idx",
@@ -47736,9 +47856,9 @@
}
],
"isUnique": false,
- "with": {},
+ "concurrently": false,
"method": "btree",
- "concurrently": false
+ "with": {}
},
"routine_runs_company_responsible_user_idx": {
"name": "routine_runs_company_responsible_user_idx",
@@ -47763,9 +47883,9 @@
}
],
"isUnique": false,
- "with": {},
+ "concurrently": false,
"method": "btree",
- "concurrently": false
+ "with": {}
},
"routine_runs_trigger_idx": {
"name": "routine_runs_trigger_idx",
@@ -47784,9 +47904,9 @@
}
],
"isUnique": false,
- "with": {},
+ "concurrently": false,
"method": "btree",
- "concurrently": false
+ "with": {}
},
"routine_runs_dispatch_fingerprint_idx": {
"name": "routine_runs_dispatch_fingerprint_idx",
@@ -47805,9 +47925,9 @@
}
],
"isUnique": false,
- "with": {},
+ "concurrently": false,
"method": "btree",
- "concurrently": false
+ "with": {}
},
"routine_runs_linked_issue_idx": {
"name": "routine_runs_linked_issue_idx",
@@ -47820,9 +47940,9 @@
}
],
"isUnique": false,
- "with": {},
+ "concurrently": false,
"method": "btree",
- "concurrently": false
+ "with": {}
},
"routine_runs_trigger_idempotency_idx": {
"name": "routine_runs_trigger_idempotency_idx",
@@ -47841,76 +47961,76 @@
}
],
"isUnique": false,
- "with": {},
+ "concurrently": false,
"method": "btree",
- "concurrently": false
+ "with": {}
}
},
"foreignKeys": {
"routine_runs_company_id_companies_id_fk": {
"name": "routine_runs_company_id_companies_id_fk",
"tableFrom": "routine_runs",
+ "tableTo": "companies",
"columnsFrom": [
"company_id"
],
- "tableTo": "companies",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "cascade"
+ "onDelete": "cascade",
+ "onUpdate": "no action"
},
"routine_runs_routine_id_routines_id_fk": {
"name": "routine_runs_routine_id_routines_id_fk",
"tableFrom": "routine_runs",
+ "tableTo": "routines",
"columnsFrom": [
"routine_id"
],
- "tableTo": "routines",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "cascade"
+ "onDelete": "cascade",
+ "onUpdate": "no action"
},
"routine_runs_trigger_id_routine_triggers_id_fk": {
"name": "routine_runs_trigger_id_routine_triggers_id_fk",
"tableFrom": "routine_runs",
+ "tableTo": "routine_triggers",
"columnsFrom": [
"trigger_id"
],
- "tableTo": "routine_triggers",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "set null"
+ "onDelete": "set null",
+ "onUpdate": "no action"
},
"routine_runs_routine_revision_id_routine_revisions_id_fk": {
"name": "routine_runs_routine_revision_id_routine_revisions_id_fk",
"tableFrom": "routine_runs",
+ "tableTo": "routine_revisions",
"columnsFrom": [
"routine_revision_id"
],
- "tableTo": "routine_revisions",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "set null"
+ "onDelete": "set null",
+ "onUpdate": "no action"
},
"routine_runs_linked_issue_id_issues_id_fk": {
"name": "routine_runs_linked_issue_id_issues_id_fk",
"tableFrom": "routine_runs",
+ "tableTo": "issues",
"columnsFrom": [
"linked_issue_id"
],
- "tableTo": "issues",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "set null"
+ "onDelete": "set null",
+ "onUpdate": "no action"
}
},
"compositePrimaryKeys": {},
@@ -48098,9 +48218,9 @@
}
],
"isUnique": false,
- "with": {},
+ "concurrently": false,
"method": "btree",
- "concurrently": false
+ "with": {}
},
"routine_triggers_company_kind_idx": {
"name": "routine_triggers_company_kind_idx",
@@ -48119,9 +48239,9 @@
}
],
"isUnique": false,
- "with": {},
+ "concurrently": false,
"method": "btree",
- "concurrently": false
+ "with": {}
},
"routine_triggers_next_run_idx": {
"name": "routine_triggers_next_run_idx",
@@ -48134,9 +48254,9 @@
}
],
"isUnique": false,
- "with": {},
+ "concurrently": false,
"method": "btree",
- "concurrently": false
+ "with": {}
},
"routine_triggers_public_id_idx": {
"name": "routine_triggers_public_id_idx",
@@ -48149,9 +48269,9 @@
}
],
"isUnique": false,
- "with": {},
+ "concurrently": false,
"method": "btree",
- "concurrently": false
+ "with": {}
},
"routine_triggers_public_id_uq": {
"name": "routine_triggers_public_id_uq",
@@ -48164,76 +48284,76 @@
}
],
"isUnique": true,
- "with": {},
+ "concurrently": false,
"method": "btree",
- "concurrently": false
+ "with": {}
}
},
"foreignKeys": {
"routine_triggers_company_id_companies_id_fk": {
"name": "routine_triggers_company_id_companies_id_fk",
"tableFrom": "routine_triggers",
+ "tableTo": "companies",
"columnsFrom": [
"company_id"
],
- "tableTo": "companies",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "cascade"
+ "onDelete": "cascade",
+ "onUpdate": "no action"
},
"routine_triggers_routine_id_routines_id_fk": {
"name": "routine_triggers_routine_id_routines_id_fk",
"tableFrom": "routine_triggers",
+ "tableTo": "routines",
"columnsFrom": [
"routine_id"
],
- "tableTo": "routines",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "cascade"
+ "onDelete": "cascade",
+ "onUpdate": "no action"
},
"routine_triggers_secret_id_company_secrets_id_fk": {
"name": "routine_triggers_secret_id_company_secrets_id_fk",
"tableFrom": "routine_triggers",
+ "tableTo": "company_secrets",
"columnsFrom": [
"secret_id"
],
- "tableTo": "company_secrets",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "set null"
+ "onDelete": "set null",
+ "onUpdate": "no action"
},
"routine_triggers_created_by_agent_id_agents_id_fk": {
"name": "routine_triggers_created_by_agent_id_agents_id_fk",
"tableFrom": "routine_triggers",
+ "tableTo": "agents",
"columnsFrom": [
"created_by_agent_id"
],
- "tableTo": "agents",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "set null"
+ "onDelete": "set null",
+ "onUpdate": "no action"
},
"routine_triggers_updated_by_agent_id_agents_id_fk": {
"name": "routine_triggers_updated_by_agent_id_agents_id_fk",
"tableFrom": "routine_triggers",
+ "tableTo": "agents",
"columnsFrom": [
"updated_by_agent_id"
],
- "tableTo": "agents",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "set null"
+ "onDelete": "set null",
+ "onUpdate": "no action"
}
},
"compositePrimaryKeys": {},
@@ -48297,37 +48417,37 @@
}
],
"isUnique": true,
- "with": {},
+ "concurrently": false,
"method": "btree",
- "concurrently": false
+ "with": {}
}
},
"foreignKeys": {
"routine_webhook_test_receipts_company_id_companies_id_fk": {
"name": "routine_webhook_test_receipts_company_id_companies_id_fk",
"tableFrom": "routine_webhook_test_receipts",
+ "tableTo": "companies",
"columnsFrom": [
"company_id"
],
- "tableTo": "companies",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "cascade"
+ "onDelete": "cascade",
+ "onUpdate": "no action"
},
"routine_webhook_test_receipts_trigger_id_routine_triggers_id_fk": {
"name": "routine_webhook_test_receipts_trigger_id_routine_triggers_id_fk",
"tableFrom": "routine_webhook_test_receipts",
+ "tableTo": "routine_triggers",
"columnsFrom": [
"trigger_id"
],
- "tableTo": "routine_triggers",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "cascade"
+ "onDelete": "cascade",
+ "onUpdate": "no action"
}
},
"compositePrimaryKeys": {},
@@ -48551,9 +48671,9 @@
}
],
"isUnique": false,
- "with": {},
+ "concurrently": false,
"method": "btree",
- "concurrently": false
+ "with": {}
},
"routines_company_assignee_idx": {
"name": "routines_company_assignee_idx",
@@ -48572,9 +48692,9 @@
}
],
"isUnique": false,
- "with": {},
+ "concurrently": false,
"method": "btree",
- "concurrently": false
+ "with": {}
},
"routines_company_project_idx": {
"name": "routines_company_project_idx",
@@ -48593,9 +48713,9 @@
}
],
"isUnique": false,
- "with": {},
+ "concurrently": false,
"method": "btree",
- "concurrently": false
+ "with": {}
},
"routines_company_folder_idx": {
"name": "routines_company_folder_idx",
@@ -48614,9 +48734,9 @@
}
],
"isUnique": false,
- "with": {},
+ "concurrently": false,
"method": "btree",
- "concurrently": false
+ "with": {}
},
"routines_company_responsible_user_idx": {
"name": "routines_company_responsible_user_idx",
@@ -48635,9 +48755,9 @@
}
],
"isUnique": false,
- "with": {},
+ "concurrently": false,
"method": "btree",
- "concurrently": false
+ "with": {}
},
"routines_company_origin_idx": {
"name": "routines_company_origin_idx",
@@ -48662,115 +48782,115 @@
}
],
"isUnique": false,
- "with": {},
+ "concurrently": false,
"method": "btree",
- "concurrently": false
+ "with": {}
}
},
"foreignKeys": {
"routines_company_id_companies_id_fk": {
"name": "routines_company_id_companies_id_fk",
"tableFrom": "routines",
+ "tableTo": "companies",
"columnsFrom": [
"company_id"
],
- "tableTo": "companies",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "cascade"
+ "onDelete": "cascade",
+ "onUpdate": "no action"
},
"routines_project_id_projects_id_fk": {
"name": "routines_project_id_projects_id_fk",
"tableFrom": "routines",
+ "tableTo": "projects",
"columnsFrom": [
"project_id"
],
- "tableTo": "projects",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "cascade"
+ "onDelete": "cascade",
+ "onUpdate": "no action"
},
"routines_folder_id_folders_id_fk": {
"name": "routines_folder_id_folders_id_fk",
"tableFrom": "routines",
+ "tableTo": "folders",
"columnsFrom": [
"folder_id"
],
- "tableTo": "folders",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "set null"
+ "onDelete": "set null",
+ "onUpdate": "no action"
},
"routines_goal_id_goals_id_fk": {
"name": "routines_goal_id_goals_id_fk",
"tableFrom": "routines",
+ "tableTo": "goals",
"columnsFrom": [
"goal_id"
],
- "tableTo": "goals",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "set null"
+ "onDelete": "set null",
+ "onUpdate": "no action"
},
"routines_parent_issue_id_issues_id_fk": {
"name": "routines_parent_issue_id_issues_id_fk",
"tableFrom": "routines",
+ "tableTo": "issues",
"columnsFrom": [
"parent_issue_id"
],
- "tableTo": "issues",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "set null"
+ "onDelete": "set null",
+ "onUpdate": "no action"
},
"routines_assignee_agent_id_agents_id_fk": {
"name": "routines_assignee_agent_id_agents_id_fk",
"tableFrom": "routines",
+ "tableTo": "agents",
"columnsFrom": [
"assignee_agent_id"
],
- "tableTo": "agents",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "no action"
+ "onDelete": "no action",
+ "onUpdate": "no action"
},
"routines_created_by_agent_id_agents_id_fk": {
"name": "routines_created_by_agent_id_agents_id_fk",
"tableFrom": "routines",
+ "tableTo": "agents",
"columnsFrom": [
"created_by_agent_id"
],
- "tableTo": "agents",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "set null"
+ "onDelete": "set null",
+ "onUpdate": "no action"
},
"routines_updated_by_agent_id_agents_id_fk": {
"name": "routines_updated_by_agent_id_agents_id_fk",
"tableFrom": "routines",
+ "tableTo": "agents",
"columnsFrom": [
"updated_by_agent_id"
],
- "tableTo": "agents",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "set null"
+ "onDelete": "set null",
+ "onUpdate": "no action"
}
},
"compositePrimaryKeys": {},
@@ -48883,9 +49003,9 @@
}
],
"isUnique": true,
- "with": {},
+ "concurrently": false,
"method": "btree",
- "concurrently": false
+ "with": {}
},
"run_identity_contexts_run_correlation_idx": {
"name": "run_identity_contexts_run_correlation_idx",
@@ -48904,9 +49024,9 @@
}
],
"isUnique": true,
- "with": {},
+ "concurrently": false,
"method": "btree",
- "concurrently": false
+ "with": {}
},
"run_identity_contexts_company_run_idx": {
"name": "run_identity_contexts_company_run_idx",
@@ -48925,24 +49045,24 @@
}
],
"isUnique": false,
- "with": {},
+ "concurrently": false,
"method": "btree",
- "concurrently": false
+ "with": {}
}
},
"foreignKeys": {
"run_identity_contexts_company_id_companies_id_fk": {
"name": "run_identity_contexts_company_id_companies_id_fk",
"tableFrom": "run_identity_contexts",
+ "tableTo": "companies",
"columnsFrom": [
"company_id"
],
- "tableTo": "companies",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "cascade"
+ "onDelete": "cascade",
+ "onUpdate": "no action"
}
},
"compositePrimaryKeys": {},
@@ -49006,50 +49126,50 @@
}
],
"isUnique": false,
- "with": {},
+ "concurrently": false,
"method": "btree",
- "concurrently": false
+ "with": {}
}
},
"foreignKeys": {
"runner_api_response_reservations_company_id_companies_id_fk": {
"name": "runner_api_response_reservations_company_id_companies_id_fk",
"tableFrom": "runner_api_response_reservations",
+ "tableTo": "companies",
"columnsFrom": [
"company_id"
],
- "tableTo": "companies",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "cascade"
+ "onDelete": "cascade",
+ "onUpdate": "no action"
},
"runner_api_response_reservations_run_id_heartbeat_runs_id_fk": {
"name": "runner_api_response_reservations_run_id_heartbeat_runs_id_fk",
"tableFrom": "runner_api_response_reservations",
+ "tableTo": "heartbeat_runs",
"columnsFrom": [
"run_id"
],
- "tableTo": "heartbeat_runs",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "set null"
+ "onDelete": "set null",
+ "onUpdate": "no action"
},
"runner_api_response_reservations_asset_id_assets_id_fk": {
"name": "runner_api_response_reservations_asset_id_assets_id_fk",
"tableFrom": "runner_api_response_reservations",
+ "tableTo": "assets",
"columnsFrom": [
"asset_id"
],
- "tableTo": "assets",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "cascade"
+ "onDelete": "cascade",
+ "onUpdate": "no action"
}
},
"compositePrimaryKeys": {},
@@ -49216,9 +49336,9 @@
}
],
"isUnique": false,
- "with": {},
+ "concurrently": false,
"method": "btree",
- "concurrently": false
+ "with": {}
},
"secret_access_events_secret_created_idx": {
"name": "secret_access_events_secret_created_idx",
@@ -49237,9 +49357,9 @@
}
],
"isUnique": false,
- "with": {},
+ "concurrently": false,
"method": "btree",
- "concurrently": false
+ "with": {}
},
"secret_access_events_user_definition_created_idx": {
"name": "secret_access_events_user_definition_created_idx",
@@ -49258,9 +49378,9 @@
}
],
"isUnique": false,
- "with": {},
+ "concurrently": false,
"method": "btree",
- "concurrently": false
+ "with": {}
},
"secret_access_events_company_credential_owner_idx": {
"name": "secret_access_events_company_credential_owner_idx",
@@ -49285,9 +49405,9 @@
}
],
"isUnique": false,
- "with": {},
+ "concurrently": false,
"method": "btree",
- "concurrently": false
+ "with": {}
},
"secret_access_events_consumer_idx": {
"name": "secret_access_events_consumer_idx",
@@ -49312,9 +49432,9 @@
}
],
"isUnique": false,
- "with": {},
+ "concurrently": false,
"method": "btree",
- "concurrently": false
+ "with": {}
},
"secret_access_events_run_idx": {
"name": "secret_access_events_run_idx",
@@ -49327,89 +49447,89 @@
}
],
"isUnique": false,
- "with": {},
+ "concurrently": false,
"method": "btree",
- "concurrently": false
+ "with": {}
}
},
"foreignKeys": {
"secret_access_events_company_id_companies_id_fk": {
"name": "secret_access_events_company_id_companies_id_fk",
"tableFrom": "secret_access_events",
+ "tableTo": "companies",
"columnsFrom": [
"company_id"
],
- "tableTo": "companies",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "no action"
+ "onDelete": "no action",
+ "onUpdate": "no action"
},
"secret_access_events_secret_id_company_secrets_id_fk": {
"name": "secret_access_events_secret_id_company_secrets_id_fk",
"tableFrom": "secret_access_events",
+ "tableTo": "company_secrets",
"columnsFrom": [
"secret_id"
],
- "tableTo": "company_secrets",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "cascade"
+ "onDelete": "cascade",
+ "onUpdate": "no action"
},
"secret_access_events_user_secret_definition_id_user_secret_definitions_id_fk": {
"name": "secret_access_events_user_secret_definition_id_user_secret_definitions_id_fk",
"tableFrom": "secret_access_events",
+ "tableTo": "user_secret_definitions",
"columnsFrom": [
"user_secret_definition_id"
],
- "tableTo": "user_secret_definitions",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "set null"
+ "onDelete": "set null",
+ "onUpdate": "no action"
},
"secret_access_events_issue_id_issues_id_fk": {
"name": "secret_access_events_issue_id_issues_id_fk",
"tableFrom": "secret_access_events",
+ "tableTo": "issues",
"columnsFrom": [
"issue_id"
],
- "tableTo": "issues",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "set null"
+ "onDelete": "set null",
+ "onUpdate": "no action"
},
"secret_access_events_heartbeat_run_id_heartbeat_runs_id_fk": {
"name": "secret_access_events_heartbeat_run_id_heartbeat_runs_id_fk",
"tableFrom": "secret_access_events",
+ "tableTo": "heartbeat_runs",
"columnsFrom": [
"heartbeat_run_id"
],
- "tableTo": "heartbeat_runs",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "set null"
+ "onDelete": "set null",
+ "onUpdate": "no action"
},
"secret_access_events_plugin_id_plugins_id_fk": {
"name": "secret_access_events_plugin_id_plugins_id_fk",
"tableFrom": "secret_access_events",
+ "tableTo": "plugins",
"columnsFrom": [
"plugin_id"
],
- "tableTo": "plugins",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "set null"
+ "onDelete": "set null",
+ "onUpdate": "no action"
}
},
"compositePrimaryKeys": {},
@@ -49510,9 +49630,9 @@
}
],
"isUnique": false,
- "with": {},
+ "concurrently": false,
"method": "btree",
- "concurrently": false
+ "with": {}
},
"smoke_run_steps_company_path_idx": {
"name": "smoke_run_steps_company_path_idx",
@@ -49531,37 +49651,37 @@
}
],
"isUnique": false,
- "with": {},
+ "concurrently": false,
"method": "btree",
- "concurrently": false
+ "with": {}
}
},
"foreignKeys": {
"smoke_run_steps_company_id_companies_id_fk": {
"name": "smoke_run_steps_company_id_companies_id_fk",
"tableFrom": "smoke_run_steps",
+ "tableTo": "companies",
"columnsFrom": [
"company_id"
],
- "tableTo": "companies",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "cascade"
+ "onDelete": "cascade",
+ "onUpdate": "no action"
},
"smoke_run_steps_run_id_smoke_runs_id_fk": {
"name": "smoke_run_steps_run_id_smoke_runs_id_fk",
"tableFrom": "smoke_run_steps",
+ "tableTo": "smoke_runs",
"columnsFrom": [
"run_id"
],
- "tableTo": "smoke_runs",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "cascade"
+ "onDelete": "cascade",
+ "onUpdate": "no action"
}
},
"compositePrimaryKeys": {},
@@ -49653,9 +49773,9 @@
}
],
"isUnique": false,
- "with": {},
+ "concurrently": false,
"method": "btree",
- "concurrently": false
+ "with": {}
},
"smoke_runs_company_status_idx": {
"name": "smoke_runs_company_status_idx",
@@ -49674,24 +49794,24 @@
}
],
"isUnique": false,
- "with": {},
+ "concurrently": false,
"method": "btree",
- "concurrently": false
+ "with": {}
}
},
"foreignKeys": {
"smoke_runs_company_id_companies_id_fk": {
"name": "smoke_runs_company_id_companies_id_fk",
"tableFrom": "smoke_runs",
+ "tableTo": "companies",
"columnsFrom": [
"company_id"
],
- "tableTo": "companies",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "cascade"
+ "onDelete": "cascade",
+ "onUpdate": "no action"
}
},
"compositePrimaryKeys": {},
@@ -49831,9 +49951,9 @@
}
],
"isUnique": false,
- "with": {},
+ "concurrently": false,
"method": "btree",
- "concurrently": false
+ "with": {}
},
"status_card_updates_generation_issue_idx": {
"name": "status_card_updates_generation_issue_idx",
@@ -49846,50 +49966,50 @@
}
],
"isUnique": false,
- "with": {},
+ "concurrently": false,
"method": "btree",
- "concurrently": false
+ "with": {}
}
},
"foreignKeys": {
"status_card_updates_card_id_status_cards_id_fk": {
"name": "status_card_updates_card_id_status_cards_id_fk",
"tableFrom": "status_card_updates",
+ "tableTo": "status_cards",
"columnsFrom": [
"card_id"
],
- "tableTo": "status_cards",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "cascade"
+ "onDelete": "cascade",
+ "onUpdate": "no action"
},
"status_card_updates_generation_issue_id_issues_id_fk": {
"name": "status_card_updates_generation_issue_id_issues_id_fk",
"tableFrom": "status_card_updates",
+ "tableTo": "issues",
"columnsFrom": [
"generation_issue_id"
],
- "tableTo": "issues",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "set null"
+ "onDelete": "set null",
+ "onUpdate": "no action"
},
"status_card_updates_run_id_heartbeat_runs_id_fk": {
"name": "status_card_updates_run_id_heartbeat_runs_id_fk",
"tableFrom": "status_card_updates",
+ "tableTo": "heartbeat_runs",
"columnsFrom": [
"run_id"
],
- "tableTo": "heartbeat_runs",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "set null"
+ "onDelete": "set null",
+ "onUpdate": "no action"
}
},
"compositePrimaryKeys": {},
@@ -50122,9 +50242,9 @@
}
],
"isUnique": false,
- "with": {},
+ "concurrently": false,
"method": "btree",
- "concurrently": false
+ "with": {}
},
"status_cards_company_next_eval_idx": {
"name": "status_cards_company_next_eval_idx",
@@ -50143,102 +50263,102 @@
}
],
"isUnique": false,
- "with": {},
+ "concurrently": false,
"method": "btree",
- "concurrently": false
+ "with": {}
}
},
"foreignKeys": {
"status_cards_company_id_companies_id_fk": {
"name": "status_cards_company_id_companies_id_fk",
"tableFrom": "status_cards",
+ "tableTo": "companies",
"columnsFrom": [
"company_id"
],
- "tableTo": "companies",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "cascade"
+ "onDelete": "cascade",
+ "onUpdate": "no action"
},
"status_cards_created_by_agent_id_agents_id_fk": {
"name": "status_cards_created_by_agent_id_agents_id_fk",
"tableFrom": "status_cards",
+ "tableTo": "agents",
"columnsFrom": [
"created_by_agent_id"
],
- "tableTo": "agents",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "set null"
+ "onDelete": "set null",
+ "onUpdate": "no action"
},
"status_cards_query_compiled_by_agent_id_agents_id_fk": {
"name": "status_cards_query_compiled_by_agent_id_agents_id_fk",
"tableFrom": "status_cards",
+ "tableTo": "agents",
"columnsFrom": [
"query_compiled_by_agent_id"
],
- "tableTo": "agents",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "set null"
+ "onDelete": "set null",
+ "onUpdate": "no action"
},
"status_cards_agent_id_agents_id_fk": {
"name": "status_cards_agent_id_agents_id_fk",
"tableFrom": "status_cards",
+ "tableTo": "agents",
"columnsFrom": [
"agent_id"
],
- "tableTo": "agents",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "set null"
+ "onDelete": "set null",
+ "onUpdate": "no action"
},
"status_cards_document_id_documents_id_fk": {
"name": "status_cards_document_id_documents_id_fk",
"tableFrom": "status_cards",
+ "tableTo": "documents",
"columnsFrom": [
"document_id"
],
- "tableTo": "documents",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "set null"
+ "onDelete": "set null",
+ "onUpdate": "no action"
},
"status_cards_generating_issue_id_issues_id_fk": {
"name": "status_cards_generating_issue_id_issues_id_fk",
"tableFrom": "status_cards",
+ "tableTo": "issues",
"columnsFrom": [
"generating_issue_id"
],
- "tableTo": "issues",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "set null"
+ "onDelete": "set null",
+ "onUpdate": "no action"
},
"status_cards_archived_by_agent_id_agents_id_fk": {
"name": "status_cards_archived_by_agent_id_agents_id_fk",
"tableFrom": "status_cards",
+ "tableTo": "agents",
"columnsFrom": [
"archived_by_agent_id"
],
- "tableTo": "agents",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "set null"
+ "onDelete": "set null",
+ "onUpdate": "no action"
}
},
"compositePrimaryKeys": {},
@@ -50377,9 +50497,9 @@
}
],
"isUnique": true,
- "with": {},
+ "concurrently": false,
"method": "btree",
- "concurrently": false
+ "with": {}
},
"status_decision_effects_company_idempotency_uq": {
"name": "status_decision_effects_company_idempotency_uq",
@@ -50398,56 +50518,56 @@
}
],
"isUnique": true,
- "with": {},
+ "concurrently": false,
"method": "btree",
- "concurrently": false
+ "with": {}
}
},
"foreignKeys": {
"status_decision_effects_company_id_companies_id_fk": {
"name": "status_decision_effects_company_id_companies_id_fk",
"tableFrom": "status_decision_effects",
+ "tableTo": "companies",
"columnsFrom": [
"company_id"
],
- "tableTo": "companies",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "no action"
+ "onDelete": "no action",
+ "onUpdate": "no action"
},
"status_decision_effects_issue_company_fk": {
"name": "status_decision_effects_issue_company_fk",
"tableFrom": "status_decision_effects",
+ "tableTo": "issues",
"columnsFrom": [
"company_id",
"issue_id"
],
- "tableTo": "issues",
"columnsTo": [
"company_id",
"id"
],
- "onUpdate": "no action",
- "onDelete": "no action"
+ "onDelete": "no action",
+ "onUpdate": "no action"
},
"status_decision_effects_decision_owner_fk": {
"name": "status_decision_effects_decision_owner_fk",
"tableFrom": "status_decision_effects",
+ "tableTo": "status_decisions",
"columnsFrom": [
"company_id",
"issue_id",
"decision_id"
],
- "tableTo": "status_decisions",
"columnsTo": [
"company_id",
"issue_id",
"id"
],
- "onUpdate": "no action",
- "onDelete": "no action"
+ "onDelete": "no action",
+ "onUpdate": "no action"
}
},
"compositePrimaryKeys": {},
@@ -50584,9 +50704,9 @@
}
],
"isUnique": true,
- "with": {},
+ "concurrently": false,
"method": "btree",
- "concurrently": false
+ "with": {}
},
"status_decisions_company_assessment_uq": {
"name": "status_decisions_company_assessment_uq",
@@ -50605,9 +50725,9 @@
}
],
"isUnique": true,
- "with": {},
+ "concurrently": false,
"method": "btree",
- "concurrently": false
+ "with": {}
},
"status_decisions_company_issue_digest_uq": {
"name": "status_decisions_company_issue_digest_uq",
@@ -50632,98 +50752,98 @@
}
],
"isUnique": true,
- "with": {},
+ "concurrently": false,
"method": "btree",
- "concurrently": false
+ "with": {}
}
},
"foreignKeys": {
"status_decisions_company_id_companies_id_fk": {
"name": "status_decisions_company_id_companies_id_fk",
"tableFrom": "status_decisions",
+ "tableTo": "companies",
"columnsFrom": [
"company_id"
],
- "tableTo": "companies",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "no action"
+ "onDelete": "no action",
+ "onUpdate": "no action"
},
"status_decisions_issue_company_fk": {
"name": "status_decisions_issue_company_fk",
"tableFrom": "status_decisions",
+ "tableTo": "issues",
"columnsFrom": [
"company_id",
"issue_id"
],
- "tableTo": "issues",
"columnsTo": [
"company_id",
"id"
],
- "onUpdate": "no action",
- "onDelete": "no action"
+ "onDelete": "no action",
+ "onUpdate": "no action"
},
"status_decisions_assessment_owner_fk": {
"name": "status_decisions_assessment_owner_fk",
"tableFrom": "status_decisions",
+ "tableTo": "work_assessments",
"columnsFrom": [
"company_id",
"issue_id",
"run_id",
"assessment_id"
],
- "tableTo": "work_assessments",
"columnsTo": [
"company_id",
"issue_id",
"run_id",
"id"
],
- "onUpdate": "no action",
- "onDelete": "no action"
+ "onDelete": "no action",
+ "onUpdate": "no action"
},
"status_decisions_supersedes_owner_fk": {
"name": "status_decisions_supersedes_owner_fk",
"tableFrom": "status_decisions",
+ "tableTo": "status_decisions",
"columnsFrom": [
"company_id",
"issue_id",
"supersedes_decision_id"
],
- "tableTo": "status_decisions",
"columnsTo": [
"company_id",
"issue_id",
"id"
],
- "onUpdate": "no action",
- "onDelete": "no action"
+ "onDelete": "no action",
+ "onUpdate": "no action"
}
},
"compositePrimaryKeys": {},
"uniqueConstraints": {
"status_decisions_company_issue_id_uq": {
"name": "status_decisions_company_issue_id_uq",
+ "nullsNotDistinct": false,
"columns": [
"company_id",
"issue_id",
"id"
- ],
- "nullsNotDistinct": false
+ ]
},
"status_decisions_company_issue_run_assessment_id_uq": {
"name": "status_decisions_company_issue_run_assessment_id_uq",
+ "nullsNotDistinct": false,
"columns": [
"company_id",
"issue_id",
"run_id",
"assessment_id",
"id"
- ],
- "nullsNotDistinct": false
+ ]
}
},
"policies": {},
@@ -50835,9 +50955,9 @@
}
],
"isUnique": true,
- "with": {},
+ "concurrently": false,
"method": "btree",
- "concurrently": false
+ "with": {}
},
"summary_slots_company_scope_idx": {
"name": "summary_slots_company_scope_idx",
@@ -50862,9 +50982,9 @@
}
],
"isUnique": false,
- "with": {},
+ "concurrently": false,
"method": "btree",
- "concurrently": false
+ "with": {}
},
"summary_slots_company_generating_issue_idx": {
"name": "summary_slots_company_generating_issue_idx",
@@ -50883,9 +51003,9 @@
}
],
"isUnique": false,
- "with": {},
+ "concurrently": false,
"method": "btree",
- "concurrently": false
+ "with": {}
},
"summary_slots_company_updated_idx": {
"name": "summary_slots_company_updated_idx",
@@ -50904,76 +51024,76 @@
}
],
"isUnique": false,
- "with": {},
+ "concurrently": false,
"method": "btree",
- "concurrently": false
+ "with": {}
}
},
"foreignKeys": {
"summary_slots_company_id_companies_id_fk": {
"name": "summary_slots_company_id_companies_id_fk",
"tableFrom": "summary_slots",
+ "tableTo": "companies",
"columnsFrom": [
"company_id"
],
- "tableTo": "companies",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "cascade"
+ "onDelete": "cascade",
+ "onUpdate": "no action"
},
"summary_slots_document_id_documents_id_fk": {
"name": "summary_slots_document_id_documents_id_fk",
"tableFrom": "summary_slots",
+ "tableTo": "documents",
"columnsFrom": [
"document_id"
],
- "tableTo": "documents",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "set null"
+ "onDelete": "set null",
+ "onUpdate": "no action"
},
"summary_slots_generating_issue_id_issues_id_fk": {
"name": "summary_slots_generating_issue_id_issues_id_fk",
"tableFrom": "summary_slots",
+ "tableTo": "issues",
"columnsFrom": [
"generating_issue_id"
],
- "tableTo": "issues",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "set null"
+ "onDelete": "set null",
+ "onUpdate": "no action"
},
"summary_slots_last_generated_by_agent_id_agents_id_fk": {
"name": "summary_slots_last_generated_by_agent_id_agents_id_fk",
"tableFrom": "summary_slots",
+ "tableTo": "agents",
"columnsFrom": [
"last_generated_by_agent_id"
],
- "tableTo": "agents",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "set null"
+ "onDelete": "set null",
+ "onUpdate": "no action"
}
},
"compositePrimaryKeys": {},
"uniqueConstraints": {
"summary_slots_company_scope_slot_uq": {
"name": "summary_slots_company_scope_slot_uq",
+ "nullsNotDistinct": true,
"columns": [
"company_id",
"scope_kind",
"scope_id",
"slot_key"
- ],
- "nullsNotDistinct": true
+ ]
}
},
"policies": {},
@@ -51103,9 +51223,9 @@
}
],
"isUnique": false,
- "with": {},
+ "concurrently": false,
"method": "btree",
- "concurrently": false
+ "with": {}
},
"tool_access_audit_connection_idx": {
"name": "tool_access_audit_connection_idx",
@@ -51118,9 +51238,9 @@
}
],
"isUnique": false,
- "with": {},
+ "concurrently": false,
"method": "btree",
- "concurrently": false
+ "with": {}
},
"tool_access_audit_gateway_idx": {
"name": "tool_access_audit_gateway_idx",
@@ -51139,76 +51259,76 @@
}
],
"isUnique": false,
- "with": {},
+ "concurrently": false,
"method": "btree",
- "concurrently": false
+ "with": {}
}
},
"foreignKeys": {
"tool_access_audit_events_company_id_companies_id_fk": {
"name": "tool_access_audit_events_company_id_companies_id_fk",
"tableFrom": "tool_access_audit_events",
+ "tableTo": "companies",
"columnsFrom": [
"company_id"
],
- "tableTo": "companies",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "cascade"
+ "onDelete": "cascade",
+ "onUpdate": "no action"
},
"tool_access_audit_events_gateway_id_tool_mcp_gateways_id_fk": {
"name": "tool_access_audit_events_gateway_id_tool_mcp_gateways_id_fk",
"tableFrom": "tool_access_audit_events",
+ "tableTo": "tool_mcp_gateways",
"columnsFrom": [
"gateway_id"
],
- "tableTo": "tool_mcp_gateways",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "set null"
+ "onDelete": "set null",
+ "onUpdate": "no action"
},
"tool_access_audit_events_gateway_token_id_tool_mcp_gateway_tokens_id_fk": {
"name": "tool_access_audit_events_gateway_token_id_tool_mcp_gateway_tokens_id_fk",
"tableFrom": "tool_access_audit_events",
+ "tableTo": "tool_mcp_gateway_tokens",
"columnsFrom": [
"gateway_token_id"
],
- "tableTo": "tool_mcp_gateway_tokens",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "set null"
+ "onDelete": "set null",
+ "onUpdate": "no action"
},
"tool_access_audit_events_connection_id_tool_connections_id_fk": {
"name": "tool_access_audit_events_connection_id_tool_connections_id_fk",
"tableFrom": "tool_access_audit_events",
+ "tableTo": "tool_connections",
"columnsFrom": [
"connection_id"
],
- "tableTo": "tool_connections",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "set null"
+ "onDelete": "set null",
+ "onUpdate": "no action"
},
"tool_access_audit_events_catalog_entry_id_tool_catalog_entries_id_fk": {
"name": "tool_access_audit_events_catalog_entry_id_tool_catalog_entries_id_fk",
"tableFrom": "tool_access_audit_events",
+ "tableTo": "tool_catalog_entries",
"columnsFrom": [
"catalog_entry_id"
],
- "tableTo": "tool_catalog_entries",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "set null"
+ "onDelete": "set null",
+ "onUpdate": "no action"
}
},
"compositePrimaryKeys": {},
@@ -51277,63 +51397,63 @@
}
],
"isUnique": false,
- "with": {},
+ "concurrently": false,
"method": "btree",
- "concurrently": false
+ "with": {}
}
},
"foreignKeys": {
"tool_action_deliveries_action_request_id_tool_action_requests_id_fk": {
"name": "tool_action_deliveries_action_request_id_tool_action_requests_id_fk",
"tableFrom": "tool_action_deliveries",
+ "tableTo": "tool_action_requests",
"columnsFrom": [
"action_request_id"
],
- "tableTo": "tool_action_requests",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "cascade"
+ "onDelete": "cascade",
+ "onUpdate": "no action"
},
"tool_action_deliveries_company_id_companies_id_fk": {
"name": "tool_action_deliveries_company_id_companies_id_fk",
"tableFrom": "tool_action_deliveries",
+ "tableTo": "companies",
"columnsFrom": [
"company_id"
],
- "tableTo": "companies",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "cascade"
+ "onDelete": "cascade",
+ "onUpdate": "no action"
},
"tool_action_deliveries_issue_id_issues_id_fk": {
"name": "tool_action_deliveries_issue_id_issues_id_fk",
"tableFrom": "tool_action_deliveries",
+ "tableTo": "issues",
"columnsFrom": [
"issue_id"
],
- "tableTo": "issues",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "cascade"
+ "onDelete": "cascade",
+ "onUpdate": "no action"
},
"tool_action_deliveries_interaction_id_issue_thread_interactions_id_fk": {
"name": "tool_action_deliveries_interaction_id_issue_thread_interactions_id_fk",
"tableFrom": "tool_action_deliveries",
+ "tableTo": "issue_thread_interactions",
"columnsFrom": [
"interaction_id"
],
- "tableTo": "issue_thread_interactions",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "cascade"
+ "onDelete": "cascade",
+ "onUpdate": "no action"
}
},
"compositePrimaryKeys": {},
@@ -51501,9 +51621,9 @@
}
],
"isUnique": false,
- "with": {},
+ "concurrently": false,
"method": "btree",
- "concurrently": false
+ "with": {}
},
"tool_action_requests_invocation_idx": {
"name": "tool_action_requests_invocation_idx",
@@ -51516,9 +51636,9 @@
}
],
"isUnique": false,
- "with": {},
+ "concurrently": false,
"method": "btree",
- "concurrently": false
+ "with": {}
},
"tool_action_requests_issue_idx": {
"name": "tool_action_requests_issue_idx",
@@ -51537,115 +51657,115 @@
}
],
"isUnique": false,
- "with": {},
+ "concurrently": false,
"method": "btree",
- "concurrently": false
+ "with": {}
}
},
"foreignKeys": {
"tool_action_requests_company_id_companies_id_fk": {
"name": "tool_action_requests_company_id_companies_id_fk",
"tableFrom": "tool_action_requests",
+ "tableTo": "companies",
"columnsFrom": [
"company_id"
],
- "tableTo": "companies",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "cascade"
+ "onDelete": "cascade",
+ "onUpdate": "no action"
},
"tool_action_requests_invocation_id_tool_invocations_id_fk": {
"name": "tool_action_requests_invocation_id_tool_invocations_id_fk",
"tableFrom": "tool_action_requests",
+ "tableTo": "tool_invocations",
"columnsFrom": [
"invocation_id"
],
- "tableTo": "tool_invocations",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "cascade"
+ "onDelete": "cascade",
+ "onUpdate": "no action"
},
"tool_action_requests_issue_id_issues_id_fk": {
"name": "tool_action_requests_issue_id_issues_id_fk",
"tableFrom": "tool_action_requests",
+ "tableTo": "issues",
"columnsFrom": [
"issue_id"
],
- "tableTo": "issues",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "set null"
+ "onDelete": "set null",
+ "onUpdate": "no action"
},
"tool_action_requests_interaction_id_issue_thread_interactions_id_fk": {
"name": "tool_action_requests_interaction_id_issue_thread_interactions_id_fk",
"tableFrom": "tool_action_requests",
+ "tableTo": "issue_thread_interactions",
"columnsFrom": [
"interaction_id"
],
- "tableTo": "issue_thread_interactions",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "set null"
+ "onDelete": "set null",
+ "onUpdate": "no action"
},
"tool_action_requests_approval_id_approvals_id_fk": {
"name": "tool_action_requests_approval_id_approvals_id_fk",
"tableFrom": "tool_action_requests",
+ "tableTo": "approvals",
"columnsFrom": [
"approval_id"
],
- "tableTo": "approvals",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "set null"
+ "onDelete": "set null",
+ "onUpdate": "no action"
},
"tool_action_requests_requested_by_agent_id_agents_id_fk": {
"name": "tool_action_requests_requested_by_agent_id_agents_id_fk",
"tableFrom": "tool_action_requests",
+ "tableTo": "agents",
"columnsFrom": [
"requested_by_agent_id"
],
- "tableTo": "agents",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "set null"
+ "onDelete": "set null",
+ "onUpdate": "no action"
},
"tool_action_requests_resolved_by_agent_id_agents_id_fk": {
"name": "tool_action_requests_resolved_by_agent_id_agents_id_fk",
"tableFrom": "tool_action_requests",
+ "tableTo": "agents",
"columnsFrom": [
"resolved_by_agent_id"
],
- "tableTo": "agents",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "set null"
+ "onDelete": "set null",
+ "onUpdate": "no action"
},
"tool_action_requests_decided_by_agent_id_agents_id_fk": {
"name": "tool_action_requests_decided_by_agent_id_agents_id_fk",
"tableFrom": "tool_action_requests",
+ "tableTo": "agents",
"columnsFrom": [
"decided_by_agent_id"
],
- "tableTo": "agents",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "set null"
+ "onDelete": "set null",
+ "onUpdate": "no action"
}
},
"compositePrimaryKeys": {},
@@ -51760,9 +51880,9 @@
}
],
"isUnique": false,
- "with": {},
+ "concurrently": false,
"method": "btree",
- "concurrently": false
+ "with": {}
},
"tool_applications_company_status_idx": {
"name": "tool_applications_company_status_idx",
@@ -51781,9 +51901,9 @@
}
],
"isUnique": false,
- "with": {},
+ "concurrently": false,
"method": "btree",
- "concurrently": false
+ "with": {}
},
"tool_applications_company_name_uq": {
"name": "tool_applications_company_name_uq",
@@ -51802,9 +51922,9 @@
}
],
"isUnique": true,
- "with": {},
+ "concurrently": false,
"method": "btree",
- "concurrently": false
+ "with": {}
},
"tool_applications_company_key_uq": {
"name": "tool_applications_company_key_uq",
@@ -51823,50 +51943,50 @@
}
],
"isUnique": true,
- "with": {},
+ "concurrently": false,
"method": "btree",
- "concurrently": false
+ "with": {}
}
},
"foreignKeys": {
"tool_applications_company_id_companies_id_fk": {
"name": "tool_applications_company_id_companies_id_fk",
"tableFrom": "tool_applications",
+ "tableTo": "companies",
"columnsFrom": [
"company_id"
],
- "tableTo": "companies",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "cascade"
+ "onDelete": "cascade",
+ "onUpdate": "no action"
},
"tool_applications_plugin_id_plugins_id_fk": {
"name": "tool_applications_plugin_id_plugins_id_fk",
"tableFrom": "tool_applications",
+ "tableTo": "plugins",
"columnsFrom": [
"plugin_id"
],
- "tableTo": "plugins",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "set null"
+ "onDelete": "set null",
+ "onUpdate": "no action"
},
"tool_applications_owner_agent_id_agents_id_fk": {
"name": "tool_applications_owner_agent_id_agents_id_fk",
"tableFrom": "tool_applications",
+ "tableTo": "agents",
"columnsFrom": [
"owner_agent_id"
],
- "tableTo": "agents",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "set null"
+ "onDelete": "set null",
+ "onUpdate": "no action"
}
},
"compositePrimaryKeys": {},
@@ -52161,9 +52281,9 @@
}
],
"isUnique": false,
- "with": {},
+ "concurrently": false,
"method": "btree",
- "concurrently": false
+ "with": {}
},
"tool_call_events_run_idx": {
"name": "tool_call_events_run_idx",
@@ -52182,9 +52302,9 @@
}
],
"isUnique": false,
- "with": {},
+ "concurrently": false,
"method": "btree",
- "concurrently": false
+ "with": {}
},
"tool_call_events_issue_idx": {
"name": "tool_call_events_issue_idx",
@@ -52203,9 +52323,9 @@
}
],
"isUnique": false,
- "with": {},
+ "concurrently": false,
"method": "btree",
- "concurrently": false
+ "with": {}
},
"tool_call_events_invocation_idx": {
"name": "tool_call_events_invocation_idx",
@@ -52218,9 +52338,9 @@
}
],
"isUnique": false,
- "with": {},
+ "concurrently": false,
"method": "btree",
- "concurrently": false
+ "with": {}
},
"tool_call_events_gateway_idx": {
"name": "tool_call_events_gateway_idx",
@@ -52239,167 +52359,167 @@
}
],
"isUnique": false,
- "with": {},
+ "concurrently": false,
"method": "btree",
- "concurrently": false
+ "with": {}
}
},
"foreignKeys": {
"tool_call_events_company_id_companies_id_fk": {
"name": "tool_call_events_company_id_companies_id_fk",
"tableFrom": "tool_call_events",
+ "tableTo": "companies",
"columnsFrom": [
"company_id"
],
- "tableTo": "companies",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "cascade"
+ "onDelete": "cascade",
+ "onUpdate": "no action"
},
"tool_call_events_agent_id_agents_id_fk": {
"name": "tool_call_events_agent_id_agents_id_fk",
"tableFrom": "tool_call_events",
+ "tableTo": "agents",
"columnsFrom": [
"agent_id"
],
- "tableTo": "agents",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "set null"
+ "onDelete": "set null",
+ "onUpdate": "no action"
},
"tool_call_events_run_id_heartbeat_runs_id_fk": {
"name": "tool_call_events_run_id_heartbeat_runs_id_fk",
"tableFrom": "tool_call_events",
+ "tableTo": "heartbeat_runs",
"columnsFrom": [
"run_id"
],
- "tableTo": "heartbeat_runs",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "set null"
+ "onDelete": "set null",
+ "onUpdate": "no action"
},
"tool_call_events_issue_id_issues_id_fk": {
"name": "tool_call_events_issue_id_issues_id_fk",
"tableFrom": "tool_call_events",
+ "tableTo": "issues",
"columnsFrom": [
"issue_id"
],
- "tableTo": "issues",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "set null"
+ "onDelete": "set null",
+ "onUpdate": "no action"
},
"tool_call_events_gateway_id_tool_mcp_gateways_id_fk": {
"name": "tool_call_events_gateway_id_tool_mcp_gateways_id_fk",
"tableFrom": "tool_call_events",
+ "tableTo": "tool_mcp_gateways",
"columnsFrom": [
"gateway_id"
],
- "tableTo": "tool_mcp_gateways",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "set null"
+ "onDelete": "set null",
+ "onUpdate": "no action"
},
"tool_call_events_gateway_token_id_tool_mcp_gateway_tokens_id_fk": {
"name": "tool_call_events_gateway_token_id_tool_mcp_gateway_tokens_id_fk",
"tableFrom": "tool_call_events",
+ "tableTo": "tool_mcp_gateway_tokens",
"columnsFrom": [
"gateway_token_id"
],
- "tableTo": "tool_mcp_gateway_tokens",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "set null"
+ "onDelete": "set null",
+ "onUpdate": "no action"
},
"tool_call_events_application_id_tool_applications_id_fk": {
"name": "tool_call_events_application_id_tool_applications_id_fk",
"tableFrom": "tool_call_events",
+ "tableTo": "tool_applications",
"columnsFrom": [
"application_id"
],
- "tableTo": "tool_applications",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "set null"
+ "onDelete": "set null",
+ "onUpdate": "no action"
},
"tool_call_events_connection_id_tool_connections_id_fk": {
"name": "tool_call_events_connection_id_tool_connections_id_fk",
"tableFrom": "tool_call_events",
+ "tableTo": "tool_connections",
"columnsFrom": [
"connection_id"
],
- "tableTo": "tool_connections",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "set null"
+ "onDelete": "set null",
+ "onUpdate": "no action"
},
"tool_call_events_catalog_entry_id_tool_catalog_entries_id_fk": {
"name": "tool_call_events_catalog_entry_id_tool_catalog_entries_id_fk",
"tableFrom": "tool_call_events",
+ "tableTo": "tool_catalog_entries",
"columnsFrom": [
"catalog_entry_id"
],
- "tableTo": "tool_catalog_entries",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "set null"
+ "onDelete": "set null",
+ "onUpdate": "no action"
},
"tool_call_events_invocation_id_tool_invocations_id_fk": {
"name": "tool_call_events_invocation_id_tool_invocations_id_fk",
"tableFrom": "tool_call_events",
+ "tableTo": "tool_invocations",
"columnsFrom": [
"invocation_id"
],
- "tableTo": "tool_invocations",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "set null"
+ "onDelete": "set null",
+ "onUpdate": "no action"
},
"tool_call_events_action_request_id_tool_action_requests_id_fk": {
"name": "tool_call_events_action_request_id_tool_action_requests_id_fk",
"tableFrom": "tool_call_events",
+ "tableTo": "tool_action_requests",
"columnsFrom": [
"action_request_id"
],
- "tableTo": "tool_action_requests",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "set null"
+ "onDelete": "set null",
+ "onUpdate": "no action"
},
"tool_call_events_runtime_slot_id_tool_runtime_slots_id_fk": {
"name": "tool_call_events_runtime_slot_id_tool_runtime_slots_id_fk",
"tableFrom": "tool_call_events",
+ "tableTo": "tool_runtime_slots",
"columnsFrom": [
"runtime_slot_id"
],
- "tableTo": "tool_runtime_slots",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "set null"
+ "onDelete": "set null",
+ "onUpdate": "no action"
}
},
"compositePrimaryKeys": {},
@@ -52612,9 +52732,9 @@
}
],
"isUnique": false,
- "with": {},
+ "concurrently": false,
"method": "btree",
- "concurrently": false
+ "with": {}
},
"tool_catalog_entries_application_idx": {
"name": "tool_catalog_entries_application_idx",
@@ -52627,9 +52747,9 @@
}
],
"isUnique": false,
- "with": {},
+ "concurrently": false,
"method": "btree",
- "concurrently": false
+ "with": {}
},
"tool_catalog_entries_connection_idx": {
"name": "tool_catalog_entries_connection_idx",
@@ -52642,9 +52762,9 @@
}
],
"isUnique": false,
- "with": {},
+ "concurrently": false,
"method": "btree",
- "concurrently": false
+ "with": {}
},
"tool_catalog_entries_company_status_idx": {
"name": "tool_catalog_entries_company_status_idx",
@@ -52663,9 +52783,9 @@
}
],
"isUnique": false,
- "with": {},
+ "concurrently": false,
"method": "btree",
- "concurrently": false
+ "with": {}
},
"tool_catalog_entries_connection_name_uq": {
"name": "tool_catalog_entries_connection_name_uq",
@@ -52684,63 +52804,63 @@
}
],
"isUnique": true,
- "with": {},
+ "concurrently": false,
"method": "btree",
- "concurrently": false
+ "with": {}
}
},
"foreignKeys": {
"tool_catalog_entries_company_id_companies_id_fk": {
"name": "tool_catalog_entries_company_id_companies_id_fk",
"tableFrom": "tool_catalog_entries",
+ "tableTo": "companies",
"columnsFrom": [
"company_id"
],
- "tableTo": "companies",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "cascade"
+ "onDelete": "cascade",
+ "onUpdate": "no action"
},
"tool_catalog_entries_application_id_tool_applications_id_fk": {
"name": "tool_catalog_entries_application_id_tool_applications_id_fk",
"tableFrom": "tool_catalog_entries",
+ "tableTo": "tool_applications",
"columnsFrom": [
"application_id"
],
- "tableTo": "tool_applications",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "cascade"
+ "onDelete": "cascade",
+ "onUpdate": "no action"
},
"tool_catalog_entries_connection_id_tool_connections_id_fk": {
"name": "tool_catalog_entries_connection_id_tool_connections_id_fk",
"tableFrom": "tool_catalog_entries",
+ "tableTo": "tool_connections",
"columnsFrom": [
"connection_id"
],
- "tableTo": "tool_connections",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "cascade"
+ "onDelete": "cascade",
+ "onUpdate": "no action"
},
"tool_catalog_entries_reviewed_by_agent_id_agents_id_fk": {
"name": "tool_catalog_entries_reviewed_by_agent_id_agents_id_fk",
"tableFrom": "tool_catalog_entries",
+ "tableTo": "agents",
"columnsFrom": [
"reviewed_by_agent_id"
],
- "tableTo": "agents",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "set null"
+ "onDelete": "set null",
+ "onUpdate": "no action"
}
},
"compositePrimaryKeys": {},
@@ -52847,39 +52967,39 @@
}
],
"isUnique": true,
- "with": {},
+ "concurrently": false,
"method": "btree",
- "concurrently": false
+ "with": {}
}
},
"foreignKeys": {
"tool_connection_app_snapshots_company_id_companies_id_fk": {
"name": "tool_connection_app_snapshots_company_id_companies_id_fk",
"tableFrom": "tool_connection_app_snapshots",
+ "tableTo": "companies",
"columnsFrom": [
"company_id"
],
- "tableTo": "companies",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "cascade"
+ "onDelete": "cascade",
+ "onUpdate": "no action"
},
"tool_connection_app_snapshots_company_connection_fk": {
"name": "tool_connection_app_snapshots_company_connection_fk",
"tableFrom": "tool_connection_app_snapshots",
+ "tableTo": "tool_connections",
"columnsFrom": [
"company_id",
"connection_id"
],
- "tableTo": "tool_connections",
"columnsTo": [
"company_id",
"id"
],
- "onUpdate": "no action",
- "onDelete": "cascade"
+ "onDelete": "cascade",
+ "onUpdate": "no action"
}
},
"compositePrimaryKeys": {},
@@ -53000,39 +53120,39 @@
}
],
"isUnique": true,
- "with": {},
+ "concurrently": false,
"method": "btree",
- "concurrently": false
+ "with": {}
}
},
"foreignKeys": {
"tool_connection_app_syncs_company_id_companies_id_fk": {
"name": "tool_connection_app_syncs_company_id_companies_id_fk",
"tableFrom": "tool_connection_app_syncs",
+ "tableTo": "companies",
"columnsFrom": [
"company_id"
],
- "tableTo": "companies",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "cascade"
+ "onDelete": "cascade",
+ "onUpdate": "no action"
},
"tool_connection_app_syncs_company_connection_fk": {
"name": "tool_connection_app_syncs_company_connection_fk",
"tableFrom": "tool_connection_app_syncs",
+ "tableTo": "tool_connections",
"columnsFrom": [
"company_id",
"connection_id"
],
- "tableTo": "tool_connections",
"columnsTo": [
"company_id",
"id"
],
- "onUpdate": "no action",
- "onDelete": "cascade"
+ "onDelete": "cascade",
+ "onUpdate": "no action"
}
},
"compositePrimaryKeys": {},
@@ -53120,9 +53240,9 @@
}
],
"isUnique": false,
- "with": {},
+ "concurrently": false,
"method": "btree",
- "concurrently": false
+ "with": {}
},
"tool_connection_installs_connection_idx": {
"name": "tool_connection_installs_connection_idx",
@@ -53141,9 +53261,9 @@
}
],
"isUnique": false,
- "with": {},
+ "concurrently": false,
"method": "btree",
- "concurrently": false
+ "with": {}
},
"tool_connection_installs_target_uq": {
"name": "tool_connection_installs_target_uq",
@@ -53174,50 +53294,50 @@
}
],
"isUnique": true,
- "with": {},
+ "concurrently": false,
"method": "btree",
- "concurrently": false
+ "with": {}
}
},
"foreignKeys": {
"tool_connection_installs_company_id_companies_id_fk": {
"name": "tool_connection_installs_company_id_companies_id_fk",
"tableFrom": "tool_connection_installs",
+ "tableTo": "companies",
"columnsFrom": [
"company_id"
],
- "tableTo": "companies",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "cascade"
+ "onDelete": "cascade",
+ "onUpdate": "no action"
},
"tool_connection_installs_connection_id_tool_connections_id_fk": {
"name": "tool_connection_installs_connection_id_tool_connections_id_fk",
"tableFrom": "tool_connection_installs",
+ "tableTo": "tool_connections",
"columnsFrom": [
"connection_id"
],
- "tableTo": "tool_connections",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "cascade"
+ "onDelete": "cascade",
+ "onUpdate": "no action"
},
"tool_connection_installs_created_by_agent_id_agents_id_fk": {
"name": "tool_connection_installs_created_by_agent_id_agents_id_fk",
"tableFrom": "tool_connection_installs",
+ "tableTo": "agents",
"columnsFrom": [
"created_by_agent_id"
],
- "tableTo": "agents",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "set null"
+ "onDelete": "set null",
+ "onUpdate": "no action"
}
},
"compositePrimaryKeys": {},
@@ -53444,9 +53564,9 @@
}
],
"isUnique": false,
- "with": {},
+ "concurrently": false,
"method": "btree",
- "concurrently": false
+ "with": {}
},
"tool_connections_application_idx": {
"name": "tool_connections_application_idx",
@@ -53459,9 +53579,9 @@
}
],
"isUnique": false,
- "with": {},
+ "concurrently": false,
"method": "btree",
- "concurrently": false
+ "with": {}
},
"tool_connections_company_enabled_idx": {
"name": "tool_connections_company_enabled_idx",
@@ -53480,9 +53600,9 @@
}
],
"isUnique": false,
- "with": {},
+ "concurrently": false,
"method": "btree",
- "concurrently": false
+ "with": {}
},
"tool_connections_company_uid_uq": {
"name": "tool_connections_company_uid_uq",
@@ -53501,61 +53621,61 @@
}
],
"isUnique": true,
- "with": {},
+ "concurrently": false,
"method": "btree",
- "concurrently": false
+ "with": {}
}
},
"foreignKeys": {
"tool_connections_company_id_companies_id_fk": {
"name": "tool_connections_company_id_companies_id_fk",
"tableFrom": "tool_connections",
+ "tableTo": "companies",
"columnsFrom": [
"company_id"
],
- "tableTo": "companies",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "cascade"
+ "onDelete": "cascade",
+ "onUpdate": "no action"
},
"tool_connections_application_id_tool_applications_id_fk": {
"name": "tool_connections_application_id_tool_applications_id_fk",
"tableFrom": "tool_connections",
+ "tableTo": "tool_applications",
"columnsFrom": [
"application_id"
],
- "tableTo": "tool_applications",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "no action"
+ "onDelete": "no action",
+ "onUpdate": "no action"
},
"tool_connections_created_by_agent_id_agents_id_fk": {
"name": "tool_connections_created_by_agent_id_agents_id_fk",
"tableFrom": "tool_connections",
+ "tableTo": "agents",
"columnsFrom": [
"created_by_agent_id"
],
- "tableTo": "agents",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "set null"
+ "onDelete": "set null",
+ "onUpdate": "no action"
}
},
"compositePrimaryKeys": {},
"uniqueConstraints": {
"tool_connections_company_id_uq": {
"name": "tool_connections_company_id_uq",
+ "nullsNotDistinct": false,
"columns": [
"company_id",
"id"
- ],
- "nullsNotDistinct": false
+ ]
}
},
"policies": {},
@@ -53676,9 +53796,9 @@
}
],
"isUnique": false,
- "with": {},
+ "concurrently": false,
"method": "btree",
- "concurrently": false
+ "with": {}
},
"tool_gateway_rate_limit_counters_window_uq": {
"name": "tool_gateway_rate_limit_counters_window_uq",
@@ -53703,24 +53823,24 @@
}
],
"isUnique": true,
- "with": {},
+ "concurrently": false,
"method": "btree",
- "concurrently": false
+ "with": {}
}
},
"foreignKeys": {
"tool_gateway_rate_limit_counters_company_id_companies_id_fk": {
"name": "tool_gateway_rate_limit_counters_company_id_companies_id_fk",
"tableFrom": "tool_gateway_rate_limit_counters",
+ "tableTo": "companies",
"columnsFrom": [
"company_id"
],
- "tableTo": "companies",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "cascade"
+ "onDelete": "cascade",
+ "onUpdate": "no action"
}
},
"compositePrimaryKeys": {},
@@ -53869,9 +53989,9 @@
}
],
"isUnique": true,
- "with": {},
+ "concurrently": false,
"method": "btree",
- "concurrently": false
+ "with": {}
},
"tool_gateway_sessions_company_agent_idx": {
"name": "tool_gateway_sessions_company_agent_idx",
@@ -53890,9 +54010,9 @@
}
],
"isUnique": false,
- "with": {},
+ "concurrently": false,
"method": "btree",
- "concurrently": false
+ "with": {}
},
"tool_gateway_sessions_company_expires_idx": {
"name": "tool_gateway_sessions_company_expires_idx",
@@ -53911,9 +54031,9 @@
}
],
"isUnique": false,
- "with": {},
+ "concurrently": false,
"method": "btree",
- "concurrently": false
+ "with": {}
},
"tool_gateway_sessions_run_idx": {
"name": "tool_gateway_sessions_run_idx",
@@ -53932,9 +54052,9 @@
}
],
"isUnique": false,
- "with": {},
+ "concurrently": false,
"method": "btree",
- "concurrently": false
+ "with": {}
},
"tool_gateway_sessions_issue_idx": {
"name": "tool_gateway_sessions_issue_idx",
@@ -53953,9 +54073,9 @@
}
],
"isUnique": false,
- "with": {},
+ "concurrently": false,
"method": "btree",
- "concurrently": false
+ "with": {}
},
"tool_gateway_sessions_gateway_idx": {
"name": "tool_gateway_sessions_gateway_idx",
@@ -53974,102 +54094,102 @@
}
],
"isUnique": false,
- "with": {},
+ "concurrently": false,
"method": "btree",
- "concurrently": false
+ "with": {}
}
},
"foreignKeys": {
"tool_gateway_sessions_company_id_companies_id_fk": {
"name": "tool_gateway_sessions_company_id_companies_id_fk",
"tableFrom": "tool_gateway_sessions",
+ "tableTo": "companies",
"columnsFrom": [
"company_id"
],
- "tableTo": "companies",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "cascade"
+ "onDelete": "cascade",
+ "onUpdate": "no action"
},
"tool_gateway_sessions_agent_id_agents_id_fk": {
"name": "tool_gateway_sessions_agent_id_agents_id_fk",
"tableFrom": "tool_gateway_sessions",
+ "tableTo": "agents",
"columnsFrom": [
"agent_id"
],
- "tableTo": "agents",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "cascade"
+ "onDelete": "cascade",
+ "onUpdate": "no action"
},
"tool_gateway_sessions_run_id_heartbeat_runs_id_fk": {
"name": "tool_gateway_sessions_run_id_heartbeat_runs_id_fk",
"tableFrom": "tool_gateway_sessions",
+ "tableTo": "heartbeat_runs",
"columnsFrom": [
"run_id"
],
- "tableTo": "heartbeat_runs",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "cascade"
+ "onDelete": "cascade",
+ "onUpdate": "no action"
},
"tool_gateway_sessions_issue_id_issues_id_fk": {
"name": "tool_gateway_sessions_issue_id_issues_id_fk",
"tableFrom": "tool_gateway_sessions",
+ "tableTo": "issues",
"columnsFrom": [
"issue_id"
],
- "tableTo": "issues",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "set null"
+ "onDelete": "set null",
+ "onUpdate": "no action"
},
"tool_gateway_sessions_project_id_projects_id_fk": {
"name": "tool_gateway_sessions_project_id_projects_id_fk",
"tableFrom": "tool_gateway_sessions",
+ "tableTo": "projects",
"columnsFrom": [
"project_id"
],
- "tableTo": "projects",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "set null"
+ "onDelete": "set null",
+ "onUpdate": "no action"
},
"tool_gateway_sessions_gateway_id_tool_mcp_gateways_id_fk": {
"name": "tool_gateway_sessions_gateway_id_tool_mcp_gateways_id_fk",
"tableFrom": "tool_gateway_sessions",
+ "tableTo": "tool_mcp_gateways",
"columnsFrom": [
"gateway_id"
],
- "tableTo": "tool_mcp_gateways",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "set null"
+ "onDelete": "set null",
+ "onUpdate": "no action"
},
"tool_gateway_sessions_gateway_token_id_tool_mcp_gateway_tokens_id_fk": {
"name": "tool_gateway_sessions_gateway_token_id_tool_mcp_gateway_tokens_id_fk",
"tableFrom": "tool_gateway_sessions",
+ "tableTo": "tool_mcp_gateway_tokens",
"columnsFrom": [
"gateway_token_id"
],
- "tableTo": "tool_mcp_gateway_tokens",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "set null"
+ "onDelete": "set null",
+ "onUpdate": "no action"
}
},
"compositePrimaryKeys": {},
@@ -54384,9 +54504,9 @@
}
],
"isUnique": false,
- "with": {},
+ "concurrently": false,
"method": "btree",
- "concurrently": false
+ "with": {}
},
"tool_invocations_run_idx": {
"name": "tool_invocations_run_idx",
@@ -54405,9 +54525,9 @@
}
],
"isUnique": false,
- "with": {},
+ "concurrently": false,
"method": "btree",
- "concurrently": false
+ "with": {}
},
"tool_invocations_issue_idx": {
"name": "tool_invocations_issue_idx",
@@ -54426,9 +54546,9 @@
}
],
"isUnique": false,
- "with": {},
+ "concurrently": false,
"method": "btree",
- "concurrently": false
+ "with": {}
},
"tool_invocations_gateway_idx": {
"name": "tool_invocations_gateway_idx",
@@ -54447,9 +54567,9 @@
}
],
"isUnique": false,
- "with": {},
+ "concurrently": false,
"method": "btree",
- "concurrently": false
+ "with": {}
},
"tool_invocations_company_idempotency_uq": {
"name": "tool_invocations_company_idempotency_uq",
@@ -54468,128 +54588,128 @@
}
],
"isUnique": true,
- "with": {},
+ "concurrently": false,
"method": "btree",
- "concurrently": false
+ "with": {}
}
},
"foreignKeys": {
"tool_invocations_company_id_companies_id_fk": {
"name": "tool_invocations_company_id_companies_id_fk",
"tableFrom": "tool_invocations",
+ "tableTo": "companies",
"columnsFrom": [
"company_id"
],
- "tableTo": "companies",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "cascade"
+ "onDelete": "cascade",
+ "onUpdate": "no action"
},
"tool_invocations_agent_id_agents_id_fk": {
"name": "tool_invocations_agent_id_agents_id_fk",
"tableFrom": "tool_invocations",
+ "tableTo": "agents",
"columnsFrom": [
"agent_id"
],
- "tableTo": "agents",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "set null"
+ "onDelete": "set null",
+ "onUpdate": "no action"
},
"tool_invocations_issue_id_issues_id_fk": {
"name": "tool_invocations_issue_id_issues_id_fk",
"tableFrom": "tool_invocations",
+ "tableTo": "issues",
"columnsFrom": [
"issue_id"
],
- "tableTo": "issues",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "set null"
+ "onDelete": "set null",
+ "onUpdate": "no action"
},
"tool_invocations_run_id_heartbeat_runs_id_fk": {
"name": "tool_invocations_run_id_heartbeat_runs_id_fk",
"tableFrom": "tool_invocations",
+ "tableTo": "heartbeat_runs",
"columnsFrom": [
"run_id"
],
- "tableTo": "heartbeat_runs",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "set null"
+ "onDelete": "set null",
+ "onUpdate": "no action"
},
"tool_invocations_gateway_id_tool_mcp_gateways_id_fk": {
"name": "tool_invocations_gateway_id_tool_mcp_gateways_id_fk",
"tableFrom": "tool_invocations",
+ "tableTo": "tool_mcp_gateways",
"columnsFrom": [
"gateway_id"
],
- "tableTo": "tool_mcp_gateways",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "set null"
+ "onDelete": "set null",
+ "onUpdate": "no action"
},
"tool_invocations_gateway_token_id_tool_mcp_gateway_tokens_id_fk": {
"name": "tool_invocations_gateway_token_id_tool_mcp_gateway_tokens_id_fk",
"tableFrom": "tool_invocations",
+ "tableTo": "tool_mcp_gateway_tokens",
"columnsFrom": [
"gateway_token_id"
],
- "tableTo": "tool_mcp_gateway_tokens",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "set null"
+ "onDelete": "set null",
+ "onUpdate": "no action"
},
"tool_invocations_application_id_tool_applications_id_fk": {
"name": "tool_invocations_application_id_tool_applications_id_fk",
"tableFrom": "tool_invocations",
+ "tableTo": "tool_applications",
"columnsFrom": [
"application_id"
],
- "tableTo": "tool_applications",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "set null"
+ "onDelete": "set null",
+ "onUpdate": "no action"
},
"tool_invocations_connection_id_tool_connections_id_fk": {
"name": "tool_invocations_connection_id_tool_connections_id_fk",
"tableFrom": "tool_invocations",
+ "tableTo": "tool_connections",
"columnsFrom": [
"connection_id"
],
- "tableTo": "tool_connections",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "set null"
+ "onDelete": "set null",
+ "onUpdate": "no action"
},
"tool_invocations_catalog_entry_id_tool_catalog_entries_id_fk": {
"name": "tool_invocations_catalog_entry_id_tool_catalog_entries_id_fk",
"tableFrom": "tool_invocations",
+ "tableTo": "tool_catalog_entries",
"columnsFrom": [
"catalog_entry_id"
],
- "tableTo": "tool_catalog_entries",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "set null"
+ "onDelete": "set null",
+ "onUpdate": "no action"
}
},
"compositePrimaryKeys": {},
@@ -54755,9 +54875,9 @@
}
],
"isUnique": true,
- "with": {},
+ "concurrently": false,
"method": "btree",
- "concurrently": false
+ "with": {}
},
"tool_mcp_gateway_tokens_expiry_idx": {
"name": "tool_mcp_gateway_tokens_expiry_idx",
@@ -54776,9 +54896,9 @@
}
],
"isUnique": false,
- "with": {},
+ "concurrently": false,
"method": "btree",
- "concurrently": false
+ "with": {}
},
"tool_mcp_gateway_tokens_gateway_idx": {
"name": "tool_mcp_gateway_tokens_gateway_idx",
@@ -54797,9 +54917,9 @@
}
],
"isUnique": false,
- "with": {},
+ "concurrently": false,
"method": "btree",
- "concurrently": false
+ "with": {}
},
"tool_mcp_gateway_tokens_subject_idx": {
"name": "tool_mcp_gateway_tokens_subject_idx",
@@ -54824,9 +54944,9 @@
}
],
"isUnique": false,
- "with": {},
+ "concurrently": false,
"method": "btree",
- "concurrently": false
+ "with": {}
},
"tool_mcp_gateway_tokens_company_expires_idx": {
"name": "tool_mcp_gateway_tokens_company_expires_idx",
@@ -54845,63 +54965,63 @@
}
],
"isUnique": false,
- "with": {},
+ "concurrently": false,
"method": "btree",
- "concurrently": false
+ "with": {}
}
},
"foreignKeys": {
"tool_mcp_gateway_tokens_company_id_companies_id_fk": {
"name": "tool_mcp_gateway_tokens_company_id_companies_id_fk",
"tableFrom": "tool_mcp_gateway_tokens",
+ "tableTo": "companies",
"columnsFrom": [
"company_id"
],
- "tableTo": "companies",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "cascade"
+ "onDelete": "cascade",
+ "onUpdate": "no action"
},
"tool_mcp_gateway_tokens_gateway_id_tool_mcp_gateways_id_fk": {
"name": "tool_mcp_gateway_tokens_gateway_id_tool_mcp_gateways_id_fk",
"tableFrom": "tool_mcp_gateway_tokens",
+ "tableTo": "tool_mcp_gateways",
"columnsFrom": [
"gateway_id"
],
- "tableTo": "tool_mcp_gateways",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "cascade"
+ "onDelete": "cascade",
+ "onUpdate": "no action"
},
"tool_mcp_gateway_tokens_expiry_override_by_agent_id_agents_id_fk": {
"name": "tool_mcp_gateway_tokens_expiry_override_by_agent_id_agents_id_fk",
"tableFrom": "tool_mcp_gateway_tokens",
+ "tableTo": "agents",
"columnsFrom": [
"expiry_override_by_agent_id"
],
- "tableTo": "agents",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "set null"
+ "onDelete": "set null",
+ "onUpdate": "no action"
},
"tool_mcp_gateway_tokens_created_by_agent_id_agents_id_fk": {
"name": "tool_mcp_gateway_tokens_created_by_agent_id_agents_id_fk",
"tableFrom": "tool_mcp_gateway_tokens",
+ "tableTo": "agents",
"columnsFrom": [
"created_by_agent_id"
],
- "tableTo": "agents",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "set null"
+ "onDelete": "set null",
+ "onUpdate": "no action"
}
},
"compositePrimaryKeys": {},
@@ -55096,9 +55216,9 @@
}
],
"isUnique": false,
- "with": {},
+ "concurrently": false,
"method": "btree",
- "concurrently": false
+ "with": {}
},
"tool_mcp_gateways_company_status_idx": {
"name": "tool_mcp_gateways_company_status_idx",
@@ -55117,9 +55237,9 @@
}
],
"isUnique": false,
- "with": {},
+ "concurrently": false,
"method": "btree",
- "concurrently": false
+ "with": {}
},
"tool_mcp_gateways_profile_idx": {
"name": "tool_mcp_gateways_profile_idx",
@@ -55138,9 +55258,9 @@
}
],
"isUnique": false,
- "with": {},
+ "concurrently": false,
"method": "btree",
- "concurrently": false
+ "with": {}
},
"tool_mcp_gateways_public_id_uq": {
"name": "tool_mcp_gateways_public_id_uq",
@@ -55153,9 +55273,9 @@
}
],
"isUnique": true,
- "with": {},
+ "concurrently": false,
"method": "btree",
- "concurrently": false
+ "with": {}
},
"tool_mcp_gateways_company_slug_uq": {
"name": "tool_mcp_gateways_company_slug_uq",
@@ -55174,9 +55294,9 @@
}
],
"isUnique": true,
- "with": {},
+ "concurrently": false,
"method": "btree",
- "concurrently": false
+ "with": {}
},
"tool_mcp_gateways_company_name_uq": {
"name": "tool_mcp_gateways_company_name_uq",
@@ -55195,102 +55315,102 @@
}
],
"isUnique": true,
- "with": {},
+ "concurrently": false,
"method": "btree",
- "concurrently": false
+ "with": {}
}
},
"foreignKeys": {
"tool_mcp_gateways_company_id_companies_id_fk": {
"name": "tool_mcp_gateways_company_id_companies_id_fk",
"tableFrom": "tool_mcp_gateways",
+ "tableTo": "companies",
"columnsFrom": [
"company_id"
],
- "tableTo": "companies",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "cascade"
+ "onDelete": "cascade",
+ "onUpdate": "no action"
},
"tool_mcp_gateways_profile_id_tool_profiles_id_fk": {
"name": "tool_mcp_gateways_profile_id_tool_profiles_id_fk",
"tableFrom": "tool_mcp_gateways",
+ "tableTo": "tool_profiles",
"columnsFrom": [
"profile_id"
],
- "tableTo": "tool_profiles",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "restrict"
+ "onDelete": "restrict",
+ "onUpdate": "no action"
},
"tool_mcp_gateways_agent_id_agents_id_fk": {
"name": "tool_mcp_gateways_agent_id_agents_id_fk",
"tableFrom": "tool_mcp_gateways",
+ "tableTo": "agents",
"columnsFrom": [
"agent_id"
],
- "tableTo": "agents",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "set null"
+ "onDelete": "set null",
+ "onUpdate": "no action"
},
"tool_mcp_gateways_project_id_projects_id_fk": {
"name": "tool_mcp_gateways_project_id_projects_id_fk",
"tableFrom": "tool_mcp_gateways",
+ "tableTo": "projects",
"columnsFrom": [
"project_id"
],
- "tableTo": "projects",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "set null"
+ "onDelete": "set null",
+ "onUpdate": "no action"
},
"tool_mcp_gateways_issue_id_issues_id_fk": {
"name": "tool_mcp_gateways_issue_id_issues_id_fk",
"tableFrom": "tool_mcp_gateways",
+ "tableTo": "issues",
"columnsFrom": [
"issue_id"
],
- "tableTo": "issues",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "set null"
+ "onDelete": "set null",
+ "onUpdate": "no action"
},
"tool_mcp_gateways_approval_issue_id_issues_id_fk": {
"name": "tool_mcp_gateways_approval_issue_id_issues_id_fk",
"tableFrom": "tool_mcp_gateways",
+ "tableTo": "issues",
"columnsFrom": [
"approval_issue_id"
],
- "tableTo": "issues",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "set null"
+ "onDelete": "set null",
+ "onUpdate": "no action"
},
"tool_mcp_gateways_created_by_agent_id_agents_id_fk": {
"name": "tool_mcp_gateways_created_by_agent_id_agents_id_fk",
"tableFrom": "tool_mcp_gateways",
+ "tableTo": "agents",
"columnsFrom": [
"created_by_agent_id"
],
- "tableTo": "agents",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "set null"
+ "onDelete": "set null",
+ "onUpdate": "no action"
}
},
"compositePrimaryKeys": {},
@@ -55407,9 +55527,9 @@
}
],
"isUnique": false,
- "with": {},
+ "concurrently": false,
"method": "btree",
- "concurrently": false
+ "with": {}
},
"tool_oauth_states_connection_idx": {
"name": "tool_oauth_states_connection_idx",
@@ -55422,9 +55542,9 @@
}
],
"isUnique": false,
- "with": {},
+ "concurrently": false,
"method": "btree",
- "concurrently": false
+ "with": {}
},
"tool_oauth_states_actor_idx": {
"name": "tool_oauth_states_actor_idx",
@@ -55443,9 +55563,9 @@
}
],
"isUnique": false,
- "with": {},
+ "concurrently": false,
"method": "btree",
- "concurrently": false
+ "with": {}
},
"tool_oauth_states_subject_agent_idx": {
"name": "tool_oauth_states_subject_agent_idx",
@@ -55464,9 +55584,9 @@
}
],
"isUnique": false,
- "with": {},
+ "concurrently": false,
"method": "btree",
- "concurrently": false
+ "with": {}
},
"tool_oauth_states_expires_at_idx": {
"name": "tool_oauth_states_expires_at_idx",
@@ -55479,50 +55599,50 @@
}
],
"isUnique": false,
- "with": {},
+ "concurrently": false,
"method": "btree",
- "concurrently": false
+ "with": {}
}
},
"foreignKeys": {
"tool_oauth_states_company_id_companies_id_fk": {
"name": "tool_oauth_states_company_id_companies_id_fk",
"tableFrom": "tool_oauth_states",
+ "tableTo": "companies",
"columnsFrom": [
"company_id"
],
- "tableTo": "companies",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "cascade"
+ "onDelete": "cascade",
+ "onUpdate": "no action"
},
"tool_oauth_states_connection_id_tool_connections_id_fk": {
"name": "tool_oauth_states_connection_id_tool_connections_id_fk",
"tableFrom": "tool_oauth_states",
+ "tableTo": "tool_connections",
"columnsFrom": [
"connection_id"
],
- "tableTo": "tool_connections",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "cascade"
+ "onDelete": "cascade",
+ "onUpdate": "no action"
},
"tool_oauth_states_subject_agent_id_agents_id_fk": {
"name": "tool_oauth_states_subject_agent_id_agents_id_fk",
"tableFrom": "tool_oauth_states",
+ "tableTo": "agents",
"columnsFrom": [
"subject_agent_id"
],
- "tableTo": "agents",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "cascade"
+ "onDelete": "cascade",
+ "onUpdate": "no action"
}
},
"compositePrimaryKeys": {},
@@ -55644,9 +55764,9 @@
}
],
"isUnique": false,
- "with": {},
+ "concurrently": false,
"method": "btree",
- "concurrently": false
+ "with": {}
},
"tool_policies_company_type_idx": {
"name": "tool_policies_company_type_idx",
@@ -55665,9 +55785,9 @@
}
],
"isUnique": false,
- "with": {},
+ "concurrently": false,
"method": "btree",
- "concurrently": false
+ "with": {}
},
"tool_policies_company_name_uq": {
"name": "tool_policies_company_name_uq",
@@ -55686,37 +55806,37 @@
}
],
"isUnique": true,
- "with": {},
+ "concurrently": false,
"method": "btree",
- "concurrently": false
+ "with": {}
}
},
"foreignKeys": {
"tool_policies_company_id_companies_id_fk": {
"name": "tool_policies_company_id_companies_id_fk",
"tableFrom": "tool_policies",
+ "tableTo": "companies",
"columnsFrom": [
"company_id"
],
- "tableTo": "companies",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "cascade"
+ "onDelete": "cascade",
+ "onUpdate": "no action"
},
"tool_policies_created_by_agent_id_agents_id_fk": {
"name": "tool_policies_created_by_agent_id_agents_id_fk",
"tableFrom": "tool_policies",
+ "tableTo": "agents",
"columnsFrom": [
"created_by_agent_id"
],
- "tableTo": "agents",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "set null"
+ "onDelete": "set null",
+ "onUpdate": "no action"
}
},
"compositePrimaryKeys": {},
@@ -55825,9 +55945,9 @@
}
],
"isUnique": false,
- "with": {},
+ "concurrently": false,
"method": "btree",
- "concurrently": false
+ "with": {}
},
"tool_profile_bindings_target_profile_uq": {
"name": "tool_profile_bindings_target_profile_uq",
@@ -55858,50 +55978,50 @@
}
],
"isUnique": true,
- "with": {},
+ "concurrently": false,
"method": "btree",
- "concurrently": false
+ "with": {}
}
},
"foreignKeys": {
"tool_profile_bindings_company_id_companies_id_fk": {
"name": "tool_profile_bindings_company_id_companies_id_fk",
"tableFrom": "tool_profile_bindings",
+ "tableTo": "companies",
"columnsFrom": [
"company_id"
],
- "tableTo": "companies",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "cascade"
+ "onDelete": "cascade",
+ "onUpdate": "no action"
},
"tool_profile_bindings_profile_id_tool_profiles_id_fk": {
"name": "tool_profile_bindings_profile_id_tool_profiles_id_fk",
"tableFrom": "tool_profile_bindings",
+ "tableTo": "tool_profiles",
"columnsFrom": [
"profile_id"
],
- "tableTo": "tool_profiles",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "cascade"
+ "onDelete": "cascade",
+ "onUpdate": "no action"
},
"tool_profile_bindings_created_by_agent_id_agents_id_fk": {
"name": "tool_profile_bindings_created_by_agent_id_agents_id_fk",
"tableFrom": "tool_profile_bindings",
+ "tableTo": "agents",
"columnsFrom": [
"created_by_agent_id"
],
- "tableTo": "agents",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "set null"
+ "onDelete": "set null",
+ "onUpdate": "no action"
}
},
"compositePrimaryKeys": {},
@@ -56015,9 +56135,9 @@
}
],
"isUnique": false,
- "with": {},
+ "concurrently": false,
"method": "btree",
- "concurrently": false
+ "with": {}
},
"tool_profile_entries_application_idx": {
"name": "tool_profile_entries_application_idx",
@@ -56036,9 +56156,9 @@
}
],
"isUnique": false,
- "with": {},
+ "concurrently": false,
"method": "btree",
- "concurrently": false
+ "with": {}
},
"tool_profile_entries_connection_idx": {
"name": "tool_profile_entries_connection_idx",
@@ -56057,9 +56177,9 @@
}
],
"isUnique": false,
- "with": {},
+ "concurrently": false,
"method": "btree",
- "concurrently": false
+ "with": {}
},
"tool_profile_entries_catalog_entry_idx": {
"name": "tool_profile_entries_catalog_entry_idx",
@@ -56078,76 +56198,76 @@
}
],
"isUnique": false,
- "with": {},
+ "concurrently": false,
"method": "btree",
- "concurrently": false
+ "with": {}
}
},
"foreignKeys": {
"tool_profile_entries_company_id_companies_id_fk": {
"name": "tool_profile_entries_company_id_companies_id_fk",
"tableFrom": "tool_profile_entries",
+ "tableTo": "companies",
"columnsFrom": [
"company_id"
],
- "tableTo": "companies",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "cascade"
+ "onDelete": "cascade",
+ "onUpdate": "no action"
},
"tool_profile_entries_profile_id_tool_profiles_id_fk": {
"name": "tool_profile_entries_profile_id_tool_profiles_id_fk",
"tableFrom": "tool_profile_entries",
+ "tableTo": "tool_profiles",
"columnsFrom": [
"profile_id"
],
- "tableTo": "tool_profiles",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "cascade"
+ "onDelete": "cascade",
+ "onUpdate": "no action"
},
"tool_profile_entries_application_id_tool_applications_id_fk": {
"name": "tool_profile_entries_application_id_tool_applications_id_fk",
"tableFrom": "tool_profile_entries",
+ "tableTo": "tool_applications",
"columnsFrom": [
"application_id"
],
- "tableTo": "tool_applications",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "cascade"
+ "onDelete": "cascade",
+ "onUpdate": "no action"
},
"tool_profile_entries_connection_id_tool_connections_id_fk": {
"name": "tool_profile_entries_connection_id_tool_connections_id_fk",
"tableFrom": "tool_profile_entries",
+ "tableTo": "tool_connections",
"columnsFrom": [
"connection_id"
],
- "tableTo": "tool_connections",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "cascade"
+ "onDelete": "cascade",
+ "onUpdate": "no action"
},
"tool_profile_entries_catalog_entry_id_tool_catalog_entries_id_fk": {
"name": "tool_profile_entries_catalog_entry_id_tool_catalog_entries_id_fk",
"tableFrom": "tool_profile_entries",
+ "tableTo": "tool_catalog_entries",
"columnsFrom": [
"catalog_entry_id"
],
- "tableTo": "tool_catalog_entries",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "cascade"
+ "onDelete": "cascade",
+ "onUpdate": "no action"
}
},
"compositePrimaryKeys": {},
@@ -56251,9 +56371,9 @@
}
],
"isUnique": false,
- "with": {},
+ "concurrently": false,
"method": "btree",
- "concurrently": false
+ "with": {}
},
"tool_profiles_company_key_uq": {
"name": "tool_profiles_company_key_uq",
@@ -56272,9 +56392,9 @@
}
],
"isUnique": true,
- "with": {},
+ "concurrently": false,
"method": "btree",
- "concurrently": false
+ "with": {}
},
"tool_profiles_company_name_uq": {
"name": "tool_profiles_company_name_uq",
@@ -56293,24 +56413,24 @@
}
],
"isUnique": true,
- "with": {},
+ "concurrently": false,
"method": "btree",
- "concurrently": false
+ "with": {}
}
},
"foreignKeys": {
"tool_profiles_company_id_companies_id_fk": {
"name": "tool_profiles_company_id_companies_id_fk",
"tableFrom": "tool_profiles",
+ "tableTo": "companies",
"columnsFrom": [
"company_id"
],
- "tableTo": "companies",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "cascade"
+ "onDelete": "cascade",
+ "onUpdate": "no action"
}
},
"compositePrimaryKeys": {},
@@ -56417,9 +56537,9 @@
}
],
"isUnique": false,
- "with": {},
+ "concurrently": false,
"method": "btree",
- "concurrently": false
+ "with": {}
},
"tool_rate_limit_counters_window_uq": {
"name": "tool_rate_limit_counters_window_uq",
@@ -56456,37 +56576,37 @@
}
],
"isUnique": true,
- "with": {},
+ "concurrently": false,
"method": "btree",
- "concurrently": false
+ "with": {}
}
},
"foreignKeys": {
"tool_rate_limit_counters_company_id_companies_id_fk": {
"name": "tool_rate_limit_counters_company_id_companies_id_fk",
"tableFrom": "tool_rate_limit_counters",
+ "tableTo": "companies",
"columnsFrom": [
"company_id"
],
- "tableTo": "companies",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "cascade"
+ "onDelete": "cascade",
+ "onUpdate": "no action"
},
"tool_rate_limit_counters_policy_id_tool_policies_id_fk": {
"name": "tool_rate_limit_counters_policy_id_tool_policies_id_fk",
"tableFrom": "tool_rate_limit_counters",
+ "tableTo": "tool_policies",
"columnsFrom": [
"policy_id"
],
- "tableTo": "tool_policies",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "cascade"
+ "onDelete": "cascade",
+ "onUpdate": "no action"
}
},
"compositePrimaryKeys": {},
@@ -56570,9 +56690,9 @@
}
],
"isUnique": false,
- "with": {},
+ "concurrently": false,
"method": "btree",
- "concurrently": false
+ "with": {}
},
"tool_runtime_metric_counters_bucket_uq": {
"name": "tool_runtime_metric_counters_bucket_uq",
@@ -56597,24 +56717,24 @@
}
],
"isUnique": true,
- "with": {},
+ "concurrently": false,
"method": "btree",
- "concurrently": false
+ "with": {}
}
},
"foreignKeys": {
"tool_runtime_metric_counters_company_id_companies_id_fk": {
"name": "tool_runtime_metric_counters_company_id_companies_id_fk",
"tableFrom": "tool_runtime_metric_counters",
+ "tableTo": "companies",
"columnsFrom": [
"company_id"
],
- "tableTo": "companies",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "cascade"
+ "onDelete": "cascade",
+ "onUpdate": "no action"
}
},
"compositePrimaryKeys": {},
@@ -56840,9 +56960,9 @@
}
],
"isUnique": false,
- "with": {},
+ "concurrently": false,
"method": "btree",
- "concurrently": false
+ "with": {}
},
"tool_runtime_slots_connection_idx": {
"name": "tool_runtime_slots_connection_idx",
@@ -56855,9 +56975,9 @@
}
],
"isUnique": false,
- "with": {},
+ "concurrently": false,
"method": "btree",
- "concurrently": false
+ "with": {}
},
"tool_runtime_slots_execution_workspace_idx": {
"name": "tool_runtime_slots_execution_workspace_idx",
@@ -56876,9 +56996,9 @@
}
],
"isUnique": false,
- "with": {},
+ "concurrently": false,
"method": "btree",
- "concurrently": false
+ "with": {}
},
"tool_runtime_slots_slot_key_uq": {
"name": "tool_runtime_slots_slot_key_uq",
@@ -56897,89 +57017,89 @@
}
],
"isUnique": true,
- "with": {},
+ "concurrently": false,
"method": "btree",
- "concurrently": false
+ "with": {}
}
},
"foreignKeys": {
"tool_runtime_slots_company_id_companies_id_fk": {
"name": "tool_runtime_slots_company_id_companies_id_fk",
"tableFrom": "tool_runtime_slots",
+ "tableTo": "companies",
"columnsFrom": [
"company_id"
],
- "tableTo": "companies",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "cascade"
+ "onDelete": "cascade",
+ "onUpdate": "no action"
},
"tool_runtime_slots_application_id_tool_applications_id_fk": {
"name": "tool_runtime_slots_application_id_tool_applications_id_fk",
"tableFrom": "tool_runtime_slots",
+ "tableTo": "tool_applications",
"columnsFrom": [
"application_id"
],
- "tableTo": "tool_applications",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "set null"
+ "onDelete": "set null",
+ "onUpdate": "no action"
},
"tool_runtime_slots_connection_id_tool_connections_id_fk": {
"name": "tool_runtime_slots_connection_id_tool_connections_id_fk",
"tableFrom": "tool_runtime_slots",
+ "tableTo": "tool_connections",
"columnsFrom": [
"connection_id"
],
- "tableTo": "tool_connections",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "cascade"
+ "onDelete": "cascade",
+ "onUpdate": "no action"
},
"tool_runtime_slots_project_workspace_id_project_workspaces_id_fk": {
"name": "tool_runtime_slots_project_workspace_id_project_workspaces_id_fk",
"tableFrom": "tool_runtime_slots",
+ "tableTo": "project_workspaces",
"columnsFrom": [
"project_workspace_id"
],
- "tableTo": "project_workspaces",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "set null"
+ "onDelete": "set null",
+ "onUpdate": "no action"
},
"tool_runtime_slots_execution_workspace_id_execution_workspaces_id_fk": {
"name": "tool_runtime_slots_execution_workspace_id_execution_workspaces_id_fk",
"tableFrom": "tool_runtime_slots",
+ "tableTo": "execution_workspaces",
"columnsFrom": [
"execution_workspace_id"
],
- "tableTo": "execution_workspaces",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "set null"
+ "onDelete": "set null",
+ "onUpdate": "no action"
},
"tool_runtime_slots_issue_id_issues_id_fk": {
"name": "tool_runtime_slots_issue_id_issues_id_fk",
"tableFrom": "tool_runtime_slots",
+ "tableTo": "issues",
"columnsFrom": [
"issue_id"
],
- "tableTo": "issues",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "set null"
+ "onDelete": "set null",
+ "onUpdate": "no action"
}
},
"compositePrimaryKeys": {},
@@ -57102,9 +57222,9 @@
}
],
"isUnique": false,
- "with": {},
+ "concurrently": false,
"method": "btree",
- "concurrently": false
+ "with": {}
},
"tool_stdio_command_templates_company_status_idx": {
"name": "tool_stdio_command_templates_company_status_idx",
@@ -57123,9 +57243,9 @@
}
],
"isUnique": false,
- "with": {},
+ "concurrently": false,
"method": "btree",
- "concurrently": false
+ "with": {}
},
"tool_stdio_command_templates_company_key_uq": {
"name": "tool_stdio_command_templates_company_key_uq",
@@ -57144,37 +57264,37 @@
}
],
"isUnique": true,
- "with": {},
+ "concurrently": false,
"method": "btree",
- "concurrently": false
+ "with": {}
}
},
"foreignKeys": {
"tool_stdio_command_templates_company_id_companies_id_fk": {
"name": "tool_stdio_command_templates_company_id_companies_id_fk",
"tableFrom": "tool_stdio_command_templates",
+ "tableTo": "companies",
"columnsFrom": [
"company_id"
],
- "tableTo": "companies",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "cascade"
+ "onDelete": "cascade",
+ "onUpdate": "no action"
},
"tool_stdio_command_templates_created_by_agent_id_agents_id_fk": {
"name": "tool_stdio_command_templates_created_by_agent_id_agents_id_fk",
"tableFrom": "tool_stdio_command_templates",
+ "tableTo": "agents",
"columnsFrom": [
"created_by_agent_id"
],
- "tableTo": "agents",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "set null"
+ "onDelete": "set null",
+ "onUpdate": "no action"
}
},
"compositePrimaryKeys": {},
@@ -57252,9 +57372,9 @@
}
],
"isUnique": true,
- "with": {},
+ "concurrently": false,
"method": "btree",
- "concurrently": false
+ "with": {}
},
"user_company_preferences_primary_agent_idx": {
"name": "user_company_preferences_primary_agent_idx",
@@ -57267,37 +57387,37 @@
}
],
"isUnique": false,
- "with": {},
+ "concurrently": false,
"method": "btree",
- "concurrently": false
+ "with": {}
}
},
"foreignKeys": {
"user_company_preferences_company_id_companies_id_fk": {
"name": "user_company_preferences_company_id_companies_id_fk",
"tableFrom": "user_company_preferences",
+ "tableTo": "companies",
"columnsFrom": [
"company_id"
],
- "tableTo": "companies",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "cascade"
+ "onDelete": "cascade",
+ "onUpdate": "no action"
},
"user_company_preferences_primary_agent_id_agents_id_fk": {
"name": "user_company_preferences_primary_agent_id_agents_id_fk",
"tableFrom": "user_company_preferences",
+ "tableTo": "agents",
"columnsFrom": [
"primary_agent_id"
],
- "tableTo": "agents",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "set null"
+ "onDelete": "set null",
+ "onUpdate": "no action"
}
},
"compositePrimaryKeys": {},
@@ -57376,9 +57496,9 @@
}
],
"isUnique": true,
- "with": {},
+ "concurrently": false,
"method": "btree",
- "concurrently": false
+ "with": {}
},
"user_inbox_agent_policies_allowed_agent_ids_idx": {
"name": "user_inbox_agent_policies_allowed_agent_ids_idx",
@@ -57391,24 +57511,24 @@
}
],
"isUnique": false,
- "with": {},
+ "concurrently": false,
"method": "gin",
- "concurrently": false
+ "with": {}
}
},
"foreignKeys": {
"user_inbox_agent_policies_company_id_companies_id_fk": {
"name": "user_inbox_agent_policies_company_id_companies_id_fk",
"tableFrom": "user_inbox_agent_policies",
+ "tableTo": "companies",
"columnsFrom": [
"company_id"
],
- "tableTo": "companies",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "cascade"
+ "onDelete": "cascade",
+ "onUpdate": "no action"
}
},
"compositePrimaryKeys": {},
@@ -57523,9 +57643,9 @@
}
],
"isUnique": false,
- "with": {},
+ "concurrently": false,
"method": "btree",
- "concurrently": false
+ "with": {}
},
"user_secret_declarations_definition_idx": {
"name": "user_secret_declarations_definition_idx",
@@ -57538,9 +57658,9 @@
}
],
"isUnique": false,
- "with": {},
+ "concurrently": false,
"method": "btree",
- "concurrently": false
+ "with": {}
},
"user_secret_declarations_target_idx": {
"name": "user_secret_declarations_target_idx",
@@ -57565,9 +57685,9 @@
}
],
"isUnique": false,
- "with": {},
+ "concurrently": false,
"method": "btree",
- "concurrently": false
+ "with": {}
},
"user_secret_declarations_company_required_idx": {
"name": "user_secret_declarations_company_required_idx",
@@ -57586,9 +57706,9 @@
}
],
"isUnique": false,
- "with": {},
+ "concurrently": false,
"method": "btree",
- "concurrently": false
+ "with": {}
},
"user_secret_declarations_target_path_uq": {
"name": "user_secret_declarations_target_path_uq",
@@ -57619,9 +57739,9 @@
}
],
"isUnique": true,
- "with": {},
+ "concurrently": false,
"method": "btree",
- "concurrently": false
+ "with": {}
},
"user_secret_declarations_required_override_idx": {
"name": "user_secret_declarations_required_override_idx",
@@ -57640,38 +57760,38 @@
}
],
"isUnique": false,
- "with": {},
- "method": "btree",
"where": "\"user_secret_declarations\".\"allow_missing_override\" = true",
- "concurrently": false
+ "concurrently": false,
+ "method": "btree",
+ "with": {}
}
},
"foreignKeys": {
"user_secret_declarations_company_id_companies_id_fk": {
"name": "user_secret_declarations_company_id_companies_id_fk",
"tableFrom": "user_secret_declarations",
+ "tableTo": "companies",
"columnsFrom": [
"company_id"
],
- "tableTo": "companies",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "cascade"
+ "onDelete": "cascade",
+ "onUpdate": "no action"
},
"user_secret_declarations_user_secret_definition_id_user_secret_definitions_id_fk": {
"name": "user_secret_declarations_user_secret_definition_id_user_secret_definitions_id_fk",
"tableFrom": "user_secret_declarations",
+ "tableTo": "user_secret_definitions",
"columnsFrom": [
"user_secret_definition_id"
],
- "tableTo": "user_secret_definitions",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "cascade"
+ "onDelete": "cascade",
+ "onUpdate": "no action"
}
},
"compositePrimaryKeys": {},
@@ -57817,9 +57937,9 @@
}
],
"isUnique": false,
- "with": {},
+ "concurrently": false,
"method": "btree",
- "concurrently": false
+ "with": {}
},
"user_secret_definitions_company_provider_idx": {
"name": "user_secret_definitions_company_provider_idx",
@@ -57838,9 +57958,9 @@
}
],
"isUnique": false,
- "with": {},
+ "concurrently": false,
"method": "btree",
- "concurrently": false
+ "with": {}
},
"user_secret_definitions_provider_config_idx": {
"name": "user_secret_definitions_provider_config_idx",
@@ -57853,9 +57973,9 @@
}
],
"isUnique": false,
- "with": {},
+ "concurrently": false,
"method": "btree",
- "concurrently": false
+ "with": {}
},
"user_secret_definitions_company_key_uq": {
"name": "user_secret_definitions_company_key_uq",
@@ -57874,64 +57994,64 @@
}
],
"isUnique": true,
- "with": {},
- "method": "btree",
"where": "\"user_secret_definitions\".\"deleted_at\" is null",
- "concurrently": false
+ "concurrently": false,
+ "method": "btree",
+ "with": {}
}
},
"foreignKeys": {
"user_secret_definitions_company_id_companies_id_fk": {
"name": "user_secret_definitions_company_id_companies_id_fk",
"tableFrom": "user_secret_definitions",
+ "tableTo": "companies",
"columnsFrom": [
"company_id"
],
- "tableTo": "companies",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "cascade"
+ "onDelete": "cascade",
+ "onUpdate": "no action"
},
"user_secret_definitions_provider_config_id_company_secret_provider_configs_id_fk": {
"name": "user_secret_definitions_provider_config_id_company_secret_provider_configs_id_fk",
"tableFrom": "user_secret_definitions",
+ "tableTo": "company_secret_provider_configs",
"columnsFrom": [
"provider_config_id"
],
- "tableTo": "company_secret_provider_configs",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "set null"
+ "onDelete": "set null",
+ "onUpdate": "no action"
},
"user_secret_definitions_created_by_agent_id_agents_id_fk": {
"name": "user_secret_definitions_created_by_agent_id_agents_id_fk",
"tableFrom": "user_secret_definitions",
+ "tableTo": "agents",
"columnsFrom": [
"created_by_agent_id"
],
- "tableTo": "agents",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "set null"
+ "onDelete": "set null",
+ "onUpdate": "no action"
},
"user_secret_definitions_updated_by_agent_id_agents_id_fk": {
"name": "user_secret_definitions_updated_by_agent_id_agents_id_fk",
"tableFrom": "user_secret_definitions",
+ "tableTo": "agents",
"columnsFrom": [
"updated_by_agent_id"
],
- "tableTo": "agents",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "set null"
+ "onDelete": "set null",
+ "onUpdate": "no action"
}
},
"compositePrimaryKeys": {},
@@ -57991,9 +58111,9 @@
}
],
"isUnique": true,
- "with": {},
+ "concurrently": false,
"method": "btree",
- "concurrently": false
+ "with": {}
}
},
"foreignKeys": {},
@@ -58148,137 +58268,137 @@
}
],
"isUnique": true,
- "with": {},
+ "concurrently": false,
"method": "btree",
- "concurrently": false
+ "with": {}
}
},
"foreignKeys": {
"work_assessments_company_id_companies_id_fk": {
"name": "work_assessments_company_id_companies_id_fk",
"tableFrom": "work_assessments",
+ "tableTo": "companies",
"columnsFrom": [
"company_id"
],
- "tableTo": "companies",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "no action"
+ "onDelete": "no action",
+ "onUpdate": "no action"
},
"work_assessments_trigger_actor_company_id_companies_id_fk": {
"name": "work_assessments_trigger_actor_company_id_companies_id_fk",
"tableFrom": "work_assessments",
+ "tableTo": "companies",
"columnsFrom": [
"trigger_actor_company_id"
],
- "tableTo": "companies",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "no action"
+ "onDelete": "no action",
+ "onUpdate": "no action"
},
"work_assessments_issue_company_fk": {
"name": "work_assessments_issue_company_fk",
"tableFrom": "work_assessments",
+ "tableTo": "issues",
"columnsFrom": [
"company_id",
"issue_id"
],
- "tableTo": "issues",
"columnsTo": [
"company_id",
"id"
],
- "onUpdate": "no action",
- "onDelete": "no action"
+ "onDelete": "no action",
+ "onUpdate": "no action"
},
"work_assessments_run_owner_fk": {
"name": "work_assessments_run_owner_fk",
"tableFrom": "work_assessments",
+ "tableTo": "heartbeat_runs",
"columnsFrom": [
"company_id",
"issue_id",
"run_id"
],
- "tableTo": "heartbeat_runs",
"columnsTo": [
"company_id",
"native_issue_id",
"id"
],
- "onUpdate": "no action",
- "onDelete": "no action"
+ "onDelete": "no action",
+ "onUpdate": "no action"
},
"work_assessments_contract_owner_fk": {
"name": "work_assessments_contract_owner_fk",
"tableFrom": "work_assessments",
+ "tableTo": "completion_contracts",
"columnsFrom": [
"company_id",
"issue_id",
"contract_id"
],
- "tableTo": "completion_contracts",
"columnsTo": [
"company_id",
"issue_id",
"id"
],
- "onUpdate": "no action",
- "onDelete": "no action"
+ "onDelete": "no action",
+ "onUpdate": "no action"
},
"work_assessments_result_owner_fk": {
"name": "work_assessments_result_owner_fk",
"tableFrom": "work_assessments",
+ "tableTo": "native_run_results",
"columnsFrom": [
"company_id",
"issue_id",
"run_id",
"result_id"
],
- "tableTo": "native_run_results",
"columnsTo": [
"company_id",
"issue_id",
"run_id",
"id"
],
- "onUpdate": "no action",
- "onDelete": "no action"
+ "onDelete": "no action",
+ "onUpdate": "no action"
},
"work_assessments_supersedes_owner_fk": {
"name": "work_assessments_supersedes_owner_fk",
"tableFrom": "work_assessments",
+ "tableTo": "work_assessments",
"columnsFrom": [
"company_id",
"issue_id",
"run_id",
"supersedes_assessment_id"
],
- "tableTo": "work_assessments",
"columnsTo": [
"company_id",
"issue_id",
"run_id",
"id"
],
- "onUpdate": "no action",
- "onDelete": "no action"
+ "onDelete": "no action",
+ "onUpdate": "no action"
}
},
"compositePrimaryKeys": {},
"uniqueConstraints": {
"work_assessments_company_issue_run_id_uq": {
"name": "work_assessments_company_issue_run_id_uq",
+ "nullsNotDistinct": false,
"columns": [
"company_id",
"issue_id",
"run_id",
"id"
- ],
- "nullsNotDistinct": false
+ ]
}
},
"policies": {},
@@ -58457,9 +58577,9 @@
}
],
"isUnique": false,
- "with": {},
+ "concurrently": false,
"method": "btree",
- "concurrently": false
+ "with": {}
},
"workspace_operations_company_workspace_started_idx": {
"name": "workspace_operations_company_workspace_started_idx",
@@ -58484,9 +58604,9 @@
}
],
"isUnique": false,
- "with": {},
+ "concurrently": false,
"method": "btree",
- "concurrently": false
+ "with": {}
},
"workspace_operations_company_workspace_issue_started_idx": {
"name": "workspace_operations_company_workspace_issue_started_idx",
@@ -58517,63 +58637,63 @@
}
],
"isUnique": false,
- "with": {},
+ "concurrently": false,
"method": "btree",
- "concurrently": false
+ "with": {}
}
},
"foreignKeys": {
"workspace_operations_company_id_companies_id_fk": {
"name": "workspace_operations_company_id_companies_id_fk",
"tableFrom": "workspace_operations",
+ "tableTo": "companies",
"columnsFrom": [
"company_id"
],
- "tableTo": "companies",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "cascade"
+ "onDelete": "cascade",
+ "onUpdate": "no action"
},
"workspace_operations_execution_workspace_id_execution_workspaces_id_fk": {
"name": "workspace_operations_execution_workspace_id_execution_workspaces_id_fk",
"tableFrom": "workspace_operations",
+ "tableTo": "execution_workspaces",
"columnsFrom": [
"execution_workspace_id"
],
- "tableTo": "execution_workspaces",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "set null"
+ "onDelete": "set null",
+ "onUpdate": "no action"
},
"workspace_operations_heartbeat_run_id_heartbeat_runs_id_fk": {
"name": "workspace_operations_heartbeat_run_id_heartbeat_runs_id_fk",
"tableFrom": "workspace_operations",
+ "tableTo": "heartbeat_runs",
"columnsFrom": [
"heartbeat_run_id"
],
- "tableTo": "heartbeat_runs",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "set null"
+ "onDelete": "set null",
+ "onUpdate": "no action"
},
"workspace_operations_issue_id_issues_id_fk": {
"name": "workspace_operations_issue_id_issues_id_fk",
"tableFrom": "workspace_operations",
+ "tableTo": "issues",
"columnsFrom": [
"issue_id"
],
- "tableTo": "issues",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "set null"
+ "onDelete": "set null",
+ "onUpdate": "no action"
}
},
"compositePrimaryKeys": {},
@@ -58796,9 +58916,9 @@
}
],
"isUnique": false,
- "with": {},
+ "concurrently": false,
"method": "btree",
- "concurrently": false
+ "with": {}
},
"workspace_runtime_services_company_execution_workspace_status_idx": {
"name": "workspace_runtime_services_company_execution_workspace_status_idx",
@@ -58823,9 +58943,9 @@
}
],
"isUnique": false,
- "with": {},
+ "concurrently": false,
"method": "btree",
- "concurrently": false
+ "with": {}
},
"workspace_runtime_services_company_project_status_idx": {
"name": "workspace_runtime_services_company_project_status_idx",
@@ -58850,9 +58970,9 @@
}
],
"isUnique": false,
- "with": {},
+ "concurrently": false,
"method": "btree",
- "concurrently": false
+ "with": {}
},
"workspace_runtime_services_run_idx": {
"name": "workspace_runtime_services_run_idx",
@@ -58865,9 +58985,9 @@
}
],
"isUnique": false,
- "with": {},
+ "concurrently": false,
"method": "btree",
- "concurrently": false
+ "with": {}
},
"workspace_runtime_services_company_updated_idx": {
"name": "workspace_runtime_services_company_updated_idx",
@@ -58886,102 +59006,102 @@
}
],
"isUnique": false,
- "with": {},
+ "concurrently": false,
"method": "btree",
- "concurrently": false
+ "with": {}
}
},
"foreignKeys": {
"workspace_runtime_services_company_id_companies_id_fk": {
"name": "workspace_runtime_services_company_id_companies_id_fk",
"tableFrom": "workspace_runtime_services",
+ "tableTo": "companies",
"columnsFrom": [
"company_id"
],
- "tableTo": "companies",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "no action"
+ "onDelete": "no action",
+ "onUpdate": "no action"
},
"workspace_runtime_services_project_id_projects_id_fk": {
"name": "workspace_runtime_services_project_id_projects_id_fk",
"tableFrom": "workspace_runtime_services",
+ "tableTo": "projects",
"columnsFrom": [
"project_id"
],
- "tableTo": "projects",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "set null"
+ "onDelete": "set null",
+ "onUpdate": "no action"
},
"workspace_runtime_services_project_workspace_id_project_workspaces_id_fk": {
"name": "workspace_runtime_services_project_workspace_id_project_workspaces_id_fk",
"tableFrom": "workspace_runtime_services",
+ "tableTo": "project_workspaces",
"columnsFrom": [
"project_workspace_id"
],
- "tableTo": "project_workspaces",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "set null"
+ "onDelete": "set null",
+ "onUpdate": "no action"
},
"workspace_runtime_services_execution_workspace_id_execution_workspaces_id_fk": {
"name": "workspace_runtime_services_execution_workspace_id_execution_workspaces_id_fk",
"tableFrom": "workspace_runtime_services",
+ "tableTo": "execution_workspaces",
"columnsFrom": [
"execution_workspace_id"
],
- "tableTo": "execution_workspaces",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "set null"
+ "onDelete": "set null",
+ "onUpdate": "no action"
},
"workspace_runtime_services_issue_id_issues_id_fk": {
"name": "workspace_runtime_services_issue_id_issues_id_fk",
"tableFrom": "workspace_runtime_services",
+ "tableTo": "issues",
"columnsFrom": [
"issue_id"
],
- "tableTo": "issues",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "set null"
+ "onDelete": "set null",
+ "onUpdate": "no action"
},
"workspace_runtime_services_owner_agent_id_agents_id_fk": {
"name": "workspace_runtime_services_owner_agent_id_agents_id_fk",
"tableFrom": "workspace_runtime_services",
+ "tableTo": "agents",
"columnsFrom": [
"owner_agent_id"
],
- "tableTo": "agents",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "set null"
+ "onDelete": "set null",
+ "onUpdate": "no action"
},
"workspace_runtime_services_started_by_run_id_heartbeat_runs_id_fk": {
"name": "workspace_runtime_services_started_by_run_id_heartbeat_runs_id_fk",
"tableFrom": "workspace_runtime_services",
+ "tableTo": "heartbeat_runs",
"columnsFrom": [
"started_by_run_id"
],
- "tableTo": "heartbeat_runs",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "set null"
+ "onDelete": "set null",
+ "onUpdate": "no action"
}
},
"compositePrimaryKeys": {},
@@ -59129,9 +59249,9 @@
}
],
"isUnique": true,
- "with": {},
+ "concurrently": false,
"method": "btree",
- "concurrently": false
+ "with": {}
},
"mcp_attachment_upload_expiry_idx": {
"name": "mcp_attachment_upload_expiry_idx",
@@ -59144,50 +59264,50 @@
}
],
"isUnique": false,
- "with": {},
+ "concurrently": false,
"method": "btree",
- "concurrently": false
+ "with": {}
}
},
"foreignKeys": {
"mcp_attachment_uploads_grant_id_mcp_oauth_grants_id_fk": {
"name": "mcp_attachment_uploads_grant_id_mcp_oauth_grants_id_fk",
"tableFrom": "mcp_attachment_uploads",
+ "tableTo": "mcp_oauth_grants",
"columnsFrom": [
"grant_id"
],
- "tableTo": "mcp_oauth_grants",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "cascade"
+ "onDelete": "cascade",
+ "onUpdate": "no action"
},
"mcp_attachment_uploads_company_id_companies_id_fk": {
"name": "mcp_attachment_uploads_company_id_companies_id_fk",
"tableFrom": "mcp_attachment_uploads",
+ "tableTo": "companies",
"columnsFrom": [
"company_id"
],
- "tableTo": "companies",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "cascade"
+ "onDelete": "cascade",
+ "onUpdate": "no action"
},
"mcp_attachment_uploads_user_id_user_id_fk": {
"name": "mcp_attachment_uploads_user_id_user_id_fk",
"tableFrom": "mcp_attachment_uploads",
+ "tableTo": "user",
"columnsFrom": [
"user_id"
],
- "tableTo": "user",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "cascade"
+ "onDelete": "cascade",
+ "onUpdate": "no action"
}
},
"compositePrimaryKeys": {},
@@ -59263,9 +59383,9 @@
}
],
"isUnique": false,
- "with": {},
+ "concurrently": false,
"method": "btree",
- "concurrently": false
+ "with": {}
},
"mcp_event_admissions_grant_idx": {
"name": "mcp_event_admissions_grant_idx",
@@ -59278,9 +59398,9 @@
}
],
"isUnique": false,
- "with": {},
+ "concurrently": false,
"method": "btree",
- "concurrently": false
+ "with": {}
},
"mcp_event_admissions_company_idx": {
"name": "mcp_event_admissions_company_idx",
@@ -59293,37 +59413,37 @@
}
],
"isUnique": false,
- "with": {},
+ "concurrently": false,
"method": "btree",
- "concurrently": false
+ "with": {}
}
},
"foreignKeys": {
"mcp_event_admissions_company_id_companies_id_fk": {
"name": "mcp_event_admissions_company_id_companies_id_fk",
"tableFrom": "mcp_event_admissions",
+ "tableTo": "companies",
"columnsFrom": [
"company_id"
],
- "tableTo": "companies",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "cascade"
+ "onDelete": "cascade",
+ "onUpdate": "no action"
},
"mcp_event_admissions_grant_id_mcp_oauth_grants_id_fk": {
"name": "mcp_event_admissions_grant_id_mcp_oauth_grants_id_fk",
"tableFrom": "mcp_event_admissions",
+ "tableTo": "mcp_oauth_grants",
"columnsFrom": [
"grant_id"
],
- "tableTo": "mcp_oauth_grants",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "cascade"
+ "onDelete": "cascade",
+ "onUpdate": "no action"
}
},
"compositePrimaryKeys": {},
@@ -59412,9 +59532,9 @@
}
],
"isUnique": true,
- "with": {},
+ "concurrently": false,
"method": "btree",
- "concurrently": false
+ "with": {}
},
"mcp_event_deliveries_activity_uq": {
"name": "mcp_event_deliveries_activity_uq",
@@ -59433,9 +59553,9 @@
}
],
"isUnique": true,
- "with": {},
+ "concurrently": false,
"method": "btree",
- "concurrently": false
+ "with": {}
},
"mcp_event_deliveries_due_idx": {
"name": "mcp_event_deliveries_due_idx",
@@ -59448,24 +59568,24 @@
}
],
"isUnique": false,
- "with": {},
+ "concurrently": false,
"method": "btree",
- "concurrently": false
+ "with": {}
}
},
"foreignKeys": {
"mcp_event_deliveries_subscription_id_mcp_event_subscriptions_id_fk": {
"name": "mcp_event_deliveries_subscription_id_mcp_event_subscriptions_id_fk",
"tableFrom": "mcp_event_deliveries",
+ "tableTo": "mcp_event_subscriptions",
"columnsFrom": [
"subscription_id"
],
- "tableTo": "mcp_event_subscriptions",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "cascade"
+ "onDelete": "cascade",
+ "onUpdate": "no action"
}
},
"compositePrimaryKeys": {},
@@ -59576,9 +59696,9 @@
}
],
"isUnique": false,
- "with": {},
+ "concurrently": false,
"method": "btree",
- "concurrently": false
+ "with": {}
},
"mcp_event_subscriptions_company_idx": {
"name": "mcp_event_subscriptions_company_idx",
@@ -59591,37 +59711,37 @@
}
],
"isUnique": false,
- "with": {},
+ "concurrently": false,
"method": "btree",
- "concurrently": false
+ "with": {}
}
},
"foreignKeys": {
"mcp_event_subscriptions_company_id_companies_id_fk": {
"name": "mcp_event_subscriptions_company_id_companies_id_fk",
"tableFrom": "mcp_event_subscriptions",
+ "tableTo": "companies",
"columnsFrom": [
"company_id"
],
- "tableTo": "companies",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "cascade"
+ "onDelete": "cascade",
+ "onUpdate": "no action"
},
"mcp_event_subscriptions_grant_id_mcp_oauth_grants_id_fk": {
"name": "mcp_event_subscriptions_grant_id_mcp_oauth_grants_id_fk",
"tableFrom": "mcp_event_subscriptions",
+ "tableTo": "mcp_oauth_grants",
"columnsFrom": [
"grant_id"
],
- "tableTo": "mcp_oauth_grants",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "cascade"
+ "onDelete": "cascade",
+ "onUpdate": "no action"
}
},
"compositePrimaryKeys": {},
@@ -59701,9 +59821,9 @@
}
],
"isUnique": false,
- "with": {},
+ "concurrently": false,
"method": "btree",
- "concurrently": false
+ "with": {}
},
"mcp_file_ticket_grant_idx": {
"name": "mcp_file_ticket_grant_idx",
@@ -59716,50 +59836,50 @@
}
],
"isUnique": false,
- "with": {},
+ "concurrently": false,
"method": "btree",
- "concurrently": false
+ "with": {}
}
},
"foreignKeys": {
"mcp_file_tickets_company_id_companies_id_fk": {
"name": "mcp_file_tickets_company_id_companies_id_fk",
"tableFrom": "mcp_file_tickets",
+ "tableTo": "companies",
"columnsFrom": [
"company_id"
],
- "tableTo": "companies",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "cascade"
+ "onDelete": "cascade",
+ "onUpdate": "no action"
},
"mcp_file_tickets_grant_id_mcp_oauth_grants_id_fk": {
"name": "mcp_file_tickets_grant_id_mcp_oauth_grants_id_fk",
"tableFrom": "mcp_file_tickets",
+ "tableTo": "mcp_oauth_grants",
"columnsFrom": [
"grant_id"
],
- "tableTo": "mcp_oauth_grants",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "cascade"
+ "onDelete": "cascade",
+ "onUpdate": "no action"
},
"mcp_file_tickets_upload_id_mcp_attachment_uploads_id_fk": {
"name": "mcp_file_tickets_upload_id_mcp_attachment_uploads_id_fk",
"tableFrom": "mcp_file_tickets",
+ "tableTo": "mcp_attachment_uploads",
"columnsFrom": [
"upload_id"
],
- "tableTo": "mcp_attachment_uploads",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "cascade"
+ "onDelete": "cascade",
+ "onUpdate": "no action"
}
},
"compositePrimaryKeys": {},
@@ -59866,9 +59986,9 @@
}
],
"isUnique": true,
- "with": {},
+ "concurrently": false,
"method": "btree",
- "concurrently": false
+ "with": {}
},
"mcp_mutation_receipts_company_idx": {
"name": "mcp_mutation_receipts_company_idx",
@@ -59881,50 +60001,50 @@
}
],
"isUnique": false,
- "with": {},
+ "concurrently": false,
"method": "btree",
- "concurrently": false
+ "with": {}
}
},
"foreignKeys": {
"mcp_mutation_receipts_company_id_companies_id_fk": {
"name": "mcp_mutation_receipts_company_id_companies_id_fk",
"tableFrom": "mcp_mutation_receipts",
+ "tableTo": "companies",
"columnsFrom": [
"company_id"
],
- "tableTo": "companies",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "cascade"
+ "onDelete": "cascade",
+ "onUpdate": "no action"
},
"mcp_mutation_receipts_user_id_user_id_fk": {
"name": "mcp_mutation_receipts_user_id_user_id_fk",
"tableFrom": "mcp_mutation_receipts",
+ "tableTo": "user",
"columnsFrom": [
"user_id"
],
- "tableTo": "user",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "cascade"
+ "onDelete": "cascade",
+ "onUpdate": "no action"
},
"mcp_mutation_receipts_grant_id_mcp_oauth_grants_id_fk": {
"name": "mcp_mutation_receipts_grant_id_mcp_oauth_grants_id_fk",
"tableFrom": "mcp_mutation_receipts",
+ "tableTo": "mcp_oauth_grants",
"columnsFrom": [
"grant_id"
],
- "tableTo": "mcp_oauth_grants",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "cascade"
+ "onDelete": "cascade",
+ "onUpdate": "no action"
}
},
"compositePrimaryKeys": {},
@@ -60090,9 +60210,9 @@
}
],
"isUnique": true,
- "with": {},
+ "concurrently": false,
"method": "btree",
- "concurrently": false
+ "with": {}
},
"mcp_oauth_user_code_uq": {
"name": "mcp_oauth_user_code_uq",
@@ -60105,9 +60225,9 @@
}
],
"isUnique": true,
- "with": {},
+ "concurrently": false,
"method": "btree",
- "concurrently": false
+ "with": {}
},
"mcp_oauth_device_expiry_idx": {
"name": "mcp_oauth_device_expiry_idx",
@@ -60120,37 +60240,37 @@
}
],
"isUnique": false,
- "with": {},
+ "concurrently": false,
"method": "btree",
- "concurrently": false
+ "with": {}
}
},
"foreignKeys": {
"mcp_oauth_device_requests_client_id_mcp_oauth_clients_id_fk": {
"name": "mcp_oauth_device_requests_client_id_mcp_oauth_clients_id_fk",
"tableFrom": "mcp_oauth_device_requests",
+ "tableTo": "mcp_oauth_clients",
"columnsFrom": [
"client_id"
],
- "tableTo": "mcp_oauth_clients",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "cascade"
+ "onDelete": "cascade",
+ "onUpdate": "no action"
},
"mcp_oauth_device_requests_grant_id_mcp_oauth_grants_id_fk": {
"name": "mcp_oauth_device_requests_grant_id_mcp_oauth_grants_id_fk",
"tableFrom": "mcp_oauth_device_requests",
+ "tableTo": "mcp_oauth_grants",
"columnsFrom": [
"grant_id"
],
- "tableTo": "mcp_oauth_grants",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "cascade"
+ "onDelete": "cascade",
+ "onUpdate": "no action"
}
},
"compositePrimaryKeys": {},
@@ -60245,63 +60365,63 @@
}
],
"isUnique": false,
- "with": {},
+ "concurrently": false,
"method": "btree",
- "concurrently": false
+ "with": {}
}
},
"foreignKeys": {
"mcp_oauth_grants_company_id_companies_id_fk": {
"name": "mcp_oauth_grants_company_id_companies_id_fk",
"tableFrom": "mcp_oauth_grants",
+ "tableTo": "companies",
"columnsFrom": [
"company_id"
],
- "tableTo": "companies",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "cascade"
+ "onDelete": "cascade",
+ "onUpdate": "no action"
},
"mcp_oauth_grants_user_id_user_id_fk": {
"name": "mcp_oauth_grants_user_id_user_id_fk",
"tableFrom": "mcp_oauth_grants",
+ "tableTo": "user",
"columnsFrom": [
"user_id"
],
- "tableTo": "user",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "cascade"
+ "onDelete": "cascade",
+ "onUpdate": "no action"
},
"mcp_oauth_grants_client_id_mcp_oauth_clients_id_fk": {
"name": "mcp_oauth_grants_client_id_mcp_oauth_clients_id_fk",
"tableFrom": "mcp_oauth_grants",
+ "tableTo": "mcp_oauth_clients",
"columnsFrom": [
"client_id"
],
- "tableTo": "mcp_oauth_clients",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "cascade"
+ "onDelete": "cascade",
+ "onUpdate": "no action"
},
"mcp_oauth_grants_agent_id_agents_id_fk": {
"name": "mcp_oauth_grants_agent_id_agents_id_fk",
"tableFrom": "mcp_oauth_grants",
+ "tableTo": "agents",
"columnsFrom": [
"agent_id"
],
- "tableTo": "agents",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "cascade"
+ "onDelete": "cascade",
+ "onUpdate": "no action"
}
},
"compositePrimaryKeys": {},
@@ -60346,9 +60466,9 @@
}
],
"isUnique": false,
- "with": {},
+ "concurrently": false,
"method": "btree",
- "concurrently": false
+ "with": {}
}
},
"foreignKeys": {},
@@ -60460,9 +60580,9 @@
}
],
"isUnique": true,
- "with": {},
+ "concurrently": false,
"method": "btree",
- "concurrently": false
+ "with": {}
},
"mcp_oauth_requests_expiry_idx": {
"name": "mcp_oauth_requests_expiry_idx",
@@ -60475,37 +60595,37 @@
}
],
"isUnique": false,
- "with": {},
+ "concurrently": false,
"method": "btree",
- "concurrently": false
+ "with": {}
}
},
"foreignKeys": {
"mcp_oauth_requests_client_id_mcp_oauth_clients_id_fk": {
"name": "mcp_oauth_requests_client_id_mcp_oauth_clients_id_fk",
"tableFrom": "mcp_oauth_requests",
+ "tableTo": "mcp_oauth_clients",
"columnsFrom": [
"client_id"
],
- "tableTo": "mcp_oauth_clients",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "cascade"
+ "onDelete": "cascade",
+ "onUpdate": "no action"
},
"mcp_oauth_requests_grant_id_mcp_oauth_grants_id_fk": {
"name": "mcp_oauth_requests_grant_id_mcp_oauth_grants_id_fk",
"tableFrom": "mcp_oauth_requests",
+ "tableTo": "mcp_oauth_grants",
"columnsFrom": [
"grant_id"
],
- "tableTo": "mcp_oauth_grants",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "cascade"
+ "onDelete": "cascade",
+ "onUpdate": "no action"
}
},
"compositePrimaryKeys": {},
@@ -60575,9 +60695,9 @@
}
],
"isUnique": true,
- "with": {},
+ "concurrently": false,
"method": "btree",
- "concurrently": false
+ "with": {}
},
"mcp_oauth_tokens_grant_idx": {
"name": "mcp_oauth_tokens_grant_idx",
@@ -60590,9 +60710,9 @@
}
],
"isUnique": false,
- "with": {},
+ "concurrently": false,
"method": "btree",
- "concurrently": false
+ "with": {}
},
"mcp_oauth_tokens_expiry_idx": {
"name": "mcp_oauth_tokens_expiry_idx",
@@ -60605,24 +60725,24 @@
}
],
"isUnique": false,
- "with": {},
+ "concurrently": false,
"method": "btree",
- "concurrently": false
+ "with": {}
}
},
"foreignKeys": {
"mcp_oauth_tokens_grant_id_mcp_oauth_grants_id_fk": {
"name": "mcp_oauth_tokens_grant_id_mcp_oauth_grants_id_fk",
"tableFrom": "mcp_oauth_tokens",
+ "tableTo": "mcp_oauth_grants",
"columnsFrom": [
"grant_id"
],
- "tableTo": "mcp_oauth_grants",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "cascade"
+ "onDelete": "cascade",
+ "onUpdate": "no action"
}
},
"compositePrimaryKeys": {},
@@ -60755,9 +60875,9 @@
}
],
"isUnique": true,
- "with": {},
+ "concurrently": false,
"method": "btree",
- "concurrently": false
+ "with": {}
},
"external_holds_agent_idx": {
"name": "external_holds_agent_idx",
@@ -60776,37 +60896,37 @@
}
],
"isUnique": false,
- "with": {},
+ "concurrently": false,
"method": "btree",
- "concurrently": false
+ "with": {}
}
},
"foreignKeys": {
"external_agent_holds_company_id_companies_id_fk": {
"name": "external_agent_holds_company_id_companies_id_fk",
"tableFrom": "external_agent_holds",
+ "tableTo": "companies",
"columnsFrom": [
"company_id"
],
- "tableTo": "companies",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "cascade"
+ "onDelete": "cascade",
+ "onUpdate": "no action"
},
"external_agent_holds_agent_id_agents_id_fk": {
"name": "external_agent_holds_agent_id_agents_id_fk",
"tableFrom": "external_agent_holds",
+ "tableTo": "agents",
"columnsFrom": [
"agent_id"
],
- "tableTo": "agents",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "cascade"
+ "onDelete": "cascade",
+ "onUpdate": "no action"
}
},
"compositePrimaryKeys": {},
@@ -61019,10 +61139,10 @@
}
],
"isUnique": true,
- "with": {},
- "method": "btree",
"where": "\"muse_agent_bindings\".\"revoked_at\" IS NULL",
- "concurrently": false
+ "concurrently": false,
+ "method": "btree",
+ "with": {}
},
"muse_bindings_ticket_uq": {
"name": "muse_bindings_ticket_uq",
@@ -61035,9 +61155,9 @@
}
],
"isUnique": true,
- "with": {},
+ "concurrently": false,
"method": "btree",
- "concurrently": false
+ "with": {}
},
"muse_bindings_active_grant_uq": {
"name": "muse_bindings_active_grant_uq",
@@ -61050,51 +61170,51 @@
}
],
"isUnique": true,
- "with": {},
- "method": "btree",
"where": "\"muse_agent_bindings\".\"revoked_at\" IS NULL AND \"muse_agent_bindings\".\"grant_id\" IS NOT NULL",
- "concurrently": false
+ "concurrently": false,
+ "method": "btree",
+ "with": {}
}
},
"foreignKeys": {
"muse_agent_bindings_company_id_companies_id_fk": {
"name": "muse_agent_bindings_company_id_companies_id_fk",
"tableFrom": "muse_agent_bindings",
+ "tableTo": "companies",
"columnsFrom": [
"company_id"
],
- "tableTo": "companies",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "cascade"
+ "onDelete": "cascade",
+ "onUpdate": "no action"
},
"muse_agent_bindings_agent_id_agents_id_fk": {
"name": "muse_agent_bindings_agent_id_agents_id_fk",
"tableFrom": "muse_agent_bindings",
+ "tableTo": "agents",
"columnsFrom": [
"agent_id"
],
- "tableTo": "agents",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "cascade"
+ "onDelete": "cascade",
+ "onUpdate": "no action"
},
"muse_agent_bindings_grant_id_mcp_oauth_grants_id_fk": {
"name": "muse_agent_bindings_grant_id_mcp_oauth_grants_id_fk",
"tableFrom": "muse_agent_bindings",
+ "tableTo": "mcp_oauth_grants",
"columnsFrom": [
"grant_id"
],
- "tableTo": "mcp_oauth_grants",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "set null"
+ "onDelete": "set null",
+ "onUpdate": "no action"
}
},
"compositePrimaryKeys": {},
@@ -61188,9 +61308,9 @@
}
],
"isUnique": true,
- "with": {},
+ "concurrently": false,
"method": "btree",
- "concurrently": false
+ "with": {}
},
"muse_credentials_binding_idx": {
"name": "muse_credentials_binding_idx",
@@ -61209,37 +61329,37 @@
}
],
"isUnique": false,
- "with": {},
+ "concurrently": false,
"method": "btree",
- "concurrently": false
+ "with": {}
}
},
"foreignKeys": {
"muse_credentials_company_id_companies_id_fk": {
"name": "muse_credentials_company_id_companies_id_fk",
"tableFrom": "muse_credentials",
+ "tableTo": "companies",
"columnsFrom": [
"company_id"
],
- "tableTo": "companies",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "cascade"
+ "onDelete": "cascade",
+ "onUpdate": "no action"
},
"muse_credentials_binding_id_muse_agent_bindings_id_fk": {
"name": "muse_credentials_binding_id_muse_agent_bindings_id_fk",
"tableFrom": "muse_credentials",
+ "tableTo": "muse_agent_bindings",
"columnsFrom": [
"binding_id"
],
- "tableTo": "muse_agent_bindings",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "cascade"
+ "onDelete": "cascade",
+ "onUpdate": "no action"
}
},
"compositePrimaryKeys": {},
@@ -61327,37 +61447,37 @@
}
],
"isUnique": true,
- "with": {},
+ "concurrently": false,
"method": "btree",
- "concurrently": false
+ "with": {}
}
},
"foreignKeys": {
"muse_idle_receipts_company_id_companies_id_fk": {
"name": "muse_idle_receipts_company_id_companies_id_fk",
"tableFrom": "muse_idle_receipts",
+ "tableTo": "companies",
"columnsFrom": [
"company_id"
],
- "tableTo": "companies",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "cascade"
+ "onDelete": "cascade",
+ "onUpdate": "no action"
},
"muse_idle_receipts_binding_id_muse_agent_bindings_id_fk": {
"name": "muse_idle_receipts_binding_id_muse_agent_bindings_id_fk",
"tableFrom": "muse_idle_receipts",
+ "tableTo": "muse_agent_bindings",
"columnsFrom": [
"binding_id"
],
- "tableTo": "muse_agent_bindings",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "cascade"
+ "onDelete": "cascade",
+ "onUpdate": "no action"
}
},
"compositePrimaryKeys": {},
@@ -61457,9 +61577,9 @@
}
],
"isUnique": true,
- "with": {},
+ "concurrently": false,
"method": "btree",
- "concurrently": false
+ "with": {}
},
"muse_input_source_uq": {
"name": "muse_input_source_uq",
@@ -61478,37 +61598,37 @@
}
],
"isUnique": true,
- "with": {},
+ "concurrently": false,
"method": "btree",
- "concurrently": false
+ "with": {}
}
},
"foreignKeys": {
"muse_input_deliveries_company_id_companies_id_fk": {
"name": "muse_input_deliveries_company_id_companies_id_fk",
"tableFrom": "muse_input_deliveries",
+ "tableTo": "companies",
"columnsFrom": [
"company_id"
],
- "tableTo": "companies",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "cascade"
+ "onDelete": "cascade",
+ "onUpdate": "no action"
},
"muse_input_deliveries_assignment_id_muse_runner_assignments_id_fk": {
"name": "muse_input_deliveries_assignment_id_muse_runner_assignments_id_fk",
"tableFrom": "muse_input_deliveries",
+ "tableTo": "muse_runner_assignments",
"columnsFrom": [
"assignment_id"
],
- "tableTo": "muse_runner_assignments",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "cascade"
+ "onDelete": "cascade",
+ "onUpdate": "no action"
}
},
"compositePrimaryKeys": {},
@@ -61614,9 +61734,9 @@
}
],
"isUnique": true,
- "with": {},
+ "concurrently": false,
"method": "btree",
- "concurrently": false
+ "with": {}
},
"muse_mailbox_cursor_idx": {
"name": "muse_mailbox_cursor_idx",
@@ -61641,50 +61761,50 @@
}
],
"isUnique": false,
- "with": {},
+ "concurrently": false,
"method": "btree",
- "concurrently": false
+ "with": {}
}
},
"foreignKeys": {
"muse_mailbox_items_company_id_companies_id_fk": {
"name": "muse_mailbox_items_company_id_companies_id_fk",
"tableFrom": "muse_mailbox_items",
+ "tableTo": "companies",
"columnsFrom": [
"company_id"
],
- "tableTo": "companies",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "cascade"
+ "onDelete": "cascade",
+ "onUpdate": "no action"
},
"muse_mailbox_items_binding_id_muse_agent_bindings_id_fk": {
"name": "muse_mailbox_items_binding_id_muse_agent_bindings_id_fk",
"tableFrom": "muse_mailbox_items",
+ "tableTo": "muse_agent_bindings",
"columnsFrom": [
"binding_id"
],
- "tableTo": "muse_agent_bindings",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "cascade"
+ "onDelete": "cascade",
+ "onUpdate": "no action"
},
"muse_mailbox_items_assignment_id_muse_runner_assignments_id_fk": {
"name": "muse_mailbox_items_assignment_id_muse_runner_assignments_id_fk",
"tableFrom": "muse_mailbox_items",
+ "tableTo": "muse_runner_assignments",
"columnsFrom": [
"assignment_id"
],
- "tableTo": "muse_runner_assignments",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "cascade"
+ "onDelete": "cascade",
+ "onUpdate": "no action"
}
},
"compositePrimaryKeys": {},
@@ -61816,37 +61936,37 @@
}
],
"isUnique": true,
- "with": {},
+ "concurrently": false,
"method": "btree",
- "concurrently": false
+ "with": {}
}
},
"foreignKeys": {
"muse_receiver_contact_buckets_company_id_companies_id_fk": {
"name": "muse_receiver_contact_buckets_company_id_companies_id_fk",
"tableFrom": "muse_receiver_contact_buckets",
+ "tableTo": "companies",
"columnsFrom": [
"company_id"
],
- "tableTo": "companies",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "cascade"
+ "onDelete": "cascade",
+ "onUpdate": "no action"
},
"muse_receiver_contact_buckets_binding_id_muse_agent_bindings_id_fk": {
"name": "muse_receiver_contact_buckets_binding_id_muse_agent_bindings_id_fk",
"tableFrom": "muse_receiver_contact_buckets",
+ "tableTo": "muse_agent_bindings",
"columnsFrom": [
"binding_id"
],
- "tableTo": "muse_agent_bindings",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "cascade"
+ "onDelete": "cascade",
+ "onUpdate": "no action"
}
},
"compositePrimaryKeys": {},
@@ -62015,9 +62135,9 @@
}
],
"isUnique": true,
- "with": {},
+ "concurrently": false,
"method": "btree",
- "concurrently": false
+ "with": {}
},
"muse_assignments_live_binding_uq": {
"name": "muse_assignments_live_binding_uq",
@@ -62030,10 +62150,10 @@
}
],
"isUnique": true,
- "with": {},
- "method": "btree",
"where": "\"muse_runner_assignments\".\"status\" IN ('offered','claimed','accepted')",
- "concurrently": false
+ "concurrently": false,
+ "method": "btree",
+ "with": {}
},
"muse_assignments_company_idx": {
"name": "muse_assignments_company_idx",
@@ -62046,63 +62166,63 @@
}
],
"isUnique": false,
- "with": {},
+ "concurrently": false,
"method": "btree",
- "concurrently": false
+ "with": {}
}
},
"foreignKeys": {
"muse_runner_assignments_company_id_companies_id_fk": {
"name": "muse_runner_assignments_company_id_companies_id_fk",
"tableFrom": "muse_runner_assignments",
+ "tableTo": "companies",
"columnsFrom": [
"company_id"
],
- "tableTo": "companies",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "cascade"
+ "onDelete": "cascade",
+ "onUpdate": "no action"
},
"muse_runner_assignments_binding_id_muse_agent_bindings_id_fk": {
"name": "muse_runner_assignments_binding_id_muse_agent_bindings_id_fk",
"tableFrom": "muse_runner_assignments",
+ "tableTo": "muse_agent_bindings",
"columnsFrom": [
"binding_id"
],
- "tableTo": "muse_agent_bindings",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "cascade"
+ "onDelete": "cascade",
+ "onUpdate": "no action"
},
"muse_runner_assignments_run_id_heartbeat_runs_id_fk": {
"name": "muse_runner_assignments_run_id_heartbeat_runs_id_fk",
"tableFrom": "muse_runner_assignments",
+ "tableTo": "heartbeat_runs",
"columnsFrom": [
"run_id"
],
- "tableTo": "heartbeat_runs",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "cascade"
+ "onDelete": "cascade",
+ "onUpdate": "no action"
},
"muse_runner_assignments_agent_id_agents_id_fk": {
"name": "muse_runner_assignments_agent_id_agents_id_fk",
"tableFrom": "muse_runner_assignments",
+ "tableTo": "agents",
"columnsFrom": [
"agent_id"
],
- "tableTo": "agents",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "cascade"
+ "onDelete": "cascade",
+ "onUpdate": "no action"
}
},
"compositePrimaryKeys": {},
@@ -62210,37 +62330,37 @@
}
],
"isUnique": true,
- "with": {},
+ "concurrently": false,
"method": "btree",
- "concurrently": false
+ "with": {}
}
},
"foreignKeys": {
"muse_runner_operations_company_id_companies_id_fk": {
"name": "muse_runner_operations_company_id_companies_id_fk",
"tableFrom": "muse_runner_operations",
+ "tableTo": "companies",
"columnsFrom": [
"company_id"
],
- "tableTo": "companies",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "cascade"
+ "onDelete": "cascade",
+ "onUpdate": "no action"
},
"muse_runner_operations_assignment_id_muse_runner_assignments_id_fk": {
"name": "muse_runner_operations_assignment_id_muse_runner_assignments_id_fk",
"tableFrom": "muse_runner_operations",
+ "tableTo": "muse_runner_assignments",
"columnsFrom": [
"assignment_id"
],
- "tableTo": "muse_runner_assignments",
"columnsTo": [
"id"
],
- "onUpdate": "no action",
- "onDelete": "cascade"
+ "onDelete": "cascade",
+ "onUpdate": "no action"
}
},
"compositePrimaryKeys": {},
@@ -62252,21 +62372,21 @@
},
"enums": {},
"schemas": {},
- "views": {},
"sequences": {
"public.chat_telegram_draft_ids": {
"name": "chat_telegram_draft_ids",
+ "schema": "public",
"increment": "1",
+ "startWith": "1",
"minValue": "1",
"maxValue": "2147483647",
- "startWith": "1",
"cache": "1",
- "cycle": false,
- "schema": "public"
+ "cycle": false
}
},
"roles": {},
"policies": {},
+ "views": {},
"_meta": {
"columns": {},
"schemas": {},
diff --git a/packages/db/src/migrations/meta/_journal.json b/packages/db/src/migrations/meta/_journal.json
index 168e812864..c9d6ea3c74 100644
--- a/packages/db/src/migrations/meta/_journal.json
+++ b/packages/db/src/migrations/meta/_journal.json
@@ -2514,6 +2514,13 @@
"when": 1792447934421,
"tag": "0360_retained_workspace_recovery_index",
"breakpoints": true
+ },
+ {
+ "idx": 361,
+ "version": "7",
+ "when": 1792494929768,
+ "tag": "0361_mighty_dracula",
+ "breakpoints": true
}
]
-}
+}
\ No newline at end of file
diff --git a/packages/db/src/schema/ai_connection_defaults.ts b/packages/db/src/schema/ai_connection_defaults.ts
index 4b2c5c7b2c..0d5710e66e 100644
--- a/packages/db/src/schema/ai_connection_defaults.ts
+++ b/packages/db/src/schema/ai_connection_defaults.ts
@@ -42,7 +42,7 @@ export const aiConnectionDefaults = pgTable(
}),
check(
"ai_connection_defaults_provider_check",
- sql`${t.provider} in ('anthropic','openai','openrouter','xai','google')`,
+ sql`${t.provider} in ('anthropic','openai','openrouter','xai','google','github')`,
),
check(
"ai_connection_defaults_method_check",
diff --git a/packages/db/src/schema/ai_provider_defaults.ts b/packages/db/src/schema/ai_provider_defaults.ts
index b73dbff1cc..ba209c3879 100644
--- a/packages/db/src/schema/ai_provider_defaults.ts
+++ b/packages/db/src/schema/ai_provider_defaults.ts
@@ -16,5 +16,5 @@ export const aiProviderDefaults = pgTable("ai_provider_defaults", {
}, (t) => [
uniqueIndex("ai_provider_defaults_owner_provider_uq").on(t.companyId, t.userId, t.provider),
foreignKey({ columns: [t.companyId, t.grantId], foreignColumns: [connectionGrants.companyId, connectionGrants.id], name: "ai_provider_defaults_company_grant_fk" }),
- check("ai_provider_defaults_provider_check", sql`${t.provider} in ('anthropic','openai','openrouter','xai','google')`),
+ check("ai_provider_defaults_provider_check", sql`${t.provider} in ('anthropic','openai','openrouter','xai','google','github')`),
]);
diff --git a/packages/shared/src/ai-connections.ts b/packages/shared/src/ai-connections.ts
index af03d39a8d..5d3097bb5d 100644
--- a/packages/shared/src/ai-connections.ts
+++ b/packages/shared/src/ai-connections.ts
@@ -32,6 +32,7 @@ export const AI_PROVIDERS = [
"openai",
"openrouter",
"xai",
+ "github",
"google",
] as const;
export const aiProviderSchema = z.enum(AI_PROVIDERS);
@@ -79,6 +80,10 @@ export const AI_CONNECTION_CAPABILITIES: Record<
>;
}
> = {
+ github: {
+ name: "GitHub Copilot",
+ methods: { api_key: { adapters: ["copilot_runtime"], envKey: "COPILOT_GITHUB_TOKEN" } },
+ },
google: { name: "Google", methods: { api_key: { adapters: ["gemini_local"], envKey: "GEMINI_API_KEY" } } },
anthropic: {
name: "Claude",
@@ -123,7 +128,7 @@ export function isAiConnectionCompatible(
// A fixed binding contains identity only. The service checks authoritative
// connection metadata before resolving credentials or running the harness.
if ("mode" in requirement && requirement.mode !== "responsible_user" && requirement.method === "api_key")
- return ["claude_local", "codex_local", "opencode_local", "hermes_local", "gemini_local", "grok_local"].includes(adapterType);
+ return ["claude_local", "codex_local", "opencode_local", "hermes_local", "gemini_local", "grok_local", "copilot_runtime"].includes(adapterType);
const methods = AI_CONNECTION_CAPABILITIES[requirement.provider].methods;
const candidates = "mode" in requirement && requirement.mode === "responsible_user"
? Object.values(methods)
@@ -187,6 +192,7 @@ export const createAiConnectionSchema = z
ownership: z.enum(["personal", "shared"]),
routing: aiProviderRoutingSchema.optional(),
apiKey: z.string().trim().min(1).max(32768).optional(),
+ environmentId: z.string().uuid().nullable().optional(),
loginSessionId: z.string().max(128).optional(),
connectionId: z.string().uuid().optional(),
agentIds: z.array(z.string().uuid()).max(1000).default([]),
diff --git a/packages/shared/src/ai-provider-routing.ts b/packages/shared/src/ai-provider-routing.ts
index 79bdc28fbd..ae508d4fff 100644
--- a/packages/shared/src/ai-provider-routing.ts
+++ b/packages/shared/src/ai-provider-routing.ts
@@ -81,6 +81,7 @@ export function aiRoutingHarness(
acpxAgent?: unknown,
): string {
if (adapter !== "paperclip_runner") return adapter;
+ if (provider === "acpx" && acpxAgent === "copilot") return "copilot_runtime";
const runner =
provider === "acpx" && (acpxAgent === "claude" || acpxAgent === "grok")
? acpxAgent
diff --git a/packages/shared/src/app-definitions.test.ts b/packages/shared/src/app-definitions.test.ts
index 50cf0b0e57..a7c6bf0cc7 100644
--- a/packages/shared/src/app-definitions.test.ts
+++ b/packages/shared/src/app-definitions.test.ts
@@ -310,8 +310,9 @@ describe("AppDefinition catalog", () => {
it("separates GitHub tools from the review bot without changing the provider identity", () => {
const github = getConnectableAppDefinition("github")!;
const bot = getConnectableAppDefinition("github-code-review-bot")!;
- expect(github.methods.map((method) => method.key)).toEqual(["managed", "mcp-key"]);
- expect(github.methods.every((method) => method.purpose === "tool")).toBe(true);
+ expect(github.methods.map((method) => method.key)).toEqual(["managed", "mcp-key", "copilot-token"]);
+ expect(github.methods.filter((method) => method.purpose === "tool").map((method) => method.key)).toEqual(["managed", "mcp-key"]);
+ expect(github.methods.find((method) => method.key === "copilot-token")).toMatchObject({ purpose: "ai", transport: "runtime_auth" });
expect(bot.name).toBe("GitHub Code Review Bot");
expect(bot.methods).toHaveLength(1);
expect(bot.methods[0]).toMatchObject({ provider: "github", purpose: "channel", transport: "chat_sdk" });
diff --git a/packages/shared/src/app-definitions/github.json b/packages/shared/src/app-definitions/github.json
index 9330e1f675..1e7b359b58 100644
--- a/packages/shared/src/app-definitions/github.json
+++ b/packages/shared/src/app-definitions/github.json
@@ -2,9 +2,10 @@
"schemaVersion": 1,
"slug": "github",
"name": "GitHub",
- "description": "Give agents access to GitHub repositories, issues, and pull requests.",
+ "description": "Connect GitHub repository access or authenticate GitHub Copilot agents.",
"categories": [
- "developer"
+ "developer",
+ "ai"
],
"featured": true,
"branding": {
@@ -80,6 +81,42 @@
"organization",
"repository"
]
+ },
+ {
+ "key": "copilot-token",
+ "label": "GitHub Copilot personal access token",
+ "purpose": "ai",
+ "transport": "runtime_auth",
+ "auth": "api_key",
+ "ai": {
+ "provider": "github",
+ "method": "api_key"
+ },
+ "grantKinds": [
+ "user",
+ "organization"
+ ],
+ "ownershipModes": [
+ "customer"
+ ],
+ "whenToUse": "Authenticate the GitHub Copilot agent runtime with a personal or explicitly shared account.",
+ "guidanceMd": "Create a personal fine-grained token with the Copilot Requests permission. Copilot authentication is separate from repository and MCP access. [GitHub authentication instructions](https://docs.github.com/en/copilot/how-tos/copilot-cli/set-up-copilot-cli/authenticate-copilot-cli).",
+ "riskTier": "S3",
+ "credentialFields": [
+ {
+ "key": "apiKey",
+ "label": "Personal access token",
+ "type": "password",
+ "required": true,
+ "placeholder": "github_pat_...",
+ "secret": true,
+ "helperMd": "Use a personal fine-grained token with Copilot Requests permission."
+ }
+ ],
+ "keyPlacement": {
+ "location": "env",
+ "name": "COPILOT_GITHUB_TOKEN"
+ }
}
]
}
diff --git a/scripts/__tests__/grok-public-install-sandbox.test.mjs b/scripts/__tests__/grok-public-install-sandbox.test.mjs
index ea06caa74f..91aef68065 100644
--- a/scripts/__tests__/grok-public-install-sandbox.test.mjs
+++ b/scripts/__tests__/grok-public-install-sandbox.test.mjs
@@ -330,7 +330,7 @@ test('the verifier stages only workspace packages, so it skips the standalone bu
// staged, reusing the UI that `pnpm build` produced, and it is timed. The
// gated standalone build keeps release.sh's order: after the closure is
// known and before the UI copy and any staged source.
- assert.deepEqual(JSON.parse(readFileSync(new URL('server/package.json', repo), 'utf8')).files, ['dist', 'ui-dist', 'skills']);
+ assert.deepEqual(JSON.parse(readFileSync(new URL('server/package.json', repo), 'utf8')).files, ['dist', 'ui-dist', 'skills', 'scripts/install-copilot-assets.mjs']);
assert.ok(source.includes("PAPERCLIP_RELEASE_REUSE_UI_DIST: '1'"));
const uiDist = position("run('bash', [join(repo, 'scripts/prepare-server-ui-dist.sh')], repo)");
assert.ok(position('publicInstallClosure(repo)') < gate && gate < uiDist && uiDist < position('timing.stage_ui_dist_ms =') && uiDist < position('const stageSource = '));
diff --git a/scripts/app-definition-overrides/github.json b/scripts/app-definition-overrides/github.json
new file mode 100644
index 0000000000..69ca1d712d
--- /dev/null
+++ b/scripts/app-definition-overrides/github.json
@@ -0,0 +1,118 @@
+{
+ "schemaVersion": 1,
+ "slug": "github",
+ "name": "GitHub",
+ "description": "Connect GitHub repository access or authenticate GitHub Copilot agents.",
+ "categories": [
+ "developer",
+ "ai"
+ ],
+ "featured": true,
+ "urlPatterns": [
+ "https://api.githubcopilot.com/mcp/*",
+ "https://github.com/*"
+ ],
+ "methods": [
+ {
+ "key": "managed",
+ "transport": "mcp_remote",
+ "auth": "oauth",
+ "ownershipModes": [
+ "platform_shared"
+ ],
+ "whenToUse": "Connect your GitHub account for durable MCP, shell Git, gh, and repository access.",
+ "defaults": {
+ "serverUrl": "https://api.githubcopilot.com/mcp/"
+ },
+ "guidanceMd": "Authorize Paperclip, then choose selected repositories in GitHub. You can edit repository access later from GitHub's installation settings.",
+ "riskTier": "S3",
+ "label": "Connect GitHub",
+ "purpose": "tool",
+ "oauthStrategy": "paperclip_cloud_connector",
+ "connectorProfile": "github.code",
+ "grantKinds": [
+ "user",
+ "agent"
+ ],
+ "warnings": [
+ "Shell Git and gh receive this identity for the run and are not constrained by per-tool Ask-first controls."
+ ],
+ "requiredResourceFilters": [
+ "organization",
+ "repository"
+ ]
+ },
+ {
+ "key": "mcp-key",
+ "transport": "mcp_remote",
+ "auth": "api_key",
+ "ownershipModes": [
+ "customer"
+ ],
+ "whenToUse": "Use the provider-hosted connection for the quickest setup.",
+ "defaults": {
+ "serverUrl": "https://api.githubcopilot.com/mcp/"
+ },
+ "guidanceMd": "Create a fine-grained token limited to the repositories agents should use.",
+ "riskTier": "S3",
+ "label": "Personal access token (advanced)",
+ "purpose": "tool",
+ "credentialFields": [
+ {
+ "key": "authorization",
+ "label": "GitHub token",
+ "type": "password",
+ "required": true,
+ "placeholder": "github_pat_...",
+ "secret": true,
+ "helperMd": "Repository contents, issues, pull requests and other granted toolsets; selected repos and installation/PAT permissions apply. Create a key with read and write permissions for these actions; Paperclip cannot increase an existing key\u2019s permissions."
+ }
+ ],
+ "keyPlacement": {
+ "location": "header",
+ "name": "Authorization",
+ "prefix": "Bearer "
+ },
+ "requiredResourceFilters": [
+ "organization",
+ "repository"
+ ]
+ },
+ {
+ "key": "copilot-token",
+ "label": "GitHub Copilot personal access token",
+ "purpose": "ai",
+ "transport": "runtime_auth",
+ "auth": "api_key",
+ "ai": {
+ "provider": "github",
+ "method": "api_key"
+ },
+ "grantKinds": [
+ "user",
+ "organization"
+ ],
+ "ownershipModes": [
+ "customer"
+ ],
+ "whenToUse": "Authenticate the GitHub Copilot agent runtime with a personal or explicitly shared account.",
+ "guidanceMd": "Create a personal fine-grained token with the Copilot Requests permission. Copilot authentication is separate from repository and MCP access. [GitHub authentication instructions](https://docs.github.com/en/copilot/how-tos/copilot-cli/set-up-copilot-cli/authenticate-copilot-cli).",
+ "riskTier": "S3",
+ "credentialFields": [
+ {
+ "key": "apiKey",
+ "label": "Personal access token",
+ "type": "password",
+ "required": true,
+ "placeholder": "github_pat_...",
+ "secret": true,
+ "helperMd": "Use a personal fine-grained token with Copilot Requests permission."
+ }
+ ],
+ "keyPlacement": {
+ "location": "env",
+ "name": "COPILOT_GITHUB_TOKEN"
+ }
+ }
+ ]
+}
diff --git a/server/package.json b/server/package.json
index 587c679dc1..3181ae0f20 100644
--- a/server/package.json
+++ b/server/package.json
@@ -29,20 +29,22 @@
"files": [
"dist",
"ui-dist",
- "skills"
+ "skills",
+ "scripts/install-copilot-assets.mjs"
],
"scripts": {
"dev": "tsx src/index.ts",
"dev:watch": "cross-env PAPERCLIP_MIGRATION_PROMPT=never PAPERCLIP_MIGRATION_AUTO_APPLY=true tsx ./scripts/dev-watch.ts",
"prepare:ui-dist": "bash ../scripts/prepare-server-ui-dist.sh",
- "build": "pnpm run prepare:runner-vendor && node scripts/verify-runner-vendor-dependencies.mjs && tsc && mkdir -p dist/onboarding-assets dist/built-ins dist/services/scripts dist/vendor/paperclip-runner && cp -R src/onboarding-assets/. dist/onboarding-assets/ && cp -R src/built-ins/. dist/built-ins/ && cp -R src/services/scripts/. dist/services/scripts/ && cp -Rf ../packages/paperclip-runner/dist/. dist/vendor/paperclip-runner/ && node scripts/write-build-stamp.mjs",
+ "build": "pnpm run prepare:runner-vendor && node scripts/verify-runner-vendor-dependencies.mjs && tsc && mkdir -p dist/onboarding-assets dist/built-ins dist/services/scripts dist/vendor/paperclip-runner && cp -R src/onboarding-assets/. dist/onboarding-assets/ && cp -R src/built-ins/. dist/built-ins/ && cp -R src/services/scripts/. dist/services/scripts/ && cp -Rf ../packages/paperclip-runner/dist/. dist/vendor/paperclip-runner/ && cp ../packages/paperclip-runner/scripts/install-copilot-assets.mjs ../packages/paperclip-runner/scripts/materialize-copilot-binary.mjs ../packages/paperclip-runner/scripts/copilot-inner-distribution.mjs dist/ && node dist/install-copilot-assets.mjs && node scripts/write-build-stamp.mjs",
"prepack": "pnpm run prepare:ui-dist && pnpm run build",
"postpack": "rm -rf ui-dist",
"clean": "rm -rf dist",
"build:runtime": "node scripts/bundle-runtime.mjs",
"start": "node dist/index.js",
"prepare:runner-vendor": "node scripts/prepare-runner-vendor.mjs",
- "typecheck": "pnpm run prepare:runner-vendor && pnpm --filter @paperclipai/plugin-sdk ensure-build-deps && tsc --noEmit"
+ "typecheck": "pnpm run prepare:runner-vendor && pnpm --filter @paperclipai/plugin-sdk ensure-build-deps && tsc --noEmit",
+ "postinstall": "node scripts/install-copilot-assets.mjs"
},
"dependencies": {
"@agentclientprotocol/claude-agent-acp": "0.73.0",
diff --git a/server/src/__tests__/adapter-registry.test.ts b/server/src/__tests__/adapter-registry.test.ts
index 8d01d88427..125b41dc85 100644
--- a/server/src/__tests__/adapter-registry.test.ts
+++ b/server/src/__tests__/adapter-registry.test.ts
@@ -1,4 +1,6 @@
-import { probeAcpxClaudeInstallation, probeAcpxPiInstallation } from "../vendor/paperclip-runner/live/index.js";
+import { probeCopilotExecutionTarget } from "../services/copilot-connection-probe.js";
+import { HttpError } from "../errors.js";
+import { probeAcpxClaudeInstallation, probeAcpxCursorInstallation, probeAcpxPiInstallation } from "../vendor/paperclip-runner/live/index.js";
import { describe, expect, it, beforeEach, afterEach, vi } from "vitest";
import { buildSandboxNpmInstallCommand } from "@paperclipai/adapter-utils";
import type { ServerAdapterModule } from "../adapters/index.js";
@@ -22,6 +24,7 @@ const nativeSetup = vi.hoisted(() => ({ authenticate: vi.fn() }));
vi.mock("../services/native-runtime/setup-readiness.js", () => ({
testNativeRunnerAuthentication: nativeSetup.authenticate,
}));
+vi.mock("../services/copilot-connection-probe.js",()=>({probeCopilotExecutionTarget:vi.fn(async()=>({status:"verified",models:[{id:"gpt-5.6-luna"}]}))}));
vi.mock("../vendor/paperclip-runner/live/index.js", () => ({
probeAcpxClaudeInstallation: vi.fn(async () => undefined),
@@ -374,20 +377,29 @@ describe("server adapter registry", () => {
});
expect(probe).toHaveBeenLastCalledWith("openrouter/deepseek/deepseek-v4-flash-0731");
});
- it("reports qualification-only readiness for an exact host-authorized candidate", async () => {
- const key = "PAPERCLIP_RUNNER_ACPX_QUALIFICATION";
- const previous = process.env[key];
- process.env[key] = JSON.stringify([{ agent: "copilot", model: "exact-model" }]);
- try {
- const result = await requireServerAdapter("paperclip_runner").testEnvironment({
- companyId: "company-1", adapterType: "paperclip_runner",
- config: { provider: "acpx", acpxAgent: "copilot", model: "exact-model" },
- });
- expect(result).toMatchObject({ status: "warn", checks: [{ code: "acpx_candidate_qualification_only" }] });
- } finally {
- if (previous === undefined) delete process.env[key];
- else process.env[key] = previous;
- }
+ it("requires a saved Copilot token rather than ambient authentication",async()=>{
+ const prior=process.env.COPILOT_GITHUB_TOKEN;process.env.COPILOT_GITHUB_TOKEN="ambient-not-authority";
+ const probe=vi.mocked(probeCopilotExecutionTarget);probe.mockClear();
+ try{
+ const result=await requireServerAdapter("paperclip_runner").testEnvironment({companyId:"company-1",adapterType:"paperclip_runner",config:{provider:"acpx",acpxAgent:"copilot",model:"gpt-5.6-luna"}});
+ expect(result).toMatchObject({status:"fail",checks:[{code:"COPILOT_AUTH_REQUIRED"}]});expect(probe).not.toHaveBeenCalled();
+ }finally{if(prior===undefined)delete process.env.COPILOT_GITHUB_TOKEN;else process.env.COPILOT_GITHUB_TOKEN=prior;}
+ });
+ it.each([undefined,{kind:"remote",remoteCwd:"/workspace"}])("verifies the selected Copilot runtime and model without a prompt",async(executionTarget)=>{
+ const result=await requireServerAdapter("paperclip_runner").testEnvironment({companyId:"company-1",adapterType:"paperclip_runner",config:{provider:"acpx",acpxAgent:"copilot",model:"gpt-5.6-luna",env:{COPILOT_GITHUB_TOKEN:"fixture-token"}},executionTarget} as any);
+ expect(probeCopilotExecutionTarget).toHaveBeenLastCalledWith("fixture-token",executionTarget,"gpt-5.6-luna");
+ expect(result).toMatchObject({status:"pass",checks:[{code:"copilot_metadata_verified"}]});
+ });
+ it.each(["COPILOT_AUTH_REQUIRED","COPILOT_ENTITLEMENT_DENIED","COPILOT_MODEL_UNAVAILABLE","COPILOT_INSTALLATION_INVALID","COPILOT_REQUEST_FAILED"])("reports distinct Copilot failure %s",async code=>{
+ vi.mocked(probeCopilotExecutionTarget).mockRejectedValueOnce(new HttpError(422,"Fixture metadata failure",{code}));
+ const result=await requireServerAdapter("paperclip_runner").testEnvironment({companyId:"company-1",adapterType:"paperclip_runner",config:{provider:"acpx",acpxAgent:"copilot",model:"gpt-5.6-luna",env:{COPILOT_GITHUB_TOKEN:"fixture-token"}}});
+ expect(result).toMatchObject({status:"fail",checks:[{code}]});
+ });
+ it("sanitizes unexpected Copilot metadata failures",async()=>{
+ vi.mocked(probeCopilotExecutionTarget).mockRejectedValueOnce(new Error("fixture private implementation detail"));
+ const result=await requireServerAdapter("paperclip_runner").testEnvironment({companyId:"company-1",adapterType:"paperclip_runner",config:{provider:"acpx",acpxAgent:"copilot",model:"gpt-5.6-luna",env:{COPILOT_GITHUB_TOKEN:"fixture-token"}}});
+ expect(result).toMatchObject({status:"fail",checks:[{code:"COPILOT_REQUEST_FAILED",message:"Copilot metadata verification failed."}]});
+ expect(JSON.stringify(result)).not.toContain("private implementation detail");
});
it("wraps built-in npm runtime installs with the sandbox-aware install helper", () => {
const expectedClaudeInstall = `if ! command -v 'claude' >/dev/null 2>&1; then ${buildSandboxNpmInstallCommand("@anthropic-ai/claude-code")}; fi`;
diff --git a/server/src/__tests__/adapter-routes.test.ts b/server/src/__tests__/adapter-routes.test.ts
index 9ccc123a85..b30ac868f7 100644
--- a/server/src/__tests__/adapter-routes.test.ts
+++ b/server/src/__tests__/adapter-routes.test.ts
@@ -435,6 +435,7 @@ describe("adapter routes", () => {
options: [
{ value: "claude", label: "Claude" },
{ value: "grok", label: "Grok Build" },
+ { value: "copilot", label: "GitHub Copilot" },
],
});
expect(JSON.stringify(res.body)).not.toContain("Codex via ACPX");
diff --git a/server/src/__tests__/agent-harness-verification.test.ts b/server/src/__tests__/agent-harness-verification.test.ts
index 3d43bdd0a8..6d97edb732 100644
--- a/server/src/__tests__/agent-harness-verification.test.ts
+++ b/server/src/__tests__/agent-harness-verification.test.ts
@@ -30,6 +30,7 @@ describe("saved harness verification", () => {
["warn", ["claude_acp_anthropic_api_key_detected", "claude_acp_login_probe_unavailable"]],
["warn", ["cli_version_probe_mismatch"]], ["pass", [ADAPTER_AUTH_MISSING_CHECK_CODE]],
["warn", ["claude_hello_probe_passed", "claude_hello_probe_auth_required"]],
+ ["pass", ["COPILOT_AUTH_REQUIRED"]], ["fail", ["COPILOT_MODEL_UNAVAILABLE"]],
] as const)("rejects %s with %j", (status, codes) => {
expect(() => assertHarnessTestPassed(result(status, [...codes]))).toThrow("The harness test failed");
});
@@ -37,6 +38,7 @@ describe("saved harness verification", () => {
["pass", ["process_command_available"]], ["warn", ["claude_hello_probe_passed", "optional_environment_warning"]],
["warn", ["claude_acp_anthropic_api_key_detected", "claude_hello_probe_passed"]],
["pass", ["codex_hello_probe_succeeded"]], ["warn", ["ai_connection_api_key_reverified"]],
+ ["pass", ["copilot_metadata_verified"]], ["warn", ["copilot_metadata_verified"]],
] as const)("accepts %s with %j", (status, codes) => {
expect(() => assertHarnessTestPassed(result(status, [...codes]))).not.toThrow();
});
diff --git a/server/src/__tests__/agent-test-environment-routes.test.ts b/server/src/__tests__/agent-test-environment-routes.test.ts
index 7f43c23469..ba054f825a 100644
--- a/server/src/__tests__/agent-test-environment-routes.test.ts
+++ b/server/src/__tests__/agent-test-environment-routes.test.ts
@@ -32,6 +32,7 @@ const mockEnvironmentService = vi.hoisted(() => ({
releaseLease: vi.fn(),
listBoundCompanyIds: vi.fn(async () => [] as string[]),
findManagedSandboxEnvironment: vi.fn(async () => null as Record<string, unknown> | null),
+ findKubernetesEnvironment: vi.fn(async () => null as Record<string, unknown> | null),
}));
const mockReleaseRunLease = vi.hoisted(() => vi.fn(async () => undefined));
@@ -46,7 +47,7 @@ const mockEnvironmentRuntime = vi.hoisted(() => ({
const mockResolveEnvironmentExecutionTarget = vi.hoisted(() => vi.fn());
const mockInstanceSettingsService = vi.hoisted(() => ({
get: vi.fn(async () => ({ defaultEnvironmentId: null as string | null })),
- getGeneral: vi.fn(async () => ({ censorUsernameInLogs: false })),
+ getGeneral: vi.fn(async () => ({ censorUsernameInLogs: false, executionMode: "local" })),
getExperimental: vi.fn(async (): Promise<{
enableManagedSandboxOnly: boolean;
enableOpenAiDot?: boolean;
@@ -125,9 +126,16 @@ vi.mock("../services/ai-connection-runtime.js", async (importOriginal) => ({
const mockValidateAiApiKey = vi.hoisted(() => vi.fn(async () => undefined));
vi.mock("../services/ai-api-key-test.js", () => ({ validateAiApiKey: mockValidateAiApiKey }));
const mockMarkAuthenticationFailed = vi.hoisted(() => vi.fn(async () => undefined));
+const mockSelectAiConnection = vi.hoisted(() => vi.fn(async (_input: unknown) => ({ connectionId: "copilot-connection", grantId: "copilot-grant" })));
+const mockAiCredential = vi.hoisted(() => vi.fn(async (_selection: unknown) => "synthetic-copilot-token"));
+const mockCopilotModels = vi.hoisted(() => vi.fn(async () => ({ models: [{ id: "gpt-5.6-luna", label: "GPT-5.6 Luna" }], promptSent: false })));
+const mockCopilotProbe = vi.hoisted(() => vi.fn(async () => ({ status: "verified", promptSent: false })));
+vi.mock("../services/copilot-connection-probe.js", async importOriginal => ({
+ ...(await importOriginal<object>()), probeCopilotExecutionTarget: mockCopilotProbe, probeCopilotConnection: mockCopilotModels,
+}));
vi.mock("../services/ai-connections.js", async (importOriginal) => ({
...(await importOriginal<typeof import("../services/ai-connections.js")>()),
- aiConnectionService: () => ({ markAuthenticationFailed: mockMarkAuthenticationFailed }),
+ aiConnectionService: () => ({ markAuthenticationFailed: mockMarkAuthenticationFailed, select: mockSelectAiConnection, credential: mockAiCredential }),
}));
function mockManagedRuntime(method: "api_key" | "subscription") {
@@ -171,7 +179,7 @@ function loadAppModules() {
]);
}
-async function createApp() {
+async function createApp(actor: Record<string, unknown> = {}) {
const [{ agentRoutes }, { errorHandler }] = await loadAppModules();
const app = express();
app.use(express.json());
@@ -182,6 +190,7 @@ async function createApp() {
companyIds: ["company-1"],
source: "local_implicit",
isInstanceAdmin: false,
+ ...actor,
};
next();
});
@@ -204,6 +213,8 @@ describe("agent test-environment route", () => {
beforeEach(async () => {
vi.clearAllMocks();
mockInstanceSettingsService.get.mockResolvedValue({ defaultEnvironmentId: null });
+ mockInstanceSettingsService.getGeneral.mockResolvedValue({ censorUsernameInLogs: false, executionMode: "local" });
+ mockEnvironmentService.findKubernetesEnvironment.mockResolvedValue(null);
mockInstanceSettingsService.getExperimental.mockResolvedValue({ enableManagedSandboxOnly: false });
mockEnvironmentService.findManagedSandboxEnvironment.mockResolvedValue(null);
mockAccessService.decide.mockResolvedValue({
@@ -301,6 +312,74 @@ describe("agent test-environment route", () => {
} finally { vi.unstubAllEnvs(); }
});
+ it("lets an authorized agent editor discover Copilot models", async () => {
+ mockAgentService.getById.mockResolvedValue({ id: "agent-1", companyId: "company-1" });
+ const response = await request(await createApp()).get("/api/companies/company-1/adapters/paperclip_runner/models")
+ .query({ provider: "acpx", acpxAgent: "copilot", agentId: "agent-1" });
+ expect(response.status).toBe(200);
+ expect(response.body).toEqual([{ id: "gpt-5.6-luna", label: "GPT-5.6 Luna" }]);
+ expect(response.headers["cache-control"]).toBe("no-store");
+ expect(mockAccessService.decide).toHaveBeenCalledWith(expect.objectContaining({ action: "agent_config:update" }));
+ expect(mockSelectAiConnection).toHaveBeenCalledExactlyOnceWith(expect.objectContaining({
+ companyId: "company-1", userId: "local-board", agentId: "agent-1", runnerProvider: "acpx", acpxAgent: "copilot",
+ binding: { provider: "github", method: "api_key", mode: "responsible_user" }, allowUninstalledShared: false,
+ }));
+ expect(mockCopilotModels).toHaveBeenCalledExactlyOnceWith(expect.anything(), "company-1", "synthetic-copilot-token", null, undefined, expect.anything());
+ });
+
+ it.each([
+ ["board viewer", { type: "board" }],
+ ["agent reader", { type: "agent", agentId: "reader-agent", companyId: "company-1", onBehalfOfUserId: "reader-user",
+ onBehalfOfMemberships: [{ companyId: "company-1", status: "active", membershipRole: "member" }] }],
+ ])("refuses a %s discovery probe before resolving a shared token", async (_label, actor) => {
+ mockAccessService.decide.mockImplementation(async ({ action }) => ({
+ allowed: action === "agent_config:read", explanation: "No configuration update grant",
+ }));
+ mockAccessService.canUser.mockResolvedValue(false);
+ mockAgentService.getById.mockResolvedValue({ id: "agent-1", companyId: "company-1" });
+ const binding = { provider: "github", method: "api_key", mode: "shared",
+ connectionId: "aaaaaaaa-aaaa-4aaa-8aaa-aaaaaaaaaaaa", grantId: "bbbbbbbb-bbbb-4bbb-8bbb-bbbbbbbbbbbb" };
+ const response = await request(await createApp(actor)).get("/api/companies/company-1/adapters/paperclip_runner/models")
+ .query({ provider: "acpx", acpxAgent: "copilot", agentId: "agent-1",
+ environmentId: "33333333-3333-4333-8333-333333333333", aiConnection: JSON.stringify(binding) });
+ expect(response.status).toBe(403);
+ expect(mockAccessService.decide).toHaveBeenCalledWith(expect.objectContaining({ action: "agent_config:update" }));
+ expect(mockSelectAiConnection).not.toHaveBeenCalled();
+ expect(mockAiCredential).not.toHaveBeenCalled();
+ expect(mockCopilotModels).not.toHaveBeenCalled();
+ });
+
+ it.each([undefined, "33333333-3333-4333-8333-333333333333"])("uses the saved or editor-selected Copilot environment (%s)", async environmentId => {
+ const savedEnvironmentId = "22222222-2222-4222-8222-222222222222";
+ mockAgentService.getById.mockResolvedValue({ id: "agent-1", companyId: "company-1", defaultEnvironmentId: savedEnvironmentId });
+ const response = await request(await createApp()).get("/api/companies/company-1/adapters/paperclip_runner/models")
+ .query({ provider: "acpx", acpxAgent: "copilot", agentId: "agent-1", ...(environmentId ? { environmentId } : {}) });
+ expect(response.status).toBe(200);
+ expect(mockCopilotModels).toHaveBeenCalledExactlyOnceWith(expect.anything(), "company-1", "synthetic-copilot-token",
+ environmentId ?? savedEnvironmentId, undefined, expect.anything());
+ });
+
+ it("refuses model discovery for a foreign agent before selecting credentials", async () => {
+ mockAgentService.getById.mockResolvedValue({ id: "agent-foreign", companyId: "company-2" });
+ const response = await request(await createApp()).get("/api/companies/company-1/adapters/paperclip_runner/models")
+ .query({ provider: "acpx", acpxAgent: "copilot", agentId: "agent-foreign" });
+ expect(response.status).toBe(404);
+ expect(mockSelectAiConnection).not.toHaveBeenCalled();
+ expect(mockAiCredential).not.toHaveBeenCalled();
+ expect(mockCopilotModels).not.toHaveBeenCalled();
+ });
+
+ it("keeps saved connection access enforced before Copilot model probing", async () => {
+ const { forbidden } = await import("../errors.js");
+ mockAgentService.getById.mockResolvedValue({ id: "agent-1", companyId: "company-1" });
+ mockSelectAiConnection.mockRejectedValueOnce(forbidden("Saved connection access denied"));
+ const response = await request(await createApp()).get("/api/companies/company-1/adapters/paperclip_runner/models")
+ .query({ provider: "acpx", acpxAgent: "copilot", agentId: "agent-1" });
+ expect(response.status).toBe(403);
+ expect(mockAiCredential).not.toHaveBeenCalled();
+ expect(mockCopilotModels).not.toHaveBeenCalled();
+ });
+
it("tests the instance default sandbox when the agent inherits its environment", async () => {
const environmentId = "11111111-1111-4111-8111-111111111111";
mockInstanceSettingsService.get.mockResolvedValue({ defaultEnvironmentId: environmentId });
@@ -376,6 +455,41 @@ describe("agent test-environment route", () => {
expect(testEnvironmentSpy).toHaveBeenCalledWith(expect.objectContaining({ executionTarget: target }));
});
+ it.each([null, "33333333-3333-4333-8333-333333333333"])("verifies Copilot on forced Kubernetes before the host selection (%s)", async environmentId => {
+ const kubernetesId = "11111111-1111-4111-8111-111111111111";
+ mockInstanceSettingsService.getGeneral.mockResolvedValue({ censorUsernameInLogs: false, executionMode: "kubernetes" });
+ mockEnvironmentService.findKubernetesEnvironment.mockResolvedValue({ id: kubernetesId });
+ const target = { kind: "remote", transport: "sandbox", remoteCwd: "/workspace", providerKey: "kubernetes", runner: { execute: vi.fn() } };
+ mockResolveEnvironmentExecutionTarget.mockResolvedValue(target);
+ mockPrepareManagedAiRuntime.mockImplementation(async (_db, input) => ({
+ config: { ...input.config, env: { COPILOT_GITHUB_TOKEN: "private-fixture" } },
+ attribution: { provider: "github", method: "api_key" }, cleanup: vi.fn(),
+ }));
+ const app = await createApp();
+ const response = await request(app).post("/api/companies/company-1/adapters/paperclip_runner/test-environment").send({
+ environmentId, adapterConfig: { provider: "acpx", acpxAgent: "copilot", model: "gpt-5.6-luna" },
+ aiConnection: { provider: "github", method: "api_key", mode: "responsible_user" },
+ });
+ expect(response.status, JSON.stringify(response.body)).toBe(200);
+ expect(response.body.status).toBe("pass");
+ expect(mockEnvironmentRuntime.acquireRunLease).toHaveBeenCalledWith(expect.objectContaining({ environment: expect.objectContaining({ id: kubernetesId }) }));
+ expect(mockCopilotProbe).toHaveBeenCalledExactlyOnceWith("private-fixture", target, "gpt-5.6-luna");
+ expect(mockReleaseRunLease).toHaveBeenCalledOnce();
+ });
+
+ it("refuses a Copilot test before credentials when forced Kubernetes is unavailable", async () => {
+ mockInstanceSettingsService.getGeneral.mockResolvedValue({ censorUsernameInLogs: false, executionMode: "kubernetes" });
+ const app = await createApp();
+ const response = await request(app).post("/api/companies/company-1/adapters/paperclip_runner/test-environment").send({
+ adapterConfig: { provider: "acpx", acpxAgent: "copilot", model: "gpt-5.6-luna" },
+ aiConnection: { provider: "github", method: "api_key", mode: "responsible_user" },
+ });
+ expect(response.status).toBe(422);
+ expect(response.body.details.code).toBe("copilot_environment_unavailable");
+ expect(mockPrepareManagedAiRuntime).not.toHaveBeenCalled();
+ expect(mockCopilotProbe).not.toHaveBeenCalled();
+ });
+
it("checks the inherited environment's company before resolving credentials", async () => {
mockInstanceSettingsService.get.mockResolvedValue({ defaultEnvironmentId: "11111111-1111-4111-8111-111111111111" });
mockEnvironmentService.listBoundCompanyIds.mockResolvedValue(["company-2"]);
diff --git a/server/src/__tests__/ai-connections.test.ts b/server/src/__tests__/ai-connections.test.ts
index f543759e2d..9ca9c2d51d 100644
--- a/server/src/__tests__/ai-connections.test.ts
+++ b/server/src/__tests__/ai-connections.test.ts
@@ -39,6 +39,10 @@ import express from "express";
import request from "supertest";
import { aiConnectionRoutes, canInstallSharedAiConnectionForNewAgent, responsibleUserForAiRequest } from "../routes/ai-connections.js";
import { validateAiApiKey } from "../routes/ai-connections.js";
+import * as copilotProbe from "../services/copilot-connection-probe.js";
+import * as settingsModule from "../services/instance-settings.js";
+import { agentRoutes } from "../routes/agents.js";
+import type { PluginWorkerManager } from "../services/plugin-worker-manager.js";
vi.mock("../services/local-ai-browser-login.js", () => ({
startLocalBrowserLogin: () => ({ authorizationUrl: "https://auth.openai.com/codex/device", code: "ABCD-EFGHJ", abort: () => {} }),
}));
@@ -68,6 +72,219 @@ beforeAll(async () => {
afterAll(async () => { await database?.cleanup(); vi.unstubAllEnvs(); if (home) await rm(home, { recursive: true, force: true }); });
describe("managed AI connections", () => {
+ it.each(["create", "hire", "edit"])("refuses Copilot %s before probing or persisting when forced Kubernetes is missing", async action => {
+ const { errorHandler } = await import("../middleware/index.js");
+ const owner = `copilot-kubernetes-${action}`, id = randomUUID();
+ const config = { provider: "acpx", acpxAgent: "copilot", model: "gpt-5.6-luna" };
+ const aiConnection = { provider: "github", method: "api_key", mode: "responsible_user" } as const;
+ await db.insert(companyMemberships).values({ companyId, principalId: owner, principalType: "user", status: "active", membershipRole: "member" });
+ await db.insert(agents).values({ id, companyId, name: "Kubernetes fixture", adapterType: "paperclip_runner", adapterConfig: config, runtimeConfig: { aiConnection } });
+ const account = await service.save(companyId, owner, { provider: "github", method: "api_key", ownership: "personal", name: "Kubernetes fixture", apiKey: "github_pat_fixture_kubernetes", agentIds: [id], allAgents: false }, "github_pat_fixture_kubernetes");
+ await service.setDefault(companyId, owner, account.grantId);
+ const [company] = await db.select().from(companies).where(eq(companies.id, companyId));
+ await db.update(companies).set({ requireBoardApprovalForNewAgents: false }).where(eq(companies.id, companyId));
+ const before = await db.select({ id: agents.id }).from(agents).where(eq(agents.companyId, companyId));
+ const originalSettings = settingsModule.instanceSettingsService;
+ const settings = vi.spyOn(settingsModule, "instanceSettingsService").mockImplementation(database => {
+ const service = originalSettings(database);
+ return { ...service, getGeneral: async () => ({ ...await service.getGeneral(), executionMode: "kubernetes" as const }) };
+ });
+ const probe = vi.spyOn(copilotProbe, "probeCopilotExecutionTarget");
+ const app = express(); app.use(express.json());
+ app.use((req, _res, next) => { req.actor = { type: "board", source: "local_implicit", userId: owner, companyIds: [companyId], isInstanceAdmin: true }; next(); });
+ app.use("/api", agentRoutes(db)); app.use(errorHandler);
+ try {
+ const changedConfig = { ...config, model: "prospective-model" };
+ const response = action === "edit"
+ ? await request(app).patch(`/api/agents/${id}`).send({ adapterConfig: changedConfig })
+ : await request(app).post(`/api/companies/${companyId}/${action === "hire" ? "agent-hires" : "agents"}`).send({ name: "Forced Kubernetes", role: "general", adapterType: "paperclip_runner", adapterConfig: changedConfig, runtimeConfig: { aiConnection } });
+ expect(response.status, JSON.stringify(response.body)).toBe(422);
+ expect(response.body.details.code).toBe("copilot_environment_unavailable");
+ expect(probe).not.toHaveBeenCalled();
+ expect((await db.select().from(agents).where(eq(agents.id, id)))[0].adapterConfig).toEqual(config);
+ expect(await db.select({ id: agents.id }).from(agents).where(eq(agents.companyId, companyId))).toHaveLength(before.length);
+ } finally {
+ probe.mockRestore(); settings.mockRestore();
+ await db.update(companies).set({ requireBoardApprovalForNewAgents: company.requireBoardApprovalForNewAgents }).where(eq(companies.id, companyId));
+ }
+ });
+ it.each(["create", "hire", "edit"].flatMap(action => [true, false].map(connectionProvided => ({ action, connectionProvided }))))(
+ "refuses unavailable Copilot models before $action persists configuration (connection binding: $connectionProvided)", async ({ action, connectionProvided }) => {
+ const { unprocessable } = await import("../errors.js");
+ const { errorHandler } = await import("../middleware/index.js");
+ const owner = `copilot-model-${action}-${connectionProvided}`, id = randomUUID();
+ const savedConfig = { provider: "acpx", acpxAgent: "copilot", model: "gpt-5.6-luna" };
+ const aiConnection = { provider: "github", method: "api_key", mode: "responsible_user" } as const;
+ await db.insert(companyMemberships).values({ companyId, principalId: owner, principalType: "user", status: "active", membershipRole: "member" });
+ await db.insert(agents).values({ id, companyId, name: `Copilot ${action} fixture`, adapterType: "paperclip_runner", adapterConfig: savedConfig, runtimeConfig: connectionProvided ? { aiConnection } : {} });
+ const token = `github_pat_fixture_model_${action}`;
+ const account = await service.save(companyId, owner, { provider: "github", method: "api_key", ownership: "personal", name: `Model ${action}`, apiKey: token, agentIds: [id], allAgents: false }, token);
+ await service.setDefault(companyId, owner, account.grantId);
+ const [company] = await db.select().from(companies).where(eq(companies.id, companyId));
+ await db.update(companies).set({ requireBoardApprovalForNewAgents: false }).where(eq(companies.id, companyId));
+ const before = await db.select({ id: agents.id }).from(agents).where(eq(agents.companyId, companyId));
+ const probe = vi.spyOn(copilotProbe, "probeCopilotExecutionTarget").mockRejectedValue(unprocessable("The selected Copilot model is unavailable for this account.", { code: "COPILOT_MODEL_UNAVAILABLE" }));
+ const app = express(); app.use(express.json());
+ app.use((req, _res, next) => { req.actor = { type: "board", source: "local_implicit", userId: owner, companyIds: [companyId], isInstanceAdmin: true }; next(); });
+ app.use("/api", agentRoutes(db)); app.use(errorHandler);
+ const config = { ...savedConfig, model: "unavailable-copilot-model" };
+ try {
+ const response = action === "edit"
+ ? await request(app).patch(`/api/agents/${id}`).send({ adapterConfig: config })
+ : await request(app).post(`/api/companies/${companyId}/${action === "hire" ? "agent-hires" : "agents"}`).send({ name: `Unavailable ${action}`, role: "general", adapterType: "paperclip_runner", adapterConfig: config, ...(connectionProvided ? { runtimeConfig: { aiConnection } } : {}) });
+ expect(response.status, JSON.stringify(response.body)).toBe(422);
+ expect(response.body).toMatchObject({ error: "The selected Copilot model is unavailable for this account." });
+ expect(probe).toHaveBeenCalledExactlyOnceWith(token, null, "unavailable-copilot-model");
+ expect((await db.select().from(agents).where(eq(agents.id, id)))[0].adapterConfig).toEqual(savedConfig);
+ expect(await db.select({ id: agents.id }).from(agents).where(eq(agents.companyId, companyId))).toHaveLength(before.length);
+ expect(JSON.stringify(response.body)).not.toContain(token);
+ } finally {
+ probe.mockRestore();
+ await db.update(companies).set({ requireBoardApprovalForNewAgents: company.requireBoardApprovalForNewAgents }).where(eq(companies.id, companyId));
+ }
+ });
+
+ it("verifies the exact available Copilot model before a model-only edit with an unchanged connection", async () => {
+ const { errorHandler } = await import("../middleware/index.js");
+ const owner = "copilot-model-valid", id = randomUUID();
+ const aiConnection = { provider: "github", method: "api_key", mode: "responsible_user" } as const;
+ const config = { provider: "acpx", acpxAgent: "copilot", model: "gpt-5.6-luna" };
+ await db.insert(companyMemberships).values({ companyId, principalId: owner, principalType: "user", status: "active", membershipRole: "member" });
+ await db.insert(agents).values({ id, companyId, name: "Copilot available model", adapterType: "paperclip_runner", adapterConfig: { ...config, model: "previous-model" }, runtimeConfig: { aiConnection } });
+ const token = "github_pat_fixture_model_valid";
+ const account = await service.save(companyId, owner, { provider: "github", method: "api_key", ownership: "personal", name: "Valid model", apiKey: token, agentIds: [id], allAgents: false }, token);
+ await service.setDefault(companyId, owner, account.grantId);
+ const probe = vi.spyOn(copilotProbe, "probeCopilotExecutionTarget").mockResolvedValue({ status: "verified", version: "1.0.88", profileDigest: "fixture-profile", promptSent: false, models: [{ id: config.model, label: "GPT" }] });
+ const app = express(); app.use(express.json());
+ app.use((req, _res, next) => { req.actor = { type: "board", source: "local_implicit", userId: owner, companyIds: [companyId], isInstanceAdmin: true }; next(); });
+ app.use("/api", agentRoutes(db)); app.use(errorHandler);
+ try {
+ const response = await request(app).patch(`/api/agents/${id}`).send({ adapterConfig: config });
+ expect(response.status, JSON.stringify(response.body)).toBe(200);
+ expect(probe).toHaveBeenCalledExactlyOnceWith(token, null, config.model);
+ expect((await db.select().from(agents).where(eq(agents.id, id)))[0].adapterConfig).toMatchObject(config);
+ expect(response.body.runtimeConfig.aiConnection).toEqual(aiConnection);
+ } finally { probe.mockRestore(); }
+ });
+ it("passes the live sandbox worker manager to Copilot connection verification", async () => {
+ const pluginWorkerManager = {} as PluginWorkerManager;
+ const probe = vi.spyOn(copilotProbe, "probeCopilotConnection").mockResolvedValue({
+ status: "verified", version: "1.0.88", profileDigest: "fixture-profile",
+ promptSent: false, models: [{ id: "gpt-5.6-luna", label: "GPT" }],
+ });
+ const app = express();
+ app.use(express.json());
+ app.use((req, _res, next) => {
+ req.actor = { type: "board", source: "local_implicit", userId: "alice", companyIds: [companyId] };
+ next();
+ });
+ app.use("/api", aiConnectionRoutes(db, { pluginWorkerManager }));
+ try {
+ const response = await request(app).post(`/api/companies/${companyId}/ai-connections`).send({
+ provider: "github", method: "api_key", name: "Copilot remote route", ownership: "personal",
+ apiKey: "github_pat_fixture_remote", agentIds: [], allAgents: false,
+ });
+ expect(response.status).toBe(201);
+ expect(probe).toHaveBeenCalledWith(db, companyId, "github_pat_fixture_remote", undefined, undefined, { pluginWorkerManager });
+ } finally { probe.mockRestore(); }
+ });
+
+ it("discovers Copilot models in the selected environment with its sandbox worker", async () => {
+ const pluginWorkerManager = {} as PluginWorkerManager;
+ const [environment] = await db.insert(environments).values({ name: "Copilot model discovery", driver: "sandbox", config: { provider: "daytona" } }).returning();
+ const token = "github_pat_fixture_model_discovery";
+ const account = await service.save(companyId, "alice", { provider: "github", method: "api_key", ownership: "personal", name: "Model discovery account", apiKey: token, agentIds: [agentId], allAgents: false }, token);
+ await service.setDefault(companyId, "alice", account.grantId);
+ const probe = vi.spyOn(copilotProbe, "probeCopilotConnection").mockResolvedValue({ status: "verified", version: "1.0.88", profileDigest: "fixture-profile", promptSent: false, models: [{ id: "gpt-5.6-luna", label: "GPT" }] });
+ const app = express(); app.use(express.json());
+ app.use((req, _res, next) => { req.actor = { type: "board", source: "local_implicit", userId: "alice", companyIds: [companyId] }; next(); });
+ app.use("/api", agentRoutes(db, { pluginWorkerManager }));
+ try {
+ const response = await request(app).get(`/api/companies/${companyId}/adapters/paperclip_runner/models`).query({ provider: "acpx", acpxAgent: "copilot", environmentId: environment.id, agentId, aiConnection: JSON.stringify({ provider: "github", method: "api_key", mode: "responsible_user" }) });
+ expect(response.status).toBe(200);
+ expect(response.headers["cache-control"]).toBe("no-store");
+ expect(response.body).toEqual([{ id: "gpt-5.6-luna", label: "GPT" }]);
+ expect(probe).toHaveBeenCalledWith(db, companyId, token, environment.id, undefined, { pluginWorkerManager });
+ expect(JSON.stringify(response.body)).not.toContain(token);
+ } finally { probe.mockRestore(); }
+ });
+
+ it("keeps Copilot model discovery behind shared installation and agent configuration authority", async () => {
+ const { errorHandler } = await import("../middleware/index.js");
+ const owner = "copilot-discovery-owner", audience = "copilot-discovery-audience";
+ await db.insert(companyMemberships).values([owner, audience].map(principalId => ({ companyId, principalId, principalType: "user", status: "active", membershipRole: "member" })));
+ await db.insert(principalPermissionGrants).values([owner, audience].map(principalId => ({ companyId, principalId, principalType: "user", permissionKey: "agents:create" })));
+ const token = "github_pat_fixture_shared_discovery";
+ const account = await service.save(companyId, owner, { provider: "github", method: "api_key", ownership: "shared", name: "Shared discovery", apiKey: token, agentIds: [], allAgents: false }, token);
+ await db.insert(connectionGrantMembers).values([owner, audience].map(subjectId => ({ companyId, grantId: account.grantId, subjectType: "user", subjectId })));
+ const binding = { provider: "github", method: "api_key", mode: "shared", ...account };
+ const probe = vi.spyOn(copilotProbe, "probeCopilotConnection").mockResolvedValue({ status: "verified", version: "1.0.88", profileDigest: "fixture-profile", promptSent: false, models: [{ id: "gpt-5.6-luna", label: "GPT" }] });
+ const app = express(); app.use(express.json());
+ app.use((req, _res, next) => { req.actor = { type: "board", source: "session", userId: String(req.headers["x-test-user"] ?? audience), companyIds: [companyId], memberships: [{ companyId, membershipRole: "member", status: "active" }] }; next(); });
+ app.use("/api", agentRoutes(db)); app.use(errorHandler);
+ const url = `/api/companies/${companyId}/adapters/paperclip_runner/models`;
+ const query = { provider: "acpx", acpxAgent: "copilot", aiConnection: JSON.stringify(binding) };
+ try {
+ const denied = await request(app).get(url).query(query);
+ expect(denied.status, JSON.stringify(denied.body)).toBe(403);
+ expect(denied.body.error).toContain("not permitted for this agent");
+ expect(probe).not.toHaveBeenCalled();
+ const allowed = await request(app).get(url).set("x-test-user", owner).query(query);
+ expect(allowed.status, JSON.stringify(allowed.body)).toBe(200);
+ expect(probe).toHaveBeenCalledExactlyOnceWith(db, companyId, token, null, undefined, { pluginWorkerManager: undefined });
+ probe.mockClear();
+ const foreign = await request(app).get(url).set("x-test-user", owner).query({ ...query, agentId: randomUUID() });
+ expect(foreign.status).toBe(404);
+ expect(probe).not.toHaveBeenCalled();
+ expect(JSON.stringify([denied.body, allowed.body, foreign.body])).not.toContain(token);
+ } finally { probe.mockRestore(); }
+ });
+
+ it("preserves repository GitHub credentials for managed non-Copilot execution", async () => {
+ const owner = "repo-github-owner";
+ await db.insert(companyMemberships).values({ companyId, principalId: owner, principalType: "user", status: "active", membershipRole: "member" });
+ await create(owner, owner);
+ for (const configured of [{ GH_TOKEN: "repo-gh-fixture", GITHUB_TOKEN: "repo-github-fixture" }, {}]) {
+ const runtime = await prepareManagedAiRuntime(db, { ...input, responsibleUserId: owner, config: { env: configured } });
+ try {
+ expect(runtime.config.env).toMatchObject({ COPILOT_GITHUB_TOKEN: "", ANTHROPIC_API_KEY: `fixture-${owner}` });
+ for (const key of ["GH_TOKEN", "GITHUB_TOKEN"] as const) {
+ if (key in configured) expect(runtime.config.env?.[key]).toBe(configured[key as keyof typeof configured]);
+ else expect(runtime.config.env).not.toHaveProperty(key);
+ }
+ } finally { await runtime.cleanup(); }
+ }
+ });
+
+ it("uses a vaulted Copilot token with GitHub attribution and refuses revoked or foreign grants", async () => {
+ const owner = "copilot-owner";
+ const token = "github_pat_fixture_copilot";
+ await db.insert(companyMemberships).values({ companyId, principalId: owner, principalType: "user", status: "active", membershipRole: "member" });
+ const account = await service.save(companyId, owner, { provider: "github", method: "api_key", ownership: "personal", name: "Copilot", apiKey: token, agentIds: [agentId], allAgents: false }, token);
+ const selectedBinding = { provider: "github", method: "api_key", mode: "responsible_user" } as const;
+ const config = { provider: "acpx", acpxAgent: "copilot", model: "gpt-5.6-luna", env: { COPILOT_GITHUB_TOKEN: "ambient-never-use", GH_TOKEN: "project-never-use" } };
+ const runInput = { companyId, agentId, responsibleUserId: owner, adapterType: "paperclip_runner", binding: selectedBinding, config };
+ const selected = await service.select({ ...runInput, userId: owner, runnerProvider: "acpx", acpxAgent: "copilot", model: config.model });
+ expect(await service.credential(selected)).toBe(token);
+ expect(JSON.stringify(await service.list(companyId, owner))).not.toContain(token);
+ const runtime = await prepareManagedAiRuntime(db, runInput);
+ try {
+ expect(runtime.config).toMatchObject({ provider: "acpx", acpxAgent: "copilot", model: config.model, env: { COPILOT_GITHUB_TOKEN: token, GH_TOKEN: "", GITHUB_TOKEN: "", OPENAI_API_KEY: "", ANTHROPIC_API_KEY: "" } });
+ expect(runtime.attribution).toMatchObject({ provider: "github", method: "api_key", connectionId: account.connectionId, grantId: account.grantId });
+ expect(config.env.COPILOT_GITHUB_TOKEN).toBe("ambient-never-use");
+ } finally { await runtime.cleanup(); }
+ await expect(access(runtime.home!)).rejects.toThrow();
+ await expect(service.select({ ...runInput, userId: "bob", runnerProvider: "acpx", acpxAgent: "copilot" })).rejects.toThrow();
+ await expect(service.select({ ...runInput, companyId: otherCompanyId, userId: owner, binding: { ...selectedBinding, mode: "shared", ...account }, runnerProvider: "acpx", acpxAgent: "copilot" })).rejects.toThrow();
+ const network = vi.spyOn(globalThis, "fetch").mockRejectedValue(new Error("usage must not send credentials"));
+ try {
+ expect(await service.probeUsage(companyId, owner, account.connectionId, account.grantId)).toMatchObject({ provider: "github", status: "unsupported", limits: [] });
+ expect(network).not.toHaveBeenCalled();
+ } finally { network.mockRestore(); }
+ await db.update(connectionGrants).set({ status: "revoked" }).where(eq(connectionGrants.id, account.grantId));
+ await expect(prepareManagedAiRuntime(db, runInput)).rejects.toThrow();
+ });
+
it("marks explicit AI selection rejections without changing their HTTP contract", async () => {
const owner = "selection-blocker-owner";
await db.insert(companyMemberships).values({ companyId, principalId: owner, principalType: "user", status: "active", membershipRole: "member" });
@@ -850,12 +1067,18 @@ console.log(JSON.stringify({ type: "result", subtype: "success", result: "hello"
await expect(access(runtime.home!)).rejects.toThrow();
});
- it("preserves Google account defaults when the provider constraint migration is reapplied", async () => {
+ it("preserves Google and Copilot account defaults when the current provider constraint migration is reapplied", async () => {
const saved = await service.save(companyId, "bob", {
provider: "google", method: "api_key", ownership: "personal", name: "Google migration",
apiKey: "fixture", allAgents: true, agentIds: [],
}, "google-migration-key");
- const migration = await readFile(new URL("../../../packages/db/src/migrations/0306_familiar_titania.sql", import.meta.url), "utf8");
+ await db.insert(companyMemberships).values({ companyId, principalId: "migration-copilot", principalType: "user", status: "active", membershipRole: "member" });
+ const copilot = await service.save(companyId, "migration-copilot", {
+ provider: "github", method: "api_key", ownership: "personal", name: "Copilot migration",
+ apiKey: "fixture", allAgents: true, agentIds: [],
+ }, "github_pat_fixture_migration");
+ await service.setDefault(companyId, "migration-copilot", copilot.grantId);
+ const migration = await readFile(new URL("../../../packages/db/src/migrations/0361_mighty_dracula.sql", import.meta.url), "utf8");
for (let attempt = 0; attempt < 2; attempt += 1) {
await db.transaction(async (tx) => {
for (const statement of migration.split("--> statement-breakpoint")) {
@@ -868,6 +1091,12 @@ console.log(JSON.stringify({ type: "result", subtype: "success", result: "hello"
binding: { provider: "google", method: "api_key", mode: "responsible_user" },
});
expect(selected.grant.id).toBe(saved.grantId);
+ const selectedCopilot = await service.select({
+ companyId, agentId, userId: "migration-copilot", adapterType: "paperclip_runner",
+ runnerProvider: "acpx", acpxAgent: "copilot", model: "gpt-5.6-luna",
+ binding: { provider: "github", method: "api_key", mode: "responsible_user" },
+ });
+ expect(selectedCopilot.grant.id).toBe(copilot.grantId);
});
it.each([false, true])("reports the authoritative connection-manager capability for custom grants (manager: %s)", async (manager) => {
diff --git a/server/src/__tests__/connection-intents-service.test.ts b/server/src/__tests__/connection-intents-service.test.ts
index 77eb29076a..0638bd5f29 100644
--- a/server/src/__tests__/connection-intents-service.test.ts
+++ b/server/src/__tests__/connection-intents-service.test.ts
@@ -398,7 +398,7 @@ describeEmbeddedPostgres("connectionIntentService", () => {
});
});
- it("only advertises GitHub tool methods in search and setup options", async () => {
+ it("separates GitHub runtime discovery from tool setup options", async () => {
const service = connectionIntentService(db);
const search = await service.search(claims, "github");
const github = search.results.find((result) => result.service === "github");
@@ -409,6 +409,12 @@ describeEmbeddedPostgres("connectionIntentService", () => {
key: "mcp-key",
label: "Personal access token (advanced)",
auth: "api_key",
+ purpose: "tool",
+ }),
+ expect.objectContaining({
+ key: "copilot-token",
+ purpose: "ai",
+ setupPath: expect.stringContaining("/apps/connect?source=github"),
}),
],
}),
@@ -433,6 +439,7 @@ describeEmbeddedPostgres("connectionIntentService", () => {
expect(setup.service.methods.map((method) => method.key)).not.toContain(
"chat-agent",
);
+ expect(setup.service.methods.map((method) => method.key)).not.toContain("copilot-token");
});
it("serializes OAuth intent completion behind addressed-user membership revocation", async () => {
diff --git a/server/src/__tests__/copilot-connection-probe.test.ts b/server/src/__tests__/copilot-connection-probe.test.ts
new file mode 100644
index 0000000000..a6ad1d4e0c
--- /dev/null
+++ b/server/src/__tests__/copilot-connection-probe.test.ts
@@ -0,0 +1,125 @@
+import { beforeEach, describe, expect, it, vi } from "vitest";
+import { environmentRuntimeService } from "../services/environment-runtime.js";
+import type { PluginWorkerManager } from "../services/plugin-worker-manager.js";
+const mocks = vi.hoisted(() => ({ metadata: vi.fn(), command: vi.fn(), environment: vi.fn(), bindings: vi.fn(), acquire: vi.fn(), realize: vi.fn(), release: vi.fn(), resolve: vi.fn(), general: vi.fn(), experimental: vi.fn(), defaults: vi.fn(), kubernetes: vi.fn(), managed: vi.fn() }));
+vi.mock("../vendor/paperclip-runner/live/index.js", async importOriginal => ({ ...await importOriginal<object>(), probeCopilotMetadata: mocks.metadata }));
+vi.mock("@paperclipai/adapter-utils/execution-target", () => ({ runAdapterExecutionTargetShellCommand: mocks.command }));
+vi.mock("../middleware/logger.js", () => ({ logger: { warn: vi.fn() } }));
+vi.mock("../services/environments.js", () => ({ environmentService: () => ({ getById: mocks.environment, listBoundCompanyIds: mocks.bindings, findKubernetesEnvironment: mocks.kubernetes, findManagedSandboxEnvironment: mocks.managed }) }));
+vi.mock("../services/instance-settings.js", () => ({ instanceSettingsService: () => ({ get: mocks.defaults, getGeneral: mocks.general, getExperimental: mocks.experimental }) }));
+vi.mock("../services/environment-runtime.js", () => ({ environmentRuntimeService: vi.fn(() => ({ acquireRunLease: mocks.acquire, realizeWorkspace: mocks.realize, getDriver: () => ({ releaseRunLease: mocks.release }) })) }));
+vi.mock("../services/environment-execution-target.js", () => ({ resolveEnvironmentExecutionTarget: mocks.resolve }));
+import { logger } from "../middleware/logger.js";
+import { probeCopilotConnection, probeCopilotExecutionTarget } from "../services/copilot-connection-probe.js";
+import { QUALIFIED_ACPX_PROFILES } from "../../../packages/paperclip-runner/src/drivers/acpx/qualified-profiles.js";
+import type { Db } from "@paperclipai/db";
+import type { AdapterExecutionTarget } from "@paperclipai/adapter-utils/execution-target";
+const verified = { status: "verified", version: "1.0.88", profileDigest: QUALIFIED_ACPX_PROFILES.copilot.commandDigest, promptSent: false, models: [{ id: "gpt-5.6-luna", label: "GPT" }] };
+const remote = { kind: "remote", remoteCwd: "/workspace" } as AdapterExecutionTarget;
+beforeEach(() => {
+ vi.clearAllMocks(); mocks.command.mockReset(); mocks.general.mockResolvedValue({ executionMode: "local" }); mocks.experimental.mockResolvedValue({}); mocks.defaults.mockResolvedValue({ defaultEnvironmentId: null });
+ mocks.environment.mockResolvedValue({ id: "selected", driver: "sandbox", status: "active", config: { provider: "daytona" } }); mocks.bindings.mockResolvedValue(["company"]);
+ mocks.acquire.mockResolvedValue({ lease: { id: "lease", metadata: {} } }); mocks.realize.mockResolvedValue({}); mocks.release.mockResolvedValue(undefined); mocks.resolve.mockResolvedValue(remote);
+ mocks.command.mockResolvedValue({ timedOut: false, stdout: JSON.stringify(verified), exitCode: 0 }); mocks.metadata.mockResolvedValue(verified);
+});
+describe("Copilot connection verification", () => {
+ it.each(["ssh", "sandbox", "plugin"])("keeps an explicitly selected %s environment under managed-only execution", async driver => {
+ mocks.experimental.mockResolvedValue({ enableManagedSandboxOnly: true });
+ mocks.environment.mockResolvedValue({ id: "selected", driver, status: "active", config: { provider: "daytona" } });
+ expect(await probeCopilotConnection({} as Db, "company", "private-token", "selected")).toEqual(verified);
+ expect(mocks.managed).not.toHaveBeenCalled();
+ expect(mocks.resolve).toHaveBeenCalledWith(expect.objectContaining({ environment: expect.objectContaining({ id: "selected", driver }) }));
+ expect(mocks.metadata).not.toHaveBeenCalled();
+ expect(mocks.command).toHaveBeenCalledOnce();
+ });
+ it.each([null, "local"])("redirects only a local selection (%s) onto the managed environment", async selection => {
+ mocks.experimental.mockResolvedValue({ enableManagedSandboxOnly: true });
+ mocks.managed.mockResolvedValue({ id: "managed" });
+ mocks.environment.mockImplementation(async id => ({ id, driver: id === "local" ? "local" : "sandbox", status: "active", config: { provider: "daytona" } }));
+ expect(await probeCopilotConnection({} as Db, "company", "private-token", selection)).toEqual(verified);
+ expect(mocks.resolve).toHaveBeenCalledWith(expect.objectContaining({ environment: expect.objectContaining({ id: "managed" }) }));
+ expect(mocks.metadata).not.toHaveBeenCalled();
+ });
+ it("gives forced Kubernetes precedence over an explicitly selected remote and managed-only policy", async () => {
+ mocks.general.mockResolvedValue({ executionMode: "kubernetes" });
+ mocks.experimental.mockResolvedValue({ enableManagedSandboxOnly: true });
+ mocks.kubernetes.mockResolvedValue({ id: "kubernetes" });
+ mocks.environment.mockImplementation(async id => ({ id, driver: "sandbox", status: "active", config: { provider: "kubernetes" } }));
+ expect(await probeCopilotConnection({} as Db, "company", "private-token", "selected")).toEqual(verified);
+ expect(mocks.resolve).toHaveBeenCalledWith(expect.objectContaining({ environment: expect.objectContaining({ id: "kubernetes" }) }));
+ expect(mocks.managed).not.toHaveBeenCalled();
+ expect(mocks.metadata).not.toHaveBeenCalled();
+ });
+ it("probes the selected environment and releases its owned lease", async () => {
+ const db = {} as Db;
+ const pluginWorkerManager = {} as PluginWorkerManager;
+ expect(await probeCopilotConnection(db, "company", "private-token", "selected", "gpt-5.6-luna", { pluginWorkerManager })).toEqual(verified);
+ expect(environmentRuntimeService).toHaveBeenCalledWith(db, { pluginWorkerManager });
+ expect(mocks.metadata).not.toHaveBeenCalled(); expect(mocks.acquire).toHaveBeenCalledOnce();
+ expect(mocks.command.mock.calls[0]![3]).toMatchObject({ env: { COPILOT_GITHUB_TOKEN: "private-token", PAPERCLIP_COPILOT_PROBE_MODEL: "gpt-5.6-luna" }, timeoutSec: 35 });
+ expect(mocks.command.mock.calls[0]![2]).not.toContain("private-token");
+ expect(mocks.release).toHaveBeenCalledWith(expect.objectContaining({ status: "released" }));
+ });
+ it("rejects a foreign company before creating a lease or transmitting the token", async () => {
+ mocks.bindings.mockResolvedValue(["other-company"]);
+ await expect(probeCopilotConnection({} as Db, "company", "private-token", "selected")).rejects.toMatchObject({ status: 403 });
+ expect(mocks.command).not.toHaveBeenCalled(); expect(mocks.metadata).not.toHaveBeenCalled(); expect(mocks.acquire).not.toHaveBeenCalled();
+ });
+ it("does not fall back to host credentials when the remote runtime is missing", async () => {
+ mocks.command.mockResolvedValue({ timedOut: false, stdout: "", exitCode: 127 });
+ await expect(probeCopilotConnection({} as Db, "company", "private-token", "selected")).rejects.toMatchObject({ details: { code: "COPILOT_INSTALLATION_INVALID" } });
+ expect(mocks.metadata).not.toHaveBeenCalled(); expect(mocks.release).toHaveBeenCalledWith(expect.objectContaining({ status: "failed" }));
+ });
+ it("sanitizes remote errors and releases the lease on authentication failure", async () => {
+ mocks.command.mockResolvedValue({ timedOut: false, stdout: JSON.stringify({ status: "failed", code: "COPILOT_AUTH_REQUIRED", promptSent: false, message: "private-token" }), exitCode: 1 });
+ const error = await probeCopilotConnection({} as Db, "company", "private-token", "selected").catch(e => e);
+ expect(error.details.code).toBe("COPILOT_AUTH_REQUIRED"); expect(error.message).not.toContain("private-token"); expect(mocks.release).toHaveBeenCalledOnce();
+ });
+ it("preserves authentication classification when lease cleanup also fails", async () => {
+ mocks.command.mockResolvedValue({ timedOut: false, stdout: JSON.stringify({ status: "failed", code: "COPILOT_AUTH_REQUIRED", promptSent: false, message: "private-token" }), exitCode: 1 });
+ mocks.release.mockRejectedValue(new Error("cleanup private-token"));
+ const error = await probeCopilotConnection({} as Db, "company", "private-token", "selected").catch(e => e);
+ expect(error).toMatchObject({ status: 422, details: { code: "COPILOT_AUTH_REQUIRED" } });
+ expect(error.message).not.toContain("private-token");
+ expect(logger.warn).toHaveBeenCalledWith({ companyId: "company", environmentId: "selected", leaseId: "lease", code: "COPILOT_PROBE_CLEANUP_FAILED" }, expect.any(String));
+ expect(JSON.stringify(vi.mocked(logger.warn).mock.calls)).not.toContain("private-token");
+ expect(mocks.release).toHaveBeenCalledOnce();
+ });
+ it("does not verify a connection when its successful probe cannot clean up", async () => {
+ mocks.release.mockRejectedValue(new Error("cleanup private-token"));
+ const error = await probeCopilotConnection({} as Db, "company", "private-token", "selected").catch(e => e);
+ expect(error).toMatchObject({ status: 422, details: { code: "COPILOT_REQUEST_FAILED", cleanupCode: "COPILOT_PROBE_CLEANUP_FAILED" } });
+ expect(error.message).not.toContain("private-token");
+ expect(mocks.release).toHaveBeenCalledOnce();
+ });
+ it("rejects stale profile results and unavailable model selections", async () => {
+ mocks.command.mockResolvedValue({ timedOut: false, stdout: JSON.stringify({ ...verified, profileDigest: "stale" }), exitCode: 0 });
+ await expect(probeCopilotExecutionTarget("private-token", remote)).rejects.toMatchObject({ details: { code: "COPILOT_REQUEST_FAILED" } });
+ mocks.command.mockResolvedValue({ timedOut: false, stdout: JSON.stringify(verified), exitCode: 0 });
+ await expect(probeCopilotExecutionTarget("private-token", remote, "missing")).rejects.toMatchObject({ details: { code: "COPILOT_MODEL_UNAVAILABLE" } });
+ });
+});
+
+describe("remote Copilot installation fallback", () => {
+ it.each(["missing", "incomplete", "stale-profile"])("uses the valid home pack after rejecting a %s opt pack", async variant => {
+ const rejected = variant === "missing" ? { timedOut: false, stdout: "", exitCode: 127 }
+ : { timedOut: false, exitCode: variant === "incomplete" ? 1 : 0, stdout: JSON.stringify(variant === "incomplete"
+ ? { status: "failed", code: "COPILOT_INSTALLATION_INVALID", promptSent: false }
+ : { ...verified, profileDigest: `sha256:${"0".repeat(64)}` }) };
+ mocks.command.mockResolvedValueOnce(rejected).mockResolvedValueOnce({ timedOut: false, stdout: JSON.stringify(verified), exitCode: 0 });
+ await expect(probeCopilotExecutionTarget("private-token", remote, "gpt-5.6-luna")).resolves.toEqual(verified);
+ expect(mocks.command).toHaveBeenCalledTimes(2);
+ expect(mocks.command.mock.calls[0]![2]).toContain("/opt/paperclip-runner/provider-pack");
+ expect(mocks.command.mock.calls[1]![2]).toContain("$HOME/.local/share/paperclip-runner/provider-pack");
+ for (const call of mocks.command.mock.calls) {
+ expect(call[2]).not.toContain("private-token");
+ expect(call[3].env).toMatchObject({ COPILOT_GITHUB_TOKEN: "private-token", PAPERCLIP_COPILOT_PROBE_MODEL: "gpt-5.6-luna" });
+ expect(call[3].timeoutSec).toBeLessThanOrEqual(35);
+ }
+ });
+ it.each(["COPILOT_AUTH_REQUIRED", "COPILOT_ENTITLEMENT_DENIED", "COPILOT_MODEL_UNAVAILABLE"])("keeps %s and does not try another installation", async code => {
+ mocks.command.mockResolvedValueOnce({ timedOut: false, exitCode: 1, stdout: JSON.stringify({ status: "failed", code, promptSent: false }) });
+ await expect(probeCopilotExecutionTarget("private-token", remote)).rejects.toMatchObject({ details: { code } });
+ expect(mocks.command).toHaveBeenCalledOnce();
+ });
+});
diff --git a/server/src/__tests__/idle-admission.test.ts b/server/src/__tests__/idle-admission.test.ts
index d9b7cd269f..4c8e86775f 100644
--- a/server/src/__tests__/idle-admission.test.ts
+++ b/server/src/__tests__/idle-admission.test.ts
@@ -1,6 +1,7 @@
import express from "express";
import request from "supertest";
import { request as httpRequest } from "node:http";
+import { createServer as createViteServer } from "vite";
import { afterEach, describe, expect, it } from "vitest";
import { idleAdmissionMiddleware, trackIdleRequestHandlers } from "../middleware/idle-admission.js";
import { idleWorkSnapshot, startTaskDrain, stopTaskDrain, readTaskDrain, beginIdleTrackedWork } from "../services/task-admission.js";
@@ -49,6 +50,36 @@ describe("idle admission", () => {
expect(idleWorkSnapshot().active).toBe(0);
});
+ it("tracks ordinary middleware with non-router stack metadata", async () => {
+ const server = app(), done = deferred();
+ const middleware = Object.assign(async (_req: express.Request, res: express.Response) => {
+ res.sendStatus(202); await done.promise;
+ }, { stack: { name: "middleware metadata" } });
+ server.use(middleware);
+ expect(() => trackIdleRequestHandlers(server)).not.toThrow();
+ await request(server).get("/work").expect(202);
+ expect(idleWorkSnapshot().active).toBe(1);
+ done.resolve();
+ await new Promise(resolve => setImmediate(resolve));
+ expect(idleWorkSnapshot().active).toBe(0);
+ });
+
+ it("supports real Vite Connect route metadata without losing async work", async () => {
+ const vite = await createViteServer({ configFile: false, appType: "custom",
+ server: { middlewareMode: true, watch: null }, optimizeDeps: { noDiscovery: true, include: [] } });
+ const server = app(), done = deferred();
+ try {
+ server.use(vite.middlewares);
+ server.post("/work", async (_req, res) => { res.sendStatus(202); await done.promise; });
+ expect(() => trackIdleRequestHandlers(server)).not.toThrow();
+ await request(server).post("/work").expect(202);
+ expect(idleWorkSnapshot().active).toBe(1);
+ done.resolve();
+ await new Promise(resolve => setImmediate(resolve));
+ expect(idleWorkSnapshot().active).toBe(0);
+ } finally { await vite.close(); }
+ });
+
it("tracks real Vite middleware without confusing Connect mount paths with Express routes", async () => {
const { createServer } = await import("vite");
const vite = await createServer({
diff --git a/server/src/__tests__/workspace-runtime.test.ts b/server/src/__tests__/workspace-runtime.test.ts
index 7555513439..c3d17eae42 100644
--- a/server/src/__tests__/workspace-runtime.test.ts
+++ b/server/src/__tests__/workspace-runtime.test.ts
@@ -7480,7 +7480,7 @@ describeEmbeddedPostgres("workspace runtime service control persistence", () =>
const blockerScript = [
"const net=require('node:net');",
"const port=Number(process.argv[1]);",
- "net.createServer((socket)=>socket.destroy()).listen(port,'127.0.0.1');",
+ "net.createServer((socket)=>socket.destroy()).listen(port,'127.0.0.1',()=>process.send({ready:true}));",
].join("");
const raceScript = [
"const fs=require('node:fs');",
@@ -7493,8 +7493,10 @@ describeEmbeddedPostgres("workspace runtime service control persistence", () =>
"const start=()=>http.createServer((_req,res)=>res.end('ok')).listen(port,'127.0.0.1');",
"if(!fs.existsSync(marker)){",
"fs.writeFileSync(marker,String(port));",
- "const blocker=spawn(process.execPath,['-e',blockerScript,String(port)],{detached:true,stdio:'ignore'});",
- "fs.writeFileSync(pidFile,String(blocker.pid));blocker.unref();setTimeout(start,200);",
+ "const blocker=spawn(process.execPath,['-e',blockerScript,String(port)],{detached:true,stdio:['ignore','ignore','ignore','ipc']});",
+ "fs.writeFileSync(pidFile,String(blocker.pid));",
+ "const readyDeadline=setTimeout(()=>{throw new Error('Fixture blocker did not become ready');},5000);",
+ "blocker.once('message',(message)=>{if(message?.ready!==true)throw new Error('Invalid fixture readiness message');clearTimeout(readyDeadline);blocker.disconnect();blocker.unref();start();});",
"}else{start();}",
"setInterval(()=>{},1000);",
].join("");
diff --git a/server/src/adapters/registry.ts b/server/src/adapters/registry.ts
index 0f2b023f11..f599557211 100644
--- a/server/src/adapters/registry.ts
+++ b/server/src/adapters/registry.ts
@@ -1,3 +1,4 @@
+import { HttpError } from "../errors.js";
import type { AdapterRuntimeCommandSpec, ServerAdapterModule } from "./types.js";
import { parseAdapterModelsEnv } from "../services/adapter-models-env.js";
import { validateAiApiKey } from "../services/ai-api-key-test.js";
@@ -443,16 +444,21 @@ const paperclipRunnerAdapter: ServerAdapterModule = {
checks: [{ code: "dot_event_test_required", level: "warn" as const, message: "Dot manages its model and billing. Validate the dedicated agent binding and event round trip in Paperclip; this read-only check does not wake the Dot." }] };
}
if (profile.provider === "acpx") {
- if (["copilot"].includes(profile.acpxAgent)) {
- // The profile resolver already validated the isolated host's exact
- // qualification pair. Do not report a production readiness pass.
- return {
- adapterType: "paperclip_runner", status: "warn" as const, testedAt: new Date().toISOString(),
- checks: [{ code: "acpx_candidate_qualification_only", level: "warn" as const,
- message: "This exact candidate and model are admitted for operator-controlled qualification only. Verified runtime installation, bound credentials, and model access are checked before execution; production support remains pending." }],
- };
- }
try {
+ if (profile.acpxAgent === "copilot") {
+ const configured = context.config.env;
+ const token = configured && typeof configured === "object" && !Array.isArray(configured)
+ ? (configured as Record<string, unknown>).COPILOT_GITHUB_TOKEN : undefined;
+ if (typeof token !== "string" || !token) {
+ return { adapterType: "paperclip_runner", status: "fail" as const, testedAt: new Date().toISOString(),
+ checks: [{ code: "COPILOT_AUTH_REQUIRED", level: "error" as const, message: "Select a saved Copilot token connection." }] };
+ }
+ const { probeCopilotExecutionTarget } = await import("../services/copilot-connection-probe.js");
+ await probeCopilotExecutionTarget(token, context.executionTarget, profile.model);
+ return { adapterType: "paperclip_runner", status: "pass" as const, testedAt: new Date().toISOString(),
+ checks: [{ code: "copilot_metadata_verified", level: "info" as const,
+ message: "The verified Copilot runtime authenticated this account and accepted the selected model. No model prompt was sent." }] };
+ }
if (profile.acpxAgent !== "claude" && profile.acpxAgent !== "grok" && profile.acpxAgent !== "cursor" && profile.acpxAgent !== "pi") throw new Error("Select Codex to use the native Codex runner.");
const target = context.executionTarget;
if (target?.kind === "remote") {
@@ -478,6 +484,14 @@ const paperclipRunnerAdapter: ServerAdapterModule = {
checks: [{ code: "acpx_runtime_ready", level: "info" as const, message: `ACPX ${profile.acpxAgent} runtime is installed and verified. Model access is checked when it runs.` }],
});
} catch (error) {
+ if (profile.acpxAgent === "copilot") {
+ const details = error instanceof HttpError && error.details && typeof error.details === "object" && !Array.isArray(error.details)
+ ? error.details as Record<string, unknown> : {};
+ const codes = ["COPILOT_AUTH_REQUIRED", "COPILOT_ENTITLEMENT_DENIED", "COPILOT_MODEL_UNAVAILABLE", "COPILOT_INSTALLATION_INVALID", "COPILOT_REQUEST_FAILED"];
+ const code = typeof details.code === "string" && codes.includes(details.code) ? details.code : "COPILOT_REQUEST_FAILED";
+ return { adapterType: "paperclip_runner", status: "fail" as const, testedAt: new Date().toISOString(),
+ checks: [{ code, level: "error" as const, message: error instanceof HttpError ? error.message : "Copilot metadata verification failed." }] };
+ }
return {
adapterType: "paperclip_runner", status: "fail" as const, testedAt: new Date().toISOString(),
checks: [{
@@ -565,7 +579,7 @@ const paperclipRunnerAdapter: ServerAdapterModule = {
)
: buildNpmRuntimeCommandSpec(config, "codex", "@openai/[email protected]"),
agentConfigurationDoc:
- "# Paperclip Runner\n\nAdapter: paperclip_runner\n\nRuns Codex, OpenCode, Claude Managed, AWS AgentCore, or ACPX Claude/Grok Build/Cursor/Pi through the Rust Paperclip runner and authenticated PRP transport. Pi accepts an explicit provider/model ID and uses the company credentials bound to the agent environment. GitHub Copilot awaits local and Daytona qualification. Managed providers use company-scoped qualified profiles, explicit retention acknowledgement, and spend limits.\n",
+ "# Paperclip Runner\n\nAdapter: paperclip_runner\n\nRuns Codex, OpenCode, Claude Managed, AWS AgentCore, or ACPX Claude/Grok Build/Cursor/Pi through the Rust Paperclip runner and authenticated PRP transport. Pi accepts an explicit provider/model ID and uses the company credentials bound to the agent environment. GitHub Copilot requires a saved GitHub token and an explicitly selected available model. Managed providers use company-scoped qualified profiles, explicit retention acknowledgement, and spend limits.\n",
getConfigSchema: () => ({
fields: [
{
@@ -584,7 +598,7 @@ const paperclipRunnerAdapter: ServerAdapterModule = {
},
{
key: "acpxAgent", label: "ACP agent", type: "select" as const, default: "claude",
- options: [{ value: "claude", label: "Claude" }, { value: "grok", label: "Grok Build" }],
+ options: [{ value: "claude", label: "Claude" }, { value: "grok", label: "Grok Build" }, { value: "copilot", label: "GitHub Copilot" }],
meta: { visibleWhen: { key: "provider", value: "acpx" } },
},
{
diff --git a/server/src/app.ts b/server/src/app.ts
index 841046cd99..71ea02af04 100644
--- a/server/src/app.ts
+++ b/server/src/app.ts
@@ -954,7 +954,7 @@ export async function createApp(
api.use(decisionModelRoutes(db));
api.use(agentObservabilityRoutes(db, { deploymentMode: opts.deploymentMode, deploymentExposure: opts.deploymentExposure }));
api.use(fastResponseRoutes(db));
- api.use(aiConnectionRoutes(db, { deploymentMode: opts.deploymentMode, deploymentExposure: opts.deploymentExposure, trustedLocalStdioRuntimeHost }));
+ api.use(aiConnectionRoutes(db, { deploymentMode: opts.deploymentMode, deploymentExposure: opts.deploymentExposure, trustedLocalStdioRuntimeHost, pluginWorkerManager: workerManager }));
api.use(
toolAccessRoutes(db, {
deploymentMode: opts.deploymentMode,
diff --git a/server/src/middleware/idle-admission.ts b/server/src/middleware/idle-admission.ts
index bc6a28d35c..aed6be2a1f 100644
--- a/server/src/middleware/idle-admission.ts
+++ b/server/src/middleware/idle-admission.ts
@@ -74,10 +74,9 @@ export function trackIdleRequestHandlers(app: Application): void {
for (const layer of stack) {
if (seen.has(layer)) continue;
seen.add(layer);
- // Connect/Vite layers use a mount-path string for route; only Express
- // Route objects contain a nested handler stack.
- if (layer.route && typeof layer.route !== "string") { visit(layer.route.stack, true); continue; }
- if (layer.handle.stack) { visit(layer.handle.stack); continue; }
+ // Connect/Vite mount paths are strings; Express Route stacks are arrays.
+ if (layer.route && typeof layer.route !== "string" && Array.isArray(layer.route.stack)) { visit(layer.route.stack, true); continue; }
+ if (Array.isArray(layer.handle.stack)) { visit(layer.handle.stack); continue; }
const original = layer.handle;
if (original === idleAdmissionMiddleware) continue;
const invoke = (req: Request, args: unknown[]) => {
diff --git a/server/src/routes/agents.ts b/server/src/routes/agents.ts
index 2edfea26c0..2ca76427c6 100644
--- a/server/src/routes/agents.ts
+++ b/server/src/routes/agents.ts
@@ -22,10 +22,12 @@ import {
ADAPTER_AUTH_MISSING_CHECK_CODE,
aiConnectionBindingSchema,
aiRuntimeConnectionBindingSchema,
+ type AiConnectionBinding,
type AiRuntimeConnectionBinding,
} from "@paperclipai/shared";
import { toolConnections } from "@paperclipai/db";
import { aiConnectionService } from "../services/ai-connections.js";
+import { probeCopilotConnection, probeCopilotExecutionTarget } from "../services/copilot-connection-probe.js";
import { defaultAiConnectionForHire } from "../services/agent-ai-connection-default.js";
import { assertAiConnectionCreateAccess, canInstallSharedAiConnectionForNewAgent, responsibleUserForAiRequest } from "./ai-connections.js";
import { isAiConnectionCompatible } from "@paperclipai/shared";
@@ -1849,7 +1851,10 @@ export function agentRoutes(
if (experimental.enableMuse !== true || experimental.enableNativeRunner !== true) throw unprocessable("Muse is experimental and disabled on this instance.", { code: "paperclip_runner_muse_disabled" });
} else if (asRecord(config)?.provider === "grok_bot" && (experimental.enableGrokBot !== true || experimental.enablePublicMcp !== true || experimental.enableNativeRunner !== true)) {
throw unprocessable("Enable Grok Bot, Assistant connections (MCP), and Paperclip Runner before connecting this agent.", { code: "paperclip_runner_grok_disabled" });
- } else if (!([undefined, "codex"].includes(asRecord(config)?.provider as string | undefined)) && agentHarnessType("paperclip_runner", asRecord(config) ?? {}) !== "claude_local" && experimental.enableNativeRunner !== true) {
+ } else if (!([undefined, "codex"].includes(asRecord(config)?.provider as string | undefined)) &&
+ !(asRecord(config)?.provider === "acpx" && asRecord(config)?.acpxAgent === "copilot") &&
+ agentHarnessType("paperclip_runner", asRecord(config) ?? {}) !== "claude_local" &&
+ experimental.enableNativeRunner !== true) {
throw unprocessable(
"Paperclip Runner is experimental and disabled on this instance.",
{ code: "paperclip_runner_rollout_disabled" },
@@ -2126,11 +2131,20 @@ export function agentRoutes(
runtimeConfig: unknown,
) {
const normalized = normalizeNewAgentRuntimeConfig(runtimeConfig);
- if (req.actor.type !== "agent" || normalized.aiConnection) return normalized;
- const manager = req.actor.agentId ? await svc.getById(req.actor.agentId) : null;
- if (!manager || manager.companyId !== companyId) throw forbidden("Hiring agent is unavailable");
- const binding = defaultAiConnectionForHire(adapterType, adapterConfig, manager.runtimeConfig?.aiConnection);
- if (binding) normalized.aiConnection = binding;
+ if (normalized.aiConnection) return normalized;
+ if (req.actor.type === "agent") {
+ const manager = req.actor.agentId ? await svc.getById(req.actor.agentId) : null;
+ if (!manager || manager.companyId !== companyId) throw forbidden("Hiring agent is unavailable");
+ const binding = defaultAiConnectionForHire(adapterType, adapterConfig, manager.runtimeConfig?.aiConnection);
+ if (binding) normalized.aiConnection = binding;
+ }
+ // Copilot has no ambient-auth setup path. Omitting a binding still selects
+ // the responsible user's saved account and must pass the same metadata
+ // admission as an explicit connection before configuration is persisted.
+ if (!normalized.aiConnection && adapterType === "paperclip_runner"
+ && adapterConfig.provider === "acpx" && adapterConfig.acpxAgent === "copilot") {
+ normalized.aiConnection = { provider: "github", method: "api_key", mode: "responsible_user" };
+ }
return normalized;
}
@@ -3011,6 +3025,32 @@ export function agentRoutes(
return;
}
const provider = asNonEmptyString(req.query.provider);
+ if (type === "paperclip_runner" && provider === "acpx" && req.query.acpxAgent === "copilot") {
+ const userId = responsibleUserForAiRequest(req);
+ let binding: AiConnectionBinding = { provider: "github", method: "api_key", mode: "responsible_user" };
+ if (typeof req.query.aiConnection === "string") {
+ if (req.query.aiConnection.length > 4096) throw unprocessable("Invalid AI connection binding");
+ try { binding = aiConnectionBindingSchema.parse(JSON.parse(req.query.aiConnection)); }
+ catch { throw unprocessable("Invalid AI connection binding"); }
+ }
+ if (binding.provider !== "github") throw unprocessable("Select a GitHub Copilot AI connection");
+ const modelAgentId = asNonEmptyString(req.query.agentId);
+ let modelEnvironmentId = environmentId;
+ if (modelAgentId) {
+ const modelAgent = await svc.getById(modelAgentId);
+ if (!modelAgent || modelAgent.companyId !== companyId) throw notFound("Agent not found");
+ await assertCanUpdateAgent(req, modelAgent);
+ modelEnvironmentId ??= modelAgent.defaultEnvironmentId ?? null;
+ } else await assertCanCreateAgentsForCompany(req, companyId);
+ const allowUninstalledShared = !modelAgentId && await canInstallSharedAiConnectionForNewAgent(db, req, companyId, binding);
+ const service = aiConnectionService(db);
+ const selection = await service.select({ companyId, userId, agentId: modelAgentId ?? "00000000-0000-0000-0000-000000000000",
+ adapterType: type, runnerProvider: "acpx", acpxAgent: "copilot", binding, allowUninstalledPersonal: true, allowUninstalledShared });
+ const metadata = await probeCopilotConnection(db, companyId, await service.credential(selection), modelEnvironmentId, undefined, { pluginWorkerManager: options.pluginWorkerManager });
+ res.setHeader("Cache-Control", "no-store");
+ res.json(metadata.models);
+ return;
+ }
if (type === "opencode_local" && provider === "openrouter") {
res.json(await listOpenRouterModels(refresh));
return;
@@ -3075,15 +3115,18 @@ export function agentRoutes(
// Hiring is allowed before the responsible user has connected this
// provider. Execution still resolves credentials and creates the normal
// task connection request; compatibility and access denials stay errors.
- if (newAgent && !test && binding.mode === "responsible_user" && error instanceof HttpError
+ if (newAgent && !test && binding.provider !== "github" && binding.mode === "responsible_user" && error instanceof HttpError
&& ["ai_connection_default_missing", "ai_connection_missing", "ai_connection_unavailable", "ai_connection_responsible_user_missing"].includes(String(asRecord(error.details)?.code))) {
return null;
}
throw error;
});
if (!selection) return undefined;
- if (test) {
- const testEnvironmentId = await resolveAdapterTestEnvironmentId(companyId, environmentId);
+ // Copilot model availability is account-specific. Verify the selected
+ // packaged runtime before creation/adoption even when a token is saved.
+ // This metadata-only path sends no model prompt.
+ if (test || binding.provider === "github") {
+ const testEnvironmentId = await resolveAdapterTestEnvironmentId(companyId, environmentId, binding.provider === "github");
if (testEnvironmentId) await assertAdapterTestEnvironmentForCompany(companyId, testEnvironmentId);
const target = await resolveAdapterTestExecutionContext({ companyId, adapterType, environmentId: testEnvironmentId });
try {
@@ -3092,6 +3135,10 @@ export function agentRoutes(
const managedAiCredentialHome = adapterType === "paperclip_runner" && asRecord(managed.config)?.provider === "codex" && managed.home
? path.join(managed.home, "provider") : undefined;
const result = await testManagedEnvironment(adapterType, { companyId, adapterType, config: managed.config, managedAiCredentialHome, executionTarget: target.executionTarget, environmentName: target.environmentName }, binding, managed, agentId);
+ if (binding.provider === "github" && result.status === "fail") {
+ const failure = result.checks.find(check => check.level === "error");
+ throw unprocessable(failure?.message ?? "Copilot metadata verification failed.", { code: failure?.code ?? "COPILOT_REQUEST_FAILED" });
+ }
if (result.status === "fail" || result.checks.some(check => check.code === ADAPTER_AUTH_MISSING_CHECK_CODE)) throw unprocessable("The selected AI connection failed validation in this agent’s environment. Run the agent test to see the failing checks.", {
code: "ai_connection_validation_failed",
checks: result.checks.filter(check => check.level === "error" || check.code === ADAPTER_AUTH_MISSING_CHECK_CODE).map(check => ({ code: check.code, level: check.level })),
@@ -3132,6 +3179,7 @@ export function agentRoutes(
req.body.environmentId === undefined
? savedAgent?.defaultEnvironmentId
: asNonEmptyString(req.body.environmentId),
+ aiBinding?.provider === "github",
);
// Fail closed on a foreign environment before any secret resolution, env
// merge, target resolution, sandbox lease, or adapter test runs.
@@ -5390,13 +5438,23 @@ export function agentRoutes(
});
}
if (existing.runtimeConfig.aiConnection && requestedRuntimeConfig && !requestedRuntimeConfig.aiConnection) requestedRuntimeConfig.aiConnection = existing.runtimeConfig.aiConnection;
+ const nextAiConfig = (patchData.adapterConfig ?? existing.adapterConfig) as Record<string, unknown>;
+ if (!requestedRuntimeConfig?.aiConnection && !existing.runtimeConfig.aiConnection
+ && requestedAdapterType === "paperclip_runner" && nextAiConfig.provider === "acpx"
+ && nextAiConfig.acpxAgent === "copilot"
+ && (touchesAdapterConfiguration || Object.prototype.hasOwnProperty.call(patchData, "defaultEnvironmentId"))) {
+ requestedRuntimeConfig = { ...(requestedRuntimeConfig ?? existing.runtimeConfig),
+ aiConnection: { provider: "github", method: "api_key", mode: "responsible_user" } };
+ }
const nextAiBinding = aiRuntimeConnectionBindingSchema.safeParse(requestedRuntimeConfig?.aiConnection ?? existing.runtimeConfig.aiConnection).data;
if (nextAiBinding) {
await assertCanUpdateAgent(req, existing);
const changed = JSON.stringify(nextAiBinding) !== JSON.stringify(existing.runtimeConfig.aiConnection);
const aiConfig = (patchData.adapterConfig ?? existing.adapterConfig) as Record<string, unknown>;
if (nextAiBinding.mode !== "router" && !isAiConnectionCompatible(nextAiBinding, requestedAdapterType, aiConfig.model, aiConfig.provider, aiConfig.acpxAgent)) throw unprocessable("Select an AI connection compatible with the new harness and model");
- if (changed || (nextAiBinding.mode === "router" && requestedAdapterType !== existing.adapterType)) await validateManagedAgentBinding(req, existing.companyId, existing.id, requestedAdapterType, aiConfig, nextAiBinding, (patchData.defaultEnvironmentId !== undefined ? patchData.defaultEnvironmentId : existing.defaultEnvironmentId) as string | null, true);
+ const copilotConfigurationChanged = requestedAdapterType === "paperclip_runner" && aiConfig.provider === "acpx" && aiConfig.acpxAgent === "copilot"
+ && (touchesAdapterConfiguration || Object.prototype.hasOwnProperty.call(patchData, "defaultEnvironmentId"));
+ if (changed || copilotConfigurationChanged || (nextAiBinding.mode === "router" && requestedAdapterType !== existing.adapterType)) await validateManagedAgentBinding(req, existing.companyId, existing.id, requestedAdapterType, aiConfig, nextAiBinding, (patchData.defaultEnvironmentId !== undefined ? patchData.defaultEnvironmentId : existing.defaultEnvironmentId) as string | null, true);
}
if (requestedRuntimeConfig) patchData.runtimeConfig = requestedRuntimeConfig;
if (touchesAdapterConfiguration || Object.prototype.hasOwnProperty.call(patchData, "defaultEnvironmentId")) {
diff --git a/server/src/routes/ai-connections.ts b/server/src/routes/ai-connections.ts
index ef0498b610..639fc6b232 100644
--- a/server/src/routes/ai-connections.ts
+++ b/server/src/routes/ai-connections.ts
@@ -33,6 +33,8 @@ import { logActivity } from "../services/activity-log.js";
import { aiConnectionRouterService } from "../services/ai-connection-router.js";
import { aiConnectionService } from "../services/ai-connections.js";
import { validate } from "../middleware/validate.js";
+import { probeCopilotConnection } from "../services/copilot-connection-probe.js";
+import type { PluginWorkerManager } from "../services/plugin-worker-manager.js";
/** Agent API calls inherit authenticated run identity, never the agent's own ID. */
export function responsibleUserForAiRequest(req: Request): string | null {
@@ -136,7 +138,7 @@ export async function canInstallSharedAiConnectionForNewAgent(
}
-export function aiConnectionRoutes(db: Db, options: Parameters<typeof supportsLocalAiLogin>[0] = {}) {
+export function aiConnectionRoutes(db: Db, options: Parameters<typeof supportsLocalAiLogin>[0] & { pluginWorkerManager?: PluginWorkerManager } = {}) {
function assertLocalLoginAvailable() {
if (!supportsLocalAiLogin(options)) throw unprocessable("Server-host subscription sign-in is unavailable on this hosted instance. Choose a supported sign-in environment or use an API key.");
}
@@ -303,9 +305,10 @@ export function aiConnectionRoutes(db: Db, options: Parameters<typeof supportsLo
"Use the existing provider sign-in flow to connect a subscription",
);
const attemptStartedAt = new Date();
- // Custom destinations are exercised in the selected execution environment,
- // never fetched by the control plane (including localhost/private URLs).
- if (!input.routing || input.routing.kind === "openrouter") await validateAiApiKey(input.provider, input.apiKey!);
+ if (input.provider === "github") {
+ if (!input.apiKey?.startsWith("github_pat_")) throw unprocessable("Use a personal fine-grained token with Copilot Requests permission.", { code: "COPILOT_AUTH_REQUIRED" });
+ await probeCopilotConnection(db, companyId, input.apiKey, input.environmentId, undefined, { pluginWorkerManager: options.pluginWorkerManager });
+ } else if (!input.routing || input.routing.kind === "openrouter") await validateAiApiKey(input.provider, input.apiKey!);
const result = await service.save(
companyId,
userId,
diff --git a/server/src/services/agent-ai-connection-default.ts b/server/src/services/agent-ai-connection-default.ts
index 1059980e47..c7585da9a2 100644
--- a/server/src/services/agent-ai-connection-default.ts
+++ b/server/src/services/agent-ai-connection-default.ts
@@ -10,6 +10,7 @@ import {
// Only keys read by the child's provider express a child auth override.
// A config copied from another provider can retain unrelated keys.
const PROVIDER_AUTH_ENV_KEYS: Record<AiProvider, readonly string[]> = {
+ github: ["COPILOT_GITHUB_TOKEN"],
google: ["GEMINI_API_KEY", "GOOGLE_API_KEY", "GOOGLE_GEMINI_BASE_URL"],
anthropic: ["ANTHROPIC_API_KEY", "ANTHROPIC_AUTH_TOKEN", "CLAUDE_CODE_OAUTH_TOKEN", "CLAUDE_CONFIG_DIR", "ANTHROPIC_BASE_URL", "CLAUDE_CODE_USE_BEDROCK", "CLAUDE_CODE_USE_VERTEX", "CLAUDE_CODE_USE_FOUNDRY"],
openai: ["OPENAI_API_KEY", "CODEX_API_KEY", "CODEX_HOME", "OPENAI_BASE_URL"],
diff --git a/server/src/services/agent-environment-test.ts b/server/src/services/agent-environment-test.ts
index ae26b719ba..fe5728ac1e 100644
--- a/server/src/services/agent-environment-test.ts
+++ b/server/src/services/agent-environment-test.ts
@@ -12,6 +12,7 @@ import { resolveEnvironmentExecutionTarget } from "./environment-execution-targe
import { prepareManagedAiRuntime, assertManagedAiProjectAuth } from "./ai-connection-runtime.js";
import { aiConnectionService } from "./ai-connections.js";
import { validateAiApiKey } from "./ai-api-key-test.js";
+import { probeCopilotExecutionTarget } from "./copilot-connection-probe.js";
import type { PluginWorkerManager } from "./plugin-worker-manager.js";
import { assertEnvironmentSelectionForCompany } from "./environment-selection.js";
const asRecord = (value: unknown): Record<string, unknown> | null => value && typeof value === "object" && !Array.isArray(value) ? value as Record<string, unknown> : null;
@@ -22,7 +23,12 @@ export function agentEnvironmentTestService(db: Db, pluginWorkerManager?: Plugin
// A null agent override inherits the instance default, just like dispatch.
// Resolve this before secrets or probes so a default remote environment can
// never accidentally validate the account on the control-plane host.
- async function resolveAdapterTestEnvironmentId(companyId: string, environmentId: string | null | undefined) {
+ async function resolveAdapterTestEnvironmentId(companyId: string, environmentId: string | null | undefined, copilot = false) {
+ if (copilot && (await instanceSettings.getGeneral()).executionMode === "kubernetes") {
+ const kubernetes = await environmentsSvc.findKubernetesEnvironment(companyId);
+ if (!kubernetes) throw unprocessable("The Kubernetes execution environment is unavailable.", { code: "copilot_environment_unavailable" });
+ return kubernetes.id;
+ }
if (environmentId) return environmentId;
const settings = await instanceSettings.get();
if (settings.defaultEnvironmentId) return settings.defaultEnvironmentId;
@@ -471,7 +477,7 @@ export function agentEnvironmentTestService(db: Db, pluginWorkerManager?: Plugin
// missing CLI, unavailable environment, or other runtime error does not.
if (result.status === "fail" && result.checks.some(check =>
check.code === ADAPTER_AUTH_MISSING_CHECK_CODE || /_hello_probe_auth_required$/.test(check.code)
- || check.code === "ai_connection_api_key_rejected",
+ || check.code === "ai_connection_api_key_rejected" || check.code === "COPILOT_AUTH_REQUIRED",
)) {
await aiConnectionService(db).markAuthenticationFailed({
companyId: context.companyId, agentId, runStartedAt: startedAt,
@@ -482,6 +488,18 @@ export function agentEnvironmentTestService(db: Db, pluginWorkerManager?: Plugin
}
async function probeManagedEnvironment(adapterType: string, context: Parameters<ReturnType<typeof requireServerAdapter>["testEnvironment"]>[0], binding: AiConnectionBinding) {
+ if (binding.provider === "github") {
+ try {
+ const token = parseObject(context.config.env).COPILOT_GITHUB_TOKEN;
+ if (typeof token !== "string" || !token) throw unprocessable("Select a saved Copilot token.", { code: "COPILOT_AUTH_REQUIRED" });
+ const model = typeof context.config.model === "string" ? context.config.model.trim() : null;
+ if (!model || ["auto", "default"].includes(model.toLowerCase())) throw unprocessable("Select an available Copilot model.", { code: "COPILOT_MODEL_UNAVAILABLE" });
+ await probeCopilotExecutionTarget(token, context.executionTarget, model);
+ return { adapterType, status: "pass" as const, testedAt: new Date().toISOString(), checks: [{ code: "copilot_metadata_verified", level: "info" as const, message: "The verified Copilot runtime authenticated this account and accepted the selected model. No model prompt was sent." }] };
+ } catch (error) {
+ return { adapterType, status: "fail" as const, testedAt: new Date().toISOString(), checks: [{ code: error instanceof HttpError ? String(asRecord(error.details)?.code ?? "COPILOT_REQUEST_FAILED") : "COPILOT_REQUEST_FAILED", level: "error" as const, message: error instanceof HttpError ? error.message : "Copilot metadata verification failed." }] };
+ }
+ }
await assertManagedAiProjectAuth(context.config, binding.provider, context.executionTarget);
const result = await requireServerAdapter(adapterType).testEnvironment(context);
if (result.status === "fail") return result;
diff --git a/server/src/services/agent-harness-verification.ts b/server/src/services/agent-harness-verification.ts
index cbdde058e7..c14f009205 100644
--- a/server/src/services/agent-harness-verification.ts
+++ b/server/src/services/agent-harness-verification.ts
@@ -16,9 +16,9 @@ import type { LifecycleAgent } from "../modules/agent-lifecycle/index.js";
export function assertHarnessTestPassed(result: AdapterEnvironmentTestResult) {
const verified = result.checks.some(check => check.level === "info" &&
- (/hello_probe_(passed|succeeded)$/.test(check.code) || check.code === "ai_connection_api_key_reverified"));
+ (/hello_probe_(passed|succeeded)$/.test(check.code) || check.code === "ai_connection_api_key_reverified" || check.code === "copilot_metadata_verified"));
const authenticationFailed = result.checks.some(check =>
- check.code === ADAPTER_AUTH_MISSING_CHECK_CODE || /_hello_probe_auth_required$/.test(check.code));
+ check.code === ADAPTER_AUTH_MISSING_CHECK_CODE || check.code === "COPILOT_AUTH_REQUIRED" || /_hello_probe_auth_required$/.test(check.code));
const incomplete = !verified && (result.status === "warn" || result.checks.some(check => check.code.includes("hello_probe")));
if (result.status === "fail" || authenticationFailed || incomplete) {
const has = (suffix: string) => result.checks.some(check => check.code.endsWith(suffix));
@@ -63,7 +63,7 @@ export function agentHarnessVerificationService(db: Db, manager: PluginWorkerMan
}
if (binding) config = { ...config, env: stripAiAuthBindings(config.env) };
config = (await secrets.resolveAdapterConfigForRuntime(agent.companyId, config, context, { adapterType: agent.adapterType })).config;
- const environmentId = await tests.resolveAdapterTestEnvironmentId(agent.companyId, agent.defaultEnvironmentId);
+ const environmentId = await tests.resolveAdapterTestEnvironmentId(agent.companyId, agent.defaultEnvironmentId, agent.adapterType === "paperclip_runner" && config.provider === "acpx" && config.acpxAgent === "copilot");
if (environmentId) {
await tests.assertAdapterTestEnvironmentForCompany(agent.companyId, environmentId);
const environment = await environments.getById(environmentId);
diff --git a/server/src/services/ai-api-key-test.ts b/server/src/services/ai-api-key-test.ts
index 1e5405d708..4ed513f28e 100644
--- a/server/src/services/ai-api-key-test.ts
+++ b/server/src/services/ai-api-key-test.ts
@@ -7,6 +7,7 @@ export async function validateAiApiKey(
key: string,
request: typeof fetch = fetch,
) {
+ if (provider === "github") throw unprocessable("Copilot requires verification in the selected execution environment.", { code: "copilot_environment_required" });
const endpoints = {
anthropic: "https://api.anthropic.com/v1/models?limit=1",
openai: "https://api.openai.com/v1/models",
diff --git a/server/src/services/ai-auth-failure.ts b/server/src/services/ai-auth-failure.ts
index 547a789723..c2ff39ba71 100644
--- a/server/src/services/ai-auth-failure.ts
+++ b/server/src/services/ai-auth-failure.ts
@@ -46,7 +46,7 @@ export function isAiAuthenticationRepairable(run: AuthenticationFailure): boolea
/** Provider authentication signals only. Tool authorization and quotas need different repairs. */
export function isAiAuthenticationFailure(code: string | null | undefined): boolean {
return Boolean(code && (
- /^(acpx|claude|codex|grok|opencode|gemini|kimi|pi|cursor)_auth_required$/.test(code)
+ /^(acpx|claude|codex|grok|opencode|gemini|kimi|pi|cursor|copilot)_auth_required$/i.test(code)
|| ["adapter_auth_missing", "authentication_required", "auth_required", "refresh_token_reused", "refresh_token_expired", "refresh_token_invalidated"].includes(code)
));
}
diff --git a/server/src/services/ai-connection-runtime.ts b/server/src/services/ai-connection-runtime.ts
index 4dba2186c5..c201f2451f 100644
--- a/server/src/services/ai-connection-runtime.ts
+++ b/server/src/services/ai-connection-runtime.ts
@@ -29,6 +29,7 @@ export function isAiConnectionBusy(error: unknown): error is HttpError {
// Blank values intentionally override inherited credentials in CLI child environments.
export const AI_AUTH_ENV_KEYS = [
+ "COPILOT_GITHUB_TOKEN",
"PAPERCLIP_AI_PROVIDER_KEY", "PAPERCLIP_AI_PROVIDER_URL", "PAPERCLIP_CODEX_PROVIDERS",
"GEMINI_API_KEY", "GOOGLE_API_KEY", "GOOGLE_GEMINI_BASE_URL", "GOOGLE_GENAI_USE_VERTEXAI",
"HERMES_HOME", "AWS_ACCESS_KEY_ID", "AWS_SECRET_ACCESS_KEY", "AWS_SESSION_TOKEN", "AWS_BEARER_TOKEN_BEDROCK", "AWS_PROFILE", "AWS_DEFAULT_PROFILE", "AWS_SHARED_CREDENTIALS_FILE", "AWS_CONFIG_FILE", "AWS_WEB_IDENTITY_TOKEN_FILE", "AWS_ROLE_ARN", "AWS_CONTAINER_CREDENTIALS_RELATIVE_URI", "AWS_CONTAINER_CREDENTIALS_FULL_URI",
@@ -312,6 +313,7 @@ export async function prepareManagedAiRuntime(
...stripAiAuthBindings(input.config.env),
...Object.fromEntries(AI_AUTH_ENV_KEYS.map((key) => [key, ""])),
...managedAiHomeEnvironment(home),
+ ...(input.binding.provider === "github" ? { GH_TOKEN: "", GITHUB_TOKEN: "" } : {}),
};
const capability =
AI_CONNECTION_CAPABILITIES[input.binding.provider].methods[
diff --git a/server/src/services/ai-connection-usage.ts b/server/src/services/ai-connection-usage.ts
index 4eeda59714..55e4a0e1f4 100644
--- a/server/src/services/ai-connection-usage.ts
+++ b/server/src/services/ai-connection-usage.ts
@@ -332,7 +332,7 @@ export async function probeAiConnectionUsage(
options: { request?: typeof fetch } = {},
): Promise<Omit<AiConnectionUsage, "connectionId" | "grantId">> {
const base = { ...metadata, checkedAt: new Date().toISOString(), source: null, planType: null, limits: [], overage: null };
- if (metadata.provider === "google" || !supportsAiConnectionUsage(metadata.provider, metadata.method)) {
+ if (metadata.provider === "google" || metadata.provider === "github" || !supportsAiConnectionUsage(metadata.provider, metadata.method)) {
return { ...base, status: "unsupported", errorCode: "unsupported", message: messages.unsupported };
}
try {
diff --git a/server/src/services/copilot-connection-probe.ts b/server/src/services/copilot-connection-probe.ts
new file mode 100644
index 0000000000..3184095170
--- /dev/null
+++ b/server/src/services/copilot-connection-probe.ts
@@ -0,0 +1,106 @@
+import { randomUUID } from "node:crypto";
+import type { Db } from "@paperclipai/db";
+import { probeCopilotMetadata, validateCopilotMetadata } from "../vendor/paperclip-runner/live/index.js";
+import { runAdapterExecutionTargetShellCommand, type AdapterExecutionTarget } from "@paperclipai/adapter-utils/execution-target";
+import { environmentService } from "./environments.js";
+import { environmentRuntimeService } from "./environment-runtime.js";
+import { instanceSettingsService } from "./instance-settings.js";
+import { resolveEnvironmentExecutionTarget } from "./environment-execution-target.js";
+import { assertEnvironmentSelectionForCompany } from "../routes/environment-selection.js";
+import { buildLoginLeaseAcquireArgs } from "./adapter-login-lease.js";
+import { logger } from "../middleware/logger.js";
+import { forbidden, unprocessable } from "../errors.js";
+
+export async function probeCopilotConnection(db: Db, companyId: string, token: string, suppliedEnvironmentId?: string | null, model?: string, runtimeOptions: Parameters<typeof environmentRuntimeService>[1] = {}) {
+ const environments = environmentService(db), settings = instanceSettingsService(db);
+ const experimental = await settings.getExperimental();
+ let environmentId = suppliedEnvironmentId ?? (await settings.get()).defaultEnvironmentId;
+ if ((await settings.getGeneral()).executionMode === "kubernetes") {
+ const kubernetes = await environments.findKubernetesEnvironment(companyId);
+ if (!kubernetes) throw unprocessable("The Kubernetes execution environment is unavailable.", { code: "copilot_environment_unavailable" });
+ environmentId = kubernetes.id;
+ } else if (experimental.enableManagedSandboxOnly && (!environmentId || (await environments.getById(environmentId))?.driver === "local")) {
+ const managed = await environments.findManagedSandboxEnvironment(companyId);
+ if (!managed) throw unprocessable("The managed environment is unavailable.", { code: "copilot_environment_unavailable" });
+ environmentId = managed.id;
+ }
+ if (!environmentId) return requireVerified(await probeCopilotMetadata(token, model));
+ await assertEnvironmentSelectionForCompany(environments, companyId, environmentId, { allowedDrivers: ["local", "ssh", "sandbox", "plugin"] });
+ const boundCompanyIds = await environments.listBoundCompanyIds(environmentId);
+ if (boundCompanyIds.length > 0 && !boundCompanyIds.includes(companyId)) throw forbidden("The selected environment belongs to another company.", { code: "environment_company_mismatch" });
+ const environment = await environments.getById(environmentId);
+ if (!environment || environment.status !== "active") throw unprocessable("Choose an active Copilot execution environment.", { code: "copilot_environment_unavailable" });
+ if (environment.driver === "local") return requireVerified(await probeCopilotMetadata(token, model));
+ const runtime = environmentRuntimeService(db, runtimeOptions);
+ let lease: Awaited<ReturnType<typeof runtime.acquireRunLease>> | undefined;
+ let succeeded = false;
+ let probeFailed = false;
+ try {
+ if (environment.driver !== "ssh") {
+ lease = await runtime.acquireRunLease(buildLoginLeaseAcquireArgs({ metadata: { companyId, environment, adapterType: "paperclip_runner" }, assertCompanyBinding: true, requestedExpiresAt: new Date(Date.now() + 90_000) }));
+ await runtime.realizeWorkspace({ environment, lease: lease.lease, workspace: {} });
+ }
+ const target = await resolveEnvironmentExecutionTarget({ db, companyId, adapterType: "paperclip_runner", environment,
+ leaseId: lease?.lease.id, lease: lease?.lease, leaseMetadata: lease?.lease.metadata ?? null, environmentRuntime: runtime });
+ if (!target || target.kind !== "remote") throw unprocessable("The selected environment cannot run the Copilot metadata probe.", { code: "copilot_environment_unavailable" });
+ const verified = await probeCopilotExecutionTarget(token, target, model);
+ succeeded = true;
+ return verified;
+ } catch (error) {
+ probeFailed = true;
+ throw error;
+ } finally {
+ if (lease) {
+ try {
+ const driver = runtime.getDriver(environment.driver);
+ if (!driver) throw new Error("Copilot verification lease cleanup driver is unavailable");
+ await driver.releaseRunLease({ environment, lease: lease.lease, status: succeeded ? "released" : "failed" });
+ } catch {
+ // Report only owned identifiers; driver errors may contain credentials.
+ logger.warn({ companyId, environmentId: environment.id, leaseId: lease.lease.id, code: "COPILOT_PROBE_CLEANUP_FAILED" }, "Copilot verification lease cleanup failed");
+ if (!probeFailed) throw unprocessable("Copilot verification could not release its execution environment.", { code: "COPILOT_REQUEST_FAILED", cleanupCode: "COPILOT_PROBE_CLEANUP_FAILED" });
+ }
+ }
+ }
+}
+
+function requireVerified(value: unknown) {
+ const result = validateCopilotMetadata(value);
+ if (result.status !== "verified") throw unprocessable(result.message, { code: result.code });
+ return result;
+}
+
+export async function probeCopilotExecutionTarget(token: string, target: AdapterExecutionTarget | null | undefined, model?: string) {
+ if (!target || target.kind === "local") return requireVerified(await probeCopilotMetadata(token, model));
+ // Try the same two installed locations as native admission. An old /opt
+ // pack must not hide a valid home pack; account/model failures remain final.
+ const deadlineAt = Date.now() + 35_000;
+ let incompatibleMetadata: unknown;
+ for (const location of ["/opt/paperclip-runner/provider-pack", '"$HOME/.local/share/paperclip-runner/provider-pack"']) {
+ const remainingMs = deadlineAt - Date.now();
+ if (remainingMs <= 0) throw unprocessable("Copilot metadata verification timed out.", { code: "COPILOT_REQUEST_FAILED" });
+ const command = `pack=${location}; if [ -f "$pack/provider-pack.json" ] && [ -f "$pack/dist/cli/copilot-metadata-probe.js" ] && [ -x "$pack/node_modules/node/bin/node" ]; then export PAPERCLIP_ACPX_PROVIDER_PACKAGE_ROOT="$pack" PAPERCLIP_ACPX_PROVIDER_PACKAGE_MANIFEST="$pack/package.json"; exec "$pack/node_modules/node/bin/node" "$pack/dist/cli/copilot-metadata-probe.js"; fi; exit 127`;
+ // The selected token and exact model are environment values, never shell source.
+ const response = await runAdapterExecutionTargetShellCommand(`copilot-metadata-${randomUUID()}`, target, command, {
+ cwd: target.remoteCwd, env: { COPILOT_GITHUB_TOKEN: token, ...(model ? { PAPERCLIP_COPILOT_PROBE_MODEL: model } : {}) }, timeoutSec: Math.ceil(remainingMs / 1000), graceSec: 3,
+ });
+ if (response.timedOut || response.stdout.length > 64 * 1024) throw unprocessable("Copilot metadata verification timed out.", { code: "COPILOT_REQUEST_FAILED" });
+ let result: unknown;
+ try { result = JSON.parse(response.stdout.trim()); } catch { continue; }
+ const verified = validateCopilotMetadata(result);
+ if (verified.status === "failed") {
+ if (verified.code === "COPILOT_INSTALLATION_INVALID") continue;
+ if (result !== null && typeof result === "object" && (result as Record<string, unknown>).status === "verified") {
+ incompatibleMetadata = verified;
+ continue;
+ }
+ requireVerified(verified);
+ continue;
+ }
+ if (response.exitCode !== 0 || response.signal) throw unprocessable("Copilot metadata verification did not exit cleanly.", { code: "COPILOT_REQUEST_FAILED" });
+ if (model && !verified.models.some(value => value.id === model)) throw unprocessable("The selected Copilot model is unavailable for this account.", { code: "COPILOT_MODEL_UNAVAILABLE" });
+ return verified;
+ }
+ if (incompatibleMetadata) requireVerified(incompatibleMetadata);
+ throw unprocessable("Install the verified Copilot runtime in this environment.", { code: "COPILOT_INSTALLATION_INVALID" });
+}
diff --git a/server/src/services/fast-response-models.ts b/server/src/services/fast-response-models.ts
index 830c058306..a937422224 100644
--- a/server/src/services/fast-response-models.ts
+++ b/server/src/services/fast-response-models.ts
@@ -7,5 +7,5 @@ import type { AiConnectionMetadata } from "@paperclipai/shared";
/** Catalogs follow the saved API connection, never the host CLI's credentials or environment. */
export function fastResponseCatalogModels(connection: Pick<AiConnectionMetadata, "provider" | "routing">) {
if (connection.routing) return connection.routing.models ?? [];
- return { anthropic, openai, google, xai, openrouter: [] }[connection.provider];
+ return { anthropic, openai, google, xai, openrouter: [], github: [] }[connection.provider];
}
diff --git a/server/src/services/heartbeat-runner-provider-config.test.ts b/server/src/services/heartbeat-runner-provider-config.test.ts
index 1707d22955..0136711a0e 100644
--- a/server/src/services/heartbeat-runner-provider-config.test.ts
+++ b/server/src/services/heartbeat-runner-provider-config.test.ts
@@ -55,6 +55,22 @@ describe("Paperclip Runner native provider configuration", () => {
})).toThrow("Preconfigured home supports");
}
});
+ it.each([undefined, "0.156.0", "0.159.0"])(
+ "keeps the exact Copilot model independent of Codex CLI version %s",
+ (codexCliVersion) => {
+ const adapterConfig = {
+ provider: "acpx", acpxAgent: "copilot", model: "gpt-5.6-luna",
+ acpxPermissionMode: "approve-paperclip",
+ };
+ expect(resolvePaperclipRunnerNativeProviderInput({
+ backend: "acpx_runtime", adapterConfig, codexCliVersion,
+ })).toEqual({
+ provider: "acpx", acpxAgent: "copilot", model: "gpt-5.6-luna",
+ acpxPermissionMode: "approve-paperclip",
+ });
+ expect(adapterConfig.model).toBe("gpt-5.6-luna");
+ },
+ );
it.each([undefined, "approve-all", "approve-paperclip", "approve-reads", "deny-all"])(
"passes Grok's full-auto default or explicit %s policy to the native runner",
diff --git a/server/src/services/heartbeat/instruction-working-copy.test.ts b/server/src/services/heartbeat/instruction-working-copy.test.ts
index 14ad95731e..a3f57cce7c 100644
--- a/server/src/services/heartbeat/instruction-working-copy.test.ts
+++ b/server/src/services/heartbeat/instruction-working-copy.test.ts
@@ -14,7 +14,7 @@ type Input = Parameters<typeof createHeartbeatInstructionWorkingCopy>[0];
type Prepare = Parameters<ReturnType<typeof createHeartbeatInstructionWorkingCopy>["prepare"]>[0];
type Copy = NonNullable<Awaited<ReturnType<Input["instructionCopies"]["prepare"]>>>;
-function fixture(executionTarget: Input["workspace"]["executionTarget"] = null) {
+function fixture(executionTarget: Input["workspace"]["executionTarget"] = null, acpxAgent?: string) {
let run = { id: "current-run", companyId: "company", agentId: "agent", runnerProfileJson: null, status: "queued" } as ReturnType<Input["readRun"]>;
const copy = { runId: run.id, companyId: run.companyId, agentId: run.agentId,
localRoot: "/workspace/copy", executionRoot: "/workspace/copy", entryFile: "AGENTS.md",
@@ -32,14 +32,14 @@ function fixture(executionTarget: Input["workspace"]["executionTarget"] = null)
const controller = createHeartbeatInstructionWorkingCopy({
db: {} as Input["db"], instructionCopies: copies as unknown as Input["instructionCopies"],
readRun: () => run,
- agent: { id: "agent", companyId: "company", adapterType: "codex_local", adapterConfig: { lifecycleMode: "warm" }, runtimeConfig: {} } as unknown as Input["agent"],
+ agent: { id: "agent", companyId: "company", adapterType: acpxAgent ? "paperclip_runner" : "codex_local", adapterConfig: { lifecycleMode: "warm", ...(acpxAgent ? { provider: "acpx", acpxAgent } : {}) }, runtimeConfig: {} } as unknown as Input["agent"],
context,
session: { taskSession: null, taskSessionForRun: { lastRunId: "previous-run" }, sessionConfigMetadata: {} as Input["session"]["sessionConfigMetadata"] },
workspace: { executionTarget, executionWorkspace: { cwd: "/workspace" } as Input["workspace"]["executionWorkspace"], persistedExecutionWorkspace: null },
appendRunEvent,
});
const prepare: Prepare = { runtimeConfig: { retained: true }, hasInstructionFilesystem: true,
- nativeRuntimeResolution: { kind: "native", profile: { backend: "codex_app_server" } } as Prepare["nativeRuntimeResolution"] };
+ nativeRuntimeResolution: { kind: "native", profile: { backend: acpxAgent ? "acpx_runtime" : "codex_app_server" } } as Prepare["nativeRuntimeResolution"] };
const reservation = { reuseRunId: "previous-run", adopt: vi.fn(), release: vi.fn().mockResolvedValue(undefined) };
native.reserve.mockResolvedValue(reservation);
return { controller, copies, copy, context, prepare, reservation, appendRunEvent,
@@ -49,6 +49,21 @@ function fixture(executionTarget: Input["workspace"]["executionTarget"] = null)
beforeEach(() => { vi.clearAllMocks(); native.claim.mockResolvedValue(null); });
describe("instruction working-copy extraction boundary", () => {
+ it.each([
+ ["copilot", false, true], ["copilot", true, true],
+ ["cursor", false, true], ["cursor", true, true],
+ ["claude", false, false], ["claude", true, false],
+ ] as const)("prepares %s instructions with the expected warm ownership on remote=%s", async (agent, remote, warm) => {
+ const target: Input["workspace"]["executionTarget"] = remote
+ ? { kind: "remote", transport: "sandbox", remoteCwd: "/workspace", runnerLifecyclePolicy: { mode: "warm", idleTimeoutMs: 300_000 } }
+ : null;
+ const f = fixture(target, agent);
+ await f.controller.prepare(f.prepare);
+ expect(f.copies.prepare).toHaveBeenCalledWith(expect.objectContaining({ warm, reuseRunId: warm ? "previous-run" : undefined }));
+ if (warm) expect(native.reserve).toHaveBeenCalledWith(expect.objectContaining({ previousRunId: "previous-run", runId: "current-run", target }));
+ else expect(native.reserve).not.toHaveBeenCalled();
+ });
+
it.each(["openai_dot_mcp", "muse_external"])("does not prepare an instruction filesystem for %s", async backend => {
const f = fixture();
const result = await f.controller.prepare({ ...f.prepare, hasInstructionFilesystem: false,
diff --git a/server/src/services/heartbeat/instruction-working-copy.ts b/server/src/services/heartbeat/instruction-working-copy.ts
index 518f42f7aa..558b7b0a58 100644
--- a/server/src/services/heartbeat/instruction-working-copy.ts
+++ b/server/src/services/heartbeat/instruction-working-copy.ts
@@ -9,6 +9,7 @@ import { AgentDirectoryReuseInvalidatedError, isAgentDirectoryCopy } from "../ag
import { collectStoppedInstructionCopyWithRetries, instructionWorkingCopyGuidance, type agentInstructionWorkingCopyService } from "../agent-instruction-working-copies.js";
import { claimWarmNativeInstructionCopy, nativeSessionWorkspaceScope, reserveWarmNativeInstructionDirectory } from "../native-runtime/index.js";
import { parseNativeExecutionInput } from "../../vendor/paperclip-runner/index.js";
+import { supportsNativeWarmFiles } from "../native-runtime/native-warm-capability.js";
import type { HeartbeatRuntimeSelectionInput } from "./runtime-selection.js";
import type { createHeartbeatLifecycle } from "./run-lifecycle.js";
import type { EffectiveRunSessionConfigMetadata } from "./workspaces.js";
@@ -137,7 +138,7 @@ export function createHeartbeatInstructionWorkingCopy(input: InstructionWorkingC
const savedFileInput = parseObject(parseObject(readRun().runnerProfileJson).nativeExecutionInput);
const priorFileInput = Object.keys(savedFileInput).length ? savedFileInput : parseObject(parseObject(priorFileRun?.profile).nativeExecutionInput);
const priorWorkingCopy = parseObject(parseObject(parseObject(priorFileInput.runtimeContext).instructions).workingCopy);
- const warmFiles = nativeRuntimeResolution.kind === "native" && (nativeRuntimeResolution.profile.backend === "codex_app_server" ||
+ const warmFiles = nativeRuntimeResolution.kind === "native" && (supportsNativeWarmFiles({ ...nativeRuntimeResolution.profile, acpxAgent: parseObject(agent.adapterConfig).acpxAgent }) ||
(nativeRuntimeResolution.profile.backend === "acpx_runtime" && parseObject(agent.adapterConfig).acpxAgent === "cursor")) &&
(executionTarget?.kind === "remote" && executionTarget.transport === "sandbox"
? executionTarget.runnerLifecyclePolicy?.mode === "warm"
diff --git a/server/src/services/heartbeat/runtime-selection.test.ts b/server/src/services/heartbeat/runtime-selection.test.ts
index 152e30d696..f3ce34c775 100644
--- a/server/src/services/heartbeat/runtime-selection.test.ts
+++ b/server/src/services/heartbeat/runtime-selection.test.ts
@@ -98,6 +98,25 @@ describe.skipIf(!support.supported)("heartbeat runtime selection boundary", () =
expect(input.onNativeOwnershipHeld).not.toHaveBeenCalled();
});
+ it("persists the Copilot task model without accepting task provider or permission changes", async () => {
+ const { input, run, issue } = await fixture();
+ const adapterConfig = { provider: "acpx", acpxAgent: "copilot", model: "gpt-5.6-luna", acpxPermissionMode: "approve-reads" };
+ input.agent = { ...input.agent, adapterConfig };
+ await db.update(agents).set({ adapterConfig }).where(eq(agents.id, input.agent.id));
+ input.nativeRuntimeResolution = resolveHeartbeatNativeRuntimeMode({
+ persisted: input.run, enabled: true, runtimeConfig: {}, adapterConfig,
+ agent: input.agent, issue, target: null, workspaceId: null,
+ });
+ input.config.issueAssigneeOverrides = { adapterConfig: {
+ model: "gpt-6-luna", provider: "codex", acpxAgent: "pi", acpxPermissionMode: "approve-all",
+ } };
+ const selected = await selectHeartbeatRuntime(db, input);
+ if (!selected.selected || !selected.nativeExecution) throw new Error("Expected native Copilot selection");
+ const expected = { kind: "acpx", agent: "copilot", model: "gpt-6-luna", permissionMode: "approve-reads" };
+ expect(selected.nativeExecution.provider).toMatchObject(expected);
+ expect((await read(run.id)).runnerProfileJson).toMatchObject({ nativeExecutionInput: { provider: expected } });
+ });
+
it("persists configured GitHub instruction skills without admitting provider-mentioned skills", async () => {
const { input, issue, run } = await fixture();
input.config.runScopedMentionedSkillKeys = ["company/test/configured"];
@@ -259,6 +278,39 @@ describe.skipIf(!support.supported)("heartbeat runtime selection boundary", () =
expect(await coordinators(run.id)).toHaveLength(0);
});
+ it.each([
+ { provider: "github" as const, method: "api_key" as const, expected: "warm" },
+ { provider: "github" as const, method: "subscription" as const, expected: "per_turn" },
+ { provider: "openai" as const, method: "api_key" as const, expected: "per_turn" },
+ ])("persists $expected Copilot lifecycle for a managed $provider/$method account", async ({ provider, method, expected }) => {
+ const { input, run, issue } = await fixture();
+ const adapterConfig = { provider: "acpx", acpxAgent: "copilot", model: "gpt-5.6-luna", lifecycleMode: "warm", idleTimeoutMs: 300_000 };
+ input.agent = { ...input.agent, adapterConfig };
+ await db.update(agents).set({ adapterConfig }).where(eq(agents.id, input.agent.id));
+ input.nativeRuntimeResolution = resolveHeartbeatNativeRuntimeMode({
+ persisted: input.run, enabled: true, runtimeConfig: {}, adapterConfig,
+ agent: input.agent, issue, target: null, workspaceId: null,
+ });
+ const attribution = { connectionId: randomUUID(), grantId: randomUUID(), provider, method, mode: "responsible_user" as const, responsibleUserId: "task-owner" };
+ input.config.managedAiRuntime = {
+ sessionIdentity: "fixture-grant:task-owner:epoch-1",
+ config: { env: {}, managedAiConnection: { ...attribution, identity: "fixture-grant:task-owner:generation-1", sessionIdentity: "fixture-grant:task-owner:epoch-1" } },
+ attribution,
+ accountName: "Saved account",
+ accountOwnerUserId: "task-owner",
+ identity: "fixture-grant:task-owner:generation-1",
+ home: instructionRoot,
+ cleanup: async () => {},
+ };
+ const selected = await selectHeartbeatRuntime(db, input);
+ if (!selected.selected || !selected.nativeExecution) throw new Error("Expected native Copilot selection");
+ expect(selected.nativeExecution.session.lifecyclePolicy.mode).toBe(expected);
+ expect((await read(run.id)).runnerProfileJson).toMatchObject({
+ nativeExecutionInput: { session: { lifecyclePolicy: { mode: expected } } },
+ });
+ expect(await coordinators(run.id)).toHaveLength(1);
+ });
+
it("preserves only server-owned admission and dispatch evidence when recording legacy selection", async () => {
const { input, run } = await fixture("process");
const admission = { version: 1, kind: "fixture" }, dispatch = { entered: true };
diff --git a/server/src/services/heartbeat/runtime-selection.ts b/server/src/services/heartbeat/runtime-selection.ts
index 03282c9f44..2cf1c9efa3 100644
--- a/server/src/services/heartbeat/runtime-selection.ts
+++ b/server/src/services/heartbeat/runtime-selection.ts
@@ -11,6 +11,7 @@ import { isAgentDirectoryCopy } from "../agent-directory-working-copies.js";
import { isConversation } from "../agent-conversations.js";
import { renewLegacyControllerLease } from "../legacy-controller-lease.js";
import type { prepareManagedAiRuntime } from "../ai-connection-runtime.js";
+import { supportsManagedNativeWarmSession } from "../native-runtime/native-warm-capability.js";
import {
getNativeReviewAssignment,
readNativeReviewAssignmentContext,
@@ -504,11 +505,11 @@ export async function selectHeartbeatRuntime(db: Db, input: HeartbeatRuntimeSele
executionTarget.transport === "sandbox"
? (executionTarget.runnerLifecyclePolicy ?? null)
: null;
- // Native Codex owns a durable, session-scoped home. It flushes refreshed
- // auth into each invocation's private home before that home is removed.
- // Other managed harnesses still require per-turn credential cleanup.
+ // Codex refreshes its durable auth home; Copilot owns a fenced home
+ // and an explicitly bound token. Both retire on credential generation
+ // changes. Other managed harnesses require per-turn cleanup.
const supportsManagedWarmSession = agent.adapterType === "paperclip_runner" &&
- nativeRuntimeResolution.profile.backend === "codex_app_server";
+ supportsManagedNativeWarmSession({ ...nativeRuntimeResolution.profile, acpxAgent: parseObject(agent.adapterConfig).acpxAgent }, managedAiRuntime?.attribution);
const effectiveLifecyclePolicy = persistedNativeExecutionInput?.session.lifecyclePolicy ??
(["openai_dot_mcp", "grok_bot_mcp", "muse_external"].includes(nativeRuntimeResolution.profile.backend) || managedAiRuntime && !supportsManagedWarmSession
? { mode: "per_turn" as const, idleTimeoutMs: null }
@@ -718,6 +719,8 @@ export async function selectHeartbeatRuntime(db: Db, input: HeartbeatRuntimeSele
const nativeProviderConfig = nativeRuntimeResolution.profile.backend === "codex_app_server"
|| (nativeRuntimeResolution.profile.backend === "acpx_runtime" && agentHarnessType(agent.adapterType, parseObject(agent.adapterConfig)) === "claude_local")
|| nativeRuntimeResolution.profile.backend === "opencode_server"
+ || (nativeRuntimeResolution.profile.backend === "acpx_runtime"
+ && parseObject(agent.adapterConfig).acpxAgent === "copilot")
? projectPaperclipRunnerTaskConfig(
nativeRuntimeResolution.profile.backend,
agent.adapterConfig,
diff --git a/server/src/services/native-runtime/acpx-qualification.test.ts b/server/src/services/native-runtime/acpx-qualification.test.ts
index f230c71c70..76ce9ca6ed 100644
--- a/server/src/services/native-runtime/acpx-qualification.test.ts
+++ b/server/src/services/native-runtime/acpx-qualification.test.ts
@@ -4,21 +4,11 @@ import { ACPX_QUALIFICATION_ENV, resolveAcpxQualification } from "./acpx-qualifi
import type { NativeExecutionInput } from "../../vendor/paperclip-runner/index.js";
import { resolvePaperclipRunnerProviderProfile, resolvePaperclipRunnerNativeProviderInput } from "./provider-profile.js";
-const provider = { kind: "acpx", agent: "copilot", model: "exact-model", permissionMode: "approve-all" } as NativeExecutionInput["provider"];
+const provider = { kind: "acpx", agent: "copilot", model: "exact-model", permissionMode: "approve-all" } as Extract<NativeExecutionInput["provider"], { kind: "acpx" }>;
const authorize = (value: unknown) => ({ [ACPX_QUALIFICATION_ENV]: JSON.stringify(value) });
describe("host ACPX qualification admission", () => {
afterEach(() => vi.unstubAllEnvs());
- it.each(["copilot"])("admits %s through agent validation and native input only for the exact host pair", (agent) => {
- const config = { provider: "acpx", acpxAgent: agent, model: "exact-model" };
- vi.stubEnv(ACPX_QUALIFICATION_ENV, undefined);
- expect(() => resolvePaperclipRunnerProviderProfile(config)).toThrow(expect.objectContaining({ code: "paperclip_runner_acpx_agent_unavailable" }));
- expect(() => resolvePaperclipRunnerProviderProfile({ ...config, env: authorize([{ agent, model: config.model }]), [ACPX_QUALIFICATION_ENV]: JSON.stringify([{ agent, model: config.model }]) })).toThrow(expect.objectContaining({ code: "paperclip_runner_acpx_agent_unavailable" }));
- vi.stubEnv(ACPX_QUALIFICATION_ENV, JSON.stringify([{ agent, model: config.model }]));
- expect(resolvePaperclipRunnerProviderProfile(config)).toMatchObject({ acpxAgent: agent, model: config.model });
- expect(resolvePaperclipRunnerNativeProviderInput({ backend: "acpx_runtime", adapterConfig: config })).toMatchObject({ acpxAgent: agent, model: config.model });
- expect(() => resolvePaperclipRunnerProviderProfile({ ...config, model: "other-model" })).toThrow(expect.objectContaining({ code: "paperclip_runner_acpx_qualification_invalid" }));
- expect(() => resolvePaperclipRunnerProviderProfile({ ...config, model: "" })).toThrow(expect.objectContaining({ code: "paperclip_runner_acpx_model_required" }));
- });
+
it("admits only the exact Pi model without host authorization and preserves permission modes", () => {
const config = { provider: "acpx", acpxAgent: "pi", model: "openrouter/deepseek/deepseek-v4-flash-0731" };
for (const authorization of [undefined, "malformed unrelated candidate authorization"]) {
@@ -34,18 +24,12 @@ describe("host ACPX qualification admission", () => {
}
}
});
- it("keeps normal candidate execution closed and admits only the exact operator pair", () => {
- expect(resolveAcpxQualification(provider, {})).toBeUndefined();
- expect(resolveAcpxQualification(provider, authorize([{ agent: "copilot", model: "exact-model" }]))).toBe("copilot");
- for (const entries of [[{ agent: "pi", model: "exact-model" }], [{ agent: "copilot", model: "other-model" }]]) {
- expect(() => resolveAcpxQualification(provider, authorize(entries))).toThrow("exact model");
- }
- });
+
it.each([[], {}, [{ agent: "cursor", model: "" }], [{ agent: "cursor", model: " exact-model" }],
[{ agent: "cursor", model: "exact-model", allowAll: true }], [{ agent: "claude", model: "exact-model" }],
[{ agent: "cursor", model: "exact-model" }, { agent: "cursor", model: "exact-model" }],
])("rejects malformed or broad authorization %j", entries => {
- expect(() => resolveAcpxQualification(provider, authorize(entries))).toThrow("Invalid ACPX");
+ expect(() => resolveAcpxQualification({ ...provider, agent: "pi" }, authorize(entries))).toThrow("Invalid ACPX");
});
it("admits Cursor through ordinary configuration and ignores unrelated qualification authority", () => {
const config = { provider: "acpx", acpxAgent: "cursor", model: "exact-cursor-model" };
@@ -55,6 +39,17 @@ describe("host ACPX qualification admission", () => {
expect(resolveAcpxQualification({ ...provider, agent: "cursor" } as typeof provider, authorize([]))).toBeUndefined();
expect(() => resolvePaperclipRunnerProviderProfile({ ...config, model: "" })).toThrow(expect.objectContaining({ code: "paperclip_runner_acpx_model_required" }));
});
+ it.each([undefined, "malformed", JSON.stringify([{agent:"pi",model:"pi-model"}])])("admits ordinary Copilot without host overrides (%s)", host => {
+ vi.stubEnv(ACPX_QUALIFICATION_ENV,host);
+ const config={provider:"acpx",acpxAgent:"copilot",model:"gpt-5.6-luna"};
+ expect(resolvePaperclipRunnerProviderProfile(config)).toMatchObject({acpxAgent:"copilot",model:config.model});
+ expect(resolvePaperclipRunnerNativeProviderInput({backend:"acpx_runtime",adapterConfig:config})).toMatchObject({acpxAgent:"copilot",model:config.model});
+ expect(resolveAcpxQualification({...provider,model:config.model},{})).toBe("copilot");
+ });
+ it.each(["", " ", "auto", "default"])("refuses implicit Copilot model %s",model=>{
+ expect(()=>resolvePaperclipRunnerProviderProfile({provider:"acpx",acpxAgent:"copilot",model})).toThrow(expect.objectContaining({code:"paperclip_runner_acpx_model_required"}));
+ expect(()=>resolveAcpxQualification({...provider,model},{})).toThrow("explicit available model");
+ });
it("does not alter existing qualified providers", () => {
expect(resolveAcpxQualification({ ...provider, agent: "codex" } as typeof provider, authorize([]))).toBeUndefined();
});
diff --git a/server/src/services/native-runtime/acpx-qualification.ts b/server/src/services/native-runtime/acpx-qualification.ts
index 80b939e151..1f67a28426 100644
--- a/server/src/services/native-runtime/acpx-qualification.ts
+++ b/server/src/services/native-runtime/acpx-qualification.ts
@@ -1,3 +1,4 @@
+import { PAPERCLIP_RUNNER_ACPX_PROFILES } from "@paperclipai/adapter-utils";
import type { NativeExecutionInput } from "../../vendor/paperclip-runner/index.js";
/** Operator-only admission for an exact candidate/model during qualification. */
@@ -9,6 +10,15 @@ export function resolveAcpxQualification(
hostEnvironment: NodeJS.ProcessEnv,
): AcpxQualificationCandidate | undefined {
if (provider.kind !== "acpx" || !["copilot", "pi"].includes(provider.agent)) return undefined;
+ // The server release declaration admits qualified Copilot into the frozen
+ // SDK's explicit native transport slot. No operator environment is required.
+ // Pi retains the mainline transport and qualification behavior below.
+ if (provider.agent === "copilot" && PAPERCLIP_RUNNER_ACPX_PROFILES.some(profile => profile.value === "copilot" && profile.qualified)) {
+ if (!provider.model || provider.model !== provider.model.trim() || ["auto", "default"].includes(provider.model.toLowerCase())) {
+ throw new Error("GitHub Copilot requires an explicit available model ID");
+ }
+ return "copilot";
+ }
const encoded = hostEnvironment[ACPX_QUALIFICATION_ENV];
if (!encoded) return undefined;
let entries: unknown;
diff --git a/server/src/services/native-runtime/native-runner-file-handoff.ts b/server/src/services/native-runtime/native-runner-file-handoff.ts
index 66c3a6542e..47d43b04a9 100644
--- a/server/src/services/native-runtime/native-runner-file-handoff.ts
+++ b/server/src/services/native-runtime/native-runner-file-handoff.ts
@@ -245,7 +245,13 @@ async function openedFilePath(fd: number): Promise<string> {
execFile(
"/usr/sbin/lsof",
["-a", "-p", String(process.pid), "-d", String(fd), "-F0n"],
- { encoding: "buffer", maxBuffer: 16_384, timeout: 1_000 },
+ {
+ encoding: "buffer",
+ maxBuffer: 16_384,
+ timeout: 1_000,
+ // lsof escapes non-ASCII names under the C locale, breaking descriptor verification.
+ env: { ...process.env, LC_ALL: "en_US.UTF-8" },
+ },
(error, stdout) => {
if (error) reject(error);
else resolve(Buffer.from(stdout));
diff --git a/server/src/services/native-runtime/native-session-executor.test.ts b/server/src/services/native-runtime/native-session-executor.test.ts
index 89f2de91d3..c128621230 100644
--- a/server/src/services/native-runtime/native-session-executor.test.ts
+++ b/server/src/services/native-runtime/native-session-executor.test.ts
@@ -10063,6 +10063,16 @@ describe("native process ownership", () => {
},
"acpx_runtime",
],
+ [
+ "GitHub Copilot ACPX",
+ {
+ kind: "acpx",
+ agent: "copilot",
+ model: "gpt-5.6-luna",
+ permissionMode: "approve-all",
+ },
+ "acpx_runtime",
+ ],
[
"Codex ACPX",
{
@@ -10116,24 +10126,7 @@ describe("native process ownership", () => {
},
);
- it.each(["copilot"])("rejects ACPX candidate %s without host authorization before constructing a backend", async (agent) => {
- const piExecution = {
- ...execution,
- binding: { ...execution.binding, runId: "run-acpx-pi-rejected" },
- provider: { kind: "acpx", agent, model: "pi-model" },
- session: { ...execution.session, driverKind: "acpx_runtime" },
- } as unknown as NativeExecutionInputV1;
- state.createBackend.mockClear();
- await expect(
- executePaperclipNativeSession({
- db: leaseDb(piExecution),
- execution: piExecution,
- runnerInstanceId: "runner",
- }),
- ).rejects.toThrow("exact host qualification authorization");
- expect(state.createBackend).not.toHaveBeenCalled();
- });
});
describe("runnerd provider runtime wiring", () => {
diff --git a/server/src/services/native-runtime/native-session-executor.ts b/server/src/services/native-runtime/native-session-executor.ts
index 1daf89666d..53222f06fc 100644
--- a/server/src/services/native-runtime/native-session-executor.ts
+++ b/server/src/services/native-runtime/native-session-executor.ts
@@ -34,7 +34,7 @@ import { copyBackCodexAuth } from "@paperclipai/adapter-codex-local/server";
import { nativeCompletionFeedback } from "./native-completion-feedback.js";
import { hasAcknowledgedNativeReassignmentStopIntent, hasAcknowledgedNativeStopIntent } from "../acknowledged-native-stop.js";
import { stoppedCodexTurnIsTextOnly } from "./stopped-codex-turn.js";
-import { prepareVerifiedRemoteProviderPack, useVerifiedPreinstalledRemoteProviderPack, runRemoteProviderVerification } from "./remote-provider-pack.js";
+import { prepareVerifiedRemoteProviderPack, useVerifiedPreinstalledRemoteProviderPack, runRemoteProviderVerification, shouldUseBundledAcpxImageAssets } from "./remote-provider-pack.js";
import { readProviderPackArchive, stageProviderPackArchive } from "./provider-pack-archive.js";
import { selectRemotePiCompanion } from "./remote-pi-companion.js";
import { readNativeLocalProcessStop, PROCESS_START_REQUESTED } from "../native-local-process-stop.js";
@@ -10092,7 +10092,7 @@ type RemoteProviderPackManifest = {
distDigest: string;
bridgeDigest: string;
acpxProfileDigests: typeof REMOTE_PROVIDER_PACK_PROFILE_DIGESTS;
- providers?: Partial<Record<"pi" | "cursor", {
+ providers?: Partial<Record<"pi" | "cursor" | "copilot", {
version: string; profileDigest: string; closureDigest: string; qualification: "qualified" | "pending";
path: string; sha256: string;
}>>;
@@ -10281,10 +10281,9 @@ function readRemoteProviderPackIdentity(packRoot: string, verifyControllerFiles:
}
for (const [provider, candidate] of Object.entries(candidates)) {
const expectedPath = `provider-assets/${provider}/${payload.target.platform}-${payload.target.architecture}`;
- if (!(inventory === "providers" ? ["pi", "cursor"] : ["cursor", "copilot", "pi"]).includes(provider) || !candidate
+ if (!(inventory === "providers" ? ["pi", "cursor", "copilot"] : ["cursor", "copilot", "pi"]).includes(provider) || !candidate
|| Object.keys(candidate).some(key => !["version", "profileDigest", "closureDigest", "qualification", "path", "sha256"].includes(key))
- || candidate.qualification !== (["pi", "cursor"].includes(provider) ? "qualified" : "pending")
- || candidate.path !== expectedPath
+ || candidate.qualification !== (["pi", "cursor"].includes(provider) || inventory === "providers" && provider === "copilot" ? "qualified" : "pending") || candidate.path !== expectedPath
|| typeof candidate.version !== "string" || !candidate.version || candidate.version.length > 120
|| !/^sha256:[a-f0-9]{64}$/.test(candidate.profileDigest)
|| !/^sha256:[a-f0-9]{64}$/.test(candidate.closureDigest)
@@ -10302,6 +10301,21 @@ function readRemoteProviderPackIdentity(packRoot: string, verifyControllerFiles:
throw new Error("runner_remote_provider_artifact_incompatible: Cursor profile or closure does not match this release");
}
}
+ if (provider === "copilot") {
+ const closurePins = {
+ "darwin-arm64": "362f2663e967fb9e34a814bac4619cbf89e6b23069c4051ab1f2f686852d0a32",
+ "darwin-x64": "c08b7c3dd4e7bcf9a3e16ec6eba29cfa10308e865d196c5f120a3a15f6b3116a",
+ "linux-x64": "a3d8f4367cfa1694d79e3f8b7930b6fbfe42a229c272b375b11951d631db8d07"
+} as const;
+ const target = `${payload.target.platform}-${payload.target.architecture}`;
+ const closure = Object.hasOwn(closurePins, target) ? closurePins[target as keyof typeof closurePins] : undefined;
+ if (!closure || (payload.providers?.copilot && payload.candidateProviders?.copilot)
+ || candidate.version !== QUALIFIED_ACPX_PROFILES.copilot.agentServerVersion
+ || candidate.profileDigest !== QUALIFIED_ACPX_PROFILES.copilot.commandDigest
+ || candidate.closureDigest !== `sha256:${closure}`) {
+ throw new Error("runner_remote_provider_artifact_incompatible: Copilot profile or closure does not match this release");
+ }
+ }
if (verifyControllerFiles && sha256DirectoryTree(resolve(packRoot, candidatePath)) !== candidate.sha256) {
throw new Error("runner_remote_provider_artifact_incompatible: candidate asset tree digest mismatch");
}
@@ -11746,9 +11760,13 @@ async function createRunnerdBackendWithinSessionClaim(
const configuredProviderPackRoot =
input.runnerRemoteProviderPackPath?.trim() || remotePiCompanion?.providerPack || bundledClaudeRoot || null;
let expectedProviderPackManifest: RemoteProviderPackManifest | null = null;
- const useBundledRemoteImageAssets = requiresRemoteProviderPack && !configuredProviderPackRoot &&
- (input.execution.provider.kind === "opencode" ||
- (input.execution.provider.kind === "acpx" && (input.execution.provider.agent === "cursor" || remoteClaude)));
+ const useBundledRemoteImageAssets =
+ (requiresRemoteProviderPack && !configuredProviderPackRoot &&
+ (input.execution.provider.kind === "opencode" || remoteClaude)) ||
+ shouldUseBundledAcpxImageAssets({
+ requiresRemoteProviderPack, configuredProviderPackRoot,
+ provider: input.execution.provider,
+ });
if (useBundledRemoteImageAssets) {
expectedProviderPackManifest = bundledClaudeManifest && (remoteClaudeTarget === "linux-x64" || remoteClaudeTarget === "linux-arm64")
? readBundledRemoteProviderPackManifest(bundledClaudeManifest, remoteClaudeTarget)
diff --git a/server/src/services/native-runtime/native-session-resume.test.ts b/server/src/services/native-runtime/native-session-resume.test.ts
index ced2d0f819..95d1134cb1 100644
--- a/server/src/services/native-runtime/native-session-resume.test.ts
+++ b/server/src/services/native-runtime/native-session-resume.test.ts
@@ -859,6 +859,11 @@ const recoveryFakeCodex = resolve(
async onContinuityBreak(value) {
continuity = value;
},
+ }).then((result) => {
+ if (result.terminal.runTerminalState !== "succeeded") {
+ throw new Error(`Disposable recovery fixture failed: ${JSON.stringify(result)}`);
+ }
+ return result;
}).catch(async (error: unknown) => {
const eventRows = await db
.select({
diff --git a/server/src/services/native-runtime/native-warm-capability.test.ts b/server/src/services/native-runtime/native-warm-capability.test.ts
new file mode 100644
index 0000000000..f06458fbe8
--- /dev/null
+++ b/server/src/services/native-runtime/native-warm-capability.test.ts
@@ -0,0 +1,28 @@
+import { describe, expect, it } from "vitest";
+import { supportsManagedNativeWarmSession, supportsNativeWarmFiles } from "./native-warm-capability.js";
+import type { PaperclipRunnerProviderProfile } from "./provider-profile.js";
+
+describe("native warm credential and file admission", () => {
+ const copilot: PaperclipRunnerProviderProfile = {
+ provider: "acpx", backend: "acpx_runtime", acpxAgent: "copilot", model: "gpt-5.6-luna",
+ };
+ it("admits the saved Copilot token with its session-owned home and file handoff", () => {
+ expect(supportsNativeWarmFiles(copilot)).toBe(true);
+ expect(supportsManagedNativeWarmSession(copilot, { provider: "github", method: "api_key" })).toBe(true);
+ });
+ it.each([undefined, { provider: "github", method: "subscription" }, { provider: "openai", method: "api_key" }])(
+ "refuses a missing or mismatched Copilot credential: %j", (attribution) => {
+ expect(supportsManagedNativeWarmSession(copilot, attribution)).toBe(false);
+ },
+ );
+ it.each(["cursor", "pi", "claude", "grok"] as const)("preserves %s managed per-turn admission", (acpxAgent) => {
+ const profile = { ...copilot, acpxAgent };
+ expect(supportsNativeWarmFiles(profile)).toBe(false);
+ expect(supportsManagedNativeWarmSession(profile, { provider: "github", method: "api_key" })).toBe(false);
+ });
+ it("preserves Codex warm support", () => {
+ const profile: PaperclipRunnerProviderProfile = { provider: "codex", backend: "codex_app_server", model: "gpt-5.6-sol" };
+ expect(supportsNativeWarmFiles(profile)).toBe(true);
+ expect(supportsManagedNativeWarmSession(profile, undefined)).toBe(true);
+ });
+});
diff --git a/server/src/services/native-runtime/native-warm-capability.ts b/server/src/services/native-runtime/native-warm-capability.ts
new file mode 100644
index 0000000000..48d015698c
--- /dev/null
+++ b/server/src/services/native-runtime/native-warm-capability.ts
@@ -0,0 +1,20 @@
+import type { PaperclipRunnerProviderProfile } from "./provider-profile.js";
+
+type WarmProviderSelection = { backend: PaperclipRunnerProviderProfile["backend"]; acpxAgent?: unknown };
+
+/** Providers with a session-owned home and the current instruction-grant handoff. */
+export function supportsNativeWarmFiles(profile: WarmProviderSelection): boolean {
+ return profile.backend === "codex_app_server" ||
+ (profile.backend === "acpx_runtime" && profile.acpxAgent === "copilot");
+}
+
+/** Copilot carries a token in its fenced session environment, not a temporary auth file.
+ * Credential generation changes still retire the exact warm owner before attachment. */
+export function supportsManagedNativeWarmSession(
+ profile: WarmProviderSelection,
+ attribution: { provider: string; method: string } | undefined,
+): boolean {
+ return profile.backend === "codex_app_server" ||
+ (profile.backend === "acpx_runtime" && profile.acpxAgent === "copilot" &&
+ attribution?.provider === "github" && attribution.method === "api_key");
+}
diff --git a/server/src/services/native-runtime/provider-profile.ts b/server/src/services/native-runtime/provider-profile.ts
index 9e384378a8..0232d00bc0 100644
--- a/server/src/services/native-runtime/provider-profile.ts
+++ b/server/src/services/native-runtime/provider-profile.ts
@@ -31,6 +31,7 @@ export const DEFAULT_ACPX_RUNNER_MODELS = {
// These profiles require explicit configuration. Admission belongs to the runner.
codex: null,
cursor: null,
+ copilot: null,
pi: null,
} as const;
@@ -535,6 +536,9 @@ export function resolvePaperclipRunnerProviderProfile(
}
const acpxAgent = config.acpxAgent ?? "claude";
+ if (acpxAgent === "copilot" && (!model || ["auto", "default"].includes(model.toLowerCase()))) {
+ throw new PaperclipRunnerProviderProfileError("paperclip_runner_acpx_model_required", "GitHub Copilot requires an explicit model ID; there is no default model.");
+ }
const pendingAcpxProfile = PAPERCLIP_RUNNER_ACPX_PROFILES.find(profile => profile.value === acpxAgent && !profile.qualified);
if (pendingAcpxProfile) {
if (!model) throw new PaperclipRunnerProviderProfileError("paperclip_runner_acpx_model_required", `${pendingAcpxProfile.label} requires an explicit model ID; there is no default model.`);
@@ -554,7 +558,7 @@ export function resolvePaperclipRunnerProviderProfile(
if ((acpxAgent === "cursor" || acpxAgent === "pi") && !model) {
throw new PaperclipRunnerProviderProfileError("paperclip_runner_acpx_model_required", "This ACPX agent requires an explicit model ID; there is no default model.");
}
- if (acpxAgent !== "claude" && acpxAgent !== "codex" && acpxAgent !== "grok" && acpxAgent !== "cursor" && acpxAgent !== "pi") {
+ if (acpxAgent !== "claude" && acpxAgent !== "codex" && acpxAgent !== "grok" && acpxAgent !== "cursor" && acpxAgent !== "copilot" && acpxAgent !== "pi") {
throw new PaperclipRunnerProviderProfileError(
"paperclip_runner_acpx_agent_unavailable",
"Paperclip Runner ACPX requires a qualified agent profile.",
diff --git a/server/src/services/native-runtime/remote-provider-pack.test.ts b/server/src/services/native-runtime/remote-provider-pack.test.ts
index ca60e946d9..a4ec1f60d9 100644
--- a/server/src/services/native-runtime/remote-provider-pack.test.ts
+++ b/server/src/services/native-runtime/remote-provider-pack.test.ts
@@ -1,7 +1,7 @@
import { describe, expect, it, vi } from "vitest";
import { execFile } from "node:child_process";
import { promisify } from "node:util";
-import { prepareVerifiedRemoteProviderPack, useVerifiedPreinstalledRemoteProviderPack, runRemoteProviderVerification } from "./remote-provider-pack.js";
+import { prepareVerifiedRemoteProviderPack, useVerifiedPreinstalledRemoteProviderPack, runRemoteProviderVerification, shouldUseBundledAcpxImageAssets } from "./remote-provider-pack.js";
describe("remote provider verification", () => {
const ok = { exitCode: 0, timedOut: false, stdout: "verified", stderr: "", signal: null };
@@ -91,6 +91,21 @@ describe("remote provider pack reuse", () => {
});
+describe("ordinary ACPX image artifacts", () => {
+ const provider = (agent: string) => ({ kind: "acpx", agent, model: "selected-model" } as Parameters<typeof shouldUseBundledAcpxImageAssets>[0]["provider"]);
+ it.each(["cursor", "copilot"])("selects bundled artifacts for remote %s without an operator override", agent => {
+ expect(shouldUseBundledAcpxImageAssets({ requiresRemoteProviderPack: true, configuredProviderPackRoot: null, provider: provider(agent) })).toBe(true);
+ expect(shouldUseBundledAcpxImageAssets({ requiresRemoteProviderPack: false, configuredProviderPackRoot: null, provider: provider(agent) })).toBe(false);
+ expect(shouldUseBundledAcpxImageAssets({ requiresRemoteProviderPack: true, configuredProviderPackRoot: "/explicit/pack", provider: provider(agent) })).toBe(false);
+ });
+ it.each(["pi", "claude", "codex", "grok"])("does not change the artifact authority for %s", agent => {
+ expect(shouldUseBundledAcpxImageAssets({ requiresRemoteProviderPack: true, configuredProviderPackRoot: null, provider: provider(agent) })).toBe(false);
+ });
+ it("does not admit a non-ACPX provider through bundled image selection", () => {
+ expect(shouldUseBundledAcpxImageAssets({ requiresRemoteProviderPack: true, configuredProviderPackRoot: null, provider: { kind: "codex", model: null } })).toBe(false);
+ });
+});
+
describe("standard remote provider pack discovery", () => {
const roots = ["/opt/paperclip-runner/provider-pack", "/home/operator/.local/share/paperclip-runner/provider-pack"];
it.each(["old manifest", "modified artifact", "failed link"])("tries the matching home pack after %s rejects /opt", async reason => {
diff --git a/server/src/services/native-runtime/remote-provider-pack.ts b/server/src/services/native-runtime/remote-provider-pack.ts
index a7a453433f..b7045ad42d 100644
--- a/server/src/services/native-runtime/remote-provider-pack.ts
+++ b/server/src/services/native-runtime/remote-provider-pack.ts
@@ -1,4 +1,16 @@
import type { NativeRunTrace } from "./native-run-trace.js";
+import type { NativeExecutionInput } from "../../vendor/paperclip-runner/index.js";
+
+/** Qualified ACPX releases carry their Linux image manifest and daemon. */
+export function shouldUseBundledAcpxImageAssets(input: {
+ requiresRemoteProviderPack: boolean;
+ configuredProviderPackRoot: string | null;
+ provider: NativeExecutionInput["provider"];
+}): boolean {
+ return input.requiresRemoteProviderPack && !input.configuredProviderPackRoot &&
+ input.provider.kind === "acpx" &&
+ ["cursor", "copilot"].includes(input.provider.agent);
+}
type VerificationCommandResult = {
exitCode: number | null;
diff --git a/server/src/services/native-runtime/runtime-mode.test.ts b/server/src/services/native-runtime/runtime-mode.test.ts
index 6f70f9de39..3a76ed1fd1 100644
--- a/server/src/services/native-runtime/runtime-mode.test.ts
+++ b/server/src/services/native-runtime/runtime-mode.test.ts
@@ -50,6 +50,17 @@ describe("resolveNativeRuntimeMode", () => {
})).toMatchObject({ kind: "native", profile: { backend: "codex_app_server" } });
});
+ it("admits saved-token Copilot with the generic Runner rollout disabled", () => {
+ expect(resolveNativeRuntimeMode({ ...eligible, enabled: false,
+ adapterConfig: { provider: "acpx", acpxAgent: "copilot", model: "gpt-5.6-luna" },
+ })).toMatchObject({ kind: "native", profile: { backend: "acpx_runtime" } });
+ for (const acpxAgent of ["pi", "cursor", "codex"]) {
+ expect(() => resolveNativeRuntimeMode({ ...eligible, enabled: false,
+ adapterConfig: { provider: "acpx", acpxAgent, model: "gpt-5.6-luna" },
+ })).toThrow(expect.objectContaining({ code: "paperclip_runner_rollout_disabled" }));
+ }
+ });
+
it.each([
[false, false],
[false, true],
@@ -144,16 +155,23 @@ describe("resolveNativeRuntimeMode", () => {
kind: "native",
profile: { backend: "acpx_runtime" },
});
+ expect(resolveNativeRuntimeMode({
+ ...eligible,
+ adapterConfig: { provider: "acpx", acpxAgent: "copilot", model: "gpt-5.6-luna" },
+ })).toMatchObject({
+ kind: "native",
+ profile: { backend: "acpx_runtime" },
+ });
});
- it("rejects malformed OpenCode and unqualified ACPX profiles", () => {
+ it("rejects malformed OpenCode and unregistered ACPX profiles", () => {
expect(() => resolveNativeRuntimeMode({
...eligible,
adapterConfig: { provider: "opencode", model: "gpt-5.6-sol" },
})).toThrow(expect.objectContaining({
code: "paperclip_runner_opencode_model_invalid",
}));
- for (const acpxAgent of ["copilot"]) {
+ for (const acpxAgent of ["unregistered-acpx-agent"]) {
expect(() => resolveNativeRuntimeMode({
...eligible,
adapterConfig: { provider: "acpx", acpxAgent, model: "explicit-provider-model" },
diff --git a/server/src/services/native-runtime/runtime-mode.ts b/server/src/services/native-runtime/runtime-mode.ts
index 20510f4b79..3e23c2aa13 100644
--- a/server/src/services/native-runtime/runtime-mode.ts
+++ b/server/src/services/native-runtime/runtime-mode.ts
@@ -138,7 +138,10 @@ export function resolveNativeRuntimeMode(input: {
if (input.dotEnabled !== true) throw ineligible("paperclip_runner_dot_disabled", "Enable OpenAI Dot and Assistant connections (MCP) in experimental settings before assigning new work.");
} else if (runnerProfile.provider === "grok_bot" && (input.grokEnabled !== true || !input.enabled)) {
throw ineligible("paperclip_runner_grok_disabled", "Enable Grok Bot, Paperclip Runner, and Assistant connections (MCP) before assigning new work.");
- } else if (runnerProfile.provider !== "codex" && !(runnerProfile.provider === "acpx" && runnerProfile.acpxAgent === "claude") && !input.enabled) {
+ } else if (runnerProfile.provider !== "codex"
+ && !(runnerProfile.provider === "acpx"
+ && (runnerProfile.acpxAgent === "claude" || runnerProfile.acpxAgent === "copilot"))
+ && !input.enabled) {
throw ineligible(
"paperclip_runner_rollout_disabled",
"Paperclip Runner is experimental and disabled on this instance.",
diff --git a/server/src/services/tool-access.ts b/server/src/services/tool-access.ts
index c89cac4c3c..e0344731a9 100644
--- a/server/src/services/tool-access.ts
+++ b/server/src/services/tool-access.ts
@@ -1046,7 +1046,8 @@ function connectionMethodFor(app: AppDefinition, methodKey?: string | null) {
const availableMethods = new Set(getAvailableConnectionMethods(app));
const toolMethods = app.methods.filter(
(candidate) =>
- candidate.purpose !== "channel" && candidate.transport !== "chat_sdk"
+ candidate.purpose !== "channel" && candidate.purpose !== "ai"
+ && candidate.transport !== "chat_sdk" && candidate.transport !== "runtime_auth"
&& (availableMethods.has(candidate) || isPaperclipCloudConnectorStrategy(candidate.oauthStrategy)),
);
const method = normalizedMethodKey
@@ -12579,7 +12580,8 @@ export function toolAccessService(
galleryEntry &&
getAvailableConnectionMethods(galleryEntry).filter(
(candidate) =>
- candidate.purpose !== "channel" && candidate.transport !== "chat_sdk",
+ candidate.purpose !== "channel" && candidate.purpose !== "ai"
+ && candidate.transport !== "chat_sdk" && candidate.transport !== "runtime_auth",
).length > 1 &&
!inferredMethodKey
) {
diff --git a/server/src/vendor/paperclip-runner/live/index.ts b/server/src/vendor/paperclip-runner/live/index.ts
index cbce8db42d..1d0d8f4151 100644
--- a/server/src/vendor/paperclip-runner/live/index.ts
+++ b/server/src/vendor/paperclip-runner/live/index.ts
@@ -1,7 +1,14 @@
-/** Development boundary; the server build replaces this with Runner dist/live. */
-export {
- probeAcpxClaudeInstallation,
- probeAcpxGrokInstallation,
- probeAcpxCursorInstallation,
- probeAcpxPiInstallation,
-} from "@paperclipai/paperclip-runner/live";
+/** Source shim; server build replaces it with the runner's compiled live tree. */
+type RunnerLiveModule = typeof import("@paperclipai/paperclip-runner/live");
+const sourceUrl = new URL(
+ "../../../../../packages/paperclip-runner/src/live/index.ts",
+ import.meta.url,
+);
+const runner = (await import(sourceUrl.href)) as RunnerLiveModule;
+
+export const probeCopilotMetadata = runner.probeCopilotMetadata;
+export const validateCopilotMetadata = runner.validateCopilotMetadata;
+export const probeAcpxClaudeInstallation = runner.probeAcpxClaudeInstallation;
+export const probeAcpxGrokInstallation = runner.probeAcpxGrokInstallation;
+export const probeAcpxCursorInstallation = runner.probeAcpxCursorInstallation;
+export const probeAcpxPiInstallation = runner.probeAcpxPiInstallation;
diff --git a/ui/src/adapters/adapter-display-registry.ts b/ui/src/adapters/adapter-display-registry.ts
index d77ed9bc96..cf3c94a39d 100644
--- a/ui/src/adapters/adapter-display-registry.ts
+++ b/ui/src/adapters/adapter-display-registry.ts
@@ -61,6 +61,7 @@ export interface AdapterDisplayInfo {
}
const adapterDisplayMap: Record<string, AdapterDisplayInfo> = {
+ copilot_runtime: { label: "GitHub Copilot", description: "Copilot through Paperclip Runner", icon: Code, hideFromVisualSelection: true },
acpx_local: {
label: "ACPX (retired)",
description: "Retired standalone ACPX adapter",
diff --git a/ui/src/adapters/codex-local/config-fields.test.tsx b/ui/src/adapters/codex-local/config-fields.test.tsx
index 28abea8201..9db025c1a7 100644
--- a/ui/src/adapters/codex-local/config-fields.test.tsx
+++ b/ui/src/adapters/codex-local/config-fields.test.tsx
@@ -276,7 +276,7 @@ describe("Paperclip Runner Codex configuration", () => {
expect(html).not.toContain("Ask for untrusted operations");
});
- it("offers qualified Claude, Cursor and Pi while keeping Copilot disabled", async () => {
+ it("offers qualified Claude, Cursor, Pi and Copilot", async () => {
const html = await renderRunner({
provider: "acpx",
acpxAgent: "claude",
@@ -289,7 +289,7 @@ describe("Paperclip Runner Codex configuration", () => {
expect(Array.from(options, option => ({ label: option.textContent?.trim(), disabled: option.hasAttribute("data-disabled") })))
.toEqual(expect.arrayContaining([
{ label: "Claude", disabled: false }, { label: "Cursor", disabled: false },
- { label: "Pi", disabled: false }, { label: "GitHub Copilot — qualification pending", disabled: true },
+ { label: "Pi", disabled: false }, { label: "GitHub Copilot", disabled: false },
]));
expect(html).not.toContain("Codex via ACPX");
expect(html).not.toContain("ACPX Codex");
diff --git a/ui/src/adapters/config-sections.test.tsx b/ui/src/adapters/config-sections.test.tsx
index 7a37b0f1a9..810b409168 100644
--- a/ui/src/adapters/config-sections.test.tsx
+++ b/ui/src/adapters/config-sections.test.tsx
@@ -100,7 +100,7 @@ describe("adapter configuration sections", () => {
expect(Array.from(options, option => ({ label: option.textContent?.trim(), disabled: option.hasAttribute("data-disabled") })))
.toEqual(expect.arrayContaining([
{ label: "Claude", disabled: false }, { label: "Pi", disabled: false },
- { label: "Cursor", disabled: false }, { label: "GitHub Copilot — qualification pending", disabled: true },
+ { label: "Cursor", disabled: false }, { label: "GitHub Copilot", disabled: false },
]));
expect(adapter).not.toContain("Runner lifecycle");
expect(policy).toContain("Runner lifecycle");
diff --git a/ui/src/api/agents.ts b/ui/src/api/agents.ts
index cb5f28fe07..0b05d9a4fe 100644
--- a/ui/src/api/agents.ts
+++ b/ui/src/api/agents.ts
@@ -232,11 +232,14 @@ export const agentsApi = {
adapterModels: (
companyId: string,
type: string,
- options?: { refresh?: boolean; environmentId?: string | null; provider?: string; poolId?: string },
+ options?: { refresh?: boolean; environmentId?: string | null; provider?: string; acpxAgent?: string; aiConnection?: import("@paperclipai/shared").AiConnectionBinding; agentId?: string; poolId?: string },
) => {
const params = new URLSearchParams();
if (options?.refresh) params.set("refresh", "1");
if (options?.provider) params.set("provider", options.provider);
+ if (options?.acpxAgent) params.set("acpxAgent", options.acpxAgent);
+ if (options?.aiConnection) params.set("aiConnection", JSON.stringify(options.aiConnection));
+ if (options?.agentId) params.set("agentId", options.agentId);
if (options?.poolId) params.set("poolId", options.poolId);
if (options?.environmentId) params.set("environmentId", options.environmentId);
const query = params.size > 0 ? `?${params.toString()}` : "";
diff --git a/ui/src/components/AgentConfigForm.render.test.tsx b/ui/src/components/AgentConfigForm.render.test.tsx
index 4dc4659720..fdbc19cd8f 100644
--- a/ui/src/components/AgentConfigForm.render.test.tsx
+++ b/ui/src/components/AgentConfigForm.render.test.tsx
@@ -1042,6 +1042,33 @@ describe("AgentConfigForm environment selector", () => {
expect(result.container.querySelector('[aria-label="Environment override"]')).toBeNull();
});
+ it("refreshes Copilot models after reconnecting the same responsible-user account", async () => {
+ const binding = { mode: "responsible_user", provider: "github", method: "api_key" } as const;
+ const account = { id: "copilot-account", grantId: "copilot-grant", companyId: "company-1", provider: "github", method: "api_key", name: "My Copilot", ownership: "personal", ownerUserId: "you", isDefault: true, status: "needs_attention" } as const;
+ const accountList = vi.spyOn(aiConnectionsApi, "list").mockResolvedValue({ currentUserId: "you", canManageConnections: true, connections: [account] });
+ const reconnect = vi.spyOn(aiConnectionsApi, "create").mockResolvedValue({ connectionId: account.id, grantId: account.grantId });
+ mockAgentsApi.adapterModels.mockResolvedValueOnce([{ id: "old-model", label: "Old token model" }])
+ .mockResolvedValue([{ id: "gpt-5.6-luna", label: "New token model" }]);
+ try {
+ const result = await renderForm([makeEnvironment({ id: "local-1", name: "Local", driver: "local" })], {
+ adapterType: "paperclip_runner", adapterConfig: { provider: "acpx", acpxAgent: "copilot", model: "gpt-5.6-luna" }, runtimeConfig: { aiConnection: binding },
+ });
+ roots.push(result.root);
+ await vi.waitFor(() => expect(mockAgentsApi.adapterModels).toHaveBeenCalledTimes(1));
+ await clickByText(result.container, "Reconnect account");
+ const token = document.querySelector<HTMLInputElement>('input[placeholder="github_pat_..."]');
+ expect(token).not.toBeNull();
+ await act(async () => setInputValue(token!, "github_pat_test_reconnect"));
+ await flushReact();
+ await clickByText(document.body, "Connect");
+ await vi.waitFor(() => expect(reconnect).toHaveBeenCalledWith("company-1", expect.objectContaining({ provider: "github", connectionId: account.id, apiKey: "github_pat_test_reconnect" })));
+ await vi.waitFor(() => expect(mockAgentsApi.adapterModels).toHaveBeenCalledTimes(2));
+ expect(mockAgentsApi.adapterModels).toHaveBeenLastCalledWith("company-1", "paperclip_runner", expect.objectContaining({ provider: "acpx", acpxAgent: "copilot", aiConnection: binding }));
+ await flushReact();
+ expect(result.container.textContent).toContain("New token model");
+ } finally { accountList.mockRestore(); reconnect.mockRestore(); }
+ });
+
it("renders GPT-6 Astra and its model-specific reasoning efforts", async () => {
mockAgentsApi.adapterModels.mockResolvedValue([
{ id: "gpt-5.6-sol", label: "gpt-5.6-sol" },
diff --git a/ui/src/components/AgentConfigForm.tsx b/ui/src/components/AgentConfigForm.tsx
index 50f1ebb671..6f6c246ca0 100644
--- a/ui/src/components/AgentConfigForm.tsx
+++ b/ui/src/components/AgentConfigForm.tsx
@@ -1,3 +1,4 @@
+import { COPILOT_MODEL_DISCOVERY_QUERY_OPTIONS } from "@/lib/copilot-task-model-catalog";
import { useConnectionModels } from "./ai-connections/useConnectionModels";
import { agentHarnessType, agentRunner, type AgentRunnerChoice } from "@paperclipai/shared";
import { adaptersApi } from "../api/adapters";
@@ -12,7 +13,7 @@ import { useState, useEffect, useRef, useMemo, useCallback, Children, isValidEle
import type { AdapterConfigSection } from "../adapters/types";
import { useConfigSchema } from "../adapters/schema-config-fields";
import { schemaFieldSection } from "../adapters/config-sections";
-import { useMutation, useQuery, useQueryClient } from "@tanstack/react-query";
+import { hashKey, useMutation, useQuery, useQueryClient } from "@tanstack/react-query";
import type {
Agent,
AdapterAuthSessionPrompt,
@@ -926,24 +927,37 @@ export function AgentConfigForm(props: AgentConfigFormProps) {
const modelProvider = adapterType === "opencode_local" && aiConnectionBindingSchema.safeParse(
(overlay.runtime.runtimeConfig as Record<string, unknown> | undefined)?.aiConnection ?? runtimeConfig.aiConnection,
).data?.provider === "openrouter" ? "openrouter" : runnerProvider;
- const connectionModels = useConnectionModels(isExternalRunner ? null : selectedCompanyId, isCreate ? undefined : aiConnectionBindingSchema.safeParse((overlay.runtime.runtimeConfig as Record<string, unknown> | undefined)?.aiConnection ?? runtimeConfig.aiConnection).data, aiRoutingHarness(adapterType, runnerProvider, eff("adapterConfig", "acpxAgent", config.acpxAgent)));
+ const runnerAcpxAgent = adapterType === "paperclip_runner" && runnerProvider === "acpx"
+ ? String(isCreate ? props.values.adapterSchemaValues?.acpxAgent ?? "claude" : eff("adapterConfig", "acpxAgent", config.acpxAgent ?? "claude")) : undefined;
+ const modelAiBinding = aiConnectionBindingSchema.safeParse((overlay.runtime.runtimeConfig as Record<string, unknown> | undefined)?.aiConnection ?? runtimeConfig.aiConnection).data;
+ const modelCacheIdentity = runnerAcpxAgent === "copilot" ? `${modelProvider}:${runnerAcpxAgent}:${isCreate ? "new" : props.agent.id}:${JSON.stringify(modelAiBinding ?? null)}` : modelProvider;
+ const connectionModels = useConnectionModels(isExternalRunner ? null : selectedCompanyId, isCreate ? undefined : modelAiBinding, aiRoutingHarness(adapterType, runnerProvider, runnerAcpxAgent));
// Fetch adapter models for the effective provider, including unsaved changes.
const modelAdapterType = isRunnerHarness ? harnessType : adapterType;
const modelQueryKey = selectedCompanyId
- ? queryKeys.agents.adapterModels(selectedCompanyId, modelAdapterType, currentDefaultEnvironmentId || null, modelProvider)
+ ? queryKeys.agents.adapterModels(selectedCompanyId, modelAdapterType, currentDefaultEnvironmentId || null, modelCacheIdentity)
: ["agents", "none", "adapter-models", adapterType];
const {
data: fetchedModels,
error: fetchedModelsError,
isLoading: fetchingModels,
+ refetch: refreshConnectionModels,
} = useQuery({
queryKey: modelQueryKey,
queryFn: () => agentsApi.adapterModels(selectedCompanyId!, modelAdapterType, {
environmentId: currentDefaultEnvironmentId || null,
provider: modelProvider,
+ acpxAgent: runnerAcpxAgent,
+ aiConnection: modelAiBinding,
+ agentId: isCreate ? undefined : props.agent.id,
}),
+ ...(runnerAcpxAgent === "copilot" ? COPILOT_MODEL_DISCOVERY_QUERY_OPTIONS : {}),
enabled: Boolean(selectedCompanyId) && !isExternalRunner && !connectionModels,
});
+ const copilotModelScope = runnerAcpxAgent === "copilot" ? JSON.stringify(modelQueryKey) : null;
+ useEffect(() => {
+ if (copilotModelScope && selectedCompanyId && !isExternalRunner && !connectionModels) void refreshConnectionModels();
+ }, [copilotModelScope, selectedCompanyId, isExternalRunner, connectionModels, refreshConnectionModels]);
const [refreshModelsError, setRefreshModelsError] = useState<string | null>(null);
const [refreshingModels, setRefreshingModels] = useState(false);
const models = connectionModels?.models ?? fetchedModels ?? externalModels ?? [];
@@ -1298,7 +1312,7 @@ export function AgentConfigForm(props: AgentConfigFormProps) {
setRefreshingModels(true);
setRefreshModelsError(null);
try {
- const refreshed = await agentsApi.adapterModels(selectedCompanyId, modelAdapterType, { refresh: true, environmentId: currentDefaultEnvironmentId || null, provider: modelProvider });
+ const refreshed = await agentsApi.adapterModels(selectedCompanyId, modelAdapterType, { refresh: true, environmentId: currentDefaultEnvironmentId || null, provider: modelProvider, ...(runnerAcpxAgent === "copilot" ? { acpxAgent: runnerAcpxAgent, aiConnection: modelAiBinding, agentId: !isCreate ? props.agent.id : undefined } : {}) });
queryClient.setQueryData(modelQueryKey, refreshed);
} catch (error) {
setRefreshModelsError(error instanceof Error ? error.message : "Failed to refresh adapter models.");
@@ -1723,7 +1737,10 @@ export function AgentConfigForm(props: AgentConfigFormProps) {
{!isExternalRunner && !isCreate && selectedCompanyId && <AiConnectionField companyId={selectedCompanyId} agentId={props.agent.id} agentName={props.agent.name} adapterType={aiRoutingHarness(adapterType, eff("adapterConfig", "provider", config.provider), eff("adapterConfig", "acpxAgent", config.acpxAgent))}
routerAdapterType={adapterType} value={aiRuntimeConnectionBindingSchema.safeParse((overlay.runtime.runtimeConfig as Record<string, unknown> | undefined)?.aiConnection ?? runtimeConfig.aiConnection).data}
model={String(eff("adapterConfig", "model", config.model) ?? "")} environmentId={currentDefaultEnvironmentId || undefined} legacy
- onChange={binding => mark("runtime", "runtimeConfig", { ...runtimeConfig, aiConnection: binding })} />}
+ onChange={binding => {
+ mark("runtime", "runtimeConfig", { ...runtimeConfig, aiConnection: binding });
+ if (runnerAcpxAgent === "copilot" && hashKey([modelAiBinding ?? null]) === hashKey([binding ?? null])) void refreshConnectionModels();
+ }} />}
{showInlineAdapterTestEnvironmentFeedback && !props.compactTestFeedback && (testActionError || testEnvironment.error) && (
<div className="rounded-md border border-destructive/30 bg-destructive/10 px-3 py-2 text-xs text-destructive">
@@ -2213,6 +2230,7 @@ export function AgentConfigForm(props: AgentConfigFormProps) {
{props.compactTestFeedback && showInlineAdapterTestEnvironmentFeedback && showAdapterTestEnvironmentButton && (
<RuntimeTestCard
variant={isExternalRunner ? "prerequisites" : "connection"}
+ metadataOnly={adapterType === "paperclip_runner" && runnerAcpxAgent === "copilot"}
state={testActionPending ? "running" : testActionError || testEnvironment.error ? "fail" : testResult?.status ?? "idle"}
result={testResult ?? null}
error={testActionError ?? (testEnvironment.error instanceof Error ? testEnvironment.error.message : null)}
diff --git a/ui/src/components/IssueProperties.test.tsx b/ui/src/components/IssueProperties.test.tsx
index 172198a1ac..7b573ef032 100644
--- a/ui/src/components/IssueProperties.test.tsx
+++ b/ui/src/components/IssueProperties.test.tsx
@@ -2286,6 +2286,34 @@ describe("IssueProperties", () => {
act(() => root.unmount());
});
+ it("discovers Copilot overrides with the assignee connection and environment", async () => {
+ const binding = { provider: "github", method: "api_key", mode: "shared", connectionId: "11111111-1111-4111-8111-111111111111", grantId: "33333333-3333-4333-8333-333333333333" };
+ mockAgentsApi.list.mockResolvedValue([{ id: "agent-1", name: "Copilot", role: "engineer", status: "active",
+ adapterType: "paperclip_runner", defaultEnvironmentId: "daytona-1",
+ adapterConfig: { provider: "acpx", acpxAgent: "copilot", model: "gpt-5.6-luna" },
+ runtimeConfig: { aiConnection: binding } }]);
+ mockAgentsApi.adapterModels.mockResolvedValue([{ id: "gpt-5.6-luna", label: "Copilot Luna" }]);
+ const { root, queryClient } = renderPropertiesWithQueryClient(container, {
+ issue: createIssue({ assigneeAgentId: "agent-1", assigneeAdapterOverrides: { adapterConfig: { model: "gpt-5.6-luna" } } }),
+ childIssues: [], onUpdate: vi.fn(), inline: true,
+ });
+ await flush();
+ await flush();
+ expect(mockAgentsApi.adapterModels).not.toHaveBeenCalled();
+ const modelTrigger = findRowTrigger(container, "Model");
+ expect(modelTrigger).toBeDefined();
+ await act(async () => modelTrigger!.click());
+ await waitForAssertion(() => expect(mockAgentsApi.adapterModels).toHaveBeenCalledWith("company-1", "paperclip_runner", {
+ environmentId: "daytona-1", provider: "acpx", acpxAgent: "copilot", agentId: "agent-1", aiConnection: binding,
+ }));
+ await act(async () => { await queryClient.invalidateQueries({ type: "active" }, { cancelRefetch: false }); });
+ expect(mockAgentsApi.adapterModels).toHaveBeenCalledTimes(1);
+ await act(async () => modelTrigger!.click());
+ await act(async () => modelTrigger!.click());
+ await waitForAssertion(() => expect(mockAgentsApi.adapterModels).toHaveBeenCalledTimes(2));
+ act(() => root.unmount());
+ });
+
it("edits existing custom assignee model options from the properties pane", async () => {
const onUpdate = vi.fn();
mockAgentsApi.list.mockResolvedValue([
diff --git a/ui/src/components/NewAgentDialog.test.tsx b/ui/src/components/NewAgentDialog.test.tsx
index 34ce7eee19..0369d279a5 100644
--- a/ui/src/components/NewAgentDialog.test.tsx
+++ b/ui/src/components/NewAgentDialog.test.tsx
@@ -107,6 +107,20 @@ it("offers one Codex harness without a runner/provider tile", async () => {
expect(document.querySelectorAll('input[value="codex_local"]')).toHaveLength(1);
expect(document.querySelector("select")).toBeNull();
});
+it.each([true, false, undefined])("opens saved-token Copilot setup without an experimental override (%s)", async enableNativeRunner => {
+ await act(async () => cache.setQueryData(queryKeys.instance.experimentalSettings, { enableNativeRunner }));
+ await name();
+ await act(async () => document.querySelector<HTMLInputElement>('input[value="copilot_runtime"]')!.click());
+ await click("Configure agent");
+ const query = new URL(state.navigate.mock.calls[0][0], "http://local").searchParams;
+ expect(query.get("adapterType")).toBe("paperclip_runner");
+ expect(query.get("runnerProvider")).toBe("copilot");
+});
+it("hides Copilot when its runtime adapter is disabled", async () => {
+ await act(async () => cache.setQueryData(queryKeys.adapters.all, state.adapters.map((entry: any) => entry.type === "paperclip_runner" ? { ...entry, disabled: true } : entry)));
+ await name();
+ expect(document.querySelector('input[value="copilot_runtime"]')).toBeNull();
+});
it.each(["grok", "opencode"])("preserves explicit experimental %s creation in Advanced", async provider => {
await name();
await act(async () => (document.querySelector("summary") as HTMLElement).click());
diff --git a/ui/src/components/OnboardingWizard.adapters.test.tsx b/ui/src/components/OnboardingWizard.adapters.test.tsx
index 0ccb83066d..b4941d1ccd 100644
--- a/ui/src/components/OnboardingWizard.adapters.test.tsx
+++ b/ui/src/components/OnboardingWizard.adapters.test.tsx
@@ -111,7 +111,7 @@ async function flushReact() {
});
}
-async function mount() {
+async function mount(nativeRunnerEnabled?: boolean) {
const container = document.createElement("div");
document.body.appendChild(container);
const root = createRoot(container);
@@ -124,6 +124,7 @@ async function mount() {
session: { id: "session-1", userId: "user-1" },
user: { id: "user-1", name: "Example", email: "[email protected]", image: null },
});
+ if (nativeRunnerEnabled !== undefined) queryClient.setQueryData(queryKeys.instance.experimentalSettings, { enableNativeRunner: nativeRunnerEnabled, enableOpenAiDot: true });
await act(async () => {
root.render(
<QueryClientProvider client={queryClient}>
@@ -289,4 +290,20 @@ describe("OnboardingWizard adapter selection", () => {
root.unmount();
});
});
+
+ it("retains an explicit Copilot draft with the native runner experiment disabled", async () => {
+ mockAdapterRegistry.list = [{ type: "paperclip_runner" }, { type: "codex_local" }];
+ window.localStorage.setItem(ONBOARDING_STORAGE_KEY, JSON.stringify({ step: 0, adapterType: "paperclip_runner", onboardingCopilot: true, model: "gpt-5.6-luna" }));
+ const { root } = await mount(false);
+ expect(JSON.parse(window.localStorage.getItem(ONBOARDING_STORAGE_KEY)!)).toMatchObject({ adapterType: "paperclip_runner", onboardingCopilot: true, model: "gpt-5.6-luna" });
+ await act(async () => root.unmount());
+ });
+
+ it("restores a qualified Copilot draft without changing its explicit model", async () => {
+ mockAdapterRegistry.list = [{ type: "paperclip_runner" }];
+ window.localStorage.setItem(ONBOARDING_STORAGE_KEY, JSON.stringify({ step: 0, adapterType: "paperclip_runner", onboardingCopilot: true, model: "gpt-5.6-luna" }));
+ const { root } = await mount(true);
+ expect(JSON.parse(window.localStorage.getItem(ONBOARDING_STORAGE_KEY)!)).toMatchObject({ adapterType: "paperclip_runner", onboardingCopilot: true, model: "gpt-5.6-luna" });
+ await act(async () => root.unmount());
+ });
});
diff --git a/ui/src/components/OnboardingWizard.test.tsx b/ui/src/components/OnboardingWizard.test.tsx
index 667a98a304..5fed69b108 100644
--- a/ui/src/components/OnboardingWizard.test.tsx
+++ b/ui/src/components/OnboardingWizard.test.tsx
@@ -36,6 +36,15 @@ const managedApi = vi.hoisted(() => ({
create: vi.fn(async () => ({ connectionId: "managed-connection", grantId: "managed-grant" })),
}));
vi.mock("@/api/ai-connections", () => ({ aiConnectionsApi: managedApi }));
+// Keep the wizard tests focused on binding/model/creation boundaries. The
+// connection component has its own tests; the ordinary-install UI canary
+// exercises its real token storage and default selection.
+vi.mock("./ai-connections/AiConnectionField", async (importOriginal) => {
+ const actual = await importOriginal<typeof import("./ai-connections/AiConnectionField")>();
+ return { ...actual, AiConnectionField: (props: { environmentId?: string; onChange: (value: import("@paperclipai/shared").AiConnectionBinding) => void }) => (
+ <button data-environment={props.environmentId} onClick={() => props.onChange({ provider: "github", method: "api_key", mode: "responsible_user" })}>Use saved Copilot connection</button>
+ ) };
+});
vi.mock("../api/auth", async (importOriginal) => {
const actual = await importOriginal<typeof import("../api/auth")>();
return { ...actual, authApi: { ...actual.authApi, getSession: mockAuthApi.getSession } };
@@ -83,7 +92,7 @@ const mockAgentsApi = vi.hoisted(() => ({
// The hire step lists the company's agents first and adopts one that already
// carries the typed name on the same source, so a wizard that reopens on the
// agent step cannot hire "Ada 2". Empty by default: the company is new.
- list: vi.fn(async () => [] as Array<{ id: string; name: string; adapterType: string }>),
+ list: vi.fn(async () => [] as Array<{ id: string; name: string; adapterType: string; adapterConfig?: Record<string, unknown> }>),
instructionsBundle: vi.fn(async () => ({ entryFile: "AGENTS.md" })),
saveInstructionsFile: vi.fn(async () => ({})),
// No default implementation: the top-level `beforeEach` sets the "no
@@ -150,7 +159,7 @@ const mockEnvironmentsApi = vi.hoisted(() => ({
}));
const mockInstanceSettingsApi = vi.hoisted(() => ({
get: vi.fn(async () => ({ defaultEnvironmentId: null as string | null })),
- getExperimental: vi.fn(async () => ({ enableManagedSandboxOnly: false })),
+ getExperimental: vi.fn(async (): Promise<{ enableManagedSandboxOnly: boolean; enableNativeRunner?: boolean }> => ({ enableManagedSandboxOnly: false })),
}));
const mockApprovalsApi = vi.hoisted(() => ({
create: vi.fn(),
@@ -351,6 +360,7 @@ describe("OnboardingWizard restore-gate (stale localStorage across accounts)", (
beforeEach(() => {
mockAdaptersApi.list.mockReset().mockResolvedValue([]);
mockEnvironmentsApi.probe.mockReset().mockResolvedValue({ ok: true, driver: "sandbox", summary: "Measured image", details: { platformQualificationRecorded: true, leaseId: "platform-lease" } });
+ mockInstanceSettingsApi.getExperimental.mockResolvedValue({ enableManagedSandboxOnly: false });
localHealth.get.mockResolvedValue({ deploymentMode: "authenticated" });
managedApi.checkLocalLogin.mockReset().mockResolvedValue({
status: "sign_in_required",
@@ -402,6 +412,7 @@ describe("OnboardingWizard restore-gate (stale localStorage across accounts)", (
// call history — so a test that customizes one of these must not leak
// its override into the next test.
mockAgentsApi.testEnvironment.mockReset();
+ mockAgentsApi.adapterModels.mockReset().mockResolvedValue([]);
mockAgentsApi.testEnvironment.mockResolvedValue({
adapterType: "claude_local",
status: "pass" as const,
@@ -429,6 +440,116 @@ describe("OnboardingWizard restore-gate (stale localStorage across accounts)", (
vi.clearAllMocks();
});
+ describe("qualified Copilot onboarding", () => {
+ async function openCopilot() {
+ mockInstanceSettingsApi.getExperimental.mockResolvedValue({ enableManagedSandboxOnly: false, enableNativeRunner: true });
+ mockCompany.companies = [{ id: "c1", name: "Canary", issuePrefix: "CAN" }];
+ mockCompaniesApi.list.mockResolvedValue(mockCompany.companies);
+ mockAdapterRegistry.list = [{ type: "claude_local" }, { type: "paperclip_runner" }];
+ window.localStorage.setItem(ONBOARDING_STORAGE_KEY, JSON.stringify({ step: 4, createdCompanyId: "c1", agentName: "Copilot canary" }));
+ mockAgentsApi.adapterModels.mockResolvedValue([{ id: "gpt-5.6-luna", label: "GPT 5.6 Luna" }]);
+ mockAdapterBuild.buildAdapterConfig.mockImplementation((...args: unknown[]) => {
+ const values = args[0] as { adapterSchemaValues: Record<string, unknown>; model: string };
+ return { ...values.adapterSchemaValues, model: values.model };
+ });
+ const { root, queryClient } = render();
+ queryClient.setQueryData(queryKeys.instance.experimentalSettings, { enableManagedSandboxOnly: false, enableNativeRunner: true });
+ await act(async () => root.render(<QueryClientProvider client={queryClient}><OnboardingWizard /></QueryClientProvider>));
+ await flushReact();
+ const click = async (label: string) => {
+ const button = [...document.body.querySelectorAll("button")].find((entry) => entry.textContent?.includes(label))!;
+ expect(button).toBeTruthy();
+ await act(async () => button.dispatchEvent(new MouseEvent("click", { bubbles: true })));
+ await flushReact();
+ };
+ await click("GitHub Copilot");
+ await flushReact();
+ return { root, click };
+ }
+
+ it.each(["choices", "authentication error"])("refreshes Copilot onboarding after reconnecting the same binding with cached %s", async (cachedState) => {
+ const { root, click } = await openCopilot();
+ try {
+ mockAgentsApi.adapterModels.mockReset();
+ if (cachedState === "authentication error") mockAgentsApi.adapterModels.mockRejectedValueOnce(new Error("Expired token"));
+ else mockAgentsApi.adapterModels.mockResolvedValueOnce([{ id: "old-model", label: "Old account model" }]);
+ await click("Use saved Copilot connection");
+ await vi.waitFor(() => expect(mockAgentsApi.adapterModels).toHaveBeenCalledTimes(1));
+ mockAgentsApi.adapterModels.mockResolvedValue([{ id: "new-model", label: "New account model" }]);
+ await click("Use saved Copilot connection");
+ await vi.waitFor(() => expect(mockAgentsApi.adapterModels).toHaveBeenCalledTimes(2));
+ await vi.waitFor(() => expect(document.body.querySelector('[aria-label="Copilot model"]')?.textContent).toContain("New account model"));
+ expect(document.body.textContent).not.toContain("Old account model");
+ expect(document.body.textContent).not.toContain("Expired token");
+ expect((document.body.querySelector('[aria-label="Copilot model"]') as HTMLSelectElement).value).toBe("");
+ } finally { await act(async () => root.unmount()); }
+ });
+
+ it.each([null, "copilot-daytona"])("discovers models and tests the same saved-token configuration it hires in environment %s", async (environmentId) => {
+ mockInstanceSettingsApi.get.mockResolvedValue({ defaultEnvironmentId: environmentId });
+ mockEnvironmentsApi.list.mockResolvedValue(environmentId ? [{ id: environmentId, name: "Daytona", driver: "sandbox", status: "active", config: { provider: "daytona" } }] : []);
+ const { root, click } = await openCopilot();
+ const claudeReadsBeforeCopilot = mockAgentsApi.getClaudeOAuthTokenStatus.mock.calls.length;
+ expect((mockAgentsApi.adapterModels.mock.calls as unknown[][]).some((call) => call[1] === "paperclip_runner")).toBe(false);
+ expect(mockAgentsApi.hire).not.toHaveBeenCalled();
+ await click("Use saved Copilot connection");
+ expect(document.body.querySelector('[data-environment]')?.getAttribute("data-environment") ?? null).toBe(environmentId);
+ expect(mockAgentsApi.adapterModels).toHaveBeenCalledWith("c1", "paperclip_runner", { environmentId, provider: "acpx", acpxAgent: "copilot", aiConnection: { provider: "github", method: "api_key", mode: "responsible_user" } });
+ const select = document.body.querySelector('[aria-label="Copilot model"]') as HTMLSelectElement;
+ expect(select.value).toBe("");
+ await act(async () => { select.value = "gpt-5.6-luna"; select.dispatchEvent(new Event("change", { bubbles: true })); });
+ await flushReact();
+ await click("Connect");
+ const tested = mockAgentsApi.testEnvironment.mock.calls[0] as unknown as [string, string, { adapterConfig: Record<string, unknown>; aiConnection: unknown }];
+ const hired = mockAgentsApi.hire.mock.calls[0] as unknown[];
+ expect(tested).toMatchObject(["c1", "paperclip_runner", { adapterConfig: { provider: "acpx", acpxAgent: "copilot", model: "gpt-5.6-luna" }, aiConnection: { provider: "github", method: "api_key", mode: "responsible_user" } }]);
+ expect(hired).toMatchObject(["c1", { adapterType: "paperclip_runner", adapterConfig: tested[2].adapterConfig, runtimeConfig: { aiConnection: tested[2].aiConnection } }]);
+ expect(mockAgentsApi.getClaudeOAuthTokenStatus.mock.calls.length).toBe(claudeReadsBeforeCopilot);
+ expect(JSON.stringify(hired)).not.toContain("COPILOT_GITHUB_TOKEN");
+ expect(JSON.parse(window.localStorage.getItem(ONBOARDING_STORAGE_KEY)!)).toMatchObject({ adapterType: "paperclip_runner", onboardingCopilot: true, model: "gpt-5.6-luna" });
+ await act(async () => root.unmount());
+ mockInstanceSettingsApi.get.mockResolvedValue({ defaultEnvironmentId: null });
+ mockEnvironmentsApi.list.mockResolvedValue([]);
+ });
+
+ it("reuses an existing Copilot hire after losing its draft id without adopting another Runner", async () => {
+ const { root, click } = await openCopilot();
+ try {
+ await click("Use saved Copilot connection");
+ const select = document.body.querySelector('[aria-label="Copilot model"]') as HTMLSelectElement;
+ await act(async () => { select.value = "gpt-5.6-luna"; select.dispatchEvent(new Event("change", { bubbles: true })); });
+ await flushReact();
+ mockAgentsApi.list.mockResolvedValue([
+ { id: "codex-other", name: "Copilot canary", adapterType: "paperclip_runner", adapterConfig: { provider: "codex" } },
+ { id: "copilot-existing", name: "Copilot canary", adapterType: "paperclip_runner", adapterConfig: { provider: "acpx", acpxAgent: "copilot", model: "gpt-5.6-luna" } },
+ ]);
+ await click("Connect");
+ expect(mockAgentsApi.hire).not.toHaveBeenCalled();
+ expect(JSON.parse(window.localStorage.getItem(ONBOARDING_STORAGE_KEY)!)).toMatchObject({ createdAgentId: "copilot-existing" });
+ expect(document.body.textContent).toContain("Copilot canary is ready to work!");
+ } finally {
+ await act(async () => root.unmount());
+ }
+ });
+
+ it("refuses an unavailable model after refresh without substituting or hiring", async () => {
+ const { root, click } = await openCopilot();
+ await click("Use saved Copilot connection");
+ const select = document.body.querySelector('[aria-label="Copilot model"]') as HTMLSelectElement;
+ await act(async () => { select.value = "gpt-5.6-luna"; select.dispatchEvent(new Event("change", { bubbles: true })); });
+ await flushReact();
+ mockAgentsApi.adapterModels.mockResolvedValue([{ id: "other-model", label: "Other model" }]);
+ await click("Refresh models");
+ expect(select.value).toBe("gpt-5.6-luna");
+ expect(select.textContent).toContain("gpt-5.6-luna (unavailable)");
+ const primary = [...document.body.querySelectorAll("button")].find((entry) => entry.textContent?.trim() === "Connect");
+ expect(primary?.disabled).toBe(true);
+ expect(mockAgentsApi.testEnvironment).not.toHaveBeenCalled();
+ expect(mockAgentsApi.hire).not.toHaveBeenCalled();
+ await act(async () => root.unmount());
+ });
+ });
+
describe("step 1 leads straight to the agent — there is no mission step 2", () => {
// One path now: Name your organization → Name your agent → Connect → Get
// started. The Build / Grow front door and both mission screens are gone,
diff --git a/ui/src/components/OnboardingWizard.tsx b/ui/src/components/OnboardingWizard.tsx
index 2c66724efd..f13da68eb9 100644
--- a/ui/src/components/OnboardingWizard.tsx
+++ b/ui/src/components/OnboardingWizard.tsx
@@ -1,3 +1,4 @@
+import { COPILOT_MODEL_DISCOVERY_QUERY_OPTIONS } from "@/lib/copilot-task-model-catalog";
import type { AgentRunner, AgentRunnerChoice } from "@paperclipai/shared";
import { needsClaudeSetupQualification, qualifyClaudeSetup } from "../lib/qualify-claude-setup";
import { agentHarnessType } from "@paperclipai/shared";
@@ -7,7 +8,9 @@ import { healthApi } from "@/api/health";
import { LocalProviderLoginInstructions } from "./AdapterLoginChrome";
import { useLocalAiLogin } from "./ai-connections/useLocalAiLogin";
import { aiConnectionsApi } from "@/api/ai-connections";
-import { aiProviderForAdapter } from "./ai-connections/AiConnectionField";
+import { AiConnectionField, aiProviderForAdapter } from "./ai-connections/AiConnectionField";
+import { PAPERCLIP_RUNNER_ACPX_PROFILES } from "@paperclipai/adapter-utils";
+import { aiConnectionBindingSchema } from "@paperclipai/shared";
import type { AiConnectionBinding } from "@paperclipai/shared";
import { storeProviderApiKey } from "../lib/provider-credential";
import { SavedProviderKeySelect, useSavedProviderKeys } from "./onboarding/SavedProviderKeySelect";
@@ -152,15 +155,21 @@ type Step = 0 | 1 | 2 | 3 | 4 | 5;
// wizard's registry-driven approach rather than a fixed union.
type AdapterType = string;
+// Only the qualified Copilot profile is offered through Runner in onboarding.
+// Other Runner profiles remain explicit agent configuration choices.
const ONBOARDING_EXCLUDED_ADAPTER_TYPES = new Set([
"process",
"http",
"paperclip_runner",
]);
-function restoreOnboardingAdapterType(savedAdapterType: unknown, provider?: unknown): AdapterType {
- if (savedAdapterType === "paperclip_runner" && (provider === undefined || provider === "codex")) return "codex_local";
- return typeof savedAdapterType === "string" && savedAdapterType !== "paperclip_runner"
+const copilotOnboardingQualified = PAPERCLIP_RUNNER_ACPX_PROFILES.some(
+ (profile) => profile.value === "copilot" && profile.qualified,
+);
+
+function restoreOnboardingAdapterType(savedAdapterType: unknown, provider?: unknown, savedCopilot?: unknown): AdapterType {
+ if (savedAdapterType === "paperclip_runner" && savedCopilot !== true && (provider === undefined || provider === "codex")) return "codex_local";
+ return typeof savedAdapterType === "string" && (savedAdapterType !== "paperclip_runner" || (savedCopilot === true && copilotOnboardingQualified))
? savedAdapterType
: "claude_local";
}
@@ -254,6 +263,7 @@ const MODEL_SOURCE_INLINE_MARKS: Record<string, ComponentType<{ className?: stri
const API_KEY_ENV_KEYS: Record<string, string> = {
claude_local: ANTHROPIC_API_KEY_ENV_KEY,
codex_local: "OPENAI_API_KEY",
+ paperclip_runner: "COPILOT_GITHUB_TOKEN",
};
function apiKeyEnvKeyFor(adapterType: string): string {
@@ -597,7 +607,7 @@ function OnboardingWizardInner({
(saved?.agentRole as AgentRole) || DEFAULT_AGENT_ROLE,
);
const [adapterType, setAdapterType] = useState<AdapterType>(() =>
- restoreOnboardingAdapterType(saved?.adapterType, saved?.runnerProvider),
+ restoreOnboardingAdapterType(saved?.adapterType, saved?.runnerProvider, saved?.onboardingCopilot),
);
const [runner, setRunner] = useState<AgentRunnerChoice>(() => saved?.runner === "legacy" || saved?.runner === "paperclip"
? saved.runner : saved?.adapterType === "paperclip_runner" && (saved?.runnerProvider === undefined || ["codex", "claude", "acpx"].includes(String(saved?.runnerProvider))) ? "paperclip" : "auto");
@@ -624,19 +634,21 @@ function OnboardingWizardInner({
* whether the row has been *answered* on this visit.
*/
const [sourcePicked, setSourcePicked] = useState(false);
- const savedNativeRunnerDraft = saved?.adapterType === "paperclip_runner";
+ const isCopilot = adapterType === "paperclip_runner";
+ const [copilotConnection, setCopilotConnection] = useState<AiConnectionBinding>();
+ const savedNativeRunnerDraft = saved?.adapterType === "paperclip_runner" && !(saved?.onboardingCopilot === true && copilotOnboardingQualified);
const [cwd, setCwd] = useState((saved?.cwd as string) ?? "");
const [model, setModel] = useState(
savedNativeRunnerDraft && saved?.runnerProvider !== undefined && !["codex", "claude", "acpx"].includes(String(saved.runnerProvider)) ? "" : (saved?.model as string) ?? "",
);
const [command, setCommand] = useState(
- savedNativeRunnerDraft ? "" : (saved?.command as string) ?? "",
+ saved?.adapterType === "paperclip_runner" ? "" : (saved?.command as string) ?? "",
);
const [args, setArgs] = useState(
- savedNativeRunnerDraft ? "" : (saved?.args as string) ?? "",
+ saved?.adapterType === "paperclip_runner" ? "" : (saved?.args as string) ?? "",
);
const [url, setUrl] = useState(
- savedNativeRunnerDraft ? "" : (saved?.url as string) ?? "",
+ saved?.adapterType === "paperclip_runner" ? "" : (saved?.url as string) ?? "",
);
const [adapterEnvResult, setAdapterEnvResult] =
useState<AdapterEnvironmentTestResult | null>(null);
@@ -710,7 +722,7 @@ function OnboardingWizardInner({
? selectedSavedKey.id
: savedKeys.options[0]?.id;
const selectedApiKey = savedKeys.options.find((option) => option.id === selectedApiKeyId);
- const credentialMode = credentialModeChoice ?? (
+ const credentialMode = isCopilot ? "api" : credentialModeChoice ?? (
(savedKeys.subscriptions.length > 0 || (adapterType === "claude_local" && savedKeys.storedLogin.data))
? "subscription" : savedKeys.options.length || adapterType === "opencode_local" ? "api" : "subscription"
);
@@ -763,9 +775,10 @@ function OnboardingWizardInner({
*/
const apiKeySecretRef = useRef<{ key: string; companyId: string; envKey: string; binding?: Awaited<ReturnType<typeof storeProviderApiKey>>["binding"]; aiConnection?: AiConnectionBinding } | null>(null);
const managedSubscriptionRef = useRef<{ companyId: string; binding: AiConnectionBinding } | null>(null);
- const managedProvider = aiProviderForAdapter(adapterType);
+ const managedProvider = aiProviderForAdapter(isCopilot ? "copilot_runtime" : adapterType);
const managedSubscriptionProvider = managedProvider === "anthropic" || managedProvider === "openai" || managedProvider === "xai" ? managedProvider : undefined;
function managedBindingForStep(): AiConnectionBinding | undefined {
+ if (isCopilot) return copilotConnection;
if (credentialMode === "api") return selectedApiKey?.aiConnection ?? (
!selectedApiKey && apiKeySecretRef.current?.companyId === createdCompanyId && apiKeySecretRef.current.envKey === apiKeyEnvKeyFor(adapterType)
? apiKeySecretRef.current.aiConnection : undefined);
@@ -798,6 +811,7 @@ function OnboardingWizardInner({
* hand rather than the one before it.
*/
function clearCompanyScopedState() {
+ setCopilotConnection(undefined);
setAgentAppearance(randomAgentAppearance());
setCreatedCompanyPrefix(null);
setCompanyName("");
@@ -912,6 +926,7 @@ function OnboardingWizardInner({
const state = {
step, companyName,
agentName, agentAppearance, agentRole, adapterType, runner, cwd, model, command, args, url,
+ onboardingCopilot: isCopilot,
// The mode, never the key: this blob is localStorage.
credentialMode, credentialModeChoice,
createdCompanyId, createdCompanyPrefix, createdAgentId,
@@ -926,21 +941,6 @@ function OnboardingWizardInner({
createdCompanyGoalId, createdProjectId, createdIssueRef,
]);
- const {
- data: adapterModels,
- error: adapterModelsError,
- isLoading: adapterModelsLoading,
- isFetching: adapterModelsFetching
- } = useQuery({
- // The wizard doesn't expose an environment selector, so models always
- // resolve against the local Paperclip host (environmentId = null).
- queryKey: createdCompanyId
- ? queryKeys.agents.adapterModels(createdCompanyId, adapterType, null)
- : ["agents", "none", "adapter-models", adapterType, null],
- queryFn: () => agentsApi.adapterModels(createdCompanyId!, adapterType, { environmentId: null }),
- // Models are picked on step 4 (Connect a model).
- enabled: Boolean(createdCompanyId) && effectiveOnboardingOpen && step === 4
- });
const getCapabilities = useAdapterCapabilities();
const adapterCaps = getCapabilities(adapterType);
@@ -970,24 +970,26 @@ function OnboardingWizardInner({
queryFn: () => instanceSettingsApi.getExperimental(),
enabled: effectiveOnboardingOpen && step >= 3 && step <= 5,
});
- const resolvedLoginEnvironmentId = useMemo(() => {
+ const copilotOnboardingEnabled = copilotOnboardingQualified;
+ const loginEnvironmentResolution = useMemo(() => {
try {
- return resolveAdapterTestEnvironmentId({
+ return { environmentId: resolveAdapterTestEnvironmentId({
agentDefaultEnvironmentId: null,
instanceDefaultEnvironmentId: instanceSettingsForLogin?.defaultEnvironmentId ?? null,
localDefaultEnvironmentId: resolveLocalDefaultEnvironmentId(loginEnvironmentList),
managedSandboxOnly: experimentalSettingsForLogin?.enableManagedSandboxOnly === true,
managedSandboxEnvironmentId: resolveManagedSandboxEnvironmentId(loginEnvironmentList),
visibleEnvironmentIds: loginEnvironmentList.map((environment) => environment.id),
- });
- } catch {
- return null;
+ }), error: null };
+ } catch (error) {
+ return { environmentId: null, error: error instanceof Error ? error.message : "Could not resolve the execution environment." };
}
}, [
instanceSettingsForLogin?.defaultEnvironmentId,
loginEnvironmentList,
experimentalSettingsForLogin?.enableManagedSandboxOnly,
]);
+ const resolvedLoginEnvironmentId = loginEnvironmentResolution.environmentId;
const loginEnvironmentSettingsReady = loginEnvironmentsReady && loginSettingsReady && loginPolicyReady
&& !loginEnvironmentsFetching && !loginSettingsFetching && !loginPolicyFetching;
const runnerDiscovery = useQuery({
@@ -996,6 +998,31 @@ function OnboardingWizardInner({
enabled: Boolean(createdCompanyId) && effectiveOnboardingOpen && step === 4
&& loginEnvironmentSettingsReady,
});
+ const copilotEnvironmentReady = loginEnvironmentsReady && loginSettingsReady && loginPolicyReady && !loginEnvironmentResolution.error;
+ const {
+ data: adapterModels,
+ error: adapterModelsError,
+ isLoading: adapterModelsLoading,
+ isFetching: adapterModelsFetching,
+ refetch: refreshAdapterModels,
+ } = useQuery({
+ queryKey: isCopilot
+ ? ["onboarding-adapter-models", createdCompanyId, adapterType, resolvedLoginEnvironmentId, copilotConnection]
+ : createdCompanyId ? queryKeys.agents.adapterModels(createdCompanyId, adapterType, null) : ["agents", "none", "adapter-models", adapterType, null],
+ queryFn: () => agentsApi.adapterModels(createdCompanyId!, adapterType, {
+ environmentId: isCopilot ? resolvedLoginEnvironmentId : null,
+ ...(isCopilot ? { provider: "acpx", acpxAgent: "copilot", aiConnection: copilotConnection } : {}),
+ }),
+ ...(isCopilot ? COPILOT_MODEL_DISCOVERY_QUERY_OPTIONS : {}),
+ enabled: Boolean(createdCompanyId) && effectiveOnboardingOpen && step === 4 && (!isCopilot || Boolean(copilotConnection && copilotEnvironmentReady)),
+ retry: false,
+ });
+ const requestCopilotModels = Boolean(isCopilot && createdCompanyId && effectiveOnboardingOpen && step === 4 && copilotConnection && copilotEnvironmentReady);
+ const copilotModelScope = JSON.stringify([createdCompanyId, resolvedLoginEnvironmentId, copilotConnection]);
+ useEffect(() => {
+ if (requestCopilotModels) void refreshAdapterModels();
+ }, [requestCopilotModels, copilotModelScope, refreshAdapterModels]);
+ const copilotModelReady = Boolean(copilotConnection && copilotEnvironmentReady && !adapterModelsError && !adapterModelsFetching && adapterModels?.some((entry) => entry.id === model.trim()));
const needsRunnerDiscovery = ["codex_local", "claude_local"].includes(adapterType) && runner === "auto";
const resolvedRunner = runner === "auto"
? runnerDiscovery.data?.find(item => item.type === adapterType)?.defaultRunner
@@ -1182,7 +1209,7 @@ function OnboardingWizardInner({
adapterCaps.supportsSkills ||
adapterCaps.supportsLocalAgentJwt;
const isLocalAdapter =
- isLocalAdapterCaps ||
+ isLocalAdapterCaps || isCopilot ||
adapterType === "claude_local" ||
adapterType === "codex_local" ||
adapterType === "gemini_local" ||
@@ -1202,11 +1229,14 @@ function OnboardingWizardInner({
)
.map((a) => ({ ...getAdapterDisplay(a.type), type: a.type }));
+ const copilot = copilotOnboardingEnabled && !disabledTypes.has("paperclip_runner") && listUIAdapters().some((a) => a.type === "paperclip_runner")
+ ? [{ ...getAdapterDisplay("copilot_runtime"), type: "paperclip_runner", label: "GitHub Copilot", recommended: true }]
+ : [];
return {
- recommendedAdapters: all.filter((a) => a.recommended),
+ recommendedAdapters: [...all.filter((a) => a.recommended), ...copilot],
moreAdapters: all.filter((a) => !a.recommended),
};
- }, [disabledTypes]);
+ }, [disabledTypes, copilotOnboardingEnabled]);
/**
* A source chosen from the visible row. Read off the row rather than off
@@ -1233,7 +1263,7 @@ function OnboardingWizardInner({
* Anything that gates this step belongs in here, so the next one is added
* once rather than twice.
*/
- const connectStepReady = sourceSelected && !adapterEnvLoading && !savedKeys.loading && runnerDiscoveryReady;
+ const connectStepReady = sourceSelected && !adapterEnvLoading && !savedKeys.loading && runnerDiscoveryReady && (!isCopilot || copilotModelReady);
/**
* Whether this step has a sign-in to do before it can hire.
@@ -1425,7 +1455,7 @@ function OnboardingWizardInner({
* rather than offering — see `FooterNav`, where the label cross-fades over an
* easing width so those changes read as one control rather than four.
*/
- const connectSourceLabel = CONNECT_SOURCE_NAMES[adapterType] ?? adapterType;
+ const connectSourceLabel = isCopilot ? "GitHub Copilot" : CONNECT_SOURCE_NAMES[adapterType] ?? adapterType;
const connectCta: { label: string; icon: FooterPrimaryIcon; disabled: boolean } =
connectProgress
? { label: adapterEnvLoading ? "Testing…" : connectProgress, icon: "spinner", disabled: true }
@@ -1444,7 +1474,7 @@ function OnboardingWizardInner({
label: "Connect",
icon: "arrow",
disabled:
- !connectStepReady || (credentialMode === "api" && !apiKey.trim() && !selectedApiKey),
+ !connectStepReady || (!isCopilot && credentialMode === "api" && !apiKey.trim() && !selectedApiKey),
}
: // Nothing is chosen on arrival, and the row is what chooses. Until
// it has been answered the button has nothing to do.
@@ -1541,14 +1571,18 @@ function OnboardingWizardInner({
// registered once the adapters query resolves, so before that a saved
// external adapter is indistinguishable from a disabled one - and snapping
// would replace the customer's choice with a built-in and persist it.
- if (!adapterRegistryLoaded) return;
+ if (!adapterRegistryLoaded || (adapterType === "paperclip_runner" && !loginPolicyReady)) return;
const visible = [...recommendedAdapters, ...moreAdapters].filter(
(a) => !a.comingSoon,
);
- if (visible.length === 0) return;
+ if (visible.length === 0) {
+ if (adapterType === "paperclip_runner" && !copilotOnboardingEnabled) { setAdapterType("claude_local"); setModel(""); setCopilotConnection(undefined); setSourcePicked(false); }
+ return;
+ }
if (visible.some((a) => a.type === adapterType)) return;
- const next = visible[0].type as AdapterType;
+ const next = (visible.find((a) => a.type !== "paperclip_runner") ?? visible[0]).type as AdapterType;
setAdapterType(next);
+ if (adapterType === "paperclip_runner") { setModel(""); setCopilotConnection(undefined); }
// The snap is not a choice. It replaces a name the customer can no longer
// see with the first one they can, which is the right thing to hold — but
// holding it *as chosen* would put a filled tile and an open sign-in panel
@@ -1570,7 +1604,7 @@ function OnboardingWizardInner({
return;
}
setModel("");
- }, [adapterRegistryLoaded, recommendedAdapters, moreAdapters, adapterType]);
+ }, [adapterRegistryLoaded, recommendedAdapters, moreAdapters, adapterType, loginPolicyReady, copilotOnboardingEnabled]);
const COMMAND_PLACEHOLDERS: Record<string, string> = {
claude_local: "claude",
@@ -1600,7 +1634,7 @@ function OnboardingWizardInner({
setAdapterEnvResult(null);
adapterEnvResultAppliedStoredLoginRef.current = false;
if (adapterEnvErrorSelectionRef.current !== adapterSetupSelectionRef.current) setAdapterEnvError(null);
- }, [step, adapterType, runner, model, command, args, url, credentialMode, apiKey, selectedSavedKey, selectedApiKey?.id, savedSubscription?.id, createdCompanyId, resolvedLoginEnvironmentId, runner === "auto" ? runnerDiscovery.data?.find(item => item.type === adapterType)?.defaultRunner : undefined]);
+ }, [step, adapterType, runner, model, command, args, url, credentialMode, apiKey, selectedSavedKey, selectedApiKey?.id, savedSubscription?.id, createdCompanyId, copilotConnection, resolvedLoginEnvironmentId, runner === "auto" ? runnerDiscovery.data?.find(item => item.type === adapterType)?.defaultRunner : undefined]);
/**
* Leaving the step puts the row back to a question.
@@ -1699,6 +1733,7 @@ function OnboardingWizardInner({
setForceUnsetAnthropicApiKey(false);
setUnsetAnthropicLoading(false);
setClaudeOAuthStatus(null);
+ setCopilotConnection(undefined);
setCreatedCompanyId(null);
setCreatedCompanyPrefix(null);
setCreatedAgentId(null);
@@ -1882,6 +1917,7 @@ function OnboardingWizardInner({
...defaultCreateValues,
adapterType,
runner,
+ ...(isCopilot ? { adapterSchemaValues: { provider: "acpx", acpxAgent: "copilot" } } : {}),
resolvedRunner: setupRunner ?? resolvedRunner,
model:
adapterType === "gemini_local"
@@ -2141,10 +2177,8 @@ function OnboardingWizardInner({
// doesn't hire a second agent.
async function handleGiveHeartbeat() {
if (!createdCompanyId) return;
- if (adapterType === "paperclip_runner") {
- setAdapterType("claude_local");
- setModel("");
- setError("Choose a harness to continue onboarding.");
+ if (isCopilot && (!copilotOnboardingEnabled || !sourceSelected || !copilotModelReady)) {
+ setError("Connect GitHub Copilot and select an available model before creating this agent.");
return;
}
if (createdAgentId) {
@@ -2216,7 +2250,7 @@ function OnboardingWizardInner({
// hire describe it the same way — as a reference. A failure here stops the
// hire rather than falling through to a configuration with no credential.
let apiKeyStored = false;
- if (credentialMode === "api" && !selectedApiKey && apiKey.trim()) {
+ if (!isCopilot && credentialMode === "api" && !selectedApiKey && apiKey.trim()) {
apiKeyStored = await storeApiKeyUserSecret(createdCompanyId);
if (!apiKeyStored || !isCurrent()) return;
}
@@ -2307,7 +2341,7 @@ function OnboardingWizardInner({
const existing = existingAgents?.find(
(agent) =>
agent.name.trim().toLowerCase() === hireName.toLowerCase() &&
- agentHarnessType(agent.adapterType, agent.adapterConfig) === adapterType,
+ agentHarnessType(agent.adapterType, agent.adapterConfig) === agentHarnessType(adapterType, hireAdapterConfig),
);
if (existing) {
if (!isCurrent()) return;
@@ -2811,8 +2845,9 @@ function OnboardingWizardInner({
label="Model source"
sources={recommendedAdapters.map((opt) => ({
id: opt.type,
- label: CONNECT_SOURCE_NAMES[opt.type] ?? opt.label,
+ label: opt.type === "paperclip_runner" ? "GitHub Copilot" : CONNECT_SOURCE_NAMES[opt.type] ?? opt.label,
icon: <ModelSourceMark type={opt.type} Fallback={opt.icon} />,
+ ...(opt.type === "paperclip_runner" ? { credentialMode: "api" as const } : {}),
}))}
mode={credentialMode}
selectedId={
@@ -2906,6 +2941,33 @@ function OnboardingWizardInner({
<Loader2 className="size-4 animate-spin" />
{connectProgress}
</p>
+ ) : isCopilot && createdCompanyId ? (
+ <OnboardingLoginCard instruction="Connect GitHub Copilot and choose a model">
+ {!copilotEnvironmentReady ? <p role="alert" className="text-sm text-destructive">{loginEnvironmentResolution.error ?? "Waiting for execution environment settings. If this persists, check your instance settings."}</p> : <>
+ <AiConnectionField companyId={createdCompanyId} agentName={agentName} adapterType="copilot_runtime" environmentId={resolvedLoginEnvironmentId ?? undefined} value={copilotConnection} onChange={(binding) => {
+ const parsed = aiConnectionBindingSchema.safeParse(binding);
+ if (!parsed.success || parsed.data.provider !== "github" || parsed.data.method !== "api_key") {
+ setError("Choose a GitHub Copilot token connection for this source.");
+ return;
+ }
+ setError(null);
+ setCopilotConnection(parsed.data);
+ setModel("");
+ if (JSON.stringify(copilotConnection) === JSON.stringify(parsed.data)) void refreshAdapterModels();
+ }} />
+ {copilotConnection && <label className="block space-y-2 text-sm">
+ <span>Model</span>
+ <select aria-label="Copilot model" className="w-full rounded-md border border-input bg-background px-3 py-2 text-sm" value={model} disabled={adapterModelsFetching} onChange={(event) => setModel(event.target.value)}>
+ <option value="">{adapterModelsFetching ? "Loading models…" : "Select a model"}</option>
+ {model && !adapterModels?.some((entry) => entry.id === model) && <option value={model}>{model} (unavailable)</option>}
+ {(adapterModels ?? []).map((entry) => <option key={entry.id} value={entry.id}>{entry.label}</option>)}
+ </select>
+ {adapterModelsError && <p role="alert" className="text-destructive">{adapterModelsError instanceof Error ? adapterModelsError.message : "Could not discover Copilot models."}</p>}
+ {!adapterModelsFetching && !adapterModelsError && adapterModels?.length === 0 && <p role="alert" className="text-destructive">No available Copilot models were discovered. Check this account’s Copilot access.</p>}
+ <Button type="button" variant="ghost" disabled={adapterModelsFetching} onClick={() => void refreshAdapterModels()}>Refresh models</Button>
+ </label>}
+ </>}
+ </OnboardingLoginCard>
) : credentialMode === "api" ? (
<OnboardingLoginCard
instruction={savedKeys.options.length ? "Choose a saved API key or enter a new one" : `Provide your ${
@@ -3043,11 +3105,8 @@ function OnboardingWizardInner({
</details>}
{/* Conditional adapter fields */}
- {/* No model picker. Every adapter this step offers resolves
- its own default (see buildAdapterConfig), so the picker
- asked the customer to choose a model before they had any
- way to judge one — and the agent's model is changeable
- later, where its work gives the choice meaning. */}
+ {/* Direct adapters resolve their defaults. Copilot requires
+ an explicit authenticated model in its connection card. */}
{/* Progress is shown above; failed checks remain actionable here. */}
{/* Not while the hire is in flight. The probe's result lands
diff --git a/ui/src/components/RuntimeTestCard.tsx b/ui/src/components/RuntimeTestCard.tsx
index 66c4b033d9..6861b6dc65 100644
--- a/ui/src/components/RuntimeTestCard.tsx
+++ b/ui/src/components/RuntimeTestCard.tsx
@@ -53,6 +53,7 @@ export function RuntimeTestCard({
onTest,
disabled = false,
variant = "connection",
+ metadataOnly = false,
}: {
state: TestState | "warn";
result: AdapterEnvironmentTestResult | null;
@@ -60,6 +61,7 @@ export function RuntimeTestCard({
onTest: () => void;
disabled?: boolean;
variant?: "connection" | "prerequisites";
+ metadataOnly?: boolean;
}) {
const missingRuntime = state === "fail"
? result?.checks.find(check => check.code === "acpx_runtime_package_missing")
@@ -67,6 +69,11 @@ export function RuntimeTestCard({
const content = missingRuntime
? { ...copy.fail, title: "Runtime missing", description: missingRuntime.message }
: (variant === "prerequisites" ? prerequisiteCopy : copy)[state];
+ const description = metadataOnly && state === "idle"
+ ? "Verify your saved token, runtime installation, and selected model without sending a model prompt."
+ : metadataOnly && state === "running"
+ ? "Checking the saved token, runtime, and selected model…"
+ : content.description;
const Icon =
state === "running"
? Loader2
@@ -107,7 +114,7 @@ export function RuntimeTestCard({
>
<h3 className="text-sm font-medium">{content.title}</h3>
<p className="text-xs leading-relaxed text-muted-foreground">
- {state === "fail" && error ? error : content.description}
+ {state === "fail" && error ? error : description}
</p>
</div>
<Button
diff --git a/ui/src/components/ai-connections/AiConnectionCredentialStep.tsx b/ui/src/components/ai-connections/AiConnectionCredentialStep.tsx
index 2043569e51..7ae67bfac2 100644
--- a/ui/src/components/ai-connections/AiConnectionCredentialStep.tsx
+++ b/ui/src/components/ai-connections/AiConnectionCredentialStep.tsx
@@ -34,7 +34,7 @@ type Props = {
/** Connections hosts the same provider step as agent setup, with its own save intent. */
export function AiConnectionCredentialStep(props: Props) {
- if (props.provider === "openrouter" || props.provider === "google") return <ApiKeyConnectionStep {...props} />;
+ if (props.provider === "openrouter" || props.provider === "github" || props.provider === "google") return <ApiKeyConnectionStep {...props} />;
return <SubscriptionConnectionStep {...props} />;
}
@@ -100,20 +100,33 @@ function SubscriptionConnectionStep({ companyId, provider, initialMethod, fixedM
</div>;
}
-function ApiKeyConnectionStep({ companyId, provider, connectionId, name: initialName, hideName, nameForMethod, ownership, agentIds, allAgents, onComplete, onCancel, defaults, disabled }: Props) {
+function ApiKeyConnectionStep({ companyId, provider, connectionId, name: initialName, hideName, nameForMethod, ownership, agentIds, allAgents, environmentId: suppliedEnvironmentId, defaults, disabled, onComplete, onCancel }: Props) {
const [name, setName] = useState(initialName);
const [apiKey, setApiKey] = useState("");
const client = useQueryClient();
+ const [chosenEnvironment, setChosenEnvironment] = useState<string>();
+ const copilot = provider === "github";
+ const envs = useQuery({ queryKey: queryKeys.environments.list(companyId), queryFn: () => environmentsApi.list(companyId), enabled: copilot });
+ const settings = useQuery({ queryKey: queryKeys.instance.settings, queryFn: instanceSettingsApi.get, enabled: copilot });
+ const environmentId = suppliedEnvironmentId ?? chosenEnvironment ?? settings.data?.defaultEnvironmentId ?? resolveLocalDefaultEnvironmentId(envs.data);
+ const environmentError = copilot ? envs.error?.message ?? settings.error?.message : undefined;
+ const preparing = copilot && (envs.isPending || settings.isPending);
const save = useMutation({
- mutationFn: () => aiConnectionsApi.create(companyId, { provider, method: "api_key", name: connectionId ? name : nameForMethod?.("api_key") ?? name, ownership, agentIds, allAgents, connectionId, apiKey }),
+ mutationFn: () => aiConnectionsApi.create(companyId, { provider, method: "api_key", name: connectionId ? name : nameForMethod?.("api_key") ?? name, ownership, agentIds, allAgents, connectionId, apiKey, ...(copilot ? { environmentId } : {}) }),
onSuccess: (result) => { void client.invalidateQueries({ queryKey: ["ai-connections", companyId] }); void client.invalidateQueries({ queryKey: ["tools"] }); onComplete({ ...result, method: "api_key" }); },
onSettled: () => setApiKey(""),
});
return <div className="mx-auto w-full min-w-0 max-w-xl space-y-4">
{!hideName && <label className="block space-y-2 text-sm">Connection name<Input value={name} onChange={(event) => setName(event.target.value)} disabled={Boolean(connectionId)} /></label>}
{save.error && <p role="alert" className="text-sm text-destructive">{save.error.message}</p>}
- <ProviderApiKeyCard providerName={provider === "google" ? "Google" : "OpenRouter"} value={apiKey} onChange={setApiKey} onSubmit={() => save.mutate()} disabled={disabled || save.isPending} placeholder="Enter API key here" autoFocus />
+ {copilot && <p className="text-sm text-muted-foreground">Use a personal fine-grained token with Copilot Requests permission. <a className="underline" href="https://docs.github.com/en/copilot/how-tos/copilot-cli/set-up-copilot-cli/authenticate-copilot-cli" target="_blank" rel="noreferrer">GitHub token instructions</a>. Verification discovers models in the selected environment and sends no model prompt. Repository access uses a separate connection.</p>}
+ {copilot && !suppliedEnvironmentId && <Select value={environmentId ?? ""} onValueChange={setChosenEnvironment} disabled={preparing || save.isPending}>
+ <SelectTrigger aria-label="Copilot execution environment"><SelectValue placeholder="Execution environment" /></SelectTrigger>
+ <SelectContent>{(envs.data ?? []).filter(env => env.status === "active").map(env => <SelectItem key={env.id} value={env.id}>{env.name}</SelectItem>)}</SelectContent>
+ </Select>}
+ {environmentError && <p role="alert" className="text-sm text-destructive">{environmentError}</p>}
{defaults}
- <div className="flex justify-between gap-2"><Button variant="ghost" onClick={onCancel}>Cancel</Button><Button disabled={disabled || !name.trim() || !apiKey.trim() || save.isPending} onClick={() => save.mutate()}>{save.isPending ? "Connecting…" : "Connect"}</Button></div>
+ <ProviderApiKeyCard providerName={copilot ? "GitHub Copilot" : provider === "google" ? "Google" : "OpenRouter"} value={apiKey} onChange={setApiKey} onSubmit={() => { if (!preparing && !environmentError && name.trim() && apiKey.trim()) save.mutate(); }} disabled={disabled || save.isPending || preparing || Boolean(environmentError)} placeholder={copilot ? "github_pat_..." : "Enter API key here"} autoFocus />
+ <div className="flex justify-between gap-2"><Button variant="ghost" onClick={onCancel}>Cancel</Button><Button disabled={disabled || !name.trim() || !apiKey.trim() || save.isPending || preparing || Boolean(environmentError)} onClick={() => save.mutate()}>{save.isPending ? "Connecting…" : "Connect"}</Button></div>
</div>;
}
diff --git a/ui/src/components/ai-connections/AiConnectionField.tsx b/ui/src/components/ai-connections/AiConnectionField.tsx
index 0af1ab5433..04f00a595a 100644
--- a/ui/src/components/ai-connections/AiConnectionField.tsx
+++ b/ui/src/components/ai-connections/AiConnectionField.tsx
@@ -34,6 +34,7 @@ export function aiProviderForAdapter(
codex_local: "openai",
opencode_local: "openrouter",
grok_local: "xai",
+ copilot_runtime: "github",
gemini_local: "google",
hermes_local: "openrouter",
} as Record<string, AiProvider>
@@ -111,7 +112,7 @@ export function AiConnectionField({
};
const method: AiAuthMethod = (value && value.mode !== "router" && value.mode !== "responsible_user" ? value.method : undefined)
?? accounts.data?.connections.find((account) => account.provider === provider && account.isDefault)?.method
- ?? (provider === "openrouter" || provider === "google" ? "api_key" : "subscription");
+ ?? (provider === "openrouter" || provider === "google" || provider === "github" ? "api_key" : "subscription");
const compatiblePools = agentId ? accounts.data?.pools?.filter(pool => pool.enabled && pool.members.some(member => isAiConnectionCompatible(member.binding, routerAdapterType ?? adapterType, member.profile.model, member.profile.provider, member.profile.acpxAgent))) ?? [] : [];
if (!provider) return null;
if (legacy && !value && !adopting)
@@ -236,7 +237,7 @@ export function AiConnectionField({
initialMethod={reconnecting?.method ?? method}
fixedMethod={Boolean(reconnecting)}
connectionId={reconnecting?.id}
- name={reconnecting?.name ?? `My ${provider === "anthropic" ? "Claude" : provider === "openai" ? "OpenAI" : provider === "xai" ? "Grok" : provider === "google" ? "Gemini" : "OpenRouter"} ${method === "subscription" ? "subscription" : "API"}`}
+ name={reconnecting?.name ?? `My ${provider === "anthropic" ? "Claude" : provider === "openai" ? "OpenAI" : provider === "xai" ? "Grok" : provider === "google" ? "Gemini" : provider === "github" ? "GitHub Copilot" : "OpenRouter"} ${method === "subscription" ? "subscription" : "API"}`}
ownership="personal"
agentIds={agentId ? [agentId] : []}
allAgents={allAgents}
diff --git a/ui/src/components/ai-connections/AiConnectionPicker.tsx b/ui/src/components/ai-connections/AiConnectionPicker.tsx
index 782c358107..a781deb7e8 100644
--- a/ui/src/components/ai-connections/AiConnectionPicker.tsx
+++ b/ui/src/components/ai-connections/AiConnectionPicker.tsx
@@ -120,7 +120,7 @@ export function AiConnectionPicker({
})),
]}
onSelect={(id) => {
- if (id === "responsible_user") onChange({provider: requirement.provider, method: personalDefault?.method ?? requirement.method ?? (requirement.provider === "openrouter" ? "api_key" : "subscription"), mode: "responsible_user"});
+ if (id === "responsible_user") onChange({provider: requirement.provider, method: personalDefault?.method ?? requirement.method ?? ((requirement.provider === "openrouter" || requirement.provider === "github") ? "api_key" : "subscription"), mode: "responsible_user"});
else { const connection = compatible.find((item) => item.id === id)!; select("shared", connection); }
}}
/>
diff --git a/ui/src/components/ai-connections/AiProviderSetup.tsx b/ui/src/components/ai-connections/AiProviderSetup.tsx
index 0bafcf0c3a..1899864550 100644
--- a/ui/src/components/ai-connections/AiProviderSetup.tsx
+++ b/ui/src/components/ai-connections/AiProviderSetup.tsx
@@ -63,7 +63,7 @@ const providers = [
advanced: true,
},
] as const;
-type ProviderChoice = (typeof providers)[number]["id"];
+type ProviderChoice = (typeof providers)[number]["id"] | "github";
export function AiProviderSetup({
companyId,
@@ -131,7 +131,7 @@ export function AiProviderSetup({
queryKey: ["agents", companyId, "provider-access"],
queryFn: () => agentsApi.list(companyId),
});
- const label = providerLabel ?? providers.find((p) => p.id === provider)?.name ?? "provider";
+ const label = providerLabel ?? providers.find((p) => p.id === provider)?.name ?? (provider === "github" ? "GitHub Copilot" : "provider");
const advanced = reconnect ? Boolean(reconnect.routing) : ["openrouter", "bedrock", "gateway", "local"].includes(provider ?? "");
const nativeProvider: AiProvider =
provider === "bedrock"
diff --git a/ui/src/components/ai-connections/model.ts b/ui/src/components/ai-connections/model.ts
index 9806071e94..e6e645be50 100644
--- a/ui/src/components/ai-connections/model.ts
+++ b/ui/src/components/ai-connections/model.ts
@@ -7,6 +7,7 @@ export const AI_PROVIDERS: Record<
AiProvider,
{ name: string; subscriptionName?: string; logo?: string }
> = {
+ github: { name: "GitHub Copilot", logo: "/brands/apps/github.svg" },
google: { name: "Google", logo: "/brands/apps/google.svg" },
anthropic: {
name: "Claude",
@@ -53,7 +54,7 @@ export function defaultAiConnectionName(ownerName: string | undefined, provider:
export function aiMethodLabel(provider: AiProvider, method: AiAuthMethod) {
return method === "subscription"
? (AI_PROVIDERS[provider].subscriptionName ?? "Subscription unavailable")
- : "API key";
+ : provider === "github" ? "Personal access token" : "API key";
}
export function matchesAiRequirement(
diff --git a/ui/src/components/issue-properties/IssueProperties.tsx b/ui/src/components/issue-properties/IssueProperties.tsx
index fbb635a56c..f25f8b5ddb 100644
--- a/ui/src/components/issue-properties/IssueProperties.tsx
+++ b/ui/src/components/issue-properties/IssueProperties.tsx
@@ -34,6 +34,7 @@ import { projectsApi } from "../../api/projects";
import { useCompany } from "../../context/CompanyContext";
import { useSidebar } from "../../context/SidebarContext";
import { queryKeys } from "../../lib/queryKeys";
+import { COPILOT_MODEL_DISCOVERY_QUERY_OPTIONS, copilotTaskModelCatalogOptions } from "../../lib/copilot-task-model-catalog";
import { buildCompanyUserInlineOptions, buildCompanyUserLabelMap, buildCompanyUserProfileMap, isAgentTaskTarget } from "../../lib/company-members";
import { ISSUE_OVERRIDE_ADAPTER_TYPES, type IssueModelLane } from "../../lib/issue-assignee-overrides";
import { useProjectOrder } from "../../hooks/useProjectOrder";
@@ -731,11 +732,12 @@ export function IssueProperties({
const assignee = issue.assigneeAgentId
? agents?.find((a) => a.id === issue.assigneeAgentId)
: null;
+ const copilotCatalog = copilotTaskModelCatalogOptions(assignee);
const assigneeAdapterType = assignee?.adapterType ?? null;
const assigneeAdapterOverrides = issue.assigneeAdapterOverrides ?? null;
const showAssigneeAdapterOptions = assigneeAdapterOverrides !== null;
const supportsAssigneeOverrides = Boolean(
- assigneeAdapterType && ISSUE_OVERRIDE_ADAPTER_TYPES.has(assigneeAdapterType),
+ assigneeAdapterType && (ISSUE_OVERRIDE_ADAPTER_TYPES.has(assigneeAdapterType) || copilotCatalog),
);
const assigneeOverrideLane = overrideLane(assigneeAdapterOverrides);
const assigneeOverrideAdapterConfig = asRecord(assigneeAdapterOverrides?.adapterConfig);
@@ -752,14 +754,24 @@ export function IssueProperties({
const assigneeOverrideChrome = assigneeAdapterType === "claude_local"
&& assigneeOverrideAdapterConfig.chrome === true;
const catalogProvider = assigneeAdapterType === "paperclip_runner" ? String(normalizeLegacyRunnerProvider(assigneePrimaryAdapterConfig).provider ?? "codex") : undefined;
- const { data: assigneeAdapterModels } = useQuery({
+ const catalogEnvironmentId = copilotCatalog ? assignee?.defaultEnvironmentId ?? null : null;
+ const copilotCatalogScope = JSON.stringify(copilotCatalog ?? null);
+ const requestCopilotModels = Boolean(copilotCatalog && assigneeOptionsOpen && showAssigneeAdapterOptions && supportsAssigneeOverrides);
+ const { data: assigneeAdapterModels, refetch: refreshAssigneeModels } = useQuery({
queryKey:
companyId && assigneeAdapterType
- ? queryKeys.agents.adapterModels(companyId, assigneeAdapterType, null, catalogProvider)
+ ? [...queryKeys.agents.adapterModels(companyId, assigneeAdapterType, catalogEnvironmentId, catalogProvider), copilotCatalog ?? null]
: ["agents", "none", "adapter-models", assigneeAdapterType ?? "none"],
- queryFn: () => agentsApi.adapterModels(companyId!, assigneeAdapterType!, { provider: catalogProvider }),
- enabled: Boolean(companyId) && showAssigneeAdapterOptions && supportsAssigneeOverrides,
+ queryFn: () => agentsApi.adapterModels(companyId!, assigneeAdapterType!, {
+ provider: catalogProvider,
+ ...(copilotCatalog ? { environmentId: catalogEnvironmentId, ...copilotCatalog } : {}),
+ }),
+ ...(copilotCatalog ? COPILOT_MODEL_DISCOVERY_QUERY_OPTIONS : {}),
+ enabled: Boolean(companyId) && showAssigneeAdapterOptions && supportsAssigneeOverrides && (!copilotCatalog || requestCopilotModels),
});
+ useEffect(() => {
+ if (requestCopilotModels) void refreshAssigneeModels();
+ }, [requestCopilotModels, copilotCatalogScope, catalogEnvironmentId, companyId, refreshAssigneeModels]);
const modelOverrideOptions = useMemo<InlineEntityOption[]>(() => {
const models = sortAdapterModels(assigneeAdapterModels ?? []);
const options = models.map((model) => ({
diff --git a/ui/src/components/new-agent/AgentBasicsDialog.tsx b/ui/src/components/new-agent/AgentBasicsDialog.tsx
index 414e4780ad..f126ef36e9 100644
--- a/ui/src/components/new-agent/AgentBasicsDialog.tsx
+++ b/ui/src/components/new-agent/AgentBasicsDialog.tsx
@@ -1,4 +1,5 @@
import { useCompany } from "@/context/CompanyContext";
+import { PAPERCLIP_RUNNER_ACPX_PROFILES } from "@paperclipai/adapter-utils";
import { useAgentAppearanceDraft } from "@/hooks/useAgentAppearanceDraft";
import { AdapterMark } from "../AdapterMark";
import { AgentCharacter } from "../AgentCharacter";
@@ -69,7 +70,9 @@ export function AgentBasicsDialog({
queryFn: () => adaptersApi.list(),
enabled: open,
});
- const choices = (adapters ?? []).filter(
+ const nativeRunner = adapters?.find(adapter => adapter.type === "paperclip_runner" && adapter.loaded && !adapter.disabled);
+ const copilotAvailable = Boolean(nativeRunner) && PAPERCLIP_RUNNER_ACPX_PROFILES.some(profile => profile.value === "copilot" && profile.qualified);
+ const choices = [...(adapters ?? []).filter(
(adapter) =>
adapter.loaded &&
!adapter.disabled &&
@@ -80,7 +83,7 @@ export function AgentBasicsDialog({
}) &&
!["process", "http"].includes(adapter.type) &&
!getAdapterDisplay(adapter.type).comingSoon,
- );
+ ), ...(copilotAvailable ? [{ ...nativeRunner!, type: "copilot_runtime" }] : [])];
const experimentalRunnerAvailable = experimental.data?.enableNativeRunner === true
&& adapters?.some(adapter => adapter.type === "paperclip_runner" && adapter.loaded && !adapter.disabled);
const validAdapter = choices.some((adapter) => adapter.type === adapterType)
@@ -122,8 +125,8 @@ export function AgentBasicsDialog({
if (step === "name") setStep("adapter");
else if (validAdapter)
onContinue({ name: name.trim(),
- adapterType: adapterType === "openai_dot" ? "paperclip_runner" : adapterType,
- runnerProvider: adapterType === "openai_dot" ? "openai_dot" : adapterType === "paperclip_runner" ? runnerProvider : "codex" });
+ adapterType: ["openai_dot", "copilot_runtime"].includes(adapterType) ? "paperclip_runner" : adapterType,
+ runnerProvider: adapterType === "copilot_runtime" ? "copilot" : adapterType === "openai_dot" ? "openai_dot" : adapterType === "paperclip_runner" ? runnerProvider : "codex" });
}}
>
<div className="flex min-h-0 flex-col gap-7 overflow-y-auto px-6 pb-8 sm:px-10">
diff --git a/ui/src/components/new-agent/NewAgentSetup.tsx b/ui/src/components/new-agent/NewAgentSetup.tsx
index 1add2ff0a4..d39ad95591 100644
--- a/ui/src/components/new-agent/NewAgentSetup.tsx
+++ b/ui/src/components/new-agent/NewAgentSetup.tsx
@@ -1,3 +1,4 @@
+import { COPILOT_MODEL_DISCOVERY_QUERY_OPTIONS } from "@/lib/copilot-task-model-catalog";
import { ExternalAgentInviteDialog } from "./ExternalAgentInviteDialog";
import { useConnectionModels } from "../ai-connections/useConnectionModels";
import { AgentCharacter } from "../AgentCharacter";
@@ -19,7 +20,7 @@ import { needsClaudeSetupQualification, qualifyClaudeSetup } from "@/lib/qualify
import { useCloudInstance } from "@/hooks/useCloudInstance";
import { isNewAgentAdapterAllowed } from "@/lib/new-agent-adapters";
import { useEffect, useRef, useState } from "react";
-import { useQuery, useQueryClient } from "@tanstack/react-query";
+import { hashKey, useQuery, useQueryClient } from "@tanstack/react-query";
import { AnimatePresence, motion, MotionConfig } from "motion/react";
import { ArrowLeft, ArrowRight, Check, Settings2 } from "lucide-react";
import type {
@@ -129,7 +130,9 @@ function Setup({
const isRunner = adapterType === "paperclip_runner";
const isDot = isRunner && runnerProvider === "openai_dot";
const brandType = isDot ? "openai_dot" : isRunner
- ? runnerProvider === "grok"
+ ? runnerProvider === "copilot"
+ ? "copilot_runtime"
+ : runnerProvider === "grok"
? "grok_local"
: runnerProvider === "claude"
? "claude_local"
@@ -167,7 +170,9 @@ function Setup({
null,
);
const [runtimeAiBinding, setRuntimeAiBinding] = useState<AiConnectionBinding | undefined>(() =>
- brandType === "opencode_local"
+ brandType === "copilot_runtime"
+ ? { provider: "github", method: "api_key", mode: "responsible_user" }
+ : brandType === "opencode_local"
? { provider: "openrouter", method: "api_key", mode: "responsible_user" }
: undefined,
);
@@ -242,12 +247,6 @@ function Setup({
queryKey: queryKeys.environments.capabilities(companyId),
queryFn: () => environmentsApi.capabilities(companyId),
});
- const models = useQuery({
- queryKey: queryKeys.agents.adapterModels(companyId, brandType, null, aiBinding?.provider),
- queryFn: () => agentsApi.adapterModels(companyId, brandType, { provider: aiBinding?.provider }),
- enabled: Boolean(brandType) && showModel && !connectionModels,
- retry: false,
- });
const companySecrets = useQuery({
queryKey: queryKeys.secrets.list(companyId),
queryFn: () => secretsApi.list(companyId),
@@ -288,6 +287,22 @@ function Setup({
? cause.message
: "Could not resolve the environment.";
}
+ const requestCopilotModels = brandType === "copilot_runtime" && showModel && !connectionModels && Boolean(aiBinding)
+ && envs.isSuccess && settings.isSuccess && experimental.isSuccess && general.isSuccess && !environmentError;
+ const copilotModelScope = JSON.stringify([companyId, environmentId, aiBinding]);
+ const models = useQuery({
+ queryKey: queryKeys.agents.adapterModels(companyId, brandType, environmentId, brandType === "copilot_runtime" ? JSON.stringify(aiBinding ?? null) : aiBinding?.provider),
+ queryFn: () => agentsApi.adapterModels(companyId, brandType === "copilot_runtime" ? "paperclip_runner" : brandType, brandType === "copilot_runtime"
+ ? { provider: "acpx", acpxAgent: "copilot", aiConnection: aiBinding, environmentId }
+ : { provider: aiBinding?.provider, environmentId }),
+ ...(brandType === "copilot_runtime" ? COPILOT_MODEL_DISCOVERY_QUERY_OPTIONS : {}),
+ enabled: Boolean(brandType) && showModel && !connectionModels && (brandType !== "copilot_runtime" || requestCopilotModels),
+ retry: false,
+ });
+ const refreshCopilotModels = models.refetch;
+ useEffect(() => {
+ if (requestCopilotModels) void refreshCopilotModels();
+ }, [requestCopilotModels, copilotModelScope, refreshCopilotModels]);
const environment = envs.data?.find((env) => env.id === environmentId);
const setupEnvironmentKey = JSON.stringify([companyId, environmentId, environment?.config]);
const setupEnvironmentRef = useRef("");
@@ -399,9 +414,9 @@ function Setup({
...(isRunner
? {
adapterSchemaValues: {
- provider: (runnerProvider === "claude" || runnerProvider === "grok") ? "acpx" : runnerProvider,
+ provider: (runnerProvider === "claude" || runnerProvider === "grok" || runnerProvider === "copilot") ? "acpx" : runnerProvider,
...(isDot ? { allowUnmeteredProvider } : {}),
- ...((runnerProvider === "claude" || runnerProvider === "grok") ? { acpxAgent: runnerProvider } : {}),
+ ...((runnerProvider === "claude" || runnerProvider === "grok" || runnerProvider === "copilot") ? { acpxAgent: runnerProvider } : {}),
},
}
: {}),
@@ -412,8 +427,8 @@ function Setup({
}
if (isRunner)
Object.assign(config, {
- provider: (runnerProvider === "claude" || runnerProvider === "grok") ? "acpx" : runnerProvider,
- ...((runnerProvider === "claude" || runnerProvider === "grok") ? { acpxAgent: runnerProvider } : {}),
+ provider: (runnerProvider === "claude" || runnerProvider === "grok" || runnerProvider === "copilot") ? "acpx" : runnerProvider,
+ ...((runnerProvider === "claude" || runnerProvider === "grok" || runnerProvider === "copilot") ? { acpxAgent: runnerProvider } : {}),
...(model ? { model } : {}),
});
if (!aiBinding && !nextConnection?.aiConnection && hasCredentialField && binding) {
@@ -444,6 +459,8 @@ function Setup({
return config;
}
function preparedConfig(nextConnection = connection, setupRunner?: AgentRunner) {
+ if (brandType === "copilot_runtime" && !models.data?.some(candidate => candidate.id === model))
+ throw new Error("Refresh Copilot models and select an available model before creating this agent.");
if (isDot && !allowUnmeteredProvider) throw new Error("Acknowledge external provider billing before creating your Dot agent.");
if (multiProvider && (!model.trim() || !model.includes("/")))
throw new Error("Choose or enter a model in provider/model format.");
@@ -930,7 +947,9 @@ function Setup({
</>}
{!connectionAdapter && aiProviderForAdapter(brandType) && (
<AiConnectionField companyId={companyId} agentName={name} adapterType={brandType} model={model} environmentId={environmentId ?? undefined} value={aiBinding}
- onChange={binding => { binding.mode !== "router" && setRuntimeAiBinding(binding); resetTest(); }} />
+ onChange={binding => { binding.mode !== "router" && setRuntimeAiBinding(binding); resetTest();
+ if (brandType === "copilot_runtime" && hashKey([aiBinding ?? null]) === hashKey([binding ?? null])) void refreshCopilotModels();
+ }} />
)}
{(connectionModels ? connectionModels.error : models.error) && <p role="alert" className="text-sm text-destructive">Could not load models. Retry or enter a model ID manually.</p>}
{((showModel && !usingKimiApi) ||
@@ -941,8 +960,8 @@ function Setup({
presentation={brandType === "codex_local" ? "searchable" : "native"}
models={connectionModels?.models ?? models.data ?? []}
loadingModels={connectionModels?.isLoading ?? models.isLoading}
- onRefreshModels={connectionModels?.refreshModels}
- refreshingModels={connectionModels?.refreshing}
+ onRefreshModels={connectionModels?.refreshModels ?? (brandType === "copilot_runtime" ? async () => { await models.refetch(); } : undefined)}
+ refreshingModels={connectionModels?.refreshing ?? (brandType === "copilot_runtime" ? models.isFetching : undefined)}
value={model}
onChange={(value) => {
setModel(connectionModels?.resolveModel(value) ?? value);
@@ -967,9 +986,9 @@ function Setup({
}}
open={modelOpen}
onOpenChange={setModelOpen}
- allowDefault={!multiProvider}
- required={multiProvider}
- creatable
+ allowDefault={!multiProvider && brandType !== "copilot_runtime"}
+ required={multiProvider || brandType === "copilot_runtime"}
+ creatable={brandType !== "copilot_runtime"}
groupByProvider={multiProvider && !connectionModels}
preserveOrder={Boolean(connectionModels) || adapterCuratesModelOrder(brandType)}
/>
@@ -1244,6 +1263,7 @@ function Setup({
</fieldset>
<RuntimeTestCard
variant={isDot ? "prerequisites" : "connection"}
+ metadataOnly={brandType === "copilot_runtime"}
state={testState}
result={result}
error={error}
diff --git a/ui/src/components/task-chat/ComposerRunSettingsPicker.test.tsx b/ui/src/components/task-chat/ComposerRunSettingsPicker.test.tsx
index 92b7f9bfe5..094e3995ff 100644
--- a/ui/src/components/task-chat/ComposerRunSettingsPicker.test.tsx
+++ b/ui/src/components/task-chat/ComposerRunSettingsPicker.test.tsx
@@ -48,6 +48,7 @@ function render(onAssigneeChange: (value: string) => void, onSettingsChange: ()
modelOptionsOverride={useCatalog ? undefined : []} {...props} />
</QueryClientProvider>;
flushSync(() => root!.render(insideDialog ? <Dialog defaultOpen><DialogContent aria-describedby={undefined}><DialogTitle>New task</DialogTitle>{picker}</DialogContent></Dialog> : picker));
+ return queryClient;
}
beforeEach(() => localStorage.clear());
@@ -260,6 +261,52 @@ describe("composer assignee picker", () => {
expect(choices.some((item) => item.includes("GPT-6 Sol"))).toBe(false);
});
+ it("keeps Copilot discovery passive during reconnect reconciliation and refreshes on opening", async () => {
+ const copilot = { ...agent, adapterType: "paperclip_runner", defaultEnvironmentId: "daytona-1",
+ adapterConfig: { provider: "acpx", acpxAgent: "copilot", model: "gpt-5.6-luna" } } as Agent;
+ const loadModels = vi.spyOn(agentsApi, "adapterModels")
+ .mockResolvedValueOnce([{ id: "gpt-5.6-luna", label: "Copilot Luna" }])
+ .mockResolvedValue([{ id: "gpt-5.6-luna", label: "Updated Copilot Luna" }]);
+ const client = render(vi.fn(), vi.fn(), true, { agents: new Map([[agent.id, copilot]]), settings: null });
+ await act(async () => { await new Promise((resolve) => setTimeout(resolve, 0)); });
+ expect(loadModels).not.toHaveBeenCalled();
+ await act(async () => { await client.invalidateQueries({ type: "active" }, { cancelRefetch: false }); });
+ expect(loadModels).not.toHaveBeenCalled();
+ await click("Select model and effort");
+ expect(loadModels).toHaveBeenCalledTimes(1);
+ await act(async () => { await client.invalidateQueries({ type: "active" }, { cancelRefetch: false }); });
+ expect(loadModels).toHaveBeenCalledTimes(1);
+ await act(async () => {
+ document.dispatchEvent(new KeyboardEvent("keydown", { key: "Escape", bubbles: true }));
+ await new Promise((resolve) => setTimeout(resolve, 0));
+ });
+ await click("Select model and effort");
+ expect(loadModels).toHaveBeenCalledTimes(2);
+ await click("Choose exact model");
+ expect(document.body.textContent).toContain("Updated Copilot Luna");
+ });
+
+ it("discovers Copilot task models with the assignee connection and environment", async () => {
+ const binding = { provider: "github", method: "api_key", mode: "shared", connectionId: "11111111-1111-4111-8111-111111111111", grantId: "33333333-3333-4333-8333-333333333333" } as const;
+ const copilot = { ...agent, adapterType: "paperclip_runner", defaultEnvironmentId: "daytona-1",
+ adapterConfig: { provider: "acpx", acpxAgent: "copilot", model: "gpt-5.6-luna" },
+ runtimeConfig: { aiConnection: binding } } as Agent;
+ const loadModels = vi.spyOn(agentsApi, "adapterModels").mockResolvedValueOnce([
+ { id: "gpt-5.6-luna", label: "Copilot Luna" },
+ ]);
+ render(vi.fn(), vi.fn(), true, { agents: new Map([[agent.id, copilot]]), settings: null });
+ await act(async () => { await new Promise((resolve) => setTimeout(resolve, 0)); });
+ expect(loadModels).not.toHaveBeenCalled();
+ await click("Select model and effort");
+ expect(loadModels).toHaveBeenCalledWith("company-1", "paperclip_runner", {
+ environmentId: "daytona-1", provider: "acpx", poolId: undefined,
+ acpxAgent: "copilot", agentId: agent.id, aiConnection: binding,
+ });
+ await click("Choose exact model");
+ expect(document.body.textContent).toContain("Copilot Luna");
+ expect(document.body.textContent).not.toContain("Claude Sonnet");
+ });
+
it("preserves settings when the selected assignee is chosen again", async () => {
const onAssigneeChange = vi.fn();
const onSettingsChange = vi.fn();
diff --git a/ui/src/components/task-chat/ComposerRunSettingsPicker.tsx b/ui/src/components/task-chat/ComposerRunSettingsPicker.tsx
index a8eeccf597..d7be4eb509 100644
--- a/ui/src/components/task-chat/ComposerRunSettingsPicker.tsx
+++ b/ui/src/components/task-chat/ComposerRunSettingsPicker.tsx
@@ -4,6 +4,7 @@ import { ArrowLeft, Check, ChevronDown, Plus, RotateCcw, Search, X, Zap } from "
import { aiRuntimeConnectionBindingSchema, agentHarnessType, type Agent, type IssueAssigneeAdapterOverrides } from "@paperclipai/shared";
import { agentsApi, type AdapterModel } from "@/api/agents";
import { queryKeys } from "@/lib/queryKeys";
+import { COPILOT_MODEL_DISCOVERY_QUERY_OPTIONS, copilotTaskModelCatalogOptions } from "@/lib/copilot-task-model-catalog";
import { cn } from "@/lib/utils";
import { useMobileEntityPickerViewportStyle } from "@/hooks/useMobileEntityPickerViewportStyle";
import { getLastComposerEffort, rememberComposerEffort } from "@/lib/recent-composer-effort";
@@ -112,15 +113,22 @@ export function ComposerRunSettingsPicker({
}, [isMuseRunner, settings, onSettingsChange]);
const binding = aiRuntimeConnectionBindingSchema.safeParse(agent?.runtimeConfig?.aiConnection).data;
const poolId = binding?.mode === "router" ? binding.connectionId : undefined;
- const { data: fetchedModels = [], isPending: modelsPending } = useQuery({
+ const copilotCatalog = copilotTaskModelCatalogOptions(agent);
+ const copilotCatalogScope = JSON.stringify(copilotCatalog ?? null);
+ const requestCopilotModels = Boolean(copilotCatalog && open && view !== "agents" && !modelOptionsOverride);
+ const { data: fetchedModels = [], isPending: modelsPending, refetch: refreshModels } = useQuery({
queryKey: agent && modelSupported
- ? [...queryKeys.agents.adapterModels(companyId, agent.adapterType, agent.defaultEnvironmentId ?? null, provider), poolId ?? null]
+ ? [...queryKeys.agents.adapterModels(companyId, agent.adapterType, agent.defaultEnvironmentId ?? null, provider), poolId ?? null, copilotCatalog ?? null]
: ["agents", "composer-models", "none"],
queryFn: () => agentsApi.adapterModels(companyId, agent!.adapterType, {
- environmentId: agent!.defaultEnvironmentId ?? null, provider, poolId,
+ environmentId: agent!.defaultEnvironmentId ?? null, provider, poolId, ...copilotCatalog,
}),
- enabled: Boolean(agent && modelSupported && !modelOptionsOverride),
+ ...(copilotCatalog ? COPILOT_MODEL_DISCOVERY_QUERY_OPTIONS : {}),
+ enabled: Boolean(agent && modelSupported && !modelOptionsOverride && (!copilotCatalog || requestCopilotModels)),
});
+ useEffect(() => {
+ if (requestCopilotModels) void refreshModels();
+ }, [requestCopilotModels, copilotCatalogScope, companyId, agent?.defaultEnvironmentId, refreshModels]);
// The server resolves instance-declared models first and otherwise returns the
// adapter's curated catalog. Do not replace a declared Codex list locally.
const models: readonly (AdapterModel & { detail?: string })[] = modelOptionsOverride
diff --git a/ui/src/features/connections/ConnectionSetupFlow.tsx b/ui/src/features/connections/ConnectionSetupFlow.tsx
index b45f73007c..606fa74197 100644
--- a/ui/src/features/connections/ConnectionSetupFlow.tsx
+++ b/ui/src/features/connections/ConnectionSetupFlow.tsx
@@ -366,12 +366,19 @@ const OAUTH_SIGN_IN_STEP_LABELS = ["Sign in"];
* original identity through the explicit reconnect hint.
*/
function defaultGrantKindFor(method: ConnectionMethodDef | null, preferPersonal = false): ConnectionGrantKind {
+ // A Copilot PAT represents a person's paid runtime account. Sharing it must
+ // be an explicit choice, independent of GitHub repository connections.
+ if (method?.ai?.provider === "github") return "user";
if (preferPersonal && method?.auth !== "none" && (!method?.grantKinds || method.grantKinds.includes("user"))) return "user";
if (method?.grantKinds?.length === 1) return method.grantKinds[0]!;
if (method?.grantKinds && !method.grantKinds.includes("organization")) return method.grantKinds[0]!;
return "organization";
}
+function defaultInstallChoiceFor(method: ConnectionMethodDef | null, requestedAgentId?: string): "specific" | "all" {
+ return requestedAgentId || method?.ai?.provider === "github" ? "specific" : "all";
+}
+
function configuredAgentIdentity(connection: ToolConnection): string | undefined {
const oauth = connection.config?.oauth;
if (!oauth || typeof oauth !== "object" || Array.isArray(oauth)) return undefined;
@@ -984,7 +991,7 @@ function StandardConnectionSetupFlow({
setGoogleSheetsError(null);
setConnectResult(null);
setInstallAgentIds(new Set(requestedAgentId ? [requestedAgentId] : []));
- setInstallChoice(requestedAgentId ? "specific" : "all");
+ setInstallChoice(defaultInstallChoiceFor(initialMethod, requestedAgentId));
setGrantKind(reconnectGrantKind ?? defaultGrantKindFor(initialMethod, Boolean(requestedAgentId)));
setStep("key");
navigate(
@@ -1046,7 +1053,11 @@ function StandardConnectionSetupFlow({
&& !connectionMethodSupportsAutomaticOAuth(candidate),
);
const selectedCustomOAuth = Boolean(customOAuthMethod && connectionMethodKey === customOAuthMethod.key);
- const requestedDefinitionUsesManagedConnector = !selectedCustomOAuth && Boolean(
+ const selectedRuntimeAuth = Boolean(fullRequestedDefinition?.methods.some(candidate =>
+ candidate.transport === "runtime_auth" && candidate.ai
+ && candidate.key === (connectionMethodKey || requestedMethodKey),
+ ));
+ const requestedDefinitionUsesManagedConnector = !selectedCustomOAuth && !selectedRuntimeAuth && Boolean(
fullRequestedDefinition?.methods.some((candidate) =>
candidate.oauthStrategy === "paperclip_cloud_connector"
|| candidate.oauthStrategy === "paperclip_id_connector"
@@ -1693,7 +1704,7 @@ function StandardConnectionSetupFlow({
setInstallAgentIds(new Set(
matchingEnrollmentAccess?.agentIds ?? (requestedAgentId ? [requestedAgentId] : []),
));
- setInstallChoice(matchingEnrollmentAccess?.installChoice ?? (requestedAgentId ? "specific" : "all"));
+ setInstallChoice(matchingEnrollmentAccess?.installChoice ?? defaultInstallChoiceFor(initialMethod, requestedAgentId));
// Route/service selection initializes the wizard once. Later renders must
// preserve the user's current step in both hosts instead of snapping back
// to Access after they continue.
@@ -2143,7 +2154,7 @@ function StandardConnectionSetupFlow({
capabilities={galleryQuery.data?.capabilities}
githubIdentity={entry?.slug === "github"}
identityLoading={Boolean(automaticOAuthEntry) && directOAuthLookupPending}
- preserveAgentAccess={Boolean(automaticOAuthEntry && (resumableOAuthConnection || reconnectConnection))}
+ preserveAgentAccess={Boolean((automaticOAuthEntry && (resumableOAuthConnection || reconnectConnection)) || reconnectConnection?.connectionPurpose === "ai")}
disabled={connectMutation.isPending || oauthStartMutation.isPending}
/>
{entry && instructionTemplate && instructionValue && <div className="mt-6"><ConnectionInstructionsEditor provider={entry.name} template={instructionTemplate} value={instructionValue} onChange={(value) => setInstructionDraft({ slug: entry.slug, value })} disabled={connectMutation.isPending || oauthStartMutation.isPending} /></div>}
@@ -2446,7 +2457,7 @@ function StandardConnectionSetupFlow({
zapierSource
? { name: "Zapier", logoUrl: zapierEntry?.branding.logoUrl ?? null, darkLogoUrl: zapierEntry?.branding.darkLogoUrl ?? null }
: entry && step !== "gallery"
- ? { name: entry.name, logoUrl: entry.branding.logoUrl, darkLogoUrl: entry.branding.darkLogoUrl ?? null }
+ ? { name: aiMethod?.provider === "github" ? "GitHub Copilot" : entry.name, logoUrl: entry.branding.logoUrl, darkLogoUrl: entry.branding.darkLogoUrl ?? null }
: undefined
}
unverifiedHost={!entry && !zapierSource && step !== "gallery" ? endpointHost(linkUrl) : null}
diff --git a/ui/src/lib/copilot-task-model-catalog.test.ts b/ui/src/lib/copilot-task-model-catalog.test.ts
new file mode 100644
index 0000000000..aa8c4c9a9c
--- /dev/null
+++ b/ui/src/lib/copilot-task-model-catalog.test.ts
@@ -0,0 +1,24 @@
+import { describe, expect, it } from "vitest";
+import type { Agent } from "@paperclipai/shared";
+import { copilotTaskModelCatalogOptions } from "./copilot-task-model-catalog";
+
+describe("Copilot task model catalog identity", () => {
+ const agent = { id: "copilot", adapterType: "paperclip_runner", adapterConfig: {
+ provider: "acpx", acpxAgent: "copilot",
+ } } as unknown as Agent;
+ it("changes the catalog identity when a saved connection changes", () => {
+ const a = copilotTaskModelCatalogOptions({ ...agent, runtimeConfig: { aiConnection: {
+ provider: "github", method: "api_key", mode: "shared", connectionId: "11111111-1111-4111-8111-111111111111", grantId: "33333333-3333-4333-8333-333333333333",
+ } } });
+ const b = copilotTaskModelCatalogOptions({ ...agent, runtimeConfig: { aiConnection: {
+ provider: "github", method: "api_key", mode: "shared", connectionId: "22222222-2222-4222-8222-222222222222", grantId: "33333333-3333-4333-8333-333333333333",
+ } } });
+ expect(a).not.toEqual(b);
+ });
+ it("allows normal responsible-user discovery when no explicit binding is saved", () => {
+ expect(copilotTaskModelCatalogOptions(agent)).toEqual({ acpxAgent: "copilot", agentId: "copilot", aiConnection: undefined });
+ });
+ it("does not change catalogs for other runners", () => {
+ expect(copilotTaskModelCatalogOptions({ ...agent, adapterConfig: { provider: "acpx", acpxAgent: "claude" } })).toBeUndefined();
+ });
+});
diff --git a/ui/src/lib/copilot-task-model-catalog.ts b/ui/src/lib/copilot-task-model-catalog.ts
new file mode 100644
index 0000000000..38889a869c
--- /dev/null
+++ b/ui/src/lib/copilot-task-model-catalog.ts
@@ -0,0 +1,19 @@
+import { aiConnectionBindingSchema, type Agent } from "@paperclipai/shared";
+
+/** Task overrides must discover models through the assignee's saved connection. */
+export function copilotTaskModelCatalogOptions(agent: Agent | null | undefined) {
+ if (agent?.adapterType !== "paperclip_runner"
+ || agent.adapterConfig.provider !== "acpx"
+ || agent.adapterConfig.acpxAgent !== "copilot") return undefined;
+ return {
+ acpxAgent: "copilot",
+ agentId: agent.id,
+ aiConnection: aiConnectionBindingSchema.safeParse(agent.runtimeConfig?.aiConnection).data,
+ };
+}
+
+/** Remote catalogs may provision a sandbox; live-data reconciliation must not repeat discovery. */
+export const COPILOT_MODEL_DISCOVERY_QUERY_OPTIONS = {
+ staleTime: "static" as const,
+ retry: false as const,
+};
diff --git a/ui/src/lib/new-agent-adapters.ts b/ui/src/lib/new-agent-adapters.ts
index 3df9de4ebe..1539d10bb2 100644
--- a/ui/src/lib/new-agent-adapters.ts
+++ b/ui/src/lib/new-agent-adapters.ts
@@ -20,7 +20,7 @@ export function isNewAgentAdapterAllowed(
return openAiDotEnabled;
}
if (type === "muse" || (type === "paperclip_runner" && runnerProvider === "muse")) return museEnabled && nativeRunnerEnabled;
- if (type === "paperclip_runner") return nativeRunnerEnabled;
+ if (type === "paperclip_runner") return runnerProvider === "copilot" || nativeRunnerEnabled;
if (cloud) return CLOUD_ADAPTERS.has(type);
return true;
}
diff --git a/ui/src/pages/InstanceExperimentalSettings.test.tsx b/ui/src/pages/InstanceExperimentalSettings.test.tsx
index 683940c065..0145120b41 100644
--- a/ui/src/pages/InstanceExperimentalSettings.test.tsx
+++ b/ui/src/pages/InstanceExperimentalSettings.test.tsx
@@ -393,7 +393,7 @@ describe("InstanceExperimentalSettings — Conference Room Chat card (PAP-11233)
await renderPage();
expect(container.textContent).toContain("Paperclip Runner");
- expect(container.textContent).toContain("Onboarding continues to use legacy adapters");
+ expect(container.textContent).toContain("First-run setup offers qualified GitHub Copilot");
const toggle = container.querySelector<HTMLButtonElement>(
PAPERCLIP_RUNNER_TOGGLE_SELECTOR,
);
diff --git a/ui/src/pages/InstanceExperimentalSettings.tsx b/ui/src/pages/InstanceExperimentalSettings.tsx
index 358c4f9518..e23ee2fe8b 100644
--- a/ui/src/pages/InstanceExperimentalSettings.tsx
+++ b/ui/src/pages/InstanceExperimentalSettings.tsx
@@ -531,7 +531,7 @@ export function InstanceExperimentalSettings() {
<ExperimentalToggleCard
title="Paperclip Runner"
- description="Allow new Codex agents to select the experimental Rust Paperclip Runner, including authenticated runner ingress when a sandbox requires it. Onboarding continues to use legacy adapters. Turning this off hides the choice without affecting existing native runs."
+ description="Allow agents to select Paperclip Runner, including authenticated runner ingress when a sandbox requires it. First-run setup offers qualified GitHub Copilot. Turning this off hides the choice without affecting existing native runs."
checked={enableNativeRunner}
onCheckedChange={(checked) =>
toggleMutation.mutate({ enableNativeRunner: checked })
diff --git a/ui/src/pages/NewAgent.test.tsx b/ui/src/pages/NewAgent.test.tsx
index 4f3949e91a..bae1475d39 100644
--- a/ui/src/pages/NewAgent.test.tsx
+++ b/ui/src/pages/NewAgent.test.tsx
@@ -2,6 +2,7 @@
import { act } from "react";
import { describe, expect, it, vi } from "vitest";
import { queryKeys } from "@/lib/queryKeys";
+import { ApiError } from "@/api/client";
import {
api, envApi, settings, secrets, state, managedApi, adapterApi,
root, container, cache, settle, click, fill, render, connect, pass,
@@ -317,6 +318,69 @@ describe("New agent setup", () => {
expect(api.testEnvironment).toHaveBeenLastCalledWith("company-1", "codex_local", expect.objectContaining({ runner: "paperclip" }));
expect(api.hire.mock.calls[0][1]).toMatchObject({ adapterType: "codex_local", runner: "paperclip" });
});
+ it("keeps saved-token Copilot discovery passive while new-agent setup is idle", async () => {
+ api.adapterModels.mockResolvedValue([{ id: "gpt-5.6-luna", label: "Copilot Luna" }]);
+ await render("paperclip_runner", "copilot");
+ await vi.waitFor(() => expect(api.adapterModels).toHaveBeenLastCalledWith("company-1", "paperclip_runner", expect.objectContaining({ environmentId: "local-1", acpxAgent: "copilot" })));
+ await settle();
+ const initialDiscoveries = api.adapterModels.mock.calls.length;
+ await act(async () => { await cache.invalidateQueries({ type: "active" }, { cancelRefetch: false }); });
+ await settle();
+ expect(api.adapterModels).toHaveBeenCalledTimes(initialDiscoveries);
+ });
+ it("refuses an undiscovered Copilot model before hiring with a saved connection", async () => {
+ api.adapterModels.mockResolvedValue([{ id: "gpt-5.6-luna", label: "GPT" }]);
+ await render("paperclip_runner", "copilot");
+ await fill("Model", "unavailable-copilot-model");
+ await click("Finish setup");
+ expect(api.hire).not.toHaveBeenCalled();
+ expect(container.textContent).toContain("select an available model");
+ });
+ it("preserves the authenticated Copilot model when hiring with a saved connection", async () => {
+ api.adapterModels.mockResolvedValue([{ id: "gpt-5.6-luna", label: "GPT" }]);
+ await render("paperclip_runner", "copilot");
+ await fill("Model", "gpt-5.6-luna");
+ await click("Finish setup");
+ expect(api.hire).toHaveBeenCalledWith("company-1", expect.objectContaining({
+ adapterType: "paperclip_runner", adapterConfig: expect.objectContaining({ provider: "acpx", acpxAgent: "copilot", model: "gpt-5.6-luna" }),
+ runtimeConfig: expect.objectContaining({ aiConnection: { provider: "github", method: "api_key", mode: "responsible_user" } }),
+ }));
+ });
+ it("discovers models after the first Copilot token becomes the responsible user's default", async () => {
+ let defaultSaved = false;
+ managedApi.setDefault.mockImplementation(async () => { defaultSaved = true; return {}; });
+ api.adapterModels.mockImplementation(async () => {
+ if (!defaultSaved) throw new ApiError("Connect Copilot first", 422, null);
+ return [{ id: "gpt-5.6-luna", label: "GPT" }];
+ });
+ await render("paperclip_runner", "copilot");
+ const beforeConnection = api.adapterModels.mock.calls.length;
+ expect(beforeConnection).toBeGreaterThan(0);
+ const trigger = document.querySelector('[role="combobox"][aria-label="Connection"]')!;
+ await act(async () => trigger.dispatchEvent(new KeyboardEvent("keydown", { key: "ArrowDown", bubbles: true })));
+ await settle();
+ const option = [...document.querySelectorAll<HTMLElement>('[role="option"]')].find(item => item.textContent?.includes("Connect an account"));
+ expect(option).toBeDefined();
+ await act(async () => option!.click());
+ await settle();
+ const input = document.querySelector<HTMLInputElement>('[aria-label="API key"]')!;
+ expect(input).toBeTruthy();
+ await act(async () => {
+ Object.getOwnPropertyDescriptor(HTMLInputElement.prototype, "value")!.set!.call(input, "github_pat_fixture_first");
+ input.dispatchEvent(new Event("input", { bubbles: true }));
+ });
+ const save = [...document.querySelectorAll<HTMLButtonElement>('[role="dialog"] button')].find(button => button.textContent?.trim() === "Connect")!;
+ expect(save).toBeTruthy();
+ await act(async () => save.click());
+ await settle();
+ expect(managedApi.setDefault).toHaveBeenCalledWith("company-1", "managed-grant");
+ expect(api.adapterModels).toHaveBeenCalledTimes(beforeConnection + 1);
+ expect(api.adapterModels.mock.invocationCallOrder[beforeConnection]).toBeGreaterThan(managedApi.setDefault.mock.invocationCallOrder[0]);
+ expect(api.adapterModels).toHaveBeenLastCalledWith("company-1", "paperclip_runner", expect.objectContaining({
+ provider: "acpx", acpxAgent: "copilot", aiConnection: { provider: "github", method: "api_key", mode: "responsible_user" },
+ }));
+ });
+
it("creates Dot through its independent choice without CLI or model setup, then routes to pairing", async () => {
settings.getExperimental.mockResolvedValue({ enableNativeRunner: false, enableOpenAiDot: true, enablePublicMcp: true });
await render("paperclip_runner", "openai_dot");
diff --git a/ui/src/pages/apps/AppsConnect.test.tsx b/ui/src/pages/apps/AppsConnect.test.tsx
index 352d4148d8..e321f9881f 100644
--- a/ui/src/pages/apps/AppsConnect.test.tsx
+++ b/ui/src/pages/apps/AppsConnect.test.tsx
@@ -996,6 +996,49 @@ describe("AppsConnect — Connect with a link (M4 frame)", () => {
expect(container.textContent).not.toContain("Connect for tool access instead");
});
+ it.each([false, true])("opens Copilot with visible personal defaults and shares only by explicit choice (%s)", async (share) => {
+ mockSearch.value = "source=github&method=copilot-token";
+ listGalleryMock.mockResolvedValue({ apps: [GITHUB] });
+ const client = new QueryClient({ defaultOptions: { queries: { retry: false, staleTime: Infinity } } });
+ client.setQueryData(queryKeys.environments.list("company-1"), [
+ { id: "local-env", name: "Local", driver: "local", status: "active", config: {} },
+ ]);
+ client.setQueryData(queryKeys.instance.settings, { defaultEnvironmentId: "local-env" });
+ const createAiAccount = vi.spyOn(aiConnectionsApi, "create").mockResolvedValue({
+ connectionId: "copilot-ai-account", grantId: "copilot-ai-grant",
+ });
+ await render(client);
+ await passAccessStep();
+ expect(container.textContent).toContain("personal fine-grained token with Copilot Requests permission");
+ expect(container.querySelector('input[placeholder="github_pat_..."]')).toBeTruthy();
+ expect(container.querySelector('[aria-label="Copilot execution environment"]')).toBeTruthy();
+ expect(container.textContent).not.toContain("You must connect this instance to Paperclip");
+ expect(getCloudConnectorEnrollmentMock).not.toHaveBeenCalled();
+ expect(startOAuthMock).not.toHaveBeenCalled();
+ expect(connectAppMock).not.toHaveBeenCalled();
+ expect(container.textContent).toContain("Connects as you");
+ expect(container.textContent?.match(/Connects as you/g)).toHaveLength(1);
+ expect(container.textContent).toContain("Connect GitHub Copilot");
+ await openAccessAdvanced();
+ expect(radioContaining("My GitHub account")?.getAttribute("aria-checked")).toBe("true");
+ expect(radioContaining("Only agents I choose")?.getAttribute("aria-checked")).toBe("true");
+ expect(radioContaining("Any agent")?.getAttribute("aria-checked")).toBe("false");
+ if (share) {
+ await act(async () => radioContaining("Shared organization GitHub account")!.click());
+ await act(async () => radioContaining("Any agent")!.click());
+ }
+ const key = container.querySelector<HTMLInputElement>('input[type="password"]')!;
+ await act(async () => setInputValue(key, "fixture-copilot-token"));
+ await act(async () => buttonByText("Connect")!.click());
+ await flushReact();
+ expect(createAiAccount).toHaveBeenCalledWith("company-1", expect.objectContaining({
+ provider: "github", method: "api_key", apiKey: "fixture-copilot-token",
+ ownership: share ? "shared" : "personal", allAgents: share, agentIds: [],
+ environmentId: "local-env",
+ }));
+ expect(mockNavigate).toHaveBeenCalledWith("/apps/copilot-ai-account/permissions");
+ });
+
it("states the GitHub identity default and keeps its controls one click away", async () => {
mockParams.appKey = "github";
listGalleryMock.mockResolvedValue({ apps: [GITHUB_MANAGED] });
diff --git a/ui/src/pages/apps/Browse.test.tsx b/ui/src/pages/apps/Browse.test.tsx
index 27770725a3..fb691451ca 100644
--- a/ui/src/pages/apps/Browse.test.tsx
+++ b/ui/src/pages/apps/Browse.test.tsx
@@ -983,6 +983,10 @@ describe("Connectors landing page", () => {
expect(container.textContent).not.toContain("Chat with agents");
await act(() => void container.querySelector<HTMLButtonElement>('button[aria-label="Add key GitHub"]')!.click());
expect(navigateMock).toHaveBeenLastCalledWith("/apps/connect?source=github");
+ const copilot = [...container.querySelectorAll<HTMLButtonElement>("button")].find(button => button.textContent === "Connect Copilot")!;
+ expect(copilot).toBeTruthy();
+ await act(() => void copilot.click());
+ expect(navigateMock).toHaveBeenLastCalledWith("/apps/connect?source=github&method=copilot-token");
});
it("names what the card will actually ask for", async () => {
diff --git a/ui/src/pages/apps/Browse.tsx b/ui/src/pages/apps/Browse.tsx
index 9f6c214c0c..84318d0d23 100644
--- a/ui/src/pages/apps/Browse.tsx
+++ b/ui/src/pages/apps/Browse.tsx
@@ -318,7 +318,7 @@ function connectorAction(
// Tool connectors retain their capability-specific setup verbs.
if (row.entry) {
return {
- label: row.entry.methods?.some(method => method.purpose === "ai") ? "Connect" : connectionSetupVerbForApp(row.entry),
+ label: row.entry.methods?.every(method => method.purpose === "ai") ? "Connect" : connectionSetupVerbForApp(row.entry),
href: connectHrefFor(row.entry),
};
}
@@ -1100,6 +1100,9 @@ export function ConnectorCard({
chatProviderVisible(row.slug, chatConnectorsEnabled, githubReviewBotsEnabled),
preselectedAgentId,
);
+ const copilotMethod = row.slug === "github"
+ ? getAppStoreDefinition(row.slug)?.methods.find(method => method.purpose === "ai" && method.ai?.provider === "github")
+ : undefined;
const upstreamAccounts = (row.upstreamApps ?? []).flatMap(snapshot => {
const connection = connectionById?.get(snapshot.connectionId);
return connection ? snapshot.accounts.map((account, index) => ({ connection, account, snapshot,
@@ -1153,6 +1156,14 @@ export function ConnectorCard({
{row.aggregatorApp && row.upstreamApps?.some(app => app.accounts.length > 0) ? `Accounts managed in ${[...new Set(row.upstreamApps?.map(app => AGGREGATOR_NAMES[app.provider ?? "composio"]))].join(" and ")}.` : row.description}
</p>
</div>
+ {copilotMethod && <Button
+ type="button"
+ size="sm"
+ variant="outline"
+ onClick={() => onNavigate(`/apps/connect?source=github&method=${encodeURIComponent(copilotMethod.key)}`)}
+ >
+ Connect Copilot
+ </Button>}
<Button
type="button"
size="sm"