@remnic/core 9.3.749 → 9.3.751

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 (271) hide show
  1. package/dist/access-boundary.d.ts +8 -8
  2. package/dist/access-boundary.js +15 -15
  3. package/dist/access-cli.js +39 -39
  4. package/dist/access-http.d.ts +8 -8
  5. package/dist/access-http.js +20 -20
  6. package/dist/access-mcp.d.ts +8 -8
  7. package/dist/access-mcp.js +19 -19
  8. package/dist/access-operations-batch.js +16 -16
  9. package/dist/access-operations.d.ts +8 -8
  10. package/dist/access-operations.js +18 -18
  11. package/dist/access-schema.d.ts +2 -2
  12. package/dist/access-schema.js +5 -5
  13. package/dist/{access-service-5-EVpt3v.d.ts → access-service-DmAEOJdJ.d.ts} +11 -3
  14. package/dist/access-service.d.ts +5 -5
  15. package/dist/access-service.js +14 -14
  16. package/dist/access-surface-catalog.d.ts +8 -8
  17. package/dist/action-confidence.d.ts +1 -1
  18. package/dist/active-memory-bridge.d.ts +1 -1
  19. package/dist/active-recall.d.ts +1 -1
  20. package/dist/active-recall.js +8 -1
  21. package/dist/active-recall.js.map +1 -1
  22. package/dist/behavior-learner.d.ts +1 -1
  23. package/dist/behavior-signals.d.ts +1 -1
  24. package/dist/bootstrap.d.ts +7 -7
  25. package/dist/briefing.d.ts +1 -1
  26. package/dist/briefing.js +7 -7
  27. package/dist/buffer-surprise-report.d.ts +1 -1
  28. package/dist/buffer.d.ts +1 -1
  29. package/dist/calibration.d.ts +1 -1
  30. package/dist/capabilities.d.ts +1 -1
  31. package/dist/{catalog-D_ZDxu8Y.d.ts → catalog-BpOcwHdE.d.ts} +1 -1
  32. package/dist/causal-behavior.d.ts +1 -1
  33. package/dist/causal-consolidation.d.ts +1 -1
  34. package/dist/causal-consolidation.js +8 -8
  35. package/dist/causal-trajectory-graph.d.ts +1 -1
  36. package/dist/{chunk-C5WN74HH.js → chunk-2HAG7JOI.js} +8 -2
  37. package/dist/chunk-2HAG7JOI.js.map +1 -0
  38. package/dist/{chunk-GKRLPHPU.js → chunk-2KK5WNQB.js} +2 -2
  39. package/dist/{chunk-JRDPT6DA.js → chunk-4NWIGAIC.js} +2 -2
  40. package/dist/{chunk-OBJUKYDO.js → chunk-4XL3CVII.js} +2 -2
  41. package/dist/{chunk-WWVXXSLF.js → chunk-5PZCDUJ6.js} +4 -4
  42. package/dist/{chunk-URQLO7BX.js → chunk-6FNZ3NMS.js} +2 -2
  43. package/dist/{chunk-DRUDC2UX.js → chunk-6MMONPHM.js} +2 -2
  44. package/dist/{chunk-RB6A7OUN.js → chunk-6SXNQFHB.js} +2 -2
  45. package/dist/{chunk-ZGZNLRKF.js → chunk-7TWA7DKP.js} +5 -5
  46. package/dist/{chunk-KMNYXLPL.js → chunk-B35L45HZ.js} +2 -2
  47. package/dist/{chunk-SIV3JZPP.js → chunk-CGZWGVQF.js} +5 -5
  48. package/dist/{chunk-CKFLLAIS.js → chunk-DANV2HTH.js} +3 -3
  49. package/dist/{chunk-NVYF5OB6.js → chunk-DBRVU5PR.js} +3 -3
  50. package/dist/{chunk-LMFS64GY.js → chunk-E4PFDD3N.js} +4 -4
  51. package/dist/{chunk-DIHCFJVV.js → chunk-HYI2GP3F.js} +4 -4
  52. package/dist/{chunk-UIKZZ242.js → chunk-IKHKHADN.js} +2 -2
  53. package/dist/{chunk-PUR2CKX2.js → chunk-JS2HKKOK.js} +1 -1
  54. package/dist/{chunk-PUR2CKX2.js.map → chunk-JS2HKKOK.js.map} +1 -1
  55. package/dist/{chunk-R2OAN6IP.js → chunk-K2JM4DZZ.js} +2 -2
  56. package/dist/{chunk-3IJGF6K2.js → chunk-K2R3DEEH.js} +2 -2
  57. package/dist/{chunk-HIHCB2S6.js → chunk-QRRBXD24.js} +2 -2
  58. package/dist/{chunk-PNUOQYRJ.js → chunk-RWZB6MAY.js} +1953 -2172
  59. package/dist/chunk-RWZB6MAY.js.map +1 -0
  60. package/dist/{chunk-ZPZ4VVLT.js → chunk-SD34EK4Z.js} +2 -2
  61. package/dist/{chunk-WK3NK6SP.js → chunk-SNEXVX3U.js} +6 -6
  62. package/dist/{chunk-FVZ2ISIX.js → chunk-TPLE6SNY.js} +7 -7
  63. package/dist/{chunk-24YDB5QP.js → chunk-UETBEHBA.js} +44 -24
  64. package/dist/chunk-UETBEHBA.js.map +1 -0
  65. package/dist/{chunk-5IN26V6W.js → chunk-UU32EAIY.js} +5 -5
  66. package/dist/{chunk-ZGAJB74V.js → chunk-W3BFT5OJ.js} +2 -2
  67. package/dist/{chunk-L4N7SVNN.js → chunk-WA7FECSG.js} +11 -11
  68. package/dist/{chunk-Q3X7GUAQ.js → chunk-WOX2UW4K.js} +2 -2
  69. package/dist/{chunk-XTEWVF3C.js → chunk-WWSXVOGY.js} +2 -2
  70. package/dist/{chunk-PWWWLD7D.js → chunk-X64YLC24.js} +153 -27
  71. package/dist/chunk-X64YLC24.js.map +1 -0
  72. package/dist/{chunk-P4FW3ZU5.js → chunk-YGGXUNS4.js} +20 -20
  73. package/dist/{chunk-JHQUIH3W.js → chunk-ZBVQ4ZM4.js} +19 -19
  74. package/dist/{cli-DuWWjaKT.d.ts → cli-lmf5RGyQ.d.ts} +3 -3
  75. package/dist/cli.d.ts +9 -9
  76. package/dist/cli.js +33 -33
  77. package/dist/compounding/engine.d.ts +1 -1
  78. package/dist/compounding/engine.js +7 -7
  79. package/dist/compounding/preference-consolidator.d.ts +1 -1
  80. package/dist/compression-optimizer.d.ts +1 -1
  81. package/dist/config.d.ts +1 -1
  82. package/dist/config.js +8 -1
  83. package/dist/connectors/codex-materialize-runner.d.ts +1 -1
  84. package/dist/connectors/codex-materialize-runner.js +7 -7
  85. package/dist/connectors/codex-materialize.d.ts +1 -1
  86. package/dist/connectors/index.d.ts +1 -1
  87. package/dist/connectors/index.js +7 -7
  88. package/dist/consolidation-provenance-check.d.ts +1 -1
  89. package/dist/consolidation-undo.d.ts +1 -1
  90. package/dist/contradiction/index.d.ts +1 -1
  91. package/dist/conversation-index/backend.d.ts +1 -1
  92. package/dist/conversation-index/chunker.d.ts +1 -1
  93. package/dist/conversation-index/faiss-adapter.d.ts +1 -1
  94. package/dist/conversation-index/indexer.d.ts +1 -1
  95. package/dist/conversation-index/search.d.ts +1 -1
  96. package/dist/day-summary.d.ts +1 -1
  97. package/dist/delinearize.d.ts +1 -1
  98. package/dist/direct-answer-wiring.d.ts +1 -1
  99. package/dist/direct-answer.d.ts +1 -1
  100. package/dist/embedding-fallback.d.ts +1 -1
  101. package/dist/enrichment/index.d.ts +1 -1
  102. package/dist/entity-retrieval.d.ts +1 -1
  103. package/dist/entity-retrieval.js +7 -7
  104. package/dist/entity-schema.d.ts +1 -1
  105. package/dist/explicit-capture.d.ts +7 -7
  106. package/dist/extraction-faithfulness.d.ts +1 -1
  107. package/dist/extraction-judge-telemetry.d.ts +1 -1
  108. package/dist/extraction-judge-training.d.ts +1 -1
  109. package/dist/extraction-judge.d.ts +1 -1
  110. package/dist/extraction.d.ts +1 -1
  111. package/dist/fallback-llm.d.ts +1 -1
  112. package/dist/graph-dashboard-diff.d.ts +1 -1
  113. package/dist/graph-dashboard-key.d.ts +1 -1
  114. package/dist/graph-dashboard-parser.d.ts +1 -1
  115. package/dist/graph-edge-reinforcement.d.ts +1 -1
  116. package/dist/graph-snapshot.d.ts +1 -1
  117. package/dist/graph.d.ts +1 -1
  118. package/dist/identity-continuity.d.ts +1 -1
  119. package/dist/importance.d.ts +1 -1
  120. package/dist/index.d.ts +10 -10
  121. package/dist/index.js +76 -72
  122. package/dist/intent.d.ts +1 -1
  123. package/dist/lcm/engine.d.ts +1 -1
  124. package/dist/lcm/index.d.ts +1 -1
  125. package/dist/lcm/tools.d.ts +1 -1
  126. package/dist/lifecycle.d.ts +1 -1
  127. package/dist/live-connectors-runner.d.ts +1 -1
  128. package/dist/local-llm.d.ts +1 -1
  129. package/dist/local-model-endpoint.d.ts +1 -1
  130. package/dist/maintenance/memory-governance.d.ts +1 -1
  131. package/dist/maintenance/memory-governance.js +7 -7
  132. package/dist/maintenance/rebuild-memory-lifecycle-ledger.js +7 -7
  133. package/dist/maintenance/rebuild-memory-projection.js +8 -8
  134. package/dist/mcp-memory-inspector-app.d.ts +5 -5
  135. package/dist/memory-action-policy.d.ts +1 -1
  136. package/dist/memory-cache.d.ts +1 -1
  137. package/dist/memory-lifecycle-ledger-utils.d.ts +1 -1
  138. package/dist/memory-projection-store.d.ts +1 -1
  139. package/dist/memory-provenance.d.ts +1 -1
  140. package/dist/memory-worth-outcomes.d.ts +1 -1
  141. package/dist/models-json.d.ts +1 -1
  142. package/dist/namespaces/migrate.d.ts +2 -2
  143. package/dist/namespaces/migrate.js +8 -8
  144. package/dist/namespaces/principal.d.ts +1 -1
  145. package/dist/namespaces/search.d.ts +1 -1
  146. package/dist/namespaces/search.js +1 -1
  147. package/dist/namespaces/storage.d.ts +2 -2
  148. package/dist/namespaces/storage.js +7 -7
  149. package/dist/native-knowledge.d.ts +1 -1
  150. package/dist/offline-sync.d.ts +108 -1
  151. package/dist/offline-sync.js +7 -1
  152. package/dist/operator-toolkit.d.ts +1 -1
  153. package/dist/operator-toolkit.js +15 -12
  154. package/dist/orchestration/compression-guideline-coordinator.d.ts +1 -1
  155. package/dist/orchestration/maintenance.d.ts +2 -2
  156. package/dist/orchestration/maintenance.js +9 -9
  157. package/dist/{orchestrator-CZI6hO_R.d.ts → orchestrator-D7bb8ZGp.d.ts} +193 -201
  158. package/dist/orchestrator.d.ts +5 -5
  159. package/dist/orchestrator.js +51 -41
  160. package/dist/patterns-cli.d.ts +1 -1
  161. package/dist/policy-runtime.d.ts +1 -1
  162. package/dist/provenance.d.ts +1 -1
  163. package/dist/qmd-recall-cache.d.ts +1 -1
  164. package/dist/qmd.d.ts +1 -1
  165. package/dist/recall-disclosure-escalation.d.ts +1 -1
  166. package/dist/recall-explain-renderer.d.ts +1 -1
  167. package/dist/recall-explain-renderer.js +3 -3
  168. package/dist/recall-planner-llm.d.ts +1 -1
  169. package/dist/recall-state.d.ts +1 -1
  170. package/dist/recall-tag-filter.d.ts +1 -1
  171. package/dist/recall-xray-cli.d.ts +1 -1
  172. package/dist/recall-xray-cli.js +4 -4
  173. package/dist/recall-xray-renderer.d.ts +1 -1
  174. package/dist/recall-xray-renderer.js +3 -3
  175. package/dist/recall-xray.d.ts +1 -1
  176. package/dist/recall-xray.js +2 -2
  177. package/dist/resolve-auth-token.d.ts +1 -1
  178. package/dist/resume-bundles.js +9 -2
  179. package/dist/retrieval-agents.d.ts +1 -1
  180. package/dist/retrieval-tiers.d.ts +1 -1
  181. package/dist/routing/engine.d.ts +1 -1
  182. package/dist/routing/store.d.ts +1 -1
  183. package/dist/schemas.d.ts +22 -22
  184. package/dist/search/embed-helper.d.ts +1 -1
  185. package/dist/search/factory.d.ts +1 -1
  186. package/dist/search/factory.js +1 -1
  187. package/dist/search/index.d.ts +1 -1
  188. package/dist/search/index.js +1 -1
  189. package/dist/search/lancedb-backend.d.ts +1 -1
  190. package/dist/search/lancedb-backend.js +1 -1
  191. package/dist/search/meilisearch-backend.d.ts +1 -1
  192. package/dist/search/meilisearch-backend.js +1 -1
  193. package/dist/search/noop-backend.d.ts +1 -1
  194. package/dist/search/orama-backend.d.ts +1 -1
  195. package/dist/search/orama-backend.js +1 -1
  196. package/dist/search/port.d.ts +1 -1
  197. package/dist/search/remote-backend.d.ts +1 -1
  198. package/dist/{semantic-consolidation-D3aSiu9t.d.ts → semantic-consolidation-CTfbVwCA.d.ts} +1 -1
  199. package/dist/semantic-consolidation.d.ts +2 -2
  200. package/dist/semantic-consolidation.js +8 -8
  201. package/dist/semantic-rule-promotion.js +7 -7
  202. package/dist/semantic-rule-verifier.d.ts +1 -1
  203. package/dist/semantic-rule-verifier.js +7 -7
  204. package/dist/session-observer-bands.d.ts +1 -1
  205. package/dist/session-observer-state.d.ts +1 -1
  206. package/dist/shared-context/manager.d.ts +1 -1
  207. package/dist/signal.d.ts +1 -1
  208. package/dist/storage.d.ts +1 -1
  209. package/dist/storage.js +6 -6
  210. package/dist/summarizer.d.ts +1 -1
  211. package/dist/summary-snapshot.d.ts +1 -1
  212. package/dist/temporal-supersession.d.ts +1 -1
  213. package/dist/temporal-validity.d.ts +1 -1
  214. package/dist/threading.d.ts +1 -1
  215. package/dist/tier-migration.d.ts +1 -1
  216. package/dist/tier-routing.d.ts +1 -1
  217. package/dist/topics.d.ts +1 -1
  218. package/dist/transcript.d.ts +1 -1
  219. package/dist/transfer/types.d.ts +12 -12
  220. package/dist/trust-score-stage.d.ts +1 -1
  221. package/dist/trust-score.d.ts +1 -1
  222. package/dist/{types-CZm6rx9-.d.ts → types-D4NYDtXI.d.ts} +7 -0
  223. package/dist/types.d.ts +1 -1
  224. package/dist/types.js +1 -1
  225. package/dist/utility-runtime.d.ts +1 -1
  226. package/dist/verified-recall.js +7 -7
  227. package/package.json +2 -2
  228. package/src/access-service.ts +22 -0
  229. package/src/config.ts +5 -0
  230. package/src/index.ts +3 -1
  231. package/src/offline-sync.test.ts +354 -52
  232. package/src/offline-sync.ts +332 -24
  233. package/src/orchestration/extraction-run.ts +4 -34
  234. package/src/orchestration/namespace-read-fanout.ts +484 -0
  235. package/src/orchestration/orchestrator-helpers.ts +1130 -0
  236. package/src/orchestration/self-deps.ts +50 -0
  237. package/src/orchestration/workspace-ops.ts +789 -0
  238. package/src/orchestrator.ts +177 -2296
  239. package/src/types.ts +9 -0
  240. package/dist/chunk-24YDB5QP.js.map +0 -1
  241. package/dist/chunk-C5WN74HH.js.map +0 -1
  242. package/dist/chunk-PNUOQYRJ.js.map +0 -1
  243. package/dist/chunk-PWWWLD7D.js.map +0 -1
  244. /package/dist/{chunk-GKRLPHPU.js.map → chunk-2KK5WNQB.js.map} +0 -0
  245. /package/dist/{chunk-JRDPT6DA.js.map → chunk-4NWIGAIC.js.map} +0 -0
  246. /package/dist/{chunk-OBJUKYDO.js.map → chunk-4XL3CVII.js.map} +0 -0
  247. /package/dist/{chunk-WWVXXSLF.js.map → chunk-5PZCDUJ6.js.map} +0 -0
  248. /package/dist/{chunk-URQLO7BX.js.map → chunk-6FNZ3NMS.js.map} +0 -0
  249. /package/dist/{chunk-DRUDC2UX.js.map → chunk-6MMONPHM.js.map} +0 -0
  250. /package/dist/{chunk-RB6A7OUN.js.map → chunk-6SXNQFHB.js.map} +0 -0
  251. /package/dist/{chunk-ZGZNLRKF.js.map → chunk-7TWA7DKP.js.map} +0 -0
  252. /package/dist/{chunk-KMNYXLPL.js.map → chunk-B35L45HZ.js.map} +0 -0
  253. /package/dist/{chunk-SIV3JZPP.js.map → chunk-CGZWGVQF.js.map} +0 -0
  254. /package/dist/{chunk-CKFLLAIS.js.map → chunk-DANV2HTH.js.map} +0 -0
  255. /package/dist/{chunk-NVYF5OB6.js.map → chunk-DBRVU5PR.js.map} +0 -0
  256. /package/dist/{chunk-LMFS64GY.js.map → chunk-E4PFDD3N.js.map} +0 -0
  257. /package/dist/{chunk-DIHCFJVV.js.map → chunk-HYI2GP3F.js.map} +0 -0
  258. /package/dist/{chunk-UIKZZ242.js.map → chunk-IKHKHADN.js.map} +0 -0
  259. /package/dist/{chunk-R2OAN6IP.js.map → chunk-K2JM4DZZ.js.map} +0 -0
  260. /package/dist/{chunk-3IJGF6K2.js.map → chunk-K2R3DEEH.js.map} +0 -0
  261. /package/dist/{chunk-HIHCB2S6.js.map → chunk-QRRBXD24.js.map} +0 -0
  262. /package/dist/{chunk-ZPZ4VVLT.js.map → chunk-SD34EK4Z.js.map} +0 -0
  263. /package/dist/{chunk-WK3NK6SP.js.map → chunk-SNEXVX3U.js.map} +0 -0
  264. /package/dist/{chunk-FVZ2ISIX.js.map → chunk-TPLE6SNY.js.map} +0 -0
  265. /package/dist/{chunk-5IN26V6W.js.map → chunk-UU32EAIY.js.map} +0 -0
  266. /package/dist/{chunk-ZGAJB74V.js.map → chunk-W3BFT5OJ.js.map} +0 -0
  267. /package/dist/{chunk-L4N7SVNN.js.map → chunk-WA7FECSG.js.map} +0 -0
  268. /package/dist/{chunk-Q3X7GUAQ.js.map → chunk-WOX2UW4K.js.map} +0 -0
  269. /package/dist/{chunk-XTEWVF3C.js.map → chunk-WWSXVOGY.js.map} +0 -0
  270. /package/dist/{chunk-P4FW3ZU5.js.map → chunk-YGGXUNS4.js.map} +0 -0
  271. /package/dist/{chunk-JHQUIH3W.js.map → chunk-ZBVQ4ZM4.js.map} +0 -0
