omnicell-router 0.8.4 → 0.10.0

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 (363) hide show
  1. package/README.md +26 -7
  2. package/README.zh-CN.md +18 -5
  3. package/backend/dist/capture/recorder.d.ts +4 -10
  4. package/backend/dist/capture/recorder.js +6 -58
  5. package/backend/dist/cli/clients/base.d.ts +36 -11
  6. package/backend/dist/cli/clients/base.js +31 -15
  7. package/backend/dist/cli/clients/claude.d.ts +9 -0
  8. package/backend/dist/cli/clients/claude.js +6 -0
  9. package/backend/dist/cli/clients/codex.d.ts +8 -0
  10. package/backend/dist/cli/clients/codex.js +5 -0
  11. package/backend/dist/cli/clients/core-adapters.d.ts +1 -1
  12. package/backend/dist/cli/clients/core-adapters.js +1 -1
  13. package/backend/dist/cli/clients/dsh.d.ts +8 -0
  14. package/backend/dist/cli/clients/dsh.js +5 -0
  15. package/backend/dist/cli/clients/grok.d.ts +15 -1
  16. package/backend/dist/cli/clients/grok.js +16 -2
  17. package/backend/dist/cli/clients/index.d.ts +13 -1
  18. package/backend/dist/cli/clients/index.js +97 -19
  19. package/backend/dist/cli/clients/kimi.d.ts +6 -0
  20. package/backend/dist/cli/clients/kimi.js +3 -0
  21. package/backend/dist/cli/clients/launcher.d.ts +1 -1
  22. package/backend/dist/cli/clients/model-meta.js +6 -3
  23. package/backend/dist/cli/clients/omp.d.ts +6 -0
  24. package/backend/dist/cli/clients/omp.js +3 -0
  25. package/backend/dist/cli/clients/openclaw.d.ts +6 -0
  26. package/backend/dist/cli/clients/openclaw.js +3 -0
  27. package/backend/dist/cli/clients/opencode.d.ts +8 -0
  28. package/backend/dist/cli/clients/opencode.js +5 -0
  29. package/backend/dist/cli/clients/pi.d.ts +6 -0
  30. package/backend/dist/cli/clients/pi.js +3 -0
  31. package/backend/dist/cli/clients/update-check.d.ts +37 -0
  32. package/backend/dist/cli/clients/update-check.js +309 -0
  33. package/backend/dist/cli/clients/workbuddy.d.ts +19 -0
  34. package/backend/dist/cli/clients/workbuddy.js +66 -0
  35. package/backend/dist/cli/index.js +5 -4
  36. package/backend/dist/cli/paths.js +8 -0
  37. package/backend/dist/cli/types.d.ts +92 -16
  38. package/backend/dist/config/comments-en.js +31 -26
  39. package/backend/dist/config/comments-zh.js +29 -24
  40. package/backend/dist/config/defaults.d.ts +194 -33
  41. package/backend/dist/config/defaults.js +193 -32
  42. package/backend/dist/config/env.d.ts +10 -0
  43. package/backend/dist/config/env.js +3 -2
  44. package/backend/dist/config/index.d.ts +7 -0
  45. package/backend/dist/config/index.js +184 -43
  46. package/backend/dist/config/migrations/v0-to-v1.d.ts +2 -2
  47. package/backend/dist/config/migrations/v10-to-v11.d.ts +38 -0
  48. package/backend/dist/config/migrations/v10-to-v11.js +43 -0
  49. package/backend/dist/config/migrations/v6-to-v7.d.ts +45 -0
  50. package/backend/dist/config/migrations/v6-to-v7.js +97 -0
  51. package/backend/dist/config/migrations/v7-to-v8.d.ts +36 -0
  52. package/backend/dist/config/migrations/v7-to-v8.js +43 -0
  53. package/backend/dist/config/migrations/v8-to-v9.d.ts +38 -0
  54. package/backend/dist/config/migrations/v8-to-v9.js +43 -0
  55. package/backend/dist/config/migrations/v9-to-v10.d.ts +51 -0
  56. package/backend/dist/config/migrations/v9-to-v10.js +71 -0
  57. package/backend/dist/config/runtime.js +1 -1
  58. package/backend/dist/config/schema.d.ts +3 -3
  59. package/backend/dist/config/schema.js +14 -4
  60. package/backend/dist/config/types.d.ts +167 -38
  61. package/backend/dist/egress-proxy/asset-download.d.ts +54 -0
  62. package/backend/dist/egress-proxy/asset-download.js +420 -0
  63. package/backend/dist/egress-proxy/manual-node-spec.d.ts +92 -0
  64. package/backend/dist/egress-proxy/manual-node-spec.js +408 -0
  65. package/backend/dist/egress-proxy/mihomo-binary.d.ts +54 -0
  66. package/backend/dist/egress-proxy/mihomo-binary.js +278 -0
  67. package/backend/dist/egress-proxy/mihomo-client.d.ts +94 -0
  68. package/backend/dist/egress-proxy/mihomo-client.js +308 -0
  69. package/backend/dist/egress-proxy/mihomo-config.d.ts +40 -0
  70. package/backend/dist/egress-proxy/mihomo-config.js +161 -0
  71. package/backend/dist/egress-proxy/mihomo-geo.d.ts +87 -0
  72. package/backend/dist/egress-proxy/mihomo-geo.js +213 -0
  73. package/backend/dist/egress-proxy/mihomo-logs.d.ts +43 -0
  74. package/backend/dist/egress-proxy/mihomo-logs.js +84 -0
  75. package/backend/dist/egress-proxy/mihomo-pac.d.ts +37 -0
  76. package/backend/dist/egress-proxy/mihomo-pac.js +75 -0
  77. package/backend/dist/egress-proxy/mihomo-rules-import.d.ts +43 -0
  78. package/backend/dist/egress-proxy/mihomo-rules-import.js +193 -0
  79. package/backend/dist/egress-proxy/mihomo-sidecar.d.ts +81 -0
  80. package/backend/dist/egress-proxy/mihomo-sidecar.js +637 -0
  81. package/backend/dist/forward-proxy/egress.d.ts +50 -11
  82. package/backend/dist/forward-proxy/egress.js +50 -17
  83. package/backend/dist/forward-proxy/h2-forward.js +36 -10
  84. package/backend/dist/forward-proxy/index.d.ts +11 -8
  85. package/backend/dist/forward-proxy/index.js +22 -60
  86. package/backend/dist/forward-proxy/interceptor.d.ts +3 -2
  87. package/backend/dist/forward-proxy/interceptor.js +4 -4
  88. package/backend/dist/forward-proxy/relay.js +3 -3
  89. package/backend/dist/forward-proxy/rules.d.ts +4 -4
  90. package/backend/dist/forward-proxy/rules.js +25 -4
  91. package/backend/dist/forward-proxy/server.d.ts +0 -16
  92. package/backend/dist/forward-proxy/server.js +124 -156
  93. package/backend/dist/harness/host/hosts.js +3 -2
  94. package/backend/dist/index.js +53 -18
  95. package/backend/dist/ingress-proxy/access-log.d.ts +176 -0
  96. package/backend/dist/ingress-proxy/access-log.js +774 -0
  97. package/backend/dist/ingress-proxy/ca-inventory.d.ts +106 -0
  98. package/backend/dist/ingress-proxy/ca-inventory.js +525 -0
  99. package/backend/dist/ingress-proxy/ca-trust.d.ts +96 -0
  100. package/backend/dist/ingress-proxy/ca-trust.js +315 -0
  101. package/backend/dist/ingress-proxy/ca.d.ts +104 -0
  102. package/backend/dist/ingress-proxy/ca.js +273 -0
  103. package/backend/dist/ingress-proxy/data-dir.d.ts +28 -0
  104. package/backend/dist/ingress-proxy/data-dir.js +45 -0
  105. package/backend/dist/ingress-proxy/egress.d.ts +151 -0
  106. package/backend/dist/ingress-proxy/egress.js +364 -0
  107. package/backend/dist/ingress-proxy/h2-forward.d.ts +66 -0
  108. package/backend/dist/ingress-proxy/h2-forward.js +561 -0
  109. package/backend/dist/ingress-proxy/index.d.ts +24 -0
  110. package/backend/dist/ingress-proxy/index.js +144 -0
  111. package/backend/dist/ingress-proxy/interceptor.d.ts +25 -0
  112. package/backend/dist/ingress-proxy/interceptor.js +52 -0
  113. package/backend/dist/ingress-proxy/ordered-relay.d.ts +29 -0
  114. package/backend/dist/ingress-proxy/ordered-relay.js +46 -0
  115. package/backend/dist/ingress-proxy/relay.d.ts +54 -0
  116. package/backend/dist/ingress-proxy/relay.js +188 -0
  117. package/backend/dist/ingress-proxy/rules.d.ts +195 -0
  118. package/backend/dist/ingress-proxy/rules.js +348 -0
  119. package/backend/dist/ingress-proxy/server.d.ts +153 -0
  120. package/backend/dist/ingress-proxy/server.js +2065 -0
  121. package/backend/dist/ingress-proxy/sni.d.ts +35 -0
  122. package/backend/dist/ingress-proxy/sni.js +124 -0
  123. package/backend/dist/ingress-proxy/status.d.ts +32 -0
  124. package/backend/dist/ingress-proxy/status.js +15 -0
  125. package/backend/dist/ingress-proxy/system-proxy.d.ts +112 -0
  126. package/backend/dist/ingress-proxy/system-proxy.js +481 -0
  127. package/backend/dist/ingress-proxy/traffic-delete.d.ts +21 -0
  128. package/backend/dist/ingress-proxy/traffic-delete.js +64 -0
  129. package/backend/dist/ingress-proxy/traffic-delete.worker.d.ts +44 -0
  130. package/backend/dist/ingress-proxy/traffic-delete.worker.js +228 -0
  131. package/backend/dist/ingress-proxy/traffic-files.d.ts +10 -0
  132. package/backend/dist/ingress-proxy/traffic-files.js +10 -0
  133. package/backend/dist/ingress-proxy/upstream-tls.d.ts +46 -0
  134. package/backend/dist/ingress-proxy/upstream-tls.js +105 -0
  135. package/backend/dist/ingress-proxy/ws-frames.d.ts +45 -0
  136. package/backend/dist/ingress-proxy/ws-frames.js +153 -0
  137. package/backend/dist/ir/adapters/anthropic-messages-stream.js +6 -1
  138. package/backend/dist/ir/adapters/anthropic-messages.js +12 -5
  139. package/backend/dist/ir/adapters/google-gemini-stream.js +7 -2
  140. package/backend/dist/ir/adapters/google-gemini.js +5 -2
  141. package/backend/dist/ir/adapters/openai-chat-stream.js +5 -1
  142. package/backend/dist/ir/adapters/openai-chat.d.ts +25 -0
  143. package/backend/dist/ir/adapters/openai-chat.js +45 -3
  144. package/backend/dist/ir/adapters/openai-responses-output.d.ts +1 -0
  145. package/backend/dist/ir/adapters/openai-responses-output.js +67 -21
  146. package/backend/dist/ir/adapters/openai-responses-stream.d.ts +13 -0
  147. package/backend/dist/ir/adapters/openai-responses-stream.js +34 -1
  148. package/backend/dist/ir/adapters/openai-responses.d.ts +82 -24
  149. package/backend/dist/ir/adapters/openai-responses.js +146 -37
  150. package/backend/dist/ir/media.d.ts +20 -0
  151. package/backend/dist/ir/media.js +41 -0
  152. package/backend/dist/ir/tool-identity.d.ts +35 -0
  153. package/backend/dist/ir/tool-identity.js +40 -0
  154. package/backend/dist/ir/types.d.ts +9 -1
  155. package/backend/dist/local/build-jobs.d.ts +66 -0
  156. package/backend/dist/local/build-jobs.js +243 -0
  157. package/backend/dist/local/detect.d.ts +32 -0
  158. package/backend/dist/local/detect.js +145 -0
  159. package/backend/dist/local/draft-match.d.ts +58 -0
  160. package/backend/dist/local/draft-match.js +124 -0
  161. package/backend/dist/local/engine-runtime.d.ts +522 -0
  162. package/backend/dist/local/engine-runtime.js +1 -0
  163. package/backend/dist/local/engines.d.ts +241 -0
  164. package/backend/dist/local/engines.js +651 -0
  165. package/backend/dist/local/gguf.d.ts +35 -0
  166. package/backend/dist/local/gguf.js +314 -0
  167. package/backend/dist/local/hf.d.ts +120 -0
  168. package/backend/dist/local/hf.js +304 -0
  169. package/backend/dist/local/install.d.ts +90 -0
  170. package/backend/dist/local/install.js +421 -0
  171. package/backend/dist/local/llamacpp.d.ts +55 -0
  172. package/backend/dist/local/llamacpp.js +177 -0
  173. package/backend/dist/local/local-provider.d.ts +81 -0
  174. package/backend/dist/local/local-provider.js +301 -0
  175. package/backend/dist/local/machine-stats.d.ts +87 -0
  176. package/backend/dist/local/machine-stats.js +332 -0
  177. package/backend/dist/local/model-store.d.ts +347 -0
  178. package/backend/dist/local/model-store.js +1215 -0
  179. package/backend/dist/local/part-sweep.d.ts +32 -0
  180. package/backend/dist/local/part-sweep.js +156 -0
  181. package/backend/dist/local/plan.d.ts +65 -0
  182. package/backend/dist/local/plan.js +146 -0
  183. package/backend/dist/local/resources.d.ts +49 -0
  184. package/backend/dist/local/resources.js +64 -0
  185. package/backend/dist/local/run-stats.d.ts +95 -0
  186. package/backend/dist/local/run-stats.js +195 -0
  187. package/backend/dist/local/runner.d.ts +235 -0
  188. package/backend/dist/local/runner.js +1392 -0
  189. package/backend/dist/local/settings.d.ts +79 -0
  190. package/backend/dist/local/settings.js +180 -0
  191. package/backend/dist/local/strata-catalog.d.ts +30 -0
  192. package/backend/dist/local/strata-catalog.js +511 -0
  193. package/backend/dist/local/strata-drafting.d.ts +46 -0
  194. package/backend/dist/local/strata-drafting.js +265 -0
  195. package/backend/dist/local/strata.d.ts +278 -0
  196. package/backend/dist/local/strata.js +1392 -0
  197. package/backend/dist/local/tar.d.ts +20 -0
  198. package/backend/dist/local/tar.js +367 -0
  199. package/backend/dist/local/transport.d.ts +35 -0
  200. package/backend/dist/local/transport.js +89 -0
  201. package/backend/dist/local/tune.d.ts +58 -0
  202. package/backend/dist/local/tune.js +324 -0
  203. package/backend/dist/observability/http-exchange.d.ts +2 -2
  204. package/backend/dist/opencode/catalog/auto-pull.d.ts +14 -3
  205. package/backend/dist/opencode/catalog/auto-pull.js +276 -70
  206. package/backend/dist/opencode/catalog/ocr-store.js +3 -1
  207. package/backend/dist/opencode/catalog/overrides-store.d.ts +10 -1
  208. package/backend/dist/opencode/catalog/overrides-store.js +6 -0
  209. package/backend/dist/opencode/catalog/reasoning-declaration.d.ts +35 -0
  210. package/backend/dist/opencode/catalog/reasoning-declaration.js +66 -0
  211. package/backend/dist/opencode/catalog/repository.js +25 -2
  212. package/backend/dist/opencode/catalog/sources/models-dev.js +13 -3
  213. package/backend/dist/opencode/catalog/types.d.ts +35 -3
  214. package/backend/dist/opencode/catalog/types.js +38 -1
  215. package/backend/dist/opencode/credentials/ocr-store.js +11 -2
  216. package/backend/dist/opencode/credentials/sync.js +12 -3
  217. package/backend/dist/opencode/credentials/types.d.ts +31 -4
  218. package/backend/dist/opencode/credentials/types.js +25 -0
  219. package/backend/dist/opencode/probe.d.ts +21 -4
  220. package/backend/dist/opencode/probe.js +34 -10
  221. package/backend/dist/pipeline/directives.d.ts +9 -4
  222. package/backend/dist/pipeline/directives.js +14 -10
  223. package/backend/dist/pipeline/orchestrator.d.ts +42 -13
  224. package/backend/dist/pipeline/orchestrator.js +497 -165
  225. package/backend/dist/plugins/environment-ack.d.ts +51 -0
  226. package/backend/dist/plugins/environment-ack.js +81 -0
  227. package/backend/dist/plugins/gateways.d.ts +6 -6
  228. package/backend/dist/plugins/gateways.js +2 -2
  229. package/backend/dist/plugins/host.d.ts +98 -14
  230. package/backend/dist/plugins/host.js +622 -87
  231. package/backend/dist/plugins/install-run.d.ts +27 -0
  232. package/backend/dist/plugins/install-run.js +99 -0
  233. package/backend/dist/plugins/manifest.d.ts +84 -32
  234. package/backend/dist/plugins/manifest.js +149 -45
  235. package/backend/dist/plugins/market-install.d.ts +18 -0
  236. package/backend/dist/plugins/market-install.js +111 -0
  237. package/backend/dist/plugins/market-source.d.ts +100 -0
  238. package/backend/dist/plugins/market-source.js +449 -0
  239. package/backend/dist/plugins/market-updates.d.ts +70 -0
  240. package/backend/dist/plugins/market-updates.js +97 -0
  241. package/backend/dist/plugins/market.d.ts +677 -0
  242. package/backend/dist/plugins/market.js +2113 -0
  243. package/backend/dist/plugins/source-index.d.ts +155 -0
  244. package/backend/dist/plugins/source-index.js +217 -0
  245. package/backend/dist/plugins/types.d.ts +402 -37
  246. package/backend/dist/projects/worktrees.d.ts +88 -0
  247. package/backend/dist/projects/worktrees.js +220 -0
  248. package/backend/dist/providers/boot-direct.d.ts +41 -7
  249. package/backend/dist/providers/boot-direct.js +252 -36
  250. package/backend/dist/providers/compat/tool-markup-recovery.js +31 -6
  251. package/backend/dist/providers/executors/dispatch.d.ts +17 -7
  252. package/backend/dist/providers/executors/dispatch.js +28 -9
  253. package/backend/dist/providers/executors/openai-chat.js +14 -2
  254. package/backend/dist/providers/executors/plugin-adapter.d.ts +23 -1
  255. package/backend/dist/providers/executors/plugin-adapter.js +59 -3
  256. package/backend/dist/providers/member-match.d.ts +32 -9
  257. package/backend/dist/providers/member-match.js +65 -21
  258. package/backend/dist/providers/model-resolution.d.ts +62 -0
  259. package/backend/dist/providers/model-resolution.js +62 -0
  260. package/backend/dist/providers/price-order.d.ts +51 -0
  261. package/backend/dist/providers/price-order.js +54 -0
  262. package/backend/dist/providers/provider-takedown.d.ts +5 -2
  263. package/backend/dist/providers/registry.d.ts +84 -25
  264. package/backend/dist/providers/registry.js +209 -114
  265. package/backend/dist/providers/selection.d.ts +91 -0
  266. package/backend/dist/providers/selection.js +158 -0
  267. package/backend/dist/providers/virtual-meta.d.ts +33 -2
  268. package/backend/dist/providers/virtual-meta.js +74 -18
  269. package/backend/dist/quota/cli-login.d.ts +25 -4
  270. package/backend/dist/quota/cli-login.js +35 -5
  271. package/backend/dist/quota/coverage-generation.d.ts +24 -0
  272. package/backend/dist/quota/coverage-generation.js +29 -0
  273. package/backend/dist/quota/declarations.js +8 -4
  274. package/backend/dist/quota/engine.js +2 -2
  275. package/backend/dist/quota/prober.d.ts +43 -2
  276. package/backend/dist/quota/prober.js +97 -22
  277. package/backend/dist/ratelimit/rate-limiter.d.ts +1 -1
  278. package/backend/dist/resilience/error-classifier.js +29 -0
  279. package/backend/dist/router/index.d.ts +1 -1
  280. package/backend/dist/router/index.js +17 -1
  281. package/backend/dist/router/layer2-decision.d.ts +1 -1
  282. package/backend/dist/router/layer2-decision.js +2 -2
  283. package/backend/dist/routes/console.js +928 -310
  284. package/backend/dist/routes/environments.js +1 -1
  285. package/backend/dist/routes/local-models.d.ts +2 -0
  286. package/backend/dist/routes/local-models.js +1414 -0
  287. package/backend/dist/routes/mihomo.d.ts +2 -2
  288. package/backend/dist/routes/mihomo.js +20 -11
  289. package/backend/dist/routes/projects.js +121 -0
  290. package/backend/dist/server.js +318 -13
  291. package/backend/dist/session/session-manager.d.ts +42 -5
  292. package/backend/dist/session/session-manager.js +64 -11
  293. package/backend/dist/session/session-row.d.ts +29 -8
  294. package/backend/dist/session/session-row.js +18 -13
  295. package/backend/dist/snapshot/bundle.d.ts +40 -0
  296. package/backend/dist/snapshot/bundle.js +177 -0
  297. package/backend/dist/snapshot/handoff/compress.d.ts +46 -0
  298. package/backend/dist/snapshot/handoff/compress.js +77 -0
  299. package/backend/dist/snapshot/handoff/index.d.ts +119 -0
  300. package/backend/dist/snapshot/handoff/index.js +160 -0
  301. package/backend/dist/snapshot/handoff/jsonl-writer.d.ts +78 -0
  302. package/backend/dist/snapshot/handoff/jsonl-writer.js +175 -0
  303. package/backend/dist/snapshot/handoff/opencode-writer.d.ts +51 -0
  304. package/backend/dist/snapshot/handoff/opencode-writer.js +214 -0
  305. package/backend/dist/snapshot/handoff/summarize.d.ts +39 -0
  306. package/backend/dist/snapshot/handoff/summarize.js +118 -0
  307. package/backend/dist/snapshot/handoff/transcript.d.ts +71 -0
  308. package/backend/dist/snapshot/handoff/transcript.js +167 -0
  309. package/backend/dist/snapshot/media-fs.d.ts +10 -0
  310. package/backend/dist/snapshot/media-fs.js +50 -0
  311. package/backend/dist/snapshot/media.d.ts +32 -0
  312. package/backend/dist/snapshot/media.js +87 -0
  313. package/backend/dist/snapshot/store.d.ts +226 -0
  314. package/backend/dist/snapshot/store.js +887 -0
  315. package/backend/dist/snapshot/tree.d.ts +112 -0
  316. package/backend/dist/snapshot/tree.js +207 -0
  317. package/backend/dist/snapshot/types.d.ts +212 -0
  318. package/backend/dist/snapshot/types.js +14 -0
  319. package/backend/dist/snapshot/view.d.ts +19 -0
  320. package/backend/dist/snapshot/view.js +57 -0
  321. package/backend/dist/snapshot/write-worker.d.ts +67 -0
  322. package/backend/dist/snapshot/write-worker.js +129 -0
  323. package/backend/dist/surfaces/body-admission.d.ts +67 -2
  324. package/backend/dist/surfaces/body-admission.js +218 -13
  325. package/backend/dist/surfaces/chat-pipeline.js +8 -0
  326. package/backend/dist/surfaces/decision-pipeline.js +10 -7
  327. package/backend/dist/surfaces/gateway-catalog.d.ts +26 -0
  328. package/backend/dist/surfaces/gateway-catalog.js +202 -0
  329. package/backend/dist/surfaces/gateway-chat.d.ts +7 -11
  330. package/backend/dist/surfaces/gateway-chat.js +50 -12
  331. package/backend/dist/surfaces/ocr-headers.d.ts +6 -4
  332. package/backend/dist/surfaces/ocr-headers.js +11 -7
  333. package/backend/dist/surfaces/systemone.js +1 -1
  334. package/backend/dist/surfaces/transport-fastify.js +32 -5
  335. package/backend/dist/surfaces/transport-node-http.d.ts +9 -3
  336. package/backend/dist/surfaces/transport-node-http.js +6 -19
  337. package/backend/dist/surfaces/types.d.ts +11 -3
  338. package/backend/dist/trace/persist.js +21 -1
  339. package/backend/dist/trace/tracker.d.ts +35 -3
  340. package/backend/dist/trace/tracker.js +23 -0
  341. package/backend/dist/types/openai.d.ts +8 -0
  342. package/backend/dist/types/router.d.ts +17 -6
  343. package/backend/dist/types/router.js +14 -2
  344. package/backend/dist/utils/client-families.d.ts +66 -0
  345. package/backend/dist/utils/client-families.js +127 -0
  346. package/backend/dist/utils/event-ring.d.ts +1 -1
  347. package/backend/dist/utils/event-ring.js +1 -1
  348. package/backend/dist/utils/proxy-node.js +1 -1
  349. package/backend/dist/utils/proxy.d.ts +135 -11
  350. package/backend/dist/utils/proxy.js +144 -29
  351. package/backend/dist/utils/run-command.d.ts +21 -1
  352. package/backend/dist/utils/run-command.js +64 -4
  353. package/backend/dist/utils/server-liveness.d.ts +3 -2
  354. package/backend/dist/utils/server-liveness.js +3 -2
  355. package/backend/dist/utils/session-file.d.ts +28 -0
  356. package/backend/dist/utils/session-file.js +34 -0
  357. package/frontend/dist/assets/antigravity.color-DXFfVr6X.svg +39 -0
  358. package/frontend/dist/assets/gemini-cli.color-BfquLd1p.svg +1 -0
  359. package/frontend/dist/assets/index-CTZNvn1d.js +1707 -0
  360. package/frontend/dist/assets/{index-KI1OW5x6.css → index-CqDSOPQ0.css} +1 -1
  361. package/frontend/dist/index.html +2 -2
  362. package/package.json +3 -1
  363. package/frontend/dist/assets/index-Dk76uc7e.js +0 -1522
