@remnic/core 9.69.17 → 9.69.18

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 (434) hide show
  1. package/dist/access-admin-ops-surface.d.ts +11 -11
  2. package/dist/access-admin-ops-surface.js +18 -18
  3. package/dist/access-authorization-probe.d.ts +11 -11
  4. package/dist/access-authorization-probe.js +19 -19
  5. package/dist/access-boundary.d.ts +11 -11
  6. package/dist/access-boundary.js +18 -18
  7. package/dist/access-cli.js +55 -55
  8. package/dist/access-coding-context-resolution.d.ts +1 -1
  9. package/dist/access-extraction-force-flush.d.ts +11 -11
  10. package/dist/access-extraction-force-flush.js +18 -18
  11. package/dist/access-health-types.d.ts +1 -1
  12. package/dist/access-http-lcm-compaction.d.ts +11 -11
  13. package/dist/access-http-lifecycle-flush.d.ts +11 -11
  14. package/dist/access-http-offline-stream.d.ts +11 -11
  15. package/dist/access-http-query.d.ts +2 -2
  16. package/dist/access-http-query.js +20 -20
  17. package/dist/access-http.d.ts +12 -12
  18. package/dist/access-http.js +31 -31
  19. package/dist/access-identity-continuity-surface.d.ts +9 -9
  20. package/dist/access-identity-continuity-surface.js +18 -18
  21. package/dist/access-lcm-surface.d.ts +11 -11
  22. package/dist/access-lcm-surface.js +18 -18
  23. package/dist/access-mcp.d.ts +11 -11
  24. package/dist/access-mcp.js +25 -25
  25. package/dist/access-memory-search-fanout.d.ts +2 -2
  26. package/dist/{access-namespace-preflight-Rzuo1nGR.d.ts → access-namespace-preflight-BMHhxoL9.d.ts} +1 -1
  27. package/dist/access-namespace-preflight.d.ts +3 -3
  28. package/dist/access-namespace-preflight.js +18 -18
  29. package/dist/access-observe-transcript.d.ts +9 -9
  30. package/dist/access-observe-write-surface.d.ts +11 -11
  31. package/dist/access-observe-write-surface.js +18 -18
  32. package/dist/access-offline-manifest.d.ts +9 -9
  33. package/dist/access-offline-manifest.js +4 -4
  34. package/dist/access-operations-batch.js +19 -19
  35. package/dist/access-operations.d.ts +12 -12
  36. package/dist/access-operations.js +24 -24
  37. package/dist/access-recall-concurrency.d.ts +11 -11
  38. package/dist/access-recall-concurrency.js +18 -18
  39. package/dist/access-recall-response.d.ts +11 -11
  40. package/dist/access-recall-response.js +18 -18
  41. package/dist/access-recall-surface.d.ts +11 -11
  42. package/dist/access-recall-surface.js +18 -18
  43. package/dist/{access-service-DmDS8Y5P.d.ts → access-service-CYdqPfpS.d.ts} +13 -13
  44. package/dist/access-service-helpers.d.ts +11 -11
  45. package/dist/access-service.d.ts +11 -11
  46. package/dist/access-service.js +18 -18
  47. package/dist/access-surface-catalog.d.ts +11 -11
  48. package/dist/access-surface-catalog.js +20 -20
  49. package/dist/access-wearables-meetings-surface.d.ts +3 -3
  50. package/dist/action-confidence.d.ts +1 -1
  51. package/dist/active-memory-bridge.d.ts +1 -1
  52. package/dist/active-recall.d.ts +1 -1
  53. package/dist/active-recall.js +2 -2
  54. package/dist/ambient-provenance.d.ts +1 -1
  55. package/dist/artifact-search.d.ts +1 -1
  56. package/dist/behavior-learner.d.ts +1 -1
  57. package/dist/behavior-signals.d.ts +1 -1
  58. package/dist/bootstrap.d.ts +9 -9
  59. package/dist/briefing-window.d.ts +2 -2
  60. package/dist/briefing.d.ts +2 -2
  61. package/dist/briefing.js +3 -3
  62. package/dist/buffer-surprise-report.d.ts +1 -1
  63. package/dist/buffer-turn-helpers.d.ts +1 -1
  64. package/dist/buffer.d.ts +2 -2
  65. package/dist/bulk-import/index.d.ts +3 -3
  66. package/dist/calibration.d.ts +1 -1
  67. package/dist/capabilities.d.ts +1 -1
  68. package/dist/{catalog-DjTLVOYp.d.ts → catalog-C1qHsGew.d.ts} +1 -1
  69. package/dist/causal-behavior.d.ts +1 -1
  70. package/dist/causal-consolidation.d.ts +1 -1
  71. package/dist/causal-consolidation.js +4 -4
  72. package/dist/causal-trajectory-graph.d.ts +1 -1
  73. package/dist/{chunk-X66BHMAU.js → chunk-2J4TIFBK.js} +2 -2
  74. package/dist/{chunk-I672YBXY.js → chunk-3LADWWMA.js} +3 -3
  75. package/dist/{chunk-DBLVQROL.js → chunk-3LJPSRAN.js} +2 -2
  76. package/dist/{chunk-S6ZZOFVJ.js → chunk-43HMVVOL.js} +2 -2
  77. package/dist/{chunk-IDZU6I4H.js → chunk-4HYNMLT6.js} +2 -2
  78. package/dist/{chunk-HTOWFFAI.js → chunk-5CF2R4NS.js} +2 -2
  79. package/dist/{chunk-XR6LLNLU.js → chunk-5MF4EGL5.js} +21 -21
  80. package/dist/{chunk-SJ5JGIBT.js → chunk-5SGOARQJ.js} +2 -2
  81. package/dist/chunk-6MINUTGJ.js +64 -0
  82. package/dist/chunk-6MINUTGJ.js.map +1 -0
  83. package/dist/{chunk-5J36BYRI.js → chunk-7TUB6JWA.js} +3 -3
  84. package/dist/{chunk-GI726D4G.js → chunk-AWF4CNYJ.js} +2 -2
  85. package/dist/{chunk-J6HRJ37H.js → chunk-B2AGUKSS.js} +2 -2
  86. package/dist/{chunk-WMZ6F7GY.js → chunk-BR3OOQZQ.js} +2 -2
  87. package/dist/{chunk-YYP5GM6J.js → chunk-BZTJEILZ.js} +2 -2
  88. package/dist/{chunk-NYFWBYY4.js → chunk-CASWJ2HM.js} +2 -2
  89. package/dist/{chunk-B67W7CBL.js → chunk-CFKCFY4B.js} +2 -2
  90. package/dist/{chunk-5Z6JYMK4.js → chunk-CVJMGVEW.js} +22 -22
  91. package/dist/{chunk-DA4ZMCBU.js → chunk-D5ZNOKR7.js} +3 -3
  92. package/dist/{chunk-LE7B5ETE.js → chunk-DK6GMO6D.js} +3 -3
  93. package/dist/{chunk-EYKDBZB3.js → chunk-DP4EBV7C.js} +2 -2
  94. package/dist/{chunk-WOEKJPJG.js → chunk-EFCBJDYE.js} +3 -3
  95. package/dist/{chunk-3ZAZ77WB.js → chunk-EJ5RKUXW.js} +2 -2
  96. package/dist/{chunk-5CX3NSR7.js → chunk-F5UWQ4LX.js} +2 -2
  97. package/dist/{chunk-CM3JBYD4.js → chunk-FB7LAJQM.js} +2 -2
  98. package/dist/{chunk-IO4OJ73B.js → chunk-G6N654ND.js} +8 -8
  99. package/dist/{chunk-W7M7NKR7.js → chunk-GGYDJJBO.js} +2 -2
  100. package/dist/{chunk-MAIBNEB6.js → chunk-HOUST5UX.js} +2 -2
  101. package/dist/{chunk-X73YCO3E.js → chunk-I7FY43VC.js} +2 -2
  102. package/dist/{chunk-376CEAYL.js → chunk-IZZ7Q2RJ.js} +12 -12
  103. package/dist/{chunk-ZRUEP4IK.js → chunk-JIM4BIOC.js} +30 -49
  104. package/dist/chunk-JIM4BIOC.js.map +1 -0
  105. package/dist/{chunk-NF3NMAG7.js → chunk-JOYC4RYC.js} +2 -2
  106. package/dist/{chunk-ROHBPMWD.js → chunk-JZ6EYAVP.js} +2 -2
  107. package/dist/{chunk-5DRBG5U6.js → chunk-KA2HZCMG.js} +2 -2
  108. package/dist/{chunk-ETZ7KKOS.js → chunk-KTVSPFCQ.js} +2 -2
  109. package/dist/{chunk-XAJWPB2V.js → chunk-L74A6NTI.js} +5 -5
  110. package/dist/{chunk-V5RWV5DK.js → chunk-LFK623SF.js} +2 -2
  111. package/dist/{chunk-AYHPGLG6.js → chunk-N7JK2RKG.js} +2 -2
  112. package/dist/{chunk-QFMFZILG.js → chunk-NYRB7BKY.js} +2 -2
  113. package/dist/{chunk-YCJASQMN.js → chunk-NZGO2GKL.js} +2 -2
  114. package/dist/{chunk-N3DSSCOR.js → chunk-OGTKQ5MJ.js} +2 -2
  115. package/dist/{chunk-CWPVXVIT.js → chunk-PC7WNIRL.js} +10 -10
  116. package/dist/{chunk-NCUODVUI.js → chunk-PPOT6SPR.js} +5 -5
  117. package/dist/{chunk-FCL6ENLF.js → chunk-R7LY4YKF.js} +2 -2
  118. package/dist/{chunk-FK2SJX27.js → chunk-RO2X2EYM.js} +2 -2
  119. package/dist/{chunk-WP37SBRE.js → chunk-S37NN23M.js} +2 -2
  120. package/dist/{chunk-DDX6KIXF.js → chunk-SB4OBB7P.js} +2 -2
  121. package/dist/{chunk-WHO6ITU7.js → chunk-UMEOXLIZ.js} +2 -2
  122. package/dist/{chunk-NISCAOSR.js → chunk-WL5PR5YC.js} +2 -2
  123. package/dist/{chunk-YYE5MKRX.js → chunk-X33MJFD2.js} +2 -2
  124. package/dist/{chunk-NAOAZASM.js → chunk-XJJLWTLW.js} +3 -3
  125. package/dist/{chunk-OYV6RKPM.js → chunk-XOQGUGJL.js} +2 -6
  126. package/dist/chunk-XOQGUGJL.js.map +1 -0
  127. package/dist/{chunk-Y7E5SUZ6.js → chunk-YVLENSNS.js} +2 -2
  128. package/dist/{chunk-DGKQVGLC.js → chunk-ZJWDWPX6.js} +3 -3
  129. package/dist/{chunk-EQEP23JK.js → chunk-ZL3XX5LW.js} +2 -2
  130. package/dist/{chunk-GF7QLY6E.js → chunk-ZZM476NV.js} +1 -1
  131. package/dist/{cli-CYQIKncA.d.ts → cli-DN9LpWf0.d.ts} +5 -5
  132. package/dist/cli.d.ts +13 -13
  133. package/dist/cli.js +45 -45
  134. package/dist/coding/export-okf-codegraph.d.ts +1 -1
  135. package/dist/coding/export-okf-codegraph.js +3 -3
  136. package/dist/coding/pre-action-gate.d.ts +1 -1
  137. package/dist/compounding/engine.d.ts +2 -2
  138. package/dist/compounding/engine.js +3 -3
  139. package/dist/compounding/preference-consolidator.d.ts +1 -1
  140. package/dist/compression-optimizer.d.ts +1 -1
  141. package/dist/config.d.ts +1 -1
  142. package/dist/config.js +2 -2
  143. package/dist/connectors/codex-materialize-runner.d.ts +1 -1
  144. package/dist/connectors/codex-materialize-runner.js +3 -3
  145. package/dist/connectors/codex-materialize.d.ts +1 -1
  146. package/dist/connectors/index.d.ts +1 -1
  147. package/dist/connectors/index.js +3 -3
  148. package/dist/consolidation-provenance-check.d.ts +2 -2
  149. package/dist/consolidation-undo.d.ts +2 -2
  150. package/dist/contradiction/index.d.ts +3 -3
  151. package/dist/converge-config.d.ts +16 -2
  152. package/dist/converge-config.js +9 -1
  153. package/dist/convergence-refresh.d.ts +2 -2
  154. package/dist/convergence-refresh.js +5 -5
  155. package/dist/conversation-index/backend.d.ts +1 -1
  156. package/dist/conversation-index/chunker.d.ts +1 -1
  157. package/dist/conversation-index/faiss-adapter.d.ts +1 -1
  158. package/dist/conversation-index/indexer.d.ts +1 -1
  159. package/dist/conversation-index/search.d.ts +1 -1
  160. package/dist/corpus-watermark.d.ts +1 -1
  161. package/dist/corpus-watermark.js +5 -5
  162. package/dist/cross-lingual-recall.d.ts +1 -1
  163. package/dist/day-summary.d.ts +1 -1
  164. package/dist/deep-recall-http-glue.d.ts +11 -11
  165. package/dist/deep-recall-mcp-tools.d.ts +11 -11
  166. package/dist/deep-recall-policy-llm.d.ts +1 -1
  167. package/dist/deep-recall-seeds.d.ts +1 -1
  168. package/dist/delinearize.d.ts +1 -1
  169. package/dist/dependency-propagation-config.d.ts +1 -1
  170. package/dist/{dependency-propagation-delivery-37JdQv_3.d.ts → dependency-propagation-delivery-DjpUlhLi.d.ts} +1 -1
  171. package/dist/direct-answer-wiring.d.ts +1 -1
  172. package/dist/direct-answer.d.ts +1 -1
  173. package/dist/embedding-fallback.d.ts +1 -1
  174. package/dist/enrichment/index.d.ts +1 -1
  175. package/dist/entity-origin-fields.d.ts +1 -1
  176. package/dist/entity-retrieval.d.ts +2 -2
  177. package/dist/entity-retrieval.js +3 -3
  178. package/dist/entity-schema.d.ts +1 -1
  179. package/dist/episodic-context.d.ts +1 -1
  180. package/dist/eval-trajectory-contracts.d.ts +1 -1
  181. package/dist/eval-trajectory-store.d.ts +1 -1
  182. package/dist/eval-trajectory.d.ts +1 -1
  183. package/dist/explicit-capture.d.ts +9 -9
  184. package/dist/external-wiki-access.d.ts +11 -11
  185. package/dist/external-wiki-access.js +19 -19
  186. package/dist/external-wiki-collection-registration.d.ts +1 -1
  187. package/dist/external-wiki-collection.d.ts +1 -1
  188. package/dist/external-wiki-mcp-tools.d.ts +11 -11
  189. package/dist/extraction-error-classification.d.ts +1 -1
  190. package/dist/extraction-faithfulness.d.ts +1 -1
  191. package/dist/extraction-judge-telemetry.d.ts +1 -1
  192. package/dist/extraction-judge-training.d.ts +1 -1
  193. package/dist/extraction-judge.d.ts +1 -1
  194. package/dist/extraction-liveness.d.ts +1 -1
  195. package/dist/extraction-normalization.d.ts +1 -1
  196. package/dist/extraction-prompt.d.ts +1 -1
  197. package/dist/extraction-source-grounding-rules.d.ts +1 -1
  198. package/dist/extraction-source-grounding.d.ts +1 -1
  199. package/dist/extraction.d.ts +1 -1
  200. package/dist/extraction.js +3 -3
  201. package/dist/fallback-llm.d.ts +1 -1
  202. package/dist/graph-dashboard-diff.d.ts +1 -1
  203. package/dist/graph-dashboard-key.d.ts +1 -1
  204. package/dist/graph-dashboard-parser.d.ts +1 -1
  205. package/dist/graph-edge-reinforcement.d.ts +1 -1
  206. package/dist/graph-path-reconstruction.d.ts +1 -1
  207. package/dist/graph-path-scoring.d.ts +1 -1
  208. package/dist/graph-snapshot.d.ts +1 -1
  209. package/dist/graph.d.ts +1 -1
  210. package/dist/harmonic-retrieval.js +1 -1
  211. package/dist/importance.d.ts +1 -1
  212. package/dist/importers/index.d.ts +1 -1
  213. package/dist/in-flight-reads.d.ts +1 -1
  214. package/dist/{index-DquhYqsc.d.ts → index-CsUrdMyL.d.ts} +2 -2
  215. package/dist/index.d.ts +26 -26
  216. package/dist/index.js +66 -56
  217. package/dist/intent.d.ts +1 -1
  218. package/dist/lcm/engine.d.ts +1 -1
  219. package/dist/lcm/index.d.ts +1 -1
  220. package/dist/lcm/tools.d.ts +1 -1
  221. package/dist/lifecycle.d.ts +1 -1
  222. package/dist/live-connectors-runner.d.ts +1 -1
  223. package/dist/local-llm.d.ts +1 -1
  224. package/dist/local-model-endpoint.d.ts +1 -1
  225. package/dist/location/index.d.ts +3 -3
  226. package/dist/location/index.js +5 -5
  227. package/dist/maintenance/memory-governance.d.ts +1 -1
  228. package/dist/maintenance/memory-governance.js +3 -3
  229. package/dist/maintenance/rebuild-memory-lifecycle-ledger.d.ts +2 -2
  230. package/dist/maintenance/rebuild-memory-lifecycle-ledger.js +3 -3
  231. package/dist/maintenance/rebuild-memory-projection.d.ts +2 -2
  232. package/dist/maintenance/rebuild-memory-projection.js +4 -4
  233. package/dist/{maintenance-CizZOycr.d.ts → maintenance-D1GRGLTE.d.ts} +3 -3
  234. package/dist/mcp-memory-inspector-app.d.ts +11 -11
  235. package/dist/memory-action-policy.d.ts +1 -1
  236. package/dist/memory-cache.d.ts +1 -1
  237. package/dist/memory-controller.d.ts +1 -1
  238. package/dist/memory-lifecycle-ledger-utils.d.ts +1 -1
  239. package/dist/memory-projection-store.d.ts +1 -1
  240. package/dist/memory-provenance.d.ts +1 -1
  241. package/dist/memory-snapshot.d.ts +1 -1
  242. package/dist/memory-subject-cli.d.ts +11 -11
  243. package/dist/memory-subject.d.ts +11 -11
  244. package/dist/memory-worth-outcomes.d.ts +2 -2
  245. package/dist/models-json.d.ts +1 -1
  246. package/dist/namespaces/migrate.d.ts +3 -3
  247. package/dist/namespaces/migrate.js +4 -4
  248. package/dist/namespaces/principal.d.ts +1 -1
  249. package/dist/namespaces/search.d.ts +1 -1
  250. package/dist/namespaces/storage.d.ts +3 -3
  251. package/dist/namespaces/storage.js +3 -3
  252. package/dist/native-knowledge.d.ts +1 -1
  253. package/dist/offline-sync-impression-drain.d.ts +1 -1
  254. package/dist/operator-doctor-corpus.d.ts +1 -1
  255. package/dist/operator-doctor-corpus.js +6 -6
  256. package/dist/operator-doctor-replica.d.ts +1 -1
  257. package/dist/operator-toolkit.d.ts +3 -3
  258. package/dist/operator-toolkit.js +13 -13
  259. package/dist/orchestration/compression-guideline-coordinator.d.ts +2 -2
  260. package/dist/orchestration/maintenance.d.ts +4 -4
  261. package/dist/orchestration/maintenance.js +11 -11
  262. package/dist/{orchestrator-DqLcuNMP.d.ts → orchestrator-DeqaPGT5.d.ts} +8 -8
  263. package/dist/orchestrator.d.ts +9 -9
  264. package/dist/orchestrator.js +55 -55
  265. package/dist/patterns-cli.d.ts +1 -1
  266. package/dist/{pipeline-DbJpmcRu.d.ts → pipeline-umUzU0D1.d.ts} +1 -1
  267. package/dist/policy-runtime.d.ts +1 -1
  268. package/dist/proactive-contention.d.ts +1 -1
  269. package/dist/provenance.d.ts +1 -1
  270. package/dist/{public-http-C_hWt6I8.d.ts → public-http-C1ht4oDJ.d.ts} +1 -1
  271. package/dist/{qmd-DA_7fbSz.d.ts → qmd-BasT78PP.d.ts} +1 -1
  272. package/dist/qmd-preflight.d.ts +2 -2
  273. package/dist/qmd-recall-cache.d.ts +1 -1
  274. package/dist/qmd.d.ts +2 -2
  275. package/dist/recall-concurrency-config.d.ts +1 -1
  276. package/dist/recall-disclosure-escalation.d.ts +1 -1
  277. package/dist/recall-explain-renderer.d.ts +1 -1
  278. package/dist/recall-explain-renderer.js +3 -3
  279. package/dist/recall-memory-map.d.ts +1 -1
  280. package/dist/recall-navigate-access.d.ts +1 -1
  281. package/dist/recall-navigate-access.js +2 -2
  282. package/dist/recall-navigate-disclosure.d.ts +1 -1
  283. package/dist/recall-navigate-disclosure.js +1 -1
  284. package/dist/recall-navigate.d.ts +1 -1
  285. package/dist/recall-navigate.js +2 -2
  286. package/dist/recall-planner-llm.d.ts +1 -1
  287. package/dist/recall-state.d.ts +1 -1
  288. package/dist/recall-tag-filter.d.ts +1 -1
  289. package/dist/recall-timings.d.ts +1 -1
  290. package/dist/recall-xray-cli.d.ts +1 -1
  291. package/dist/recall-xray-cli.js +4 -4
  292. package/dist/recall-xray-renderer.d.ts +1 -1
  293. package/dist/recall-xray-renderer.js +3 -3
  294. package/dist/recall-xray.d.ts +1 -1
  295. package/dist/recall-xray.js +2 -2
  296. package/dist/reconcile/cursor.d.ts +1 -1
  297. package/dist/reconcile/cursor.js +2 -2
  298. package/dist/reconcile/manifest.d.ts +1 -1
  299. package/dist/reconcile/manifest.js +3 -3
  300. package/dist/reconcile/plan.d.ts +16 -1
  301. package/dist/reconcile/plan.js +2 -2
  302. package/dist/replay/normalizers/chatgpt.d.ts +1 -1
  303. package/dist/replay/normalizers/claude.d.ts +1 -1
  304. package/dist/replay/normalizers/openclaw.d.ts +1 -1
  305. package/dist/replay/normalizers/shared.d.ts +1 -1
  306. package/dist/replay/runner.d.ts +1 -1
  307. package/dist/replay/types.d.ts +1 -1
  308. package/dist/replica-divergence.d.ts +1 -1
  309. package/dist/replica-peers-config.d.ts +1 -1
  310. package/dist/resolve-auth-token.d.ts +1 -1
  311. package/dist/resume-bundles.js +3 -3
  312. package/dist/retrieval-agents.d.ts +2 -2
  313. package/dist/retrieval-tiers.d.ts +1 -1
  314. package/dist/routing/engine.d.ts +1 -1
  315. package/dist/routing/store.d.ts +1 -1
  316. package/dist/salvage-envelope.d.ts +1 -1
  317. package/dist/schemas.d.ts +42 -42
  318. package/dist/{scope-profiles-BpiWKZzx.d.ts → scope-profiles-DXYzyOXW.d.ts} +1 -1
  319. package/dist/search/embed-helper.d.ts +1 -1
  320. package/dist/search/factory.d.ts +1 -1
  321. package/dist/search/index.d.ts +1 -1
  322. package/dist/search/lancedb-backend.d.ts +1 -1
  323. package/dist/search/meilisearch-backend.d.ts +1 -1
  324. package/dist/search/noop-backend.d.ts +1 -1
  325. package/dist/search/orama-backend.d.ts +1 -1
  326. package/dist/search/port.d.ts +1 -1
  327. package/dist/search/remote-backend.d.ts +1 -1
  328. package/dist/{semantic-consolidation-NJpaZpkY.d.ts → semantic-consolidation-CqDeaY0U.d.ts} +1 -1
  329. package/dist/semantic-consolidation.d.ts +2 -2
  330. package/dist/semantic-consolidation.js +4 -4
  331. package/dist/semantic-rule-promotion.js +3 -3
  332. package/dist/semantic-rule-verifier.d.ts +1 -1
  333. package/dist/semantic-rule-verifier.js +3 -3
  334. package/dist/{service-DdlZjX1D.d.ts → service-BKD-DVYZ.d.ts} +2 -2
  335. package/dist/session-observer-bands.d.ts +1 -1
  336. package/dist/session-observer-state.d.ts +1 -1
  337. package/dist/shared-context/manager.d.ts +1 -1
  338. package/dist/signal.d.ts +1 -1
  339. package/dist/source-agent-qualifier.d.ts +1 -1
  340. package/dist/source-agent-qualifier.js +3 -3
  341. package/dist/standup/build.js +3 -3
  342. package/dist/{storage-C7BWrpU9.d.ts → storage-BcFd1lN_.d.ts} +1 -1
  343. package/dist/storage.d.ts +2 -2
  344. package/dist/storage.js +2 -2
  345. package/dist/subject-config.d.ts +1 -1
  346. package/dist/summarizer.d.ts +1 -1
  347. package/dist/summary-snapshot.d.ts +1 -1
  348. package/dist/support-passport/index.d.ts +14 -14
  349. package/dist/support-passport/index.js +21 -21
  350. package/dist/temporal-supersession.d.ts +2 -2
  351. package/dist/temporal-timeline-recall.d.ts +1 -1
  352. package/dist/temporal-validity.d.ts +1 -1
  353. package/dist/threading.d.ts +1 -1
  354. package/dist/tier-migration.d.ts +2 -2
  355. package/dist/tier-routing.d.ts +1 -1
  356. package/dist/topics.d.ts +1 -1
  357. package/dist/transcript.d.ts +1 -1
  358. package/dist/transfer/export-okf.d.ts +1 -1
  359. package/dist/transfer/export-okf.js +4 -4
  360. package/dist/transfer/types.d.ts +12 -12
  361. package/dist/trust-score-stage.d.ts +1 -1
  362. package/dist/trust-score.d.ts +1 -1
  363. package/dist/{types-Cy1l6fzp.d.ts → types-BRg3tMyp.d.ts} +2 -0
  364. package/dist/types.d.ts +1 -1
  365. package/dist/types.js +1 -1
  366. package/dist/utility-runtime.d.ts +1 -1
  367. package/dist/verified-recall.js +3 -3
  368. package/dist/who-knows-cli.d.ts +11 -11
  369. package/dist/who-knows-cli.js +4 -4
  370. package/dist/who-knows.d.ts +11 -11
  371. package/dist/who-knows.js +3 -3
  372. package/dist/write-envelope.d.ts +1 -1
  373. package/package.json +2 -2
  374. package/src/converge-config.ts +40 -3
  375. package/src/index.ts +1 -1
  376. package/src/reconcile/plan.test.ts +118 -88
  377. package/src/reconcile/plan.ts +98 -84
  378. package/src/types.ts +47 -44
  379. package/dist/chunk-HBVPYRDW.js +0 -39
  380. package/dist/chunk-HBVPYRDW.js.map +0 -1
  381. package/dist/chunk-OYV6RKPM.js.map +0 -1
  382. package/dist/chunk-ZRUEP4IK.js.map +0 -1
  383. /package/dist/{chunk-X66BHMAU.js.map → chunk-2J4TIFBK.js.map} +0 -0
  384. /package/dist/{chunk-I672YBXY.js.map → chunk-3LADWWMA.js.map} +0 -0
  385. /package/dist/{chunk-DBLVQROL.js.map → chunk-3LJPSRAN.js.map} +0 -0
  386. /package/dist/{chunk-S6ZZOFVJ.js.map → chunk-43HMVVOL.js.map} +0 -0
  387. /package/dist/{chunk-IDZU6I4H.js.map → chunk-4HYNMLT6.js.map} +0 -0
  388. /package/dist/{chunk-HTOWFFAI.js.map → chunk-5CF2R4NS.js.map} +0 -0
  389. /package/dist/{chunk-XR6LLNLU.js.map → chunk-5MF4EGL5.js.map} +0 -0
  390. /package/dist/{chunk-SJ5JGIBT.js.map → chunk-5SGOARQJ.js.map} +0 -0
  391. /package/dist/{chunk-5J36BYRI.js.map → chunk-7TUB6JWA.js.map} +0 -0
  392. /package/dist/{chunk-GI726D4G.js.map → chunk-AWF4CNYJ.js.map} +0 -0
  393. /package/dist/{chunk-J6HRJ37H.js.map → chunk-B2AGUKSS.js.map} +0 -0
  394. /package/dist/{chunk-WMZ6F7GY.js.map → chunk-BR3OOQZQ.js.map} +0 -0
  395. /package/dist/{chunk-YYP5GM6J.js.map → chunk-BZTJEILZ.js.map} +0 -0
  396. /package/dist/{chunk-NYFWBYY4.js.map → chunk-CASWJ2HM.js.map} +0 -0
  397. /package/dist/{chunk-B67W7CBL.js.map → chunk-CFKCFY4B.js.map} +0 -0
  398. /package/dist/{chunk-5Z6JYMK4.js.map → chunk-CVJMGVEW.js.map} +0 -0
  399. /package/dist/{chunk-DA4ZMCBU.js.map → chunk-D5ZNOKR7.js.map} +0 -0
  400. /package/dist/{chunk-LE7B5ETE.js.map → chunk-DK6GMO6D.js.map} +0 -0
  401. /package/dist/{chunk-EYKDBZB3.js.map → chunk-DP4EBV7C.js.map} +0 -0
  402. /package/dist/{chunk-WOEKJPJG.js.map → chunk-EFCBJDYE.js.map} +0 -0
  403. /package/dist/{chunk-3ZAZ77WB.js.map → chunk-EJ5RKUXW.js.map} +0 -0
  404. /package/dist/{chunk-5CX3NSR7.js.map → chunk-F5UWQ4LX.js.map} +0 -0
  405. /package/dist/{chunk-CM3JBYD4.js.map → chunk-FB7LAJQM.js.map} +0 -0
  406. /package/dist/{chunk-IO4OJ73B.js.map → chunk-G6N654ND.js.map} +0 -0
  407. /package/dist/{chunk-W7M7NKR7.js.map → chunk-GGYDJJBO.js.map} +0 -0
  408. /package/dist/{chunk-MAIBNEB6.js.map → chunk-HOUST5UX.js.map} +0 -0
  409. /package/dist/{chunk-X73YCO3E.js.map → chunk-I7FY43VC.js.map} +0 -0
  410. /package/dist/{chunk-376CEAYL.js.map → chunk-IZZ7Q2RJ.js.map} +0 -0
  411. /package/dist/{chunk-NF3NMAG7.js.map → chunk-JOYC4RYC.js.map} +0 -0
  412. /package/dist/{chunk-ROHBPMWD.js.map → chunk-JZ6EYAVP.js.map} +0 -0
  413. /package/dist/{chunk-5DRBG5U6.js.map → chunk-KA2HZCMG.js.map} +0 -0
  414. /package/dist/{chunk-ETZ7KKOS.js.map → chunk-KTVSPFCQ.js.map} +0 -0
  415. /package/dist/{chunk-XAJWPB2V.js.map → chunk-L74A6NTI.js.map} +0 -0
  416. /package/dist/{chunk-V5RWV5DK.js.map → chunk-LFK623SF.js.map} +0 -0
  417. /package/dist/{chunk-AYHPGLG6.js.map → chunk-N7JK2RKG.js.map} +0 -0
  418. /package/dist/{chunk-QFMFZILG.js.map → chunk-NYRB7BKY.js.map} +0 -0
  419. /package/dist/{chunk-YCJASQMN.js.map → chunk-NZGO2GKL.js.map} +0 -0
  420. /package/dist/{chunk-N3DSSCOR.js.map → chunk-OGTKQ5MJ.js.map} +0 -0
  421. /package/dist/{chunk-CWPVXVIT.js.map → chunk-PC7WNIRL.js.map} +0 -0
  422. /package/dist/{chunk-NCUODVUI.js.map → chunk-PPOT6SPR.js.map} +0 -0
  423. /package/dist/{chunk-FCL6ENLF.js.map → chunk-R7LY4YKF.js.map} +0 -0
  424. /package/dist/{chunk-FK2SJX27.js.map → chunk-RO2X2EYM.js.map} +0 -0
  425. /package/dist/{chunk-WP37SBRE.js.map → chunk-S37NN23M.js.map} +0 -0
  426. /package/dist/{chunk-DDX6KIXF.js.map → chunk-SB4OBB7P.js.map} +0 -0
  427. /package/dist/{chunk-WHO6ITU7.js.map → chunk-UMEOXLIZ.js.map} +0 -0
  428. /package/dist/{chunk-NISCAOSR.js.map → chunk-WL5PR5YC.js.map} +0 -0
  429. /package/dist/{chunk-YYE5MKRX.js.map → chunk-X33MJFD2.js.map} +0 -0
  430. /package/dist/{chunk-NAOAZASM.js.map → chunk-XJJLWTLW.js.map} +0 -0
  431. /package/dist/{chunk-Y7E5SUZ6.js.map → chunk-YVLENSNS.js.map} +0 -0
  432. /package/dist/{chunk-DGKQVGLC.js.map → chunk-ZJWDWPX6.js.map} +0 -0
  433. /package/dist/{chunk-EQEP23JK.js.map → chunk-ZL3XX5LW.js.map} +0 -0
  434. /package/dist/{chunk-GF7QLY6E.js.map → chunk-ZZM476NV.js.map} +0 -0
