@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
@@ -41,7 +41,7 @@ test("#1671: writeMemoryFrontmatter patches invalid_at onto an existing fact tha
41
41
  const { storage, cleanup } = await makeStorage("bitemporal-backfill-patch-");
42
42
  try {
43
43
  // Write a fact WITHOUT bi-temporal bounds (simulates a pre-#1578 copy).
44
- const id = await storage.writeMemory("fact", "We use PostgreSQL for the main db.", {
44
+ const { id: id } = await storage.writeMemory("fact", "We use PostgreSQL for the main db.", {
45
45
  confidence: 0.9,
46
46
  });
47
47
  const before = (await storage.readAllMemories()).find((m) => m.frontmatter.id === id);
@@ -95,7 +95,7 @@ test("#1671: backfill does NOT clobber an existing invalid_at on the copy", asyn
95
95
  const { storage, cleanup } = await makeStorage("bitemporal-backfill-noclobber-");
96
96
  try {
97
97
  // The existing copy already has an explicit invalid_at.
98
- const id = await storage.writeMemory("fact", "We use MySQL until December.", {
98
+ const { id: id } = await storage.writeMemory("fact", "We use MySQL until December.", {
99
99
  confidence: 0.9,
100
100
  invalidAt: "2025-12-01T00:00:00.000Z",
101
101
  observedAt: "2025-06-01T00:00:00.000Z",
@@ -126,7 +126,7 @@ test("#1671: re-extraction with resolved invalidAt backfills an old promoted cop
126
126
  try {
127
127
  // Step 1: write a fact WITHOUT bounds (old promoted copy).
128
128
  const content = "The API rate limit is 100 req/min.";
129
- const id = await storage.writeMemory("fact", content, {
129
+ const { id: id } = await storage.writeMemory("fact", content, {
130
130
  confidence: 0.9,
131
131
  });
132
132
 
@@ -184,7 +184,7 @@ test("#1707 thread 2: corrected extracted validFrom overwrites a batch-anchored
184
184
  // Old promoted copy: batch-anchored valid_at, no per-fact event-time.
185
185
  const content = "We have used Stripe for payments since 2024.";
186
186
  const batchAnchor = "2026-06-01T00:00:00.000Z";
187
- const id = await storage.writeMemory("fact", content, {
187
+ const { id } = await storage.writeMemory("fact", content, {
188
188
  confidence: 0.9,
189
189
  validAt: batchAnchor,
190
190
  // No eventTimeSource → batch-anchored (legacy pre-#1670 copy).
@@ -225,7 +225,7 @@ test("#1707 thread 2: identical extracted validFrom is a no-op (equality short-c
225
225
  // Copy already carries an extracted per-fact anchor.
226
226
  const content = "The migration to MySQL completed in March 2025.";
227
227
  const existingValidAt: string = "2025-03-01T00:00:00.000Z";
228
- const id = await storage.writeMemory("fact", content, {
228
+ const { id } = await storage.writeMemory("fact", content, {
229
229
  confidence: 0.9,
230
230
  validAt: existingValidAt,
231
231
  observedAt: "2025-06-01T00:00:00.000Z",
@@ -256,7 +256,7 @@ test("#1707 thread 2: differing extracted validFrom overwrites (authoritative re
256
256
  // Copy carries an older (batch-anchored) valid_at.
257
257
  const content = "We have used Stripe for payments since 2024.";
258
258
  const staleValidAt: string = "2026-06-01T00:00:00.000Z"; // batch anchor
259
- const id = await storage.writeMemory("fact", content, {
259
+ const { id } = await storage.writeMemory("fact", content, {
260
260
  confidence: 0.9,
261
261
  validAt: staleValidAt,
262
262
  });
@@ -300,7 +300,7 @@ test("#1707 thread 2: end-only extracted provenance does NOT block a later start
300
300
  // anchor (assumed start).
301
301
  const observedAt = "2026-06-01T00:00:00.000Z";
302
302
  const content = "The service was maintained through 2026.";
303
- const id = await storage.writeMemory("fact", content, {
303
+ const { id } = await storage.writeMemory("fact", content, {
304
304
  confidence: 0.9,
305
305
  validAt: observedAt, // valid_at === observedAt (assumed/batch start)
306
306
  observedAt,
@@ -381,8 +381,8 @@ test("#1707 thread 1: backfill patches promoted copies across multiple storages
381
381
  try {
382
382
  const content = "The API rate limit is 100 req/min until June 2025.";
383
383
  // Both namespaces hold the same fact, written WITHOUT bounds (stale copies).
384
- const sourceId = await sourceStorage.writeMemory("fact", content, { confidence: 0.9 });
385
- const promotedId = await promotedStorage.writeMemory("fact", content, { confidence: 0.9 });
384
+ const { id: sourceId } = await sourceStorage.writeMemory("fact", content, { confidence: 0.9 });
385
+ const { id: promotedId } = await promotedStorage.writeMemory("fact", content, { confidence: 0.9 });
386
386
 
387
387
  // Simulate re-extraction that now carries a resolved invalidAt. The
388
388
  // promotion-cascade closure calls the same backfill against each target.
@@ -434,7 +434,7 @@ test("#1707 thread 3: backfill never patches a non-fact copy (category guard)",
434
434
  const content = "The user prefers dark mode.";
435
435
  // A preference (non-fact) whose content would collide with an incoming
436
436
  // duplicate candidate.
437
- const id = await storage.writeMemory("preference", content, { confidence: 0.9 });
437
+ const { id } = await storage.writeMemory("preference", content, { confidence: 0.9 });
438
438
  const before = (await storage.readAllMemories()).find((m) => m.frontmatter.id === id);
439
439
  assert.ok(before);
440
440
  assert.equal(before!.frontmatter.category, "preference");
@@ -34,7 +34,7 @@ test("round-trip: observedAt + eventTimeSource + valid_at survive write → read
34
34
  const storage = new StorageManager(dir);
35
35
  await storage.ensureDirectories();
36
36
 
37
- const id = await storage.writeMemory("fact", "We moved offices in March.", {
37
+ const { id: id } = await storage.writeMemory("fact", "We moved offices in March.", {
38
38
  observedAt: OBSERVED,
39
39
  eventTimeSource: "extracted",
40
40
  validAt: VALID_FROM,
@@ -67,7 +67,7 @@ test("round-trip: invalid_at + forgottenAt coexist with observedAt/eventTimeSour
67
67
  const storage = new StorageManager(dir);
68
68
  await storage.ensureDirectories();
69
69
 
70
- const id = await storage.writeMemory("fact", "Old stack was Node 18.", {
70
+ const { id: id } = await storage.writeMemory("fact", "Old stack was Node 18.", {
71
71
  observedAt: OBSERVED,
72
72
  eventTimeSource: "assumed",
73
73
  validAt: VALID_FROM,
@@ -108,7 +108,7 @@ test("legacy memory without bi-temporal fields reads cleanly — observedAt/even
108
108
  const storage = new StorageManager(dir);
109
109
  await storage.ensureDirectories();
110
110
 
111
- const id = await storage.writeMemory("fact", "Legacy fact pre-dating #1578.");
111
+ const { id: id } = await storage.writeMemory("fact", "Legacy fact pre-dating #1578.");
112
112
 
113
113
  const memories = await storage.readAllMemories();
114
114
  const written = memories.find((m) => m.frontmatter.id === id);
@@ -461,3 +461,188 @@ test("resolveMemoryLifecycleCapabilities matches pre-migration config reads (par
461
461
  }
462
462
  }
463
463
  });
464
+
465
+
466
+ // ---------------------------------------------------------------------------
467
+ // IndexingCapabilitySet — gate-parity tests (issue #1523 batch 4).
468
+ //
469
+ // Same invariant as the sets above: every caps field must project from its
470
+ // `<field>Enabled` config flag. All two flags are required booleans on
471
+ // PluginConfig (defaults resolved at the parse boundary), so the projection
472
+ // is a pure passthrough.
473
+ //
474
+ // Parity contract: a caps-resolved run and a config-derived run MUST produce
475
+ // identical boolean values for every gate — on AND off.
476
+ // ---------------------------------------------------------------------------
477
+
478
+ import {
479
+ resolveIndexingCapabilities,
480
+ type IndexingCapabilitySet,
481
+ } from "./capabilities.js";
482
+
483
+ const INDEXING_FIELD_TO_FLAG: Record<keyof IndexingCapabilitySet, string> = {
484
+ queryAwareIndexing: "queryAwareIndexingEnabled",
485
+ conversationIndex: "conversationIndexEnabled",
486
+ };
487
+
488
+ const INDEXING_FIELDS = Object.keys(INDEXING_FIELD_TO_FLAG) as Array<
489
+ keyof IndexingCapabilitySet
490
+ >;
491
+
492
+ test("resolveIndexingCapabilities projects every field from its flag (true variant)", () => {
493
+ const overrides: Record<string, boolean> = {};
494
+ for (const flag of Object.values(INDEXING_FIELD_TO_FLAG)) overrides[flag] = true;
495
+ const config = parseConfig(overrides);
496
+ const caps = resolveIndexingCapabilities(config);
497
+
498
+ for (const field of INDEXING_FIELDS) {
499
+ const flag = INDEXING_FIELD_TO_FLAG[field];
500
+ assert.equal(caps[field], true, `caps.${field} must be true when ${flag}=true`);
501
+ }
502
+ });
503
+
504
+ test("resolveIndexingCapabilities projects every field from its flag (false variant)", () => {
505
+ const overrides: Record<string, boolean> = {};
506
+ for (const flag of Object.values(INDEXING_FIELD_TO_FLAG)) overrides[flag] = false;
507
+ const config = parseConfig(overrides);
508
+ const caps = resolveIndexingCapabilities(config);
509
+
510
+ for (const field of INDEXING_FIELDS) {
511
+ const flag = INDEXING_FIELD_TO_FLAG[field];
512
+ assert.equal(caps[field], false, `caps.${field} must be false when ${flag}=false`);
513
+ }
514
+ });
515
+
516
+ test("resolveIndexingCapabilities returns a frozen object", () => {
517
+ const config = parseConfig({});
518
+ const caps = resolveIndexingCapabilities(config);
519
+ assert.equal(Object.isFrozen(caps), true);
520
+ });
521
+
522
+ test("resolveIndexingCapabilities matches pre-migration config reads (parity contract)", () => {
523
+ const cases: Record<string, Record<string, boolean>> = {
524
+ "all-off": {
525
+ queryAwareIndexingEnabled: false,
526
+ conversationIndexEnabled: false,
527
+ },
528
+ "all-on": {
529
+ queryAwareIndexingEnabled: true,
530
+ conversationIndexEnabled: true,
531
+ },
532
+ "indexing-on-conv-off": {
533
+ queryAwareIndexingEnabled: true,
534
+ conversationIndexEnabled: false,
535
+ },
536
+ "conv-on-indexing-off": {
537
+ queryAwareIndexingEnabled: false,
538
+ conversationIndexEnabled: true,
539
+ },
540
+ };
541
+
542
+ for (const [label, overrides] of Object.entries(cases)) {
543
+ const config = parseConfig(overrides);
544
+ const caps = resolveIndexingCapabilities(config);
545
+
546
+ for (const field of INDEXING_FIELDS) {
547
+ const flag = INDEXING_FIELD_TO_FLAG[field];
548
+ assert.equal(
549
+ caps[field],
550
+ (config as unknown as Record<string, boolean>)[flag],
551
+ `[${label}] caps.${field} must equal config.${flag}`,
552
+ );
553
+ }
554
+ }
555
+ });
556
+
557
+ // ---------------------------------------------------------------------------
558
+ // CreationMemoryCapabilitySet — gate-parity tests (issue #1523 batch 4).
559
+ // ---------------------------------------------------------------------------
560
+
561
+ import {
562
+ resolveCreationMemoryCapabilities,
563
+ type CreationMemoryCapabilitySet,
564
+ } from "./capabilities.js";
565
+
566
+ const CREATION_FIELD_TO_FLAG: Record<keyof CreationMemoryCapabilitySet, string> = {
567
+ creationMemory: "creationMemoryEnabled",
568
+ commitmentLedger: "commitmentLedgerEnabled",
569
+ resumeBundles: "resumeBundlesEnabled",
570
+ commitmentLifecycle: "commitmentLifecycleEnabled",
571
+ };
572
+
573
+ const CREATION_FIELDS = Object.keys(CREATION_FIELD_TO_FLAG) as Array<
574
+ keyof CreationMemoryCapabilitySet
575
+ >;
576
+
577
+ test("resolveCreationMemoryCapabilities projects every field from its flag (true variant)", () => {
578
+ const overrides: Record<string, boolean> = {};
579
+ for (const flag of Object.values(CREATION_FIELD_TO_FLAG)) overrides[flag] = true;
580
+ const config = parseConfig(overrides);
581
+ const caps = resolveCreationMemoryCapabilities(config);
582
+
583
+ for (const field of CREATION_FIELDS) {
584
+ const flag = CREATION_FIELD_TO_FLAG[field];
585
+ assert.equal(caps[field], true, `caps.${field} must be true when ${flag}=true`);
586
+ }
587
+ });
588
+
589
+ test("resolveCreationMemoryCapabilities projects every field from its flag (false variant)", () => {
590
+ const overrides: Record<string, boolean> = {};
591
+ for (const flag of Object.values(CREATION_FIELD_TO_FLAG)) overrides[flag] = false;
592
+ const config = parseConfig(overrides);
593
+ const caps = resolveCreationMemoryCapabilities(config);
594
+
595
+ for (const field of CREATION_FIELDS) {
596
+ const flag = CREATION_FIELD_TO_FLAG[field];
597
+ assert.equal(caps[field], false, `caps.${field} must be false when ${flag}=false`);
598
+ }
599
+ });
600
+
601
+ test("resolveCreationMemoryCapabilities returns a frozen object", () => {
602
+ const config = parseConfig({});
603
+ const caps = resolveCreationMemoryCapabilities(config);
604
+ assert.equal(Object.isFrozen(caps), true);
605
+ });
606
+
607
+ test("resolveCreationMemoryCapabilities matches pre-migration config reads (parity contract)", () => {
608
+ const cases: Record<string, Record<string, boolean>> = {
609
+ "all-off": {
610
+ creationMemoryEnabled: false,
611
+ commitmentLedgerEnabled: false,
612
+ resumeBundlesEnabled: false,
613
+ commitmentLifecycleEnabled: false,
614
+ },
615
+ "all-on": {
616
+ creationMemoryEnabled: true,
617
+ commitmentLedgerEnabled: true,
618
+ resumeBundlesEnabled: true,
619
+ commitmentLifecycleEnabled: true,
620
+ },
621
+ "creation-on-rest-off": {
622
+ creationMemoryEnabled: true,
623
+ commitmentLedgerEnabled: false,
624
+ resumeBundlesEnabled: false,
625
+ commitmentLifecycleEnabled: false,
626
+ },
627
+ "ledgers-on-rest-off": {
628
+ creationMemoryEnabled: false,
629
+ commitmentLedgerEnabled: true,
630
+ resumeBundlesEnabled: true,
631
+ commitmentLifecycleEnabled: true,
632
+ },
633
+ };
634
+
635
+ for (const [label, overrides] of Object.entries(cases)) {
636
+ const config = parseConfig(overrides);
637
+ const caps = resolveCreationMemoryCapabilities(config);
638
+
639
+ for (const field of CREATION_FIELDS) {
640
+ const flag = CREATION_FIELD_TO_FLAG[field];
641
+ assert.equal(
642
+ caps[field],
643
+ (config as unknown as Record<string, boolean>)[flag],
644
+ `[${label}] caps.${field} must equal config.${flag}`,
645
+ );
646
+ }
647
+ }
648
+ });
@@ -294,3 +294,113 @@ export function resolveMemoryLifecycleCapabilities(
294
294
  embeddingFallback: config.embeddingFallbackEnabled,
295
295
  });
296
296
  }
297
+
298
+ // ---------------------------------------------------------------------------
299
+ // Indexing capability set (issue #1523 batch 4).
300
+ //
301
+ // The flags below gate query-aware indexing (temporal/tag index build +
302
+ // prefilter) and the conversation index (QMD/FAISS backend selection). They
303
+ // are read on the recall path, the extraction/persist path, and the
304
+ // maintenance/invalidation path — so they get their own projection resolved
305
+ // ONCE at each operation entry that reads them.
306
+ //
307
+ // Every field projects from an already-resolved PluginConfig boolean (defaults
308
+ // applied at the parse boundary), so the resolver is a pure projection.
309
+ // ---------------------------------------------------------------------------
310
+
311
+ /**
312
+ * Frozen projection of indexing feature gates (issue #1523 batch 4).
313
+ *
314
+ * Resolved once per recall / extraction / maintenance operation and threaded
315
+ * down. Composition lives ONLY in {@link resolveIndexingCapabilities}.
316
+ */
317
+ export interface IndexingCapabilitySet {
318
+ /** `queryAwareIndexingEnabled` — build + use temporal/tag index for recall prefilter. */
319
+ readonly queryAwareIndexing: boolean;
320
+ /** `conversationIndexEnabled` — conversation-index backend (QMD / FAISS). */
321
+ readonly conversationIndex: boolean;
322
+ }
323
+
324
+ /**
325
+ * Config projection consumed by {@link resolveIndexingCapabilities}.
326
+ */
327
+ export type IndexingConfigProjection = Pick<
328
+ PluginConfig,
329
+ "queryAwareIndexingEnabled" | "conversationIndexEnabled"
330
+ >;
331
+
332
+ /**
333
+ * Resolve the {@link IndexingCapabilitySet} from parsed config.
334
+ *
335
+ * Call this ONCE per recall / extraction / maintenance operation entry and
336
+ * thread the result down — exactly the pattern {@link resolveCapabilities}
337
+ * established for recall.
338
+ */
339
+ export function resolveIndexingCapabilities(
340
+ config: IndexingConfigProjection,
341
+ ): IndexingCapabilitySet {
342
+ return Object.freeze({
343
+ queryAwareIndexing: config.queryAwareIndexingEnabled,
344
+ conversationIndex: config.conversationIndexEnabled,
345
+ });
346
+ }
347
+
348
+ // ---------------------------------------------------------------------------
349
+ // Creation-memory capability set (issue #1523 batch 4).
350
+ //
351
+ // The flags below gate the creation-memory subsystem: resume-bundle handoff,
352
+ // commitment ledger, commitment lifecycle, and the master creation-memory
353
+ // switch. They are read on the extraction/persist path, the recall
354
+ // enrichment path, and the CLI command surface — so they get their own
355
+ // projection resolved ONCE at each operation entry that reads them.
356
+ //
357
+ // Every field projects from an already-resolved PluginConfig boolean (defaults
358
+ // applied at the parse boundary), so the resolver is a pure projection.
359
+ // ---------------------------------------------------------------------------
360
+
361
+ /**
362
+ * Frozen projection of creation-memory feature gates (issue #1523 batch 4).
363
+ *
364
+ * Resolved once per creation-memory operation (CLI command, extraction,
365
+ * recall enrichment) and threaded down. Composition lives ONLY in
366
+ * {@link resolveCreationMemoryCapabilities}.
367
+ */
368
+ export interface CreationMemoryCapabilitySet {
369
+ /** `creationMemoryEnabled` — master switch for creation-memory subsystem. */
370
+ readonly creationMemory: boolean;
371
+ /** `commitmentLedgerEnabled` — commitment-ledger read/write. */
372
+ readonly commitmentLedger: boolean;
373
+ /** `resumeBundlesEnabled` — resume-bundle handoff bundles. */
374
+ readonly resumeBundles: boolean;
375
+ /** `commitmentLifecycleEnabled` — commitment lifecycle (promotion / decay). */
376
+ readonly commitmentLifecycle: boolean;
377
+ }
378
+
379
+ /**
380
+ * Config projection consumed by {@link resolveCreationMemoryCapabilities}.
381
+ */
382
+ export type CreationMemoryConfigProjection = Pick<
383
+ PluginConfig,
384
+ | "creationMemoryEnabled"
385
+ | "commitmentLedgerEnabled"
386
+ | "resumeBundlesEnabled"
387
+ | "commitmentLifecycleEnabled"
388
+ >;
389
+
390
+ /**
391
+ * Resolve the {@link CreationMemoryCapabilitySet} from parsed config.
392
+ *
393
+ * Call this ONCE per creation-memory operation entry and thread the result
394
+ * down — exactly the pattern {@link resolveCapabilities} established for
395
+ * recall.
396
+ */
397
+ export function resolveCreationMemoryCapabilities(
398
+ config: CreationMemoryConfigProjection,
399
+ ): CreationMemoryCapabilitySet {
400
+ return Object.freeze({
401
+ creationMemory: config.creationMemoryEnabled,
402
+ commitmentLedger: config.commitmentLedgerEnabled,
403
+ resumeBundles: config.resumeBundlesEnabled,
404
+ commitmentLifecycle: config.commitmentLifecycleEnabled,
405
+ });
406
+ }
@@ -20,6 +20,7 @@ import type { CliCommand } from "../cli.js";
20
20
  import type { CommitmentLedgerEntry } from "../commitment-ledger.js";
21
21
  import type { WorkProductLedgerEntry } from "../work-product-ledger.js";
22
22
  import type { ResumeBundle } from "../resume-bundles.js";
23
+ import { resolveCreationMemoryCapabilities } from "../capabilities.js";
23
24
  import {
24
25
  runResumeBundleStatusCliCommand,
25
26
  runResumeBundleRecordCliCommand,
@@ -48,8 +49,8 @@ cmd
48
49
  const status = await runResumeBundleStatusCliCommand({
49
50
  memoryDir: orchestrator.config.memoryDir,
50
51
  resumeBundleDir: orchestrator.config.resumeBundleDir,
51
- creationMemoryEnabled: orchestrator.config.creationMemoryEnabled,
52
- resumeBundlesEnabled: orchestrator.config.resumeBundlesEnabled,
52
+ creationMemoryEnabled: resolveCreationMemoryCapabilities(orchestrator.config).creationMemory,
53
+ resumeBundlesEnabled: resolveCreationMemoryCapabilities(orchestrator.config).resumeBundles,
53
54
  });
54
55
  console.log(JSON.stringify(status, null, 2));
55
56
  console.log("OK");
@@ -84,8 +85,8 @@ cmd
84
85
  const filePath = await runResumeBundleRecordCliCommand({
85
86
  memoryDir: orchestrator.config.memoryDir,
86
87
  resumeBundleDir: orchestrator.config.resumeBundleDir,
87
- creationMemoryEnabled: orchestrator.config.creationMemoryEnabled,
88
- resumeBundlesEnabled: orchestrator.config.resumeBundlesEnabled,
88
+ creationMemoryEnabled: resolveCreationMemoryCapabilities(orchestrator.config).creationMemory,
89
+ resumeBundlesEnabled: resolveCreationMemoryCapabilities(orchestrator.config).resumeBundles,
89
90
  bundle: {
90
91
  schemaVersion: 1,
91
92
  bundleId: String(options.bundleId ?? ""),
@@ -127,11 +128,11 @@ cmd
127
128
  objectiveStateStoreDir: orchestrator.config.objectiveStateStoreDir,
128
129
  workProductLedgerDir: orchestrator.config.workProductLedgerDir,
129
130
  commitmentLedgerDir: orchestrator.config.commitmentLedgerDir,
130
- creationMemoryEnabled: orchestrator.config.creationMemoryEnabled,
131
- resumeBundlesEnabled: orchestrator.config.resumeBundlesEnabled,
131
+ creationMemoryEnabled: resolveCreationMemoryCapabilities(orchestrator.config).creationMemory,
132
+ resumeBundlesEnabled: resolveCreationMemoryCapabilities(orchestrator.config).resumeBundles,
132
133
  transcriptEnabled: orchestrator.config.transcriptEnabled,
133
134
  objectiveStateMemoryEnabled: orchestrator.config.objectiveStateMemoryEnabled,
134
- commitmentLedgerEnabled: orchestrator.config.commitmentLedgerEnabled,
135
+ commitmentLedgerEnabled: resolveCreationMemoryCapabilities(orchestrator.config).commitmentLedger,
135
136
  bundleId: String(options.bundleId ?? ""),
136
137
  recordedAt: String(options.recordedAt ?? ""),
137
138
  sessionKey: String(options.sessionKey ?? ""),
@@ -152,9 +153,9 @@ cmd
152
153
  const status = await runCommitmentStatusCliCommand({
153
154
  memoryDir: orchestrator.config.memoryDir,
154
155
  commitmentLedgerDir: orchestrator.config.commitmentLedgerDir,
155
- creationMemoryEnabled: orchestrator.config.creationMemoryEnabled,
156
- commitmentLedgerEnabled: orchestrator.config.commitmentLedgerEnabled,
157
- commitmentLifecycleEnabled: orchestrator.config.commitmentLifecycleEnabled,
156
+ creationMemoryEnabled: resolveCreationMemoryCapabilities(orchestrator.config).creationMemory,
157
+ commitmentLedgerEnabled: resolveCreationMemoryCapabilities(orchestrator.config).commitmentLedger,
158
+ commitmentLifecycleEnabled: resolveCreationMemoryCapabilities(orchestrator.config).commitmentLifecycle,
158
159
  commitmentStaleDays: orchestrator.config.commitmentStaleDays,
159
160
  commitmentDecayDays: orchestrator.config.commitmentDecayDays,
160
161
  });
@@ -189,8 +190,8 @@ cmd
189
190
  const filePath = await runCommitmentRecordCliCommand({
190
191
  memoryDir: orchestrator.config.memoryDir,
191
192
  commitmentLedgerDir: orchestrator.config.commitmentLedgerDir,
192
- creationMemoryEnabled: orchestrator.config.creationMemoryEnabled,
193
- commitmentLedgerEnabled: orchestrator.config.commitmentLedgerEnabled,
193
+ creationMemoryEnabled: resolveCreationMemoryCapabilities(orchestrator.config).creationMemory,
194
+ commitmentLedgerEnabled: resolveCreationMemoryCapabilities(orchestrator.config).commitmentLedger,
194
195
  entry: {
195
196
  schemaVersion: 1,
196
197
  entryId: String(options.entryId ?? ""),
@@ -227,9 +228,9 @@ cmd
227
228
  const entry = await runCommitmentSetStateCliCommand({
228
229
  memoryDir: orchestrator.config.memoryDir,
229
230
  commitmentLedgerDir: orchestrator.config.commitmentLedgerDir,
230
- creationMemoryEnabled: orchestrator.config.creationMemoryEnabled,
231
- commitmentLedgerEnabled: orchestrator.config.commitmentLedgerEnabled,
232
- commitmentLifecycleEnabled: orchestrator.config.commitmentLifecycleEnabled,
231
+ creationMemoryEnabled: resolveCreationMemoryCapabilities(orchestrator.config).creationMemory,
232
+ commitmentLedgerEnabled: resolveCreationMemoryCapabilities(orchestrator.config).commitmentLedger,
233
+ commitmentLifecycleEnabled: resolveCreationMemoryCapabilities(orchestrator.config).commitmentLifecycle,
233
234
  entryId: String(options.entryId ?? ""),
234
235
  nextState: String(options.state ?? "") as CommitmentLedgerEntry["state"],
235
236
  changedAt: String(options.changedAt ?? ""),
@@ -247,9 +248,9 @@ cmd
247
248
  const result = await runCommitmentLifecycleCliCommand({
248
249
  memoryDir: orchestrator.config.memoryDir,
249
250
  commitmentLedgerDir: orchestrator.config.commitmentLedgerDir,
250
- creationMemoryEnabled: orchestrator.config.creationMemoryEnabled,
251
- commitmentLedgerEnabled: orchestrator.config.commitmentLedgerEnabled,
252
- commitmentLifecycleEnabled: orchestrator.config.commitmentLifecycleEnabled,
251
+ creationMemoryEnabled: resolveCreationMemoryCapabilities(orchestrator.config).creationMemory,
252
+ commitmentLedgerEnabled: resolveCreationMemoryCapabilities(orchestrator.config).commitmentLedger,
253
+ commitmentLifecycleEnabled: resolveCreationMemoryCapabilities(orchestrator.config).commitmentLifecycle,
253
254
  commitmentDecayDays: orchestrator.config.commitmentDecayDays,
254
255
  now: typeof options.now === "string" ? options.now : undefined,
255
256
  });
@@ -264,7 +265,7 @@ cmd
264
265
  const status = await runWorkProductStatusCliCommand({
265
266
  memoryDir: orchestrator.config.memoryDir,
266
267
  workProductLedgerDir: orchestrator.config.workProductLedgerDir,
267
- creationMemoryEnabled: orchestrator.config.creationMemoryEnabled,
268
+ creationMemoryEnabled: resolveCreationMemoryCapabilities(orchestrator.config).creationMemory,
268
269
  });
269
270
  console.log(JSON.stringify(status, null, 2));
270
271
  console.log("OK");
@@ -296,7 +297,7 @@ cmd
296
297
  const filePath = await runWorkProductRecordCliCommand({
297
298
  memoryDir: orchestrator.config.memoryDir,
298
299
  workProductLedgerDir: orchestrator.config.workProductLedgerDir,
299
- creationMemoryEnabled: orchestrator.config.creationMemoryEnabled,
300
+ creationMemoryEnabled: resolveCreationMemoryCapabilities(orchestrator.config).creationMemory,
300
301
  entry: {
301
302
  schemaVersion: 1,
302
303
  entryId: String(options.entryId ?? ""),
@@ -334,7 +335,7 @@ cmd
334
335
  const results = await runWorkProductRecallSearchCliCommand({
335
336
  memoryDir: orchestrator.config.memoryDir,
336
337
  workProductLedgerDir: orchestrator.config.workProductLedgerDir,
337
- creationMemoryEnabled: orchestrator.config.creationMemoryEnabled,
338
+ creationMemoryEnabled: resolveCreationMemoryCapabilities(orchestrator.config).creationMemory,
338
339
  workProductRecallEnabled: orchestrator.config.workProductRecallEnabled,
339
340
  query,
340
341
  maxResults: Number.isFinite(maxResults) ? maxResults : 3,
@@ -117,7 +117,7 @@ function makeStubStorage(initialMemories: MemoryFile[] = []): StubStorage {
117
117
  frontmatter: makeFrontmatter({ id, ...(options as Partial<MemoryFrontmatter>) }),
118
118
  content,
119
119
  });
120
- return id;
120
+ return { id: id, tombstoneBlocked: false };
121
121
  },
122
122
  async updateMemory(id, newContent) {
123
123
  updated.push({ id, content: newContent });
@@ -393,6 +393,30 @@ test("refresh: truncated card carries 'truncated' tag in write options", async (
393
393
  assert.ok(written?.frontmatter.tags?.includes("truncated"), "truncated tag present");
394
394
  });
395
395
 
396
+ test("refresh: tombstone-blocked write surfaces refreshed:false + blocked reason (#1645)", async () => {
397
+ // findArchitectureCardMemory filters non-active cards, so a blocked prior
398
+ // card resolves to null and the refresh takes the first-card writeMemory
399
+ // path. When that write is tombstone-blocked (#1579), the response must
400
+ // report refreshed:false with a blocked reason — NOT refreshed:true, which
401
+ // would hide the block from callers/UI.
402
+ const base = makeStubStorage();
403
+ const storage: StubStorage = {
404
+ ...base,
405
+ async writeMemory(category, content, options) {
406
+ const result = await base.writeMemory(category, content, options);
407
+ return { ...result, tombstoneBlocked: true, blockedBy: "tomb-arch-1" };
408
+ },
409
+ };
410
+ const ctx = makeContext({ resolveStorage: async () => storage });
411
+ const result = await handleCodingArchitecture({ subcommand: "refresh", sessionKey: "s1" }, ctx);
412
+ assert.equal(result.subcommand, "refresh");
413
+ if (result.subcommand !== "refresh") return;
414
+ assert.equal(result.refreshed, false, "a tombstone-blocked write is not refreshed");
415
+ assert.equal(result.blockedReason, "tombstone-blocked", "blocked reason surfaced");
416
+ assert.equal(result.blockedBy, "tomb-arch-1", "blocking tombstone id surfaced");
417
+ assert.ok(result.memoryId, "pending_review memory still persisted with an id");
418
+ });
419
+
396
420
  // ──────────────────────────────────────────────────────────────────────────
397
421
  // get — truncation derived from content, not from a stale tag (cursor review)
398
422
  // ──────────────────────────────────────────────────────────────────────────