@remnic/core 10.0.185 → 10.0.187

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 (248) hide show
  1. package/dist/access-admin-ops-surface.js +97 -96
  2. package/dist/access-audit.js +2 -2
  3. package/dist/access-cli.js +97 -96
  4. package/dist/access-cli.js.map +1 -1
  5. package/dist/access-coding-context-resolution.js +6 -6
  6. package/dist/access-extraction-force-flush-preempt.js +97 -96
  7. package/dist/access-extraction-force-flush.js +97 -96
  8. package/dist/access-http-briefing.js +97 -96
  9. package/dist/access-http-query.js +97 -96
  10. package/dist/access-http.js +97 -96
  11. package/dist/access-identity-continuity-surface.js +97 -96
  12. package/dist/access-lcm-surface.js +97 -96
  13. package/dist/access-mcp.js +97 -96
  14. package/dist/access-observe-write-category.js +6 -6
  15. package/dist/access-observe-write-surface.js +97 -96
  16. package/dist/access-offline-manifest.js +5 -5
  17. package/dist/access-operations-batch.js +97 -96
  18. package/dist/access-operations.js +97 -96
  19. package/dist/access-recall-concurrency.js +97 -96
  20. package/dist/access-recall-response.js +97 -96
  21. package/dist/access-recall-surface.js +97 -96
  22. package/dist/access-schema.js +5 -5
  23. package/dist/access-service.js +97 -96
  24. package/dist/active-recall.js +10 -10
  25. package/dist/adapters/index.js +4 -4
  26. package/dist/adapters/registry.js +2 -2
  27. package/dist/{auto-sync-OOEY2FSA.js → auto-sync-BJUAGKI5.js} +4 -4
  28. package/dist/briefing.js +7 -7
  29. package/dist/buffer.js +6 -5
  30. package/dist/calibration.js +1 -1
  31. package/dist/causal-consolidation.js +8 -8
  32. package/dist/{chunk-3N7I53KR.js → chunk-2QQCCUXF.js} +2 -2
  33. package/dist/{chunk-FYHFM64A.js → chunk-2RAVHJCD.js} +2 -2
  34. package/dist/{chunk-XYZR3NBU.js → chunk-2ZS7CB5H.js} +2 -2
  35. package/dist/{chunk-4TPU36X4.js → chunk-4N33L4HY.js} +2 -2
  36. package/dist/{chunk-BFPF5N3H.js → chunk-4RASUAN3.js} +4 -4
  37. package/dist/{chunk-CKTKATXL.js → chunk-4VFEN3WT.js} +19 -15
  38. package/dist/chunk-4VFEN3WT.js.map +1 -0
  39. package/dist/{chunk-R3UQIS3F.js → chunk-5AFBFAFX.js} +4 -4
  40. package/dist/{chunk-PY5XP7GR.js → chunk-6TIQLG7I.js} +2 -2
  41. package/dist/{chunk-JK5YFQQT.js → chunk-76KL37ON.js} +2 -2
  42. package/dist/{chunk-L7MVHAMS.js → chunk-7EPEZYX3.js} +2 -2
  43. package/dist/{chunk-A3HLZMHD.js → chunk-7KTORRIK.js} +2 -2
  44. package/dist/{chunk-PZ4OA7CP.js → chunk-7UTCETGK.js} +2 -2
  45. package/dist/{chunk-2LXROA34.js → chunk-AXSQGJSG.js} +2 -2
  46. package/dist/{chunk-5ITPOAKW.js → chunk-BANMPRSC.js} +2 -2
  47. package/dist/{chunk-FDXLO6CX.js → chunk-CRS2NY44.js} +2 -2
  48. package/dist/{chunk-SSKIXUR5.js → chunk-CTWWMEGR.js} +2 -2
  49. package/dist/{chunk-ZNHLUYIT.js → chunk-D7HOJFDS.js} +4 -4
  50. package/dist/{chunk-ZX5N5D6M.js → chunk-DAOMWGO2.js} +4 -4
  51. package/dist/{chunk-VN3RYYMS.js → chunk-DR4TYD56.js} +2 -2
  52. package/dist/{chunk-7DFJ4JX2.js → chunk-DTTDMK7Q.js} +7 -7
  53. package/dist/{chunk-YNDLCWXS.js → chunk-EZ25VE3G.js} +4 -4
  54. package/dist/{chunk-QJBULLKG.js → chunk-F2MVWUNF.js} +2 -2
  55. package/dist/{chunk-N33M4NWM.js → chunk-FKLSIQBF.js} +3 -3
  56. package/dist/{chunk-5BESLEU7.js → chunk-FQE5QN5Q.js} +2 -2
  57. package/dist/{chunk-VFJ3PBZI.js → chunk-FXDQO7VX.js} +2 -2
  58. package/dist/{chunk-BAMF6J4W.js → chunk-GCHM5BYL.js} +4 -4
  59. package/dist/{chunk-6SROXED4.js → chunk-GRX5BE73.js} +2 -2
  60. package/dist/{chunk-UMGO4LEZ.js → chunk-HHCLV572.js} +2 -2
  61. package/dist/{chunk-CIC3WZVO.js → chunk-I233SAGS.js} +2 -2
  62. package/dist/{chunk-FBNR3JI5.js → chunk-IMT7NTFV.js} +2 -2
  63. package/dist/{chunk-63FIQIER.js → chunk-JJ42IDJU.js} +2 -2
  64. package/dist/{chunk-CJERJ724.js → chunk-JRHOL6B5.js} +2 -2
  65. package/dist/{chunk-ENKXMLE3.js → chunk-K5RGHUX7.js} +2 -2
  66. package/dist/{chunk-VAQIBC2L.js → chunk-KQIOW3TG.js} +2 -2
  67. package/dist/{chunk-H4HBQRGI.js → chunk-KVM3BS5K.js} +2 -2
  68. package/dist/{chunk-QJG6PEAM.js → chunk-KZJEKKK6.js} +3 -3
  69. package/dist/{chunk-TCSY74IN.js → chunk-L2DYRQQH.js} +181 -140
  70. package/dist/chunk-L2DYRQQH.js.map +1 -0
  71. package/dist/{chunk-N2PXVLV3.js → chunk-LANV6I63.js} +7 -7
  72. package/dist/{chunk-U7VEZ2XS.js → chunk-LPYGM6RE.js} +2 -2
  73. package/dist/{chunk-WCXWCAUC.js → chunk-MDXZIU5X.js} +2 -2
  74. package/dist/{chunk-VUC3DLQ5.js → chunk-MOWLANEJ.js} +2 -2
  75. package/dist/{chunk-IK7NPYYU.js → chunk-NFQKIZK3.js} +2 -2
  76. package/dist/{chunk-RXAWE76Y.js → chunk-O6QSBI3U.js} +2 -2
  77. package/dist/{chunk-5RBHL5TF.js → chunk-OA7YDB6A.js} +2 -2
  78. package/dist/{chunk-CXGD3N2Y.js → chunk-OVJAQWHO.js} +2 -2
  79. package/dist/{chunk-EWLOIHAZ.js → chunk-P5FF44G3.js} +5 -5
  80. package/dist/{chunk-5RWIZISF.js → chunk-PSUSA5SM.js} +3 -3
  81. package/dist/{chunk-DYZDFOBX.js → chunk-Q6S67LHR.js} +2 -2
  82. package/dist/{chunk-KYPFQO43.js → chunk-QPD7EYGI.js} +2 -2
  83. package/dist/{chunk-FE43YKNJ.js → chunk-RBPC4XGU.js} +31 -8
  84. package/dist/chunk-RBPC4XGU.js.map +1 -0
  85. package/dist/{chunk-G6V32Q4F.js → chunk-SFWQZBPN.js} +2 -2
  86. package/dist/{chunk-DNXQVCIC.js → chunk-SUI75NTN.js} +8 -8
  87. package/dist/{chunk-FDLPNFKE.js → chunk-T7R42MWB.js} +2 -2
  88. package/dist/chunk-TK6EBBKG.js +13 -0
  89. package/dist/chunk-TK6EBBKG.js.map +1 -0
  90. package/dist/{chunk-J7BAJ6BF.js → chunk-UCCXPMTP.js} +2 -2
  91. package/dist/{chunk-PDXO4LIH.js → chunk-UWKHLWUE.js} +13 -9
  92. package/dist/chunk-UWKHLWUE.js.map +1 -0
  93. package/dist/{chunk-L4TYD52M.js → chunk-VZBKCRU7.js} +2 -2
  94. package/dist/{chunk-T4MKFTJF.js → chunk-XHDS6HIX.js} +5 -5
  95. package/dist/{chunk-TKWIUL3D.js → chunk-YDGQYG4L.js} +7 -7
  96. package/dist/{chunk-4KUK3KGI.js → chunk-YJZDRM33.js} +3 -3
  97. package/dist/{chunk-NU5JRN3A.js → chunk-ZDLVHGIC.js} +2 -2
  98. package/dist/{chunk-OJXK5C6Z.js → chunk-ZG4GNPRE.js} +7 -7
  99. package/dist/{chunk-IJKO5RVJ.js → chunk-ZNYDDZVW.js} +3 -3
  100. package/dist/cli.js +97 -96
  101. package/dist/coding/export-okf-codegraph.js +13 -13
  102. package/dist/compounding/engine.js +8 -8
  103. package/dist/config.js +10 -10
  104. package/dist/connectors/codex-materialize-runner.js +7 -7
  105. package/dist/connectors/index.js +7 -7
  106. package/dist/convergence-refresh.js +9 -9
  107. package/dist/corpus-watermark.js +9 -9
  108. package/dist/dashboard-runtime.js +2 -2
  109. package/dist/deep-recall-http-glue.js +6 -6
  110. package/dist/deep-recall.js +2 -2
  111. package/dist/entity-retrieval.js +7 -7
  112. package/dist/explicit-capture.js +97 -96
  113. package/dist/extraction-entities-source.d.ts +11 -0
  114. package/dist/extraction-entities-source.d.ts.map +1 -0
  115. package/dist/extraction-entities-source.js +8 -0
  116. package/dist/extraction-entities-source.js.map +1 -0
  117. package/dist/extraction-judge.js +2 -2
  118. package/dist/extraction-normalization.js +2 -2
  119. package/dist/extraction-prompt.d.ts +19 -2
  120. package/dist/extraction-prompt.d.ts.map +1 -1
  121. package/dist/extraction-prompt.js +5 -1
  122. package/dist/extraction.d.ts +2 -1
  123. package/dist/extraction.d.ts.map +1 -1
  124. package/dist/extraction.js +15 -14
  125. package/dist/{first-start-migration-TCPK2I7J.js → first-start-migration-CCZ5SM3V.js} +4 -4
  126. package/dist/harmonic-retrieval.js +7 -7
  127. package/dist/index.js +117 -116
  128. package/dist/lcm/engine.js +3 -3
  129. package/dist/lcm/index.js +8 -8
  130. package/dist/location/index.js +8 -8
  131. package/dist/maintenance/memory-governance.js +7 -7
  132. package/dist/maintenance/rebuild-memory-lifecycle-ledger.js +7 -7
  133. package/dist/maintenance/rebuild-memory-projection-runner.js +9 -9
  134. package/dist/maintenance/rebuild-memory-projection.js +8 -8
  135. package/dist/memory-browse.js +5 -5
  136. package/dist/namespaces/migrate.js +8 -8
  137. package/dist/namespaces/search.js +4 -4
  138. package/dist/namespaces/storage.js +7 -7
  139. package/dist/offline-sync-changeset-generations.js +3 -3
  140. package/dist/offline-sync-embedding-generation.js +2 -2
  141. package/dist/offline-sync-snapshot-stream.js +5 -5
  142. package/dist/offline-sync.js +6 -6
  143. package/dist/operator-doctor-corpus.js +10 -10
  144. package/dist/operator-toolkit.js +17 -17
  145. package/dist/orchestration/backlog-scheduler.js +98 -97
  146. package/dist/orchestration/backlog-scheduler.js.map +1 -1
  147. package/dist/orchestration/buffer-drain-runner.js +98 -97
  148. package/dist/orchestration/extraction-queue-coordinator.d.ts +20 -0
  149. package/dist/orchestration/extraction-queue-coordinator.d.ts.map +1 -1
  150. package/dist/orchestration/extraction-run-helpers.d.ts +2 -1
  151. package/dist/orchestration/extraction-run-helpers.d.ts.map +1 -1
  152. package/dist/orchestration/extraction-run.d.ts.map +1 -1
  153. package/dist/orchestration/maintenance.js +15 -15
  154. package/dist/orchestration/turn-ingestion.d.ts.map +1 -1
  155. package/dist/orchestrator.js +99 -98
  156. package/dist/qmd.js +2 -2
  157. package/dist/recall-navigation.js +97 -96
  158. package/dist/recall-state-view-admission.js +5 -5
  159. package/dist/recall-why-service.js +5 -5
  160. package/dist/resume-bundles.js +13 -13
  161. package/dist/search/factory.js +3 -3
  162. package/dist/search/index.js +3 -3
  163. package/dist/semantic-consolidation.js +8 -8
  164. package/dist/semantic-rule-promotion.js +7 -7
  165. package/dist/semantic-rule-verifier.js +7 -7
  166. package/dist/source-agent-qualifier.js +11 -10
  167. package/dist/standup/build.js +7 -7
  168. package/dist/storage.js +6 -6
  169. package/dist/transcript.js +2 -2
  170. package/dist/transfer/export-okf.js +7 -7
  171. package/dist/verified-recall.js +7 -7
  172. package/dist/who-knows-cli.js +8 -8
  173. package/dist/who-knows.js +7 -7
  174. package/package.json +2 -2
  175. package/src/extraction-carry-forward.test.ts +147 -0
  176. package/src/extraction-entities-source.ts +19 -0
  177. package/src/extraction-prompt.ts +60 -9
  178. package/src/extraction.ts +11 -8
  179. package/src/orchestration/extraction-queue-coordinator.ts +71 -4
  180. package/src/orchestration/extraction-queue-lane-bias.test.ts +220 -0
  181. package/src/orchestration/extraction-run-helpers.ts +11 -4
  182. package/src/orchestration/extraction-run.test.ts +23 -12
  183. package/src/orchestration/extraction-run.ts +6 -5
  184. package/src/orchestration/turn-ingestion.ts +7 -1
  185. package/dist/chunk-CKTKATXL.js.map +0 -1
  186. package/dist/chunk-FE43YKNJ.js.map +0 -1
  187. package/dist/chunk-PDXO4LIH.js.map +0 -1
  188. package/dist/chunk-TCSY74IN.js.map +0 -1
  189. /package/dist/{auto-sync-OOEY2FSA.js.map → auto-sync-BJUAGKI5.js.map} +0 -0
  190. /package/dist/{chunk-3N7I53KR.js.map → chunk-2QQCCUXF.js.map} +0 -0
  191. /package/dist/{chunk-FYHFM64A.js.map → chunk-2RAVHJCD.js.map} +0 -0
  192. /package/dist/{chunk-XYZR3NBU.js.map → chunk-2ZS7CB5H.js.map} +0 -0
  193. /package/dist/{chunk-4TPU36X4.js.map → chunk-4N33L4HY.js.map} +0 -0
  194. /package/dist/{chunk-BFPF5N3H.js.map → chunk-4RASUAN3.js.map} +0 -0
  195. /package/dist/{chunk-R3UQIS3F.js.map → chunk-5AFBFAFX.js.map} +0 -0
  196. /package/dist/{chunk-PY5XP7GR.js.map → chunk-6TIQLG7I.js.map} +0 -0
  197. /package/dist/{chunk-JK5YFQQT.js.map → chunk-76KL37ON.js.map} +0 -0
  198. /package/dist/{chunk-L7MVHAMS.js.map → chunk-7EPEZYX3.js.map} +0 -0
  199. /package/dist/{chunk-A3HLZMHD.js.map → chunk-7KTORRIK.js.map} +0 -0
  200. /package/dist/{chunk-PZ4OA7CP.js.map → chunk-7UTCETGK.js.map} +0 -0
  201. /package/dist/{chunk-2LXROA34.js.map → chunk-AXSQGJSG.js.map} +0 -0
  202. /package/dist/{chunk-5ITPOAKW.js.map → chunk-BANMPRSC.js.map} +0 -0
  203. /package/dist/{chunk-FDXLO6CX.js.map → chunk-CRS2NY44.js.map} +0 -0
  204. /package/dist/{chunk-SSKIXUR5.js.map → chunk-CTWWMEGR.js.map} +0 -0
  205. /package/dist/{chunk-ZNHLUYIT.js.map → chunk-D7HOJFDS.js.map} +0 -0
  206. /package/dist/{chunk-ZX5N5D6M.js.map → chunk-DAOMWGO2.js.map} +0 -0
  207. /package/dist/{chunk-VN3RYYMS.js.map → chunk-DR4TYD56.js.map} +0 -0
  208. /package/dist/{chunk-7DFJ4JX2.js.map → chunk-DTTDMK7Q.js.map} +0 -0
  209. /package/dist/{chunk-YNDLCWXS.js.map → chunk-EZ25VE3G.js.map} +0 -0
  210. /package/dist/{chunk-QJBULLKG.js.map → chunk-F2MVWUNF.js.map} +0 -0
  211. /package/dist/{chunk-N33M4NWM.js.map → chunk-FKLSIQBF.js.map} +0 -0
  212. /package/dist/{chunk-5BESLEU7.js.map → chunk-FQE5QN5Q.js.map} +0 -0
  213. /package/dist/{chunk-VFJ3PBZI.js.map → chunk-FXDQO7VX.js.map} +0 -0
  214. /package/dist/{chunk-BAMF6J4W.js.map → chunk-GCHM5BYL.js.map} +0 -0
  215. /package/dist/{chunk-6SROXED4.js.map → chunk-GRX5BE73.js.map} +0 -0
  216. /package/dist/{chunk-UMGO4LEZ.js.map → chunk-HHCLV572.js.map} +0 -0
  217. /package/dist/{chunk-CIC3WZVO.js.map → chunk-I233SAGS.js.map} +0 -0
  218. /package/dist/{chunk-FBNR3JI5.js.map → chunk-IMT7NTFV.js.map} +0 -0
  219. /package/dist/{chunk-63FIQIER.js.map → chunk-JJ42IDJU.js.map} +0 -0
  220. /package/dist/{chunk-CJERJ724.js.map → chunk-JRHOL6B5.js.map} +0 -0
  221. /package/dist/{chunk-ENKXMLE3.js.map → chunk-K5RGHUX7.js.map} +0 -0
  222. /package/dist/{chunk-VAQIBC2L.js.map → chunk-KQIOW3TG.js.map} +0 -0
  223. /package/dist/{chunk-H4HBQRGI.js.map → chunk-KVM3BS5K.js.map} +0 -0
  224. /package/dist/{chunk-QJG6PEAM.js.map → chunk-KZJEKKK6.js.map} +0 -0
  225. /package/dist/{chunk-N2PXVLV3.js.map → chunk-LANV6I63.js.map} +0 -0
  226. /package/dist/{chunk-U7VEZ2XS.js.map → chunk-LPYGM6RE.js.map} +0 -0
  227. /package/dist/{chunk-WCXWCAUC.js.map → chunk-MDXZIU5X.js.map} +0 -0
  228. /package/dist/{chunk-VUC3DLQ5.js.map → chunk-MOWLANEJ.js.map} +0 -0
  229. /package/dist/{chunk-IK7NPYYU.js.map → chunk-NFQKIZK3.js.map} +0 -0
  230. /package/dist/{chunk-RXAWE76Y.js.map → chunk-O6QSBI3U.js.map} +0 -0
  231. /package/dist/{chunk-5RBHL5TF.js.map → chunk-OA7YDB6A.js.map} +0 -0
  232. /package/dist/{chunk-CXGD3N2Y.js.map → chunk-OVJAQWHO.js.map} +0 -0
  233. /package/dist/{chunk-EWLOIHAZ.js.map → chunk-P5FF44G3.js.map} +0 -0
  234. /package/dist/{chunk-5RWIZISF.js.map → chunk-PSUSA5SM.js.map} +0 -0
  235. /package/dist/{chunk-DYZDFOBX.js.map → chunk-Q6S67LHR.js.map} +0 -0
  236. /package/dist/{chunk-KYPFQO43.js.map → chunk-QPD7EYGI.js.map} +0 -0
  237. /package/dist/{chunk-G6V32Q4F.js.map → chunk-SFWQZBPN.js.map} +0 -0
  238. /package/dist/{chunk-DNXQVCIC.js.map → chunk-SUI75NTN.js.map} +0 -0
  239. /package/dist/{chunk-FDLPNFKE.js.map → chunk-T7R42MWB.js.map} +0 -0
  240. /package/dist/{chunk-J7BAJ6BF.js.map → chunk-UCCXPMTP.js.map} +0 -0
  241. /package/dist/{chunk-L4TYD52M.js.map → chunk-VZBKCRU7.js.map} +0 -0
  242. /package/dist/{chunk-T4MKFTJF.js.map → chunk-XHDS6HIX.js.map} +0 -0
  243. /package/dist/{chunk-TKWIUL3D.js.map → chunk-YDGQYG4L.js.map} +0 -0
  244. /package/dist/{chunk-4KUK3KGI.js.map → chunk-YJZDRM33.js.map} +0 -0
  245. /package/dist/{chunk-NU5JRN3A.js.map → chunk-ZDLVHGIC.js.map} +0 -0
  246. /package/dist/{chunk-OJXK5C6Z.js.map → chunk-ZG4GNPRE.js.map} +0 -0
  247. /package/dist/{chunk-IJKO5RVJ.js.map → chunk-ZNYDDZVW.js.map} +0 -0
  248. /package/dist/{first-start-migration-TCPK2I7J.js.map → first-start-migration-CCZ5SM3V.js.map} +0 -0
