@remnic/core 10.0.38 → 10.0.40

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 (444) hide show
  1. package/dist/access-admin-ops-surface.js +73 -73
  2. package/dist/access-audit.js +2 -2
  3. package/dist/access-authorization-probe.js +74 -74
  4. package/dist/access-boundary.js +73 -73
  5. package/dist/access-citation-namespace.js +2 -2
  6. package/dist/access-cli.js +162 -161
  7. package/dist/access-cli.js.map +1 -1
  8. package/dist/access-extraction-force-flush.js +73 -73
  9. package/dist/access-http-briefing.js +74 -74
  10. package/dist/access-http-query.js +75 -75
  11. package/dist/access-http.js +98 -98
  12. package/dist/access-identity-continuity-surface.js +73 -73
  13. package/dist/access-lcm-surface.js +73 -73
  14. package/dist/access-mcp.js +87 -87
  15. package/dist/access-namespace-preflight.js +73 -73
  16. package/dist/access-observe-write-category.js +15 -15
  17. package/dist/access-observe-write-surface.js +73 -73
  18. package/dist/access-offline-manifest.js +12 -12
  19. package/dist/access-operations-batch.js +77 -77
  20. package/dist/access-operations.js +84 -84
  21. package/dist/access-recall-concurrency.js +73 -73
  22. package/dist/access-recall-diagnostics.js +2 -2
  23. package/dist/access-recall-response.js +73 -73
  24. package/dist/access-recall-surface.js +73 -73
  25. package/dist/access-schema.js +10 -10
  26. package/dist/access-service.d.ts +2 -2
  27. package/dist/access-service.d.ts.map +1 -1
  28. package/dist/access-service.js +73 -73
  29. package/dist/access-surface-catalog.js +75 -75
  30. package/dist/active-recall.js +29 -29
  31. package/dist/adapters/index.js +4 -4
  32. package/dist/adapters/registry.js +2 -2
  33. package/dist/{auto-sync-432USQDH.js → auto-sync-BNCBMU6H.js} +7 -7
  34. package/dist/briefing.js +19 -19
  35. package/dist/buffer-types.d.ts +59 -0
  36. package/dist/buffer-types.d.ts.map +1 -0
  37. package/dist/buffer-types.js +1 -0
  38. package/dist/buffer.d.ts +14 -22
  39. package/dist/buffer.d.ts.map +1 -1
  40. package/dist/buffer.js +11 -11
  41. package/dist/calibration.js +2 -2
  42. package/dist/{capsule-crypto-7FJQINUR.js → capsule-crypto-GWVG7LGC.js} +2 -2
  43. package/dist/causal-behavior.js +2 -2
  44. package/dist/causal-chain.js +2 -2
  45. package/dist/causal-consolidation.js +22 -22
  46. package/dist/causal-retrieval.js +2 -2
  47. package/dist/causal-trajectory-graph.js +2 -2
  48. package/dist/causal-trajectory.js +1 -1
  49. package/dist/{chunk-MKE5DP3S.js → chunk-23ZMQONL.js} +2 -2
  50. package/dist/{chunk-3K5IEJTK.js → chunk-2AV2U2SZ.js} +3 -3
  51. package/dist/{chunk-HJ3UTGIW.js → chunk-2JNBPOZ2.js} +3 -3
  52. package/dist/{chunk-5ANUG4JZ.js → chunk-2T6KEOUL.js} +2 -2
  53. package/dist/{chunk-EEOYF3IB.js → chunk-3RJDYZJE.js} +2 -2
  54. package/dist/{chunk-P5CUEB2Q.js → chunk-4QLKVZH6.js} +8 -8
  55. package/dist/{chunk-XTBEXZFN.js → chunk-5SF7JOJB.js} +4 -4
  56. package/dist/{chunk-53BLBDV6.js → chunk-5TRU6QQC.js} +2 -2
  57. package/dist/{chunk-DKHX2FHI.js → chunk-64WHWIPL.js} +2 -2
  58. package/dist/{chunk-TVIGN3XZ.js → chunk-6FRFVIKC.js} +10 -10
  59. package/dist/{chunk-JIA435P3.js → chunk-6ITNEPJO.js} +2 -2
  60. package/dist/{chunk-WEK3OUGO.js → chunk-6X3J4NLZ.js} +10 -5
  61. package/dist/chunk-6X3J4NLZ.js.map +1 -0
  62. package/dist/{chunk-FGEY2AGV.js → chunk-7BCYAJKP.js} +2 -2
  63. package/dist/{chunk-PSQ2P2T3.js → chunk-7XZ7TOLQ.js} +3 -3
  64. package/dist/{chunk-6JEEY42N.js → chunk-AER3HD3B.js} +2 -2
  65. package/dist/{chunk-POGPI5GR.js → chunk-AY6LO7GD.js} +2 -2
  66. package/dist/{chunk-HXFIILGF.js → chunk-BFPF5N3H.js} +4 -4
  67. package/dist/{chunk-WCBLPKG3.js → chunk-BIYVUPC6.js} +172 -143
  68. package/dist/chunk-BIYVUPC6.js.map +1 -0
  69. package/dist/{chunk-KQAFEZQX.js → chunk-BUKK5SWA.js} +2 -2
  70. package/dist/{chunk-LHBOFROT.js → chunk-CHNZPOWX.js} +4 -3
  71. package/dist/{chunk-LHBOFROT.js.map → chunk-CHNZPOWX.js.map} +1 -1
  72. package/dist/{chunk-6F5BGIAF.js → chunk-CNAL35D5.js} +3 -3
  73. package/dist/{chunk-YC2C67F7.js → chunk-CRXGQRNA.js} +3 -3
  74. package/dist/{chunk-WRDFYSUC.js → chunk-CZVNOTLR.js} +2 -2
  75. package/dist/{chunk-VPO53QMG.js → chunk-D6DOLQYK.js} +2 -2
  76. package/dist/{chunk-RGKXF4W3.js → chunk-E5IEI2MR.js} +2 -2
  77. package/dist/{chunk-Z2T5BPOZ.js → chunk-EIYJK7OD.js} +2 -2
  78. package/dist/{chunk-FRAL3EU4.js → chunk-EKPRLTAE.js} +2 -2
  79. package/dist/{chunk-MCPSMWUC.js → chunk-EPEDMEHO.js} +10 -10
  80. package/dist/{chunk-MCPSMWUC.js.map → chunk-EPEDMEHO.js.map} +1 -1
  81. package/dist/{chunk-TYGLV6ZG.js → chunk-EYGOM6AI.js} +2 -2
  82. package/dist/{chunk-TYGLV6ZG.js.map → chunk-EYGOM6AI.js.map} +1 -1
  83. package/dist/{chunk-I75BWXRZ.js → chunk-F2RDRE7M.js} +2 -2
  84. package/dist/{chunk-2AKIVSHP.js → chunk-FAKRTS3Y.js} +2 -2
  85. package/dist/{chunk-MZWHIAOL.js → chunk-FC3ZFEXF.js} +2 -2
  86. package/dist/{chunk-3PLAL2KP.js → chunk-FJ264QBP.js} +17 -9
  87. package/dist/chunk-FJ264QBP.js.map +1 -0
  88. package/dist/{chunk-7VFNGQ4V.js → chunk-FLDXEJFX.js} +2 -2
  89. package/dist/{chunk-TYLNWE4D.js → chunk-FNEYSTB6.js} +2 -2
  90. package/dist/{chunk-XHX67LX6.js → chunk-FPHU6KVI.js} +2 -2
  91. package/dist/{chunk-JH4FCVWJ.js → chunk-G6OFEGUR.js} +2 -2
  92. package/dist/{chunk-WCIDCJOQ.js → chunk-GAUS4XGN.js} +3 -3
  93. package/dist/{chunk-SZPPCEYT.js → chunk-GDOI4U4D.js} +2 -2
  94. package/dist/{chunk-63YPKHAU.js → chunk-GLB6VV3J.js} +2 -2
  95. package/dist/{chunk-3XVBGGF3.js → chunk-GRN4BVPM.js} +2 -2
  96. package/dist/{chunk-ZAP7BKTZ.js → chunk-GZMHBRIR.js} +6 -6
  97. package/dist/{chunk-645WOU5I.js → chunk-H7BZBSP6.js} +4 -4
  98. package/dist/{chunk-TXP7Q7T5.js → chunk-HN35OH2C.js} +2 -2
  99. package/dist/{chunk-SWZOAQUM.js → chunk-HSNV4CSW.js} +57 -57
  100. package/dist/{chunk-GFYFKXWZ.js → chunk-HUDPXTXW.js} +2 -2
  101. package/dist/{chunk-C2KOW2UQ.js → chunk-I7CWAJHX.js} +2 -2
  102. package/dist/{chunk-L2JQSG5M.js → chunk-I7TR2OCU.js} +2 -2
  103. package/dist/{chunk-5DCS4C4S.js → chunk-ICTJOOWZ.js} +4 -4
  104. package/dist/{chunk-NH6GZEQN.js → chunk-IF6EG22P.js} +10 -10
  105. package/dist/chunk-IF6EG22P.js.map +1 -0
  106. package/dist/{chunk-STM4T335.js → chunk-IJH6METJ.js} +2 -2
  107. package/dist/{chunk-6SYS5YX3.js → chunk-IJJWM2ZA.js} +2 -2
  108. package/dist/{chunk-3AODCBKX.js → chunk-IWDFHVPJ.js} +6 -6
  109. package/dist/{chunk-XHVO3CGX.js → chunk-JGS55BAS.js} +53 -2
  110. package/dist/chunk-JGS55BAS.js.map +1 -0
  111. package/dist/{chunk-L7PGPH4E.js → chunk-JJSMSS45.js} +2 -2
  112. package/dist/{chunk-74AY3S7U.js → chunk-JNLYHJG7.js} +4 -4
  113. package/dist/{chunk-OLH4XCLU.js → chunk-JXQTECMU.js} +2 -2
  114. package/dist/{chunk-6QOL4G76.js → chunk-KQXRVELF.js} +2 -2
  115. package/dist/{chunk-PJRKLB4Z.js → chunk-L5PM7B3I.js} +16 -2
  116. package/dist/{chunk-PJRKLB4Z.js.map → chunk-L5PM7B3I.js.map} +1 -1
  117. package/dist/{chunk-VGRM43X6.js → chunk-LB6HIXQC.js} +2 -2
  118. package/dist/{chunk-N7DVBHU3.js → chunk-LR7RW4T6.js} +3 -3
  119. package/dist/{chunk-AYBAC2N4.js → chunk-LWIU5BMA.js} +3 -3
  120. package/dist/{chunk-FZVZYU5C.js → chunk-LXN737FX.js} +2 -2
  121. package/dist/{chunk-7ZRRJ6RG.js → chunk-MGYZENUY.js} +2 -2
  122. package/dist/{chunk-YQ6SLFNZ.js → chunk-MPJDQC4G.js} +3 -3
  123. package/dist/{chunk-7HXZOWTR.js → chunk-N3PUGD7E.js} +2 -2
  124. package/dist/{chunk-EGNONTVT.js → chunk-NBEM5QEH.js} +6 -6
  125. package/dist/{chunk-QO5KDQGG.js → chunk-NFJWB27H.js} +20 -18
  126. package/dist/chunk-NFJWB27H.js.map +1 -0
  127. package/dist/{chunk-JF3MEIHO.js → chunk-O67H7OXJ.js} +4 -4
  128. package/dist/{chunk-OLHN4ZNT.js → chunk-ONIVKGNC.js} +3 -3
  129. package/dist/{chunk-2NLLXCJG.js → chunk-OWHERGF2.js} +2 -2
  130. package/dist/{chunk-I73ZSORJ.js → chunk-OXSTKCYK.js} +4 -4
  131. package/dist/{chunk-UFM3PJDT.js → chunk-PARM6OYL.js} +1 -1
  132. package/dist/chunk-PARM6OYL.js.map +1 -0
  133. package/dist/{chunk-VSSQIBVU.js → chunk-PJXSBXEC.js} +2 -2
  134. package/dist/{chunk-4B37KNMP.js → chunk-PW63SXFM.js} +2 -2
  135. package/dist/{chunk-TPKB7T6Z.js → chunk-Q6UZREJK.js} +2 -2
  136. package/dist/{chunk-X247CYL6.js → chunk-Q77SLBWT.js} +4 -4
  137. package/dist/{chunk-TAEJ2MRR.js → chunk-QFD7OANX.js} +62 -62
  138. package/dist/chunk-QFD7OANX.js.map +1 -0
  139. package/dist/{chunk-5K23NQRI.js → chunk-QGNZ5QPV.js} +2 -2
  140. package/dist/{chunk-UJDTXWMT.js → chunk-QIMGULGN.js} +2 -2
  141. package/dist/{chunk-E24RUQEN.js → chunk-QNIYL5SK.js} +2 -2
  142. package/dist/{chunk-KOY25HUB.js → chunk-QYAXMXOB.js} +2 -2
  143. package/dist/{chunk-J7G656MY.js → chunk-R42VUN5V.js} +4 -4
  144. package/dist/{chunk-LOMSBYNS.js → chunk-RPHCSMTQ.js} +309 -106
  145. package/dist/chunk-RPHCSMTQ.js.map +1 -0
  146. package/dist/{chunk-AYXRK264.js → chunk-RROFIAYI.js} +9 -9
  147. package/dist/{chunk-YYGZ4EIY.js → chunk-RUAIO5UA.js} +2 -2
  148. package/dist/{chunk-E5PVMB3I.js → chunk-SDXBR5QO.js} +2 -2
  149. package/dist/{chunk-OKKBOTRA.js → chunk-SLVR3U4E.js} +2 -2
  150. package/dist/{chunk-CUWOSRCS.js → chunk-SUKPM6DV.js} +2 -2
  151. package/dist/{chunk-TDCR6PQL.js → chunk-TWRPWJJT.js} +2 -2
  152. package/dist/{chunk-6DTIYAAN.js → chunk-UGV256H3.js} +2 -2
  153. package/dist/{chunk-DG4H56SK.js → chunk-UIK3U36O.js} +2 -2
  154. package/dist/{chunk-KOAVX2IT.js → chunk-UKIIAEJF.js} +2 -2
  155. package/dist/{chunk-XLEP7SS3.js → chunk-UMSH4I3E.js} +2 -2
  156. package/dist/{chunk-X7Y7WX73.js → chunk-UVYI6VIX.js} +1 -1
  157. package/dist/chunk-VA3GNAWQ.js +58 -0
  158. package/dist/chunk-VA3GNAWQ.js.map +1 -0
  159. package/dist/{chunk-4P4VLPGB.js → chunk-VECRSYQG.js} +1 -1
  160. package/dist/{chunk-GGI6FLO6.js → chunk-VHBGJAYC.js} +2 -2
  161. package/dist/{chunk-NMKETOAX.js → chunk-VSHWPOUB.js} +2 -2
  162. package/dist/{chunk-VC3X7XP3.js → chunk-VTZSIG6O.js} +2 -2
  163. package/dist/{chunk-UBN5AOLT.js → chunk-W5EO4USJ.js} +2 -2
  164. package/dist/{chunk-Y7427SL7.js → chunk-WCGJK4NQ.js} +4 -4
  165. package/dist/{chunk-4IZ6AC2U.js → chunk-WJMAWDAU.js} +2 -2
  166. package/dist/{chunk-JH2ALMPR.js → chunk-WR5POHQ3.js} +2 -2
  167. package/dist/{chunk-EHIKY2IA.js → chunk-WU5WTCH5.js} +2 -2
  168. package/dist/{chunk-QKXPOLQD.js → chunk-WUBGMV3G.js} +6 -6
  169. package/dist/{chunk-FKTMWDN2.js → chunk-WUL6LDJ4.js} +2 -2
  170. package/dist/{chunk-5UPOKIFP.js → chunk-XBHUMPIQ.js} +12 -12
  171. package/dist/{chunk-Y5ZHZKZD.js → chunk-XJ77IOAD.js} +2 -2
  172. package/dist/{chunk-U7HJBODU.js → chunk-XKTHJHSQ.js} +5 -5
  173. package/dist/{chunk-FQFMLOAC.js → chunk-XLUMO5H2.js} +20 -20
  174. package/dist/chunk-XLUMO5H2.js.map +1 -0
  175. package/dist/{chunk-JFI3ATK4.js → chunk-XMYWYJM2.js} +2 -2
  176. package/dist/{chunk-64S6X4IU.js → chunk-XTN54NML.js} +4 -4
  177. package/dist/{chunk-CVMAOPAH.js → chunk-XXBCUIYQ.js} +10 -10
  178. package/dist/{chunk-QOUKZ2N3.js → chunk-XXW3P3RX.js} +2 -2
  179. package/dist/{chunk-RWRHGE75.js → chunk-Y473XFTD.js} +2 -2
  180. package/dist/{chunk-VGFNTY3Y.js → chunk-YFXRLRKP.js} +2 -2
  181. package/dist/{chunk-DAOMWGO2.js → chunk-ZX5N5D6M.js} +4 -4
  182. package/dist/cli.js +121 -121
  183. package/dist/coding/export-okf-codegraph.js +20 -20
  184. package/dist/coding/pre-action-gate.js +2 -2
  185. package/dist/compounding/engine.js +21 -21
  186. package/dist/config.d.ts.map +1 -1
  187. package/dist/config.js +29 -29
  188. package/dist/connectors/codex-materialize-runner.js +19 -19
  189. package/dist/connectors/index.js +19 -19
  190. package/dist/contradiction/index.js +5 -5
  191. package/dist/convergence-refresh.js +21 -21
  192. package/dist/corpus-watermark.js +21 -21
  193. package/dist/deep-recall-http-glue.js +11 -11
  194. package/dist/deep-recall.js +2 -2
  195. package/dist/entity-retrieval.js +20 -20
  196. package/dist/event-order-recall.js +2 -2
  197. package/dist/explicit-capture.js +6 -6
  198. package/dist/external-wiki-access.js +74 -74
  199. package/dist/extraction-error-classification.d.ts +15 -0
  200. package/dist/extraction-error-classification.d.ts.map +1 -1
  201. package/dist/extraction-error-classification.js +7 -3
  202. package/dist/extraction-window-drain.d.ts +48 -0
  203. package/dist/extraction-window-drain.d.ts.map +1 -0
  204. package/dist/extraction-window-drain.js +14 -0
  205. package/dist/extraction.js +28 -28
  206. package/dist/{graph-edge-decay-2BZTY2IM.js → graph-edge-decay-3HVLMT6U.js} +5 -5
  207. package/dist/graph-edge-decay-3HVLMT6U.js.map +1 -0
  208. package/dist/graph-jsonl.js +3 -3
  209. package/dist/graph-snapshot.js +3 -3
  210. package/dist/graph.js +4 -4
  211. package/dist/harmonic-retrieval.js +20 -20
  212. package/dist/harmonic-source-lookup.js +2 -2
  213. package/dist/index.js +209 -208
  214. package/dist/lcm/engine.js +2 -2
  215. package/dist/lcm/index.js +7 -7
  216. package/dist/local-llm.js +2 -2
  217. package/dist/location/index.js +22 -22
  218. package/dist/maintenance/memory-governance.js +19 -19
  219. package/dist/maintenance/rebuild-memory-lifecycle-ledger.js +19 -19
  220. package/dist/maintenance/rebuild-memory-projection-runner.js +21 -21
  221. package/dist/maintenance/rebuild-memory-projection.js +20 -20
  222. package/dist/memory-browse-operations.js +74 -74
  223. package/dist/memory-browse.js +6 -6
  224. package/dist/memory-subject.js +3 -3
  225. package/dist/namespaces/migrate.js +20 -20
  226. package/dist/namespaces/search.d.ts +1 -0
  227. package/dist/namespaces/search.d.ts.map +1 -1
  228. package/dist/namespaces/search.js +11 -9
  229. package/dist/namespaces/storage.js +19 -19
  230. package/dist/offline-sync-changeset-generations.js +3 -3
  231. package/dist/offline-sync-embedding-generation.js +2 -2
  232. package/dist/offline-sync-file-io.js +2 -2
  233. package/dist/offline-sync-impression-drain.js +3 -3
  234. package/dist/offline-sync-snapshot-stream.js +8 -8
  235. package/dist/offline-sync-upload-staging.js +3 -3
  236. package/dist/offline-sync.js +9 -9
  237. package/dist/operator-doctor-corpus.js +22 -22
  238. package/dist/operator-toolkit.js +40 -40
  239. package/dist/orchestration/extraction-drain.d.ts +90 -0
  240. package/dist/orchestration/extraction-drain.d.ts.map +1 -0
  241. package/dist/orchestration/extraction-run-helpers.d.ts +3 -0
  242. package/dist/orchestration/extraction-run-helpers.d.ts.map +1 -1
  243. package/dist/orchestration/extraction-run.d.ts +4 -1
  244. package/dist/orchestration/extraction-run.d.ts.map +1 -1
  245. package/dist/orchestration/maintenance.js +33 -33
  246. package/dist/orchestration/qmd-result-resolver.d.ts +5 -0
  247. package/dist/orchestration/qmd-result-resolver.d.ts.map +1 -1
  248. package/dist/orchestration/recall-search-pipeline.d.ts.map +1 -1
  249. package/dist/orchestration/turn-ingestion.d.ts +3 -0
  250. package/dist/orchestration/turn-ingestion.d.ts.map +1 -1
  251. package/dist/orchestrator.d.ts +8 -0
  252. package/dist/orchestrator.d.ts.map +1 -1
  253. package/dist/orchestrator.js +162 -161
  254. package/dist/qmd.js +5 -5
  255. package/dist/recall-explain-renderer.js +3 -3
  256. package/dist/recall-navigate-access.js +2 -2
  257. package/dist/recall-navigate-disclosure.js +2 -2
  258. package/dist/recall-navigate.js +2 -2
  259. package/dist/recall-navigation-operations.js +74 -74
  260. package/dist/recall-navigation.js +73 -73
  261. package/dist/recall-state-view-admission.js +6 -6
  262. package/dist/recall-why-service.js +6 -6
  263. package/dist/recall-xray-cli.js +4 -4
  264. package/dist/recall-xray-renderer.js +3 -3
  265. package/dist/recall-xray.js +2 -2
  266. package/dist/reconcile/manifest.js +3 -3
  267. package/dist/{resolution-4ZEQPXUZ.js → resolution-NNYG37YB.js} +6 -6
  268. package/dist/resolution-NNYG37YB.js.map +1 -0
  269. package/dist/resume-bundles.js +30 -30
  270. package/dist/retrieval-agents.js +2 -2
  271. package/dist/salvage-envelope.js +5 -5
  272. package/dist/search/factory.js +6 -6
  273. package/dist/search/index.js +10 -10
  274. package/dist/secure-store/index.js +2 -2
  275. package/dist/semantic-consolidation.js +20 -20
  276. package/dist/semantic-rule-promotion.js +19 -19
  277. package/dist/semantic-rule-verifier.js +19 -19
  278. package/dist/source-agent-qualifier.js +23 -23
  279. package/dist/standup/build.js +19 -19
  280. package/dist/storage/dropped-extraction-chunk.d.ts +8 -0
  281. package/dist/storage/dropped-extraction-chunk.d.ts.map +1 -0
  282. package/dist/storage.d.ts +1 -0
  283. package/dist/storage.d.ts.map +1 -1
  284. package/dist/storage.js +18 -18
  285. package/dist/subject-config.js +4 -4
  286. package/dist/summarizer.js +3 -3
  287. package/dist/support-passport/index.js +76 -76
  288. package/dist/transfer/backup.js +2 -2
  289. package/dist/transfer/capsule-export.js +2 -2
  290. package/dist/transfer/capsule-import.js +2 -2
  291. package/dist/transfer/export-okf.js +20 -20
  292. package/dist/types.d.ts +7 -0
  293. package/dist/types.d.ts.map +1 -1
  294. package/dist/types.js +1 -1
  295. package/dist/verified-recall.js +19 -19
  296. package/dist/who-knows-cli.js +20 -20
  297. package/dist/who-knows.js +19 -19
  298. package/dist/write-envelope.js +4 -4
  299. package/package.json +2 -2
  300. package/src/access-entity-principal.test.ts +190 -0
  301. package/src/access-http.ts +2 -2
  302. package/src/access-operations-batch.ts +2 -2
  303. package/src/access-service.ts +7 -6
  304. package/src/buffer-drop-extraction-chunk.test.ts +196 -0
  305. package/src/buffer-types.ts +65 -0
  306. package/src/buffer.ts +60 -62
  307. package/src/chat/chat-executor.ts +1 -1
  308. package/src/config.ts +8 -0
  309. package/src/extraction-error-classification.ts +23 -0
  310. package/src/extraction-local-failure-class.test.ts +55 -0
  311. package/src/extraction-window-drain.test.ts +123 -0
  312. package/src/extraction-window-drain.ts +110 -0
  313. package/src/extraction.ts +9 -9
  314. package/src/namespaces/search.ts +1 -1
  315. package/src/orchestration/extraction-drain.ts +261 -0
  316. package/src/orchestration/extraction-run-helpers.ts +8 -0
  317. package/src/orchestration/extraction-run.test.ts +83 -2
  318. package/src/orchestration/extraction-run.ts +5 -4
  319. package/src/orchestration/qmd-result-resolver.ts +26 -1
  320. package/src/orchestration/recall-search-pipeline.ts +11 -12
  321. package/src/orchestration/turn-ingestion.ts +9 -5
  322. package/src/orchestrator.ts +21 -0
  323. package/src/secure-store/secure-fs.ts +3 -1
  324. package/src/storage/dropped-extraction-chunk.ts +27 -0
  325. package/src/storage-dropped-chunk-filenames.test.ts +30 -0
  326. package/src/storage.ts +6 -7
  327. package/src/types.ts +7 -0
  328. package/dist/chunk-3PLAL2KP.js.map +0 -1
  329. package/dist/chunk-FQFMLOAC.js.map +0 -1
  330. package/dist/chunk-LOMSBYNS.js.map +0 -1
  331. package/dist/chunk-NH6GZEQN.js.map +0 -1
  332. package/dist/chunk-QO5KDQGG.js.map +0 -1
  333. package/dist/chunk-TAEJ2MRR.js.map +0 -1
  334. package/dist/chunk-UFM3PJDT.js.map +0 -1
  335. package/dist/chunk-WCBLPKG3.js.map +0 -1
  336. package/dist/chunk-WEK3OUGO.js.map +0 -1
  337. package/dist/chunk-XHVO3CGX.js.map +0 -1
  338. /package/dist/{auto-sync-432USQDH.js.map → auto-sync-BNCBMU6H.js.map} +0 -0
  339. /package/dist/{capsule-crypto-7FJQINUR.js.map → buffer-types.js.map} +0 -0
  340. /package/dist/{graph-edge-decay-2BZTY2IM.js.map → capsule-crypto-GWVG7LGC.js.map} +0 -0
  341. /package/dist/{chunk-MKE5DP3S.js.map → chunk-23ZMQONL.js.map} +0 -0
  342. /package/dist/{chunk-3K5IEJTK.js.map → chunk-2AV2U2SZ.js.map} +0 -0
  343. /package/dist/{chunk-HJ3UTGIW.js.map → chunk-2JNBPOZ2.js.map} +0 -0
  344. /package/dist/{chunk-5ANUG4JZ.js.map → chunk-2T6KEOUL.js.map} +0 -0
  345. /package/dist/{chunk-EEOYF3IB.js.map → chunk-3RJDYZJE.js.map} +0 -0
  346. /package/dist/{chunk-P5CUEB2Q.js.map → chunk-4QLKVZH6.js.map} +0 -0
  347. /package/dist/{chunk-XTBEXZFN.js.map → chunk-5SF7JOJB.js.map} +0 -0
  348. /package/dist/{chunk-53BLBDV6.js.map → chunk-5TRU6QQC.js.map} +0 -0
  349. /package/dist/{chunk-DKHX2FHI.js.map → chunk-64WHWIPL.js.map} +0 -0
  350. /package/dist/{chunk-TVIGN3XZ.js.map → chunk-6FRFVIKC.js.map} +0 -0
  351. /package/dist/{chunk-JIA435P3.js.map → chunk-6ITNEPJO.js.map} +0 -0
  352. /package/dist/{chunk-FGEY2AGV.js.map → chunk-7BCYAJKP.js.map} +0 -0
  353. /package/dist/{chunk-PSQ2P2T3.js.map → chunk-7XZ7TOLQ.js.map} +0 -0
  354. /package/dist/{chunk-6JEEY42N.js.map → chunk-AER3HD3B.js.map} +0 -0
  355. /package/dist/{chunk-POGPI5GR.js.map → chunk-AY6LO7GD.js.map} +0 -0
  356. /package/dist/{chunk-HXFIILGF.js.map → chunk-BFPF5N3H.js.map} +0 -0
  357. /package/dist/{chunk-KQAFEZQX.js.map → chunk-BUKK5SWA.js.map} +0 -0
  358. /package/dist/{chunk-6F5BGIAF.js.map → chunk-CNAL35D5.js.map} +0 -0
  359. /package/dist/{chunk-YC2C67F7.js.map → chunk-CRXGQRNA.js.map} +0 -0
  360. /package/dist/{chunk-WRDFYSUC.js.map → chunk-CZVNOTLR.js.map} +0 -0
  361. /package/dist/{chunk-VPO53QMG.js.map → chunk-D6DOLQYK.js.map} +0 -0
  362. /package/dist/{chunk-RGKXF4W3.js.map → chunk-E5IEI2MR.js.map} +0 -0
  363. /package/dist/{chunk-Z2T5BPOZ.js.map → chunk-EIYJK7OD.js.map} +0 -0
  364. /package/dist/{chunk-FRAL3EU4.js.map → chunk-EKPRLTAE.js.map} +0 -0
  365. /package/dist/{chunk-I75BWXRZ.js.map → chunk-F2RDRE7M.js.map} +0 -0
  366. /package/dist/{chunk-2AKIVSHP.js.map → chunk-FAKRTS3Y.js.map} +0 -0
  367. /package/dist/{chunk-MZWHIAOL.js.map → chunk-FC3ZFEXF.js.map} +0 -0
  368. /package/dist/{chunk-7VFNGQ4V.js.map → chunk-FLDXEJFX.js.map} +0 -0
  369. /package/dist/{chunk-TYLNWE4D.js.map → chunk-FNEYSTB6.js.map} +0 -0
  370. /package/dist/{chunk-XHX67LX6.js.map → chunk-FPHU6KVI.js.map} +0 -0
  371. /package/dist/{chunk-JH4FCVWJ.js.map → chunk-G6OFEGUR.js.map} +0 -0
  372. /package/dist/{chunk-WCIDCJOQ.js.map → chunk-GAUS4XGN.js.map} +0 -0
  373. /package/dist/{chunk-SZPPCEYT.js.map → chunk-GDOI4U4D.js.map} +0 -0
  374. /package/dist/{chunk-63YPKHAU.js.map → chunk-GLB6VV3J.js.map} +0 -0
  375. /package/dist/{chunk-3XVBGGF3.js.map → chunk-GRN4BVPM.js.map} +0 -0
  376. /package/dist/{chunk-ZAP7BKTZ.js.map → chunk-GZMHBRIR.js.map} +0 -0
  377. /package/dist/{chunk-645WOU5I.js.map → chunk-H7BZBSP6.js.map} +0 -0
  378. /package/dist/{chunk-TXP7Q7T5.js.map → chunk-HN35OH2C.js.map} +0 -0
  379. /package/dist/{chunk-SWZOAQUM.js.map → chunk-HSNV4CSW.js.map} +0 -0
  380. /package/dist/{chunk-GFYFKXWZ.js.map → chunk-HUDPXTXW.js.map} +0 -0
  381. /package/dist/{chunk-C2KOW2UQ.js.map → chunk-I7CWAJHX.js.map} +0 -0
  382. /package/dist/{chunk-L2JQSG5M.js.map → chunk-I7TR2OCU.js.map} +0 -0
  383. /package/dist/{chunk-5DCS4C4S.js.map → chunk-ICTJOOWZ.js.map} +0 -0
  384. /package/dist/{chunk-STM4T335.js.map → chunk-IJH6METJ.js.map} +0 -0
  385. /package/dist/{chunk-6SYS5YX3.js.map → chunk-IJJWM2ZA.js.map} +0 -0
  386. /package/dist/{chunk-3AODCBKX.js.map → chunk-IWDFHVPJ.js.map} +0 -0
  387. /package/dist/{chunk-L7PGPH4E.js.map → chunk-JJSMSS45.js.map} +0 -0
  388. /package/dist/{chunk-74AY3S7U.js.map → chunk-JNLYHJG7.js.map} +0 -0
  389. /package/dist/{chunk-OLH4XCLU.js.map → chunk-JXQTECMU.js.map} +0 -0
  390. /package/dist/{chunk-6QOL4G76.js.map → chunk-KQXRVELF.js.map} +0 -0
  391. /package/dist/{chunk-VGRM43X6.js.map → chunk-LB6HIXQC.js.map} +0 -0
  392. /package/dist/{chunk-N7DVBHU3.js.map → chunk-LR7RW4T6.js.map} +0 -0
  393. /package/dist/{chunk-AYBAC2N4.js.map → chunk-LWIU5BMA.js.map} +0 -0
  394. /package/dist/{chunk-FZVZYU5C.js.map → chunk-LXN737FX.js.map} +0 -0
  395. /package/dist/{chunk-7ZRRJ6RG.js.map → chunk-MGYZENUY.js.map} +0 -0
  396. /package/dist/{chunk-YQ6SLFNZ.js.map → chunk-MPJDQC4G.js.map} +0 -0
  397. /package/dist/{chunk-7HXZOWTR.js.map → chunk-N3PUGD7E.js.map} +0 -0
  398. /package/dist/{chunk-EGNONTVT.js.map → chunk-NBEM5QEH.js.map} +0 -0
  399. /package/dist/{chunk-JF3MEIHO.js.map → chunk-O67H7OXJ.js.map} +0 -0
  400. /package/dist/{chunk-OLHN4ZNT.js.map → chunk-ONIVKGNC.js.map} +0 -0
  401. /package/dist/{chunk-2NLLXCJG.js.map → chunk-OWHERGF2.js.map} +0 -0
  402. /package/dist/{chunk-I73ZSORJ.js.map → chunk-OXSTKCYK.js.map} +0 -0
  403. /package/dist/{chunk-VSSQIBVU.js.map → chunk-PJXSBXEC.js.map} +0 -0
  404. /package/dist/{chunk-4B37KNMP.js.map → chunk-PW63SXFM.js.map} +0 -0
  405. /package/dist/{chunk-TPKB7T6Z.js.map → chunk-Q6UZREJK.js.map} +0 -0
  406. /package/dist/{chunk-X247CYL6.js.map → chunk-Q77SLBWT.js.map} +0 -0
  407. /package/dist/{chunk-5K23NQRI.js.map → chunk-QGNZ5QPV.js.map} +0 -0
  408. /package/dist/{chunk-UJDTXWMT.js.map → chunk-QIMGULGN.js.map} +0 -0
  409. /package/dist/{chunk-E24RUQEN.js.map → chunk-QNIYL5SK.js.map} +0 -0
  410. /package/dist/{chunk-KOY25HUB.js.map → chunk-QYAXMXOB.js.map} +0 -0
  411. /package/dist/{chunk-J7G656MY.js.map → chunk-R42VUN5V.js.map} +0 -0
  412. /package/dist/{chunk-AYXRK264.js.map → chunk-RROFIAYI.js.map} +0 -0
  413. /package/dist/{chunk-YYGZ4EIY.js.map → chunk-RUAIO5UA.js.map} +0 -0
  414. /package/dist/{chunk-E5PVMB3I.js.map → chunk-SDXBR5QO.js.map} +0 -0
  415. /package/dist/{chunk-OKKBOTRA.js.map → chunk-SLVR3U4E.js.map} +0 -0
  416. /package/dist/{chunk-CUWOSRCS.js.map → chunk-SUKPM6DV.js.map} +0 -0
  417. /package/dist/{chunk-TDCR6PQL.js.map → chunk-TWRPWJJT.js.map} +0 -0
  418. /package/dist/{chunk-6DTIYAAN.js.map → chunk-UGV256H3.js.map} +0 -0
  419. /package/dist/{chunk-DG4H56SK.js.map → chunk-UIK3U36O.js.map} +0 -0
  420. /package/dist/{chunk-KOAVX2IT.js.map → chunk-UKIIAEJF.js.map} +0 -0
  421. /package/dist/{chunk-XLEP7SS3.js.map → chunk-UMSH4I3E.js.map} +0 -0
  422. /package/dist/{chunk-X7Y7WX73.js.map → chunk-UVYI6VIX.js.map} +0 -0
  423. /package/dist/{chunk-4P4VLPGB.js.map → chunk-VECRSYQG.js.map} +0 -0
  424. /package/dist/{chunk-GGI6FLO6.js.map → chunk-VHBGJAYC.js.map} +0 -0
  425. /package/dist/{chunk-NMKETOAX.js.map → chunk-VSHWPOUB.js.map} +0 -0
  426. /package/dist/{chunk-VC3X7XP3.js.map → chunk-VTZSIG6O.js.map} +0 -0
  427. /package/dist/{chunk-UBN5AOLT.js.map → chunk-W5EO4USJ.js.map} +0 -0
  428. /package/dist/{chunk-Y7427SL7.js.map → chunk-WCGJK4NQ.js.map} +0 -0
  429. /package/dist/{chunk-4IZ6AC2U.js.map → chunk-WJMAWDAU.js.map} +0 -0
  430. /package/dist/{chunk-JH2ALMPR.js.map → chunk-WR5POHQ3.js.map} +0 -0
  431. /package/dist/{chunk-EHIKY2IA.js.map → chunk-WU5WTCH5.js.map} +0 -0
  432. /package/dist/{chunk-QKXPOLQD.js.map → chunk-WUBGMV3G.js.map} +0 -0
  433. /package/dist/{chunk-FKTMWDN2.js.map → chunk-WUL6LDJ4.js.map} +0 -0
  434. /package/dist/{chunk-5UPOKIFP.js.map → chunk-XBHUMPIQ.js.map} +0 -0
  435. /package/dist/{chunk-Y5ZHZKZD.js.map → chunk-XJ77IOAD.js.map} +0 -0
  436. /package/dist/{chunk-U7HJBODU.js.map → chunk-XKTHJHSQ.js.map} +0 -0
  437. /package/dist/{chunk-JFI3ATK4.js.map → chunk-XMYWYJM2.js.map} +0 -0
  438. /package/dist/{chunk-64S6X4IU.js.map → chunk-XTN54NML.js.map} +0 -0
  439. /package/dist/{chunk-CVMAOPAH.js.map → chunk-XXBCUIYQ.js.map} +0 -0
  440. /package/dist/{chunk-QOUKZ2N3.js.map → chunk-XXW3P3RX.js.map} +0 -0
  441. /package/dist/{chunk-RWRHGE75.js.map → chunk-Y473XFTD.js.map} +0 -0
  442. /package/dist/{chunk-VGFNTY3Y.js.map → chunk-YFXRLRKP.js.map} +0 -0
  443. /package/dist/{chunk-DAOMWGO2.js.map → chunk-ZX5N5D6M.js.map} +0 -0
  444. /package/dist/{resolution-4ZEQPXUZ.js.map → extraction-window-drain.js.map} +0 -0
