@remnic/core 9.3.652 → 9.3.654

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 (249) hide show
  1. package/dist/access-cli.js +17 -17
  2. package/dist/access-http.d.ts +4 -4
  3. package/dist/access-http.js +11 -11
  4. package/dist/access-mcp.d.ts +4 -4
  5. package/dist/access-mcp.js +10 -10
  6. package/dist/access-schema.d.ts +15 -12
  7. package/dist/access-schema.js +1 -1
  8. package/dist/{access-service-CdJFd3_b.d.ts → access-service-C8A5hoXJ.d.ts} +11 -2
  9. package/dist/access-service.d.ts +4 -4
  10. package/dist/access-service.js +8 -8
  11. package/dist/action-confidence.d.ts +1 -1
  12. package/dist/active-memory-bridge.d.ts +1 -1
  13. package/dist/active-recall.d.ts +1 -1
  14. package/dist/active-recall.js +1 -1
  15. package/dist/behavior-learner.d.ts +1 -1
  16. package/dist/behavior-signals.d.ts +1 -1
  17. package/dist/bootstrap.d.ts +3 -3
  18. package/dist/briefing.d.ts +1 -1
  19. package/dist/briefing.js +3 -3
  20. package/dist/buffer-surprise-report.d.ts +1 -1
  21. package/dist/buffer.d.ts +1 -1
  22. package/dist/calibration.d.ts +1 -1
  23. package/dist/causal-behavior.d.ts +1 -1
  24. package/dist/causal-consolidation.d.ts +1 -1
  25. package/dist/causal-consolidation.js +4 -4
  26. package/dist/{chunk-KJDKZVF3.js → chunk-2DSTAWNZ.js} +3 -3
  27. package/dist/chunk-3RACUBII.js +212 -0
  28. package/dist/chunk-3RACUBII.js.map +1 -0
  29. package/dist/{chunk-Y7NWBBHV.js → chunk-6CVI6BP6.js} +2 -2
  30. package/dist/{chunk-R3PQUPQ4.js → chunk-6IMKOIZ6.js} +85 -3
  31. package/dist/chunk-6IMKOIZ6.js.map +1 -0
  32. package/dist/{chunk-WTI35CVJ.js → chunk-BJA6DQOC.js} +5 -5
  33. package/dist/{chunk-GI45G4BK.js → chunk-BP2EV6W5.js} +3 -3
  34. package/dist/{chunk-WLGE6KEO.js → chunk-DBM2BD22.js} +3 -3
  35. package/dist/{chunk-IENGGY2C.js → chunk-ENV6RDTD.js} +2 -2
  36. package/dist/{chunk-BEMWL2FZ.js → chunk-FVRBLJP6.js} +2 -2
  37. package/dist/{chunk-H3PHZLMF.js → chunk-GKKAXVAJ.js} +20 -11
  38. package/dist/chunk-GKKAXVAJ.js.map +1 -0
  39. package/dist/{chunk-MGGNV3H2.js → chunk-GPW2E4LN.js} +23 -8
  40. package/dist/chunk-GPW2E4LN.js.map +1 -0
  41. package/dist/{chunk-KWM33SPU.js → chunk-JMQSYGXS.js} +2 -2
  42. package/dist/{chunk-WSFNYPAT.js → chunk-JYN7QNTA.js} +87 -18
  43. package/dist/chunk-JYN7QNTA.js.map +1 -0
  44. package/dist/{chunk-AJE7FJVE.js → chunk-K6X553JB.js} +2 -2
  45. package/dist/{chunk-5V3TAB7D.js → chunk-LJCEWTG3.js} +19 -8
  46. package/dist/{chunk-5V3TAB7D.js.map → chunk-LJCEWTG3.js.map} +1 -1
  47. package/dist/{chunk-YOVKPOMD.js → chunk-NAZWHTYV.js} +13 -6
  48. package/dist/chunk-NAZWHTYV.js.map +1 -0
  49. package/dist/{chunk-XMN6MMTU.js → chunk-NCGWXCSW.js} +2 -2
  50. package/dist/{chunk-C43KEWEV.js → chunk-NE2JBMLN.js} +1 -1
  51. package/dist/chunk-NE2JBMLN.js.map +1 -0
  52. package/dist/{chunk-TCX4WLKK.js → chunk-OL2364SB.js} +2020 -368
  53. package/dist/chunk-OL2364SB.js.map +1 -0
  54. package/dist/{chunk-JF7SFXTG.js → chunk-QKK64Z6M.js} +2 -2
  55. package/dist/{chunk-IVYSVAC6.js → chunk-QW6JZO5P.js} +2 -2
  56. package/dist/{chunk-EHQLDFSH.js → chunk-RGPUQ66K.js} +2 -2
  57. package/dist/{chunk-CFOCZPIQ.js → chunk-T2C6QJG2.js} +2 -2
  58. package/dist/{chunk-4HYSMH7D.js → chunk-UAU5U5ML.js} +3 -2
  59. package/dist/chunk-UAU5U5ML.js.map +1 -0
  60. package/dist/{chunk-V4UDXYGG.js → chunk-XWQ6ERUG.js} +2 -2
  61. package/dist/{chunk-IJHLC5CH.js → chunk-Y2RIIF6H.js} +32 -22
  62. package/dist/{chunk-IJHLC5CH.js.map → chunk-Y2RIIF6H.js.map} +1 -1
  63. package/dist/{chunk-C63WC454.js → chunk-YLZLPVKK.js} +22 -1
  64. package/dist/chunk-YLZLPVKK.js.map +1 -0
  65. package/dist/{chunk-RZOBQ23O.js → chunk-Z5MQI7K2.js} +2 -2
  66. package/dist/{chunk-PRQXUSQV.js → chunk-ZCORQM74.js} +2 -2
  67. package/dist/{cli-DDo7Qgs-.d.ts → cli-uQgvDFNE.d.ts} +3 -3
  68. package/dist/cli.d.ts +5 -5
  69. package/dist/cli.js +23 -23
  70. package/dist/compounding/engine.d.ts +1 -1
  71. package/dist/compounding/engine.js +3 -3
  72. package/dist/compounding/preference-consolidator.d.ts +1 -1
  73. package/dist/compression-optimizer.d.ts +1 -1
  74. package/dist/config.d.ts +1 -1
  75. package/dist/config.js +1 -1
  76. package/dist/connectors/codex-materialize-runner.d.ts +1 -1
  77. package/dist/connectors/codex-materialize-runner.js +3 -3
  78. package/dist/connectors/codex-materialize.d.ts +1 -1
  79. package/dist/connectors/index.d.ts +1 -1
  80. package/dist/connectors/index.js +3 -3
  81. package/dist/consolidation-provenance-check.d.ts +1 -1
  82. package/dist/consolidation-undo.d.ts +1 -1
  83. package/dist/contradiction/index.d.ts +19 -1
  84. package/dist/contradiction/index.js +1 -1
  85. package/dist/conversation-index/backend.d.ts +1 -1
  86. package/dist/conversation-index/chunker.d.ts +1 -1
  87. package/dist/conversation-index/faiss-adapter.d.ts +1 -1
  88. package/dist/conversation-index/indexer.d.ts +1 -1
  89. package/dist/conversation-index/search.d.ts +1 -1
  90. package/dist/day-summary.d.ts +1 -1
  91. package/dist/delinearize.d.ts +1 -1
  92. package/dist/direct-answer-wiring.d.ts +1 -1
  93. package/dist/direct-answer.d.ts +1 -1
  94. package/dist/embedding-fallback.d.ts +1 -1
  95. package/dist/enrichment/index.d.ts +1 -1
  96. package/dist/entity-retrieval.d.ts +1 -1
  97. package/dist/entity-retrieval.js +3 -3
  98. package/dist/entity-schema.d.ts +1 -1
  99. package/dist/explicit-capture.d.ts +3 -3
  100. package/dist/explicit-capture.js +1 -1
  101. package/dist/extraction-judge-telemetry.d.ts +1 -1
  102. package/dist/extraction-judge-training.d.ts +1 -1
  103. package/dist/extraction-judge.d.ts +1 -1
  104. package/dist/extraction.d.ts +1 -1
  105. package/dist/fallback-llm.d.ts +1 -1
  106. package/dist/identity-continuity.d.ts +1 -1
  107. package/dist/importance.d.ts +1 -1
  108. package/dist/index.d.ts +8 -8
  109. package/dist/index.js +31 -29
  110. package/dist/index.js.map +1 -1
  111. package/dist/intent.d.ts +1 -1
  112. package/dist/lcm/engine.d.ts +1 -1
  113. package/dist/lcm/index.d.ts +1 -1
  114. package/dist/lcm/tools.d.ts +1 -1
  115. package/dist/lifecycle.d.ts +1 -1
  116. package/dist/live-connectors-runner.d.ts +1 -1
  117. package/dist/local-llm.d.ts +1 -1
  118. package/dist/maintenance/memory-governance.d.ts +1 -1
  119. package/dist/maintenance/memory-governance.js +3 -3
  120. package/dist/maintenance/rebuild-memory-lifecycle-ledger.js +3 -3
  121. package/dist/maintenance/rebuild-memory-projection.js +4 -4
  122. package/dist/mcp-memory-inspector-app.d.ts +4 -4
  123. package/dist/memory-action-policy.d.ts +1 -1
  124. package/dist/memory-cache.d.ts +1 -1
  125. package/dist/memory-lifecycle-ledger-utils.d.ts +1 -1
  126. package/dist/memory-projection-store.d.ts +1 -1
  127. package/dist/memory-provenance.d.ts +1 -1
  128. package/dist/memory-worth-outcomes.d.ts +1 -1
  129. package/dist/models-json.d.ts +1 -1
  130. package/dist/namespaces/migrate.d.ts +1 -1
  131. package/dist/namespaces/migrate.js +4 -4
  132. package/dist/namespaces/principal.d.ts +1 -1
  133. package/dist/namespaces/search.d.ts +1 -1
  134. package/dist/namespaces/storage.d.ts +52 -3
  135. package/dist/namespaces/storage.js +9 -5
  136. package/dist/native-knowledge.d.ts +1 -1
  137. package/dist/operator-toolkit.d.ts +1 -1
  138. package/dist/operator-toolkit.js +7 -7
  139. package/dist/{orchestrator-8fTZsa0y.d.ts → orchestrator-B4Y4sWQH.d.ts} +503 -3
  140. package/dist/orchestrator.d.ts +3 -3
  141. package/dist/orchestrator.js +13 -13
  142. package/dist/patterns-cli.d.ts +1 -1
  143. package/dist/policy-runtime.d.ts +1 -1
  144. package/dist/qmd-recall-cache.d.ts +1 -1
  145. package/dist/qmd.d.ts +1 -1
  146. package/dist/recall-disclosure-escalation.d.ts +1 -1
  147. package/dist/recall-explain-renderer.d.ts +1 -1
  148. package/dist/recall-explain-renderer.js +3 -3
  149. package/dist/recall-planner-llm.d.ts +1 -1
  150. package/dist/recall-state.d.ts +1 -1
  151. package/dist/recall-tag-filter.d.ts +1 -1
  152. package/dist/recall-xray-cli.d.ts +1 -1
  153. package/dist/recall-xray-cli.js +4 -4
  154. package/dist/recall-xray-renderer.d.ts +1 -1
  155. package/dist/recall-xray-renderer.js +3 -3
  156. package/dist/recall-xray.d.ts +1 -1
  157. package/dist/recall-xray.js +2 -2
  158. package/dist/{resolution-3SAP4SH2.js → resolution-IDTEBJFS.js} +2 -2
  159. package/dist/resolve-auth-token.d.ts +1 -1
  160. package/dist/resume-bundles.js +2 -2
  161. package/dist/retrieval-agents.d.ts +1 -1
  162. package/dist/retrieval-tiers.d.ts +1 -1
  163. package/dist/routing/engine.d.ts +1 -1
  164. package/dist/routing/store.d.ts +1 -1
  165. package/dist/search/embed-helper.d.ts +1 -1
  166. package/dist/search/factory.d.ts +1 -1
  167. package/dist/search/index.d.ts +1 -1
  168. package/dist/search/lancedb-backend.d.ts +1 -1
  169. package/dist/search/meilisearch-backend.d.ts +1 -1
  170. package/dist/search/noop-backend.d.ts +1 -1
  171. package/dist/search/orama-backend.d.ts +1 -1
  172. package/dist/search/port.d.ts +1 -1
  173. package/dist/search/remote-backend.d.ts +1 -1
  174. package/dist/{semantic-consolidation-DKdYzQOg.d.ts → semantic-consolidation-BKd0Pype.d.ts} +1 -1
  175. package/dist/semantic-consolidation.d.ts +2 -2
  176. package/dist/semantic-consolidation.js +4 -4
  177. package/dist/semantic-rule-promotion.js +3 -3
  178. package/dist/semantic-rule-verifier.d.ts +1 -1
  179. package/dist/semantic-rule-verifier.js +3 -3
  180. package/dist/session-observer-bands.d.ts +1 -1
  181. package/dist/session-observer-state.d.ts +1 -1
  182. package/dist/shared-context/manager.d.ts +1 -1
  183. package/dist/signal.d.ts +1 -1
  184. package/dist/storage.d.ts +1 -1
  185. package/dist/storage.js +2 -2
  186. package/dist/summarizer.d.ts +1 -1
  187. package/dist/summary-snapshot.d.ts +1 -1
  188. package/dist/temporal-supersession.d.ts +1 -1
  189. package/dist/temporal-validity.d.ts +1 -1
  190. package/dist/threading.d.ts +1 -1
  191. package/dist/tier-migration.d.ts +1 -1
  192. package/dist/tier-routing.d.ts +1 -1
  193. package/dist/topics.d.ts +1 -1
  194. package/dist/transcript.d.ts +1 -1
  195. package/dist/{types-D8yUmSik.d.ts → types-BgChEr0M.d.ts} +11 -0
  196. package/dist/types.d.ts +1 -1
  197. package/dist/types.js +1 -1
  198. package/dist/utility-runtime.d.ts +1 -1
  199. package/dist/verified-recall.js +3 -3
  200. package/package.json +1 -1
  201. package/src/access-http.ts +7 -0
  202. package/src/access-mcp.test.ts +70 -1
  203. package/src/access-mcp.ts +19 -2
  204. package/src/access-schema.ts +1 -0
  205. package/src/access-service.ts +12 -0
  206. package/src/briefing.test.ts +70 -0
  207. package/src/briefing.ts +30 -20
  208. package/src/cli.ts +104 -0
  209. package/src/config.test.ts +40 -0
  210. package/src/config.ts +29 -0
  211. package/src/contradiction/contradiction.test.ts +284 -0
  212. package/src/contradiction/resolution.ts +151 -4
  213. package/src/explicit-capture.ts +31 -10
  214. package/src/index.ts +10 -0
  215. package/src/namespaces/catalog.test.ts +3356 -0
  216. package/src/namespaces/catalog.ts +2123 -0
  217. package/src/namespaces/storage.ts +210 -30
  218. package/src/orchestrator-flush.test.ts +300 -0
  219. package/src/orchestrator.ts +851 -240
  220. package/src/types.ts +11 -0
  221. package/dist/chunk-4HYSMH7D.js.map +0 -1
  222. package/dist/chunk-C43KEWEV.js.map +0 -1
  223. package/dist/chunk-C63WC454.js.map +0 -1
  224. package/dist/chunk-H3PHZLMF.js.map +0 -1
  225. package/dist/chunk-MGGNV3H2.js.map +0 -1
  226. package/dist/chunk-ORGWWNJG.js +0 -131
  227. package/dist/chunk-ORGWWNJG.js.map +0 -1
  228. package/dist/chunk-R3PQUPQ4.js.map +0 -1
  229. package/dist/chunk-TCX4WLKK.js.map +0 -1
  230. package/dist/chunk-WSFNYPAT.js.map +0 -1
  231. package/dist/chunk-YOVKPOMD.js.map +0 -1
  232. /package/dist/{chunk-KJDKZVF3.js.map → chunk-2DSTAWNZ.js.map} +0 -0
  233. /package/dist/{chunk-Y7NWBBHV.js.map → chunk-6CVI6BP6.js.map} +0 -0
  234. /package/dist/{chunk-WTI35CVJ.js.map → chunk-BJA6DQOC.js.map} +0 -0
  235. /package/dist/{chunk-GI45G4BK.js.map → chunk-BP2EV6W5.js.map} +0 -0
  236. /package/dist/{chunk-WLGE6KEO.js.map → chunk-DBM2BD22.js.map} +0 -0
  237. /package/dist/{chunk-IENGGY2C.js.map → chunk-ENV6RDTD.js.map} +0 -0
  238. /package/dist/{chunk-BEMWL2FZ.js.map → chunk-FVRBLJP6.js.map} +0 -0
  239. /package/dist/{chunk-KWM33SPU.js.map → chunk-JMQSYGXS.js.map} +0 -0
  240. /package/dist/{chunk-AJE7FJVE.js.map → chunk-K6X553JB.js.map} +0 -0
  241. /package/dist/{chunk-XMN6MMTU.js.map → chunk-NCGWXCSW.js.map} +0 -0
  242. /package/dist/{chunk-JF7SFXTG.js.map → chunk-QKK64Z6M.js.map} +0 -0
  243. /package/dist/{chunk-IVYSVAC6.js.map → chunk-QW6JZO5P.js.map} +0 -0
  244. /package/dist/{chunk-EHQLDFSH.js.map → chunk-RGPUQ66K.js.map} +0 -0
  245. /package/dist/{chunk-CFOCZPIQ.js.map → chunk-T2C6QJG2.js.map} +0 -0
  246. /package/dist/{chunk-V4UDXYGG.js.map → chunk-XWQ6ERUG.js.map} +0 -0
  247. /package/dist/{chunk-RZOBQ23O.js.map → chunk-Z5MQI7K2.js.map} +0 -0
  248. /package/dist/{chunk-PRQXUSQV.js.map → chunk-ZCORQM74.js.map} +0 -0
  249. /package/dist/{resolution-3SAP4SH2.js.map → resolution-IDTEBJFS.js.map} +0 -0
