@remnic/core 9.3.733 → 9.3.735

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 (304) hide show
  1. package/dist/access-boundary.d.ts +13 -11
  2. package/dist/access-boundary.js +9 -9
  3. package/dist/access-cli.js +26 -24
  4. package/dist/access-cli.js.map +1 -1
  5. package/dist/access-http.d.ts +13 -11
  6. package/dist/access-http.js +14 -14
  7. package/dist/access-mcp.d.ts +13 -11
  8. package/dist/access-mcp.js +13 -13
  9. package/dist/access-operations-batch.js +11 -11
  10. package/dist/access-operations.d.ts +13 -11
  11. package/dist/access-operations.js +12 -12
  12. package/dist/access-schema.d.ts +4 -4
  13. package/dist/{access-service-Byoe3HsT.d.ts → access-service-CVx7mmvK.d.ts} +4 -4
  14. package/dist/access-service.d.ts +13 -11
  15. package/dist/access-service.js +8 -8
  16. package/dist/access-surface-catalog.d.ts +13 -11
  17. package/dist/action-confidence.d.ts +1 -1
  18. package/dist/active-memory-bridge.d.ts +1 -1
  19. package/dist/active-memory-bridge.js +3 -2
  20. package/dist/active-recall.d.ts +1 -1
  21. package/dist/behavior-learner.d.ts +1 -1
  22. package/dist/behavior-signals.d.ts +1 -1
  23. package/dist/bootstrap.d.ts +12 -10
  24. package/dist/briefing.d.ts +1 -1
  25. package/dist/buffer-surprise-report.d.ts +1 -1
  26. package/dist/buffer.d.ts +1 -1
  27. package/dist/calibration.d.ts +1 -1
  28. package/dist/capabilities.d.ts +196 -2
  29. package/dist/capabilities.js +21 -3
  30. package/dist/{catalog-DM1nk7cM.d.ts → catalog-BVhDEUhT.d.ts} +2 -2
  31. package/dist/causal-behavior.d.ts +1 -1
  32. package/dist/causal-consolidation.d.ts +1 -1
  33. package/dist/causal-trajectory-graph.d.ts +1 -1
  34. package/dist/{chunk-CX77GNMB.js → chunk-2T2N7ISV.js} +6 -3
  35. package/dist/chunk-2T2N7ISV.js.map +1 -0
  36. package/dist/{chunk-HHNSLPX7.js → chunk-5BOQNB2K.js} +10 -9
  37. package/dist/chunk-5BOQNB2K.js.map +1 -0
  38. package/dist/{chunk-QZHF4BWN.js → chunk-AAIHDIMD.js} +6 -6
  39. package/dist/{chunk-H3MB3F62.js → chunk-AB2E5DCN.js} +4 -3
  40. package/dist/chunk-AB2E5DCN.js.map +1 -0
  41. package/dist/{chunk-KSJCXXOU.js → chunk-AE7NTZ75.js} +6 -3
  42. package/dist/chunk-AE7NTZ75.js.map +1 -0
  43. package/dist/{chunk-OTQE66IX.js → chunk-AESC5OQJ.js} +6 -3
  44. package/dist/chunk-AESC5OQJ.js.map +1 -0
  45. package/dist/{chunk-FFUCCKPN.js → chunk-BXPG5AVX.js} +10 -7
  46. package/dist/chunk-BXPG5AVX.js.map +1 -0
  47. package/dist/{chunk-P3VJCTVE.js → chunk-CHJIWG2H.js} +4 -3
  48. package/dist/chunk-CHJIWG2H.js.map +1 -0
  49. package/dist/{chunk-FYWUNVFZ.js → chunk-E4LYJ7PY.js} +6 -6
  50. package/dist/{chunk-NIZQH6AU.js → chunk-FF36YNKY.js} +8 -7
  51. package/dist/chunk-FF36YNKY.js.map +1 -0
  52. package/dist/{chunk-OUITHS6V.js → chunk-FLCYY5JX.js} +801 -711
  53. package/dist/chunk-FLCYY5JX.js.map +1 -0
  54. package/dist/{chunk-PLBIPT6I.js → chunk-FLPKEMSO.js} +7 -4
  55. package/dist/chunk-FLPKEMSO.js.map +1 -0
  56. package/dist/{chunk-6TUWSUUD.js → chunk-G54IDCD3.js} +59 -53
  57. package/dist/chunk-G54IDCD3.js.map +1 -0
  58. package/dist/{chunk-J6BH2OBA.js → chunk-GB2FZOWB.js} +8 -5
  59. package/dist/chunk-GB2FZOWB.js.map +1 -0
  60. package/dist/{chunk-CGPHMNL4.js → chunk-GYICIICQ.js} +10 -6
  61. package/dist/chunk-GYICIICQ.js.map +1 -0
  62. package/dist/{chunk-DKT3X5C3.js → chunk-HFXZIF3V.js} +7 -4
  63. package/dist/chunk-HFXZIF3V.js.map +1 -0
  64. package/dist/{chunk-646B5ERJ.js → chunk-HLPYL6LC.js} +71 -65
  65. package/dist/chunk-HLPYL6LC.js.map +1 -0
  66. package/dist/{chunk-ZVHRSR2R.js → chunk-IPI45Q4S.js} +6 -3
  67. package/dist/chunk-IPI45Q4S.js.map +1 -0
  68. package/dist/{chunk-24D66MMN.js → chunk-IX4L7E5G.js} +7 -4
  69. package/dist/chunk-IX4L7E5G.js.map +1 -0
  70. package/dist/{chunk-SYX73XD7.js → chunk-IXGXALRV.js} +10 -7
  71. package/dist/chunk-IXGXALRV.js.map +1 -0
  72. package/dist/{chunk-ESF7TRYJ.js → chunk-JWDE7OVJ.js} +79 -2
  73. package/dist/chunk-JWDE7OVJ.js.map +1 -0
  74. package/dist/{chunk-GGL34GCW.js → chunk-K3Y2SJTN.js} +7 -4
  75. package/dist/chunk-K3Y2SJTN.js.map +1 -0
  76. package/dist/{chunk-PMAQRUN4.js → chunk-NDKW67ER.js} +5 -2
  77. package/dist/chunk-NDKW67ER.js.map +1 -0
  78. package/dist/{chunk-ZQUAVZNG.js → chunk-NNJKEAP2.js} +7 -4
  79. package/dist/chunk-NNJKEAP2.js.map +1 -0
  80. package/dist/{chunk-UZYLX7M6.js → chunk-OYHYBHHI.js} +9 -6
  81. package/dist/chunk-OYHYBHHI.js.map +1 -0
  82. package/dist/{chunk-NOU77OHX.js → chunk-P6VLG7KE.js} +2 -2
  83. package/dist/{chunk-O4ZIBPIW.js → chunk-QNTLWH3T.js} +3 -3
  84. package/dist/{chunk-LUCARK4W.js → chunk-UO6MPN77.js} +37 -35
  85. package/dist/chunk-UO6MPN77.js.map +1 -0
  86. package/dist/{chunk-HJWQJUKQ.js → chunk-VOEVVIP3.js} +3 -3
  87. package/dist/{chunk-KQYGNGON.js → chunk-ZBZ4XULO.js} +6 -3
  88. package/dist/chunk-ZBZ4XULO.js.map +1 -0
  89. package/dist/{cli-Dt-tuiYH.d.ts → cli-Cx5Mxwk7.d.ts} +3 -3
  90. package/dist/cli.d.ts +14 -12
  91. package/dist/cli.js +20 -20
  92. package/dist/compounding/engine.d.ts +3 -2
  93. package/dist/compounding/engine.js +2 -1
  94. package/dist/compounding/preference-consolidator.d.ts +1 -1
  95. package/dist/compression-optimizer.d.ts +1 -1
  96. package/dist/config.d.ts +1 -1
  97. package/dist/connectors/codex-materialize-runner.d.ts +1 -1
  98. package/dist/connectors/codex-materialize.d.ts +1 -1
  99. package/dist/connectors/index.d.ts +1 -1
  100. package/dist/consolidation-provenance-check.d.ts +1 -1
  101. package/dist/consolidation-undo.d.ts +1 -1
  102. package/dist/contradiction/index.d.ts +2 -2
  103. package/dist/contradiction/index.js +2 -1
  104. package/dist/{contradiction-scan-HWGEOUDS.js → contradiction-scan-2B4AE4TI.js} +3 -2
  105. package/dist/conversation-index/backend.d.ts +1 -1
  106. package/dist/conversation-index/chunker.d.ts +1 -1
  107. package/dist/conversation-index/faiss-adapter.d.ts +1 -1
  108. package/dist/conversation-index/indexer.d.ts +1 -1
  109. package/dist/conversation-index/search.d.ts +1 -1
  110. package/dist/day-summary.d.ts +1 -1
  111. package/dist/delinearize.d.ts +1 -1
  112. package/dist/direct-answer-wiring.d.ts +1 -1
  113. package/dist/direct-answer.d.ts +1 -1
  114. package/dist/embedding-fallback.d.ts +1 -1
  115. package/dist/embedding-fallback.js +2 -2
  116. package/dist/enrichment/index.d.ts +1 -1
  117. package/dist/entity-retrieval.d.ts +1 -1
  118. package/dist/entity-retrieval.js +2 -1
  119. package/dist/entity-schema.d.ts +1 -1
  120. package/dist/explicit-capture.d.ts +12 -10
  121. package/dist/explicit-capture.js +2 -1
  122. package/dist/extraction-faithfulness.d.ts +1 -1
  123. package/dist/extraction-judge-telemetry.d.ts +1 -1
  124. package/dist/extraction-judge-training.d.ts +1 -1
  125. package/dist/extraction-judge.d.ts +1 -1
  126. package/dist/extraction.d.ts +1 -1
  127. package/dist/extraction.js +3 -3
  128. package/dist/fallback-llm.d.ts +1 -1
  129. package/dist/{first-start-migration-OOR57AYR.js → first-start-migration-2RQYDIZ7.js} +10 -8
  130. package/dist/first-start-migration-2RQYDIZ7.js.map +1 -0
  131. package/dist/graph-dashboard-diff.d.ts +1 -1
  132. package/dist/graph-dashboard-key.d.ts +1 -1
  133. package/dist/graph-dashboard-parser.d.ts +1 -1
  134. package/dist/graph-edge-reinforcement.d.ts +1 -1
  135. package/dist/graph-snapshot.d.ts +1 -1
  136. package/dist/graph.d.ts +1 -1
  137. package/dist/identity-continuity.d.ts +1 -1
  138. package/dist/importance.d.ts +1 -1
  139. package/dist/index.d.ts +12 -12
  140. package/dist/index.js +44 -44
  141. package/dist/intent.d.ts +1 -1
  142. package/dist/lcm/engine.d.ts +1 -1
  143. package/dist/lcm/index.d.ts +1 -1
  144. package/dist/lcm/tools.d.ts +1 -1
  145. package/dist/lifecycle.d.ts +1 -1
  146. package/dist/live-connectors-runner.d.ts +1 -1
  147. package/dist/local-llm.d.ts +1 -1
  148. package/dist/local-llm.js +2 -1
  149. package/dist/local-model-endpoint.d.ts +1 -1
  150. package/dist/maintenance/memory-governance.d.ts +1 -1
  151. package/dist/mcp-memory-inspector-app.d.ts +13 -11
  152. package/dist/memory-action-policy.d.ts +1 -1
  153. package/dist/memory-cache.d.ts +1 -1
  154. package/dist/memory-lifecycle-ledger-utils.d.ts +1 -1
  155. package/dist/memory-projection-store.d.ts +1 -1
  156. package/dist/memory-provenance.d.ts +1 -1
  157. package/dist/memory-worth-outcomes.d.ts +1 -1
  158. package/dist/models-json.d.ts +1 -1
  159. package/dist/namespaces/migrate.d.ts +2 -2
  160. package/dist/namespaces/migrate.js +6 -6
  161. package/dist/namespaces/principal.d.ts +1 -1
  162. package/dist/namespaces/principal.js +2 -1
  163. package/dist/namespaces/search.d.ts +1 -1
  164. package/dist/namespaces/search.js +4 -4
  165. package/dist/namespaces/storage.d.ts +2 -2
  166. package/dist/namespaces/storage.js +2 -1
  167. package/dist/native-knowledge.d.ts +1 -1
  168. package/dist/operator-toolkit.d.ts +1 -1
  169. package/dist/operator-toolkit.js +11 -11
  170. package/dist/orchestration/compression-guideline-coordinator.d.ts +1 -1
  171. package/dist/orchestration/compression-guideline-coordinator.js +2 -1
  172. package/dist/orchestration/maintenance.d.ts +2 -2
  173. package/dist/orchestration/maintenance.js +6 -5
  174. package/dist/{orchestrator-B4KjaOtY.d.ts → orchestrator-oF0cceBX.d.ts} +143 -18
  175. package/dist/orchestrator.d.ts +8 -6
  176. package/dist/orchestrator.js +21 -19
  177. package/dist/patterns-cli.d.ts +1 -1
  178. package/dist/policy-runtime.d.ts +1 -1
  179. package/dist/provenance.d.ts +1 -1
  180. package/dist/qmd-recall-cache.d.ts +1 -1
  181. package/dist/qmd.d.ts +1 -1
  182. package/dist/recall-disclosure-escalation.d.ts +1 -1
  183. package/dist/recall-explain-renderer.d.ts +1 -1
  184. package/dist/recall-planner-llm.d.ts +1 -1
  185. package/dist/recall-state.d.ts +1 -1
  186. package/dist/recall-tag-filter.d.ts +1 -1
  187. package/dist/recall-xray-cli.d.ts +1 -1
  188. package/dist/recall-xray-renderer.d.ts +1 -1
  189. package/dist/recall-xray.d.ts +1 -1
  190. package/dist/resolve-auth-token.d.ts +1 -1
  191. package/dist/retrieval-agents.d.ts +1 -1
  192. package/dist/retrieval-tiers.d.ts +1 -1
  193. package/dist/routing/engine.d.ts +1 -1
  194. package/dist/routing/store.d.ts +1 -1
  195. package/dist/schemas.d.ts +2 -2
  196. package/dist/search/embed-helper.d.ts +1 -1
  197. package/dist/search/embed-helper.js +2 -2
  198. package/dist/search/factory.d.ts +1 -1
  199. package/dist/search/factory.js +3 -3
  200. package/dist/search/index.d.ts +1 -1
  201. package/dist/search/index.js +3 -3
  202. package/dist/search/lancedb-backend.d.ts +1 -1
  203. package/dist/search/meilisearch-backend.d.ts +1 -1
  204. package/dist/search/noop-backend.d.ts +1 -1
  205. package/dist/search/orama-backend.d.ts +1 -1
  206. package/dist/search/port.d.ts +1 -1
  207. package/dist/search/remote-backend.d.ts +1 -1
  208. package/dist/{semantic-SLAa_prH.d.ts → semantic-DJR8_DMQ.d.ts} +1 -1
  209. package/dist/{semantic-consolidation-CstTvHPo.d.ts → semantic-consolidation-DKGbufYO.d.ts} +1 -1
  210. package/dist/semantic-consolidation.d.ts +2 -2
  211. package/dist/semantic-rule-verifier.d.ts +1 -1
  212. package/dist/session-observer-bands.d.ts +1 -1
  213. package/dist/session-observer-state.d.ts +1 -1
  214. package/dist/shared-context/manager.d.ts +3 -3
  215. package/dist/signal.d.ts +1 -1
  216. package/dist/storage.d.ts +1 -1
  217. package/dist/summarizer.d.ts +1 -1
  218. package/dist/summarizer.js +3 -2
  219. package/dist/summary-snapshot.d.ts +1 -1
  220. package/dist/temporal-supersession.d.ts +1 -1
  221. package/dist/temporal-validity.d.ts +1 -1
  222. package/dist/threading.d.ts +1 -1
  223. package/dist/tier-migration.d.ts +1 -1
  224. package/dist/tier-routing.d.ts +1 -1
  225. package/dist/{tier-stats-3LYQ3VV5.js → tier-stats-KPDIISG7.js} +8 -4
  226. package/dist/tier-stats-KPDIISG7.js.map +1 -0
  227. package/dist/topics.d.ts +1 -1
  228. package/dist/transcript.d.ts +1 -1
  229. package/dist/transfer/types.d.ts +30 -30
  230. package/dist/trust-score-stage.d.ts +1 -1
  231. package/dist/trust-score.d.ts +1 -1
  232. package/dist/{types-VkxElCHR.d.ts → types-C7UCxpuO.d.ts} +1 -1
  233. package/dist/types.d.ts +1 -1
  234. package/dist/utility-runtime.d.ts +1 -1
  235. package/package.json +2 -2
  236. package/src/access-service.ts +61 -56
  237. package/src/active-memory-bridge.ts +2 -1
  238. package/src/admin/admin-surfaces.ts +2 -1
  239. package/src/capabilities.test.ts +375 -0
  240. package/src/capabilities.ts +403 -0
  241. package/src/cli/creation-ledger-commands.ts +2 -2
  242. package/src/cli/research-status-commands.ts +13 -13
  243. package/src/cli.ts +29 -25
  244. package/src/compounding/engine.ts +4 -3
  245. package/src/contradiction/contradiction-scan.ts +4 -3
  246. package/src/embedding-fallback.ts +5 -2
  247. package/src/entity-retrieval.ts +3 -2
  248. package/src/explicit-capture.ts +2 -1
  249. package/src/extraction.ts +6 -3
  250. package/src/local-llm.ts +4 -3
  251. package/src/maintenance/first-start-migration.ts +8 -5
  252. package/src/maintenance/namespace-maintenance-fanout.ts +2 -1
  253. package/src/maintenance/namespace-planner.ts +4 -3
  254. package/src/maintenance/tier-stats.ts +4 -3
  255. package/src/namespaces/catalog.ts +2 -1
  256. package/src/namespaces/migrate.ts +2 -1
  257. package/src/namespaces/principal.ts +6 -5
  258. package/src/namespaces/scope-profiles.ts +2 -1
  259. package/src/namespaces/search.ts +2 -1
  260. package/src/namespaces/storage.ts +4 -3
  261. package/src/operator-toolkit.ts +27 -26
  262. package/src/orchestration/compression-guideline-coordinator.ts +7 -6
  263. package/src/orchestration/lifecycle-policy-coordinator.ts +504 -0
  264. package/src/orchestration/maintenance.ts +8 -4
  265. package/src/orchestration/semantic-consolidation-coordinator.ts +454 -0
  266. package/src/orchestration/tier-migration-coordinator.ts +5 -4
  267. package/src/orchestrator.ts +106 -800
  268. package/src/scopes/scope-plan.ts +3 -2
  269. package/src/search/embed-helper.ts +5 -2
  270. package/src/search/factory.ts +9 -6
  271. package/src/summarizer.ts +3 -2
  272. package/dist/chunk-24D66MMN.js.map +0 -1
  273. package/dist/chunk-646B5ERJ.js.map +0 -1
  274. package/dist/chunk-6TUWSUUD.js.map +0 -1
  275. package/dist/chunk-CGPHMNL4.js.map +0 -1
  276. package/dist/chunk-CX77GNMB.js.map +0 -1
  277. package/dist/chunk-DKT3X5C3.js.map +0 -1
  278. package/dist/chunk-ESF7TRYJ.js.map +0 -1
  279. package/dist/chunk-FFUCCKPN.js.map +0 -1
  280. package/dist/chunk-GGL34GCW.js.map +0 -1
  281. package/dist/chunk-H3MB3F62.js.map +0 -1
  282. package/dist/chunk-HHNSLPX7.js.map +0 -1
  283. package/dist/chunk-J6BH2OBA.js.map +0 -1
  284. package/dist/chunk-KQYGNGON.js.map +0 -1
  285. package/dist/chunk-KSJCXXOU.js.map +0 -1
  286. package/dist/chunk-LUCARK4W.js.map +0 -1
  287. package/dist/chunk-NIZQH6AU.js.map +0 -1
  288. package/dist/chunk-OTQE66IX.js.map +0 -1
  289. package/dist/chunk-OUITHS6V.js.map +0 -1
  290. package/dist/chunk-P3VJCTVE.js.map +0 -1
  291. package/dist/chunk-PLBIPT6I.js.map +0 -1
  292. package/dist/chunk-PMAQRUN4.js.map +0 -1
  293. package/dist/chunk-SYX73XD7.js.map +0 -1
  294. package/dist/chunk-UZYLX7M6.js.map +0 -1
  295. package/dist/chunk-ZQUAVZNG.js.map +0 -1
  296. package/dist/chunk-ZVHRSR2R.js.map +0 -1
  297. package/dist/first-start-migration-OOR57AYR.js.map +0 -1
  298. package/dist/tier-stats-3LYQ3VV5.js.map +0 -1
  299. /package/dist/{chunk-QZHF4BWN.js.map → chunk-AAIHDIMD.js.map} +0 -0
  300. /package/dist/{chunk-FYWUNVFZ.js.map → chunk-E4LYJ7PY.js.map} +0 -0
  301. /package/dist/{chunk-NOU77OHX.js.map → chunk-P6VLG7KE.js.map} +0 -0
  302. /package/dist/{chunk-O4ZIBPIW.js.map → chunk-QNTLWH3T.js.map} +0 -0
  303. /package/dist/{chunk-HJWQJUKQ.js.map → chunk-VOEVVIP3.js.map} +0 -0
  304. /package/dist/{contradiction-scan-HWGEOUDS.js.map → contradiction-scan-2B4AE4TI.js.map} +0 -0
