@makaio/storage-pg 1.0.0-dev-1782138936821 → 1.0.0-dev-1783439621927

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.
@@ -0,0 +1,3603 @@
1
+ {
2
+ "id": "0ea2fe64-dd6d-4209-96da-1b45c5d658bb",
3
+ "prevId": "1091d7f4-8252-4c71-817c-c6d9b69439c5",
4
+ "version": "7",
5
+ "dialect": "postgresql",
6
+ "tables": {
7
+ "public.preferences": {
8
+ "name": "preferences",
9
+ "schema": "",
10
+ "columns": {
11
+ "scope": {
12
+ "name": "scope",
13
+ "type": "text",
14
+ "primaryKey": false,
15
+ "notNull": true
16
+ },
17
+ "surface": {
18
+ "name": "surface",
19
+ "type": "text",
20
+ "primaryKey": false,
21
+ "notNull": true,
22
+ "default": "'any'"
23
+ },
24
+ "context": {
25
+ "name": "context",
26
+ "type": "text",
27
+ "primaryKey": false,
28
+ "notNull": true,
29
+ "default": "'any'"
30
+ },
31
+ "viewport": {
32
+ "name": "viewport",
33
+ "type": "text",
34
+ "primaryKey": false,
35
+ "notNull": true,
36
+ "default": "'any'"
37
+ },
38
+ "category": {
39
+ "name": "category",
40
+ "type": "text",
41
+ "primaryKey": false,
42
+ "notNull": true
43
+ },
44
+ "value": {
45
+ "name": "value",
46
+ "type": "text",
47
+ "primaryKey": false,
48
+ "notNull": true
49
+ },
50
+ "updated_at": {
51
+ "name": "updated_at",
52
+ "type": "bigint",
53
+ "primaryKey": false,
54
+ "notNull": true
55
+ }
56
+ },
57
+ "indexes": {
58
+ "preferences_pk": {
59
+ "name": "preferences_pk",
60
+ "columns": [
61
+ {
62
+ "expression": "scope",
63
+ "isExpression": false,
64
+ "asc": true,
65
+ "nulls": "last"
66
+ },
67
+ {
68
+ "expression": "surface",
69
+ "isExpression": false,
70
+ "asc": true,
71
+ "nulls": "last"
72
+ },
73
+ {
74
+ "expression": "context",
75
+ "isExpression": false,
76
+ "asc": true,
77
+ "nulls": "last"
78
+ },
79
+ {
80
+ "expression": "viewport",
81
+ "isExpression": false,
82
+ "asc": true,
83
+ "nulls": "last"
84
+ },
85
+ {
86
+ "expression": "category",
87
+ "isExpression": false,
88
+ "asc": true,
89
+ "nulls": "last"
90
+ }
91
+ ],
92
+ "isUnique": true,
93
+ "concurrently": false,
94
+ "method": "btree",
95
+ "with": {}
96
+ }
97
+ },
98
+ "foreignKeys": {},
99
+ "compositePrimaryKeys": {},
100
+ "uniqueConstraints": {},
101
+ "policies": {},
102
+ "checkConstraints": {},
103
+ "isRLSEnabled": false
104
+ },
105
+ "public.harness_definitions": {
106
+ "name": "harness_definitions",
107
+ "schema": "",
108
+ "columns": {
109
+ "id": {
110
+ "name": "id",
111
+ "type": "text",
112
+ "primaryKey": true,
113
+ "notNull": true
114
+ },
115
+ "name": {
116
+ "name": "name",
117
+ "type": "text",
118
+ "primaryKey": false,
119
+ "notNull": true
120
+ },
121
+ "description": {
122
+ "name": "description",
123
+ "type": "text",
124
+ "primaryKey": false,
125
+ "notNull": false
126
+ },
127
+ "adapter_name": {
128
+ "name": "adapter_name",
129
+ "type": "text",
130
+ "primaryKey": false,
131
+ "notNull": false
132
+ },
133
+ "client_id": {
134
+ "name": "client_id",
135
+ "type": "text",
136
+ "primaryKey": false,
137
+ "notNull": false
138
+ },
139
+ "env": {
140
+ "name": "env",
141
+ "type": "jsonb",
142
+ "primaryKey": false,
143
+ "notNull": false
144
+ },
145
+ "credentials": {
146
+ "name": "credentials",
147
+ "type": "jsonb",
148
+ "primaryKey": false,
149
+ "notNull": false
150
+ },
151
+ "cwd": {
152
+ "name": "cwd",
153
+ "type": "text",
154
+ "primaryKey": false,
155
+ "notNull": false
156
+ },
157
+ "approval_policy": {
158
+ "name": "approval_policy",
159
+ "type": "text",
160
+ "primaryKey": false,
161
+ "notNull": true,
162
+ "default": "'always-ask'"
163
+ },
164
+ "native_tools_enabled": {
165
+ "name": "native_tools_enabled",
166
+ "type": "jsonb",
167
+ "primaryKey": false,
168
+ "notNull": true
169
+ },
170
+ "native_tools_disabled": {
171
+ "name": "native_tools_disabled",
172
+ "type": "jsonb",
173
+ "primaryKey": false,
174
+ "notNull": true
175
+ },
176
+ "registry_tools_enabled": {
177
+ "name": "registry_tools_enabled",
178
+ "type": "jsonb",
179
+ "primaryKey": false,
180
+ "notNull": true
181
+ },
182
+ "registry_tools_disabled": {
183
+ "name": "registry_tools_disabled",
184
+ "type": "jsonb",
185
+ "primaryKey": false,
186
+ "notNull": true
187
+ },
188
+ "skills_enabled": {
189
+ "name": "skills_enabled",
190
+ "type": "jsonb",
191
+ "primaryKey": false,
192
+ "notNull": false
193
+ },
194
+ "skills_disabled": {
195
+ "name": "skills_disabled",
196
+ "type": "jsonb",
197
+ "primaryKey": false,
198
+ "notNull": false
199
+ },
200
+ "tool_capability_map": {
201
+ "name": "tool_capability_map",
202
+ "type": "jsonb",
203
+ "primaryKey": false,
204
+ "notNull": false
205
+ },
206
+ "capability_overrides": {
207
+ "name": "capability_overrides",
208
+ "type": "jsonb",
209
+ "primaryKey": false,
210
+ "notNull": false
211
+ },
212
+ "tool_approval_overrides": {
213
+ "name": "tool_approval_overrides",
214
+ "type": "jsonb",
215
+ "primaryKey": false,
216
+ "notNull": false
217
+ },
218
+ "is_default": {
219
+ "name": "is_default",
220
+ "type": "boolean",
221
+ "primaryKey": false,
222
+ "notNull": true,
223
+ "default": false
224
+ },
225
+ "enabled": {
226
+ "name": "enabled",
227
+ "type": "boolean",
228
+ "primaryKey": false,
229
+ "notNull": true,
230
+ "default": true
231
+ },
232
+ "created_at": {
233
+ "name": "created_at",
234
+ "type": "bigint",
235
+ "primaryKey": false,
236
+ "notNull": true
237
+ },
238
+ "updated_at": {
239
+ "name": "updated_at",
240
+ "type": "bigint",
241
+ "primaryKey": false,
242
+ "notNull": true
243
+ }
244
+ },
245
+ "indexes": {},
246
+ "foreignKeys": {},
247
+ "compositePrimaryKeys": {},
248
+ "uniqueConstraints": {},
249
+ "policies": {},
250
+ "checkConstraints": {},
251
+ "isRLSEnabled": false
252
+ },
253
+ "public.import_cursors": {
254
+ "name": "import_cursors",
255
+ "schema": "",
256
+ "columns": {
257
+ "file_path": {
258
+ "name": "file_path",
259
+ "type": "text",
260
+ "primaryKey": true,
261
+ "notNull": true
262
+ },
263
+ "bytes_read": {
264
+ "name": "bytes_read",
265
+ "type": "bigint",
266
+ "primaryKey": false,
267
+ "notNull": true
268
+ },
269
+ "last_modified": {
270
+ "name": "last_modified",
271
+ "type": "text",
272
+ "primaryKey": false,
273
+ "notNull": true
274
+ },
275
+ "updated_at": {
276
+ "name": "updated_at",
277
+ "type": "bigint",
278
+ "primaryKey": false,
279
+ "notNull": true
280
+ }
281
+ },
282
+ "indexes": {},
283
+ "foreignKeys": {},
284
+ "compositePrimaryKeys": {},
285
+ "uniqueConstraints": {},
286
+ "policies": {},
287
+ "checkConstraints": {},
288
+ "isRLSEnabled": false
289
+ },
290
+ "public.message_routing": {
291
+ "name": "message_routing",
292
+ "schema": "",
293
+ "columns": {
294
+ "message_id": {
295
+ "name": "message_id",
296
+ "type": "text",
297
+ "primaryKey": false,
298
+ "notNull": true
299
+ },
300
+ "agent_id": {
301
+ "name": "agent_id",
302
+ "type": "text",
303
+ "primaryKey": false,
304
+ "notNull": true
305
+ },
306
+ "status": {
307
+ "name": "status",
308
+ "type": "text",
309
+ "primaryKey": false,
310
+ "notNull": true
311
+ },
312
+ "timestamp": {
313
+ "name": "timestamp",
314
+ "type": "bigint",
315
+ "primaryKey": false,
316
+ "notNull": true
317
+ },
318
+ "error": {
319
+ "name": "error",
320
+ "type": "text",
321
+ "primaryKey": false,
322
+ "notNull": false
323
+ }
324
+ },
325
+ "indexes": {
326
+ "idx_routing_agent": {
327
+ "name": "idx_routing_agent",
328
+ "columns": [
329
+ {
330
+ "expression": "agent_id",
331
+ "isExpression": false,
332
+ "asc": true,
333
+ "nulls": "last"
334
+ },
335
+ {
336
+ "expression": "timestamp",
337
+ "isExpression": false,
338
+ "asc": true,
339
+ "nulls": "last"
340
+ }
341
+ ],
342
+ "isUnique": false,
343
+ "concurrently": false,
344
+ "method": "btree",
345
+ "with": {}
346
+ }
347
+ },
348
+ "foreignKeys": {
349
+ "message_routing_message_id_messages_message_id_fk": {
350
+ "name": "message_routing_message_id_messages_message_id_fk",
351
+ "tableFrom": "message_routing",
352
+ "tableTo": "messages",
353
+ "columnsFrom": ["message_id"],
354
+ "columnsTo": ["message_id"],
355
+ "onDelete": "cascade",
356
+ "onUpdate": "no action"
357
+ }
358
+ },
359
+ "compositePrimaryKeys": {
360
+ "message_routing_message_id_agent_id_status_pk": {
361
+ "name": "message_routing_message_id_agent_id_status_pk",
362
+ "columns": ["message_id", "agent_id", "status"]
363
+ }
364
+ },
365
+ "uniqueConstraints": {},
366
+ "policies": {},
367
+ "checkConstraints": {},
368
+ "isRLSEnabled": false
369
+ },
370
+ "public.messages": {
371
+ "name": "messages",
372
+ "schema": "",
373
+ "columns": {
374
+ "message_id": {
375
+ "name": "message_id",
376
+ "type": "text",
377
+ "primaryKey": true,
378
+ "notNull": true
379
+ },
380
+ "turn_id": {
381
+ "name": "turn_id",
382
+ "type": "text",
383
+ "primaryKey": false,
384
+ "notNull": false
385
+ },
386
+ "session_id": {
387
+ "name": "session_id",
388
+ "type": "text",
389
+ "primaryKey": false,
390
+ "notNull": true
391
+ },
392
+ "role": {
393
+ "name": "role",
394
+ "type": "text",
395
+ "primaryKey": false,
396
+ "notNull": true
397
+ },
398
+ "content_text": {
399
+ "name": "content_text",
400
+ "type": "text",
401
+ "primaryKey": false,
402
+ "notNull": true
403
+ },
404
+ "blocks": {
405
+ "name": "blocks",
406
+ "type": "text",
407
+ "primaryKey": false,
408
+ "notNull": true,
409
+ "default": "'[]'"
410
+ },
411
+ "agent_id": {
412
+ "name": "agent_id",
413
+ "type": "text",
414
+ "primaryKey": false,
415
+ "notNull": false
416
+ },
417
+ "adapter_session_id": {
418
+ "name": "adapter_session_id",
419
+ "type": "text",
420
+ "primaryKey": false,
421
+ "notNull": false
422
+ },
423
+ "adapter_message_id": {
424
+ "name": "adapter_message_id",
425
+ "type": "text",
426
+ "primaryKey": false,
427
+ "notNull": false
428
+ },
429
+ "timestamp": {
430
+ "name": "timestamp",
431
+ "type": "bigint",
432
+ "primaryKey": false,
433
+ "notNull": true
434
+ },
435
+ "edit_of": {
436
+ "name": "edit_of",
437
+ "type": "text",
438
+ "primaryKey": false,
439
+ "notNull": false
440
+ },
441
+ "origin": {
442
+ "name": "origin",
443
+ "type": "text",
444
+ "primaryKey": false,
445
+ "notNull": false
446
+ },
447
+ "content_tsv": {
448
+ "name": "content_tsv",
449
+ "type": "tsvector",
450
+ "primaryKey": false,
451
+ "notNull": false,
452
+ "generated": {
453
+ "as": "to_tsvector('english', coalesce(content_text, ''))",
454
+ "type": "stored"
455
+ }
456
+ }
457
+ },
458
+ "indexes": {
459
+ "idx_messages_session": {
460
+ "name": "idx_messages_session",
461
+ "columns": [
462
+ {
463
+ "expression": "session_id",
464
+ "isExpression": false,
465
+ "asc": true,
466
+ "nulls": "last"
467
+ },
468
+ {
469
+ "expression": "timestamp",
470
+ "isExpression": false,
471
+ "asc": true,
472
+ "nulls": "last"
473
+ }
474
+ ],
475
+ "isUnique": false,
476
+ "concurrently": false,
477
+ "method": "btree",
478
+ "with": {}
479
+ },
480
+ "idx_messages_turn": {
481
+ "name": "idx_messages_turn",
482
+ "columns": [
483
+ {
484
+ "expression": "turn_id",
485
+ "isExpression": false,
486
+ "asc": true,
487
+ "nulls": "last"
488
+ },
489
+ {
490
+ "expression": "timestamp",
491
+ "isExpression": false,
492
+ "asc": true,
493
+ "nulls": "last"
494
+ }
495
+ ],
496
+ "isUnique": false,
497
+ "concurrently": false,
498
+ "method": "btree",
499
+ "with": {}
500
+ },
501
+ "idx_messages_agent": {
502
+ "name": "idx_messages_agent",
503
+ "columns": [
504
+ {
505
+ "expression": "agent_id",
506
+ "isExpression": false,
507
+ "asc": true,
508
+ "nulls": "last"
509
+ },
510
+ {
511
+ "expression": "timestamp",
512
+ "isExpression": false,
513
+ "asc": true,
514
+ "nulls": "last"
515
+ }
516
+ ],
517
+ "isUnique": false,
518
+ "concurrently": false,
519
+ "method": "btree",
520
+ "with": {}
521
+ },
522
+ "uniq_messages_adapter_message_id_session": {
523
+ "name": "uniq_messages_adapter_message_id_session",
524
+ "columns": [
525
+ {
526
+ "expression": "adapter_message_id",
527
+ "isExpression": false,
528
+ "asc": true,
529
+ "nulls": "last"
530
+ },
531
+ {
532
+ "expression": "session_id",
533
+ "isExpression": false,
534
+ "asc": true,
535
+ "nulls": "last"
536
+ }
537
+ ],
538
+ "isUnique": true,
539
+ "concurrently": false,
540
+ "method": "btree",
541
+ "with": {}
542
+ },
543
+ "idx_messages_content_tsv": {
544
+ "name": "idx_messages_content_tsv",
545
+ "columns": [
546
+ {
547
+ "expression": "content_tsv",
548
+ "isExpression": false,
549
+ "asc": true,
550
+ "nulls": "last"
551
+ }
552
+ ],
553
+ "isUnique": false,
554
+ "concurrently": false,
555
+ "method": "gin",
556
+ "with": {}
557
+ }
558
+ },
559
+ "foreignKeys": {
560
+ "messages_turn_id_turns_turn_id_fk": {
561
+ "name": "messages_turn_id_turns_turn_id_fk",
562
+ "tableFrom": "messages",
563
+ "tableTo": "turns",
564
+ "columnsFrom": ["turn_id"],
565
+ "columnsTo": ["turn_id"],
566
+ "onDelete": "cascade",
567
+ "onUpdate": "no action"
568
+ },
569
+ "messages_session_id_sessions_session_id_fk": {
570
+ "name": "messages_session_id_sessions_session_id_fk",
571
+ "tableFrom": "messages",
572
+ "tableTo": "sessions",
573
+ "columnsFrom": ["session_id"],
574
+ "columnsTo": ["session_id"],
575
+ "onDelete": "cascade",
576
+ "onUpdate": "no action"
577
+ },
578
+ "messages_edit_of_messages_message_id_fk": {
579
+ "name": "messages_edit_of_messages_message_id_fk",
580
+ "tableFrom": "messages",
581
+ "tableTo": "messages",
582
+ "columnsFrom": ["edit_of"],
583
+ "columnsTo": ["message_id"],
584
+ "onDelete": "no action",
585
+ "onUpdate": "no action"
586
+ }
587
+ },
588
+ "compositePrimaryKeys": {},
589
+ "uniqueConstraints": {},
590
+ "policies": {},
591
+ "checkConstraints": {},
592
+ "isRLSEnabled": false
593
+ },
594
+ "public.session_events": {
595
+ "name": "session_events",
596
+ "schema": "",
597
+ "columns": {
598
+ "id": {
599
+ "name": "id",
600
+ "type": "bigint",
601
+ "primaryKey": true,
602
+ "notNull": true,
603
+ "identity": {
604
+ "type": "always",
605
+ "name": "session_events_id_seq",
606
+ "schema": "public",
607
+ "increment": "1",
608
+ "startWith": "1",
609
+ "minValue": "1",
610
+ "maxValue": "9223372036854775807",
611
+ "cache": "1",
612
+ "cycle": false
613
+ }
614
+ },
615
+ "session_id": {
616
+ "name": "session_id",
617
+ "type": "text",
618
+ "primaryKey": false,
619
+ "notNull": true
620
+ },
621
+ "event_id": {
622
+ "name": "event_id",
623
+ "type": "text",
624
+ "primaryKey": false,
625
+ "notNull": true
626
+ },
627
+ "timestamp": {
628
+ "name": "timestamp",
629
+ "type": "bigint",
630
+ "primaryKey": false,
631
+ "notNull": true
632
+ },
633
+ "type": {
634
+ "name": "type",
635
+ "type": "text",
636
+ "primaryKey": false,
637
+ "notNull": true
638
+ },
639
+ "agent_id": {
640
+ "name": "agent_id",
641
+ "type": "text",
642
+ "primaryKey": false,
643
+ "notNull": false
644
+ },
645
+ "adapter_id": {
646
+ "name": "adapter_id",
647
+ "type": "text",
648
+ "primaryKey": false,
649
+ "notNull": false
650
+ },
651
+ "originating_message_id": {
652
+ "name": "originating_message_id",
653
+ "type": "text",
654
+ "primaryKey": false,
655
+ "notNull": false
656
+ },
657
+ "message_id": {
658
+ "name": "message_id",
659
+ "type": "text",
660
+ "primaryKey": false,
661
+ "notNull": false
662
+ },
663
+ "turn_id": {
664
+ "name": "turn_id",
665
+ "type": "text",
666
+ "primaryKey": false,
667
+ "notNull": false
668
+ },
669
+ "content_text": {
670
+ "name": "content_text",
671
+ "type": "text",
672
+ "primaryKey": false,
673
+ "notNull": false
674
+ },
675
+ "payload": {
676
+ "name": "payload",
677
+ "type": "text",
678
+ "primaryKey": false,
679
+ "notNull": true
680
+ }
681
+ },
682
+ "indexes": {
683
+ "idx_events_session_ts": {
684
+ "name": "idx_events_session_ts",
685
+ "columns": [
686
+ {
687
+ "expression": "session_id",
688
+ "isExpression": false,
689
+ "asc": true,
690
+ "nulls": "last"
691
+ },
692
+ {
693
+ "expression": "timestamp",
694
+ "isExpression": false,
695
+ "asc": true,
696
+ "nulls": "last"
697
+ }
698
+ ],
699
+ "isUnique": false,
700
+ "concurrently": false,
701
+ "method": "btree",
702
+ "with": {}
703
+ },
704
+ "idx_events_session_type": {
705
+ "name": "idx_events_session_type",
706
+ "columns": [
707
+ {
708
+ "expression": "session_id",
709
+ "isExpression": false,
710
+ "asc": true,
711
+ "nulls": "last"
712
+ },
713
+ {
714
+ "expression": "type",
715
+ "isExpression": false,
716
+ "asc": true,
717
+ "nulls": "last"
718
+ }
719
+ ],
720
+ "isUnique": false,
721
+ "concurrently": false,
722
+ "method": "btree",
723
+ "with": {}
724
+ },
725
+ "idx_events_turn": {
726
+ "name": "idx_events_turn",
727
+ "columns": [
728
+ {
729
+ "expression": "turn_id",
730
+ "isExpression": false,
731
+ "asc": true,
732
+ "nulls": "last"
733
+ }
734
+ ],
735
+ "isUnique": false,
736
+ "concurrently": false,
737
+ "method": "btree",
738
+ "with": {}
739
+ },
740
+ "idx_events_originating_message": {
741
+ "name": "idx_events_originating_message",
742
+ "columns": [
743
+ {
744
+ "expression": "originating_message_id",
745
+ "isExpression": false,
746
+ "asc": true,
747
+ "nulls": "last"
748
+ }
749
+ ],
750
+ "isUnique": false,
751
+ "concurrently": false,
752
+ "method": "btree",
753
+ "with": {}
754
+ }
755
+ },
756
+ "foreignKeys": {
757
+ "session_events_session_id_sessions_session_id_fk": {
758
+ "name": "session_events_session_id_sessions_session_id_fk",
759
+ "tableFrom": "session_events",
760
+ "tableTo": "sessions",
761
+ "columnsFrom": ["session_id"],
762
+ "columnsTo": ["session_id"],
763
+ "onDelete": "cascade",
764
+ "onUpdate": "no action"
765
+ },
766
+ "session_events_message_id_messages_message_id_fk": {
767
+ "name": "session_events_message_id_messages_message_id_fk",
768
+ "tableFrom": "session_events",
769
+ "tableTo": "messages",
770
+ "columnsFrom": ["message_id"],
771
+ "columnsTo": ["message_id"],
772
+ "onDelete": "cascade",
773
+ "onUpdate": "no action"
774
+ }
775
+ },
776
+ "compositePrimaryKeys": {},
777
+ "uniqueConstraints": {
778
+ "session_events_event_id_unique": {
779
+ "name": "session_events_event_id_unique",
780
+ "nullsNotDistinct": false,
781
+ "columns": ["event_id"]
782
+ }
783
+ },
784
+ "policies": {},
785
+ "checkConstraints": {},
786
+ "isRLSEnabled": false
787
+ },
788
+ "public.agents": {
789
+ "name": "agents",
790
+ "schema": "",
791
+ "columns": {
792
+ "agent_id": {
793
+ "name": "agent_id",
794
+ "type": "text",
795
+ "primaryKey": true,
796
+ "notNull": true
797
+ },
798
+ "adapter_id": {
799
+ "name": "adapter_id",
800
+ "type": "text",
801
+ "primaryKey": false,
802
+ "notNull": true
803
+ },
804
+ "adapter_name": {
805
+ "name": "adapter_name",
806
+ "type": "text",
807
+ "primaryKey": false,
808
+ "notNull": true
809
+ },
810
+ "session_id": {
811
+ "name": "session_id",
812
+ "type": "text",
813
+ "primaryKey": false,
814
+ "notNull": true
815
+ },
816
+ "adapter_session_id": {
817
+ "name": "adapter_session_id",
818
+ "type": "text",
819
+ "primaryKey": false,
820
+ "notNull": false
821
+ },
822
+ "model": {
823
+ "name": "model",
824
+ "type": "text",
825
+ "primaryKey": false,
826
+ "notNull": false
827
+ },
828
+ "cwd": {
829
+ "name": "cwd",
830
+ "type": "text",
831
+ "primaryKey": false,
832
+ "notNull": false
833
+ },
834
+ "allowed_directories": {
835
+ "name": "allowed_directories",
836
+ "type": "jsonb",
837
+ "primaryKey": false,
838
+ "notNull": false
839
+ },
840
+ "provider_config_id": {
841
+ "name": "provider_config_id",
842
+ "type": "text",
843
+ "primaryKey": false,
844
+ "notNull": false
845
+ },
846
+ "persona_id": {
847
+ "name": "persona_id",
848
+ "type": "text",
849
+ "primaryKey": false,
850
+ "notNull": false
851
+ },
852
+ "profile_id": {
853
+ "name": "profile_id",
854
+ "type": "text",
855
+ "primaryKey": false,
856
+ "notNull": false
857
+ },
858
+ "harness_id": {
859
+ "name": "harness_id",
860
+ "type": "text",
861
+ "primaryKey": false,
862
+ "notNull": false
863
+ },
864
+ "client_id": {
865
+ "name": "client_id",
866
+ "type": "text",
867
+ "primaryKey": false,
868
+ "notNull": false
869
+ },
870
+ "compression_mode": {
871
+ "name": "compression_mode",
872
+ "type": "text",
873
+ "primaryKey": false,
874
+ "notNull": false
875
+ },
876
+ "role": {
877
+ "name": "role",
878
+ "type": "text",
879
+ "primaryKey": false,
880
+ "notNull": true
881
+ },
882
+ "status": {
883
+ "name": "status",
884
+ "type": "text",
885
+ "primaryKey": false,
886
+ "notNull": true
887
+ },
888
+ "created_at": {
889
+ "name": "created_at",
890
+ "type": "bigint",
891
+ "primaryKey": false,
892
+ "notNull": true
893
+ },
894
+ "last_activity_at": {
895
+ "name": "last_activity_at",
896
+ "type": "bigint",
897
+ "primaryKey": false,
898
+ "notNull": true
899
+ }
900
+ },
901
+ "indexes": {
902
+ "agents_session_id_idx": {
903
+ "name": "agents_session_id_idx",
904
+ "columns": [
905
+ {
906
+ "expression": "session_id",
907
+ "isExpression": false,
908
+ "asc": true,
909
+ "nulls": "last"
910
+ }
911
+ ],
912
+ "isUnique": false,
913
+ "concurrently": false,
914
+ "method": "btree",
915
+ "with": {}
916
+ },
917
+ "agents_adapter_name_idx": {
918
+ "name": "agents_adapter_name_idx",
919
+ "columns": [
920
+ {
921
+ "expression": "adapter_name",
922
+ "isExpression": false,
923
+ "asc": true,
924
+ "nulls": "last"
925
+ }
926
+ ],
927
+ "isUnique": false,
928
+ "concurrently": false,
929
+ "method": "btree",
930
+ "with": {}
931
+ },
932
+ "agents_status_idx": {
933
+ "name": "agents_status_idx",
934
+ "columns": [
935
+ {
936
+ "expression": "status",
937
+ "isExpression": false,
938
+ "asc": true,
939
+ "nulls": "last"
940
+ }
941
+ ],
942
+ "isUnique": false,
943
+ "concurrently": false,
944
+ "method": "btree",
945
+ "with": {}
946
+ },
947
+ "agents_client_id_idx": {
948
+ "name": "agents_client_id_idx",
949
+ "columns": [
950
+ {
951
+ "expression": "client_id",
952
+ "isExpression": false,
953
+ "asc": true,
954
+ "nulls": "last"
955
+ }
956
+ ],
957
+ "isUnique": false,
958
+ "concurrently": false,
959
+ "method": "btree",
960
+ "with": {}
961
+ }
962
+ },
963
+ "foreignKeys": {
964
+ "agents_session_id_sessions_session_id_fk": {
965
+ "name": "agents_session_id_sessions_session_id_fk",
966
+ "tableFrom": "agents",
967
+ "tableTo": "sessions",
968
+ "columnsFrom": ["session_id"],
969
+ "columnsTo": ["session_id"],
970
+ "onDelete": "cascade",
971
+ "onUpdate": "no action"
972
+ }
973
+ },
974
+ "compositePrimaryKeys": {},
975
+ "uniqueConstraints": {},
976
+ "policies": {},
977
+ "checkConstraints": {},
978
+ "isRLSEnabled": false
979
+ },
980
+ "public.sessions": {
981
+ "name": "sessions",
982
+ "schema": "",
983
+ "columns": {
984
+ "session_id": {
985
+ "name": "session_id",
986
+ "type": "text",
987
+ "primaryKey": true,
988
+ "notNull": true
989
+ },
990
+ "created_at": {
991
+ "name": "created_at",
992
+ "type": "bigint",
993
+ "primaryKey": false,
994
+ "notNull": true
995
+ },
996
+ "last_activity_at": {
997
+ "name": "last_activity_at",
998
+ "type": "bigint",
999
+ "primaryKey": false,
1000
+ "notNull": true
1001
+ },
1002
+ "status": {
1003
+ "name": "status",
1004
+ "type": "text",
1005
+ "primaryKey": false,
1006
+ "notNull": true
1007
+ },
1008
+ "lead_agent_id": {
1009
+ "name": "lead_agent_id",
1010
+ "type": "text",
1011
+ "primaryKey": false,
1012
+ "notNull": false
1013
+ },
1014
+ "parent_session_id": {
1015
+ "name": "parent_session_id",
1016
+ "type": "text",
1017
+ "primaryKey": false,
1018
+ "notNull": false
1019
+ },
1020
+ "context_inheritance": {
1021
+ "name": "context_inheritance",
1022
+ "type": "text",
1023
+ "primaryKey": false,
1024
+ "notNull": false
1025
+ },
1026
+ "root_session_id": {
1027
+ "name": "root_session_id",
1028
+ "type": "text",
1029
+ "primaryKey": false,
1030
+ "notNull": false
1031
+ },
1032
+ "fork_point_message_id": {
1033
+ "name": "fork_point_message_id",
1034
+ "type": "text",
1035
+ "primaryKey": false,
1036
+ "notNull": false
1037
+ },
1038
+ "branch_kind": {
1039
+ "name": "branch_kind",
1040
+ "type": "text",
1041
+ "primaryKey": false,
1042
+ "notNull": false
1043
+ },
1044
+ "adapter_name": {
1045
+ "name": "adapter_name",
1046
+ "type": "text",
1047
+ "primaryKey": false,
1048
+ "notNull": false
1049
+ },
1050
+ "adapter_session_id": {
1051
+ "name": "adapter_session_id",
1052
+ "type": "text",
1053
+ "primaryKey": false,
1054
+ "notNull": false
1055
+ },
1056
+ "adapter_id": {
1057
+ "name": "adapter_id",
1058
+ "type": "text",
1059
+ "primaryKey": false,
1060
+ "notNull": false
1061
+ },
1062
+ "client_id": {
1063
+ "name": "client_id",
1064
+ "type": "text",
1065
+ "primaryKey": false,
1066
+ "notNull": false
1067
+ },
1068
+ "client_account_id": {
1069
+ "name": "client_account_id",
1070
+ "type": "text",
1071
+ "primaryKey": false,
1072
+ "notNull": false
1073
+ },
1074
+ "last_client_identity_observation": {
1075
+ "name": "last_client_identity_observation",
1076
+ "type": "text",
1077
+ "primaryKey": false,
1078
+ "notNull": false
1079
+ },
1080
+ "is_orchestrated": {
1081
+ "name": "is_orchestrated",
1082
+ "type": "boolean",
1083
+ "primaryKey": false,
1084
+ "notNull": false,
1085
+ "default": false
1086
+ },
1087
+ "title": {
1088
+ "name": "title",
1089
+ "type": "text",
1090
+ "primaryKey": false,
1091
+ "notNull": false
1092
+ },
1093
+ "summary": {
1094
+ "name": "summary",
1095
+ "type": "text",
1096
+ "primaryKey": false,
1097
+ "notNull": false
1098
+ },
1099
+ "summary_updated_at": {
1100
+ "name": "summary_updated_at",
1101
+ "type": "bigint",
1102
+ "primaryKey": false,
1103
+ "notNull": false
1104
+ },
1105
+ "is_imported": {
1106
+ "name": "is_imported",
1107
+ "type": "boolean",
1108
+ "primaryKey": false,
1109
+ "notNull": false,
1110
+ "default": false
1111
+ },
1112
+ "fork_transforms": {
1113
+ "name": "fork_transforms",
1114
+ "type": "text",
1115
+ "primaryKey": false,
1116
+ "notNull": false
1117
+ },
1118
+ "target_working_directory": {
1119
+ "name": "target_working_directory",
1120
+ "type": "text",
1121
+ "primaryKey": false,
1122
+ "notNull": false
1123
+ },
1124
+ "execution_target_id": {
1125
+ "name": "execution_target_id",
1126
+ "type": "text",
1127
+ "primaryKey": false,
1128
+ "notNull": false
1129
+ },
1130
+ "approval_policy_override": {
1131
+ "name": "approval_policy_override",
1132
+ "type": "text",
1133
+ "primaryKey": false,
1134
+ "notNull": false
1135
+ },
1136
+ "metadata": {
1137
+ "name": "metadata",
1138
+ "type": "jsonb",
1139
+ "primaryKey": false,
1140
+ "notNull": false
1141
+ },
1142
+ "spawning_tool_call_id": {
1143
+ "name": "spawning_tool_call_id",
1144
+ "type": "text",
1145
+ "primaryKey": false,
1146
+ "notNull": false
1147
+ },
1148
+ "source": {
1149
+ "name": "source",
1150
+ "type": "text",
1151
+ "primaryKey": false,
1152
+ "notNull": false
1153
+ },
1154
+ "parent_external_session_id": {
1155
+ "name": "parent_external_session_id",
1156
+ "type": "text",
1157
+ "primaryKey": false,
1158
+ "notNull": false
1159
+ },
1160
+ "log_file_path": {
1161
+ "name": "log_file_path",
1162
+ "type": "text",
1163
+ "primaryKey": false,
1164
+ "notNull": false
1165
+ },
1166
+ "discovered_at": {
1167
+ "name": "discovered_at",
1168
+ "type": "bigint",
1169
+ "primaryKey": false,
1170
+ "notNull": false
1171
+ },
1172
+ "import_status": {
1173
+ "name": "import_status",
1174
+ "type": "text",
1175
+ "primaryKey": false,
1176
+ "notNull": false
1177
+ },
1178
+ "is_sidechain": {
1179
+ "name": "is_sidechain",
1180
+ "type": "boolean",
1181
+ "primaryKey": false,
1182
+ "notNull": false
1183
+ },
1184
+ "machine_id": {
1185
+ "name": "machine_id",
1186
+ "type": "text",
1187
+ "primaryKey": false,
1188
+ "notNull": false
1189
+ }
1190
+ },
1191
+ "indexes": {
1192
+ "uniq_sessions_source_adapter_session_id": {
1193
+ "name": "uniq_sessions_source_adapter_session_id",
1194
+ "columns": [
1195
+ {
1196
+ "expression": "source",
1197
+ "isExpression": false,
1198
+ "asc": true,
1199
+ "nulls": "last"
1200
+ },
1201
+ {
1202
+ "expression": "adapter_session_id",
1203
+ "isExpression": false,
1204
+ "asc": true,
1205
+ "nulls": "last"
1206
+ }
1207
+ ],
1208
+ "isUnique": true,
1209
+ "concurrently": false,
1210
+ "method": "btree",
1211
+ "with": {}
1212
+ },
1213
+ "uniq_sessions_log_file_path": {
1214
+ "name": "uniq_sessions_log_file_path",
1215
+ "columns": [
1216
+ {
1217
+ "expression": "log_file_path",
1218
+ "isExpression": false,
1219
+ "asc": true,
1220
+ "nulls": "last"
1221
+ }
1222
+ ],
1223
+ "isUnique": true,
1224
+ "concurrently": false,
1225
+ "method": "btree",
1226
+ "with": {}
1227
+ },
1228
+ "sessions_adapter_session_id_idx": {
1229
+ "name": "sessions_adapter_session_id_idx",
1230
+ "columns": [
1231
+ {
1232
+ "expression": "adapter_session_id",
1233
+ "isExpression": false,
1234
+ "asc": true,
1235
+ "nulls": "last"
1236
+ }
1237
+ ],
1238
+ "isUnique": false,
1239
+ "concurrently": false,
1240
+ "method": "btree",
1241
+ "with": {}
1242
+ },
1243
+ "idx_sessions_import_status": {
1244
+ "name": "idx_sessions_import_status",
1245
+ "columns": [
1246
+ {
1247
+ "expression": "import_status",
1248
+ "isExpression": false,
1249
+ "asc": true,
1250
+ "nulls": "last"
1251
+ }
1252
+ ],
1253
+ "isUnique": false,
1254
+ "concurrently": false,
1255
+ "method": "btree",
1256
+ "with": {}
1257
+ },
1258
+ "sessions_execution_target_id_idx": {
1259
+ "name": "sessions_execution_target_id_idx",
1260
+ "columns": [
1261
+ {
1262
+ "expression": "execution_target_id",
1263
+ "isExpression": false,
1264
+ "asc": true,
1265
+ "nulls": "last"
1266
+ }
1267
+ ],
1268
+ "isUnique": false,
1269
+ "concurrently": false,
1270
+ "method": "btree",
1271
+ "with": {}
1272
+ },
1273
+ "idx_sessions_parent_session_id": {
1274
+ "name": "idx_sessions_parent_session_id",
1275
+ "columns": [
1276
+ {
1277
+ "expression": "parent_session_id",
1278
+ "isExpression": false,
1279
+ "asc": true,
1280
+ "nulls": "last"
1281
+ }
1282
+ ],
1283
+ "isUnique": false,
1284
+ "concurrently": false,
1285
+ "method": "btree",
1286
+ "with": {}
1287
+ }
1288
+ },
1289
+ "foreignKeys": {},
1290
+ "compositePrimaryKeys": {},
1291
+ "uniqueConstraints": {},
1292
+ "policies": {},
1293
+ "checkConstraints": {
1294
+ "sessions_import_status_check": {
1295
+ "name": "sessions_import_status_check",
1296
+ "value": "\"sessions\".\"import_status\" IS NULL OR \"sessions\".\"import_status\" IN ('discovered', 'imported', 'tracking')"
1297
+ },
1298
+ "sessions_context_inheritance_check": {
1299
+ "name": "sessions_context_inheritance_check",
1300
+ "value": "\"sessions\".\"context_inheritance\" IS NULL OR \"sessions\".\"context_inheritance\" IN ('parent-history', 'none')"
1301
+ }
1302
+ },
1303
+ "isRLSEnabled": false
1304
+ },
1305
+ "public.turns": {
1306
+ "name": "turns",
1307
+ "schema": "",
1308
+ "columns": {
1309
+ "turn_id": {
1310
+ "name": "turn_id",
1311
+ "type": "text",
1312
+ "primaryKey": true,
1313
+ "notNull": true
1314
+ },
1315
+ "session_id": {
1316
+ "name": "session_id",
1317
+ "type": "text",
1318
+ "primaryKey": false,
1319
+ "notNull": true
1320
+ },
1321
+ "turn_number": {
1322
+ "name": "turn_number",
1323
+ "type": "integer",
1324
+ "primaryKey": false,
1325
+ "notNull": true
1326
+ },
1327
+ "started_at": {
1328
+ "name": "started_at",
1329
+ "type": "bigint",
1330
+ "primaryKey": false,
1331
+ "notNull": true
1332
+ },
1333
+ "completed_at": {
1334
+ "name": "completed_at",
1335
+ "type": "bigint",
1336
+ "primaryKey": false,
1337
+ "notNull": false
1338
+ },
1339
+ "status": {
1340
+ "name": "status",
1341
+ "type": "text",
1342
+ "primaryKey": false,
1343
+ "notNull": true
1344
+ },
1345
+ "error": {
1346
+ "name": "error",
1347
+ "type": "text",
1348
+ "primaryKey": false,
1349
+ "notNull": false
1350
+ },
1351
+ "usage": {
1352
+ "name": "usage",
1353
+ "type": "text",
1354
+ "primaryKey": false,
1355
+ "notNull": false
1356
+ },
1357
+ "initiator": {
1358
+ "name": "initiator",
1359
+ "type": "text",
1360
+ "primaryKey": false,
1361
+ "notNull": false
1362
+ },
1363
+ "turn_anchor_id": {
1364
+ "name": "turn_anchor_id",
1365
+ "type": "text",
1366
+ "primaryKey": false,
1367
+ "notNull": false
1368
+ }
1369
+ },
1370
+ "indexes": {
1371
+ "idx_turns_session": {
1372
+ "name": "idx_turns_session",
1373
+ "columns": [
1374
+ {
1375
+ "expression": "session_id",
1376
+ "isExpression": false,
1377
+ "asc": true,
1378
+ "nulls": "last"
1379
+ },
1380
+ {
1381
+ "expression": "started_at",
1382
+ "isExpression": false,
1383
+ "asc": true,
1384
+ "nulls": "last"
1385
+ }
1386
+ ],
1387
+ "isUnique": false,
1388
+ "concurrently": false,
1389
+ "method": "btree",
1390
+ "with": {}
1391
+ },
1392
+ "uniq_turns_session_number": {
1393
+ "name": "uniq_turns_session_number",
1394
+ "columns": [
1395
+ {
1396
+ "expression": "session_id",
1397
+ "isExpression": false,
1398
+ "asc": true,
1399
+ "nulls": "last"
1400
+ },
1401
+ {
1402
+ "expression": "turn_number",
1403
+ "isExpression": false,
1404
+ "asc": true,
1405
+ "nulls": "last"
1406
+ }
1407
+ ],
1408
+ "isUnique": true,
1409
+ "concurrently": false,
1410
+ "method": "btree",
1411
+ "with": {}
1412
+ },
1413
+ "uniq_turns_session_anchor": {
1414
+ "name": "uniq_turns_session_anchor",
1415
+ "columns": [
1416
+ {
1417
+ "expression": "session_id",
1418
+ "isExpression": false,
1419
+ "asc": true,
1420
+ "nulls": "last"
1421
+ },
1422
+ {
1423
+ "expression": "turn_anchor_id",
1424
+ "isExpression": false,
1425
+ "asc": true,
1426
+ "nulls": "last"
1427
+ }
1428
+ ],
1429
+ "isUnique": true,
1430
+ "concurrently": false,
1431
+ "method": "btree",
1432
+ "with": {}
1433
+ }
1434
+ },
1435
+ "foreignKeys": {
1436
+ "turns_session_id_sessions_session_id_fk": {
1437
+ "name": "turns_session_id_sessions_session_id_fk",
1438
+ "tableFrom": "turns",
1439
+ "tableTo": "sessions",
1440
+ "columnsFrom": ["session_id"],
1441
+ "columnsTo": ["session_id"],
1442
+ "onDelete": "cascade",
1443
+ "onUpdate": "no action"
1444
+ }
1445
+ },
1446
+ "compositePrimaryKeys": {},
1447
+ "uniqueConstraints": {},
1448
+ "policies": {},
1449
+ "checkConstraints": {},
1450
+ "isRLSEnabled": false
1451
+ },
1452
+ "public.log_import_settings": {
1453
+ "name": "log_import_settings",
1454
+ "schema": "",
1455
+ "columns": {
1456
+ "adapter_name": {
1457
+ "name": "adapter_name",
1458
+ "type": "text",
1459
+ "primaryKey": true,
1460
+ "notNull": true
1461
+ },
1462
+ "mode": {
1463
+ "name": "mode",
1464
+ "type": "text",
1465
+ "primaryKey": false,
1466
+ "notNull": true,
1467
+ "default": "'disabled'"
1468
+ },
1469
+ "created_at": {
1470
+ "name": "created_at",
1471
+ "type": "bigint",
1472
+ "primaryKey": false,
1473
+ "notNull": true
1474
+ },
1475
+ "updated_at": {
1476
+ "name": "updated_at",
1477
+ "type": "bigint",
1478
+ "primaryKey": false,
1479
+ "notNull": true
1480
+ }
1481
+ },
1482
+ "indexes": {},
1483
+ "foreignKeys": {},
1484
+ "compositePrimaryKeys": {},
1485
+ "uniqueConstraints": {},
1486
+ "policies": {},
1487
+ "checkConstraints": {},
1488
+ "isRLSEnabled": false
1489
+ },
1490
+ "public.client_binary_state": {
1491
+ "name": "client_binary_state",
1492
+ "schema": "",
1493
+ "columns": {
1494
+ "client_id": {
1495
+ "name": "client_id",
1496
+ "type": "text",
1497
+ "primaryKey": true,
1498
+ "notNull": true
1499
+ },
1500
+ "active_version": {
1501
+ "name": "active_version",
1502
+ "type": "text",
1503
+ "primaryKey": false,
1504
+ "notNull": false
1505
+ },
1506
+ "updated_at": {
1507
+ "name": "updated_at",
1508
+ "type": "bigint",
1509
+ "primaryKey": false,
1510
+ "notNull": true
1511
+ }
1512
+ },
1513
+ "indexes": {},
1514
+ "foreignKeys": {},
1515
+ "compositePrimaryKeys": {},
1516
+ "uniqueConstraints": {},
1517
+ "policies": {},
1518
+ "checkConstraints": {},
1519
+ "isRLSEnabled": false
1520
+ },
1521
+ "public.client_binary_versions": {
1522
+ "name": "client_binary_versions",
1523
+ "schema": "",
1524
+ "columns": {
1525
+ "id": {
1526
+ "name": "id",
1527
+ "type": "text",
1528
+ "primaryKey": true,
1529
+ "notNull": true
1530
+ },
1531
+ "client_id": {
1532
+ "name": "client_id",
1533
+ "type": "text",
1534
+ "primaryKey": false,
1535
+ "notNull": true
1536
+ },
1537
+ "version": {
1538
+ "name": "version",
1539
+ "type": "text",
1540
+ "primaryKey": false,
1541
+ "notNull": true
1542
+ },
1543
+ "install_path": {
1544
+ "name": "install_path",
1545
+ "type": "text",
1546
+ "primaryKey": false,
1547
+ "notNull": true
1548
+ },
1549
+ "installed_at": {
1550
+ "name": "installed_at",
1551
+ "type": "bigint",
1552
+ "primaryKey": false,
1553
+ "notNull": true
1554
+ },
1555
+ "created_at": {
1556
+ "name": "created_at",
1557
+ "type": "bigint",
1558
+ "primaryKey": false,
1559
+ "notNull": true
1560
+ }
1561
+ },
1562
+ "indexes": {},
1563
+ "foreignKeys": {},
1564
+ "compositePrimaryKeys": {},
1565
+ "uniqueConstraints": {
1566
+ "uq_client_binary_versions_client_version": {
1567
+ "name": "uq_client_binary_versions_client_version",
1568
+ "nullsNotDistinct": false,
1569
+ "columns": ["client_id", "version"]
1570
+ }
1571
+ },
1572
+ "policies": {},
1573
+ "checkConstraints": {},
1574
+ "isRLSEnabled": false
1575
+ },
1576
+ "public.client_profiles": {
1577
+ "name": "client_profiles",
1578
+ "schema": "",
1579
+ "columns": {
1580
+ "id": {
1581
+ "name": "id",
1582
+ "type": "text",
1583
+ "primaryKey": true,
1584
+ "notNull": true
1585
+ },
1586
+ "client_id": {
1587
+ "name": "client_id",
1588
+ "type": "text",
1589
+ "primaryKey": false,
1590
+ "notNull": true
1591
+ },
1592
+ "name": {
1593
+ "name": "name",
1594
+ "type": "text",
1595
+ "primaryKey": false,
1596
+ "notNull": true
1597
+ },
1598
+ "description": {
1599
+ "name": "description",
1600
+ "type": "text",
1601
+ "primaryKey": false,
1602
+ "notNull": false
1603
+ },
1604
+ "config_dir": {
1605
+ "name": "config_dir",
1606
+ "type": "text",
1607
+ "primaryKey": false,
1608
+ "notNull": true
1609
+ },
1610
+ "is_default": {
1611
+ "name": "is_default",
1612
+ "type": "boolean",
1613
+ "primaryKey": false,
1614
+ "notNull": true,
1615
+ "default": false
1616
+ },
1617
+ "created_at": {
1618
+ "name": "created_at",
1619
+ "type": "bigint",
1620
+ "primaryKey": false,
1621
+ "notNull": true
1622
+ },
1623
+ "updated_at": {
1624
+ "name": "updated_at",
1625
+ "type": "bigint",
1626
+ "primaryKey": false,
1627
+ "notNull": true
1628
+ }
1629
+ },
1630
+ "indexes": {
1631
+ "uq_client_profiles_client_name": {
1632
+ "name": "uq_client_profiles_client_name",
1633
+ "columns": [
1634
+ {
1635
+ "expression": "client_id",
1636
+ "isExpression": false,
1637
+ "asc": true,
1638
+ "nulls": "last"
1639
+ },
1640
+ {
1641
+ "expression": "name",
1642
+ "isExpression": false,
1643
+ "asc": true,
1644
+ "nulls": "last"
1645
+ }
1646
+ ],
1647
+ "isUnique": true,
1648
+ "concurrently": false,
1649
+ "method": "btree",
1650
+ "with": {}
1651
+ },
1652
+ "uq_client_profiles_default": {
1653
+ "name": "uq_client_profiles_default",
1654
+ "columns": [
1655
+ {
1656
+ "expression": "client_id",
1657
+ "isExpression": false,
1658
+ "asc": true,
1659
+ "nulls": "last"
1660
+ }
1661
+ ],
1662
+ "isUnique": true,
1663
+ "where": "\"client_profiles\".\"is_default\" = true",
1664
+ "concurrently": false,
1665
+ "method": "btree",
1666
+ "with": {}
1667
+ }
1668
+ },
1669
+ "foreignKeys": {},
1670
+ "compositePrimaryKeys": {},
1671
+ "uniqueConstraints": {},
1672
+ "policies": {},
1673
+ "checkConstraints": {},
1674
+ "isRLSEnabled": false
1675
+ },
1676
+ "public.client_runtimes": {
1677
+ "name": "client_runtimes",
1678
+ "schema": "",
1679
+ "columns": {
1680
+ "id": {
1681
+ "name": "id",
1682
+ "type": "text",
1683
+ "primaryKey": true,
1684
+ "notNull": true
1685
+ },
1686
+ "client_id": {
1687
+ "name": "client_id",
1688
+ "type": "text",
1689
+ "primaryKey": false,
1690
+ "notNull": true
1691
+ },
1692
+ "status": {
1693
+ "name": "status",
1694
+ "type": "text",
1695
+ "primaryKey": false,
1696
+ "notNull": true
1697
+ },
1698
+ "supervisor_session_id": {
1699
+ "name": "supervisor_session_id",
1700
+ "type": "text",
1701
+ "primaryKey": false,
1702
+ "notNull": false
1703
+ },
1704
+ "pid": {
1705
+ "name": "pid",
1706
+ "type": "integer",
1707
+ "primaryKey": false,
1708
+ "notNull": false
1709
+ },
1710
+ "parent_pid": {
1711
+ "name": "parent_pid",
1712
+ "type": "integer",
1713
+ "primaryKey": false,
1714
+ "notNull": false
1715
+ },
1716
+ "adapter_session_id": {
1717
+ "name": "adapter_session_id",
1718
+ "type": "text",
1719
+ "primaryKey": false,
1720
+ "notNull": false
1721
+ },
1722
+ "session_id": {
1723
+ "name": "session_id",
1724
+ "type": "text",
1725
+ "primaryKey": false,
1726
+ "notNull": false
1727
+ },
1728
+ "cwd": {
1729
+ "name": "cwd",
1730
+ "type": "text",
1731
+ "primaryKey": false,
1732
+ "notNull": false
1733
+ },
1734
+ "argv": {
1735
+ "name": "argv",
1736
+ "type": "jsonb",
1737
+ "primaryKey": false,
1738
+ "notNull": false
1739
+ },
1740
+ "metadata": {
1741
+ "name": "metadata",
1742
+ "type": "jsonb",
1743
+ "primaryKey": false,
1744
+ "notNull": false
1745
+ },
1746
+ "observed_at": {
1747
+ "name": "observed_at",
1748
+ "type": "bigint",
1749
+ "primaryKey": false,
1750
+ "notNull": true
1751
+ },
1752
+ "created_at": {
1753
+ "name": "created_at",
1754
+ "type": "bigint",
1755
+ "primaryKey": false,
1756
+ "notNull": true
1757
+ },
1758
+ "updated_at": {
1759
+ "name": "updated_at",
1760
+ "type": "bigint",
1761
+ "primaryKey": false,
1762
+ "notNull": true
1763
+ }
1764
+ },
1765
+ "indexes": {
1766
+ "idx_client_runtimes_supervisor_session_id": {
1767
+ "name": "idx_client_runtimes_supervisor_session_id",
1768
+ "columns": [
1769
+ {
1770
+ "expression": "supervisor_session_id",
1771
+ "isExpression": false,
1772
+ "asc": true,
1773
+ "nulls": "last"
1774
+ }
1775
+ ],
1776
+ "isUnique": false,
1777
+ "concurrently": false,
1778
+ "method": "btree",
1779
+ "with": {}
1780
+ },
1781
+ "idx_client_runtimes_pid_client_id": {
1782
+ "name": "idx_client_runtimes_pid_client_id",
1783
+ "columns": [
1784
+ {
1785
+ "expression": "pid",
1786
+ "isExpression": false,
1787
+ "asc": true,
1788
+ "nulls": "last"
1789
+ },
1790
+ {
1791
+ "expression": "client_id",
1792
+ "isExpression": false,
1793
+ "asc": true,
1794
+ "nulls": "last"
1795
+ }
1796
+ ],
1797
+ "isUnique": false,
1798
+ "concurrently": false,
1799
+ "method": "btree",
1800
+ "with": {}
1801
+ },
1802
+ "idx_client_runtimes_adapter_session_id_client_id": {
1803
+ "name": "idx_client_runtimes_adapter_session_id_client_id",
1804
+ "columns": [
1805
+ {
1806
+ "expression": "adapter_session_id",
1807
+ "isExpression": false,
1808
+ "asc": true,
1809
+ "nulls": "last"
1810
+ },
1811
+ {
1812
+ "expression": "client_id",
1813
+ "isExpression": false,
1814
+ "asc": true,
1815
+ "nulls": "last"
1816
+ }
1817
+ ],
1818
+ "isUnique": false,
1819
+ "concurrently": false,
1820
+ "method": "btree",
1821
+ "with": {}
1822
+ }
1823
+ },
1824
+ "foreignKeys": {},
1825
+ "compositePrimaryKeys": {},
1826
+ "uniqueConstraints": {},
1827
+ "policies": {},
1828
+ "checkConstraints": {},
1829
+ "isRLSEnabled": false
1830
+ },
1831
+ "public.supervisor_runtimes": {
1832
+ "name": "supervisor_runtimes",
1833
+ "schema": "",
1834
+ "columns": {
1835
+ "supervisor_session_id": {
1836
+ "name": "supervisor_session_id",
1837
+ "type": "text",
1838
+ "primaryKey": true,
1839
+ "notNull": true
1840
+ },
1841
+ "client_id": {
1842
+ "name": "client_id",
1843
+ "type": "text",
1844
+ "primaryKey": false,
1845
+ "notNull": true
1846
+ },
1847
+ "pid": {
1848
+ "name": "pid",
1849
+ "type": "integer",
1850
+ "primaryKey": false,
1851
+ "notNull": false
1852
+ },
1853
+ "status": {
1854
+ "name": "status",
1855
+ "type": "text",
1856
+ "primaryKey": false,
1857
+ "notNull": true
1858
+ },
1859
+ "cwd": {
1860
+ "name": "cwd",
1861
+ "type": "text",
1862
+ "primaryKey": false,
1863
+ "notNull": true
1864
+ },
1865
+ "command": {
1866
+ "name": "command",
1867
+ "type": "text",
1868
+ "primaryKey": false,
1869
+ "notNull": true
1870
+ },
1871
+ "args_json": {
1872
+ "name": "args_json",
1873
+ "type": "text",
1874
+ "primaryKey": false,
1875
+ "notNull": true
1876
+ },
1877
+ "env_json": {
1878
+ "name": "env_json",
1879
+ "type": "text",
1880
+ "primaryKey": false,
1881
+ "notNull": false
1882
+ },
1883
+ "session_id": {
1884
+ "name": "session_id",
1885
+ "type": "text",
1886
+ "primaryKey": false,
1887
+ "notNull": false
1888
+ },
1889
+ "adapter_session_id": {
1890
+ "name": "adapter_session_id",
1891
+ "type": "text",
1892
+ "primaryKey": false,
1893
+ "notNull": false
1894
+ },
1895
+ "started_at": {
1896
+ "name": "started_at",
1897
+ "type": "bigint",
1898
+ "primaryKey": false,
1899
+ "notNull": true
1900
+ },
1901
+ "stopped_at": {
1902
+ "name": "stopped_at",
1903
+ "type": "bigint",
1904
+ "primaryKey": false,
1905
+ "notNull": false
1906
+ },
1907
+ "metadata_json": {
1908
+ "name": "metadata_json",
1909
+ "type": "text",
1910
+ "primaryKey": false,
1911
+ "notNull": false
1912
+ }
1913
+ },
1914
+ "indexes": {
1915
+ "supervisor_runtimes_session_id_idx": {
1916
+ "name": "supervisor_runtimes_session_id_idx",
1917
+ "columns": [
1918
+ {
1919
+ "expression": "session_id",
1920
+ "isExpression": false,
1921
+ "asc": true,
1922
+ "nulls": "last"
1923
+ }
1924
+ ],
1925
+ "isUnique": false,
1926
+ "concurrently": false,
1927
+ "method": "btree",
1928
+ "with": {}
1929
+ },
1930
+ "supervisor_runtimes_adapter_session_id_idx": {
1931
+ "name": "supervisor_runtimes_adapter_session_id_idx",
1932
+ "columns": [
1933
+ {
1934
+ "expression": "adapter_session_id",
1935
+ "isExpression": false,
1936
+ "asc": true,
1937
+ "nulls": "last"
1938
+ }
1939
+ ],
1940
+ "isUnique": false,
1941
+ "concurrently": false,
1942
+ "method": "btree",
1943
+ "with": {}
1944
+ },
1945
+ "supervisor_runtimes_status_idx": {
1946
+ "name": "supervisor_runtimes_status_idx",
1947
+ "columns": [
1948
+ {
1949
+ "expression": "status",
1950
+ "isExpression": false,
1951
+ "asc": true,
1952
+ "nulls": "last"
1953
+ }
1954
+ ],
1955
+ "isUnique": false,
1956
+ "concurrently": false,
1957
+ "method": "btree",
1958
+ "with": {}
1959
+ }
1960
+ },
1961
+ "foreignKeys": {},
1962
+ "compositePrimaryKeys": {},
1963
+ "uniqueConstraints": {},
1964
+ "policies": {},
1965
+ "checkConstraints": {},
1966
+ "isRLSEnabled": false
1967
+ },
1968
+ "public.workflow_definitions": {
1969
+ "name": "workflow_definitions",
1970
+ "schema": "",
1971
+ "columns": {
1972
+ "id": {
1973
+ "name": "id",
1974
+ "type": "text",
1975
+ "primaryKey": true,
1976
+ "notNull": true
1977
+ },
1978
+ "name": {
1979
+ "name": "name",
1980
+ "type": "text",
1981
+ "primaryKey": false,
1982
+ "notNull": true
1983
+ },
1984
+ "description": {
1985
+ "name": "description",
1986
+ "type": "text",
1987
+ "primaryKey": false,
1988
+ "notNull": false
1989
+ },
1990
+ "root": {
1991
+ "name": "root",
1992
+ "type": "jsonb",
1993
+ "primaryKey": false,
1994
+ "notNull": true
1995
+ },
1996
+ "input_schema": {
1997
+ "name": "input_schema",
1998
+ "type": "jsonb",
1999
+ "primaryKey": false,
2000
+ "notNull": false
2001
+ },
2002
+ "config_schema": {
2003
+ "name": "config_schema",
2004
+ "type": "jsonb",
2005
+ "primaryKey": false,
2006
+ "notNull": false
2007
+ },
2008
+ "output_schema": {
2009
+ "name": "output_schema",
2010
+ "type": "jsonb",
2011
+ "primaryKey": false,
2012
+ "notNull": false
2013
+ },
2014
+ "state": {
2015
+ "name": "state",
2016
+ "type": "jsonb",
2017
+ "primaryKey": false,
2018
+ "notNull": false
2019
+ },
2020
+ "artifact": {
2021
+ "name": "artifact",
2022
+ "type": "jsonb",
2023
+ "primaryKey": false,
2024
+ "notNull": false
2025
+ },
2026
+ "triggers": {
2027
+ "name": "triggers",
2028
+ "type": "jsonb",
2029
+ "primaryKey": false,
2030
+ "notNull": false
2031
+ },
2032
+ "scope_type": {
2033
+ "name": "scope_type",
2034
+ "type": "text",
2035
+ "primaryKey": false,
2036
+ "notNull": true
2037
+ },
2038
+ "scope_kind": {
2039
+ "name": "scope_kind",
2040
+ "type": "text",
2041
+ "primaryKey": false,
2042
+ "notNull": true,
2043
+ "default": "''"
2044
+ },
2045
+ "scope_id": {
2046
+ "name": "scope_id",
2047
+ "type": "text",
2048
+ "primaryKey": false,
2049
+ "notNull": true,
2050
+ "default": "''"
2051
+ },
2052
+ "created_at": {
2053
+ "name": "created_at",
2054
+ "type": "bigint",
2055
+ "primaryKey": false,
2056
+ "notNull": true
2057
+ },
2058
+ "updated_at": {
2059
+ "name": "updated_at",
2060
+ "type": "bigint",
2061
+ "primaryKey": false,
2062
+ "notNull": true
2063
+ },
2064
+ "canvas_layout": {
2065
+ "name": "canvas_layout",
2066
+ "type": "jsonb",
2067
+ "primaryKey": false,
2068
+ "notNull": false
2069
+ },
2070
+ "source": {
2071
+ "name": "source",
2072
+ "type": "jsonb",
2073
+ "primaryKey": false,
2074
+ "notNull": false
2075
+ },
2076
+ "execution_hints": {
2077
+ "name": "execution_hints",
2078
+ "type": "jsonb",
2079
+ "primaryKey": false,
2080
+ "notNull": false
2081
+ }
2082
+ },
2083
+ "indexes": {
2084
+ "uniq_workflow_definitions_name_scope": {
2085
+ "name": "uniq_workflow_definitions_name_scope",
2086
+ "columns": [
2087
+ {
2088
+ "expression": "name",
2089
+ "isExpression": false,
2090
+ "asc": true,
2091
+ "nulls": "last"
2092
+ },
2093
+ {
2094
+ "expression": "scope_type",
2095
+ "isExpression": false,
2096
+ "asc": true,
2097
+ "nulls": "last"
2098
+ },
2099
+ {
2100
+ "expression": "scope_kind",
2101
+ "isExpression": false,
2102
+ "asc": true,
2103
+ "nulls": "last"
2104
+ },
2105
+ {
2106
+ "expression": "scope_id",
2107
+ "isExpression": false,
2108
+ "asc": true,
2109
+ "nulls": "last"
2110
+ }
2111
+ ],
2112
+ "isUnique": true,
2113
+ "concurrently": false,
2114
+ "method": "btree",
2115
+ "with": {}
2116
+ },
2117
+ "idx_workflow_definitions_scope": {
2118
+ "name": "idx_workflow_definitions_scope",
2119
+ "columns": [
2120
+ {
2121
+ "expression": "scope_type",
2122
+ "isExpression": false,
2123
+ "asc": true,
2124
+ "nulls": "last"
2125
+ },
2126
+ {
2127
+ "expression": "scope_kind",
2128
+ "isExpression": false,
2129
+ "asc": true,
2130
+ "nulls": "last"
2131
+ },
2132
+ {
2133
+ "expression": "scope_id",
2134
+ "isExpression": false,
2135
+ "asc": true,
2136
+ "nulls": "last"
2137
+ }
2138
+ ],
2139
+ "isUnique": false,
2140
+ "concurrently": false,
2141
+ "method": "btree",
2142
+ "with": {}
2143
+ }
2144
+ },
2145
+ "foreignKeys": {},
2146
+ "compositePrimaryKeys": {},
2147
+ "uniqueConstraints": {},
2148
+ "policies": {},
2149
+ "checkConstraints": {},
2150
+ "isRLSEnabled": false
2151
+ },
2152
+ "public.workflow_execution_frames": {
2153
+ "name": "workflow_execution_frames",
2154
+ "schema": "",
2155
+ "columns": {
2156
+ "frame_id": {
2157
+ "name": "frame_id",
2158
+ "type": "text",
2159
+ "primaryKey": true,
2160
+ "notNull": true
2161
+ },
2162
+ "execution_id": {
2163
+ "name": "execution_id",
2164
+ "type": "text",
2165
+ "primaryKey": false,
2166
+ "notNull": true
2167
+ },
2168
+ "node_id": {
2169
+ "name": "node_id",
2170
+ "type": "text",
2171
+ "primaryKey": false,
2172
+ "notNull": true
2173
+ },
2174
+ "node_type": {
2175
+ "name": "node_type",
2176
+ "type": "text",
2177
+ "primaryKey": false,
2178
+ "notNull": true
2179
+ },
2180
+ "path": {
2181
+ "name": "path",
2182
+ "type": "jsonb",
2183
+ "primaryKey": false,
2184
+ "notNull": true
2185
+ },
2186
+ "parent_frame_id": {
2187
+ "name": "parent_frame_id",
2188
+ "type": "text",
2189
+ "primaryKey": false,
2190
+ "notNull": false
2191
+ },
2192
+ "status": {
2193
+ "name": "status",
2194
+ "type": "text",
2195
+ "primaryKey": false,
2196
+ "notNull": true,
2197
+ "default": "'pending'"
2198
+ },
2199
+ "attempt": {
2200
+ "name": "attempt",
2201
+ "type": "integer",
2202
+ "primaryKey": false,
2203
+ "notNull": true,
2204
+ "default": 0
2205
+ },
2206
+ "iteration": {
2207
+ "name": "iteration",
2208
+ "type": "integer",
2209
+ "primaryKey": false,
2210
+ "notNull": false
2211
+ },
2212
+ "branch_key": {
2213
+ "name": "branch_key",
2214
+ "type": "text",
2215
+ "primaryKey": false,
2216
+ "notNull": false
2217
+ },
2218
+ "output": {
2219
+ "name": "output",
2220
+ "type": "jsonb",
2221
+ "primaryKey": false,
2222
+ "notNull": false
2223
+ },
2224
+ "output_present": {
2225
+ "name": "output_present",
2226
+ "type": "boolean",
2227
+ "primaryKey": false,
2228
+ "notNull": true,
2229
+ "default": false
2230
+ },
2231
+ "error": {
2232
+ "name": "error",
2233
+ "type": "text",
2234
+ "primaryKey": false,
2235
+ "notNull": false
2236
+ },
2237
+ "started_at": {
2238
+ "name": "started_at",
2239
+ "type": "bigint",
2240
+ "primaryKey": false,
2241
+ "notNull": false
2242
+ },
2243
+ "completed_at": {
2244
+ "name": "completed_at",
2245
+ "type": "bigint",
2246
+ "primaryKey": false,
2247
+ "notNull": false
2248
+ }
2249
+ },
2250
+ "indexes": {
2251
+ "idx_workflow_execution_frames_execution": {
2252
+ "name": "idx_workflow_execution_frames_execution",
2253
+ "columns": [
2254
+ {
2255
+ "expression": "execution_id",
2256
+ "isExpression": false,
2257
+ "asc": true,
2258
+ "nulls": "last"
2259
+ }
2260
+ ],
2261
+ "isUnique": false,
2262
+ "concurrently": false,
2263
+ "method": "btree",
2264
+ "with": {}
2265
+ },
2266
+ "idx_workflow_execution_frames_parent": {
2267
+ "name": "idx_workflow_execution_frames_parent",
2268
+ "columns": [
2269
+ {
2270
+ "expression": "parent_frame_id",
2271
+ "isExpression": false,
2272
+ "asc": true,
2273
+ "nulls": "last"
2274
+ }
2275
+ ],
2276
+ "isUnique": false,
2277
+ "concurrently": false,
2278
+ "method": "btree",
2279
+ "with": {}
2280
+ }
2281
+ },
2282
+ "foreignKeys": {
2283
+ "workflow_execution_frames_execution_id_workflow_executions_id_fk": {
2284
+ "name": "workflow_execution_frames_execution_id_workflow_executions_id_fk",
2285
+ "tableFrom": "workflow_execution_frames",
2286
+ "tableTo": "workflow_executions",
2287
+ "columnsFrom": ["execution_id"],
2288
+ "columnsTo": ["id"],
2289
+ "onDelete": "cascade",
2290
+ "onUpdate": "no action"
2291
+ }
2292
+ },
2293
+ "compositePrimaryKeys": {},
2294
+ "uniqueConstraints": {},
2295
+ "policies": {},
2296
+ "checkConstraints": {},
2297
+ "isRLSEnabled": false
2298
+ },
2299
+ "public.workflow_execution_links": {
2300
+ "name": "workflow_execution_links",
2301
+ "schema": "",
2302
+ "columns": {
2303
+ "source_execution_id": {
2304
+ "name": "source_execution_id",
2305
+ "type": "text",
2306
+ "primaryKey": false,
2307
+ "notNull": true
2308
+ },
2309
+ "target_execution_id": {
2310
+ "name": "target_execution_id",
2311
+ "type": "text",
2312
+ "primaryKey": false,
2313
+ "notNull": true
2314
+ },
2315
+ "link_type": {
2316
+ "name": "link_type",
2317
+ "type": "text",
2318
+ "primaryKey": false,
2319
+ "notNull": true
2320
+ },
2321
+ "metadata": {
2322
+ "name": "metadata",
2323
+ "type": "jsonb",
2324
+ "primaryKey": false,
2325
+ "notNull": false
2326
+ }
2327
+ },
2328
+ "indexes": {
2329
+ "idx_workflow_execution_links_target": {
2330
+ "name": "idx_workflow_execution_links_target",
2331
+ "columns": [
2332
+ {
2333
+ "expression": "target_execution_id",
2334
+ "isExpression": false,
2335
+ "asc": true,
2336
+ "nulls": "last"
2337
+ }
2338
+ ],
2339
+ "isUnique": false,
2340
+ "concurrently": false,
2341
+ "method": "btree",
2342
+ "with": {}
2343
+ }
2344
+ },
2345
+ "foreignKeys": {
2346
+ "workflow_execution_links_source_execution_id_workflow_executions_id_fk": {
2347
+ "name": "workflow_execution_links_source_execution_id_workflow_executions_id_fk",
2348
+ "tableFrom": "workflow_execution_links",
2349
+ "tableTo": "workflow_executions",
2350
+ "columnsFrom": ["source_execution_id"],
2351
+ "columnsTo": ["id"],
2352
+ "onDelete": "cascade",
2353
+ "onUpdate": "no action"
2354
+ },
2355
+ "workflow_execution_links_target_execution_id_workflow_executions_id_fk": {
2356
+ "name": "workflow_execution_links_target_execution_id_workflow_executions_id_fk",
2357
+ "tableFrom": "workflow_execution_links",
2358
+ "tableTo": "workflow_executions",
2359
+ "columnsFrom": ["target_execution_id"],
2360
+ "columnsTo": ["id"],
2361
+ "onDelete": "cascade",
2362
+ "onUpdate": "no action"
2363
+ }
2364
+ },
2365
+ "compositePrimaryKeys": {
2366
+ "workflow_execution_links_source_execution_id_target_execution_id_pk": {
2367
+ "name": "workflow_execution_links_source_execution_id_target_execution_id_pk",
2368
+ "columns": ["source_execution_id", "target_execution_id"]
2369
+ }
2370
+ },
2371
+ "uniqueConstraints": {},
2372
+ "policies": {},
2373
+ "checkConstraints": {},
2374
+ "isRLSEnabled": false
2375
+ },
2376
+ "public.workflow_execution_state": {
2377
+ "name": "workflow_execution_state",
2378
+ "schema": "",
2379
+ "columns": {
2380
+ "execution_id": {
2381
+ "name": "execution_id",
2382
+ "type": "text",
2383
+ "primaryKey": true,
2384
+ "notNull": true
2385
+ },
2386
+ "sequence": {
2387
+ "name": "sequence",
2388
+ "type": "integer",
2389
+ "primaryKey": false,
2390
+ "notNull": true,
2391
+ "default": 0
2392
+ },
2393
+ "value": {
2394
+ "name": "value",
2395
+ "type": "jsonb",
2396
+ "primaryKey": false,
2397
+ "notNull": true
2398
+ },
2399
+ "updated_at": {
2400
+ "name": "updated_at",
2401
+ "type": "bigint",
2402
+ "primaryKey": false,
2403
+ "notNull": true
2404
+ }
2405
+ },
2406
+ "indexes": {},
2407
+ "foreignKeys": {
2408
+ "workflow_execution_state_execution_id_workflow_executions_id_fk": {
2409
+ "name": "workflow_execution_state_execution_id_workflow_executions_id_fk",
2410
+ "tableFrom": "workflow_execution_state",
2411
+ "tableTo": "workflow_executions",
2412
+ "columnsFrom": ["execution_id"],
2413
+ "columnsTo": ["id"],
2414
+ "onDelete": "cascade",
2415
+ "onUpdate": "no action"
2416
+ }
2417
+ },
2418
+ "compositePrimaryKeys": {},
2419
+ "uniqueConstraints": {},
2420
+ "policies": {},
2421
+ "checkConstraints": {},
2422
+ "isRLSEnabled": false
2423
+ },
2424
+ "public.workflow_execution_state_events": {
2425
+ "name": "workflow_execution_state_events",
2426
+ "schema": "",
2427
+ "columns": {
2428
+ "execution_id": {
2429
+ "name": "execution_id",
2430
+ "type": "text",
2431
+ "primaryKey": false,
2432
+ "notNull": true
2433
+ },
2434
+ "sequence": {
2435
+ "name": "sequence",
2436
+ "type": "integer",
2437
+ "primaryKey": false,
2438
+ "notNull": true
2439
+ },
2440
+ "patch": {
2441
+ "name": "patch",
2442
+ "type": "jsonb",
2443
+ "primaryKey": false,
2444
+ "notNull": true
2445
+ },
2446
+ "value": {
2447
+ "name": "value",
2448
+ "type": "jsonb",
2449
+ "primaryKey": false,
2450
+ "notNull": true
2451
+ },
2452
+ "created_at": {
2453
+ "name": "created_at",
2454
+ "type": "bigint",
2455
+ "primaryKey": false,
2456
+ "notNull": true
2457
+ }
2458
+ },
2459
+ "indexes": {},
2460
+ "foreignKeys": {
2461
+ "workflow_execution_state_events_execution_id_workflow_executions_id_fk": {
2462
+ "name": "workflow_execution_state_events_execution_id_workflow_executions_id_fk",
2463
+ "tableFrom": "workflow_execution_state_events",
2464
+ "tableTo": "workflow_executions",
2465
+ "columnsFrom": ["execution_id"],
2466
+ "columnsTo": ["id"],
2467
+ "onDelete": "cascade",
2468
+ "onUpdate": "no action"
2469
+ }
2470
+ },
2471
+ "compositePrimaryKeys": {
2472
+ "workflow_execution_state_events_execution_id_sequence_pk": {
2473
+ "name": "workflow_execution_state_events_execution_id_sequence_pk",
2474
+ "columns": ["execution_id", "sequence"]
2475
+ }
2476
+ },
2477
+ "uniqueConstraints": {},
2478
+ "policies": {},
2479
+ "checkConstraints": {},
2480
+ "isRLSEnabled": false
2481
+ },
2482
+ "public.workflow_executions": {
2483
+ "name": "workflow_executions",
2484
+ "schema": "",
2485
+ "columns": {
2486
+ "id": {
2487
+ "name": "id",
2488
+ "type": "text",
2489
+ "primaryKey": true,
2490
+ "notNull": true
2491
+ },
2492
+ "workflow_id": {
2493
+ "name": "workflow_id",
2494
+ "type": "text",
2495
+ "primaryKey": false,
2496
+ "notNull": true
2497
+ },
2498
+ "coordinator_session_id": {
2499
+ "name": "coordinator_session_id",
2500
+ "type": "text",
2501
+ "primaryKey": false,
2502
+ "notNull": false
2503
+ },
2504
+ "status": {
2505
+ "name": "status",
2506
+ "type": "text",
2507
+ "primaryKey": false,
2508
+ "notNull": true
2509
+ },
2510
+ "inputs": {
2511
+ "name": "inputs",
2512
+ "type": "jsonb",
2513
+ "primaryKey": false,
2514
+ "notNull": false
2515
+ },
2516
+ "error": {
2517
+ "name": "error",
2518
+ "type": "text",
2519
+ "primaryKey": false,
2520
+ "notNull": false
2521
+ },
2522
+ "reason": {
2523
+ "name": "reason",
2524
+ "type": "text",
2525
+ "primaryKey": false,
2526
+ "notNull": false
2527
+ },
2528
+ "started_at": {
2529
+ "name": "started_at",
2530
+ "type": "bigint",
2531
+ "primaryKey": false,
2532
+ "notNull": true
2533
+ },
2534
+ "completed_at": {
2535
+ "name": "completed_at",
2536
+ "type": "bigint",
2537
+ "primaryKey": false,
2538
+ "notNull": false
2539
+ },
2540
+ "trigger_payload": {
2541
+ "name": "trigger_payload",
2542
+ "type": "jsonb",
2543
+ "primaryKey": false,
2544
+ "notNull": false
2545
+ },
2546
+ "artifact_kind": {
2547
+ "name": "artifact_kind",
2548
+ "type": "text",
2549
+ "primaryKey": false,
2550
+ "notNull": false
2551
+ },
2552
+ "artifact_id": {
2553
+ "name": "artifact_id",
2554
+ "type": "text",
2555
+ "primaryKey": false,
2556
+ "notNull": false
2557
+ },
2558
+ "scope_type": {
2559
+ "name": "scope_type",
2560
+ "type": "text",
2561
+ "primaryKey": false,
2562
+ "notNull": true
2563
+ },
2564
+ "scope_kind": {
2565
+ "name": "scope_kind",
2566
+ "type": "text",
2567
+ "primaryKey": false,
2568
+ "notNull": true,
2569
+ "default": "''"
2570
+ },
2571
+ "scope_id": {
2572
+ "name": "scope_id",
2573
+ "type": "text",
2574
+ "primaryKey": false,
2575
+ "notNull": true,
2576
+ "default": "''"
2577
+ }
2578
+ },
2579
+ "indexes": {
2580
+ "idx_workflow_executions_status": {
2581
+ "name": "idx_workflow_executions_status",
2582
+ "columns": [
2583
+ {
2584
+ "expression": "status",
2585
+ "isExpression": false,
2586
+ "asc": true,
2587
+ "nulls": "last"
2588
+ }
2589
+ ],
2590
+ "isUnique": false,
2591
+ "concurrently": false,
2592
+ "method": "btree",
2593
+ "with": {}
2594
+ },
2595
+ "idx_workflow_executions_scope_started": {
2596
+ "name": "idx_workflow_executions_scope_started",
2597
+ "columns": [
2598
+ {
2599
+ "expression": "scope_type",
2600
+ "isExpression": false,
2601
+ "asc": true,
2602
+ "nulls": "last"
2603
+ },
2604
+ {
2605
+ "expression": "scope_kind",
2606
+ "isExpression": false,
2607
+ "asc": true,
2608
+ "nulls": "last"
2609
+ },
2610
+ {
2611
+ "expression": "scope_id",
2612
+ "isExpression": false,
2613
+ "asc": true,
2614
+ "nulls": "last"
2615
+ },
2616
+ {
2617
+ "expression": "started_at",
2618
+ "isExpression": false,
2619
+ "asc": true,
2620
+ "nulls": "last"
2621
+ }
2622
+ ],
2623
+ "isUnique": false,
2624
+ "concurrently": false,
2625
+ "method": "btree",
2626
+ "with": {}
2627
+ },
2628
+ "idx_workflow_executions_workflow_started": {
2629
+ "name": "idx_workflow_executions_workflow_started",
2630
+ "columns": [
2631
+ {
2632
+ "expression": "workflow_id",
2633
+ "isExpression": false,
2634
+ "asc": true,
2635
+ "nulls": "last"
2636
+ },
2637
+ {
2638
+ "expression": "started_at",
2639
+ "isExpression": false,
2640
+ "asc": true,
2641
+ "nulls": "last"
2642
+ }
2643
+ ],
2644
+ "isUnique": false,
2645
+ "concurrently": false,
2646
+ "method": "btree",
2647
+ "with": {}
2648
+ },
2649
+ "idx_workflow_executions_artifact": {
2650
+ "name": "idx_workflow_executions_artifact",
2651
+ "columns": [
2652
+ {
2653
+ "expression": "artifact_kind",
2654
+ "isExpression": false,
2655
+ "asc": true,
2656
+ "nulls": "last"
2657
+ },
2658
+ {
2659
+ "expression": "artifact_id",
2660
+ "isExpression": false,
2661
+ "asc": true,
2662
+ "nulls": "last"
2663
+ },
2664
+ {
2665
+ "expression": "started_at",
2666
+ "isExpression": false,
2667
+ "asc": true,
2668
+ "nulls": "last"
2669
+ }
2670
+ ],
2671
+ "isUnique": false,
2672
+ "concurrently": false,
2673
+ "method": "btree",
2674
+ "with": {}
2675
+ }
2676
+ },
2677
+ "foreignKeys": {},
2678
+ "compositePrimaryKeys": {},
2679
+ "uniqueConstraints": {},
2680
+ "policies": {},
2681
+ "checkConstraints": {},
2682
+ "isRLSEnabled": false
2683
+ },
2684
+ "public.workflow_gate_instances": {
2685
+ "name": "workflow_gate_instances",
2686
+ "schema": "",
2687
+ "columns": {
2688
+ "id": {
2689
+ "name": "id",
2690
+ "type": "text",
2691
+ "primaryKey": true,
2692
+ "notNull": true
2693
+ },
2694
+ "execution_id": {
2695
+ "name": "execution_id",
2696
+ "type": "text",
2697
+ "primaryKey": false,
2698
+ "notNull": true
2699
+ },
2700
+ "node_id": {
2701
+ "name": "node_id",
2702
+ "type": "text",
2703
+ "primaryKey": false,
2704
+ "notNull": true
2705
+ },
2706
+ "frame_id": {
2707
+ "name": "frame_id",
2708
+ "type": "text",
2709
+ "primaryKey": false,
2710
+ "notNull": true
2711
+ },
2712
+ "schema": {
2713
+ "name": "schema",
2714
+ "type": "jsonb",
2715
+ "primaryKey": false,
2716
+ "notNull": true
2717
+ },
2718
+ "prompt": {
2719
+ "name": "prompt",
2720
+ "type": "text",
2721
+ "primaryKey": false,
2722
+ "notNull": false
2723
+ },
2724
+ "status": {
2725
+ "name": "status",
2726
+ "type": "text",
2727
+ "primaryKey": false,
2728
+ "notNull": true,
2729
+ "default": "'waiting'"
2730
+ },
2731
+ "auto_action": {
2732
+ "name": "auto_action",
2733
+ "type": "text",
2734
+ "primaryKey": false,
2735
+ "notNull": true,
2736
+ "default": "'reject'"
2737
+ },
2738
+ "timeout_ms": {
2739
+ "name": "timeout_ms",
2740
+ "type": "integer",
2741
+ "primaryKey": false,
2742
+ "notNull": false
2743
+ },
2744
+ "resume_data": {
2745
+ "name": "resume_data",
2746
+ "type": "jsonb",
2747
+ "primaryKey": false,
2748
+ "notNull": false
2749
+ },
2750
+ "reason": {
2751
+ "name": "reason",
2752
+ "type": "text",
2753
+ "primaryKey": false,
2754
+ "notNull": false
2755
+ },
2756
+ "resume_data_present": {
2757
+ "name": "resume_data_present",
2758
+ "type": "boolean",
2759
+ "primaryKey": false,
2760
+ "notNull": true,
2761
+ "default": false
2762
+ },
2763
+ "created_at": {
2764
+ "name": "created_at",
2765
+ "type": "bigint",
2766
+ "primaryKey": false,
2767
+ "notNull": true
2768
+ },
2769
+ "resolved_at": {
2770
+ "name": "resolved_at",
2771
+ "type": "bigint",
2772
+ "primaryKey": false,
2773
+ "notNull": false
2774
+ }
2775
+ },
2776
+ "indexes": {
2777
+ "idx_workflow_gate_instances_execution": {
2778
+ "name": "idx_workflow_gate_instances_execution",
2779
+ "columns": [
2780
+ {
2781
+ "expression": "execution_id",
2782
+ "isExpression": false,
2783
+ "asc": true,
2784
+ "nulls": "last"
2785
+ }
2786
+ ],
2787
+ "isUnique": false,
2788
+ "concurrently": false,
2789
+ "method": "btree",
2790
+ "with": {}
2791
+ },
2792
+ "idx_workflow_gate_instances_frame": {
2793
+ "name": "idx_workflow_gate_instances_frame",
2794
+ "columns": [
2795
+ {
2796
+ "expression": "frame_id",
2797
+ "isExpression": false,
2798
+ "asc": true,
2799
+ "nulls": "last"
2800
+ }
2801
+ ],
2802
+ "isUnique": false,
2803
+ "concurrently": false,
2804
+ "method": "btree",
2805
+ "with": {}
2806
+ }
2807
+ },
2808
+ "foreignKeys": {
2809
+ "workflow_gate_instances_execution_id_workflow_executions_id_fk": {
2810
+ "name": "workflow_gate_instances_execution_id_workflow_executions_id_fk",
2811
+ "tableFrom": "workflow_gate_instances",
2812
+ "tableTo": "workflow_executions",
2813
+ "columnsFrom": ["execution_id"],
2814
+ "columnsTo": ["id"],
2815
+ "onDelete": "cascade",
2816
+ "onUpdate": "no action"
2817
+ }
2818
+ },
2819
+ "compositePrimaryKeys": {},
2820
+ "uniqueConstraints": {},
2821
+ "policies": {},
2822
+ "checkConstraints": {},
2823
+ "isRLSEnabled": false
2824
+ },
2825
+ "public.workflow_run_contexts": {
2826
+ "name": "workflow_run_contexts",
2827
+ "schema": "",
2828
+ "columns": {
2829
+ "execution_id": {
2830
+ "name": "execution_id",
2831
+ "type": "text",
2832
+ "primaryKey": true,
2833
+ "notNull": true
2834
+ },
2835
+ "workflow_id": {
2836
+ "name": "workflow_id",
2837
+ "type": "text",
2838
+ "primaryKey": false,
2839
+ "notNull": true
2840
+ },
2841
+ "coordinator_session_id": {
2842
+ "name": "coordinator_session_id",
2843
+ "type": "text",
2844
+ "primaryKey": false,
2845
+ "notNull": true
2846
+ },
2847
+ "source_kind": {
2848
+ "name": "source_kind",
2849
+ "type": "text",
2850
+ "primaryKey": false,
2851
+ "notNull": true
2852
+ },
2853
+ "source_path": {
2854
+ "name": "source_path",
2855
+ "type": "text",
2856
+ "primaryKey": false,
2857
+ "notNull": false
2858
+ },
2859
+ "source_filename": {
2860
+ "name": "source_filename",
2861
+ "type": "text",
2862
+ "primaryKey": false,
2863
+ "notNull": false
2864
+ },
2865
+ "source_code": {
2866
+ "name": "source_code",
2867
+ "type": "text",
2868
+ "primaryKey": false,
2869
+ "notNull": false
2870
+ },
2871
+ "definition_snapshot": {
2872
+ "name": "definition_snapshot",
2873
+ "type": "jsonb",
2874
+ "primaryKey": false,
2875
+ "notNull": false
2876
+ },
2877
+ "worker_manifest": {
2878
+ "name": "worker_manifest",
2879
+ "type": "jsonb",
2880
+ "primaryKey": false,
2881
+ "notNull": true
2882
+ },
2883
+ "inputs": {
2884
+ "name": "inputs",
2885
+ "type": "jsonb",
2886
+ "primaryKey": false,
2887
+ "notNull": false
2888
+ },
2889
+ "config": {
2890
+ "name": "config",
2891
+ "type": "jsonb",
2892
+ "primaryKey": false,
2893
+ "notNull": true,
2894
+ "default": "'{}'"
2895
+ },
2896
+ "trigger_payload": {
2897
+ "name": "trigger_payload",
2898
+ "type": "jsonb",
2899
+ "primaryKey": false,
2900
+ "notNull": true
2901
+ },
2902
+ "artifact_ref": {
2903
+ "name": "artifact_ref",
2904
+ "type": "jsonb",
2905
+ "primaryKey": false,
2906
+ "notNull": false
2907
+ },
2908
+ "execution_hints": {
2909
+ "name": "execution_hints",
2910
+ "type": "jsonb",
2911
+ "primaryKey": false,
2912
+ "notNull": false
2913
+ },
2914
+ "dispatch_metadata": {
2915
+ "name": "dispatch_metadata",
2916
+ "type": "jsonb",
2917
+ "primaryKey": false,
2918
+ "notNull": false
2919
+ },
2920
+ "scope_type": {
2921
+ "name": "scope_type",
2922
+ "type": "text",
2923
+ "primaryKey": false,
2924
+ "notNull": true,
2925
+ "default": "'global'"
2926
+ },
2927
+ "scope_kind": {
2928
+ "name": "scope_kind",
2929
+ "type": "text",
2930
+ "primaryKey": false,
2931
+ "notNull": true,
2932
+ "default": "''"
2933
+ },
2934
+ "scope_id": {
2935
+ "name": "scope_id",
2936
+ "type": "text",
2937
+ "primaryKey": false,
2938
+ "notNull": true,
2939
+ "default": "''"
2940
+ },
2941
+ "cancel_subject": {
2942
+ "name": "cancel_subject",
2943
+ "type": "text",
2944
+ "primaryKey": false,
2945
+ "notNull": true
2946
+ },
2947
+ "context": {
2948
+ "name": "context",
2949
+ "type": "jsonb",
2950
+ "primaryKey": false,
2951
+ "notNull": true
2952
+ },
2953
+ "env": {
2954
+ "name": "env",
2955
+ "type": "jsonb",
2956
+ "primaryKey": false,
2957
+ "notNull": true
2958
+ },
2959
+ "created_at": {
2960
+ "name": "created_at",
2961
+ "type": "bigint",
2962
+ "primaryKey": false,
2963
+ "notNull": true
2964
+ },
2965
+ "suspension_strategy": {
2966
+ "name": "suspension_strategy",
2967
+ "type": "text",
2968
+ "primaryKey": false,
2969
+ "notNull": false
2970
+ }
2971
+ },
2972
+ "indexes": {
2973
+ "idx_run_contexts_workflow": {
2974
+ "name": "idx_run_contexts_workflow",
2975
+ "columns": [
2976
+ {
2977
+ "expression": "workflow_id",
2978
+ "isExpression": false,
2979
+ "asc": true,
2980
+ "nulls": "last"
2981
+ }
2982
+ ],
2983
+ "isUnique": false,
2984
+ "concurrently": false,
2985
+ "method": "btree",
2986
+ "with": {}
2987
+ }
2988
+ },
2989
+ "foreignKeys": {
2990
+ "workflow_run_contexts_execution_id_workflow_executions_id_fk": {
2991
+ "name": "workflow_run_contexts_execution_id_workflow_executions_id_fk",
2992
+ "tableFrom": "workflow_run_contexts",
2993
+ "tableTo": "workflow_executions",
2994
+ "columnsFrom": ["execution_id"],
2995
+ "columnsTo": ["id"],
2996
+ "onDelete": "cascade",
2997
+ "onUpdate": "no action"
2998
+ }
2999
+ },
3000
+ "compositePrimaryKeys": {},
3001
+ "uniqueConstraints": {},
3002
+ "policies": {},
3003
+ "checkConstraints": {},
3004
+ "isRLSEnabled": false
3005
+ },
3006
+ "public.workflow_step_spans": {
3007
+ "name": "workflow_step_spans",
3008
+ "schema": "",
3009
+ "columns": {
3010
+ "execution_id": {
3011
+ "name": "execution_id",
3012
+ "type": "text",
3013
+ "primaryKey": false,
3014
+ "notNull": true
3015
+ },
3016
+ "frame_id": {
3017
+ "name": "frame_id",
3018
+ "type": "text",
3019
+ "primaryKey": false,
3020
+ "notNull": true
3021
+ },
3022
+ "step_id": {
3023
+ "name": "step_id",
3024
+ "type": "text",
3025
+ "primaryKey": false,
3026
+ "notNull": true
3027
+ },
3028
+ "step_type": {
3029
+ "name": "step_type",
3030
+ "type": "text",
3031
+ "primaryKey": false,
3032
+ "notNull": true
3033
+ },
3034
+ "status": {
3035
+ "name": "status",
3036
+ "type": "text",
3037
+ "primaryKey": false,
3038
+ "notNull": true
3039
+ },
3040
+ "started_at": {
3041
+ "name": "started_at",
3042
+ "type": "bigint",
3043
+ "primaryKey": false,
3044
+ "notNull": false
3045
+ },
3046
+ "completed_at": {
3047
+ "name": "completed_at",
3048
+ "type": "bigint",
3049
+ "primaryKey": false,
3050
+ "notNull": false
3051
+ },
3052
+ "duration_ms": {
3053
+ "name": "duration_ms",
3054
+ "type": "integer",
3055
+ "primaryKey": false,
3056
+ "notNull": false
3057
+ },
3058
+ "input_tokens": {
3059
+ "name": "input_tokens",
3060
+ "type": "integer",
3061
+ "primaryKey": false,
3062
+ "notNull": false
3063
+ },
3064
+ "output_tokens": {
3065
+ "name": "output_tokens",
3066
+ "type": "integer",
3067
+ "primaryKey": false,
3068
+ "notNull": false
3069
+ },
3070
+ "estimated_cost": {
3071
+ "name": "estimated_cost",
3072
+ "type": "double precision",
3073
+ "primaryKey": false,
3074
+ "notNull": false
3075
+ },
3076
+ "tool_call_count": {
3077
+ "name": "tool_call_count",
3078
+ "type": "integer",
3079
+ "primaryKey": false,
3080
+ "notNull": false
3081
+ },
3082
+ "input": {
3083
+ "name": "input",
3084
+ "type": "text",
3085
+ "primaryKey": false,
3086
+ "notNull": false
3087
+ },
3088
+ "output": {
3089
+ "name": "output",
3090
+ "type": "text",
3091
+ "primaryKey": false,
3092
+ "notNull": false
3093
+ }
3094
+ },
3095
+ "indexes": {
3096
+ "idx_workflow_step_spans_status": {
3097
+ "name": "idx_workflow_step_spans_status",
3098
+ "columns": [
3099
+ {
3100
+ "expression": "status",
3101
+ "isExpression": false,
3102
+ "asc": true,
3103
+ "nulls": "last"
3104
+ }
3105
+ ],
3106
+ "isUnique": false,
3107
+ "concurrently": false,
3108
+ "method": "btree",
3109
+ "with": {}
3110
+ }
3111
+ },
3112
+ "foreignKeys": {
3113
+ "workflow_step_spans_execution_id_workflow_executions_id_fk": {
3114
+ "name": "workflow_step_spans_execution_id_workflow_executions_id_fk",
3115
+ "tableFrom": "workflow_step_spans",
3116
+ "tableTo": "workflow_executions",
3117
+ "columnsFrom": ["execution_id"],
3118
+ "columnsTo": ["id"],
3119
+ "onDelete": "cascade",
3120
+ "onUpdate": "no action"
3121
+ }
3122
+ },
3123
+ "compositePrimaryKeys": {
3124
+ "workflow_step_spans_execution_id_frame_id_pk": {
3125
+ "name": "workflow_step_spans_execution_id_frame_id_pk",
3126
+ "columns": ["execution_id", "frame_id"]
3127
+ }
3128
+ },
3129
+ "uniqueConstraints": {},
3130
+ "policies": {},
3131
+ "checkConstraints": {},
3132
+ "isRLSEnabled": false
3133
+ },
3134
+ "public.worklog_artifact_writes": {
3135
+ "name": "worklog_artifact_writes",
3136
+ "schema": "",
3137
+ "columns": {
3138
+ "id": {
3139
+ "name": "id",
3140
+ "type": "text",
3141
+ "primaryKey": true,
3142
+ "notNull": true
3143
+ },
3144
+ "execution_id": {
3145
+ "name": "execution_id",
3146
+ "type": "text",
3147
+ "primaryKey": false,
3148
+ "notNull": true
3149
+ },
3150
+ "frame_id": {
3151
+ "name": "frame_id",
3152
+ "type": "text",
3153
+ "primaryKey": false,
3154
+ "notNull": true
3155
+ },
3156
+ "node_id": {
3157
+ "name": "node_id",
3158
+ "type": "text",
3159
+ "primaryKey": false,
3160
+ "notNull": true
3161
+ },
3162
+ "artifact": {
3163
+ "name": "artifact",
3164
+ "type": "jsonb",
3165
+ "primaryKey": false,
3166
+ "notNull": true
3167
+ },
3168
+ "revision": {
3169
+ "name": "revision",
3170
+ "type": "text",
3171
+ "primaryKey": false,
3172
+ "notNull": false
3173
+ },
3174
+ "written_at": {
3175
+ "name": "written_at",
3176
+ "type": "bigint",
3177
+ "primaryKey": false,
3178
+ "notNull": true
3179
+ }
3180
+ },
3181
+ "indexes": {
3182
+ "idx_worklog_artifact_writes_execution": {
3183
+ "name": "idx_worklog_artifact_writes_execution",
3184
+ "columns": [
3185
+ {
3186
+ "expression": "execution_id",
3187
+ "isExpression": false,
3188
+ "asc": true,
3189
+ "nulls": "last"
3190
+ }
3191
+ ],
3192
+ "isUnique": false,
3193
+ "concurrently": false,
3194
+ "method": "btree",
3195
+ "with": {}
3196
+ }
3197
+ },
3198
+ "foreignKeys": {
3199
+ "worklog_artifact_writes_execution_id_workflow_executions_id_fk": {
3200
+ "name": "worklog_artifact_writes_execution_id_workflow_executions_id_fk",
3201
+ "tableFrom": "worklog_artifact_writes",
3202
+ "tableTo": "workflow_executions",
3203
+ "columnsFrom": ["execution_id"],
3204
+ "columnsTo": ["id"],
3205
+ "onDelete": "cascade",
3206
+ "onUpdate": "no action"
3207
+ }
3208
+ },
3209
+ "compositePrimaryKeys": {},
3210
+ "uniqueConstraints": {},
3211
+ "policies": {},
3212
+ "checkConstraints": {},
3213
+ "isRLSEnabled": false
3214
+ },
3215
+ "public.worklog_frame_entries": {
3216
+ "name": "worklog_frame_entries",
3217
+ "schema": "",
3218
+ "columns": {
3219
+ "frame_id": {
3220
+ "name": "frame_id",
3221
+ "type": "text",
3222
+ "primaryKey": true,
3223
+ "notNull": true
3224
+ },
3225
+ "execution_id": {
3226
+ "name": "execution_id",
3227
+ "type": "text",
3228
+ "primaryKey": false,
3229
+ "notNull": true
3230
+ },
3231
+ "node_id": {
3232
+ "name": "node_id",
3233
+ "type": "text",
3234
+ "primaryKey": false,
3235
+ "notNull": true
3236
+ },
3237
+ "node_type": {
3238
+ "name": "node_type",
3239
+ "type": "text",
3240
+ "primaryKey": false,
3241
+ "notNull": true
3242
+ },
3243
+ "path": {
3244
+ "name": "path",
3245
+ "type": "jsonb",
3246
+ "primaryKey": false,
3247
+ "notNull": true
3248
+ },
3249
+ "status": {
3250
+ "name": "status",
3251
+ "type": "text",
3252
+ "primaryKey": false,
3253
+ "notNull": true
3254
+ },
3255
+ "attempt": {
3256
+ "name": "attempt",
3257
+ "type": "integer",
3258
+ "primaryKey": false,
3259
+ "notNull": true,
3260
+ "default": 0
3261
+ },
3262
+ "iteration": {
3263
+ "name": "iteration",
3264
+ "type": "integer",
3265
+ "primaryKey": false,
3266
+ "notNull": false
3267
+ },
3268
+ "branch_key": {
3269
+ "name": "branch_key",
3270
+ "type": "text",
3271
+ "primaryKey": false,
3272
+ "notNull": false
3273
+ },
3274
+ "started_at": {
3275
+ "name": "started_at",
3276
+ "type": "bigint",
3277
+ "primaryKey": false,
3278
+ "notNull": false
3279
+ },
3280
+ "completed_at": {
3281
+ "name": "completed_at",
3282
+ "type": "bigint",
3283
+ "primaryKey": false,
3284
+ "notNull": false
3285
+ },
3286
+ "duration_ms": {
3287
+ "name": "duration_ms",
3288
+ "type": "integer",
3289
+ "primaryKey": false,
3290
+ "notNull": false
3291
+ },
3292
+ "input_tokens": {
3293
+ "name": "input_tokens",
3294
+ "type": "integer",
3295
+ "primaryKey": false,
3296
+ "notNull": false
3297
+ },
3298
+ "output_tokens": {
3299
+ "name": "output_tokens",
3300
+ "type": "integer",
3301
+ "primaryKey": false,
3302
+ "notNull": false
3303
+ },
3304
+ "estimated_cost": {
3305
+ "name": "estimated_cost",
3306
+ "type": "double precision",
3307
+ "primaryKey": false,
3308
+ "notNull": false
3309
+ },
3310
+ "error": {
3311
+ "name": "error",
3312
+ "type": "text",
3313
+ "primaryKey": false,
3314
+ "notNull": false
3315
+ }
3316
+ },
3317
+ "indexes": {
3318
+ "idx_worklog_frame_entries_execution": {
3319
+ "name": "idx_worklog_frame_entries_execution",
3320
+ "columns": [
3321
+ {
3322
+ "expression": "execution_id",
3323
+ "isExpression": false,
3324
+ "asc": true,
3325
+ "nulls": "last"
3326
+ }
3327
+ ],
3328
+ "isUnique": false,
3329
+ "concurrently": false,
3330
+ "method": "btree",
3331
+ "with": {}
3332
+ }
3333
+ },
3334
+ "foreignKeys": {
3335
+ "worklog_frame_entries_execution_id_workflow_executions_id_fk": {
3336
+ "name": "worklog_frame_entries_execution_id_workflow_executions_id_fk",
3337
+ "tableFrom": "worklog_frame_entries",
3338
+ "tableTo": "workflow_executions",
3339
+ "columnsFrom": ["execution_id"],
3340
+ "columnsTo": ["id"],
3341
+ "onDelete": "cascade",
3342
+ "onUpdate": "no action"
3343
+ }
3344
+ },
3345
+ "compositePrimaryKeys": {},
3346
+ "uniqueConstraints": {},
3347
+ "policies": {},
3348
+ "checkConstraints": {},
3349
+ "isRLSEnabled": false
3350
+ },
3351
+ "public.worklog_gate_events": {
3352
+ "name": "worklog_gate_events",
3353
+ "schema": "",
3354
+ "columns": {
3355
+ "id": {
3356
+ "name": "id",
3357
+ "type": "text",
3358
+ "primaryKey": true,
3359
+ "notNull": true
3360
+ },
3361
+ "execution_id": {
3362
+ "name": "execution_id",
3363
+ "type": "text",
3364
+ "primaryKey": false,
3365
+ "notNull": true
3366
+ },
3367
+ "node_id": {
3368
+ "name": "node_id",
3369
+ "type": "text",
3370
+ "primaryKey": false,
3371
+ "notNull": true
3372
+ },
3373
+ "frame_id": {
3374
+ "name": "frame_id",
3375
+ "type": "text",
3376
+ "primaryKey": false,
3377
+ "notNull": true
3378
+ },
3379
+ "status": {
3380
+ "name": "status",
3381
+ "type": "text",
3382
+ "primaryKey": false,
3383
+ "notNull": true
3384
+ },
3385
+ "prompt": {
3386
+ "name": "prompt",
3387
+ "type": "text",
3388
+ "primaryKey": false,
3389
+ "notNull": false
3390
+ },
3391
+ "opened_at": {
3392
+ "name": "opened_at",
3393
+ "type": "bigint",
3394
+ "primaryKey": false,
3395
+ "notNull": true
3396
+ },
3397
+ "resolved_at": {
3398
+ "name": "resolved_at",
3399
+ "type": "bigint",
3400
+ "primaryKey": false,
3401
+ "notNull": false
3402
+ },
3403
+ "resume_data": {
3404
+ "name": "resume_data",
3405
+ "type": "jsonb",
3406
+ "primaryKey": false,
3407
+ "notNull": false
3408
+ }
3409
+ },
3410
+ "indexes": {
3411
+ "idx_worklog_gate_events_execution": {
3412
+ "name": "idx_worklog_gate_events_execution",
3413
+ "columns": [
3414
+ {
3415
+ "expression": "execution_id",
3416
+ "isExpression": false,
3417
+ "asc": true,
3418
+ "nulls": "last"
3419
+ }
3420
+ ],
3421
+ "isUnique": false,
3422
+ "concurrently": false,
3423
+ "method": "btree",
3424
+ "with": {}
3425
+ },
3426
+ "idx_worklog_gate_events_status": {
3427
+ "name": "idx_worklog_gate_events_status",
3428
+ "columns": [
3429
+ {
3430
+ "expression": "status",
3431
+ "isExpression": false,
3432
+ "asc": true,
3433
+ "nulls": "last"
3434
+ }
3435
+ ],
3436
+ "isUnique": false,
3437
+ "concurrently": false,
3438
+ "method": "btree",
3439
+ "with": {}
3440
+ }
3441
+ },
3442
+ "foreignKeys": {
3443
+ "worklog_gate_events_execution_id_workflow_executions_id_fk": {
3444
+ "name": "worklog_gate_events_execution_id_workflow_executions_id_fk",
3445
+ "tableFrom": "worklog_gate_events",
3446
+ "tableTo": "workflow_executions",
3447
+ "columnsFrom": ["execution_id"],
3448
+ "columnsTo": ["id"],
3449
+ "onDelete": "cascade",
3450
+ "onUpdate": "no action"
3451
+ }
3452
+ },
3453
+ "compositePrimaryKeys": {},
3454
+ "uniqueConstraints": {},
3455
+ "policies": {},
3456
+ "checkConstraints": {},
3457
+ "isRLSEnabled": false
3458
+ },
3459
+ "public.worklog_summaries": {
3460
+ "name": "worklog_summaries",
3461
+ "schema": "",
3462
+ "columns": {
3463
+ "execution_id": {
3464
+ "name": "execution_id",
3465
+ "type": "text",
3466
+ "primaryKey": true,
3467
+ "notNull": true
3468
+ },
3469
+ "workflow_id": {
3470
+ "name": "workflow_id",
3471
+ "type": "text",
3472
+ "primaryKey": false,
3473
+ "notNull": true
3474
+ },
3475
+ "workflow_name": {
3476
+ "name": "workflow_name",
3477
+ "type": "text",
3478
+ "primaryKey": false,
3479
+ "notNull": false
3480
+ },
3481
+ "status": {
3482
+ "name": "status",
3483
+ "type": "text",
3484
+ "primaryKey": false,
3485
+ "notNull": true
3486
+ },
3487
+ "started_at": {
3488
+ "name": "started_at",
3489
+ "type": "bigint",
3490
+ "primaryKey": false,
3491
+ "notNull": true
3492
+ },
3493
+ "completed_at": {
3494
+ "name": "completed_at",
3495
+ "type": "bigint",
3496
+ "primaryKey": false,
3497
+ "notNull": false
3498
+ },
3499
+ "duration_ms": {
3500
+ "name": "duration_ms",
3501
+ "type": "integer",
3502
+ "primaryKey": false,
3503
+ "notNull": false
3504
+ },
3505
+ "total_input_tokens": {
3506
+ "name": "total_input_tokens",
3507
+ "type": "integer",
3508
+ "primaryKey": false,
3509
+ "notNull": false
3510
+ },
3511
+ "total_output_tokens": {
3512
+ "name": "total_output_tokens",
3513
+ "type": "integer",
3514
+ "primaryKey": false,
3515
+ "notNull": false
3516
+ },
3517
+ "total_estimated_cost": {
3518
+ "name": "total_estimated_cost",
3519
+ "type": "double precision",
3520
+ "primaryKey": false,
3521
+ "notNull": false
3522
+ },
3523
+ "error": {
3524
+ "name": "error",
3525
+ "type": "text",
3526
+ "primaryKey": false,
3527
+ "notNull": false
3528
+ },
3529
+ "failed_node_id": {
3530
+ "name": "failed_node_id",
3531
+ "type": "text",
3532
+ "primaryKey": false,
3533
+ "notNull": false
3534
+ }
3535
+ },
3536
+ "indexes": {
3537
+ "idx_worklog_summaries_workflow_started": {
3538
+ "name": "idx_worklog_summaries_workflow_started",
3539
+ "columns": [
3540
+ {
3541
+ "expression": "workflow_id",
3542
+ "isExpression": false,
3543
+ "asc": true,
3544
+ "nulls": "last"
3545
+ },
3546
+ {
3547
+ "expression": "started_at",
3548
+ "isExpression": false,
3549
+ "asc": true,
3550
+ "nulls": "last"
3551
+ }
3552
+ ],
3553
+ "isUnique": false,
3554
+ "concurrently": false,
3555
+ "method": "btree",
3556
+ "with": {}
3557
+ },
3558
+ "idx_worklog_summaries_status": {
3559
+ "name": "idx_worklog_summaries_status",
3560
+ "columns": [
3561
+ {
3562
+ "expression": "status",
3563
+ "isExpression": false,
3564
+ "asc": true,
3565
+ "nulls": "last"
3566
+ }
3567
+ ],
3568
+ "isUnique": false,
3569
+ "concurrently": false,
3570
+ "method": "btree",
3571
+ "with": {}
3572
+ }
3573
+ },
3574
+ "foreignKeys": {
3575
+ "worklog_summaries_execution_id_workflow_executions_id_fk": {
3576
+ "name": "worklog_summaries_execution_id_workflow_executions_id_fk",
3577
+ "tableFrom": "worklog_summaries",
3578
+ "tableTo": "workflow_executions",
3579
+ "columnsFrom": ["execution_id"],
3580
+ "columnsTo": ["id"],
3581
+ "onDelete": "cascade",
3582
+ "onUpdate": "no action"
3583
+ }
3584
+ },
3585
+ "compositePrimaryKeys": {},
3586
+ "uniqueConstraints": {},
3587
+ "policies": {},
3588
+ "checkConstraints": {},
3589
+ "isRLSEnabled": false
3590
+ }
3591
+ },
3592
+ "enums": {},
3593
+ "schemas": {},
3594
+ "sequences": {},
3595
+ "roles": {},
3596
+ "policies": {},
3597
+ "views": {},
3598
+ "_meta": {
3599
+ "columns": {},
3600
+ "schemas": {},
3601
+ "tables": {}
3602
+ }
3603
+ }