@rzx/ohs 1.2.7 → 1.2.20

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,3787 @@
1
+ {
2
+ "version": "6",
3
+ "dialect": "sqlite",
4
+ "id": "287c0193-66b0-4433-b6fb-c02954abafd4",
5
+ "prevId": "79c279c4-99a6-4c84-9667-c699ef623065",
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
+ "external_conversation": {
616
+ "name": "external_conversation",
617
+ "columns": {
618
+ "id": {
619
+ "name": "id",
620
+ "type": "text",
621
+ "primaryKey": true,
622
+ "notNull": true,
623
+ "autoincrement": false
624
+ },
625
+ "connector": {
626
+ "name": "connector",
627
+ "type": "text",
628
+ "primaryKey": false,
629
+ "notNull": true,
630
+ "autoincrement": false
631
+ },
632
+ "account_id": {
633
+ "name": "account_id",
634
+ "type": "text",
635
+ "primaryKey": false,
636
+ "notNull": true,
637
+ "autoincrement": false
638
+ },
639
+ "workspace_id": {
640
+ "name": "workspace_id",
641
+ "type": "text",
642
+ "primaryKey": false,
643
+ "notNull": false,
644
+ "autoincrement": false
645
+ },
646
+ "chat_id": {
647
+ "name": "chat_id",
648
+ "type": "text",
649
+ "primaryKey": false,
650
+ "notNull": true,
651
+ "autoincrement": false
652
+ },
653
+ "thread_id": {
654
+ "name": "thread_id",
655
+ "type": "text",
656
+ "primaryKey": false,
657
+ "notNull": true,
658
+ "autoincrement": false,
659
+ "default": "''"
660
+ },
661
+ "session_id": {
662
+ "name": "session_id",
663
+ "type": "text",
664
+ "primaryKey": false,
665
+ "notNull": true,
666
+ "autoincrement": false
667
+ },
668
+ "created_at": {
669
+ "name": "created_at",
670
+ "type": "integer",
671
+ "primaryKey": false,
672
+ "notNull": true,
673
+ "autoincrement": false
674
+ },
675
+ "updated_at": {
676
+ "name": "updated_at",
677
+ "type": "integer",
678
+ "primaryKey": false,
679
+ "notNull": true,
680
+ "autoincrement": false
681
+ }
682
+ },
683
+ "indexes": {
684
+ "external_conversation_identity_unique": {
685
+ "name": "external_conversation_identity_unique",
686
+ "columns": [
687
+ "connector",
688
+ "account_id",
689
+ "chat_id",
690
+ "thread_id"
691
+ ],
692
+ "isUnique": true
693
+ },
694
+ "external_conversation_session_idx": {
695
+ "name": "external_conversation_session_idx",
696
+ "columns": [
697
+ "session_id"
698
+ ],
699
+ "isUnique": false
700
+ }
701
+ },
702
+ "foreignKeys": {
703
+ "external_conversation_session_id_session_id_fk": {
704
+ "name": "external_conversation_session_id_session_id_fk",
705
+ "tableFrom": "external_conversation",
706
+ "tableTo": "session",
707
+ "columnsFrom": [
708
+ "session_id"
709
+ ],
710
+ "columnsTo": [
711
+ "id"
712
+ ],
713
+ "onDelete": "cascade",
714
+ "onUpdate": "no action"
715
+ }
716
+ },
717
+ "compositePrimaryKeys": {},
718
+ "uniqueConstraints": {},
719
+ "checkConstraints": {}
720
+ },
721
+ "note_attachment": {
722
+ "name": "note_attachment",
723
+ "columns": {
724
+ "id": {
725
+ "name": "id",
726
+ "type": "text",
727
+ "primaryKey": true,
728
+ "notNull": true,
729
+ "autoincrement": false
730
+ },
731
+ "note_id": {
732
+ "name": "note_id",
733
+ "type": "text",
734
+ "primaryKey": false,
735
+ "notNull": true,
736
+ "autoincrement": false
737
+ },
738
+ "name": {
739
+ "name": "name",
740
+ "type": "text",
741
+ "primaryKey": false,
742
+ "notNull": true,
743
+ "autoincrement": false
744
+ },
745
+ "media_type": {
746
+ "name": "media_type",
747
+ "type": "text",
748
+ "primaryKey": false,
749
+ "notNull": true,
750
+ "autoincrement": false
751
+ },
752
+ "size_bytes": {
753
+ "name": "size_bytes",
754
+ "type": "integer",
755
+ "primaryKey": false,
756
+ "notNull": true,
757
+ "autoincrement": false
758
+ },
759
+ "created_at": {
760
+ "name": "created_at",
761
+ "type": "integer",
762
+ "primaryKey": false,
763
+ "notNull": true,
764
+ "autoincrement": false
765
+ },
766
+ "data": {
767
+ "name": "data",
768
+ "type": "blob",
769
+ "primaryKey": false,
770
+ "notNull": true,
771
+ "autoincrement": false
772
+ }
773
+ },
774
+ "indexes": {
775
+ "note_attachment_note_idx": {
776
+ "name": "note_attachment_note_idx",
777
+ "columns": [
778
+ "note_id"
779
+ ],
780
+ "isUnique": false
781
+ }
782
+ },
783
+ "foreignKeys": {
784
+ "note_attachment_note_id_note_id_fk": {
785
+ "name": "note_attachment_note_id_note_id_fk",
786
+ "tableFrom": "note_attachment",
787
+ "tableTo": "note",
788
+ "columnsFrom": [
789
+ "note_id"
790
+ ],
791
+ "columnsTo": [
792
+ "id"
793
+ ],
794
+ "onDelete": "cascade",
795
+ "onUpdate": "no action"
796
+ }
797
+ },
798
+ "compositePrimaryKeys": {},
799
+ "uniqueConstraints": {},
800
+ "checkConstraints": {}
801
+ },
802
+ "note_file_index": {
803
+ "name": "note_file_index",
804
+ "columns": {
805
+ "id": {
806
+ "name": "id",
807
+ "type": "text",
808
+ "primaryKey": true,
809
+ "notNull": true,
810
+ "autoincrement": false
811
+ },
812
+ "revision": {
813
+ "name": "revision",
814
+ "type": "integer",
815
+ "primaryKey": false,
816
+ "notNull": true,
817
+ "autoincrement": false
818
+ },
819
+ "created_at": {
820
+ "name": "created_at",
821
+ "type": "integer",
822
+ "primaryKey": false,
823
+ "notNull": true,
824
+ "autoincrement": false
825
+ },
826
+ "updated_at": {
827
+ "name": "updated_at",
828
+ "type": "integer",
829
+ "primaryKey": false,
830
+ "notNull": true,
831
+ "autoincrement": false
832
+ },
833
+ "sha256": {
834
+ "name": "sha256",
835
+ "type": "text",
836
+ "primaryKey": false,
837
+ "notNull": true,
838
+ "autoincrement": false
839
+ },
840
+ "deleted_at": {
841
+ "name": "deleted_at",
842
+ "type": "integer",
843
+ "primaryKey": false,
844
+ "notNull": false,
845
+ "autoincrement": false
846
+ }
847
+ },
848
+ "indexes": {},
849
+ "foreignKeys": {},
850
+ "compositePrimaryKeys": {},
851
+ "uniqueConstraints": {},
852
+ "checkConstraints": {}
853
+ },
854
+ "note": {
855
+ "name": "note",
856
+ "columns": {
857
+ "id": {
858
+ "name": "id",
859
+ "type": "text",
860
+ "primaryKey": true,
861
+ "notNull": true,
862
+ "autoincrement": false
863
+ },
864
+ "content": {
865
+ "name": "content",
866
+ "type": "text",
867
+ "primaryKey": false,
868
+ "notNull": true,
869
+ "autoincrement": false
870
+ },
871
+ "revision": {
872
+ "name": "revision",
873
+ "type": "integer",
874
+ "primaryKey": false,
875
+ "notNull": true,
876
+ "autoincrement": false,
877
+ "default": 1
878
+ },
879
+ "created_at": {
880
+ "name": "created_at",
881
+ "type": "integer",
882
+ "primaryKey": false,
883
+ "notNull": true,
884
+ "autoincrement": false
885
+ },
886
+ "updated_at": {
887
+ "name": "updated_at",
888
+ "type": "integer",
889
+ "primaryKey": false,
890
+ "notNull": true,
891
+ "autoincrement": false
892
+ },
893
+ "properties": {
894
+ "name": "properties",
895
+ "type": "text",
896
+ "primaryKey": false,
897
+ "notNull": false,
898
+ "autoincrement": false
899
+ }
900
+ },
901
+ "indexes": {
902
+ "note_updated_at_idx": {
903
+ "name": "note_updated_at_idx",
904
+ "columns": [
905
+ "updated_at"
906
+ ],
907
+ "isUnique": false
908
+ }
909
+ },
910
+ "foreignKeys": {},
911
+ "compositePrimaryKeys": {},
912
+ "uniqueConstraints": {},
913
+ "checkConstraints": {}
914
+ },
915
+ "permission_request": {
916
+ "name": "permission_request",
917
+ "columns": {
918
+ "id": {
919
+ "name": "id",
920
+ "type": "text",
921
+ "primaryKey": true,
922
+ "notNull": false,
923
+ "autoincrement": false
924
+ },
925
+ "session_id": {
926
+ "name": "session_id",
927
+ "type": "text",
928
+ "primaryKey": false,
929
+ "notNull": true,
930
+ "autoincrement": false
931
+ },
932
+ "run_id": {
933
+ "name": "run_id",
934
+ "type": "text",
935
+ "primaryKey": false,
936
+ "notNull": false,
937
+ "autoincrement": false
938
+ },
939
+ "tool_name": {
940
+ "name": "tool_name",
941
+ "type": "text",
942
+ "primaryKey": false,
943
+ "notNull": true,
944
+ "autoincrement": false
945
+ },
946
+ "payload_json": {
947
+ "name": "payload_json",
948
+ "type": "text",
949
+ "primaryKey": false,
950
+ "notNull": true,
951
+ "autoincrement": false
952
+ },
953
+ "status": {
954
+ "name": "status",
955
+ "type": "text",
956
+ "primaryKey": false,
957
+ "notNull": true,
958
+ "autoincrement": false
959
+ },
960
+ "decision": {
961
+ "name": "decision",
962
+ "type": "text",
963
+ "primaryKey": false,
964
+ "notNull": false,
965
+ "autoincrement": false
966
+ },
967
+ "decided_by_client_id": {
968
+ "name": "decided_by_client_id",
969
+ "type": "text",
970
+ "primaryKey": false,
971
+ "notNull": false,
972
+ "autoincrement": false
973
+ },
974
+ "created_at": {
975
+ "name": "created_at",
976
+ "type": "integer",
977
+ "primaryKey": false,
978
+ "notNull": true,
979
+ "autoincrement": false
980
+ },
981
+ "updated_at": {
982
+ "name": "updated_at",
983
+ "type": "integer",
984
+ "primaryKey": false,
985
+ "notNull": true,
986
+ "autoincrement": false
987
+ }
988
+ },
989
+ "indexes": {
990
+ "permission_session_status_idx": {
991
+ "name": "permission_session_status_idx",
992
+ "columns": [
993
+ "session_id",
994
+ "status"
995
+ ],
996
+ "isUnique": false
997
+ }
998
+ },
999
+ "foreignKeys": {},
1000
+ "compositePrimaryKeys": {},
1001
+ "uniqueConstraints": {},
1002
+ "checkConstraints": {}
1003
+ },
1004
+ "project_location": {
1005
+ "name": "project_location",
1006
+ "columns": {
1007
+ "id": {
1008
+ "name": "id",
1009
+ "type": "text",
1010
+ "primaryKey": true,
1011
+ "notNull": true,
1012
+ "autoincrement": false
1013
+ },
1014
+ "project_id": {
1015
+ "name": "project_id",
1016
+ "type": "text",
1017
+ "primaryKey": false,
1018
+ "notNull": true,
1019
+ "autoincrement": false
1020
+ },
1021
+ "path": {
1022
+ "name": "path",
1023
+ "type": "text",
1024
+ "primaryKey": false,
1025
+ "notNull": true,
1026
+ "autoincrement": false
1027
+ },
1028
+ "normalized_path": {
1029
+ "name": "normalized_path",
1030
+ "type": "text",
1031
+ "primaryKey": false,
1032
+ "notNull": true,
1033
+ "autoincrement": false
1034
+ },
1035
+ "status": {
1036
+ "name": "status",
1037
+ "type": "text",
1038
+ "primaryKey": false,
1039
+ "notNull": true,
1040
+ "autoincrement": false
1041
+ },
1042
+ "bound_at": {
1043
+ "name": "bound_at",
1044
+ "type": "integer",
1045
+ "primaryKey": false,
1046
+ "notNull": true,
1047
+ "autoincrement": false
1048
+ },
1049
+ "last_verified_at": {
1050
+ "name": "last_verified_at",
1051
+ "type": "integer",
1052
+ "primaryKey": false,
1053
+ "notNull": false,
1054
+ "autoincrement": false
1055
+ }
1056
+ },
1057
+ "indexes": {
1058
+ "project_location_project_idx": {
1059
+ "name": "project_location_project_idx",
1060
+ "columns": [
1061
+ "project_id",
1062
+ "status"
1063
+ ],
1064
+ "isUnique": false
1065
+ },
1066
+ "project_location_active_path": {
1067
+ "name": "project_location_active_path",
1068
+ "columns": [
1069
+ "normalized_path"
1070
+ ],
1071
+ "isUnique": true,
1072
+ "where": "\"project_location\".\"status\" = 'active'"
1073
+ },
1074
+ "project_location_active_project": {
1075
+ "name": "project_location_active_project",
1076
+ "columns": [
1077
+ "project_id"
1078
+ ],
1079
+ "isUnique": true,
1080
+ "where": "\"project_location\".\"status\" = 'active'"
1081
+ }
1082
+ },
1083
+ "foreignKeys": {
1084
+ "project_location_project_id_project_id_fk": {
1085
+ "name": "project_location_project_id_project_id_fk",
1086
+ "tableFrom": "project_location",
1087
+ "tableTo": "project",
1088
+ "columnsFrom": [
1089
+ "project_id"
1090
+ ],
1091
+ "columnsTo": [
1092
+ "id"
1093
+ ],
1094
+ "onDelete": "cascade",
1095
+ "onUpdate": "no action"
1096
+ }
1097
+ },
1098
+ "compositePrimaryKeys": {},
1099
+ "uniqueConstraints": {},
1100
+ "checkConstraints": {}
1101
+ },
1102
+ "projection_settlement": {
1103
+ "name": "projection_settlement",
1104
+ "columns": {
1105
+ "id": {
1106
+ "name": "id",
1107
+ "type": "text",
1108
+ "primaryKey": true,
1109
+ "notNull": true,
1110
+ "autoincrement": false
1111
+ },
1112
+ "projector": {
1113
+ "name": "projector",
1114
+ "type": "text",
1115
+ "primaryKey": false,
1116
+ "notNull": true,
1117
+ "autoincrement": false
1118
+ },
1119
+ "root_session_id": {
1120
+ "name": "root_session_id",
1121
+ "type": "text",
1122
+ "primaryKey": false,
1123
+ "notNull": true,
1124
+ "autoincrement": false
1125
+ },
1126
+ "event_sequence": {
1127
+ "name": "event_sequence",
1128
+ "type": "integer",
1129
+ "primaryKey": false,
1130
+ "notNull": true,
1131
+ "autoincrement": false
1132
+ },
1133
+ "action": {
1134
+ "name": "action",
1135
+ "type": "text",
1136
+ "primaryKey": false,
1137
+ "notNull": true,
1138
+ "autoincrement": false
1139
+ },
1140
+ "payload_json": {
1141
+ "name": "payload_json",
1142
+ "type": "text",
1143
+ "primaryKey": false,
1144
+ "notNull": true,
1145
+ "autoincrement": false
1146
+ },
1147
+ "status": {
1148
+ "name": "status",
1149
+ "type": "text",
1150
+ "primaryKey": false,
1151
+ "notNull": true,
1152
+ "autoincrement": false
1153
+ },
1154
+ "attempt_count": {
1155
+ "name": "attempt_count",
1156
+ "type": "integer",
1157
+ "primaryKey": false,
1158
+ "notNull": true,
1159
+ "autoincrement": false,
1160
+ "default": 0
1161
+ },
1162
+ "last_error": {
1163
+ "name": "last_error",
1164
+ "type": "text",
1165
+ "primaryKey": false,
1166
+ "notNull": false,
1167
+ "autoincrement": false
1168
+ },
1169
+ "next_retry_at": {
1170
+ "name": "next_retry_at",
1171
+ "type": "integer",
1172
+ "primaryKey": false,
1173
+ "notNull": false,
1174
+ "autoincrement": false
1175
+ },
1176
+ "created_at": {
1177
+ "name": "created_at",
1178
+ "type": "integer",
1179
+ "primaryKey": false,
1180
+ "notNull": true,
1181
+ "autoincrement": false
1182
+ },
1183
+ "updated_at": {
1184
+ "name": "updated_at",
1185
+ "type": "integer",
1186
+ "primaryKey": false,
1187
+ "notNull": true,
1188
+ "autoincrement": false
1189
+ },
1190
+ "resolved_at": {
1191
+ "name": "resolved_at",
1192
+ "type": "integer",
1193
+ "primaryKey": false,
1194
+ "notNull": false,
1195
+ "autoincrement": false
1196
+ }
1197
+ },
1198
+ "indexes": {
1199
+ "projection_settlement_event_idx": {
1200
+ "name": "projection_settlement_event_idx",
1201
+ "columns": [
1202
+ "projector",
1203
+ "root_session_id",
1204
+ "event_sequence"
1205
+ ],
1206
+ "isUnique": true
1207
+ },
1208
+ "projection_settlement_status_retry_idx": {
1209
+ "name": "projection_settlement_status_retry_idx",
1210
+ "columns": [
1211
+ "status",
1212
+ "next_retry_at"
1213
+ ],
1214
+ "isUnique": false
1215
+ }
1216
+ },
1217
+ "foreignKeys": {},
1218
+ "compositePrimaryKeys": {},
1219
+ "uniqueConstraints": {},
1220
+ "checkConstraints": {}
1221
+ },
1222
+ "project": {
1223
+ "name": "project",
1224
+ "columns": {
1225
+ "id": {
1226
+ "name": "id",
1227
+ "type": "text",
1228
+ "primaryKey": true,
1229
+ "notNull": true,
1230
+ "autoincrement": false
1231
+ },
1232
+ "name": {
1233
+ "name": "name",
1234
+ "type": "text",
1235
+ "primaryKey": false,
1236
+ "notNull": true,
1237
+ "autoincrement": false
1238
+ },
1239
+ "pinned_at": {
1240
+ "name": "pinned_at",
1241
+ "type": "integer",
1242
+ "primaryKey": false,
1243
+ "notNull": false,
1244
+ "autoincrement": false
1245
+ },
1246
+ "default_shell": {
1247
+ "name": "default_shell",
1248
+ "type": "text",
1249
+ "primaryKey": false,
1250
+ "notNull": false,
1251
+ "autoincrement": false
1252
+ },
1253
+ "last_opened_at": {
1254
+ "name": "last_opened_at",
1255
+ "type": "integer",
1256
+ "primaryKey": false,
1257
+ "notNull": true,
1258
+ "autoincrement": false
1259
+ },
1260
+ "archived_at": {
1261
+ "name": "archived_at",
1262
+ "type": "integer",
1263
+ "primaryKey": false,
1264
+ "notNull": false,
1265
+ "autoincrement": false
1266
+ },
1267
+ "created_at": {
1268
+ "name": "created_at",
1269
+ "type": "integer",
1270
+ "primaryKey": false,
1271
+ "notNull": true,
1272
+ "autoincrement": false
1273
+ },
1274
+ "updated_at": {
1275
+ "name": "updated_at",
1276
+ "type": "integer",
1277
+ "primaryKey": false,
1278
+ "notNull": true,
1279
+ "autoincrement": false
1280
+ }
1281
+ },
1282
+ "indexes": {},
1283
+ "foreignKeys": {},
1284
+ "compositePrimaryKeys": {},
1285
+ "uniqueConstraints": {},
1286
+ "checkConstraints": {}
1287
+ },
1288
+ "retention_audit": {
1289
+ "name": "retention_audit",
1290
+ "columns": {
1291
+ "id": {
1292
+ "name": "id",
1293
+ "type": "text",
1294
+ "primaryKey": true,
1295
+ "notNull": true,
1296
+ "autoincrement": false
1297
+ },
1298
+ "policy": {
1299
+ "name": "policy",
1300
+ "type": "text",
1301
+ "primaryKey": false,
1302
+ "notNull": true,
1303
+ "autoincrement": false
1304
+ },
1305
+ "result_json": {
1306
+ "name": "result_json",
1307
+ "type": "text",
1308
+ "primaryKey": false,
1309
+ "notNull": true,
1310
+ "autoincrement": false
1311
+ },
1312
+ "created_at": {
1313
+ "name": "created_at",
1314
+ "type": "integer",
1315
+ "primaryKey": false,
1316
+ "notNull": true,
1317
+ "autoincrement": false
1318
+ }
1319
+ },
1320
+ "indexes": {},
1321
+ "foreignKeys": {},
1322
+ "compositePrimaryKeys": {},
1323
+ "uniqueConstraints": {},
1324
+ "checkConstraints": {}
1325
+ },
1326
+ "scheduled_run": {
1327
+ "name": "scheduled_run",
1328
+ "columns": {
1329
+ "id": {
1330
+ "name": "id",
1331
+ "type": "text",
1332
+ "primaryKey": true,
1333
+ "notNull": true,
1334
+ "autoincrement": false
1335
+ },
1336
+ "task_id": {
1337
+ "name": "task_id",
1338
+ "type": "text",
1339
+ "primaryKey": false,
1340
+ "notNull": true,
1341
+ "autoincrement": false
1342
+ },
1343
+ "cause": {
1344
+ "name": "cause",
1345
+ "type": "text",
1346
+ "primaryKey": false,
1347
+ "notNull": true,
1348
+ "autoincrement": false
1349
+ },
1350
+ "status": {
1351
+ "name": "status",
1352
+ "type": "text",
1353
+ "primaryKey": false,
1354
+ "notNull": true,
1355
+ "autoincrement": false
1356
+ },
1357
+ "scheduled_for": {
1358
+ "name": "scheduled_for",
1359
+ "type": "integer",
1360
+ "primaryKey": false,
1361
+ "notNull": true,
1362
+ "autoincrement": false
1363
+ },
1364
+ "session_id": {
1365
+ "name": "session_id",
1366
+ "type": "text",
1367
+ "primaryKey": false,
1368
+ "notNull": false,
1369
+ "autoincrement": false
1370
+ },
1371
+ "run_id": {
1372
+ "name": "run_id",
1373
+ "type": "text",
1374
+ "primaryKey": false,
1375
+ "notNull": false,
1376
+ "autoincrement": false
1377
+ },
1378
+ "summary": {
1379
+ "name": "summary",
1380
+ "type": "text",
1381
+ "primaryKey": false,
1382
+ "notNull": false,
1383
+ "autoincrement": false
1384
+ },
1385
+ "error": {
1386
+ "name": "error",
1387
+ "type": "text",
1388
+ "primaryKey": false,
1389
+ "notNull": false,
1390
+ "autoincrement": false
1391
+ },
1392
+ "unread": {
1393
+ "name": "unread",
1394
+ "type": "integer",
1395
+ "primaryKey": false,
1396
+ "notNull": true,
1397
+ "autoincrement": false
1398
+ },
1399
+ "attention_reason": {
1400
+ "name": "attention_reason",
1401
+ "type": "text",
1402
+ "primaryKey": false,
1403
+ "notNull": false,
1404
+ "autoincrement": false
1405
+ },
1406
+ "created_at": {
1407
+ "name": "created_at",
1408
+ "type": "integer",
1409
+ "primaryKey": false,
1410
+ "notNull": true,
1411
+ "autoincrement": false
1412
+ },
1413
+ "started_at": {
1414
+ "name": "started_at",
1415
+ "type": "integer",
1416
+ "primaryKey": false,
1417
+ "notNull": false,
1418
+ "autoincrement": false
1419
+ },
1420
+ "finished_at": {
1421
+ "name": "finished_at",
1422
+ "type": "integer",
1423
+ "primaryKey": false,
1424
+ "notNull": false,
1425
+ "autoincrement": false
1426
+ },
1427
+ "updated_at": {
1428
+ "name": "updated_at",
1429
+ "type": "integer",
1430
+ "primaryKey": false,
1431
+ "notNull": true,
1432
+ "autoincrement": false
1433
+ }
1434
+ },
1435
+ "indexes": {
1436
+ "scheduled_run_task_created_idx": {
1437
+ "name": "scheduled_run_task_created_idx",
1438
+ "columns": [
1439
+ "task_id",
1440
+ "created_at"
1441
+ ],
1442
+ "isUnique": false
1443
+ },
1444
+ "scheduled_run_status_idx": {
1445
+ "name": "scheduled_run_status_idx",
1446
+ "columns": [
1447
+ "status"
1448
+ ],
1449
+ "isUnique": false
1450
+ },
1451
+ "scheduled_run_unread_idx": {
1452
+ "name": "scheduled_run_unread_idx",
1453
+ "columns": [
1454
+ "unread",
1455
+ "created_at"
1456
+ ],
1457
+ "isUnique": false
1458
+ }
1459
+ },
1460
+ "foreignKeys": {},
1461
+ "compositePrimaryKeys": {},
1462
+ "uniqueConstraints": {},
1463
+ "checkConstraints": {}
1464
+ },
1465
+ "scheduled_task": {
1466
+ "name": "scheduled_task",
1467
+ "columns": {
1468
+ "id": {
1469
+ "name": "id",
1470
+ "type": "text",
1471
+ "primaryKey": true,
1472
+ "notNull": true,
1473
+ "autoincrement": false
1474
+ },
1475
+ "name": {
1476
+ "name": "name",
1477
+ "type": "text",
1478
+ "primaryKey": false,
1479
+ "notNull": true,
1480
+ "autoincrement": false
1481
+ },
1482
+ "description": {
1483
+ "name": "description",
1484
+ "type": "text",
1485
+ "primaryKey": false,
1486
+ "notNull": false,
1487
+ "autoincrement": false
1488
+ },
1489
+ "prompt": {
1490
+ "name": "prompt",
1491
+ "type": "text",
1492
+ "primaryKey": false,
1493
+ "notNull": true,
1494
+ "autoincrement": false
1495
+ },
1496
+ "recurrence": {
1497
+ "name": "recurrence",
1498
+ "type": "text",
1499
+ "primaryKey": false,
1500
+ "notNull": true,
1501
+ "autoincrement": false
1502
+ },
1503
+ "recurrence_format": {
1504
+ "name": "recurrence_format",
1505
+ "type": "text",
1506
+ "primaryKey": false,
1507
+ "notNull": true,
1508
+ "autoincrement": false
1509
+ },
1510
+ "timezone": {
1511
+ "name": "timezone",
1512
+ "type": "text",
1513
+ "primaryKey": false,
1514
+ "notNull": true,
1515
+ "autoincrement": false
1516
+ },
1517
+ "status": {
1518
+ "name": "status",
1519
+ "type": "text",
1520
+ "primaryKey": false,
1521
+ "notNull": true,
1522
+ "autoincrement": false
1523
+ },
1524
+ "destination": {
1525
+ "name": "destination",
1526
+ "type": "text",
1527
+ "primaryKey": false,
1528
+ "notNull": true,
1529
+ "autoincrement": false
1530
+ },
1531
+ "session_id": {
1532
+ "name": "session_id",
1533
+ "type": "text",
1534
+ "primaryKey": false,
1535
+ "notNull": false,
1536
+ "autoincrement": false
1537
+ },
1538
+ "project_paths_json": {
1539
+ "name": "project_paths_json",
1540
+ "type": "text",
1541
+ "primaryKey": false,
1542
+ "notNull": true,
1543
+ "autoincrement": false
1544
+ },
1545
+ "execution_mode": {
1546
+ "name": "execution_mode",
1547
+ "type": "text",
1548
+ "primaryKey": false,
1549
+ "notNull": true,
1550
+ "autoincrement": false
1551
+ },
1552
+ "model": {
1553
+ "name": "model",
1554
+ "type": "text",
1555
+ "primaryKey": false,
1556
+ "notNull": false,
1557
+ "autoincrement": false
1558
+ },
1559
+ "effort": {
1560
+ "name": "effort",
1561
+ "type": "text",
1562
+ "primaryKey": false,
1563
+ "notNull": false,
1564
+ "autoincrement": false
1565
+ },
1566
+ "skill_names_json": {
1567
+ "name": "skill_names_json",
1568
+ "type": "text",
1569
+ "primaryKey": false,
1570
+ "notNull": true,
1571
+ "autoincrement": false
1572
+ },
1573
+ "plugin_names_json": {
1574
+ "name": "plugin_names_json",
1575
+ "type": "text",
1576
+ "primaryKey": false,
1577
+ "notNull": true,
1578
+ "autoincrement": false
1579
+ },
1580
+ "permission_profile_json": {
1581
+ "name": "permission_profile_json",
1582
+ "type": "text",
1583
+ "primaryKey": false,
1584
+ "notNull": true,
1585
+ "autoincrement": false
1586
+ },
1587
+ "overlap_policy": {
1588
+ "name": "overlap_policy",
1589
+ "type": "text",
1590
+ "primaryKey": false,
1591
+ "notNull": true,
1592
+ "autoincrement": false
1593
+ },
1594
+ "missed_run_policy": {
1595
+ "name": "missed_run_policy",
1596
+ "type": "text",
1597
+ "primaryKey": false,
1598
+ "notNull": true,
1599
+ "autoincrement": false
1600
+ },
1601
+ "stop_policy_json": {
1602
+ "name": "stop_policy_json",
1603
+ "type": "text",
1604
+ "primaryKey": false,
1605
+ "notNull": false,
1606
+ "autoincrement": false
1607
+ },
1608
+ "created_by": {
1609
+ "name": "created_by",
1610
+ "type": "text",
1611
+ "primaryKey": false,
1612
+ "notNull": true,
1613
+ "autoincrement": false
1614
+ },
1615
+ "created_from_session_id": {
1616
+ "name": "created_from_session_id",
1617
+ "type": "text",
1618
+ "primaryKey": false,
1619
+ "notNull": false,
1620
+ "autoincrement": false
1621
+ },
1622
+ "last_run_at": {
1623
+ "name": "last_run_at",
1624
+ "type": "integer",
1625
+ "primaryKey": false,
1626
+ "notNull": false,
1627
+ "autoincrement": false
1628
+ },
1629
+ "next_run_at": {
1630
+ "name": "next_run_at",
1631
+ "type": "integer",
1632
+ "primaryKey": false,
1633
+ "notNull": false,
1634
+ "autoincrement": false
1635
+ },
1636
+ "run_count": {
1637
+ "name": "run_count",
1638
+ "type": "integer",
1639
+ "primaryKey": false,
1640
+ "notNull": true,
1641
+ "autoincrement": false
1642
+ },
1643
+ "created_at": {
1644
+ "name": "created_at",
1645
+ "type": "integer",
1646
+ "primaryKey": false,
1647
+ "notNull": true,
1648
+ "autoincrement": false
1649
+ },
1650
+ "updated_at": {
1651
+ "name": "updated_at",
1652
+ "type": "integer",
1653
+ "primaryKey": false,
1654
+ "notNull": true,
1655
+ "autoincrement": false
1656
+ }
1657
+ },
1658
+ "indexes": {
1659
+ "scheduled_task_status_next_idx": {
1660
+ "name": "scheduled_task_status_next_idx",
1661
+ "columns": [
1662
+ "status",
1663
+ "next_run_at"
1664
+ ],
1665
+ "isUnique": false
1666
+ },
1667
+ "scheduled_task_session_idx": {
1668
+ "name": "scheduled_task_session_idx",
1669
+ "columns": [
1670
+ "session_id"
1671
+ ],
1672
+ "isUnique": false
1673
+ }
1674
+ },
1675
+ "foreignKeys": {},
1676
+ "compositePrimaryKeys": {},
1677
+ "uniqueConstraints": {},
1678
+ "checkConstraints": {}
1679
+ },
1680
+ "session_event_sequence": {
1681
+ "name": "session_event_sequence",
1682
+ "columns": {
1683
+ "id": {
1684
+ "name": "id",
1685
+ "type": "integer",
1686
+ "primaryKey": true,
1687
+ "notNull": false,
1688
+ "autoincrement": false
1689
+ },
1690
+ "reserved_through": {
1691
+ "name": "reserved_through",
1692
+ "type": "integer",
1693
+ "primaryKey": false,
1694
+ "notNull": true,
1695
+ "autoincrement": false
1696
+ }
1697
+ },
1698
+ "indexes": {},
1699
+ "foreignKeys": {},
1700
+ "compositePrimaryKeys": {},
1701
+ "uniqueConstraints": {},
1702
+ "checkConstraints": {
1703
+ "session_event_sequence_singleton": {
1704
+ "name": "session_event_sequence_singleton",
1705
+ "value": "\"session_event_sequence\".\"id\" = 1"
1706
+ }
1707
+ }
1708
+ },
1709
+ "session_event": {
1710
+ "name": "session_event",
1711
+ "columns": {
1712
+ "id": {
1713
+ "name": "id",
1714
+ "type": "text",
1715
+ "primaryKey": true,
1716
+ "notNull": false,
1717
+ "autoincrement": false
1718
+ },
1719
+ "seq": {
1720
+ "name": "seq",
1721
+ "type": "integer",
1722
+ "primaryKey": false,
1723
+ "notNull": true,
1724
+ "autoincrement": false
1725
+ },
1726
+ "type": {
1727
+ "name": "type",
1728
+ "type": "text",
1729
+ "primaryKey": false,
1730
+ "notNull": true,
1731
+ "autoincrement": false
1732
+ },
1733
+ "schema_version": {
1734
+ "name": "schema_version",
1735
+ "type": "integer",
1736
+ "primaryKey": false,
1737
+ "notNull": true,
1738
+ "autoincrement": false,
1739
+ "default": 1
1740
+ },
1741
+ "session_id": {
1742
+ "name": "session_id",
1743
+ "type": "text",
1744
+ "primaryKey": false,
1745
+ "notNull": false,
1746
+ "autoincrement": false
1747
+ },
1748
+ "payload_json": {
1749
+ "name": "payload_json",
1750
+ "type": "text",
1751
+ "primaryKey": false,
1752
+ "notNull": true,
1753
+ "autoincrement": false
1754
+ },
1755
+ "created_at": {
1756
+ "name": "created_at",
1757
+ "type": "integer",
1758
+ "primaryKey": false,
1759
+ "notNull": true,
1760
+ "autoincrement": false
1761
+ }
1762
+ },
1763
+ "indexes": {
1764
+ "session_event_seq_unique": {
1765
+ "name": "session_event_seq_unique",
1766
+ "columns": [
1767
+ "seq"
1768
+ ],
1769
+ "isUnique": true
1770
+ },
1771
+ "session_event_session_seq_idx": {
1772
+ "name": "session_event_session_seq_idx",
1773
+ "columns": [
1774
+ "session_id",
1775
+ "seq"
1776
+ ],
1777
+ "isUnique": false
1778
+ }
1779
+ },
1780
+ "foreignKeys": {},
1781
+ "compositePrimaryKeys": {},
1782
+ "uniqueConstraints": {},
1783
+ "checkConstraints": {}
1784
+ },
1785
+ "session_goal_continuation": {
1786
+ "name": "session_goal_continuation",
1787
+ "columns": {
1788
+ "id": {
1789
+ "name": "id",
1790
+ "type": "text",
1791
+ "primaryKey": true,
1792
+ "notNull": true,
1793
+ "autoincrement": false
1794
+ },
1795
+ "goal_id": {
1796
+ "name": "goal_id",
1797
+ "type": "text",
1798
+ "primaryKey": false,
1799
+ "notNull": true,
1800
+ "autoincrement": false
1801
+ },
1802
+ "revision": {
1803
+ "name": "revision",
1804
+ "type": "integer",
1805
+ "primaryKey": false,
1806
+ "notNull": true,
1807
+ "autoincrement": false
1808
+ },
1809
+ "previous_run_id": {
1810
+ "name": "previous_run_id",
1811
+ "type": "text",
1812
+ "primaryKey": false,
1813
+ "notNull": true,
1814
+ "autoincrement": false
1815
+ },
1816
+ "input_id": {
1817
+ "name": "input_id",
1818
+ "type": "text",
1819
+ "primaryKey": false,
1820
+ "notNull": false,
1821
+ "autoincrement": false
1822
+ },
1823
+ "run_id": {
1824
+ "name": "run_id",
1825
+ "type": "text",
1826
+ "primaryKey": false,
1827
+ "notNull": false,
1828
+ "autoincrement": false
1829
+ },
1830
+ "status": {
1831
+ "name": "status",
1832
+ "type": "text",
1833
+ "primaryKey": false,
1834
+ "notNull": true,
1835
+ "autoincrement": false
1836
+ },
1837
+ "created_at": {
1838
+ "name": "created_at",
1839
+ "type": "integer",
1840
+ "primaryKey": false,
1841
+ "notNull": true,
1842
+ "autoincrement": false
1843
+ },
1844
+ "updated_at": {
1845
+ "name": "updated_at",
1846
+ "type": "integer",
1847
+ "primaryKey": false,
1848
+ "notNull": true,
1849
+ "autoincrement": false
1850
+ }
1851
+ },
1852
+ "indexes": {
1853
+ "session_goal_continuation_previous_unique": {
1854
+ "name": "session_goal_continuation_previous_unique",
1855
+ "columns": [
1856
+ "goal_id",
1857
+ "revision",
1858
+ "previous_run_id"
1859
+ ],
1860
+ "isUnique": true
1861
+ }
1862
+ },
1863
+ "foreignKeys": {
1864
+ "session_goal_continuation_goal_id_session_goal_id_fk": {
1865
+ "name": "session_goal_continuation_goal_id_session_goal_id_fk",
1866
+ "tableFrom": "session_goal_continuation",
1867
+ "tableTo": "session_goal",
1868
+ "columnsFrom": [
1869
+ "goal_id"
1870
+ ],
1871
+ "columnsTo": [
1872
+ "id"
1873
+ ],
1874
+ "onDelete": "cascade",
1875
+ "onUpdate": "no action"
1876
+ }
1877
+ },
1878
+ "compositePrimaryKeys": {},
1879
+ "uniqueConstraints": {},
1880
+ "checkConstraints": {}
1881
+ },
1882
+ "session_goal_request": {
1883
+ "name": "session_goal_request",
1884
+ "columns": {
1885
+ "request_id": {
1886
+ "name": "request_id",
1887
+ "type": "text",
1888
+ "primaryKey": true,
1889
+ "notNull": true,
1890
+ "autoincrement": false
1891
+ },
1892
+ "session_id": {
1893
+ "name": "session_id",
1894
+ "type": "text",
1895
+ "primaryKey": false,
1896
+ "notNull": true,
1897
+ "autoincrement": false
1898
+ },
1899
+ "fingerprint": {
1900
+ "name": "fingerprint",
1901
+ "type": "text",
1902
+ "primaryKey": false,
1903
+ "notNull": true,
1904
+ "autoincrement": false
1905
+ },
1906
+ "status": {
1907
+ "name": "status",
1908
+ "type": "text",
1909
+ "primaryKey": false,
1910
+ "notNull": true,
1911
+ "autoincrement": false
1912
+ },
1913
+ "goal_id": {
1914
+ "name": "goal_id",
1915
+ "type": "text",
1916
+ "primaryKey": false,
1917
+ "notNull": false,
1918
+ "autoincrement": false
1919
+ },
1920
+ "result_json": {
1921
+ "name": "result_json",
1922
+ "type": "text",
1923
+ "primaryKey": false,
1924
+ "notNull": false,
1925
+ "autoincrement": false
1926
+ },
1927
+ "error": {
1928
+ "name": "error",
1929
+ "type": "text",
1930
+ "primaryKey": false,
1931
+ "notNull": false,
1932
+ "autoincrement": false
1933
+ },
1934
+ "created_at": {
1935
+ "name": "created_at",
1936
+ "type": "integer",
1937
+ "primaryKey": false,
1938
+ "notNull": true,
1939
+ "autoincrement": false
1940
+ },
1941
+ "updated_at": {
1942
+ "name": "updated_at",
1943
+ "type": "integer",
1944
+ "primaryKey": false,
1945
+ "notNull": true,
1946
+ "autoincrement": false
1947
+ }
1948
+ },
1949
+ "indexes": {
1950
+ "session_goal_request_session_idx": {
1951
+ "name": "session_goal_request_session_idx",
1952
+ "columns": [
1953
+ "session_id",
1954
+ "updated_at"
1955
+ ],
1956
+ "isUnique": false
1957
+ }
1958
+ },
1959
+ "foreignKeys": {
1960
+ "session_goal_request_session_id_session_id_fk": {
1961
+ "name": "session_goal_request_session_id_session_id_fk",
1962
+ "tableFrom": "session_goal_request",
1963
+ "tableTo": "session",
1964
+ "columnsFrom": [
1965
+ "session_id"
1966
+ ],
1967
+ "columnsTo": [
1968
+ "id"
1969
+ ],
1970
+ "onDelete": "cascade",
1971
+ "onUpdate": "no action"
1972
+ }
1973
+ },
1974
+ "compositePrimaryKeys": {},
1975
+ "uniqueConstraints": {},
1976
+ "checkConstraints": {}
1977
+ },
1978
+ "session_goal": {
1979
+ "name": "session_goal",
1980
+ "columns": {
1981
+ "id": {
1982
+ "name": "id",
1983
+ "type": "text",
1984
+ "primaryKey": true,
1985
+ "notNull": true,
1986
+ "autoincrement": false
1987
+ },
1988
+ "session_id": {
1989
+ "name": "session_id",
1990
+ "type": "text",
1991
+ "primaryKey": false,
1992
+ "notNull": true,
1993
+ "autoincrement": false
1994
+ },
1995
+ "objective": {
1996
+ "name": "objective",
1997
+ "type": "text",
1998
+ "primaryKey": false,
1999
+ "notNull": true,
2000
+ "autoincrement": false
2001
+ },
2002
+ "plugin_id": {
2003
+ "name": "plugin_id",
2004
+ "type": "text",
2005
+ "primaryKey": false,
2006
+ "notNull": false,
2007
+ "autoincrement": false
2008
+ },
2009
+ "revision": {
2010
+ "name": "revision",
2011
+ "type": "integer",
2012
+ "primaryKey": false,
2013
+ "notNull": true,
2014
+ "autoincrement": false
2015
+ },
2016
+ "status": {
2017
+ "name": "status",
2018
+ "type": "text",
2019
+ "primaryKey": false,
2020
+ "notNull": true,
2021
+ "autoincrement": false
2022
+ },
2023
+ "max_auto_turns": {
2024
+ "name": "max_auto_turns",
2025
+ "type": "integer",
2026
+ "primaryKey": false,
2027
+ "notNull": true,
2028
+ "autoincrement": false
2029
+ },
2030
+ "auto_turns_used": {
2031
+ "name": "auto_turns_used",
2032
+ "type": "integer",
2033
+ "primaryKey": false,
2034
+ "notNull": true,
2035
+ "autoincrement": false
2036
+ },
2037
+ "current_run_id": {
2038
+ "name": "current_run_id",
2039
+ "type": "text",
2040
+ "primaryKey": false,
2041
+ "notNull": false,
2042
+ "autoincrement": false
2043
+ },
2044
+ "reason": {
2045
+ "name": "reason",
2046
+ "type": "text",
2047
+ "primaryKey": false,
2048
+ "notNull": false,
2049
+ "autoincrement": false
2050
+ },
2051
+ "wait_json": {
2052
+ "name": "wait_json",
2053
+ "type": "text",
2054
+ "primaryKey": false,
2055
+ "notNull": false,
2056
+ "autoincrement": false
2057
+ },
2058
+ "created_at": {
2059
+ "name": "created_at",
2060
+ "type": "integer",
2061
+ "primaryKey": false,
2062
+ "notNull": true,
2063
+ "autoincrement": false
2064
+ },
2065
+ "updated_at": {
2066
+ "name": "updated_at",
2067
+ "type": "integer",
2068
+ "primaryKey": false,
2069
+ "notNull": true,
2070
+ "autoincrement": false
2071
+ },
2072
+ "objective_version": {
2073
+ "name": "objective_version",
2074
+ "type": "integer",
2075
+ "primaryKey": false,
2076
+ "notNull": true,
2077
+ "autoincrement": false,
2078
+ "default": 1
2079
+ },
2080
+ "stop_reason_json": {
2081
+ "name": "stop_reason_json",
2082
+ "type": "text",
2083
+ "primaryKey": false,
2084
+ "notNull": false,
2085
+ "autoincrement": false
2086
+ },
2087
+ "token_budget": {
2088
+ "name": "token_budget",
2089
+ "type": "integer",
2090
+ "primaryKey": false,
2091
+ "notNull": false,
2092
+ "autoincrement": false
2093
+ },
2094
+ "usage_json": {
2095
+ "name": "usage_json",
2096
+ "type": "text",
2097
+ "primaryKey": false,
2098
+ "notNull": true,
2099
+ "autoincrement": false
2100
+ }
2101
+ },
2102
+ "indexes": {
2103
+ "session_goal_session_updated_idx": {
2104
+ "name": "session_goal_session_updated_idx",
2105
+ "columns": [
2106
+ "session_id",
2107
+ "updated_at"
2108
+ ],
2109
+ "isUnique": false
2110
+ },
2111
+ "session_goal_session_open_unique": {
2112
+ "name": "session_goal_session_open_unique",
2113
+ "columns": [
2114
+ "session_id"
2115
+ ],
2116
+ "isUnique": true,
2117
+ "where": "\"session_goal\".\"status\" IN ('active','waiting_user','blocked','paused')"
2118
+ }
2119
+ },
2120
+ "foreignKeys": {
2121
+ "session_goal_session_id_session_id_fk": {
2122
+ "name": "session_goal_session_id_session_id_fk",
2123
+ "tableFrom": "session_goal",
2124
+ "tableTo": "session",
2125
+ "columnsFrom": [
2126
+ "session_id"
2127
+ ],
2128
+ "columnsTo": [
2129
+ "id"
2130
+ ],
2131
+ "onDelete": "cascade",
2132
+ "onUpdate": "no action"
2133
+ }
2134
+ },
2135
+ "compositePrimaryKeys": {},
2136
+ "uniqueConstraints": {},
2137
+ "checkConstraints": {}
2138
+ },
2139
+ "session_input_attachment": {
2140
+ "name": "session_input_attachment",
2141
+ "columns": {
2142
+ "id": {
2143
+ "name": "id",
2144
+ "type": "text",
2145
+ "primaryKey": true,
2146
+ "notNull": true,
2147
+ "autoincrement": false
2148
+ },
2149
+ "session_id": {
2150
+ "name": "session_id",
2151
+ "type": "text",
2152
+ "primaryKey": false,
2153
+ "notNull": true,
2154
+ "autoincrement": false
2155
+ },
2156
+ "input_id": {
2157
+ "name": "input_id",
2158
+ "type": "text",
2159
+ "primaryKey": false,
2160
+ "notNull": true,
2161
+ "autoincrement": false
2162
+ },
2163
+ "asset_id": {
2164
+ "name": "asset_id",
2165
+ "type": "text",
2166
+ "primaryKey": false,
2167
+ "notNull": true,
2168
+ "autoincrement": false
2169
+ },
2170
+ "seq": {
2171
+ "name": "seq",
2172
+ "type": "integer",
2173
+ "primaryKey": false,
2174
+ "notNull": true,
2175
+ "autoincrement": false
2176
+ },
2177
+ "intent": {
2178
+ "name": "intent",
2179
+ "type": "text",
2180
+ "primaryKey": false,
2181
+ "notNull": true,
2182
+ "autoincrement": false
2183
+ },
2184
+ "display_name": {
2185
+ "name": "display_name",
2186
+ "type": "text",
2187
+ "primaryKey": false,
2188
+ "notNull": true,
2189
+ "autoincrement": false
2190
+ },
2191
+ "media_type": {
2192
+ "name": "media_type",
2193
+ "type": "text",
2194
+ "primaryKey": false,
2195
+ "notNull": true,
2196
+ "autoincrement": false
2197
+ },
2198
+ "size_bytes": {
2199
+ "name": "size_bytes",
2200
+ "type": "integer",
2201
+ "primaryKey": false,
2202
+ "notNull": true,
2203
+ "autoincrement": false
2204
+ },
2205
+ "metadata_json": {
2206
+ "name": "metadata_json",
2207
+ "type": "text",
2208
+ "primaryKey": false,
2209
+ "notNull": true,
2210
+ "autoincrement": false
2211
+ },
2212
+ "created_at": {
2213
+ "name": "created_at",
2214
+ "type": "integer",
2215
+ "primaryKey": false,
2216
+ "notNull": true,
2217
+ "autoincrement": false
2218
+ }
2219
+ },
2220
+ "indexes": {
2221
+ "session_input_attachment_input_seq_idx": {
2222
+ "name": "session_input_attachment_input_seq_idx",
2223
+ "columns": [
2224
+ "input_id",
2225
+ "seq"
2226
+ ],
2227
+ "isUnique": false
2228
+ },
2229
+ "session_input_attachment_asset_idx": {
2230
+ "name": "session_input_attachment_asset_idx",
2231
+ "columns": [
2232
+ "asset_id"
2233
+ ],
2234
+ "isUnique": false
2235
+ },
2236
+ "session_input_attachment_session_idx": {
2237
+ "name": "session_input_attachment_session_idx",
2238
+ "columns": [
2239
+ "session_id"
2240
+ ],
2241
+ "isUnique": false
2242
+ },
2243
+ "session_input_attachment_input_seq_unique": {
2244
+ "name": "session_input_attachment_input_seq_unique",
2245
+ "columns": [
2246
+ "input_id",
2247
+ "seq"
2248
+ ],
2249
+ "isUnique": true
2250
+ },
2251
+ "session_input_attachment_input_asset_unique": {
2252
+ "name": "session_input_attachment_input_asset_unique",
2253
+ "columns": [
2254
+ "input_id",
2255
+ "asset_id"
2256
+ ],
2257
+ "isUnique": true
2258
+ }
2259
+ },
2260
+ "foreignKeys": {
2261
+ "session_input_attachment_session_id_session_id_fk": {
2262
+ "name": "session_input_attachment_session_id_session_id_fk",
2263
+ "tableFrom": "session_input_attachment",
2264
+ "tableTo": "session",
2265
+ "columnsFrom": [
2266
+ "session_id"
2267
+ ],
2268
+ "columnsTo": [
2269
+ "id"
2270
+ ],
2271
+ "onDelete": "cascade",
2272
+ "onUpdate": "no action"
2273
+ },
2274
+ "session_input_attachment_input_id_session_input_id_fk": {
2275
+ "name": "session_input_attachment_input_id_session_input_id_fk",
2276
+ "tableFrom": "session_input_attachment",
2277
+ "tableTo": "session_input",
2278
+ "columnsFrom": [
2279
+ "input_id"
2280
+ ],
2281
+ "columnsTo": [
2282
+ "id"
2283
+ ],
2284
+ "onDelete": "cascade",
2285
+ "onUpdate": "no action"
2286
+ },
2287
+ "session_input_attachment_asset_id_attachment_asset_id_fk": {
2288
+ "name": "session_input_attachment_asset_id_attachment_asset_id_fk",
2289
+ "tableFrom": "session_input_attachment",
2290
+ "tableTo": "attachment_asset",
2291
+ "columnsFrom": [
2292
+ "asset_id"
2293
+ ],
2294
+ "columnsTo": [
2295
+ "id"
2296
+ ],
2297
+ "onDelete": "restrict",
2298
+ "onUpdate": "no action"
2299
+ }
2300
+ },
2301
+ "compositePrimaryKeys": {},
2302
+ "uniqueConstraints": {},
2303
+ "checkConstraints": {}
2304
+ },
2305
+ "session_input": {
2306
+ "name": "session_input",
2307
+ "columns": {
2308
+ "id": {
2309
+ "name": "id",
2310
+ "type": "text",
2311
+ "primaryKey": true,
2312
+ "notNull": false,
2313
+ "autoincrement": false
2314
+ },
2315
+ "session_id": {
2316
+ "name": "session_id",
2317
+ "type": "text",
2318
+ "primaryKey": false,
2319
+ "notNull": true,
2320
+ "autoincrement": false
2321
+ },
2322
+ "seq": {
2323
+ "name": "seq",
2324
+ "type": "integer",
2325
+ "primaryKey": false,
2326
+ "notNull": true,
2327
+ "autoincrement": false
2328
+ },
2329
+ "delivery": {
2330
+ "name": "delivery",
2331
+ "type": "text",
2332
+ "primaryKey": false,
2333
+ "notNull": true,
2334
+ "autoincrement": false
2335
+ },
2336
+ "content": {
2337
+ "name": "content",
2338
+ "type": "text",
2339
+ "primaryKey": false,
2340
+ "notNull": true,
2341
+ "autoincrement": false
2342
+ },
2343
+ "items_json": {
2344
+ "name": "items_json",
2345
+ "type": "text",
2346
+ "primaryKey": false,
2347
+ "notNull": true,
2348
+ "autoincrement": false
2349
+ },
2350
+ "metadata_json": {
2351
+ "name": "metadata_json",
2352
+ "type": "text",
2353
+ "primaryKey": false,
2354
+ "notNull": true,
2355
+ "autoincrement": false
2356
+ },
2357
+ "created_at": {
2358
+ "name": "created_at",
2359
+ "type": "integer",
2360
+ "primaryKey": false,
2361
+ "notNull": true,
2362
+ "autoincrement": false
2363
+ }
2364
+ },
2365
+ "indexes": {
2366
+ "session_input_session_idx": {
2367
+ "name": "session_input_session_idx",
2368
+ "columns": [
2369
+ "session_id"
2370
+ ],
2371
+ "isUnique": false
2372
+ },
2373
+ "session_input_session_seq": {
2374
+ "name": "session_input_session_seq",
2375
+ "columns": [
2376
+ "session_id",
2377
+ "seq"
2378
+ ],
2379
+ "isUnique": true
2380
+ }
2381
+ },
2382
+ "foreignKeys": {},
2383
+ "compositePrimaryKeys": {},
2384
+ "uniqueConstraints": {},
2385
+ "checkConstraints": {}
2386
+ },
2387
+ "session_message_part": {
2388
+ "name": "session_message_part",
2389
+ "columns": {
2390
+ "id": {
2391
+ "name": "id",
2392
+ "type": "text",
2393
+ "primaryKey": true,
2394
+ "notNull": false,
2395
+ "autoincrement": false
2396
+ },
2397
+ "session_id": {
2398
+ "name": "session_id",
2399
+ "type": "text",
2400
+ "primaryKey": false,
2401
+ "notNull": true,
2402
+ "autoincrement": false
2403
+ },
2404
+ "message_id": {
2405
+ "name": "message_id",
2406
+ "type": "text",
2407
+ "primaryKey": false,
2408
+ "notNull": true,
2409
+ "autoincrement": false
2410
+ },
2411
+ "seq": {
2412
+ "name": "seq",
2413
+ "type": "integer",
2414
+ "primaryKey": false,
2415
+ "notNull": true,
2416
+ "autoincrement": false
2417
+ },
2418
+ "type": {
2419
+ "name": "type",
2420
+ "type": "text",
2421
+ "primaryKey": false,
2422
+ "notNull": true,
2423
+ "autoincrement": false
2424
+ },
2425
+ "status": {
2426
+ "name": "status",
2427
+ "type": "text",
2428
+ "primaryKey": false,
2429
+ "notNull": true,
2430
+ "autoincrement": false
2431
+ },
2432
+ "text": {
2433
+ "name": "text",
2434
+ "type": "text",
2435
+ "primaryKey": false,
2436
+ "notNull": false,
2437
+ "autoincrement": false
2438
+ },
2439
+ "tool_use_id": {
2440
+ "name": "tool_use_id",
2441
+ "type": "text",
2442
+ "primaryKey": false,
2443
+ "notNull": false,
2444
+ "autoincrement": false
2445
+ },
2446
+ "tool_name": {
2447
+ "name": "tool_name",
2448
+ "type": "text",
2449
+ "primaryKey": false,
2450
+ "notNull": false,
2451
+ "autoincrement": false
2452
+ },
2453
+ "input_json": {
2454
+ "name": "input_json",
2455
+ "type": "text",
2456
+ "primaryKey": false,
2457
+ "notNull": false,
2458
+ "autoincrement": false
2459
+ },
2460
+ "output_json": {
2461
+ "name": "output_json",
2462
+ "type": "text",
2463
+ "primaryKey": false,
2464
+ "notNull": false,
2465
+ "autoincrement": false
2466
+ },
2467
+ "is_error": {
2468
+ "name": "is_error",
2469
+ "type": "integer",
2470
+ "primaryKey": false,
2471
+ "notNull": false,
2472
+ "autoincrement": false
2473
+ },
2474
+ "asset_id": {
2475
+ "name": "asset_id",
2476
+ "type": "text",
2477
+ "primaryKey": false,
2478
+ "notNull": false,
2479
+ "autoincrement": false
2480
+ },
2481
+ "attachment_intent": {
2482
+ "name": "attachment_intent",
2483
+ "type": "text",
2484
+ "primaryKey": false,
2485
+ "notNull": false,
2486
+ "autoincrement": false
2487
+ },
2488
+ "display_name": {
2489
+ "name": "display_name",
2490
+ "type": "text",
2491
+ "primaryKey": false,
2492
+ "notNull": false,
2493
+ "autoincrement": false
2494
+ },
2495
+ "media_type": {
2496
+ "name": "media_type",
2497
+ "type": "text",
2498
+ "primaryKey": false,
2499
+ "notNull": false,
2500
+ "autoincrement": false
2501
+ },
2502
+ "size_bytes": {
2503
+ "name": "size_bytes",
2504
+ "type": "integer",
2505
+ "primaryKey": false,
2506
+ "notNull": false,
2507
+ "autoincrement": false
2508
+ },
2509
+ "transformation_kind": {
2510
+ "name": "transformation_kind",
2511
+ "type": "text",
2512
+ "primaryKey": false,
2513
+ "notNull": false,
2514
+ "autoincrement": false
2515
+ },
2516
+ "representation_id": {
2517
+ "name": "representation_id",
2518
+ "type": "text",
2519
+ "primaryKey": false,
2520
+ "notNull": false,
2521
+ "autoincrement": false
2522
+ },
2523
+ "processor": {
2524
+ "name": "processor",
2525
+ "type": "text",
2526
+ "primaryKey": false,
2527
+ "notNull": false,
2528
+ "autoincrement": false
2529
+ },
2530
+ "transformation_error": {
2531
+ "name": "transformation_error",
2532
+ "type": "text",
2533
+ "primaryKey": false,
2534
+ "notNull": false,
2535
+ "autoincrement": false
2536
+ },
2537
+ "metadata_json": {
2538
+ "name": "metadata_json",
2539
+ "type": "text",
2540
+ "primaryKey": false,
2541
+ "notNull": true,
2542
+ "autoincrement": false
2543
+ },
2544
+ "created_at": {
2545
+ "name": "created_at",
2546
+ "type": "integer",
2547
+ "primaryKey": false,
2548
+ "notNull": true,
2549
+ "autoincrement": false
2550
+ },
2551
+ "updated_at": {
2552
+ "name": "updated_at",
2553
+ "type": "integer",
2554
+ "primaryKey": false,
2555
+ "notNull": true,
2556
+ "autoincrement": false
2557
+ }
2558
+ },
2559
+ "indexes": {
2560
+ "session_part_message_idx": {
2561
+ "name": "session_part_message_idx",
2562
+ "columns": [
2563
+ "message_id"
2564
+ ],
2565
+ "isUnique": false
2566
+ },
2567
+ "session_part_session_seq": {
2568
+ "name": "session_part_session_seq",
2569
+ "columns": [
2570
+ "session_id",
2571
+ "seq"
2572
+ ],
2573
+ "isUnique": true
2574
+ }
2575
+ },
2576
+ "foreignKeys": {},
2577
+ "compositePrimaryKeys": {},
2578
+ "uniqueConstraints": {},
2579
+ "checkConstraints": {}
2580
+ },
2581
+ "session_message": {
2582
+ "name": "session_message",
2583
+ "columns": {
2584
+ "id": {
2585
+ "name": "id",
2586
+ "type": "text",
2587
+ "primaryKey": true,
2588
+ "notNull": false,
2589
+ "autoincrement": false
2590
+ },
2591
+ "session_id": {
2592
+ "name": "session_id",
2593
+ "type": "text",
2594
+ "primaryKey": false,
2595
+ "notNull": true,
2596
+ "autoincrement": false
2597
+ },
2598
+ "seq": {
2599
+ "name": "seq",
2600
+ "type": "integer",
2601
+ "primaryKey": false,
2602
+ "notNull": true,
2603
+ "autoincrement": false
2604
+ },
2605
+ "role": {
2606
+ "name": "role",
2607
+ "type": "text",
2608
+ "primaryKey": false,
2609
+ "notNull": true,
2610
+ "autoincrement": false
2611
+ },
2612
+ "run_id": {
2613
+ "name": "run_id",
2614
+ "type": "text",
2615
+ "primaryKey": false,
2616
+ "notNull": false,
2617
+ "autoincrement": false
2618
+ },
2619
+ "input_id": {
2620
+ "name": "input_id",
2621
+ "type": "text",
2622
+ "primaryKey": false,
2623
+ "notNull": false,
2624
+ "autoincrement": false
2625
+ },
2626
+ "metadata_json": {
2627
+ "name": "metadata_json",
2628
+ "type": "text",
2629
+ "primaryKey": false,
2630
+ "notNull": true,
2631
+ "autoincrement": false
2632
+ },
2633
+ "created_at": {
2634
+ "name": "created_at",
2635
+ "type": "integer",
2636
+ "primaryKey": false,
2637
+ "notNull": true,
2638
+ "autoincrement": false
2639
+ },
2640
+ "updated_at": {
2641
+ "name": "updated_at",
2642
+ "type": "integer",
2643
+ "primaryKey": false,
2644
+ "notNull": true,
2645
+ "autoincrement": false
2646
+ }
2647
+ },
2648
+ "indexes": {
2649
+ "session_message_session_idx": {
2650
+ "name": "session_message_session_idx",
2651
+ "columns": [
2652
+ "session_id"
2653
+ ],
2654
+ "isUnique": false
2655
+ },
2656
+ "session_message_session_seq": {
2657
+ "name": "session_message_session_seq",
2658
+ "columns": [
2659
+ "session_id",
2660
+ "seq"
2661
+ ],
2662
+ "isUnique": true
2663
+ }
2664
+ },
2665
+ "foreignKeys": {},
2666
+ "compositePrimaryKeys": {},
2667
+ "uniqueConstraints": {},
2668
+ "checkConstraints": {}
2669
+ },
2670
+ "session_run_attempt": {
2671
+ "name": "session_run_attempt",
2672
+ "columns": {
2673
+ "id": {
2674
+ "name": "id",
2675
+ "type": "text",
2676
+ "primaryKey": true,
2677
+ "notNull": true,
2678
+ "autoincrement": false
2679
+ },
2680
+ "run_id": {
2681
+ "name": "run_id",
2682
+ "type": "text",
2683
+ "primaryKey": false,
2684
+ "notNull": true,
2685
+ "autoincrement": false
2686
+ },
2687
+ "sequence": {
2688
+ "name": "sequence",
2689
+ "type": "integer",
2690
+ "primaryKey": false,
2691
+ "notNull": true,
2692
+ "autoincrement": false
2693
+ },
2694
+ "status": {
2695
+ "name": "status",
2696
+ "type": "text",
2697
+ "primaryKey": false,
2698
+ "notNull": true,
2699
+ "autoincrement": false
2700
+ },
2701
+ "provider": {
2702
+ "name": "provider",
2703
+ "type": "text",
2704
+ "primaryKey": false,
2705
+ "notNull": false,
2706
+ "autoincrement": false
2707
+ },
2708
+ "model": {
2709
+ "name": "model",
2710
+ "type": "text",
2711
+ "primaryKey": false,
2712
+ "notNull": false,
2713
+ "autoincrement": false
2714
+ },
2715
+ "retry_reason": {
2716
+ "name": "retry_reason",
2717
+ "type": "text",
2718
+ "primaryKey": false,
2719
+ "notNull": false,
2720
+ "autoincrement": false
2721
+ },
2722
+ "error_kind": {
2723
+ "name": "error_kind",
2724
+ "type": "text",
2725
+ "primaryKey": false,
2726
+ "notNull": false,
2727
+ "autoincrement": false
2728
+ },
2729
+ "error": {
2730
+ "name": "error",
2731
+ "type": "text",
2732
+ "primaryKey": false,
2733
+ "notNull": false,
2734
+ "autoincrement": false
2735
+ },
2736
+ "input_tokens": {
2737
+ "name": "input_tokens",
2738
+ "type": "integer",
2739
+ "primaryKey": false,
2740
+ "notNull": false,
2741
+ "autoincrement": false
2742
+ },
2743
+ "output_tokens": {
2744
+ "name": "output_tokens",
2745
+ "type": "integer",
2746
+ "primaryKey": false,
2747
+ "notNull": false,
2748
+ "autoincrement": false
2749
+ },
2750
+ "started_at": {
2751
+ "name": "started_at",
2752
+ "type": "integer",
2753
+ "primaryKey": false,
2754
+ "notNull": false,
2755
+ "autoincrement": false
2756
+ },
2757
+ "finished_at": {
2758
+ "name": "finished_at",
2759
+ "type": "integer",
2760
+ "primaryKey": false,
2761
+ "notNull": false,
2762
+ "autoincrement": false
2763
+ },
2764
+ "created_at": {
2765
+ "name": "created_at",
2766
+ "type": "integer",
2767
+ "primaryKey": false,
2768
+ "notNull": true,
2769
+ "autoincrement": false
2770
+ },
2771
+ "updated_at": {
2772
+ "name": "updated_at",
2773
+ "type": "integer",
2774
+ "primaryKey": false,
2775
+ "notNull": true,
2776
+ "autoincrement": false
2777
+ }
2778
+ },
2779
+ "indexes": {
2780
+ "session_run_attempt_run_sequence_unique": {
2781
+ "name": "session_run_attempt_run_sequence_unique",
2782
+ "columns": [
2783
+ "run_id",
2784
+ "sequence"
2785
+ ],
2786
+ "isUnique": true
2787
+ },
2788
+ "session_run_attempt_run_idx": {
2789
+ "name": "session_run_attempt_run_idx",
2790
+ "columns": [
2791
+ "run_id"
2792
+ ],
2793
+ "isUnique": false
2794
+ },
2795
+ "session_run_attempt_status_idx": {
2796
+ "name": "session_run_attempt_status_idx",
2797
+ "columns": [
2798
+ "status"
2799
+ ],
2800
+ "isUnique": false
2801
+ }
2802
+ },
2803
+ "foreignKeys": {},
2804
+ "compositePrimaryKeys": {},
2805
+ "uniqueConstraints": {},
2806
+ "checkConstraints": {}
2807
+ },
2808
+ "session_run": {
2809
+ "name": "session_run",
2810
+ "columns": {
2811
+ "id": {
2812
+ "name": "id",
2813
+ "type": "text",
2814
+ "primaryKey": true,
2815
+ "notNull": false,
2816
+ "autoincrement": false
2817
+ },
2818
+ "session_id": {
2819
+ "name": "session_id",
2820
+ "type": "text",
2821
+ "primaryKey": false,
2822
+ "notNull": true,
2823
+ "autoincrement": false
2824
+ },
2825
+ "input_id": {
2826
+ "name": "input_id",
2827
+ "type": "text",
2828
+ "primaryKey": false,
2829
+ "notNull": false,
2830
+ "autoincrement": false
2831
+ },
2832
+ "status": {
2833
+ "name": "status",
2834
+ "type": "text",
2835
+ "primaryKey": false,
2836
+ "notNull": true,
2837
+ "autoincrement": false
2838
+ },
2839
+ "started_at": {
2840
+ "name": "started_at",
2841
+ "type": "integer",
2842
+ "primaryKey": false,
2843
+ "notNull": false,
2844
+ "autoincrement": false
2845
+ },
2846
+ "finished_at": {
2847
+ "name": "finished_at",
2848
+ "type": "integer",
2849
+ "primaryKey": false,
2850
+ "notNull": false,
2851
+ "autoincrement": false
2852
+ },
2853
+ "error": {
2854
+ "name": "error",
2855
+ "type": "text",
2856
+ "primaryKey": false,
2857
+ "notNull": false,
2858
+ "autoincrement": false
2859
+ },
2860
+ "metadata_json": {
2861
+ "name": "metadata_json",
2862
+ "type": "text",
2863
+ "primaryKey": false,
2864
+ "notNull": true,
2865
+ "autoincrement": false
2866
+ },
2867
+ "created_at": {
2868
+ "name": "created_at",
2869
+ "type": "integer",
2870
+ "primaryKey": false,
2871
+ "notNull": true,
2872
+ "autoincrement": false
2873
+ },
2874
+ "updated_at": {
2875
+ "name": "updated_at",
2876
+ "type": "integer",
2877
+ "primaryKey": false,
2878
+ "notNull": true,
2879
+ "autoincrement": false
2880
+ }
2881
+ },
2882
+ "indexes": {
2883
+ "session_run_session_idx": {
2884
+ "name": "session_run_session_idx",
2885
+ "columns": [
2886
+ "session_id",
2887
+ "created_at"
2888
+ ],
2889
+ "isUnique": false
2890
+ },
2891
+ "session_run_input_idx": {
2892
+ "name": "session_run_input_idx",
2893
+ "columns": [
2894
+ "input_id"
2895
+ ],
2896
+ "isUnique": false
2897
+ }
2898
+ },
2899
+ "foreignKeys": {},
2900
+ "compositePrimaryKeys": {},
2901
+ "uniqueConstraints": {},
2902
+ "checkConstraints": {}
2903
+ },
2904
+ "session_task": {
2905
+ "name": "session_task",
2906
+ "columns": {
2907
+ "id": {
2908
+ "name": "id",
2909
+ "type": "text",
2910
+ "primaryKey": true,
2911
+ "notNull": false,
2912
+ "autoincrement": false
2913
+ },
2914
+ "session_id": {
2915
+ "name": "session_id",
2916
+ "type": "text",
2917
+ "primaryKey": false,
2918
+ "notNull": true,
2919
+ "autoincrement": false
2920
+ },
2921
+ "request_namespace": {
2922
+ "name": "request_namespace",
2923
+ "type": "text",
2924
+ "primaryKey": false,
2925
+ "notNull": false,
2926
+ "autoincrement": false
2927
+ },
2928
+ "request_id": {
2929
+ "name": "request_id",
2930
+ "type": "text",
2931
+ "primaryKey": false,
2932
+ "notNull": false,
2933
+ "autoincrement": false
2934
+ },
2935
+ "child_session_id": {
2936
+ "name": "child_session_id",
2937
+ "type": "text",
2938
+ "primaryKey": false,
2939
+ "notNull": false,
2940
+ "autoincrement": false
2941
+ },
2942
+ "run_id": {
2943
+ "name": "run_id",
2944
+ "type": "text",
2945
+ "primaryKey": false,
2946
+ "notNull": false,
2947
+ "autoincrement": false
2948
+ },
2949
+ "type": {
2950
+ "name": "type",
2951
+ "type": "text",
2952
+ "primaryKey": false,
2953
+ "notNull": true,
2954
+ "autoincrement": false
2955
+ },
2956
+ "status": {
2957
+ "name": "status",
2958
+ "type": "text",
2959
+ "primaryKey": false,
2960
+ "notNull": true,
2961
+ "autoincrement": false
2962
+ },
2963
+ "description": {
2964
+ "name": "description",
2965
+ "type": "text",
2966
+ "primaryKey": false,
2967
+ "notNull": true,
2968
+ "autoincrement": false
2969
+ },
2970
+ "cwd": {
2971
+ "name": "cwd",
2972
+ "type": "text",
2973
+ "primaryKey": false,
2974
+ "notNull": true,
2975
+ "autoincrement": false
2976
+ },
2977
+ "output": {
2978
+ "name": "output",
2979
+ "type": "text",
2980
+ "primaryKey": false,
2981
+ "notNull": false,
2982
+ "autoincrement": false
2983
+ },
2984
+ "error": {
2985
+ "name": "error",
2986
+ "type": "text",
2987
+ "primaryKey": false,
2988
+ "notNull": false,
2989
+ "autoincrement": false
2990
+ },
2991
+ "metadata_json": {
2992
+ "name": "metadata_json",
2993
+ "type": "text",
2994
+ "primaryKey": false,
2995
+ "notNull": true,
2996
+ "autoincrement": false
2997
+ },
2998
+ "created_at": {
2999
+ "name": "created_at",
3000
+ "type": "integer",
3001
+ "primaryKey": false,
3002
+ "notNull": true,
3003
+ "autoincrement": false
3004
+ },
3005
+ "started_at": {
3006
+ "name": "started_at",
3007
+ "type": "integer",
3008
+ "primaryKey": false,
3009
+ "notNull": false,
3010
+ "autoincrement": false
3011
+ },
3012
+ "finished_at": {
3013
+ "name": "finished_at",
3014
+ "type": "integer",
3015
+ "primaryKey": false,
3016
+ "notNull": false,
3017
+ "autoincrement": false
3018
+ },
3019
+ "updated_at": {
3020
+ "name": "updated_at",
3021
+ "type": "integer",
3022
+ "primaryKey": false,
3023
+ "notNull": true,
3024
+ "autoincrement": false
3025
+ }
3026
+ },
3027
+ "indexes": {
3028
+ "session_task_session_idx": {
3029
+ "name": "session_task_session_idx",
3030
+ "columns": [
3031
+ "session_id",
3032
+ "created_at"
3033
+ ],
3034
+ "isUnique": false
3035
+ },
3036
+ "session_task_request_identity_idx": {
3037
+ "name": "session_task_request_identity_idx",
3038
+ "columns": [
3039
+ "session_id",
3040
+ "request_namespace",
3041
+ "request_id"
3042
+ ],
3043
+ "isUnique": true
3044
+ }
3045
+ },
3046
+ "foreignKeys": {},
3047
+ "compositePrimaryKeys": {},
3048
+ "uniqueConstraints": {},
3049
+ "checkConstraints": {}
3050
+ },
3051
+ "session": {
3052
+ "name": "session",
3053
+ "columns": {
3054
+ "id": {
3055
+ "name": "id",
3056
+ "type": "text",
3057
+ "primaryKey": true,
3058
+ "notNull": false,
3059
+ "autoincrement": false
3060
+ },
3061
+ "parent_id": {
3062
+ "name": "parent_id",
3063
+ "type": "text",
3064
+ "primaryKey": false,
3065
+ "notNull": false,
3066
+ "autoincrement": false
3067
+ },
3068
+ "project_id": {
3069
+ "name": "project_id",
3070
+ "type": "text",
3071
+ "primaryKey": false,
3072
+ "notNull": false,
3073
+ "autoincrement": false
3074
+ },
3075
+ "cwd": {
3076
+ "name": "cwd",
3077
+ "type": "text",
3078
+ "primaryKey": false,
3079
+ "notNull": true,
3080
+ "autoincrement": false
3081
+ },
3082
+ "cwd_relative": {
3083
+ "name": "cwd_relative",
3084
+ "type": "text",
3085
+ "primaryKey": false,
3086
+ "notNull": false,
3087
+ "autoincrement": false
3088
+ },
3089
+ "title": {
3090
+ "name": "title",
3091
+ "type": "text",
3092
+ "primaryKey": false,
3093
+ "notNull": true,
3094
+ "autoincrement": false
3095
+ },
3096
+ "model": {
3097
+ "name": "model",
3098
+ "type": "text",
3099
+ "primaryKey": false,
3100
+ "notNull": true,
3101
+ "autoincrement": false
3102
+ },
3103
+ "agent": {
3104
+ "name": "agent",
3105
+ "type": "text",
3106
+ "primaryKey": false,
3107
+ "notNull": false,
3108
+ "autoincrement": false
3109
+ },
3110
+ "status": {
3111
+ "name": "status",
3112
+ "type": "text",
3113
+ "primaryKey": false,
3114
+ "notNull": true,
3115
+ "autoincrement": false
3116
+ },
3117
+ "metadata_json": {
3118
+ "name": "metadata_json",
3119
+ "type": "text",
3120
+ "primaryKey": false,
3121
+ "notNull": true,
3122
+ "autoincrement": false
3123
+ },
3124
+ "created_at": {
3125
+ "name": "created_at",
3126
+ "type": "integer",
3127
+ "primaryKey": false,
3128
+ "notNull": true,
3129
+ "autoincrement": false
3130
+ },
3131
+ "updated_at": {
3132
+ "name": "updated_at",
3133
+ "type": "integer",
3134
+ "primaryKey": false,
3135
+ "notNull": true,
3136
+ "autoincrement": false
3137
+ },
3138
+ "archived_at": {
3139
+ "name": "archived_at",
3140
+ "type": "integer",
3141
+ "primaryKey": false,
3142
+ "notNull": false,
3143
+ "autoincrement": false
3144
+ }
3145
+ },
3146
+ "indexes": {
3147
+ "session_parent_idx": {
3148
+ "name": "session_parent_idx",
3149
+ "columns": [
3150
+ "parent_id"
3151
+ ],
3152
+ "isUnique": false
3153
+ },
3154
+ "session_cwd_updated_idx": {
3155
+ "name": "session_cwd_updated_idx",
3156
+ "columns": [
3157
+ "cwd",
3158
+ "updated_at"
3159
+ ],
3160
+ "isUnique": false
3161
+ }
3162
+ },
3163
+ "foreignKeys": {
3164
+ "session_project_id_project_id_fk": {
3165
+ "name": "session_project_id_project_id_fk",
3166
+ "tableFrom": "session",
3167
+ "tableTo": "project",
3168
+ "columnsFrom": [
3169
+ "project_id"
3170
+ ],
3171
+ "columnsTo": [
3172
+ "id"
3173
+ ],
3174
+ "onDelete": "no action",
3175
+ "onUpdate": "no action"
3176
+ }
3177
+ },
3178
+ "compositePrimaryKeys": {},
3179
+ "uniqueConstraints": {},
3180
+ "checkConstraints": {}
3181
+ },
3182
+ "workflow_event": {
3183
+ "name": "workflow_event",
3184
+ "columns": {
3185
+ "seq": {
3186
+ "name": "seq",
3187
+ "type": "integer",
3188
+ "primaryKey": true,
3189
+ "notNull": true,
3190
+ "autoincrement": true
3191
+ },
3192
+ "workflow_run_id": {
3193
+ "name": "workflow_run_id",
3194
+ "type": "text",
3195
+ "primaryKey": false,
3196
+ "notNull": true,
3197
+ "autoincrement": false
3198
+ },
3199
+ "type": {
3200
+ "name": "type",
3201
+ "type": "text",
3202
+ "primaryKey": false,
3203
+ "notNull": true,
3204
+ "autoincrement": false
3205
+ },
3206
+ "event_json": {
3207
+ "name": "event_json",
3208
+ "type": "text",
3209
+ "primaryKey": false,
3210
+ "notNull": true,
3211
+ "autoincrement": false
3212
+ },
3213
+ "created_at": {
3214
+ "name": "created_at",
3215
+ "type": "integer",
3216
+ "primaryKey": false,
3217
+ "notNull": true,
3218
+ "autoincrement": false
3219
+ }
3220
+ },
3221
+ "indexes": {
3222
+ "workflow_event_run_seq_idx": {
3223
+ "name": "workflow_event_run_seq_idx",
3224
+ "columns": [
3225
+ "workflow_run_id",
3226
+ "seq"
3227
+ ],
3228
+ "isUnique": false
3229
+ }
3230
+ },
3231
+ "foreignKeys": {
3232
+ "workflow_event_workflow_run_id_workflow_run_run_id_fk": {
3233
+ "name": "workflow_event_workflow_run_id_workflow_run_run_id_fk",
3234
+ "tableFrom": "workflow_event",
3235
+ "tableTo": "workflow_run",
3236
+ "columnsFrom": [
3237
+ "workflow_run_id"
3238
+ ],
3239
+ "columnsTo": [
3240
+ "run_id"
3241
+ ],
3242
+ "onDelete": "cascade",
3243
+ "onUpdate": "no action"
3244
+ }
3245
+ },
3246
+ "compositePrimaryKeys": {},
3247
+ "uniqueConstraints": {},
3248
+ "checkConstraints": {}
3249
+ },
3250
+ "workflow_execution_claim": {
3251
+ "name": "workflow_execution_claim",
3252
+ "columns": {
3253
+ "workflow_run_id": {
3254
+ "name": "workflow_run_id",
3255
+ "type": "text",
3256
+ "primaryKey": true,
3257
+ "notNull": true,
3258
+ "autoincrement": false
3259
+ },
3260
+ "owner_id": {
3261
+ "name": "owner_id",
3262
+ "type": "text",
3263
+ "primaryKey": false,
3264
+ "notNull": true,
3265
+ "autoincrement": false
3266
+ },
3267
+ "generation": {
3268
+ "name": "generation",
3269
+ "type": "integer",
3270
+ "primaryKey": false,
3271
+ "notNull": true,
3272
+ "autoincrement": false
3273
+ },
3274
+ "claimed_at": {
3275
+ "name": "claimed_at",
3276
+ "type": "integer",
3277
+ "primaryKey": false,
3278
+ "notNull": true,
3279
+ "autoincrement": false
3280
+ },
3281
+ "heartbeat_at": {
3282
+ "name": "heartbeat_at",
3283
+ "type": "integer",
3284
+ "primaryKey": false,
3285
+ "notNull": true,
3286
+ "autoincrement": false
3287
+ },
3288
+ "finished_at": {
3289
+ "name": "finished_at",
3290
+ "type": "integer",
3291
+ "primaryKey": false,
3292
+ "notNull": false,
3293
+ "autoincrement": false
3294
+ },
3295
+ "status": {
3296
+ "name": "status",
3297
+ "type": "text",
3298
+ "primaryKey": false,
3299
+ "notNull": true,
3300
+ "autoincrement": false
3301
+ }
3302
+ },
3303
+ "indexes": {},
3304
+ "foreignKeys": {
3305
+ "workflow_execution_claim_workflow_run_id_workflow_run_run_id_fk": {
3306
+ "name": "workflow_execution_claim_workflow_run_id_workflow_run_run_id_fk",
3307
+ "tableFrom": "workflow_execution_claim",
3308
+ "tableTo": "workflow_run",
3309
+ "columnsFrom": [
3310
+ "workflow_run_id"
3311
+ ],
3312
+ "columnsTo": [
3313
+ "run_id"
3314
+ ],
3315
+ "onDelete": "cascade",
3316
+ "onUpdate": "no action"
3317
+ }
3318
+ },
3319
+ "compositePrimaryKeys": {},
3320
+ "uniqueConstraints": {},
3321
+ "checkConstraints": {}
3322
+ },
3323
+ "workflow_run": {
3324
+ "name": "workflow_run",
3325
+ "columns": {
3326
+ "run_id": {
3327
+ "name": "run_id",
3328
+ "type": "text",
3329
+ "primaryKey": true,
3330
+ "notNull": true,
3331
+ "autoincrement": false
3332
+ },
3333
+ "owner_session_id": {
3334
+ "name": "owner_session_id",
3335
+ "type": "text",
3336
+ "primaryKey": false,
3337
+ "notNull": false,
3338
+ "autoincrement": false
3339
+ },
3340
+ "owner_input_id": {
3341
+ "name": "owner_input_id",
3342
+ "type": "text",
3343
+ "primaryKey": false,
3344
+ "notNull": false,
3345
+ "autoincrement": false
3346
+ },
3347
+ "owner_run_id": {
3348
+ "name": "owner_run_id",
3349
+ "type": "text",
3350
+ "primaryKey": false,
3351
+ "notNull": false,
3352
+ "autoincrement": false
3353
+ },
3354
+ "status": {
3355
+ "name": "status",
3356
+ "type": "text",
3357
+ "primaryKey": false,
3358
+ "notNull": true,
3359
+ "autoincrement": false
3360
+ },
3361
+ "termination": {
3362
+ "name": "termination",
3363
+ "type": "text",
3364
+ "primaryKey": false,
3365
+ "notNull": false,
3366
+ "autoincrement": false
3367
+ },
3368
+ "snapshot_json": {
3369
+ "name": "snapshot_json",
3370
+ "type": "text",
3371
+ "primaryKey": false,
3372
+ "notNull": true,
3373
+ "autoincrement": false
3374
+ },
3375
+ "origin_json": {
3376
+ "name": "origin_json",
3377
+ "type": "text",
3378
+ "primaryKey": false,
3379
+ "notNull": false,
3380
+ "autoincrement": false
3381
+ },
3382
+ "created_at": {
3383
+ "name": "created_at",
3384
+ "type": "integer",
3385
+ "primaryKey": false,
3386
+ "notNull": true,
3387
+ "autoincrement": false
3388
+ },
3389
+ "updated_at": {
3390
+ "name": "updated_at",
3391
+ "type": "integer",
3392
+ "primaryKey": false,
3393
+ "notNull": true,
3394
+ "autoincrement": false
3395
+ }
3396
+ },
3397
+ "indexes": {
3398
+ "workflow_run_owner_idx": {
3399
+ "name": "workflow_run_owner_idx",
3400
+ "columns": [
3401
+ "owner_session_id",
3402
+ "updated_at"
3403
+ ],
3404
+ "isUnique": false
3405
+ },
3406
+ "workflow_run_status_idx": {
3407
+ "name": "workflow_run_status_idx",
3408
+ "columns": [
3409
+ "status",
3410
+ "updated_at"
3411
+ ],
3412
+ "isUnique": false
3413
+ }
3414
+ },
3415
+ "foreignKeys": {
3416
+ "workflow_run_owner_session_id_session_id_fk": {
3417
+ "name": "workflow_run_owner_session_id_session_id_fk",
3418
+ "tableFrom": "workflow_run",
3419
+ "tableTo": "session",
3420
+ "columnsFrom": [
3421
+ "owner_session_id"
3422
+ ],
3423
+ "columnsTo": [
3424
+ "id"
3425
+ ],
3426
+ "onDelete": "set null",
3427
+ "onUpdate": "no action"
3428
+ },
3429
+ "workflow_run_owner_input_id_session_input_id_fk": {
3430
+ "name": "workflow_run_owner_input_id_session_input_id_fk",
3431
+ "tableFrom": "workflow_run",
3432
+ "tableTo": "session_input",
3433
+ "columnsFrom": [
3434
+ "owner_input_id"
3435
+ ],
3436
+ "columnsTo": [
3437
+ "id"
3438
+ ],
3439
+ "onDelete": "set null",
3440
+ "onUpdate": "no action"
3441
+ },
3442
+ "workflow_run_owner_run_id_session_run_id_fk": {
3443
+ "name": "workflow_run_owner_run_id_session_run_id_fk",
3444
+ "tableFrom": "workflow_run",
3445
+ "tableTo": "session_run",
3446
+ "columnsFrom": [
3447
+ "owner_run_id"
3448
+ ],
3449
+ "columnsTo": [
3450
+ "id"
3451
+ ],
3452
+ "onDelete": "set null",
3453
+ "onUpdate": "no action"
3454
+ }
3455
+ },
3456
+ "compositePrimaryKeys": {},
3457
+ "uniqueConstraints": {},
3458
+ "checkConstraints": {}
3459
+ },
3460
+ "workflow_task_attempt": {
3461
+ "name": "workflow_task_attempt",
3462
+ "columns": {
3463
+ "workflow_run_id": {
3464
+ "name": "workflow_run_id",
3465
+ "type": "text",
3466
+ "primaryKey": false,
3467
+ "notNull": true,
3468
+ "autoincrement": false
3469
+ },
3470
+ "task_id": {
3471
+ "name": "task_id",
3472
+ "type": "text",
3473
+ "primaryKey": false,
3474
+ "notNull": true,
3475
+ "autoincrement": false
3476
+ },
3477
+ "attempt": {
3478
+ "name": "attempt",
3479
+ "type": "integer",
3480
+ "primaryKey": false,
3481
+ "notNull": true,
3482
+ "autoincrement": false
3483
+ },
3484
+ "status": {
3485
+ "name": "status",
3486
+ "type": "text",
3487
+ "primaryKey": false,
3488
+ "notNull": true,
3489
+ "autoincrement": false
3490
+ },
3491
+ "payload_json": {
3492
+ "name": "payload_json",
3493
+ "type": "text",
3494
+ "primaryKey": false,
3495
+ "notNull": true,
3496
+ "autoincrement": false
3497
+ },
3498
+ "started_at": {
3499
+ "name": "started_at",
3500
+ "type": "integer",
3501
+ "primaryKey": false,
3502
+ "notNull": true,
3503
+ "autoincrement": false
3504
+ },
3505
+ "finished_at": {
3506
+ "name": "finished_at",
3507
+ "type": "integer",
3508
+ "primaryKey": false,
3509
+ "notNull": false,
3510
+ "autoincrement": false
3511
+ }
3512
+ },
3513
+ "indexes": {},
3514
+ "foreignKeys": {
3515
+ "workflow_task_attempt_workflow_run_id_workflow_run_run_id_fk": {
3516
+ "name": "workflow_task_attempt_workflow_run_id_workflow_run_run_id_fk",
3517
+ "tableFrom": "workflow_task_attempt",
3518
+ "tableTo": "workflow_run",
3519
+ "columnsFrom": [
3520
+ "workflow_run_id"
3521
+ ],
3522
+ "columnsTo": [
3523
+ "run_id"
3524
+ ],
3525
+ "onDelete": "cascade",
3526
+ "onUpdate": "no action"
3527
+ }
3528
+ },
3529
+ "compositePrimaryKeys": {
3530
+ "workflow_task_attempt_workflow_run_id_task_id_attempt_pk": {
3531
+ "columns": [
3532
+ "workflow_run_id",
3533
+ "task_id",
3534
+ "attempt"
3535
+ ],
3536
+ "name": "workflow_task_attempt_workflow_run_id_task_id_attempt_pk"
3537
+ }
3538
+ },
3539
+ "uniqueConstraints": {},
3540
+ "checkConstraints": {}
3541
+ },
3542
+ "session_goal_model_attempt": {
3543
+ "name": "session_goal_model_attempt",
3544
+ "columns": {
3545
+ "run_id": {
3546
+ "name": "run_id",
3547
+ "type": "text",
3548
+ "primaryKey": false,
3549
+ "notNull": true,
3550
+ "autoincrement": false
3551
+ },
3552
+ "generation_id": {
3553
+ "name": "generation_id",
3554
+ "type": "text",
3555
+ "primaryKey": false,
3556
+ "notNull": true,
3557
+ "autoincrement": false
3558
+ },
3559
+ "goal_id": {
3560
+ "name": "goal_id",
3561
+ "type": "text",
3562
+ "primaryKey": false,
3563
+ "notNull": true,
3564
+ "autoincrement": false
3565
+ },
3566
+ "session_id": {
3567
+ "name": "session_id",
3568
+ "type": "text",
3569
+ "primaryKey": false,
3570
+ "notNull": true,
3571
+ "autoincrement": false
3572
+ },
3573
+ "provider": {
3574
+ "name": "provider",
3575
+ "type": "text",
3576
+ "primaryKey": false,
3577
+ "notNull": false,
3578
+ "autoincrement": false
3579
+ },
3580
+ "model": {
3581
+ "name": "model",
3582
+ "type": "text",
3583
+ "primaryKey": false,
3584
+ "notNull": true,
3585
+ "autoincrement": false
3586
+ },
3587
+ "purpose": {
3588
+ "name": "purpose",
3589
+ "type": "text",
3590
+ "primaryKey": false,
3591
+ "notNull": true,
3592
+ "autoincrement": false
3593
+ },
3594
+ "state": {
3595
+ "name": "state",
3596
+ "type": "text",
3597
+ "primaryKey": false,
3598
+ "notNull": true,
3599
+ "autoincrement": false
3600
+ },
3601
+ "raw_usage_json": {
3602
+ "name": "raw_usage_json",
3603
+ "type": "text",
3604
+ "primaryKey": false,
3605
+ "notNull": false,
3606
+ "autoincrement": false
3607
+ },
3608
+ "attempt": {
3609
+ "name": "attempt",
3610
+ "type": "integer",
3611
+ "primaryKey": false,
3612
+ "notNull": true,
3613
+ "autoincrement": false
3614
+ },
3615
+ "objective_version": {
3616
+ "name": "objective_version",
3617
+ "type": "integer",
3618
+ "primaryKey": false,
3619
+ "notNull": true,
3620
+ "autoincrement": false
3621
+ },
3622
+ "known_input_tokens": {
3623
+ "name": "known_input_tokens",
3624
+ "type": "integer",
3625
+ "primaryKey": false,
3626
+ "notNull": true,
3627
+ "autoincrement": false
3628
+ },
3629
+ "known_output_tokens": {
3630
+ "name": "known_output_tokens",
3631
+ "type": "integer",
3632
+ "primaryKey": false,
3633
+ "notNull": true,
3634
+ "autoincrement": false
3635
+ },
3636
+ "inconsistent": {
3637
+ "name": "inconsistent",
3638
+ "type": "integer",
3639
+ "primaryKey": false,
3640
+ "notNull": true,
3641
+ "autoincrement": false
3642
+ },
3643
+ "started_at": {
3644
+ "name": "started_at",
3645
+ "type": "integer",
3646
+ "primaryKey": false,
3647
+ "notNull": true,
3648
+ "autoincrement": false
3649
+ },
3650
+ "finished_at": {
3651
+ "name": "finished_at",
3652
+ "type": "integer",
3653
+ "primaryKey": false,
3654
+ "notNull": false,
3655
+ "autoincrement": false
3656
+ }
3657
+ },
3658
+ "indexes": {
3659
+ "session_goal_model_attempt_goal_idx": {
3660
+ "name": "session_goal_model_attempt_goal_idx",
3661
+ "columns": [
3662
+ "goal_id"
3663
+ ],
3664
+ "isUnique": false
3665
+ }
3666
+ },
3667
+ "foreignKeys": {
3668
+ "session_goal_model_attempt_goal_id_session_goal_id_fk": {
3669
+ "name": "session_goal_model_attempt_goal_id_session_goal_id_fk",
3670
+ "tableFrom": "session_goal_model_attempt",
3671
+ "tableTo": "session_goal",
3672
+ "columnsFrom": [
3673
+ "goal_id"
3674
+ ],
3675
+ "columnsTo": [
3676
+ "id"
3677
+ ],
3678
+ "onDelete": "cascade",
3679
+ "onUpdate": "no action"
3680
+ }
3681
+ },
3682
+ "compositePrimaryKeys": {
3683
+ "session_goal_model_attempt_run_id_generation_id_attempt_pk": {
3684
+ "columns": [
3685
+ "run_id",
3686
+ "generation_id",
3687
+ "attempt"
3688
+ ],
3689
+ "name": "session_goal_model_attempt_run_id_generation_id_attempt_pk"
3690
+ }
3691
+ },
3692
+ "uniqueConstraints": {},
3693
+ "checkConstraints": {}
3694
+ },
3695
+ "session_goal_version": {
3696
+ "name": "session_goal_version",
3697
+ "columns": {
3698
+ "goal_id": {
3699
+ "name": "goal_id",
3700
+ "type": "text",
3701
+ "primaryKey": false,
3702
+ "notNull": true,
3703
+ "autoincrement": false
3704
+ },
3705
+ "objective_version": {
3706
+ "name": "objective_version",
3707
+ "type": "integer",
3708
+ "primaryKey": false,
3709
+ "notNull": true,
3710
+ "autoincrement": false
3711
+ },
3712
+ "previous_version": {
3713
+ "name": "previous_version",
3714
+ "type": "integer",
3715
+ "primaryKey": false,
3716
+ "notNull": false,
3717
+ "autoincrement": false
3718
+ },
3719
+ "objective": {
3720
+ "name": "objective",
3721
+ "type": "text",
3722
+ "primaryKey": false,
3723
+ "notNull": true,
3724
+ "autoincrement": false
3725
+ },
3726
+ "request_id": {
3727
+ "name": "request_id",
3728
+ "type": "text",
3729
+ "primaryKey": false,
3730
+ "notNull": true,
3731
+ "autoincrement": false
3732
+ },
3733
+ "actor_json": {
3734
+ "name": "actor_json",
3735
+ "type": "text",
3736
+ "primaryKey": false,
3737
+ "notNull": true,
3738
+ "autoincrement": false
3739
+ },
3740
+ "created_at": {
3741
+ "name": "created_at",
3742
+ "type": "integer",
3743
+ "primaryKey": false,
3744
+ "notNull": true,
3745
+ "autoincrement": false
3746
+ }
3747
+ },
3748
+ "indexes": {},
3749
+ "foreignKeys": {
3750
+ "session_goal_version_goal_id_session_goal_id_fk": {
3751
+ "name": "session_goal_version_goal_id_session_goal_id_fk",
3752
+ "tableFrom": "session_goal_version",
3753
+ "tableTo": "session_goal",
3754
+ "columnsFrom": [
3755
+ "goal_id"
3756
+ ],
3757
+ "columnsTo": [
3758
+ "id"
3759
+ ],
3760
+ "onDelete": "cascade",
3761
+ "onUpdate": "no action"
3762
+ }
3763
+ },
3764
+ "compositePrimaryKeys": {
3765
+ "session_goal_version_goal_id_objective_version_pk": {
3766
+ "columns": [
3767
+ "goal_id",
3768
+ "objective_version"
3769
+ ],
3770
+ "name": "session_goal_version_goal_id_objective_version_pk"
3771
+ }
3772
+ },
3773
+ "uniqueConstraints": {},
3774
+ "checkConstraints": {}
3775
+ }
3776
+ },
3777
+ "views": {},
3778
+ "enums": {},
3779
+ "_meta": {
3780
+ "schemas": {},
3781
+ "tables": {},
3782
+ "columns": {}
3783
+ },
3784
+ "internal": {
3785
+ "indexes": {}
3786
+ }
3787
+ }