@remnic/core 9.3.595 → 9.3.596

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 (80) hide show
  1. package/dist/access-cli.js +14 -14
  2. package/dist/access-http.js +6 -6
  3. package/dist/access-mcp.js +5 -5
  4. package/dist/access-schema.d.ts +7 -7
  5. package/dist/access-service.js +4 -4
  6. package/dist/briefing.js +2 -2
  7. package/dist/causal-consolidation.js +3 -3
  8. package/dist/{chunk-ARY5OOLG.js → chunk-557IAFPD.js} +2 -2
  9. package/dist/{chunk-VFB2G5YL.js → chunk-5BUGGPBR.js} +4 -4
  10. package/dist/{chunk-USYGGIJZ.js → chunk-D2MMMTDV.js} +2 -2
  11. package/dist/{chunk-XM7BYXT7.js → chunk-D65TSG24.js} +2 -2
  12. package/dist/{chunk-FHBEL473.js → chunk-DOX2CG6Y.js} +54 -5
  13. package/dist/chunk-DOX2CG6Y.js.map +1 -0
  14. package/dist/{chunk-DARLGSFX.js → chunk-ELKI4BB6.js} +4 -4
  15. package/dist/{chunk-QRWZOCJN.js → chunk-F4LM4ULA.js} +12 -12
  16. package/dist/{chunk-JIBCUYIP.js → chunk-IEFHBIU2.js} +10 -10
  17. package/dist/{chunk-KDUFBSBF.js → chunk-IK34DVAC.js} +2 -2
  18. package/dist/{chunk-OPYFD6PD.js → chunk-IK7DCC5H.js} +2 -2
  19. package/dist/{chunk-574MU2Y3.js → chunk-JTDRJQ3K.js} +2 -2
  20. package/dist/{chunk-LAL7WBLY.js → chunk-LYPDMKUT.js} +3 -3
  21. package/dist/{chunk-GBXGCFRH.js → chunk-MA5MWGKP.js} +2 -2
  22. package/dist/{chunk-HQO5EBUC.js → chunk-MLT75J5S.js} +3 -3
  23. package/dist/{chunk-7X7TBJRX.js → chunk-NOMEVTUD.js} +2 -2
  24. package/dist/{chunk-SUTSSOYU.js → chunk-OD5LFAPZ.js} +2 -2
  25. package/dist/{chunk-XT7XVA53.js → chunk-OI27U2HT.js} +2 -2
  26. package/dist/{chunk-MQEIWDYW.js → chunk-QDDHYAKV.js} +2 -2
  27. package/dist/{chunk-ZY6UPHNY.js → chunk-TYICDVQW.js} +3 -3
  28. package/dist/{chunk-XRWTAEZM.js → chunk-W5O2FQTZ.js} +2 -2
  29. package/dist/{chunk-V3RXWQIE.js → chunk-WXACKLKP.js} +209 -59
  30. package/dist/chunk-WXACKLKP.js.map +1 -0
  31. package/dist/{chunk-IRFF6LSF.js → chunk-YFS5OEKO.js} +36 -1
  32. package/dist/chunk-YFS5OEKO.js.map +1 -0
  33. package/dist/cli.js +15 -15
  34. package/dist/compounding/engine.js +2 -2
  35. package/dist/connectors/codex-materialize-runner.js +2 -2
  36. package/dist/connectors/index.js +2 -2
  37. package/dist/entity-retrieval.js +2 -2
  38. package/dist/index.js +22 -22
  39. package/dist/maintenance/memory-governance.js +2 -2
  40. package/dist/maintenance/rebuild-memory-lifecycle-ledger.js +2 -2
  41. package/dist/maintenance/rebuild-memory-projection.js +3 -3
  42. package/dist/namespaces/migrate.js +3 -3
  43. package/dist/namespaces/storage.js +2 -2
  44. package/dist/operator-toolkit.js +5 -5
  45. package/dist/orchestrator.js +11 -11
  46. package/dist/retrieval-agents.js +2 -2
  47. package/dist/semantic-consolidation.js +3 -3
  48. package/dist/semantic-rule-promotion.js +2 -2
  49. package/dist/semantic-rule-verifier.js +2 -2
  50. package/dist/storage.d.ts +2 -0
  51. package/dist/storage.js +1 -1
  52. package/dist/temporal-index.js +1 -1
  53. package/dist/verified-recall.js +2 -2
  54. package/package.json +1 -1
  55. package/src/entity-retrieval.ts +64 -3
  56. package/src/storage.ts +40 -0
  57. package/src/temporal-index.test.ts +191 -0
  58. package/src/temporal-index.ts +291 -100
  59. package/dist/chunk-FHBEL473.js.map +0 -1
  60. package/dist/chunk-IRFF6LSF.js.map +0 -1
  61. package/dist/chunk-V3RXWQIE.js.map +0 -1
  62. /package/dist/{chunk-ARY5OOLG.js.map → chunk-557IAFPD.js.map} +0 -0
  63. /package/dist/{chunk-VFB2G5YL.js.map → chunk-5BUGGPBR.js.map} +0 -0
  64. /package/dist/{chunk-USYGGIJZ.js.map → chunk-D2MMMTDV.js.map} +0 -0
  65. /package/dist/{chunk-XM7BYXT7.js.map → chunk-D65TSG24.js.map} +0 -0
  66. /package/dist/{chunk-DARLGSFX.js.map → chunk-ELKI4BB6.js.map} +0 -0
  67. /package/dist/{chunk-QRWZOCJN.js.map → chunk-F4LM4ULA.js.map} +0 -0
  68. /package/dist/{chunk-JIBCUYIP.js.map → chunk-IEFHBIU2.js.map} +0 -0
  69. /package/dist/{chunk-KDUFBSBF.js.map → chunk-IK34DVAC.js.map} +0 -0
  70. /package/dist/{chunk-OPYFD6PD.js.map → chunk-IK7DCC5H.js.map} +0 -0
  71. /package/dist/{chunk-574MU2Y3.js.map → chunk-JTDRJQ3K.js.map} +0 -0
  72. /package/dist/{chunk-LAL7WBLY.js.map → chunk-LYPDMKUT.js.map} +0 -0
  73. /package/dist/{chunk-GBXGCFRH.js.map → chunk-MA5MWGKP.js.map} +0 -0
  74. /package/dist/{chunk-HQO5EBUC.js.map → chunk-MLT75J5S.js.map} +0 -0
  75. /package/dist/{chunk-7X7TBJRX.js.map → chunk-NOMEVTUD.js.map} +0 -0
  76. /package/dist/{chunk-SUTSSOYU.js.map → chunk-OD5LFAPZ.js.map} +0 -0
  77. /package/dist/{chunk-XT7XVA53.js.map → chunk-OI27U2HT.js.map} +0 -0
  78. /package/dist/{chunk-MQEIWDYW.js.map → chunk-QDDHYAKV.js.map} +0 -0
  79. /package/dist/{chunk-ZY6UPHNY.js.map → chunk-TYICDVQW.js.map} +0 -0
  80. /package/dist/{chunk-XRWTAEZM.js.map → chunk-W5O2FQTZ.js.map} +0 -0
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  Orchestrator
3
- } from "./chunk-JIBCUYIP.js";
3
+ } from "./chunk-IEFHBIU2.js";
4
4
  import "./chunk-5RIRL3XL.js";
5
5
  import "./chunk-KVEVLBKC.js";
6
6
  import "./chunk-BFBF3XEF.js";
@@ -14,7 +14,7 @@ import "./chunk-UWK5OXUJ.js";
14
14
  import "./chunk-T2PO5MUF.js";
15
15
  import "./chunk-4HP7HIE3.js";
16
16
  import "./chunk-7N4KAIGN.js";
17
- import "./chunk-SUTSSOYU.js";
17
+ import "./chunk-OD5LFAPZ.js";
18
18
  import "./chunk-DRD2Q7HQ.js";
19
19
  import "./chunk-TECVW3JP.js";
20
20
  import "./chunk-W7L6HXUC.js";
@@ -29,8 +29,8 @@ import "./chunk-46GJIW5M.js";
29
29
  import "./chunk-XJNBEDFE.js";
30
30
  import "./chunk-DLJ4IR6M.js";
31
31
  import "./chunk-OZKZ2TRP.js";
32
- import "./chunk-USYGGIJZ.js";
33
- import "./chunk-V3RXWQIE.js";
32
+ import "./chunk-D2MMMTDV.js";
33
+ import "./chunk-WXACKLKP.js";
34
34
  import "./chunk-5IZL4DCV.js";
35
35
  import "./chunk-X7XN6YU4.js";
36
36
  import "./chunk-452WDNFO.js";
@@ -56,7 +56,7 @@ import "./chunk-54V4BZWP.js";
56
56
  import "./chunk-XZ4WBBB5.js";
57
57
  import "./chunk-77NAFXUD.js";
58
58
  import "./chunk-DB5A3NHS.js";
59
- import "./chunk-FHBEL473.js";
59
+ import "./chunk-DOX2CG6Y.js";
60
60
  import "./chunk-6NKAQ74D.js";
61
61
  import "./chunk-OAZ5MFUB.js";
62
62
  import "./chunk-PYPOFEMK.js";
@@ -67,17 +67,17 @@ import "./chunk-Y4FHOFJ2.js";
67
67
  import "./chunk-XCAZF7KQ.js";
