@remnic/core 9.3.655 → 9.3.657

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 +22 -22
  2. package/dist/access-http.d.ts +4 -4
  3. package/dist/access-http.js +10 -10
  4. package/dist/access-mcp.d.ts +4 -4
  5. package/dist/access-mcp.js +9 -9
  6. package/dist/access-schema.d.ts +10 -10
  7. package/dist/{access-service-BEJvriUt.d.ts → access-service-D_nbpexW.d.ts} +33 -2
  8. package/dist/access-service.d.ts +4 -4
  9. package/dist/access-service.js +8 -8
  10. package/dist/action-confidence.d.ts +1 -1
  11. package/dist/active-memory-bridge.d.ts +1 -1
  12. package/dist/active-recall.d.ts +1 -1
  13. package/dist/active-recall.js +1 -1
  14. package/dist/behavior-learner.d.ts +1 -1
  15. package/dist/behavior-signals.d.ts +1 -1
  16. package/dist/bootstrap.d.ts +3 -3
  17. package/dist/briefing.d.ts +1 -1
  18. package/dist/briefing.js +3 -3
  19. package/dist/buffer-surprise-report.d.ts +1 -1
  20. package/dist/buffer.d.ts +1 -1
  21. package/dist/calibration.d.ts +1 -1
  22. package/dist/causal-behavior.d.ts +1 -1
  23. package/dist/causal-consolidation.d.ts +1 -1
  24. package/dist/causal-consolidation.js +4 -4
  25. package/dist/{chunk-PVE7KSQP.js → chunk-2BD7DG37.js} +2 -2
  26. package/dist/{chunk-54LOUIBE.js → chunk-2MXEVL75.js} +2 -2
  27. package/dist/{chunk-55ZMNKMQ.js → chunk-4UL7VPTD.js} +276 -57
  28. package/dist/chunk-4UL7VPTD.js.map +1 -0
  29. package/dist/{chunk-COVZLGMR.js → chunk-54XF2FY7.js} +17 -17
  30. package/dist/{chunk-UYNFWZWG.js → chunk-AGJKWOKV.js} +2 -2
  31. package/dist/{chunk-TDZSSJV4.js → chunk-AZBV4RRY.js} +1 -1
  32. package/dist/chunk-AZBV4RRY.js.map +1 -0
  33. package/dist/{chunk-KOI765XP.js → chunk-CTAV55JM.js} +241 -1
  34. package/dist/chunk-CTAV55JM.js.map +1 -0
  35. package/dist/{chunk-A3Y37UWI.js → chunk-DIBWFCLA.js} +3 -3
  36. package/dist/{chunk-QDVQ4AN2.js → chunk-DR67OK4E.js} +5 -5
  37. package/dist/{chunk-XBIACVCO.js → chunk-EC2AYKRX.js} +2 -2
  38. package/dist/{chunk-IQ53ZSXV.js → chunk-GCYFUTUC.js} +2 -2
  39. package/dist/{chunk-YYN3LIYA.js → chunk-GSHW5VVD.js} +5 -5
  40. package/dist/chunk-GYSYLGNE.js +650 -0
  41. package/dist/chunk-GYSYLGNE.js.map +1 -0
  42. package/dist/{chunk-NRBGRZW4.js → chunk-IOZ5WBWD.js} +2 -2
  43. package/dist/{chunk-NCSJKK23.js → chunk-JSVFEHLL.js} +7 -5
  44. package/dist/chunk-JSVFEHLL.js.map +1 -0
  45. package/dist/{chunk-7LWRCOP7.js → chunk-LZTFCAKE.js} +2 -2
  46. package/dist/{chunk-TEO46GMM.js → chunk-NXCK7DO7.js} +2 -2
  47. package/dist/{chunk-XOFXKASO.js → chunk-PEPHBH2W.js} +2 -2
  48. package/dist/{chunk-WDTUYOLS.js → chunk-QZRKNA5F.js} +2 -2
  49. package/dist/{chunk-PS3SYNHP.js → chunk-R5DB26G6.js} +2 -2
  50. package/dist/{chunk-5QD3QD76.js → chunk-RDW5G6DO.js} +659 -123
  51. package/dist/chunk-RDW5G6DO.js.map +1 -0
  52. package/dist/{chunk-BGKXTVNG.js → chunk-SWDHVH2P.js} +2 -2
  53. package/dist/{chunk-67G4T7KI.js → chunk-SXYCVRLK.js} +3 -3
  54. package/dist/{chunk-UCEABZZN.js → chunk-TFFZUFEP.js} +7 -5
  55. package/dist/chunk-TFFZUFEP.js.map +1 -0
  56. package/dist/{chunk-UCEDY5M7.js → chunk-TIJYQXDI.js} +2 -2
  57. package/dist/{chunk-2RCGZ67B.js → chunk-VAEAGTEQ.js} +3 -3
  58. package/dist/{chunk-XRKQOQLY.js → chunk-WIKMCJUR.js} +2 -2
  59. package/dist/{chunk-KZZ4YAEC.js → chunk-WWMHAMAY.js} +2 -2
  60. package/dist/{chunk-OKW6F5S5.js → chunk-YEZHZCUO.js} +4 -4
  61. package/dist/{chunk-5FOCXX5E.js → chunk-YVVQUAOO.js} +3 -3
  62. package/dist/{chunk-5FOCXX5E.js.map → chunk-YVVQUAOO.js.map} +1 -1
  63. package/dist/{chunk-3XGWCZ63.js → chunk-YXLT4EMM.js} +2 -2
  64. package/dist/{chunk-PTMJ2FH2.js → chunk-Z6UDTNY6.js} +2 -2
  65. package/dist/{cli-BGahB_d3.d.ts → cli-aYxSuPvP.d.ts} +3 -3
  66. package/dist/cli.d.ts +5 -5
  67. package/dist/cli.js +22 -22
  68. package/dist/compounding/engine.d.ts +1 -1
  69. package/dist/compounding/engine.js +3 -3
  70. package/dist/compounding/preference-consolidator.d.ts +1 -1
  71. package/dist/compression-optimizer.d.ts +1 -1
  72. package/dist/config.d.ts +1 -1
  73. package/dist/config.js +1 -1
  74. package/dist/connectors/codex-materialize-runner.d.ts +1 -1
  75. package/dist/connectors/codex-materialize-runner.js +3 -3
  76. package/dist/connectors/codex-materialize.d.ts +1 -1
  77. package/dist/connectors/index.d.ts +1 -1
  78. package/dist/connectors/index.js +3 -3
  79. package/dist/consolidation-provenance-check.d.ts +1 -1
  80. package/dist/consolidation-undo.d.ts +1 -1
  81. package/dist/contradiction/index.d.ts +1 -1
  82. package/dist/conversation-index/backend.d.ts +1 -1
  83. package/dist/conversation-index/chunker.d.ts +1 -1
  84. package/dist/conversation-index/faiss-adapter.d.ts +1 -1
  85. package/dist/conversation-index/indexer.d.ts +1 -1
  86. package/dist/conversation-index/search.d.ts +1 -1
  87. package/dist/day-summary.d.ts +1 -1
  88. package/dist/delinearize.d.ts +1 -1
  89. package/dist/direct-answer-wiring.d.ts +1 -1
  90. package/dist/direct-answer.d.ts +1 -1
  91. package/dist/embedding-fallback.d.ts +1 -1
  92. package/dist/enrichment/index.d.ts +1 -1
  93. package/dist/entity-retrieval.d.ts +1 -1
  94. package/dist/entity-retrieval.js +3 -3
  95. package/dist/entity-schema.d.ts +1 -1
  96. package/dist/explicit-capture.d.ts +3 -3
  97. package/dist/explicit-cue-recall.js +2 -2
  98. package/dist/extraction-judge-telemetry.d.ts +1 -1
  99. package/dist/extraction-judge-training.d.ts +1 -1
  100. package/dist/extraction-judge.d.ts +1 -1
  101. package/dist/extraction.d.ts +1 -1
  102. package/dist/fallback-llm.d.ts +1 -1
  103. package/dist/focused-list-recall.js +2 -2
  104. package/dist/identity-continuity.d.ts +1 -1
  105. package/dist/importance.d.ts +1 -1
  106. package/dist/index.d.ts +121 -121
  107. package/dist/index.js +32 -32
  108. package/dist/intent.d.ts +1 -1
  109. package/dist/lcm/engine.d.ts +1 -1
  110. package/dist/lcm/index.d.ts +1 -1
  111. package/dist/lcm/tools.d.ts +1 -1
  112. package/dist/lcm-fallback-read.js +1 -1
  113. package/dist/lifecycle.d.ts +1 -1
  114. package/dist/live-connectors-runner.d.ts +1 -1
  115. package/dist/local-llm.d.ts +1 -1
  116. package/dist/maintenance/memory-governance.d.ts +1 -1
  117. package/dist/maintenance/memory-governance.js +3 -3
  118. package/dist/maintenance/rebuild-memory-lifecycle-ledger.js +3 -3
  119. package/dist/maintenance/rebuild-memory-projection.js +4 -4
  120. package/dist/mcp-memory-inspector-app.d.ts +4 -4
  121. package/dist/memory-action-policy.d.ts +1 -1
  122. package/dist/memory-cache.d.ts +1 -1
  123. package/dist/memory-lifecycle-ledger-utils.d.ts +1 -1
  124. package/dist/memory-projection-store.d.ts +1 -1
  125. package/dist/memory-provenance.d.ts +1 -1
  126. package/dist/memory-worth-outcomes.d.ts +1 -1
  127. package/dist/models-json.d.ts +1 -1
  128. package/dist/namespaces/migrate.d.ts +1 -1
  129. package/dist/namespaces/migrate.js +4 -4
  130. package/dist/namespaces/principal.d.ts +1 -1
  131. package/dist/namespaces/search.d.ts +1 -1
  132. package/dist/namespaces/storage.d.ts +1 -1
  133. package/dist/namespaces/storage.js +3 -3
  134. package/dist/native-knowledge.d.ts +1 -1
  135. package/dist/operator-toolkit.d.ts +1 -1
  136. package/dist/operator-toolkit.js +7 -7
  137. package/dist/{orchestrator-BgzZlWxH.d.ts → orchestrator-D1wcmPNj.d.ts} +8 -2
  138. package/dist/orchestrator.d.ts +3 -3
  139. package/dist/orchestrator.js +18 -18
  140. package/dist/patterns-cli.d.ts +1 -1
  141. package/dist/policy-runtime.d.ts +1 -1
  142. package/dist/qmd-recall-cache.d.ts +1 -1
  143. package/dist/qmd.d.ts +1 -1
  144. package/dist/recall-disclosure-escalation.d.ts +1 -1
  145. package/dist/recall-explain-renderer.d.ts +1 -1
  146. package/dist/recall-explain-renderer.js +3 -3
  147. package/dist/recall-planner-llm.d.ts +1 -1
  148. package/dist/recall-state.d.ts +1 -1
  149. package/dist/recall-tag-filter.d.ts +1 -1
  150. package/dist/recall-xray-cli.d.ts +1 -1
  151. package/dist/recall-xray-cli.js +4 -4
  152. package/dist/recall-xray-renderer.d.ts +1 -1
  153. package/dist/recall-xray-renderer.js +3 -3
  154. package/dist/recall-xray.d.ts +1 -1
  155. package/dist/recall-xray.js +2 -2
  156. package/dist/resolve-auth-token.d.ts +1 -1
  157. package/dist/response-guidance-recall.js +2 -2
  158. package/dist/resume-bundles.js +2 -2
  159. package/dist/retrieval-agents.d.ts +1 -1
  160. package/dist/retrieval-tiers.d.ts +1 -1
  161. package/dist/routing/engine.d.ts +1 -1
  162. package/dist/routing/store.d.ts +1 -1
  163. package/dist/schemas.d.ts +22 -22
  164. package/dist/search/embed-helper.d.ts +1 -1
  165. package/dist/search/factory.d.ts +1 -1
  166. package/dist/search/index.d.ts +1 -1
  167. package/dist/search/lancedb-backend.d.ts +1 -1
  168. package/dist/search/meilisearch-backend.d.ts +1 -1
  169. package/dist/search/noop-backend.d.ts +1 -1
  170. package/dist/search/orama-backend.d.ts +1 -1
  171. package/dist/search/port.d.ts +1 -1
  172. package/dist/search/remote-backend.d.ts +1 -1
  173. package/dist/{semantic-consolidation-Z8d_uMq8.d.ts → semantic-consolidation-MWOdNtSE.d.ts} +1 -1
  174. package/dist/semantic-consolidation.d.ts +2 -2
  175. package/dist/semantic-consolidation.js +4 -4
  176. package/dist/semantic-rule-promotion.js +3 -3
  177. package/dist/semantic-rule-verifier.d.ts +3 -2
  178. package/dist/semantic-rule-verifier.js +5 -3
  179. package/dist/session-observer-bands.d.ts +1 -1
  180. package/dist/session-observer-state.d.ts +1 -1
  181. package/dist/shared-context/manager.d.ts +1 -1
  182. package/dist/signal.d.ts +1 -1
  183. package/dist/storage.d.ts +1 -1
  184. package/dist/storage.js +2 -2
  185. package/dist/summarizer.d.ts +1 -1
  186. package/dist/summary-snapshot.d.ts +1 -1
  187. package/dist/targeted-fact-recall.js +2 -2
  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/transfer/types.d.ts +12 -12
  196. package/dist/{types-2OPlQWJG.d.ts → types-CgcCpUrf.d.ts} +39 -1
  197. package/dist/types.d.ts +1 -1
  198. package/dist/types.js +1 -1
  199. package/dist/utility-runtime.d.ts +1 -1
  200. package/dist/verified-recall.d.ts +2 -1
  201. package/dist/verified-recall.js +5 -3
  202. package/package.json +1 -1
  203. package/src/access-service-observe-lcm-parity.test.ts +86 -1
  204. package/src/access-service-observe-scope.test.ts +283 -1
  205. package/src/access-service-raw-excerpt-read-gate.test.ts +53 -0
  206. package/src/access-service.ts +391 -93
  207. package/src/coding/coding-namespace.ts +0 -3
  208. package/src/config.ts +282 -0
  209. package/src/lcm-fallback-read.ts +2 -6
  210. package/src/namespaces/scope-profiles.test.ts +1074 -0
  211. package/src/namespaces/scope-profiles.ts +456 -0
  212. package/src/orchestrator-flush.test.ts +142 -0
  213. package/src/orchestrator-source-attribution.test.ts +73 -0
  214. package/src/orchestrator.ts +835 -163
  215. package/src/semantic-rule-verifier.ts +13 -6
  216. package/src/types.ts +52 -0
  217. package/src/verified-recall.ts +10 -6
  218. package/dist/chunk-55ZMNKMQ.js.map +0 -1
  219. package/dist/chunk-5QD3QD76.js.map +0 -1
  220. package/dist/chunk-KOI765XP.js.map +0 -1
  221. package/dist/chunk-MMJANTJX.js +0 -339
  222. package/dist/chunk-MMJANTJX.js.map +0 -1
  223. package/dist/chunk-NCSJKK23.js.map +0 -1
  224. package/dist/chunk-TDZSSJV4.js.map +0 -1
  225. package/dist/chunk-UCEABZZN.js.map +0 -1
  226. /package/dist/{chunk-PVE7KSQP.js.map → chunk-2BD7DG37.js.map} +0 -0
  227. /package/dist/{chunk-54LOUIBE.js.map → chunk-2MXEVL75.js.map} +0 -0
  228. /package/dist/{chunk-COVZLGMR.js.map → chunk-54XF2FY7.js.map} +0 -0
  229. /package/dist/{chunk-UYNFWZWG.js.map → chunk-AGJKWOKV.js.map} +0 -0
  230. /package/dist/{chunk-A3Y37UWI.js.map → chunk-DIBWFCLA.js.map} +0 -0
  231. /package/dist/{chunk-QDVQ4AN2.js.map → chunk-DR67OK4E.js.map} +0 -0
  232. /package/dist/{chunk-XBIACVCO.js.map → chunk-EC2AYKRX.js.map} +0 -0
  233. /package/dist/{chunk-IQ53ZSXV.js.map → chunk-GCYFUTUC.js.map} +0 -0
  234. /package/dist/{chunk-YYN3LIYA.js.map → chunk-GSHW5VVD.js.map} +0 -0
  235. /package/dist/{chunk-NRBGRZW4.js.map → chunk-IOZ5WBWD.js.map} +0 -0
  236. /package/dist/{chunk-7LWRCOP7.js.map → chunk-LZTFCAKE.js.map} +0 -0
  237. /package/dist/{chunk-TEO46GMM.js.map → chunk-NXCK7DO7.js.map} +0 -0
  238. /package/dist/{chunk-XOFXKASO.js.map → chunk-PEPHBH2W.js.map} +0 -0
  239. /package/dist/{chunk-WDTUYOLS.js.map → chunk-QZRKNA5F.js.map} +0 -0
  240. /package/dist/{chunk-PS3SYNHP.js.map → chunk-R5DB26G6.js.map} +0 -0
  241. /package/dist/{chunk-BGKXTVNG.js.map → chunk-SWDHVH2P.js.map} +0 -0
  242. /package/dist/{chunk-67G4T7KI.js.map → chunk-SXYCVRLK.js.map} +0 -0
  243. /package/dist/{chunk-UCEDY5M7.js.map → chunk-TIJYQXDI.js.map} +0 -0
  244. /package/dist/{chunk-2RCGZ67B.js.map → chunk-VAEAGTEQ.js.map} +0 -0
  245. /package/dist/{chunk-XRKQOQLY.js.map → chunk-WIKMCJUR.js.map} +0 -0
  246. /package/dist/{chunk-KZZ4YAEC.js.map → chunk-WWMHAMAY.js.map} +0 -0
  247. /package/dist/{chunk-OKW6F5S5.js.map → chunk-YEZHZCUO.js.map} +0 -0
  248. /package/dist/{chunk-3XGWCZ63.js.map → chunk-YXLT4EMM.js.map} +0 -0
  249. /package/dist/{chunk-PTMJ2FH2.js.map → chunk-Z6UDTNY6.js.map} +0 -0