@@ -2,10 +2,7 @@ import { CENSUS_MAX_MTIME_MS, isCensusMtimeMs, isSha256Hex } from "../census-val
2
2
  import { normalizeNamespaceIdentity } from "../namespaces/identity.js";
3
3
  import { validateArchiveRelativePath } from "../transfer/fs-utils.js";
4
4
  import type { OfflineSyncFileState } from "../offline-sync.js";
5
- import {
6
- CONVERGE_CONFLICT_POLICIES,
7
- DEFAULT_CONVERGE_CONFLICT_POLICY,
8
- } from "../converge-config.js";
5
+ import { CONVERGE_CONFLICT_POLICIES, DEFAULT_CONVERGE_CONFLICT_POLICY } from "../converge-config.js";
9
6
  import type { ConvergeConflictPolicy } from "../types.js";
10
7
  export type ReconcileConflictPolicy = ConvergeConflictPolicy;
11
8
 
@@ -180,6 +177,21 @@ export interface ReconcileNamespaceInput {
180
177
 
181
178
  export interface ReconcileOptions {
182
179
  conflictPolicy?: ConvergeConflictPolicy;
180
+ /**
181
+ * Platform whose filesystem constraints the portability gates enforce
182
+ * (trailing dot/space, Windows-invalid characters, reserved device names).
183
+ * Defaults to the local platform: a POSIX planner may reason about
184
+ * POSIX-origin paths that carry characters Windows cannot store, because
185
+ * that plan will never be applied on a Windows participant. Injectable so
186
+ * the Windows branches stay testable from any platform.
187
+ */
188
+ localPlatform?: NodeJS.Platform;
189
+ /**
190
+ * Platform of the PEER participant when known (advertised via the
191
+ * offline-sync capabilities route). Push entries materialize on the peer,
192
+ * so Windows path hazards apply when EITHER participant is win32.
193
+ */
194
+ peerPlatform?: string;
183
195
  }
184
196
 
185
197
  /**
@@ -210,11 +222,12 @@ function assertCensusRecord(
210
222
  file: ReconcileFileState | undefined,
211
223
  side: string,
212
224
  namespace: string,
225
+ platforms: readonly (string | undefined)[]
213
226
  ): ReconcileFileState {
214
227
  const path = file?.path;
215
228
  if (typeof path !== "string" || path.length === 0) {
216
229
  throw new ReconcilePlanInputError(
217
- `reconcile: ${side} census for namespace ${namespace} contains a record with no path`,
230
+ `reconcile: ${side} census for namespace ${namespace} contains a record with no path`
218
231
  );
219
232
  }
220
233
  // Same boundary offline-sync applies to this field: a peer census is
@@ -225,7 +238,7 @@ function assertCensusRecord(
225
238
  } catch (err) {
226
239
  throw new ReconcilePlanInputError(err instanceof Error ? err.message : String(err));
227
240
  }
228
- assertPortablePathSegments(path, side, namespace);
241
+ assertPortablePathSegments(path, side, namespace, platforms);
229
242
  return {
230
243
  ...file,
231
244
  path,
@@ -248,7 +261,7 @@ function assertCensusRecord(
248
261
  function assertMtimeMs(value: unknown, context: string): number {
249
262
  if (!isCensusMtimeMs(value)) {
250
263
  throw new ReconcilePlanInputError(
251
- `reconcile: ${context} has an out-of-range mtimeMs; expected a finite value between 0 and ${CENSUS_MAX_MTIME_MS}`,
264
+ `reconcile: ${context} has an out-of-range mtimeMs; expected a finite value between 0 and ${CENSUS_MAX_MTIME_MS}`
252
265
  );
253
266
  }
254
267
  return value;
@@ -262,9 +275,7 @@ function assertMtimeMs(value: unknown, context: string): number {
262
275
  */
263
276
  function assertDigest(value: unknown, context: string): string {
264
277
  if (!isSha256Hex(value)) {
265
- throw new ReconcilePlanInputError(
266
- `reconcile: ${context} must carry a 64-character sha256 hex digest`,
267
- );
278
+ throw new ReconcilePlanInputError(`reconcile: ${context} must carry a 64-character sha256 hex digest`);
268
279
  }
269
280
  return value.toLowerCase();
270
281
  }
@@ -288,19 +299,23 @@ function assertNamespace(namespace: unknown): string {
288
299
  // surrogate and a literal U+FFFD collapse to ONE storage identity while
289
300
  // comparing as two here - slipping both past the duplicate-namespace guard.
290
301
  throw new ReconcilePlanInputError(
291
- "reconcile: namespace contains an unpaired surrogate; it would collide with another namespace on disk",
302
+ "reconcile: namespace contains an unpaired surrogate; it would collide with another namespace on disk"
292
303
  );
293
304
  }
294
305
  if (normalizeNamespaceIdentity(namespace) !== namespace) {
295
306
  throw new ReconcilePlanInputError(
296
- `reconcile: namespace ${JSON.stringify(namespace)} is not canonical; pass ${JSON.stringify(normalizeNamespaceIdentity(namespace))}`,
307
+ `reconcile: namespace ${JSON.stringify(namespace)} is not canonical; pass ${JSON.stringify(normalizeNamespaceIdentity(namespace))}`
297
308
  );
298
309
  }
299
310
  return namespace;
300
311
  }
