@remnic/core 10.0.156 → 10.0.158

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 (266) hide show
  1. package/dist/access-admin-ops-surface.js +97 -96
  2. package/dist/access-cli.js +97 -96
  3. package/dist/access-cli.js.map +1 -1
  4. package/dist/access-extraction-force-flush-preempt.js +97 -96
  5. package/dist/access-extraction-force-flush.js +97 -96
  6. package/dist/access-http-briefing.js +97 -96
  7. package/dist/access-http-query.js +97 -96
  8. package/dist/access-http.js +97 -96
  9. package/dist/access-identity-continuity-surface.js +97 -96
  10. package/dist/access-lcm-surface.js +97 -96
  11. package/dist/access-mcp.js +97 -96
  12. package/dist/access-observe-write-category.js +7 -7
  13. package/dist/access-observe-write-surface.js +97 -96
  14. package/dist/access-offline-manifest.js +3 -3
  15. package/dist/access-operations-batch.js +97 -96
  16. package/dist/access-operations.js +97 -96
  17. package/dist/access-recall-concurrency.js +97 -96
  18. package/dist/access-recall-response.js +97 -96
  19. package/dist/access-recall-surface.js +97 -96
  20. package/dist/access-schema.js +4 -4
  21. package/dist/access-service.js +97 -96
  22. package/dist/active-recall.js +11 -11
  23. package/dist/{auto-sync-PSZJHHXB.js → auto-sync-L3M4RKJD.js} +4 -4
  24. package/dist/briefing.js +11 -11
  25. package/dist/buffer.js +4 -4
  26. package/dist/calibration.js +5 -5
  27. package/dist/{capsule-crypto-7FJQINUR.js → capsule-crypto-YO5QJ6L3.js} +2 -2
  28. package/dist/causal-consolidation.js +12 -12
  29. package/dist/{chunk-BTNNL7ZW.js → chunk-2GJCSYSF.js} +3 -3
  30. package/dist/chunk-2GJCSYSF.js.map +1 -0
  31. package/dist/{chunk-ZZYJNT2J.js → chunk-2MWKUVHT.js} +2 -2
  32. package/dist/{chunk-WHCD4Z3D.js → chunk-2X4WP4GD.js} +2 -2
  33. package/dist/{chunk-V7IH24UG.js → chunk-2YJYBAR3.js} +3 -3
  34. package/dist/{chunk-MX5VGD6C.js → chunk-3DJ6R4CC.js} +4 -4
  35. package/dist/{chunk-SX6O25WK.js → chunk-3UKPFFMS.js} +2 -2
  36. package/dist/{chunk-V5NHW44X.js → chunk-52EM4UQU.js} +9 -9
  37. package/dist/{chunk-2G5XUS4S.js → chunk-5UE45DLK.js} +2 -2
  38. package/dist/{chunk-B57CAZPI.js → chunk-5V3IBSVB.js} +2 -2
  39. package/dist/{chunk-4LF5E2LM.js → chunk-66DUCUOC.js} +4 -4
  40. package/dist/{chunk-EDR6CVWZ.js → chunk-6PEEZSGL.js} +2 -2
  41. package/dist/{chunk-G5D5JKJJ.js → chunk-6PVS6JET.js} +2 -2
  42. package/dist/{chunk-DE6KQUAP.js → chunk-773QSFFN.js} +2 -2
  43. package/dist/{chunk-UI77UYQP.js → chunk-7IJ2H43M.js} +2 -2
  44. package/dist/{chunk-E4PME33M.js → chunk-7PCWJZXG.js} +2 -2
  45. package/dist/chunk-AMW3IDCO.js +45 -0
  46. package/dist/chunk-AMW3IDCO.js.map +1 -0
  47. package/dist/{chunk-4DCKLDYM.js → chunk-AQ6GV5MU.js} +18 -26
  48. package/dist/chunk-AQ6GV5MU.js.map +1 -0
  49. package/dist/{chunk-TE2SBFZD.js → chunk-B7F2G57I.js} +2 -2
  50. package/dist/{chunk-3BNWEHHC.js → chunk-BDFOBNLX.js} +2 -2
  51. package/dist/{chunk-PBE7NFB5.js → chunk-BNQJKWWZ.js} +4 -4
  52. package/dist/{chunk-EPTLYMQY.js → chunk-BT5TAOXG.js} +4 -4
  53. package/dist/{chunk-IMJKWVT7.js → chunk-BTCZVBV3.js} +3 -3
  54. package/dist/{chunk-2NLLXCJG.js → chunk-BXLOS5AJ.js} +2 -2
  55. package/dist/{chunk-IUAWTN2B.js → chunk-CA7XVRHZ.js} +2 -2
  56. package/dist/{chunk-4IVRQMZW.js → chunk-DF4BC5MK.js} +2 -2
  57. package/dist/{chunk-MKJBZR7J.js → chunk-DFK6AQWM.js} +2 -2
  58. package/dist/{chunk-RJ5L6LRD.js → chunk-DLR3SBOM.js} +4 -4
  59. package/dist/{chunk-QWDXHBDY.js → chunk-DQ2N7IN6.js} +129 -129
  60. package/dist/{chunk-X7Y7WX73.js → chunk-DQEMWVMT.js} +1 -1
  61. package/dist/{chunk-D7GZM7AD.js → chunk-DS24H6M4.js} +2 -2
  62. package/dist/{chunk-X7J56GPG.js → chunk-FEYPXEKE.js} +2 -2
  63. package/dist/{chunk-AGMMHT4P.js → chunk-GT2HWRST.js} +21 -3
  64. package/dist/chunk-GT2HWRST.js.map +1 -0
  65. package/dist/{chunk-VT75USBD.js → chunk-HDU3MIK3.js} +2 -2
  66. package/dist/{chunk-HIUIJ4AB.js → chunk-HIPHLFIQ.js} +2 -2
  67. package/dist/{chunk-OQGGJBXX.js → chunk-HKOGDSNS.js} +2 -2
  68. package/dist/{chunk-TNACU47L.js → chunk-I6IKSDUO.js} +2 -2
  69. package/dist/{chunk-S7U6PKKV.js → chunk-IEB6XYW6.js} +2 -2
  70. package/dist/{chunk-C6Z3H23R.js → chunk-JUYTXFDV.js} +2 -2
  71. package/dist/{chunk-SGD7PCHI.js → chunk-K3KSTSGM.js} +4 -4
  72. package/dist/{chunk-TS6UKENE.js → chunk-KTZNXQWL.js} +2 -2
  73. package/dist/{chunk-BDKLKX43.js → chunk-KYZMCH4I.js} +79 -6
  74. package/dist/{chunk-BDKLKX43.js.map → chunk-KYZMCH4I.js.map} +1 -1
  75. package/dist/{chunk-DHPGGMGL.js → chunk-MUMQWCE2.js} +2 -2
  76. package/dist/{chunk-GCVMCCX7.js → chunk-MWEJL436.js} +2 -2
  77. package/dist/{chunk-L56BEEKZ.js → chunk-MZETCZJF.js} +4 -4
  78. package/dist/{chunk-IML7HMMK.js → chunk-NBHMEYM4.js} +2 -2
  79. package/dist/{chunk-H6X7GNDW.js → chunk-NFTFMMKT.js} +2 -2
  80. package/dist/{chunk-5WZT6WQW.js → chunk-NZHZQGLB.js} +2 -2
  81. package/dist/{chunk-AO5LKFGO.js → chunk-OFSAKEZB.js} +2 -2
  82. package/dist/{chunk-6PE4O7UE.js → chunk-PCCNK3RX.js} +2 -2
  83. package/dist/{chunk-E2R5BTBB.js → chunk-PJFSSXXY.js} +2 -2
  84. package/dist/{chunk-YQJCWR4R.js → chunk-QO5WYRK2.js} +2 -2
  85. package/dist/{chunk-KQAFEZQX.js → chunk-R45L4TV6.js} +6 -6
  86. package/dist/{chunk-3OUGSOJP.js → chunk-RKJYVJZJ.js} +2 -2
  87. package/dist/{chunk-5O26UA6Z.js → chunk-RV7IYUBK.js} +5 -5
  88. package/dist/{chunk-7IGMKQWK.js → chunk-SBQOBY3S.js} +2 -2
  89. package/dist/{chunk-I7TR2OCU.js → chunk-SQXCUH4L.js} +2 -2
  90. package/dist/{chunk-XV3I7SLU.js → chunk-TBOCVPXL.js} +4 -4
  91. package/dist/{chunk-EKXMWUXE.js → chunk-TGH7AU5U.js} +8 -8
  92. package/dist/{chunk-2COHMHLQ.js → chunk-TLJV42SZ.js} +2 -2
  93. package/dist/{chunk-R4O4JDTS.js → chunk-TXVTNDQT.js} +2 -2
  94. package/dist/{chunk-U6CKHWUQ.js → chunk-UADAXWUJ.js} +15 -15
  95. package/dist/{chunk-TE46SBDJ.js → chunk-UR6COSJN.js} +4 -4
  96. package/dist/{chunk-4MZCWJVS.js → chunk-VE23DIBH.js} +2 -2
  97. package/dist/{chunk-PORCJ6NC.js → chunk-VGCK2RV3.js} +2 -2
  98. package/dist/{chunk-ZIXP27JK.js → chunk-VVVFT435.js} +2 -2
  99. package/dist/{chunk-GCOQDPOE.js → chunk-VXKPZ6BO.js} +2 -2
  100. package/dist/{chunk-SAMHDJSQ.js → chunk-XTAGZXOM.js} +2 -2
  101. package/dist/{chunk-NFLZMAIV.js → chunk-YAFMWQRL.js} +6 -6
  102. package/dist/{chunk-IYH6NQDI.js → chunk-YKAQKIPR.js} +2 -2
  103. package/dist/{chunk-5JZ5CYTR.js → chunk-YOR5QBEU.js} +63 -62
  104. package/dist/chunk-YOR5QBEU.js.map +1 -0
  105. package/dist/{chunk-7FUE2LSW.js → chunk-ZWSSUWKO.js} +2 -2
  106. package/dist/cli.js +97 -96
  107. package/dist/coding/export-okf-codegraph.js +11 -11
  108. package/dist/compounding/engine.js +12 -12
  109. package/dist/config.js +11 -11
  110. package/dist/connectors/codex-materialize-runner.js +11 -11
  111. package/dist/connectors/index.js +11 -11
  112. package/dist/convergence-refresh.js +13 -13
  113. package/dist/corpus-watermark.js +13 -13
  114. package/dist/deep-recall-http-glue.js +5 -5
  115. package/dist/directory-sidecars.js +2 -2
  116. package/dist/entity-recall-reads.d.ts +5 -0
  117. package/dist/entity-recall-reads.d.ts.map +1 -0
  118. package/dist/entity-recall-reads.js +16 -0
  119. package/dist/entity-recall-reads.js.map +1 -0
  120. package/dist/entity-retrieval.d.ts.map +1 -1
  121. package/dist/entity-retrieval.js +12 -11
  122. package/dist/explicit-capture.js +97 -96
  123. package/dist/extraction.js +21 -21
  124. package/dist/harmonic-retrieval.js +11 -11
  125. package/dist/index.js +133 -132
  126. package/dist/lcm/engine.js +2 -2
  127. package/dist/lcm/index.js +5 -5
  128. package/dist/local-llm-helpers.d.ts +22 -8
  129. package/dist/local-llm-helpers.d.ts.map +1 -1
  130. package/dist/local-llm-helpers.js +11 -1
  131. package/dist/local-llm-rate-limit.d.ts +1 -5
  132. package/dist/local-llm-rate-limit.d.ts.map +1 -1
  133. package/dist/local-llm-rate-limit.js +3 -1
  134. package/dist/local-llm.d.ts +2 -4
  135. package/dist/local-llm.d.ts.map +1 -1
  136. package/dist/local-llm.js +4 -4
  137. package/dist/location/index.js +13 -13
  138. package/dist/maintenance/archive-observations.js +2 -2
  139. package/dist/maintenance/atomic-file.d.ts +1 -1
  140. package/dist/maintenance/atomic-file.d.ts.map +1 -1
  141. package/dist/maintenance/atomic-file.js +1 -1
  142. package/dist/maintenance/memory-governance.js +11 -11
  143. package/dist/maintenance/migrate-observations.js +3 -3
  144. package/dist/maintenance/observation-ledger-utils.js +2 -2
  145. package/dist/maintenance/rebuild-memory-lifecycle-ledger.js +11 -11
  146. package/dist/maintenance/rebuild-memory-projection-runner.js +13 -13
  147. package/dist/maintenance/rebuild-memory-projection.js +12 -12
  148. package/dist/maintenance/rebuild-observations.js +3 -3
  149. package/dist/memory-browse.js +4 -4
  150. package/dist/namespaces/migrate.js +12 -12
  151. package/dist/namespaces/search.js +6 -6
  152. package/dist/namespaces/storage.js +11 -11
  153. package/dist/offline-sync-impression-drain.js +2 -2
  154. package/dist/operator-doctor-corpus.js +14 -14
  155. package/dist/operator-toolkit.js +18 -18
  156. package/dist/orchestration/backlog-scheduler.js +98 -97
  157. package/dist/orchestration/backlog-scheduler.js.map +1 -1
  158. package/dist/orchestration/buffer-drain-runner.js +98 -97
  159. package/dist/orchestration/maintenance.js +24 -24
  160. package/dist/orchestrator.js +97 -96
  161. package/dist/recall-navigation.js +97 -96
  162. package/dist/recall-state-view-admission.js +4 -4
  163. package/dist/recall-state.js +2 -2
  164. package/dist/recall-why-service.js +4 -4
  165. package/dist/relevance.js +2 -2
  166. package/dist/resume-bundles.js +12 -12
  167. package/dist/search/factory.js +5 -5
  168. package/dist/search/index.js +5 -5
  169. package/dist/search/lancedb-backend.js +2 -2
  170. package/dist/search/meilisearch-backend.js +2 -2
  171. package/dist/search/orama-backend.js +2 -2
  172. package/dist/semantic-consolidation.js +12 -12
  173. package/dist/semantic-rule-promotion.js +11 -11
  174. package/dist/semantic-rule-verifier.js +11 -11
  175. package/dist/source-agent-qualifier.js +14 -14
  176. package/dist/standup/build.js +11 -11
  177. package/dist/storage.js +10 -10
  178. package/dist/summarizer.js +5 -5
  179. package/dist/support-passport/index.js +5 -5
  180. package/dist/transfer/autodetect.js +1 -1
  181. package/dist/transfer/backup.js +2 -2
  182. package/dist/transfer/capsule-export.js +3 -3
  183. package/dist/transfer/capsule-import.js +2 -2
  184. package/dist/transfer/export-okf.js +12 -12
  185. package/dist/verified-recall.js +11 -11
  186. package/dist/who-knows-cli.js +12 -12
  187. package/dist/who-knows.js +11 -11
  188. package/package.json +12 -2
  189. package/src/entity-recall-reads.ts +40 -0
  190. package/src/entity-retrieval.ts +16 -22
  191. package/src/local-llm-helpers.ts +116 -14
  192. package/src/local-llm-rate-limit.test.ts +79 -1
  193. package/src/local-llm-rate-limit.ts +37 -1
  194. package/src/local-llm.ts +75 -74
  195. package/src/maintenance/atomic-file.ts +2 -1
  196. package/dist/chunk-4DCKLDYM.js.map +0 -1
  197. package/dist/chunk-5JZ5CYTR.js.map +0 -1
  198. package/dist/chunk-AGMMHT4P.js.map +0 -1
  199. package/dist/chunk-BTNNL7ZW.js.map +0 -1
  200. /package/dist/{auto-sync-PSZJHHXB.js.map → auto-sync-L3M4RKJD.js.map} +0 -0
  201. /package/dist/{capsule-crypto-7FJQINUR.js.map → capsule-crypto-YO5QJ6L3.js.map} +0 -0
  202. /package/dist/{chunk-ZZYJNT2J.js.map → chunk-2MWKUVHT.js.map} +0 -0
  203. /package/dist/{chunk-WHCD4Z3D.js.map → chunk-2X4WP4GD.js.map} +0 -0
  204. /package/dist/{chunk-V7IH24UG.js.map → chunk-2YJYBAR3.js.map} +0 -0
  205. /package/dist/{chunk-MX5VGD6C.js.map → chunk-3DJ6R4CC.js.map} +0 -0
  206. /package/dist/{chunk-SX6O25WK.js.map → chunk-3UKPFFMS.js.map} +0 -0
  207. /package/dist/{chunk-V5NHW44X.js.map → chunk-52EM4UQU.js.map} +0 -0
  208. /package/dist/{chunk-2G5XUS4S.js.map → chunk-5UE45DLK.js.map} +0 -0
  209. /package/dist/{chunk-B57CAZPI.js.map → chunk-5V3IBSVB.js.map} +0 -0
  210. /package/dist/{chunk-4LF5E2LM.js.map → chunk-66DUCUOC.js.map} +0 -0
  211. /package/dist/{chunk-EDR6CVWZ.js.map → chunk-6PEEZSGL.js.map} +0 -0
  212. /package/dist/{chunk-G5D5JKJJ.js.map → chunk-6PVS6JET.js.map} +0 -0
  213. /package/dist/{chunk-DE6KQUAP.js.map → chunk-773QSFFN.js.map} +0 -0
  214. /package/dist/{chunk-UI77UYQP.js.map → chunk-7IJ2H43M.js.map} +0 -0
  215. /package/dist/{chunk-E4PME33M.js.map → chunk-7PCWJZXG.js.map} +0 -0
  216. /package/dist/{chunk-TE2SBFZD.js.map → chunk-B7F2G57I.js.map} +0 -0
  217. /package/dist/{chunk-3BNWEHHC.js.map → chunk-BDFOBNLX.js.map} +0 -0
  218. /package/dist/{chunk-PBE7NFB5.js.map → chunk-BNQJKWWZ.js.map} +0 -0
  219. /package/dist/{chunk-EPTLYMQY.js.map → chunk-BT5TAOXG.js.map} +0 -0
  220. /package/dist/{chunk-IMJKWVT7.js.map → chunk-BTCZVBV3.js.map} +0 -0
  221. /package/dist/{chunk-2NLLXCJG.js.map → chunk-BXLOS5AJ.js.map} +0 -0
  222. /package/dist/{chunk-IUAWTN2B.js.map → chunk-CA7XVRHZ.js.map} +0 -0
  223. /package/dist/{chunk-4IVRQMZW.js.map → chunk-DF4BC5MK.js.map} +0 -0
  224. /package/dist/{chunk-MKJBZR7J.js.map → chunk-DFK6AQWM.js.map} +0 -0
  225. /package/dist/{chunk-RJ5L6LRD.js.map → chunk-DLR3SBOM.js.map} +0 -0
  226. /package/dist/{chunk-QWDXHBDY.js.map → chunk-DQ2N7IN6.js.map} +0 -0
  227. /package/dist/{chunk-X7Y7WX73.js.map → chunk-DQEMWVMT.js.map} +0 -0
  228. /package/dist/{chunk-D7GZM7AD.js.map → chunk-DS24H6M4.js.map} +0 -0
  229. /package/dist/{chunk-X7J56GPG.js.map → chunk-FEYPXEKE.js.map} +0 -0
  230. /package/dist/{chunk-VT75USBD.js.map → chunk-HDU3MIK3.js.map} +0 -0
  231. /package/dist/{chunk-HIUIJ4AB.js.map → chunk-HIPHLFIQ.js.map} +0 -0
  232. /package/dist/{chunk-OQGGJBXX.js.map → chunk-HKOGDSNS.js.map} +0 -0
  233. /package/dist/{chunk-TNACU47L.js.map → chunk-I6IKSDUO.js.map} +0 -0
  234. /package/dist/{chunk-S7U6PKKV.js.map → chunk-IEB6XYW6.js.map} +0 -0
  235. /package/dist/{chunk-C6Z3H23R.js.map → chunk-JUYTXFDV.js.map} +0 -0
  236. /package/dist/{chunk-SGD7PCHI.js.map → chunk-K3KSTSGM.js.map} +0 -0
  237. /package/dist/{chunk-TS6UKENE.js.map → chunk-KTZNXQWL.js.map} +0 -0
  238. /package/dist/{chunk-DHPGGMGL.js.map → chunk-MUMQWCE2.js.map} +0 -0
  239. /package/dist/{chunk-GCVMCCX7.js.map → chunk-MWEJL436.js.map} +0 -0
  240. /package/dist/{chunk-L56BEEKZ.js.map → chunk-MZETCZJF.js.map} +0 -0
  241. /package/dist/{chunk-IML7HMMK.js.map → chunk-NBHMEYM4.js.map} +0 -0
  242. /package/dist/{chunk-H6X7GNDW.js.map → chunk-NFTFMMKT.js.map} +0 -0
  243. /package/dist/{chunk-5WZT6WQW.js.map → chunk-NZHZQGLB.js.map} +0 -0
  244. /package/dist/{chunk-AO5LKFGO.js.map → chunk-OFSAKEZB.js.map} +0 -0
  245. /package/dist/{chunk-6PE4O7UE.js.map → chunk-PCCNK3RX.js.map} +0 -0
  246. /package/dist/{chunk-E2R5BTBB.js.map → chunk-PJFSSXXY.js.map} +0 -0
  247. /package/dist/{chunk-YQJCWR4R.js.map → chunk-QO5WYRK2.js.map} +0 -0
  248. /package/dist/{chunk-KQAFEZQX.js.map → chunk-R45L4TV6.js.map} +0 -0
  249. /package/dist/{chunk-3OUGSOJP.js.map → chunk-RKJYVJZJ.js.map} +0 -0
  250. /package/dist/{chunk-5O26UA6Z.js.map → chunk-RV7IYUBK.js.map} +0 -0
  251. /package/dist/{chunk-7IGMKQWK.js.map → chunk-SBQOBY3S.js.map} +0 -0
  252. /package/dist/{chunk-I7TR2OCU.js.map → chunk-SQXCUH4L.js.map} +0 -0
  253. /package/dist/{chunk-XV3I7SLU.js.map → chunk-TBOCVPXL.js.map} +0 -0
  254. /package/dist/{chunk-EKXMWUXE.js.map → chunk-TGH7AU5U.js.map} +0 -0
  255. /package/dist/{chunk-2COHMHLQ.js.map → chunk-TLJV42SZ.js.map} +0 -0
  256. /package/dist/{chunk-R4O4JDTS.js.map → chunk-TXVTNDQT.js.map} +0 -0
  257. /package/dist/{chunk-U6CKHWUQ.js.map → chunk-UADAXWUJ.js.map} +0 -0
  258. /package/dist/{chunk-TE46SBDJ.js.map → chunk-UR6COSJN.js.map} +0 -0
  259. /package/dist/{chunk-4MZCWJVS.js.map → chunk-VE23DIBH.js.map} +0 -0
  260. /package/dist/{chunk-PORCJ6NC.js.map → chunk-VGCK2RV3.js.map} +0 -0
  261. /package/dist/{chunk-ZIXP27JK.js.map → chunk-VVVFT435.js.map} +0 -0
  262. /package/dist/{chunk-GCOQDPOE.js.map → chunk-VXKPZ6BO.js.map} +0 -0
  263. /package/dist/{chunk-SAMHDJSQ.js.map → chunk-XTAGZXOM.js.map} +0 -0
  264. /package/dist/{chunk-NFLZMAIV.js.map → chunk-YAFMWQRL.js.map} +0 -0
  265. /package/dist/{chunk-IYH6NQDI.js.map → chunk-YKAQKIPR.js.map} +0 -0
  266. /package/dist/{chunk-7FUE2LSW.js.map → chunk-ZWSSUWKO.js.map} +0 -0
