@edihasaj/recall 0.5.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.
Files changed (63) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +409 -0
  3. package/dist/chunk-4CV4JOE5.js +27 -0
  4. package/dist/chunk-4CV4JOE5.js.map +1 -0
  5. package/dist/chunk-A5UIRZU6.js +469 -0
  6. package/dist/chunk-A5UIRZU6.js.map +1 -0
  7. package/dist/chunk-AYHFPCGY.js +964 -0
  8. package/dist/chunk-AYHFPCGY.js.map +1 -0
  9. package/dist/chunk-DNFKAHS6.js +204 -0
  10. package/dist/chunk-DNFKAHS6.js.map +1 -0
  11. package/dist/chunk-GC5XMBG4.js +551 -0
  12. package/dist/chunk-GC5XMBG4.js.map +1 -0
  13. package/dist/chunk-IILLSHLM.js +3021 -0
  14. package/dist/chunk-IILLSHLM.js.map +1 -0
  15. package/dist/chunk-LVQW6WHK.js +146 -0
  16. package/dist/chunk-LVQW6WHK.js.map +1 -0
  17. package/dist/chunk-LZ6PMQRX.js +955 -0
  18. package/dist/chunk-LZ6PMQRX.js.map +1 -0
  19. package/dist/chunk-PC43MBX5.js +2960 -0
  20. package/dist/chunk-PC43MBX5.js.map +1 -0
  21. package/dist/chunk-VEPXEHRZ.js +1763 -0
  22. package/dist/chunk-VEPXEHRZ.js.map +1 -0
  23. package/dist/cleanup-TVOX2S2S.js +28 -0
  24. package/dist/cleanup-TVOX2S2S.js.map +1 -0
  25. package/dist/cli.js +3425 -0
  26. package/dist/cli.js.map +1 -0
  27. package/dist/daemon.js +1298 -0
  28. package/dist/daemon.js.map +1 -0
  29. package/dist/dispatcher-UGMU6THT.js +15 -0
  30. package/dist/dispatcher-UGMU6THT.js.map +1 -0
  31. package/dist/keychain-5QG52ANO.js +22 -0
  32. package/dist/keychain-5QG52ANO.js.map +1 -0
  33. package/dist/mcp.js +21 -0
  34. package/dist/mcp.js.map +1 -0
  35. package/dist/quality-Z7LPMMBC.js +17 -0
  36. package/dist/quality-Z7LPMMBC.js.map +1 -0
  37. package/dist/sync-server.js +225 -0
  38. package/dist/sync-server.js.map +1 -0
  39. package/dist/tasks-UOLSPXJQ.js +61 -0
  40. package/dist/tasks-UOLSPXJQ.js.map +1 -0
  41. package/dist/usage-CY3V72YN.js +101 -0
  42. package/dist/usage-CY3V72YN.js.map +1 -0
  43. package/drizzle/0000_initial_create.sql +240 -0
  44. package/drizzle/0001_rich_liz_osborn.sql +21 -0
  45. package/drizzle/0002_unknown_spot.sql +18 -0
  46. package/drizzle/0003_red_wendigo.sql +19 -0
  47. package/drizzle/0004_early_carlie_cooper.sql +1 -0
  48. package/drizzle/0005_simple_emma_frost.sql +96 -0
  49. package/drizzle/0006_keen_mongoose.sql +2 -0
  50. package/drizzle/0007_flawless_maximus.sql +15 -0
  51. package/drizzle/meta/0000_snapshot.json +1630 -0
  52. package/drizzle/meta/0001_snapshot.json +1773 -0
  53. package/drizzle/meta/0002_snapshot.json +1891 -0
  54. package/drizzle/meta/0003_snapshot.json +2014 -0
  55. package/drizzle/meta/0004_snapshot.json +2022 -0
  56. package/drizzle/meta/0005_snapshot.json +2064 -0
  57. package/drizzle/meta/0006_snapshot.json +2078 -0
  58. package/drizzle/meta/0007_snapshot.json +2183 -0
  59. package/drizzle/meta/_journal.json +62 -0
  60. package/package.json +64 -0
  61. package/scripts/recall-claude +7 -0
  62. package/scripts/recall-codex +7 -0
  63. package/scripts/recall-session +71 -0
