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

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