@remnic/core 10.0.30 → 10.0.32

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 (276) hide show
  1. package/dist/access-admin-ops-surface.js +47 -46
  2. package/dist/access-authorization-probe.js +48 -47
  3. package/dist/access-boundary.js +47 -46
  4. package/dist/access-cli.js +107 -107
  5. package/dist/access-extraction-force-flush.d.ts.map +1 -1
  6. package/dist/access-extraction-force-flush.js +47 -46
  7. package/dist/access-http-briefing.js +48 -47
  8. package/dist/access-http-query.js +49 -48
  9. package/dist/access-http.js +65 -64
  10. package/dist/access-identity-continuity-surface.js +47 -46
  11. package/dist/access-lcm-surface.js +47 -46
  12. package/dist/access-mcp.js +57 -56
  13. package/dist/access-namespace-preflight.js +47 -46
  14. package/dist/access-observe-write-surface.d.ts.map +1 -1
  15. package/dist/access-observe-write-surface.js +47 -46
  16. package/dist/access-offline-manifest.js +4 -4
  17. package/dist/access-operations-batch.js +48 -47
  18. package/dist/access-operations.js +55 -54
  19. package/dist/access-recall-concurrency.js +47 -46
  20. package/dist/access-recall-diagnostics.js +2 -2
  21. package/dist/access-recall-response.js +47 -46
  22. package/dist/access-recall-surface.js +47 -46
  23. package/dist/access-schema.d.ts +47 -47
  24. package/dist/access-service.js +47 -46
  25. package/dist/access-surface-catalog.js +49 -48
  26. package/dist/access-surface-catalog.js.map +1 -1
  27. package/dist/active-recall.js +20 -20
  28. package/dist/briefing.js +21 -21
  29. package/dist/buffer-turn-helpers.d.ts +20 -0
  30. package/dist/buffer-turn-helpers.d.ts.map +1 -1
  31. package/dist/buffer-turn-helpers.js +11 -3
  32. package/dist/buffer-turn.d.ts +50 -0
  33. package/dist/buffer-turn.d.ts.map +1 -0
  34. package/dist/buffer-turn.js +1 -0
  35. package/dist/buffer-turn.js.map +1 -0
  36. package/dist/buffer.d.ts +13 -1
  37. package/dist/buffer.d.ts.map +1 -1
  38. package/dist/buffer.js +4 -4
  39. package/dist/causal-consolidation.js +26 -26
  40. package/dist/{chunk-BIE3ZH3N.js → chunk-2IXEKMBJ.js} +143 -112
  41. package/dist/chunk-2IXEKMBJ.js.map +1 -0
  42. package/dist/{chunk-YGVZ4QOZ.js → chunk-3CRE3UZI.js} +2 -2
  43. package/dist/{chunk-YZTFQBYY.js → chunk-3GOPAWA7.js} +3 -3
  44. package/dist/{chunk-NAPHQ2MG.js → chunk-3IDNKOCE.js} +2 -2
  45. package/dist/{chunk-PYCTZ2HX.js → chunk-3VYNGM5A.js} +2 -2
  46. package/dist/{chunk-2XVLY424.js → chunk-42MM5DKK.js} +2 -2
  47. package/dist/{chunk-CKR7LXEK.js → chunk-464QR7WO.js} +255 -63
  48. package/dist/chunk-464QR7WO.js.map +1 -0
  49. package/dist/{chunk-3IXNL6SK.js → chunk-4ZTVOECF.js} +4 -4
  50. package/dist/{chunk-ETZUIRCI.js → chunk-53GYS3GG.js} +2 -2
  51. package/dist/{chunk-ZXTAHSQU.js → chunk-5GPHJ333.js} +2 -2
  52. package/dist/{chunk-AUYFUBBE.js → chunk-5HJCZ7SB.js} +4 -4
  53. package/dist/{chunk-52II7PB6.js → chunk-645WOU5I.js} +4 -4
  54. package/dist/{chunk-2WDMUQOH.js → chunk-64IO6ZEE.js} +2 -2
  55. package/dist/{chunk-OIIAIY7J.js → chunk-7SXUGYPE.js} +3 -3
  56. package/dist/{chunk-74IN6PV5.js → chunk-7WWITD3H.js} +4 -4
  57. package/dist/{chunk-7FZ4YVOH.js → chunk-A5ZY537U.js} +2 -2
  58. package/dist/{chunk-LDXNKEYB.js → chunk-A6PKEU7T.js} +1 -1
  59. package/dist/chunk-A6PKEU7T.js.map +1 -0
  60. package/dist/{chunk-VLBFSD7B.js → chunk-APRGEZQN.js} +2 -2
  61. package/dist/{chunk-XNROYP5E.js → chunk-AQ5XLA36.js} +2 -2
  62. package/dist/{chunk-K2REHR42.js → chunk-BDHYRMJC.js} +2 -2
  63. package/dist/{chunk-GQ7VWY6N.js → chunk-BQ6DGL6A.js} +2 -2
  64. package/dist/{chunk-4OE4UE2Y.js → chunk-D3EXT5KG.js} +2 -2
  65. package/dist/{chunk-MROA6OFU.js → chunk-DGBWPSM6.js} +2 -2
  66. package/dist/{chunk-NOMHXZD7.js → chunk-DNZ2CWPG.js} +2 -2
  67. package/dist/{chunk-HG2VVIKI.js → chunk-DZBMASSI.js} +12 -12
  68. package/dist/{chunk-NB2YX6X2.js → chunk-EXYDKAR6.js} +5 -5
  69. package/dist/{chunk-V4FI2TG6.js → chunk-F5FZ7DB4.js} +2 -2
  70. package/dist/{chunk-IY7DGT2Z.js → chunk-GDPTMK5V.js} +2 -2
  71. package/dist/{chunk-27OJ5G3D.js → chunk-GJBSEMC5.js} +7 -7
  72. package/dist/{chunk-MMBLOJJB.js → chunk-HMON55NJ.js} +85 -44
  73. package/dist/chunk-HMON55NJ.js.map +1 -0
  74. package/dist/{chunk-C2QVDLQV.js → chunk-HNTB7NIE.js} +2 -2
  75. package/dist/{chunk-4HNINU7Q.js → chunk-HSPEVXT5.js} +42 -42
  76. package/dist/{chunk-4QPW6JVI.js → chunk-ID2PLENW.js} +2 -2
  77. package/dist/{chunk-FN6OFDBZ.js → chunk-ID62FNER.js} +2 -2
  78. package/dist/{chunk-GSKW64NB.js → chunk-J6SZXAQ2.js} +2 -2
  79. package/dist/{chunk-3CHHQXAR.js → chunk-JTACUJP3.js} +2 -2
  80. package/dist/{chunk-3SN2D43X.js → chunk-K6RQ2KOX.js} +2 -2
  81. package/dist/{chunk-GWB7ZD2A.js → chunk-K6YJGWJP.js} +2 -2
  82. package/dist/{chunk-OANSZGAG.js → chunk-KFR343VH.js} +2 -2
  83. package/dist/{chunk-WC3V7HHP.js → chunk-KJZKO2M6.js} +2 -1
  84. package/dist/chunk-KJZKO2M6.js.map +1 -0
  85. package/dist/{chunk-T5IF2ZCE.js → chunk-KZMRMKC7.js} +81 -2
  86. package/dist/chunk-KZMRMKC7.js.map +1 -0
  87. package/dist/{chunk-NPO4ZQFY.js → chunk-LDXS746V.js} +3 -3
  88. package/dist/{chunk-UTXYOWDR.js → chunk-LGR54NYT.js} +3 -3
  89. package/dist/{chunk-UTXYOWDR.js.map → chunk-LGR54NYT.js.map} +1 -1
  90. package/dist/{chunk-DDLRKPR2.js → chunk-NKW27NU3.js} +2 -2
  91. package/dist/{chunk-4HYP4OKH.js → chunk-NU247WVX.js} +2 -2
  92. package/dist/{chunk-RRJ462HP.js → chunk-O6YJI5VX.js} +2 -2
  93. package/dist/{chunk-WYLBEJQI.js → chunk-OCWNT322.js} +4 -4
  94. package/dist/{chunk-UUYAW3JH.js → chunk-OIKLZCJD.js} +2 -2
  95. package/dist/{chunk-IO2UQVR2.js → chunk-OTWZXOJI.js} +2 -2
  96. package/dist/{chunk-OXYXMGRH.js → chunk-PGHYQMKZ.js} +11 -11
  97. package/dist/{chunk-LDEKVBVO.js → chunk-PZWW6MDE.js} +2 -2
  98. package/dist/{chunk-TFA6HPOA.js → chunk-QCP75JGO.js} +5 -5
  99. package/dist/{chunk-M236YHUH.js → chunk-RILIWZA6.js} +3 -3
  100. package/dist/{chunk-7VB3Y5OL.js → chunk-RRYN5FFC.js} +4 -4
  101. package/dist/{chunk-PZEADMX4.js → chunk-RU6WB55E.js} +9 -9
  102. package/dist/{chunk-VARNSLUW.js → chunk-SGII36L6.js} +2 -2
  103. package/dist/{chunk-KFKFK6G6.js → chunk-TB2J4PBY.js} +3 -3
  104. package/dist/{chunk-WQIYGYY6.js → chunk-TEUPXKC5.js} +2 -2
  105. package/dist/{chunk-VEB7NEON.js → chunk-U4BNX4R2.js} +3 -3
  106. package/dist/{chunk-7HFTCBCZ.js → chunk-UBBZFODO.js} +2 -2
  107. package/dist/{chunk-654GT5UP.js → chunk-UZDOPJ2P.js} +2 -2
  108. package/dist/{chunk-D4RV54HH.js → chunk-VAPVRDC4.js} +2 -2
  109. package/dist/{chunk-OXX4ORRL.js → chunk-W7X7XT7Z.js} +15 -15
  110. package/dist/{chunk-5NPZFXQH.js → chunk-WK7GFAQ2.js} +2 -2
  111. package/dist/{chunk-G6DAE2LT.js → chunk-WPCK6EJ2.js} +2 -2
  112. package/dist/{chunk-VKQI47DJ.js → chunk-Y7427SL7.js} +4 -4
  113. package/dist/{chunk-ZCRDYQL6.js → chunk-YGBWSKBD.js} +2 -2
  114. package/dist/{chunk-NCPR2FOJ.js → chunk-YXWLQHAW.js} +2 -2
  115. package/dist/{chunk-UM73Q46J.js → chunk-ZEMBRSKK.js} +2 -2
  116. package/dist/{chunk-TTIEXXL3.js → chunk-ZGP2XB4S.js} +16 -16
  117. package/dist/{chunk-UVUBLLM3.js → chunk-ZY4S5WMQ.js} +2 -2
  118. package/dist/cli.js +83 -82
  119. package/dist/coding/export-okf-codegraph.js +20 -20
  120. package/dist/compounding/engine.js +22 -22
  121. package/dist/config.js +20 -20
  122. package/dist/connectors/codex-materialize-runner.js +21 -21
  123. package/dist/connectors/index.js +21 -21
  124. package/dist/convergence-refresh.js +23 -23
  125. package/dist/conversation-index/backend.js +2 -2
  126. package/dist/corpus-watermark.js +23 -23
  127. package/dist/entity-retrieval.js +22 -22
  128. package/dist/event-order-recall.js +3 -3
  129. package/dist/external-wiki-access.js +48 -47
  130. package/dist/extraction.js +31 -31
  131. package/dist/harmonic-retrieval.js +21 -21
  132. package/dist/index.js +126 -126
  133. package/dist/lcm/engine.js +2 -2
  134. package/dist/lcm/index.js +2 -2
  135. package/dist/location/index.js +23 -23
  136. package/dist/maintenance/memory-governance.js +21 -21
  137. package/dist/maintenance/rebuild-memory-lifecycle-ledger.js +21 -21
  138. package/dist/maintenance/rebuild-memory-projection-runner.js +23 -23
  139. package/dist/maintenance/rebuild-memory-projection.js +22 -22
  140. package/dist/memory-browse-operations.js +48 -47
  141. package/dist/namespaces/migrate.js +22 -22
  142. package/dist/namespaces/scope-profiles.d.ts +1 -0
  143. package/dist/namespaces/scope-profiles.d.ts.map +1 -1
  144. package/dist/namespaces/search.js +9 -9
  145. package/dist/namespaces/storage.js +21 -21
  146. package/dist/offline-sync-impression-drain.js +3 -3
  147. package/dist/operator-doctor-corpus.js +24 -24
  148. package/dist/operator-toolkit.js +32 -32
  149. package/dist/orchestration/maintenance.js +33 -33
  150. package/dist/orchestration/session-context.d.ts +6 -0
  151. package/dist/orchestration/session-context.d.ts.map +1 -1
  152. package/dist/orchestration/turn-ingestion.d.ts +35 -1
  153. package/dist/orchestration/turn-ingestion.d.ts.map +1 -1
  154. package/dist/orchestrator.d.ts +2 -32
  155. package/dist/orchestrator.d.ts.map +1 -1
  156. package/dist/orchestrator.js +107 -107
  157. package/dist/recall-explain-renderer.js +3 -3
  158. package/dist/recall-navigate-access.js +2 -2
  159. package/dist/recall-navigate-disclosure.js +2 -2
  160. package/dist/recall-navigate.js +2 -2
  161. package/dist/recall-navigation-operations.js +48 -47
  162. package/dist/recall-navigation.js +47 -46
  163. package/dist/recall-xray-cli.js +4 -4
  164. package/dist/recall-xray-renderer.js +3 -3
  165. package/dist/recall-xray.js +2 -2
  166. package/dist/relay/mission.d.ts +2 -2
  167. package/dist/resume-bundles.js +20 -20
  168. package/dist/schemas.d.ts +4 -4
  169. package/dist/search/factory.js +8 -8
  170. package/dist/search/index.js +13 -13
  171. package/dist/search/lancedb-backend.js +2 -2
  172. package/dist/search/meilisearch-backend.js +2 -2
  173. package/dist/search/orama-backend.js +2 -2
  174. package/dist/semantic-consolidation.js +22 -22
  175. package/dist/semantic-rule-promotion.js +21 -21
  176. package/dist/semantic-rule-verifier.js +21 -21
  177. package/dist/source-agent-qualifier.js +24 -24
  178. package/dist/standup/build.js +21 -21
  179. package/dist/storage.js +20 -20
  180. package/dist/support-passport/contracts.d.ts +6 -6
  181. package/dist/support-passport/grant-contracts.d.ts +4 -4
  182. package/dist/support-passport/index.js +50 -49
  183. package/dist/transfer/export-okf.js +21 -21
  184. package/dist/types.d.ts +3 -17
  185. package/dist/types.d.ts.map +1 -1
  186. package/dist/types.js +1 -1
  187. package/dist/verified-recall.js +21 -21
  188. package/dist/who-knows-cli.js +22 -22
  189. package/dist/who-knows.js +21 -21
  190. package/package.json +2 -2
  191. package/src/access-extraction-force-flush.ts +37 -25
  192. package/src/access-observe-acceptance-boundary.test.ts +172 -0
  193. package/src/access-observe-replay-durability.test.ts +2212 -0
  194. package/src/access-observe-write-surface.ts +36 -41
  195. package/src/access-service-observe-lcm-parity.test.ts +63 -39
  196. package/src/access-service-observe-scope.test.ts +3 -2
  197. package/src/buffer-turn-helpers.ts +120 -1
  198. package/src/buffer-turn.ts +50 -0
  199. package/src/buffer.ts +115 -49
  200. package/src/namespaces/scope-profiles.ts +1 -1
  201. package/src/orchestration/extraction-run.ts +1 -1
  202. package/src/orchestration/session-context.ts +117 -49
  203. package/src/orchestration/turn-ingestion.ts +313 -9
  204. package/src/orchestrator-flush.test.ts +16 -3
  205. package/src/orchestrator.ts +2 -32
  206. package/src/types.ts +3 -17
  207. package/dist/chunk-BIE3ZH3N.js.map +0 -1
  208. package/dist/chunk-CKR7LXEK.js.map +0 -1
  209. package/dist/chunk-LDXNKEYB.js.map +0 -1
  210. package/dist/chunk-MMBLOJJB.js.map +0 -1
  211. package/dist/chunk-T5IF2ZCE.js.map +0 -1
  212. package/dist/chunk-WC3V7HHP.js.map +0 -1
  213. /package/dist/{chunk-YGVZ4QOZ.js.map → chunk-3CRE3UZI.js.map} +0 -0
  214. /package/dist/{chunk-YZTFQBYY.js.map → chunk-3GOPAWA7.js.map} +0 -0
  215. /package/dist/{chunk-NAPHQ2MG.js.map → chunk-3IDNKOCE.js.map} +0 -0
  216. /package/dist/{chunk-PYCTZ2HX.js.map → chunk-3VYNGM5A.js.map} +0 -0
  217. /package/dist/{chunk-2XVLY424.js.map → chunk-42MM5DKK.js.map} +0 -0
  218. /package/dist/{chunk-3IXNL6SK.js.map → chunk-4ZTVOECF.js.map} +0 -0
  219. /package/dist/{chunk-ETZUIRCI.js.map → chunk-53GYS3GG.js.map} +0 -0
  220. /package/dist/{chunk-ZXTAHSQU.js.map → chunk-5GPHJ333.js.map} +0 -0
  221. /package/dist/{chunk-AUYFUBBE.js.map → chunk-5HJCZ7SB.js.map} +0 -0
  222. /package/dist/{chunk-52II7PB6.js.map → chunk-645WOU5I.js.map} +0 -0
  223. /package/dist/{chunk-2WDMUQOH.js.map → chunk-64IO6ZEE.js.map} +0 -0
  224. /package/dist/{chunk-OIIAIY7J.js.map → chunk-7SXUGYPE.js.map} +0 -0
  225. /package/dist/{chunk-74IN6PV5.js.map → chunk-7WWITD3H.js.map} +0 -0
  226. /package/dist/{chunk-7FZ4YVOH.js.map → chunk-A5ZY537U.js.map} +0 -0
  227. /package/dist/{chunk-VLBFSD7B.js.map → chunk-APRGEZQN.js.map} +0 -0
  228. /package/dist/{chunk-XNROYP5E.js.map → chunk-AQ5XLA36.js.map} +0 -0
  229. /package/dist/{chunk-K2REHR42.js.map → chunk-BDHYRMJC.js.map} +0 -0
  230. /package/dist/{chunk-GQ7VWY6N.js.map → chunk-BQ6DGL6A.js.map} +0 -0
  231. /package/dist/{chunk-4OE4UE2Y.js.map → chunk-D3EXT5KG.js.map} +0 -0
  232. /package/dist/{chunk-MROA6OFU.js.map → chunk-DGBWPSM6.js.map} +0 -0
  233. /package/dist/{chunk-NOMHXZD7.js.map → chunk-DNZ2CWPG.js.map} +0 -0
  234. /package/dist/{chunk-HG2VVIKI.js.map → chunk-DZBMASSI.js.map} +0 -0
  235. /package/dist/{chunk-NB2YX6X2.js.map → chunk-EXYDKAR6.js.map} +0 -0
  236. /package/dist/{chunk-V4FI2TG6.js.map → chunk-F5FZ7DB4.js.map} +0 -0
  237. /package/dist/{chunk-IY7DGT2Z.js.map → chunk-GDPTMK5V.js.map} +0 -0
  238. /package/dist/{chunk-27OJ5G3D.js.map → chunk-GJBSEMC5.js.map} +0 -0
  239. /package/dist/{chunk-C2QVDLQV.js.map → chunk-HNTB7NIE.js.map} +0 -0
  240. /package/dist/{chunk-4HNINU7Q.js.map → chunk-HSPEVXT5.js.map} +0 -0
  241. /package/dist/{chunk-4QPW6JVI.js.map → chunk-ID2PLENW.js.map} +0 -0
  242. /package/dist/{chunk-FN6OFDBZ.js.map → chunk-ID62FNER.js.map} +0 -0
  243. /package/dist/{chunk-GSKW64NB.js.map → chunk-J6SZXAQ2.js.map} +0 -0
  244. /package/dist/{chunk-3CHHQXAR.js.map → chunk-JTACUJP3.js.map} +0 -0
  245. /package/dist/{chunk-3SN2D43X.js.map → chunk-K6RQ2KOX.js.map} +0 -0
  246. /package/dist/{chunk-GWB7ZD2A.js.map → chunk-K6YJGWJP.js.map} +0 -0
  247. /package/dist/{chunk-OANSZGAG.js.map → chunk-KFR343VH.js.map} +0 -0
  248. /package/dist/{chunk-NPO4ZQFY.js.map → chunk-LDXS746V.js.map} +0 -0
  249. /package/dist/{chunk-DDLRKPR2.js.map → chunk-NKW27NU3.js.map} +0 -0
  250. /package/dist/{chunk-4HYP4OKH.js.map → chunk-NU247WVX.js.map} +0 -0
  251. /package/dist/{chunk-RRJ462HP.js.map → chunk-O6YJI5VX.js.map} +0 -0
  252. /package/dist/{chunk-WYLBEJQI.js.map → chunk-OCWNT322.js.map} +0 -0
  253. /package/dist/{chunk-UUYAW3JH.js.map → chunk-OIKLZCJD.js.map} +0 -0
  254. /package/dist/{chunk-IO2UQVR2.js.map → chunk-OTWZXOJI.js.map} +0 -0
  255. /package/dist/{chunk-OXYXMGRH.js.map → chunk-PGHYQMKZ.js.map} +0 -0
  256. /package/dist/{chunk-LDEKVBVO.js.map → chunk-PZWW6MDE.js.map} +0 -0
  257. /package/dist/{chunk-TFA6HPOA.js.map → chunk-QCP75JGO.js.map} +0 -0
  258. /package/dist/{chunk-M236YHUH.js.map → chunk-RILIWZA6.js.map} +0 -0
  259. /package/dist/{chunk-7VB3Y5OL.js.map → chunk-RRYN5FFC.js.map} +0 -0
  260. /package/dist/{chunk-PZEADMX4.js.map → chunk-RU6WB55E.js.map} +0 -0
  261. /package/dist/{chunk-VARNSLUW.js.map → chunk-SGII36L6.js.map} +0 -0
  262. /package/dist/{chunk-KFKFK6G6.js.map → chunk-TB2J4PBY.js.map} +0 -0
  263. /package/dist/{chunk-WQIYGYY6.js.map → chunk-TEUPXKC5.js.map} +0 -0
  264. /package/dist/{chunk-VEB7NEON.js.map → chunk-U4BNX4R2.js.map} +0 -0
  265. /package/dist/{chunk-7HFTCBCZ.js.map → chunk-UBBZFODO.js.map} +0 -0
  266. /package/dist/{chunk-654GT5UP.js.map → chunk-UZDOPJ2P.js.map} +0 -0
  267. /package/dist/{chunk-D4RV54HH.js.map → chunk-VAPVRDC4.js.map} +0 -0
  268. /package/dist/{chunk-OXX4ORRL.js.map → chunk-W7X7XT7Z.js.map} +0 -0
  269. /package/dist/{chunk-5NPZFXQH.js.map → chunk-WK7GFAQ2.js.map} +0 -0
  270. /package/dist/{chunk-G6DAE2LT.js.map → chunk-WPCK6EJ2.js.map} +0 -0
  271. /package/dist/{chunk-VKQI47DJ.js.map → chunk-Y7427SL7.js.map} +0 -0
  272. /package/dist/{chunk-ZCRDYQL6.js.map → chunk-YGBWSKBD.js.map} +0 -0
  273. /package/dist/{chunk-NCPR2FOJ.js.map → chunk-YXWLQHAW.js.map} +0 -0
  274. /package/dist/{chunk-UM73Q46J.js.map → chunk-ZEMBRSKK.js.map} +0 -0
  275. /package/dist/{chunk-TTIEXXL3.js.map → chunk-ZGP2XB4S.js.map} +0 -0
  276. /package/dist/{chunk-UVUBLLM3.js.map → chunk-ZY4S5WMQ.js.map} +0 -0
