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

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