@remnic/core 1.1.8 → 1.1.9

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 (237) hide show
  1. package/dist/access-cli.js +30 -30
  2. package/dist/access-http.d.ts +7 -7
  3. package/dist/access-http.js +13 -13
  4. package/dist/access-mcp.d.ts +7 -7
  5. package/dist/access-mcp.js +12 -12
  6. package/dist/{access-service-C0Rkioec.d.ts → access-service-BJCIjVRY.d.ts} +9 -9
  7. package/dist/access-service.d.ts +7 -7
  8. package/dist/access-service.js +11 -11
  9. package/dist/active-memory-bridge.d.ts +1 -1
  10. package/dist/active-recall.d.ts +2 -2
  11. package/dist/active-recall.js +2 -2
  12. package/dist/active-recall.js.map +1 -1
  13. package/dist/behavior-learner.d.ts +1 -1
  14. package/dist/behavior-signals.d.ts +1 -1
  15. package/dist/bootstrap.d.ts +6 -6
  16. package/dist/briefing.d.ts +2 -2
  17. package/dist/briefing.js +6 -6
  18. package/dist/buffer-surprise-report.d.ts +1 -1
  19. package/dist/buffer.d.ts +2 -2
  20. package/dist/calibration.d.ts +1 -1
  21. package/dist/calibration.js +2 -2
  22. package/dist/causal-behavior.d.ts +1 -1
  23. package/dist/causal-consolidation.d.ts +2 -2
  24. package/dist/causal-consolidation.js +8 -8
  25. package/dist/{chunk-ETA2JXP5.js → chunk-2MVUXO4H.js} +2 -2
  26. package/dist/{chunk-GZCUW5IC.js → chunk-3IQ2TR4N.js} +5 -5
  27. package/dist/chunk-3IQ2TR4N.js.map +1 -0
  28. package/dist/{chunk-KNQ5YJTO.js → chunk-3VRIIII5.js} +149 -1
  29. package/dist/chunk-3VRIIII5.js.map +1 -0
  30. package/dist/{chunk-TUFG6VXY.js → chunk-4DWOBS2A.js} +2 -2
  31. package/dist/chunk-4DWOBS2A.js.map +1 -0
  32. package/dist/{chunk-L2IO2QPY.js → chunk-4IS4SXIQ.js} +17 -13
  33. package/dist/chunk-4IS4SXIQ.js.map +1 -0
  34. package/dist/{chunk-RLV2F337.js → chunk-6OAQEOGV.js} +2 -2
  35. package/dist/{chunk-QJZ77K7F.js → chunk-6Z6UH6TK.js} +26 -12
  36. package/dist/chunk-6Z6UH6TK.js.map +1 -0
  37. package/dist/{chunk-4IT6WL23.js → chunk-7SFAENUZ.js} +2 -2
  38. package/dist/{chunk-ODWDQNRE.js → chunk-7SI52C65.js} +7 -3
  39. package/dist/chunk-7SI52C65.js.map +1 -0
  40. package/dist/{chunk-Q5TJRAGE.js → chunk-A6PGANSE.js} +3 -3
  41. package/dist/{chunk-OJMD2LIW.js → chunk-BIHCWSWA.js} +3 -3
  42. package/dist/{chunk-MYH2IBSP.js → chunk-CTYRIJ5E.js} +3 -3
  43. package/dist/{chunk-T65SHTJP.js → chunk-ET4BL42V.js} +1 -1
  44. package/dist/chunk-ET4BL42V.js.map +1 -0
  45. package/dist/{chunk-DWMXVUGO.js → chunk-FLBYSB2V.js} +6 -4
  46. package/dist/chunk-FLBYSB2V.js.map +1 -0
  47. package/dist/{chunk-GRDDGNYQ.js → chunk-FPWUENQH.js} +34 -32
  48. package/dist/chunk-FPWUENQH.js.map +1 -0
  49. package/dist/chunk-FVQJYWH7.js +52 -0
  50. package/dist/chunk-FVQJYWH7.js.map +1 -0
  51. package/dist/{chunk-STB3GUYU.js → chunk-G3G3LY22.js} +2 -2
  52. package/dist/{chunk-FIXIX6DE.js → chunk-G6NX57V2.js} +33 -43
  53. package/dist/chunk-G6NX57V2.js.map +1 -0
  54. package/dist/{chunk-3FPTCC3Z.js → chunk-GVPWB7EY.js} +2 -2
  55. package/dist/{chunk-AV2WSYZY.js → chunk-ICULSMDG.js} +2 -2
  56. package/dist/{chunk-WXPPM426.js → chunk-J3P6WSFZ.js} +2 -2
  57. package/dist/{chunk-FCGWNWG4.js → chunk-KIF7QNKL.js} +28 -28
  58. package/dist/chunk-KIF7QNKL.js.map +1 -0
  59. package/dist/{chunk-XVOIMCVW.js → chunk-KMWZXT5T.js} +2 -2
  60. package/dist/{chunk-SWRJFKYW.js → chunk-M3DK45UM.js} +5 -5
  61. package/dist/{chunk-XGX4TUF6.js → chunk-MJLUHRSF.js} +5 -5
  62. package/dist/{chunk-4KAN3GZ3.js → chunk-NN2DKE4T.js} +1 -1
  63. package/dist/chunk-NN2DKE4T.js.map +1 -0
  64. package/dist/{chunk-R2XRID2N.js → chunk-NN3LPQ5D.js} +5 -5
  65. package/dist/chunk-NN3LPQ5D.js.map +1 -0
  66. package/dist/{chunk-RJSVRPNU.js → chunk-OWGGXPKV.js} +16 -9
  67. package/dist/chunk-OWGGXPKV.js.map +1 -0
  68. package/dist/{chunk-WSZIHQBK.js → chunk-P77UEOU2.js} +4 -1
  69. package/dist/{chunk-WSZIHQBK.js.map → chunk-P77UEOU2.js.map} +1 -1
  70. package/dist/{chunk-65ZPH7QA.js → chunk-PHQH2VUO.js} +4 -4
  71. package/dist/{chunk-KHJRMWO4.js → chunk-QPLYTPYL.js} +15 -15
  72. package/dist/{chunk-FEMOX5AD.js → chunk-QR3C7BKQ.js} +7 -7
  73. package/dist/chunk-QR3C7BKQ.js.map +1 -0
  74. package/dist/{chunk-3LCWFNVS.js → chunk-SKE7JYKA.js} +2 -2
  75. package/dist/{chunk-E27HOXMX.js → chunk-U4SZXGEO.js} +2 -2
  76. package/dist/{chunk-67YLUWLG.js → chunk-XJKFSSDW.js} +3 -3
  77. package/dist/chunk-XJKFSSDW.js.map +1 -0
  78. package/dist/{chunk-SYWJJTNL.js → chunk-XL3UCAZA.js} +22 -22
  79. package/dist/{chunk-ASIQZXYO.js → chunk-XMVFHBHT.js} +2 -2
  80. package/dist/{chunk-SRIDOT64.js → chunk-XN4D6Z7X.js} +3 -3
  81. package/dist/{chunk-S5SQDIF5.js → chunk-Y3VT6ZCP.js} +4 -4
  82. package/dist/{cli-CIATRu8o.d.ts → cli-BojuyOOp.d.ts} +4 -4
  83. package/dist/cli.d.ts +8 -8
  84. package/dist/cli.js +24 -24
  85. package/dist/{codex-materialize-xVqbEmcm.d.ts → codex-materialize-YVC2wb6n.d.ts} +1 -1
  86. package/dist/compression-optimizer.d.ts +1 -1
  87. package/dist/config.d.ts +1 -1
  88. package/dist/config.js +1 -1
  89. package/dist/consolidation-provenance-check.d.ts +2 -2
  90. package/dist/consolidation-undo.d.ts +2 -2
  91. package/dist/day-summary.d.ts +1 -1
  92. package/dist/day-summary.js +1 -1
  93. package/dist/delinearize.d.ts +1 -1
  94. package/dist/direct-answer-wiring.d.ts +1 -1
  95. package/dist/direct-answer.d.ts +1 -1
  96. package/dist/embedding-fallback.d.ts +1 -1
  97. package/dist/{engine-MEAYUA7A.js → engine-EDFFOWDD.js} +7 -7
  98. package/dist/entity-retrieval.d.ts +2 -2
  99. package/dist/entity-retrieval.js +6 -6
  100. package/dist/entity-schema.d.ts +1 -1
  101. package/dist/explicit-capture.d.ts +6 -6
  102. package/dist/explicit-capture.js +2 -2
  103. package/dist/explicit-cue-recall.js +1 -1
  104. package/dist/extraction-judge-telemetry.d.ts +1 -1
  105. package/dist/extraction-judge-training.d.ts +1 -1
  106. package/dist/extraction-judge.d.ts +1 -1
  107. package/dist/extraction.d.ts +1 -1
  108. package/dist/extraction.js +7 -7
  109. package/dist/fallback-llm.d.ts +1 -1
  110. package/dist/fallback-llm.js +2 -2
  111. package/dist/identity-continuity.d.ts +1 -1
  112. package/dist/importance.d.ts +1 -1
  113. package/dist/index.d.ts +13 -13
  114. package/dist/index.js +147 -147
  115. package/dist/index.js.map +1 -1
  116. package/dist/intent.d.ts +1 -1
  117. package/dist/lifecycle.d.ts +1 -1
  118. package/dist/live-connectors-runner.d.ts +1 -1
  119. package/dist/live-connectors-runner.js +2 -2
  120. package/dist/local-llm.d.ts +1 -1
  121. package/dist/local-llm.js +1 -1
  122. package/dist/memory-action-policy.d.ts +1 -1
  123. package/dist/memory-cache.d.ts +1 -1
  124. package/dist/{memory-governance-G3XODEXW.js → memory-governance-AAQPBZEP.js} +7 -7
  125. package/dist/memory-lifecycle-ledger-utils.d.ts +1 -1
  126. package/dist/{memory-projection-store-lCzmu4JX.d.ts → memory-projection-store-BW8u5U0u.d.ts} +1 -1
  127. package/dist/memory-projection-store.d.ts +2 -2
  128. package/dist/memory-projection-store.js +1 -1
  129. package/dist/memory-worth-outcomes.d.ts +2 -2
  130. package/dist/{migrate-from-identity-anchor-TTEDEJGX.js → migrate-from-identity-anchor-G27MCD6A.js} +2 -2
  131. package/dist/model-registry.js +1 -1
  132. package/dist/models-json.d.ts +1 -1
  133. package/dist/models-json.js +1 -1
  134. package/dist/native-knowledge.d.ts +1 -1
  135. package/dist/operator-toolkit.d.ts +2 -2
  136. package/dist/operator-toolkit.js +10 -10
  137. package/dist/opik-exporter.js +2 -2
  138. package/dist/opik-exporter.js.map +1 -1
  139. package/dist/{orchestrator-CvUYwuaL.d.ts → orchestrator-CYqmqxco.d.ts} +5 -5
  140. package/dist/orchestrator.d.ts +6 -6
  141. package/dist/orchestrator.js +25 -25
  142. package/dist/patterns-cli.d.ts +1 -1
  143. package/dist/{peers-6OSQ3NK6.js → peers-HCVGHMAE.js} +3 -3
  144. package/dist/policy-runtime.d.ts +1 -1
  145. package/dist/{port-BkWL7hqo.d.ts → port-Br27H8dy.d.ts} +7 -1
  146. package/dist/qmd-recall-cache.d.ts +2 -2
  147. package/dist/qmd.d.ts +3 -2
  148. package/dist/qmd.js +1 -1
  149. package/dist/recall-disclosure-escalation.d.ts +1 -1
  150. package/dist/recall-explain-renderer.d.ts +1 -1
  151. package/dist/recall-explain-renderer.js +3 -3
  152. package/dist/recall-state.d.ts +1 -1
  153. package/dist/recall-tag-filter.d.ts +1 -1
  154. package/dist/recall-xray-cli.d.ts +1 -1
  155. package/dist/recall-xray-cli.js +4 -4
  156. package/dist/recall-xray-renderer.d.ts +1 -1
  157. package/dist/recall-xray-renderer.js +3 -3
  158. package/dist/recall-xray.d.ts +1 -1
  159. package/dist/recall-xray.js +2 -2
  160. package/dist/resolve-auth-token.d.ts +1 -1
  161. package/dist/resume-bundles.js +2 -2
  162. package/dist/retrieval-agents.d.ts +2 -2
  163. package/dist/retrieval-tiers.d.ts +1 -1
  164. package/dist/sanitize.js +1 -1
  165. package/dist/schemas.d.ts +22 -22
  166. package/dist/{semantic-consolidation-CGiH52qa.d.ts → semantic-consolidation-GPcLr9BQ.d.ts} +2 -2
  167. package/dist/semantic-consolidation.d.ts +3 -3
  168. package/dist/semantic-consolidation.js +6 -6
  169. package/dist/semantic-rule-promotion.js +6 -6
  170. package/dist/semantic-rule-verifier.d.ts +1 -1
  171. package/dist/semantic-rule-verifier.js +6 -6
  172. package/dist/session-observer-bands.d.ts +1 -1
  173. package/dist/session-observer-state.d.ts +1 -1
  174. package/dist/signal.d.ts +1 -1
  175. package/dist/source-attribution.d.ts +1 -1
  176. package/dist/source-attribution.js +1 -1
  177. package/dist/storage.d.ts +2 -2
  178. package/dist/storage.js +5 -5
  179. package/dist/summarizer.d.ts +1 -1
  180. package/dist/summarizer.js +5 -5
  181. package/dist/summary-snapshot.d.ts +1 -1
  182. package/dist/temporal-supersession.d.ts +2 -2
  183. package/dist/temporal-validity.d.ts +1 -1
  184. package/dist/threading.d.ts +1 -1
  185. package/dist/tier-migration.d.ts +3 -3
  186. package/dist/tier-routing.d.ts +1 -1
  187. package/dist/topics.d.ts +1 -1
  188. package/dist/transcript.d.ts +1 -1
  189. package/dist/{types-H85grL1f.d.ts → types-Bmp9ssU2.d.ts} +3 -3
  190. package/dist/types.d.ts +1 -1
  191. package/dist/types.js +1 -1
  192. package/dist/utility-runtime.d.ts +1 -1
  193. package/dist/verified-recall.js +6 -6
  194. package/package.json +1 -1
  195. package/dist/chunk-4KAN3GZ3.js.map +0 -1
  196. package/dist/chunk-67YLUWLG.js.map +0 -1
  197. package/dist/chunk-DWMXVUGO.js.map +0 -1
  198. package/dist/chunk-FCGWNWG4.js.map +0 -1
  199. package/dist/chunk-FEMOX5AD.js.map +0 -1
  200. package/dist/chunk-FIXIX6DE.js.map +0 -1
  201. package/dist/chunk-GRDDGNYQ.js.map +0 -1
  202. package/dist/chunk-GZCUW5IC.js.map +0 -1
  203. package/dist/chunk-KNQ5YJTO.js.map +0 -1
  204. package/dist/chunk-L2IO2QPY.js.map +0 -1
  205. package/dist/chunk-M62O4P4T.js +0 -41
  206. package/dist/chunk-M62O4P4T.js.map +0 -1
  207. package/dist/chunk-ODWDQNRE.js.map +0 -1
  208. package/dist/chunk-QJZ77K7F.js.map +0 -1
  209. package/dist/chunk-R2XRID2N.js.map +0 -1
  210. package/dist/chunk-RJSVRPNU.js.map +0 -1
  211. package/dist/chunk-T65SHTJP.js.map +0 -1
  212. package/dist/chunk-TUFG6VXY.js.map +0 -1
  213. /package/dist/{chunk-ETA2JXP5.js.map → chunk-2MVUXO4H.js.map} +0 -0
  214. /package/dist/{chunk-RLV2F337.js.map → chunk-6OAQEOGV.js.map} +0 -0
  215. /package/dist/{chunk-4IT6WL23.js.map → chunk-7SFAENUZ.js.map} +0 -0
  216. /package/dist/{chunk-Q5TJRAGE.js.map → chunk-A6PGANSE.js.map} +0 -0
  217. /package/dist/{chunk-OJMD2LIW.js.map → chunk-BIHCWSWA.js.map} +0 -0
  218. /package/dist/{chunk-MYH2IBSP.js.map → chunk-CTYRIJ5E.js.map} +0 -0
  219. /package/dist/{chunk-STB3GUYU.js.map → chunk-G3G3LY22.js.map} +0 -0
  220. /package/dist/{chunk-3FPTCC3Z.js.map → chunk-GVPWB7EY.js.map} +0 -0
  221. /package/dist/{chunk-AV2WSYZY.js.map → chunk-ICULSMDG.js.map} +0 -0
  222. /package/dist/{chunk-WXPPM426.js.map → chunk-J3P6WSFZ.js.map} +0 -0
  223. /package/dist/{chunk-XVOIMCVW.js.map → chunk-KMWZXT5T.js.map} +0 -0
  224. /package/dist/{chunk-SWRJFKYW.js.map → chunk-M3DK45UM.js.map} +0 -0
  225. /package/dist/{chunk-XGX4TUF6.js.map → chunk-MJLUHRSF.js.map} +0 -0
  226. /package/dist/{chunk-65ZPH7QA.js.map → chunk-PHQH2VUO.js.map} +0 -0
  227. /package/dist/{chunk-KHJRMWO4.js.map → chunk-QPLYTPYL.js.map} +0 -0
  228. /package/dist/{chunk-3LCWFNVS.js.map → chunk-SKE7JYKA.js.map} +0 -0
  229. /package/dist/{chunk-E27HOXMX.js.map → chunk-U4SZXGEO.js.map} +0 -0
  230. /package/dist/{chunk-SYWJJTNL.js.map → chunk-XL3UCAZA.js.map} +0 -0
  231. /package/dist/{chunk-ASIQZXYO.js.map → chunk-XMVFHBHT.js.map} +0 -0
  232. /package/dist/{chunk-SRIDOT64.js.map → chunk-XN4D6Z7X.js.map} +0 -0
  233. /package/dist/{chunk-S5SQDIF5.js.map → chunk-Y3VT6ZCP.js.map} +0 -0
  234. /package/dist/{engine-MEAYUA7A.js.map → engine-EDFFOWDD.js.map} +0 -0
  235. /package/dist/{memory-governance-G3XODEXW.js.map → memory-governance-AAQPBZEP.js.map} +0 -0
  236. /package/dist/{migrate-from-identity-anchor-TTEDEJGX.js.map → migrate-from-identity-anchor-G27MCD6A.js.map} +0 -0
  237. /package/dist/{peers-6OSQ3NK6.js.map → peers-HCVGHMAE.js.map} +0 -0
