From 4d4c023fed083b4ca32f3e5b19d6730e4baa1994 Mon Sep 17 00:00:00 2001 From: root Date: Mon, 28 Sep 2026 02:34:04 +0800 Subject: [PATCH] fix(db): regenerate types.ts from migrations (repair misplaced pi_upstream block) The committed types.ts had the pi_upstream interface spliced into the middle of PolicyRevisionTable (and upstream_id / DB entry in the wrong places), which broke typecheck at HEAD. Regenerated with gen:types against a database migrated to 0028. Co-Authored-By: Claude Opus 5.5 --- packages/db/src/types.ts | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/packages/db/src/types.ts b/packages/db/src/types.ts index a3133a0f..554b2b09 100644 --- a/packages/db/src/types.ts +++ b/packages/db/src/types.ts @@ -343,12 +343,12 @@ export interface AgentRunTable { updated_at: GeneratedTimestamptz; mode: Generated; dedupe_key: string | null; + upstream_id: string | null; } export interface AgentRunEventTable { run_id: string; seq: number; - upstream_id: string | null; type: AgentRunEventType; at: GeneratedTimestamptz; payload: Generated; @@ -1000,11 +1000,6 @@ export interface PathMappingTable { updated_at: GeneratedTimestamptz; } -export interface PolicyRevisionTable { - id: Generated; - policy_key: string; - revision: number; - kind: PolicyRevisionKind; export interface PiUpstreamTable { id: Generated; name: string; @@ -1024,6 +1019,11 @@ export interface PiUpstreamTable { updated_at: GeneratedTimestamptz; } +export interface PolicyRevisionTable { + id: Generated; + policy_key: string; + revision: number; + kind: PolicyRevisionKind; status: Generated; title: string; summary: string | null; @@ -1469,6 +1469,7 @@ export interface DB { outbox_event: OutboxEventTable; path_binding: PathBindingTable; path_mapping: PathMappingTable; + pi_upstream: PiUpstreamTable; policy_revision: PolicyRevisionTable; preference_suppression: PreferenceSuppressionTable; preference_tag: PreferenceTagTable; @@ -1518,7 +1519,6 @@ export type AgentRunMessageRow = Selectable; export type NewAgentRunMessage = Insertable; export type AgentRunMessageUpdate = Updateable; export type ApiKeyRow = Selectable; - pi_upstream: PiUpstreamTable; export type NewApiKey = Insertable; export type ApiKeyUpdate = Updateable; export type ApprovalRow = Selectable; @@ -1623,6 +1623,9 @@ export type PathBindingUpdate = Updateable; export type PathMappingRow = Selectable; export type NewPathMapping = Insertable; export type PathMappingUpdate = Updateable; +export type PiUpstreamRow = Selectable; +export type NewPiUpstream = Insertable; +export type PiUpstreamUpdate = Updateable; export type PolicyRevisionRow = Selectable; export type NewPolicyRevision = Insertable; export type PolicyRevisionUpdate = Updateable; @@ -1678,9 +1681,6 @@ export type SubscriptionRow = Selectable; export type NewSubscription = Insertable; export type SubscriptionUpdate = Updateable; export type SubscriptionHistoryRow = Selectable; -export type PiUpstreamRow = Selectable; -export type NewPiUpstream = Insertable; -export type PiUpstreamUpdate = Updateable; export type NewSubscriptionHistory = Insertable; export type SubscriptionHistoryUpdate = Updateable; export type TaskRow = Selectable;