@@ -6,14 +6,14 @@ import {
6
6
  loadSyncState,
7
7
  syncWearableSource,
8
8
  wearableSourceLabel
9
- } from "./chunk-3K5IEJTK.js";
9
+ } from "./chunk-2AV2U2SZ.js";
10
10
  import {
11
11
  CompressionGuidelineCoordinator
12
12
  } from "./chunk-5PHOU5QI.js";
13
13
  import {
14
14
  ActivityStore,
15
15
  MaintenanceScheduler
16
- } from "./chunk-5UPOKIFP.js";
16
+ } from "./chunk-XBHUMPIQ.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-Y7427SL7.js";
25
+ } from "./chunk-WCGJK4NQ.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-ZAP7BKTZ.js";
35
+ } from "./chunk-GZMHBRIR.js";
36
36
  import {
37
37
  SharedContextManager
38
38
  } from "./chunk-5KBIOI4G.js";
@@ -47,6 +47,9 @@ import {
47
47
  import {
48
48
  extractTopics
49
49
  } from "./chunk-KVDUKH5E.js";
50
+ import {
51
+ buildTemporalTimelineRecallSection
52
+ } from "./chunk-VHF73MGU.js";
50
53
  import {
51
54
  CODEX_THREAD_KEY_PREFIX
52
55
  } from "./chunk-4EX5WZ4M.js";
@@ -63,9 +66,6 @@ import {
63
66
  buildTargetedFactRecallSection,
64
67
  shouldRecallTargetedFactEvidence
65
68
  } from "./chunk-T67LUYCR.js";
66
- import {
67
- buildTemporalTimelineRecallSection
68
- } from "./chunk-VHF73MGU.js";
69
69
  import {
70
70
  memoriesToStandingEntries,
71
71
  prefixStandingMemoryBlock,
@@ -74,24 +74,12 @@ import {
74
74
  import {
75
75
  SessionObserverState
76
76
  } from "./chunk-ODZKV2F7.js";
77
- import {
78
- applyRuntimeRetrievalPolicy
79
- } from "./chunk-5IZL4DCV.js";
80
- import {
81
- RerankCache,
82
- reorderByRankedKeys,
83
- rerankLocalOrNoop
84
- } from "./chunk-LUDXM7MD.js";
85
- import {
86
- buildResponseGuidanceRecallSection,
87
- shouldRecallResponseGuidance
88
- } from "./chunk-6TCXIRP5.js";
89
77
  import {
90
78
  mergeWithAgentResults,
91
79
  runDirectAgent,
92
80
  runTemporalAgent,
93
81
  shouldRunAgent
94
- } from "./chunk-JFI3ATK4.js";
82
+ } from "./chunk-XMYWYJM2.js";
95
83
  import {
96
84
  clearIndexesAsync,
97
85
  deindexMemoriesBatchAsync,
@@ -108,15 +96,27 @@ import {
108
96
  resolvePromptTagPrefilterAsync
109
97
  } from "./chunk-ZOKZIR5K.js";
110
98
  import {
111
- findUnresolvedEntityRefs
112
- } from "./chunk-X7XN6YU4.js";
99
+ applyRuntimeRetrievalPolicy
100
+ } from "./chunk-5IZL4DCV.js";
113
101
  import {
114
102
  RelevanceStore
115
103
  } from "./chunk-X7J56GPG.js";
104
+ import {
105
+ RerankCache,
106
+ reorderByRankedKeys,
107
+ rerankLocalOrNoop
108
+ } from "./chunk-LUDXM7MD.js";
109
+ import {
110
+ buildResponseGuidanceRecallSection,
111
+ shouldRecallResponseGuidance
112
+ } from "./chunk-6TCXIRP5.js";
113
+ import {
114
+ findUnresolvedEntityRefs
115
+ } from "./chunk-X7XN6YU4.js";
116
116
  import {
117
117
  indexStateViewAnnotatedResults,
118
118
  resolveRecallStateViewActive
119
- } from "./chunk-RGKXF4W3.js";
119
+ } from "./chunk-E5IEI2MR.js";
120
120
  import {
121
121
  applyRecallStateViews
122
122
  } from "./chunk-DBB5JPSL.js";
@@ -128,15 +128,15 @@ import {
128
128
  import {
129
129
  reorderRecallResultsWithMmr
130
130
  } from "./chunk-IIK2PD3F.js";
131
- import {
132
- applyReasoningTraceBoost
133
- } from "./chunk-EVWDNKQA.js";
134
131
  import {
135
132
  compactRecallContextFromBuckets,
136
133
  decideRecallContextComposition,
137
134
  notifyContextComposition,
138
135
  recallFailureComposition
139
136
  } from "./chunk-YK7ZJPQM.js";
137
+ import {
138
+ applyReasoningTraceBoost
139
+ } from "./chunk-EVWDNKQA.js";
140
140
  import {
141
141
  installPrioritizedEmbedding
142
142
  } from "./chunk-ROI7BK7H.js";
@@ -154,12 +154,6 @@ import {
154
154
  import {
155
155
  runLiveConnectorsOnce
156
156
  } from "./chunk-APYY5CX3.js";
157
- import {
158
- classifyMemoryKind
159
- } from "./chunk-YAZNBMNF.js";
160
- import {
161
- scoreEvidencePathDetail
162
- } from "./chunk-XXSOVESA.js";
163
157
  import {
164
158
  deriveHarmonicRecords,
165
159
  harmonicEntityReferenceMatches,
@@ -168,15 +162,27 @@ import {
168
162
  persistHarmonicRecords
169
163
  } from "./chunk-LQ5SS4OP.js";
170
164
  import {
171
- ExtractionEngine
172
- } from "./chunk-QO5KDQGG.js";
165
+ classifyMemoryKind
166
+ } from "./chunk-YAZNBMNF.js";
173
167
  import {
174
- parseMemoryActionEligibilityContext
175
- } from "./chunk-JHU4EYDV.js";
168
+ scoreEvidencePathDetail
169
+ } from "./chunk-XXSOVESA.js";
176
170
  import {
177
171
  buildFocusedListRecallSection,
178
172
  shouldRecallFocusedListEvidence
179
173
  } from "./chunk-OH7QLI6W.js";
174
+ import {
175
+ chunkExtractionWindow,
176
+ classifyDrainResult,
177
+ extractionWindowBudgetChars,
178
+ mergeDrainResults
179
+ } from "./chunk-VA3GNAWQ.js";
180
+ import {
181
+ ExtractionEngine
182
+ } from "./chunk-NFJWB27H.js";
183
+ import {
184
+ parseMemoryActionEligibilityContext
185
+ } from "./chunk-JHU4EYDV.js";
180
186
  import {
181
187
  recordJudgeTrainingPair
182
188
  } from "./chunk-PWFCHOB3.js";
@@ -187,9 +193,12 @@ import {
187
193
  judgeFactDurability,
188
194
  validateProcedureExtraction
189
195
  } from "./chunk-TJ5YGCPV.js";
196
+ import {
197
+ buildExplicitCueRecallSection
198
+ } from "./chunk-TVIVY7KU.js";
190
199
  import {
191
200
  buildEventOrderRecallSection
192
- } from "./chunk-645WOU5I.js";
201
+ } from "./chunk-H7BZBSP6.js";
193
202
  import {
194
203
  shouldRecallEventOrderEvidence
195
204
  } from "./chunk-BUYVPUEM.js";
@@ -197,29 +206,26 @@ import {
197
206
  pickFactEventTimeAnchor,
198
207
  resolveFactEventTime
199
208
  } from "./chunk-IAIPNEHD.js";
200
- import {
201
- buildExplicitCueRecallSection
202
- } from "./chunk-TVIVY7KU.js";
203
209
  import {
204
210
  buildEntityRecallSection,
205
211
  entityRecentTranscriptLookbackHours,
206
212
  readRecentEntityTranscriptEntries
207
- } from "./chunk-3AODCBKX.js";
213
+ } from "./chunk-IWDFHVPJ.js";
208
214
  import {
209
215
  planEpisodeWindowsWithFallback
210
216
  } from "./chunk-T3GIETKV.js";
