@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,2078 @@
1
+ {
2
+ "version": "6",
3
+ "dialect": "sqlite",
4
+ "id": "2268abf2-8824-42b3-9f99-aeb9d2721727",
5
+ "prevId": "b71019d2-20aa-499c-b130-aa9f176092d3",
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_snippet_embeddings": {
609
+ "name": "history_snippet_embeddings",
610
+ "columns": {
611
+ "snippet_id": {
612
+ "name": "snippet_id",
613
+ "type": "text",
614
+ "primaryKey": true,
615
+ "notNull": true,
616
+ "autoincrement": false
617
+ },
618
+ "model": {
619
+ "name": "model",
620
+ "type": "text",
621
+ "primaryKey": false,
622
+ "notNull": true,
623
+ "autoincrement": false
624
+ },
625
+ "embedding_dimensions": {
626
+ "name": "embedding_dimensions",
627
+ "type": "integer",
628
+ "primaryKey": false,
629
+ "notNull": true,
630
+ "autoincrement": false
631
+ },
632
+ "index_dimensions": {
633
+ "name": "index_dimensions",
634
+ "type": "integer",
635
+ "primaryKey": false,
636
+ "notNull": true,
637
+ "autoincrement": false
638
+ },
639
+ "version": {
640
+ "name": "version",
641
+ "type": "text",
642
+ "primaryKey": false,
643
+ "notNull": true,
644
+ "autoincrement": false
645
+ },
646
+ "content_hash": {
647
+ "name": "content_hash",
648
+ "type": "text",
649
+ "primaryKey": false,
650
+ "notNull": true,
651
+ "autoincrement": false
652
+ },
653
+ "updated_at": {
654
+ "name": "updated_at",
655
+ "type": "text",
656
+ "primaryKey": false,
657
+ "notNull": true,
658
+ "autoincrement": false
659
+ },
660
+ "embedding": {
661
+ "name": "embedding",
662
+ "type": "blob",
663
+ "primaryKey": false,
664
+ "notNull": true,
665
+ "autoincrement": false
666
+ }
667
+ },
668
+ "indexes": {
669
+ "idx_history_embeddings_model": {
670
+ "name": "idx_history_embeddings_model",
671
+ "columns": [
672
+ "model"
673
+ ],
674
+ "isUnique": false
675
+ },
676
+ "idx_history_embeddings_updated": {
677
+ "name": "idx_history_embeddings_updated",
678
+ "columns": [
679
+ "updated_at"
680
+ ],
681
+ "isUnique": false
682
+ }
683
+ },
684
+ "foreignKeys": {
685
+ "history_snippet_embeddings_snippet_id_history_snippets_id_fk": {
686
+ "name": "history_snippet_embeddings_snippet_id_history_snippets_id_fk",
687
+ "tableFrom": "history_snippet_embeddings",
688
+ "tableTo": "history_snippets",
689
+ "columnsFrom": [
690
+ "snippet_id"
691
+ ],
692
+ "columnsTo": [
693
+ "id"
694
+ ],
695
+ "onDelete": "cascade",
696
+ "onUpdate": "no action"
697
+ }
698
+ },
699
+ "compositePrimaryKeys": {},
700
+ "uniqueConstraints": {},
701
+ "checkConstraints": {}
702
+ },
703
+ "history_snippets": {
704
+ "name": "history_snippets",
705
+ "columns": {
706
+ "id": {
707
+ "name": "id",
708
+ "type": "text",
709
+ "primaryKey": true,
710
+ "notNull": true,
711
+ "autoincrement": false
712
+ },
713
+ "repo": {
714
+ "name": "repo",
715
+ "type": "text",
716
+ "primaryKey": false,
717
+ "notNull": false,
718
+ "autoincrement": false
719
+ },
720
+ "session_id": {
721
+ "name": "session_id",
722
+ "type": "text",
723
+ "primaryKey": false,
724
+ "notNull": false,
725
+ "autoincrement": false
726
+ },
727
+ "kind": {
728
+ "name": "kind",
729
+ "type": "text",
730
+ "primaryKey": false,
731
+ "notNull": true,
732
+ "autoincrement": false
733
+ },
734
+ "text": {
735
+ "name": "text",
736
+ "type": "text",
737
+ "primaryKey": false,
738
+ "notNull": true,
739
+ "autoincrement": false
740
+ },
741
+ "dedupe_key": {
742
+ "name": "dedupe_key",
743
+ "type": "text",
744
+ "primaryKey": false,
745
+ "notNull": false,
746
+ "autoincrement": false
747
+ },
748
+ "source_activity_ids": {
749
+ "name": "source_activity_ids",
750
+ "type": "text",
751
+ "primaryKey": false,
752
+ "notNull": true,
753
+ "autoincrement": false,
754
+ "default": "'[]'"
755
+ },
756
+ "created_at": {
757
+ "name": "created_at",
758
+ "type": "text",
759
+ "primaryKey": false,
760
+ "notNull": true,
761
+ "autoincrement": false
762
+ },
763
+ "updated_at": {
764
+ "name": "updated_at",
765
+ "type": "text",
766
+ "primaryKey": false,
767
+ "notNull": true,
768
+ "autoincrement": false
769
+ }
770
+ },
771
+ "indexes": {
772
+ "idx_history_repo": {
773
+ "name": "idx_history_repo",
774
+ "columns": [
775
+ "repo"
776
+ ],
777
+ "isUnique": false
778
+ },
779
+ "idx_history_session": {
780
+ "name": "idx_history_session",
781
+ "columns": [
782
+ "session_id"
783
+ ],
784
+ "isUnique": false
785
+ },
786
+ "idx_history_kind": {
787
+ "name": "idx_history_kind",
788
+ "columns": [
789
+ "kind"
790
+ ],
791
+ "isUnique": false
792
+ },
793
+ "idx_history_created": {
794
+ "name": "idx_history_created",
795
+ "columns": [
796
+ "created_at"
797
+ ],
798
+ "isUnique": false
799
+ },
800
+ "uq_history_snippets_dedupe_key": {
801
+ "name": "uq_history_snippets_dedupe_key",
802
+ "columns": [
803
+ "dedupe_key"
804
+ ],
805
+ "isUnique": true
806
+ }
807
+ },
808
+ "foreignKeys": {},
809
+ "compositePrimaryKeys": {},
810
+ "uniqueConstraints": {},
811
+ "checkConstraints": {}
812
+ },
813
+ "hook_calls": {
814
+ "name": "hook_calls",
815
+ "columns": {
816
+ "id": {
817
+ "name": "id",
818
+ "type": "text",
819
+ "primaryKey": true,
820
+ "notNull": true,
821
+ "autoincrement": false
822
+ },
823
+ "event": {
824
+ "name": "event",
825
+ "type": "text",
826
+ "primaryKey": false,
827
+ "notNull": true,
828
+ "autoincrement": false
829
+ },
830
+ "agent": {
831
+ "name": "agent",
832
+ "type": "text",
833
+ "primaryKey": false,
834
+ "notNull": true,
835
+ "autoincrement": false
836
+ },
837
+ "dedupe_key": {
838
+ "name": "dedupe_key",
839
+ "type": "text",
840
+ "primaryKey": false,
841
+ "notNull": false,
842
+ "autoincrement": false
843
+ },
844
+ "duration_ms": {
845
+ "name": "duration_ms",
846
+ "type": "integer",
847
+ "primaryKey": false,
848
+ "notNull": true,
849
+ "autoincrement": false
850
+ },
851
+ "ok": {
852
+ "name": "ok",
853
+ "type": "integer",
854
+ "primaryKey": false,
855
+ "notNull": true,
856
+ "autoincrement": false
857
+ },
858
+ "created_at": {
859
+ "name": "created_at",
860
+ "type": "text",
861
+ "primaryKey": false,
862
+ "notNull": true,
863
+ "autoincrement": false
864
+ }
865
+ },
866
+ "indexes": {
867
+ "idx_hook_calls_event": {
868
+ "name": "idx_hook_calls_event",
869
+ "columns": [
870
+ "event"
871
+ ],
872
+ "isUnique": false
873
+ },
874
+ "idx_hook_calls_agent": {
875
+ "name": "idx_hook_calls_agent",
876
+ "columns": [
877
+ "agent"
878
+ ],
879
+ "isUnique": false
880
+ },
881
+ "idx_hook_calls_created": {
882
+ "name": "idx_hook_calls_created",
883
+ "columns": [
884
+ "created_at"
885
+ ],
886
+ "isUnique": false
887
+ },
888
+ "uq_hook_calls_dedupe_key": {
889
+ "name": "uq_hook_calls_dedupe_key",
890
+ "columns": [
891
+ "dedupe_key"
892
+ ],
893
+ "isUnique": true
894
+ }
895
+ },
896
+ "foreignKeys": {},
897
+ "compositePrimaryKeys": {},
898
+ "uniqueConstraints": {},
899
+ "checkConstraints": {}
900
+ },
901
+ "implicit_signals": {
902
+ "name": "implicit_signals",
903
+ "columns": {
904
+ "id": {
905
+ "name": "id",
906
+ "type": "text",
907
+ "primaryKey": true,
908
+ "notNull": true,
909
+ "autoincrement": false
910
+ },
911
+ "memory_id": {
912
+ "name": "memory_id",
913
+ "type": "text",
914
+ "primaryKey": false,
915
+ "notNull": true,
916
+ "autoincrement": false
917
+ },
918
+ "session_id": {
919
+ "name": "session_id",
920
+ "type": "text",
921
+ "primaryKey": false,
922
+ "notNull": true,
923
+ "autoincrement": false
924
+ },
925
+ "signal_type": {
926
+ "name": "signal_type",
927
+ "type": "text",
928
+ "primaryKey": false,
929
+ "notNull": true,
930
+ "autoincrement": false
931
+ },
932
+ "timestamp": {
933
+ "name": "timestamp",
934
+ "type": "text",
935
+ "primaryKey": false,
936
+ "notNull": true,
937
+ "autoincrement": false
938
+ },
939
+ "context": {
940
+ "name": "context",
941
+ "type": "text",
942
+ "primaryKey": false,
943
+ "notNull": false,
944
+ "autoincrement": false
945
+ }
946
+ },
947
+ "indexes": {
948
+ "idx_implicit_memory": {
949
+ "name": "idx_implicit_memory",
950
+ "columns": [
951
+ "memory_id"
952
+ ],
953
+ "isUnique": false
954
+ },
955
+ "idx_implicit_session": {
956
+ "name": "idx_implicit_session",
957
+ "columns": [
958
+ "session_id"
959
+ ],
960
+ "isUnique": false
961
+ }
962
+ },
963
+ "foreignKeys": {
964
+ "implicit_signals_memory_id_memories_id_fk": {
965
+ "name": "implicit_signals_memory_id_memories_id_fk",
966
+ "tableFrom": "implicit_signals",
967
+ "tableTo": "memories",
968
+ "columnsFrom": [
969
+ "memory_id"
970
+ ],
971
+ "columnsTo": [
972
+ "id"
973
+ ],
974
+ "onDelete": "no action",
975
+ "onUpdate": "no action"
976
+ }
977
+ },
978
+ "compositePrimaryKeys": {},
979
+ "uniqueConstraints": {},
980
+ "checkConstraints": {}
981
+ },
982
+ "llm_usage": {
983
+ "name": "llm_usage",
984
+ "columns": {
985
+ "id": {
986
+ "name": "id",
987
+ "type": "text",
988
+ "primaryKey": true,
989
+ "notNull": true,
990
+ "autoincrement": false
991
+ },
992
+ "provider": {
993
+ "name": "provider",
994
+ "type": "text",
995
+ "primaryKey": false,
996
+ "notNull": true,
997
+ "autoincrement": false
998
+ },
999
+ "model": {
1000
+ "name": "model",
1001
+ "type": "text",
1002
+ "primaryKey": false,
1003
+ "notNull": true,
1004
+ "autoincrement": false
1005
+ },
1006
+ "task_kind": {
1007
+ "name": "task_kind",
1008
+ "type": "text",
1009
+ "primaryKey": false,
1010
+ "notNull": true,
1011
+ "autoincrement": false
1012
+ },
1013
+ "task_id": {
1014
+ "name": "task_id",
1015
+ "type": "text",
1016
+ "primaryKey": false,
1017
+ "notNull": false,
1018
+ "autoincrement": false
1019
+ },
1020
+ "repo": {
1021
+ "name": "repo",
1022
+ "type": "text",
1023
+ "primaryKey": false,
1024
+ "notNull": false,
1025
+ "autoincrement": false
1026
+ },
1027
+ "prompt_tokens": {
1028
+ "name": "prompt_tokens",
1029
+ "type": "integer",
1030
+ "primaryKey": false,
1031
+ "notNull": true,
1032
+ "autoincrement": false,
1033
+ "default": 0
1034
+ },
1035
+ "completion_tokens": {
1036
+ "name": "completion_tokens",
1037
+ "type": "integer",
1038
+ "primaryKey": false,
1039
+ "notNull": true,
1040
+ "autoincrement": false,
1041
+ "default": 0
1042
+ },
1043
+ "total_tokens": {
1044
+ "name": "total_tokens",
1045
+ "type": "integer",
1046
+ "primaryKey": false,
1047
+ "notNull": true,
1048
+ "autoincrement": false,
1049
+ "default": 0
1050
+ },
1051
+ "cost_usd": {
1052
+ "name": "cost_usd",
1053
+ "type": "real",
1054
+ "primaryKey": false,
1055
+ "notNull": false,
1056
+ "autoincrement": false
1057
+ },
1058
+ "duration_ms": {
1059
+ "name": "duration_ms",
1060
+ "type": "integer",
1061
+ "primaryKey": false,
1062
+ "notNull": true,
1063
+ "autoincrement": false,
1064
+ "default": 0
1065
+ },
1066
+ "ok": {
1067
+ "name": "ok",
1068
+ "type": "integer",
1069
+ "primaryKey": false,
1070
+ "notNull": true,
1071
+ "autoincrement": false,
1072
+ "default": true
1073
+ },
1074
+ "error": {
1075
+ "name": "error",
1076
+ "type": "text",
1077
+ "primaryKey": false,
1078
+ "notNull": false,
1079
+ "autoincrement": false
1080
+ },
1081
+ "created_at": {
1082
+ "name": "created_at",
1083
+ "type": "text",
1084
+ "primaryKey": false,
1085
+ "notNull": true,
1086
+ "autoincrement": false
1087
+ }
1088
+ },
1089
+ "indexes": {
1090
+ "idx_llm_usage_created": {
1091
+ "name": "idx_llm_usage_created",
1092
+ "columns": [
1093
+ "created_at"
1094
+ ],
1095
+ "isUnique": false
1096
+ },
1097
+ "idx_llm_usage_provider_model": {
1098
+ "name": "idx_llm_usage_provider_model",
1099
+ "columns": [
1100
+ "provider",
1101
+ "model"
1102
+ ],
1103
+ "isUnique": false
1104
+ },
1105
+ "idx_llm_usage_task_kind": {
1106
+ "name": "idx_llm_usage_task_kind",
1107
+ "columns": [
1108
+ "task_kind"
1109
+ ],
1110
+ "isUnique": false
1111
+ },
1112
+ "idx_llm_usage_repo": {
1113
+ "name": "idx_llm_usage_repo",
1114
+ "columns": [
1115
+ "repo"
1116
+ ],
1117
+ "isUnique": false
1118
+ }
1119
+ },
1120
+ "foreignKeys": {},
1121
+ "compositePrimaryKeys": {},
1122
+ "uniqueConstraints": {},
1123
+ "checkConstraints": {}
1124
+ },
1125
+ "maintenance_cleanup_log": {
1126
+ "name": "maintenance_cleanup_log",
1127
+ "columns": {
1128
+ "id": {
1129
+ "name": "id",
1130
+ "type": "text",
1131
+ "primaryKey": true,
1132
+ "notNull": true,
1133
+ "autoincrement": false
1134
+ },
1135
+ "run_id": {
1136
+ "name": "run_id",
1137
+ "type": "text",
1138
+ "primaryKey": false,
1139
+ "notNull": true,
1140
+ "autoincrement": false
1141
+ },
1142
+ "action": {
1143
+ "name": "action",
1144
+ "type": "text",
1145
+ "primaryKey": false,
1146
+ "notNull": true,
1147
+ "autoincrement": false
1148
+ },
1149
+ "memory_id": {
1150
+ "name": "memory_id",
1151
+ "type": "text",
1152
+ "primaryKey": false,
1153
+ "notNull": true,
1154
+ "autoincrement": false
1155
+ },
1156
+ "related_memory_id": {
1157
+ "name": "related_memory_id",
1158
+ "type": "text",
1159
+ "primaryKey": false,
1160
+ "notNull": false,
1161
+ "autoincrement": false
1162
+ },
1163
+ "before_snapshot": {
1164
+ "name": "before_snapshot",
1165
+ "type": "text",
1166
+ "primaryKey": false,
1167
+ "notNull": false,
1168
+ "autoincrement": false
1169
+ },
1170
+ "after_snapshot": {
1171
+ "name": "after_snapshot",
1172
+ "type": "text",
1173
+ "primaryKey": false,
1174
+ "notNull": false,
1175
+ "autoincrement": false
1176
+ },
1177
+ "details": {
1178
+ "name": "details",
1179
+ "type": "text",
1180
+ "primaryKey": false,
1181
+ "notNull": true,
1182
+ "autoincrement": false,
1183
+ "default": "'{}'"
1184
+ },
1185
+ "reverted": {
1186
+ "name": "reverted",
1187
+ "type": "integer",
1188
+ "primaryKey": false,
1189
+ "notNull": true,
1190
+ "autoincrement": false,
1191
+ "default": false
1192
+ },
1193
+ "reverted_at": {
1194
+ "name": "reverted_at",
1195
+ "type": "text",
1196
+ "primaryKey": false,
1197
+ "notNull": false,
1198
+ "autoincrement": false
1199
+ },
1200
+ "created_at": {
1201
+ "name": "created_at",
1202
+ "type": "text",
1203
+ "primaryKey": false,
1204
+ "notNull": true,
1205
+ "autoincrement": false
1206
+ }
1207
+ },
1208
+ "indexes": {
1209
+ "idx_cleanup_log_run": {
1210
+ "name": "idx_cleanup_log_run",
1211
+ "columns": [
1212
+ "run_id"
1213
+ ],
1214
+ "isUnique": false
1215
+ },
1216
+ "idx_cleanup_log_memory": {
1217
+ "name": "idx_cleanup_log_memory",
1218
+ "columns": [
1219
+ "memory_id"
1220
+ ],
1221
+ "isUnique": false
1222
+ },
1223
+ "idx_cleanup_log_action": {
1224
+ "name": "idx_cleanup_log_action",
1225
+ "columns": [
1226
+ "action"
1227
+ ],
1228
+ "isUnique": false
1229
+ },
1230
+ "idx_cleanup_log_created": {
1231
+ "name": "idx_cleanup_log_created",
1232
+ "columns": [
1233
+ "created_at"
1234
+ ],
1235
+ "isUnique": false
1236
+ }
1237
+ },
1238
+ "foreignKeys": {},
1239
+ "compositePrimaryKeys": {},
1240
+ "uniqueConstraints": {},
1241
+ "checkConstraints": {}
1242
+ },
1243
+ "memories": {
1244
+ "name": "memories",
1245
+ "columns": {
1246
+ "id": {
1247
+ "name": "id",
1248
+ "type": "text",
1249
+ "primaryKey": true,
1250
+ "notNull": true,
1251
+ "autoincrement": false
1252
+ },
1253
+ "type": {
1254
+ "name": "type",
1255
+ "type": "text",
1256
+ "primaryKey": false,
1257
+ "notNull": true,
1258
+ "autoincrement": false
1259
+ },
1260
+ "text": {
1261
+ "name": "text",
1262
+ "type": "text",
1263
+ "primaryKey": false,
1264
+ "notNull": true,
1265
+ "autoincrement": false
1266
+ },
1267
+ "scope": {
1268
+ "name": "scope",
1269
+ "type": "text",
1270
+ "primaryKey": false,
1271
+ "notNull": true,
1272
+ "autoincrement": false
1273
+ },
1274
+ "path_scope": {
1275
+ "name": "path_scope",
1276
+ "type": "text",
1277
+ "primaryKey": false,
1278
+ "notNull": false,
1279
+ "autoincrement": false
1280
+ },
1281
+ "repo": {
1282
+ "name": "repo",
1283
+ "type": "text",
1284
+ "primaryKey": false,
1285
+ "notNull": false,
1286
+ "autoincrement": false
1287
+ },
1288
+ "status": {
1289
+ "name": "status",
1290
+ "type": "text",
1291
+ "primaryKey": false,
1292
+ "notNull": true,
1293
+ "autoincrement": false
1294
+ },
1295
+ "confidence": {
1296
+ "name": "confidence",
1297
+ "type": "real",
1298
+ "primaryKey": false,
1299
+ "notNull": true,
1300
+ "autoincrement": false,
1301
+ "default": 0
1302
+ },
1303
+ "source": {
1304
+ "name": "source",
1305
+ "type": "text",
1306
+ "primaryKey": false,
1307
+ "notNull": true,
1308
+ "autoincrement": false
1309
+ },
1310
+ "evidence": {
1311
+ "name": "evidence",
1312
+ "type": "text",
1313
+ "primaryKey": false,
1314
+ "notNull": true,
1315
+ "autoincrement": false,
1316
+ "default": "'[]'"
1317
+ },
1318
+ "capture_context": {
1319
+ "name": "capture_context",
1320
+ "type": "text",
1321
+ "primaryKey": false,
1322
+ "notNull": false,
1323
+ "autoincrement": false
1324
+ },
1325
+ "supersedes": {
1326
+ "name": "supersedes",
1327
+ "type": "text",
1328
+ "primaryKey": false,
1329
+ "notNull": false,
1330
+ "autoincrement": false
1331
+ },
1332
+ "dedupe_key": {
1333
+ "name": "dedupe_key",
1334
+ "type": "text",
1335
+ "primaryKey": false,
1336
+ "notNull": false,
1337
+ "autoincrement": false
1338
+ },
1339
+ "created_at": {
1340
+ "name": "created_at",
1341
+ "type": "text",
1342
+ "primaryKey": false,
1343
+ "notNull": true,
1344
+ "autoincrement": false
1345
+ },
1346
+ "updated_at": {
1347
+ "name": "updated_at",
1348
+ "type": "text",
1349
+ "primaryKey": false,
1350
+ "notNull": true,
1351
+ "autoincrement": false
1352
+ },
1353
+ "last_validated_at": {
1354
+ "name": "last_validated_at",
1355
+ "type": "text",
1356
+ "primaryKey": false,
1357
+ "notNull": false,
1358
+ "autoincrement": false
1359
+ },
1360
+ "last_injected_at": {
1361
+ "name": "last_injected_at",
1362
+ "type": "text",
1363
+ "primaryKey": false,
1364
+ "notNull": false,
1365
+ "autoincrement": false
1366
+ },
1367
+ "injection_count": {
1368
+ "name": "injection_count",
1369
+ "type": "integer",
1370
+ "primaryKey": false,
1371
+ "notNull": true,
1372
+ "autoincrement": false,
1373
+ "default": 0
1374
+ },
1375
+ "override_count": {
1376
+ "name": "override_count",
1377
+ "type": "integer",
1378
+ "primaryKey": false,
1379
+ "notNull": true,
1380
+ "autoincrement": false,
1381
+ "default": 0
1382
+ },
1383
+ "repetition_count": {
1384
+ "name": "repetition_count",
1385
+ "type": "integer",
1386
+ "primaryKey": false,
1387
+ "notNull": true,
1388
+ "autoincrement": false,
1389
+ "default": 0
1390
+ },
1391
+ "team_id": {
1392
+ "name": "team_id",
1393
+ "type": "text",
1394
+ "primaryKey": false,
1395
+ "notNull": false,
1396
+ "autoincrement": false
1397
+ },
1398
+ "sync_version": {
1399
+ "name": "sync_version",
1400
+ "type": "integer",
1401
+ "primaryKey": false,
1402
+ "notNull": true,
1403
+ "autoincrement": false,
1404
+ "default": 0
1405
+ },
1406
+ "auto_inject": {
1407
+ "name": "auto_inject",
1408
+ "type": "integer",
1409
+ "primaryKey": false,
1410
+ "notNull": true,
1411
+ "autoincrement": false,
1412
+ "default": true
1413
+ }
1414
+ },
1415
+ "indexes": {
1416
+ "idx_memories_repo": {
1417
+ "name": "idx_memories_repo",
1418
+ "columns": [
1419
+ "repo"
1420
+ ],
1421
+ "isUnique": false
1422
+ },
1423
+ "idx_memories_status": {
1424
+ "name": "idx_memories_status",
1425
+ "columns": [
1426
+ "status"
1427
+ ],
1428
+ "isUnique": false
1429
+ },
1430
+ "idx_memories_repo_status": {
1431
+ "name": "idx_memories_repo_status",
1432
+ "columns": [
1433
+ "repo",
1434
+ "status"
1435
+ ],
1436
+ "isUnique": false
1437
+ },
1438
+ "idx_memories_team": {
1439
+ "name": "idx_memories_team",
1440
+ "columns": [
1441
+ "team_id"
1442
+ ],
1443
+ "isUnique": false
1444
+ },
1445
+ "uq_memories_dedupe_key": {
1446
+ "name": "uq_memories_dedupe_key",
1447
+ "columns": [
1448
+ "dedupe_key"
1449
+ ],
1450
+ "isUnique": true
1451
+ }
1452
+ },
1453
+ "foreignKeys": {},
1454
+ "compositePrimaryKeys": {},
1455
+ "uniqueConstraints": {},
1456
+ "checkConstraints": {}
1457
+ },
1458
+ "memory_embeddings": {
1459
+ "name": "memory_embeddings",
1460
+ "columns": {
1461
+ "memory_id": {
1462
+ "name": "memory_id",
1463
+ "type": "text",
1464
+ "primaryKey": true,
1465
+ "notNull": true,
1466
+ "autoincrement": false
1467
+ },
1468
+ "model": {
1469
+ "name": "model",
1470
+ "type": "text",
1471
+ "primaryKey": false,
1472
+ "notNull": true,
1473
+ "autoincrement": false
1474
+ },
1475
+ "embedding_dimensions": {
1476
+ "name": "embedding_dimensions",
1477
+ "type": "integer",
1478
+ "primaryKey": false,
1479
+ "notNull": true,
1480
+ "autoincrement": false
1481
+ },
1482
+ "index_dimensions": {
1483
+ "name": "index_dimensions",
1484
+ "type": "integer",
1485
+ "primaryKey": false,
1486
+ "notNull": true,
1487
+ "autoincrement": false
1488
+ },
1489
+ "version": {
1490
+ "name": "version",
1491
+ "type": "text",
1492
+ "primaryKey": false,
1493
+ "notNull": true,
1494
+ "autoincrement": false
1495
+ },
1496
+ "content_hash": {
1497
+ "name": "content_hash",
1498
+ "type": "text",
1499
+ "primaryKey": false,
1500
+ "notNull": true,
1501
+ "autoincrement": false
1502
+ },
1503
+ "updated_at": {
1504
+ "name": "updated_at",
1505
+ "type": "text",
1506
+ "primaryKey": false,
1507
+ "notNull": true,
1508
+ "autoincrement": false
1509
+ },
1510
+ "embedding": {
1511
+ "name": "embedding",
1512
+ "type": "blob",
1513
+ "primaryKey": false,
1514
+ "notNull": true,
1515
+ "autoincrement": false
1516
+ }
1517
+ },
1518
+ "indexes": {
1519
+ "idx_memory_embeddings_model": {
1520
+ "name": "idx_memory_embeddings_model",
1521
+ "columns": [
1522
+ "model"
1523
+ ],
1524
+ "isUnique": false
1525
+ },
1526
+ "idx_memory_embeddings_updated": {
1527
+ "name": "idx_memory_embeddings_updated",
1528
+ "columns": [
1529
+ "updated_at"
1530
+ ],
1531
+ "isUnique": false
1532
+ }
1533
+ },
1534
+ "foreignKeys": {
1535
+ "memory_embeddings_memory_id_memories_id_fk": {
1536
+ "name": "memory_embeddings_memory_id_memories_id_fk",
1537
+ "tableFrom": "memory_embeddings",
1538
+ "tableTo": "memories",
1539
+ "columnsFrom": [
1540
+ "memory_id"
1541
+ ],
1542
+ "columnsTo": [
1543
+ "id"
1544
+ ],
1545
+ "onDelete": "cascade",
1546
+ "onUpdate": "no action"
1547
+ }
1548
+ },
1549
+ "compositePrimaryKeys": {},
1550
+ "uniqueConstraints": {},
1551
+ "checkConstraints": {}
1552
+ },
1553
+ "memory_injections": {
1554
+ "name": "memory_injections",
1555
+ "columns": {
1556
+ "id": {
1557
+ "name": "id",
1558
+ "type": "text",
1559
+ "primaryKey": true,
1560
+ "notNull": true,
1561
+ "autoincrement": false
1562
+ },
1563
+ "memory_id": {
1564
+ "name": "memory_id",
1565
+ "type": "text",
1566
+ "primaryKey": false,
1567
+ "notNull": true,
1568
+ "autoincrement": false
1569
+ },
1570
+ "session_id": {
1571
+ "name": "session_id",
1572
+ "type": "text",
1573
+ "primaryKey": false,
1574
+ "notNull": true,
1575
+ "autoincrement": false
1576
+ },
1577
+ "repo": {
1578
+ "name": "repo",
1579
+ "type": "text",
1580
+ "primaryKey": false,
1581
+ "notNull": false,
1582
+ "autoincrement": false
1583
+ },
1584
+ "injected_at": {
1585
+ "name": "injected_at",
1586
+ "type": "text",
1587
+ "primaryKey": false,
1588
+ "notNull": true,
1589
+ "autoincrement": false
1590
+ },
1591
+ "outcome": {
1592
+ "name": "outcome",
1593
+ "type": "text",
1594
+ "primaryKey": false,
1595
+ "notNull": false,
1596
+ "autoincrement": false
1597
+ },
1598
+ "outcome_at": {
1599
+ "name": "outcome_at",
1600
+ "type": "text",
1601
+ "primaryKey": false,
1602
+ "notNull": false,
1603
+ "autoincrement": false
1604
+ }
1605
+ },
1606
+ "indexes": {
1607
+ "idx_memory_injections_memory": {
1608
+ "name": "idx_memory_injections_memory",
1609
+ "columns": [
1610
+ "memory_id"
1611
+ ],
1612
+ "isUnique": false
1613
+ },
1614
+ "idx_memory_injections_session": {
1615
+ "name": "idx_memory_injections_session",
1616
+ "columns": [
1617
+ "session_id"
1618
+ ],
1619
+ "isUnique": false
1620
+ },
1621
+ "uq_memory_injections_memory_session": {
1622
+ "name": "uq_memory_injections_memory_session",
1623
+ "columns": [
1624
+ "memory_id",
1625
+ "session_id"
1626
+ ],
1627
+ "isUnique": true
1628
+ }
1629
+ },
1630
+ "foreignKeys": {
1631
+ "memory_injections_memory_id_memories_id_fk": {
1632
+ "name": "memory_injections_memory_id_memories_id_fk",
1633
+ "tableFrom": "memory_injections",
1634
+ "tableTo": "memories",
1635
+ "columnsFrom": [
1636
+ "memory_id"
1637
+ ],
1638
+ "columnsTo": [
1639
+ "id"
1640
+ ],
1641
+ "onDelete": "cascade",
1642
+ "onUpdate": "no action"
1643
+ }
1644
+ },
1645
+ "compositePrimaryKeys": {},
1646
+ "uniqueConstraints": {},
1647
+ "checkConstraints": {}
1648
+ },
1649
+ "memory_maintenance_tasks": {
1650
+ "name": "memory_maintenance_tasks",
1651
+ "columns": {
1652
+ "id": {
1653
+ "name": "id",
1654
+ "type": "text",
1655
+ "primaryKey": true,
1656
+ "notNull": true,
1657
+ "autoincrement": false
1658
+ },
1659
+ "kind": {
1660
+ "name": "kind",
1661
+ "type": "text",
1662
+ "primaryKey": false,
1663
+ "notNull": true,
1664
+ "autoincrement": false
1665
+ },
1666
+ "status": {
1667
+ "name": "status",
1668
+ "type": "text",
1669
+ "primaryKey": false,
1670
+ "notNull": true,
1671
+ "autoincrement": false
1672
+ },
1673
+ "priority": {
1674
+ "name": "priority",
1675
+ "type": "integer",
1676
+ "primaryKey": false,
1677
+ "notNull": true,
1678
+ "autoincrement": false,
1679
+ "default": 0
1680
+ },
1681
+ "repo": {
1682
+ "name": "repo",
1683
+ "type": "text",
1684
+ "primaryKey": false,
1685
+ "notNull": false,
1686
+ "autoincrement": false
1687
+ },
1688
+ "target_key": {
1689
+ "name": "target_key",
1690
+ "type": "text",
1691
+ "primaryKey": false,
1692
+ "notNull": true,
1693
+ "autoincrement": false
1694
+ },
1695
+ "payload": {
1696
+ "name": "payload",
1697
+ "type": "text",
1698
+ "primaryKey": false,
1699
+ "notNull": true,
1700
+ "autoincrement": false
1701
+ },
1702
+ "result": {
1703
+ "name": "result",
1704
+ "type": "text",
1705
+ "primaryKey": false,
1706
+ "notNull": false,
1707
+ "autoincrement": false
1708
+ },
1709
+ "failure_reason": {
1710
+ "name": "failure_reason",
1711
+ "type": "text",
1712
+ "primaryKey": false,
1713
+ "notNull": false,
1714
+ "autoincrement": false
1715
+ },
1716
+ "claimed_by": {
1717
+ "name": "claimed_by",
1718
+ "type": "text",
1719
+ "primaryKey": false,
1720
+ "notNull": false,
1721
+ "autoincrement": false
1722
+ },
1723
+ "claimed_at": {
1724
+ "name": "claimed_at",
1725
+ "type": "text",
1726
+ "primaryKey": false,
1727
+ "notNull": false,
1728
+ "autoincrement": false
1729
+ },
1730
+ "claim_expires_at": {
1731
+ "name": "claim_expires_at",
1732
+ "type": "text",
1733
+ "primaryKey": false,
1734
+ "notNull": false,
1735
+ "autoincrement": false
1736
+ },
1737
+ "submitted_at": {
1738
+ "name": "submitted_at",
1739
+ "type": "text",
1740
+ "primaryKey": false,
1741
+ "notNull": false,
1742
+ "autoincrement": false
1743
+ },
1744
+ "completed_at": {
1745
+ "name": "completed_at",
1746
+ "type": "text",
1747
+ "primaryKey": false,
1748
+ "notNull": false,
1749
+ "autoincrement": false
1750
+ },
1751
+ "created_at": {
1752
+ "name": "created_at",
1753
+ "type": "text",
1754
+ "primaryKey": false,
1755
+ "notNull": true,
1756
+ "autoincrement": false
1757
+ },
1758
+ "attempts": {
1759
+ "name": "attempts",
1760
+ "type": "integer",
1761
+ "primaryKey": false,
1762
+ "notNull": true,
1763
+ "autoincrement": false,
1764
+ "default": 0
1765
+ },
1766
+ "max_attempts": {
1767
+ "name": "max_attempts",
1768
+ "type": "integer",
1769
+ "primaryKey": false,
1770
+ "notNull": true,
1771
+ "autoincrement": false,
1772
+ "default": 3
1773
+ }
1774
+ },
1775
+ "indexes": {
1776
+ "idx_mmt_status_priority": {
1777
+ "name": "idx_mmt_status_priority",
1778
+ "columns": [
1779
+ "status",
1780
+ "priority",
1781
+ "created_at"
1782
+ ],
1783
+ "isUnique": false
1784
+ },
1785
+ "idx_mmt_repo_status": {
1786
+ "name": "idx_mmt_repo_status",
1787
+ "columns": [
1788
+ "repo",
1789
+ "status"
1790
+ ],
1791
+ "isUnique": false
1792
+ },
1793
+ "idx_mmt_claim_expires": {
1794
+ "name": "idx_mmt_claim_expires",
1795
+ "columns": [
1796
+ "claim_expires_at"
1797
+ ],
1798
+ "isUnique": false
1799
+ },
1800
+ "idx_mmt_kind_target": {
1801
+ "name": "idx_mmt_kind_target",
1802
+ "columns": [
1803
+ "kind",
1804
+ "target_key"
1805
+ ],
1806
+ "isUnique": false
1807
+ }
1808
+ },
1809
+ "foreignKeys": {},
1810
+ "compositePrimaryKeys": {},
1811
+ "uniqueConstraints": {},
1812
+ "checkConstraints": {}
1813
+ },
1814
+ "policy_rules": {
1815
+ "name": "policy_rules",
1816
+ "columns": {
1817
+ "id": {
1818
+ "name": "id",
1819
+ "type": "text",
1820
+ "primaryKey": true,
1821
+ "notNull": true,
1822
+ "autoincrement": false
1823
+ },
1824
+ "org_id": {
1825
+ "name": "org_id",
1826
+ "type": "text",
1827
+ "primaryKey": false,
1828
+ "notNull": true,
1829
+ "autoincrement": false
1830
+ },
1831
+ "rule_type": {
1832
+ "name": "rule_type",
1833
+ "type": "text",
1834
+ "primaryKey": false,
1835
+ "notNull": true,
1836
+ "autoincrement": false
1837
+ },
1838
+ "config": {
1839
+ "name": "config",
1840
+ "type": "text",
1841
+ "primaryKey": false,
1842
+ "notNull": true,
1843
+ "autoincrement": false,
1844
+ "default": "'{}'"
1845
+ },
1846
+ "enabled": {
1847
+ "name": "enabled",
1848
+ "type": "integer",
1849
+ "primaryKey": false,
1850
+ "notNull": true,
1851
+ "autoincrement": false,
1852
+ "default": true
1853
+ },
1854
+ "created_at": {
1855
+ "name": "created_at",
1856
+ "type": "text",
1857
+ "primaryKey": false,
1858
+ "notNull": true,
1859
+ "autoincrement": false
1860
+ },
1861
+ "updated_at": {
1862
+ "name": "updated_at",
1863
+ "type": "text",
1864
+ "primaryKey": false,
1865
+ "notNull": true,
1866
+ "autoincrement": false
1867
+ }
1868
+ },
1869
+ "indexes": {
1870
+ "idx_policy_org": {
1871
+ "name": "idx_policy_org",
1872
+ "columns": [
1873
+ "org_id"
1874
+ ],
1875
+ "isUnique": false
1876
+ }
1877
+ },
1878
+ "foreignKeys": {},
1879
+ "compositePrimaryKeys": {},
1880
+ "uniqueConstraints": {},
1881
+ "checkConstraints": {}
1882
+ },
1883
+ "quality_snapshots": {
1884
+ "name": "quality_snapshots",
1885
+ "columns": {
1886
+ "id": {
1887
+ "name": "id",
1888
+ "type": "text",
1889
+ "primaryKey": true,
1890
+ "notNull": true,
1891
+ "autoincrement": false
1892
+ },
1893
+ "taken_at": {
1894
+ "name": "taken_at",
1895
+ "type": "text",
1896
+ "primaryKey": false,
1897
+ "notNull": true,
1898
+ "autoincrement": false
1899
+ },
1900
+ "window_start": {
1901
+ "name": "window_start",
1902
+ "type": "text",
1903
+ "primaryKey": false,
1904
+ "notNull": true,
1905
+ "autoincrement": false
1906
+ },
1907
+ "window_end": {
1908
+ "name": "window_end",
1909
+ "type": "text",
1910
+ "primaryKey": false,
1911
+ "notNull": true,
1912
+ "autoincrement": false
1913
+ },
1914
+ "injections_total": {
1915
+ "name": "injections_total",
1916
+ "type": "integer",
1917
+ "primaryKey": false,
1918
+ "notNull": true,
1919
+ "autoincrement": false
1920
+ },
1921
+ "injections_resolved": {
1922
+ "name": "injections_resolved",
1923
+ "type": "integer",
1924
+ "primaryKey": false,
1925
+ "notNull": true,
1926
+ "autoincrement": false
1927
+ },
1928
+ "injections_followed": {
1929
+ "name": "injections_followed",
1930
+ "type": "integer",
1931
+ "primaryKey": false,
1932
+ "notNull": true,
1933
+ "autoincrement": false
1934
+ },
1935
+ "injections_overridden": {
1936
+ "name": "injections_overridden",
1937
+ "type": "integer",
1938
+ "primaryKey": false,
1939
+ "notNull": true,
1940
+ "autoincrement": false
1941
+ },
1942
+ "injections_contradicted": {
1943
+ "name": "injections_contradicted",
1944
+ "type": "integer",
1945
+ "primaryKey": false,
1946
+ "notNull": true,
1947
+ "autoincrement": false
1948
+ },
1949
+ "injections_ignored": {
1950
+ "name": "injections_ignored",
1951
+ "type": "integer",
1952
+ "primaryKey": false,
1953
+ "notNull": true,
1954
+ "autoincrement": false
1955
+ },
1956
+ "followed_rate_resolved": {
1957
+ "name": "followed_rate_resolved",
1958
+ "type": "real",
1959
+ "primaryKey": false,
1960
+ "notNull": false,
1961
+ "autoincrement": false
1962
+ },
1963
+ "active_rule_count": {
1964
+ "name": "active_rule_count",
1965
+ "type": "integer",
1966
+ "primaryKey": false,
1967
+ "notNull": true,
1968
+ "autoincrement": false
1969
+ },
1970
+ "active_command_count": {
1971
+ "name": "active_command_count",
1972
+ "type": "integer",
1973
+ "primaryKey": false,
1974
+ "notNull": true,
1975
+ "autoincrement": false
1976
+ },
1977
+ "candidate_correction_count": {
1978
+ "name": "candidate_correction_count",
1979
+ "type": "integer",
1980
+ "primaryKey": false,
1981
+ "notNull": true,
1982
+ "autoincrement": false
1983
+ },
1984
+ "notes": {
1985
+ "name": "notes",
1986
+ "type": "text",
1987
+ "primaryKey": false,
1988
+ "notNull": false,
1989
+ "autoincrement": false
1990
+ }
1991
+ },
1992
+ "indexes": {
1993
+ "idx_quality_snapshots_taken": {
1994
+ "name": "idx_quality_snapshots_taken",
1995
+ "columns": [
1996
+ "taken_at"
1997
+ ],
1998
+ "isUnique": false
1999
+ }
2000
+ },
2001
+ "foreignKeys": {},
2002
+ "compositePrimaryKeys": {},
2003
+ "uniqueConstraints": {},
2004
+ "checkConstraints": {}
2005
+ },
2006
+ "sync_state": {
2007
+ "name": "sync_state",
2008
+ "columns": {
2009
+ "id": {
2010
+ "name": "id",
2011
+ "type": "text",
2012
+ "primaryKey": true,
2013
+ "notNull": true,
2014
+ "autoincrement": false
2015
+ },
2016
+ "remote_url": {
2017
+ "name": "remote_url",
2018
+ "type": "text",
2019
+ "primaryKey": false,
2020
+ "notNull": false,
2021
+ "autoincrement": false
2022
+ },
2023
+ "team_id": {
2024
+ "name": "team_id",
2025
+ "type": "text",
2026
+ "primaryKey": false,
2027
+ "notNull": false,
2028
+ "autoincrement": false
2029
+ },
2030
+ "last_push_at": {
2031
+ "name": "last_push_at",
2032
+ "type": "text",
2033
+ "primaryKey": false,
2034
+ "notNull": false,
2035
+ "autoincrement": false
2036
+ },
2037
+ "last_pull_at": {
2038
+ "name": "last_pull_at",
2039
+ "type": "text",
2040
+ "primaryKey": false,
2041
+ "notNull": false,
2042
+ "autoincrement": false
2043
+ },
2044
+ "last_push_version": {
2045
+ "name": "last_push_version",
2046
+ "type": "integer",
2047
+ "primaryKey": false,
2048
+ "notNull": true,
2049
+ "autoincrement": false,
2050
+ "default": 0
2051
+ },
2052
+ "last_pull_version": {
2053
+ "name": "last_pull_version",
2054
+ "type": "integer",
2055
+ "primaryKey": false,
2056
+ "notNull": true,
2057
+ "autoincrement": false,
2058
+ "default": 0
2059
+ }
2060
+ },
2061
+ "indexes": {},
2062
+ "foreignKeys": {},
2063
+ "compositePrimaryKeys": {},
2064
+ "uniqueConstraints": {},
2065
+ "checkConstraints": {}
2066
+ }
2067
+ },
2068
+ "views": {},
2069
+ "enums": {},
2070
+ "_meta": {
2071
+ "schemas": {},
2072
+ "tables": {},
2073
+ "columns": {}
2074
+ },
2075
+ "internal": {
2076
+ "indexes": {}
2077
+ }
2078
+ }