@@ -13,7 +13,7 @@ import {
13
13
  import {
14
14
  ActivityStore,
15
15
  MaintenanceScheduler
16
- } from "./chunk-27OJ5G3D.js";
16
+ } from "./chunk-GJBSEMC5.js";
17
17
  import {
18
18
  runPeerProfileReasoner
19
19
  } from "./chunk-I74SUMNI.js";
@@ -22,7 +22,7 @@ import {
22
22
  } from "./chunk-VZAKYDMJ.js";
23
23
  import {
24
24
  LcmEngine
25
- } from "./chunk-VKQI47DJ.js";
25
+ } from "./chunk-Y7427SL7.js";
26
26
  import {
27
27
  chunkTranscriptEntries
28
28
  } from "./chunk-TECVW3JP.js";
@@ -32,7 +32,7 @@ import {
32
32
  import {
33
33
  CompoundingEngine,
34
34
  defaultTierMigrationCycleBudget
35
- } from "./chunk-KFKFK6G6.js";
35
+ } from "./chunk-TB2J4PBY.js";
36
36
  import {
37
37
  SharedContextManager
38
38
  } from "./chunk-RBGRQEW3.js";
@@ -74,6 +74,11 @@ import {
74
74
  import {
75
75
  SessionObserverState
76
76
  } from "./chunk-ODZKV2F7.js";
77
+ import {
78
+ RerankCache,
79
+ reorderByRankedKeys,
80
+ rerankLocalOrNoop
81
+ } from "./chunk-LUDXM7MD.js";
77
82
  import {
78
83
  buildResponseGuidanceRecallSection,
79
84
  shouldRecallResponseGuidance
@@ -108,16 +113,6 @@ import {
108
113
  import {
109
114
  RelevanceStore
110
115
  } from "./chunk-X7J56GPG.js";
111
- import {
112
- RerankCache,
113
- reorderByRankedKeys,
114
- rerankLocalOrNoop
115
- } from "./chunk-LUDXM7MD.js";
116
- import {
117
- StateViewAnchorTracker,
118
- filterRecentScanMemories,
119
- stateViewPacketActive
120
- } from "./chunk-G2DF5MI7.js";
121
116
  import {
122
117
  indexStateViewAnnotatedResults,
123
118
  resolveRecallStateViewActive
@@ -125,6 +120,11 @@ import {
125
120
  import {
126
121
  applyRecallStateViews
127
122
  } from "./chunk-DBB5JPSL.js";
123
+ import {
124
+ StateViewAnchorTracker,
125
+ filterRecentScanMemories,
126
+ stateViewPacketActive
127
+ } from "./chunk-G2DF5MI7.js";
128
128
  import {
129
129
  reorderRecallResultsWithMmr
130
130
  } from "./chunk-IIK2PD3F.js";
@@ -154,6 +154,9 @@ import {
154
154
  import {
155
155
  runLiveConnectorsOnce
156
156
  } from "./chunk-YHLWPYHT.js";
157
+ import {
158
+ classifyMemoryKind
159
+ } from "./chunk-YAZNBMNF.js";
157
160
  import {
158
161
  deriveHarmonicRecords,
159
162
  harmonicEntityReferenceMatches,
@@ -161,15 +164,12 @@ import {
161
164
  normalizedHarmonicEntityIdentity,
162
165
  persistHarmonicRecords
163
166
  } from "./chunk-LQ5SS4OP.js";
164
- import {
165
- classifyMemoryKind
166
- } from "./chunk-YAZNBMNF.js";
167
167
  import {
168
168
  scoreEvidencePathDetail
169
169
  } from "./chunk-XXSOVESA.js";
170
170
  import {
171
171
  ExtractionEngine
172
- } from "./chunk-2XVLY424.js";
172
+ } from "./chunk-42MM5DKK.js";
173
173
  import {
174
174
  buildFocusedListRecallSection,
175
175
  shouldRecallFocusedListEvidence
@@ -189,7 +189,10 @@ import {
189
189
  } from "./chunk-AN3G5DZH.js";
190
190
  import {
191
191
  buildEventOrderRecallSection
192
- } from "./chunk-52II7PB6.js";
192
+ } from "./chunk-645WOU5I.js";
193
+ import {
194
+ shouldRecallEventOrderEvidence
195
+ } from "./chunk-BUYVPUEM.js";
193
196
  import {
194
197
  pickFactEventTimeAnchor,
195
198
  resolveFactEventTime
@@ -201,25 +204,22 @@ import {
201
204
  buildEntityRecallSection,
202
205
  entityRecentTranscriptLookbackHours,
203
206
  readRecentEntityTranscriptEntries
204
- } from "./chunk-PZEADMX4.js";
207
+ } from "./chunk-RU6WB55E.js";
205
208
  import {
206
209
  planEpisodeWindowsWithFallback
207
210
  } from "./chunk-T3GIETKV.js";
208
- import {
209
- shouldRecallEventOrderEvidence
210
- } from "./chunk-BUYVPUEM.js";
211
211
  import {
212
212
  tryDirectAnswer
213
213
  } from "./chunk-VY47VI2T.js";
214
214
  import {
215
215
  EmbeddingFallback
216
216
  } from "./chunk-EUCYTCFP.js";
217
+ import {
218
+ refreshConvergedNamespaces
219
+ } from "./chunk-AQ5XLA36.js";
217
220
  import {
218
221
  formatDaySummaryMemories
219
222
  } from "./chunk-7G5NTS7F.js";
220
- import {
221
- refreshConvergedNamespaces
222
- } from "./chunk-XNROYP5E.js";
223
223
  import {
224
224
  builtInConnectorPackageSpecifier,
225
225
  ensureBuiltInWearableConnectors,
@@ -228,7 +228,7 @@ import {
228
228
  runTimelinePublishCli,
229
229
  screenCandidateFact,
230
230
  summarizeVaultPublish
231
- } from "./chunk-4HNINU7Q.js";
231
+ } from "./chunk-HSPEVXT5.js";
232
232
  import {
233
233
  RoutingRulesStore
234
234
  } from "./chunk-TBUEE7XF.js";
@@ -238,14 +238,14 @@ import {
238
238
  import {
239
239
  compareVerifiedEpisodeResults,
240
240
  searchVerifiedEpisodes
241
- } from "./chunk-NOMHXZD7.js";
241
+ } from "./chunk-DNZ2CWPG.js";
242
242
  import {
243
243
  ThreadingManager
244
244
  } from "./chunk-R7WYAXPO.js";
245
245
  import {
246
246
  compareVerifiedSemanticRuleResults,
247
247
  searchVerifiedSemanticRules
248
- } from "./chunk-ZXTAHSQU.js";
248
+ } from "./chunk-5GPHJ333.js";
249
249
  import {
250
250
  searchWorkProductLedgerEntries
251
251
  } from "./chunk-B2NXOVZN.js";
@@ -258,10 +258,10 @@ import {
258
258
  import {
259
259
  runNamespaceMaintenanceFanout,
260
260
  summarizeNamespaceMaintenanceHealth
261
- } from "./chunk-HG2VVIKI.js";
261
+ } from "./chunk-DZBMASSI.js";
262
262
  import {
263
263
  planNamespaceMaintenance
264
- } from "./chunk-7VB3Y5OL.js";
264
+ } from "./chunk-RRYN5FFC.js";
265
265
  import {
266
266
  isAboveImportanceThreshold,
267
267
  scoreImportance
@@ -290,7 +290,7 @@ import {
290
290
  materializeAfterSemanticConsolidation,
291
291
  parseConsolidationResponse,
292
292
  parseOperatorAwareConsolidationResponse
293
- } from "./chunk-OANSZGAG.js";
293
+ } from "./chunk-KFR343VH.js";
294
294
  import {
295
295
  semanticChunkContent
296
296
  } from "./chunk-2GBFKHBZ.js";
@@ -299,7 +299,7 @@ import {
299
299
  } from "./chunk-6TBIWIAG.js";
300
300
  import {
301
301
  SmartBuffer
302
- } from "./chunk-MMBLOJJB.js";
302
+ } from "./chunk-HMON55NJ.js";
303
303
  import {
304
304
  buildRecallQueryPolicy
305
305
  } from "./chunk-C6WMSXCJ.js";
@@ -367,7 +367,7 @@ import {
367
367
  } from "./chunk-QW27DOHG.js";
368
368
  import {
369
369
  MeetingsInputError
370
- } from "./chunk-OXX4ORRL.js";
370
+ } from "./chunk-W7X7XT7Z.js";
371
371
  import {
372
372
  WearablesInputError,
373
373
  describeErrorForOperator
@@ -385,7 +385,7 @@ import {
385
385
  } from "./chunk-YYEOR4XN.js";
386
386
  import {
387
387
  NamespaceCatalog
388
- } from "./chunk-4HYP4OKH.js";
388
+ } from "./chunk-NU247WVX.js";
389
389
  import {
390
390
  RecallResultFormatter,
391
391
  SessionContextCoordinator,
@@ -394,7 +394,7 @@ import {
394
394
  detectPassiveCorrections,
395
395
  renderSessionExperiencePreview,
396
396
  scoreSessionExperienceForPrompt
397
- } from "./chunk-BIE3ZH3N.js";
397
+ } from "./chunk-2IXEKMBJ.js";
398
398
  import {
399
399
  importCapsule
400
400
  } from "./chunk-ISMZ5UNE.js";
@@ -423,7 +423,7 @@ import {
423
423
  } from "./chunk-DLH3ECZP.js";
424
424
  import {
425
425
  buildXraySnapshot
426
- } from "./chunk-4QPW6JVI.js";
426
+ } from "./chunk-ID2PLENW.js";
427
427
  import {
428
428
  objectiveStateStoreOverrideForNamespace,
429
429
  searchObjectiveStateSnapshots
@@ -437,7 +437,7 @@ import {
437
437
  } from "./chunk-BDLOEODO.js";
438
438
  import {
439
439
  searchHarmonicRetrieval
440
- } from "./chunk-YGVZ4QOZ.js";
440
+ } from "./chunk-3CRE3UZI.js";
441
441
  import {
442
442
  ProfilingCollector
443
443
  } from "./chunk-DOWACHYO.js";
@@ -460,7 +460,7 @@ import {
460
460
  } from "./chunk-NVKO5YKP.js";
461
461
  import {
462
462
  NamespaceStorageRouter
463
- } from "./chunk-VLBFSD7B.js";
463
+ } from "./chunk-APRGEZQN.js";
464
464
  import {
465
465
  pruneOrphanCueAnchors
466
466
  } from "./chunk-LXATZLSC.js";