@@ -4,19 +4,19 @@ import {
4
4
  } from "./chunk-ZFXCQPNO.js";
5
5
  import {
6
6
  StorageManager
7
- } from "./chunk-JHQUIH3W.js";
7
+ } from "./chunk-ZBVQ4ZM4.js";
8
8
  import {
9
9
  MutationSerializer
10
10
  } from "./chunk-LTJAMRGI.js";
11
- import {
12
- ALL_CATEGORY_DIRS
13
- } from "./chunk-VS2IYZRU.js";
14
11
  import {
15
12
  isSafeRouteNamespace
16
13
  } from "./chunk-U3PN77QT.js";
17
14
  import {
18
15
  resolveNamespaceCapabilities
19
16
  } from "./chunk-VSF7AAGE.js";
17
+ import {
18
+ ALL_CATEGORY_DIRS
19
+ } from "./chunk-VS2IYZRU.js";
20
20
 
21
21
  // src/namespaces/storage.ts
22
22
  import path from "path";
@@ -339,4 +339,4 @@ export {
339
339
  resolveNamespaceStorageRoot,
340
340
  NamespaceStorageRouter
341
341
  };
342
- //# sourceMappingURL=chunk-5IN26V6W.js.map
342
+ //# sourceMappingURL=chunk-UU32EAIY.js.map
@@ -4,7 +4,7 @@ import {
4
4
  } from "./chunk-ZBJMUXZH.js";