@@ -0,0 +1,2183 @@
1
+ {
2
+ "version": "6",
3
+ "dialect": "sqlite",
4
+ "id": "df67c83b-f340-4f7d-91ad-7b3763f23ee9",
5
+ "prevId": "2268abf2-8824-42b3-9f99-aeb9d2721727",
6
+ "tables": {
7
+ "activity_events": {
8
+ "name": "activity_events",
9
+ "columns": {
10
+ "id": {
11
+ "name": "id",
12
+ "type": "text",
13
+ "primaryKey": true,
14
+ "notNull": true,
15
+ "autoincrement": false
16
+ },
17
+ "session_id": {
18
+ "name": "session_id",
19
+ "type": "text",
20
+ "primaryKey": false,
21
+ "notNull": false,
22
+ "autoincrement": false
23
+ },
24
+ "repo": {
25
+ "name": "repo",
26
+ "type": "text",
27
+ "primaryKey": false,
28
+ "notNull": false,
29
+ "autoincrement": false
30
+ },
31
+ "path": {
32
+ "name": "path",
33
+ "type": "text",
34
+ "primaryKey": false,
35
+ "notNull": false,
36
+ "autoincrement": false
37
+ },
38
+ "source": {
39
+ "name": "source",
40
+ "type": "text",
41
+ "primaryKey": false,
42
+ "notNull": true,
43
+ "autoincrement": false
44
+ },
45
+ "event_type": {
46
+ "name": "event_type",
47
+ "type": "text",
48
+ "primaryKey": false,
49
+ "notNull": true,
50
+ "autoincrement": false
51
+ },
52
+ "memory_ids": {
53
+ "name": "memory_ids",
54
+ "type": "text",
55
+ "primaryKey": false,
56
+ "notNull": true,
57
+ "autoincrement": false,
58
+ "default": "'[]'"
59
+ },
60
+ "dedupe_key": {
61
+ "name": "dedupe_key",
62
+ "type": "text",
63
+ "primaryKey": false,
64
+ "notNull": false,
65
+ "autoincrement": false
66
+ },
67
+ "request": {
68
+ "name": "request",
69
+ "type": "text",
70
+ "primaryKey": false,
71
+ "notNull": true,
72
+ "autoincrement": false,
73
+ "default": "'{}'"
74
+ },
75
+ "result": {
76
+ "name": "result",
77
+ "type": "text",
78
+ "primaryKey": false,
79
+ "notNull": true,
80
+ "autoincrement": false,
81
+ "default": "'{}'"
82
+ },
83
+ "created_at": {
84
+ "name": "created_at",
85
+ "type": "text",
86
+ "primaryKey": false,
87
+ "notNull": true,
88
+ "autoincrement": false
89
+ }
90
+ },
91
+ "indexes": {
92
+ "idx_activity_session": {
93
+ "name": "idx_activity_session",
94
+ "columns": [
95
+ "session_id"
96
+ ],
97
+ "isUnique": false
98
+ },
99
+ "idx_activity_repo": {
100
+ "name": "idx_activity_repo",
101
+ "columns": [
102
+ "repo"
103
+ ],
104
+ "isUnique": false
105
+ },
106
+ "idx_activity_event_type": {
107
+ "name": "idx_activity_event_type",
108
+ "columns": [
109
+ "event_type"
110
+ ],
111
+ "isUnique": false
112
+ },
113
+ "idx_activity_created": {
114
+ "name": "idx_activity_created",
115
+ "columns": [
116
+ "created_at"
117
+ ],
118
+ "isUnique": false
119
+ },
120
+ "uq_activity_events_dedupe_key": {
121
+ "name": "uq_activity_events_dedupe_key",
122
+ "columns": [
123
+ "dedupe_key"
124
+ ],
125
+ "isUnique": true
126
+ }
127
+ },
128
+ "foreignKeys": {},
129
+ "compositePrimaryKeys": {},
130
+ "uniqueConstraints": {},
131
+ "checkConstraints": {}
132
+ },
133
+ "approval_requests": {
134
+ "name": "approval_requests",
135
+ "columns": {
136
+ "id": {
137
+ "name": "id",
138
+ "type": "text",
139
+ "primaryKey": true,
140
+ "notNull": true,
141
+ "autoincrement": false
142
+ },
143
+ "memory_id": {
144
+ "name": "memory_id",
145
+ "type": "text",
146
+ "primaryKey": false,
147
+ "notNull": true,
148
+ "autoincrement": false
149
+ },
150
+ "org_id": {
151
+ "name": "org_id",
152
+ "type": "text",
153
+ "primaryKey": false,
154
+ "notNull": true,
155
+ "autoincrement": false
156
+ },
157
+ "requested_by": {
158
+ "name": "requested_by",
159
+ "type": "text",
160
+ "primaryKey": false,
161
+ "notNull": true,
162
+ "autoincrement": false
163
+ },
164
+ "status": {
165
+ "name": "status",
166
+ "type": "text",
167
+ "primaryKey": false,
168
+ "notNull": true,
169
+ "autoincrement": false,
170
+ "default": "'pending'"
171
+ },
172
+ "reviewed_by": {
173
+ "name": "reviewed_by",
174
+ "type": "text",
175
+ "primaryKey": false,
176
+ "notNull": false,
177
+ "autoincrement": false
178
+ },
179
+ "reason": {
180
+ "name": "reason",
181
+ "type": "text",
182
+ "primaryKey": false,
183
+ "notNull": false,
184
+ "autoincrement": false
185
+ },
186
+ "created_at": {
187
+ "name": "created_at",
188
+ "type": "text",
189
+ "primaryKey": false,
190
+ "notNull": true,
191
+ "autoincrement": false
192
+ },
193
+ "resolved_at": {
194
+ "name": "resolved_at",
195
+ "type": "text",
196
+ "primaryKey": false,
197
+ "notNull": false,
198
+ "autoincrement": false
199
+ }
200
+ },
201
+ "indexes": {
202
+ "idx_approval_org": {
203
+ "name": "idx_approval_org",
204
+ "columns": [
205
+ "org_id"
206
+ ],
207
+ "isUnique": false
208
+ },
209
+ "idx_approval_status": {
210
+ "name": "idx_approval_status",
211
+ "columns": [
212
+ "status"
213
+ ],
214
+ "isUnique": false
215
+ }
216
+ },
217
+ "foreignKeys": {
218
+ "approval_requests_memory_id_memories_id_fk": {
219
+ "name": "approval_requests_memory_id_memories_id_fk",
220
+ "tableFrom": "approval_requests",
221
+ "tableTo": "memories",
222
+ "columnsFrom": [
223
+ "memory_id"
224
+ ],
225
+ "columnsTo": [
226
+ "id"
227
+ ],
228
+ "onDelete": "no action",
229
+ "onUpdate": "no action"
230
+ }
231
+ },
232
+ "compositePrimaryKeys": {},
233
+ "uniqueConstraints": {},
234
+ "checkConstraints": {}
235
+ },
236
+ "audit_trail": {
237
+ "name": "audit_trail",
238
+ "columns": {
239
+ "id": {
240
+ "name": "id",
241
+ "type": "text",
242
+ "primaryKey": true,
243
+ "notNull": true,
244
+ "autoincrement": false
245
+ },
246
+ "memory_id": {
247
+ "name": "memory_id",
248
+ "type": "text",
249
+ "primaryKey": false,
250
+ "notNull": true,
251
+ "autoincrement": false
252
+ },
253
+ "action": {
254
+ "name": "action",
255
+ "type": "text",
256
+ "primaryKey": false,
257
+ "notNull": true,
258
+ "autoincrement": false
259
+ },
260
+ "actor": {
261
+ "name": "actor",
262
+ "type": "text",
263
+ "primaryKey": false,
264
+ "notNull": true,
265
+ "autoincrement": false
266
+ },
267
+ "before_snapshot": {
268
+ "name": "before_snapshot",
269
+ "type": "text",
270
+ "primaryKey": false,
271
+ "notNull": false,
272
+ "autoincrement": false
273
+ },
274
+ "after_snapshot": {
275
+ "name": "after_snapshot",
276
+ "type": "text",
277
+ "primaryKey": false,
278
+ "notNull": false,
279
+ "autoincrement": false
280
+ },
281
+ "reason": {
282
+ "name": "reason",
283
+ "type": "text",
284
+ "primaryKey": false,
285
+ "notNull": false,
286
+ "autoincrement": false
287
+ },
288
+ "timestamp": {
289
+ "name": "timestamp",
290
+ "type": "text",
291
+ "primaryKey": false,
292
+ "notNull": true,
293
+ "autoincrement": false
294
+ }
295
+ },
296
+ "indexes": {
297
+ "idx_audit_memory": {
298
+ "name": "idx_audit_memory",
299
+ "columns": [
300
+ "memory_id"
301
+ ],
302
+ "isUnique": false
303
+ },
304
+ "idx_audit_timestamp": {
305
+ "name": "idx_audit_timestamp",
306
+ "columns": [
307
+ "timestamp"
308
+ ],
309
+ "isUnique": false
310
+ }
311
+ },
312
+ "foreignKeys": {},
313
+ "compositePrimaryKeys": {},
314
+ "uniqueConstraints": {},
315
+ "checkConstraints": {}
316
+ },
317
+ "contradictions": {
318
+ "name": "contradictions",
319
+ "columns": {
320
+ "id": {
321
+ "name": "id",
322
+ "type": "text",
323
+ "primaryKey": true,
324
+ "notNull": true,
325
+ "autoincrement": false
326
+ },
327
+ "memory_a_id": {
328
+ "name": "memory_a_id",
329
+ "type": "text",
330
+ "primaryKey": false,
331
+ "notNull": true,
332
+ "autoincrement": false
333
+ },
334
+ "memory_b_id": {
335
+ "name": "memory_b_id",
336
+ "type": "text",
337
+ "primaryKey": false,
338
+ "notNull": true,
339
+ "autoincrement": false
340
+ },
341
+ "contradiction_type": {
342
+ "name": "contradiction_type",
343
+ "type": "text",
344
+ "primaryKey": false,
345
+ "notNull": true,
346
+ "autoincrement": false
347
+ },
348
+ "severity": {
349
+ "name": "severity",
350
+ "type": "text",
351
+ "primaryKey": false,
352
+ "notNull": true,
353
+ "autoincrement": false
354
+ },
355
+ "description": {
356
+ "name": "description",
357
+ "type": "text",
358
+ "primaryKey": false,
359
+ "notNull": true,
360
+ "autoincrement": false
361
+ },
362
+ "resolved": {
363
+ "name": "resolved",
364
+ "type": "integer",
365
+ "primaryKey": false,
366
+ "notNull": true,
367
+ "autoincrement": false,
368
+ "default": false
369
+ },
370
+ "resolution": {
371
+ "name": "resolution",
372
+ "type": "text",
373
+ "primaryKey": false,
374
+ "notNull": false,
375
+ "autoincrement": false
376
+ },
377
+ "detected_at": {
378
+ "name": "detected_at",
379
+ "type": "text",
380
+ "primaryKey": false,
381
+ "notNull": true,
382
+ "autoincrement": false
383
+ },
384
+ "resolved_at": {
385
+ "name": "resolved_at",
386
+ "type": "text",
387
+ "primaryKey": false,
388
+ "notNull": false,
389
+ "autoincrement": false
390
+ }
391
+ },
392
+ "indexes": {
393
+ "idx_contradictions_resolved": {
394
+ "name": "idx_contradictions_resolved",
395
+ "columns": [
396
+ "resolved"
397
+ ],
398
+ "isUnique": false
399
+ }
400
+ },
401
+ "foreignKeys": {
402
+ "contradictions_memory_a_id_memories_id_fk": {
403
+ "name": "contradictions_memory_a_id_memories_id_fk",
404
+ "tableFrom": "contradictions",
405
+ "tableTo": "memories",
406
+ "columnsFrom": [
407
+ "memory_a_id"
408
+ ],
409
+ "columnsTo": [
410
+ "id"
411
+ ],
412
+ "onDelete": "no action",
413
+ "onUpdate": "no action"
414
+ },
415
+ "contradictions_memory_b_id_memories_id_fk": {
416
+ "name": "contradictions_memory_b_id_memories_id_fk",
417
+ "tableFrom": "contradictions",
418
+ "tableTo": "memories",
419
+ "columnsFrom": [
420
+ "memory_b_id"
421
+ ],
422
+ "columnsTo": [
423
+ "id"
424
+ ],
425
+ "onDelete": "no action",
426
+ "onUpdate": "no action"
427
+ }
428
+ },
429
+ "compositePrimaryKeys": {},
430
+ "uniqueConstraints": {},
431
+ "checkConstraints": {}
432
+ },
433
+ "eval_sessions": {
434
+ "name": "eval_sessions",
435
+ "columns": {
436
+ "id": {
437
+ "name": "id",
438
+ "type": "text",
439
+ "primaryKey": true,
440
+ "notNull": true,
441
+ "autoincrement": false
442
+ },
443
+ "repo": {
444
+ "name": "repo",
445
+ "type": "text",
446
+ "primaryKey": false,
447
+ "notNull": true,
448
+ "autoincrement": false
449
+ },
450
+ "started_at": {
451
+ "name": "started_at",
452
+ "type": "text",
453
+ "primaryKey": false,
454
+ "notNull": true,
455
+ "autoincrement": false
456
+ },
457
+ "ended_at": {
458
+ "name": "ended_at",
459
+ "type": "text",
460
+ "primaryKey": false,
461
+ "notNull": false,
462
+ "autoincrement": false
463
+ },
464
+ "memories_injected": {
465
+ "name": "memories_injected",
466
+ "type": "integer",
467
+ "primaryKey": false,
468
+ "notNull": true,
469
+ "autoincrement": false,
470
+ "default": 0
471
+ },
472
+ "memories_followed": {
473
+ "name": "memories_followed",
474
+ "type": "integer",
475
+ "primaryKey": false,
476
+ "notNull": true,
477
+ "autoincrement": false,
478
+ "default": 0
479
+ },
480
+ "memories_overridden": {
481
+ "name": "memories_overridden",
482
+ "type": "integer",
483
+ "primaryKey": false,
484
+ "notNull": true,
485
+ "autoincrement": false,
486
+ "default": 0
487
+ },
488
+ "user_corrections": {
489
+ "name": "user_corrections",
490
+ "type": "integer",
491
+ "primaryKey": false,
492
+ "notNull": true,
493
+ "autoincrement": false,
494
+ "default": 0
495
+ },
496
+ "test_passes": {
497
+ "name": "test_passes",
498
+ "type": "integer",
499
+ "primaryKey": false,
500
+ "notNull": true,
501
+ "autoincrement": false,
502
+ "default": 0
503
+ },
504
+ "test_failures": {
505
+ "name": "test_failures",
506
+ "type": "integer",
507
+ "primaryKey": false,
508
+ "notNull": true,
509
+ "autoincrement": false,
510
+ "default": 0
511
+ }
512
+ },
513
+ "indexes": {
514
+ "idx_eval_repo": {
515
+ "name": "idx_eval_repo",
516
+ "columns": [
517
+ "repo"
518
+ ],
519
+ "isUnique": false
520
+ }
521
+ },
522
+ "foreignKeys": {},
523
+ "compositePrimaryKeys": {},
524
+ "uniqueConstraints": {},
525
+ "checkConstraints": {}
526
+ },
527
+ "feedback_events": {
528
+ "name": "feedback_events",
529
+ "columns": {
530
+ "id": {
531
+ "name": "id",
532
+ "type": "text",
533
+ "primaryKey": true,
534
+ "notNull": true,
535
+ "autoincrement": false
536
+ },
537
+ "memory_id": {
538
+ "name": "memory_id",
539
+ "type": "text",
540
+ "primaryKey": false,
541
+ "notNull": true,
542
+ "autoincrement": false
543
+ },
544
+ "session_id": {
545
+ "name": "session_id",
546
+ "type": "text",
547
+ "primaryKey": false,
548
+ "notNull": true,
549
+ "autoincrement": false
550
+ },
551
+ "injected": {
552
+ "name": "injected",
553
+ "type": "integer",
554
+ "primaryKey": false,
555
+ "notNull": true,
556
+ "autoincrement": false
557
+ },
558
+ "outcome": {
559
+ "name": "outcome",
560
+ "type": "text",
561
+ "primaryKey": false,
562
+ "notNull": true,
563
+ "autoincrement": false
564
+ },
565
+ "timestamp": {
566
+ "name": "timestamp",
567
+ "type": "text",
568
+ "primaryKey": false,
569
+ "notNull": true,
570
+ "autoincrement": false
571
+ }
572
+ },
573
+ "indexes": {
574
+ "idx_feedback_memory": {
575
+ "name": "idx_feedback_memory",
576
+ "columns": [
577
+ "memory_id"
578
+ ],
579
+ "isUnique": false
580
+ },
581
+ "idx_feedback_session": {
582
+ "name": "idx_feedback_session",
583
+ "columns": [
584
+ "session_id"
585
+ ],
586
+ "isUnique": false
587
+ }
588
+ },
589
+ "foreignKeys": {
590
+ "feedback_events_memory_id_memories_id_fk": {
591
+ "name": "feedback_events_memory_id_memories_id_fk",
592
+ "tableFrom": "feedback_events",
593
+ "tableTo": "memories",
594
+ "columnsFrom": [
595
+ "memory_id"
596
+ ],
597
+ "columnsTo": [
598
+ "id"
599
+ ],
600
+ "onDelete": "no action",
601
+ "onUpdate": "no action"
602
+ }
603
+ },
604
+ "compositePrimaryKeys": {},
605
+ "uniqueConstraints": {},
606
+ "checkConstraints": {}
607
+ },
608
+ "history_injections": {
609
+ "name": "history_injections",
610
+ "columns": {
611
+ "id": {
612
+ "name": "id",
613
+ "type": "text",
614
+ "primaryKey": true,
615
+ "notNull": true,
616
+ "autoincrement": false
617
+ },
618
+ "snippet_id": {
619
+ "name": "snippet_id",
620
+ "type": "text",
621
+ "primaryKey": false,
622
+ "notNull": true,
623
+ "autoincrement": false
624
+ },
625
+ "session_id": {
626
+ "name": "session_id",
627
+ "type": "text",
628
+ "primaryKey": false,
629
+ "notNull": true,
630
+ "autoincrement": false
631
+ },
632
+ "repo": {
633
+ "name": "repo",
634
+ "type": "text",
635
+ "primaryKey": false,
636
+ "notNull": false,
637
+ "autoincrement": false
638
+ },
639
+ "injected_at": {
640
+ "name": "injected_at",
641
+ "type": "text",
642
+ "primaryKey": false,
643
+ "notNull": true,
644
+ "autoincrement": false
645
+ }
646
+ },
647
+ "indexes": {
648
+ "idx_history_injections_snippet": {
649
+ "name": "idx_history_injections_snippet",
650
+ "columns": [
651
+ "snippet_id"
652
+ ],
653
+ "isUnique": false
654
+ },
655
+ "idx_history_injections_session": {
656
+ "name": "idx_history_injections_session",
657
+ "columns": [
658
+ "session_id"
659
+ ],
660
+ "isUnique": false
661
+ },
662
+ "idx_history_injections_repo": {
663
+ "name": "idx_history_injections_repo",
664
+ "columns": [
665
+ "repo"
666
+ ],
667
+ "isUnique": false
668
+ },
669
+ "uq_history_injections_snippet_session": {
670
+ "name": "uq_history_injections_snippet_session",
671
+ "columns": [
672
+ "snippet_id",
673
+ "session_id"
674
+ ],
675
+ "isUnique": true
676
+ }
677
+ },
678
+ "foreignKeys": {
679
+ "history_injections_snippet_id_history_snippets_id_fk": {
680
+ "name": "history_injections_snippet_id_history_snippets_id_fk",
681
+ "tableFrom": "history_injections",
682
+ "tableTo": "history_snippets",
683
+ "columnsFrom": [
684
+ "snippet_id"
685
+ ],
686
+ "columnsTo": [
687
+ "id"
688
+ ],
689
+ "onDelete": "cascade",
690
+ "onUpdate": "no action"
691
+ }
692
+ },
693
+ "compositePrimaryKeys": {},
694
+ "uniqueConstraints": {},
695
+ "checkConstraints": {}
696
+ },
697
+ "history_snippet_embeddings": {
698
+ "name": "history_snippet_embeddings",
699
+ "columns": {
700
+ "snippet_id": {
701
+ "name": "snippet_id",
702
+ "type": "text",
703
+ "primaryKey": true,
704
+ "notNull": true,
705
+ "autoincrement": false
706
+ },
707
+ "model": {
708
+ "name": "model",
709
+ "type": "text",
710
+ "primaryKey": false,
711
+ "notNull": true,
712
+ "autoincrement": false
713
+ },
714
+ "embedding_dimensions": {
715
+ "name": "embedding_dimensions",
716
+ "type": "integer",
717
+ "primaryKey": false,
718
+ "notNull": true,
719
+ "autoincrement": false
720
+ },
721
+ "index_dimensions": {
722
+ "name": "index_dimensions",
723
+ "type": "integer",
724
+ "primaryKey": false,
725
+ "notNull": true,
726
+ "autoincrement": false
727
+ },
728
+ "version": {
729
+ "name": "version",
730
+ "type": "text",
731
+ "primaryKey": false,
732
+ "notNull": true,
733
+ "autoincrement": false
734
+ },
735
+ "content_hash": {
736
+ "name": "content_hash",
737
+ "type": "text",
738
+ "primaryKey": false,
739
+ "notNull": true,
740
+ "autoincrement": false
741
+ },
742
+ "updated_at": {
743
+ "name": "updated_at",
744
+ "type": "text",
745
+ "primaryKey": false,
746
+ "notNull": true,
747
+ "autoincrement": false
748
+ },
749
+ "embedding": {
750
+ "name": "embedding",
751
+ "type": "blob",
752
+ "primaryKey": false,
753
+ "notNull": true,
754
+ "autoincrement": false
755
+ }
756
+ },
757
+ "indexes": {
758
+ "idx_history_embeddings_model": {
759
+ "name": "idx_history_embeddings_model",
760
+ "columns": [
761
+ "model"
762
+ ],
763
+ "isUnique": false
764
+ },
765
+ "idx_history_embeddings_updated": {
766
+ "name": "idx_history_embeddings_updated",
767
+ "columns": [
768
+ "updated_at"
769
+ ],
770
+ "isUnique": false
771
+ }
772
+ },
773
+ "foreignKeys": {
774
+ "history_snippet_embeddings_snippet_id_history_snippets_id_fk": {
775
+ "name": "history_snippet_embeddings_snippet_id_history_snippets_id_fk",
776
+ "tableFrom": "history_snippet_embeddings",
777
+ "tableTo": "history_snippets",
778
+ "columnsFrom": [
779
+ "snippet_id"
780
+ ],
781
+ "columnsTo": [
782
+ "id"
783
+ ],
784
+ "onDelete": "cascade",
785
+ "onUpdate": "no action"
786
+ }
787
+ },
788
+ "compositePrimaryKeys": {},
789
+ "uniqueConstraints": {},
790
+ "checkConstraints": {}
791
+ },
792
+ "history_snippets": {
793
+ "name": "history_snippets",
794
+ "columns": {
795
+ "id": {
796
+ "name": "id",
797
+ "type": "text",
798
+ "primaryKey": true,
799
+ "notNull": true,
800
+ "autoincrement": false
801
+ },
802
+ "repo": {
803
+ "name": "repo",
804
+ "type": "text",
805
+ "primaryKey": false,
806
+ "notNull": false,
807
+ "autoincrement": false
808
+ },
809
+ "session_id": {
810
+ "name": "session_id",
811
+ "type": "text",
812
+ "primaryKey": false,
813
+ "notNull": false,
814
+ "autoincrement": false
815
+ },
816
+ "kind": {
817
+ "name": "kind",
818
+ "type": "text",
819
+ "primaryKey": false,
820
+ "notNull": true,
821
+ "autoincrement": false
822
+ },
823
+ "text": {
824
+ "name": "text",
825
+ "type": "text",
826
+ "primaryKey": false,
827
+ "notNull": true,
828
+ "autoincrement": false
829
+ },
830
+ "dedupe_key": {
831
+ "name": "dedupe_key",
832
+ "type": "text",
833
+ "primaryKey": false,
834
+ "notNull": false,
835
+ "autoincrement": false
836
+ },
837
+ "source_activity_ids": {
838
+ "name": "source_activity_ids",
839
+ "type": "text",
840
+ "primaryKey": false,
841
+ "notNull": true,
842
+ "autoincrement": false,
843
+ "default": "'[]'"
844
+ },
845
+ "created_at": {
846
+ "name": "created_at",
847
+ "type": "text",
848
+ "primaryKey": false,
849
+ "notNull": true,
850
+ "autoincrement": false
851
+ },
852
+ "updated_at": {
853
+ "name": "updated_at",
854
+ "type": "text",
855
+ "primaryKey": false,
856
+ "notNull": true,
857
+ "autoincrement": false
858
+ }
859
+ },
860
+ "indexes": {
861
+ "idx_history_repo": {
862
+ "name": "idx_history_repo",
863
+ "columns": [
864
+ "repo"
865
+ ],
866
+ "isUnique": false
867
+ },
868
+ "idx_history_session": {
869
+ "name": "idx_history_session",
870
+ "columns": [
871
+ "session_id"
872
+ ],
873
+ "isUnique": false
874
+ },
875
+ "idx_history_kind": {
876
+ "name": "idx_history_kind",
877
+ "columns": [
878
+ "kind"
879
+ ],
880
+ "isUnique": false
881
+ },
882
+ "idx_history_created": {
883
+ "name": "idx_history_created",
884
+ "columns": [
885
+ "created_at"
886
+ ],
887
+ "isUnique": false
888
+ },
889
+ "uq_history_snippets_dedupe_key": {
890
+ "name": "uq_history_snippets_dedupe_key",
891
+ "columns": [
892
+ "dedupe_key"
893
+ ],
894
+ "isUnique": true
895
+ }
896
+ },
897
+ "foreignKeys": {},
898
+ "compositePrimaryKeys": {},
899
+ "uniqueConstraints": {},
900
+ "checkConstraints": {}
901
+ },
902
+ "hook_calls": {
903
+ "name": "hook_calls",
904
+ "columns": {
905
+ "id": {
906
+ "name": "id",
907
+ "type": "text",
908
+ "primaryKey": true,
909
+ "notNull": true,
910
+ "autoincrement": false
911
+ },
912
+ "event": {
913
+ "name": "event",
914
+ "type": "text",
915
+ "primaryKey": false,
916
+ "notNull": true,
917
+ "autoincrement": false
918
+ },
919
+ "agent": {
920
+ "name": "agent",
921
+ "type": "text",
922
+ "primaryKey": false,
923
+ "notNull": true,
924
+ "autoincrement": false
925
+ },
926
+ "dedupe_key": {
927
+ "name": "dedupe_key",
928
+ "type": "text",
929
+ "primaryKey": false,
930
+ "notNull": false,
931
+ "autoincrement": false
932
+ },
933
+ "duration_ms": {
934
+ "name": "duration_ms",
935
+ "type": "integer",
936
+ "primaryKey": false,
937
+ "notNull": true,
938
+ "autoincrement": false
939
+ },
940
+ "ok": {
941
+ "name": "ok",
942
+ "type": "integer",
943
+ "primaryKey": false,
944
+ "notNull": true,
945
+ "autoincrement": false
946
+ },
947
+ "created_at": {
948
+ "name": "created_at",
949
+ "type": "text",
950
+ "primaryKey": false,
951
+ "notNull": true,
952
+ "autoincrement": false
953
+ }
954
+ },
955
+ "indexes": {
956
+ "idx_hook_calls_event": {
957
+ "name": "idx_hook_calls_event",
958
+ "columns": [
959
+ "event"
960
+ ],
961
+ "isUnique": false
962
+ },
963
+ "idx_hook_calls_agent": {
964
+ "name": "idx_hook_calls_agent",
965
+ "columns": [
966
+ "agent"
967
+ ],
968
+ "isUnique": false
969
+ },
970
+ "idx_hook_calls_created": {
971
+ "name": "idx_hook_calls_created",
972
+ "columns": [
973
+ "created_at"
974
+ ],
975
+ "isUnique": false
976
+ },
977
+ "uq_hook_calls_dedupe_key": {
978
+ "name": "uq_hook_calls_dedupe_key",
979
+ "columns": [
980
+ "dedupe_key"
981
+ ],
982
+ "isUnique": true
983
+ }
984
+ },
985
+ "foreignKeys": {},
986
+ "compositePrimaryKeys": {},
987
+ "uniqueConstraints": {},
988
+ "checkConstraints": {}
989
+ },
990
+ "implicit_signals": {
991
+ "name": "implicit_signals",
992
+ "columns": {
993
+ "id": {
994
+ "name": "id",
995
+ "type": "text",
996
+ "primaryKey": true,
997
+ "notNull": true,
998
+ "autoincrement": false
999
+ },
1000
+ "memory_id": {
1001
+ "name": "memory_id",
1002
+ "type": "text",
1003
+ "primaryKey": false,
1004
+ "notNull": true,
1005
+ "autoincrement": false
1006
+ },
1007
+ "session_id": {
1008
+ "name": "session_id",
1009
+ "type": "text",
1010
+ "primaryKey": false,
1011
+ "notNull": true,
1012
+ "autoincrement": false
1013
+ },
1014
+ "signal_type": {
1015
+ "name": "signal_type",
1016
+ "type": "text",
1017
+ "primaryKey": false,
1018
+ "notNull": true,
1019
+ "autoincrement": false
1020
+ },
1021
+ "timestamp": {
1022
+ "name": "timestamp",
1023
+ "type": "text",
1024
+ "primaryKey": false,
1025
+ "notNull": true,
1026
+ "autoincrement": false
1027
+ },
1028
+ "context": {
1029
+ "name": "context",
1030
+ "type": "text",
1031
+ "primaryKey": false,
1032
+ "notNull": false,
1033
+ "autoincrement": false
1034
+ }
1035
+ },
1036
+ "indexes": {
1037
+ "idx_implicit_memory": {
1038
+ "name": "idx_implicit_memory",
1039
+ "columns": [
1040
+ "memory_id"
1041
+ ],
1042
+ "isUnique": false
1043
+ },
1044
+ "idx_implicit_session": {
1045
+ "name": "idx_implicit_session",
1046
+ "columns": [
1047
+ "session_id"
1048
+ ],
1049
+ "isUnique": false
1050
+ }
1051
+ },
1052
+ "foreignKeys": {
1053
+ "implicit_signals_memory_id_memories_id_fk": {
1054
+ "name": "implicit_signals_memory_id_memories_id_fk",
1055
+ "tableFrom": "implicit_signals",
1056
+ "tableTo": "memories",
1057
+ "columnsFrom": [
1058
+ "memory_id"
1059
+ ],
1060
+ "columnsTo": [
1061
+ "id"
1062
+ ],
1063
+ "onDelete": "no action",
1064
+ "onUpdate": "no action"
1065
+ }
1066
+ },
1067
+ "compositePrimaryKeys": {},
1068
+ "uniqueConstraints": {},
1069
+ "checkConstraints": {}
1070
+ },
1071
+ "llm_usage": {
1072
+ "name": "llm_usage",
1073
+ "columns": {
1074
+ "id": {
1075
+ "name": "id",
1076
+ "type": "text",
1077
+ "primaryKey": true,
1078
+ "notNull": true,
1079
+ "autoincrement": false
1080
+ },
1081
+ "provider": {
1082
+ "name": "provider",
1083
+ "type": "text",
1084
+ "primaryKey": false,
1085
+ "notNull": true,
1086
+ "autoincrement": false
1087
+ },
1088
+ "model": {
1089
+ "name": "model",
1090
+ "type": "text",
1091
+ "primaryKey": false,
1092
+ "notNull": true,
1093
+ "autoincrement": false
1094
+ },
1095
+ "task_kind": {
1096
+ "name": "task_kind",
1097
+ "type": "text",
1098
+ "primaryKey": false,
1099
+ "notNull": true,
1100
+ "autoincrement": false
1101
+ },
1102
+ "task_id": {
1103
+ "name": "task_id",
1104
+ "type": "text",
1105
+ "primaryKey": false,
1106
+ "notNull": false,
1107
+ "autoincrement": false
1108
+ },
1109
+ "repo": {
1110
+ "name": "repo",
1111
+ "type": "text",
1112
+ "primaryKey": false,
1113
+ "notNull": false,
1114
+ "autoincrement": false
1115
+ },
1116
+ "prompt_tokens": {
1117
+ "name": "prompt_tokens",
1118
+ "type": "integer",
1119
+ "primaryKey": false,
1120
+ "notNull": true,
1121
+ "autoincrement": false,
1122
+ "default": 0
1123
+ },
1124
+ "completion_tokens": {
1125
+ "name": "completion_tokens",
1126
+ "type": "integer",
1127
+ "primaryKey": false,
1128
+ "notNull": true,
1129
+ "autoincrement": false,
1130
+ "default": 0
1131
+ },
1132
+ "total_tokens": {
1133
+ "name": "total_tokens",
1134
+ "type": "integer",
1135
+ "primaryKey": false,
1136
+ "notNull": true,
1137
+ "autoincrement": false,
1138
+ "default": 0
1139
+ },
1140
+ "cost_usd": {
1141
+ "name": "cost_usd",
1142
+ "type": "real",
1143
+ "primaryKey": false,
1144
+ "notNull": false,
1145
+ "autoincrement": false
1146
+ },
1147
+ "duration_ms": {
1148
+ "name": "duration_ms",
1149
+ "type": "integer",
1150
+ "primaryKey": false,
1151
+ "notNull": true,
1152
+ "autoincrement": false,
1153
+ "default": 0
1154
+ },
1155
+ "ok": {
1156
+ "name": "ok",
1157
+ "type": "integer",
1158
+ "primaryKey": false,
1159
+ "notNull": true,
1160
+ "autoincrement": false,
1161
+ "default": true
1162
+ },
1163
+ "error": {
1164
+ "name": "error",
1165
+ "type": "text",
1166
+ "primaryKey": false,
1167
+ "notNull": false,
1168
+ "autoincrement": false
1169
+ },
1170
+ "created_at": {
1171
+ "name": "created_at",
1172
+ "type": "text",
1173
+ "primaryKey": false,
1174
+ "notNull": true,
1175
+ "autoincrement": false
1176
+ }
1177
+ },
1178
+ "indexes": {
1179
+ "idx_llm_usage_created": {
1180
+ "name": "idx_llm_usage_created",
1181
+ "columns": [
1182
+ "created_at"
1183
+ ],
1184
+ "isUnique": false
1185
+ },
1186
+ "idx_llm_usage_provider_model": {
1187
+ "name": "idx_llm_usage_provider_model",
1188
+ "columns": [
1189
+ "provider",
1190
+ "model"
1191
+ ],
1192
+ "isUnique": false
1193
+ },
1194
+ "idx_llm_usage_task_kind": {
1195
+ "name": "idx_llm_usage_task_kind",
1196
+ "columns": [
1197
+ "task_kind"
1198
+ ],
1199
+ "isUnique": false
1200
+ },
1201
+ "idx_llm_usage_repo": {
1202
+ "name": "idx_llm_usage_repo",
1203
+ "columns": [
1204
+ "repo"
1205
+ ],
1206
+ "isUnique": false
1207
+ }
1208
+ },
1209
+ "foreignKeys": {},
1210
+ "compositePrimaryKeys": {},
1211
+ "uniqueConstraints": {},
1212
+ "checkConstraints": {}
1213
+ },
1214
+ "maintenance_cleanup_log": {
1215
+ "name": "maintenance_cleanup_log",
1216
+ "columns": {
1217
+ "id": {
1218
+ "name": "id",
1219
+ "type": "text",
1220
+ "primaryKey": true,
1221
+ "notNull": true,
1222
+ "autoincrement": false
1223
+ },
1224
+ "run_id": {
1225
+ "name": "run_id",
1226
+ "type": "text",
1227
+ "primaryKey": false,
1228
+ "notNull": true,
1229
+ "autoincrement": false
1230
+ },
1231
+ "action": {
1232
+ "name": "action",
1233
+ "type": "text",
1234
+ "primaryKey": false,
1235
+ "notNull": true,
1236
+ "autoincrement": false
1237
+ },
1238
+ "memory_id": {
1239
+ "name": "memory_id",
1240
+ "type": "text",
1241
+ "primaryKey": false,
1242
+ "notNull": true,
1243
+ "autoincrement": false
1244
+ },
1245
+ "related_memory_id": {
1246
+ "name": "related_memory_id",
1247
+ "type": "text",
1248
+ "primaryKey": false,
1249
+ "notNull": false,
1250
+ "autoincrement": false
1251
+ },
1252
+ "before_snapshot": {
1253
+ "name": "before_snapshot",
1254
+ "type": "text",
1255
+ "primaryKey": false,
1256
+ "notNull": false,
1257
+ "autoincrement": false
1258
+ },
1259
+ "after_snapshot": {
1260
+ "name": "after_snapshot",
1261
+ "type": "text",
1262
+ "primaryKey": false,
1263
+ "notNull": false,
1264
+ "autoincrement": false
1265
+ },
1266
+ "details": {
1267
+ "name": "details",
1268
+ "type": "text",
1269
+ "primaryKey": false,
1270
+ "notNull": true,
1271
+ "autoincrement": false,
1272
+ "default": "'{}'"
1273
+ },
1274
+ "reverted": {
1275
+ "name": "reverted",
1276
+ "type": "integer",
1277
+ "primaryKey": false,
1278
+ "notNull": true,
1279
+ "autoincrement": false,
1280
+ "default": false
1281
+ },
1282
+ "reverted_at": {
1283
+ "name": "reverted_at",
1284
+ "type": "text",
1285
+ "primaryKey": false,
1286
+ "notNull": false,
1287
+ "autoincrement": false
1288
+ },
1289
+ "created_at": {
1290
+ "name": "created_at",
1291
+ "type": "text",
1292
+ "primaryKey": false,
1293
+ "notNull": true,
1294
+ "autoincrement": false
1295
+ }
1296
+ },
1297
+ "indexes": {
1298
+ "idx_cleanup_log_run": {
1299
+ "name": "idx_cleanup_log_run",
1300
+ "columns": [
1301
+ "run_id"
1302
+ ],
1303
+ "isUnique": false
1304
+ },
1305
+ "idx_cleanup_log_memory": {
1306
+ "name": "idx_cleanup_log_memory",
1307
+ "columns": [
1308
+ "memory_id"
1309
+ ],
1310
+ "isUnique": false
1311
+ },
1312
+ "idx_cleanup_log_action": {
1313
+ "name": "idx_cleanup_log_action",
1314
+ "columns": [
1315
+ "action"
1316
+ ],
1317
+ "isUnique": false
1318
+ },
1319
+ "idx_cleanup_log_created": {
1320
+ "name": "idx_cleanup_log_created",
1321
+ "columns": [
1322
+ "created_at"
1323
+ ],
1324
+ "isUnique": false
1325
+ }
1326
+ },
1327
+ "foreignKeys": {},
1328
+ "compositePrimaryKeys": {},
1329
+ "uniqueConstraints": {},
1330
+ "checkConstraints": {}
1331
+ },
1332
+ "memories": {
1333
+ "name": "memories",
1334
+ "columns": {
1335
+ "id": {
1336
+ "name": "id",
1337
+ "type": "text",
1338
+ "primaryKey": true,
1339
+ "notNull": true,
1340
+ "autoincrement": false
1341
+ },
1342
+ "type": {
1343
+ "name": "type",
1344
+ "type": "text",
1345
+ "primaryKey": false,
1346
+ "notNull": true,
1347
+ "autoincrement": false
1348
+ },
1349
+ "text": {
1350
+ "name": "text",
1351
+ "type": "text",
1352
+ "primaryKey": false,
1353
+ "notNull": true,
1354
+ "autoincrement": false
1355
+ },
1356
+ "scope": {
1357
+ "name": "scope",
1358
+ "type": "text",
1359
+ "primaryKey": false,
1360
+ "notNull": true,
1361
+ "autoincrement": false
1362
+ },
1363
+ "path_scope": {
1364
+ "name": "path_scope",
1365
+ "type": "text",
1366
+ "primaryKey": false,
1367
+ "notNull": false,
1368
+ "autoincrement": false
1369
+ },
1370
+ "repo": {
1371
+ "name": "repo",
1372
+ "type": "text",
1373
+ "primaryKey": false,
1374
+ "notNull": false,
1375
+ "autoincrement": false
1376
+ },
1377
+ "status": {
1378
+ "name": "status",
1379
+ "type": "text",
1380
+ "primaryKey": false,
1381
+ "notNull": true,
1382
+ "autoincrement": false
1383
+ },
1384
+ "confidence": {
1385
+ "name": "confidence",
1386
+ "type": "real",
1387
+ "primaryKey": false,
1388
+ "notNull": true,
1389
+ "autoincrement": false,
1390
+ "default": 0
1391
+ },
1392
+ "source": {
1393
+ "name": "source",
1394
+ "type": "text",
1395
+ "primaryKey": false,
1396
+ "notNull": true,
1397
+ "autoincrement": false
1398
+ },
1399
+ "evidence": {
1400
+ "name": "evidence",
1401
+ "type": "text",
1402
+ "primaryKey": false,
1403
+ "notNull": true,
1404
+ "autoincrement": false,
1405
+ "default": "'[]'"
1406
+ },
1407
+ "capture_context": {
1408
+ "name": "capture_context",
1409
+ "type": "text",
1410
+ "primaryKey": false,
1411
+ "notNull": false,
1412
+ "autoincrement": false
1413
+ },
1414
+ "supersedes": {
1415
+ "name": "supersedes",
1416
+ "type": "text",
1417
+ "primaryKey": false,
1418
+ "notNull": false,
1419
+ "autoincrement": false
1420
+ },
1421
+ "dedupe_key": {
1422
+ "name": "dedupe_key",
1423
+ "type": "text",
1424
+ "primaryKey": false,
1425
+ "notNull": false,
1426
+ "autoincrement": false
1427
+ },
1428
+ "created_at": {
1429
+ "name": "created_at",
1430
+ "type": "text",
1431
+ "primaryKey": false,
1432
+ "notNull": true,
1433
+ "autoincrement": false
1434
+ },
1435
+ "updated_at": {
1436
+ "name": "updated_at",
1437
+ "type": "text",
1438
+ "primaryKey": false,
1439
+ "notNull": true,
1440
+ "autoincrement": false
1441
+ },
1442
+ "last_validated_at": {
1443
+ "name": "last_validated_at",
1444
+ "type": "text",
1445
+ "primaryKey": false,
1446
+ "notNull": false,
1447
+ "autoincrement": false
1448
+ },
1449
+ "last_injected_at": {
1450
+ "name": "last_injected_at",
1451
+ "type": "text",
1452
+ "primaryKey": false,
1453
+ "notNull": false,
1454
+ "autoincrement": false
1455
+ },
1456
+ "injection_count": {
1457
+ "name": "injection_count",
1458
+ "type": "integer",
1459
+ "primaryKey": false,
1460
+ "notNull": true,
1461
+ "autoincrement": false,
1462
+ "default": 0
1463
+ },
1464
+ "override_count": {
1465
+ "name": "override_count",
1466
+ "type": "integer",
1467
+ "primaryKey": false,
1468
+ "notNull": true,
1469
+ "autoincrement": false,
1470
+ "default": 0
1471
+ },
1472
+ "repetition_count": {
1473
+ "name": "repetition_count",
1474
+ "type": "integer",
1475
+ "primaryKey": false,
1476
+ "notNull": true,
1477
+ "autoincrement": false,
1478
+ "default": 0
1479
+ },
1480
+ "team_id": {
1481
+ "name": "team_id",
1482
+ "type": "text",
1483
+ "primaryKey": false,
1484
+ "notNull": false,
1485
+ "autoincrement": false
1486
+ },
1487
+ "sync_version": {
1488
+ "name": "sync_version",
1489
+ "type": "integer",
1490
+ "primaryKey": false,
1491
+ "notNull": true,
1492
+ "autoincrement": false,
1493
+ "default": 0
1494
+ },
1495
+ "auto_inject": {
1496
+ "name": "auto_inject",
1497
+ "type": "integer",
1498
+ "primaryKey": false,
1499
+ "notNull": true,
1500
+ "autoincrement": false,
1501
+ "default": true
1502
+ }
1503
+ },
1504
+ "indexes": {
1505
+ "idx_memories_repo": {
1506
+ "name": "idx_memories_repo",
1507
+ "columns": [
1508
+ "repo"
1509
+ ],
1510
+ "isUnique": false
1511
+ },
1512
+ "idx_memories_status": {
1513
+ "name": "idx_memories_status",
1514
+ "columns": [
1515
+ "status"
1516
+ ],
1517
+ "isUnique": false
1518
+ },
1519
+ "idx_memories_repo_status": {
1520
+ "name": "idx_memories_repo_status",
1521
+ "columns": [
1522
+ "repo",
1523
+ "status"
1524
+ ],
1525
+ "isUnique": false
1526
+ },
1527
+ "idx_memories_team": {
1528
+ "name": "idx_memories_team",
1529
+ "columns": [
1530
+ "team_id"
1531
+ ],
1532
+ "isUnique": false
1533
+ },
1534
+ "uq_memories_dedupe_key": {
1535
+ "name": "uq_memories_dedupe_key",
1536
+ "columns": [
1537
+ "dedupe_key"
1538
+ ],
1539
+ "isUnique": true
1540
+ }
1541
+ },
1542
+ "foreignKeys": {},
1543
+ "compositePrimaryKeys": {},
1544
+ "uniqueConstraints": {},
1545
+ "checkConstraints": {}
1546
+ },
1547
+ "memory_embeddings": {
1548
+ "name": "memory_embeddings",
1549
+ "columns": {
1550
+ "memory_id": {
1551
+ "name": "memory_id",
1552
+ "type": "text",
1553
+ "primaryKey": true,
1554
+ "notNull": true,
1555
+ "autoincrement": false
1556
+ },
1557
+ "model": {
1558
+ "name": "model",
1559
+ "type": "text",
1560
+ "primaryKey": false,
1561
+ "notNull": true,
1562
+ "autoincrement": false
1563
+ },
1564
+ "embedding_dimensions": {
1565
+ "name": "embedding_dimensions",
1566
+ "type": "integer",
1567
+ "primaryKey": false,
1568
+ "notNull": true,
1569
+ "autoincrement": false
1570
+ },
1571
+ "index_dimensions": {
1572
+ "name": "index_dimensions",
1573
+ "type": "integer",
1574
+ "primaryKey": false,
1575
+ "notNull": true,
1576
+ "autoincrement": false
1577
+ },
1578
+ "version": {
1579
+ "name": "version",
1580
+ "type": "text",
1581
+ "primaryKey": false,
1582
+ "notNull": true,
1583
+ "autoincrement": false
1584
+ },
1585
+ "content_hash": {
1586
+ "name": "content_hash",
1587
+ "type": "text",
1588
+ "primaryKey": false,
1589
+ "notNull": true,
1590
+ "autoincrement": false
1591
+ },
1592
+ "updated_at": {
1593
+ "name": "updated_at",
1594
+ "type": "text",
1595
+ "primaryKey": false,
1596
+ "notNull": true,
1597
+ "autoincrement": false
1598
+ },
1599
+ "embedding": {
1600
+ "name": "embedding",
1601
+ "type": "blob",
1602
+ "primaryKey": false,
1603
+ "notNull": true,
1604
+ "autoincrement": false
1605
+ }
1606
+ },
1607
+ "indexes": {
1608
+ "idx_memory_embeddings_model": {
1609
+ "name": "idx_memory_embeddings_model",
1610
+ "columns": [
1611
+ "model"
1612
+ ],
1613
+ "isUnique": false
1614
+ },
1615
+ "idx_memory_embeddings_updated": {
1616
+ "name": "idx_memory_embeddings_updated",
1617
+ "columns": [
1618
+ "updated_at"
1619
+ ],
1620
+ "isUnique": false
1621
+ }
1622
+ },
1623
+ "foreignKeys": {
1624
+ "memory_embeddings_memory_id_memories_id_fk": {
1625
+ "name": "memory_embeddings_memory_id_memories_id_fk",
1626
+ "tableFrom": "memory_embeddings",
1627
+ "tableTo": "memories",
1628
+ "columnsFrom": [
1629
+ "memory_id"
1630
+ ],
1631
+ "columnsTo": [
1632
+ "id"
1633
+ ],
1634
+ "onDelete": "cascade",
1635
+ "onUpdate": "no action"
1636
+ }
1637
+ },
1638
+ "compositePrimaryKeys": {},
1639
+ "uniqueConstraints": {},
1640
+ "checkConstraints": {}
1641
+ },
1642
+ "memory_injections": {
1643
+ "name": "memory_injections",
1644
+ "columns": {
1645
+ "id": {
1646
+ "name": "id",
1647
+ "type": "text",
1648
+ "primaryKey": true,
1649
+ "notNull": true,
1650
+ "autoincrement": false
1651
+ },
1652
+ "memory_id": {
1653
+ "name": "memory_id",
1654
+ "type": "text",
1655
+ "primaryKey": false,
1656
+ "notNull": true,
1657
+ "autoincrement": false
1658
+ },
1659
+ "session_id": {
1660
+ "name": "session_id",
1661
+ "type": "text",
1662
+ "primaryKey": false,
1663
+ "notNull": true,
1664
+ "autoincrement": false
1665
+ },
1666
+ "repo": {
1667
+ "name": "repo",
1668
+ "type": "text",
1669
+ "primaryKey": false,
1670
+ "notNull": false,
1671
+ "autoincrement": false
1672
+ },
1673
+ "injected_at": {
1674
+ "name": "injected_at",
1675
+ "type": "text",
1676
+ "primaryKey": false,
1677
+ "notNull": true,
1678
+ "autoincrement": false
1679
+ },
1680
+ "outcome": {
1681
+ "name": "outcome",
1682
+ "type": "text",
1683
+ "primaryKey": false,
1684
+ "notNull": false,
1685
+ "autoincrement": false
1686
+ },
1687
+ "outcome_at": {
1688
+ "name": "outcome_at",
1689
+ "type": "text",
1690
+ "primaryKey": false,
1691
+ "notNull": false,
1692
+ "autoincrement": false
1693
+ }
1694
+ },
1695
+ "indexes": {
1696
+ "idx_memory_injections_memory": {
1697
+ "name": "idx_memory_injections_memory",
1698
+ "columns": [
1699
+ "memory_id"
1700
+ ],
1701
+ "isUnique": false
1702
+ },
1703
+ "idx_memory_injections_session": {
1704
+ "name": "idx_memory_injections_session",
1705
+ "columns": [
1706
+ "session_id"
1707
+ ],
1708
+ "isUnique": false
1709
+ },
1710
+ "uq_memory_injections_memory_session": {
1711
+ "name": "uq_memory_injections_memory_session",
1712
+ "columns": [
1713
+ "memory_id",
1714
+ "session_id"
1715
+ ],
1716
+ "isUnique": true
1717
+ }
1718
+ },
1719
+ "foreignKeys": {
1720
+ "memory_injections_memory_id_memories_id_fk": {
1721
+ "name": "memory_injections_memory_id_memories_id_fk",
1722
+ "tableFrom": "memory_injections",
1723
+ "tableTo": "memories",
1724
+ "columnsFrom": [
1725
+ "memory_id"
1726
+ ],
1727
+ "columnsTo": [
1728
+ "id"
1729
+ ],
1730
+ "onDelete": "cascade",
1731
+ "onUpdate": "no action"
1732
+ }
1733
+ },
1734
+ "compositePrimaryKeys": {},
1735
+ "uniqueConstraints": {},
1736
+ "checkConstraints": {}
1737
+ },
1738
+ "memory_maintenance_tasks": {
1739
+ "name": "memory_maintenance_tasks",
1740
+ "columns": {
1741
+ "id": {
1742
+ "name": "id",
1743
+ "type": "text",
1744
+ "primaryKey": true,
1745
+ "notNull": true,
1746
+ "autoincrement": false
1747
+ },
1748
+ "kind": {
1749
+ "name": "kind",
1750
+ "type": "text",
1751
+ "primaryKey": false,
1752
+ "notNull": true,
1753
+ "autoincrement": false
1754
+ },
1755
+ "status": {
1756
+ "name": "status",
1757
+ "type": "text",
1758
+ "primaryKey": false,
1759
+ "notNull": true,
1760
+ "autoincrement": false
1761
+ },
1762
+ "priority": {
1763
+ "name": "priority",
1764
+ "type": "integer",
1765
+ "primaryKey": false,
1766
+ "notNull": true,
1767
+ "autoincrement": false,
1768
+ "default": 0
1769
+ },
1770
+ "repo": {
1771
+ "name": "repo",
1772
+ "type": "text",
1773
+ "primaryKey": false,
1774
+ "notNull": false,
1775
+ "autoincrement": false
1776
+ },
1777
+ "target_key": {
1778
+ "name": "target_key",
1779
+ "type": "text",
1780
+ "primaryKey": false,
1781
+ "notNull": true,
1782
+ "autoincrement": false
1783
+ },
1784
+ "payload": {
1785
+ "name": "payload",
1786
+ "type": "text",
1787
+ "primaryKey": false,
1788
+ "notNull": true,
1789
+ "autoincrement": false
1790
+ },
1791
+ "result": {
1792
+ "name": "result",
1793
+ "type": "text",
1794
+ "primaryKey": false,
1795
+ "notNull": false,
1796
+ "autoincrement": false
1797
+ },
1798
+ "failure_reason": {
1799
+ "name": "failure_reason",
1800
+ "type": "text",
1801
+ "primaryKey": false,
1802
+ "notNull": false,
1803
+ "autoincrement": false
1804
+ },
1805
+ "claimed_by": {
1806
+ "name": "claimed_by",
1807
+ "type": "text",
1808
+ "primaryKey": false,
1809
+ "notNull": false,
1810
+ "autoincrement": false
1811
+ },
1812
+ "claimed_at": {
1813
+ "name": "claimed_at",
1814
+ "type": "text",
1815
+ "primaryKey": false,
1816
+ "notNull": false,
1817
+ "autoincrement": false
1818
+ },
1819
+ "claim_expires_at": {
1820
+ "name": "claim_expires_at",
1821
+ "type": "text",
1822
+ "primaryKey": false,
1823
+ "notNull": false,
1824
+ "autoincrement": false
1825
+ },
1826
+ "submitted_at": {
1827
+ "name": "submitted_at",
1828
+ "type": "text",
1829
+ "primaryKey": false,
1830
+ "notNull": false,
1831
+ "autoincrement": false
1832
+ },
1833
+ "completed_at": {
1834
+ "name": "completed_at",
1835
+ "type": "text",
1836
+ "primaryKey": false,
1837
+ "notNull": false,
1838
+ "autoincrement": false
1839
+ },
1840
+ "created_at": {
1841
+ "name": "created_at",
1842
+ "type": "text",
1843
+ "primaryKey": false,
1844
+ "notNull": true,
1845
+ "autoincrement": false
1846
+ },
1847
+ "attempts": {
1848
+ "name": "attempts",
1849
+ "type": "integer",
1850
+ "primaryKey": false,
1851
+ "notNull": true,
1852
+ "autoincrement": false,
1853
+ "default": 0
1854
+ },
1855
+ "max_attempts": {
1856
+ "name": "max_attempts",
1857
+ "type": "integer",
1858
+ "primaryKey": false,
1859
+ "notNull": true,
1860
+ "autoincrement": false,
1861
+ "default": 3
1862
+ }
1863
+ },
1864
+ "indexes": {
1865
+ "idx_mmt_status_priority": {
1866
+ "name": "idx_mmt_status_priority",
1867
+ "columns": [
1868
+ "status",
1869
+ "priority",
1870
+ "created_at"
1871
+ ],
1872
+ "isUnique": false
1873
+ },
1874
+ "idx_mmt_repo_status": {
1875
+ "name": "idx_mmt_repo_status",
1876
+ "columns": [
1877
+ "repo",
1878
+ "status"
1879
+ ],
1880
+ "isUnique": false
1881
+ },
1882
+ "idx_mmt_claim_expires": {
1883
+ "name": "idx_mmt_claim_expires",
1884
+ "columns": [
1885
+ "claim_expires_at"
1886
+ ],
1887
+ "isUnique": false
1888
+ },
1889
+ "idx_mmt_kind_target": {
1890
+ "name": "idx_mmt_kind_target",
1891
+ "columns": [
1892
+ "kind",
1893
+ "target_key"
1894
+ ],
1895
+ "isUnique": false
1896
+ }
1897
+ },
1898
+ "foreignKeys": {},
1899
+ "compositePrimaryKeys": {},
1900
+ "uniqueConstraints": {},
1901
+ "checkConstraints": {}
1902
+ },
1903
+ "policy_rules": {
1904
+ "name": "policy_rules",
1905
+ "columns": {
1906
+ "id": {
1907
+ "name": "id",
1908
+ "type": "text",
1909
+ "primaryKey": true,
1910
+ "notNull": true,
1911
+ "autoincrement": false
1912
+ },
1913
+ "org_id": {
1914
+ "name": "org_id",
1915
+ "type": "text",
1916
+ "primaryKey": false,
1917
+ "notNull": true,
1918
+ "autoincrement": false
1919
+ },
1920
+ "rule_type": {
1921
+ "name": "rule_type",
1922
+ "type": "text",
1923
+ "primaryKey": false,
1924
+ "notNull": true,
1925
+ "autoincrement": false
1926
+ },
1927
+ "config": {
1928
+ "name": "config",
1929
+ "type": "text",
1930
+ "primaryKey": false,
1931
+ "notNull": true,
1932
+ "autoincrement": false,
1933
+ "default": "'{}'"
1934
+ },
1935
+ "enabled": {
1936
+ "name": "enabled",
1937
+ "type": "integer",
1938
+ "primaryKey": false,
1939
+ "notNull": true,
1940
+ "autoincrement": false,
1941
+ "default": true
1942
+ },
1943
+ "created_at": {
1944
+ "name": "created_at",
1945
+ "type": "text",
1946
+ "primaryKey": false,
1947
+ "notNull": true,
1948
+ "autoincrement": false
1949
+ },
1950
+ "updated_at": {
1951
+ "name": "updated_at",
1952
+ "type": "text",
1953
+ "primaryKey": false,
1954
+ "notNull": true,
1955
+ "autoincrement": false
1956
+ }
1957
+ },
1958
+ "indexes": {
1959
+ "idx_policy_org": {
1960
+ "name": "idx_policy_org",
1961
+ "columns": [
1962
+ "org_id"
1963
+ ],
1964
+ "isUnique": false
1965
+ }
1966
+ },
1967
+ "foreignKeys": {},
1968
+ "compositePrimaryKeys": {},
1969
+ "uniqueConstraints": {},
1970
+ "checkConstraints": {}
1971
+ },
1972
+ "quality_snapshots": {
1973
+ "name": "quality_snapshots",
1974
+ "columns": {
1975
+ "id": {
1976
+ "name": "id",
1977
+ "type": "text",
1978
+ "primaryKey": true,
1979
+ "notNull": true,
1980
+ "autoincrement": false
1981
+ },
1982
+ "taken_at": {
1983
+ "name": "taken_at",
1984
+ "type": "text",
1985
+ "primaryKey": false,
1986
+ "notNull": true,
1987
+ "autoincrement": false
1988
+ },
1989
+ "window_start": {
1990
+ "name": "window_start",
1991
+ "type": "text",
1992
+ "primaryKey": false,
1993
+ "notNull": true,
1994
+ "autoincrement": false
1995
+ },
1996
+ "window_end": {
1997
+ "name": "window_end",
1998
+ "type": "text",
1999
+ "primaryKey": false,
2000
+ "notNull": true,
2001
+ "autoincrement": false
2002
+ },
2003
+ "injections_total": {
2004
+ "name": "injections_total",
2005
+ "type": "integer",
2006
+ "primaryKey": false,
2007
+ "notNull": true,
2008
+ "autoincrement": false
2009
+ },
2010
+ "injections_resolved": {
2011
+ "name": "injections_resolved",
2012
+ "type": "integer",
2013
+ "primaryKey": false,
2014
+ "notNull": true,
2015
+ "autoincrement": false
2016
+ },
2017
+ "injections_followed": {
2018
+ "name": "injections_followed",
2019
+ "type": "integer",
2020
+ "primaryKey": false,
2021
+ "notNull": true,
2022
+ "autoincrement": false
2023
+ },
2024
+ "injections_overridden": {
2025
+ "name": "injections_overridden",
2026
+ "type": "integer",
2027
+ "primaryKey": false,
2028
+ "notNull": true,
2029
+ "autoincrement": false
2030
+ },
2031
+ "injections_contradicted": {
2032
+ "name": "injections_contradicted",
2033
+ "type": "integer",
2034
+ "primaryKey": false,
2035
+ "notNull": true,
2036
+ "autoincrement": false
2037
+ },
2038
+ "injections_ignored": {
2039
+ "name": "injections_ignored",
2040
+ "type": "integer",
2041
+ "primaryKey": false,
2042
+ "notNull": true,
2043
+ "autoincrement": false
2044
+ },
2045
+ "followed_rate_resolved": {
2046
+ "name": "followed_rate_resolved",
2047
+ "type": "real",
2048
+ "primaryKey": false,
2049
+ "notNull": false,
2050
+ "autoincrement": false
2051
+ },
2052
+ "active_rule_count": {
2053
+ "name": "active_rule_count",
2054
+ "type": "integer",
2055
+ "primaryKey": false,
2056
+ "notNull": true,
2057
+ "autoincrement": false
2058
+ },
2059
+ "active_command_count": {
2060
+ "name": "active_command_count",
2061
+ "type": "integer",
2062
+ "primaryKey": false,
2063
+ "notNull": true,
2064
+ "autoincrement": false
2065
+ },
2066
+ "candidate_correction_count": {
2067
+ "name": "candidate_correction_count",
2068
+ "type": "integer",
2069
+ "primaryKey": false,
2070
+ "notNull": true,
2071
+ "autoincrement": false
2072
+ },
2073
+ "history_injections_total": {
2074
+ "name": "history_injections_total",
2075
+ "type": "integer",
2076
+ "primaryKey": false,
2077
+ "notNull": true,
2078
+ "autoincrement": false,
2079
+ "default": 0
2080
+ },
2081
+ "history_snippets_injected": {
2082
+ "name": "history_snippets_injected",
2083
+ "type": "integer",
2084
+ "primaryKey": false,
2085
+ "notNull": true,
2086
+ "autoincrement": false,
2087
+ "default": 0
2088
+ },
2089
+ "notes": {
2090
+ "name": "notes",
2091
+ "type": "text",
2092
+ "primaryKey": false,
2093
+ "notNull": false,
2094
+ "autoincrement": false
2095
+ }
2096
+ },
2097
+ "indexes": {
2098
+ "idx_quality_snapshots_taken": {
2099
+ "name": "idx_quality_snapshots_taken",
2100
+ "columns": [
2101
+ "taken_at"
2102
+ ],
2103
+ "isUnique": false
2104
+ }
2105
+ },
2106
+ "foreignKeys": {},
2107
+ "compositePrimaryKeys": {},
2108
+ "uniqueConstraints": {},
2109
+ "checkConstraints": {}
2110
+ },
2111
+ "sync_state": {
2112
+ "name": "sync_state",
2113
+ "columns": {
2114
+ "id": {
2115
+ "name": "id",
2116
+ "type": "text",
2117
+ "primaryKey": true,
2118
+ "notNull": true,
2119
+ "autoincrement": false
2120
+ },
2121
+ "remote_url": {
2122
+ "name": "remote_url",
2123
+ "type": "text",
2124
+ "primaryKey": false,
2125
+ "notNull": false,
2126
+ "autoincrement": false
2127
+ },
2128
+ "team_id": {
2129
+ "name": "team_id",
2130
+ "type": "text",
2131
+ "primaryKey": false,
2132
+ "notNull": false,
2133
+ "autoincrement": false
2134
+ },
2135
+ "last_push_at": {
2136
+ "name": "last_push_at",
2137
+ "type": "text",
2138
+ "primaryKey": false,
2139
+ "notNull": false,
2140
+ "autoincrement": false
2141
+ },
2142
+ "last_pull_at": {
2143
+ "name": "last_pull_at",
2144
+ "type": "text",
2145
+ "primaryKey": false,
2146
+ "notNull": false,
2147
+ "autoincrement": false
2148
+ },
2149
+ "last_push_version": {
2150
+ "name": "last_push_version",
2151
+ "type": "integer",
2152
+ "primaryKey": false,
2153
+ "notNull": true,
2154
+ "autoincrement": false,
2155
+ "default": 0
2156
+ },
2157
+ "last_pull_version": {
2158
+ "name": "last_pull_version",
2159
+ "type": "integer",
2160
+ "primaryKey": false,
2161
+ "notNull": true,
2162
+ "autoincrement": false,
2163
+ "default": 0
2164
+ }
2165
+ },
2166
+ "indexes": {},
2167
+ "foreignKeys": {},
2168
+ "compositePrimaryKeys": {},
2169
+ "uniqueConstraints": {},
2170
+ "checkConstraints": {}
2171
+ }
2172
+ },
2173
+ "views": {},
2174
+ "enums": {},
2175
+ "_meta": {
2176
+ "schemas": {},
2177
+ "tables": {},
2178
+ "columns": {}
2179
+ },
2180
+ "internal": {
2181
+ "indexes": {}
2182
+ }
2183
+ }