@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,2014 @@
1
+ {
2
+ "version": "6",
3
+ "dialect": "sqlite",
4
+ "id": "8a0f5dbb-8279-4e4c-bae4-b7617875a28a",
5
+ "prevId": "2b7fccbe-0e0e-4d2b-95e1-b46bdd210595",
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
+ },
1358
+ "indexes": {
1359
+ "idx_memories_repo": {
1360
+ "name": "idx_memories_repo",
1361
+ "columns": [
1362
+ "repo"
1363
+ ],
1364
+ "isUnique": false
1365
+ },
1366
+ "idx_memories_status": {
1367
+ "name": "idx_memories_status",
1368
+ "columns": [
1369
+ "status"
1370
+ ],
1371
+ "isUnique": false
1372
+ },
1373
+ "idx_memories_repo_status": {
1374
+ "name": "idx_memories_repo_status",
1375
+ "columns": [
1376
+ "repo",
1377
+ "status"
1378
+ ],
1379
+ "isUnique": false
1380
+ },
1381
+ "idx_memories_team": {
1382
+ "name": "idx_memories_team",
1383
+ "columns": [
1384
+ "team_id"
1385
+ ],
1386
+ "isUnique": false
1387
+ }
1388
+ },
1389
+ "foreignKeys": {},
1390
+ "compositePrimaryKeys": {},
1391
+ "uniqueConstraints": {},
1392
+ "checkConstraints": {}
1393
+ },
1394
+ "memory_embeddings": {
1395
+ "name": "memory_embeddings",
1396
+ "columns": {
1397
+ "memory_id": {
1398
+ "name": "memory_id",
1399
+ "type": "text",
1400
+ "primaryKey": true,
1401
+ "notNull": true,
1402
+ "autoincrement": false
1403
+ },
1404
+ "model": {
1405
+ "name": "model",
1406
+ "type": "text",
1407
+ "primaryKey": false,
1408
+ "notNull": true,
1409
+ "autoincrement": false
1410
+ },
1411
+ "embedding_dimensions": {
1412
+ "name": "embedding_dimensions",
1413
+ "type": "integer",
1414
+ "primaryKey": false,
1415
+ "notNull": true,
1416
+ "autoincrement": false
1417
+ },
1418
+ "index_dimensions": {
1419
+ "name": "index_dimensions",
1420
+ "type": "integer",
1421
+ "primaryKey": false,
1422
+ "notNull": true,
1423
+ "autoincrement": false
1424
+ },
1425
+ "version": {
1426
+ "name": "version",
1427
+ "type": "text",
1428
+ "primaryKey": false,
1429
+ "notNull": true,
1430
+ "autoincrement": false
1431
+ },
1432
+ "content_hash": {
1433
+ "name": "content_hash",
1434
+ "type": "text",
1435
+ "primaryKey": false,
1436
+ "notNull": true,
1437
+ "autoincrement": false
1438
+ },
1439
+ "updated_at": {
1440
+ "name": "updated_at",
1441
+ "type": "text",
1442
+ "primaryKey": false,
1443
+ "notNull": true,
1444
+ "autoincrement": false
1445
+ },
1446
+ "embedding": {
1447
+ "name": "embedding",
1448
+ "type": "blob",
1449
+ "primaryKey": false,
1450
+ "notNull": true,
1451
+ "autoincrement": false
1452
+ }
1453
+ },
1454
+ "indexes": {
1455
+ "idx_memory_embeddings_model": {
1456
+ "name": "idx_memory_embeddings_model",
1457
+ "columns": [
1458
+ "model"
1459
+ ],
1460
+ "isUnique": false
1461
+ },
1462
+ "idx_memory_embeddings_updated": {
1463
+ "name": "idx_memory_embeddings_updated",
1464
+ "columns": [
1465
+ "updated_at"
1466
+ ],
1467
+ "isUnique": false
1468
+ }
1469
+ },
1470
+ "foreignKeys": {
1471
+ "memory_embeddings_memory_id_memories_id_fk": {
1472
+ "name": "memory_embeddings_memory_id_memories_id_fk",
1473
+ "tableFrom": "memory_embeddings",
1474
+ "tableTo": "memories",
1475
+ "columnsFrom": [
1476
+ "memory_id"
1477
+ ],
1478
+ "columnsTo": [
1479
+ "id"
1480
+ ],
1481
+ "onDelete": "cascade",
1482
+ "onUpdate": "no action"
1483
+ }
1484
+ },
1485
+ "compositePrimaryKeys": {},
1486
+ "uniqueConstraints": {},
1487
+ "checkConstraints": {}
1488
+ },
1489
+ "memory_injections": {
1490
+ "name": "memory_injections",
1491
+ "columns": {
1492
+ "id": {
1493
+ "name": "id",
1494
+ "type": "text",
1495
+ "primaryKey": true,
1496
+ "notNull": true,
1497
+ "autoincrement": false
1498
+ },
1499
+ "memory_id": {
1500
+ "name": "memory_id",
1501
+ "type": "text",
1502
+ "primaryKey": false,
1503
+ "notNull": true,
1504
+ "autoincrement": false
1505
+ },
1506
+ "session_id": {
1507
+ "name": "session_id",
1508
+ "type": "text",
1509
+ "primaryKey": false,
1510
+ "notNull": true,
1511
+ "autoincrement": false
1512
+ },
1513
+ "repo": {
1514
+ "name": "repo",
1515
+ "type": "text",
1516
+ "primaryKey": false,
1517
+ "notNull": false,
1518
+ "autoincrement": false
1519
+ },
1520
+ "injected_at": {
1521
+ "name": "injected_at",
1522
+ "type": "text",
1523
+ "primaryKey": false,
1524
+ "notNull": true,
1525
+ "autoincrement": false
1526
+ },
1527
+ "outcome": {
1528
+ "name": "outcome",
1529
+ "type": "text",
1530
+ "primaryKey": false,
1531
+ "notNull": false,
1532
+ "autoincrement": false
1533
+ },
1534
+ "outcome_at": {
1535
+ "name": "outcome_at",
1536
+ "type": "text",
1537
+ "primaryKey": false,
1538
+ "notNull": false,
1539
+ "autoincrement": false
1540
+ }
1541
+ },
1542
+ "indexes": {
1543
+ "idx_memory_injections_memory": {
1544
+ "name": "idx_memory_injections_memory",
1545
+ "columns": [
1546
+ "memory_id"
1547
+ ],
1548
+ "isUnique": false
1549
+ },
1550
+ "idx_memory_injections_session": {
1551
+ "name": "idx_memory_injections_session",
1552
+ "columns": [
1553
+ "session_id"
1554
+ ],
1555
+ "isUnique": false
1556
+ },
1557
+ "uq_memory_injections_memory_session": {
1558
+ "name": "uq_memory_injections_memory_session",
1559
+ "columns": [
1560
+ "memory_id",
1561
+ "session_id"
1562
+ ],
1563
+ "isUnique": true
1564
+ }
1565
+ },
1566
+ "foreignKeys": {
1567
+ "memory_injections_memory_id_memories_id_fk": {
1568
+ "name": "memory_injections_memory_id_memories_id_fk",
1569
+ "tableFrom": "memory_injections",
1570
+ "tableTo": "memories",
1571
+ "columnsFrom": [
1572
+ "memory_id"
1573
+ ],
1574
+ "columnsTo": [
1575
+ "id"
1576
+ ],
1577
+ "onDelete": "cascade",
1578
+ "onUpdate": "no action"
1579
+ }
1580
+ },
1581
+ "compositePrimaryKeys": {},
1582
+ "uniqueConstraints": {},
1583
+ "checkConstraints": {}
1584
+ },
1585
+ "memory_maintenance_tasks": {
1586
+ "name": "memory_maintenance_tasks",
1587
+ "columns": {
1588
+ "id": {
1589
+ "name": "id",
1590
+ "type": "text",
1591
+ "primaryKey": true,
1592
+ "notNull": true,
1593
+ "autoincrement": false
1594
+ },
1595
+ "kind": {
1596
+ "name": "kind",
1597
+ "type": "text",
1598
+ "primaryKey": false,
1599
+ "notNull": true,
1600
+ "autoincrement": false
1601
+ },
1602
+ "status": {
1603
+ "name": "status",
1604
+ "type": "text",
1605
+ "primaryKey": false,
1606
+ "notNull": true,
1607
+ "autoincrement": false
1608
+ },
1609
+ "priority": {
1610
+ "name": "priority",
1611
+ "type": "integer",
1612
+ "primaryKey": false,
1613
+ "notNull": true,
1614
+ "autoincrement": false,
1615
+ "default": 0
1616
+ },
1617
+ "repo": {
1618
+ "name": "repo",
1619
+ "type": "text",
1620
+ "primaryKey": false,
1621
+ "notNull": false,
1622
+ "autoincrement": false
1623
+ },
1624
+ "target_key": {
1625
+ "name": "target_key",
1626
+ "type": "text",
1627
+ "primaryKey": false,
1628
+ "notNull": true,
1629
+ "autoincrement": false
1630
+ },
1631
+ "payload": {
1632
+ "name": "payload",
1633
+ "type": "text",
1634
+ "primaryKey": false,
1635
+ "notNull": true,
1636
+ "autoincrement": false
1637
+ },
1638
+ "result": {
1639
+ "name": "result",
1640
+ "type": "text",
1641
+ "primaryKey": false,
1642
+ "notNull": false,
1643
+ "autoincrement": false
1644
+ },
1645
+ "failure_reason": {
1646
+ "name": "failure_reason",
1647
+ "type": "text",
1648
+ "primaryKey": false,
1649
+ "notNull": false,
1650
+ "autoincrement": false
1651
+ },
1652
+ "claimed_by": {
1653
+ "name": "claimed_by",
1654
+ "type": "text",
1655
+ "primaryKey": false,
1656
+ "notNull": false,
1657
+ "autoincrement": false
1658
+ },
1659
+ "claimed_at": {
1660
+ "name": "claimed_at",
1661
+ "type": "text",
1662
+ "primaryKey": false,
1663
+ "notNull": false,
1664
+ "autoincrement": false
1665
+ },
1666
+ "claim_expires_at": {
1667
+ "name": "claim_expires_at",
1668
+ "type": "text",
1669
+ "primaryKey": false,
1670
+ "notNull": false,
1671
+ "autoincrement": false
1672
+ },
1673
+ "submitted_at": {
1674
+ "name": "submitted_at",
1675
+ "type": "text",
1676
+ "primaryKey": false,
1677
+ "notNull": false,
1678
+ "autoincrement": false
1679
+ },
1680
+ "completed_at": {
1681
+ "name": "completed_at",
1682
+ "type": "text",
1683
+ "primaryKey": false,
1684
+ "notNull": false,
1685
+ "autoincrement": false
1686
+ },
1687
+ "created_at": {
1688
+ "name": "created_at",
1689
+ "type": "text",
1690
+ "primaryKey": false,
1691
+ "notNull": true,
1692
+ "autoincrement": false
1693
+ },
1694
+ "attempts": {
1695
+ "name": "attempts",
1696
+ "type": "integer",
1697
+ "primaryKey": false,
1698
+ "notNull": true,
1699
+ "autoincrement": false,
1700
+ "default": 0
1701
+ },
1702
+ "max_attempts": {
1703
+ "name": "max_attempts",
1704
+ "type": "integer",
1705
+ "primaryKey": false,
1706
+ "notNull": true,
1707
+ "autoincrement": false,
1708
+ "default": 3
1709
+ }
1710
+ },
1711
+ "indexes": {
1712
+ "idx_mmt_status_priority": {
1713
+ "name": "idx_mmt_status_priority",
1714
+ "columns": [
1715
+ "status",
1716
+ "priority",
1717
+ "created_at"
1718
+ ],
1719
+ "isUnique": false
1720
+ },
1721
+ "idx_mmt_repo_status": {
1722
+ "name": "idx_mmt_repo_status",
1723
+ "columns": [
1724
+ "repo",
1725
+ "status"
1726
+ ],
1727
+ "isUnique": false
1728
+ },
1729
+ "idx_mmt_claim_expires": {
1730
+ "name": "idx_mmt_claim_expires",
1731
+ "columns": [
1732
+ "claim_expires_at"
1733
+ ],
1734
+ "isUnique": false
1735
+ },
1736
+ "idx_mmt_kind_target": {
1737
+ "name": "idx_mmt_kind_target",
1738
+ "columns": [
1739
+ "kind",
1740
+ "target_key"
1741
+ ],
1742
+ "isUnique": false
1743
+ }
1744
+ },
1745
+ "foreignKeys": {},
1746
+ "compositePrimaryKeys": {},
1747
+ "uniqueConstraints": {},
1748
+ "checkConstraints": {}
1749
+ },
1750
+ "policy_rules": {
1751
+ "name": "policy_rules",
1752
+ "columns": {
1753
+ "id": {
1754
+ "name": "id",
1755
+ "type": "text",
1756
+ "primaryKey": true,
1757
+ "notNull": true,
1758
+ "autoincrement": false
1759
+ },
1760
+ "org_id": {
1761
+ "name": "org_id",
1762
+ "type": "text",
1763
+ "primaryKey": false,
1764
+ "notNull": true,
1765
+ "autoincrement": false
1766
+ },
1767
+ "rule_type": {
1768
+ "name": "rule_type",
1769
+ "type": "text",
1770
+ "primaryKey": false,
1771
+ "notNull": true,
1772
+ "autoincrement": false
1773
+ },
1774
+ "config": {
1775
+ "name": "config",
1776
+ "type": "text",
1777
+ "primaryKey": false,
1778
+ "notNull": true,
1779
+ "autoincrement": false,
1780
+ "default": "'{}'"
1781
+ },
1782
+ "enabled": {
1783
+ "name": "enabled",
1784
+ "type": "integer",
1785
+ "primaryKey": false,
1786
+ "notNull": true,
1787
+ "autoincrement": false,
1788
+ "default": true
1789
+ },
1790
+ "created_at": {
1791
+ "name": "created_at",
1792
+ "type": "text",
1793
+ "primaryKey": false,
1794
+ "notNull": true,
1795
+ "autoincrement": false
1796
+ },
1797
+ "updated_at": {
1798
+ "name": "updated_at",
1799
+ "type": "text",
1800
+ "primaryKey": false,
1801
+ "notNull": true,
1802
+ "autoincrement": false
1803
+ }
1804
+ },
1805
+ "indexes": {
1806
+ "idx_policy_org": {
1807
+ "name": "idx_policy_org",
1808
+ "columns": [
1809
+ "org_id"
1810
+ ],
1811
+ "isUnique": false
1812
+ }
1813
+ },
1814
+ "foreignKeys": {},
1815
+ "compositePrimaryKeys": {},
1816
+ "uniqueConstraints": {},
1817
+ "checkConstraints": {}
1818
+ },
1819
+ "quality_snapshots": {
1820
+ "name": "quality_snapshots",
1821
+ "columns": {
1822
+ "id": {
1823
+ "name": "id",
1824
+ "type": "text",
1825
+ "primaryKey": true,
1826
+ "notNull": true,
1827
+ "autoincrement": false
1828
+ },
1829
+ "taken_at": {
1830
+ "name": "taken_at",
1831
+ "type": "text",
1832
+ "primaryKey": false,
1833
+ "notNull": true,
1834
+ "autoincrement": false
1835
+ },
1836
+ "window_start": {
1837
+ "name": "window_start",
1838
+ "type": "text",
1839
+ "primaryKey": false,
1840
+ "notNull": true,
1841
+ "autoincrement": false
1842
+ },
1843
+ "window_end": {
1844
+ "name": "window_end",
1845
+ "type": "text",
1846
+ "primaryKey": false,
1847
+ "notNull": true,
1848
+ "autoincrement": false
1849
+ },
1850
+ "injections_total": {
1851
+ "name": "injections_total",
1852
+ "type": "integer",
1853
+ "primaryKey": false,
1854
+ "notNull": true,
1855
+ "autoincrement": false
1856
+ },
1857
+ "injections_resolved": {
1858
+ "name": "injections_resolved",
1859
+ "type": "integer",
1860
+ "primaryKey": false,
1861
+ "notNull": true,
1862
+ "autoincrement": false
1863
+ },
1864
+ "injections_followed": {
1865
+ "name": "injections_followed",
1866
+ "type": "integer",
1867
+ "primaryKey": false,
1868
+ "notNull": true,
1869
+ "autoincrement": false
1870
+ },
1871
+ "injections_overridden": {
1872
+ "name": "injections_overridden",
1873
+ "type": "integer",
1874
+ "primaryKey": false,
1875
+ "notNull": true,
1876
+ "autoincrement": false
1877
+ },
1878
+ "injections_contradicted": {
1879
+ "name": "injections_contradicted",
1880
+ "type": "integer",
1881
+ "primaryKey": false,
1882
+ "notNull": true,
1883
+ "autoincrement": false
1884
+ },
1885
+ "injections_ignored": {
1886
+ "name": "injections_ignored",
1887
+ "type": "integer",
1888
+ "primaryKey": false,
1889
+ "notNull": true,
1890
+ "autoincrement": false
1891
+ },
1892
+ "followed_rate_resolved": {
1893
+ "name": "followed_rate_resolved",
1894
+ "type": "real",
1895
+ "primaryKey": false,
1896
+ "notNull": false,
1897
+ "autoincrement": false
1898
+ },
1899
+ "active_rule_count": {
1900
+ "name": "active_rule_count",
1901
+ "type": "integer",
1902
+ "primaryKey": false,
1903
+ "notNull": true,
1904
+ "autoincrement": false
1905
+ },
1906
+ "active_command_count": {
1907
+ "name": "active_command_count",
1908
+ "type": "integer",
1909
+ "primaryKey": false,
1910
+ "notNull": true,
1911
+ "autoincrement": false
1912
+ },
1913
+ "candidate_correction_count": {
1914
+ "name": "candidate_correction_count",
1915
+ "type": "integer",
1916
+ "primaryKey": false,
1917
+ "notNull": true,
1918
+ "autoincrement": false
1919
+ },
1920
+ "notes": {
1921
+ "name": "notes",
1922
+ "type": "text",
1923
+ "primaryKey": false,
1924
+ "notNull": false,
1925
+ "autoincrement": false
1926
+ }
1927
+ },
1928
+ "indexes": {
1929
+ "idx_quality_snapshots_taken": {
1930
+ "name": "idx_quality_snapshots_taken",
1931
+ "columns": [
1932
+ "taken_at"
1933
+ ],
1934
+ "isUnique": false
1935
+ }
1936
+ },
1937
+ "foreignKeys": {},
1938
+ "compositePrimaryKeys": {},
1939
+ "uniqueConstraints": {},
1940
+ "checkConstraints": {}
1941
+ },
1942
+ "sync_state": {
1943
+ "name": "sync_state",
1944
+ "columns": {
1945
+ "id": {
1946
+ "name": "id",
1947
+ "type": "text",
1948
+ "primaryKey": true,
1949
+ "notNull": true,
1950
+ "autoincrement": false
1951
+ },
1952
+ "remote_url": {
1953
+ "name": "remote_url",
1954
+ "type": "text",
1955
+ "primaryKey": false,
1956
+ "notNull": false,
1957
+ "autoincrement": false
1958
+ },
1959
+ "team_id": {
1960
+ "name": "team_id",
1961
+ "type": "text",
1962
+ "primaryKey": false,
1963
+ "notNull": false,
1964
+ "autoincrement": false
1965
+ },
1966
+ "last_push_at": {
1967
+ "name": "last_push_at",
1968
+ "type": "text",
1969
+ "primaryKey": false,
1970
+ "notNull": false,
1971
+ "autoincrement": false
1972
+ },
1973
+ "last_pull_at": {
1974
+ "name": "last_pull_at",
1975
+ "type": "text",
1976
+ "primaryKey": false,
1977
+ "notNull": false,
1978
+ "autoincrement": false
1979
+ },
1980
+ "last_push_version": {
1981
+ "name": "last_push_version",
1982
+ "type": "integer",
1983
+ "primaryKey": false,
1984
+ "notNull": true,
1985
+ "autoincrement": false,
1986
+ "default": 0
1987
+ },
1988
+ "last_pull_version": {
1989
+ "name": "last_pull_version",
1990
+ "type": "integer",
1991
+ "primaryKey": false,
1992
+ "notNull": true,
1993
+ "autoincrement": false,
1994
+ "default": 0
1995
+ }
1996
+ },
1997
+ "indexes": {},
1998
+ "foreignKeys": {},
1999
+ "compositePrimaryKeys": {},
2000
+ "uniqueConstraints": {},
2001
+ "checkConstraints": {}
2002
+ }
2003
+ },
2004
+ "views": {},
2005
+ "enums": {},
2006
+ "_meta": {
2007
+ "schemas": {},
2008
+ "tables": {},
2009
+ "columns": {}
2010
+ },
2011
+ "internal": {
2012
+ "indexes": {}
2013
+ }
2014
+ }