@remnic/core 9.45.3 → 9.45.4

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 (747) hide show
  1. package/dist/abort-error.d.ts +2 -1
  2. package/dist/abort-error.js +3 -1
  3. package/dist/access-admin-ops-surface.d.ts +14 -10
  4. package/dist/access-admin-ops-surface.js +84 -76
  5. package/dist/access-audit.js +2 -2
  6. package/dist/access-authorization-probe.d.ts +14 -10
  7. package/dist/access-authorization-probe.js +85 -77
  8. package/dist/access-boundary.d.ts +15 -11
  9. package/dist/access-boundary.js +84 -76
  10. package/dist/access-citation-namespace.js +2 -2
  11. package/dist/access-cli.js +193 -181
  12. package/dist/access-cli.js.map +1 -1
  13. package/dist/access-coding-context-resolution.d.ts +16 -0
  14. package/dist/access-coding-context-resolution.js +13 -0
  15. package/dist/access-coding-context-resolution.js.map +1 -0
  16. package/dist/access-extraction-force-flush.d.ts +14 -10
  17. package/dist/access-extraction-force-flush.js +84 -76
  18. package/dist/access-health-types.d.ts +2 -1
  19. package/dist/access-http-lcm-compaction.d.ts +16 -12
  20. package/dist/access-http-lcm-compaction.js +3 -3
  21. package/dist/access-http-lifecycle-flush.d.ts +14 -10
  22. package/dist/access-http-lifecycle-flush.js +2 -2
  23. package/dist/access-http-offline-stream.d.ts +123 -0
  24. package/dist/access-http-offline-stream.js +10 -0
  25. package/dist/access-http-offline-stream.js.map +1 -0
  26. package/dist/access-http-query.js +84 -76
  27. package/dist/access-http.d.ts +15 -10
  28. package/dist/access-http.js +105 -92
  29. package/dist/access-identity-continuity-surface.d.ts +9 -8
  30. package/dist/access-identity-continuity-surface.js +84 -76
  31. package/dist/access-lcm-surface.d.ts +14 -10
  32. package/dist/access-lcm-surface.js +84 -76
  33. package/dist/access-mcp-output-schemas.js +1 -1
  34. package/dist/access-mcp.d.ts +14 -10
  35. package/dist/access-mcp.js +95 -83
  36. package/dist/access-memory-search-fanout.d.ts +3 -2
  37. package/dist/{access-namespace-preflight-5yZ4g6F8.d.ts → access-namespace-preflight-CWUDwB4M.d.ts} +1 -1
  38. package/dist/access-namespace-preflight.d.ts +4 -3
  39. package/dist/access-namespace-preflight.js +84 -76
  40. package/dist/access-observe-helpers.d.ts +1 -0
  41. package/dist/access-observe-helpers.js +1 -1
  42. package/dist/access-observe-write-surface.d.ts +16 -10
  43. package/dist/access-observe-write-surface.js +84 -76
  44. package/dist/access-offline-manifest.d.ts +104 -0
  45. package/dist/access-offline-manifest.js +45 -0
  46. package/dist/access-offline-manifest.js.map +1 -0
  47. package/dist/access-operations-batch.js +86 -78
  48. package/dist/access-operations.d.ts +15 -11
  49. package/dist/access-operations.js +91 -80
  50. package/dist/access-recall-concurrency.d.ts +16 -26
  51. package/dist/access-recall-concurrency.js +86 -77
  52. package/dist/access-recall-response.d.ts +18 -14
  53. package/dist/access-recall-response.js +84 -76
  54. package/dist/access-recall-surface.d.ts +29 -24
  55. package/dist/access-recall-surface.js +84 -76
  56. package/dist/access-schema.js +3 -3
  57. package/dist/{access-service-CiJRsgAB.d.ts → access-service-CsU-ljFD.d.ts} +25 -16
  58. package/dist/access-service-helpers.d.ts +14 -10
  59. package/dist/access-service.d.ts +14 -10
  60. package/dist/access-service.js +84 -76
  61. package/dist/access-surface-catalog.d.ts +14 -10
  62. package/dist/access-surface-catalog.js +4 -0
  63. package/dist/access-surface-catalog.js.map +1 -1
  64. package/dist/access-wearables-meetings-surface.d.ts +4 -3
  65. package/dist/action-confidence.d.ts +2 -1
  66. package/dist/active-memory-bridge.d.ts +2 -1
  67. package/dist/active-recall.d.ts +2 -1
  68. package/dist/active-recall.js +10 -8
  69. package/dist/active-recall.js.map +1 -1
  70. package/dist/adapters/index.js +7 -7
  71. package/dist/adapters/registry.js +3 -3
  72. package/dist/{auto-sync-5OE5QOZB.js → auto-sync-UPTUVE4X.js} +6 -6
  73. package/dist/behavior-learner.d.ts +2 -1
  74. package/dist/behavior-learner.js +1 -1
  75. package/dist/behavior-signals.d.ts +2 -1
  76. package/dist/bootstrap.d.ts +9 -8
  77. package/dist/briefing.d.ts +3 -2
  78. package/dist/briefing.js +23 -22
  79. package/dist/buffer-surprise-report.d.ts +2 -1
  80. package/dist/buffer-turn-helpers.d.ts +2 -1
  81. package/dist/buffer.d.ts +3 -2
  82. package/dist/buffer.js +12 -11
  83. package/dist/bulk-import/index.d.ts +4 -3
  84. package/dist/calibration.d.ts +2 -1
  85. package/dist/capabilities.d.ts +2 -1
  86. package/dist/{capsule-merge-IDWJPCWK.js → capsule-merge-Q6AR3XL7.js} +67 -54
  87. package/dist/capsule-merge-Q6AR3XL7.js.map +1 -0
  88. package/dist/{catalog-scBmy0sO.d.ts → catalog-bctMURhN.d.ts} +1 -1
  89. package/dist/causal-behavior.d.ts +2 -1
  90. package/dist/causal-behavior.js +2 -2
  91. package/dist/causal-chain.js +2 -2
  92. package/dist/causal-consolidation.d.ts +2 -1
  93. package/dist/causal-consolidation.js +27 -26
  94. package/dist/causal-consolidation.js.map +1 -1
  95. package/dist/causal-retrieval.js +2 -2
  96. package/dist/causal-trajectory-graph.d.ts +2 -1
  97. package/dist/causal-trajectory.js +1 -1
  98. package/dist/{chunk-VUPTKTDV.js → chunk-2MRHJNWL.js} +3 -3
  99. package/dist/{chunk-JBPKEARU.js → chunk-2QSZNTDO.js} +7 -7
  100. package/dist/{chunk-5IVLTFOV.js → chunk-44N6ESJ4.js} +2 -2
  101. package/dist/{chunk-WOCNN776.js → chunk-4POAMKV6.js} +100 -41
  102. package/dist/chunk-4POAMKV6.js.map +1 -0
  103. package/dist/{chunk-HO3QBJEY.js → chunk-5546W5SI.js} +2 -2
  104. package/dist/{chunk-U7GW7NE7.js → chunk-5CEECY6P.js} +10 -10
  105. package/dist/{chunk-4UH4BTGK.js → chunk-5SNZSWWR.js} +82 -82
  106. package/dist/{chunk-6CZPDBJS.js → chunk-5U7ID3EZ.js} +3 -3
  107. package/dist/{chunk-GF22HWS2.js → chunk-6NNNURLK.js} +7 -7
  108. package/dist/chunk-773TRRGT.js +36 -0
  109. package/dist/chunk-773TRRGT.js.map +1 -0
  110. package/dist/chunk-7CITSYSH.js +242 -0
  111. package/dist/chunk-7CITSYSH.js.map +1 -0
  112. package/dist/{chunk-227UFSEQ.js → chunk-7RZJWZ46.js} +5 -5
  113. package/dist/{chunk-E5UK4VPE.js → chunk-7SHJHPTY.js} +5 -5
  114. package/dist/{chunk-UVIKWC7M.js → chunk-7YERSTN7.js} +17 -17
  115. package/dist/{chunk-DLVPUX7U.js → chunk-7YKVM5H3.js} +8 -6
  116. package/dist/chunk-7YKVM5H3.js.map +1 -0
  117. package/dist/{chunk-3CE77VAP.js → chunk-A4JMGKCD.js} +87 -74
  118. package/dist/chunk-A4JMGKCD.js.map +1 -0
  119. package/dist/chunk-A5KNZSNA.js +26 -0
  120. package/dist/chunk-A5KNZSNA.js.map +1 -0
  121. package/dist/{chunk-S2NCTZGJ.js → chunk-AJQ57VV3.js} +15 -15
  122. package/dist/chunk-AJQ57VV3.js.map +1 -0
  123. package/dist/{chunk-CUM2BBPN.js → chunk-AUMWZSE7.js} +19 -10
  124. package/dist/chunk-AUMWZSE7.js.map +1 -0
  125. package/dist/{chunk-XYTOI63Z.js → chunk-BGHFOD5A.js} +19 -11
  126. package/dist/chunk-BGHFOD5A.js.map +1 -0
  127. package/dist/{chunk-BUE5E2HL.js → chunk-BGLY7EEM.js} +5 -314
  128. package/dist/chunk-BGLY7EEM.js.map +1 -0
  129. package/dist/chunk-BIPBQQFI.js +44 -0
  130. package/dist/chunk-BIPBQQFI.js.map +1 -0
  131. package/dist/{chunk-S5SLVSVY.js → chunk-BQIFZ2MP.js} +5 -5
  132. package/dist/chunk-BTTPKDIL.js +34 -0
  133. package/dist/{chunk-PVGDJXVK.js.map → chunk-BTTPKDIL.js.map} +1 -1
  134. package/dist/{chunk-E53DSZEN.js → chunk-C26TE27X.js} +3 -3
  135. package/dist/{chunk-LZ4LDKHZ.js → chunk-CLB32OHM.js} +6 -6
  136. package/dist/{chunk-Q6IP2ARR.js → chunk-CSOYVTRX.js} +2 -2
  137. package/dist/{chunk-XOQSEF7X.js → chunk-CVILPI77.js} +6 -6
  138. package/dist/chunk-D3I2MCN7.js +29 -0
  139. package/dist/chunk-D3I2MCN7.js.map +1 -0
  140. package/dist/{chunk-A5OJCXZL.js → chunk-DSUAAZZX.js} +15 -4
  141. package/dist/chunk-DSUAAZZX.js.map +1 -0
  142. package/dist/{chunk-HREE4JHI.js → chunk-DYVMXPCF.js} +486 -287
  143. package/dist/chunk-DYVMXPCF.js.map +1 -0
  144. package/dist/{chunk-J7VGGECD.js → chunk-DZPFMQZ7.js} +1 -1
  145. package/dist/chunk-DZPFMQZ7.js.map +1 -0
  146. package/dist/{chunk-PDLBLTOK.js → chunk-EITZHSX6.js} +9 -9
  147. package/dist/{chunk-D3J5SLQK.js → chunk-EJHEWCGQ.js} +81 -20
  148. package/dist/chunk-EJHEWCGQ.js.map +1 -0
  149. package/dist/{chunk-WUNIWKY4.js → chunk-ELIL2A37.js} +6 -6
  150. package/dist/{chunk-E6PNLPGJ.js → chunk-FZP32336.js} +806 -470
  151. package/dist/chunk-FZP32336.js.map +1 -0
  152. package/dist/{chunk-HZFHQ4AQ.js → chunk-G7A5HLUS.js} +23 -17
  153. package/dist/chunk-G7A5HLUS.js.map +1 -0
  154. package/dist/{chunk-CINZGPSJ.js → chunk-GUMZC2BO.js} +2 -2
  155. package/dist/{chunk-H24WNPA2.js → chunk-GWFSVJ4P.js} +3 -3
  156. package/dist/{chunk-7XC2HX75.js → chunk-GYPQL6XN.js} +157 -16
  157. package/dist/chunk-GYPQL6XN.js.map +1 -0
  158. package/dist/{chunk-TSH56VPU.js → chunk-HAYSYUAB.js} +2 -2
  159. package/dist/{chunk-TDHTVMPG.js → chunk-HFPASSFV.js} +7 -2
  160. package/dist/chunk-HFPASSFV.js.map +1 -0
  161. package/dist/chunk-J2WC5LF4.js +395 -0
  162. package/dist/chunk-J2WC5LF4.js.map +1 -0
  163. package/dist/{chunk-PKNLM44P.js → chunk-JH6BPLOP.js} +9 -9
  164. package/dist/{chunk-KXB4VXHY.js → chunk-JIYDRBVZ.js} +2 -2
  165. package/dist/chunk-JV3C2MNQ.js +74 -0
  166. package/dist/chunk-JV3C2MNQ.js.map +1 -0
  167. package/dist/{chunk-AV5ZEH4M.js → chunk-KVJRXN2E.js} +2 -2
  168. package/dist/{chunk-JVLCVFQ4.js → chunk-KXEFRMCF.js} +3 -3
  169. package/dist/{chunk-WFTIGIIS.js → chunk-L6CQ7WIW.js} +5 -5
  170. package/dist/{chunk-EJUEXZHX.js → chunk-LLJMAULE.js} +2 -2
  171. package/dist/{chunk-N5Z4EVOR.js → chunk-LNEWDF2A.js} +36 -11
  172. package/dist/chunk-LNEWDF2A.js.map +1 -0
  173. package/dist/{chunk-AS7YMSL6.js → chunk-M23RF3LJ.js} +4 -4
  174. package/dist/{chunk-UYLMNVY6.js → chunk-MDISBSYA.js} +16 -9
  175. package/dist/chunk-MDISBSYA.js.map +1 -0
  176. package/dist/{chunk-3F2LKUMU.js → chunk-NIS256NW.js} +2 -2
  177. package/dist/{chunk-YIAA2X3D.js → chunk-NK5RGJ65.js} +3 -3
  178. package/dist/chunk-NLDVVWCL.js +84 -0
  179. package/dist/chunk-NLDVVWCL.js.map +1 -0
  180. package/dist/{chunk-OQ5PRDDS.js → chunk-NTOIP2E6.js} +6 -6
  181. package/dist/{chunk-HLPD7B7P.js → chunk-NUEQKLNB.js} +2 -2
  182. package/dist/{chunk-4J7G5SY4.js → chunk-NZBZ7IS2.js} +72 -24
  183. package/dist/chunk-NZBZ7IS2.js.map +1 -0
  184. package/dist/{chunk-3TBLDMJA.js → chunk-O4KMGRXE.js} +5 -2
  185. package/dist/chunk-O4KMGRXE.js.map +1 -0
  186. package/dist/{chunk-33PLLLL7.js → chunk-P7NGM24P.js} +6 -6
  187. package/dist/{chunk-7TWUCYER.js → chunk-PNRA7FAD.js} +7 -7
  188. package/dist/{chunk-5I4M26Q7.js → chunk-QBSFOKY6.js} +4 -4
  189. package/dist/{chunk-QJAQNXWI.js → chunk-QCECHYZL.js} +76 -79
  190. package/dist/chunk-QCECHYZL.js.map +1 -0
  191. package/dist/{chunk-P4DRWEYC.js → chunk-QVSBTCVP.js} +2 -2
  192. package/dist/{chunk-AAIUERNB.js → chunk-R5RFK3CB.js} +6 -6
  193. package/dist/{chunk-WDISJRMG.js → chunk-RMMVQQA6.js} +2 -2
  194. package/dist/{chunk-KWMXR7XS.js → chunk-S2V7RUCL.js} +8 -1
  195. package/dist/{chunk-KWMXR7XS.js.map → chunk-S2V7RUCL.js.map} +1 -1
  196. package/dist/{chunk-5SM35XZR.js → chunk-S5NZBKKQ.js} +2 -2
  197. package/dist/{chunk-VNA7W7QF.js → chunk-SVH57F5Z.js} +12 -4
  198. package/dist/chunk-SVH57F5Z.js.map +1 -0
  199. package/dist/{chunk-WIPEXG6R.js → chunk-SXIMQLGV.js} +2 -2
  200. package/dist/{chunk-RVLJEII5.js → chunk-SYUBB3WM.js} +256 -187
  201. package/dist/chunk-SYUBB3WM.js.map +1 -0
  202. package/dist/{chunk-OAEQLRCY.js → chunk-TN76AKO3.js} +5 -5
  203. package/dist/{chunk-QN25OCUF.js → chunk-TQ4GD737.js} +5 -5
  204. package/dist/{chunk-VCD4PSK2.js → chunk-TQZ4DVBC.js} +7 -4
  205. package/dist/chunk-TQZ4DVBC.js.map +1 -0
  206. package/dist/{chunk-7K5Q6COX.js → chunk-TVVEYCNW.js} +4 -4
  207. package/dist/{chunk-DNWXFTLD.js → chunk-TYISDI6B.js} +2 -2
  208. package/dist/{chunk-4LMA77JH.js → chunk-U2VLVBBH.js} +3 -3
  209. package/dist/{chunk-5ZE7QHTK.js → chunk-ULVR5KG7.js} +5 -5
  210. package/dist/{chunk-NVRYW264.js → chunk-UQWIKLQK.js} +18 -15
  211. package/dist/chunk-UQWIKLQK.js.map +1 -0
  212. package/dist/{chunk-YV32N67O.js → chunk-URS5GSM7.js} +1 -1
  213. package/dist/chunk-URS5GSM7.js.map +1 -0
  214. package/dist/{chunk-4B77XSG5.js → chunk-UV72DEZD.js} +5 -5
  215. package/dist/{chunk-S2BBISHU.js → chunk-VANZKHTN.js} +3 -3
  216. package/dist/chunk-VHFXP27N.js +250 -0
  217. package/dist/chunk-VHFXP27N.js.map +1 -0
  218. package/dist/{chunk-3Y224NYC.js → chunk-VYISFWVX.js} +2 -2
  219. package/dist/{chunk-TIHMZFIV.js → chunk-W3IC7QOY.js} +3 -3
  220. package/dist/{chunk-NRV4Y3PM.js → chunk-W4FBGYGK.js} +1 -1
  221. package/dist/{chunk-P2BM76KT.js → chunk-WAS4HV46.js} +174 -43
  222. package/dist/chunk-WAS4HV46.js.map +1 -0
  223. package/dist/{chunk-57QKLRBV.js → chunk-WB7JSQCP.js} +2 -1
  224. package/dist/chunk-WB7JSQCP.js.map +1 -0
  225. package/dist/chunk-WGP57SR3.js +68 -0
  226. package/dist/chunk-WGP57SR3.js.map +1 -0
  227. package/dist/{chunk-ECK75GDJ.js → chunk-WQIHRA5F.js} +43 -24
  228. package/dist/chunk-WQIHRA5F.js.map +1 -0
  229. package/dist/{chunk-MU7ZHSZE.js → chunk-WZFAPHIK.js} +2 -2
  230. package/dist/{chunk-T2TTP3KU.js → chunk-X4IDNPOS.js} +2 -2
  231. package/dist/{chunk-BLAKS3CP.js → chunk-XL3TATMJ.js} +3 -3
  232. package/dist/{chunk-W4XJFLAL.js → chunk-XPRJSHNI.js} +2 -2
  233. package/dist/{chunk-5TFP4CUL.js → chunk-XQ3HXAQH.js} +14 -11
  234. package/dist/chunk-XQ3HXAQH.js.map +1 -0
  235. package/dist/{chunk-VWAXN2BN.js → chunk-XSFHWBQO.js} +93 -31
  236. package/dist/chunk-XSFHWBQO.js.map +1 -0
  237. package/dist/{chunk-DL7ZD3JH.js → chunk-XTAUXTDO.js} +14 -9
  238. package/dist/chunk-XTAUXTDO.js.map +1 -0
  239. package/dist/{chunk-JE7EK33X.js → chunk-Y7HRYCNW.js} +2 -2
  240. package/dist/{chunk-E6EE5B67.js → chunk-YK6BDDHP.js} +4 -4
  241. package/dist/{chunk-ES36HTSC.js → chunk-YLHM5BQQ.js} +3 -3
  242. package/dist/{chunk-RN7DY3FC.js → chunk-YMAQDHQM.js} +31 -12
  243. package/dist/chunk-YMAQDHQM.js.map +1 -0
  244. package/dist/{chunk-ULARSG5Z.js → chunk-YN6ASZUG.js} +10 -8
  245. package/dist/{chunk-ULARSG5Z.js.map → chunk-YN6ASZUG.js.map} +1 -1
  246. package/dist/{chunk-IKKWIPYN.js → chunk-YYQAKIDJ.js} +37 -1
  247. package/dist/chunk-YYQAKIDJ.js.map +1 -0
  248. package/dist/{chunk-BJKPPZ6Z.js → chunk-ZFGZ6PZ2.js} +2 -2
  249. package/dist/{chunk-CJ2ZR7UA.js → chunk-ZI32MKDW.js} +267 -214
  250. package/dist/chunk-ZI32MKDW.js.map +1 -0
  251. package/dist/{chunk-64UDOIMI.js → chunk-ZLQ37WJX.js} +2 -2
  252. package/dist/chunk-ZMAYKGPN.js +351 -0
  253. package/dist/chunk-ZMAYKGPN.js.map +1 -0
  254. package/dist/{cli-BUGN3d6_.d.ts → cli-BBHDtG36.d.ts} +5 -5
  255. package/dist/cli.d.ts +16 -12
  256. package/dist/cli.js +138 -124
  257. package/dist/compounding/engine.d.ts +3 -2
  258. package/dist/compounding/engine.js +24 -23
  259. package/dist/compounding/preference-consolidator.d.ts +2 -1
  260. package/dist/compression-optimizer.d.ts +2 -1
  261. package/dist/config.d.ts +2 -1
  262. package/dist/config.js +10 -8
  263. package/dist/connectors/codex-materialize-runner.d.ts +2 -1
  264. package/dist/connectors/codex-materialize-runner.js +23 -22
  265. package/dist/connectors/codex-materialize.d.ts +2 -1
  266. package/dist/connectors/index.d.ts +2 -1
  267. package/dist/connectors/index.js +26 -25
  268. package/dist/consolidation-provenance-check.d.ts +3 -2
  269. package/dist/consolidation-provenance-check.js +4 -4
  270. package/dist/consolidation-undo.d.ts +3 -2
  271. package/dist/consolidation-undo.js +10 -7
  272. package/dist/consolidation-undo.js.map +1 -1
  273. package/dist/contradiction/index.d.ts +3 -2
  274. package/dist/converge-config.d.ts +2 -1
  275. package/dist/convergence-refresh.d.ts +4 -3
  276. package/dist/convergence-refresh.js +27 -26
  277. package/dist/conversation-index/backend.d.ts +2 -1
  278. package/dist/conversation-index/backend.js +2 -2
  279. package/dist/conversation-index/chunker.d.ts +2 -1
  280. package/dist/conversation-index/faiss-adapter.d.ts +2 -1
  281. package/dist/conversation-index/indexer.d.ts +2 -1
  282. package/dist/conversation-index/search.d.ts +2 -1
  283. package/dist/corpus-watermark.d.ts +2 -1
  284. package/dist/corpus-watermark.js +42 -41
  285. package/dist/day-summary.d.ts +2 -1
  286. package/dist/delinearize.d.ts +2 -1
  287. package/dist/direct-answer-wiring.d.ts +2 -1
  288. package/dist/direct-answer-wiring.js +2 -2
  289. package/dist/direct-answer.d.ts +2 -1
  290. package/dist/embedding-fallback.d.ts +2 -1
  291. package/dist/embedding-fallback.js +2 -2
  292. package/dist/enrichment/index.d.ts +2 -1
  293. package/dist/entity-retrieval-boundaries.js +1 -1
  294. package/dist/entity-retrieval.d.ts +3 -2
  295. package/dist/entity-retrieval.js +24 -23
  296. package/dist/entity-schema.d.ts +2 -1
  297. package/dist/explicit-capture.d.ts +9 -8
  298. package/dist/explicit-capture.js +11 -9
  299. package/dist/external-wiki-access.d.ts +127 -0
  300. package/dist/external-wiki-access.js +186 -0
  301. package/dist/external-wiki-access.js.map +1 -0
  302. package/dist/external-wiki-cli.d.ts +13 -0
  303. package/dist/external-wiki-cli.js +96 -0
  304. package/dist/external-wiki-cli.js.map +1 -0
  305. package/dist/external-wiki-collection-registration.d.ts +39 -0
  306. package/dist/external-wiki-collection-registration.js +79 -0
  307. package/dist/external-wiki-collection-registration.js.map +1 -0
  308. package/dist/external-wiki-collection.d.ts +50 -0
  309. package/dist/external-wiki-collection.js +387 -0
  310. package/dist/external-wiki-collection.js.map +1 -0
  311. package/dist/external-wiki-config.d.ts +13 -0
  312. package/dist/external-wiki-config.js +13 -0
  313. package/dist/external-wiki-config.js.map +1 -0
  314. package/dist/external-wiki-guard.d.ts +11 -0
  315. package/dist/external-wiki-guard.js +18 -0
  316. package/dist/external-wiki-guard.js.map +1 -0
  317. package/dist/external-wiki-mcp-tools.d.ts +123 -0
  318. package/dist/external-wiki-mcp-tools.js +8 -0
  319. package/dist/external-wiki-mcp-tools.js.map +1 -0
  320. package/dist/external-wiki-search.d.ts +42 -0
  321. package/dist/external-wiki-search.js +11 -0
  322. package/dist/external-wiki-search.js.map +1 -0
  323. package/dist/external-wiki.d.ts +43 -0
  324. package/dist/external-wiki.js +16 -0
  325. package/dist/external-wiki.js.map +1 -0
  326. package/dist/extraction-error-classification.d.ts +2 -1
  327. package/dist/extraction-faithfulness.d.ts +2 -1
  328. package/dist/extraction-judge-telemetry.d.ts +2 -1
  329. package/dist/extraction-judge-training.d.ts +2 -1
  330. package/dist/extraction-judge.d.ts +2 -1
  331. package/dist/extraction-liveness.d.ts +2 -1
  332. package/dist/extraction-source-grounding-helpers.d.ts +5 -3
  333. package/dist/extraction-source-grounding-helpers.js +1 -1
  334. package/dist/extraction-source-grounding-rules.d.ts +2 -1
  335. package/dist/extraction-source-grounding-rules.js +2 -2
  336. package/dist/extraction-source-grounding.d.ts +2 -1
  337. package/dist/extraction-source-grounding.js +5 -5
  338. package/dist/extraction.d.ts +2 -1
  339. package/dist/extraction.js +45 -43
  340. package/dist/fallback-llm.d.ts +2 -1
  341. package/dist/graph-dashboard-diff.d.ts +2 -1
  342. package/dist/graph-dashboard-key.d.ts +2 -1
  343. package/dist/graph-dashboard-parser.d.ts +2 -1
  344. package/dist/graph-edge-reinforcement.d.ts +2 -1
  345. package/dist/graph-snapshot.d.ts +2 -1
  346. package/dist/graph.d.ts +2 -1
  347. package/dist/harmonic-retrieval.js +2 -2
  348. package/dist/importance.d.ts +2 -1
  349. package/dist/importers/index.d.ts +2 -1
  350. package/dist/in-flight-reads.d.ts +2 -1
  351. package/dist/index.d.ts +362 -350
  352. package/dist/index.js +291 -259
  353. package/dist/intent.d.ts +2 -1
  354. package/dist/lcm/engine.d.ts +2 -1
  355. package/dist/lcm/engine.js +3 -3
  356. package/dist/lcm/index.d.ts +2 -1
  357. package/dist/lcm/index.js +8 -8
  358. package/dist/lcm/tools.d.ts +2 -1
  359. package/dist/lifecycle.d.ts +2 -1
  360. package/dist/live-connectors-runner.d.ts +2 -1
  361. package/dist/local-llm.d.ts +2 -1
  362. package/dist/local-llm.js +2 -2
  363. package/dist/local-model-endpoint.d.ts +2 -1
  364. package/dist/maintenance/memory-governance.d.ts +2 -1
  365. package/dist/maintenance/memory-governance.js +24 -23
  366. package/dist/maintenance/rebuild-memory-lifecycle-ledger.d.ts +3 -2
  367. package/dist/maintenance/rebuild-memory-lifecycle-ledger.js +24 -23
  368. package/dist/maintenance/rebuild-memory-projection.d.ts +3 -2
  369. package/dist/maintenance/rebuild-memory-projection.js +26 -25
  370. package/dist/{maintenance-LbuS2rUA.d.ts → maintenance-D2mveyCd.d.ts} +3 -3
  371. package/dist/mcp-memory-inspector-app.d.ts +14 -10
  372. package/dist/mcp-read-only-tools.js +1 -1
  373. package/dist/memory-action-policy.d.ts +2 -1
  374. package/dist/memory-cache.d.ts +2 -1
  375. package/dist/memory-lifecycle-ledger-utils.d.ts +2 -1
  376. package/dist/memory-projection-store.d.ts +2 -1
  377. package/dist/memory-provenance.d.ts +2 -1
  378. package/dist/memory-worth-outcomes.d.ts +3 -2
  379. package/dist/models-json.d.ts +2 -1
  380. package/dist/namespaces/migrate.d.ts +4 -3
  381. package/dist/namespaces/migrate.js +40 -39
  382. package/dist/namespaces/principal.d.ts +2 -1
  383. package/dist/namespaces/search.d.ts +2 -1
  384. package/dist/namespaces/search.js +18 -18
  385. package/dist/namespaces/storage.d.ts +4 -3
  386. package/dist/namespaces/storage.js +23 -22
  387. package/dist/native-knowledge.d.ts +2 -1
  388. package/dist/offline-sync-impression-drain.d.ts +2 -1
  389. package/dist/offline-sync-impression-drain.js +11 -9
  390. package/dist/offline-sync.d.ts +29 -3
  391. package/dist/offline-sync.js +6 -2
  392. package/dist/operator-doctor-corpus.d.ts +2 -1
  393. package/dist/operator-doctor-corpus.js +45 -44
  394. package/dist/operator-doctor-replica.d.ts +2 -1
  395. package/dist/operator-doctor-replica.js +3 -3
  396. package/dist/operator-toolkit.d.ts +4 -3
  397. package/dist/operator-toolkit.js +59 -55
  398. package/dist/orchestration/compression-guideline-coordinator.d.ts +3 -2
  399. package/dist/orchestration/maintenance.d.ts +5 -4
  400. package/dist/orchestration/maintenance.js +36 -33
  401. package/dist/{orchestrator-rHiWt32X.d.ts → orchestrator-DJYlwiUv.d.ts} +14 -7
  402. package/dist/orchestrator.d.ts +9 -8
  403. package/dist/orchestrator.js +201 -189
  404. package/dist/page-versioning.js +3 -3
  405. package/dist/patterns-cli.d.ts +2 -1
  406. package/dist/{pipeline-W_97O8BV.d.ts → pipeline-CNjY4wk3.d.ts} +1 -1
  407. package/dist/policy-runtime.d.ts +2 -1
  408. package/dist/policy-runtime.js +1 -1
  409. package/dist/proactive-contention.d.ts +2 -1
  410. package/dist/provenance.d.ts +2 -1
  411. package/dist/provenance.js +2 -2
  412. package/dist/{qmd-LWtMofAf.d.ts → qmd-C0UDZidt.d.ts} +9 -7
  413. package/dist/qmd-preflight.d.ts +5 -4
  414. package/dist/qmd-preflight.js +2 -2
  415. package/dist/qmd-recall-cache.d.ts +2 -1
  416. package/dist/qmd.d.ts +4 -3
  417. package/dist/qmd.js +5 -5
  418. package/dist/recall-concurrency-config.d.ts +2 -1
  419. package/dist/recall-disclosure-escalation.d.ts +2 -1
  420. package/dist/recall-explain-renderer.d.ts +2 -1
  421. package/dist/recall-explain-renderer.js +3 -3
  422. package/dist/recall-memory-map.d.ts +2 -1
  423. package/dist/recall-planner-llm.d.ts +2 -1
  424. package/dist/recall-state.d.ts +2 -1
  425. package/dist/recall-tag-filter.d.ts +2 -1
  426. package/dist/recall-timings.d.ts +2 -1
  427. package/dist/recall-xray-cli.d.ts +2 -1
  428. package/dist/recall-xray-cli.js +4 -4
  429. package/dist/recall-xray-renderer.d.ts +2 -1
  430. package/dist/recall-xray-renderer.js +3 -3
  431. package/dist/recall-xray.d.ts +8 -1
  432. package/dist/recall-xray.js +2 -2
  433. package/dist/reconcile/cursor.d.ts +12 -2
  434. package/dist/reconcile/cursor.js +46 -7
  435. package/dist/reconcile/cursor.js.map +1 -1
  436. package/dist/reconcile/manifest.d.ts +9 -2
  437. package/dist/reconcile/manifest.js +15 -268
  438. package/dist/reconcile/manifest.js.map +1 -1
  439. package/dist/reconcile/plan.d.ts +4 -1
  440. package/dist/reconcile/plan.js +4 -4
  441. package/dist/replay/normalizers/chatgpt.d.ts +2 -1
  442. package/dist/replay/normalizers/claude.d.ts +2 -1
  443. package/dist/replay/normalizers/openclaw.d.ts +2 -1
  444. package/dist/replay/normalizers/shared.d.ts +2 -1
  445. package/dist/replay/runner.d.ts +2 -1
  446. package/dist/replay/types.d.ts +2 -1
  447. package/dist/replica-divergence.d.ts +2 -1
  448. package/dist/replica-divergence.js +2 -2
  449. package/dist/replica-peers-config.d.ts +2 -1
  450. package/dist/resolve-auth-token.d.ts +2 -1
  451. package/dist/resume-bundles.js +12 -10
  452. package/dist/retrieval-agents.d.ts +4 -3
  453. package/dist/retrieval-agents.js +2 -2
  454. package/dist/retrieval-tiers.d.ts +2 -1
  455. package/dist/routing/engine.d.ts +2 -1
  456. package/dist/routing/store.d.ts +2 -1
  457. package/dist/salvage-envelope.d.ts +2 -1
  458. package/dist/schemas.d.ts +32 -32
  459. package/dist/{scope-profiles-BiQKOE-p.d.ts → scope-profiles-BJzp2F5A.d.ts} +1 -1
  460. package/dist/search/embed-helper.d.ts +2 -1
  461. package/dist/search/embed-helper.js +3 -3
  462. package/dist/search/factory.d.ts +4 -2
  463. package/dist/search/factory.js +20 -18
  464. package/dist/search/index.d.ts +2 -1
  465. package/dist/search/index.js +22 -22
  466. package/dist/search/lancedb-backend.d.ts +2 -1
  467. package/dist/search/lancedb-backend.js +4 -4
  468. package/dist/search/meilisearch-backend.d.ts +2 -1
  469. package/dist/search/meilisearch-backend.js +4 -4
  470. package/dist/search/noop-backend.d.ts +2 -1
  471. package/dist/search/orama-backend.d.ts +2 -1
  472. package/dist/search/orama-backend.js +4 -4
  473. package/dist/search/port.d.ts +18 -1
  474. package/dist/search/port.js +1 -1
  475. package/dist/search/remote-backend.d.ts +2 -1
  476. package/dist/search/remote-backend.js +2 -2
  477. package/dist/secure-store/index.js +2 -2
  478. package/dist/{semantic-consolidation-dHYCyqgh.d.ts → semantic-consolidation-D4KAZO2G.d.ts} +1 -1
  479. package/dist/semantic-consolidation.d.ts +3 -2
  480. package/dist/semantic-consolidation.js +25 -24
  481. package/dist/semantic-rule-promotion.js +23 -22
  482. package/dist/semantic-rule-verifier.d.ts +2 -1
  483. package/dist/semantic-rule-verifier.js +24 -23
  484. package/dist/{service-DJG3KCQ4.d.ts → service-BeDxSqE-.d.ts} +2 -2
  485. package/dist/session-observer-bands.d.ts +2 -1
  486. package/dist/session-observer-state.d.ts +2 -1
  487. package/dist/shared-context/manager.d.ts +2 -1
  488. package/dist/shared-context/manager.js +2 -2
  489. package/dist/signal.d.ts +2 -1
  490. package/dist/source-agent-qualifier.d.ts +2 -1
  491. package/dist/source-agent-qualifier.js +42 -40
  492. package/dist/{storage-F9FVh-w9.d.ts → storage-DfjxusTE.d.ts} +24 -12
  493. package/dist/storage.d.ts +3 -2
  494. package/dist/storage.js +25 -24
  495. package/dist/summarizer.d.ts +2 -1
  496. package/dist/summarizer.js +5 -5
  497. package/dist/summary-snapshot.d.ts +2 -1
  498. package/dist/temporal-supersession.d.ts +3 -2
  499. package/dist/temporal-timeline-recall.d.ts +2 -1
  500. package/dist/temporal-validity.d.ts +2 -1
  501. package/dist/threading.d.ts +2 -1
  502. package/dist/tier-migration.d.ts +3 -2
  503. package/dist/tier-routing.d.ts +2 -1
  504. package/dist/tool-scoped-memory.d.ts +5 -1
  505. package/dist/tool-scoped-memory.js +3 -1
  506. package/dist/topics.d.ts +2 -1
  507. package/dist/transcript.d.ts +2 -1
  508. package/dist/transfer/capsule-import.js +4 -4
  509. package/dist/transfer/types.d.ts +12 -12
  510. package/dist/trust-score-stage.d.ts +2 -1
  511. package/dist/trust-score.d.ts +2 -1
  512. package/dist/{types-rEwubvim.d.ts → types-yX_FwERf.d.ts} +8 -1
  513. package/dist/types.d.ts +2 -1
  514. package/dist/types.js +1 -1
  515. package/dist/utility-runtime.d.ts +2 -1
  516. package/dist/verified-recall.js +24 -23
  517. package/dist/write-envelope.d.ts +2 -1
  518. package/package.json +2 -2
  519. package/src/abort-error.ts +17 -0
  520. package/src/access-admin-ops-surface.ts +1 -0
  521. package/src/access-boundary.ts +1 -0
  522. package/src/access-coding-context-resolution.ts +42 -0
  523. package/src/access-extraction-force-flush.ts +38 -2
  524. package/src/access-http-lcm-compaction.ts +5 -2
  525. package/src/access-http-offline-stream.ts +79 -0
  526. package/src/access-http.test.ts +310 -3
  527. package/src/access-http.ts +85 -21
  528. package/src/access-mcp-output-schemas.ts +36 -0
  529. package/src/access-mcp.test.ts +95 -1
  530. package/src/access-mcp.ts +7 -9
  531. package/src/access-observe-helpers.ts +64 -22
  532. package/src/access-observe-write-surface.ts +8 -0
  533. package/src/access-offline-manifest.ts +54 -0
  534. package/src/access-operations-batch.ts +3 -3
  535. package/src/access-operations.ts +13 -7
  536. package/src/access-recall-concurrency.ts +3 -27
  537. package/src/access-recall-surface.ts +3 -0
  538. package/src/access-service-health.test.ts +32 -7
  539. package/src/access-service-namespace.test.ts +55 -0
  540. package/src/access-service-observe-idempotency.test.ts +34 -2
  541. package/src/access-service-observe-lcm-parity.test.ts +138 -3
  542. package/src/access-service-observe-scope.test.ts +160 -1
  543. package/src/access-service-offline-file-content.test.ts +345 -1
  544. package/src/access-service.ts +86 -59
  545. package/src/access-surface-catalog.ts +4 -0
  546. package/src/admin/admin-surfaces.ts +2 -0
  547. package/src/binary-lifecycle/pipeline.test.ts +106 -1
  548. package/src/binary-lifecycle/pipeline.ts +3 -0
  549. package/src/coding/git-context.test.ts +47 -0
  550. package/src/coding/git-context.ts +129 -27
  551. package/src/config.test.ts +24 -0
  552. package/src/config.ts +9 -12
  553. package/src/connector-provenance.test.ts +101 -0
  554. package/src/consolidation-undo.ts +3 -0
  555. package/src/convergence-refresh.ts +14 -2
  556. package/src/correction/correction-access-wiring.ts +9 -7
  557. package/src/correction/correction-executor.test.ts +206 -2
  558. package/src/correction/correction-executor.ts +29 -20
  559. package/src/correction/correction-planner.test.ts +36 -0
  560. package/src/correction/correction-planner.ts +9 -15
  561. package/src/correction/correction-service.ts +3 -1
  562. package/src/correction/correction-storage-integration.test.ts +77 -0
  563. package/src/correction/correction-surfaces.test.ts +41 -28
  564. package/src/correction/passive-capture.test.ts +59 -0
  565. package/src/correction/passive-capture.ts +4 -1
  566. package/src/entity-retrieval-boundaries.ts +17 -4
  567. package/src/entity-retrieval.ts +27 -6
  568. package/src/external-wiki-access.test.ts +65 -0
  569. package/src/external-wiki-access.ts +31 -0
  570. package/src/external-wiki-cli.ts +92 -0
  571. package/src/external-wiki-collection-registration.test.ts +163 -0
  572. package/src/external-wiki-collection-registration.ts +101 -0
  573. package/src/external-wiki-collection.test.ts +502 -0
  574. package/src/external-wiki-collection.ts +503 -0
  575. package/src/external-wiki-config.test.ts +135 -0
  576. package/src/external-wiki-config.ts +100 -0
  577. package/src/external-wiki-guard.ts +83 -0
  578. package/src/external-wiki-mcp-tools.ts +23 -0
  579. package/src/external-wiki-search.test.ts +301 -0
  580. package/src/external-wiki-search.ts +362 -0
  581. package/src/external-wiki.test.ts +240 -0
  582. package/src/external-wiki.ts +453 -0
  583. package/src/extraction-scope-source-agent.test.ts +21 -0
  584. package/src/extraction-source-grounding-helpers.ts +243 -53
  585. package/src/extraction-source-grounding-rules.ts +133 -39
  586. package/src/extraction-source-grounding.test.ts +363 -33
  587. package/src/extraction-timeout.test.ts +1 -0
  588. package/src/extraction-watermark.test.ts +150 -7
  589. package/src/extraction.ts +8 -1
  590. package/src/index.ts +8 -0
  591. package/src/mcp-read-only-tools.ts +1 -0
  592. package/src/offline-sync.test.ts +194 -0
  593. package/src/offline-sync.ts +217 -13
  594. package/src/orchestration/external-wiki-recall-guard.test.ts +94 -0
  595. package/src/orchestration/extraction-persist.ts +19 -2
  596. package/src/orchestration/extraction-run-helpers.ts +37 -19
  597. package/src/orchestration/extraction-run.test.ts +171 -2
  598. package/src/orchestration/extraction-run.ts +11 -13
  599. package/src/orchestration/extraction-watermark.ts +106 -17
  600. package/src/orchestration/generic-recall-paths.ts +14 -0
  601. package/src/orchestration/orchestrator-helpers.ts +2 -0
  602. package/src/orchestration/orchestrator-init.ts +9 -0
  603. package/src/orchestration/recall-internal-deps.ts +6 -0
  604. package/src/orchestration/recall-internal.ts +154 -33
  605. package/src/orchestration/recall-rerank-coordinator.ts +60 -25
  606. package/src/orchestration/recall-search-pipeline.test.ts +75 -1
  607. package/src/orchestration/recall-search-pipeline.ts +50 -10
  608. package/src/orchestrator-convergence-refresh.test.ts +36 -2
  609. package/src/orchestrator.ts +13 -3
  610. package/src/page-versioning.ts +5 -19
  611. package/src/procedural/procedure-recall.ts +5 -1
  612. package/src/provenance-surfaces.test.ts +3 -0
  613. package/src/qmd-client.test.ts +78 -17
  614. package/src/qmd.test.ts +24 -0
  615. package/src/qmd.ts +224 -315
  616. package/src/recall-explain-renderer.ts +3 -0
  617. package/src/recall-rerank-coordinator.test.ts +61 -0
  618. package/src/recall-xray-renderer.test.ts +6 -0
  619. package/src/recall-xray.test.ts +88 -1
  620. package/src/recall-xray.ts +15 -0
  621. package/src/reconcile/cursor.test.ts +48 -0
  622. package/src/reconcile/cursor.ts +58 -11
  623. package/src/reconcile/manifest.test.ts +4 -0
  624. package/src/reconcile/manifest.ts +41 -51
  625. package/src/reconcile/plan.test.ts +4 -0
  626. package/src/reconcile/plan.ts +28 -16
  627. package/src/search/factory.ts +6 -6
  628. package/src/search/port.ts +25 -9
  629. package/src/secure-store/secure-fs.ts +20 -12
  630. package/src/secure-store/secure-store.test.ts +41 -2
  631. package/src/spaces/index.test.ts +61 -2
  632. package/src/spaces/index.ts +44 -18
  633. package/src/storage/entity-alias-config.ts +97 -0
  634. package/src/storage/entity-canonical-id-lock.ts +53 -23
  635. package/src/storage/entity-canonical-id-migration.ts +53 -22
  636. package/src/storage/entity-canonical-id-references.ts +3 -0
  637. package/src/storage/entity-id-safety.ts +7 -0
  638. package/src/storage/entity-store.ts +6 -2
  639. package/src/storage/memory-frontmatter-metadata.ts +4 -9
  640. package/src/storage/memory-migration-serialization.ts +10 -15
  641. package/src/storage/tombstone-blocked-capture-mutation.ts +52 -64
  642. package/src/storage/tombstone-blocked-capture-sync.ts +244 -199
  643. package/src/storage-deletion-revisions.test.ts +91 -0
  644. package/src/storage-fact-hash-index-defer.test.ts +446 -163
  645. package/src/storage.ts +534 -245
  646. package/src/tool-scoped-memory.ts +10 -0
  647. package/src/transfer/capsule-import.ts +13 -0
  648. package/src/transfer/capsule-merge.ts +13 -0
  649. package/src/trust-score-recall-paths.test.ts +75 -1
  650. package/src/types.ts +7 -3
  651. package/dist/capsule-merge-IDWJPCWK.js.map +0 -1
  652. package/dist/chunk-3CE77VAP.js.map +0 -1
  653. package/dist/chunk-3TBLDMJA.js.map +0 -1
  654. package/dist/chunk-4J7G5SY4.js.map +0 -1
  655. package/dist/chunk-57QKLRBV.js.map +0 -1
  656. package/dist/chunk-5TFP4CUL.js.map +0 -1
  657. package/dist/chunk-7XC2HX75.js.map +0 -1
  658. package/dist/chunk-A5OJCXZL.js.map +0 -1
  659. package/dist/chunk-BUE5E2HL.js.map +0 -1
  660. package/dist/chunk-CJ2ZR7UA.js.map +0 -1
  661. package/dist/chunk-CUM2BBPN.js.map +0 -1
  662. package/dist/chunk-D3J5SLQK.js.map +0 -1
  663. package/dist/chunk-DL7ZD3JH.js.map +0 -1
  664. package/dist/chunk-DLVPUX7U.js.map +0 -1
  665. package/dist/chunk-E6PNLPGJ.js.map +0 -1
  666. package/dist/chunk-ECK75GDJ.js.map +0 -1
  667. package/dist/chunk-HREE4JHI.js.map +0 -1
  668. package/dist/chunk-HZFHQ4AQ.js.map +0 -1
  669. package/dist/chunk-IKKWIPYN.js.map +0 -1
  670. package/dist/chunk-J7VGGECD.js.map +0 -1
  671. package/dist/chunk-N5Z4EVOR.js.map +0 -1
  672. package/dist/chunk-NVRYW264.js.map +0 -1
  673. package/dist/chunk-P2BM76KT.js.map +0 -1
  674. package/dist/chunk-PVGDJXVK.js +0 -21
  675. package/dist/chunk-QJAQNXWI.js.map +0 -1
  676. package/dist/chunk-RN7DY3FC.js.map +0 -1
  677. package/dist/chunk-RVLJEII5.js.map +0 -1
  678. package/dist/chunk-S2NCTZGJ.js.map +0 -1
  679. package/dist/chunk-TDHTVMPG.js.map +0 -1
  680. package/dist/chunk-UYLMNVY6.js.map +0 -1
  681. package/dist/chunk-VCD4PSK2.js.map +0 -1
  682. package/dist/chunk-VNA7W7QF.js.map +0 -1
  683. package/dist/chunk-VWAXN2BN.js.map +0 -1
  684. package/dist/chunk-WOCNN776.js.map +0 -1
  685. package/dist/chunk-XYTOI63Z.js.map +0 -1
  686. package/dist/chunk-YV32N67O.js.map +0 -1
  687. /package/dist/{auto-sync-5OE5QOZB.js.map → auto-sync-UPTUVE4X.js.map} +0 -0
  688. /package/dist/{chunk-VUPTKTDV.js.map → chunk-2MRHJNWL.js.map} +0 -0
  689. /package/dist/{chunk-JBPKEARU.js.map → chunk-2QSZNTDO.js.map} +0 -0
  690. /package/dist/{chunk-5IVLTFOV.js.map → chunk-44N6ESJ4.js.map} +0 -0
  691. /package/dist/{chunk-HO3QBJEY.js.map → chunk-5546W5SI.js.map} +0 -0
  692. /package/dist/{chunk-U7GW7NE7.js.map → chunk-5CEECY6P.js.map} +0 -0
  693. /package/dist/{chunk-4UH4BTGK.js.map → chunk-5SNZSWWR.js.map} +0 -0
  694. /package/dist/{chunk-6CZPDBJS.js.map → chunk-5U7ID3EZ.js.map} +0 -0
  695. /package/dist/{chunk-GF22HWS2.js.map → chunk-6NNNURLK.js.map} +0 -0
  696. /package/dist/{chunk-227UFSEQ.js.map → chunk-7RZJWZ46.js.map} +0 -0
  697. /package/dist/{chunk-E5UK4VPE.js.map → chunk-7SHJHPTY.js.map} +0 -0
  698. /package/dist/{chunk-UVIKWC7M.js.map → chunk-7YERSTN7.js.map} +0 -0
  699. /package/dist/{chunk-S5SLVSVY.js.map → chunk-BQIFZ2MP.js.map} +0 -0
  700. /package/dist/{chunk-E53DSZEN.js.map → chunk-C26TE27X.js.map} +0 -0
  701. /package/dist/{chunk-LZ4LDKHZ.js.map → chunk-CLB32OHM.js.map} +0 -0
  702. /package/dist/{chunk-Q6IP2ARR.js.map → chunk-CSOYVTRX.js.map} +0 -0
  703. /package/dist/{chunk-XOQSEF7X.js.map → chunk-CVILPI77.js.map} +0 -0
  704. /package/dist/{chunk-PDLBLTOK.js.map → chunk-EITZHSX6.js.map} +0 -0
  705. /package/dist/{chunk-WUNIWKY4.js.map → chunk-ELIL2A37.js.map} +0 -0
  706. /package/dist/{chunk-CINZGPSJ.js.map → chunk-GUMZC2BO.js.map} +0 -0
  707. /package/dist/{chunk-H24WNPA2.js.map → chunk-GWFSVJ4P.js.map} +0 -0
  708. /package/dist/{chunk-TSH56VPU.js.map → chunk-HAYSYUAB.js.map} +0 -0
  709. /package/dist/{chunk-PKNLM44P.js.map → chunk-JH6BPLOP.js.map} +0 -0
  710. /package/dist/{chunk-KXB4VXHY.js.map → chunk-JIYDRBVZ.js.map} +0 -0
  711. /package/dist/{chunk-AV5ZEH4M.js.map → chunk-KVJRXN2E.js.map} +0 -0
  712. /package/dist/{chunk-JVLCVFQ4.js.map → chunk-KXEFRMCF.js.map} +0 -0
  713. /package/dist/{chunk-WFTIGIIS.js.map → chunk-L6CQ7WIW.js.map} +0 -0
  714. /package/dist/{chunk-EJUEXZHX.js.map → chunk-LLJMAULE.js.map} +0 -0
  715. /package/dist/{chunk-AS7YMSL6.js.map → chunk-M23RF3LJ.js.map} +0 -0
  716. /package/dist/{chunk-3F2LKUMU.js.map → chunk-NIS256NW.js.map} +0 -0
  717. /package/dist/{chunk-YIAA2X3D.js.map → chunk-NK5RGJ65.js.map} +0 -0
  718. /package/dist/{chunk-OQ5PRDDS.js.map → chunk-NTOIP2E6.js.map} +0 -0
  719. /package/dist/{chunk-HLPD7B7P.js.map → chunk-NUEQKLNB.js.map} +0 -0
  720. /package/dist/{chunk-33PLLLL7.js.map → chunk-P7NGM24P.js.map} +0 -0
  721. /package/dist/{chunk-7TWUCYER.js.map → chunk-PNRA7FAD.js.map} +0 -0
  722. /package/dist/{chunk-5I4M26Q7.js.map → chunk-QBSFOKY6.js.map} +0 -0
  723. /package/dist/{chunk-P4DRWEYC.js.map → chunk-QVSBTCVP.js.map} +0 -0
  724. /package/dist/{chunk-AAIUERNB.js.map → chunk-R5RFK3CB.js.map} +0 -0
  725. /package/dist/{chunk-WDISJRMG.js.map → chunk-RMMVQQA6.js.map} +0 -0
  726. /package/dist/{chunk-5SM35XZR.js.map → chunk-S5NZBKKQ.js.map} +0 -0
  727. /package/dist/{chunk-WIPEXG6R.js.map → chunk-SXIMQLGV.js.map} +0 -0
  728. /package/dist/{chunk-OAEQLRCY.js.map → chunk-TN76AKO3.js.map} +0 -0
  729. /package/dist/{chunk-QN25OCUF.js.map → chunk-TQ4GD737.js.map} +0 -0
  730. /package/dist/{chunk-7K5Q6COX.js.map → chunk-TVVEYCNW.js.map} +0 -0
  731. /package/dist/{chunk-DNWXFTLD.js.map → chunk-TYISDI6B.js.map} +0 -0
  732. /package/dist/{chunk-4LMA77JH.js.map → chunk-U2VLVBBH.js.map} +0 -0
  733. /package/dist/{chunk-5ZE7QHTK.js.map → chunk-ULVR5KG7.js.map} +0 -0
  734. /package/dist/{chunk-4B77XSG5.js.map → chunk-UV72DEZD.js.map} +0 -0
  735. /package/dist/{chunk-S2BBISHU.js.map → chunk-VANZKHTN.js.map} +0 -0
  736. /package/dist/{chunk-3Y224NYC.js.map → chunk-VYISFWVX.js.map} +0 -0
  737. /package/dist/{chunk-TIHMZFIV.js.map → chunk-W3IC7QOY.js.map} +0 -0
  738. /package/dist/{chunk-NRV4Y3PM.js.map → chunk-W4FBGYGK.js.map} +0 -0
  739. /package/dist/{chunk-MU7ZHSZE.js.map → chunk-WZFAPHIK.js.map} +0 -0
  740. /package/dist/{chunk-T2TTP3KU.js.map → chunk-X4IDNPOS.js.map} +0 -0
  741. /package/dist/{chunk-BLAKS3CP.js.map → chunk-XL3TATMJ.js.map} +0 -0
  742. /package/dist/{chunk-W4XJFLAL.js.map → chunk-XPRJSHNI.js.map} +0 -0
  743. /package/dist/{chunk-JE7EK33X.js.map → chunk-Y7HRYCNW.js.map} +0 -0
  744. /package/dist/{chunk-E6EE5B67.js.map → chunk-YK6BDDHP.js.map} +0 -0
  745. /package/dist/{chunk-ES36HTSC.js.map → chunk-YLHM5BQQ.js.map} +0 -0
  746. /package/dist/{chunk-BJKPPZ6Z.js.map → chunk-ZFGZ6PZ2.js.map} +0 -0
  747. /package/dist/{chunk-64UDOIMI.js.map → chunk-ZLQ37WJX.js.map} +0 -0