package/dist/index.js CHANGED
@@ -1,4 +1,4 @@
1
- import "./chunk-3LCWFNVS.js";
1
+ import "./chunk-SKE7JYKA.js";
2
2
  import {
3
3
  PEERS_DIR_NAME,
4
4
  PEER_ID_MAX_LENGTH,
@@ -11,7 +11,7 @@ import {
11
11
  readPeerProfile,
12
12
  writePeer,
13
13
  writePeerProfile
14
- } from "./chunk-TUFG6VXY.js";
14
+ } from "./chunk-4DWOBS2A.js";
15
15
  import {
16
16
  buildTokenEntry,
17
17
  commitTokenEntry,
@@ -53,19 +53,19 @@ import {
53
53
  runBulkImportCliCommand,
54
54
  runBulkImportPipeline,
55
55
  validateImportTurn
56
- } from "./chunk-SYWJJTNL.js";
57
- import "./chunk-XVOIMCVW.js";
56
+ } from "./chunk-XL3UCAZA.js";
57
+ import "./chunk-KMWZXT5T.js";
58
58
  import {
59
59
  clearAuthTokenSecretCache,
60
60
  isAgentAccessSecretRef,
61
61
  resolveAgentAccessAuthToken
62
62
  } from "./chunk-MXC3AP5I.js";
