@rudderhq/db 0.4.6-canary.8 → 0.5.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/client.test.js +629 -0
- package/dist/client.test.js.map +1 -1
- package/dist/embedded-postgres-recovery.d.ts +1 -0
- package/dist/embedded-postgres-recovery.d.ts.map +1 -1
- package/dist/embedded-postgres-recovery.js +33 -0
- package/dist/embedded-postgres-recovery.js.map +1 -1
- package/dist/embedded-postgres-recovery.test.js +19 -1
- package/dist/embedded-postgres-recovery.test.js.map +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +1 -1
- package/dist/index.js.map +1 -1
- package/dist/migration-runtime.d.ts.map +1 -1
- package/dist/migration-runtime.js +3 -20
- package/dist/migration-runtime.js.map +1 -1
- package/dist/migrations/0101_bizarre_morlun.sql +111 -0
- package/dist/migrations/0102_complex_retro_girl.sql +38 -0
- package/dist/migrations/0103_cute_colonel_america.sql +4 -0
- package/dist/migrations/0104_unusual_mister_fear.sql +173 -0
- package/dist/migrations/0105_chat_queue_actor_reconciliation.sql +54 -0
- package/dist/migrations/0106_damp_amphibian.sql +9 -0
- package/dist/migrations/meta/0101_snapshot.json +18860 -0
- package/dist/migrations/meta/0102_snapshot.json +19090 -0
- package/dist/migrations/meta/0103_snapshot.json +19114 -0
- package/dist/migrations/meta/0104_snapshot.json +20338 -0
- package/dist/migrations/meta/0105_snapshot.json +20338 -0
- package/dist/migrations/meta/0106_snapshot.json +20442 -0
- package/dist/migrations/meta/_journal.json +42 -0
- package/dist/schema/activity_log.d.ts +17 -0
- package/dist/schema/activity_log.d.ts.map +1 -1
- package/dist/schema/activity_log.js +6 -1
- package/dist/schema/activity_log.js.map +1 -1
- package/dist/schema/agent_wakeup_requests.d.ts.map +1 -1
- package/dist/schema/agent_wakeup_requests.js +5 -1
- package/dist/schema/agent_wakeup_requests.js.map +1 -1
- package/dist/schema/chat_control_actions.d.ts +442 -0
- package/dist/schema/chat_control_actions.d.ts.map +1 -0
- package/dist/schema/chat_control_actions.js +35 -0
- package/dist/schema/chat_control_actions.js.map +1 -0
- package/dist/schema/chat_conversations.d.ts +119 -0
- package/dist/schema/chat_conversations.d.ts.map +1 -1
- package/dist/schema/chat_conversations.js +10 -1
- package/dist/schema/chat_conversations.js.map +1 -1
- package/dist/schema/chat_generation_events.d.ts +268 -0
- package/dist/schema/chat_generation_events.d.ts.map +1 -0
- package/dist/schema/chat_generation_events.js +32 -0
- package/dist/schema/chat_generation_events.js.map +1 -0
- package/dist/schema/chat_generation_terminal_outbox.d.ts +370 -0
- package/dist/schema/chat_generation_terminal_outbox.d.ts.map +1 -0
- package/dist/schema/chat_generation_terminal_outbox.js +33 -0
- package/dist/schema/chat_generation_terminal_outbox.js.map +1 -0
- package/dist/schema/chat_generations.d.ts +279 -2
- package/dist/schema/chat_generations.d.ts.map +1 -1
- package/dist/schema/chat_generations.js +23 -2
- package/dist/schema/chat_generations.js.map +1 -1
- package/dist/schema/chat_queued_messages.d.ts +285 -2
- package/dist/schema/chat_queued_messages.d.ts.map +1 -1
- package/dist/schema/chat_queued_messages.js +23 -1
- package/dist/schema/chat_queued_messages.js.map +1 -1
- package/dist/schema/cost_events.d.ts +34 -0
- package/dist/schema/cost_events.d.ts.map +1 -1
- package/dist/schema/cost_events.js +5 -1
- package/dist/schema/cost_events.js.map +1 -1
- package/dist/schema/heartbeat_run_events.d.ts +17 -0
- package/dist/schema/heartbeat_run_events.d.ts.map +1 -1
- package/dist/schema/heartbeat_run_events.js +6 -1
- package/dist/schema/heartbeat_run_events.js.map +1 -1
- package/dist/schema/heartbeat_runs.d.ts +322 -0
- package/dist/schema/heartbeat_runs.d.ts.map +1 -1
- package/dist/schema/heartbeat_runs.js +26 -2
- package/dist/schema/heartbeat_runs.js.map +1 -1
- package/dist/schema/index.d.ts +3 -0
- package/dist/schema/index.d.ts.map +1 -1
- package/dist/schema/index.js +3 -0
- package/dist/schema/index.js.map +1 -1
- package/package.json +2 -2
|
@@ -708,6 +708,48 @@
|
|
|
708
708
|
"when": 1783928221647,
|
|
709
709
|
"tag": "0100_mean_richard_fisk",
|
|
710
710
|
"breakpoints": true
|
|
711
|
+
},
|
|
712
|
+
{
|
|
713
|
+
"idx": 101,
|
|
714
|
+
"version": "7",
|
|
715
|
+
"when": 1784045639352,
|
|
716
|
+
"tag": "0101_bizarre_morlun",
|
|
717
|
+
"breakpoints": true
|
|
718
|
+
},
|
|
719
|
+
{
|
|
720
|
+
"idx": 102,
|
|
721
|
+
"version": "7",
|
|
722
|
+
"when": 1784157206378,
|
|
723
|
+
"tag": "0102_complex_retro_girl",
|
|
724
|
+
"breakpoints": true
|
|
725
|
+
},
|
|
726
|
+
{
|
|
727
|
+
"idx": 103,
|
|
728
|
+
"version": "7",
|
|
729
|
+
"when": 1784171841585,
|
|
730
|
+
"tag": "0103_cute_colonel_america",
|
|
731
|
+
"breakpoints": true
|
|
732
|
+
},
|
|
733
|
+
{
|
|
734
|
+
"idx": 104,
|
|
735
|
+
"version": "7",
|
|
736
|
+
"when": 1784183586130,
|
|
737
|
+
"tag": "0104_unusual_mister_fear",
|
|
738
|
+
"breakpoints": true
|
|
739
|
+
},
|
|
740
|
+
{
|
|
741
|
+
"idx": 105,
|
|
742
|
+
"version": "7",
|
|
743
|
+
"when": 1784200477036,
|
|
744
|
+
"tag": "0105_chat_queue_actor_reconciliation",
|
|
745
|
+
"breakpoints": true
|
|
746
|
+
},
|
|
747
|
+
{
|
|
748
|
+
"idx": 106,
|
|
749
|
+
"version": "7",
|
|
750
|
+
"when": 1784400473615,
|
|
751
|
+
"tag": "0106_damp_amphibian",
|
|
752
|
+
"breakpoints": true
|
|
711
753
|
}
|
|
712
754
|
]
|
|
713
755
|
}
|
|
@@ -174,6 +174,23 @@ export declare const activityLog: import("drizzle-orm/pg-core").PgTableWithColum
|
|
|
174
174
|
}, {}, {
|
|
175
175
|
$type: Record<string, unknown>;
|
|
176
176
|
}>;
|
|
177
|
+
idempotencyKey: import("drizzle-orm/pg-core").PgColumn<{
|
|
178
|
+
name: "idempotency_key";
|
|
179
|
+
tableName: "activity_log";
|
|
180
|
+
dataType: "string";
|
|
181
|
+
columnType: "PgText";
|
|
182
|
+
data: string;
|
|
183
|
+
driverParam: string;
|
|
184
|
+
notNull: false;
|
|
185
|
+
hasDefault: false;
|
|
186
|
+
isPrimaryKey: false;
|
|
187
|
+
isAutoincrement: false;
|
|
188
|
+
hasRuntimeDefault: false;
|
|
189
|
+
enumValues: [string, ...string[]];
|
|
190
|
+
baseColumn: never;
|
|
191
|
+
identity: undefined;
|
|
192
|
+
generated: undefined;
|
|
193
|
+
}, {}, {}>;
|
|
177
194
|
createdAt: import("drizzle-orm/pg-core").PgColumn<{
|
|
178
195
|
name: "created_at";
|
|
179
196
|
tableName: "activity_log";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"activity_log.d.ts","sourceRoot":"","sources":["../../src/schema/activity_log.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"activity_log.d.ts","sourceRoot":"","sources":["../../src/schema/activity_log.ts"],"names":[],"mappings":"AAMA,eAAO,MAAM,WAAW;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EA8BvB,CAAC"}
|
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { sql } from "drizzle-orm";
|
|
2
|
+
import { index, jsonb, pgTable, text, timestamp, uniqueIndex, uuid } from "drizzle-orm/pg-core";
|
|
2
3
|
import { agents } from "./agents.js";
|
|
3
4
|
import { heartbeatRuns } from "./heartbeat_runs.js";
|
|
4
5
|
import { organizations } from "./organizations.js";
|
|
@@ -13,11 +14,15 @@ export const activityLog = pgTable("activity_log", {
|
|
|
13
14
|
agentId: uuid("agent_id").references(() => agents.id),
|
|
14
15
|
runId: uuid("run_id").references(() => heartbeatRuns.id),
|
|
15
16
|
details: jsonb("details").$type(),
|
|
17
|
+
idempotencyKey: text("idempotency_key"),
|
|
16
18
|
createdAt: timestamp("created_at", { withTimezone: true }).notNull().defaultNow(),
|
|
17
19
|
}, (table) => ({
|
|
18
20
|
companyCreatedIdx: index("activity_log_company_created_idx").on(table.orgId, table.createdAt),
|
|
19
21
|
runIdIdx: index("activity_log_run_id_idx").on(table.runId),
|
|
20
22
|
entityIdx: index("activity_log_entity_type_id_idx").on(table.entityType, table.entityId),
|
|
21
23
|
orgEntityCreatedIdx: index("activity_log_org_entity_created_idx").on(table.orgId, table.entityType, table.entityId, table.createdAt),
|
|
24
|
+
orgIdempotencyKeyUniqueIdx: uniqueIndex("activity_log_org_idempotency_key_uq")
|
|
25
|
+
.on(table.orgId, table.idempotencyKey)
|
|
26
|
+
.where(sql `${table.idempotencyKey} is not null`),
|
|
22
27
|
}));
|
|
23
28
|
//# sourceMappingURL=activity_log.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"activity_log.js","sourceRoot":"","sources":["../../src/schema/activity_log.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAE,KAAK,EAAE,OAAO,EAAE,IAAI,EAAE,SAAS,EAAE,IAAI,EAAE,MAAM,qBAAqB,CAAC;
|
|
1
|
+
{"version":3,"file":"activity_log.js","sourceRoot":"","sources":["../../src/schema/activity_log.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,GAAG,EAAE,MAAM,aAAa,CAAC;AAClC,OAAO,EAAE,KAAK,EAAE,KAAK,EAAE,OAAO,EAAE,IAAI,EAAE,SAAS,EAAE,WAAW,EAAE,IAAI,EAAE,MAAM,qBAAqB,CAAC;AAChG,OAAO,EAAE,MAAM,EAAE,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,CAAC,EAAE,CAAC,KAAK,CAAC,KAAK,EAAE,KAAK,CAAC,SAAS,CAAC;IAC7F,QAAQ,EAAE,KAAK,CAAC,yBAAyB,CAAC,CAAC,EAAE,CAAC,KAAK,CAAC,KAAK,CAAC;IAC1D,SAAS,EAAE,KAAK,CAAC,iCAAiC,CAAC,CAAC,EAAE,CAAC,KAAK,CAAC,UAAU,EAAE,KAAK,CAAC,QAAQ,CAAC;IACxF,mBAAmB,EAAE,KAAK,CAAC,qCAAqC,CAAC,CAAC,EAAE,CAClE,KAAK,CAAC,KAAK,EACX,KAAK,CAAC,UAAU,EAChB,KAAK,CAAC,QAAQ,EACd,KAAK,CAAC,SAAS,CAChB;IACD,0BAA0B,EAAE,WAAW,CAAC,qCAAqC,CAAC;SAC3E,EAAE,CAAC,KAAK,CAAC,KAAK,EAAE,KAAK,CAAC,cAAc,CAAC;SACrC,KAAK,CAAC,GAAG,CAAA,GAAG,KAAK,CAAC,cAAc,cAAc,CAAC;CACnD,CAAC,CACH,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"agent_wakeup_requests.d.ts","sourceRoot":"","sources":["../../src/schema/agent_wakeup_requests.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"agent_wakeup_requests.d.ts","sourceRoot":"","sources":["../../src/schema/agent_wakeup_requests.ts"],"names":[],"mappings":"AAKA,eAAO,MAAM,mBAAmB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAsC/B,CAAC"}
|
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { sql } from "drizzle-orm";
|
|
2
|
+
import { index, integer, jsonb, pgTable, text, timestamp, uniqueIndex, uuid } from "drizzle-orm/pg-core";
|
|
2
3
|
import { agents } from "./agents.js";
|
|
3
4
|
import { organizations } from "./organizations.js";
|
|
4
5
|
export const agentWakeupRequests = pgTable("agent_wakeup_requests", {
|
|
@@ -25,5 +26,8 @@ export const agentWakeupRequests = pgTable("agent_wakeup_requests", {
|
|
|
25
26
|
companyAgentStatusIdx: index("agent_wakeup_requests_company_agent_status_idx").on(table.orgId, table.agentId, table.status),
|
|
26
27
|
companyRequestedIdx: index("agent_wakeup_requests_company_requested_idx").on(table.orgId, table.requestedAt),
|
|
27
28
|
agentRequestedIdx: index("agent_wakeup_requests_agent_requested_idx").on(table.agentId, table.requestedAt),
|
|
29
|
+
companyAgentIdempotencyKeyUniqueIdx: uniqueIndex("agent_wakeup_requests_company_agent_idempotency_key_uq")
|
|
30
|
+
.on(table.orgId, table.agentId, table.idempotencyKey)
|
|
31
|
+
.where(sql `${table.idempotencyKey} is not null`),
|
|
28
32
|
}));
|
|
29
33
|
//# sourceMappingURL=agent_wakeup_requests.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"agent_wakeup_requests.js","sourceRoot":"","sources":["../../src/schema/agent_wakeup_requests.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAE,OAAO,EAAE,KAAK,EAAE,OAAO,EAAE,IAAI,EAAE,SAAS,EAAE,IAAI,EAAE,MAAM,qBAAqB,CAAC;
|
|
1
|
+
{"version":3,"file":"agent_wakeup_requests.js","sourceRoot":"","sources":["../../src/schema/agent_wakeup_requests.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,GAAG,EAAE,MAAM,aAAa,CAAC;AAClC,OAAO,EAAE,KAAK,EA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are const chatControlActions: import("drizzle-orm/pg-core").PgTableWithColumns<{
|
|
3
|
+
name: "chat_control_actions";
|
|
4
|
+
schema: undefined;
|
|
5
|
+
columns: {
|
|
6
|
+
id: import("drizzle-orm/pg-core").PgColumn<{
|
|
7
|
+
name: "id";
|
|
8
|
+
tableName: "chat_control_actions";
|
|
9
|
+
dataType: "string";
|
|
10
|
+
columnType: "PgUUID";
|
|
11
|
+
data: string;
|
|
12
|
+
driverParam: string;
|
|
13
|
+
notNull: true;
|
|
14
|
+
hasDefault: false;
|
|
15
|
+
isPrimaryKey: true;
|
|
16
|
+
isAutoincrement: false;
|
|
17
|
+
hasRuntimeDefault: false;
|
|
18
|
+
enumValues: undefined;
|
|
19
|
+
baseColumn: never;
|
|
20
|
+
identity: undefined;
|
|
21
|
+
generated: undefined;
|
|
22
|
+
}, {}, {}>;
|
|
23
|
+
orgId: import("drizzle-orm/pg-core").PgColumn<{
|
|
24
|
+
name: "org_id";
|
|
25
|
+
tableName: "chat_control_actions";
|
|
26
|
+
dataType: "string";
|
|
27
|
+
columnType: "PgUUID";
|
|
28
|
+
data: string;
|
|
29
|
+
driverParam: string;
|
|
30
|
+
notNull: true;
|
|
31
|
+
hasDefault: false;
|
|
32
|
+
isPrimaryKey: false;
|
|
33
|
+
isAutoincrement: false;
|
|
34
|
+
hasRuntimeDefault: false;
|
|
35
|
+
enumValues: undefined;
|
|
36
|
+
baseColumn: never;
|
|
37
|
+
identity: undefined;
|
|
38
|
+
generated: undefined;
|
|
39
|
+
}, {}, {}>;
|
|
40
|
+
expectedGenerationId: import("drizzle-orm/pg-core").PgColumn<{
|
|
41
|
+
name: "expected_generation_id";
|
|
42
|
+
tableName: "chat_control_actions";
|
|
43
|
+
dataType: "string";
|
|
44
|
+
columnType: "PgUUID";
|
|
45
|
+
data: string;
|
|
46
|
+
driverParam: string;
|
|
47
|
+
notNull: false;
|
|
48
|
+
hasDefault: false;
|
|
49
|
+
isPrimaryKey: false;
|
|
50
|
+
isAutoincrement: false;
|
|
51
|
+
hasRuntimeDefault: false;
|
|
52
|
+
enumValues: undefined;
|
|
53
|
+
baseColumn: never;
|
|
54
|
+
identity: undefined;
|
|
55
|
+
generated: undefined;
|
|
56
|
+
}, {}, {}>;
|
|
57
|
+
expectedAttemptEpoch: import("drizzle-orm/pg-core").PgColumn<{
|
|
58
|
+
name: "expected_attempt_epoch";
|
|
59
|
+
tableName: "chat_control_actions";
|
|
60
|
+
dataType: "number";
|
|
61
|
+
columnType: "PgInteger";
|
|
62
|
+
data: number;
|
|
63
|
+
driverParam: string | number;
|
|
64
|
+
notNull: false;
|
|
65
|
+
hasDefault: false;
|
|
66
|
+
isPrimaryKey: false;
|
|
67
|
+
isAutoincrement: false;
|
|
68
|
+
hasRuntimeDefault: false;
|
|
69
|
+
enumValues: undefined;
|
|
70
|
+
baseColumn: never;
|
|
71
|
+
identity: undefined;
|
|
72
|
+
generated: undefined;
|
|
73
|
+
}, {}, {}>;
|
|
74
|
+
expectedControlVersion: import("drizzle-orm/pg-core").PgColumn<{
|
|
75
|
+
name: "expected_control_version";
|
|
76
|
+
tableName: "chat_control_actions";
|
|
77
|
+
dataType: "number";
|
|
78
|
+
columnType: "PgInteger";
|
|
79
|
+
data: number;
|
|
80
|
+
driverParam: string | number;
|
|
81
|
+
notNull: false;
|
|
82
|
+
hasDefault: false;
|
|
83
|
+
isPrimaryKey: false;
|
|
84
|
+
isAutoincrement: false;
|
|
85
|
+
hasRuntimeDefault: false;
|
|
86
|
+
enumValues: undefined;
|
|
87
|
+
baseColumn: never;
|
|
88
|
+
identity: undefined;
|
|
89
|
+
generated: undefined;
|
|
90
|
+
}, {}, {}>;
|
|
91
|
+
appliedControlVersion: import("drizzle-orm/pg-core").PgColumn<{
|
|
92
|
+
name: "applied_control_version";
|
|
93
|
+
tableName: "chat_control_actions";
|
|
94
|
+
dataType: "number";
|
|
95
|
+
columnType: "PgInteger";
|
|
96
|
+
data: number;
|
|
97
|
+
driverParam: string | number;
|
|
98
|
+
notNull: false;
|
|
99
|
+
hasDefault: false;
|
|
100
|
+
isPrimaryKey: false;
|
|
101
|
+
isAutoincrement: false;
|
|
102
|
+
hasRuntimeDefault: false;
|
|
103
|
+
enumValues: undefined;
|
|
104
|
+
baseColumn: never;
|
|
105
|
+
identity: undefined;
|
|
106
|
+
generated: undefined;
|
|
107
|
+
}, {}, {}>;
|
|
108
|
+
actionKind: import("drizzle-orm/pg-core").PgColumn<{
|
|
109
|
+
name: "action_kind";
|
|
110
|
+
tableName: "chat_control_actions";
|
|
111
|
+
dataType: "string";
|
|
112
|
+
columnType: "PgText";
|
|
113
|
+
data: ChatControlActionKind;
|
|
114
|
+
driverParam: string;
|
|
115
|
+
notNull: true;
|
|
116
|
+
hasDefault: false;
|
|
117
|
+
isPrimaryKey: false;
|
|
118
|
+
isAutoincrement: false;
|
|
119
|
+
hasRuntimeDefault: false;
|
|
120
|
+
enumValues: [string, ...string[]];
|
|
121
|
+
baseColumn: never;
|
|
122
|
+
identity: undefined;
|
|
123
|
+
generated: undefined;
|
|
124
|
+
}, {}, {
|
|
125
|
+
$type: ChatControlActionKind;
|
|
126
|
+
}>;
|
|
127
|
+
localDisposition: import("drizzle-orm/pg-core").PgColumn<{
|
|
128
|
+
name: "local_disposition";
|
|
129
|
+
tableName: "chat_control_actions";
|
|
130
|
+
dataType: "string";
|
|
131
|
+
columnType: "PgText";
|
|
132
|
+
data: ChatControlDisposition;
|
|
133
|
+
driverParam: string;
|
|
134
|
+
notNull: true;
|
|
135
|
+
hasDefault: true;
|
|
136
|
+
isPrimaryKey: false;
|
|
137
|
+
isAutoincrement: false;
|
|
138
|
+
hasRuntimeDefault: false;
|
|
139
|
+
enumValues: [string, ...string[]];
|
|
140
|
+
baseColumn: never;
|
|
141
|
+
identity: undefined;
|
|
142
|
+
generated: undefined;
|
|
143
|
+
}, {}, {
|
|
144
|
+
$type: ChatControlDisposition;
|
|
145
|
+
}>;
|
|
146
|
+
providerDisposition: import("drizzle-orm/pg-core").PgColumn<{
|
|
147
|
+
name: "provider_disposition";
|
|
148
|
+
tableName: "chat_control_actions";
|
|
149
|
+
dataType: "string";
|
|
150
|
+
columnType: "PgText";
|
|
151
|
+
data: ChatProviderControlDisposition;
|
|
152
|
+
driverParam: string;
|
|
153
|
+
notNull: false;
|
|
154
|
+
hasDefault: false;
|
|
155
|
+
isPrimaryKey: false;
|
|
156
|
+
isAutoincrement: false;
|
|
157
|
+
hasRuntimeDefault: false;
|
|
158
|
+
enumValues: [string, ...string[]];
|
|
159
|
+
baseColumn: never;
|
|
160
|
+
identity: undefined;
|
|
161
|
+
generated: undefined;
|
|
162
|
+
}, {}, {
|
|
163
|
+
$type: ChatProviderControlDisposition;
|
|
164
|
+
}>;
|
|
165
|
+
controlOwnerToken: import("drizzle-orm/pg-core").PgColumn<{
|
|
166
|
+
name: "control_owner_token";
|
|
167
|
+
tableName: "chat_control_actions";
|
|
168
|
+
dataType: "string";
|
|
169
|
+
columnType: "PgText";
|
|
170
|
+
data: string;
|
|
171
|
+
driverParam: string;
|
|
172
|
+
notNull: false;
|
|
173
|
+
hasDefault: false;
|
|
174
|
+
isPrimaryKey: false;
|
|
175
|
+
isAutoincrement: false;
|
|
176
|
+
hasRuntimeDefault: false;
|
|
177
|
+
enumValues: [string, ...string[]];
|
|
178
|
+
baseColumn: never;
|
|
179
|
+
identity: undefined;
|
|
180
|
+
generated: undefined;
|
|
181
|
+
}, {}, {}>;
|
|
182
|
+
providerClientMessageId: import("drizzle-orm/pg-core").PgColumn<{
|
|
183
|
+
name: "provider_client_message_id";
|
|
184
|
+
tableName: "chat_control_actions";
|
|
185
|
+
dataType: "string";
|
|
186
|
+
columnType: "PgText";
|
|
187
|
+
data: string;
|
|
188
|
+
driverParam: string;
|
|
189
|
+
notNull: false;
|
|
190
|
+
hasDefault: false;
|
|
191
|
+
isPrimaryKey: false;
|
|
192
|
+
isAutoincrement: false;
|
|
193
|
+
hasRuntimeDefault: false;
|
|
194
|
+
enumValues: [string, ...string[]];
|
|
195
|
+
baseColumn: never;
|
|
196
|
+
identity: undefined;
|
|
197
|
+
generated: undefined;
|
|
198
|
+
}, {}, {}>;
|
|
199
|
+
providerThreadId: import("drizzle-orm/pg-core").PgColumn<{
|
|
200
|
+
name: "provider_thread_id";
|
|
201
|
+
tableName: "chat_control_actions";
|
|
202
|
+
dataType: "string";
|
|
203
|
+
columnType: "PgText";
|
|
204
|
+
data: string;
|
|
205
|
+
driverParam: string;
|
|
206
|
+
notNull: false;
|
|
207
|
+
hasDefault: false;
|
|
208
|
+
isPrimaryKey: false;
|
|
209
|
+
isAutoincrement: false;
|
|
210
|
+
hasRuntimeDefault: false;
|
|
211
|
+
enumValues: [string, ...string[]];
|
|
212
|
+
baseColumn: never;
|
|
213
|
+
identity: undefined;
|
|
214
|
+
generated: undefined;
|
|
215
|
+
}, {}, {}>;
|
|
216
|
+
providerTurnId: import("drizzle-orm/pg-core").PgColumn<{
|
|
217
|
+
name: "provider_turn_id";
|
|
218
|
+
tableName: "chat_control_actions";
|
|
219
|
+
dataType: "string";
|
|
220
|
+
columnType: "PgText";
|
|
221
|
+
data: string;
|
|
222
|
+
driverParam: string;
|
|
223
|
+
notNull: false;
|
|
224
|
+
hasDefault: false;
|
|
225
|
+
isPrimaryKey: false;
|
|
226
|
+
isAutoincrement: false;
|
|
227
|
+
hasRuntimeDefault: false;
|
|
228
|
+
enumValues: [string, ...string[]];
|
|
229
|
+
baseColumn: never;
|
|
230
|
+
identity: undefined;
|
|
231
|
+
generated: undefined;
|
|
232
|
+
}, {}, {}>;
|
|
233
|
+
providerEvidence: import("drizzle-orm/pg-core").PgColumn<{
|
|
234
|
+
name: "provider_evidence";
|
|
235
|
+
tableName: "chat_control_actions";
|
|
236
|
+
dataType: "json";
|
|
237
|
+
columnType: "PgJsonb";
|
|
238
|
+
data: Record<string, unknown>;
|
|
239
|
+
driverParam: unknown;
|
|
240
|
+
notNull: false;
|
|
241
|
+
hasDefault: false;
|
|
242
|
+
isPrimaryKey: false;
|
|
243
|
+
isAutoincrement: false;
|
|
244
|
+
hasRuntimeDefault: false;
|
|
245
|
+
enumValues: undefined;
|
|
246
|
+
baseColumn: never;
|
|
247
|
+
identity: undefined;
|
|
248
|
+
generated: undefined;
|
|
249
|
+
}, {}, {
|
|
250
|
+
$type: Record<string, unknown>;
|
|
251
|
+
}>;
|
|
252
|
+
requestedRenderSeq: import("drizzle-orm/pg-core").PgColumn<{
|
|
253
|
+
name: "requested_render_seq";
|
|
254
|
+
tableName: "chat_control_actions";
|
|
255
|
+
dataType: "number";
|
|
256
|
+
columnType: "PgInteger";
|
|
257
|
+
data: number;
|
|
258
|
+
driverParam: string | number;
|
|
259
|
+
notNull: false;
|
|
260
|
+
hasDefault: false;
|
|
261
|
+
isPrimaryKey: false;
|
|
262
|
+
isAutoincrement: false;
|
|
263
|
+
hasRuntimeDefault: false;
|
|
264
|
+
enumValues: undefined;
|
|
265
|
+
baseColumn: never;
|
|
266
|
+
identity: undefined;
|
|
267
|
+
generated: undefined;
|
|
268
|
+
}, {}, {}>;
|
|
269
|
+
requestedBodyHash: import("drizzle-orm/pg-core").PgColumn<{
|
|
270
|
+
name: "requested_body_hash";
|
|
271
|
+
tableName: "chat_control_actions";
|
|
272
|
+
dataType: "string";
|
|
273
|
+
columnType: "PgText";
|
|
274
|
+
data: string;
|
|
275
|
+
driverParam: string;
|
|
276
|
+
notNull: false;
|
|
277
|
+
hasDefault: false;
|
|
278
|
+
isPrimaryKey: false;
|
|
279
|
+
isAutoincrement: false;
|
|
280
|
+
hasRuntimeDefault: false;
|
|
281
|
+
enumValues: [string, ...string[]];
|
|
282
|
+
baseColumn: never;
|
|
283
|
+
identity: undefined;
|
|
284
|
+
generated: undefined;
|
|
285
|
+
}, {}, {}>;
|
|
286
|
+
acceptedThroughSeq: import("drizzle-orm/pg-core").PgColumn<{
|
|
287
|
+
name: "accepted_through_seq";
|
|
288
|
+
tableName: "chat_control_actions";
|
|
289
|
+
dataType: "number";
|
|
290
|
+
columnType: "PgInteger";
|
|
291
|
+
data: number;
|
|
292
|
+
driverParam: string | number;
|
|
293
|
+
notNull: false;
|
|
294
|
+
hasDefault: false;
|
|
295
|
+
isPrimaryKey: false;
|
|
296
|
+
isAutoincrement: false;
|
|
297
|
+
hasRuntimeDefault: false;
|
|
298
|
+
enumValues: undefined;
|
|
299
|
+
baseColumn: never;
|
|
300
|
+
identity: undefined;
|
|
301
|
+
generated: undefined;
|
|
302
|
+
}, {}, {}>;
|
|
303
|
+
frozenBodyHash: import("drizzle-orm/pg-core").PgColumn<{
|
|
304
|
+
name: "frozen_body_hash";
|
|
305
|
+
tableName: "chat_control_actions";
|
|
306
|
+
dataType: "string";
|
|
307
|
+
columnType: "PgText";
|
|
308
|
+
data: string;
|
|
309
|
+
driverParam: string;
|
|
310
|
+
notNull: false;
|
|
311
|
+
hasDefault: false;
|
|
312
|
+
isPrimaryKey: false;
|
|
313
|
+
isAutoincrement: false;
|
|
314
|
+
hasRuntimeDefault: false;
|
|
315
|
+
enumValues: [string, ...string[]];
|
|
316
|
+
baseColumn: never;
|
|
317
|
+
identity: undefined;
|
|
318
|
+
generated: undefined;
|
|
319
|
+
}, {}, {}>;
|
|
320
|
+
lastError: import("drizzle-orm/pg-core").PgColumn<{
|
|
321
|
+
name: "last_error";
|
|
322
|
+
tableName: "chat_control_actions";
|
|
323
|
+
dataType: "string";
|
|
324
|
+
columnType: "PgText";
|
|
325
|
+
data: string;
|
|
326
|
+
driverParam: string;
|
|
327
|
+
notNull: false;
|
|
328
|
+
hasDefault: false;
|
|
329
|
+
isPrimaryKey: false;
|
|
330
|
+
isAutoincrement: false;
|
|
331
|
+
hasRuntimeDefault: false;
|
|
332
|
+
enumValues: [string, ...string[]];
|
|
333
|
+
baseColumn: never;
|
|
334
|
+
identity: undefined;
|
|
335
|
+
generated: undefined;
|
|
336
|
+
}, {}, {}>;
|
|
337
|
+
requestedAt: import("drizzle-orm/pg-core").PgColumn<{
|
|
338
|
+
name: "requested_at";
|
|
339
|
+
tableName: "chat_control_actions";
|
|
340
|
+
dataType: "date";
|
|
341
|
+
columnType: "PgTimestamp";
|
|
342
|
+
data: Date;
|
|
343
|
+
driverParam: string;
|
|
344
|
+
notNull: true;
|
|
345
|
+
hasDefault: true;
|
|
346
|
+
isPrimaryKey: false;
|
|
347
|
+
isAutoincrement: false;
|
|
348
|
+
hasRuntimeDefault: false;
|
|
349
|
+
enumValues: undefined;
|
|
350
|
+
baseColumn: never;
|
|
351
|
+
identity: undefined;
|
|
352
|
+
generated: undefined;
|
|
353
|
+
}, {}, {}>;
|
|
354
|
+
providerSentAt: import("drizzle-orm/pg-core").PgColumn<{
|
|
355
|
+
name: "provider_sent_at";
|
|
356
|
+
tableName: "chat_control_actions";
|
|
357
|
+
dataType: "date";
|
|
358
|
+
columnType: "PgTimestamp";
|
|
359
|
+
data: Date;
|
|
360
|
+
driverParam: string;
|
|
361
|
+
notNull: false;
|
|
362
|
+
hasDefault: false;
|
|
363
|
+
isPrimaryKey: false;
|
|
364
|
+
isAutoincrement: false;
|
|
365
|
+
hasRuntimeDefault: false;
|
|
366
|
+
enumValues: undefined;
|
|
367
|
+
baseColumn: never;
|
|
368
|
+
identity: undefined;
|
|
369
|
+
generated: undefined;
|
|
370
|
+
}, {}, {}>;
|
|
371
|
+
providerAcknowledgedAt: import("drizzle-orm/pg-core").PgColumn<{
|
|
372
|
+
name: "provider_acknowledged_at";
|
|
373
|
+
tableName: "chat_control_actions";
|
|
374
|
+
dataType: "date";
|
|
375
|
+
columnType: "PgTimestamp";
|
|
376
|
+
data: Date;
|
|
377
|
+
driverParam: string;
|
|
378
|
+
notNull: false;
|
|
379
|
+
hasDefault: false;
|
|
380
|
+
isPrimaryKey: false;
|
|
381
|
+
isAutoincrement: false;
|
|
382
|
+
hasRuntimeDefault: false;
|
|
383
|
+
enumValues: undefined;
|
|
384
|
+
baseColumn: never;
|
|
385
|
+
identity: undefined;
|
|
386
|
+
generated: undefined;
|
|
387
|
+
}, {}, {}>;
|
|
388
|
+
resolvedAt: import("drizzle-orm/pg-core").PgColumn<{
|
|
389
|
+
name: "resolved_at";
|
|
390
|
+
tableName: "chat_control_actions";
|
|
391
|
+
dataType: "date";
|
|
392
|
+
columnType: "PgTimestamp";
|
|
393
|
+
data: Date;
|
|
394
|
+
driverParam: string;
|
|
395
|
+
notNull: false;
|
|
396
|
+
hasDefault: false;
|
|
397
|
+
isPrimaryKey: false;
|
|
398
|
+
isAutoincrement: false;
|
|
399
|
+
hasRuntimeDefault: false;
|
|
400
|
+
enumValues: undefined;
|
|
401
|
+
baseColumn: never;
|
|
402
|
+
identity: undefined;
|
|
403
|
+
generated: undefined;
|
|
404
|
+
}, {}, {}>;
|
|
405
|
+
createdAt: import("drizzle-orm/pg-core").PgColumn<{
|
|
406
|
+
name: "created_at";
|
|
407
|
+
tableName: "chat_control_actions";
|
|
408
|
+
dataType: "date";
|
|
409
|
+
columnType: "PgTimestamp";
|
|
410
|
+
data: Date;
|
|
411
|
+
driverParam: string;
|
|
412
|
+
notNull: true;
|
|
413
|
+
hasDefault: true;
|
|
414
|
+
isPrimaryKey: false;
|
|
415
|
+
isAutoincrement: false;
|
|
416
|
+
hasRuntimeDefault: false;
|
|
417
|
+
enumValues: undefined;
|
|
418
|
+
baseColumn: never;
|
|
419
|
+
identity: undefined;
|
|
420
|
+
generated: undefined;
|
|
421
|
+
}, {}, {}>;
|
|
422
|
+
updatedAt: import("drizzle-orm/pg-core").PgColumn<{
|
|
423
|
+
name: "updated_at";
|
|
424
|
+
tableName: "chat_control_actions";
|
|
425
|
+
dataType: "date";
|
|
426
|
+
columnType: "PgTimestamp";
|
|
427
|
+
data: Date;
|
|
428
|
+
driverParam: string;
|
|
429
|
+
notNull: true;
|
|
430
|
+
hasDefault: true;
|
|
431
|
+
isPrimaryKey: false;
|
|
432
|
+
isAutoincrement: false;
|
|
433
|
+
hasRuntimeDefault: false;
|
|
434
|
+
enumValues: undefined;
|
|
435
|
+
baseColumn: never;
|
|
436
|
+
identity: undefined;
|
|
437
|
+
generated: undefined;
|
|
438
|
+
}, {}, {}>;
|
|
439
|
+
};
|
|
440
|
+
dialect: "pg";
|
|
441
|
+
}>;
|
|
442
|
+
//# sourceMappingURL=chat_control_actions.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"chat_control_actions.d.ts","sourceRoot":"","sources":["../../src/schema/chat_control_actions.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,qBAAqB,EACrB,sBAAsB,EACtB,8BAA8B,EAC/B,MAAM,kBAAkB,CAAC;AAK1B,eAAO,MAAM,kBAAkB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAyC9B,CAAC"}
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
import { index, integer, jsonb, pgTable, text, timestamp, uniqueIndex, uuid } from "drizzle-orm/pg-core";
|
|
2
|
+
import { chatGenerations } from "./chat_generations.js";
|
|
3
|
+
import { organizations } from "./organizations.js";
|
|
4
|
+
export const chatControlActions = pgTable("chat_control_actions", {
|
|
5
|
+
id: uuid("id").primaryKey(),
|
|
6
|
+
orgId: uuid("org_id").notNull().references(() => organizations.id, { onDelete: "cascade" }),
|
|
7
|
+
expectedGenerationId: uuid("expected_generation_id").references(() => chatGenerations.id, { onDelete: "cascade" }),
|
|
8
|
+
expectedAttemptEpoch: integer("expected_attempt_epoch"),
|
|
9
|
+
expectedControlVersion: integer("expected_control_version"),
|
|
10
|
+
appliedControlVersion: integer("applied_control_version"),
|
|
11
|
+
actionKind: text("action_kind").$type().notNull(),
|
|
12
|
+
localDisposition: text("local_disposition").$type().notNull().default("pending"),
|
|
13
|
+
providerDisposition: text("provider_disposition").$type(),
|
|
14
|
+
controlOwnerToken: text("control_owner_token"),
|
|
15
|
+
providerClientMessageId: text("provider_client_message_id"),
|
|
16
|
+
providerThreadId: text("provider_thread_id"),
|
|
17
|
+
providerTurnId: text("provider_turn_id"),
|
|
18
|
+
providerEvidence: jsonb("provider_evidence").$type(),
|
|
19
|
+
requestedRenderSeq: integer("requested_render_seq"),
|
|
20
|
+
requestedBodyHash: text("requested_body_hash"),
|
|
21
|
+
acceptedThroughSeq: integer("accepted_through_seq"),
|
|
22
|
+
frozenBodyHash: text("frozen_body_hash"),
|
|
23
|
+
lastError: text("last_error"),
|
|
24
|
+
requestedAt: timestamp("requested_at", { withTimezone: true }).notNull().defaultNow(),
|
|
25
|
+
providerSentAt: timestamp("provider_sent_at", { withTimezone: true }),
|
|
26
|
+
providerAcknowledgedAt: timestamp("provider_acknowledged_at", { withTimezone: true }),
|
|
27
|
+
resolvedAt: timestamp("resolved_at", { withTimezone: true }),
|
|
28
|
+
createdAt: timestamp("created_at", { withTimezone: true }).notNull().defaultNow(),
|
|
29
|
+
updatedAt: timestamp("updated_at", { withTimezone: true }).notNull().defaultNow(),
|
|
30
|
+
}, (table) => ({
|
|
31
|
+
orgActionUq: uniqueIndex("chat_control_actions_org_action_uq").on(table.orgId, table.id),
|
|
32
|
+
generationRequestedIdx: index("chat_control_actions_generation_requested_idx").on(table.expectedGenerationId, table.requestedAt),
|
|
33
|
+
orgDispositionIdx: index("chat_control_actions_org_disposition_idx").on(table.orgId, table.localDisposition, table.updatedAt),
|
|
34
|
+
}));
|
|
35
|
+
//# sourceMappingURL=chat_control_actions.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"chat_control_actions.js","sourceRoot":"","sources":["../../src/schema/chat_control_actions.ts"],"names":[],"mappings":"AAKA,OAAO,EAAE,KAAK,EAAE,OAAO,EAAE,KAAK,EAAE,OAAO,EAAE,IAAI,EAAE,SAAS,EAAE,WAAW,EAAE,IAAI,EAAE,MAAM,qBAAqB,CAAC;AACzG,OAAO,EAAE,eAAe,EAAE,MAAM,uBAAuB,CAAC;AACxD,OAAO,EAAE,aAAa,EAAE,MAAM,oBAAoB,CAAC;AAEnD,MAAM,CAAC,MAAM,kBAAkB,GAAG,OAAO,CACvC,sBAAsB,EACtB;IACE,EAAE,EAAE,IAAI,CAAC,IAAI,CAAC,CAAC,UAAU,EAAE;IAC3B,KAAK,EAAE,IAAI,CAAC,QAAQ,CAAC,CAAC,OAAO,EAAE,CAAC,UAAU,CAAC,GAAG,EAAE,CAAC,aAAa,CAAC,EAAE,EAAE,EAAE,QAAQ,EAAE,SAAS,EAAE,CAAC;IAC3F,oBAAoB,EAAE,IAAI,CAAC,wBAAwB,CAAC,CAAC,UAAU,CAAC,GAAG,EAAE,CAAC,eAAe,CAAC,EAAE,EAAE,EAAE,QAAQ,EAAE,SAAS,EAAE,CAAC;IAClH,oBAAoB,EAAE,OAAO,CAAC,wBAAwB,CAAC;IACvD,sBAAsB,EAAE,OAAO,CAAC,0BAA0B,CAAC;IAC3D,qBAAqB,EAAE,OAAO,CAAC,yBAAyB,CAAC;IACzD,UAAU,EAAE,IAAI,CAAC,aAAa,CAAC,CAAC,KAAK,EAAyB,CAAC,OAAO,EAAE;IACxE,gBAAgB,EAAE,IAAI,CAAC,mBAAmB,CAAC,CAAC,KAAK,EAA0B,CAAC,OAAO,EAAE,CAAC,OAAO,CAAC,SAAS,CAAC;IACxG,mBAAmB,EAAE,IAAI,CAAC,sBAAsB,CAAC,CAAC,KAAK,EAAkC;IACzF,iBAAiB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