@@ -6,14 +6,14 @@ import {
6
6
  loadSyncState,
7
7
  syncWearableSource,
8
8
  wearableSourceLabel
9
- } from "./chunk-4B77XSG5.js";
9
+ } from "./chunk-UV72DEZD.js";
10
10
  import {
11
11
  CompressionGuidelineCoordinator
12
12
  } from "./chunk-6LKEUCEM.js";
13
13
  import {
14
14
  ActivityStore,
15
15
  MaintenanceScheduler
16
- } from "./chunk-PKNLM44P.js";
16
+ } from "./chunk-JH6BPLOP.js";
17
17
  import {
18
18
  runPeerProfileReasoner
19
19
  } from "./chunk-I74SUMNI.js";
@@ -22,7 +22,7 @@ import {
22
22
  } from "./chunk-7HYPN2GC.js";
23
23
  import {
24
24
  LcmEngine
25
- } from "./chunk-GF22HWS2.js";
25
+ } from "./chunk-6NNNURLK.js";
26
26
  import {
27
27
  chunkTranscriptEntries
28
28
  } from "./chunk-TECVW3JP.js";
@@ -32,19 +32,24 @@ import {
32
32
  import {
33
33
  CompoundingEngine,
34
34
  defaultTierMigrationCycleBudget
35
- } from "./chunk-JVLCVFQ4.js";
35
+ } from "./chunk-KXEFRMCF.js";
36
36
  import {
37
37
  SharedContextManager
38
- } from "./chunk-AS7YMSL6.js";
38
+ } from "./chunk-M23RF3LJ.js";
39
39
  import {
40
40
  applyUtilityPromotionRuntimePolicy,
41
41
  applyUtilityRankingRuntimeDelta,
42
42
  loadUtilityRuntimeValues
43
43
  } from "./chunk-LXOM6IQU.js";