@@ -1,7 +1,7 @@
1
1
  import { SearchBackend, SearchExecutionOptions } from '../search/port.js';
2
2
  import { ConversationChunk } from './chunker.js';
3
3
  import { C as ConversationSearchResult, F as FaissConversationIndexAdapter } from '../faiss-adapter-BHecI1fF.js';
4
- import '../types-2OPlQWJG.js';
4
+ import '../types-CgcCpUrf.js';
5
5
  import '../types-ByK7T3L6.js';
6
6
  import '../index-DJ9QWMw-.js';
7
7
  import '../runtime/child-process.js';
@@ -1,4 +1,4 @@
1
- import { _ as TranscriptEntry } from '../types-2OPlQWJG.js';
1
+ import { _ as TranscriptEntry } from '../types-CgcCpUrf.js';
2
2
  import '../types-ByK7T3L6.js';
3
3
  import '../index-DJ9QWMw-.js';
4
4
 
@@ -1,7 +1,7 @@
1
1
  import './chunker.js';
2
2
  export { b as FaissAdapterConfig, c as FaissAdapterError, F as FaissConversationIndexAdapter, d as FaissHealthResult, e as FaissInspectResult, f as failOpenFaissHealth, r as resolveDefaultFaissScriptPath } from '../faiss-adapter-BHecI1fF.js';
