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,2017 @@
1
+ {
2
+ "version": "6",
3
+ "dialect": "sqlite",
4
+ "id": "22f9aac7-a71c-499d-b523-f213fe371acb",
5
+ "prevId": "0dd3b0a4-a3e3-40c2-b471-19a2a4151130",
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
+ "media_image_cost_microcents": {
839
+ "name": "media_image_cost_microcents",
840
+ "type": "integer",
841
+ "primaryKey": false,
842
+ "notNull": false,
843
+ "autoincrement": false
844
+ },
845
+ "media_audio_cost_microcents": {
846
+ "name": "media_audio_cost_microcents",
847
+ "type": "integer",
848
+ "primaryKey": false,
849
+ "notNull": false,
850
+ "autoincrement": false
851
+ },
852
+ "media_video_cost_microcents": {
853
+ "name": "media_video_cost_microcents",
854
+ "type": "integer",
855
+ "primaryKey": false,
856
+ "notNull": false,
857
+ "autoincrement": false
858
+ },
859
+ "media_surface": {
860
+ "name": "media_surface",
861
+ "type": "text",
862
+ "primaryKey": false,
863
+ "notNull": true,
864
+ "autoincrement": false,
865
+ "default": "'chat'"
866
+ },
867
+ "supports_tool_calling": {
868
+ "name": "supports_tool_calling",
869
+ "type": "integer",
870
+ "primaryKey": false,
871
+ "notNull": true,
872
+ "autoincrement": false,
873
+ "default": "0"
874
+ },
875
+ "supports_vision": {
876
+ "name": "supports_vision",
877
+ "type": "integer",
878
+ "primaryKey": false,
879
+ "notNull": true,
880
+ "autoincrement": false,
881
+ "default": "0"
882
+ },
883
+ "supports_streaming": {
884
+ "name": "supports_streaming",
885
+ "type": "integer",
886
+ "primaryKey": false,
887
+ "notNull": true,
888
+ "autoincrement": false,
889
+ "default": "1"
890
+ },
891
+ "supports_json_mode": {
892
+ "name": "supports_json_mode",
893
+ "type": "integer",
894
+ "primaryKey": false,
895
+ "notNull": true,
896
+ "autoincrement": false,
897
+ "default": "0"
898
+ },
899
+ "capabilities": {
900
+ "name": "capabilities",
901
+ "type": "text",
902
+ "primaryKey": false,
903
+ "notNull": true,
904
+ "autoincrement": false,
905
+ "default": "'{}'"
906
+ },
907
+ "deprecation_date": {
908
+ "name": "deprecation_date",
909
+ "type": "integer",
910
+ "primaryKey": false,
911
+ "notNull": false,
912
+ "autoincrement": false
913
+ },
914
+ "is_active": {
915
+ "name": "is_active",
916
+ "type": "integer",
917
+ "primaryKey": false,
918
+ "notNull": true,
919
+ "autoincrement": false,
920
+ "default": "1"
921
+ },
922
+ "deleted_at": {
923
+ "name": "deleted_at",
924
+ "type": "integer",
925
+ "primaryKey": false,
926
+ "notNull": false,
927
+ "autoincrement": false
928
+ },
929
+ "created_at": {
930
+ "name": "created_at",
931
+ "type": "integer",
932
+ "primaryKey": false,
933
+ "notNull": true,
934
+ "autoincrement": false
935
+ },
936
+ "updated_at": {
937
+ "name": "updated_at",
938
+ "type": "integer",
939
+ "primaryKey": false,
940
+ "notNull": true,
941
+ "autoincrement": false
942
+ }
943
+ },
944
+ "indexes": {
945
+ "idx_model_catalog_provider_model": {
946
+ "name": "idx_model_catalog_provider_model",
947
+ "columns": [
948
+ "provider_id",
949
+ "model_id"
950
+ ],
951
+ "isUnique": true,
952
+ "where": "\"model_catalog\".\"deleted_at\" is null"
953
+ },
954
+ "idx_model_catalog_provider": {
955
+ "name": "idx_model_catalog_provider",
956
+ "columns": [
957
+ "provider_id"
958
+ ],
959
+ "isUnique": false
960
+ },
961
+ "idx_model_catalog_active": {
962
+ "name": "idx_model_catalog_active",
963
+ "columns": [
964
+ "is_active"
965
+ ],
966
+ "isUnique": false,
967
+ "where": "\"model_catalog\".\"deleted_at\" is null"
968
+ }
969
+ },
970
+ "foreignKeys": {
971
+ "model_catalog_provider_id_llm_providers_id_fk": {
972
+ "name": "model_catalog_provider_id_llm_providers_id_fk",
973
+ "tableFrom": "model_catalog",
974
+ "tableTo": "llm_providers",
975
+ "columnsFrom": [
976
+ "provider_id"
977
+ ],
978
+ "columnsTo": [
979
+ "id"
980
+ ],
981
+ "onDelete": "no action",
982
+ "onUpdate": "no action"
983
+ }
984
+ },
985
+ "compositePrimaryKeys": {},
986
+ "uniqueConstraints": {},
987
+ "checkConstraints": {}
988
+ },
989
+ "run_costs": {
990
+ "name": "run_costs",
991
+ "columns": {
992
+ "id": {
993
+ "name": "id",
994
+ "type": "text",
995
+ "primaryKey": true,
996
+ "notNull": true,
997
+ "autoincrement": false
998
+ },
999
+ "run_id": {
1000
+ "name": "run_id",
1001
+ "type": "text",
1002
+ "primaryKey": false,
1003
+ "notNull": true,
1004
+ "autoincrement": false
1005
+ },
1006
+ "node_id": {
1007
+ "name": "node_id",
1008
+ "type": "text",
1009
+ "primaryKey": false,
1010
+ "notNull": true,
1011
+ "autoincrement": false
1012
+ },
1013
+ "model_id": {
1014
+ "name": "model_id",
1015
+ "type": "text",
1016
+ "primaryKey": false,
1017
+ "notNull": false,
1018
+ "autoincrement": false
1019
+ },
1020
+ "input_tokens": {
1021
+ "name": "input_tokens",
1022
+ "type": "integer",
1023
+ "primaryKey": false,
1024
+ "notNull": true,
1025
+ "autoincrement": false,
1026
+ "default": 0
1027
+ },
1028
+ "output_tokens": {
1029
+ "name": "output_tokens",
1030
+ "type": "integer",
1031
+ "primaryKey": false,
1032
+ "notNull": true,
1033
+ "autoincrement": false,
1034
+ "default": 0
1035
+ },
1036
+ "cost_microcents": {
1037
+ "name": "cost_microcents",
1038
+ "type": "integer",
1039
+ "primaryKey": false,
1040
+ "notNull": true,
1041
+ "autoincrement": false,
1042
+ "default": 0
1043
+ },
1044
+ "created_at": {
1045
+ "name": "created_at",
1046
+ "type": "integer",
1047
+ "primaryKey": false,
1048
+ "notNull": true,
1049
+ "autoincrement": false
1050
+ }
1051
+ },
1052
+ "indexes": {
1053
+ "idx_run_costs_run": {
1054
+ "name": "idx_run_costs_run",
1055
+ "columns": [
1056
+ "run_id"
1057
+ ],
1058
+ "isUnique": false
1059
+ }
1060
+ },
1061
+ "foreignKeys": {
1062
+ "run_costs_run_id_runs_id_fk": {
1063
+ "name": "run_costs_run_id_runs_id_fk",
1064
+ "tableFrom": "run_costs",
1065
+ "tableTo": "runs",
1066
+ "columnsFrom": [
1067
+ "run_id"
1068
+ ],
1069
+ "columnsTo": [
1070
+ "id"
1071
+ ],
1072
+ "onDelete": "cascade",
1073
+ "onUpdate": "no action"
1074
+ },
1075
+ "run_costs_model_id_model_catalog_id_fk": {
1076
+ "name": "run_costs_model_id_model_catalog_id_fk",
1077
+ "tableFrom": "run_costs",
1078
+ "tableTo": "model_catalog",
1079
+ "columnsFrom": [
1080
+ "model_id"
1081
+ ],
1082
+ "columnsTo": [
1083
+ "id"
1084
+ ],
1085
+ "onDelete": "no action",
1086
+ "onUpdate": "no action"
1087
+ }
1088
+ },
1089
+ "compositePrimaryKeys": {},
1090
+ "uniqueConstraints": {},
1091
+ "checkConstraints": {}
1092
+ },
1093
+ "run_events": {
1094
+ "name": "run_events",
1095
+ "columns": {
1096
+ "id": {
1097
+ "name": "id",
1098
+ "type": "text",
1099
+ "primaryKey": true,
1100
+ "notNull": true,
1101
+ "autoincrement": false
1102
+ },
1103
+ "run_id": {
1104
+ "name": "run_id",
1105
+ "type": "text",
1106
+ "primaryKey": false,
1107
+ "notNull": true,
1108
+ "autoincrement": false
1109
+ },
1110
+ "step_execution_id": {
1111
+ "name": "step_execution_id",
1112
+ "type": "text",
1113
+ "primaryKey": false,
1114
+ "notNull": false,
1115
+ "autoincrement": false
1116
+ },
1117
+ "seq": {
1118
+ "name": "seq",
1119
+ "type": "integer",
1120
+ "primaryKey": false,
1121
+ "notNull": true,
1122
+ "autoincrement": false
1123
+ },
1124
+ "event_type": {
1125
+ "name": "event_type",
1126
+ "type": "text",
1127
+ "primaryKey": false,
1128
+ "notNull": true,
1129
+ "autoincrement": false
1130
+ },
1131
+ "level": {
1132
+ "name": "level",
1133
+ "type": "text",
1134
+ "primaryKey": false,
1135
+ "notNull": true,
1136
+ "autoincrement": false,
1137
+ "default": "'info'"
1138
+ },
1139
+ "node_id": {
1140
+ "name": "node_id",
1141
+ "type": "text",
1142
+ "primaryKey": false,
1143
+ "notNull": false,
1144
+ "autoincrement": false
1145
+ },
1146
+ "payload_json": {
1147
+ "name": "payload_json",
1148
+ "type": "text",
1149
+ "primaryKey": false,
1150
+ "notNull": true,
1151
+ "autoincrement": false,
1152
+ "default": "'{}'"
1153
+ },
1154
+ "ts": {
1155
+ "name": "ts",
1156
+ "type": "integer",
1157
+ "primaryKey": false,
1158
+ "notNull": true,
1159
+ "autoincrement": false
1160
+ }
1161
+ },
1162
+ "indexes": {
1163
+ "idx_run_events_run_seq": {
1164
+ "name": "idx_run_events_run_seq",
1165
+ "columns": [
1166
+ "run_id",
1167
+ "seq"
1168
+ ],
1169
+ "isUnique": true
1170
+ },
1171
+ "idx_run_events_step": {
1172
+ "name": "idx_run_events_step",
1173
+ "columns": [
1174
+ "step_execution_id",
1175
+ "ts"
1176
+ ],
1177
+ "isUnique": false,
1178
+ "where": "\"run_events\".\"step_execution_id\" is not null"
1179
+ },
1180
+ "idx_run_events_run_type": {
1181
+ "name": "idx_run_events_run_type",
1182
+ "columns": [
1183
+ "run_id",
1184
+ "event_type",
1185
+ "ts"
1186
+ ],
1187
+ "isUnique": false
1188
+ }
1189
+ },
1190
+ "foreignKeys": {
1191
+ "run_events_run_id_runs_id_fk": {
1192
+ "name": "run_events_run_id_runs_id_fk",
1193
+ "tableFrom": "run_events",
1194
+ "tableTo": "runs",
1195
+ "columnsFrom": [
1196
+ "run_id"
1197
+ ],
1198
+ "columnsTo": [
1199
+ "id"
1200
+ ],
1201
+ "onDelete": "cascade",
1202
+ "onUpdate": "no action"
1203
+ }
1204
+ },
1205
+ "compositePrimaryKeys": {},
1206
+ "uniqueConstraints": {},
1207
+ "checkConstraints": {}
1208
+ },
1209
+ "runs": {
1210
+ "name": "runs",
1211
+ "columns": {
1212
+ "id": {
1213
+ "name": "id",
1214
+ "type": "text",
1215
+ "primaryKey": true,
1216
+ "notNull": true,
1217
+ "autoincrement": false
1218
+ },
1219
+ "workflow_id": {
1220
+ "name": "workflow_id",
1221
+ "type": "text",
1222
+ "primaryKey": false,
1223
+ "notNull": true,
1224
+ "autoincrement": false
1225
+ },
1226
+ "workflow_path": {
1227
+ "name": "workflow_path",
1228
+ "type": "text",
1229
+ "primaryKey": false,
1230
+ "notNull": false,
1231
+ "autoincrement": false
1232
+ },
1233
+ "project_root": {
1234
+ "name": "project_root",
1235
+ "type": "text",
1236
+ "primaryKey": false,
1237
+ "notNull": false,
1238
+ "autoincrement": false
1239
+ },
1240
+ "workflow_definition_snapshot": {
1241
+ "name": "workflow_definition_snapshot",
1242
+ "type": "text",
1243
+ "primaryKey": false,
1244
+ "notNull": true,
1245
+ "autoincrement": false
1246
+ },
1247
+ "status": {
1248
+ "name": "status",
1249
+ "type": "text",
1250
+ "primaryKey": false,
1251
+ "notNull": true,
1252
+ "autoincrement": false,
1253
+ "default": "'pending'"
1254
+ },
1255
+ "execution_mode": {
1256
+ "name": "execution_mode",
1257
+ "type": "text",
1258
+ "primaryKey": false,
1259
+ "notNull": true,
1260
+ "autoincrement": false,
1261
+ "default": "'local'"
1262
+ },
1263
+ "trigger_type": {
1264
+ "name": "trigger_type",
1265
+ "type": "text",
1266
+ "primaryKey": false,
1267
+ "notNull": true,
1268
+ "autoincrement": false,
1269
+ "default": "'manual'"
1270
+ },
1271
+ "trigger_metadata": {
1272
+ "name": "trigger_metadata",
1273
+ "type": "text",
1274
+ "primaryKey": false,
1275
+ "notNull": true,
1276
+ "autoincrement": false,
1277
+ "default": "'{}'"
1278
+ },
1279
+ "input_json": {
1280
+ "name": "input_json",
1281
+ "type": "text",
1282
+ "primaryKey": false,
1283
+ "notNull": true,
1284
+ "autoincrement": false,
1285
+ "default": "'{}'"
1286
+ },
1287
+ "output_json": {
1288
+ "name": "output_json",
1289
+ "type": "text",
1290
+ "primaryKey": false,
1291
+ "notNull": false,
1292
+ "autoincrement": false
1293
+ },
1294
+ "error_json": {
1295
+ "name": "error_json",
1296
+ "type": "text",
1297
+ "primaryKey": false,
1298
+ "notNull": false,
1299
+ "autoincrement": false
1300
+ },
1301
+ "started_at": {
1302
+ "name": "started_at",
1303
+ "type": "integer",
1304
+ "primaryKey": false,
1305
+ "notNull": false,
1306
+ "autoincrement": false
1307
+ },
1308
+ "completed_at": {
1309
+ "name": "completed_at",
1310
+ "type": "integer",
1311
+ "primaryKey": false,
1312
+ "notNull": false,
1313
+ "autoincrement": false
1314
+ },
1315
+ "total_input_tokens": {
1316
+ "name": "total_input_tokens",
1317
+ "type": "integer",
1318
+ "primaryKey": false,
1319
+ "notNull": true,
1320
+ "autoincrement": false,
1321
+ "default": 0
1322
+ },
1323
+ "total_output_tokens": {
1324
+ "name": "total_output_tokens",
1325
+ "type": "integer",
1326
+ "primaryKey": false,
1327
+ "notNull": true,
1328
+ "autoincrement": false,
1329
+ "default": 0
1330
+ },
1331
+ "total_cost_microcents": {
1332
+ "name": "total_cost_microcents",
1333
+ "type": "integer",
1334
+ "primaryKey": false,
1335
+ "notNull": true,
1336
+ "autoincrement": false,
1337
+ "default": 0
1338
+ },
1339
+ "deleted_at": {
1340
+ "name": "deleted_at",
1341
+ "type": "integer",
1342
+ "primaryKey": false,
1343
+ "notNull": false,
1344
+ "autoincrement": false
1345
+ },
1346
+ "created_at": {
1347
+ "name": "created_at",
1348
+ "type": "integer",
1349
+ "primaryKey": false,
1350
+ "notNull": true,
1351
+ "autoincrement": false
1352
+ },
1353
+ "updated_at": {
1354
+ "name": "updated_at",
1355
+ "type": "integer",
1356
+ "primaryKey": false,
1357
+ "notNull": true,
1358
+ "autoincrement": false
1359
+ }
1360
+ },
1361
+ "indexes": {
1362
+ "idx_runs_workflow": {
1363
+ "name": "idx_runs_workflow",
1364
+ "columns": [
1365
+ "workflow_id",
1366
+ "\"created_at\" desc"
1367
+ ],
1368
+ "isUnique": false
1369
+ },
1370
+ "idx_runs_status": {
1371
+ "name": "idx_runs_status",
1372
+ "columns": [
1373
+ "status",
1374
+ "\"created_at\" desc"
1375
+ ],
1376
+ "isUnique": false,
1377
+ "where": "\"runs\".\"deleted_at\" is null"
1378
+ },
1379
+ "idx_runs_cost": {
1380
+ "name": "idx_runs_cost",
1381
+ "columns": [
1382
+ "workflow_id",
1383
+ "created_at",
1384
+ "total_cost_microcents"
1385
+ ],
1386
+ "isUnique": false,
1387
+ "where": "\"runs\".\"deleted_at\" is null"
1388
+ }
1389
+ },
1390
+ "foreignKeys": {
1391
+ "runs_workflow_id_workflows_id_fk": {
1392
+ "name": "runs_workflow_id_workflows_id_fk",
1393
+ "tableFrom": "runs",
1394
+ "tableTo": "workflows",
1395
+ "columnsFrom": [
1396
+ "workflow_id"
1397
+ ],
1398
+ "columnsTo": [
1399
+ "id"
1400
+ ],
1401
+ "onDelete": "no action",
1402
+ "onUpdate": "no action"
1403
+ }
1404
+ },
1405
+ "compositePrimaryKeys": {},
1406
+ "uniqueConstraints": {},
1407
+ "checkConstraints": {
1408
+ "runs_status_check": {
1409
+ "name": "runs_status_check",
1410
+ "value": "\"runs\".\"status\" in ('pending', 'running', 'paused', 'completed', 'failed', 'cancelled')"
1411
+ },
1412
+ "runs_execution_mode_check": {
1413
+ "name": "runs_execution_mode_check",
1414
+ "value": "\"runs\".\"execution_mode\" in ('local', 'cloud', 'managed')"
1415
+ }
1416
+ }
1417
+ },
1418
+ "session_messages": {
1419
+ "name": "session_messages",
1420
+ "columns": {
1421
+ "id": {
1422
+ "name": "id",
1423
+ "type": "text",
1424
+ "primaryKey": true,
1425
+ "notNull": true,
1426
+ "autoincrement": false
1427
+ },
1428
+ "session_id": {
1429
+ "name": "session_id",
1430
+ "type": "text",
1431
+ "primaryKey": false,
1432
+ "notNull": true,
1433
+ "autoincrement": false
1434
+ },
1435
+ "sequence_number": {
1436
+ "name": "sequence_number",
1437
+ "type": "integer",
1438
+ "primaryKey": false,
1439
+ "notNull": true,
1440
+ "autoincrement": false
1441
+ },
1442
+ "role": {
1443
+ "name": "role",
1444
+ "type": "text",
1445
+ "primaryKey": false,
1446
+ "notNull": true,
1447
+ "autoincrement": false
1448
+ },
1449
+ "content": {
1450
+ "name": "content",
1451
+ "type": "text",
1452
+ "primaryKey": false,
1453
+ "notNull": false,
1454
+ "autoincrement": false
1455
+ },
1456
+ "content_parts": {
1457
+ "name": "content_parts",
1458
+ "type": "text",
1459
+ "primaryKey": false,
1460
+ "notNull": false,
1461
+ "autoincrement": false
1462
+ },
1463
+ "tool_calls": {
1464
+ "name": "tool_calls",
1465
+ "type": "text",
1466
+ "primaryKey": false,
1467
+ "notNull": false,
1468
+ "autoincrement": false
1469
+ },
1470
+ "tool_call_id": {
1471
+ "name": "tool_call_id",
1472
+ "type": "text",
1473
+ "primaryKey": false,
1474
+ "notNull": false,
1475
+ "autoincrement": false
1476
+ },
1477
+ "name": {
1478
+ "name": "name",
1479
+ "type": "text",
1480
+ "primaryKey": false,
1481
+ "notNull": false,
1482
+ "autoincrement": false
1483
+ },
1484
+ "finish_reason": {
1485
+ "name": "finish_reason",
1486
+ "type": "text",
1487
+ "primaryKey": false,
1488
+ "notNull": false,
1489
+ "autoincrement": false
1490
+ },
1491
+ "model_id": {
1492
+ "name": "model_id",
1493
+ "type": "text",
1494
+ "primaryKey": false,
1495
+ "notNull": false,
1496
+ "autoincrement": false
1497
+ },
1498
+ "input_tokens": {
1499
+ "name": "input_tokens",
1500
+ "type": "integer",
1501
+ "primaryKey": false,
1502
+ "notNull": true,
1503
+ "autoincrement": false,
1504
+ "default": 0
1505
+ },
1506
+ "output_tokens": {
1507
+ "name": "output_tokens",
1508
+ "type": "integer",
1509
+ "primaryKey": false,
1510
+ "notNull": true,
1511
+ "autoincrement": false,
1512
+ "default": 0
1513
+ },
1514
+ "cost_microcents": {
1515
+ "name": "cost_microcents",
1516
+ "type": "integer",
1517
+ "primaryKey": false,
1518
+ "notNull": true,
1519
+ "autoincrement": false,
1520
+ "default": 0
1521
+ },
1522
+ "created_at": {
1523
+ "name": "created_at",
1524
+ "type": "integer",
1525
+ "primaryKey": false,
1526
+ "notNull": true,
1527
+ "autoincrement": false
1528
+ }
1529
+ },
1530
+ "indexes": {
1531
+ "idx_session_messages_seq": {
1532
+ "name": "idx_session_messages_seq",
1533
+ "columns": [
1534
+ "session_id",
1535
+ "sequence_number"
1536
+ ],
1537
+ "isUnique": true
1538
+ },
1539
+ "idx_session_messages_session": {
1540
+ "name": "idx_session_messages_session",
1541
+ "columns": [
1542
+ "session_id",
1543
+ "created_at"
1544
+ ],
1545
+ "isUnique": false
1546
+ }
1547
+ },
1548
+ "foreignKeys": {
1549
+ "session_messages_session_id_agent_sessions_id_fk": {
1550
+ "name": "session_messages_session_id_agent_sessions_id_fk",
1551
+ "tableFrom": "session_messages",
1552
+ "tableTo": "agent_sessions",
1553
+ "columnsFrom": [
1554
+ "session_id"
1555
+ ],
1556
+ "columnsTo": [
1557
+ "id"
1558
+ ],
1559
+ "onDelete": "cascade",
1560
+ "onUpdate": "no action"
1561
+ },
1562
+ "session_messages_model_id_model_catalog_id_fk": {
1563
+ "name": "session_messages_model_id_model_catalog_id_fk",
1564
+ "tableFrom": "session_messages",
1565
+ "tableTo": "model_catalog",
1566
+ "columnsFrom": [
1567
+ "model_id"
1568
+ ],
1569
+ "columnsTo": [
1570
+ "id"
1571
+ ],
1572
+ "onDelete": "no action",
1573
+ "onUpdate": "no action"
1574
+ }
1575
+ },
1576
+ "compositePrimaryKeys": {},
1577
+ "uniqueConstraints": {},
1578
+ "checkConstraints": {}
1579
+ },
1580
+ "step_executions": {
1581
+ "name": "step_executions",
1582
+ "columns": {
1583
+ "id": {
1584
+ "name": "id",
1585
+ "type": "text",
1586
+ "primaryKey": true,
1587
+ "notNull": true,
1588
+ "autoincrement": false
1589
+ },
1590
+ "run_id": {
1591
+ "name": "run_id",
1592
+ "type": "text",
1593
+ "primaryKey": false,
1594
+ "notNull": true,
1595
+ "autoincrement": false
1596
+ },
1597
+ "node_id": {
1598
+ "name": "node_id",
1599
+ "type": "text",
1600
+ "primaryKey": false,
1601
+ "notNull": true,
1602
+ "autoincrement": false
1603
+ },
1604
+ "node_type": {
1605
+ "name": "node_type",
1606
+ "type": "text",
1607
+ "primaryKey": false,
1608
+ "notNull": true,
1609
+ "autoincrement": false
1610
+ },
1611
+ "agent_id": {
1612
+ "name": "agent_id",
1613
+ "type": "text",
1614
+ "primaryKey": false,
1615
+ "notNull": false,
1616
+ "autoincrement": false
1617
+ },
1618
+ "agent_snapshot": {
1619
+ "name": "agent_snapshot",
1620
+ "type": "text",
1621
+ "primaryKey": false,
1622
+ "notNull": false,
1623
+ "autoincrement": false
1624
+ },
1625
+ "model_id": {
1626
+ "name": "model_id",
1627
+ "type": "text",
1628
+ "primaryKey": false,
1629
+ "notNull": false,
1630
+ "autoincrement": false
1631
+ },
1632
+ "attempt_number": {
1633
+ "name": "attempt_number",
1634
+ "type": "integer",
1635
+ "primaryKey": false,
1636
+ "notNull": true,
1637
+ "autoincrement": false,
1638
+ "default": 1
1639
+ },
1640
+ "status": {
1641
+ "name": "status",
1642
+ "type": "text",
1643
+ "primaryKey": false,
1644
+ "notNull": true,
1645
+ "autoincrement": false,
1646
+ "default": "'pending'"
1647
+ },
1648
+ "input_json": {
1649
+ "name": "input_json",
1650
+ "type": "text",
1651
+ "primaryKey": false,
1652
+ "notNull": true,
1653
+ "autoincrement": false,
1654
+ "default": "'{}'"
1655
+ },
1656
+ "output_json": {
1657
+ "name": "output_json",
1658
+ "type": "text",
1659
+ "primaryKey": false,
1660
+ "notNull": false,
1661
+ "autoincrement": false
1662
+ },
1663
+ "error_json": {
1664
+ "name": "error_json",
1665
+ "type": "text",
1666
+ "primaryKey": false,
1667
+ "notNull": false,
1668
+ "autoincrement": false
1669
+ },
1670
+ "started_at": {
1671
+ "name": "started_at",
1672
+ "type": "integer",
1673
+ "primaryKey": false,
1674
+ "notNull": false,
1675
+ "autoincrement": false
1676
+ },
1677
+ "completed_at": {
1678
+ "name": "completed_at",
1679
+ "type": "integer",
1680
+ "primaryKey": false,
1681
+ "notNull": false,
1682
+ "autoincrement": false
1683
+ },
1684
+ "duration_ms": {
1685
+ "name": "duration_ms",
1686
+ "type": "integer",
1687
+ "primaryKey": false,
1688
+ "notNull": false,
1689
+ "autoincrement": false
1690
+ },
1691
+ "input_tokens": {
1692
+ "name": "input_tokens",
1693
+ "type": "integer",
1694
+ "primaryKey": false,
1695
+ "notNull": true,
1696
+ "autoincrement": false,
1697
+ "default": 0
1698
+ },
1699
+ "output_tokens": {
1700
+ "name": "output_tokens",
1701
+ "type": "integer",
1702
+ "primaryKey": false,
1703
+ "notNull": true,
1704
+ "autoincrement": false,
1705
+ "default": 0
1706
+ },
1707
+ "cached_tokens": {
1708
+ "name": "cached_tokens",
1709
+ "type": "integer",
1710
+ "primaryKey": false,
1711
+ "notNull": true,
1712
+ "autoincrement": false,
1713
+ "default": 0
1714
+ },
1715
+ "cost_microcents": {
1716
+ "name": "cost_microcents",
1717
+ "type": "integer",
1718
+ "primaryKey": false,
1719
+ "notNull": true,
1720
+ "autoincrement": false,
1721
+ "default": 0
1722
+ },
1723
+ "created_at": {
1724
+ "name": "created_at",
1725
+ "type": "integer",
1726
+ "primaryKey": false,
1727
+ "notNull": true,
1728
+ "autoincrement": false
1729
+ },
1730
+ "updated_at": {
1731
+ "name": "updated_at",
1732
+ "type": "integer",
1733
+ "primaryKey": false,
1734
+ "notNull": true,
1735
+ "autoincrement": false
1736
+ }
1737
+ },
1738
+ "indexes": {
1739
+ "idx_step_exec_run": {
1740
+ "name": "idx_step_exec_run",
1741
+ "columns": [
1742
+ "run_id",
1743
+ "created_at"
1744
+ ],
1745
+ "isUnique": false
1746
+ },
1747
+ "idx_step_exec_run_node": {
1748
+ "name": "idx_step_exec_run_node",
1749
+ "columns": [
1750
+ "run_id",
1751
+ "node_id",
1752
+ "attempt_number"
1753
+ ],
1754
+ "isUnique": false
1755
+ },
1756
+ "idx_step_exec_agent": {
1757
+ "name": "idx_step_exec_agent",
1758
+ "columns": [
1759
+ "agent_id",
1760
+ "\"created_at\" desc"
1761
+ ],
1762
+ "isUnique": false,
1763
+ "where": "\"step_executions\".\"agent_id\" is not null"
1764
+ },
1765
+ "idx_step_exec_model": {
1766
+ "name": "idx_step_exec_model",
1767
+ "columns": [
1768
+ "model_id",
1769
+ "\"created_at\" desc"
1770
+ ],
1771
+ "isUnique": false,
1772
+ "where": "\"step_executions\".\"model_id\" is not null"
1773
+ },
1774
+ "idx_step_exec_cost": {
1775
+ "name": "idx_step_exec_cost",
1776
+ "columns": [
1777
+ "model_id",
1778
+ "created_at",
1779
+ "cost_microcents"
1780
+ ],
1781
+ "isUnique": false,
1782
+ "where": "\"step_executions\".\"model_id\" is not null"
1783
+ }
1784
+ },
1785
+ "foreignKeys": {
1786
+ "step_executions_run_id_runs_id_fk": {
1787
+ "name": "step_executions_run_id_runs_id_fk",
1788
+ "tableFrom": "step_executions",
1789
+ "tableTo": "runs",
1790
+ "columnsFrom": [
1791
+ "run_id"
1792
+ ],
1793
+ "columnsTo": [
1794
+ "id"
1795
+ ],
1796
+ "onDelete": "cascade",
1797
+ "onUpdate": "no action"
1798
+ },
1799
+ "step_executions_agent_id_agents_id_fk": {
1800
+ "name": "step_executions_agent_id_agents_id_fk",
1801
+ "tableFrom": "step_executions",
1802
+ "tableTo": "agents",
1803
+ "columnsFrom": [
1804
+ "agent_id"
1805
+ ],
1806
+ "columnsTo": [
1807
+ "id"
1808
+ ],
1809
+ "onDelete": "no action",
1810
+ "onUpdate": "no action"
1811
+ },
1812
+ "step_executions_model_id_model_catalog_id_fk": {
1813
+ "name": "step_executions_model_id_model_catalog_id_fk",
1814
+ "tableFrom": "step_executions",
1815
+ "tableTo": "model_catalog",
1816
+ "columnsFrom": [
1817
+ "model_id"
1818
+ ],
1819
+ "columnsTo": [
1820
+ "id"
1821
+ ],
1822
+ "onDelete": "no action",
1823
+ "onUpdate": "no action"
1824
+ }
1825
+ },
1826
+ "compositePrimaryKeys": {},
1827
+ "uniqueConstraints": {},
1828
+ "checkConstraints": {
1829
+ "step_executions_status_check": {
1830
+ "name": "step_executions_status_check",
1831
+ "value": "\"step_executions\".\"status\" in ('pending', 'running', 'completed', 'failed', 'skipped')"
1832
+ }
1833
+ }
1834
+ },
1835
+ "workflows": {
1836
+ "name": "workflows",
1837
+ "columns": {
1838
+ "id": {
1839
+ "name": "id",
1840
+ "type": "text",
1841
+ "primaryKey": true,
1842
+ "notNull": true,
1843
+ "autoincrement": false
1844
+ },
1845
+ "name": {
1846
+ "name": "name",
1847
+ "type": "text",
1848
+ "primaryKey": false,
1849
+ "notNull": true,
1850
+ "autoincrement": false
1851
+ },
1852
+ "slug": {
1853
+ "name": "slug",
1854
+ "type": "text",
1855
+ "primaryKey": false,
1856
+ "notNull": true,
1857
+ "autoincrement": false
1858
+ },
1859
+ "description": {
1860
+ "name": "description",
1861
+ "type": "text",
1862
+ "primaryKey": false,
1863
+ "notNull": false,
1864
+ "autoincrement": false
1865
+ },
1866
+ "definition": {
1867
+ "name": "definition",
1868
+ "type": "text",
1869
+ "primaryKey": false,
1870
+ "notNull": true,
1871
+ "autoincrement": false
1872
+ },
1873
+ "input_schema": {
1874
+ "name": "input_schema",
1875
+ "type": "text",
1876
+ "primaryKey": false,
1877
+ "notNull": false,
1878
+ "autoincrement": false
1879
+ },
1880
+ "tags": {
1881
+ "name": "tags",
1882
+ "type": "text",
1883
+ "primaryKey": false,
1884
+ "notNull": true,
1885
+ "autoincrement": false,
1886
+ "default": "'[]'"
1887
+ },
1888
+ "source_path": {
1889
+ "name": "source_path",
1890
+ "type": "text",
1891
+ "primaryKey": false,
1892
+ "notNull": false,
1893
+ "autoincrement": false
1894
+ },
1895
+ "is_active": {
1896
+ "name": "is_active",
1897
+ "type": "integer",
1898
+ "primaryKey": false,
1899
+ "notNull": true,
1900
+ "autoincrement": false,
1901
+ "default": "1"
1902
+ },
1903
+ "deleted_at": {
1904
+ "name": "deleted_at",
1905
+ "type": "integer",
1906
+ "primaryKey": false,
1907
+ "notNull": false,
1908
+ "autoincrement": false
1909
+ },
1910
+ "created_at": {
1911
+ "name": "created_at",
1912
+ "type": "integer",
1913
+ "primaryKey": false,
1914
+ "notNull": true,
1915
+ "autoincrement": false
1916
+ },
1917
+ "updated_at": {
1918
+ "name": "updated_at",
1919
+ "type": "integer",
1920
+ "primaryKey": false,
1921
+ "notNull": true,
1922
+ "autoincrement": false
1923
+ }
1924
+ },
1925
+ "indexes": {
1926
+ "idx_workflows_slug": {
1927
+ "name": "idx_workflows_slug",
1928
+ "columns": [
1929
+ "slug"
1930
+ ],
1931
+ "isUnique": true,
1932
+ "where": "\"workflows\".\"deleted_at\" is null"
1933
+ },
1934
+ "idx_workflows_active": {
1935
+ "name": "idx_workflows_active",
1936
+ "columns": [
1937
+ "is_active",
1938
+ "\"updated_at\" desc"
1939
+ ],
1940
+ "isUnique": false,
1941
+ "where": "\"workflows\".\"deleted_at\" is null"
1942
+ }
1943
+ },
1944
+ "foreignKeys": {},
1945
+ "compositePrimaryKeys": {},
1946
+ "uniqueConstraints": {},
1947
+ "checkConstraints": {}
1948
+ }
1949
+ },
1950
+ "views": {},
1951
+ "enums": {},
1952
+ "_meta": {
1953
+ "schemas": {},
1954
+ "tables": {},
1955
+ "columns": {}
1956
+ },
1957
+ "internal": {
1958
+ "indexes": {
1959
+ "idx_agent_sessions_status": {
1960
+ "columns": {
1961
+ "\"updated_at\" desc": {
1962
+ "isExpression": true
1963
+ }
1964
+ }
1965
+ },
1966
+ "idx_agent_sessions_agent": {
1967
+ "columns": {
1968
+ "\"created_at\" desc": {
1969
+ "isExpression": true
1970
+ }
1971
+ }
1972
+ },
1973
+ "idx_agents_active": {
1974
+ "columns": {
1975
+ "\"created_at\" desc": {
1976
+ "isExpression": true
1977
+ }
1978
+ }
1979
+ },
1980
+ "idx_runs_workflow": {
1981
+ "columns": {
1982
+ "\"created_at\" desc": {
1983
+ "isExpression": true
1984
+ }
1985
+ }
1986
+ },
1987
+ "idx_runs_status": {
1988
+ "columns": {
1989
+ "\"created_at\" desc": {
1990
+ "isExpression": true
1991
+ }
1992
+ }
1993
+ },
1994
+ "idx_step_exec_agent": {
1995
+ "columns": {
1996
+ "\"created_at\" desc": {
1997
+ "isExpression": true
1998
+ }
1999
+ }
2000
+ },
2001
+ "idx_step_exec_model": {
2002
+ "columns": {
2003
+ "\"created_at\" desc": {
2004
+ "isExpression": true
2005
+ }
2006
+ }
2007
+ },
2008
+ "idx_workflows_active": {
2009
+ "columns": {
2010
+ "\"updated_at\" desc": {
2011
+ "isExpression": true
2012
+ }
2013
+ }
2014
+ }
2015
+ }
2016
+ }
2017
+ }