@remnic/core 9.64.0 → 9.64.2

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 (486) hide show
  1. package/dist/access-admin-ops-surface.d.ts +12 -11
  2. package/dist/access-admin-ops-surface.js +24 -23
  3. package/dist/access-authorization-probe.d.ts +12 -11
  4. package/dist/access-authorization-probe.js +25 -24
  5. package/dist/access-boundary.d.ts +13 -12
  6. package/dist/access-boundary.js +24 -23
  7. package/dist/access-cli.js +74 -72
  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 +24 -23
  12. package/dist/access-health-types.d.ts +1 -1
  13. package/dist/access-http-lcm-compaction.d.ts +12 -11
  14. package/dist/access-http-lifecycle-flush.d.ts +12 -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 +26 -25
  18. package/dist/access-http.d.ts +13 -12
  19. package/dist/access-http.js +41 -40
  20. package/dist/access-identity-continuity-surface.d.ts +9 -9
  21. package/dist/access-identity-continuity-surface.js +24 -23
  22. package/dist/access-lcm-surface.d.ts +12 -11
  23. package/dist/access-lcm-surface.js +24 -23
  24. package/dist/access-mcp-output-schemas.js +1 -1
  25. package/dist/access-mcp.d.ts +12 -186
  26. package/dist/access-mcp.js +33 -32
  27. package/dist/access-memory-search-fanout.d.ts +2 -2
  28. package/dist/{access-namespace-preflight-CrF0FKaz.d.ts → access-namespace-preflight-CYeI1R2_.d.ts} +1 -1
  29. package/dist/access-namespace-preflight.d.ts +3 -3
  30. package/dist/access-namespace-preflight.js +24 -23
  31. package/dist/access-observe-write-surface.d.ts +12 -11
  32. package/dist/access-observe-write-surface.js +24 -23
  33. package/dist/access-offline-manifest.d.ts +9 -9
  34. package/dist/access-operations-batch.js +27 -26
  35. package/dist/access-operations.d.ts +13 -12
  36. package/dist/access-operations.js +30 -29
  37. package/dist/access-recall-concurrency.d.ts +12 -11
  38. package/dist/access-recall-concurrency.js +24 -23
  39. package/dist/access-recall-response.d.ts +12 -11
  40. package/dist/access-recall-response.js +24 -23
  41. package/dist/access-recall-surface.d.ts +12 -11
  42. package/dist/access-recall-surface.js +24 -23
  43. package/dist/access-schema.js +3 -3
  44. package/dist/{access-service-BqF4UK8Z.d.ts → access-service-BKtdXnyk.d.ts} +294 -12
  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 +24 -23
  48. package/dist/access-surface-catalog.d.ts +12 -11
  49. package/dist/access-surface-catalog.js +28 -25
  50. package/dist/access-surface-catalog.js.map +1 -1
  51. package/dist/access-wearables-meetings-surface.d.ts +3 -3
  52. package/dist/action-confidence.d.ts +1 -1
  53. package/dist/active-memory-bridge.d.ts +1 -1
  54. package/dist/active-recall.d.ts +1 -1
  55. package/dist/active-recall.js +1 -1
  56. package/dist/adapters/index.js +4 -4
  57. package/dist/adapters/registry.js +2 -2
  58. package/dist/ambient-provenance.d.ts +1 -1
  59. package/dist/artifact-search.d.ts +1 -1
  60. package/dist/behavior-learner.d.ts +1 -1
  61. package/dist/behavior-signals.d.ts +1 -1
  62. package/dist/bootstrap.d.ts +9 -9
  63. package/dist/briefing-window.d.ts +2 -2
  64. package/dist/briefing.d.ts +2 -2
  65. package/dist/briefing.js +10 -10
  66. package/dist/buffer-surprise-report.d.ts +1 -1
  67. package/dist/buffer-turn-helpers.d.ts +1 -1
  68. package/dist/buffer.d.ts +2 -2
  69. package/dist/buffer.js +2 -2
  70. package/dist/bulk-import/index.d.ts +3 -3
  71. package/dist/calibration.d.ts +1 -1
  72. package/dist/capabilities.d.ts +1 -1
  73. package/dist/{capsule-crypto-GWVG7LGC.js → capsule-crypto-7FJQINUR.js} +2 -2
  74. package/dist/{catalog-C0KIwZqR.d.ts → catalog-CLAqQO2L.d.ts} +1 -1
  75. package/dist/causal-behavior.d.ts +1 -1
  76. package/dist/causal-consolidation.d.ts +1 -1
  77. package/dist/causal-consolidation.js +11 -11
  78. package/dist/causal-trajectory-graph.d.ts +1 -1
  79. package/dist/{chunk-BTUIHRRR.js → chunk-246HFJVG.js} +2 -2
  80. package/dist/{chunk-OWHERGF2.js → chunk-2NLLXCJG.js} +2 -2
  81. package/dist/{chunk-5SZ6CLGJ.js → chunk-2QI2JBLQ.js} +360 -238
  82. package/dist/chunk-2QI2JBLQ.js.map +1 -0
  83. package/dist/{chunk-6NMZXEJ7.js → chunk-3A46U7XG.js} +2 -2
  84. package/dist/{chunk-S6KMN6MJ.js → chunk-3LOQN3TO.js} +10 -5
  85. package/dist/chunk-3LOQN3TO.js.map +1 -0
  86. package/dist/{chunk-Z3Q5I5F6.js → chunk-44DSGZFF.js} +2 -2
  87. package/dist/{chunk-VENMDW4U.js → chunk-55SJFHVD.js} +6 -6
  88. package/dist/{chunk-VCBG52MM.js → chunk-5HERQ5FX.js} +7 -7
  89. package/dist/{chunk-IRXMJLTW.js → chunk-5HK3CJAR.js} +2 -2
  90. package/dist/{chunk-KG2CT762.js → chunk-6LTCUN3T.js} +2 -2
  91. package/dist/{chunk-UUYQWKHO.js → chunk-7BVO64UC.js} +2 -2
  92. package/dist/{chunk-X6HNXVXS.js → chunk-7V3AZWWZ.js} +4 -4
  93. package/dist/{chunk-EHC3FIJ4.js → chunk-A2IBK3TG.js} +2 -2
  94. package/dist/{chunk-6BV6ZZZA.js → chunk-C6AKYOFO.js} +2 -2
  95. package/dist/{chunk-7ML7STOD.js → chunk-CKZHKFY3.js} +3 -3
  96. package/dist/{chunk-CUDSA46O.js → chunk-CUIAHZPZ.js} +2 -2
  97. package/dist/{chunk-QFPX7QZG.js → chunk-DA2O3F5V.js} +25 -11
  98. package/dist/chunk-DA2O3F5V.js.map +1 -0
  99. package/dist/{chunk-CTD5CPD2.js → chunk-DC4FJY2G.js} +22 -7
  100. package/dist/{chunk-CTD5CPD2.js.map → chunk-DC4FJY2G.js.map} +1 -1
  101. package/dist/{chunk-2BRCV2IV.js → chunk-DG6MJD7W.js} +2 -2
  102. package/dist/{chunk-YGSDWO3U.js → chunk-DHKV6E4A.js} +2 -2
  103. package/dist/{chunk-DZFPHARJ.js → chunk-EJDLQRUO.js} +2 -2
  104. package/dist/{chunk-VD2OT77P.js → chunk-GEULB2VI.js} +2 -1
  105. package/dist/chunk-GEULB2VI.js.map +1 -0
  106. package/dist/{chunk-BPLPGOUJ.js → chunk-GVRLED7R.js} +2 -2
  107. package/dist/{chunk-YINSSARY.js → chunk-H5CGAD7L.js} +1 -1
  108. package/dist/{chunk-QICOU4RY.js → chunk-IFK3PVM7.js} +2 -2
  109. package/dist/{chunk-E7MYSCSL.js → chunk-IJXECCUV.js} +2 -2
  110. package/dist/{chunk-RKNJBZ55.js → chunk-JBPKEARU.js} +4 -4
  111. package/dist/{chunk-WQ6TRWAE.js → chunk-JCSUNXYJ.js} +3 -3
  112. package/dist/{chunk-5W7CTZ2E.js → chunk-KQAFEZQX.js} +4 -4
  113. package/dist/{chunk-6IKXAAJI.js → chunk-KRPE7ANR.js} +2 -2
  114. package/dist/{chunk-FEP45MYY.js → chunk-LOETWOEB.js} +2 -2
  115. package/dist/{chunk-4IIDTPSK.js → chunk-LZKCMK3U.js} +2 -2
  116. package/dist/{chunk-ML4MI2RR.js → chunk-MJRVF7SF.js} +29 -28
  117. package/dist/chunk-MJRVF7SF.js.map +1 -0
  118. package/dist/{chunk-K547KS3X.js → chunk-ML3U4KPR.js} +4 -4
  119. package/dist/{chunk-HIEWDJ2O.js → chunk-MSTNSVXI.js} +2 -1
  120. package/dist/chunk-MSTNSVXI.js.map +1 -0
  121. package/dist/{chunk-BTBAHTQ5.js → chunk-NO7B6DRB.js} +2 -2
  122. package/dist/{chunk-G5F4MXXC.js → chunk-ON2P3SHG.js} +2 -2
  123. package/dist/{chunk-2Q4UAPLD.js → chunk-OQIRBGUU.js} +4 -4
  124. package/dist/{chunk-PQODT53H.js → chunk-PE76XIDM.js} +3 -3
  125. package/dist/{chunk-MVIYRRVJ.js → chunk-PMVPCZJZ.js} +5 -5
  126. package/dist/{chunk-CK3DZ6OE.js → chunk-PVIXAMWM.js} +2 -2
  127. package/dist/{chunk-BB2LH5JM.js → chunk-RNORDDD6.js} +11 -1
  128. package/dist/chunk-RNORDDD6.js.map +1 -0
  129. package/dist/{chunk-HZXO2CJ6.js → chunk-RWLRKMZK.js} +2 -2
  130. package/dist/{chunk-SYU5JOBQ.js → chunk-SB6YBB2V.js} +2 -2
  131. package/dist/{chunk-3F3CVVDS.js → chunk-SHQFYZTD.js} +2 -2
  132. package/dist/chunk-TKI2WOL5.js +256 -0
  133. package/dist/chunk-TKI2WOL5.js.map +1 -0
  134. package/dist/chunk-TY35YQ6E.js +77 -0
  135. package/dist/chunk-TY35YQ6E.js.map +1 -0
  136. package/dist/{chunk-R7XE5ZUR.js → chunk-UIYYS2YI.js} +2 -2
  137. package/dist/{chunk-ZWYXSF2T.js → chunk-UMDZXW5J.js} +118 -4
  138. package/dist/chunk-UMDZXW5J.js.map +1 -0
  139. package/dist/{chunk-G5OB4XZX.js → chunk-VANZKHTN.js} +4 -4
  140. package/dist/{chunk-QATILW4B.js → chunk-VLES5S4K.js} +271 -62
  141. package/dist/chunk-VLES5S4K.js.map +1 -0
  142. package/dist/{chunk-AR253JBM.js → chunk-VRYEXPRX.js} +1 -1
  143. package/dist/chunk-VRYEXPRX.js.map +1 -0
  144. package/dist/{chunk-7DRSWPUV.js → chunk-VUP47UJI.js} +3 -3
  145. package/dist/{chunk-65NQFK7D.js → chunk-WBM5NR4E.js} +2 -2
  146. package/dist/{chunk-UVYI6VIX.js → chunk-X7Y7WX73.js} +1 -1
  147. package/dist/{chunk-GIMQJ5RX.js → chunk-XACYILRA.js} +49 -14
  148. package/dist/chunk-XACYILRA.js.map +1 -0
  149. package/dist/{chunk-63JMI45N.js → chunk-XBRGJJK7.js} +2 -2
  150. package/dist/{chunk-WCWIV2JH.js → chunk-XH4IQVTN.js} +2 -2
  151. package/dist/{chunk-77E7LLMV.js → chunk-XZUCNVGE.js} +8 -8
  152. package/dist/{chunk-LJQGQUNS.js → chunk-YFQTDE7N.js} +2 -2
  153. package/dist/{chunk-5OOTHWGJ.js → chunk-YXGU3MDQ.js} +2 -2
  154. package/dist/{chunk-SRLQROQJ.js → chunk-Z6CJLYXT.js} +4 -4
  155. package/dist/{chunk-Z4UPRZR6.js → chunk-ZSYE2QVJ.js} +2 -2
  156. package/dist/{cli-BX0O688c.d.ts → cli-CLvBewKf.d.ts} +5 -5
  157. package/dist/cli.d.ts +13 -13
  158. package/dist/cli.js +57 -56
  159. package/dist/coding/pre-action-gate.d.ts +1 -1
  160. package/dist/compounding/engine.d.ts +2 -2
  161. package/dist/compounding/engine.js +10 -10
  162. package/dist/compounding/preference-consolidator.d.ts +1 -1
  163. package/dist/compression-optimizer.d.ts +1 -1
  164. package/dist/config.d.ts +1 -1
  165. package/dist/config.js +1 -1
  166. package/dist/connectors/codex-materialize-runner.d.ts +1 -1
  167. package/dist/connectors/codex-materialize-runner.js +10 -10
  168. package/dist/connectors/codex-materialize.d.ts +1 -1
  169. package/dist/connectors/index.d.ts +1 -1
  170. package/dist/connectors/index.js +10 -10
  171. package/dist/consolidation-provenance-check.d.ts +2 -2
  172. package/dist/consolidation-undo.d.ts +2 -2
  173. package/dist/contradiction/index.d.ts +2 -2
  174. package/dist/contradiction/index.js +4 -4
  175. package/dist/converge-config.d.ts +1 -1
  176. package/dist/convergence-refresh.d.ts +2 -2
  177. package/dist/convergence-refresh.js +12 -12
  178. package/dist/conversation-index/backend.d.ts +1 -1
  179. package/dist/conversation-index/chunker.d.ts +1 -1
  180. package/dist/conversation-index/faiss-adapter.d.ts +1 -1
  181. package/dist/conversation-index/indexer.d.ts +1 -1
  182. package/dist/conversation-index/search.d.ts +1 -1
  183. package/dist/corpus-watermark.d.ts +1 -1
  184. package/dist/corpus-watermark.js +12 -12
  185. package/dist/day-summary.d.ts +1 -1
  186. package/dist/delinearize.d.ts +1 -1
  187. package/dist/dependency-propagation-config.d.ts +1 -1
  188. package/dist/{dependency-propagation-delivery-Cph4PnBe.d.ts → dependency-propagation-delivery-DMqIw9Zh.d.ts} +1 -1
  189. package/dist/direct-answer-wiring.d.ts +1 -1
  190. package/dist/direct-answer.d.ts +1 -1
  191. package/dist/embedding-fallback.d.ts +1 -1
  192. package/dist/enrichment/index.d.ts +1 -1
  193. package/dist/entity-origin-fields.d.ts +1 -1
  194. package/dist/entity-retrieval.d.ts +2 -2
  195. package/dist/entity-retrieval.js +10 -10
  196. package/dist/entity-schema.d.ts +1 -1
  197. package/dist/episodic-context.d.ts +1 -1
  198. package/dist/explicit-capture.d.ts +9 -9
  199. package/dist/external-wiki-access.d.ts +12 -11
  200. package/dist/external-wiki-access.js +25 -24
  201. package/dist/external-wiki-collection-registration.d.ts +1 -1
  202. package/dist/external-wiki-collection.d.ts +1 -1
  203. package/dist/external-wiki-mcp-tools.d.ts +12 -13
  204. package/dist/extraction-error-classification.d.ts +1 -1
  205. package/dist/extraction-faithfulness.d.ts +1 -1
  206. package/dist/extraction-judge-telemetry.d.ts +1 -1
  207. package/dist/extraction-judge-training.d.ts +1 -1
  208. package/dist/extraction-judge.d.ts +1 -1
  209. package/dist/extraction-liveness.d.ts +1 -1
  210. package/dist/extraction-normalization.d.ts +1 -1
  211. package/dist/extraction-prompt.d.ts +1 -1
  212. package/dist/extraction-source-grounding-rules.d.ts +1 -1
  213. package/dist/extraction-source-grounding.d.ts +1 -1
  214. package/dist/extraction.d.ts +1 -1
  215. package/dist/extraction.js +13 -13
  216. package/dist/fallback-llm.d.ts +1 -1
  217. package/dist/graph-dashboard-diff.d.ts +1 -1
  218. package/dist/graph-dashboard-key.d.ts +1 -1
  219. package/dist/graph-dashboard-parser.d.ts +1 -1
  220. package/dist/graph-edge-reinforcement.d.ts +1 -1
  221. package/dist/graph-path-reconstruction.d.ts +1 -1
  222. package/dist/graph-path-scoring.d.ts +1 -1
  223. package/dist/graph-snapshot.d.ts +1 -1
  224. package/dist/graph.d.ts +1 -1
  225. package/dist/harmonic-retrieval.js +1 -1
  226. package/dist/importance.d.ts +1 -1
  227. package/dist/importers/index.d.ts +1 -1
  228. package/dist/in-flight-reads.d.ts +1 -1
  229. package/dist/index.d.ts +33 -24
  230. package/dist/index.js +120 -84
  231. package/dist/intent.d.ts +1 -1
  232. package/dist/lcm/engine.d.ts +1 -1
  233. package/dist/lcm/engine.js +3 -3
  234. package/dist/lcm/index.d.ts +1 -1
  235. package/dist/lcm/index.js +11 -11
  236. package/dist/lcm/tools.d.ts +1 -1
  237. package/dist/lifecycle.d.ts +1 -1
  238. package/dist/live-connectors-runner.d.ts +1 -1
  239. package/dist/local-llm.d.ts +1 -1
  240. package/dist/local-model-endpoint.d.ts +1 -1
  241. package/dist/maintenance/memory-governance.d.ts +1 -1
  242. package/dist/maintenance/memory-governance.js +10 -10
  243. package/dist/maintenance/rebuild-memory-lifecycle-ledger.d.ts +2 -2
  244. package/dist/maintenance/rebuild-memory-lifecycle-ledger.js +10 -10
  245. package/dist/maintenance/rebuild-memory-projection.d.ts +2 -2
  246. package/dist/maintenance/rebuild-memory-projection.js +11 -11
  247. package/dist/{maintenance-BNq31xpo.d.ts → maintenance-DITiehFX.d.ts} +3 -3
  248. package/dist/mcp-memory-inspector-app.d.ts +12 -11
  249. package/dist/mcp-read-only-tools.js +1 -1
  250. package/dist/memory-action-policy.d.ts +1 -1
  251. package/dist/memory-cache.d.ts +1 -1
  252. package/dist/memory-lifecycle-ledger-utils.d.ts +1 -1
  253. package/dist/memory-projection-store.d.ts +1 -1
  254. package/dist/memory-provenance.d.ts +1 -1
  255. package/dist/memory-snapshot.d.ts +1 -1
  256. package/dist/memory-worth-outcomes.d.ts +2 -2
  257. package/dist/models-json.d.ts +1 -1
  258. package/dist/namespaces/migrate.d.ts +3 -3
  259. package/dist/namespaces/migrate.js +11 -11
  260. package/dist/namespaces/principal.d.ts +1 -1
  261. package/dist/namespaces/search.d.ts +1 -1
  262. package/dist/namespaces/search.js +7 -7
  263. package/dist/namespaces/storage.d.ts +3 -3
  264. package/dist/namespaces/storage.js +10 -10
  265. package/dist/native-knowledge.d.ts +1 -1
  266. package/dist/offline-sync-impression-drain.d.ts +1 -1
  267. package/dist/operator-doctor-corpus.d.ts +1 -1
  268. package/dist/operator-doctor-corpus.js +13 -13
  269. package/dist/operator-doctor-replica.d.ts +1 -1
  270. package/dist/operator-toolkit.d.ts +3 -3
  271. package/dist/operator-toolkit.js +19 -19
  272. package/dist/orchestration/compression-guideline-coordinator.d.ts +2 -2
  273. package/dist/orchestration/maintenance.d.ts +4 -4
  274. package/dist/orchestration/maintenance.js +16 -16
  275. package/dist/{orchestrator-CBuUOP2J.d.ts → orchestrator-6fPa2l9x.d.ts} +8 -8
  276. package/dist/orchestrator.d.ts +9 -9
  277. package/dist/orchestrator.js +74 -72
  278. package/dist/patterns-cli.d.ts +1 -1
  279. package/dist/{pipeline-CW_Q4WvX.d.ts → pipeline-DHpYtfM3.d.ts} +1 -1
  280. package/dist/policy-runtime.d.ts +1 -1
  281. package/dist/proactive-contention.d.ts +1 -1
  282. package/dist/provenance.d.ts +1 -1
  283. package/dist/{public-http-BeJ1_JI1.d.ts → public-http-BT36aBb-.d.ts} +1 -1
  284. package/dist/{qmd-q-cAzYuC.d.ts → qmd-BaX31tM0.d.ts} +1 -1
  285. package/dist/qmd-preflight.d.ts +2 -2
  286. package/dist/qmd-recall-cache.d.ts +1 -1
  287. package/dist/qmd.d.ts +2 -2
  288. package/dist/recall-concurrency-config.d.ts +1 -1
  289. package/dist/recall-disclosure-escalation.d.ts +1 -1
  290. package/dist/recall-explain-renderer.d.ts +1 -1
  291. package/dist/recall-explain-renderer.js +3 -3
  292. package/dist/recall-memory-map.d.ts +1 -1
  293. package/dist/recall-planner-llm.d.ts +1 -1
  294. package/dist/recall-state.d.ts +1 -1
  295. package/dist/recall-tag-filter.d.ts +1 -1
  296. package/dist/recall-timings.d.ts +1 -1
  297. package/dist/recall-xray-cli.d.ts +1 -1
  298. package/dist/recall-xray-cli.js +4 -4
  299. package/dist/recall-xray-renderer.d.ts +1 -1
  300. package/dist/recall-xray-renderer.js +3 -3
  301. package/dist/recall-xray.d.ts +1 -1
  302. package/dist/recall-xray.js +2 -2
  303. package/dist/reconcile/cursor.d.ts +1 -1
  304. package/dist/reconcile/manifest.d.ts +1 -1
  305. package/dist/reconcile/plan.d.ts +1 -1
  306. package/dist/replay/normalizers/chatgpt.d.ts +1 -1
  307. package/dist/replay/normalizers/claude.d.ts +1 -1
  308. package/dist/replay/normalizers/openclaw.d.ts +1 -1
  309. package/dist/replay/normalizers/shared.d.ts +1 -1
  310. package/dist/replay/runner.d.ts +1 -1
  311. package/dist/replay/types.d.ts +1 -1
  312. package/dist/replica-divergence.d.ts +1 -1
  313. package/dist/replica-peers-config.d.ts +1 -1
  314. package/dist/resolve-auth-token.d.ts +1 -1
  315. package/dist/resume-bundles.js +2 -2
  316. package/dist/retrieval-agents.d.ts +2 -2
  317. package/dist/retrieval-tiers.d.ts +1 -1
  318. package/dist/routing/engine.d.ts +1 -1
  319. package/dist/routing/store.d.ts +1 -1
  320. package/dist/salvage-envelope.d.ts +1 -1
  321. package/dist/{scope-profiles-CIr4mXgp.d.ts → scope-profiles-1hYWJ9bM.d.ts} +1 -1
  322. package/dist/search/embed-helper.d.ts +1 -1
  323. package/dist/search/factory.d.ts +1 -1
  324. package/dist/search/factory.js +6 -6
  325. package/dist/search/index.d.ts +1 -1
  326. package/dist/search/index.js +10 -10
  327. package/dist/search/lancedb-backend.d.ts +1 -1
  328. package/dist/search/lancedb-backend.js +2 -2
  329. package/dist/search/meilisearch-backend.d.ts +1 -1
  330. package/dist/search/meilisearch-backend.js +2 -2
  331. package/dist/search/noop-backend.d.ts +1 -1
  332. package/dist/search/orama-backend.d.ts +1 -1
  333. package/dist/search/orama-backend.js +2 -2
  334. package/dist/search/port.d.ts +1 -1
  335. package/dist/search/remote-backend.d.ts +1 -1
  336. package/dist/{semantic-consolidation-BZ6J46j-.d.ts → semantic-consolidation-Chmddvcg.d.ts} +1 -1
  337. package/dist/semantic-consolidation.d.ts +2 -2
  338. package/dist/semantic-consolidation.js +11 -11
  339. package/dist/semantic-rule-promotion.js +10 -10
  340. package/dist/semantic-rule-verifier.d.ts +1 -1
  341. package/dist/semantic-rule-verifier.js +10 -10
  342. package/dist/{service-CCl4iyyY.d.ts → service-DMs_dCCg.d.ts} +2 -2
  343. package/dist/session-observer-bands.d.ts +1 -1
  344. package/dist/session-observer-state.d.ts +1 -1
  345. package/dist/shared-context/manager.d.ts +1 -1
  346. package/dist/signal.d.ts +1 -1
  347. package/dist/source-agent-qualifier.d.ts +1 -1
  348. package/dist/source-agent-qualifier.js +12 -12
  349. package/dist/{storage-BPXmJKIt.d.ts → storage-CzorrpcN.d.ts} +12 -3
  350. package/dist/storage.d.ts +2 -2
  351. package/dist/storage.js +9 -9
  352. package/dist/summarizer.d.ts +1 -1
  353. package/dist/summary-snapshot.d.ts +1 -1
  354. package/dist/support-passport/index.d.ts +15 -14
  355. package/dist/support-passport/index.js +27 -26
  356. package/dist/temporal-supersession.d.ts +2 -2
  357. package/dist/temporal-timeline-recall.d.ts +1 -1
  358. package/dist/temporal-validity.d.ts +1 -1
  359. package/dist/threading.d.ts +1 -1
  360. package/dist/tier-migration.d.ts +2 -2
  361. package/dist/tier-routing.d.ts +1 -1
  362. package/dist/topics.d.ts +1 -1
  363. package/dist/transcript.d.ts +1 -1
  364. package/dist/transfer/backup.js +2 -2
  365. package/dist/transfer/capsule-export.js +2 -2
  366. package/dist/transfer/capsule-import.js +2 -2
  367. package/dist/trust-score-stage.d.ts +1 -1
  368. package/dist/trust-score.d.ts +1 -1
  369. package/dist/{types-CltSWcND.d.ts → types-BP5MC8UU.d.ts} +34 -8
  370. package/dist/types.d.ts +1 -1
  371. package/dist/types.js +1 -1
  372. package/dist/utility-runtime.d.ts +1 -1
  373. package/dist/verified-recall.js +10 -10
  374. package/dist/who-knows-cli.d.ts +155 -0
  375. package/dist/who-knows-cli.js +109 -0
  376. package/dist/who-knows-cli.js.map +1 -0
  377. package/dist/who-knows.d.ts +127 -0
  378. package/dist/who-knows.js +118 -0
  379. package/dist/who-knows.js.map +1 -0
  380. package/dist/write-envelope.d.ts +1 -1
  381. package/package.json +2 -2
  382. package/src/access-boundary.ts +1 -0
  383. package/src/access-http.ts +15 -0
  384. package/src/access-mcp-output-schemas.ts +1 -0
  385. package/src/access-mcp.ts +3 -2
  386. package/src/access-operations-batch.ts +8 -0
  387. package/src/access-service.ts +26 -0
  388. package/src/access-surface-catalog.ts +2 -0
  389. package/src/cli/okf-commands.ts +23 -0
  390. package/src/cli.ts +2 -1
  391. package/src/config.ts +7 -7
  392. package/src/index.ts +3 -0
  393. package/src/location/cli.ts +163 -0
  394. package/src/location/config.test.ts +75 -0
  395. package/src/location/config.ts +105 -0
  396. package/src/location/intervals.test.ts +202 -0
  397. package/src/location/intervals.ts +221 -0
  398. package/src/location/parse-companions.ts +12 -0
  399. package/src/location/pipeline.test.ts +324 -0
  400. package/src/location/pipeline.ts +245 -0
  401. package/src/location/recall-exclusion.test.ts +36 -0
  402. package/src/location/registry.test.ts +74 -0
  403. package/src/location/registry.ts +54 -0
  404. package/src/location/store.test.ts +170 -0
  405. package/src/location/store.ts +478 -0
  406. package/src/location/types.ts +95 -0
  407. package/src/mcp-read-only-tools.ts +1 -0
  408. package/src/okf/cli.ts +42 -0
  409. package/src/okf/config.ts +34 -0
  410. package/src/okf/lint.ts +110 -0
  411. package/src/okf/sweep.ts +63 -0
  412. package/src/okf/type-mapping.test.ts +207 -0
  413. package/src/okf/type-mapping.ts +79 -0
  414. package/src/orchestration/generic-recall-paths.ts +17 -0
  415. package/src/orchestration/orchestrator-helpers.ts +22 -0
  416. package/src/orchestration/qmd-result-resolver.ts +1 -0
  417. package/src/orchestrator.ts +2 -0
  418. package/src/storage/entity-store.ts +9 -5
  419. package/src/storage/profile-header.ts +33 -9
  420. package/src/storage/questions-file.ts +50 -0
  421. package/src/storage.ts +76 -63
  422. package/src/types.ts +6 -8
  423. package/src/who-knows-cli.ts +96 -0
  424. package/src/who-knows.test.ts +257 -0
  425. package/src/who-knows.ts +364 -0
  426. package/dist/chunk-5SZ6CLGJ.js.map +0 -1
  427. package/dist/chunk-AR253JBM.js.map +0 -1
  428. package/dist/chunk-BB2LH5JM.js.map +0 -1
  429. package/dist/chunk-GIMQJ5RX.js.map +0 -1
  430. package/dist/chunk-HIEWDJ2O.js.map +0 -1
  431. package/dist/chunk-ML4MI2RR.js.map +0 -1
  432. package/dist/chunk-QATILW4B.js.map +0 -1
  433. package/dist/chunk-QFPX7QZG.js.map +0 -1
  434. package/dist/chunk-S6KMN6MJ.js.map +0 -1
  435. package/dist/chunk-VD2OT77P.js.map +0 -1
  436. package/dist/chunk-ZWYXSF2T.js.map +0 -1
  437. /package/dist/{capsule-crypto-GWVG7LGC.js.map → capsule-crypto-7FJQINUR.js.map} +0 -0
  438. /package/dist/{chunk-BTUIHRRR.js.map → chunk-246HFJVG.js.map} +0 -0
  439. /package/dist/{chunk-OWHERGF2.js.map → chunk-2NLLXCJG.js.map} +0 -0
  440. /package/dist/{chunk-6NMZXEJ7.js.map → chunk-3A46U7XG.js.map} +0 -0
  441. /package/dist/{chunk-Z3Q5I5F6.js.map → chunk-44DSGZFF.js.map} +0 -0
  442. /package/dist/{chunk-VENMDW4U.js.map → chunk-55SJFHVD.js.map} +0 -0
  443. /package/dist/{chunk-VCBG52MM.js.map → chunk-5HERQ5FX.js.map} +0 -0
  444. /package/dist/{chunk-IRXMJLTW.js.map → chunk-5HK3CJAR.js.map} +0 -0
  445. /package/dist/{chunk-KG2CT762.js.map → chunk-6LTCUN3T.js.map} +0 -0
  446. /package/dist/{chunk-UUYQWKHO.js.map → chunk-7BVO64UC.js.map} +0 -0
  447. /package/dist/{chunk-X6HNXVXS.js.map → chunk-7V3AZWWZ.js.map} +0 -0
  448. /package/dist/{chunk-EHC3FIJ4.js.map → chunk-A2IBK3TG.js.map} +0 -0
  449. /package/dist/{chunk-6BV6ZZZA.js.map → chunk-C6AKYOFO.js.map} +0 -0
  450. /package/dist/{chunk-7ML7STOD.js.map → chunk-CKZHKFY3.js.map} +0 -0
  451. /package/dist/{chunk-CUDSA46O.js.map → chunk-CUIAHZPZ.js.map} +0 -0
  452. /package/dist/{chunk-2BRCV2IV.js.map → chunk-DG6MJD7W.js.map} +0 -0
  453. /package/dist/{chunk-YGSDWO3U.js.map → chunk-DHKV6E4A.js.map} +0 -0
  454. /package/dist/{chunk-DZFPHARJ.js.map → chunk-EJDLQRUO.js.map} +0 -0
  455. /package/dist/{chunk-BPLPGOUJ.js.map → chunk-GVRLED7R.js.map} +0 -0
  456. /package/dist/{chunk-YINSSARY.js.map → chunk-H5CGAD7L.js.map} +0 -0
  457. /package/dist/{chunk-QICOU4RY.js.map → chunk-IFK3PVM7.js.map} +0 -0
  458. /package/dist/{chunk-E7MYSCSL.js.map → chunk-IJXECCUV.js.map} +0 -0
  459. /package/dist/{chunk-RKNJBZ55.js.map → chunk-JBPKEARU.js.map} +0 -0
  460. /package/dist/{chunk-WQ6TRWAE.js.map → chunk-JCSUNXYJ.js.map} +0 -0
  461. /package/dist/{chunk-5W7CTZ2E.js.map → chunk-KQAFEZQX.js.map} +0 -0
  462. /package/dist/{chunk-6IKXAAJI.js.map → chunk-KRPE7ANR.js.map} +0 -0
  463. /package/dist/{chunk-FEP45MYY.js.map → chunk-LOETWOEB.js.map} +0 -0
  464. /package/dist/{chunk-4IIDTPSK.js.map → chunk-LZKCMK3U.js.map} +0 -0
  465. /package/dist/{chunk-K547KS3X.js.map → chunk-ML3U4KPR.js.map} +0 -0
  466. /package/dist/{chunk-BTBAHTQ5.js.map → chunk-NO7B6DRB.js.map} +0 -0
  467. /package/dist/{chunk-G5F4MXXC.js.map → chunk-ON2P3SHG.js.map} +0 -0
  468. /package/dist/{chunk-2Q4UAPLD.js.map → chunk-OQIRBGUU.js.map} +0 -0
  469. /package/dist/{chunk-PQODT53H.js.map → chunk-PE76XIDM.js.map} +0 -0
  470. /package/dist/{chunk-MVIYRRVJ.js.map → chunk-PMVPCZJZ.js.map} +0 -0
  471. /package/dist/{chunk-CK3DZ6OE.js.map → chunk-PVIXAMWM.js.map} +0 -0
  472. /package/dist/{chunk-HZXO2CJ6.js.map → chunk-RWLRKMZK.js.map} +0 -0
  473. /package/dist/{chunk-SYU5JOBQ.js.map → chunk-SB6YBB2V.js.map} +0 -0
  474. /package/dist/{chunk-3F3CVVDS.js.map → chunk-SHQFYZTD.js.map} +0 -0
  475. /package/dist/{chunk-R7XE5ZUR.js.map → chunk-UIYYS2YI.js.map} +0 -0
  476. /package/dist/{chunk-G5OB4XZX.js.map → chunk-VANZKHTN.js.map} +0 -0
  477. /package/dist/{chunk-7DRSWPUV.js.map → chunk-VUP47UJI.js.map} +0 -0
  478. /package/dist/{chunk-65NQFK7D.js.map → chunk-WBM5NR4E.js.map} +0 -0
  479. /package/dist/{chunk-UVYI6VIX.js.map → chunk-X7Y7WX73.js.map} +0 -0
  480. /package/dist/{chunk-63JMI45N.js.map → chunk-XBRGJJK7.js.map} +0 -0
  481. /package/dist/{chunk-WCWIV2JH.js.map → chunk-XH4IQVTN.js.map} +0 -0
  482. /package/dist/{chunk-77E7LLMV.js.map → chunk-XZUCNVGE.js.map} +0 -0
  483. /package/dist/{chunk-LJQGQUNS.js.map → chunk-YFQTDE7N.js.map} +0 -0
  484. /package/dist/{chunk-5OOTHWGJ.js.map → chunk-YXGU3MDQ.js.map} +0 -0
  485. /package/dist/{chunk-SRLQROQJ.js.map → chunk-Z6CJLYXT.js.map} +0 -0
  486. /package/dist/{chunk-Z4UPRZR6.js.map → chunk-ZSYE2QVJ.js.map} +0 -0
