@rzx/ohs 1.2.24 → 1.2.25

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,4136 @@
1
+ {
2
+ "version": "6",
3
+ "dialect": "sqlite",
4
+ "id": "dd3edc40-323a-409d-ae2a-2819597ff411",
5
+ "prevId": "923ab4f9-9eb5-461a-9822-ecf7c3da1f49",
6
+ "tables": {
7
+ "application_owner": {
8
+ "name": "application_owner",
9
+ "columns": {
10
+ "key": {
11
+ "name": "key",
12
+ "type": "text",
13
+ "primaryKey": true,
14
+ "notNull": true,
15
+ "autoincrement": false
16
+ },
17
+ "owner_id": {
18
+ "name": "owner_id",
19
+ "type": "text",
20
+ "primaryKey": false,
21
+ "notNull": true,
22
+ "autoincrement": false
23
+ },
24
+ "pid": {
25
+ "name": "pid",
26
+ "type": "integer",
27
+ "primaryKey": false,
28
+ "notNull": true,
29
+ "autoincrement": false
30
+ },
31
+ "generation": {
32
+ "name": "generation",
33
+ "type": "integer",
34
+ "primaryKey": false,
35
+ "notNull": true,
36
+ "autoincrement": false
37
+ },
38
+ "started_at": {
39
+ "name": "started_at",
40
+ "type": "integer",
41
+ "primaryKey": false,
42
+ "notNull": true,
43
+ "autoincrement": false
44
+ },
45
+ "heartbeat_at": {
46
+ "name": "heartbeat_at",
47
+ "type": "integer",
48
+ "primaryKey": false,
49
+ "notNull": true,
50
+ "autoincrement": false
51
+ }
52
+ },
53
+ "indexes": {},
54
+ "foreignKeys": {},
55
+ "compositePrimaryKeys": {},
56
+ "uniqueConstraints": {},
57
+ "checkConstraints": {}
58
+ },
59
+ "attachment_asset": {
60
+ "name": "attachment_asset",
61
+ "columns": {
62
+ "id": {
63
+ "name": "id",
64
+ "type": "text",
65
+ "primaryKey": true,
66
+ "notNull": true,
67
+ "autoincrement": false
68
+ },
69
+ "display_name": {
70
+ "name": "display_name",
71
+ "type": "text",
72
+ "primaryKey": false,
73
+ "notNull": true,
74
+ "autoincrement": false
75
+ },
76
+ "declared_media_type": {
77
+ "name": "declared_media_type",
78
+ "type": "text",
79
+ "primaryKey": false,
80
+ "notNull": false,
81
+ "autoincrement": false
82
+ },
83
+ "media_type": {
84
+ "name": "media_type",
85
+ "type": "text",
86
+ "primaryKey": false,
87
+ "notNull": false,
88
+ "autoincrement": false
89
+ },
90
+ "size_bytes": {
91
+ "name": "size_bytes",
92
+ "type": "integer",
93
+ "primaryKey": false,
94
+ "notNull": false,
95
+ "autoincrement": false
96
+ },
97
+ "sha256": {
98
+ "name": "sha256",
99
+ "type": "text",
100
+ "primaryKey": false,
101
+ "notNull": false,
102
+ "autoincrement": false
103
+ },
104
+ "status": {
105
+ "name": "status",
106
+ "type": "text",
107
+ "primaryKey": false,
108
+ "notNull": true,
109
+ "autoincrement": false
110
+ },
111
+ "staging_name": {
112
+ "name": "staging_name",
113
+ "type": "text",
114
+ "primaryKey": false,
115
+ "notNull": false,
116
+ "autoincrement": false
117
+ },
118
+ "failure_code": {
119
+ "name": "failure_code",
120
+ "type": "text",
121
+ "primaryKey": false,
122
+ "notNull": false,
123
+ "autoincrement": false
124
+ },
125
+ "chat_sources_json": {
126
+ "name": "chat_sources_json",
127
+ "type": "text",
128
+ "primaryKey": false,
129
+ "notNull": false,
130
+ "autoincrement": false
131
+ },
132
+ "created_at": {
133
+ "name": "created_at",
134
+ "type": "integer",
135
+ "primaryKey": false,
136
+ "notNull": true,
137
+ "autoincrement": false
138
+ },
139
+ "updated_at": {
140
+ "name": "updated_at",
141
+ "type": "integer",
142
+ "primaryKey": false,
143
+ "notNull": true,
144
+ "autoincrement": false
145
+ },
146
+ "deleted_at": {
147
+ "name": "deleted_at",
148
+ "type": "integer",
149
+ "primaryKey": false,
150
+ "notNull": false,
151
+ "autoincrement": false
152
+ }
153
+ },
154
+ "indexes": {
155
+ "attachment_asset_hash_status_idx": {
156
+ "name": "attachment_asset_hash_status_idx",
157
+ "columns": [
158
+ "sha256",
159
+ "status"
160
+ ],
161
+ "isUnique": false
162
+ },
163
+ "attachment_asset_status_updated_idx": {
164
+ "name": "attachment_asset_status_updated_idx",
165
+ "columns": [
166
+ "status",
167
+ "updated_at"
168
+ ],
169
+ "isUnique": false
170
+ }
171
+ },
172
+ "foreignKeys": {},
173
+ "compositePrimaryKeys": {},
174
+ "uniqueConstraints": {},
175
+ "checkConstraints": {}
176
+ },
177
+ "attachment_lease": {
178
+ "name": "attachment_lease",
179
+ "columns": {
180
+ "id": {
181
+ "name": "id",
182
+ "type": "text",
183
+ "primaryKey": true,
184
+ "notNull": true,
185
+ "autoincrement": false
186
+ },
187
+ "asset_id": {
188
+ "name": "asset_id",
189
+ "type": "text",
190
+ "primaryKey": false,
191
+ "notNull": true,
192
+ "autoincrement": false
193
+ },
194
+ "owner_kind": {
195
+ "name": "owner_kind",
196
+ "type": "text",
197
+ "primaryKey": false,
198
+ "notNull": true,
199
+ "autoincrement": false
200
+ },
201
+ "owner_id": {
202
+ "name": "owner_id",
203
+ "type": "text",
204
+ "primaryKey": false,
205
+ "notNull": true,
206
+ "autoincrement": false
207
+ },
208
+ "created_at": {
209
+ "name": "created_at",
210
+ "type": "integer",
211
+ "primaryKey": false,
212
+ "notNull": true,
213
+ "autoincrement": false
214
+ },
215
+ "renewed_at": {
216
+ "name": "renewed_at",
217
+ "type": "integer",
218
+ "primaryKey": false,
219
+ "notNull": true,
220
+ "autoincrement": false
221
+ },
222
+ "expires_at": {
223
+ "name": "expires_at",
224
+ "type": "integer",
225
+ "primaryKey": false,
226
+ "notNull": true,
227
+ "autoincrement": false
228
+ }
229
+ },
230
+ "indexes": {
231
+ "attachment_lease_asset_owner_unique": {
232
+ "name": "attachment_lease_asset_owner_unique",
233
+ "columns": [
234
+ "asset_id",
235
+ "owner_kind",
236
+ "owner_id"
237
+ ],
238
+ "isUnique": true
239
+ },
240
+ "attachment_lease_expiry_idx": {
241
+ "name": "attachment_lease_expiry_idx",
242
+ "columns": [
243
+ "expires_at",
244
+ "asset_id"
245
+ ],
246
+ "isUnique": false
247
+ }
248
+ },
249
+ "foreignKeys": {
250
+ "attachment_lease_asset_id_attachment_asset_id_fk": {
251
+ "name": "attachment_lease_asset_id_attachment_asset_id_fk",
252
+ "tableFrom": "attachment_lease",
253
+ "tableTo": "attachment_asset",
254
+ "columnsFrom": [
255
+ "asset_id"
256
+ ],
257
+ "columnsTo": [
258
+ "id"
259
+ ],
260
+ "onDelete": "cascade",
261
+ "onUpdate": "no action"
262
+ }
263
+ },
264
+ "compositePrimaryKeys": {},
265
+ "uniqueConstraints": {},
266
+ "checkConstraints": {}
267
+ },
268
+ "attachment_representation": {
269
+ "name": "attachment_representation",
270
+ "columns": {
271
+ "id": {
272
+ "name": "id",
273
+ "type": "text",
274
+ "primaryKey": true,
275
+ "notNull": true,
276
+ "autoincrement": false
277
+ },
278
+ "asset_id": {
279
+ "name": "asset_id",
280
+ "type": "text",
281
+ "primaryKey": false,
282
+ "notNull": true,
283
+ "autoincrement": false
284
+ },
285
+ "kind": {
286
+ "name": "kind",
287
+ "type": "text",
288
+ "primaryKey": false,
289
+ "notNull": true,
290
+ "autoincrement": false
291
+ },
292
+ "status": {
293
+ "name": "status",
294
+ "type": "text",
295
+ "primaryKey": false,
296
+ "notNull": true,
297
+ "autoincrement": false
298
+ },
299
+ "processor": {
300
+ "name": "processor",
301
+ "type": "text",
302
+ "primaryKey": false,
303
+ "notNull": true,
304
+ "autoincrement": false
305
+ },
306
+ "processor_version": {
307
+ "name": "processor_version",
308
+ "type": "text",
309
+ "primaryKey": false,
310
+ "notNull": true,
311
+ "autoincrement": false
312
+ },
313
+ "cache_key": {
314
+ "name": "cache_key",
315
+ "type": "text",
316
+ "primaryKey": false,
317
+ "notNull": true,
318
+ "autoincrement": false
319
+ },
320
+ "media_type": {
321
+ "name": "media_type",
322
+ "type": "text",
323
+ "primaryKey": false,
324
+ "notNull": true,
325
+ "autoincrement": false
326
+ },
327
+ "text": {
328
+ "name": "text",
329
+ "type": "text",
330
+ "primaryKey": false,
331
+ "notNull": false,
332
+ "autoincrement": false
333
+ },
334
+ "error": {
335
+ "name": "error",
336
+ "type": "text",
337
+ "primaryKey": false,
338
+ "notNull": false,
339
+ "autoincrement": false
340
+ },
341
+ "metadata_json": {
342
+ "name": "metadata_json",
343
+ "type": "text",
344
+ "primaryKey": false,
345
+ "notNull": true,
346
+ "autoincrement": false
347
+ },
348
+ "created_at": {
349
+ "name": "created_at",
350
+ "type": "integer",
351
+ "primaryKey": false,
352
+ "notNull": true,
353
+ "autoincrement": false
354
+ },
355
+ "updated_at": {
356
+ "name": "updated_at",
357
+ "type": "integer",
358
+ "primaryKey": false,
359
+ "notNull": true,
360
+ "autoincrement": false
361
+ }
362
+ },
363
+ "indexes": {
364
+ "attachment_representation_asset_kind_cache_unique": {
365
+ "name": "attachment_representation_asset_kind_cache_unique",
366
+ "columns": [
367
+ "asset_id",
368
+ "kind",
369
+ "cache_key"
370
+ ],
371
+ "isUnique": true
372
+ },
373
+ "attachment_representation_asset_idx": {
374
+ "name": "attachment_representation_asset_idx",
375
+ "columns": [
376
+ "asset_id",
377
+ "created_at"
378
+ ],
379
+ "isUnique": false
380
+ }
381
+ },
382
+ "foreignKeys": {
383
+ "attachment_representation_asset_id_attachment_asset_id_fk": {
384
+ "name": "attachment_representation_asset_id_attachment_asset_id_fk",
385
+ "tableFrom": "attachment_representation",
386
+ "tableTo": "attachment_asset",
387
+ "columnsFrom": [
388
+ "asset_id"
389
+ ],
390
+ "columnsTo": [
391
+ "id"
392
+ ],
393
+ "onDelete": "cascade",
394
+ "onUpdate": "no action"
395
+ }
396
+ },
397
+ "compositePrimaryKeys": {},
398
+ "uniqueConstraints": {},
399
+ "checkConstraints": {}
400
+ },
401
+ "channel_delivery": {
402
+ "name": "channel_delivery",
403
+ "columns": {
404
+ "id": {
405
+ "name": "id",
406
+ "type": "text",
407
+ "primaryKey": true,
408
+ "notNull": true,
409
+ "autoincrement": false
410
+ },
411
+ "conversation_id": {
412
+ "name": "conversation_id",
413
+ "type": "text",
414
+ "primaryKey": false,
415
+ "notNull": true,
416
+ "autoincrement": false
417
+ },
418
+ "connector": {
419
+ "name": "connector",
420
+ "type": "text",
421
+ "primaryKey": false,
422
+ "notNull": true,
423
+ "autoincrement": false
424
+ },
425
+ "account_id": {
426
+ "name": "account_id",
427
+ "type": "text",
428
+ "primaryKey": false,
429
+ "notNull": true,
430
+ "autoincrement": false
431
+ },
432
+ "chat_id": {
433
+ "name": "chat_id",
434
+ "type": "text",
435
+ "primaryKey": false,
436
+ "notNull": true,
437
+ "autoincrement": false
438
+ },
439
+ "thread_id": {
440
+ "name": "thread_id",
441
+ "type": "text",
442
+ "primaryKey": false,
443
+ "notNull": true,
444
+ "autoincrement": false,
445
+ "default": "''"
446
+ },
447
+ "session_id": {
448
+ "name": "session_id",
449
+ "type": "text",
450
+ "primaryKey": false,
451
+ "notNull": true,
452
+ "autoincrement": false
453
+ },
454
+ "input_id": {
455
+ "name": "input_id",
456
+ "type": "text",
457
+ "primaryKey": false,
458
+ "notNull": true,
459
+ "autoincrement": false
460
+ },
461
+ "run_id": {
462
+ "name": "run_id",
463
+ "type": "text",
464
+ "primaryKey": false,
465
+ "notNull": true,
466
+ "autoincrement": false
467
+ },
468
+ "external_message_id": {
469
+ "name": "external_message_id",
470
+ "type": "text",
471
+ "primaryKey": false,
472
+ "notNull": true,
473
+ "autoincrement": false
474
+ },
475
+ "content": {
476
+ "name": "content",
477
+ "type": "text",
478
+ "primaryKey": false,
479
+ "notNull": true,
480
+ "autoincrement": false
481
+ },
482
+ "status": {
483
+ "name": "status",
484
+ "type": "text",
485
+ "primaryKey": false,
486
+ "notNull": true,
487
+ "autoincrement": false
488
+ },
489
+ "attempt_count": {
490
+ "name": "attempt_count",
491
+ "type": "integer",
492
+ "primaryKey": false,
493
+ "notNull": true,
494
+ "autoincrement": false,
495
+ "default": 0
496
+ },
497
+ "external_delivery_id": {
498
+ "name": "external_delivery_id",
499
+ "type": "text",
500
+ "primaryKey": false,
501
+ "notNull": false,
502
+ "autoincrement": false
503
+ },
504
+ "platform_meta_json": {
505
+ "name": "platform_meta_json",
506
+ "type": "text",
507
+ "primaryKey": false,
508
+ "notNull": false,
509
+ "autoincrement": false
510
+ },
511
+ "error": {
512
+ "name": "error",
513
+ "type": "text",
514
+ "primaryKey": false,
515
+ "notNull": false,
516
+ "autoincrement": false
517
+ },
518
+ "created_at": {
519
+ "name": "created_at",
520
+ "type": "integer",
521
+ "primaryKey": false,
522
+ "notNull": true,
523
+ "autoincrement": false
524
+ },
525
+ "updated_at": {
526
+ "name": "updated_at",
527
+ "type": "integer",
528
+ "primaryKey": false,
529
+ "notNull": true,
530
+ "autoincrement": false
531
+ },
532
+ "sent_at": {
533
+ "name": "sent_at",
534
+ "type": "integer",
535
+ "primaryKey": false,
536
+ "notNull": false,
537
+ "autoincrement": false
538
+ }
539
+ },
540
+ "indexes": {
541
+ "channel_delivery_input_unique": {
542
+ "name": "channel_delivery_input_unique",
543
+ "columns": [
544
+ "input_id"
545
+ ],
546
+ "isUnique": true
547
+ },
548
+ "channel_delivery_status_idx": {
549
+ "name": "channel_delivery_status_idx",
550
+ "columns": [
551
+ "status",
552
+ "updated_at"
553
+ ],
554
+ "isUnique": false
555
+ }
556
+ },
557
+ "foreignKeys": {
558
+ "channel_delivery_conversation_id_external_conversation_id_fk": {
559
+ "name": "channel_delivery_conversation_id_external_conversation_id_fk",
560
+ "tableFrom": "channel_delivery",
561
+ "tableTo": "external_conversation",
562
+ "columnsFrom": [
563
+ "conversation_id"
564
+ ],
565
+ "columnsTo": [
566
+ "id"
567
+ ],
568
+ "onDelete": "cascade",
569
+ "onUpdate": "no action"
570
+ },
571
+ "channel_delivery_session_id_session_id_fk": {
572
+ "name": "channel_delivery_session_id_session_id_fk",
573
+ "tableFrom": "channel_delivery",
574
+ "tableTo": "session",
575
+ "columnsFrom": [
576
+ "session_id"
577
+ ],
578
+ "columnsTo": [
579
+ "id"
580
+ ],
581
+ "onDelete": "cascade",
582
+ "onUpdate": "no action"
583
+ },
584
+ "channel_delivery_input_id_session_input_id_fk": {
585
+ "name": "channel_delivery_input_id_session_input_id_fk",
586
+ "tableFrom": "channel_delivery",
587
+ "tableTo": "session_input",
588
+ "columnsFrom": [
589
+ "input_id"
590
+ ],
591
+ "columnsTo": [
592
+ "id"
593
+ ],
594
+ "onDelete": "cascade",
595
+ "onUpdate": "no action"
596
+ },
597
+ "channel_delivery_run_id_session_run_id_fk": {
598
+ "name": "channel_delivery_run_id_session_run_id_fk",
599
+ "tableFrom": "channel_delivery",
600
+ "tableTo": "session_run",
601
+ "columnsFrom": [
602
+ "run_id"
603
+ ],
604
+ "columnsTo": [
605
+ "id"
606
+ ],
607
+ "onDelete": "cascade",
608
+ "onUpdate": "no action"
609
+ }
610
+ },
611
+ "compositePrimaryKeys": {},
612
+ "uniqueConstraints": {},
613
+ "checkConstraints": {}
614
+ },
615
+ "execution": {
616
+ "name": "execution",
617
+ "columns": {
618
+ "id": {
619
+ "name": "id",
620
+ "type": "text",
621
+ "primaryKey": true,
622
+ "notNull": true,
623
+ "autoincrement": false
624
+ },
625
+ "session_id": {
626
+ "name": "session_id",
627
+ "type": "text",
628
+ "primaryKey": false,
629
+ "notNull": true,
630
+ "autoincrement": false
631
+ },
632
+ "run_id": {
633
+ "name": "run_id",
634
+ "type": "text",
635
+ "primaryKey": false,
636
+ "notNull": true,
637
+ "autoincrement": false
638
+ },
639
+ "data_json": {
640
+ "name": "data_json",
641
+ "type": "text",
642
+ "primaryKey": false,
643
+ "notNull": true,
644
+ "autoincrement": false
645
+ }
646
+ },
647
+ "indexes": {
648
+ "execution_run_idx": {
649
+ "name": "execution_run_idx",
650
+ "columns": [
651
+ "run_id"
652
+ ],
653
+ "isUnique": true
654
+ },
655
+ "execution_session_idx": {
656
+ "name": "execution_session_idx",
657
+ "columns": [
658
+ "session_id"
659
+ ],
660
+ "isUnique": false
661
+ }
662
+ },
663
+ "foreignKeys": {},
664
+ "compositePrimaryKeys": {},
665
+ "uniqueConstraints": {},
666
+ "checkConstraints": {}
667
+ },
668
+ "external_conversation": {
669
+ "name": "external_conversation",
670
+ "columns": {
671
+ "id": {
672
+ "name": "id",
673
+ "type": "text",
674
+ "primaryKey": true,
675
+ "notNull": true,
676
+ "autoincrement": false
677
+ },
678
+ "connector": {
679
+ "name": "connector",
680
+ "type": "text",
681
+ "primaryKey": false,
682
+ "notNull": true,
683
+ "autoincrement": false
684
+ },
685
+ "account_id": {
686
+ "name": "account_id",
687
+ "type": "text",
688
+ "primaryKey": false,
689
+ "notNull": true,
690
+ "autoincrement": false
691
+ },
692
+ "workspace_id": {
693
+ "name": "workspace_id",
694
+ "type": "text",
695
+ "primaryKey": false,
696
+ "notNull": false,
697
+ "autoincrement": false
698
+ },
699
+ "chat_id": {
700
+ "name": "chat_id",
701
+ "type": "text",
702
+ "primaryKey": false,
703
+ "notNull": true,
704
+ "autoincrement": false
705
+ },
706
+ "thread_id": {
707
+ "name": "thread_id",
708
+ "type": "text",
709
+ "primaryKey": false,
710
+ "notNull": true,
711
+ "autoincrement": false,
712
+ "default": "''"
713
+ },
714
+ "session_id": {
715
+ "name": "session_id",
716
+ "type": "text",
717
+ "primaryKey": false,
718
+ "notNull": true,
719
+ "autoincrement": false
720
+ },
721
+ "created_at": {
722
+ "name": "created_at",
723
+ "type": "integer",
724
+ "primaryKey": false,
725
+ "notNull": true,
726
+ "autoincrement": false
727
+ },
728
+ "updated_at": {
729
+ "name": "updated_at",
730
+ "type": "integer",
731
+ "primaryKey": false,
732
+ "notNull": true,
733
+ "autoincrement": false
734
+ }
735
+ },
736
+ "indexes": {
737
+ "external_conversation_identity_unique": {
738
+ "name": "external_conversation_identity_unique",
739
+ "columns": [
740
+ "connector",
741
+ "account_id",
742
+ "chat_id",
743
+ "thread_id"
744
+ ],
745
+ "isUnique": true
746
+ },
747
+ "external_conversation_session_idx": {
748
+ "name": "external_conversation_session_idx",
749
+ "columns": [
750
+ "session_id"
751
+ ],
752
+ "isUnique": false
753
+ }
754
+ },
755
+ "foreignKeys": {
756
+ "external_conversation_session_id_session_id_fk": {
757
+ "name": "external_conversation_session_id_session_id_fk",
758
+ "tableFrom": "external_conversation",
759
+ "tableTo": "session",
760
+ "columnsFrom": [
761
+ "session_id"
762
+ ],
763
+ "columnsTo": [
764
+ "id"
765
+ ],
766
+ "onDelete": "cascade",
767
+ "onUpdate": "no action"
768
+ }
769
+ },
770
+ "compositePrimaryKeys": {},
771
+ "uniqueConstraints": {},
772
+ "checkConstraints": {}
773
+ },
774
+ "note_attachment": {
775
+ "name": "note_attachment",
776
+ "columns": {
777
+ "id": {
778
+ "name": "id",
779
+ "type": "text",
780
+ "primaryKey": true,
781
+ "notNull": true,
782
+ "autoincrement": false
783
+ },
784
+ "note_id": {
785
+ "name": "note_id",
786
+ "type": "text",
787
+ "primaryKey": false,
788
+ "notNull": true,
789
+ "autoincrement": false
790
+ },
791
+ "name": {
792
+ "name": "name",
793
+ "type": "text",
794
+ "primaryKey": false,
795
+ "notNull": true,
796
+ "autoincrement": false
797
+ },
798
+ "media_type": {
799
+ "name": "media_type",
800
+ "type": "text",
801
+ "primaryKey": false,
802
+ "notNull": true,
803
+ "autoincrement": false
804
+ },
805
+ "size_bytes": {
806
+ "name": "size_bytes",
807
+ "type": "integer",
808
+ "primaryKey": false,
809
+ "notNull": true,
810
+ "autoincrement": false
811
+ },
812
+ "created_at": {
813
+ "name": "created_at",
814
+ "type": "integer",
815
+ "primaryKey": false,
816
+ "notNull": true,
817
+ "autoincrement": false
818
+ },
819
+ "data": {
820
+ "name": "data",
821
+ "type": "blob",
822
+ "primaryKey": false,
823
+ "notNull": true,
824
+ "autoincrement": false
825
+ }
826
+ },
827
+ "indexes": {
828
+ "note_attachment_note_idx": {
829
+ "name": "note_attachment_note_idx",
830
+ "columns": [
831
+ "note_id"
832
+ ],
833
+ "isUnique": false
834
+ }
835
+ },
836
+ "foreignKeys": {
837
+ "note_attachment_note_id_note_id_fk": {
838
+ "name": "note_attachment_note_id_note_id_fk",
839
+ "tableFrom": "note_attachment",
840
+ "tableTo": "note",
841
+ "columnsFrom": [
842
+ "note_id"
843
+ ],
844
+ "columnsTo": [
845
+ "id"
846
+ ],
847
+ "onDelete": "cascade",
848
+ "onUpdate": "no action"
849
+ }
850
+ },
851
+ "compositePrimaryKeys": {},
852
+ "uniqueConstraints": {},
853
+ "checkConstraints": {}
854
+ },
855
+ "note_file_index": {
856
+ "name": "note_file_index",
857
+ "columns": {
858
+ "id": {
859
+ "name": "id",
860
+ "type": "text",
861
+ "primaryKey": true,
862
+ "notNull": true,
863
+ "autoincrement": false
864
+ },
865
+ "revision": {
866
+ "name": "revision",
867
+ "type": "integer",
868
+ "primaryKey": false,
869
+ "notNull": true,
870
+ "autoincrement": false
871
+ },
872
+ "created_at": {
873
+ "name": "created_at",
874
+ "type": "integer",
875
+ "primaryKey": false,
876
+ "notNull": true,
877
+ "autoincrement": false
878
+ },
879
+ "updated_at": {
880
+ "name": "updated_at",
881
+ "type": "integer",
882
+ "primaryKey": false,
883
+ "notNull": true,
884
+ "autoincrement": false
885
+ },
886
+ "sha256": {
887
+ "name": "sha256",
888
+ "type": "text",
889
+ "primaryKey": false,
890
+ "notNull": true,
891
+ "autoincrement": false
892
+ },
893
+ "deleted_at": {
894
+ "name": "deleted_at",
895
+ "type": "integer",
896
+ "primaryKey": false,
897
+ "notNull": false,
898
+ "autoincrement": false
899
+ }
900
+ },
901
+ "indexes": {},
902
+ "foreignKeys": {},
903
+ "compositePrimaryKeys": {},
904
+ "uniqueConstraints": {},
905
+ "checkConstraints": {}
906
+ },
907
+ "note": {
908
+ "name": "note",
909
+ "columns": {
910
+ "id": {
911
+ "name": "id",
912
+ "type": "text",
913
+ "primaryKey": true,
914
+ "notNull": true,
915
+ "autoincrement": false
916
+ },
917
+ "content": {
918
+ "name": "content",
919
+ "type": "text",
920
+ "primaryKey": false,
921
+ "notNull": true,
922
+ "autoincrement": false
923
+ },
924
+ "revision": {
925
+ "name": "revision",
926
+ "type": "integer",
927
+ "primaryKey": false,
928
+ "notNull": true,
929
+ "autoincrement": false,
930
+ "default": 1
931
+ },
932
+ "created_at": {
933
+ "name": "created_at",
934
+ "type": "integer",
935
+ "primaryKey": false,
936
+ "notNull": true,
937
+ "autoincrement": false
938
+ },
939
+ "updated_at": {
940
+ "name": "updated_at",
941
+ "type": "integer",
942
+ "primaryKey": false,
943
+ "notNull": true,
944
+ "autoincrement": false
945
+ },
946
+ "properties": {
947
+ "name": "properties",
948
+ "type": "text",
949
+ "primaryKey": false,
950
+ "notNull": false,
951
+ "autoincrement": false
952
+ }
953
+ },
954
+ "indexes": {
955
+ "note_updated_at_idx": {
956
+ "name": "note_updated_at_idx",
957
+ "columns": [
958
+ "updated_at"
959
+ ],
960
+ "isUnique": false
961
+ }
962
+ },
963
+ "foreignKeys": {},
964
+ "compositePrimaryKeys": {},
965
+ "uniqueConstraints": {},
966
+ "checkConstraints": {}
967
+ },
968
+ "permission_request": {
969
+ "name": "permission_request",
970
+ "columns": {
971
+ "id": {
972
+ "name": "id",
973
+ "type": "text",
974
+ "primaryKey": true,
975
+ "notNull": false,
976
+ "autoincrement": false
977
+ },
978
+ "session_id": {
979
+ "name": "session_id",
980
+ "type": "text",
981
+ "primaryKey": false,
982
+ "notNull": true,
983
+ "autoincrement": false
984
+ },
985
+ "run_id": {
986
+ "name": "run_id",
987
+ "type": "text",
988
+ "primaryKey": false,
989
+ "notNull": false,
990
+ "autoincrement": false
991
+ },
992
+ "tool_name": {
993
+ "name": "tool_name",
994
+ "type": "text",
995
+ "primaryKey": false,
996
+ "notNull": true,
997
+ "autoincrement": false
998
+ },
999
+ "payload_json": {
1000
+ "name": "payload_json",
1001
+ "type": "text",
1002
+ "primaryKey": false,
1003
+ "notNull": true,
1004
+ "autoincrement": false
1005
+ },
1006
+ "status": {
1007
+ "name": "status",
1008
+ "type": "text",
1009
+ "primaryKey": false,
1010
+ "notNull": true,
1011
+ "autoincrement": false
1012
+ },
1013
+ "decision": {
1014
+ "name": "decision",
1015
+ "type": "text",
1016
+ "primaryKey": false,
1017
+ "notNull": false,
1018
+ "autoincrement": false
1019
+ },
1020
+ "decided_by_client_id": {
1021
+ "name": "decided_by_client_id",
1022
+ "type": "text",
1023
+ "primaryKey": false,
1024
+ "notNull": false,
1025
+ "autoincrement": false
1026
+ },
1027
+ "created_at": {
1028
+ "name": "created_at",
1029
+ "type": "integer",
1030
+ "primaryKey": false,
1031
+ "notNull": true,
1032
+ "autoincrement": false
1033
+ },
1034
+ "updated_at": {
1035
+ "name": "updated_at",
1036
+ "type": "integer",
1037
+ "primaryKey": false,
1038
+ "notNull": true,
1039
+ "autoincrement": false
1040
+ }
1041
+ },
1042
+ "indexes": {
1043
+ "permission_session_status_idx": {
1044
+ "name": "permission_session_status_idx",
1045
+ "columns": [
1046
+ "session_id",
1047
+ "status"
1048
+ ],
1049
+ "isUnique": false
1050
+ }
1051
+ },
1052
+ "foreignKeys": {},
1053
+ "compositePrimaryKeys": {},
1054
+ "uniqueConstraints": {},
1055
+ "checkConstraints": {}
1056
+ },
1057
+ "project_location": {
1058
+ "name": "project_location",
1059
+ "columns": {
1060
+ "id": {
1061
+ "name": "id",
1062
+ "type": "text",
1063
+ "primaryKey": true,
1064
+ "notNull": true,
1065
+ "autoincrement": false
1066
+ },
1067
+ "project_id": {
1068
+ "name": "project_id",
1069
+ "type": "text",
1070
+ "primaryKey": false,
1071
+ "notNull": true,
1072
+ "autoincrement": false
1073
+ },
1074
+ "path": {
1075
+ "name": "path",
1076
+ "type": "text",
1077
+ "primaryKey": false,
1078
+ "notNull": true,
1079
+ "autoincrement": false
1080
+ },
1081
+ "normalized_path": {
1082
+ "name": "normalized_path",
1083
+ "type": "text",
1084
+ "primaryKey": false,
1085
+ "notNull": true,
1086
+ "autoincrement": false
1087
+ },
1088
+ "status": {
1089
+ "name": "status",
1090
+ "type": "text",
1091
+ "primaryKey": false,
1092
+ "notNull": true,
1093
+ "autoincrement": false
1094
+ },
1095
+ "bound_at": {
1096
+ "name": "bound_at",
1097
+ "type": "integer",
1098
+ "primaryKey": false,
1099
+ "notNull": true,
1100
+ "autoincrement": false
1101
+ },
1102
+ "last_verified_at": {
1103
+ "name": "last_verified_at",
1104
+ "type": "integer",
1105
+ "primaryKey": false,
1106
+ "notNull": false,
1107
+ "autoincrement": false
1108
+ }
1109
+ },
1110
+ "indexes": {
1111
+ "project_location_project_idx": {
1112
+ "name": "project_location_project_idx",
1113
+ "columns": [
1114
+ "project_id",
1115
+ "status"
1116
+ ],
1117
+ "isUnique": false
1118
+ },
1119
+ "project_location_active_path": {
1120
+ "name": "project_location_active_path",
1121
+ "columns": [
1122
+ "normalized_path"
1123
+ ],
1124
+ "isUnique": true,
1125
+ "where": "\"project_location\".\"status\" = 'active'"
1126
+ },
1127
+ "project_location_active_project": {
1128
+ "name": "project_location_active_project",
1129
+ "columns": [
1130
+ "project_id"
1131
+ ],
1132
+ "isUnique": true,
1133
+ "where": "\"project_location\".\"status\" = 'active'"
1134
+ }
1135
+ },
1136
+ "foreignKeys": {
1137
+ "project_location_project_id_project_id_fk": {
1138
+ "name": "project_location_project_id_project_id_fk",
1139
+ "tableFrom": "project_location",
1140
+ "tableTo": "project",
1141
+ "columnsFrom": [
1142
+ "project_id"
1143
+ ],
1144
+ "columnsTo": [
1145
+ "id"
1146
+ ],
1147
+ "onDelete": "cascade",
1148
+ "onUpdate": "no action"
1149
+ }
1150
+ },
1151
+ "compositePrimaryKeys": {},
1152
+ "uniqueConstraints": {},
1153
+ "checkConstraints": {}
1154
+ },
1155
+ "projection_settlement": {
1156
+ "name": "projection_settlement",
1157
+ "columns": {
1158
+ "id": {
1159
+ "name": "id",
1160
+ "type": "text",
1161
+ "primaryKey": true,
1162
+ "notNull": true,
1163
+ "autoincrement": false
1164
+ },
1165
+ "projector": {
1166
+ "name": "projector",
1167
+ "type": "text",
1168
+ "primaryKey": false,
1169
+ "notNull": true,
1170
+ "autoincrement": false
1171
+ },
1172
+ "root_session_id": {
1173
+ "name": "root_session_id",
1174
+ "type": "text",
1175
+ "primaryKey": false,
1176
+ "notNull": true,
1177
+ "autoincrement": false
1178
+ },
1179
+ "event_sequence": {
1180
+ "name": "event_sequence",
1181
+ "type": "integer",
1182
+ "primaryKey": false,
1183
+ "notNull": true,
1184
+ "autoincrement": false
1185
+ },
1186
+ "action": {
1187
+ "name": "action",
1188
+ "type": "text",
1189
+ "primaryKey": false,
1190
+ "notNull": true,
1191
+ "autoincrement": false
1192
+ },
1193
+ "payload_json": {
1194
+ "name": "payload_json",
1195
+ "type": "text",
1196
+ "primaryKey": false,
1197
+ "notNull": true,
1198
+ "autoincrement": false
1199
+ },
1200
+ "status": {
1201
+ "name": "status",
1202
+ "type": "text",
1203
+ "primaryKey": false,
1204
+ "notNull": true,
1205
+ "autoincrement": false
1206
+ },
1207
+ "attempt_count": {
1208
+ "name": "attempt_count",
1209
+ "type": "integer",
1210
+ "primaryKey": false,
1211
+ "notNull": true,
1212
+ "autoincrement": false,
1213
+ "default": 0
1214
+ },
1215
+ "last_error": {
1216
+ "name": "last_error",
1217
+ "type": "text",
1218
+ "primaryKey": false,
1219
+ "notNull": false,
1220
+ "autoincrement": false
1221
+ },
1222
+ "next_retry_at": {
1223
+ "name": "next_retry_at",
1224
+ "type": "integer",
1225
+ "primaryKey": false,
1226
+ "notNull": false,
1227
+ "autoincrement": false
1228
+ },
1229
+ "created_at": {
1230
+ "name": "created_at",
1231
+ "type": "integer",
1232
+ "primaryKey": false,
1233
+ "notNull": true,
1234
+ "autoincrement": false
1235
+ },
1236
+ "updated_at": {
1237
+ "name": "updated_at",
1238
+ "type": "integer",
1239
+ "primaryKey": false,
1240
+ "notNull": true,
1241
+ "autoincrement": false
1242
+ },
1243
+ "resolved_at": {
1244
+ "name": "resolved_at",
1245
+ "type": "integer",
1246
+ "primaryKey": false,
1247
+ "notNull": false,
1248
+ "autoincrement": false
1249
+ }
1250
+ },
1251
+ "indexes": {
1252
+ "projection_settlement_event_idx": {
1253
+ "name": "projection_settlement_event_idx",
1254
+ "columns": [
1255
+ "projector",
1256
+ "root_session_id",
1257
+ "event_sequence"
1258
+ ],
1259
+ "isUnique": true
1260
+ },
1261
+ "projection_settlement_status_retry_idx": {
1262
+ "name": "projection_settlement_status_retry_idx",
1263
+ "columns": [
1264
+ "status",
1265
+ "next_retry_at"
1266
+ ],
1267
+ "isUnique": false
1268
+ }
1269
+ },
1270
+ "foreignKeys": {},
1271
+ "compositePrimaryKeys": {},
1272
+ "uniqueConstraints": {},
1273
+ "checkConstraints": {}
1274
+ },
1275
+ "project": {
1276
+ "name": "project",
1277
+ "columns": {
1278
+ "id": {
1279
+ "name": "id",
1280
+ "type": "text",
1281
+ "primaryKey": true,
1282
+ "notNull": true,
1283
+ "autoincrement": false
1284
+ },
1285
+ "name": {
1286
+ "name": "name",
1287
+ "type": "text",
1288
+ "primaryKey": false,
1289
+ "notNull": true,
1290
+ "autoincrement": false
1291
+ },
1292
+ "pinned_at": {
1293
+ "name": "pinned_at",
1294
+ "type": "integer",
1295
+ "primaryKey": false,
1296
+ "notNull": false,
1297
+ "autoincrement": false
1298
+ },
1299
+ "default_shell": {
1300
+ "name": "default_shell",
1301
+ "type": "text",
1302
+ "primaryKey": false,
1303
+ "notNull": false,
1304
+ "autoincrement": false
1305
+ },
1306
+ "last_opened_at": {
1307
+ "name": "last_opened_at",
1308
+ "type": "integer",
1309
+ "primaryKey": false,
1310
+ "notNull": true,
1311
+ "autoincrement": false
1312
+ },
1313
+ "archived_at": {
1314
+ "name": "archived_at",
1315
+ "type": "integer",
1316
+ "primaryKey": false,
1317
+ "notNull": false,
1318
+ "autoincrement": false
1319
+ },
1320
+ "created_at": {
1321
+ "name": "created_at",
1322
+ "type": "integer",
1323
+ "primaryKey": false,
1324
+ "notNull": true,
1325
+ "autoincrement": false
1326
+ },
1327
+ "updated_at": {
1328
+ "name": "updated_at",
1329
+ "type": "integer",
1330
+ "primaryKey": false,
1331
+ "notNull": true,
1332
+ "autoincrement": false
1333
+ }
1334
+ },
1335
+ "indexes": {},
1336
+ "foreignKeys": {},
1337
+ "compositePrimaryKeys": {},
1338
+ "uniqueConstraints": {},
1339
+ "checkConstraints": {}
1340
+ },
1341
+ "retention_audit": {
1342
+ "name": "retention_audit",
1343
+ "columns": {
1344
+ "id": {
1345
+ "name": "id",
1346
+ "type": "text",
1347
+ "primaryKey": true,
1348
+ "notNull": true,
1349
+ "autoincrement": false
1350
+ },
1351
+ "policy": {
1352
+ "name": "policy",
1353
+ "type": "text",
1354
+ "primaryKey": false,
1355
+ "notNull": true,
1356
+ "autoincrement": false
1357
+ },
1358
+ "result_json": {
1359
+ "name": "result_json",
1360
+ "type": "text",
1361
+ "primaryKey": false,
1362
+ "notNull": true,
1363
+ "autoincrement": false
1364
+ },
1365
+ "created_at": {
1366
+ "name": "created_at",
1367
+ "type": "integer",
1368
+ "primaryKey": false,
1369
+ "notNull": true,
1370
+ "autoincrement": false
1371
+ }
1372
+ },
1373
+ "indexes": {},
1374
+ "foreignKeys": {},
1375
+ "compositePrimaryKeys": {},
1376
+ "uniqueConstraints": {},
1377
+ "checkConstraints": {}
1378
+ },
1379
+ "scheduled_run": {
1380
+ "name": "scheduled_run",
1381
+ "columns": {
1382
+ "id": {
1383
+ "name": "id",
1384
+ "type": "text",
1385
+ "primaryKey": true,
1386
+ "notNull": true,
1387
+ "autoincrement": false
1388
+ },
1389
+ "task_id": {
1390
+ "name": "task_id",
1391
+ "type": "text",
1392
+ "primaryKey": false,
1393
+ "notNull": true,
1394
+ "autoincrement": false
1395
+ },
1396
+ "cause": {
1397
+ "name": "cause",
1398
+ "type": "text",
1399
+ "primaryKey": false,
1400
+ "notNull": true,
1401
+ "autoincrement": false
1402
+ },
1403
+ "status": {
1404
+ "name": "status",
1405
+ "type": "text",
1406
+ "primaryKey": false,
1407
+ "notNull": true,
1408
+ "autoincrement": false
1409
+ },
1410
+ "scheduled_for": {
1411
+ "name": "scheduled_for",
1412
+ "type": "integer",
1413
+ "primaryKey": false,
1414
+ "notNull": true,
1415
+ "autoincrement": false
1416
+ },
1417
+ "session_id": {
1418
+ "name": "session_id",
1419
+ "type": "text",
1420
+ "primaryKey": false,
1421
+ "notNull": false,
1422
+ "autoincrement": false
1423
+ },
1424
+ "run_id": {
1425
+ "name": "run_id",
1426
+ "type": "text",
1427
+ "primaryKey": false,
1428
+ "notNull": false,
1429
+ "autoincrement": false
1430
+ },
1431
+ "summary": {
1432
+ "name": "summary",
1433
+ "type": "text",
1434
+ "primaryKey": false,
1435
+ "notNull": false,
1436
+ "autoincrement": false
1437
+ },
1438
+ "error": {
1439
+ "name": "error",
1440
+ "type": "text",
1441
+ "primaryKey": false,
1442
+ "notNull": false,
1443
+ "autoincrement": false
1444
+ },
1445
+ "unread": {
1446
+ "name": "unread",
1447
+ "type": "integer",
1448
+ "primaryKey": false,
1449
+ "notNull": true,
1450
+ "autoincrement": false
1451
+ },
1452
+ "attention_reason": {
1453
+ "name": "attention_reason",
1454
+ "type": "text",
1455
+ "primaryKey": false,
1456
+ "notNull": false,
1457
+ "autoincrement": false
1458
+ },
1459
+ "created_at": {
1460
+ "name": "created_at",
1461
+ "type": "integer",
1462
+ "primaryKey": false,
1463
+ "notNull": true,
1464
+ "autoincrement": false
1465
+ },
1466
+ "started_at": {
1467
+ "name": "started_at",
1468
+ "type": "integer",
1469
+ "primaryKey": false,
1470
+ "notNull": false,
1471
+ "autoincrement": false
1472
+ },
1473
+ "finished_at": {
1474
+ "name": "finished_at",
1475
+ "type": "integer",
1476
+ "primaryKey": false,
1477
+ "notNull": false,
1478
+ "autoincrement": false
1479
+ },
1480
+ "updated_at": {
1481
+ "name": "updated_at",
1482
+ "type": "integer",
1483
+ "primaryKey": false,
1484
+ "notNull": true,
1485
+ "autoincrement": false
1486
+ }
1487
+ },
1488
+ "indexes": {
1489
+ "scheduled_run_task_created_idx": {
1490
+ "name": "scheduled_run_task_created_idx",
1491
+ "columns": [
1492
+ "task_id",
1493
+ "created_at"
1494
+ ],
1495
+ "isUnique": false
1496
+ },
1497
+ "scheduled_run_status_idx": {
1498
+ "name": "scheduled_run_status_idx",
1499
+ "columns": [
1500
+ "status"
1501
+ ],
1502
+ "isUnique": false
1503
+ },
1504
+ "scheduled_run_unread_idx": {
1505
+ "name": "scheduled_run_unread_idx",
1506
+ "columns": [
1507
+ "unread",
1508
+ "created_at"
1509
+ ],
1510
+ "isUnique": false
1511
+ }
1512
+ },
1513
+ "foreignKeys": {},
1514
+ "compositePrimaryKeys": {},
1515
+ "uniqueConstraints": {},
1516
+ "checkConstraints": {}
1517
+ },
1518
+ "scheduled_task": {
1519
+ "name": "scheduled_task",
1520
+ "columns": {
1521
+ "id": {
1522
+ "name": "id",
1523
+ "type": "text",
1524
+ "primaryKey": true,
1525
+ "notNull": true,
1526
+ "autoincrement": false
1527
+ },
1528
+ "name": {
1529
+ "name": "name",
1530
+ "type": "text",
1531
+ "primaryKey": false,
1532
+ "notNull": true,
1533
+ "autoincrement": false
1534
+ },
1535
+ "description": {
1536
+ "name": "description",
1537
+ "type": "text",
1538
+ "primaryKey": false,
1539
+ "notNull": false,
1540
+ "autoincrement": false
1541
+ },
1542
+ "prompt": {
1543
+ "name": "prompt",
1544
+ "type": "text",
1545
+ "primaryKey": false,
1546
+ "notNull": true,
1547
+ "autoincrement": false
1548
+ },
1549
+ "recurrence": {
1550
+ "name": "recurrence",
1551
+ "type": "text",
1552
+ "primaryKey": false,
1553
+ "notNull": true,
1554
+ "autoincrement": false
1555
+ },
1556
+ "recurrence_format": {
1557
+ "name": "recurrence_format",
1558
+ "type": "text",
1559
+ "primaryKey": false,
1560
+ "notNull": true,
1561
+ "autoincrement": false
1562
+ },
1563
+ "timezone": {
1564
+ "name": "timezone",
1565
+ "type": "text",
1566
+ "primaryKey": false,
1567
+ "notNull": true,
1568
+ "autoincrement": false
1569
+ },
1570
+ "status": {
1571
+ "name": "status",
1572
+ "type": "text",
1573
+ "primaryKey": false,
1574
+ "notNull": true,
1575
+ "autoincrement": false
1576
+ },
1577
+ "destination": {
1578
+ "name": "destination",
1579
+ "type": "text",
1580
+ "primaryKey": false,
1581
+ "notNull": true,
1582
+ "autoincrement": false
1583
+ },
1584
+ "session_id": {
1585
+ "name": "session_id",
1586
+ "type": "text",
1587
+ "primaryKey": false,
1588
+ "notNull": false,
1589
+ "autoincrement": false
1590
+ },
1591
+ "project_paths_json": {
1592
+ "name": "project_paths_json",
1593
+ "type": "text",
1594
+ "primaryKey": false,
1595
+ "notNull": true,
1596
+ "autoincrement": false
1597
+ },
1598
+ "execution_mode": {
1599
+ "name": "execution_mode",
1600
+ "type": "text",
1601
+ "primaryKey": false,
1602
+ "notNull": true,
1603
+ "autoincrement": false
1604
+ },
1605
+ "model": {
1606
+ "name": "model",
1607
+ "type": "text",
1608
+ "primaryKey": false,
1609
+ "notNull": false,
1610
+ "autoincrement": false
1611
+ },
1612
+ "effort": {
1613
+ "name": "effort",
1614
+ "type": "text",
1615
+ "primaryKey": false,
1616
+ "notNull": false,
1617
+ "autoincrement": false
1618
+ },
1619
+ "skill_names_json": {
1620
+ "name": "skill_names_json",
1621
+ "type": "text",
1622
+ "primaryKey": false,
1623
+ "notNull": true,
1624
+ "autoincrement": false
1625
+ },
1626
+ "plugin_names_json": {
1627
+ "name": "plugin_names_json",
1628
+ "type": "text",
1629
+ "primaryKey": false,
1630
+ "notNull": true,
1631
+ "autoincrement": false
1632
+ },
1633
+ "permission_profile_json": {
1634
+ "name": "permission_profile_json",
1635
+ "type": "text",
1636
+ "primaryKey": false,
1637
+ "notNull": true,
1638
+ "autoincrement": false
1639
+ },
1640
+ "overlap_policy": {
1641
+ "name": "overlap_policy",
1642
+ "type": "text",
1643
+ "primaryKey": false,
1644
+ "notNull": true,
1645
+ "autoincrement": false
1646
+ },
1647
+ "missed_run_policy": {
1648
+ "name": "missed_run_policy",
1649
+ "type": "text",
1650
+ "primaryKey": false,
1651
+ "notNull": true,
1652
+ "autoincrement": false
1653
+ },
1654
+ "stop_policy_json": {
1655
+ "name": "stop_policy_json",
1656
+ "type": "text",
1657
+ "primaryKey": false,
1658
+ "notNull": false,
1659
+ "autoincrement": false
1660
+ },
1661
+ "created_by": {
1662
+ "name": "created_by",
1663
+ "type": "text",
1664
+ "primaryKey": false,
1665
+ "notNull": true,
1666
+ "autoincrement": false
1667
+ },
1668
+ "created_from_session_id": {
1669
+ "name": "created_from_session_id",
1670
+ "type": "text",
1671
+ "primaryKey": false,
1672
+ "notNull": false,
1673
+ "autoincrement": false
1674
+ },
1675
+ "last_run_at": {
1676
+ "name": "last_run_at",
1677
+ "type": "integer",
1678
+ "primaryKey": false,
1679
+ "notNull": false,
1680
+ "autoincrement": false
1681
+ },
1682
+ "next_run_at": {
1683
+ "name": "next_run_at",
1684
+ "type": "integer",
1685
+ "primaryKey": false,
1686
+ "notNull": false,
1687
+ "autoincrement": false
1688
+ },
1689
+ "run_count": {
1690
+ "name": "run_count",
1691
+ "type": "integer",
1692
+ "primaryKey": false,
1693
+ "notNull": true,
1694
+ "autoincrement": false
1695
+ },
1696
+ "created_at": {
1697
+ "name": "created_at",
1698
+ "type": "integer",
1699
+ "primaryKey": false,
1700
+ "notNull": true,
1701
+ "autoincrement": false
1702
+ },
1703
+ "updated_at": {
1704
+ "name": "updated_at",
1705
+ "type": "integer",
1706
+ "primaryKey": false,
1707
+ "notNull": true,
1708
+ "autoincrement": false
1709
+ }
1710
+ },
1711
+ "indexes": {
1712
+ "scheduled_task_status_next_idx": {
1713
+ "name": "scheduled_task_status_next_idx",
1714
+ "columns": [
1715
+ "status",
1716
+ "next_run_at"
1717
+ ],
1718
+ "isUnique": false
1719
+ },
1720
+ "scheduled_task_session_idx": {
1721
+ "name": "scheduled_task_session_idx",
1722
+ "columns": [
1723
+ "session_id"
1724
+ ],
1725
+ "isUnique": false
1726
+ }
1727
+ },
1728
+ "foreignKeys": {},
1729
+ "compositePrimaryKeys": {},
1730
+ "uniqueConstraints": {},
1731
+ "checkConstraints": {}
1732
+ },
1733
+ "session_event_sequence": {
1734
+ "name": "session_event_sequence",
1735
+ "columns": {
1736
+ "id": {
1737
+ "name": "id",
1738
+ "type": "integer",
1739
+ "primaryKey": true,
1740
+ "notNull": false,
1741
+ "autoincrement": false
1742
+ },
1743
+ "reserved_through": {
1744
+ "name": "reserved_through",
1745
+ "type": "integer",
1746
+ "primaryKey": false,
1747
+ "notNull": true,
1748
+ "autoincrement": false
1749
+ }
1750
+ },
1751
+ "indexes": {},
1752
+ "foreignKeys": {},
1753
+ "compositePrimaryKeys": {},
1754
+ "uniqueConstraints": {},
1755
+ "checkConstraints": {
1756
+ "session_event_sequence_singleton": {
1757
+ "name": "session_event_sequence_singleton",
1758
+ "value": "\"session_event_sequence\".\"id\" = 1"
1759
+ }
1760
+ }
1761
+ },
1762
+ "session_event": {
1763
+ "name": "session_event",
1764
+ "columns": {
1765
+ "id": {
1766
+ "name": "id",
1767
+ "type": "text",
1768
+ "primaryKey": true,
1769
+ "notNull": false,
1770
+ "autoincrement": false
1771
+ },
1772
+ "seq": {
1773
+ "name": "seq",
1774
+ "type": "integer",
1775
+ "primaryKey": false,
1776
+ "notNull": true,
1777
+ "autoincrement": false
1778
+ },
1779
+ "type": {
1780
+ "name": "type",
1781
+ "type": "text",
1782
+ "primaryKey": false,
1783
+ "notNull": true,
1784
+ "autoincrement": false
1785
+ },
1786
+ "schema_version": {
1787
+ "name": "schema_version",
1788
+ "type": "integer",
1789
+ "primaryKey": false,
1790
+ "notNull": true,
1791
+ "autoincrement": false,
1792
+ "default": 1
1793
+ },
1794
+ "session_id": {
1795
+ "name": "session_id",
1796
+ "type": "text",
1797
+ "primaryKey": false,
1798
+ "notNull": false,
1799
+ "autoincrement": false
1800
+ },
1801
+ "payload_json": {
1802
+ "name": "payload_json",
1803
+ "type": "text",
1804
+ "primaryKey": false,
1805
+ "notNull": true,
1806
+ "autoincrement": false
1807
+ },
1808
+ "created_at": {
1809
+ "name": "created_at",
1810
+ "type": "integer",
1811
+ "primaryKey": false,
1812
+ "notNull": true,
1813
+ "autoincrement": false
1814
+ }
1815
+ },
1816
+ "indexes": {
1817
+ "session_event_seq_unique": {
1818
+ "name": "session_event_seq_unique",
1819
+ "columns": [
1820
+ "seq"
1821
+ ],
1822
+ "isUnique": true
1823
+ },
1824
+ "session_event_session_seq_idx": {
1825
+ "name": "session_event_session_seq_idx",
1826
+ "columns": [
1827
+ "session_id",
1828
+ "seq"
1829
+ ],
1830
+ "isUnique": false
1831
+ }
1832
+ },
1833
+ "foreignKeys": {},
1834
+ "compositePrimaryKeys": {},
1835
+ "uniqueConstraints": {},
1836
+ "checkConstraints": {}
1837
+ },
1838
+ "session_goal_continuation": {
1839
+ "name": "session_goal_continuation",
1840
+ "columns": {
1841
+ "id": {
1842
+ "name": "id",
1843
+ "type": "text",
1844
+ "primaryKey": true,
1845
+ "notNull": true,
1846
+ "autoincrement": false
1847
+ },
1848
+ "goal_id": {
1849
+ "name": "goal_id",
1850
+ "type": "text",
1851
+ "primaryKey": false,
1852
+ "notNull": true,
1853
+ "autoincrement": false
1854
+ },
1855
+ "revision": {
1856
+ "name": "revision",
1857
+ "type": "integer",
1858
+ "primaryKey": false,
1859
+ "notNull": true,
1860
+ "autoincrement": false
1861
+ },
1862
+ "previous_run_id": {
1863
+ "name": "previous_run_id",
1864
+ "type": "text",
1865
+ "primaryKey": false,
1866
+ "notNull": true,
1867
+ "autoincrement": false
1868
+ },
1869
+ "input_id": {
1870
+ "name": "input_id",
1871
+ "type": "text",
1872
+ "primaryKey": false,
1873
+ "notNull": false,
1874
+ "autoincrement": false
1875
+ },
1876
+ "run_id": {
1877
+ "name": "run_id",
1878
+ "type": "text",
1879
+ "primaryKey": false,
1880
+ "notNull": false,
1881
+ "autoincrement": false
1882
+ },
1883
+ "status": {
1884
+ "name": "status",
1885
+ "type": "text",
1886
+ "primaryKey": false,
1887
+ "notNull": true,
1888
+ "autoincrement": false
1889
+ },
1890
+ "created_at": {
1891
+ "name": "created_at",
1892
+ "type": "integer",
1893
+ "primaryKey": false,
1894
+ "notNull": true,
1895
+ "autoincrement": false
1896
+ },
1897
+ "updated_at": {
1898
+ "name": "updated_at",
1899
+ "type": "integer",
1900
+ "primaryKey": false,
1901
+ "notNull": true,
1902
+ "autoincrement": false
1903
+ }
1904
+ },
1905
+ "indexes": {
1906
+ "session_goal_continuation_previous_unique": {
1907
+ "name": "session_goal_continuation_previous_unique",
1908
+ "columns": [
1909
+ "goal_id",
1910
+ "revision",
1911
+ "previous_run_id"
1912
+ ],
1913
+ "isUnique": true
1914
+ }
1915
+ },
1916
+ "foreignKeys": {
1917
+ "session_goal_continuation_goal_id_session_goal_id_fk": {
1918
+ "name": "session_goal_continuation_goal_id_session_goal_id_fk",
1919
+ "tableFrom": "session_goal_continuation",
1920
+ "tableTo": "session_goal",
1921
+ "columnsFrom": [
1922
+ "goal_id"
1923
+ ],
1924
+ "columnsTo": [
1925
+ "id"
1926
+ ],
1927
+ "onDelete": "cascade",
1928
+ "onUpdate": "no action"
1929
+ }
1930
+ },
1931
+ "compositePrimaryKeys": {},
1932
+ "uniqueConstraints": {},
1933
+ "checkConstraints": {}
1934
+ },
1935
+ "session_goal_model_attempt": {
1936
+ "name": "session_goal_model_attempt",
1937
+ "columns": {
1938
+ "run_id": {
1939
+ "name": "run_id",
1940
+ "type": "text",
1941
+ "primaryKey": false,
1942
+ "notNull": true,
1943
+ "autoincrement": false
1944
+ },
1945
+ "generation_id": {
1946
+ "name": "generation_id",
1947
+ "type": "text",
1948
+ "primaryKey": false,
1949
+ "notNull": true,
1950
+ "autoincrement": false
1951
+ },
1952
+ "attempt": {
1953
+ "name": "attempt",
1954
+ "type": "integer",
1955
+ "primaryKey": false,
1956
+ "notNull": true,
1957
+ "autoincrement": false
1958
+ },
1959
+ "goal_id": {
1960
+ "name": "goal_id",
1961
+ "type": "text",
1962
+ "primaryKey": false,
1963
+ "notNull": true,
1964
+ "autoincrement": false
1965
+ },
1966
+ "objective_version": {
1967
+ "name": "objective_version",
1968
+ "type": "integer",
1969
+ "primaryKey": false,
1970
+ "notNull": true,
1971
+ "autoincrement": false
1972
+ },
1973
+ "session_id": {
1974
+ "name": "session_id",
1975
+ "type": "text",
1976
+ "primaryKey": false,
1977
+ "notNull": true,
1978
+ "autoincrement": false
1979
+ },
1980
+ "provider": {
1981
+ "name": "provider",
1982
+ "type": "text",
1983
+ "primaryKey": false,
1984
+ "notNull": false,
1985
+ "autoincrement": false
1986
+ },
1987
+ "model": {
1988
+ "name": "model",
1989
+ "type": "text",
1990
+ "primaryKey": false,
1991
+ "notNull": true,
1992
+ "autoincrement": false
1993
+ },
1994
+ "purpose": {
1995
+ "name": "purpose",
1996
+ "type": "text",
1997
+ "primaryKey": false,
1998
+ "notNull": true,
1999
+ "autoincrement": false
2000
+ },
2001
+ "state": {
2002
+ "name": "state",
2003
+ "type": "text",
2004
+ "primaryKey": false,
2005
+ "notNull": true,
2006
+ "autoincrement": false
2007
+ },
2008
+ "known_input_tokens": {
2009
+ "name": "known_input_tokens",
2010
+ "type": "integer",
2011
+ "primaryKey": false,
2012
+ "notNull": true,
2013
+ "autoincrement": false
2014
+ },
2015
+ "known_output_tokens": {
2016
+ "name": "known_output_tokens",
2017
+ "type": "integer",
2018
+ "primaryKey": false,
2019
+ "notNull": true,
2020
+ "autoincrement": false
2021
+ },
2022
+ "inconsistent": {
2023
+ "name": "inconsistent",
2024
+ "type": "integer",
2025
+ "primaryKey": false,
2026
+ "notNull": true,
2027
+ "autoincrement": false
2028
+ },
2029
+ "raw_usage_json": {
2030
+ "name": "raw_usage_json",
2031
+ "type": "text",
2032
+ "primaryKey": false,
2033
+ "notNull": false,
2034
+ "autoincrement": false
2035
+ },
2036
+ "started_at": {
2037
+ "name": "started_at",
2038
+ "type": "integer",
2039
+ "primaryKey": false,
2040
+ "notNull": true,
2041
+ "autoincrement": false
2042
+ },
2043
+ "finished_at": {
2044
+ "name": "finished_at",
2045
+ "type": "integer",
2046
+ "primaryKey": false,
2047
+ "notNull": false,
2048
+ "autoincrement": false
2049
+ }
2050
+ },
2051
+ "indexes": {
2052
+ "session_goal_model_attempt_goal_idx": {
2053
+ "name": "session_goal_model_attempt_goal_idx",
2054
+ "columns": [
2055
+ "goal_id"
2056
+ ],
2057
+ "isUnique": false
2058
+ }
2059
+ },
2060
+ "foreignKeys": {
2061
+ "session_goal_model_attempt_goal_id_session_goal_id_fk": {
2062
+ "name": "session_goal_model_attempt_goal_id_session_goal_id_fk",
2063
+ "tableFrom": "session_goal_model_attempt",
2064
+ "tableTo": "session_goal",
2065
+ "columnsFrom": [
2066
+ "goal_id"
2067
+ ],
2068
+ "columnsTo": [
2069
+ "id"
2070
+ ],
2071
+ "onDelete": "cascade",
2072
+ "onUpdate": "no action"
2073
+ }
2074
+ },
2075
+ "compositePrimaryKeys": {
2076
+ "session_goal_model_attempt_run_id_generation_id_attempt_pk": {
2077
+ "columns": [
2078
+ "run_id",
2079
+ "generation_id",
2080
+ "attempt"
2081
+ ],
2082
+ "name": "session_goal_model_attempt_run_id_generation_id_attempt_pk"
2083
+ }
2084
+ },
2085
+ "uniqueConstraints": {},
2086
+ "checkConstraints": {}
2087
+ },
2088
+ "session_goal_request": {
2089
+ "name": "session_goal_request",
2090
+ "columns": {
2091
+ "request_id": {
2092
+ "name": "request_id",
2093
+ "type": "text",
2094
+ "primaryKey": true,
2095
+ "notNull": true,
2096
+ "autoincrement": false
2097
+ },
2098
+ "session_id": {
2099
+ "name": "session_id",
2100
+ "type": "text",
2101
+ "primaryKey": false,
2102
+ "notNull": true,
2103
+ "autoincrement": false
2104
+ },
2105
+ "fingerprint": {
2106
+ "name": "fingerprint",
2107
+ "type": "text",
2108
+ "primaryKey": false,
2109
+ "notNull": true,
2110
+ "autoincrement": false
2111
+ },
2112
+ "status": {
2113
+ "name": "status",
2114
+ "type": "text",
2115
+ "primaryKey": false,
2116
+ "notNull": true,
2117
+ "autoincrement": false
2118
+ },
2119
+ "goal_id": {
2120
+ "name": "goal_id",
2121
+ "type": "text",
2122
+ "primaryKey": false,
2123
+ "notNull": false,
2124
+ "autoincrement": false
2125
+ },
2126
+ "result_json": {
2127
+ "name": "result_json",
2128
+ "type": "text",
2129
+ "primaryKey": false,
2130
+ "notNull": false,
2131
+ "autoincrement": false
2132
+ },
2133
+ "error": {
2134
+ "name": "error",
2135
+ "type": "text",
2136
+ "primaryKey": false,
2137
+ "notNull": false,
2138
+ "autoincrement": false
2139
+ },
2140
+ "created_at": {
2141
+ "name": "created_at",
2142
+ "type": "integer",
2143
+ "primaryKey": false,
2144
+ "notNull": true,
2145
+ "autoincrement": false
2146
+ },
2147
+ "updated_at": {
2148
+ "name": "updated_at",
2149
+ "type": "integer",
2150
+ "primaryKey": false,
2151
+ "notNull": true,
2152
+ "autoincrement": false
2153
+ }
2154
+ },
2155
+ "indexes": {
2156
+ "session_goal_request_session_idx": {
2157
+ "name": "session_goal_request_session_idx",
2158
+ "columns": [
2159
+ "session_id",
2160
+ "updated_at"
2161
+ ],
2162
+ "isUnique": false
2163
+ }
2164
+ },
2165
+ "foreignKeys": {
2166
+ "session_goal_request_session_id_session_id_fk": {
2167
+ "name": "session_goal_request_session_id_session_id_fk",
2168
+ "tableFrom": "session_goal_request",
2169
+ "tableTo": "session",
2170
+ "columnsFrom": [
2171
+ "session_id"
2172
+ ],
2173
+ "columnsTo": [
2174
+ "id"
2175
+ ],
2176
+ "onDelete": "cascade",
2177
+ "onUpdate": "no action"
2178
+ }
2179
+ },
2180
+ "compositePrimaryKeys": {},
2181
+ "uniqueConstraints": {},
2182
+ "checkConstraints": {}
2183
+ },
2184
+ "session_goal_version": {
2185
+ "name": "session_goal_version",
2186
+ "columns": {
2187
+ "goal_id": {
2188
+ "name": "goal_id",
2189
+ "type": "text",
2190
+ "primaryKey": false,
2191
+ "notNull": true,
2192
+ "autoincrement": false
2193
+ },
2194
+ "objective_version": {
2195
+ "name": "objective_version",
2196
+ "type": "integer",
2197
+ "primaryKey": false,
2198
+ "notNull": true,
2199
+ "autoincrement": false
2200
+ },
2201
+ "previous_version": {
2202
+ "name": "previous_version",
2203
+ "type": "integer",
2204
+ "primaryKey": false,
2205
+ "notNull": false,
2206
+ "autoincrement": false
2207
+ },
2208
+ "objective": {
2209
+ "name": "objective",
2210
+ "type": "text",
2211
+ "primaryKey": false,
2212
+ "notNull": true,
2213
+ "autoincrement": false
2214
+ },
2215
+ "request_id": {
2216
+ "name": "request_id",
2217
+ "type": "text",
2218
+ "primaryKey": false,
2219
+ "notNull": true,
2220
+ "autoincrement": false
2221
+ },
2222
+ "actor_json": {
2223
+ "name": "actor_json",
2224
+ "type": "text",
2225
+ "primaryKey": false,
2226
+ "notNull": true,
2227
+ "autoincrement": false
2228
+ },
2229
+ "created_at": {
2230
+ "name": "created_at",
2231
+ "type": "integer",
2232
+ "primaryKey": false,
2233
+ "notNull": true,
2234
+ "autoincrement": false
2235
+ }
2236
+ },
2237
+ "indexes": {},
2238
+ "foreignKeys": {
2239
+ "session_goal_version_goal_id_session_goal_id_fk": {
2240
+ "name": "session_goal_version_goal_id_session_goal_id_fk",
2241
+ "tableFrom": "session_goal_version",
2242
+ "tableTo": "session_goal",
2243
+ "columnsFrom": [
2244
+ "goal_id"
2245
+ ],
2246
+ "columnsTo": [
2247
+ "id"
2248
+ ],
2249
+ "onDelete": "cascade",
2250
+ "onUpdate": "no action"
2251
+ }
2252
+ },
2253
+ "compositePrimaryKeys": {
2254
+ "session_goal_version_goal_id_objective_version_pk": {
2255
+ "columns": [
2256
+ "goal_id",
2257
+ "objective_version"
2258
+ ],
2259
+ "name": "session_goal_version_goal_id_objective_version_pk"
2260
+ }
2261
+ },
2262
+ "uniqueConstraints": {},
2263
+ "checkConstraints": {}
2264
+ },
2265
+ "session_goal": {
2266
+ "name": "session_goal",
2267
+ "columns": {
2268
+ "id": {
2269
+ "name": "id",
2270
+ "type": "text",
2271
+ "primaryKey": true,
2272
+ "notNull": true,
2273
+ "autoincrement": false
2274
+ },
2275
+ "session_id": {
2276
+ "name": "session_id",
2277
+ "type": "text",
2278
+ "primaryKey": false,
2279
+ "notNull": true,
2280
+ "autoincrement": false
2281
+ },
2282
+ "objective": {
2283
+ "name": "objective",
2284
+ "type": "text",
2285
+ "primaryKey": false,
2286
+ "notNull": true,
2287
+ "autoincrement": false
2288
+ },
2289
+ "objective_version": {
2290
+ "name": "objective_version",
2291
+ "type": "integer",
2292
+ "primaryKey": false,
2293
+ "notNull": true,
2294
+ "autoincrement": false,
2295
+ "default": 1
2296
+ },
2297
+ "plugin_id": {
2298
+ "name": "plugin_id",
2299
+ "type": "text",
2300
+ "primaryKey": false,
2301
+ "notNull": false,
2302
+ "autoincrement": false
2303
+ },
2304
+ "revision": {
2305
+ "name": "revision",
2306
+ "type": "integer",
2307
+ "primaryKey": false,
2308
+ "notNull": true,
2309
+ "autoincrement": false
2310
+ },
2311
+ "status": {
2312
+ "name": "status",
2313
+ "type": "text",
2314
+ "primaryKey": false,
2315
+ "notNull": true,
2316
+ "autoincrement": false
2317
+ },
2318
+ "max_auto_turns": {
2319
+ "name": "max_auto_turns",
2320
+ "type": "integer",
2321
+ "primaryKey": false,
2322
+ "notNull": true,
2323
+ "autoincrement": false
2324
+ },
2325
+ "token_budget": {
2326
+ "name": "token_budget",
2327
+ "type": "integer",
2328
+ "primaryKey": false,
2329
+ "notNull": false,
2330
+ "autoincrement": false
2331
+ },
2332
+ "usage_json": {
2333
+ "name": "usage_json",
2334
+ "type": "text",
2335
+ "primaryKey": false,
2336
+ "notNull": true,
2337
+ "autoincrement": false
2338
+ },
2339
+ "auto_turns_used": {
2340
+ "name": "auto_turns_used",
2341
+ "type": "integer",
2342
+ "primaryKey": false,
2343
+ "notNull": true,
2344
+ "autoincrement": false
2345
+ },
2346
+ "current_run_id": {
2347
+ "name": "current_run_id",
2348
+ "type": "text",
2349
+ "primaryKey": false,
2350
+ "notNull": false,
2351
+ "autoincrement": false
2352
+ },
2353
+ "reason": {
2354
+ "name": "reason",
2355
+ "type": "text",
2356
+ "primaryKey": false,
2357
+ "notNull": false,
2358
+ "autoincrement": false
2359
+ },
2360
+ "stop_reason_json": {
2361
+ "name": "stop_reason_json",
2362
+ "type": "text",
2363
+ "primaryKey": false,
2364
+ "notNull": false,
2365
+ "autoincrement": false
2366
+ },
2367
+ "wait_json": {
2368
+ "name": "wait_json",
2369
+ "type": "text",
2370
+ "primaryKey": false,
2371
+ "notNull": false,
2372
+ "autoincrement": false
2373
+ },
2374
+ "created_at": {
2375
+ "name": "created_at",
2376
+ "type": "integer",
2377
+ "primaryKey": false,
2378
+ "notNull": true,
2379
+ "autoincrement": false
2380
+ },
2381
+ "updated_at": {
2382
+ "name": "updated_at",
2383
+ "type": "integer",
2384
+ "primaryKey": false,
2385
+ "notNull": true,
2386
+ "autoincrement": false
2387
+ }
2388
+ },
2389
+ "indexes": {
2390
+ "session_goal_session_updated_idx": {
2391
+ "name": "session_goal_session_updated_idx",
2392
+ "columns": [
2393
+ "session_id",
2394
+ "updated_at"
2395
+ ],
2396
+ "isUnique": false
2397
+ },
2398
+ "session_goal_session_open_unique": {
2399
+ "name": "session_goal_session_open_unique",
2400
+ "columns": [
2401
+ "session_id"
2402
+ ],
2403
+ "isUnique": true,
2404
+ "where": "\"session_goal\".\"status\" IN ('active','waiting_user','blocked','paused')"
2405
+ }
2406
+ },
2407
+ "foreignKeys": {
2408
+ "session_goal_session_id_session_id_fk": {
2409
+ "name": "session_goal_session_id_session_id_fk",
2410
+ "tableFrom": "session_goal",
2411
+ "tableTo": "session",
2412
+ "columnsFrom": [
2413
+ "session_id"
2414
+ ],
2415
+ "columnsTo": [
2416
+ "id"
2417
+ ],
2418
+ "onDelete": "cascade",
2419
+ "onUpdate": "no action"
2420
+ }
2421
+ },
2422
+ "compositePrimaryKeys": {},
2423
+ "uniqueConstraints": {},
2424
+ "checkConstraints": {}
2425
+ },
2426
+ "session_input_attachment": {
2427
+ "name": "session_input_attachment",
2428
+ "columns": {
2429
+ "id": {
2430
+ "name": "id",
2431
+ "type": "text",
2432
+ "primaryKey": true,
2433
+ "notNull": true,
2434
+ "autoincrement": false
2435
+ },
2436
+ "session_id": {
2437
+ "name": "session_id",
2438
+ "type": "text",
2439
+ "primaryKey": false,
2440
+ "notNull": true,
2441
+ "autoincrement": false
2442
+ },
2443
+ "input_id": {
2444
+ "name": "input_id",
2445
+ "type": "text",
2446
+ "primaryKey": false,
2447
+ "notNull": true,
2448
+ "autoincrement": false
2449
+ },
2450
+ "asset_id": {
2451
+ "name": "asset_id",
2452
+ "type": "text",
2453
+ "primaryKey": false,
2454
+ "notNull": true,
2455
+ "autoincrement": false
2456
+ },
2457
+ "seq": {
2458
+ "name": "seq",
2459
+ "type": "integer",
2460
+ "primaryKey": false,
2461
+ "notNull": true,
2462
+ "autoincrement": false
2463
+ },
2464
+ "intent": {
2465
+ "name": "intent",
2466
+ "type": "text",
2467
+ "primaryKey": false,
2468
+ "notNull": true,
2469
+ "autoincrement": false
2470
+ },
2471
+ "display_name": {
2472
+ "name": "display_name",
2473
+ "type": "text",
2474
+ "primaryKey": false,
2475
+ "notNull": true,
2476
+ "autoincrement": false
2477
+ },
2478
+ "media_type": {
2479
+ "name": "media_type",
2480
+ "type": "text",
2481
+ "primaryKey": false,
2482
+ "notNull": true,
2483
+ "autoincrement": false
2484
+ },
2485
+ "size_bytes": {
2486
+ "name": "size_bytes",
2487
+ "type": "integer",
2488
+ "primaryKey": false,
2489
+ "notNull": true,
2490
+ "autoincrement": false
2491
+ },
2492
+ "metadata_json": {
2493
+ "name": "metadata_json",
2494
+ "type": "text",
2495
+ "primaryKey": false,
2496
+ "notNull": true,
2497
+ "autoincrement": false
2498
+ },
2499
+ "created_at": {
2500
+ "name": "created_at",
2501
+ "type": "integer",
2502
+ "primaryKey": false,
2503
+ "notNull": true,
2504
+ "autoincrement": false
2505
+ }
2506
+ },
2507
+ "indexes": {
2508
+ "session_input_attachment_input_seq_idx": {
2509
+ "name": "session_input_attachment_input_seq_idx",
2510
+ "columns": [
2511
+ "input_id",
2512
+ "seq"
2513
+ ],
2514
+ "isUnique": false
2515
+ },
2516
+ "session_input_attachment_asset_idx": {
2517
+ "name": "session_input_attachment_asset_idx",
2518
+ "columns": [
2519
+ "asset_id"
2520
+ ],
2521
+ "isUnique": false
2522
+ },
2523
+ "session_input_attachment_session_idx": {
2524
+ "name": "session_input_attachment_session_idx",
2525
+ "columns": [
2526
+ "session_id"
2527
+ ],
2528
+ "isUnique": false
2529
+ },
2530
+ "session_input_attachment_input_seq_unique": {
2531
+ "name": "session_input_attachment_input_seq_unique",
2532
+ "columns": [
2533
+ "input_id",
2534
+ "seq"
2535
+ ],
2536
+ "isUnique": true
2537
+ },
2538
+ "session_input_attachment_input_asset_unique": {
2539
+ "name": "session_input_attachment_input_asset_unique",
2540
+ "columns": [
2541
+ "input_id",
2542
+ "asset_id"
2543
+ ],
2544
+ "isUnique": true
2545
+ }
2546
+ },
2547
+ "foreignKeys": {
2548
+ "session_input_attachment_session_id_session_id_fk": {
2549
+ "name": "session_input_attachment_session_id_session_id_fk",
2550
+ "tableFrom": "session_input_attachment",
2551
+ "tableTo": "session",
2552
+ "columnsFrom": [
2553
+ "session_id"
2554
+ ],
2555
+ "columnsTo": [
2556
+ "id"
2557
+ ],
2558
+ "onDelete": "cascade",
2559
+ "onUpdate": "no action"
2560
+ },
2561
+ "session_input_attachment_input_id_session_input_id_fk": {
2562
+ "name": "session_input_attachment_input_id_session_input_id_fk",
2563
+ "tableFrom": "session_input_attachment",
2564
+ "tableTo": "session_input",
2565
+ "columnsFrom": [
2566
+ "input_id"
2567
+ ],
2568
+ "columnsTo": [
2569
+ "id"
2570
+ ],
2571
+ "onDelete": "cascade",
2572
+ "onUpdate": "no action"
2573
+ },
2574
+ "session_input_attachment_asset_id_attachment_asset_id_fk": {
2575
+ "name": "session_input_attachment_asset_id_attachment_asset_id_fk",
2576
+ "tableFrom": "session_input_attachment",
2577
+ "tableTo": "attachment_asset",
2578
+ "columnsFrom": [
2579
+ "asset_id"
2580
+ ],
2581
+ "columnsTo": [
2582
+ "id"
2583
+ ],
2584
+ "onDelete": "restrict",
2585
+ "onUpdate": "no action"
2586
+ }
2587
+ },
2588
+ "compositePrimaryKeys": {},
2589
+ "uniqueConstraints": {},
2590
+ "checkConstraints": {}
2591
+ },
2592
+ "session_input": {
2593
+ "name": "session_input",
2594
+ "columns": {
2595
+ "id": {
2596
+ "name": "id",
2597
+ "type": "text",
2598
+ "primaryKey": true,
2599
+ "notNull": false,
2600
+ "autoincrement": false
2601
+ },
2602
+ "session_id": {
2603
+ "name": "session_id",
2604
+ "type": "text",
2605
+ "primaryKey": false,
2606
+ "notNull": true,
2607
+ "autoincrement": false
2608
+ },
2609
+ "seq": {
2610
+ "name": "seq",
2611
+ "type": "integer",
2612
+ "primaryKey": false,
2613
+ "notNull": true,
2614
+ "autoincrement": false
2615
+ },
2616
+ "delivery": {
2617
+ "name": "delivery",
2618
+ "type": "text",
2619
+ "primaryKey": false,
2620
+ "notNull": true,
2621
+ "autoincrement": false
2622
+ },
2623
+ "content": {
2624
+ "name": "content",
2625
+ "type": "text",
2626
+ "primaryKey": false,
2627
+ "notNull": true,
2628
+ "autoincrement": false
2629
+ },
2630
+ "items_json": {
2631
+ "name": "items_json",
2632
+ "type": "text",
2633
+ "primaryKey": false,
2634
+ "notNull": true,
2635
+ "autoincrement": false
2636
+ },
2637
+ "metadata_json": {
2638
+ "name": "metadata_json",
2639
+ "type": "text",
2640
+ "primaryKey": false,
2641
+ "notNull": true,
2642
+ "autoincrement": false
2643
+ },
2644
+ "created_at": {
2645
+ "name": "created_at",
2646
+ "type": "integer",
2647
+ "primaryKey": false,
2648
+ "notNull": true,
2649
+ "autoincrement": false
2650
+ }
2651
+ },
2652
+ "indexes": {
2653
+ "session_input_session_idx": {
2654
+ "name": "session_input_session_idx",
2655
+ "columns": [
2656
+ "session_id"
2657
+ ],
2658
+ "isUnique": false
2659
+ },
2660
+ "session_input_session_seq": {
2661
+ "name": "session_input_session_seq",
2662
+ "columns": [
2663
+ "session_id",
2664
+ "seq"
2665
+ ],
2666
+ "isUnique": true
2667
+ }
2668
+ },
2669
+ "foreignKeys": {},
2670
+ "compositePrimaryKeys": {},
2671
+ "uniqueConstraints": {},
2672
+ "checkConstraints": {}
2673
+ },
2674
+ "session_message_part": {
2675
+ "name": "session_message_part",
2676
+ "columns": {
2677
+ "id": {
2678
+ "name": "id",
2679
+ "type": "text",
2680
+ "primaryKey": true,
2681
+ "notNull": false,
2682
+ "autoincrement": false
2683
+ },
2684
+ "session_id": {
2685
+ "name": "session_id",
2686
+ "type": "text",
2687
+ "primaryKey": false,
2688
+ "notNull": true,
2689
+ "autoincrement": false
2690
+ },
2691
+ "message_id": {
2692
+ "name": "message_id",
2693
+ "type": "text",
2694
+ "primaryKey": false,
2695
+ "notNull": true,
2696
+ "autoincrement": false
2697
+ },
2698
+ "seq": {
2699
+ "name": "seq",
2700
+ "type": "integer",
2701
+ "primaryKey": false,
2702
+ "notNull": true,
2703
+ "autoincrement": false
2704
+ },
2705
+ "type": {
2706
+ "name": "type",
2707
+ "type": "text",
2708
+ "primaryKey": false,
2709
+ "notNull": true,
2710
+ "autoincrement": false
2711
+ },
2712
+ "status": {
2713
+ "name": "status",
2714
+ "type": "text",
2715
+ "primaryKey": false,
2716
+ "notNull": true,
2717
+ "autoincrement": false
2718
+ },
2719
+ "text": {
2720
+ "name": "text",
2721
+ "type": "text",
2722
+ "primaryKey": false,
2723
+ "notNull": false,
2724
+ "autoincrement": false
2725
+ },
2726
+ "tool_use_id": {
2727
+ "name": "tool_use_id",
2728
+ "type": "text",
2729
+ "primaryKey": false,
2730
+ "notNull": false,
2731
+ "autoincrement": false
2732
+ },
2733
+ "tool_name": {
2734
+ "name": "tool_name",
2735
+ "type": "text",
2736
+ "primaryKey": false,
2737
+ "notNull": false,
2738
+ "autoincrement": false
2739
+ },
2740
+ "input_json": {
2741
+ "name": "input_json",
2742
+ "type": "text",
2743
+ "primaryKey": false,
2744
+ "notNull": false,
2745
+ "autoincrement": false
2746
+ },
2747
+ "output_json": {
2748
+ "name": "output_json",
2749
+ "type": "text",
2750
+ "primaryKey": false,
2751
+ "notNull": false,
2752
+ "autoincrement": false
2753
+ },
2754
+ "is_error": {
2755
+ "name": "is_error",
2756
+ "type": "integer",
2757
+ "primaryKey": false,
2758
+ "notNull": false,
2759
+ "autoincrement": false
2760
+ },
2761
+ "asset_id": {
2762
+ "name": "asset_id",
2763
+ "type": "text",
2764
+ "primaryKey": false,
2765
+ "notNull": false,
2766
+ "autoincrement": false
2767
+ },
2768
+ "attachment_intent": {
2769
+ "name": "attachment_intent",
2770
+ "type": "text",
2771
+ "primaryKey": false,
2772
+ "notNull": false,
2773
+ "autoincrement": false
2774
+ },
2775
+ "display_name": {
2776
+ "name": "display_name",
2777
+ "type": "text",
2778
+ "primaryKey": false,
2779
+ "notNull": false,
2780
+ "autoincrement": false
2781
+ },
2782
+ "media_type": {
2783
+ "name": "media_type",
2784
+ "type": "text",
2785
+ "primaryKey": false,
2786
+ "notNull": false,
2787
+ "autoincrement": false
2788
+ },
2789
+ "size_bytes": {
2790
+ "name": "size_bytes",
2791
+ "type": "integer",
2792
+ "primaryKey": false,
2793
+ "notNull": false,
2794
+ "autoincrement": false
2795
+ },
2796
+ "transformation_kind": {
2797
+ "name": "transformation_kind",
2798
+ "type": "text",
2799
+ "primaryKey": false,
2800
+ "notNull": false,
2801
+ "autoincrement": false
2802
+ },
2803
+ "representation_id": {
2804
+ "name": "representation_id",
2805
+ "type": "text",
2806
+ "primaryKey": false,
2807
+ "notNull": false,
2808
+ "autoincrement": false
2809
+ },
2810
+ "processor": {
2811
+ "name": "processor",
2812
+ "type": "text",
2813
+ "primaryKey": false,
2814
+ "notNull": false,
2815
+ "autoincrement": false
2816
+ },
2817
+ "transformation_error": {
2818
+ "name": "transformation_error",
2819
+ "type": "text",
2820
+ "primaryKey": false,
2821
+ "notNull": false,
2822
+ "autoincrement": false
2823
+ },
2824
+ "metadata_json": {
2825
+ "name": "metadata_json",
2826
+ "type": "text",
2827
+ "primaryKey": false,
2828
+ "notNull": true,
2829
+ "autoincrement": false
2830
+ },
2831
+ "created_at": {
2832
+ "name": "created_at",
2833
+ "type": "integer",
2834
+ "primaryKey": false,
2835
+ "notNull": true,
2836
+ "autoincrement": false
2837
+ },
2838
+ "updated_at": {
2839
+ "name": "updated_at",
2840
+ "type": "integer",
2841
+ "primaryKey": false,
2842
+ "notNull": true,
2843
+ "autoincrement": false
2844
+ }
2845
+ },
2846
+ "indexes": {
2847
+ "session_part_message_idx": {
2848
+ "name": "session_part_message_idx",
2849
+ "columns": [
2850
+ "message_id"
2851
+ ],
2852
+ "isUnique": false
2853
+ },
2854
+ "session_part_session_seq": {
2855
+ "name": "session_part_session_seq",
2856
+ "columns": [
2857
+ "session_id",
2858
+ "seq"
2859
+ ],
2860
+ "isUnique": true
2861
+ }
2862
+ },
2863
+ "foreignKeys": {},
2864
+ "compositePrimaryKeys": {},
2865
+ "uniqueConstraints": {},
2866
+ "checkConstraints": {}
2867
+ },
2868
+ "session_message": {
2869
+ "name": "session_message",
2870
+ "columns": {
2871
+ "id": {
2872
+ "name": "id",
2873
+ "type": "text",
2874
+ "primaryKey": true,
2875
+ "notNull": false,
2876
+ "autoincrement": false
2877
+ },
2878
+ "session_id": {
2879
+ "name": "session_id",
2880
+ "type": "text",
2881
+ "primaryKey": false,
2882
+ "notNull": true,
2883
+ "autoincrement": false
2884
+ },
2885
+ "seq": {
2886
+ "name": "seq",
2887
+ "type": "integer",
2888
+ "primaryKey": false,
2889
+ "notNull": true,
2890
+ "autoincrement": false
2891
+ },
2892
+ "role": {
2893
+ "name": "role",
2894
+ "type": "text",
2895
+ "primaryKey": false,
2896
+ "notNull": true,
2897
+ "autoincrement": false
2898
+ },
2899
+ "run_id": {
2900
+ "name": "run_id",
2901
+ "type": "text",
2902
+ "primaryKey": false,
2903
+ "notNull": false,
2904
+ "autoincrement": false
2905
+ },
2906
+ "input_id": {
2907
+ "name": "input_id",
2908
+ "type": "text",
2909
+ "primaryKey": false,
2910
+ "notNull": false,
2911
+ "autoincrement": false
2912
+ },
2913
+ "metadata_json": {
2914
+ "name": "metadata_json",
2915
+ "type": "text",
2916
+ "primaryKey": false,
2917
+ "notNull": true,
2918
+ "autoincrement": false
2919
+ },
2920
+ "created_at": {
2921
+ "name": "created_at",
2922
+ "type": "integer",
2923
+ "primaryKey": false,
2924
+ "notNull": true,
2925
+ "autoincrement": false
2926
+ },
2927
+ "updated_at": {
2928
+ "name": "updated_at",
2929
+ "type": "integer",
2930
+ "primaryKey": false,
2931
+ "notNull": true,
2932
+ "autoincrement": false
2933
+ }
2934
+ },
2935
+ "indexes": {
2936
+ "session_message_session_idx": {
2937
+ "name": "session_message_session_idx",
2938
+ "columns": [
2939
+ "session_id"
2940
+ ],
2941
+ "isUnique": false
2942
+ },
2943
+ "session_message_session_seq": {
2944
+ "name": "session_message_session_seq",
2945
+ "columns": [
2946
+ "session_id",
2947
+ "seq"
2948
+ ],
2949
+ "isUnique": true
2950
+ }
2951
+ },
2952
+ "foreignKeys": {},
2953
+ "compositePrimaryKeys": {},
2954
+ "uniqueConstraints": {},
2955
+ "checkConstraints": {}
2956
+ },
2957
+ "session_plugin_app": {
2958
+ "name": "session_plugin_app",
2959
+ "columns": {
2960
+ "id": {
2961
+ "name": "id",
2962
+ "type": "text",
2963
+ "primaryKey": true,
2964
+ "notNull": true,
2965
+ "autoincrement": false
2966
+ },
2967
+ "session_id": {
2968
+ "name": "session_id",
2969
+ "type": "text",
2970
+ "primaryKey": false,
2971
+ "notNull": true,
2972
+ "autoincrement": false
2973
+ },
2974
+ "plugin_id": {
2975
+ "name": "plugin_id",
2976
+ "type": "text",
2977
+ "primaryKey": false,
2978
+ "notNull": true,
2979
+ "autoincrement": false
2980
+ },
2981
+ "plugin_version": {
2982
+ "name": "plugin_version",
2983
+ "type": "text",
2984
+ "primaryKey": false,
2985
+ "notNull": true,
2986
+ "autoincrement": false
2987
+ },
2988
+ "plugin_digest": {
2989
+ "name": "plugin_digest",
2990
+ "type": "text",
2991
+ "primaryKey": false,
2992
+ "notNull": true,
2993
+ "autoincrement": false
2994
+ },
2995
+ "definition_digest": {
2996
+ "name": "definition_digest",
2997
+ "type": "text",
2998
+ "primaryKey": false,
2999
+ "notNull": true,
3000
+ "autoincrement": false
3001
+ },
3002
+ "backend_id": {
3003
+ "name": "backend_id",
3004
+ "type": "text",
3005
+ "primaryKey": false,
3006
+ "notNull": true,
3007
+ "autoincrement": false
3008
+ },
3009
+ "backend_kind": {
3010
+ "name": "backend_kind",
3011
+ "type": "text",
3012
+ "primaryKey": false,
3013
+ "notNull": true,
3014
+ "autoincrement": false
3015
+ },
3016
+ "resource_uri": {
3017
+ "name": "resource_uri",
3018
+ "type": "text",
3019
+ "primaryKey": false,
3020
+ "notNull": true,
3021
+ "autoincrement": false
3022
+ },
3023
+ "origin_json": {
3024
+ "name": "origin_json",
3025
+ "type": "text",
3026
+ "primaryKey": false,
3027
+ "notNull": true,
3028
+ "autoincrement": false
3029
+ },
3030
+ "logical_key": {
3031
+ "name": "logical_key",
3032
+ "type": "text",
3033
+ "primaryKey": false,
3034
+ "notNull": true,
3035
+ "autoincrement": false
3036
+ },
3037
+ "status": {
3038
+ "name": "status",
3039
+ "type": "text",
3040
+ "primaryKey": false,
3041
+ "notNull": true,
3042
+ "autoincrement": false
3043
+ },
3044
+ "control_revision": {
3045
+ "name": "control_revision",
3046
+ "type": "integer",
3047
+ "primaryKey": false,
3048
+ "notNull": true,
3049
+ "autoincrement": false
3050
+ },
3051
+ "active_action_run_id": {
3052
+ "name": "active_action_run_id",
3053
+ "type": "text",
3054
+ "primaryKey": false,
3055
+ "notNull": false,
3056
+ "autoincrement": false
3057
+ },
3058
+ "last_action_run_id": {
3059
+ "name": "last_action_run_id",
3060
+ "type": "text",
3061
+ "primaryKey": false,
3062
+ "notNull": false,
3063
+ "autoincrement": false
3064
+ },
3065
+ "created_at": {
3066
+ "name": "created_at",
3067
+ "type": "integer",
3068
+ "primaryKey": false,
3069
+ "notNull": true,
3070
+ "autoincrement": false
3071
+ },
3072
+ "updated_at": {
3073
+ "name": "updated_at",
3074
+ "type": "integer",
3075
+ "primaryKey": false,
3076
+ "notNull": true,
3077
+ "autoincrement": false
3078
+ }
3079
+ },
3080
+ "indexes": {
3081
+ "session_plugin_app_logical_key": {
3082
+ "name": "session_plugin_app_logical_key",
3083
+ "columns": [
3084
+ "session_id",
3085
+ "logical_key"
3086
+ ],
3087
+ "isUnique": true
3088
+ },
3089
+ "session_plugin_app_session_status_idx": {
3090
+ "name": "session_plugin_app_session_status_idx",
3091
+ "columns": [
3092
+ "session_id",
3093
+ "status"
3094
+ ],
3095
+ "isUnique": false
3096
+ }
3097
+ },
3098
+ "foreignKeys": {
3099
+ "session_plugin_app_session_id_session_id_fk": {
3100
+ "name": "session_plugin_app_session_id_session_id_fk",
3101
+ "tableFrom": "session_plugin_app",
3102
+ "tableTo": "session",
3103
+ "columnsFrom": [
3104
+ "session_id"
3105
+ ],
3106
+ "columnsTo": [
3107
+ "id"
3108
+ ],
3109
+ "onDelete": "cascade",
3110
+ "onUpdate": "no action"
3111
+ }
3112
+ },
3113
+ "compositePrimaryKeys": {},
3114
+ "uniqueConstraints": {},
3115
+ "checkConstraints": {
3116
+ "session_plugin_app_status": {
3117
+ "name": "session_plugin_app_status",
3118
+ "value": "\"session_plugin_app\".\"status\" IN ('open', 'closed', 'revoked')"
3119
+ },
3120
+ "session_plugin_app_backend_kind": {
3121
+ "name": "session_plugin_app_backend_kind",
3122
+ "value": "\"session_plugin_app\".\"backend_kind\" IN ('native-tools', 'mcp-server')"
3123
+ },
3124
+ "session_plugin_app_revision": {
3125
+ "name": "session_plugin_app_revision",
3126
+ "value": "\"session_plugin_app\".\"control_revision\" >= 0"
3127
+ }
3128
+ }
3129
+ },
3130
+ "session_run_attempt": {
3131
+ "name": "session_run_attempt",
3132
+ "columns": {
3133
+ "id": {
3134
+ "name": "id",
3135
+ "type": "text",
3136
+ "primaryKey": true,
3137
+ "notNull": true,
3138
+ "autoincrement": false
3139
+ },
3140
+ "run_id": {
3141
+ "name": "run_id",
3142
+ "type": "text",
3143
+ "primaryKey": false,
3144
+ "notNull": true,
3145
+ "autoincrement": false
3146
+ },
3147
+ "sequence": {
3148
+ "name": "sequence",
3149
+ "type": "integer",
3150
+ "primaryKey": false,
3151
+ "notNull": true,
3152
+ "autoincrement": false
3153
+ },
3154
+ "status": {
3155
+ "name": "status",
3156
+ "type": "text",
3157
+ "primaryKey": false,
3158
+ "notNull": true,
3159
+ "autoincrement": false
3160
+ },
3161
+ "provider": {
3162
+ "name": "provider",
3163
+ "type": "text",
3164
+ "primaryKey": false,
3165
+ "notNull": false,
3166
+ "autoincrement": false
3167
+ },
3168
+ "model": {
3169
+ "name": "model",
3170
+ "type": "text",
3171
+ "primaryKey": false,
3172
+ "notNull": false,
3173
+ "autoincrement": false
3174
+ },
3175
+ "retry_reason": {
3176
+ "name": "retry_reason",
3177
+ "type": "text",
3178
+ "primaryKey": false,
3179
+ "notNull": false,
3180
+ "autoincrement": false
3181
+ },
3182
+ "error_kind": {
3183
+ "name": "error_kind",
3184
+ "type": "text",
3185
+ "primaryKey": false,
3186
+ "notNull": false,
3187
+ "autoincrement": false
3188
+ },
3189
+ "error": {
3190
+ "name": "error",
3191
+ "type": "text",
3192
+ "primaryKey": false,
3193
+ "notNull": false,
3194
+ "autoincrement": false
3195
+ },
3196
+ "input_tokens": {
3197
+ "name": "input_tokens",
3198
+ "type": "integer",
3199
+ "primaryKey": false,
3200
+ "notNull": false,
3201
+ "autoincrement": false
3202
+ },
3203
+ "output_tokens": {
3204
+ "name": "output_tokens",
3205
+ "type": "integer",
3206
+ "primaryKey": false,
3207
+ "notNull": false,
3208
+ "autoincrement": false
3209
+ },
3210
+ "started_at": {
3211
+ "name": "started_at",
3212
+ "type": "integer",
3213
+ "primaryKey": false,
3214
+ "notNull": false,
3215
+ "autoincrement": false
3216
+ },
3217
+ "finished_at": {
3218
+ "name": "finished_at",
3219
+ "type": "integer",
3220
+ "primaryKey": false,
3221
+ "notNull": false,
3222
+ "autoincrement": false
3223
+ },
3224
+ "created_at": {
3225
+ "name": "created_at",
3226
+ "type": "integer",
3227
+ "primaryKey": false,
3228
+ "notNull": true,
3229
+ "autoincrement": false
3230
+ },
3231
+ "updated_at": {
3232
+ "name": "updated_at",
3233
+ "type": "integer",
3234
+ "primaryKey": false,
3235
+ "notNull": true,
3236
+ "autoincrement": false
3237
+ }
3238
+ },
3239
+ "indexes": {
3240
+ "session_run_attempt_run_sequence_unique": {
3241
+ "name": "session_run_attempt_run_sequence_unique",
3242
+ "columns": [
3243
+ "run_id",
3244
+ "sequence"
3245
+ ],
3246
+ "isUnique": true
3247
+ },
3248
+ "session_run_attempt_run_idx": {
3249
+ "name": "session_run_attempt_run_idx",
3250
+ "columns": [
3251
+ "run_id"
3252
+ ],
3253
+ "isUnique": false
3254
+ },
3255
+ "session_run_attempt_status_idx": {
3256
+ "name": "session_run_attempt_status_idx",
3257
+ "columns": [
3258
+ "status"
3259
+ ],
3260
+ "isUnique": false
3261
+ }
3262
+ },
3263
+ "foreignKeys": {},
3264
+ "compositePrimaryKeys": {},
3265
+ "uniqueConstraints": {},
3266
+ "checkConstraints": {}
3267
+ },
3268
+ "session_run": {
3269
+ "name": "session_run",
3270
+ "columns": {
3271
+ "id": {
3272
+ "name": "id",
3273
+ "type": "text",
3274
+ "primaryKey": true,
3275
+ "notNull": false,
3276
+ "autoincrement": false
3277
+ },
3278
+ "session_id": {
3279
+ "name": "session_id",
3280
+ "type": "text",
3281
+ "primaryKey": false,
3282
+ "notNull": true,
3283
+ "autoincrement": false
3284
+ },
3285
+ "input_id": {
3286
+ "name": "input_id",
3287
+ "type": "text",
3288
+ "primaryKey": false,
3289
+ "notNull": false,
3290
+ "autoincrement": false
3291
+ },
3292
+ "status": {
3293
+ "name": "status",
3294
+ "type": "text",
3295
+ "primaryKey": false,
3296
+ "notNull": true,
3297
+ "autoincrement": false
3298
+ },
3299
+ "started_at": {
3300
+ "name": "started_at",
3301
+ "type": "integer",
3302
+ "primaryKey": false,
3303
+ "notNull": false,
3304
+ "autoincrement": false
3305
+ },
3306
+ "finished_at": {
3307
+ "name": "finished_at",
3308
+ "type": "integer",
3309
+ "primaryKey": false,
3310
+ "notNull": false,
3311
+ "autoincrement": false
3312
+ },
3313
+ "error": {
3314
+ "name": "error",
3315
+ "type": "text",
3316
+ "primaryKey": false,
3317
+ "notNull": false,
3318
+ "autoincrement": false
3319
+ },
3320
+ "metadata_json": {
3321
+ "name": "metadata_json",
3322
+ "type": "text",
3323
+ "primaryKey": false,
3324
+ "notNull": true,
3325
+ "autoincrement": false
3326
+ },
3327
+ "created_at": {
3328
+ "name": "created_at",
3329
+ "type": "integer",
3330
+ "primaryKey": false,
3331
+ "notNull": true,
3332
+ "autoincrement": false
3333
+ },
3334
+ "updated_at": {
3335
+ "name": "updated_at",
3336
+ "type": "integer",
3337
+ "primaryKey": false,
3338
+ "notNull": true,
3339
+ "autoincrement": false
3340
+ }
3341
+ },
3342
+ "indexes": {
3343
+ "session_run_session_idx": {
3344
+ "name": "session_run_session_idx",
3345
+ "columns": [
3346
+ "session_id",
3347
+ "created_at"
3348
+ ],
3349
+ "isUnique": false
3350
+ },
3351
+ "session_run_input_idx": {
3352
+ "name": "session_run_input_idx",
3353
+ "columns": [
3354
+ "input_id"
3355
+ ],
3356
+ "isUnique": false
3357
+ }
3358
+ },
3359
+ "foreignKeys": {},
3360
+ "compositePrimaryKeys": {},
3361
+ "uniqueConstraints": {},
3362
+ "checkConstraints": {}
3363
+ },
3364
+ "session_task": {
3365
+ "name": "session_task",
3366
+ "columns": {
3367
+ "id": {
3368
+ "name": "id",
3369
+ "type": "text",
3370
+ "primaryKey": true,
3371
+ "notNull": false,
3372
+ "autoincrement": false
3373
+ },
3374
+ "session_id": {
3375
+ "name": "session_id",
3376
+ "type": "text",
3377
+ "primaryKey": false,
3378
+ "notNull": true,
3379
+ "autoincrement": false
3380
+ },
3381
+ "request_namespace": {
3382
+ "name": "request_namespace",
3383
+ "type": "text",
3384
+ "primaryKey": false,
3385
+ "notNull": false,
3386
+ "autoincrement": false
3387
+ },
3388
+ "request_id": {
3389
+ "name": "request_id",
3390
+ "type": "text",
3391
+ "primaryKey": false,
3392
+ "notNull": false,
3393
+ "autoincrement": false
3394
+ },
3395
+ "child_session_id": {
3396
+ "name": "child_session_id",
3397
+ "type": "text",
3398
+ "primaryKey": false,
3399
+ "notNull": false,
3400
+ "autoincrement": false
3401
+ },
3402
+ "run_id": {
3403
+ "name": "run_id",
3404
+ "type": "text",
3405
+ "primaryKey": false,
3406
+ "notNull": false,
3407
+ "autoincrement": false
3408
+ },
3409
+ "type": {
3410
+ "name": "type",
3411
+ "type": "text",
3412
+ "primaryKey": false,
3413
+ "notNull": true,
3414
+ "autoincrement": false
3415
+ },
3416
+ "status": {
3417
+ "name": "status",
3418
+ "type": "text",
3419
+ "primaryKey": false,
3420
+ "notNull": true,
3421
+ "autoincrement": false
3422
+ },
3423
+ "description": {
3424
+ "name": "description",
3425
+ "type": "text",
3426
+ "primaryKey": false,
3427
+ "notNull": true,
3428
+ "autoincrement": false
3429
+ },
3430
+ "cwd": {
3431
+ "name": "cwd",
3432
+ "type": "text",
3433
+ "primaryKey": false,
3434
+ "notNull": true,
3435
+ "autoincrement": false
3436
+ },
3437
+ "output": {
3438
+ "name": "output",
3439
+ "type": "text",
3440
+ "primaryKey": false,
3441
+ "notNull": false,
3442
+ "autoincrement": false
3443
+ },
3444
+ "error": {
3445
+ "name": "error",
3446
+ "type": "text",
3447
+ "primaryKey": false,
3448
+ "notNull": false,
3449
+ "autoincrement": false
3450
+ },
3451
+ "metadata_json": {
3452
+ "name": "metadata_json",
3453
+ "type": "text",
3454
+ "primaryKey": false,
3455
+ "notNull": true,
3456
+ "autoincrement": false
3457
+ },
3458
+ "created_at": {
3459
+ "name": "created_at",
3460
+ "type": "integer",
3461
+ "primaryKey": false,
3462
+ "notNull": true,
3463
+ "autoincrement": false
3464
+ },
3465
+ "started_at": {
3466
+ "name": "started_at",
3467
+ "type": "integer",
3468
+ "primaryKey": false,
3469
+ "notNull": false,
3470
+ "autoincrement": false
3471
+ },
3472
+ "finished_at": {
3473
+ "name": "finished_at",
3474
+ "type": "integer",
3475
+ "primaryKey": false,
3476
+ "notNull": false,
3477
+ "autoincrement": false
3478
+ },
3479
+ "updated_at": {
3480
+ "name": "updated_at",
3481
+ "type": "integer",
3482
+ "primaryKey": false,
3483
+ "notNull": true,
3484
+ "autoincrement": false
3485
+ }
3486
+ },
3487
+ "indexes": {
3488
+ "session_task_session_idx": {
3489
+ "name": "session_task_session_idx",
3490
+ "columns": [
3491
+ "session_id",
3492
+ "created_at"
3493
+ ],
3494
+ "isUnique": false
3495
+ },
3496
+ "session_task_request_identity_idx": {
3497
+ "name": "session_task_request_identity_idx",
3498
+ "columns": [
3499
+ "session_id",
3500
+ "request_namespace",
3501
+ "request_id"
3502
+ ],
3503
+ "isUnique": true
3504
+ }
3505
+ },
3506
+ "foreignKeys": {},
3507
+ "compositePrimaryKeys": {},
3508
+ "uniqueConstraints": {},
3509
+ "checkConstraints": {}
3510
+ },
3511
+ "session": {
3512
+ "name": "session",
3513
+ "columns": {
3514
+ "id": {
3515
+ "name": "id",
3516
+ "type": "text",
3517
+ "primaryKey": true,
3518
+ "notNull": false,
3519
+ "autoincrement": false
3520
+ },
3521
+ "parent_id": {
3522
+ "name": "parent_id",
3523
+ "type": "text",
3524
+ "primaryKey": false,
3525
+ "notNull": false,
3526
+ "autoincrement": false
3527
+ },
3528
+ "project_id": {
3529
+ "name": "project_id",
3530
+ "type": "text",
3531
+ "primaryKey": false,
3532
+ "notNull": false,
3533
+ "autoincrement": false
3534
+ },
3535
+ "cwd": {
3536
+ "name": "cwd",
3537
+ "type": "text",
3538
+ "primaryKey": false,
3539
+ "notNull": true,
3540
+ "autoincrement": false
3541
+ },
3542
+ "cwd_relative": {
3543
+ "name": "cwd_relative",
3544
+ "type": "text",
3545
+ "primaryKey": false,
3546
+ "notNull": false,
3547
+ "autoincrement": false
3548
+ },
3549
+ "title": {
3550
+ "name": "title",
3551
+ "type": "text",
3552
+ "primaryKey": false,
3553
+ "notNull": true,
3554
+ "autoincrement": false
3555
+ },
3556
+ "model": {
3557
+ "name": "model",
3558
+ "type": "text",
3559
+ "primaryKey": false,
3560
+ "notNull": true,
3561
+ "autoincrement": false
3562
+ },
3563
+ "agent": {
3564
+ "name": "agent",
3565
+ "type": "text",
3566
+ "primaryKey": false,
3567
+ "notNull": false,
3568
+ "autoincrement": false
3569
+ },
3570
+ "status": {
3571
+ "name": "status",
3572
+ "type": "text",
3573
+ "primaryKey": false,
3574
+ "notNull": true,
3575
+ "autoincrement": false
3576
+ },
3577
+ "metadata_json": {
3578
+ "name": "metadata_json",
3579
+ "type": "text",
3580
+ "primaryKey": false,
3581
+ "notNull": true,
3582
+ "autoincrement": false
3583
+ },
3584
+ "created_at": {
3585
+ "name": "created_at",
3586
+ "type": "integer",
3587
+ "primaryKey": false,
3588
+ "notNull": true,
3589
+ "autoincrement": false
3590
+ },
3591
+ "updated_at": {
3592
+ "name": "updated_at",
3593
+ "type": "integer",
3594
+ "primaryKey": false,
3595
+ "notNull": true,
3596
+ "autoincrement": false
3597
+ },
3598
+ "archived_at": {
3599
+ "name": "archived_at",
3600
+ "type": "integer",
3601
+ "primaryKey": false,
3602
+ "notNull": false,
3603
+ "autoincrement": false
3604
+ }
3605
+ },
3606
+ "indexes": {
3607
+ "session_parent_idx": {
3608
+ "name": "session_parent_idx",
3609
+ "columns": [
3610
+ "parent_id"
3611
+ ],
3612
+ "isUnique": false
3613
+ },
3614
+ "session_cwd_updated_idx": {
3615
+ "name": "session_cwd_updated_idx",
3616
+ "columns": [
3617
+ "cwd",
3618
+ "updated_at"
3619
+ ],
3620
+ "isUnique": false
3621
+ }
3622
+ },
3623
+ "foreignKeys": {
3624
+ "session_project_id_project_id_fk": {
3625
+ "name": "session_project_id_project_id_fk",
3626
+ "tableFrom": "session",
3627
+ "tableTo": "project",
3628
+ "columnsFrom": [
3629
+ "project_id"
3630
+ ],
3631
+ "columnsTo": [
3632
+ "id"
3633
+ ],
3634
+ "onDelete": "no action",
3635
+ "onUpdate": "no action"
3636
+ }
3637
+ },
3638
+ "compositePrimaryKeys": {},
3639
+ "uniqueConstraints": {},
3640
+ "checkConstraints": {}
3641
+ },
3642
+ "tool_dispatch_attempt": {
3643
+ "name": "tool_dispatch_attempt",
3644
+ "columns": {
3645
+ "id": {
3646
+ "name": "id",
3647
+ "type": "text",
3648
+ "primaryKey": true,
3649
+ "notNull": true,
3650
+ "autoincrement": false
3651
+ },
3652
+ "session_id": {
3653
+ "name": "session_id",
3654
+ "type": "text",
3655
+ "primaryKey": false,
3656
+ "notNull": true,
3657
+ "autoincrement": false
3658
+ },
3659
+ "operation_id": {
3660
+ "name": "operation_id",
3661
+ "type": "text",
3662
+ "primaryKey": false,
3663
+ "notNull": true,
3664
+ "autoincrement": false
3665
+ },
3666
+ "data_json": {
3667
+ "name": "data_json",
3668
+ "type": "text",
3669
+ "primaryKey": false,
3670
+ "notNull": true,
3671
+ "autoincrement": false
3672
+ }
3673
+ },
3674
+ "indexes": {
3675
+ "tool_dispatch_attempt_operation_idx": {
3676
+ "name": "tool_dispatch_attempt_operation_idx",
3677
+ "columns": [
3678
+ "operation_id"
3679
+ ],
3680
+ "isUnique": false
3681
+ },
3682
+ "tool_dispatch_attempt_session_idx": {
3683
+ "name": "tool_dispatch_attempt_session_idx",
3684
+ "columns": [
3685
+ "session_id"
3686
+ ],
3687
+ "isUnique": false
3688
+ }
3689
+ },
3690
+ "foreignKeys": {},
3691
+ "compositePrimaryKeys": {},
3692
+ "uniqueConstraints": {},
3693
+ "checkConstraints": {}
3694
+ },
3695
+ "tool_operation": {
3696
+ "name": "tool_operation",
3697
+ "columns": {
3698
+ "id": {
3699
+ "name": "id",
3700
+ "type": "text",
3701
+ "primaryKey": true,
3702
+ "notNull": true,
3703
+ "autoincrement": false
3704
+ },
3705
+ "session_id": {
3706
+ "name": "session_id",
3707
+ "type": "text",
3708
+ "primaryKey": false,
3709
+ "notNull": true,
3710
+ "autoincrement": false
3711
+ },
3712
+ "run_id": {
3713
+ "name": "run_id",
3714
+ "type": "text",
3715
+ "primaryKey": false,
3716
+ "notNull": true,
3717
+ "autoincrement": false
3718
+ },
3719
+ "logical_call_id": {
3720
+ "name": "logical_call_id",
3721
+ "type": "text",
3722
+ "primaryKey": false,
3723
+ "notNull": true,
3724
+ "autoincrement": false
3725
+ },
3726
+ "state": {
3727
+ "name": "state",
3728
+ "type": "text",
3729
+ "primaryKey": false,
3730
+ "notNull": true,
3731
+ "autoincrement": false
3732
+ },
3733
+ "data_json": {
3734
+ "name": "data_json",
3735
+ "type": "text",
3736
+ "primaryKey": false,
3737
+ "notNull": true,
3738
+ "autoincrement": false
3739
+ }
3740
+ },
3741
+ "indexes": {
3742
+ "tool_operation_call_idx": {
3743
+ "name": "tool_operation_call_idx",
3744
+ "columns": [
3745
+ "session_id",
3746
+ "run_id",
3747
+ "logical_call_id"
3748
+ ],
3749
+ "isUnique": true
3750
+ },
3751
+ "tool_operation_session_state_idx": {
3752
+ "name": "tool_operation_session_state_idx",
3753
+ "columns": [
3754
+ "session_id",
3755
+ "state"
3756
+ ],
3757
+ "isUnique": false
3758
+ }
3759
+ },
3760
+ "foreignKeys": {},
3761
+ "compositePrimaryKeys": {},
3762
+ "uniqueConstraints": {},
3763
+ "checkConstraints": {}
3764
+ },
3765
+ "workflow_event": {
3766
+ "name": "workflow_event",
3767
+ "columns": {
3768
+ "seq": {
3769
+ "name": "seq",
3770
+ "type": "integer",
3771
+ "primaryKey": true,
3772
+ "notNull": true,
3773
+ "autoincrement": true
3774
+ },
3775
+ "workflow_run_id": {
3776
+ "name": "workflow_run_id",
3777
+ "type": "text",
3778
+ "primaryKey": false,
3779
+ "notNull": true,
3780
+ "autoincrement": false
3781
+ },
3782
+ "type": {
3783
+ "name": "type",
3784
+ "type": "text",
3785
+ "primaryKey": false,
3786
+ "notNull": true,
3787
+ "autoincrement": false
3788
+ },
3789
+ "event_json": {
3790
+ "name": "event_json",
3791
+ "type": "text",
3792
+ "primaryKey": false,
3793
+ "notNull": true,
3794
+ "autoincrement": false
3795
+ },
3796
+ "created_at": {
3797
+ "name": "created_at",
3798
+ "type": "integer",
3799
+ "primaryKey": false,
3800
+ "notNull": true,
3801
+ "autoincrement": false
3802
+ }
3803
+ },
3804
+ "indexes": {
3805
+ "workflow_event_run_seq_idx": {
3806
+ "name": "workflow_event_run_seq_idx",
3807
+ "columns": [
3808
+ "workflow_run_id",
3809
+ "seq"
3810
+ ],
3811
+ "isUnique": false
3812
+ }
3813
+ },
3814
+ "foreignKeys": {
3815
+ "workflow_event_workflow_run_id_workflow_run_run_id_fk": {
3816
+ "name": "workflow_event_workflow_run_id_workflow_run_run_id_fk",
3817
+ "tableFrom": "workflow_event",
3818
+ "tableTo": "workflow_run",
3819
+ "columnsFrom": [
3820
+ "workflow_run_id"
3821
+ ],
3822
+ "columnsTo": [
3823
+ "run_id"
3824
+ ],
3825
+ "onDelete": "cascade",
3826
+ "onUpdate": "no action"
3827
+ }
3828
+ },
3829
+ "compositePrimaryKeys": {},
3830
+ "uniqueConstraints": {},
3831
+ "checkConstraints": {}
3832
+ },
3833
+ "workflow_execution_claim": {
3834
+ "name": "workflow_execution_claim",
3835
+ "columns": {
3836
+ "workflow_run_id": {
3837
+ "name": "workflow_run_id",
3838
+ "type": "text",
3839
+ "primaryKey": true,
3840
+ "notNull": true,
3841
+ "autoincrement": false
3842
+ },
3843
+ "owner_id": {
3844
+ "name": "owner_id",
3845
+ "type": "text",
3846
+ "primaryKey": false,
3847
+ "notNull": true,
3848
+ "autoincrement": false
3849
+ },
3850
+ "generation": {
3851
+ "name": "generation",
3852
+ "type": "integer",
3853
+ "primaryKey": false,
3854
+ "notNull": true,
3855
+ "autoincrement": false
3856
+ },
3857
+ "claimed_at": {
3858
+ "name": "claimed_at",
3859
+ "type": "integer",
3860
+ "primaryKey": false,
3861
+ "notNull": true,
3862
+ "autoincrement": false
3863
+ },
3864
+ "heartbeat_at": {
3865
+ "name": "heartbeat_at",
3866
+ "type": "integer",
3867
+ "primaryKey": false,
3868
+ "notNull": true,
3869
+ "autoincrement": false
3870
+ },
3871
+ "finished_at": {
3872
+ "name": "finished_at",
3873
+ "type": "integer",
3874
+ "primaryKey": false,
3875
+ "notNull": false,
3876
+ "autoincrement": false
3877
+ },
3878
+ "status": {
3879
+ "name": "status",
3880
+ "type": "text",
3881
+ "primaryKey": false,
3882
+ "notNull": true,
3883
+ "autoincrement": false
3884
+ }
3885
+ },
3886
+ "indexes": {},
3887
+ "foreignKeys": {
3888
+ "workflow_execution_claim_workflow_run_id_workflow_run_run_id_fk": {
3889
+ "name": "workflow_execution_claim_workflow_run_id_workflow_run_run_id_fk",
3890
+ "tableFrom": "workflow_execution_claim",
3891
+ "tableTo": "workflow_run",
3892
+ "columnsFrom": [
3893
+ "workflow_run_id"
3894
+ ],
3895
+ "columnsTo": [
3896
+ "run_id"
3897
+ ],
3898
+ "onDelete": "cascade",
3899
+ "onUpdate": "no action"
3900
+ }
3901
+ },
3902
+ "compositePrimaryKeys": {},
3903
+ "uniqueConstraints": {},
3904
+ "checkConstraints": {}
3905
+ },
3906
+ "workflow_run": {
3907
+ "name": "workflow_run",
3908
+ "columns": {
3909
+ "run_id": {
3910
+ "name": "run_id",
3911
+ "type": "text",
3912
+ "primaryKey": true,
3913
+ "notNull": true,
3914
+ "autoincrement": false
3915
+ },
3916
+ "owner_session_id": {
3917
+ "name": "owner_session_id",
3918
+ "type": "text",
3919
+ "primaryKey": false,
3920
+ "notNull": false,
3921
+ "autoincrement": false
3922
+ },
3923
+ "owner_input_id": {
3924
+ "name": "owner_input_id",
3925
+ "type": "text",
3926
+ "primaryKey": false,
3927
+ "notNull": false,
3928
+ "autoincrement": false
3929
+ },
3930
+ "owner_run_id": {
3931
+ "name": "owner_run_id",
3932
+ "type": "text",
3933
+ "primaryKey": false,
3934
+ "notNull": false,
3935
+ "autoincrement": false
3936
+ },
3937
+ "status": {
3938
+ "name": "status",
3939
+ "type": "text",
3940
+ "primaryKey": false,
3941
+ "notNull": true,
3942
+ "autoincrement": false
3943
+ },
3944
+ "termination": {
3945
+ "name": "termination",
3946
+ "type": "text",
3947
+ "primaryKey": false,
3948
+ "notNull": false,
3949
+ "autoincrement": false
3950
+ },
3951
+ "snapshot_json": {
3952
+ "name": "snapshot_json",
3953
+ "type": "text",
3954
+ "primaryKey": false,
3955
+ "notNull": true,
3956
+ "autoincrement": false
3957
+ },
3958
+ "origin_json": {
3959
+ "name": "origin_json",
3960
+ "type": "text",
3961
+ "primaryKey": false,
3962
+ "notNull": false,
3963
+ "autoincrement": false
3964
+ },
3965
+ "created_at": {
3966
+ "name": "created_at",
3967
+ "type": "integer",
3968
+ "primaryKey": false,
3969
+ "notNull": true,
3970
+ "autoincrement": false
3971
+ },
3972
+ "updated_at": {
3973
+ "name": "updated_at",
3974
+ "type": "integer",
3975
+ "primaryKey": false,
3976
+ "notNull": true,
3977
+ "autoincrement": false
3978
+ }
3979
+ },
3980
+ "indexes": {
3981
+ "workflow_run_owner_idx": {
3982
+ "name": "workflow_run_owner_idx",
3983
+ "columns": [
3984
+ "owner_session_id",
3985
+ "updated_at"
3986
+ ],
3987
+ "isUnique": false
3988
+ },
3989
+ "workflow_run_status_idx": {
3990
+ "name": "workflow_run_status_idx",
3991
+ "columns": [
3992
+ "status",
3993
+ "updated_at"
3994
+ ],
3995
+ "isUnique": false
3996
+ }
3997
+ },
3998
+ "foreignKeys": {
3999
+ "workflow_run_owner_session_id_session_id_fk": {
4000
+ "name": "workflow_run_owner_session_id_session_id_fk",
4001
+ "tableFrom": "workflow_run",
4002
+ "tableTo": "session",
4003
+ "columnsFrom": [
4004
+ "owner_session_id"
4005
+ ],
4006
+ "columnsTo": [
4007
+ "id"
4008
+ ],
4009
+ "onDelete": "set null",
4010
+ "onUpdate": "no action"
4011
+ },
4012
+ "workflow_run_owner_input_id_session_input_id_fk": {
4013
+ "name": "workflow_run_owner_input_id_session_input_id_fk",
4014
+ "tableFrom": "workflow_run",
4015
+ "tableTo": "session_input",
4016
+ "columnsFrom": [
4017
+ "owner_input_id"
4018
+ ],
4019
+ "columnsTo": [
4020
+ "id"
4021
+ ],
4022
+ "onDelete": "set null",
4023
+ "onUpdate": "no action"
4024
+ },
4025
+ "workflow_run_owner_run_id_session_run_id_fk": {
4026
+ "name": "workflow_run_owner_run_id_session_run_id_fk",
4027
+ "tableFrom": "workflow_run",
4028
+ "tableTo": "session_run",
4029
+ "columnsFrom": [
4030
+ "owner_run_id"
4031
+ ],
4032
+ "columnsTo": [
4033
+ "id"
4034
+ ],
4035
+ "onDelete": "set null",
4036
+ "onUpdate": "no action"
4037
+ }
4038
+ },
4039
+ "compositePrimaryKeys": {},
4040
+ "uniqueConstraints": {},
4041
+ "checkConstraints": {}
4042
+ },
4043
+ "workflow_task_attempt": {
4044
+ "name": "workflow_task_attempt",
4045
+ "columns": {
4046
+ "workflow_run_id": {
4047
+ "name": "workflow_run_id",
4048
+ "type": "text",
4049
+ "primaryKey": false,
4050
+ "notNull": true,
4051
+ "autoincrement": false
4052
+ },
4053
+ "task_id": {
4054
+ "name": "task_id",
4055
+ "type": "text",
4056
+ "primaryKey": false,
4057
+ "notNull": true,
4058
+ "autoincrement": false
4059
+ },
4060
+ "attempt": {
4061
+ "name": "attempt",
4062
+ "type": "integer",
4063
+ "primaryKey": false,
4064
+ "notNull": true,
4065
+ "autoincrement": false
4066
+ },
4067
+ "status": {
4068
+ "name": "status",
4069
+ "type": "text",
4070
+ "primaryKey": false,
4071
+ "notNull": true,
4072
+ "autoincrement": false
4073
+ },
4074
+ "payload_json": {
4075
+ "name": "payload_json",
4076
+ "type": "text",
4077
+ "primaryKey": false,
4078
+ "notNull": true,
4079
+ "autoincrement": false
4080
+ },
4081
+ "started_at": {
4082
+ "name": "started_at",
4083
+ "type": "integer",
4084
+ "primaryKey": false,
4085
+ "notNull": true,
4086
+ "autoincrement": false
4087
+ },
4088
+ "finished_at": {
4089
+ "name": "finished_at",
4090
+ "type": "integer",
4091
+ "primaryKey": false,
4092
+ "notNull": false,
4093
+ "autoincrement": false
4094
+ }
4095
+ },
4096
+ "indexes": {},
4097
+ "foreignKeys": {
4098
+ "workflow_task_attempt_workflow_run_id_workflow_run_run_id_fk": {
4099
+ "name": "workflow_task_attempt_workflow_run_id_workflow_run_run_id_fk",
4100
+ "tableFrom": "workflow_task_attempt",
4101
+ "tableTo": "workflow_run",
4102
+ "columnsFrom": [
4103
+ "workflow_run_id"
4104
+ ],
4105
+ "columnsTo": [
4106
+ "run_id"
4107
+ ],
4108
+ "onDelete": "cascade",
4109
+ "onUpdate": "no action"
4110
+ }
4111
+ },
4112
+ "compositePrimaryKeys": {
4113
+ "workflow_task_attempt_workflow_run_id_task_id_attempt_pk": {
4114
+ "columns": [
4115
+ "workflow_run_id",
4116
+ "task_id",
4117
+ "attempt"
4118
+ ],
4119
+ "name": "workflow_task_attempt_workflow_run_id_task_id_attempt_pk"
4120
+ }
4121
+ },
4122
+ "uniqueConstraints": {},
4123
+ "checkConstraints": {}
4124
+ }
4125
+ },
4126
+ "views": {},
4127
+ "enums": {},
4128
+ "_meta": {
4129
+ "schemas": {},
4130
+ "tables": {},
4131
+ "columns": {}
4132
+ },
4133
+ "internal": {
4134
+ "indexes": {}
4135
+ }
4136
+ }