44
44
  import {
45
- shouldPromoteGlobalFactToShared,
46
- withholdToolScopedFromSharedNamespace
47
- } from "./chunk-KWMXR7XS.js";
45
+ TierMigrationExecutor
46
+ } from "./chunk-VOUOLGIP.js";
47
+ import {
48
+ decideTierTransition
49
+ } from "./chunk-S75M5ZRK.js";
50
+ import {
51
+ TmtBuilder
52
+ } from "./chunk-ECZU5BJH.js";
48
53
  import {
49
54
  extractTopics
50
55
  } from "./chunk-UHGBNIOS.js";
@@ -54,18 +59,9 @@ import {
54
59
  import {
55
60
  CODEX_THREAD_KEY_PREFIX
56
61
  } from "./chunk-4EX5WZ4M.js";
57
- import {
58
- TierMigrationExecutor
59
- } from "./chunk-VOUOLGIP.js";
60
- import {
61
- decideTierTransition
62
- } from "./chunk-S75M5ZRK.js";
63
- import {
64
- TmtBuilder
65
- } from "./chunk-ECZU5BJH.js";
66
62
  import {
67
63
  HourlySummarizer
68
- } from "./chunk-EJUEXZHX.js";
64
+ } from "./chunk-LLJMAULE.js";
69
65
  import {
70
66
  buildTargetedFactRecallSection,
71
67
  shouldRecallTargetedFactEvidence
@@ -73,21 +69,12 @@ import {
73
69
  import {
74
70
  SessionObserverState
75
71
  } from "./chunk-QFN4U7AG.js";
76
- import {
77
- RerankCache,
78
- reorderByRankedKeys,
79
- rerankLocalOrNoop
80
- } from "./chunk-LUDXM7MD.js";
81
- import {
82
- buildResponseGuidanceRecallSection,
83
- shouldRecallResponseGuidance
84
- } from "./chunk-6TCXIRP5.js";
85
72
  import {
86
73
  mergeWithAgentResults,
87
74
  runDirectAgent,
88
75
  runTemporalAgent,
89
76
  shouldRunAgent
90
- } from "./chunk-W4XJFLAL.js";
77
+ } from "./chunk-XPRJSHNI.js";
91
78
  import {
92
79
  clearIndexesAsync,
93
80
  deindexMemoriesBatchAsync,
@@ -106,21 +93,27 @@ import {
106
93
  import {
107
94
  applyRuntimeRetrievalPolicy
108
95
  } from "./chunk-5IZL4DCV.js";
109
- import {
110
- findUnresolvedEntityRefs
111
- } from "./chunk-X7XN6YU4.js";
112
96
  import {
113
97
  RelevanceStore
114
98
  } from "./chunk-LULR4IUW.js";
115
99
  import {
116
- createRecallSectionMetricRecorder
117
- } from "./chunk-C3AKM55W.js";
100
+ RerankCache,
101
+ reorderByRankedKeys,
102
+ rerankLocalOrNoop
103
+ } from "./chunk-LUDXM7MD.js";
104
+ import {
105
+ buildResponseGuidanceRecallSection,
106
+ shouldRecallResponseGuidance
107
+ } from "./chunk-6TCXIRP5.js";
118
108
  import {
119
109
  LastRecallStore,
120
110
  RecallHandleHistoryStore,
121
111
  TierMigrationStatusStore,
122
112
  clampGraphRecallExpandedEntries
123
113
  } from "./chunk-NM2WP3B7.js";
114
+ import {
115
+ findUnresolvedEntityRefs
116
+ } from "./chunk-X7XN6YU4.js";
124
117
  import {
125
118
  dedupeResultsByNamespace,
126
119
  hasMemoryForResult,
@@ -132,19 +125,22 @@ import {
132
125
  import {
133
126
  reorderRecallResultsWithMmr
134
127
  } from "./chunk-YDBIWGNI.js";
128
+ import {
129
+ createRecallSectionMetricRecorder
130
+ } from "./chunk-C3AKM55W.js";
135
131
  import {
136
132
  applyReasoningTraceBoost
137
133
  } from "./chunk-ZZTOURJI.js";
138
134
  import {
139
135
  installPrioritizedEmbedding
140
136
  } from "./chunk-ROI7BK7H.js";
141
- import {
142
- NegativeExampleStore
143
- } from "./chunk-23L3IXFD.js";
144
137
  import {
145
138
  applyMemoryWorthFilter,
146
139
  buildMemoryWorthCounterMap
147
140
  } from "./chunk-3GPTTA4J.js";
141
+ import {
142
+ NegativeExampleStore
143
+ } from "./chunk-23L3IXFD.js";
148
144
  import {
149
145
  evaluateMemoryActionPolicy
150
146
  } from "./chunk-H63EDPFJ.js";
@@ -154,9 +150,13 @@ import {
154
150
  import {
155
151
  classifyMemoryKind
156
152
  } from "./chunk-YAZNBMNF.js";
153
+ import {
154
+ buildFocusedListRecallSection,
155
+ shouldRecallFocusedListEvidence
156
+ } from "./chunk-OH7QLI6W.js";
157
157
  import {
158
158
  ExtractionEngine
159
- } from "./chunk-UYLMNVY6.js";
159
+ } from "./chunk-MDISBSYA.js";
160
160
  import {
161
161
  parseMemoryActionEligibilityContext
162
162
  } from "./chunk-CMQZNEIF.js";
@@ -165,11 +165,7 @@ import {
165
165
  } from "./chunk-WLZYGLJ4.js";
166
166
  import {
167
167
  LocalLlmClient
168
- } from "./chunk-WFTIGIIS.js";
169
- import {
170
- buildFocusedListRecallSection,
171
- shouldRecallFocusedListEvidence
172
- } from "./chunk-OH7QLI6W.js";
168
+ } from "./chunk-L6CQ7WIW.js";
173
169
  import {
174
170
  recordJudgeTrainingPair
175
171
  } from "./chunk-PWFCHOB3.js";
@@ -181,9 +177,13 @@ import {
181
177
  validateProcedureExtraction
182
178
  } from "./chunk-K2TDK7GG.js";
183
179
  import {
184
- contentMatchesRedactionRules,
185
- loadRedactionRules
186
- } from "./chunk-LTHVM4XN.js";
180
+ buildExplicitCueRecallSection
181
+ } from "./chunk-TVIVY7KU.js";
182
+ import {
183
+ buildEntityRecallSection,
184
+ entityRecentTranscriptLookbackHours,
185
+ readRecentEntityTranscriptEntries
186
+ } from "./chunk-YMAQDHQM.js";
187
187
  import {
188
188
  buildEventOrderRecallSection,
189
189
  shouldRecallEventOrderEvidence
@@ -193,48 +193,40 @@ import {
193
193
  resolveFactEventTime
194
194
  } from "./chunk-IAIPNEHD.js";
195
195
  import {
196
- buildExplicitCueRecallSection
197
- } from "./chunk-TVIVY7KU.js";
196
+ formatDaySummaryMemories
197
+ } from "./chunk-RPSYDM6C.js";
198
198
  import {
199
199
  tryDirectAnswer
200
- } from "./chunk-Q6IP2ARR.js";
200
+ } from "./chunk-CSOYVTRX.js";
201
201
  import {
202
202
  EmbeddingFallback
203
- } from "./chunk-E6EE5B67.js";
204
- import {
205
- buildEntityRecallSection,
206
- entityRecentTranscriptLookbackHours,
207
- readRecentEntityTranscriptEntries
208
- } from "./chunk-RN7DY3FC.js";
203
+ } from "./chunk-YK6BDDHP.js";
209
204
  import {
210
205
  refreshConvergedNamespaces
211
- } from "./chunk-A5OJCXZL.js";
212
- import {
213
- formatDaySummaryMemories
214
- } from "./chunk-RPSYDM6C.js";
206
+ } from "./chunk-DSUAAZZX.js";
215
207
  import {
216
208
  builtInConnectorPackageSpecifier,
217
209
  ensureBuiltInWearableConnectors,
218
210
  getWearableConnector,
219
211
  listWearableConnectors
220
- } from "./chunk-4UH4BTGK.js";
221
- import {
222
- RoutingRulesStore
223
- } from "./chunk-XL24QQ63.js";
212
+ } from "./chunk-5SNZSWWR.js";
224
213
  import {
225
214
  normalizeReplaySessionKey
226
215
  } from "./chunk-AJVLDJU6.js";
