@remnic/core 9.3.729 → 9.3.730

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 (345) hide show
  1. package/dist/access-boundary.d.ts +6 -5
  2. package/dist/access-boundary.js +13 -13
  3. package/dist/access-cli.js +34 -33
  4. package/dist/access-cli.js.map +1 -1
  5. package/dist/access-http.d.ts +6 -5
  6. package/dist/access-http.js +19 -19
  7. package/dist/access-mcp.d.ts +6 -5
  8. package/dist/access-mcp.js +18 -18
  9. package/dist/access-operations-batch.js +16 -16
  10. package/dist/access-operations.d.ts +11 -10
  11. package/dist/access-operations.js +17 -17
  12. package/dist/access-schema.d.ts +42 -42
  13. package/dist/{access-service-BXMJqkTA.d.ts → access-service-Byoe3HsT.d.ts} +18 -3
  14. package/dist/access-service.d.ts +6 -5
  15. package/dist/access-service.js +12 -12
  16. package/dist/access-surface-catalog.d.ts +6 -5
  17. package/dist/action-confidence.d.ts +1 -1
  18. package/dist/active-memory-bridge.d.ts +1 -1
  19. package/dist/active-recall.d.ts +1 -1
  20. package/dist/active-recall.js +2 -2
  21. package/dist/{auto-sync-F3KCSQFJ.js → auto-sync-G3V5AN4C.js} +2 -2
  22. package/dist/behavior-learner.d.ts +1 -1
  23. package/dist/behavior-signals.d.ts +1 -1
  24. package/dist/bootstrap.d.ts +5 -4
  25. package/dist/briefing.d.ts +1 -1
  26. package/dist/briefing.js +3 -3
  27. package/dist/buffer-surprise-report.d.ts +1 -1
  28. package/dist/buffer.d.ts +1 -1
  29. package/dist/calibration.d.ts +1 -1
  30. package/dist/capabilities.d.ts +55 -2
  31. package/dist/capabilities.js +5 -1
  32. package/dist/{catalog-bMczlO2G.d.ts → catalog-DM1nk7cM.d.ts} +1 -1
  33. package/dist/causal-behavior.d.ts +1 -1
  34. package/dist/causal-consolidation.d.ts +1 -1
  35. package/dist/causal-consolidation.js +4 -4
  36. package/dist/causal-trajectory-graph.d.ts +1 -1
  37. package/dist/{chunk-4NOI577P.js → chunk-24ZLC5QN.js} +2 -2
  38. package/dist/{chunk-DMQWV6SQ.js → chunk-5RZOFIDL.js} +2 -2
  39. package/dist/{chunk-UM5AWJNQ.js → chunk-646B5ERJ.js} +62 -37
  40. package/dist/chunk-646B5ERJ.js.map +1 -0
  41. package/dist/{chunk-H5BWGCRZ.js → chunk-6TUWSUUD.js} +51 -47
  42. package/dist/{chunk-H5BWGCRZ.js.map → chunk-6TUWSUUD.js.map} +1 -1
  43. package/dist/{chunk-36SEDFAU.js → chunk-C5WN74HH.js} +2 -2
  44. package/dist/{chunk-MLKWJOAJ.js → chunk-CGPHMNL4.js} +2 -2
  45. package/dist/{chunk-R6OVFAX6.js → chunk-DJECGBBM.js} +7 -2
  46. package/dist/{chunk-R6OVFAX6.js.map → chunk-DJECGBBM.js.map} +1 -1
  47. package/dist/{chunk-3RCBIOOJ.js → chunk-ESF7TRYJ.js} +18 -2
  48. package/dist/{chunk-3RCBIOOJ.js.map → chunk-ESF7TRYJ.js.map} +1 -1
  49. package/dist/{chunk-EY6MDMHK.js → chunk-F6OEXJQQ.js} +2 -2
  50. package/dist/{chunk-M4V2JVSZ.js → chunk-FFUCCKPN.js} +2 -2
  51. package/dist/{chunk-O6YH5F47.js → chunk-FYWUNVFZ.js} +8 -8
  52. package/dist/{chunk-37436GML.js → chunk-GEXI357K.js} +2 -2
  53. package/dist/{chunk-YGIQORJ3.js → chunk-GGL34GCW.js} +3 -3
  54. package/dist/{chunk-4H4F3BFL.js → chunk-GXTYEG7Q.js} +3 -3
  55. package/dist/{chunk-4H4F3BFL.js.map → chunk-GXTYEG7Q.js.map} +1 -1
  56. package/dist/{chunk-WAS3NV46.js → chunk-H3MB3F62.js} +2 -2
  57. package/dist/{chunk-UTHQPSRC.js → chunk-HHNSLPX7.js} +11 -8
  58. package/dist/chunk-HHNSLPX7.js.map +1 -0
  59. package/dist/{chunk-76NHR6ZL.js → chunk-HJWQJUKQ.js} +4 -4
  60. package/dist/{chunk-Y4YD5TYW.js → chunk-IIBFCZA7.js} +3 -3
  61. package/dist/{chunk-UVPL565C.js → chunk-IQOEW5YV.js} +2 -2
  62. package/dist/{chunk-V4GNSDFH.js → chunk-KQYGNGON.js} +2 -2
  63. package/dist/{chunk-CBWI22JN.js → chunk-KSJCXXOU.js} +2 -2
  64. package/dist/{chunk-M4AYVEWS.js → chunk-LUCARK4W.js} +12 -11
  65. package/dist/chunk-LUCARK4W.js.map +1 -0
  66. package/dist/{chunk-I5REUWLH.js → chunk-NIZQH6AU.js} +3 -3
  67. package/dist/{chunk-4ESAR77N.js → chunk-NOU77OHX.js} +2 -2
  68. package/dist/{chunk-BQCHEV7O.js → chunk-O4ZIBPIW.js} +3 -3
  69. package/dist/{chunk-HOHVIVDR.js → chunk-OBJUKYDO.js} +2 -2
  70. package/dist/{chunk-YKBHOBJK.js → chunk-OEHCMALU.js} +56 -4
  71. package/dist/chunk-OEHCMALU.js.map +1 -0
  72. package/dist/{chunk-YOLZS7NY.js → chunk-OTQE66IX.js} +2 -2
  73. package/dist/{chunk-HEDZUSCS.js → chunk-OUITHS6V.js} +246 -368
  74. package/dist/chunk-OUITHS6V.js.map +1 -0
  75. package/dist/{chunk-4T3BMHKD.js → chunk-OZECYVGI.js} +20 -7
  76. package/dist/chunk-OZECYVGI.js.map +1 -0
  77. package/dist/{chunk-C2PG7IEH.js → chunk-P3VJCTVE.js} +2 -2
  78. package/dist/{chunk-EH5ED3C6.js → chunk-PMAQRUN4.js} +4 -4
  79. package/dist/chunk-PMAQRUN4.js.map +1 -0
  80. package/dist/{chunk-7RLCCNHU.js → chunk-Q6BAA57B.js} +4 -3
  81. package/dist/chunk-Q6BAA57B.js.map +1 -0
  82. package/dist/{chunk-HGNOCPZX.js → chunk-QZHF4BWN.js} +6 -6
  83. package/dist/chunk-SYX73XD7.js +283 -0
  84. package/dist/chunk-SYX73XD7.js.map +1 -0
  85. package/dist/{chunk-ASKXIAHD.js → chunk-WDJCZQB4.js} +2 -2
  86. package/dist/{chunk-AQLOP5F4.js → chunk-WNGXQMRI.js} +95 -6
  87. package/dist/chunk-WNGXQMRI.js.map +1 -0
  88. package/dist/{chunk-JYLFZWUX.js → chunk-XYUFGHUW.js} +2 -2
  89. package/dist/{chunk-3TSTGI6F.js → chunk-ZQUAVZNG.js} +2 -2
  90. package/dist/{chunk-4NR2PDZ5.js → chunk-ZVHRSR2R.js} +14 -4
  91. package/dist/chunk-ZVHRSR2R.js.map +1 -0
  92. package/dist/{cli-DmAiDd8A.d.ts → cli-Dt-tuiYH.d.ts} +3 -3
  93. package/dist/cli.d.ts +7 -6
  94. package/dist/cli.js +35 -35
  95. package/dist/compounding/engine.d.ts +12 -1
  96. package/dist/compounding/engine.js +3 -3
  97. package/dist/compounding/preference-consolidator.d.ts +1 -1
  98. package/dist/compression-optimizer.d.ts +1 -1
  99. package/dist/config.d.ts +1 -1
  100. package/dist/config.js +2 -2
  101. package/dist/connectors/codex-materialize-runner.d.ts +1 -1
  102. package/dist/connectors/codex-materialize-runner.js +3 -3
  103. package/dist/connectors/codex-materialize.d.ts +1 -1
  104. package/dist/connectors/index.d.ts +1 -1
  105. package/dist/connectors/index.js +3 -3
  106. package/dist/consolidation-provenance-check.d.ts +1 -1
  107. package/dist/consolidation-undo.d.ts +1 -1
  108. package/dist/contradiction/index.d.ts +1 -1
  109. package/dist/contradiction/index.js +1 -1
  110. package/dist/conversation-index/backend.d.ts +1 -1
  111. package/dist/conversation-index/chunker.d.ts +1 -1
  112. package/dist/conversation-index/faiss-adapter.d.ts +1 -1
  113. package/dist/conversation-index/indexer.d.ts +1 -1
  114. package/dist/conversation-index/search.d.ts +1 -1
  115. package/dist/day-summary.d.ts +1 -1
  116. package/dist/delinearize.d.ts +1 -1
  117. package/dist/direct-answer-wiring.d.ts +1 -1
  118. package/dist/direct-answer.d.ts +1 -1
  119. package/dist/embedding-fallback.d.ts +1 -1
  120. package/dist/embedding-fallback.js +2 -2
  121. package/dist/enrichment/index.d.ts +1 -1
  122. package/dist/entity-retrieval.d.ts +1 -1
  123. package/dist/entity-retrieval.js +3 -3
  124. package/dist/entity-schema.d.ts +1 -1
  125. package/dist/explicit-capture.d.ts +6 -4
  126. package/dist/explicit-capture.js +1 -1
  127. package/dist/extraction-faithfulness.d.ts +1 -1
  128. package/dist/extraction-judge-telemetry.d.ts +1 -1
  129. package/dist/extraction-judge-training.d.ts +1 -1
  130. package/dist/extraction-judge.d.ts +1 -1
  131. package/dist/extraction.d.ts +1 -1
  132. package/dist/extraction.js +3 -3
  133. package/dist/fallback-llm.d.ts +1 -1
  134. package/dist/{first-start-migration-22LPFHD5.js → first-start-migration-OOR57AYR.js} +2 -2
  135. package/dist/graph-dashboard-diff.d.ts +1 -1
  136. package/dist/graph-dashboard-key.d.ts +1 -1
  137. package/dist/graph-dashboard-parser.d.ts +1 -1
  138. package/dist/graph-edge-reinforcement.d.ts +1 -1
  139. package/dist/graph-snapshot.d.ts +1 -1
  140. package/dist/graph.d.ts +1 -1
  141. package/dist/identity-continuity.d.ts +1 -1
  142. package/dist/importance.d.ts +1 -1
  143. package/dist/index.d.ts +296 -11
  144. package/dist/index.js +359 -47
  145. package/dist/index.js.map +1 -1
  146. package/dist/intent.d.ts +1 -1
  147. package/dist/lcm/engine.d.ts +1 -1
  148. package/dist/lcm/index.d.ts +1 -1
  149. package/dist/lcm/tools.d.ts +1 -1
  150. package/dist/lifecycle.d.ts +1 -1
  151. package/dist/live-connectors-runner.d.ts +1 -1
  152. package/dist/local-llm.d.ts +1 -1
  153. package/dist/local-model-endpoint.d.ts +1 -1
  154. package/dist/maintenance/memory-governance.d.ts +1 -1
  155. package/dist/maintenance/memory-governance.js +3 -3
  156. package/dist/maintenance/rebuild-memory-lifecycle-ledger.js +3 -3
  157. package/dist/maintenance/rebuild-memory-projection.js +4 -4
  158. package/dist/mcp-memory-inspector-app.d.ts +6 -5
  159. package/dist/memory-action-policy.d.ts +1 -1
  160. package/dist/memory-cache.d.ts +1 -1
  161. package/dist/memory-lifecycle-ledger-utils.d.ts +1 -1
  162. package/dist/memory-projection-store.d.ts +1 -1
  163. package/dist/memory-provenance.d.ts +1 -1
  164. package/dist/memory-worth-outcomes.d.ts +1 -1
  165. package/dist/models-json.d.ts +1 -1
  166. package/dist/namespaces/migrate.d.ts +2 -2
  167. package/dist/namespaces/migrate.js +9 -9
  168. package/dist/namespaces/principal.d.ts +1 -1
  169. package/dist/namespaces/search.d.ts +1 -1
  170. package/dist/namespaces/search.js +5 -5
  171. package/dist/namespaces/storage.d.ts +2 -2
  172. package/dist/namespaces/storage.js +3 -3
  173. package/dist/native-knowledge.d.ts +1 -1
  174. package/dist/operator-toolkit.d.ts +1 -1
  175. package/dist/operator-toolkit.js +14 -14
  176. package/dist/orchestration/compression-guideline-coordinator.d.ts +105 -0
  177. package/dist/orchestration/compression-guideline-coordinator.js +12 -0
  178. package/dist/orchestration/maintenance.d.ts +2 -2
  179. package/dist/orchestration/maintenance.js +5 -5
  180. package/dist/{orchestrator-BR0sGsME.d.ts → orchestrator-B4KjaOtY.d.ts} +24 -8
  181. package/dist/orchestrator.d.ts +5 -4
  182. package/dist/orchestrator.js +28 -26
  183. package/dist/patterns-cli.d.ts +1 -1
  184. package/dist/policy-runtime.d.ts +1 -1
  185. package/dist/provenance.d.ts +1 -1
  186. package/dist/provenance.js +1 -1
  187. package/dist/qmd-recall-cache.d.ts +1 -1
  188. package/dist/qmd.d.ts +1 -1
  189. package/dist/recall-disclosure-escalation.d.ts +1 -1
  190. package/dist/recall-explain-renderer.d.ts +1 -1
  191. package/dist/recall-planner-llm.d.ts +1 -1
  192. package/dist/recall-state.d.ts +1 -1
  193. package/dist/recall-tag-filter.d.ts +1 -1
  194. package/dist/recall-xray-cli.d.ts +1 -1
  195. package/dist/recall-xray-renderer.d.ts +1 -1
  196. package/dist/recall-xray.d.ts +1 -1
  197. package/dist/{resolution-MN36NW5P.js → resolution-33PIX3TT.js} +2 -2
  198. package/dist/resolution-33PIX3TT.js.map +1 -0
  199. package/dist/resolve-auth-token.d.ts +1 -1
  200. package/dist/resume-bundles.js +3 -3
  201. package/dist/retrieval-agents.d.ts +1 -1
  202. package/dist/retrieval-tiers.d.ts +1 -1
  203. package/dist/routing/engine.d.ts +1 -1
  204. package/dist/routing/store.d.ts +1 -1
  205. package/dist/schemas.d.ts +84 -84
  206. package/dist/search/embed-helper.d.ts +1 -1
  207. package/dist/search/embed-helper.js +2 -2
  208. package/dist/search/factory.d.ts +1 -1
  209. package/dist/search/factory.js +4 -4
  210. package/dist/search/index.d.ts +1 -1
  211. package/dist/search/index.js +8 -8
  212. package/dist/search/lancedb-backend.d.ts +1 -1
  213. package/dist/search/meilisearch-backend.d.ts +1 -1
  214. package/dist/search/noop-backend.d.ts +1 -1
  215. package/dist/search/orama-backend.d.ts +1 -1
  216. package/dist/search/port.d.ts +1 -1
  217. package/dist/search/remote-backend.d.ts +1 -1
  218. package/dist/{semantic-consolidation-Cl15ksZy.d.ts → semantic-consolidation-CstTvHPo.d.ts} +1 -1
  219. package/dist/semantic-consolidation.d.ts +2 -2
  220. package/dist/semantic-consolidation.js +4 -4
  221. package/dist/semantic-rule-promotion.js +3 -3
  222. package/dist/semantic-rule-verifier.d.ts +1 -1
  223. package/dist/semantic-rule-verifier.js +3 -3
  224. package/dist/session-observer-bands.d.ts +1 -1
  225. package/dist/session-observer-state.d.ts +1 -1
  226. package/dist/shared-context/manager.d.ts +3 -3
  227. package/dist/signal.d.ts +1 -1
  228. package/dist/storage.d.ts +22 -3
  229. package/dist/storage.js +2 -2
  230. package/dist/summarizer.d.ts +1 -1
  231. package/dist/summary-snapshot.d.ts +1 -1
  232. package/dist/temporal-supersession.d.ts +1 -1
  233. package/dist/temporal-validity.d.ts +1 -1
  234. package/dist/threading.d.ts +1 -1
  235. package/dist/tier-migration.d.ts +1 -1
  236. package/dist/tier-routing.d.ts +1 -1
  237. package/dist/topics.d.ts +1 -1
  238. package/dist/transcript.d.ts +1 -1
  239. package/dist/transfer/types.d.ts +46 -46
  240. package/dist/trust-score-stage.d.ts +1 -1
  241. package/dist/trust-score.d.ts +1 -1
  242. package/dist/{types-ChQb9D6s.d.ts → types-VkxElCHR.d.ts} +8 -1
  243. package/dist/types.d.ts +1 -1
  244. package/dist/utility-runtime.d.ts +1 -1
  245. package/dist/verified-recall.js +3 -3
  246. package/package.json +12 -2
  247. package/src/access-service-coding-write.test.ts +2 -2
  248. package/src/access-service.ts +33 -14
  249. package/src/bitemporal-dedup-backfill.test.ts +10 -10
  250. package/src/bitemporal-frontmatter.test.ts +3 -3
  251. package/src/capabilities.test.ts +185 -0
  252. package/src/capabilities.ts +110 -0
  253. package/src/cli/creation-ledger-commands.ts +22 -21
  254. package/src/coding/architecture-surfaces.test.ts +25 -1
  255. package/src/coding/architecture-surfaces.ts +47 -19
  256. package/src/coding/decision-surfaces.ts +12 -3
  257. package/src/coding/review-context-structural.test.ts +303 -0
  258. package/src/coding/review-context.ts +79 -0
  259. package/src/coding/structural-context.test.ts +259 -0
  260. package/src/coding/structural-context.ts +315 -0
  261. package/src/coding/structural-subprocess-provider.test.ts +430 -0
  262. package/src/coding/structural-subprocess-provider.ts +355 -0
  263. package/src/compounding/engine.test.ts +90 -0
  264. package/src/compounding/engine.ts +25 -1
  265. package/src/contradiction/contradiction.test.ts +1 -1
  266. package/src/contradiction/resolution.ts +9 -1
  267. package/src/correction/correction-access-wiring.ts +21 -3
  268. package/src/correction/correction-contract.ts +7 -0
  269. package/src/correction/correction-planner.test.ts +231 -0
  270. package/src/correction/correction-planner.ts +73 -0
  271. package/src/correction/correction-service.ts +29 -0
  272. package/src/correction/correction-storage-integration.test.ts +2 -2
  273. package/src/dedup/semantic.test.ts +1 -1
  274. package/src/explicit-capture.ts +7 -4
  275. package/src/extraction-eventtime-wiring.test.ts +3 -3
  276. package/src/extraction-redaction-rules.test.ts +172 -0
  277. package/src/index.ts +29 -0
  278. package/src/maintenance/forget.test.ts +1 -1
  279. package/src/maintenance/memory-governance.test.ts +1 -1
  280. package/src/maintenance/pattern-reinforcement.test.ts +2 -2
  281. package/src/operator-toolkit.ts +4 -3
  282. package/src/orchestration/compression-guideline-coordinator.ts +449 -0
  283. package/src/orchestrator.ts +345 -464
  284. package/src/procedural/procedure-miner.test.ts +2 -2
  285. package/src/provenance-extraction.test.ts +382 -4
  286. package/src/provenance.ts +158 -22
  287. package/src/recall-handles-wiring.test.ts +1 -1
  288. package/src/search/factory.ts +4 -3
  289. package/src/semantic-rule-promotion.ts +1 -1
  290. package/src/source-attribution-roundtrip.test.ts +2 -2
  291. package/src/storage-contract/atomicity.test.ts +1 -1
  292. package/src/storage-contract/cache-coherence.test.ts +2 -2
  293. package/src/storage-contract/content-hash.test.ts +1 -1
  294. package/src/storage-contract/namespace-routing.test.ts +1 -1
  295. package/src/storage-contract/round-trip.test.ts +3 -3
  296. package/src/storage.ts +23 -2
  297. package/src/temporal-supersession.test.ts +12 -11
  298. package/src/temporal-validity.test.ts +11 -11
  299. package/src/wearables/cli.test.ts +30 -0
  300. package/src/wearables/cli.ts +3 -0
  301. package/src/wearables/memory-gen.test.ts +57 -1
  302. package/src/wearables/memory-gen.ts +31 -7
  303. package/src/wearables/pipeline.test.ts +40 -1
  304. package/src/wearables/pipeline.ts +4 -0
  305. package/src/wearables/service.test.ts +2 -2
  306. package/src/wearables/storage-io.test.ts +3 -3
  307. package/src/wearables/types.ts +7 -0
  308. package/dist/chunk-4NR2PDZ5.js.map +0 -1
  309. package/dist/chunk-4T3BMHKD.js.map +0 -1
  310. package/dist/chunk-7RLCCNHU.js.map +0 -1
  311. package/dist/chunk-AQLOP5F4.js.map +0 -1
  312. package/dist/chunk-EH5ED3C6.js.map +0 -1
  313. package/dist/chunk-HEDZUSCS.js.map +0 -1
  314. package/dist/chunk-M4AYVEWS.js.map +0 -1
  315. package/dist/chunk-UM5AWJNQ.js.map +0 -1
  316. package/dist/chunk-UTHQPSRC.js.map +0 -1
  317. package/dist/chunk-YKBHOBJK.js.map +0 -1
  318. /package/dist/{auto-sync-F3KCSQFJ.js.map → auto-sync-G3V5AN4C.js.map} +0 -0
  319. /package/dist/{chunk-4NOI577P.js.map → chunk-24ZLC5QN.js.map} +0 -0
  320. /package/dist/{chunk-DMQWV6SQ.js.map → chunk-5RZOFIDL.js.map} +0 -0
  321. /package/dist/{chunk-36SEDFAU.js.map → chunk-C5WN74HH.js.map} +0 -0
  322. /package/dist/{chunk-MLKWJOAJ.js.map → chunk-CGPHMNL4.js.map} +0 -0
  323. /package/dist/{chunk-EY6MDMHK.js.map → chunk-F6OEXJQQ.js.map} +0 -0
  324. /package/dist/{chunk-M4V2JVSZ.js.map → chunk-FFUCCKPN.js.map} +0 -0
  325. /package/dist/{chunk-O6YH5F47.js.map → chunk-FYWUNVFZ.js.map} +0 -0
  326. /package/dist/{chunk-37436GML.js.map → chunk-GEXI357K.js.map} +0 -0
  327. /package/dist/{chunk-YGIQORJ3.js.map → chunk-GGL34GCW.js.map} +0 -0
  328. /package/dist/{chunk-WAS3NV46.js.map → chunk-H3MB3F62.js.map} +0 -0
  329. /package/dist/{chunk-76NHR6ZL.js.map → chunk-HJWQJUKQ.js.map} +0 -0
  330. /package/dist/{chunk-Y4YD5TYW.js.map → chunk-IIBFCZA7.js.map} +0 -0
  331. /package/dist/{chunk-UVPL565C.js.map → chunk-IQOEW5YV.js.map} +0 -0
  332. /package/dist/{chunk-V4GNSDFH.js.map → chunk-KQYGNGON.js.map} +0 -0
  333. /package/dist/{chunk-CBWI22JN.js.map → chunk-KSJCXXOU.js.map} +0 -0
  334. /package/dist/{chunk-I5REUWLH.js.map → chunk-NIZQH6AU.js.map} +0 -0
  335. /package/dist/{chunk-4ESAR77N.js.map → chunk-NOU77OHX.js.map} +0 -0
  336. /package/dist/{chunk-BQCHEV7O.js.map → chunk-O4ZIBPIW.js.map} +0 -0
  337. /package/dist/{chunk-HOHVIVDR.js.map → chunk-OBJUKYDO.js.map} +0 -0
  338. /package/dist/{chunk-YOLZS7NY.js.map → chunk-OTQE66IX.js.map} +0 -0
  339. /package/dist/{chunk-C2PG7IEH.js.map → chunk-P3VJCTVE.js.map} +0 -0
  340. /package/dist/{chunk-HGNOCPZX.js.map → chunk-QZHF4BWN.js.map} +0 -0
  341. /package/dist/{chunk-ASKXIAHD.js.map → chunk-WDJCZQB4.js.map} +0 -0
  342. /package/dist/{chunk-JYLFZWUX.js.map → chunk-XYUFGHUW.js.map} +0 -0
  343. /package/dist/{chunk-3TSTGI6F.js.map → chunk-ZQUAVZNG.js.map} +0 -0
  344. /package/dist/{first-start-migration-22LPFHD5.js.map → first-start-migration-OOR57AYR.js.map} +0 -0
  345. /package/dist/{resolution-MN36NW5P.js.map → orchestration/compression-guideline-coordinator.js.map} +0 -0
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-BR0sGsME.js';
5
- export { D as DEFAULT_SELF_NAME, O as Orchestrator, R as ResolvedSpeaker, a as SpeakerOverride, b as WEARABLE_SOURCE_PREFIX, c as WearableDayTranscriptView, d as WearableMemoryGenDeps, e as WearableMemoryGenResult, f as WearableMemorySearchResult, g as WearableMemoryWriter, h as WearableSearchBackend, i as WearableStorageIo, j as WearableSyncDeps, k as WearableSyncOptions, l as WearableTranscriptSearchResult, m as WearablesServiceDeps, n as buildExtractionTurns, o as dateInTimezone, p as defaultTimezone, q as defaultWorkspaceDir, r as distinctSpeakerLabels, s as emptySpeakerRegistry, t as generateWearableMemories, u as importNativeMemories, v as loadSpeakerRegistry, w as locateTranscriptPath, x as memoryStatusForMode, y as resolveSpeaker, z as resolveSyncDates, A as sanitizeSessionKeyForFilename, B as saveSpeakerRegistry, C as speakerRegistryKey, E as speakersFilePath, F as syncWearableSource, H as wearableDayTag, J as wearableSourceLabel, K as writeDailyDigestMemory } from './orchestrator-BR0sGsME.js';
4
+ import { S as SpeakerRegistry, W as WearablesService } from './orchestrator-B4KjaOtY.js';
5
+ export { D as DEFAULT_SELF_NAME, O as Orchestrator, R as ResolvedSpeaker, a as SpeakerOverride, b as WEARABLE_SOURCE_PREFIX, c as WearableDayTranscriptView, d as WearableMemoryGenDeps, e as WearableMemoryGenResult, f as WearableMemorySearchResult, g as WearableMemoryWriter, h as WearableSearchBackend, i as WearableStorageIo, j as WearableSyncDeps, k as WearableSyncOptions, l as WearableTranscriptSearchResult, m as WearablesServiceDeps, n as buildExtractionTurns, o as dateInTimezone, p as defaultTimezone, q as defaultWorkspaceDir, r as distinctSpeakerLabels, s as emptySpeakerRegistry, t as generateWearableMemories, u as importNativeMemories, v as loadSpeakerRegistry, w as locateTranscriptPath, x as memoryStatusForMode, y as resolveSpeaker, z as resolveSyncDates, A as sanitizeSessionKeyForFilename, B as saveSpeakerRegistry, C as speakerRegistryKey, E as speakersFilePath, F as syncWearableSource, H as wearableDayTag, J as wearableSourceLabel, K as writeDailyDigestMemory } from './orchestrator-B4KjaOtY.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';
@@ -13,18 +13,18 @@ export { FocusedListRecallOptions, buildFocusedListRecallSection, shouldRecallFo
13
13
  export { ResponseGuidanceRecallOptions, buildResponseGuidanceRecallSection, shouldRecallResponseGuidance } from './response-guidance-recall.js';
14
14
  export { EventOrderRecallOptions, buildEventOrderRecallSection, shouldRecallEventOrderEvidence } from './event-order-recall.js';
15
15
  import { StorageManager } from './storage.js';
16
- export { parseEntityFile, serializeEntityFile } from './storage.js';
16
+ export { MemoryWriteResult, parseEntityFile, serializeEntityFile } from './storage.js';
17
17
  export { HostEmbeddingInputType, HostEmbeddingProvider, getHostEmbeddingProvider, normalizeHostEmbeddingVector, registerHostEmbeddingProvider } from './host-embedding-provider.js';
18
18
  export { ExtractionEngine } from './extraction.js';
19
19
  export { CodexCliFallbackConfig, CodexCliFallbackMessage, CodexCliFallbackOptions, CodexCliFallbackRequest, CodexCliFallbackResult, CodexCliFallbackRunner, setCodexCliFallbackRunnerForProcess } from './cli-fallback.js';
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 { aH as CodingContext, aS as CodingModeConfig, P as PluginConfig, M as MemoryCategory, aT as WearableCleanupSettings, ay as WearableSourceSettings, aC as WearablesConfig, aB as WearableSourceConnector, ax as WearableConversation, aG as WearableCorrectionRule, aU as WearableDayTranscriptMeta, aF as WearableDayTranscript } from './types-ChQb9D6s.js';
24
- export { J as AgentAccessAuthToken, r as BriefingActiveThread, aV as BriefingConfig, p as BriefingFocus, o as BriefingFollowup, aW as BriefingOpenCommitment, t as BriefingRecentEntity, s as BriefingResult, n as BriefingSections, aX as BriefingWindow, z as BufferSurpriseEvent, q as CalendarEvent, C as CalendarSource, aY as CodexCompatConfig, aK as ConsolidationObservation, a6 as ContinuityImprovementLoop, aZ as DEFAULT_RECALL_DISCLOSURE, E as EntityFile, $ as EntityStructuredSection, a_ as ExtractedFact, G as GatewayConfig, ac as MemoryActionEligibilityContext, a$ as MemoryActionEligibilitySource, U as MemoryActionType, g as MemoryFile, k as MemoryFrontmatter, b0 as MemoryObservation, b1 as MemoryScope, b2 as RECALL_DISCLOSURE_LEVELS, i as RecallDisclosure, D as SecretRef, b3 as WearableAuthCheck, b4 as WearableFetchOptions, b5 as WearableFetchPage, aA as WearableMemoryMode, az as WearableNativeMemory, b6 as WearableNativeMemoryPage, aE as WearableSourceStatus, aD as WearableSyncSummary, b7 as WearableTranscriptSegment, b8 as isRecallDisclosure } from './types-ChQb9D6s.js';
23
+ import { aH as CodingContext, aS as CodingModeConfig, P as PluginConfig, aT as CodingKnowledgeConfig, M as MemoryCategory, aU as WearableCleanupSettings, ay as WearableSourceSettings, aC as WearablesConfig, aB as WearableSourceConnector, ax as WearableConversation, aG as WearableCorrectionRule, aV as WearableDayTranscriptMeta, aF as WearableDayTranscript } from './types-VkxElCHR.js';
24
+ export { J as AgentAccessAuthToken, r as BriefingActiveThread, aW as BriefingConfig, p as BriefingFocus, o as BriefingFollowup, aX as BriefingOpenCommitment, t as BriefingRecentEntity, s as BriefingResult, n as BriefingSections, aY as BriefingWindow, z as BufferSurpriseEvent, q as CalendarEvent, C as CalendarSource, aZ as CodexCompatConfig, aK as ConsolidationObservation, a6 as ContinuityImprovementLoop, a_ as DEFAULT_RECALL_DISCLOSURE, E as EntityFile, $ as EntityStructuredSection, a$ as ExtractedFact, G as GatewayConfig, ac as MemoryActionEligibilityContext, b0 as MemoryActionEligibilitySource, U as MemoryActionType, g as MemoryFile, k as MemoryFrontmatter, b1 as MemoryObservation, b2 as MemoryScope, b3 as RECALL_DISCLOSURE_LEVELS, i as RecallDisclosure, D as SecretRef, b4 as WearableAuthCheck, b5 as WearableFetchOptions, b6 as WearableFetchPage, aA as WearableMemoryMode, az as WearableNativeMemory, b7 as WearableNativeMemoryPage, aE as WearableSourceStatus, aD as WearableSyncSummary, b8 as WearableTranscriptSegment, b9 as isRecallDisclosure } from './types-VkxElCHR.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 { i as EngramAccessInputError, g as EngramAccessService, P as ProcedureStatsConfigSnapshot, j as ProcedureStatsRecent, k as ProcedureStatsReport, l as ProcedureStatusCounts, m as computeProcedureStats, n as formatProcedureStatsText } from './access-service-BXMJqkTA.js';
27
+ export { i as EngramAccessInputError, g as EngramAccessService, P as ProcedureStatsConfigSnapshot, j as ProcedureStatsRecent, k as ProcedureStatsReport, l as ProcedureStatusCounts, m as computeProcedureStats, n as formatProcedureStatsText } from './access-service-Byoe3HsT.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';
@@ -38,7 +38,7 @@ export { OramaBackend } from './search/orama-backend.js';
38
38
  export { MeilisearchBackend } from './search/meilisearch-backend.js';
39
39
  export { buildEntityRecallSection } from './entity-retrieval.js';
40
40
  export { resolvePrincipal } from './namespaces/principal.js';
41
- export { N as NamespaceCatalog, c as NamespaceCatalogFilter, d as NamespaceCatalogRebuildResult, e as NamespaceCatalogSkippedRoot, f as NamespaceDiscoverySource, a as NamespaceKind, b as NamespaceRecord, g as NamespaceTouchMetadata } from './catalog-bMczlO2G.js';
41
+ export { N as NamespaceCatalog, c as NamespaceCatalogFilter, d as NamespaceCatalogRebuildResult, e as NamespaceCatalogSkippedRoot, f as NamespaceDiscoverySource, a as NamespaceKind, b as NamespaceRecord, g as NamespaceTouchMetadata } from './catalog-DM1nk7cM.js';
42
42
  export { SESSION_CHANNEL_TYPE, SessionIdentity, SessionStoragePaths, legacyParserReadbackDir, parseSessionIdentity, sessionStoragePaths } from './session-identity.js';
43
43
  export { storagePathHash } from './storage-paths.js';
44
44
  export { TrustZoneName, TrustZoneRecord, TrustZoneRecordKind, TrustZoneSourceClass, isTrustZoneName } from './trust-zones.js';
@@ -62,8 +62,8 @@ export { CitationBlock, CitationEntry, CitationMetadata, buildCitationGuidance,
62
62
  export { initLogger, log } from './logger.js';
63
63
  export { b as SemanticDedupDecision, S as SemanticDedupHit, a as SemanticDedupLookup, c as SemanticDedupOptions, d as decideSemanticDedup } from './semantic-SLAa_prH.js';
64
64
  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';
65
- import { D as DiscoveredExtension } from './semantic-consolidation-Cl15ksZy.js';
66
- export { E as ExtensionSchema, R as REMNIC_EXTENSIONS_TOTAL_TOKEN_LIMIT, b as buildExtensionsBlockForConsolidation, d as discoverMemoryExtensions, r as resolveExtensionsRoot } from './semantic-consolidation-Cl15ksZy.js';
65
+ import { D as DiscoveredExtension } from './semantic-consolidation-CstTvHPo.js';
66
+ export { E as ExtensionSchema, R as REMNIC_EXTENSIONS_TOTAL_TOKEN_LIMIT, b as buildExtensionsBlockForConsolidation, d as discoverMemoryExtensions, r as resolveExtensionsRoot } from './semantic-consolidation-CstTvHPo.js';
67
67
  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';
68
68
  import { L as LiveConnector, S as SyncIncrementalResult } from './framework-CNDn2164.js';
69
69
  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';
@@ -79,7 +79,7 @@ export { EnrichmentAuditEntry, EnrichmentCandidate, EnrichmentCostTier, Enrichme
79
79
  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-gb_SNtjR.js';
80
80
  export { clearBulkImportSources, getBulkImportSource, listBulkImportSources, registerBulkImportSource } from './bulk-import/index.js';
81
81
  export { a as ProcessBatchContext, P as ProcessBatchFn, b as ProcessBatchResult, f as formatBatchTranscript, r as resolveBulkImportContext, c as runBulkImportPipeline, v as validateBatchSize } from './pipeline-DmqtvION.js';
82
- export { B as BulkImportCliCommandOptions, p as parseStrictCliDate, r as runBulkImportCliCommand } from './cli-DmAiDd8A.js';
82
+ export { B as BulkImportCliCommandOptions, p as parseStrictCliDate, r as runBulkImportCliCommand } from './cli-Dt-tuiYH.js';
83
83
  export { DEFAULT_IMPORT_BATCH_SIZE, ImportProgress, ImportedMemory, ImporterAdapter, ImporterParseOptions, ImporterTransformOptions, ImporterWriteResult, ImporterWriteTarget, RunImportOptions, RunImporterResult, defaultWriteMemoriesToOrchestrator, importedMemoryToTurn, runImporter, validateImportBatchSize, validateImportRateLimit } from './importers/index.js';
84
84
  export { FallbackLlmClient, FallbackLlmOptions, FallbackLlmResponse, FallbackLlmRuntimeContext } from './fallback-llm.js';
85
85
  export { ComputeMemoryWorthInput, MemoryWorthResult, computeMemoryWorth } from './memory-worth.js';
@@ -117,6 +117,7 @@ import 'better-sqlite3';
117
117
  import './structured-attributes.js';
118
118
  import './utility-runtime.js';
119
119
  import './lifecycle.js';
120
+ import './orchestration/compression-guideline-coordinator.js';
120
121
  import './relevance.js';
121
122
  import './negative.js';
122
123
  import './session-observer-state.js';
@@ -420,6 +421,200 @@ interface ResolveGitContextOptions {
420
421
  */
421
422
  declare function resolveGitContext(cwd: string, options?: ResolveGitContextOptions): Promise<GitContext | null>;
422
423
 
424
+ /**
425
+ * Structural-context provider port (issue #1548 Track A PR 5).
426
+ *
427
+ * The architectural boundary between Track A (durable coding-memory
428
+ * features) and Track B (the native @remnic/coding-graph engine). A
429
+ * structural-context provider expands a unified diff into the SYMBOLS it
430
+ * touches (and optionally yields architecture hints), so review-intent
431
+ * recall can boost memories that mention those symbols — not just the
432
+ * bare file paths that `review-context.ts` already boosts on.
433
+ *
434
+ * Three providers satisfy this port, selected by
435
+ * `codingKnowledge.structuralProvider`:
436
+ *
437
+ * - `"none"` — no provider consulted (default; review-context stays
438
+ * file-path-only, byte-identical to pre-feature — rule 39).
439
+ * - `"subprocess"` — an external binary shelled out via `execFile` with an
440
+ * argv ARRAY (never a shell string — rule 10). The
441
+ * built-in adapter lives in `structural-subprocess-provider.ts`;
442
+ * codebase-memory-mcp's CLI mode is the canonical target,
443
+ * but the provider is command-agnostic.
444
+ * - `"native"` — the in-family @remnic/coding-graph engine, adapted to
445
+ * this port by a future PR (#1551/#1554). Only the enum
446
+ * value and this doc note land in this PR — no engine
447
+ * code. codebase-memory-mcp remains a supported
448
+ * subprocess provider through this same port regardless.
449
+ *
450
+ * Every result is a tagged outcome shaped like #1536's `SearchDegradation`
451
+ * (CLAUDE.md rule 34 — a degraded/absent provider must NEVER masquerade as
452
+ * "no structural matches"):
453
+ * - `{ ok: true, symbols }` on success
454
+ * - `{ ok: false, code }` on every failure (distinct codes per mode)
455
+ *
456
+ * No module-level mutable state (rule 11): the registry is keyed per
457
+ * orchestrator/service instance via a `Symbol.for(...)` slot on
458
+ * `globalThis`, mirroring `host-embedding-provider.ts`.
459
+ */
460
+
461
+ /**
462
+ * Distinct failure codes for the structural-context port. Every code is
463
+ * load-bearing: callers (review-context, `remnic doctor`, xray) switch on
464
+ * `code` to distinguish "binary not installed" from "timed out" from
465
+ * "protocol violation" so a silent provider failure can never look like an
466
+ * empty-but-healthy result.
467
+ */
468
+ type StructuralContextErrorCode =
469
+ /** Probe failed: binary missing / not executable, or native package absent. */
470
+ "provider_unavailable"
471
+ /** The provider exceeded its deadline. */
472
+ | "provider_timeout"
473
+ /** Output was present but not a valid JSON object/array (rule 18). */
474
+ | "provider_malformed"
475
+ /** Provider ran but returned an explicit error or threw. */
476
+ | "provider_error";
477
+ /**
478
+ * A single symbol touched by a diff. The `symbol` name is the load-bearing
479
+ * field — it is what review-context adds to its match set. `path`/`kind`
480
+ * are informational and surface in xray when present.
481
+ */
482
+ interface StructuralSymbol {
483
+ /** Qualified or bare symbol name, e.g. `"AuthService.login"` or `"login"`. */
484
+ readonly symbol: string;
485
+ /** Source file the symbol lives in (forward-slashed, repo-relative when possible). */
486
+ readonly path?: string;
487
+ /** Coarse kind if the provider knows it (`function`/`method`/`class`/...). */
488
+ readonly kind?: string;
489
+ }
490
+ interface SymbolsForDiffOk {
491
+ readonly ok: true;
492
+ readonly symbols: StructuralSymbol[];
493
+ /** Provider-reported latency in ms, when available. */
494
+ readonly latencyMs?: number;
495
+ }
496
+ interface SymbolsForDiffErr {
497
+ readonly ok: false;
498
+ readonly code: StructuralContextErrorCode;
499
+ readonly detail?: string;
500
+ }
501
+ type SymbolsForDiffResult = SymbolsForDiffOk | SymbolsForDiffErr;
502
+ interface ArchitectureHintsOk {
503
+ readonly ok: true;
504
+ readonly hints: string[];
505
+ }
506
+ interface ArchitectureHintsErr {
507
+ readonly ok: false;
508
+ readonly code: StructuralContextErrorCode;
509
+ readonly detail?: string;
510
+ }
511
+ type ArchitectureHintsResult = ArchitectureHintsOk | ArchitectureHintsErr;
512
+ /**
513
+ * The port contract. Both the built-in subprocess adapter
514
+ * (`structural-subprocess-provider.ts`) and the future native engine
515
+ * adapter (#1551) implement this. Registry callers retrieve an instance by
516
+ * scope; never construct one inline at a call site.
517
+ */
518
+ interface StructuralContextProvider {
519
+ /** Stable identifier for registry logging / `remnic doctor`. */
520
+ readonly id: string;
521
+ /**
522
+ * Probe availability. Resolves to a tagged result so a missing binary
523
+ * (subprocess) or absent package (native) is surfaced, never thrown
524
+ * (rule 34). Implementations SHOULD cache the outcome per instance
525
+ * (rule 11).
526
+ */
527
+ probe(): Promise<{
528
+ available: boolean;
529
+ detail?: string;
530
+ }>;
531
+ /**
532
+ * Expand a unified diff to the symbols it touches. NEVER throws — every
533
+ * failure path returns a tagged `{ ok: false, code }`. The optional
534
+ * `signal` lets the caller cancel an in-flight subprocess (rule 40).
535
+ */
536
+ symbolsForDiff(diff: string, options?: {
537
+ signal?: AbortSignal;
538
+ }): Promise<SymbolsForDiffResult>;
539
+ /**
540
+ * Optional architecture hints for a repo root. Used by the architecture
541
+ * card composition (#1548 Track A PR 3 + #1554). Implementations MAY omit
542
+ * this; callers MUST handle its absence.
543
+ */
544
+ architectureHints?(root: string, options?: {
545
+ signal?: AbortSignal;
546
+ }): Promise<ArchitectureHintsResult>;
547
+ /** Release any resources the provider holds (subprocess handles, etc.). */
548
+ close?(): Promise<void> | void;
549
+ }
550
+ /**
551
+ * Backend tag is a literal so consumers can switch on it programmatically
552
+ * alongside `SearchDegradation` (`backend: "qmd"`). `detail` is optional
553
+ * and never load-bearing — `code` is the signal.
554
+ */
555
+ interface StructuralContextDegradation {
556
+ readonly backend: "structural-context";
557
+ readonly code: StructuralContextErrorCode;
558
+ readonly detail?: string;
559
+ }
560
+ /**
561
+ * Coerce a {@link SymbolsForDiffErr} into the degradation record consumers
562
+ * attach to recall snapshots / xray. Centralised so the `{ backend: ... }`
563
+ * tag is set in one place (rule 22 spirit).
564
+ */
565
+ declare function toStructuralContextDegradation(err: SymbolsForDiffErr): StructuralContextDegradation;
566
+ /**
567
+ * Register a provider for a scope (typically an orchestrator `serviceId`).
568
+ * Overwriting a previous registration closes the old provider. Returns an
569
+ * unregister function — callers SHOULD invoke it on service teardown so a
570
+ * hot-reloaded host does not leak subprocess handles.
571
+ */
572
+ declare function registerStructuralContextProvider(scope: string, provider: StructuralContextProvider): () => void;
573
+ /** Look up the provider registered for a scope, if any. */
574
+ declare function getStructuralContextProvider(scope: string): StructuralContextProvider | undefined;
575
+ /** Test-only: clear every registered provider. */
576
+ declare function clearStructuralContextProvidersForTest(): void;
577
+ /**
578
+ * The single gate every review-context consumer consults before consulting a
579
+ * provider. Returns `true` iff the master `codingKnowledge.enabled` switch is
580
+ * on AND `structuralProvider` is not `"none"`. When this returns `false`,
581
+ * review-context runs its pure file-path-only ranker — byte-identical to
582
+ * pre-feature behaviour on every path.
583
+ */
584
+ declare function structuralProviderActive(config: PluginConfig): boolean;
585
+ /**
586
+ * Config-only structural provider status. `remnic doctor` and xray render
587
+ * this; an async sibling in `structural-subprocess-provider.ts` augments it
588
+ * with a live `probed` field.
589
+ */
590
+ interface StructuralProviderStatus {
591
+ readonly active: boolean;
592
+ readonly mode: CodingKnowledgeConfig["structuralProvider"];
593
+ /** Command path when mode is `"subprocess"` and a command is configured. */
594
+ readonly command?: string;
595
+ /** Provider id when one is registered for the scope. */
596
+ readonly providerId?: string;
597
+ /** Live probe outcome — set only by the async doctor probe. */
598
+ probed?: {
599
+ available: boolean;
600
+ detail?: string;
601
+ };
602
+ }
603
+ /**
604
+ * Summarise the structural provider status from config ALONE (no probe, no
605
+ * I/O). Pure — safe to call from any context, including the recall hot path
606
+ * for xray labels.
607
+ */
608
+ declare function describeStructuralProviderStatus(config: PluginConfig, scope?: string): StructuralProviderStatus;
609
+ /**
610
+ * Render a single human-readable line for `remnic doctor`. Pure.
611
+ *
612
+ * `structural-context provider: none (inactive — review-context stays file-path-only)`
613
+ * `structural-context provider: subprocess, command=/usr/local/bin/cbm, probed=available`
614
+ * `structural-context provider: subprocess, command=/usr/local/bin/cbm, probed=unavailable (binary not found)`
615
+ */
616
+ declare function renderStructuralProviderStatusLine(status: StructuralProviderStatus): string;
617
+
423
618
  /**
424
619
  * Diff-aware review-context packer (issue #569 PR 4).
425
620
  *
@@ -441,6 +636,7 @@ declare function resolveGitContext(cwd: string, options?: ResolveGitContextOptio
441
636
  * code in `orchestrator.ts` (the tier itself can be wired later; the pure
442
637
  * surface is what PRs 5/6/7 will call).
443
638
  */
639
+
444
640
  /**
445
641
  * A memory candidate as fed into review-context ranking. The shape is a
446
642
  * deliberate subset of the core `MemorySummary` / recall result — only the
@@ -479,6 +675,15 @@ interface ReviewContext {
479
675
  rankedRecall: Array<ReviewCandidate & {
480
676
  boost: number;
481
677
  }>;
678
+ /**
679
+ * Structural-context provider degradation observed while expanding the
680
+ * diff to touched symbols (issue #1548 Track A PR 5, #1536 pattern).
681
+ * Present only when a provider was consulted AND it failed — a silent
682
+ * provider failure must never look like "no structural matches"
683
+ * (CLAUDE.md rule 34). Undefined when no provider was consulted (the
684
+ * pure {@link packReviewContext} path) or when the provider succeeded.
685
+ */
686
+ structuralDegradation?: StructuralContextDegradation;
482
687
  }
483
688
  /**
484
689
  * `true` when the prompt looks like a review / diff-explanation request.
@@ -524,6 +729,86 @@ interface PackReviewContextInput {
524
729
  * the recall result.
525
730
  */
526
731
  declare function packReviewContext(input: PackReviewContextInput): ReviewContext;
732
+ /**
733
+ * Input for the structural-context-aware review-context packer. The pure
734
+ * {@link packReviewContext} stays unchanged (gate-off parity); this async
735
+ * variant consults a {@link StructuralContextProvider} to expand the diff's
736
+ * touched FILE paths into touched SYMBOL names, widening the match set so
737
+ * memories that mention a changed symbol — not just the file path — float
738
+ * up. The gate (`structuralProvider !== "none"`) is checked ONCE by the
739
+ * caller, never inside this function (rule 39).
740
+ */
741
+ interface PackReviewContextStructuralInput extends PackReviewContextInput {
742
+ /** A probed structural-context provider. Never undefined here. */
743
+ provider: StructuralContextProvider;
744
+ /** Cancellation forwarded to the provider subprocess (rule 40). */
745
+ signal?: AbortSignal;
746
+ }
747
+ /**
748
+ * Structural-context-aware packer.
749
+ *
750
+ * Contract (issue #1548 Track A PR 5, prove-fail-before characterization):
751
+ * - Provider returns symbols (`ok: true`) → symbol names are ADDED to the
752
+ * match set alongside touched files; memories mentioning a symbol get the
753
+ * same bounded additive boost as a file-path match.
754
+ * - Provider fails (`ok: false`, any code) → ranking falls back to
755
+ * FILE-PATH-ONLY boosting, BYTE-IDENTICAL to {@link packReviewContext}
756
+ * (the match set is exactly the touched files), AND `structuralDegradation`
757
+ * is populated so xray/doctor can surface the failure (rule 34).
758
+ *
759
+ * The underlying ranker ({@link rankReviewCandidates}) is reused unchanged,
760
+ * so the deterministic ordering, boost cap, and tie-break are identical to
761
+ * the pure path.
762
+ */
763
+ declare function packReviewContextStructural(input: PackReviewContextStructuralInput): Promise<ReviewContext>;
764
+
765
+ /** Injectable spawn shape so tests substitute a stub (rule 33). */
766
+ type StructuralSpawnFn = (command: string, argv: readonly string[], options: {
767
+ timeout: number;
768
+ signal?: AbortSignal;
769
+ }) => Promise<{
770
+ stdout: string;
771
+ stderr: string;
772
+ }>;
773
+ interface SubprocessProviderOptions {
774
+ /** Absolute path to the binary (rule 24 — statSync at probe time). */
775
+ readonly command: string;
776
+ /**
777
+ * Extra argv appended after the symbols-for-diff subcommand
778
+ * (rule 10 — array, never a shell string).
779
+ */
780
+ readonly args?: readonly string[];
781
+ /** Per-call deadline in ms. Default 5000. */
782
+ readonly timeoutMs?: number;
783
+ /**
784
+ * Subcommand the provider invokes for symbol expansion.
785
+ * Default `"symbols-for-diff"`.
786
+ */
787
+ readonly symbolsSubcommand?: string;
788
+ /** Test seam — defaults to promisified `execFile`. */
789
+ readonly spawn?: StructuralSpawnFn;
790
+ }
791
+ /**
792
+ * Construct a structural-context provider backed by an external subprocess.
793
+ * The instance is self-contained: callers register it via
794
+ * `registerStructuralContextProvider(scope, provider)` and dispose via the
795
+ * returned unregister handle.
796
+ */
797
+ declare function createSubprocessStructuralProvider(options: SubprocessProviderOptions): StructuralContextProvider;
798
+ /**
799
+ * Augment the pure {@link describeStructuralProviderStatus} with a LIVE probe
800
+ * so `remnic doctor` can render "configured / probed / last error code".
801
+ *
802
+ * - `"none"` → inactive (no probe).
803
+ * - `"subprocess"` → builds a throwaway provider from
804
+ * `structuralProviderCommand`, probes it, disposes it.
805
+ * - `"native"` → asks `isCodingGraphInstalled()` whether the optional
806
+ * @remnic/coding-graph peer is present (the adapter that
807
+ * turns the engine into a provider lands in #1551).
808
+ *
809
+ * Never throws — a probe failure populates `probed.available = false`.
810
+ */
811
+ declare function probeStructuralProviderForDoctor(config: PluginConfig): Promise<StructuralProviderStatus>;
527
812
 
528
813
  /**
529
814
  * Binary file lifecycle management types.
@@ -2590,4 +2875,4 @@ declare function forkCapsule(opts: ForkCapsuleOptions): Promise<ForkCapsuleResul
2590
2875
  */
2591
2876
  declare function readForkLineage(targetRoot: string, forkId: string): Promise<ForkLineage | null>;
2592
2877
 
2593
- export { type AuditEntry, type BinaryAssetRecord, type BinaryAssetStatus, type BinaryLifecycleConfig, type BinaryLifecycleManifest, type BinaryStorageBackend, type BinaryStorageBackendConfig, ClaudeCodeMemoryExtensionPublisher, type CleanupResult, CodexMemoryExtensionPublisher, type CodingNamespaceOverlay, type CodingScopeDescription, type CollectLocalSessionSummariesOptions, type CompiledCorrectionRule, type CompiledRedactionRule, type ConflictEntry, type ContradictionOptions, type ContradictionPair, type ContradictionResult$1 as CurateContradictionResult, type DuplicateResult as CurateDuplicateResult, type CurateOptions, type CurateResult, type CuratedStatement, DEFAULT_GRACE_PERIOD_DAYS, DEFAULT_MAX_BINARY_SIZE_BYTES, DEFAULT_REDACTION_RULES, DEFAULT_SCAN_PATTERNS, DEFAULT_TAXONOMY, type DedupOptions, type DedupResult, DiscoveredExtension, type DocFile, type DriveChange, type DriveChangesPage, type DriveFileMetadata, type DuplicatePair, type FileChange, FilesystemBackend, type ForkCapsuleOptions, type ForkCapsuleResult, type ForkLineage, GOOGLE_DRIVE_CONNECTOR_ID, GOOGLE_DRIVE_CURSOR_KIND, DEFAULT_POLL_INTERVAL_MS as GOOGLE_DRIVE_DEFAULT_POLL_INTERVAL_MS, type GenerateOptions, type GenerateResult, type GitContext, type GitInvoker, type GoogleDriveClient, type GoogleDriveClientFactory, type GoogleDriveConnectorConfig, type GoogleDriveSyncResult, HermesMemoryExtensionPublisher, type IngestionPlan, KNOWN_WEARABLE_SOURCE_IDS, type LanguageInfo, LiveConnector, LiveConnectorRegistry, LiveConnectorRegistryError, type LocalSessionAdapterInput, type LocalSessionAdapterOptions, type LocalSessionParseWarning, type LocalSessionParsedFile, type LocalSessionRole, type LocalSessionSourceAdapter, type LocalSessionSummaryCliOptions, type LocalSessionSummaryReport, type LocalSessionTurn, MemoryCategory, type MemoryEntry, type MemoryExtensionPublisher, type MergeResult, NOTION_CONNECTOR_ID, NOTION_CURSOR_KIND, NOTION_DEFAULT_POLL_INTERVAL_MS, NoneBackend, type NotionConnectorConfig, type OnboardOptions, type OnboardResult, PUBLISHERS, type PipelineResult, PluginConfig, type ProjectShape, type ProvenanceEntry, type PublishContext, type PublishResult, type PublisherCapabilities, REDACTION_PLACEHOLDER, REMNIC_CITATION_FORMAT, REMNIC_MCP_TOOL_INVENTORY, REMNIC_RECALL_DECISION_RULES, REMNIC_SEMANTIC_OVERVIEW, type RedactionConfig, type RedactionReport, type RedactionRuleConfig, ResolverDecision, type ReviewAction, type ReviewCandidate, type ReviewContext, type ReviewItem, type ReviewListResult, type ReviewOptions, type ReviewResult, type SessionSummaryDraft, type SessionSummaryExcerpt, type Space, type SpaceKind, type SpaceManifest, type SpacePromoteResult, type SpacePullResult, type SpacePushResult, type SpaceShareResult, type SpaceSwitchResult, SpeakerRegistry, type StatementProvenance, StorageManager, SyncIncrementalResult, type SyncOptions, type SyncResult, type SyncState, Taxonomy, TokenEntry, type TrainingExportAdapter, type TrainingExportOptions, type TrainingExportRecord, type TreeNode, WEARABLES_DIR_NAME, WearableCleanupSettings, type WearableConnectorFactory, type WearableConnectorFactoryOptions, type WearableConnectorRegistration, WearableConversation, WearableCorrectionRule, WearableDayTranscript, WearableDayTranscriptMeta, WearableSourceConnector, WearableSourceSettings, type WearableSourceSyncState, type WearableSyncStateFile, type WearablesCliIo, WearablesConfig, WearablesInputError, WearablesService, applyCorrections, applyOffTheRecord, branchNamespaceName, buildProcedureMarkdownBody, buildProcedureRecallSection, cleanConversation, clearTrainingExportAdapters, clearWearableConnectors, collapseImmediateRepeats, collectLocalSessionSummaries, compileCorrectionRule, compileCorrectionRules, compileRedactionPatterns, compileRedactionRules, composeDayTranscriptBody, composeDayTranscriptMeta, convertMemoriesToRecords, correctionsFilePath, createBackend, createGoogleDriveConnector, createNotionConnector, createSpace, curate, defaultGoogleDriveClientFactory, defaultWearableCleanupSettings, defaultWearableSourceSettings, defaultWearablesConfig, deleteSpace, describeCodingScope, describeErrorForOperator, emptyManifest, emptySyncState, ensureBuiltInWearableConnectors, findContradictions, findDuplicates, forkCapsule, generateContextTree, generateResolverDocument, getActiveSpace, getAuditLog, getLocalSessionSourceAdapter, getManifestPath, getSpacesDir, getTaxonomyDir, getTaxonomyFilePath, getTrainingExportAdapter, getWearableConnector, hashTranscriptBody, hostIdForConnector, isLowQualitySegment, isReviewPrompt, isValidTranscriptDate, listLocalSessionSourceAdapters, listReviewItems, listSpaces, listTrainingExportAdapters, listWearableConnectors, loadCorrectionsFile, loadManifest, loadSyncState, loadTaxonomy, manifestDir, manifestPath, matchesPatterns, mergeSpaces, normalizeOriginUrl, onboard, packReviewContext, parseDayTranscript, parseFlexibleIsoTimestamp, parseIsoOffsetTimestamp, parseIsoUtcTimestamp, parseProcedureStepsFromBody, parseTouchedFiles, parseWearablesConfig, performReview, projectNamespaceName, promoteSpace, publisherFor, publisherForConnector, pullFromSpace, pushToSpace, rankReviewCandidates, readForkLineage, readManifest, redactSessionSummaryText, redactText, registerLocalSessionSourceAdapter, registerPublisher, registerTrainingExportAdapter, registerWearableConnector, renderExtensionsBlock, renderExtensionsFooter, resolveCategory, resolveCodingNamespaceOverlay, resolveGitContext, runBinaryLifecyclePipeline, runLocalSessionSummaryCliCommand, runWearablesCliCommand, saveCorrectionsFile, saveManifest, saveSyncState, saveTaxonomy, scanForBinaries, serializeDayTranscript, shareSpace, stableHash, stripFillerTokens, switchSpace, syncChanges, syncStateFilePath, updateSourceSyncState, validateGoogleDriveConfig, validateNotionConfig, validateSlug, validateTaxonomy, watchForChanges, writeManifest };
2878
+ export { type ArchitectureHintsResult, type AuditEntry, type BinaryAssetRecord, type BinaryAssetStatus, type BinaryLifecycleConfig, type BinaryLifecycleManifest, type BinaryStorageBackend, type BinaryStorageBackendConfig, ClaudeCodeMemoryExtensionPublisher, type CleanupResult, CodexMemoryExtensionPublisher, type CodingNamespaceOverlay, type CodingScopeDescription, type CollectLocalSessionSummariesOptions, type CompiledCorrectionRule, type CompiledRedactionRule, type ConflictEntry, type ContradictionOptions, type ContradictionPair, type ContradictionResult$1 as CurateContradictionResult, type DuplicateResult as CurateDuplicateResult, type CurateOptions, type CurateResult, type CuratedStatement, DEFAULT_GRACE_PERIOD_DAYS, DEFAULT_MAX_BINARY_SIZE_BYTES, DEFAULT_REDACTION_RULES, DEFAULT_SCAN_PATTERNS, DEFAULT_TAXONOMY, type DedupOptions, type DedupResult, DiscoveredExtension, type DocFile, type DriveChange, type DriveChangesPage, type DriveFileMetadata, type DuplicatePair, type FileChange, FilesystemBackend, type ForkCapsuleOptions, type ForkCapsuleResult, type ForkLineage, GOOGLE_DRIVE_CONNECTOR_ID, GOOGLE_DRIVE_CURSOR_KIND, DEFAULT_POLL_INTERVAL_MS as GOOGLE_DRIVE_DEFAULT_POLL_INTERVAL_MS, type GenerateOptions, type GenerateResult, type GitContext, type GitInvoker, type GoogleDriveClient, type GoogleDriveClientFactory, type GoogleDriveConnectorConfig, type GoogleDriveSyncResult, HermesMemoryExtensionPublisher, type IngestionPlan, KNOWN_WEARABLE_SOURCE_IDS, type LanguageInfo, LiveConnector, LiveConnectorRegistry, LiveConnectorRegistryError, type LocalSessionAdapterInput, type LocalSessionAdapterOptions, type LocalSessionParseWarning, type LocalSessionParsedFile, type LocalSessionRole, type LocalSessionSourceAdapter, type LocalSessionSummaryCliOptions, type LocalSessionSummaryReport, type LocalSessionTurn, MemoryCategory, type MemoryEntry, type MemoryExtensionPublisher, type MergeResult, NOTION_CONNECTOR_ID, NOTION_CURSOR_KIND, NOTION_DEFAULT_POLL_INTERVAL_MS, NoneBackend, type NotionConnectorConfig, type OnboardOptions, type OnboardResult, PUBLISHERS, type PackReviewContextStructuralInput, type PipelineResult, PluginConfig, type ProjectShape, type ProvenanceEntry, type PublishContext, type PublishResult, type PublisherCapabilities, REDACTION_PLACEHOLDER, REMNIC_CITATION_FORMAT, REMNIC_MCP_TOOL_INVENTORY, REMNIC_RECALL_DECISION_RULES, REMNIC_SEMANTIC_OVERVIEW, type RedactionConfig, type RedactionReport, type RedactionRuleConfig, ResolverDecision, type ReviewAction, type ReviewCandidate, type ReviewContext, type ReviewItem, type ReviewListResult, type ReviewOptions, type ReviewResult, type SessionSummaryDraft, type SessionSummaryExcerpt, type Space, type SpaceKind, type SpaceManifest, type SpacePromoteResult, type SpacePullResult, type SpacePushResult, type SpaceShareResult, type SpaceSwitchResult, SpeakerRegistry, type StatementProvenance, StorageManager, type StructuralContextDegradation, type StructuralContextErrorCode, type StructuralContextProvider, type StructuralProviderStatus, type StructuralSpawnFn, type StructuralSymbol, type SubprocessProviderOptions, type SymbolsForDiffErr, type SymbolsForDiffOk, type SymbolsForDiffResult, SyncIncrementalResult, type SyncOptions, type SyncResult, type SyncState, Taxonomy, TokenEntry, type TrainingExportAdapter, type TrainingExportOptions, type TrainingExportRecord, type TreeNode, WEARABLES_DIR_NAME, WearableCleanupSettings, type WearableConnectorFactory, type WearableConnectorFactoryOptions, type WearableConnectorRegistration, WearableConversation, WearableCorrectionRule, WearableDayTranscript, WearableDayTranscriptMeta, WearableSourceConnector, WearableSourceSettings, type WearableSourceSyncState, type WearableSyncStateFile, type WearablesCliIo, WearablesConfig, WearablesInputError, WearablesService, applyCorrections, applyOffTheRecord, branchNamespaceName, buildProcedureMarkdownBody, buildProcedureRecallSection, cleanConversation, clearStructuralContextProvidersForTest, clearTrainingExportAdapters, clearWearableConnectors, collapseImmediateRepeats, collectLocalSessionSummaries, compileCorrectionRule, compileCorrectionRules, compileRedactionPatterns, compileRedactionRules, composeDayTranscriptBody, composeDayTranscriptMeta, convertMemoriesToRecords, correctionsFilePath, createBackend, createGoogleDriveConnector, createNotionConnector, createSpace, createSubprocessStructuralProvider, curate, defaultGoogleDriveClientFactory, defaultWearableCleanupSettings, defaultWearableSourceSettings, defaultWearablesConfig, deleteSpace, describeCodingScope, describeErrorForOperator, describeStructuralProviderStatus, emptyManifest, emptySyncState, ensureBuiltInWearableConnectors, findContradictions, findDuplicates, forkCapsule, generateContextTree, generateResolverDocument, getActiveSpace, getAuditLog, getLocalSessionSourceAdapter, getManifestPath, getSpacesDir, getStructuralContextProvider, getTaxonomyDir, getTaxonomyFilePath, getTrainingExportAdapter, getWearableConnector, hashTranscriptBody, hostIdForConnector, isLowQualitySegment, isReviewPrompt, isValidTranscriptDate, listLocalSessionSourceAdapters, listReviewItems, listSpaces, listTrainingExportAdapters, listWearableConnectors, loadCorrectionsFile, loadManifest, loadSyncState, loadTaxonomy, manifestDir, manifestPath, matchesPatterns, mergeSpaces, normalizeOriginUrl, onboard, packReviewContext, packReviewContextStructural, parseDayTranscript, parseFlexibleIsoTimestamp, parseIsoOffsetTimestamp, parseIsoUtcTimestamp, parseProcedureStepsFromBody, parseTouchedFiles, parseWearablesConfig, performReview, probeStructuralProviderForDoctor, projectNamespaceName, promoteSpace, publisherFor, publisherForConnector, pullFromSpace, pushToSpace, rankReviewCandidates, readForkLineage, readManifest, redactSessionSummaryText, redactText, registerLocalSessionSourceAdapter, registerPublisher, registerStructuralContextProvider, registerTrainingExportAdapter, registerWearableConnector, renderExtensionsBlock, renderExtensionsFooter, renderStructuralProviderStatusLine, resolveCategory, resolveCodingNamespaceOverlay, resolveGitContext, runBinaryLifecyclePipeline, runLocalSessionSummaryCliCommand, runWearablesCliCommand, saveCorrectionsFile, saveManifest, saveSyncState, saveTaxonomy, scanForBinaries, serializeDayTranscript, shareSpace, stableHash, stripFillerTokens, structuralProviderActive, switchSpace, syncChanges, syncStateFilePath, toStructuralContextDegradation, updateSourceSyncState, validateGoogleDriveConfig, validateNotionConfig, validateSlug, validateTaxonomy, watchForChanges, writeManifest };