@@ -470,14 +470,17 @@ import {
470
470
  import {
471
471
  GraphEdgeAppendError
472
472
  } from "./chunk-GKCXTSFF.js";
473
+ import {
474
+ LocalLlmClient
475
+ } from "./chunk-3EJQXF3B.js";
473
476
  import {
474
477
  buildChainFollowupGenerator
475
- } from "./chunk-GWB7ZD2A.js";
478
+ } from "./chunk-K6YJGWJP.js";
476
479
  import {
477
480
  ExtractionDeadlineError,
478
481
  ExtractionRunCoordinator,
479
482
  classifyExtractionOrigin
480
- } from "./chunk-UTXYOWDR.js";
483
+ } from "./chunk-LGR54NYT.js";
481
484
  import {
482
485
  ARTIFACT_STATUS_CACHE_TTL_MS,
483
486
  BulkImportBatchPartialFailureError,
@@ -525,8 +528,9 @@ import {
525
528
  planRecallMode
526
529
  } from "./chunk-CSAKJVXW.js";
527
530
  import {
528
- LocalLlmClient
529
- } from "./chunk-3EJQXF3B.js";
531
+ bufferTurnsEqual,
532
+ groupTurnsByExtractionScope
533
+ } from "./chunk-KZMRMKC7.js";
530
534
  import {
531
535
  decideLifecycleTransition,
532
536
  resolveLifecycleState
@@ -570,7 +574,10 @@ import {
570
574
  reconstructFusionInputs,
571
575
  selfDeps,
572
576
  serializeFusionDay
573
- } from "./chunk-TTIEXXL3.js";
577
+ } from "./chunk-ZGP2XB4S.js";
578
+ import {
579
+ buildRetiredFactTombstoneInputs
580
+ } from "./chunk-TRMJ6BYC.js";
574
581
  import {
575
582
  bodyIsEscaped,
576
583
  decodeTranscriptBody,
@@ -581,18 +588,15 @@ import {
581
588
  saveSpeakerRegistry,
582
589
  speakerRegistryKey
583
590
  } from "./chunk-UHVXE24Y.js";
584
- import {
585
- buildRetiredFactTombstoneInputs
586
- } from "./chunk-TRMJ6BYC.js";
587
591
  import {
588
592
  NamespaceSearchRouter,
589
593
  namespaceCollectionName
590
- } from "./chunk-7HFTCBCZ.js";
594
+ } from "./chunk-UBBZFODO.js";
591
595
  import {
592
596
  createConversationIndexRuntime,
593
597
  createSearchBackend,
594
598
  isSearchBackendEnabled
595
- } from "./chunk-OXYXMGRH.js";
599
+ } from "./chunk-PGHYQMKZ.js";
596
600
  import {
597
601
  NoopSearchBackend
598
602
  } from "./chunk-CYEPCZN5.js";