68
68
  import "./chunk-3PG3H5TD.js";
69
69
  import "./chunk-OD4FM2U7.js";
70
- import "./chunk-XM7BYXT7.js";
71
- import "./chunk-7X7TBJRX.js";
70
+ import "./chunk-D65TSG24.js";
71
+ import "./chunk-NOMEVTUD.js";
72
72
  import "./chunk-JFEKNTX7.js";
73
73
  import "./chunk-JLNBQWZ2.js";
74
74
  import "./chunk-2PRQG7PV.js";
75
75
  import "./chunk-HPWVAEET.js";
76
- import "./chunk-GBXGCFRH.js";
76
+ import "./chunk-MA5MWGKP.js";
77
77
  import "./chunk-3BP57I6J.js";
78
78
  import "./chunk-TERNBNJB.js";
79
79
  import "./chunk-W4RVMTHR.js";
80
- import "./chunk-XRWTAEZM.js";
80
+ import "./chunk-W5O2FQTZ.js";
81
81
  import "./chunk-XPXEJRUB.js";
82
82
  import "./chunk-A6D7A2FW.js";
83
83
  import "./chunk-FF4KLI5W.js";
@@ -92,7 +92,7 @@ import "./chunk-2I5JGH3M.js";
92
92
  import "./chunk-M46RYSMW.js";
93
93
  import "./chunk-CINZGPSJ.js";
94
94
  import "./chunk-Q4CAQGKQ.js";
95
- import "./chunk-OPYFD6PD.js";
95
+ import "./chunk-IK7DCC5H.js";
96
96
  import "./chunk-ZFXCQPNO.js";
97
97
  import "./chunk-KIB7SDIJ.js";
98
98
  import "./chunk-ORFGK3XI.js";
@@ -139,7 +139,7 @@ import "./chunk-PVGDJXVK.js";
139
139
  import "./chunk-OADWQ5CR.js";
140
140
  import {
141
141
  EngramAccessService
142
- } from "./chunk-VFB2G5YL.js";
142
+ } from "./chunk-5BUGGPBR.js";
143
143
  import "./chunk-ETUPBUHB.js";
144
144
  import "./chunk-L227SKTB.js";
145
145
  import "./chunk-DHGSZ3UD.js";
@@ -147,7 +147,7 @@ import "./chunk-BT7NVCML.js";
147
147
  import "./chunk-OXJBNGBK.js";
148
148
  import "./chunk-SOBJ6NEY.js";
149
149
  import "./chunk-H7XKCNR6.js";
150
- import "./chunk-XT7XVA53.js";
150
+ import "./chunk-OI27U2HT.js";
151
151
  import "./chunk-EDQVAMQI.js";
152
152
  import "./chunk-472U7RDF.js";
153
153
  import "./chunk-FXKPZ3H6.js";
@@ -165,8 +165,8 @@ import "./chunk-CHCA44C3.js";
165
165
  import "./chunk-4JRRISLU.js";
166
166
  import "./chunk-2LSZVONP.js";
167
167
  import "./chunk-DEUNUKTD.js";
168
- import "./chunk-MQEIWDYW.js";
169
- import "./chunk-IRFF6LSF.js";
168
+ import "./chunk-QDDHYAKV.js";
169
+ import "./chunk-YFS5OEKO.js";
170
170
  import "./chunk-5UZXUTVO.js";
171
171
  import "./chunk-4H5ZJHEN.js";
172
172
  import "./chunk-KGK2QKWL.js";
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  EngramAccessHttpServer
3
- } from "./chunk-ZY6UPHNY.js";
3
+ } from "./chunk-TYICDVQW.js";
4
4
  import "./chunk-SEDEKFYQ.js";
5
5
  import "./chunk-AU7Q3LSC.js";
6
6
  import "./chunk-42NQ7AVG.js";
@@ -8,10 +8,10 @@ import "./chunk-TMSXWOBZ.js";
8
8
  import "./chunk-J64TK33U.js";
9
9
  import "./chunk-RSUYKGGZ.js";
10
10
  import "./chunk-7RXCMVFQ.js";
11
- import "./chunk-LAL7WBLY.js";
11
+ import "./chunk-LYPDMKUT.js";
12
12
  import "./chunk-EAZGEEG2.js";
13
13
  import "./chunk-D24OXEPB.js";
14
- import "./chunk-VFB2G5YL.js";
14
+ import "./chunk-5BUGGPBR.js";
15
15
  import "./chunk-ETUPBUHB.js";
16
16
  import "./chunk-L227SKTB.js";
17
17
  import "./chunk-DHGSZ3UD.js";
@@ -19,7 +19,7 @@ import "./chunk-BT7NVCML.js";
19
19
  import "./chunk-OXJBNGBK.js";
20
20
  import "./chunk-SOBJ6NEY.js";
21
21
  import "./chunk-H7XKCNR6.js";
22
- import "./chunk-XT7XVA53.js";
22
+ import "./chunk-OI27U2HT.js";
23
23
  import "./chunk-EDQVAMQI.js";
24
24
  import "./chunk-472U7RDF.js";
25
25
  import "./chunk-FXKPZ3H6.js";
@@ -37,8 +37,8 @@ import "./chunk-CHCA44C3.js";
37
37
  import "./chunk-4JRRISLU.js";
38
38
  import "./chunk-2LSZVONP.js";
39
39
  import "./chunk-DEUNUKTD.js";
40
- import "./chunk-MQEIWDYW.js";
41
- import "./chunk-IRFF6LSF.js";
40
+ import "./chunk-QDDHYAKV.js";
41
+ import "./chunk-YFS5OEKO.js";
42
42
  import "./chunk-5UZXUTVO.js";
43
43
  import "./chunk-4H5ZJHEN.js";
44
44
  import "./chunk-KGK2QKWL.js";
@@ -1,9 +1,9 @@
1
1
  import {
2
2
  EngramMcpServer
3
- } from "./chunk-LAL7WBLY.js";
3
+ } from "./chunk-LYPDMKUT.js";
4
4
  import "./chunk-EAZGEEG2.js";
5
5
  import "./chunk-D24OXEPB.js";
6
- import "./chunk-VFB2G5YL.js";
6
+ import "./chunk-5BUGGPBR.js";
7
7
  import "./chunk-ETUPBUHB.js";
8
8
  import "./chunk-L227SKTB.js";
9
9
  import "./chunk-DHGSZ3UD.js";
@@ -11,7 +11,7 @@ import "./chunk-BT7NVCML.js";
11
11
  import "./chunk-OXJBNGBK.js";
12
12
  import "./chunk-SOBJ6NEY.js";
13
13
  import "./chunk-H7XKCNR6.js";
14
- import "./chunk-XT7XVA53.js";
14
+ import "./chunk-OI27U2HT.js";
15
15
  import "./chunk-EDQVAMQI.js";
16
16
  import "./chunk-472U7RDF.js";
17
17
  import "./chunk-FXKPZ3H6.js";
@@ -29,8 +29,8 @@ import "./chunk-CHCA44C3.js";
29
29
  import "./chunk-4JRRISLU.js";
30
30
  import "./chunk-2LSZVONP.js";
31
31
  import "./chunk-DEUNUKTD.js";
32
- import "./chunk-MQEIWDYW.js";
33
- import "./chunk-IRFF6LSF.js";
32
+ import "./chunk-QDDHYAKV.js";
33
+ import "./chunk-YFS5OEKO.js";
34
34
  import "./chunk-5UZXUTVO.js";
35
35
  import "./chunk-4H5ZJHEN.js";
36
36
  import "./chunk-KGK2QKWL.js";