@@ -3,7 +3,7 @@ import {
3
3
  readNamespaceMaintenanceLastRanStatuses,
4
4
  readNamespaceMaintenanceStatuses,
5
5
  runNamespaceMaintenancePlan
6
- } from "./chunk-CIC3WZVO.js";
6
+ } from "./chunk-I233SAGS.js";
7
7
  import {
8
8
  analyzeSessionIntegrity,
9
9
  applySessionRepair,
@@ -14,7 +14,7 @@ import {
14
14
  } from "./chunk-CMTINOFS.js";
15
15
  import {
16
16
  summarizeCorpusAndReplica
17
- } from "./chunk-L4TYD52M.js";
17
+ } from "./chunk-VZBKCRU7.js";
18
18
  import {
19
19
  readJudgeVerdictStats
20
20
  } from "./chunk-OZKOPQCM.js";
@@ -27,17 +27,17 @@ import {
27
27
  } from "./chunk-JKMIGCK6.js";
28
28
  import {
29
29
  resolveCorpusNamespaceRoots
30
- } from "./chunk-CXGD3N2Y.js";
30
+ } from "./chunk-OVJAQWHO.js";
31
31
  import {
32
32
  listNamespaces
33
- } from "./chunk-5RWIZISF.js";
33
+ } from "./chunk-PSUSA5SM.js";
34
34
  import {
35
35
  runConsolidationProvenanceCheck
36
36
  } from "./chunk-TLRIRISJ.js";
