@remnic/core 9.63.9 → 9.63.11

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 (464) hide show
  1. package/dist/access-admin-ops-surface.d.ts +12 -11
  2. package/dist/access-admin-ops-surface.js +23 -23
  3. package/dist/access-authorization-probe.d.ts +12 -11
  4. package/dist/access-authorization-probe.js +24 -24
  5. package/dist/access-boundary.d.ts +12 -11
  6. package/dist/access-boundary.js +23 -23
  7. package/dist/access-cli.js +84 -82
  8. package/dist/access-cli.js.map +1 -1
  9. package/dist/access-coding-context-resolution.d.ts +1 -1
  10. package/dist/access-extraction-force-flush.d.ts +12 -11
  11. package/dist/access-extraction-force-flush.js +23 -23
  12. package/dist/access-health-types.d.ts +1 -1
  13. package/dist/access-http-lcm-compaction.d.ts +11 -11
  14. package/dist/access-http-lifecycle-flush.d.ts +11 -11
  15. package/dist/access-http-offline-stream.d.ts +12 -11
  16. package/dist/access-http-query.d.ts +2 -2
  17. package/dist/access-http-query.js +25 -25
  18. package/dist/access-http.d.ts +13 -12
  19. package/dist/access-http.js +36 -36
  20. package/dist/access-identity-continuity-surface.d.ts +9 -9
  21. package/dist/access-identity-continuity-surface.js +23 -23
  22. package/dist/access-lcm-surface.d.ts +12 -11
  23. package/dist/access-lcm-surface.js +23 -23
  24. package/dist/access-mcp.d.ts +12 -11
  25. package/dist/access-mcp.js +30 -30
  26. package/dist/access-memory-search-fanout.d.ts +2 -2
  27. package/dist/{access-namespace-preflight-DB0zXFek.d.ts → access-namespace-preflight-CrF0FKaz.d.ts} +1 -1
  28. package/dist/access-namespace-preflight.d.ts +3 -3
  29. package/dist/access-namespace-preflight.js +23 -23
  30. package/dist/access-observe-write-surface.d.ts +12 -11
  31. package/dist/access-observe-write-surface.js +23 -23
  32. package/dist/access-offline-manifest.d.ts +9 -9
  33. package/dist/access-operations-batch.js +26 -25
  34. package/dist/access-operations.d.ts +14 -14
  35. package/dist/access-operations.js +29 -29
  36. package/dist/access-recall-concurrency.d.ts +12 -11
  37. package/dist/access-recall-concurrency.js +23 -23
  38. package/dist/access-recall-response.d.ts +12 -11
  39. package/dist/access-recall-response.js +23 -23
  40. package/dist/access-recall-surface.d.ts +12 -11
  41. package/dist/access-recall-surface.js +23 -23
  42. package/dist/access-schema.d.ts +92 -92
  43. package/dist/access-schema.js +3 -3
  44. package/dist/{access-service-DwfdjqkZ.d.ts → access-service-U6jiERic.d.ts} +86 -161
  45. package/dist/access-service-helpers.d.ts +12 -11
  46. package/dist/access-service.d.ts +12 -11
  47. package/dist/access-service.js +23 -23
  48. package/dist/access-surface-catalog.d.ts +12 -11
  49. package/dist/access-surface-catalog.js +25 -25
  50. package/dist/access-wearables-meetings-surface.d.ts +3 -3
  51. package/dist/action-confidence.d.ts +1 -1
  52. package/dist/active-memory-bridge.d.ts +1 -1
  53. package/dist/active-recall.d.ts +1 -1
  54. package/dist/ambient-provenance.d.ts +1 -1
  55. package/dist/artifact-search.d.ts +1 -1
  56. package/dist/{auto-sync-3SHMZVQS.js → auto-sync-5L7EUZ27.js} +4 -3
  57. package/dist/{auto-sync-3SHMZVQS.js.map → auto-sync-5L7EUZ27.js.map} +1 -1
  58. package/dist/behavior-learner.d.ts +1 -1
  59. package/dist/behavior-signals.d.ts +1 -1
  60. package/dist/bootstrap.d.ts +9 -9
  61. package/dist/briefing-window.d.ts +2 -2
  62. package/dist/briefing.d.ts +5 -3
  63. package/dist/briefing.js +11 -9
  64. package/dist/buffer-surprise-report.d.ts +1 -1
  65. package/dist/buffer-turn-helpers.d.ts +1 -1
  66. package/dist/buffer.d.ts +2 -2
  67. package/dist/bulk-import/index.d.ts +3 -3
  68. package/dist/calibration.d.ts +1 -1
  69. package/dist/capabilities.d.ts +1 -1
  70. package/dist/{capsule-crypto-YO5QJ6L3.js → capsule-crypto-GWVG7LGC.js} +2 -2
  71. package/dist/{catalog-CCzmf8IH.d.ts → catalog-C0KIwZqR.d.ts} +1 -1
  72. package/dist/causal-behavior.d.ts +1 -1
  73. package/dist/causal-consolidation.d.ts +1 -1
  74. package/dist/causal-consolidation.js +10 -10
  75. package/dist/causal-trajectory-graph.d.ts +1 -1
  76. package/dist/{chunk-4POAMKV6.js → chunk-27IOSH2W.js} +5 -2
  77. package/dist/chunk-27IOSH2W.js.map +1 -0
  78. package/dist/{chunk-OQIRBGUU.js → chunk-2Q4UAPLD.js} +4 -4
  79. package/dist/{chunk-PHKU6BZ2.js → chunk-36XS2ASP.js} +2 -2
  80. package/dist/{chunk-BRHKW7GY.js → chunk-4IIDTPSK.js} +2 -2
  81. package/dist/{chunk-EDZNW3HE.js → chunk-57WMVU4D.js} +54 -45
  82. package/dist/chunk-57WMVU4D.js.map +1 -0
  83. package/dist/{chunk-Q5XKKDFQ.js → chunk-5SZ6CLGJ.js} +2 -2
  84. package/dist/{chunk-VDX2J7OX.js → chunk-5W7CTZ2E.js} +4 -4
  85. package/dist/{chunk-EUYWQ7TS.js → chunk-652S5A5D.js} +2 -2
  86. package/dist/{chunk-ULZFZL7K.js → chunk-6IKXAAJI.js} +17 -28
  87. package/dist/chunk-6IKXAAJI.js.map +1 -0
  88. package/dist/{chunk-3TDAA7VA.js → chunk-6NMZXEJ7.js} +2 -2
  89. package/dist/{chunk-ZOAAY2OE.js → chunk-77E7LLMV.js} +7 -7
  90. package/dist/{chunk-MIUL6AUZ.js → chunk-7ML7STOD.js} +3 -3
  91. package/dist/{chunk-5SCFDQEJ.js → chunk-BPLPGOUJ.js} +2 -2
  92. package/dist/{chunk-RWMSMTQP.js → chunk-BS75WJBH.js} +2 -2
  93. package/dist/{chunk-XE2QCCT2.js → chunk-BTBAHTQ5.js} +2 -2
  94. package/dist/{chunk-42TIIO2M.js → chunk-BTUIHRRR.js} +2 -2
  95. package/dist/{chunk-3IMYRX3W.js → chunk-BYFKJXIR.js} +2 -2
  96. package/dist/chunk-CIO7GCWE.js +29 -0
  97. package/dist/chunk-CIO7GCWE.js.map +1 -0
  98. package/dist/{chunk-SNEUAZ6B.js → chunk-CK3DZ6OE.js} +2 -2
  99. package/dist/{chunk-VYMICVRA.js → chunk-DIJCMHUE.js} +2 -2
  100. package/dist/{chunk-AJRJDXYR.js → chunk-E7MYSCSL.js} +2 -2
  101. package/dist/{chunk-3T6HIIKA.js → chunk-EHC3FIJ4.js} +2 -2
  102. package/dist/{chunk-YTXNDEUS.js → chunk-FEP45MYY.js} +4 -3
  103. package/dist/{chunk-YTXNDEUS.js.map → chunk-FEP45MYY.js.map} +1 -1
  104. package/dist/{chunk-KFB4YNXM.js → chunk-G5F4MXXC.js} +2 -2
  105. package/dist/{chunk-VANZKHTN.js → chunk-G5OB4XZX.js} +4 -4
  106. package/dist/{chunk-645WOU5I.js → chunk-H7BZBSP6.js} +4 -4
  107. package/dist/{chunk-SZ4HFZKB.js → chunk-HMKPFW7R.js} +2 -2
  108. package/dist/{chunk-WBPD6SBZ.js → chunk-HP6B732E.js} +54 -54
  109. package/dist/{chunk-VFZQXYN5.js → chunk-HZXO2CJ6.js} +2 -2
  110. package/dist/{chunk-DGUVXXAU.js → chunk-IRXMJLTW.js} +12 -3
  111. package/dist/{chunk-DGUVXXAU.js.map → chunk-IRXMJLTW.js.map} +1 -1
  112. package/dist/{chunk-O52TB5SL.js → chunk-IUSV4XJC.js} +2 -2
  113. package/dist/{chunk-5TF5STAV.js → chunk-JASFZQ76.js} +4 -4
  114. package/dist/{chunk-ML3U4KPR.js → chunk-K547KS3X.js} +4 -4
  115. package/dist/{chunk-UHGBNIOS.js → chunk-KVDUKH5E.js} +7 -2
  116. package/dist/chunk-KVDUKH5E.js.map +1 -0
  117. package/dist/{chunk-XTMYB2HY.js → chunk-LJQGQUNS.js} +2 -2
  118. package/dist/{chunk-WAS4HV46.js → chunk-LNH76ZJX.js} +87 -3
  119. package/dist/chunk-LNH76ZJX.js.map +1 -0
  120. package/dist/{chunk-J6QIAYNR.js → chunk-LVXBC6YB.js} +7 -2
  121. package/dist/{chunk-J6QIAYNR.js.map → chunk-LVXBC6YB.js.map} +1 -1
  122. package/dist/{chunk-IVKIODHO.js → chunk-MB6GLPRY.js} +4 -4
  123. package/dist/chunk-MKYRCCSN.js +145 -0
  124. package/dist/chunk-MKYRCCSN.js.map +1 -0
  125. package/dist/{chunk-6433HV72.js → chunk-MVIYRRVJ.js} +5 -5
  126. package/dist/{chunk-LTYH2L6E.js → chunk-NWHKHBL4.js} +44 -64
  127. package/dist/chunk-NWHKHBL4.js.map +1 -0
  128. package/dist/{chunk-BXLOS5AJ.js → chunk-OWHERGF2.js} +2 -2
  129. package/dist/{chunk-QQYHYW2N.js → chunk-PQODT53H.js} +3 -3
  130. package/dist/{chunk-PQHNZ63P.js → chunk-R5AWIILH.js} +37 -29
  131. package/dist/chunk-R5AWIILH.js.map +1 -0
  132. package/dist/{chunk-TOP3FSDW.js → chunk-RFFCBYBD.js} +11 -11
  133. package/dist/{chunk-MYI3RKI6.js → chunk-SYU5JOBQ.js} +2 -2
  134. package/dist/{chunk-JXS5PDQ7.js → chunk-UOBPK2OS.js} +25 -7
  135. package/dist/chunk-UOBPK2OS.js.map +1 -0
  136. package/dist/{chunk-BOSIHHOH.js → chunk-UUYQWKHO.js} +2 -2
  137. package/dist/{chunk-DQEMWVMT.js → chunk-UVYI6VIX.js} +1 -1
  138. package/dist/{chunk-KXWE62IH.js → chunk-V2YH7T6T.js} +2 -2
  139. package/dist/{chunk-M4AHBM72.js → chunk-VCBG52MM.js} +4 -4
  140. package/dist/{chunk-N7V3P4V5.js → chunk-VCEE4YNA.js} +2 -2
  141. package/dist/{chunk-62Y5AGCM.js → chunk-VENMDW4U.js} +10 -10
  142. package/dist/{chunk-6NAPOLRO.js → chunk-VY47VI2T.js} +6 -4
  143. package/dist/chunk-VY47VI2T.js.map +1 -0
  144. package/dist/{chunk-QTXNS3HB.js → chunk-WCWIV2JH.js} +2 -2
  145. package/dist/{chunk-6UKSOXAO.js → chunk-WQ6TRWAE.js} +3 -3
  146. package/dist/{chunk-CBY54QYW.js → chunk-X6HNXVXS.js} +4 -4
  147. package/dist/{chunk-SY5JUJ2X.js → chunk-XREXYQ5U.js} +39 -39
  148. package/dist/{chunk-JPWSYHLB.js → chunk-YGSDWO3U.js} +2 -2
  149. package/dist/{chunk-BPQ7L27U.js → chunk-YI25J2JD.js} +16 -16
  150. package/dist/chunk-YI25J2JD.js.map +1 -0
  151. package/dist/{chunk-GBVRVYF4.js → chunk-YINSSARY.js} +1 -1
  152. package/dist/{chunk-Q6OL23WM.js → chunk-Z4UPRZR6.js} +2 -2
  153. package/dist/{chunk-4F67JJPG.js → chunk-ZPN7W3OP.js} +2 -2
  154. package/dist/{cli-kcUqoV4E.d.ts → cli-BsaYHAH9.d.ts} +5 -5
  155. package/dist/cli.d.ts +14 -13
  156. package/dist/cli.js +55 -54
  157. package/dist/coding/pre-action-gate.d.ts +1 -1
  158. package/dist/compounding/engine.d.ts +2 -2
  159. package/dist/compounding/engine.js +9 -9
  160. package/dist/compounding/preference-consolidator.d.ts +1 -1
  161. package/dist/compression-optimizer.d.ts +1 -1
  162. package/dist/config.d.ts +1 -1
  163. package/dist/connectors/codex-materialize-runner.d.ts +1 -1
  164. package/dist/connectors/codex-materialize-runner.js +9 -9
  165. package/dist/connectors/codex-materialize.d.ts +1 -1
  166. package/dist/connectors/index.d.ts +1 -1
  167. package/dist/connectors/index.js +9 -9
  168. package/dist/consolidation-provenance-check.d.ts +2 -2
  169. package/dist/consolidation-undo.d.ts +2 -2
  170. package/dist/contradiction/index.d.ts +2 -2
  171. package/dist/contradiction/index.js +4 -4
  172. package/dist/converge-config.d.ts +1 -1
  173. package/dist/convergence-refresh.d.ts +2 -2
  174. package/dist/convergence-refresh.js +11 -11
  175. package/dist/conversation-index/backend.d.ts +1 -1
  176. package/dist/conversation-index/chunker.d.ts +1 -1
  177. package/dist/conversation-index/faiss-adapter.d.ts +1 -1
  178. package/dist/conversation-index/indexer.d.ts +1 -1
  179. package/dist/conversation-index/search.d.ts +1 -1
  180. package/dist/corpus-watermark.d.ts +1 -1
  181. package/dist/corpus-watermark.js +11 -11
  182. package/dist/day-summary.d.ts +1 -1
  183. package/dist/day-summary.js +1 -1
  184. package/dist/delinearize.d.ts +1 -1
  185. package/dist/dependency-propagation-config.d.ts +1 -1
  186. package/dist/{dependency-propagation-delivery-DiY5T63p.d.ts → dependency-propagation-delivery-Cph4PnBe.d.ts} +1 -1
  187. package/dist/direct-answer-wiring.d.ts +1 -1
  188. package/dist/direct-answer-wiring.js +2 -1
  189. package/dist/direct-answer.d.ts +1 -1
  190. package/dist/embedding-fallback.d.ts +1 -1
  191. package/dist/enrichment/index.d.ts +1 -1
  192. package/dist/entity-origin-fields.d.ts +1 -1
  193. package/dist/entity-retrieval-i18n.d.ts +34 -0
  194. package/dist/entity-retrieval-i18n.js +13 -0
  195. package/dist/entity-retrieval-i18n.js.map +1 -0
  196. package/dist/entity-retrieval.d.ts +2 -2
  197. package/dist/entity-retrieval.js +10 -9
  198. package/dist/entity-schema.d.ts +1 -1
  199. package/dist/episodic-context.d.ts +1 -1
  200. package/dist/event-order-recall.js +2 -2
  201. package/dist/explicit-capture.d.ts +9 -9
  202. package/dist/external-wiki-access.d.ts +12 -11
  203. package/dist/external-wiki-access.js +24 -24
  204. package/dist/external-wiki-collection-registration.d.ts +1 -1
  205. package/dist/external-wiki-collection.d.ts +1 -1
  206. package/dist/external-wiki-mcp-tools.d.ts +12 -11
  207. package/dist/extraction-error-classification.d.ts +1 -1
  208. package/dist/extraction-faithfulness.d.ts +1 -1
  209. package/dist/extraction-judge-telemetry.d.ts +1 -1
  210. package/dist/extraction-judge-training.d.ts +1 -1
  211. package/dist/extraction-judge.d.ts +1 -1
  212. package/dist/extraction-liveness.d.ts +1 -1
  213. package/dist/extraction-normalization.d.ts +1 -1
  214. package/dist/extraction-prompt.d.ts +1 -1
  215. package/dist/extraction-source-grounding-helpers.d.ts +10 -1
  216. package/dist/extraction-source-grounding-helpers.js +3 -1
  217. package/dist/extraction-source-grounding-rules.d.ts +1 -1
  218. package/dist/extraction-source-grounding-rules.js +2 -2
  219. package/dist/extraction-source-grounding.d.ts +1 -1
  220. package/dist/extraction-source-grounding.js +3 -3
  221. package/dist/extraction.d.ts +1 -1
  222. package/dist/extraction.js +18 -18
  223. package/dist/fallback-llm.d.ts +1 -1
  224. package/dist/graph-dashboard-diff.d.ts +1 -1
  225. package/dist/graph-dashboard-key.d.ts +1 -1
  226. package/dist/graph-dashboard-parser.d.ts +1 -1
  227. package/dist/graph-edge-reinforcement.d.ts +1 -1
  228. package/dist/graph-path-reconstruction.d.ts +1 -1
  229. package/dist/graph-path-scoring.d.ts +1 -1
  230. package/dist/graph-snapshot.d.ts +1 -1
  231. package/dist/graph.d.ts +1 -1
  232. package/dist/harmonic-retrieval.js +1 -1
  233. package/dist/importance.d.ts +1 -1
  234. package/dist/importance.js +2 -1
  235. package/dist/importers/index.d.ts +1 -1
  236. package/dist/in-flight-reads.d.ts +1 -1
  237. package/dist/index.d.ts +697 -697
  238. package/dist/index.js +105 -103
  239. package/dist/intent.d.ts +1 -1
  240. package/dist/lcm/engine.d.ts +1 -1
  241. package/dist/lcm/engine.js +2 -2
  242. package/dist/lcm/index.d.ts +1 -1
  243. package/dist/lcm/index.js +4 -4
  244. package/dist/lcm/tools.d.ts +1 -1
  245. package/dist/lifecycle.d.ts +1 -1
  246. package/dist/live-connectors-runner.d.ts +1 -1
  247. package/dist/local-llm.d.ts +1 -1
  248. package/dist/local-llm.js +2 -2
  249. package/dist/local-model-endpoint.d.ts +1 -1
  250. package/dist/maintenance/memory-governance.d.ts +1 -1
  251. package/dist/maintenance/memory-governance.js +9 -9
  252. package/dist/maintenance/rebuild-memory-lifecycle-ledger.d.ts +2 -2
  253. package/dist/maintenance/rebuild-memory-lifecycle-ledger.js +9 -9
  254. package/dist/maintenance/rebuild-memory-projection.d.ts +2 -2
  255. package/dist/maintenance/rebuild-memory-projection.js +10 -10
  256. package/dist/{maintenance-CaqA4z7V.d.ts → maintenance-BNq31xpo.d.ts} +3 -3
  257. package/dist/mcp-memory-inspector-app.d.ts +11 -11
  258. package/dist/memory-action-policy.d.ts +1 -1
  259. package/dist/memory-cache.d.ts +1 -1
  260. package/dist/memory-lifecycle-ledger-utils.d.ts +1 -1
  261. package/dist/memory-projection-store.d.ts +1 -1
  262. package/dist/memory-provenance.d.ts +1 -1
  263. package/dist/memory-snapshot.d.ts +1 -1
  264. package/dist/memory-worth-outcomes.d.ts +2 -2
  265. package/dist/models-json.d.ts +1 -1
  266. package/dist/namespaces/migrate.d.ts +3 -3
  267. package/dist/namespaces/migrate.js +10 -10
  268. package/dist/namespaces/principal.d.ts +1 -1
  269. package/dist/namespaces/search.d.ts +1 -1
  270. package/dist/namespaces/search.js +7 -7
  271. package/dist/namespaces/storage.d.ts +3 -3
  272. package/dist/namespaces/storage.js +9 -9
  273. package/dist/native-knowledge.d.ts +1 -1
  274. package/dist/offline-sync-impression-drain.d.ts +1 -1
  275. package/dist/operator-doctor-corpus.d.ts +1 -1
  276. package/dist/operator-doctor-corpus.js +12 -12
  277. package/dist/operator-doctor-replica.d.ts +1 -1
  278. package/dist/operator-toolkit.d.ts +3 -3
  279. package/dist/operator-toolkit.js +17 -17
  280. package/dist/orchestration/compression-guideline-coordinator.d.ts +2 -2
  281. package/dist/orchestration/maintenance.d.ts +4 -4
  282. package/dist/orchestration/maintenance.js +15 -15
  283. package/dist/{orchestrator-Bay_AofR.d.ts → orchestrator-CBuUOP2J.d.ts} +8 -8
  284. package/dist/orchestrator.d.ts +9 -9
  285. package/dist/orchestrator.js +84 -82
  286. package/dist/patterns-cli.d.ts +1 -1
  287. package/dist/{pipeline-X606GdRJ.d.ts → pipeline-CW_Q4WvX.d.ts} +1 -1
  288. package/dist/policy-runtime.d.ts +1 -1
  289. package/dist/proactive-contention.d.ts +1 -1
  290. package/dist/provenance.d.ts +1 -1
  291. package/dist/{public-http-DscQtnCx.d.ts → public-http-jMlmLny4.d.ts} +1 -1
  292. package/dist/qmd-preflight.d.ts +2 -2
  293. package/dist/{qmd-DCKeR-GX.d.ts → qmd-q-cAzYuC.d.ts} +1 -1
  294. package/dist/qmd-recall-cache.d.ts +1 -1
  295. package/dist/qmd.d.ts +2 -2
  296. package/dist/recall-concurrency-config.d.ts +1 -1
  297. package/dist/recall-disclosure-escalation.d.ts +1 -1
  298. package/dist/recall-explain-renderer.d.ts +1 -1
  299. package/dist/recall-memory-map.d.ts +1 -1
  300. package/dist/recall-planner-llm.d.ts +1 -1
  301. package/dist/recall-state.d.ts +1 -1
  302. package/dist/recall-tag-filter.d.ts +1 -1
  303. package/dist/recall-timings.d.ts +1 -1
  304. package/dist/recall-xray-cli.d.ts +1 -1
  305. package/dist/recall-xray-renderer.d.ts +1 -1
  306. package/dist/recall-xray.d.ts +1 -1
  307. package/dist/reconcile/cursor.d.ts +1 -1
  308. package/dist/reconcile/manifest.d.ts +1 -1
  309. package/dist/reconcile/plan.d.ts +1 -1
  310. package/dist/replay/normalizers/chatgpt.d.ts +1 -1
  311. package/dist/replay/normalizers/claude.d.ts +1 -1
  312. package/dist/replay/normalizers/openclaw.d.ts +1 -1
  313. package/dist/replay/normalizers/shared.d.ts +1 -1
  314. package/dist/replay/runner.d.ts +1 -1
  315. package/dist/replay/types.d.ts +1 -1
  316. package/dist/replica-divergence.d.ts +1 -1
  317. package/dist/replica-peers-config.d.ts +1 -1
  318. package/dist/resolve-auth-token.d.ts +1 -1
  319. package/dist/retrieval-agents.d.ts +2 -2
  320. package/dist/retrieval-tiers.d.ts +1 -1
  321. package/dist/routing/engine.d.ts +1 -1
  322. package/dist/routing/store.d.ts +1 -1
  323. package/dist/salvage-envelope.d.ts +1 -1
  324. package/dist/schemas.d.ts +108 -108
  325. package/dist/{scope-profiles-_Y_RHCeE.d.ts → scope-profiles-CIr4mXgp.d.ts} +1 -1
  326. package/dist/search/embed-helper.d.ts +1 -1
  327. package/dist/search/factory.d.ts +1 -1
  328. package/dist/search/factory.js +6 -6
  329. package/dist/search/index.d.ts +1 -1
  330. package/dist/search/index.js +11 -11
  331. package/dist/search/lancedb-backend.d.ts +1 -1
  332. package/dist/search/lancedb-backend.js +2 -2
  333. package/dist/search/meilisearch-backend.d.ts +1 -1
  334. package/dist/search/meilisearch-backend.js +2 -2
  335. package/dist/search/noop-backend.d.ts +1 -1
  336. package/dist/search/orama-backend.d.ts +1 -1
  337. package/dist/search/orama-backend.js +2 -2
  338. package/dist/search/port.d.ts +1 -1
  339. package/dist/search/remote-backend.d.ts +1 -1
  340. package/dist/{semantic-consolidation-DT2VSrU0.d.ts → semantic-consolidation-BZ6J46j-.d.ts} +1 -1
  341. package/dist/semantic-consolidation.d.ts +2 -2
  342. package/dist/semantic-consolidation.js +10 -10
  343. package/dist/semantic-rule-promotion.js +9 -9
  344. package/dist/semantic-rule-verifier.d.ts +1 -1
  345. package/dist/semantic-rule-verifier.js +9 -9
  346. package/dist/{service-BMo-gwDE.d.ts → service-CCl4iyyY.d.ts} +2 -2
  347. package/dist/session-observer-bands.d.ts +1 -1
  348. package/dist/session-observer-state.d.ts +1 -1
  349. package/dist/shared-context/manager.d.ts +9 -9
  350. package/dist/signal.d.ts +1 -1
  351. package/dist/source-agent-qualifier.d.ts +1 -1
  352. package/dist/source-agent-qualifier.js +13 -13
  353. package/dist/{storage-CGzJGUUu.d.ts → storage-BPXmJKIt.d.ts} +1 -1
  354. package/dist/storage.d.ts +2 -2
  355. package/dist/storage.js +8 -8
  356. package/dist/summarizer.d.ts +1 -1
  357. package/dist/summarizer.js +3 -3
  358. package/dist/summary-snapshot.d.ts +1 -1
  359. package/dist/support-passport/index.d.ts +15 -14
  360. package/dist/support-passport/index.js +26 -26
  361. package/dist/temporal-supersession.d.ts +2 -2
  362. package/dist/temporal-timeline-recall.d.ts +1 -1
  363. package/dist/temporal-validity.d.ts +1 -1
  364. package/dist/threading.d.ts +1 -1
  365. package/dist/tier-migration.d.ts +2 -2
  366. package/dist/tier-routing.d.ts +1 -1
  367. package/dist/topics.d.ts +1 -1
  368. package/dist/topics.js +2 -1
  369. package/dist/transcript.d.ts +1 -1
  370. package/dist/transfer/backup.js +2 -2
  371. package/dist/transfer/capsule-export.js +2 -2
  372. package/dist/transfer/capsule-import.js +2 -2
  373. package/dist/transfer/types.d.ts +66 -66
  374. package/dist/trust-score-stage.d.ts +1 -1
  375. package/dist/trust-score.d.ts +1 -1
  376. package/dist/{types-CBEAYU76.d.ts → types-CltSWcND.d.ts} +1 -1
  377. package/dist/types.d.ts +1 -1
  378. package/dist/utility-runtime.d.ts +1 -1
  379. package/dist/verified-recall.js +9 -9
  380. package/dist/write-envelope.d.ts +1 -1
  381. package/package.json +2 -2
  382. package/src/access-http.ts +47 -60
  383. package/src/access-mcp.test.ts +6 -10
  384. package/src/access-mcp.ts +21 -22
  385. package/src/access-operations-batch.ts +66 -18
  386. package/src/access-schema.ts +12 -1
  387. package/src/access-service.ts +18 -91
  388. package/src/briefing.test.ts +50 -0
  389. package/src/briefing.ts +3 -2
  390. package/src/chat/chat-engine.test.ts +15 -0
  391. package/src/chat/chat-engine.ts +13 -2
  392. package/src/day-summary.test.ts +63 -0
  393. package/src/day-summary.ts +13 -1
  394. package/src/entity-retrieval-i18n.test.ts +115 -0
  395. package/src/entity-retrieval-i18n.ts +161 -0
  396. package/src/entity-retrieval.ts +34 -34
  397. package/src/extraction-source-grounding-helpers.ts +112 -2
  398. package/src/extraction-source-grounding-rules.ts +3 -1
  399. package/src/extraction-source-grounding.test.ts +52 -0
  400. package/src/importance.ts +32 -22
  401. package/src/recall-disclosure.test.ts +1 -1
  402. package/src/taxonomy/resolver.ts +7 -7
  403. package/src/topics.ts +5 -2
  404. package/src/utils/script-aware-text.ts +52 -0
  405. package/src/write-classifiers-cjk.test.ts +115 -0
  406. package/dist/chunk-4POAMKV6.js.map +0 -1
  407. package/dist/chunk-6NAPOLRO.js.map +0 -1
  408. package/dist/chunk-BPQ7L27U.js.map +0 -1
  409. package/dist/chunk-EDZNW3HE.js.map +0 -1
  410. package/dist/chunk-JXS5PDQ7.js.map +0 -1
  411. package/dist/chunk-LTYH2L6E.js.map +0 -1
  412. package/dist/chunk-PQHNZ63P.js.map +0 -1
  413. package/dist/chunk-UHGBNIOS.js.map +0 -1
  414. package/dist/chunk-ULZFZL7K.js.map +0 -1
  415. package/dist/chunk-WAS4HV46.js.map +0 -1
  416. /package/dist/{capsule-crypto-YO5QJ6L3.js.map → capsule-crypto-GWVG7LGC.js.map} +0 -0
  417. /package/dist/{chunk-OQIRBGUU.js.map → chunk-2Q4UAPLD.js.map} +0 -0
  418. /package/dist/{chunk-PHKU6BZ2.js.map → chunk-36XS2ASP.js.map} +0 -0
  419. /package/dist/{chunk-BRHKW7GY.js.map → chunk-4IIDTPSK.js.map} +0 -0
  420. /package/dist/{chunk-Q5XKKDFQ.js.map → chunk-5SZ6CLGJ.js.map} +0 -0
  421. /package/dist/{chunk-VDX2J7OX.js.map → chunk-5W7CTZ2E.js.map} +0 -0
  422. /package/dist/{chunk-EUYWQ7TS.js.map → chunk-652S5A5D.js.map} +0 -0
  423. /package/dist/{chunk-3TDAA7VA.js.map → chunk-6NMZXEJ7.js.map} +0 -0
  424. /package/dist/{chunk-ZOAAY2OE.js.map → chunk-77E7LLMV.js.map} +0 -0
  425. /package/dist/{chunk-MIUL6AUZ.js.map → chunk-7ML7STOD.js.map} +0 -0
  426. /package/dist/{chunk-5SCFDQEJ.js.map → chunk-BPLPGOUJ.js.map} +0 -0
  427. /package/dist/{chunk-RWMSMTQP.js.map → chunk-BS75WJBH.js.map} +0 -0
  428. /package/dist/{chunk-XE2QCCT2.js.map → chunk-BTBAHTQ5.js.map} +0 -0
  429. /package/dist/{chunk-42TIIO2M.js.map → chunk-BTUIHRRR.js.map} +0 -0
  430. /package/dist/{chunk-3IMYRX3W.js.map → chunk-BYFKJXIR.js.map} +0 -0
  431. /package/dist/{chunk-SNEUAZ6B.js.map → chunk-CK3DZ6OE.js.map} +0 -0
  432. /package/dist/{chunk-VYMICVRA.js.map → chunk-DIJCMHUE.js.map} +0 -0
  433. /package/dist/{chunk-AJRJDXYR.js.map → chunk-E7MYSCSL.js.map} +0 -0
  434. /package/dist/{chunk-3T6HIIKA.js.map → chunk-EHC3FIJ4.js.map} +0 -0
  435. /package/dist/{chunk-KFB4YNXM.js.map → chunk-G5F4MXXC.js.map} +0 -0
  436. /package/dist/{chunk-VANZKHTN.js.map → chunk-G5OB4XZX.js.map} +0 -0
  437. /package/dist/{chunk-645WOU5I.js.map → chunk-H7BZBSP6.js.map} +0 -0
  438. /package/dist/{chunk-SZ4HFZKB.js.map → chunk-HMKPFW7R.js.map} +0 -0
  439. /package/dist/{chunk-WBPD6SBZ.js.map → chunk-HP6B732E.js.map} +0 -0
  440. /package/dist/{chunk-VFZQXYN5.js.map → chunk-HZXO2CJ6.js.map} +0 -0
  441. /package/dist/{chunk-O52TB5SL.js.map → chunk-IUSV4XJC.js.map} +0 -0
  442. /package/dist/{chunk-5TF5STAV.js.map → chunk-JASFZQ76.js.map} +0 -0
  443. /package/dist/{chunk-ML3U4KPR.js.map → chunk-K547KS3X.js.map} +0 -0
  444. /package/dist/{chunk-XTMYB2HY.js.map → chunk-LJQGQUNS.js.map} +0 -0
  445. /package/dist/{chunk-IVKIODHO.js.map → chunk-MB6GLPRY.js.map} +0 -0
  446. /package/dist/{chunk-6433HV72.js.map → chunk-MVIYRRVJ.js.map} +0 -0
  447. /package/dist/{chunk-BXLOS5AJ.js.map → chunk-OWHERGF2.js.map} +0 -0
  448. /package/dist/{chunk-QQYHYW2N.js.map → chunk-PQODT53H.js.map} +0 -0
  449. /package/dist/{chunk-TOP3FSDW.js.map → chunk-RFFCBYBD.js.map} +0 -0
  450. /package/dist/{chunk-MYI3RKI6.js.map → chunk-SYU5JOBQ.js.map} +0 -0
  451. /package/dist/{chunk-BOSIHHOH.js.map → chunk-UUYQWKHO.js.map} +0 -0
  452. /package/dist/{chunk-DQEMWVMT.js.map → chunk-UVYI6VIX.js.map} +0 -0
  453. /package/dist/{chunk-KXWE62IH.js.map → chunk-V2YH7T6T.js.map} +0 -0
  454. /package/dist/{chunk-M4AHBM72.js.map → chunk-VCBG52MM.js.map} +0 -0
  455. /package/dist/{chunk-N7V3P4V5.js.map → chunk-VCEE4YNA.js.map} +0 -0
  456. /package/dist/{chunk-62Y5AGCM.js.map → chunk-VENMDW4U.js.map} +0 -0
  457. /package/dist/{chunk-QTXNS3HB.js.map → chunk-WCWIV2JH.js.map} +0 -0
  458. /package/dist/{chunk-6UKSOXAO.js.map → chunk-WQ6TRWAE.js.map} +0 -0
  459. /package/dist/{chunk-CBY54QYW.js.map → chunk-X6HNXVXS.js.map} +0 -0
  460. /package/dist/{chunk-SY5JUJ2X.js.map → chunk-XREXYQ5U.js.map} +0 -0
  461. /package/dist/{chunk-JPWSYHLB.js.map → chunk-YGSDWO3U.js.map} +0 -0
  462. /package/dist/{chunk-GBVRVYF4.js.map → chunk-YINSSARY.js.map} +0 -0
  463. /package/dist/{chunk-Q6OL23WM.js.map → chunk-Z4UPRZR6.js.map} +0 -0
  464. /package/dist/{chunk-4F67JJPG.js.map → chunk-ZPN7W3OP.js.map} +0 -0