5
5
  import {
6
6
  StorageManager
7
- } from "./chunk-JHQUIH3W.js";
7
+ } from "./chunk-ZBVQ4ZM4.js";
8
8
  import {
9
9
  getCachedRuleMemories,
10
10
  setCachedRuleMemories
@@ -117,4 +117,4 @@ export {
117
117
  compareVerifiedSemanticRuleResults,
118
118
  searchVerifiedSemanticRules
119
119
  };
120
- //# sourceMappingURL=chunk-ZGAJB74V.js.map
120
+ //# sourceMappingURL=chunk-W3BFT5OJ.js.map
@@ -11,17 +11,17 @@ import {
11
11
  processChatMessage,
12
12
  sessionBelongsToPrincipal,
13
13
  subscribeChatTranscript
14
- } from "./chunk-LMFS64GY.js";
14
+ } from "./chunk-E4PFDD3N.js";
15
15
  import {
16
16
  validateRequest
17
- } from "./chunk-FVZ2ISIX.js";
17
+ } from "./chunk-TPLE6SNY.js";
18
18
  import {
19
19
  getOperation
20
- } from "./chunk-KMNYXLPL.js";
20
+ } from "./chunk-B35L45HZ.js";
21
21
  import {
22
22
  CorrectionContractError,
23
23
  EngramAccessInputError
24
- } from "./chunk-24YDB5QP.js";
24
+ } from "./chunk-UETBEHBA.js";
25
25
  import {
26
26
  isTrustZoneName
27
27
  } from "./chunk-JGSKJHF7.js";