@@ -44,12 +44,12 @@ import {
44
44
  } from "./chunk-HOJZMQ4J.js";
45
45
  import {
46
46
  rebuildMemoryLifecycleLedger
47
- } from "./chunk-KWM33SPU.js";
47
+ } from "./chunk-JMQSYGXS.js";
48
48
  import {
49
49
  rebuildMemoryProjection,
50
50
  repairMemoryProjection,
51
51
  verifyMemoryProjection
52
- } from "./chunk-KJDKZVF3.js";
52
+ } from "./chunk-2DSTAWNZ.js";
53
53
  import {
54
54
  rebuildObservations
55
55
  } from "./chunk-LZZNTPLR.js";
@@ -74,7 +74,7 @@ import {
74
74
  } from "./chunk-EVWIEEKZ.js";
75
75
  import {
76
76
  promoteSemanticRuleFromMemory
77
- } from "./chunk-EHQLDFSH.js";
77
+ } from "./chunk-RGPUQ66K.js";
78
78
  import {
79
79
  resolveAgentAccessAuthToken
80
80
  } from "./chunk-TGQ2NTWH.js";
@@ -82,10 +82,10 @@ import {
82
82
  buildResumeBundleFromState,
83
83
  getResumeBundleStatus,
84
84
  recordResumeBundle
85
- } from "./chunk-RZOBQ23O.js";
85
+ } from "./chunk-Z5MQI7K2.js";
86
86
  import {
87
87
  parseXrayCliOptions
88
- } from "./chunk-WLGE6KEO.js";
88
+ } from "./chunk-DBM2BD22.js";
89
89
  import {
90
90
  runBenchmarkRecall,
91
91
  runOperatorConfigReview,
@@ -93,12 +93,12 @@ import {
93
93
  runOperatorInventory,
94
94
  runOperatorRepair,
95
95
  runOperatorSetup
96
- } from "./chunk-WTI35CVJ.js";
96
+ } from "./chunk-BJA6DQOC.js";
97
97
  import {
98
98
  listNamespaces,
99
99
  runNamespaceMigration,
100
100
  verifyNamespaces
101
- } from "./chunk-GI45G4BK.js";
101
+ } from "./chunk-BP2EV6W5.js";
102
102
  import {
103
103
  collectPatternMemories,
104
104
  explainPatternMemory,
@@ -128,13 +128,13 @@ import {
128
128
  } from "./chunk-TERNBNJB.js";
129
129
  import {
130
130
  searchVerifiedEpisodes
131
- } from "./chunk-JF7SFXTG.js";
131
+ } from "./chunk-QKK64Z6M.js";
132
132
  import {
133
133
  ThreadingManager
134
134
  } from "./chunk-W4RVMTHR.js";