@@ -6,7 +6,7 @@ import {
6
6
  } from "./chunk-PQVCH2AE.js";
7
7
  import {
8
8
  writeFileAtomically
9
- } from "./chunk-BTNNL7ZW.js";
9
+ } from "./chunk-2GJCSYSF.js";
10
10
  import {
11
11
  RECALL_FALLBACK_DIRS
12
12
  } from "./chunk-VS2IYZRU.js";
@@ -439,4 +439,4 @@ export {
439
439
  findDirectorySidecarsForQuery,
440
440
  applyDirectorySidecarDrillDown
441
441
  };
442
- //# sourceMappingURL=chunk-3OUGSOJP.js.map
442
+ //# sourceMappingURL=chunk-RKJYVJZJ.js.map
@@ -2,18 +2,18 @@ import {
2
2
  ExtractionDrain,
3
3
  TurnIngestionCoordinator,
4
4
  shouldSkipImplicitExtraction
5
- } from "./chunk-QWDXHBDY.js";
5
+ } from "./chunk-DQ2N7IN6.js";
6
6
  import {
7
7
  headerConnector,
8
8
  renderExtractionConversation,
9
9
  resolveSourceConnector
10
- } from "./chunk-DE6KQUAP.js";
10
+ } from "./chunk-773QSFFN.js";
11
11
  import {
12
12
  SmartBuffer
13
- } from "./chunk-GCOQDPOE.js";
13
+ } from "./chunk-VXKPZ6BO.js";
14
14
  import {
15
15
  selfDeps
16
- } from "./chunk-NFLZMAIV.js";
16
+ } from "./chunk-YAFMWQRL.js";
17
17
  import {
18
18
  describeError,
19
19
  groupTurnsByExtractionScope
@@ -447,4 +447,4 @@ export {
447
447
  ClaimBufferStorage,
448
448
  BufferDrainRunner
449
449
  };
450
- //# sourceMappingURL=chunk-5O26UA6Z.js.map
450
+ //# sourceMappingURL=chunk-RV7IYUBK.js.map
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  writeFileAtomically
3
- } from "./chunk-BTNNL7ZW.js";
3
+ } from "./chunk-2GJCSYSF.js";
4
4
 