211
- import {
212
- tryDirectAnswer
213
- } from "./chunk-5IIQU4JZ.js";
214
217
  import {
215
218
  EmbeddingFallback
216
219
  } from "./chunk-DZPTR2XQ.js";
220
+ import {
221
+ tryDirectAnswer
222
+ } from "./chunk-5IIQU4JZ.js";
217
223
  import {
218
224
  formatDaySummaryMemories
219
225
  } from "./chunk-7G5NTS7F.js";
220
226
  import {
221
227
  refreshConvergedNamespaces
222
- } from "./chunk-OKKBOTRA.js";
228
+ } from "./chunk-SLVR3U4E.js";
223
229
  import {
224
230
  builtInConnectorPackageSpecifier,
225
231
  ensureBuiltInWearableConnectors,
@@ -228,7 +234,7 @@ import {
228
234
  runTimelinePublishCli,
229
235
  screenCandidateFact,
230
236
  summarizeVaultPublish
231
- } from "./chunk-SWZOAQUM.js";
237
+ } from "./chunk-HSNV4CSW.js";
232
238
  import {
233
239
  normalizeReplaySessionKey
234
240
  } from "./chunk-AJVLDJU6.js";
@@ -238,14 +244,14 @@ import {
238
244
  import {
239
245
  compareVerifiedEpisodeResults,
240
246
  searchVerifiedEpisodes
241
- } from "./chunk-QOUKZ2N3.js";
247
+ } from "./chunk-XXW3P3RX.js";
242
248
  import {
243
249
  ThreadingManager
244
250
  } from "./chunk-R7WYAXPO.js";