37
37
  import {
38
38
  listMemoryGovernanceRuns,
39
39
  readMemoryGovernanceRunArtifact
40
- } from "./chunk-JK5YFQQT.js";
40
+ } from "./chunk-76KL37ON.js";
41
41
  import {
42
42
  resolveCuratedIncludeFilesStatePath,
43
43
  resolveNativeKnowledgeStatePath,
@@ -57,7 +57,7 @@ import {
57
57
  } from "./chunk-DURQZFVJ.js";
58
58
  import {
59
59
  StorageManager
60
- } from "./chunk-FBNR3JI5.js";
60
+ } from "./chunk-IMT7NTFV.js";
61
61
  import {
62
62
  lintWorkspaceFiles
63
63
  } from "./chunk-DM2T26WE.js";
@@ -1876,4 +1876,4 @@ export {
1876
1876
  runBenchmarkRecall,
1877
1877
  runOperatorRepair
1878
1878
  };
1879
- //# sourceMappingURL=chunk-N2PXVLV3.js.map
1879
+ //# sourceMappingURL=chunk-LANV6I63.js.map
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  StorageManager
3
- } from "./chunk-FBNR3JI5.js";
3
+ } from "./chunk-IMT7NTFV.js";
4
4
  import {
5
5
  countRecallTokenOverlap,
6
6
  normalizeRecallTokens
@@ -119,4 +119,4 @@ export {
119
119
  compareVerifiedSemanticRuleResults,
120
120
  searchVerifiedSemanticRules
121
121
  };
122
- //# sourceMappingURL=chunk-U7VEZ2XS.js.map
122
+ //# sourceMappingURL=chunk-LPYGM6RE.js.map
@@ -10,7 +10,7 @@ import {
10
10
  } from "./chunk-EKUI7I2X.js";
11
11
  import {
12
12
  StorageManager
13
- } from "./chunk-FBNR3JI5.js";
13
+ } from "./chunk-IMT7NTFV.js";
14
14
  import {
15
15
  normalizeEntityName
16
16
  } from "./chunk-YXZG5TVN.js";
@@ -974,4 +974,4 @@ export {
974
974
  resolveBriefingSaveDir,
975
975
  briefingFilename
976
976
  };
