@remnic/core 9.3.728 → 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 (348) 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 +7 -6
  11. package/dist/access-operations.js +17 -17
  12. package/dist/access-schema.d.ts +4 -4
  13. package/dist/{access-service-Bgpjxo4f.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-QNEUZIAH.js → chunk-OUITHS6V.js} +381 -433
  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-BLME420h.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-DqPAz8ot.d.ts → orchestrator-B4KjaOtY.d.ts} +128 -34
  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 +32 -32
  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 +1 -1
  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 +22 -22
  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/orchestration/extraction-queue-coordinator.ts +175 -0
  284. package/src/orchestrator-extraction-queue.test.ts +26 -38
  285. package/src/orchestrator-flush.test.ts +10 -15
  286. package/src/orchestrator.ts +359 -542
  287. package/src/procedural/procedure-miner.test.ts +2 -2
  288. package/src/provenance-extraction.test.ts +382 -4
  289. package/src/provenance.ts +158 -22
  290. package/src/recall-handles-wiring.test.ts +1 -1
  291. package/src/search/factory.ts +4 -3
  292. package/src/semantic-rule-promotion.ts +1 -1
  293. package/src/source-attribution-roundtrip.test.ts +2 -2
  294. package/src/storage-contract/atomicity.test.ts +1 -1
  295. package/src/storage-contract/cache-coherence.test.ts +2 -2
  296. package/src/storage-contract/content-hash.test.ts +1 -1
  297. package/src/storage-contract/namespace-routing.test.ts +1 -1
  298. package/src/storage-contract/round-trip.test.ts +3 -3
  299. package/src/storage.ts +23 -2
  300. package/src/temporal-supersession.test.ts +12 -11
  301. package/src/temporal-validity.test.ts +11 -11
  302. package/src/wearables/cli.test.ts +30 -0
  303. package/src/wearables/cli.ts +3 -0
  304. package/src/wearables/memory-gen.test.ts +57 -1
  305. package/src/wearables/memory-gen.ts +31 -7
  306. package/src/wearables/pipeline.test.ts +40 -1
  307. package/src/wearables/pipeline.ts +4 -0
  308. package/src/wearables/service.test.ts +2 -2
  309. package/src/wearables/storage-io.test.ts +3 -3
  310. package/src/wearables/types.ts +7 -0
  311. package/dist/chunk-4NR2PDZ5.js.map +0 -1
  312. package/dist/chunk-4T3BMHKD.js.map +0 -1
  313. package/dist/chunk-7RLCCNHU.js.map +0 -1
  314. package/dist/chunk-AQLOP5F4.js.map +0 -1
  315. package/dist/chunk-EH5ED3C6.js.map +0 -1
  316. package/dist/chunk-M4AYVEWS.js.map +0 -1
  317. package/dist/chunk-QNEUZIAH.js.map +0 -1
  318. package/dist/chunk-UM5AWJNQ.js.map +0 -1
  319. package/dist/chunk-UTHQPSRC.js.map +0 -1
  320. package/dist/chunk-YKBHOBJK.js.map +0 -1
  321. /package/dist/{auto-sync-F3KCSQFJ.js.map → auto-sync-G3V5AN4C.js.map} +0 -0
  322. /package/dist/{chunk-4NOI577P.js.map → chunk-24ZLC5QN.js.map} +0 -0
  323. /package/dist/{chunk-DMQWV6SQ.js.map → chunk-5RZOFIDL.js.map} +0 -0
  324. /package/dist/{chunk-36SEDFAU.js.map → chunk-C5WN74HH.js.map} +0 -0
  325. /package/dist/{chunk-MLKWJOAJ.js.map → chunk-CGPHMNL4.js.map} +0 -0
  326. /package/dist/{chunk-EY6MDMHK.js.map → chunk-F6OEXJQQ.js.map} +0 -0
  327. /package/dist/{chunk-M4V2JVSZ.js.map → chunk-FFUCCKPN.js.map} +0 -0
  328. /package/dist/{chunk-O6YH5F47.js.map → chunk-FYWUNVFZ.js.map} +0 -0
  329. /package/dist/{chunk-37436GML.js.map → chunk-GEXI357K.js.map} +0 -0
  330. /package/dist/{chunk-YGIQORJ3.js.map → chunk-GGL34GCW.js.map} +0 -0
  331. /package/dist/{chunk-WAS3NV46.js.map → chunk-H3MB3F62.js.map} +0 -0
  332. /package/dist/{chunk-76NHR6ZL.js.map → chunk-HJWQJUKQ.js.map} +0 -0
  333. /package/dist/{chunk-Y4YD5TYW.js.map → chunk-IIBFCZA7.js.map} +0 -0
  334. /package/dist/{chunk-UVPL565C.js.map → chunk-IQOEW5YV.js.map} +0 -0
  335. /package/dist/{chunk-V4GNSDFH.js.map → chunk-KQYGNGON.js.map} +0 -0
  336. /package/dist/{chunk-CBWI22JN.js.map → chunk-KSJCXXOU.js.map} +0 -0
  337. /package/dist/{chunk-I5REUWLH.js.map → chunk-NIZQH6AU.js.map} +0 -0
  338. /package/dist/{chunk-4ESAR77N.js.map → chunk-NOU77OHX.js.map} +0 -0
  339. /package/dist/{chunk-BQCHEV7O.js.map → chunk-O4ZIBPIW.js.map} +0 -0
  340. /package/dist/{chunk-HOHVIVDR.js.map → chunk-OBJUKYDO.js.map} +0 -0
  341. /package/dist/{chunk-YOLZS7NY.js.map → chunk-OTQE66IX.js.map} +0 -0
  342. /package/dist/{chunk-C2PG7IEH.js.map → chunk-P3VJCTVE.js.map} +0 -0
  343. /package/dist/{chunk-HGNOCPZX.js.map → chunk-QZHF4BWN.js.map} +0 -0
  344. /package/dist/{chunk-ASKXIAHD.js.map → chunk-WDJCZQB4.js.map} +0 -0
  345. /package/dist/{chunk-JYLFZWUX.js.map → chunk-XYUFGHUW.js.map} +0 -0
  346. /package/dist/{chunk-3TSTGI6F.js.map → chunk-ZQUAVZNG.js.map} +0 -0
  347. /package/dist/{first-start-migration-22LPFHD5.js.map → first-start-migration-OOR57AYR.js.map} +0 -0
  348. /package/dist/{resolution-MN36NW5P.js.map → orchestration/compression-guideline-coordinator.js.map} +0 -0