5
5
  // src/maintenance/archive-observations.ts
6
6
  import path from "path";
@@ -131,4 +131,4 @@ async function archiveObservations(options) {
131
131
  export {
132
132
  archiveObservations
133
133
  };
134
- //# sourceMappingURL=chunk-7IGMKQWK.js.map
134
+ //# sourceMappingURL=chunk-SBQOBY3S.js.map
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  OKF_RESERVED_BASENAMES
3
- } from "./chunk-3OUGSOJP.js";
3
+ } from "./chunk-RKJYVJZJ.js";
4
4
  import {
5
5
  MAGIC_BYTES
6
6
  } from "./chunk-EYGOM6AI.js";
@@ -202,4 +202,4 @@ export {
202
202
  publishBundle,
203
203
  rejectSymlinkPath
204
204
  };
205
- //# sourceMappingURL=chunk-I7TR2OCU.js.map
205
+ //# sourceMappingURL=chunk-SQXCUH4L.js.map
@@ -1,9 +1,9 @@
1
1
  import {
2
2
  resolveDefaultNamespaceRoot
3
- } from "./chunk-H6X7GNDW.js";
3
+ } from "./chunk-NFTFMMKT.js";
4
4
  import {
5
5
  StorageManager
6
- } from "./chunk-NFLZMAIV.js";
6
+ } from "./chunk-YAFMWQRL.js";
7
7
  import {
8
8
  composeLocationDayBody,
9
9
  composeLocationDayMeta,
@@ -23,7 +23,7 @@ import {
23
23
  serializeLocationDay,
24
24
  updateLocationSourceDay,
25
25
  writeLocationDay
26
- } from "./chunk-4IVRQMZW.js";
26
+ } from "./chunk-DF4BC5MK.js";
27
27
  import {
28
28
  resolveNamespaceCapabilities
29
29
  } from "./chunk-C5LWPYS3.js";