3
3
  import '../runtime/child-process.js';
4
- import '../types-2OPlQWJG.js';
4
+ import '../types-CgcCpUrf.js';
5
5
  import '../types-ByK7T3L6.js';
6
6
  import '../index-DJ9QWMw-.js';
7
7
  import '../search/port.js';
@@ -1,7 +1,7 @@
1
1
  import { F as FaissConversationIndexAdapter } from '../faiss-adapter-BHecI1fF.js';
2
2
  import { ConversationChunk } from './chunker.js';
3
3
  import '../search/port.js';
4
- import '../types-2OPlQWJG.js';
4
+ import '../types-CgcCpUrf.js';
5
5
  import '../types-ByK7T3L6.js';
6
6
  import '../index-DJ9QWMw-.js';
7
7
  import '../runtime/child-process.js';
@@ -1,6 +1,6 @@
1
1
  import '../search/port.js';
2
2
  export { C as ConversationSearchResult, s as searchConversationIndex, a as searchConversationIndexFaissFailOpen } from '../faiss-adapter-BHecI1fF.js';
3
- import '../types-2OPlQWJG.js';
3
+ import '../types-CgcCpUrf.js';
4
4
  import '../types-ByK7T3L6.js';
5
5
  import '../index-DJ9QWMw-.js';
6
6
  import './chunker.js';
@@ -1,4 +1,4 @@
1
- import { P as PluginConfig, g as MemoryFile } from './types-2OPlQWJG.js';
1
+ import { P as PluginConfig, g as MemoryFile } from './types-CgcCpUrf.js';
2
2
  import './types-ByK7T3L6.js';
3
3
  import './index-DJ9QWMw-.js';
4
4
 
@@ -1,4 +1,4 @@
1
- import { ac as EntityMention } from './types-2OPlQWJG.js';
1
+ import { ac as EntityMention } from './types-CgcCpUrf.js';
2
2
  import './types-ByK7T3L6.js';
3
3
  import './index-DJ9QWMw-.js';
4
4
 
@@ -1,4 +1,4 @@
1
- import { g as MemoryFile, P as PluginConfig } from './types-2OPlQWJG.js';
1
+ import { g as MemoryFile, P as PluginConfig } from './types-CgcCpUrf.js';
2
2
  import { TrustZoneName } from './trust-zones.js';
3
3
  import { T as Taxonomy } from './types-DJhqDJUV.js';
4
4
  import { DirectAnswerResult } from './direct-answer.js';
@@ -1,5 +1,5 @@
1
1
  import { TrustZoneName } from './trust-zones.js';
2
- import { g as MemoryFile } from './types-2OPlQWJG.js';
2
+ import { g as MemoryFile } from './types-CgcCpUrf.js';
3
3
  import './types-ByK7T3L6.js';
4
4
  import './index-DJ9QWMw-.js';
5
5
 