63
- import "./chunk-STB3GUYU.js";
63
+ import "./chunk-G3G3LY22.js";
64
64
  import {
65
65
  parseXrayBudgetFlag,
66
66
  parseXrayCliOptions
67
- } from "./chunk-OJMD2LIW.js";
68
- import "./chunk-SWRJFKYW.js";
67
+ } from "./chunk-BIHCWSWA.js";
68
+ import "./chunk-M3DK45UM.js";
69
69
  import {
70
70
  parseStrictCliDate
71
71
  } from "./chunk-AJA46VX5.js";
@@ -117,8 +117,8 @@ import {
117
117
  saveTaxonomy,
118
118
  validateSlug,
119
119
  validateTaxonomy
120
- } from "./chunk-GRDDGNYQ.js";
121
- import "./chunk-SRIDOT64.js";
120
+ } from "./chunk-FPWUENQH.js";
121
+ import "./chunk-XN4D6Z7X.js";
122
122
  import "./chunk-CK5NTM2S.js";
123
123
  import "./chunk-FSFEQI74.js";
124
124
  import "./chunk-Z5AAYHUC.js";
@@ -128,7 +128,7 @@ import {
128
128
  } from "./chunk-S75M5ZRK.js";
129
129
  import "./chunk-TPB3I2AC.js";
130
130
  import "./chunk-UHGBNIOS.js";
131
- import "./chunk-S5SQDIF5.js";
131
+ import "./chunk-Y3VT6ZCP.js";
132
132
  import "./chunk-ETOW6ACV.js";
133
133
  import "./chunk-ZTSE2ZJ6.js";
134
134
  import "./chunk-MDYG7VI7.js";
@@ -169,7 +169,7 @@ import {
169
169
  builtInLiveConnectorDefinitions,
170
170
  hasEnabledLiveConnector,
171
171
  runLiveConnectorsOnce
172
- } from "./chunk-ASIQZXYO.js";
172
+ } from "./chunk-XMVFHBHT.js";
173
173
  import "./chunk-YAZNBMNF.js";
174
174
  import {
175
175
  buildExplicitCueRecallSection,
@@ -179,7 +179,7 @@ import {
179
179
  collectQuestionSlotCues,
180
180
  collectStructuredPlanCues,
181
181
  collectTemporalLexicalCues
182
- } from "./chunk-KNQ5YJTO.js";
182
+ } from "./chunk-3VRIIII5.js";
183
183
  import {
184
184
  buildEvidencePack
185
185
  } from "./chunk-74WWN7ZW.js";
@@ -196,15 +196,15 @@ import {
196
196
  } from "./chunk-C4SQJZAF.js";
197
197
  import {
198
198
  ExtractionEngine
199
- } from "./chunk-FCGWNWG4.js";
199
+ } from "./chunk-KIF7QNKL.js";
200
200
  import "./chunk-WW3QQF4H.js";
201
201
  import "./chunk-54V4BZWP.js";
202
- import "./chunk-FEMOX5AD.js";
203
- import "./chunk-R2XRID2N.js";
202
+ import "./chunk-QR3C7BKQ.js";
203
+ import "./chunk-NN3LPQ5D.js";
204
204
  import {
205
205
  buildExtensionsFooterForSummary,
206
206
  loadDaySummaryPrompt
207
- } from "./chunk-GZCUW5IC.js";
207
+ } from "./chunk-3IQ2TR4N.js";
208
208
  import "./chunk-VEWZZM3H.js";
209
209
  import {
210
210
  resolveCategory
@@ -216,25 +216,25 @@ import {
216
216
  import "./chunk-Z2E7VW55.js";
217
217
  import {
218
218
  buildEntityRecallSection
219
- } from "./chunk-MYH2IBSP.js";
219
+ } from "./chunk-CTYRIJ5E.js";
220
220
  import "./chunk-2NMMFZ5T.js";
221
221
  import "./chunk-SRBJUAMP.js";
222
222
  import "./chunk-PYXS46O7.js";
223
223
  import "./chunk-3QKK7QOS.js";
224
- import "./chunk-ETA2JXP5.js";
224
+ import "./chunk-2MVUXO4H.js";
225
225
  import "./chunk-JRNQ3RNA.js";
226
- import "./chunk-RLV2F337.js";
226
+ import "./chunk-6OAQEOGV.js";
227
227
  import "./chunk-CULXMQJH.js";
228
228
  import "./chunk-E6K4NIEU.js";
229
229
  import {
230
230
  LanceDbBackend,
231
231
  MeilisearchBackend,
232
232
  OramaBackend
233
- } from "./chunk-RJSVRPNU.js";
233
+ } from "./chunk-OWGGXPKV.js";
234
234
  import "./chunk-YRMVARQP.js";
235
235
  import {
236
236
  QmdClient
237
- } from "./chunk-WSZIHQBK.js";
237
+ } from "./chunk-P77UEOU2.js";
238
238
  import {
239
239
  LEGACY_PLUGIN_ID,
240
240
  PLUGIN_ID,
@@ -256,7 +256,7 @@ import {
256
256
  defaultGoogleDriveClientFactory,
257
257
  validateGoogleDriveConfig,
258
258
  validateNotionConfig
259
- } from "./chunk-L2IO2QPY.js";
259
+ } from "./chunk-4IS4SXIQ.js";
260
260
  import {
261
261
  CONNECTOR_ID_PATTERN,
262
262
  isValidConnectorId,
@@ -272,7 +272,7 @@ import "./chunk-7SEAZFFB.js";
272
272
  import {
273
273
  coerceInstallExtension,
274
274
  parseConfig
275
- } from "./chunk-QJZ77K7F.js";
275
+ } from "./chunk-6Z6UH6TK.js";
276
276
  import "./chunk-Z5LAYHGJ.js";
277
277
  import {
278
278
  CONNECTORS_OUTPUT_FORMATS,
@@ -303,7 +303,7 @@ import {
303
303
  materializeForNamespace,
304
304
  runCodexMaterialize,
305
305
  runPostConsolidationMaterialize
306
- } from "./chunk-FIXIX6DE.js";
306
+ } from "./chunk-G6NX57V2.js";
307
307
  import {
308
308
  REMNIC_EXTENSIONS_TOTAL_TOKEN_LIMIT,
309
309
  discoverMemoryExtensions,
@@ -313,9 +313,9 @@ import {
313
313
  } from "./chunk-EJI5XIBB.js";
314
314
  import {
315
315
  FallbackLlmClient
316
- } from "./chunk-DWMXVUGO.js";
316
+ } from "./chunk-FLBYSB2V.js";
317
317
  import "./chunk-Q7FJ5ZHM.js";
318
- import "./chunk-ODWDQNRE.js";
318
+ import "./chunk-7SI52C65.js";
319
319
  import "./chunk-L2EXJQJP.js";
320
320
  import "./chunk-UZB5KHKX.js";
321
321
  import "./chunk-6HZ6AO2P.js";
@@ -329,10 +329,10 @@ import "./chunk-PVGDJXVK.js";
329
329
  import "./chunk-NGAVDO7E.js";
330
330
  import {
331
331
  EngramAccessHttpServer
332
- } from "./chunk-65ZPH7QA.js";
332
+ } from "./chunk-PHQH2VUO.js";
333
333
  import {
334
334
  EngramMcpServer
335
- } from "./chunk-Q5TJRAGE.js";
335
+ } from "./chunk-A6PGANSE.js";
336
336
  import {
337
337
  buildCitationGuidance,
338
338
  formatOaiMemCitation,
@@ -344,7 +344,7 @@ import {
344
344
  EngramAccessService,
345
345
  computeProcedureStats,
346
346
  formatProcedureStatsText
347
- } from "./chunk-KHJRMWO4.js";
347
+ } from "./chunk-QPLYTPYL.js";
348
348
  import {
349
349
  importCapsule
350
350
  } from "./chunk-QIGOEM65.js";