@@ -33,18 +33,18 @@ import {
33
33
  } from "./chunk-DEUNUKTD.js";
34
34
  import {
35
35
  isRecallDisclosure
36
- } from "./chunk-PUR2CKX2.js";
37
- import {
38
- OFFLINE_SYNC_APPLY_MAX_BODY_BYTES,
39
- OFFLINE_SYNC_FILE_CONTENT_MAX_CHUNK_BYTES,
40
- OFFLINE_SYNC_SNAPSHOT_BASE_MAX_BODY_BYTES
41
- } from "./chunk-PWWWLD7D.js";
36
+ } from "./chunk-JS2HKKOK.js";
42
37
  import {
43
38
  expandTildePath
44
39
  } from "./chunk-EYIEWJNI.js";
45
40
  import {
46
41
  log
47
42
  } from "./chunk-NU3CSQ4H.js";
43
+ import {
44
+ OFFLINE_SYNC_APPLY_MAX_BODY_BYTES,
45
+ OFFLINE_SYNC_FILE_CONTENT_MAX_CHUNK_BYTES,
46
+ OFFLINE_SYNC_SNAPSHOT_BASE_MAX_BODY_BYTES
47
+ } from "./chunk-X64YLC24.js";
48
48
 
49
49
  // src/access-http.ts