977
- //# sourceMappingURL=chunk-WCXWCAUC.js.map
977
+ //# sourceMappingURL=chunk-MDXZIU5X.js.map
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  StorageManager
3
- } from "./chunk-FBNR3JI5.js";
3
+ } from "./chunk-IMT7NTFV.js";
4
4
  import {
5
5
  composeMemoryEnvelope
6
6
  } from "./chunk-X26YOFGS.js";
@@ -546,4 +546,4 @@ export {
546
546
  setSemanticRulePromotionTestHooks,
547
547
  promoteSemanticRuleFromMemory
548
548
  };
549
- //# sourceMappingURL=chunk-VUC3DLQ5.js.map
549
+ //# sourceMappingURL=chunk-MOWLANEJ.js.map
@@ -1,7 +1,7 @@
1
1
  import {
2
2
  canonicalCategoryForAlias,
3
3
  categoryAliasCoercion
4
- } from "./chunk-QJBULLKG.js";
4
+ } from "./chunk-F2MVWUNF.js";
5
5
 
6
6
  // src/access-observe-write-category.ts
7
7
  function splitCanonicalWriteRequest(request) {
@@ -22,4 +22,4 @@ function splitCanonicalWriteRequest(request) {
22
22
  export {
23
23
  splitCanonicalWriteRequest
24
24
  };
25
- //# sourceMappingURL=chunk-IK7NPYYU.js.map
25
+ //# sourceMappingURL=chunk-NFQKIZK3.js.map
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  isGenericRecallExcludedPath
3
- } from "./chunk-6SROXED4.js";
3
+ } from "./chunk-GRX5BE73.js";
4
4
  import {
5
5
  normalizeProjectionPreview
6
6
  } from "./chunk-SCU65EZI.js";
@@ -209,4 +209,4 @@ export {
209
209
  browsePatternMatches,
210
210
  runMemoryBrowse
211
211
  };
212
- //# sourceMappingURL=chunk-RXAWE76Y.js.map
212
+ //# sourceMappingURL=chunk-O6QSBI3U.js.map
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  createSearchBackend
3
- } from "./chunk-2LXROA34.js";
3
+ } from "./chunk-AXSQGJSG.js";
4
4
  import {
5
5
  reportSearchDegradation
6
6
  } from "./chunk-FZF7JX76.js";
@@ -652,4 +652,4 @@ export {
652
652
  normalizeQmdResultPath,
653
653
  resolveNamespaceResultPath
654
654
  };
655
- //# sourceMappingURL=chunk-5RBHL5TF.js.map
655
+ //# sourceMappingURL=chunk-OA7YDB6A.js.map
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  listNamespaces
3
- } from "./chunk-5RWIZISF.js";
3
+ } from "./chunk-PSUSA5SM.js";
4
4
  import {
5
5
  corpusScanWorker
6
6
  } from "./chunk-4LZ7SVKM.js";
@@ -292,4 +292,4 @@ export {
292
292
  computeServiceCorpusWatermarks,
293
293
  computeServiceCorpusCensus
294
294
  };
295
- //# sourceMappingURL=chunk-CXGD3N2Y.js.map
295
+ //# sourceMappingURL=chunk-OVJAQWHO.js.map
@@ -2,18 +2,18 @@ import {
2
2
  ExtractionDrain,
3
3
  TurnIngestionCoordinator,
4
4
  shouldSkipImplicitExtraction
5
- } from "./chunk-TCSY74IN.js";
5
+ } from "./chunk-L2DYRQQH.js";
6
6
  import {
7
7
  headerConnector,
8
8
  renderExtractionConversation,
9
9
  resolveSourceConnector
10
- } from "./chunk-PY5XP7GR.js";
10
+ } from "./chunk-6TIQLG7I.js";
11
11
  import {
12
12
  SmartBuffer
13
- } from "./chunk-VFJ3PBZI.js";
13
+ } from "./chunk-FXDQO7VX.js";
14
14
  import {
15
15
  selfDeps
16
- } from "./chunk-FBNR3JI5.js";
16
+ } from "./chunk-IMT7NTFV.js";
17
17
  import {
18
18
  describeError,
19
19
  groupTurnsByExtractionScope
@@ -447,4 +447,4 @@ export {
447
447
  ClaimBufferStorage,
448
448
  BufferDrainRunner
449
449
  };
450
- //# sourceMappingURL=chunk-EWLOIHAZ.js.map
450
+ //# sourceMappingURL=chunk-P5FF44G3.js.map
@@ -1,9 +1,9 @@
1
1
  import {
2
2
  NamespaceStorageRouter
3
- } from "./chunk-H4HBQRGI.js";
3
+ } from "./chunk-KVM3BS5K.js";
4
4
  import {
5
5
  namespaceCollectionName
6
- } from "./chunk-5RBHL5TF.js";
6
+ } from "./chunk-OA7YDB6A.js";
7
7
  import {
8
8
  isSafeRouteNamespace
9
9
  } from "./chunk-PCXDUHQH.js";
@@ -213,4 +213,4 @@ export {
213
213
  verifyNamespaces,
214
214
  runNamespaceMigration
215
215
  };
216
- //# sourceMappingURL=chunk-5RWIZISF.js.map
216
+ //# sourceMappingURL=chunk-PSUSA5SM.js.map
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  OUTPUT_LANGUAGE_POLICY
3
- } from "./chunk-FE43YKNJ.js";
3
+ } from "./chunk-RBPC4XGU.js";
4
4
  import {
5
5
  normalizeProcedureSteps
6
6
  } from "./chunk-QDW3E4RD.js";
@@ -496,4 +496,4 @@ export {
496
496
  createVerdictCache,
497
497
  createDeferCountMap
498
498
  };
499
- //# sourceMappingURL=chunk-DYZDFOBX.js.map
499
+ //# sourceMappingURL=chunk-Q6S67LHR.js.map
@@ -3,7 +3,7 @@ import {
3
3
  } from "./chunk-5HFVWYHL.js";
4
4
  import {
5
5
  isGenericRecallExcludedPath
6
- } from "./chunk-6SROXED4.js";
6
+ } from "./chunk-GRX5BE73.js";
7
7
  import {
8
8
  planRecallMode
9
9
  } from "./chunk-CSAKJVXW.js";
@@ -132,4 +132,4 @@ async function findExpectedMemory(orchestrator, namespaces, expect) {
132
132
  export {
133
133
  runRecallWhy
134
134
  };
135
- //# sourceMappingURL=chunk-KYPFQO43.js.map
135
+ //# sourceMappingURL=chunk-QPD7EYGI.js.map
@@ -79,8 +79,34 @@ Span mode (numbered-message offsets):
79
79
  - Set "content" to the frame text (the short \u226415-word frame) \u2014 do not restate the full fact; the span plus frame carry it.`}
80
80
  - Invalid spans fall back to the frame, so keep the frame informative.`;
81
81
  }