@@ -779,4 +779,4 @@ export {
779
779
  LOCATION_SYNC_DEFAULT_INTERVAL_MS,
780
780
  startLocationAutoSync
781
781
  };
782
- //# sourceMappingURL=chunk-XV3I7SLU.js.map
782
+ //# sourceMappingURL=chunk-TBOCVPXL.js.map
@@ -3,7 +3,7 @@ import {
3
3
  readNamespaceMaintenanceLastRanStatuses,
4
4
  readNamespaceMaintenanceStatuses,
5
5
  runNamespaceMaintenancePlan
6
- } from "./chunk-TE2SBFZD.js";
6
+ } from "./chunk-B7F2G57I.js";
7
7
  import {
8
8
  analyzeSessionIntegrity,
9
9
  applySessionRepair,
@@ -14,7 +14,7 @@ import {
14
14
  } from "./chunk-CMTINOFS.js";
15
15
  import {
16
16
  summarizeCorpusAndReplica
17
- } from "./chunk-SX6O25WK.js";
17
+ } from "./chunk-3UKPFFMS.js";
18
18
  import {
19
19
  readJudgeVerdictStats
20
20
  } from "./chunk-OZKOPQCM.js";
@@ -27,14 +27,14 @@ import {
27
27
  } from "./chunk-JKMIGCK6.js";