50
50
  import { createServer } from "http";
@@ -2627,4 +2627,4 @@ function positiveIntQueryParam(value, label) {
2627
2627
  export {
2628
2628
  EngramAccessHttpServer
2629
2629
  };
2630
- //# sourceMappingURL=chunk-L4N7SVNN.js.map
2630
+ //# sourceMappingURL=chunk-WA7FECSG.js.map
@@ -6,7 +6,7 @@ import {
6
6
  } from "./chunk-SFQ6QNL7.js";
7
7
  import {
8
8
  StorageManager
9
- } from "./chunk-JHQUIH3W.js";
9
+ } from "./chunk-ZBVQ4ZM4.js";
10
10
  import {
11
11
  buildLifecycleEventsForMemory,
12
12
  sortMemoryLifecycleEvents
@@ -74,4 +74,4 @@ export {
74
74
  backupExistingLedger,
75
75
  rebuildMemoryLifecycleLedger
76
76
  };
77
- //# sourceMappingURL=chunk-Q3X7GUAQ.js.map
77
+ //# sourceMappingURL=chunk-WOX2UW4K.js.map
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  StorageManager
3
- } from "./chunk-JHQUIH3W.js";
3
+ } from "./chunk-ZBVQ4ZM4.js";
4
4
 
5
5
  // src/semantic-rule-promotion.ts
6
6
  import { createHash, randomUUID } from "crypto";
@@ -529,4 +529,4 @@ export {
529
529
  setSemanticRulePromotionTestHooks,
530
530
  promoteSemanticRuleFromMemory
531
531
  };
532
- //# sourceMappingURL=chunk-XTEWVF3C.js.map
532
+ //# sourceMappingURL=chunk-WWSXVOGY.js.map
@@ -51,6 +51,53 @@ var EXCLUDED_FILE_PREFIXES = [
51
51
  ".remnic-sync.",
52
52
  ".remnic-sync-state."
53
53
  ];
54
+ var DEFAULT_OFFLINE_SYNC_EXCLUDE_GLOBS = [
55
+ // Leading `**/` matches zero or more segments, so each pattern covers both
56
+ // the root `state/` dir AND per-namespace `namespaces/<ns>/state/` dirs
57
+ // (Cursor review on PR #1793: multi-namespace deployments previously kept
58
+ // pushing their namespaced live sqlite files).
59
+ "**/state/*.sqlite",
60
+ "**/state/*.sqlite-*",
61
+ "**/state/index_tags.json",
62
+ "**/state/entity-mention-index.json",
63
+ "**/state/memory-governance/runs/**"
64
+ ];
65
+ function globToRegExp(glob) {
66
+ if (typeof glob !== "string" || glob.length === 0) {
67
+ throw new Error("offlineSyncExcludes entry must be a non-empty string");
68
+ }
69
+ if (glob.includes("\0")) {
70
+ throw new Error("offlineSyncExcludes entry must not contain NUL bytes");
71
+ }
72
+ let source = "";
73
+ for (let i = 0; i < glob.length; i += 1) {
74
+ const ch = glob[i];
75
+ if (ch === "*") {
76
+ if (glob[i + 1] === "*") {
77
+ if (glob[i + 2] === "/") {
78
+ source += "(?:.*/)?";
79
+ i += 2;
80
+ continue;
81
+ }
82
+ source += ".*";
83
+ i += 1;
84
+ continue;
85
+ }
86
+ source += "[^/]*";
87
+ continue;
88
+ }
89
+ if (ch === "?") {
90
+ source += "[^/]";
91
+ continue;
92
+ }
93
+ if (ch === "/") {
94
+ source += "/";
95
+ continue;
96
+ }
97
+ source += ch.replace(/[\\^$.+()|{}\[\]]/g, "\\$&");
98
+ }
99
+ return new RegExp(`^${source}$`);
100
+ }
54
101
  function hashText(value) {
55
102
  return createHash("sha256").update(value).digest("hex");
56
103
  }