82
- function buildExtractionInstructions(config, existingEntities, ambientCapture = false) {
82
+ var KNOWN_ENTITIES_PROMPT_BUDGET_CHARS = 2e3;
83
+ var KNOWN_ENTITIES_HEADING = "\nKNOWN ENTITIES (use these exact names when referencing existing things):\n";
84
+ var KNOWN_ENTITIES_TRAILER = "\n\nWhen you see something that matches a known entity, use THAT name exactly. Only create a NEW entity if nothing in this list represents it.\n";
85
+ var KNOWN_ENTITIES_FRAMING_CHARS = KNOWN_ENTITIES_HEADING.length + KNOWN_ENTITIES_TRAILER.length;
86
+ function selectKnownEntitiesForPrompt(entities, conversation, budgetChars = KNOWN_ENTITIES_PROMPT_BUDGET_CHARS) {
87
+ if (entities.length === 0) return [];
88
+ if (entities.join(", ").length + KNOWN_ENTITIES_FRAMING_CHARS <= budgetChars) return [...entities];
89
+ const fold = (value) => value.toLowerCase().replace(/[-_]+/g, " ");
90
+ const foldedConversation = fold(conversation);
91
+ const mentioned = [];
92
+ const rest = [];
93
+ for (const name of entities) {
94
+ (foldedConversation.includes(fold(name)) ? mentioned : rest).push(name);
95
+ }
96
+ const selected = [];
97
+ let used = 0;
98
+ for (const name of [...mentioned, ...rest]) {
99
+ const cost = (selected.length > 0 ? 2 : 0) + name.length;
100
+ if (cost > budgetChars - KNOWN_ENTITIES_FRAMING_CHARS) continue;
101
+ if (used + cost > budgetChars - KNOWN_ENTITIES_FRAMING_CHARS) break;
102
+ selected.push(name);
103
+ used += cost;
104
+ }
105
+ return selected;
106
+ }
107
+ function buildExtractionInstructions(config, existingEntities, ambientCapture = false, conversation = "") {
83
108
  const lifecycleCaps = resolveMemoryLifecycleCapabilities(config);
109
+ const knownEntities = selectKnownEntitiesForPrompt(existingEntities ?? [], conversation);
84
110
  return `You are a memory extraction system. Analyze the following conversation and extract durable, reusable memories.
85
111
 
86
112
  Memory categories:
@@ -137,12 +163,7 @@ Entity creation rules (STRICT):
137
163
  - Prefer attaching facts to broad parent entities rather than creating sub-entities. E.g., "acme-store uses Algolia for search" is a fact on entity "acme-store", NOT a new entity "acme-store-algolia-connector"
138
164
  - The entity list should be SHORT \u2014 think "things that would have their own Wikipedia page" not "things mentioned in passing"
139
165
 
140
- ${existingEntities && existingEntities.length > 0 ? `
141
- KNOWN ENTITIES (use these exact names when referencing existing things):
142
- ${existingEntities.join(", ")}
143
-
144
- When you see something that matches a known entity, use THAT name exactly. Only create a NEW entity if nothing in this list represents it.
145
- ` : ""}
166
+ ${knownEntities.length > 0 ? KNOWN_ENTITIES_HEADING + knownEntities.join(", ") + KNOWN_ENTITIES_TRAILER : ""}
146
167
  ${eventTimePromptInstruction(config)}${spanModePromptSection(config.extraction?.spanMode ?? "off")}
147
168
  Also extract relationships between entities mentioned in the conversation.
148
169
  - Format: {source: "entity-name", target: "entity-name", label: "relationship description"}
@@ -213,10 +234,12 @@ export {
213
234
  OUTPUT_LANGUAGE_POLICY,
214
235
  eventTimePromptInstruction,
215
236
  spanModePromptSection,
237
+ KNOWN_ENTITIES_PROMPT_BUDGET_CHARS,
238
+ selectKnownEntitiesForPrompt,
216
239
  buildExtractionInstructions,
217
240
  CONSOLIDATION_RESPONSE_SCHEMA,
218
241
  PROFILE_CONSOLIDATION_RESPONSE_SCHEMA,
219
242
  buildConsolidationSystemPrompt,
220
243
  buildProfileConsolidationSystemPrompt
221
244
  };
222
- //# sourceMappingURL=chunk-FE43YKNJ.js.map
245
+ //# sourceMappingURL=chunk-RBPC4XGU.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../src/extraction-prompt.ts"],"sourcesContent":["/**\n * Extraction prompt construction (issue #1995 sibling extraction).\n *\n * The system prompt, its JSON response shape, and the placeholder table\n * derived from that shape are prompt DATA, not engine behavior. They live here\n * so `extraction.ts` holds the pipeline and one module owns the text every\n * extraction path — local LLM, direct client, gateway fallback — sends.\n */\n\nimport { AMBIENT_CAPTURE_PROMPT_SECTION, AMBIENT_SPECULATIVE_TIER_CLAUSE } from \"./ambient-provenance.js\";\nimport { resolveMemoryLifecycleCapabilities, resolveRecallAuxiliaryCapabilities } from \"./capabilities.js\";\nimport type { PluginConfig } from \"./types.js\";\n\nexport const EXTRACTION_RESPONSE_SHAPE = `{\n \"facts\": [{\n \"category\": \"<category>\",\n \"content\": \"<source-grounded statement>\",\n \"confidence\": 0.0,\n \"tags\": [\"<tag>\"],\n \"entityRef\": \"<optional normalized-name>\",\n \"cueAnchors\": [{\"type\": \"<anchor-type>\", \"value\": \"<entity-or-topic plus key aspect>\"}],\n \"promptedByQuestion\": \"<optional source-grounded question>\",\n \"quote\": \"<optional exact contiguous source span>\",\n \"scope\": \"<optional project-or-global>\",\n \"subject\": \"<optional user-or-agent>\",\n \"structuredAttributes\": {\"<key>\": \"<value>\"},\n \"procedureSteps\": [{\"order\": 1, \"intent\": \"<step>\"}, {\"order\": 2, \"intent\": \"<step>\"}],\n \"reasoningTrace\": {\n \"steps\": [{\"order\": 1, \"description\": \"<step>\"}, {\"order\": 2, \"description\": \"<step>\"}],\n \"finalAnswer\": \"<answer>\",\n \"observedOutcome\": \"<optional outcome>\"\n },\n \"eventTime\": \"<optional source temporal expression>\"\n }],\n \"entities\": [{\n \"name\": \"<normalized-name>\",\n \"type\": \"<entity-type>\",\n \"facts\": [\"<source-grounded statement>\"],\n \"promptedByQuestion\": \"<optional source-grounded question>\",\n \"structuredSections\": [{\"key\": \"<section-key>\", \"title\": \"<section-title>\", \"facts\": [\"<source-grounded statement>\"]}]\n }],\n \"profileUpdates\": [\"<source-grounded profile update>\"],\n \"questions\": [{\"question\": \"<source-grounded unresolved question>\", \"context\": \"<source-grounded context>\", \"priority\": 0.0}],\n \"identityReflection\": \"<conversation-grounded agent reflection>\",\n \"episodeTitle\": \"<six-to-eight word conversation segment title>\",\n \"relationships\": [{\"source\": \"<normalized-name>\", \"target\": \"<normalized-name>\", \"label\": \"<source-grounded relationship>\"}]\n}`;\nexport function extractionResponseShape(spanMode: \"off\" | \"shadow\" | \"on\" = \"off\"): string {\n if (spanMode === \"off\") return EXTRACTION_RESPONSE_SHAPE;\n return EXTRACTION_RESPONSE_SHAPE.replace(\n `\"eventTime\": \"<optional source temporal expression>\"`,\n `\"eventTime\": \"<optional source temporal expression>\",\n \"span\": {\"sourceMessageIndex\": <message number>, \"charStart\": <number>, \"charEnd\": <number>, \"frame\": \"<at most 15 words>\"}`,\n );\n}\nexport const EXTRACTION_RESPONSE_PLACEHOLDERS: Record<string, true> = {};\nfor (const shape of [EXTRACTION_RESPONSE_SHAPE, extractionResponseShape(\"on\")]) {\n for (const placeholder of shape.match(/<[^<>\\r\\n]+>/g) ?? []) {\n EXTRACTION_RESPONSE_PLACEHOLDERS[placeholder] = true;\n }\n}\nexport const CUE_ANCHOR_PROMPT_INSTRUCTION = `- For each fact, emit at most 3 \"cueAnchors\".\n- Each cue anchor value must be a source-grounded search hook of at most 120 characters, in the form \"<main entity or topic> <key aspect>\".\n- Set each cue anchor type to entity, file, tool, outcome, constraint, or date.\n- Omit cue anchors when the conversation does not support a useful search hook.\n- Example: \"Alice booked Bistro Max for Mike's surprise party\" can use {\"type\":\"entity\",\"value\":\"Mike surprise party\"} and {\"type\":\"entity\",\"value\":\"Alice restaurant booking\"}.`;\n\n/**\n * Output-language policy (issue #2190). Every prompt that produces memory\n * content embeds this verbatim so non-English conversations are not silently\n * translated to English — translated memories fail later lexical recall.\n */\nexport const OUTPUT_LANGUAGE_POLICY = `Output language: write facts, profile updates, entity names and aliases, tags, questions, and any rewritten or merged memory content in the source language of the conversation or input memories. Never translate into English or another language unless the user explicitly asked for a translation.`;\n\n/**\n * Bi-temporal event-time extraction instruction (#1578 PR2). Emitted on\n * every extraction entry path when `temporal.biTemporal` is on so the LLM\n * emits an optional per-fact `eventTime` expression. The expression is\n * resolved against the source turn timestamp at write time — never\n * wall-clock — so replay/import of old transcripts anchors correctly.\n * Returns an empty string when the gate is off (byte-identical prompt).\n */\nexport function eventTimePromptInstruction(config: PluginConfig): string {\n if (!config.temporalBiTemporal) return \"\";\n return `\nWhen a fact states when it became or stopped being true, copy that explicit temporal expression verbatim into \"eventTime\". Omit \"eventTime\" when no such expression appears; never infer dates.`;\n}\n\n/**\n * Span-mode extraction instructions (issue #2333 Phase B). Empty when the\n * mode is off (byte-identical prompt). The offset convention mirrors the\n * Phase A bench: messages numbered in order from 0, offsets index the\n * message's own text (after the `[role] ` tag), [charStart, charEnd)\n * end-exclusive.\n */\nexport function spanModePromptSection(spanMode: \"off\" | \"shadow\" | \"on\"): string {\n if (spanMode === \"off\") return \"\";\n const requestBoth = spanMode === \"shadow\";\n return `\nSpan mode (numbered-message offsets):\n- Conversation messages are numbered in order starting at 0 (the \"[role] text\" blocks).\n- For each fact, return \"span\": {\"sourceMessageIndex\": <message number>, \"charStart\": <number>, \"charEnd\": <number>, \"frame\": \"<at most 15 words>\"} pointing at the verbatim supporting words in that message's text (the text after the \"] \"). Offsets are [charStart, charEnd), end-exclusive, counting from the first character of the message text.\n- \"frame\" is at most 15 generated words that make the span self-contained: resolve pronouns to names, name the subject (e.g., frame \"Maya's relocation:\" + span \"moved to Seattle last spring…\").${\n requestBoth\n ? `\n- This run is in SHADOW mode: ALSO include the full standalone \"content\" restatement exactly as you would normally write it, in addition to \"span\".`\n : `\n- Set \"content\" to the frame text (the short ≤15-word frame) — do not restate the full fact; the span plus frame carry it.`\n }\n- Invalid spans fall back to the frame, so keep the frame informative.`;\n}\n\n/**\n * Char budget for the KNOWN ENTITIES block on gateway/direct extraction\n * prompts. Mature stores hold thousands of entities; the unbounded list ran\n * to ~200k chars on one production store — wider than the model's context —\n * so the carry-forward is capped, keeping conversation-mentioned names first.\n */\nexport const KNOWN_ENTITIES_PROMPT_BUDGET_CHARS = 2000;\n\n/** The rendered KNOWN ENTITIES block's fixed framing, kept in one place so\n * the selector's budget reserve matches the render exactly. */\nconst KNOWN_ENTITIES_HEADING =\n \"\\nKNOWN ENTITIES (use these exact names when referencing existing things):\\n\";\nconst KNOWN_ENTITIES_TRAILER =\n \"\\n\\nWhen you see something that matches a known entity, use THAT name exactly. Only create a NEW entity if nothing in this list represents it.\\n\";\nconst KNOWN_ENTITIES_FRAMING_CHARS =\n KNOWN_ENTITIES_HEADING.length + KNOWN_ENTITIES_TRAILER.length;\n\n/**\n * Select the entity names worth carrying into an extraction prompt: every\n * name the conversation mentions (hyphen/space/case-folded match), then the\n * remaining names in store order until the char budget is spent. Names the\n * conversation does not touch cannot be referenced by this extraction, so\n * dropping them past the budget never loses a canonical-name hint.\n */\nexport function selectKnownEntitiesForPrompt(\n entities: readonly string[],\n conversation: string,\n budgetChars = KNOWN_ENTITIES_PROMPT_BUDGET_CHARS,\n): string[] {\n if (entities.length === 0) return [];\n if (entities.join(\", \").length + KNOWN_ENTITIES_FRAMING_CHARS <= budgetChars) return [...entities];\n const fold = (value: string): string => value.toLowerCase().replace(/[-_]+/g, \" \");\n const foldedConversation = fold(conversation);\n const mentioned: string[] = [];\n const rest: string[] = [];\n for (const name of entities) {\n (foldedConversation.includes(fold(name)) ? mentioned : rest).push(name);\n }\n const selected: string[] = [];\n let used = 0;\n for (const name of [...mentioned, ...rest]) {\n const cost = (selected.length > 0 ? 2 : 0) + name.length;\n // Skip a single oversized name instead of aborting the fill — smaller\n // names behind it still deserve the budget.\n if (cost > budgetChars - KNOWN_ENTITIES_FRAMING_CHARS) continue;\n if (used + cost > budgetChars - KNOWN_ENTITIES_FRAMING_CHARS) break;\n selected.push(name);\n used += cost;\n }\n return selected;\n}\n\n/**\n * Build extraction instructions shared between local and cloud LLM.\n *\n * `ambientCapture` marks input from an always-on recorder, which may carry\n * speech the user never authored (issue #2294). `conversation` ranks the\n * KNOWN ENTITIES carry-forward mention-first under the char budget; callers\n * that omit it keep store order under the same budget.\n */\nexport function buildExtractionInstructions(\n config: PluginConfig,\n existingEntities?: string[],\n ambientCapture = false,\n conversation = \"\"\n): string {\n const lifecycleCaps = resolveMemoryLifecycleCapabilities(config);\n const knownEntities = selectKnownEntitiesForPrompt(existingEntities ?? [], conversation);\n return `You are a memory extraction system. Analyze the following conversation and extract durable, reusable memories.\n\nMemory categories:\n- fact: Objective information about the world\n- preference: User likes, dislikes, or stylistic choices\n- correction: User correcting a mistake or misconception (highest priority)\n- entity: Information about a specific person, project, tool, or company\n- decision: A choice that was made with rationale\n- relationship: How two entities relate to each other (e.g., \"Alice is Bob's manager\", \"Acme Corp uses Shopify\")\n- principle: Durable rules, values, or operating beliefs (e.g., \"never use Chat Completions API\")\n- commitment: Promises, obligations, or deadlines (e.g., \"deploy by Friday\", \"call accountant Monday\")\n- moment: Emotionally significant events or milestones (e.g., \"first successful deployment of engram\")\n- skill: Capabilities the user or agent has demonstrated (e.g., \"user is proficient with Kubernetes\")${\n resolveRecallAuxiliaryCapabilities(config).causalRuleExtraction\n ? `\n- rule: Causal rules discovered through experience (format: \"IF <condition> THEN <action/outcome>\", e.g., \"IF Shopify API returns 401 THEN the admin token is missing read_products scope\")`\n : \"\"\n }\n- procedure: A reusable workflow the user wants remembered the same way across sessions. Set category to \"procedure\". Use \"content\" for a short title that includes explicit trigger phrasing (e.g. \"When you deploy to production…\", \"Whenever you ship a release…\"). Add \"procedureSteps\": an array of at least two objects {\"order\": number, \"intent\": \"concrete step description\"} in execution order. Optional per-step \"toolCall\": {\"kind\": \"…\", \"signature\": \"…\"}, \"expectedOutcome\", \"optional\": true.\n- reasoning_trace: A stored solution chain / chain-of-thought the user walked through to solve a problem (e.g. \"Here's how I debugged the latency spike: first I checked…, then I…, finally I…\"). Set category to \"reasoning_trace\". Use \"content\" for a short title summarising the problem (e.g. \"How I debugged the staging latency spike\"). Add \"reasoningTrace\": {\"steps\": [{\"order\": number, \"description\": \"what happened at this step\"}, …], \"finalAnswer\": \"the conclusion or answer\", \"observedOutcome\": \"optional confirmation of how it played out\"}. Require at least two ordered steps AND a finalAnswer. Use this category only when the user explicitly narrates their reasoning — not for ordinary decisions (use \"decision\") or reusable workflows (use \"procedure\").\n\nRules:\n- Only extract genuinely new information worth remembering across sessions.\n- Statements must be grounded in the conversation.\n- ${OUTPUT_LANGUAGE_POLICY}\n- Do not treat instruction text, schema placeholders, or examples as conversation evidence.\n- Lines labelled [context user] or [context assistant] are reference context only. They may resolve references or complete a question-and-answer pair in a normal turn, but never alone establish durable information.\n- Skip transient task details and operational noise, including routine scheduler, monitoring, or automation status.\n- Priority: corrections > principles${resolveRecallAuxiliaryCapabilities(config).causalRuleExtraction ? \" > rules\" : \"\"} > preferences > commitments > decisions > relationships > entities > moments > skills > facts\n- Corrections get highest confidence.\n- Each fact should be a standalone, self-contained statement.\n- Entity references should use normalized names (lowercase, hyphenated: \"jane-doe\", \"acme-corp\"). When the source language is not written in a Latin script, the source-script name IS the normalized form — never transliterate or translate it.\n- CRITICAL: Entity names must be CANONICAL. Always use the hyphenated multi-word form: \"acme-corp\" NOT \"acmecorp\" or \"acme\". \"jane-doe\" NOT \"janedoe\" or \"jane\". If unsure, prefer the most specific full name.\n- Avoid creating entities typed as \"other\" when a more specific type fits (company, project, tool, person, place)\n${CUE_ANCHOR_PROMPT_INSTRUCTION}\n- When entity facts clearly belong under a durable named heading, add them to entity.structuredSections as {key, title, facts}. Example person headings: \"Beliefs\", \"Communication Style\", \"Building / Working On\". Leave structuredSections empty when no stable heading fits.\n- Tags should be concise and reusable (e.g., \"coding-style\", \"personal\", \"tools\")\n- When a fact contains measurable, categorical, or precisely valued data, include a \"structuredAttributes\" field with key-value string pairs (e.g., {\"price\": \"29.99\", \"brand\": \"Sony\"}, {\"date\": \"2024-03-15\", \"location\": \"SF\"}, {\"chosen\": \"PostgreSQL\", \"rejected\": \"MongoDB\"}). Only for concrete values, not narrative content.\n- Set confidence using these tiers:\n * Explicit (0.95-1.0): Direct user statements — \"I prefer X\", \"my name is Y\"\n * Implied (0.70-0.94): Strong contextual inference — user consistently does X, clear from conversation flow\n * Inferred (0.40-0.69): Pattern recognition — reasonable guess from limited evidence\n * Speculative (0.00-0.39): Tentative hypothesis — weak signal, needs future confirmation. Speculative memories auto-expire after 30 days if not confirmed.${ambientCapture ? AMBIENT_SPECULATIVE_TIER_CLAUSE : \"\"}${\n config.provenance?.enabled\n ? `\n- Source quotes: For each fact, include a \"quote\" field containing the EXACT verbatim words from the conversation that support the fact. Copy a contiguous span from a single speaker turn (not a paraphrase, not a summary). Cap at ~300 characters. This grounds every memory in the literal utterance that created it.`\n : \"\"\n }\n- For commitments: include any deadline or timeframe mentioned${\n lifecycleCaps.extractionScopeClassification\n ? `\n\nScope classification:\nFor each fact, set \"scope\" to one of:\n- \"global\" — knowledge that applies across projects: core framework/library bugs, API behavior patterns, user preferences (editor, language, style), general coding patterns, infrastructure knowledge, technology facts not tied to one codebase\n- \"project\" — knowledge specific to one codebase: file paths, environment configs, deployment details, project-specific workarounds, team/stakeholder info tied to one project, repo-specific conventions. Tool, command, or CLI-flag instructions TIED TO ONE AGENT are also \"project\", because the same tool name means different things in different agent integrations (a \"search\" tool may search repository code in one agent and the web in another); when keeping such an agent-tied instruction, the fact text MUST name the originating agent as a leading \"In <agent>,\" clause (e.g. \"In Pi, use the search tool with a repository path.\"). A tool/command fact that holds in every agent and every repo is NOT agent-tied — leave it \"global\" and do not add a qualifier (e.g. \"\\`git status --short\\` emits compact output\"). Examples: \"In Pi, the search tool takes a repository path\" -> \"project\"; \"\\`git status --short\\` emits compact output\" -> \"global\".\nWhen in doubt, prefer \"project\" — it is safer to keep knowledge scoped narrowly.`\n : \"\"\n }\n${\n ambientCapture\n ? `${AMBIENT_CAPTURE_PROMPT_SECTION}\n`\n : \"\"\n}\nEntity creation rules (STRICT):\n- Only create entities for DURABLE things: real people, companies, products, tools, ongoing projects\n- NEVER create entities for transient items: individual PRs, branches, Jira tickets, meetings, agent task IDs, log files, database tables, cron job runs, sessions\n- When you learn something about a transient item (e.g., PR #58 fixed a bug), store it as a FACT with an entityRef to the parent project — do NOT create an entity for the PR itself\n- Prefer attaching facts to broad parent entities rather than creating sub-entities. E.g., \"acme-store uses Algolia for search\" is a fact on entity \"acme-store\", NOT a new entity \"acme-store-algolia-connector\"\n- The entity list should be SHORT — think \"things that would have their own Wikipedia page\" not \"things mentioned in passing\"\n\n${\n knownEntities.length > 0\n ? KNOWN_ENTITIES_HEADING + knownEntities.join(\", \") + KNOWN_ENTITIES_TRAILER\n : \"\"\n}\n${eventTimePromptInstruction(config)}${spanModePromptSection(config.extraction?.spanMode ?? \"off\")}\nAlso extract relationships between entities mentioned in the conversation.\n- Format: {source: \"entity-name\", target: \"entity-name\", label: \"relationship description\"}\n- Max 5 relationships per extraction\n- Only include clear, durable relationships (e.g., \"works at\", \"created\", \"manages\", \"uses\")\n- Use normalized entity names (e.g., \"person-jane-doe\", \"company-acme-corp\")\n\n\nAlso emit \"episodeTitle\" as a six-to-eight word title for this conversation segment.\nQuestions are optional. Include only source-grounded unresolved questions that would be useful in future sessions; otherwise return an empty array.\n\nFinally, write a brief identity reflection about the agent who had this conversation, based only on the conversation. Do not write about the extraction process.`;\n}\n\nexport const CONSOLIDATION_RESPONSE_SCHEMA = `{\n \"items\": [\n {\n \"existingId\": \"id\",\n \"action\": \"ADD\",\n \"mergeWith\": \"optional-existing-id\",\n \"updatedContent\": \"optional replacement content\",\n \"reason\": \"brief reason for this action\"\n }\n ],\n \"profileUpdates\": [\"optional profile update\"],\n \"entityUpdates\": [{\"name\": \"person-jane-doe\", \"type\": \"person\", \"facts\": [\"Now leads the backend team\", \"Recently migrated the user service to TypeScript\"]}]\n}`;\n\nexport const PROFILE_CONSOLIDATION_RESPONSE_SCHEMA = `{\n \"consolidatedProfile\": \"# Behavioral Profile\\\\n\\\\n... (complete markdown)\",\n \"removedCount\": 42,\n \"summary\": \"brief summary of what was consolidated\"\n}`;\n\n/**\n * System prompt shared by every consolidation path (gateway, direct client,\n * local LLM). Owns the causal-rule clause and the output-language policy so\n * the three paths cannot drift (issue #2190).\n */\nexport function buildConsolidationSystemPrompt(config: PluginConfig): string {\n return `You are a memory consolidation system. Compare new memories against existing ones and decide what to do with each.\n\nActions:\n- ADD: Keep the new memory as-is (no duplicate exists)\n- MERGE: Combine with an existing memory (provide mergeWith ID and updated content)\n- UPDATE: Replace existing memory content (provide updated content)\n- INVALIDATE: Remove existing memory (it's been superseded or is wrong)\n- SKIP: This new memory is redundant (exact duplicate or subset of existing)\n\nAlso:\n- Suggest profile updates based on patterns across memories\n- Identify entity updates for entity tracking${resolveRecallAuxiliaryCapabilities(config).causalRuleExtraction ? `\n- When merging or updating memories, look for IF→THEN causal patterns. If a memory describes \"X failed/succeeded because Y\" or \"doing X led to Y\", rewrite its content to make the causal rule explicit in the form \"IF <condition> THEN <action/outcome>\".` : \"\"}\n- ${OUTPUT_LANGUAGE_POLICY}`;\n}\n\n/**\n * System prompt shared by every profile-consolidation path (gateway, direct\n * client, local LLM). Owns the output-language policy (issue #2190).\n */\nexport function buildProfileConsolidationSystemPrompt(targetLines: number): string {\n return `You are a profile consolidation system. You are given a behavioral profile (markdown) that has grown too large. Your job is to produce a CONSOLIDATED version that:\n\n1. PRESERVES all ## section headers and their structure\n2. MERGES duplicate or near-duplicate bullet points into single, clear statements\n3. REMOVES stale information that has been superseded by newer bullets\n4. REMOVES trivial or overly specific operational details that won't be useful across sessions\n5. KEEPS the most important, durable observations about the user's preferences, habits, identity, and working style\n6. Target roughly ${targetLines} lines — this is a soft target, prioritize quality over length\n7. Write in the same style as the existing profile — concise bullets, no fluff\n8. ${OUTPUT_LANGUAGE_POLICY}\n\nThe output should be the COMPLETE consolidated profile as valid markdown, starting with \"# Behavioral Profile\".`;\n}\n"],"mappings":"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","names":[]}
@@ -14,7 +14,7 @@ import {
14
14
  } from "./chunk-TSUSHXBW.js";
15
15
  import {
16
16
  iterateOfflineSyncSnapshotFileRecords
17
- } from "./chunk-DNXQVCIC.js";
17
+ } from "./chunk-SUI75NTN.js";
18
18
 