@@ -643,6 +643,28 @@ export function isActivityDigestPath(filePath: string, memoryRoot?: string): boo
643
643
  return ACTIVITY_DIGEST_ANYWHERE.test(filePath);
644
644
  }
645
645
 
646
+ /** Exactly `locations/<YYYY-MM-DD>.md`, at the top level of a memory root. */
647
+ const LOCATION_DAY_TOPLEVEL = /^locations[\\/]\d{4}-\d{2}-\d{2}\.md$/i;
648
+ /** The day-file shape anywhere in a path (root-unaware best-effort). */
649
+ const LOCATION_DAY_ANYWHERE = /(?:^|[\\/])locations[\\/]\d{4}-\d{2}-\d{2}\.md$/i;
650
+
651
+ /**
652
+ * Location day documents (issue #2044) live at
653
+ * `<memoryRoot>/locations/<YYYY-MM-DD>.md` — a dedicated searchable surface,
654
+ * never generic recall (place history must not auto-inject into ordinary
655
+ * prompts). Root-aware exactly like `isActivityDigestPath`: with a root, only
656
+ * the top-level `locations/<date>.md` matches, so an ordinary memory nested
657
+ * under a category (e.g. `facts/locations-note.md`) stays recallable; without
658
+ * a root, falls back to the day-file shape anywhere (best-effort).
659
+ */
660
+ export function isLocationDayPath(filePath: string, memoryRoot?: string): boolean {
661
+ if (memoryRoot !== undefined && memoryRoot.length > 0) {
662
+ const relative = path.relative(memoryRoot, path.resolve(memoryRoot, filePath));
663
+ return LOCATION_DAY_TOPLEVEL.test(relative);
664
+ }
665
+ return LOCATION_DAY_ANYWHERE.test(filePath);
666
+ }
667
+
646
668
  export function buildCompressionGuidelinesMarkdown(
647
669
  events: MemoryActionEvent[],
648
670
  generatedAtIso: string = new Date().toISOString(),
@@ -47,6 +47,7 @@ const INTERNAL_QMD_ROOTS = new Set([
47
47
  "config",
48
48
  "entities",
49
49
  "identity",
50
+ "locations",
50
51
  "meetings",
51
52
  "namespaces",
52
53
  "state",
@@ -1410,6 +1410,8 @@ export class Orchestrator {
1410
1410
  // StorageManager over it (including ephemeral recall sub-stage instances)
1411
1411
  // honors the operator's rollback lever.
1412
1412
  StorageManager.setScopedCacheInvalidationDefault(config.memoryDir, scopedCacheInvalidationEnabled);
1413
+ // OKF conformance gate (issue #1946): child dirs (namespaces, cold roots) inherit via ancestor walk.
1414
+ StorageManager.setOkfConformanceDefault(config.memoryDir, config.okf?.conformanceEnabled);
1413
1415
  this.profiler = new ProfilingCollector({
1414
1416
  enabled: resolvePipelineProcessingCapabilities(this.config).profiling,
1415
1417
  storageDir: config.profilingStorageDir || path.join(config.memoryDir, "profiling"),
@@ -45,6 +45,9 @@ import {
45
45
  serializeEntityFile,
46
46
  StorageManager,
47
47
  } from "../storage.js";
48
+ // Issue #1533 Phase B: importers take entity-file parsing from this storage/
49
+ // subsystem module, not the storage.ts god file (see check-ratchets.mjs).
50
+ export { parseEntityFile } from "../storage.js";
48
51
  import { parseOriginClass } from "../security/origin-authority.js";
49
52
 
50
53
  export interface EntityStoreDeps {
@@ -64,6 +67,7 @@ export interface EntityStoreDeps {
64
67
  getMemoryStatusVersion(): number;
65
68
  invalidateKnowledgeIndexCache(): void;
66
69
  knowledgeIndexCache: { result: string; builtAt: number } | null;
70
+ okfConformanceEnabled(): boolean;
67
71
  normalizeEntityName(raw: string, type: string): string;
68
72
  readAllEntityFiles(): Promise<EntityFile[]>;
69
73
  readStorageSecureFile(filePath: string): Promise<string>;
@@ -142,7 +146,7 @@ export class EntityStore {
142
146
  located.entity.updated = new Date().toISOString();
143
147
  await this.deps.writeStorageSecureFile(
144
148
  located.filePath,
145
- serializeEntityFile(located.entity, this.deps.entitySchemas),
149
+ serializeEntityFile(located.entity, this.deps.entitySchemas, this.deps.okfConformanceEnabled()),
146
150
  );
147
151
  reconcileIfJournalMovedSync(stateDir, idsAtResolve, this.deps.currentHistoricalIds());
148
152
  this.deps.invalidateKnowledgeIndexCache();
@@ -352,7 +356,7 @@ export class EntityStore {
352
356
  entity.updated = new Date().toISOString();
353
357
 
354
358
  await this.deps.snapshotBeforeWrite(filePath, "write");
355
- await this.deps.writeStorageSecureFile(filePath, serializeEntityFile(entity, this.deps.entitySchemas));
359
+ await this.deps.writeStorageSecureFile(filePath, serializeEntityFile(entity, this.deps.entitySchemas, this.deps.okfConformanceEnabled()));
356
360
  this.deps.invalidateKnowledgeIndexCache();
357
361
  this.deps.bumpMemoryStatusVersion(); // invalidate entity cache
358
362
  this.deps.bumpEntityMutationVersion();
@@ -401,7 +405,7 @@ export class EntityStore {
401
405
  const wrote = await withEntityCanonicalMutationLock(stateDir, async () => {
402
406
  const raw = await this.readEntity(entityName);
403
407
  if (!raw) return false;
404
- const serialized = serializeEntityFile(parseEntityFile(raw, this.deps.entitySchemas), this.deps.entitySchemas);
408
+ const serialized = serializeEntityFile(parseEntityFile(raw, this.deps.entitySchemas), this.deps.entitySchemas, this.deps.okfConformanceEnabled());
405
409
  if (raw.trimEnd() === serialized.trimEnd()) return false;
406
410
  const filePath = this.deps.resolveEntityFilePath(entityName);
407
411
  if (filePath === null) return false;
@@ -484,7 +488,7 @@ export class EntityStore {
484
488
  entity.synthesisVersion = Math.max(0, entity.synthesisVersion ?? 0)
485
489
  + (options.incrementVersion === false ? 0 : 1);
486
490
  entity.updated = entityUpdatedAt;
487
- await this.deps.writeStorageSecureFile(filePath, serializeEntityFile(entity, this.deps.entitySchemas));
491
+ await this.deps.writeStorageSecureFile(filePath, serializeEntityFile(entity, this.deps.entitySchemas, this.deps.okfConformanceEnabled()));
488
492
  await this.deps.removeEntitySynthesisQueueEntries([
489
493
  ...new Set([name, this.deps.normalizeEntityName(entity.name, entity.type)]),
490
494
  ]);
@@ -898,7 +902,7 @@ export class EntityStore {
898
902
  mergedEntity.updated = mergedEntity.updated || new Date().toISOString();
899
903
 
900
904
  const canonicalPath = path.join(this.deps.entitiesDir, `${canonical}.md`);
901
- await this.deps.writeStorageSecureFile(canonicalPath, serializeEntityFile(mergedEntity, this.deps.entitySchemas));
905
+ await this.deps.writeStorageSecureFile(canonicalPath, serializeEntityFile(mergedEntity, this.deps.entitySchemas, this.deps.okfConformanceEnabled()));
902
906
  this.deps.bumpEntityMutationVersion();
903
907
 
904
908
  // Remove non-canonical files
@@ -245,12 +245,6 @@ function findHtmlTagPrefix(line: string): HtmlTag | null {
245
245
  return null;
246
246
  }
247
247
 
248
- function isRawHtmlBlockTerminator(line: string): boolean {
249
- const normalizedLine = line.toLowerCase();
250
- return RAW_HTML_BLOCK_TAGS.some((name) =>
251
- hasRawHtmlBlockEndMarker(normalizedLine, `</${name}>`),
252
- );
253
- }
254
248
 
255
249
  function findHtmlTags(line: string): HtmlTag[] {
256
250
  const tags: HtmlTag[] = [];
@@ -429,9 +423,6 @@ function shouldCloseHtmlBlock(line: string, endMarker: string): boolean {
429
423
  }
430
424
 
431
425
 
432
- function hasRawHtmlBlockEndMarker(line: string, endMarker: string): boolean {
433
- return line.includes(endMarker);
434
- }
435
426
  function canStartGenericHtmlBlock(
436
427
  lines: ProfileLine[],
437
428
  index: number,
@@ -896,3 +887,36 @@ export function renderProfileWithLastUpdated(content: string, updatedAt: string)
896
887
  insertHeaderAfter(lines, titleIndex, header);
897
888
  return renderProfileLines(lines);
898
889
  }
890
+
891
+ /**
892
+ * OKF v0.1 profile frontmatter (issue #1946). `profile.md` gains a leading
893
+ * frontmatter block so the memory directory is a conformant OKF knowledge
894
+ * bundle; every reader strips it so the bytes injected into prompts are
895
+ * unchanged. Line-scan based (no regex) per the regex-safety rule.
896
+ */
897
+
898
+ /** Prepend the OKF block when enabled and not already present. No-op otherwise. */
899
+ export function withOkfProfileFrontmatter(content: string, timestamp: string, enabled: boolean): string {
900
+ if (!enabled || stripOkfProfileFrontmatter(content) !== content) return content;
901
+ return `---\ntype: Profile\ntitle: User Profile\ntimestamp: ${timestamp}\n---\n${content}`;
902
+ }
903
+
904
+ /**
905
+ * Strip the OKF profile block from the start of `profile.md` content.
906
+ * Only a leading block whose keys include `type: Profile` is removed, so
907
+ * hand-written content without the marker round-trips byte-identically.
908
+ */
909
+ export function stripOkfProfileFrontmatter(content: string): string {
910
+ if (!content.startsWith("---\n") && !content.startsWith("---\r\n")) return content;
911
+ const lines = content.split("\n");
912
+ for (let index = 1; index < lines.length; index += 1) {
913
+ const line = lines[index]!;
914
+ if (line === "---" || line === "---\r") {
915
+ return lines.slice(1, index).some((l) => l.startsWith("type: Profile"))
916
+ ? lines.slice(index + 1).join("\n")
917
+ : content;
918
+ }
919
+ if (line === "" || line === "\r" || line === "...") return content;
920
+ }
921
+ return content;
922
+ }
@@ -0,0 +1,50 @@
1
+ /**
2
+ * Question file format (issue #1946 extraction from storage.ts so the
3
+ * surface file stays under its structural ceiling). Pure text parsing —
4
+ * no filesystem, no caches; StorageManager delegates through so the
5
+ * selfDeps consumers (MemoryReadStore) keep their seam unchanged.
6
+ */
7
+ import path from "node:path";
8
+
9
+ export interface ParsedQuestionFile {
10
+ id: string;
11
+ question: string;
12
+ context: string;
13
+ priority: number;
14
+ resolved: boolean;
15
+ created: string;
16
+ filePath: string;
17
+ }
18
+
19
+ export function parseQuestionFile(raw: string, filePath: string): ParsedQuestionFile | null {
20
+ if (!raw.startsWith("---\n")) return null;
21
+ const close = raw.indexOf("\n---\n\n", 4);
22
+ if (close === -1) return null;
23
+ const frontmatterStr = raw.slice(4, close);
24
+ const body = raw.slice(close + 6).trim();
25
+
26
+ const id = extractFrontmatterValue(frontmatterStr, "id") ?? path.basename(filePath, ".md");
27
+ const created = extractFrontmatterValue(frontmatterStr, "created") ?? "";
28
+ const priority = parseFloat(extractFrontmatterValue(frontmatterStr, "priority") ?? "0.5");
29
+ const resolved = extractFrontmatterValue(frontmatterStr, "resolved") === "true";
30
+
31
+ const contextMarker = "**Context:**";
32
+ const contextAt = body.indexOf(contextMarker);
33
+ const question = contextAt === -1 ? body : body.slice(0, contextAt).trim();
34
+ const context = contextAt === -1 ? "" : body.slice(contextAt + contextMarker.length).trim();
35
+
36
+ return { id, question, context, priority, resolved, created, filePath };
37
+ }
38
+
39
+ function extractFrontmatterValue(frontmatter: string, key: string): string | null {
40
+ const prefix = `${key}:`;
41
+ for (const line of frontmatter.split("\n")) {
42
+ if (!line.startsWith(prefix)) continue;
43
+ let value = line.slice(prefix.length).trim();
44
+ if (value.startsWith('"') && value.endsWith('"') && value.length >= 2) {
45
+ value = value.slice(1, -1);
46
+ }
47
+ return value;
48
+ }
49
+ return null;
50
+ }
package/src/storage.ts CHANGED
@@ -30,7 +30,9 @@ import { createTombstoneMigrationSourceContents } from "./storage/tombstone-migr
30
30
  import { MemoryReadStore, readWindowedMemories, type WindowedMemoryReadOptions, type WindowedMemoryReadResult } from "./storage/memory-read-store.js";
31
31
  import { hasSupersessionAudit } from "./storage/supersession-audit.js";
32
32
  import { runCommittedInvalidation } from "./storage/committed-invalidation.js";
33
- import { renderProfileWithLastUpdated } from "./storage/profile-header.js";
33
+ import { renderProfileWithLastUpdated, stripOkfProfileFrontmatter, withOkfProfileFrontmatter } from "./storage/profile-header.js";
34
+ import { parseQuestionFile as parseQuestionFileText } from "./storage/questions-file.js";
35
+ import { assertNotOkfReservedBasename, OKF_QUESTION_TYPE, okfTypeForEntityKind, okfTypeForMemory } from "./okf/type-mapping.js";
34
36
  import { readMaybeEncryptedLines, readMemoryActionEventRowsFromLines } from "./storage/secure-line-reader.js";
35
37
  import {
36
38
  appendLifecycleEventsSerialized,
@@ -319,6 +321,8 @@ function serializeFrontmatter(fm: MemoryFrontmatter): string {
319
321
  `confidenceTier: ${fm.confidenceTier}`,
320
322
  `tags: [${fm.tags.map((t) => `"${t}"`).join(", ")}]`,
321
323
  ];
324
+ // OKF v0.1 interop (issue #1946): inert presentation metadata; `category` stays canonical.
325
+ if (fm.type !== undefined) lines.push(`type: ${fm.type}`);
322
326
  if (fm.origin) lines.push(`origin: ${/^[A-Za-z0-9:_.*-]+$/.test(fm.origin) ? fm.origin : JSON.stringify(fm.origin)}`);
323
327
  if (fm.entityRef) lines.push(`entityRef: ${fm.entityRef}`);
324
328
  if (fm.sourceConnector) {
@@ -855,6 +859,7 @@ export function parseFrontmatter(raw: string): { frontmatter: MemoryFrontmatter;
855
859
  frontmatter: {
856
860
  id: fm.id ?? "",
857
861
  category: (fm.category ?? "fact") as MemoryCategory,
862
+ type: parseFrontmatterStringValue(fm.type),
858
863
  created: fm.created ?? new Date().toISOString(),
859
864
  updated: fm.updated ?? new Date().toISOString(),
860
865
  source: fm.source ?? "unknown",
@@ -1099,15 +1104,16 @@ function parseEntityFrontmatter(raw: string): {
1099
1104
 
1100
1105
  const values: Record<string, string> = {};
1101
1106
  const extraLines: string[] = [];
1102
- const recognizedKeys = new Set([
1103
- "created",
1104
- "updated",
1105
- "synthesis_updated_at",
1106
- "synthesis_timeline_count",
1107
- "synthesis_structured_fact_count",
1108
- "synthesis_structured_fact_digest",
1109
- "synthesis_version",
1110
- ]);
1107
+ const recognizedKeys: Record<string, true> = {
1108
+ created: true,
1109
+ updated: true,
1110
+ type: true,
1111
+ synthesis_updated_at: true,
1112
+ synthesis_timeline_count: true,
1113
+ synthesis_structured_fact_count: true,
1114
+ synthesis_structured_fact_digest: true,
1115
+ synthesis_version: true,
1116
+ };
1111
1117
  for (const line of match[1].split(/\r?\n/)) {
1112
1118
  if (/^\s/.test(line)) {
1113
1119
  extraLines.push(line);
@@ -1119,7 +1125,7 @@ function parseEntityFrontmatter(raw: string): {
1119
1125
  continue;
1120
1126
  }
1121
1127
  const key = line.slice(0, colonIdx).trim();
1122
- if (!recognizedKeys.has(key)) {
1128
+ if (recognizedKeys[key] !== true) {
1123
1129
  extraLines.push(line);
1124
1130
  continue;
1125
1131
  }
@@ -1413,7 +1419,11 @@ export function parseEntityFile(content: string, entitySchemas?: PluginConfig["e
1413
1419
  * Writes the compiled-truth + timeline format while remaining parse-compatible
1414
1420
  * with the legacy in-memory `summary` and `facts` fields.
1415
1421
  */
1416
- export function serializeEntityFile(entity: EntityFile, entitySchemas?: PluginConfig["entitySchemas"]): string {
1422
+ export function serializeEntityFile(
1423
+ entity: EntityFile,
1424
+ entitySchemas?: PluginConfig["entitySchemas"],
1425
+ okfType?: boolean,
1426
+ ): string {
1417
1427
  const synthesis = entity.synthesis || entity.summary || "";
1418
1428
  const created = entity.created?.trim() || entity.updated || new Date().toISOString();
1419
1429
  const updated = entity.updated || created;
@@ -1457,7 +1467,10 @@ export function serializeEntityFile(entity: EntityFile, entitySchemas?: PluginCo
1457
1467
  : [`synthesis_structured_fact_count: ${synthesisStructuredFactCount}`]),
1458
1468
  ...(synthesisStructuredFactDigest ? [`synthesis_structured_fact_digest: "${synthesisStructuredFactDigest}"`] : []),
1459
1469
  `synthesis_version: ${synthesisVersion}`,
1460
- ...(entity.extraFrontmatterLines ?? []),
1470
+ ...(okfType === false ? [] : [`type: ${okfTypeForEntityKind(entity.type)}`]),
1471
+ ...(okfType === false
1472
+ ? (entity.extraFrontmatterLines ?? [])
1473
+ : (entity.extraFrontmatterLines ?? []).filter((line) => !line.startsWith("type:"))),
1461
1474
  "---",
1462
1475
  "",
1463
1476
  `# ${entity.name}`,
@@ -2261,6 +2274,24 @@ export class StorageManager extends TombstoneBlockedCaptureIndexHost {
2261
2274
  StorageManager.scopedCacheInvalidationByDir.set(memoryDir, enabled !== false);
2262
2275
  }
2263
2276
 
2277
+ /** OKF `type` emission gate registrations per memory dir (issue #1946). */
2278
+ private static readonly okfConformanceByDir = new Map<string, boolean>();
2279
+
2280
+ /** Register the OKF conformance gate for a memory dir. Unregistered dirs default to
2281
+ * conformance-on; namespace child dirs (<memoryDir>/namespaces/<tok>) inherit the
2282
+ * nearest registered ancestor. Only an explicit `false` disables. */
2283
+ static setOkfConformanceDefault(memoryDir: string, enabled: boolean | undefined): void {
2284
+ StorageManager.okfConformanceByDir.set(memoryDir, enabled !== false);
2285
+ }
2286
+
2287
+ okfConformanceEnabled(): boolean {
2288
+ for (let dir = this.baseDir; ; dir = path.dirname(dir)) {
2289
+ const registered = StorageManager.okfConformanceByDir.get(dir);
2290
+ if (registered !== undefined) return registered;
2291
+ if (dir === path.dirname(dir)) return true;
2292
+ }
2293
+ }
2294
+
2264
2295
  /**
2265
2296
  * The LIVE class object of this instance (issue #1809 review of the
2266
2297
  * storage decomposition): extracted store modules must read/write the
@@ -2648,6 +2679,7 @@ export class StorageManager extends TombstoneBlockedCaptureIndexHost {
2648
2679
  return this.writeStorageSecureFile(target, content);
2649
2680
  }
2650
2681
  protected writeStorageSecureFile(filePath: string, content: string | Buffer, forceEncrypt = false): Promise<void> {
2682
+ assertNotOkfReservedBasename(filePath);
2651
2683
  const writeKey = this.resolveWriteKey(forceEncrypt);
2652
2684
  return writeMaybeEncryptedFile(filePath, content, writeKey, {}, this.baseDir).then(() => {
2653
2685
  // No manual sniff-cache update needed (issue #1909 round 10): this rewrite
@@ -3577,7 +3609,7 @@ export class StorageManager extends TombstoneBlockedCaptureIndexHost {
3577
3609
  const completionFingerprint = await runLegacyEntityCanonicalIdMigration(
3578
3610
  this as unknown as EntityCanonicalIdMigrationHost,
3579
3611
  (content) => parseEntityFile(content, this.entitySchemas),
3580
- (entity) => serializeEntityFile(entity, this.entitySchemas),
3612
+ (entity) => serializeEntityFile(entity, this.entitySchemas, this.okfConformanceEnabled()),
3581
3613
  createMemoryEntityRefSerializer(serializeFrontmatter)
3582
3614
  );
3583
3615
  return completionFingerprint;
@@ -3659,6 +3691,13 @@ export class StorageManager extends TombstoneBlockedCaptureIndexHost {
3659
3691
  }) ?? null
3660
3692
  );
3661
3693
  }
3694
+
3695
+ /** Derive the inert OKF `type` at the serialization choke point when conformance is on
3696
+ * and the parsed frontmatter carried none (issue #1946). Never touches `category`. */
3697
+ private withOkfType(fm: MemoryFrontmatter): MemoryFrontmatter {
3698
+ if (this.okfConformanceEnabled() && fm.type === undefined) fm.type = okfTypeForMemory(fm);
3699
+ return fm;
3700
+ }
3662
3701
  async writeMemory(
3663
3702
  category: MemoryCategory,
3664
3703
  content: string,
@@ -3812,7 +3851,7 @@ export class StorageManager extends TombstoneBlockedCaptureIndexHost {
3812
3851
  };
3813
3852
  await applyTombstoneGate();
3814
3853
 
3815
- const fileContent = `${serializeFrontmatter(fm)}\n\n${sanitized.text}\n`;
3854
+ const fileContent = `${serializeFrontmatter(this.withOkfType(fm))}\n\n${sanitized.text}\n`;
3816
3855
 
3817
3856
  const filePath = await this.resolveCategoryWritePath(category, id, today);
3818
3857
  const persistFile = async (): Promise<MemoryFile | null> => {
@@ -3837,7 +3876,7 @@ export class StorageManager extends TombstoneBlockedCaptureIndexHost {
3837
3876
  await applyTombstoneGate();
3838
3877
  await this.writeTombstoneBlockedMemory(
3839
3878
  filePath,
3840
- `${serializeFrontmatter(fm)}\n\n${sanitized.text}\n`,
3879
+ `${serializeFrontmatter(this.withOkfType(fm))}\n\n${sanitized.text}\n`,
3841
3880
  fm,
3842
3881
  sanitized.text,
3843
3882
  async () => this.invalidateAllMemoriesCache()
@@ -4172,7 +4211,7 @@ export class StorageManager extends TombstoneBlockedCaptureIndexHost {
4172
4211
  return "";
4173
4212
  }
4174
4213
  const filePath = path.join(dir, `${id}.md`);
4175
- await this.writeStorageSecureFile(filePath, `${serializeFrontmatter(fm)}\n\n${sanitized.text}\n`);
4214
+ await this.writeStorageSecureFile(filePath, `${serializeFrontmatter(this.withOkfType(fm))}\n\n${sanitized.text}\n`);
4176
4215
  const actor =
4177
4216
  typeof options.actor === "string" && options.actor.length > 0 ? options.actor : "storage.writeArtifact";
4178
4217
  await this.appendGeneratedMemoryLifecycleEventFailOpen("storage.writeArtifact", {
@@ -4225,7 +4264,7 @@ export class StorageManager extends TombstoneBlockedCaptureIndexHost {
4225
4264
 
4226
4265
  async readProfile(): Promise<string> {
4227
4266
  try {
4228
- return await readMaybeEncryptedFile(this.profilePath, this._secureStoreKey, this.baseDir);
4267
+ return stripOkfProfileFrontmatter(await readMaybeEncryptedFile(this.profilePath, this._secureStoreKey, this.baseDir));
4229
4268
  } catch (error) {
4230
4269
  if (error instanceof SecureStoreLockedError) {
4231
4270
  throw error;
@@ -4236,7 +4275,12 @@ export class StorageManager extends TombstoneBlockedCaptureIndexHost {
4236
4275
  }
4237
4276
 
4238
4277
  async writeProfile(content: string): Promise<void> {
4239
- const stampedContent = renderProfileWithLastUpdated(content, new Date().toISOString());
4278
+ const timestamp = new Date().toISOString();
4279
+ const stampedContent = withOkfProfileFrontmatter(
4280
+ renderProfileWithLastUpdated(content, timestamp),
4281
+ timestamp,
4282
+ this.okfConformanceEnabled(),
4283
+ );
4240
4284
  await this.ensureDirectories();
4241
4285
  await this.snapshotBeforeWrite(this.profilePath, "consolidation");
4242
4286
  await this.writeStorageSecureFile(this.profilePath, stampedContent);
@@ -4912,6 +4956,7 @@ export class StorageManager extends TombstoneBlockedCaptureIndexHost {
4912
4956
  return path.join(root, dir, this.resolveMemoryDateDir(memory), `${memory.frontmatter.id}.md`);
4913
4957
  }
4914
4958
  private async writeMemoryFileAtomic(targetPath: string, memory: MemoryFile): Promise<void> {
4959
+ assertNotOkfReservedBasename(targetPath);
4915
4960
  // Whole-record rewrite (tier moves) — #2213. Repair, not just detect:
4916
4961
  // the source is unlinked after the move, so a mapping parked across this
4917
4962
  // write would strand the moved copy with nothing left to reconcile from.
@@ -4921,7 +4966,7 @@ export class StorageManager extends TombstoneBlockedCaptureIndexHost {
4921
4966
  const persist = (): Promise<void> =>
4922
4967
  writeMaybeEncryptedFile(
4923
4968
  targetPath,
4924
- `${serializeFrontmatter(frontmatter)}\n\n${memory.content}\n`,
4969
+ `${serializeFrontmatter(this.withOkfType(frontmatter))}\n\n${memory.content}\n`,
4925
4970
  this.resolveWriteKey(),
4926
4971
  {},
4927
4972
  this.baseDir
@@ -5070,7 +5115,7 @@ export class StorageManager extends TombstoneBlockedCaptureIndexHost {
5070
5115
  },
5071
5116
  refIdsAtWrite
5072
5117
  );
5073
- const fileContent = `${serializeFrontmatter(updatedFm)}\n\n${current.content}\n`;
5118
+ const fileContent = `${serializeFrontmatter(this.withOkfType(updatedFm))}\n\n${current.content}\n`;
5074
5119
  const destPath = path.join(destDir, path.basename(current.path));
5075
5120
  // Snapshot a pre-existing destination (retried archive) so a repair
5076
5121
  // failure restores it instead of deleting the only archived copy (§14).
@@ -5260,7 +5305,7 @@ export class StorageManager extends TombstoneBlockedCaptureIndexHost {
5260
5305
  if (!sanitized.clean) {
5261
5306
  log.warn(`updated memory content sanitized for ${memory.frontmatter.id}; violations=${sanitized.violations.join(", ")}`);
5262
5307
  }
5263
- const fileContent = `${serializeFrontmatter(updated)}\n\n${sanitized.text}\n`;
5308
+ const fileContent = `${serializeFrontmatter(this.withOkfType(updated))}\n\n${sanitized.text}\n`;
5264
5309
  await this.writeTombstoneBlockedUpdate(memory, fileContent, updated, sanitized.text, async () => {
5265
5310
  this.invalidateAllMemoriesCache();
5266
5311
  if (this.isColdOrArchiveTierPath(memory.path)) this.invalidateColdMemoriesCache();
@@ -5350,7 +5395,7 @@ export class StorageManager extends TombstoneBlockedCaptureIndexHost {
5350
5395
  const refIds = typeof updated.entityRef === "string" ? resolveIds : null;
5351
5396
  const afterStatus = updated.status ?? "active";
5352
5397
 
5353
- const fileContent = `${serializeFrontmatter(updated)}\n\n${memory.content}\n`;
5398
+ const fileContent = `${serializeFrontmatter(this.withOkfType(updated))}\n\n${memory.content}\n`;
5354
5399
  await this.writeTombstoneBlockedFrontmatter(memory, fileContent, updated, async () => {
5355
5400
  this.invalidateAllMemoriesCache();
5356
5401
  // Rebuild the blocked index from the post-write cold-tier cache.
@@ -6038,11 +6083,12 @@ export class StorageManager extends TombstoneBlockedCaptureIndexHost {
6038
6083
  await mkdir(this.questionsDir, { recursive: true });
6039
6084
 
6040
6085
  const id = this.generateId("q");
6041
- const frontmatter = {
6086
+ const frontmatter: Record<string, unknown> = {
6042
6087
  id,
6043
6088
  created: new Date().toISOString(),
6044
6089
  priority,
6045
6090
  resolved: false,
6091
+ ...(this.okfConformanceEnabled() ? { type: OKF_QUESTION_TYPE } : {}),
6046
6092
  };
6047
6093
 
6048
6094
  const content = `---\n${Object.entries(frontmatter)
@@ -6076,41 +6122,8 @@ export class StorageManager extends TombstoneBlockedCaptureIndexHost {
6076
6122
  StorageManager.questionsCache.delete(this.questionsDir);
6077
6123
  }
6078
6124
 
6079
- private parseQuestionFile(
6080
- raw: string,
6081
- filePath: string
6082
- ): {
6083
- id: string;
6084
- question: string;
6085
- context: string;
6086
- priority: number;
6087
- resolved: boolean;
6088
- created: string;
6089
- filePath: string;
6090
- } | null {
6091
- const match = raw.match(/^---\n([\s\S]*?)\n---\n\n([\s\S]*)$/);
6092
- if (!match) return null;
6093
-
6094
- const frontmatterStr = match[1];
6095
- const body = match[2].trim();
6096
-
6097
- // Parse frontmatter
6098
- const id = this.extractFrontmatterValue(frontmatterStr, "id") ?? path.basename(filePath, ".md");
6099
- const created = this.extractFrontmatterValue(frontmatterStr, "created") ?? "";
6100
- const priority = parseFloat(this.extractFrontmatterValue(frontmatterStr, "priority") ?? "0.5");
6101
- const resolved = this.extractFrontmatterValue(frontmatterStr, "resolved") === "true";
6102
-
6103
- // Extract question and context from body
6104
- const contextMatch = body.match(/\*\*Context:\*\*\s*(.*)/);
6105
- const question = contextMatch ? body.slice(0, contextMatch.index).trim() : body;
6106
- const context = contextMatch ? contextMatch[1].trim() : "";
6107
-
6108
- return { id, question, context, priority, resolved, created, filePath };
6109
- }
6110
-
6111
- private extractFrontmatterValue(frontmatter: string, key: string): string | null {
6112
- const match = frontmatter.match(new RegExp(`^${key}:\\s*"?([^"\\n]*)"?`, "m"));
6113
- return match ? match[1] : null;
6125
+ private parseQuestionFile(raw: string, filePath: string) {
6126
+ return parseQuestionFileText(raw, filePath);
6114
6127
  }
6115
6128
 
6116
6129
  async resolveQuestion(id: string): Promise<boolean> {
@@ -6534,7 +6547,7 @@ export class StorageManager extends TombstoneBlockedCaptureIndexHost {
6534
6547
  { ...current.frontmatter, accessCount: entry.newCount, lastAccessed: entry.lastAccessed },
6535
6548
  rowIds
6536
6549
  );
6537
- const fileContent = `${serializeFrontmatter(newFm)}\n\n${current.content}\n`;
6550
+ const fileContent = `${serializeFrontmatter(this.withOkfType(newFm))}\n\n${current.content}\n`;
6538
6551
  await this.writeTombstoneBlockedFrontmatter(current, fileContent, newFm);
6539
6552
  if (typeof current.frontmatter.entityRef === "string") {
6540
6553
  await this.entityRefRepair.repair(
@@ -6855,7 +6868,7 @@ export class StorageManager extends TombstoneBlockedCaptureIndexHost {
6855
6868
  };
6856
6869
 
6857
6870
  const filePath = await this.resolveCategoryWritePath(category, id, today);
6858
- const fileContent = `${serializeFrontmatter(fm)}\n\n${sanitized.text}\n`;
6871
+ const fileContent = `${serializeFrontmatter(this.withOkfType(fm))}\n\n${sanitized.text}\n`;
6859
6872
 
6860
6873
  const written = await this.writeTombstoneBlockedChunk(
6861
6874
  filePath,
@@ -6999,7 +7012,7 @@ export class StorageManager extends TombstoneBlockedCaptureIndexHost {
6999
7012
  },
7000
7013
  refIdsAtWrite
7001
7014
  );
7002
- const fileContent = `${serializeFrontmatter(updatedFm)}\n\n${current.content}\n`;
7015
+ const fileContent = `${serializeFrontmatter(this.withOkfType(updatedFm))}\n\n${current.content}\n`;
7003
7016
  await this.writeTombstoneBlockedFrontmatter(current, fileContent, updatedFm);
7004
7017
  if (this.isColdOrArchiveTierPath(current.path)) this.invalidateColdMemoriesCache();
7005
7018
  if (typeof current.frontmatter.entityRef === "string") {
@@ -7147,7 +7160,7 @@ export class StorageManager extends TombstoneBlockedCaptureIndexHost {
7147
7160
  { ...current.frontmatter, status: "archived", archivedAt: now, updated: now },
7148
7161
  rowIds
7149
7162
  );
7150
- const fileContent = `${serializeFrontmatter(updatedFm)}\n\n${current.content}\n`;
7163
+ const fileContent = `${serializeFrontmatter(this.withOkfType(updatedFm))}\n\n${current.content}\n`;
7151
7164
  await this.writeTombstoneBlockedFrontmatter(current, fileContent, updatedFm);
7152
7165
  if (typeof current.frontmatter.entityRef === "string") {
7153
7166
  await this.entityRefRepair.repair(
package/src/types.ts CHANGED
@@ -1,5 +1,7 @@
1
1
  import type { BoundedJsonlStateConfig } from "./bounded-jsonl-state.js";
2
2
  import type { MeetingsConfig } from "./meetings/types.js";
3
+ import type { LocationConfig } from "./location/types.js";
4
+ import type { OkfConfig } from "./okf/config.js";
3
5
  import type { ActivityConfig } from "./activity/types.js";
4
6
  import type { WearablesConfig } from "./wearables/types.js";
5
7
  import type { ExtractionLivenessConfig } from "./extraction-liveness.js";
@@ -1226,19 +1228,13 @@ export interface PluginConfig extends BoundedJsonlStateConfig, SecurityConfig {
1226
1228
  converge: ConvergeConfig;
1227
1229
  /** Claim-level provenance spans (#1575); see `ProvenanceConfig` for defaults. */
1228
1230
  provenance: ProvenanceConfig;
1229
- /**
1230
- * Wearable transcript ingestion (Limitless / Bee / Omi connectors).
1231
- * Disabled by default; see docs/wearables.md.
1232
- */
1233
1231
  wearables: WearablesConfig;
1234
1232
  activity: ActivityConfig;
1235
- /** Retrospective meeting intelligence (issue #1900): detect + fuse meetings
1236
- * from already-ingested audio + screen activity. Disabled by default.
1237
- */
1238
1233
  meetings: MeetingsConfig;
1234
+ location: LocationConfig;
1235
+ okf: OkfConfig;
1239
1236
  /**
1240
1237
  * At-rest encryption configuration (issue #690 PR 3/4).
1241
- *
1242
1238
  * When `secureStoreEnabled` is true, `StorageManager` reads and
1243
1239
  * writes memory files through the `secure-fs` encryption layer.
1244
1240
  * The store must be unlocked via `remnic secure-store unlock` before
@@ -2809,6 +2805,8 @@ export interface MemoryFrontmatter extends SourceConnectorProvenance, OriginMeta
2809
2805
  toolScoped?: true;
2810
2806
  id: string;
2811
2807
  category: MemoryCategory;
2808
+ /** OKF v0.1 interop metadata (issue #1946). Inert: presentation only, never overrides `category`. */
2809
+ type?: string;
2812
2810
  created: string;
2813
2811
  updated: string;
2814
2812
  source: string;