216
+ import {
217
+ RoutingRulesStore
218
+ } from "./chunk-XL24QQ63.js";
227
219
  import {
228
220
  compareVerifiedEpisodeResults,
229
221
  searchVerifiedEpisodes
230
- } from "./chunk-OQ5PRDDS.js";
222
+ } from "./chunk-NTOIP2E6.js";
231
223
  import {
232
224
  ThreadingManager
233
225
  } from "./chunk-OJP3N7UK.js";
234
226
  import {
235
227
  compareVerifiedSemanticRuleResults,
236
228
  searchVerifiedSemanticRules
237
- } from "./chunk-33PLLLL7.js";
229
+ } from "./chunk-P7NGM24P.js";
238
230
  import {
239
231
  searchWorkProductLedgerEntries
240
232
  } from "./chunk-ZRWB5D4H.js";
@@ -247,18 +239,18 @@ import {
247
239
  import {
248
240
  runNamespaceMaintenanceFanout,
249
241
  summarizeNamespaceMaintenanceHealth
250
- } from "./chunk-UVIKWC7M.js";
242
+ } from "./chunk-7YERSTN7.js";
251
243
  import {
252
244
  NamespaceCatalog,
253
245
  planNamespaceMaintenance
254
- } from "./chunk-E5UK4VPE.js";
246
+ } from "./chunk-7SHJHPTY.js";
247
+ import {
248
+ searchHarmonicRetrieval
249
+ } from "./chunk-KVJRXN2E.js";
255
250
  import {
256
251
  isAboveImportanceThreshold,
257
252
  scoreImportance
258
253
  } from "./chunk-JXS5PDQ7.js";