19
19
  // src/access-offline-manifest.ts
20
20
  import * as nodePath from "path";
@@ -250,4 +250,4 @@ export {
250
250
  retainExcludedClassifications,
251
251
  createOfflineSyncManifestStream
252
252
  };
253
- //# sourceMappingURL=chunk-G6V32Q4F.js.map
253
+ //# sourceMappingURL=chunk-SFWQZBPN.js.map
@@ -12,7 +12,7 @@ import {
12
12
  import {
13
13
  applyChangesetEmbeddingGenerations,
14
14
  normalizeChangesetGenerations
15
- } from "./chunk-T4MKFTJF.js";
15
+ } from "./chunk-XHDS6HIX.js";
16
16
  import {
17
17
  advanceEmbeddingGenerationMarker,
18
18
  applyIncomingEmbeddingGenerations,
@@ -22,7 +22,12 @@ import {
22
22
  embeddingGenerationMembership,
23
23
  isEmbeddingGenerationDirPath,
24
24
  isPathInOmittedEmbeddingGeneration
25
- } from "./chunk-R3UQIS3F.js";
25
+ } from "./chunk-5AFBFAFX.js";
26
+ import {
27
+ isCanonicalRuntimeStatePath,
28
+ shouldDeleteAbsentIncomingOfflineRuntimeFile,
29
+ shouldPreferIncomingOfflineRuntimeFile
30
+ } from "./chunk-LDWE7OZS.js";
26
31
  import {
27
32
  isEmbeddingGenerationMarkerPath,
28
33
  matchesOfflineSyncDefaultExclude
@@ -48,11 +53,6 @@ import {
48
53
  sha256Bytes,
49
54
  validateArchiveRelativePath
50
55
  } from "./chunk-GCGJW34D.js";
51
- import {
52
- isCanonicalRuntimeStatePath,
53
- shouldDeleteAbsentIncomingOfflineRuntimeFile,
54
- shouldPreferIncomingOfflineRuntimeFile
55
- } from "./chunk-LDWE7OZS.js";
56
56
  import {
57
57
  withEmbeddingGenerationLock,
58
58
  withEmbeddingGenerationLockIter
@@ -1847,4 +1847,4 @@ export {
1847
1847
  normalizeOfflineSyncState,
1848
1848
  fileStatesFromSnapshot
1849
1849
  };
1850
- //# sourceMappingURL=chunk-DNXQVCIC.js.map
1850
+ //# sourceMappingURL=chunk-SUI75NTN.js.map
@@ -10,7 +10,7 @@ import {
10
10
  } from "./chunk-YVUNHNB6.js";
11
11
  import {
12
12
  parseQmdExplain
13
- } from "./chunk-ZNHLUYIT.js";
13
+ } from "./chunk-D7HOJFDS.js";
14
14
  import {
15
15
  parseFlexibleIsoTimestamp
16
16
  } from "./chunk-P7FMDTKL.js";
@@ -645,4 +645,4 @@ export {
645
645
  appendMemoryToGraphContext,
646
646
  resolvePersistedMemoryRelativePath
647
647
  };
648
- //# sourceMappingURL=chunk-FDLPNFKE.js.map
648
+ //# sourceMappingURL=chunk-T7R42MWB.js.map
@@ -0,0 +1,13 @@
1
+ // src/extraction-entities-source.ts
2
+ function memoizeExistingEntities(source) {
3
+ if (Array.isArray(source)) {
4
+ return () => Promise.resolve(source);
5
+ }
6
+ let resolved;
7
+ return () => resolved ??= source?.() ?? Promise.resolve([]);
8
+ }
9
+
10
+ export {
11
+ memoizeExistingEntities
12
+ };
13
+ //# sourceMappingURL=chunk-TK6EBBKG.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../src/extraction-entities-source.ts"],"sourcesContent":["/**\n * The entity carry-forward handed to `ExtractionEngine.extract`: either a\n * ready list or a thunk that lists it on demand. Only the gateway/direct\n * prompt paths read it, so local-first callers pass a thunk and never pay\n * the entity-store listing on the hot path. Extracted to a sibling module\n * per the size-ratchet rule (issue #1995).\n */\nexport type ExistingEntitiesSource = string[] | (() => Promise<string[]>);\n\n/** Thunk resolving at most once; array sources resolve to themselves. */\nexport function memoizeExistingEntities(\n source: ExistingEntitiesSource | undefined,\n): () => Promise<string[]> {\n if (Array.isArray(source)) {\n return () => Promise.resolve(source);\n }\n let resolved: Promise<string[]> | undefined;\n return () => (resolved ??= source?.() ?? Promise.resolve([]));\n}\n"],"mappings":";AAUO,SAAS,wBACd,QACyB;AACzB,MAAI,MAAM,QAAQ,MAAM,GAAG;AACzB,WAAO,MAAM,QAAQ,QAAQ,MAAM;AAAA,EACrC;AACA,MAAI;AACJ,SAAO,MAAO,aAAa,SAAS,KAAK,QAAQ,QAAQ,CAAC,CAAC;AAC7D;","names":[]}
@@ -2,7 +2,7 @@ import {
2
2
  WHO_KNOWS_DEFAULT_LIMIT,
3
3
  WHO_KNOWS_MAX_LIMIT,
4
4
  validateWhoKnowsInput
5
- } from "./chunk-L7MVHAMS.js";
5
+ } from "./chunk-7EPEZYX3.js";
6
6
 
