@edihasaj/recall 2.0.11 → 2.0.13

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 (77) hide show
  1. package/README.md +8 -1
  2. package/dist/{chunk-4OFTCJ3A.js → chunk-2HTTI7RT.js} +13 -13
  3. package/dist/{chunk-TKI5MM35.js → chunk-4ABDRSBH.js} +9 -9
  4. package/dist/{chunk-BB56EBUB.js → chunk-4RRFK6AN.js} +25 -3
  5. package/dist/{chunk-BB56EBUB.js.map → chunk-4RRFK6AN.js.map} +1 -1
  6. package/dist/{chunk-I5SACSGQ.js → chunk-567MAUUE.js} +5 -5
  7. package/dist/{chunk-FPD6Z63C.js → chunk-AADMAXTQ.js} +2 -2
  8. package/dist/{chunk-T46O2YNU.js → chunk-DEBUXCLE.js} +3 -3
  9. package/dist/{chunk-LP3Z5MGU.js → chunk-DYCRYEK7.js} +3 -3
  10. package/dist/{chunk-OFVI5NTJ.js → chunk-EIXCJFNV.js} +3 -3
  11. package/dist/{chunk-UWWUH2WI.js → chunk-FWEROCNP.js} +2 -2
  12. package/dist/{chunk-6PJ6ULQW.js → chunk-GLCHYZNP.js} +7 -7
  13. package/dist/{chunk-QTD2CINM.js → chunk-LSV3IW6V.js} +2 -2
  14. package/dist/{chunk-TXTUPXMI.js → chunk-MI3JLWFB.js} +5 -5
  15. package/dist/{chunk-WZOHW5TL.js → chunk-SGVZONKM.js} +2 -2
  16. package/dist/{chunk-WZOHW5TL.js.map → chunk-SGVZONKM.js.map} +1 -1
  17. package/dist/{chunk-XITENPDF.js → chunk-T52KOYE6.js} +351 -22
  18. package/dist/chunk-T52KOYE6.js.map +1 -0
  19. package/dist/{chunk-NRBUIOXH.js → chunk-TFIV63PJ.js} +414 -148
  20. package/dist/chunk-TFIV63PJ.js.map +1 -0
  21. package/dist/{chunk-7MSBS6FR.js → chunk-TPTG3R2E.js} +2 -2
  22. package/dist/{chunk-DVG3F533.js → chunk-UMWGDVKP.js} +4 -4
  23. package/dist/{chunk-NSJ5E7UL.js → chunk-YIQUWLD4.js} +7 -7
  24. package/dist/{cleanup-43KCWJTT.js → cleanup-JG676M52.js} +11 -11
  25. package/dist/cli.js +36 -36
  26. package/dist/{codex-trust-RWQPEUNN.js → codex-trust-4GCBZNZV.js} +4 -4
  27. package/dist/daemon.js +18 -18
  28. package/dist/dispatcher-RGD5XZSX.js +22 -0
  29. package/dist/{embeddings-OKGDZ2G7.js → embeddings-CW342LAP.js} +5 -5
  30. package/dist/ingest-6FW62DE2.js +20 -0
  31. package/dist/{keychain-BWP7257A.js → keychain-OQVWQN3A.js} +3 -3
  32. package/dist/mcp.js +15 -15
  33. package/dist/{memory-value-ALNH7ORV.js → memory-value-45BMUW54.js} +11 -11
  34. package/dist/{provenance-IXJ3XYBP.js → provenance-QZE6WA5M.js} +9 -9
  35. package/dist/quality-2DLKTP7F.js +25 -0
  36. package/dist/retrieval-BWZQSLOA.js +15 -0
  37. package/dist/{store-AADECMHC.js → store-DJULJ4V3.js} +4 -4
  38. package/dist/sync-server.js +2 -2
  39. package/dist/{tasks-GOVBFGEJ.js → tasks-PYC3UPQA.js} +11 -11
  40. package/dist/{usage-PDPAFEAU.js → usage-AMHA3O7R.js} +4 -4
  41. package/drizzle/0013_damp_zarda.sql +22 -0
  42. package/drizzle/meta/0013_snapshot.json +2874 -0
  43. package/drizzle/meta/_journal.json +7 -0
  44. package/package.json +18 -11
  45. package/dist/chunk-NRBUIOXH.js.map +0 -1
  46. package/dist/chunk-XITENPDF.js.map +0 -1
  47. package/dist/dispatcher-NUODV2I2.js +0 -22
  48. package/dist/ingest-KUO4E5L5.js +0 -20
  49. package/dist/quality-Z74GVWJS.js +0 -25
  50. package/dist/retrieval-VUAMO7AC.js +0 -15
  51. /package/dist/{chunk-4OFTCJ3A.js.map → chunk-2HTTI7RT.js.map} +0 -0
  52. /package/dist/{chunk-TKI5MM35.js.map → chunk-4ABDRSBH.js.map} +0 -0
  53. /package/dist/{chunk-I5SACSGQ.js.map → chunk-567MAUUE.js.map} +0 -0
  54. /package/dist/{chunk-FPD6Z63C.js.map → chunk-AADMAXTQ.js.map} +0 -0
  55. /package/dist/{chunk-T46O2YNU.js.map → chunk-DEBUXCLE.js.map} +0 -0
  56. /package/dist/{chunk-LP3Z5MGU.js.map → chunk-DYCRYEK7.js.map} +0 -0
  57. /package/dist/{chunk-OFVI5NTJ.js.map → chunk-EIXCJFNV.js.map} +0 -0
  58. /package/dist/{chunk-UWWUH2WI.js.map → chunk-FWEROCNP.js.map} +0 -0
  59. /package/dist/{chunk-6PJ6ULQW.js.map → chunk-GLCHYZNP.js.map} +0 -0
  60. /package/dist/{chunk-QTD2CINM.js.map → chunk-LSV3IW6V.js.map} +0 -0
  61. /package/dist/{chunk-TXTUPXMI.js.map → chunk-MI3JLWFB.js.map} +0 -0
  62. /package/dist/{chunk-7MSBS6FR.js.map → chunk-TPTG3R2E.js.map} +0 -0
  63. /package/dist/{chunk-DVG3F533.js.map → chunk-UMWGDVKP.js.map} +0 -0
  64. /package/dist/{chunk-NSJ5E7UL.js.map → chunk-YIQUWLD4.js.map} +0 -0
  65. /package/dist/{cleanup-43KCWJTT.js.map → cleanup-JG676M52.js.map} +0 -0
  66. /package/dist/{codex-trust-RWQPEUNN.js.map → codex-trust-4GCBZNZV.js.map} +0 -0
  67. /package/dist/{dispatcher-NUODV2I2.js.map → dispatcher-RGD5XZSX.js.map} +0 -0
  68. /package/dist/{embeddings-OKGDZ2G7.js.map → embeddings-CW342LAP.js.map} +0 -0
  69. /package/dist/{ingest-KUO4E5L5.js.map → ingest-6FW62DE2.js.map} +0 -0
  70. /package/dist/{keychain-BWP7257A.js.map → keychain-OQVWQN3A.js.map} +0 -0
  71. /package/dist/{memory-value-ALNH7ORV.js.map → memory-value-45BMUW54.js.map} +0 -0
  72. /package/dist/{provenance-IXJ3XYBP.js.map → provenance-QZE6WA5M.js.map} +0 -0
  73. /package/dist/{quality-Z74GVWJS.js.map → quality-2DLKTP7F.js.map} +0 -0
  74. /package/dist/{retrieval-VUAMO7AC.js.map → retrieval-BWZQSLOA.js.map} +0 -0
  75. /package/dist/{store-AADECMHC.js.map → store-DJULJ4V3.js.map} +0 -0
  76. /package/dist/{tasks-GOVBFGEJ.js.map → tasks-PYC3UPQA.js.map} +0 -0
  77. /package/dist/{usage-PDPAFEAU.js.map → usage-AMHA3O7R.js.map} +0 -0