135
135
  import {
136
136
  searchVerifiedSemanticRules
137
- } from "./chunk-AJE7FJVE.js";
137
+ } from "./chunk-K6X553JB.js";
138
138
  import {
139
139
  getWorkProductLedgerStatus,
140
140
  recordWorkProductLedgerEntry,
@@ -210,22 +210,22 @@ import {
210
210
  } from "./chunk-UQ7RN5HK.js";
211
211
  import {
212
212
  parseConfig
213
- } from "./chunk-C63WC454.js";
213
+ } from "./chunk-YLZLPVKK.js";
214
214
  import {
215
215
  getAbstractionNodeStoreStatus
216
216
  } from "./chunk-OADWQ5CR.js";
217
217
  import {
218
218
  EngramAccessHttpServer
219
- } from "./chunk-YOVKPOMD.js";
219
+ } from "./chunk-NAZWHTYV.js";
220
220
  import {
221
221
  WearablesInputError
222
222
  } from "./chunk-7WV3F5DQ.js";
223
223
  import {
224
224
  EngramMcpServer
225
- } from "./chunk-MGGNV3H2.js";
225
+ } from "./chunk-GPW2E4LN.js";
226
226
  import {
227
227
  EngramAccessService
228
- } from "./chunk-5V3TAB7D.js";
228
+ } from "./chunk-LJCEWTG3.js";
229
229
  import {
230
230
  WorkStorage
231
231
  } from "./chunk-GDB4J2H3.js";