7
7
  // src/who-knows-cli.ts
8
8
  function extractWhoKnowsRawArgs(rest) {
@@ -74,4 +74,4 @@ export {
74
74
  renderWhoKnowsText,
75
75
  renderWhoKnows
76
76
  };
77
- //# sourceMappingURL=chunk-J7BAJ6BF.js.map
77
+ //# sourceMappingURL=chunk-UCCXPMTP.js.map
@@ -1,7 +1,10 @@
1
1
  import {
2
2
  raceRecallAbort,
3
3
  throwIfRecallAborted
4
- } from "./chunk-FDLPNFKE.js";
4
+ } from "./chunk-T7R42MWB.js";
5
+ import {
6
+ memoizeExistingEntities
7
+ } from "./chunk-TK6EBBKG.js";
5
8
  import {
6
9
  emitExtractionLlmFailureError,
7
10
  recordExtractionLlmFailure,
@@ -268,11 +271,13 @@ async function extractChunkedExtraction(engine, config, turns, existingEntities,
268
271
  entities: [],
269
272
  questions: []
270
273
  };
271
- const entityNames = [...existingEntities];
274
+ const foundNames = [];
275
+ const baseEntities = memoizeExistingEntities(existingEntities);
276
+ const carryForward = async () => [...await baseEntities(), ...foundNames];
272
277
  let skippedReason;
273
278
  let providerCalls = 0;
274
279
  for (const chunk of chunks) {
275
- const part = await engine.extract(chunk, entityNames, signal);
280
+ const part = await engine.extract(chunk, carryForward, signal);
276
281
  if (part.extractionFailure) return part;
277
282
  if (part.extractionSkippedReason) {
278
283
  skippedReason ??= part.extractionSkippedReason;
@@ -288,7 +293,7 @@ async function extractChunkedExtraction(engine, config, turns, existingEntities,
288
293
  }
289
294
  merged.identityReflection ??= part.identityReflection;
290
295
  merged.episodeTitle ??= part.episodeTitle;
291
- entityNames.push(...part.entities.map((entity) => entity.name));
296
+ foundNames.push(...part.entities.map((entity) => entity.name));
292
297
  }
293
298
  if (resolveMemoryLifecycleCapabilities(config).extractionScopeClassification) {
294
299
  merged.sourceConnector = deriveSourceConnector(turns);
@@ -958,10 +963,9 @@ ${normalized}`).digest("hex");
958
963
  }
959
964
  }
960
965
  try {
961
- const existingEntities = await runDeadlineAware(
962
- () => storage.listEntityNames(),
963
- "during_list_entity_names"
964
- );
966
+ let entityNamesPromise;
967
+ const existingEntities = () => entityNamesPromise ??= runDeadlineAware(() => storage.listEntityNames(), "during_list_entity_names", false);
968
+ if (extractionProbeOwned) await existingEntities();
965
969
  let result;
966
970
  const probe = startProbeDeadline(extractionProbeOwned, extractionAbortSignal, this.deps.halfOpenProbeTimeoutMs);
967
971
  const engine = this.deps.getExtraction();
@@ -1242,4 +1246,4 @@ export {
1242
1246
  ExtractionDeadlineError,
1243
1247
  ExtractionRunCoordinator
1244
1248
  };
1245
- //# sourceMappingURL=chunk-PDXO4LIH.js.map
1249
+ //# sourceMappingURL=chunk-UWKHLWUE.js.map