28
28
  import {
29
29
  resolveCorpusNamespaceRoots
30
- } from "./chunk-PORCJ6NC.js";
30
+ } from "./chunk-VGCK2RV3.js";
31
31
  import {
32
32
  listNamespaces
33
- } from "./chunk-IMJKWVT7.js";
33
+ } from "./chunk-BTCZVBV3.js";
34
34
  import {
35
35
  listMemoryGovernanceRuns,
36
36
  readMemoryGovernanceRunArtifact
37
- } from "./chunk-E4PME33M.js";
37
+ } from "./chunk-7PCWJZXG.js";
38
38
  import {
39
39
  resolveCuratedIncludeFilesStatePath,
40
40
  resolveNativeKnowledgeStatePath,
@@ -51,13 +51,13 @@ import {
51
51
  } from "./chunk-YBPYIAA5.js";
52
52
  import {
53
53
  parseConfig
54
- } from "./chunk-ZIXP27JK.js";
54
+ } from "./chunk-VVVFT435.js";
55
55
  import {
56
56
  summarizeExtractionLiveness
57
57
  } from "./chunk-DURQZFVJ.js";
58
58
  import {
59
59
  StorageManager
60
- } from "./chunk-NFLZMAIV.js";
60
+ } from "./chunk-YAFMWQRL.js";
61
61
  import {
62
62
  lintWorkspaceFiles
63
63
  } from "./chunk-DM2T26WE.js";
@@ -1876,4 +1876,4 @@ export {
1876
1876
  runBenchmarkRecall,
1877
1877
  runOperatorRepair
1878
1878
  };
1879
- //# sourceMappingURL=chunk-EKXMWUXE.js.map
1879
+ //# sourceMappingURL=chunk-TGH7AU5U.js.map
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  createSearchBackend
3
- } from "./chunk-L56BEEKZ.js";
3
+ } from "./chunk-MZETCZJF.js";
4
4
  import {
5
5
  reportSearchDegradation
6
6
  } from "./chunk-B7HYXVME.js";
@@ -572,4 +572,4 @@ export {
572
572
  normalizeQmdResultPath,
573
573
  resolveNamespaceResultPath
574
574
  };
575
- //# sourceMappingURL=chunk-2COHMHLQ.js.map
575
+ //# sourceMappingURL=chunk-TLJV42SZ.js.map
@@ -11,7 +11,7 @@ import {
11
11
  } from "./chunk-QNUNAXBE.js";
12
12
  import {
13
13
  LocalLlmClient
14
- } from "./chunk-5JZ5CYTR.js";
14
+ } from "./chunk-YOR5QBEU.js";
15
15
  import {
16
16
  completeBackgroundGeneration,
17
17
  parseBackgroundGenerationJson
@@ -808,4 +808,4 @@ export {
808
808
  summarizeHourlyStatus,
809
809
  HourlySummarizer
810
810
  };
811
- //# sourceMappingURL=chunk-R4O4JDTS.js.map
811
+ //# sourceMappingURL=chunk-TXVTNDQT.js.map
@@ -1,12 +1,3 @@
1
- import {
2
- rebuildMemoryLifecycleLedger
3
- } from "./chunk-V7IH24UG.js";
4
- import {
5
- PROJECTION_REBUILD_RUNNER_FLAG
6
- } from "./chunk-3BNWEHHC.js";
7
- import {
8
- startLocationAutoSync
9
- } from "./chunk-XV3I7SLU.js";
10
1
  import {
11
2
  ensureContradictionScanCron,
12
3
  ensureDaySummaryCron,
@@ -16,22 +7,31 @@ import {
16
7
  ensureProceduralMiningCron,
17
8
  graphEdgeDecayCadenceToCronExpr
18
9
  } from "./chunk-666A3MOW.js";
10
+ import {
11
+ rebuildMemoryLifecycleLedger
12
+ } from "./chunk-2YJYBAR3.js";
13
+ import {
14
+ PROJECTION_REBUILD_RUNNER_FLAG
15
+ } from "./chunk-BDFOBNLX.js";
16
+ import {
17
+ startLocationAutoSync
18
+ } from "./chunk-TBOCVPXL.js";
19
19
  import {
20
20
  CompoundingEngine,
21
21
  isIsoWeekId,
22
22
  msUntilNextIsoWeek,
23
23
  previousIsoWeekId
24
- } from "./chunk-EPTLYMQY.js";
24
+ } from "./chunk-BT5TAOXG.js";
25
25
  import {
26
26
  planNamespaceMaintenance,
27
27
  runNamespaceMaintenanceBatchPlan
28
- } from "./chunk-TE2SBFZD.js";
28
+ } from "./chunk-B7F2G57I.js";
29
29
  import {
30
30
  rebuildMemoryProjection
31
- } from "./chunk-TE46SBDJ.js";
31
+ } from "./chunk-UR6COSJN.js";
32
32
  import {
33
33
  LocalLlmClient
34
- } from "./chunk-5JZ5CYTR.js";
34
+ } from "./chunk-YOR5QBEU.js";
35
35
  import {
36
36
  DEFAULT_TIMELINE_CATEGORIES,
37
37
  TIMELINE_RESERVED_IDLE,
@@ -74,7 +74,7 @@ import {
74
74
  } from "./chunk-RL6NEVXT.js";
75
75
  import {
76
76
  writeFileAtomically
77
- } from "./chunk-BTNNL7ZW.js";
77
+ } from "./chunk-2GJCSYSF.js";
78
78
  import {
79
79
  isSafeRouteNamespace
80
80
  } from "./chunk-PCXDUHQH.js";
