@zonease/aiworker-cli 0.8.0 → 0.9.1

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