@@ -357,9 +357,9 @@ import {
357
357
  renderXrayJson,
358
358
  renderXrayMarkdown,
359
359
  renderXrayText
360
- } from "./chunk-WXPPM426.js";
360
+ } from "./chunk-J3P6WSFZ.js";
361
361
  import "./chunk-SOBJ6NEY.js";
362
- import "./chunk-E27HOXMX.js";
362
+ import "./chunk-U4SZXGEO.js";
363
363
  import {
364
364
  normalizeOriginUrl,
365
365
  resolveGitContext,
@@ -368,7 +368,7 @@ import {
368
368
  import {
369
369
  isTrustZoneName
370
370
  } from "./chunk-EQINRHYR.js";
371
- import "./chunk-AV2WSYZY.js";
371
+ import "./chunk-ICULSMDG.js";
372
372
  import {
373
373
  memoryWorthOutcomeEligibleCategories,
374
374
  recordMemoryOutcome
@@ -377,7 +377,7 @@ import {
377
377
  expandTildePath
378
378
  } from "./chunk-IXEJRKCZ.js";
379
379
  import "./chunk-PCUKNJAZ.js";
380
- import "./chunk-3FPTCC3Z.js";
380
+ import "./chunk-GVPWB7EY.js";
381
381
  import "./chunk-2LGMW3DJ.js";
382
382
  import "./chunk-EEQLFRUM.js";
383
383
  import "./chunk-NBNN5GOB.js";
@@ -414,10 +414,10 @@ import {
414
414
  renderBriefingMarkdown,
415
415
  resolveBriefingSaveDir,
416
416
  validateBriefingFormat
417
- } from "./chunk-4IT6WL23.js";
417
+ } from "./chunk-7SFAENUZ.js";
418
418
  import {
419
419
  StorageManager
420
- } from "./chunk-XGX4TUF6.js";
420
+ } from "./chunk-MJLUHRSF.js";
421
421
  import "./chunk-YNJHCGDT.js";
422
422
  import {
423
423
  CITATION_UNKNOWN,
@@ -429,19 +429,19 @@ import {
429
429
  parseAllCitations,
430
430
  parseCitation,
431
431
  stripCitation
432
- } from "./chunk-4KAN3GZ3.js";
432
+ } from "./chunk-NN2DKE4T.js";
433
433
  import {
434
434
  DEFAULT_RECALL_DISCLOSURE,
435
435
  RECALL_DISCLOSURE_LEVELS,
436
436
  isRecallDisclosure
437
- } from "./chunk-T65SHTJP.js";
437
+ } from "./chunk-ET4BL42V.js";
438
438
  import "./chunk-PFV5C235.js";
439
439
  import "./chunk-RULE4VG5.js";
440
440
  import "./chunk-SCU65EZI.js";
441
- import "./chunk-67YLUWLG.js";
441
+ import "./chunk-XJKFSSDW.js";
442
442
  import "./chunk-DM2T26WE.js";
443
443
  import "./chunk-QSVPYQPG.js";
444
- import "./chunk-M62O4P4T.js";
444
+ import "./chunk-FVQJYWH7.js";
445
445
  import "./chunk-4DJQYKMN.js";
446
446
  import "./chunk-G7D6GZ5J.js";
447
447
  import {
@@ -2554,14 +2554,14 @@ function hashContent3(content) {
2554
2554
  }
2555
2555
 
2556
2556
  // src/connectors/index.ts
2557
- import fs8 from "fs";
2557
+ import fs9 from "fs";
2558
2558
  import path13 from "path";
2559
2559
  import os from "os";
2560
2560
  import { createRequire } from "module";
2561
2561
  import { fileURLToPath } from "url";
2562
2562
 
2563
2563
  // src/connectors/codex-marketplace.ts
2564
- import { existsSync, mkdirSync, readFileSync, renameSync, writeFileSync } from "fs";
2564
+ import fs8 from "fs";
2565
2565
  import path12 from "path";
2566
2566
  var MARKETPLACE_SCHEMA_VERSION = 1;
2567
2567
  var MARKETPLACE_MANIFEST_FILENAME = "marketplace.json";
@@ -2664,12 +2664,12 @@ async function writeMarketplaceManifest(outputDir, manifest) {
2664
2664
  `Refusing to write invalid manifest: ${validation.errors.join("; ")}`
2665
2665
  );
2666
2666
  }
2667
- mkdirSync(outputDir, { recursive: true });
2667
+ fs8.mkdirSync(outputDir, { recursive: true });
2668
2668
  const destPath = path12.join(outputDir, MARKETPLACE_MANIFEST_FILENAME);
2669
2669
  const tmpPath = `${destPath}.tmp.${process.pid}`;
2670
2670
  const content = JSON.stringify(manifest, null, 2) + "\n";
2671
- writeFileSync(tmpPath, content);
2672
- renameSync(tmpPath, destPath);
2671
+ fs8.writeFileSync(tmpPath, content);
2672
+ fs8.renameSync(tmpPath, destPath);
2673
2673
  }
