@makaio/storage-pg 1.0.0-dev-1781260968078

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,3422 @@
1
+ {
2
+ "id": "f03bd0e6-e4b4-4119-9451-32afff77c8c7",
3
+ "prevId": "33df77ff-bdb8-4bcd-a20d-8dd872414385",
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
+ "idx_messages_adapter_message_id": {
523
+ "name": "idx_messages_adapter_message_id",
524
+ "columns": [
525
+ {
526
+ "expression": "adapter_message_id",
527
+ "isExpression": false,
528
+ "asc": true,
529
+ "nulls": "last"
530
+ }
531
+ ],
532
+ "isUnique": false,
533
+ "concurrently": false,
534
+ "method": "btree",
535
+ "with": {}
536
+ },
537
+ "idx_messages_content_tsv": {
538
+ "name": "idx_messages_content_tsv",
539
+ "columns": [
540
+ {
541
+ "expression": "content_tsv",
542
+ "isExpression": false,
543
+ "asc": true,
544
+ "nulls": "last"
545
+ }
546
+ ],
547
+ "isUnique": false,
548
+ "concurrently": false,
549
+ "method": "gin",
550
+ "with": {}
551
+ }
552
+ },
553
+ "foreignKeys": {
554
+ "messages_turn_id_turns_turn_id_fk": {
555
+ "name": "messages_turn_id_turns_turn_id_fk",
556
+ "tableFrom": "messages",
557
+ "tableTo": "turns",
558
+ "columnsFrom": ["turn_id"],
559
+ "columnsTo": ["turn_id"],
560
+ "onDelete": "cascade",
561
+ "onUpdate": "no action"
562
+ },
563
+ "messages_session_id_sessions_session_id_fk": {
564
+ "name": "messages_session_id_sessions_session_id_fk",
565
+ "tableFrom": "messages",
566
+ "tableTo": "sessions",
567
+ "columnsFrom": ["session_id"],
568
+ "columnsTo": ["session_id"],
569
+ "onDelete": "cascade",
570
+ "onUpdate": "no action"
571
+ },
572
+ "messages_edit_of_messages_message_id_fk": {
573
+ "name": "messages_edit_of_messages_message_id_fk",
574
+ "tableFrom": "messages",
575
+ "tableTo": "messages",
576
+ "columnsFrom": ["edit_of"],
577
+ "columnsTo": ["message_id"],
578
+ "onDelete": "no action",
579
+ "onUpdate": "no action"
580
+ }
581
+ },
582
+ "compositePrimaryKeys": {},
583
+ "uniqueConstraints": {},
584
+ "policies": {},
585
+ "checkConstraints": {},
586
+ "isRLSEnabled": false
587
+ },
588
+ "public.session_events": {
589
+ "name": "session_events",
590
+ "schema": "",
591
+ "columns": {
592
+ "id": {
593
+ "name": "id",
594
+ "type": "bigint",
595
+ "primaryKey": true,
596
+ "notNull": true,
597
+ "identity": {
598
+ "type": "always",
599
+ "name": "session_events_id_seq",
600
+ "schema": "public",
601
+ "increment": "1",
602
+ "startWith": "1",
603
+ "minValue": "1",
604
+ "maxValue": "9223372036854775807",
605
+ "cache": "1",
606
+ "cycle": false
607
+ }
608
+ },
609
+ "session_id": {
610
+ "name": "session_id",
611
+ "type": "text",
612
+ "primaryKey": false,
613
+ "notNull": true
614
+ },
615
+ "event_id": {
616
+ "name": "event_id",
617
+ "type": "text",
618
+ "primaryKey": false,
619
+ "notNull": true
620
+ },
621
+ "timestamp": {
622
+ "name": "timestamp",
623
+ "type": "bigint",
624
+ "primaryKey": false,
625
+ "notNull": true
626
+ },
627
+ "type": {
628
+ "name": "type",
629
+ "type": "text",
630
+ "primaryKey": false,
631
+ "notNull": true
632
+ },
633
+ "agent_id": {
634
+ "name": "agent_id",
635
+ "type": "text",
636
+ "primaryKey": false,
637
+ "notNull": false
638
+ },
639
+ "adapter_id": {
640
+ "name": "adapter_id",
641
+ "type": "text",
642
+ "primaryKey": false,
643
+ "notNull": false
644
+ },
645
+ "originating_message_id": {
646
+ "name": "originating_message_id",
647
+ "type": "text",
648
+ "primaryKey": false,
649
+ "notNull": false
650
+ },
651
+ "message_id": {
652
+ "name": "message_id",
653
+ "type": "text",
654
+ "primaryKey": false,
655
+ "notNull": false
656
+ },
657
+ "turn_id": {
658
+ "name": "turn_id",
659
+ "type": "text",
660
+ "primaryKey": false,
661
+ "notNull": false
662
+ },
663
+ "content_text": {
664
+ "name": "content_text",
665
+ "type": "text",
666
+ "primaryKey": false,
667
+ "notNull": false
668
+ },
669
+ "payload": {
670
+ "name": "payload",
671
+ "type": "text",
672
+ "primaryKey": false,
673
+ "notNull": true
674
+ }
675
+ },
676
+ "indexes": {
677
+ "idx_events_session_ts": {
678
+ "name": "idx_events_session_ts",
679
+ "columns": [
680
+ {
681
+ "expression": "session_id",
682
+ "isExpression": false,
683
+ "asc": true,
684
+ "nulls": "last"
685
+ },
686
+ {
687
+ "expression": "timestamp",
688
+ "isExpression": false,
689
+ "asc": true,
690
+ "nulls": "last"
691
+ }
692
+ ],
693
+ "isUnique": false,
694
+ "concurrently": false,
695
+ "method": "btree",
696
+ "with": {}
697
+ },
698
+ "idx_events_session_type": {
699
+ "name": "idx_events_session_type",
700
+ "columns": [
701
+ {
702
+ "expression": "session_id",
703
+ "isExpression": false,
704
+ "asc": true,
705
+ "nulls": "last"
706
+ },
707
+ {
708
+ "expression": "type",
709
+ "isExpression": false,
710
+ "asc": true,
711
+ "nulls": "last"
712
+ }
713
+ ],
714
+ "isUnique": false,
715
+ "concurrently": false,
716
+ "method": "btree",
717
+ "with": {}
718
+ },
719
+ "idx_events_turn": {
720
+ "name": "idx_events_turn",
721
+ "columns": [
722
+ {
723
+ "expression": "turn_id",
724
+ "isExpression": false,
725
+ "asc": true,
726
+ "nulls": "last"
727
+ }
728
+ ],
729
+ "isUnique": false,
730
+ "concurrently": false,
731
+ "method": "btree",
732
+ "with": {}
733
+ },
734
+ "idx_events_originating_message": {
735
+ "name": "idx_events_originating_message",
736
+ "columns": [
737
+ {
738
+ "expression": "originating_message_id",
739
+ "isExpression": false,
740
+ "asc": true,
741
+ "nulls": "last"
742
+ }
743
+ ],
744
+ "isUnique": false,
745
+ "concurrently": false,
746
+ "method": "btree",
747
+ "with": {}
748
+ }
749
+ },
750
+ "foreignKeys": {
751
+ "session_events_session_id_sessions_session_id_fk": {
752
+ "name": "session_events_session_id_sessions_session_id_fk",
753
+ "tableFrom": "session_events",
754
+ "tableTo": "sessions",
755
+ "columnsFrom": ["session_id"],
756
+ "columnsTo": ["session_id"],
757
+ "onDelete": "cascade",
758
+ "onUpdate": "no action"
759
+ },
760
+ "session_events_message_id_messages_message_id_fk": {
761
+ "name": "session_events_message_id_messages_message_id_fk",
762
+ "tableFrom": "session_events",
763
+ "tableTo": "messages",
764
+ "columnsFrom": ["message_id"],
765
+ "columnsTo": ["message_id"],
766
+ "onDelete": "cascade",
767
+ "onUpdate": "no action"
768
+ }
769
+ },
770
+ "compositePrimaryKeys": {},
771
+ "uniqueConstraints": {
772
+ "session_events_event_id_unique": {
773
+ "name": "session_events_event_id_unique",
774
+ "nullsNotDistinct": false,
775
+ "columns": ["event_id"]
776
+ }
777
+ },
778
+ "policies": {},
779
+ "checkConstraints": {},
780
+ "isRLSEnabled": false
781
+ },
782
+ "public.agents": {
783
+ "name": "agents",
784
+ "schema": "",
785
+ "columns": {
786
+ "agent_id": {
787
+ "name": "agent_id",
788
+ "type": "text",
789
+ "primaryKey": true,
790
+ "notNull": true
791
+ },
792
+ "adapter_id": {
793
+ "name": "adapter_id",
794
+ "type": "text",
795
+ "primaryKey": false,
796
+ "notNull": true
797
+ },
798
+ "adapter_name": {
799
+ "name": "adapter_name",
800
+ "type": "text",
801
+ "primaryKey": false,
802
+ "notNull": true
803
+ },
804
+ "session_id": {
805
+ "name": "session_id",
806
+ "type": "text",
807
+ "primaryKey": false,
808
+ "notNull": true
809
+ },
810
+ "adapter_session_id": {
811
+ "name": "adapter_session_id",
812
+ "type": "text",
813
+ "primaryKey": false,
814
+ "notNull": false
815
+ },
816
+ "model": {
817
+ "name": "model",
818
+ "type": "text",
819
+ "primaryKey": false,
820
+ "notNull": false
821
+ },
822
+ "cwd": {
823
+ "name": "cwd",
824
+ "type": "text",
825
+ "primaryKey": false,
826
+ "notNull": false
827
+ },
828
+ "provider_config_id": {
829
+ "name": "provider_config_id",
830
+ "type": "text",
831
+ "primaryKey": false,
832
+ "notNull": false
833
+ },
834
+ "persona_id": {
835
+ "name": "persona_id",
836
+ "type": "text",
837
+ "primaryKey": false,
838
+ "notNull": false
839
+ },
840
+ "profile_id": {
841
+ "name": "profile_id",
842
+ "type": "text",
843
+ "primaryKey": false,
844
+ "notNull": false
845
+ },
846
+ "harness_id": {
847
+ "name": "harness_id",
848
+ "type": "text",
849
+ "primaryKey": false,
850
+ "notNull": false
851
+ },
852
+ "client_id": {
853
+ "name": "client_id",
854
+ "type": "text",
855
+ "primaryKey": false,
856
+ "notNull": false
857
+ },
858
+ "compression_mode": {
859
+ "name": "compression_mode",
860
+ "type": "text",
861
+ "primaryKey": false,
862
+ "notNull": false
863
+ },
864
+ "role": {
865
+ "name": "role",
866
+ "type": "text",
867
+ "primaryKey": false,
868
+ "notNull": true
869
+ },
870
+ "status": {
871
+ "name": "status",
872
+ "type": "text",
873
+ "primaryKey": false,
874
+ "notNull": true
875
+ },
876
+ "created_at": {
877
+ "name": "created_at",
878
+ "type": "bigint",
879
+ "primaryKey": false,
880
+ "notNull": true
881
+ },
882
+ "last_activity_at": {
883
+ "name": "last_activity_at",
884
+ "type": "bigint",
885
+ "primaryKey": false,
886
+ "notNull": true
887
+ }
888
+ },
889
+ "indexes": {
890
+ "agents_session_id_idx": {
891
+ "name": "agents_session_id_idx",
892
+ "columns": [
893
+ {
894
+ "expression": "session_id",
895
+ "isExpression": false,
896
+ "asc": true,
897
+ "nulls": "last"
898
+ }
899
+ ],
900
+ "isUnique": false,
901
+ "concurrently": false,
902
+ "method": "btree",
903
+ "with": {}
904
+ },
905
+ "agents_adapter_name_idx": {
906
+ "name": "agents_adapter_name_idx",
907
+ "columns": [
908
+ {
909
+ "expression": "adapter_name",
910
+ "isExpression": false,
911
+ "asc": true,
912
+ "nulls": "last"
913
+ }
914
+ ],
915
+ "isUnique": false,
916
+ "concurrently": false,
917
+ "method": "btree",
918
+ "with": {}
919
+ },
920
+ "agents_status_idx": {
921
+ "name": "agents_status_idx",
922
+ "columns": [
923
+ {
924
+ "expression": "status",
925
+ "isExpression": false,
926
+ "asc": true,
927
+ "nulls": "last"
928
+ }
929
+ ],
930
+ "isUnique": false,
931
+ "concurrently": false,
932
+ "method": "btree",
933
+ "with": {}
934
+ },
935
+ "agents_client_id_idx": {
936
+ "name": "agents_client_id_idx",
937
+ "columns": [
938
+ {
939
+ "expression": "client_id",
940
+ "isExpression": false,
941
+ "asc": true,
942
+ "nulls": "last"
943
+ }
944
+ ],
945
+ "isUnique": false,
946
+ "concurrently": false,
947
+ "method": "btree",
948
+ "with": {}
949
+ }
950
+ },
951
+ "foreignKeys": {
952
+ "agents_session_id_sessions_session_id_fk": {
953
+ "name": "agents_session_id_sessions_session_id_fk",
954
+ "tableFrom": "agents",
955
+ "tableTo": "sessions",
956
+ "columnsFrom": ["session_id"],
957
+ "columnsTo": ["session_id"],
958
+ "onDelete": "cascade",
959
+ "onUpdate": "no action"
960
+ }
961
+ },
962
+ "compositePrimaryKeys": {},
963
+ "uniqueConstraints": {},
964
+ "policies": {},
965
+ "checkConstraints": {},
966
+ "isRLSEnabled": false
967
+ },
968
+ "public.sessions": {
969
+ "name": "sessions",
970
+ "schema": "",
971
+ "columns": {
972
+ "session_id": {
973
+ "name": "session_id",
974
+ "type": "text",
975
+ "primaryKey": true,
976
+ "notNull": true
977
+ },
978
+ "created_at": {
979
+ "name": "created_at",
980
+ "type": "bigint",
981
+ "primaryKey": false,
982
+ "notNull": true
983
+ },
984
+ "last_activity_at": {
985
+ "name": "last_activity_at",
986
+ "type": "bigint",
987
+ "primaryKey": false,
988
+ "notNull": true
989
+ },
990
+ "status": {
991
+ "name": "status",
992
+ "type": "text",
993
+ "primaryKey": false,
994
+ "notNull": true
995
+ },
996
+ "lead_agent_id": {
997
+ "name": "lead_agent_id",
998
+ "type": "text",
999
+ "primaryKey": false,
1000
+ "notNull": false
1001
+ },
1002
+ "parent_session_id": {
1003
+ "name": "parent_session_id",
1004
+ "type": "text",
1005
+ "primaryKey": false,
1006
+ "notNull": false
1007
+ },
1008
+ "context_inheritance": {
1009
+ "name": "context_inheritance",
1010
+ "type": "text",
1011
+ "primaryKey": false,
1012
+ "notNull": false
1013
+ },
1014
+ "root_session_id": {
1015
+ "name": "root_session_id",
1016
+ "type": "text",
1017
+ "primaryKey": false,
1018
+ "notNull": false
1019
+ },
1020
+ "fork_point_message_id": {
1021
+ "name": "fork_point_message_id",
1022
+ "type": "text",
1023
+ "primaryKey": false,
1024
+ "notNull": false
1025
+ },
1026
+ "branch_kind": {
1027
+ "name": "branch_kind",
1028
+ "type": "text",
1029
+ "primaryKey": false,
1030
+ "notNull": false
1031
+ },
1032
+ "adapter_name": {
1033
+ "name": "adapter_name",
1034
+ "type": "text",
1035
+ "primaryKey": false,
1036
+ "notNull": false
1037
+ },
1038
+ "adapter_session_id": {
1039
+ "name": "adapter_session_id",
1040
+ "type": "text",
1041
+ "primaryKey": false,
1042
+ "notNull": false
1043
+ },
1044
+ "adapter_id": {
1045
+ "name": "adapter_id",
1046
+ "type": "text",
1047
+ "primaryKey": false,
1048
+ "notNull": false
1049
+ },
1050
+ "client_id": {
1051
+ "name": "client_id",
1052
+ "type": "text",
1053
+ "primaryKey": false,
1054
+ "notNull": false
1055
+ },
1056
+ "client_account_id": {
1057
+ "name": "client_account_id",
1058
+ "type": "text",
1059
+ "primaryKey": false,
1060
+ "notNull": false
1061
+ },
1062
+ "last_client_identity_observation": {
1063
+ "name": "last_client_identity_observation",
1064
+ "type": "text",
1065
+ "primaryKey": false,
1066
+ "notNull": false
1067
+ },
1068
+ "is_orchestrated": {
1069
+ "name": "is_orchestrated",
1070
+ "type": "boolean",
1071
+ "primaryKey": false,
1072
+ "notNull": false,
1073
+ "default": false
1074
+ },
1075
+ "title": {
1076
+ "name": "title",
1077
+ "type": "text",
1078
+ "primaryKey": false,
1079
+ "notNull": false
1080
+ },
1081
+ "summary": {
1082
+ "name": "summary",
1083
+ "type": "text",
1084
+ "primaryKey": false,
1085
+ "notNull": false
1086
+ },
1087
+ "summary_updated_at": {
1088
+ "name": "summary_updated_at",
1089
+ "type": "bigint",
1090
+ "primaryKey": false,
1091
+ "notNull": false
1092
+ },
1093
+ "is_imported": {
1094
+ "name": "is_imported",
1095
+ "type": "boolean",
1096
+ "primaryKey": false,
1097
+ "notNull": false,
1098
+ "default": false
1099
+ },
1100
+ "fork_transforms": {
1101
+ "name": "fork_transforms",
1102
+ "type": "text",
1103
+ "primaryKey": false,
1104
+ "notNull": false
1105
+ },
1106
+ "target_working_directory": {
1107
+ "name": "target_working_directory",
1108
+ "type": "text",
1109
+ "primaryKey": false,
1110
+ "notNull": false
1111
+ },
1112
+ "execution_target_id": {
1113
+ "name": "execution_target_id",
1114
+ "type": "text",
1115
+ "primaryKey": false,
1116
+ "notNull": false
1117
+ },
1118
+ "approval_policy_override": {
1119
+ "name": "approval_policy_override",
1120
+ "type": "text",
1121
+ "primaryKey": false,
1122
+ "notNull": false
1123
+ },
1124
+ "spawning_tool_call_id": {
1125
+ "name": "spawning_tool_call_id",
1126
+ "type": "text",
1127
+ "primaryKey": false,
1128
+ "notNull": false
1129
+ },
1130
+ "source": {
1131
+ "name": "source",
1132
+ "type": "text",
1133
+ "primaryKey": false,
1134
+ "notNull": false
1135
+ },
1136
+ "parent_external_session_id": {
1137
+ "name": "parent_external_session_id",
1138
+ "type": "text",
1139
+ "primaryKey": false,
1140
+ "notNull": false
1141
+ },
1142
+ "log_file_path": {
1143
+ "name": "log_file_path",
1144
+ "type": "text",
1145
+ "primaryKey": false,
1146
+ "notNull": false
1147
+ },
1148
+ "discovered_at": {
1149
+ "name": "discovered_at",
1150
+ "type": "bigint",
1151
+ "primaryKey": false,
1152
+ "notNull": false
1153
+ },
1154
+ "import_status": {
1155
+ "name": "import_status",
1156
+ "type": "text",
1157
+ "primaryKey": false,
1158
+ "notNull": false
1159
+ }
1160
+ },
1161
+ "indexes": {
1162
+ "uniq_sessions_source_adapter_session_id": {
1163
+ "name": "uniq_sessions_source_adapter_session_id",
1164
+ "columns": [
1165
+ {
1166
+ "expression": "source",
1167
+ "isExpression": false,
1168
+ "asc": true,
1169
+ "nulls": "last"
1170
+ },
1171
+ {
1172
+ "expression": "adapter_session_id",
1173
+ "isExpression": false,
1174
+ "asc": true,
1175
+ "nulls": "last"
1176
+ }
1177
+ ],
1178
+ "isUnique": true,
1179
+ "concurrently": false,
1180
+ "method": "btree",
1181
+ "with": {}
1182
+ },
1183
+ "uniq_sessions_log_file_path": {
1184
+ "name": "uniq_sessions_log_file_path",
1185
+ "columns": [
1186
+ {
1187
+ "expression": "log_file_path",
1188
+ "isExpression": false,
1189
+ "asc": true,
1190
+ "nulls": "last"
1191
+ }
1192
+ ],
1193
+ "isUnique": true,
1194
+ "concurrently": false,
1195
+ "method": "btree",
1196
+ "with": {}
1197
+ },
1198
+ "sessions_adapter_session_id_idx": {
1199
+ "name": "sessions_adapter_session_id_idx",
1200
+ "columns": [
1201
+ {
1202
+ "expression": "adapter_session_id",
1203
+ "isExpression": false,
1204
+ "asc": true,
1205
+ "nulls": "last"
1206
+ }
1207
+ ],
1208
+ "isUnique": false,
1209
+ "concurrently": false,
1210
+ "method": "btree",
1211
+ "with": {}
1212
+ },
1213
+ "idx_sessions_import_status": {
1214
+ "name": "idx_sessions_import_status",
1215
+ "columns": [
1216
+ {
1217
+ "expression": "import_status",
1218
+ "isExpression": false,
1219
+ "asc": true,
1220
+ "nulls": "last"
1221
+ }
1222
+ ],
1223
+ "isUnique": false,
1224
+ "concurrently": false,
1225
+ "method": "btree",
1226
+ "with": {}
1227
+ },
1228
+ "sessions_execution_target_id_idx": {
1229
+ "name": "sessions_execution_target_id_idx",
1230
+ "columns": [
1231
+ {
1232
+ "expression": "execution_target_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_parent_session_id": {
1244
+ "name": "idx_sessions_parent_session_id",
1245
+ "columns": [
1246
+ {
1247
+ "expression": "parent_session_id",
1248
+ "isExpression": false,
1249
+ "asc": true,
1250
+ "nulls": "last"
1251
+ }
1252
+ ],
1253
+ "isUnique": false,
1254
+ "concurrently": false,
1255
+ "method": "btree",
1256
+ "with": {}
1257
+ }
1258
+ },
1259
+ "foreignKeys": {},
1260
+ "compositePrimaryKeys": {},
1261
+ "uniqueConstraints": {},
1262
+ "policies": {},
1263
+ "checkConstraints": {
1264
+ "sessions_import_status_check": {
1265
+ "name": "sessions_import_status_check",
1266
+ "value": "\"sessions\".\"import_status\" IS NULL OR \"sessions\".\"import_status\" IN ('discovered', 'imported', 'tracking')"
1267
+ },
1268
+ "sessions_context_inheritance_check": {
1269
+ "name": "sessions_context_inheritance_check",
1270
+ "value": "\"sessions\".\"context_inheritance\" IS NULL OR \"sessions\".\"context_inheritance\" IN ('parent-history', 'none')"
1271
+ }
1272
+ },
1273
+ "isRLSEnabled": false
1274
+ },
1275
+ "public.turns": {
1276
+ "name": "turns",
1277
+ "schema": "",
1278
+ "columns": {
1279
+ "turn_id": {
1280
+ "name": "turn_id",
1281
+ "type": "text",
1282
+ "primaryKey": true,
1283
+ "notNull": true
1284
+ },
1285
+ "session_id": {
1286
+ "name": "session_id",
1287
+ "type": "text",
1288
+ "primaryKey": false,
1289
+ "notNull": true
1290
+ },
1291
+ "turn_number": {
1292
+ "name": "turn_number",
1293
+ "type": "integer",
1294
+ "primaryKey": false,
1295
+ "notNull": true
1296
+ },
1297
+ "started_at": {
1298
+ "name": "started_at",
1299
+ "type": "bigint",
1300
+ "primaryKey": false,
1301
+ "notNull": true
1302
+ },
1303
+ "completed_at": {
1304
+ "name": "completed_at",
1305
+ "type": "bigint",
1306
+ "primaryKey": false,
1307
+ "notNull": false
1308
+ },
1309
+ "status": {
1310
+ "name": "status",
1311
+ "type": "text",
1312
+ "primaryKey": false,
1313
+ "notNull": true
1314
+ },
1315
+ "error": {
1316
+ "name": "error",
1317
+ "type": "text",
1318
+ "primaryKey": false,
1319
+ "notNull": false
1320
+ },
1321
+ "usage": {
1322
+ "name": "usage",
1323
+ "type": "text",
1324
+ "primaryKey": false,
1325
+ "notNull": false
1326
+ }
1327
+ },
1328
+ "indexes": {
1329
+ "idx_turns_session": {
1330
+ "name": "idx_turns_session",
1331
+ "columns": [
1332
+ {
1333
+ "expression": "session_id",
1334
+ "isExpression": false,
1335
+ "asc": true,
1336
+ "nulls": "last"
1337
+ },
1338
+ {
1339
+ "expression": "started_at",
1340
+ "isExpression": false,
1341
+ "asc": true,
1342
+ "nulls": "last"
1343
+ }
1344
+ ],
1345
+ "isUnique": false,
1346
+ "concurrently": false,
1347
+ "method": "btree",
1348
+ "with": {}
1349
+ },
1350
+ "uniq_turns_session_number": {
1351
+ "name": "uniq_turns_session_number",
1352
+ "columns": [
1353
+ {
1354
+ "expression": "session_id",
1355
+ "isExpression": false,
1356
+ "asc": true,
1357
+ "nulls": "last"
1358
+ },
1359
+ {
1360
+ "expression": "turn_number",
1361
+ "isExpression": false,
1362
+ "asc": true,
1363
+ "nulls": "last"
1364
+ }
1365
+ ],
1366
+ "isUnique": true,
1367
+ "concurrently": false,
1368
+ "method": "btree",
1369
+ "with": {}
1370
+ }
1371
+ },
1372
+ "foreignKeys": {
1373
+ "turns_session_id_sessions_session_id_fk": {
1374
+ "name": "turns_session_id_sessions_session_id_fk",
1375
+ "tableFrom": "turns",
1376
+ "tableTo": "sessions",
1377
+ "columnsFrom": ["session_id"],
1378
+ "columnsTo": ["session_id"],
1379
+ "onDelete": "cascade",
1380
+ "onUpdate": "no action"
1381
+ }
1382
+ },
1383
+ "compositePrimaryKeys": {},
1384
+ "uniqueConstraints": {},
1385
+ "policies": {},
1386
+ "checkConstraints": {},
1387
+ "isRLSEnabled": false
1388
+ },
1389
+ "public.log_import_settings": {
1390
+ "name": "log_import_settings",
1391
+ "schema": "",
1392
+ "columns": {
1393
+ "adapter_name": {
1394
+ "name": "adapter_name",
1395
+ "type": "text",
1396
+ "primaryKey": true,
1397
+ "notNull": true
1398
+ },
1399
+ "mode": {
1400
+ "name": "mode",
1401
+ "type": "text",
1402
+ "primaryKey": false,
1403
+ "notNull": true,
1404
+ "default": "'disabled'"
1405
+ },
1406
+ "created_at": {
1407
+ "name": "created_at",
1408
+ "type": "bigint",
1409
+ "primaryKey": false,
1410
+ "notNull": true
1411
+ },
1412
+ "updated_at": {
1413
+ "name": "updated_at",
1414
+ "type": "bigint",
1415
+ "primaryKey": false,
1416
+ "notNull": true
1417
+ }
1418
+ },
1419
+ "indexes": {},
1420
+ "foreignKeys": {},
1421
+ "compositePrimaryKeys": {},
1422
+ "uniqueConstraints": {},
1423
+ "policies": {},
1424
+ "checkConstraints": {},
1425
+ "isRLSEnabled": false
1426
+ },
1427
+ "public.client_binary_state": {
1428
+ "name": "client_binary_state",
1429
+ "schema": "",
1430
+ "columns": {
1431
+ "client_id": {
1432
+ "name": "client_id",
1433
+ "type": "text",
1434
+ "primaryKey": true,
1435
+ "notNull": true
1436
+ },
1437
+ "active_version": {
1438
+ "name": "active_version",
1439
+ "type": "text",
1440
+ "primaryKey": false,
1441
+ "notNull": false
1442
+ },
1443
+ "updated_at": {
1444
+ "name": "updated_at",
1445
+ "type": "bigint",
1446
+ "primaryKey": false,
1447
+ "notNull": true
1448
+ }
1449
+ },
1450
+ "indexes": {},
1451
+ "foreignKeys": {},
1452
+ "compositePrimaryKeys": {},
1453
+ "uniqueConstraints": {},
1454
+ "policies": {},
1455
+ "checkConstraints": {},
1456
+ "isRLSEnabled": false
1457
+ },
1458
+ "public.client_binary_versions": {
1459
+ "name": "client_binary_versions",
1460
+ "schema": "",
1461
+ "columns": {
1462
+ "id": {
1463
+ "name": "id",
1464
+ "type": "text",
1465
+ "primaryKey": true,
1466
+ "notNull": true
1467
+ },
1468
+ "client_id": {
1469
+ "name": "client_id",
1470
+ "type": "text",
1471
+ "primaryKey": false,
1472
+ "notNull": true
1473
+ },
1474
+ "version": {
1475
+ "name": "version",
1476
+ "type": "text",
1477
+ "primaryKey": false,
1478
+ "notNull": true
1479
+ },
1480
+ "install_path": {
1481
+ "name": "install_path",
1482
+ "type": "text",
1483
+ "primaryKey": false,
1484
+ "notNull": true
1485
+ },
1486
+ "installed_at": {
1487
+ "name": "installed_at",
1488
+ "type": "bigint",
1489
+ "primaryKey": false,
1490
+ "notNull": true
1491
+ },
1492
+ "created_at": {
1493
+ "name": "created_at",
1494
+ "type": "bigint",
1495
+ "primaryKey": false,
1496
+ "notNull": true
1497
+ }
1498
+ },
1499
+ "indexes": {},
1500
+ "foreignKeys": {},
1501
+ "compositePrimaryKeys": {},
1502
+ "uniqueConstraints": {
1503
+ "uq_client_binary_versions_client_version": {
1504
+ "name": "uq_client_binary_versions_client_version",
1505
+ "nullsNotDistinct": false,
1506
+ "columns": ["client_id", "version"]
1507
+ }
1508
+ },
1509
+ "policies": {},
1510
+ "checkConstraints": {},
1511
+ "isRLSEnabled": false
1512
+ },
1513
+ "public.client_profiles": {
1514
+ "name": "client_profiles",
1515
+ "schema": "",
1516
+ "columns": {
1517
+ "id": {
1518
+ "name": "id",
1519
+ "type": "text",
1520
+ "primaryKey": true,
1521
+ "notNull": true
1522
+ },
1523
+ "client_id": {
1524
+ "name": "client_id",
1525
+ "type": "text",
1526
+ "primaryKey": false,
1527
+ "notNull": true
1528
+ },
1529
+ "name": {
1530
+ "name": "name",
1531
+ "type": "text",
1532
+ "primaryKey": false,
1533
+ "notNull": true
1534
+ },
1535
+ "description": {
1536
+ "name": "description",
1537
+ "type": "text",
1538
+ "primaryKey": false,
1539
+ "notNull": false
1540
+ },
1541
+ "config_dir": {
1542
+ "name": "config_dir",
1543
+ "type": "text",
1544
+ "primaryKey": false,
1545
+ "notNull": true
1546
+ },
1547
+ "is_default": {
1548
+ "name": "is_default",
1549
+ "type": "boolean",
1550
+ "primaryKey": false,
1551
+ "notNull": true,
1552
+ "default": false
1553
+ },
1554
+ "created_at": {
1555
+ "name": "created_at",
1556
+ "type": "bigint",
1557
+ "primaryKey": false,
1558
+ "notNull": true
1559
+ },
1560
+ "updated_at": {
1561
+ "name": "updated_at",
1562
+ "type": "bigint",
1563
+ "primaryKey": false,
1564
+ "notNull": true
1565
+ }
1566
+ },
1567
+ "indexes": {
1568
+ "uq_client_profiles_client_name": {
1569
+ "name": "uq_client_profiles_client_name",
1570
+ "columns": [
1571
+ {
1572
+ "expression": "client_id",
1573
+ "isExpression": false,
1574
+ "asc": true,
1575
+ "nulls": "last"
1576
+ },
1577
+ {
1578
+ "expression": "name",
1579
+ "isExpression": false,
1580
+ "asc": true,
1581
+ "nulls": "last"
1582
+ }
1583
+ ],
1584
+ "isUnique": true,
1585
+ "concurrently": false,
1586
+ "method": "btree",
1587
+ "with": {}
1588
+ },
1589
+ "uq_client_profiles_default": {
1590
+ "name": "uq_client_profiles_default",
1591
+ "columns": [
1592
+ {
1593
+ "expression": "client_id",
1594
+ "isExpression": false,
1595
+ "asc": true,
1596
+ "nulls": "last"
1597
+ }
1598
+ ],
1599
+ "isUnique": true,
1600
+ "where": "\"client_profiles\".\"is_default\" = true",
1601
+ "concurrently": false,
1602
+ "method": "btree",
1603
+ "with": {}
1604
+ }
1605
+ },
1606
+ "foreignKeys": {},
1607
+ "compositePrimaryKeys": {},
1608
+ "uniqueConstraints": {},
1609
+ "policies": {},
1610
+ "checkConstraints": {},
1611
+ "isRLSEnabled": false
1612
+ },
1613
+ "public.client_runtimes": {
1614
+ "name": "client_runtimes",
1615
+ "schema": "",
1616
+ "columns": {
1617
+ "id": {
1618
+ "name": "id",
1619
+ "type": "text",
1620
+ "primaryKey": true,
1621
+ "notNull": true
1622
+ },
1623
+ "client_id": {
1624
+ "name": "client_id",
1625
+ "type": "text",
1626
+ "primaryKey": false,
1627
+ "notNull": true
1628
+ },
1629
+ "status": {
1630
+ "name": "status",
1631
+ "type": "text",
1632
+ "primaryKey": false,
1633
+ "notNull": true
1634
+ },
1635
+ "supervisor_session_id": {
1636
+ "name": "supervisor_session_id",
1637
+ "type": "text",
1638
+ "primaryKey": false,
1639
+ "notNull": false
1640
+ },
1641
+ "pid": {
1642
+ "name": "pid",
1643
+ "type": "integer",
1644
+ "primaryKey": false,
1645
+ "notNull": false
1646
+ },
1647
+ "parent_pid": {
1648
+ "name": "parent_pid",
1649
+ "type": "integer",
1650
+ "primaryKey": false,
1651
+ "notNull": false
1652
+ },
1653
+ "adapter_session_id": {
1654
+ "name": "adapter_session_id",
1655
+ "type": "text",
1656
+ "primaryKey": false,
1657
+ "notNull": false
1658
+ },
1659
+ "session_id": {
1660
+ "name": "session_id",
1661
+ "type": "text",
1662
+ "primaryKey": false,
1663
+ "notNull": false
1664
+ },
1665
+ "cwd": {
1666
+ "name": "cwd",
1667
+ "type": "text",
1668
+ "primaryKey": false,
1669
+ "notNull": false
1670
+ },
1671
+ "argv": {
1672
+ "name": "argv",
1673
+ "type": "jsonb",
1674
+ "primaryKey": false,
1675
+ "notNull": false
1676
+ },
1677
+ "metadata": {
1678
+ "name": "metadata",
1679
+ "type": "jsonb",
1680
+ "primaryKey": false,
1681
+ "notNull": false
1682
+ },
1683
+ "observed_at": {
1684
+ "name": "observed_at",
1685
+ "type": "bigint",
1686
+ "primaryKey": false,
1687
+ "notNull": true
1688
+ },
1689
+ "created_at": {
1690
+ "name": "created_at",
1691
+ "type": "bigint",
1692
+ "primaryKey": false,
1693
+ "notNull": true
1694
+ },
1695
+ "updated_at": {
1696
+ "name": "updated_at",
1697
+ "type": "bigint",
1698
+ "primaryKey": false,
1699
+ "notNull": true
1700
+ }
1701
+ },
1702
+ "indexes": {
1703
+ "idx_client_runtimes_supervisor_session_id": {
1704
+ "name": "idx_client_runtimes_supervisor_session_id",
1705
+ "columns": [
1706
+ {
1707
+ "expression": "supervisor_session_id",
1708
+ "isExpression": false,
1709
+ "asc": true,
1710
+ "nulls": "last"
1711
+ }
1712
+ ],
1713
+ "isUnique": false,
1714
+ "concurrently": false,
1715
+ "method": "btree",
1716
+ "with": {}
1717
+ },
1718
+ "idx_client_runtimes_pid_client_id": {
1719
+ "name": "idx_client_runtimes_pid_client_id",
1720
+ "columns": [
1721
+ {
1722
+ "expression": "pid",
1723
+ "isExpression": false,
1724
+ "asc": true,
1725
+ "nulls": "last"
1726
+ },
1727
+ {
1728
+ "expression": "client_id",
1729
+ "isExpression": false,
1730
+ "asc": true,
1731
+ "nulls": "last"
1732
+ }
1733
+ ],
1734
+ "isUnique": false,
1735
+ "concurrently": false,
1736
+ "method": "btree",
1737
+ "with": {}
1738
+ },
1739
+ "idx_client_runtimes_adapter_session_id_client_id": {
1740
+ "name": "idx_client_runtimes_adapter_session_id_client_id",
1741
+ "columns": [
1742
+ {
1743
+ "expression": "adapter_session_id",
1744
+ "isExpression": false,
1745
+ "asc": true,
1746
+ "nulls": "last"
1747
+ },
1748
+ {
1749
+ "expression": "client_id",
1750
+ "isExpression": false,
1751
+ "asc": true,
1752
+ "nulls": "last"
1753
+ }
1754
+ ],
1755
+ "isUnique": false,
1756
+ "concurrently": false,
1757
+ "method": "btree",
1758
+ "with": {}
1759
+ }
1760
+ },
1761
+ "foreignKeys": {},
1762
+ "compositePrimaryKeys": {},
1763
+ "uniqueConstraints": {},
1764
+ "policies": {},
1765
+ "checkConstraints": {},
1766
+ "isRLSEnabled": false
1767
+ },
1768
+ "public.supervisor_runtimes": {
1769
+ "name": "supervisor_runtimes",
1770
+ "schema": "",
1771
+ "columns": {
1772
+ "supervisor_session_id": {
1773
+ "name": "supervisor_session_id",
1774
+ "type": "text",
1775
+ "primaryKey": true,
1776
+ "notNull": true
1777
+ },
1778
+ "client_id": {
1779
+ "name": "client_id",
1780
+ "type": "text",
1781
+ "primaryKey": false,
1782
+ "notNull": true
1783
+ },
1784
+ "pid": {
1785
+ "name": "pid",
1786
+ "type": "integer",
1787
+ "primaryKey": false,
1788
+ "notNull": false
1789
+ },
1790
+ "status": {
1791
+ "name": "status",
1792
+ "type": "text",
1793
+ "primaryKey": false,
1794
+ "notNull": true
1795
+ },
1796
+ "cwd": {
1797
+ "name": "cwd",
1798
+ "type": "text",
1799
+ "primaryKey": false,
1800
+ "notNull": true
1801
+ },
1802
+ "command": {
1803
+ "name": "command",
1804
+ "type": "text",
1805
+ "primaryKey": false,
1806
+ "notNull": true
1807
+ },
1808
+ "args_json": {
1809
+ "name": "args_json",
1810
+ "type": "text",
1811
+ "primaryKey": false,
1812
+ "notNull": true
1813
+ },
1814
+ "env_json": {
1815
+ "name": "env_json",
1816
+ "type": "text",
1817
+ "primaryKey": false,
1818
+ "notNull": false
1819
+ },
1820
+ "session_id": {
1821
+ "name": "session_id",
1822
+ "type": "text",
1823
+ "primaryKey": false,
1824
+ "notNull": false
1825
+ },
1826
+ "adapter_session_id": {
1827
+ "name": "adapter_session_id",
1828
+ "type": "text",
1829
+ "primaryKey": false,
1830
+ "notNull": false
1831
+ },
1832
+ "started_at": {
1833
+ "name": "started_at",
1834
+ "type": "bigint",
1835
+ "primaryKey": false,
1836
+ "notNull": true
1837
+ },
1838
+ "stopped_at": {
1839
+ "name": "stopped_at",
1840
+ "type": "bigint",
1841
+ "primaryKey": false,
1842
+ "notNull": false
1843
+ },
1844
+ "metadata_json": {
1845
+ "name": "metadata_json",
1846
+ "type": "text",
1847
+ "primaryKey": false,
1848
+ "notNull": false
1849
+ }
1850
+ },
1851
+ "indexes": {
1852
+ "supervisor_runtimes_session_id_idx": {
1853
+ "name": "supervisor_runtimes_session_id_idx",
1854
+ "columns": [
1855
+ {
1856
+ "expression": "session_id",
1857
+ "isExpression": false,
1858
+ "asc": true,
1859
+ "nulls": "last"
1860
+ }
1861
+ ],
1862
+ "isUnique": false,
1863
+ "concurrently": false,
1864
+ "method": "btree",
1865
+ "with": {}
1866
+ },
1867
+ "supervisor_runtimes_adapter_session_id_idx": {
1868
+ "name": "supervisor_runtimes_adapter_session_id_idx",
1869
+ "columns": [
1870
+ {
1871
+ "expression": "adapter_session_id",
1872
+ "isExpression": false,
1873
+ "asc": true,
1874
+ "nulls": "last"
1875
+ }
1876
+ ],
1877
+ "isUnique": false,
1878
+ "concurrently": false,
1879
+ "method": "btree",
1880
+ "with": {}
1881
+ },
1882
+ "supervisor_runtimes_status_idx": {
1883
+ "name": "supervisor_runtimes_status_idx",
1884
+ "columns": [
1885
+ {
1886
+ "expression": "status",
1887
+ "isExpression": false,
1888
+ "asc": true,
1889
+ "nulls": "last"
1890
+ }
1891
+ ],
1892
+ "isUnique": false,
1893
+ "concurrently": false,
1894
+ "method": "btree",
1895
+ "with": {}
1896
+ }
1897
+ },
1898
+ "foreignKeys": {},
1899
+ "compositePrimaryKeys": {},
1900
+ "uniqueConstraints": {},
1901
+ "policies": {},
1902
+ "checkConstraints": {},
1903
+ "isRLSEnabled": false
1904
+ },
1905
+ "public.workflow_definitions": {
1906
+ "name": "workflow_definitions",
1907
+ "schema": "",
1908
+ "columns": {
1909
+ "id": {
1910
+ "name": "id",
1911
+ "type": "text",
1912
+ "primaryKey": true,
1913
+ "notNull": true
1914
+ },
1915
+ "name": {
1916
+ "name": "name",
1917
+ "type": "text",
1918
+ "primaryKey": false,
1919
+ "notNull": true
1920
+ },
1921
+ "description": {
1922
+ "name": "description",
1923
+ "type": "text",
1924
+ "primaryKey": false,
1925
+ "notNull": false
1926
+ },
1927
+ "root": {
1928
+ "name": "root",
1929
+ "type": "jsonb",
1930
+ "primaryKey": false,
1931
+ "notNull": true
1932
+ },
1933
+ "input_schema": {
1934
+ "name": "input_schema",
1935
+ "type": "jsonb",
1936
+ "primaryKey": false,
1937
+ "notNull": false
1938
+ },
1939
+ "config_schema": {
1940
+ "name": "config_schema",
1941
+ "type": "jsonb",
1942
+ "primaryKey": false,
1943
+ "notNull": false
1944
+ },
1945
+ "output_schema": {
1946
+ "name": "output_schema",
1947
+ "type": "jsonb",
1948
+ "primaryKey": false,
1949
+ "notNull": false
1950
+ },
1951
+ "artifact": {
1952
+ "name": "artifact",
1953
+ "type": "jsonb",
1954
+ "primaryKey": false,
1955
+ "notNull": false
1956
+ },
1957
+ "triggers": {
1958
+ "name": "triggers",
1959
+ "type": "jsonb",
1960
+ "primaryKey": false,
1961
+ "notNull": false
1962
+ },
1963
+ "scope_type": {
1964
+ "name": "scope_type",
1965
+ "type": "text",
1966
+ "primaryKey": false,
1967
+ "notNull": true
1968
+ },
1969
+ "scope_kind": {
1970
+ "name": "scope_kind",
1971
+ "type": "text",
1972
+ "primaryKey": false,
1973
+ "notNull": true,
1974
+ "default": "''"
1975
+ },
1976
+ "scope_id": {
1977
+ "name": "scope_id",
1978
+ "type": "text",
1979
+ "primaryKey": false,
1980
+ "notNull": true,
1981
+ "default": "''"
1982
+ },
1983
+ "created_at": {
1984
+ "name": "created_at",
1985
+ "type": "bigint",
1986
+ "primaryKey": false,
1987
+ "notNull": true
1988
+ },
1989
+ "updated_at": {
1990
+ "name": "updated_at",
1991
+ "type": "bigint",
1992
+ "primaryKey": false,
1993
+ "notNull": true
1994
+ },
1995
+ "canvas_layout": {
1996
+ "name": "canvas_layout",
1997
+ "type": "jsonb",
1998
+ "primaryKey": false,
1999
+ "notNull": false
2000
+ },
2001
+ "source": {
2002
+ "name": "source",
2003
+ "type": "jsonb",
2004
+ "primaryKey": false,
2005
+ "notNull": false
2006
+ },
2007
+ "execution_hints": {
2008
+ "name": "execution_hints",
2009
+ "type": "jsonb",
2010
+ "primaryKey": false,
2011
+ "notNull": false
2012
+ }
2013
+ },
2014
+ "indexes": {
2015
+ "uniq_workflow_definitions_name_scope": {
2016
+ "name": "uniq_workflow_definitions_name_scope",
2017
+ "columns": [
2018
+ {
2019
+ "expression": "name",
2020
+ "isExpression": false,
2021
+ "asc": true,
2022
+ "nulls": "last"
2023
+ },
2024
+ {
2025
+ "expression": "scope_type",
2026
+ "isExpression": false,
2027
+ "asc": true,
2028
+ "nulls": "last"
2029
+ },
2030
+ {
2031
+ "expression": "scope_kind",
2032
+ "isExpression": false,
2033
+ "asc": true,
2034
+ "nulls": "last"
2035
+ },
2036
+ {
2037
+ "expression": "scope_id",
2038
+ "isExpression": false,
2039
+ "asc": true,
2040
+ "nulls": "last"
2041
+ }
2042
+ ],
2043
+ "isUnique": true,
2044
+ "concurrently": false,
2045
+ "method": "btree",
2046
+ "with": {}
2047
+ },
2048
+ "idx_workflow_definitions_scope": {
2049
+ "name": "idx_workflow_definitions_scope",
2050
+ "columns": [
2051
+ {
2052
+ "expression": "scope_type",
2053
+ "isExpression": false,
2054
+ "asc": true,
2055
+ "nulls": "last"
2056
+ },
2057
+ {
2058
+ "expression": "scope_kind",
2059
+ "isExpression": false,
2060
+ "asc": true,
2061
+ "nulls": "last"
2062
+ },
2063
+ {
2064
+ "expression": "scope_id",
2065
+ "isExpression": false,
2066
+ "asc": true,
2067
+ "nulls": "last"
2068
+ }
2069
+ ],
2070
+ "isUnique": false,
2071
+ "concurrently": false,
2072
+ "method": "btree",
2073
+ "with": {}
2074
+ }
2075
+ },
2076
+ "foreignKeys": {},
2077
+ "compositePrimaryKeys": {},
2078
+ "uniqueConstraints": {},
2079
+ "policies": {},
2080
+ "checkConstraints": {},
2081
+ "isRLSEnabled": false
2082
+ },
2083
+ "public.workflow_execution_frames": {
2084
+ "name": "workflow_execution_frames",
2085
+ "schema": "",
2086
+ "columns": {
2087
+ "frame_id": {
2088
+ "name": "frame_id",
2089
+ "type": "text",
2090
+ "primaryKey": true,
2091
+ "notNull": true
2092
+ },
2093
+ "execution_id": {
2094
+ "name": "execution_id",
2095
+ "type": "text",
2096
+ "primaryKey": false,
2097
+ "notNull": true
2098
+ },
2099
+ "node_id": {
2100
+ "name": "node_id",
2101
+ "type": "text",
2102
+ "primaryKey": false,
2103
+ "notNull": true
2104
+ },
2105
+ "node_type": {
2106
+ "name": "node_type",
2107
+ "type": "text",
2108
+ "primaryKey": false,
2109
+ "notNull": true
2110
+ },
2111
+ "path": {
2112
+ "name": "path",
2113
+ "type": "jsonb",
2114
+ "primaryKey": false,
2115
+ "notNull": true
2116
+ },
2117
+ "parent_frame_id": {
2118
+ "name": "parent_frame_id",
2119
+ "type": "text",
2120
+ "primaryKey": false,
2121
+ "notNull": false
2122
+ },
2123
+ "status": {
2124
+ "name": "status",
2125
+ "type": "text",
2126
+ "primaryKey": false,
2127
+ "notNull": true,
2128
+ "default": "'pending'"
2129
+ },
2130
+ "attempt": {
2131
+ "name": "attempt",
2132
+ "type": "integer",
2133
+ "primaryKey": false,
2134
+ "notNull": true,
2135
+ "default": 0
2136
+ },
2137
+ "iteration": {
2138
+ "name": "iteration",
2139
+ "type": "integer",
2140
+ "primaryKey": false,
2141
+ "notNull": false
2142
+ },
2143
+ "branch_key": {
2144
+ "name": "branch_key",
2145
+ "type": "text",
2146
+ "primaryKey": false,
2147
+ "notNull": false
2148
+ },
2149
+ "output": {
2150
+ "name": "output",
2151
+ "type": "jsonb",
2152
+ "primaryKey": false,
2153
+ "notNull": false
2154
+ },
2155
+ "output_present": {
2156
+ "name": "output_present",
2157
+ "type": "boolean",
2158
+ "primaryKey": false,
2159
+ "notNull": true,
2160
+ "default": false
2161
+ },
2162
+ "error": {
2163
+ "name": "error",
2164
+ "type": "text",
2165
+ "primaryKey": false,
2166
+ "notNull": false
2167
+ },
2168
+ "started_at": {
2169
+ "name": "started_at",
2170
+ "type": "bigint",
2171
+ "primaryKey": false,
2172
+ "notNull": false
2173
+ },
2174
+ "completed_at": {
2175
+ "name": "completed_at",
2176
+ "type": "bigint",
2177
+ "primaryKey": false,
2178
+ "notNull": false
2179
+ }
2180
+ },
2181
+ "indexes": {
2182
+ "idx_workflow_execution_frames_execution": {
2183
+ "name": "idx_workflow_execution_frames_execution",
2184
+ "columns": [
2185
+ {
2186
+ "expression": "execution_id",
2187
+ "isExpression": false,
2188
+ "asc": true,
2189
+ "nulls": "last"
2190
+ }
2191
+ ],
2192
+ "isUnique": false,
2193
+ "concurrently": false,
2194
+ "method": "btree",
2195
+ "with": {}
2196
+ },
2197
+ "idx_workflow_execution_frames_parent": {
2198
+ "name": "idx_workflow_execution_frames_parent",
2199
+ "columns": [
2200
+ {
2201
+ "expression": "parent_frame_id",
2202
+ "isExpression": false,
2203
+ "asc": true,
2204
+ "nulls": "last"
2205
+ }
2206
+ ],
2207
+ "isUnique": false,
2208
+ "concurrently": false,
2209
+ "method": "btree",
2210
+ "with": {}
2211
+ }
2212
+ },
2213
+ "foreignKeys": {
2214
+ "workflow_execution_frames_execution_id_workflow_executions_id_fk": {
2215
+ "name": "workflow_execution_frames_execution_id_workflow_executions_id_fk",
2216
+ "tableFrom": "workflow_execution_frames",
2217
+ "tableTo": "workflow_executions",
2218
+ "columnsFrom": ["execution_id"],
2219
+ "columnsTo": ["id"],
2220
+ "onDelete": "cascade",
2221
+ "onUpdate": "no action"
2222
+ }
2223
+ },
2224
+ "compositePrimaryKeys": {},
2225
+ "uniqueConstraints": {},
2226
+ "policies": {},
2227
+ "checkConstraints": {},
2228
+ "isRLSEnabled": false
2229
+ },
2230
+ "public.workflow_execution_links": {
2231
+ "name": "workflow_execution_links",
2232
+ "schema": "",
2233
+ "columns": {
2234
+ "source_execution_id": {
2235
+ "name": "source_execution_id",
2236
+ "type": "text",
2237
+ "primaryKey": false,
2238
+ "notNull": true
2239
+ },
2240
+ "target_execution_id": {
2241
+ "name": "target_execution_id",
2242
+ "type": "text",
2243
+ "primaryKey": false,
2244
+ "notNull": true
2245
+ },
2246
+ "link_type": {
2247
+ "name": "link_type",
2248
+ "type": "text",
2249
+ "primaryKey": false,
2250
+ "notNull": true
2251
+ },
2252
+ "metadata": {
2253
+ "name": "metadata",
2254
+ "type": "jsonb",
2255
+ "primaryKey": false,
2256
+ "notNull": false
2257
+ }
2258
+ },
2259
+ "indexes": {
2260
+ "idx_workflow_execution_links_target": {
2261
+ "name": "idx_workflow_execution_links_target",
2262
+ "columns": [
2263
+ {
2264
+ "expression": "target_execution_id",
2265
+ "isExpression": false,
2266
+ "asc": true,
2267
+ "nulls": "last"
2268
+ }
2269
+ ],
2270
+ "isUnique": false,
2271
+ "concurrently": false,
2272
+ "method": "btree",
2273
+ "with": {}
2274
+ }
2275
+ },
2276
+ "foreignKeys": {
2277
+ "workflow_execution_links_source_execution_id_workflow_executions_id_fk": {
2278
+ "name": "workflow_execution_links_source_execution_id_workflow_executions_id_fk",
2279
+ "tableFrom": "workflow_execution_links",
2280
+ "tableTo": "workflow_executions",
2281
+ "columnsFrom": ["source_execution_id"],
2282
+ "columnsTo": ["id"],
2283
+ "onDelete": "cascade",
2284
+ "onUpdate": "no action"
2285
+ },
2286
+ "workflow_execution_links_target_execution_id_workflow_executions_id_fk": {
2287
+ "name": "workflow_execution_links_target_execution_id_workflow_executions_id_fk",
2288
+ "tableFrom": "workflow_execution_links",
2289
+ "tableTo": "workflow_executions",
2290
+ "columnsFrom": ["target_execution_id"],
2291
+ "columnsTo": ["id"],
2292
+ "onDelete": "cascade",
2293
+ "onUpdate": "no action"
2294
+ }
2295
+ },
2296
+ "compositePrimaryKeys": {
2297
+ "workflow_execution_links_source_execution_id_target_execution_id_pk": {
2298
+ "name": "workflow_execution_links_source_execution_id_target_execution_id_pk",
2299
+ "columns": ["source_execution_id", "target_execution_id"]
2300
+ }
2301
+ },
2302
+ "uniqueConstraints": {},
2303
+ "policies": {},
2304
+ "checkConstraints": {},
2305
+ "isRLSEnabled": false
2306
+ },
2307
+ "public.workflow_executions": {
2308
+ "name": "workflow_executions",
2309
+ "schema": "",
2310
+ "columns": {
2311
+ "id": {
2312
+ "name": "id",
2313
+ "type": "text",
2314
+ "primaryKey": true,
2315
+ "notNull": true
2316
+ },
2317
+ "workflow_id": {
2318
+ "name": "workflow_id",
2319
+ "type": "text",
2320
+ "primaryKey": false,
2321
+ "notNull": true
2322
+ },
2323
+ "coordinator_session_id": {
2324
+ "name": "coordinator_session_id",
2325
+ "type": "text",
2326
+ "primaryKey": false,
2327
+ "notNull": false
2328
+ },
2329
+ "status": {
2330
+ "name": "status",
2331
+ "type": "text",
2332
+ "primaryKey": false,
2333
+ "notNull": true
2334
+ },
2335
+ "inputs": {
2336
+ "name": "inputs",
2337
+ "type": "jsonb",
2338
+ "primaryKey": false,
2339
+ "notNull": false
2340
+ },
2341
+ "error": {
2342
+ "name": "error",
2343
+ "type": "text",
2344
+ "primaryKey": false,
2345
+ "notNull": false
2346
+ },
2347
+ "reason": {
2348
+ "name": "reason",
2349
+ "type": "text",
2350
+ "primaryKey": false,
2351
+ "notNull": false
2352
+ },
2353
+ "started_at": {
2354
+ "name": "started_at",
2355
+ "type": "bigint",
2356
+ "primaryKey": false,
2357
+ "notNull": true
2358
+ },
2359
+ "completed_at": {
2360
+ "name": "completed_at",
2361
+ "type": "bigint",
2362
+ "primaryKey": false,
2363
+ "notNull": false
2364
+ },
2365
+ "trigger_payload": {
2366
+ "name": "trigger_payload",
2367
+ "type": "jsonb",
2368
+ "primaryKey": false,
2369
+ "notNull": false
2370
+ },
2371
+ "artifact_kind": {
2372
+ "name": "artifact_kind",
2373
+ "type": "text",
2374
+ "primaryKey": false,
2375
+ "notNull": false
2376
+ },
2377
+ "artifact_id": {
2378
+ "name": "artifact_id",
2379
+ "type": "text",
2380
+ "primaryKey": false,
2381
+ "notNull": false
2382
+ },
2383
+ "scope_type": {
2384
+ "name": "scope_type",
2385
+ "type": "text",
2386
+ "primaryKey": false,
2387
+ "notNull": true
2388
+ },
2389
+ "scope_kind": {
2390
+ "name": "scope_kind",
2391
+ "type": "text",
2392
+ "primaryKey": false,
2393
+ "notNull": true,
2394
+ "default": "''"
2395
+ },
2396
+ "scope_id": {
2397
+ "name": "scope_id",
2398
+ "type": "text",
2399
+ "primaryKey": false,
2400
+ "notNull": true,
2401
+ "default": "''"
2402
+ }
2403
+ },
2404
+ "indexes": {
2405
+ "idx_workflow_executions_status": {
2406
+ "name": "idx_workflow_executions_status",
2407
+ "columns": [
2408
+ {
2409
+ "expression": "status",
2410
+ "isExpression": false,
2411
+ "asc": true,
2412
+ "nulls": "last"
2413
+ }
2414
+ ],
2415
+ "isUnique": false,
2416
+ "concurrently": false,
2417
+ "method": "btree",
2418
+ "with": {}
2419
+ },
2420
+ "idx_workflow_executions_scope_started": {
2421
+ "name": "idx_workflow_executions_scope_started",
2422
+ "columns": [
2423
+ {
2424
+ "expression": "scope_type",
2425
+ "isExpression": false,
2426
+ "asc": true,
2427
+ "nulls": "last"
2428
+ },
2429
+ {
2430
+ "expression": "scope_kind",
2431
+ "isExpression": false,
2432
+ "asc": true,
2433
+ "nulls": "last"
2434
+ },
2435
+ {
2436
+ "expression": "scope_id",
2437
+ "isExpression": false,
2438
+ "asc": true,
2439
+ "nulls": "last"
2440
+ },
2441
+ {
2442
+ "expression": "started_at",
2443
+ "isExpression": false,
2444
+ "asc": true,
2445
+ "nulls": "last"
2446
+ }
2447
+ ],
2448
+ "isUnique": false,
2449
+ "concurrently": false,
2450
+ "method": "btree",
2451
+ "with": {}
2452
+ },
2453
+ "idx_workflow_executions_workflow_started": {
2454
+ "name": "idx_workflow_executions_workflow_started",
2455
+ "columns": [
2456
+ {
2457
+ "expression": "workflow_id",
2458
+ "isExpression": false,
2459
+ "asc": true,
2460
+ "nulls": "last"
2461
+ },
2462
+ {
2463
+ "expression": "started_at",
2464
+ "isExpression": false,
2465
+ "asc": true,
2466
+ "nulls": "last"
2467
+ }
2468
+ ],
2469
+ "isUnique": false,
2470
+ "concurrently": false,
2471
+ "method": "btree",
2472
+ "with": {}
2473
+ },
2474
+ "idx_workflow_executions_artifact": {
2475
+ "name": "idx_workflow_executions_artifact",
2476
+ "columns": [
2477
+ {
2478
+ "expression": "artifact_kind",
2479
+ "isExpression": false,
2480
+ "asc": true,
2481
+ "nulls": "last"
2482
+ },
2483
+ {
2484
+ "expression": "artifact_id",
2485
+ "isExpression": false,
2486
+ "asc": true,
2487
+ "nulls": "last"
2488
+ },
2489
+ {
2490
+ "expression": "started_at",
2491
+ "isExpression": false,
2492
+ "asc": true,
2493
+ "nulls": "last"
2494
+ }
2495
+ ],
2496
+ "isUnique": false,
2497
+ "concurrently": false,
2498
+ "method": "btree",
2499
+ "with": {}
2500
+ }
2501
+ },
2502
+ "foreignKeys": {},
2503
+ "compositePrimaryKeys": {},
2504
+ "uniqueConstraints": {},
2505
+ "policies": {},
2506
+ "checkConstraints": {},
2507
+ "isRLSEnabled": false
2508
+ },
2509
+ "public.workflow_gate_instances": {
2510
+ "name": "workflow_gate_instances",
2511
+ "schema": "",
2512
+ "columns": {
2513
+ "id": {
2514
+ "name": "id",
2515
+ "type": "text",
2516
+ "primaryKey": true,
2517
+ "notNull": true
2518
+ },
2519
+ "execution_id": {
2520
+ "name": "execution_id",
2521
+ "type": "text",
2522
+ "primaryKey": false,
2523
+ "notNull": true
2524
+ },
2525
+ "node_id": {
2526
+ "name": "node_id",
2527
+ "type": "text",
2528
+ "primaryKey": false,
2529
+ "notNull": true
2530
+ },
2531
+ "frame_id": {
2532
+ "name": "frame_id",
2533
+ "type": "text",
2534
+ "primaryKey": false,
2535
+ "notNull": true
2536
+ },
2537
+ "schema": {
2538
+ "name": "schema",
2539
+ "type": "jsonb",
2540
+ "primaryKey": false,
2541
+ "notNull": true
2542
+ },
2543
+ "prompt": {
2544
+ "name": "prompt",
2545
+ "type": "text",
2546
+ "primaryKey": false,
2547
+ "notNull": false
2548
+ },
2549
+ "status": {
2550
+ "name": "status",
2551
+ "type": "text",
2552
+ "primaryKey": false,
2553
+ "notNull": true,
2554
+ "default": "'waiting'"
2555
+ },
2556
+ "auto_action": {
2557
+ "name": "auto_action",
2558
+ "type": "text",
2559
+ "primaryKey": false,
2560
+ "notNull": true,
2561
+ "default": "'reject'"
2562
+ },
2563
+ "timeout_ms": {
2564
+ "name": "timeout_ms",
2565
+ "type": "integer",
2566
+ "primaryKey": false,
2567
+ "notNull": false
2568
+ },
2569
+ "resume_data": {
2570
+ "name": "resume_data",
2571
+ "type": "jsonb",
2572
+ "primaryKey": false,
2573
+ "notNull": false
2574
+ },
2575
+ "resume_data_present": {
2576
+ "name": "resume_data_present",
2577
+ "type": "boolean",
2578
+ "primaryKey": false,
2579
+ "notNull": true,
2580
+ "default": false
2581
+ },
2582
+ "created_at": {
2583
+ "name": "created_at",
2584
+ "type": "bigint",
2585
+ "primaryKey": false,
2586
+ "notNull": true
2587
+ },
2588
+ "resolved_at": {
2589
+ "name": "resolved_at",
2590
+ "type": "bigint",
2591
+ "primaryKey": false,
2592
+ "notNull": false
2593
+ }
2594
+ },
2595
+ "indexes": {
2596
+ "idx_workflow_gate_instances_execution": {
2597
+ "name": "idx_workflow_gate_instances_execution",
2598
+ "columns": [
2599
+ {
2600
+ "expression": "execution_id",
2601
+ "isExpression": false,
2602
+ "asc": true,
2603
+ "nulls": "last"
2604
+ }
2605
+ ],
2606
+ "isUnique": false,
2607
+ "concurrently": false,
2608
+ "method": "btree",
2609
+ "with": {}
2610
+ },
2611
+ "idx_workflow_gate_instances_frame": {
2612
+ "name": "idx_workflow_gate_instances_frame",
2613
+ "columns": [
2614
+ {
2615
+ "expression": "frame_id",
2616
+ "isExpression": false,
2617
+ "asc": true,
2618
+ "nulls": "last"
2619
+ }
2620
+ ],
2621
+ "isUnique": false,
2622
+ "concurrently": false,
2623
+ "method": "btree",
2624
+ "with": {}
2625
+ }
2626
+ },
2627
+ "foreignKeys": {
2628
+ "workflow_gate_instances_execution_id_workflow_executions_id_fk": {
2629
+ "name": "workflow_gate_instances_execution_id_workflow_executions_id_fk",
2630
+ "tableFrom": "workflow_gate_instances",
2631
+ "tableTo": "workflow_executions",
2632
+ "columnsFrom": ["execution_id"],
2633
+ "columnsTo": ["id"],
2634
+ "onDelete": "cascade",
2635
+ "onUpdate": "no action"
2636
+ }
2637
+ },
2638
+ "compositePrimaryKeys": {},
2639
+ "uniqueConstraints": {},
2640
+ "policies": {},
2641
+ "checkConstraints": {},
2642
+ "isRLSEnabled": false
2643
+ },
2644
+ "public.workflow_run_contexts": {
2645
+ "name": "workflow_run_contexts",
2646
+ "schema": "",
2647
+ "columns": {
2648
+ "execution_id": {
2649
+ "name": "execution_id",
2650
+ "type": "text",
2651
+ "primaryKey": true,
2652
+ "notNull": true
2653
+ },
2654
+ "workflow_id": {
2655
+ "name": "workflow_id",
2656
+ "type": "text",
2657
+ "primaryKey": false,
2658
+ "notNull": true
2659
+ },
2660
+ "coordinator_session_id": {
2661
+ "name": "coordinator_session_id",
2662
+ "type": "text",
2663
+ "primaryKey": false,
2664
+ "notNull": true
2665
+ },
2666
+ "source_kind": {
2667
+ "name": "source_kind",
2668
+ "type": "text",
2669
+ "primaryKey": false,
2670
+ "notNull": true
2671
+ },
2672
+ "source_path": {
2673
+ "name": "source_path",
2674
+ "type": "text",
2675
+ "primaryKey": false,
2676
+ "notNull": false
2677
+ },
2678
+ "source_filename": {
2679
+ "name": "source_filename",
2680
+ "type": "text",
2681
+ "primaryKey": false,
2682
+ "notNull": false
2683
+ },
2684
+ "source_code": {
2685
+ "name": "source_code",
2686
+ "type": "text",
2687
+ "primaryKey": false,
2688
+ "notNull": false
2689
+ },
2690
+ "definition_snapshot": {
2691
+ "name": "definition_snapshot",
2692
+ "type": "jsonb",
2693
+ "primaryKey": false,
2694
+ "notNull": false
2695
+ },
2696
+ "worker_manifest": {
2697
+ "name": "worker_manifest",
2698
+ "type": "jsonb",
2699
+ "primaryKey": false,
2700
+ "notNull": true
2701
+ },
2702
+ "inputs": {
2703
+ "name": "inputs",
2704
+ "type": "jsonb",
2705
+ "primaryKey": false,
2706
+ "notNull": false
2707
+ },
2708
+ "config": {
2709
+ "name": "config",
2710
+ "type": "jsonb",
2711
+ "primaryKey": false,
2712
+ "notNull": true,
2713
+ "default": "'{}'"
2714
+ },
2715
+ "trigger_payload": {
2716
+ "name": "trigger_payload",
2717
+ "type": "jsonb",
2718
+ "primaryKey": false,
2719
+ "notNull": true
2720
+ },
2721
+ "artifact_ref": {
2722
+ "name": "artifact_ref",
2723
+ "type": "jsonb",
2724
+ "primaryKey": false,
2725
+ "notNull": false
2726
+ },
2727
+ "execution_hints": {
2728
+ "name": "execution_hints",
2729
+ "type": "jsonb",
2730
+ "primaryKey": false,
2731
+ "notNull": false
2732
+ },
2733
+ "dispatch_metadata": {
2734
+ "name": "dispatch_metadata",
2735
+ "type": "jsonb",
2736
+ "primaryKey": false,
2737
+ "notNull": false
2738
+ },
2739
+ "scope_type": {
2740
+ "name": "scope_type",
2741
+ "type": "text",
2742
+ "primaryKey": false,
2743
+ "notNull": true,
2744
+ "default": "'global'"
2745
+ },
2746
+ "scope_kind": {
2747
+ "name": "scope_kind",
2748
+ "type": "text",
2749
+ "primaryKey": false,
2750
+ "notNull": true,
2751
+ "default": "''"
2752
+ },
2753
+ "scope_id": {
2754
+ "name": "scope_id",
2755
+ "type": "text",
2756
+ "primaryKey": false,
2757
+ "notNull": true,
2758
+ "default": "''"
2759
+ },
2760
+ "cancel_subject": {
2761
+ "name": "cancel_subject",
2762
+ "type": "text",
2763
+ "primaryKey": false,
2764
+ "notNull": true
2765
+ },
2766
+ "context": {
2767
+ "name": "context",
2768
+ "type": "jsonb",
2769
+ "primaryKey": false,
2770
+ "notNull": true
2771
+ },
2772
+ "env": {
2773
+ "name": "env",
2774
+ "type": "jsonb",
2775
+ "primaryKey": false,
2776
+ "notNull": true
2777
+ },
2778
+ "created_at": {
2779
+ "name": "created_at",
2780
+ "type": "bigint",
2781
+ "primaryKey": false,
2782
+ "notNull": true
2783
+ },
2784
+ "suspension_strategy": {
2785
+ "name": "suspension_strategy",
2786
+ "type": "text",
2787
+ "primaryKey": false,
2788
+ "notNull": false
2789
+ }
2790
+ },
2791
+ "indexes": {
2792
+ "idx_run_contexts_workflow": {
2793
+ "name": "idx_run_contexts_workflow",
2794
+ "columns": [
2795
+ {
2796
+ "expression": "workflow_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_run_contexts_execution_id_workflow_executions_id_fk": {
2810
+ "name": "workflow_run_contexts_execution_id_workflow_executions_id_fk",
2811
+ "tableFrom": "workflow_run_contexts",
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_step_spans": {
2826
+ "name": "workflow_step_spans",
2827
+ "schema": "",
2828
+ "columns": {
2829
+ "execution_id": {
2830
+ "name": "execution_id",
2831
+ "type": "text",
2832
+ "primaryKey": false,
2833
+ "notNull": true
2834
+ },
2835
+ "frame_id": {
2836
+ "name": "frame_id",
2837
+ "type": "text",
2838
+ "primaryKey": false,
2839
+ "notNull": true
2840
+ },
2841
+ "step_id": {
2842
+ "name": "step_id",
2843
+ "type": "text",
2844
+ "primaryKey": false,
2845
+ "notNull": true
2846
+ },
2847
+ "step_type": {
2848
+ "name": "step_type",
2849
+ "type": "text",
2850
+ "primaryKey": false,
2851
+ "notNull": true
2852
+ },
2853
+ "status": {
2854
+ "name": "status",
2855
+ "type": "text",
2856
+ "primaryKey": false,
2857
+ "notNull": true
2858
+ },
2859
+ "started_at": {
2860
+ "name": "started_at",
2861
+ "type": "bigint",
2862
+ "primaryKey": false,
2863
+ "notNull": false
2864
+ },
2865
+ "completed_at": {
2866
+ "name": "completed_at",
2867
+ "type": "bigint",
2868
+ "primaryKey": false,
2869
+ "notNull": false
2870
+ },
2871
+ "duration_ms": {
2872
+ "name": "duration_ms",
2873
+ "type": "integer",
2874
+ "primaryKey": false,
2875
+ "notNull": false
2876
+ },
2877
+ "input_tokens": {
2878
+ "name": "input_tokens",
2879
+ "type": "integer",
2880
+ "primaryKey": false,
2881
+ "notNull": false
2882
+ },
2883
+ "output_tokens": {
2884
+ "name": "output_tokens",
2885
+ "type": "integer",
2886
+ "primaryKey": false,
2887
+ "notNull": false
2888
+ },
2889
+ "estimated_cost": {
2890
+ "name": "estimated_cost",
2891
+ "type": "double precision",
2892
+ "primaryKey": false,
2893
+ "notNull": false
2894
+ },
2895
+ "tool_call_count": {
2896
+ "name": "tool_call_count",
2897
+ "type": "integer",
2898
+ "primaryKey": false,
2899
+ "notNull": false
2900
+ },
2901
+ "input": {
2902
+ "name": "input",
2903
+ "type": "text",
2904
+ "primaryKey": false,
2905
+ "notNull": false
2906
+ },
2907
+ "output": {
2908
+ "name": "output",
2909
+ "type": "text",
2910
+ "primaryKey": false,
2911
+ "notNull": false
2912
+ }
2913
+ },
2914
+ "indexes": {
2915
+ "idx_workflow_step_spans_status": {
2916
+ "name": "idx_workflow_step_spans_status",
2917
+ "columns": [
2918
+ {
2919
+ "expression": "status",
2920
+ "isExpression": false,
2921
+ "asc": true,
2922
+ "nulls": "last"
2923
+ }
2924
+ ],
2925
+ "isUnique": false,
2926
+ "concurrently": false,
2927
+ "method": "btree",
2928
+ "with": {}
2929
+ }
2930
+ },
2931
+ "foreignKeys": {
2932
+ "workflow_step_spans_execution_id_workflow_executions_id_fk": {
2933
+ "name": "workflow_step_spans_execution_id_workflow_executions_id_fk",
2934
+ "tableFrom": "workflow_step_spans",
2935
+ "tableTo": "workflow_executions",
2936
+ "columnsFrom": ["execution_id"],
2937
+ "columnsTo": ["id"],
2938
+ "onDelete": "cascade",
2939
+ "onUpdate": "no action"
2940
+ }
2941
+ },
2942
+ "compositePrimaryKeys": {
2943
+ "workflow_step_spans_execution_id_frame_id_pk": {
2944
+ "name": "workflow_step_spans_execution_id_frame_id_pk",
2945
+ "columns": ["execution_id", "frame_id"]
2946
+ }
2947
+ },
2948
+ "uniqueConstraints": {},
2949
+ "policies": {},
2950
+ "checkConstraints": {},
2951
+ "isRLSEnabled": false
2952
+ },
2953
+ "public.worklog_artifact_writes": {
2954
+ "name": "worklog_artifact_writes",
2955
+ "schema": "",
2956
+ "columns": {
2957
+ "id": {
2958
+ "name": "id",
2959
+ "type": "text",
2960
+ "primaryKey": true,
2961
+ "notNull": true
2962
+ },
2963
+ "execution_id": {
2964
+ "name": "execution_id",
2965
+ "type": "text",
2966
+ "primaryKey": false,
2967
+ "notNull": true
2968
+ },
2969
+ "frame_id": {
2970
+ "name": "frame_id",
2971
+ "type": "text",
2972
+ "primaryKey": false,
2973
+ "notNull": true
2974
+ },
2975
+ "node_id": {
2976
+ "name": "node_id",
2977
+ "type": "text",
2978
+ "primaryKey": false,
2979
+ "notNull": true
2980
+ },
2981
+ "artifact": {
2982
+ "name": "artifact",
2983
+ "type": "jsonb",
2984
+ "primaryKey": false,
2985
+ "notNull": true
2986
+ },
2987
+ "revision": {
2988
+ "name": "revision",
2989
+ "type": "text",
2990
+ "primaryKey": false,
2991
+ "notNull": false
2992
+ },
2993
+ "written_at": {
2994
+ "name": "written_at",
2995
+ "type": "bigint",
2996
+ "primaryKey": false,
2997
+ "notNull": true
2998
+ }
2999
+ },
3000
+ "indexes": {
3001
+ "idx_worklog_artifact_writes_execution": {
3002
+ "name": "idx_worklog_artifact_writes_execution",
3003
+ "columns": [
3004
+ {
3005
+ "expression": "execution_id",
3006
+ "isExpression": false,
3007
+ "asc": true,
3008
+ "nulls": "last"
3009
+ }
3010
+ ],
3011
+ "isUnique": false,
3012
+ "concurrently": false,
3013
+ "method": "btree",
3014
+ "with": {}
3015
+ }
3016
+ },
3017
+ "foreignKeys": {
3018
+ "worklog_artifact_writes_execution_id_workflow_executions_id_fk": {
3019
+ "name": "worklog_artifact_writes_execution_id_workflow_executions_id_fk",
3020
+ "tableFrom": "worklog_artifact_writes",
3021
+ "tableTo": "workflow_executions",
3022
+ "columnsFrom": ["execution_id"],
3023
+ "columnsTo": ["id"],
3024
+ "onDelete": "cascade",
3025
+ "onUpdate": "no action"
3026
+ }
3027
+ },
3028
+ "compositePrimaryKeys": {},
3029
+ "uniqueConstraints": {},
3030
+ "policies": {},
3031
+ "checkConstraints": {},
3032
+ "isRLSEnabled": false
3033
+ },
3034
+ "public.worklog_frame_entries": {
3035
+ "name": "worklog_frame_entries",
3036
+ "schema": "",
3037
+ "columns": {
3038
+ "frame_id": {
3039
+ "name": "frame_id",
3040
+ "type": "text",
3041
+ "primaryKey": true,
3042
+ "notNull": true
3043
+ },
3044
+ "execution_id": {
3045
+ "name": "execution_id",
3046
+ "type": "text",
3047
+ "primaryKey": false,
3048
+ "notNull": true
3049
+ },
3050
+ "node_id": {
3051
+ "name": "node_id",
3052
+ "type": "text",
3053
+ "primaryKey": false,
3054
+ "notNull": true
3055
+ },
3056
+ "node_type": {
3057
+ "name": "node_type",
3058
+ "type": "text",
3059
+ "primaryKey": false,
3060
+ "notNull": true
3061
+ },
3062
+ "path": {
3063
+ "name": "path",
3064
+ "type": "jsonb",
3065
+ "primaryKey": false,
3066
+ "notNull": true
3067
+ },
3068
+ "status": {
3069
+ "name": "status",
3070
+ "type": "text",
3071
+ "primaryKey": false,
3072
+ "notNull": true
3073
+ },
3074
+ "attempt": {
3075
+ "name": "attempt",
3076
+ "type": "integer",
3077
+ "primaryKey": false,
3078
+ "notNull": true,
3079
+ "default": 0
3080
+ },
3081
+ "iteration": {
3082
+ "name": "iteration",
3083
+ "type": "integer",
3084
+ "primaryKey": false,
3085
+ "notNull": false
3086
+ },
3087
+ "branch_key": {
3088
+ "name": "branch_key",
3089
+ "type": "text",
3090
+ "primaryKey": false,
3091
+ "notNull": false
3092
+ },
3093
+ "started_at": {
3094
+ "name": "started_at",
3095
+ "type": "bigint",
3096
+ "primaryKey": false,
3097
+ "notNull": false
3098
+ },
3099
+ "completed_at": {
3100
+ "name": "completed_at",
3101
+ "type": "bigint",
3102
+ "primaryKey": false,
3103
+ "notNull": false
3104
+ },
3105
+ "duration_ms": {
3106
+ "name": "duration_ms",
3107
+ "type": "integer",
3108
+ "primaryKey": false,
3109
+ "notNull": false
3110
+ },
3111
+ "input_tokens": {
3112
+ "name": "input_tokens",
3113
+ "type": "integer",
3114
+ "primaryKey": false,
3115
+ "notNull": false
3116
+ },
3117
+ "output_tokens": {
3118
+ "name": "output_tokens",
3119
+ "type": "integer",
3120
+ "primaryKey": false,
3121
+ "notNull": false
3122
+ },
3123
+ "estimated_cost": {
3124
+ "name": "estimated_cost",
3125
+ "type": "double precision",
3126
+ "primaryKey": false,
3127
+ "notNull": false
3128
+ },
3129
+ "error": {
3130
+ "name": "error",
3131
+ "type": "text",
3132
+ "primaryKey": false,
3133
+ "notNull": false
3134
+ }
3135
+ },
3136
+ "indexes": {
3137
+ "idx_worklog_frame_entries_execution": {
3138
+ "name": "idx_worklog_frame_entries_execution",
3139
+ "columns": [
3140
+ {
3141
+ "expression": "execution_id",
3142
+ "isExpression": false,
3143
+ "asc": true,
3144
+ "nulls": "last"
3145
+ }
3146
+ ],
3147
+ "isUnique": false,
3148
+ "concurrently": false,
3149
+ "method": "btree",
3150
+ "with": {}
3151
+ }
3152
+ },
3153
+ "foreignKeys": {
3154
+ "worklog_frame_entries_execution_id_workflow_executions_id_fk": {
3155
+ "name": "worklog_frame_entries_execution_id_workflow_executions_id_fk",
3156
+ "tableFrom": "worklog_frame_entries",
3157
+ "tableTo": "workflow_executions",
3158
+ "columnsFrom": ["execution_id"],
3159
+ "columnsTo": ["id"],
3160
+ "onDelete": "cascade",
3161
+ "onUpdate": "no action"
3162
+ }
3163
+ },
3164
+ "compositePrimaryKeys": {},
3165
+ "uniqueConstraints": {},
3166
+ "policies": {},
3167
+ "checkConstraints": {},
3168
+ "isRLSEnabled": false
3169
+ },
3170
+ "public.worklog_gate_events": {
3171
+ "name": "worklog_gate_events",
3172
+ "schema": "",
3173
+ "columns": {
3174
+ "id": {
3175
+ "name": "id",
3176
+ "type": "text",
3177
+ "primaryKey": true,
3178
+ "notNull": true
3179
+ },
3180
+ "execution_id": {
3181
+ "name": "execution_id",
3182
+ "type": "text",
3183
+ "primaryKey": false,
3184
+ "notNull": true
3185
+ },
3186
+ "node_id": {
3187
+ "name": "node_id",
3188
+ "type": "text",
3189
+ "primaryKey": false,
3190
+ "notNull": true
3191
+ },
3192
+ "frame_id": {
3193
+ "name": "frame_id",
3194
+ "type": "text",
3195
+ "primaryKey": false,
3196
+ "notNull": true
3197
+ },
3198
+ "status": {
3199
+ "name": "status",
3200
+ "type": "text",
3201
+ "primaryKey": false,
3202
+ "notNull": true
3203
+ },
3204
+ "prompt": {
3205
+ "name": "prompt",
3206
+ "type": "text",
3207
+ "primaryKey": false,
3208
+ "notNull": false
3209
+ },
3210
+ "opened_at": {
3211
+ "name": "opened_at",
3212
+ "type": "bigint",
3213
+ "primaryKey": false,
3214
+ "notNull": true
3215
+ },
3216
+ "resolved_at": {
3217
+ "name": "resolved_at",
3218
+ "type": "bigint",
3219
+ "primaryKey": false,
3220
+ "notNull": false
3221
+ },
3222
+ "resume_data": {
3223
+ "name": "resume_data",
3224
+ "type": "jsonb",
3225
+ "primaryKey": false,
3226
+ "notNull": false
3227
+ }
3228
+ },
3229
+ "indexes": {
3230
+ "idx_worklog_gate_events_execution": {
3231
+ "name": "idx_worklog_gate_events_execution",
3232
+ "columns": [
3233
+ {
3234
+ "expression": "execution_id",
3235
+ "isExpression": false,
3236
+ "asc": true,
3237
+ "nulls": "last"
3238
+ }
3239
+ ],
3240
+ "isUnique": false,
3241
+ "concurrently": false,
3242
+ "method": "btree",
3243
+ "with": {}
3244
+ },
3245
+ "idx_worklog_gate_events_status": {
3246
+ "name": "idx_worklog_gate_events_status",
3247
+ "columns": [
3248
+ {
3249
+ "expression": "status",
3250
+ "isExpression": false,
3251
+ "asc": true,
3252
+ "nulls": "last"
3253
+ }
3254
+ ],
3255
+ "isUnique": false,
3256
+ "concurrently": false,
3257
+ "method": "btree",
3258
+ "with": {}
3259
+ }
3260
+ },
3261
+ "foreignKeys": {
3262
+ "worklog_gate_events_execution_id_workflow_executions_id_fk": {
3263
+ "name": "worklog_gate_events_execution_id_workflow_executions_id_fk",
3264
+ "tableFrom": "worklog_gate_events",
3265
+ "tableTo": "workflow_executions",
3266
+ "columnsFrom": ["execution_id"],
3267
+ "columnsTo": ["id"],
3268
+ "onDelete": "cascade",
3269
+ "onUpdate": "no action"
3270
+ }
3271
+ },
3272
+ "compositePrimaryKeys": {},
3273
+ "uniqueConstraints": {},
3274
+ "policies": {},
3275
+ "checkConstraints": {},
3276
+ "isRLSEnabled": false
3277
+ },
3278
+ "public.worklog_summaries": {
3279
+ "name": "worklog_summaries",
3280
+ "schema": "",
3281
+ "columns": {
3282
+ "execution_id": {
3283
+ "name": "execution_id",
3284
+ "type": "text",
3285
+ "primaryKey": true,
3286
+ "notNull": true
3287
+ },
3288
+ "workflow_id": {
3289
+ "name": "workflow_id",
3290
+ "type": "text",
3291
+ "primaryKey": false,
3292
+ "notNull": true
3293
+ },
3294
+ "workflow_name": {
3295
+ "name": "workflow_name",
3296
+ "type": "text",
3297
+ "primaryKey": false,
3298
+ "notNull": false
3299
+ },
3300
+ "status": {
3301
+ "name": "status",
3302
+ "type": "text",
3303
+ "primaryKey": false,
3304
+ "notNull": true
3305
+ },
3306
+ "started_at": {
3307
+ "name": "started_at",
3308
+ "type": "bigint",
3309
+ "primaryKey": false,
3310
+ "notNull": true
3311
+ },
3312
+ "completed_at": {
3313
+ "name": "completed_at",
3314
+ "type": "bigint",
3315
+ "primaryKey": false,
3316
+ "notNull": false
3317
+ },
3318
+ "duration_ms": {
3319
+ "name": "duration_ms",
3320
+ "type": "integer",
3321
+ "primaryKey": false,
3322
+ "notNull": false
3323
+ },
3324
+ "total_input_tokens": {
3325
+ "name": "total_input_tokens",
3326
+ "type": "integer",
3327
+ "primaryKey": false,
3328
+ "notNull": false
3329
+ },
3330
+ "total_output_tokens": {
3331
+ "name": "total_output_tokens",
3332
+ "type": "integer",
3333
+ "primaryKey": false,
3334
+ "notNull": false
3335
+ },
3336
+ "total_estimated_cost": {
3337
+ "name": "total_estimated_cost",
3338
+ "type": "double precision",
3339
+ "primaryKey": false,
3340
+ "notNull": false
3341
+ },
3342
+ "error": {
3343
+ "name": "error",
3344
+ "type": "text",
3345
+ "primaryKey": false,
3346
+ "notNull": false
3347
+ },
3348
+ "failed_node_id": {
3349
+ "name": "failed_node_id",
3350
+ "type": "text",
3351
+ "primaryKey": false,
3352
+ "notNull": false
3353
+ }
3354
+ },
3355
+ "indexes": {
3356
+ "idx_worklog_summaries_workflow_started": {
3357
+ "name": "idx_worklog_summaries_workflow_started",
3358
+ "columns": [
3359
+ {
3360
+ "expression": "workflow_id",
3361
+ "isExpression": false,
3362
+ "asc": true,
3363
+ "nulls": "last"
3364
+ },
3365
+ {
3366
+ "expression": "started_at",
3367
+ "isExpression": false,
3368
+ "asc": true,
3369
+ "nulls": "last"
3370
+ }
3371
+ ],
3372
+ "isUnique": false,
3373
+ "concurrently": false,
3374
+ "method": "btree",
3375
+ "with": {}
3376
+ },
3377
+ "idx_worklog_summaries_status": {
3378
+ "name": "idx_worklog_summaries_status",
3379
+ "columns": [
3380
+ {
3381
+ "expression": "status",
3382
+ "isExpression": false,
3383
+ "asc": true,
3384
+ "nulls": "last"
3385
+ }
3386
+ ],
3387
+ "isUnique": false,
3388
+ "concurrently": false,
3389
+ "method": "btree",
3390
+ "with": {}
3391
+ }
3392
+ },
3393
+ "foreignKeys": {
3394
+ "worklog_summaries_execution_id_workflow_executions_id_fk": {
3395
+ "name": "worklog_summaries_execution_id_workflow_executions_id_fk",
3396
+ "tableFrom": "worklog_summaries",
3397
+ "tableTo": "workflow_executions",
3398
+ "columnsFrom": ["execution_id"],
3399
+ "columnsTo": ["id"],
3400
+ "onDelete": "cascade",
3401
+ "onUpdate": "no action"
3402
+ }
3403
+ },
3404
+ "compositePrimaryKeys": {},
3405
+ "uniqueConstraints": {},
3406
+ "policies": {},
3407
+ "checkConstraints": {},
3408
+ "isRLSEnabled": false
3409
+ }
3410
+ },
3411
+ "enums": {},
3412
+ "schemas": {},
3413
+ "sequences": {},
3414
+ "roles": {},
3415
+ "policies": {},
3416
+ "views": {},
3417
+ "_meta": {
3418
+ "columns": {},
3419
+ "schemas": {},
3420
+ "tables": {}
3421
+ }
3422
+ }