@@ -12,6 +12,25 @@ export declare function workbuddyConfigCandidates(): string[];
12
12
  * ordering contract is testable without touching the real home directory.
13
13
  */
14
14
  export declare function resolveWorkbuddyConfigPath(candidates?: string[]): string;
15
+ /**
16
+ * Install roots whose `versions/<app-version>/` layout the vendor's updater
17
+ * writes. Windows user installs live under `%LOCALAPPDATA%\Programs`; a
18
+ * machine-wide install repeats the same layout under Program Files.
19
+ * `WORKBUDDY_INSTALL_DIR` is the escape hatch for a custom location (and the
20
+ * test seam — the directory layout itself is identical on every platform).
21
+ */
22
+ export declare function workbuddyInstallRoots(): string[];
23
+ /**
24
+ * Installed desktop build from the vendor's versioned layout. The updater
25
+ * keeps whole builds side by side and names each folder with the app version
26
+ * (`versions/5.12.3`, matching the EXE's ProductVersion), so a readdir is the
27
+ * whole probe — no CLI involved. A folder only counts once its
28
+ * `.versioned-layout-complete.json` marker exists, so a half-staged update is
29
+ * never reported as installed. No layout found returns null and the row
30
+ * carries NO version fact (the app may live somewhere this build does not
31
+ * know) — never "not installed".
32
+ */
33
+ export declare function detectWorkbuddyVersion(): string | null;
15
34
  export declare class WorkBuddyClientAdapter implements ClientAdapter {
16
35
  name: "workbuddy";
17
36
  hookKind: "config";
@@ -4,6 +4,7 @@ import fs from 'node:fs';
4
4
  import { createBackup, describeBackup, restoreBackup, safeReadJson, safeWriteJson, defaultGatewayPort, } from './base.js';
5
5
  import { resolveClientModelMeta } from './model-meta.js';
6
6
  import { VIRTUAL_AUTO_IDS } from '../types.js';
7
+ import { compareVersions, parseVersion } from '../../utils/semver.js';
7
8
  /**
8
9
  * `vendor` is the hook marker. WorkBuddy validates every custom-model row
9
10
  * against a schema and reads the file as `{ models, availableModels }` (or a
@@ -49,6 +50,60 @@ export function resolveWorkbuddyConfigPath(candidates = workbuddyConfigCandidate
49
50
  const withDir = candidates.find(p => fs.existsSync(path.dirname(p)));
50
51
  return withDir || candidates[0];
51
52
  }
53
+ /**
54
+ * Install roots whose `versions/<app-version>/` layout the vendor's updater
55
+ * writes. Windows user installs live under `%LOCALAPPDATA%\Programs`; a
56
+ * machine-wide install repeats the same layout under Program Files.
57
+ * `WORKBUDDY_INSTALL_DIR` is the escape hatch for a custom location (and the
58
+ * test seam — the directory layout itself is identical on every platform).
59
+ */
60
+ export function workbuddyInstallRoots() {
61
+ const override = process.env.WORKBUDDY_INSTALL_DIR?.trim();
62
+ if (override)
63
+ return [path.resolve(override)];
64
+ if (process.platform !== 'win32')
65
+ return [];
66
+ const roots = [];
67
+ const local = process.env.LOCALAPPDATA?.trim();
68
+ if (local)
69
+ roots.push(path.join(local, 'Programs', 'WorkBuddy'));
70
+ for (const key of ['ProgramFiles', 'ProgramFiles(x86)']) {
71
+ const dir = process.env[key]?.trim();
72
+ if (dir)
73
+ roots.push(path.join(dir, 'WorkBuddy'));
74
+ }
75
+ return roots;
76
+ }
77
+ /**
78
+ * Installed desktop build from the vendor's versioned layout. The updater
79
+ * keeps whole builds side by side and names each folder with the app version
80
+ * (`versions/5.12.3`, matching the EXE's ProductVersion), so a readdir is the
81
+ * whole probe — no CLI involved. A folder only counts once its
82
+ * `.versioned-layout-complete.json` marker exists, so a half-staged update is
83
+ * never reported as installed. No layout found returns null and the row
84
+ * carries NO version fact (the app may live somewhere this build does not
85
+ * know) — never "not installed".
86
+ */
87
+ export function detectWorkbuddyVersion() {
88
+ for (const root of workbuddyInstallRoots()) {
89
+ const versionsDir = path.join(root, 'versions');
90
+ let entries;
91
+ try {
92
+ entries = fs.readdirSync(versionsDir, { withFileTypes: true });
93
+ }
94
+ catch {
95
+ continue;
96
+ }
97
+ const complete = entries
98
+ .filter(entry => entry.isDirectory() && parseVersion(entry.name))
99
+ .filter(entry => fs.existsSync(path.join(versionsDir, entry.name, '.versioned-layout-complete.json')))
100
+ .map(entry => entry.name)
101
+ .sort(compareVersions);
102
+ if (complete.length > 0)
103
+ return complete[complete.length - 1];
104
+ }
105
+ return null;
106
+ }
52
107
  const isRecord = (v) => !!v && typeof v === 'object' && !Array.isArray(v);
53
108
  /** A row owned by OCR: the vendor marker plus a usable http(s) endpoint. */
54
109
  const isOcrEntry = (m) => isRecord(m) && m.vendor === OCR_VENDOR &&
@@ -86,6 +141,11 @@ export class WorkBuddyClientAdapter {
86
141
  name = 'workbuddy';
87
142
  hookKind = 'config';
88
143
  displayName = 'WorkBuddy';
144
+ // Deliberately NO `versionCmd` / `updateSource`: WorkBuddy is a desktop app
145
+ // with no CLI to ask and no public release feed this build can verify. The
146
+ // installed DESKTOP build is still a fact the package owns — `getStatus`
147
+ // reads it from the vendor's `versions/<app-version>` install layout, and an
148
+ // unknown layout yields no chip rather than a guess.
89
149
  getConfigPath() {
90
150
  return resolveWorkbuddyConfigPath();
91
151
  }
@@ -118,6 +178,7 @@ export class WorkBuddyClientAdapter {
118
178
  }
119
179
  const ids = managed.map(m => String(m.id ?? '')).filter(Boolean);
120
180
  const main = ids[0];
181
+ const installed = detectWorkbuddyVersion();
121
182
  return {
122
183
  name: this.name,
123
184
  displayName: this.displayName,
@@ -126,6 +187,11 @@ export class WorkBuddyClientAdapter {
126
187
  hooked,
127
188
  backupExists,
128
189
  details,
190
+ // Package-owned version fact: the desktop app's own build, which no CLI
191
+ // probe could report. Absent layout = absent fact, not "not installed".
192
+ ...(installed
193
+ ? { version: { current: installed, state: 'ok', meetsMin: true } }
194
+ : {}),
129
195
  modelSlots: [{ key: 'main', value: main, default: 'auto' }],
130
196
  // The virtual tier block is router-owned, never echoed as user extras.
131
197
  extraModels: ids.slice(1).filter(id => !VIRTUAL_AUTO_IDS.has(id)),
@@ -36,7 +36,7 @@ function formatClientWarnings(warnings, pluginLabels) {
36
36
  case 'ca_trust_unknown':
37
37
  return 'CA trust could not be verified on this platform — check the Proxy Access setup wizard if HTTPS fails.';
38
38
  case 'proxy_not_running':
39
- return `The forward proxy is not running on port ${w.params?.port ?? '?'} — start the gateway before launching.`;
39
+ return `The ingress proxy is not running on port ${w.params?.port ?? '?'} — start the gateway before launching.`;
40
40
  case 'ide_running':
41
41
  return 'A JetBrains IDE was running during setup: the hook applies on its next start, and the IDE rewrites proxy.settings.xml from memory when it exits — re-run setup after quitting it.';
42
42
  case 'ide_truststore_readonly':
@@ -92,7 +92,7 @@ ${C.bold}USER INTERFACE:${C.reset}
92
92
  ${C.cyan}ocr desktop${C.reset} Open native desktop window (falls back to web if not installed)
93
93
 
94
94
  ${C.bold}CLIENT INTEGRATIONS (SETUP & TEARDOWN):${C.reset}
95
- ${clientIntegrationHelp()} Flags for both: --port <n>, --product <id> (JetBrains family: act on ONE IDE), --force (act on a client that is currently running — the hook can be undone when it exits)
95
+ ${clientIntegrationHelp()} Flags for both: --port <n>, --product <id> (family adapters: act on ONE product, e.g. a JetBrains IDE or a Qoder edition), --force (act on a client that is currently running — the hook can be undone when it exits)
96
96
 
97
97
  ${C.bold}ENVIRONMENTS (book-sets under ~/.omnicell-router/envs/):${C.reset}
98
98
  ${C.cyan}ocr env list${C.reset} List environments (current = next boot picks)
@@ -392,8 +392,9 @@ async function main() {
392
392
  if (portIdx !== -1 && args[portIdx + 1]) {
393
393
  port = parseInt(args[portIdx + 1], 10);
394
394
  }
395
- // Parse optional --product flag (JetBrains family: act on ONE IDE, e.g.
396
- // `--product goland`); absent = every detected product.
395
+ // Parse optional --product flag (family adapters: act on ONE product, e.g.
396
+ // `--product goland` or `--product qoder-cn`); absent = every detected
397
+ // product.
397
398
  let product;
398
399
  const productIdx = args.findIndex((a) => a === '--product');
399
400
  if (productIdx !== -1 && args[productIdx + 1])
@@ -27,6 +27,14 @@ export function getOcrHomeDir() {
27
27
  * `getOcrHomeDir()`.
28
28
  */
29
29
  export function getSharedDataRootDir() {
30
+ // OCR_SHARED_DATA_ROOT override: the sandbox substrate for suites that
31
+ // exercise the machine-wide root directly (CA adoption, data-dir migration).
32
+ // Without it such a suite deletes the operator's live trust anchor instead
33
+ // of a throwaway copy. Same override class as OCR_HOME / OCR_CA_DIR; unset
34
+ // in every real run. Empty/whitespace = unset.
35
+ const override = process.env.OCR_SHARED_DATA_ROOT?.trim();
36
+ if (override)
37
+ return path.resolve(override);
30
38
  if (process.platform === 'win32') {
31
39
  const local = process.env.LOCALAPPDATA?.trim() || path.join(os.homedir(), 'AppData', 'Local');
32
40
  return path.join(local, 'omnicell-router');
@@ -29,9 +29,9 @@ export interface DaemonInfo {
29
29
  /** How an adapter applies its hook. `config` rewrites the client's own config
30
30
  * file to point at the gateway; `launcher` publishes proxy launch scripts;
31
31
  * `service-env` sets a managed service's environment; `proxy-config` rewrites
32
- * the client's own config file to point at the inbound forward proxy (no API
32
+ * the client's own config file to point at the inbound ingress proxy (no API
33
33
  * key, no launcher script — the file IS the takeover, undone on teardown).
34
- * The last three are forward-proxy hooks: no key is written, traffic rides the
34
+ * The last three are ingress-proxy hooks: no key is written, traffic rides the
35
35
  * inbound proxy. */
36
36
  export type ClientHookKind = 'config' | 'launcher' | 'service-env' | 'proxy-config';
37
37
  export interface ClientHookStatus {
@@ -68,12 +68,20 @@ export interface ClientHookStatus {
68
68
  backupExists: boolean;
69
69
  details: string;
70
70
  /**
71
- * Installed CLI version probe (absent when the adapter declares no
72
- * versionCmd or the probe fails). `meetsMin` compares against the adapter's
73
- * `minVersion` — the oldest release whose config contract the adapter's
74
- * writes still honor, NOT the newest verified version.
71
+ * Installed CLI version probe. PRESENT whenever the adapter declares a
72
+ * `versionCmd` — the tri-state `state` says what the probe actually learned,
73
+ * so the console can tell "not installed" from "could not tell" instead of
74
+ * inferring both from an absent field. `meetsMin` compares against the
75
+ * adapter's `minVersion` — the oldest release whose config contract the
76
+ * adapter's writes still honor, NOT the newest verified version.
75
77
  */
76
78
  version?: ClientVersionInfo;
79
+ /**
80
+ * Newest PUBLISHED version of this client, from the source its hook declares
81
+ * (`ClientAdapter.updateSource`). Display-only: nothing here ever installs,
82
+ * downloads or gates a request. Absent = the hook declares no source.
83
+ */
84
+ update?: ClientUpdateInfo;
77
85
  /** This client's model slots as declared by the adapter (value undefined/'auto' = intelligent routing) */
78
86
  modelSlots: ClientModelSlot[];
79
87
  /** Extra concrete models exposed in the client's model switcher (opencode provider models list) */
@@ -87,10 +95,10 @@ export interface ClientHookStatus {
87
95
  * nothing observed yet.
88
96
  */
89
97
  catalogIds?: string[];
90
- /** Additional files this adapter owns beyond `configPath` — Cursor publishes
91
- * a second launcher for the `cursor-agent` CLI. `exists` is probed at status
92
- * time so the console can list every artifact without a second round-trip.
93
- * Absent for single-artifact adapters. */
98
+ /** Additional files this adapter owns beyond `configPath` (e.g. a second
99
+ * launcher for another binary the client ships). `exists` is probed at
100
+ * status time so the console can list every artifact without a second
101
+ * round-trip. Absent for single-artifact adapters. */
94
102
  artifacts?: ClientArtifact[];
95
103
  /** Family adapters only: the product instances this machine actually has,
96
104
  * each with its own takeover state. Absent for single-product adapters —
@@ -116,10 +124,11 @@ export interface ClientHookStatus {
116
124
  };
117
125
  }
118
126
  /**
119
- * One product instance inside a FAMILY adapter — one installed JetBrains IDE,
120
- * say. Status is per instance because each product owns its own config root
121
- * and truststore, so "hooked" is never a family-wide verdict: IDEA can be
122
- * taken over while GoLand is untouched on the same machine.
127
+ * One product instance inside a FAMILY adapter — one installed JetBrains IDE
128
+ * or one Qoder edition, say. Status is per instance because each product owns
129
+ * its own install and config surface, so "hooked" is never a family-wide
130
+ * verdict: IDEA can be taken over while GoLand is untouched on the same
131
+ * machine, and the Qoder CN launcher can exist beside the international one.
123
132
  */
124
133
  export interface ClientProductStatus {
125
134
  /** Stable product key (`intellij-idea`, `goland`) — the console's row key and the `--product`/`product` action target. */
@@ -128,6 +137,11 @@ export interface ClientProductStatus {
128
137
  /** Brand asset key for the product row (`idea`, `goland`); absent = the id is
129
138
  * the asset name. Declared by the hook, never derived by the console. */
130
139
  icon?: string;
140
+ /** Supported by the hook but absent from this machine (no install, no config
141
+ * root). The console still lists it — DISABLED — so the family's coverage
142
+ * stays visible instead of shrinking to whatever happens to be installed.
143
+ * Absent = available. */
144
+ available?: boolean;
131
145
  /** Build version the install reports (`product-info.json`), when one was found. */
132
146
  version: string | null;
133
147
  /** The file this product's takeover lands in. */
@@ -153,12 +167,74 @@ export interface ClientArtifact {
153
167
  path: string;
154
168
  exists: boolean;
155
169
  }
156
- /** Installed-version probe result: current CLI version vs the adapter's minimum-compatible floor. */
170
+ /**
171
+ * What an installed-version probe actually learned.
172
+ *
173
+ * - `ok` — the command ran and reported a version.
174
+ * - `missing` — there is NO such command on this machine. This is the ONLY
175
+ * state a console may render as "not installed".
176
+ * - `unknown` — the command exists but produced nothing usable (deadline, a
177
+ * non-zero exit, a banner with no version token, a broken
178
+ * install). Reporting this as "not installed" would send an
179
+ * operator to reinstall a client that is right there.
180
+ */
181
+ export type ClientVersionState = 'ok' | 'missing' | 'unknown';
182
+ /** Installed-version probe result: what is on this machine vs the adapter's minimum-compatible floor. */
157
183
  export interface ClientVersionInfo {
158
- current: string;
184
+ /** Installed version; null unless `state` is `ok`. */
185
+ current: string | null;
186
+ /**
187
+ * Optional on the way IN, always present on the way OUT: a hook may report a
188
+ * bare version and let the engine fill the tri-state, but every roster row
189
+ * leaves `buildRoster` with it stamped.
190
+ */
191
+ state?: ClientVersionState;
159
192
  min?: string;
193
+ /** True only for a known version at or above the floor. */
160
194
  meetsMin: boolean;
161
195
  }
196
+ /**
197
+ * Where the newest published version of a client can be read. DECLARED by the
198
+ * hook that owns the client (core adapter or package) — the engine knows how to
199
+ * read a release source, never WHICH source a vendor publishes to, so a vendor
200
+ * moving channels is a package release and not an engine release (same split as
201
+ * ADR-0042's environment preflight).
202
+ */
203
+ export type ClientUpdateSource = {
204
+ kind: 'npm';
205
+ package: string;
206
+ } | {
207
+ kind: 'github';
208
+ repo: string;
209
+ }
210
+ /**
211
+ * A vendor-owned HTTPS release endpoint the hook itself verified. Absent
212
+ * `pick`: the body's first non-empty line is the version (the shape xAI's
213
+ * installer probe reads). With `pick`: a dotted field path into a JSON body
214
+ * (Cursor's download API `version`). `page` is where a HUMAN gets the build —
215
+ * the console link is built from it, never from a payload.
216
+ */
217
+ | {
218
+ kind: 'endpoint';
219
+ url: string;
220
+ pick?: string;
221
+ page: string;
222
+ };
223
+ /** Newest published version, as far as the last check could tell. Display-only. */
224
+ export interface ClientUpdateInfo {
225
+ /** Newest published version, normalized; null until the first successful check. */
226
+ latest: string | null;
227
+ /** Strictly newer than the installed version (false when either side is unknown/unparseable). */
228
+ available: boolean;
229
+ /** Where a human gets it — built from the DECLARED source, never from a payload. */
230
+ url: string;
231
+ /** ISO timestamp of the last successful check. */
232
+ checkedAt?: string;
233
+ /** A check for this client is in flight right now. */
234
+ checking: boolean;
235
+ /** Last failure (network / HTTP / malformed payload); cleared by success. */
236
+ error?: string;
237
+ }
162
238
  /**
163
239
  * Virtual tier aliases the gateway resolves natively. Adapters inject these
164
240
  * into the client's model switcher; a follow-mode setup narrows the block to
@@ -16,7 +16,7 @@
16
16
  export const YAML_FILE_HEADER_EN = [
17
17
  'OmniCellRouter gateway configuration (config.yaml) — schemaVersion 1 (grouped format; evolution rules in docs/adr/0016-config-schema-evolution.md)',
18
18
  'Configuration layers (six groups, exactly one home per section):',
19
- ' client Client entry surface: port / host / adminKey / webAuth / apiKeys / rateLimit / bodyLimits / autoResyncFollowCatalogs / forwardProxy — how requests enter',
19
+ ' client Client entry surface: port / host / adminKey / webAuth / apiKeys / rateLimit / bodyLimits / autoResyncFollowCatalogs / ingressProxy — how requests enter',
20
20
  ' protocol Protocol surface: systemone / responses — which wire the gateway speaks',
21
21
  ' routing Traffic-orchestration surface: strategy / tiers / classifier / session / directives / routeEntries / combos / profileMemory — which model serves',
22
22
  ' resilience Failure-recovery surface: circuitBreaker / retry (inplace / failover / escalation) — what happens when a call fails',
@@ -34,10 +34,11 @@ export const YAML_FIELD_COMMENTS_EN = {
34
34
  'webAuth.username': 'Console login username',
35
35
  'webAuth.passwordHash': 'scrypt hash of the login password (format scrypt$<saltHex>$<hashHex>, never plaintext; change it on the console "System Settings" page — do not hand-write)',
36
36
  tiers: 'Tier membership policy: the ONLY source of candidate pools = each tier\'s explicit members list + the global exclude list. Factory default is four EMPTY tiers (no built-in member globs, no runtime seeding) — on first boot every pool is empty and `auto` cannot route; add members on the console /tiers page or here. A model no rule matches has no tier and joins no pool; the selection strategy only affects in-pool usage (visual editing on /tiers, applies on save; deleting the whole tiers section restores these empty defaults on next load)',
37
- 'tiers.*.members': 'Member list (order = priority / failover chain): entries { pattern, weight?, effortMap? } — pattern matches the FULL model id (provider/model) as a glob (* any chars / ? one char, case-insensitive); no wildcard = substring match; a full id = single item. A pattern may also reference a combo via combo:<comboId> — expanded in place to that combo\'s registered members on every submit/save (the tier pool follows combo edits; weight from the combo member entry; a dead reference = unknown/disabled/no-registered-members combo, expands to empty with a save-time warning). effortMap = thinking-level translation (e.g. { none: high, low: high }; unconfigured levels pass through unchanged); effortMap on a combo reference applies to all its expanded members. The same model/combo may join several tiers — membership is computed per tier with that tier\'s own chain order / weight / effortMap',
37
+ 'tiers.*.members': 'Member list (chain order = weight desc, then list order, for EVERY strategy; `priority` serves that chain head): entries { pattern, weight?, effortMap? } — pattern matches the FULL model id (provider/model) as a glob (* any chars / ? one char, case-insensitive); no wildcard = substring match; a full id = single item. A pattern may also reference a combo via combo:<comboId> — expanded in place to that combo\'s registered members on every submit/save (the tier pool follows combo edits; weight from the combo member entry; a dead reference = unknown/disabled/no-registered-members combo, expands to empty with a save-time warning). effortMap = thinking-level translation (e.g. { none: high, low: high }; unconfigured levels pass through unchanged); effortMap on a combo reference applies to all its expanded members. The same model/combo may join several tiers — membership is computed per tier with that tier\'s own chain order / weight / effortMap',
38
38
  'tiers.exclude': 'Global exclude list (edited on the raw-YAML page; the /tiers page round-trips it verbatim): matching models join NO candidate pool (unconditional; still callable directly by id or via combos)',
39
- 'tiers.*.selection': 'Primary-pick strategy: priority / weighted random / round_robin',
40
- 'routing.mode': 'Routing strategy: smart = classifier cascade (default) / cost = always lite / quality = always pro',
39
+ 'tiers.*.selection': 'Primary-pick strategy: priority (chain head) / weighted_round_robin (smooth weighted rotation; member weight = rotation share) / round_robin (equal sequential rotation; weights ignored)',
40
+ 'routing.mode': 'Routing strategy: smart = classifier cascade (default) / cost = the cheapest priced model in the lite tier, failure escalation capped at plus / quality = always pro',
41
+ 'routing.costEscalation': 'cost mode failure escalation: to_fallback_tier (default) = a failing lite answer may escalate after the failure, capped at plus (never pro/ultra, never preemptively) / never = hard lite pin',
41
42
  fallback: 'Final fallback: after retries are exhausted, escalate a tier and retry',
42
43
  'fallback.maxRetries': 'Fallback retry count',
43
44
  'fallback.escalateTier': 'Fallback escalation target tier',
@@ -134,19 +135,19 @@ export const YAML_FIELD_COMMENTS_EN = {
134
135
  'retry.failover.maxAttempts': 'Failover attempt count',
135
136
  'retry.failover.tierCrossPolicy': 'Cross-tier policy: allow_escalate may climb a tier',
136
137
  rateLimit: 'Rate-limit policy switches (the windows themselves live in client.apiKeys[].limits and the upstream.credentials overlay)',
137
- bodyLimits: 'Request-body admission caps (ADR-0008), one per HTTP plane, counted on the DECOMPRESSED body: `maxBytes` for the inference surfaces (chat / responses / anthropic on the native listener AND the same paths through the forward-proxy MITM leg), `adminMaxBytes` for the console plane. RESTART REQUIRED — Fastify reads a route bodyLimit when the route is registered, so a change lands on the next controlled restart (ADR-0007). Out-of-range values are clamped, junk falls back to the shipped default. Not the capture knob: `ops.requestCapture.maxBodyBytes` only decides how much of a body is ARCHIVED and never rejects a request. Neither cap applies to the two upload routes (book import, plugin package), which declare their own.',
138
+ bodyLimits: 'Request-body admission caps (ADR-0008), one per HTTP plane, counted on the DECOMPRESSED body: `maxBytes` for the inference surfaces (chat / responses / anthropic on the native listener AND the same paths through the ingress-proxy MITM leg), `adminMaxBytes` for the console plane. RESTART REQUIRED — Fastify reads a route bodyLimit when the route is registered, so a change lands on the next controlled restart (ADR-0007). Out-of-range values are clamped, junk falls back to the shipped default. Not the capture knob: `ops.requestCapture.maxBodyBytes` only decides how much of a body is ARCHIVED and never rejects a request. Neither cap applies to the two upload routes (book import, plugin package), which declare their own.',
138
139
  autoResyncFollowCatalogs: 'When true (default), changing an API key\'s modelAccess OR rebuilding the live model pool event-drives a rewrite of every hooked follow-mode client catalog and every gateway plugin with modelListMode=follow. enabled / expiry / delete only affect auth and do not rewrite catalogs. Running clients are queued as pending (no silent acknowledgeRunning). Hot — no restart. Turn off to keep follow snapshots frozen until a manual re-hook. Not a profile write-through (ADR-0031).',
139
140
  'bodyLimits.maxBytes': 'Inference-plane cap in bytes (default 33554432 = 32 MiB; clamped to 65536…536870912 = 64 KiB…512 MiB). A body over it is refused with 413 naming this number; a body declaring a compression format the gateway cannot decode (gzip / x-gzip / deflate / br) is refused with 415 + `Accept-Encoding` before it is read, and inflates past this cap mid-stream is a 413. Raise it only knowing one request holds that many bytes in memory per in-flight client.',
140
141
  'bodyLimits.adminMaxBytes': 'Console-plane cap in bytes (default 8388608 = 8 MiB; same bounds). Covers every /api/admin/* route that does not declare its own, the largest real payload being the raw-YAML config save (the whole config.yaml in one string). A route that needs more declares its own bodyLimit at registration and is exempt from this cap.',
141
142
  'rateLimit.persist': 'Persistence of the triggered-rate-limit-event ledger: written to traces.db (its own handle in the trace/FinOps database) so the /rate-limit page still shows pre-restart history; observability writes fail open and never block the request path',
142
143
  'rateLimit.persist.enabled': 'Ledger persistence switch (default on): triggered events write to traces.db (the /rate-limit page survives restarts), with a 30s sliding-window checkpoint plus a flush on graceful shutdown and replay at boot (1d-class long-window budgets survive restarts; a hard kill loses at most one checkpoint period); off = memory only (cleared on restart)',
143
144
  'rateLimit.inboundGraceMs': 'Grace wait (ms, default 1000, cap 2000, 0 = off): when a client-key window is full but reopens within this budget, the gateway waits exactly once and re-checks (no loop); still full or over budget → 429 + Retry-After. Absorbs sub-second bursts so a short rate limit never becomes a user-visible error; long windows keep fast-failing: the limit contract is unchanged, the wait belongs to the client\'s own backoff',
144
- apiKeys: 'Client access keys (sk-ocr-*, see the /keys page); each key may carry limits = an inbound sliding-window budget with rules { window, requests | tokens | costUsd } (window in duration syntax 30s/5m/1h/1d; multiple dimensions on one rule = independent counters; ANY full window rejects — within the grace wait (client.rateLimit.inboundGraceMs) the gateway waits once and re-checks, otherwise 429 + Retry-After; rejected requests never count; applies on save). The requests dimension covers all four inference wires (the forward-proxy MITM leg bypasses this entry and is not inbound-metered); tokens/costUsd are booked on completion for the chat-shaped wires (chat/messages/responses) and the systemone decision wire (decision wire by protocol usage; native answers without usage count only requests)',
145
+ apiKeys: 'Client access keys (sk-ocr-*, see the /keys page); each key may carry limits = an inbound sliding-window budget with rules { window, requests | tokens | costUsd } (window in duration syntax 30s/5m/1h/1d; multiple dimensions on one rule = independent counters; ANY full window rejects — within the grace wait (client.rateLimit.inboundGraceMs) the gateway waits once and re-checks, otherwise 429 + Retry-After; rejected requests never count; applies on save). The requests dimension covers all four inference wires (the ingress-proxy MITM leg bypasses this entry and is not inbound-metered); tokens/costUsd are booked on completion for the chat-shaped wires (chat/messages/responses) and the systemone decision wire (decision wire by protocol usage; native answers without usage count only requests)',
145
146
  credentials: 'Per-credential rate-limit overlay (raw-YAML page, applies on save): grouped by provider id, entries { keyHashPrefix, limits } — keyHashPrefix is the first 12 hex chars of the credential\'s sha256 (visible on the console credential card; unrelated to add/rename; case-insensitive — normalized at compile/match, verbatim on disk); limits syntax matches apiKeys (sliding window; requests = request count, tokens = tokens consumed, costUsd = USD cost, booked at completion). Outbound limiting only shapes: a capped credential is skipped in NEW-session selection and NEVER moves a kept session (rebinding burns the upstream prompt cache), and the last candidate is force-admitted when the pool runs dry — a genuine upstream 429 is still the breaker\'s call. Decision-wire exception: /v1/systemone bypasses the candidate pool — no local skip/reject, no breaker; upstream errors pass through verbatim; but its outbound dispatch and completion booking still count and will fill credential windows. Internal legs (L2 decision, health probes) book nothing and never fill windows',
146
147
  'credentials.*': 'That provider\'s credential rule list (key = provider id, e.g. anthropic); entries { keyHashPrefix, limits }',
147
148
  quota: 'Quota-probe scheduling: the coverage table and code adapters ship with the release — this only tunes the scheduler; credentials appearing auto-arm their probes (activation follows credentials), probe failure ≠ quota failure — the old value goes stale, never tripping the breaker or evicting; declared limits are display-only, never route-gating',
148
149
  'quota.enabled': 'Quota-probe master switch (default true); false = stop all outbound quota probing (stored snapshots still display, stale marking unchanged)',
149
- 'quota.intervalMs': 'Scheduler tick (ms, default 60000, clamped [10000, 3600000]); each entry also has a cacheTtl window clamped [60s, 24h] + jitter; a 429 triggers an engine-level global backoff (not a per-entry field)',
150
+ 'quota.intervalMs': 'Scheduler tick (ms, default 30000, clamped [10000, 3600000]); each entry also has a cacheTtl window clamped [60s, 24h] + jitter (subscription windows default 5 min, balance/credit 2 min); a 429 triggers an engine-level global backoff (not a per-entry field)',
150
151
  quotaProbes: 'Custom quota probes (long-tail/self-hosted gateways, raw-YAML page, applies on save): grouped by provider id, entries { url, windows, headers?, cacheTtlMs?, successIf?, override?, forkedFrom?, verifiedAt? } — iron rules (binding this layer only): url is a relative path that must resolve inside that provider\'s inference origin (../, absolute paths and other schemes rejected); auth always reuses the inference Bearer (providers needing assembly/scheme changes/derived headers go through the built-in code adapters, never this table); GET-only; one entry = one URL; overriding a built-in requires an explicit override: <builtin id> (silent shadowing is refused at load), fork entries carry a forkedFrom+verifiedAt lineage. The windows DSL is declarative (12 constructs: static/each/eachObject forms, firstOf, two-of-three used/total/remaining, invert, scale, where limited to exists/equals/∈, name template + enum mapping, static headers, successIf single-equality, unlimited, header extraction, s/ms/ISO time detection; the seven banned classes — arithmetic, cross-call injection, value comparison, regex, time deltas, per-URL negation, header interpolation — reject the whole entry at load with the reason shown on the console quota page)',
151
152
  'quotaProbes.*': 'That provider\'s probe entry array (key = provider id, e.g. my-gateway); each entry is one window table: windows { form: static|each|eachObject, path?, window|windows, plan? } — field extraction { path | header | literal, firstOf?, scale?, invertOf?, time? }; any two of used/total/remaining derive the third; where limited to exists/equals/∈; name nameSpec { from, enumMap, fallback } or a pure-interpolation template ({field}); successIf single-equality',
152
153
  opencode: 'OpenCode local-service connection',
@@ -173,23 +174,22 @@ export const YAML_FIELD_COMMENTS_EN = {
173
174
  'proxy.mihomo.testUrl': 'Health-check / delay-test URL (http or https, no embedded credentials). Default https://www.gstatic.com/generate_204, the same 204 endpoint the core itself uses; change it when that endpoint is unreachable from this machine or through the nodes (e.g. a mainland-China network). The console offers Google 204 / Google / Cloudflare / OpenAI / Anthropic / Gemini presets but the field is free text and applies to saved nodes before the next test',
174
175
  'proxy.mihomo.rules': 'Operator-authored rules, evaluated IN ORDER before the final MATCH (first match wins). Each row is { type, payload, target }: type is one of DOMAIN, DOMAIN-SUFFIX, DOMAIN-KEYWORD, IP-CIDR, IP-CIDR6, GEOIP, GEOSITE, DST-PORT, SRC-PORT, PROCESS-NAME, PROCESS-PATH. GEOIP / GEOSITE are evaluated from the Clash panel\'s downloaded geo databases — the core will not start with such a row while they are missing — while RULE-SET is dropped on load (it fetches a remote document). target is PROXY / DIRECT / REJECT, where PROXY resolves to selectedGroup at render time. A payload containing a comma or newline is dropped. Left absent, the shipped LAN/loopback direct baseline is seeded; an explicit list (even empty) is authoritative. Saving from the console reconciles the core onto the new config; keep the list short — this is a routing override, not a rule-set store',
175
176
  'proxy.mihomo.selectedNodes': 'Map of group name → node name. Restored through the external controller after each start so a restart comes back on the same node',
176
- forwardProxy: 'Inbound forward proxy (the HTTP_PROXY/HTTPS_PROXY server): the rules table decides per host whether the connection is decrypted and where the bytes exit (loopback is always direct + passthrough). Decryption follows capability, not a blanket default — plugin-claimed hosts and explicit `ingress: intercept` rows are decrypted, everything else is a blind tunnel unless `intercept: all` turns on the audit posture (see `forwardProxy.intercept`). Decrypted LLM-protocol traffic (chat/messages/responses) enters the routing pipeline, everything else is transparently forwarded; clients whose traffic IS decrypted must trust the exported CA (restart required)',
177
- 'forwardProxy.enabled': 'Inbound proxy master switch (default false)',
178
- 'forwardProxy.port': 'Proxy listen port (default 4555; clients point HTTP_PROXY/HTTPS_PROXY at http://127.0.0.1:4555)',
179
- 'forwardProxy.host': 'Proxy listen address (default 127.0.0.1, loopback only)',
180
- 'forwardProxy.requireCredential': 'Require an API key on EVERY connection, loopback included (default false). Identity then always travels with the client as `Proxy-Authorization: Basic <any>:<keySecret>`, and a gateway plugin\'s bound key (`accountKeyId`) stops acting as a fallback — no other process on this machine can spend it. Hot-applies on save; with no enabled key every request is refused (407). The generated Cursor/Qoder launchers embed the bound key in the proxy URL (owner-only file), because Chromium may prompt but their Node/gRPC legs cannot — without a bound key setup refuses instead of writing a 407-bound launcher',
181
- 'forwardProxy.rules': 'The rule table (ADR-0018, fourth revision) — one ordered list, FIRST MATCH WINS, two fields per row naming the host\'s whole outcome: { match: <glob over the bare hostname>, ingress: intercept | passthrough | reject, egress: direct | proxy }. `ingress` is what happens at ingress — `intercept` MITMs the connection (on a SPECIFIC row it means it, and that row outranks any plugin claim; on the catch-all row it is only the default posture for hosts nothing claims), `passthrough` blind-tunnels the bytes untouched (cert-pinned hosts, non-HTTP TLS, \'do not look at this one\'), `reject` answers 403 on admission (before any tunnel is opened or certificate minted); `egress` is where the bytes exit — `direct` straight out of this machine, `proxy` through the outbound proxy configured in the `proxy:` section. A `reject` row MUST use `egress: direct` (it never sends bytes anywhere; reject + egress proxy is flagged invalid). Loopback is always passthrough + direct and no rule can override it; a host no rule matches takes the catch-all row\'s `egress` and is blind-tunneled unless a live client-gateway plugin claims it or `intercept: all` is set — so an EMPTY table decrypts nothing. Order IS the semantics — no specificity ranking, no category precedence. Hot-applies on save',
182
- 'forwardProxy.intercept': 'Interception posture (default claims). `claims` decrypts ONLY the hosts a live client-gateway plugin claims (plugins declare what they need to read) plus rows you write `ingress: intercept`; every other host is a blind tunnel, so installing the gateway never turns into machine-wide TLS interception. `all` is the audit posture — every proxied host is decrypted — and is warned at boot and banner-flagged on the console while it is on. Junk values fall back to claims (never to all). Hot-applies on save',
183
- 'forwardProxy.maxConnections': 'Concurrent proxied-exchange cap (default 512, clamp 16..8192): exchanges started past it are refused (a CONNECT socket is closed, a plain request gets 503) — every tunneled or decrypted socket holds two fds (the accepted socket plus its decrypted loopback peer). Counted at admission (CONNECT / plain request); hot-applies on save',
184
- 'forwardProxy.caDir': 'MITM CA directory (default ~/.omnicell-router/forward-proxy)',
185
- 'forwardProxy.upstreamTls': 'Upstream TLS trust for the ORIGIN legs (the proxy validates the real target certificate). A private CA — a corporate TLS-inspection chain, an internal service, a staging box — is unreachable until it is trusted here. Hot-applies on save; an h2 session opened under the old policy is never reused',
186
- 'forwardProxy.upstreamTls.caFile': 'PEM bundle appended to the system trust store (never replacing it). Rotating the file is picked up within a few seconds; a missing or unreadable file warns once and leaves the system store in force (verification is never silently disabled)',
187
- 'forwardProxy.upstreamTls.insecure': 'Disable upstream certificate verification entirely (default false). Escape hatch for a broken chain: any origin, including a MITM on the path, is then accepted. Warned at boot and shown on the console while it is on',
188
- 'forwardProxy.accessLog': 'Access log for the transparent-forward path (hot-applies on save): records every NON-intercepted HTTP exchange and CONNECT tunnel decision — hot view is a 300-event memory ring backed by daily JSONL files under <ocrHome>/forward-proxy/access-log/ (survives restarts). LLM-protocol traffic keeps its rich capture in the /traces archive and is not duplicated here',
189
- 'forwardProxy.accessLog.enabled': 'Record non-intercepted traffic (default true)',
190
- 'forwardProxy.accessLog.bodyBytes': 'Per-side body capture cap in bytes (default: 1 MiB — a larger body spills to a raw body file while persisting, so the heap stays bounded; 0 = headers only). Headers always pass the shared credential deny-list',
191
- 'forwardProxy.accessLog.persist': 'Persist events to the daily JSONL files (default true); off = memory-ring only, restart clears',
192
- 'forwardProxy.accessLog.persistDays': 'Day-file retention for the persisted access log — older files are deleted at startup and daily (default 7, clamp 1..365)',
177
+ ingressProxy: 'Inbound ingress proxy (the HTTP_PROXY/HTTPS_PROXY server): the rules table decides per host whether the connection is decrypted and where the bytes exit (loopback is always direct + passthrough). Decryption follows capability, not a blanket default — plugin-claimed hosts and explicit `ingress: intercept` rows are decrypted, everything else is a blind tunnel unless `intercept: all` turns on the audit posture (see `ingressProxy.intercept`). Decrypted LLM-protocol traffic (chat/messages/responses) enters the routing pipeline, everything else is transparently forwarded; clients whose traffic IS decrypted must trust the exported CA (restart required)',
178
+ 'ingressProxy.enabled': 'Inbound proxy master switch (default false)',
179
+ 'ingressProxy.port': 'Proxy listen port (default 4555; clients point HTTP_PROXY/HTTPS_PROXY at http://127.0.0.1:4555)',
180
+ 'ingressProxy.host': 'Proxy listen address (default 127.0.0.1, loopback only; the inbound proxy authenticates nobody, so a non-loopback bind is refused — reach a remote client through a tunnel)',
181
+ 'ingressProxy.rules': 'The rule table (ADR-0018, fourth revision) — one ordered list, FIRST MATCH WINS, two fields per row naming the host\'s whole outcome: { match: <glob over the bare hostname>, ingress: intercept | passthrough | reject, egress: direct | proxy }. `ingress` is what happens at ingress — `intercept` MITMs the connection (on a SPECIFIC row it means it, and that row outranks any plugin claim; on the catch-all row it is only the default posture for hosts nothing claims), `passthrough` blind-tunnels the bytes untouched (cert-pinned hosts, non-HTTP TLS, \'do not look at this one\'), `reject` answers 403 on admission (before any tunnel is opened or certificate minted); `egress` is where the bytes exit — `direct` straight out of this machine, `proxy` through the outbound proxy configured in the `proxy:` section. A `reject` row MUST use `egress: direct` (it never sends bytes anywhere; reject + egress proxy is flagged invalid). Loopback is always passthrough + direct and no rule can override it; a host no rule matches takes the catch-all row\'s `egress` and is blind-tunneled unless a live client-gateway plugin claims it or `intercept: all` is set — so an EMPTY table decrypts nothing. Order IS the semantics — no specificity ranking, no category precedence. Hot-applies on save',
182
+ 'ingressProxy.intercept': 'Interception posture (default claims). `claims` decrypts ONLY the hosts a live client-gateway plugin claims (plugins declare what they need to read) plus rows you write `ingress: intercept`; every other host is a blind tunnel, so installing the gateway never turns into machine-wide TLS interception. `all` is the audit posture — every proxied host is decrypted — and is warned at boot and banner-flagged on the console while it is on. Junk values fall back to claims (never to all). Hot-applies on save',
183
+ 'ingressProxy.maxConnections': 'Concurrent proxied-exchange cap (default 512, clamp 16..8192): exchanges started past it are refused (a CONNECT socket is closed, a plain request gets 503) — every tunneled or decrypted socket holds two fds (the accepted socket plus its decrypted loopback peer). Counted at admission (CONNECT / plain request); hot-applies on save',
184
+ 'ingressProxy.caDir': 'MITM CA directory (default ~/.omnicell-router/ingress-proxy)',
185
+ 'ingressProxy.upstreamTls': 'Upstream TLS trust for the ORIGIN legs (the proxy validates the real target certificate). A private CA — a corporate TLS-inspection chain, an internal service, a staging box — is unreachable until it is trusted here. Hot-applies on save; an h2 session opened under the old policy is never reused',
186
+ 'ingressProxy.upstreamTls.caFile': 'PEM bundle appended to the system trust store (never replacing it). Rotating the file is picked up within a few seconds; a missing or unreadable file warns once and leaves the system store in force (verification is never silently disabled)',
187
+ 'ingressProxy.upstreamTls.insecure': 'Disable upstream certificate verification entirely (default false). Escape hatch for a broken chain: any origin, including a MITM on the path, is then accepted. Warned at boot and shown on the console while it is on',
188
+ 'ingressProxy.accessLog': 'Access log for the transparent-forward path (hot-applies on save): records every NON-intercepted HTTP exchange and CONNECT tunnel decision — hot view is a 300-event memory ring backed by daily JSONL files under <ocrHome>/ingress-proxy/access-log/ (survives restarts). LLM-protocol traffic keeps its rich capture in the /traces archive and is not duplicated here',
189
+ 'ingressProxy.accessLog.enabled': 'Record non-intercepted traffic (default true)',
190
+ 'ingressProxy.accessLog.bodyBytes': 'Per-side body capture cap in bytes (default: 1 MiB — a larger body spills to a raw body file while persisting, so the heap stays bounded; 0 = headers only). Headers always pass the shared credential deny-list',
191
+ 'ingressProxy.accessLog.persist': 'Persist events to the daily JSONL files (default true); off = memory-ring only, restart clears',
192
+ 'ingressProxy.accessLog.persistDays': 'Day-file retention for the persisted access log — older day files (and their spilled body sidecars) are deleted at startup and daily (default 7, clamp 1..365)',
193
193
  compression: 'Token compression (rtk tool-output compression + headroom context compression + caveman output-style injection; all stages fail open passing the original through, restart required)',
194
194
  'compression.rtk.enabled': 'rtk tool-output compression: compresses tool-result text (git/grep/ls/tree/logs/build output) by 60-90% (local deterministic compressor, upstream prefix-cache safe)',
195
195
  'compression.headroom.enabled': 'headroom context compression: calls the headroom sidecar\'s /v1/compress before forwarding (failure/timeout passes the original; session mode preserves the upstream prefix cache)',
@@ -202,6 +202,10 @@ export const YAML_FIELD_COMMENTS_EN = {
202
202
  requestCapture: 'Full request capture (HTTP exchange audit log; default off): request/response bodies land as JSONL; captured bodies may hold sensitive data and consume disk, archived by date directory with age/size cleanup; a single session is additionally capped by maxSessionMB (a runaway agent loop cannot eat the shared budget — at the cap the archive stops appending and records one archive-overflow terminal line)',
203
203
  'requestCapture.storeMedia': 'Offload base64 images/documents to disk (default true): base64 media in request bodies is replaced by [MEDIA …sha256=… file=media/…] placeholders, content-addressed and deduplicated (one copy per distinct payload across turns), swept with the date directories; off (or on write failure) the placeholder is still written without file= (no base64 ever persists), and the replay page shows thumbnails',
204
204
  'requestCapture.redactSecrets': 'Credential redaction (always on): credential-shaped headers, query auth params and Bearer-shaped body echoes become [REDACTED] in the archive. A false value is ignored — live credentials never land on disk',
205
+ sessionSnapshots: 'Session-snapshot handoff store (default ON): one record per completed model request — the canonical request as the provider leg saw it (system instructions + messages + tool definitions + reasoning signatures) and the canonical response — so a conversation can be MOVED to another instance as a portable bundle. A tool loop inside one user turn yields one record per model request. It is the PREREQUISITE for the console message list/tree view, which is why it is on by default (turning a log plane off costs a copy; turning this off costs the feature). Distinct from requestCapture (a byte-faithful debug log, default off). Retention and size caps bound what lands on disk; disable it to keep nothing',
206
+ 'sessionSnapshots.retentionDays': 'Session file retention (default 30): transcripts older than today-N are swept at boot and hourly',
207
+ 'sessionSnapshots.maxTotalMB': 'Total directory budget (default 1024 MB): oldest sessions deleted first when exceeded',
208
+ 'sessionSnapshots.maxTurnMB': 'Per-request ceiling (default 8 MB): a request larger than this is dropped and the session is marked incomplete — a handoff that silently lost a tool result or a system block is worse than no handoff, so export then refuses instead of shipping a broken transcript',
205
209
  catalog: 'Catalog data sources: remote catalog source definitions and local anchoring (visual editing on the console /catalog page, applies immediately)',
206
210
  'catalog.syncIntervalMs': 'Catalog auto-sync period (ms, default 86400000 = 24h)',
207
211
  'catalog.lockedModels': 'Locally anchored model ids: these models\' local definition values (including explicit zero prices) are never overwritten by any remote source',
@@ -209,10 +213,11 @@ export const YAML_FIELD_COMMENTS_EN = {
209
213
  'catalog.autoPullPatterns': 'Per-provider auto-pull whitelist: only declared providers are periodically pulled, and only model ids matching the glob (comma-separated alternates, e.g. zhipu/glm-*); undeclared providers are never auto-pulled; manual console pulls are unaffected. Hot-applies',
210
214
  'catalog.autoPullPatterns.*': 'That provider\'s auto-pull glob: only matching model ids are pulled (comma-separated alternates, e.g. zhipu/glm-*, openai/*, anthropic/*); empty/deleted = stop auto-pulling that provider',
211
215
  combos: 'Custom model combos: bundle registered models under one virtual model name clients call directly as the combo id (visual editing on the console /combos page, applies on save, no restart)',
212
- 'combos.*.selection': 'Primary-pick strategy: priority = config order (default) / weighted random / round_robin',
216
+ 'combos.*.selection': 'Primary-pick strategy: priority = config order (default) / weighted_round_robin = smooth weighted rotation (member weight = share) / round_robin = equal sequential rotation (weights ignored)',
213
217
  'combos.*.disabled': 'Disable switch: true takes the combo offline — removed from the model catalog (unselectable) and direct combo-id calls are rejected; the console can still view and re-enable it',
214
- 'combos.*.models': 'Member list (order = failover chain): each member is \'model-id\' or { id, weight } (weight for weighted/round_robin, default 1)',
218
+ 'combos.*.models': 'Member list (order = failover chain): each member is \'model-id\' or { id, weight, effortMap } (weight = weighted_round_robin rotation share, round_robin ignores it; effortMap = that member\'s OWN thinking-level table)',
215
219
  'combos.*.note': 'Note: free text for the console display only, never routed',
220
+ 'combos.*.models.effortMap': 'Thinking-level translation for THIS member only (e.g. { none: high, low: high }; a level absent from a configured table passes through unchanged, never a key-wise default). Each combo model carries its own table because one composition may mix models with different ladders — never a block-wide table. Resolution follows the serving context: when the combo is referenced from a tier as combo:<id>, that ref rule\'s own effortMap is authoritative and this member table only fills in (whole-table step-down, never a key-wise merge); when the combo is addressed directly (no tier), this member table wins and falls back to the member\'s home-tier translation. It never influences WHICH member serves.',
216
221
  clientProfileMemory: 'Console form memory (per environment): written only when you click "Hook up" — records the full form state actually applied that time: model-list mode (default = the console\'s Default tab, no concrete models added / custom / follow = follow the selected API key\'s access), the custom model list (extraModels), the custom virtual-tier selection (virtualModels; absent = adapter default block), the written API key id (apiKeyId; hooking always writes the selected key, never plaintext), and the slot/role modelRef snapshots (models/agentModels) backing the "Restore last submit" button. Page back-fill only — never routed, never affects actual takeover',
217
222
  defaultModels: 'Default models (models the gateway itself spends on — internal calls, never client routing)',
218
223
  'defaultModels.translation': 'Model for console-internal translations (skill descriptions / READMEs): any gateway-visible modelRef (tier alias lite/plus/pro/ultra or a registered model id). Unset = lite; a failing configured model degrades to lite, a failing lite errors honestly — the chain never escalates to auto on its own (internal non-critical calls must not have unbounded spend; an explicit auto is honored as an operator-accepted cost). Resolvability is checked at request time (models register at boot); changing this does not invalidate cached translations (the cache is derived data keyed by text+language)',