@remnic/core 10.0.14 → 10.0.15

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 (355) hide show
  1. package/dist/abstraction-nodes.js +3 -2
  2. package/dist/access-admin-ops-surface.js +33 -31
  3. package/dist/access-authorization-probe.js +34 -32
  4. package/dist/access-boundary.js +33 -31
  5. package/dist/access-cli.js +87 -85
  6. package/dist/access-cli.js.map +1 -1
  7. package/dist/access-extraction-force-flush.js +33 -31
  8. package/dist/access-http-briefing.js +34 -32
  9. package/dist/access-http-query.js +35 -33
  10. package/dist/access-http.js +52 -50
  11. package/dist/access-identity-continuity-surface.js +33 -31
  12. package/dist/access-lcm-surface.js +33 -31
  13. package/dist/access-mcp.js +44 -42
  14. package/dist/access-namespace-preflight.js +33 -31
  15. package/dist/access-observe-write-category.js +4 -3
  16. package/dist/access-observe-write-surface.js +33 -31
  17. package/dist/access-offline-manifest.js +3 -2
  18. package/dist/access-operations-batch.js +36 -34
  19. package/dist/access-operations.js +43 -41
  20. package/dist/access-recall-concurrency.js +33 -31
  21. package/dist/access-recall-response.js +33 -31
  22. package/dist/access-recall-surface.js +33 -31
  23. package/dist/access-schema.js +3 -2
  24. package/dist/access-service.js +33 -31
  25. package/dist/access-surface-catalog.js +35 -33
  26. package/dist/access-surface-catalog.js.map +1 -1
  27. package/dist/active-recall.js +14 -12
  28. package/dist/active-recall.js.map +1 -1
  29. package/dist/briefing.js +10 -8
  30. package/dist/calibration.d.ts.map +1 -1
  31. package/dist/calibration.js +6 -3
  32. package/dist/calibration.js.map +1 -1
  33. package/dist/causal-behavior.js +4 -3
  34. package/dist/causal-behavior.js.map +1 -1
  35. package/dist/causal-chain.js +4 -3
  36. package/dist/causal-consolidation.js +14 -12
  37. package/dist/causal-consolidation.js.map +1 -1
  38. package/dist/causal-retrieval.js +4 -3
  39. package/dist/causal-retrieval.js.map +1 -1
  40. package/dist/causal-trajectory.js +3 -2
  41. package/dist/{chunk-J7JWFZHI.js → chunk-22RM2ZUJ.js} +37 -37
  42. package/dist/{chunk-63B2IZYE.js → chunk-23ZQPP2G.js} +6 -1
  43. package/dist/chunk-23ZQPP2G.js.map +1 -0
  44. package/dist/{chunk-YFMBHQRG.js → chunk-2PTH4PRL.js} +2 -2
  45. package/dist/{chunk-TITG2NBS.js → chunk-2PYHLSXK.js} +2 -2
  46. package/dist/{chunk-B6O2YLUR.js → chunk-2Z5DIDQD.js} +6 -1
  47. package/dist/chunk-2Z5DIDQD.js.map +1 -0
  48. package/dist/{chunk-KH2LKDX7.js → chunk-33G67YZF.js} +2 -2
  49. package/dist/{chunk-LCKVXX5F.js → chunk-3GNIJUUE.js} +2 -2
  50. package/dist/{chunk-SWIKABKI.js → chunk-3Q3XD3NO.js} +2 -2
  51. package/dist/{chunk-4KY5GSMB.js → chunk-4PDTVVSW.js} +2 -2
  52. package/dist/{chunk-HM7RHKS4.js → chunk-4RNBLLZR.js} +2 -2
  53. package/dist/{chunk-PAZ35RJ4.js → chunk-4SCZZ3U7.js} +240 -55
  54. package/dist/chunk-4SCZZ3U7.js.map +1 -0
  55. package/dist/{chunk-Y4NKEXQT.js → chunk-5ATSXCAG.js} +3 -3
  56. package/dist/{chunk-JDZFIR2S.js → chunk-5KGYTX5O.js} +2 -2
  57. package/dist/{chunk-NW2E4CI2.js → chunk-5SMR542T.js} +2 -2
  58. package/dist/{chunk-S7LWX2PQ.js → chunk-655FVTCD.js} +2 -2
  59. package/dist/{chunk-ZSH2NRDV.js → chunk-6WGMZQGG.js} +2 -2
  60. package/dist/{chunk-W47S5TIH.js → chunk-7VQ6AI7H.js} +2 -2
  61. package/dist/{chunk-G7NYVKD6.js → chunk-B2NXOVZN.js} +2 -2
  62. package/dist/{chunk-N7KYEVLK.js → chunk-BK2BVLZW.js} +2 -2
  63. package/dist/{chunk-QJ622LTI.js → chunk-BQOGQULP.js} +30 -8
  64. package/dist/chunk-BQOGQULP.js.map +1 -0
  65. package/dist/{chunk-S2I7DL5Q.js → chunk-C2RW36YR.js} +2 -2
  66. package/dist/{chunk-P5NQN4JE.js → chunk-C6JMGAMO.js} +6 -2
  67. package/dist/chunk-C6JMGAMO.js.map +1 -0
  68. package/dist/{chunk-6LG7BWKW.js → chunk-CFZ4SXXH.js} +2 -2
  69. package/dist/{chunk-BLVHDY2U.js → chunk-DOWACHYO.js} +5 -2
  70. package/dist/chunk-DOWACHYO.js.map +1 -0
  71. package/dist/{chunk-4OSG5Y6M.js → chunk-DPSOFK4D.js} +2 -2
  72. package/dist/{chunk-QOZJCSFO.js → chunk-DQR2LD3V.js} +2 -2
  73. package/dist/{chunk-EBA5DA77.js → chunk-EOU6V4IN.js} +2 -2
  74. package/dist/{chunk-5WCJLQTM.js → chunk-F2772ATT.js} +2 -2
  75. package/dist/{chunk-46EST7JO.js → chunk-F2XNSIPP.js} +2 -2
  76. package/dist/{chunk-PZHQWFR3.js → chunk-G3UUAQOD.js} +2 -2
  77. package/dist/{chunk-YE36AJL7.js → chunk-GCVDFX66.js} +2 -2
  78. package/dist/{chunk-FFOVKNQV.js → chunk-GFAM2LTC.js} +2 -2
  79. package/dist/{chunk-T2YX56QI.js → chunk-GQJKVQJR.js} +2 -2
  80. package/dist/{chunk-L5DAHSEZ.js → chunk-GWVNGDJW.js} +2 -2
  81. package/dist/{chunk-N45NEBOD.js → chunk-GZXXPCWJ.js} +3 -3
  82. package/dist/{chunk-EPJDSQHF.js → chunk-H5IUN433.js} +2 -2
  83. package/dist/{chunk-EUAIYYYR.js → chunk-H6FREOYX.js} +7 -7
  84. package/dist/{chunk-FSIMZNBC.js → chunk-HBAOOSHU.js} +2 -2
  85. package/dist/{chunk-Q4E24IRR.js → chunk-HDN7IVIO.js} +14 -11
  86. package/dist/chunk-HDN7IVIO.js.map +1 -0
  87. package/dist/{chunk-T3FMRLWQ.js → chunk-HFSPY26A.js} +2 -2
  88. package/dist/{chunk-GH7AOMJD.js → chunk-IJMDBYCO.js} +2 -2
  89. package/dist/{chunk-JQ7XU625.js → chunk-IUCPLBDS.js} +6 -6
  90. package/dist/{chunk-WSGPFRBH.js → chunk-IWD33CF4.js} +2 -2
  91. package/dist/{chunk-4IHBN6WU.js → chunk-JKMIGCK6.js} +2 -2
  92. package/dist/{chunk-ROBHL3GL.js → chunk-JWX2Q6HS.js} +2 -2
  93. package/dist/{chunk-4O6WRBGE.js → chunk-KJXP6RUG.js} +5 -1
  94. package/dist/chunk-KJXP6RUG.js.map +1 -0
  95. package/dist/{chunk-JIHMUOOS.js → chunk-KLJVTZ3R.js} +3 -3
  96. package/dist/{chunk-FP4JYE66.js → chunk-KW4AJ7T3.js} +2 -2
  97. package/dist/{chunk-NIRQGDYC.js → chunk-L5VCT7LU.js} +5 -1
  98. package/dist/chunk-L5VCT7LU.js.map +1 -0
  99. package/dist/{chunk-LS2FHUML.js → chunk-LQ5SS4OP.js} +3 -3
  100. package/dist/{chunk-SIIRTDJ4.js → chunk-LWFWZTWX.js} +2 -2
  101. package/dist/{chunk-BMWN7B3Y.js → chunk-LXATZLSC.js} +3 -3
  102. package/dist/{chunk-B665A6BO.js → chunk-MJIOGYKX.js} +2 -2
  103. package/dist/{chunk-RTKV5XHL.js → chunk-MO6N4QYY.js} +2 -2
  104. package/dist/{chunk-N4C7QKOG.js → chunk-MWWAQXZ6.js} +2 -2
  105. package/dist/{chunk-ZJVMUBYF.js → chunk-NHUX6GXA.js} +6 -6
  106. package/dist/{chunk-CB6ANA2I.js → chunk-NZCKG25S.js} +2 -2
  107. package/dist/{chunk-UMTCNEVQ.js → chunk-O2YPCFJT.js} +11 -11
  108. package/dist/{chunk-TZNDKTX5.js → chunk-OQR42XCN.js} +37 -33
  109. package/dist/chunk-OQR42XCN.js.map +1 -0
  110. package/dist/{chunk-JYZSRNR7.js → chunk-PIITB2YZ.js} +2 -2
  111. package/dist/chunk-PPUNC7UX.js +73 -0
  112. package/dist/chunk-PPUNC7UX.js.map +1 -0
  113. package/dist/{chunk-EQWEIIKQ.js → chunk-PQM3B54K.js} +6 -1
  114. package/dist/chunk-PQM3B54K.js.map +1 -0
  115. package/dist/{chunk-UQDG3YLN.js → chunk-PRU7OF3Y.js} +3 -3
  116. package/dist/{chunk-EU534WGS.js → chunk-PVHQSLNN.js} +7 -7
  117. package/dist/{chunk-5VC7J76U.js → chunk-QPH52AZB.js} +2 -2
  118. package/dist/{chunk-XISROV24.js → chunk-QSEUUQUF.js} +2 -2
  119. package/dist/chunk-QUIRIG2P.js +31 -0
  120. package/dist/chunk-QUIRIG2P.js.map +1 -0
  121. package/dist/{chunk-FUFAXVBA.js → chunk-RI2KCQHP.js} +6 -2
  122. package/dist/chunk-RI2KCQHP.js.map +1 -0
  123. package/dist/{chunk-QX6JN3O4.js → chunk-RP7PQWZM.js} +6 -6
  124. package/dist/{chunk-O2IPAX26.js → chunk-RTTPBBAN.js} +4 -4
  125. package/dist/{chunk-W5MCEVUS.js → chunk-RYYVMZBR.js} +2 -2
  126. package/dist/{chunk-WLMZ2L5P.js → chunk-T7ASDYNK.js} +2 -2
  127. package/dist/{chunk-P7TOIOT7.js → chunk-THEPGZBM.js} +2 -2
  128. package/dist/{chunk-QODKDRSP.js → chunk-TMC7HBED.js} +4 -4
  129. package/dist/{chunk-I7S55EOB.js → chunk-TPNCXSXP.js} +2 -2
  130. package/dist/{chunk-SS3IS2JR.js → chunk-UGYUBENJ.js} +2 -2
  131. package/dist/{chunk-GELS5Z5Z.js → chunk-V3TXIXXY.js} +3 -3
  132. package/dist/{chunk-WVADKFWV.js → chunk-VNZMZPAC.js} +2 -2
  133. package/dist/{chunk-JPTPS4OB.js → chunk-VPXIKBPX.js} +2 -2
  134. package/dist/{chunk-OP6N4H6A.js → chunk-W3FVQBGF.js} +2 -2
  135. package/dist/{chunk-DPR2WTN3.js → chunk-WGTR573G.js} +16 -16
  136. package/dist/{chunk-W3K3HITK.js → chunk-WLT6LTQP.js} +2 -2
  137. package/dist/{chunk-GMXWTJNU.js → chunk-XKRXN63M.js} +2 -2
  138. package/dist/{chunk-ZV65I6ME.js → chunk-XLBFX63V.js} +28 -25
  139. package/dist/chunk-XLBFX63V.js.map +1 -0
  140. package/dist/{chunk-KR6ZKECI.js → chunk-XYGQSDTH.js} +3 -3
  141. package/dist/{chunk-6WHJ2EAB.js → chunk-Z64TS5V4.js} +2 -2
  142. package/dist/{chunk-NHLLKEKK.js → chunk-ZAJLJ35W.js} +2 -2
  143. package/dist/{chunk-O4SGYW7H.js → chunk-ZKHSAMTE.js} +2 -2
  144. package/dist/cli.d.ts.map +1 -1
  145. package/dist/cli.js +72 -70
  146. package/dist/coding/export-okf-codegraph.js +9 -7
  147. package/dist/coding/export-okf-codegraph.js.map +1 -1
  148. package/dist/coding/pre-action-gate.js +4 -3
  149. package/dist/commitment-ledger.js +3 -2
  150. package/dist/compounding/engine.js +11 -9
  151. package/dist/config.js +14 -12
  152. package/dist/connectors/codex-materialize-runner.js +10 -8
  153. package/dist/connectors/index.js +10 -8
  154. package/dist/consolidation-provenance-check.d.ts.map +1 -1
  155. package/dist/consolidation-provenance-check.js +2 -1
  156. package/dist/contradiction/index.js +3 -2
  157. package/dist/convergence-refresh.js +12 -10
  158. package/dist/corpus-watermark.js +12 -10
  159. package/dist/correction/correction-planner.d.ts.map +1 -1
  160. package/dist/cue-anchors.js +4 -3
  161. package/dist/deep-recall-http-glue.js +4 -3
  162. package/dist/{dreams-ledger-567VKVOU.js → dreams-ledger-UCHHRQ4R.js} +3 -2
  163. package/dist/entity-retrieval.js +10 -8
  164. package/dist/eval-trajectory-store.js +4 -3
  165. package/dist/eval-trajectory.js +4 -3
  166. package/dist/evals.js +3 -2
  167. package/dist/external-wiki-access.js +34 -32
  168. package/dist/extraction.js +12 -10
  169. package/dist/{first-start-migration-6A5BJPDW.js → first-start-migration-QVD22WWS.js} +6 -5
  170. package/dist/{first-start-migration-6A5BJPDW.js.map → first-start-migration-QVD22WWS.js.map} +1 -1
  171. package/dist/harmonic-construction.js +5 -4
  172. package/dist/harmonic-retrieval.js +14 -12
  173. package/dist/harmonic-source-lookup.js +3 -2
  174. package/dist/index.js +87 -85
  175. package/dist/json-store.d.ts.map +1 -1
  176. package/dist/json-store.js +2 -1
  177. package/dist/location/index.js +12 -10
  178. package/dist/maintenance/dreams-ledger.d.ts.map +1 -1
  179. package/dist/maintenance/memory-governance.d.ts.map +1 -1
  180. package/dist/maintenance/memory-governance.js +10 -8
  181. package/dist/maintenance/rebuild-memory-lifecycle-ledger.js +10 -8
  182. package/dist/maintenance/rebuild-memory-projection-runner.js +12 -10
  183. package/dist/maintenance/rebuild-memory-projection.js +11 -9
  184. package/dist/memory-browse-operations.js +34 -32
  185. package/dist/namespaces/migrate.js +11 -9
  186. package/dist/namespaces/search.js +7 -6
  187. package/dist/namespaces/storage.d.ts.map +1 -1
  188. package/dist/namespaces/storage.js +10 -8
  189. package/dist/objective-state-writers.js +4 -3
  190. package/dist/objective-state.js +3 -2
  191. package/dist/offline-sync-snapshot-stream.js +3 -2
  192. package/dist/offline-sync.d.ts.map +1 -1
  193. package/dist/offline-sync.js +2 -1
  194. package/dist/operator-doctor-corpus.js +13 -11
  195. package/dist/operator-toolkit.js +25 -23
  196. package/dist/orchestration/maintenance.js +20 -18
  197. package/dist/orchestrator.js +87 -85
  198. package/dist/profiling.d.ts.map +1 -1
  199. package/dist/profiling.js +2 -1
  200. package/dist/recall-navigation-operations.js +34 -32
  201. package/dist/recall-navigation.js +33 -31
  202. package/dist/{resolution-7AY36LGJ.js → resolution-ZU5BIAJA.js} +4 -3
  203. package/dist/resume-bundles.js +19 -17
  204. package/dist/retrieval-agents.d.ts +1 -1
  205. package/dist/retrieval-agents.d.ts.map +1 -1
  206. package/dist/retrieval-agents.js +7 -1
  207. package/dist/search/document-scanner.d.ts.map +1 -1
  208. package/dist/search/document-scanner.js +2 -1
  209. package/dist/search/factory.js +6 -5
  210. package/dist/search/index.js +6 -5
  211. package/dist/search/lancedb-backend.js +3 -2
  212. package/dist/search/meilisearch-backend.js +3 -2
  213. package/dist/search/orama-backend.js +3 -2
  214. package/dist/semantic-consolidation.js +11 -9
  215. package/dist/semantic-rule-promotion.js +10 -8
  216. package/dist/semantic-rule-verifier.js +10 -8
  217. package/dist/source-agent-qualifier.js +10 -8
  218. package/dist/standup/build.js +10 -8
  219. package/dist/storage/entity-canonical-id-migration.d.ts.map +1 -1
  220. package/dist/storage/entity-store.d.ts +32 -1
  221. package/dist/storage/entity-store.d.ts.map +1 -1
  222. package/dist/storage/memory-read-store.d.ts.map +1 -1
  223. package/dist/storage/supersession-audit.d.ts.map +1 -1
  224. package/dist/storage.d.ts.map +1 -1
  225. package/dist/storage.js +9 -7
  226. package/dist/support-passport/index.js +36 -34
  227. package/dist/{tier-stats-RQM76XYY.js → tier-stats-C3IAMS4X.js} +6 -5
  228. package/dist/{tier-stats-RQM76XYY.js.map → tier-stats-C3IAMS4X.js.map} +1 -1
  229. package/dist/transcript.d.ts.map +1 -1
  230. package/dist/transcript.js +2 -1
  231. package/dist/transfer/export-okf.js +10 -8
  232. package/dist/trust-zones.js +3 -2
  233. package/dist/utility-learner.js +4 -3
  234. package/dist/utility-runtime.js +5 -4
  235. package/dist/utility-telemetry.js +3 -2
  236. package/dist/utils/macos-replication-junk.d.ts +32 -0
  237. package/dist/utils/macos-replication-junk.d.ts.map +1 -0
  238. package/dist/utils/malformed-entity-record.d.ts +24 -0
  239. package/dist/utils/malformed-entity-record.d.ts.map +1 -0
  240. package/dist/verified-recall.js +10 -8
  241. package/dist/who-knows-cli.js +11 -9
  242. package/dist/who-knows.js +10 -8
  243. package/dist/work-product-ledger.js +3 -2
  244. package/package.json +2 -2
  245. package/src/calibration.ts +3 -2
  246. package/src/cli.ts +2 -2
  247. package/src/consolidation-provenance-check.ts +2 -0
  248. package/src/correction/correction-planner.ts +3 -2
  249. package/src/json-store.ts +3 -0
  250. package/src/macos-replication-junk-scanners.test.ts +275 -0
  251. package/src/maintenance/dreams-ledger.ts +2 -0
  252. package/src/maintenance/memory-governance.ts +2 -0
  253. package/src/namespaces/storage.ts +2 -0
  254. package/src/offline-sync-macos-junk.test.ts +169 -0
  255. package/src/offline-sync.ts +7 -0
  256. package/src/profiling.ts +2 -1
  257. package/src/retrieval-agents.ts +29 -12
  258. package/src/search/document-scanner.ts +4 -0
  259. package/src/storage/entity-canonical-id-migration.ts +56 -13
  260. package/src/storage/entity-store.ts +173 -15
  261. package/src/storage/memory-read-store.ts +30 -5
  262. package/src/storage/supersession-audit.ts +2 -0
  263. package/src/storage.ts +3 -2
  264. package/src/transcript.ts +11 -10
  265. package/src/utils/macos-replication-junk.test.ts +46 -0
  266. package/src/utils/macos-replication-junk.ts +65 -0
  267. package/src/utils/malformed-entity-record.ts +101 -0
  268. package/dist/chunk-4O6WRBGE.js.map +0 -1
  269. package/dist/chunk-63B2IZYE.js.map +0 -1
  270. package/dist/chunk-B6O2YLUR.js.map +0 -1
  271. package/dist/chunk-BLVHDY2U.js.map +0 -1
  272. package/dist/chunk-EQWEIIKQ.js.map +0 -1
  273. package/dist/chunk-FUFAXVBA.js.map +0 -1
  274. package/dist/chunk-NIRQGDYC.js.map +0 -1
  275. package/dist/chunk-P5NQN4JE.js.map +0 -1
  276. package/dist/chunk-PAZ35RJ4.js.map +0 -1
  277. package/dist/chunk-Q4E24IRR.js.map +0 -1
  278. package/dist/chunk-QJ622LTI.js.map +0 -1
  279. package/dist/chunk-TZNDKTX5.js.map +0 -1
  280. package/dist/chunk-ZV65I6ME.js.map +0 -1
  281. /package/dist/{chunk-J7JWFZHI.js.map → chunk-22RM2ZUJ.js.map} +0 -0
  282. /package/dist/{chunk-YFMBHQRG.js.map → chunk-2PTH4PRL.js.map} +0 -0
  283. /package/dist/{chunk-TITG2NBS.js.map → chunk-2PYHLSXK.js.map} +0 -0
  284. /package/dist/{chunk-KH2LKDX7.js.map → chunk-33G67YZF.js.map} +0 -0
  285. /package/dist/{chunk-LCKVXX5F.js.map → chunk-3GNIJUUE.js.map} +0 -0
  286. /package/dist/{chunk-SWIKABKI.js.map → chunk-3Q3XD3NO.js.map} +0 -0
  287. /package/dist/{chunk-4KY5GSMB.js.map → chunk-4PDTVVSW.js.map} +0 -0
  288. /package/dist/{chunk-HM7RHKS4.js.map → chunk-4RNBLLZR.js.map} +0 -0
  289. /package/dist/{chunk-Y4NKEXQT.js.map → chunk-5ATSXCAG.js.map} +0 -0
  290. /package/dist/{chunk-JDZFIR2S.js.map → chunk-5KGYTX5O.js.map} +0 -0
  291. /package/dist/{chunk-NW2E4CI2.js.map → chunk-5SMR542T.js.map} +0 -0
  292. /package/dist/{chunk-S7LWX2PQ.js.map → chunk-655FVTCD.js.map} +0 -0
  293. /package/dist/{chunk-ZSH2NRDV.js.map → chunk-6WGMZQGG.js.map} +0 -0
  294. /package/dist/{chunk-W47S5TIH.js.map → chunk-7VQ6AI7H.js.map} +0 -0
  295. /package/dist/{chunk-G7NYVKD6.js.map → chunk-B2NXOVZN.js.map} +0 -0
  296. /package/dist/{chunk-N7KYEVLK.js.map → chunk-BK2BVLZW.js.map} +0 -0
  297. /package/dist/{chunk-S2I7DL5Q.js.map → chunk-C2RW36YR.js.map} +0 -0
  298. /package/dist/{chunk-6LG7BWKW.js.map → chunk-CFZ4SXXH.js.map} +0 -0
  299. /package/dist/{chunk-4OSG5Y6M.js.map → chunk-DPSOFK4D.js.map} +0 -0
  300. /package/dist/{chunk-QOZJCSFO.js.map → chunk-DQR2LD3V.js.map} +0 -0
  301. /package/dist/{chunk-EBA5DA77.js.map → chunk-EOU6V4IN.js.map} +0 -0
  302. /package/dist/{chunk-5WCJLQTM.js.map → chunk-F2772ATT.js.map} +0 -0
  303. /package/dist/{chunk-46EST7JO.js.map → chunk-F2XNSIPP.js.map} +0 -0
  304. /package/dist/{chunk-PZHQWFR3.js.map → chunk-G3UUAQOD.js.map} +0 -0
  305. /package/dist/{chunk-YE36AJL7.js.map → chunk-GCVDFX66.js.map} +0 -0
  306. /package/dist/{chunk-FFOVKNQV.js.map → chunk-GFAM2LTC.js.map} +0 -0
  307. /package/dist/{chunk-T2YX56QI.js.map → chunk-GQJKVQJR.js.map} +0 -0
  308. /package/dist/{chunk-L5DAHSEZ.js.map → chunk-GWVNGDJW.js.map} +0 -0
  309. /package/dist/{chunk-N45NEBOD.js.map → chunk-GZXXPCWJ.js.map} +0 -0
  310. /package/dist/{chunk-EPJDSQHF.js.map → chunk-H5IUN433.js.map} +0 -0
  311. /package/dist/{chunk-EUAIYYYR.js.map → chunk-H6FREOYX.js.map} +0 -0
  312. /package/dist/{chunk-FSIMZNBC.js.map → chunk-HBAOOSHU.js.map} +0 -0
  313. /package/dist/{chunk-T3FMRLWQ.js.map → chunk-HFSPY26A.js.map} +0 -0
  314. /package/dist/{chunk-GH7AOMJD.js.map → chunk-IJMDBYCO.js.map} +0 -0
  315. /package/dist/{chunk-JQ7XU625.js.map → chunk-IUCPLBDS.js.map} +0 -0
  316. /package/dist/{chunk-WSGPFRBH.js.map → chunk-IWD33CF4.js.map} +0 -0
  317. /package/dist/{chunk-4IHBN6WU.js.map → chunk-JKMIGCK6.js.map} +0 -0
  318. /package/dist/{chunk-ROBHL3GL.js.map → chunk-JWX2Q6HS.js.map} +0 -0
  319. /package/dist/{chunk-JIHMUOOS.js.map → chunk-KLJVTZ3R.js.map} +0 -0
  320. /package/dist/{chunk-FP4JYE66.js.map → chunk-KW4AJ7T3.js.map} +0 -0
  321. /package/dist/{chunk-LS2FHUML.js.map → chunk-LQ5SS4OP.js.map} +0 -0
  322. /package/dist/{chunk-SIIRTDJ4.js.map → chunk-LWFWZTWX.js.map} +0 -0
  323. /package/dist/{chunk-BMWN7B3Y.js.map → chunk-LXATZLSC.js.map} +0 -0
  324. /package/dist/{chunk-B665A6BO.js.map → chunk-MJIOGYKX.js.map} +0 -0
  325. /package/dist/{chunk-RTKV5XHL.js.map → chunk-MO6N4QYY.js.map} +0 -0
  326. /package/dist/{chunk-N4C7QKOG.js.map → chunk-MWWAQXZ6.js.map} +0 -0
  327. /package/dist/{chunk-ZJVMUBYF.js.map → chunk-NHUX6GXA.js.map} +0 -0
  328. /package/dist/{chunk-CB6ANA2I.js.map → chunk-NZCKG25S.js.map} +0 -0
  329. /package/dist/{chunk-UMTCNEVQ.js.map → chunk-O2YPCFJT.js.map} +0 -0
  330. /package/dist/{chunk-JYZSRNR7.js.map → chunk-PIITB2YZ.js.map} +0 -0
  331. /package/dist/{chunk-UQDG3YLN.js.map → chunk-PRU7OF3Y.js.map} +0 -0
  332. /package/dist/{chunk-EU534WGS.js.map → chunk-PVHQSLNN.js.map} +0 -0
  333. /package/dist/{chunk-5VC7J76U.js.map → chunk-QPH52AZB.js.map} +0 -0
  334. /package/dist/{chunk-XISROV24.js.map → chunk-QSEUUQUF.js.map} +0 -0
  335. /package/dist/{chunk-QX6JN3O4.js.map → chunk-RP7PQWZM.js.map} +0 -0
  336. /package/dist/{chunk-O2IPAX26.js.map → chunk-RTTPBBAN.js.map} +0 -0
  337. /package/dist/{chunk-W5MCEVUS.js.map → chunk-RYYVMZBR.js.map} +0 -0
  338. /package/dist/{chunk-WLMZ2L5P.js.map → chunk-T7ASDYNK.js.map} +0 -0
  339. /package/dist/{chunk-P7TOIOT7.js.map → chunk-THEPGZBM.js.map} +0 -0
  340. /package/dist/{chunk-QODKDRSP.js.map → chunk-TMC7HBED.js.map} +0 -0
  341. /package/dist/{chunk-I7S55EOB.js.map → chunk-TPNCXSXP.js.map} +0 -0
  342. /package/dist/{chunk-SS3IS2JR.js.map → chunk-UGYUBENJ.js.map} +0 -0
  343. /package/dist/{chunk-GELS5Z5Z.js.map → chunk-V3TXIXXY.js.map} +0 -0
  344. /package/dist/{chunk-WVADKFWV.js.map → chunk-VNZMZPAC.js.map} +0 -0
  345. /package/dist/{chunk-JPTPS4OB.js.map → chunk-VPXIKBPX.js.map} +0 -0
  346. /package/dist/{chunk-OP6N4H6A.js.map → chunk-W3FVQBGF.js.map} +0 -0
  347. /package/dist/{chunk-DPR2WTN3.js.map → chunk-WGTR573G.js.map} +0 -0
  348. /package/dist/{chunk-W3K3HITK.js.map → chunk-WLT6LTQP.js.map} +0 -0
  349. /package/dist/{chunk-GMXWTJNU.js.map → chunk-XKRXN63M.js.map} +0 -0
  350. /package/dist/{chunk-KR6ZKECI.js.map → chunk-XYGQSDTH.js.map} +0 -0
  351. /package/dist/{chunk-6WHJ2EAB.js.map → chunk-Z64TS5V4.js.map} +0 -0
  352. /package/dist/{chunk-NHLLKEKK.js.map → chunk-ZAJLJ35W.js.map} +0 -0
  353. /package/dist/{chunk-O4SGYW7H.js.map → chunk-ZKHSAMTE.js.map} +0 -0
  354. /package/dist/{dreams-ledger-567VKVOU.js.map → dreams-ledger-UCHHRQ4R.js.map} +0 -0
  355. /package/dist/{resolution-7AY36LGJ.js.map → resolution-ZU5BIAJA.js.map} +0 -0
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@remnic/core",
3
- "version": "10.0.14",
3
+ "version": "10.0.15",
4
4
  "description": "Framework-agnostic Remnic memory engine — orchestrator, storage, extraction, search, trust zones",