package/dist/index.js CHANGED
@@ -76,10 +76,10 @@ import {
76
76
  registerTrainingExportAdapter,
77
77
  runBulkImportCliCommand,
78
78
  runWearablesCliCommand
79
- } from "./chunk-H5BWGCRZ.js";
79
+ } from "./chunk-6TUWSUUD.js";
80
+ import "./chunk-7F7Z6MOS.js";
80
81
  import "./chunk-MC4FJXPA.js";
81
82
  import "./chunk-LQHDIS7L.js";
82
- import "./chunk-7F7Z6MOS.js";
83
83
  import "./chunk-JJEJJ7RK.js";
84
84
  import "./chunk-7VFZTJ7K.js";
85
85
  import "./chunk-HDDRVXX4.js";
@@ -89,17 +89,17 @@ import "./chunk-OZKVVUJB.js";
89
89
  import "./chunk-2DL3OFLD.js";
90
90
  import "./chunk-G4IAEX6D.js";
91
91
  import "./chunk-2NLLXCJG.js";
92
- import "./chunk-UP6MOYCB.js";
93
92
  import "./chunk-765K3SAT.js";
93
+ import "./chunk-UP6MOYCB.js";
94
94
  import "./chunk-EEC4PCG5.js";
95
95
  import "./chunk-PYIFUBRK.js";
96
96
  import "./chunk-HOJZMQ4J.js";
97
- import "./chunk-Y4YD5TYW.js";
97
+ import "./chunk-IIBFCZA7.js";
98
98
  import "./chunk-LZZNTPLR.js";
99
99
  import "./chunk-WMWVO45V.js";
100
100
  import "./chunk-D6RIFG4O.js";
101
101
  import "./chunk-JCK7V6SN.js";
102
- import "./chunk-JYLFZWUX.js";
102
+ import "./chunk-XYUFGHUW.js";
103
103
  import "./chunk-KJTKLXTH.js";
