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