301
312
 
302
313
  function assertIterable(value: unknown, side: string, namespace: string): Iterable<ReconcileFileState> {
303
- if (value === null || typeof value !== "object" || typeof (value as Iterable<ReconcileFileState>)[Symbol.iterator] !== "function") {
314
+ if (
315
+ value === null ||
316
+ typeof value !== "object" ||
317
+ typeof (value as Iterable<ReconcileFileState>)[Symbol.iterator] !== "function"
318
+ ) {
304
319
  throw new ReconcilePlanInputError(`reconcile: ${side} census for namespace ${namespace} must be iterable`);
305
320
  }
306
321
  return value as Iterable<ReconcileFileState>;
@@ -321,13 +336,26 @@ const WIN32_INVALID_CHARS = /[<>:"|?*\u0000-\u001f]/;
321
336
  const LONE_SURROGATE = /[\ud800-\udbff](?![\udc00-\udfff])|(?<![\ud800-\udbff])[\udc00-\udfff]/;
322
337
  const WIN32_RESERVED_NAMES = /^(con|prn|aux|nul|(com|lpt)[1-9\u00b9\u00b2\u00b3])$/i;
323
338
 
324
- function assertPortablePathSegments(path: string, side: string, namespace: string): void {
339
+ function assertPortablePathSegments(
340
+ path: string,
341
+ side: string,
342
+ namespace: string,
343
+ platforms: readonly (string | undefined)[]
344
+ ): void {
345
+ // Windows-only hazards (trailing dot/space stripping, invalid characters
346
+ // like `:`, reserved device names) only constrain a plan whose LOCAL
347
+ // participant would materialize those paths on Windows. POSIX-origin
348
+ // corpora legitimately contain `:` (e.g. sqlite sidecar names), so the
349
+ // gates are skipped for non-win32 planners. The lone-surrogate check is
350
+ // UNCONDITIONAL: Node mangles unpaired surrogates identically everywhere,
351
+ // which corrupts cross-platform path comparison itself.
352
+ const isWindows = platforms.some((candidate) => candidate === "win32");
325
353
  for (const segment of path.split("/")) {
326
354
  if (segment.length === 0) continue;
327
- if (segment.endsWith(".") || segment.endsWith(" ")) {
355
+ if (isWindows && (segment.endsWith(".") || segment.endsWith(" "))) {
328
356
  throw new ReconcilePlanInputError(
329
357
  `reconcile: ${side} census for namespace ${namespace} path ${path} has a segment ending in a dot or space; ` +
330
- "Windows strips those and would alias it onto another file",
358
+ "Windows strips those and would alias it onto another file"
331
359
  );
332
360
  }
333
361
  // `:` opens an alternate data stream, the rest cannot be created at all,
@@ -337,27 +365,23 @@ function assertPortablePathSegments(path: string, side: string, namespace: strin
337
365
  // Node encodes an unpaired surrogate as U+FFFD, so this path and a
338
366
  // literal U+FFFD path are one file on disk while comparing as distinct.
339
367
  throw new ReconcilePlanInputError(
340
- `reconcile: ${side} census for namespace ${namespace} path ${path} contains an unpaired surrogate`,
368
+ `reconcile: ${side} census for namespace ${namespace} path ${path} contains an unpaired surrogate`
341
369
  );
342
370
  }
343
- if (WIN32_INVALID_CHARS.test(segment)) {
371
+ if (isWindows && WIN32_INVALID_CHARS.test(segment)) {
344
372
  throw new ReconcilePlanInputError(
345
- `reconcile: ${side} census for namespace ${namespace} path ${path} contains a character Windows cannot store`,
373
+ `reconcile: ${side} census for namespace ${namespace} path ${path} contains a character Windows cannot store`
346
374
  );
347
375
  }
348
- if (WIN32_RESERVED_NAMES.test(segment.split(".")[0] ?? "")) {
376
+ if (isWindows && WIN32_RESERVED_NAMES.test(segment.split(".")[0] ?? "")) {
349
377
  throw new ReconcilePlanInputError(
350
- `reconcile: ${side} census for namespace ${namespace} path ${path} uses a reserved Windows device name`,
378
+ `reconcile: ${side} census for namespace ${namespace} path ${path} uses a reserved Windows device name`
351
379
  );
352
380
  }
353
381
  }
354
382
  }
355
383
 
356
- function assertNoPathAlias(
357
- seen: Map<string, string>,
358
- path: string,
359
- namespace: string,
360
- ): void {
384
+ function assertNoPathAlias(seen: Map<string, string>, path: string, namespace: string): void {
361
385
  // NFC first: macOS stores decomposed names and compares canonically, so
362
386
  // `é` (U+00E9) and `é` (e + U+0301) are ONE file there. Then a FULL caseless
363
387
  // fold - upper-then-lower, which collapses forms a bare toLowerCase() keeps
@@ -365,12 +389,16 @@ function assertNoPathAlias(
365
389
  // those distinct and the planner would emit both a push and a pull.
366
390
  // `ß` upper-folds to `ss` while `ẞ` folds to `ß`, so one more pass equalizes
367
391
  // the pair that a single upper-then-lower still leaves apart.
368
- const folded = path.normalize("NFC").toUpperCase().toLowerCase().replace(/\u00df/g, "ss");
392
+ const folded = path
393
+ .normalize("NFC")
394
+ .toUpperCase()
395
+ .toLowerCase()
396
+ .replace(/\u00df/g, "ss");
369
397
  const existing = seen.get(folded);
370
398
  if (existing !== undefined && existing !== path) {
371
399
  throw new ReconcilePlanInputError(
372
400
  `reconcile: namespace ${namespace} has aliasing paths (${existing}, ${path}); ` +
373
- "they resolve to one file on a case-insensitive or Unicode-normalizing peer",
401
+ "they resolve to one file on a case-insensitive or Unicode-normalizing peer"
374
402
  );
375
403
  }
376
404
  seen.set(folded, path);
@@ -386,12 +414,12 @@ function rejectConflictingDuplicate(
386
414
  incoming: { sha256: string; mtimeMs?: number },
387
415
  path: string,
388
416
  side: string,
389
- namespace: string,
417
+ namespace: string
390
418
  ): boolean {
391
419
  if (!existing) return false;
392
420
  if (existing.sha256 !== incoming.sha256) {
393
421
  throw new ReconcilePlanInputError(
394
- `reconcile: ${side} census for namespace ${namespace} lists ${path} twice with different digests`,
422
+ `reconcile: ${side} census for namespace ${namespace} lists ${path} twice with different digests`
395
423
  );
396
424
  }
397
425
  // Same bytes but a different mtime is still ambiguous: `newest-wins` reads
@@ -399,7 +427,7 @@ function rejectConflictingDuplicate(
399
427
  // the winner.
400
428
  if (existing.mtimeMs !== incoming.mtimeMs) {
401
429
  throw new ReconcilePlanInputError(
402
- `reconcile: ${side} census for namespace ${namespace} lists ${path} twice with different mtimeMs`,
430
+ `reconcile: ${side} census for namespace ${namespace} lists ${path} twice with different mtimeMs`
403
431
  );
404
432
  }
405
433
  return true;
@@ -409,10 +437,11 @@ function indexByPath(
409
437
  files: Iterable<ReconcileFileState>,
410
438
  side: string,
411
439
  namespace: string,
440
+ platforms: readonly (string | undefined)[]
412
441
  ): Map<string, ReconcileFileState> {
413
442
  const index = new Map<string, ReconcileFileState>();
414
443
  for (const raw of files) {
415
- const file = assertCensusRecord(raw, side, namespace);
444
+ const file = assertCensusRecord(raw, side, namespace, platforms);
416
445
  if (rejectConflictingDuplicate(index.get(file.path), file, file.path, side, namespace)) continue;
417
446
  index.set(file.path, file);
418
447
  }
@@ -428,19 +457,19 @@ function indexByPath(
428
457
  function parseTombstonedDigests(
429
458
  value: Iterable<string> | undefined,
430
459
  namespace: string,
431
- field = "tombstonedFileSha256",
460
+ field = "tombstonedFileSha256"
432
461
  ): Set<string> {
433
462
  if (value === undefined) return new Set();
434
463
  if (typeof value === "string") {
435
464
  throw new ReconcilePlanInputError(
436
- `reconcile: ${field} for namespace ${namespace} must be a collection of digests, not a single string`,
465
+ `reconcile: ${field} for namespace ${namespace} must be a collection of digests, not a single string`
437
466
  );
438
467
  }
439
468
  if (value === null || typeof value !== "object" || typeof value[Symbol.iterator] !== "function") {
440
469
  // Otherwise the for...of below throws a raw TypeError and a caller handling
441
470
  // ReconcilePlanInputError cannot tell a bad request from a planner bug.
442
471
  throw new ReconcilePlanInputError(
443
- `reconcile: ${field} for namespace ${namespace} must be an iterable collection of digests`,
472
+ `reconcile: ${field} for namespace ${namespace} must be an iterable collection of digests`
444
473
  );
445
474
  }
446
475
  const digests = new Set<string>();
@@ -461,10 +490,11 @@ function indexDigestsByPath(
461
490
  files: Iterable<ReconcileFileState>,
462
491
  side: string,
463
492
  namespace: string,
493
+ platforms: readonly (string | undefined)[]
464
494
  ): Map<string, string> {
465
495
  const index = new Map<string, string>();
466
496
  for (const raw of files) {
467
- const file = assertCensusRecord(raw, side, namespace);
497
+ const file = assertCensusRecord(raw, side, namespace, platforms);
468
498
  const existing = index.get(file.path);
469
499
  // One map, not a parallel `seen`: the base's own mtimeMs is never a
470
500
  // decision input (only the local and peer timestamps order a conflict), so
@@ -473,7 +503,7 @@ function indexDigestsByPath(
473
503
  if (existing !== undefined) {
474
504
  if (existing !== file.sha256) {
475
505
  throw new ReconcilePlanInputError(
476
- `reconcile: ${side} census for namespace ${namespace} lists ${file.path} twice with different digests`,
506
+ `reconcile: ${side} census for namespace ${namespace} lists ${file.path} twice with different digests`
477
507
  );
478
508
  }
479
509
  continue;
@@ -487,7 +517,7 @@ function assertConflictPolicy(value: ConvergeConflictPolicy | undefined): Conver
487
517
  if (value === undefined) return DEFAULT_CONVERGE_CONFLICT_POLICY;
488
518
  if (!CONVERGE_CONFLICT_POLICIES.includes(value)) {
489
519
  throw new ReconcilePlanInputError(
490
- `reconcile: unknown conflictPolicy ${JSON.stringify(value)}; expected one of ${CONVERGE_CONFLICT_POLICIES.join(", ")}`,
520
+ `reconcile: unknown conflictPolicy ${JSON.stringify(value)}; expected one of ${CONVERGE_CONFLICT_POLICIES.join(", ")}`
491
521
  );
492
522
  }
493
523
  return value;
@@ -519,7 +549,7 @@ function resolveConflict(
519
549
  policy: ConvergeConflictPolicy,
520
550
  localMtimeMs: number | undefined,
521
551
  peerMtimeMs: number | undefined,
522
- missingTimestampResolution: ReconcileResolution,
552
+ missingTimestampResolution: ReconcileResolution
523
553
  ): ReconcileResolution {
524
554
  if (policy !== "newest-wins") return "unresolved";
525
555
  if (localMtimeMs === undefined || peerMtimeMs === undefined || localMtimeMs === peerMtimeMs) {
@@ -532,12 +562,11 @@ function parseDeletionMtimes(
532
562
  value: ReadonlyMap<string, number> | undefined,
533
563
  side: string,
534
564
  namespace: string,
565
+ platforms: readonly (string | undefined)[]
535
566
  ): ReadonlyMap<string, number> {
536
567
  if (value === undefined) return new Map();
537
568
  if (!(value instanceof Map)) {
538
- throw new ReconcilePlanInputError(
539
- `reconcile: ${side} deletion mtimes for namespace ${namespace} must be a Map`,
540
- );
569
+ throw new ReconcilePlanInputError(`reconcile: ${side} deletion mtimes for namespace ${namespace} must be a Map`);
541
570
  }
542
571
  const parsed = new Map<string, number>();
543
572
  for (const [path, mtimeMs] of value) {
@@ -546,7 +575,7 @@ function parseDeletionMtimes(
546
575
  } catch (err) {
547
576
  throw new ReconcilePlanInputError(err instanceof Error ? err.message : String(err));
548
577
  }
549
- assertPortablePathSegments(path, side, namespace);
578
+ assertPortablePathSegments(path, side, namespace, platforms);
550
579
  parsed.set(path, assertMtimeMs(mtimeMs, `${side} deletion for namespace ${namespace} entry ${path}`));
551
580
  }
552
581
  return parsed;
@@ -562,7 +591,7 @@ function parseDeletionMtimes(
562
591
  */
563
592
  export function planNamespaceReconciliation(
564
593
  input: ReconcileNamespaceInput,
565
- options: ReconcileOptions = {},
594
+ options: ReconcileOptions = {}
566
595
  ): ReconcilePlanEntry[] {
567
596
  if (!isPlainObject(input)) {
568
597
  throw new ReconcilePlanInputError("reconcile: namespace input must be a plain object");
@@ -580,23 +609,21 @@ export function planNamespaceReconciliation(
580
609
  // Index the peer census only, then stream the local one against it, removing
581
610
  // each match as it is consumed. Peak residency is one index plus the entry
582
611
  // list rather than two full censuses (round 2, codex P2).
583
- const peer = indexByPath(assertIterable(input.peer, "peer", namespace), "peer", namespace);
612
+ const effectivePlatforms = [options.localPlatform ?? process.platform, options.peerPlatform];
613
+ const peer = indexByPath(assertIterable(input.peer, "peer", namespace), "peer", namespace, effectivePlatforms);
584
614
  // Only `base.sha256` is ever read, so the base is compacted to path -> digest
585
615
  // instead of a second full record index (round 7, codex P2).
586
616
  // Only an ABSENT base means bootstrap. A null/invalid cursor silently read as
587
617
  // "no prior agreement" would turn a peer-side deletion into a push and
588
618
  // resurrect it.
589
- const base = input.base === undefined
590
- ? null
591
- : indexDigestsByPath(assertIterable(input.base, "base", namespace), "base", namespace);
619
+ const base =
620
+ input.base === undefined
621
+ ? null
622
+ : indexDigestsByPath(assertIterable(input.base, "base", namespace), "base", namespace, effectivePlatforms);
592
623
  const tombstoned = parseTombstonedDigests(input.tombstonedFileSha256, namespace);
593
- const peerTombstoned = parseTombstonedDigests(
594
- input.peerTombstonedFileSha256,
595
- namespace,
596
- "peerTombstonedFileSha256",
597
- );
598
- const localDeletionMtimeMs = parseDeletionMtimes(input.localDeletionMtimeMs, "local", namespace);
599
- const peerDeletionMtimeMs = parseDeletionMtimes(input.peerDeletionMtimeMs, "peer", namespace);
624
+ const peerTombstoned = parseTombstonedDigests(input.peerTombstonedFileSha256, namespace, "peerTombstonedFileSha256");
625
+ const localDeletionMtimeMs = parseDeletionMtimes(input.localDeletionMtimeMs, "local", namespace, effectivePlatforms);
626
+ const peerDeletionMtimeMs = parseDeletionMtimes(input.peerDeletionMtimeMs, "peer", namespace, effectivePlatforms);
600
627
  const entries: ReconcilePlanEntry[] = [];
601
628
 
602
629
  // Path -> digest only, never the file objects: enough to make the stream
@@ -611,7 +638,7 @@ export function planNamespaceReconciliation(
611
638
  // materializing the second census.
612
639
  const seenLocal = new Map<string, { sha256: string; mtimeMs?: number }>();
613
640
  for (const rawLocal of localCensus) {
614
- const localFile = assertCensusRecord(rawLocal, "local", namespace);
641
+ const localFile = assertCensusRecord(rawLocal, "local", namespace, effectivePlatforms);
615
642
  const path = localFile.path;
616
643
  assertNoPathAlias(caseFold, path, namespace);
617
644
  const seen = seenLocal.get(path);
@@ -658,14 +685,10 @@ export function planNamespaceReconciliation(
658
685
  // path, and a bootstrap merge must push — both sides hold unique data.
659
686
  if (baseSha256 !== undefined) {
660
687
  const peerDeletionMtime = peerDeletionMtimeMs.get(path);
661
- const resolution = baseSha256 === localFile.sha256
662
- ? "unresolved"
663
- : resolveConflict(
664
- policy,
665
- localFile.mtimeMs,
666
- peerDeletionMtime,
667
- "unresolved",
668
- );
688
+ const resolution =
689
+ baseSha256 === localFile.sha256
690
+ ? "unresolved"
691
+ : resolveConflict(policy, localFile.mtimeMs, peerDeletionMtime, "unresolved");
669
692
  entries.push({
670
693
  path,
671
694
  namespace,
@@ -727,12 +750,7 @@ export function planNamespaceReconciliation(
727
750
  });
728
751
  continue;
729
752
  }
730
- const resolution = resolveConflict(
731
- policy,
732
- localFile.mtimeMs,
733
- peerFile.mtimeMs,
734
- "supersede-link",
735
- );
753
+ const resolution = resolveConflict(policy, localFile.mtimeMs, peerFile.mtimeMs, "supersede-link");
736
754
  entries.push({
737
755
  path,
738
756
  namespace,
@@ -767,14 +785,10 @@ export function planNamespaceReconciliation(
767
785
  }
768
786
  if (baseSha256 !== undefined) {
769
787
  const localDeletionMtime = localDeletionMtimeMs.get(path);
770
- const resolution = baseSha256 === peerFile.sha256
771
- ? "unresolved"
772
- : resolveConflict(
773
- policy,
774
- localDeletionMtime,
775
- peerFile.mtimeMs,
776
- "unresolved",
777
- );
788
+ const resolution =
789
+ baseSha256 === peerFile.sha256
790
+ ? "unresolved"
791
+ : resolveConflict(policy, localDeletionMtime, peerFile.mtimeMs, "unresolved");
778
792
  entries.push({
779
793
  path,
780
794
  namespace,
@@ -811,12 +825,12 @@ export function summarizeReconcilePlan(entries: readonly ReconcilePlanEntry[]):
811
825
  byNamespace.set(entry.namespace, report);
812
826
  }
813
827
  report[entry.action] += 1;
814
- const needsOperator =
815
- entry.resolution === "unresolved"
816
- || entry.resolution === "supersede-link";
828
+ const needsOperator = entry.resolution === "unresolved" || entry.resolution === "supersede-link";
817
829
  if (entry.action === "conflict" && needsOperator) report.unresolved += 1;
818
830
  }
819
- return [...byNamespace.values()].sort((a, b) => (a.namespace === b.namespace ? 0 : a.namespace < b.namespace ? -1 : 1));
831
+ return [...byNamespace.values()].sort((a, b) =>
832
+ a.namespace === b.namespace ? 0 : a.namespace < b.namespace ? -1 : 1
833
+ );
820
834
  }
821
835
 
822
836
  /**
@@ -828,7 +842,7 @@ export function summarizeReconcilePlan(entries: readonly ReconcilePlanEntry[]):
828
842
  */
829
843
  export function planReconciliation(
830
844
  namespaces: readonly ReconcileNamespaceInput[],
831
- options: ReconcileOptions = {},
845
+ options: ReconcileOptions = {}
832
846
  ): ReconcilePlan {
833
847
  if (!Array.isArray(namespaces)) {
834
848
  throw new ReconcilePlanInputError("reconcile: planReconciliation expects an array of namespace inputs");
@@ -849,7 +863,7 @@ export function planReconciliation(
849
863
  const name = assertNamespace(namespace?.namespace);
850
864
  if (seenNamespaces.has(name)) {
851
865
  throw new ReconcilePlanInputError(
852
- `reconcile: namespace ${name} appears twice; merge its censuses before planning`,
866
+ `reconcile: namespace ${name} appears twice; merge its censuses before planning`
853
867
  );
854
868
  }
855
869
  seenNamespaces.add(name);
package/src/types.ts CHANGED
@@ -11,7 +11,11 @@ import type { ContradictionLocalizationConfig, ContradictionScanConfig } from ".
11
11
  import type { GraphPathScoringConfig } from "./graph-path-scoring-config.js";
12
12
  export type { ContradictionLocalizationConfig, ContradictionScanConfig } from "./contradiction-config.js";
13
13
  export type { GraphPathScoringConfig } from "./graph-path-scoring-config.js";
14
- import type { DriftDetectionSettings, MemoryDriftProvenance, RecallDriftAnnotation } from "./preferences/drift-types.js";
14
+ import type {
15
+ DriftDetectionSettings,
16
+ MemoryDriftProvenance,
17
+ RecallDriftAnnotation,
18
+ } from "./preferences/drift-types.js";
15
19
  import type { DeepRecallSettings } from "./deep-recall-config.js";
16
20
  import type { ProceduralMaintenanceConfig } from "./procedural/maintenance-config.js";
17
21
  import type { SkillProjectionConfig } from "./procedural/skill-projection.js";
@@ -25,9 +29,24 @@ export type TriggerMode = "smart" | "every_n" | "time_based";
25
29
  export type ConvergeConflictPolicy = "newest-wins" | "manual";
26
30
  export interface ConvergeConfig {
27
31
  conflictPolicy: ConvergeConflictPolicy;
32
+ /** Per-request peer HTTP timeout in ms (plan/apply/watch). Default 30000; clamped to <= 3600000. */
33
+ peerRequestTimeoutMs?: number;
28
34
  }
29
35
  export type SignalLevel = "none" | "low" | "medium" | "high";
30
- export type MemoryCategory = "fact" | "preference" | "correction" | "entity" | "decision" | "relationship" | "principle" | "commitment" | "moment" | "skill" | "rule" | "procedure" | "reasoning_trace";
36
+ export type MemoryCategory =
37
+ | "fact"
38
+ | "preference"
39
+ | "correction"
40
+ | "entity"
41
+ | "decision"
42
+ | "relationship"
43
+ | "principle"
44
+ | "commitment"
45
+ | "moment"
46
+ | "skill"
47
+ | "rule"
48
+ | "procedure"
49
+ | "reasoning_trace";
31
50
  export type ConsolidationAction = "ADD" | "MERGE" | "UPDATE" | "INVALIDATE" | "SKIP";
32
51
  export type ConfidenceTier = "explicit" | "implied" | "inferred" | "speculative";
33
52
  export type PrincipalFromSessionKeyMode = "map" | "prefix" | "regex";
@@ -71,13 +90,7 @@ export type ActiveRecallModelFallbackPolicy = "default-remote" | "resolved-only"
71
90
  * sequential — callers may jump straight to a lower tier when eligibility
72
91
  * does not hold.
73
92
  */
74
- export type RetrievalTier =
75
- | "exact-cache"
76
- | "fuzzy-cache"
77
- | "direct-answer"
78
- | "hybrid"
79
- | "rerank-graph"
80
- | "agentic";
93
+ export type RetrievalTier = "exact-cache" | "fuzzy-cache" | "direct-answer" | "hybrid" | "rerank-graph" | "agentic";
81
94
 
82
95
  /**
83
96
  * Per-recall annotation describing which retrieval tier served a result,
@@ -125,11 +138,7 @@ export type RecallDisclosure = "chunk" | "section" | "raw";
125
138
  * Treat this as the single source of truth — do not hard-code disclosure
126
139
  * strings elsewhere.
127
140
  */
128
- export const RECALL_DISCLOSURE_LEVELS: readonly RecallDisclosure[] = [
129
- "chunk",
130
- "section",
131
- "raw",
132
- ] as const;
141
+ export const RECALL_DISCLOSURE_LEVELS: readonly RecallDisclosure[] = ["chunk", "section", "raw"] as const;
133
142
 
134
143
  /**
135
144
  * Default disclosure level when a caller omits `disclosure`. Set to `chunk`
@@ -139,8 +148,7 @@ export const RECALL_DISCLOSURE_LEVELS: readonly RecallDisclosure[] = [
139
148
  export const DEFAULT_RECALL_DISCLOSURE: RecallDisclosure = "chunk";
140
149
 
141
150
  export function isRecallDisclosure(value: unknown): value is RecallDisclosure {
142
- return typeof value === "string"
143
- && (RECALL_DISCLOSURE_LEVELS as readonly string[]).includes(value);
151
+ return typeof value === "string" && (RECALL_DISCLOSURE_LEVELS as readonly string[]).includes(value);
144
152
  }
145
153
 
146
154
  export interface RecallSectionConfig {
@@ -575,17 +583,9 @@ export interface CodingContext {
575
583
  defaultBranch: string | null;
576
584
  }
577
585
 
578
- export type ScopeProfileLayerId =
579
- | "userProject"
580
- | "teamProject"
581
- | "userGlobal"
582
- | "serverShared";
586
+ export type ScopeProfileLayerId = "userProject" | "teamProject" | "userGlobal" | "serverShared";
583
587
 
584
- export type ScopeProfilePromotionTarget =
585
- | ScopeProfileLayerId
586
- | "serverShared"
587
- | "teamProject"
588
- | "userGlobal";
588
+ export type ScopeProfilePromotionTarget = ScopeProfileLayerId | "serverShared" | "teamProject" | "userGlobal";
589
589
 
590
590
  export interface ScopeProfileTeamProjectConfig {
591
591
  /**
@@ -660,8 +660,8 @@ export interface CodexCompatConfig {
660
660
 
661
661
  export function confidenceTier(score: number): ConfidenceTier {
662
662
  if (score >= 0.95) return "explicit";
663
- if (score >= 0.70) return "implied";
664
- if (score >= 0.40) return "inferred";
663
+ if (score >= 0.7) return "implied";
664
+ if (score >= 0.4) return "inferred";
665
665
  return "speculative";
666
666
  }
667
667
 
@@ -683,7 +683,12 @@ export interface SemanticChunkingConfigShape {
683
683
  fallbackToRecursive: boolean;
684
684
  }
685
685
 
686
- export interface PluginConfig extends BoundedJsonlStateConfig, SecurityConfig, DriftDetectionSettings, ActiveContextConfigFields, DeepRecallSettings {
686
+ export interface PluginConfig
687
+ extends BoundedJsonlStateConfig,
688
+ SecurityConfig,
689
+ DriftDetectionSettings,
690
+ ActiveContextConfigFields,
691
+ DeepRecallSettings {
687
692
  openaiApiKey: string | undefined;
688
693
  openaiBaseUrl: string | undefined;
689
694
  model: string;
@@ -1570,7 +1575,8 @@ export interface PluginConfig extends BoundedJsonlStateConfig, SecurityConfig, D
1570
1575
  /** Maximum number of trace files to keep (rolling window). */
1571
1576
  profilingMaxTraces: number;
1572
1577
  // Extraction stability guards (P0/P1).
1573
- extractionDedupeEnabled: boolean; extractionSourceGroundingEnabled: boolean;
1578
+ extractionDedupeEnabled: boolean;
1579
+ extractionSourceGroundingEnabled: boolean;
1574
1580
  extractionDedupeWindowMs: number;
1575
1581
  extractionMinChars: number;
1576
1582
  extractionMinUserTurns: number;
@@ -2714,7 +2720,13 @@ export interface BehaviorLoopPolicyState {
2714
2720
  updatedAt: string;
2715
2721
  }
2716
2722
 
2717
- export type BehaviorSignalType = "correction_override" | "preference_affinity" | "topic_revisitation" | "action_pattern" | "outcome_preference" | "phrasing_style";
2723
+ export type BehaviorSignalType =
2724
+ | "correction_override"
2725
+ | "preference_affinity"
2726
+ | "topic_revisitation"
2727
+ | "action_pattern"
2728
+ | "outcome_preference"
2729
+ | "phrasing_style";
2718
2730
  export type BehaviorSignalDirection = "positive" | "negative";
2719
2731
 
2720
2732
  export interface BehaviorSignalEvent {
@@ -3531,12 +3543,7 @@ export type MemoryActionPolicyDecision = "allow" | "defer" | "deny";
3531
3543
 
3532
3544
  export type MemoryActionStatus = "validated" | "applied" | "rejected";
3533
3545
 
3534
- export type MemoryActionEligibilitySource =
3535
- | "extraction"
3536
- | "consolidation"
3537
- | "replay"
3538
- | "manual"
3539
- | "unknown";
3546
+ export type MemoryActionEligibilitySource = "extraction" | "consolidation" | "replay" | "manual" | "unknown";
3540
3547
 
3541
3548
  export interface MemoryActionEligibilityContext {
3542
3549
  confidence: number;
@@ -3632,7 +3639,8 @@ export interface MemoryProjectionCurrentState {
3632
3639
  accessCount?: number;
3633
3640
  lastAccessed?: string;
3634
3641
  tags?: string[];
3635
- preview?: string; privateRecord?: boolean;
3642
+ preview?: string;
3643
+ privateRecord?: boolean;
3636
3644
  }
3637
3645
 
3638
3646
  export interface CompressionGuidelineOptimizerSourceWindow {
@@ -3763,12 +3771,7 @@ export type LlmTraceCallback = (event: EngramTraceEvent) => void;
3763
3771
  // Gateway Configuration Types (for fallback AI)
3764
3772
  // ============================================================================
3765
3773
 
3766
- export type ModelApi =
3767
- | "openai-completions"
3768
- | "anthropic-messages"
3769
- | "google-generative"
3770
- | "codex-cli"
3771
- | string;
3774
+ export type ModelApi = "openai-completions" | "anthropic-messages" | "google-generative" | "codex-cli" | string;
3772
3775
  export type CodexCliReasoningEffort = "low" | "medium" | "high" | "xhigh";
3773
3776
 
3774
3777
  export type ModelProviderAuthMode = "bearer" | "header" | "query";
@@ -1,39 +0,0 @@
1
- // src/converge-config.ts
2
- var CONVERGE_CONFLICT_POLICIES = [
3
- "newest-wins",
4
- "manual"
5
- ];
6
- var DEFAULT_CONVERGE_CONFLICT_POLICY = "newest-wins";
7
- function parseConvergeConfig(block) {
8
- if (block === void 0) {
9
- return { conflictPolicy: DEFAULT_CONVERGE_CONFLICT_POLICY };
10
- }
11
- if (block === null || typeof block !== "object" || Array.isArray(block)) {
12
- throw new Error("converge must be a plain object");
13
- }
14
- const prototype = Object.getPrototypeOf(block);
15
- if (prototype !== Object.prototype && prototype !== null) {
16
- throw new Error("converge must be a plain object");
17
- }
18
- const { conflictPolicy, ...unknown } = block;
19
- const unknownKey = Object.keys(unknown)[0];
20
- if (unknownKey !== void 0) {
21
- throw new Error(`converge contains unknown key ${JSON.stringify(unknownKey)}`);
22
- }
23
- if (conflictPolicy === void 0) {
24
- return { conflictPolicy: DEFAULT_CONVERGE_CONFLICT_POLICY };
25
- }
26
- if (typeof conflictPolicy === "string" && CONVERGE_CONFLICT_POLICIES.includes(conflictPolicy)) {
27
- return { conflictPolicy };
28
- }
29
- throw new Error(
30
- `converge.conflictPolicy must be one of ${CONVERGE_CONFLICT_POLICIES.join(", ")}; got ${JSON.stringify(conflictPolicy)}`
31
- );
32
- }
33
-
34
- export {
35
- CONVERGE_CONFLICT_POLICIES,
36
- DEFAULT_CONVERGE_CONFLICT_POLICY,
37
- parseConvergeConfig
38
- };
39
- //# sourceMappingURL=chunk-HBVPYRDW.js.map
@@ -1 +0,0 @@
1
- {"version":3,"sources":["../src/converge-config.ts"],"sourcesContent":["import type { ConvergeConfig, ConvergeConflictPolicy } from \"./types.js\";\n\nexport const CONVERGE_CONFLICT_POLICIES = [\n \"newest-wins\",\n \"manual\",\n] as const satisfies readonly ConvergeConflictPolicy[];\n\nexport const DEFAULT_CONVERGE_CONFLICT_POLICY: ConvergeConflictPolicy = \"newest-wins\";\n\nexport function parseConvergeConfig(block: unknown): ConvergeConfig {\n if (block === undefined) {\n return { conflictPolicy: DEFAULT_CONVERGE_CONFLICT_POLICY };\n }\n if (block === null || typeof block !== \"object\" || Array.isArray(block)) {\n throw new Error(\"converge must be a plain object\");\n }\n const prototype = Object.getPrototypeOf(block);\n if (prototype !== Object.prototype && prototype !== null) {\n throw new Error(\"converge must be a plain object\");\n }\n const { conflictPolicy, ...unknown } = block as Record<string, unknown>;\n const unknownKey = Object.keys(unknown)[0];\n if (unknownKey !== undefined) {\n throw new Error(`converge contains unknown key ${JSON.stringify(unknownKey)}`);\n }\n if (conflictPolicy === undefined) {\n return { conflictPolicy: DEFAULT_CONVERGE_CONFLICT_POLICY };\n }\n if (\n typeof conflictPolicy === \"string\" &&\n CONVERGE_CONFLICT_POLICIES.includes(conflictPolicy as ConvergeConflictPolicy)\n ) {\n return { conflictPolicy: conflictPolicy as ConvergeConflictPolicy };\n }\n\n throw new Error(\n `converge.conflictPolicy must be one of ${CONVERGE_CONFLICT_POLICIES.join(\", \")}; got ${JSON.stringify(conflictPolicy)}`\n );\n}\n"],"mappings":";AAEO,IAAM,6BAA6B;AAAA,EACxC;AAAA,EACA;AACF;AAEO,IAAM,mCAA2D;AAEjE,SAAS,oBAAoB,OAAgC;AAClE,MAAI,UAAU,QAAW;AACvB,WAAO,EAAE,gBAAgB,iCAAiC;AAAA,EAC5D;AACA,MAAI,UAAU,QAAQ,OAAO,UAAU,YAAY,MAAM,QAAQ,KAAK,GAAG;AACvE,UAAM,IAAI,MAAM,iCAAiC;AAAA,EACnD;AACA,QAAM,YAAY,OAAO,eAAe,KAAK;AAC7C,MAAI,cAAc,OAAO,aAAa,cAAc,MAAM;AACxD,UAAM,IAAI,MAAM,iCAAiC;AAAA,EACnD;AACA,QAAM,EAAE,gBAAgB,GAAG,QAAQ,IAAI;AACvC,QAAM,aAAa,OAAO,KAAK,OAAO,EAAE,CAAC;AACzC,MAAI,eAAe,QAAW;AAC5B,UAAM,IAAI,MAAM,iCAAiC,KAAK,UAAU,UAAU,CAAC,EAAE;AAAA,EAC/E;AACA,MAAI,mBAAmB,QAAW;AAChC,WAAO,EAAE,gBAAgB,iCAAiC;AAAA,EAC5D;AACA,MACE,OAAO,mBAAmB,YAC1B,2BAA2B,SAAS,cAAwC,GAC5E;AACA,WAAO,EAAE,eAAyD;AAAA,EACpE;AAEA,QAAM,IAAI;AAAA,IACR,0CAA0C,2BAA2B,KAAK,IAAI,CAAC,SAAS,KAAK,UAAU,cAAc,CAAC;AAAA,EACxH;AACF;","names":[]}