@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,4048 @@
1
+ {
2
+ "version": "6",
3
+ "dialect": "sqlite",
4
+ "id": "892a92a8-fb29-47cc-b242-818e33047a59",
5
+ "prevId": "dd3edc40-323a-409d-ae2a-2819597ff411",
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_model_attempt": {
1883
+ "name": "session_goal_model_attempt",
1884
+ "columns": {
1885
+ "run_id": {
1886
+ "name": "run_id",
1887
+ "type": "text",
1888
+ "primaryKey": false,
1889
+ "notNull": true,
1890
+ "autoincrement": false
1891
+ },
1892
+ "generation_id": {
1893
+ "name": "generation_id",
1894
+ "type": "text",
1895
+ "primaryKey": false,
1896
+ "notNull": true,
1897
+ "autoincrement": false
1898
+ },
1899
+ "attempt": {
1900
+ "name": "attempt",
1901
+ "type": "integer",
1902
+ "primaryKey": false,
1903
+ "notNull": true,
1904
+ "autoincrement": false
1905
+ },
1906
+ "goal_id": {
1907
+ "name": "goal_id",
1908
+ "type": "text",
1909
+ "primaryKey": false,
1910
+ "notNull": true,
1911
+ "autoincrement": false
1912
+ },
1913
+ "objective_version": {
1914
+ "name": "objective_version",
1915
+ "type": "integer",
1916
+ "primaryKey": false,
1917
+ "notNull": true,
1918
+ "autoincrement": false
1919
+ },
1920
+ "session_id": {
1921
+ "name": "session_id",
1922
+ "type": "text",
1923
+ "primaryKey": false,
1924
+ "notNull": true,
1925
+ "autoincrement": false
1926
+ },
1927
+ "provider": {
1928
+ "name": "provider",
1929
+ "type": "text",
1930
+ "primaryKey": false,
1931
+ "notNull": false,
1932
+ "autoincrement": false
1933
+ },
1934
+ "model": {
1935
+ "name": "model",
1936
+ "type": "text",
1937
+ "primaryKey": false,
1938
+ "notNull": true,
1939
+ "autoincrement": false
1940
+ },
1941
+ "purpose": {
1942
+ "name": "purpose",
1943
+ "type": "text",
1944
+ "primaryKey": false,
1945
+ "notNull": true,
1946
+ "autoincrement": false
1947
+ },
1948
+ "state": {
1949
+ "name": "state",
1950
+ "type": "text",
1951
+ "primaryKey": false,
1952
+ "notNull": true,
1953
+ "autoincrement": false
1954
+ },
1955
+ "known_input_tokens": {
1956
+ "name": "known_input_tokens",
1957
+ "type": "integer",
1958
+ "primaryKey": false,
1959
+ "notNull": true,
1960
+ "autoincrement": false
1961
+ },
1962
+ "known_output_tokens": {
1963
+ "name": "known_output_tokens",
1964
+ "type": "integer",
1965
+ "primaryKey": false,
1966
+ "notNull": true,
1967
+ "autoincrement": false
1968
+ },
1969
+ "inconsistent": {
1970
+ "name": "inconsistent",
1971
+ "type": "integer",
1972
+ "primaryKey": false,
1973
+ "notNull": true,
1974
+ "autoincrement": false
1975
+ },
1976
+ "raw_usage_json": {
1977
+ "name": "raw_usage_json",
1978
+ "type": "text",
1979
+ "primaryKey": false,
1980
+ "notNull": false,
1981
+ "autoincrement": false
1982
+ },
1983
+ "started_at": {
1984
+ "name": "started_at",
1985
+ "type": "integer",
1986
+ "primaryKey": false,
1987
+ "notNull": true,
1988
+ "autoincrement": false
1989
+ },
1990
+ "finished_at": {
1991
+ "name": "finished_at",
1992
+ "type": "integer",
1993
+ "primaryKey": false,
1994
+ "notNull": false,
1995
+ "autoincrement": false
1996
+ }
1997
+ },
1998
+ "indexes": {
1999
+ "session_goal_model_attempt_goal_idx": {
2000
+ "name": "session_goal_model_attempt_goal_idx",
2001
+ "columns": [
2002
+ "goal_id"
2003
+ ],
2004
+ "isUnique": false
2005
+ }
2006
+ },
2007
+ "foreignKeys": {
2008
+ "session_goal_model_attempt_goal_id_session_goal_id_fk": {
2009
+ "name": "session_goal_model_attempt_goal_id_session_goal_id_fk",
2010
+ "tableFrom": "session_goal_model_attempt",
2011
+ "tableTo": "session_goal",
2012
+ "columnsFrom": [
2013
+ "goal_id"
2014
+ ],
2015
+ "columnsTo": [
2016
+ "id"
2017
+ ],
2018
+ "onDelete": "cascade",
2019
+ "onUpdate": "no action"
2020
+ }
2021
+ },
2022
+ "compositePrimaryKeys": {
2023
+ "session_goal_model_attempt_run_id_generation_id_attempt_pk": {
2024
+ "columns": [
2025
+ "run_id",
2026
+ "generation_id",
2027
+ "attempt"
2028
+ ],
2029
+ "name": "session_goal_model_attempt_run_id_generation_id_attempt_pk"
2030
+ }
2031
+ },
2032
+ "uniqueConstraints": {},
2033
+ "checkConstraints": {}
2034
+ },
2035
+ "session_goal_request": {
2036
+ "name": "session_goal_request",
2037
+ "columns": {
2038
+ "request_id": {
2039
+ "name": "request_id",
2040
+ "type": "text",
2041
+ "primaryKey": true,
2042
+ "notNull": true,
2043
+ "autoincrement": false
2044
+ },
2045
+ "session_id": {
2046
+ "name": "session_id",
2047
+ "type": "text",
2048
+ "primaryKey": false,
2049
+ "notNull": true,
2050
+ "autoincrement": false
2051
+ },
2052
+ "fingerprint": {
2053
+ "name": "fingerprint",
2054
+ "type": "text",
2055
+ "primaryKey": false,
2056
+ "notNull": true,
2057
+ "autoincrement": false
2058
+ },
2059
+ "status": {
2060
+ "name": "status",
2061
+ "type": "text",
2062
+ "primaryKey": false,
2063
+ "notNull": true,
2064
+ "autoincrement": false
2065
+ },
2066
+ "goal_id": {
2067
+ "name": "goal_id",
2068
+ "type": "text",
2069
+ "primaryKey": false,
2070
+ "notNull": false,
2071
+ "autoincrement": false
2072
+ },
2073
+ "result_json": {
2074
+ "name": "result_json",
2075
+ "type": "text",
2076
+ "primaryKey": false,
2077
+ "notNull": false,
2078
+ "autoincrement": false
2079
+ },
2080
+ "error": {
2081
+ "name": "error",
2082
+ "type": "text",
2083
+ "primaryKey": false,
2084
+ "notNull": false,
2085
+ "autoincrement": false
2086
+ },
2087
+ "created_at": {
2088
+ "name": "created_at",
2089
+ "type": "integer",
2090
+ "primaryKey": false,
2091
+ "notNull": true,
2092
+ "autoincrement": false
2093
+ },
2094
+ "updated_at": {
2095
+ "name": "updated_at",
2096
+ "type": "integer",
2097
+ "primaryKey": false,
2098
+ "notNull": true,
2099
+ "autoincrement": false
2100
+ }
2101
+ },
2102
+ "indexes": {
2103
+ "session_goal_request_session_idx": {
2104
+ "name": "session_goal_request_session_idx",
2105
+ "columns": [
2106
+ "session_id",
2107
+ "updated_at"
2108
+ ],
2109
+ "isUnique": false
2110
+ }
2111
+ },
2112
+ "foreignKeys": {
2113
+ "session_goal_request_session_id_session_id_fk": {
2114
+ "name": "session_goal_request_session_id_session_id_fk",
2115
+ "tableFrom": "session_goal_request",
2116
+ "tableTo": "session",
2117
+ "columnsFrom": [
2118
+ "session_id"
2119
+ ],
2120
+ "columnsTo": [
2121
+ "id"
2122
+ ],
2123
+ "onDelete": "cascade",
2124
+ "onUpdate": "no action"
2125
+ }
2126
+ },
2127
+ "compositePrimaryKeys": {},
2128
+ "uniqueConstraints": {},
2129
+ "checkConstraints": {}
2130
+ },
2131
+ "session_goal_version": {
2132
+ "name": "session_goal_version",
2133
+ "columns": {
2134
+ "goal_id": {
2135
+ "name": "goal_id",
2136
+ "type": "text",
2137
+ "primaryKey": false,
2138
+ "notNull": true,
2139
+ "autoincrement": false
2140
+ },
2141
+ "objective_version": {
2142
+ "name": "objective_version",
2143
+ "type": "integer",
2144
+ "primaryKey": false,
2145
+ "notNull": true,
2146
+ "autoincrement": false
2147
+ },
2148
+ "previous_version": {
2149
+ "name": "previous_version",
2150
+ "type": "integer",
2151
+ "primaryKey": false,
2152
+ "notNull": false,
2153
+ "autoincrement": false
2154
+ },
2155
+ "objective": {
2156
+ "name": "objective",
2157
+ "type": "text",
2158
+ "primaryKey": false,
2159
+ "notNull": true,
2160
+ "autoincrement": false
2161
+ },
2162
+ "request_id": {
2163
+ "name": "request_id",
2164
+ "type": "text",
2165
+ "primaryKey": false,
2166
+ "notNull": true,
2167
+ "autoincrement": false
2168
+ },
2169
+ "actor_json": {
2170
+ "name": "actor_json",
2171
+ "type": "text",
2172
+ "primaryKey": false,
2173
+ "notNull": true,
2174
+ "autoincrement": false
2175
+ },
2176
+ "created_at": {
2177
+ "name": "created_at",
2178
+ "type": "integer",
2179
+ "primaryKey": false,
2180
+ "notNull": true,
2181
+ "autoincrement": false
2182
+ }
2183
+ },
2184
+ "indexes": {},
2185
+ "foreignKeys": {
2186
+ "session_goal_version_goal_id_session_goal_id_fk": {
2187
+ "name": "session_goal_version_goal_id_session_goal_id_fk",
2188
+ "tableFrom": "session_goal_version",
2189
+ "tableTo": "session_goal",
2190
+ "columnsFrom": [
2191
+ "goal_id"
2192
+ ],
2193
+ "columnsTo": [
2194
+ "id"
2195
+ ],
2196
+ "onDelete": "cascade",
2197
+ "onUpdate": "no action"
2198
+ }
2199
+ },
2200
+ "compositePrimaryKeys": {
2201
+ "session_goal_version_goal_id_objective_version_pk": {
2202
+ "columns": [
2203
+ "goal_id",
2204
+ "objective_version"
2205
+ ],
2206
+ "name": "session_goal_version_goal_id_objective_version_pk"
2207
+ }
2208
+ },
2209
+ "uniqueConstraints": {},
2210
+ "checkConstraints": {}
2211
+ },
2212
+ "session_goal": {
2213
+ "name": "session_goal",
2214
+ "columns": {
2215
+ "id": {
2216
+ "name": "id",
2217
+ "type": "text",
2218
+ "primaryKey": true,
2219
+ "notNull": true,
2220
+ "autoincrement": false
2221
+ },
2222
+ "session_id": {
2223
+ "name": "session_id",
2224
+ "type": "text",
2225
+ "primaryKey": false,
2226
+ "notNull": true,
2227
+ "autoincrement": false
2228
+ },
2229
+ "objective": {
2230
+ "name": "objective",
2231
+ "type": "text",
2232
+ "primaryKey": false,
2233
+ "notNull": true,
2234
+ "autoincrement": false
2235
+ },
2236
+ "objective_version": {
2237
+ "name": "objective_version",
2238
+ "type": "integer",
2239
+ "primaryKey": false,
2240
+ "notNull": true,
2241
+ "autoincrement": false,
2242
+ "default": 1
2243
+ },
2244
+ "plugin_id": {
2245
+ "name": "plugin_id",
2246
+ "type": "text",
2247
+ "primaryKey": false,
2248
+ "notNull": false,
2249
+ "autoincrement": false
2250
+ },
2251
+ "revision": {
2252
+ "name": "revision",
2253
+ "type": "integer",
2254
+ "primaryKey": false,
2255
+ "notNull": true,
2256
+ "autoincrement": false
2257
+ },
2258
+ "status": {
2259
+ "name": "status",
2260
+ "type": "text",
2261
+ "primaryKey": false,
2262
+ "notNull": true,
2263
+ "autoincrement": false
2264
+ },
2265
+ "max_auto_turns": {
2266
+ "name": "max_auto_turns",
2267
+ "type": "integer",
2268
+ "primaryKey": false,
2269
+ "notNull": true,
2270
+ "autoincrement": false
2271
+ },
2272
+ "token_budget": {
2273
+ "name": "token_budget",
2274
+ "type": "integer",
2275
+ "primaryKey": false,
2276
+ "notNull": false,
2277
+ "autoincrement": false
2278
+ },
2279
+ "usage_json": {
2280
+ "name": "usage_json",
2281
+ "type": "text",
2282
+ "primaryKey": false,
2283
+ "notNull": true,
2284
+ "autoincrement": false
2285
+ },
2286
+ "auto_turns_used": {
2287
+ "name": "auto_turns_used",
2288
+ "type": "integer",
2289
+ "primaryKey": false,
2290
+ "notNull": true,
2291
+ "autoincrement": false
2292
+ },
2293
+ "current_run_id": {
2294
+ "name": "current_run_id",
2295
+ "type": "text",
2296
+ "primaryKey": false,
2297
+ "notNull": false,
2298
+ "autoincrement": false
2299
+ },
2300
+ "reason": {
2301
+ "name": "reason",
2302
+ "type": "text",
2303
+ "primaryKey": false,
2304
+ "notNull": false,
2305
+ "autoincrement": false
2306
+ },
2307
+ "stop_reason_json": {
2308
+ "name": "stop_reason_json",
2309
+ "type": "text",
2310
+ "primaryKey": false,
2311
+ "notNull": false,
2312
+ "autoincrement": false
2313
+ },
2314
+ "wait_json": {
2315
+ "name": "wait_json",
2316
+ "type": "text",
2317
+ "primaryKey": false,
2318
+ "notNull": false,
2319
+ "autoincrement": false
2320
+ },
2321
+ "created_at": {
2322
+ "name": "created_at",
2323
+ "type": "integer",
2324
+ "primaryKey": false,
2325
+ "notNull": true,
2326
+ "autoincrement": false
2327
+ },
2328
+ "updated_at": {
2329
+ "name": "updated_at",
2330
+ "type": "integer",
2331
+ "primaryKey": false,
2332
+ "notNull": true,
2333
+ "autoincrement": false
2334
+ }
2335
+ },
2336
+ "indexes": {
2337
+ "session_goal_session_updated_idx": {
2338
+ "name": "session_goal_session_updated_idx",
2339
+ "columns": [
2340
+ "session_id",
2341
+ "updated_at"
2342
+ ],
2343
+ "isUnique": false
2344
+ },
2345
+ "session_goal_session_open_unique": {
2346
+ "name": "session_goal_session_open_unique",
2347
+ "columns": [
2348
+ "session_id"
2349
+ ],
2350
+ "isUnique": true,
2351
+ "where": "\"session_goal\".\"status\" IN ('active','waiting_user','blocked','paused')"
2352
+ }
2353
+ },
2354
+ "foreignKeys": {
2355
+ "session_goal_session_id_session_id_fk": {
2356
+ "name": "session_goal_session_id_session_id_fk",
2357
+ "tableFrom": "session_goal",
2358
+ "tableTo": "session",
2359
+ "columnsFrom": [
2360
+ "session_id"
2361
+ ],
2362
+ "columnsTo": [
2363
+ "id"
2364
+ ],
2365
+ "onDelete": "cascade",
2366
+ "onUpdate": "no action"
2367
+ }
2368
+ },
2369
+ "compositePrimaryKeys": {},
2370
+ "uniqueConstraints": {},
2371
+ "checkConstraints": {}
2372
+ },
2373
+ "session_input_attachment": {
2374
+ "name": "session_input_attachment",
2375
+ "columns": {
2376
+ "id": {
2377
+ "name": "id",
2378
+ "type": "text",
2379
+ "primaryKey": true,
2380
+ "notNull": true,
2381
+ "autoincrement": false
2382
+ },
2383
+ "session_id": {
2384
+ "name": "session_id",
2385
+ "type": "text",
2386
+ "primaryKey": false,
2387
+ "notNull": true,
2388
+ "autoincrement": false
2389
+ },
2390
+ "input_id": {
2391
+ "name": "input_id",
2392
+ "type": "text",
2393
+ "primaryKey": false,
2394
+ "notNull": true,
2395
+ "autoincrement": false
2396
+ },
2397
+ "asset_id": {
2398
+ "name": "asset_id",
2399
+ "type": "text",
2400
+ "primaryKey": false,
2401
+ "notNull": true,
2402
+ "autoincrement": false
2403
+ },
2404
+ "seq": {
2405
+ "name": "seq",
2406
+ "type": "integer",
2407
+ "primaryKey": false,
2408
+ "notNull": true,
2409
+ "autoincrement": false
2410
+ },
2411
+ "intent": {
2412
+ "name": "intent",
2413
+ "type": "text",
2414
+ "primaryKey": false,
2415
+ "notNull": true,
2416
+ "autoincrement": false
2417
+ },
2418
+ "display_name": {
2419
+ "name": "display_name",
2420
+ "type": "text",
2421
+ "primaryKey": false,
2422
+ "notNull": true,
2423
+ "autoincrement": false
2424
+ },
2425
+ "media_type": {
2426
+ "name": "media_type",
2427
+ "type": "text",
2428
+ "primaryKey": false,
2429
+ "notNull": true,
2430
+ "autoincrement": false
2431
+ },
2432
+ "size_bytes": {
2433
+ "name": "size_bytes",
2434
+ "type": "integer",
2435
+ "primaryKey": false,
2436
+ "notNull": true,
2437
+ "autoincrement": false
2438
+ },
2439
+ "metadata_json": {
2440
+ "name": "metadata_json",
2441
+ "type": "text",
2442
+ "primaryKey": false,
2443
+ "notNull": true,
2444
+ "autoincrement": false
2445
+ },
2446
+ "created_at": {
2447
+ "name": "created_at",
2448
+ "type": "integer",
2449
+ "primaryKey": false,
2450
+ "notNull": true,
2451
+ "autoincrement": false
2452
+ }
2453
+ },
2454
+ "indexes": {
2455
+ "session_input_attachment_input_seq_idx": {
2456
+ "name": "session_input_attachment_input_seq_idx",
2457
+ "columns": [
2458
+ "input_id",
2459
+ "seq"
2460
+ ],
2461
+ "isUnique": false
2462
+ },
2463
+ "session_input_attachment_asset_idx": {
2464
+ "name": "session_input_attachment_asset_idx",
2465
+ "columns": [
2466
+ "asset_id"
2467
+ ],
2468
+ "isUnique": false
2469
+ },
2470
+ "session_input_attachment_session_idx": {
2471
+ "name": "session_input_attachment_session_idx",
2472
+ "columns": [
2473
+ "session_id"
2474
+ ],
2475
+ "isUnique": false
2476
+ },
2477
+ "session_input_attachment_input_seq_unique": {
2478
+ "name": "session_input_attachment_input_seq_unique",
2479
+ "columns": [
2480
+ "input_id",
2481
+ "seq"
2482
+ ],
2483
+ "isUnique": true
2484
+ },
2485
+ "session_input_attachment_input_asset_unique": {
2486
+ "name": "session_input_attachment_input_asset_unique",
2487
+ "columns": [
2488
+ "input_id",
2489
+ "asset_id"
2490
+ ],
2491
+ "isUnique": true
2492
+ }
2493
+ },
2494
+ "foreignKeys": {
2495
+ "session_input_attachment_session_id_session_id_fk": {
2496
+ "name": "session_input_attachment_session_id_session_id_fk",
2497
+ "tableFrom": "session_input_attachment",
2498
+ "tableTo": "session",
2499
+ "columnsFrom": [
2500
+ "session_id"
2501
+ ],
2502
+ "columnsTo": [
2503
+ "id"
2504
+ ],
2505
+ "onDelete": "cascade",
2506
+ "onUpdate": "no action"
2507
+ },
2508
+ "session_input_attachment_input_id_session_input_id_fk": {
2509
+ "name": "session_input_attachment_input_id_session_input_id_fk",
2510
+ "tableFrom": "session_input_attachment",
2511
+ "tableTo": "session_input",
2512
+ "columnsFrom": [
2513
+ "input_id"
2514
+ ],
2515
+ "columnsTo": [
2516
+ "id"
2517
+ ],
2518
+ "onDelete": "cascade",
2519
+ "onUpdate": "no action"
2520
+ },
2521
+ "session_input_attachment_asset_id_attachment_asset_id_fk": {
2522
+ "name": "session_input_attachment_asset_id_attachment_asset_id_fk",
2523
+ "tableFrom": "session_input_attachment",
2524
+ "tableTo": "attachment_asset",
2525
+ "columnsFrom": [
2526
+ "asset_id"
2527
+ ],
2528
+ "columnsTo": [
2529
+ "id"
2530
+ ],
2531
+ "onDelete": "restrict",
2532
+ "onUpdate": "no action"
2533
+ }
2534
+ },
2535
+ "compositePrimaryKeys": {},
2536
+ "uniqueConstraints": {},
2537
+ "checkConstraints": {}
2538
+ },
2539
+ "session_input": {
2540
+ "name": "session_input",
2541
+ "columns": {
2542
+ "id": {
2543
+ "name": "id",
2544
+ "type": "text",
2545
+ "primaryKey": true,
2546
+ "notNull": false,
2547
+ "autoincrement": false
2548
+ },
2549
+ "session_id": {
2550
+ "name": "session_id",
2551
+ "type": "text",
2552
+ "primaryKey": false,
2553
+ "notNull": true,
2554
+ "autoincrement": false
2555
+ },
2556
+ "seq": {
2557
+ "name": "seq",
2558
+ "type": "integer",
2559
+ "primaryKey": false,
2560
+ "notNull": true,
2561
+ "autoincrement": false
2562
+ },
2563
+ "delivery": {
2564
+ "name": "delivery",
2565
+ "type": "text",
2566
+ "primaryKey": false,
2567
+ "notNull": true,
2568
+ "autoincrement": false
2569
+ },
2570
+ "content": {
2571
+ "name": "content",
2572
+ "type": "text",
2573
+ "primaryKey": false,
2574
+ "notNull": true,
2575
+ "autoincrement": false
2576
+ },
2577
+ "items_json": {
2578
+ "name": "items_json",
2579
+ "type": "text",
2580
+ "primaryKey": false,
2581
+ "notNull": true,
2582
+ "autoincrement": false
2583
+ },
2584
+ "metadata_json": {
2585
+ "name": "metadata_json",
2586
+ "type": "text",
2587
+ "primaryKey": false,
2588
+ "notNull": true,
2589
+ "autoincrement": false
2590
+ },
2591
+ "created_at": {
2592
+ "name": "created_at",
2593
+ "type": "integer",
2594
+ "primaryKey": false,
2595
+ "notNull": true,
2596
+ "autoincrement": false
2597
+ }
2598
+ },
2599
+ "indexes": {
2600
+ "session_input_session_idx": {
2601
+ "name": "session_input_session_idx",
2602
+ "columns": [
2603
+ "session_id"
2604
+ ],
2605
+ "isUnique": false
2606
+ },
2607
+ "session_input_session_seq": {
2608
+ "name": "session_input_session_seq",
2609
+ "columns": [
2610
+ "session_id",
2611
+ "seq"
2612
+ ],
2613
+ "isUnique": true
2614
+ }
2615
+ },
2616
+ "foreignKeys": {},
2617
+ "compositePrimaryKeys": {},
2618
+ "uniqueConstraints": {},
2619
+ "checkConstraints": {}
2620
+ },
2621
+ "session_message_part": {
2622
+ "name": "session_message_part",
2623
+ "columns": {
2624
+ "id": {
2625
+ "name": "id",
2626
+ "type": "text",
2627
+ "primaryKey": true,
2628
+ "notNull": false,
2629
+ "autoincrement": false
2630
+ },
2631
+ "session_id": {
2632
+ "name": "session_id",
2633
+ "type": "text",
2634
+ "primaryKey": false,
2635
+ "notNull": true,
2636
+ "autoincrement": false
2637
+ },
2638
+ "message_id": {
2639
+ "name": "message_id",
2640
+ "type": "text",
2641
+ "primaryKey": false,
2642
+ "notNull": true,
2643
+ "autoincrement": false
2644
+ },
2645
+ "seq": {
2646
+ "name": "seq",
2647
+ "type": "integer",
2648
+ "primaryKey": false,
2649
+ "notNull": true,
2650
+ "autoincrement": false
2651
+ },
2652
+ "type": {
2653
+ "name": "type",
2654
+ "type": "text",
2655
+ "primaryKey": false,
2656
+ "notNull": true,
2657
+ "autoincrement": false
2658
+ },
2659
+ "status": {
2660
+ "name": "status",
2661
+ "type": "text",
2662
+ "primaryKey": false,
2663
+ "notNull": true,
2664
+ "autoincrement": false
2665
+ },
2666
+ "text": {
2667
+ "name": "text",
2668
+ "type": "text",
2669
+ "primaryKey": false,
2670
+ "notNull": false,
2671
+ "autoincrement": false
2672
+ },
2673
+ "tool_use_id": {
2674
+ "name": "tool_use_id",
2675
+ "type": "text",
2676
+ "primaryKey": false,
2677
+ "notNull": false,
2678
+ "autoincrement": false
2679
+ },
2680
+ "tool_name": {
2681
+ "name": "tool_name",
2682
+ "type": "text",
2683
+ "primaryKey": false,
2684
+ "notNull": false,
2685
+ "autoincrement": false
2686
+ },
2687
+ "input_json": {
2688
+ "name": "input_json",
2689
+ "type": "text",
2690
+ "primaryKey": false,
2691
+ "notNull": false,
2692
+ "autoincrement": false
2693
+ },
2694
+ "output_json": {
2695
+ "name": "output_json",
2696
+ "type": "text",
2697
+ "primaryKey": false,
2698
+ "notNull": false,
2699
+ "autoincrement": false
2700
+ },
2701
+ "is_error": {
2702
+ "name": "is_error",
2703
+ "type": "integer",
2704
+ "primaryKey": false,
2705
+ "notNull": false,
2706
+ "autoincrement": false
2707
+ },
2708
+ "asset_id": {
2709
+ "name": "asset_id",
2710
+ "type": "text",
2711
+ "primaryKey": false,
2712
+ "notNull": false,
2713
+ "autoincrement": false
2714
+ },
2715
+ "attachment_intent": {
2716
+ "name": "attachment_intent",
2717
+ "type": "text",
2718
+ "primaryKey": false,
2719
+ "notNull": false,
2720
+ "autoincrement": false
2721
+ },
2722
+ "display_name": {
2723
+ "name": "display_name",
2724
+ "type": "text",
2725
+ "primaryKey": false,
2726
+ "notNull": false,
2727
+ "autoincrement": false
2728
+ },
2729
+ "media_type": {
2730
+ "name": "media_type",
2731
+ "type": "text",
2732
+ "primaryKey": false,
2733
+ "notNull": false,
2734
+ "autoincrement": false
2735
+ },
2736
+ "size_bytes": {
2737
+ "name": "size_bytes",
2738
+ "type": "integer",
2739
+ "primaryKey": false,
2740
+ "notNull": false,
2741
+ "autoincrement": false
2742
+ },
2743
+ "transformation_kind": {
2744
+ "name": "transformation_kind",
2745
+ "type": "text",
2746
+ "primaryKey": false,
2747
+ "notNull": false,
2748
+ "autoincrement": false
2749
+ },
2750
+ "representation_id": {
2751
+ "name": "representation_id",
2752
+ "type": "text",
2753
+ "primaryKey": false,
2754
+ "notNull": false,
2755
+ "autoincrement": false
2756
+ },
2757
+ "processor": {
2758
+ "name": "processor",
2759
+ "type": "text",
2760
+ "primaryKey": false,
2761
+ "notNull": false,
2762
+ "autoincrement": false
2763
+ },
2764
+ "transformation_error": {
2765
+ "name": "transformation_error",
2766
+ "type": "text",
2767
+ "primaryKey": false,
2768
+ "notNull": false,
2769
+ "autoincrement": false
2770
+ },
2771
+ "metadata_json": {
2772
+ "name": "metadata_json",
2773
+ "type": "text",
2774
+ "primaryKey": false,
2775
+ "notNull": true,
2776
+ "autoincrement": false
2777
+ },
2778
+ "created_at": {
2779
+ "name": "created_at",
2780
+ "type": "integer",
2781
+ "primaryKey": false,
2782
+ "notNull": true,
2783
+ "autoincrement": false
2784
+ },
2785
+ "updated_at": {
2786
+ "name": "updated_at",
2787
+ "type": "integer",
2788
+ "primaryKey": false,
2789
+ "notNull": true,
2790
+ "autoincrement": false
2791
+ }
2792
+ },
2793
+ "indexes": {
2794
+ "session_part_message_idx": {
2795
+ "name": "session_part_message_idx",
2796
+ "columns": [
2797
+ "message_id"
2798
+ ],
2799
+ "isUnique": false
2800
+ },
2801
+ "session_part_session_seq": {
2802
+ "name": "session_part_session_seq",
2803
+ "columns": [
2804
+ "session_id",
2805
+ "seq"
2806
+ ],
2807
+ "isUnique": true
2808
+ }
2809
+ },
2810
+ "foreignKeys": {},
2811
+ "compositePrimaryKeys": {},
2812
+ "uniqueConstraints": {},
2813
+ "checkConstraints": {}
2814
+ },
2815
+ "session_message": {
2816
+ "name": "session_message",
2817
+ "columns": {
2818
+ "id": {
2819
+ "name": "id",
2820
+ "type": "text",
2821
+ "primaryKey": true,
2822
+ "notNull": false,
2823
+ "autoincrement": false
2824
+ },
2825
+ "session_id": {
2826
+ "name": "session_id",
2827
+ "type": "text",
2828
+ "primaryKey": false,
2829
+ "notNull": true,
2830
+ "autoincrement": false
2831
+ },
2832
+ "seq": {
2833
+ "name": "seq",
2834
+ "type": "integer",
2835
+ "primaryKey": false,
2836
+ "notNull": true,
2837
+ "autoincrement": false
2838
+ },
2839
+ "role": {
2840
+ "name": "role",
2841
+ "type": "text",
2842
+ "primaryKey": false,
2843
+ "notNull": true,
2844
+ "autoincrement": false
2845
+ },
2846
+ "run_id": {
2847
+ "name": "run_id",
2848
+ "type": "text",
2849
+ "primaryKey": false,
2850
+ "notNull": false,
2851
+ "autoincrement": false
2852
+ },
2853
+ "input_id": {
2854
+ "name": "input_id",
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_message_session_idx": {
2884
+ "name": "session_message_session_idx",
2885
+ "columns": [
2886
+ "session_id"
2887
+ ],
2888
+ "isUnique": false
2889
+ },
2890
+ "session_message_session_seq": {
2891
+ "name": "session_message_session_seq",
2892
+ "columns": [
2893
+ "session_id",
2894
+ "seq"
2895
+ ],
2896
+ "isUnique": true
2897
+ }
2898
+ },
2899
+ "foreignKeys": {},
2900
+ "compositePrimaryKeys": {},
2901
+ "uniqueConstraints": {},
2902
+ "checkConstraints": {}
2903
+ },
2904
+ "session_plugin_app": {
2905
+ "name": "session_plugin_app",
2906
+ "columns": {
2907
+ "id": {
2908
+ "name": "id",
2909
+ "type": "text",
2910
+ "primaryKey": true,
2911
+ "notNull": true,
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
+ "plugin_id": {
2922
+ "name": "plugin_id",
2923
+ "type": "text",
2924
+ "primaryKey": false,
2925
+ "notNull": true,
2926
+ "autoincrement": false
2927
+ },
2928
+ "plugin_version": {
2929
+ "name": "plugin_version",
2930
+ "type": "text",
2931
+ "primaryKey": false,
2932
+ "notNull": true,
2933
+ "autoincrement": false
2934
+ },
2935
+ "plugin_digest": {
2936
+ "name": "plugin_digest",
2937
+ "type": "text",
2938
+ "primaryKey": false,
2939
+ "notNull": true,
2940
+ "autoincrement": false
2941
+ },
2942
+ "definition_digest": {
2943
+ "name": "definition_digest",
2944
+ "type": "text",
2945
+ "primaryKey": false,
2946
+ "notNull": true,
2947
+ "autoincrement": false
2948
+ },
2949
+ "backend_id": {
2950
+ "name": "backend_id",
2951
+ "type": "text",
2952
+ "primaryKey": false,
2953
+ "notNull": true,
2954
+ "autoincrement": false
2955
+ },
2956
+ "backend_kind": {
2957
+ "name": "backend_kind",
2958
+ "type": "text",
2959
+ "primaryKey": false,
2960
+ "notNull": true,
2961
+ "autoincrement": false
2962
+ },
2963
+ "resource_uri": {
2964
+ "name": "resource_uri",
2965
+ "type": "text",
2966
+ "primaryKey": false,
2967
+ "notNull": true,
2968
+ "autoincrement": false
2969
+ },
2970
+ "origin_json": {
2971
+ "name": "origin_json",
2972
+ "type": "text",
2973
+ "primaryKey": false,
2974
+ "notNull": true,
2975
+ "autoincrement": false
2976
+ },
2977
+ "logical_key": {
2978
+ "name": "logical_key",
2979
+ "type": "text",
2980
+ "primaryKey": false,
2981
+ "notNull": true,
2982
+ "autoincrement": false
2983
+ },
2984
+ "status": {
2985
+ "name": "status",
2986
+ "type": "text",
2987
+ "primaryKey": false,
2988
+ "notNull": true,
2989
+ "autoincrement": false
2990
+ },
2991
+ "control_revision": {
2992
+ "name": "control_revision",
2993
+ "type": "integer",
2994
+ "primaryKey": false,
2995
+ "notNull": true,
2996
+ "autoincrement": false
2997
+ },
2998
+ "active_action_run_id": {
2999
+ "name": "active_action_run_id",
3000
+ "type": "text",
3001
+ "primaryKey": false,
3002
+ "notNull": false,
3003
+ "autoincrement": false
3004
+ },
3005
+ "last_action_run_id": {
3006
+ "name": "last_action_run_id",
3007
+ "type": "text",
3008
+ "primaryKey": false,
3009
+ "notNull": false,
3010
+ "autoincrement": false
3011
+ },
3012
+ "created_at": {
3013
+ "name": "created_at",
3014
+ "type": "integer",
3015
+ "primaryKey": false,
3016
+ "notNull": true,
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_plugin_app_logical_key": {
3029
+ "name": "session_plugin_app_logical_key",
3030
+ "columns": [
3031
+ "session_id",
3032
+ "logical_key"
3033
+ ],
3034
+ "isUnique": true
3035
+ },
3036
+ "session_plugin_app_session_status_idx": {
3037
+ "name": "session_plugin_app_session_status_idx",
3038
+ "columns": [
3039
+ "session_id",
3040
+ "status"
3041
+ ],
3042
+ "isUnique": false
3043
+ }
3044
+ },
3045
+ "foreignKeys": {
3046
+ "session_plugin_app_session_id_session_id_fk": {
3047
+ "name": "session_plugin_app_session_id_session_id_fk",
3048
+ "tableFrom": "session_plugin_app",
3049
+ "tableTo": "session",
3050
+ "columnsFrom": [
3051
+ "session_id"
3052
+ ],
3053
+ "columnsTo": [
3054
+ "id"
3055
+ ],
3056
+ "onDelete": "cascade",
3057
+ "onUpdate": "no action"
3058
+ }
3059
+ },
3060
+ "compositePrimaryKeys": {},
3061
+ "uniqueConstraints": {},
3062
+ "checkConstraints": {
3063
+ "session_plugin_app_status": {
3064
+ "name": "session_plugin_app_status",
3065
+ "value": "\"session_plugin_app\".\"status\" IN ('open', 'closed', 'revoked')"
3066
+ },
3067
+ "session_plugin_app_backend_kind": {
3068
+ "name": "session_plugin_app_backend_kind",
3069
+ "value": "\"session_plugin_app\".\"backend_kind\" IN ('native-tools', 'mcp-server')"
3070
+ },
3071
+ "session_plugin_app_revision": {
3072
+ "name": "session_plugin_app_revision",
3073
+ "value": "\"session_plugin_app\".\"control_revision\" >= 0"
3074
+ }
3075
+ }
3076
+ },
3077
+ "session_run_attempt": {
3078
+ "name": "session_run_attempt",
3079
+ "columns": {
3080
+ "id": {
3081
+ "name": "id",
3082
+ "type": "text",
3083
+ "primaryKey": true,
3084
+ "notNull": true,
3085
+ "autoincrement": false
3086
+ },
3087
+ "run_id": {
3088
+ "name": "run_id",
3089
+ "type": "text",
3090
+ "primaryKey": false,
3091
+ "notNull": true,
3092
+ "autoincrement": false
3093
+ },
3094
+ "sequence": {
3095
+ "name": "sequence",
3096
+ "type": "integer",
3097
+ "primaryKey": false,
3098
+ "notNull": true,
3099
+ "autoincrement": false
3100
+ },
3101
+ "status": {
3102
+ "name": "status",
3103
+ "type": "text",
3104
+ "primaryKey": false,
3105
+ "notNull": true,
3106
+ "autoincrement": false
3107
+ },
3108
+ "provider": {
3109
+ "name": "provider",
3110
+ "type": "text",
3111
+ "primaryKey": false,
3112
+ "notNull": false,
3113
+ "autoincrement": false
3114
+ },
3115
+ "model": {
3116
+ "name": "model",
3117
+ "type": "text",
3118
+ "primaryKey": false,
3119
+ "notNull": false,
3120
+ "autoincrement": false
3121
+ },
3122
+ "retry_reason": {
3123
+ "name": "retry_reason",
3124
+ "type": "text",
3125
+ "primaryKey": false,
3126
+ "notNull": false,
3127
+ "autoincrement": false
3128
+ },
3129
+ "error_kind": {
3130
+ "name": "error_kind",
3131
+ "type": "text",
3132
+ "primaryKey": false,
3133
+ "notNull": false,
3134
+ "autoincrement": false
3135
+ },
3136
+ "error": {
3137
+ "name": "error",
3138
+ "type": "text",
3139
+ "primaryKey": false,
3140
+ "notNull": false,
3141
+ "autoincrement": false
3142
+ },
3143
+ "input_tokens": {
3144
+ "name": "input_tokens",
3145
+ "type": "integer",
3146
+ "primaryKey": false,
3147
+ "notNull": false,
3148
+ "autoincrement": false
3149
+ },
3150
+ "output_tokens": {
3151
+ "name": "output_tokens",
3152
+ "type": "integer",
3153
+ "primaryKey": false,
3154
+ "notNull": false,
3155
+ "autoincrement": false
3156
+ },
3157
+ "started_at": {
3158
+ "name": "started_at",
3159
+ "type": "integer",
3160
+ "primaryKey": false,
3161
+ "notNull": false,
3162
+ "autoincrement": false
3163
+ },
3164
+ "finished_at": {
3165
+ "name": "finished_at",
3166
+ "type": "integer",
3167
+ "primaryKey": false,
3168
+ "notNull": false,
3169
+ "autoincrement": false
3170
+ },
3171
+ "created_at": {
3172
+ "name": "created_at",
3173
+ "type": "integer",
3174
+ "primaryKey": false,
3175
+ "notNull": true,
3176
+ "autoincrement": false
3177
+ },
3178
+ "updated_at": {
3179
+ "name": "updated_at",
3180
+ "type": "integer",
3181
+ "primaryKey": false,
3182
+ "notNull": true,
3183
+ "autoincrement": false
3184
+ }
3185
+ },
3186
+ "indexes": {
3187
+ "session_run_attempt_run_sequence_unique": {
3188
+ "name": "session_run_attempt_run_sequence_unique",
3189
+ "columns": [
3190
+ "run_id",
3191
+ "sequence"
3192
+ ],
3193
+ "isUnique": true
3194
+ },
3195
+ "session_run_attempt_run_idx": {
3196
+ "name": "session_run_attempt_run_idx",
3197
+ "columns": [
3198
+ "run_id"
3199
+ ],
3200
+ "isUnique": false
3201
+ },
3202
+ "session_run_attempt_status_idx": {
3203
+ "name": "session_run_attempt_status_idx",
3204
+ "columns": [
3205
+ "status"
3206
+ ],
3207
+ "isUnique": false
3208
+ }
3209
+ },
3210
+ "foreignKeys": {},
3211
+ "compositePrimaryKeys": {},
3212
+ "uniqueConstraints": {},
3213
+ "checkConstraints": {}
3214
+ },
3215
+ "session_run": {
3216
+ "name": "session_run",
3217
+ "columns": {
3218
+ "id": {
3219
+ "name": "id",
3220
+ "type": "text",
3221
+ "primaryKey": true,
3222
+ "notNull": false,
3223
+ "autoincrement": false
3224
+ },
3225
+ "session_id": {
3226
+ "name": "session_id",
3227
+ "type": "text",
3228
+ "primaryKey": false,
3229
+ "notNull": true,
3230
+ "autoincrement": false
3231
+ },
3232
+ "input_id": {
3233
+ "name": "input_id",
3234
+ "type": "text",
3235
+ "primaryKey": false,
3236
+ "notNull": false,
3237
+ "autoincrement": false
3238
+ },
3239
+ "status": {
3240
+ "name": "status",
3241
+ "type": "text",
3242
+ "primaryKey": false,
3243
+ "notNull": true,
3244
+ "autoincrement": false
3245
+ },
3246
+ "started_at": {
3247
+ "name": "started_at",
3248
+ "type": "integer",
3249
+ "primaryKey": false,
3250
+ "notNull": false,
3251
+ "autoincrement": false
3252
+ },
3253
+ "finished_at": {
3254
+ "name": "finished_at",
3255
+ "type": "integer",
3256
+ "primaryKey": false,
3257
+ "notNull": false,
3258
+ "autoincrement": false
3259
+ },
3260
+ "error": {
3261
+ "name": "error",
3262
+ "type": "text",
3263
+ "primaryKey": false,
3264
+ "notNull": false,
3265
+ "autoincrement": false
3266
+ },
3267
+ "metadata_json": {
3268
+ "name": "metadata_json",
3269
+ "type": "text",
3270
+ "primaryKey": false,
3271
+ "notNull": true,
3272
+ "autoincrement": false
3273
+ },
3274
+ "created_at": {
3275
+ "name": "created_at",
3276
+ "type": "integer",
3277
+ "primaryKey": false,
3278
+ "notNull": true,
3279
+ "autoincrement": false
3280
+ },
3281
+ "updated_at": {
3282
+ "name": "updated_at",
3283
+ "type": "integer",
3284
+ "primaryKey": false,
3285
+ "notNull": true,
3286
+ "autoincrement": false
3287
+ }
3288
+ },
3289
+ "indexes": {
3290
+ "session_run_session_idx": {
3291
+ "name": "session_run_session_idx",
3292
+ "columns": [
3293
+ "session_id",
3294
+ "created_at"
3295
+ ],
3296
+ "isUnique": false
3297
+ },
3298
+ "session_run_input_idx": {
3299
+ "name": "session_run_input_idx",
3300
+ "columns": [
3301
+ "input_id"
3302
+ ],
3303
+ "isUnique": false
3304
+ }
3305
+ },
3306
+ "foreignKeys": {},
3307
+ "compositePrimaryKeys": {},
3308
+ "uniqueConstraints": {},
3309
+ "checkConstraints": {}
3310
+ },
3311
+ "session_task": {
3312
+ "name": "session_task",
3313
+ "columns": {
3314
+ "id": {
3315
+ "name": "id",
3316
+ "type": "text",
3317
+ "primaryKey": true,
3318
+ "notNull": false,
3319
+ "autoincrement": false
3320
+ },
3321
+ "session_id": {
3322
+ "name": "session_id",
3323
+ "type": "text",
3324
+ "primaryKey": false,
3325
+ "notNull": true,
3326
+ "autoincrement": false
3327
+ },
3328
+ "request_namespace": {
3329
+ "name": "request_namespace",
3330
+ "type": "text",
3331
+ "primaryKey": false,
3332
+ "notNull": false,
3333
+ "autoincrement": false
3334
+ },
3335
+ "request_id": {
3336
+ "name": "request_id",
3337
+ "type": "text",
3338
+ "primaryKey": false,
3339
+ "notNull": false,
3340
+ "autoincrement": false
3341
+ },
3342
+ "child_session_id": {
3343
+ "name": "child_session_id",
3344
+ "type": "text",
3345
+ "primaryKey": false,
3346
+ "notNull": false,
3347
+ "autoincrement": false
3348
+ },
3349
+ "run_id": {
3350
+ "name": "run_id",
3351
+ "type": "text",
3352
+ "primaryKey": false,
3353
+ "notNull": false,
3354
+ "autoincrement": false
3355
+ },
3356
+ "type": {
3357
+ "name": "type",
3358
+ "type": "text",
3359
+ "primaryKey": false,
3360
+ "notNull": true,
3361
+ "autoincrement": false
3362
+ },
3363
+ "status": {
3364
+ "name": "status",
3365
+ "type": "text",
3366
+ "primaryKey": false,
3367
+ "notNull": true,
3368
+ "autoincrement": false
3369
+ },
3370
+ "description": {
3371
+ "name": "description",
3372
+ "type": "text",
3373
+ "primaryKey": false,
3374
+ "notNull": true,
3375
+ "autoincrement": false
3376
+ },
3377
+ "cwd": {
3378
+ "name": "cwd",
3379
+ "type": "text",
3380
+ "primaryKey": false,
3381
+ "notNull": true,
3382
+ "autoincrement": false
3383
+ },
3384
+ "output": {
3385
+ "name": "output",
3386
+ "type": "text",
3387
+ "primaryKey": false,
3388
+ "notNull": false,
3389
+ "autoincrement": false
3390
+ },
3391
+ "error": {
3392
+ "name": "error",
3393
+ "type": "text",
3394
+ "primaryKey": false,
3395
+ "notNull": false,
3396
+ "autoincrement": false
3397
+ },
3398
+ "metadata_json": {
3399
+ "name": "metadata_json",
3400
+ "type": "text",
3401
+ "primaryKey": false,
3402
+ "notNull": true,
3403
+ "autoincrement": false
3404
+ },
3405
+ "created_at": {
3406
+ "name": "created_at",
3407
+ "type": "integer",
3408
+ "primaryKey": false,
3409
+ "notNull": true,
3410
+ "autoincrement": false
3411
+ },
3412
+ "started_at": {
3413
+ "name": "started_at",
3414
+ "type": "integer",
3415
+ "primaryKey": false,
3416
+ "notNull": false,
3417
+ "autoincrement": false
3418
+ },
3419
+ "finished_at": {
3420
+ "name": "finished_at",
3421
+ "type": "integer",
3422
+ "primaryKey": false,
3423
+ "notNull": false,
3424
+ "autoincrement": false
3425
+ },
3426
+ "updated_at": {
3427
+ "name": "updated_at",
3428
+ "type": "integer",
3429
+ "primaryKey": false,
3430
+ "notNull": true,
3431
+ "autoincrement": false
3432
+ }
3433
+ },
3434
+ "indexes": {
3435
+ "session_task_session_idx": {
3436
+ "name": "session_task_session_idx",
3437
+ "columns": [
3438
+ "session_id",
3439
+ "created_at"
3440
+ ],
3441
+ "isUnique": false
3442
+ },
3443
+ "session_task_request_identity_idx": {
3444
+ "name": "session_task_request_identity_idx",
3445
+ "columns": [
3446
+ "session_id",
3447
+ "request_namespace",
3448
+ "request_id"
3449
+ ],
3450
+ "isUnique": true
3451
+ }
3452
+ },
3453
+ "foreignKeys": {},
3454
+ "compositePrimaryKeys": {},
3455
+ "uniqueConstraints": {},
3456
+ "checkConstraints": {}
3457
+ },
3458
+ "session": {
3459
+ "name": "session",
3460
+ "columns": {
3461
+ "id": {
3462
+ "name": "id",
3463
+ "type": "text",
3464
+ "primaryKey": true,
3465
+ "notNull": false,
3466
+ "autoincrement": false
3467
+ },
3468
+ "parent_id": {
3469
+ "name": "parent_id",
3470
+ "type": "text",
3471
+ "primaryKey": false,
3472
+ "notNull": false,
3473
+ "autoincrement": false
3474
+ },
3475
+ "project_id": {
3476
+ "name": "project_id",
3477
+ "type": "text",
3478
+ "primaryKey": false,
3479
+ "notNull": false,
3480
+ "autoincrement": false
3481
+ },
3482
+ "cwd": {
3483
+ "name": "cwd",
3484
+ "type": "text",
3485
+ "primaryKey": false,
3486
+ "notNull": true,
3487
+ "autoincrement": false
3488
+ },
3489
+ "cwd_relative": {
3490
+ "name": "cwd_relative",
3491
+ "type": "text",
3492
+ "primaryKey": false,
3493
+ "notNull": false,
3494
+ "autoincrement": false
3495
+ },
3496
+ "title": {
3497
+ "name": "title",
3498
+ "type": "text",
3499
+ "primaryKey": false,
3500
+ "notNull": true,
3501
+ "autoincrement": false
3502
+ },
3503
+ "model": {
3504
+ "name": "model",
3505
+ "type": "text",
3506
+ "primaryKey": false,
3507
+ "notNull": true,
3508
+ "autoincrement": false
3509
+ },
3510
+ "agent": {
3511
+ "name": "agent",
3512
+ "type": "text",
3513
+ "primaryKey": false,
3514
+ "notNull": false,
3515
+ "autoincrement": false
3516
+ },
3517
+ "status": {
3518
+ "name": "status",
3519
+ "type": "text",
3520
+ "primaryKey": false,
3521
+ "notNull": true,
3522
+ "autoincrement": false
3523
+ },
3524
+ "metadata_json": {
3525
+ "name": "metadata_json",
3526
+ "type": "text",
3527
+ "primaryKey": false,
3528
+ "notNull": true,
3529
+ "autoincrement": false
3530
+ },
3531
+ "created_at": {
3532
+ "name": "created_at",
3533
+ "type": "integer",
3534
+ "primaryKey": false,
3535
+ "notNull": true,
3536
+ "autoincrement": false
3537
+ },
3538
+ "updated_at": {
3539
+ "name": "updated_at",
3540
+ "type": "integer",
3541
+ "primaryKey": false,
3542
+ "notNull": true,
3543
+ "autoincrement": false
3544
+ },
3545
+ "archived_at": {
3546
+ "name": "archived_at",
3547
+ "type": "integer",
3548
+ "primaryKey": false,
3549
+ "notNull": false,
3550
+ "autoincrement": false
3551
+ }
3552
+ },
3553
+ "indexes": {
3554
+ "session_parent_idx": {
3555
+ "name": "session_parent_idx",
3556
+ "columns": [
3557
+ "parent_id"
3558
+ ],
3559
+ "isUnique": false
3560
+ },
3561
+ "session_cwd_updated_idx": {
3562
+ "name": "session_cwd_updated_idx",
3563
+ "columns": [
3564
+ "cwd",
3565
+ "updated_at"
3566
+ ],
3567
+ "isUnique": false
3568
+ }
3569
+ },
3570
+ "foreignKeys": {
3571
+ "session_project_id_project_id_fk": {
3572
+ "name": "session_project_id_project_id_fk",
3573
+ "tableFrom": "session",
3574
+ "tableTo": "project",
3575
+ "columnsFrom": [
3576
+ "project_id"
3577
+ ],
3578
+ "columnsTo": [
3579
+ "id"
3580
+ ],
3581
+ "onDelete": "no action",
3582
+ "onUpdate": "no action"
3583
+ }
3584
+ },
3585
+ "compositePrimaryKeys": {},
3586
+ "uniqueConstraints": {},
3587
+ "checkConstraints": {}
3588
+ },
3589
+ "workflow_event": {
3590
+ "name": "workflow_event",
3591
+ "columns": {
3592
+ "seq": {
3593
+ "name": "seq",
3594
+ "type": "integer",
3595
+ "primaryKey": true,
3596
+ "notNull": true,
3597
+ "autoincrement": true
3598
+ },
3599
+ "workflow_run_id": {
3600
+ "name": "workflow_run_id",
3601
+ "type": "text",
3602
+ "primaryKey": false,
3603
+ "notNull": true,
3604
+ "autoincrement": false
3605
+ },
3606
+ "type": {
3607
+ "name": "type",
3608
+ "type": "text",
3609
+ "primaryKey": false,
3610
+ "notNull": true,
3611
+ "autoincrement": false
3612
+ },
3613
+ "event_json": {
3614
+ "name": "event_json",
3615
+ "type": "text",
3616
+ "primaryKey": false,
3617
+ "notNull": true,
3618
+ "autoincrement": false
3619
+ },
3620
+ "created_at": {
3621
+ "name": "created_at",
3622
+ "type": "integer",
3623
+ "primaryKey": false,
3624
+ "notNull": true,
3625
+ "autoincrement": false
3626
+ }
3627
+ },
3628
+ "indexes": {
3629
+ "workflow_event_run_seq_idx": {
3630
+ "name": "workflow_event_run_seq_idx",
3631
+ "columns": [
3632
+ "workflow_run_id",
3633
+ "seq"
3634
+ ],
3635
+ "isUnique": false
3636
+ }
3637
+ },
3638
+ "foreignKeys": {
3639
+ "workflow_event_workflow_run_id_workflow_run_run_id_fk": {
3640
+ "name": "workflow_event_workflow_run_id_workflow_run_run_id_fk",
3641
+ "tableFrom": "workflow_event",
3642
+ "tableTo": "workflow_run",
3643
+ "columnsFrom": [
3644
+ "workflow_run_id"
3645
+ ],
3646
+ "columnsTo": [
3647
+ "run_id"
3648
+ ],
3649
+ "onDelete": "cascade",
3650
+ "onUpdate": "no action"
3651
+ }
3652
+ },
3653
+ "compositePrimaryKeys": {},
3654
+ "uniqueConstraints": {},
3655
+ "checkConstraints": {}
3656
+ },
3657
+ "workflow_execution_claim": {
3658
+ "name": "workflow_execution_claim",
3659
+ "columns": {
3660
+ "workflow_run_id": {
3661
+ "name": "workflow_run_id",
3662
+ "type": "text",
3663
+ "primaryKey": true,
3664
+ "notNull": true,
3665
+ "autoincrement": false
3666
+ },
3667
+ "owner_id": {
3668
+ "name": "owner_id",
3669
+ "type": "text",
3670
+ "primaryKey": false,
3671
+ "notNull": true,
3672
+ "autoincrement": false
3673
+ },
3674
+ "generation": {
3675
+ "name": "generation",
3676
+ "type": "integer",
3677
+ "primaryKey": false,
3678
+ "notNull": true,
3679
+ "autoincrement": false
3680
+ },
3681
+ "claimed_at": {
3682
+ "name": "claimed_at",
3683
+ "type": "integer",
3684
+ "primaryKey": false,
3685
+ "notNull": true,
3686
+ "autoincrement": false
3687
+ },
3688
+ "heartbeat_at": {
3689
+ "name": "heartbeat_at",
3690
+ "type": "integer",
3691
+ "primaryKey": false,
3692
+ "notNull": true,
3693
+ "autoincrement": false
3694
+ },
3695
+ "finished_at": {
3696
+ "name": "finished_at",
3697
+ "type": "integer",
3698
+ "primaryKey": false,
3699
+ "notNull": false,
3700
+ "autoincrement": false
3701
+ },
3702
+ "status": {
3703
+ "name": "status",
3704
+ "type": "text",
3705
+ "primaryKey": false,
3706
+ "notNull": true,
3707
+ "autoincrement": false
3708
+ }
3709
+ },
3710
+ "indexes": {},
3711
+ "foreignKeys": {
3712
+ "workflow_execution_claim_workflow_run_id_workflow_run_run_id_fk": {
3713
+ "name": "workflow_execution_claim_workflow_run_id_workflow_run_run_id_fk",
3714
+ "tableFrom": "workflow_execution_claim",
3715
+ "tableTo": "workflow_run",
3716
+ "columnsFrom": [
3717
+ "workflow_run_id"
3718
+ ],
3719
+ "columnsTo": [
3720
+ "run_id"
3721
+ ],
3722
+ "onDelete": "cascade",
3723
+ "onUpdate": "no action"
3724
+ }
3725
+ },
3726
+ "compositePrimaryKeys": {},
3727
+ "uniqueConstraints": {},
3728
+ "checkConstraints": {}
3729
+ },
3730
+ "workflow_run": {
3731
+ "name": "workflow_run",
3732
+ "columns": {
3733
+ "run_id": {
3734
+ "name": "run_id",
3735
+ "type": "text",
3736
+ "primaryKey": true,
3737
+ "notNull": true,
3738
+ "autoincrement": false
3739
+ },
3740
+ "owner_session_id": {
3741
+ "name": "owner_session_id",
3742
+ "type": "text",
3743
+ "primaryKey": false,
3744
+ "notNull": false,
3745
+ "autoincrement": false
3746
+ },
3747
+ "owner_input_id": {
3748
+ "name": "owner_input_id",
3749
+ "type": "text",
3750
+ "primaryKey": false,
3751
+ "notNull": false,
3752
+ "autoincrement": false
3753
+ },
3754
+ "owner_run_id": {
3755
+ "name": "owner_run_id",
3756
+ "type": "text",
3757
+ "primaryKey": false,
3758
+ "notNull": false,
3759
+ "autoincrement": false
3760
+ },
3761
+ "status": {
3762
+ "name": "status",
3763
+ "type": "text",
3764
+ "primaryKey": false,
3765
+ "notNull": true,
3766
+ "autoincrement": false
3767
+ },
3768
+ "termination": {
3769
+ "name": "termination",
3770
+ "type": "text",
3771
+ "primaryKey": false,
3772
+ "notNull": false,
3773
+ "autoincrement": false
3774
+ },
3775
+ "snapshot_json": {
3776
+ "name": "snapshot_json",
3777
+ "type": "text",
3778
+ "primaryKey": false,
3779
+ "notNull": true,
3780
+ "autoincrement": false
3781
+ },
3782
+ "origin_json": {
3783
+ "name": "origin_json",
3784
+ "type": "text",
3785
+ "primaryKey": false,
3786
+ "notNull": false,
3787
+ "autoincrement": false
3788
+ },
3789
+ "created_at": {
3790
+ "name": "created_at",
3791
+ "type": "integer",
3792
+ "primaryKey": false,
3793
+ "notNull": true,
3794
+ "autoincrement": false
3795
+ },
3796
+ "updated_at": {
3797
+ "name": "updated_at",
3798
+ "type": "integer",
3799
+ "primaryKey": false,
3800
+ "notNull": true,
3801
+ "autoincrement": false
3802
+ }
3803
+ },
3804
+ "indexes": {
3805
+ "workflow_run_owner_idx": {
3806
+ "name": "workflow_run_owner_idx",
3807
+ "columns": [
3808
+ "owner_session_id",
3809
+ "updated_at"
3810
+ ],
3811
+ "isUnique": false
3812
+ },
3813
+ "workflow_run_status_idx": {
3814
+ "name": "workflow_run_status_idx",
3815
+ "columns": [
3816
+ "status",
3817
+ "updated_at"
3818
+ ],
3819
+ "isUnique": false
3820
+ }
3821
+ },
3822
+ "foreignKeys": {
3823
+ "workflow_run_owner_session_id_session_id_fk": {
3824
+ "name": "workflow_run_owner_session_id_session_id_fk",
3825
+ "tableFrom": "workflow_run",
3826
+ "tableTo": "session",
3827
+ "columnsFrom": [
3828
+ "owner_session_id"
3829
+ ],
3830
+ "columnsTo": [
3831
+ "id"
3832
+ ],
3833
+ "onDelete": "set null",
3834
+ "onUpdate": "no action"
3835
+ },
3836
+ "workflow_run_owner_input_id_session_input_id_fk": {
3837
+ "name": "workflow_run_owner_input_id_session_input_id_fk",
3838
+ "tableFrom": "workflow_run",
3839
+ "tableTo": "session_input",
3840
+ "columnsFrom": [
3841
+ "owner_input_id"
3842
+ ],
3843
+ "columnsTo": [
3844
+ "id"
3845
+ ],
3846
+ "onDelete": "set null",
3847
+ "onUpdate": "no action"
3848
+ },
3849
+ "workflow_run_owner_run_id_session_run_id_fk": {
3850
+ "name": "workflow_run_owner_run_id_session_run_id_fk",
3851
+ "tableFrom": "workflow_run",
3852
+ "tableTo": "session_run",
3853
+ "columnsFrom": [
3854
+ "owner_run_id"
3855
+ ],
3856
+ "columnsTo": [
3857
+ "id"
3858
+ ],
3859
+ "onDelete": "set null",
3860
+ "onUpdate": "no action"
3861
+ }
3862
+ },
3863
+ "compositePrimaryKeys": {},
3864
+ "uniqueConstraints": {},
3865
+ "checkConstraints": {}
3866
+ },
3867
+ "workflow_task_attempt": {
3868
+ "name": "workflow_task_attempt",
3869
+ "columns": {
3870
+ "workflow_run_id": {
3871
+ "name": "workflow_run_id",
3872
+ "type": "text",
3873
+ "primaryKey": false,
3874
+ "notNull": true,
3875
+ "autoincrement": false
3876
+ },
3877
+ "task_id": {
3878
+ "name": "task_id",
3879
+ "type": "text",
3880
+ "primaryKey": false,
3881
+ "notNull": true,
3882
+ "autoincrement": false
3883
+ },
3884
+ "attempt": {
3885
+ "name": "attempt",
3886
+ "type": "integer",
3887
+ "primaryKey": false,
3888
+ "notNull": true,
3889
+ "autoincrement": false
3890
+ },
3891
+ "status": {
3892
+ "name": "status",
3893
+ "type": "text",
3894
+ "primaryKey": false,
3895
+ "notNull": true,
3896
+ "autoincrement": false
3897
+ },
3898
+ "payload_json": {
3899
+ "name": "payload_json",
3900
+ "type": "text",
3901
+ "primaryKey": false,
3902
+ "notNull": true,
3903
+ "autoincrement": false
3904
+ },
3905
+ "started_at": {
3906
+ "name": "started_at",
3907
+ "type": "integer",
3908
+ "primaryKey": false,
3909
+ "notNull": true,
3910
+ "autoincrement": false
3911
+ },
3912
+ "finished_at": {
3913
+ "name": "finished_at",
3914
+ "type": "integer",
3915
+ "primaryKey": false,
3916
+ "notNull": false,
3917
+ "autoincrement": false
3918
+ }
3919
+ },
3920
+ "indexes": {},
3921
+ "foreignKeys": {
3922
+ "workflow_task_attempt_workflow_run_id_workflow_run_run_id_fk": {
3923
+ "name": "workflow_task_attempt_workflow_run_id_workflow_run_run_id_fk",
3924
+ "tableFrom": "workflow_task_attempt",
3925
+ "tableTo": "workflow_run",
3926
+ "columnsFrom": [
3927
+ "workflow_run_id"
3928
+ ],
3929
+ "columnsTo": [
3930
+ "run_id"
3931
+ ],
3932
+ "onDelete": "cascade",
3933
+ "onUpdate": "no action"
3934
+ }
3935
+ },
3936
+ "compositePrimaryKeys": {
3937
+ "workflow_task_attempt_workflow_run_id_task_id_attempt_pk": {
3938
+ "columns": [
3939
+ "workflow_run_id",
3940
+ "task_id",
3941
+ "attempt"
3942
+ ],
3943
+ "name": "workflow_task_attempt_workflow_run_id_task_id_attempt_pk"
3944
+ }
3945
+ },
3946
+ "uniqueConstraints": {},
3947
+ "checkConstraints": {}
3948
+ },
3949
+ "tool_result": {
3950
+ "name": "tool_result",
3951
+ "columns": {
3952
+ "id": {
3953
+ "name": "id",
3954
+ "type": "text",
3955
+ "primaryKey": true,
3956
+ "notNull": true,
3957
+ "autoincrement": false
3958
+ },
3959
+ "session_id": {
3960
+ "name": "session_id",
3961
+ "type": "text",
3962
+ "primaryKey": false,
3963
+ "notNull": true,
3964
+ "autoincrement": false
3965
+ },
3966
+ "run_id": {
3967
+ "name": "run_id",
3968
+ "type": "text",
3969
+ "primaryKey": false,
3970
+ "notNull": true,
3971
+ "autoincrement": false
3972
+ },
3973
+ "tool_use_id": {
3974
+ "name": "tool_use_id",
3975
+ "type": "text",
3976
+ "primaryKey": false,
3977
+ "notNull": true,
3978
+ "autoincrement": false
3979
+ },
3980
+ "tool_name": {
3981
+ "name": "tool_name",
3982
+ "type": "text",
3983
+ "primaryKey": false,
3984
+ "notNull": true,
3985
+ "autoincrement": false
3986
+ },
3987
+ "source_kind": {
3988
+ "name": "source_kind",
3989
+ "type": "text",
3990
+ "primaryKey": false,
3991
+ "notNull": true,
3992
+ "autoincrement": false
3993
+ },
3994
+ "source_id": {
3995
+ "name": "source_id",
3996
+ "type": "text",
3997
+ "primaryKey": false,
3998
+ "notNull": false,
3999
+ "autoincrement": false
4000
+ },
4001
+ "text": {
4002
+ "name": "text",
4003
+ "type": "text",
4004
+ "primaryKey": false,
4005
+ "notNull": true,
4006
+ "autoincrement": false
4007
+ },
4008
+ "total_chars": {
4009
+ "name": "total_chars",
4010
+ "type": "integer",
4011
+ "primaryKey": false,
4012
+ "notNull": true,
4013
+ "autoincrement": false
4014
+ },
4015
+ "created_at": {
4016
+ "name": "created_at",
4017
+ "type": "integer",
4018
+ "primaryKey": false,
4019
+ "notNull": true,
4020
+ "autoincrement": false
4021
+ }
4022
+ },
4023
+ "indexes": {
4024
+ "tool_result_session_idx": {
4025
+ "name": "tool_result_session_idx",
4026
+ "columns": [
4027
+ "session_id"
4028
+ ],
4029
+ "isUnique": false
4030
+ }
4031
+ },
4032
+ "foreignKeys": {},
4033
+ "compositePrimaryKeys": {},
4034
+ "uniqueConstraints": {},
4035
+ "checkConstraints": {}
4036
+ }
4037
+ },
4038
+ "views": {},
4039
+ "enums": {},
4040
+ "_meta": {
4041
+ "schemas": {},
4042
+ "tables": {},
4043
+ "columns": {}
4044
+ },
4045
+ "internal": {
4046
+ "indexes": {}
4047
+ }
4048
+ }