@@ -2874,4 +2874,4 @@ export {
2874
2874
  ActivitySyncScheduler,
2875
2875
  MaintenanceScheduler
2876
2876
  };
2877
- //# sourceMappingURL=chunk-U6CKHWUQ.js.map
2877
+ //# sourceMappingURL=chunk-UADAXWUJ.js.map
@@ -4,13 +4,13 @@ import {
4
4
  import {
5
5
  listMemoryGovernanceRuns,
6
6
  readMemoryGovernanceRunArtifact
7
- } from "./chunk-E4PME33M.js";
7
+ } from "./chunk-7PCWJZXG.js";
8
8
  import {
9
9
  loadPersistedNativeKnowledgeChunks
10
10
  } from "./chunk-2DQ2XREU.js";
11
11
  import {
12
12
  StorageManager
13
- } from "./chunk-NFLZMAIV.js";
13
+ } from "./chunk-YAFMWQRL.js";
14
14
  import {
15
15
  normalizeProjectionPreview,
16
16
  normalizeProjectionTags
@@ -48,7 +48,7 @@ import {
48
48
  } from "./chunk-TSUSHXBW.js";
49
49
  import {
50
50
  commitPreparedFileAtomically
51
- } from "./chunk-BTNNL7ZW.js";
51
+ } from "./chunk-2GJCSYSF.js";
52
52
  import {
53
53
  throwIfAborted
54
54
  } from "./chunk-R2MBW2S4.js";
@@ -1156,4 +1156,4 @@ export {
1156
1156
  verifyMemoryProjection,
1157
1157
  repairMemoryProjection
1158
1158
  };
1159
- //# sourceMappingURL=chunk-TE46SBDJ.js.map
1159
+ //# sourceMappingURL=chunk-UR6COSJN.js.map
@@ -3,7 +3,7 @@ import {
3
3
  } from "./chunk-5HFVWYHL.js";
4
4
  import {
5
5
  isGenericRecallExcludedPath
6
- } from "./chunk-UI77UYQP.js";
6
+ } from "./chunk-7IJ2H43M.js";
7
7
  import {
8
8
  planRecallMode
9
9
  } from "./chunk-CSAKJVXW.js";
@@ -132,4 +132,4 @@ async function findExpectedMemory(orchestrator, namespaces, expect) {
132
132
  export {
133
133
  runRecallWhy
134
134
  };
135
- //# sourceMappingURL=chunk-4MZCWJVS.js.map
135
+ //# sourceMappingURL=chunk-VE23DIBH.js.map
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  listNamespaces
3
- } from "./chunk-IMJKWVT7.js";
3
+ } from "./chunk-BTCZVBV3.js";
4
4
  import {
5
5
  corpusScanWorker
6
6
  } from "./chunk-4LZ7SVKM.js";
@@ -292,4 +292,4 @@ export {
292
292
  computeServiceCorpusWatermarks,
293
293
  computeServiceCorpusCensus
294
294
  };
295
- //# sourceMappingURL=chunk-PORCJ6NC.js.map
295
+ //# sourceMappingURL=chunk-VGCK2RV3.js.map
@@ -110,7 +110,7 @@ import {
110
110
  } from "./chunk-ZIKENA2C.js";
111
111
  import {
112
112
  parseDirectorySidecarsEnabled
113
- } from "./chunk-3OUGSOJP.js";
113
+ } from "./chunk-RKJYVJZJ.js";
114
114
  import {
115
115
  parseBackgroundGeneration
116
116
  } from "./chunk-27NO2KVB.js";
@@ -5860,4 +5860,4 @@ export {
5860
5860
  VALID_MEMORY_CATEGORIES,
5861
5861
  parseConfig
5862
5862
  };
5863
- //# sourceMappingURL=chunk-ZIXP27JK.js.map
5863
+ //# sourceMappingURL=chunk-VVVFT435.js.map
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  ExtractionDeadlineError
3
- } from "./chunk-6PE4O7UE.js";
3
+ } from "./chunk-PCCNK3RX.js";
4
4
  import {
5
5
  BufferIngressCounters
6
6
  } from "./chunk-RADARJEC.js";