245
251
  import {
246
252
  compareVerifiedSemanticRuleResults,
247
253
  searchVerifiedSemanticRules
248
- } from "./chunk-I75BWXRZ.js";
254
+ } from "./chunk-F2RDRE7M.js";
249
255
  import {
250
256
  searchWorkProductLedgerEntries
251
257
  } from "./chunk-B2NXOVZN.js";
@@ -258,10 +264,10 @@ import {
258
264
  import {
259
265
  runNamespaceMaintenanceFanout,
260
266
  summarizeNamespaceMaintenanceHealth
261
- } from "./chunk-CVMAOPAH.js";
267
+ } from "./chunk-XXBCUIYQ.js";
262
268
  import {
263
269
  planNamespaceMaintenance
264
- } from "./chunk-AYBAC2N4.js";
270
+ } from "./chunk-LWIU5BMA.js";
265
271
  import {
266
272
  isAboveImportanceThreshold,
267
273
  scoreImportance
@@ -290,10 +296,10 @@ import {
290
296
  materializeAfterSemanticConsolidation,
291
297
  parseConsolidationResponse,
292
298
  parseOperatorAwareConsolidationResponse
293
- } from "./chunk-POGPI5GR.js";
299
+ } from "./chunk-AY6LO7GD.js";
294
300
  import {
295
301
  SmartBuffer
296
- } from "./chunk-XHVO3CGX.js";
302
+ } from "./chunk-JGS55BAS.js";
297
303
  import {
298
304
  semanticChunkContent
299
305
  } from "./chunk-2GBFKHBZ.js";