@@ -1,4 +1,4 @@
1
- import { P as PluginConfig } from './types-2OPlQWJG.js';
1
+ import { P as PluginConfig } from './types-CgcCpUrf.js';
2
2
  import './types-ByK7T3L6.js';
3
3
  import './index-DJ9QWMw-.js';
4
4
 
@@ -1,4 +1,4 @@
1
- import { M as MemoryCategory, a5 as ImportanceLevel } from '../types-2OPlQWJG.js';
1
+ import { M as MemoryCategory, a5 as ImportanceLevel } from '../types-CgcCpUrf.js';
2
2
  import { LoggerBackend } from '../logger.js';
3
3
  import '../types-ByK7T3L6.js';
4
4
  import '../index-DJ9QWMw-.js';
@@ -1,5 +1,5 @@
1
1
  import { StorageManager } from './storage.js';
2
- import { P as PluginConfig, _ as TranscriptEntry } from './types-2OPlQWJG.js';
2
+ import { P as PluginConfig, _ as TranscriptEntry } from './types-CgcCpUrf.js';
3
3
  import './page-versioning.js';
4
4
  import './consolidation-operator.js';
5
5
  import './memory-projection-store.js';
@@ -3,13 +3,13 @@ import {
3
3
  entityIndexVersion,
4
4
  entityRecentTranscriptLookbackHours,
5
5
  readRecentEntityTranscriptEntries
6
- } from "./chunk-NRBGRZW4.js";
6
+ } from "./chunk-IOZ5WBWD.js";
7
7
  import "./chunk-BEUDU7Y4.js";
8
- import "./chunk-TEO46GMM.js";
8
+ import "./chunk-NXCK7DO7.js";
9
9
  import "./chunk-M7XQSUBB.js";
10
10
  import "./chunk-5UZXUTVO.js";
11
11
  import "./chunk-J6A3CX5N.js";
12
- import "./chunk-TDZSSJV4.js";
12
+ import "./chunk-AZBV4RRY.js";
13
13
  import "./chunk-CPPS65WS.js";
14
14
  import "./chunk-RULE4VG5.js";
15
15
  import "./chunk-SCU65EZI.js";
@@ -1,4 +1,4 @@
1
- import { ad as EntitySchemaDefinition, ae as EntitySchemaSectionDefinition, E as EntityStructuredSection } from './types-2OPlQWJG.js';
1
+ import { ad as EntitySchemaDefinition, ae as EntitySchemaSectionDefinition, E as EntityStructuredSection } from './types-CgcCpUrf.js';
2
2
  import './types-ByK7T3L6.js';
3
3
  import './index-DJ9QWMw-.js';
4
4
 
@@ -1,5 +1,5 @@
1
- import { O as Orchestrator } from './orchestrator-BgzZlWxH.js';
2
- import { M as MemoryCategory, P as PluginConfig } from './types-2OPlQWJG.js';
1
+ import { O as Orchestrator } from './orchestrator-D1wcmPNj.js';
2
+ import { M as MemoryCategory, P as PluginConfig } from './types-CgcCpUrf.js';
3
3
  import './briefing.js';
4
4
  import './storage.js';
5
5
  import './page-versioning.js';
@@ -37,7 +37,7 @@ import './lcm/archive.js';
37
37
  import './lcm/summarizer.js';
38
38
  import './lcm/dag.js';
39
39
  import './lcm/queue.js';
40
- import './semantic-consolidation-Z8d_uMq8.js';
40
+ import './semantic-consolidation-MWOdNtSE.js';
41
41
  import './connectors/codex-materialize.js';
42
42
  import './logger.js';
43
43
  import './conversation-index/backend.js';
@@ -9,8 +9,8 @@ import {
9
9
  collectStructuredPlanCues,
10
10
  collectTemporalLexicalCues,
11
11
  normalizeTurnExpansionEnd
12
- } from "./chunk-3XGWCZ63.js";
13
- import "./chunk-5FOCXX5E.js";
12
+ } from "./chunk-YXLT4EMM.js";
13
+ import "./chunk-YVVQUAOO.js";
14
14
  import "./chunk-PYPOFEMK.js";
15
15
  import "./chunk-PZ5AY32C.js";
16
16
  export {
@@ -1,5 +1,5 @@
1
1
  import { JudgeVerdictKind } from './extraction-judge.js';
2
- import './types-2OPlQWJG.js';
2
+ import './types-CgcCpUrf.js';
3
3
  import './types-ByK7T3L6.js';
4
4
  import './index-DJ9QWMw-.js';
5
5
  import './local-llm.js';
@@ -1,5 +1,5 @@
1
1
  import { JudgeVerdictKind } from './extraction-judge.js';
2
- import './types-2OPlQWJG.js';
2
+ import './types-CgcCpUrf.js';
3
3
  import './types-ByK7T3L6.js';
4
4
  import './index-DJ9QWMw-.js';
5
5
  import './local-llm.js';
@@ -1,4 +1,4 @@
1
- import { a5 as ImportanceLevel, P as PluginConfig } from './types-2OPlQWJG.js';
1
+ import { a5 as ImportanceLevel, P as PluginConfig } from './types-CgcCpUrf.js';
2
2
  import { LocalLlmClient } from './local-llm.js';
3
3
  import { FallbackLlmClient } from './fallback-llm.js';
4
4
  import './types-ByK7T3L6.js';
@@ -1,6 +1,6 @@
1
1
  import { LocalLlmClient } from './local-llm.js';
2
2
  import { ContradictionVerificationResult, SuggestedLinks, MemorySummaryResult } from './schemas.js';
3
- import { P as PluginConfig, G as GatewayConfig, Y as BufferTurn, af as ExtractionResult, g as MemoryFile, ag as ConsolidationResult, ah as DaySummaryResult } from './types-2OPlQWJG.js';
3
+ import { P as PluginConfig, G as GatewayConfig, Y as BufferTurn, af as ExtractionResult, g as MemoryFile, ag as ConsolidationResult, ah as DaySummaryResult } from './types-CgcCpUrf.js';
4
4
  import { ModelRegistry } from './model-registry.js';
5
5
  import { ProfilingCollector } from './profiling.js';
6
6
  import './types-ByK7T3L6.js';
@@ -1,4 +1,4 @@
1
- import { G as GatewayConfig, f as AgentPersonaModelConfig, P as PluginConfig } from './types-2OPlQWJG.js';
1
+ import { G as GatewayConfig, f as AgentPersonaModelConfig, P as PluginConfig } from './types-CgcCpUrf.js';
2
2
  import { GetRuntimeAuthForModelFn, ResolveApiKeyFn } from './resolve-provider-secret.js';
3
3
  import './types-ByK7T3L6.js';
4
4
  import './index-DJ9QWMw-.js';
@@ -1,8 +1,8 @@
1
1
  import {
2
2
  buildFocusedListRecallSection,
3
3
  shouldRecallFocusedListEvidence
4
- } from "./chunk-7LWRCOP7.js";
5
- import "./chunk-5FOCXX5E.js";
4
+ } from "./chunk-LZTFCAKE.js";
5
+ import "./chunk-YVVQUAOO.js";
6
6
  import "./chunk-PYPOFEMK.js";
7
7
  import "./chunk-PZ5AY32C.js";
