relavium 0.1.0

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,1988 @@
1
+ {
2
+ "version": "6",
3
+ "dialect": "sqlite",
4
+ "id": "ab5cbf24-8061-468e-b16f-b8ba751ad8d4",
5
+ "prevId": "b746cb45-0fa2-4b58-9b19-0e259b75af22",
6
+ "tables": {
7
+ "agent_sessions": {
8
+ "name": "agent_sessions",
9
+ "columns": {
10
+ "id": {
11
+ "name": "id",
12
+ "type": "text",
13
+ "primaryKey": true,
14
+ "notNull": true,
15
+ "autoincrement": false
16
+ },
17
+ "agent_id": {
18
+ "name": "agent_id",
19
+ "type": "text",
20
+ "primaryKey": false,
21
+ "notNull": false,
22
+ "autoincrement": false
23
+ },
24
+ "agent_slug": {
25
+ "name": "agent_slug",
26
+ "type": "text",
27
+ "primaryKey": false,
28
+ "notNull": true,
29
+ "autoincrement": false
30
+ },
31
+ "agent_snapshot": {
32
+ "name": "agent_snapshot",
33
+ "type": "text",
34
+ "primaryKey": false,
35
+ "notNull": false,
36
+ "autoincrement": false
37
+ },
38
+ "title": {
39
+ "name": "title",
40
+ "type": "text",
41
+ "primaryKey": false,
42
+ "notNull": false,
43
+ "autoincrement": false
44
+ },
45
+ "model_id": {
46
+ "name": "model_id",
47
+ "type": "text",
48
+ "primaryKey": false,
49
+ "notNull": false,
50
+ "autoincrement": false
51
+ },
52
+ "working_dir": {
53
+ "name": "working_dir",
54
+ "type": "text",
55
+ "primaryKey": false,
56
+ "notNull": false,
57
+ "autoincrement": false
58
+ },
59
+ "git_ref": {
60
+ "name": "git_ref",
61
+ "type": "text",
62
+ "primaryKey": false,
63
+ "notNull": false,
64
+ "autoincrement": false
65
+ },
66
+ "fs_scope_tier": {
67
+ "name": "fs_scope_tier",
68
+ "type": "text",
69
+ "primaryKey": false,
70
+ "notNull": true,
71
+ "autoincrement": false,
72
+ "default": "'sandboxed'"
73
+ },
74
+ "status": {
75
+ "name": "status",
76
+ "type": "text",
77
+ "primaryKey": false,
78
+ "notNull": true,
79
+ "autoincrement": false,
80
+ "default": "'active'"
81
+ },
82
+ "context_json": {
83
+ "name": "context_json",
84
+ "type": "text",
85
+ "primaryKey": false,
86
+ "notNull": true,
87
+ "autoincrement": false,
88
+ "default": "'{}'"
89
+ },
90
+ "total_input_tokens": {
91
+ "name": "total_input_tokens",
92
+ "type": "integer",
93
+ "primaryKey": false,
94
+ "notNull": true,
95
+ "autoincrement": false,
96
+ "default": 0
97
+ },
98
+ "total_output_tokens": {
99
+ "name": "total_output_tokens",
100
+ "type": "integer",
101
+ "primaryKey": false,
102
+ "notNull": true,
103
+ "autoincrement": false,
104
+ "default": 0
105
+ },
106
+ "total_cost_microcents": {
107
+ "name": "total_cost_microcents",
108
+ "type": "integer",
109
+ "primaryKey": false,
110
+ "notNull": true,
111
+ "autoincrement": false,
112
+ "default": 0
113
+ },
114
+ "exported_workflow_path": {
115
+ "name": "exported_workflow_path",
116
+ "type": "text",
117
+ "primaryKey": false,
118
+ "notNull": false,
119
+ "autoincrement": false
120
+ },
121
+ "deleted_at": {
122
+ "name": "deleted_at",
123
+ "type": "integer",
124
+ "primaryKey": false,
125
+ "notNull": false,
126
+ "autoincrement": false
127
+ },
128
+ "created_at": {
129
+ "name": "created_at",
130
+ "type": "integer",
131
+ "primaryKey": false,
132
+ "notNull": true,
133
+ "autoincrement": false
134
+ },
135
+ "updated_at": {
136
+ "name": "updated_at",
137
+ "type": "integer",
138
+ "primaryKey": false,
139
+ "notNull": true,
140
+ "autoincrement": false
141
+ }
142
+ },
143
+ "indexes": {
144
+ "idx_agent_sessions_status": {
145
+ "name": "idx_agent_sessions_status",
146
+ "columns": [
147
+ "status",
148
+ "\"updated_at\" desc"
149
+ ],
150
+ "isUnique": false,
151
+ "where": "\"agent_sessions\".\"deleted_at\" is null"
152
+ },
153
+ "idx_agent_sessions_agent": {
154
+ "name": "idx_agent_sessions_agent",
155
+ "columns": [
156
+ "agent_id",
157
+ "\"created_at\" desc"
158
+ ],
159
+ "isUnique": false,
160
+ "where": "\"agent_sessions\".\"agent_id\" is not null"
161
+ }
162
+ },
163
+ "foreignKeys": {
164
+ "agent_sessions_agent_id_agents_id_fk": {
165
+ "name": "agent_sessions_agent_id_agents_id_fk",
166
+ "tableFrom": "agent_sessions",
167
+ "tableTo": "agents",
168
+ "columnsFrom": [
169
+ "agent_id"
170
+ ],
171
+ "columnsTo": [
172
+ "id"
173
+ ],
174
+ "onDelete": "no action",
175
+ "onUpdate": "no action"
176
+ },
177
+ "agent_sessions_model_id_model_catalog_id_fk": {
178
+ "name": "agent_sessions_model_id_model_catalog_id_fk",
179
+ "tableFrom": "agent_sessions",
180
+ "tableTo": "model_catalog",
181
+ "columnsFrom": [
182
+ "model_id"
183
+ ],
184
+ "columnsTo": [
185
+ "id"
186
+ ],
187
+ "onDelete": "no action",
188
+ "onUpdate": "no action"
189
+ }
190
+ },
191
+ "compositePrimaryKeys": {},
192
+ "uniqueConstraints": {},
193
+ "checkConstraints": {
194
+ "agent_sessions_fs_scope_tier_check": {
195
+ "name": "agent_sessions_fs_scope_tier_check",
196
+ "value": "\"agent_sessions\".\"fs_scope_tier\" in ('sandboxed', 'project', 'full')"
197
+ },
198
+ "agent_sessions_status_check": {
199
+ "name": "agent_sessions_status_check",
200
+ "value": "\"agent_sessions\".\"status\" in ('active', 'idle', 'exported', 'ended')"
201
+ }
202
+ }
203
+ },
204
+ "agents": {
205
+ "name": "agents",
206
+ "columns": {
207
+ "id": {
208
+ "name": "id",
209
+ "type": "text",
210
+ "primaryKey": true,
211
+ "notNull": true,
212
+ "autoincrement": false
213
+ },
214
+ "name": {
215
+ "name": "name",
216
+ "type": "text",
217
+ "primaryKey": false,
218
+ "notNull": true,
219
+ "autoincrement": false
220
+ },
221
+ "slug": {
222
+ "name": "slug",
223
+ "type": "text",
224
+ "primaryKey": false,
225
+ "notNull": true,
226
+ "autoincrement": false
227
+ },
228
+ "description": {
229
+ "name": "description",
230
+ "type": "text",
231
+ "primaryKey": false,
232
+ "notNull": false,
233
+ "autoincrement": false
234
+ },
235
+ "model_id": {
236
+ "name": "model_id",
237
+ "type": "text",
238
+ "primaryKey": false,
239
+ "notNull": true,
240
+ "autoincrement": false
241
+ },
242
+ "system_prompt": {
243
+ "name": "system_prompt",
244
+ "type": "text",
245
+ "primaryKey": false,
246
+ "notNull": true,
247
+ "autoincrement": false,
248
+ "default": "''"
249
+ },
250
+ "tools": {
251
+ "name": "tools",
252
+ "type": "text",
253
+ "primaryKey": false,
254
+ "notNull": true,
255
+ "autoincrement": false,
256
+ "default": "'[]'"
257
+ },
258
+ "config": {
259
+ "name": "config",
260
+ "type": "text",
261
+ "primaryKey": false,
262
+ "notNull": true,
263
+ "autoincrement": false,
264
+ "default": "'{}'"
265
+ },
266
+ "input_schema": {
267
+ "name": "input_schema",
268
+ "type": "text",
269
+ "primaryKey": false,
270
+ "notNull": false,
271
+ "autoincrement": false
272
+ },
273
+ "output_schema": {
274
+ "name": "output_schema",
275
+ "type": "text",
276
+ "primaryKey": false,
277
+ "notNull": false,
278
+ "autoincrement": false
279
+ },
280
+ "tags": {
281
+ "name": "tags",
282
+ "type": "text",
283
+ "primaryKey": false,
284
+ "notNull": true,
285
+ "autoincrement": false,
286
+ "default": "'[]'"
287
+ },
288
+ "source_path": {
289
+ "name": "source_path",
290
+ "type": "text",
291
+ "primaryKey": false,
292
+ "notNull": false,
293
+ "autoincrement": false
294
+ },
295
+ "is_active": {
296
+ "name": "is_active",
297
+ "type": "integer",
298
+ "primaryKey": false,
299
+ "notNull": true,
300
+ "autoincrement": false,
301
+ "default": "1"
302
+ },
303
+ "deleted_at": {
304
+ "name": "deleted_at",
305
+ "type": "integer",
306
+ "primaryKey": false,
307
+ "notNull": false,
308
+ "autoincrement": false
309
+ },
310
+ "created_at": {
311
+ "name": "created_at",
312
+ "type": "integer",
313
+ "primaryKey": false,
314
+ "notNull": true,
315
+ "autoincrement": false
316
+ },
317
+ "updated_at": {
318
+ "name": "updated_at",
319
+ "type": "integer",
320
+ "primaryKey": false,
321
+ "notNull": true,
322
+ "autoincrement": false
323
+ }
324
+ },
325
+ "indexes": {
326
+ "idx_agents_slug": {
327
+ "name": "idx_agents_slug",
328
+ "columns": [
329
+ "slug"
330
+ ],
331
+ "isUnique": true,
332
+ "where": "\"agents\".\"deleted_at\" is null"
333
+ },
334
+ "idx_agents_model": {
335
+ "name": "idx_agents_model",
336
+ "columns": [
337
+ "model_id"
338
+ ],
339
+ "isUnique": false
340
+ },
341
+ "idx_agents_active": {
342
+ "name": "idx_agents_active",
343
+ "columns": [
344
+ "is_active",
345
+ "\"created_at\" desc"
346
+ ],
347
+ "isUnique": false,
348
+ "where": "\"agents\".\"deleted_at\" is null"
349
+ }
350
+ },
351
+ "foreignKeys": {
352
+ "agents_model_id_model_catalog_id_fk": {
353
+ "name": "agents_model_id_model_catalog_id_fk",
354
+ "tableFrom": "agents",
355
+ "tableTo": "model_catalog",
356
+ "columnsFrom": [
357
+ "model_id"
358
+ ],
359
+ "columnsTo": [
360
+ "id"
361
+ ],
362
+ "onDelete": "no action",
363
+ "onUpdate": "no action"
364
+ }
365
+ },
366
+ "compositePrimaryKeys": {},
367
+ "uniqueConstraints": {},
368
+ "checkConstraints": {}
369
+ },
370
+ "llm_providers": {
371
+ "name": "llm_providers",
372
+ "columns": {
373
+ "id": {
374
+ "name": "id",
375
+ "type": "text",
376
+ "primaryKey": true,
377
+ "notNull": true,
378
+ "autoincrement": false
379
+ },
380
+ "name": {
381
+ "name": "name",
382
+ "type": "text",
383
+ "primaryKey": false,
384
+ "notNull": true,
385
+ "autoincrement": false
386
+ },
387
+ "display_name": {
388
+ "name": "display_name",
389
+ "type": "text",
390
+ "primaryKey": false,
391
+ "notNull": true,
392
+ "autoincrement": false
393
+ },
394
+ "base_url": {
395
+ "name": "base_url",
396
+ "type": "text",
397
+ "primaryKey": false,
398
+ "notNull": true,
399
+ "autoincrement": false
400
+ },
401
+ "api_key_keychain_ref": {
402
+ "name": "api_key_keychain_ref",
403
+ "type": "text",
404
+ "primaryKey": false,
405
+ "notNull": false,
406
+ "autoincrement": false
407
+ },
408
+ "default_headers": {
409
+ "name": "default_headers",
410
+ "type": "text",
411
+ "primaryKey": false,
412
+ "notNull": true,
413
+ "autoincrement": false,
414
+ "default": "'{}'"
415
+ },
416
+ "is_active": {
417
+ "name": "is_active",
418
+ "type": "integer",
419
+ "primaryKey": false,
420
+ "notNull": true,
421
+ "autoincrement": false,
422
+ "default": "1"
423
+ },
424
+ "deleted_at": {
425
+ "name": "deleted_at",
426
+ "type": "integer",
427
+ "primaryKey": false,
428
+ "notNull": false,
429
+ "autoincrement": false
430
+ },
431
+ "created_at": {
432
+ "name": "created_at",
433
+ "type": "integer",
434
+ "primaryKey": false,
435
+ "notNull": true,
436
+ "autoincrement": false
437
+ },
438
+ "updated_at": {
439
+ "name": "updated_at",
440
+ "type": "integer",
441
+ "primaryKey": false,
442
+ "notNull": true,
443
+ "autoincrement": false
444
+ }
445
+ },
446
+ "indexes": {
447
+ "idx_llm_providers_name": {
448
+ "name": "idx_llm_providers_name",
449
+ "columns": [
450
+ "name"
451
+ ],
452
+ "isUnique": true,
453
+ "where": "\"llm_providers\".\"deleted_at\" is null"
454
+ }
455
+ },
456
+ "foreignKeys": {},
457
+ "compositePrimaryKeys": {},
458
+ "uniqueConstraints": {},
459
+ "checkConstraints": {}
460
+ },
461
+ "media_objects": {
462
+ "name": "media_objects",
463
+ "columns": {
464
+ "id": {
465
+ "name": "id",
466
+ "type": "text",
467
+ "primaryKey": true,
468
+ "notNull": true,
469
+ "autoincrement": false
470
+ },
471
+ "handle": {
472
+ "name": "handle",
473
+ "type": "text",
474
+ "primaryKey": false,
475
+ "notNull": true,
476
+ "autoincrement": false
477
+ },
478
+ "mime_type": {
479
+ "name": "mime_type",
480
+ "type": "text",
481
+ "primaryKey": false,
482
+ "notNull": true,
483
+ "autoincrement": false
484
+ },
485
+ "modality": {
486
+ "name": "modality",
487
+ "type": "text",
488
+ "primaryKey": false,
489
+ "notNull": true,
490
+ "autoincrement": false
491
+ },
492
+ "byte_length": {
493
+ "name": "byte_length",
494
+ "type": "integer",
495
+ "primaryKey": false,
496
+ "notNull": true,
497
+ "autoincrement": false
498
+ },
499
+ "duration_ms": {
500
+ "name": "duration_ms",
501
+ "type": "integer",
502
+ "primaryKey": false,
503
+ "notNull": false,
504
+ "autoincrement": false
505
+ },
506
+ "last_referenced_at": {
507
+ "name": "last_referenced_at",
508
+ "type": "integer",
509
+ "primaryKey": false,
510
+ "notNull": true,
511
+ "autoincrement": false
512
+ },
513
+ "deleted_at": {
514
+ "name": "deleted_at",
515
+ "type": "integer",
516
+ "primaryKey": false,
517
+ "notNull": false,
518
+ "autoincrement": false
519
+ },
520
+ "created_at": {
521
+ "name": "created_at",
522
+ "type": "integer",
523
+ "primaryKey": false,
524
+ "notNull": true,
525
+ "autoincrement": false
526
+ }
527
+ },
528
+ "indexes": {
529
+ "media_objects_handle_unique": {
530
+ "name": "media_objects_handle_unique",
531
+ "columns": [
532
+ "handle"
533
+ ],
534
+ "isUnique": true
535
+ },
536
+ "idx_media_objects_gc": {
537
+ "name": "idx_media_objects_gc",
538
+ "columns": [
539
+ "last_referenced_at"
540
+ ],
541
+ "isUnique": false,
542
+ "where": "\"media_objects\".\"deleted_at\" is null"
543
+ }
544
+ },
545
+ "foreignKeys": {},
546
+ "compositePrimaryKeys": {},
547
+ "uniqueConstraints": {},
548
+ "checkConstraints": {
549
+ "media_objects_modality_check": {
550
+ "name": "media_objects_modality_check",
551
+ "value": "\"media_objects\".\"modality\" in ('image', 'audio', 'video', 'document')"
552
+ }
553
+ }
554
+ },
555
+ "media_references": {
556
+ "name": "media_references",
557
+ "columns": {
558
+ "id": {
559
+ "name": "id",
560
+ "type": "text",
561
+ "primaryKey": true,
562
+ "notNull": true,
563
+ "autoincrement": false
564
+ },
565
+ "handle": {
566
+ "name": "handle",
567
+ "type": "text",
568
+ "primaryKey": false,
569
+ "notNull": true,
570
+ "autoincrement": false
571
+ },
572
+ "scope_kind": {
573
+ "name": "scope_kind",
574
+ "type": "text",
575
+ "primaryKey": false,
576
+ "notNull": true,
577
+ "autoincrement": false
578
+ },
579
+ "scope_id": {
580
+ "name": "scope_id",
581
+ "type": "text",
582
+ "primaryKey": false,
583
+ "notNull": true,
584
+ "autoincrement": false
585
+ },
586
+ "created_at": {
587
+ "name": "created_at",
588
+ "type": "integer",
589
+ "primaryKey": false,
590
+ "notNull": true,
591
+ "autoincrement": false
592
+ }
593
+ },
594
+ "indexes": {
595
+ "idx_media_references_unique": {
596
+ "name": "idx_media_references_unique",
597
+ "columns": [
598
+ "handle",
599
+ "scope_kind",
600
+ "scope_id"
601
+ ],
602
+ "isUnique": true
603
+ },
604
+ "idx_media_references_scope": {
605
+ "name": "idx_media_references_scope",
606
+ "columns": [
607
+ "scope_kind",
608
+ "scope_id"
609
+ ],
610
+ "isUnique": false
611
+ },
612
+ "idx_media_references_handle": {
613
+ "name": "idx_media_references_handle",
614
+ "columns": [
615
+ "handle"
616
+ ],
617
+ "isUnique": false
618
+ }
619
+ },
620
+ "foreignKeys": {
621
+ "media_references_handle_media_objects_handle_fk": {
622
+ "name": "media_references_handle_media_objects_handle_fk",
623
+ "tableFrom": "media_references",
624
+ "tableTo": "media_objects",
625
+ "columnsFrom": [
626
+ "handle"
627
+ ],
628
+ "columnsTo": [
629
+ "handle"
630
+ ],
631
+ "onDelete": "cascade",
632
+ "onUpdate": "no action"
633
+ }
634
+ },
635
+ "compositePrimaryKeys": {},
636
+ "uniqueConstraints": {},
637
+ "checkConstraints": {
638
+ "media_references_scope_kind_check": {
639
+ "name": "media_references_scope_kind_check",
640
+ "value": "\"media_references\".\"scope_kind\" in ('run', 'node', 'session', 'workspace')"
641
+ }
642
+ }
643
+ },
644
+ "messages": {
645
+ "name": "messages",
646
+ "columns": {
647
+ "id": {
648
+ "name": "id",
649
+ "type": "text",
650
+ "primaryKey": true,
651
+ "notNull": true,
652
+ "autoincrement": false
653
+ },
654
+ "step_execution_id": {
655
+ "name": "step_execution_id",
656
+ "type": "text",
657
+ "primaryKey": false,
658
+ "notNull": true,
659
+ "autoincrement": false
660
+ },
661
+ "run_id": {
662
+ "name": "run_id",
663
+ "type": "text",
664
+ "primaryKey": false,
665
+ "notNull": true,
666
+ "autoincrement": false
667
+ },
668
+ "sequence_number": {
669
+ "name": "sequence_number",
670
+ "type": "integer",
671
+ "primaryKey": false,
672
+ "notNull": true,
673
+ "autoincrement": false
674
+ },
675
+ "role": {
676
+ "name": "role",
677
+ "type": "text",
678
+ "primaryKey": false,
679
+ "notNull": true,
680
+ "autoincrement": false
681
+ },
682
+ "content": {
683
+ "name": "content",
684
+ "type": "text",
685
+ "primaryKey": false,
686
+ "notNull": false,
687
+ "autoincrement": false
688
+ },
689
+ "content_parts": {
690
+ "name": "content_parts",
691
+ "type": "text",
692
+ "primaryKey": false,
693
+ "notNull": false,
694
+ "autoincrement": false
695
+ },
696
+ "tool_calls": {
697
+ "name": "tool_calls",
698
+ "type": "text",
699
+ "primaryKey": false,
700
+ "notNull": false,
701
+ "autoincrement": false
702
+ },
703
+ "tool_call_id": {
704
+ "name": "tool_call_id",
705
+ "type": "text",
706
+ "primaryKey": false,
707
+ "notNull": false,
708
+ "autoincrement": false
709
+ },
710
+ "name": {
711
+ "name": "name",
712
+ "type": "text",
713
+ "primaryKey": false,
714
+ "notNull": false,
715
+ "autoincrement": false
716
+ },
717
+ "finish_reason": {
718
+ "name": "finish_reason",
719
+ "type": "text",
720
+ "primaryKey": false,
721
+ "notNull": false,
722
+ "autoincrement": false
723
+ },
724
+ "created_at": {
725
+ "name": "created_at",
726
+ "type": "integer",
727
+ "primaryKey": false,
728
+ "notNull": true,
729
+ "autoincrement": false
730
+ }
731
+ },
732
+ "indexes": {
733
+ "idx_messages_step": {
734
+ "name": "idx_messages_step",
735
+ "columns": [
736
+ "step_execution_id",
737
+ "sequence_number"
738
+ ],
739
+ "isUnique": false
740
+ },
741
+ "idx_messages_run": {
742
+ "name": "idx_messages_run",
743
+ "columns": [
744
+ "run_id",
745
+ "created_at"
746
+ ],
747
+ "isUnique": false
748
+ }
749
+ },
750
+ "foreignKeys": {
751
+ "messages_step_execution_id_step_executions_id_fk": {
752
+ "name": "messages_step_execution_id_step_executions_id_fk",
753
+ "tableFrom": "messages",
754
+ "tableTo": "step_executions",
755
+ "columnsFrom": [
756
+ "step_execution_id"
757
+ ],
758
+ "columnsTo": [
759
+ "id"
760
+ ],
761
+ "onDelete": "cascade",
762
+ "onUpdate": "no action"
763
+ }
764
+ },
765
+ "compositePrimaryKeys": {},
766
+ "uniqueConstraints": {},
767
+ "checkConstraints": {}
768
+ },
769
+ "model_catalog": {
770
+ "name": "model_catalog",
771
+ "columns": {
772
+ "id": {
773
+ "name": "id",
774
+ "type": "text",
775
+ "primaryKey": true,
776
+ "notNull": true,
777
+ "autoincrement": false
778
+ },
779
+ "provider_id": {
780
+ "name": "provider_id",
781
+ "type": "text",
782
+ "primaryKey": false,
783
+ "notNull": true,
784
+ "autoincrement": false
785
+ },
786
+ "model_id": {
787
+ "name": "model_id",
788
+ "type": "text",
789
+ "primaryKey": false,
790
+ "notNull": true,
791
+ "autoincrement": false
792
+ },
793
+ "display_name": {
794
+ "name": "display_name",
795
+ "type": "text",
796
+ "primaryKey": false,
797
+ "notNull": true,
798
+ "autoincrement": false
799
+ },
800
+ "context_window_tokens": {
801
+ "name": "context_window_tokens",
802
+ "type": "integer",
803
+ "primaryKey": false,
804
+ "notNull": true,
805
+ "autoincrement": false
806
+ },
807
+ "max_output_tokens": {
808
+ "name": "max_output_tokens",
809
+ "type": "integer",
810
+ "primaryKey": false,
811
+ "notNull": true,
812
+ "autoincrement": false
813
+ },
814
+ "input_cost_per_mtok_microcents": {
815
+ "name": "input_cost_per_mtok_microcents",
816
+ "type": "integer",
817
+ "primaryKey": false,
818
+ "notNull": true,
819
+ "autoincrement": false,
820
+ "default": 0
821
+ },
822
+ "output_cost_per_mtok_microcents": {
823
+ "name": "output_cost_per_mtok_microcents",
824
+ "type": "integer",
825
+ "primaryKey": false,
826
+ "notNull": true,
827
+ "autoincrement": false,
828
+ "default": 0
829
+ },
830
+ "cached_input_cost_per_mtok_microcents": {
831
+ "name": "cached_input_cost_per_mtok_microcents",
832
+ "type": "integer",
833
+ "primaryKey": false,
834
+ "notNull": true,
835
+ "autoincrement": false,
836
+ "default": 0
837
+ },
838
+ "supports_tool_calling": {
839
+ "name": "supports_tool_calling",
840
+ "type": "integer",
841
+ "primaryKey": false,
842
+ "notNull": true,
843
+ "autoincrement": false,
844
+ "default": "0"
845
+ },
846
+ "supports_vision": {
847
+ "name": "supports_vision",
848
+ "type": "integer",
849
+ "primaryKey": false,
850
+ "notNull": true,
851
+ "autoincrement": false,
852
+ "default": "0"
853
+ },
854
+ "supports_streaming": {
855
+ "name": "supports_streaming",
856
+ "type": "integer",
857
+ "primaryKey": false,
858
+ "notNull": true,
859
+ "autoincrement": false,
860
+ "default": "1"
861
+ },
862
+ "supports_json_mode": {
863
+ "name": "supports_json_mode",
864
+ "type": "integer",
865
+ "primaryKey": false,
866
+ "notNull": true,
867
+ "autoincrement": false,
868
+ "default": "0"
869
+ },
870
+ "capabilities": {
871
+ "name": "capabilities",
872
+ "type": "text",
873
+ "primaryKey": false,
874
+ "notNull": true,
875
+ "autoincrement": false,
876
+ "default": "'{}'"
877
+ },
878
+ "deprecation_date": {
879
+ "name": "deprecation_date",
880
+ "type": "integer",
881
+ "primaryKey": false,
882
+ "notNull": false,
883
+ "autoincrement": false
884
+ },
885
+ "is_active": {
886
+ "name": "is_active",
887
+ "type": "integer",
888
+ "primaryKey": false,
889
+ "notNull": true,
890
+ "autoincrement": false,
891
+ "default": "1"
892
+ },
893
+ "deleted_at": {
894
+ "name": "deleted_at",
895
+ "type": "integer",
896
+ "primaryKey": false,
897
+ "notNull": false,
898
+ "autoincrement": false
899
+ },
900
+ "created_at": {
901
+ "name": "created_at",
902
+ "type": "integer",
903
+ "primaryKey": false,
904
+ "notNull": true,
905
+ "autoincrement": false
906
+ },
907
+ "updated_at": {
908
+ "name": "updated_at",
909
+ "type": "integer",
910
+ "primaryKey": false,
911
+ "notNull": true,
912
+ "autoincrement": false
913
+ }
914
+ },
915
+ "indexes": {
916
+ "idx_model_catalog_provider_model": {
917
+ "name": "idx_model_catalog_provider_model",
918
+ "columns": [
919
+ "provider_id",
920
+ "model_id"
921
+ ],
922
+ "isUnique": true,
923
+ "where": "\"model_catalog\".\"deleted_at\" is null"
924
+ },
925
+ "idx_model_catalog_provider": {
926
+ "name": "idx_model_catalog_provider",
927
+ "columns": [
928
+ "provider_id"
929
+ ],
930
+ "isUnique": false
931
+ },
932
+ "idx_model_catalog_active": {
933
+ "name": "idx_model_catalog_active",
934
+ "columns": [
935
+ "is_active"
936
+ ],
937
+ "isUnique": false,
938
+ "where": "\"model_catalog\".\"deleted_at\" is null"
939
+ }
940
+ },
941
+ "foreignKeys": {
942
+ "model_catalog_provider_id_llm_providers_id_fk": {
943
+ "name": "model_catalog_provider_id_llm_providers_id_fk",
944
+ "tableFrom": "model_catalog",
945
+ "tableTo": "llm_providers",
946
+ "columnsFrom": [
947
+ "provider_id"
948
+ ],
949
+ "columnsTo": [
950
+ "id"
951
+ ],
952
+ "onDelete": "no action",
953
+ "onUpdate": "no action"
954
+ }
955
+ },
956
+ "compositePrimaryKeys": {},
957
+ "uniqueConstraints": {},
958
+ "checkConstraints": {}
959
+ },
960
+ "run_costs": {
961
+ "name": "run_costs",
962
+ "columns": {
963
+ "id": {
964
+ "name": "id",
965
+ "type": "text",
966
+ "primaryKey": true,
967
+ "notNull": true,
968
+ "autoincrement": false
969
+ },
970
+ "run_id": {
971
+ "name": "run_id",
972
+ "type": "text",
973
+ "primaryKey": false,
974
+ "notNull": true,
975
+ "autoincrement": false
976
+ },
977
+ "node_id": {
978
+ "name": "node_id",
979
+ "type": "text",
980
+ "primaryKey": false,
981
+ "notNull": true,
982
+ "autoincrement": false
983
+ },
984
+ "model_id": {
985
+ "name": "model_id",
986
+ "type": "text",
987
+ "primaryKey": false,
988
+ "notNull": false,
989
+ "autoincrement": false
990
+ },
991
+ "input_tokens": {
992
+ "name": "input_tokens",
993
+ "type": "integer",
994
+ "primaryKey": false,
995
+ "notNull": true,
996
+ "autoincrement": false,
997
+ "default": 0
998
+ },
999
+ "output_tokens": {
1000
+ "name": "output_tokens",
1001
+ "type": "integer",
1002
+ "primaryKey": false,
1003
+ "notNull": true,
1004
+ "autoincrement": false,
1005
+ "default": 0
1006
+ },
1007
+ "cost_microcents": {
1008
+ "name": "cost_microcents",
1009
+ "type": "integer",
1010
+ "primaryKey": false,
1011
+ "notNull": true,
1012
+ "autoincrement": false,
1013
+ "default": 0
1014
+ },
1015
+ "created_at": {
1016
+ "name": "created_at",
1017
+ "type": "integer",
1018
+ "primaryKey": false,
1019
+ "notNull": true,
1020
+ "autoincrement": false
1021
+ }
1022
+ },
1023
+ "indexes": {
1024
+ "idx_run_costs_run": {
1025
+ "name": "idx_run_costs_run",
1026
+ "columns": [
1027
+ "run_id"
1028
+ ],
1029
+ "isUnique": false
1030
+ }
1031
+ },
1032
+ "foreignKeys": {
1033
+ "run_costs_run_id_runs_id_fk": {
1034
+ "name": "run_costs_run_id_runs_id_fk",
1035
+ "tableFrom": "run_costs",
1036
+ "tableTo": "runs",
1037
+ "columnsFrom": [
1038
+ "run_id"
1039
+ ],
1040
+ "columnsTo": [
1041
+ "id"
1042
+ ],
1043
+ "onDelete": "cascade",
1044
+ "onUpdate": "no action"
1045
+ },
1046
+ "run_costs_model_id_model_catalog_id_fk": {
1047
+ "name": "run_costs_model_id_model_catalog_id_fk",
1048
+ "tableFrom": "run_costs",
1049
+ "tableTo": "model_catalog",
1050
+ "columnsFrom": [
1051
+ "model_id"
1052
+ ],
1053
+ "columnsTo": [
1054
+ "id"
1055
+ ],
1056
+ "onDelete": "no action",
1057
+ "onUpdate": "no action"
1058
+ }
1059
+ },
1060
+ "compositePrimaryKeys": {},
1061
+ "uniqueConstraints": {},
1062
+ "checkConstraints": {}
1063
+ },
1064
+ "run_events": {
1065
+ "name": "run_events",
1066
+ "columns": {
1067
+ "id": {
1068
+ "name": "id",
1069
+ "type": "text",
1070
+ "primaryKey": true,
1071
+ "notNull": true,
1072
+ "autoincrement": false
1073
+ },
1074
+ "run_id": {
1075
+ "name": "run_id",
1076
+ "type": "text",
1077
+ "primaryKey": false,
1078
+ "notNull": true,
1079
+ "autoincrement": false
1080
+ },
1081
+ "step_execution_id": {
1082
+ "name": "step_execution_id",
1083
+ "type": "text",
1084
+ "primaryKey": false,
1085
+ "notNull": false,
1086
+ "autoincrement": false
1087
+ },
1088
+ "seq": {
1089
+ "name": "seq",
1090
+ "type": "integer",
1091
+ "primaryKey": false,
1092
+ "notNull": true,
1093
+ "autoincrement": false
1094
+ },
1095
+ "event_type": {
1096
+ "name": "event_type",
1097
+ "type": "text",
1098
+ "primaryKey": false,
1099
+ "notNull": true,
1100
+ "autoincrement": false
1101
+ },
1102
+ "level": {
1103
+ "name": "level",
1104
+ "type": "text",
1105
+ "primaryKey": false,
1106
+ "notNull": true,
1107
+ "autoincrement": false,
1108
+ "default": "'info'"
1109
+ },
1110
+ "node_id": {
1111
+ "name": "node_id",
1112
+ "type": "text",
1113
+ "primaryKey": false,
1114
+ "notNull": false,
1115
+ "autoincrement": false
1116
+ },
1117
+ "payload_json": {
1118
+ "name": "payload_json",
1119
+ "type": "text",
1120
+ "primaryKey": false,
1121
+ "notNull": true,
1122
+ "autoincrement": false,
1123
+ "default": "'{}'"
1124
+ },
1125
+ "ts": {
1126
+ "name": "ts",
1127
+ "type": "integer",
1128
+ "primaryKey": false,
1129
+ "notNull": true,
1130
+ "autoincrement": false
1131
+ }
1132
+ },
1133
+ "indexes": {
1134
+ "idx_run_events_run_seq": {
1135
+ "name": "idx_run_events_run_seq",
1136
+ "columns": [
1137
+ "run_id",
1138
+ "seq"
1139
+ ],
1140
+ "isUnique": true
1141
+ },
1142
+ "idx_run_events_step": {
1143
+ "name": "idx_run_events_step",
1144
+ "columns": [
1145
+ "step_execution_id",
1146
+ "ts"
1147
+ ],
1148
+ "isUnique": false,
1149
+ "where": "\"run_events\".\"step_execution_id\" is not null"
1150
+ },
1151
+ "idx_run_events_run_type": {
1152
+ "name": "idx_run_events_run_type",
1153
+ "columns": [
1154
+ "run_id",
1155
+ "event_type",
1156
+ "ts"
1157
+ ],
1158
+ "isUnique": false
1159
+ }
1160
+ },
1161
+ "foreignKeys": {
1162
+ "run_events_run_id_runs_id_fk": {
1163
+ "name": "run_events_run_id_runs_id_fk",
1164
+ "tableFrom": "run_events",
1165
+ "tableTo": "runs",
1166
+ "columnsFrom": [
1167
+ "run_id"
1168
+ ],
1169
+ "columnsTo": [
1170
+ "id"
1171
+ ],
1172
+ "onDelete": "cascade",
1173
+ "onUpdate": "no action"
1174
+ }
1175
+ },
1176
+ "compositePrimaryKeys": {},
1177
+ "uniqueConstraints": {},
1178
+ "checkConstraints": {}
1179
+ },
1180
+ "runs": {
1181
+ "name": "runs",
1182
+ "columns": {
1183
+ "id": {
1184
+ "name": "id",
1185
+ "type": "text",
1186
+ "primaryKey": true,
1187
+ "notNull": true,
1188
+ "autoincrement": false
1189
+ },
1190
+ "workflow_id": {
1191
+ "name": "workflow_id",
1192
+ "type": "text",
1193
+ "primaryKey": false,
1194
+ "notNull": true,
1195
+ "autoincrement": false
1196
+ },
1197
+ "workflow_path": {
1198
+ "name": "workflow_path",
1199
+ "type": "text",
1200
+ "primaryKey": false,
1201
+ "notNull": false,
1202
+ "autoincrement": false
1203
+ },
1204
+ "project_root": {
1205
+ "name": "project_root",
1206
+ "type": "text",
1207
+ "primaryKey": false,
1208
+ "notNull": false,
1209
+ "autoincrement": false
1210
+ },
1211
+ "workflow_definition_snapshot": {
1212
+ "name": "workflow_definition_snapshot",
1213
+ "type": "text",
1214
+ "primaryKey": false,
1215
+ "notNull": true,
1216
+ "autoincrement": false
1217
+ },
1218
+ "status": {
1219
+ "name": "status",
1220
+ "type": "text",
1221
+ "primaryKey": false,
1222
+ "notNull": true,
1223
+ "autoincrement": false,
1224
+ "default": "'pending'"
1225
+ },
1226
+ "execution_mode": {
1227
+ "name": "execution_mode",
1228
+ "type": "text",
1229
+ "primaryKey": false,
1230
+ "notNull": true,
1231
+ "autoincrement": false,
1232
+ "default": "'local'"
1233
+ },
1234
+ "trigger_type": {
1235
+ "name": "trigger_type",
1236
+ "type": "text",
1237
+ "primaryKey": false,
1238
+ "notNull": true,
1239
+ "autoincrement": false,
1240
+ "default": "'manual'"
1241
+ },
1242
+ "trigger_metadata": {
1243
+ "name": "trigger_metadata",
1244
+ "type": "text",
1245
+ "primaryKey": false,
1246
+ "notNull": true,
1247
+ "autoincrement": false,
1248
+ "default": "'{}'"
1249
+ },
1250
+ "input_json": {
1251
+ "name": "input_json",
1252
+ "type": "text",
1253
+ "primaryKey": false,
1254
+ "notNull": true,
1255
+ "autoincrement": false,
1256
+ "default": "'{}'"
1257
+ },
1258
+ "output_json": {
1259
+ "name": "output_json",
1260
+ "type": "text",
1261
+ "primaryKey": false,
1262
+ "notNull": false,
1263
+ "autoincrement": false
1264
+ },
1265
+ "error_json": {
1266
+ "name": "error_json",
1267
+ "type": "text",
1268
+ "primaryKey": false,
1269
+ "notNull": false,
1270
+ "autoincrement": false
1271
+ },
1272
+ "started_at": {
1273
+ "name": "started_at",
1274
+ "type": "integer",
1275
+ "primaryKey": false,
1276
+ "notNull": false,
1277
+ "autoincrement": false
1278
+ },
1279
+ "completed_at": {
1280
+ "name": "completed_at",
1281
+ "type": "integer",
1282
+ "primaryKey": false,
1283
+ "notNull": false,
1284
+ "autoincrement": false
1285
+ },
1286
+ "total_input_tokens": {
1287
+ "name": "total_input_tokens",
1288
+ "type": "integer",
1289
+ "primaryKey": false,
1290
+ "notNull": true,
1291
+ "autoincrement": false,
1292
+ "default": 0
1293
+ },
1294
+ "total_output_tokens": {
1295
+ "name": "total_output_tokens",
1296
+ "type": "integer",
1297
+ "primaryKey": false,
1298
+ "notNull": true,
1299
+ "autoincrement": false,
1300
+ "default": 0
1301
+ },
1302
+ "total_cost_microcents": {
1303
+ "name": "total_cost_microcents",
1304
+ "type": "integer",
1305
+ "primaryKey": false,
1306
+ "notNull": true,
1307
+ "autoincrement": false,
1308
+ "default": 0
1309
+ },
1310
+ "deleted_at": {
1311
+ "name": "deleted_at",
1312
+ "type": "integer",
1313
+ "primaryKey": false,
1314
+ "notNull": false,
1315
+ "autoincrement": false
1316
+ },
1317
+ "created_at": {
1318
+ "name": "created_at",
1319
+ "type": "integer",
1320
+ "primaryKey": false,
1321
+ "notNull": true,
1322
+ "autoincrement": false
1323
+ },
1324
+ "updated_at": {
1325
+ "name": "updated_at",
1326
+ "type": "integer",
1327
+ "primaryKey": false,
1328
+ "notNull": true,
1329
+ "autoincrement": false
1330
+ }
1331
+ },
1332
+ "indexes": {
1333
+ "idx_runs_workflow": {
1334
+ "name": "idx_runs_workflow",
1335
+ "columns": [
1336
+ "workflow_id",
1337
+ "\"created_at\" desc"
1338
+ ],
1339
+ "isUnique": false
1340
+ },
1341
+ "idx_runs_status": {
1342
+ "name": "idx_runs_status",
1343
+ "columns": [
1344
+ "status",
1345
+ "\"created_at\" desc"
1346
+ ],
1347
+ "isUnique": false,
1348
+ "where": "\"runs\".\"deleted_at\" is null"
1349
+ },
1350
+ "idx_runs_cost": {
1351
+ "name": "idx_runs_cost",
1352
+ "columns": [
1353
+ "workflow_id",
1354
+ "created_at",
1355
+ "total_cost_microcents"
1356
+ ],
1357
+ "isUnique": false,
1358
+ "where": "\"runs\".\"deleted_at\" is null"
1359
+ }
1360
+ },
1361
+ "foreignKeys": {
1362
+ "runs_workflow_id_workflows_id_fk": {
1363
+ "name": "runs_workflow_id_workflows_id_fk",
1364
+ "tableFrom": "runs",
1365
+ "tableTo": "workflows",
1366
+ "columnsFrom": [
1367
+ "workflow_id"
1368
+ ],
1369
+ "columnsTo": [
1370
+ "id"
1371
+ ],
1372
+ "onDelete": "no action",
1373
+ "onUpdate": "no action"
1374
+ }
1375
+ },
1376
+ "compositePrimaryKeys": {},
1377
+ "uniqueConstraints": {},
1378
+ "checkConstraints": {
1379
+ "runs_status_check": {
1380
+ "name": "runs_status_check",
1381
+ "value": "\"runs\".\"status\" in ('pending', 'running', 'paused', 'completed', 'failed', 'cancelled')"
1382
+ },
1383
+ "runs_execution_mode_check": {
1384
+ "name": "runs_execution_mode_check",
1385
+ "value": "\"runs\".\"execution_mode\" in ('local', 'cloud', 'managed')"
1386
+ }
1387
+ }
1388
+ },
1389
+ "session_messages": {
1390
+ "name": "session_messages",
1391
+ "columns": {
1392
+ "id": {
1393
+ "name": "id",
1394
+ "type": "text",
1395
+ "primaryKey": true,
1396
+ "notNull": true,
1397
+ "autoincrement": false
1398
+ },
1399
+ "session_id": {
1400
+ "name": "session_id",
1401
+ "type": "text",
1402
+ "primaryKey": false,
1403
+ "notNull": true,
1404
+ "autoincrement": false
1405
+ },
1406
+ "sequence_number": {
1407
+ "name": "sequence_number",
1408
+ "type": "integer",
1409
+ "primaryKey": false,
1410
+ "notNull": true,
1411
+ "autoincrement": false
1412
+ },
1413
+ "role": {
1414
+ "name": "role",
1415
+ "type": "text",
1416
+ "primaryKey": false,
1417
+ "notNull": true,
1418
+ "autoincrement": false
1419
+ },
1420
+ "content": {
1421
+ "name": "content",
1422
+ "type": "text",
1423
+ "primaryKey": false,
1424
+ "notNull": false,
1425
+ "autoincrement": false
1426
+ },
1427
+ "content_parts": {
1428
+ "name": "content_parts",
1429
+ "type": "text",
1430
+ "primaryKey": false,
1431
+ "notNull": false,
1432
+ "autoincrement": false
1433
+ },
1434
+ "tool_calls": {
1435
+ "name": "tool_calls",
1436
+ "type": "text",
1437
+ "primaryKey": false,
1438
+ "notNull": false,
1439
+ "autoincrement": false
1440
+ },
1441
+ "tool_call_id": {
1442
+ "name": "tool_call_id",
1443
+ "type": "text",
1444
+ "primaryKey": false,
1445
+ "notNull": false,
1446
+ "autoincrement": false
1447
+ },
1448
+ "name": {
1449
+ "name": "name",
1450
+ "type": "text",
1451
+ "primaryKey": false,
1452
+ "notNull": false,
1453
+ "autoincrement": false
1454
+ },
1455
+ "finish_reason": {
1456
+ "name": "finish_reason",
1457
+ "type": "text",
1458
+ "primaryKey": false,
1459
+ "notNull": false,
1460
+ "autoincrement": false
1461
+ },
1462
+ "model_id": {
1463
+ "name": "model_id",
1464
+ "type": "text",
1465
+ "primaryKey": false,
1466
+ "notNull": false,
1467
+ "autoincrement": false
1468
+ },
1469
+ "input_tokens": {
1470
+ "name": "input_tokens",
1471
+ "type": "integer",
1472
+ "primaryKey": false,
1473
+ "notNull": true,
1474
+ "autoincrement": false,
1475
+ "default": 0
1476
+ },
1477
+ "output_tokens": {
1478
+ "name": "output_tokens",
1479
+ "type": "integer",
1480
+ "primaryKey": false,
1481
+ "notNull": true,
1482
+ "autoincrement": false,
1483
+ "default": 0
1484
+ },
1485
+ "cost_microcents": {
1486
+ "name": "cost_microcents",
1487
+ "type": "integer",
1488
+ "primaryKey": false,
1489
+ "notNull": true,
1490
+ "autoincrement": false,
1491
+ "default": 0
1492
+ },
1493
+ "created_at": {
1494
+ "name": "created_at",
1495
+ "type": "integer",
1496
+ "primaryKey": false,
1497
+ "notNull": true,
1498
+ "autoincrement": false
1499
+ }
1500
+ },
1501
+ "indexes": {
1502
+ "idx_session_messages_seq": {
1503
+ "name": "idx_session_messages_seq",
1504
+ "columns": [
1505
+ "session_id",
1506
+ "sequence_number"
1507
+ ],
1508
+ "isUnique": true
1509
+ },
1510
+ "idx_session_messages_session": {
1511
+ "name": "idx_session_messages_session",
1512
+ "columns": [
1513
+ "session_id",
1514
+ "created_at"
1515
+ ],
1516
+ "isUnique": false
1517
+ }
1518
+ },
1519
+ "foreignKeys": {
1520
+ "session_messages_session_id_agent_sessions_id_fk": {
1521
+ "name": "session_messages_session_id_agent_sessions_id_fk",
1522
+ "tableFrom": "session_messages",
1523
+ "tableTo": "agent_sessions",
1524
+ "columnsFrom": [
1525
+ "session_id"
1526
+ ],
1527
+ "columnsTo": [
1528
+ "id"
1529
+ ],
1530
+ "onDelete": "cascade",
1531
+ "onUpdate": "no action"
1532
+ },
1533
+ "session_messages_model_id_model_catalog_id_fk": {
1534
+ "name": "session_messages_model_id_model_catalog_id_fk",
1535
+ "tableFrom": "session_messages",
1536
+ "tableTo": "model_catalog",
1537
+ "columnsFrom": [
1538
+ "model_id"
1539
+ ],
1540
+ "columnsTo": [
1541
+ "id"
1542
+ ],
1543
+ "onDelete": "no action",
1544
+ "onUpdate": "no action"
1545
+ }
1546
+ },
1547
+ "compositePrimaryKeys": {},
1548
+ "uniqueConstraints": {},
1549
+ "checkConstraints": {}
1550
+ },
1551
+ "step_executions": {
1552
+ "name": "step_executions",
1553
+ "columns": {
1554
+ "id": {
1555
+ "name": "id",
1556
+ "type": "text",
1557
+ "primaryKey": true,
1558
+ "notNull": true,
1559
+ "autoincrement": false
1560
+ },
1561
+ "run_id": {
1562
+ "name": "run_id",
1563
+ "type": "text",
1564
+ "primaryKey": false,
1565
+ "notNull": true,
1566
+ "autoincrement": false
1567
+ },
1568
+ "node_id": {
1569
+ "name": "node_id",
1570
+ "type": "text",
1571
+ "primaryKey": false,
1572
+ "notNull": true,
1573
+ "autoincrement": false
1574
+ },
1575
+ "node_type": {
1576
+ "name": "node_type",
1577
+ "type": "text",
1578
+ "primaryKey": false,
1579
+ "notNull": true,
1580
+ "autoincrement": false
1581
+ },
1582
+ "agent_id": {
1583
+ "name": "agent_id",
1584
+ "type": "text",
1585
+ "primaryKey": false,
1586
+ "notNull": false,
1587
+ "autoincrement": false
1588
+ },
1589
+ "agent_snapshot": {
1590
+ "name": "agent_snapshot",
1591
+ "type": "text",
1592
+ "primaryKey": false,
1593
+ "notNull": false,
1594
+ "autoincrement": false
1595
+ },
1596
+ "model_id": {
1597
+ "name": "model_id",
1598
+ "type": "text",
1599
+ "primaryKey": false,
1600
+ "notNull": false,
1601
+ "autoincrement": false
1602
+ },
1603
+ "attempt_number": {
1604
+ "name": "attempt_number",
1605
+ "type": "integer",
1606
+ "primaryKey": false,
1607
+ "notNull": true,
1608
+ "autoincrement": false,
1609
+ "default": 1
1610
+ },
1611
+ "status": {
1612
+ "name": "status",
1613
+ "type": "text",
1614
+ "primaryKey": false,
1615
+ "notNull": true,
1616
+ "autoincrement": false,
1617
+ "default": "'pending'"
1618
+ },
1619
+ "input_json": {
1620
+ "name": "input_json",
1621
+ "type": "text",
1622
+ "primaryKey": false,
1623
+ "notNull": true,
1624
+ "autoincrement": false,
1625
+ "default": "'{}'"
1626
+ },
1627
+ "output_json": {
1628
+ "name": "output_json",
1629
+ "type": "text",
1630
+ "primaryKey": false,
1631
+ "notNull": false,
1632
+ "autoincrement": false
1633
+ },
1634
+ "error_json": {
1635
+ "name": "error_json",
1636
+ "type": "text",
1637
+ "primaryKey": false,
1638
+ "notNull": false,
1639
+ "autoincrement": false
1640
+ },
1641
+ "started_at": {
1642
+ "name": "started_at",
1643
+ "type": "integer",
1644
+ "primaryKey": false,
1645
+ "notNull": false,
1646
+ "autoincrement": false
1647
+ },
1648
+ "completed_at": {
1649
+ "name": "completed_at",
1650
+ "type": "integer",
1651
+ "primaryKey": false,
1652
+ "notNull": false,
1653
+ "autoincrement": false
1654
+ },
1655
+ "duration_ms": {
1656
+ "name": "duration_ms",
1657
+ "type": "integer",
1658
+ "primaryKey": false,
1659
+ "notNull": false,
1660
+ "autoincrement": false
1661
+ },
1662
+ "input_tokens": {
1663
+ "name": "input_tokens",
1664
+ "type": "integer",
1665
+ "primaryKey": false,
1666
+ "notNull": true,
1667
+ "autoincrement": false,
1668
+ "default": 0
1669
+ },
1670
+ "output_tokens": {
1671
+ "name": "output_tokens",
1672
+ "type": "integer",
1673
+ "primaryKey": false,
1674
+ "notNull": true,
1675
+ "autoincrement": false,
1676
+ "default": 0
1677
+ },
1678
+ "cached_tokens": {
1679
+ "name": "cached_tokens",
1680
+ "type": "integer",
1681
+ "primaryKey": false,
1682
+ "notNull": true,
1683
+ "autoincrement": false,
1684
+ "default": 0
1685
+ },
1686
+ "cost_microcents": {
1687
+ "name": "cost_microcents",
1688
+ "type": "integer",
1689
+ "primaryKey": false,
1690
+ "notNull": true,
1691
+ "autoincrement": false,
1692
+ "default": 0
1693
+ },
1694
+ "created_at": {
1695
+ "name": "created_at",
1696
+ "type": "integer",
1697
+ "primaryKey": false,
1698
+ "notNull": true,
1699
+ "autoincrement": false
1700
+ },
1701
+ "updated_at": {
1702
+ "name": "updated_at",
1703
+ "type": "integer",
1704
+ "primaryKey": false,
1705
+ "notNull": true,
1706
+ "autoincrement": false
1707
+ }
1708
+ },
1709
+ "indexes": {
1710
+ "idx_step_exec_run": {
1711
+ "name": "idx_step_exec_run",
1712
+ "columns": [
1713
+ "run_id",
1714
+ "created_at"
1715
+ ],
1716
+ "isUnique": false
1717
+ },
1718
+ "idx_step_exec_run_node": {
1719
+ "name": "idx_step_exec_run_node",
1720
+ "columns": [
1721
+ "run_id",
1722
+ "node_id",
1723
+ "attempt_number"
1724
+ ],
1725
+ "isUnique": false
1726
+ },
1727
+ "idx_step_exec_agent": {
1728
+ "name": "idx_step_exec_agent",
1729
+ "columns": [
1730
+ "agent_id",
1731
+ "\"created_at\" desc"
1732
+ ],
1733
+ "isUnique": false,
1734
+ "where": "\"step_executions\".\"agent_id\" is not null"
1735
+ },
1736
+ "idx_step_exec_model": {
1737
+ "name": "idx_step_exec_model",
1738
+ "columns": [
1739
+ "model_id",
1740
+ "\"created_at\" desc"
1741
+ ],
1742
+ "isUnique": false,
1743
+ "where": "\"step_executions\".\"model_id\" is not null"
1744
+ },
1745
+ "idx_step_exec_cost": {
1746
+ "name": "idx_step_exec_cost",
1747
+ "columns": [
1748
+ "model_id",
1749
+ "created_at",
1750
+ "cost_microcents"
1751
+ ],
1752
+ "isUnique": false,
1753
+ "where": "\"step_executions\".\"model_id\" is not null"
1754
+ }
1755
+ },
1756
+ "foreignKeys": {
1757
+ "step_executions_run_id_runs_id_fk": {
1758
+ "name": "step_executions_run_id_runs_id_fk",
1759
+ "tableFrom": "step_executions",
1760
+ "tableTo": "runs",
1761
+ "columnsFrom": [
1762
+ "run_id"
1763
+ ],
1764
+ "columnsTo": [
1765
+ "id"
1766
+ ],
1767
+ "onDelete": "cascade",
1768
+ "onUpdate": "no action"
1769
+ },
1770
+ "step_executions_agent_id_agents_id_fk": {
1771
+ "name": "step_executions_agent_id_agents_id_fk",
1772
+ "tableFrom": "step_executions",
1773
+ "tableTo": "agents",
1774
+ "columnsFrom": [
1775
+ "agent_id"
1776
+ ],
1777
+ "columnsTo": [
1778
+ "id"
1779
+ ],
1780
+ "onDelete": "no action",
1781
+ "onUpdate": "no action"
1782
+ },
1783
+ "step_executions_model_id_model_catalog_id_fk": {
1784
+ "name": "step_executions_model_id_model_catalog_id_fk",
1785
+ "tableFrom": "step_executions",
1786
+ "tableTo": "model_catalog",
1787
+ "columnsFrom": [
1788
+ "model_id"
1789
+ ],
1790
+ "columnsTo": [
1791
+ "id"
1792
+ ],
1793
+ "onDelete": "no action",
1794
+ "onUpdate": "no action"
1795
+ }
1796
+ },
1797
+ "compositePrimaryKeys": {},
1798
+ "uniqueConstraints": {},
1799
+ "checkConstraints": {
1800
+ "step_executions_status_check": {
1801
+ "name": "step_executions_status_check",
1802
+ "value": "\"step_executions\".\"status\" in ('pending', 'running', 'completed', 'failed', 'skipped')"
1803
+ }
1804
+ }
1805
+ },
1806
+ "workflows": {
1807
+ "name": "workflows",
1808
+ "columns": {
1809
+ "id": {
1810
+ "name": "id",
1811
+ "type": "text",
1812
+ "primaryKey": true,
1813
+ "notNull": true,
1814
+ "autoincrement": false
1815
+ },
1816
+ "name": {
1817
+ "name": "name",
1818
+ "type": "text",
1819
+ "primaryKey": false,
1820
+ "notNull": true,
1821
+ "autoincrement": false
1822
+ },
1823
+ "slug": {
1824
+ "name": "slug",
1825
+ "type": "text",
1826
+ "primaryKey": false,
1827
+ "notNull": true,
1828
+ "autoincrement": false
1829
+ },
1830
+ "description": {
1831
+ "name": "description",
1832
+ "type": "text",
1833
+ "primaryKey": false,
1834
+ "notNull": false,
1835
+ "autoincrement": false
1836
+ },
1837
+ "definition": {
1838
+ "name": "definition",
1839
+ "type": "text",
1840
+ "primaryKey": false,
1841
+ "notNull": true,
1842
+ "autoincrement": false
1843
+ },
1844
+ "input_schema": {
1845
+ "name": "input_schema",
1846
+ "type": "text",
1847
+ "primaryKey": false,
1848
+ "notNull": false,
1849
+ "autoincrement": false
1850
+ },
1851
+ "tags": {
1852
+ "name": "tags",
1853
+ "type": "text",
1854
+ "primaryKey": false,
1855
+ "notNull": true,
1856
+ "autoincrement": false,
1857
+ "default": "'[]'"
1858
+ },
1859
+ "source_path": {
1860
+ "name": "source_path",
1861
+ "type": "text",
1862
+ "primaryKey": false,
1863
+ "notNull": false,
1864
+ "autoincrement": false
1865
+ },
1866
+ "is_active": {
1867
+ "name": "is_active",
1868
+ "type": "integer",
1869
+ "primaryKey": false,
1870
+ "notNull": true,
1871
+ "autoincrement": false,
1872
+ "default": "1"
1873
+ },
1874
+ "deleted_at": {
1875
+ "name": "deleted_at",
1876
+ "type": "integer",
1877
+ "primaryKey": false,
1878
+ "notNull": false,
1879
+ "autoincrement": false
1880
+ },
1881
+ "created_at": {
1882
+ "name": "created_at",
1883
+ "type": "integer",
1884
+ "primaryKey": false,
1885
+ "notNull": true,
1886
+ "autoincrement": false
1887
+ },
1888
+ "updated_at": {
1889
+ "name": "updated_at",
1890
+ "type": "integer",
1891
+ "primaryKey": false,
1892
+ "notNull": true,
1893
+ "autoincrement": false
1894
+ }
1895
+ },
1896
+ "indexes": {
1897
+ "idx_workflows_slug": {
1898
+ "name": "idx_workflows_slug",
1899
+ "columns": [
1900
+ "slug"
1901
+ ],
1902
+ "isUnique": true,
1903
+ "where": "\"workflows\".\"deleted_at\" is null"
1904
+ },
1905
+ "idx_workflows_active": {
1906
+ "name": "idx_workflows_active",
1907
+ "columns": [
1908
+ "is_active",
1909
+ "\"updated_at\" desc"
1910
+ ],
1911
+ "isUnique": false,
1912
+ "where": "\"workflows\".\"deleted_at\" is null"
1913
+ }
1914
+ },
1915
+ "foreignKeys": {},
1916
+ "compositePrimaryKeys": {},
1917
+ "uniqueConstraints": {},
1918
+ "checkConstraints": {}
1919
+ }
1920
+ },
1921
+ "views": {},
1922
+ "enums": {},
1923
+ "_meta": {
1924
+ "schemas": {},
1925
+ "tables": {},
1926
+ "columns": {}
1927
+ },
1928
+ "internal": {
1929
+ "indexes": {
1930
+ "idx_agent_sessions_status": {
1931
+ "columns": {
1932
+ "\"updated_at\" desc": {
1933
+ "isExpression": true
1934
+ }
1935
+ }
1936
+ },
1937
+ "idx_agent_sessions_agent": {
1938
+ "columns": {
1939
+ "\"created_at\" desc": {
1940
+ "isExpression": true
1941
+ }
1942
+ }
1943
+ },
1944
+ "idx_agents_active": {
1945
+ "columns": {
1946
+ "\"created_at\" desc": {
1947
+ "isExpression": true
1948
+ }
1949
+ }
1950
+ },
1951
+ "idx_runs_workflow": {
1952
+ "columns": {
1953
+ "\"created_at\" desc": {
1954
+ "isExpression": true
1955
+ }
1956
+ }
1957
+ },
1958
+ "idx_runs_status": {
1959
+ "columns": {
1960
+ "\"created_at\" desc": {
1961
+ "isExpression": true
1962
+ }
1963
+ }
1964
+ },
1965
+ "idx_step_exec_agent": {
1966
+ "columns": {
1967
+ "\"created_at\" desc": {
1968
+ "isExpression": true
1969
+ }
1970
+ }
1971
+ },
1972
+ "idx_step_exec_model": {
1973
+ "columns": {
1974
+ "\"created_at\" desc": {
1975
+ "isExpression": true
1976
+ }
1977
+ }
1978
+ },
1979
+ "idx_workflows_active": {
1980
+ "columns": {
1981
+ "\"updated_at\" desc": {
1982
+ "isExpression": true
1983
+ }
1984
+ }
1985
+ }
1986
+ }
1987
+ }
1988
+ }