@@ -329,7 +335,7 @@ import {
329
335
  embeddingsFromCosineHits,
330
336
  normalizeConnectorScope,
331
337
  runSeedGraduationPass
332
- } from "./chunk-3PLAL2KP.js";
338
+ } from "./chunk-FJ264QBP.js";
333
339
  import {
334
340
  compileCorrectionRule,
335
341
  correctionsFilePath,
@@ -367,7 +373,7 @@ import {
367
373
  } from "./chunk-QW27DOHG.js";
368
374
  import {
369
375
  MeetingsInputError
370
- } from "./chunk-FQFMLOAC.js";
376
+ } from "./chunk-XLUMO5H2.js";
371
377
  import {
372
378
  WearablesInputError,
373
379
  describeErrorForOperator
@@ -382,10 +388,10 @@ import {
382
388
  import {
383
389
  removeNodeEdgesForRewrite,
384
390
  rollbackNodeEdgeRewrite
385
- } from "./chunk-FZVZYU5C.js";
391
+ } from "./chunk-LXN737FX.js";
386
392
  import {
387
393
  NamespaceCatalog
388
- } from "./chunk-FGEY2AGV.js";
394
+ } from "./chunk-7BCYAJKP.js";
389
395
  import {
390
396
  RecallResultFormatter,
391
397
  SessionContextCoordinator,
@@ -394,10 +400,10 @@ import {
394
400
  detectPassiveCorrections,
395
401
  renderSessionExperiencePreview,
396
402
  scoreSessionExperienceForPrompt
397
- } from "./chunk-TAEJ2MRR.js";
403
+ } from "./chunk-QFD7OANX.js";
398
404
  import {
399
405
  importCapsule
400
- } from "./chunk-STM4T335.js";
406
+ } from "./chunk-IJH6METJ.js";
401
407
  import {
402
408
  isCodingGraphInstalled
403
409
  } from "./chunk-VQ7B2Q6M.js";
@@ -414,7 +420,7 @@ import {
414
420
  } from "./chunk-JWX2Q6HS.js";