@@ -233,13 +233,13 @@ import {
233
233
  parseRecallExplainFormat,
234
234
  renderRecallExplain,
235
235
  renderXray
236
- } from "./chunk-IENGGY2C.js";
236
+ } from "./chunk-ENV6RDTD.js";
237
237
  import {
238
238
  listMemoryGovernanceRuns,
239
239
  readMemoryGovernanceRunArtifact,
240
240
  restoreMemoryGovernanceRun,
241
241
  runMemoryGovernance
242
- } from "./chunk-V4UDXYGG.js";
242
+ } from "./chunk-XWQ6ERUG.js";
243
243
  import {
244
244
  getTrustZoneStoreStatus,
245
245
  promoteTrustZoneRecord,
@@ -254,7 +254,7 @@ import {
254
254
  import {
255
255
  RECALL_DISCLOSURE_LEVELS,
256
256
  isRecallDisclosure
257
- } from "./chunk-C43KEWEV.js";
257
+ } from "./chunk-NE2JBMLN.js";
258
258
  import {
259
259
  getCausalTrajectoryStoreStatus
260
260
  } from "./chunk-SSOMTUCA.js";
@@ -3288,6 +3288,68 @@ function registerCli(api, orchestrator, registerOptions = {}) {
3288
3288
  }
3289
3289
  console.log("\nOK");
3290
3290
  });
