@open-mercato/enterprise 0.8.1-develop.7228.1.b7ea09d2d3 → 0.8.1-develop.7238.1.3abe669ea5

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -8,7 +8,7 @@ var __decorateClass = (decorators, target, key, kind) => {
8
8
  if (kind && result) __defProp(target, key, result);
9
9
  return result;
10
10
  };
11
- import { OptionalProps } from "@mikro-orm/core";
11
+ import { BigIntType, OptionalProps } from "@mikro-orm/core";
12
12
  import { Entity, Index, PrimaryKey, Property, Unique } from "@mikro-orm/decorators/legacy";
13
13
  OptionalProps;
14
14
  let AgentRun = class {
@@ -71,7 +71,7 @@ __decorateClass([
71
71
  Property({ name: "output_tokens", type: "integer", nullable: true })
72
72
  ], AgentRun.prototype, "outputTokens", 2);
73
73
  __decorateClass([
74
- Property({ name: "cost_minor", type: "bigint", nullable: true })
74
+ Property({ name: "cost_minor", type: new BigIntType("number"), nullable: true })
75
75
  ], AgentRun.prototype, "costMinor", 2);
76
76
  __decorateClass([
77
77
  Property({ name: "currency", type: "varchar", length: 3, nullable: true })
@@ -1041,7 +1041,7 @@ __decorateClass([
1041
1041
  Property({ name: "subject_title", type: "varchar", length: 300, nullable: true })
1042
1042
  ], ProcessInstance.prototype, "subjectTitle", 2);
1043
1043
  __decorateClass([
1044
- Property({ name: "subject_value_minor", type: "bigint", nullable: true })
1044
+ Property({ name: "subject_value_minor", type: new BigIntType("number"), nullable: true })
1045
1045
  ], ProcessInstance.prototype, "subjectValueMinor", 2);
1046
1046
  __decorateClass([
1047
1047
  Property({ name: "subject_fraud", type: "boolean", nullable: true })
@@ -1062,7 +1062,7 @@ __decorateClass([
1062
1062
  Property({ name: "agent_ids", type: "jsonb", nullable: true })
1063
1063
  ], ProcessInstance.prototype, "agentIds", 2);
1064
1064
  __decorateClass([
1065
- Property({ name: "cost_minor", type: "bigint", nullable: true })
1065
+ Property({ name: "cost_minor", type: new BigIntType("number"), nullable: true })
1066
1066
  ], ProcessInstance.prototype, "costMinor", 2);
1067
1067
  __decorateClass([
1068
1068
  Property({ name: "currency", type: "varchar", length: 3, nullable: true })
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../../../src/modules/agent_orchestrator/data/entities.ts"],
4
- "sourcesContent": ["import { OptionalProps } from '@mikro-orm/core'\nimport { Entity, Index, PrimaryKey, Property, Unique } from '@mikro-orm/decorators/legacy'\nimport type {\n AgentType,\n ProcessMilestone,\n ProcessMilestoneReached,\n ProcessRunTriggeredBy,\n ProcessTrigger,\n} from './validators'\n\nexport type AgentRunStatus = 'running' | 'ok' | 'error' | 'cancelled'\n\n/** Distinguishes production traffic from eval replays across runs and proposals. */\nexport type AgentRunSource = 'runtime' | 'eval'\n\n/** Span kinds; OTel GenAI semantic conventions are the naming target for span attributes. */\nexport type AgentSpanKind = 'llm' | 'tool' | 'system'\nexport type AgentSpanStatus = 'ok' | 'error'\nexport type AgentToolCallStatus = 'ok' | 'error'\n\n@Entity({ tableName: 'agent_runs' })\n@Index({ name: 'agent_runs_tenant_org_idx', properties: ['tenantId', 'organizationId'] })\n@Index({ name: 'agent_runs_agent_idx', properties: ['organizationId', 'agentId'] })\n@Unique({ name: 'agent_runs_runtime_external_uq', properties: ['runtime', 'externalRunId'] })\n@Index({ name: 'agent_runs_agent_def_idx', properties: ['agentId', 'createdAt'] })\n@Index({ name: 'agent_runs_org_status_created_idx', properties: ['organizationId', 'status', 'createdAt'] })\n@Index({\n name: 'agent_runs_eval_failed_idx',\n expression:\n `create index \"agent_runs_eval_failed_idx\" on \"agent_runs\" (\"organization_id\", \"created_at\") where \"eval_passed\" = false`,\n})\n// One run per agent invocation, stated as an identity rather than guessed from\n// creation time. Partial so Playground/eval runs \u2014 which correlate to nothing \u2014\n// are unconstrained.\n@Index({\n name: 'agent_runs_invocation_uq',\n expression:\n `create unique index \"agent_runs_invocation_uq\" on \"agent_runs\" (\"workflow_instance_id\", \"step_id\", \"invocation_id\") where \"workflow_instance_id\" is not null and \"step_id\" is not null and \"invocation_id\" is not null`,\n})\nexport class AgentRun {\n [OptionalProps]?:\n | 'source'\n | 'status'\n | 'output'\n | 'resultKind'\n | 'agentType'\n | 'errorMessage'\n | 'parentRunId'\n | 'workflowInstanceId'\n | 'stepId'\n | 'invocationId'\n | 'proposalId'\n | 'agentVersion'\n | 'model'\n | 'runtime'\n | 'externalRunId'\n | 'confidence'\n | 'inputTokens'\n | 'outputTokens'\n | 'costMinor'\n | 'currency'\n | 'latencyMs'\n | 'evalScore'\n | 'evalPassed'\n | 'goldenCaseId'\n | 'goldenPassed'\n | 'contextRouting'\n | 'outputArtifactKey'\n | 'humanConfirmedAt'\n | 'flaggedAt'\n | 'flaggedBy'\n | 'rerunOfRunId'\n | 'completedAt'\n | 'createdAt'\n | 'updatedAt'\n | 'deletedAt'\n\n @PrimaryKey({ type: 'uuid', defaultRaw: 'gen_random_uuid()' })\n id!: string\n\n @Property({ name: 'tenant_id', type: 'uuid' })\n tenantId!: string\n\n @Property({ name: 'organization_id', type: 'uuid' })\n organizationId!: string\n\n @Property({ name: 'agent_id', type: 'varchar', length: 100 })\n agentId!: string\n\n /**\n * Where this run came from. `eval` marks a replay: a real run with real spans\n * and real cost, but one that must NOT skew the agent's production metrics.\n * Defaults to `runtime`, so every pre-existing row keeps its meaning.\n */\n @Property({ name: 'source', type: 'varchar', length: 20, default: 'runtime' })\n source: AgentRunSource = 'runtime'\n\n /**\n * Parent run that delegated to this one as a sub-agent (Phase 4 nested trace).\n * Nullable + additive: top-level runs leave it null. Populated for the\n * in-process `delegate_agent` path; OpenCode-NATIVE `task` delegation runs\n * sub-agents inside OpenCode (not via our runner), so per-sub-agent rows are a\n * documented follow-up for that path.\n */\n @Property({ name: 'parent_run_id', type: 'uuid', nullable: true })\n parentRunId?: string | null\n\n // \u2500\u2500 Execution correlation \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\n /**\n * WHICH agent invocation this run is, stated explicitly.\n *\n * `(workflowInstanceId, stepId, invocationId)` is the identity of one agent\n * invocation and the unique key below enforces it. Before this triple existed,\n * a caller found the run it had just caused with \"the newest run for this agent\n * created since T\" \u2014 a temporal lookup that cannot tell two concurrent runs of\n * the same agent apart. Correlation is always an explicit identifier.\n *\n * All three are nullable together: a Playground or eval run belongs to no\n * workflow and correlates to nothing.\n */\n @Property({ name: 'workflow_instance_id', type: 'uuid', nullable: true })\n workflowInstanceId?: string | null\n\n @Property({ name: 'step_id', type: 'varchar', length: 100, nullable: true })\n stepId?: string | null\n\n /** The step's attempt id \u2014 distinguishes a retry from the run it retried. */\n @Property({ name: 'invocation_id', type: 'varchar', length: 100, nullable: true })\n invocationId?: string | null\n\n /** FK id \u2192 agent_proposals (orchestration). */\n @Property({ name: 'proposal_id', type: 'uuid', nullable: true })\n proposalId?: string | null\n\n @Property({ name: 'agent_version', type: 'varchar', length: 50, nullable: true })\n agentVersion?: string | null\n\n @Property({ name: 'model', type: 'varchar', length: 100, nullable: true })\n model?: string | null\n\n /** Runtime that produced the run; part of the ingestion idempotency key. */\n @Property({ name: 'runtime', type: 'varchar', length: 50, nullable: true })\n runtime?: string | null\n\n /** Runtime-native run id; part of the ingestion idempotency key. */\n @Property({ name: 'external_run_id', type: 'varchar', length: 200, nullable: true })\n externalRunId?: string | null\n\n @Property({ name: 'confidence', type: 'float', nullable: true })\n confidence?: number | null\n\n @Property({ name: 'input_tokens', type: 'integer', nullable: true })\n inputTokens?: number | null\n\n @Property({ name: 'output_tokens', type: 'integer', nullable: true })\n outputTokens?: number | null\n\n @Property({ name: 'cost_minor', type: 'bigint', nullable: true })\n costMinor?: number | null\n\n @Property({ name: 'currency', type: 'varchar', length: 3, nullable: true })\n currency?: string | null\n\n @Property({ name: 'latency_ms', type: 'integer', nullable: true })\n latencyMs?: number | null\n\n @Property({ name: 'eval_score', type: 'float', nullable: true })\n evalScore?: number | null\n\n @Property({ name: 'eval_passed', type: 'boolean', nullable: true })\n evalPassed?: boolean | null\n\n /** FK id \u2192 agent_eval_cases; the approved golden case whose input this run matched (online golden-match plane); null when no golden matched. */\n @Property({ name: 'golden_case_id', type: 'uuid', nullable: true })\n goldenCaseId?: string | null\n\n /** Verdict of the matched golden case's gate assertions for this run; null when no golden matched or no gate applied. */\n @Property({ name: 'golden_passed', type: 'boolean', nullable: true })\n goldenPassed?: boolean | null\n\n /** TDCR routed-vs-pruned context summary (context overlay). */\n @Property({ name: 'context_routing', type: 'jsonb', nullable: true })\n contextRouting?: unknown | null\n\n /** storage-s3 key for the offloaded, encrypted full output payload. */\n @Property({ name: 'output_artifact_key', type: 'varchar', length: 500, nullable: true })\n outputArtifactKey?: string | null\n\n @Property({ name: 'human_confirmed_at', type: Date, nullable: true })\n humanConfirmedAt?: Date | null\n\n /** Operator triage flag (trace inspector); null = unflagged. */\n @Property({ name: 'flagged_at', type: Date, nullable: true })\n flaggedAt?: Date | null\n\n /** FK id \u2192 auth.users; the operator who flagged the run. */\n @Property({ name: 'flagged_by', type: 'uuid', nullable: true })\n flaggedBy?: string | null\n\n /** FK id \u2192 agent_runs; the source run this run is a re-run of (trace inspector \"Re-run\"). Distinct from `parentRunId` (sub-agent delegation). */\n @Property({ name: 'rerun_of_run_id', type: 'uuid', nullable: true })\n rerunOfRunId?: string | null\n\n @Property({ name: 'status', type: 'varchar', length: 20, default: 'running' })\n status: AgentRunStatus = 'running'\n\n /**\n * Forensic completion timestamp: stamped once at the terminal transition\n * (`runs.complete`/`runs.fail`; trace ingest sets it null-only from span end\n * times) and never mutated afterwards \u2014 unlike `updatedAt`, which later\n * writes (e.g. flagging) legitimately bump.\n */\n @Property({ name: 'completed_at', type: Date, nullable: true })\n completedAt?: Date | null\n\n @Property({ name: 'input', type: 'jsonb' })\n input!: unknown\n\n @Property({ name: 'output', type: 'jsonb', nullable: true })\n output?: unknown | null\n\n @Property({ name: 'result_kind', type: 'varchar', length: 20, nullable: true })\n resultKind?: 'research' | 'proposal' | 'artifact' | null\n\n /**\n * The agent's DECLARED type at the time of the run \u2014 the authoring fact, stamped so a\n * run record answers \"what was this agent for\" without re-reading a registry that may\n * have changed since. NULLABLE by design: runs that predate the declaration, and agents\n * that never made one, have none. `resultKind` above stays the runtime fact.\n */\n @Property({ name: 'agent_type', type: 'varchar', length: 20, nullable: true })\n agentType?: AgentType | null\n\n @Property({ name: 'error_message', type: 'text', nullable: true })\n errorMessage?: string | null\n\n @Property({ name: 'created_at', type: Date, onCreate: () => new Date() })\n createdAt: Date = new Date()\n\n @Property({ name: 'updated_at', type: Date, onCreate: () => new Date(), onUpdate: () => new Date() })\n updatedAt: Date = new Date()\n\n @Property({ name: 'deleted_at', type: Date, nullable: true })\n deletedAt?: Date | null\n}\n\n/**\n * One step in an agent run's execution trace (an LLM call, a tool invocation, or\n * a system step). Append-only telemetry: omits `updated_at`/`deleted_at`. High\n * volume \u2014 partitioned by `created_at` and tiered to archive in a later phase.\n * Out-of-order ingestion is tolerated: `sequence` + `parentSpanId` rebuild the\n * tree regardless of arrival order. Other modules referenced by FK id only.\n */\n@Entity({ tableName: 'agent_spans' })\n@Index({ name: 'agent_spans_tenant_org_idx', properties: ['tenantId', 'organizationId'] })\n@Index({ name: 'agent_spans_run_idx', properties: ['agentRunId', 'sequence'] })\n@Unique({ name: 'agent_spans_run_external_uq', properties: ['agentRunId', 'externalSpanId'] })\nexport class AgentSpan {\n [OptionalProps]?: 'parentSpanId' | 'endedAt' | 'durationMs' | 'status' | 'attributes' | 'createdAt'\n\n @PrimaryKey({ type: 'uuid', defaultRaw: 'gen_random_uuid()' })\n id!: string\n\n @Property({ name: 'tenant_id', type: 'uuid' })\n tenantId!: string\n\n @Property({ name: 'organization_id', type: 'uuid' })\n organizationId!: string\n\n /** FK id \u2192 agent_runs. */\n @Property({ name: 'agent_run_id', type: 'uuid' })\n agentRunId!: string\n\n /**\n * Adapter-native span id. The dedupe + parent-link key: re-ingesting the same\n * trace is a no-op (unique per run), and children resolve their `parentSpanId`\n * by matching the parent's `externalSpanId` regardless of arrival order.\n */\n @Property({ name: 'external_span_id', type: 'varchar', length: 200 })\n externalSpanId!: string\n\n /** FK id \u2192 agent_spans (parent step); null for root spans. */\n @Property({ name: 'parent_span_id', type: 'uuid', nullable: true })\n parentSpanId?: string | null\n\n @Property({ name: 'sequence', type: 'integer' })\n sequence!: number\n\n @Property({ name: 'name', type: 'varchar', length: 200 })\n name!: string\n\n @Property({ name: 'kind', type: 'varchar', length: 20 })\n kind!: AgentSpanKind\n\n @Property({ name: 'started_at', type: Date })\n startedAt!: Date\n\n @Property({ name: 'ended_at', type: Date, nullable: true })\n endedAt?: Date | null\n\n @Property({ name: 'duration_ms', type: 'integer', nullable: true })\n durationMs?: number | null\n\n @Property({ name: 'status', type: 'varchar', length: 20, default: 'ok' })\n status: AgentSpanStatus = 'ok'\n\n /** OTel GenAI naming target. */\n @Property({ name: 'attributes', type: 'jsonb', nullable: true })\n attributes?: unknown | null\n\n @Property({ name: 'created_at', type: Date, onCreate: () => new Date() })\n createdAt: Date = new Date()\n}\n\n/**\n * A single tool invocation within a span. Append-only telemetry: omits\n * `updated_at`/`deleted_at`. Request/response summaries are redacted and stored\n * inline; full payloads are offloaded to storage-s3 by key, encrypted at rest.\n * Other modules referenced by FK id only.\n */\n@Entity({ tableName: 'agent_tool_calls' })\n@Index({ name: 'agent_tool_calls_tenant_org_idx', properties: ['tenantId', 'organizationId'] })\n@Index({ name: 'agent_tool_calls_span_idx', properties: ['spanId'] })\n@Index({ name: 'agent_tool_calls_run_idx', properties: ['agentRunId'] })\nexport class AgentToolCall {\n [OptionalProps]?:\n | 'requestSummary' | 'responseSummary' | 'requestArtifactKey' | 'responseArtifactKey'\n | 'status' | 'latencyMs' | 'errorMessage' | 'createdAt'\n\n @PrimaryKey({ type: 'uuid', defaultRaw: 'gen_random_uuid()' })\n id!: string\n\n @Property({ name: 'tenant_id', type: 'uuid' })\n tenantId!: string\n\n @Property({ name: 'organization_id', type: 'uuid' })\n organizationId!: string\n\n /** FK id \u2192 agent_spans. */\n @Property({ name: 'span_id', type: 'uuid' })\n spanId!: string\n\n /** FK id \u2192 agent_runs (denormalized for direct run-scoped queries). */\n @Property({ name: 'agent_run_id', type: 'uuid' })\n agentRunId!: string\n\n @Property({ name: 'tool_name', type: 'varchar', length: 200 })\n toolName!: string\n\n @Property({ name: 'request_summary', type: 'jsonb', nullable: true })\n requestSummary?: unknown | null\n\n @Property({ name: 'response_summary', type: 'jsonb', nullable: true })\n responseSummary?: unknown | null\n\n @Property({ name: 'request_artifact_key', type: 'varchar', length: 500, nullable: true })\n requestArtifactKey?: string | null\n\n @Property({ name: 'response_artifact_key', type: 'varchar', length: 500, nullable: true })\n responseArtifactKey?: string | null\n\n @Property({ name: 'status', type: 'varchar', length: 20, default: 'ok' })\n status: AgentToolCallStatus = 'ok'\n\n @Property({ name: 'latency_ms', type: 'integer', nullable: true })\n latencyMs?: number | null\n\n @Property({ name: 'error_message', type: 'text', nullable: true })\n errorMessage?: string | null\n\n @Property({ name: 'created_at', type: Date, onCreate: () => new Date() })\n createdAt: Date = new Date()\n}\n\nexport type CorrectionAction = 'edit' | 'reject' | 'override' | 'answer'\n\n/**\n * A human correction of an agent proposal \u2014 the flywheel's entry point. Append-only\n * (omits `updated_at`/`deleted_at`): the legal/oversight record must never mutate.\n * `reason` is mandatory and enforced by Zod + the command. Other modules referenced\n * by FK id only.\n */\n@Entity({ tableName: 'agent_corrections' })\n@Index({ name: 'agent_corrections_tenant_org_idx', properties: ['tenantId', 'organizationId'] })\n@Index({ name: 'agent_corrections_run_idx', properties: ['agentRunId'] })\n@Index({ name: 'agent_corrections_proposal_idx', properties: ['proposalId'] })\nexport class AgentCorrection {\n [OptionalProps]?: 'workflowInstanceId' | 'stepId' | 'agentRunId' | 'correctedValue' | 'evalCaseId' | 'createdAt'\n\n @PrimaryKey({ type: 'uuid', defaultRaw: 'gen_random_uuid()' })\n id!: string\n\n @Property({ name: 'tenant_id', type: 'uuid' })\n tenantId!: string\n\n @Property({ name: 'organization_id', type: 'uuid' })\n organizationId!: string\n\n /** FK id \u2192 workflows instance (no cross-module ORM relation). */\n @Property({ name: 'workflow_instance_id', type: 'uuid', nullable: true })\n workflowInstanceId?: string | null\n\n @Property({ name: 'step_id', type: 'varchar', length: 100, nullable: true })\n stepId?: string | null\n\n /** FK id \u2192 agent_runs. */\n @Property({ name: 'agent_run_id', type: 'uuid', nullable: true })\n agentRunId?: string | null\n\n /** FK id \u2192 agent_proposals. */\n @Property({ name: 'proposal_id', type: 'uuid' })\n proposalId!: string\n\n /** FK id \u2192 auth user who recorded the correction. */\n @Property({ name: 'corrected_by_user_id', type: 'uuid' })\n correctedByUserId!: string\n\n @Property({ name: 'action', type: 'varchar', length: 20 })\n action!: CorrectionAction\n\n /** The agent's original proposal payload. */\n @Property({ name: 'proposed_value', type: 'jsonb' })\n proposedValue!: unknown\n\n /** Human-supplied corrected payload; null on a plain reject. */\n @Property({ name: 'corrected_value', type: 'jsonb', nullable: true })\n correctedValue?: unknown | null\n\n /** Mandatory, non-empty \u2014 enforced by Zod + command. */\n @Property({ name: 'reason', type: 'text' })\n reason!: string\n\n /** FK id \u2192 agent_eval_cases (the auto-drafted case). */\n @Property({ name: 'eval_case_id', type: 'uuid', nullable: true })\n evalCaseId?: string | null\n\n @Property({ name: 'created_at', type: Date, onCreate: () => new Date() })\n createdAt: Date = new Date()\n}\n\nexport type AgentEvalCaseSourceType = 'correction' | 'golden_run'\nexport type AgentEvalCaseStatus = 'draft' | 'approved' | 'archived'\n\n/**\n * A regression eval case promoted from a correction or a golden run. Editable\n * (carries `updated_at` \u2192 optimistic lock); an engineer approves a draft before\n * it is exported to the lifecycle gate. Other modules referenced by FK id only.\n */\n@Entity({ tableName: 'agent_eval_cases' })\n@Index({ name: 'agent_eval_cases_tenant_org_idx', properties: ['tenantId', 'organizationId'] })\n@Index({ name: 'agent_eval_cases_agent_status_idx', properties: ['organizationId', 'agentDefinitionId', 'status'] })\n@Index({ name: 'agent_eval_cases_agent_input_key_idx', properties: ['organizationId', 'agentDefinitionId', 'inputKey'] })\nexport class AgentEvalCase {\n [OptionalProps]?:\n | 'name' | 'processType' | 'inputKey' | 'expected' | 'assertions' | 'status' | 'approvedByUserId'\n | 'createdAt' | 'updatedAt' | 'deletedAt'\n\n @PrimaryKey({ type: 'uuid', defaultRaw: 'gen_random_uuid()' })\n id!: string\n\n @Property({ name: 'tenant_id', type: 'uuid' })\n tenantId!: string\n\n @Property({ name: 'organization_id', type: 'uuid' })\n organizationId!: string\n\n @Property({ name: 'source_type', type: 'varchar', length: 20 })\n sourceType!: AgentEvalCaseSourceType\n\n /** FK id \u2192 agent_corrections or agent_runs (per sourceType). */\n @Property({ name: 'source_id', type: 'uuid' })\n sourceId!: string\n\n @Property({ name: 'agent_definition_id', type: 'varchar', length: 100 })\n agentDefinitionId!: string\n\n /** Human label for the case, shown as the first list column. Plaintext (not PII). */\n @Property({ name: 'name', type: 'varchar', length: 200, nullable: true })\n name?: string | null\n\n @Property({ name: 'process_type', type: 'varchar', length: 100, nullable: true })\n processType?: string | null\n\n @Property({ name: 'input', type: 'jsonb' })\n input!: unknown\n\n /**\n * SHA-256 (hex) of the canonicalized plaintext `input` \u2014 the match key used to\n * recognize a live/playground run whose input reproduces this golden case\n * (`canonicalInputKey`). Plaintext by design (must be SQL-queryable); NOT in\n * the encryption map. Nullable for legacy rows.\n */\n @Property({ name: 'input_key', type: 'varchar', length: 64, nullable: true })\n inputKey?: string | null\n\n /** Expected output (the corrected value); null when sourced from a plain reject. */\n @Property({ name: 'expected', type: 'jsonb', nullable: true })\n expected?: unknown | null\n\n /** Assertion keys to apply when this case runs. */\n @Property({ name: 'assertions', type: 'jsonb', nullable: true })\n assertions?: unknown | null\n\n @Property({ name: 'status', type: 'varchar', length: 20, default: 'draft' })\n status: AgentEvalCaseStatus = 'draft'\n\n @Property({ name: 'approved_by_user_id', type: 'uuid', nullable: true })\n approvedByUserId?: string | null\n\n @Property({ name: 'created_at', type: Date, onCreate: () => new Date() })\n createdAt: Date = new Date()\n\n @Property({ name: 'updated_at', type: Date, onCreate: () => new Date(), onUpdate: () => new Date() })\n updatedAt: Date = new Date()\n\n @Property({ name: 'deleted_at', type: Date, nullable: true })\n deletedAt?: Date | null\n}\n\nexport type AgentEvalAssertionType = 'deterministic' | 'llm_judge'\nexport type AgentEvalSeverity = 'gate' | 'warn'\n\n/**\n * A configured assertion applied to agent runs during evaluation. Editable\n * (carries `updated_at` \u2192 optimistic lock). `key` selects the shared pure-function\n * scorer; `config` parameterizes it. Only `deterministic` assertions may carry\n * `severity: 'gate'` (the gate tier must be reproducible); `llm_judge` is always `warn`.\n */\n@Entity({ tableName: 'agent_eval_assertions' })\n@Index({ name: 'agent_eval_assertions_tenant_org_idx', properties: ['tenantId', 'organizationId'] })\n@Index({ name: 'agent_eval_assertions_applies_idx', properties: ['organizationId', 'appliesTo', 'enabled'] })\n@Index({ name: 'agent_eval_assertions_scorer_idx', properties: ['organizationId', 'scorerKey'] })\n@Unique({ name: 'agent_eval_assertions_key_uq', properties: ['organizationId', 'appliesTo', 'key'] })\nexport class AgentEvalAssertion {\n [OptionalProps]?:\n | 'description' | 'config' | 'version' | 'enabled' | 'createdAt' | 'updatedAt' | 'deletedAt'\n\n @PrimaryKey({ type: 'uuid', defaultRaw: 'gen_random_uuid()' })\n id!: string\n\n @Property({ name: 'tenant_id', type: 'uuid' })\n tenantId!: string\n\n @Property({ name: 'organization_id', type: 'uuid' })\n organizationId!: string\n\n /**\n * Instance slug \u2014 unique per (organization, appliesTo). NOT the scorer identity:\n * `agent_eval_assertions_key_uq` allows one row per key, so overloading it with\n * the scorer identity capped the catalog at one assertion per scorer per agent\n * (e.g. two `contains` checks were unrepresentable). See `scorerKey`.\n */\n @Property({ name: 'key', type: 'varchar', length: 100 })\n key!: string\n\n /**\n * Which registry scorer runs \u2014 see `lib/eval/registry`. Backfilled from\n * `COALESCE(config->>'scorer', key)`, which reproduces the pre-column resolution\n * rule exactly, so existing rows keep their behaviour.\n */\n @Property({ name: 'scorer_key', type: 'varchar', length: 100 })\n scorerKey!: string\n\n @Property({ name: 'title', type: 'varchar', length: 200 })\n title!: string\n\n @Property({ name: 'description', type: 'text', nullable: true })\n description?: string | null\n\n /** Target agent definition id, or `'*'` to apply to every agent. */\n @Property({ name: 'applies_to', type: 'varchar', length: 100 })\n appliesTo!: string\n\n @Property({ name: 'type', type: 'varchar', length: 20 })\n type!: AgentEvalAssertionType\n\n @Property({ name: 'severity', type: 'varchar', length: 20 })\n severity!: AgentEvalSeverity\n\n @Property({ name: 'config', type: 'jsonb', nullable: true })\n config?: unknown | null\n\n @Property({ name: 'version', type: 'integer', default: 1 })\n version: number = 1\n\n @Property({ name: 'enabled', type: 'boolean', default: true })\n enabled: boolean = true\n\n @Property({ name: 'created_at', type: Date, onCreate: () => new Date() })\n createdAt: Date = new Date()\n\n @Property({ name: 'updated_at', type: Date, onCreate: () => new Date(), onUpdate: () => new Date() })\n updatedAt: Date = new Date()\n\n @Property({ name: 'deleted_at', type: Date, nullable: true })\n deletedAt?: Date | null\n}\n\n/**\n * The verdict of one assertion against one run. Append-only (omits\n * `updated_at`/`deleted_at`) \u2014 eval results are legal records retained \u22656 years.\n * A failing `gate` result marks the run `evalPassed = false`; `warn` never blocks.\n */\n@Entity({ tableName: 'agent_eval_results' })\n@Index({ name: 'agent_eval_results_tenant_org_idx', properties: ['tenantId', 'organizationId'] })\n@Index({ name: 'agent_eval_results_run_idx', properties: ['agentRunId'] })\n@Index({ name: 'agent_eval_results_assertion_idx', properties: ['assertionId'] })\n@Index({ name: 'agent_eval_results_case_run_idx', properties: ['evalCaseRunId'] })\n@Index({ name: 'agent_eval_results_matched_case_idx', properties: ['matchedEvalCaseId'] })\nexport class AgentEvalResult {\n [OptionalProps]?: 'evalCaseRunId' | 'matchedEvalCaseId' | 'passed' | 'score' | 'evidence' | 'evaluatedAt' | 'createdAt'\n\n @PrimaryKey({ type: 'uuid', defaultRaw: 'gen_random_uuid()' })\n id!: string\n\n @Property({ name: 'tenant_id', type: 'uuid' })\n tenantId!: string\n\n @Property({ name: 'organization_id', type: 'uuid' })\n organizationId!: string\n\n /** FK id \u2192 agent_runs. */\n @Property({ name: 'agent_run_id', type: 'uuid' })\n agentRunId!: string\n\n /** FK id \u2192 agent_eval_assertions. */\n @Property({ name: 'assertion_id', type: 'uuid' })\n assertionId!: string\n\n @Property({ name: 'assertion_key', type: 'varchar', length: 100 })\n assertionKey!: string\n\n /**\n * FK id \u2192 agent_eval_case_runs. Null for a result produced by the ONLINE plane\n * (inline at trace ingest, where there is no eval case); set for a result from\n * the eval plane. Nullable keeps every pre-existing row valid.\n */\n @Property({ name: 'eval_case_run_id', type: 'uuid', nullable: true })\n evalCaseRunId?: string | null\n\n /**\n * FK id \u2192 agent_eval_cases. Set (with `evalCaseRunId` null) when this verdict\n * comes from the ONLINE golden-match plane: a live/playground run whose input\n * matched an approved golden case, scored against that case's `expected`. Null\n * for plain online results and for eval-plane (`evalCaseRunId`) results.\n */\n @Property({ name: 'matched_eval_case_id', type: 'uuid', nullable: true })\n matchedEvalCaseId?: string | null\n\n /**\n * `null` means SKIPPED and is the single source of truth for it \u2014 there is no\n * separate flag. Skipped results are excluded from score AND pass aggregation\n * alike: never counted as 0, never counted as failing.\n *\n * Invariant: `score === null` \u27FA `passed === null`.\n */\n @Property({ name: 'passed', type: 'boolean', nullable: true })\n passed?: boolean | null\n\n @Property({ name: 'score', type: 'float', nullable: true })\n score?: number | null\n\n @Property({ name: 'severity', type: 'varchar', length: 20 })\n severity!: AgentEvalSeverity\n\n @Property({ name: 'evidence', type: 'jsonb', nullable: true })\n evidence?: unknown | null\n\n @Property({ name: 'evaluated_at', type: Date, onCreate: () => new Date() })\n evaluatedAt: Date = new Date()\n\n @Property({ name: 'created_at', type: Date, onCreate: () => new Date() })\n createdAt: Date = new Date()\n}\n\n/**\n * A precomputed per-agent KPI window (F2 metric rollups). Append-only (omits\n * `updated_at`/`deleted_at`): each row is an immutable snapshot of an agent's\n * metrics over a fixed `[windowStart, windowEnd)`. The rollup worker recomputes\n * and re-stamps a row idempotently per `(organizationId, agentId, windowStart)`\n * so the metrics endpoint reads a stable window with a live fallback instead of\n * a capped live scan. `metrics` jsonb shape is validated by the Zod schema in\n * data/validators.ts. Other modules referenced by FK id only.\n */\n@Entity({ tableName: 'agent_metric_rollups' })\n@Index({ name: 'agent_metric_rollups_tenant_org_idx', properties: ['tenantId', 'organizationId'] })\n@Index({ name: 'agent_metric_rollups_lookup_idx', properties: ['organizationId', 'agentId', 'windowStart'] })\nexport class AgentMetricRollup {\n [OptionalProps]?: 'computedAt' | 'createdAt'\n\n @PrimaryKey({ type: 'uuid', defaultRaw: 'gen_random_uuid()' })\n id!: string\n\n @Property({ name: 'tenant_id', type: 'uuid' })\n tenantId!: string\n\n @Property({ name: 'organization_id', type: 'uuid' })\n organizationId!: string\n\n /** Agent definition id \u2014 mirrors AgentRun.agentId (NOT agentDefinitionId). */\n @Property({ name: 'agent_id', type: 'varchar', length: 100 })\n agentId!: string\n\n @Property({ name: 'window_start', type: Date })\n windowStart!: Date\n\n @Property({ name: 'window_end', type: Date })\n windowEnd!: Date\n\n @Property({ name: 'computed_at', type: Date, onCreate: () => new Date() })\n computedAt: Date = new Date()\n\n /** override/eval-pass/approve-unchanged/latency/cost/count KPIs (validated by Zod). */\n @Property({ name: 'metrics', type: 'jsonb' })\n metrics!: unknown\n\n @Property({ name: 'created_at', type: Date, onCreate: () => new Date() })\n createdAt: Date = new Date()\n}\n\nexport type AgentRunSessionStatus = 'pending' | 'completed'\n\n/**\n * Cross-process correlation for an OpenCode file-agent run. The runner (app /\n * worker process) and the `submit_outcome` / `load_skill` / `run_skill_script`\n * MCP tools (separate `mcp:serve-http` process) do NOT share memory, so the\n * active-agent + captured-outcome handoff cannot live in an in-process Map. This\n * row, keyed by the per-run session token, is the shared store both processes\n * reach: the runner `open`s it before sending; `submit_outcome` resolves the\n * active agent from it and writes the validated `outcome`; the runner polls for\n * the completed outcome and `dispose`s the row when the run ends.\n */\n@Entity({ tableName: 'agent_run_sessions' })\n@Index({ name: 'agent_run_sessions_token_idx', properties: ['sessionToken'] })\nexport class AgentRunSession {\n [OptionalProps]?: 'runId' | 'outcome' | 'status' | 'createdAt' | 'updatedAt'\n\n @PrimaryKey({ type: 'uuid', defaultRaw: 'gen_random_uuid()' })\n id!: string\n\n /** The per-run session token the runner minted = the correlation key (unique). */\n @Property({ name: 'session_token', type: 'varchar', length: 100, unique: true })\n sessionToken!: string\n\n @Property({ name: 'agent_id', type: 'varchar', length: 100 })\n agentId!: string\n\n @Property({ name: 'run_id', type: 'uuid', nullable: true })\n runId?: string | null\n\n @Property({ name: 'tenant_id', type: 'uuid' })\n tenantId!: string\n\n @Property({ name: 'organization_id', type: 'uuid' })\n organizationId!: string\n\n /** The validated outcome captured by `submit_outcome`, once it arrives. */\n @Property({ name: 'outcome', type: 'jsonb', nullable: true })\n outcome?: unknown | null\n\n @Property({ name: 'status', type: 'varchar', length: 20, default: 'pending' })\n status: AgentRunSessionStatus = 'pending'\n\n @Property({ name: 'created_at', type: Date, onCreate: () => new Date() })\n createdAt: Date = new Date()\n\n @Property({ name: 'updated_at', type: Date, onCreate: () => new Date(), onUpdate: () => new Date() })\n updatedAt: Date = new Date()\n}\n\nexport type GuardrailPhase = 'input' | 'output'\n\nexport type GuardrailKind =\n | 'prompt_injection'\n | 'pii'\n | 'grounding'\n | 'schema'\n | 'moderation'\n | 'tool_scope'\n\nexport type GuardrailResult = 'pass' | 'warn' | 'block'\n\n/**\n * Append-only audit of every runtime guardrail check (omits `updated_at`/\n * `deleted_at`). One row per check per phase; `guardResults` on the AgentProposal\n * carries the same verdict for fast read. `evidence` holds REDACTED data only\n * (pointers/offsets into the encrypted artifact store) \u2014 never raw PII. Shape is\n * enforced by the Zod schema in data/validators.ts. Other modules referenced by\n * FK id only (agentRunId, proposalId).\n */\n@Entity({ tableName: 'agent_guardrail_checks' })\n@Index({ name: 'agent_guardrail_checks_tenant_org_idx', properties: ['tenantId', 'organizationId'] })\n@Index({ name: 'agent_guardrail_checks_run_idx', properties: ['agentRunId', 'createdAt'] })\n@Index({ name: 'agent_guardrail_checks_proposal_idx', properties: ['proposalId'] })\nexport class AgentGuardrailCheck {\n [OptionalProps]?: 'result' | 'evidence' | 'proposalId' | 'createdAt'\n\n @PrimaryKey({ type: 'uuid', defaultRaw: 'gen_random_uuid()' })\n id!: string\n\n @Property({ name: 'tenant_id', type: 'uuid' })\n tenantId!: string\n\n @Property({ name: 'organization_id', type: 'uuid' })\n organizationId!: string\n\n /** FK id \u2192 agent_runs; NOT an ORM relation. */\n @Property({ name: 'agent_run_id', type: 'uuid' })\n agentRunId!: string\n\n /** FK id \u2192 agent_proposals (null for pre-call input checks). */\n @Property({ name: 'proposal_id', type: 'uuid', nullable: true })\n proposalId?: string | null\n\n /** Which versioned set produced this verdict. */\n @Property({ name: 'guardrail_set_version', type: 'varchar', length: 64 })\n guardrailSetVersion!: string\n\n @Property({ name: 'capability', type: 'varchar', length: 100 })\n capability!: string\n\n @Property({ name: 'phase', type: 'varchar', length: 10 })\n phase!: GuardrailPhase\n\n @Property({ name: 'kind', type: 'varchar', length: 30 })\n kind!: GuardrailKind\n\n @Property({ name: 'result', type: 'varchar', length: 10, default: 'pass' })\n result: GuardrailResult = 'pass'\n\n /**\n * Redacted evidence ONLY \u2014 never raw PII; pointers/offsets into the encrypted\n * artifact store (trace spec) rather than plaintext spans. Shape enforced by a\n * Zod schema in data/validators.ts.\n */\n @Property({ name: 'evidence', type: 'jsonb', nullable: true })\n evidence?: unknown | null\n\n @Property({ name: 'created_at', type: Date, onCreate: () => new Date() })\n createdAt: Date = new Date()\n}\n\n/**\n * A versioned guardrail SET for one capability (Wave 3, Phase 4 \u2014 grounding).\n * Append-only by version (omits `updated_at`/`deleted_at`): each row pins a\n * capability's policy body under a CONTENT-HASH `version`. The grounding sync\n * (setup.ts `seedDefaults`) upserts one row per `(organizationId, capability,\n * version)` \u2014 re-syncing an unchanged body is a no-op (idempotent), and editing\n * the body produces a new content-hash \u2192 a new append-only version. The\n * `guardrailSetVersion` recorded on every grounding `AgentGuardrailCheck` is this\n * `version`, so a verdict is replayable against the exact policy that produced it.\n * Other modules referenced by FK id only.\n */\n@Entity({ tableName: 'agent_guardrail_sets' })\n@Index({ name: 'agent_guardrail_sets_tenant_org_idx', properties: ['tenantId', 'organizationId'] })\n@Index({ name: 'agent_guardrail_sets_capability_idx', properties: ['organizationId', 'capability'] })\n@Unique({ name: 'agent_guardrail_sets_version_uq', properties: ['organizationId', 'capability', 'version'] })\nexport class AgentGuardrailSet {\n [OptionalProps]?: 'createdAt'\n\n @PrimaryKey({ type: 'uuid', defaultRaw: 'gen_random_uuid()' })\n id!: string\n\n @Property({ name: 'tenant_id', type: 'uuid' })\n tenantId!: string\n\n @Property({ name: 'organization_id', type: 'uuid' })\n organizationId!: string\n\n @Property({ name: 'capability', type: 'varchar', length: 100 })\n capability!: string\n\n /** Content-hash of the canonical set body \u2014 the durable version key. */\n @Property({ name: 'version', type: 'varchar', length: 64 })\n version!: string\n\n /** The grounding policy body. Shape enforced by Zod in data/validators.ts. */\n @Property({ name: 'body', type: 'jsonb' })\n body!: unknown\n\n @Property({ name: 'created_at', type: Date, onCreate: () => new Date() })\n createdAt: Date = new Date()\n}\n\n/**\n * Which authentication path an agent principal uses (agent identity spec).\n * `internal` = in-process `INVOKE_AGENT` step, NO network auth and NO interactive\n * credential (Phase 1; the only mode provisioned today). `oauth_client` =\n * net-new OAuth client-credentials `/token` server (Phase 3). `authmd` =\n * `auth.md` / ID-JAG self-registration (Phase 4). The non-`internal` modes are\n * declared here as forward-compatible seams; only `internal` is provisioned now.\n */\nexport type AgentCredentialMode = 'internal' | 'oauth_client' | 'authmd'\n\n/**\n * Links an AI agent to its provisioned non-interactive `auth.User` (`kind='agent'`)\n * and a scoped, least-privilege `auth.Role`, so every agent action is attributed\n * to a concrete user id through the same Command/CRUD/ACL/audit pipeline as a\n * human (agent identity & on-behalf-of spec, Wave 4 Phase 1). Editable (revoke /\n * disable) \u2192 carries `updated_at` for optimistic locking. Other modules\n * (`auth.User`, `auth.Role`, the agent definition) are referenced by FK id only \u2014\n * NOT as ORM relations \u2014 per the cross-module decoupling rule.\n */\n// One LIVE principal per (organization_id, agent_definition_id) is enforced by a\n// partial unique index (`agent_principals_org_agent_uq`) over live rows\n// (`WHERE deleted_at IS NULL`), created by raw SQL in Migration20260625050000. A\n// `@Unique` decorator can't express a partial index (it would block re-provisioning\n// after a soft-delete), so it is declared via `@Index({ expression })` \u2014 the\n// repo's partial-index convention (cf. `agent_runs_eval_failed_idx`) \u2014 which\n// keeps `db:generate` snapshot-aware of it instead of emitting a drop each run.\n@Entity({ tableName: 'agent_principals' })\n@Index({ name: 'agent_principals_tenant_org_idx', properties: ['tenantId', 'organizationId'] })\n@Index({ name: 'agent_principals_user_idx', properties: ['userId'] })\n@Index({\n name: 'agent_principals_org_agent_uq',\n expression:\n `create unique index \"agent_principals_org_agent_uq\" on \"agent_principals\" (\"organization_id\", \"agent_definition_id\") where \"deleted_at\" is null`,\n})\nexport class AgentPrincipal {\n [OptionalProps]?: 'credentialMode' | 'enabled' | 'createdAt' | 'updatedAt' | 'deletedAt'\n\n @PrimaryKey({ type: 'uuid', defaultRaw: 'gen_random_uuid()' })\n id!: string\n\n @Property({ name: 'tenant_id', type: 'uuid' })\n tenantId!: string\n\n @Property({ name: 'organization_id', type: 'uuid' })\n organizationId!: string\n\n /** FK id \u2192 auth.User (kind='agent'); NOT an ORM relation. */\n @Property({ name: 'user_id', type: 'uuid' })\n userId!: string\n\n /** FK id \u2192 the agent definition (the `defineAgent`/file-agent id). */\n @Property({ name: 'agent_definition_id', type: 'varchar', length: 100 })\n agentDefinitionId!: string\n\n /** FK id \u2192 auth.Role (scoped, least privilege); NOT an ORM relation. */\n @Property({ name: 'role_id', type: 'uuid' })\n roleId!: string\n\n /** Selects the auth path explicitly; only `internal` is provisioned in Phase 1. */\n @Property({ name: 'credential_mode', type: 'varchar', length: 20, default: 'internal' })\n credentialMode: AgentCredentialMode = 'internal'\n\n @Property({ name: 'enabled', type: 'boolean', default: true })\n enabled: boolean = true\n\n @Property({ name: 'created_at', type: Date, onCreate: () => new Date() })\n createdAt: Date = new Date()\n\n @Property({ name: 'updated_at', type: Date, onCreate: () => new Date(), onUpdate: () => new Date() })\n updatedAt: Date = new Date()\n\n @Property({ name: 'deleted_at', type: Date, nullable: true })\n deletedAt?: Date | null\n}\n\n/**\n * An external agent's delegation grant (agent identity & on-behalf-of spec, Wave 4\n * Phase 3). Links an external `AgentPrincipal` (`credentialMode='oauth_client'`)\n * to the human delegator + the scopes it may mint OAuth client-credentials tokens\n * for, and is the per-request REVOCATION spine: the `/token` server refuses to\n * mint while every minted token re-checks `revokedAt`/`expiresAt` on the NEXT\n * write, so revoking stops further agent action immediately rather than at token\n * expiry. The `issuer`/`subject`/`audience` columns are forward-compatible seams\n * for the later `auth.md`/ID-JAG path (Phase 4) \u2014 null for the OAuth-now path, so\n * the same record bridges both with no schema change. Editable (revoke) \u2192 carries\n * `updated_at` for optimistic locking. Dual tenancy (tenant_id + organization_id);\n * reads filter by organization_id. Other modules (`auth.User`, the agent\n * principal) are referenced by FK id only \u2014 NOT as ORM relations.\n */\n@Entity({ tableName: 'agent_delegation_grants' })\n@Index({ name: 'agent_delegation_grants_tenant_org_idx', properties: ['tenantId', 'organizationId'] })\n@Index({ name: 'agent_delegation_grants_principal_idx', properties: ['organizationId', 'agentPrincipalId'] })\nexport class AgentDelegationGrant {\n [OptionalProps]?: 'delegatorUserId' | 'expiresAt' | 'revokedAt' | 'revokedByUserId'\n | 'issuer' | 'subject' | 'audience' | 'createdAt' | 'updatedAt' | 'deletedAt'\n\n @PrimaryKey({ type: 'uuid', defaultRaw: 'gen_random_uuid()' })\n id!: string\n\n @Property({ name: 'tenant_id', type: 'uuid' })\n tenantId!: string\n\n @Property({ name: 'organization_id', type: 'uuid' })\n organizationId!: string\n\n /** FK id \u2192 agent_principals (the external principal); NOT an ORM relation. */\n @Property({ name: 'agent_principal_id', type: 'uuid' })\n agentPrincipalId!: string\n\n /** FK id \u2192 the agent principal's `auth.User` (actor on every attributed write). */\n @Property({ name: 'agent_user_id', type: 'uuid' })\n agentUserId!: string\n\n /** FK id \u2192 auth.User \u2014 the human delegating authority; null for system grants. */\n @Property({ name: 'delegator_user_id', type: 'uuid', nullable: true })\n delegatorUserId?: string | null\n\n /** `<capability>:<action>` scopes the minted token may carry. */\n @Property({ name: 'scopes', type: 'jsonb' })\n scopes!: string[]\n\n /** Optional hard expiry; tokens never outlive this even before revocation. */\n @Property({ name: 'expires_at', type: Date, nullable: true })\n expiresAt?: Date | null\n\n /** When set, every token bound to this grant is denied on its next request. */\n @Property({ name: 'revoked_at', type: Date, nullable: true })\n revokedAt?: Date | null\n\n /** FK id \u2192 auth.User who revoked the grant. */\n @Property({ name: 'revoked_by_user_id', type: 'uuid', nullable: true })\n revokedByUserId?: string | null\n\n /** Forward-compatible ID-JAG seam (Phase 4); null for the OAuth-now path. */\n @Property({ name: 'issuer', type: 'varchar', length: 500, nullable: true })\n issuer?: string | null\n\n @Property({ name: 'subject', type: 'varchar', length: 500, nullable: true })\n subject?: string | null\n\n @Property({ name: 'audience', type: 'varchar', length: 500, nullable: true })\n audience?: string | null\n\n @Property({ name: 'created_at', type: Date, onCreate: () => new Date() })\n createdAt: Date = new Date()\n\n @Property({ name: 'updated_at', type: Date, onCreate: () => new Date(), onUpdate: () => new Date() })\n updatedAt: Date = new Date()\n\n @Property({ name: 'deleted_at', type: Date, nullable: true })\n deletedAt?: Date | null\n}\n\nexport type AgentProposalDisposition =\n | 'pending' | 'auto_approved' | 'approved' | 'edited' | 'rejected' | 'none_proposed'\n\n/**\n * Why an auto-approval that cleared its threshold was still routed to a human \u2014\n * the gate the policy layer answered `review` on (`lib/disposition/autoApprovalPolicy.ts`).\n * Recorded ONLY when the proposal cleared what it was measured against and was\n * held anyway; a proposal that simply did not clear needs no explanation.\n */\nexport type AgentProposalAutoDispositionBlock =\n | 'near_tie'\n | 'risk'\n | 'guardrail'\n | 'trace_incomplete'\n | 'policy'\n\nexport type AgentProposalSource = 'runtime' | 'eval'\n\n@Entity({ tableName: 'agent_proposals' })\n@Index({ name: 'agent_proposals_tenant_org_idx', properties: ['tenantId', 'organizationId'] })\n@Index({ name: 'agent_proposals_run_idx', properties: ['organizationId', 'runId'] })\n@Index({ name: 'agent_proposals_org_disposition_created_idx', properties: ['organizationId', 'disposition', 'createdAt'] })\nexport class AgentProposal {\n [OptionalProps]?: 'source' | 'disposition' | 'dispositionBy' | 'dispositionReason'\n | 'workflowInstanceId' | 'stepId' | 'userTaskId' | 'confidence' | 'guardResults' | 'createdAt'\n | 'updatedAt' | 'deletedAt' | 'selectedOptionId' | 'autoDispositionBlock'\n\n @PrimaryKey({ type: 'uuid', defaultRaw: 'gen_random_uuid()' })\n id!: string\n\n @Property({ name: 'tenant_id', type: 'uuid' })\n tenantId!: string\n\n @Property({ name: 'organization_id', type: 'uuid' })\n organizationId!: string\n\n @Property({ name: 'agent_id', type: 'varchar', length: 100 })\n agentId!: string\n\n @Property({ name: 'run_id', type: 'uuid' })\n runId!: string\n\n /** FK id \u2192 workflows instance (no cross-module ORM relation). */\n @Property({ name: 'workflow_instance_id', type: 'uuid', nullable: true })\n workflowInstanceId?: string | null\n\n @Property({ name: 'step_id', type: 'varchar', length: 100, nullable: true })\n stepId?: string | null\n\n /**\n * The workflows `UserTask` raised for this proposal's human review, when one\n * was raised (spec \u00A77.5 / A7).\n *\n * An FK-by-id to another module's row, never an ORM relation. It exists so a\n * disposition can CLOSE the review task it created: without it the task\n * outlives the decision and sits in the operator's inbox as work that has\n * already been done. Null on every auto-approved proposal (no task is ever\n * raised) and on every row written before this column existed.\n */\n @Property({ name: 'user_task_id', type: 'uuid', nullable: true })\n userTaskId?: string | null\n\n @Property({ name: 'payload', type: 'jsonb' })\n payload!: unknown\n\n @Property({ name: 'confidence', type: 'float', nullable: true })\n confidence?: number | null\n\n /**\n * The guardrail verdict's `checks` array attached at proposal creation (output\n * phase). Append-only audit lives in `agent_guardrail_checks`; this is the fast\n * read carried on the proposal. Validated by the Zod schema in data/validators.ts.\n */\n @Property({ name: 'guard_results', type: 'jsonb', nullable: true })\n guardResults?: unknown | null\n\n /**\n * Where this proposal came from. `eval` marks a proposal produced by an eval\n * replay: it is a real record of what the agent proposed, but it must never\n * reach the operator caseload and must never be disposed. Defaults to `runtime`\n * so every pre-existing row keeps its current meaning.\n */\n @Property({ name: 'source', type: 'varchar', length: 20, default: 'runtime' })\n source: AgentProposalSource = 'runtime'\n\n @Property({ name: 'disposition', type: 'varchar', length: 20, default: 'pending' })\n disposition: AgentProposalDisposition = 'pending'\n\n @Property({ name: 'disposition_by', type: 'varchar', length: 100, nullable: true })\n dispositionBy?: string | null\n\n @Property({ name: 'disposition_reason', type: 'text', nullable: true })\n dispositionReason?: string | null\n\n /**\n * Which of `payload.options` the disposition selected. Set on approve/edit (and on\n * the rule-driven auto-approve, which selects the leader); null on reject, on a\n * pending proposal, and on every row written before the envelope existed.\n */\n @Property({ name: 'selected_option_id', type: 'varchar', length: 100, nullable: true })\n selectedOptionId?: string | null\n\n /**\n * Why an auto-approval that cleared its threshold was still held for a human.\n * Distinct from `dispositionReason`, which carries the OPERATOR's words.\n */\n @Property({ name: 'auto_disposition_block', type: 'varchar', length: 20, nullable: true })\n autoDispositionBlock?: AgentProposalAutoDispositionBlock | null\n\n @Property({ name: 'created_at', type: Date, onCreate: () => new Date() })\n createdAt: Date = new Date()\n\n @Property({ name: 'updated_at', type: Date, onCreate: () => new Date(), onUpdate: () => new Date() })\n updatedAt: Date = new Date()\n\n @Property({ name: 'deleted_at', type: Date, nullable: true })\n deletedAt?: Date | null\n}\n\n/**\n * The single durable artifact of a Task-Driven Context Routing (TDCR) assembly \u2014\n * the evidence record of *what an agent saw* for one `INVOKE_AGENT` run. Append-only\n * (omits `updated_at`/`deleted_at`) per conventions \u00A73.2: it is immutable evidence\n * read by the trace inspector (routed vs. pruned + token usage), the guardrails\n * grounding check (cited snippets), and compliance lineage (fact \u2192 evidence).\n *\n * `routedSources`/`prunedSources`/`sources`/`redactionApplied` jsonb shapes are\n * enforced by Zod in data/validators.ts (`contextBundleRoutedSourcesSchema` etc.).\n * Other modules referenced by FK id only (agentRunId, workflowInstanceId).\n */\n@Entity({ tableName: 'agent_context_bundles' })\n@Index({ name: 'agent_context_bundles_tenant_org_idx', properties: ['tenantId', 'organizationId'] })\n@Index({ name: 'agent_context_bundles_run_idx', properties: ['agentRunId'] })\nexport class AgentContextBundle {\n [OptionalProps]?: 'workflowInstanceId' | 'stepId' | 'prunedSources' | 'redactionApplied' | 'payloadRef' | 'createdAt'\n\n @PrimaryKey({ type: 'uuid', defaultRaw: 'gen_random_uuid()' })\n id!: string\n\n @Property({ name: 'tenant_id', type: 'uuid' })\n tenantId!: string\n\n @Property({ name: 'organization_id', type: 'uuid' })\n organizationId!: string\n\n /** FK id \u2192 agent_runs; NOT an ORM relation. */\n @Property({ name: 'agent_run_id', type: 'uuid' })\n agentRunId!: string\n\n /** FK id \u2192 workflows process instance (null for standalone runs). */\n /** FK id \u2192 workflows instance (no cross-module ORM relation). */\n @Property({ name: 'workflow_instance_id', type: 'uuid', nullable: true })\n workflowInstanceId?: string | null\n\n @Property({ name: 'step_id', type: 'varchar', length: 100, nullable: true })\n stepId?: string | null\n\n @Property({ name: 'capability', type: 'varchar', length: 100 })\n capability!: string\n\n /**\n * Selected & packed sources: `{ kind, ref, locator?, tokens, score? }[]`. The\n * mandatory floor is always present here. Shape enforced by Zod.\n */\n @Property({ name: 'routed_sources', type: 'jsonb' })\n routedSources!: unknown\n\n /**\n * Excluded candidates with a reason (over budget / out of scope):\n * `{ kind, ref, reason }[]`. Records the optional-fill variance for audit.\n */\n @Property({ name: 'pruned_sources', type: 'jsonb', nullable: true })\n prunedSources?: unknown | null\n\n /** Provenance: `{ factId, sourceKind, sourceRef, locator? }[]` (\u2192 lineage). */\n @Property({ name: 'sources', type: 'jsonb' })\n sources!: unknown\n\n @Property({ name: 'token_budget', type: 'integer' })\n tokenBudget!: number\n\n @Property({ name: 'tokens_used', type: 'integer' })\n tokensUsed!: number\n\n /** `{ field, rule }[]` redacted before the agent saw it (P4 populates richer rules). */\n @Property({ name: 'redaction_applied', type: 'jsonb', nullable: true })\n redactionApplied?: unknown | null\n\n /** storage-s3 ref to the packed context payload (P4 offloads the full payload). */\n @Property({ name: 'payload_ref', type: 'varchar', length: 500, nullable: true })\n payloadRef?: string | null\n\n @Property({ name: 'created_at', type: Date, onCreate: () => new Date() })\n createdAt: Date = new Date()\n}\n\n/**\n * The AUTHORED business definition of a process (business-process \u2194 workflow\n * unification spec, 2026-09-06): what the process is FOR. It POINTS AT a\n * `workflows` definition and never restates its execution semantics \u2014 sequence,\n * retry, timers, waits, signals, branches and failure handling all belong to the\n * workflow, which is the single lifecycle owner of every execution.\n *\n * There is deliberately no agent target. A single-agent process materializes a\n * real `START \u2192 INVOKE_AGENT \u2192 END` workflow definition instead\n * (`lib/processes/materializeAgentWorkflow.ts`), so one engine runs everything\n * and the user can grow the process by editing it in the Studio.\n *\n * Execution identity is likewise NOT here: the bound `WorkflowDefinition` owns\n * `grantedFeatures` and the least-privilege `auth` principal core provisions from\n * it. `ProcessInstance.triggeredBy` records the INVOKER, which is provenance and\n * never an ACL identity \u2014 permission to start a process is not the permission set\n * the process runs with.\n *\n * User-editable \u2192 carries `updated_at` for optimistic locking (default ON).\n */\n@Entity({ tableName: 'process_definitions' })\n@Index({ name: 'process_definitions_tenant_org_idx', properties: ['tenantId', 'organizationId'] })\n@Index({ name: 'process_definitions_workflow_idx', properties: ['organizationId', 'workflowId'] })\n// The event dispatcher's lookup is a containment probe over this jsonb\n// (`triggers @> '[{\"kind\":\"event\",\"eventPattern\":\"claims.claim.reported\"}]'`).\n// `jsonb_path_ops` is the smaller, faster opclass and supports exactly the `@>`\n// operator that probe uses. Declared via `@Index({ expression })` so\n// `db:generate` stays aware of it.\n@Index({\n name: 'process_definitions_triggers_gin',\n expression:\n `create index \"process_definitions_triggers_gin\" on \"process_definitions\" using gin (\"triggers\" jsonb_path_ops)`,\n})\nexport class ProcessDefinition {\n [OptionalProps]?:\n | 'description'\n | 'inputDefaults'\n | 'inputSchema'\n | 'outcomeSchema'\n | 'triggers'\n | 'milestones'\n | 'uiMetadata'\n | 'enabled'\n | 'createdBy'\n | 'createdAt'\n | 'updatedAt'\n | 'deletedAt'\n\n @PrimaryKey({ type: 'uuid', defaultRaw: 'gen_random_uuid()' })\n id!: string\n\n @Property({ name: 'tenant_id', type: 'uuid' })\n tenantId!: string\n\n @Property({ name: 'organization_id', type: 'uuid' })\n organizationId!: string\n\n @Property({ name: 'name', type: 'varchar', length: 255 })\n name!: string\n\n @Property({ name: 'description', type: 'text', nullable: true })\n description?: string | null\n\n /**\n * `WorkflowDefinition.workflowId` \u2014 FK id only, never an ORM relation. REQUIRED:\n * a business process with no workflow has no execution engine, which is the\n * exact split this model removes.\n */\n @Property({ name: 'workflow_id', type: 'varchar', length: 150 })\n workflowId!: string\n\n /** Default input merged under the run-time input; encrypted (encryption.ts). */\n @Property({ name: 'input_defaults', type: 'jsonb', nullable: true })\n inputDefaults?: unknown | null\n\n /** Optional JSON-Schema (OUTCOME-compatible subset) validating start input. */\n @Property({ name: 'input_schema', type: 'jsonb', nullable: true })\n inputSchema?: unknown | null\n\n /**\n * Optional JSON-Schema describing the BUSINESS outcome a completed execution\n * produces. Documentation and validation of `ProcessInstance.outcome_*`, not a\n * completion requirement: a research or monitoring process produces nothing and\n * completes perfectly validly.\n */\n @Property({ name: 'outcome_schema', type: 'jsonb', nullable: true })\n outcomeSchema?: unknown | null\n\n /**\n * The declared entry points (`ProcessTrigger[]`, `.max(20)`): `schedule`,\n * `event` and `manual` \u2014 which makes hand-starting a declared capability rather\n * than an undocumented one. A definition with no `manual` trigger 403s on the\n * start route. Every kind converges on ONE command that starts a workflow.\n */\n @Property({ name: 'triggers', type: 'jsonb', nullable: true, default: '[]' })\n triggers?: ProcessTrigger[] | null\n\n /**\n * The declared milestone VOCABULARY (`ProcessMilestone[]`, `.max(50)`):\n * `{ key, label, order }`. A milestone is a business EVENT the workflow emits\n * (a step declares `milestone: '<key>'` in its advanced config), NOT an alias\n * for a step \u2014 so a stage can be reached after a parallel join, after a retry,\n * or after ten steps, and the business reader never learns there were branches.\n * A declared key no step emits is a WARNING, never an error: a definition\n * mid-edit must stay saveable.\n */\n @Property({ name: 'milestones', type: 'jsonb', nullable: true, default: '[]' })\n milestones?: ProcessMilestone[] | null\n\n /** Optional presentation hints (icon, accent, column preferences). Display only. */\n @Property({ name: 'ui_metadata', type: 'jsonb', nullable: true })\n uiMetadata?: unknown | null\n\n @Property({ name: 'enabled', type: 'boolean', default: true })\n enabled: boolean = true\n\n /** FK id \u2192 auth.users; the admin who created the definition. */\n @Property({ name: 'created_by', type: 'uuid', nullable: true })\n createdBy?: string | null\n\n @Property({ name: 'created_at', type: Date, onCreate: () => new Date() })\n createdAt: Date = new Date()\n\n @Property({ name: 'updated_at', type: Date, onCreate: () => new Date(), onUpdate: () => new Date() })\n updatedAt: Date = new Date()\n\n @Property({ name: 'deleted_at', type: Date, nullable: true })\n deletedAt?: Date | null\n}\n\n/** Derived display status of a `ProcessInstance` (first match wins \u2014 see `deriveProcessStatus`). */\nexport type ProcessInstanceStatus =\n | 'running'\n | 'waiting_on_you'\n | 'question_open'\n | 'docs_requested'\n | 'fraud_hold'\n | 'auto_completing'\n | 'auto_completed'\n | 'completed'\n | 'failed'\n | 'cancelled'\n\n/**\n * The business-facing READ MODEL of one execution \u2014 ONE row per\n * `WorkflowInstance`. It is a PROJECTION and decides nothing: the workflow\n * instance is the single lifecycle owner, and every field here is recomputed\n * from that instance, this module's own run/proposal rows and the milestone\n * events, by an idempotent recompute-from-source service\n * (`lib/processes/processProjection.ts`, rebuildable via the\n * `rebuild-processes` CLI).\n *\n * `status` is DERIVED. There is deliberately no second status column in the\n * system: the predecessor model kept one here and another on the deleted\n * `agent_process_runs` ledger, and the two could disagree on redelivery, on a\n * crash between the writes, or while an instance parked at a USER_TASK.\n *\n * The row is created BEFORE the instance exists (the start command writes it,\n * then the worker starts the workflow and stamps `workflow_instance_id`), which\n * is what lets the business-execution idempotency key live here: the partial\n * unique index below is the lock that makes one key produce exactly one\n * `WorkflowInstance`, no matter how many callers race.\n *\n * Filter-driving subject facets (`subject_type`/`subject_value_minor`/\n * `subject_fraud`) are deliberately PLAINTEXT typed columns (SQL-filterable);\n * only the free-text `subject_title` and the `input`/`failure_reason` pair are\n * encrypted (encryption.ts). Other modules are referenced by FK id only.\n */\n@Entity({ tableName: 'process_instances' })\n@Index({ name: 'process_instances_tenant_org_idx', properties: ['tenantId', 'organizationId'] })\n@Index({ name: 'process_instances_status_idx', properties: ['organizationId', 'status', 'lastActivityAt'] })\n@Index({ name: 'process_instances_value_idx', properties: ['organizationId', 'subjectValueMinor'] })\n@Index({ name: 'process_instances_definition_idx', properties: ['processDefinitionId', 'createdAt'] })\n@Index({ name: 'process_instances_source_idx', properties: ['sourceEntityType', 'sourceEntityId'] })\n// One LIVE projection per (tenant, org, workflow instance) \u2014 the 1:1 that makes\n// this a projection rather than a second execution record.\n@Index({\n name: 'process_instances_workflow_instance_uq',\n expression:\n `create unique index \"process_instances_workflow_instance_uq\" on \"process_instances\" (\"tenant_id\", \"organization_id\", \"workflow_instance_id\") where \"deleted_at\" is null and \"workflow_instance_id\" is not null`,\n})\n// The BUSINESS-EXECUTION idempotency lock: one (definition, key) can never\n// produce two executions, and therefore never two workflow instances.\n@Index({\n name: 'process_instances_idempotency_uq',\n expression:\n `create unique index \"process_instances_idempotency_uq\" on \"process_instances\" (\"organization_id\", \"process_definition_id\", \"idempotency_key\") where \"idempotency_key\" is not null`,\n})\nexport class ProcessInstance {\n [OptionalProps]?: 'processDefinitionId' | 'workflowInstanceId' | 'workflowId' | 'workflowVersion'\n | 'triggeredBy' | 'idempotencyKey' | 'input' | 'sourceEntityType' | 'sourceEntityId'\n | 'subjectType' | 'subjectId' | 'subjectLabel' | 'subjectTitle' | 'subjectFacets'\n | 'subjectValueMinor' | 'subjectFraud'\n | 'status' | 'currentStage' | 'milestonesReached' | 'agentIds' | 'costMinor' | 'currency'\n | 'runCount' | 'pendingProposalCount'\n | 'outcomeType' | 'outcomeId' | 'outcomeLabel' | 'failureReason'\n | 'assigneeUserId' | 'teamId' | 'waitingSince' | 'lastActivityAt' | 'completedAt'\n | 'createdAt' | 'updatedAt' | 'deletedAt'\n\n @PrimaryKey({ type: 'uuid', defaultRaw: 'gen_random_uuid()' })\n id!: string\n\n @Property({ name: 'tenant_id', type: 'uuid' })\n tenantId!: string\n\n @Property({ name: 'organization_id', type: 'uuid' })\n organizationId!: string\n\n /**\n * FK id \u2192 `workflows` instance; NOT an ORM relation. Nullable only for the\n * window between the start command's insert and the worker stamping the\n * started instance \u2014 never null for an execution that is actually running.\n */\n @Property({ name: 'workflow_instance_id', type: 'uuid', nullable: true })\n workflowInstanceId?: string | null\n\n /**\n * FK id \u2192 process_definitions. NULLABLE BY DESIGN: an instance started\n * directly from the workflow Studio still projects here, it simply has no\n * business definition above it.\n */\n @Property({ name: 'process_definition_id', type: 'uuid', nullable: true })\n processDefinitionId?: string | null\n\n /** Denormalized workflow identity, so history survives a definition edit. */\n @Property({ name: 'workflow_id', type: 'varchar', length: 200, nullable: true })\n workflowId?: string | null\n\n @Property({ name: 'workflow_version', type: 'varchar', length: 50, nullable: true })\n workflowVersion?: string | null\n\n /**\n * WHICH declared trigger started it: `{ kind: 'schedule' }`, `{ kind: 'event',\n * ref: <eventPattern> }`, `{ kind: 'manual', ref: <userId> }`. The INVOKER\n * identity \u2014 provenance only, NEVER an ACL identity. The execution identity is\n * the bound workflow definition's own least-privilege principal.\n */\n @Property({ name: 'triggered_by', type: 'jsonb', nullable: true })\n triggeredBy?: ProcessRunTriggeredBy | null\n\n /** Business-execution idempotency key; unique per (org, definition) \u2014 see the index above. */\n @Property({ name: 'idempotency_key', type: 'varchar', length: 200, nullable: true })\n idempotencyKey?: string | null\n\n /** The resolved start input (defaults merged under the caller's); encrypted (encryption.ts). */\n @Property({ name: 'input', type: 'jsonb', nullable: true })\n input?: unknown | null\n\n /** Correlates to the triggering business record for cross-module launches. */\n @Property({ name: 'source_entity_type', type: 'varchar', length: 100, nullable: true })\n sourceEntityType?: string | null\n\n @Property({ name: 'source_entity_id', type: 'uuid', nullable: true })\n sourceEntityId?: string | null\n\n // \u2500\u2500 Subject (the business record this process is about) \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\n /** e.g. 'Motor' \u2014 TYPE column + filter. Plaintext: must be SQL-queryable. */\n @Property({ name: 'subject_type', type: 'varchar', length: 100, nullable: true })\n subjectType?: string | null\n\n /** Business record id (opaque; FK by value only). */\n @Property({ name: 'subject_id', type: 'varchar', length: 200, nullable: true })\n subjectId?: string | null\n\n /** e.g. 'CASE-2026-04417' \u2014 low-sensitivity ref kept plaintext for `q` search. */\n @Property({ name: 'subject_label', type: 'varchar', length: 200, nullable: true })\n subjectLabel?: string | null\n\n /**\n * Free-text, person-readable subject \u2014 encrypted (encryption.ts \u2192\n * `agent_orchestrator:process_instance`). Never SQL-filtered.\n */\n @Property({ name: 'subject_title', type: 'varchar', length: 300, nullable: true })\n subjectTitle?: string | null\n\n /** Claim value in minor units \u2014 High-value filter / value sort. Plaintext by design. */\n @Property({ name: 'subject_value_minor', type: 'bigint', nullable: true })\n subjectValueMinor?: number | null\n\n /** Fraud signal \u2014 Fraud-flagged filter. Plaintext by design. */\n @Property({ name: 'subject_fraud', type: 'boolean', nullable: true })\n subjectFraud?: boolean | null\n\n /** Non-filterable display extras only (never queried in SQL). Zod-validated. */\n @Property({ name: 'subject_facets', type: 'jsonb', nullable: true })\n subjectFacets?: unknown | null\n\n // \u2500\u2500 Derived display + aggregates \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\n @Property({ name: 'status', type: 'varchar', length: 30, default: 'running' })\n status: ProcessInstanceStatus = 'running'\n\n @Property({ name: 'current_stage', type: 'varchar', length: 100, nullable: true })\n currentStage?: string | null\n\n /**\n * The business milestones this execution has reached, in emission order\n * (`ProcessMilestoneReached[]`). Appended from the workflow's\n * `milestone_reached` events, idempotent per key \u2014 the business narrative,\n * carrying no step ids at all.\n */\n @Property({ name: 'milestones_reached', type: 'jsonb', nullable: true, default: '[]' })\n milestonesReached?: ProcessMilestoneReached[] | null\n\n /** Distinct agent ids that have run under this execution (AGENTS column). */\n @Property({ name: 'agent_ids', type: 'jsonb', nullable: true })\n agentIds?: string[] | null\n\n @Property({ name: 'cost_minor', type: 'bigint', nullable: true })\n costMinor?: number | null\n\n @Property({ name: 'currency', type: 'varchar', length: 3, nullable: true })\n currency?: string | null\n\n @Property({ name: 'run_count', type: 'integer', default: 0 })\n runCount: number = 0\n\n @Property({ name: 'pending_proposal_count', type: 'integer', default: 0 })\n pendingProposalCount: number = 0\n\n // \u2500\u2500 Outcome (what the BUSINESS execution produced) \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\n /**\n * Written when the workflow instance terminates, from the outcome the\n * terminating source DECLARED under its context `outcome` key. Nothing derives\n * one.\n *\n * Nullable BY DECISION, not by omission: a research or monitoring process\n * produces nothing and stays a valid completion, so an absent outcome is\n * NEVER a missing write.\n *\n * FK-id + snapshot per `packages/core/AGENTS.md` \u00A7 Cross-Module Coupling \u2014\n * `outcome_label` keeps the reference readable when the module that owns the\n * record is absent, and this is NEVER a cross-module ORM relation. Read\n * through `lib/tasks/outcome.ts`, never by touching the columns by hand.\n * Plaintext, like `subject_label`: a record reference, not free text.\n */\n @Property({ name: 'outcome_type', type: 'varchar', length: 150, nullable: true })\n outcomeType?: string | null\n\n @Property({ name: 'outcome_id', type: 'varchar', length: 200, nullable: true })\n outcomeId?: string | null\n\n @Property({ name: 'outcome_label', type: 'varchar', length: 200, nullable: true })\n outcomeLabel?: string | null\n\n /** May echo malformed input on validation failure; encrypted (encryption.ts). */\n @Property({ name: 'failure_reason', type: 'text', nullable: true })\n failureReason?: string | null\n\n // \u2500\u2500 Routing / SLA (mirrored from workflows for fast filtering) \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\n @Property({ name: 'assignee_user_id', type: 'uuid', nullable: true })\n assigneeUserId?: string | null\n\n @Property({ name: 'team_id', type: 'uuid', nullable: true })\n teamId?: string | null\n\n /** When the execution entered a human-waiting state (Stuck >24h filter). */\n @Property({ name: 'waiting_since', type: Date, nullable: true })\n waitingSince?: Date | null\n\n /** When the execution was entered (AGE column). */\n @Property({ name: 'opened_at', type: Date })\n openedAt!: Date\n\n @Property({ name: 'completed_at', type: Date, nullable: true })\n completedAt?: Date | null\n\n @Property({ name: 'last_activity_at', type: Date, onCreate: () => new Date() })\n lastActivityAt: Date = new Date()\n\n @Property({ name: 'created_at', type: Date, onCreate: () => new Date() })\n createdAt: Date = new Date()\n\n @Property({ name: 'updated_at', type: Date, onCreate: () => new Date(), onUpdate: () => new Date() })\n updatedAt: Date = new Date()\n\n @Property({ name: 'deleted_at', type: Date, nullable: true })\n deletedAt?: Date | null\n}\n\n/**\n * Per-(tenant, organization) presentation settings for an agent DEFINITION.\n * Agent definitions themselves are code/file-authored (see `defineAgent`), so\n * they are global and carry no per-tenant state \u2014 this table holds the tenant's\n * editable overrides for how an agent is presented in the cockpit. Today it\n * carries a single `icon` (a lucide icon name from `data/agentIcons.ts`) that\n * replaces the auto-generated initials avatar across the agent presentation\n * surfaces (agents list, overview \"Agent trust\" card, agent detail). Seeded\n * with sensible defaults in `setup.ts` \u2192 `seedDefaults`, idempotently.\n *\n * Editable \u2192 carries `updated_at` for optimistic locking. Keyed by the agent\n * definition id (a string like `deals.health_check`), referenced by id only \u2014\n * NOT an ORM relation \u2014 per the cross-module decoupling rule.\n */\n@Entity({ tableName: 'agent_settings' })\n@Index({ name: 'agent_settings_tenant_org_idx', properties: ['tenantId', 'organizationId'] })\n@Unique({ name: 'agent_settings_org_agent_uq', properties: ['tenantId', 'organizationId', 'agentId'] })\nexport class AgentSetting {\n [OptionalProps]?: 'icon' | 'tags' | 'createdAt' | 'updatedAt'\n\n @PrimaryKey({ type: 'uuid', defaultRaw: 'gen_random_uuid()' })\n id!: string\n\n @Property({ name: 'tenant_id', type: 'uuid' })\n tenantId!: string\n\n @Property({ name: 'organization_id', type: 'uuid' })\n organizationId!: string\n\n /** Agent DEFINITION id (e.g. `deals.health_check`). Not an FK \u2014 decoupled. */\n @Property({ name: 'agent_id', type: 'varchar', length: 100 })\n agentId!: string\n\n /** Lucide icon name from `AGENT_ICON_NAMES` (data/agentIcons.ts). Null = fall back to type glyph / initials. */\n @Property({ name: 'icon', type: 'varchar', length: 64, nullable: true })\n icon?: string | null\n\n /**\n * Free-form operator labels, normalized and deduped on write. Because the row\n * is keyed by agent id and not by an FK, tags survive an agent that is not in\n * the live registry (module uninstalled, agent renamed or turned off) and come\n * back with it.\n */\n @Property({ name: 'tags', type: 'jsonb', nullable: true })\n tags?: string[] | null\n\n @Property({ name: 'created_at', type: Date, onCreate: () => new Date() })\n createdAt: Date = new Date()\n\n @Property({ name: 'updated_at', type: Date, onCreate: () => new Date(), onUpdate: () => new Date() })\n updatedAt: Date = new Date()\n}\n\n// \u2500\u2500 File plane: agent-produced artifacts (attachments-in / artifacts-out) \u2500\u2500\u2500\u2500\u2500\n\n/** Where a captured artifact came from. `tool_output` is reserved for a future tool-file channel. */\nexport type AgentRunArtifactSource = 'agent_output' | 'tool_output'\n\n/**\n * One file an OpenCode file-agent produced in a run (scanned from the per-run\n * sandbox `out/` dir, hashed, and uploaded encrypted to `storage-s3`). Append-only\n * (immutable after capture, so no `updated_at`); keeps `deleted_at` for DSAR/erasure.\n * The file BYTES live in `storage-s3` (referenced by `storageKey`, encrypted at rest);\n * this row is inert metadata until an `attachments.attach_artifact` proposal is\n * approved and the effector materializes a durable `Attachment` (`promotedAttachmentId`).\n * Referenced by FK ids only (`runId`, `promotedAttachmentId`) \u2014 never an ORM relation.\n */\n@Entity({ tableName: 'agent_run_artifacts' })\n@Index({ name: 'agent_run_artifacts_tenant_org_idx', properties: ['tenantId', 'organizationId'] })\n@Index({ name: 'agent_run_artifacts_run_idx', properties: ['organizationId', 'runId'] })\n@Unique({ name: 'agent_run_artifacts_run_sha_uq', properties: ['runId', 'sha256', 'fileName'] })\nexport class AgentRunArtifact {\n [OptionalProps]?: 'source' | 'caption' | 'promotedAttachmentId' | 'createdAt' | 'deletedAt'\n\n @PrimaryKey({ type: 'uuid', defaultRaw: 'gen_random_uuid()' })\n id!: string\n\n @Property({ name: 'tenant_id', type: 'uuid' })\n tenantId!: string\n\n @Property({ name: 'organization_id', type: 'uuid' })\n organizationId!: string\n\n /** FK id \u2192 agent_runs; NOT an ORM relation. */\n @Property({ name: 'run_id', type: 'uuid' })\n runId!: string\n\n /** Sanitized basename produced by the agent (no path segments). Non-sensitive metadata. */\n @Property({ name: 'file_name', type: 'varchar', length: 255 })\n fileName!: string\n\n @Property({ name: 'mime_type', type: 'varchar', length: 150 })\n mimeType!: string\n\n @Property({ name: 'file_size', type: 'integer' })\n fileSize!: number\n\n @Property({ name: 'sha256', type: 'varchar', length: 64 })\n sha256!: string\n\n /** storage-s3 object key; bytes encrypted at rest. */\n @Property({ name: 'storage_key', type: 'varchar', length: 500 })\n storageKey!: string\n\n /** Agent-supplied description; encrypted (encryption.ts \u2192 `agent_orchestrator:agent_run_artifact`). */\n @Property({ name: 'caption', type: 'text', nullable: true })\n caption?: string | null\n\n @Property({ name: 'source', type: 'varchar', length: 20, default: 'agent_output' })\n source: AgentRunArtifactSource = 'agent_output'\n\n /** Set when an `attachments.attach_artifact` proposal is approved and the effector runs. */\n @Property({ name: 'promoted_attachment_id', type: 'uuid', nullable: true })\n promotedAttachmentId?: string | null\n\n @Property({ name: 'created_at', type: Date, onCreate: () => new Date() })\n createdAt: Date = new Date()\n\n @Property({ name: 'deleted_at', type: Date, nullable: true })\n deletedAt?: Date | null\n}\n\n// \u2500\u2500 Eval plane: suite runs and case runs \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\n\nexport type EvalSuiteTrigger = 'manual' | 'ci' | 'scheduled'\nexport type EvalSuiteStatus = 'queued' | 'running' | 'completed' | 'failed' | 'cancelled'\nexport type EvalSuiteOutcome = 'passed' | 'failed' | 'advisory'\n\n/**\n * One execution of an evaluation over a set of cases. Append-only (no\n * `updated_at`/`deleted_at`) and retained >=6 years: gate-run summaries are legal\n * records, not CI-log ephemera.\n *\n * `releaseId` is nullable so ONE entity serves both planes \u2014 an ad-hoc workbench\n * run has no release and pins no dataset snapshot, while a CI gate run has both.\n * Other modules referenced by FK id only.\n */\n@Entity({ tableName: 'agent_eval_suite_runs' })\n@Index({ name: 'agent_eval_suite_runs_tenant_org_idx', properties: ['tenantId', 'organizationId'] })\n@Index({ name: 'agent_eval_suite_runs_agent_idx', properties: ['organizationId', 'agentDefinitionId', 'createdAt'] })\n@Index({ name: 'agent_eval_suite_runs_release_idx', properties: ['releaseId', 'createdAt'] })\nexport class AgentEvalSuiteRun {\n [OptionalProps]?:\n | 'releaseId' | 'outcome' | 'evalSetVersion' | 'passScore' | 'scoreVariance'\n | 'safetyRegressions' | 'baselineSuiteRunId' | 'summary' | 'triggeredBy'\n | 'startedAt' | 'finishedAt' | 'errorCount' | 'createdAt'\n\n @PrimaryKey({ type: 'uuid', defaultRaw: 'gen_random_uuid()' })\n id!: string\n\n @Property({ name: 'tenant_id', type: 'uuid' })\n tenantId!: string\n\n @Property({ name: 'organization_id', type: 'uuid' })\n organizationId!: string\n\n /** The subject under test \u2014 the only field both planes always have. */\n @Property({ name: 'agent_definition_id', type: 'varchar', length: 100 })\n agentDefinitionId!: string\n\n /** FK id -> agent_releases (lifecycle spec). Null for ad-hoc workbench runs. */\n @Property({ name: 'release_id', type: 'uuid', nullable: true })\n releaseId?: string | null\n\n @Property({ name: 'trigger', type: 'varchar', length: 20 })\n trigger!: EvalSuiteTrigger\n\n @Property({ name: 'status', type: 'varchar', length: 20, default: 'queued' })\n status: EvalSuiteStatus = 'queued'\n\n @Property({ name: 'outcome', type: 'varchar', length: 12, nullable: true })\n outcome?: EvalSuiteOutcome | null\n\n /** Records the gate policy in force, so a stored result is self-describing. */\n @Property({ name: 'judge_may_gate', type: 'boolean' })\n judgeMayGate!: boolean\n\n @Property({ name: 'repeat_count', type: 'integer', default: 1 })\n repeatCount: number = 1\n\n @Property({ name: 'case_count', type: 'integer' })\n caseCount!: number\n\n /** Errored != failed: excluded from passScore and reported separately. */\n @Property({ name: 'error_count', type: 'integer', default: 0 })\n errorCount: number = 0\n\n /** Pinned dataset snapshot; null for ad-hoc runs. */\n @Property({ name: 'eval_set_version', type: 'varchar', length: 100, nullable: true })\n evalSetVersion?: string | null\n\n /** Mean over non-errored, non-skipped case runs. Null when nothing was measurable. */\n @Property({ name: 'pass_score', type: 'float', nullable: true })\n passScore?: number | null\n\n /** Null when repeatCount = 1 \u2014 variance is only meaningful across trials. */\n @Property({ name: 'score_variance', type: 'float', nullable: true })\n scoreVariance?: number | null\n\n /** Assertion keys that regressed vs the baseline; non-empty => the caller blocks. */\n @Property({ name: 'safety_regressions', type: 'jsonb', nullable: true })\n safetyRegressions?: unknown | null\n\n @Property({ name: 'baseline_suite_run_id', type: 'uuid', nullable: true })\n baselineSuiteRunId?: string | null\n\n /** Per-assertion pass/fail plus judge counts. Encrypted: may quote agent output. */\n @Property({ name: 'summary', type: 'jsonb', nullable: true })\n summary?: unknown | null\n\n /** `'ci'` or the invoking userId. */\n @Property({ name: 'triggered_by', type: 'varchar', length: 100, nullable: true })\n triggeredBy?: string | null\n\n @Property({ name: 'started_at', type: Date, nullable: true })\n startedAt?: Date | null\n\n @Property({ name: 'finished_at', type: Date, nullable: true })\n finishedAt?: Date | null\n\n @Property({ name: 'created_at', type: Date, onCreate: () => new Date() })\n createdAt: Date = new Date()\n}\n\nexport type EvalCaseRunStatus = 'pending' | 'running' | 'passed' | 'failed' | 'error' | 'skipped'\n\n/**\n * One case, executed once, inside a suite run. Append-only.\n *\n * `agentRunId` is the load-bearing link: every case run points at a REAL AgentRun\n * with real spans, tool calls, tokens and cost, so the existing trace inspector\n * works on eval runs with no new UI. It is null only when the run never started\n * (admission refused, agent unresolved), and such a case run produces no\n * AgentEvalResult rows \u2014 which is why AgentEvalResult.agent_run_id stays NOT NULL.\n */\n@Entity({ tableName: 'agent_eval_case_runs' })\n@Index({ name: 'agent_eval_case_runs_tenant_org_idx', properties: ['tenantId', 'organizationId'] })\n@Index({ name: 'agent_eval_case_runs_suite_idx', properties: ['suiteRunId', 'createdAt'] })\n@Index({ name: 'agent_eval_case_runs_case_idx', properties: ['evalCaseId', 'createdAt'] })\nexport class AgentEvalCaseRun {\n [OptionalProps]?:\n | 'agentRunId' | 'trialIndex' | 'status' | 'score' | 'passed'\n | 'latencyMs' | 'costMinor' | 'errorMessage' | 'createdAt'\n\n @PrimaryKey({ type: 'uuid', defaultRaw: 'gen_random_uuid()' })\n id!: string\n\n @Property({ name: 'tenant_id', type: 'uuid' })\n tenantId!: string\n\n @Property({ name: 'organization_id', type: 'uuid' })\n organizationId!: string\n\n /** FK id -> agent_eval_suite_runs. */\n @Property({ name: 'suite_run_id', type: 'uuid' })\n suiteRunId!: string\n\n /** FK id -> agent_eval_cases. */\n @Property({ name: 'eval_case_id', type: 'uuid' })\n evalCaseId!: string\n\n /** FK id -> agent_runs. Null when the run never started. */\n @Property({ name: 'agent_run_id', type: 'uuid', nullable: true })\n agentRunId?: string | null\n\n /** 0-based trial index when the suite runs each case more than once. */\n @Property({ name: 'trial_index', type: 'integer', default: 0 })\n trialIndex: number = 0\n\n @Property({ name: 'status', type: 'varchar', length: 20, default: 'pending' })\n status: EvalCaseRunStatus = 'pending'\n\n @Property({ name: 'score', type: 'float', nullable: true })\n score?: number | null\n\n /** Null means SKIPPED \u2014 excluded from both score and pass aggregation. */\n @Property({ name: 'passed', type: 'boolean', nullable: true })\n passed?: boolean | null\n\n @Property({ name: 'latency_ms', type: 'integer', nullable: true })\n latencyMs?: number | null\n\n @Property({ name: 'cost_minor', type: 'integer', nullable: true })\n costMinor?: number | null\n\n /** Encrypted: a failure message can quote model output. */\n @Property({ name: 'error_message', type: 'text', nullable: true })\n errorMessage?: string | null\n\n @Property({ name: 'created_at', type: Date, onCreate: () => new Date() })\n createdAt: Date = new Date()\n}\n"],
5
- "mappings": ";;;;;;;;;;AAAA,SAAS,qBAAqB;AAC9B,SAAS,QAAQ,OAAO,YAAY,UAAU,cAAc;AAuCzD;AADI,IAAM,WAAN,MAAe;AAAA,EAAf;AAwDL,kBAAyB;AA6GzB,kBAAyB;AAiCzB,qBAAkB,oBAAI,KAAK;AAG3B,qBAAkB,oBAAI,KAAK;AAAA;AAI7B;AAtKE;AAAA,EADC,WAAW,EAAE,MAAM,QAAQ,YAAY,oBAAoB,CAAC;AAAA,GAtClD,SAuCX;AAGA;AAAA,EADC,SAAS,EAAE,MAAM,aAAa,MAAM,OAAO,CAAC;AAAA,GAzClC,SA0CX;AAGA;AAAA,EADC,SAAS,EAAE,MAAM,mBAAmB,MAAM,OAAO,CAAC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 "sourcesContent": ["import { BigIntType, OptionalProps } from '@mikro-orm/core'\nimport { Entity, Index, PrimaryKey, Property, Unique } from '@mikro-orm/decorators/legacy'\nimport type {\n AgentType,\n ProcessMilestone,\n ProcessMilestoneReached,\n ProcessRunTriggeredBy,\n ProcessTrigger,\n} from './validators'\n\nexport type AgentRunStatus = 'running' | 'ok' | 'error' | 'cancelled'\n\n/** Distinguishes production traffic from eval replays across runs and proposals. */\nexport type AgentRunSource = 'runtime' | 'eval'\n\n/** Span kinds; OTel GenAI semantic conventions are the naming target for span attributes. */\nexport type AgentSpanKind = 'llm' | 'tool' | 'system'\nexport type AgentSpanStatus = 'ok' | 'error'\nexport type AgentToolCallStatus = 'ok' | 'error'\n\n@Entity({ tableName: 'agent_runs' })\n@Index({ name: 'agent_runs_tenant_org_idx', properties: ['tenantId', 'organizationId'] })\n@Index({ name: 'agent_runs_agent_idx', properties: ['organizationId', 'agentId'] })\n@Unique({ name: 'agent_runs_runtime_external_uq', properties: ['runtime', 'externalRunId'] })\n@Index({ name: 'agent_runs_agent_def_idx', properties: ['agentId', 'createdAt'] })\n@Index({ name: 'agent_runs_org_status_created_idx', properties: ['organizationId', 'status', 'createdAt'] })\n@Index({\n name: 'agent_runs_eval_failed_idx',\n expression:\n `create index \"agent_runs_eval_failed_idx\" on \"agent_runs\" (\"organization_id\", \"created_at\") where \"eval_passed\" = false`,\n})\n// One run per agent invocation, stated as an identity rather than guessed from\n// creation time. Partial so Playground/eval runs \u2014 which correlate to nothing \u2014\n// are unconstrained.\n@Index({\n name: 'agent_runs_invocation_uq',\n expression:\n `create unique index \"agent_runs_invocation_uq\" on \"agent_runs\" (\"workflow_instance_id\", \"step_id\", \"invocation_id\") where \"workflow_instance_id\" is not null and \"step_id\" is not null and \"invocation_id\" is not null`,\n})\nexport class AgentRun {\n [OptionalProps]?:\n | 'source'\n | 'status'\n | 'output'\n | 'resultKind'\n | 'agentType'\n | 'errorMessage'\n | 'parentRunId'\n | 'workflowInstanceId'\n | 'stepId'\n | 'invocationId'\n | 'proposalId'\n | 'agentVersion'\n | 'model'\n | 'runtime'\n | 'externalRunId'\n | 'confidence'\n | 'inputTokens'\n | 'outputTokens'\n | 'costMinor'\n | 'currency'\n | 'latencyMs'\n | 'evalScore'\n | 'evalPassed'\n | 'goldenCaseId'\n | 'goldenPassed'\n | 'contextRouting'\n | 'outputArtifactKey'\n | 'humanConfirmedAt'\n | 'flaggedAt'\n | 'flaggedBy'\n | 'rerunOfRunId'\n | 'completedAt'\n | 'createdAt'\n | 'updatedAt'\n | 'deletedAt'\n\n @PrimaryKey({ type: 'uuid', defaultRaw: 'gen_random_uuid()' })\n id!: string\n\n @Property({ name: 'tenant_id', type: 'uuid' })\n tenantId!: string\n\n @Property({ name: 'organization_id', type: 'uuid' })\n organizationId!: string\n\n @Property({ name: 'agent_id', type: 'varchar', length: 100 })\n agentId!: string\n\n /**\n * Where this run came from. `eval` marks a replay: a real run with real spans\n * and real cost, but one that must NOT skew the agent's production metrics.\n * Defaults to `runtime`, so every pre-existing row keeps its meaning.\n */\n @Property({ name: 'source', type: 'varchar', length: 20, default: 'runtime' })\n source: AgentRunSource = 'runtime'\n\n /**\n * Parent run that delegated to this one as a sub-agent (Phase 4 nested trace).\n * Nullable + additive: top-level runs leave it null. Populated for the\n * in-process `delegate_agent` path; OpenCode-NATIVE `task` delegation runs\n * sub-agents inside OpenCode (not via our runner), so per-sub-agent rows are a\n * documented follow-up for that path.\n */\n @Property({ name: 'parent_run_id', type: 'uuid', nullable: true })\n parentRunId?: string | null\n\n // \u2500\u2500 Execution correlation \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\n /**\n * WHICH agent invocation this run is, stated explicitly.\n *\n * `(workflowInstanceId, stepId, invocationId)` is the identity of one agent\n * invocation and the unique key below enforces it. Before this triple existed,\n * a caller found the run it had just caused with \"the newest run for this agent\n * created since T\" \u2014 a temporal lookup that cannot tell two concurrent runs of\n * the same agent apart. Correlation is always an explicit identifier.\n *\n * All three are nullable together: a Playground or eval run belongs to no\n * workflow and correlates to nothing.\n */\n @Property({ name: 'workflow_instance_id', type: 'uuid', nullable: true })\n workflowInstanceId?: string | null\n\n @Property({ name: 'step_id', type: 'varchar', length: 100, nullable: true })\n stepId?: string | null\n\n /** The step's attempt id \u2014 distinguishes a retry from the run it retried. */\n @Property({ name: 'invocation_id', type: 'varchar', length: 100, nullable: true })\n invocationId?: string | null\n\n /** FK id \u2192 agent_proposals (orchestration). */\n @Property({ name: 'proposal_id', type: 'uuid', nullable: true })\n proposalId?: string | null\n\n @Property({ name: 'agent_version', type: 'varchar', length: 50, nullable: true })\n agentVersion?: string | null\n\n @Property({ name: 'model', type: 'varchar', length: 100, nullable: true })\n model?: string | null\n\n /** Runtime that produced the run; part of the ingestion idempotency key. */\n @Property({ name: 'runtime', type: 'varchar', length: 50, nullable: true })\n runtime?: string | null\n\n /** Runtime-native run id; part of the ingestion idempotency key. */\n @Property({ name: 'external_run_id', type: 'varchar', length: 200, nullable: true })\n externalRunId?: string | null\n\n @Property({ name: 'confidence', type: 'float', nullable: true })\n confidence?: number | null\n\n @Property({ name: 'input_tokens', type: 'integer', nullable: true })\n inputTokens?: number | null\n\n @Property({ name: 'output_tokens', type: 'integer', nullable: true })\n outputTokens?: number | null\n\n /** Backed by a `bigint` column; hydrate as `number` (safe under Number.MAX_SAFE_INTEGER for minor-unit costs) instead of MikroORM's default JS `bigint`. */\n @Property({ name: 'cost_minor', type: new BigIntType('number'), nullable: true })\n costMinor?: number | null\n\n @Property({ name: 'currency', type: 'varchar', length: 3, nullable: true })\n currency?: string | null\n\n @Property({ name: 'latency_ms', type: 'integer', nullable: true })\n latencyMs?: number | null\n\n @Property({ name: 'eval_score', type: 'float', nullable: true })\n evalScore?: number | null\n\n @Property({ name: 'eval_passed', type: 'boolean', nullable: true })\n evalPassed?: boolean | null\n\n /** FK id \u2192 agent_eval_cases; the approved golden case whose input this run matched (online golden-match plane); null when no golden matched. */\n @Property({ name: 'golden_case_id', type: 'uuid', nullable: true })\n goldenCaseId?: string | null\n\n /** Verdict of the matched golden case's gate assertions for this run; null when no golden matched or no gate applied. */\n @Property({ name: 'golden_passed', type: 'boolean', nullable: true })\n goldenPassed?: boolean | null\n\n /** TDCR routed-vs-pruned context summary (context overlay). */\n @Property({ name: 'context_routing', type: 'jsonb', nullable: true })\n contextRouting?: unknown | null\n\n /** storage-s3 key for the offloaded, encrypted full output payload. */\n @Property({ name: 'output_artifact_key', type: 'varchar', length: 500, nullable: true })\n outputArtifactKey?: string | null\n\n @Property({ name: 'human_confirmed_at', type: Date, nullable: true })\n humanConfirmedAt?: Date | null\n\n /** Operator triage flag (trace inspector); null = unflagged. */\n @Property({ name: 'flagged_at', type: Date, nullable: true })\n flaggedAt?: Date | null\n\n /** FK id \u2192 auth.users; the operator who flagged the run. */\n @Property({ name: 'flagged_by', type: 'uuid', nullable: true })\n flaggedBy?: string | null\n\n /** FK id \u2192 agent_runs; the source run this run is a re-run of (trace inspector \"Re-run\"). Distinct from `parentRunId` (sub-agent delegation). */\n @Property({ name: 'rerun_of_run_id', type: 'uuid', nullable: true })\n rerunOfRunId?: string | null\n\n @Property({ name: 'status', type: 'varchar', length: 20, default: 'running' })\n status: AgentRunStatus = 'running'\n\n /**\n * Forensic completion timestamp: stamped once at the terminal transition\n * (`runs.complete`/`runs.fail`; trace ingest sets it null-only from span end\n * times) and never mutated afterwards \u2014 unlike `updatedAt`, which later\n * writes (e.g. flagging) legitimately bump.\n */\n @Property({ name: 'completed_at', type: Date, nullable: true })\n completedAt?: Date | null\n\n @Property({ name: 'input', type: 'jsonb' })\n input!: unknown\n\n @Property({ name: 'output', type: 'jsonb', nullable: true })\n output?: unknown | null\n\n @Property({ name: 'result_kind', type: 'varchar', length: 20, nullable: true })\n resultKind?: 'research' | 'proposal' | 'artifact' | null\n\n /**\n * The agent's DECLARED type at the time of the run \u2014 the authoring fact, stamped so a\n * run record answers \"what was this agent for\" without re-reading a registry that may\n * have changed since. NULLABLE by design: runs that predate the declaration, and agents\n * that never made one, have none. `resultKind` above stays the runtime fact.\n */\n @Property({ name: 'agent_type', type: 'varchar', length: 20, nullable: true })\n agentType?: AgentType | null\n\n @Property({ name: 'error_message', type: 'text', nullable: true })\n errorMessage?: string | null\n\n @Property({ name: 'created_at', type: Date, onCreate: () => new Date() })\n createdAt: Date = new Date()\n\n @Property({ name: 'updated_at', type: Date, onCreate: () => new Date(), onUpdate: () => new Date() })\n updatedAt: Date = new Date()\n\n @Property({ name: 'deleted_at', type: Date, nullable: true })\n deletedAt?: Date | null\n}\n\n/**\n * One step in an agent run's execution trace (an LLM call, a tool invocation, or\n * a system step). Append-only telemetry: omits `updated_at`/`deleted_at`. High\n * volume \u2014 partitioned by `created_at` and tiered to archive in a later phase.\n * Out-of-order ingestion is tolerated: `sequence` + `parentSpanId` rebuild the\n * tree regardless of arrival order. Other modules referenced by FK id only.\n */\n@Entity({ tableName: 'agent_spans' })\n@Index({ name: 'agent_spans_tenant_org_idx', properties: ['tenantId', 'organizationId'] })\n@Index({ name: 'agent_spans_run_idx', properties: ['agentRunId', 'sequence'] })\n@Unique({ name: 'agent_spans_run_external_uq', properties: ['agentRunId', 'externalSpanId'] })\nexport class AgentSpan {\n [OptionalProps]?: 'parentSpanId' | 'endedAt' | 'durationMs' | 'status' | 'attributes' | 'createdAt'\n\n @PrimaryKey({ type: 'uuid', defaultRaw: 'gen_random_uuid()' })\n id!: string\n\n @Property({ name: 'tenant_id', type: 'uuid' })\n tenantId!: string\n\n @Property({ name: 'organization_id', type: 'uuid' })\n organizationId!: string\n\n /** FK id \u2192 agent_runs. */\n @Property({ name: 'agent_run_id', type: 'uuid' })\n agentRunId!: string\n\n /**\n * Adapter-native span id. The dedupe + parent-link key: re-ingesting the same\n * trace is a no-op (unique per run), and children resolve their `parentSpanId`\n * by matching the parent's `externalSpanId` regardless of arrival order.\n */\n @Property({ name: 'external_span_id', type: 'varchar', length: 200 })\n externalSpanId!: string\n\n /** FK id \u2192 agent_spans (parent step); null for root spans. */\n @Property({ name: 'parent_span_id', type: 'uuid', nullable: true })\n parentSpanId?: string | null\n\n @Property({ name: 'sequence', type: 'integer' })\n sequence!: number\n\n @Property({ name: 'name', type: 'varchar', length: 200 })\n name!: string\n\n @Property({ name: 'kind', type: 'varchar', length: 20 })\n kind!: AgentSpanKind\n\n @Property({ name: 'started_at', type: Date })\n startedAt!: Date\n\n @Property({ name: 'ended_at', type: Date, nullable: true })\n endedAt?: Date | null\n\n @Property({ name: 'duration_ms', type: 'integer', nullable: true })\n durationMs?: number | null\n\n @Property({ name: 'status', type: 'varchar', length: 20, default: 'ok' })\n status: AgentSpanStatus = 'ok'\n\n /** OTel GenAI naming target. */\n @Property({ name: 'attributes', type: 'jsonb', nullable: true })\n attributes?: unknown | null\n\n @Property({ name: 'created_at', type: Date, onCreate: () => new Date() })\n createdAt: Date = new Date()\n}\n\n/**\n * A single tool invocation within a span. Append-only telemetry: omits\n * `updated_at`/`deleted_at`. Request/response summaries are redacted and stored\n * inline; full payloads are offloaded to storage-s3 by key, encrypted at rest.\n * Other modules referenced by FK id only.\n */\n@Entity({ tableName: 'agent_tool_calls' })\n@Index({ name: 'agent_tool_calls_tenant_org_idx', properties: ['tenantId', 'organizationId'] })\n@Index({ name: 'agent_tool_calls_span_idx', properties: ['spanId'] })\n@Index({ name: 'agent_tool_calls_run_idx', properties: ['agentRunId'] })\nexport class AgentToolCall {\n [OptionalProps]?:\n | 'requestSummary' | 'responseSummary' | 'requestArtifactKey' | 'responseArtifactKey'\n | 'status' | 'latencyMs' | 'errorMessage' | 'createdAt'\n\n @PrimaryKey({ type: 'uuid', defaultRaw: 'gen_random_uuid()' })\n id!: string\n\n @Property({ name: 'tenant_id', type: 'uuid' })\n tenantId!: string\n\n @Property({ name: 'organization_id', type: 'uuid' })\n organizationId!: string\n\n /** FK id \u2192 agent_spans. */\n @Property({ name: 'span_id', type: 'uuid' })\n spanId!: string\n\n /** FK id \u2192 agent_runs (denormalized for direct run-scoped queries). */\n @Property({ name: 'agent_run_id', type: 'uuid' })\n agentRunId!: string\n\n @Property({ name: 'tool_name', type: 'varchar', length: 200 })\n toolName!: string\n\n @Property({ name: 'request_summary', type: 'jsonb', nullable: true })\n requestSummary?: unknown | null\n\n @Property({ name: 'response_summary', type: 'jsonb', nullable: true })\n responseSummary?: unknown | null\n\n @Property({ name: 'request_artifact_key', type: 'varchar', length: 500, nullable: true })\n requestArtifactKey?: string | null\n\n @Property({ name: 'response_artifact_key', type: 'varchar', length: 500, nullable: true })\n responseArtifactKey?: string | null\n\n @Property({ name: 'status', type: 'varchar', length: 20, default: 'ok' })\n status: AgentToolCallStatus = 'ok'\n\n @Property({ name: 'latency_ms', type: 'integer', nullable: true })\n latencyMs?: number | null\n\n @Property({ name: 'error_message', type: 'text', nullable: true })\n errorMessage?: string | null\n\n @Property({ name: 'created_at', type: Date, onCreate: () => new Date() })\n createdAt: Date = new Date()\n}\n\nexport type CorrectionAction = 'edit' | 'reject' | 'override' | 'answer'\n\n/**\n * A human correction of an agent proposal \u2014 the flywheel's entry point. Append-only\n * (omits `updated_at`/`deleted_at`): the legal/oversight record must never mutate.\n * `reason` is mandatory and enforced by Zod + the command. Other modules referenced\n * by FK id only.\n */\n@Entity({ tableName: 'agent_corrections' })\n@Index({ name: 'agent_corrections_tenant_org_idx', properties: ['tenantId', 'organizationId'] })\n@Index({ name: 'agent_corrections_run_idx', properties: ['agentRunId'] })\n@Index({ name: 'agent_corrections_proposal_idx', properties: ['proposalId'] })\nexport class AgentCorrection {\n [OptionalProps]?: 'workflowInstanceId' | 'stepId' | 'agentRunId' | 'correctedValue' | 'evalCaseId' | 'createdAt'\n\n @PrimaryKey({ type: 'uuid', defaultRaw: 'gen_random_uuid()' })\n id!: string\n\n @Property({ name: 'tenant_id', type: 'uuid' })\n tenantId!: string\n\n @Property({ name: 'organization_id', type: 'uuid' })\n organizationId!: string\n\n /** FK id \u2192 workflows instance (no cross-module ORM relation). */\n @Property({ name: 'workflow_instance_id', type: 'uuid', nullable: true })\n workflowInstanceId?: string | null\n\n @Property({ name: 'step_id', type: 'varchar', length: 100, nullable: true })\n stepId?: string | null\n\n /** FK id \u2192 agent_runs. */\n @Property({ name: 'agent_run_id', type: 'uuid', nullable: true })\n agentRunId?: string | null\n\n /** FK id \u2192 agent_proposals. */\n @Property({ name: 'proposal_id', type: 'uuid' })\n proposalId!: string\n\n /** FK id \u2192 auth user who recorded the correction. */\n @Property({ name: 'corrected_by_user_id', type: 'uuid' })\n correctedByUserId!: string\n\n @Property({ name: 'action', type: 'varchar', length: 20 })\n action!: CorrectionAction\n\n /** The agent's original proposal payload. */\n @Property({ name: 'proposed_value', type: 'jsonb' })\n proposedValue!: unknown\n\n /** Human-supplied corrected payload; null on a plain reject. */\n @Property({ name: 'corrected_value', type: 'jsonb', nullable: true })\n correctedValue?: unknown | null\n\n /** Mandatory, non-empty \u2014 enforced by Zod + command. */\n @Property({ name: 'reason', type: 'text' })\n reason!: string\n\n /** FK id \u2192 agent_eval_cases (the auto-drafted case). */\n @Property({ name: 'eval_case_id', type: 'uuid', nullable: true })\n evalCaseId?: string | null\n\n @Property({ name: 'created_at', type: Date, onCreate: () => new Date() })\n createdAt: Date = new Date()\n}\n\nexport type AgentEvalCaseSourceType = 'correction' | 'golden_run'\nexport type AgentEvalCaseStatus = 'draft' | 'approved' | 'archived'\n\n/**\n * A regression eval case promoted from a correction or a golden run. Editable\n * (carries `updated_at` \u2192 optimistic lock); an engineer approves a draft before\n * it is exported to the lifecycle gate. Other modules referenced by FK id only.\n */\n@Entity({ tableName: 'agent_eval_cases' })\n@Index({ name: 'agent_eval_cases_tenant_org_idx', properties: ['tenantId', 'organizationId'] })\n@Index({ name: 'agent_eval_cases_agent_status_idx', properties: ['organizationId', 'agentDefinitionId', 'status'] })\n@Index({ name: 'agent_eval_cases_agent_input_key_idx', properties: ['organizationId', 'agentDefinitionId', 'inputKey'] })\nexport class AgentEvalCase {\n [OptionalProps]?:\n | 'name' | 'processType' | 'inputKey' | 'expected' | 'assertions' | 'status' | 'approvedByUserId'\n | 'createdAt' | 'updatedAt' | 'deletedAt'\n\n @PrimaryKey({ type: 'uuid', defaultRaw: 'gen_random_uuid()' })\n id!: string\n\n @Property({ name: 'tenant_id', type: 'uuid' })\n tenantId!: string\n\n @Property({ name: 'organization_id', type: 'uuid' })\n organizationId!: string\n\n @Property({ name: 'source_type', type: 'varchar', length: 20 })\n sourceType!: AgentEvalCaseSourceType\n\n /** FK id \u2192 agent_corrections or agent_runs (per sourceType). */\n @Property({ name: 'source_id', type: 'uuid' })\n sourceId!: string\n\n @Property({ name: 'agent_definition_id', type: 'varchar', length: 100 })\n agentDefinitionId!: string\n\n /** Human label for the case, shown as the first list column. Plaintext (not PII). */\n @Property({ name: 'name', type: 'varchar', length: 200, nullable: true })\n name?: string | null\n\n @Property({ name: 'process_type', type: 'varchar', length: 100, nullable: true })\n processType?: string | null\n\n @Property({ name: 'input', type: 'jsonb' })\n input!: unknown\n\n /**\n * SHA-256 (hex) of the canonicalized plaintext `input` \u2014 the match key used to\n * recognize a live/playground run whose input reproduces this golden case\n * (`canonicalInputKey`). Plaintext by design (must be SQL-queryable); NOT in\n * the encryption map. Nullable for legacy rows.\n */\n @Property({ name: 'input_key', type: 'varchar', length: 64, nullable: true })\n inputKey?: string | null\n\n /** Expected output (the corrected value); null when sourced from a plain reject. */\n @Property({ name: 'expected', type: 'jsonb', nullable: true })\n expected?: unknown | null\n\n /** Assertion keys to apply when this case runs. */\n @Property({ name: 'assertions', type: 'jsonb', nullable: true })\n assertions?: unknown | null\n\n @Property({ name: 'status', type: 'varchar', length: 20, default: 'draft' })\n status: AgentEvalCaseStatus = 'draft'\n\n @Property({ name: 'approved_by_user_id', type: 'uuid', nullable: true })\n approvedByUserId?: string | null\n\n @Property({ name: 'created_at', type: Date, onCreate: () => new Date() })\n createdAt: Date = new Date()\n\n @Property({ name: 'updated_at', type: Date, onCreate: () => new Date(), onUpdate: () => new Date() })\n updatedAt: Date = new Date()\n\n @Property({ name: 'deleted_at', type: Date, nullable: true })\n deletedAt?: Date | null\n}\n\nexport type AgentEvalAssertionType = 'deterministic' | 'llm_judge'\nexport type AgentEvalSeverity = 'gate' | 'warn'\n\n/**\n * A configured assertion applied to agent runs during evaluation. Editable\n * (carries `updated_at` \u2192 optimistic lock). `key` selects the shared pure-function\n * scorer; `config` parameterizes it. Only `deterministic` assertions may carry\n * `severity: 'gate'` (the gate tier must be reproducible); `llm_judge` is always `warn`.\n */\n@Entity({ tableName: 'agent_eval_assertions' })\n@Index({ name: 'agent_eval_assertions_tenant_org_idx', properties: ['tenantId', 'organizationId'] })\n@Index({ name: 'agent_eval_assertions_applies_idx', properties: ['organizationId', 'appliesTo', 'enabled'] })\n@Index({ name: 'agent_eval_assertions_scorer_idx', properties: ['organizationId', 'scorerKey'] })\n@Unique({ name: 'agent_eval_assertions_key_uq', properties: ['organizationId', 'appliesTo', 'key'] })\nexport class AgentEvalAssertion {\n [OptionalProps]?:\n | 'description' | 'config' | 'version' | 'enabled' | 'createdAt' | 'updatedAt' | 'deletedAt'\n\n @PrimaryKey({ type: 'uuid', defaultRaw: 'gen_random_uuid()' })\n id!: string\n\n @Property({ name: 'tenant_id', type: 'uuid' })\n tenantId!: string\n\n @Property({ name: 'organization_id', type: 'uuid' })\n organizationId!: string\n\n /**\n * Instance slug \u2014 unique per (organization, appliesTo). NOT the scorer identity:\n * `agent_eval_assertions_key_uq` allows one row per key, so overloading it with\n * the scorer identity capped the catalog at one assertion per scorer per agent\n * (e.g. two `contains` checks were unrepresentable). See `scorerKey`.\n */\n @Property({ name: 'key', type: 'varchar', length: 100 })\n key!: string\n\n /**\n * Which registry scorer runs \u2014 see `lib/eval/registry`. Backfilled from\n * `COALESCE(config->>'scorer', key)`, which reproduces the pre-column resolution\n * rule exactly, so existing rows keep their behaviour.\n */\n @Property({ name: 'scorer_key', type: 'varchar', length: 100 })\n scorerKey!: string\n\n @Property({ name: 'title', type: 'varchar', length: 200 })\n title!: string\n\n @Property({ name: 'description', type: 'text', nullable: true })\n description?: string | null\n\n /** Target agent definition id, or `'*'` to apply to every agent. */\n @Property({ name: 'applies_to', type: 'varchar', length: 100 })\n appliesTo!: string\n\n @Property({ name: 'type', type: 'varchar', length: 20 })\n type!: AgentEvalAssertionType\n\n @Property({ name: 'severity', type: 'varchar', length: 20 })\n severity!: AgentEvalSeverity\n\n @Property({ name: 'config', type: 'jsonb', nullable: true })\n config?: unknown | null\n\n @Property({ name: 'version', type: 'integer', default: 1 })\n version: number = 1\n\n @Property({ name: 'enabled', type: 'boolean', default: true })\n enabled: boolean = true\n\n @Property({ name: 'created_at', type: Date, onCreate: () => new Date() })\n createdAt: Date = new Date()\n\n @Property({ name: 'updated_at', type: Date, onCreate: () => new Date(), onUpdate: () => new Date() })\n updatedAt: Date = new Date()\n\n @Property({ name: 'deleted_at', type: Date, nullable: true })\n deletedAt?: Date | null\n}\n\n/**\n * The verdict of one assertion against one run. Append-only (omits\n * `updated_at`/`deleted_at`) \u2014 eval results are legal records retained \u22656 years.\n * A failing `gate` result marks the run `evalPassed = false`; `warn` never blocks.\n */\n@Entity({ tableName: 'agent_eval_results' })\n@Index({ name: 'agent_eval_results_tenant_org_idx', properties: ['tenantId', 'organizationId'] })\n@Index({ name: 'agent_eval_results_run_idx', properties: ['agentRunId'] })\n@Index({ name: 'agent_eval_results_assertion_idx', properties: ['assertionId'] })\n@Index({ name: 'agent_eval_results_case_run_idx', properties: ['evalCaseRunId'] })\n@Index({ name: 'agent_eval_results_matched_case_idx', properties: ['matchedEvalCaseId'] })\nexport class AgentEvalResult {\n [OptionalProps]?: 'evalCaseRunId' | 'matchedEvalCaseId' | 'passed' | 'score' | 'evidence' | 'evaluatedAt' | 'createdAt'\n\n @PrimaryKey({ type: 'uuid', defaultRaw: 'gen_random_uuid()' })\n id!: string\n\n @Property({ name: 'tenant_id', type: 'uuid' })\n tenantId!: string\n\n @Property({ name: 'organization_id', type: 'uuid' })\n organizationId!: string\n\n /** FK id \u2192 agent_runs. */\n @Property({ name: 'agent_run_id', type: 'uuid' })\n agentRunId!: string\n\n /** FK id \u2192 agent_eval_assertions. */\n @Property({ name: 'assertion_id', type: 'uuid' })\n assertionId!: string\n\n @Property({ name: 'assertion_key', type: 'varchar', length: 100 })\n assertionKey!: string\n\n /**\n * FK id \u2192 agent_eval_case_runs. Null for a result produced by the ONLINE plane\n * (inline at trace ingest, where there is no eval case); set for a result from\n * the eval plane. Nullable keeps every pre-existing row valid.\n */\n @Property({ name: 'eval_case_run_id', type: 'uuid', nullable: true })\n evalCaseRunId?: string | null\n\n /**\n * FK id \u2192 agent_eval_cases. Set (with `evalCaseRunId` null) when this verdict\n * comes from the ONLINE golden-match plane: a live/playground run whose input\n * matched an approved golden case, scored against that case's `expected`. Null\n * for plain online results and for eval-plane (`evalCaseRunId`) results.\n */\n @Property({ name: 'matched_eval_case_id', type: 'uuid', nullable: true })\n matchedEvalCaseId?: string | null\n\n /**\n * `null` means SKIPPED and is the single source of truth for it \u2014 there is no\n * separate flag. Skipped results are excluded from score AND pass aggregation\n * alike: never counted as 0, never counted as failing.\n *\n * Invariant: `score === null` \u27FA `passed === null`.\n */\n @Property({ name: 'passed', type: 'boolean', nullable: true })\n passed?: boolean | null\n\n @Property({ name: 'score', type: 'float', nullable: true })\n score?: number | null\n\n @Property({ name: 'severity', type: 'varchar', length: 20 })\n severity!: AgentEvalSeverity\n\n @Property({ name: 'evidence', type: 'jsonb', nullable: true })\n evidence?: unknown | null\n\n @Property({ name: 'evaluated_at', type: Date, onCreate: () => new Date() })\n evaluatedAt: Date = new Date()\n\n @Property({ name: 'created_at', type: Date, onCreate: () => new Date() })\n createdAt: Date = new Date()\n}\n\n/**\n * A precomputed per-agent KPI window (F2 metric rollups). Append-only (omits\n * `updated_at`/`deleted_at`): each row is an immutable snapshot of an agent's\n * metrics over a fixed `[windowStart, windowEnd)`. The rollup worker recomputes\n * and re-stamps a row idempotently per `(organizationId, agentId, windowStart)`\n * so the metrics endpoint reads a stable window with a live fallback instead of\n * a capped live scan. `metrics` jsonb shape is validated by the Zod schema in\n * data/validators.ts. Other modules referenced by FK id only.\n */\n@Entity({ tableName: 'agent_metric_rollups' })\n@Index({ name: 'agent_metric_rollups_tenant_org_idx', properties: ['tenantId', 'organizationId'] })\n@Index({ name: 'agent_metric_rollups_lookup_idx', properties: ['organizationId', 'agentId', 'windowStart'] })\nexport class AgentMetricRollup {\n [OptionalProps]?: 'computedAt' | 'createdAt'\n\n @PrimaryKey({ type: 'uuid', defaultRaw: 'gen_random_uuid()' })\n id!: string\n\n @Property({ name: 'tenant_id', type: 'uuid' })\n tenantId!: string\n\n @Property({ name: 'organization_id', type: 'uuid' })\n organizationId!: string\n\n /** Agent definition id \u2014 mirrors AgentRun.agentId (NOT agentDefinitionId). */\n @Property({ name: 'agent_id', type: 'varchar', length: 100 })\n agentId!: string\n\n @Property({ name: 'window_start', type: Date })\n windowStart!: Date\n\n @Property({ name: 'window_end', type: Date })\n windowEnd!: Date\n\n @Property({ name: 'computed_at', type: Date, onCreate: () => new Date() })\n computedAt: Date = new Date()\n\n /** override/eval-pass/approve-unchanged/latency/cost/count KPIs (validated by Zod). */\n @Property({ name: 'metrics', type: 'jsonb' })\n metrics!: unknown\n\n @Property({ name: 'created_at', type: Date, onCreate: () => new Date() })\n createdAt: Date = new Date()\n}\n\nexport type AgentRunSessionStatus = 'pending' | 'completed'\n\n/**\n * Cross-process correlation for an OpenCode file-agent run. The runner (app /\n * worker process) and the `submit_outcome` / `load_skill` / `run_skill_script`\n * MCP tools (separate `mcp:serve-http` process) do NOT share memory, so the\n * active-agent + captured-outcome handoff cannot live in an in-process Map. This\n * row, keyed by the per-run session token, is the shared store both processes\n * reach: the runner `open`s it before sending; `submit_outcome` resolves the\n * active agent from it and writes the validated `outcome`; the runner polls for\n * the completed outcome and `dispose`s the row when the run ends.\n */\n@Entity({ tableName: 'agent_run_sessions' })\n@Index({ name: 'agent_run_sessions_token_idx', properties: ['sessionToken'] })\nexport class AgentRunSession {\n [OptionalProps]?: 'runId' | 'outcome' | 'status' | 'createdAt' | 'updatedAt'\n\n @PrimaryKey({ type: 'uuid', defaultRaw: 'gen_random_uuid()' })\n id!: string\n\n /** The per-run session token the runner minted = the correlation key (unique). */\n @Property({ name: 'session_token', type: 'varchar', length: 100, unique: true })\n sessionToken!: string\n\n @Property({ name: 'agent_id', type: 'varchar', length: 100 })\n agentId!: string\n\n @Property({ name: 'run_id', type: 'uuid', nullable: true })\n runId?: string | null\n\n @Property({ name: 'tenant_id', type: 'uuid' })\n tenantId!: string\n\n @Property({ name: 'organization_id', type: 'uuid' })\n organizationId!: string\n\n /** The validated outcome captured by `submit_outcome`, once it arrives. */\n @Property({ name: 'outcome', type: 'jsonb', nullable: true })\n outcome?: unknown | null\n\n @Property({ name: 'status', type: 'varchar', length: 20, default: 'pending' })\n status: AgentRunSessionStatus = 'pending'\n\n @Property({ name: 'created_at', type: Date, onCreate: () => new Date() })\n createdAt: Date = new Date()\n\n @Property({ name: 'updated_at', type: Date, onCreate: () => new Date(), onUpdate: () => new Date() })\n updatedAt: Date = new Date()\n}\n\nexport type GuardrailPhase = 'input' | 'output'\n\nexport type GuardrailKind =\n | 'prompt_injection'\n | 'pii'\n | 'grounding'\n | 'schema'\n | 'moderation'\n | 'tool_scope'\n\nexport type GuardrailResult = 'pass' | 'warn' | 'block'\n\n/**\n * Append-only audit of every runtime guardrail check (omits `updated_at`/\n * `deleted_at`). One row per check per phase; `guardResults` on the AgentProposal\n * carries the same verdict for fast read. `evidence` holds REDACTED data only\n * (pointers/offsets into the encrypted artifact store) \u2014 never raw PII. Shape is\n * enforced by the Zod schema in data/validators.ts. Other modules referenced by\n * FK id only (agentRunId, proposalId).\n */\n@Entity({ tableName: 'agent_guardrail_checks' })\n@Index({ name: 'agent_guardrail_checks_tenant_org_idx', properties: ['tenantId', 'organizationId'] })\n@Index({ name: 'agent_guardrail_checks_run_idx', properties: ['agentRunId', 'createdAt'] })\n@Index({ name: 'agent_guardrail_checks_proposal_idx', properties: ['proposalId'] })\nexport class AgentGuardrailCheck {\n [OptionalProps]?: 'result' | 'evidence' | 'proposalId' | 'createdAt'\n\n @PrimaryKey({ type: 'uuid', defaultRaw: 'gen_random_uuid()' })\n id!: string\n\n @Property({ name: 'tenant_id', type: 'uuid' })\n tenantId!: string\n\n @Property({ name: 'organization_id', type: 'uuid' })\n organizationId!: string\n\n /** FK id \u2192 agent_runs; NOT an ORM relation. */\n @Property({ name: 'agent_run_id', type: 'uuid' })\n agentRunId!: string\n\n /** FK id \u2192 agent_proposals (null for pre-call input checks). */\n @Property({ name: 'proposal_id', type: 'uuid', nullable: true })\n proposalId?: string | null\n\n /** Which versioned set produced this verdict. */\n @Property({ name: 'guardrail_set_version', type: 'varchar', length: 64 })\n guardrailSetVersion!: string\n\n @Property({ name: 'capability', type: 'varchar', length: 100 })\n capability!: string\n\n @Property({ name: 'phase', type: 'varchar', length: 10 })\n phase!: GuardrailPhase\n\n @Property({ name: 'kind', type: 'varchar', length: 30 })\n kind!: GuardrailKind\n\n @Property({ name: 'result', type: 'varchar', length: 10, default: 'pass' })\n result: GuardrailResult = 'pass'\n\n /**\n * Redacted evidence ONLY \u2014 never raw PII; pointers/offsets into the encrypted\n * artifact store (trace spec) rather than plaintext spans. Shape enforced by a\n * Zod schema in data/validators.ts.\n */\n @Property({ name: 'evidence', type: 'jsonb', nullable: true })\n evidence?: unknown | null\n\n @Property({ name: 'created_at', type: Date, onCreate: () => new Date() })\n createdAt: Date = new Date()\n}\n\n/**\n * A versioned guardrail SET for one capability (Wave 3, Phase 4 \u2014 grounding).\n * Append-only by version (omits `updated_at`/`deleted_at`): each row pins a\n * capability's policy body under a CONTENT-HASH `version`. The grounding sync\n * (setup.ts `seedDefaults`) upserts one row per `(organizationId, capability,\n * version)` \u2014 re-syncing an unchanged body is a no-op (idempotent), and editing\n * the body produces a new content-hash \u2192 a new append-only version. The\n * `guardrailSetVersion` recorded on every grounding `AgentGuardrailCheck` is this\n * `version`, so a verdict is replayable against the exact policy that produced it.\n * Other modules referenced by FK id only.\n */\n@Entity({ tableName: 'agent_guardrail_sets' })\n@Index({ name: 'agent_guardrail_sets_tenant_org_idx', properties: ['tenantId', 'organizationId'] })\n@Index({ name: 'agent_guardrail_sets_capability_idx', properties: ['organizationId', 'capability'] })\n@Unique({ name: 'agent_guardrail_sets_version_uq', properties: ['organizationId', 'capability', 'version'] })\nexport class AgentGuardrailSet {\n [OptionalProps]?: 'createdAt'\n\n @PrimaryKey({ type: 'uuid', defaultRaw: 'gen_random_uuid()' })\n id!: string\n\n @Property({ name: 'tenant_id', type: 'uuid' })\n tenantId!: string\n\n @Property({ name: 'organization_id', type: 'uuid' })\n organizationId!: string\n\n @Property({ name: 'capability', type: 'varchar', length: 100 })\n capability!: string\n\n /** Content-hash of the canonical set body \u2014 the durable version key. */\n @Property({ name: 'version', type: 'varchar', length: 64 })\n version!: string\n\n /** The grounding policy body. Shape enforced by Zod in data/validators.ts. */\n @Property({ name: 'body', type: 'jsonb' })\n body!: unknown\n\n @Property({ name: 'created_at', type: Date, onCreate: () => new Date() })\n createdAt: Date = new Date()\n}\n\n/**\n * Which authentication path an agent principal uses (agent identity spec).\n * `internal` = in-process `INVOKE_AGENT` step, NO network auth and NO interactive\n * credential (Phase 1; the only mode provisioned today). `oauth_client` =\n * net-new OAuth client-credentials `/token` server (Phase 3). `authmd` =\n * `auth.md` / ID-JAG self-registration (Phase 4). The non-`internal` modes are\n * declared here as forward-compatible seams; only `internal` is provisioned now.\n */\nexport type AgentCredentialMode = 'internal' | 'oauth_client' | 'authmd'\n\n/**\n * Links an AI agent to its provisioned non-interactive `auth.User` (`kind='agent'`)\n * and a scoped, least-privilege `auth.Role`, so every agent action is attributed\n * to a concrete user id through the same Command/CRUD/ACL/audit pipeline as a\n * human (agent identity & on-behalf-of spec, Wave 4 Phase 1). Editable (revoke /\n * disable) \u2192 carries `updated_at` for optimistic locking. Other modules\n * (`auth.User`, `auth.Role`, the agent definition) are referenced by FK id only \u2014\n * NOT as ORM relations \u2014 per the cross-module decoupling rule.\n */\n// One LIVE principal per (organization_id, agent_definition_id) is enforced by a\n// partial unique index (`agent_principals_org_agent_uq`) over live rows\n// (`WHERE deleted_at IS NULL`), created by raw SQL in Migration20260625050000. A\n// `@Unique` decorator can't express a partial index (it would block re-provisioning\n// after a soft-delete), so it is declared via `@Index({ expression })` \u2014 the\n// repo's partial-index convention (cf. `agent_runs_eval_failed_idx`) \u2014 which\n// keeps `db:generate` snapshot-aware of it instead of emitting a drop each run.\n@Entity({ tableName: 'agent_principals' })\n@Index({ name: 'agent_principals_tenant_org_idx', properties: ['tenantId', 'organizationId'] })\n@Index({ name: 'agent_principals_user_idx', properties: ['userId'] })\n@Index({\n name: 'agent_principals_org_agent_uq',\n expression:\n `create unique index \"agent_principals_org_agent_uq\" on \"agent_principals\" (\"organization_id\", \"agent_definition_id\") where \"deleted_at\" is null`,\n})\nexport class AgentPrincipal {\n [OptionalProps]?: 'credentialMode' | 'enabled' | 'createdAt' | 'updatedAt' | 'deletedAt'\n\n @PrimaryKey({ type: 'uuid', defaultRaw: 'gen_random_uuid()' })\n id!: string\n\n @Property({ name: 'tenant_id', type: 'uuid' })\n tenantId!: string\n\n @Property({ name: 'organization_id', type: 'uuid' })\n organizationId!: string\n\n /** FK id \u2192 auth.User (kind='agent'); NOT an ORM relation. */\n @Property({ name: 'user_id', type: 'uuid' })\n userId!: string\n\n /** FK id \u2192 the agent definition (the `defineAgent`/file-agent id). */\n @Property({ name: 'agent_definition_id', type: 'varchar', length: 100 })\n agentDefinitionId!: string\n\n /** FK id \u2192 auth.Role (scoped, least privilege); NOT an ORM relation. */\n @Property({ name: 'role_id', type: 'uuid' })\n roleId!: string\n\n /** Selects the auth path explicitly; only `internal` is provisioned in Phase 1. */\n @Property({ name: 'credential_mode', type: 'varchar', length: 20, default: 'internal' })\n credentialMode: AgentCredentialMode = 'internal'\n\n @Property({ name: 'enabled', type: 'boolean', default: true })\n enabled: boolean = true\n\n @Property({ name: 'created_at', type: Date, onCreate: () => new Date() })\n createdAt: Date = new Date()\n\n @Property({ name: 'updated_at', type: Date, onCreate: () => new Date(), onUpdate: () => new Date() })\n updatedAt: Date = new Date()\n\n @Property({ name: 'deleted_at', type: Date, nullable: true })\n deletedAt?: Date | null\n}\n\n/**\n * An external agent's delegation grant (agent identity & on-behalf-of spec, Wave 4\n * Phase 3). Links an external `AgentPrincipal` (`credentialMode='oauth_client'`)\n * to the human delegator + the scopes it may mint OAuth client-credentials tokens\n * for, and is the per-request REVOCATION spine: the `/token` server refuses to\n * mint while every minted token re-checks `revokedAt`/`expiresAt` on the NEXT\n * write, so revoking stops further agent action immediately rather than at token\n * expiry. The `issuer`/`subject`/`audience` columns are forward-compatible seams\n * for the later `auth.md`/ID-JAG path (Phase 4) \u2014 null for the OAuth-now path, so\n * the same record bridges both with no schema change. Editable (revoke) \u2192 carries\n * `updated_at` for optimistic locking. Dual tenancy (tenant_id + organization_id);\n * reads filter by organization_id. Other modules (`auth.User`, the agent\n * principal) are referenced by FK id only \u2014 NOT as ORM relations.\n */\n@Entity({ tableName: 'agent_delegation_grants' })\n@Index({ name: 'agent_delegation_grants_tenant_org_idx', properties: ['tenantId', 'organizationId'] })\n@Index({ name: 'agent_delegation_grants_principal_idx', properties: ['organizationId', 'agentPrincipalId'] })\nexport class AgentDelegationGrant {\n [OptionalProps]?: 'delegatorUserId' | 'expiresAt' | 'revokedAt' | 'revokedByUserId'\n | 'issuer' | 'subject' | 'audience' | 'createdAt' | 'updatedAt' | 'deletedAt'\n\n @PrimaryKey({ type: 'uuid', defaultRaw: 'gen_random_uuid()' })\n id!: string\n\n @Property({ name: 'tenant_id', type: 'uuid' })\n tenantId!: string\n\n @Property({ name: 'organization_id', type: 'uuid' })\n organizationId!: string\n\n /** FK id \u2192 agent_principals (the external principal); NOT an ORM relation. */\n @Property({ name: 'agent_principal_id', type: 'uuid' })\n agentPrincipalId!: string\n\n /** FK id \u2192 the agent principal's `auth.User` (actor on every attributed write). */\n @Property({ name: 'agent_user_id', type: 'uuid' })\n agentUserId!: string\n\n /** FK id \u2192 auth.User \u2014 the human delegating authority; null for system grants. */\n @Property({ name: 'delegator_user_id', type: 'uuid', nullable: true })\n delegatorUserId?: string | null\n\n /** `<capability>:<action>` scopes the minted token may carry. */\n @Property({ name: 'scopes', type: 'jsonb' })\n scopes!: string[]\n\n /** Optional hard expiry; tokens never outlive this even before revocation. */\n @Property({ name: 'expires_at', type: Date, nullable: true })\n expiresAt?: Date | null\n\n /** When set, every token bound to this grant is denied on its next request. */\n @Property({ name: 'revoked_at', type: Date, nullable: true })\n revokedAt?: Date | null\n\n /** FK id \u2192 auth.User who revoked the grant. */\n @Property({ name: 'revoked_by_user_id', type: 'uuid', nullable: true })\n revokedByUserId?: string | null\n\n /** Forward-compatible ID-JAG seam (Phase 4); null for the OAuth-now path. */\n @Property({ name: 'issuer', type: 'varchar', length: 500, nullable: true })\n issuer?: string | null\n\n @Property({ name: 'subject', type: 'varchar', length: 500, nullable: true })\n subject?: string | null\n\n @Property({ name: 'audience', type: 'varchar', length: 500, nullable: true })\n audience?: string | null\n\n @Property({ name: 'created_at', type: Date, onCreate: () => new Date() })\n createdAt: Date = new Date()\n\n @Property({ name: 'updated_at', type: Date, onCreate: () => new Date(), onUpdate: () => new Date() })\n updatedAt: Date = new Date()\n\n @Property({ name: 'deleted_at', type: Date, nullable: true })\n deletedAt?: Date | null\n}\n\nexport type AgentProposalDisposition =\n | 'pending' | 'auto_approved' | 'approved' | 'edited' | 'rejected' | 'none_proposed'\n\n/**\n * Why an auto-approval that cleared its threshold was still routed to a human \u2014\n * the gate the policy layer answered `review` on (`lib/disposition/autoApprovalPolicy.ts`).\n * Recorded ONLY when the proposal cleared what it was measured against and was\n * held anyway; a proposal that simply did not clear needs no explanation.\n */\nexport type AgentProposalAutoDispositionBlock =\n | 'near_tie'\n | 'risk'\n | 'guardrail'\n | 'trace_incomplete'\n | 'policy'\n\nexport type AgentProposalSource = 'runtime' | 'eval'\n\n@Entity({ tableName: 'agent_proposals' })\n@Index({ name: 'agent_proposals_tenant_org_idx', properties: ['tenantId', 'organizationId'] })\n@Index({ name: 'agent_proposals_run_idx', properties: ['organizationId', 'runId'] })\n@Index({ name: 'agent_proposals_org_disposition_created_idx', properties: ['organizationId', 'disposition', 'createdAt'] })\nexport class AgentProposal {\n [OptionalProps]?: 'source' | 'disposition' | 'dispositionBy' | 'dispositionReason'\n | 'workflowInstanceId' | 'stepId' | 'userTaskId' | 'confidence' | 'guardResults' | 'createdAt'\n | 'updatedAt' | 'deletedAt' | 'selectedOptionId' | 'autoDispositionBlock'\n\n @PrimaryKey({ type: 'uuid', defaultRaw: 'gen_random_uuid()' })\n id!: string\n\n @Property({ name: 'tenant_id', type: 'uuid' })\n tenantId!: string\n\n @Property({ name: 'organization_id', type: 'uuid' })\n organizationId!: string\n\n @Property({ name: 'agent_id', type: 'varchar', length: 100 })\n agentId!: string\n\n @Property({ name: 'run_id', type: 'uuid' })\n runId!: string\n\n /** FK id \u2192 workflows instance (no cross-module ORM relation). */\n @Property({ name: 'workflow_instance_id', type: 'uuid', nullable: true })\n workflowInstanceId?: string | null\n\n @Property({ name: 'step_id', type: 'varchar', length: 100, nullable: true })\n stepId?: string | null\n\n /**\n * The workflows `UserTask` raised for this proposal's human review, when one\n * was raised (spec \u00A77.5 / A7).\n *\n * An FK-by-id to another module's row, never an ORM relation. It exists so a\n * disposition can CLOSE the review task it created: without it the task\n * outlives the decision and sits in the operator's inbox as work that has\n * already been done. Null on every auto-approved proposal (no task is ever\n * raised) and on every row written before this column existed.\n */\n @Property({ name: 'user_task_id', type: 'uuid', nullable: true })\n userTaskId?: string | null\n\n @Property({ name: 'payload', type: 'jsonb' })\n payload!: unknown\n\n @Property({ name: 'confidence', type: 'float', nullable: true })\n confidence?: number | null\n\n /**\n * The guardrail verdict's `checks` array attached at proposal creation (output\n * phase). Append-only audit lives in `agent_guardrail_checks`; this is the fast\n * read carried on the proposal. Validated by the Zod schema in data/validators.ts.\n */\n @Property({ name: 'guard_results', type: 'jsonb', nullable: true })\n guardResults?: unknown | null\n\n /**\n * Where this proposal came from. `eval` marks a proposal produced by an eval\n * replay: it is a real record of what the agent proposed, but it must never\n * reach the operator caseload and must never be disposed. Defaults to `runtime`\n * so every pre-existing row keeps its current meaning.\n */\n @Property({ name: 'source', type: 'varchar', length: 20, default: 'runtime' })\n source: AgentProposalSource = 'runtime'\n\n @Property({ name: 'disposition', type: 'varchar', length: 20, default: 'pending' })\n disposition: AgentProposalDisposition = 'pending'\n\n @Property({ name: 'disposition_by', type: 'varchar', length: 100, nullable: true })\n dispositionBy?: string | null\n\n @Property({ name: 'disposition_reason', type: 'text', nullable: true })\n dispositionReason?: string | null\n\n /**\n * Which of `payload.options` the disposition selected. Set on approve/edit (and on\n * the rule-driven auto-approve, which selects the leader); null on reject, on a\n * pending proposal, and on every row written before the envelope existed.\n */\n @Property({ name: 'selected_option_id', type: 'varchar', length: 100, nullable: true })\n selectedOptionId?: string | null\n\n /**\n * Why an auto-approval that cleared its threshold was still held for a human.\n * Distinct from `dispositionReason`, which carries the OPERATOR's words.\n */\n @Property({ name: 'auto_disposition_block', type: 'varchar', length: 20, nullable: true })\n autoDispositionBlock?: AgentProposalAutoDispositionBlock | null\n\n @Property({ name: 'created_at', type: Date, onCreate: () => new Date() })\n createdAt: Date = new Date()\n\n @Property({ name: 'updated_at', type: Date, onCreate: () => new Date(), onUpdate: () => new Date() })\n updatedAt: Date = new Date()\n\n @Property({ name: 'deleted_at', type: Date, nullable: true })\n deletedAt?: Date | null\n}\n\n/**\n * The single durable artifact of a Task-Driven Context Routing (TDCR) assembly \u2014\n * the evidence record of *what an agent saw* for one `INVOKE_AGENT` run. Append-only\n * (omits `updated_at`/`deleted_at`) per conventions \u00A73.2: it is immutable evidence\n * read by the trace inspector (routed vs. pruned + token usage), the guardrails\n * grounding check (cited snippets), and compliance lineage (fact \u2192 evidence).\n *\n * `routedSources`/`prunedSources`/`sources`/`redactionApplied` jsonb shapes are\n * enforced by Zod in data/validators.ts (`contextBundleRoutedSourcesSchema` etc.).\n * Other modules referenced by FK id only (agentRunId, workflowInstanceId).\n */\n@Entity({ tableName: 'agent_context_bundles' })\n@Index({ name: 'agent_context_bundles_tenant_org_idx', properties: ['tenantId', 'organizationId'] })\n@Index({ name: 'agent_context_bundles_run_idx', properties: ['agentRunId'] })\nexport class AgentContextBundle {\n [OptionalProps]?: 'workflowInstanceId' | 'stepId' | 'prunedSources' | 'redactionApplied' | 'payloadRef' | 'createdAt'\n\n @PrimaryKey({ type: 'uuid', defaultRaw: 'gen_random_uuid()' })\n id!: string\n\n @Property({ name: 'tenant_id', type: 'uuid' })\n tenantId!: string\n\n @Property({ name: 'organization_id', type: 'uuid' })\n organizationId!: string\n\n /** FK id \u2192 agent_runs; NOT an ORM relation. */\n @Property({ name: 'agent_run_id', type: 'uuid' })\n agentRunId!: string\n\n /** FK id \u2192 workflows process instance (null for standalone runs). */\n /** FK id \u2192 workflows instance (no cross-module ORM relation). */\n @Property({ name: 'workflow_instance_id', type: 'uuid', nullable: true })\n workflowInstanceId?: string | null\n\n @Property({ name: 'step_id', type: 'varchar', length: 100, nullable: true })\n stepId?: string | null\n\n @Property({ name: 'capability', type: 'varchar', length: 100 })\n capability!: string\n\n /**\n * Selected & packed sources: `{ kind, ref, locator?, tokens, score? }[]`. The\n * mandatory floor is always present here. Shape enforced by Zod.\n */\n @Property({ name: 'routed_sources', type: 'jsonb' })\n routedSources!: unknown\n\n /**\n * Excluded candidates with a reason (over budget / out of scope):\n * `{ kind, ref, reason }[]`. Records the optional-fill variance for audit.\n */\n @Property({ name: 'pruned_sources', type: 'jsonb', nullable: true })\n prunedSources?: unknown | null\n\n /** Provenance: `{ factId, sourceKind, sourceRef, locator? }[]` (\u2192 lineage). */\n @Property({ name: 'sources', type: 'jsonb' })\n sources!: unknown\n\n @Property({ name: 'token_budget', type: 'integer' })\n tokenBudget!: number\n\n @Property({ name: 'tokens_used', type: 'integer' })\n tokensUsed!: number\n\n /** `{ field, rule }[]` redacted before the agent saw it (P4 populates richer rules). */\n @Property({ name: 'redaction_applied', type: 'jsonb', nullable: true })\n redactionApplied?: unknown | null\n\n /** storage-s3 ref to the packed context payload (P4 offloads the full payload). */\n @Property({ name: 'payload_ref', type: 'varchar', length: 500, nullable: true })\n payloadRef?: string | null\n\n @Property({ name: 'created_at', type: Date, onCreate: () => new Date() })\n createdAt: Date = new Date()\n}\n\n/**\n * The AUTHORED business definition of a process (business-process \u2194 workflow\n * unification spec, 2026-09-06): what the process is FOR. It POINTS AT a\n * `workflows` definition and never restates its execution semantics \u2014 sequence,\n * retry, timers, waits, signals, branches and failure handling all belong to the\n * workflow, which is the single lifecycle owner of every execution.\n *\n * There is deliberately no agent target. A single-agent process materializes a\n * real `START \u2192 INVOKE_AGENT \u2192 END` workflow definition instead\n * (`lib/processes/materializeAgentWorkflow.ts`), so one engine runs everything\n * and the user can grow the process by editing it in the Studio.\n *\n * Execution identity is likewise NOT here: the bound `WorkflowDefinition` owns\n * `grantedFeatures` and the least-privilege `auth` principal core provisions from\n * it. `ProcessInstance.triggeredBy` records the INVOKER, which is provenance and\n * never an ACL identity \u2014 permission to start a process is not the permission set\n * the process runs with.\n *\n * User-editable \u2192 carries `updated_at` for optimistic locking (default ON).\n */\n@Entity({ tableName: 'process_definitions' })\n@Index({ name: 'process_definitions_tenant_org_idx', properties: ['tenantId', 'organizationId'] })\n@Index({ name: 'process_definitions_workflow_idx', properties: ['organizationId', 'workflowId'] })\n// The event dispatcher's lookup is a containment probe over this jsonb\n// (`triggers @> '[{\"kind\":\"event\",\"eventPattern\":\"claims.claim.reported\"}]'`).\n// `jsonb_path_ops` is the smaller, faster opclass and supports exactly the `@>`\n// operator that probe uses. Declared via `@Index({ expression })` so\n// `db:generate` stays aware of it.\n@Index({\n name: 'process_definitions_triggers_gin',\n expression:\n `create index \"process_definitions_triggers_gin\" on \"process_definitions\" using gin (\"triggers\" jsonb_path_ops)`,\n})\nexport class ProcessDefinition {\n [OptionalProps]?:\n | 'description'\n | 'inputDefaults'\n | 'inputSchema'\n | 'outcomeSchema'\n | 'triggers'\n | 'milestones'\n | 'uiMetadata'\n | 'enabled'\n | 'createdBy'\n | 'createdAt'\n | 'updatedAt'\n | 'deletedAt'\n\n @PrimaryKey({ type: 'uuid', defaultRaw: 'gen_random_uuid()' })\n id!: string\n\n @Property({ name: 'tenant_id', type: 'uuid' })\n tenantId!: string\n\n @Property({ name: 'organization_id', type: 'uuid' })\n organizationId!: string\n\n @Property({ name: 'name', type: 'varchar', length: 255 })\n name!: string\n\n @Property({ name: 'description', type: 'text', nullable: true })\n description?: string | null\n\n /**\n * `WorkflowDefinition.workflowId` \u2014 FK id only, never an ORM relation. REQUIRED:\n * a business process with no workflow has no execution engine, which is the\n * exact split this model removes.\n */\n @Property({ name: 'workflow_id', type: 'varchar', length: 150 })\n workflowId!: string\n\n /** Default input merged under the run-time input; encrypted (encryption.ts). */\n @Property({ name: 'input_defaults', type: 'jsonb', nullable: true })\n inputDefaults?: unknown | null\n\n /** Optional JSON-Schema (OUTCOME-compatible subset) validating start input. */\n @Property({ name: 'input_schema', type: 'jsonb', nullable: true })\n inputSchema?: unknown | null\n\n /**\n * Optional JSON-Schema describing the BUSINESS outcome a completed execution\n * produces. Documentation and validation of `ProcessInstance.outcome_*`, not a\n * completion requirement: a research or monitoring process produces nothing and\n * completes perfectly validly.\n */\n @Property({ name: 'outcome_schema', type: 'jsonb', nullable: true })\n outcomeSchema?: unknown | null\n\n /**\n * The declared entry points (`ProcessTrigger[]`, `.max(20)`): `schedule`,\n * `event` and `manual` \u2014 which makes hand-starting a declared capability rather\n * than an undocumented one. A definition with no `manual` trigger 403s on the\n * start route. Every kind converges on ONE command that starts a workflow.\n */\n @Property({ name: 'triggers', type: 'jsonb', nullable: true, default: '[]' })\n triggers?: ProcessTrigger[] | null\n\n /**\n * The declared milestone VOCABULARY (`ProcessMilestone[]`, `.max(50)`):\n * `{ key, label, order }`. A milestone is a business EVENT the workflow emits\n * (a step declares `milestone: '<key>'` in its advanced config), NOT an alias\n * for a step \u2014 so a stage can be reached after a parallel join, after a retry,\n * or after ten steps, and the business reader never learns there were branches.\n * A declared key no step emits is a WARNING, never an error: a definition\n * mid-edit must stay saveable.\n */\n @Property({ name: 'milestones', type: 'jsonb', nullable: true, default: '[]' })\n milestones?: ProcessMilestone[] | null\n\n /** Optional presentation hints (icon, accent, column preferences). Display only. */\n @Property({ name: 'ui_metadata', type: 'jsonb', nullable: true })\n uiMetadata?: unknown | null\n\n @Property({ name: 'enabled', type: 'boolean', default: true })\n enabled: boolean = true\n\n /** FK id \u2192 auth.users; the admin who created the definition. */\n @Property({ name: 'created_by', type: 'uuid', nullable: true })\n createdBy?: string | null\n\n @Property({ name: 'created_at', type: Date, onCreate: () => new Date() })\n createdAt: Date = new Date()\n\n @Property({ name: 'updated_at', type: Date, onCreate: () => new Date(), onUpdate: () => new Date() })\n updatedAt: Date = new Date()\n\n @Property({ name: 'deleted_at', type: Date, nullable: true })\n deletedAt?: Date | null\n}\n\n/** Derived display status of a `ProcessInstance` (first match wins \u2014 see `deriveProcessStatus`). */\nexport type ProcessInstanceStatus =\n | 'running'\n | 'waiting_on_you'\n | 'question_open'\n | 'docs_requested'\n | 'fraud_hold'\n | 'auto_completing'\n | 'auto_completed'\n | 'completed'\n | 'failed'\n | 'cancelled'\n\n/**\n * The business-facing READ MODEL of one execution \u2014 ONE row per\n * `WorkflowInstance`. It is a PROJECTION and decides nothing: the workflow\n * instance is the single lifecycle owner, and every field here is recomputed\n * from that instance, this module's own run/proposal rows and the milestone\n * events, by an idempotent recompute-from-source service\n * (`lib/processes/processProjection.ts`, rebuildable via the\n * `rebuild-processes` CLI).\n *\n * `status` is DERIVED. There is deliberately no second status column in the\n * system: the predecessor model kept one here and another on the deleted\n * `agent_process_runs` ledger, and the two could disagree on redelivery, on a\n * crash between the writes, or while an instance parked at a USER_TASK.\n *\n * The row is created BEFORE the instance exists (the start command writes it,\n * then the worker starts the workflow and stamps `workflow_instance_id`), which\n * is what lets the business-execution idempotency key live here: the partial\n * unique index below is the lock that makes one key produce exactly one\n * `WorkflowInstance`, no matter how many callers race.\n *\n * Filter-driving subject facets (`subject_type`/`subject_value_minor`/\n * `subject_fraud`) are deliberately PLAINTEXT typed columns (SQL-filterable);\n * only the free-text `subject_title` and the `input`/`failure_reason` pair are\n * encrypted (encryption.ts). Other modules are referenced by FK id only.\n */\n@Entity({ tableName: 'process_instances' })\n@Index({ name: 'process_instances_tenant_org_idx', properties: ['tenantId', 'organizationId'] })\n@Index({ name: 'process_instances_status_idx', properties: ['organizationId', 'status', 'lastActivityAt'] })\n@Index({ name: 'process_instances_value_idx', properties: ['organizationId', 'subjectValueMinor'] })\n@Index({ name: 'process_instances_definition_idx', properties: ['processDefinitionId', 'createdAt'] })\n@Index({ name: 'process_instances_source_idx', properties: ['sourceEntityType', 'sourceEntityId'] })\n// One LIVE projection per (tenant, org, workflow instance) \u2014 the 1:1 that makes\n// this a projection rather than a second execution record.\n@Index({\n name: 'process_instances_workflow_instance_uq',\n expression:\n `create unique index \"process_instances_workflow_instance_uq\" on \"process_instances\" (\"tenant_id\", \"organization_id\", \"workflow_instance_id\") where \"deleted_at\" is null and \"workflow_instance_id\" is not null`,\n})\n// The BUSINESS-EXECUTION idempotency lock: one (definition, key) can never\n// produce two executions, and therefore never two workflow instances.\n@Index({\n name: 'process_instances_idempotency_uq',\n expression:\n `create unique index \"process_instances_idempotency_uq\" on \"process_instances\" (\"organization_id\", \"process_definition_id\", \"idempotency_key\") where \"idempotency_key\" is not null`,\n})\nexport class ProcessInstance {\n [OptionalProps]?: 'processDefinitionId' | 'workflowInstanceId' | 'workflowId' | 'workflowVersion'\n | 'triggeredBy' | 'idempotencyKey' | 'input' | 'sourceEntityType' | 'sourceEntityId'\n | 'subjectType' | 'subjectId' | 'subjectLabel' | 'subjectTitle' | 'subjectFacets'\n | 'subjectValueMinor' | 'subjectFraud'\n | 'status' | 'currentStage' | 'milestonesReached' | 'agentIds' | 'costMinor' | 'currency'\n | 'runCount' | 'pendingProposalCount'\n | 'outcomeType' | 'outcomeId' | 'outcomeLabel' | 'failureReason'\n | 'assigneeUserId' | 'teamId' | 'waitingSince' | 'lastActivityAt' | 'completedAt'\n | 'createdAt' | 'updatedAt' | 'deletedAt'\n\n @PrimaryKey({ type: 'uuid', defaultRaw: 'gen_random_uuid()' })\n id!: string\n\n @Property({ name: 'tenant_id', type: 'uuid' })\n tenantId!: string\n\n @Property({ name: 'organization_id', type: 'uuid' })\n organizationId!: string\n\n /**\n * FK id \u2192 `workflows` instance; NOT an ORM relation. Nullable only for the\n * window between the start command's insert and the worker stamping the\n * started instance \u2014 never null for an execution that is actually running.\n */\n @Property({ name: 'workflow_instance_id', type: 'uuid', nullable: true })\n workflowInstanceId?: string | null\n\n /**\n * FK id \u2192 process_definitions. NULLABLE BY DESIGN: an instance started\n * directly from the workflow Studio still projects here, it simply has no\n * business definition above it.\n */\n @Property({ name: 'process_definition_id', type: 'uuid', nullable: true })\n processDefinitionId?: string | null\n\n /** Denormalized workflow identity, so history survives a definition edit. */\n @Property({ name: 'workflow_id', type: 'varchar', length: 200, nullable: true })\n workflowId?: string | null\n\n @Property({ name: 'workflow_version', type: 'varchar', length: 50, nullable: true })\n workflowVersion?: string | null\n\n /**\n * WHICH declared trigger started it: `{ kind: 'schedule' }`, `{ kind: 'event',\n * ref: <eventPattern> }`, `{ kind: 'manual', ref: <userId> }`. The INVOKER\n * identity \u2014 provenance only, NEVER an ACL identity. The execution identity is\n * the bound workflow definition's own least-privilege principal.\n */\n @Property({ name: 'triggered_by', type: 'jsonb', nullable: true })\n triggeredBy?: ProcessRunTriggeredBy | null\n\n /** Business-execution idempotency key; unique per (org, definition) \u2014 see the index above. */\n @Property({ name: 'idempotency_key', type: 'varchar', length: 200, nullable: true })\n idempotencyKey?: string | null\n\n /** The resolved start input (defaults merged under the caller's); encrypted (encryption.ts). */\n @Property({ name: 'input', type: 'jsonb', nullable: true })\n input?: unknown | null\n\n /** Correlates to the triggering business record for cross-module launches. */\n @Property({ name: 'source_entity_type', type: 'varchar', length: 100, nullable: true })\n sourceEntityType?: string | null\n\n @Property({ name: 'source_entity_id', type: 'uuid', nullable: true })\n sourceEntityId?: string | null\n\n // \u2500\u2500 Subject (the business record this process is about) \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\n /** e.g. 'Motor' \u2014 TYPE column + filter. Plaintext: must be SQL-queryable. */\n @Property({ name: 'subject_type', type: 'varchar', length: 100, nullable: true })\n subjectType?: string | null\n\n /** Business record id (opaque; FK by value only). */\n @Property({ name: 'subject_id', type: 'varchar', length: 200, nullable: true })\n subjectId?: string | null\n\n /** e.g. 'CASE-2026-04417' \u2014 low-sensitivity ref kept plaintext for `q` search. */\n @Property({ name: 'subject_label', type: 'varchar', length: 200, nullable: true })\n subjectLabel?: string | null\n\n /**\n * Free-text, person-readable subject \u2014 encrypted (encryption.ts \u2192\n * `agent_orchestrator:process_instance`). Never SQL-filtered.\n */\n @Property({ name: 'subject_title', type: 'varchar', length: 300, nullable: true })\n subjectTitle?: string | null\n\n /** Claim value in minor units \u2014 High-value filter / value sort. Plaintext by design. Backed by a `bigint` column; hydrate as `number`, not MikroORM's default JS `bigint`. */\n @Property({ name: 'subject_value_minor', type: new BigIntType('number'), nullable: true })\n subjectValueMinor?: number | null\n\n /** Fraud signal \u2014 Fraud-flagged filter. Plaintext by design. */\n @Property({ name: 'subject_fraud', type: 'boolean', nullable: true })\n subjectFraud?: boolean | null\n\n /** Non-filterable display extras only (never queried in SQL). Zod-validated. */\n @Property({ name: 'subject_facets', type: 'jsonb', nullable: true })\n subjectFacets?: unknown | null\n\n // \u2500\u2500 Derived display + aggregates \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\n @Property({ name: 'status', type: 'varchar', length: 30, default: 'running' })\n status: ProcessInstanceStatus = 'running'\n\n @Property({ name: 'current_stage', type: 'varchar', length: 100, nullable: true })\n currentStage?: string | null\n\n /**\n * The business milestones this execution has reached, in emission order\n * (`ProcessMilestoneReached[]`). Appended from the workflow's\n * `milestone_reached` events, idempotent per key \u2014 the business narrative,\n * carrying no step ids at all.\n */\n @Property({ name: 'milestones_reached', type: 'jsonb', nullable: true, default: '[]' })\n milestonesReached?: ProcessMilestoneReached[] | null\n\n /** Distinct agent ids that have run under this execution (AGENTS column). */\n @Property({ name: 'agent_ids', type: 'jsonb', nullable: true })\n agentIds?: string[] | null\n\n /** Backed by a `bigint` column; hydrate as `number`, not MikroORM's default JS `bigint`. */\n @Property({ name: 'cost_minor', type: new BigIntType('number'), nullable: true })\n costMinor?: number | null\n\n @Property({ name: 'currency', type: 'varchar', length: 3, nullable: true })\n currency?: string | null\n\n @Property({ name: 'run_count', type: 'integer', default: 0 })\n runCount: number = 0\n\n @Property({ name: 'pending_proposal_count', type: 'integer', default: 0 })\n pendingProposalCount: number = 0\n\n // \u2500\u2500 Outcome (what the BUSINESS execution produced) \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\n /**\n * Written when the workflow instance terminates, from the outcome the\n * terminating source DECLARED under its context `outcome` key. Nothing derives\n * one.\n *\n * Nullable BY DECISION, not by omission: a research or monitoring process\n * produces nothing and stays a valid completion, so an absent outcome is\n * NEVER a missing write.\n *\n * FK-id + snapshot per `packages/core/AGENTS.md` \u00A7 Cross-Module Coupling \u2014\n * `outcome_label` keeps the reference readable when the module that owns the\n * record is absent, and this is NEVER a cross-module ORM relation. Read\n * through `lib/tasks/outcome.ts`, never by touching the columns by hand.\n * Plaintext, like `subject_label`: a record reference, not free text.\n */\n @Property({ name: 'outcome_type', type: 'varchar', length: 150, nullable: true })\n outcomeType?: string | null\n\n @Property({ name: 'outcome_id', type: 'varchar', length: 200, nullable: true })\n outcomeId?: string | null\n\n @Property({ name: 'outcome_label', type: 'varchar', length: 200, nullable: true })\n outcomeLabel?: string | null\n\n /** May echo malformed input on validation failure; encrypted (encryption.ts). */\n @Property({ name: 'failure_reason', type: 'text', nullable: true })\n failureReason?: string | null\n\n // \u2500\u2500 Routing / SLA (mirrored from workflows for fast filtering) \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\n @Property({ name: 'assignee_user_id', type: 'uuid', nullable: true })\n assigneeUserId?: string | null\n\n @Property({ name: 'team_id', type: 'uuid', nullable: true })\n teamId?: string | null\n\n /** When the execution entered a human-waiting state (Stuck >24h filter). */\n @Property({ name: 'waiting_since', type: Date, nullable: true })\n waitingSince?: Date | null\n\n /** When the execution was entered (AGE column). */\n @Property({ name: 'opened_at', type: Date })\n openedAt!: Date\n\n @Property({ name: 'completed_at', type: Date, nullable: true })\n completedAt?: Date | null\n\n @Property({ name: 'last_activity_at', type: Date, onCreate: () => new Date() })\n lastActivityAt: Date = new Date()\n\n @Property({ name: 'created_at', type: Date, onCreate: () => new Date() })\n createdAt: Date = new Date()\n\n @Property({ name: 'updated_at', type: Date, onCreate: () => new Date(), onUpdate: () => new Date() })\n updatedAt: Date = new Date()\n\n @Property({ name: 'deleted_at', type: Date, nullable: true })\n deletedAt?: Date | null\n}\n\n/**\n * Per-(tenant, organization) presentation settings for an agent DEFINITION.\n * Agent definitions themselves are code/file-authored (see `defineAgent`), so\n * they are global and carry no per-tenant state \u2014 this table holds the tenant's\n * editable overrides for how an agent is presented in the cockpit. Today it\n * carries a single `icon` (a lucide icon name from `data/agentIcons.ts`) that\n * replaces the auto-generated initials avatar across the agent presentation\n * surfaces (agents list, overview \"Agent trust\" card, agent detail). Seeded\n * with sensible defaults in `setup.ts` \u2192 `seedDefaults`, idempotently.\n *\n * Editable \u2192 carries `updated_at` for optimistic locking. Keyed by the agent\n * definition id (a string like `deals.health_check`), referenced by id only \u2014\n * NOT an ORM relation \u2014 per the cross-module decoupling rule.\n */\n@Entity({ tableName: 'agent_settings' })\n@Index({ name: 'agent_settings_tenant_org_idx', properties: ['tenantId', 'organizationId'] })\n@Unique({ name: 'agent_settings_org_agent_uq', properties: ['tenantId', 'organizationId', 'agentId'] })\nexport class AgentSetting {\n [OptionalProps]?: 'icon' | 'tags' | 'createdAt' | 'updatedAt'\n\n @PrimaryKey({ type: 'uuid', defaultRaw: 'gen_random_uuid()' })\n id!: string\n\n @Property({ name: 'tenant_id', type: 'uuid' })\n tenantId!: string\n\n @Property({ name: 'organization_id', type: 'uuid' })\n organizationId!: string\n\n /** Agent DEFINITION id (e.g. `deals.health_check`). Not an FK \u2014 decoupled. */\n @Property({ name: 'agent_id', type: 'varchar', length: 100 })\n agentId!: string\n\n /** Lucide icon name from `AGENT_ICON_NAMES` (data/agentIcons.ts). Null = fall back to type glyph / initials. */\n @Property({ name: 'icon', type: 'varchar', length: 64, nullable: true })\n icon?: string | null\n\n /**\n * Free-form operator labels, normalized and deduped on write. Because the row\n * is keyed by agent id and not by an FK, tags survive an agent that is not in\n * the live registry (module uninstalled, agent renamed or turned off) and come\n * back with it.\n */\n @Property({ name: 'tags', type: 'jsonb', nullable: true })\n tags?: string[] | null\n\n @Property({ name: 'created_at', type: Date, onCreate: () => new Date() })\n createdAt: Date = new Date()\n\n @Property({ name: 'updated_at', type: Date, onCreate: () => new Date(), onUpdate: () => new Date() })\n updatedAt: Date = new Date()\n}\n\n// \u2500\u2500 File plane: agent-produced artifacts (attachments-in / artifacts-out) \u2500\u2500\u2500\u2500\u2500\n\n/** Where a captured artifact came from. `tool_output` is reserved for a future tool-file channel. */\nexport type AgentRunArtifactSource = 'agent_output' | 'tool_output'\n\n/**\n * One file an OpenCode file-agent produced in a run (scanned from the per-run\n * sandbox `out/` dir, hashed, and uploaded encrypted to `storage-s3`). Append-only\n * (immutable after capture, so no `updated_at`); keeps `deleted_at` for DSAR/erasure.\n * The file BYTES live in `storage-s3` (referenced by `storageKey`, encrypted at rest);\n * this row is inert metadata until an `attachments.attach_artifact` proposal is\n * approved and the effector materializes a durable `Attachment` (`promotedAttachmentId`).\n * Referenced by FK ids only (`runId`, `promotedAttachmentId`) \u2014 never an ORM relation.\n */\n@Entity({ tableName: 'agent_run_artifacts' })\n@Index({ name: 'agent_run_artifacts_tenant_org_idx', properties: ['tenantId', 'organizationId'] })\n@Index({ name: 'agent_run_artifacts_run_idx', properties: ['organizationId', 'runId'] })\n@Unique({ name: 'agent_run_artifacts_run_sha_uq', properties: ['runId', 'sha256', 'fileName'] })\nexport class AgentRunArtifact {\n [OptionalProps]?: 'source' | 'caption' | 'promotedAttachmentId' | 'createdAt' | 'deletedAt'\n\n @PrimaryKey({ type: 'uuid', defaultRaw: 'gen_random_uuid()' })\n id!: string\n\n @Property({ name: 'tenant_id', type: 'uuid' })\n tenantId!: string\n\n @Property({ name: 'organization_id', type: 'uuid' })\n organizationId!: string\n\n /** FK id \u2192 agent_runs; NOT an ORM relation. */\n @Property({ name: 'run_id', type: 'uuid' })\n runId!: string\n\n /** Sanitized basename produced by the agent (no path segments). Non-sensitive metadata. */\n @Property({ name: 'file_name', type: 'varchar', length: 255 })\n fileName!: string\n\n @Property({ name: 'mime_type', type: 'varchar', length: 150 })\n mimeType!: string\n\n @Property({ name: 'file_size', type: 'integer' })\n fileSize!: number\n\n @Property({ name: 'sha256', type: 'varchar', length: 64 })\n sha256!: string\n\n /** storage-s3 object key; bytes encrypted at rest. */\n @Property({ name: 'storage_key', type: 'varchar', length: 500 })\n storageKey!: string\n\n /** Agent-supplied description; encrypted (encryption.ts \u2192 `agent_orchestrator:agent_run_artifact`). */\n @Property({ name: 'caption', type: 'text', nullable: true })\n caption?: string | null\n\n @Property({ name: 'source', type: 'varchar', length: 20, default: 'agent_output' })\n source: AgentRunArtifactSource = 'agent_output'\n\n /** Set when an `attachments.attach_artifact` proposal is approved and the effector runs. */\n @Property({ name: 'promoted_attachment_id', type: 'uuid', nullable: true })\n promotedAttachmentId?: string | null\n\n @Property({ name: 'created_at', type: Date, onCreate: () => new Date() })\n createdAt: Date = new Date()\n\n @Property({ name: 'deleted_at', type: Date, nullable: true })\n deletedAt?: Date | null\n}\n\n// \u2500\u2500 Eval plane: suite runs and case runs \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\n\nexport type EvalSuiteTrigger = 'manual' | 'ci' | 'scheduled'\nexport type EvalSuiteStatus = 'queued' | 'running' | 'completed' | 'failed' | 'cancelled'\nexport type EvalSuiteOutcome = 'passed' | 'failed' | 'advisory'\n\n/**\n * One execution of an evaluation over a set of cases. Append-only (no\n * `updated_at`/`deleted_at`) and retained >=6 years: gate-run summaries are legal\n * records, not CI-log ephemera.\n *\n * `releaseId` is nullable so ONE entity serves both planes \u2014 an ad-hoc workbench\n * run has no release and pins no dataset snapshot, while a CI gate run has both.\n * Other modules referenced by FK id only.\n */\n@Entity({ tableName: 'agent_eval_suite_runs' })\n@Index({ name: 'agent_eval_suite_runs_tenant_org_idx', properties: ['tenantId', 'organizationId'] })\n@Index({ name: 'agent_eval_suite_runs_agent_idx', properties: ['organizationId', 'agentDefinitionId', 'createdAt'] })\n@Index({ name: 'agent_eval_suite_runs_release_idx', properties: ['releaseId', 'createdAt'] })\nexport class AgentEvalSuiteRun {\n [OptionalProps]?:\n | 'releaseId' | 'outcome' | 'evalSetVersion' | 'passScore' | 'scoreVariance'\n | 'safetyRegressions' | 'baselineSuiteRunId' | 'summary' | 'triggeredBy'\n | 'startedAt' | 'finishedAt' | 'errorCount' | 'createdAt'\n\n @PrimaryKey({ type: 'uuid', defaultRaw: 'gen_random_uuid()' })\n id!: string\n\n @Property({ name: 'tenant_id', type: 'uuid' })\n tenantId!: string\n\n @Property({ name: 'organization_id', type: 'uuid' })\n organizationId!: string\n\n /** The subject under test \u2014 the only field both planes always have. */\n @Property({ name: 'agent_definition_id', type: 'varchar', length: 100 })\n agentDefinitionId!: string\n\n /** FK id -> agent_releases (lifecycle spec). Null for ad-hoc workbench runs. */\n @Property({ name: 'release_id', type: 'uuid', nullable: true })\n releaseId?: string | null\n\n @Property({ name: 'trigger', type: 'varchar', length: 20 })\n trigger!: EvalSuiteTrigger\n\n @Property({ name: 'status', type: 'varchar', length: 20, default: 'queued' })\n status: EvalSuiteStatus = 'queued'\n\n @Property({ name: 'outcome', type: 'varchar', length: 12, nullable: true })\n outcome?: EvalSuiteOutcome | null\n\n /** Records the gate policy in force, so a stored result is self-describing. */\n @Property({ name: 'judge_may_gate', type: 'boolean' })\n judgeMayGate!: boolean\n\n @Property({ name: 'repeat_count', type: 'integer', default: 1 })\n repeatCount: number = 1\n\n @Property({ name: 'case_count', type: 'integer' })\n caseCount!: number\n\n /** Errored != failed: excluded from passScore and reported separately. */\n @Property({ name: 'error_count', type: 'integer', default: 0 })\n errorCount: number = 0\n\n /** Pinned dataset snapshot; null for ad-hoc runs. */\n @Property({ name: 'eval_set_version', type: 'varchar', length: 100, nullable: true })\n evalSetVersion?: string | null\n\n /** Mean over non-errored, non-skipped case runs. Null when nothing was measurable. */\n @Property({ name: 'pass_score', type: 'float', nullable: true })\n passScore?: number | null\n\n /** Null when repeatCount = 1 \u2014 variance is only meaningful across trials. */\n @Property({ name: 'score_variance', type: 'float', nullable: true })\n scoreVariance?: number | null\n\n /** Assertion keys that regressed vs the baseline; non-empty => the caller blocks. */\n @Property({ name: 'safety_regressions', type: 'jsonb', nullable: true })\n safetyRegressions?: unknown | null\n\n @Property({ name: 'baseline_suite_run_id', type: 'uuid', nullable: true })\n baselineSuiteRunId?: string | null\n\n /** Per-assertion pass/fail plus judge counts. Encrypted: may quote agent output. */\n @Property({ name: 'summary', type: 'jsonb', nullable: true })\n summary?: unknown | null\n\n /** `'ci'` or the invoking userId. */\n @Property({ name: 'triggered_by', type: 'varchar', length: 100, nullable: true })\n triggeredBy?: string | null\n\n @Property({ name: 'started_at', type: Date, nullable: true })\n startedAt?: Date | null\n\n @Property({ name: 'finished_at', type: Date, nullable: true })\n finishedAt?: Date | null\n\n @Property({ name: 'created_at', type: Date, onCreate: () => new Date() })\n createdAt: Date = new Date()\n}\n\nexport type EvalCaseRunStatus = 'pending' | 'running' | 'passed' | 'failed' | 'error' | 'skipped'\n\n/**\n * One case, executed once, inside a suite run. Append-only.\n *\n * `agentRunId` is the load-bearing link: every case run points at a REAL AgentRun\n * with real spans, tool calls, tokens and cost, so the existing trace inspector\n * works on eval runs with no new UI. It is null only when the run never started\n * (admission refused, agent unresolved), and such a case run produces no\n * AgentEvalResult rows \u2014 which is why AgentEvalResult.agent_run_id stays NOT NULL.\n */\n@Entity({ tableName: 'agent_eval_case_runs' })\n@Index({ name: 'agent_eval_case_runs_tenant_org_idx', properties: ['tenantId', 'organizationId'] })\n@Index({ name: 'agent_eval_case_runs_suite_idx', properties: ['suiteRunId', 'createdAt'] })\n@Index({ name: 'agent_eval_case_runs_case_idx', properties: ['evalCaseId', 'createdAt'] })\nexport class AgentEvalCaseRun {\n [OptionalProps]?:\n | 'agentRunId' | 'trialIndex' | 'status' | 'score' | 'passed'\n | 'latencyMs' | 'costMinor' | 'errorMessage' | 'createdAt'\n\n @PrimaryKey({ type: 'uuid', defaultRaw: 'gen_random_uuid()' })\n id!: string\n\n @Property({ name: 'tenant_id', type: 'uuid' })\n tenantId!: string\n\n @Property({ name: 'organization_id', type: 'uuid' })\n organizationId!: string\n\n /** FK id -> agent_eval_suite_runs. */\n @Property({ name: 'suite_run_id', type: 'uuid' })\n suiteRunId!: string\n\n /** FK id -> agent_eval_cases. */\n @Property({ name: 'eval_case_id', type: 'uuid' })\n evalCaseId!: string\n\n /** FK id -> agent_runs. Null when the run never started. */\n @Property({ name: 'agent_run_id', type: 'uuid', nullable: true })\n agentRunId?: string | null\n\n /** 0-based trial index when the suite runs each case more than once. */\n @Property({ name: 'trial_index', type: 'integer', default: 0 })\n trialIndex: number = 0\n\n @Property({ name: 'status', type: 'varchar', length: 20, default: 'pending' })\n status: EvalCaseRunStatus = 'pending'\n\n @Property({ name: 'score', type: 'float', nullable: true })\n score?: number | null\n\n /** Null means SKIPPED \u2014 excluded from both score and pass aggregation. */\n @Property({ name: 'passed', type: 'boolean', nullable: true })\n passed?: boolean | null\n\n @Property({ name: 'latency_ms', type: 'integer', nullable: true })\n latencyMs?: number | null\n\n @Property({ name: 'cost_minor', type: 'integer', nullable: true })\n costMinor?: number | null\n\n /** Encrypted: a failure message can quote model output. */\n @Property({ name: 'error_message', type: 'text', nullable: true })\n errorMessage?: string | null\n\n @Property({ name: 'created_at', type: Date, onCreate: () => new Date() })\n createdAt: Date = new Date()\n}\n"],
5
+ "mappings": ";;;;;;;;;;AAAA,SAAS,YAAY,qBAAqB;AAC1C,SAAS,QAAQ,OAAO,YAAY,UAAU,cAAc;AAuCzD;AADI,IAAM,WAAN,MAAe;AAAA,EAAf;AAwDL,kBAAyB;AA8GzB,kBAAyB;AAiCzB,qBAAkB,oBAAI,KAAK;AAG3B,qBAAkB,oBAAI,KAAK;AAAA;AAI7B;AAvKE;AAAA,EADC,WAAW,EAAE,MAAM,QAAQ,YAAY,oBAAoB,CAAC;AAAA,GAtClD,SAuCX;AAGA;AAAA,EADC,SAAS,EAAE,MAAM,aAAa,MAAM,OAAO,CAAC;AAAA,GAzClC,SA0CX;AAGA;AAAA,EADC,SAAS,EAAE,MAAM,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F,MAAM,EAAE,MAAM,iCAAiC,YAAY,CAAC,cAAc,WAAW,EAAE,CAAC;AAAA,GAC5E;",
6
6
  "names": []
7
7
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@open-mercato/enterprise",
3
- "version": "0.8.1-develop.7228.1.b7ea09d2d3",
3
+ "version": "0.8.1-develop.7238.1.3abe669ea5",
4
4
  "license": "SEE LICENSE IN LICENSE.md",
5
5
  "type": "module",
6
6
  "main": "./dist/index.js",
@@ -70,12 +70,12 @@
70
70
  "@dnd-kit/core": "^6.3.1",
71
71
  "@dnd-kit/sortable": "^10.0.0",
72
72
  "@dnd-kit/utilities": "^3.2.2",
73
- "@open-mercato/ai-assistant": "0.8.1-develop.7228.1.b7ea09d2d3",
74
- "@open-mercato/core": "0.8.1-develop.7228.1.b7ea09d2d3",
75
- "@open-mercato/queue": "0.8.1-develop.7228.1.b7ea09d2d3",
76
- "@open-mercato/scheduler": "0.8.1-develop.7228.1.b7ea09d2d3",
77
- "@open-mercato/ui": "0.8.1-develop.7228.1.b7ea09d2d3",
78
- "@open-mercato/web-research": "0.8.1-develop.7228.1.b7ea09d2d3",
73
+ "@open-mercato/ai-assistant": "0.8.1-develop.7238.1.3abe669ea5",
74
+ "@open-mercato/core": "0.8.1-develop.7238.1.3abe669ea5",
75
+ "@open-mercato/queue": "0.8.1-develop.7238.1.3abe669ea5",
76
+ "@open-mercato/scheduler": "0.8.1-develop.7238.1.3abe669ea5",
77
+ "@open-mercato/ui": "0.8.1-develop.7238.1.3abe669ea5",
78
+ "@open-mercato/web-research": "0.8.1-develop.7238.1.3abe669ea5",
79
79
  "@simplewebauthn/browser": "^13.3.0",
80
80
  "@simplewebauthn/server": "^13.3.2",
81
81
  "@simplewebauthn/types": "^12.0.0",
@@ -87,13 +87,13 @@
87
87
  },
88
88
  "peerDependencies": {
89
89
  "@mikro-orm/core": "^7.0.14",
90
- "@open-mercato/shared": "0.8.1-develop.7228.1.b7ea09d2d3",
90
+ "@open-mercato/shared": "0.8.1-develop.7238.1.3abe669ea5",
91
91
  "react": "^19.0.0",
92
92
  "react-dom": "^19.0.0",
93
93
  "zod": ">=3.23.0"
94
94
  },
95
95
  "devDependencies": {
96
- "@open-mercato/shared": "0.8.1-develop.7228.1.b7ea09d2d3",
96
+ "@open-mercato/shared": "0.8.1-develop.7238.1.3abe669ea5",
97
97
  "@types/jest": "^30.0.0",
98
98
  "@types/react": "^19.2.18",
99
99
  "@types/react-dom": "^19.2.5",
@@ -1,4 +1,4 @@
1
- import { OptionalProps } from '@mikro-orm/core'
1
+ import { BigIntType, OptionalProps } from '@mikro-orm/core'
2
2
  import { Entity, Index, PrimaryKey, Property, Unique } from '@mikro-orm/decorators/legacy'
3
3
  import type {
4
4
  AgentType,
@@ -155,7 +155,8 @@ export class AgentRun {
155
155
  @Property({ name: 'output_tokens', type: 'integer', nullable: true })
156
156
  outputTokens?: number | null
157
157
 
158
- @Property({ name: 'cost_minor', type: 'bigint', nullable: true })
158
+ /** Backed by a `bigint` column; hydrate as `number` (safe under Number.MAX_SAFE_INTEGER for minor-unit costs) instead of MikroORM's default JS `bigint`. */
159
+ @Property({ name: 'cost_minor', type: new BigIntType('number'), nullable: true })
159
160
  costMinor?: number | null
160
161
 
161
162
  @Property({ name: 'currency', type: 'varchar', length: 3, nullable: true })
@@ -1506,8 +1507,8 @@ export class ProcessInstance {
1506
1507
  @Property({ name: 'subject_title', type: 'varchar', length: 300, nullable: true })
1507
1508
  subjectTitle?: string | null
1508
1509
 
1509
- /** Claim value in minor units — High-value filter / value sort. Plaintext by design. */
1510
- @Property({ name: 'subject_value_minor', type: 'bigint', nullable: true })
1510
+ /** Claim value in minor units — High-value filter / value sort. Plaintext by design. Backed by a `bigint` column; hydrate as `number`, not MikroORM's default JS `bigint`. */
1511
+ @Property({ name: 'subject_value_minor', type: new BigIntType('number'), nullable: true })
1511
1512
  subjectValueMinor?: number | null
1512
1513
 
1513
1514
  /** Fraud signal — Fraud-flagged filter. Plaintext by design. */
@@ -1538,7 +1539,8 @@ export class ProcessInstance {
1538
1539
  @Property({ name: 'agent_ids', type: 'jsonb', nullable: true })
1539
1540
  agentIds?: string[] | null
1540
1541
 
1541
- @Property({ name: 'cost_minor', type: 'bigint', nullable: true })
1542
+ /** Backed by a `bigint` column; hydrate as `number`, not MikroORM's default JS `bigint`. */
1543
+ @Property({ name: 'cost_minor', type: new BigIntType('number'), nullable: true })
1542
1544
  costMinor?: number | null
1543
1545
 
1544
1546
  @Property({ name: 'currency', type: 'varchar', length: 3, nullable: true })