415
421
  import {
416
422
  HourlySummarizer
417
- } from "./chunk-2AKIVSHP.js";
423
+ } from "./chunk-FAKRTS3Y.js";
418
424
  import {
419
425
  LastRecallStore,
420
426
  RecallHandleHistoryStore,
@@ -423,7 +429,7 @@ import {
423
429
  } from "./chunk-HTTZ3GJ6.js";
424
430
  import {
425
431
  buildXraySnapshot
426
- } from "./chunk-GGI6FLO6.js";
432
+ } from "./chunk-VHBGJAYC.js";
427
433
  import {
428
434
  objectiveStateStoreOverrideForNamespace,
429
435
  searchObjectiveStateSnapshots
@@ -434,10 +440,10 @@ import {
434
440
  isTopLevelArchivePath,
435
441
  journalPath,
436
442
  writeJournalFile
437
- } from "./chunk-6JEEY42N.js";
443
+ } from "./chunk-AER3HD3B.js";
438
444
  import {
439
445
  searchHarmonicRetrieval
440
- } from "./chunk-JF3MEIHO.js";
446
+ } from "./chunk-O67H7OXJ.js";
441
447
  import {
442
448
  ProfilingCollector
443
449
  } from "./chunk-DOWACHYO.js";
@@ -450,7 +456,7 @@ import {
450
456
  } from "./chunk-LTHVM4XN.js";
451
457
  import {
452
458
  shouldSkipImplicitExtraction
453
- } from "./chunk-EHIKY2IA.js";
459
+ } from "./chunk-WU5WTCH5.js";
454
460
  import {
455
461
  composeRecallContext,
456
462
  contextBudgetForFooter,
@@ -458,15 +464,15 @@ import {
458
464
  renderAuthorityBoundContent,
459
465
  selectCuriosityQuestion
460
466
  } from "./chunk-NVKO5YKP.js";
461
- import {
462
- NamespaceStorageRouter
463
- } from "./chunk-SZPPCEYT.js";
464
467
  import {
465
468
  pruneOrphanCueAnchors
466
469
  } from "./chunk-LXATZLSC.js";
470
+ import {
471
+ NamespaceStorageRouter
472
+ } from "./chunk-GDOI4U4D.js";
467
473
  import {
468
474
  GraphIndex
469
- } from "./chunk-QKXPOLQD.js";
475
+ } from "./chunk-WUBGMV3G.js";
470
476
  import {
471
477
  GraphEdgeAppendError
472
478
  } from "./chunk-GKCXTSFF.js";
@@ -474,7 +480,7 @@ import {
474
480
  ExtractionDeadlineError,
475
481
  ExtractionRunCoordinator,
476
482
  classifyExtractionOrigin
477
- } from "./chunk-WEK3OUGO.js";
483
+ } from "./chunk-6X3J4NLZ.js";
478
484
  import {
479
485
  ARTIFACT_STATUS_CACHE_TTL_MS,
480
486
  BulkImportBatchPartialFailureError,
@@ -514,7 +520,7 @@ import {
514
520
  throwIfRecallAborted,
515
521
  tokenizeRecallQuery,
516
522
  utcDateKeysForLocalDay
517
- } from "./chunk-DG4H56SK.js";
523
+ } from "./chunk-UIK3U36O.js";
518
524
  import {
519
525
  inferIntentFromText,
520
526
  intentCompatibilityScore,
@@ -523,12 +529,13 @@ import {
523
529
  } from "./chunk-CSAKJVXW.js";
524
530
  import {
525
531
  LocalLlmClient
526
- } from "./chunk-74AY3S7U.js";
532
+ } from "./chunk-JNLYHJG7.js";
527
533
  import {
528
534
  buildChainFollowupGenerator
529
- } from "./chunk-6DTIYAAN.js";
535
+ } from "./chunk-UGV256H3.js";
530
536
  import {
531
537
  bufferTurnsEqual,
538
+ describeError,
532
539
  groupTurnsByExtractionScope
533
540
  } from "./chunk-KZMRMKC7.js";
534
541
  import {
@@ -555,7 +562,7 @@ import {
555
562
  } from "./chunk-QDW3E4RD.js";
556
563
  import {
557
564
  searchCausalTrajectories
558
- } from "./chunk-4P4VLPGB.js";
565
+ } from "./chunk-VECRSYQG.js";
559
566
  import {
560
567
  QmdResultResolver,
561
568
  StorageManager,
@@ -567,6 +574,7 @@ import {
567
574
  fuseDay,
568
575
  hashFusionBody,
569
576
  meetingIdDate,
577
+ normalizeFlatQmdResults,
570
578
  parseEntityFile,
571
579
  parseFusionDay,
572
580
  qmdCollectionPathParts,
@@ -574,7 +582,7 @@ import {
574
582
  reconstructFusionInputs,
575
583
  selfDeps,
576
584
  serializeFusionDay
577
- } from "./chunk-WCBLPKG3.js";
585
+ } from "./chunk-BIYVUPC6.js";
578
586
  import {
579
587
  bodyIsEscaped,
580
588
  decodeTranscriptBody,
@@ -591,12 +599,12 @@ import {
591
599
  import {
592
600
  NamespaceSearchRouter,
593
601
  namespaceCollectionName
594
- } from "./chunk-LHBOFROT.js";
602
+ } from "./chunk-CHNZPOWX.js";
595
603
  import {
596
604
  createConversationIndexRuntime,
597
605
  createSearchBackend,
598
606
  isSearchBackendEnabled
599
- } from "./chunk-P5CUEB2Q.js";
607
+ } from "./chunk-4QLKVZH6.js";
600
608
  import {
601
609
  NoopSearchBackend
602
610
  } from "./chunk-CYEPCZN5.js";
@@ -620,7 +628,7 @@ import {
620
628
  import {
621
629
  canonicalSemanticFileText,
622
630
  casCommittedRevisionOf
623
- } from "./chunk-YQ6SLFNZ.js";
631
+ } from "./chunk-MPJDQC4G.js";
624
632
  import {
625
633
  applyDirectorySidecarDrillDown,
626
634
  isDirectorySidecarsEnabledForDir,
@@ -699,14 +707,14 @@ import {
699
707
  } from "./chunk-PJKTFXE2.js";
700
708
  import {
701
709
  confidenceTier
702
- } from "./chunk-UFM3PJDT.js";
710
+ } from "./chunk-PARM6OYL.js";
703
711
  import {
704
712
  extractJsonCandidates
705
713
  } from "./chunk-YBA52OKG.js";
706
714
  import {
707
715
  localDayKey,
708
716
  renderDayLocationContext
709
- } from "./chunk-VGFNTY3Y.js";
717
+ } from "./chunk-YFXRLRKP.js";
710
718
  import {
711
719
  activityDayWindow,
712
720
  assertValidTimezone,
@@ -718,7 +726,7 @@ import {
718
726
  TAG_LIMITS,
719
727
  composeMemoryEnvelope,
720
728
  isMemoryCategory
721
- } from "./chunk-TDCR6PQL.js";
729
+ } from "./chunk-TWRPWJJT.js";
722
730
  import {
723
731
  normalizeTags
724
732
  } from "./chunk-BT7NVCML.js";
@@ -726,7 +734,7 @@ import {
726
734
  evaluateSubjectGuard,
727
735
  isSharedPromotionTarget,
728
736
  resolveWriteSubject
729
- } from "./chunk-E5PVMB3I.js";
737
+ } from "./chunk-SDXBR5QO.js";
730
738
  import {
731
739
  CAPSULE_ID_PATTERN
732
740
  } from "./chunk-WEHSQBFR.js";
@@ -766,7 +774,7 @@ import {
766
774
  } from "./chunk-PWPIERBM.js";
767
775
  import {
768
776
  ContentHashIndex
769
- } from "./chunk-UBN5AOLT.js";
777
+ } from "./chunk-W5EO4USJ.js";
770
778
  import {
771
779
  normalizeAttributePairs,
772
780
  stripAttributesSuffix
@@ -782,7 +790,7 @@ import {
782
790
  } from "./chunk-JAKIDQB2.js";
783
791
  import {
784
792
  storageBackedIndexStoreIo
785
- } from "./chunk-I73ZSORJ.js";
793
+ } from "./chunk-OXSTKCYK.js";
786
794
  import {
787
795
  assertIsDirectoryNotSymlink,
788
796
  assertRealpathInsideRoot
@@ -864,7 +872,7 @@ import {
864
872
  } from "./chunk-LDPPTPO5.js";
865
873
  import {
866
874
  SecureStoreLockedError
867
- } from "./chunk-TYGLV6ZG.js";
875
+ } from "./chunk-EYGOM6AI.js";
868
876
  import {
869
877
  assertPathInsideRoot
870
878
  } from "./chunk-C7HJ3NEI.js";