@@ -282,7 +329,49 @@ function shouldExcludeRelPath(relPosix, includeTranscripts) {
282
329
  const basename = parts[parts.length - 1] ?? "";
283
330
  if (isCanonicalRuntimeStatePath(parts) && basename.includes(".tmp-")) return true;
284
331
  if (EXCLUDED_FILE_NAMES.has(basename)) return true;
285
- return EXCLUDED_FILE_PREFIXES.some((prefix) => basename.startsWith(prefix));
332
+ if (EXCLUDED_FILE_PREFIXES.some((prefix) => basename.startsWith(prefix))) return true;
333
+ return false;
334
+ }
335
+ function shouldExcludePushRelPath(relPosix, includeTranscripts, userExcludeRegexps) {
336
+ if (shouldExcludeRelPath(relPosix, includeTranscripts)) return true;
337
+ if (matchesOfflineSyncDefaultExclude(relPosix)) return true;
338
+ if (userExcludeRegexps && userExcludeRegexps.some((re) => re.test(relPosix))) return true;
339
+ return false;
340
+ }
341
+ var DEFAULT_OFFLINE_SYNC_EXCLUDE_REGEXPS = DEFAULT_OFFLINE_SYNC_EXCLUDE_GLOBS.map((glob) => globToRegExp(glob));
342
+ function matchesOfflineSyncDefaultExclude(relPosix) {
343
+ for (const regexp of DEFAULT_OFFLINE_SYNC_EXCLUDE_REGEXPS) {
344
+ if (regexp.test(relPosix)) return true;
345
+ }
346
+ return false;
347
+ }
348
+ function compileOfflineSyncExcludeGlobs(globs) {
349
+ const out = [];
350
+ for (const entry of globs) {
351
+ if (typeof entry !== "string" || entry.length === 0) {
352
+ throw new Error("offlineSyncExcludes must contain only non-empty strings");
353
+ }
354
+ out.push(globToRegExp(entry));
355
+ }
356
+ return out;
357
+ }
358
+ function parseOfflineSyncExcludes(raw) {
359
+ if (raw === void 0 || raw === null) return [];
360
+ if (!Array.isArray(raw)) {
361
+ throw new Error(
362
+ `offlineSyncExcludes must be an array of non-empty glob strings; got ${typeof raw}`
363
+ );
364
+ }
365
+ for (const entry of raw) {
366
+ if (typeof entry !== "string" || entry.trim().length === 0) {
367
+ throw new Error(
368
+ "offlineSyncExcludes must contain only non-empty glob strings"
369
+ );
370
+ }
371
+ }
372
+ const globs = raw.map((entry) => entry.trim());
373
+ compileOfflineSyncExcludeGlobs(globs);
374
+ return globs;
286
375
  }