@@ -662,6 +666,13 @@ import {
662
666
  isValidAsOf,
663
667
  isValidityExpiredNow
664
668
  } from "./chunk-6CIAGZ6X.js";
669
+ import {
670
+ FallbackLlmClient,
671
+ gatewayTaskChainOptions
672
+ } from "./chunk-UIDWASOS.js";
673
+ import {
674
+ fallbackLlmRuntimeContextFromConfig
675
+ } from "./chunk-CU5TILGD.js";
665
676
  import {
666
677
  buildQmdRecallCacheKey,
667
678
  getCachedQmdRecall,
@@ -671,13 +682,6 @@ import {
671
682
  isUntrustedOrigin,
672
683
  parseOriginClass
673
684
  } from "./chunk-23G5P7TA.js";
674
- import {
675
- FallbackLlmClient,
676
- gatewayTaskChainOptions
677
- } from "./chunk-UIDWASOS.js";
678
- import {
679
- fallbackLlmRuntimeContextFromConfig
680
- } from "./chunk-CU5TILGD.js";
681
685
  import {
682
686
  createBoundedCoreSectionRunner,
683
687
  createRecallSectionMetricRecorder,
@@ -695,7 +699,7 @@ import {
695
699
  } from "./chunk-PJKTFXE2.js";
696
700
  import {
697
701
  confidenceTier
698
- } from "./chunk-LDXNKEYB.js";
702
+ } from "./chunk-A6PKEU7T.js";
699
703
  import {
700
704
  extractJsonCandidates
701
705
  } from "./chunk-YBA52OKG.js";
@@ -737,7 +741,11 @@ import {
737
741
  getConfiguredNamespaces,
738
742
  resolveNamespaceFromStorageDir,
739
743
  resolveScopePlan
740
- } from "./chunk-ETZUIRCI.js";
744
+ } from "./chunk-53GYS3GG.js";
745
+ import {
746
+ hasExplicitNamespacePolicy,
747
+ resolveScopeProfilePlan
748
+ } from "./chunk-KJZKO2M6.js";
741
749
  import {
742
750
  attachCitation,
743
751
  citationTemplateIsDetectable,
@@ -787,6 +795,7 @@ import {
787
795
  } from "./chunk-P7FMDTKL.js";
788
796
  import {
789
797
  canReadNamespace,
798
+ canWriteNamespace,
790
799
  defaultNamespaceForPrincipal,
791
800
  resolvePrincipal
792
801
  } from "./chunk-ESG6ITGP.js";
@@ -822,6 +831,7 @@ import {
822
831
  resolveUtilityLearningCapabilities
823
832
  } from "./chunk-C5LWPYS3.js";
824
833
  import {
834
+ combineNamespaces,
825
835
  lcmSessionKeyForNamespace,
826
836
  resolveCodingNamespaceOverlay
827
837
  } from "./chunk-3Q3N35W7.js";
@@ -15603,6 +15613,12 @@ var RecallSearchPipelineCoordinator = class {
15603
15613
 
15604
15614
  // src/orchestration/turn-ingestion.ts
15605
15615
  import { createHash as createHash8, randomBytes } from "crypto";
15616
+ var ReplayAdmissionRefusedError = class extends Error {
15617
+ constructor(message) {
15618
+ super(message);
15619
+ this.name = "ReplayAdmissionRefusedError";
15620
+ }
15621
+ };
15606
15622
  function isFlushPlanRecoveryTurn(turn) {
15607
15623
  const provenance = turn.importProvenance;
15608
15624
  if (provenance?.sourceLabel === "OpenClaw flush plan") return true;
@@ -15643,6 +15659,10 @@ var TurnIngestionCoordinator = class {
15643
15659
  const outcome = typeof this.deps.buffer.addTurnWithOutcome === "function" ? await this.deps.buffer.addTurnWithOutcome(bufferKey, turn) : { decision: await this.deps.buffer.addTurn(bufferKey, turn) };
15644
15660
  if (outcome.decision === "keep_buffering") return;
15645
15661
  if (!outcome.extractionTurns) return;
15662
+ if (outcome.extractionTurns.some((turn2) => turn2.acceptedCapture === true)) {
15663
+ this.queueBufferedCaptureScopeGroups(outcome.extractionTurns, bufferKey, {});
15664
+ return;
15665
+ }
15646
15666
  await this.deps.queueBufferedExtraction(
15647
15667
  outcome.extractionTurns,
15648
15668
  "trigger_mode",
@@ -15651,9 +15671,6 @@ var TurnIngestionCoordinator = class {
15651
15671
  }
15652
15672
  async ingestReplayBatch(turns, options = {}) {
15653
15673
  if (!Array.isArray(turns) || turns.length === 0) return;
15654
- if (options.abortSignal?.aborted) {
15655
- throw options.abortSignal.reason instanceof Error ? options.abortSignal.reason : new Error("ingestReplayBatch aborted");
15656
- }
15657
15674
  if (shouldSkipImplicitExtraction(this.deps.config)) {
15658
15675
  log.debug(
15659
15676
  "ingestReplayBatch: skipping implicit extraction because captureMode=explicit"
@@ -15680,6 +15697,12 @@ var TurnIngestionCoordinator = class {
15680
15697
  });
15681
15698
  bySession.set(key, list);
15682
15699
  }
15700
+ if (options.extractionMode === "buffered") {
15701
+ return this.ingestReplayBatchBuffered(bySession, options);
15702
+ }
15703
+ if (options.abortSignal?.aborted) {
15704
+ throw options.abortSignal.reason instanceof Error ? options.abortSignal.reason : new Error("ingestReplayBatch aborted");
15705
+ }
15683
15706
  const replaySlices = [];
15684
15707
  for (const [key, sessionTurns] of bySession.entries()) {
15685
15708
  if (sessionTurns.length === 0) continue;
@@ -15740,6 +15763,81 @@ var TurnIngestionCoordinator = class {
15740
15763
  }
15741
15764
  }
15742
15765
  }
15766
+ /** #3251 buffered capture: durable scope-pinned admission; await settles at durability. */
15767
+ async ingestReplayBatchBuffered(bySession, options) {
15768
+ const resolvedWriteTarget = options.writeNamespaceOverride ?? (resolveNamespaceCapabilities(this.deps.config).namespaces === true ? options.scopeProfileWritePlan?.writeNamespace : this.deps.config.defaultNamespace);
15769
+ if (!resolvedWriteTarget) {
15770
+ throw new ReplayAdmissionRefusedError(
15771
+ "accepted capture requires an explicit storage target (writeNamespaceOverride or scopeProfileWritePlan.writeNamespace)"
15772
+ );
15773
+ }
15774
+ for (const [bufferKey, sessionTurns] of bySession) {
15775
+ if (options.archiveLcm !== false && this.deps.lcmEngine?.enabled) {
15776
+ await this.deps.lcmEngine.observeMessages(
15777
+ bufferKey,
15778
+ sessionTurns.map((turn) => ({
15779
+ role: turn.role,
15780
+ content: turn.content,
15781
+ parts: turn.parts,
15782
+ rawContent: turn.rawContent,
15783
+ sourceFormat: turn.sourceFormat
15784
+ }))
15785
+ );
15786
+ }
15787
+ for (const turn of sessionTurns) {
15788
+ const pinned = { ...turn, acceptedCapture: true, writeNamespaceOverride: resolvedWriteTarget };
15789
+ if (options.codingContext) pinned.codingContext = options.codingContext;
15790
+ if (options.principalOverride) pinned.principalOverride = options.principalOverride;
15791
+ if (options.scopeProfileWritePlan) pinned.scopeProfileWritePlan = options.scopeProfileWritePlan;
15792
+ const outcome = await this.deps.buffer.addTurnBounded(bufferKey, pinned);
15793
+ if (outcome === null) {
15794
+ throw new ReplayAdmissionRefusedError(
15795
+ `durable observe capture refused: extraction buffer at entry capacity for ${bufferKey}`
15796
+ );
15797
+ }
15798
+ if (outcome.decision !== "keep_buffering" && outcome.extractionTurns) {
15799
+ this.queueBufferedCaptureScopeGroups(outcome.extractionTurns, bufferKey, options);
15800
+ }
15801
+ }
15802
+ await this.deps.buffer.flushPendingSave({ throwOnFailure: true });
15803
+ }
15804
+ }
15805
+ /**
15806
+ * Buffer-approved captures skip threshold/dedupe rechecks, not provider retry cooldowns.
15807
+ * Scope and staleness are enforced at the shared queueBufferedExtraction boundary.
15808
+ */
15809
+ queueBufferedCaptureScopeGroups(extractionTurns, bufferKey, options) {
15810
+ for (const group of groupTurnsByExtractionScope(extractionTurns)) {
15811
+ const groupIsAccepted = group.turns.some((turn) => turn.acceptedCapture === true);
15812
+ if (!groupIsAccepted) {
15813
+ void this.deps.queueBufferedExtraction(group.turns, "trigger_mode", {
15814
+ bufferKey,
15815
+ clearMatchingTurns: true
15816
+ }).catch((err) => log.error(`native trigger extraction failed: ${err}`));
15817
+ continue;
15818
+ }
15819
+ const extraction = new Promise((resolve, reject) => {
15820
+ void this.deps.queueBufferedExtraction(group.turns, "trigger_mode", {
15821
+ bufferKey,
15822
+ clearBufferAfterExtraction: true,
15823
+ clearMatchingTurns: true,
15824
+ skipDedupeCheck: true,
15825
+ skipCharThreshold: true,
15826
+ skipUserTurnThreshold: true,
15827
+ abortSignal: options.abortSignal,
15828
+ extractionDeadlineMs: options.deadlineMs,
15829
+ writeNamespaceOverride: group.writeNamespaceOverride,
15830
+ principalOverride: group.principalOverride,
15831
+ // #3251: accepted groups with no plan pin dispatch null (explicit
15832
+ // none) — not undefined which would re-resolve the CURRENT profile.
15833
+ scopeProfileWritePlan: group.scopeProfileWritePlan ?? null,
15834
+ onTaskSettled: (err) => err ? reject(err) : resolve()
15835
+ }).catch(reject);
15836
+ });
15837
+ if (options.onExtractionQueued) options.onExtractionQueued(extraction);
15838
+ else extraction.catch((err) => log.error(`buffered capture extraction failed: ${err}`));
15839
+ }
15840
+ }
15743
15841
  /**
15744
15842
  * Ingest a batch of bulk-import turns (#460). Like ingestReplayBatch, this
15745
15843
  * normalizes user/assistant turns into the extraction buffer and awaits
@@ -15958,6 +16056,10 @@ var TurnIngestionCoordinator = class {
15958
16056
  log.debug(
15959
16057
  `heartbeat observer trigger: session=${sessionKey} deltaBytes=${decision.deltaBytes} deltaTokens=${decision.deltaTokens}`
15960
16058
  );
16059
+ if (turns.some((turn) => turn.acceptedCapture === true)) {
16060
+ this.queueBufferedCaptureScopeGroups(turns, bufferKey, {});
16061
+ return;
16062
+ }
15961
16063
  await this.deps.queueBufferedExtraction(turns, "heartbeat_observer", {
15962
16064
  bufferKey
15963
16065
  });
@@ -16043,7 +16145,97 @@ var TurnIngestionCoordinator = class {
16043
16145
  }
16044
16146
  clearQueueWaitTimer();
16045
16147
  try {
16046
- const result = await this.deps.runExtraction(turnsToExtract, {
16148
+ let effectiveTurns = turnsToExtract;
16149
+ let effectiveScopePlan = options.scopeProfileWritePlan;
16150
+ if (effectiveTurns.some((turn) => turn.acceptedCapture === true)) {
16151
+ const liveTurns = this.deps.buffer.getTurns(bufferKey).filter((live) => effectiveTurns.some((snapshotted) => bufferTurnsEqual(live, snapshotted)));
16152
+ if (liveTurns.length === 0) {
16153
+ settleTask(void 0, {
16154
+ status: "skipped",
16155
+ reason: "already_drained",
16156
+ persistedCount: 0,
16157
+ durableOutputCount: 0
16158
+ });
16159
+ return;
16160
+ }
16161
+ effectiveTurns = liveTurns;
16162
+ const namespacesOn = resolveNamespaceCapabilities(this.deps.config).namespaces === true;
16163
+ const acceptedTurn = effectiveTurns.find((turn) => turn.acceptedCapture === true);
16164
+ const pinnedNamespace = acceptedTurn?.writeNamespaceOverride;
16165
+ const policySkipError = (reason2) => options.failOnExtractionFailure === true ? new Error(`accepted capture preserved: ${reason2} (${bufferKey})`) : void 0;
16166
+ if (!namespacesOn && pinnedNamespace !== void 0 && pinnedNamespace !== this.deps.config.defaultNamespace) {
16167
+ const err = policySkipError("pinned_namespace_unavailable");
16168
+ if (err) {
16169
+ settleTask(err);
16170
+ return;
16171
+ }
16172
+ settleTask(void 0, {
16173
+ status: "skipped",
16174
+ reason: "pinned_namespace_unavailable",
16175
+ persistedCount: 0,
16176
+ durableOutputCount: 0
16177
+ });
16178
+ return;
16179
+ }
16180
+ const firstSessionKey = effectiveTurns[0]?.sessionKey ?? "";
16181
+ const principal = options.principalOverride !== void 0 && options.principalOverride.length > 0 ? options.principalOverride : resolvePrincipal(firstSessionKey, this.deps.config);
16182
+ if (namespacesOn && pinnedNamespace !== void 0 && !effectiveScopePlan) {
16183
+ const originalContext = acceptedTurn?.codingContext ?? null;
16184
+ const overlay = originalContext ? resolveCodingNamespaceOverlay(
16185
+ originalContext,
16186
+ this.deps.config.codingMode,
16187
+ this.deps.config.defaultNamespace
16188
+ ) : null;
16189
+ const baseNamespace = defaultNamespaceForPrincipal(principal, this.deps.config);
16190
+ const projectNamespace = overlay && this.deps.config.codingMode ? combineNamespaces(baseNamespace, overlay.namespace) : void 0;
16191
+ const writeAuthorized = projectNamespace === pinnedNamespace ? hasExplicitNamespacePolicy(pinnedNamespace, this.deps.config) ? canWriteNamespace(principal, pinnedNamespace, this.deps.config) : canWriteNamespace(principal, baseNamespace, this.deps.config) : canWriteNamespace(principal, pinnedNamespace, this.deps.config);
16192
+ if (!writeAuthorized) {
16193
+ const err = policySkipError("namespace_write_revoked");
16194
+ if (err) {
16195
+ settleTask(err);
16196
+ return;
16197
+ }
16198
+ settleTask(void 0, {
16199
+ status: "skipped",
16200
+ reason: "namespace_write_revoked",
16201
+ persistedCount: 0,
16202
+ durableOutputCount: 0
16203
+ });
16204
+ return;
16205
+ }
16206
+ }
16207
+ if (effectiveScopePlan) {
16208
+ const originalContext = acceptedTurn?.codingContext ?? null;
16209
+ const codingOverlay = originalContext ? resolveCodingNamespaceOverlay(
16210
+ originalContext,
16211
+ this.deps.config.codingMode,
16212
+ this.deps.config.defaultNamespace
16213
+ ) : null;
16214
+ const fresh = resolveScopeProfilePlan({
16215
+ config: this.deps.config,
16216
+ principal,
16217
+ codingContext: originalContext,
16218
+ codingOverlay
16219
+ });
16220
+ const identityHolds = fresh !== null && fresh.profileId === effectiveScopePlan.profileId && fresh.writeLayer === effectiveScopePlan.writeLayer && fresh.writeNamespace === effectiveScopePlan.writeNamespace;
16221
+ if (!identityHolds) {
16222
+ const err = policySkipError("scope_profile_revoked");
16223
+ if (err) {
16224
+ settleTask(err);
16225
+ return;
16226
+ }
16227
+ settleTask(void 0, {
16228
+ status: "skipped",
16229
+ reason: "scope_profile_revoked",
16230
+ persistedCount: 0,
16231
+ durableOutputCount: 0
16232
+ });
16233
+ return;
16234
+ }
16235
+ effectiveScopePlan = fresh;
16236
+ }
16237
+ }
16238
+ const result = await this.deps.runExtraction(effectiveTurns, {
16047
16239
  clearBufferAfterExtraction: options.clearBufferAfterExtraction ?? true,
16048
16240
  clearMatchingTurns: options.clearMatchingTurns === true,
16049
16241
  skipCharThreshold: options.skipCharThreshold ?? false,
@@ -16055,7 +16247,7 @@ var TurnIngestionCoordinator = class {
16055
16247
  failOnExtractionFailure: options.failOnExtractionFailure === true,
16056
16248
  writeNamespaceOverride: options.writeNamespaceOverride,
16057
16249
  principalOverride: options.principalOverride,
16058
- scopeProfileWritePlan: options.scopeProfileWritePlan,
16250
+ scopeProfileWritePlan: effectiveScopePlan,
16059
16251
  forceExtractionAttempt: options.forceExtractionAttempt === true
16060
16252
  });
16061
16253
  settleTask(void 0, result);
@@ -31139,4 +31331,4 @@ export {
31139
31331
  qmdStartupCollectionChecksWithTimeout,
31140
31332
  Orchestrator
31141
31333
  };
31142
- //# sourceMappingURL=chunk-CKR7LXEK.js.map
31334
+ //# sourceMappingURL=chunk-464QR7WO.js.map