@@ -883,7 +891,7 @@ import {
883
891
 
884
892
  // src/orchestrator.ts
885
893
  import path23 from "path";
886
- import { createHash as createHash9 } from "crypto";
894
+ import { createHash as createHash10 } from "crypto";
887
895
 
888
896
  // src/orchestration/tier-migration-coordinator.ts
889
897
  import path from "path";
@@ -14698,7 +14706,7 @@ var RecallSearchPipelineCoordinator = class {
14698
14706
  if (qmdRecallBudgetEnabled && Date.now() - startedAtMs >= qmdRecallBudgetMs) {
14699
14707
  break;
14700
14708
  }
14701
- const primaryResults = options.collection ? options.abortSignal ? await this.deps.qmd.search(
14709
+ let primaryResults = options.collection ? options.abortSignal ? await this.deps.qmd.search(
14702
14710
  prompt,
14703
14711
  options.collection,
14704
14712
  fetchLimit,
@@ -14724,6 +14732,7 @@ var RecallSearchPipelineCoordinator = class {
14724
14732
  onDegradation: options.onDegradation
14725
14733
  }
14726
14734
  });
14735
+ primaryResults = normalizeFlatQmdResults(primaryResults, this.deps.config, options.collection);
14727
14736
  lastPrimaryResultCount = primaryResults.length;
14728
14737
  lastHybridResultCount = 0;
14729
14738
  lastHybridTopUpUsed = false;
@@ -14739,7 +14748,7 @@ var RecallSearchPipelineCoordinator = class {
14739
14748
  } else if (this.deps.config.qmdSearchStrategy === "lex") {
14740
14749
  lastHybridTopUpSkippedReason = "lex_strategy";
14741
14750
  } else {
14742
- const hybridResults = options.collection ? await this.deps.qmd.hybridSearch(
14751
+ let hybridResults = options.collection ? await this.deps.qmd.hybridSearch(
14743
14752
  prompt,
14744
14753
  options.collection,
14745
14754
  fetchLimit,
@@ -14757,6 +14766,7 @@ var RecallSearchPipelineCoordinator = class {
14757
14766
  onDegradation: options.onDegradation
14758
14767
  }
14759
14768
  });
14769
+ hybridResults = normalizeFlatQmdResults(hybridResults, this.deps.config, options.collection);
14760
14770
  lastHybridResultCount = hybridResults.length;
14761
14771
  lastHybridTopUpUsed = hybridResults.length > 0;
14762
14772
  if (hybridResults.length > 0) {
@@ -14927,9 +14937,7 @@ var RecallSearchPipelineCoordinator = class {
14927
14937
  );
14928
14938
  coldQmdObserverActive = false;
14929
14939
  if (longTerm.length > 0) {
14930
- log.debug(
14931
- `cold-tier recall source=cold-qmd collection=${coldCollection} hits=${longTerm.length}`
14932
- );
14940
+ log.debug(`cold-tier recall source=cold-qmd collection=${coldCollection} hits=${longTerm.length}`);
14933
14941
  }
14934
14942
  }
14935
14943
  }
@@ -15096,9 +15104,7 @@ var RecallSearchPipelineCoordinator = class {
15096
15104
  }
15097
15105
  }
15098
15106
  if (caps.rerank && this.deps.config.rerankProvider === "cloud") {
15099
- log.debug(
15100
- "rerankProvider=cloud is reserved/experimental in v2.2.0; skipping rerank"
15101
- );
15107
+ log.debug("rerankProvider=cloud is reserved/experimental in v2.2.0; skipping rerank");
15102
15108
  }
15103
15109
  if (caps.recallTrustScore && results.length > 0) {
15104
15110
  try {
@@ -15246,6 +15252,9 @@ var RecallSearchPipelineCoordinator = class {
15246
15252
  const stateViewBuilt = stateViewActive ? new Array(results.length).fill(null) : null;
15247
15253
  const buildRecallRow = (r, memory) => ({
15248
15254
  ...r,
15255
+ // Render loaded flat memories, not QMD's front-matter/chunk preview (#3194).
15256
+ snippet: memory && !resolveNamespaceCapabilities(this.deps.config).namespaces ? memory.content : r.snippet,
15257
+ line: memory && !resolveNamespaceCapabilities(this.deps.config).namespaces ? void 0 : r.line,
15249
15258
  sourceConnector: memory ? memory.frontmatter.sourceConnector : void 0,
15250
15259
  origin: memory ? memory.frontmatter.origin : void 0,
15251
15260
  // #1952: an active state view carries the chain fields the inject
@@ -15385,9 +15394,7 @@ var RecallSearchPipelineCoordinator = class {
15385
15394
  }
15386
15395
  }
15387
15396
  if (connectorPartitionFilteredCount > 0) {
15388
- log.debug(
15389
- `connector partition filter removed ${connectorPartitionFilteredCount} tool-scoped candidates from recall`
15390
- );
15397
+ log.debug(`connector partition filter removed ${connectorPartitionFilteredCount} tool-scoped candidates from recall`);
15391
15398
  }
15392
15399
  if (supportPassportFilteredCount > 0) {
15393
15400
  log.debug(
@@ -15640,7 +15647,184 @@ var RecallSearchPipelineCoordinator = class {
15640
15647
  };
15641
15648
 
15642
15649
  // src/orchestration/turn-ingestion.ts
15643
- import { createHash as createHash8, randomBytes } from "crypto";
15650
+ import { createHash as createHash9, randomBytes } from "crypto";
15651
+
15652
+ // src/orchestration/extraction-drain.ts
15653
+ import { createHash as createHash8 } from "crypto";
15654
+ function chunkFingerprint(chunk) {
15655
+ const hash = createHash8("sha256");
15656
+ for (const turn of chunk) hash.update(`${turn.role}\0${turn.timestamp}\0${turn.content}`);
15657
+ return hash.digest("hex");
15658
+ }
15659
+ var ExtractionDrain = class {
15660
+ constructor(deps) {
15661
+ this.deps = deps;
15662
+ }
15663
+ deps;
15664
+ /**
15665
+ * Consecutive failed attempts on the head chunk, per buffer key. In memory on
15666
+ * purpose (a restart re-counts from zero). Bound to the chunk's content: a
15667
+ * count recorded for one chunk never applies to a different one, so a force
15668
+ * flush that clears a failing chunk cannot make unrelated content inherit its
15669
+ * failures.
15670
+ */
15671
+ failures = /* @__PURE__ */ new Map();
15672
+ /**
15673
+ * Buffer key to the first turn of the chunk a qualified window stopped on.
15674
+ * The rest of such a window stays eligible on the next attempt even when it
15675
+ * is assistant-only or short: the window passed the thresholds as a whole,
15676
+ * and re-judging its tail would clear it unextracted. Cleared when the
15677
+ * window drains; one entry per key.
15678
+ */
15679
+ qualified = /* @__PURE__ */ new Map();
15680
+ /** Characters the coordinator would count for this window: user/assistant text, trimmed and capped per turn, context-only turns left out. */
15681
+ windowChars(turns) {
15682
+ let total = 0;
15683
+ for (const turn of turns) {
15684
+ if (turn.role !== "user" && turn.role !== "assistant" || turn.extractionContextOnly === true) continue;
15685
+ total += turn.content.trim().slice(0, this.deps.config.extractionMaxTurnChars).length;
15686
+ }
15687
+ return total;
15688
+ }
15689
+ failureCount(bufferKey, chunk) {
15690
+ const entry = this.failures.get(bufferKey);
15691
+ return entry && entry.fingerprint === chunkFingerprint(chunk) ? entry.count : 0;
15692
+ }
15693
+ setFailureCount(bufferKey, chunk, count) {
15694
+ if (count <= 0) this.failures.delete(bufferKey);
15695
+ else this.failures.set(bufferKey, { fingerprint: chunkFingerprint(chunk), count });
15696
+ }
15697
+ /**
15698
+ * Run `runExtraction` over the trigger-drain window. When the window outgrows
15699
+ * the extraction model's input budget (the stall that keeps a session's buffer
15700
+ * growing forever: every observe re-fires the trigger on a window that can
15701
+ * never extract), split it into budget-fitting chunks and drain them in
15702
+ * order; each successful run clears its chunk, so the buffer shrinks across
15703
+ * observes. A chunk that fails `extractionChunkDropAfterFailures` times in a
15704
+ * row is dropped (side-file copy first). Breaker/backoff retention results
15705
+ * stop the drain without counting as chunk failures.
15706
+ *
15707
+ * Explicit drains (replay/import `clearBufferAfterExtraction: false`, force
15708
+ * flush, fail-closed callers, accepted captures) and windows that fit the
15709
+ * budget (or hosts without the budget accessor) take the single-run path.
15710
+ *
15711
+ * `preemptable`: the run was queued as preemptable automatic work. Each chunk's
15712
+ * persist step ends the host's preemption registration, so the drain registers
15713
+ * it again before every later chunk; a fail-closed flush can then abort the
15714
+ * next chunk's model request instead of waiting behind the whole window.
15715
+ */
15716
+ async run(turns, runOptions, preemptable = false) {
15717
+ const budgetChars = this.deps.extractionWindowBudgetChars?.() ?? Number.POSITIVE_INFINITY;
15718
+ const chunkable = runOptions.clearBufferAfterExtraction && !runOptions.forceExtractionAttempt && !runOptions.failOnExtractionFailure && !turns.some((turn) => turn.acceptedCapture === true) && Number.isFinite(budgetChars) && budgetChars > 0;
15719
+ const chunks = chunkable ? chunkExtractionWindow(turns, budgetChars) : [];
15720
+ const resumed = chunks.length > 0 && this.qualified.get(runOptions.bufferKey) === chunkFingerprint(chunks[0].slice(0, 1));
15721
+ if (chunks.length <= 1 && !resumed) return await this.deps.runExtraction(turns, runOptions);
15722
+ if (!resumed) {
15723
+ const windowUserTurns = turns.filter((turn) => turn.role === "user").length;
15724
+ const belowChars = !runOptions.skipCharThreshold && this.windowChars(turns) < this.deps.config.extractionMinChars;
15725
+ if (!runOptions.skipUserTurnThreshold && windowUserTurns < this.deps.config.extractionMinUserTurns || belowChars) {
15726
+ return await this.deps.runExtraction(turns, runOptions);
15727
+ }
15728
+ }
15729
+ const baseOptions = { ...runOptions, skipCharThreshold: true, skipUserTurnThreshold: true };
15730
+ const bufferKey = runOptions.bufferKey;
15731
+ const byIdentity = runOptions.clearMatchingTurns === true;
15732
+ const dropAfter = this.deps.config.extractionChunkDropAfterFailures;
15733
+ let aggregate = null;
15734
+ for (const [position, chunk] of chunks.entries()) {
15735
+ this.qualified.set(bufferKey, chunkFingerprint(chunk.slice(0, 1)));
15736
+ let chunkOptions = { ...baseOptions, retentionWindow: chunks.slice(0, position + 1).flat() };
15737
+ let preempt;
15738
+ if (preemptable && position > 0) {
15739
+ const local = new AbortController();
15740
+ preempt = local;
15741
+ this.deps.extractionQueueCoordinator.beginPreemptable(() => local.abort(preemptedExtractionError()));
15742
+ chunkOptions = {
15743
+ ...chunkOptions,
15744
+ abortSignal: runOptions.abortSignal ? AbortSignal.any([runOptions.abortSignal, local.signal]) : local.signal
15745
+ };
15746
+ }
15747
+ let failures = this.failureCount(bufferKey, chunk);
15748
+ let result;
15749
+ try {
15750
+ result = await this.deps.runExtraction(chunk, chunkOptions);
15751
+ } catch (err) {
15752
+ if (isAbortError(err)) throw preempt && preempt.signal.aborted && !runOptions.abortSignal?.aborted ? preempt.signal.reason : err;
15753
+ failures += 1;
15754
+ if (failures < dropAfter) {
15755
+ this.setFailureCount(bufferKey, chunk, failures);
15756
+ throw err;
15757
+ }
15758
+ const thrown = {
15759
+ status: "skipped",
15760
+ reason: `thrown: ${describeError(err)}`,
15761
+ persistedCount: 0,
15762
+ durableOutputCount: 0
15763
+ };
15764
+ if (!await this.dropFailedChunk(bufferKey, chunk, dropAfter, thrown, byIdentity)) {
15765
+ this.setFailureCount(bufferKey, chunk, failures);
15766
+ throw err;
15767
+ }
15768
+ this.setFailureCount(bufferKey, chunk, 0);
15769
+ continue;
15770
+ }
15771
+ const verdict = classifyDrainResult(result);
15772
+ if (verdict === "drained") {
15773
+ this.setFailureCount(bufferKey, chunk, 0);
15774
+ aggregate = mergeDrainResults(aggregate, result);
15775
+ continue;
15776
+ }
15777
+ if (verdict === "deferred") return mergeDrainResults(aggregate, result);
15778
+ if (result.failureClass === "provider_retryable" || result.failureClass === "auth_config") {
15779
+ return mergeDrainResults(aggregate, result);
15780
+ }
15781
+ failures += 1;
15782
+ if (failures >= dropAfter) {
15783
+ if (!await this.dropFailedChunk(bufferKey, chunk, dropAfter, result, byIdentity)) {
15784
+ this.setFailureCount(bufferKey, chunk, failures);
15785
+ return mergeDrainResults(aggregate, result);
15786
+ }
15787
+ this.setFailureCount(bufferKey, chunk, 0);
15788
+ aggregate = mergeDrainResults(aggregate, result);
15789
+ continue;
15790
+ }
15791
+ this.setFailureCount(bufferKey, chunk, failures);
15792
+ return mergeDrainResults(aggregate, result);
15793
+ }
15794
+ this.qualified.delete(bufferKey);
15795
+ return aggregate ?? { status: "skipped", persistedCount: 0, durableOutputCount: 0 };
15796
+ }
15797
+ /** Side-file copy first (content survives a failed drop), then remove the failing chunk from the buffer. Never throws:
15798
+ * the drop must not fail the extraction task that already settled its result. */
15799
+ async dropFailedChunk(bufferKey, chunk, dropAfter, result, byIdentity) {
15800
+ const reason = `dropped after ${dropAfter} repeated extraction failures (last result: status=${result.status} reason=${result.reason ?? "n/a"})`;
15801
+ try {
15802
+ const storage = await this.deps.getStorage();
15803
+ const path41 = await storage.saveDroppedExtractionChunk(bufferKey, reason, chunk);
15804
+ log.warn(`buffer[${bufferKey}]: dropping ${chunk.length} turns \u2014 ${reason}; copy saved to ${path41}`);
15805
+ } catch (err) {
15806
+ log.warn(
15807
+ `buffer[${bufferKey}]: could not save the dropped-chunk recovery copy; keeping the chunk in the buffer: ${describeError(err)}`
15808
+ );
15809
+ return false;
15810
+ }
15811
+ try {
15812
+ const dropped = await this.deps.buffer.dropExtractionChunk(bufferKey, chunk, { allowNonPrefix: byIdentity });
15813
+ if (dropped > 0) {
15814
+ log.warn(`buffer[${bufferKey}]: removed ${dropped} buffered turns \u2014 ${reason}`);
15815
+ return true;
15816
+ }
15817
+ log.warn(`buffer[${bufferKey}]: dropped chunk no longer matches the buffer; keeping it and its failure count`);
15818
+ } catch (err) {
15819
+ log.warn(
15820
+ `buffer[${bufferKey}]: failed to remove dropped chunk from buffer (will retry next trigger): ${describeError(err)}`
15821
+ );
15822
+ }
15823
+ return false;
15824
+ }
15825
+ };
15826
+
15827
+ // src/orchestration/turn-ingestion.ts
15644
15828
  var ReplayAdmissionRefusedError = class extends Error {
15645
15829
  constructor(message) {
15646
15830
  super(message);
@@ -15653,10 +15837,13 @@ function isFlushPlanRecoveryTurn(turn) {
15653
15837
  return typeof provenance?.sourceId === "string" && /:flush-plan(:\d+\/\d+)?$/.test(provenance.sourceId);
15654
15838
  }
15655
15839
  var TurnIngestionCoordinator = class {
15840
+ // chunked trigger-drain (extraction-drain.ts)
15656
15841
  constructor(deps) {
15657
15842
  this.deps = deps;
15843
+ this.drain = new ExtractionDrain(deps);
15658
15844
  }
15659
15845
  deps;
15846
+ drain;
15660
15847
  async processTurn(role, content, sessionKey, options = {}) {
15661
15848
  if (role !== "user" && role !== "assistant") {
15662
15849
  log.debug(`processTurn: ignoring unsupported role=${String(role)}`);
@@ -15921,7 +16108,7 @@ var TurnIngestionCoordinator = class {
15921
16108
  const shouldUseStableBatchKey = turns.some(
15922
16109
  (turn) => turn.persistProcessedFingerprint === true || typeof turn.turnFingerprint === "string" && turn.turnFingerprint.length > 0
15923
16110
  );
15924
- const stableBatchFingerprint = shouldUseStableBatchKey ? createHash8("sha256").update(
16111
+ const stableBatchFingerprint = shouldUseStableBatchKey ? createHash9("sha256").update(
15925
16112
  turns.map(
15926
16113
  (turn) => [
15927
16114
  turn.role,
@@ -16267,7 +16454,7 @@ var TurnIngestionCoordinator = class {
16267
16454
  effectiveScopePlan = fresh;
16268
16455
  }
16269
16456
  }
16270
- const result = await this.deps.runExtraction(effectiveTurns, {
16457
+ const result = await this.drain.run(effectiveTurns, {
16271
16458
  clearBufferAfterExtraction: options.clearBufferAfterExtraction ?? true,
16272
16459
  clearMatchingTurns: options.clearMatchingTurns === true,
16273
16460
  skipCharThreshold: options.skipCharThreshold ?? false,
@@ -16282,7 +16469,7 @@ var TurnIngestionCoordinator = class {
16282
16469
  principalOverride: options.principalOverride,
16283
16470
  scopeProfileWritePlan: effectiveScopePlan,
16284
16471
  forceExtractionAttempt: options.forceExtractionAttempt === true
16285
- });
16472
+ }, preemptable);
16286
16473
  settleTask(void 0, result);
16287
16474
  } catch (err) {
16288
16475
  const reason2 = abortSignal.reason;
@@ -17674,7 +17861,7 @@ var OrchestratorInitCoordinator = class {
17674
17861
  if (signal.aborted || !this.isCurrentStartupEpoch(epoch)) return;
17675
17862
  if (!this.deps.wearablesAutoSyncHandle && this.deps.config.wearables.enabled && this.deps.config.wearables.autoSyncEnabled && Object.values(this.deps.config.wearables.sources).some((source) => source.enabled)) {
17676
17863
  try {
17677
- const { startWearablesAutoSync } = await import("./auto-sync-432USQDH.js");
17864
+ const { startWearablesAutoSync } = await import("./auto-sync-BNCBMU6H.js");
17678
17865
  if (signal.aborted || !this.isCurrentStartupEpoch(epoch)) return;
17679
17866
  this.deps.wearablesAutoSyncHandle = startWearablesAutoSync(
17680
17867
  {
@@ -22572,7 +22759,7 @@ var Orchestrator = class {
22572
22759
  utilityPromoteThresholdDelta: this.utilityRuntimeValues?.promoteThresholdDelta ?? 0,
22573
22760
  utilityDemoteThresholdDelta: this.utilityRuntimeValues?.demoteThresholdDelta ?? 0
22574
22761
  };
22575
- return createHash9("sha256").update(JSON.stringify(payload)).digest("hex").slice(0, 12);
22762
+ return createHash10("sha256").update(JSON.stringify(payload)).digest("hex").slice(0, 12);
22576
22763
  }
22577
22764
  effectiveLifecycleThresholds() {
22578
22765
  const archiveDecayThreshold = this.config.lifecycleArchiveDecayThreshold;
@@ -23381,6 +23568,22 @@ ${doc.content}` : doc.content,
23381
23568
  options
23382
23569
  );
23383
23570
  }
23571
+ /**
23572
+ * Max conversation characters the extraction model can take as input
23573
+ * (context window the ModelRegistry learned, capped by
23574
+ * `localLlmMaxContext` when set). Exposed for the trigger-drain chunking
23575
+ * in the turn-ingestion coordinator so an oversized buffer window is
23576
+ * drained in fitting chunks instead of failing whole.
23577
+ */
23578
+ extractionWindowBudgetChars() {
23579
+ if (!this.modelRegistry) return Number.POSITIVE_INFINITY;
23580
+ return extractionWindowBudgetChars({
23581
+ registry: this.modelRegistry,
23582
+ localExtractionActive: this.config.modelSource !== "gateway" && resolveLocalLlmCapabilities(this.config).localLlm,
23583
+ model: this.config.localLlmModel,
23584
+ maxContext: this.config.localLlmMaxContext
23585
+ });
23586
+ }
23384
23587
  normalizeExtractionFingerprintTurns(turns) {
23385
23588
  return this.extractionRunCoordinator.normalizeExtractionFingerprintTurns(turns);
23386
23589
  }
@@ -29381,7 +29584,7 @@ function readVerifiedDailyNote(root, filePath) {
29381
29584
  }
29382
29585
 
29383
29586
  // src/activity/journal-state.ts
29384
- import { createHash as createHash10, randomBytes as randomBytes4 } from "crypto";
29587
+ import { createHash as createHash11, randomBytes as randomBytes4 } from "crypto";
29385
29588
  import { mkdirSync as mkdirSync2, readFileSync as readFileSync4, renameSync as renameSync2, writeFileSync as writeFileSync2 } from "fs";
29386
29589
  import path36 from "path";
29387
29590
  var STATE_DIR_NAME = "state";
@@ -29390,7 +29593,7 @@ function timelineStatePath(memoryDir) {
29390
29593
  return path36.join(memoryDir, STATE_DIR_NAME, STATE_FILE_NAME);
29391
29594
  }
29392
29595
  function hashJournalText(text) {
29393
- return createHash10("sha256").update(text, "utf8").digest("hex");
29596
+ return createHash11("sha256").update(text, "utf8").digest("hex");
29394
29597
  }
29395
29598
  function readTimelineState(memoryDir) {
29396
29599
  const filePath = timelineStatePath(memoryDir);
@@ -30226,7 +30429,7 @@ function planVaultDryRun(inputs) {
30226
30429
  }
30227
30430
 
30228
30431
  // src/session-summaries/index.ts
30229
- import { createHash as createHash11 } from "crypto";
30432
+ import { createHash as createHash12 } from "crypto";
30230
30433
  import { lstat as lstat3, mkdir as mkdir7, readFile as readFile9, readdir as readdir4, rename, rm, stat as stat4, writeFile as writeFile7 } from "fs/promises";
30231
30434
  import path39 from "path";
30232
30435
 
@@ -30728,7 +30931,7 @@ var DEFAULT_MAX_FILES = 5e3;
30728
30931
  var DEFAULT_MAX_SESSIONS = 500;
30729
30932
  var SUPPORTED_EXTENSIONS = /* @__PURE__ */ new Set([".json", ".jsonl"]);
30730
30933
  function shortHash(value, length = 16) {
30731
- return createHash11("sha256").update(value).digest("hex").slice(0, length);
30934
+ return createHash12("sha256").update(value).digest("hex").slice(0, length);
30732
30935
  }
30733
30936
  async function listTranscriptFiles(root, maxFiles) {
30734
30937
  const out = [];
@@ -31367,4 +31570,4 @@ export {
31367
31570
  qmdStartupCollectionChecksWithTimeout,
31368
31571
  Orchestrator
31369
31572
  };
31370
- //# sourceMappingURL=chunk-LOMSBYNS.js.map
31573
+ //# sourceMappingURL=chunk-RPHCSMTQ.js.map