287
376
  function shouldIgnoreIncomingRuntimePath(relPosix) {
288
377
  const parts = relPosix.split("/");
@@ -412,10 +501,9 @@ async function* iterateOfflineSyncSnapshotFileRecords(options) {
412
501
  let entries = await readdir(dirAbs, { withFileTypes: true });
413
502
  entries = entries.sort((left, right) => left.name.localeCompare(right.name));
414
503
  for (const entry of entries) {
415
- throwIfOfflineSyncAborted(options.signal);
416
504
  const abs = path.join(dirAbs, entry.name);
417
505
  const relPosix = path.relative(root.abs, abs).split(path.sep).join("/");
418
- if (shouldExcludeRelPath(relPosix, includeTranscripts)) continue;
506
+ if (options.excludeNodeLocalState === false ? shouldExcludeRelPath(relPosix, includeTranscripts) : shouldExcludePushRelPath(relPosix, includeTranscripts, options.userExcludeRegexps)) continue;
419
507
  if (entry.isSymbolicLink()) continue;
420
508
  if (entry.isDirectory()) {
421
509
  yield* walk(abs);
@@ -470,7 +558,7 @@ async function buildOfflineSyncSnapshotFromBase(options) {
470
558
  throwIfOfflineSyncAborted(options.signal);
471
559
  const abs = path.join(dirAbs, entry.name);
472
560
  const relPosix = path.relative(root.abs, abs).split(path.sep).join("/");
473
- if (shouldExcludeRelPath(relPosix, includeTranscripts)) continue;
561
+ if (options.excludeNodeLocalState === false ? shouldExcludeRelPath(relPosix, includeTranscripts) : shouldExcludePushRelPath(relPosix, includeTranscripts, options.userExcludeRegexps)) continue;
474
562
  if (entry.isSymbolicLink()) continue;
475
563
  if (entry.isDirectory()) {
476
564
  await walk(abs);
@@ -517,7 +605,7 @@ async function buildOfflineSyncSnapshotForPaths(options) {
517
605
  const relPath = normalizeRelativePath(rawPath, "paths[]");
518
606
  if (seen.has(relPath)) continue;
519
607
  seen.add(relPath);
520
- if (shouldExcludeRelPath(relPath, includeTranscripts)) {
608
+ if (options.excludeNodeLocalState === false ? shouldExcludeRelPath(relPath, includeTranscripts) : shouldExcludePushRelPath(relPath, includeTranscripts, options.userExcludeRegexps)) {
521
609
  throw new Error(`offline sync snapshot path is excluded: ${relPath}`);
522
610
  }
523
611
  const filePath = await resolveSafeArchiveTarget(root, relPath);
@@ -551,7 +639,7 @@ async function readOfflineSyncFileContentChunk(options) {
551
639
  const root = await prepareSafeArchiveRoot(rootAbs, "readOfflineSyncFileContentChunk", "root");
552
640
  const includeTranscripts = options.includeTranscripts !== false;
553
641
  const relPath = normalizeRelativePath(options.path, "path");
554
- if (shouldExcludeRelPath(relPath, includeTranscripts)) {
642
+ if (options.excludeNodeLocalState === false ? shouldExcludeRelPath(relPath, includeTranscripts) : shouldExcludePushRelPath(relPath, includeTranscripts, options.userExcludeRegexps)) {
555
643
  throw new Error(`offline sync file content path is excluded: ${relPath}`);
556
644
  }
557
645
  const offset = options.offset === void 0 ? 0 : assertNonNegativeInteger(options.offset, "offset");
@@ -619,6 +707,7 @@ async function buildOfflineSyncChangeset(options) {
619
707
  includeContent: false,
620
708
  includeTranscripts,
621
709
  now: options.now,
710
+ userExcludeRegexps: options.userExcludeRegexps,
622
711
  readFile: options.readFile,
623
712
  readFileDigest: options.readFileDigest
624
713
  });
@@ -630,6 +719,7 @@ async function buildOfflineSyncChangeset(options) {
630
719
  excludePaths: options.excludePaths,
631
720
  includeTranscripts,
632
721
  now: options.now,
722
+ userExcludeRegexps: options.userExcludeRegexps,
633
723
  readFile: options.readFile
634
724
  });
635
725
  }
@@ -649,6 +739,7 @@ async function buildOfflineSyncChangesetFromSnapshot(options) {
649
739
  const changes = [];
650
740
  for (const relPath of unionPaths(base, currentMap)) {
651
741
  if (excludedPaths.has(relPath)) continue;
742
+ if (shouldExcludePushRelPath(relPath, includeTranscripts, options.userExcludeRegexps)) continue;
652
743
  if (shouldPreferIncomingOfflineRuntimeFile(relPath)) continue;
653
744
  const baseEntry = base.get(relPath);
654
745
  const currentEntry = currentMap.get(relPath);
@@ -660,6 +751,7 @@ async function buildOfflineSyncChangesetFromSnapshot(options) {
660
751
  includeContent: true,
661
752
  includeTranscripts,
662
753
  now: options.now,
754
+ userExcludeRegexps: options.userExcludeRegexps,
663
755
  readFile: options.readFile
664
756
  });
665
757
  const record = file.files[0];
@@ -710,13 +802,15 @@ async function summarizeOfflineSyncPendingChanges(options) {
710
802
  includeContent: false,
711
803
  includeTranscripts,
712
804
  now: options.now,
805
+ userExcludeRegexps: options.userExcludeRegexps,
713
806
  readFile: options.readFile,
714
807
  readFileDigest: options.readFileDigest
715
808
  });
716
809
  return summarizeOfflineSyncPendingFiles({
717
810
  baseFiles: options.baseFiles,
718
811
  currentFiles: current.files,
719
- includeTranscripts
812
+ includeTranscripts,
813
+ userExcludeRegexps: options.userExcludeRegexps
720
814
  });
721
815
  }
722
816
  function summarizeOfflineSyncPendingFiles(options) {
@@ -733,6 +827,7 @@ function summarizeOfflineSyncPendingFiles(options) {
733
827
  let deletes = 0;
734
828
  for (const relPath of unionPaths(base, currentMap)) {
735
829
  if (shouldPreferIncomingOfflineRuntimeFile(relPath)) continue;
830
+ if (shouldExcludePushRelPath(relPath, includeTranscripts, options.userExcludeRegexps)) continue;
736
831
  const baseEntry = base.get(relPath);
737
832
  const currentEntry = currentMap.get(relPath);
738
833
  if (currentEntry && currentEntry.sha256 !== baseEntry?.sha256) {
@@ -766,7 +861,8 @@ async function applyOfflineSyncSnapshot(options) {
766
861
  includeContent: false,
767
862
  includeTranscripts: snapshot.includeTranscripts,
768
863
  readFile: options.readFile,
769
- readFileDigest: options.readFileDigest
864
+ readFileDigest: options.readFileDigest,
865
+ excludeNodeLocalState: false
770
866
  })).files;
771
867
  const currentMap = byPath(currentFiles);
772
868
  const deferredPaths = new Set(options.deferredPaths ?? []);
@@ -869,6 +965,11 @@ async function applyOfflineSyncSnapshot(options) {
869
965
  if (base) nextBase.set(relPath, base);
870
966
  continue;
871
967
  }
968
+ if (matchesOfflineSyncDefaultExclude(relPath)) {
969
+ nextBase.delete(relPath);
970
+ skipped += 1;
971
+ continue;
972
+ }
872
973
  if (!currentEntry) {
873
974
  nextBase.delete(relPath);
874
975
  skipped += 1;
@@ -933,7 +1034,8 @@ async function applyOfflineSyncChangeset(options) {
933
1034
  includeContent: false,
934
1035
  includeTranscripts: changeset.includeTranscripts,
935
1036
  readFile: options.readFile,
936
- readFileDigest: options.readFileDigest
1037
+ readFileDigest: options.readFileDigest,
1038
+ excludeNodeLocalState: false
937
1039
  })).files;
938
1040
  const currentMap = byPath(currentFiles);
939
1041
  const conflicts = [];
@@ -1021,7 +1123,8 @@ async function applyOfflineSyncChangeset(options) {
1021
1123
  includeContent: false,
1022
1124
  includeTranscripts: changeset.includeTranscripts,
1023
1125
  readFile: options.readFile,
1024
- readFileDigest: options.readFileDigest
1126
+ readFileDigest: options.readFileDigest,
1127
+ excludeNodeLocalState: false
1025
1128
  })).files,
1026
1129
  ...options.returnCurrentFiles === false ? { currentFilesComplete: false } : {}
1027
1130
  };
@@ -1126,6 +1229,34 @@ async function setSafeFileMtime(root, relPath, mtimeMs) {
1126
1229
  await utimes(target, mtime, mtime);
1127
1230
  return true;
1128
1231
  }
1232
+ async function readLocalFileState(options) {
1233
+ const filePath = await resolveSafeArchiveTarget(
1234
+ await prepareSafeArchiveRoot(options.rootAbs, "readLocalFileState", "rootAbs"),
1235
+ options.relPath
1236
+ );
1237
+ const st = await lstat(filePath).catch((error) => {
1238
+ if (error.code === "ENOENT") return null;
1239
+ throw error;
1240
+ });
1241
+ if (!st || st.isSymbolicLink() || !st.isFile()) return null;
1242
+ throwIfOfflineSyncAborted(options.signal);
1243
+ let digest;
1244
+ if (options.readFileDigest) {
1245
+ digest = await options.readFileDigest({ root: options.rootAbs, path: options.relPath, filePath });
1246
+ } else if (options.readFile) {
1247
+ const content = await options.readFile({ root: options.rootAbs, path: options.relPath, filePath });
1248
+ digest = sha256Buffer(content);
1249
+ } else {
1250
+ digest = await sha256File(filePath, options.signal);
1251
+ }
1252
+ throwIfOfflineSyncAborted(options.signal);
1253
+ return {
1254
+ path: options.relPath,
1255
+ sha256: digest.sha256,
1256
+ bytes: digest.bytes,
1257
+ mtimeMs: st.mtimeMs
1258
+ };
1259
+ }
1129
1260
  async function applyOfflineSyncFileContentChunk(options) {
1130
1261
  const root = await ensureSyncRoot(options.root, "applyOfflineSyncFileContentChunk");
1131
1262
  const sourceId = normalizeSourceId(options.sourceId, "sourceId");
@@ -1207,17 +1338,13 @@ async function applyOfflineSyncFileContentChunk(options) {
1207
1338
  };
1208
1339
  if (offset === 0) {
1209
1340
  await pruneOfflineUploadStaging(root);
1210
- const currentSnapshot2 = await buildOfflineSyncSnapshotForPaths({
1211
- root: root.abs,
1212
- sourceId: "local",
1213
- paths: [relPath],
1214
- includeContent: false,
1215
- includeTranscripts,
1341
+ const currentFile2 = await readLocalFileState({
1342
+ rootAbs: root.abs,
1343
+ relPath,
1216
1344
  readFile: options.readFile,
1217
1345
  readFileDigest: options.readFileDigest
1218
1346
  });
1219
- const currentFile2 = currentSnapshot2.files[0];
1220
- if (currentFile2?.sha256 === sha256) {
1347
+ if (currentFile2 && currentFile2.sha256 === sha256) {
1221
1348
  await setSafeFileMtime(root, relPath, mtimeMs);
1222
1349
  return {
1223
1350
  ...baseResult,
@@ -1270,16 +1397,12 @@ async function applyOfflineSyncFileContentChunk(options) {
1270
1397
  });
1271
1398
  throw new Error(`offline sync upload checksum mismatch for ${relPath}`);
1272
1399
  }
1273
- const currentSnapshot = await buildOfflineSyncSnapshotForPaths({
1274
- root: root.abs,
1275
- sourceId: "local",
1276
- paths: [relPath],
1277
- includeContent: false,
1278
- includeTranscripts,
1400
+ const currentFile = await readLocalFileState({
1401
+ rootAbs: root.abs,
1402
+ relPath,
1279
1403
  readFile: options.readFile,
1280
1404
  readFileDigest: options.readFileDigest
1281
1405
  });
1282
- const currentFile = currentSnapshot.files[0];
1283
1406
  const uploadedState = {
1284
1407
  path: relPath,
1285
1408
  sha256,
@@ -1287,7 +1410,7 @@ async function applyOfflineSyncFileContentChunk(options) {
1287
1410
  mtimeMs
1288
1411
  };
1289
1412
  try {
1290
- if (currentFile?.sha256 === sha256) {
1413
+ if (currentFile && currentFile.sha256 === sha256) {
1291
1414
  await setSafeFileMtime(root, relPath, mtimeMs);
1292
1415
  return {
1293
1416
  ...baseResult,
@@ -1619,8 +1742,11 @@ export {
1619
1742
  OFFLINE_SYNC_APPLY_MAX_BODY_BYTES,
1620
1743
  OFFLINE_SYNC_SNAPSHOT_BASE_MAX_BODY_BYTES,
1621
1744
  OFFLINE_SYNC_MAX_MTIME_MS,
1745
+ globToRegExp,
1622
1746
  normalizeOfflineSyncSnapshot,
1623
1747
  normalizeOfflineSyncChangeset,
1748
+ compileOfflineSyncExcludeGlobs,
1749
+ parseOfflineSyncExcludes,
1624
1750
  shouldPreferIncomingOfflineRuntimeFile,
1625
1751
  iterateOfflineSyncSnapshotFileRecords,
1626
1752
  buildOfflineSyncSnapshot,
@@ -1642,4 +1768,4 @@ export {
1642
1768
  normalizeOfflineSyncState,
1643
1769
  fileStatesFromSnapshot
1644
1770
  };
1645
- //# sourceMappingURL=chunk-PWWWLD7D.js.map
1771
+ //# sourceMappingURL=chunk-X64YLC24.js.map