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,1432 @@
1
+ {
2
+ "version": "6",
3
+ "dialect": "sqlite",
4
+ "id": "e3adefeb-1981-42fa-a3f5-f3306d288d9a",
5
+ "prevId": "00000000-0000-0000-0000-000000000000",
6
+ "tables": {
7
+ "agents": {
8
+ "name": "agents",
9
+ "columns": {
10
+ "id": {
11
+ "name": "id",
12
+ "type": "text",
13
+ "primaryKey": true,
14
+ "notNull": true,
15
+ "autoincrement": false
16
+ },
17
+ "name": {
18
+ "name": "name",
19
+ "type": "text",
20
+ "primaryKey": false,
21
+ "notNull": true,
22
+ "autoincrement": false
23
+ },
24
+ "slug": {
25
+ "name": "slug",
26
+ "type": "text",
27
+ "primaryKey": false,
28
+ "notNull": true,
29
+ "autoincrement": false
30
+ },
31
+ "description": {
32
+ "name": "description",
33
+ "type": "text",
34
+ "primaryKey": false,
35
+ "notNull": false,
36
+ "autoincrement": false
37
+ },
38
+ "model_id": {
39
+ "name": "model_id",
40
+ "type": "text",
41
+ "primaryKey": false,
42
+ "notNull": true,
43
+ "autoincrement": false
44
+ },
45
+ "system_prompt": {
46
+ "name": "system_prompt",
47
+ "type": "text",
48
+ "primaryKey": false,
49
+ "notNull": true,
50
+ "autoincrement": false,
51
+ "default": "''"
52
+ },
53
+ "tools": {
54
+ "name": "tools",
55
+ "type": "text",
56
+ "primaryKey": false,
57
+ "notNull": true,
58
+ "autoincrement": false,
59
+ "default": "'[]'"
60
+ },
61
+ "config": {
62
+ "name": "config",
63
+ "type": "text",
64
+ "primaryKey": false,
65
+ "notNull": true,
66
+ "autoincrement": false,
67
+ "default": "'{}'"
68
+ },
69
+ "input_schema": {
70
+ "name": "input_schema",
71
+ "type": "text",
72
+ "primaryKey": false,
73
+ "notNull": false,
74
+ "autoincrement": false
75
+ },
76
+ "output_schema": {
77
+ "name": "output_schema",
78
+ "type": "text",
79
+ "primaryKey": false,
80
+ "notNull": false,
81
+ "autoincrement": false
82
+ },
83
+ "tags": {
84
+ "name": "tags",
85
+ "type": "text",
86
+ "primaryKey": false,
87
+ "notNull": true,
88
+ "autoincrement": false,
89
+ "default": "'[]'"
90
+ },
91
+ "source_path": {
92
+ "name": "source_path",
93
+ "type": "text",
94
+ "primaryKey": false,
95
+ "notNull": false,
96
+ "autoincrement": false
97
+ },
98
+ "is_active": {
99
+ "name": "is_active",
100
+ "type": "integer",
101
+ "primaryKey": false,
102
+ "notNull": true,
103
+ "autoincrement": false,
104
+ "default": "1"
105
+ },
106
+ "deleted_at": {
107
+ "name": "deleted_at",
108
+ "type": "integer",
109
+ "primaryKey": false,
110
+ "notNull": false,
111
+ "autoincrement": false
112
+ },
113
+ "created_at": {
114
+ "name": "created_at",
115
+ "type": "integer",
116
+ "primaryKey": false,
117
+ "notNull": true,
118
+ "autoincrement": false
119
+ },
120
+ "updated_at": {
121
+ "name": "updated_at",
122
+ "type": "integer",
123
+ "primaryKey": false,
124
+ "notNull": true,
125
+ "autoincrement": false
126
+ }
127
+ },
128
+ "indexes": {
129
+ "idx_agents_slug": {
130
+ "name": "idx_agents_slug",
131
+ "columns": [
132
+ "slug"
133
+ ],
134
+ "isUnique": true,
135
+ "where": "\"agents\".\"deleted_at\" is null"
136
+ },
137
+ "idx_agents_model": {
138
+ "name": "idx_agents_model",
139
+ "columns": [
140
+ "model_id"
141
+ ],
142
+ "isUnique": false
143
+ },
144
+ "idx_agents_active": {
145
+ "name": "idx_agents_active",
146
+ "columns": [
147
+ "is_active",
148
+ "\"created_at\" desc"
149
+ ],
150
+ "isUnique": false,
151
+ "where": "\"agents\".\"deleted_at\" is null"
152
+ }
153
+ },
154
+ "foreignKeys": {
155
+ "agents_model_id_model_catalog_id_fk": {
156
+ "name": "agents_model_id_model_catalog_id_fk",
157
+ "tableFrom": "agents",
158
+ "tableTo": "model_catalog",
159
+ "columnsFrom": [
160
+ "model_id"
161
+ ],
162
+ "columnsTo": [
163
+ "id"
164
+ ],
165
+ "onDelete": "no action",
166
+ "onUpdate": "no action"
167
+ }
168
+ },
169
+ "compositePrimaryKeys": {},
170
+ "uniqueConstraints": {},
171
+ "checkConstraints": {}
172
+ },
173
+ "llm_providers": {
174
+ "name": "llm_providers",
175
+ "columns": {
176
+ "id": {
177
+ "name": "id",
178
+ "type": "text",
179
+ "primaryKey": true,
180
+ "notNull": true,
181
+ "autoincrement": false
182
+ },
183
+ "name": {
184
+ "name": "name",
185
+ "type": "text",
186
+ "primaryKey": false,
187
+ "notNull": true,
188
+ "autoincrement": false
189
+ },
190
+ "display_name": {
191
+ "name": "display_name",
192
+ "type": "text",
193
+ "primaryKey": false,
194
+ "notNull": true,
195
+ "autoincrement": false
196
+ },
197
+ "base_url": {
198
+ "name": "base_url",
199
+ "type": "text",
200
+ "primaryKey": false,
201
+ "notNull": true,
202
+ "autoincrement": false
203
+ },
204
+ "api_key_keychain_ref": {
205
+ "name": "api_key_keychain_ref",
206
+ "type": "text",
207
+ "primaryKey": false,
208
+ "notNull": false,
209
+ "autoincrement": false
210
+ },
211
+ "default_headers": {
212
+ "name": "default_headers",
213
+ "type": "text",
214
+ "primaryKey": false,
215
+ "notNull": true,
216
+ "autoincrement": false,
217
+ "default": "'{}'"
218
+ },
219
+ "is_active": {
220
+ "name": "is_active",
221
+ "type": "integer",
222
+ "primaryKey": false,
223
+ "notNull": true,
224
+ "autoincrement": false,
225
+ "default": "1"
226
+ },
227
+ "deleted_at": {
228
+ "name": "deleted_at",
229
+ "type": "integer",
230
+ "primaryKey": false,
231
+ "notNull": false,
232
+ "autoincrement": false
233
+ },
234
+ "created_at": {
235
+ "name": "created_at",
236
+ "type": "integer",
237
+ "primaryKey": false,
238
+ "notNull": true,
239
+ "autoincrement": false
240
+ },
241
+ "updated_at": {
242
+ "name": "updated_at",
243
+ "type": "integer",
244
+ "primaryKey": false,
245
+ "notNull": true,
246
+ "autoincrement": false
247
+ }
248
+ },
249
+ "indexes": {
250
+ "idx_llm_providers_name": {
251
+ "name": "idx_llm_providers_name",
252
+ "columns": [
253
+ "name"
254
+ ],
255
+ "isUnique": true,
256
+ "where": "\"llm_providers\".\"deleted_at\" is null"
257
+ }
258
+ },
259
+ "foreignKeys": {},
260
+ "compositePrimaryKeys": {},
261
+ "uniqueConstraints": {},
262
+ "checkConstraints": {}
263
+ },
264
+ "messages": {
265
+ "name": "messages",
266
+ "columns": {
267
+ "id": {
268
+ "name": "id",
269
+ "type": "text",
270
+ "primaryKey": true,
271
+ "notNull": true,
272
+ "autoincrement": false
273
+ },
274
+ "step_execution_id": {
275
+ "name": "step_execution_id",
276
+ "type": "text",
277
+ "primaryKey": false,
278
+ "notNull": true,
279
+ "autoincrement": false
280
+ },
281
+ "run_id": {
282
+ "name": "run_id",
283
+ "type": "text",
284
+ "primaryKey": false,
285
+ "notNull": true,
286
+ "autoincrement": false
287
+ },
288
+ "sequence_number": {
289
+ "name": "sequence_number",
290
+ "type": "integer",
291
+ "primaryKey": false,
292
+ "notNull": true,
293
+ "autoincrement": false
294
+ },
295
+ "role": {
296
+ "name": "role",
297
+ "type": "text",
298
+ "primaryKey": false,
299
+ "notNull": true,
300
+ "autoincrement": false
301
+ },
302
+ "content": {
303
+ "name": "content",
304
+ "type": "text",
305
+ "primaryKey": false,
306
+ "notNull": false,
307
+ "autoincrement": false
308
+ },
309
+ "content_parts": {
310
+ "name": "content_parts",
311
+ "type": "text",
312
+ "primaryKey": false,
313
+ "notNull": false,
314
+ "autoincrement": false
315
+ },
316
+ "tool_calls": {
317
+ "name": "tool_calls",
318
+ "type": "text",
319
+ "primaryKey": false,
320
+ "notNull": false,
321
+ "autoincrement": false
322
+ },
323
+ "tool_call_id": {
324
+ "name": "tool_call_id",
325
+ "type": "text",
326
+ "primaryKey": false,
327
+ "notNull": false,
328
+ "autoincrement": false
329
+ },
330
+ "name": {
331
+ "name": "name",
332
+ "type": "text",
333
+ "primaryKey": false,
334
+ "notNull": false,
335
+ "autoincrement": false
336
+ },
337
+ "finish_reason": {
338
+ "name": "finish_reason",
339
+ "type": "text",
340
+ "primaryKey": false,
341
+ "notNull": false,
342
+ "autoincrement": false
343
+ },
344
+ "created_at": {
345
+ "name": "created_at",
346
+ "type": "integer",
347
+ "primaryKey": false,
348
+ "notNull": true,
349
+ "autoincrement": false
350
+ }
351
+ },
352
+ "indexes": {
353
+ "idx_messages_step": {
354
+ "name": "idx_messages_step",
355
+ "columns": [
356
+ "step_execution_id",
357
+ "sequence_number"
358
+ ],
359
+ "isUnique": false
360
+ },
361
+ "idx_messages_run": {
362
+ "name": "idx_messages_run",
363
+ "columns": [
364
+ "run_id",
365
+ "created_at"
366
+ ],
367
+ "isUnique": false
368
+ }
369
+ },
370
+ "foreignKeys": {
371
+ "messages_step_execution_id_step_executions_id_fk": {
372
+ "name": "messages_step_execution_id_step_executions_id_fk",
373
+ "tableFrom": "messages",
374
+ "tableTo": "step_executions",
375
+ "columnsFrom": [
376
+ "step_execution_id"
377
+ ],
378
+ "columnsTo": [
379
+ "id"
380
+ ],
381
+ "onDelete": "cascade",
382
+ "onUpdate": "no action"
383
+ }
384
+ },
385
+ "compositePrimaryKeys": {},
386
+ "uniqueConstraints": {},
387
+ "checkConstraints": {}
388
+ },
389
+ "model_catalog": {
390
+ "name": "model_catalog",
391
+ "columns": {
392
+ "id": {
393
+ "name": "id",
394
+ "type": "text",
395
+ "primaryKey": true,
396
+ "notNull": true,
397
+ "autoincrement": false
398
+ },
399
+ "provider_id": {
400
+ "name": "provider_id",
401
+ "type": "text",
402
+ "primaryKey": false,
403
+ "notNull": true,
404
+ "autoincrement": false
405
+ },
406
+ "model_id": {
407
+ "name": "model_id",
408
+ "type": "text",
409
+ "primaryKey": false,
410
+ "notNull": true,
411
+ "autoincrement": false
412
+ },
413
+ "display_name": {
414
+ "name": "display_name",
415
+ "type": "text",
416
+ "primaryKey": false,
417
+ "notNull": true,
418
+ "autoincrement": false
419
+ },
420
+ "context_window_tokens": {
421
+ "name": "context_window_tokens",
422
+ "type": "integer",
423
+ "primaryKey": false,
424
+ "notNull": true,
425
+ "autoincrement": false
426
+ },
427
+ "max_output_tokens": {
428
+ "name": "max_output_tokens",
429
+ "type": "integer",
430
+ "primaryKey": false,
431
+ "notNull": true,
432
+ "autoincrement": false
433
+ },
434
+ "input_cost_per_mtok_microcents": {
435
+ "name": "input_cost_per_mtok_microcents",
436
+ "type": "integer",
437
+ "primaryKey": false,
438
+ "notNull": true,
439
+ "autoincrement": false,
440
+ "default": 0
441
+ },
442
+ "output_cost_per_mtok_microcents": {
443
+ "name": "output_cost_per_mtok_microcents",
444
+ "type": "integer",
445
+ "primaryKey": false,
446
+ "notNull": true,
447
+ "autoincrement": false,
448
+ "default": 0
449
+ },
450
+ "cached_input_cost_per_mtok_microcents": {
451
+ "name": "cached_input_cost_per_mtok_microcents",
452
+ "type": "integer",
453
+ "primaryKey": false,
454
+ "notNull": true,
455
+ "autoincrement": false,
456
+ "default": 0
457
+ },
458
+ "supports_tool_calling": {
459
+ "name": "supports_tool_calling",
460
+ "type": "integer",
461
+ "primaryKey": false,
462
+ "notNull": true,
463
+ "autoincrement": false,
464
+ "default": "0"
465
+ },
466
+ "supports_vision": {
467
+ "name": "supports_vision",
468
+ "type": "integer",
469
+ "primaryKey": false,
470
+ "notNull": true,
471
+ "autoincrement": false,
472
+ "default": "0"
473
+ },
474
+ "supports_streaming": {
475
+ "name": "supports_streaming",
476
+ "type": "integer",
477
+ "primaryKey": false,
478
+ "notNull": true,
479
+ "autoincrement": false,
480
+ "default": "1"
481
+ },
482
+ "supports_json_mode": {
483
+ "name": "supports_json_mode",
484
+ "type": "integer",
485
+ "primaryKey": false,
486
+ "notNull": true,
487
+ "autoincrement": false,
488
+ "default": "0"
489
+ },
490
+ "capabilities": {
491
+ "name": "capabilities",
492
+ "type": "text",
493
+ "primaryKey": false,
494
+ "notNull": true,
495
+ "autoincrement": false,
496
+ "default": "'{}'"
497
+ },
498
+ "deprecation_date": {
499
+ "name": "deprecation_date",
500
+ "type": "integer",
501
+ "primaryKey": false,
502
+ "notNull": false,
503
+ "autoincrement": false
504
+ },
505
+ "is_active": {
506
+ "name": "is_active",
507
+ "type": "integer",
508
+ "primaryKey": false,
509
+ "notNull": true,
510
+ "autoincrement": false,
511
+ "default": "1"
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
+ "updated_at": {
528
+ "name": "updated_at",
529
+ "type": "integer",
530
+ "primaryKey": false,
531
+ "notNull": true,
532
+ "autoincrement": false
533
+ }
534
+ },
535
+ "indexes": {
536
+ "idx_model_catalog_provider_model": {
537
+ "name": "idx_model_catalog_provider_model",
538
+ "columns": [
539
+ "provider_id",
540
+ "model_id"
541
+ ],
542
+ "isUnique": true,
543
+ "where": "\"model_catalog\".\"deleted_at\" is null"
544
+ },
545
+ "idx_model_catalog_provider": {
546
+ "name": "idx_model_catalog_provider",
547
+ "columns": [
548
+ "provider_id"
549
+ ],
550
+ "isUnique": false
551
+ },
552
+ "idx_model_catalog_active": {
553
+ "name": "idx_model_catalog_active",
554
+ "columns": [
555
+ "is_active"
556
+ ],
557
+ "isUnique": false,
558
+ "where": "\"model_catalog\".\"deleted_at\" is null"
559
+ }
560
+ },
561
+ "foreignKeys": {
562
+ "model_catalog_provider_id_llm_providers_id_fk": {
563
+ "name": "model_catalog_provider_id_llm_providers_id_fk",
564
+ "tableFrom": "model_catalog",
565
+ "tableTo": "llm_providers",
566
+ "columnsFrom": [
567
+ "provider_id"
568
+ ],
569
+ "columnsTo": [
570
+ "id"
571
+ ],
572
+ "onDelete": "no action",
573
+ "onUpdate": "no action"
574
+ }
575
+ },
576
+ "compositePrimaryKeys": {},
577
+ "uniqueConstraints": {},
578
+ "checkConstraints": {}
579
+ },
580
+ "run_costs": {
581
+ "name": "run_costs",
582
+ "columns": {
583
+ "id": {
584
+ "name": "id",
585
+ "type": "text",
586
+ "primaryKey": true,
587
+ "notNull": true,
588
+ "autoincrement": false
589
+ },
590
+ "run_id": {
591
+ "name": "run_id",
592
+ "type": "text",
593
+ "primaryKey": false,
594
+ "notNull": true,
595
+ "autoincrement": false
596
+ },
597
+ "node_id": {
598
+ "name": "node_id",
599
+ "type": "text",
600
+ "primaryKey": false,
601
+ "notNull": true,
602
+ "autoincrement": false
603
+ },
604
+ "model_id": {
605
+ "name": "model_id",
606
+ "type": "text",
607
+ "primaryKey": false,
608
+ "notNull": false,
609
+ "autoincrement": false
610
+ },
611
+ "input_tokens": {
612
+ "name": "input_tokens",
613
+ "type": "integer",
614
+ "primaryKey": false,
615
+ "notNull": true,
616
+ "autoincrement": false,
617
+ "default": 0
618
+ },
619
+ "output_tokens": {
620
+ "name": "output_tokens",
621
+ "type": "integer",
622
+ "primaryKey": false,
623
+ "notNull": true,
624
+ "autoincrement": false,
625
+ "default": 0
626
+ },
627
+ "cost_microcents": {
628
+ "name": "cost_microcents",
629
+ "type": "integer",
630
+ "primaryKey": false,
631
+ "notNull": true,
632
+ "autoincrement": false,
633
+ "default": 0
634
+ },
635
+ "created_at": {
636
+ "name": "created_at",
637
+ "type": "integer",
638
+ "primaryKey": false,
639
+ "notNull": true,
640
+ "autoincrement": false
641
+ }
642
+ },
643
+ "indexes": {
644
+ "idx_run_costs_run": {
645
+ "name": "idx_run_costs_run",
646
+ "columns": [
647
+ "run_id"
648
+ ],
649
+ "isUnique": false
650
+ }
651
+ },
652
+ "foreignKeys": {
653
+ "run_costs_run_id_runs_id_fk": {
654
+ "name": "run_costs_run_id_runs_id_fk",
655
+ "tableFrom": "run_costs",
656
+ "tableTo": "runs",
657
+ "columnsFrom": [
658
+ "run_id"
659
+ ],
660
+ "columnsTo": [
661
+ "id"
662
+ ],
663
+ "onDelete": "cascade",
664
+ "onUpdate": "no action"
665
+ },
666
+ "run_costs_model_id_model_catalog_id_fk": {
667
+ "name": "run_costs_model_id_model_catalog_id_fk",
668
+ "tableFrom": "run_costs",
669
+ "tableTo": "model_catalog",
670
+ "columnsFrom": [
671
+ "model_id"
672
+ ],
673
+ "columnsTo": [
674
+ "id"
675
+ ],
676
+ "onDelete": "no action",
677
+ "onUpdate": "no action"
678
+ }
679
+ },
680
+ "compositePrimaryKeys": {},
681
+ "uniqueConstraints": {},
682
+ "checkConstraints": {}
683
+ },
684
+ "run_events": {
685
+ "name": "run_events",
686
+ "columns": {
687
+ "id": {
688
+ "name": "id",
689
+ "type": "text",
690
+ "primaryKey": true,
691
+ "notNull": true,
692
+ "autoincrement": false
693
+ },
694
+ "run_id": {
695
+ "name": "run_id",
696
+ "type": "text",
697
+ "primaryKey": false,
698
+ "notNull": true,
699
+ "autoincrement": false
700
+ },
701
+ "step_execution_id": {
702
+ "name": "step_execution_id",
703
+ "type": "text",
704
+ "primaryKey": false,
705
+ "notNull": false,
706
+ "autoincrement": false
707
+ },
708
+ "seq": {
709
+ "name": "seq",
710
+ "type": "integer",
711
+ "primaryKey": false,
712
+ "notNull": true,
713
+ "autoincrement": false
714
+ },
715
+ "event_type": {
716
+ "name": "event_type",
717
+ "type": "text",
718
+ "primaryKey": false,
719
+ "notNull": true,
720
+ "autoincrement": false
721
+ },
722
+ "level": {
723
+ "name": "level",
724
+ "type": "text",
725
+ "primaryKey": false,
726
+ "notNull": true,
727
+ "autoincrement": false,
728
+ "default": "'info'"
729
+ },
730
+ "node_id": {
731
+ "name": "node_id",
732
+ "type": "text",
733
+ "primaryKey": false,
734
+ "notNull": false,
735
+ "autoincrement": false
736
+ },
737
+ "payload_json": {
738
+ "name": "payload_json",
739
+ "type": "text",
740
+ "primaryKey": false,
741
+ "notNull": true,
742
+ "autoincrement": false,
743
+ "default": "'{}'"
744
+ },
745
+ "ts": {
746
+ "name": "ts",
747
+ "type": "integer",
748
+ "primaryKey": false,
749
+ "notNull": true,
750
+ "autoincrement": false
751
+ }
752
+ },
753
+ "indexes": {
754
+ "idx_run_events_run_seq": {
755
+ "name": "idx_run_events_run_seq",
756
+ "columns": [
757
+ "run_id",
758
+ "seq"
759
+ ],
760
+ "isUnique": true
761
+ },
762
+ "idx_run_events_step": {
763
+ "name": "idx_run_events_step",
764
+ "columns": [
765
+ "step_execution_id",
766
+ "ts"
767
+ ],
768
+ "isUnique": false,
769
+ "where": "\"run_events\".\"step_execution_id\" is not null"
770
+ },
771
+ "idx_run_events_run_type": {
772
+ "name": "idx_run_events_run_type",
773
+ "columns": [
774
+ "run_id",
775
+ "event_type",
776
+ "ts"
777
+ ],
778
+ "isUnique": false
779
+ }
780
+ },
781
+ "foreignKeys": {
782
+ "run_events_run_id_runs_id_fk": {
783
+ "name": "run_events_run_id_runs_id_fk",
784
+ "tableFrom": "run_events",
785
+ "tableTo": "runs",
786
+ "columnsFrom": [
787
+ "run_id"
788
+ ],
789
+ "columnsTo": [
790
+ "id"
791
+ ],
792
+ "onDelete": "cascade",
793
+ "onUpdate": "no action"
794
+ }
795
+ },
796
+ "compositePrimaryKeys": {},
797
+ "uniqueConstraints": {},
798
+ "checkConstraints": {}
799
+ },
800
+ "runs": {
801
+ "name": "runs",
802
+ "columns": {
803
+ "id": {
804
+ "name": "id",
805
+ "type": "text",
806
+ "primaryKey": true,
807
+ "notNull": true,
808
+ "autoincrement": false
809
+ },
810
+ "workflow_id": {
811
+ "name": "workflow_id",
812
+ "type": "text",
813
+ "primaryKey": false,
814
+ "notNull": true,
815
+ "autoincrement": false
816
+ },
817
+ "workflow_path": {
818
+ "name": "workflow_path",
819
+ "type": "text",
820
+ "primaryKey": false,
821
+ "notNull": false,
822
+ "autoincrement": false
823
+ },
824
+ "project_root": {
825
+ "name": "project_root",
826
+ "type": "text",
827
+ "primaryKey": false,
828
+ "notNull": false,
829
+ "autoincrement": false
830
+ },
831
+ "workflow_definition_snapshot": {
832
+ "name": "workflow_definition_snapshot",
833
+ "type": "text",
834
+ "primaryKey": false,
835
+ "notNull": true,
836
+ "autoincrement": false
837
+ },
838
+ "status": {
839
+ "name": "status",
840
+ "type": "text",
841
+ "primaryKey": false,
842
+ "notNull": true,
843
+ "autoincrement": false,
844
+ "default": "'pending'"
845
+ },
846
+ "execution_mode": {
847
+ "name": "execution_mode",
848
+ "type": "text",
849
+ "primaryKey": false,
850
+ "notNull": true,
851
+ "autoincrement": false,
852
+ "default": "'local'"
853
+ },
854
+ "trigger_type": {
855
+ "name": "trigger_type",
856
+ "type": "text",
857
+ "primaryKey": false,
858
+ "notNull": true,
859
+ "autoincrement": false,
860
+ "default": "'manual'"
861
+ },
862
+ "trigger_metadata": {
863
+ "name": "trigger_metadata",
864
+ "type": "text",
865
+ "primaryKey": false,
866
+ "notNull": true,
867
+ "autoincrement": false,
868
+ "default": "'{}'"
869
+ },
870
+ "input_json": {
871
+ "name": "input_json",
872
+ "type": "text",
873
+ "primaryKey": false,
874
+ "notNull": true,
875
+ "autoincrement": false,
876
+ "default": "'{}'"
877
+ },
878
+ "output_json": {
879
+ "name": "output_json",
880
+ "type": "text",
881
+ "primaryKey": false,
882
+ "notNull": false,
883
+ "autoincrement": false
884
+ },
885
+ "error_json": {
886
+ "name": "error_json",
887
+ "type": "text",
888
+ "primaryKey": false,
889
+ "notNull": false,
890
+ "autoincrement": false
891
+ },
892
+ "started_at": {
893
+ "name": "started_at",
894
+ "type": "integer",
895
+ "primaryKey": false,
896
+ "notNull": false,
897
+ "autoincrement": false
898
+ },
899
+ "completed_at": {
900
+ "name": "completed_at",
901
+ "type": "integer",
902
+ "primaryKey": false,
903
+ "notNull": false,
904
+ "autoincrement": false
905
+ },
906
+ "total_input_tokens": {
907
+ "name": "total_input_tokens",
908
+ "type": "integer",
909
+ "primaryKey": false,
910
+ "notNull": true,
911
+ "autoincrement": false,
912
+ "default": 0
913
+ },
914
+ "total_output_tokens": {
915
+ "name": "total_output_tokens",
916
+ "type": "integer",
917
+ "primaryKey": false,
918
+ "notNull": true,
919
+ "autoincrement": false,
920
+ "default": 0
921
+ },
922
+ "total_cost_microcents": {
923
+ "name": "total_cost_microcents",
924
+ "type": "integer",
925
+ "primaryKey": false,
926
+ "notNull": true,
927
+ "autoincrement": false,
928
+ "default": 0
929
+ },
930
+ "deleted_at": {
931
+ "name": "deleted_at",
932
+ "type": "integer",
933
+ "primaryKey": false,
934
+ "notNull": false,
935
+ "autoincrement": false
936
+ },
937
+ "created_at": {
938
+ "name": "created_at",
939
+ "type": "integer",
940
+ "primaryKey": false,
941
+ "notNull": true,
942
+ "autoincrement": false
943
+ },
944
+ "updated_at": {
945
+ "name": "updated_at",
946
+ "type": "integer",
947
+ "primaryKey": false,
948
+ "notNull": true,
949
+ "autoincrement": false
950
+ }
951
+ },
952
+ "indexes": {
953
+ "idx_runs_workflow": {
954
+ "name": "idx_runs_workflow",
955
+ "columns": [
956
+ "workflow_id",
957
+ "\"created_at\" desc"
958
+ ],
959
+ "isUnique": false
960
+ },
961
+ "idx_runs_status": {
962
+ "name": "idx_runs_status",
963
+ "columns": [
964
+ "status",
965
+ "\"created_at\" desc"
966
+ ],
967
+ "isUnique": false,
968
+ "where": "\"runs\".\"deleted_at\" is null"
969
+ },
970
+ "idx_runs_cost": {
971
+ "name": "idx_runs_cost",
972
+ "columns": [
973
+ "workflow_id",
974
+ "created_at",
975
+ "total_cost_microcents"
976
+ ],
977
+ "isUnique": false,
978
+ "where": "\"runs\".\"deleted_at\" is null"
979
+ }
980
+ },
981
+ "foreignKeys": {
982
+ "runs_workflow_id_workflows_id_fk": {
983
+ "name": "runs_workflow_id_workflows_id_fk",
984
+ "tableFrom": "runs",
985
+ "tableTo": "workflows",
986
+ "columnsFrom": [
987
+ "workflow_id"
988
+ ],
989
+ "columnsTo": [
990
+ "id"
991
+ ],
992
+ "onDelete": "no action",
993
+ "onUpdate": "no action"
994
+ }
995
+ },
996
+ "compositePrimaryKeys": {},
997
+ "uniqueConstraints": {},
998
+ "checkConstraints": {
999
+ "runs_status_check": {
1000
+ "name": "runs_status_check",
1001
+ "value": "\"runs\".\"status\" in ('pending', 'running', 'paused', 'completed', 'failed', 'cancelled')"
1002
+ },
1003
+ "runs_execution_mode_check": {
1004
+ "name": "runs_execution_mode_check",
1005
+ "value": "\"runs\".\"execution_mode\" in ('local', 'cloud', 'managed')"
1006
+ }
1007
+ }
1008
+ },
1009
+ "step_executions": {
1010
+ "name": "step_executions",
1011
+ "columns": {
1012
+ "id": {
1013
+ "name": "id",
1014
+ "type": "text",
1015
+ "primaryKey": true,
1016
+ "notNull": true,
1017
+ "autoincrement": false
1018
+ },
1019
+ "run_id": {
1020
+ "name": "run_id",
1021
+ "type": "text",
1022
+ "primaryKey": false,
1023
+ "notNull": true,
1024
+ "autoincrement": false
1025
+ },
1026
+ "node_id": {
1027
+ "name": "node_id",
1028
+ "type": "text",
1029
+ "primaryKey": false,
1030
+ "notNull": true,
1031
+ "autoincrement": false
1032
+ },
1033
+ "node_type": {
1034
+ "name": "node_type",
1035
+ "type": "text",
1036
+ "primaryKey": false,
1037
+ "notNull": true,
1038
+ "autoincrement": false
1039
+ },
1040
+ "agent_id": {
1041
+ "name": "agent_id",
1042
+ "type": "text",
1043
+ "primaryKey": false,
1044
+ "notNull": false,
1045
+ "autoincrement": false
1046
+ },
1047
+ "agent_snapshot": {
1048
+ "name": "agent_snapshot",
1049
+ "type": "text",
1050
+ "primaryKey": false,
1051
+ "notNull": false,
1052
+ "autoincrement": false
1053
+ },
1054
+ "model_id": {
1055
+ "name": "model_id",
1056
+ "type": "text",
1057
+ "primaryKey": false,
1058
+ "notNull": false,
1059
+ "autoincrement": false
1060
+ },
1061
+ "attempt_number": {
1062
+ "name": "attempt_number",
1063
+ "type": "integer",
1064
+ "primaryKey": false,
1065
+ "notNull": true,
1066
+ "autoincrement": false,
1067
+ "default": 1
1068
+ },
1069
+ "status": {
1070
+ "name": "status",
1071
+ "type": "text",
1072
+ "primaryKey": false,
1073
+ "notNull": true,
1074
+ "autoincrement": false,
1075
+ "default": "'pending'"
1076
+ },
1077
+ "input_json": {
1078
+ "name": "input_json",
1079
+ "type": "text",
1080
+ "primaryKey": false,
1081
+ "notNull": true,
1082
+ "autoincrement": false,
1083
+ "default": "'{}'"
1084
+ },
1085
+ "output_json": {
1086
+ "name": "output_json",
1087
+ "type": "text",
1088
+ "primaryKey": false,
1089
+ "notNull": false,
1090
+ "autoincrement": false
1091
+ },
1092
+ "error_json": {
1093
+ "name": "error_json",
1094
+ "type": "text",
1095
+ "primaryKey": false,
1096
+ "notNull": false,
1097
+ "autoincrement": false
1098
+ },
1099
+ "started_at": {
1100
+ "name": "started_at",
1101
+ "type": "integer",
1102
+ "primaryKey": false,
1103
+ "notNull": false,
1104
+ "autoincrement": false
1105
+ },
1106
+ "completed_at": {
1107
+ "name": "completed_at",
1108
+ "type": "integer",
1109
+ "primaryKey": false,
1110
+ "notNull": false,
1111
+ "autoincrement": false
1112
+ },
1113
+ "duration_ms": {
1114
+ "name": "duration_ms",
1115
+ "type": "integer",
1116
+ "primaryKey": false,
1117
+ "notNull": false,
1118
+ "autoincrement": false
1119
+ },
1120
+ "input_tokens": {
1121
+ "name": "input_tokens",
1122
+ "type": "integer",
1123
+ "primaryKey": false,
1124
+ "notNull": true,
1125
+ "autoincrement": false,
1126
+ "default": 0
1127
+ },
1128
+ "output_tokens": {
1129
+ "name": "output_tokens",
1130
+ "type": "integer",
1131
+ "primaryKey": false,
1132
+ "notNull": true,
1133
+ "autoincrement": false,
1134
+ "default": 0
1135
+ },
1136
+ "cached_tokens": {
1137
+ "name": "cached_tokens",
1138
+ "type": "integer",
1139
+ "primaryKey": false,
1140
+ "notNull": true,
1141
+ "autoincrement": false,
1142
+ "default": 0
1143
+ },
1144
+ "cost_microcents": {
1145
+ "name": "cost_microcents",
1146
+ "type": "integer",
1147
+ "primaryKey": false,
1148
+ "notNull": true,
1149
+ "autoincrement": false,
1150
+ "default": 0
1151
+ },
1152
+ "created_at": {
1153
+ "name": "created_at",
1154
+ "type": "integer",
1155
+ "primaryKey": false,
1156
+ "notNull": true,
1157
+ "autoincrement": false
1158
+ },
1159
+ "updated_at": {
1160
+ "name": "updated_at",
1161
+ "type": "integer",
1162
+ "primaryKey": false,
1163
+ "notNull": true,
1164
+ "autoincrement": false
1165
+ }
1166
+ },
1167
+ "indexes": {
1168
+ "idx_step_exec_run": {
1169
+ "name": "idx_step_exec_run",
1170
+ "columns": [
1171
+ "run_id",
1172
+ "created_at"
1173
+ ],
1174
+ "isUnique": false
1175
+ },
1176
+ "idx_step_exec_run_node": {
1177
+ "name": "idx_step_exec_run_node",
1178
+ "columns": [
1179
+ "run_id",
1180
+ "node_id",
1181
+ "attempt_number"
1182
+ ],
1183
+ "isUnique": false
1184
+ },
1185
+ "idx_step_exec_agent": {
1186
+ "name": "idx_step_exec_agent",
1187
+ "columns": [
1188
+ "agent_id",
1189
+ "\"created_at\" desc"
1190
+ ],
1191
+ "isUnique": false,
1192
+ "where": "\"step_executions\".\"agent_id\" is not null"
1193
+ },
1194
+ "idx_step_exec_model": {
1195
+ "name": "idx_step_exec_model",
1196
+ "columns": [
1197
+ "model_id",
1198
+ "\"created_at\" desc"
1199
+ ],
1200
+ "isUnique": false,
1201
+ "where": "\"step_executions\".\"model_id\" is not null"
1202
+ },
1203
+ "idx_step_exec_cost": {
1204
+ "name": "idx_step_exec_cost",
1205
+ "columns": [
1206
+ "model_id",
1207
+ "created_at",
1208
+ "cost_microcents"
1209
+ ],
1210
+ "isUnique": false,
1211
+ "where": "\"step_executions\".\"model_id\" is not null"
1212
+ }
1213
+ },
1214
+ "foreignKeys": {
1215
+ "step_executions_run_id_runs_id_fk": {
1216
+ "name": "step_executions_run_id_runs_id_fk",
1217
+ "tableFrom": "step_executions",
1218
+ "tableTo": "runs",
1219
+ "columnsFrom": [
1220
+ "run_id"
1221
+ ],
1222
+ "columnsTo": [
1223
+ "id"
1224
+ ],
1225
+ "onDelete": "cascade",
1226
+ "onUpdate": "no action"
1227
+ },
1228
+ "step_executions_agent_id_agents_id_fk": {
1229
+ "name": "step_executions_agent_id_agents_id_fk",
1230
+ "tableFrom": "step_executions",
1231
+ "tableTo": "agents",
1232
+ "columnsFrom": [
1233
+ "agent_id"
1234
+ ],
1235
+ "columnsTo": [
1236
+ "id"
1237
+ ],
1238
+ "onDelete": "no action",
1239
+ "onUpdate": "no action"
1240
+ },
1241
+ "step_executions_model_id_model_catalog_id_fk": {
1242
+ "name": "step_executions_model_id_model_catalog_id_fk",
1243
+ "tableFrom": "step_executions",
1244
+ "tableTo": "model_catalog",
1245
+ "columnsFrom": [
1246
+ "model_id"
1247
+ ],
1248
+ "columnsTo": [
1249
+ "id"
1250
+ ],
1251
+ "onDelete": "no action",
1252
+ "onUpdate": "no action"
1253
+ }
1254
+ },
1255
+ "compositePrimaryKeys": {},
1256
+ "uniqueConstraints": {},
1257
+ "checkConstraints": {
1258
+ "step_executions_status_check": {
1259
+ "name": "step_executions_status_check",
1260
+ "value": "\"step_executions\".\"status\" in ('pending', 'running', 'completed', 'failed', 'skipped')"
1261
+ }
1262
+ }
1263
+ },
1264
+ "workflows": {
1265
+ "name": "workflows",
1266
+ "columns": {
1267
+ "id": {
1268
+ "name": "id",
1269
+ "type": "text",
1270
+ "primaryKey": true,
1271
+ "notNull": true,
1272
+ "autoincrement": false
1273
+ },
1274
+ "name": {
1275
+ "name": "name",
1276
+ "type": "text",
1277
+ "primaryKey": false,
1278
+ "notNull": true,
1279
+ "autoincrement": false
1280
+ },
1281
+ "slug": {
1282
+ "name": "slug",
1283
+ "type": "text",
1284
+ "primaryKey": false,
1285
+ "notNull": true,
1286
+ "autoincrement": false
1287
+ },
1288
+ "description": {
1289
+ "name": "description",
1290
+ "type": "text",
1291
+ "primaryKey": false,
1292
+ "notNull": false,
1293
+ "autoincrement": false
1294
+ },
1295
+ "definition": {
1296
+ "name": "definition",
1297
+ "type": "text",
1298
+ "primaryKey": false,
1299
+ "notNull": true,
1300
+ "autoincrement": false
1301
+ },
1302
+ "input_schema": {
1303
+ "name": "input_schema",
1304
+ "type": "text",
1305
+ "primaryKey": false,
1306
+ "notNull": false,
1307
+ "autoincrement": false
1308
+ },
1309
+ "tags": {
1310
+ "name": "tags",
1311
+ "type": "text",
1312
+ "primaryKey": false,
1313
+ "notNull": true,
1314
+ "autoincrement": false,
1315
+ "default": "'[]'"
1316
+ },
1317
+ "source_path": {
1318
+ "name": "source_path",
1319
+ "type": "text",
1320
+ "primaryKey": false,
1321
+ "notNull": false,
1322
+ "autoincrement": false
1323
+ },
1324
+ "is_active": {
1325
+ "name": "is_active",
1326
+ "type": "integer",
1327
+ "primaryKey": false,
1328
+ "notNull": true,
1329
+ "autoincrement": false,
1330
+ "default": "1"
1331
+ },
1332
+ "deleted_at": {
1333
+ "name": "deleted_at",
1334
+ "type": "integer",
1335
+ "primaryKey": false,
1336
+ "notNull": false,
1337
+ "autoincrement": false
1338
+ },
1339
+ "created_at": {
1340
+ "name": "created_at",
1341
+ "type": "integer",
1342
+ "primaryKey": false,
1343
+ "notNull": true,
1344
+ "autoincrement": false
1345
+ },
1346
+ "updated_at": {
1347
+ "name": "updated_at",
1348
+ "type": "integer",
1349
+ "primaryKey": false,
1350
+ "notNull": true,
1351
+ "autoincrement": false
1352
+ }
1353
+ },
1354
+ "indexes": {
1355
+ "idx_workflows_slug": {
1356
+ "name": "idx_workflows_slug",
1357
+ "columns": [
1358
+ "slug"
1359
+ ],
1360
+ "isUnique": true,
1361
+ "where": "\"workflows\".\"deleted_at\" is null"
1362
+ },
1363
+ "idx_workflows_active": {
1364
+ "name": "idx_workflows_active",
1365
+ "columns": [
1366
+ "is_active",
1367
+ "\"updated_at\" desc"
1368
+ ],
1369
+ "isUnique": false,
1370
+ "where": "\"workflows\".\"deleted_at\" is null"
1371
+ }
1372
+ },
1373
+ "foreignKeys": {},
1374
+ "compositePrimaryKeys": {},
1375
+ "uniqueConstraints": {},
1376
+ "checkConstraints": {}
1377
+ }
1378
+ },
1379
+ "views": {},
1380
+ "enums": {},
1381
+ "_meta": {
1382
+ "schemas": {},
1383
+ "tables": {},
1384
+ "columns": {}
1385
+ },
1386
+ "internal": {
1387
+ "indexes": {
1388
+ "idx_agents_active": {
1389
+ "columns": {
1390
+ "\"created_at\" desc": {
1391
+ "isExpression": true
1392
+ }
1393
+ }
1394
+ },
1395
+ "idx_runs_workflow": {
1396
+ "columns": {
1397
+ "\"created_at\" desc": {
1398
+ "isExpression": true
1399
+ }
1400
+ }
1401
+ },
1402
+ "idx_runs_status": {
1403
+ "columns": {
1404
+ "\"created_at\" desc": {
1405
+ "isExpression": true
1406
+ }
1407
+ }
1408
+ },
1409
+ "idx_step_exec_agent": {
1410
+ "columns": {
1411
+ "\"created_at\" desc": {
1412
+ "isExpression": true
1413
+ }
1414
+ }
1415
+ },
1416
+ "idx_step_exec_model": {
1417
+ "columns": {
1418
+ "\"created_at\" desc": {
1419
+ "isExpression": true
1420
+ }
1421
+ }
1422
+ },
1423
+ "idx_workflows_active": {
1424
+ "columns": {
1425
+ "\"updated_at\" desc": {
1426
+ "isExpression": true
1427
+ }
1428
+ }
1429
+ }
1430
+ }
1431
+ }
1432
+ }