@@ -727,7 +727,7 @@ declare const actionConfidenceRequestSchema: z.ZodObject<{
727
727
  corrected: z.ZodEffects<z.ZodNullable<z.ZodOptional<z.ZodBoolean>>, boolean | undefined, boolean | null | undefined>;
728
728
  correctionState: z.ZodEffects<z.ZodNullable<z.ZodOptional<z.ZodEnum<["none", "correction", "superseded", "disputed", "forgotten"]>>>, NonNullable<"none" | "correction" | "superseded" | "forgotten" | "disputed"> | undefined, "none" | "correction" | "superseded" | "forgotten" | "disputed" | null | undefined>;
729
729
  safeToUse: z.ZodEffects<z.ZodNullable<z.ZodOptional<z.ZodBoolean>>, boolean | undefined, boolean | null | undefined>;
730
- safety: z.ZodEffects<z.ZodNullable<z.ZodOptional<z.ZodEnum<["safe", "requires-review", "blocked"]>>>, NonNullable<"safe" | "requires-review" | "blocked"> | undefined, "safe" | "requires-review" | "blocked" | null | undefined>;
730
+ safety: z.ZodEffects<z.ZodNullable<z.ZodOptional<z.ZodEnum<["safe", "requires-review", "blocked"]>>>, NonNullable<"blocked" | "safe" | "requires-review"> | undefined, "blocked" | "safe" | "requires-review" | null | undefined>;
731
731
  safetyReasons: z.ZodEffects<z.ZodNullable<z.ZodOptional<z.ZodArray<z.ZodString, "many">>>, string[] | undefined, string[] | null | undefined>;
732
732
  }, "strict", z.ZodTypeAny, {
733
733
  source?: string | undefined;
@@ -737,7 +737,7 @@ declare const actionConfidenceRequestSchema: z.ZodObject<{
737
737
  confidence?: number | undefined;
738
738
  scope?: string | undefined;
739
739
  retrievalReason?: string | undefined;
740
- safety?: NonNullable<"safe" | "requires-review" | "blocked"> | undefined;
740
+ safety?: NonNullable<"blocked" | "safe" | "requires-review"> | undefined;
741
741
  safeToUse?: boolean | undefined;
742
742
  correctionState?: NonNullable<"none" | "correction" | "superseded" | "forgotten" | "disputed"> | undefined;
743
743
  corrected?: boolean | undefined;
@@ -751,7 +751,7 @@ declare const actionConfidenceRequestSchema: z.ZodObject<{
751
751
  confidence?: number | null | undefined;
752
752
  scope?: string | null | undefined;
753
753
  retrievalReason?: string | null | undefined;
754
- safety?: "safe" | "requires-review" | "blocked" | null | undefined;
754
+ safety?: "blocked" | "safe" | "requires-review" | null | undefined;
755
755
  safeToUse?: boolean | null | undefined;
756
756
  correctionState?: "none" | "correction" | "superseded" | "forgotten" | "disputed" | null | undefined;
757
757
  corrected?: boolean | null | undefined;
@@ -765,7 +765,7 @@ declare const actionConfidenceRequestSchema: z.ZodObject<{
765
765
  confidence?: number | undefined;
766
766
  scope?: string | undefined;
767
767
  retrievalReason?: string | undefined;
768
- safety?: NonNullable<"safe" | "requires-review" | "blocked"> | undefined;
768
+ safety?: NonNullable<"blocked" | "safe" | "requires-review"> | undefined;
769
769
  safeToUse?: boolean | undefined;
770
770
  correctionState?: NonNullable<"none" | "correction" | "superseded" | "forgotten" | "disputed"> | undefined;
771
771
  corrected?: boolean | undefined;
@@ -779,7 +779,7 @@ declare const actionConfidenceRequestSchema: z.ZodObject<{
779
779
  confidence?: number | null | undefined;
780
780
  scope?: string | null | undefined;
781
781
  retrievalReason?: string | null | undefined;
782
- safety?: "safe" | "requires-review" | "blocked" | null | undefined;
782
+ safety?: "blocked" | "safe" | "requires-review" | null | undefined;
783
783
  safeToUse?: boolean | null | undefined;
784
784
  correctionState?: "none" | "correction" | "superseded" | "forgotten" | "disputed" | null | undefined;
785
785
  corrected?: boolean | null | undefined;
@@ -805,7 +805,7 @@ declare const actionConfidenceRequestSchema: z.ZodObject<{
805
805
  confidence?: number | undefined;
806
806
  scope?: string | undefined;
807
807
  retrievalReason?: string | undefined;
808
- safety?: NonNullable<"safe" | "requires-review" | "blocked"> | undefined;
808
+ safety?: NonNullable<"blocked" | "safe" | "requires-review"> | undefined;
809
809
  safeToUse?: boolean | undefined;
810
810
  correctionState?: NonNullable<"none" | "correction" | "superseded" | "forgotten" | "disputed"> | undefined;
811
811
  corrected?: boolean | undefined;
@@ -831,7 +831,7 @@ declare const actionConfidenceRequestSchema: z.ZodObject<{
831
831
  confidence?: number | null | undefined;
832
832
  scope?: string | null | undefined;
833
833
  retrievalReason?: string | null | undefined;
834
- safety?: "safe" | "requires-review" | "blocked" | null | undefined;
834
+ safety?: "blocked" | "safe" | "requires-review" | null | undefined;
835
835
  safeToUse?: boolean | null | undefined;
836
836
  correctionState?: "none" | "correction" | "superseded" | "forgotten" | "disputed" | null | undefined;
837
837
  corrected?: boolean | null | undefined;
@@ -3,7 +3,7 @@ import {
3
3
  EngramAccessInputError,
4
4
  EngramAccessService,
5
5
  shapeMemorySummary
6
- } from "./chunk-VFB2G5YL.js";
6
+ } from "./chunk-5BUGGPBR.js";
7
7
  import "./chunk-ETUPBUHB.js";
8
8
  import "./chunk-L227SKTB.js";
9
9
  import "./chunk-DHGSZ3UD.js";
@@ -11,7 +11,7 @@ import "./chunk-BT7NVCML.js";
11
11
  import "./chunk-OXJBNGBK.js";
12
12
  import "./chunk-SOBJ6NEY.js";
13
13
  import "./chunk-H7XKCNR6.js";
14
- import "./chunk-XT7XVA53.js";
14
+ import "./chunk-OI27U2HT.js";
15
15
  import "./chunk-EDQVAMQI.js";
16
16
  import "./chunk-472U7RDF.js";
17
17
  import "./chunk-FXKPZ3H6.js";
@@ -29,8 +29,8 @@ import "./chunk-CHCA44C3.js";
29
29
  import "./chunk-4JRRISLU.js";
30
30
  import "./chunk-2LSZVONP.js";
31
31
  import "./chunk-DEUNUKTD.js";
32
- import "./chunk-MQEIWDYW.js";
33
- import "./chunk-IRFF6LSF.js";
32
+ import "./chunk-QDDHYAKV.js";
33
+ import "./chunk-YFS5OEKO.js";
34
34
  import "./chunk-5UZXUTVO.js";
35
35
  import "./chunk-4H5ZJHEN.js";
36
36
  import "./chunk-KGK2QKWL.js";
package/dist/briefing.js CHANGED
@@ -16,8 +16,8 @@ import {
16
16
  renderBriefingMarkdown,
17
17
  resolveBriefingSaveDir,
18
18
  validateBriefingFormat
19
- } from "./chunk-MQEIWDYW.js";
20
- import "./chunk-IRFF6LSF.js";
19
+ } from "./chunk-QDDHYAKV.js";
20
+ import "./chunk-YFS5OEKO.js";
21
21
  import "./chunk-5UZXUTVO.js";
22
22
  import "./chunk-4H5ZJHEN.js";
23
23
  import "./chunk-KGK2QKWL.js";
@@ -4,10 +4,10 @@ import {
4
4
  } from "./chunk-YQMZ7IH2.js";
5
5
  import {
6
6
  buildExtensionsBlockForConsolidation
7
- } from "./chunk-XM7BYXT7.js";
7
+ } from "./chunk-D65TSG24.js";
8
8
  import {
9
9
  runPostConsolidationMaterialize
10
- } from "./chunk-7X7TBJRX.js";
10
+ } from "./chunk-NOMEVTUD.js";
11
11
  import "./chunk-JFEKNTX7.js";
12
12
  import "./chunk-JLNBQWZ2.js";
13
13
  import "./chunk-3UXOZBHV.js";
@@ -21,7 +21,7 @@ import "./chunk-L2EXJQJP.js";
21
21
  import "./chunk-UZB5KHKX.js";
22
22
  import "./chunk-RK6F44Y6.js";
23
23
  import "./chunk-HQ6NIBL6.js";
24
- import "./chunk-IRFF6LSF.js";
24
+ import "./chunk-YFS5OEKO.js";
25
25
  import "./chunk-5UZXUTVO.js";
26
26
  import "./chunk-4H5ZJHEN.js";
27
27
  import "./chunk-KGK2QKWL.js";
@@ -6,7 +6,7 @@ import {
6
6
  } from "./chunk-SFQ6QNL7.js";
7
7
  import {
8
8
  StorageManager
9
- } from "./chunk-IRFF6LSF.js";
9
+ } from "./chunk-YFS5OEKO.js";
10
10
  import {
11
11
  buildLifecycleEventsForMemory,
12
12
  sortMemoryLifecycleEvents
@@ -74,4 +74,4 @@ export {
74
74
  backupExistingLedger,
75
75
  rebuildMemoryLifecycleLedger
76
76
  };
77
- //# sourceMappingURL=chunk-ARY5OOLG.js.map
77
+ //# sourceMappingURL=chunk-557IAFPD.js.map
@@ -27,7 +27,7 @@ import {
27
27
  listMemoryGovernanceRuns,
28
28
  readMemoryGovernanceRunArtifact,
29
29
  runMemoryGovernance
30
- } from "./chunk-XT7XVA53.js";
30
+ } from "./chunk-OI27U2HT.js";
31
31
  import {
32
32
  clusterByKey,
33
33
  projectTagProjectId,
@@ -80,10 +80,10 @@ import {
80
80
  buildBriefing,
81
81
  parseBriefingFocus,
82
82
  parseBriefingWindow
83
- } from "./chunk-MQEIWDYW.js";
83
+ } from "./chunk-QDDHYAKV.js";
84
84
  import {
85
85
  parseEntityFile
86
- } from "./chunk-IRFF6LSF.js";
86
+ } from "./chunk-YFS5OEKO.js";
87
87
  import {
88
88
  DEFAULT_RECALL_DISCLOSURE,
89
89
  isRecallDisclosure
@@ -4238,4 +4238,4 @@ export {
4238
4238
  shapeMemorySummary,
4239
4239
  EngramAccessService
4240
4240
  };
4241
- //# sourceMappingURL=chunk-VFB2G5YL.js.map
4241
+ //# sourceMappingURL=chunk-5BUGGPBR.js.map
@@ -1,7 +1,7 @@
1
1
  import {
2
2
  isTemporalQuery,
3
3
  recencyWindowBoundsFromPrompt
4
- } from "./chunk-V3RXWQIE.js";
4
+ } from "./chunk-WXACKLKP.js";
5
5
  import {
6
6
  isAbortError
7
7
  } from "./chunk-PVGDJXVK.js";
@@ -406,4 +406,4 @@ export {
406
406
  augmentWithDirectAndTemporal,
407
407
  parallelRetrieval
408
408
  };
409
- //# sourceMappingURL=chunk-USYGGIJZ.js.map
409
+ //# sourceMappingURL=chunk-D2MMMTDV.js.map
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  runPostConsolidationMaterialize
3
- } from "./chunk-7X7TBJRX.js";
3
+ } from "./chunk-NOMEVTUD.js";
4
4
  import {
5
5
  discoverMemoryExtensions,
6
6
  renderExtensionsBlock,
@@ -217,4 +217,4 @@ export {
217
217
  buildExtensionsBlockForConsolidation,
218
218
  materializeAfterSemanticConsolidation
219
219
  };
220
- //# sourceMappingURL=chunk-XM7BYXT7.js.map
220
+ //# sourceMappingURL=chunk-D65TSG24.js.map
@@ -4,7 +4,7 @@ import {
4
4
  import {
5
5
  compareEntityTimestamps,
6
6
  normalizeEntityName
7
- } from "./chunk-IRFF6LSF.js";
7
+ } from "./chunk-YFS5OEKO.js";
8
8
  import {
9
9
  sanitizeMemoryContent
10
10
  } from "./chunk-FVQJYWH7.js";
@@ -22,6 +22,8 @@ var RECENT_TRANSCRIPT_LOOKBACK_HOURS = 24;
22
22
  var INSTRUCTION_LIKE_RE = /\b(always|never|must|should|remember to|do not|don't|process|workflow|template|checklist|instruction)\b/i;
23
23
  var METADATA_WRAPPER_RE = /^(source|context|metadata|notes?):/i;
24
24
  var ENTITY_PRONOUN_RE = /\b(he|him|his|she|her|they|them|their|it|its)\b/i;
25
+ var BELIEF_LEDGER_SECTION_KEY = "belief_ledger";
26
+ var BELIEF_LEDGER_FACT_RE = /^claim=([^;]+);\s*status=([^;]+);\s*updatedAt=([^;]+);\s*(.+)$/;
25
27
  function tokenize(value) {
26
28
  return normalizeEntityText(value).split(/\s+/).filter((token) => token.length >= 2);
27
29
  }
@@ -49,6 +51,51 @@ function dedupeHintSnippetsByText(snippets) {
49
51
  }
50
52
  return result;
51
53
  }
54
+ function isBeliefLedgerSection(section) {
55
+ return normalizeEntityText(section.key).replace(/\s+/g, "_") === BELIEF_LEDGER_SECTION_KEY;
56
+ }
57
+ function beliefLedgerFactKeys(sections) {
58
+ const keys = /* @__PURE__ */ new Set();
59
+ for (const section of sections) {
60
+ if (!isBeliefLedgerSection(section)) continue;
61
+ for (const fact of section.facts) {
62
+ keys.add(normalizeEntityText(fact));
63
+ }
64
+ }
65
+ return keys;
66
+ }
67
+ function recallFactsForStructuredSection(section) {
68
+ if (!isBeliefLedgerSection(section)) return section.facts;
69
+ return currentActiveBeliefLedgerFactTexts(section.facts);
70
+ }
71
+ function currentActiveBeliefLedgerFactTexts(facts) {
72
+ const byClaim = /* @__PURE__ */ new Map();
73
+ for (const fact of facts) {
74
+ const match = BELIEF_LEDGER_FACT_RE.exec(fact.trim());
75
+ if (!match) continue;
76
+ const [, claimId, status, updatedAt, text] = match;
77
+ const updatedAtMs = Date.parse(updatedAt);
78
+ if (!claimId?.trim() || !status?.trim() || !Number.isFinite(updatedAtMs) || !text?.trim()) continue;
79
+ const normalizedStatus = status.trim().toLowerCase();
80
+ const normalizedClaimId = claimId.trim();
81
+ const current = byClaim.get(normalizedClaimId);
82
+ const inactiveTieWins = current && updatedAtMs === current.updatedAtMs && current.status === "active" && normalizedStatus !== "active";
83
+ if (!current || updatedAtMs > current.updatedAtMs || inactiveTieWins) {
84
+ byClaim.set(normalizedClaimId, { status: normalizedStatus, updatedAtMs, texts: [text.trim()] });
85
+ continue;
86
+ }
87
+ if (updatedAtMs === current.updatedAtMs && current.status === normalizedStatus) {
88
+ current.texts.push(text.trim());
89
+ }
90
+ }
91
+ const result = [];
92
+ for (const current of byClaim.values()) {
93
+ if (current.status === "active") {
94
+ result.push(...current.texts);
95
+ }
96
+ }
97
+ return result;
98
+ }
52
99
  function relationLine(entry, relationship) {
53
100
  const normalizedLabel = relationship.label.replace(/\s+/g, " ").trim();
54
101
  if (normalizedLabel.length === 0) return `${entry.name} is connected to ${relationship.target}`;
@@ -294,7 +341,9 @@ async function buildEntityMentionIndex(storage, config, recallNamespaces, namesp
294
341
  const entities = /* @__PURE__ */ new Map();
295
342
  for (const entity of entityFiles) {
296
343
  const canonicalId = normalizeEntityName(entity.name, entity.type);
297
- const sanitizedFacts = entity.facts.map((fact) => sanitizeEntityFact(fact)).filter(Boolean).map((fact) => compactLine(fact, 180));
344
+ const rawStructuredSections = entity.structuredSections ?? [];
345
+ const rawBeliefLedgerFactKeys = beliefLedgerFactKeys(rawStructuredSections);
346
+ const sanitizedFacts = entity.facts.map((fact) => sanitizeEntityFact(fact)).filter(Boolean).filter((fact) => !rawBeliefLedgerFactKeys.has(normalizeEntityText(fact))).map((fact) => compactLine(fact, 180));
298
347
  const sanitizedTimelineFacts = entity.timeline.map((entry) => sanitizeEntityFact(entry.text)).filter(Boolean).map((fact) => compactLine(fact, 180));
299
348
  entities.set(canonicalId, {
300
349
  canonicalId,
@@ -304,10 +353,10 @@ async function buildEntityMentionIndex(storage, config, recallNamespaces, namesp
304
353
  summary: entity.synthesis?.trim() || entity.summary?.trim() || void 0,
305
354
  facts: sanitizedFacts,
306
355
  timelineFacts: uniqueStrings(sanitizedTimelineFacts),
307
- structuredSections: (entity.structuredSections ?? []).map((section) => ({
356
+ structuredSections: rawStructuredSections.map((section) => ({
308
357
  key: section.key,
309
358
  title: section.title,
310
- facts: section.facts.map((fact) => sanitizeEntityFact(fact)).filter(Boolean).map((fact) => compactLine(fact, 180))
359
+ facts: recallFactsForStructuredSection(section).map((fact) => sanitizeEntityFact(fact)).filter(Boolean).map((fact) => compactLine(fact, 180))
311
360
  })).filter((section) => section.facts.length > 0),
312
361
  timeline: entity.timeline.map((entry) => ({ ...entry })),
313
362
  relationships: entity.relationships.map((relationship) => ({ ...relationship })),
@@ -628,4 +677,4 @@ export {
628
677
  entityIndexVersion,
629
678
  entityRecentTranscriptLookbackHours
630
679
  };
631
- //# sourceMappingURL=chunk-FHBEL473.js.map
680
+ //# sourceMappingURL=chunk-DOX2CG6Y.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../src/entity-retrieval.ts"],"sourcesContent":["import { createHash } from \"node:crypto\";\nimport { sanitizeMemoryContent } from \"./sanitize.js\";\nimport { mkdir, readFile, writeFile } from \"node:fs/promises\";\nimport path from \"node:path\";\nimport { collectNativeKnowledgeChunks, type NativeKnowledgeChunk } from \"./native-knowledge.js\";\nimport { compareEntityTimestamps, normalizeEntityName, type StorageManager } from \"./storage.js\";\nimport { normalizeEntityText, resolveRequestedEntitySectionKeys } from \"./entity-schema.js\";\nimport type { EntityStructuredSection, MemoryFile, PluginConfig, TranscriptEntry } from \"./types.js\";\n\nconst ENTITY_INDEX_VERSION = 3;\nconst RECENT_TRANSCRIPT_LOOKBACK_HOURS = 24;\nconst INSTRUCTION_LIKE_RE = /\\b(always|never|must|should|remember to|do not|don't|process|workflow|template|checklist|instruction)\\b/i;\nconst METADATA_WRAPPER_RE = /^(source|context|metadata|notes?):/i;\nconst ENTITY_PRONOUN_RE = /\\b(he|him|his|she|her|they|them|their|it|its)\\b/i;\nconst BELIEF_LEDGER_SECTION_KEY = \"belief_ledger\";\nconst BELIEF_LEDGER_FACT_RE = /^claim=([^;]+);\\s*status=([^;]+);\\s*updatedAt=([^;]+);\\s*(.+)$/;\n\ntype EntityQueryMode = \"direct\" | \"timeline\" | \"follow_up\";\n\ntype EntityMentionIndexEntry = {\n canonicalId: string;\n name: string;\n type: string;\n aliases: string[];\n summary?: string;\n facts: string[];\n timelineFacts: string[];\n structuredSections: EntityStructuredSection[];\n timeline: Array<{\n timestamp: string;\n text: string;\n source?: string;\n sessionKey?: string;\n principal?: string;\n }>;\n relationships: Array<{ target: string; label: string }>;\n activity: Array<{ date: string; note: string }>;\n factCount: number;\n memorySnippets: string[];\n nativeChunks: Array<{\n chunkId: string;\n title: string;\n sourceKind: NativeKnowledgeChunk[\"sourceKind\"];\n sourcePath: string;\n snippet: string;\n derivedDate?: string;\n }>;\n};\n\ntype EntityMentionIndex = {\n version: number;\n updatedAt: string;\n entities: EntityMentionIndexEntry[];\n};\n\ntype EntityCandidate = {\n entry: EntityMentionIndexEntry;\n alias: string;\n score: number;\n source: \"query\" | \"recent_turn\";\n};\n\ntype EntityHintSnippet = {\n text: string;\n score: number;\n kind: \"summary\" | \"fact\" | \"section\" | \"relationship\" | \"activity\" | \"memory\" | \"native\";\n};\n\nexport interface BuildEntityRecallSectionOptions {\n config: PluginConfig;\n storage: StorageManager;\n namespaceStorage?: (namespace: string) => Promise<StorageManager>;\n query: string;\n recallNamespaces?: string[];\n recentTurns: number;\n maxHints: number;\n maxSupportingFacts: number;\n maxRelatedEntities: number;\n maxChars: number;\n transcriptEntries: TranscriptEntry[];\n}\n\nfunction tokenize(value: string): string[] {\n return normalizeEntityText(value).split(/\\s+/).filter((token) => token.length >= 2);\n}\n\nfunction uniqueStrings(values: string[]): string[] {\n return [...new Set(values.map((value) => value.trim()).filter((value) => value.length > 0))];\n}\n\nfunction containsPhrase(haystack: string, needle: string): boolean {\n if (!needle) return false;\n const escaped = needle.replace(/[.*+?^${}()|[\\]\\\\]/g, \"\\\\$&\");\n return new RegExp(`(^|\\\\b)${escaped}(\\\\b|$)`, \"i\").test(haystack);\n}\n\nfunction compactLine(value: string, maxLength: number = 220): string {\n const normalized = value.replace(/\\s+/g, \" \").trim();\n if (normalized.length <= maxLength) return normalized;\n return `${normalized.slice(0, Math.max(0, maxLength - 1)).trimEnd()}…`;\n}\n\nfunction dedupeHintSnippetsByText(snippets: EntityHintSnippet[]): EntityHintSnippet[] {\n const seen = new Set<string>();\n const result: EntityHintSnippet[] = [];\n for (const snippet of snippets) {\n const key = normalizeEntityText(snippet.text);\n if (seen.has(key)) continue;\n seen.add(key);\n result.push(snippet);\n }\n return result;\n}\n\nfunction isBeliefLedgerSection(section: Pick<EntityStructuredSection, \"key\">): boolean {\n return normalizeEntityText(section.key).replace(/\\s+/g, \"_\") === BELIEF_LEDGER_SECTION_KEY;\n}\n\nfunction beliefLedgerFactKeys(sections: EntityStructuredSection[]): Set<string> {\n const keys = new Set<string>();\n for (const section of sections) {\n if (!isBeliefLedgerSection(section)) continue;\n for (const fact of section.facts) {\n keys.add(normalizeEntityText(fact));\n }\n }\n return keys;\n}\n\nfunction recallFactsForStructuredSection(section: EntityStructuredSection): string[] {\n if (!isBeliefLedgerSection(section)) return section.facts;\n return currentActiveBeliefLedgerFactTexts(section.facts);\n}\n\nfunction currentActiveBeliefLedgerFactTexts(facts: string[]): string[] {\n const byClaim = new Map<string, { status: string; updatedAtMs: number; texts: string[] }>();\n for (const fact of facts) {\n const match = BELIEF_LEDGER_FACT_RE.exec(fact.trim());\n if (!match) continue;\n const [, claimId, status, updatedAt, text] = match;\n const updatedAtMs = Date.parse(updatedAt);\n if (!claimId?.trim() || !status?.trim() || !Number.isFinite(updatedAtMs) || !text?.trim()) continue;\n const normalizedStatus = status.trim().toLowerCase();\n const normalizedClaimId = claimId.trim();\n const current = byClaim.get(normalizedClaimId);\n const inactiveTieWins =\n current &&\n updatedAtMs === current.updatedAtMs &&\n current.status === \"active\" &&\n normalizedStatus !== \"active\";\n if (!current || updatedAtMs > current.updatedAtMs || inactiveTieWins) {\n byClaim.set(normalizedClaimId, { status: normalizedStatus, updatedAtMs, texts: [text.trim()] });\n continue;\n }\n if (updatedAtMs === current.updatedAtMs && current.status === normalizedStatus) {\n current.texts.push(text.trim());\n }\n }\n const result: string[] = [];\n for (const current of byClaim.values()) {\n if (current.status === \"active\") {\n result.push(...current.texts);\n }\n }\n return result;\n}\n\nfunction relationLine(entry: EntityMentionIndexEntry, relationship: { target: string; label: string }): string {\n const normalizedLabel = relationship.label.replace(/\\s+/g, \" \").trim();\n if (normalizedLabel.length === 0) return `${entry.name} is connected to ${relationship.target}`;\n return `${entry.name} ${normalizedLabel} ${relationship.target}`;\n}\n\nfunction detectEntityQueryMode(query: string): EntityQueryMode | null {\n const normalized = normalizeEntityText(query);\n if (!normalized) return null;\n if (\n /^(what about|and what about|how about|what happened (with|to) (he|him|his|she|her|they|them|their|it|its)|did (he|she|they|it)|is (he|she|they|it)|was (he|she|they|it))\\b/.test(normalized)\n ) {\n return \"follow_up\";\n }\n if (\n /^(who is|who s|what do we know about|what does|tell me about|what can you tell me about|what s new with|what happened with|what happened to|status of|where is|how is)\\b/.test(normalized)\n ) {\n if (/^what does\\b/.test(normalized)) {\n if (/^what does (?:this|that|it|the|a|an|my|our|your|their)\\b/.test(normalized)) {\n return null;\n }\n if (\n /^what does [a-z0-9-]+ (?:error|warning|exception|failure|stack|trace|code|message|log)\\b/.test(normalized)\n && /\\b(mean|means|indicate|indicates|imply|implies)\\b/.test(normalized)\n ) {\n return null;\n }\n }\n return /what happened|what s new|status of|how is|where is/.test(normalized) ? \"timeline\" : \"direct\";\n }\n if (ENTITY_PRONOUN_RE.test(normalized) && normalized.split(/\\s+/).length <= 8) {\n return \"follow_up\";\n }\n return null;\n}\n\nfunction scoreAliasMatch(query: string, alias: string): number {\n const normalizedQuery = normalizeEntityText(query);\n const normalizedAlias = normalizeEntityText(alias);\n if (!normalizedAlias) return 0;\n if (normalizedQuery === normalizedAlias) return 10;\n if (containsPhrase(normalizedQuery, normalizedAlias)) return 8 + Math.min(normalizedAlias.split(/\\s+/).length, 3);\n const queryTokens = new Set(tokenize(normalizedQuery));\n const aliasTokens = tokenize(normalizedAlias);\n if (aliasTokens.length === 0) return 0;\n const overlap = aliasTokens.filter((token) => queryTokens.has(token)).length;\n if (overlap === 0) return 0;\n // Cross-entity contamination guard (#682 PR 2/3 R-2). For multi-token\n // aliases, partial-token overlap that hits ONLY shared common tokens\n // (like \"person\" in \"Person-A1\" / \"Person-B1\") would surface every\n // similarly-prefixed entity for a query that named only one. Require\n // that the overlap include at least one DISTINCTIVE alias token —\n // i.e. a token that does not also appear in any other entity's\n // alias-token vocabulary. Since this function is pure / per-pair, we\n // approximate \"distinctive\" by requiring the overlap to include at\n // least one token that is not a substring-of common identifier\n // affixes. The aliasTokens with length > 1 must contribute at least\n // one non-affix overlap. \"Alice Example\" ([\"alice\", \"example\"])\n // matched by query \"Tell me about Alice\" → overlap = 1 on \"alice\",\n // and \"alice\" is not an affix → score = 1. \"Person-A1\" tokens\n // [\"person\", \"a1\"] matched by query \"Who is Person-B1?\" → overlap =\n // 1 on \"person\", and \"person\" IS an affix → score = 0.\n if (aliasTokens.length > 1) {\n const nonAffixOverlap = aliasTokens.filter(\n (token) => queryTokens.has(token) && !isAliasAffixToken(token),\n ).length;\n if (nonAffixOverlap === 0) return 0;\n }\n return overlap;\n}\n\n/**\n * Tokens that look like type prefixes / generic role identifiers and\n * therefore should not, on their own, count as evidence that a\n * multi-token alias matches a query (#682 PR 2/3 R-2).\n *\n * Kept as a small explicit list rather than a regex so additions are\n * deliberate. The list mirrors the entity types listed in\n * `entity-schema.ts` plus the most common generic role identifiers\n * that frequently appear as the leading token of a display name.\n */\nconst ALIAS_AFFIX_TOKENS = new Set<string>([\n \"person\", \"people\", \"user\", \"users\", \"team\", \"teams\",\n \"project\", \"projects\", \"topic\", \"topics\",\n \"org\", \"orgs\", \"organization\", \"organizations\", \"company\", \"companies\",\n \"place\", \"places\", \"tool\", \"tools\", \"service\", \"services\",\n \"system\", \"systems\", \"agent\", \"agents\", \"bot\", \"bots\",\n]);\n\nfunction isAliasAffixToken(token: string): boolean {\n return ALIAS_AFFIX_TOKENS.has(token);\n}\n\nfunction isLikelyInstructionLike(value: string): boolean {\n return INSTRUCTION_LIKE_RE.test(value) || METADATA_WRAPPER_RE.test(value);\n}\n\nfunction sanitizeEntityFact(fact: string): string {\n const sanitized = sanitizeMemoryContent(fact);\n const clean = sanitized.text.trim();\n if (!clean) return \"\";\n if (INSTRUCTION_LIKE_RE.test(clean) && clean.length > 100) return \"\";\n return clean;\n}\n\nfunction scoreHintSnippet(snippet: EntityHintSnippet, queryTokens: string[]): EntityHintSnippet | null {\n const normalized = normalizeEntityText(snippet.text);\n if (!normalized) return null;\n const scored = { ...snippet };\n if (isLikelyInstructionLike(scored.text) && scored.kind !== \"summary\") {\n scored.score -= 3;\n }\n const overlap = queryTokens.filter((token) => normalized.includes(token)).length;\n scored.score += overlap * 2;\n if (METADATA_WRAPPER_RE.test(scored.text)) scored.score -= 2;\n if (scored.text.length <= 160) scored.score += 1;\n return scored.score > 0 ? scored : null;\n}\n\nfunction sortTimelineEntriesDesc(\n left: EntityMentionIndexEntry[\"timeline\"][number],\n right: EntityMentionIndexEntry[\"timeline\"][number],\n): number {\n const timestampOrder = compareEntityTimestamps(right.timestamp, left.timestamp);\n if (timestampOrder !== 0) {\n return timestampOrder;\n }\n return right.text.localeCompare(left.text);\n}\n\nfunction jaccardSimilarity(a: string, b: string): number {\n const aTokens = new Set(tokenize(a));\n const bTokens = new Set(tokenize(b));\n if (aTokens.size === 0 || bTokens.size === 0) return 0;\n let intersection = 0;\n for (const token of aTokens) {\n if (bTokens.has(token)) intersection += 1;\n }\n const union = new Set([...aTokens, ...bTokens]).size;\n return union === 0 ? 0 : intersection / union;\n}\n\nfunction buildAliasIndex(entries: EntityMentionIndexEntry[]): Map<string, EntityMentionIndexEntry[]> {\n const index = new Map<string, EntityMentionIndexEntry[]>();\n for (const entry of entries) {\n const aliases = uniqueStrings([entry.name, ...entry.aliases]).map(normalizeEntityText).filter(Boolean);\n for (const alias of aliases) {\n const existing = index.get(alias) ?? [];\n existing.push(entry);\n index.set(alias, existing);\n }\n }\n return index;\n}\n\nasync function readNativeChunks(\n config: PluginConfig,\n recallNamespaces?: string[],\n): Promise<NativeKnowledgeChunk[]> {\n if (!config.nativeKnowledge?.enabled) return [];\n return collectNativeKnowledgeChunks({\n workspaceDir: config.workspaceDir,\n memoryDir: config.memoryDir,\n config: config.nativeKnowledge,\n recallNamespaces: config.namespacesEnabled ? recallNamespaces : undefined,\n defaultNamespace: config.defaultNamespace,\n }).catch(() => []);\n}\n\nasync function resolveEntityIndexStorages(\n storage: StorageManager,\n config: PluginConfig,\n recallNamespaces?: string[],\n namespaceStorage?: (namespace: string) => Promise<StorageManager>,\n): Promise<StorageManager[]> {\n if (\n !config.namespacesEnabled ||\n !namespaceStorage ||\n !recallNamespaces ||\n recallNamespaces.length === 0\n ) {\n return [storage];\n }\n\n const storages: StorageManager[] = [];\n const seenDirs = new Set<string>();\n for (const namespace of uniqueStrings(recallNamespaces)) {\n try {\n const scopedStorage = await namespaceStorage(namespace);\n const storageDir = path.resolve(scopedStorage.dir);\n if (seenDirs.has(storageDir)) continue;\n seenDirs.add(storageDir);\n storages.push(scopedStorage);\n } catch {\n continue;\n }\n }\n\n return storages.length > 0 ? storages : [storage];\n}\n\nfunction entityIndexStatePath(storage: StorageManager): string {\n return path.join(storage.dir, \"state\", \"entity-mention-index.json\");\n}\n\nasync function readEntityIndexState(storage: StorageManager): Promise<EntityMentionIndex | null> {\n const raw = await readFile(entityIndexStatePath(storage), \"utf-8\").catch(() => \"\");\n if (!raw) return null;\n try {\n const parsed = JSON.parse(raw) as Partial<EntityMentionIndex>;\n if (parsed.version !== ENTITY_INDEX_VERSION || !Array.isArray(parsed.entities)) return null;\n return parsed as EntityMentionIndex;\n } catch {\n return null;\n }\n}\n\nasync function writeEntityIndexState(storage: StorageManager, index: EntityMentionIndex): Promise<void> {\n const statePath = entityIndexStatePath(storage);\n await mkdir(path.dirname(statePath), { recursive: true });\n const nextContent = JSON.stringify(index, null, 2) + \"\\n\";\n const currentContent = await readFile(statePath, \"utf-8\").catch(() => \"\");\n if (currentContent === nextContent) return;\n await writeFile(statePath, nextContent, \"utf-8\");\n}\n\nfunction nativePseudoCanonicalId(chunk: NativeKnowledgeChunk): string {\n return `native:${createHash(\"sha256\").update(chunk.sourcePath).digest(\"hex\").slice(0, 12)}`;\n}\n\nfunction createPseudoNativeEntry(chunk: NativeKnowledgeChunk): EntityMentionIndexEntry {\n const canonicalId = nativePseudoCanonicalId(chunk);\n return {\n canonicalId,\n name: chunk.title,\n type: chunk.sourceKind,\n aliases: uniqueStrings(chunk.aliases ?? []),\n facts: [],\n structuredSections: [],\n timelineFacts: [],\n timeline: [],\n relationships: [],\n activity: [],\n factCount: 0,\n memorySnippets: [],\n nativeChunks: [\n {\n chunkId: chunk.chunkId,\n title: chunk.title,\n sourceKind: chunk.sourceKind,\n sourcePath: chunk.sourcePath,\n snippet: compactLine(chunk.content, 180),\n derivedDate: chunk.derivedDate,\n },\n ],\n };\n}\n\nfunction mergeNativeChunk(entry: EntityMentionIndexEntry, chunk: NativeKnowledgeChunk): void {\n const existing = entry.nativeChunks.find((item) => item.chunkId === chunk.chunkId);\n if (existing) return;\n entry.nativeChunks.push({\n chunkId: chunk.chunkId,\n title: chunk.title,\n sourceKind: chunk.sourceKind,\n sourcePath: chunk.sourcePath,\n snippet: compactLine(chunk.content, 180),\n derivedDate: chunk.derivedDate,\n });\n entry.aliases = uniqueStrings([...entry.aliases, ...(chunk.aliases ?? [])]);\n}\n\nasync function buildEntityMentionIndex(\n storage: StorageManager,\n config: PluginConfig,\n recallNamespaces?: string[],\n namespaceStorage?: (namespace: string) => Promise<StorageManager>,\n): Promise<EntityMentionIndex> {\n const storages = await resolveEntityIndexStorages(\n storage,\n config,\n recallNamespaces,\n namespaceStorage,\n );\n const shouldPersistIndex =\n storages.length === 1 && path.resolve(storages[0]!.dir) === path.resolve(storage.dir);\n const [previousIndex, entityFileSets, memorySets, nativeChunks] = await Promise.all([\n shouldPersistIndex ? readEntityIndexState(storage) : Promise.resolve(null),\n Promise.all(storages.map((scopedStorage) => scopedStorage.readAllEntityFiles())),\n Promise.all(storages.map((scopedStorage) => scopedStorage.readAllMemories())),\n readNativeChunks(config, recallNamespaces),\n ]);\n const entityFiles = entityFileSets.flat();\n const memories = memorySets.flat();\n\n const entities = new Map<string, EntityMentionIndexEntry>();\n for (const entity of entityFiles) {\n const canonicalId = normalizeEntityName(entity.name, entity.type);\n const rawStructuredSections = entity.structuredSections ?? [];\n const rawBeliefLedgerFactKeys = beliefLedgerFactKeys(rawStructuredSections);\n const sanitizedFacts = entity.facts\n .map((fact) => sanitizeEntityFact(fact))\n .filter(Boolean)\n .filter((fact) => !rawBeliefLedgerFactKeys.has(normalizeEntityText(fact)))\n .map((fact) => compactLine(fact, 180));\n const sanitizedTimelineFacts = entity.timeline\n .map((entry) => sanitizeEntityFact(entry.text))\n .filter(Boolean)\n .map((fact) => compactLine(fact, 180));\n entities.set(canonicalId, {\n canonicalId,\n name: entity.name,\n type: entity.type,\n aliases: uniqueStrings(entity.aliases),\n summary: entity.synthesis?.trim() || entity.summary?.trim() || undefined,\n facts: sanitizedFacts,\n timelineFacts: uniqueStrings(sanitizedTimelineFacts),\n structuredSections: rawStructuredSections.map((section) => ({\n key: section.key,\n title: section.title,\n facts: recallFactsForStructuredSection(section)\n .map((fact) => sanitizeEntityFact(fact))\n .filter(Boolean)\n .map((fact) => compactLine(fact, 180)),\n })).filter((section) => section.facts.length > 0),\n timeline: entity.timeline.map((entry) => ({ ...entry })),\n relationships: entity.relationships.map((relationship) => ({ ...relationship })),\n activity: entity.activity.map((activity) => ({ ...activity })),\n factCount: sanitizedFacts.length,\n memorySnippets: [],\n nativeChunks: [],\n });\n }\n\n for (const memory of memories) {\n const entityRef = typeof memory.frontmatter.entityRef === \"string\" ? memory.frontmatter.entityRef : \"\";\n if (!entityRef) continue;\n const entry = entities.get(entityRef);\n if (!entry) continue;\n const snippet = await readMemorySnippet(memory);\n if (!entry.memorySnippets.includes(snippet)) {\n entry.memorySnippets.push(snippet);\n }\n }\n\n const aliasIndex = buildAliasIndex([...entities.values()]);\n for (const chunk of nativeChunks) {\n const existingPseudo = entities.get(nativePseudoCanonicalId(chunk));\n if (existingPseudo) {\n mergeNativeChunk(existingPseudo, chunk);\n continue;\n }\n const candidateAliases = uniqueStrings([chunk.title, ...(chunk.aliases ?? [])]).map(normalizeEntityText).filter(Boolean);\n let matched = false;\n for (const alias of candidateAliases) {\n for (const entry of aliasIndex.get(alias) ?? []) {\n mergeNativeChunk(entry, chunk);\n matched = true;\n }\n }\n if (matched) continue;\n const pseudoEntry = createPseudoNativeEntry(chunk);\n entities.set(pseudoEntry.canonicalId, pseudoEntry);\n }\n\n const sortedEntities = [...entities.values()].sort((left, right) => left.name.localeCompare(right.name));\n const previousEntities = previousIndex ? JSON.stringify(previousIndex.entities) : \"\";\n const nextEntities = JSON.stringify(sortedEntities);\n const index: EntityMentionIndex = {\n version: ENTITY_INDEX_VERSION,\n updatedAt:\n previousIndex && previousEntities === nextEntities\n ? previousIndex.updatedAt\n : new Date().toISOString(),\n entities: sortedEntities,\n };\n if (shouldPersistIndex) {\n await writeEntityIndexState(storage, index);\n }\n return index;\n}\n\nfunction resolveExplicitCandidates(\n index: EntityMentionIndex,\n query: string,\n): EntityCandidate[] {\n const candidates: EntityCandidate[] = [];\n for (const entry of index.entities) {\n const aliases = uniqueStrings([entry.name, ...entry.aliases]);\n let bestAlias = \"\";\n let bestScore = 0;\n for (const alias of aliases) {\n const score = scoreAliasMatch(query, alias);\n if (score > bestScore) {\n bestAlias = alias;\n bestScore = score;\n }\n }\n if (bestScore <= 0) continue;\n candidates.push({ entry, alias: bestAlias, score: bestScore, source: \"query\" });\n }\n return candidates.sort((left, right) => right.score - left.score);\n}\n\nfunction resolveRecentTurnCandidates(\n index: EntityMentionIndex,\n transcriptEntries: TranscriptEntry[],\n recentTurns: number,\n): EntityCandidate[] {\n if (recentTurns <= 0 || transcriptEntries.length === 0) return [];\n const recentEntries = transcriptEntries.slice(-recentTurns);\n const candidates = new Map<string, EntityCandidate>();\n for (let indexOffset = recentEntries.length - 1; indexOffset >= 0; indexOffset -= 1) {\n const turn = recentEntries[indexOffset];\n const recencyBoost = recentEntries.length - indexOffset;\n const roleWeight = turn.role === \"user\" ? 2 : turn.role === \"assistant\" ? -1 : 0;\n for (const entry of index.entities) {\n const aliases = uniqueStrings([entry.name, ...entry.aliases]);\n for (const alias of aliases) {\n const score = scoreAliasMatch(turn.content, alias);\n if (score <= 0) continue;\n const current = candidates.get(entry.canonicalId);\n const weightedScore = score + Math.max(0, 6 - recencyBoost) + roleWeight;\n if (!current || weightedScore > current.score) {\n candidates.set(entry.canonicalId, {\n entry,\n alias,\n score: weightedScore,\n source: \"recent_turn\",\n });\n }\n }\n }\n }\n return [...candidates.values()].sort((left, right) => right.score - left.score);\n}\n\nasync function readMemorySnippet(memory: MemoryFile): Promise<string> {\n const content = memory.content.replace(/\\s+/g, \" \").trim();\n return compactLine(content, 180);\n}\n\nasync function buildHintSnippets(\n entry: EntityMentionIndexEntry,\n queryTokens: string[],\n mode: EntityQueryMode,\n maxSupportingFacts: number,\n requestedSectionKeys: Set<string>,\n): Promise<EntityHintSnippet[]> {\n const snippets: EntityHintSnippet[] = [];\n const aliasTokens = new Set(tokenize(uniqueStrings([entry.name, ...entry.aliases]).join(\" \")));\n if (entry.summary) {\n snippets.push({ text: compactLine(entry.summary, 180), score: 10, kind: \"summary\" });\n }\n\n if (requestedSectionKeys.size > 0) {\n for (const section of entry.structuredSections) {\n if (!requestedSectionKeys.has(normalizeEntityText(section.key).replace(/\\s+/g, \"_\"))) continue;\n for (const fact of section.facts) {\n snippets.push({ text: fact, score: mode === \"direct\" ? 8 : 9, kind: \"section\" });\n }\n }\n } else {\n for (const fact of entry.timelineFacts) {\n snippets.push({ text: fact, score: mode === \"direct\" ? 6 : 7, kind: \"fact\" });\n }\n for (const section of entry.structuredSections) {\n for (const fact of section.facts) {\n const normalizedFact = normalizeEntityText(fact);\n const hasNonAliasQueryOverlap = queryTokens.some((token) =>\n !aliasTokens.has(token) && normalizedFact.includes(token)\n );\n if (entry.timelineFacts.length > 0 && !hasNonAliasQueryOverlap) {\n continue;\n }\n snippets.push({ text: fact, score: mode === \"direct\" ? 6 : 7, kind: \"fact\" });\n }\n }\n if (entry.timelineFacts.length === 0 && entry.structuredSections.length === 0) {\n for (const fact of entry.facts) {\n if (!fact.trim()) continue;\n snippets.push({ text: fact, score: mode === \"direct\" ? 6 : 7, kind: \"fact\" });\n }\n }\n }\n\n if (requestedSectionKeys.size === 0) {\n for (const relationship of entry.relationships) {\n snippets.push({\n text: compactLine(relationLine(entry, relationship), 180),\n score: mode === \"direct\" && entry.type.toLowerCase() === \"person\" ? 6 : 4,\n kind: \"relationship\",\n });\n }\n\n for (const activity of entry.activity) {\n snippets.push({\n text: compactLine(`${activity.date}: ${activity.note}`, 180),\n score: 4,\n kind: \"activity\",\n });\n }\n\n for (const memorySnippet of entry.memorySnippets.slice(0, Math.min(maxSupportingFacts, 4))) {\n snippets.push({\n text: memorySnippet,\n score: 5,\n kind: \"memory\",\n });\n }\n\n for (const chunk of entry.nativeChunks) {\n snippets.push({\n text: compactLine(chunk.snippet, 180),\n score: 3,\n kind: \"native\",\n });\n }\n }\n\n const deduped = new Map<string, EntityHintSnippet>();\n for (const snippet of snippets) {\n const scored = scoreHintSnippet(snippet, queryTokens);\n if (!scored) continue;\n const normalized = normalizeEntityText(scored.text);\n const existing = deduped.get(normalized);\n if (!existing || scored.score > existing.score) deduped.set(normalized, scored);\n }\n\n return [...deduped.values()]\n .filter((snippet) => snippet.score > 0)\n .sort((left, right) => right.score - left.score)\n .slice(0, maxSupportingFacts);\n}\n\nfunction summarizeUncertainty(snippets: EntityHintSnippet[]): string | null {\n const direct = snippets.filter((snippet) =>\n snippet.kind === \"summary\"\n || snippet.kind === \"fact\"\n || snippet.kind === \"section\"\n || snippet.kind === \"memory\"\n );\n if (direct.length < 2) return null;\n for (let index = 0; index < direct.length; index += 1) {\n for (let compare = index + 1; compare < direct.length; compare += 1) {\n if (jaccardSimilarity(direct[index].text, direct[compare].text) < 0.2) {\n return \"Evidence is mixed across stored facts; treat the hints below as partial and verify before answering definitively.\";\n }\n }\n }\n return null;\n}\n\nfunction formatEntityHintSection(\n candidates: Array<{\n candidate: EntityCandidate;\n snippets: EntityHintSnippet[];\n uncertainty: string | null;\n }>,\n queryTokens: string[],\n mode: EntityQueryMode,\n maxRelatedEntities: number,\n maxChars: number,\n): string | null {\n if (candidates.length === 0) return null;\n const lines: string[] = [\"## entity_answer_hints\", \"\"];\n for (const { candidate, snippets, uncertainty } of candidates) {\n const hasSummary = Boolean(candidate.entry.summary?.trim());\n const preferredTopSnippets = hasSummary\n ? snippets.filter((snippet) => snippet.kind !== \"fact\")\n : snippets;\n let topSnippets = (\n preferredTopSnippets.length > 0 ? preferredTopSnippets : snippets\n ).slice(0, 3);\n const buildTimelineSnippets = (seedExcludedTexts: Set<string>): EntityHintSnippet[] => {\n const explicitTimelinePool = dedupeHintSnippetsByText(\n (candidate.entry.timeline ?? [])\n .slice()\n .sort(sortTimelineEntriesDesc)\n .map((entry) => sanitizeEntityFact(entry.text))\n .filter(Boolean)\n .map((text) => scoreHintSnippet({\n text: compactLine(text, 180),\n score: 7,\n kind: \"activity\" as const,\n }, queryTokens))\n .filter((snippet): snippet is EntityHintSnippet => snippet !== null)\n .filter((snippet) => !seedExcludedTexts.has(normalizeEntityText(snippet.text))),\n ).slice(0, 2);\n const activityTimelinePool = dedupeHintSnippetsByText(\n snippets\n .filter((snippet) => (\n snippet.kind === \"activity\" || snippet.kind === \"memory\"\n ) && !seedExcludedTexts.has(normalizeEntityText(snippet.text))),\n ).slice(0, 2);\n return explicitTimelinePool.length > 0\n ? explicitTimelinePool\n : activityTimelinePool.length > 0\n ? activityTimelinePool\n : dedupeHintSnippetsByText(\n snippets\n .filter((snippet) => (\n snippet.kind === \"fact\" || snippet.kind === \"summary\"\n ) && !seedExcludedTexts.has(normalizeEntityText(snippet.text))),\n ).slice(0, 2);\n };\n const baseTopSnippetTexts = new Set(topSnippets.map((snippet) => normalizeEntityText(snippet.text)));\n const timelinePool = mode !== \"direct\" ? buildTimelineSnippets(baseTopSnippetTexts) : [];\n if (mode !== \"direct\" && hasSummary && topSnippets.length < 2) {\n if (timelinePool.length > 0) {\n topSnippets = [...topSnippets, timelinePool[0]!].slice(0, 3);\n }\n }\n const topSnippetTexts = new Set(topSnippets.map((snippet) => normalizeEntityText(snippet.text)));\n lines.push(`- target: ${candidate.entry.name} (${candidate.entry.type})`);\n if (candidate.source === \"recent_turn\") {\n lines.push(`- resolution: carried forward from recent turns via alias \"${candidate.alias}\"`);\n } else {\n lines.push(`- resolution: matched alias \"${candidate.alias}\" in the query`);\n }\n if (uncertainty) lines.push(`- uncertainty: ${uncertainty}`);\n if (topSnippets.length > 0) {\n lines.push(\"- likely answer:\");\n for (const snippet of topSnippets) {\n lines.push(` - ${snippet.text}`);\n }\n }\n if (mode !== \"direct\") {\n const fallbackTimeline = timelinePool.filter(\n (snippet) => !topSnippetTexts.has(normalizeEntityText(snippet.text)),\n );\n if (fallbackTimeline.length > 0) {\n lines.push(\"- recent timeline:\");\n for (const snippet of fallbackTimeline) {\n lines.push(` - ${snippet.text}`);\n }\n }\n }\n const related = candidate.entry.relationships.slice(0, maxRelatedEntities).map((relationship) => relationship.target);\n if (related.length > 0) {\n lines.push(`- related entities: ${related.join(\", \")}`);\n }\n lines.push(`- support counts: facts=${candidate.entry.factCount}, memories=${candidate.entry.memorySnippets.length}, native=${candidate.entry.nativeChunks.length}`);\n lines.push(\"\");\n }\n\n let result = lines.join(\"\\n\");\n if (result.length > maxChars) {\n result = `${result.slice(0, Math.max(0, maxChars - 15)).trimEnd()}\\n\\n...(trimmed)\\n`;\n }\n return result.trim().length > 0 ? result.trimEnd() : null;\n}\n\nexport async function buildEntityRecallSection(options: BuildEntityRecallSectionOptions): Promise<string | null> {\n const mode = detectEntityQueryMode(options.query);\n if (!mode) return null;\n\n const index = await buildEntityMentionIndex(\n options.storage,\n options.config,\n options.recallNamespaces,\n options.namespaceStorage,\n );\n if (index.entities.length === 0) return null;\n\n const explicitCandidates = resolveExplicitCandidates(index, options.query);\n const candidates = explicitCandidates.length > 0\n ? explicitCandidates\n : resolveRecentTurnCandidates(index, options.transcriptEntries, options.recentTurns);\n\n if (candidates.length === 0) return null;\n\n const queryTokens = tokenize(options.query);\n const candidateLimit = explicitCandidates.length === 0 && mode === \"follow_up\"\n ? 1\n : options.maxHints;\n const rankedCandidates = candidates.slice(0, candidateLimit);\n const enriched = await Promise.all(\n rankedCandidates.map(async (candidate) => {\n const requestedSectionKeys = new Set(\n resolveRequestedEntitySectionKeys(\n options.query,\n candidate.entry.type,\n candidate.entry.structuredSections,\n options.config.entitySchemas,\n ),\n );\n const snippets = await buildHintSnippets(\n candidate.entry,\n queryTokens,\n mode,\n options.maxSupportingFacts,\n requestedSectionKeys,\n );\n return {\n candidate,\n snippets,\n uncertainty: summarizeUncertainty(snippets),\n };\n }),\n );\n\n const section = formatEntityHintSection(enriched, queryTokens, mode, options.maxRelatedEntities, options.maxChars);\n if (!section) return null;\n return section;\n}\n\nexport async function readRecentEntityTranscriptEntries(\n transcriptEntriesPromise: Promise<TranscriptEntry[]>,\n recentTurns: number,\n): Promise<TranscriptEntry[]> {\n if (recentTurns <= 0) return [];\n const transcriptEntries = await transcriptEntriesPromise.catch(() => []);\n if (transcriptEntries.length === 0) return [];\n return transcriptEntries.slice(-Math.max(1, recentTurns * 2));\n}\n\nexport const entityIndexVersion = ENTITY_INDEX_VERSION;\nexport const entityRecentTranscriptLookbackHours = RECENT_TRANSCRIPT_LOOKBACK_HOURS;\n"],"mappings":";;;;;;;;;;;;;;;;AAAA,SAAS,kBAAkB;AAE3B,SAAS,OAAO,UAAU,iBAAiB;AAC3C,OAAO,UAAU;AAMjB,IAAM,uBAAuB;AAC7B,IAAM,mCAAmC;AACzC,IAAM,sBAAsB;AAC5B,IAAM,sBAAsB;AAC5B,IAAM,oBAAoB;AAC1B,IAAM,4BAA4B;AAClC,IAAM,wBAAwB;AAmE9B,SAAS,SAAS,OAAyB;AACzC,SAAO,oBAAoB,KAAK,EAA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jH,MAAI,CAAC,QAAS,QAAO;AACrB,SAAO;AACT;AAEA,eAAsB,kCACpB,0BACA,aAC4B;AAC5B,MAAI,eAAe,EAAG,QAAO,CAAC;AAC9B,QAAM,oBAAoB,MAAM,yBAAyB,MAAM,MAAM,CAAC,CAAC;AACvE,MAAI,kBAAkB,WAAW,EAAG,QAAO,CAAC;AAC5C,SAAO,kBAAkB,MAAM,CAAC,KAAK,IAAI,GAAG,cAAc,CAAC,CAAC;AAC9D;AAEO,IAAM,qBAAqB;AAC3B,IAAM,sCAAsC;","names":[]}
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  listNamespaces
3
- } from "./chunk-574MU2Y3.js";
3
+ } from "./chunk-JTDRJQ3K.js";
4
4
  import {
5
5
  runConsolidationProvenanceCheck
6
6
  } from "./chunk-LZ3VEOU5.js";
@@ -36,13 +36,13 @@ import {
36
36
  import {
37
37
  listMemoryGovernanceRuns,
38
38
  readMemoryGovernanceRunArtifact
39
- } from "./chunk-XT7XVA53.js";
39
+ } from "./chunk-OI27U2HT.js";
40
40
  import {
41
41
  analyzeGraphHealth
42
42
  } from "./chunk-4JRRISLU.js";
43
43
  import {
44
44
  StorageManager
45
- } from "./chunk-IRFF6LSF.js";
45
+ } from "./chunk-YFS5OEKO.js";
46
46
  import {
47
47
  lintWorkspaceFiles
48
48
  } from "./chunk-DM2T26WE.js";
@@ -1333,4 +1333,4 @@ export {
1333
1333
  runBenchmarkRecall,
1334
1334
  runOperatorRepair
1335
1335
  };
1336
- //# sourceMappingURL=chunk-DARLGSFX.js.map
1336
+ //# sourceMappingURL=chunk-ELKI4BB6.js.map