259
- import {
260
- searchHarmonicRetrieval
261
- } from "./chunk-AV5ZEH4M.js";
262
254
  import {
263
255
  EXTRACTION_JUDGE_VERDICT_CATEGORY,
264
256
  recordJudgeVerdict
@@ -274,9 +266,6 @@ import {
274
266
  import {
275
267
  applyCommitmentLedgerLifecycle
276
268
  } from "./chunk-LMDRGRJ2.js";
277
- import {
278
- SmartBuffer
279
- } from "./chunk-4LMA77JH.js";
280
269
  import {
281
270
  buildConsolidationPrompt,
282
271
  buildExtensionsBlockForConsolidation,
@@ -286,32 +275,19 @@ import {
286
275
  materializeAfterSemanticConsolidation,
287
276
  parseConsolidationResponse,
288
277
  parseOperatorAwareConsolidationResponse
289
- } from "./chunk-OAEQLRCY.js";
290
- import {
291
- buildRecallQueryPolicy
292
- } from "./chunk-LBJBNWS2.js";
293
- import {
294
- buildBehaviorSignalsForMemory,
295
- dedupeBehaviorSignalsByMemoryAndHash
296
- } from "./chunk-KD3QD3A5.js";
297
- import {
298
- BootstrapEngine
299
- } from "./chunk-MYVPLJOO.js";
300
- import {
301
- isDisagreementPrompt
302
- } from "./chunk-H3FZVNRN.js";
303
- import {
304
- BoxBuilder
305
- } from "./chunk-B7RWBZXW.js";
278
+ } from "./chunk-TN76AKO3.js";
306
279
  import {
307
280
  semanticChunkContent
308
281
  } from "./chunk-P4BC54KI.js";
309
282
  import {
310
283
  chunkContent
311
284
  } from "./chunk-UQ7RN5HK.js";
285
+ import {
286
+ SmartBuffer
287
+ } from "./chunk-U2VLVBBH.js";
312
288
  import {
313
289
  detectMeetings
314
- } from "./chunk-CUM2BBPN.js";
290
+ } from "./chunk-AUMWZSE7.js";
315
291
  import {
316
292
  compileCorrectionRule,
317
293
  correctionsFilePath,
@@ -323,9 +299,29 @@ import {
323
299
  isValidActivityDate,
324
300
  timezoneOffsetIso
325
301
  } from "./chunk-7RAJ3GXO.js";
302
+ import {
303
+ assertExternalWikiRootOutsideMemoryDirCanonical,
304
+ isExternalWikiCollectionName
305
+ } from "./chunk-JV3C2MNQ.js";
306
+ import {
307
+ buildRecallQueryPolicy
308
+ } from "./chunk-LBJBNWS2.js";
309
+ import {
310
+ buildBehaviorSignalsForMemory,
311
+ dedupeBehaviorSignalsByMemoryAndHash
312
+ } from "./chunk-KD3QD3A5.js";
313
+ import {
314
+ BootstrapEngine
315
+ } from "./chunk-MYVPLJOO.js";
316
+ import {
317
+ isDisagreementPrompt
318
+ } from "./chunk-H3FZVNRN.js";
319
+ import {
320
+ BoxBuilder
321
+ } from "./chunk-B7RWBZXW.js";
326
322
  import {
327
323
  MeetingsInputError
328
- } from "./chunk-VWAXN2BN.js";
324
+ } from "./chunk-XSFHWBQO.js";
329
325
  import {
330
326
  WearablesInputError,
331
327
  describeErrorForOperator
@@ -343,13 +339,17 @@ import {
343
339
  capturePassiveCorrections,
344
340
  clusterByKey,
345
341
  detectPassiveCorrections
346
- } from "./chunk-CJ2ZR7UA.js";
342
+ } from "./chunk-ZI32MKDW.js";
347
343
  import {
348
344
  importCapsule
349
- } from "./chunk-3CE77VAP.js";
345
+ } from "./chunk-A4JMGKCD.js";
350
346
  import {
351
347
  isCodingGraphInstalled
352
348
  } from "./chunk-VQ7B2Q6M.js";
349
+ import {
350
+ listTrustZoneRecords,
351
+ searchTrustZoneRecords
352
+ } from "./chunk-JGSKJHF7.js";
353
353
  import {
354
354
  applyTrustScoreStage,
355
355
  buildTrustSignalsForRerank,
@@ -358,9 +358,8 @@ import {
358
358
  trustResultKey
359
359
  } from "./chunk-GNVZQ5JN.js";
360
360
  import {
361
- listTrustZoneRecords,
362
- searchTrustZoneRecords
363
- } from "./chunk-JGSKJHF7.js";
361
+ buildXraySnapshot
362
+ } from "./chunk-HFPASSFV.js";
364
363
  import {
365
364
  boundRecallContextComposition,
366
365
  composeRecallContext,
@@ -368,18 +367,14 @@ import {
368
367
  formatCuriosityFooter,
369
368
  selectCuriosityQuestion
370
369
  } from "./chunk-AHVEHR6K.js";
371
- import {
372
- buildXraySnapshot
373
- } from "./chunk-TDHTVMPG.js";
374
370
  import {
375
371
  objectiveStateStoreOverrideForNamespace,
376
372
  searchObjectiveStateSnapshots
377
373
  } from "./chunk-6HMYUWXR.js";
378
374
  import {
379
- getConfiguredNamespaces,
380
- resolveNamespaceFromStorageDir,
381
- resolveScopePlan
382
- } from "./chunk-ULARSG5Z.js";
375
+ contentMatchesRedactionRules,
376
+ loadRedactionRules
377
+ } from "./chunk-LTHVM4XN.js";
383
378
  import {
384
379
  ProfilingCollector
385
380
  } from "./chunk-NLE6TSLG.js";
@@ -388,88 +383,34 @@ import {
388
383
  } from "./chunk-QDW3E4RD.js";
389
384
  import {
390
385
  shouldSkipImplicitExtraction
391
- } from "./chunk-5SM35XZR.js";
386
+ } from "./chunk-S5NZBKKQ.js";
392
387
  import {
393
388
  NamespaceSearchRouter,
394
389
  namespaceCollectionName
395
- } from "./chunk-HLPD7B7P.js";
390
+ } from "./chunk-NUEQKLNB.js";
396
391
  import {
397
392
  createConversationIndexRuntime,
398
- createSearchBackend
399
- } from "./chunk-NVRYW264.js";
393
+ createSearchBackend,
394
+ isSearchBackendEnabled
395
+ } from "./chunk-UQWIKLQK.js";
400
396
  import {
401
397
  NoopSearchBackend
402
398
  } from "./chunk-CYEPCZN5.js";
403
399
  import {
404
400
  NamespaceStorageRouter
405
- } from "./chunk-LZ4LDKHZ.js";
401
+ } from "./chunk-CLB32OHM.js";
406
402
  import {
407
403
  writeConversationChunks
408
404
  } from "./chunk-72A4L5JJ.js";
409
405
  import {
410
406
  GraphIndex
411
407
  } from "./chunk-L2DPF4DF.js";