104
104
  import {
105
105
  clearBulkImportSources,
@@ -117,8 +117,8 @@ import {
117
117
  validateImportTurn
118
118
  } from "./chunk-OUELRE5E.js";
119
119
  import "./chunk-GQL52GQ5.js";
120
- import "./chunk-4H4F3BFL.js";
121
- import "./chunk-HOHVIVDR.js";
120
+ import "./chunk-GXTYEG7Q.js";
121
+ import "./chunk-OBJUKYDO.js";
122
122
  import {
123
123
  clearAuthTokenSecretCache,
124
124
  isAgentAccessSecretRef,
@@ -131,8 +131,8 @@ import {
131
131
  import {
132
132
  parseStrictCliDate
133
133
  } from "./chunk-3T74IZB3.js";
134
- import "./chunk-M4AYVEWS.js";
135
- import "./chunk-YGIQORJ3.js";
134
+ import "./chunk-LUCARK4W.js";
135
+ import "./chunk-GGL34GCW.js";
136
136
  import "./chunk-HL4DB7TO.js";
137
137
  import "./chunk-7XH7VJN4.js";
138
138
  import "./chunk-EZ25VE3G.js";
@@ -171,7 +171,7 @@ import {
171
171
  saveTaxonomy,
172
172
  validateSlug,
173
173
  validateTaxonomy
174
- } from "./chunk-QNEUZIAH.js";
174
+ } from "./chunk-OUITHS6V.js";
175
175
  import {
176
176
  WEARABLE_SOURCE_PREFIX,
177
177
  buildExtractionTurns,
@@ -194,8 +194,9 @@ import {
194
194
  wearableDayTag,
195
195
  wearableSourceLabel,
196
196
  writeDailyDigestMemory
197
- } from "./chunk-4T3BMHKD.js";
198
- import "./chunk-MLKWJOAJ.js";
197
+ } from "./chunk-OZECYVGI.js";
198
+ import "./chunk-SYX73XD7.js";
199
+ import "./chunk-CGPHMNL4.js";
199
200
  import {
200
201
  migrateFromEngram,
201
202
  rollbackFromEngramMigration
@@ -216,7 +217,7 @@ import "./chunk-XPOOY35N.js";
216
217
  import "./chunk-HW5EF6LV.js";
217
218
  import "./chunk-TECVW3JP.js";
218
219
  import "./chunk-O7GOFAM3.js";
219
- import "./chunk-4NR2PDZ5.js";
220
+ import "./chunk-ZVHRSR2R.js";
220
221
  import "./chunk-UFS7OXGL.js";
221
222
  import "./chunk-BCDKBDSY.js";
222
223
  import "./chunk-YN2UN7N3.js";
@@ -293,7 +294,7 @@ import {
293
294
  import "./chunk-LTHVM4XN.js";
294
295
  import {
295
296
  ExtractionEngine
296
- } from "./chunk-I5REUWLH.js";
297
+ } from "./chunk-NIZQH6AU.js";
297
298
  import "./chunk-4RA3C3EV.js";
298
299
  import "./chunk-5GSUBCZM.js";
299
300
  import "./chunk-54V4BZWP.js";
@@ -339,29 +340,29 @@ import {
339
340
  FILTER_LABELS,
340
341
  isDirectAnswerEligible
341
342
  } from "./chunk-6HEM6HTQ.js";
342
- import "./chunk-C2PG7IEH.js";
343
+ import "./chunk-P3VJCTVE.js";
343
344
  import {
344
345
  buildEntityRecallSection
345
- } from "./chunk-YOLZS7NY.js";
346
+ } from "./chunk-OTQE66IX.js";
346
347
  import {
347
348
  resolvePluginEntry
348
349
  } from "./chunk-CMTINOFS.js";
349
- import "./chunk-2PRQG7PV.js";
350
350
  import "./chunk-WIWPSQYU.js";
351
- import "./chunk-ASKXIAHD.js";
351
+ import "./chunk-2PRQG7PV.js";
352
+ import "./chunk-WDJCZQB4.js";
352
353
  import "./chunk-2F6NP3NT.js";
353
354
  import "./chunk-TERNBNJB.js";
354
355
  import "./chunk-QRDOSYOR.js";
355
- import "./chunk-UVPL565C.js";
356
+ import "./chunk-IQOEW5YV.js";
356
357
  import "./chunk-ZRWB5D4H.js";
357
358
  import "./chunk-GY3SKOS4.js";
358
359
  import "./chunk-SFQ6QNL7.js";
359
360
  import "./chunk-33JBK2XP.js";
360
- import "./chunk-CBWI22JN.js";
361
+ import "./chunk-KSJCXXOU.js";
361
362
  import {
362
363
  NamespaceCatalog
363
- } from "./chunk-M4V2JVSZ.js";
364
- import "./chunk-3TSTGI6F.js";
364
+ } from "./chunk-FFUCCKPN.js";
365
+ import "./chunk-ZQUAVZNG.js";
365
366
  import "./chunk-KFY3SGN7.js";
366
367
  import {
367
368
  DEFAULT_POLL_INTERVAL_MS,
@@ -407,11 +408,11 @@ import "./chunk-LMDRGRJ2.js";
407
408
  import "./chunk-OD4FM2U7.js";
408
409
  import {
409
410
  buildExtensionsBlockForConsolidation
410
- } from "./chunk-DMQWV6SQ.js";
411
+ } from "./chunk-5RZOFIDL.js";
411
412
  import {
412
413
  runCodexMaterialize,
413
414
  runPostConsolidationMaterialize
414
- } from "./chunk-37436GML.js";
415
+ } from "./chunk-GEXI357K.js";
415
416
  import {
416
417
  MATERIALIZE_VERSION,
417
418
  SENTINEL_FILE,
@@ -448,7 +449,7 @@ import {
448
449
  parseConfig,
449
450
  parseWearablesConfig,
450
451
  resolveEnvVars
451
- } from "./chunk-36SEDFAU.js";
452
+ } from "./chunk-C5WN74HH.js";
452
453
  import {
453
454
  REDACTION_PLACEHOLDER,
454
455
  applyCorrections,
@@ -468,7 +469,7 @@ import "./chunk-K6MV3TRQ.js";
468
469
  import "./chunk-OADWQ5CR.js";
469
470
  import {
470
471
  EngramAccessHttpServer
471
- } from "./chunk-HGNOCPZX.js";
472
+ } from "./chunk-QZHF4BWN.js";
472
473
  import "./chunk-SEDEKFYQ.js";