@@ -278,6 +278,7 @@ import {
278
278
  recordMemoryOutcome,
279
279
  } from "./memory-worth-outcomes.js";
280
280
  import type { LcmMessagePartInput, MessagePartSourceFormat } from "./message-parts/index.js";
281
+ import type { ObserveRequest, RecallRequest } from "./access-schema.js";
281
282
  import { recordObjectiveStateSnapshotsFromObservedMessages } from "./objective-state-writers.js";
282
283
  import { objectiveStateStoreOverrideForNamespace } from "./objective-state.js";
283
284
  import { offlineSyncStorageForSnapshot } from "./offline-sync-impression-drain.js";
@@ -373,17 +374,16 @@ function normalizeTrustZoneInputError(error: unknown): EngramAccessInputError |
373
374
 
374
375
  export const ENGRAM_ACCESS_WRITE_SCHEMA_VERSION = 1;
375
376
 
376
- export interface EngramAccessRecallRequest {
377
- query: string;
378
- sessionKey?: string;
379
- namespace?: string;
377
+ /**
378
+ * Recall request. Wire fields derive from the canonical zod schema
379
+ * (`recallRequestSchema`, access-schema.ts — issue #2482) so the HTTP body,
380
+ * the MCP args, and the service share ONE model. The overlay below carries
381
+ * server-resolved transport fields no client may set.
382
+ */
383
+ export interface EngramAccessRecallRequest extends RecallRequest {
380
384
  authenticatedPrincipal?: string;
381
385
  /** Trusted connector identity resolved at the transport boundary. */
382
386
  sourceConnector?: string;
383
- idempotencyKey?: string;
384
- topK?: number;
385
- mode?: RecallPlanMode | "auto";
386
- includeDebug?: boolean;
387
387
  abortSignal?: AbortSignal;
388
388
  /**
389
389
  * Internal, server-set field (issue #1906): wall-clock ms the caller
@@ -393,70 +393,6 @@ export interface EngramAccessRecallRequest {
393
393
  * (same pattern as `abortSignal`).
394
394
  */
395
395
  queueWaitMs?: number;
396
- /**
397
- * Recall disclosure depth. Omitting it preserves the `"chunk"` default.
398
- * Other accepted values are `"section"` and `"raw"`.
399
- */
400
- disclosure?: RecallDisclosure;
401
- /**
402
- * Coding-agent context (issue #569). When a connector resolves a git
403
- * context for the session's cwd, it passes it here and the access service
404
- * attaches it to the orchestrator before recall so project- / branch-
405
- * scoped namespace overlays apply.
406
- *
407
- * Keyed by `sessionKey`; ignored when `sessionKey` is absent.
408
- */
409
- codingContext?: {
410
- projectId: string;
411
- branch: string | null;
412
- rootPath: string;
413
- defaultBranch: string | null;
414
- } | null;
415
- /**
416
- * Working directory of the calling agent session. When provided and no
417
- * `codingContext` is already attached to the session, the service resolves
418
- * git context from this path and attaches it automatically. This enables
419
- * Claude Code hooks (and any connector that knows its cwd) to get
420
- * project-scoped memory without explicitly constructing a `codingContext`.
421
- */
422
- cwd?: string;
423
- /**
424
- * Arbitrary project tag for non-git-based project scoping. When provided,
425
- * creates a `CodingContext` with `projectId: "tag:<projectTag>"`.
426
- * Useful for OpenClaw sessions where the whole workspace is one git repo
427
- * but different conversations correspond to different client projects.
428
- * Takes precedence over `cwd`-based git resolution but NOT over an
429
- * explicit `codingContext`.
430
- */
431
- projectTag?: string;
432
- /**
433
- * Historical recall pin (issue #680). ISO 8601 timestamp. When set,
434
- * the orchestrator filters out memories whose `valid_at` is after this
435
- * instant OR whose `invalid_at` is at-or-before this instant, so the
436
- * caller sees the corpus as it existed at `asOf`. Invalid values are
437
- * rejected here with `EngramAccessInputError` (CLAUDE.md rule 51).
438
- */
439
- asOf?: string;
440
- /**
441
- * Free-form recall tag filter (issue #689). When non-empty, recall results
442
- * whose frontmatter `tags` do not match are removed from the response.
443
- * Comparison is case-sensitive exact match against tags stored on each
444
- * memory's frontmatter (see `storage.ts` and `docs/tags.md`).
445
- */
446
- tags?: string[];
447
- /**
448
- * Match mode for `tags` (issue #689). `"any"` (default when omitted)
449
- * admits results that carry at least one filter tag. `"all"` requires
450
- * every filter tag to be present. Ignored when `tags` is absent or empty.
451
- */
452
- tagMatch?: "any" | "all";
453
- /**
454
- * Issue #681 — when `true`, bypasses the configured
455
- * `graphTraversalConfidenceFloor` for this recall and includes graph edges
456
- * below the floor in traversal. Useful for diagnostic queries that need to
457
- * surface results pruned by confidence decay. Default `false`.
458
- */
459
- includeLowConfidence?: boolean;
460
396
  }
461
397
 
462
398
  /**
@@ -1033,27 +969,18 @@ export interface EngramAccessObserveMessage {
1033
969
  sourceFormat?: MessagePartSourceFormat;
1034
970
  }
1035
971
 
1036
- export interface EngramAccessObserveRequest extends SourceConnectorProvenance {
1037
- sessionKey: string;
972
+ /**
973
+ * Observe request. Wire fields derive from the canonical zod schema
974
+ * (`observeRequestSchema`, access-schema.ts — issue #2482); the service
975
+ * consumes the transport-cleaned message form (the wire schema tolerates
976
+ * nullable `parts`/`sourceFormat`, the service maps them to `undefined`).
977
+ */
978
+ export interface EngramAccessObserveRequest
979
+ extends Omit<ObserveRequest, "messages">,
980
+ SourceConnectorProvenance {
1038
981
  messages: EngramAccessObserveMessage[];
1039
- namespace?: string;
1040
982
  authenticatedPrincipal?: string;
1041
- skipExtraction?: boolean;
1042
- /** Optional idempotency key (issue #1649): a retried POST with the same key is deduplicated server-side; divergent reuse is a conflict. */
1043
- idempotencyKey?: string;
1044
- /**
1045
- * Working directory of the calling agent session (issue #569 wiring).
1046
- * When provided and no `codingContext` is attached for this session,
1047
- * resolves git context from the path and attaches it so writes route to
1048
- * the correct project namespace.
1049
- */
1050
- cwd?: string;
1051
- /**
1052
- * Arbitrary project tag for non-git-based project scoping (issue #569).
1053
- * Creates a `CodingContext` with `projectId: "tag:<projectTag>"`.
1054
- */
1055
- projectTag?: string;
1056
- readonly suppressQuarantine?: boolean; // #1888: mirrors EngramAccessWriteEnvelope.suppressQuarantine (replay re-submit skips dead-lettering).
983
+ readonly suppressQuarantine?: boolean; // #1888: replay re-submit skips dead-lettering.
1057
984
  }
1058
985
 
1059
986
  /**
@@ -17,6 +17,7 @@ import {
17
17
  buildActiveThreads,
18
18
  buildBriefing,
19
19
  buildChainFollowupGenerator,
20
+ buildOpenCommitments,
20
21
  BRIEFING_FOLLOWUP_DEFAULT_MODEL,
21
22
  } from "./briefing.js";
22
23
  import type {
@@ -1670,3 +1671,52 @@ test("buildActiveThreads: primary sort by updatedAt overrides id tiebreaker", ()
1670
1671
  assert.equal(threads[0]!.id, "entity:beta", "newer timestamp must rank first, overriding id tiebreaker");
1671
1672
  assert.equal(threads[1]!.id, "entity:alpha");
1672
1673
  });
1674
+
1675
+ // ──────────────────────────────────────────────────────────────────────────
1676
+ // buildOpenCommitments — non-English content (issue #2198)
1677
+ // ──────────────────────────────────────────────────────────────────────────
1678
+ function makeCommitmentMemory(overrides: {
1679
+ content: string;
1680
+ category?: MemoryFile["frontmatter"]["category"];
1681
+ tags?: string[];
1682
+ }): MemoryFile {
1683
+ return {
1684
+ path: "/synthetic/mem.md",
1685
+ frontmatter: {
1686
+ id: "synthetic-commitment",
1687
+ category: overrides.category ?? "fact",
1688
+ created: "2026-08-17T00:00:00.000Z",
1689
+ updated: "2026-08-17T00:00:00.000Z",
1690
+ source: "test",
1691
+ confidence: 0.9,
1692
+ confidenceTier: "explicit",
1693
+ tags: overrides.tags ?? [],
1694
+ },
1695
+ content: overrides.content,
1696
+ };
1697
+ }
1698
+
1699
+ test("buildOpenCommitments: fullwidth and Arabic question marks surface questions (issue #2198)", () => {
1700
+ const fullwidth = makeCommitmentMemory({ content: "このAPIのレート制限はいくつですか?" });
1701
+ const arabic = makeCommitmentMemory({ content: "ما هو موعد الاجتماع؟" });
1702
+ const english = makeCommitmentMemory({ content: "What is the rate limit?" });
1703
+
1704
+ const commitments = buildOpenCommitments([fullwidth, arabic, english]);
1705
+ assert.equal(commitments.length, 3);
1706
+ assert.ok(commitments.every((c) => c.kind === "question"));
1707
+ });
1708
+
1709
+ test("buildOpenCommitments: structured category is language-neutral (issue #2198)", () => {
1710
+ const japanese = makeCommitmentMemory({
1711
+ content: "金曜日までにレビューを提出する",
1712
+ category: "commitment",
1713
+ });
1714
+ const commitments = buildOpenCommitments([japanese]);
1715
+ assert.equal(commitments.length, 1);
1716
+ assert.equal(commitments[0]!.kind, "commitment");
1717
+ });
1718
+
1719
+ test("buildOpenCommitments: plain non-English statement without markers is not flagged", () => {
1720
+ const plain = makeCommitmentMemory({ content: "会議は終わりました" });
1721
+ assert.equal(buildOpenCommitments([plain]).length, 0);
1722
+ });
package/src/briefing.ts CHANGED
@@ -1114,14 +1114,15 @@ export function buildRecentEntities(
1114
1114
  .slice(0, MAX_RECENT_ENTITIES);
1115
1115
  }
1116
1116
 
1117
- function buildOpenCommitments(memories: MemoryFile[]): BriefingOpenCommitment[] {
1117
+ /** @internal exported for testing only. */
1118
+ export function buildOpenCommitments(memories: MemoryFile[]): BriefingOpenCommitment[] {
1118
1119
  const commitments: BriefingOpenCommitment[] = [];
1119
1120
 
1120
1121
  for (const memory of memories) {
1121
1122
  const tags = memory.frontmatter.tags ?? [];
1122
1123
  const isPending = tags.some((t) => t.toLowerCase() === "pending");
1123
1124
  const isCommitment = memory.frontmatter.category === "commitment";
1124
- const isUnresolvedQuestion = /(?:\?$|\bfollow[- ]up\b|\btodo\b)/i.test(memory.content);
1125
+ const isUnresolvedQuestion = /(?:[??؟]$|\bfollow[- ]up\b|\btodo\b)/i.test(memory.content);
1125
1126
 
1126
1127
  if (isPending || isCommitment || isUnresolvedQuestion) {
1127
1128
  const kind: BriefingOpenCommitment["kind"] = isCommitment
@@ -123,6 +123,21 @@ test("confirmation protocol: isConfirmationMessage recognizes exact-match keywor
123
123
  assert.ok(!isConfirmationMessage("please apply"));
124
124
  });
125
125
 
126
+ test("confirmation protocol: non-English exact-match confirmations (issue #2198)", () => {
127
+ assert.ok(isConfirmationMessage("はい"));
128
+ assert.ok(isConfirmationMessage("sí"));
129
+ assert.ok(isConfirmationMessage("ja"));
130
+ assert.ok(isConfirmationMessage("نعم"));
131
+ assert.ok(isConfirmationMessage(" JA "));
132
+ assert.ok(isConfirmationMessage("Sí"));
133
+ // Exact match only — partial or hedged text keeps the no-apply default.
134
+ assert.ok(!isConfirmationMessage("si")); // missing accent, not exact
135
+ assert.ok(!isConfirmationMessage("jam"));
136
+ assert.ok(!isConfirmationMessage("ja, aber"));
137
+ assert.ok(!isConfirmationMessage("نعم لا"));
138
+ assert.ok(!isConfirmationMessage("はい、しかし"));
139
+ });
140
+
126
141
  test("citation guard: uncited memory assertion gets warning", async () => {
127
142
  const executor = makeStubExecutor();
128
143
  // The LLM makes an assertion without calling any tools first.
@@ -85,10 +85,21 @@ export interface ChatEngineOptions {
85
85
  // Confirmation keywords — deterministic, not LLM-interpreted
86
86
  // ---------------------------------------------------------------------------
87
87
 
88
- const CONFIRMATION_KEYWORDS = new Set(["yes", "y", "apply", "confirm"]);
88
+ // Exact-match confirmations. Unrecognized text keeps the conservative
89
+ // no-apply default, so this stays a small fixed set (issue #2198).
90
+ const CONFIRMATION_KEYWORDS: Record<string, true> = {
91
+ yes: true,
92
+ y: true,
93
+ apply: true,
94
+ confirm: true,
95
+ "はい": true, // Japanese
96
+ "sí": true, // Spanish
97
+ ja: true, // German/Dutch
98
+ "نعم": true, // Arabic
99
+ };
89
100
 
90
101
  export function isConfirmationMessage(text: string): boolean {
91
- return CONFIRMATION_KEYWORDS.has(text.trim().toLowerCase());
102
+ return CONFIRMATION_KEYWORDS[text.trim().toLowerCase()] === true;
92
103
  }
93
104
 
94
105
  // ---------------------------------------------------------------------------
@@ -0,0 +1,63 @@
1
+ /**
2
+ * Day-summary composition tests — bidi isolation of user content (issue #2198).
3
+ * All fixtures are synthetic — no real user data.
4
+ */
5
+
6
+ import assert from "node:assert/strict";
7
+ import test from "node:test";
8
+
9
+ import { formatDaySummaryMemories } from "./day-summary.js";
10
+ import type { MemoryFile } from "./types.js";
11
+
12
+ const FSI = "\u2068";
13
+ const PDI = "\u2069";
14
+
15
+ function makeMemory(content: string): MemoryFile {
16
+ return {
17
+ path: "/synthetic/mem.md",
18
+ frontmatter: {
19
+ id: "synthetic-mem",
20
+ category: "fact",
21
+ created: "2026-08-17T00:00:00.000Z",
22
+ updated: "2026-08-17T00:00:00.000Z",
23
+ source: "test",
24
+ confidence: 0.9,
25
+ confidenceTier: "explicit",
26
+ tags: [],
27
+ },
28
+ content,
29
+ };
30
+ }
31
+
32
+ test("formatDaySummaryMemories wraps RTL content in FSI/PDI isolates (issue #2198)", () => {
33
+ const rtl = makeMemory("اجتماع الفريق غدا في العاشرة");
34
+ const out = formatDaySummaryMemories([rtl]);
35
+
36
+ const expected = `[synthetic-mem] (fact, 2026-08-17T00:00:00.000Z)\n${FSI}اجتماع الفريق غدا في العاشرة${PDI}`;
37
+ assert.equal(out, expected);
38
+ });
39
+
40
+ test("formatDaySummaryMemories isolates LTR content too — labels stay outside the isolate", () => {
41
+ const out = formatDaySummaryMemories([makeMemory("standup at ten")]);
42
+
43
+ assert.ok(out.includes(`${FSI}standup at ten${PDI}`), "content wrapped in FSI/PDI");
44
+ assert.ok(out.startsWith("[synthetic-mem] (fact,"), "Latin label precedes the isolate");
45
+ assert.ok(!out.includes(`${PDI}[`), "label not inside the isolate");
46
+ });
47
+
48
+ test("formatDaySummaryMemories isolates each memory's content independently", () => {
49
+ const out = formatDaySummaryMemories([
50
+ makeMemory("first item"),
51
+ makeMemory("عنصر ثان"),
52
+ ]);
53
+
54
+ const parts = out.split("\n\n");
55
+ assert.equal(parts.length, 2);
56
+ assert.ok(parts[0]!.includes(`${FSI}first item${PDI}`));
57
+ assert.ok(parts[1]!.includes(`${FSI}عنصر ثان${PDI}`));
58
+ });
59
+
60
+ test("formatDaySummaryMemories raw-string passthrough is not wrapped", () => {
61
+ const out = formatDaySummaryMemories(" plain string input ");
62
+ assert.equal(out, "plain string input");
63
+ });
@@ -93,6 +93,18 @@ export async function loadDaySummaryPrompt(): Promise<string> {
93
93
  return EMBEDDED_DAY_SUMMARY_PROMPT;
94
94
  }
95
95
 
96
+ const FSI = "\u2068"; // FIRST STRONG ISOLATE
97
+ const PDI = "\u2069"; // POP DIRECTIONAL ISOLATE
98
+
99
+ /**
100
+ * Wrap user content in Unicode bidi isolates so RTL text (Arabic, Hebrew)
101
+ * cannot reorder the surrounding Latin labels on the same composed line.
102
+ * No visible change for LTR content (issue #2198).
103
+ */
104
+ function bidiIsolate(text: string): string {
105
+ return `${FSI}${text}${PDI}`;
106
+ }
107
+
96
108
  export function formatDaySummaryMemories(memories: string | MemoryFile[]): string {
97
109
  if (typeof memories === "string") {
98
110
  return memories.trim();
@@ -102,7 +114,7 @@ export function formatDaySummaryMemories(memories: string | MemoryFile[]): strin
102
114
  .map((memory) => {
103
115
  const category = memory.frontmatter.category || "fact";
104
116
  const created = memory.frontmatter.created || "unknown";
105
- return `[${memory.frontmatter.id}] (${category}, ${created})\n${memory.content}`;
117
+ return `[${memory.frontmatter.id}] (${category}, ${created})\n${bidiIsolate(memory.content)}`;
106
118
  })
107
119
  .join("\n\n")
108
120
  .trim();
@@ -0,0 +1,115 @@
1
+ import assert from "node:assert/strict";
2
+ import os from "node:os";
3
+ import path from "node:path";
4
+ import { mkdtemp, rm } from "node:fs/promises";
5
+ import test from "node:test";
6
+
7
+ import { parseConfig } from "./config.js";
8
+ import { normalizeEntityText } from "./entity-schema.js";
9
+ import { buildEntityRecallSection } from "./entity-retrieval.js";
10
+ import { detectNonEnglishEntityQueryMode } from "./entity-retrieval-i18n.js";
11
+ import { StorageManager } from "./storage.js";
12
+ import type { PluginConfig, TranscriptEntry } from "./types.js";
13
+
14
+ function dialogueTurn(content: string): TranscriptEntry[] {
15
+ return [{
16
+ timestamp: new Date().toISOString(),
17
+ role: "user",
18
+ content,
19
+ sessionKey: "test-session",
20
+ turnId: "test-turn-1",
21
+ }];
22
+ }
23
+
24
+ function recallBase(
25
+ config: PluginConfig,
26
+ storage: StorageManager,
27
+ transcriptEntries: TranscriptEntry[],
28
+ ): Parameters<typeof buildEntityRecallSection>[0] {
29
+ return {
30
+ config,
31
+ storage,
32
+ query: "",
33
+ recentTurns: 2,
34
+ maxHints: 2,
35
+ maxSupportingFacts: 2,
36
+ maxRelatedEntities: 2,
37
+ maxChars: 10_000,
38
+ transcriptEntries,
39
+ };
40
+ }
41
+
42
+ test("non-English follow-ups resolve the recently discussed entity like the English pronoun follow-up (#2193)", async () => {
43
+ const memoryDir = await mkdtemp(path.join(os.tmpdir(), "remnic-entity-i18n-"));
44
+ try {
45
+ const storage = new StorageManager(memoryDir);
46
+ const entityRef = await storage.writeEntity("Alice", "person", []);
47
+ await storage.writeMemory("fact", "Alice leads the platform launch review.", {
48
+ source: "test",
49
+ entityRef,
50
+ });
51
+ const config = parseConfig({
52
+ openaiApiKey: "sk-test",
53
+ memoryDir,
54
+ workspaceDir: path.join(memoryDir, "workspace"),
55
+ });
56
+ const dialogue = dialogueTurn("I spoke with Alice about the launch review yesterday.");
57
+
58
+ // English pronoun follow-up and its Japanese/Chinese equivalents must
59
+ // resolve to the same recently-discussed entity.
60
+ for (const query of ["What about her?", "それで、どうなった?", "彼はどうなった?", "然后呢?"]) {
61
+ const section = await buildEntityRecallSection({
62
+ ...recallBase(config, storage, dialogue),
63
+ query,
64
+ });
65
+ assert.ok(section, `expected an entity hint section for query: ${query}`);
66
+ assert.match(section, /alice/i);
67
+ }
68
+
69
+ // Without recent dialogue both decline identically — no entity to carry.
70
+ for (const query of ["What about him?", "それで、どうなった?"]) {
71
+ const section = await buildEntityRecallSection({
72
+ ...recallBase(config, storage, []),
73
+ query,
74
+ });
75
+ assert.equal(section, null, `expected no entity section without dialogue: ${query}`);
76
+ }
77
+ } finally {
78
+ await rm(memoryDir, { recursive: true, force: true });
79
+ }
80
+ });
81
+
82
+ test("zero-pronoun Japanese follow-up retrieves a CJK entity from a particle-bound mention (#2193)", async () => {
83
+ const memoryDir = await mkdtemp(path.join(os.tmpdir(), "remnic-entity-i18n-cjk-"));
84
+ try {
85
+ const storage = new StorageManager(memoryDir);
86
+ const entityRef = await storage.writeEntity("田中", "person", []);
87
+ await storage.writeMemory("fact", "田中は来週の発表を準備している。", {
88
+ source: "test",
89
+ entityRef,
90
+ });
91
+ const config = parseConfig({
92
+ openaiApiKey: "sk-test",
93
+ memoryDir,
94
+ workspaceDir: path.join(memoryDir, "workspace"),
95
+ });
96
+
97
+ for (const query of ["それで、どうなった?", "彼女はどうなった?"]) {
98
+ const section = await buildEntityRecallSection({
99
+ ...recallBase(config, storage, dialogueTurn("田中とは昨日打ち合わせをした。")),
100
+ query,
101
+ });
102
+ assert.ok(section, `expected an entity hint section for query: ${query}`);
103
+ assert.match(section, /田中/);
104
+ }
105
+ } finally {
106
+ await rm(memoryDir, { recursive: true, force: true });
107
+ }
108
+ });
109
+
110
+ test("non-English query-mode cue table classification (#2193)", () => {
111
+ assert.equal(detectNonEnglishEntityQueryMode(normalizeEntityText("彼はどうなった")), "follow_up");
112
+ assert.equal(detectNonEnglishEntityQueryMode(normalizeEntityText("¿y ella?")), "follow_up");
113
+ assert.equal(detectNonEnglishEntityQueryMode(normalizeEntityText("田中さんの最近の状況")), "timeline");
114
+ assert.equal(detectNonEnglishEntityQueryMode(normalizeEntityText("了解しました")), null);
115
+ });
@@ -0,0 +1,161 @@
1
+ import { normalizeEntityText } from "./entity-schema.js";
2
+
3
+ /**
4
+ * Non-English query-mode cues for entity retrieval (#2193).
5
+ *
6
+ * #2161 made explicit entity mentions language-independent, but follow-up /
7
+ * pronoun coreference and timeline phrasing still classify through English
8
+ * word lists in `detectEntityQueryMode`. These cue tables plus the structural
9
+ * follow-up signal below close that gap without building a full coreference
10
+ * engine: the structural layer covers zero-pronoun scripts (Japanese,
11
+ * Chinese, Korean — languages that omit the subject entirely and can never
12
+ * trip a pronoun word list), and the tables add precision for other scripts,
13
+ * including Latin-script languages whose pronoun follow-ups carry their
14
+ * pronoun explicitly. Latin-script queries never use the structural layer:
15
+ * their generic technical questions ("what does this error mean?") are
16
+ * indistinguishable from subject-less follow-ups by shape alone.
17
+ */
18
+
19
+ export type EntityQueryMode = "direct" | "timeline" | "follow_up";
20
+
21
+ /** Shared short-question bound. Whitespace tokens are a poor length proxy
22
+ * for unspaced scripts, so bound graphemes too (48 graphemes ≈ 8 words). */
23
+ const FOLLOW_UP_MAX_TOKENS = 8;
24
+ const FOLLOW_UP_MAX_GRAPHEMES = 48;
25
+
26
+ /** Latin letters mark a script with explicit pronouns; structural fallback
27
+ * never applies there (English "what does this error mean?" and its
28
+ * relatives keep the technical-question guard in detectEntityQueryMode). */
29
+ const LATIN_LETTER_RE = /\p{Script=Latin}/u;
30
+
31
+ /** Latin / question marks: ASCII `?`, fullwidth `?` (CJK), Arabic `؟`. */
32
+ const QUESTION_MARK_RE = /[??؟]/;
33
+
34
+ /**
35
+ * CJK cues and normalized multi-word phrases match by containment; single
36
+ * Latin/Cyrillic/Arabic words match with a script-agnostic letter boundary
37
+ * so `él` never matches `el` and `il` never matches `famille`.
38
+ */
39
+ const FOLLOW_UP_CONTAINS_CUES = [
40
+ // ja
41
+ "彼", "彼女", "あの人", "その人", "それで", "ちなみに",
42
+ // zh (simplified + traditional)
43
+ "他", "她", "它", "他们", "她们", "他們", "她們", "然后呢", "然後呢",
44
+ // ko
45
+ "그녀", "그 사람", "걔",
46
+ ] as const;
47
+
48
+ const FOLLOW_UP_WORD_CUES = [
49
+ // es
50
+ "él", "ella", "ellos", "ellas",
51
+ // fr
52
+ "elle", "eux",
53
+ // de
54
+ "sie",
55
+ // pt
56
+ "ele", "ela",
57
+ // it
58
+ "lui", "lei",
59
+ // ru
60
+ "он", "она", "они",
61
+ // ar
62
+ "هو", "هي", "هم",
63
+ ] as const;
64
+
65
+ const TIMELINE_CONTAINS_CUES = [
66
+ // ja
67
+ "最近", "その後", "どうなった", "何があった",
68
+ // zh (simplified + traditional)
69
+ "怎么样了", "怎麼樣了", "后来", "後來", "最新", "近况", "近況", "什么情况", "什麼情況",
70
+ // ko
71
+ "요즘", "요새", "최근",
72
+ // multi-word phrases, already in normalized form (punctuation → space)
73
+ "qué hay de nuevo", "qué pasó con", "quoi de neuf", "что нового",
74
+ "что случилось", "ما الجديد", "ماذا حدث", "was gibt s neues",
75
+ ] as const;
76
+
77
+ function wordCueRegex(cues: readonly string[]): RegExp {
78
+ const alternation = cues
79
+ .map((cue) => cue.replace(/[.*+?^${}()|[\]\\]/g, "\\$&"))
80
+ .join("|");
81
+ return new RegExp(`(?<![\\p{L}\\p{N}])(?:${alternation})(?![\\p{L}\\p{N}])`, "u");
82
+ }
83
+
84
+ const FOLLOW_UP_WORD_RE = wordCueRegex(FOLLOW_UP_WORD_CUES);
85
+
86
+ function isShortFollowUpShaped(normalized: string): boolean {
87
+ if (!normalized) return false;
88
+ const tokens = normalized.split(/\s+/).filter(Boolean);
89
+ if (tokens.length > FOLLOW_UP_MAX_TOKENS) return false;
90
+ return Array.from(normalized).length <= FOLLOW_UP_MAX_GRAPHEMES;
91
+ }
92
+
93
+ /**
94
+ * Classify already-normalized non-English queries. Returns null when no
95
+ * table cue matches; callers keep their English rules untouched.
96
+ */
97
+ export function detectNonEnglishEntityQueryMode(normalizedQuery: string): EntityQueryMode | null {
98
+ if (!normalizedQuery) return null;
99
+ if (
100
+ isShortFollowUpShaped(normalizedQuery)
101
+ && (
102
+ FOLLOW_UP_CONTAINS_CUES.some((cue) => normalizedQuery.includes(cue))
103
+ || FOLLOW_UP_WORD_RE.test(normalizedQuery)
104
+ )
105
+ ) {
106
+ return "follow_up";
107
+ }
108
+ if (TIMELINE_CONTAINS_CUES.some((cue) => normalizedQuery.includes(cue))) {
109
+ return "timeline";
110
+ }
111
+ return null;
112
+ }
113
+
114
+ /**
115
+ * Structural follow-up signal, independent of pronoun vocabulary: a short
116
+ * question carrying no entity name, asked while recent dialogue exists, is a
117
+ * coreference cue in zero-pronoun scripts (Latin-script queries are excluded
118
+ * above — their follow-ups carry pronouns that the cue tables and English
119
+ * rules classify). Recent-turn candidate resolution (and its empty result →
120
+ * section absent) remains the real gate, so this only routes the query into
121
+ * the follow-up path; it never invents an entity.
122
+ */
123
+ export function isStructuralEntityFollowUpQuery(query: string, hasRecentDialogue: boolean): boolean {
124
+ if (!hasRecentDialogue) return false;
125
+ if (LATIN_LETTER_RE.test(query)) return false;
126
+ const normalized = normalizeEntityText(query);
127
+ return isShortFollowUpShaped(normalized) && QUESTION_MARK_RE.test(query);
128
+ }
129
+
130
+ const ENTITY_PRONOUN_RE = /\b(he|him|his|she|her|they|them|their|it|its)\b/i;
131
+
132
+ export function detectEntityQueryMode(query: string): EntityQueryMode | null {
133
+ const normalized = normalizeEntityText(query);
134
+ if (!normalized) return null;
135
+ if (
136
+ /^(what about|and what about|how about|what happened (with|to) (he|him|his|she|her|they|them|their|it|its)|did (he|she|they|it)|is (he|she|they|it)|was (he|she|they|it))\b/.test(normalized)
137
+ ) {
138
+ return "follow_up";
139
+ }
140
+ if (
141
+ /^(who is|who s|what do we know about|what does|tell me about|what can you tell me about|what s new with|what happened with|what happened to|status of|where is|how is)\b/.test(normalized)
142
+ ) {
143
+ if (/^what does\b/.test(normalized)) {
144
+ if (/^what does (?:this|that|it|the|a|an|my|our|your|their)\b/.test(normalized)) {
145
+ return null;
146
+ }
147
+ if (
148
+ /^what does [a-z0-9-]+ (?:error|warning|exception|failure|stack|trace|code|message|log)\b/.test(normalized)
149
+ && /\b(mean|means|indicate|indicates|imply|implies)\b/.test(normalized)
150
+ ) {
151
+ return null;
152
+ }
153
+ }
154
+ return /what happened|what s new|status of|how is|where is/.test(normalized) ? "timeline" : "direct";
155
+ }
156
+ if (ENTITY_PRONOUN_RE.test(normalized) && normalized.split(/\s+/).length <= 8) {
157
+ return "follow_up";
158
+ }
159
+ return detectNonEnglishEntityQueryMode(normalized);
160
+ }
161
+