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