@@ -5,7 +5,12 @@ import { readdirSync, unlinkSync } from "node:fs";
5
5
  import { createHash } from "node:crypto";
6
6
  import { ZodError } from "zod";
7
7
  import { AccessIdempotencyStore, hashAccessIdempotencyPayload } from "./access-idempotency.js";
8
- import { resolveMemoryLifecycleCapabilities } from "./capabilities.js";
8
+ import {
9
+ resolveNamespaceCapabilities,
10
+ resolveMemoryLifecycleCapabilities,
11
+ resolveQmdCapabilities,
12
+ resolveIdentityContinuityCapabilities,
13
+ resolveSecurityCapabilities, resolveObjectiveStateCapabilities, resolveCompressionCapabilities} from "./capabilities.js";
9
14
  import { AccessAuditAdapter, type AccessAuditConfig, type AccessAuditResult } from "./access-audit.js";
10
15
  import type { AnomalyDetectorResult } from "./recall-audit-anomaly.js";
11
16
  import { resolveGitContext } from "./coding/git-context.js";
@@ -1339,7 +1344,7 @@ export class EngramAccessService {
1339
1344
  private resolveNamespace(namespace?: string): string {
1340
1345
  const requested = namespace?.trim();
1341
1346
  if (!requested) return this.orchestrator.config.defaultNamespace;
1342
- if (!this.orchestrator.config.namespacesEnabled && requested !== this.orchestrator.config.defaultNamespace) {
1347
+ if (!resolveNamespaceCapabilities(this.orchestrator.config).namespaces && requested !== this.orchestrator.config.defaultNamespace) {
1343
1348
  throw new EngramAccessInputError(`unsupported namespace: ${requested}`);
1344
1349
  }
1345
1350
  return requested;
@@ -1458,14 +1463,14 @@ export class EngramAccessService {
1458
1463
  typeof request.sessionKey === "string" && request.sessionKey.length > 0;
1459
1464
  const codingContext =
1460
1465
  hasSession &&
1461
- this.orchestrator.config.namespacesEnabled &&
1466
+ resolveNamespaceCapabilities(this.orchestrator.config).namespaces &&
1462
1467
  this.orchestrator.config.codingMode?.projectScope
1463
1468
  ? this.orchestrator.getCodingContextForSession(request.sessionKey) ??
1464
1469
  (await this.resolveCodingContextFromOptions(request))
1465
1470
  : null;
1466
1471
  const overlay =
1467
1472
  hasSession &&
1468
- this.orchestrator.config.namespacesEnabled &&
1473
+ resolveNamespaceCapabilities(this.orchestrator.config).namespaces &&
1469
1474
  this.orchestrator.config.codingMode?.projectScope
1470
1475
  ? resolveCodingNamespaceOverlay(
1471
1476
  codingContext,
@@ -1686,7 +1691,7 @@ export class EngramAccessService {
1686
1691
  typeof request.sessionKey === "string" && request.sessionKey.length > 0;
1687
1692
  const overlayEligible =
1688
1693
  hasSession &&
1689
- this.orchestrator.config.namespacesEnabled === true &&
1694
+ resolveNamespaceCapabilities(this.orchestrator.config).namespaces === true &&
1690
1695
  this.orchestrator.config.codingMode?.projectScope === true;
1691
1696
 
1692
1697
  // Resolve the coding context the overlay must use: the session's ATTACHED
@@ -1818,11 +1823,11 @@ export class EngramAccessService {
1818
1823
  // are off the self base collapses to config.defaultNamespace, so this is a
1819
1824
  // no-op for single-store deployments either way.
1820
1825
  const willWriteObjectiveState =
1821
- this.orchestrator.config.objectiveStateMemoryEnabled === true &&
1822
- this.orchestrator.config.objectiveStateSnapshotWritesEnabled === true;
1826
+ resolveObjectiveStateCapabilities(this.orchestrator.config).objectiveStateMemory === true &&
1827
+ resolveObjectiveStateCapabilities(this.orchestrator.config).objectiveStateSnapshotWrites === true;
1823
1828
  if (
1824
1829
  willWriteObjectiveState &&
1825
- this.orchestrator.config.namespacesEnabled === true &&
1830
+ resolveNamespaceCapabilities(this.orchestrator.config).namespaces === true &&
1826
1831
  !canWriteNamespace(principal, baseNamespace, this.orchestrator.config)
1827
1832
  ) {
1828
1833
  clearSeededContext();
@@ -1897,7 +1902,7 @@ export class EngramAccessService {
1897
1902
  memoryDir: string;
1898
1903
  objectiveStateStoreDir?: string;
1899
1904
  }> {
1900
- if (!this.orchestrator.config.namespacesEnabled) {
1905
+ if (!resolveNamespaceCapabilities(this.orchestrator.config).namespaces) {
1901
1906
  return {
1902
1907
  memoryDir: this.orchestrator.config.memoryDir,
1903
1908
  objectiveStateStoreDir: this.orchestrator.config.objectiveStateStoreDir,
@@ -1909,7 +1914,7 @@ export class EngramAccessService {
1909
1914
  objectiveStateStoreDir: objectiveStateStoreOverrideForNamespace({
1910
1915
  memoryDir: this.orchestrator.config.memoryDir,
1911
1916
  configuredStoreDir: this.orchestrator.config.objectiveStateStoreDir,
1912
- namespacesEnabled: this.orchestrator.config.namespacesEnabled,
1917
+ namespacesEnabled: resolveNamespaceCapabilities(this.orchestrator.config).namespaces,
1913
1918
  namespace,
1914
1919
  }),
1915
1920
  };
@@ -1917,7 +1922,7 @@ export class EngramAccessService {
1917
1922
 
1918
1923
  private resolveReadableNamespace(namespace: string | undefined, principal?: string): string {
1919
1924
  const resolved = this.resolveNamespace(namespace);
1920
- const namespacesEnabled = this.orchestrator.config.namespacesEnabled;
1925
+ const namespacesEnabled = resolveNamespaceCapabilities(this.orchestrator.config).namespaces;
1921
1926
 
1922
1927
  if (!namespacesEnabled) {
1923
1928
  // Namespaces are disabled globally — no ACL needed for any caller.
@@ -1946,7 +1951,7 @@ export class EngramAccessService {
1946
1951
  return [this.resolveReadableNamespace(requested, principal)];
1947
1952
  }
1948
1953
 
1949
- if (!this.orchestrator.config.namespacesEnabled) {
1954
+ if (!resolveNamespaceCapabilities(this.orchestrator.config).namespaces) {
1950
1955
  return [this.resolveNamespace(undefined)];
1951
1956
  }
1952
1957
 
@@ -1998,7 +2003,7 @@ export class EngramAccessService {
1998
2003
  namespaces: string[],
1999
2004
  collectionPrincipal?: string,
2000
2005
  ): string[] {
2001
- if (!this.orchestrator.config.namespacesEnabled) {
2006
+ if (!resolveNamespaceCapabilities(this.orchestrator.config).namespaces) {
2002
2007
  return namespaces;
2003
2008
  }
2004
2009
 
@@ -2702,7 +2707,7 @@ export class EngramAccessService {
2702
2707
  const resolvedNamespace = this.resolveNamespace(namespace);
2703
2708
  const storage = await this.orchestrator.getStorage(resolvedNamespace);
2704
2709
  const searchBackend = this.orchestrator.config.searchBackend ?? "qmd";
2705
- const qmdEnabled = this.orchestrator.config.qmdEnabled === true;
2710
+ const qmdEnabled = resolveQmdCapabilities(this.orchestrator.config).qmd === true;
2706
2711
  let projectionAvailable = false;
2707
2712
  try {
2708
2713
  await stat(getMemoryProjectionPath(storage.dir));
@@ -2714,7 +2719,7 @@ export class EngramAccessService {
2714
2719
  return {
2715
2720
  ok: true,
2716
2721
  memoryDir: storage.dir,
2717
- namespacesEnabled: this.orchestrator.config.namespacesEnabled === true,
2722
+ namespacesEnabled: resolveNamespaceCapabilities(this.orchestrator.config).namespaces === true,
2718
2723
  defaultNamespace: this.orchestrator.config.defaultNamespace,
2719
2724
  searchBackend,
2720
2725
  qmdEnabled,
@@ -2730,7 +2735,7 @@ export class EngramAccessService {
2730
2735
  }
2731
2736
 
2732
2737
  private qmdCollectionForHealth(namespace: string, storageDir: string): string {
2733
- if (this.orchestrator.config.namespacesEnabled !== true) {
2738
+ if (resolveNamespaceCapabilities(this.orchestrator.config).namespaces !== true) {
2734
2739
  return this.orchestrator.config.qmdCollection;
2735
2740
  }
2736
2741
 
@@ -2766,7 +2771,7 @@ export class EngramAccessService {
2766
2771
  };
2767
2772
  }
2768
2773
 
2769
- if (this.orchestrator.config.namespacesEnabled === true) {
2774
+ if (resolveNamespaceCapabilities(this.orchestrator.config).namespaces === true) {
2770
2775
  const namespaceHealth = await this.namespaceQmdHealth(searchBackend, qmdEnabled, namespace, collection);
2771
2776
  if (namespaceHealth) return namespaceHealth;
2772
2777
  }
@@ -3224,7 +3229,7 @@ export class EngramAccessService {
3224
3229
  const normalizedRequest = { ...request, query };
3225
3230
  const authenticatedPrincipal = request.authenticatedPrincipal?.trim();
3226
3231
  const principal = this.resolveRequestPrincipal(request.sessionKey, authenticatedPrincipal);
3227
- if (this.orchestrator.config.namespacesEnabled && !principal) {
3232
+ if (resolveNamespaceCapabilities(this.orchestrator.config).namespaces && !principal) {
3228
3233
  throw new EngramAccessInputError(
3229
3234
  "authentication required: namespaces are enabled and no principal was supplied",
3230
3235
  );
@@ -3307,7 +3312,7 @@ export class EngramAccessService {
3307
3312
  // accounting (Codex P1: budget recorded before mode validation).
3308
3313
  const mode = this.normalizeRecallMode(request.mode);
3309
3314
  const maybePrincipal = this.resolveRequestPrincipal(request.sessionKey, authenticatedPrincipal);
3310
- if (this.orchestrator.config.namespacesEnabled && !maybePrincipal) {
3315
+ if (resolveNamespaceCapabilities(this.orchestrator.config).namespaces && !maybePrincipal) {
3311
3316
  throw new EngramAccessInputError(
3312
3317
  "authentication required: namespaces are enabled and no principal was supplied",
3313
3318
  );
@@ -3321,7 +3326,7 @@ export class EngramAccessService {
3321
3326
  const profileCodingOverlay =
3322
3327
  !namespaceOverride &&
3323
3328
  profileCodingContext &&
3324
- this.orchestrator.config.namespacesEnabled &&
3329
+ resolveNamespaceCapabilities(this.orchestrator.config).namespaces &&
3325
3330
  this.orchestrator.config.codingMode?.projectScope
3326
3331
  ? resolveCodingNamespaceOverlay(
3327
3332
  profileCodingContext,
@@ -3725,7 +3730,7 @@ export class EngramAccessService {
3725
3730
  return { found: false };
3726
3731
  }
3727
3732
  } else if (
3728
- this.orchestrator.config.namespacesEnabled
3733
+ resolveNamespaceCapabilities(this.orchestrator.config).namespaces
3729
3734
  && !principal
3730
3735
  ) {
3731
3736
  return { found: false };
@@ -3744,7 +3749,7 @@ export class EngramAccessService {
3744
3749
  return candidate.namespace === requestedNamespace ? candidate : null;
3745
3750
  })();
3746
3751
  const readableSnapshot = (() => {
3747
- if (!snapshot || !this.orchestrator.config.namespacesEnabled) return snapshot;
3752
+ if (!snapshot || !resolveNamespaceCapabilities(this.orchestrator.config).namespaces) return snapshot;
3748
3753
  const snapshotNamespace = snapshot.namespace ?? this.orchestrator.config.defaultNamespace;
3749
3754
  return canReadNamespace(principal, snapshotNamespace, this.orchestrator.config)
3750
3755
  ? snapshot
@@ -3754,7 +3759,7 @@ export class EngramAccessService {
3754
3759
  if (requestedNamespace) return requestedNamespace;
3755
3760
  if (readableSnapshot?.namespace) return readableSnapshot.namespace;
3756
3761
  const fallbackNamespace = this.orchestrator.config.defaultNamespace;
3757
- if (!this.orchestrator.config.namespacesEnabled) return fallbackNamespace;
3762
+ if (!resolveNamespaceCapabilities(this.orchestrator.config).namespaces) return fallbackNamespace;
3758
3763
  return canReadNamespace(principal, fallbackNamespace, this.orchestrator.config)
3759
3764
  ? fallbackNamespace
3760
3765
  : null;
@@ -3773,7 +3778,7 @@ export class EngramAccessService {
3773
3778
  namespace?: string,
3774
3779
  authenticatedPrincipal?: string,
3775
3780
  ) {
3776
- const namespacesEnabled = this.orchestrator.config.namespacesEnabled;
3781
+ const namespacesEnabled = resolveNamespaceCapabilities(this.orchestrator.config).namespaces;
3777
3782
  const requestedNamespace = namespace?.trim()
3778
3783
  ? this.resolveNamespace(namespace)
3779
3784
  : undefined;
@@ -3882,7 +3887,7 @@ export class EngramAccessService {
3882
3887
  );
3883
3888
  }
3884
3889
 
3885
- const namespacesEnabled = this.orchestrator.config.namespacesEnabled;
3890
+ const namespacesEnabled = resolveNamespaceCapabilities(this.orchestrator.config).namespaces;
3886
3891
  const requestedNamespace = request.namespace?.trim()
3887
3892
  ? this.resolveNamespace(request.namespace)
3888
3893
  : undefined;
@@ -5573,9 +5578,9 @@ export class EngramAccessService {
5573
5578
  status: await getTrustZoneStoreStatus({
5574
5579
  memoryDir: storage.dir,
5575
5580
  trustZoneStoreDir: this.orchestrator.config.trustZoneStoreDir,
5576
- enabled: this.orchestrator.config.trustZonesEnabled === true,
5577
- promotionEnabled: this.orchestrator.config.quarantinePromotionEnabled === true,
5578
- poisoningDefenseEnabled: this.orchestrator.config.memoryPoisoningDefenseEnabled === true,
5581
+ enabled: resolveSecurityCapabilities(this.orchestrator.config).trustZones === true,
5582
+ promotionEnabled: resolveSecurityCapabilities(this.orchestrator.config).quarantinePromotion === true,
5583
+ poisoningDefenseEnabled: resolveSecurityCapabilities(this.orchestrator.config).memoryPoisoningDefense === true,
5579
5584
  }),
5580
5585
  };
5581
5586
  }
@@ -5607,9 +5612,9 @@ export class EngramAccessService {
5607
5612
  entry.record,
5608
5613
  entry.filePath,
5609
5614
  result.allRecords,
5610
- this.orchestrator.config.memoryPoisoningDefenseEnabled === true,
5611
- this.orchestrator.config.trustZonesEnabled === true,
5612
- this.orchestrator.config.quarantinePromotionEnabled === true,
5615
+ resolveSecurityCapabilities(this.orchestrator.config).memoryPoisoningDefense === true,
5616
+ resolveSecurityCapabilities(this.orchestrator.config).trustZones === true,
5617
+ resolveSecurityCapabilities(this.orchestrator.config).quarantinePromotion === true,
5613
5618
  )),
5614
5619
  };
5615
5620
  }
@@ -5631,9 +5636,9 @@ export class EngramAccessService {
5631
5636
  result = await promoteTrustZoneRecord({
5632
5637
  memoryDir: storage.dir,
5633
5638
  trustZoneStoreDir: this.orchestrator.config.trustZoneStoreDir,
5634
- enabled: this.orchestrator.config.trustZonesEnabled === true,
5635
- promotionEnabled: this.orchestrator.config.quarantinePromotionEnabled === true,
5636
- poisoningDefenseEnabled: this.orchestrator.config.memoryPoisoningDefenseEnabled === true,
5639
+ enabled: resolveSecurityCapabilities(this.orchestrator.config).trustZones === true,
5640
+ promotionEnabled: resolveSecurityCapabilities(this.orchestrator.config).quarantinePromotion === true,
5641
+ poisoningDefenseEnabled: resolveSecurityCapabilities(this.orchestrator.config).memoryPoisoningDefense === true,
5637
5642
  sourceRecordId: request.recordId,
5638
5643
  targetZone: request.targetZone,
5639
5644
  recordedAt: request.recordedAt ?? new Date().toISOString(),
@@ -5665,7 +5670,7 @@ export class EngramAccessService {
5665
5670
  result = await seedTrustZoneDemoDataset({
5666
5671
  memoryDir: storage.dir,
5667
5672
  trustZoneStoreDir: this.orchestrator.config.trustZoneStoreDir,
5668
- enabled: this.orchestrator.config.trustZonesEnabled === true,
5673
+ enabled: resolveSecurityCapabilities(this.orchestrator.config).trustZones === true,
5669
5674
  scenario: request.scenario,
5670
5675
  recordedAt: request.recordedAt,
5671
5676
  dryRun: request.dryRun === true,
@@ -5874,8 +5879,8 @@ export class EngramAccessService {
5874
5879
  // overlay-compatible base namespace for those writes.
5875
5880
  const namespace = this.legacyResponseNamespaceForScope(scope);
5876
5881
  const shouldWriteObjectiveState =
5877
- this.orchestrator.config.objectiveStateMemoryEnabled === true &&
5878
- this.orchestrator.config.objectiveStateSnapshotWritesEnabled === true;
5882
+ resolveObjectiveStateCapabilities(this.orchestrator.config).objectiveStateMemory === true &&
5883
+ resolveObjectiveStateCapabilities(this.orchestrator.config).objectiveStateSnapshotWrites === true;
5879
5884
 
5880
5885
  // 2. Auto-resolve coding context from cwd/projectTag so a LATER bare recall
5881
5886
  // on the same session is project-scoped (rule 42: same namespace layer as
@@ -5914,9 +5919,9 @@ export class EngramAccessService {
5914
5919
  await recordObjectiveStateSnapshotsFromObservedMessages({
5915
5920
  memoryDir: objectiveStateLocation.memoryDir,
5916
5921
  objectiveStateStoreDir: objectiveStateLocation.objectiveStateStoreDir,
5917
- objectiveStateMemoryEnabled: this.orchestrator.config.objectiveStateMemoryEnabled,
5922
+ objectiveStateMemoryEnabled: resolveObjectiveStateCapabilities(this.orchestrator.config).objectiveStateMemory,
5918
5923
  objectiveStateSnapshotWritesEnabled:
5919
- this.orchestrator.config.objectiveStateSnapshotWritesEnabled,
5924
+ resolveObjectiveStateCapabilities(this.orchestrator.config).objectiveStateSnapshotWrites,
5920
5925
  sessionKey: request.sessionKey,
5921
5926
  recordedAt: new Date().toISOString(),
5922
5927
  messages: request.messages,
@@ -5983,7 +5988,7 @@ export class EngramAccessService {
5983
5988
  // namespace to one store, so leaving the override undefined preserves the
5984
5989
  // existing single-store routing byte-for-byte.
5985
5990
  const writeNamespaceOverride =
5986
- this.orchestrator.config.namespacesEnabled === true
5991
+ resolveNamespaceCapabilities(this.orchestrator.config).namespaces === true
5987
5992
  ? writeNamespace
5988
5993
  : undefined;
5989
5994
  // Pin provenance PRINCIPAL to the scope plan's resolved principal (#1505
@@ -6188,7 +6193,7 @@ export class EngramAccessService {
6188
6193
  (typeof request.sessionKey === "string" &&
6189
6194
  request.sessionKey.length > 0) ||
6190
6195
  lcmSessionPrefixes.some((prefix) => typeof prefix === "string" && prefix.length > 0);
6191
- if (!hasScopedSession && this.orchestrator.config.namespacesEnabled === true) {
6196
+ if (!hasScopedSession && resolveNamespaceCapabilities(this.orchestrator.config).namespaces === true) {
6192
6197
  return {
6193
6198
  query: request.query,
6194
6199
  namespace,
@@ -6483,7 +6488,7 @@ export class EngramAccessService {
6483
6488
  principal: string | undefined,
6484
6489
  ): string | undefined {
6485
6490
  const config = this.orchestrator.config;
6486
- if (!config.namespacesEnabled) return config.defaultNamespace;
6491
+ if (!resolveNamespaceCapabilities(config).namespaces) return config.defaultNamespace;
6487
6492
  // PROCEED when `default` is readable (single-store / readable-default flows)
6488
6493
  // — the LCM prefix resolves to the overlay when self-authorized, else the
6489
6494
  // default raw key.
@@ -6824,7 +6829,7 @@ export class EngramAccessService {
6824
6829
  period?: "weekly" | "monthly";
6825
6830
  key?: string;
6826
6831
  }): Promise<{ enabled: boolean; reason?: string; period?: string; key?: string; reportPath?: string }> {
6827
- if (!this.orchestrator.config.identityContinuityEnabled) {
6832
+ if (!resolveIdentityContinuityCapabilities(this.orchestrator.config).identityContinuity) {
6828
6833
  return { enabled: false, reason: "Identity continuity is disabled. Enable `identityContinuityEnabled: true`." };
6829
6834
  }
6830
6835
  if (!this.orchestrator.config.continuityAuditEnabled) {
@@ -6846,7 +6851,7 @@ export class EngramAccessService {
6846
6851
  triggerWindow?: string;
6847
6852
  suspectedCause?: string;
6848
6853
  }): Promise<unknown> {
6849
- if (!this.orchestrator.config.identityContinuityEnabled) {
6854
+ if (!resolveIdentityContinuityCapabilities(this.orchestrator.config).identityContinuity) {
6850
6855
  return { enabled: false, reason: "Identity continuity is disabled. Enable `identityContinuityEnabled: true`." };
6851
6856
  }
6852
6857
  if (!this.orchestrator.config.continuityIncidentLoggingEnabled) {
@@ -6872,7 +6877,7 @@ export class EngramAccessService {
6872
6877
  verificationResult: string;
6873
6878
  preventiveRule?: string;
6874
6879
  }): Promise<unknown> {
6875
- if (!this.orchestrator.config.identityContinuityEnabled) {
6880
+ if (!resolveIdentityContinuityCapabilities(this.orchestrator.config).identityContinuity) {
6876
6881
  return { enabled: false, reason: "Identity continuity is disabled." };
6877
6882
  }
6878
6883
  if (!this.orchestrator.config.continuityIncidentLoggingEnabled) {
@@ -6901,7 +6906,7 @@ export class EngramAccessService {
6901
6906
  principal?: string;
6902
6907
  limit?: number;
6903
6908
  }): Promise<unknown> {
6904
- if (!this.orchestrator.config.identityContinuityEnabled) {
6909
+ if (!resolveIdentityContinuityCapabilities(this.orchestrator.config).identityContinuity) {
6905
6910
  return { enabled: false, reason: "Identity continuity is disabled." };
6906
6911
  }
6907
6912
  const state = request.state === "closed" || request.state === "all" ? request.state : "open";
@@ -6923,7 +6928,7 @@ export class EngramAccessService {
6923
6928
  lastReviewed?: string;
6924
6929
  notes?: string;
6925
6930
  }): Promise<unknown> {
6926
- if (!this.orchestrator.config.identityContinuityEnabled) {
6931
+ if (!resolveIdentityContinuityCapabilities(this.orchestrator.config).identityContinuity) {
6927
6932
  return { enabled: false, reason: "Identity continuity is disabled." };
6928
6933
  }
6929
6934
  const resolvedNs = this.writableNamespaceFor(request.namespace, undefined, request.principal);
@@ -6948,7 +6953,7 @@ export class EngramAccessService {
6948
6953
  notes?: string;
6949
6954
  reviewedAt?: string;
6950
6955
  }): Promise<unknown> {
6951
- if (!this.orchestrator.config.identityContinuityEnabled) {
6956
+ if (!resolveIdentityContinuityCapabilities(this.orchestrator.config).identityContinuity) {
6952
6957
  return { enabled: false, reason: "Identity continuity is disabled." };
6953
6958
  }
6954
6959
  const id = request.id?.trim();
@@ -6968,7 +6973,7 @@ export class EngramAccessService {
6968
6973
  namespace?: string;
6969
6974
  principal?: string;
6970
6975
  }): Promise<unknown> {
6971
- if (!this.orchestrator.config.identityContinuityEnabled) {
6976
+ if (!resolveIdentityContinuityCapabilities(this.orchestrator.config).identityContinuity) {
6972
6977
  return { enabled: false, reason: "Identity continuity is disabled." };
6973
6978
  }
6974
6979
  const resolvedNs = this.resolveReadableNamespace(request.namespace, request.principal);
@@ -6994,7 +6999,7 @@ export class EngramAccessService {
6994
6999
  operatingPrinciples?: string;
6995
7000
  continuityNotes?: string;
6996
7001
  }): Promise<unknown> {
6997
- if (!this.orchestrator.config.identityContinuityEnabled) {
7002
+ if (!resolveIdentityContinuityCapabilities(this.orchestrator.config).identityContinuity) {
6998
7003
  return { enabled: false, reason: "Identity continuity is disabled." };
6999
7004
  }
7000
7005
 
@@ -7337,7 +7342,7 @@ export class EngramAccessService {
7337
7342
  dryRun?: boolean;
7338
7343
  eventLimit?: number;
7339
7344
  }): Promise<unknown> {
7340
- if (!this.orchestrator.config.compressionGuidelineLearningEnabled) {
7345
+ if (!resolveCompressionCapabilities(this.orchestrator.config).compressionGuidelineLearning) {
7341
7346
  return { enabled: false, reason: "Compression guideline learning is disabled. Enable `compressionGuidelineLearningEnabled: true`." };
7342
7347
  }
7343
7348
  return await this.orchestrator.optimizeCompressionGuidelines({
@@ -7350,7 +7355,7 @@ export class EngramAccessService {
7350
7355
  expectedContentHash?: string;
7351
7356
  expectedGuidelineVersion?: number;
7352
7357
  }): Promise<unknown> {
7353
- if (!this.orchestrator.config.compressionGuidelineLearningEnabled) {
7358
+ if (!resolveCompressionCapabilities(this.orchestrator.config).compressionGuidelineLearning) {
7354
7359
  return { enabled: false, reason: "Compression guideline learning is disabled." };
7355
7360
  }
7356
7361
  return await this.orchestrator.activateCompressionGuidelineDraft({
@@ -7419,7 +7424,7 @@ export class EngramAccessService {
7419
7424
  }
7420
7425
 
7421
7426
  let results: Array<{ path: string; score: number; snippet?: string }>;
7422
- if (!this.orchestrator.config.namespacesEnabled) {
7427
+ if (!resolveNamespaceCapabilities(this.orchestrator.config).namespaces) {
7423
7428
  this.resolveReadableNamespace(namespace, principal);
7424
7429
  results = collection === "global"
7425
7430
  ? await this.orchestrator.qmd.searchGlobal(query, maxResults)
@@ -7744,7 +7749,7 @@ export class EngramAccessService {
7744
7749
  );
7745
7750
  }
7746
7751
 
7747
- if (this.orchestrator.config.contextCompressionActionsEnabled !== true) {
7752
+ if (resolveCompressionCapabilities(this.orchestrator.config).contextCompressionActions !== true) {
7748
7753
  throw new EngramAccessInputError(
7749
7754
  "memory_action_apply is disabled; enable contextCompressionActionsEnabled to use this tool",
7750
7755
  );
@@ -8162,7 +8167,7 @@ export class EngramAccessService {
8162
8167
  namespace: string;
8163
8168
  storage: StorageManager;
8164
8169
  }> {
8165
- if (this.orchestrator.config.namespacesEnabled && !principal?.trim()) {
8170
+ if (resolveNamespaceCapabilities(this.orchestrator.config).namespaces && !principal?.trim()) {
8166
8171
  throw new EngramAccessInputError(
8167
8172
  "authentication required: namespaces are enabled and no principal was supplied",
8168
8173
  );
@@ -8902,7 +8907,7 @@ export class EngramAccessService {
8902
8907
  actor?: never; // ignored — actor is derived from the authenticated principal
8903
8908
  }) {
8904
8909
  const config = this.orchestrator.config;
8905
- const namespacesEnabled = config.namespacesEnabled === true;
8910
+ const namespacesEnabled = resolveNamespaceCapabilities(config).namespaces === true;
8906
8911
  // Fix OdCl3: when no namespace is supplied, resolve the source via the
8907
8912
  // scope plan (principal self / scope-profile write layer / coding overlay)
8908
8913
  // instead of falling through to config.defaultNamespace. This matches the
@@ -1,3 +1,4 @@
1
+ import { resolveNamespaceCapabilities } from "./capabilities.js";
1
2
  import { canReadNamespace, defaultNamespaceForPrincipal, resolvePrincipal } from "./namespaces/principal.js";
2
3
  import type { MemoryFile, PluginConfig } from "./types.js";
3
4
  import { collapseWhitespace, truncateCodePointSafe } from "./whitespace.js";
@@ -106,7 +107,7 @@ function resolveActiveMemoryNamespace(
106
107
  typeof orchestrator.resolvePrincipal === "function"
107
108
  ? orchestrator.resolvePrincipal(sessionKey)
108
109
  : resolvePrincipal(sessionKey, config);
109
- if (config.namespacesEnabled && !principal) {
110
+ if (resolveNamespaceCapabilities(config).namespaces && !principal) {
110
111
  throw new Error("authentication required: namespaces are enabled and no principal was supplied");
111
112
  }
112
113
  if (explicitNamespace) {
@@ -23,6 +23,7 @@
23
23
  * NamespaceSearchRouter health. No new scope-resolution or namespace-listing
24
24
  * logic is introduced.
25
25
  */
26
+ import { resolveNamespaceCapabilities } from "../capabilities.js";
26
27
  import path from "node:path";
27
28
  import type { NamespaceCatalog, NamespaceRecord } from "../namespaces/catalog.js";
28
29
  import { canReadNamespace, canWriteNamespace } from "../namespaces/principal.js";
@@ -190,7 +191,7 @@ export function inspectScope(options: InspectScopeOptions): ScopeInspection {
190
191
  const { config } = options;
191
192
  // Honour the pre-read flag when the caller supplied one (avoids a scattered
192
193
  // read here); fall back to the config flag for direct callers (tests/CLI).
193
- const namespacesEnabled = options.namespacesEnabled ?? config.namespacesEnabled === true;
194
+ const namespacesEnabled = options.namespacesEnabled ?? resolveNamespaceCapabilities(config).namespaces === true;
194
195
 
195
196
  const plan = resolveScopePlan({
196
197
  config,