@igorjpimenta/manifold 0.0.0-stage → 2026.11.22-beta.3

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.
Files changed (210) hide show
  1. package/.migrations/ops/0000_futuristic_karma.sql +111 -0
  2. package/.migrations/ops/0001_low_maximus.sql +7 -0
  3. package/.migrations/ops/meta/0000_snapshot.json +763 -0
  4. package/.migrations/ops/meta/0001_snapshot.json +173 -0
  5. package/.migrations/ops/meta/_journal.json +20 -0
  6. package/.migrations/runtime/0000_real_boomer.sql +180 -0
  7. package/.migrations/runtime/0001_hot_dakota_north.sql +2 -0
  8. package/.migrations/runtime/0002_breezy_vertigo.sql +8 -0
  9. package/.migrations/runtime/0003_dashing_jack_flag.sql +5 -0
  10. package/.migrations/runtime/0004_panoramic_ego.sql +1 -0
  11. package/.migrations/runtime/0005_tidy_ben_grimm.sql +10 -0
  12. package/.migrations/runtime/0006_wet_nightmare.sql +57 -0
  13. package/.migrations/runtime/0007_ambiguous_chronomancer.sql +8 -0
  14. package/.migrations/runtime/0008_wealthy_thundra.sql +301 -0
  15. package/.migrations/runtime/0009_lying_shocker.sql +96 -0
  16. package/.migrations/runtime/0010_solid_phantom_reporter.sql +160 -0
  17. package/.migrations/runtime/0011_windy_demogoblin.sql +175 -0
  18. package/.migrations/runtime/0012_restore_harness_fks.sql +103 -0
  19. package/.migrations/runtime/meta/0000_snapshot.json +1181 -0
  20. package/.migrations/runtime/meta/0001_snapshot.json +1209 -0
  21. package/.migrations/runtime/meta/0002_snapshot.json +1261 -0
  22. package/.migrations/runtime/meta/0003_snapshot.json +1292 -0
  23. package/.migrations/runtime/meta/0004_snapshot.json +1240 -0
  24. package/.migrations/runtime/meta/0006_snapshot.json +1310 -0
  25. package/.migrations/runtime/meta/0007_snapshot.json +1362 -0
  26. package/.migrations/runtime/meta/0008_snapshot.json +1742 -0
  27. package/.migrations/runtime/meta/0009_snapshot.json +2413 -0
  28. package/.migrations/runtime/meta/0010_snapshot.json +2562 -0
  29. package/.migrations/runtime/meta/0011_snapshot.json +2812 -0
  30. package/.migrations/runtime/meta/0012_snapshot.json +2812 -0
  31. package/.migrations/runtime/meta/_journal.json +97 -0
  32. package/README.md +1583 -2
  33. package/RELEASING.md +89 -0
  34. package/agent/fleet.js +100 -0
  35. package/bin/cli.js +854 -0
  36. package/bin/manifold.js +4 -0
  37. package/boot/flow-revival.js +536 -0
  38. package/budget/index.js +495 -0
  39. package/budget/lib.js +59 -0
  40. package/dashboard/cost.js +528 -0
  41. package/dashboard/dist/assets/index-CUfp63sj.css +1 -0
  42. package/dashboard/dist/assets/index-Qy9JMpma.js +371 -0
  43. package/dashboard/dist/index.html +13 -0
  44. package/dashboard/event-log.js +267 -0
  45. package/dashboard/index.html +12 -0
  46. package/dashboard/package-lock.json +2877 -0
  47. package/dashboard/package.json +37 -0
  48. package/dashboard/pipeline-graph.js +131 -0
  49. package/dashboard/postcss.config.js +6 -0
  50. package/dashboard/search.js +183 -0
  51. package/dashboard/server.js +1015 -0
  52. package/dashboard/src/App.tsx +42 -0
  53. package/dashboard/src/api/client.ts +118 -0
  54. package/dashboard/src/api/types.ts +510 -0
  55. package/dashboard/src/api/ws.tsx +112 -0
  56. package/dashboard/src/components/CancelButton.tsx +63 -0
  57. package/dashboard/src/components/ClickToCopy.tsx +68 -0
  58. package/dashboard/src/components/CopyButton.tsx +61 -0
  59. package/dashboard/src/components/DailyCostTrend.tsx +85 -0
  60. package/dashboard/src/components/DailyTimeTrend.tsx +94 -0
  61. package/dashboard/src/components/Funnel.tsx +149 -0
  62. package/dashboard/src/components/GateForm.tsx +158 -0
  63. package/dashboard/src/components/GraphView.tsx +302 -0
  64. package/dashboard/src/components/GroupPathsSummary.tsx +47 -0
  65. package/dashboard/src/components/Histogram.tsx +292 -0
  66. package/dashboard/src/components/Layout.tsx +28 -0
  67. package/dashboard/src/components/NeedsAttention.tsx +98 -0
  68. package/dashboard/src/components/NodeContextCard.tsx +132 -0
  69. package/dashboard/src/components/PathTrail.tsx +35 -0
  70. package/dashboard/src/components/PipelineCostBreakdown.tsx +277 -0
  71. package/dashboard/src/components/RerunButton.tsx +46 -0
  72. package/dashboard/src/components/RunComparison.tsx +53 -0
  73. package/dashboard/src/components/Sparkline.tsx +94 -0
  74. package/dashboard/src/components/StatStrip.tsx +147 -0
  75. package/dashboard/src/components/StateTree.tsx +84 -0
  76. package/dashboard/src/components/StatusBadge.tsx +18 -0
  77. package/dashboard/src/components/SubflowPathPills.tsx +38 -0
  78. package/dashboard/src/components/SubflowSummary.tsx +24 -0
  79. package/dashboard/src/components/SubflowsCard.tsx +327 -0
  80. package/dashboard/src/components/TodayStrip.tsx +86 -0
  81. package/dashboard/src/components/TranscriptPane.tsx +99 -0
  82. package/dashboard/src/components/TranscriptRow.tsx +69 -0
  83. package/dashboard/src/components/ui/badge.tsx +38 -0
  84. package/dashboard/src/components/ui/button.tsx +28 -0
  85. package/dashboard/src/components/ui/card.tsx +42 -0
  86. package/dashboard/src/components/ui/skeleton.tsx +9 -0
  87. package/dashboard/src/components/ui/table.tsx +62 -0
  88. package/dashboard/src/index.css +26 -0
  89. package/dashboard/src/lib/anomaly.ts +42 -0
  90. package/dashboard/src/lib/format.ts +30 -0
  91. package/dashboard/src/lib/step-history.ts +13 -0
  92. package/dashboard/src/lib/subflow.ts +154 -0
  93. package/dashboard/src/lib/use-click-outside.ts +28 -0
  94. package/dashboard/src/lib/use-ignored-clusters.ts +67 -0
  95. package/dashboard/src/lib/utils.ts +6 -0
  96. package/dashboard/src/main.tsx +10 -0
  97. package/dashboard/src/types/shims.d.ts +4 -0
  98. package/dashboard/src/views/Home.tsx +478 -0
  99. package/dashboard/src/views/PipelineDetail.tsx +1185 -0
  100. package/dashboard/src/views/PipelinesList.tsx +111 -0
  101. package/dashboard/src/views/RunDetail.tsx +248 -0
  102. package/dashboard/src/views/Search.tsx +196 -0
  103. package/dashboard/stats.js +668 -0
  104. package/dashboard/tailwind.config.ts +43 -0
  105. package/dashboard/tree-stats.js +12 -0
  106. package/dashboard/tsconfig.json +25 -0
  107. package/dashboard/views.js +231 -0
  108. package/dashboard/vite.config.ts +34 -0
  109. package/drizzle.config.js +12 -0
  110. package/drizzle.config.ops.js +12 -0
  111. package/elevation.js +116 -0
  112. package/engine/admission-promotion-resume.js +127 -0
  113. package/engine/agent-dispatch.js +64 -0
  114. package/engine/child-resume-trigger.js +315 -0
  115. package/engine/executor-budget.js +87 -0
  116. package/engine/executor-cancel.js +83 -0
  117. package/engine/executor-errors.js +122 -0
  118. package/engine/executor-helpers.js +254 -0
  119. package/engine/executor-nodes.js +292 -0
  120. package/engine/executor-persist.js +212 -0
  121. package/engine/executor-subflow-children.js +275 -0
  122. package/engine/executor.js +1013 -0
  123. package/engine/global-concurrency.js +33 -0
  124. package/engine/loader.js +528 -0
  125. package/engine/needs-resolver.js +229 -0
  126. package/engine/pipelines-watcher.js +133 -0
  127. package/engine/result-replay.js +34 -0
  128. package/engine/revival-messages.js +11 -0
  129. package/engine/spawn-child.js +55 -0
  130. package/engine/wait-for-flow-settlement.js +109 -0
  131. package/events/catalog.js +26 -0
  132. package/events/emit.js +44 -0
  133. package/events/kinds.js +118 -0
  134. package/events/serve-ws.js +74 -0
  135. package/events/stream.js +35 -0
  136. package/events/ws-dialog.js +257 -0
  137. package/events/ws-frame.js +194 -0
  138. package/events/ws-run-events.js +70 -0
  139. package/events.js +32 -0
  140. package/gates/gate-resolver.js +576 -0
  141. package/gates/paused-flows.js +55 -0
  142. package/graphql/columns.js +67 -0
  143. package/graphql/schema.js +333 -0
  144. package/index.js +49 -0
  145. package/mcp/http.js +159 -0
  146. package/mcp/identity.js +94 -0
  147. package/mcp/stdio.js +80 -0
  148. package/mcp/tools.js +245 -0
  149. package/mcp/wire-ops.js +178 -0
  150. package/package.json +49 -4
  151. package/routes/bearer-auth.js +57 -0
  152. package/routes/discuss-audio.js +87 -0
  153. package/routes/discuss-component.js +39 -0
  154. package/routes/discuss-draft.js +159 -0
  155. package/routes/discuss-helpers.js +20 -0
  156. package/routes/discuss.js +848 -0
  157. package/routes/failures.js +104 -0
  158. package/routes/graphql.js +61 -0
  159. package/routes/health.js +54 -0
  160. package/routes/operator-discuss.js +193 -0
  161. package/routes/operator-resume.js +32 -0
  162. package/routes/operator-retry.js +301 -0
  163. package/routes/operator.js +539 -0
  164. package/routes/pipelines.js +118 -0
  165. package/routes/runs.js +1129 -0
  166. package/scripts/ci/import-check.mjs +50 -0
  167. package/scripts/link-core-self.mjs +31 -0
  168. package/scripts/with-guard.sh +24 -0
  169. package/server/app.js +503 -0
  170. package/server/registry.js +53 -0
  171. package/server/serve.js +163 -0
  172. package/state/admission-queue-store.js +325 -0
  173. package/state/attribution-registries.js +102 -0
  174. package/state/batch-writer.js +162 -0
  175. package/state/db-guard.js +63 -0
  176. package/state/db-health.js +27 -0
  177. package/state/db.js +122 -0
  178. package/state/discuss-store.js +299 -0
  179. package/state/failure-store.js +427 -0
  180. package/state/migrate.js +104 -0
  181. package/state/node-cost.js +67 -0
  182. package/state/node-executions.js +775 -0
  183. package/state/node-health-store.js +124 -0
  184. package/state/ops-merge.js +93 -0
  185. package/state/paths.js +146 -0
  186. package/state/pipeline-dirs.js +99 -0
  187. package/state/pipeline-registry.js +449 -0
  188. package/state/run-store.js +697 -0
  189. package/state/schema.js +438 -0
  190. package/state/schema.ops.js +44 -0
  191. package/state/session-index.js +177 -0
  192. package/state/session-keys.js +39 -0
  193. package/state/state-store.js +311 -0
  194. package/state/subflow-state.js +126 -0
  195. package/state/tool-handoff.js +169 -0
  196. package/telemetry/budget-alert.js +353 -0
  197. package/telemetry/cli.js +331 -0
  198. package/telemetry/grammar.js +119 -0
  199. package/telemetry/http-budget.js +132 -0
  200. package/telemetry/http-cost.js +670 -0
  201. package/telemetry/http-helpers.js +134 -0
  202. package/telemetry/http-tree.js +349 -0
  203. package/telemetry/http.js +44 -0
  204. package/telemetry/index.js +307 -0
  205. package/telemetry/ingest.js +134 -0
  206. package/telemetry/labels.js +115 -0
  207. package/telemetry/pricer.js +77 -0
  208. package/telemetry/resolver.js +314 -0
  209. package/telemetry/store.js +147 -0
  210. package/utils/run-patch.js +43 -0