@@ -0,0 +1,2874 @@
1
+ {
2
+ "version": "6",
3
+ "dialect": "sqlite",
4
+ "id": "61aac263-5ffa-4c6f-b2d0-518babc5d387",
5
+ "prevId": "561f926b-3367-44c7-94a1-6a6a3c3cd419",
6
+ "tables": {
7
+ "activity_events": {
8
+ "name": "activity_events",
9
+ "columns": {
10
+ "id": {
11
+ "name": "id",
12
+ "type": "text",
13
+ "primaryKey": true,
14
+ "notNull": true,
15
+ "autoincrement": false
16
+ },
17
+ "session_id": {
18
+ "name": "session_id",
19
+ "type": "text",
20
+ "primaryKey": false,
21
+ "notNull": false,
22
+ "autoincrement": false
23
+ },
24
+ "repo": {
25
+ "name": "repo",
26
+ "type": "text",
27
+ "primaryKey": false,
28
+ "notNull": false,
29
+ "autoincrement": false
30
+ },
31
+ "path": {
32
+ "name": "path",
33
+ "type": "text",
34
+ "primaryKey": false,
35
+ "notNull": false,
36
+ "autoincrement": false
37
+ },
38
+ "source": {
39
+ "name": "source",
40
+ "type": "text",
41
+ "primaryKey": false,
42
+ "notNull": true,
43
+ "autoincrement": false
44
+ },
45
+ "event_type": {
46
+ "name": "event_type",
47
+ "type": "text",
48
+ "primaryKey": false,
49
+ "notNull": true,
50
+ "autoincrement": false
51
+ },
52
+ "memory_ids": {
53
+ "name": "memory_ids",
54
+ "type": "text",
55
+ "primaryKey": false,
56
+ "notNull": true,
57
+ "autoincrement": false,
58
+ "default": "'[]'"
59
+ },
60
+ "dedupe_key": {
61
+ "name": "dedupe_key",
62
+ "type": "text",
63
+ "primaryKey": false,
64
+ "notNull": false,
65
+ "autoincrement": false
66
+ },
67
+ "request": {
68
+ "name": "request",
69
+ "type": "text",
70
+ "primaryKey": false,
71
+ "notNull": true,
72
+ "autoincrement": false,
73
+ "default": "'{}'"
74
+ },
75
+ "result": {
76
+ "name": "result",
77
+ "type": "text",
78
+ "primaryKey": false,
79
+ "notNull": true,
80
+ "autoincrement": false,
81
+ "default": "'{}'"
82
+ },
83
+ "created_at": {
84
+ "name": "created_at",
85
+ "type": "text",
86
+ "primaryKey": false,
87
+ "notNull": true,
88
+ "autoincrement": false
89
+ }
90
+ },
91
+ "indexes": {
92
+ "idx_activity_session": {
93
+ "name": "idx_activity_session",
94
+ "columns": [
95
+ "session_id"
96
+ ],
97
+ "isUnique": false
98
+ },
99
+ "idx_activity_repo": {
100
+ "name": "idx_activity_repo",
101
+ "columns": [
102
+ "repo"
103
+ ],
104
+ "isUnique": false
105
+ },
106
+ "idx_activity_event_type": {
107
+ "name": "idx_activity_event_type",
108
+ "columns": [
109
+ "event_type"
110
+ ],
111
+ "isUnique": false
112
+ },
113
+ "idx_activity_created": {
114
+ "name": "idx_activity_created",
115
+ "columns": [
116
+ "created_at"
117
+ ],
118
+ "isUnique": false
119
+ },
120
+ "uq_activity_events_dedupe_key": {
121
+ "name": "uq_activity_events_dedupe_key",
122
+ "columns": [
123
+ "dedupe_key"
124
+ ],
125
+ "isUnique": true
126
+ }
127
+ },
128
+ "foreignKeys": {},
129
+ "compositePrimaryKeys": {},
130
+ "uniqueConstraints": {},
131
+ "checkConstraints": {}
132
+ },
133
+ "approval_requests": {
134
+ "name": "approval_requests",
135
+ "columns": {
136
+ "id": {
137
+ "name": "id",
138
+ "type": "text",
139
+ "primaryKey": true,
140
+ "notNull": true,
141
+ "autoincrement": false
142
+ },
143
+ "memory_id": {
144
+ "name": "memory_id",
145
+ "type": "text",
146
+ "primaryKey": false,
147
+ "notNull": true,
148
+ "autoincrement": false
149
+ },
150
+ "org_id": {
151
+ "name": "org_id",
152
+ "type": "text",
153
+ "primaryKey": false,
154
+ "notNull": true,
155
+ "autoincrement": false
156
+ },
157
+ "requested_by": {
158
+ "name": "requested_by",
159
+ "type": "text",
160
+ "primaryKey": false,
161
+ "notNull": true,
162
+ "autoincrement": false
163
+ },
164
+ "status": {
165
+ "name": "status",
166
+ "type": "text",
167
+ "primaryKey": false,
168
+ "notNull": true,
169
+ "autoincrement": false,
170
+ "default": "'pending'"
171
+ },
172
+ "reviewed_by": {
173
+ "name": "reviewed_by",
174
+ "type": "text",
175
+ "primaryKey": false,
176
+ "notNull": false,
177
+ "autoincrement": false
178
+ },
179
+ "reason": {
180
+ "name": "reason",
181
+ "type": "text",
182
+ "primaryKey": false,
183
+ "notNull": false,
184
+ "autoincrement": false
185
+ },
186
+ "created_at": {
187
+ "name": "created_at",
188
+ "type": "text",
189
+ "primaryKey": false,
190
+ "notNull": true,
191
+ "autoincrement": false
192
+ },
193
+ "resolved_at": {
194
+ "name": "resolved_at",
195
+ "type": "text",
196
+ "primaryKey": false,
197
+ "notNull": false,
198
+ "autoincrement": false
199
+ }
200
+ },
201
+ "indexes": {
202
+ "idx_approval_org": {
203
+ "name": "idx_approval_org",
204
+ "columns": [
205
+ "org_id"
206
+ ],
207
+ "isUnique": false
208
+ },
209
+ "idx_approval_status": {
210
+ "name": "idx_approval_status",
211
+ "columns": [
212
+ "status"
213
+ ],
214
+ "isUnique": false
215
+ }
216
+ },
217
+ "foreignKeys": {
218
+ "approval_requests_memory_id_memories_id_fk": {
219
+ "name": "approval_requests_memory_id_memories_id_fk",
220
+ "tableFrom": "approval_requests",
221
+ "tableTo": "memories",
222
+ "columnsFrom": [
223
+ "memory_id"
224
+ ],
225
+ "columnsTo": [
226
+ "id"
227
+ ],
228
+ "onDelete": "no action",
229
+ "onUpdate": "no action"
230
+ }
231
+ },
232
+ "compositePrimaryKeys": {},
233
+ "uniqueConstraints": {},
234
+ "checkConstraints": {}
235
+ },
236
+ "audit_trail": {
237
+ "name": "audit_trail",
238
+ "columns": {
239
+ "id": {
240
+ "name": "id",
241
+ "type": "text",
242
+ "primaryKey": true,
243
+ "notNull": true,
244
+ "autoincrement": false
245
+ },
246
+ "memory_id": {
247
+ "name": "memory_id",
248
+ "type": "text",
249
+ "primaryKey": false,
250
+ "notNull": true,
251
+ "autoincrement": false
252
+ },
253
+ "action": {
254
+ "name": "action",
255
+ "type": "text",
256
+ "primaryKey": false,
257
+ "notNull": true,
258
+ "autoincrement": false
259
+ },
260
+ "actor": {
261
+ "name": "actor",
262
+ "type": "text",
263
+ "primaryKey": false,
264
+ "notNull": true,
265
+ "autoincrement": false
266
+ },
267
+ "before_snapshot": {
268
+ "name": "before_snapshot",
269
+ "type": "text",
270
+ "primaryKey": false,
271
+ "notNull": false,
272
+ "autoincrement": false
273
+ },
274
+ "after_snapshot": {
275
+ "name": "after_snapshot",
276
+ "type": "text",
277
+ "primaryKey": false,
278
+ "notNull": false,
279
+ "autoincrement": false
280
+ },
281
+ "reason": {
282
+ "name": "reason",
283
+ "type": "text",
284
+ "primaryKey": false,
285
+ "notNull": false,
286
+ "autoincrement": false
287
+ },
288
+ "timestamp": {
289
+ "name": "timestamp",
290
+ "type": "text",
291
+ "primaryKey": false,
292
+ "notNull": true,
293
+ "autoincrement": false
294
+ }
295
+ },
296
+ "indexes": {
297
+ "idx_audit_memory": {
298
+ "name": "idx_audit_memory",
299
+ "columns": [
300
+ "memory_id"
301
+ ],
302
+ "isUnique": false
303
+ },
304
+ "idx_audit_timestamp": {
305
+ "name": "idx_audit_timestamp",
306
+ "columns": [
307
+ "timestamp"
308
+ ],
309
+ "isUnique": false
310
+ }
311
+ },
312
+ "foreignKeys": {},
313
+ "compositePrimaryKeys": {},
314
+ "uniqueConstraints": {},
315
+ "checkConstraints": {}
316
+ },
317
+ "contradictions": {
318
+ "name": "contradictions",
319
+ "columns": {
320
+ "id": {
321
+ "name": "id",
322
+ "type": "text",
323
+ "primaryKey": true,
324
+ "notNull": true,
325
+ "autoincrement": false
326
+ },
327
+ "memory_a_id": {
328
+ "name": "memory_a_id",
329
+ "type": "text",
330
+ "primaryKey": false,
331
+ "notNull": true,
332
+ "autoincrement": false
333
+ },
334
+ "memory_b_id": {
335
+ "name": "memory_b_id",
336
+ "type": "text",
337
+ "primaryKey": false,
338
+ "notNull": true,
339
+ "autoincrement": false
340
+ },
341
+ "contradiction_type": {
342
+ "name": "contradiction_type",
343
+ "type": "text",
344
+ "primaryKey": false,
345
+ "notNull": true,
346
+ "autoincrement": false
347
+ },
348
+ "severity": {
349
+ "name": "severity",
350
+ "type": "text",
351
+ "primaryKey": false,
352
+ "notNull": true,
353
+ "autoincrement": false
354
+ },
355
+ "description": {
356
+ "name": "description",
357
+ "type": "text",
358
+ "primaryKey": false,
359
+ "notNull": true,
360
+ "autoincrement": false
361
+ },
362
+ "resolved": {
363
+ "name": "resolved",
364
+ "type": "integer",
365
+ "primaryKey": false,
366
+ "notNull": true,
367
+ "autoincrement": false,
368
+ "default": false
369
+ },
370
+ "resolution": {
371
+ "name": "resolution",
372
+ "type": "text",
373
+ "primaryKey": false,
374
+ "notNull": false,
375
+ "autoincrement": false
376
+ },
377
+ "detected_at": {
378
+ "name": "detected_at",
379
+ "type": "text",
380
+ "primaryKey": false,
381
+ "notNull": true,
382
+ "autoincrement": false
383
+ },
384
+ "resolved_at": {
385
+ "name": "resolved_at",
386
+ "type": "text",
387
+ "primaryKey": false,
388
+ "notNull": false,
389
+ "autoincrement": false
390
+ }
391
+ },
392
+ "indexes": {
393
+ "idx_contradictions_resolved": {
394
+ "name": "idx_contradictions_resolved",
395
+ "columns": [
396
+ "resolved"
397
+ ],
398
+ "isUnique": false
399
+ }
400
+ },
401
+ "foreignKeys": {
402
+ "contradictions_memory_a_id_memories_id_fk": {
403
+ "name": "contradictions_memory_a_id_memories_id_fk",
404
+ "tableFrom": "contradictions",
405
+ "tableTo": "memories",
406
+ "columnsFrom": [
407
+ "memory_a_id"
408
+ ],
409
+ "columnsTo": [
410
+ "id"
411
+ ],
412
+ "onDelete": "no action",
413
+ "onUpdate": "no action"
414
+ },
415
+ "contradictions_memory_b_id_memories_id_fk": {
416
+ "name": "contradictions_memory_b_id_memories_id_fk",
417
+ "tableFrom": "contradictions",
418
+ "tableTo": "memories",
419
+ "columnsFrom": [
420
+ "memory_b_id"
421
+ ],
422
+ "columnsTo": [
423
+ "id"
424
+ ],
425
+ "onDelete": "no action",
426
+ "onUpdate": "no action"
427
+ }
428
+ },
429
+ "compositePrimaryKeys": {},
430
+ "uniqueConstraints": {},
431
+ "checkConstraints": {}
432
+ },
433
+ "entities": {
434
+ "name": "entities",
435
+ "columns": {
436
+ "id": {
437
+ "name": "id",
438
+ "type": "text",
439
+ "primaryKey": true,
440
+ "notNull": true,
441
+ "autoincrement": false
442
+ },
443
+ "kind": {
444
+ "name": "kind",
445
+ "type": "text",
446
+ "primaryKey": false,
447
+ "notNull": true,
448
+ "autoincrement": false
449
+ },
450
+ "name": {
451
+ "name": "name",
452
+ "type": "text",
453
+ "primaryKey": false,
454
+ "notNull": true,
455
+ "autoincrement": false
456
+ },
457
+ "normalized_name": {
458
+ "name": "normalized_name",
459
+ "type": "text",
460
+ "primaryKey": false,
461
+ "notNull": true,
462
+ "autoincrement": false
463
+ },
464
+ "repo": {
465
+ "name": "repo",
466
+ "type": "text",
467
+ "primaryKey": false,
468
+ "notNull": false,
469
+ "autoincrement": false
470
+ },
471
+ "description": {
472
+ "name": "description",
473
+ "type": "text",
474
+ "primaryKey": false,
475
+ "notNull": false,
476
+ "autoincrement": false
477
+ },
478
+ "first_seen_memory_id": {
479
+ "name": "first_seen_memory_id",
480
+ "type": "text",
481
+ "primaryKey": false,
482
+ "notNull": false,
483
+ "autoincrement": false
484
+ },
485
+ "mention_count": {
486
+ "name": "mention_count",
487
+ "type": "integer",
488
+ "primaryKey": false,
489
+ "notNull": true,
490
+ "autoincrement": false,
491
+ "default": 0
492
+ },
493
+ "created_at": {
494
+ "name": "created_at",
495
+ "type": "text",
496
+ "primaryKey": false,
497
+ "notNull": true,
498
+ "autoincrement": false
499
+ },
500
+ "updated_at": {
501
+ "name": "updated_at",
502
+ "type": "text",
503
+ "primaryKey": false,
504
+ "notNull": true,
505
+ "autoincrement": false
506
+ }
507
+ },
508
+ "indexes": {
509
+ "idx_entities_normalized": {
510
+ "name": "idx_entities_normalized",
511
+ "columns": [
512
+ "normalized_name"
513
+ ],
514
+ "isUnique": false
515
+ },
516
+ "idx_entities_kind": {
517
+ "name": "idx_entities_kind",
518
+ "columns": [
519
+ "kind"
520
+ ],
521
+ "isUnique": false
522
+ },
523
+ "idx_entities_repo": {
524
+ "name": "idx_entities_repo",
525
+ "columns": [
526
+ "repo"
527
+ ],
528
+ "isUnique": false
529
+ }
530
+ },
531
+ "foreignKeys": {},
532
+ "compositePrimaryKeys": {},
533
+ "uniqueConstraints": {},
534
+ "checkConstraints": {}
535
+ },
536
+ "entity_relations": {
537
+ "name": "entity_relations",
538
+ "columns": {
539
+ "id": {
540
+ "name": "id",
541
+ "type": "text",
542
+ "primaryKey": true,
543
+ "notNull": true,
544
+ "autoincrement": false
545
+ },
546
+ "source_entity_id": {
547
+ "name": "source_entity_id",
548
+ "type": "text",
549
+ "primaryKey": false,
550
+ "notNull": true,
551
+ "autoincrement": false
552
+ },
553
+ "target_entity_id": {
554
+ "name": "target_entity_id",
555
+ "type": "text",
556
+ "primaryKey": false,
557
+ "notNull": true,
558
+ "autoincrement": false
559
+ },
560
+ "relation_type": {
561
+ "name": "relation_type",
562
+ "type": "text",
563
+ "primaryKey": false,
564
+ "notNull": true,
565
+ "autoincrement": false
566
+ },
567
+ "source_memory_id": {
568
+ "name": "source_memory_id",
569
+ "type": "text",
570
+ "primaryKey": false,
571
+ "notNull": false,
572
+ "autoincrement": false
573
+ },
574
+ "confidence": {
575
+ "name": "confidence",
576
+ "type": "real",
577
+ "primaryKey": false,
578
+ "notNull": true,
579
+ "autoincrement": false,
580
+ "default": 0.6
581
+ },
582
+ "created_at": {
583
+ "name": "created_at",
584
+ "type": "text",
585
+ "primaryKey": false,
586
+ "notNull": true,
587
+ "autoincrement": false
588
+ }
589
+ },
590
+ "indexes": {
591
+ "idx_entity_relations_source": {
592
+ "name": "idx_entity_relations_source",
593
+ "columns": [
594
+ "source_entity_id"
595
+ ],
596
+ "isUnique": false
597
+ },
598
+ "idx_entity_relations_target": {
599
+ "name": "idx_entity_relations_target",
600
+ "columns": [
601
+ "target_entity_id"
602
+ ],
603
+ "isUnique": false
604
+ },
605
+ "idx_entity_relations_type": {
606
+ "name": "idx_entity_relations_type",
607
+ "columns": [
608
+ "relation_type"
609
+ ],
610
+ "isUnique": false
611
+ }
612
+ },
613
+ "foreignKeys": {
614
+ "entity_relations_source_entity_id_entities_id_fk": {
615
+ "name": "entity_relations_source_entity_id_entities_id_fk",
616
+ "tableFrom": "entity_relations",
617
+ "tableTo": "entities",
618
+ "columnsFrom": [
619
+ "source_entity_id"
620
+ ],
621
+ "columnsTo": [
622
+ "id"
623
+ ],
624
+ "onDelete": "no action",
625
+ "onUpdate": "no action"
626
+ },
627
+ "entity_relations_target_entity_id_entities_id_fk": {
628
+ "name": "entity_relations_target_entity_id_entities_id_fk",
629
+ "tableFrom": "entity_relations",
630
+ "tableTo": "entities",
631
+ "columnsFrom": [
632
+ "target_entity_id"
633
+ ],
634
+ "columnsTo": [
635
+ "id"
636
+ ],
637
+ "onDelete": "no action",
638
+ "onUpdate": "no action"
639
+ }
640
+ },
641
+ "compositePrimaryKeys": {},
642
+ "uniqueConstraints": {},
643
+ "checkConstraints": {}
644
+ },
645
+ "eval_sessions": {
646
+ "name": "eval_sessions",
647
+ "columns": {
648
+ "id": {
649
+ "name": "id",
650
+ "type": "text",
651
+ "primaryKey": true,
652
+ "notNull": true,
653
+ "autoincrement": false
654
+ },
655
+ "repo": {
656
+ "name": "repo",
657
+ "type": "text",
658
+ "primaryKey": false,
659
+ "notNull": true,
660
+ "autoincrement": false
661
+ },
662
+ "started_at": {
663
+ "name": "started_at",
664
+ "type": "text",
665
+ "primaryKey": false,
666
+ "notNull": true,
667
+ "autoincrement": false
668
+ },
669
+ "ended_at": {
670
+ "name": "ended_at",
671
+ "type": "text",
672
+ "primaryKey": false,
673
+ "notNull": false,
674
+ "autoincrement": false
675
+ },
676
+ "memories_injected": {
677
+ "name": "memories_injected",
678
+ "type": "integer",
679
+ "primaryKey": false,
680
+ "notNull": true,
681
+ "autoincrement": false,
682
+ "default": 0
683
+ },
684
+ "memories_followed": {
685
+ "name": "memories_followed",
686
+ "type": "integer",
687
+ "primaryKey": false,
688
+ "notNull": true,
689
+ "autoincrement": false,
690
+ "default": 0
691
+ },
692
+ "memories_overridden": {
693
+ "name": "memories_overridden",
694
+ "type": "integer",
695
+ "primaryKey": false,
696
+ "notNull": true,
697
+ "autoincrement": false,
698
+ "default": 0
699
+ },
700
+ "user_corrections": {
701
+ "name": "user_corrections",
702
+ "type": "integer",
703
+ "primaryKey": false,
704
+ "notNull": true,
705
+ "autoincrement": false,
706
+ "default": 0
707
+ },
708
+ "test_passes": {
709
+ "name": "test_passes",
710
+ "type": "integer",
711
+ "primaryKey": false,
712
+ "notNull": true,
713
+ "autoincrement": false,
714
+ "default": 0
715
+ },
716
+ "test_failures": {
717
+ "name": "test_failures",
718
+ "type": "integer",
719
+ "primaryKey": false,
720
+ "notNull": true,
721
+ "autoincrement": false,
722
+ "default": 0
723
+ }
724
+ },
725
+ "indexes": {
726
+ "idx_eval_repo": {
727
+ "name": "idx_eval_repo",
728
+ "columns": [
729
+ "repo"
730
+ ],
731
+ "isUnique": false
732
+ }
733
+ },
734
+ "foreignKeys": {},
735
+ "compositePrimaryKeys": {},
736
+ "uniqueConstraints": {},
737
+ "checkConstraints": {}
738
+ },
739
+ "feedback_events": {
740
+ "name": "feedback_events",
741
+ "columns": {
742
+ "id": {
743
+ "name": "id",
744
+ "type": "text",
745
+ "primaryKey": true,
746
+ "notNull": true,
747
+ "autoincrement": false
748
+ },
749
+ "memory_id": {
750
+ "name": "memory_id",
751
+ "type": "text",
752
+ "primaryKey": false,
753
+ "notNull": true,
754
+ "autoincrement": false
755
+ },
756
+ "session_id": {
757
+ "name": "session_id",
758
+ "type": "text",
759
+ "primaryKey": false,
760
+ "notNull": true,
761
+ "autoincrement": false
762
+ },
763
+ "injected": {
764
+ "name": "injected",
765
+ "type": "integer",
766
+ "primaryKey": false,
767
+ "notNull": true,
768
+ "autoincrement": false
769
+ },
770
+ "outcome": {
771
+ "name": "outcome",
772
+ "type": "text",
773
+ "primaryKey": false,
774
+ "notNull": true,
775
+ "autoincrement": false
776
+ },
777
+ "timestamp": {
778
+ "name": "timestamp",
779
+ "type": "text",
780
+ "primaryKey": false,
781
+ "notNull": true,
782
+ "autoincrement": false
783
+ }
784
+ },
785
+ "indexes": {
786
+ "idx_feedback_memory": {
787
+ "name": "idx_feedback_memory",
788
+ "columns": [
789
+ "memory_id"
790
+ ],
791
+ "isUnique": false
792
+ },
793
+ "idx_feedback_session": {
794
+ "name": "idx_feedback_session",
795
+ "columns": [
796
+ "session_id"
797
+ ],
798
+ "isUnique": false
799
+ }
800
+ },
801
+ "foreignKeys": {
802
+ "feedback_events_memory_id_memories_id_fk": {
803
+ "name": "feedback_events_memory_id_memories_id_fk",
804
+ "tableFrom": "feedback_events",
805
+ "tableTo": "memories",
806
+ "columnsFrom": [
807
+ "memory_id"
808
+ ],
809
+ "columnsTo": [
810
+ "id"
811
+ ],
812
+ "onDelete": "no action",
813
+ "onUpdate": "no action"
814
+ }
815
+ },
816
+ "compositePrimaryKeys": {},
817
+ "uniqueConstraints": {},
818
+ "checkConstraints": {}
819
+ },
820
+ "history_injections": {
821
+ "name": "history_injections",
822
+ "columns": {
823
+ "id": {
824
+ "name": "id",
825
+ "type": "text",
826
+ "primaryKey": true,
827
+ "notNull": true,
828
+ "autoincrement": false
829
+ },
830
+ "snippet_id": {
831
+ "name": "snippet_id",
832
+ "type": "text",
833
+ "primaryKey": false,
834
+ "notNull": true,
835
+ "autoincrement": false
836
+ },
837
+ "session_id": {
838
+ "name": "session_id",
839
+ "type": "text",
840
+ "primaryKey": false,
841
+ "notNull": true,
842
+ "autoincrement": false
843
+ },
844
+ "repo": {
845
+ "name": "repo",
846
+ "type": "text",
847
+ "primaryKey": false,
848
+ "notNull": false,
849
+ "autoincrement": false
850
+ },
851
+ "injected_at": {
852
+ "name": "injected_at",
853
+ "type": "text",
854
+ "primaryKey": false,
855
+ "notNull": true,
856
+ "autoincrement": false
857
+ }
858
+ },
859
+ "indexes": {
860
+ "idx_history_injections_snippet": {
861
+ "name": "idx_history_injections_snippet",
862
+ "columns": [
863
+ "snippet_id"
864
+ ],
865
+ "isUnique": false
866
+ },
867
+ "idx_history_injections_session": {
868
+ "name": "idx_history_injections_session",
869
+ "columns": [
870
+ "session_id"
871
+ ],
872
+ "isUnique": false
873
+ },
874
+ "idx_history_injections_repo": {
875
+ "name": "idx_history_injections_repo",
876
+ "columns": [
877
+ "repo"
878
+ ],
879
+ "isUnique": false
880
+ },
881
+ "uq_history_injections_snippet_session": {
882
+ "name": "uq_history_injections_snippet_session",
883
+ "columns": [
884
+ "snippet_id",
885
+ "session_id"
886
+ ],
887
+ "isUnique": true
888
+ }
889
+ },
890
+ "foreignKeys": {
891
+ "history_injections_snippet_id_history_snippets_id_fk": {
892
+ "name": "history_injections_snippet_id_history_snippets_id_fk",
893
+ "tableFrom": "history_injections",
894
+ "tableTo": "history_snippets",
895
+ "columnsFrom": [
896
+ "snippet_id"
897
+ ],
898
+ "columnsTo": [
899
+ "id"
900
+ ],
901
+ "onDelete": "cascade",
902
+ "onUpdate": "no action"
903
+ }
904
+ },
905
+ "compositePrimaryKeys": {},
906
+ "uniqueConstraints": {},
907
+ "checkConstraints": {}
908
+ },
909
+ "history_snippet_embeddings": {
910
+ "name": "history_snippet_embeddings",
911
+ "columns": {
912
+ "snippet_id": {
913
+ "name": "snippet_id",
914
+ "type": "text",
915
+ "primaryKey": true,
916
+ "notNull": true,
917
+ "autoincrement": false
918
+ },
919
+ "model": {
920
+ "name": "model",
921
+ "type": "text",
922
+ "primaryKey": false,
923
+ "notNull": true,
924
+ "autoincrement": false
925
+ },
926
+ "embedding_dimensions": {
927
+ "name": "embedding_dimensions",
928
+ "type": "integer",
929
+ "primaryKey": false,
930
+ "notNull": true,
931
+ "autoincrement": false
932
+ },
933
+ "index_dimensions": {
934
+ "name": "index_dimensions",
935
+ "type": "integer",
936
+ "primaryKey": false,
937
+ "notNull": true,
938
+ "autoincrement": false
939
+ },
940
+ "version": {
941
+ "name": "version",
942
+ "type": "text",
943
+ "primaryKey": false,
944
+ "notNull": true,
945
+ "autoincrement": false
946
+ },
947
+ "content_hash": {
948
+ "name": "content_hash",
949
+ "type": "text",
950
+ "primaryKey": false,
951
+ "notNull": true,
952
+ "autoincrement": false
953
+ },
954
+ "updated_at": {
955
+ "name": "updated_at",
956
+ "type": "text",
957
+ "primaryKey": false,
958
+ "notNull": true,
959
+ "autoincrement": false
960
+ },
961
+ "embedding": {
962
+ "name": "embedding",
963
+ "type": "blob",
964
+ "primaryKey": false,
965
+ "notNull": true,
966
+ "autoincrement": false
967
+ }
968
+ },
969
+ "indexes": {
970
+ "idx_history_embeddings_model": {
971
+ "name": "idx_history_embeddings_model",
972
+ "columns": [
973
+ "model"
974
+ ],
975
+ "isUnique": false
976
+ },
977
+ "idx_history_embeddings_updated": {
978
+ "name": "idx_history_embeddings_updated",
979
+ "columns": [
980
+ "updated_at"
981
+ ],
982
+ "isUnique": false
983
+ }
984
+ },
985
+ "foreignKeys": {
986
+ "history_snippet_embeddings_snippet_id_history_snippets_id_fk": {
987
+ "name": "history_snippet_embeddings_snippet_id_history_snippets_id_fk",
988
+ "tableFrom": "history_snippet_embeddings",
989
+ "tableTo": "history_snippets",
990
+ "columnsFrom": [
991
+ "snippet_id"
992
+ ],
993
+ "columnsTo": [
994
+ "id"
995
+ ],
996
+ "onDelete": "cascade",
997
+ "onUpdate": "no action"
998
+ }
999
+ },
1000
+ "compositePrimaryKeys": {},
1001
+ "uniqueConstraints": {},
1002
+ "checkConstraints": {}
1003
+ },
1004
+ "history_snippets": {
1005
+ "name": "history_snippets",
1006
+ "columns": {
1007
+ "id": {
1008
+ "name": "id",
1009
+ "type": "text",
1010
+ "primaryKey": true,
1011
+ "notNull": true,
1012
+ "autoincrement": false
1013
+ },
1014
+ "repo": {
1015
+ "name": "repo",
1016
+ "type": "text",
1017
+ "primaryKey": false,
1018
+ "notNull": false,
1019
+ "autoincrement": false
1020
+ },
1021
+ "session_id": {
1022
+ "name": "session_id",
1023
+ "type": "text",
1024
+ "primaryKey": false,
1025
+ "notNull": false,
1026
+ "autoincrement": false
1027
+ },
1028
+ "kind": {
1029
+ "name": "kind",
1030
+ "type": "text",
1031
+ "primaryKey": false,
1032
+ "notNull": true,
1033
+ "autoincrement": false
1034
+ },
1035
+ "text": {
1036
+ "name": "text",
1037
+ "type": "text",
1038
+ "primaryKey": false,
1039
+ "notNull": true,
1040
+ "autoincrement": false
1041
+ },
1042
+ "dedupe_key": {
1043
+ "name": "dedupe_key",
1044
+ "type": "text",
1045
+ "primaryKey": false,
1046
+ "notNull": false,
1047
+ "autoincrement": false
1048
+ },
1049
+ "source_activity_ids": {
1050
+ "name": "source_activity_ids",
1051
+ "type": "text",
1052
+ "primaryKey": false,
1053
+ "notNull": true,
1054
+ "autoincrement": false,
1055
+ "default": "'[]'"
1056
+ },
1057
+ "created_at": {
1058
+ "name": "created_at",
1059
+ "type": "text",
1060
+ "primaryKey": false,
1061
+ "notNull": true,
1062
+ "autoincrement": false
1063
+ },
1064
+ "updated_at": {
1065
+ "name": "updated_at",
1066
+ "type": "text",
1067
+ "primaryKey": false,
1068
+ "notNull": true,
1069
+ "autoincrement": false
1070
+ }
1071
+ },
1072
+ "indexes": {
1073
+ "idx_history_repo": {
1074
+ "name": "idx_history_repo",
1075
+ "columns": [
1076
+ "repo"
1077
+ ],
1078
+ "isUnique": false
1079
+ },
1080
+ "idx_history_session": {
1081
+ "name": "idx_history_session",
1082
+ "columns": [
1083
+ "session_id"
1084
+ ],
1085
+ "isUnique": false
1086
+ },
1087
+ "idx_history_kind": {
1088
+ "name": "idx_history_kind",
1089
+ "columns": [
1090
+ "kind"
1091
+ ],
1092
+ "isUnique": false
1093
+ },
1094
+ "idx_history_created": {
1095
+ "name": "idx_history_created",
1096
+ "columns": [
1097
+ "created_at"
1098
+ ],
1099
+ "isUnique": false
1100
+ },
1101
+ "uq_history_snippets_dedupe_key": {
1102
+ "name": "uq_history_snippets_dedupe_key",
1103
+ "columns": [
1104
+ "dedupe_key"
1105
+ ],
1106
+ "isUnique": true
1107
+ }
1108
+ },
1109
+ "foreignKeys": {},
1110
+ "compositePrimaryKeys": {},
1111
+ "uniqueConstraints": {},
1112
+ "checkConstraints": {}
1113
+ },
1114
+ "hook_calls": {
1115
+ "name": "hook_calls",
1116
+ "columns": {
1117
+ "id": {
1118
+ "name": "id",
1119
+ "type": "text",
1120
+ "primaryKey": true,
1121
+ "notNull": true,
1122
+ "autoincrement": false
1123
+ },
1124
+ "event": {
1125
+ "name": "event",
1126
+ "type": "text",
1127
+ "primaryKey": false,
1128
+ "notNull": true,
1129
+ "autoincrement": false
1130
+ },
1131
+ "agent": {
1132
+ "name": "agent",
1133
+ "type": "text",
1134
+ "primaryKey": false,
1135
+ "notNull": true,
1136
+ "autoincrement": false
1137
+ },
1138
+ "dedupe_key": {
1139
+ "name": "dedupe_key",
1140
+ "type": "text",
1141
+ "primaryKey": false,
1142
+ "notNull": false,
1143
+ "autoincrement": false
1144
+ },
1145
+ "duration_ms": {
1146
+ "name": "duration_ms",
1147
+ "type": "integer",
1148
+ "primaryKey": false,
1149
+ "notNull": true,
1150
+ "autoincrement": false
1151
+ },
1152
+ "ok": {
1153
+ "name": "ok",
1154
+ "type": "integer",
1155
+ "primaryKey": false,
1156
+ "notNull": true,
1157
+ "autoincrement": false
1158
+ },
1159
+ "created_at": {
1160
+ "name": "created_at",
1161
+ "type": "text",
1162
+ "primaryKey": false,
1163
+ "notNull": true,
1164
+ "autoincrement": false
1165
+ }
1166
+ },
1167
+ "indexes": {
1168
+ "idx_hook_calls_event": {
1169
+ "name": "idx_hook_calls_event",
1170
+ "columns": [
1171
+ "event"
1172
+ ],
1173
+ "isUnique": false
1174
+ },
1175
+ "idx_hook_calls_agent": {
1176
+ "name": "idx_hook_calls_agent",
1177
+ "columns": [
1178
+ "agent"
1179
+ ],
1180
+ "isUnique": false
1181
+ },
1182
+ "idx_hook_calls_created": {
1183
+ "name": "idx_hook_calls_created",
1184
+ "columns": [
1185
+ "created_at"
1186
+ ],
1187
+ "isUnique": false
1188
+ },
1189
+ "uq_hook_calls_dedupe_key": {
1190
+ "name": "uq_hook_calls_dedupe_key",
1191
+ "columns": [
1192
+ "dedupe_key"
1193
+ ],
1194
+ "isUnique": true
1195
+ }
1196
+ },
1197
+ "foreignKeys": {},
1198
+ "compositePrimaryKeys": {},
1199
+ "uniqueConstraints": {},
1200
+ "checkConstraints": {}
1201
+ },
1202
+ "implicit_signals": {
1203
+ "name": "implicit_signals",
1204
+ "columns": {
1205
+ "id": {
1206
+ "name": "id",
1207
+ "type": "text",
1208
+ "primaryKey": true,
1209
+ "notNull": true,
1210
+ "autoincrement": false
1211
+ },
1212
+ "memory_id": {
1213
+ "name": "memory_id",
1214
+ "type": "text",
1215
+ "primaryKey": false,
1216
+ "notNull": true,
1217
+ "autoincrement": false
1218
+ },
1219
+ "session_id": {
1220
+ "name": "session_id",
1221
+ "type": "text",
1222
+ "primaryKey": false,
1223
+ "notNull": true,
1224
+ "autoincrement": false
1225
+ },
1226
+ "signal_type": {
1227
+ "name": "signal_type",
1228
+ "type": "text",
1229
+ "primaryKey": false,
1230
+ "notNull": true,
1231
+ "autoincrement": false
1232
+ },
1233
+ "timestamp": {
1234
+ "name": "timestamp",
1235
+ "type": "text",
1236
+ "primaryKey": false,
1237
+ "notNull": true,
1238
+ "autoincrement": false
1239
+ },
1240
+ "context": {
1241
+ "name": "context",
1242
+ "type": "text",
1243
+ "primaryKey": false,
1244
+ "notNull": false,
1245
+ "autoincrement": false
1246
+ }
1247
+ },
1248
+ "indexes": {
1249
+ "idx_implicit_memory": {
1250
+ "name": "idx_implicit_memory",
1251
+ "columns": [
1252
+ "memory_id"
1253
+ ],
1254
+ "isUnique": false
1255
+ },
1256
+ "idx_implicit_session": {
1257
+ "name": "idx_implicit_session",
1258
+ "columns": [
1259
+ "session_id"
1260
+ ],
1261
+ "isUnique": false
1262
+ }
1263
+ },
1264
+ "foreignKeys": {
1265
+ "implicit_signals_memory_id_memories_id_fk": {
1266
+ "name": "implicit_signals_memory_id_memories_id_fk",
1267
+ "tableFrom": "implicit_signals",
1268
+ "tableTo": "memories",
1269
+ "columnsFrom": [
1270
+ "memory_id"
1271
+ ],
1272
+ "columnsTo": [
1273
+ "id"
1274
+ ],
1275
+ "onDelete": "no action",
1276
+ "onUpdate": "no action"
1277
+ }
1278
+ },
1279
+ "compositePrimaryKeys": {},
1280
+ "uniqueConstraints": {},
1281
+ "checkConstraints": {}
1282
+ },
1283
+ "llm_usage": {
1284
+ "name": "llm_usage",
1285
+ "columns": {
1286
+ "id": {
1287
+ "name": "id",
1288
+ "type": "text",
1289
+ "primaryKey": true,
1290
+ "notNull": true,
1291
+ "autoincrement": false
1292
+ },
1293
+ "provider": {
1294
+ "name": "provider",
1295
+ "type": "text",
1296
+ "primaryKey": false,
1297
+ "notNull": true,
1298
+ "autoincrement": false
1299
+ },
1300
+ "model": {
1301
+ "name": "model",
1302
+ "type": "text",
1303
+ "primaryKey": false,
1304
+ "notNull": true,
1305
+ "autoincrement": false
1306
+ },
1307
+ "task_kind": {
1308
+ "name": "task_kind",
1309
+ "type": "text",
1310
+ "primaryKey": false,
1311
+ "notNull": true,
1312
+ "autoincrement": false
1313
+ },
1314
+ "task_id": {
1315
+ "name": "task_id",
1316
+ "type": "text",
1317
+ "primaryKey": false,
1318
+ "notNull": false,
1319
+ "autoincrement": false
1320
+ },
1321
+ "repo": {
1322
+ "name": "repo",
1323
+ "type": "text",
1324
+ "primaryKey": false,
1325
+ "notNull": false,
1326
+ "autoincrement": false
1327
+ },
1328
+ "prompt_tokens": {
1329
+ "name": "prompt_tokens",
1330
+ "type": "integer",
1331
+ "primaryKey": false,
1332
+ "notNull": true,
1333
+ "autoincrement": false,
1334
+ "default": 0
1335
+ },
1336
+ "completion_tokens": {
1337
+ "name": "completion_tokens",
1338
+ "type": "integer",
1339
+ "primaryKey": false,
1340
+ "notNull": true,
1341
+ "autoincrement": false,
1342
+ "default": 0
1343
+ },
1344
+ "total_tokens": {
1345
+ "name": "total_tokens",
1346
+ "type": "integer",
1347
+ "primaryKey": false,
1348
+ "notNull": true,
1349
+ "autoincrement": false,
1350
+ "default": 0
1351
+ },
1352
+ "cost_usd": {
1353
+ "name": "cost_usd",
1354
+ "type": "real",
1355
+ "primaryKey": false,
1356
+ "notNull": false,
1357
+ "autoincrement": false
1358
+ },
1359
+ "duration_ms": {
1360
+ "name": "duration_ms",
1361
+ "type": "integer",
1362
+ "primaryKey": false,
1363
+ "notNull": true,
1364
+ "autoincrement": false,
1365
+ "default": 0
1366
+ },
1367
+ "ok": {
1368
+ "name": "ok",
1369
+ "type": "integer",
1370
+ "primaryKey": false,
1371
+ "notNull": true,
1372
+ "autoincrement": false,
1373
+ "default": true
1374
+ },
1375
+ "error": {
1376
+ "name": "error",
1377
+ "type": "text",
1378
+ "primaryKey": false,
1379
+ "notNull": false,
1380
+ "autoincrement": false
1381
+ },
1382
+ "created_at": {
1383
+ "name": "created_at",
1384
+ "type": "text",
1385
+ "primaryKey": false,
1386
+ "notNull": true,
1387
+ "autoincrement": false
1388
+ }
1389
+ },
1390
+ "indexes": {
1391
+ "idx_llm_usage_created": {
1392
+ "name": "idx_llm_usage_created",
1393
+ "columns": [
1394
+ "created_at"
1395
+ ],
1396
+ "isUnique": false
1397
+ },
1398
+ "idx_llm_usage_provider_model": {
1399
+ "name": "idx_llm_usage_provider_model",
1400
+ "columns": [
1401
+ "provider",
1402
+ "model"
1403
+ ],
1404
+ "isUnique": false
1405
+ },
1406
+ "idx_llm_usage_task_kind": {
1407
+ "name": "idx_llm_usage_task_kind",
1408
+ "columns": [
1409
+ "task_kind"
1410
+ ],
1411
+ "isUnique": false
1412
+ },
1413
+ "idx_llm_usage_repo": {
1414
+ "name": "idx_llm_usage_repo",
1415
+ "columns": [
1416
+ "repo"
1417
+ ],
1418
+ "isUnique": false
1419
+ }
1420
+ },
1421
+ "foreignKeys": {},
1422
+ "compositePrimaryKeys": {},
1423
+ "uniqueConstraints": {},
1424
+ "checkConstraints": {}
1425
+ },
1426
+ "maintenance_cleanup_log": {
1427
+ "name": "maintenance_cleanup_log",
1428
+ "columns": {
1429
+ "id": {
1430
+ "name": "id",
1431
+ "type": "text",
1432
+ "primaryKey": true,
1433
+ "notNull": true,
1434
+ "autoincrement": false
1435
+ },
1436
+ "run_id": {
1437
+ "name": "run_id",
1438
+ "type": "text",
1439
+ "primaryKey": false,
1440
+ "notNull": true,
1441
+ "autoincrement": false
1442
+ },
1443
+ "action": {
1444
+ "name": "action",
1445
+ "type": "text",
1446
+ "primaryKey": false,
1447
+ "notNull": true,
1448
+ "autoincrement": false
1449
+ },
1450
+ "memory_id": {
1451
+ "name": "memory_id",
1452
+ "type": "text",
1453
+ "primaryKey": false,
1454
+ "notNull": true,
1455
+ "autoincrement": false
1456
+ },
1457
+ "related_memory_id": {
1458
+ "name": "related_memory_id",
1459
+ "type": "text",
1460
+ "primaryKey": false,
1461
+ "notNull": false,
1462
+ "autoincrement": false
1463
+ },
1464
+ "before_snapshot": {
1465
+ "name": "before_snapshot",
1466
+ "type": "text",
1467
+ "primaryKey": false,
1468
+ "notNull": false,
1469
+ "autoincrement": false
1470
+ },
1471
+ "after_snapshot": {
1472
+ "name": "after_snapshot",
1473
+ "type": "text",
1474
+ "primaryKey": false,
1475
+ "notNull": false,
1476
+ "autoincrement": false
1477
+ },
1478
+ "details": {
1479
+ "name": "details",
1480
+ "type": "text",
1481
+ "primaryKey": false,
1482
+ "notNull": true,
1483
+ "autoincrement": false,
1484
+ "default": "'{}'"
1485
+ },
1486
+ "reverted": {
1487
+ "name": "reverted",
1488
+ "type": "integer",
1489
+ "primaryKey": false,
1490
+ "notNull": true,
1491
+ "autoincrement": false,
1492
+ "default": false
1493
+ },
1494
+ "reverted_at": {
1495
+ "name": "reverted_at",
1496
+ "type": "text",
1497
+ "primaryKey": false,
1498
+ "notNull": false,
1499
+ "autoincrement": false
1500
+ },
1501
+ "created_at": {
1502
+ "name": "created_at",
1503
+ "type": "text",
1504
+ "primaryKey": false,
1505
+ "notNull": true,
1506
+ "autoincrement": false
1507
+ }
1508
+ },
1509
+ "indexes": {
1510
+ "idx_cleanup_log_run": {
1511
+ "name": "idx_cleanup_log_run",
1512
+ "columns": [
1513
+ "run_id"
1514
+ ],
1515
+ "isUnique": false
1516
+ },
1517
+ "idx_cleanup_log_memory": {
1518
+ "name": "idx_cleanup_log_memory",
1519
+ "columns": [
1520
+ "memory_id"
1521
+ ],
1522
+ "isUnique": false
1523
+ },
1524
+ "idx_cleanup_log_action": {
1525
+ "name": "idx_cleanup_log_action",
1526
+ "columns": [
1527
+ "action"
1528
+ ],
1529
+ "isUnique": false
1530
+ },
1531
+ "idx_cleanup_log_created": {
1532
+ "name": "idx_cleanup_log_created",
1533
+ "columns": [
1534
+ "created_at"
1535
+ ],
1536
+ "isUnique": false
1537
+ }
1538
+ },
1539
+ "foreignKeys": {},
1540
+ "compositePrimaryKeys": {},
1541
+ "uniqueConstraints": {},
1542
+ "checkConstraints": {}
1543
+ },
1544
+ "memories": {
1545
+ "name": "memories",
1546
+ "columns": {
1547
+ "id": {
1548
+ "name": "id",
1549
+ "type": "text",
1550
+ "primaryKey": true,
1551
+ "notNull": true,
1552
+ "autoincrement": false
1553
+ },
1554
+ "type": {
1555
+ "name": "type",
1556
+ "type": "text",
1557
+ "primaryKey": false,
1558
+ "notNull": true,
1559
+ "autoincrement": false
1560
+ },
1561
+ "text": {
1562
+ "name": "text",
1563
+ "type": "text",
1564
+ "primaryKey": false,
1565
+ "notNull": true,
1566
+ "autoincrement": false
1567
+ },
1568
+ "scope": {
1569
+ "name": "scope",
1570
+ "type": "text",
1571
+ "primaryKey": false,
1572
+ "notNull": true,
1573
+ "autoincrement": false
1574
+ },
1575
+ "path_scope": {
1576
+ "name": "path_scope",
1577
+ "type": "text",
1578
+ "primaryKey": false,
1579
+ "notNull": false,
1580
+ "autoincrement": false
1581
+ },
1582
+ "repo": {
1583
+ "name": "repo",
1584
+ "type": "text",
1585
+ "primaryKey": false,
1586
+ "notNull": false,
1587
+ "autoincrement": false
1588
+ },
1589
+ "status": {
1590
+ "name": "status",
1591
+ "type": "text",
1592
+ "primaryKey": false,
1593
+ "notNull": true,
1594
+ "autoincrement": false
1595
+ },
1596
+ "confidence": {
1597
+ "name": "confidence",
1598
+ "type": "real",
1599
+ "primaryKey": false,
1600
+ "notNull": true,
1601
+ "autoincrement": false,
1602
+ "default": 0
1603
+ },
1604
+ "source": {
1605
+ "name": "source",
1606
+ "type": "text",
1607
+ "primaryKey": false,
1608
+ "notNull": true,
1609
+ "autoincrement": false
1610
+ },
1611
+ "evidence": {
1612
+ "name": "evidence",
1613
+ "type": "text",
1614
+ "primaryKey": false,
1615
+ "notNull": true,
1616
+ "autoincrement": false,
1617
+ "default": "'[]'"
1618
+ },
1619
+ "capture_context": {
1620
+ "name": "capture_context",
1621
+ "type": "text",
1622
+ "primaryKey": false,
1623
+ "notNull": false,
1624
+ "autoincrement": false
1625
+ },
1626
+ "note": {
1627
+ "name": "note",
1628
+ "type": "text",
1629
+ "primaryKey": false,
1630
+ "notNull": false,
1631
+ "autoincrement": false
1632
+ },
1633
+ "supersedes": {
1634
+ "name": "supersedes",
1635
+ "type": "text",
1636
+ "primaryKey": false,
1637
+ "notNull": false,
1638
+ "autoincrement": false
1639
+ },
1640
+ "dedupe_key": {
1641
+ "name": "dedupe_key",
1642
+ "type": "text",
1643
+ "primaryKey": false,
1644
+ "notNull": false,
1645
+ "autoincrement": false
1646
+ },
1647
+ "created_at": {
1648
+ "name": "created_at",
1649
+ "type": "text",
1650
+ "primaryKey": false,
1651
+ "notNull": true,
1652
+ "autoincrement": false
1653
+ },
1654
+ "updated_at": {
1655
+ "name": "updated_at",
1656
+ "type": "text",
1657
+ "primaryKey": false,
1658
+ "notNull": true,
1659
+ "autoincrement": false
1660
+ },
1661
+ "last_validated_at": {
1662
+ "name": "last_validated_at",
1663
+ "type": "text",
1664
+ "primaryKey": false,
1665
+ "notNull": false,
1666
+ "autoincrement": false
1667
+ },
1668
+ "last_injected_at": {
1669
+ "name": "last_injected_at",
1670
+ "type": "text",
1671
+ "primaryKey": false,
1672
+ "notNull": false,
1673
+ "autoincrement": false
1674
+ },
1675
+ "injection_count": {
1676
+ "name": "injection_count",
1677
+ "type": "integer",
1678
+ "primaryKey": false,
1679
+ "notNull": true,
1680
+ "autoincrement": false,
1681
+ "default": 0
1682
+ },
1683
+ "override_count": {
1684
+ "name": "override_count",
1685
+ "type": "integer",
1686
+ "primaryKey": false,
1687
+ "notNull": true,
1688
+ "autoincrement": false,
1689
+ "default": 0
1690
+ },
1691
+ "repetition_count": {
1692
+ "name": "repetition_count",
1693
+ "type": "integer",
1694
+ "primaryKey": false,
1695
+ "notNull": true,
1696
+ "autoincrement": false,
1697
+ "default": 0
1698
+ },
1699
+ "team_id": {
1700
+ "name": "team_id",
1701
+ "type": "text",
1702
+ "primaryKey": false,
1703
+ "notNull": false,
1704
+ "autoincrement": false
1705
+ },
1706
+ "sync_version": {
1707
+ "name": "sync_version",
1708
+ "type": "integer",
1709
+ "primaryKey": false,
1710
+ "notNull": true,
1711
+ "autoincrement": false,
1712
+ "default": 0
1713
+ },
1714
+ "auto_inject": {
1715
+ "name": "auto_inject",
1716
+ "type": "integer",
1717
+ "primaryKey": false,
1718
+ "notNull": true,
1719
+ "autoincrement": false,
1720
+ "default": true
1721
+ }
1722
+ },
1723
+ "indexes": {
1724
+ "idx_memories_repo": {
1725
+ "name": "idx_memories_repo",
1726
+ "columns": [
1727
+ "repo"
1728
+ ],
1729
+ "isUnique": false
1730
+ },
1731
+ "idx_memories_status": {
1732
+ "name": "idx_memories_status",
1733
+ "columns": [
1734
+ "status"
1735
+ ],
1736
+ "isUnique": false
1737
+ },
1738
+ "idx_memories_repo_status": {
1739
+ "name": "idx_memories_repo_status",
1740
+ "columns": [
1741
+ "repo",
1742
+ "status"
1743
+ ],
1744
+ "isUnique": false
1745
+ },
1746
+ "idx_memories_team": {
1747
+ "name": "idx_memories_team",
1748
+ "columns": [
1749
+ "team_id"
1750
+ ],
1751
+ "isUnique": false
1752
+ },
1753
+ "uq_memories_dedupe_key": {
1754
+ "name": "uq_memories_dedupe_key",
1755
+ "columns": [
1756
+ "dedupe_key"
1757
+ ],
1758
+ "isUnique": true
1759
+ }
1760
+ },
1761
+ "foreignKeys": {},
1762
+ "compositePrimaryKeys": {},
1763
+ "uniqueConstraints": {},
1764
+ "checkConstraints": {}
1765
+ },
1766
+ "memory_embeddings": {
1767
+ "name": "memory_embeddings",
1768
+ "columns": {
1769
+ "memory_id": {
1770
+ "name": "memory_id",
1771
+ "type": "text",
1772
+ "primaryKey": true,
1773
+ "notNull": true,
1774
+ "autoincrement": false
1775
+ },
1776
+ "model": {
1777
+ "name": "model",
1778
+ "type": "text",
1779
+ "primaryKey": false,
1780
+ "notNull": true,
1781
+ "autoincrement": false
1782
+ },
1783
+ "embedding_dimensions": {
1784
+ "name": "embedding_dimensions",
1785
+ "type": "integer",
1786
+ "primaryKey": false,
1787
+ "notNull": true,
1788
+ "autoincrement": false
1789
+ },
1790
+ "index_dimensions": {
1791
+ "name": "index_dimensions",
1792
+ "type": "integer",
1793
+ "primaryKey": false,
1794
+ "notNull": true,
1795
+ "autoincrement": false
1796
+ },
1797
+ "version": {
1798
+ "name": "version",
1799
+ "type": "text",
1800
+ "primaryKey": false,
1801
+ "notNull": true,
1802
+ "autoincrement": false
1803
+ },
1804
+ "content_hash": {
1805
+ "name": "content_hash",
1806
+ "type": "text",
1807
+ "primaryKey": false,
1808
+ "notNull": true,
1809
+ "autoincrement": false
1810
+ },
1811
+ "updated_at": {
1812
+ "name": "updated_at",
1813
+ "type": "text",
1814
+ "primaryKey": false,
1815
+ "notNull": true,
1816
+ "autoincrement": false
1817
+ },
1818
+ "embedding": {
1819
+ "name": "embedding",
1820
+ "type": "blob",
1821
+ "primaryKey": false,
1822
+ "notNull": true,
1823
+ "autoincrement": false
1824
+ }
1825
+ },
1826
+ "indexes": {
1827
+ "idx_memory_embeddings_model": {
1828
+ "name": "idx_memory_embeddings_model",
1829
+ "columns": [
1830
+ "model"
1831
+ ],
1832
+ "isUnique": false
1833
+ },
1834
+ "idx_memory_embeddings_updated": {
1835
+ "name": "idx_memory_embeddings_updated",
1836
+ "columns": [
1837
+ "updated_at"
1838
+ ],
1839
+ "isUnique": false
1840
+ }
1841
+ },
1842
+ "foreignKeys": {
1843
+ "memory_embeddings_memory_id_memories_id_fk": {
1844
+ "name": "memory_embeddings_memory_id_memories_id_fk",
1845
+ "tableFrom": "memory_embeddings",
1846
+ "tableTo": "memories",
1847
+ "columnsFrom": [
1848
+ "memory_id"
1849
+ ],
1850
+ "columnsTo": [
1851
+ "id"
1852
+ ],
1853
+ "onDelete": "cascade",
1854
+ "onUpdate": "no action"
1855
+ }
1856
+ },
1857
+ "compositePrimaryKeys": {},
1858
+ "uniqueConstraints": {},
1859
+ "checkConstraints": {}
1860
+ },
1861
+ "memory_entities": {
1862
+ "name": "memory_entities",
1863
+ "columns": {
1864
+ "id": {
1865
+ "name": "id",
1866
+ "type": "text",
1867
+ "primaryKey": true,
1868
+ "notNull": true,
1869
+ "autoincrement": false
1870
+ },
1871
+ "memory_id": {
1872
+ "name": "memory_id",
1873
+ "type": "text",
1874
+ "primaryKey": false,
1875
+ "notNull": true,
1876
+ "autoincrement": false
1877
+ },
1878
+ "entity_id": {
1879
+ "name": "entity_id",
1880
+ "type": "text",
1881
+ "primaryKey": false,
1882
+ "notNull": true,
1883
+ "autoincrement": false
1884
+ },
1885
+ "source": {
1886
+ "name": "source",
1887
+ "type": "text",
1888
+ "primaryKey": false,
1889
+ "notNull": true,
1890
+ "autoincrement": false,
1891
+ "default": "'heuristic'"
1892
+ },
1893
+ "weight": {
1894
+ "name": "weight",
1895
+ "type": "real",
1896
+ "primaryKey": false,
1897
+ "notNull": true,
1898
+ "autoincrement": false,
1899
+ "default": 1
1900
+ },
1901
+ "created_at": {
1902
+ "name": "created_at",
1903
+ "type": "text",
1904
+ "primaryKey": false,
1905
+ "notNull": true,
1906
+ "autoincrement": false
1907
+ }
1908
+ },
1909
+ "indexes": {
1910
+ "idx_memory_entities_memory": {
1911
+ "name": "idx_memory_entities_memory",
1912
+ "columns": [
1913
+ "memory_id"
1914
+ ],
1915
+ "isUnique": false
1916
+ },
1917
+ "idx_memory_entities_entity": {
1918
+ "name": "idx_memory_entities_entity",
1919
+ "columns": [
1920
+ "entity_id"
1921
+ ],
1922
+ "isUnique": false
1923
+ }
1924
+ },
1925
+ "foreignKeys": {
1926
+ "memory_entities_memory_id_memories_id_fk": {
1927
+ "name": "memory_entities_memory_id_memories_id_fk",
1928
+ "tableFrom": "memory_entities",
1929
+ "tableTo": "memories",
1930
+ "columnsFrom": [
1931
+ "memory_id"
1932
+ ],
1933
+ "columnsTo": [
1934
+ "id"
1935
+ ],
1936
+ "onDelete": "no action",
1937
+ "onUpdate": "no action"
1938
+ },
1939
+ "memory_entities_entity_id_entities_id_fk": {
1940
+ "name": "memory_entities_entity_id_entities_id_fk",
1941
+ "tableFrom": "memory_entities",
1942
+ "tableTo": "entities",
1943
+ "columnsFrom": [
1944
+ "entity_id"
1945
+ ],
1946
+ "columnsTo": [
1947
+ "id"
1948
+ ],
1949
+ "onDelete": "no action",
1950
+ "onUpdate": "no action"
1951
+ }
1952
+ },
1953
+ "compositePrimaryKeys": {},
1954
+ "uniqueConstraints": {},
1955
+ "checkConstraints": {}
1956
+ },
1957
+ "memory_injections": {
1958
+ "name": "memory_injections",
1959
+ "columns": {
1960
+ "id": {
1961
+ "name": "id",
1962
+ "type": "text",
1963
+ "primaryKey": true,
1964
+ "notNull": true,
1965
+ "autoincrement": false
1966
+ },
1967
+ "memory_id": {
1968
+ "name": "memory_id",
1969
+ "type": "text",
1970
+ "primaryKey": false,
1971
+ "notNull": true,
1972
+ "autoincrement": false
1973
+ },
1974
+ "session_id": {
1975
+ "name": "session_id",
1976
+ "type": "text",
1977
+ "primaryKey": false,
1978
+ "notNull": true,
1979
+ "autoincrement": false
1980
+ },
1981
+ "repo": {
1982
+ "name": "repo",
1983
+ "type": "text",
1984
+ "primaryKey": false,
1985
+ "notNull": false,
1986
+ "autoincrement": false
1987
+ },
1988
+ "injected_at": {
1989
+ "name": "injected_at",
1990
+ "type": "text",
1991
+ "primaryKey": false,
1992
+ "notNull": true,
1993
+ "autoincrement": false
1994
+ },
1995
+ "outcome": {
1996
+ "name": "outcome",
1997
+ "type": "text",
1998
+ "primaryKey": false,
1999
+ "notNull": false,
2000
+ "autoincrement": false
2001
+ },
2002
+ "outcome_at": {
2003
+ "name": "outcome_at",
2004
+ "type": "text",
2005
+ "primaryKey": false,
2006
+ "notNull": false,
2007
+ "autoincrement": false
2008
+ }
2009
+ },
2010
+ "indexes": {
2011
+ "idx_memory_injections_memory": {
2012
+ "name": "idx_memory_injections_memory",
2013
+ "columns": [
2014
+ "memory_id"
2015
+ ],
2016
+ "isUnique": false
2017
+ },
2018
+ "idx_memory_injections_session": {
2019
+ "name": "idx_memory_injections_session",
2020
+ "columns": [
2021
+ "session_id"
2022
+ ],
2023
+ "isUnique": false
2024
+ },
2025
+ "uq_memory_injections_memory_session": {
2026
+ "name": "uq_memory_injections_memory_session",
2027
+ "columns": [
2028
+ "memory_id",
2029
+ "session_id"
2030
+ ],
2031
+ "isUnique": true
2032
+ }
2033
+ },
2034
+ "foreignKeys": {
2035
+ "memory_injections_memory_id_memories_id_fk": {
2036
+ "name": "memory_injections_memory_id_memories_id_fk",
2037
+ "tableFrom": "memory_injections",
2038
+ "tableTo": "memories",
2039
+ "columnsFrom": [
2040
+ "memory_id"
2041
+ ],
2042
+ "columnsTo": [
2043
+ "id"
2044
+ ],
2045
+ "onDelete": "cascade",
2046
+ "onUpdate": "no action"
2047
+ }
2048
+ },
2049
+ "compositePrimaryKeys": {},
2050
+ "uniqueConstraints": {},
2051
+ "checkConstraints": {}
2052
+ },
2053
+ "memory_maintenance_tasks": {
2054
+ "name": "memory_maintenance_tasks",
2055
+ "columns": {
2056
+ "id": {
2057
+ "name": "id",
2058
+ "type": "text",
2059
+ "primaryKey": true,
2060
+ "notNull": true,
2061
+ "autoincrement": false
2062
+ },
2063
+ "kind": {
2064
+ "name": "kind",
2065
+ "type": "text",
2066
+ "primaryKey": false,
2067
+ "notNull": true,
2068
+ "autoincrement": false
2069
+ },
2070
+ "status": {
2071
+ "name": "status",
2072
+ "type": "text",
2073
+ "primaryKey": false,
2074
+ "notNull": true,
2075
+ "autoincrement": false
2076
+ },
2077
+ "priority": {
2078
+ "name": "priority",
2079
+ "type": "integer",
2080
+ "primaryKey": false,
2081
+ "notNull": true,
2082
+ "autoincrement": false,
2083
+ "default": 0
2084
+ },
2085
+ "repo": {
2086
+ "name": "repo",
2087
+ "type": "text",
2088
+ "primaryKey": false,
2089
+ "notNull": false,
2090
+ "autoincrement": false
2091
+ },
2092
+ "target_key": {
2093
+ "name": "target_key",
2094
+ "type": "text",
2095
+ "primaryKey": false,
2096
+ "notNull": true,
2097
+ "autoincrement": false
2098
+ },
2099
+ "payload": {
2100
+ "name": "payload",
2101
+ "type": "text",
2102
+ "primaryKey": false,
2103
+ "notNull": true,
2104
+ "autoincrement": false
2105
+ },
2106
+ "result": {
2107
+ "name": "result",
2108
+ "type": "text",
2109
+ "primaryKey": false,
2110
+ "notNull": false,
2111
+ "autoincrement": false
2112
+ },
2113
+ "failure_reason": {
2114
+ "name": "failure_reason",
2115
+ "type": "text",
2116
+ "primaryKey": false,
2117
+ "notNull": false,
2118
+ "autoincrement": false
2119
+ },
2120
+ "claimed_by": {
2121
+ "name": "claimed_by",
2122
+ "type": "text",
2123
+ "primaryKey": false,
2124
+ "notNull": false,
2125
+ "autoincrement": false
2126
+ },
2127
+ "claimed_at": {
2128
+ "name": "claimed_at",
2129
+ "type": "text",
2130
+ "primaryKey": false,
2131
+ "notNull": false,
2132
+ "autoincrement": false
2133
+ },
2134
+ "claim_expires_at": {
2135
+ "name": "claim_expires_at",
2136
+ "type": "text",
2137
+ "primaryKey": false,
2138
+ "notNull": false,
2139
+ "autoincrement": false
2140
+ },
2141
+ "submitted_at": {
2142
+ "name": "submitted_at",
2143
+ "type": "text",
2144
+ "primaryKey": false,
2145
+ "notNull": false,
2146
+ "autoincrement": false
2147
+ },
2148
+ "completed_at": {
2149
+ "name": "completed_at",
2150
+ "type": "text",
2151
+ "primaryKey": false,
2152
+ "notNull": false,
2153
+ "autoincrement": false
2154
+ },
2155
+ "created_at": {
2156
+ "name": "created_at",
2157
+ "type": "text",
2158
+ "primaryKey": false,
2159
+ "notNull": true,
2160
+ "autoincrement": false
2161
+ },
2162
+ "attempts": {
2163
+ "name": "attempts",
2164
+ "type": "integer",
2165
+ "primaryKey": false,
2166
+ "notNull": true,
2167
+ "autoincrement": false,
2168
+ "default": 0
2169
+ },
2170
+ "max_attempts": {
2171
+ "name": "max_attempts",
2172
+ "type": "integer",
2173
+ "primaryKey": false,
2174
+ "notNull": true,
2175
+ "autoincrement": false,
2176
+ "default": 3
2177
+ }
2178
+ },
2179
+ "indexes": {
2180
+ "idx_mmt_status_priority": {
2181
+ "name": "idx_mmt_status_priority",
2182
+ "columns": [
2183
+ "status",
2184
+ "priority",
2185
+ "created_at"
2186
+ ],
2187
+ "isUnique": false
2188
+ },
2189
+ "idx_mmt_repo_status": {
2190
+ "name": "idx_mmt_repo_status",
2191
+ "columns": [
2192
+ "repo",
2193
+ "status"
2194
+ ],
2195
+ "isUnique": false
2196
+ },
2197
+ "idx_mmt_claim_expires": {
2198
+ "name": "idx_mmt_claim_expires",
2199
+ "columns": [
2200
+ "claim_expires_at"
2201
+ ],
2202
+ "isUnique": false
2203
+ },
2204
+ "idx_mmt_kind_target": {
2205
+ "name": "idx_mmt_kind_target",
2206
+ "columns": [
2207
+ "kind",
2208
+ "target_key"
2209
+ ],
2210
+ "isUnique": false
2211
+ }
2212
+ },
2213
+ "foreignKeys": {},
2214
+ "compositePrimaryKeys": {},
2215
+ "uniqueConstraints": {},
2216
+ "checkConstraints": {}
2217
+ },
2218
+ "memory_value_events": {
2219
+ "name": "memory_value_events",
2220
+ "columns": {
2221
+ "id": {
2222
+ "name": "id",
2223
+ "type": "text",
2224
+ "primaryKey": true,
2225
+ "notNull": true,
2226
+ "autoincrement": false
2227
+ },
2228
+ "memory_id": {
2229
+ "name": "memory_id",
2230
+ "type": "text",
2231
+ "primaryKey": false,
2232
+ "notNull": false,
2233
+ "autoincrement": false
2234
+ },
2235
+ "injection_id": {
2236
+ "name": "injection_id",
2237
+ "type": "text",
2238
+ "primaryKey": false,
2239
+ "notNull": false,
2240
+ "autoincrement": false
2241
+ },
2242
+ "feedback_id": {
2243
+ "name": "feedback_id",
2244
+ "type": "text",
2245
+ "primaryKey": false,
2246
+ "notNull": false,
2247
+ "autoincrement": false
2248
+ },
2249
+ "session_id": {
2250
+ "name": "session_id",
2251
+ "type": "text",
2252
+ "primaryKey": false,
2253
+ "notNull": true,
2254
+ "autoincrement": false
2255
+ },
2256
+ "repo": {
2257
+ "name": "repo",
2258
+ "type": "text",
2259
+ "primaryKey": false,
2260
+ "notNull": false,
2261
+ "autoincrement": false
2262
+ },
2263
+ "event_type": {
2264
+ "name": "event_type",
2265
+ "type": "text",
2266
+ "primaryKey": false,
2267
+ "notNull": true,
2268
+ "autoincrement": false
2269
+ },
2270
+ "source": {
2271
+ "name": "source",
2272
+ "type": "text",
2273
+ "primaryKey": false,
2274
+ "notNull": true,
2275
+ "autoincrement": false
2276
+ },
2277
+ "injected_tokens_estimate": {
2278
+ "name": "injected_tokens_estimate",
2279
+ "type": "integer",
2280
+ "primaryKey": false,
2281
+ "notNull": true,
2282
+ "autoincrement": false,
2283
+ "default": 0
2284
+ },
2285
+ "saved_tokens_estimate": {
2286
+ "name": "saved_tokens_estimate",
2287
+ "type": "integer",
2288
+ "primaryKey": false,
2289
+ "notNull": true,
2290
+ "autoincrement": false,
2291
+ "default": 0
2292
+ },
2293
+ "evidence": {
2294
+ "name": "evidence",
2295
+ "type": "text",
2296
+ "primaryKey": false,
2297
+ "notNull": true,
2298
+ "autoincrement": false,
2299
+ "default": "'{}'"
2300
+ },
2301
+ "created_at": {
2302
+ "name": "created_at",
2303
+ "type": "text",
2304
+ "primaryKey": false,
2305
+ "notNull": true,
2306
+ "autoincrement": false
2307
+ }
2308
+ },
2309
+ "indexes": {
2310
+ "idx_memory_value_memory": {
2311
+ "name": "idx_memory_value_memory",
2312
+ "columns": [
2313
+ "memory_id"
2314
+ ],
2315
+ "isUnique": false
2316
+ },
2317
+ "idx_memory_value_session": {
2318
+ "name": "idx_memory_value_session",
2319
+ "columns": [
2320
+ "session_id"
2321
+ ],
2322
+ "isUnique": false
2323
+ },
2324
+ "idx_memory_value_repo": {
2325
+ "name": "idx_memory_value_repo",
2326
+ "columns": [
2327
+ "repo"
2328
+ ],
2329
+ "isUnique": false
2330
+ },
2331
+ "idx_memory_value_event": {
2332
+ "name": "idx_memory_value_event",
2333
+ "columns": [
2334
+ "event_type"
2335
+ ],
2336
+ "isUnique": false
2337
+ },
2338
+ "idx_memory_value_created": {
2339
+ "name": "idx_memory_value_created",
2340
+ "columns": [
2341
+ "created_at"
2342
+ ],
2343
+ "isUnique": false
2344
+ }
2345
+ },
2346
+ "foreignKeys": {
2347
+ "memory_value_events_memory_id_memories_id_fk": {
2348
+ "name": "memory_value_events_memory_id_memories_id_fk",
2349
+ "tableFrom": "memory_value_events",
2350
+ "tableTo": "memories",
2351
+ "columnsFrom": [
2352
+ "memory_id"
2353
+ ],
2354
+ "columnsTo": [
2355
+ "id"
2356
+ ],
2357
+ "onDelete": "set null",
2358
+ "onUpdate": "no action"
2359
+ },
2360
+ "memory_value_events_injection_id_memory_injections_id_fk": {
2361
+ "name": "memory_value_events_injection_id_memory_injections_id_fk",
2362
+ "tableFrom": "memory_value_events",
2363
+ "tableTo": "memory_injections",
2364
+ "columnsFrom": [
2365
+ "injection_id"
2366
+ ],
2367
+ "columnsTo": [
2368
+ "id"
2369
+ ],
2370
+ "onDelete": "set null",
2371
+ "onUpdate": "no action"
2372
+ },
2373
+ "memory_value_events_feedback_id_feedback_events_id_fk": {
2374
+ "name": "memory_value_events_feedback_id_feedback_events_id_fk",
2375
+ "tableFrom": "memory_value_events",
2376
+ "tableTo": "feedback_events",
2377
+ "columnsFrom": [
2378
+ "feedback_id"
2379
+ ],
2380
+ "columnsTo": [
2381
+ "id"
2382
+ ],
2383
+ "onDelete": "set null",
2384
+ "onUpdate": "no action"
2385
+ }
2386
+ },
2387
+ "compositePrimaryKeys": {},
2388
+ "uniqueConstraints": {},
2389
+ "checkConstraints": {}
2390
+ },
2391
+ "policy_rules": {
2392
+ "name": "policy_rules",
2393
+ "columns": {
2394
+ "id": {
2395
+ "name": "id",
2396
+ "type": "text",
2397
+ "primaryKey": true,
2398
+ "notNull": true,
2399
+ "autoincrement": false
2400
+ },
2401
+ "org_id": {
2402
+ "name": "org_id",
2403
+ "type": "text",
2404
+ "primaryKey": false,
2405
+ "notNull": true,
2406
+ "autoincrement": false
2407
+ },
2408
+ "rule_type": {
2409
+ "name": "rule_type",
2410
+ "type": "text",
2411
+ "primaryKey": false,
2412
+ "notNull": true,
2413
+ "autoincrement": false
2414
+ },
2415
+ "config": {
2416
+ "name": "config",
2417
+ "type": "text",
2418
+ "primaryKey": false,
2419
+ "notNull": true,
2420
+ "autoincrement": false,
2421
+ "default": "'{}'"
2422
+ },
2423
+ "enabled": {
2424
+ "name": "enabled",
2425
+ "type": "integer",
2426
+ "primaryKey": false,
2427
+ "notNull": true,
2428
+ "autoincrement": false,
2429
+ "default": true
2430
+ },
2431
+ "created_at": {
2432
+ "name": "created_at",
2433
+ "type": "text",
2434
+ "primaryKey": false,
2435
+ "notNull": true,
2436
+ "autoincrement": false
2437
+ },
2438
+ "updated_at": {
2439
+ "name": "updated_at",
2440
+ "type": "text",
2441
+ "primaryKey": false,
2442
+ "notNull": true,
2443
+ "autoincrement": false
2444
+ }
2445
+ },
2446
+ "indexes": {
2447
+ "idx_policy_org": {
2448
+ "name": "idx_policy_org",
2449
+ "columns": [
2450
+ "org_id"
2451
+ ],
2452
+ "isUnique": false
2453
+ }
2454
+ },
2455
+ "foreignKeys": {},
2456
+ "compositePrimaryKeys": {},
2457
+ "uniqueConstraints": {},
2458
+ "checkConstraints": {}
2459
+ },
2460
+ "quality_snapshots": {
2461
+ "name": "quality_snapshots",
2462
+ "columns": {
2463
+ "id": {
2464
+ "name": "id",
2465
+ "type": "text",
2466
+ "primaryKey": true,
2467
+ "notNull": true,
2468
+ "autoincrement": false
2469
+ },
2470
+ "taken_at": {
2471
+ "name": "taken_at",
2472
+ "type": "text",
2473
+ "primaryKey": false,
2474
+ "notNull": true,
2475
+ "autoincrement": false
2476
+ },
2477
+ "window_start": {
2478
+ "name": "window_start",
2479
+ "type": "text",
2480
+ "primaryKey": false,
2481
+ "notNull": true,
2482
+ "autoincrement": false
2483
+ },
2484
+ "window_end": {
2485
+ "name": "window_end",
2486
+ "type": "text",
2487
+ "primaryKey": false,
2488
+ "notNull": true,
2489
+ "autoincrement": false
2490
+ },
2491
+ "injections_total": {
2492
+ "name": "injections_total",
2493
+ "type": "integer",
2494
+ "primaryKey": false,
2495
+ "notNull": true,
2496
+ "autoincrement": false
2497
+ },
2498
+ "injections_resolved": {
2499
+ "name": "injections_resolved",
2500
+ "type": "integer",
2501
+ "primaryKey": false,
2502
+ "notNull": true,
2503
+ "autoincrement": false
2504
+ },
2505
+ "injections_followed": {
2506
+ "name": "injections_followed",
2507
+ "type": "integer",
2508
+ "primaryKey": false,
2509
+ "notNull": true,
2510
+ "autoincrement": false
2511
+ },
2512
+ "injections_overridden": {
2513
+ "name": "injections_overridden",
2514
+ "type": "integer",
2515
+ "primaryKey": false,
2516
+ "notNull": true,
2517
+ "autoincrement": false
2518
+ },
2519
+ "injections_contradicted": {
2520
+ "name": "injections_contradicted",
2521
+ "type": "integer",
2522
+ "primaryKey": false,
2523
+ "notNull": true,
2524
+ "autoincrement": false
2525
+ },
2526
+ "injections_ignored": {
2527
+ "name": "injections_ignored",
2528
+ "type": "integer",
2529
+ "primaryKey": false,
2530
+ "notNull": true,
2531
+ "autoincrement": false
2532
+ },
2533
+ "followed_rate_resolved": {
2534
+ "name": "followed_rate_resolved",
2535
+ "type": "real",
2536
+ "primaryKey": false,
2537
+ "notNull": false,
2538
+ "autoincrement": false
2539
+ },
2540
+ "active_rule_count": {
2541
+ "name": "active_rule_count",
2542
+ "type": "integer",
2543
+ "primaryKey": false,
2544
+ "notNull": true,
2545
+ "autoincrement": false
2546
+ },
2547
+ "active_command_count": {
2548
+ "name": "active_command_count",
2549
+ "type": "integer",
2550
+ "primaryKey": false,
2551
+ "notNull": true,
2552
+ "autoincrement": false
2553
+ },
2554
+ "candidate_correction_count": {
2555
+ "name": "candidate_correction_count",
2556
+ "type": "integer",
2557
+ "primaryKey": false,
2558
+ "notNull": true,
2559
+ "autoincrement": false
2560
+ },
2561
+ "history_injections_total": {
2562
+ "name": "history_injections_total",
2563
+ "type": "integer",
2564
+ "primaryKey": false,
2565
+ "notNull": true,
2566
+ "autoincrement": false,
2567
+ "default": 0
2568
+ },
2569
+ "history_snippets_injected": {
2570
+ "name": "history_snippets_injected",
2571
+ "type": "integer",
2572
+ "primaryKey": false,
2573
+ "notNull": true,
2574
+ "autoincrement": false,
2575
+ "default": 0
2576
+ },
2577
+ "value_eval_cases": {
2578
+ "name": "value_eval_cases",
2579
+ "type": "integer",
2580
+ "primaryKey": false,
2581
+ "notNull": true,
2582
+ "autoincrement": false,
2583
+ "default": 0
2584
+ },
2585
+ "value_eval_hybrid_passed": {
2586
+ "name": "value_eval_hybrid_passed",
2587
+ "type": "integer",
2588
+ "primaryKey": false,
2589
+ "notNull": true,
2590
+ "autoincrement": false,
2591
+ "default": 0
2592
+ },
2593
+ "value_eval_recall_at_k": {
2594
+ "name": "value_eval_recall_at_k",
2595
+ "type": "real",
2596
+ "primaryKey": false,
2597
+ "notNull": true,
2598
+ "autoincrement": false,
2599
+ "default": 0
2600
+ },
2601
+ "value_eval_mrr": {
2602
+ "name": "value_eval_mrr",
2603
+ "type": "real",
2604
+ "primaryKey": false,
2605
+ "notNull": true,
2606
+ "autoincrement": false,
2607
+ "default": 0
2608
+ },
2609
+ "value_eval_override_rate": {
2610
+ "name": "value_eval_override_rate",
2611
+ "type": "real",
2612
+ "primaryKey": false,
2613
+ "notNull": true,
2614
+ "autoincrement": false,
2615
+ "default": 0
2616
+ },
2617
+ "value_eval_skipped_events": {
2618
+ "name": "value_eval_skipped_events",
2619
+ "type": "integer",
2620
+ "primaryKey": false,
2621
+ "notNull": true,
2622
+ "autoincrement": false,
2623
+ "default": 0
2624
+ },
2625
+ "notes": {
2626
+ "name": "notes",
2627
+ "type": "text",
2628
+ "primaryKey": false,
2629
+ "notNull": false,
2630
+ "autoincrement": false
2631
+ }
2632
+ },
2633
+ "indexes": {
2634
+ "idx_quality_snapshots_taken": {
2635
+ "name": "idx_quality_snapshots_taken",
2636
+ "columns": [
2637
+ "taken_at"
2638
+ ],
2639
+ "isUnique": false
2640
+ }
2641
+ },
2642
+ "foreignKeys": {},
2643
+ "compositePrimaryKeys": {},
2644
+ "uniqueConstraints": {},
2645
+ "checkConstraints": {}
2646
+ },
2647
+ "sync_state": {
2648
+ "name": "sync_state",
2649
+ "columns": {
2650
+ "id": {
2651
+ "name": "id",
2652
+ "type": "text",
2653
+ "primaryKey": true,
2654
+ "notNull": true,
2655
+ "autoincrement": false
2656
+ },
2657
+ "remote_url": {
2658
+ "name": "remote_url",
2659
+ "type": "text",
2660
+ "primaryKey": false,
2661
+ "notNull": false,
2662
+ "autoincrement": false
2663
+ },
2664
+ "team_id": {
2665
+ "name": "team_id",
2666
+ "type": "text",
2667
+ "primaryKey": false,
2668
+ "notNull": false,
2669
+ "autoincrement": false
2670
+ },
2671
+ "last_push_at": {
2672
+ "name": "last_push_at",
2673
+ "type": "text",
2674
+ "primaryKey": false,
2675
+ "notNull": false,
2676
+ "autoincrement": false
2677
+ },
2678
+ "last_pull_at": {
2679
+ "name": "last_pull_at",
2680
+ "type": "text",
2681
+ "primaryKey": false,
2682
+ "notNull": false,
2683
+ "autoincrement": false
2684
+ },
2685
+ "last_push_version": {
2686
+ "name": "last_push_version",
2687
+ "type": "integer",
2688
+ "primaryKey": false,
2689
+ "notNull": true,
2690
+ "autoincrement": false,
2691
+ "default": 0
2692
+ },
2693
+ "last_pull_version": {
2694
+ "name": "last_pull_version",
2695
+ "type": "integer",
2696
+ "primaryKey": false,
2697
+ "notNull": true,
2698
+ "autoincrement": false,
2699
+ "default": 0
2700
+ }
2701
+ },
2702
+ "indexes": {},
2703
+ "foreignKeys": {},
2704
+ "compositePrimaryKeys": {},
2705
+ "uniqueConstraints": {},
2706
+ "checkConstraints": {}
2707
+ },
2708
+ "temporal_facts": {
2709
+ "name": "temporal_facts",
2710
+ "columns": {
2711
+ "id": {
2712
+ "name": "id",
2713
+ "type": "text",
2714
+ "primaryKey": true,
2715
+ "notNull": true,
2716
+ "autoincrement": false
2717
+ },
2718
+ "repo": {
2719
+ "name": "repo",
2720
+ "type": "text",
2721
+ "primaryKey": false,
2722
+ "notNull": true,
2723
+ "autoincrement": false
2724
+ },
2725
+ "event_id": {
2726
+ "name": "event_id",
2727
+ "type": "text",
2728
+ "primaryKey": false,
2729
+ "notNull": true,
2730
+ "autoincrement": false
2731
+ },
2732
+ "subject": {
2733
+ "name": "subject",
2734
+ "type": "text",
2735
+ "primaryKey": false,
2736
+ "notNull": true,
2737
+ "autoincrement": false
2738
+ },
2739
+ "predicate": {
2740
+ "name": "predicate",
2741
+ "type": "text",
2742
+ "primaryKey": false,
2743
+ "notNull": true,
2744
+ "autoincrement": false
2745
+ },
2746
+ "value": {
2747
+ "name": "value",
2748
+ "type": "text",
2749
+ "primaryKey": false,
2750
+ "notNull": true,
2751
+ "autoincrement": false
2752
+ },
2753
+ "valid_from": {
2754
+ "name": "valid_from",
2755
+ "type": "text",
2756
+ "primaryKey": false,
2757
+ "notNull": true,
2758
+ "autoincrement": false
2759
+ },
2760
+ "valid_to": {
2761
+ "name": "valid_to",
2762
+ "type": "text",
2763
+ "primaryKey": false,
2764
+ "notNull": false,
2765
+ "autoincrement": false
2766
+ },
2767
+ "observed_at": {
2768
+ "name": "observed_at",
2769
+ "type": "text",
2770
+ "primaryKey": false,
2771
+ "notNull": true,
2772
+ "autoincrement": false
2773
+ },
2774
+ "evidence": {
2775
+ "name": "evidence",
2776
+ "type": "text",
2777
+ "primaryKey": false,
2778
+ "notNull": true,
2779
+ "autoincrement": false
2780
+ },
2781
+ "source": {
2782
+ "name": "source",
2783
+ "type": "text",
2784
+ "primaryKey": false,
2785
+ "notNull": false,
2786
+ "autoincrement": false
2787
+ },
2788
+ "confidence": {
2789
+ "name": "confidence",
2790
+ "type": "real",
2791
+ "primaryKey": false,
2792
+ "notNull": true,
2793
+ "autoincrement": false,
2794
+ "default": 0.5
2795
+ },
2796
+ "supersedes_id": {
2797
+ "name": "supersedes_id",
2798
+ "type": "text",
2799
+ "primaryKey": false,
2800
+ "notNull": false,
2801
+ "autoincrement": false
2802
+ },
2803
+ "recorded_at": {
2804
+ "name": "recorded_at",
2805
+ "type": "text",
2806
+ "primaryKey": false,
2807
+ "notNull": true,
2808
+ "autoincrement": false
2809
+ }
2810
+ },
2811
+ "indexes": {
2812
+ "uq_temporal_facts_repo_event": {
2813
+ "name": "uq_temporal_facts_repo_event",
2814
+ "columns": [
2815
+ "repo",
2816
+ "event_id"
2817
+ ],
2818
+ "isUnique": true
2819
+ },
2820
+ "idx_temporal_facts_lookup": {
2821
+ "name": "idx_temporal_facts_lookup",
2822
+ "columns": [
2823
+ "repo",
2824
+ "subject",
2825
+ "predicate"
2826
+ ],
2827
+ "isUnique": false
2828
+ },
2829
+ "idx_temporal_facts_observed": {
2830
+ "name": "idx_temporal_facts_observed",
2831
+ "columns": [
2832
+ "observed_at"
2833
+ ],
2834
+ "isUnique": false
2835
+ },
2836
+ "idx_temporal_facts_supersedes": {
2837
+ "name": "idx_temporal_facts_supersedes",
2838
+ "columns": [
2839
+ "supersedes_id"
2840
+ ],
2841
+ "isUnique": false
2842
+ }
2843
+ },
2844
+ "foreignKeys": {
2845
+ "temporal_facts_supersedes_id_temporal_facts_id_fk": {
2846
+ "name": "temporal_facts_supersedes_id_temporal_facts_id_fk",
2847
+ "tableFrom": "temporal_facts",
2848
+ "tableTo": "temporal_facts",
2849
+ "columnsFrom": [
2850
+ "supersedes_id"
2851
+ ],
2852
+ "columnsTo": [
2853
+ "id"
2854
+ ],
2855
+ "onDelete": "no action",
2856
+ "onUpdate": "no action"
2857
+ }
2858
+ },
2859
+ "compositePrimaryKeys": {},
2860
+ "uniqueConstraints": {},
2861
+ "checkConstraints": {}
2862
+ }
2863
+ },
2864
+ "views": {},
2865
+ "enums": {},
2866
+ "_meta": {
2867
+ "schemas": {},
2868
+ "tables": {},
2869
+ "columns": {}
2870
+ },
2871
+ "internal": {
2872
+ "indexes": {}
2873
+ }
2874
+ }