@zonease/aiworker-cli 0.10.4 → 0.12.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,1593 @@
1
+ {
2
+ "version": "6",
3
+ "dialect": "sqlite",
4
+ "id": "0e41abb3-daea-48ac-afb2-675c70c2bec3",
5
+ "prevId": "4a868ac7-6b0a-49ab-91dc-1eff9f1605a6",
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
+ "brain_journal_events": {
444
+ "name": "brain_journal_events",
445
+ "columns": {
446
+ "id": {
447
+ "name": "id",
448
+ "type": "integer",
449
+ "primaryKey": true,
450
+ "notNull": true,
451
+ "autoincrement": true
452
+ },
453
+ "task_id": {
454
+ "name": "task_id",
455
+ "type": "text",
456
+ "primaryKey": false,
457
+ "notNull": false,
458
+ "autoincrement": false
459
+ },
460
+ "conversation_id": {
461
+ "name": "conversation_id",
462
+ "type": "text",
463
+ "primaryKey": false,
464
+ "notNull": false,
465
+ "autoincrement": false
466
+ },
467
+ "kind": {
468
+ "name": "kind",
469
+ "type": "text",
470
+ "primaryKey": false,
471
+ "notNull": true,
472
+ "autoincrement": false
473
+ },
474
+ "payload": {
475
+ "name": "payload",
476
+ "type": "text",
477
+ "primaryKey": false,
478
+ "notNull": true,
479
+ "autoincrement": false
480
+ },
481
+ "created_at": {
482
+ "name": "created_at",
483
+ "type": "text",
484
+ "primaryKey": false,
485
+ "notNull": true,
486
+ "autoincrement": false
487
+ }
488
+ },
489
+ "indexes": {
490
+ "brain_journal_events_conversation_created_at_idx": {
491
+ "name": "brain_journal_events_conversation_created_at_idx",
492
+ "columns": [
493
+ "conversation_id",
494
+ "created_at"
495
+ ],
496
+ "isUnique": false
497
+ },
498
+ "brain_journal_events_kind_created_at_idx": {
499
+ "name": "brain_journal_events_kind_created_at_idx",
500
+ "columns": [
501
+ "kind",
502
+ "created_at"
503
+ ],
504
+ "isUnique": false
505
+ },
506
+ "brain_journal_events_task_created_at_idx": {
507
+ "name": "brain_journal_events_task_created_at_idx",
508
+ "columns": [
509
+ "task_id",
510
+ "created_at"
511
+ ],
512
+ "isUnique": false
513
+ }
514
+ },
515
+ "foreignKeys": {
516
+ "brain_journal_events_task_id_agent_tasks_id_fk": {
517
+ "name": "brain_journal_events_task_id_agent_tasks_id_fk",
518
+ "tableFrom": "brain_journal_events",
519
+ "tableTo": "agent_tasks",
520
+ "columnsFrom": [
521
+ "task_id"
522
+ ],
523
+ "columnsTo": [
524
+ "id"
525
+ ],
526
+ "onDelete": "no action",
527
+ "onUpdate": "no action"
528
+ },
529
+ "brain_journal_events_conversation_id_conversations_id_fk": {
530
+ "name": "brain_journal_events_conversation_id_conversations_id_fk",
531
+ "tableFrom": "brain_journal_events",
532
+ "tableTo": "conversations",
533
+ "columnsFrom": [
534
+ "conversation_id"
535
+ ],
536
+ "columnsTo": [
537
+ "id"
538
+ ],
539
+ "onDelete": "set null",
540
+ "onUpdate": "no action"
541
+ }
542
+ },
543
+ "compositePrimaryKeys": {},
544
+ "uniqueConstraints": {},
545
+ "checkConstraints": {}
546
+ },
547
+ "conversations": {
548
+ "name": "conversations",
549
+ "columns": {
550
+ "id": {
551
+ "name": "id",
552
+ "type": "text",
553
+ "primaryKey": true,
554
+ "notNull": true,
555
+ "autoincrement": false
556
+ },
557
+ "task_id": {
558
+ "name": "task_id",
559
+ "type": "text",
560
+ "primaryKey": false,
561
+ "notNull": false,
562
+ "autoincrement": false
563
+ },
564
+ "channel": {
565
+ "name": "channel",
566
+ "type": "text",
567
+ "primaryKey": false,
568
+ "notNull": true,
569
+ "autoincrement": false
570
+ },
571
+ "chat_id": {
572
+ "name": "chat_id",
573
+ "type": "text",
574
+ "primaryKey": false,
575
+ "notNull": true,
576
+ "autoincrement": false
577
+ },
578
+ "thread_id": {
579
+ "name": "thread_id",
580
+ "type": "text",
581
+ "primaryKey": false,
582
+ "notNull": false,
583
+ "autoincrement": false
584
+ },
585
+ "status": {
586
+ "name": "status",
587
+ "type": "text",
588
+ "primaryKey": false,
589
+ "notNull": true,
590
+ "autoincrement": false,
591
+ "default": "'open'"
592
+ },
593
+ "summary": {
594
+ "name": "summary",
595
+ "type": "text",
596
+ "primaryKey": false,
597
+ "notNull": false,
598
+ "autoincrement": false
599
+ },
600
+ "started_at": {
601
+ "name": "started_at",
602
+ "type": "text",
603
+ "primaryKey": false,
604
+ "notNull": true,
605
+ "autoincrement": false
606
+ },
607
+ "last_active_at": {
608
+ "name": "last_active_at",
609
+ "type": "text",
610
+ "primaryKey": false,
611
+ "notNull": true,
612
+ "autoincrement": false
613
+ },
614
+ "closed_at": {
615
+ "name": "closed_at",
616
+ "type": "text",
617
+ "primaryKey": false,
618
+ "notNull": false,
619
+ "autoincrement": false
620
+ }
621
+ },
622
+ "indexes": {
623
+ "conversations_lookup_idx": {
624
+ "name": "conversations_lookup_idx",
625
+ "columns": [
626
+ "channel",
627
+ "chat_id",
628
+ "thread_id",
629
+ "status"
630
+ ],
631
+ "isUnique": false
632
+ },
633
+ "conversations_last_active_at_idx": {
634
+ "name": "conversations_last_active_at_idx",
635
+ "columns": [
636
+ "last_active_at"
637
+ ],
638
+ "isUnique": false
639
+ }
640
+ },
641
+ "foreignKeys": {
642
+ "conversations_task_id_agent_tasks_id_fk": {
643
+ "name": "conversations_task_id_agent_tasks_id_fk",
644
+ "tableFrom": "conversations",
645
+ "tableTo": "agent_tasks",
646
+ "columnsFrom": [
647
+ "task_id"
648
+ ],
649
+ "columnsTo": [
650
+ "id"
651
+ ],
652
+ "onDelete": "no action",
653
+ "onUpdate": "no action"
654
+ }
655
+ },
656
+ "compositePrimaryKeys": {},
657
+ "uniqueConstraints": {},
658
+ "checkConstraints": {}
659
+ },
660
+ "cron_jobs": {
661
+ "name": "cron_jobs",
662
+ "columns": {
663
+ "id": {
664
+ "name": "id",
665
+ "type": "text",
666
+ "primaryKey": true,
667
+ "notNull": true,
668
+ "autoincrement": false
669
+ },
670
+ "expression": {
671
+ "name": "expression",
672
+ "type": "text",
673
+ "primaryKey": false,
674
+ "notNull": true,
675
+ "autoincrement": false
676
+ },
677
+ "prompt": {
678
+ "name": "prompt",
679
+ "type": "text",
680
+ "primaryKey": false,
681
+ "notNull": true,
682
+ "autoincrement": false
683
+ },
684
+ "channel": {
685
+ "name": "channel",
686
+ "type": "text",
687
+ "primaryKey": false,
688
+ "notNull": true,
689
+ "autoincrement": false
690
+ },
691
+ "chat_id": {
692
+ "name": "chat_id",
693
+ "type": "text",
694
+ "primaryKey": false,
695
+ "notNull": true,
696
+ "autoincrement": false
697
+ },
698
+ "account_id": {
699
+ "name": "account_id",
700
+ "type": "text",
701
+ "primaryKey": false,
702
+ "notNull": true,
703
+ "autoincrement": false
704
+ },
705
+ "enabled": {
706
+ "name": "enabled",
707
+ "type": "integer",
708
+ "primaryKey": false,
709
+ "notNull": true,
710
+ "autoincrement": false,
711
+ "default": true
712
+ },
713
+ "last_run_at": {
714
+ "name": "last_run_at",
715
+ "type": "text",
716
+ "primaryKey": false,
717
+ "notNull": false,
718
+ "autoincrement": false
719
+ },
720
+ "next_run_at": {
721
+ "name": "next_run_at",
722
+ "type": "text",
723
+ "primaryKey": false,
724
+ "notNull": false,
725
+ "autoincrement": false
726
+ },
727
+ "created_at": {
728
+ "name": "created_at",
729
+ "type": "text",
730
+ "primaryKey": false,
731
+ "notNull": true,
732
+ "autoincrement": false
733
+ },
734
+ "updated_at": {
735
+ "name": "updated_at",
736
+ "type": "text",
737
+ "primaryKey": false,
738
+ "notNull": true,
739
+ "autoincrement": false
740
+ }
741
+ },
742
+ "indexes": {
743
+ "cron_jobs_due_idx": {
744
+ "name": "cron_jobs_due_idx",
745
+ "columns": [
746
+ "enabled",
747
+ "next_run_at"
748
+ ],
749
+ "isUnique": false
750
+ }
751
+ },
752
+ "foreignKeys": {},
753
+ "compositePrimaryKeys": {},
754
+ "uniqueConstraints": {},
755
+ "checkConstraints": {}
756
+ },
757
+ "decision_pipeline_samples": {
758
+ "name": "decision_pipeline_samples",
759
+ "columns": {
760
+ "id": {
761
+ "name": "id",
762
+ "type": "integer",
763
+ "primaryKey": true,
764
+ "notNull": true,
765
+ "autoincrement": true
766
+ },
767
+ "stage": {
768
+ "name": "stage",
769
+ "type": "text",
770
+ "primaryKey": false,
771
+ "notNull": true,
772
+ "autoincrement": false
773
+ },
774
+ "source": {
775
+ "name": "source",
776
+ "type": "text",
777
+ "primaryKey": false,
778
+ "notNull": true,
779
+ "autoincrement": false
780
+ },
781
+ "evaluator": {
782
+ "name": "evaluator",
783
+ "type": "text",
784
+ "primaryKey": false,
785
+ "notNull": true,
786
+ "autoincrement": false
787
+ },
788
+ "reason": {
789
+ "name": "reason",
790
+ "type": "text",
791
+ "primaryKey": false,
792
+ "notNull": true,
793
+ "autoincrement": false
794
+ },
795
+ "fallback": {
796
+ "name": "fallback",
797
+ "type": "integer",
798
+ "primaryKey": false,
799
+ "notNull": true,
800
+ "autoincrement": false,
801
+ "default": false
802
+ },
803
+ "created_at": {
804
+ "name": "created_at",
805
+ "type": "text",
806
+ "primaryKey": false,
807
+ "notNull": true,
808
+ "autoincrement": false
809
+ }
810
+ },
811
+ "indexes": {
812
+ "decision_pipeline_samples_stage_created_at_idx": {
813
+ "name": "decision_pipeline_samples_stage_created_at_idx",
814
+ "columns": [
815
+ "stage",
816
+ "created_at"
817
+ ],
818
+ "isUnique": false
819
+ }
820
+ },
821
+ "foreignKeys": {},
822
+ "compositePrimaryKeys": {},
823
+ "uniqueConstraints": {},
824
+ "checkConstraints": {}
825
+ },
826
+ "evolution_observations": {
827
+ "name": "evolution_observations",
828
+ "columns": {
829
+ "id": {
830
+ "name": "id",
831
+ "type": "integer",
832
+ "primaryKey": true,
833
+ "notNull": true,
834
+ "autoincrement": true
835
+ },
836
+ "conversation_id": {
837
+ "name": "conversation_id",
838
+ "type": "text",
839
+ "primaryKey": false,
840
+ "notNull": false,
841
+ "autoincrement": false
842
+ },
843
+ "kind": {
844
+ "name": "kind",
845
+ "type": "text",
846
+ "primaryKey": false,
847
+ "notNull": true,
848
+ "autoincrement": false
849
+ },
850
+ "payload": {
851
+ "name": "payload",
852
+ "type": "text",
853
+ "primaryKey": false,
854
+ "notNull": true,
855
+ "autoincrement": false
856
+ },
857
+ "noticed_at": {
858
+ "name": "noticed_at",
859
+ "type": "text",
860
+ "primaryKey": false,
861
+ "notNull": true,
862
+ "autoincrement": false
863
+ }
864
+ },
865
+ "indexes": {
866
+ "evolution_observations_noticed_at_idx": {
867
+ "name": "evolution_observations_noticed_at_idx",
868
+ "columns": [
869
+ "noticed_at"
870
+ ],
871
+ "isUnique": false
872
+ }
873
+ },
874
+ "foreignKeys": {},
875
+ "compositePrimaryKeys": {},
876
+ "uniqueConstraints": {},
877
+ "checkConstraints": {}
878
+ },
879
+ "execution_logs": {
880
+ "name": "execution_logs",
881
+ "columns": {
882
+ "id": {
883
+ "name": "id",
884
+ "type": "integer",
885
+ "primaryKey": true,
886
+ "notNull": true,
887
+ "autoincrement": true
888
+ },
889
+ "conversation_id": {
890
+ "name": "conversation_id",
891
+ "type": "text",
892
+ "primaryKey": false,
893
+ "notNull": false,
894
+ "autoincrement": false
895
+ },
896
+ "tool_name": {
897
+ "name": "tool_name",
898
+ "type": "text",
899
+ "primaryKey": false,
900
+ "notNull": true,
901
+ "autoincrement": false
902
+ },
903
+ "params": {
904
+ "name": "params",
905
+ "type": "text",
906
+ "primaryKey": false,
907
+ "notNull": false,
908
+ "autoincrement": false
909
+ },
910
+ "result": {
911
+ "name": "result",
912
+ "type": "text",
913
+ "primaryKey": false,
914
+ "notNull": false,
915
+ "autoincrement": false
916
+ },
917
+ "duration": {
918
+ "name": "duration",
919
+ "type": "integer",
920
+ "primaryKey": false,
921
+ "notNull": false,
922
+ "autoincrement": false
923
+ },
924
+ "created_at": {
925
+ "name": "created_at",
926
+ "type": "text",
927
+ "primaryKey": false,
928
+ "notNull": true,
929
+ "autoincrement": false
930
+ }
931
+ },
932
+ "indexes": {
933
+ "execution_logs_conversation_id_idx": {
934
+ "name": "execution_logs_conversation_id_idx",
935
+ "columns": [
936
+ "conversation_id"
937
+ ],
938
+ "isUnique": false
939
+ }
940
+ },
941
+ "foreignKeys": {},
942
+ "compositePrimaryKeys": {},
943
+ "uniqueConstraints": {},
944
+ "checkConstraints": {}
945
+ },
946
+ "messages": {
947
+ "name": "messages",
948
+ "columns": {
949
+ "id": {
950
+ "name": "id",
951
+ "type": "integer",
952
+ "primaryKey": true,
953
+ "notNull": true,
954
+ "autoincrement": true
955
+ },
956
+ "conversation_id": {
957
+ "name": "conversation_id",
958
+ "type": "text",
959
+ "primaryKey": false,
960
+ "notNull": true,
961
+ "autoincrement": false
962
+ },
963
+ "role": {
964
+ "name": "role",
965
+ "type": "text",
966
+ "primaryKey": false,
967
+ "notNull": true,
968
+ "autoincrement": false
969
+ },
970
+ "content": {
971
+ "name": "content",
972
+ "type": "text",
973
+ "primaryKey": false,
974
+ "notNull": true,
975
+ "autoincrement": false
976
+ },
977
+ "tool_calls": {
978
+ "name": "tool_calls",
979
+ "type": "text",
980
+ "primaryKey": false,
981
+ "notNull": false,
982
+ "autoincrement": false
983
+ },
984
+ "tool_call_id": {
985
+ "name": "tool_call_id",
986
+ "type": "text",
987
+ "primaryKey": false,
988
+ "notNull": false,
989
+ "autoincrement": false
990
+ },
991
+ "tokens_in": {
992
+ "name": "tokens_in",
993
+ "type": "integer",
994
+ "primaryKey": false,
995
+ "notNull": false,
996
+ "autoincrement": false
997
+ },
998
+ "tokens_out": {
999
+ "name": "tokens_out",
1000
+ "type": "integer",
1001
+ "primaryKey": false,
1002
+ "notNull": false,
1003
+ "autoincrement": false
1004
+ },
1005
+ "rich_metadata": {
1006
+ "name": "rich_metadata",
1007
+ "type": "text",
1008
+ "primaryKey": false,
1009
+ "notNull": false,
1010
+ "autoincrement": false
1011
+ },
1012
+ "created_at": {
1013
+ "name": "created_at",
1014
+ "type": "text",
1015
+ "primaryKey": false,
1016
+ "notNull": true,
1017
+ "autoincrement": false
1018
+ }
1019
+ },
1020
+ "indexes": {
1021
+ "messages_conversation_id_idx": {
1022
+ "name": "messages_conversation_id_idx",
1023
+ "columns": [
1024
+ "conversation_id"
1025
+ ],
1026
+ "isUnique": false
1027
+ }
1028
+ },
1029
+ "foreignKeys": {
1030
+ "messages_conversation_id_conversations_id_fk": {
1031
+ "name": "messages_conversation_id_conversations_id_fk",
1032
+ "tableFrom": "messages",
1033
+ "tableTo": "conversations",
1034
+ "columnsFrom": [
1035
+ "conversation_id"
1036
+ ],
1037
+ "columnsTo": [
1038
+ "id"
1039
+ ],
1040
+ "onDelete": "cascade",
1041
+ "onUpdate": "no action"
1042
+ }
1043
+ },
1044
+ "compositePrimaryKeys": {},
1045
+ "uniqueConstraints": {},
1046
+ "checkConstraints": {}
1047
+ },
1048
+ "session_entries": {
1049
+ "name": "session_entries",
1050
+ "columns": {
1051
+ "session_key": {
1052
+ "name": "session_key",
1053
+ "type": "text",
1054
+ "primaryKey": true,
1055
+ "notNull": true,
1056
+ "autoincrement": false
1057
+ },
1058
+ "current_conversation_id": {
1059
+ "name": "current_conversation_id",
1060
+ "type": "text",
1061
+ "primaryKey": false,
1062
+ "notNull": true,
1063
+ "autoincrement": false
1064
+ },
1065
+ "channel": {
1066
+ "name": "channel",
1067
+ "type": "text",
1068
+ "primaryKey": false,
1069
+ "notNull": true,
1070
+ "autoincrement": false
1071
+ },
1072
+ "chat_id": {
1073
+ "name": "chat_id",
1074
+ "type": "text",
1075
+ "primaryKey": false,
1076
+ "notNull": true,
1077
+ "autoincrement": false
1078
+ },
1079
+ "thread_id": {
1080
+ "name": "thread_id",
1081
+ "type": "text",
1082
+ "primaryKey": false,
1083
+ "notNull": false,
1084
+ "autoincrement": false
1085
+ },
1086
+ "account_id": {
1087
+ "name": "account_id",
1088
+ "type": "text",
1089
+ "primaryKey": false,
1090
+ "notNull": false,
1091
+ "autoincrement": false
1092
+ },
1093
+ "status": {
1094
+ "name": "status",
1095
+ "type": "text",
1096
+ "primaryKey": false,
1097
+ "notNull": true,
1098
+ "autoincrement": false,
1099
+ "default": "'active'"
1100
+ },
1101
+ "session_started_at": {
1102
+ "name": "session_started_at",
1103
+ "type": "text",
1104
+ "primaryKey": false,
1105
+ "notNull": true,
1106
+ "autoincrement": false
1107
+ },
1108
+ "last_interaction_at": {
1109
+ "name": "last_interaction_at",
1110
+ "type": "text",
1111
+ "primaryKey": false,
1112
+ "notNull": true,
1113
+ "autoincrement": false
1114
+ },
1115
+ "reset_at": {
1116
+ "name": "reset_at",
1117
+ "type": "text",
1118
+ "primaryKey": false,
1119
+ "notNull": false,
1120
+ "autoincrement": false
1121
+ },
1122
+ "reset_reason": {
1123
+ "name": "reset_reason",
1124
+ "type": "text",
1125
+ "primaryKey": false,
1126
+ "notNull": false,
1127
+ "autoincrement": false
1128
+ },
1129
+ "context_tokens": {
1130
+ "name": "context_tokens",
1131
+ "type": "integer",
1132
+ "primaryKey": false,
1133
+ "notNull": true,
1134
+ "autoincrement": false,
1135
+ "default": 0
1136
+ },
1137
+ "total_tokens": {
1138
+ "name": "total_tokens",
1139
+ "type": "integer",
1140
+ "primaryKey": false,
1141
+ "notNull": true,
1142
+ "autoincrement": false,
1143
+ "default": 0
1144
+ },
1145
+ "total_tokens_fresh": {
1146
+ "name": "total_tokens_fresh",
1147
+ "type": "integer",
1148
+ "primaryKey": false,
1149
+ "notNull": true,
1150
+ "autoincrement": false,
1151
+ "default": 0
1152
+ },
1153
+ "compaction_count": {
1154
+ "name": "compaction_count",
1155
+ "type": "integer",
1156
+ "primaryKey": false,
1157
+ "notNull": true,
1158
+ "autoincrement": false,
1159
+ "default": 0
1160
+ },
1161
+ "memory_flush_at": {
1162
+ "name": "memory_flush_at",
1163
+ "type": "text",
1164
+ "primaryKey": false,
1165
+ "notNull": false,
1166
+ "autoincrement": false
1167
+ },
1168
+ "memory_flush_compaction_count": {
1169
+ "name": "memory_flush_compaction_count",
1170
+ "type": "integer",
1171
+ "primaryKey": false,
1172
+ "notNull": true,
1173
+ "autoincrement": false,
1174
+ "default": 0
1175
+ },
1176
+ "engine_bindings": {
1177
+ "name": "engine_bindings",
1178
+ "type": "text",
1179
+ "primaryKey": false,
1180
+ "notNull": true,
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
+ "session_entries_current_conversation_id_idx": {
1200
+ "name": "session_entries_current_conversation_id_idx",
1201
+ "columns": [
1202
+ "current_conversation_id"
1203
+ ],
1204
+ "isUnique": false
1205
+ },
1206
+ "session_entries_last_interaction_at_idx": {
1207
+ "name": "session_entries_last_interaction_at_idx",
1208
+ "columns": [
1209
+ "last_interaction_at"
1210
+ ],
1211
+ "isUnique": false
1212
+ }
1213
+ },
1214
+ "foreignKeys": {
1215
+ "session_entries_current_conversation_id_conversations_id_fk": {
1216
+ "name": "session_entries_current_conversation_id_conversations_id_fk",
1217
+ "tableFrom": "session_entries",
1218
+ "tableTo": "conversations",
1219
+ "columnsFrom": [
1220
+ "current_conversation_id"
1221
+ ],
1222
+ "columnsTo": [
1223
+ "id"
1224
+ ],
1225
+ "onDelete": "no action",
1226
+ "onUpdate": "no action"
1227
+ }
1228
+ },
1229
+ "compositePrimaryKeys": {},
1230
+ "uniqueConstraints": {},
1231
+ "checkConstraints": {}
1232
+ },
1233
+ "skill_bindings": {
1234
+ "name": "skill_bindings",
1235
+ "columns": {
1236
+ "id": {
1237
+ "name": "id",
1238
+ "type": "integer",
1239
+ "primaryKey": true,
1240
+ "notNull": true,
1241
+ "autoincrement": true
1242
+ },
1243
+ "source": {
1244
+ "name": "source",
1245
+ "type": "text",
1246
+ "primaryKey": false,
1247
+ "notNull": true,
1248
+ "autoincrement": false
1249
+ },
1250
+ "brain_name": {
1251
+ "name": "brain_name",
1252
+ "type": "text",
1253
+ "primaryKey": false,
1254
+ "notNull": false,
1255
+ "autoincrement": false
1256
+ },
1257
+ "skill_name": {
1258
+ "name": "skill_name",
1259
+ "type": "text",
1260
+ "primaryKey": false,
1261
+ "notNull": true,
1262
+ "autoincrement": false
1263
+ },
1264
+ "enabled": {
1265
+ "name": "enabled",
1266
+ "type": "integer",
1267
+ "primaryKey": false,
1268
+ "notNull": true,
1269
+ "autoincrement": false,
1270
+ "default": true
1271
+ },
1272
+ "priority": {
1273
+ "name": "priority",
1274
+ "type": "integer",
1275
+ "primaryKey": false,
1276
+ "notNull": true,
1277
+ "autoincrement": false,
1278
+ "default": 0
1279
+ },
1280
+ "config": {
1281
+ "name": "config",
1282
+ "type": "text",
1283
+ "primaryKey": false,
1284
+ "notNull": false,
1285
+ "autoincrement": false
1286
+ },
1287
+ "created_at": {
1288
+ "name": "created_at",
1289
+ "type": "text",
1290
+ "primaryKey": false,
1291
+ "notNull": true,
1292
+ "autoincrement": false
1293
+ },
1294
+ "updated_at": {
1295
+ "name": "updated_at",
1296
+ "type": "text",
1297
+ "primaryKey": false,
1298
+ "notNull": true,
1299
+ "autoincrement": false
1300
+ }
1301
+ },
1302
+ "indexes": {
1303
+ "skill_bindings_source_brain_name_idx": {
1304
+ "name": "skill_bindings_source_brain_name_idx",
1305
+ "columns": [
1306
+ "source",
1307
+ "brain_name",
1308
+ "skill_name"
1309
+ ],
1310
+ "isUnique": true
1311
+ }
1312
+ },
1313
+ "foreignKeys": {},
1314
+ "compositePrimaryKeys": {},
1315
+ "uniqueConstraints": {},
1316
+ "checkConstraints": {}
1317
+ },
1318
+ "skill_drafts": {
1319
+ "name": "skill_drafts",
1320
+ "columns": {
1321
+ "id": {
1322
+ "name": "id",
1323
+ "type": "integer",
1324
+ "primaryKey": true,
1325
+ "notNull": true,
1326
+ "autoincrement": true
1327
+ },
1328
+ "proposed_name": {
1329
+ "name": "proposed_name",
1330
+ "type": "text",
1331
+ "primaryKey": false,
1332
+ "notNull": true,
1333
+ "autoincrement": false
1334
+ },
1335
+ "source": {
1336
+ "name": "source",
1337
+ "type": "text",
1338
+ "primaryKey": false,
1339
+ "notNull": true,
1340
+ "autoincrement": false
1341
+ },
1342
+ "body_markdown": {
1343
+ "name": "body_markdown",
1344
+ "type": "text",
1345
+ "primaryKey": false,
1346
+ "notNull": true,
1347
+ "autoincrement": false
1348
+ },
1349
+ "rationale": {
1350
+ "name": "rationale",
1351
+ "type": "text",
1352
+ "primaryKey": false,
1353
+ "notNull": true,
1354
+ "autoincrement": false,
1355
+ "default": "''"
1356
+ },
1357
+ "status": {
1358
+ "name": "status",
1359
+ "type": "text",
1360
+ "primaryKey": false,
1361
+ "notNull": true,
1362
+ "autoincrement": false,
1363
+ "default": "'pending'"
1364
+ },
1365
+ "created_at": {
1366
+ "name": "created_at",
1367
+ "type": "text",
1368
+ "primaryKey": false,
1369
+ "notNull": true,
1370
+ "autoincrement": false
1371
+ },
1372
+ "decided_at": {
1373
+ "name": "decided_at",
1374
+ "type": "text",
1375
+ "primaryKey": false,
1376
+ "notNull": false,
1377
+ "autoincrement": false
1378
+ },
1379
+ "decided_by": {
1380
+ "name": "decided_by",
1381
+ "type": "text",
1382
+ "primaryKey": false,
1383
+ "notNull": false,
1384
+ "autoincrement": false
1385
+ }
1386
+ },
1387
+ "indexes": {},
1388
+ "foreignKeys": {},
1389
+ "compositePrimaryKeys": {},
1390
+ "uniqueConstraints": {},
1391
+ "checkConstraints": {}
1392
+ },
1393
+ "worker_config": {
1394
+ "name": "worker_config",
1395
+ "columns": {
1396
+ "pk": {
1397
+ "name": "pk",
1398
+ "type": "text",
1399
+ "primaryKey": true,
1400
+ "notNull": true,
1401
+ "autoincrement": false,
1402
+ "default": "'default'"
1403
+ },
1404
+ "config_json": {
1405
+ "name": "config_json",
1406
+ "type": "text",
1407
+ "primaryKey": false,
1408
+ "notNull": true,
1409
+ "autoincrement": false
1410
+ },
1411
+ "version": {
1412
+ "name": "version",
1413
+ "type": "integer",
1414
+ "primaryKey": false,
1415
+ "notNull": true,
1416
+ "autoincrement": false,
1417
+ "default": 1
1418
+ },
1419
+ "updated_at": {
1420
+ "name": "updated_at",
1421
+ "type": "text",
1422
+ "primaryKey": false,
1423
+ "notNull": true,
1424
+ "autoincrement": false
1425
+ },
1426
+ "updated_by": {
1427
+ "name": "updated_by",
1428
+ "type": "text",
1429
+ "primaryKey": false,
1430
+ "notNull": false,
1431
+ "autoincrement": false
1432
+ }
1433
+ },
1434
+ "indexes": {},
1435
+ "foreignKeys": {},
1436
+ "compositePrimaryKeys": {},
1437
+ "uniqueConstraints": {},
1438
+ "checkConstraints": {}
1439
+ },
1440
+ "worker_identity": {
1441
+ "name": "worker_identity",
1442
+ "columns": {
1443
+ "pk": {
1444
+ "name": "pk",
1445
+ "type": "text",
1446
+ "primaryKey": true,
1447
+ "notNull": true,
1448
+ "autoincrement": false,
1449
+ "default": "'default'"
1450
+ },
1451
+ "worker_id": {
1452
+ "name": "worker_id",
1453
+ "type": "text",
1454
+ "primaryKey": false,
1455
+ "notNull": true,
1456
+ "autoincrement": false
1457
+ },
1458
+ "api_token_enc": {
1459
+ "name": "api_token_enc",
1460
+ "type": "text",
1461
+ "primaryKey": false,
1462
+ "notNull": true,
1463
+ "autoincrement": false
1464
+ },
1465
+ "nonce": {
1466
+ "name": "nonce",
1467
+ "type": "text",
1468
+ "primaryKey": false,
1469
+ "notNull": true,
1470
+ "autoincrement": false
1471
+ },
1472
+ "auth_tag": {
1473
+ "name": "auth_tag",
1474
+ "type": "text",
1475
+ "primaryKey": false,
1476
+ "notNull": true,
1477
+ "autoincrement": false
1478
+ },
1479
+ "bootstrap_shown_at": {
1480
+ "name": "bootstrap_shown_at",
1481
+ "type": "text",
1482
+ "primaryKey": false,
1483
+ "notNull": true,
1484
+ "autoincrement": false
1485
+ },
1486
+ "created_at": {
1487
+ "name": "created_at",
1488
+ "type": "text",
1489
+ "primaryKey": false,
1490
+ "notNull": true,
1491
+ "autoincrement": false
1492
+ },
1493
+ "rotated_at": {
1494
+ "name": "rotated_at",
1495
+ "type": "text",
1496
+ "primaryKey": false,
1497
+ "notNull": false,
1498
+ "autoincrement": false
1499
+ }
1500
+ },
1501
+ "indexes": {
1502
+ "worker_identity_worker_id_unique": {
1503
+ "name": "worker_identity_worker_id_unique",
1504
+ "columns": [
1505
+ "worker_id"
1506
+ ],
1507
+ "isUnique": true
1508
+ }
1509
+ },
1510
+ "foreignKeys": {},
1511
+ "compositePrimaryKeys": {},
1512
+ "uniqueConstraints": {},
1513
+ "checkConstraints": {}
1514
+ },
1515
+ "worker_secrets": {
1516
+ "name": "worker_secrets",
1517
+ "columns": {
1518
+ "id": {
1519
+ "name": "id",
1520
+ "type": "integer",
1521
+ "primaryKey": true,
1522
+ "notNull": true,
1523
+ "autoincrement": true
1524
+ },
1525
+ "key": {
1526
+ "name": "key",
1527
+ "type": "text",
1528
+ "primaryKey": false,
1529
+ "notNull": true,
1530
+ "autoincrement": false
1531
+ },
1532
+ "value_enc": {
1533
+ "name": "value_enc",
1534
+ "type": "text",
1535
+ "primaryKey": false,
1536
+ "notNull": true,
1537
+ "autoincrement": false
1538
+ },
1539
+ "nonce": {
1540
+ "name": "nonce",
1541
+ "type": "text",
1542
+ "primaryKey": false,
1543
+ "notNull": true,
1544
+ "autoincrement": false
1545
+ },
1546
+ "auth_tag": {
1547
+ "name": "auth_tag",
1548
+ "type": "text",
1549
+ "primaryKey": false,
1550
+ "notNull": true,
1551
+ "autoincrement": false
1552
+ },
1553
+ "created_at": {
1554
+ "name": "created_at",
1555
+ "type": "text",
1556
+ "primaryKey": false,
1557
+ "notNull": true,
1558
+ "autoincrement": false
1559
+ },
1560
+ "updated_at": {
1561
+ "name": "updated_at",
1562
+ "type": "text",
1563
+ "primaryKey": false,
1564
+ "notNull": true,
1565
+ "autoincrement": false
1566
+ }
1567
+ },
1568
+ "indexes": {
1569
+ "worker_secrets_key_unique": {
1570
+ "name": "worker_secrets_key_unique",
1571
+ "columns": [
1572
+ "key"
1573
+ ],
1574
+ "isUnique": true
1575
+ }
1576
+ },
1577
+ "foreignKeys": {},
1578
+ "compositePrimaryKeys": {},
1579
+ "uniqueConstraints": {},
1580
+ "checkConstraints": {}
1581
+ }
1582
+ },
1583
+ "views": {},
1584
+ "enums": {},
1585
+ "_meta": {
1586
+ "schemas": {},
1587
+ "tables": {},
1588
+ "columns": {}
1589
+ },
1590
+ "internal": {
1591
+ "indexes": {}
1592
+ }
1593
+ }