5
5
  "type": "module",
6
6
  "main": "dist/index.js",
@@ -3347,7 +3347,7 @@
3347
3347
  "core"
3348
3348
  ],
3349
3349
  "peerDependencies": {
3350
- "@remnic/coding-graph": "^10.0.14"
3350
+ "@remnic/coding-graph": "^10.0.15"
3351
3351
  },
3352
3352
  "peerDependenciesMeta": {
3353
3353
  "@remnic/coding-graph": {
@@ -19,6 +19,7 @@ import { resolveLocalLlmCapabilities } from "./capabilities.js";
19
19
  import { OUTPUT_LANGUAGE_POLICY } from "./extraction-prompt.js";
20
20
  import { FallbackLlmClient } from "./fallback-llm.js";
21
21
  import { listJsonFiles } from "./json-store.js";
22
+ import { isMacOsReplicationJunkBasename } from "./utils/macos-replication-junk.js";
22
23
  import { LocalLlmClient } from "./local-llm.js";
23
24
  import { log } from "./logger.js";
24
25
  import { writeFileAtomically } from "./maintenance/atomic-file.js";
@@ -195,7 +196,7 @@ async function readCorrectionsImpl(memoryDir: string): Promise<CorrectionMemory[
195
196
  for (const day of dayDirs) {
196
197
  const dayPath = path.join(factsDir, day);
197
198
  const dayFiles = (await readdir(dayPath))
198
- .filter((f: string) => f.startsWith("correction-") && f.endsWith(".md"))
199
+ .filter((f: string) => !isMacOsReplicationJunkBasename(f) && f.startsWith("correction-") && f.endsWith(".md"))
199
200
  .map((f: string) => path.join(dayPath, f));
200
201
  files.push(...dayFiles);
201
202
  }
@@ -207,7 +208,7 @@ async function readCorrectionsImpl(memoryDir: string): Promise<CorrectionMemory[
207
208
  try {
208
209
  const { readdir } = await import("node:fs/promises");
209
210
  const corrFiles = (await readdir(correctionsDir))
210
- .filter((f: string) => f.endsWith(".md"))
211
+ .filter((f: string) => !isMacOsReplicationJunkBasename(f) && f.endsWith(".md"))
211
212
  .map((f: string) => path.join(correctionsDir, f));
212
213
  files.push(...corrFiles);
213
214
  } catch {
package/src/cli.ts CHANGED
@@ -13,6 +13,7 @@ import { ThreadingManager } from "./threading.js";
13
13
  import { bumpMemoryCorpusVersionForDir } from "./memory-corpus-version.js";
14
14
  import { utcDayRange } from "./transcript.js";
15
15
  import { padEndDisplay, truncateGraphemeSafe } from "./whitespace.js";
16
+ import { isMacOsReplicationJunkBasename } from "./utils/macos-replication-junk.js";
16
17
  import { runWearablesCliCommand } from "./wearables/cli.js";
17
18
  import { registerMeetingsCommands } from "./cli/meetings-commands.js"; import { registerDeepRecallCommands } from "./cli/deep-recall-commands.js"; import { registerRecallNavigationCommands } from "./cli/recall-navigation-commands.js"; import { registerMemoryBrowseCommands } from "./cli/memory-browse-commands.js";
18
19
  import { registerExportOkfCommand, registerOkfCommands } from "./cli/okf-commands.js";
@@ -3334,7 +3335,6 @@ export async function resolveMemoryDirForNamespace(
3334
3335
  }
3335
3336
  return candidate;
3336
3337
  }
3337
-
3338
3338
  /**
3339
3339
  * Walk every recall category directory under `memoryDir` recursively and invoke
3340
3340
  * `visit` for every `*.md` file. The directory set is `RECALL_FALLBACK_DIRS`
@@ -3392,6 +3392,7 @@ async function walkMemoryMarkdownFiles(
3392
3392
  for (const entry of entries) {
3393
3393
  if (entry.isSymbolicLink()) continue; // never follow symlinked entries
3394
3394
  const entryName = typeof entry.name === "string" ? entry.name : entry.name.toString("utf-8");
3395
+ if (isMacOsReplicationJunkBasename(entryName)) continue;
3395
3396
  const fullPath = path.join(dir, entryName);
3396
3397
  try {
3397
3398
  assertPathInsideRoot(memoryRootReal, await realpath(fullPath), fullPath);
@@ -3412,7 +3413,6 @@ async function walkMemoryMarkdownFiles(
3412
3413
  await walk(root);
3413
3414
  }
3414
3415
  }
3415
-
3416
3416
  /**
3417
3417
  * List absolute paths of every `*.md` file under each recall category directory
3418
3418
  * of `memoryDir` (facts/, corrections/, decisions/, ...; see
@@ -30,6 +30,7 @@ import {
30
30
  // lock-step with the doctor scan.
31
31
  import { sidecarKey } from "./page-versioning.js";
32
32
  import { RECALL_FALLBACK_DIRS } from "./utils/category-dir.js";
33
+ import { isMacOsReplicationJunkBasename } from "./utils/macos-replication-junk.js";
33
34
 
34
35
  /**
35
36
  * Regex to spot a `derived_via: <value>` line in the raw YAML frontmatter
@@ -549,6 +550,7 @@ async function* walkMarkdownFiles(root: string, memoryDir: string): AsyncGenerat
549
550
  return;
550
551
  }
551
552
  for (const entry of entries) {
553
+ if (isMacOsReplicationJunkBasename(entry.name)) continue;
552
554
  const full = path.join(root, entry.name);
553
555
  if (entry.isSymbolicLink()) continue;
554
556
  if (entry.isDirectory()) {
@@ -26,6 +26,7 @@ import { readFile, readdir, unlink } from "node:fs/promises";
26
26
  import path from "node:path";
27
27
  import { throwIfAborted } from "../abort-error.js";
28
28
  import { writeFileAtomically } from "../maintenance/atomic-file.js";
29
+ import { isMacOsReplicationJunkBasename } from "../utils/macos-replication-junk.js";
29
30
  import { serializeMutations } from "../utils/serialize-mutations.js";
30
31
  import {
31
32
  CORRECTION_TEXT_MAX,
@@ -576,7 +577,7 @@ export class CorrectionPlanner {
576
577
  }
577
578
  const plans: CorrectionPlan[] = [];
578
579
  for (const f of files) {
579
- if (!f.endsWith(".json")) continue;
580
+ if (isMacOsReplicationJunkBasename(f) || !f.endsWith(".json")) continue;
580
581
  let plan: CorrectionPlan | null = null;
581
582
  try {
582
583
  plan = await this.loadPlan(namespace, f.replace(/\.json$/, ""));
@@ -702,7 +703,7 @@ export class CorrectionPlanner {
702
703
  }
703
704
  const recovered: string[] = [];
704
705
  for (const f of files) {
705
- if (!f.endsWith(".json")) continue;
706
+ if (isMacOsReplicationJunkBasename(f) || !f.endsWith(".json")) continue;
706
707
  const planId = f.replace(/\.json$/, "");
707
708
  let plan: CorrectionPlan | null;
708
709
  try {
package/src/json-store.ts CHANGED
@@ -14,6 +14,7 @@ import {
14
14
  } from "node:fs/promises";
15
15
  import path from "node:path";
16
16
  import { isErrnoCode } from "./utils/errno.js";
17
+ import { isMacOsReplicationJunkBasename } from "./utils/macos-replication-junk.js";
17
18
 
18
19
  async function listJsonFilesStrictInner(dir: string, allowMissingDirectory: boolean): Promise<string[]> {
19
20
  let entries: Dirent[];
@@ -25,6 +26,7 @@ async function listJsonFilesStrictInner(dir: string, allowMissingDirectory: bool
25
26
  }
26
27
  const out: string[] = [];
27
28
  for (const entry of entries) {
29
+ if (isMacOsReplicationJunkBasename(entry.name)) continue;
28
30
  const fullPath = path.join(dir, entry.name);
29
31
  if (entry.isDirectory()) {
30
32
  out.push(...(await listJsonFilesStrictInner(fullPath, false)));
@@ -55,6 +57,7 @@ export async function listNamedFiles(dir: string, fileName: string): Promise<str
55
57
  const entries = await readdir(dir, { withFileTypes: true });
56
58
  const out: string[] = [];
57
59
  for (const entry of entries) {
60
+ if (isMacOsReplicationJunkBasename(entry.name)) continue;
58
61
  const fullPath = path.join(dir, entry.name);
59
62
  if (entry.isDirectory()) {
60
63
  out.push(...(await listNamedFiles(fullPath, fileName)));
@@ -0,0 +1,275 @@
1
+ import assert from "node:assert/strict";
2
+ import { mkdir, mkdtemp, readFile, rm, utimes, writeFile } from "node:fs/promises";
3
+ import os from "node:os";
4
+ import path from "node:path";
5
+ import test from "node:test";
6
+
7
+ import { readCalibrationCorrections } from "./calibration.js";
8
+ import { CorrectionPlanner, type PlannerDeps } from "./correction/correction-planner.js";
9
+ import { listJsonFiles } from "./json-store.js";
10
+ import { parseConfig } from "./config.js";
11
+ import { ProfilingCollector } from "./profiling.js";
12
+ import { TranscriptManager } from "./transcript.js";
13
+ import { resolveDefaultNamespaceRoot } from "./namespaces/storage.js";
14
+ import { runDirectAgent } from "./retrieval-agents.js";
15
+ import { scanMemoryDir } from "./search/document-scanner.js";
16
+ import { StorageManager } from "./storage.js";
17
+ import { hasSupersessionAudit } from "./storage/supersession-audit.js";
18
+ import type { PluginConfig } from "./types.js";
19
+
20
+ const CORRECTION_BODY = [
21
+ "---",
22
+ "id: correction-sidecar",
23
+ "confidence: 0.9",
24
+ "---",
25
+ "Synthetic correction that must not be loaded from Finder metadata.",
26
+ ].join("\n");
27
+
28
+ test("scanMemoryDir ignores AppleDouble and .DS_Store index inputs", async () => {
29
+ const memoryDir = await mkdtemp(path.join(os.tmpdir(), "remnic-scan-macos-junk-"));
30
+ try {
31
+ const factsDir = path.join(memoryDir, "facts", "2026-02-22");
32
+ await mkdir(factsDir, { recursive: true });
33
+ await writeFile(
34
+ path.join(factsDir, "inside.md"),
35
+ ["---", "id: inside", "category: fact", "---", "A real fact."].join("\n"),
36
+ "utf8"
37
+ );
38
+ await writeFile(path.join(factsDir, "._inside.md"), Buffer.from([0, 5, 22]));
39
+ await writeFile(path.join(factsDir, ".DS_Store"), "finder");
40
+
41
+ const docs = await scanMemoryDir(memoryDir);
42
+ assert.deepEqual(
43
+ docs.map((doc) => doc.docid),
44
+ ["inside"]
45
+ );
46
+ } finally {
47
+ await rm(memoryDir, { recursive: true, force: true });
48
+ }
49
+ });
50
+
51
+ test("memory reads skip macOS replication junk beside real facts", async () => {
52
+ const memoryDir = await mkdtemp(path.join(os.tmpdir(), "remnic-memories-macos-junk-"));
53
+ try {
54
+ const storage = new StorageManager(memoryDir);
55
+ const written = await storage.writeMemory("fact", "Synthetic dome schedule is stored once.");
56
+ const factDir = path.dirname(written.memory.path);
57
+ await writeFile(path.join(factDir, "._inside.md"), CORRECTION_BODY, "utf8");
58
+ await writeFile(path.join(factDir, ".DS_Store"), "finder");
59
+
60
+ const memories = await storage.readAllMemories();
61
+ assert.deepEqual(
62
+ memories.map((memory) => memory.frontmatter.id),
63
+ [written.id]
64
+ );
65
+ } finally {
66
+ await rm(memoryDir, { recursive: true, force: true });
67
+ }
68
+ });
69
+
70
+ test("correction scans and calibration ignore macOS replication junk", async () => {
71
+ const memoryDir = await mkdtemp(path.join(os.tmpdir(), "remnic-corrections-macos-junk-"));
72
+ try {
73
+ const correctionsDir = path.join(memoryDir, "corrections");
74
+ await mkdir(correctionsDir, { recursive: true });
75
+ await writeFile(
76
+ path.join(correctionsDir, "correction-real.md"),
77
+ CORRECTION_BODY.replace("correction-sidecar", "correction-real"),
78
+ "utf8"
79
+ );
80
+ await writeFile(path.join(correctionsDir, "._sidecar.md"), CORRECTION_BODY, "utf8");
81
+ await writeFile(path.join(correctionsDir, ".DS_Store"), "finder");
82
+
83
+ const corrections = await readCalibrationCorrections(memoryDir);
84
+ assert.deepEqual(
85
+ corrections.map((correction) => correction.id),
86
+ ["correction-real"]
87
+ );
88
+
89
+ const reads: string[] = [];
90
+ const found = await hasSupersessionAudit(
91
+ {
92
+ correctionsDir,
93
+ async readMemoryByPath(filePath) {
94
+ reads.push(path.basename(filePath));
95
+ return null;
96
+ },
97
+ },
98
+ "old-id",
99
+ "new-id",
100
+ "audit body"
101
+ );
102
+ assert.equal(found, false);
103
+ assert.deepEqual(reads, ["correction-real.md"]);
104
+ } finally {
105
+ await rm(memoryDir, { recursive: true, force: true });
106
+ }
107
+ });
108
+
109
+ test("state JSON listings and pending correction plans ignore macOS replication junk", async () => {
110
+ const root = await mkdtemp(path.join(os.tmpdir(), "remnic-state-macos-junk-"));
111
+ try {
112
+ const stateDir = path.join(root, "state");
113
+ await mkdir(stateDir, { recursive: true });
114
+ await writeFile(path.join(stateDir, "real.json"), "{}\n");
115
+ await writeFile(path.join(stateDir, "._state.json"), "{}\n");
116
+ await writeFile(path.join(stateDir, ".DS_Store"), "finder");
117
+ const listed = (await listJsonFiles(stateDir)).map((file) => path.basename(file));
118
+ assert.deepEqual(listed, ["real.json"]);
119
+
120
+ const pendingDir = path.join(stateDir, "corrections", "pending");
121
+ await mkdir(pendingDir, { recursive: true });
122
+ await writeFile(path.join(pendingDir, "._plan.json"), "{}\n");
123
+ await writeFile(path.join(pendingDir, ".DS_Store"), "finder");
124
+ const planner = new CorrectionPlanner({
125
+ storageDir: async () => root,
126
+ } as unknown as PlannerDeps);
127
+ assert.deepEqual(await planner.listPending("default"), []);
128
+ } finally {
129
+ await rm(root, { recursive: true, force: true });
130
+ }
131
+ });
132
+
133
+ test("profiling prune keeps AppleDouble traces and deletes only real jsonl files", async () => {
134
+ const storageDir = await mkdtemp(path.join(os.tmpdir(), "remnic-profiling-macos-junk-"));
135
+ try {
136
+ const junk = path.join(storageDir, "._trace.jsonl");
137
+ const older = path.join(storageDir, "recall-old.jsonl");
138
+ const newer = path.join(storageDir, "recall-new.jsonl");
139
+ await writeFile(junk, "sidecar\n");
140
+ await writeFile(older, "old\n");
141
+ await writeFile(newer, "new\n");
142
+ const oldTime = new Date("2020-01-01T00:00:00Z");
143
+ const newTime = new Date("2024-01-01T00:00:00Z");
144
+ await utimes(older, oldTime, oldTime);
145
+ await utimes(newer, newTime, newTime);
146
+
147
+ const collector = new ProfilingCollector({ enabled: false, storageDir, maxTraces: 1 });
148
+ await collector.pruneFiles();
149
+
150
+ assert.equal(await readFile(junk, "utf8"), "sidecar\n");
151
+ assert.equal(await readFile(newer, "utf8"), "new\n");
152
+ await assert.rejects(() => readFile(older), { code: "ENOENT" });
153
+ } finally {
154
+ await rm(storageDir, { recursive: true, force: true });
155
+ }
156
+ });
157
+
158
+ test("direct entity recall ignores AppleDouble sidecars and malformed entities", async () => {
159
+ const memoryDir = await mkdtemp(path.join(os.tmpdir(), "remnic-direct-macos-junk-"));
160
+ try {
161
+ const entitiesDir = path.join(memoryDir, "entities");
162
+ await mkdir(entitiesDir, { recursive: true });
163
+ await writeFile(path.join(entitiesDir, "project-real.md"), "# Real\n**Type:** project\n");
164
+ await writeFile(path.join(entitiesDir, "project-real-gap.md"), "# \n**Type:** project\n");
165
+ await writeFile(path.join(entitiesDir, "project-real-tab.md"), "#\tTabbed\n**Type:** project\n");
166
+ await writeFile(path.join(entitiesDir, "._project-real.md"), Buffer.from([0, 5, 22]));
167
+ await writeFile(path.join(entitiesDir, ".DS_Store"), "finder");
168
+ const encrypted = Buffer.alloc(12);
169
+ Buffer.from("REMNIC-ENC").copy(encrypted);
170
+ await writeFile(path.join(entitiesDir, "project-real-locked.md"), encrypted);
171
+
172
+ const hits = await runDirectAgent("real", memoryDir);
173
+ assert.deepEqual(
174
+ hits.map((hit) => path.basename(hit.path)).sort(),
175
+ ["project-real-locked.md", "project-real.md"],
176
+ );
177
+ } finally {
178
+ await rm(memoryDir, { recursive: true, force: true });
179
+ }
180
+ });
181
+
182
+ test("transcript writes ignore AppleDouble jsonl sidecars", async () => {
183
+ const memoryDir = await mkdtemp(path.join(os.tmpdir(), "remnic-transcript-macos-junk-"));
184
+ try {
185
+ const transcript = new TranscriptManager(parseConfig({
186
+ memoryDir,
187
+ transcriptEnabled: true,
188
+ transcriptSkipChannelTypes: [],
189
+ }));
190
+ await transcript.initialize();
191
+ const sessionKey = "agent:main:desk";
192
+ const located = transcript.getTranscriptPath(sessionKey);
193
+ const channelDir = path.join(memoryDir, "transcripts", located.dir);
194
+ const toolDir = path.join(memoryDir, "state", "tool-usage", located.dir);
195
+ await mkdir(channelDir, { recursive: true });
196
+ await mkdir(toolDir, { recursive: true });
197
+ const sidecar = Buffer.from([0, 5, 22]);
198
+ await writeFile(path.join(channelDir, `._${located.file}`), sidecar);
199
+ await writeFile(path.join(toolDir, `._${located.file}`), sidecar);
200
+
201
+ await transcript.append({
202
+ timestamp: "2026-04-13T10:00:00.000Z",
203
+ role: "user",
204
+ content: "North Dome schedule",
205
+ sessionKey,
206
+ turnId: "turn-1",
207
+ });
208
+ await transcript.appendToolUse({
209
+ timestamp: "2026-04-13T10:00:01.000Z",
210
+ sessionKey,
211
+ tool: "lookup",
212
+ });
213
+
214
+ assert.match(await readFile(path.join(channelDir, located.file), "utf8"), /North Dome schedule/);
215
+ assert.match(await readFile(path.join(toolDir, located.file), "utf8"), /lookup/);
216
+ assert.deepEqual(await readFile(path.join(channelDir, `._${located.file}`)), sidecar);
217
+ await assert.rejects(
218
+ () => readFile(path.join(memoryDir, "transcripts", located.alternateDir, located.file)),
219
+ { code: "ENOENT" },
220
+ );
221
+ } finally {
222
+ await rm(memoryDir, { recursive: true, force: true });
223
+ }
224
+ });
225
+
226
+ test("archive and summary reads ignore macOS replication junk", async () => {
227
+ const dir = await mkdtemp(path.join(os.tmpdir(), "remnic-archive-macos-junk-"));
228
+ try {
229
+ const storage = new StorageManager(dir);
230
+ await storage.ensureDirectories();
231
+ const archive = path.join(dir, "archive");
232
+ await mkdir(archive, { recursive: true });
233
+ await writeFile(
234
+ path.join(archive, "archived-real.md"),
235
+ ["---", "id: archived-real", "category: fact", "---", "Kept."].join("\n"),
236
+ "utf8",
237
+ );
238
+ await writeFile(path.join(archive, "._archived-real.md"), "{not-a-memory");
239
+ await writeFile(path.join(archive, ".DS_Store"), "finder");
240
+ const archived = await storage.readArchivedMemories();
241
+ assert.deepEqual(archived.map((memory) => memory.frontmatter.id), ["archived-real"]);
242
+
243
+ const summaries = path.join(dir, "summaries");
244
+ await mkdir(summaries, { recursive: true });
245
+ await writeFile(path.join(summaries, "sum-real.json"), JSON.stringify({ id: "sum-real", text: "ok" }));
246
+ await writeFile(path.join(summaries, "._sum-real.json"), "{not-json");
247
+ const loaded = await storage.readSummaries();
248
+ assert.deepEqual(loaded.map((summary) => summary.id), ["sum-real"]);
249
+ } finally {
250
+ await rm(dir, { recursive: true, force: true });
251
+ }
252
+ });
253
+
254
+ test("namespace routing ignores macOS replication junk in the legacy root", async () => {
255
+ const memoryDir = await mkdtemp(path.join(os.tmpdir(), "remnic-ns-macos-junk-"));
256
+ try {
257
+ const config = {
258
+ memoryDir,
259
+ namespacesEnabled: true,
260
+ defaultNamespace: "default",
261
+ } as PluginConfig;
262
+ await mkdir(path.join(memoryDir, "namespaces", "default", "facts"), { recursive: true });
263
+ await mkdir(path.join(memoryDir, "entities"), { recursive: true });
264
+ await writeFile(path.join(memoryDir, "entities", ".DS_Store"), "finder");
265
+ await writeFile(path.join(memoryDir, "entities", "._sidecar.md"), Buffer.from([0, 5]));
266
+ assert.equal(
267
+ await resolveDefaultNamespaceRoot(config),
268
+ path.join(memoryDir, "namespaces", "default"),
269
+ );
270
+ await writeFile(path.join(memoryDir, "entities", "project-real.md"), "# Real\n");
271
+ assert.equal(await resolveDefaultNamespaceRoot(config), memoryDir);
272
+ } finally {
273
+ await rm(memoryDir, { recursive: true, force: true });
274
+ }
275
+ });
@@ -16,6 +16,7 @@ import path from "node:path";
16
16
  import { createReadStream, type ReadStream } from "node:fs";
17
17
  import { appendFile, lstat, mkdir, readdir, readFile } from "node:fs/promises";
18
18
  import { createInterface } from "node:readline";
19
+ import { isMacOsReplicationJunkBasename } from "../utils/macos-replication-junk.js";
19
20
 
20
21
  // ── Types ─────────────────────────────────────────────────────────────────────
21
22
 
@@ -553,6 +554,7 @@ async function listMemoryFiles(memoryDir: string): Promise<string[]> {
553
554
  }
554
555
  for (const entry of entries) {
555
556
  if (entry.isSymbolicLink()) continue;
557
+ if (isMacOsReplicationJunkBasename(entry.name)) continue;
556
558
  const full = path.join(dir, entry.name);
557
559
  if (entry.isDirectory()) {
558
560
  // Skip state/ and archive/ subdirs.
@@ -6,6 +6,7 @@ import type { MemoryFile, MemoryStatus } from "../types.js";
6
6
  import { RECALL_FALLBACK_DIRS } from "../utils/category-dir.js";
7
7
  import { bumpMemoryCorpusVersionForDir } from "../memory-corpus-version.js";
8
8
  import { assertPathInsideRoot } from "../utils/path-containment.js";
9
+ import { isMacOsReplicationJunkBasename } from "../utils/macos-replication-junk.js";
9
10
  import { requestEntityCanonicalIdReconcile } from "../storage/entity-canonical-id-references.js";
10
11
  import { excludeSupportPassportPrivateMemories } from "../support-passport/card-projection.js";
11
12
 
@@ -361,6 +362,7 @@ async function listMarkdownFiles(root: string, containmentRoot: string): Promise
361
362
  const entries = await readdir(dir, { withFileTypes: true });
362
363
  for (const entry of entries) {
363
364
  if (entry.isSymbolicLink()) continue; // never follow symlinked entries
365
+ if (isMacOsReplicationJunkBasename(entry.name)) continue;
364
366
  const fullPath = path.join(dir, entry.name);
365
367
  if (entry.isDirectory()) {
366
368
  await walk(fullPath);
@@ -6,6 +6,7 @@ import { StorageManager } from "../storage.js";
6
6
  import { keyring, secureStoreDir } from "../secure-store/index.js";
7
7
  import type { PluginConfig } from "../types.js";
8
8
  import { ALL_CATEGORY_DIRS } from "../utils/category-dir.js";
9
+ import { isMacOsReplicationJunkBasename } from "../utils/macos-replication-junk.js";
9
10
  import {
10
11
  namespaceIdentityLegacyToken,
11
12
  namespaceIdentityToken,
@@ -30,6 +31,7 @@ async function hasStoredEntries(p: string): Promise<boolean> {
30
31
  if (!entry.isDirectory()) return true;
31
32
  const children = await readdir(p, { withFileTypes: true });
32
33
  for (const child of children) {
34
+ if (isMacOsReplicationJunkBasename(child.name)) continue;
33
35
  const childPath = path.join(p, child.name);
34
36
  if (child.isSymbolicLink() || child.isFile()) return true;
35
37
  if (child.isDirectory() && (await hasStoredEntries(childPath))) return true;
@@ -0,0 +1,169 @@
1
+ import assert from "node:assert/strict";
2
+ import { createHash } from "node:crypto";
3
+ import { mkdir, mkdtemp, readFile, rm, writeFile } from "node:fs/promises";
4
+ import os from "node:os";
5
+ import path from "node:path";
6
+ import test from "node:test";
7
+
8
+ import {
9
+ OFFLINE_SYNC_CHANGESET_FORMAT,
10
+ OFFLINE_SYNC_SNAPSHOT_FORMAT,
11
+ applyOfflineSyncFileContentChunk,
12
+ applyOfflineSyncSnapshot,
13
+ buildOfflineSyncSnapshot,
14
+ buildOfflineSyncSnapshotForPaths,
15
+ buildOfflineSyncSnapshotFromBase,
16
+ normalizeOfflineSyncChangeset,
17
+ normalizeOfflineSyncSnapshot,
18
+ } from "./offline-sync.js";
19
+
20
+ async function write(root: string, relPath: string, content: string | Buffer): Promise<void> {
21
+ const filePath = path.join(root, relPath);
22
+ await mkdir(path.dirname(filePath), { recursive: true });
23
+ await writeFile(filePath, content);
24
+ }
25
+
26
+ test("offline sync omits macOS replication junk on snapshot, push, and pull", async () => {
27
+ const root = await mkdtemp(path.join(os.tmpdir(), "remnic-offline-macos-junk-"));
28
+ const dest = await mkdtemp(path.join(os.tmpdir(), "remnic-offline-macos-junk-dest-"));
29
+ try {
30
+ await write(root, "namespaces/lab/entities/project-real.md", "real entity");
31
+ await write(root, "namespaces/lab/entities/._sidecar.md", Buffer.from([0, 5, 22]));
32
+ await write(root, "namespaces/lab/.DS_Store", "finder");
33
+ await write(root, "entities/._root.md", Buffer.from([0, 5, 22]));
34
+ await write(root, ".DS_Store", "finder-root");
35
+ await write(root, "facts/._ignored/record.md", "nested junk");
36
+
37
+ const snapshot = await buildOfflineSyncSnapshot({
38
+ root,
39
+ sourceId: "remote",
40
+ includeContent: true,
41
+ });
42
+ assert.deepEqual(
43
+ snapshot.files.map((file) => file.path),
44
+ ["namespaces/lab/entities/project-real.md"]
45
+ );
46
+
47
+ const pullSide = await buildOfflineSyncSnapshotFromBase({
48
+ root,
49
+ sourceId: "local",
50
+ includeContent: false,
51
+ excludeNodeLocalState: false,
52
+ });
53
+ assert.deepEqual(
54
+ pullSide.files.map((file) => file.path),
55
+ ["namespaces/lab/entities/project-real.md"]
56
+ );
57
+
58
+ await assert.rejects(
59
+ () =>
60
+ buildOfflineSyncSnapshotForPaths({
61
+ root,
62
+ sourceId: "remote",
63
+ paths: ["namespaces/lab/entities/._sidecar.md"],
64
+ includeContent: true,
65
+ }),
66
+ /offline sync snapshot path is excluded/
67
+ );
68
+ await assert.rejects(
69
+ () =>
70
+ buildOfflineSyncSnapshotForPaths({
71
+ root,
72
+ sourceId: "remote",
73
+ paths: ["facts/._ignored/record.md"],
74
+ includeContent: true,
75
+ }),
76
+ /offline sync snapshot path is excluded/
77
+ );
78
+ await assert.rejects(
79
+ () =>
80
+ applyOfflineSyncFileContentChunk({
81
+ root: dest,
82
+ sourceId: "remote",
83
+ path: "namespaces/lab/.DS_Store",
84
+ sha256: createHash("sha256").update("finder").digest("hex"),
85
+ bytes: 6,
86
+ mtimeMs: 1,
87
+ content: Buffer.from("finder"),
88
+ }),
89
+ /offline sync file content path is excluded/
90
+ );
91
+
92
+ const real = snapshot.files[0];
93
+ const incoming = {
94
+ format: OFFLINE_SYNC_SNAPSHOT_FORMAT,
95
+ schemaVersion: 1 as const,
96
+ createdAt: snapshot.createdAt,
97
+ sourceId: "remote",
98
+ includeTranscripts: true,
99
+ files: [
100
+ real,
101
+ {
102
+ ...real,
103
+ path: "namespaces/lab/entities/._sidecar.md",
104
+ contentBase64: Buffer.from("sidecar").toString("base64"),
105
+ sha256: createHash("sha256").update("sidecar").digest("hex"),
106
+ bytes: Buffer.byteLength("sidecar"),
107
+ },
108
+ {
109
+ ...real,
110
+ path: "namespaces/other/.DS_Store",
111
+ contentBase64: Buffer.from("finder").toString("base64"),
112
+ sha256: createHash("sha256").update("finder").digest("hex"),
113
+ bytes: Buffer.byteLength("finder"),
114
+ },
115
+ {
116
+ ...real,
117
+ path: "facts/._ignored/record.md",
118
+ contentBase64: Buffer.from("nested junk").toString("base64"),
119
+ sha256: createHash("sha256").update("nested junk").digest("hex"),
120
+ bytes: Buffer.byteLength("nested junk"),
121
+ },
122
+ ],
123
+ deletions: [
124
+ { path: "facts/removed.md", mtimeMs: 2 },
125
+ { path: "entities/._root.md", mtimeMs: 1 },
126
+ { path: "facts/._ignored/record.md", mtimeMs: 3 },
127
+ ],
128
+ };
129
+ const normalized = normalizeOfflineSyncSnapshot(incoming);
130
+ assert.deepEqual(
131
+ normalized.files.map((file) => file.path),
132
+ ["namespaces/lab/entities/project-real.md"]
133
+ );
134
+ assert.deepEqual(normalized.deletions, [{ path: "facts/removed.md", mtimeMs: 2 }]);
135
+
136
+ const applied = await applyOfflineSyncSnapshot({ root: dest, snapshot: incoming });
137
+ assert.equal(applied.upserted, 1);
138
+ assert.equal(await readFile(path.join(dest, "namespaces/lab/entities/project-real.md"), "utf8"), "real entity");
139
+ await assert.rejects(() => readFile(path.join(dest, "namespaces/lab/entities/._sidecar.md")), { code: "ENOENT" });
140
+ await assert.rejects(() => readFile(path.join(dest, "namespaces/other/.DS_Store")), { code: "ENOENT" });
141
+ await assert.rejects(() => readFile(path.join(dest, "facts/._ignored/record.md")), { code: "ENOENT" });
142
+
143
+ const changeset = normalizeOfflineSyncChangeset({
144
+ format: OFFLINE_SYNC_CHANGESET_FORMAT,
145
+ schemaVersion: 1,
146
+ createdAt: snapshot.createdAt,
147
+ sourceId: "remote",
148
+ includeTranscripts: true,
149
+ changes: [
150
+ { type: "upsert", path: real.path, file: real },
151
+ {
152
+ type: "upsert",
153
+ path: "namespaces/lab/.DS_Store",
154
+ file: {
155
+ ...real,
156
+ path: "namespaces/lab/.DS_Store",
157
+ },
158
+ },
159
+ ],
160
+ });
161
+ assert.deepEqual(
162
+ changeset.changes.map((change) => change.path),
163
+ ["namespaces/lab/entities/project-real.md"]
164
+ );
165
+ } finally {
166
+ await rm(root, { recursive: true, force: true });
167
+ await rm(dest, { recursive: true, force: true });
168
+ }
169
+ });
@@ -26,6 +26,7 @@ import {
26
26
  import { parseFlexibleIsoTimestamp } from "./utils/iso-timestamp.js";
27
27
  import { EmbeddingIndexStorageError } from "./embedding-index-storage.js";
28
28
  import { isEmbeddingGenerationMarkerPath, matchesOfflineSyncDefaultExclude } from "./offline-sync-exclude-globs.js";
29
+ import { isMacOsReplicationJunkBasename } from "./utils/macos-replication-junk.js";
29
30
  import {
30
31
  applyIncomingEmbeddingGenerations,
31
32
  assertEmbeddingGenerationStillIncluded,
@@ -699,6 +700,7 @@ function shouldExcludeRelPath(relPosix: string, includeTranscripts: boolean): bo
699
700
  if (parts.some((part) => part === SYNC_INTERNAL_DIR)) return true;
700
701
  if (!includeTranscripts && parts[0] === "transcripts") return true;
701
702
  const basename = parts[parts.length - 1] ?? "";
703
+ if (parts.some((part) => isMacOsReplicationJunkBasename(part))) return true;
702
704
  if (isCanonicalRuntimeStatePath(parts) && basename.includes(".tmp-")) return true;
703
705
  if (EXCLUDED_FILE_NAMES.has(basename)) return true;
704
706
  if (EXCLUDED_FILE_PREFIXES.some((prefix) => basename.startsWith(prefix))) return true;
@@ -748,6 +750,11 @@ function shouldIgnoreIncomingRuntimePath(relPosix: string): boolean {
748
750
  if (isInternalRemnicStatePath(relPosix)) return true;
749
751
  const parts = relPosix.split("/");
750
752
  const basename = parts[parts.length - 1] ?? "";
753
+ // Drop Finder metadata before the structural-exclude throw. An older
754
+ // peer snapshot that still lists `._*` or `.DS_Store` — including a file
755
+ // nested under a junk directory — must not fail the whole pull; those
756
+ // paths are never written.
757
+ if (parts.some((part) => isMacOsReplicationJunkBasename(part))) return true;
751
758
  return isCanonicalRuntimeStatePath(parts) && basename.includes(".tmp-");
752
759
  }
753
760