@grindxp/cli 0.1.1 → 0.1.2

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