3291
+ namespacesCmd.command("rebuild").description(
3292
+ "Rebuild the namespace catalog from disk (issue #1499). Scans configured + dynamic namespace roots safely and rewrites <memoryDir>/state/namespaces.jsonl"
3293
+ ).option("--dry-run", "Show the rebuilt catalog without writing it").option("--apply", "Write the rebuilt catalog to disk").option("--json", "Emit the rebuild result as JSON").action(async (optionsRaw) => {
3294
+ const options = optionsRaw && typeof optionsRaw === "object" ? optionsRaw : {};
3295
+ if (options.dryRun === true && options.apply === true) {
3296
+ throw new Error("Pass only one of --dry-run or --apply, not both.");
3297
+ }
3298
+ const dryRun = options.apply !== true;
3299
+ if (!orchestrator.namespaceCatalog.enabled) {
3300
+ const note = "Namespace catalog is inert: it only runs when namespacesEnabled is true and namespaceCatalogEnabled is not false.";
3301
+ if (options.json === true) {
3302
+ console.log(
3303
+ JSON.stringify(
3304
+ { dryRun, enabled: false, applied: false, records: [], skipped: [], note },
3305
+ null,
3306
+ 2
3307
+ )
3308
+ );
3309
+ } else {
3310
+ console.log(note);
3311
+ }
3312
+ if (!dryRun) {
3313
+ process.exitCode = 1;
3314
+ }
3315
+ return;
3316
+ }
3317
+ const result = await orchestrator.namespaceCatalog.rebuildFromDisk({ dryRun });
3318
+ if (options.json === true) {
3319
+ console.log(JSON.stringify({ enabled: true, ...result }, null, 2));
3320
+ if (!dryRun && result.applied === false) {
3321
+ process.exitCode = 1;
3322
+ }
3323
+ return;
3324
+ }
3325
+ console.log("=== Namespace Catalog Rebuild ===\n");
3326
+ console.log(`mode: ${dryRun ? "dry-run" : "apply"}`);
3327
+ console.log(`namespaces: ${result.records.length}`);
3328
+ for (const record of result.records) {
3329
+ console.log(
3330
+ `${record.namespace}
3331
+ kind: ${record.kind}
3332
+ storage: ${record.storageDir}
3333
+ discovered-by: ${record.discoveredBy}`
3334
+ );
3335
+ }
3336
+ if (result.skipped.length > 0) {
3337
+ console.log("\nSkipped / ambiguous roots:");
3338
+ for (const skip of result.skipped) {
3339
+ console.log(`- ${skip.token} (${skip.reason})${skip.detail ? `: ${skip.detail}` : ""}`);
3340
+ }
3341
+ }
3342
+ if (dryRun) {
3343
+ console.log("\nDRY RUN");
3344
+ } else if (result.applied) {
3345
+ console.log("\nOK");
3346
+ } else {
3347
+ console.log(
3348
+ "\nNOT APPLIED: another rebuild holds the lock; the catalog was NOT rewritten. Retry shortly."
3349
+ );
3350
+ process.exitCode = 1;
3351
+ }
3352
+ });
3291
3353
  cmd.command("export").description("Export Remnic memory to JSON, Markdown bundle, or SQLite").option("--format <format>", "Export format: json|md|sqlite", "json").option("--out <path>", "Output path (dir for json/md, file for sqlite)").option("--include-transcripts", "Include transcripts in export (default: false)").option("--namespace <ns>", "Namespace to export (v3.0+, default: config defaultNamespace)", "").action(async (...args) => {
3292
3354
  const options = args[0] ?? {};
3293
3355
  const format = String(options.format ?? "json");
@@ -6478,7 +6540,7 @@ Semantic consolidation complete. clusters=${result.clustersFound}, consolidated=
6478
6540
  console.error("--verb is required. Must be one of: keep-a, keep-b, merge, both-valid, needs-more-context");
6479
6541
  process.exit(1);
6480
6542
  }
6481
- const { isValidResolutionVerb, executeResolution } = await import("./resolution-3SAP4SH2.js");
6543
+ const { isValidResolutionVerb, executeResolution } = await import("./resolution-IDTEBJFS.js");
6482
6544
  if (!isValidResolutionVerb(verb)) {
6483
6545
  console.error(`Invalid verb: ${verb}. Must be one of: keep-a, keep-b, merge, both-valid, needs-more-context`);
6484
6546
  process.exit(1);
@@ -6495,6 +6557,13 @@ Semantic consolidation complete. clusters=${result.clustersFound}, consolidated=
6495
6557
  return orchestrator.storage;
6496
6558
  }
6497
6559
  return orchestrator.getStorageForNamespace(requested || orchestrator.config.defaultNamespace);
6560
+ },
6561
+ // Catalog write touch (issue #1499 sweep): a contradiction merge can
6562
+ // write a new memory to a dynamic namespace via the CLI resolve path,
6563
+ // bypassing the extraction write path. Record it so QMD maintenance /
6564
+ // writtenSince don't miss the write. Best-effort and failure-tolerant.
6565
+ onMergedMemoryWritten: (namespace, storageDir) => {
6566
+ orchestrator.recordCatalogWrite(namespace, storageDir);
6498
6567
  }
6499
6568
  });
6500
6569
  console.log(result.message);
@@ -7212,4 +7281,4 @@ export {
7212
7281
  resolveMemoryDirForNamespace,
7213
7282
  registerCli
7214
7283
  };
7215
- //# sourceMappingURL=chunk-WSFNYPAT.js.map
7284
+ //# sourceMappingURL=chunk-JYN7QNTA.js.map