@@ -0,0 +1,2562 @@
1
+ {
2
+ "version": "6",
3
+ "dialect": "sqlite",
4
+ "id": "10eaff27-07dc-4508-8333-8702f3822af6",
5
+ "prevId": "9fd7e891-08e5-4218-88dc-5555c76aa36e",
6
+ "tables": {
7
+ "cost_by_call": {
8
+ "name": "cost_by_call",
9
+ "columns": {
10
+ "session_id": {
11
+ "name": "session_id",
12
+ "type": "text",
13
+ "primaryKey": false,
14
+ "notNull": true,
15
+ "autoincrement": false
16
+ },
17
+ "msg_id": {
18
+ "name": "msg_id",
19
+ "type": "text",
20
+ "primaryKey": false,
21
+ "notNull": true,
22
+ "autoincrement": false
23
+ },
24
+ "ts": {
25
+ "name": "ts",
26
+ "type": "integer",
27
+ "primaryKey": false,
28
+ "notNull": true,
29
+ "autoincrement": false
30
+ },
31
+ "provider": {
32
+ "name": "provider",
33
+ "type": "text",
34
+ "primaryKey": false,
35
+ "notNull": false,
36
+ "autoincrement": false
37
+ },
38
+ "model": {
39
+ "name": "model",
40
+ "type": "text",
41
+ "primaryKey": false,
42
+ "notNull": false,
43
+ "autoincrement": false
44
+ },
45
+ "input_tokens": {
46
+ "name": "input_tokens",
47
+ "type": "integer",
48
+ "primaryKey": false,
49
+ "notNull": false,
50
+ "autoincrement": false
51
+ },
52
+ "output_tokens": {
53
+ "name": "output_tokens",
54
+ "type": "integer",
55
+ "primaryKey": false,
56
+ "notNull": false,
57
+ "autoincrement": false
58
+ },
59
+ "cache_read_tokens": {
60
+ "name": "cache_read_tokens",
61
+ "type": "integer",
62
+ "primaryKey": false,
63
+ "notNull": false,
64
+ "autoincrement": false
65
+ },
66
+ "cache_write_tokens": {
67
+ "name": "cache_write_tokens",
68
+ "type": "integer",
69
+ "primaryKey": false,
70
+ "notNull": false,
71
+ "autoincrement": false
72
+ },
73
+ "total_tokens": {
74
+ "name": "total_tokens",
75
+ "type": "integer",
76
+ "primaryKey": false,
77
+ "notNull": false,
78
+ "autoincrement": false
79
+ },
80
+ "cost_input": {
81
+ "name": "cost_input",
82
+ "type": "real",
83
+ "primaryKey": false,
84
+ "notNull": false,
85
+ "autoincrement": false
86
+ },
87
+ "cost_output": {
88
+ "name": "cost_output",
89
+ "type": "real",
90
+ "primaryKey": false,
91
+ "notNull": false,
92
+ "autoincrement": false
93
+ },
94
+ "cost_cache_read": {
95
+ "name": "cost_cache_read",
96
+ "type": "real",
97
+ "primaryKey": false,
98
+ "notNull": false,
99
+ "autoincrement": false
100
+ },
101
+ "cost_cache_write": {
102
+ "name": "cost_cache_write",
103
+ "type": "real",
104
+ "primaryKey": false,
105
+ "notNull": false,
106
+ "autoincrement": false
107
+ },
108
+ "cost_total": {
109
+ "name": "cost_total",
110
+ "type": "real",
111
+ "primaryKey": false,
112
+ "notNull": true,
113
+ "autoincrement": false
114
+ },
115
+ "session_key": {
116
+ "name": "session_key",
117
+ "type": "text",
118
+ "primaryKey": false,
119
+ "notNull": false,
120
+ "autoincrement": false
121
+ },
122
+ "agent_id": {
123
+ "name": "agent_id",
124
+ "type": "text",
125
+ "primaryKey": false,
126
+ "notNull": false,
127
+ "autoincrement": false
128
+ },
129
+ "root_session_key": {
130
+ "name": "root_session_key",
131
+ "type": "text",
132
+ "primaryKey": false,
133
+ "notNull": false,
134
+ "autoincrement": false
135
+ },
136
+ "root_kind": {
137
+ "name": "root_kind",
138
+ "type": "text",
139
+ "primaryKey": false,
140
+ "notNull": false,
141
+ "autoincrement": false
142
+ },
143
+ "root_label": {
144
+ "name": "root_label",
145
+ "type": "text",
146
+ "primaryKey": false,
147
+ "notNull": false,
148
+ "autoincrement": false
149
+ },
150
+ "pipeline_id": {
151
+ "name": "pipeline_id",
152
+ "type": "text",
153
+ "primaryKey": false,
154
+ "notNull": false,
155
+ "autoincrement": false
156
+ },
157
+ "flow_id": {
158
+ "name": "flow_id",
159
+ "type": "text",
160
+ "primaryKey": false,
161
+ "notNull": false,
162
+ "autoincrement": false
163
+ },
164
+ "node_id": {
165
+ "name": "node_id",
166
+ "type": "text",
167
+ "primaryKey": false,
168
+ "notNull": false,
169
+ "autoincrement": false
170
+ },
171
+ "item_key": {
172
+ "name": "item_key",
173
+ "type": "text",
174
+ "primaryKey": false,
175
+ "notNull": false,
176
+ "autoincrement": false
177
+ }
178
+ },
179
+ "indexes": {
180
+ "idx_cost_ts": {
181
+ "name": "idx_cost_ts",
182
+ "columns": [
183
+ "ts"
184
+ ],
185
+ "isUnique": false
186
+ },
187
+ "idx_cost_root_key": {
188
+ "name": "idx_cost_root_key",
189
+ "columns": [
190
+ "root_session_key"
191
+ ],
192
+ "isUnique": false
193
+ },
194
+ "idx_cost_root_kind_ts": {
195
+ "name": "idx_cost_root_kind_ts",
196
+ "columns": [
197
+ "root_kind",
198
+ "ts"
199
+ ],
200
+ "isUnique": false
201
+ },
202
+ "idx_cost_pipeline_ts": {
203
+ "name": "idx_cost_pipeline_ts",
204
+ "columns": [
205
+ "pipeline_id",
206
+ "ts"
207
+ ],
208
+ "isUnique": false
209
+ },
210
+ "idx_cost_flow_node": {
211
+ "name": "idx_cost_flow_node",
212
+ "columns": [
213
+ "flow_id",
214
+ "node_id"
215
+ ],
216
+ "isUnique": false
217
+ },
218
+ "idx_cost_model_ts": {
219
+ "name": "idx_cost_model_ts",
220
+ "columns": [
221
+ "model",
222
+ "ts"
223
+ ],
224
+ "isUnique": false
225
+ },
226
+ "idx_cost_session": {
227
+ "name": "idx_cost_session",
228
+ "columns": [
229
+ "session_id"
230
+ ],
231
+ "isUnique": false
232
+ }
233
+ },
234
+ "foreignKeys": {
235
+ "cost_by_call_session_key_sessions_session_key_fk": {
236
+ "name": "cost_by_call_session_key_sessions_session_key_fk",
237
+ "tableFrom": "cost_by_call",
238
+ "tableTo": "sessions",
239
+ "columnsFrom": [
240
+ "session_key"
241
+ ],
242
+ "columnsTo": [
243
+ "session_key"
244
+ ],
245
+ "onDelete": "set null",
246
+ "onUpdate": "no action"
247
+ },
248
+ "cost_by_call_root_session_key_sessions_session_key_fk": {
249
+ "name": "cost_by_call_root_session_key_sessions_session_key_fk",
250
+ "tableFrom": "cost_by_call",
251
+ "tableTo": "sessions",
252
+ "columnsFrom": [
253
+ "root_session_key"
254
+ ],
255
+ "columnsTo": [
256
+ "session_key"
257
+ ],
258
+ "onDelete": "set null",
259
+ "onUpdate": "no action"
260
+ },
261
+ "cost_by_call_pipeline_id_pipelines_id_fk": {
262
+ "name": "cost_by_call_pipeline_id_pipelines_id_fk",
263
+ "tableFrom": "cost_by_call",
264
+ "tableTo": "pipelines",
265
+ "columnsFrom": [
266
+ "pipeline_id"
267
+ ],
268
+ "columnsTo": [
269
+ "id"
270
+ ],
271
+ "onDelete": "set null",
272
+ "onUpdate": "no action"
273
+ },
274
+ "cost_by_call_flow_id_flow_runs_flow_id_fk": {
275
+ "name": "cost_by_call_flow_id_flow_runs_flow_id_fk",
276
+ "tableFrom": "cost_by_call",
277
+ "tableTo": "flow_runs",
278
+ "columnsFrom": [
279
+ "flow_id"
280
+ ],
281
+ "columnsTo": [
282
+ "flow_id"
283
+ ],
284
+ "onDelete": "set null",
285
+ "onUpdate": "no action"
286
+ }
287
+ },
288
+ "compositePrimaryKeys": {
289
+ "cost_by_call_session_id_msg_id_pk": {
290
+ "columns": [
291
+ "session_id",
292
+ "msg_id"
293
+ ],
294
+ "name": "cost_by_call_session_id_msg_id_pk"
295
+ }
296
+ },
297
+ "uniqueConstraints": {},
298
+ "checkConstraints": {}
299
+ },
300
+ "discuss_state": {
301
+ "name": "discuss_state",
302
+ "columns": {
303
+ "flow_id": {
304
+ "name": "flow_id",
305
+ "type": "text",
306
+ "primaryKey": false,
307
+ "notNull": true,
308
+ "autoincrement": false
309
+ },
310
+ "item_id": {
311
+ "name": "item_id",
312
+ "type": "text",
313
+ "primaryKey": false,
314
+ "notNull": true,
315
+ "autoincrement": false
316
+ },
317
+ "messages_json": {
318
+ "name": "messages_json",
319
+ "type": "text",
320
+ "primaryKey": false,
321
+ "notNull": true,
322
+ "autoincrement": false,
323
+ "default": "'[]'"
324
+ },
325
+ "turn_status": {
326
+ "name": "turn_status",
327
+ "type": "text",
328
+ "primaryKey": false,
329
+ "notNull": true,
330
+ "autoincrement": false,
331
+ "default": "'idle'"
332
+ },
333
+ "active_turn_id": {
334
+ "name": "active_turn_id",
335
+ "type": "text",
336
+ "primaryKey": false,
337
+ "notNull": false,
338
+ "autoincrement": false
339
+ },
340
+ "pending_json": {
341
+ "name": "pending_json",
342
+ "type": "text",
343
+ "primaryKey": false,
344
+ "notNull": false,
345
+ "autoincrement": false
346
+ },
347
+ "updated_at": {
348
+ "name": "updated_at",
349
+ "type": "integer",
350
+ "primaryKey": false,
351
+ "notNull": true,
352
+ "autoincrement": false
353
+ },
354
+ "components_json": {
355
+ "name": "components_json",
356
+ "type": "text",
357
+ "primaryKey": false,
358
+ "notNull": true,
359
+ "autoincrement": false,
360
+ "default": "'[]'"
361
+ }
362
+ },
363
+ "indexes": {
364
+ "idx_discuss_updated": {
365
+ "name": "idx_discuss_updated",
366
+ "columns": [
367
+ "updated_at"
368
+ ],
369
+ "isUnique": false
370
+ },
371
+ "idx_discuss_state_unique": {
372
+ "name": "idx_discuss_state_unique",
373
+ "columns": [
374
+ "flow_id",
375
+ "item_id"
376
+ ],
377
+ "isUnique": true
378
+ }
379
+ },
380
+ "foreignKeys": {
381
+ "discuss_state_flow_id_flow_runs_flow_id_fk": {
382
+ "name": "discuss_state_flow_id_flow_runs_flow_id_fk",
383
+ "tableFrom": "discuss_state",
384
+ "tableTo": "flow_runs",
385
+ "columnsFrom": [
386
+ "flow_id"
387
+ ],
388
+ "columnsTo": [
389
+ "flow_id"
390
+ ],
391
+ "onDelete": "cascade",
392
+ "onUpdate": "no action"
393
+ }
394
+ },
395
+ "compositePrimaryKeys": {},
396
+ "uniqueConstraints": {},
397
+ "checkConstraints": {}
398
+ },
399
+ "discuss_threads": {
400
+ "name": "discuss_threads",
401
+ "columns": {
402
+ "flow_id": {
403
+ "name": "flow_id",
404
+ "type": "text",
405
+ "primaryKey": false,
406
+ "notNull": true,
407
+ "autoincrement": false
408
+ },
409
+ "gate_node_id": {
410
+ "name": "gate_node_id",
411
+ "type": "text",
412
+ "primaryKey": false,
413
+ "notNull": true,
414
+ "autoincrement": false
415
+ },
416
+ "item_id": {
417
+ "name": "item_id",
418
+ "type": "text",
419
+ "primaryKey": false,
420
+ "notNull": true,
421
+ "autoincrement": false
422
+ },
423
+ "agent_id": {
424
+ "name": "agent_id",
425
+ "type": "text",
426
+ "primaryKey": false,
427
+ "notNull": false,
428
+ "autoincrement": false
429
+ },
430
+ "session_key": {
431
+ "name": "session_key",
432
+ "type": "text",
433
+ "primaryKey": false,
434
+ "notNull": true,
435
+ "autoincrement": false
436
+ },
437
+ "updated_at": {
438
+ "name": "updated_at",
439
+ "type": "integer",
440
+ "primaryKey": false,
441
+ "notNull": true,
442
+ "autoincrement": false
443
+ }
444
+ },
445
+ "indexes": {
446
+ "idx_discuss_threads_unique": {
447
+ "name": "idx_discuss_threads_unique",
448
+ "columns": [
449
+ "flow_id",
450
+ "gate_node_id",
451
+ "item_id"
452
+ ],
453
+ "isUnique": true
454
+ }
455
+ },
456
+ "foreignKeys": {
457
+ "discuss_threads_flow_id_flow_runs_flow_id_fk": {
458
+ "name": "discuss_threads_flow_id_flow_runs_flow_id_fk",
459
+ "tableFrom": "discuss_threads",
460
+ "tableTo": "flow_runs",
461
+ "columnsFrom": [
462
+ "flow_id"
463
+ ],
464
+ "columnsTo": [
465
+ "flow_id"
466
+ ],
467
+ "onDelete": "cascade",
468
+ "onUpdate": "no action"
469
+ },
470
+ "discuss_threads_session_key_sessions_session_key_fk": {
471
+ "name": "discuss_threads_session_key_sessions_session_key_fk",
472
+ "tableFrom": "discuss_threads",
473
+ "tableTo": "sessions",
474
+ "columnsFrom": [
475
+ "session_key"
476
+ ],
477
+ "columnsTo": [
478
+ "session_key"
479
+ ],
480
+ "onDelete": "no action",
481
+ "onUpdate": "no action"
482
+ }
483
+ },
484
+ "compositePrimaryKeys": {},
485
+ "uniqueConstraints": {},
486
+ "checkConstraints": {}
487
+ },
488
+ "failure_events": {
489
+ "name": "failure_events",
490
+ "columns": {
491
+ "id": {
492
+ "name": "id",
493
+ "type": "text",
494
+ "primaryKey": true,
495
+ "notNull": true,
496
+ "autoincrement": false
497
+ },
498
+ "flow_id": {
499
+ "name": "flow_id",
500
+ "type": "text",
501
+ "primaryKey": false,
502
+ "notNull": true,
503
+ "autoincrement": false
504
+ },
505
+ "failed_at": {
506
+ "name": "failed_at",
507
+ "type": "integer",
508
+ "primaryKey": false,
509
+ "notNull": true,
510
+ "autoincrement": false
511
+ },
512
+ "failure_summary": {
513
+ "name": "failure_summary",
514
+ "type": "text",
515
+ "primaryKey": false,
516
+ "notNull": true,
517
+ "autoincrement": false
518
+ },
519
+ "invocation_id": {
520
+ "name": "invocation_id",
521
+ "type": "text",
522
+ "primaryKey": false,
523
+ "notNull": false,
524
+ "autoincrement": false
525
+ },
526
+ "execution_id": {
527
+ "name": "execution_id",
528
+ "type": "text",
529
+ "primaryKey": false,
530
+ "notNull": false,
531
+ "autoincrement": false
532
+ },
533
+ "error_type": {
534
+ "name": "error_type",
535
+ "type": "text",
536
+ "primaryKey": false,
537
+ "notNull": false,
538
+ "autoincrement": false
539
+ }
540
+ },
541
+ "indexes": {
542
+ "idx_failures_flow": {
543
+ "name": "idx_failures_flow",
544
+ "columns": [
545
+ "flow_id"
546
+ ],
547
+ "isUnique": false
548
+ },
549
+ "idx_failures_failed_at": {
550
+ "name": "idx_failures_failed_at",
551
+ "columns": [
552
+ "\"failed_at\" desc"
553
+ ],
554
+ "isUnique": false
555
+ },
556
+ "idx_failures_invocation": {
557
+ "name": "idx_failures_invocation",
558
+ "columns": [
559
+ "invocation_id"
560
+ ],
561
+ "isUnique": false
562
+ },
563
+ "idx_failures_execution": {
564
+ "name": "idx_failures_execution",
565
+ "columns": [
566
+ "execution_id"
567
+ ],
568
+ "isUnique": true,
569
+ "where": "\"failure_events\".\"execution_id\" IS NOT NULL"
570
+ }
571
+ },
572
+ "foreignKeys": {
573
+ "failure_events_flow_id_flow_runs_flow_id_fk": {
574
+ "name": "failure_events_flow_id_flow_runs_flow_id_fk",
575
+ "tableFrom": "failure_events",
576
+ "tableTo": "flow_runs",
577
+ "columnsFrom": [
578
+ "flow_id"
579
+ ],
580
+ "columnsTo": [
581
+ "flow_id"
582
+ ],
583
+ "onDelete": "cascade",
584
+ "onUpdate": "no action"
585
+ },
586
+ "failure_events_invocation_id_flow_node_invocations_id_fk": {
587
+ "name": "failure_events_invocation_id_flow_node_invocations_id_fk",
588
+ "tableFrom": "failure_events",
589
+ "tableTo": "flow_node_invocations",
590
+ "columnsFrom": [
591
+ "invocation_id"
592
+ ],
593
+ "columnsTo": [
594
+ "id"
595
+ ],
596
+ "onDelete": "set null",
597
+ "onUpdate": "no action"
598
+ },
599
+ "failure_events_execution_id_flow_node_executions_id_fk": {
600
+ "name": "failure_events_execution_id_flow_node_executions_id_fk",
601
+ "tableFrom": "failure_events",
602
+ "tableTo": "flow_node_executions",
603
+ "columnsFrom": [
604
+ "execution_id"
605
+ ],
606
+ "columnsTo": [
607
+ "id"
608
+ ],
609
+ "onDelete": "set null",
610
+ "onUpdate": "no action"
611
+ }
612
+ },
613
+ "compositePrimaryKeys": {},
614
+ "uniqueConstraints": {},
615
+ "checkConstraints": {}
616
+ },
617
+ "flow_admission_queue": {
618
+ "name": "flow_admission_queue",
619
+ "columns": {
620
+ "id": {
621
+ "name": "id",
622
+ "type": "text",
623
+ "primaryKey": true,
624
+ "notNull": true,
625
+ "autoincrement": false
626
+ },
627
+ "kind": {
628
+ "name": "kind",
629
+ "type": "text",
630
+ "primaryKey": false,
631
+ "notNull": true,
632
+ "autoincrement": false
633
+ },
634
+ "flow_id": {
635
+ "name": "flow_id",
636
+ "type": "text",
637
+ "primaryKey": false,
638
+ "notNull": true,
639
+ "autoincrement": false
640
+ },
641
+ "node_id": {
642
+ "name": "node_id",
643
+ "type": "text",
644
+ "primaryKey": false,
645
+ "notNull": false,
646
+ "autoincrement": false
647
+ },
648
+ "status": {
649
+ "name": "status",
650
+ "type": "text",
651
+ "primaryKey": false,
652
+ "notNull": true,
653
+ "autoincrement": false
654
+ },
655
+ "created_at": {
656
+ "name": "created_at",
657
+ "type": "integer",
658
+ "primaryKey": false,
659
+ "notNull": true,
660
+ "autoincrement": false
661
+ },
662
+ "admitted_at": {
663
+ "name": "admitted_at",
664
+ "type": "integer",
665
+ "primaryKey": false,
666
+ "notNull": false,
667
+ "autoincrement": false
668
+ }
669
+ },
670
+ "indexes": {
671
+ "idx_admission_status": {
672
+ "name": "idx_admission_status",
673
+ "columns": [
674
+ "status"
675
+ ],
676
+ "isUnique": false
677
+ },
678
+ "idx_admission_flow": {
679
+ "name": "idx_admission_flow",
680
+ "columns": [
681
+ "flow_id"
682
+ ],
683
+ "isUnique": false
684
+ },
685
+ "idx_admission_status_created": {
686
+ "name": "idx_admission_status_created",
687
+ "columns": [
688
+ "status",
689
+ "created_at"
690
+ ],
691
+ "isUnique": false
692
+ }
693
+ },
694
+ "foreignKeys": {
695
+ "flow_admission_queue_flow_id_flow_runs_flow_id_fk": {
696
+ "name": "flow_admission_queue_flow_id_flow_runs_flow_id_fk",
697
+ "tableFrom": "flow_admission_queue",
698
+ "tableTo": "flow_runs",
699
+ "columnsFrom": [
700
+ "flow_id"
701
+ ],
702
+ "columnsTo": [
703
+ "flow_id"
704
+ ],
705
+ "onDelete": "cascade",
706
+ "onUpdate": "no action"
707
+ }
708
+ },
709
+ "compositePrimaryKeys": {},
710
+ "uniqueConstraints": {},
711
+ "checkConstraints": {}
712
+ },
713
+ "flow_events": {
714
+ "name": "flow_events",
715
+ "columns": {
716
+ "id": {
717
+ "name": "id",
718
+ "type": "text",
719
+ "primaryKey": true,
720
+ "notNull": true,
721
+ "autoincrement": false
722
+ },
723
+ "flow_id": {
724
+ "name": "flow_id",
725
+ "type": "text",
726
+ "primaryKey": false,
727
+ "notNull": true,
728
+ "autoincrement": false
729
+ },
730
+ "event_type": {
731
+ "name": "event_type",
732
+ "type": "text",
733
+ "primaryKey": false,
734
+ "notNull": true,
735
+ "autoincrement": false
736
+ },
737
+ "prev_step": {
738
+ "name": "prev_step",
739
+ "type": "text",
740
+ "primaryKey": false,
741
+ "notNull": false,
742
+ "autoincrement": false
743
+ },
744
+ "curr_step": {
745
+ "name": "curr_step",
746
+ "type": "text",
747
+ "primaryKey": false,
748
+ "notNull": false,
749
+ "autoincrement": false
750
+ },
751
+ "prev_status": {
752
+ "name": "prev_status",
753
+ "type": "text",
754
+ "primaryKey": false,
755
+ "notNull": false,
756
+ "autoincrement": false
757
+ },
758
+ "curr_status": {
759
+ "name": "curr_status",
760
+ "type": "text",
761
+ "primaryKey": false,
762
+ "notNull": false,
763
+ "autoincrement": false
764
+ },
765
+ "wait_kind": {
766
+ "name": "wait_kind",
767
+ "type": "text",
768
+ "primaryKey": false,
769
+ "notNull": false,
770
+ "autoincrement": false
771
+ },
772
+ "occurred_at": {
773
+ "name": "occurred_at",
774
+ "type": "integer",
775
+ "primaryKey": false,
776
+ "notNull": true,
777
+ "autoincrement": false
778
+ }
779
+ },
780
+ "indexes": {
781
+ "idx_flow_events_flow_id": {
782
+ "name": "idx_flow_events_flow_id",
783
+ "columns": [
784
+ "flow_id"
785
+ ],
786
+ "isUnique": false
787
+ },
788
+ "idx_flow_events_occurred_at": {
789
+ "name": "idx_flow_events_occurred_at",
790
+ "columns": [
791
+ "occurred_at"
792
+ ],
793
+ "isUnique": false
794
+ }
795
+ },
796
+ "foreignKeys": {
797
+ "flow_events_flow_id_flow_runs_flow_id_fk": {
798
+ "name": "flow_events_flow_id_flow_runs_flow_id_fk",
799
+ "tableFrom": "flow_events",
800
+ "tableTo": "flow_runs",
801
+ "columnsFrom": [
802
+ "flow_id"
803
+ ],
804
+ "columnsTo": [
805
+ "flow_id"
806
+ ],
807
+ "onDelete": "cascade",
808
+ "onUpdate": "no action"
809
+ }
810
+ },
811
+ "compositePrimaryKeys": {},
812
+ "uniqueConstraints": {},
813
+ "checkConstraints": {}
814
+ },
815
+ "flow_node_executions": {
816
+ "name": "flow_node_executions",
817
+ "columns": {
818
+ "id": {
819
+ "name": "id",
820
+ "type": "text",
821
+ "primaryKey": true,
822
+ "notNull": true,
823
+ "autoincrement": false
824
+ },
825
+ "invocation_id": {
826
+ "name": "invocation_id",
827
+ "type": "text",
828
+ "primaryKey": false,
829
+ "notNull": true,
830
+ "autoincrement": false
831
+ },
832
+ "entered_at": {
833
+ "name": "entered_at",
834
+ "type": "integer",
835
+ "primaryKey": false,
836
+ "notNull": true,
837
+ "autoincrement": false
838
+ },
839
+ "exited_at": {
840
+ "name": "exited_at",
841
+ "type": "integer",
842
+ "primaryKey": false,
843
+ "notNull": true,
844
+ "autoincrement": false
845
+ },
846
+ "kind": {
847
+ "name": "kind",
848
+ "type": "text",
849
+ "primaryKey": false,
850
+ "notNull": true,
851
+ "autoincrement": false,
852
+ "default": "'legacy'"
853
+ }
854
+ },
855
+ "indexes": {
856
+ "idx_fne_invocation": {
857
+ "name": "idx_fne_invocation",
858
+ "columns": [
859
+ "invocation_id"
860
+ ],
861
+ "isUnique": false
862
+ },
863
+ "idx_fne_exited": {
864
+ "name": "idx_fne_exited",
865
+ "columns": [
866
+ "exited_at"
867
+ ],
868
+ "isUnique": false
869
+ }
870
+ },
871
+ "foreignKeys": {
872
+ "flow_node_executions_invocation_id_flow_node_invocations_id_fk": {
873
+ "name": "flow_node_executions_invocation_id_flow_node_invocations_id_fk",
874
+ "tableFrom": "flow_node_executions",
875
+ "tableTo": "flow_node_invocations",
876
+ "columnsFrom": [
877
+ "invocation_id"
878
+ ],
879
+ "columnsTo": [
880
+ "id"
881
+ ],
882
+ "onDelete": "cascade",
883
+ "onUpdate": "no action"
884
+ }
885
+ },
886
+ "compositePrimaryKeys": {},
887
+ "uniqueConstraints": {},
888
+ "checkConstraints": {}
889
+ },
890
+ "flow_node_invocations": {
891
+ "name": "flow_node_invocations",
892
+ "columns": {
893
+ "id": {
894
+ "name": "id",
895
+ "type": "text",
896
+ "primaryKey": true,
897
+ "notNull": true,
898
+ "autoincrement": false
899
+ },
900
+ "flow_id": {
901
+ "name": "flow_id",
902
+ "type": "text",
903
+ "primaryKey": false,
904
+ "notNull": true,
905
+ "autoincrement": false
906
+ },
907
+ "pipeline_id": {
908
+ "name": "pipeline_id",
909
+ "type": "text",
910
+ "primaryKey": false,
911
+ "notNull": false,
912
+ "autoincrement": false
913
+ },
914
+ "node_id": {
915
+ "name": "node_id",
916
+ "type": "text",
917
+ "primaryKey": false,
918
+ "notNull": true,
919
+ "autoincrement": false
920
+ },
921
+ "subflow_key": {
922
+ "name": "subflow_key",
923
+ "type": "text",
924
+ "primaryKey": false,
925
+ "notNull": false,
926
+ "autoincrement": false
927
+ },
928
+ "visit_seq": {
929
+ "name": "visit_seq",
930
+ "type": "integer",
931
+ "primaryKey": false,
932
+ "notNull": true,
933
+ "autoincrement": false,
934
+ "default": 1
935
+ },
936
+ "invoked_at": {
937
+ "name": "invoked_at",
938
+ "type": "integer",
939
+ "primaryKey": false,
940
+ "notNull": true,
941
+ "autoincrement": false
942
+ },
943
+ "result_json": {
944
+ "name": "result_json",
945
+ "type": "text",
946
+ "primaryKey": false,
947
+ "notNull": false,
948
+ "autoincrement": false
949
+ },
950
+ "result_written_at": {
951
+ "name": "result_written_at",
952
+ "type": "integer",
953
+ "primaryKey": false,
954
+ "notNull": false,
955
+ "autoincrement": false
956
+ },
957
+ "result_too_large_bytes": {
958
+ "name": "result_too_large_bytes",
959
+ "type": "integer",
960
+ "primaryKey": false,
961
+ "notNull": false,
962
+ "autoincrement": false
963
+ }
964
+ },
965
+ "indexes": {
966
+ "idx_invocations_flow": {
967
+ "name": "idx_invocations_flow",
968
+ "columns": [
969
+ "flow_id"
970
+ ],
971
+ "isUnique": false
972
+ },
973
+ "idx_invocations_node_subflow": {
974
+ "name": "idx_invocations_node_subflow",
975
+ "columns": [
976
+ "node_id",
977
+ "subflow_key"
978
+ ],
979
+ "isUnique": false
980
+ },
981
+ "idx_invocations_pipe_node": {
982
+ "name": "idx_invocations_pipe_node",
983
+ "columns": [
984
+ "pipeline_id",
985
+ "node_id"
986
+ ],
987
+ "isUnique": false
988
+ }
989
+ },
990
+ "foreignKeys": {
991
+ "flow_node_invocations_flow_id_flow_runs_flow_id_fk": {
992
+ "name": "flow_node_invocations_flow_id_flow_runs_flow_id_fk",
993
+ "tableFrom": "flow_node_invocations",
994
+ "tableTo": "flow_runs",
995
+ "columnsFrom": [
996
+ "flow_id"
997
+ ],
998
+ "columnsTo": [
999
+ "flow_id"
1000
+ ],
1001
+ "onDelete": "cascade",
1002
+ "onUpdate": "no action"
1003
+ }
1004
+ },
1005
+ "compositePrimaryKeys": {},
1006
+ "uniqueConstraints": {},
1007
+ "checkConstraints": {}
1008
+ },
1009
+ "flow_runs": {
1010
+ "name": "flow_runs",
1011
+ "columns": {
1012
+ "flow_id": {
1013
+ "name": "flow_id",
1014
+ "type": "text",
1015
+ "primaryKey": true,
1016
+ "notNull": true,
1017
+ "autoincrement": false
1018
+ },
1019
+ "owner_key": {
1020
+ "name": "owner_key",
1021
+ "type": "text",
1022
+ "primaryKey": false,
1023
+ "notNull": true,
1024
+ "autoincrement": false,
1025
+ "default": "''"
1026
+ },
1027
+ "revision": {
1028
+ "name": "revision",
1029
+ "type": "integer",
1030
+ "primaryKey": false,
1031
+ "notNull": true,
1032
+ "autoincrement": false,
1033
+ "default": 0
1034
+ },
1035
+ "status": {
1036
+ "name": "status",
1037
+ "type": "text",
1038
+ "primaryKey": false,
1039
+ "notNull": true,
1040
+ "autoincrement": false
1041
+ },
1042
+ "last_step": {
1043
+ "name": "last_step",
1044
+ "type": "text",
1045
+ "primaryKey": false,
1046
+ "notNull": false,
1047
+ "autoincrement": false
1048
+ },
1049
+ "status_reason": {
1050
+ "name": "status_reason",
1051
+ "type": "text",
1052
+ "primaryKey": false,
1053
+ "notNull": false,
1054
+ "autoincrement": false
1055
+ },
1056
+ "state_json": {
1057
+ "name": "state_json",
1058
+ "type": "text",
1059
+ "primaryKey": false,
1060
+ "notNull": true,
1061
+ "autoincrement": false,
1062
+ "default": "'{}'"
1063
+ },
1064
+ "wait_json": {
1065
+ "name": "wait_json",
1066
+ "type": "text",
1067
+ "primaryKey": false,
1068
+ "notNull": false,
1069
+ "autoincrement": false
1070
+ },
1071
+ "cancel_requested_at": {
1072
+ "name": "cancel_requested_at",
1073
+ "type": "integer",
1074
+ "primaryKey": false,
1075
+ "notNull": false,
1076
+ "autoincrement": false
1077
+ },
1078
+ "created_at": {
1079
+ "name": "created_at",
1080
+ "type": "integer",
1081
+ "primaryKey": false,
1082
+ "notNull": true,
1083
+ "autoincrement": false
1084
+ },
1085
+ "updated_at": {
1086
+ "name": "updated_at",
1087
+ "type": "integer",
1088
+ "primaryKey": false,
1089
+ "notNull": true,
1090
+ "autoincrement": false
1091
+ },
1092
+ "ended_at": {
1093
+ "name": "ended_at",
1094
+ "type": "integer",
1095
+ "primaryKey": false,
1096
+ "notNull": false,
1097
+ "autoincrement": false
1098
+ },
1099
+ "parent_invocation_id": {
1100
+ "name": "parent_invocation_id",
1101
+ "type": "text",
1102
+ "primaryKey": false,
1103
+ "notNull": false,
1104
+ "autoincrement": false
1105
+ },
1106
+ "pipeline_id": {
1107
+ "name": "pipeline_id",
1108
+ "type": "text",
1109
+ "primaryKey": false,
1110
+ "notNull": false,
1111
+ "autoincrement": false
1112
+ }
1113
+ },
1114
+ "indexes": {
1115
+ "idx_pfr_status": {
1116
+ "name": "idx_pfr_status",
1117
+ "columns": [
1118
+ "status"
1119
+ ],
1120
+ "isUnique": false,
1121
+ "where": "\"flow_runs\".\"ended_at\" IS NULL"
1122
+ },
1123
+ "idx_pfr_updated": {
1124
+ "name": "idx_pfr_updated",
1125
+ "columns": [
1126
+ "\"updated_at\" desc"
1127
+ ],
1128
+ "isUnique": false
1129
+ },
1130
+ "idx_pfr_created": {
1131
+ "name": "idx_pfr_created",
1132
+ "columns": [
1133
+ "\"created_at\" desc"
1134
+ ],
1135
+ "isUnique": false
1136
+ },
1137
+ "idx_pfr_parent_invocation": {
1138
+ "name": "idx_pfr_parent_invocation",
1139
+ "columns": [
1140
+ "parent_invocation_id"
1141
+ ],
1142
+ "isUnique": true,
1143
+ "where": "\"flow_runs\".\"parent_invocation_id\" IS NOT NULL"
1144
+ },
1145
+ "idx_flow_runs_pipeline_id": {
1146
+ "name": "idx_flow_runs_pipeline_id",
1147
+ "columns": [
1148
+ "pipeline_id"
1149
+ ],
1150
+ "isUnique": false
1151
+ }
1152
+ },
1153
+ "foreignKeys": {
1154
+ "flow_runs_parent_invocation_id_flow_node_invocations_id_fk": {
1155
+ "name": "flow_runs_parent_invocation_id_flow_node_invocations_id_fk",
1156
+ "tableFrom": "flow_runs",
1157
+ "tableTo": "flow_node_invocations",
1158
+ "columnsFrom": [
1159
+ "parent_invocation_id"
1160
+ ],
1161
+ "columnsTo": [
1162
+ "id"
1163
+ ],
1164
+ "onDelete": "set null",
1165
+ "onUpdate": "no action"
1166
+ },
1167
+ "flow_runs_pipeline_id_pipelines_id_fk": {
1168
+ "name": "flow_runs_pipeline_id_pipelines_id_fk",
1169
+ "tableFrom": "flow_runs",
1170
+ "tableTo": "pipelines",
1171
+ "columnsFrom": [
1172
+ "pipeline_id"
1173
+ ],
1174
+ "columnsTo": [
1175
+ "id"
1176
+ ],
1177
+ "onDelete": "set null",
1178
+ "onUpdate": "no action"
1179
+ }
1180
+ },
1181
+ "compositePrimaryKeys": {},
1182
+ "uniqueConstraints": {},
1183
+ "checkConstraints": {}
1184
+ },
1185
+ "flow_sessions": {
1186
+ "name": "flow_sessions",
1187
+ "columns": {
1188
+ "id": {
1189
+ "name": "id",
1190
+ "type": "text",
1191
+ "primaryKey": true,
1192
+ "notNull": true,
1193
+ "autoincrement": false
1194
+ },
1195
+ "flow_id": {
1196
+ "name": "flow_id",
1197
+ "type": "text",
1198
+ "primaryKey": false,
1199
+ "notNull": true,
1200
+ "autoincrement": false
1201
+ },
1202
+ "session_key": {
1203
+ "name": "session_key",
1204
+ "type": "text",
1205
+ "primaryKey": false,
1206
+ "notNull": true,
1207
+ "autoincrement": false
1208
+ },
1209
+ "node_id": {
1210
+ "name": "node_id",
1211
+ "type": "text",
1212
+ "primaryKey": false,
1213
+ "notNull": false,
1214
+ "autoincrement": false
1215
+ },
1216
+ "branch_item_id": {
1217
+ "name": "branch_item_id",
1218
+ "type": "text",
1219
+ "primaryKey": false,
1220
+ "notNull": false,
1221
+ "autoincrement": false
1222
+ },
1223
+ "spawned_at": {
1224
+ "name": "spawned_at",
1225
+ "type": "integer",
1226
+ "primaryKey": false,
1227
+ "notNull": true,
1228
+ "autoincrement": false
1229
+ }
1230
+ },
1231
+ "indexes": {
1232
+ "idx_flow_sessions_flow_id": {
1233
+ "name": "idx_flow_sessions_flow_id",
1234
+ "columns": [
1235
+ "flow_id"
1236
+ ],
1237
+ "isUnique": false
1238
+ },
1239
+ "idx_flow_sessions_uniq": {
1240
+ "name": "idx_flow_sessions_uniq",
1241
+ "columns": [
1242
+ "flow_id",
1243
+ "session_key"
1244
+ ],
1245
+ "isUnique": true
1246
+ }
1247
+ },
1248
+ "foreignKeys": {
1249
+ "flow_sessions_flow_id_flow_runs_flow_id_fk": {
1250
+ "name": "flow_sessions_flow_id_flow_runs_flow_id_fk",
1251
+ "tableFrom": "flow_sessions",
1252
+ "tableTo": "flow_runs",
1253
+ "columnsFrom": [
1254
+ "flow_id"
1255
+ ],
1256
+ "columnsTo": [
1257
+ "flow_id"
1258
+ ],
1259
+ "onDelete": "cascade",
1260
+ "onUpdate": "no action"
1261
+ },
1262
+ "flow_sessions_session_key_sessions_session_key_fk": {
1263
+ "name": "flow_sessions_session_key_sessions_session_key_fk",
1264
+ "tableFrom": "flow_sessions",
1265
+ "tableTo": "sessions",
1266
+ "columnsFrom": [
1267
+ "session_key"
1268
+ ],
1269
+ "columnsTo": [
1270
+ "session_key"
1271
+ ],
1272
+ "onDelete": "no action",
1273
+ "onUpdate": "no action"
1274
+ }
1275
+ },
1276
+ "compositePrimaryKeys": {},
1277
+ "uniqueConstraints": {},
1278
+ "checkConstraints": {}
1279
+ },
1280
+ "gate_records": {
1281
+ "name": "gate_records",
1282
+ "columns": {
1283
+ "flow_id": {
1284
+ "name": "flow_id",
1285
+ "type": "text",
1286
+ "primaryKey": false,
1287
+ "notNull": true,
1288
+ "autoincrement": false
1289
+ },
1290
+ "node_id": {
1291
+ "name": "node_id",
1292
+ "type": "text",
1293
+ "primaryKey": false,
1294
+ "notNull": true,
1295
+ "autoincrement": false
1296
+ },
1297
+ "record_json": {
1298
+ "name": "record_json",
1299
+ "type": "text",
1300
+ "primaryKey": false,
1301
+ "notNull": true,
1302
+ "autoincrement": false
1303
+ },
1304
+ "updated_at": {
1305
+ "name": "updated_at",
1306
+ "type": "integer",
1307
+ "primaryKey": false,
1308
+ "notNull": true,
1309
+ "autoincrement": false
1310
+ }
1311
+ },
1312
+ "indexes": {},
1313
+ "foreignKeys": {
1314
+ "gate_records_flow_id_flow_runs_flow_id_fk": {
1315
+ "name": "gate_records_flow_id_flow_runs_flow_id_fk",
1316
+ "tableFrom": "gate_records",
1317
+ "tableTo": "flow_runs",
1318
+ "columnsFrom": [
1319
+ "flow_id"
1320
+ ],
1321
+ "columnsTo": [
1322
+ "flow_id"
1323
+ ],
1324
+ "onDelete": "cascade",
1325
+ "onUpdate": "no action"
1326
+ }
1327
+ },
1328
+ "compositePrimaryKeys": {
1329
+ "gate_records_flow_id_node_id_pk": {
1330
+ "columns": [
1331
+ "flow_id",
1332
+ "node_id"
1333
+ ],
1334
+ "name": "gate_records_flow_id_node_id_pk"
1335
+ }
1336
+ },
1337
+ "uniqueConstraints": {},
1338
+ "checkConstraints": {}
1339
+ },
1340
+ "harnesses": {
1341
+ "name": "harnesses",
1342
+ "columns": {
1343
+ "id": {
1344
+ "name": "id",
1345
+ "type": "text",
1346
+ "primaryKey": true,
1347
+ "notNull": true,
1348
+ "autoincrement": false
1349
+ },
1350
+ "created_at": {
1351
+ "name": "created_at",
1352
+ "type": "integer",
1353
+ "primaryKey": false,
1354
+ "notNull": true,
1355
+ "autoincrement": false
1356
+ },
1357
+ "updated_at": {
1358
+ "name": "updated_at",
1359
+ "type": "integer",
1360
+ "primaryKey": false,
1361
+ "notNull": true,
1362
+ "autoincrement": false
1363
+ }
1364
+ },
1365
+ "indexes": {},
1366
+ "foreignKeys": {},
1367
+ "compositePrimaryKeys": {},
1368
+ "uniqueConstraints": {},
1369
+ "checkConstraints": {}
1370
+ },
1371
+ "model_health": {
1372
+ "name": "model_health",
1373
+ "columns": {
1374
+ "id": {
1375
+ "name": "id",
1376
+ "type": "text",
1377
+ "primaryKey": true,
1378
+ "notNull": true,
1379
+ "autoincrement": false
1380
+ },
1381
+ "ref": {
1382
+ "name": "ref",
1383
+ "type": "text",
1384
+ "primaryKey": false,
1385
+ "notNull": true,
1386
+ "autoincrement": false
1387
+ },
1388
+ "status": {
1389
+ "name": "status",
1390
+ "type": "text",
1391
+ "primaryKey": false,
1392
+ "notNull": true,
1393
+ "autoincrement": false
1394
+ },
1395
+ "reason": {
1396
+ "name": "reason",
1397
+ "type": "text",
1398
+ "primaryKey": false,
1399
+ "notNull": true,
1400
+ "autoincrement": false
1401
+ },
1402
+ "down_since": {
1403
+ "name": "down_since",
1404
+ "type": "integer",
1405
+ "primaryKey": false,
1406
+ "notNull": true,
1407
+ "autoincrement": false
1408
+ },
1409
+ "until_ms": {
1410
+ "name": "until_ms",
1411
+ "type": "integer",
1412
+ "primaryKey": false,
1413
+ "notNull": false,
1414
+ "autoincrement": false
1415
+ },
1416
+ "probing": {
1417
+ "name": "probing",
1418
+ "type": "integer",
1419
+ "primaryKey": false,
1420
+ "notNull": true,
1421
+ "autoincrement": false,
1422
+ "default": 0
1423
+ },
1424
+ "strike_level": {
1425
+ "name": "strike_level",
1426
+ "type": "integer",
1427
+ "primaryKey": false,
1428
+ "notNull": true,
1429
+ "autoincrement": false,
1430
+ "default": 0
1431
+ },
1432
+ "strike_ended_at": {
1433
+ "name": "strike_ended_at",
1434
+ "type": "integer",
1435
+ "primaryKey": false,
1436
+ "notNull": false,
1437
+ "autoincrement": false
1438
+ },
1439
+ "created_at": {
1440
+ "name": "created_at",
1441
+ "type": "integer",
1442
+ "primaryKey": false,
1443
+ "notNull": true,
1444
+ "autoincrement": false
1445
+ },
1446
+ "updated_at": {
1447
+ "name": "updated_at",
1448
+ "type": "integer",
1449
+ "primaryKey": false,
1450
+ "notNull": true,
1451
+ "autoincrement": false
1452
+ }
1453
+ },
1454
+ "indexes": {},
1455
+ "foreignKeys": {},
1456
+ "compositePrimaryKeys": {},
1457
+ "uniqueConstraints": {},
1458
+ "checkConstraints": {}
1459
+ },
1460
+ "node_health": {
1461
+ "name": "node_health",
1462
+ "columns": {
1463
+ "id": {
1464
+ "name": "id",
1465
+ "type": "text",
1466
+ "primaryKey": true,
1467
+ "notNull": true,
1468
+ "autoincrement": false
1469
+ },
1470
+ "pipeline_id": {
1471
+ "name": "pipeline_id",
1472
+ "type": "text",
1473
+ "primaryKey": false,
1474
+ "notNull": true,
1475
+ "autoincrement": false
1476
+ },
1477
+ "node_id": {
1478
+ "name": "node_id",
1479
+ "type": "text",
1480
+ "primaryKey": false,
1481
+ "notNull": true,
1482
+ "autoincrement": false
1483
+ },
1484
+ "status": {
1485
+ "name": "status",
1486
+ "type": "text",
1487
+ "primaryKey": false,
1488
+ "notNull": true,
1489
+ "autoincrement": false
1490
+ },
1491
+ "reason": {
1492
+ "name": "reason",
1493
+ "type": "text",
1494
+ "primaryKey": false,
1495
+ "notNull": true,
1496
+ "autoincrement": false
1497
+ },
1498
+ "blocked_by_flow_id": {
1499
+ "name": "blocked_by_flow_id",
1500
+ "type": "text",
1501
+ "primaryKey": false,
1502
+ "notNull": false,
1503
+ "autoincrement": false
1504
+ },
1505
+ "resolved_via": {
1506
+ "name": "resolved_via",
1507
+ "type": "text",
1508
+ "primaryKey": false,
1509
+ "notNull": false,
1510
+ "autoincrement": false
1511
+ },
1512
+ "created_at": {
1513
+ "name": "created_at",
1514
+ "type": "integer",
1515
+ "primaryKey": false,
1516
+ "notNull": true,
1517
+ "autoincrement": false
1518
+ },
1519
+ "updated_at": {
1520
+ "name": "updated_at",
1521
+ "type": "integer",
1522
+ "primaryKey": false,
1523
+ "notNull": true,
1524
+ "autoincrement": false
1525
+ },
1526
+ "ended_at": {
1527
+ "name": "ended_at",
1528
+ "type": "integer",
1529
+ "primaryKey": false,
1530
+ "notNull": false,
1531
+ "autoincrement": false
1532
+ }
1533
+ },
1534
+ "indexes": {
1535
+ "idx_node_health_one_active": {
1536
+ "name": "idx_node_health_one_active",
1537
+ "columns": [
1538
+ "pipeline_id",
1539
+ "node_id"
1540
+ ],
1541
+ "isUnique": true,
1542
+ "where": "\"node_health\".\"status\" = 'blocked'"
1543
+ },
1544
+ "idx_node_health_pipeline": {
1545
+ "name": "idx_node_health_pipeline",
1546
+ "columns": [
1547
+ "pipeline_id",
1548
+ "status"
1549
+ ],
1550
+ "isUnique": false
1551
+ }
1552
+ },
1553
+ "foreignKeys": {
1554
+ "node_health_pipeline_id_pipelines_id_fk": {
1555
+ "name": "node_health_pipeline_id_pipelines_id_fk",
1556
+ "tableFrom": "node_health",
1557
+ "tableTo": "pipelines",
1558
+ "columnsFrom": [
1559
+ "pipeline_id"
1560
+ ],
1561
+ "columnsTo": [
1562
+ "id"
1563
+ ],
1564
+ "onDelete": "restrict",
1565
+ "onUpdate": "no action"
1566
+ },
1567
+ "node_health_blocked_by_flow_id_flow_runs_flow_id_fk": {
1568
+ "name": "node_health_blocked_by_flow_id_flow_runs_flow_id_fk",
1569
+ "tableFrom": "node_health",
1570
+ "tableTo": "flow_runs",
1571
+ "columnsFrom": [
1572
+ "blocked_by_flow_id"
1573
+ ],
1574
+ "columnsTo": [
1575
+ "flow_id"
1576
+ ],
1577
+ "onDelete": "set null",
1578
+ "onUpdate": "no action"
1579
+ }
1580
+ },
1581
+ "compositePrimaryKeys": {},
1582
+ "uniqueConstraints": {},
1583
+ "checkConstraints": {}
1584
+ },
1585
+ "pipeline_dirs": {
1586
+ "name": "pipeline_dirs",
1587
+ "columns": {
1588
+ "harness": {
1589
+ "name": "harness",
1590
+ "type": "text",
1591
+ "primaryKey": true,
1592
+ "notNull": true,
1593
+ "autoincrement": false
1594
+ },
1595
+ "path": {
1596
+ "name": "path",
1597
+ "type": "text",
1598
+ "primaryKey": false,
1599
+ "notNull": true,
1600
+ "autoincrement": false
1601
+ },
1602
+ "created_at": {
1603
+ "name": "created_at",
1604
+ "type": "integer",
1605
+ "primaryKey": false,
1606
+ "notNull": true,
1607
+ "autoincrement": false
1608
+ }
1609
+ },
1610
+ "indexes": {},
1611
+ "foreignKeys": {
1612
+ "pipeline_dirs_harness_harnesses_id_fk": {
1613
+ "name": "pipeline_dirs_harness_harnesses_id_fk",
1614
+ "tableFrom": "pipeline_dirs",
1615
+ "tableTo": "harnesses",
1616
+ "columnsFrom": [
1617
+ "harness"
1618
+ ],
1619
+ "columnsTo": [
1620
+ "id"
1621
+ ],
1622
+ "onDelete": "cascade",
1623
+ "onUpdate": "no action"
1624
+ }
1625
+ },
1626
+ "compositePrimaryKeys": {},
1627
+ "uniqueConstraints": {},
1628
+ "checkConstraints": {}
1629
+ },
1630
+ "pipeline_node_versions": {
1631
+ "name": "pipeline_node_versions",
1632
+ "columns": {
1633
+ "id": {
1634
+ "name": "id",
1635
+ "type": "text",
1636
+ "primaryKey": true,
1637
+ "notNull": true,
1638
+ "autoincrement": false
1639
+ },
1640
+ "pipeline_version_id": {
1641
+ "name": "pipeline_version_id",
1642
+ "type": "text",
1643
+ "primaryKey": false,
1644
+ "notNull": true,
1645
+ "autoincrement": false
1646
+ },
1647
+ "pipeline_id": {
1648
+ "name": "pipeline_id",
1649
+ "type": "text",
1650
+ "primaryKey": false,
1651
+ "notNull": true,
1652
+ "autoincrement": false
1653
+ },
1654
+ "node_name": {
1655
+ "name": "node_name",
1656
+ "type": "text",
1657
+ "primaryKey": false,
1658
+ "notNull": true,
1659
+ "autoincrement": false
1660
+ },
1661
+ "node_id": {
1662
+ "name": "node_id",
1663
+ "type": "text",
1664
+ "primaryKey": false,
1665
+ "notNull": false,
1666
+ "autoincrement": false
1667
+ },
1668
+ "kind": {
1669
+ "name": "kind",
1670
+ "type": "text",
1671
+ "primaryKey": false,
1672
+ "notNull": true,
1673
+ "autoincrement": false
1674
+ },
1675
+ "agent": {
1676
+ "name": "agent",
1677
+ "type": "text",
1678
+ "primaryKey": false,
1679
+ "notNull": false,
1680
+ "autoincrement": false
1681
+ },
1682
+ "mode": {
1683
+ "name": "mode",
1684
+ "type": "text",
1685
+ "primaryKey": false,
1686
+ "notNull": false,
1687
+ "autoincrement": false
1688
+ },
1689
+ "content_hash": {
1690
+ "name": "content_hash",
1691
+ "type": "text",
1692
+ "primaryKey": false,
1693
+ "notNull": true,
1694
+ "autoincrement": false
1695
+ },
1696
+ "registered_at": {
1697
+ "name": "registered_at",
1698
+ "type": "integer",
1699
+ "primaryKey": false,
1700
+ "notNull": true,
1701
+ "autoincrement": false
1702
+ },
1703
+ "retired_at": {
1704
+ "name": "retired_at",
1705
+ "type": "integer",
1706
+ "primaryKey": false,
1707
+ "notNull": false,
1708
+ "autoincrement": false
1709
+ }
1710
+ },
1711
+ "indexes": {
1712
+ "idx_pnv_lookup": {
1713
+ "name": "idx_pnv_lookup",
1714
+ "columns": [
1715
+ "pipeline_id",
1716
+ "node_name",
1717
+ "registered_at"
1718
+ ],
1719
+ "isUnique": false
1720
+ },
1721
+ "idx_pnv_active": {
1722
+ "name": "idx_pnv_active",
1723
+ "columns": [
1724
+ "pipeline_id",
1725
+ "node_name"
1726
+ ],
1727
+ "isUnique": true,
1728
+ "where": "\"pipeline_node_versions\".\"retired_at\" IS NULL"
1729
+ }
1730
+ },
1731
+ "foreignKeys": {
1732
+ "pipeline_node_versions_pipeline_version_id_pipeline_versions_id_fk": {
1733
+ "name": "pipeline_node_versions_pipeline_version_id_pipeline_versions_id_fk",
1734
+ "tableFrom": "pipeline_node_versions",
1735
+ "tableTo": "pipeline_versions",
1736
+ "columnsFrom": [
1737
+ "pipeline_version_id"
1738
+ ],
1739
+ "columnsTo": [
1740
+ "id"
1741
+ ],
1742
+ "onDelete": "cascade",
1743
+ "onUpdate": "no action"
1744
+ },
1745
+ "pipeline_node_versions_pipeline_id_pipelines_id_fk": {
1746
+ "name": "pipeline_node_versions_pipeline_id_pipelines_id_fk",
1747
+ "tableFrom": "pipeline_node_versions",
1748
+ "tableTo": "pipelines",
1749
+ "columnsFrom": [
1750
+ "pipeline_id"
1751
+ ],
1752
+ "columnsTo": [
1753
+ "id"
1754
+ ],
1755
+ "onDelete": "restrict",
1756
+ "onUpdate": "no action"
1757
+ }
1758
+ },
1759
+ "compositePrimaryKeys": {},
1760
+ "uniqueConstraints": {},
1761
+ "checkConstraints": {}
1762
+ },
1763
+ "pipeline_versions": {
1764
+ "name": "pipeline_versions",
1765
+ "columns": {
1766
+ "id": {
1767
+ "name": "id",
1768
+ "type": "text",
1769
+ "primaryKey": true,
1770
+ "notNull": true,
1771
+ "autoincrement": false
1772
+ },
1773
+ "pipeline_id": {
1774
+ "name": "pipeline_id",
1775
+ "type": "text",
1776
+ "primaryKey": false,
1777
+ "notNull": true,
1778
+ "autoincrement": false
1779
+ },
1780
+ "kind": {
1781
+ "name": "kind",
1782
+ "type": "text",
1783
+ "primaryKey": false,
1784
+ "notNull": false,
1785
+ "autoincrement": false
1786
+ },
1787
+ "allow_concurrent": {
1788
+ "name": "allow_concurrent",
1789
+ "type": "text",
1790
+ "primaryKey": false,
1791
+ "notNull": false,
1792
+ "autoincrement": false
1793
+ },
1794
+ "is_synthetic": {
1795
+ "name": "is_synthetic",
1796
+ "type": "integer",
1797
+ "primaryKey": false,
1798
+ "notNull": true,
1799
+ "autoincrement": false
1800
+ },
1801
+ "parent_pipeline_id": {
1802
+ "name": "parent_pipeline_id",
1803
+ "type": "text",
1804
+ "primaryKey": false,
1805
+ "notNull": false,
1806
+ "autoincrement": false
1807
+ },
1808
+ "source_path": {
1809
+ "name": "source_path",
1810
+ "type": "text",
1811
+ "primaryKey": false,
1812
+ "notNull": false,
1813
+ "autoincrement": false
1814
+ },
1815
+ "content_hash": {
1816
+ "name": "content_hash",
1817
+ "type": "text",
1818
+ "primaryKey": false,
1819
+ "notNull": true,
1820
+ "autoincrement": false
1821
+ },
1822
+ "registered_at": {
1823
+ "name": "registered_at",
1824
+ "type": "integer",
1825
+ "primaryKey": false,
1826
+ "notNull": true,
1827
+ "autoincrement": false
1828
+ },
1829
+ "retired_at": {
1830
+ "name": "retired_at",
1831
+ "type": "integer",
1832
+ "primaryKey": false,
1833
+ "notNull": false,
1834
+ "autoincrement": false
1835
+ }
1836
+ },
1837
+ "indexes": {
1838
+ "idx_pv_lookup": {
1839
+ "name": "idx_pv_lookup",
1840
+ "columns": [
1841
+ "pipeline_id",
1842
+ "registered_at"
1843
+ ],
1844
+ "isUnique": false
1845
+ },
1846
+ "idx_pv_active": {
1847
+ "name": "idx_pv_active",
1848
+ "columns": [
1849
+ "pipeline_id"
1850
+ ],
1851
+ "isUnique": true,
1852
+ "where": "\"pipeline_versions\".\"retired_at\" IS NULL"
1853
+ }
1854
+ },
1855
+ "foreignKeys": {
1856
+ "pipeline_versions_pipeline_id_pipelines_id_fk": {
1857
+ "name": "pipeline_versions_pipeline_id_pipelines_id_fk",
1858
+ "tableFrom": "pipeline_versions",
1859
+ "tableTo": "pipelines",
1860
+ "columnsFrom": [
1861
+ "pipeline_id"
1862
+ ],
1863
+ "columnsTo": [
1864
+ "id"
1865
+ ],
1866
+ "onDelete": "restrict",
1867
+ "onUpdate": "no action"
1868
+ },
1869
+ "pipeline_versions_parent_pipeline_id_pipelines_id_fk": {
1870
+ "name": "pipeline_versions_parent_pipeline_id_pipelines_id_fk",
1871
+ "tableFrom": "pipeline_versions",
1872
+ "tableTo": "pipelines",
1873
+ "columnsFrom": [
1874
+ "parent_pipeline_id"
1875
+ ],
1876
+ "columnsTo": [
1877
+ "id"
1878
+ ],
1879
+ "onDelete": "set null",
1880
+ "onUpdate": "no action"
1881
+ }
1882
+ },
1883
+ "compositePrimaryKeys": {},
1884
+ "uniqueConstraints": {},
1885
+ "checkConstraints": {}
1886
+ },
1887
+ "pipelines": {
1888
+ "name": "pipelines",
1889
+ "columns": {
1890
+ "id": {
1891
+ "name": "id",
1892
+ "type": "text",
1893
+ "primaryKey": true,
1894
+ "notNull": true,
1895
+ "autoincrement": false
1896
+ },
1897
+ "name": {
1898
+ "name": "name",
1899
+ "type": "text",
1900
+ "primaryKey": false,
1901
+ "notNull": true,
1902
+ "autoincrement": false
1903
+ },
1904
+ "harness": {
1905
+ "name": "harness",
1906
+ "type": "text",
1907
+ "primaryKey": false,
1908
+ "notNull": false,
1909
+ "autoincrement": false
1910
+ },
1911
+ "created_at": {
1912
+ "name": "created_at",
1913
+ "type": "integer",
1914
+ "primaryKey": false,
1915
+ "notNull": true,
1916
+ "autoincrement": false
1917
+ },
1918
+ "updated_at": {
1919
+ "name": "updated_at",
1920
+ "type": "integer",
1921
+ "primaryKey": false,
1922
+ "notNull": true,
1923
+ "autoincrement": false
1924
+ },
1925
+ "deleted_at": {
1926
+ "name": "deleted_at",
1927
+ "type": "integer",
1928
+ "primaryKey": false,
1929
+ "notNull": false,
1930
+ "autoincrement": false
1931
+ }
1932
+ },
1933
+ "indexes": {
1934
+ "idx_pipelines_harness_name": {
1935
+ "name": "idx_pipelines_harness_name",
1936
+ "columns": [
1937
+ "harness",
1938
+ "name"
1939
+ ],
1940
+ "isUnique": false
1941
+ }
1942
+ },
1943
+ "foreignKeys": {
1944
+ "pipelines_harness_harnesses_id_fk": {
1945
+ "name": "pipelines_harness_harnesses_id_fk",
1946
+ "tableFrom": "pipelines",
1947
+ "tableTo": "harnesses",
1948
+ "columnsFrom": [
1949
+ "harness"
1950
+ ],
1951
+ "columnsTo": [
1952
+ "id"
1953
+ ],
1954
+ "onDelete": "set null",
1955
+ "onUpdate": "no action"
1956
+ }
1957
+ },
1958
+ "compositePrimaryKeys": {},
1959
+ "uniqueConstraints": {},
1960
+ "checkConstraints": {}
1961
+ },
1962
+ "queue_items": {
1963
+ "name": "queue_items",
1964
+ "columns": {
1965
+ "id": {
1966
+ "name": "id",
1967
+ "type": "text",
1968
+ "primaryKey": true,
1969
+ "notNull": true,
1970
+ "autoincrement": false
1971
+ },
1972
+ "label": {
1973
+ "name": "label",
1974
+ "type": "text",
1975
+ "primaryKey": false,
1976
+ "notNull": true,
1977
+ "autoincrement": false
1978
+ },
1979
+ "agent": {
1980
+ "name": "agent",
1981
+ "type": "text",
1982
+ "primaryKey": false,
1983
+ "notNull": true,
1984
+ "autoincrement": false
1985
+ },
1986
+ "agent_emoji": {
1987
+ "name": "agent_emoji",
1988
+ "type": "text",
1989
+ "primaryKey": false,
1990
+ "notNull": true,
1991
+ "autoincrement": false,
1992
+ "default": "'🤖'"
1993
+ },
1994
+ "trigger": {
1995
+ "name": "trigger",
1996
+ "type": "text",
1997
+ "primaryKey": false,
1998
+ "notNull": true,
1999
+ "autoincrement": false,
2000
+ "default": "'manual'"
2001
+ },
2002
+ "cost_low": {
2003
+ "name": "cost_low",
2004
+ "type": "real",
2005
+ "primaryKey": false,
2006
+ "notNull": true,
2007
+ "autoincrement": false,
2008
+ "default": 0
2009
+ },
2010
+ "cost_high": {
2011
+ "name": "cost_high",
2012
+ "type": "real",
2013
+ "primaryKey": false,
2014
+ "notNull": true,
2015
+ "autoincrement": false,
2016
+ "default": 0
2017
+ },
2018
+ "brief": {
2019
+ "name": "brief",
2020
+ "type": "text",
2021
+ "primaryKey": false,
2022
+ "notNull": false,
2023
+ "autoincrement": false
2024
+ },
2025
+ "model_chain": {
2026
+ "name": "model_chain",
2027
+ "type": "text",
2028
+ "primaryKey": false,
2029
+ "notNull": false,
2030
+ "autoincrement": false
2031
+ },
2032
+ "pipeline": {
2033
+ "name": "pipeline",
2034
+ "type": "text",
2035
+ "primaryKey": false,
2036
+ "notNull": false,
2037
+ "autoincrement": false
2038
+ },
2039
+ "node": {
2040
+ "name": "node",
2041
+ "type": "text",
2042
+ "primaryKey": false,
2043
+ "notNull": false,
2044
+ "autoincrement": false
2045
+ },
2046
+ "token_estimate": {
2047
+ "name": "token_estimate",
2048
+ "type": "integer",
2049
+ "primaryKey": false,
2050
+ "notNull": false,
2051
+ "autoincrement": false
2052
+ },
2053
+ "status": {
2054
+ "name": "status",
2055
+ "type": "text",
2056
+ "primaryKey": false,
2057
+ "notNull": true,
2058
+ "autoincrement": false,
2059
+ "default": "'pending'"
2060
+ },
2061
+ "created_at": {
2062
+ "name": "created_at",
2063
+ "type": "integer",
2064
+ "primaryKey": false,
2065
+ "notNull": true,
2066
+ "autoincrement": false
2067
+ },
2068
+ "expires_at": {
2069
+ "name": "expires_at",
2070
+ "type": "integer",
2071
+ "primaryKey": false,
2072
+ "notNull": false,
2073
+ "autoincrement": false
2074
+ },
2075
+ "decided_at": {
2076
+ "name": "decided_at",
2077
+ "type": "integer",
2078
+ "primaryKey": false,
2079
+ "notNull": false,
2080
+ "autoincrement": false
2081
+ },
2082
+ "decision": {
2083
+ "name": "decision",
2084
+ "type": "text",
2085
+ "primaryKey": false,
2086
+ "notNull": false,
2087
+ "autoincrement": false
2088
+ },
2089
+ "pipeline_id": {
2090
+ "name": "pipeline_id",
2091
+ "type": "text",
2092
+ "primaryKey": false,
2093
+ "notNull": false,
2094
+ "autoincrement": false
2095
+ },
2096
+ "pipeline_args": {
2097
+ "name": "pipeline_args",
2098
+ "type": "text",
2099
+ "primaryKey": false,
2100
+ "notNull": false,
2101
+ "autoincrement": false
2102
+ },
2103
+ "flow_id": {
2104
+ "name": "flow_id",
2105
+ "type": "text",
2106
+ "primaryKey": false,
2107
+ "notNull": false,
2108
+ "autoincrement": false
2109
+ },
2110
+ "enqueuer_session_key": {
2111
+ "name": "enqueuer_session_key",
2112
+ "type": "text",
2113
+ "primaryKey": false,
2114
+ "notNull": false,
2115
+ "autoincrement": false
2116
+ },
2117
+ "kind": {
2118
+ "name": "kind",
2119
+ "type": "text",
2120
+ "primaryKey": false,
2121
+ "notNull": false,
2122
+ "autoincrement": false
2123
+ }
2124
+ },
2125
+ "indexes": {
2126
+ "idx_status": {
2127
+ "name": "idx_status",
2128
+ "columns": [
2129
+ "status"
2130
+ ],
2131
+ "isUnique": false
2132
+ },
2133
+ "idx_created_at": {
2134
+ "name": "idx_created_at",
2135
+ "columns": [
2136
+ "\"created_at\" desc"
2137
+ ],
2138
+ "isUnique": false
2139
+ },
2140
+ "idx_flow_node": {
2141
+ "name": "idx_flow_node",
2142
+ "columns": [
2143
+ "flow_id",
2144
+ "node"
2145
+ ],
2146
+ "isUnique": false
2147
+ }
2148
+ },
2149
+ "foreignKeys": {
2150
+ "queue_items_pipeline_id_pipelines_id_fk": {
2151
+ "name": "queue_items_pipeline_id_pipelines_id_fk",
2152
+ "tableFrom": "queue_items",
2153
+ "tableTo": "pipelines",
2154
+ "columnsFrom": [
2155
+ "pipeline_id"
2156
+ ],
2157
+ "columnsTo": [
2158
+ "id"
2159
+ ],
2160
+ "onDelete": "set null",
2161
+ "onUpdate": "no action"
2162
+ },
2163
+ "queue_items_flow_id_flow_runs_flow_id_fk": {
2164
+ "name": "queue_items_flow_id_flow_runs_flow_id_fk",
2165
+ "tableFrom": "queue_items",
2166
+ "tableTo": "flow_runs",
2167
+ "columnsFrom": [
2168
+ "flow_id"
2169
+ ],
2170
+ "columnsTo": [
2171
+ "flow_id"
2172
+ ],
2173
+ "onDelete": "set null",
2174
+ "onUpdate": "no action"
2175
+ },
2176
+ "queue_items_enqueuer_session_key_sessions_session_key_fk": {
2177
+ "name": "queue_items_enqueuer_session_key_sessions_session_key_fk",
2178
+ "tableFrom": "queue_items",
2179
+ "tableTo": "sessions",
2180
+ "columnsFrom": [
2181
+ "enqueuer_session_key"
2182
+ ],
2183
+ "columnsTo": [
2184
+ "session_key"
2185
+ ],
2186
+ "onDelete": "set null",
2187
+ "onUpdate": "no action"
2188
+ }
2189
+ },
2190
+ "compositePrimaryKeys": {},
2191
+ "uniqueConstraints": {},
2192
+ "checkConstraints": {}
2193
+ },
2194
+ "session_lineage": {
2195
+ "name": "session_lineage",
2196
+ "columns": {
2197
+ "child_session_key": {
2198
+ "name": "child_session_key",
2199
+ "type": "text",
2200
+ "primaryKey": true,
2201
+ "notNull": true,
2202
+ "autoincrement": false
2203
+ },
2204
+ "parent_session_key": {
2205
+ "name": "parent_session_key",
2206
+ "type": "text",
2207
+ "primaryKey": false,
2208
+ "notNull": false,
2209
+ "autoincrement": false
2210
+ },
2211
+ "root_session_key": {
2212
+ "name": "root_session_key",
2213
+ "type": "text",
2214
+ "primaryKey": false,
2215
+ "notNull": true,
2216
+ "autoincrement": false
2217
+ },
2218
+ "kind": {
2219
+ "name": "kind",
2220
+ "type": "text",
2221
+ "primaryKey": false,
2222
+ "notNull": true,
2223
+ "autoincrement": false
2224
+ },
2225
+ "root_kind": {
2226
+ "name": "root_kind",
2227
+ "type": "text",
2228
+ "primaryKey": false,
2229
+ "notNull": true,
2230
+ "autoincrement": false
2231
+ },
2232
+ "root_label": {
2233
+ "name": "root_label",
2234
+ "type": "text",
2235
+ "primaryKey": false,
2236
+ "notNull": false,
2237
+ "autoincrement": false
2238
+ },
2239
+ "agent_id": {
2240
+ "name": "agent_id",
2241
+ "type": "text",
2242
+ "primaryKey": false,
2243
+ "notNull": false,
2244
+ "autoincrement": false
2245
+ },
2246
+ "pipeline_id": {
2247
+ "name": "pipeline_id",
2248
+ "type": "text",
2249
+ "primaryKey": false,
2250
+ "notNull": false,
2251
+ "autoincrement": false
2252
+ },
2253
+ "flow_id": {
2254
+ "name": "flow_id",
2255
+ "type": "text",
2256
+ "primaryKey": false,
2257
+ "notNull": false,
2258
+ "autoincrement": false
2259
+ },
2260
+ "node_id": {
2261
+ "name": "node_id",
2262
+ "type": "text",
2263
+ "primaryKey": false,
2264
+ "notNull": false,
2265
+ "autoincrement": false
2266
+ },
2267
+ "item_key": {
2268
+ "name": "item_key",
2269
+ "type": "text",
2270
+ "primaryKey": false,
2271
+ "notNull": false,
2272
+ "autoincrement": false
2273
+ },
2274
+ "first_seen_at": {
2275
+ "name": "first_seen_at",
2276
+ "type": "integer",
2277
+ "primaryKey": false,
2278
+ "notNull": true,
2279
+ "autoincrement": false
2280
+ },
2281
+ "source": {
2282
+ "name": "source",
2283
+ "type": "text",
2284
+ "primaryKey": false,
2285
+ "notNull": true,
2286
+ "autoincrement": false
2287
+ },
2288
+ "run_id": {
2289
+ "name": "run_id",
2290
+ "type": "text",
2291
+ "primaryKey": false,
2292
+ "notNull": false,
2293
+ "autoincrement": false
2294
+ }
2295
+ },
2296
+ "indexes": {
2297
+ "idx_lineage_root": {
2298
+ "name": "idx_lineage_root",
2299
+ "columns": [
2300
+ "root_session_key"
2301
+ ],
2302
+ "isUnique": false
2303
+ },
2304
+ "idx_lineage_parent": {
2305
+ "name": "idx_lineage_parent",
2306
+ "columns": [
2307
+ "parent_session_key"
2308
+ ],
2309
+ "isUnique": false
2310
+ },
2311
+ "idx_lineage_pipeline": {
2312
+ "name": "idx_lineage_pipeline",
2313
+ "columns": [
2314
+ "pipeline_id"
2315
+ ],
2316
+ "isUnique": false
2317
+ },
2318
+ "idx_lineage_flow": {
2319
+ "name": "idx_lineage_flow",
2320
+ "columns": [
2321
+ "flow_id"
2322
+ ],
2323
+ "isUnique": false
2324
+ },
2325
+ "idx_lineage_root_kind": {
2326
+ "name": "idx_lineage_root_kind",
2327
+ "columns": [
2328
+ "root_kind"
2329
+ ],
2330
+ "isUnique": false
2331
+ },
2332
+ "idx_lineage_run": {
2333
+ "name": "idx_lineage_run",
2334
+ "columns": [
2335
+ "run_id"
2336
+ ],
2337
+ "isUnique": false
2338
+ }
2339
+ },
2340
+ "foreignKeys": {
2341
+ "session_lineage_child_session_key_sessions_session_key_fk": {
2342
+ "name": "session_lineage_child_session_key_sessions_session_key_fk",
2343
+ "tableFrom": "session_lineage",
2344
+ "tableTo": "sessions",
2345
+ "columnsFrom": [
2346
+ "child_session_key"
2347
+ ],
2348
+ "columnsTo": [
2349
+ "session_key"
2350
+ ],
2351
+ "onDelete": "no action",
2352
+ "onUpdate": "no action"
2353
+ },
2354
+ "session_lineage_parent_session_key_sessions_session_key_fk": {
2355
+ "name": "session_lineage_parent_session_key_sessions_session_key_fk",
2356
+ "tableFrom": "session_lineage",
2357
+ "tableTo": "sessions",
2358
+ "columnsFrom": [
2359
+ "parent_session_key"
2360
+ ],
2361
+ "columnsTo": [
2362
+ "session_key"
2363
+ ],
2364
+ "onDelete": "set null",
2365
+ "onUpdate": "no action"
2366
+ },
2367
+ "session_lineage_root_session_key_sessions_session_key_fk": {
2368
+ "name": "session_lineage_root_session_key_sessions_session_key_fk",
2369
+ "tableFrom": "session_lineage",
2370
+ "tableTo": "sessions",
2371
+ "columnsFrom": [
2372
+ "root_session_key"
2373
+ ],
2374
+ "columnsTo": [
2375
+ "session_key"
2376
+ ],
2377
+ "onDelete": "no action",
2378
+ "onUpdate": "no action"
2379
+ },
2380
+ "session_lineage_pipeline_id_pipelines_id_fk": {
2381
+ "name": "session_lineage_pipeline_id_pipelines_id_fk",
2382
+ "tableFrom": "session_lineage",
2383
+ "tableTo": "pipelines",
2384
+ "columnsFrom": [
2385
+ "pipeline_id"
2386
+ ],
2387
+ "columnsTo": [
2388
+ "id"
2389
+ ],
2390
+ "onDelete": "set null",
2391
+ "onUpdate": "no action"
2392
+ },
2393
+ "session_lineage_flow_id_flow_runs_flow_id_fk": {
2394
+ "name": "session_lineage_flow_id_flow_runs_flow_id_fk",
2395
+ "tableFrom": "session_lineage",
2396
+ "tableTo": "flow_runs",
2397
+ "columnsFrom": [
2398
+ "flow_id"
2399
+ ],
2400
+ "columnsTo": [
2401
+ "flow_id"
2402
+ ],
2403
+ "onDelete": "set null",
2404
+ "onUpdate": "no action"
2405
+ }
2406
+ },
2407
+ "compositePrimaryKeys": {},
2408
+ "uniqueConstraints": {},
2409
+ "checkConstraints": {}
2410
+ },
2411
+ "sessions": {
2412
+ "name": "sessions",
2413
+ "columns": {
2414
+ "session_key": {
2415
+ "name": "session_key",
2416
+ "type": "text",
2417
+ "primaryKey": true,
2418
+ "notNull": true,
2419
+ "autoincrement": false
2420
+ },
2421
+ "first_seen_at": {
2422
+ "name": "first_seen_at",
2423
+ "type": "integer",
2424
+ "primaryKey": false,
2425
+ "notNull": true,
2426
+ "autoincrement": false
2427
+ }
2428
+ },
2429
+ "indexes": {
2430
+ "idx_sessions_first_seen": {
2431
+ "name": "idx_sessions_first_seen",
2432
+ "columns": [
2433
+ "first_seen_at"
2434
+ ],
2435
+ "isUnique": false
2436
+ }
2437
+ },
2438
+ "foreignKeys": {},
2439
+ "compositePrimaryKeys": {},
2440
+ "uniqueConstraints": {},
2441
+ "checkConstraints": {}
2442
+ },
2443
+ "tool_results": {
2444
+ "name": "tool_results",
2445
+ "columns": {
2446
+ "session_key": {
2447
+ "name": "session_key",
2448
+ "type": "text",
2449
+ "primaryKey": true,
2450
+ "notNull": true,
2451
+ "autoincrement": false
2452
+ },
2453
+ "run_id": {
2454
+ "name": "run_id",
2455
+ "type": "text",
2456
+ "primaryKey": false,
2457
+ "notNull": false,
2458
+ "autoincrement": false
2459
+ },
2460
+ "agent_id": {
2461
+ "name": "agent_id",
2462
+ "type": "text",
2463
+ "primaryKey": false,
2464
+ "notNull": false,
2465
+ "autoincrement": false
2466
+ },
2467
+ "kind": {
2468
+ "name": "kind",
2469
+ "type": "text",
2470
+ "primaryKey": false,
2471
+ "notNull": false,
2472
+ "autoincrement": false
2473
+ },
2474
+ "payload_json": {
2475
+ "name": "payload_json",
2476
+ "type": "text",
2477
+ "primaryKey": false,
2478
+ "notNull": true,
2479
+ "autoincrement": false
2480
+ },
2481
+ "updated_at": {
2482
+ "name": "updated_at",
2483
+ "type": "integer",
2484
+ "primaryKey": false,
2485
+ "notNull": true,
2486
+ "autoincrement": false
2487
+ }
2488
+ },
2489
+ "indexes": {},
2490
+ "foreignKeys": {
2491
+ "tool_results_session_key_sessions_session_key_fk": {
2492
+ "name": "tool_results_session_key_sessions_session_key_fk",
2493
+ "tableFrom": "tool_results",
2494
+ "tableTo": "sessions",
2495
+ "columnsFrom": [
2496
+ "session_key"
2497
+ ],
2498
+ "columnsTo": [
2499
+ "session_key"
2500
+ ],
2501
+ "onDelete": "no action",
2502
+ "onUpdate": "no action"
2503
+ },
2504
+ "tool_results_run_id_flow_runs_flow_id_fk": {
2505
+ "name": "tool_results_run_id_flow_runs_flow_id_fk",
2506
+ "tableFrom": "tool_results",
2507
+ "tableTo": "flow_runs",
2508
+ "columnsFrom": [
2509
+ "run_id"
2510
+ ],
2511
+ "columnsTo": [
2512
+ "flow_id"
2513
+ ],
2514
+ "onDelete": "set null",
2515
+ "onUpdate": "no action"
2516
+ }
2517
+ },
2518
+ "compositePrimaryKeys": {},
2519
+ "uniqueConstraints": {},
2520
+ "checkConstraints": {}
2521
+ }
2522
+ },
2523
+ "views": {},
2524
+ "enums": {},
2525
+ "_meta": {
2526
+ "schemas": {},
2527
+ "tables": {},
2528
+ "columns": {}
2529
+ },
2530
+ "internal": {
2531
+ "indexes": {
2532
+ "idx_failures_failed_at": {
2533
+ "columns": {
2534
+ "\"failed_at\" desc": {
2535
+ "isExpression": true
2536
+ }
2537
+ }
2538
+ },
2539
+ "idx_pfr_updated": {
2540
+ "columns": {
2541
+ "\"updated_at\" desc": {
2542
+ "isExpression": true
2543
+ }
2544
+ }
2545
+ },
2546
+ "idx_pfr_created": {
2547
+ "columns": {
2548
+ "\"created_at\" desc": {
2549
+ "isExpression": true
2550
+ }
2551
+ }
2552
+ },
2553
+ "idx_created_at": {
2554
+ "columns": {
2555
+ "\"created_at\" desc": {
2556
+ "isExpression": true
2557
+ }
2558
+ }
2559
+ }
2560
+ }
2561
+ }
2562
+ }