8
8
  export {
@@ -1,4 +1,4 @@
1
- import { q as ContinuityIncidentRecord, r as ContinuityIncidentCloseInput, p as ContinuityIncidentOpenInput, s as ContinuityImprovementLoop, u as ContinuityLoopReviewInput, t as ContinuityLoopUpsertInput } from './types-2OPlQWJG.js';
1
+ import { q as ContinuityIncidentRecord, r as ContinuityIncidentCloseInput, p as ContinuityIncidentOpenInput, s as ContinuityImprovementLoop, u as ContinuityLoopReviewInput, t as ContinuityLoopUpsertInput } from './types-CgcCpUrf.js';
2
2
  import './types-ByK7T3L6.js';
3
3
  import './index-DJ9QWMw-.js';
4
4
 
@@ -1,4 +1,4 @@
1
- import { a5 as ImportanceLevel, g as MemoryFile, I as ImportanceScore, M as MemoryCategory } from './types-2OPlQWJG.js';
1
+ import { a5 as ImportanceLevel, g as MemoryFile, I as ImportanceScore, M as MemoryCategory } from './types-CgcCpUrf.js';
2
2
  import './types-ByK7T3L6.js';
3
3
  import './index-DJ9QWMw-.js';
4
4
 
package/dist/index.d.ts CHANGED
@@ -1,8 +1,8 @@
1
1
  export { PluginEntryResolverOptions, resolvePluginEntry } from './plugin-entry-resolver.js';
2
2
  export { isOpenaiApiKeyDisabled, parseConfig, resolveEnvVars } from './config.js';
3
3
  export { MigrationOptions, MigrationResult, RollbackResult, migrateFromEngram, rollbackFromEngramMigration } from './migrate/from-engram.js';
4
- import { S as SpeakerRegistry, W as WearablesService } from './orchestrator-BgzZlWxH.js';
5
- export { D as DEFAULT_SELF_NAME, N as NamespaceCatalog, a as NamespaceCatalogFilter, b as NamespaceCatalogRebuildResult, c as NamespaceCatalogSkippedRoot, d as NamespaceDiscoverySource, e as NamespaceKind, f as NamespaceRecord, g as NamespaceTouchMetadata, O as Orchestrator, R as ResolvedSpeaker, h as SpeakerOverride, i as WEARABLE_SOURCE_PREFIX, j as WearableDayTranscriptView, k as WearableMemoryGenDeps, l as WearableMemoryGenResult, m as WearableMemorySearchResult, n as WearableMemoryWriter, o as WearableSearchBackend, p as WearableStorageIo, q as WearableSyncDeps, r as WearableSyncOptions, s as WearableTranscriptSearchResult, t as WearablesServiceDeps, u as buildExtractionTurns, v as dateInTimezone, w as defaultTimezone, x as defaultWorkspaceDir, y as distinctSpeakerLabels, z as emptySpeakerRegistry, A as generateWearableMemories, B as importNativeMemories, C as loadSpeakerRegistry, E as locateTranscriptPath, F as memoryStatusForMode, H as resolveSpeaker, J as resolveSyncDates, K as sanitizeSessionKeyForFilename, L as saveSpeakerRegistry, M as speakerRegistryKey, Q as speakersFilePath, T as syncWearableSource, U as wearableDayTag, V as wearableSourceLabel, X as writeDailyDigestMemory } from './orchestrator-BgzZlWxH.js';
4
+ import { S as SpeakerRegistry, W as WearablesService } from './orchestrator-D1wcmPNj.js';
5
+ export { D as DEFAULT_SELF_NAME, N as NamespaceCatalog, a as NamespaceCatalogFilter, b as NamespaceCatalogRebuildResult, c as NamespaceCatalogSkippedRoot, d as NamespaceDiscoverySource, e as NamespaceKind, f as NamespaceRecord, g as NamespaceTouchMetadata, O as Orchestrator, R as ResolvedSpeaker, h as SpeakerOverride, i as WEARABLE_SOURCE_PREFIX, j as WearableDayTranscriptView, k as WearableMemoryGenDeps, l as WearableMemoryGenResult, m as WearableMemorySearchResult, n as WearableMemoryWriter, o as WearableSearchBackend, p as WearableStorageIo, q as WearableSyncDeps, r as WearableSyncOptions, s as WearableTranscriptSearchResult, t as WearablesServiceDeps, u as buildExtractionTurns, v as dateInTimezone, w as defaultTimezone, x as defaultWorkspaceDir, y as distinctSpeakerLabels, z as emptySpeakerRegistry, A as generateWearableMemories, B as importNativeMemories, C as loadSpeakerRegistry, E as locateTranscriptPath, F as memoryStatusForMode, H as resolveSpeaker, J as resolveSyncDates, K as sanitizeSessionKeyForFilename, L as saveSpeakerRegistry, M as speakerRegistryKey, Q as speakersFilePath, T as syncWearableSource, U as wearableDayTag, V as wearableSourceLabel, X as writeDailyDigestMemory } from './orchestrator-D1wcmPNj.js';
6
6
  export { normalizeProjectionPreview, normalizeProjectionTags } from './memory-projection-format.js';
7
7
  export { ModelCapabilities, ModelRegistry } from './model-registry.js';
8
8
  export { ACTIVE_STATUSES, ContradictionFilter, ContradictionJudgeBatchResult, ContradictionJudgeInput, ContradictionJudgeResult, ContradictionListResult, ContradictionVerdict, ResolutionResult, ResolutionVerb, ScanDependencies, ScanResult, computePairId, executeResolution, isCoolingDown, isValidResolutionVerb, judgeContradictionPairs, listPairs, readPair, resolvePair, runContradictionScan, writePair, writePairs } from './contradiction/index.js';
@@ -20,11 +20,11 @@ export { CodexCliFallbackConfig, CodexCliFallbackMessage, CodexCliFallbackOption
20
20
  export { BufferSurpriseProbe, SmartBuffer, TriggerDecision } from './buffer.js';
21
21
  export { ComputeSurpriseOptions, DEFAULT_SURPRISE_K, RecentMemoryLike, computeSurprise } from './buffer-surprise.js';
22
22
  export { BufferSurpriseDistribution, BufferSurpriseReader, BufferSurpriseReportOptions, reportBufferSurpriseDistribution } from './buffer-surprise-report.js';
23
- import { P as PluginConfig, aG as CodingContext, aL as CodingModeConfig, M as MemoryCategory, aM as WearableCleanupSettings, ax as WearableSourceSettings, aB as WearablesConfig, aA as WearableSourceConnector, aw as WearableConversation, aF as WearableCorrectionRule, aN as WearableDayTranscriptMeta, aE as WearableDayTranscript } from './types-2OPlQWJG.js';
24
- export { a7 as AgentAccessAuthToken, V as BriefingActiveThread, aO as BriefingConfig, Q as BriefingFocus, O as BriefingFollowup, aP as BriefingOpenCommitment, X as BriefingRecentEntity, W as BriefingResult, N as BriefingSections, aQ as BriefingWindow, o as BufferSurpriseEvent, U as CalendarEvent, S as CalendarSource, aR as CodexCompatConfig, aJ as ConsolidationObservation, s as ContinuityImprovementLoop, aS as DEFAULT_RECALL_DISCLOSURE, x as EntityFile, E as EntityStructuredSection, aT as ExtractedFact, G as GatewayConfig, ak as MemoryActionEligibilityContext, aU as MemoryActionEligibilitySource, ab as MemoryActionType, g as MemoryFile, j as MemoryFrontmatter, aV as MemoryObservation, aW as MemoryScope, aX as RECALL_DISCLOSURE_LEVELS, K as RecallDisclosure, a6 as SecretRef, aY as WearableAuthCheck, aZ as WearableFetchOptions, a_ as WearableFetchPage, az as WearableMemoryMode, ay as WearableNativeMemory, a$ as WearableNativeMemoryPage, aD as WearableSourceStatus, aC as WearableSyncSummary, b0 as WearableTranscriptSegment, b1 as isRecallDisclosure } from './types-2OPlQWJG.js';
23
+ import { aI as CodingContext, aN as CodingModeConfig, P as PluginConfig, M as MemoryCategory, aO as WearableCleanupSettings, az as WearableSourceSettings, aD as WearablesConfig, aC as WearableSourceConnector, ay as WearableConversation, aH as WearableCorrectionRule, aP as WearableDayTranscriptMeta, aG as WearableDayTranscript } from './types-CgcCpUrf.js';
24
+ export { a7 as AgentAccessAuthToken, V as BriefingActiveThread, aQ as BriefingConfig, Q as BriefingFocus, O as BriefingFollowup, aR as BriefingOpenCommitment, X as BriefingRecentEntity, W as BriefingResult, N as BriefingSections, aS as BriefingWindow, o as BufferSurpriseEvent, U as CalendarEvent, S as CalendarSource, aT as CodexCompatConfig, aL as ConsolidationObservation, s as ContinuityImprovementLoop, aU as DEFAULT_RECALL_DISCLOSURE, x as EntityFile, E as EntityStructuredSection, aV as ExtractedFact, G as GatewayConfig, ak as MemoryActionEligibilityContext, aW as MemoryActionEligibilitySource, ab as MemoryActionType, g as MemoryFile, j as MemoryFrontmatter, aX as MemoryObservation, aY as MemoryScope, aZ as RECALL_DISCLOSURE_LEVELS, K as RecallDisclosure, a6 as SecretRef, a_ as WearableAuthCheck, a$ as WearableFetchOptions, b0 as WearableFetchPage, aB as WearableMemoryMode, aA as WearableNativeMemory, b1 as WearableNativeMemoryPage, aF as WearableSourceStatus, aE as WearableSyncSummary, b2 as WearableTranscriptSegment, b3 as isRecallDisclosure } from './types-CgcCpUrf.js';
25
25
  export { JudgeBatchResult, JudgeCandidate, JudgeVerdict, JudgeVerdictKind, clearVerdictCache, createVerdictCache, getVerdictKind, isDurableVerdict, isValidCachedVerdict, judgeFactDurability, normalizeCachedVerdict, verdictCacheSize } from './extraction-judge.js';
26
26
  export { hasBroadGraphIntent, inferIntentFromText, intentCompatibilityScore, isTaskInitiationIntent, planRecallMode } from './intent.js';
27
- export { b as EngramAccessInputError, E as EngramAccessService, P as ProcedureStatsConfigSnapshot, c as ProcedureStatsRecent, d as ProcedureStatsReport, e as ProcedureStatusCounts, f as computeProcedureStats, g as formatProcedureStatsText } from './access-service-BEJvriUt.js';
27
+ export { b as EngramAccessInputError, E as EngramAccessService, P as ProcedureStatsConfigSnapshot, c as ProcedureStatsRecent, d as ProcedureStatsReport, e as ProcedureStatusCounts, f as computeProcedureStats, g as formatProcedureStatsText } from './access-service-D_nbpexW.js';
28
28
  export { FILTER_LABELS as DIRECT_ANSWER_FILTER_LABELS, DirectAnswerCandidate, DirectAnswerConfig, DirectAnswerInput, DirectAnswerReason, DirectAnswerResult, isDirectAnswerEligible } from './direct-answer.js';
29
29
  export { MemoryTier, TierRoutingPolicy, TierTransitionDecision, computeTierValueScore, decideTierTransition } from './tier-routing.js';
30
30
  export { ApplyReasoningTraceBoostOptions, BoostableResult, DEFAULT_REASONING_TRACE_BOOST, applyReasoningTraceBoost, isReasoningTracePath, looksLikeProblemSolvingQuery } from './reasoning-trace-recall.js';
@@ -61,8 +61,8 @@ export { CitationBlock, CitationEntry, CitationMetadata, buildCitationGuidance,
61
61
  export { initLogger, log } from './logger.js';
62
62
  export { b as SemanticDedupDecision, a as SemanticDedupHit, S as SemanticDedupLookup, c as SemanticDedupOptions, d as decideSemanticDedup } from './semantic-DJR8_DMQ.js';
63
63
  export { OFFLINE_SYNC_APPLY_MAX_BODY_BYTES, OFFLINE_SYNC_CHANGESET_FORMAT, OFFLINE_SYNC_FILE_CONTENT_MAX_CHUNK_BYTES, OFFLINE_SYNC_FILE_CONTENT_TRANSFER_CHUNK_BYTES, OFFLINE_SYNC_SNAPSHOT_BASE_MAX_BODY_BYTES, OFFLINE_SYNC_SNAPSHOT_FORMAT, OFFLINE_SYNC_STATE_VERSION, OfflineSyncApplyChangesetResult, OfflineSyncApplyFileContentChunkResult, OfflineSyncApplySnapshotResult, OfflineSyncChange, OfflineSyncChangeset, OfflineSyncConflict, OfflineSyncFileContentChunk, OfflineSyncFileDigest, OfflineSyncFileRecord, OfflineSyncFileState, OfflineSyncFileTarget, OfflineSyncFileWriteTarget, OfflineSyncSnapshot, OfflineSyncState, applyOfflineSyncChangeset, applyOfflineSyncFileContentChunk, applyOfflineSyncSnapshot, buildOfflineSyncChangeset, buildOfflineSyncChangesetFromSnapshot, buildOfflineSyncSnapshot, buildOfflineSyncSnapshotForPaths, buildOfflineSyncSnapshotFromBase, defaultOfflineSyncStatePath, fileStatesFromSnapshot, iterateOfflineSyncSnapshotFileRecords, normalizeOfflineSyncChangeset, normalizeOfflineSyncSnapshot, offlineSyncStateFromSnapshot, readOfflineSyncFileContentChunk, readOfflineSyncState, shouldPreferIncomingOfflineRuntimeFile, summarizeOfflineSyncChangeset, summarizeOfflineSyncPendingChanges, summarizeOfflineSyncPendingFiles, writeOfflineSyncState } from './offline-sync.js';
64
- import { D as DiscoveredExtension } from './semantic-consolidation-Z8d_uMq8.js';
65
- export { E as ExtensionSchema, R as REMNIC_EXTENSIONS_TOTAL_TOKEN_LIMIT, b as buildExtensionsBlockForConsolidation, d as discoverMemoryExtensions, r as resolveExtensionsRoot } from './semantic-consolidation-Z8d_uMq8.js';
64
+ import { D as DiscoveredExtension } from './semantic-consolidation-MWOdNtSE.js';
65
+ export { E as ExtensionSchema, R as REMNIC_EXTENSIONS_TOTAL_TOKEN_LIMIT, b as buildExtensionsBlockForConsolidation, d as discoverMemoryExtensions, r as resolveExtensionsRoot } from './semantic-consolidation-MWOdNtSE.js';
66
66
  export { ConnectorCapability, ConnectorInstance, ConnectorManifest, ConnectorRegistry, DoctorCheck, DoctorResult, InstallOptions, InstallResult, MARKETPLACE_MANIFEST_FILENAME, MARKETPLACE_SCHEMA_VERSION, MarketplaceConfig, MarketplaceEntry, MarketplaceInstallResult, MarketplaceInstallType, MarketplaceLogger, MarketplaceManifest, MarketplaceValidation, RemoveResult, checkMarketplaceManifest, coerceInstallExtension, doctorConnector, generateMarketplaceManifest, getConnectorToken, installConnector, installFromMarketplace, listConnectors, loadRegistry, removeConnector, saveRegistry, validateMarketplaceManifest, writeMarketplaceManifest } from './connectors/index.js';
67
67
  import { L as LiveConnector, S as SyncIncrementalResult } from './framework-CNDn2164.js';
68
68
  export { c as CONNECTOR_ID_PATTERN, C as ConnectorConfig, b as ConnectorCursor, a as ConnectorDocument, d as ConnectorDocumentSource, e as SyncIncrementalArgs, i as isValidConnectorId, p as persistableConnectorConfig, r as redactConnectorConfigSecrets } from './framework-CNDn2164.js';
@@ -78,7 +78,7 @@ export { EnrichmentAuditEntry, EnrichmentCandidate, EnrichmentCostTier, Enrichme
78
78
  export { d as BulkImportError, B as BulkImportOptions, b as BulkImportResult, a as BulkImportSource, e as BulkImportSourceAdapter, f as ImportSourceRole, I as ImportTurn, g as ImportTurnValidationIssue, i as isImportRole, p as parseIsoTimestamp, v as validateImportTurn } from './types-ByK7T3L6.js';
79
79
  export { clearBulkImportSources, getBulkImportSource, listBulkImportSources, registerBulkImportSource } from './bulk-import/index.js';
80
80
  export { a as ProcessBatchContext, P as ProcessBatchFn, b as ProcessBatchResult, f as formatBatchTranscript, r as resolveBulkImportContext, c as runBulkImportPipeline, v as validateBatchSize } from './pipeline-BSTuml0d.js';
81
- export { B as BulkImportCliCommandOptions, p as parseStrictCliDate, r as runBulkImportCliCommand } from './cli-BGahB_d3.js';
81
+ export { B as BulkImportCliCommandOptions, p as parseStrictCliDate, r as runBulkImportCliCommand } from './cli-aYxSuPvP.js';
82
82
  export { DEFAULT_IMPORT_BATCH_SIZE, ImportProgress, ImportedMemory, ImporterAdapter, ImporterParseOptions, ImporterTransformOptions, ImporterWriteResult, ImporterWriteTarget, RunImportOptions, RunImporterResult, defaultWriteMemoriesToOrchestrator, importedMemoryToTurn, runImporter, validateImportBatchSize, validateImportRateLimit } from './importers/index.js';
83
83
  export { FallbackLlmClient, FallbackLlmOptions, FallbackLlmResponse, FallbackLlmRuntimeContext } from './fallback-llm.js';
84
84
  export { ComputeMemoryWorthInput, MemoryWorthResult, computeMemoryWorth } from './memory-worth.js';
@@ -526,6 +526,119 @@ declare function renderExtensionsBlock(extensions: DiscoveredExtension[]): strin
526
526
  */
527
527
  declare function renderExtensionsFooter(extensions: DiscoveredExtension[]): string;
528
528
 
529
+ /**
530
+ * Coding-agent namespace overlay (issue #569 PR 2 + PR 3).
531
+ *
532
+ * Given a `CodingContext` (from `resolveGitContext`) and a `CodingModeConfig`,
533
+ * returns the namespace that recall + write paths should use — or `null` when
534
+ * no overlay should apply (coding mode disabled, no context supplied, or
535
+ * feature flags off).
536
+ *
537
+ * PR 2 ships the project overlay. PR 3 will add the branch overlay; the
538
+ * function here already handles both flags so the schema / types / plumbing
539
+ * don't have to change a second time when branch-scope lands.
540
+ *
541
+ * Pure function — no orchestrator, no config side-effects. Callers keep rule
542
+ * 42 (read + write through same namespace layer) by consulting the same
543
+ * function on both paths.
544
+ */
545
+
546
+ interface CodingNamespaceOverlay {
547
+ /**
548
+ * Effective namespace to use for this session's memory operations. When
549
+ * `branchScope` is on, takes the form `project:<id>/branch:<b>`; otherwise
550
+ * `project:<id>`.
551
+ */
552
+ namespace: string;
553
+ /**
554
+ * Read fallbacks — additional namespaces a caller should include in recall
555
+ * so that, for example, a branch-scoped session still sees project-level
556
+ * memories that were written before the branch scope was enabled.
557
+ *
558
+ * Writes MUST go to `namespace` only; these are read-side only.
559
+ *
560
+ * Introduced to carry PR 3's branch→project fallback; PR 2 returns an empty
561
+ * array here.
562
+ */
563
+ readFallbacks: string[];
564
+ /**
565
+ * `"project"` when only project scope applies, `"branch"` when branch scope
566
+ * is also layered on. Used for diagnostics (`remnic doctor`) and logging.
567
+ */
568
+ scope: "project" | "branch";
569
+ }
570
+ /**
571
+ * Produce the project-scope namespace name. Exported for tests and for
572
+ * `remnic doctor` to render. Guaranteed to satisfy `isSafeRouteNamespace`:
573
+ * no `/`, no `:`, lowercase only, length-capped to 64 chars.
574
+ */
575
+ declare function projectNamespaceName(projectId: string): string;
576
+ /**
577
+ * Produce the branch-scope namespace name. Format:
578
+ * `project-<id>-branch-<name>[-<hash>]`. Uses `-` as the structural separator
579
+ * rather than `/` or `:` so the result is a single safe route-namespace
580
+ * token that can be used directly as a filesystem directory.
581
+ *
582
+ * Two failure modes must not collapse distinct branches to one namespace:
583
+ *
584
+ * 1. Sanitization is lossy (`feat/x` and `feat-x` both sanitize to
585
+ * `feat-x`; `Feature` and `feature` both sanitize to `feature`). When
586
+ * sanitization rewrote any character, we append a short hash of the
587
+ * RAW branch so distinct inputs stay distinct.
588
+ * 2. Truncation is applied when the total exceeds 64 chars. In that
589
+ * mode `capLength` appends its own hash of the full pre-truncated
590
+ * value.
591
+ *
592
+ * Long branches that also sanitize may receive both kinds of hashes — that
593
+ * is acceptable: the router only requires the result be unique and
594
+ * deterministic, and the two hashes derive from different domains so they
595
+ * don't conflict.
596
+ */
597
+ declare function branchNamespaceName(projectId: string, branch: string): string;
598
+ /**
599
+ * Compute the namespace overlay for a session.
600
+ *
601
+ * Returns `null` when no overlay applies — callers should then use their
602
+ * existing `defaultNamespaceForPrincipal(...)` result unchanged. This keeps
603
+ * CLAUDE.md #30 (escape hatch): setting `codingMode.projectScope: false`
604
+ * exactly restores pre-#569 behaviour at every call site.
605
+ *
606
+ * @param codingContext — git context from the connector
607
+ * @param config — coding mode flags (projectScope, branchScope, globalFallback)
608
+ * @param defaultNamespace — retained for call-site compatibility; no longer
609
+ * used. The global fallback is expressed as an empty-string sentinel in
610
+ * `readFallbacks`, which `combineNamespaces(principal, "")` resolves to the
611
+ * principal's own namespace at the call site.
612
+ */
613
+ declare function resolveCodingNamespaceOverlay(codingContext: CodingContext | null | undefined, config: Pick<CodingModeConfig, "projectScope" | "branchScope" | "globalFallback">, defaultNamespace?: string): CodingNamespaceOverlay | null;
614
+ interface CodingScopeDescription {
615
+ /** "none" when no overlay is active; otherwise the resolved scope level. */
616
+ scope: "none" | "project" | "branch";
617
+ /** Project id (raw, not sanitized) when a context is attached. */
618
+ projectId: string | null;
619
+ /** Branch name (raw, not sanitized) when available. */
620
+ branch: string | null;
621
+ /** Effective namespace writes route to. `null` when no overlay applies. */
622
+ effectiveNamespace: string | null;
623
+ /** Read fallbacks included in recall (non-empty only when branch-scope is on). */
624
+ readFallbacks: string[];
625
+ /**
626
+ * Why no overlay applies, when `scope === "none"`. One of:
627
+ * - `"no-context"` — connector didn't attach a CodingContext
628
+ * - `"disabled"` — codingMode.projectScope is false
629
+ * - `"empty-project"` — codingContext.projectId was empty/whitespace
630
+ */
631
+ disabledReason: "no-context" | "disabled" | "empty-project" | null;
632
+ }
633
+ /**
634
+ * Human-readable description of the coding-agent scope that currently applies
635
+ * for a session. Consumed by `remnic doctor` (PR 8) and by logs to surface
636
+ * why recall routes where it does.
637
+ *
638
+ * Pure — callers pass the coding context + config they already have.
639
+ */
640
+ declare function describeCodingScope(codingContext: CodingContext | null | undefined, config: Pick<CodingModeConfig, "projectScope" | "branchScope" | "globalFallback">, defaultNamespace?: string): CodingScopeDescription;
641
+
529
642
  /**
530
643
  * Strict UTC-only parser — accepts `YYYY-MM-DDTHH:MM:SS[.sss]Z`.
531
644
  * Returns milliseconds since epoch, or `null` if invalid.
@@ -675,119 +788,6 @@ interface ResolveGitContextOptions {
675
788
  */
676
789
  declare function resolveGitContext(cwd: string, options?: ResolveGitContextOptions): Promise<GitContext | null>;
677
790
 
678
- /**
679
- * Coding-agent namespace overlay (issue #569 PR 2 + PR 3).
680
- *
681
- * Given a `CodingContext` (from `resolveGitContext`) and a `CodingModeConfig`,
682
- * returns the namespace that recall + write paths should use — or `null` when
683
- * no overlay should apply (coding mode disabled, no context supplied, or
684
- * feature flags off).
685
- *
686
- * PR 2 ships the project overlay. PR 3 will add the branch overlay; the
687
- * function here already handles both flags so the schema / types / plumbing
688
- * don't have to change a second time when branch-scope lands.
689
- *
690
- * Pure function — no orchestrator, no config side-effects. Callers keep rule
691
- * 42 (read + write through same namespace layer) by consulting the same
692
- * function on both paths.
693
- */
694
-
695
- interface CodingNamespaceOverlay {
696
- /**
697
- * Effective namespace to use for this session's memory operations. When
698
- * `branchScope` is on, takes the form `project:<id>/branch:<b>`; otherwise
699
- * `project:<id>`.
700
- */
701
- namespace: string;
702
- /**
703
- * Read fallbacks — additional namespaces a caller should include in recall
704
- * so that, for example, a branch-scoped session still sees project-level
705
- * memories that were written before the branch scope was enabled.
706
- *
707
- * Writes MUST go to `namespace` only; these are read-side only.
708
- *
709
- * Introduced to carry PR 3's branch→project fallback; PR 2 returns an empty
710
- * array here.
711
- */
712
- readFallbacks: string[];
713
- /**
714
- * `"project"` when only project scope applies, `"branch"` when branch scope
715
- * is also layered on. Used for diagnostics (`remnic doctor`) and logging.
716
- */
717
- scope: "project" | "branch";
718
- }
719
- /**
720
- * Produce the project-scope namespace name. Exported for tests and for
721
- * `remnic doctor` to render. Guaranteed to satisfy `isSafeRouteNamespace`:
722
- * no `/`, no `:`, lowercase only, length-capped to 64 chars.
723
- */
724
- declare function projectNamespaceName(projectId: string): string;
725
- /**
726
- * Produce the branch-scope namespace name. Format:
727
- * `project-<id>-branch-<name>[-<hash>]`. Uses `-` as the structural separator
728
- * rather than `/` or `:` so the result is a single safe route-namespace
729
- * token that can be used directly as a filesystem directory.
730
- *
731
- * Two failure modes must not collapse distinct branches to one namespace:
732
- *
733
- * 1. Sanitization is lossy (`feat/x` and `feat-x` both sanitize to
734
- * `feat-x`; `Feature` and `feature` both sanitize to `feature`). When
735
- * sanitization rewrote any character, we append a short hash of the
736
- * RAW branch so distinct inputs stay distinct.
737
- * 2. Truncation is applied when the total exceeds 64 chars. In that
738
- * mode `capLength` appends its own hash of the full pre-truncated
739
- * value.
740
- *
741
- * Long branches that also sanitize may receive both kinds of hashes — that
742
- * is acceptable: the router only requires the result be unique and
743
- * deterministic, and the two hashes derive from different domains so they
744
- * don't conflict.
745
- */
746
- declare function branchNamespaceName(projectId: string, branch: string): string;
747
- /**
748
- * Compute the namespace overlay for a session.
749
- *
750
- * Returns `null` when no overlay applies — callers should then use their
751
- * existing `defaultNamespaceForPrincipal(...)` result unchanged. This keeps
752
- * CLAUDE.md #30 (escape hatch): setting `codingMode.projectScope: false`
753
- * exactly restores pre-#569 behaviour at every call site.
754
- *
755
- * @param codingContext — git context from the connector
756
- * @param config — coding mode flags (projectScope, branchScope, globalFallback)
757
- * @param defaultNamespace — retained for call-site compatibility; no longer
758
- * used. The global fallback is expressed as an empty-string sentinel in
759
- * `readFallbacks`, which `combineNamespaces(principal, "")` resolves to the
760
- * principal's own namespace at the call site.
761
- */
762
- declare function resolveCodingNamespaceOverlay(codingContext: CodingContext | null | undefined, config: Pick<CodingModeConfig, "projectScope" | "branchScope" | "globalFallback">, defaultNamespace?: string): CodingNamespaceOverlay | null;
763
- interface CodingScopeDescription {
764
- /** "none" when no overlay is active; otherwise the resolved scope level. */
765
- scope: "none" | "project" | "branch";
766
- /** Project id (raw, not sanitized) when a context is attached. */
767
- projectId: string | null;
768
- /** Branch name (raw, not sanitized) when available. */
769
- branch: string | null;
770
- /** Effective namespace writes route to. `null` when no overlay applies. */
771
- effectiveNamespace: string | null;
772
- /** Read fallbacks included in recall (non-empty only when branch-scope is on). */
773
- readFallbacks: string[];
774
- /**
775
- * Why no overlay applies, when `scope === "none"`. One of:
776
- * - `"no-context"` — connector didn't attach a CodingContext
777
- * - `"disabled"` — codingMode.projectScope is false
778
- * - `"empty-project"` — codingContext.projectId was empty/whitespace
779
- */
780
- disabledReason: "no-context" | "disabled" | "empty-project" | null;
781
- }
782
- /**
783
- * Human-readable description of the coding-agent scope that currently applies
784
- * for a session. Consumed by `remnic doctor` (PR 8) and by logs to surface
785
- * why recall routes where it does.
786
- *
787
- * Pure — callers pass the coding context + config they already have.
788
- */
789
- declare function describeCodingScope(codingContext: CodingContext | null | undefined, config: Pick<CodingModeConfig, "projectScope" | "branchScope" | "globalFallback">, defaultNamespace?: string): CodingScopeDescription;
790
-
791
791
  /**
792
792
  * Diff-aware review-context packer (issue #569 PR 4).
793
793
  *