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