@@ -941,4 +941,4 @@ var SmartBuffer = class {
941
941
  export {
942
942
  SmartBuffer
943
943
  };
944
- //# sourceMappingURL=chunk-GCOQDPOE.js.map
944
+ //# sourceMappingURL=chunk-VXKPZ6BO.js.map
@@ -3,7 +3,7 @@ import {
3
3
  } from "./chunk-B7RWBZXW.js";
4
4
  import {
5
5
  StorageManager
6
- } from "./chunk-NFLZMAIV.js";
6
+ } from "./chunk-YAFMWQRL.js";
7
7
  import {
8
8
  countRecallTokenOverlap,
9
9
  normalizeRecallTokens
@@ -109,4 +109,4 @@ export {
109
109
  compareVerifiedEpisodeResults,
110
110
  searchVerifiedEpisodes
111
111
  };
112
- //# sourceMappingURL=chunk-SAMHDJSQ.js.map
112
+ //# sourceMappingURL=chunk-XTAGZXOM.js.map
@@ -26,7 +26,7 @@ import {
26
26
  import {
27
27
  normalizeQmdResultPath,
28
28
  resolveNamespaceResultPath
29
- } from "./chunk-2COHMHLQ.js";
29
+ } from "./chunk-TLJV42SZ.js";
30
30
  import {
31
31
  withholdToolScopedFromSharedNamespace
32
32
  } from "./chunk-S2V7RUCL.js";
@@ -45,6 +45,9 @@ import {
45
45
  rewriteProjectedEntityReferences,
46
46
  rewriteProjectedMemoryEntityReference
47
47
  } from "./chunk-MRPOZBJC.js";
48
+ import {
49
+ rotateMarkdownFileToArchive
50
+ } from "./chunk-DM2T26WE.js";
48
51
  import {
49
52
  closeContinuityIncidentRecord,
50
53
  createContinuityIncidentRecord,
@@ -54,9 +57,6 @@ import {
54
57
  serializeContinuityIncident,
55
58
  upsertContinuityLoopInMarkdown
56
59
  } from "./chunk-LDXUBPMO.js";
57
- import {
58
- rotateMarkdownFileToArchive
59
- } from "./chunk-DM2T26WE.js";
60
60
  import {
61
61
  parseProvenanceSources,
62
62
  parseProvenanceTag,
@@ -82,7 +82,7 @@ import {
82
82
  okfTypeForEntityKind,
83
83
  okfTypeForMemory,
84
84
  refreshDirectorySidecarsAfterWrite
85
- } from "./chunk-3OUGSOJP.js";
85
+ } from "./chunk-RKJYVJZJ.js";
86
86
  import {
87
87
  normalizeProjectionPreview,
88
88
  normalizeProjectionTags
@@ -13318,4 +13318,4 @@ export {
13318
13318
  isValidBufferSurpriseEvent,
13319
13319
  StorageManager3 as StorageManager
13320
13320
  };
13321
- //# sourceMappingURL=chunk-NFLZMAIV.js.map
13321
+ //# sourceMappingURL=chunk-YAFMWQRL.js.map
@@ -13,7 +13,7 @@ import {
13
13
  } from "./chunk-ZCUTSMR2.js";
14
14
  import {
15
15
  StorageManager
16
- } from "./chunk-NFLZMAIV.js";
16
+ } from "./chunk-YAFMWQRL.js";
17
17
  import {
18
18
  excludeSupportPassportPrivateMemories
19
19
  } from "./chunk-TSUSHXBW.js";
@@ -134,4 +134,4 @@ export {
134
134
  runCodexMaterialize,
135
135
  runPostConsolidationMaterialize
136
136
  };
137
- //# sourceMappingURL=chunk-IYH6NQDI.js.map
137
+ //# sourceMappingURL=chunk-YKAQKIPR.js.map
@@ -1,7 +1,11 @@
1
+ import {
2
+ NativeSchemaGate
3
+ } from "./chunk-MJFL75J6.js";
1
4
  import {
2
5
  LocalLlmRateLimitSession,
6
+ isTerminalLocalLlmProxyPoolError,
3
7
  resolveRateLimitSettings
4
- } from "./chunk-AGMMHT4P.js";
8
+ } from "./chunk-GT2HWRST.js";
5
9
  import {
6
10
  isObjectRecord,
7
11
  orderedLocalServers
@@ -12,18 +16,19 @@ import {
12
16
  combineClientAbortSignals,
13
17
  extractNonRecoverableBackendReason,
14
18
  extractNonRecoverableBackendReasonFromErrorText,
19
+ formatLocalLlmPoolKey,
20
+ getLocalLlmTrippedBackendPoolState,
15
21
  isAbortError,
22
+ localLlmBackendPoolExpiredAtMs,
23
+ markLocalLlmBackendPoolUnavailable,
16
24
  normalizeBackendTripReason,
17
25
  probeFetch,
18
26
  resolveUnavailableVerdict,
19
27
  waitForRetryBackoff
20
- } from "./chunk-BDKLKX43.js";
28
+ } from "./chunk-KYZMCH4I.js";
21
29
  import {
22
30
  ChatTransport
23
31
  } from "./chunk-5YQXWVCP.js";
24
- import {
25
- NativeSchemaGate
26
- } from "./chunk-MJFL75J6.js";
27
32
  import {
28
33
  estimateTokenCount
29
34
  } from "./chunk-TOTT6S2V.js";
@@ -112,11 +117,12 @@ var THINKING_SUPPRESSED_OPERATIONS = /* @__PURE__ */ new Set([
112
117
  "hourly_summary_extended",
113
118
  "correction-classify"
114
119
  ]);
115
- var LOCAL_LLM_GLOBAL_BACKEND_STATE = "__openclawEngramLocalLlmBackendState";
116
120
  var LocalLlmClient = class _LocalLlmClient {
117
121
  config;
118
122
  isAvailable = null;
119
123
  lastHealthCheck = 0;
124
+ poolExpirySeenMs = /* @__PURE__ */ new Map();
125
+ // pool key → lapsed-circuit instant already invalidated
120
126
  availabilityProbe = new SingleFlightProbe();
121
127
  detectedType = null;
122
128
  cachedModelInfo = null;
@@ -167,11 +173,16 @@ var LocalLlmClient = class _LocalLlmClient {
167
173
  return this.config.localLlmHomeDir || readEnvVar("HOME") || os.homedir();
168
174
  }
169
175
  buildRequestHeaders(base = {}) {
170
- const headers = {
171
- ...base,
172
- ...this.config.localLlmHeaders ?? {}
173
- };
176
+ const headers = { ...base };
177
+ const configured = this.config.localLlmHeaders ?? {};
178
+ for (const [key, value] of Object.entries(configured)) {
179
+ const existing = Object.keys(headers).find((name) => name.toLowerCase() === key.toLowerCase());
180
+ if (existing !== void 0) delete headers[existing];
181
+ headers[key] = value;
182
+ }
174
183
  if (this.config.localLlmApiKey && this.config.localLlmAuthHeader !== false) {
184
+ const existing = Object.keys(headers).find((name) => name.toLowerCase() === "authorization");
185
+ if (existing !== void 0) delete headers[existing];
175
186
  headers.Authorization = `Bearer ${this.config.localLlmApiKey}`;
176
187
  }
177
188
  return headers;
@@ -188,40 +199,12 @@ var LocalLlmClient = class _LocalLlmClient {
188
199
  getDetectedType() {
189
200
  return this.detectedType;
190
201
  }
191
- getBackendKey() {
192
- return trimTrailingSlashes(
193
- this.config.localLlmUrl.replace("localhost", "127.0.0.1")
194
- ).replace(/\/v1$/, "");
195
- }
196
- getGlobalBackendState() {
197
- const globalAny = globalThis;
198
- if (!globalAny[LOCAL_LLM_GLOBAL_BACKEND_STATE]) {
199
- globalAny[LOCAL_LLM_GLOBAL_BACKEND_STATE] = /* @__PURE__ */ new Map();
200
- }
201
- return globalAny[LOCAL_LLM_GLOBAL_BACKEND_STATE];
202
- }
203
- getTrippedBackendState(now) {
204
- const state = this.getGlobalBackendState().get(this.getBackendKey()) ?? null;
205
- if (!state) return null;
206
- if (state.untilMs <= now) {
207
- this.getGlobalBackendState().delete(this.getBackendKey());
208
- this.lastHealthCheck = 0;
209
- return null;
210
- }
211
- return state;
212
- }
213
- markBackendUnavailable(reason, durationMs) {
214
- const normalizedReason = normalizeBackendTripReason(reason);
215
- if (durationMs > 0) {
216
- const untilMs = Date.now() + durationMs;
217
- this.getGlobalBackendState().set(this.getBackendKey(), { untilMs, reason: normalizedReason });
218
- } else {
219
- this.getGlobalBackendState().delete(this.getBackendKey());
220
- }
202
+ markBackendUnavailable(reason, durationMs, chatUrl, operation) {
203
+ markLocalLlmBackendPoolUnavailable(reason, durationMs, chatUrl, operation);
221
204
  this.isAvailable = false;
222
205
  this.lastHealthCheck = 0;
223
206
  log.warn(
224
- `local LLM backend unavailable for ${durationMs}ms: model=${this.config.localLlmModel} reason=${normalizedReason}`
207
+ `local LLM backend unavailable for ${durationMs}ms: model=${this.config.localLlmModel} reason=${normalizeBackendTripReason(reason)} op=${operation}`
225
208
  );
226
209
  }
227
210
  /**
@@ -254,17 +237,27 @@ var LocalLlmClient = class _LocalLlmClient {
254
237
  * Check if local LLM is available
255
238
  * Uses 127.0.0.1 instead of localhost to avoid DNS issues (consistent with tactician)
256
239
  */
257
- async checkAvailability(signal) {
240
+ async checkAvailability(signal, chatUrl, operation) {
258
241
  if (signal?.aborted) return false;
259
242
  const now = Date.now();
260
- const trippedState = this.getTrippedBackendState(now);
261
- if (trippedState) {
262
- this.isAvailable = false;
263
- this.lastHealthCheck = 0;
264
- log.info(
265
- `local LLM availability: backend circuit open for ${Math.max(0, trippedState.untilMs - now)}ms (${trippedState.reason})`
266
- );
267
- return false;
243
+ if (chatUrl) {
244
+ const poolOperation = operation ?? "unspecified";
245
+ const poolKey = formatLocalLlmPoolKey(chatUrl, poolOperation);
246
+ const expiredAtMs = localLlmBackendPoolExpiredAtMs(now, chatUrl, poolOperation);
247
+ if (expiredAtMs !== null && expiredAtMs > (this.poolExpirySeenMs.get(poolKey) ?? 0)) {
248
+ this.poolExpirySeenMs.set(poolKey, expiredAtMs);
249
+ this.isAvailable = null;
250
+ this.lastHealthCheck = 0;
251
+ }
252
+ const trippedState = getLocalLlmTrippedBackendPoolState(now, chatUrl, poolOperation);
253
+ if (trippedState) {
254
+ this.isAvailable = false;
255
+ this.lastHealthCheck = 0;
256
+ log.info(
257
+ `local LLM availability: backend circuit open for ${Math.max(0, trippedState.untilMs - now)}ms (${trippedState.reason}) op=${poolOperation}`
258
+ );
259
+ return false;
260
+ }
268
261
  }
269
262
  if (this.isAvailable !== null && now - this.lastHealthCheck < _LocalLlmClient.HEALTH_CHECK_INTERVAL_MS) {
270
263
  return this.isAvailable;
@@ -685,13 +678,18 @@ var LocalLlmClient = class _LocalLlmClient {
685
678
  `local LLM queue start: priority=${queueMeta.priority} waitMs=${startedAtMs - queueMeta.enqueuedAtMs} op=${operation}`
686
679
  );
687
680
  }
681
+ let chatUrl = "";
688
682
  try {
689
683
  const signal = combineClientAbortSignals(options.signal, this.shutdownSignal);
690
684
  if (signal?.aborted) return null;
691
- const isAvailable = await this.checkAvailability(signal);
685
+ const baseUrl = trimTrailingSlashes(
686
+ this.config.localLlmUrl.replace("localhost", "127.0.0.1")
687
+ );
688
+ chatUrl = baseUrl.endsWith("/v1") ? `${baseUrl}/chat/completions` : `${baseUrl}/v1/chat/completions`;
689
+ const isAvailable = await this.checkAvailability(signal, chatUrl, operation);
692
690
  if (!isAvailable) {
693
691
  log.debug(
694
- `local LLM: checkAvailability returned false for ${this.config.localLlmUrl}`
692
+ `local LLM: checkAvailability returned false for ${this.config.localLlmUrl} op=${operation}`
695
693
  );
696
694
  return null;
697
695
  }
@@ -715,10 +713,6 @@ var LocalLlmClient = class _LocalLlmClient {
715
713
  requestBody.reasoning_effort = effort;
716
714
  }
717
715
  }
718
- const baseUrl = trimTrailingSlashes(
719
- this.config.localLlmUrl.replace("localhost", "127.0.0.1")
720
- );
721
- const chatUrl = baseUrl.endsWith("/v1") ? `${baseUrl}/chat/completions` : `${baseUrl}/v1/chat/completions`;
722
716
  let requestBodyJson = JSON.stringify(requestBody);
723
717
  log.debug(
724
718
  `local LLM: sending request to ${chatUrl} with model ${this.config.localLlmModel}`
@@ -727,7 +721,7 @@ var LocalLlmClient = class _LocalLlmClient {
727
721
  const effectiveTimeoutMs = typeof options.timeoutMs === "number" ? Math.min(this.config.localLlmTimeoutMs, options.timeoutMs) : this.config.localLlmTimeoutMs;
728
722
  const maxAttempts = 1 + Math.max(0, this.config.localLlmRetry5xxCount);
729
723
  const rateLimit = new LocalLlmRateLimitSession(
730
- chatUrl,
724
+ formatLocalLlmPoolKey(chatUrl, operation),
731
725
  resolveRateLimitSettings(this.config),
732
726
  (queueMeta?.priority ?? options.priority) === "recall-critical",
733
727
  effectiveTimeoutMs
@@ -813,7 +807,9 @@ var LocalLlmClient = class _LocalLlmClient {
813
807
  if (nonRecoverableReason) {
814
808
  this.markBackendUnavailable(
815
809
  nonRecoverableReason,
816
- this.config.localLlm400CooldownMs
810
+ this.config.localLlm400CooldownMs,
811
+ chatUrl,
812
+ operation
817
813
  );
818
814
  this.consecutive400s = 0;
819
815
  return null;
@@ -827,6 +823,7 @@ var LocalLlmClient = class _LocalLlmClient {
827
823
  attempt -= 1;
828
824
  continue;
829
825
  }
826
+ if (isTerminalLocalLlmProxyPoolError(response.status, responseBody)) break;
830
827
  if (response.status < 500 || attempt >= maxAttempts) break;
831
828
  const backoffMs = this.config.localLlmRetryBackoffMs * attempt;
832
829
  log.warn(
@@ -866,7 +863,9 @@ var LocalLlmClient = class _LocalLlmClient {
866
863
  if (nonRecoverableReason) {
867
864
  this.markBackendUnavailable(
868
865
  nonRecoverableReason,
869
- this.config.localLlm400CooldownMs
866
+ this.config.localLlm400CooldownMs,
867
+ chatUrl,
868
+ operation
870
869
  );
871
870
  this.consecutive400s = 0;
872
871
  return null;
@@ -929,10 +928,12 @@ var LocalLlmClient = class _LocalLlmClient {
929
928
  log.warn(`local LLM request error: op=${operation} error=${options.redactProviderErrors ? "provider error details redacted" : errMsg}`);
930
929
  this.isAvailable = false;
931
930
  const nonRecoverableReason = extractNonRecoverableBackendReason(errMsg);
932
- if (nonRecoverableReason) {
931
+ if (nonRecoverableReason && chatUrl.length > 0) {
933
932
  this.markBackendUnavailable(
934
933
  nonRecoverableReason,
935
- this.config.localLlm400CooldownMs
934
+ this.config.localLlm400CooldownMs,
935
+ chatUrl,
936
+ operation
936
937
  );
937
938
  }
938
939
  return null;
@@ -1125,4 +1126,4 @@ var LocalLlmClient = class _LocalLlmClient {
1125
1126
  export {
1126
1127
  LocalLlmClient
1127
1128
  };
1128
- //# sourceMappingURL=chunk-5JZ5CYTR.js.map
1129
+ //# sourceMappingURL=chunk-YOR5QBEU.js.map