412
- import {
413
- BulkImportBatchPartialFailureError,
414
- COMPACTION_SIGNAL_MAX_AGE_MS,
415
- ExtractionDeadlineError,
416
- ExtractionRunCoordinator,
417
- abortRecallError,
418
- appendMemoryToGraphContext,
419
- applyQueryAwareCandidateFilter,
420
- buildMemoryPathById,
421
- buildQmdIntentHint,
422
- computeArtifactCandidateFetchLimit,
423
- computeArtifactRecallLimit,
424
- computeQmdHybridFetchLimit,
425
- defaultWorkspaceDir,
426
- filterHourlySummaryMarkdownForLocalDay,
427
- formatDateInTimeZone,
428
- isActivityDigestPath,
429
- isArtifactMemoryPath,
430
- isMeetingRecordPath,
431
- lifecycleRecallScoreAdjustment,
432
- mapRecallSourceToXrayServedBy,
433
- mergeArtifactRecallCandidates,
434
- normalizeIanaTimeZone,
435
- parseFiniteDate,
436
- parseGraphRecallRankedResults,
437
- parseMemoryIntentSnapshot,
438
- parseQmdRecallResults,
439
- qmdStartupCollectionCheckWithTimeout,
440
- raceRecallAbort,
441
- resolvePersistedMemoryRelativePath,
442
- resolveRecallModeDecision,
443
- resolveRecallModeDecisionAsync,
444
- resolveRecentThreadMemoryPaths,
445
- sanitizeSessionKeyForFilename,
446
- shouldFilterLifecycleRecallCandidate,
447
- splitTurnsBySourceValidAt,
448
- summarizeGraphShadowComparison,
449
- targetSourceValidAtSortMs,
450
- throwIfRecallAborted,
451
- tokenizeRecallQuery,
452
- utcDateKeysForLocalDay
453
- } from "./chunk-ECK75GDJ.js";
454
- import {
455
- resolveCodingNamespaceOverlay
456
- } from "./chunk-BUE5E2HL.js";
457
- import {
458
- inferIntentFromText,
459
- intentCompatibilityScore,
460
- isTaskInitiationIntent,
461
- planRecallMode
462
- } from "./chunk-PD6O7AXF.js";
463
408
  import {
464
409
  searchCausalTrajectories
465
- } from "./chunk-NRV4Y3PM.js";
466
- import {
467
- decideLifecycleTransition,
468
- resolveLifecycleState
469
- } from "./chunk-TBBDFYXW.js";
410
+ } from "./chunk-W4FBGYGK.js";
470
411
  import {
471
412
  buildChainFollowupGenerator
472
- } from "./chunk-QN25OCUF.js";
413
+ } from "./chunk-TQ4GD737.js";
473
414
  import {
474
415
  QmdResultResolver,
475
416
  StorageManager,
@@ -488,7 +429,7 @@ import {
488
429
  reconstructFusionInputs,
489
430
  selfDeps,
490
431
  serializeFusionDay
491
- } from "./chunk-E6PNLPGJ.js";
432
+ } from "./chunk-FZP32336.js";
492
433
  import {
493
434
  bodyIsEscaped,
494
435
  decodeTranscriptBody,
@@ -502,6 +443,11 @@ import {
502
443
  import {
503
444
  buildRetiredFactTombstoneInputs
504
445
  } from "./chunk-ENTCVTQR.js";
446
+ import {
447
+ canRecallToolScopedMemory,
448
+ shouldPromoteGlobalFactToShared,
449
+ withholdToolScopedFromSharedNamespace
450
+ } from "./chunk-S2V7RUCL.js";
505
451
  import {
506
452
  attachCitation,
507
453
  hasCitationForTemplate,
@@ -509,19 +455,7 @@ import {
509
455
  } from "./chunk-J6A3CX5N.js";
510
456
  import {
511
457
  confidenceTier
512
- } from "./chunk-J7VGGECD.js";
513
- import {
514
- namespaceIdentityFromToken,
515
- namespaceIdentityToken,
516
- normalizeNamespaceIdentity
517
- } from "./chunk-EGGE52UU.js";
518
- import {
519
- assertPathInsideRoot
520
- } from "./chunk-GCASGYIO.js";
521
- import {
522
- inferMemoryStatus,
523
- isActiveMemoryStatus
524
- } from "./chunk-7RJUVTVF.js";
458
+ } from "./chunk-DZPFMQZ7.js";
525
459
  import {
526
460
  lintWorkspaceFiles,
527
461
  rotateMarkdownFileToArchive
@@ -531,9 +465,6 @@ import {
531
465
  createFaithfulnessCounters,
532
466
  runFaithfulnessGateBatch
533
467
  } from "./chunk-JYIJNNN3.js";
534
- import {
535
- ContentHashIndex
536
- } from "./chunk-S5SLVSVY.js";
537
468
  import {
538
469
  TAG_LIMITS,
539
470
  composeMemoryEnvelope,
@@ -557,8 +488,9 @@ import {
557
488
  repairContentAfterJournalMove,
558
489
  repairContentAfterJournalMoveSync,
559
490
  requestEntityCanonicalIdReconcile,
560
- requestEntityCanonicalIdReconcileSync
561
- } from "./chunk-4J7G5SY4.js";
491
+ requestEntityCanonicalIdReconcileSync,
492
+ withRawEntityPageMutation
493
+ } from "./chunk-NZBZ7IS2.js";
562
494
  import {
563
495
  applyTemporalSupersession,
564
496
  normalizeSupersessionKey,
@@ -569,6 +501,54 @@ import {
569
501
  isValidAsOf,
570
502
  isValidityExpiredNow
571
503
  } from "./chunk-6CIAGZ6X.js";
504
+ import {
505
+ BulkImportBatchPartialFailureError,
506
+ COMPACTION_SIGNAL_MAX_AGE_MS,
507
+ ExtractionDeadlineError,
508
+ ExtractionRunCoordinator,
509
+ abortRecallError,
510
+ appendMemoryToGraphContext,
511
+ applyQueryAwareCandidateFilter,
512
+ buildMemoryPathById,
513
+ buildQmdIntentHint,
514
+ computeArtifactCandidateFetchLimit,
515
+ computeArtifactRecallLimit,
516
+ computeQmdHybridFetchLimit,
517
+ defaultWorkspaceDir,
518
+ filterHourlySummaryMarkdownForLocalDay,
519
+ formatDateInTimeZone,
520
+ isActivityDigestPath,
521
+ isArtifactMemoryPath,
522
+ isMeetingRecordPath,
523
+ lifecycleRecallScoreAdjustment,
524
+ mapRecallSourceToXrayServedBy,
525
+ mergeArtifactRecallCandidates,
526
+ normalizeIanaTimeZone,
527
+ parseFiniteDate,
528
+ parseGraphRecallRankedResults,
529
+ parseMemoryIntentSnapshot,
530
+ parseQmdRecallResults,
531
+ qmdStartupCollectionCheckWithTimeout,
532
+ raceRecallAbort,
533
+ resolvePersistedMemoryRelativePath,
534
+ resolveRecallModeDecision,
535
+ resolveRecallModeDecisionAsync,
536
+ resolveRecentThreadMemoryPaths,
537
+ sanitizeSessionKeyForFilename,
538
+ shouldFilterLifecycleRecallCandidate,
539
+ splitTurnsBySourceValidAt,
540
+ summarizeGraphShadowComparison,
541
+ targetSourceValidAtSortMs,
542
+ throwIfRecallAborted,
543
+ tokenizeRecallQuery,
544
+ utcDateKeysForLocalDay
545
+ } from "./chunk-WQIHRA5F.js";
546
+ import {
547
+ inferIntentFromText,
548
+ intentCompatibilityScore,
549
+ isTaskInitiationIntent,
550
+ planRecallMode
551
+ } from "./chunk-PD6O7AXF.js";
572
552
  import {
573
553
  buildQmdRecallCacheKey,
574
554
  getCachedQmdRecall,
@@ -582,19 +562,16 @@ import {
582
562
  import {
583
563
  sanitizeMemoryContent
584
564
  } from "./chunk-5GKPFL3S.js";
585
- import {
586
- expandTildePath
587
- } from "./chunk-EYIEWJNI.js";
588
- import {
589
- readEnvVar,
590
- resolveHomeDir
591
- } from "./chunk-JUC24CTX.js";
592
565
  import {
593
566
  MEMORY_ID_PATTERN,
594
567
  parseIdOrHandle,
595
568
  resolveHandle,
596
569
  stripHandles
597
570
  } from "./chunk-JAKIDQB2.js";
571
+ import {
572
+ decideLifecycleTransition,
573
+ resolveLifecycleState
574
+ } from "./chunk-TBBDFYXW.js";
598
575
  import {
599
576
  CAPSULE_ID_PATTERN
600
577
  } from "./chunk-WEHSQBFR.js";
@@ -605,6 +582,26 @@ import {
605
582
  import {
606
583
  buildRetrievedMemoryProvenance
607
584
  } from "./chunk-I4WBNM3M.js";
585
+ import {
586
+ getConfiguredNamespaces,
587
+ resolveNamespaceFromStorageDir,
588
+ resolveScopePlan
589
+ } from "./chunk-YN6ASZUG.js";
590
+ import {
591
+ namespaceIdentityFromToken,
592
+ namespaceIdentityToken,
593
+ normalizeNamespaceIdentity
594
+ } from "./chunk-EGGE52UU.js";
595
+ import {
596
+ inferMemoryStatus,
597
+ isActiveMemoryStatus
598
+ } from "./chunk-7RJUVTVF.js";
599
+ import {
600
+ assertPathInsideRoot
601
+ } from "./chunk-GCASGYIO.js";
602
+ import {
603
+ ContentHashIndex
604
+ } from "./chunk-BQIFZ2MP.js";
608
605
  import {
609
606
  assertIsDirectoryNotSymlink,
610
607
  assertRealpathInsideRoot
@@ -640,17 +637,27 @@ import {
640
637
  resolveSecurityCapabilities,
641
638
  resolveUtilityLearningCapabilities
642
639
  } from "./chunk-2XRE6FLM.js";
640
+ import {
641
+ resolveCodingNamespaceOverlay
642
+ } from "./chunk-J2WC5LF4.js";
643
+ import {
644
+ expandTildePath
645
+ } from "./chunk-EYIEWJNI.js";
646
+ import {
647
+ readEnvVar,
648
+ resolveHomeDir
649
+ } from "./chunk-JUC24CTX.js";
643
650
  import {
644
651
  abortError,
645
652
  isAbortError,
646
653
  throwIfAborted
647
- } from "./chunk-PVGDJXVK.js";
654
+ } from "./chunk-BTTPKDIL.js";
648
655
  import {
649
656
  isPathInsideStorageRoot
650
657
  } from "./chunk-FF4KLI5W.js";
651
658
  import {
652
659
  SecureStoreLockedError
653
- } from "./chunk-5TFP4CUL.js";
660
+ } from "./chunk-XQ3HXAQH.js";
654
661
  import {
655
662
  ALL_CATEGORY_DIRS,
656
663
  ALL_CATEGORY_KEYS,
@@ -1959,6 +1966,9 @@ ${r.snippet.trim()}
1959
1966
  };
1960
1967
 
1961
1968
  // src/orchestration/recall-rerank-coordinator.ts
1969
+ function reconcileRecallResultPartition(partition, appliedResults) {
1970
+ return partition ? { appliedResults, headroomResults: partition.headroomResults } : null;
1971
+ }
1962
1972
  var RecallRerankCoordinator = class _RecallRerankCoordinator {
1963
1973
  getConfig;
1964
1974
  getStorage;
@@ -2256,16 +2266,38 @@ var RecallRerankCoordinator = class _RecallRerankCoordinator {
2256
2266
  }
2257
2267
  return { results, trustByPath: null };
2258
2268
  }
2259
- diversifyAndLimitRecallResults(sectionId, results, limit, retrievalQuery, caps = resolveCapabilities(this.getConfig())) {
2269
+ diversifyRecallResultsWithHeadroom(sectionId, results, limit, retrievalQuery, caps = resolveCapabilities(this.getConfig())) {
2260
2270
  const safeLimit = typeof limit === "number" && Number.isFinite(limit) ? Math.max(0, Math.floor(limit)) : 0;
2261
- if (!Array.isArray(results) || results.length === 0) return [];
2262
- if (safeLimit === 0) return [];
2263
- const boosted = caps.recallReasoningTraceBoost && typeof retrievalQuery === "string" ? applyReasoningTraceBoost(results, {
2264
- enabled: true,
2265
- query: retrievalQuery
2266
- }) : results;
2267
- const diversified = this.applyMmrToQmdResults(sectionId, boosted, caps);
2268
- return diversified.slice(0, safeLimit);
2271
+ const candidates = Array.isArray(results) ? results : [];
2272
+ let orderedPool;
2273
+ const resolveOrderedPool = () => {
2274
+ if (orderedPool) return orderedPool;
2275
+ const boosted = caps.recallReasoningTraceBoost && typeof retrievalQuery === "string" ? applyReasoningTraceBoost(candidates, {
2276
+ enabled: true,
2277
+ query: retrievalQuery
2278
+ }) : candidates;
2279
+ orderedPool = this.applyMmrToQmdResults(sectionId, boosted, caps);
2280
+ return orderedPool;
2281
+ };
2282
+ return {
2283
+ get appliedResults() {
2284
+ if (safeLimit === 0 || candidates.length === 0) return [];
2285
+ return resolveOrderedPool().slice(0, safeLimit);
2286
+ },
2287
+ get headroomResults() {
2288
+ if (candidates.length === 0) return [];
2289
+ return resolveOrderedPool().slice(safeLimit);
2290
+ }
2291
+ };
2292
+ }
2293
+ diversifyAndLimitRecallResults(sectionId, results, limit, retrievalQuery, caps = resolveCapabilities(this.getConfig())) {
2294
+ return this.diversifyRecallResultsWithHeadroom(
2295
+ sectionId,
2296
+ results,
2297
+ limit,
2298
+ retrievalQuery,
2299
+ caps
2300
+ ).appliedResults;
2269
2301
  }
2270
2302
  /**
2271
2303
  * Apply Maximal Marginal Relevance to a section's ordered candidate list.
@@ -3593,7 +3625,8 @@ var ExtractionPersistCoordinator = class {
3593
3625
  ...options.eventTimeSource ? { eventTimeSource: options.eventTimeSource } : {},
3594
3626
  contentHashSource: options.category === "fact" ? dedupContent : rawContent,
3595
3627
  ...options.sources && options.sources.length > 0 ? { sources: options.sources } : {},
3596
- ...options.provenance ? { provenance: options.provenance } : {}
3628
+ ...options.provenance ? { provenance: options.provenance } : {},
3629
+ ...options.toolScoped ? { toolScoped: true } : {}
3597
3630
  });
3598
3631
  const promotedId = targetPromotion.id;
3599
3632
  if (!targetPromotion.tombstoneBlocked && lifecycleCaps.temporalSupersession && options.category === "fact" && targetPromotionEnvelope.entityRef && targetSurvivingAttrs && Object.keys(targetSurvivingAttrs).length > 0) {
@@ -3635,8 +3668,12 @@ var ExtractionPersistCoordinator = class {
3635
3668
  }
3636
3669
  };
3637
3670
  const promoteMemoryToShared = async (options) => {
3638
- await promoteMemoryToProfileTargets(options);
3639
- if (lifecycleCaps.extractionScopeClassification && withholdToolScopedFromSharedNamespace(options)) return;
3671
+ const toolScoped = withholdToolScopedFromSharedNamespace(options);
3672
+ await promoteMemoryToProfileTargets({
3673
+ ...options,
3674
+ ...toolScoped ? { toolScoped: true } : {}
3675
+ });
3676
+ if (lifecycleCaps.extractionScopeClassification && toolScoped) return;
3640
3677
  if (!shouldPromoteToShared(
3641
3678
  this.deps.config,
3642
3679
  scopeProfileWritePlan,
@@ -3795,7 +3832,8 @@ var ExtractionPersistCoordinator = class {
3795
3832
  contentHashSource: options.category === "fact" ? dedupContent : rawContent,
3796
3833
  // Claim-level provenance spans (issue #1575 PR 2).
3797
3834
  ...options.sources && options.sources.length > 0 ? { sources: options.sources } : {},
3798
- ...options.provenance ? { provenance: options.provenance } : {}
3835
+ ...options.provenance ? { provenance: options.provenance } : {},
3836
+ ...toolScoped ? { toolScoped: true } : {}
3799
3837
  });
3800
3838
  const promotedId = sharedPromotion.id;
3801
3839
  if (!sharedPromotion.tombstoneBlocked && lifecycleCaps.temporalSupersession && sharedPromotionEnvelope.entityRef && sharedSurvivingAttrs && Object.keys(sharedSurvivingAttrs).length > 0) {
@@ -4418,6 +4456,11 @@ var ExtractionPersistCoordinator = class {
4418
4456
  ) : null;
4419
4457
  const extractionWriteSource = fact.source === "proactive" ? "extraction-proactive" : "extraction";
4420
4458
  const extractionSourceConnector = sourceContext?.sourceConnector;
4459
+ const factToolScoped = withholdToolScopedFromSharedNamespace({
4460
+ content: fact.content,
4461
+ sourceConnector: extractionSourceConnector,
4462
+ procedureSteps: fact.procedureSteps
4463
+ });
4421
4464
  let supersedes;
4422
4465
  let links = [];
4423
4466
  let contradictionDetected = false;
@@ -4510,7 +4553,8 @@ var ExtractionPersistCoordinator = class {
4510
4553
  ...fact.provenance ? { provenance: fact.provenance } : {},
4511
4554
  // PR #2016: never defer here — fallible chunk/artifact writes follow this
4512
4555
  // durable parent .md; flush the hash now so a throw can't strand it (dup).
4513
- deferHashIndexSave: false
4556
+ deferHashIndexSave: false,
4557
+ ...factToolScoped ? { toolScoped: true } : {}
4514
4558
  });
4515
4559
  const parentId = parentWrite.id;
4516
4560
  const tombstoneBlocked2 = parentWrite.tombstoneBlocked;
@@ -4570,7 +4614,8 @@ var ExtractionPersistCoordinator = class {
4570
4614
  // the verified span (chatgpt-codex-connector thread Ocvmo).
4571
4615
  ...fact.sources && fact.sources.length > 0 ? { sources: fact.sources } : {},
4572
4616
  ...fact.provenance ? { provenance: fact.provenance } : {},
4573
- ...extractionSourceConnector ? { sourceConnector: extractionSourceConnector } : {}
4617
+ ...extractionSourceConnector ? { sourceConnector: extractionSourceConnector } : {},
4618
+ ...factToolScoped ? { toolScoped: true } : {}
4574
4619
  }
4575
4620
  );
4576
4621
  }
@@ -4663,7 +4708,8 @@ var ExtractionPersistCoordinator = class {
4663
4708
  intentGoal: inferredIntent?.goal,
4664
4709
  intentActionType: inferredIntent?.actionType,
4665
4710
  intentEntityTypes: inferredIntent?.entityTypes,
4666
- ...extractionSourceConnector ? { sourceConnector: extractionSourceConnector } : {}
4711
+ ...extractionSourceConnector ? { sourceConnector: extractionSourceConnector } : {},
4712
+ ...factToolScoped ? { toolScoped: true } : {}
4667
4713
  });
4668
4714
  }
4669
4715
  if (graphCaps.multiGraphMemory && !postWriteGuard2) {
@@ -4765,7 +4811,8 @@ var ExtractionPersistCoordinator = class {
4765
4811
  ...fact.provenance ? { provenance: fact.provenance } : {},
4766
4812
  // #1909: defer the per-fact index flush to the batch save only when
4767
4813
  // fact dedup is on (the batch saver is a no-op otherwise).
4768
- deferHashIndexSave: factDedupEnabled
4814
+ deferHashIndexSave: factDedupEnabled,
4815
+ ...factToolScoped ? { toolScoped: true } : {}
4769
4816
  });
4770
4817
  const memoryId = factWrite.id;
4771
4818
  const tombstoneBlocked = factWrite.tombstoneBlocked;
@@ -4888,7 +4935,8 @@ var ExtractionPersistCoordinator = class {
4888
4935
  intentGoal: inferredIntent?.goal,
4889
4936
  intentActionType: inferredIntent?.actionType,
4890
4937
  intentEntityTypes: inferredIntent?.entityTypes,
4891
- ...extractionSourceConnector ? { sourceConnector: extractionSourceConnector } : {}
4938
+ ...extractionSourceConnector ? { sourceConnector: extractionSourceConnector } : {},
4939
+ ...factToolScoped ? { toolScoped: true } : {}
4892
4940
  });
4893
4941
  }
4894
4942
  try {
@@ -5360,7 +5408,7 @@ ${(m.frontmatter.tags ?? []).join(" ")}`;
5360
5408
  const intentScore = intentCompatibilityScore(queryIntent, memIntent);
5361
5409
  return jaccard * 0.55 + intentScore * 0.45;
5362
5410
  }
5363
- async function buildProcedureRecallSection(storage, prompt, config) {
5411
+ async function buildProcedureRecallSection(storage, prompt, config, options) {
5364
5412
  if (config.procedural?.enabled !== true) return null;
5365
5413
  const trimmed = typeof prompt === "string" ? prompt.trim() : "";
5366
5414
  if (!trimmed) return null;
@@ -5375,7 +5423,7 @@ async function buildProcedureRecallSection(storage, prompt, config) {
5375
5423
  );
5376
5424
  const all = await storage.readAllMemories();
5377
5425
  const scored = all.filter(
5378
- (m) => m.frontmatter.category === "procedure" && isActiveMemoryStatus(m.frontmatter.status)
5426
+ (m) => m.frontmatter.category === "procedure" && isActiveMemoryStatus(m.frontmatter.status) && (options?.partitionToolScoped !== true || canRecallToolScopedMemory(m.frontmatter, options.requestingConnector))
5379
5427
  ).map((m) => ({ m, score: scoreProcedureForPrompt(m, trimmed, queryIntent) })).filter((x) => x.score > 0.04).sort((a, b) => b.score - a.score).slice(0, maxN);
5380
5428
  if (scored.length === 0) return null;
5381
5429
  const blocks = scored.map(({ m, score }) => {
@@ -5432,8 +5480,15 @@ function isTopLevelArchivePath(filePath, policy = {}, source = "filesystem") {
5432
5480
  const normalized = !isAbsolutePath ? stripQmdCollectionPrefix(relative, policy, source) : relative;
5433
5481
  return /^(?:archive|namespaces[\\/][^\\/]+[\\/]archive)(?:[\\/]|$)/i.test(normalized);
5434
5482
  }
5483
+ function isExternalWikiQmdPath(filePath, source) {
5484
+ if (source !== "qmd") return false;
5485
+ const normalized = normalizeQmdUriPath(filePath, source).replace(/\\/g, "/");
5486
+ const slashIndex = normalized.indexOf("/");
5487
+ const collection = slashIndex === -1 ? normalized : normalized.slice(0, slashIndex);
5488
+ return isExternalWikiCollectionName(collection);
5489
+ }
5435
5490
  function isGenericRecallExcludedPath(filePath, policy = {}, source = "filesystem") {
5436
- return isArtifactMemoryPath(filePath) || isActivityDigestPath(filePath, policy.memoryDir) || isTopLevelArchivePath(filePath, policy, source) || isMeetingRecordPath(filePath);
5491
+ return isExternalWikiQmdPath(filePath, source) || isArtifactMemoryPath(filePath) || isActivityDigestPath(filePath, policy.memoryDir) || isTopLevelArchivePath(filePath, policy, source) || isMeetingRecordPath(filePath);
5437
5492
  }
5438
5493
  function filterRecallCandidates(candidates, options) {
5439
5494
  const pathPolicy = options.pathPolicy ?? (options.memoryRoot === void 0 ? void 0 : { memoryDir: options.memoryRoot });
@@ -5544,6 +5599,7 @@ var RecallInternalCoordinator = class {
5544
5599
  recent_scan: 0
5545
5600
  };
5546
5601
  const xrayColdPoolSink = { size: 0 };
5602
+ let selectedResultPartition = null;
5547
5603
  let identityInjectionModeUsed = "none";
5548
5604
  let identityInjectedChars = 0;
5549
5605
  let identityInjectionTruncated = false;
@@ -5716,6 +5772,7 @@ var RecallInternalCoordinator = class {
5716
5772
  query: retrievalQuery,
5717
5773
  tierExplain: null,
5718
5774
  results: [],
5775
+ appliedResultLimit: recallResultLimit,
5719
5776
  filters: [
5720
5777
  {
5721
5778
  name: "planner-mode",
@@ -6303,7 +6360,9 @@ ${rows.join("\n")}
6303
6360
  source: "fresh",
6304
6361
  success: true
6305
6362
  });
6306
- return results;
6363
+ return lifecycleCaps.extractionScopeClassification ? results.filter(
6364
+ (artifact) => canRecallToolScopedMemory(artifact.frontmatter, options.sourceConnector)
6365
+ ) : results;
6307
6366
  })();
6308
6367
  const objectiveStatePromise = (async () => {
6309
6368
  const t0 = Date.now();
@@ -7532,7 +7591,11 @@ ${formatted}`;
7532
7591
  return await buildProcedureRecallSection(
7533
7592
  profileStorage,
7534
7593
  retrievalQuery,
7535
- this.deps.config
7594
+ this.deps.config,
7595
+ {
7596
+ partitionToolScoped: lifecycleCaps.extractionScopeClassification,
7597
+ requestingConnector: options.sourceConnector
7598
+ }
7536
7599
  );
7537
7600
  } catch (err) {
7538
7601
  log.debug(
@@ -8359,7 +8422,8 @@ ${tmtNode.summary}`
8359
8422
  deadlineAtMs: qmdWasSettledBeforeAssemblyWait ? null : enrichmentAssemblyDeadlineAtMs,
8360
8423
  abortSignal: options.abortSignal,
8361
8424
  dropUnresolved: true,
8362
- recallNamespaces
8425
+ recallNamespaces,
8426
+ requestingConnector: options.sourceConnector
8363
8427
  }
8364
8428
  );
8365
8429
  memoryResults = await awaitAssemblyStep(
@@ -8369,7 +8433,7 @@ ${tmtNode.summary}`
8369
8433
  recallNamespaces,
8370
8434
  retrievalQuery,
8371
8435
  qmdBoostInput.memoryByPath,
8372
- { asOfMs }
8436
+ { asOfMs, requestingConnector: options.sourceConnector }
8373
8437
  ),
8374
8438
  qmdBoostInput.results
8375
8439
  );
@@ -8440,7 +8504,14 @@ ${tmtNode.summary}`
8440
8504
  confidenceGateRejected = true;
8441
8505
  }
8442
8506
  }
8443
- memoryResults = this.deps.diversifyAndLimitRecallResults(
8507
+ const hotQmdPartition = options.xrayCapture === true ? this.deps.recallRerankCoordinator.diversifyRecallResultsWithHeadroom(
8508
+ "memories",
8509
+ memoryResults,
8510
+ recallResultLimit,
8511
+ retrievalQuery,
8512
+ caps
8513
+ ) : null;
8514
+ memoryResults = hotQmdPartition ? [...hotQmdPartition.appliedResults] : this.deps.diversifyAndLimitRecallResults(
8444
8515
  "memories",
8445
8516
  memoryResults,
8446
8517
  recallResultLimit,
@@ -8491,6 +8562,7 @@ ${tmtNode.summary}`
8491
8562
  }
8492
8563
  recallSource = "hot_qmd";
8493
8564
  recalledMemoryCount = memoryResults.length;
8565
+ selectedResultPartition = hotQmdPartition;
8494
8566
  this.deps.publishRecallResults({
8495
8567
  title: "Relevant Memories",
8496
8568
  results: memoryResults,
@@ -8535,22 +8607,30 @@ ${tmtNode.summary}`
8535
8607
  recallNamespaces,
8536
8608
  retrievalQuery,
8537
8609
  void 0,
8538
- { asOfMs }
8610
+ { asOfMs, requestingConnector: options.sourceConnector }
8539
8611
  );
8540
8612
  xrayBranchPoolSize.hot_embedding = Math.max(
8541
8613
  xrayBranchPoolSize.hot_embedding,
8542
8614
  boostedScoped.length
8543
8615
  );
8544
- return this.deps.diversifyAndLimitRecallResults(
8545
- "memories",
8546
- boostedScoped,
8547
- recallResultLimit,
8548
- retrievalQuery,
8549
- caps
8550
- );
8616
+ return boostedScoped;
8551
8617
  },
8552
8618
  []
8553
8619
  );
8620
+ const embeddingPartition = options.xrayCapture === true ? this.deps.recallRerankCoordinator.diversifyRecallResultsWithHeadroom(
8621
+ "memories",
8622
+ scoped,
8623
+ recallResultLimit,
8624
+ retrievalQuery,
8625
+ caps
8626
+ ) : null;
8627
+ scoped = embeddingPartition?.appliedResults ?? this.deps.diversifyAndLimitRecallResults(
8628
+ "memories",
8629
+ scoped,
8630
+ recallResultLimit,
8631
+ retrievalQuery,
8632
+ caps
8633
+ );
8554
8634
  {
8555
8635
  const trustT0 = Date.now();
8556
8636
  const trustFallback = { results: scoped, trustByPath: recallTrustByPath };
@@ -8587,6 +8667,7 @@ ${tmtNode.summary}`
8587
8667
  }
8588
8668
  recallSource = "hot_embedding";
8589
8669
  recalledMemoryCount = scoped.length;
8670
+ selectedResultPartition = reconcileRecallResultPartition(embeddingPartition, scoped);
8590
8671
  this.deps.publishRecallResults({
8591
8672
  title: "Relevant Memories",
8592
8673
  results: scoped,
@@ -8603,6 +8684,7 @@ ${tmtNode.summary}`
8603
8684
  recalledMemoryPaths = scoped.map((result) => result.path).filter(Boolean);
8604
8685
  xrayRecalledResults = scoped;
8605
8686
  } else {
8687
+ const coldPartitionSink = options.xrayCapture === true ? { partition: null } : void 0;
8606
8688
  const longTerm = await this.deps.applyColdFallbackPipeline({
8607
8689
  prompt: retrievalQuery,
8608
8690
  recallNamespaces,
@@ -8616,9 +8698,11 @@ ${tmtNode.summary}`
8616
8698
  backendDegradations.push(degradation);
8617
8699
  },
8618
8700
  xrayPoolSizeSink: xrayColdPoolSink,
8701
+ resultPartitionSink: coldPartitionSink,
8619
8702
  trustByPathSink,
8620
8703
  deadlineAtMs: enrichmentAssemblyDeadlineAtMs,
8621
8704
  asOfMs,
8705
+ requestingConnector: options.sourceConnector,
8622
8706
  ...options.includeLowConfidence === true ? { includeLowConfidence: true } : {}
8623
8707
  });
8624
8708
  recallTrustByPath = trustByPathSink.trustByPath;
@@ -8631,6 +8715,7 @@ ${tmtNode.summary}`
8631
8715
  }
8632
8716
  recallSource = "cold_fallback";
8633
8717
  recalledMemoryCount = longTerm.length;
8718
+ selectedResultPartition = coldPartitionSink?.partition ?? null;
8634
8719
  this.deps.publishRecallResults({
8635
8720
  title: "Long-Term Memories (Fallback)",
8636
8721
  results: longTerm,
@@ -8710,22 +8795,30 @@ ${tmtNode.summary}`
8710
8795
  recallNamespaces,
8711
8796
  retrievalQuery,
8712
8797
  void 0,
8713
- { asOfMs }
8798
+ { asOfMs, requestingConnector: options.sourceConnector }
8714
8799
  );
8715
8800
  xrayBranchPoolSize.hot_embedding = Math.max(
8716
8801
  xrayBranchPoolSize.hot_embedding,
8717
8802
  boostedScoped.length
8718
8803
  );
8719
- return this.deps.diversifyAndLimitRecallResults(
8720
- "memories",
8721
- boostedScoped,
8722
- recallResultLimit,
8723
- retrievalQuery,
8724
- caps
8725
- );
8804
+ return boostedScoped;
8726
8805
  },
8727
8806
  []
8728
8807
  );
8808
+ const embeddingPartition = options.xrayCapture === true ? this.deps.recallRerankCoordinator.diversifyRecallResultsWithHeadroom(
8809
+ "memories",
8810
+ scoped,
8811
+ recallResultLimit,
8812
+ retrievalQuery,
8813
+ caps
8814
+ ) : null;
8815
+ scoped = embeddingPartition?.appliedResults ?? this.deps.diversifyAndLimitRecallResults(
8816
+ "memories",
8817
+ scoped,
8818
+ recallResultLimit,
8819
+ retrievalQuery,
8820
+ caps
8821
+ );
8729
8822
  {
8730
8823
  const trustT0 = Date.now();
8731
8824
  const trustFallback = { results: scoped, trustByPath: recallTrustByPath };
@@ -8762,6 +8855,7 @@ ${tmtNode.summary}`
8762
8855
  }
8763
8856
  recallSource = "hot_embedding";
8764
8857
  recalledMemoryCount = scoped.length;
8858
+ selectedResultPartition = reconcileRecallResultPartition(embeddingPartition, scoped);
8765
8859
  this.deps.publishRecallResults({
8766
8860
  title: "Relevant Memories",
8767
8861
  results: scoped,
@@ -8805,6 +8899,7 @@ ${tmtNode.summary}`
8805
8899
  (memory) => queryAwarePrefilter.candidatePaths?.has(memory.path)
8806
8900
  ) : activeMemories;
8807
8901
  if (queryAwarePrefilter.candidatePaths && queryAwareScopedMemories.length === 0) {
8902
+ const coldPartitionSink = options.xrayCapture === true ? { partition: null } : void 0;
8808
8903
  const longTerm = await this.deps.applyColdFallbackPipeline({
8809
8904
  prompt: retrievalQuery,
8810
8905
  recallNamespaces,
@@ -8818,15 +8913,18 @@ ${tmtNode.summary}`
8818
8913
  backendDegradations.push(degradation);
8819
8914
  },
8820
8915
  xrayPoolSizeSink: xrayColdPoolSink,
8916
+ resultPartitionSink: coldPartitionSink,
8821
8917
  trustByPathSink,
8822
8918
  deadlineAtMs: enrichmentAssemblyDeadlineAtMs,
8823
8919
  asOfMs,
8920
+ requestingConnector: options.sourceConnector,
8824
8921
  ...options.includeLowConfidence === true ? { includeLowConfidence: true } : {}
8825
8922
  });
8826
8923
  recallTrustByPath = trustByPathSink.trustByPath;
8827
8924
  if (longTerm.length > 0) {
8828
8925
  recallSource = "cold_fallback";
8829
8926
  recalledMemoryCount = longTerm.length;
8927
+ selectedResultPartition = coldPartitionSink?.partition ?? null;
8830
8928
  this.deps.publishRecallResults({
8831
8929
  title: "Long-Term Memories (Fallback)",
8832
8930
  results: longTerm,
@@ -8867,22 +8965,30 @@ ${tmtNode.summary}`
8867
8965
  recallNamespaces,
8868
8966
  retrievalQuery,
8869
8967
  preloadedMap,
8870
- { asOfMs }
8968
+ { asOfMs, requestingConnector: options.sourceConnector }
8871
8969
  )).sort((a, b) => b.score - a.score);
8872
8970
  xrayBranchPoolSize.recent_scan = Math.max(
8873
8971
  xrayBranchPoolSize.recent_scan,
8874
8972
  boostedRecent.length
8875
8973
  );
8876
- return this.deps.diversifyAndLimitRecallResults(
8877
- "memories",
8878
- boostedRecent,
8879
- recallResultLimit,
8880
- retrievalQuery,
8881
- caps
8882
- );
8974
+ return boostedRecent;
8883
8975
  },
8884
8976
  []
8885
8977
  );
8978
+ const recentPartition = options.xrayCapture === true ? this.deps.recallRerankCoordinator.diversifyRecallResultsWithHeadroom(
8979
+ "memories",
8980
+ recent,
8981
+ recallResultLimit,
8982
+ retrievalQuery,
8983
+ caps
8984
+ ) : null;
8985
+ recent = recentPartition?.appliedResults ?? this.deps.diversifyAndLimitRecallResults(
8986
+ "memories",
8987
+ recent,
8988
+ recallResultLimit,
8989
+ retrievalQuery,
8990
+ caps
8991
+ );
8886
8992
  {
8887
8993
  const trustT0 = Date.now();
8888
8994
  const recentPreloaded = new Map(
@@ -8922,6 +9028,7 @@ ${tmtNode.summary}`
8922
9028
  }
8923
9029
  recallSource = "recent_scan";
8924
9030
  recalledMemoryCount = recent.length;
9031
+ selectedResultPartition = reconcileRecallResultPartition(recentPartition, recent);
8925
9032
  this.deps.publishRecallResults({
8926
9033
  title: "Recent Memories",
8927
9034
  results: recent,
@@ -8938,6 +9045,7 @@ ${tmtNode.summary}`
8938
9045
  recalledMemoryPaths = recent.map((result) => result.path).filter(Boolean);
8939
9046
  xrayRecalledResults = recent;
8940
9047
  } else {
9048
+ const coldPartitionSink = options.xrayCapture === true ? { partition: null } : void 0;
8941
9049
  const longTerm = await this.deps.applyColdFallbackPipeline({
8942
9050
  prompt: retrievalQuery,
8943
9051
  recallNamespaces,
@@ -8951,9 +9059,11 @@ ${tmtNode.summary}`
8951
9059
  backendDegradations.push(degradation);
8952
9060
  },
8953
9061
  xrayPoolSizeSink: xrayColdPoolSink,
9062
+ resultPartitionSink: coldPartitionSink,
8954
9063
  trustByPathSink,
8955
9064
  deadlineAtMs: enrichmentAssemblyDeadlineAtMs,
8956
9065
  asOfMs,
9066
+ requestingConnector: options.sourceConnector,
8957
9067
  ...options.includeLowConfidence === true ? { includeLowConfidence: true } : {}
8958
9068
  });
8959
9069
  recallTrustByPath = trustByPathSink.trustByPath;
@@ -8966,6 +9076,7 @@ ${tmtNode.summary}`
8966
9076
  }
8967
9077
  recallSource = "cold_fallback";
8968
9078
  recalledMemoryCount = longTerm.length;
9079
+ selectedResultPartition = coldPartitionSink?.partition ?? null;
8969
9080
  this.deps.publishRecallResults({
8970
9081
  title: "Long-Term Memories (Fallback)",
8971
9082
  results: longTerm,
@@ -8985,6 +9096,7 @@ ${tmtNode.summary}`
8985
9096
  }
8986
9097
  }
8987
9098
  } else {
9099
+ const coldPartitionSink = options.xrayCapture === true ? { partition: null } : void 0;
8988
9100
  const longTerm = await this.deps.applyColdFallbackPipeline({
8989
9101
  prompt: retrievalQuery,
8990
9102
  recallNamespaces,
@@ -8998,9 +9110,11 @@ ${tmtNode.summary}`
8998
9110
  backendDegradations.push(degradation);
8999
9111
  },
9000
9112
  xrayPoolSizeSink: xrayColdPoolSink,
9113
+ resultPartitionSink: coldPartitionSink,
9001
9114
  trustByPathSink,
9002
9115
  deadlineAtMs: enrichmentAssemblyDeadlineAtMs,
9003
9116
  asOfMs,
9117
+ requestingConnector: options.sourceConnector,
9004
9118
  ...options.includeLowConfidence === true ? { includeLowConfidence: true } : {}
9005
9119
  });
9006
9120
  recallTrustByPath = trustByPathSink.trustByPath;
@@ -9013,6 +9127,7 @@ ${tmtNode.summary}`
9013
9127
  }
9014
9128
  recallSource = "cold_fallback";
9015
9129
  recalledMemoryCount = longTerm.length;
9130
+ selectedResultPartition = coldPartitionSink?.partition ?? null;
9016
9131
  this.deps.publishRecallResults({
9017
9132
  title: "Long-Term Memories (Fallback)",
9018
9133
  results: longTerm,
@@ -9224,6 +9339,23 @@ ${tmtNode.summary}`
9224
9339
  if (options.xrayCapture === true && !options.abortSignal?.aborted) {
9225
9340
  try {
9226
9341
  const servedBy = mapRecallSourceToXrayServedBy(recallSource);
9342
+ const toPartitionXrayResult = (candidate) => {
9343
+ const scoreDecomposition = {
9344
+ final: candidate.score
9345
+ };
9346
+ if (candidate.explain?.reinforcementBoost !== void 0 && candidate.explain.reinforcementBoost > 0) {
9347
+ scoreDecomposition.reinforcementBoost = candidate.explain.reinforcementBoost;
9348
+ }
9349
+ return {
9350
+ memoryId: candidate.docid,
9351
+ path: candidate.path,
9352
+ servedBy,
9353
+ scoreDecomposition,
9354
+ admittedBy: []
9355
+ };
9356
+ };
9357
+ const appliedResults = selectedResultPartition?.appliedResults.map(toPartitionXrayResult) ?? [];
9358
+ const headroomResults = selectedResultPartition?.headroomResults.map(toPartitionXrayResult) ?? [];
9227
9359
  const idFromPath = (p) => {
9228
9360
  const match = p.match(/([^/\\]+)\.md$/);
9229
9361
  return match ? match[1] ?? null : null;
@@ -9338,6 +9470,9 @@ ${tmtNode.summary}`
9338
9470
  query: retrievalQuery,
9339
9471
  tierExplain: null,
9340
9472
  results: [...results, ...lcmStructuredXrayResults],
9473
+ appliedResultLimit: recallResultLimit,
9474
+ appliedResults,
9475
+ headroomResults,
9341
9476
  filters,
9342
9477
  budget: {
9343
9478
  chars: this.deps.getRecallBudgetChars(options.budgetCharsOverride),
@@ -9996,7 +10131,8 @@ var RecallSearchPipelineCoordinator = class {
9996
10131
  deadlineAtMs: options.deadlineAtMs,
9997
10132
  abortSignal: options.abortSignal,
9998
10133
  dropUnresolved: true,
9999
- recallNamespaces: options.recallNamespaces
10134
+ recallNamespaces: options.recallNamespaces,
10135
+ requestingConnector: options.requestingConnector
10000
10136
  }
10001
10137
  );
10002
10138
  results = boostInput.results;
@@ -10010,7 +10146,11 @@ var RecallSearchPipelineCoordinator = class {
10010
10146
  options.recallNamespaces,
10011
10147
  options.prompt,
10012
10148
  boostInput.memoryByPath,
10013
- { allowLifecycleFiltered: true, asOfMs: options.asOfMs }
10149
+ {
10150
+ allowLifecycleFiltered: true,
10151
+ asOfMs: options.asOfMs,
10152
+ requestingConnector: options.requestingConnector
10153
+ }
10014
10154
  ),
10015
10155
  new Promise((resolve) => {
10016
10156
  timeoutHandle = setTimeout(
@@ -10023,7 +10163,11 @@ var RecallSearchPipelineCoordinator = class {
10023
10163
  options.recallNamespaces,
10024
10164
  options.prompt,
10025
10165
  boostInput.memoryByPath,
10026
- { allowLifecycleFiltered: true, asOfMs: options.asOfMs }
10166
+ {
10167
+ allowLifecycleFiltered: true,
10168
+ asOfMs: options.asOfMs,
10169
+ requestingConnector: options.requestingConnector
10170
+ }
10027
10171
  ));
10028
10172
  if (typeof boosted === "object" && boosted !== null && "status" in boosted && boosted.status === "timed_out") {
10029
10173
  log.debug("cold-tier recall boost skipped: shared assembly deadline expired");
@@ -10090,6 +10234,17 @@ var RecallSearchPipelineCoordinator = class {
10090
10234
  results.length
10091
10235
  );
10092
10236
  }
10237
+ if (options.resultPartitionSink) {
10238
+ const partition = this.deps.recallRerankCoordinator.diversifyRecallResultsWithHeadroom(
10239
+ "memories",
10240
+ results,
10241
+ options.recallResultLimit,
10242
+ options.prompt,
10243
+ caps
10244
+ );
10245
+ options.resultPartitionSink.partition = partition;
10246
+ return partition.appliedResults;
10247
+ }
10093
10248
  return this.deps.diversifyAndLimitRecallResults(
10094
10249
  "memories",
10095
10250
  results,
@@ -10191,6 +10346,7 @@ var RecallSearchPipelineCoordinator = class {
10191
10346
  let dedicatedSurfaceFilteredCount = 0;
10192
10347
  let forgottenFilteredCount = 0;
10193
10348
  let blockedPathFilteredCount = 0;
10349
+ let connectorPartitionFilteredCount = 0;
10194
10350
  const filtered = [];
10195
10351
  for (const r of results) {
10196
10352
  if (options?.blockedPaths && resultHasKey(options.blockedPaths, r)) {
@@ -10199,6 +10355,12 @@ var RecallSearchPipelineCoordinator = class {
10199
10355
  }
10200
10356
  const memory = memoryForResult(memoryByPath, r);
10201
10357
  if (memory) {
10358
+ const memoryConnector = memory.frontmatter.sourceConnector?.trim();
10359
+ const requestingConnector = options?.requestingConnector?.trim();
10360
+ if (lifecycleCaps.extractionScopeClassification && memory.frontmatter.toolScoped === true && memoryConnector && requestingConnector && memoryConnector !== requestingConnector) {
10361
+ connectorPartitionFilteredCount += 1;
10362
+ continue;
10363
+ }
10202
10364
  const recallStatus = memory.frontmatter.status;
10203
10365
  if (recallStatus === "forgotten" || recallStatus === "pending_review" || recallStatus === "rejected" || recallStatus === "quarantined") {
10204
10366
  forgottenFilteredCount += 1;
@@ -10250,6 +10412,11 @@ var RecallSearchPipelineCoordinator = class {
10250
10412
  sourceConnector: memory ? memory.frontmatter.sourceConnector : void 0
10251
10413
  });
10252
10414
  }
10415
+ if (connectorPartitionFilteredCount > 0) {
10416
+ log.debug(
10417
+ `connector partition filter removed ${connectorPartitionFilteredCount} tool-scoped candidates from recall`
10418
+ );
10419
+ }
10253
10420
  if (lifecycleFilteredCount > 0) {
10254
10421
  log.debug(
10255
10422
  `lifecycle retrieval filter removed ${lifecycleFilteredCount} stale/archived candidates`
@@ -11753,6 +11920,14 @@ var OrchestratorInitCoordinator = class {
11753
11920
  });
11754
11921
  await this.deps.storage.loadAliases();
11755
11922
  await this.deps.storage.ensureDirectories();
11923
+ await Promise.all(
11924
+ this.deps.config.externalWikis.map(
11925
+ (wiki) => assertExternalWikiRootOutsideMemoryDirCanonical(
11926
+ this.deps.config.memoryDir,
11927
+ wiki.rootDir
11928
+ )
11929
+ )
11930
+ );
11756
11931
  if (resolveNamespaceCapabilities(this.deps.config).namespaces) {
11757
11932
  const namespaces = /* @__PURE__ */ new Set([
11758
11933
  this.deps.config.defaultNamespace,
@@ -12050,7 +12225,7 @@ var OrchestratorInitCoordinator = class {
12050
12225
  if (signal.aborted) return;
12051
12226
  if (!this.deps.wearablesAutoSyncHandle && this.deps.config.wearables.enabled && this.deps.config.wearables.autoSyncEnabled && Object.values(this.deps.config.wearables.sources).some((source) => source.enabled)) {
12052
12227
  try {
12053
- const { startWearablesAutoSync } = await import("./auto-sync-5OE5QOZB.js");
12228
+ const { startWearablesAutoSync } = await import("./auto-sync-UPTUVE4X.js");
12054
12229
  if (signal.aborted) return;
12055
12230
  this.deps.wearablesAutoSyncHandle = startWearablesAutoSync(
12056
12231
  {
@@ -16292,7 +16467,12 @@ var Orchestrator = class {
16292
16467
  return await this.namespaceSearchRouter.healthForNamespace(namespace, execution);
16293
16468
  }
16294
16469
  async refreshNamespacesAfterConvergence(namespaces) {
16295
- return refreshConvergedNamespaces(namespaces, this.namespaceSearchRouter, this.getStorage.bind(this));
16470
+ return refreshConvergedNamespaces(
16471
+ namespaces,
16472
+ this.namespaceSearchRouter,
16473
+ this.getStorage.bind(this),
16474
+ isSearchBackendEnabled(this.config)
16475
+ );
16296
16476
  }
16297
16477
  invalidateLiveContentHashIndex() {
16298
16478
  this.contentHashIndex = null;
@@ -19303,34 +19483,36 @@ async function stageRedirect(memoryDir, assets, log2, dryRun, readMarkdownFile,
19303
19483
  let writeFailCount = 0;
19304
19484
  for (const update of updates) {
19305
19485
  try {
19306
- const stateDir = path20.join(memoryDir, "state");
19307
- const kind = classifyEntityRefWritePath(memoryDir, update.mdPath);
19308
- if (kind === "memory") {
19309
- const idsAtWrite = historicalIdCache.get(stateDir);
19310
- const written = canonicalizeEntityRefFrontmatter(update.content, idsAtWrite);
19311
- const originalBytes = await readMarkdownFile(update.mdPath).catch(() => null);
19312
- await writeMarkdownFile(update.mdPath, written);
19313
- try {
19314
- await repairContentAfterJournalMove({
19315
- stateDir,
19316
- cache: historicalIdCache,
19317
- idsAtWrite,
19318
- rawContent: update.content,
19319
- lastWritten: written,
19320
- rewrite: (next) => writeMarkdownFile(update.mdPath, next)
19321
- });
19322
- } catch (err) {
19323
- if (originalBytes !== null) {
19324
- await writeMarkdownFile(update.mdPath, originalBytes).catch(() => void 0);
19486
+ await withRawEntityPageMutation(memoryDir, update.mdPath, async () => {
19487
+ const stateDir = path20.join(memoryDir, "state");
19488
+ const kind = classifyEntityRefWritePath(memoryDir, update.mdPath);
19489
+ if (kind === "memory") {
19490
+ const idsAtWrite = historicalIdCache.get(stateDir);
19491
+ const written = canonicalizeEntityRefFrontmatter(update.content, idsAtWrite);
19492
+ const originalBytes = await readMarkdownFile(update.mdPath).catch(() => null);
19493
+ await writeMarkdownFile(update.mdPath, written);
19494
+ try {
19495
+ await repairContentAfterJournalMove({
19496
+ stateDir,
19497
+ cache: historicalIdCache,
19498
+ idsAtWrite,
19499
+ rawContent: update.content,
19500
+ lastWritten: written,
19501
+ rewrite: (next) => writeMarkdownFile(update.mdPath, next)
19502
+ });
19503
+ } catch (err) {
19504
+ if (originalBytes !== null) {
19505
+ await writeMarkdownFile(update.mdPath, originalBytes).catch(() => void 0);
19506
+ }
19507
+ throw err;
19508
+ }
19509
+ } else {
19510
+ await writeMarkdownFile(update.mdPath, update.content);
19511
+ if (kind === "entity") {
19512
+ await requestEntityCanonicalIdReconcile(stateDir);
19325
19513
  }
19326
- throw err;
19327
- }
19328
- } else {
19329
- await writeMarkdownFile(update.mdPath, update.content);
19330
- if (kind === "entity") {
19331
- await requestEntityCanonicalIdReconcile(stateDir);
19332
19514
  }
19333
- }
19515
+ });
19334
19516
  if (isRecallCorpusMarkdown(update.mdPath, memoryDir)) {
19335
19517
  bumpMemoryCorpusVersionForDir(memoryDir);
19336
19518
  }
@@ -21949,14 +22131,14 @@ function switchSpace(spaceId, baseDir) {
21949
22131
  message: `Switched to "${spaceName}"`
21950
22132
  };
21951
22133
  }
21952
- function pushToSpace(sourceSpaceId, targetSpaceId, options) {
22134
+ async function pushToSpace(sourceSpaceId, targetSpaceId, options) {
21953
22135
  const startTime = Date.now();
21954
22136
  const manifest = loadManifest(options?.baseDir);
21955
22137
  const source = manifest.spaces.find((s) => s.id === sourceSpaceId);
21956
22138
  const target = manifest.spaces.find((s) => s.id === targetSpaceId);
21957
22139
  if (!source) throw new Error(`Source space "${sourceSpaceId}" not found`);
21958
22140
  if (!target) throw new Error(`Target space "${targetSpaceId}" not found`);
21959
- const result = copyMemories(source.memoryDir, target.memoryDir, {
22141
+ const result = await copyMemories(source.memoryDir, target.memoryDir, {
21960
22142
  filterIds: options?.memoryIds,
21961
22143
  force: options?.force
21962
22144
  });
@@ -21977,14 +22159,14 @@ function pushToSpace(sourceSpaceId, targetSpaceId, options) {
21977
22159
  durationMs: Date.now() - startTime
21978
22160
  };
21979
22161
  }
21980
- function pullFromSpace(sourceSpaceId, targetSpaceId, options) {
22162
+ async function pullFromSpace(sourceSpaceId, targetSpaceId, options) {
21981
22163
  const startTime = Date.now();
21982
22164
  const manifest = loadManifest(options?.baseDir);
21983
22165
  const source = manifest.spaces.find((s) => s.id === sourceSpaceId);
21984
22166
  const target = manifest.spaces.find((s) => s.id === targetSpaceId);
21985
22167
  if (!source) throw new Error(`Source space "${sourceSpaceId}" not found`);
21986
22168
  if (!target) throw new Error(`Target space "${targetSpaceId}" not found`);
21987
- const result = copyMemories(source.memoryDir, target.memoryDir, {
22169
+ const result = await copyMemories(source.memoryDir, target.memoryDir, {
21988
22170
  filterIds: options?.memoryIds,
21989
22171
  force: options?.force
21990
22172
  });
@@ -22028,7 +22210,7 @@ function shareSpace(spaceId, members, baseDir) {
22028
22210
  message: `Shared "${spaceName}" with ${members.length} member(s)`
22029
22211
  };
22030
22212
  }
22031
- function promoteSpace(sourceSpaceId, targetSpaceId, options) {
22213
+ async function promoteSpace(sourceSpaceId, targetSpaceId, options) {
22032
22214
  const startTime = Date.now();
22033
22215
  const manifest = loadManifest(options?.baseDir);
22034
22216
  const source = manifest.spaces.find((s) => s.id === sourceSpaceId);
@@ -22040,7 +22222,7 @@ function promoteSpace(sourceSpaceId, targetSpaceId, options) {
22040
22222
  throw new Error("Spaces must have a parent-child relationship for promotion. Use --force to override.");
22041
22223
  }
22042
22224
  }
22043
- const result = copyMemories(source.memoryDir, target.memoryDir, {
22225
+ const result = await copyMemories(source.memoryDir, target.memoryDir, {
22044
22226
  filterIds: options?.memoryIds,
22045
22227
  force: options?.forceOverwrite !== void 0 ? options.forceOverwrite : options?.force ?? false
22046
22228
  });
@@ -22061,14 +22243,14 @@ function promoteSpace(sourceSpaceId, targetSpaceId, options) {
22061
22243
  durationMs: Date.now() - startTime
22062
22244
  };
22063
22245
  }
22064
- function mergeSpaces(sourceSpaceId, targetSpaceId, options) {
22246
+ async function mergeSpaces(sourceSpaceId, targetSpaceId, options) {
22065
22247
  const startTime = Date.now();
22066
22248
  const manifest = loadManifest(options?.baseDir);
22067
22249
  const source = manifest.spaces.find((s) => s.id === sourceSpaceId);
22068
22250
  const target = manifest.spaces.find((s) => s.id === targetSpaceId);
22069
22251
  if (!source) throw new Error(`Source space "${sourceSpaceId}" not found`);
22070
22252
  if (!target) throw new Error(`Target space "${targetSpaceId}" not found`);
22071
- const result = copyMemories(source.memoryDir, target.memoryDir, {
22253
+ const result = await copyMemories(source.memoryDir, target.memoryDir, {
22072
22254
  force: options?.force
22073
22255
  });
22074
22256
  appendAudit(
@@ -22102,10 +22284,7 @@ function appendAudit(entry, baseDir) {
22102
22284
  fs7.appendFileSync(auditPath, `${JSON.stringify(full)}
22103
22285
  `);
22104
22286
  }
22105
- function copyMemories(sourceDir, targetDir, options) {
22106
- let merged = 0;
22107
- const conflicts = [];
22108
- let skipped = 0;
22287
+ async function copyMemories(sourceDir, targetDir, options) {
22109
22288
  if (!fs7.existsSync(sourceDir)) {
22110
22289
  return { merged: 0, conflicts: [], skipped: 0 };
22111
22290
  }
@@ -22123,6 +22302,26 @@ function copyMemories(sourceDir, targetDir, options) {
22123
22302
  return classifyEntityRefWritePath(targetRoot, mapped) === "entity";
22124
22303
  }).map((p) => path27.basename(p, ".md"))
22125
22304
  );
22305
+ const firstEntityId = sourceEntityIds.values().next().value;
22306
+ if (firstEntityId === void 0) {
22307
+ return copyPreparedMemories(sourceFiles, sourceRoot, targetRoot, sourceEntityIds, options);
22308
+ }
22309
+ return withRawEntityPageMutation(
22310
+ targetRoot,
22311
+ path27.join(targetRoot, "entities", `${firstEntityId}.md`),
22312
+ async () => copyPreparedMemories(
22313
+ sourceFiles,
22314
+ sourceRoot,
22315
+ targetRoot,
22316
+ sourceEntityIds,
22317
+ options
22318
+ )
22319
+ );
22320
+ }
22321
+ function copyPreparedMemories(sourceFiles, sourceRoot, targetRoot, sourceEntityIds, options) {
22322
+ let merged = 0;
22323
+ const conflicts = [];
22324
+ let skipped = 0;
22126
22325
  let reconcileNeeded = false;
22127
22326
  for (const sourcePath of sourceFiles) {
22128
22327
  const sourceRealPath = safeRealpath(sourcePath);
@@ -23925,4 +24124,4 @@ export {
23925
24124
  filterRecallCandidates,
23926
24125
  Orchestrator
23927
24126
  };
23928
- //# sourceMappingURL=chunk-HREE4JHI.js.map
24127
+ //# sourceMappingURL=chunk-DYVMXPCF.js.map