473
474
  import "./chunk-JBPKEARU.js";
474
475
  import "./chunk-TMSXWOBZ.js";
@@ -482,21 +483,21 @@ import {
482
483
  } from "./chunk-7WV3F5DQ.js";
483
484
  import {
484
485
  EngramMcpServer
485
- } from "./chunk-BQCHEV7O.js";
486
+ } from "./chunk-O4ZIBPIW.js";
486
487
  import {
487
488
  buildCitationGuidance,
488
489
  formatOaiMemCitation,
489
490
  parseOaiMemCitation,
490
491
  sanitizeNoteForCitation
491
492
  } from "./chunk-D24OXEPB.js";
492
- import "./chunk-76NHR6ZL.js";
493
- import "./chunk-O6YH5F47.js";
494
- import "./chunk-ZQNCHPTZ.js";
493
+ import "./chunk-HJWQJUKQ.js";
494
+ import "./chunk-FYWUNVFZ.js";
495
495
  import "./chunk-YF6FMLBT.js";
496
+ import "./chunk-ZQNCHPTZ.js";
496
497
  import {
497
498
  executeResolution,
498
499
  isValidResolutionVerb
499
- } from "./chunk-R6OVFAX6.js";
500
+ } from "./chunk-DJECGBBM.js";
500
501
  import {
501
502
  ACTIVE_STATUSES,
502
503
  judgeContradictionPairs,
@@ -528,19 +529,21 @@ import {
528
529
  suggestionSubmitRequestSchema,
529
530
  validateRequest
530
531
  } from "./chunk-FVZ2ISIX.js";
531
- import "./chunk-4ESAR77N.js";
532
+ import "./chunk-NOU77OHX.js";
532
533
  import {
533
534
  EngramAccessInputError,
534
535
  EngramAccessService,
535
536
  computeProcedureStats,
536
537
  formatProcedureStatsText
537
- } from "./chunk-UM5AWJNQ.js";
538
+ } from "./chunk-646B5ERJ.js";
538
539
  import "./chunk-GDASG7NC.js";
539
540
  import "./chunk-GDB4J2H3.js";
540
541
  import {
541
542
  importCapsule
542
543
  } from "./chunk-ARV3AUOM.js";
