@rzx/ohs 1.1.16 → 1.1.17

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