2674
2674
  async function installFromMarketplace(source, sourceType, config, logger) {
2675
2675
  const _log = logger ?? {
@@ -2730,11 +2730,11 @@ async function resolveManifest(source, sourceType, logger) {
2730
2730
  }
2731
2731
  function resolveLocal(dirPath, logger) {
2732
2732
  const manifestPath2 = path12.join(dirPath, MARKETPLACE_MANIFEST_FILENAME);
2733
- if (!existsSync(manifestPath2)) {
2733
+ if (!fs8.existsSync(manifestPath2)) {
2734
2734
  throw new Error(`marketplace.json not found at ${manifestPath2}`);
2735
2735
  }
2736
2736
  logger.debug?.(`reading local marketplace manifest: ${manifestPath2}`);
2737
- const raw = readFileSync(manifestPath2, "utf-8");
2737
+ const raw = fs8.readFileSync(manifestPath2, "utf-8");
2738
2738
  let parsed;
2739
2739
  try {
2740
2740
  parsed = JSON.parse(raw);
@@ -2793,8 +2793,8 @@ function readPackageVersion() {
2793
2793
  for (const candidate of candidates) {
2794
2794
  const pkgPath = path12.join(candidate, "package.json");
2795
2795
  try {
2796
- if (!existsSync(pkgPath)) continue;
2797
- const raw = readFileSync(pkgPath, "utf-8");
2796
+ if (!fs8.existsSync(pkgPath)) continue;
2797
+ const raw = fs8.readFileSync(pkgPath, "utf-8");
2798
2798
  const parsed = JSON.parse(raw);
2799
2799
  if (typeof parsed === "object" && parsed !== null && typeof parsed.version === "string") {
2800
2800
  return parsed.version;
@@ -3111,7 +3111,7 @@ function getRegistryPath() {
3111
3111
  }
3112
3112
  function loadRegistry() {
3113
3113
  const regPath = getRegistryPath();
3114
- if (!fs8.existsSync(regPath)) {
3114
+ if (!fs9.existsSync(regPath)) {
3115
3115
  const registry = {
3116
3116
  connectors: BUILTIN_CONNECTORS,
3117
3117
  registryPath: regPath
@@ -3119,7 +3119,7 @@ function loadRegistry() {
3119
3119
  saveRegistry(registry);
3120
3120
  return registry;
3121
3121
  }
3122
- const raw = fs8.readFileSync(regPath, "utf8");
3122
+ const raw = fs9.readFileSync(regPath, "utf8");
3123
3123
  try {
3124
3124
  const parsed = JSON.parse(raw);
3125
3125
  const builtinIds = new Set(BUILTIN_CONNECTORS.map((b) => b.id));
@@ -3140,19 +3140,19 @@ function loadRegistry() {
3140
3140
  }
3141
3141
  function saveRegistry(registry) {
3142
3142
  const regPath = registry.registryPath;
3143
- fs8.mkdirSync(path13.dirname(regPath), { recursive: true });
3144
- fs8.writeFileSync(regPath, JSON.stringify({ connectors: registry.connectors }, null, 2));
3143
+ fs9.mkdirSync(path13.dirname(regPath), { recursive: true });
3144
+ fs9.writeFileSync(regPath, JSON.stringify({ connectors: registry.connectors }, null, 2));
3145
3145
  }
3146
3146
  function listConnectors() {
3147
3147
  const registry = loadRegistry();
3148
3148
  const connectorsDir = getConnectorsDir();
3149
3149
  const installedIds = /* @__PURE__ */ new Set();
3150
- if (fs8.existsSync(connectorsDir)) {
3151
- for (const entry of fs8.readdirSync(connectorsDir)) {
3150
+ if (fs9.existsSync(connectorsDir)) {
3151
+ for (const entry of fs9.readdirSync(connectorsDir)) {
3152
3152
  if (entry.endsWith(".json")) {
3153
3153
  try {
3154
3154
  const config = JSON.parse(
3155
- fs8.readFileSync(path13.join(connectorsDir, entry), "utf8")
3155
+ fs9.readFileSync(path13.join(connectorsDir, entry), "utf8")
3156
3156
  );
3157
3157
  installedIds.add(config.connectorId);
3158
3158
  } catch {
@@ -3168,7 +3168,7 @@ function listConnectors() {
3168
3168
  for (const id of installedIds) {
3169
3169
  const configPath = path13.join(connectorsDir, `${id}.json`);
3170
3170
  try {
3171
- const raw = JSON.parse(fs8.readFileSync(configPath, "utf8"));
3171
+ const raw = JSON.parse(fs9.readFileSync(configPath, "utf8"));
3172
3172
  const { token: _redacted, ...config } = raw;
3173
3173
  installed.push({
3174
3174
  connectorId: id,
@@ -3202,7 +3202,7 @@ function installConnector(options) {
3202
3202
  };
3203
3203
  }
3204
3204
  const configDir = getConnectorsDir();
3205
- fs8.mkdirSync(configDir, { recursive: true });
3205
+ fs9.mkdirSync(configDir, { recursive: true });
3206
3206
  const configPath = path13.join(configDir, `${options.connectorId}.json`);
3207
3207
  let hermesSavedProfile;
3208
3208
  let hermesSavedHost;
@@ -3211,9 +3211,9 @@ function installConnector(options) {
3211
3211
  let hermesResolvedHost;
3212
3212
  let hermesResolvedPort;
3213
3213
  if (options.connectorId === "hermes") {
3214
- if (fs8.existsSync(configPath)) {
3214
+ if (fs9.existsSync(configPath)) {
3215
3215
  try {
3216
- const prev = JSON.parse(fs8.readFileSync(configPath, "utf8"));
3216
+ const prev = JSON.parse(fs9.readFileSync(configPath, "utf8"));
3217
3217
  if (prev?.profile != null) {
3218
3218
  try {
3219
3219
  hermesSavedProfile = sanitizeHermesProfile(String(prev.profile));
@@ -3377,7 +3377,7 @@ function installConnector(options) {
3377
3377
  let yamlRollbackErrMsg = "";
3378
3378
  try {
3379
3379
  if (yamlResult.priorContent === null) {
3380
- fs8.unlinkSync(yamlResult.configPath);
3380
+ fs9.unlinkSync(yamlResult.configPath);
3381
3381
  } else if (typeof yamlResult.priorContent === "string") {
3382
3382
  writeSecretFileSync(yamlResult.configPath, yamlResult.priorContent);
3383
3383
  }
@@ -3419,7 +3419,7 @@ function installConnector(options) {
3419
3419
  let unlinkSucceeded = false;
3420
3420
  let unlinkErr;
3421
3421
  try {
3422
- fs8.unlinkSync(yamlResult.configPath);
3422
+ fs9.unlinkSync(yamlResult.configPath);
3423
3423
  unlinkSucceeded = true;
3424
3424
  } catch (err) {
3425
3425
  unlinkErr = err;
@@ -3547,9 +3547,9 @@ function installConnector(options) {
3547
3547
  if (options.connectorId === "weclone") {
3548
3548
  try {
3549
3549
  let proxyConfigPath = null;
3550
- if (existing && fs8.existsSync(configPath)) {
3550
+ if (existing && fs9.existsSync(configPath)) {
3551
3551
  try {
3552
- const savedRegistryConfig = JSON.parse(fs8.readFileSync(configPath, "utf8"));
3552
+ const savedRegistryConfig = JSON.parse(fs9.readFileSync(configPath, "utf8"));
3553
3553
  if (typeof savedRegistryConfig.proxyConfigPath === "string" && savedRegistryConfig.proxyConfigPath.length > 0) {
3554
3554
  proxyConfigPath = savedRegistryConfig.proxyConfigPath;
3555
3555
  }
@@ -3565,12 +3565,12 @@ function installConnector(options) {
3565
3565
  priorConfig: prior ? safeParseJson(prior) : null,
3566
3566
  authToken: tokenEntry?.token
3567
3567
  });
3568
- fs8.mkdirSync(path13.dirname(proxyConfigPath), { recursive: true });
3568
+ fs9.mkdirSync(path13.dirname(proxyConfigPath), { recursive: true });
3569
3569
  weCloneProxyHandleRollback = () => {
3570
3570
  try {
3571
3571
  if (prior === null) {
3572
- if (fs8.existsSync(proxyConfigPath)) {
3573
- fs8.unlinkSync(proxyConfigPath);
3572
+ if (fs9.existsSync(proxyConfigPath)) {
3573
+ fs9.unlinkSync(proxyConfigPath);
3574
3574
  }
3575
3575
  } else {
3576
3576
  writeSecretFileSync(proxyConfigPath, prior);
@@ -3675,9 +3675,9 @@ function removeConnector(connectorId) {
3675
3675
  let codexHomeOverride = null;
3676
3676
  let savedInstallExtension = void 0;
3677
3677
  let configParsed = false;
3678
- if (connectorId === "codex-cli" && fs8.existsSync(configPath)) {
3678
+ if (connectorId === "codex-cli" && fs9.existsSync(configPath)) {
3679
3679
  try {
3680
- const parsed = JSON.parse(fs8.readFileSync(configPath, "utf8"));
3680
+ const parsed = JSON.parse(fs9.readFileSync(configPath, "utf8"));
3681
3681
  configParsed = true;
3682
3682
  if (typeof parsed.codexHome === "string" && parsed.codexHome.length > 0) {
3683
3683
  codexHomeOverride = parsed.codexHome;
@@ -3692,7 +3692,7 @@ function removeConnector(connectorId) {
3692
3692
  );
3693
3693
  }
3694
3694
  }
3695
- if (!fs8.existsSync(configPath)) {
3695
+ if (!fs9.existsSync(configPath)) {
3696
3696
  let staleTokenRevoked = false;
3697
3697
  try {
3698
3698
  staleTokenRevoked = revokeToken(connectorId);
@@ -3709,7 +3709,7 @@ function removeConnector(connectorId) {
3709
3709
  let storedProfile = "default";
3710
3710
  if (connectorId === "hermes") {
3711
3711
  try {
3712
- const stored = JSON.parse(fs8.readFileSync(configPath, "utf8"));
3712
+ const stored = JSON.parse(fs9.readFileSync(configPath, "utf8"));
3713
3713
  if (typeof stored?.profile === "string") storedProfile = stored.profile;
3714
3714
  } catch {
3715
3715
  }
@@ -3718,7 +3718,7 @@ function removeConnector(connectorId) {
3718
3718
  let weCloneRegistryParseFailed = false;
3719
3719
  if (connectorId === "weclone") {
3720
3720
  try {
3721
- const stored = JSON.parse(fs8.readFileSync(configPath, "utf8"));
3721
+ const stored = JSON.parse(fs9.readFileSync(configPath, "utf8"));
3722
3722
  if (typeof stored.proxyConfigPath === "string" && stored.proxyConfigPath.length > 0) {
3723
3723
  weCloneProxyConfigPath = stored.proxyConfigPath;
3724
3724
  }
@@ -3744,7 +3744,7 @@ function removeConnector(connectorId) {
3744
3744
  reason: "config-parse-failed"
3745
3745
  };
3746
3746
  }
3747
- if (connectorId === "codex-cli" && fs8.existsSync(configPath) && !configParsed) {
3747
+ if (connectorId === "codex-cli" && fs9.existsSync(configPath) && !configParsed) {
3748
3748
  console.warn(
3749
3749
  "[remnic/connectors] removeConnector: codex-cli.json is malformed \u2014 aborting removal to preserve provenance. Fix or delete " + configPath + " manually and retry."
3750
3750
  );
@@ -3768,7 +3768,7 @@ function removeConnector(connectorId) {
3768
3768
  }
3769
3769
  }
3770
3770
  try {
3771
- fs8.unlinkSync(configPath);
3771
+ fs9.unlinkSync(configPath);
3772
3772
  } catch (unlinkErr) {
3773
3773
  const sanitizedErr = unlinkErr instanceof Error ? unlinkErr.message : String(unlinkErr);
3774
3774
  return {
@@ -3800,8 +3800,8 @@ function removeConnector(connectorId) {
3800
3800
  weCloneProxyDeleteFailed = `Proxy config path ${JSON.stringify(weCloneProxyConfigPath)} failed safety validation (must be absolute and end with "${expectedSuffix}"). Refusing to delete \u2014 remove the file manually if it exists.`;
3801
3801
  } else {
3802
3802
  try {
3803
- if (fs8.existsSync(weCloneProxyConfigPath)) {
3804
- fs8.unlinkSync(weCloneProxyConfigPath);
3803
+ if (fs9.existsSync(weCloneProxyConfigPath)) {
3804
+ fs9.unlinkSync(weCloneProxyConfigPath);
3805
3805
  notes.push(`Removed WeClone proxy config: ${weCloneProxyConfigPath}`);
3806
3806
  }
3807
3807
  } catch (err) {
@@ -3871,7 +3871,7 @@ function hermesConfigPath(profile) {
3871
3871
  const profilesRoot = path13.join(hermesRoot, "profiles");
3872
3872
  if (safeProfile === "default") {
3873
3873
  const defaultProfileDir = path13.join(profilesRoot, safeProfile);
3874
- if (isFile(rootConfigPath) || !fs8.existsSync(rootConfigPath) && !isDirectory(defaultProfileDir)) {
3874
+ if (isFile(rootConfigPath) || !fs9.existsSync(rootConfigPath) && !isDirectory(defaultProfileDir)) {
3875
3875
  return rootConfigPath;
3876
3876
  }
3877
3877
  }
@@ -3886,21 +3886,21 @@ function hermesConfigPath(profile) {
3886
3886
  }
3887
3887
  function isDirectory(filePath) {
3888
3888
  try {
3889
- return fs8.statSync(filePath).isDirectory();
3889
+ return fs9.statSync(filePath).isDirectory();
3890
3890
  } catch {
3891
3891
  return false;
3892
3892
  }
3893
3893
  }
3894
3894
  function isFile(filePath) {
3895
3895
  try {
3896
- return fs8.statSync(filePath).isFile();
3896
+ return fs9.statSync(filePath).isFile();
3897
3897
  } catch {
3898
3898
  return false;
3899
3899
  }
3900
3900
  }
3901
3901
  function hermesConfigTarget(filePath) {
3902
3902
  try {
3903
- return fs8.realpathSync.native(filePath);
3903
+ return fs9.realpathSync.native(filePath);
3904
3904
  } catch {
3905
3905
  return path13.resolve(filePath);
3906
3906
  }
@@ -3966,9 +3966,9 @@ function sanitizeHermesPort(port) {
3966
3966
  return numeric;
3967
3967
  }
3968
3968
  function writeSecretFileSync(filePath, data) {
3969
- fs8.writeFileSync(filePath, data, { mode: 384 });
3969
+ fs9.writeFileSync(filePath, data, { mode: 384 });
3970
3970
  try {
3971
- fs8.chmodSync(filePath, 384);
3971
+ fs9.chmodSync(filePath, 384);
3972
3972
  } catch {
3973
3973
  }
3974
3974
  }
@@ -3994,11 +3994,11 @@ function upsertHermesConfig(opts) {
3994
3994
  ` port: ${safePort}`,
3995
3995
  ` token: "${opts.token}"`
3996
3996
  ].join("\n");
3997
- if (!fs8.existsSync(cfgPath)) {
3997
+ if (!fs9.existsSync(cfgPath)) {
3998
3998
  writeSecretFileSync(cfgPath, block + "\n");
3999
3999
  return { updated: true, skipped: false, configPath: cfgPath, priorContent: null };
4000
4000
  }
4001
- const raw = fs8.readFileSync(cfgPath, "utf8");
4001
+ const raw = fs9.readFileSync(cfgPath, "utf8");
4002
4002
  const hasRemnicBlock = /^remnic:/m.test(raw);
4003
4003
  if (!hasRemnicBlock) {
4004
4004
  const separator = raw.endsWith("\n") ? "\n" : "\n\n";
@@ -4101,7 +4101,7 @@ function removeHermesConfig(opts) {
4101
4101
  };
4102
4102
  }
4103
4103
  function removeHermesConfigFile(cfgPath) {
4104
- if (!fs8.existsSync(cfgPath)) {
4104
+ if (!fs9.existsSync(cfgPath)) {
4105
4105
  return {
4106
4106
  updated: false,
4107
4107
  skipped: true,
@@ -4109,7 +4109,7 @@ function removeHermesConfigFile(cfgPath) {
4109
4109
  configPath: cfgPath
4110
4110
  };
4111
4111
  }
4112
- const raw = fs8.readFileSync(cfgPath, "utf8");
4112
+ const raw = fs9.readFileSync(cfgPath, "utf8");
4113
4113
  if (!/^remnic:/m.test(raw)) {
4114
4114
  return {
4115
4115
  updated: false,
@@ -4210,11 +4210,11 @@ async function doctorConnector(connectorId) {
4210
4210
  const checks = [];
4211
4211
  checks.push({
4212
4212
  name: "Config file",
4213
- ok: fs8.existsSync(configPath),
4213
+ ok: fs9.existsSync(configPath),
4214
4214
  detail: configPath
4215
4215
  });
4216
4216
  try {
4217
- const raw = fs8.readFileSync(configPath, "utf8");
4217
+ const raw = fs9.readFileSync(configPath, "utf8");
4218
4218
  JSON.parse(raw);
4219
4219
  checks.push({ name: "Config valid", ok: true, detail: "OK" });
4220
4220
  } catch (e) {
@@ -4238,7 +4238,7 @@ async function doctorConnector(connectorId) {
4238
4238
  }
4239
4239
  const memoryDir = instance.config.memoryDir;
4240
4240
  if (memoryDir) {
4241
- if (fs8.existsSync(memoryDir)) {
4241
+ if (fs9.existsSync(memoryDir)) {
4242
4242
  checks.push({ name: "Memory directory", ok: true, detail: memoryDir });
4243
4243
  } else {
4244
4244
  checks.push({ name: "Memory directory", ok: false, detail: `Not found: ${memoryDir}` });
@@ -4271,7 +4271,7 @@ function resolveCodexMemoryExtensionPaths(codexHomeOverride) {
4271
4271
  function locatePluginCodexExtensionSource(override) {
4272
4272
  if (override && typeof override === "string" && override.trim().length > 0) {
4273
4273
  const resolved = path13.resolve(override.trim());
4274
- if (fs8.existsSync(resolved) && fs8.statSync(resolved).isDirectory()) {
4274
+ if (fs9.existsSync(resolved) && fs9.statSync(resolved).isDirectory()) {
4275
4275
  return resolved;
4276
4276
  }
4277
4277
  throw new Error(`Codex extension source directory not found: ${resolved}`);
@@ -4288,12 +4288,12 @@ function locatePluginCodexExtensionSource(override) {
4288
4288
  const moduleDir = path13.dirname(fileURLToPath(import.meta.url));
4289
4289
  const bundledCandidate = path13.join(moduleDir, "codex");
4290
4290
  searched.push(bundledCandidate);
4291
- if (fs8.existsSync(bundledCandidate) && fs8.statSync(bundledCandidate).isDirectory()) {
4291
+ if (fs9.existsSync(bundledCandidate) && fs9.statSync(bundledCandidate).isDirectory()) {
4292
4292
  return bundledCandidate;
4293
4293
  }
4294
4294
  const distConnectorsCandidate = path13.join(moduleDir, "connectors", "codex");
4295
4295
  searched.push(distConnectorsCandidate);
4296
- if (fs8.existsSync(distConnectorsCandidate) && fs8.statSync(distConnectorsCandidate).isDirectory()) {
4296
+ if (fs9.existsSync(distConnectorsCandidate) && fs9.statSync(distConnectorsCandidate).isDirectory()) {
4297
4297
  return distConnectorsCandidate;
4298
4298
  }
4299
4299
  } catch {
@@ -4304,7 +4304,7 @@ function locatePluginCodexExtensionSource(override) {
4304
4304
  const pluginPkgRoot = path13.dirname(pluginPkgJsonPath);
4305
4305
  const candidate = path13.join(pluginPkgRoot, EXTENSION_SUBPATH);
4306
4306
  searched.push(candidate);
4307
- if (fs8.existsSync(candidate) && fs8.statSync(candidate).isDirectory()) {
4307
+ if (fs9.existsSync(candidate) && fs9.statSync(candidate).isDirectory()) {
4308
4308
  return candidate;
4309
4309
  }
4310
4310
  } catch {
@@ -4321,7 +4321,7 @@ function locatePluginCodexExtensionSource(override) {
4321
4321
  EXTENSION_SUBPATH
4322
4322
  );
4323
4323
  searched.push(candidate);
4324
- if (fs8.existsSync(candidate) && fs8.statSync(candidate).isDirectory()) {
4324
+ if (fs9.existsSync(candidate) && fs9.statSync(candidate).isDirectory()) {
4325
4325
  return candidate;
4326
4326
  }
4327
4327
  const parent = path13.dirname(dir);
@@ -4341,7 +4341,7 @@ function locatePluginCodexExtensionSource(override) {
4341
4341
  for (let depth = 0; depth < 12; depth += 1) {
4342
4342
  const candidate = path13.join(dir, WORKSPACE_RELATIVE_PATH);
4343
4343
  searched.push(candidate);
4344
- if (fs8.existsSync(candidate) && fs8.statSync(candidate).isDirectory()) {
4344
+ if (fs9.existsSync(candidate) && fs9.statSync(candidate).isDirectory()) {
4345
4345
  return candidate;
4346
4346
  }
4347
4347
  const parent = path13.dirname(dir);
@@ -4355,15 +4355,15 @@ function locatePluginCodexExtensionSource(override) {
4355
4355
  }
4356
4356
  function copyDirRecursiveSync(src, dest) {
4357
4357
  let count = 0;
4358
- fs8.mkdirSync(dest, { recursive: true });
4359
- const entries = fs8.readdirSync(src, { withFileTypes: true });
4358
+ fs9.mkdirSync(dest, { recursive: true });
4359
+ const entries = fs9.readdirSync(src, { withFileTypes: true });
4360
4360
  for (const entry of entries) {
4361
4361
  const from = path13.join(src, entry.name);
4362
4362
  const to = path13.join(dest, entry.name);
4363
4363
  if (entry.isDirectory()) {
4364
4364
  count += copyDirRecursiveSync(from, to);
4365
4365
  } else if (entry.isFile()) {
4366
- fs8.copyFileSync(from, to);
4366
+ fs9.copyFileSync(from, to);
4367
4367
  count += 1;
4368
4368
  }
4369
4369
  }
@@ -4372,22 +4372,22 @@ function copyDirRecursiveSync(src, dest) {
4372
4372
  function installCodexMemoryExtension(options = {}) {
4373
4373
  const paths = resolveCodexMemoryExtensionPaths(options.codexHome ?? null);
4374
4374
  const sourceDir = locatePluginCodexExtensionSource(options.sourceDir ?? null);
4375
- fs8.mkdirSync(paths.extensionsRoot, { recursive: true });
4375
+ fs9.mkdirSync(paths.extensionsRoot, { recursive: true });
4376
4376
  const tmpPrefix = `.${REMNIC_EXTENSION_DIR_NAME}.tmp-`;
4377
4377
  const STALE_TMP_THRESHOLD_MS = 10 * 60 * 1e3;
4378
4378
  const now = Date.now();
4379
4379
  try {
4380
- const existingEntries = fs8.readdirSync(paths.extensionsRoot);
4380
+ const existingEntries = fs9.readdirSync(paths.extensionsRoot);
4381
4381
  for (const entry of existingEntries) {
4382
4382
  if (!entry.startsWith(tmpPrefix)) continue;
4383
4383
  const stalePath = path13.join(paths.extensionsRoot, entry);
4384
4384
  try {
4385
- const stat = fs8.statSync(stalePath);
4385
+ const stat = fs9.statSync(stalePath);
4386
4386
  const ageMs = now - stat.mtimeMs;
4387
4387
  if (ageMs < STALE_TMP_THRESHOLD_MS) {
4388
4388
  continue;
4389
4389
  }
4390
- fs8.rmSync(stalePath, { recursive: true, force: true });
4390
+ fs9.rmSync(stalePath, { recursive: true, force: true });
4391
4391
  } catch {
4392
4392
  }
4393
4393
  }
@@ -4403,16 +4403,16 @@ function installCodexMemoryExtension(options = {}) {
4403
4403
  try {
4404
4404
  filesCopied = copyDirRecursiveSync(sourceDir, tmpDir);
4405
4405
  const backupDir = `${paths.remnicExtensionDir}.bak-${Date.now()}`;
4406
- const hadExisting = fs8.existsSync(paths.remnicExtensionDir);
4406
+ const hadExisting = fs9.existsSync(paths.remnicExtensionDir);
4407
4407
  if (hadExisting) {
4408
- fs8.renameSync(paths.remnicExtensionDir, backupDir);
4408
+ fs9.renameSync(paths.remnicExtensionDir, backupDir);
4409
4409
  }
4410
4410
  try {
4411
- fs8.renameSync(tmpDir, paths.remnicExtensionDir);
4411
+ fs9.renameSync(tmpDir, paths.remnicExtensionDir);
4412
4412
  } catch (renameErr) {
4413
4413
  if (hadExisting) {
4414
4414
  try {
4415
- fs8.renameSync(backupDir, paths.remnicExtensionDir);
4415
+ fs9.renameSync(backupDir, paths.remnicExtensionDir);
4416
4416
  } catch {
4417
4417
  }
4418
4418
  }
@@ -4421,7 +4421,7 @@ function installCodexMemoryExtension(options = {}) {
4421
4421
  commitFn = () => {
4422
4422
  if (hadExisting) {
4423
4423
  try {
4424
- fs8.rmSync(backupDir, { recursive: true, force: true });
4424
+ fs9.rmSync(backupDir, { recursive: true, force: true });
4425
4425
  } catch {
4426
4426
  }
4427
4427
  }
@@ -4429,25 +4429,25 @@ function installCodexMemoryExtension(options = {}) {
4429
4429
  rollbackFn = () => {
4430
4430
  if (hadExisting) {
4431
4431
  try {
4432
- if (fs8.existsSync(paths.remnicExtensionDir)) {
4433
- fs8.rmSync(paths.remnicExtensionDir, { recursive: true, force: true });
4432
+ if (fs9.existsSync(paths.remnicExtensionDir)) {
4433
+ fs9.rmSync(paths.remnicExtensionDir, { recursive: true, force: true });
4434
4434
  }
4435
- fs8.renameSync(backupDir, paths.remnicExtensionDir);
4435
+ fs9.renameSync(backupDir, paths.remnicExtensionDir);
4436
4436
  } catch {
4437
4437
  }
4438
4438
  } else {
4439
4439
  try {
4440
- if (fs8.existsSync(paths.remnicExtensionDir)) {
4441
- fs8.rmSync(paths.remnicExtensionDir, { recursive: true, force: true });
4440
+ if (fs9.existsSync(paths.remnicExtensionDir)) {
4441
+ fs9.rmSync(paths.remnicExtensionDir, { recursive: true, force: true });
4442
4442
  }
4443
4443
  } catch {
4444
4444
  }
4445
4445
  }
4446
4446
  };
4447
4447
  } catch (err) {
4448
- if (fs8.existsSync(tmpDir)) {
4448
+ if (fs9.existsSync(tmpDir)) {
4449
4449
  try {
4450
- fs8.rmSync(tmpDir, { recursive: true, force: true });
4450
+ fs9.rmSync(tmpDir, { recursive: true, force: true });
4451
4451
  } catch {
4452
4452
  }
4453
4453
  }
@@ -4465,8 +4465,8 @@ function installCodexMemoryExtension(options = {}) {
4465
4465
  function removeCodexMemoryExtension(options = {}) {
4466
4466
  const paths = resolveCodexMemoryExtensionPaths(options.codexHome ?? null);
4467
4467
  let removed = false;
4468
- if (fs8.existsSync(paths.remnicExtensionDir)) {
4469
- fs8.rmSync(paths.remnicExtensionDir, { recursive: true, force: true });
4468
+ if (fs9.existsSync(paths.remnicExtensionDir)) {
4469
+ fs9.rmSync(paths.remnicExtensionDir, { recursive: true, force: true });
4470
4470
  removed = true;
4471
4471
  }
4472
4472
  return { ...paths, removed };
@@ -4494,8 +4494,8 @@ function resolveWeCloneProxyConfigPath() {
4494
4494
  }
4495
4495
  function readWeCloneProxyConfigIfExists(configPath) {
4496
4496
  try {
4497
- if (!fs8.existsSync(configPath)) return null;
4498
- return fs8.readFileSync(configPath, "utf8");
4497
+ if (!fs9.existsSync(configPath)) return null;
4498
+ return fs9.readFileSync(configPath, "utf8");
4499
4499
  } catch {
4500
4500
  return null;
4501
4501
  }
@@ -4615,7 +4615,7 @@ function buildWeCloneProxyConfig(args) {
4615
4615
  }
4616
4616
 
4617
4617
  // src/spaces/index.ts
4618
- import fs9 from "fs";
4618
+ import fs10 from "fs";
4619
4619
  import path14 from "path";
4620
4620
  import crypto6 from "crypto";
4621
4621
  var MANIFEST_VERSION = 1;
@@ -4628,7 +4628,7 @@ function getManifestPath(baseDir) {
4628
4628
  }
4629
4629
  function loadManifest(baseDir, memoryDirOverride) {
4630
4630
  const manifestPath2 = getManifestPath(baseDir);
4631
- if (!fs9.existsSync(manifestPath2)) {
4631
+ if (!fs10.existsSync(manifestPath2)) {
4632
4632
  const personalSpace = createPersonalSpace(baseDir, memoryDirOverride);
4633
4633
  const manifest = {
4634
4634
  activeSpaceId: personalSpace.id,
@@ -4638,19 +4638,19 @@ function loadManifest(baseDir, memoryDirOverride) {
4638
4638
  saveManifest(manifest, baseDir);
4639
4639
  return manifest;
4640
4640
  }
4641
- const raw = JSON.parse(fs9.readFileSync(manifestPath2, "utf8"));
4641
+ const raw = JSON.parse(fs10.readFileSync(manifestPath2, "utf8"));
4642
4642
  return raw;
4643
4643
  }
4644
4644
  function saveManifest(manifest, baseDir) {
4645
4645
  const manifestPath2 = getManifestPath(baseDir);
4646
- fs9.mkdirSync(path14.dirname(manifestPath2), { recursive: true });
4647
- fs9.writeFileSync(manifestPath2, JSON.stringify(manifest, null, 2) + "\n");
4646
+ fs10.mkdirSync(path14.dirname(manifestPath2), { recursive: true });
4647
+ fs10.writeFileSync(manifestPath2, JSON.stringify(manifest, null, 2) + "\n");
4648
4648
  }
4649
4649
  function createPersonalSpace(baseDir, memoryDirOverride) {
4650
4650
  const homeDir = baseDir ?? resolveHomeDir();
4651
4651
  const standalonePath = path14.join(homeDir, ".engram", "memory");
4652
4652
  const openclawPath = path14.join(homeDir, ".openclaw", "workspace", "memory", "local");
4653
- const memoryDir = memoryDirOverride ?? readEnvVar("ENGRAM_MEMORY_DIR") ?? (fs9.existsSync(standalonePath) ? standalonePath : fs9.existsSync(openclawPath) ? openclawPath : standalonePath);
4653
+ const memoryDir = memoryDirOverride ?? readEnvVar("ENGRAM_MEMORY_DIR") ?? (fs10.existsSync(standalonePath) ? standalonePath : fs10.existsSync(openclawPath) ? openclawPath : standalonePath);
4654
4654
  const now = (/* @__PURE__ */ new Date()).toISOString();
4655
4655
  return {
4656
4656
  id: "personal",
@@ -4699,7 +4699,7 @@ function createSpace(options) {
4699
4699
  owner: readEnvVar("USER"),
4700
4700
  parentSpaceId: options.parentSpaceId
4701
4701
  };
4702
- fs9.mkdirSync(memoryDir, { recursive: true });
4702
+ fs10.mkdirSync(memoryDir, { recursive: true });
4703
4703
  manifest.spaces.push(space);
4704
4704
  manifest.updatedAt = now;
4705
4705
  saveManifest(manifest, options.baseDir);
@@ -4874,31 +4874,31 @@ function mergeSpaces(sourceSpaceId, targetSpaceId, options) {
4874
4874
  }
4875
4875
  function getAuditLog(baseDir) {
4876
4876
  const auditPath = path14.join(getSpacesDir(baseDir), "audit.jsonl");
4877
- if (!fs9.existsSync(auditPath)) return [];
4878
- const lines = fs9.readFileSync(auditPath, "utf8").trim().split("\n");
4877
+ if (!fs10.existsSync(auditPath)) return [];
4878
+ const lines = fs10.readFileSync(auditPath, "utf8").trim().split("\n");
4879
4879
  return lines.filter((l) => l.trim()).map((l) => JSON.parse(l));
4880
4880
  }
4881
4881
  function appendAudit(entry, baseDir) {
4882
4882
  const auditPath = path14.join(getSpacesDir(baseDir), "audit.jsonl");
4883
- fs9.mkdirSync(path14.dirname(auditPath), { recursive: true });
4883
+ fs10.mkdirSync(path14.dirname(auditPath), { recursive: true });
4884
4884
  const full = {
4885
4885
  id: crypto6.randomUUID(),
4886
4886
  timestamp: (/* @__PURE__ */ new Date()).toISOString(),
4887
4887
  ...entry
4888
4888
  };
4889
- fs9.appendFileSync(auditPath, JSON.stringify(full) + "\n");
4889
+ fs10.appendFileSync(auditPath, JSON.stringify(full) + "\n");
4890
4890
  }
4891
4891
  function copyMemories(sourceDir, targetDir, options) {
4892
4892
  let merged = 0;
4893
4893
  const conflicts = [];
4894
4894
  let skipped = 0;
4895
- if (!fs9.existsSync(sourceDir)) {
4895
+ if (!fs10.existsSync(sourceDir)) {
4896
4896
  return { merged: 0, conflicts: [], skipped: 0 };
4897
4897
  }
4898
- fs9.mkdirSync(targetDir, { recursive: true });
4898
+ fs10.mkdirSync(targetDir, { recursive: true });
4899
4899
  const sourceFiles = walkMd2(sourceDir);
4900
4900
  for (const sourcePath of sourceFiles) {
4901
- const content = fs9.readFileSync(sourcePath, "utf8");
4901
+ const content = fs10.readFileSync(sourcePath, "utf8");
4902
4902
  const relativePath = path14.relative(sourceDir, sourcePath);
4903
4903
  const targetPath = path14.join(targetDir, relativePath);
4904
4904
  const sourceHash = hashContent4(content);
@@ -4909,8 +4909,8 @@ function copyMemories(sourceDir, targetDir, options) {
4909
4909
  continue;
4910
4910
  }
4911
4911
  }
4912
- if (fs9.existsSync(targetPath) && !options?.force) {
4913
- const targetContent = fs9.readFileSync(targetPath, "utf8");
4912
+ if (fs10.existsSync(targetPath) && !options?.force) {
4913
+ const targetContent = fs10.readFileSync(targetPath, "utf8");
4914
4914
  const targetHash = hashContent4(targetContent);
4915
4915
  if (sourceHash !== targetHash) {
4916
4916
  conflicts.push({
@@ -4926,8 +4926,8 @@ function copyMemories(sourceDir, targetDir, options) {
4926
4926
  skipped++;
4927
4927
  continue;
4928
4928
  }
4929
- fs9.mkdirSync(path14.dirname(targetPath), { recursive: true });
4930
- fs9.writeFileSync(targetPath, content);
4929
+ fs10.mkdirSync(path14.dirname(targetPath), { recursive: true });
4930
+ fs10.writeFileSync(targetPath, content);
4931
4931
  merged++;
4932
4932
  }
4933
4933
  return { merged, conflicts, skipped };
@@ -4938,7 +4938,7 @@ function hashContent4(content) {
4938
4938
  function walkMd2(dir) {
4939
4939
  const results = [];
4940
4940
  function walk(d) {
4941
- for (const entry of fs9.readdirSync(d, { withFileTypes: true })) {
4941
+ for (const entry of fs10.readdirSync(d, { withFileTypes: true })) {
4942
4942
  const fullPath = path14.join(d, entry.name);
4943
4943
  if (entry.isDirectory()) {
4944
4944
  walk(fullPath);
@@ -5067,7 +5067,7 @@ var REMNIC_RECALL_DECISION_RULES = `## When to Use Recall vs Direct Read
5067
5067
  `;
5068
5068
 
5069
5069
  // src/memory-extension/codex-publisher.ts
5070
- import fs10 from "fs";
5070
+ import fs11 from "fs";
5071
5071
  import os2 from "os";
5072
5072
  import path15 from "path";
5073
5073
  var REMNIC_EXTENSION_DIR_NAME2 = "remnic";
@@ -5086,7 +5086,7 @@ var CodexMemoryExtensionPublisher = class {
5086
5086
  async isHostAvailable() {
5087
5087
  try {
5088
5088
  const home = readEnvVar("CODEX_HOME")?.trim() || path15.join(resolveHomeDir(), ".codex");
5089
- return fs10.existsSync(home);
5089
+ return fs11.existsSync(home);
5090
5090
  } catch {
5091
5091
  return false;
5092
5092
  }
@@ -5140,18 +5140,18 @@ When running inside the Codex phase-2 consolidation sandbox:
5140
5140
  const filesWritten = [];
5141
5141
  const skipped = [];
5142
5142
  ctx.log.info(`Publishing Codex memory extension to ${extensionRoot}`);
5143
- fs10.mkdirSync(extensionRoot, { recursive: true });
5143
+ fs11.mkdirSync(extensionRoot, { recursive: true });
5144
5144
  const content = await this.renderInstructions(ctx);
5145
5145
  const tmpPath = `${instructionsPath}.tmp-${process.pid}-${Date.now()}`;
5146
5146
  try {
5147
- fs10.writeFileSync(tmpPath, content, "utf-8");
5148
- fs10.renameSync(tmpPath, instructionsPath);
5147
+ fs11.writeFileSync(tmpPath, content, "utf-8");
5148
+ fs11.renameSync(tmpPath, instructionsPath);
5149
5149
  filesWritten.push(instructionsPath);
5150
5150
  ctx.log.info(`Wrote ${instructionsPath}`);
5151
5151
  } catch (err) {
5152
5152
  try {
5153
- if (fs10.existsSync(tmpPath)) {
5154
- fs10.unlinkSync(tmpPath);
5153
+ if (fs11.existsSync(tmpPath)) {
5154
+ fs11.unlinkSync(tmpPath);
5155
5155
  }
5156
5156
  } catch {
5157
5157
  }
@@ -5166,8 +5166,8 @@ When running inside the Codex phase-2 consolidation sandbox:
5166
5166
  }
5167
5167
  async unpublish() {
5168
5168
  const extensionRoot = await this.resolveExtensionRoot();
5169
- if (fs10.existsSync(extensionRoot)) {
5170
- fs10.rmSync(extensionRoot, { recursive: true, force: true });
5169
+ if (fs11.existsSync(extensionRoot)) {
5170
+ fs11.rmSync(extensionRoot, { recursive: true, force: true });
5171
5171
  }
5172
5172
  }
5173
5173
  };
@@ -5477,7 +5477,7 @@ async function runEnrichmentPipeline(entities, registry, config, log2) {
5477
5477
 
5478
5478
  // src/enrichment/audit.ts
5479
5479
  import { mkdir, readFile, appendFile } from "fs/promises";
5480
- import { existsSync as existsSync2 } from "fs";
5480
+ import { existsSync } from "fs";
5481
5481
  import path16 from "path";
5482
5482
  var AUDIT_FILENAME = "enrichment-audit.jsonl";
5483
5483
  function auditFilePath(auditDir) {
@@ -5490,7 +5490,7 @@ async function appendAuditEntry(auditDir, entry) {
5490
5490
  }
5491
5491
  async function readAuditLog(auditDir, since) {
5492
5492
  const filePath = auditFilePath(auditDir);
5493
- if (!existsSync2(filePath)) return [];
5493
+ if (!existsSync(filePath)) return [];
5494
5494
  const raw = await readFile(filePath, "utf-8");
5495
5495
  const entries = [];
5496
5496
  for (const line of raw.split("\n")) {