543
- import "./chunk-VQ7B2Q6M.js";
544
+ import {
545
+ isCodingGraphInstalled
546
+ } from "./chunk-VQ7B2Q6M.js";
544
547
  import {
545
548
  CODING_GRAPH_ENGINE_VERSION,
546
549
  TIER_1_LANGUAGES
@@ -558,8 +561,8 @@ import {
558
561
  } from "./chunk-GKRLPHPU.js";
559
562
  import "./chunk-SOBJ6NEY.js";
560
563
  import "./chunk-ICP53SKG.js";
561
- import "./chunk-4NOI577P.js";
562
- import "./chunk-AQLOP5F4.js";
564
+ import "./chunk-24ZLC5QN.js";
565
+ import "./chunk-WNGXQMRI.js";
563
566
  import "./chunk-RS25QOKZ.js";
564
567
  import {
565
568
  isTrustZoneName
@@ -594,8 +597,11 @@ import {
594
597
  resolveGitContext,
595
598
  stableHash
596
599
  } from "./chunk-J6BH2OBA.js";
597
- import "./chunk-V4GNSDFH.js";
598
- import "./chunk-UTHQPSRC.js";
600
+ import "./chunk-KQYGNGON.js";
601
+ import "./chunk-HHNSLPX7.js";
602
+ import {
603
+ LanceDbBackend
604
+ } from "./chunk-5CEJH5ZN.js";
599
605
  import {
600
606
  MeilisearchBackend
601
607
  } from "./chunk-WRFKZEO6.js";
@@ -604,11 +610,8 @@ import {
604
610
  OramaBackend
605
611
  } from "./chunk-LQ6JI4VH.js";
606
612
  import "./chunk-SANZHXY2.js";
607
- import "./chunk-WAS3NV46.js";
608
- import {
609
- LanceDbBackend
610
- } from "./chunk-5CEJH5ZN.js";
611
613
  import "./chunk-AER6MT24.js";
614
+ import "./chunk-H3MB3F62.js";
612
615
  import "./chunk-CINZGPSJ.js";
613
616
  import "./chunk-ZFXCQPNO.js";
614
617
  import "./chunk-DCWIQFNA.js";
@@ -631,7 +634,7 @@ import {
631
634
  buildProcedureMarkdownBody,
632
635
  parseProcedureStepsFromBody
633
636
  } from "./chunk-QDW3E4RD.js";
634
- import "./chunk-EH5ED3C6.js";
637
+ import "./chunk-PMAQRUN4.js";
635
638
  import {
636
639
  getHostEmbeddingProvider,
637
640
  normalizeHostEmbeddingVector,
@@ -641,7 +644,7 @@ import {
641
644
  CrossNamespaceBudget,
642
645
  DEFAULT_CROSS_NAMESPACE_BUDGET
643
646
  } from "./chunk-ODPLEWB6.js";
644
- import "./chunk-3RCBIOOJ.js";
647
+ import "./chunk-ESF7TRYJ.js";
645
648
  import "./chunk-ZY2MNJR6.js";
646
649
  import "./chunk-SQNED75R.js";
647
650
  import "./chunk-EHQ5HO5T.js";
@@ -662,12 +665,12 @@ import {
662
665
  renderBriefingMarkdown,
663
666
  resolveBriefingSaveDir,
664
667
  validateBriefingFormat
665
- } from "./chunk-EY6MDMHK.js";
668
+ } from "./chunk-F6OEXJQQ.js";
666
669
  import {
667
670
  StorageManager,
668
671
  parseEntityFile,
669
672
  serializeEntityFile
670
- } from "./chunk-7RLCCNHU.js";
673
+ } from "./chunk-Q6BAA57B.js";
671
674
  import "./chunk-L2B3EE7B.js";
672
675
  import {
673
676
  DEFAULT_SELF_NAME,
@@ -827,7 +830,7 @@ import {
827
830
  resolvePrincipal
828
831
  } from "./chunk-UZYLX7M6.js";
829
832
  import "./chunk-U3PN77QT.js";
830
- import "./chunk-YKBHOBJK.js";
833
+ import "./chunk-OEHCMALU.js";
831
834
  import {
832
835
  coerceInstallExtension
833
836
  } from "./chunk-PHK3HARR.js";
@@ -1077,6 +1080,305 @@ function packReviewContext(input) {
1077
1080
  const rankedRecall = rankReviewCandidates(input.candidates, touchedFiles);
1078
1081
  return { touchedFiles, rankedRecall };
1079
1082
  }
1083
+ async function packReviewContextStructural(input) {
1084
+ const touchedFiles = parseTouchedFiles(input.diff);
1085
+ const diffString = typeof input.diff === "string" ? input.diff : "";
1086
+ const result = await input.provider.symbolsForDiff(diffString, {
1087
+ signal: input.signal
1088
+ });
1089
+ let matchTerms = touchedFiles;
1090
+ let structuralDegradation;
1091
+ if (result.ok) {
1092
+ const symbolNames = result.symbols.map((sym) => sym.symbol);
1093
+ matchTerms = symbolNames.length > 0 ? [...touchedFiles, ...symbolNames] : touchedFiles;
1094
+ } else {
1095
+ structuralDegradation = {
1096
+ backend: "structural-context",
1097
+ code: result.code,
1098
+ detail: result.detail
1099
+ };
1100
+ }
1101
+ const rankedRecall = rankReviewCandidates(input.candidates, matchTerms);
1102
+ return { touchedFiles, rankedRecall, structuralDegradation };
1103
+ }
1104
+
1105
+ // src/coding/structural-context.ts
1106
+ function toStructuralContextDegradation(err) {
1107
+ return { backend: "structural-context", code: err.code, detail: err.detail };
1108
+ }
1109
+ var STRUCTURAL_PROVIDERS_KEY = /* @__PURE__ */ Symbol.for(
1110
+ "remnic.structuralContextProviders"
1111
+ );
1112
+ function providerMap() {
1113
+ const store = globalThis;
1114
+ const existing = store[STRUCTURAL_PROVIDERS_KEY];
1115
+ if (existing instanceof Map) {
1116
+ return existing;
1117
+ }
1118
+ const created = /* @__PURE__ */ new Map();
1119
+ store[STRUCTURAL_PROVIDERS_KEY] = created;
1120
+ return created;
1121
+ }
1122
+ function normalizeScope(scope) {
1123
+ const normalized = typeof scope === "string" ? scope.trim() : "";
1124
+ return normalized || "default";
1125
+ }
1126
+ function registerStructuralContextProvider(scope, provider) {
1127
+ const key = normalizeScope(scope);
1128
+ const providers = providerMap();
1129
+ const previous = providers.get(key);
1130
+ if (previous && previous !== provider) {
1131
+ void previous.close?.();
1132
+ }
1133
+ providers.set(key, provider);
1134
+ return () => {
1135
+ const current = providerMap();
1136
+ if (current.get(key) === provider) {
1137
+ current.delete(key);
1138
+ void provider.close?.();
1139
+ }
1140
+ };
1141
+ }
1142
+ function getStructuralContextProvider(scope) {
1143
+ return providerMap().get(normalizeScope(scope));
1144
+ }
1145
+ function clearStructuralContextProvidersForTest() {
1146
+ providerMap().clear();
1147
+ }
1148
+ function structuralProviderActive(config) {
1149
+ const ck = config.codingKnowledge;
1150
+ if (ck === void 0 || ck === null) return false;
1151
+ return ck.enabled === true && ck.structuralProvider !== "none";
1152
+ }
1153
+ function describeStructuralProviderStatus(config, scope) {
1154
+ const ck = config.codingKnowledge;
1155
+ const mode = ck?.structuralProvider ?? "none";
1156
+ const active = structuralProviderActive(config);
1157
+ const provider = scope !== void 0 ? getStructuralContextProvider(scope) : void 0;
1158
+ return {
1159
+ active,
1160
+ mode,
1161
+ command: mode === "subprocess" && ck?.structuralProviderCommand ? ck.structuralProviderCommand : void 0,
1162
+ providerId: provider?.id
1163
+ };
1164
+ }
1165
+ function renderStructuralProviderStatusLine(status) {
1166
+ if (!status.active) {
1167
+ return `structural-context provider: ${status.mode} (inactive \u2014 review-context stays file-path-only)`;
1168
+ }
1169
+ const parts = [`structural-context provider: ${status.mode}`];
1170
+ if (status.command) parts.push(`command=${status.command}`);
1171
+ if (status.providerId) parts.push(`registered=${status.providerId}`);
1172
+ if (status.probed) {
1173
+ parts.push(
1174
+ status.probed.available ? "probed=available" : `probed=unavailable${status.probed.detail ? ` (${status.probed.detail})` : ""}`
1175
+ );
1176
+ }
1177
+ return parts.join(", ");
1178
+ }
1179
+
1180
+ // src/coding/structural-subprocess-provider.ts
1181
+ import { execFile } from "child_process";
1182
+ import { promisify } from "util";
1183
+ import { accessSync, constants, statSync } from "fs";
1184
+ var execFileAsync = promisify(execFile);
1185
+ var DEFAULT_TIMEOUT_MS = 5e3;
1186
+ var DEFAULT_SYMBOLS_SUBCOMMAND = "symbols-for-diff";
1187
+ function createSubprocessStructuralProvider(options) {
1188
+ const command = expandTildePath(options.command.trim());
1189
+ const extraArgs = options.args ?? [];
1190
+ const timeoutMs = options.timeoutMs ?? DEFAULT_TIMEOUT_MS;
1191
+ const symbolsSubcommand = options.symbolsSubcommand ?? DEFAULT_SYMBOLS_SUBCOMMAND;
1192
+ const spawn = options.spawn ?? defaultSpawn;
1193
+ let probeState = null;
1194
+ const id = `subprocess(${command})`;
1195
+ async function ensureProbe() {
1196
+ if (probeState !== null) return probeState;
1197
+ if (!command) {
1198
+ probeState = { available: false, detail: "structuralProviderCommand is empty" };
1199
+ return probeState;
1200
+ }
1201
+ let statOk = false;
1202
+ let notExecutable = false;
1203
+ try {
1204
+ statOk = statSync(command).isFile();
1205
+ } catch {
1206
+ statOk = false;
1207
+ }
1208
+ if (statOk && process.platform !== "win32") {
1209
+ try {
1210
+ accessSync(command, constants.X_OK);
1211
+ } catch {
1212
+ notExecutable = true;
1213
+ }
1214
+ }
1215
+ probeState = !statOk ? { available: false, detail: `binary not found: ${command}` } : notExecutable ? { available: false, detail: `binary not executable: ${command}` } : { available: true };
1216
+ return probeState;
1217
+ }
1218
+ return {
1219
+ id,
1220
+ async probe() {
1221
+ return ensureProbe();
1222
+ },
1223
+ async symbolsForDiff(diff, callOpts) {
1224
+ const probe = await ensureProbe();
1225
+ if (!probe.available) {
1226
+ return { ok: false, code: "provider_unavailable", detail: probe.detail };
1227
+ }
1228
+ const payload = JSON.stringify({ diff });
1229
+ const argv = [symbolsSubcommand, payload, ...extraArgs];
1230
+ try {
1231
+ const { stdout } = await spawn(command, argv, {
1232
+ timeout: timeoutMs,
1233
+ signal: callOpts?.signal
1234
+ });
1235
+ return parseSymbolJson(stdout);
1236
+ } catch (err) {
1237
+ return classifySpawnError(err);
1238
+ }
1239
+ },
1240
+ async architectureHints(root, callOpts) {
1241
+ const probe = await ensureProbe();
1242
+ if (!probe.available) {
1243
+ return { ok: false, code: "provider_unavailable", detail: probe.detail };
1244
+ }
1245
+ const argv = ["architecture-hints", root, ...extraArgs];
1246
+ try {
1247
+ const { stdout } = await spawn(command, argv, {
1248
+ timeout: timeoutMs,
1249
+ signal: callOpts?.signal
1250
+ });
1251
+ return parseHintsJson(stdout);
1252
+ } catch (err) {
1253
+ return classifySpawnError(err);
1254
+ }
1255
+ },
1256
+ close() {
1257
+ probeState = null;
1258
+ }
1259
+ };
1260
+ }
1261
+ function parseSymbolJson(stdout) {
1262
+ let value;
1263
+ try {
1264
+ value = JSON.parse(stdout);
1265
+ } catch {
1266
+ return {
1267
+ ok: false,
1268
+ code: "provider_malformed",
1269
+ detail: "stdout was not valid JSON"
1270
+ };
1271
+ }
1272
+ if (value === null || typeof value !== "object" || Array.isArray(value)) {
1273
+ return {
1274
+ ok: false,
1275
+ code: "provider_malformed",
1276
+ detail: "provider output was not a JSON object"
1277
+ };
1278
+ }
1279
+ const obj = value;
1280
+ const symbolsRaw = obj.symbols;
1281
+ if (!Array.isArray(symbolsRaw)) {
1282
+ return {
1283
+ ok: false,
1284
+ code: "provider_malformed",
1285
+ detail: "provider output .symbols is not an array"
1286
+ };
1287
+ }
1288
+ const symbols = [];
1289
+ for (const entry of symbolsRaw) {
1290
+ const item = readStructuralSymbol(entry);
1291
+ if (item !== null) symbols.push(item);
1292
+ }
1293
+ return { ok: true, symbols };
1294
+ }
1295
+ function parseHintsJson(stdout) {
1296
+ let value;
1297
+ try {
1298
+ value = JSON.parse(stdout);
1299
+ } catch {
1300
+ return {
1301
+ ok: false,
1302
+ code: "provider_malformed",
1303
+ detail: "stdout was not valid JSON"
1304
+ };
1305
+ }
1306
+ if (!Array.isArray(value)) {
1307
+ return {
1308
+ ok: false,
1309
+ code: "provider_malformed",
1310
+ detail: "provider hints output was not a JSON array"
1311
+ };
1312
+ }
1313
+ const hints = value.filter((h) => typeof h === "string" && h.length > 0);
1314
+ return { ok: true, hints };
1315
+ }
1316
+ function readStructuralSymbol(entry) {
1317
+ if (entry === null || typeof entry !== "object" || Array.isArray(entry)) {
1318
+ return null;
1319
+ }
1320
+ const rec = entry;
1321
+ const symbol = typeof rec.symbol === "string" ? rec.symbol.trim() : "";
1322
+ if (!symbol) return null;
1323
+ const path15 = typeof rec.path === "string" && rec.path.length > 0 ? rec.path : void 0;
1324
+ const kind = typeof rec.kind === "string" && rec.kind.length > 0 ? rec.kind : void 0;
1325
+ const item = path15 !== void 0 && kind !== void 0 ? { symbol, path: path15, kind } : path15 !== void 0 ? { symbol, path: path15 } : kind !== void 0 ? { symbol, kind } : { symbol };
1326
+ return item;
1327
+ }
1328
+ function classifySpawnError(err) {
1329
+ const message = err instanceof Error ? err.message : String(err);
1330
+ if (/timeout|timed out|ETIMEDOUT/i.test(message)) {
1331
+ return { ok: false, code: "provider_timeout", detail: message };
1332
+ }
1333
+ return { ok: false, code: "provider_error", detail: message };
1334
+ }
1335
+ function defaultSpawn(command, argv, options) {
1336
+ return execFileAsync(command, [...argv], {
1337
+ timeout: options.timeout,
1338
+ signal: options.signal,
1339
+ maxBuffer: 4 * 1024 * 1024
1340
+ });
1341
+ }
1342
+ async function probeStructuralProviderForDoctor(config) {
1343
+ const status = describeStructuralProviderStatus(config);
1344
+ if (!status.active) return status;
1345
+ const ck = config.codingKnowledge;
1346
+ if (ck.structuralProvider === "subprocess") {
1347
+ if (!ck.structuralProviderCommand) {
1348
+ return {
1349
+ ...status,
1350
+ probed: { available: false, detail: "structuralProviderCommand is empty" }
1351
+ };
1352
+ }
1353
+ const provider = createSubprocessStructuralProvider({
1354
+ command: ck.structuralProviderCommand
1355
+ });
1356
+ try {
1357
+ const probed = await safeProbe(provider);
1358
+ return { ...status, probed };
1359
+ } finally {
1360
+ void provider.close?.();
1361
+ }
1362
+ }
1363
+ if (ck.structuralProvider === "native") {
1364
+ const installed = await isCodingGraphInstalled().catch(() => false);
1365
+ return {
1366
+ ...status,
1367
+ probed: {
1368
+ available: installed,
1369
+ detail: installed ? void 0 : "@remnic/coding-graph not installed"
1370
+ }
1371
+ };
1372
+ }
1373
+ return status;
1374
+ }
1375
+ async function safeProbe(provider) {
1376
+ try {
1377
+ return await provider.probe();
1378
+ } catch (err) {
1379
+ return { available: false, detail: err instanceof Error ? err.message : String(err) };
1380
+ }
1381
+ }
1080
1382
 
1081
1383
  // src/binary-lifecycle/types.ts
1082
1384
  var DEFAULT_SCAN_PATTERNS = [
@@ -5860,6 +6162,7 @@ export {
5860
6162
  cleanConversation,
5861
6163
  clearAuthTokenSecretCache,
5862
6164
  clearBulkImportSources,
6165
+ clearStructuralContextProvidersForTest,
5863
6166
  clearTrainingExportAdapters,
5864
6167
  clearVerdictCache,
5865
6168
  clearWearableConnectors,
@@ -5890,6 +6193,7 @@ export {
5890
6193
  createGoogleDriveConnector,
5891
6194
  createNotionConnector,
5892
6195
  createSpace,
6196
+ createSubprocessStructuralProvider,
5893
6197
  createVerdictCache,
5894
6198
  createVersion,
5895
6199
  curate,
@@ -5910,6 +6214,7 @@ export {
5910
6214
  describeCodingScope,
5911
6215
  describeErrorForOperator,
5912
6216
  describeMemoriesDir,
6217
+ describeStructuralProviderStatus,
5913
6218
  detectRecallAnomalies,
5914
6219
  diffVersions,
5915
6220
  discoverMemoryExtensions,
@@ -5953,6 +6258,7 @@ export {
5953
6258
  getManifestPath,
5954
6259
  getMemoryForActiveMemory,
5955
6260
  getSpacesDir,
6261
+ getStructuralContextProvider,
5956
6262
  getTaxonomyDir,
5957
6263
  getTaxonomyFilePath,
5958
6264
  getTrainingExportAdapter,
@@ -6047,6 +6353,7 @@ export {
6047
6353
  onboard,
6048
6354
  openLcmDatabase,
6049
6355
  packReviewContext,
6356
+ packReviewContextStructural,
6050
6357
  parseAllCitations,
6051
6358
  parseAnthropicMessageParts,
6052
6359
  parseBriefingFocus,
@@ -6080,6 +6387,7 @@ export {
6080
6387
  performReview,
6081
6388
  persistableConnectorConfig,
6082
6389
  planRecallMode,
6390
+ probeStructuralProviderForDoctor,
6083
6391
  projectNamespaceName,
6084
6392
  promoteSpace,
6085
6393
  publisherFor,
@@ -6108,6 +6416,7 @@ export {
6108
6416
  registerHostEmbeddingProvider,
6109
6417
  registerLocalSessionSourceAdapter,
6110
6418
  registerPublisher,
6419
+ registerStructuralContextProvider,
6111
6420
  registerTrainingExportAdapter,
6112
6421
  registerWearableConnector,
6113
6422
  removeConnector,
@@ -6117,6 +6426,7 @@ export {
6117
6426
  renderConnectorsRunResult,
6118
6427
  renderExtensionsBlock,
6119
6428
  renderExtensionsFooter,
6429
+ renderStructuralProviderStatusLine,
6120
6430
  renderXray,
6121
6431
  renderXrayJson,
6122
6432
  renderXrayMarkdown,
@@ -6178,6 +6488,7 @@ export {
6178
6488
  storagePathHash,
6179
6489
  stripCitation,
6180
6490
  stripFillerTokens,
6491
+ structuralProviderActive,
6181
6492
  suggestionSubmitRequestSchema,
6182
6493
  summarizeOfflineSyncChangeset,
6183
6494
  summarizeOfflineSyncPendingChanges,
@@ -6188,6 +6499,7 @@ export {
6188
6499
  syncChanges,
6189
6500
  syncStateFilePath,
6190
6501
  syncWearableSource,
6502
+ toStructuralContextDegradation,
6191
6503
  updateSourceSyncState,
6192
6504
  validateBatchSize,
6193
6505
  validateBriefingFormat,