@makaio/storage-pg 1.0.0-dev-1781454904823 → 1.0.0-dev-1781884053376

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