omnicell-router 0.8.2 → 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.
- package/README.md +26 -7
- package/README.zh-CN.md +18 -5
- package/backend/dist/auth/api-keys.js +11 -0
- package/backend/dist/auth/key-models.d.ts +36 -0
- package/backend/dist/auth/key-models.js +99 -0
- package/backend/dist/capture/recorder.d.ts +4 -10
- package/backend/dist/capture/recorder.js +6 -58
- package/backend/dist/cli/clients/activity.js +2 -0
- package/backend/dist/cli/clients/base.d.ts +36 -11
- package/backend/dist/cli/clients/base.js +31 -15
- package/backend/dist/cli/clients/claude.d.ts +9 -0
- package/backend/dist/cli/clients/claude.js +6 -0
- package/backend/dist/cli/clients/codex.d.ts +78 -0
- package/backend/dist/cli/clients/codex.js +475 -57
- package/backend/dist/cli/clients/core-adapters.d.ts +1 -1
- package/backend/dist/cli/clients/core-adapters.js +1 -1
- package/backend/dist/cli/clients/dsh.d.ts +8 -0
- package/backend/dist/cli/clients/dsh.js +5 -0
- package/backend/dist/cli/clients/follow-catalog-sync.d.ts +62 -0
- package/backend/dist/cli/clients/follow-catalog-sync.js +435 -0
- package/backend/dist/cli/clients/grok.d.ts +15 -1
- package/backend/dist/cli/clients/grok.js +16 -2
- package/backend/dist/cli/clients/index.d.ts +13 -1
- package/backend/dist/cli/clients/index.js +97 -19
- package/backend/dist/cli/clients/kimi.d.ts +6 -0
- package/backend/dist/cli/clients/kimi.js +3 -0
- package/backend/dist/cli/clients/launcher.d.ts +1 -1
- package/backend/dist/cli/clients/model-meta.js +6 -3
- package/backend/dist/cli/clients/omp.d.ts +6 -0
- package/backend/dist/cli/clients/omp.js +3 -0
- package/backend/dist/cli/clients/openclaw.d.ts +6 -0
- package/backend/dist/cli/clients/openclaw.js +3 -0
- package/backend/dist/cli/clients/opencode.d.ts +8 -0
- package/backend/dist/cli/clients/opencode.js +8 -2
- package/backend/dist/cli/clients/pi.d.ts +6 -0
- package/backend/dist/cli/clients/pi.js +3 -0
- package/backend/dist/cli/clients/reserved.js +2 -0
- package/backend/dist/cli/clients/update-check.d.ts +37 -0
- package/backend/dist/cli/clients/update-check.js +309 -0
- package/backend/dist/cli/clients/workbuddy.d.ts +19 -0
- package/backend/dist/cli/clients/workbuddy.js +66 -0
- package/backend/dist/cli/index.js +5 -4
- package/backend/dist/cli/paths.js +8 -0
- package/backend/dist/cli/types.d.ts +101 -16
- package/backend/dist/config/comments-en.js +34 -25
- package/backend/dist/config/comments-zh.js +33 -24
- package/backend/dist/config/defaults.d.ts +280 -22
- package/backend/dist/config/defaults.js +279 -21
- package/backend/dist/config/env.d.ts +10 -0
- package/backend/dist/config/env.js +3 -2
- package/backend/dist/config/index.d.ts +22 -1
- package/backend/dist/config/index.js +218 -43
- package/backend/dist/config/migrations/v0-to-v1.d.ts +2 -2
- package/backend/dist/config/migrations/v10-to-v11.d.ts +38 -0
- package/backend/dist/config/migrations/v10-to-v11.js +43 -0
- package/backend/dist/config/migrations/v4-to-v5.d.ts +36 -0
- package/backend/dist/config/migrations/v4-to-v5.js +42 -0
- package/backend/dist/config/migrations/v5-to-v6.d.ts +27 -0
- package/backend/dist/config/migrations/v5-to-v6.js +29 -0
- package/backend/dist/config/migrations/v6-to-v7.d.ts +45 -0
- package/backend/dist/config/migrations/v6-to-v7.js +97 -0
- package/backend/dist/config/migrations/v7-to-v8.d.ts +36 -0
- package/backend/dist/config/migrations/v7-to-v8.js +43 -0
- package/backend/dist/config/migrations/v8-to-v9.d.ts +38 -0
- package/backend/dist/config/migrations/v8-to-v9.js +43 -0
- package/backend/dist/config/migrations/v9-to-v10.d.ts +51 -0
- package/backend/dist/config/migrations/v9-to-v10.js +71 -0
- package/backend/dist/config/runtime.js +1 -1
- package/backend/dist/config/schema.d.ts +3 -3
- package/backend/dist/config/schema.js +18 -4
- package/backend/dist/config/types.d.ts +221 -41
- package/backend/dist/egress-proxy/asset-download.d.ts +54 -0
- package/backend/dist/egress-proxy/asset-download.js +420 -0
- package/backend/dist/egress-proxy/manual-node-spec.d.ts +92 -0
- package/backend/dist/egress-proxy/manual-node-spec.js +408 -0
- package/backend/dist/egress-proxy/mihomo-binary.d.ts +54 -0
- package/backend/dist/egress-proxy/mihomo-binary.js +278 -0
- package/backend/dist/egress-proxy/mihomo-client.d.ts +94 -0
- package/backend/dist/egress-proxy/mihomo-client.js +308 -0
- package/backend/dist/egress-proxy/mihomo-config.d.ts +40 -0
- package/backend/dist/egress-proxy/mihomo-config.js +161 -0
- package/backend/dist/egress-proxy/mihomo-geo.d.ts +87 -0
- package/backend/dist/egress-proxy/mihomo-geo.js +213 -0
- package/backend/dist/egress-proxy/mihomo-logs.d.ts +43 -0
- package/backend/dist/egress-proxy/mihomo-logs.js +84 -0
- package/backend/dist/egress-proxy/mihomo-pac.d.ts +37 -0
- package/backend/dist/egress-proxy/mihomo-pac.js +75 -0
- package/backend/dist/egress-proxy/mihomo-rules-import.d.ts +43 -0
- package/backend/dist/egress-proxy/mihomo-rules-import.js +193 -0
- package/backend/dist/egress-proxy/mihomo-sidecar.d.ts +81 -0
- package/backend/dist/egress-proxy/mihomo-sidecar.js +637 -0
- package/backend/dist/forward-proxy/egress.d.ts +50 -11
- package/backend/dist/forward-proxy/egress.js +63 -17
- package/backend/dist/forward-proxy/h2-forward.js +42 -15
- package/backend/dist/forward-proxy/index.d.ts +11 -8
- package/backend/dist/forward-proxy/index.js +27 -60
- package/backend/dist/forward-proxy/interceptor.d.ts +3 -2
- package/backend/dist/forward-proxy/interceptor.js +4 -4
- package/backend/dist/forward-proxy/relay.js +3 -3
- package/backend/dist/forward-proxy/rules.d.ts +4 -4
- package/backend/dist/forward-proxy/rules.js +25 -4
- package/backend/dist/forward-proxy/server.d.ts +12 -16
- package/backend/dist/forward-proxy/server.js +237 -171
- package/backend/dist/harness/host/hosts.js +3 -2
- package/backend/dist/index.js +59 -19
- package/backend/dist/ingress-proxy/access-log.d.ts +176 -0
- package/backend/dist/ingress-proxy/access-log.js +774 -0
- package/backend/dist/ingress-proxy/ca-inventory.d.ts +106 -0
- package/backend/dist/ingress-proxy/ca-inventory.js +525 -0
- package/backend/dist/ingress-proxy/ca-trust.d.ts +96 -0
- package/backend/dist/ingress-proxy/ca-trust.js +315 -0
- package/backend/dist/ingress-proxy/ca.d.ts +104 -0
- package/backend/dist/ingress-proxy/ca.js +273 -0
- package/backend/dist/ingress-proxy/data-dir.d.ts +28 -0
- package/backend/dist/ingress-proxy/data-dir.js +45 -0
- package/backend/dist/ingress-proxy/egress.d.ts +151 -0
- package/backend/dist/ingress-proxy/egress.js +364 -0
- package/backend/dist/ingress-proxy/h2-forward.d.ts +66 -0
- package/backend/dist/ingress-proxy/h2-forward.js +561 -0
- package/backend/dist/ingress-proxy/index.d.ts +24 -0
- package/backend/dist/ingress-proxy/index.js +144 -0
- package/backend/dist/ingress-proxy/interceptor.d.ts +25 -0
- package/backend/dist/ingress-proxy/interceptor.js +52 -0
- package/backend/dist/ingress-proxy/ordered-relay.d.ts +29 -0
- package/backend/dist/ingress-proxy/ordered-relay.js +46 -0
- package/backend/dist/ingress-proxy/relay.d.ts +54 -0
- package/backend/dist/ingress-proxy/relay.js +188 -0
- package/backend/dist/ingress-proxy/rules.d.ts +195 -0
- package/backend/dist/ingress-proxy/rules.js +348 -0
- package/backend/dist/ingress-proxy/server.d.ts +153 -0
- package/backend/dist/ingress-proxy/server.js +2065 -0
- package/backend/dist/ingress-proxy/sni.d.ts +35 -0
- package/backend/dist/ingress-proxy/sni.js +124 -0
- package/backend/dist/ingress-proxy/status.d.ts +32 -0
- package/backend/dist/ingress-proxy/status.js +15 -0
- package/backend/dist/ingress-proxy/system-proxy.d.ts +112 -0
- package/backend/dist/ingress-proxy/system-proxy.js +481 -0
- package/backend/dist/ingress-proxy/traffic-delete.d.ts +21 -0
- package/backend/dist/ingress-proxy/traffic-delete.js +64 -0
- package/backend/dist/ingress-proxy/traffic-delete.worker.d.ts +44 -0
- package/backend/dist/ingress-proxy/traffic-delete.worker.js +228 -0
- package/backend/dist/ingress-proxy/traffic-files.d.ts +10 -0
- package/backend/dist/ingress-proxy/traffic-files.js +10 -0
- package/backend/dist/ingress-proxy/upstream-tls.d.ts +46 -0
- package/backend/dist/ingress-proxy/upstream-tls.js +105 -0
- package/backend/dist/ingress-proxy/ws-frames.d.ts +45 -0
- package/backend/dist/ingress-proxy/ws-frames.js +153 -0
- package/backend/dist/ir/adapters/anthropic-messages-stream.js +6 -1
- package/backend/dist/ir/adapters/anthropic-messages.js +12 -5
- package/backend/dist/ir/adapters/google-gemini-stream.js +7 -2
- package/backend/dist/ir/adapters/google-gemini.js +5 -2
- package/backend/dist/ir/adapters/openai-chat-stream.js +5 -1
- package/backend/dist/ir/adapters/openai-chat.d.ts +25 -0
- package/backend/dist/ir/adapters/openai-chat.js +50 -6
- package/backend/dist/ir/adapters/openai-responses-output.d.ts +1 -0
- package/backend/dist/ir/adapters/openai-responses-output.js +67 -21
- package/backend/dist/ir/adapters/openai-responses-stream.d.ts +13 -0
- package/backend/dist/ir/adapters/openai-responses-stream.js +34 -1
- package/backend/dist/ir/adapters/openai-responses.d.ts +92 -1
- package/backend/dist/ir/adapters/openai-responses.js +163 -12
- package/backend/dist/ir/capabilities.js +4 -0
- package/backend/dist/ir/media.d.ts +20 -0
- package/backend/dist/ir/media.js +41 -0
- package/backend/dist/ir/tool-identity.d.ts +35 -0
- package/backend/dist/ir/tool-identity.js +40 -0
- package/backend/dist/ir/types.d.ts +9 -1
- package/backend/dist/ir/validate.d.ts +24 -0
- package/backend/dist/ir/validate.js +113 -63
- package/backend/dist/local/build-jobs.d.ts +66 -0
- package/backend/dist/local/build-jobs.js +243 -0
- package/backend/dist/local/detect.d.ts +32 -0
- package/backend/dist/local/detect.js +145 -0
- package/backend/dist/local/draft-match.d.ts +58 -0
- package/backend/dist/local/draft-match.js +124 -0
- package/backend/dist/local/engine-runtime.d.ts +522 -0
- package/backend/dist/local/engine-runtime.js +1 -0
- package/backend/dist/local/engines.d.ts +241 -0
- package/backend/dist/local/engines.js +651 -0
- package/backend/dist/local/gguf.d.ts +35 -0
- package/backend/dist/local/gguf.js +314 -0
- package/backend/dist/local/hf.d.ts +120 -0
- package/backend/dist/local/hf.js +304 -0
- package/backend/dist/local/install.d.ts +90 -0
- package/backend/dist/local/install.js +421 -0
- package/backend/dist/local/llamacpp.d.ts +55 -0
- package/backend/dist/local/llamacpp.js +177 -0
- package/backend/dist/local/local-provider.d.ts +81 -0
- package/backend/dist/local/local-provider.js +301 -0
- package/backend/dist/local/machine-stats.d.ts +87 -0
- package/backend/dist/local/machine-stats.js +332 -0
- package/backend/dist/local/model-store.d.ts +347 -0
- package/backend/dist/local/model-store.js +1215 -0
- package/backend/dist/local/part-sweep.d.ts +32 -0
- package/backend/dist/local/part-sweep.js +156 -0
- package/backend/dist/local/plan.d.ts +65 -0
- package/backend/dist/local/plan.js +146 -0
- package/backend/dist/local/resources.d.ts +49 -0
- package/backend/dist/local/resources.js +64 -0
- package/backend/dist/local/run-stats.d.ts +95 -0
- package/backend/dist/local/run-stats.js +195 -0
- package/backend/dist/local/runner.d.ts +235 -0
- package/backend/dist/local/runner.js +1392 -0
- package/backend/dist/local/settings.d.ts +79 -0
- package/backend/dist/local/settings.js +180 -0
- package/backend/dist/local/strata-catalog.d.ts +30 -0
- package/backend/dist/local/strata-catalog.js +511 -0
- package/backend/dist/local/strata-drafting.d.ts +46 -0
- package/backend/dist/local/strata-drafting.js +265 -0
- package/backend/dist/local/strata.d.ts +278 -0
- package/backend/dist/local/strata.js +1392 -0
- package/backend/dist/local/tar.d.ts +20 -0
- package/backend/dist/local/tar.js +367 -0
- package/backend/dist/local/transport.d.ts +35 -0
- package/backend/dist/local/transport.js +89 -0
- package/backend/dist/local/tune.d.ts +58 -0
- package/backend/dist/local/tune.js +324 -0
- package/backend/dist/observability/http-exchange.d.ts +2 -2
- package/backend/dist/opencode/catalog/auto-pull.d.ts +14 -3
- package/backend/dist/opencode/catalog/auto-pull.js +284 -77
- package/backend/dist/opencode/catalog/ocr-store.d.ts +7 -6
- package/backend/dist/opencode/catalog/ocr-store.js +4 -2
- package/backend/dist/opencode/catalog/overrides-store.d.ts +15 -4
- package/backend/dist/opencode/catalog/overrides-store.js +28 -19
- package/backend/dist/opencode/catalog/reasoning-declaration.d.ts +35 -0
- package/backend/dist/opencode/catalog/reasoning-declaration.js +66 -0
- package/backend/dist/opencode/catalog/repository.js +28 -5
- package/backend/dist/opencode/catalog/sources/models-dev.d.ts +3 -3
- package/backend/dist/opencode/catalog/sources/models-dev.js +42 -14
- package/backend/dist/opencode/catalog/types.d.ts +42 -12
- package/backend/dist/opencode/catalog/types.js +38 -1
- package/backend/dist/opencode/credentials/def-materialize.js +27 -21
- package/backend/dist/opencode/credentials/ocr-store.js +11 -2
- package/backend/dist/opencode/credentials/sync.js +12 -3
- package/backend/dist/opencode/credentials/types.d.ts +31 -4
- package/backend/dist/opencode/credentials/types.js +25 -0
- package/backend/dist/opencode/migrate/engine.d.ts +20 -0
- package/backend/dist/opencode/migrate/engine.js +71 -0
- package/backend/dist/opencode/migrate/migrator.d.ts +11 -0
- package/backend/dist/opencode/migrate/migrator.js +6 -0
- package/backend/dist/opencode/migrate/steps/overrides-v1-to-v2.d.ts +6 -0
- package/backend/dist/opencode/migrate/steps/overrides-v1-to-v2.js +31 -0
- package/backend/dist/opencode/migrate/steps/providers-v1-to-v2.d.ts +6 -0
- package/backend/dist/opencode/migrate/steps/providers-v1-to-v2.js +62 -0
- package/backend/dist/opencode/probe.d.ts +21 -4
- package/backend/dist/opencode/probe.js +34 -10
- package/backend/dist/opencode/provider-def-adapters.d.ts +12 -11
- package/backend/dist/opencode/provider-def-adapters.js +43 -27
- package/backend/dist/opencode/provider-defs.d.ts +10 -16
- package/backend/dist/opencode/provider-defs.js +45 -45
- package/backend/dist/opencode/user-config.d.ts +23 -26
- package/backend/dist/opencode/user-config.js +95 -77
- package/backend/dist/pipeline/directives.d.ts +9 -4
- package/backend/dist/pipeline/directives.js +14 -10
- package/backend/dist/pipeline/orchestrator.d.ts +42 -13
- package/backend/dist/pipeline/orchestrator.js +514 -172
- package/backend/dist/plugins/builtin/model-gateway.js +38 -12
- package/backend/dist/plugins/environment-ack.d.ts +51 -0
- package/backend/dist/plugins/environment-ack.js +81 -0
- package/backend/dist/plugins/gateways.d.ts +6 -6
- package/backend/dist/plugins/gateways.js +2 -2
- package/backend/dist/plugins/host.d.ts +100 -16
- package/backend/dist/plugins/host.js +637 -99
- package/backend/dist/plugins/install-run.d.ts +27 -0
- package/backend/dist/plugins/install-run.js +99 -0
- package/backend/dist/plugins/manifest.d.ts +84 -32
- package/backend/dist/plugins/manifest.js +149 -45
- package/backend/dist/plugins/market-install.d.ts +18 -0
- package/backend/dist/plugins/market-install.js +111 -0
- package/backend/dist/plugins/market-source.d.ts +100 -0
- package/backend/dist/plugins/market-source.js +449 -0
- package/backend/dist/plugins/market-updates.d.ts +70 -0
- package/backend/dist/plugins/market-updates.js +97 -0
- package/backend/dist/plugins/market.d.ts +677 -0
- package/backend/dist/plugins/market.js +2113 -0
- package/backend/dist/plugins/source-index.d.ts +155 -0
- package/backend/dist/plugins/source-index.js +217 -0
- package/backend/dist/plugins/types.d.ts +402 -37
- package/backend/dist/projects/worktrees.d.ts +88 -0
- package/backend/dist/projects/worktrees.js +220 -0
- package/backend/dist/providers/boot-direct.d.ts +41 -7
- package/backend/dist/providers/boot-direct.js +284 -44
- package/backend/dist/providers/compat/tool-markup-recovery.js +31 -6
- package/backend/dist/providers/dial-wire.d.ts +17 -0
- package/backend/dist/providers/dial-wire.js +49 -0
- package/backend/dist/providers/executors/dispatch.d.ts +17 -7
- package/backend/dist/providers/executors/dispatch.js +28 -9
- package/backend/dist/providers/executors/openai-chat.js +14 -2
- package/backend/dist/providers/executors/plugin-adapter.d.ts +23 -1
- package/backend/dist/providers/executors/plugin-adapter.js +59 -3
- package/backend/dist/providers/member-match.d.ts +32 -9
- package/backend/dist/providers/member-match.js +65 -21
- package/backend/dist/providers/model-resolution.d.ts +62 -0
- package/backend/dist/providers/model-resolution.js +62 -0
- package/backend/dist/providers/price-order.d.ts +51 -0
- package/backend/dist/providers/price-order.js +54 -0
- package/backend/dist/providers/protocols-field.d.ts +24 -0
- package/backend/dist/providers/protocols-field.js +66 -0
- package/backend/dist/providers/provider-takedown.d.ts +5 -2
- package/backend/dist/providers/registry.d.ts +87 -26
- package/backend/dist/providers/registry.js +232 -121
- package/backend/dist/providers/selection.d.ts +91 -0
- package/backend/dist/providers/selection.js +158 -0
- package/backend/dist/providers/virtual-meta.d.ts +33 -2
- package/backend/dist/providers/virtual-meta.js +74 -18
- package/backend/dist/quota/cli-login.d.ts +25 -4
- package/backend/dist/quota/cli-login.js +38 -6
- package/backend/dist/quota/coverage-generation.d.ts +24 -0
- package/backend/dist/quota/coverage-generation.js +29 -0
- package/backend/dist/quota/declarations.js +8 -4
- package/backend/dist/quota/engine.js +2 -2
- package/backend/dist/quota/prober.d.ts +43 -2
- package/backend/dist/quota/prober.js +97 -22
- package/backend/dist/ratelimit/rate-limiter.d.ts +1 -1
- package/backend/dist/resilience/error-classifier.js +29 -0
- package/backend/dist/router/index.d.ts +1 -1
- package/backend/dist/router/index.js +17 -1
- package/backend/dist/router/layer2-decision.d.ts +1 -1
- package/backend/dist/router/layer2-decision.js +2 -2
- package/backend/dist/routes/console.js +1043 -405
- package/backend/dist/routes/environments.js +1 -1
- package/backend/dist/routes/local-models.d.ts +2 -0
- package/backend/dist/routes/local-models.js +1414 -0
- package/backend/dist/routes/mihomo.d.ts +2 -2
- package/backend/dist/routes/mihomo.js +20 -11
- package/backend/dist/routes/projects.js +121 -0
- package/backend/dist/server.js +409 -15
- package/backend/dist/session/session-manager.d.ts +42 -5
- package/backend/dist/session/session-manager.js +64 -11
- package/backend/dist/session/session-row.d.ts +29 -8
- package/backend/dist/session/session-row.js +18 -13
- package/backend/dist/snapshot/bundle.d.ts +40 -0
- package/backend/dist/snapshot/bundle.js +177 -0
- package/backend/dist/snapshot/handoff/compress.d.ts +46 -0
- package/backend/dist/snapshot/handoff/compress.js +77 -0
- package/backend/dist/snapshot/handoff/index.d.ts +119 -0
- package/backend/dist/snapshot/handoff/index.js +160 -0
- package/backend/dist/snapshot/handoff/jsonl-writer.d.ts +78 -0
- package/backend/dist/snapshot/handoff/jsonl-writer.js +175 -0
- package/backend/dist/snapshot/handoff/opencode-writer.d.ts +51 -0
- package/backend/dist/snapshot/handoff/opencode-writer.js +214 -0
- package/backend/dist/snapshot/handoff/summarize.d.ts +39 -0
- package/backend/dist/snapshot/handoff/summarize.js +118 -0
- package/backend/dist/snapshot/handoff/transcript.d.ts +71 -0
- package/backend/dist/snapshot/handoff/transcript.js +167 -0
- package/backend/dist/snapshot/media-fs.d.ts +10 -0
- package/backend/dist/snapshot/media-fs.js +50 -0
- package/backend/dist/snapshot/media.d.ts +32 -0
- package/backend/dist/snapshot/media.js +87 -0
- package/backend/dist/snapshot/store.d.ts +226 -0
- package/backend/dist/snapshot/store.js +887 -0
- package/backend/dist/snapshot/tree.d.ts +112 -0
- package/backend/dist/snapshot/tree.js +207 -0
- package/backend/dist/snapshot/types.d.ts +212 -0
- package/backend/dist/snapshot/types.js +14 -0
- package/backend/dist/snapshot/view.d.ts +19 -0
- package/backend/dist/snapshot/view.js +57 -0
- package/backend/dist/snapshot/write-worker.d.ts +67 -0
- package/backend/dist/snapshot/write-worker.js +129 -0
- package/backend/dist/surfaces/anthropic.js +4 -1
- package/backend/dist/surfaces/body-admission.d.ts +344 -0
- package/backend/dist/surfaces/body-admission.js +818 -0
- package/backend/dist/surfaces/chat-pipeline.js +8 -0
- package/backend/dist/surfaces/decision-pipeline.js +10 -7
- package/backend/dist/surfaces/gateway-catalog.d.ts +26 -0
- package/backend/dist/surfaces/gateway-catalog.js +202 -0
- package/backend/dist/surfaces/gateway-chat.d.ts +7 -11
- package/backend/dist/surfaces/gateway-chat.js +50 -12
- package/backend/dist/surfaces/ocr-headers.d.ts +6 -4
- package/backend/dist/surfaces/ocr-headers.js +11 -7
- package/backend/dist/surfaces/systemone.js +1 -1
- package/backend/dist/surfaces/transport-fastify.js +32 -5
- package/backend/dist/surfaces/transport-node-http.d.ts +51 -6
- package/backend/dist/surfaces/transport-node-http.js +76 -16
- package/backend/dist/surfaces/types.d.ts +11 -3
- package/backend/dist/trace/persist.js +21 -1
- package/backend/dist/trace/tracker.d.ts +35 -3
- package/backend/dist/trace/tracker.js +23 -0
- package/backend/dist/types/openai.d.ts +8 -0
- package/backend/dist/types/router.d.ts +17 -6
- package/backend/dist/types/router.js +14 -2
- package/backend/dist/utils/client-families.d.ts +66 -0
- package/backend/dist/utils/client-families.js +127 -0
- package/backend/dist/utils/event-ring.d.ts +1 -1
- package/backend/dist/utils/event-ring.js +1 -1
- package/backend/dist/utils/proxy-node.js +1 -1
- package/backend/dist/utils/proxy.d.ts +135 -11
- package/backend/dist/utils/proxy.js +144 -29
- package/backend/dist/utils/run-command.d.ts +21 -1
- package/backend/dist/utils/run-command.js +64 -4
- package/backend/dist/utils/server-liveness.d.ts +28 -0
- package/backend/dist/utils/server-liveness.js +32 -0
- package/backend/dist/utils/session-file.d.ts +28 -0
- package/backend/dist/utils/session-file.js +34 -0
- package/frontend/dist/assets/antigravity.color-DXFfVr6X.svg +39 -0
- package/frontend/dist/assets/gemini-cli.color-BfquLd1p.svg +1 -0
- package/frontend/dist/assets/index-CTZNvn1d.js +1707 -0
- package/frontend/dist/assets/{index-DxZ9MHKB.css → index-CqDSOPQ0.css} +1 -1
- package/frontend/dist/index.html +2 -2
- package/package.json +3 -1
- package/frontend/dist/assets/index-55VVwfFQ.js +0 -1521
|
@@ -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 /
|
|
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
|
|
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
|
|
40
|
-
'routing.mode': 'Routing strategy: smart = classifier cascade (default) / cost =
|
|
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,15 +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)',
|
|
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.',
|
|
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).',
|
|
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.',
|
|
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.',
|
|
137
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',
|
|
138
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)',
|
|
139
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',
|
|
140
|
-
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
|
|
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)',
|
|
141
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',
|
|
142
147
|
'credentials.*': 'That provider\'s credential rule list (key = provider id, e.g. anthropic); entries { keyHashPrefix, limits }',
|
|
143
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',
|
|
144
149
|
'quota.enabled': 'Quota-probe master switch (default true); false = stop all outbound quota probing (stored snapshots still display, stale marking unchanged)',
|
|
145
|
-
'quota.intervalMs': 'Scheduler tick (ms, default
|
|
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)',
|
|
146
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)',
|
|
147
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',
|
|
148
153
|
opencode: 'OpenCode local-service connection',
|
|
@@ -169,23 +174,22 @@ export const YAML_FIELD_COMMENTS_EN = {
|
|
|
169
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',
|
|
170
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',
|
|
171
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',
|
|
172
|
-
|
|
173
|
-
'
|
|
174
|
-
'
|
|
175
|
-
'
|
|
176
|
-
'
|
|
177
|
-
'
|
|
178
|
-
'
|
|
179
|
-
'
|
|
180
|
-
'
|
|
181
|
-
'
|
|
182
|
-
'
|
|
183
|
-
'
|
|
184
|
-
'
|
|
185
|
-
'
|
|
186
|
-
'
|
|
187
|
-
'
|
|
188
|
-
'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)',
|
|
189
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)',
|
|
190
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)',
|
|
191
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)',
|
|
@@ -198,6 +202,10 @@ export const YAML_FIELD_COMMENTS_EN = {
|
|
|
198
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)',
|
|
199
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',
|
|
200
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',
|
|
201
209
|
catalog: 'Catalog data sources: remote catalog source definitions and local anchoring (visual editing on the console /catalog page, applies immediately)',
|
|
202
210
|
'catalog.syncIntervalMs': 'Catalog auto-sync period (ms, default 86400000 = 24h)',
|
|
203
211
|
'catalog.lockedModels': 'Locally anchored model ids: these models\' local definition values (including explicit zero prices) are never overwritten by any remote source',
|
|
@@ -205,10 +213,11 @@ export const YAML_FIELD_COMMENTS_EN = {
|
|
|
205
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',
|
|
206
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',
|
|
207
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)',
|
|
208
|
-
'combos.*.selection': 'Primary-pick strategy: priority = config order (default) / weighted
|
|
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)',
|
|
209
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',
|
|
210
|
-
'combos.*.models': 'Member list (order = failover chain): each member is \'model-id\' or { id, weight } (weight
|
|
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)',
|
|
211
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.',
|
|
212
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',
|
|
213
222
|
defaultModels: 'Default models (models the gateway itself spends on — internal calls, never client routing)',
|
|
214
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)',
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
export const YAML_FILE_HEADER_ZH = [
|
|
2
2
|
'OmniCellRouter 网关配置(config.yaml)— schemaVersion 1(分组格式,演进规则见 docs/adr/0016-config-schema-evolution.md)',
|
|
3
3
|
'配置层次(六组,每段唯一归属):',
|
|
4
|
-
' client 客户端接入面:port / host / adminKey / webAuth / apiKeys / rateLimit /
|
|
4
|
+
' client 客户端接入面:port / host / adminKey / webAuth / apiKeys / rateLimit / bodyLimits / autoResyncFollowCatalogs / ingressProxy —— 请求怎么进来',
|
|
5
5
|
' protocol 协议面:systemone / responses —— 网关对外说哪种协议',
|
|
6
6
|
' routing 流量编排面:strategy / tiers / classifier / session / directives / routeEntries / combos / profileMemory —— 请求路由到哪个模型',
|
|
7
7
|
' upstream 上游连接面:proxy / credentials / streaming / compression —— 怎么打到上游',
|
|
@@ -19,10 +19,11 @@ export const YAML_FIELD_COMMENTS_ZH = {
|
|
|
19
19
|
'webAuth.username': '控制台登录用户名',
|
|
20
20
|
'webAuth.passwordHash': '登录密码的 scrypt 哈希(格式 scrypt$<saltHex>$<hashHex>,绝不存明文;在控制台「系统设置」页修改,勿手写)',
|
|
21
21
|
tiers: '梯队成员策略:候选池唯一依据 = 各梯队显式 members 成员列表 + 全局排除名单;出厂默认为四个空梯队(不内置任何成员 glob,运行时也不自动生成种子),首次启动所有候选池为空、`auto` 无法路由,需在控制台 /tiers 页或本文件添加 members;无任何规则命中的模型=无梯队归属,不进任何池;主选策略只影响池内用法(控制台 /tiers 页可视化编辑,保存即时生效;删除整个 tiers 段会在下次加载时恢复这套空默认)',
|
|
22
|
-
'tiers.*.members': '
|
|
22
|
+
'tiers.*.members': '成员列表(链序=权重降序、再列表顺序,对所有策略生效;`priority` 取该链首):每项 { pattern, weight?, effortMap? } —— pattern 匹配完整模型 id(provider/model),glob 通配(* 任意 / ? 单字符,不区分大小写),不带通配符=子串匹配、写完整 id=单项;pattern 亦可写 combo:<组合id> 引用模型组合——每次提交/保存时原位展开为该组合已注册成员(组合编辑后梯队池自动跟随;权重取自组合成员条目;死引用=组合不存在/已停用/无已注册成员,展开为空并在保存检查告警);effortMap=思考级别翻译(如 { none: high, low: high },未配置的级别原样透传),组合引用上的 effortMap 作用于其全部展开成员;同一模型/组合可加入多个梯队——各梯队成员资格独立计算,链序/权重/effortMap 均取自本梯队自己的规则',
|
|
23
23
|
'tiers.exclude': '全局排除名单(在原始 YAML 页编辑;/tiers 页保存时原样回传):命中的模型不进入任何梯队候选池(无条件;仅可按 id 直连或经组合调用)',
|
|
24
|
-
'tiers.*.selection': '主选策略:priority
|
|
25
|
-
'routing.mode': '路由模式:smart=分类级联(默认)/ cost
|
|
24
|
+
'tiers.*.selection': '主选策略:priority 优先级(链首)/ weighted_round_robin 加权轮询(平滑加权轮转,成员权重即轮转份额)/ round_robin 顺序轮询(等权顺序轮转,权重被忽略)',
|
|
25
|
+
'routing.mode': '路由模式:smart=分类级联(默认)/ cost=lite 梯队内按价格选最便宜,失败升档上限 plus / quality=始终 pro',
|
|
26
|
+
'routing.costEscalation': 'cost 模式的失败升档策略:to_fallback_tier(默认)= lite 失败后允许升档、上限 plus(绝不升到 pro/ultra,绝不预先升档)/ never = 硬钉 lite',
|
|
26
27
|
fallback: '失败兜底:重试耗尽后按梯队升级重试',
|
|
27
28
|
'fallback.maxRetries': '兜底重试次数',
|
|
28
29
|
'fallback.escalateTier': '兜底升级目标梯队',
|
|
@@ -119,6 +120,10 @@ export const YAML_FIELD_COMMENTS_ZH = {
|
|
|
119
120
|
'retry.failover.maxAttempts': '故障转移尝试次数',
|
|
120
121
|
'retry.failover.tierCrossPolicy': '跨梯队策略:allow_escalate 允许向上升级',
|
|
121
122
|
rateLimit: '限流策略开关(窗口本身在 apiKeys[].limits 与 credentials: 叠加层)',
|
|
123
|
+
bodyLimits: '请求体准入上限(ADR-0008),按 HTTP 面各一个,计的是解压后的体积:`maxBytes` 管推理面(chat / responses / anthropic 两条腿——原生监听与智能体 CLI 经前向代理 MITM 的那条,共用同一天花板),`adminMaxBytes` 管控制台面。重启网关生效——Fastify 在注册路由时读取 bodyLimit,改动随下一次受控重启落地(ADR-0007)。越界值夹到边界,非法值回退出厂默认。与捕捉旋钮不是一回事:`ops.requestCapture.maxBodyBytes` 只决定归档留存多少,从不拒请求。两个上传路由(账本导入、插件包上传)自带更大上限,不受本段约束。',
|
|
124
|
+
autoResyncFollowCatalogs: '为 true(默认)时:API Key 的 modelAccess 变更,或直播模型池重建,会事件驱动地重写所有已挂接的 follow 模式客户端目录,以及 modelListMode=follow 的网关插件配置。启用 / 过期 / 删除只影响鉴权,不重写目录。正在运行的客户端进入 pending(自动路径不带 acknowledgeRunning)。热读——无需重启。关掉则 follow 快照保持冻结直到手动重新挂接。不是方案表 write-through(ADR-0031)。',
|
|
125
|
+
'bodyLimits.maxBytes': '推理面上限(字节,默认 33554432 = 32 MiB;夹到 65536…536870912 = 64 KiB…512 MiB)。超过即以 413 拒收并在消息里写明该数字;声明了网关无法解码的压缩格式(gzip / x-gzip / deflate / br)在读取请求体之前即 415 + `Accept-Encoding`;边解边膨胀触顶则 413。抬高前请知悉:每个在途请求都会按此规模占用内存。',
|
|
126
|
+
'bodyLimits.adminMaxBytes': '控制台面上限(字节,默认 8388608 = 8 MiB;边界同上)。覆盖所有未自报上限的 /api/admin/* 路由,其中最大的真实载荷是配置文件原始 YAML 保存(整个 config.yaml 塞进一个字符串)。需要更大的路由在注册时自报 bodyLimit,不受本上限约束。',
|
|
122
127
|
'rateLimit.persist': '已触发限流事件账本的持久化:写入 traces.db(与 trace/FinOps 共库独立句柄),重启后 /rate-limit 页仍可回看上一次的触发历史;观测性写入 fail-open,永不阻塞请求路径',
|
|
123
128
|
'rateLimit.persist.enabled': '限流持久化开关(默认开):触发限流事件账本写入 traces.db(重启后 /rate-limit 页仍可回看上一次的触发历史),且滑动窗口每 30s checkpoint 一次并在优雅停机时冲刷、启动时重放(1d 类长窗口预算跨重启连续,硬杀最多丢最近一个 checkpoint 周期);关闭=全部仅内存(重启清零)',
|
|
124
129
|
'rateLimit.inboundGraceMs': '宽限等待(毫秒,默认 1000,上限 2000,0=关闭):客户端密钥窗口满、但重开等待不超过该值时,网关原地等待窗口重开后复查一次(不循环),复查仍满或等待超限才回 429 + Retry-After——吸收亚秒级突发,避免短限流变成用户可见错误;长窗口维持快速失败:限流契约不变,等待归属客户端自己的退避',
|
|
@@ -127,7 +132,7 @@ export const YAML_FIELD_COMMENTS_ZH = {
|
|
|
127
132
|
'credentials.*': '该 provider 的凭证规则列表(键=provider id,如 anthropic);条目 { keyHashPrefix, limits }',
|
|
128
133
|
quota: '额度探测调度:额度覆盖表与代码 adapter 随 release 内置,此处只调调度器;凭据出现即自动探测(激活随凭据),探测失败≠额度失败——保留旧值置 stale,绝不触发熔断/下架;声明上限只展示、不门控路由',
|
|
129
134
|
'quota.enabled': '额度探测总开关(默认 true);false = 停止一切出网额度探测(已存快照仍可展示,标注 stale 逻辑不变)',
|
|
130
|
-
'quota.intervalMs': '调度 tick(毫秒,默认
|
|
135
|
+
'quota.intervalMs': '调度 tick(毫秒,默认 30000,钳制 [10000, 3600000]);每条目另有 cacheTtl 钳制 [60s, 24h] 的到期窗口 + 抖动(订阅窗口默认 5 分钟、余额/额度默认 2 分钟),429 触发引擎级全局退避(非条目字段)',
|
|
131
136
|
quotaProbes: '自定义额度探测(长尾/自建网关,原始 YAML 页编辑,保存即时生效):按 provider id 分组,条目 { url, windows, headers?, cacheTtlMs?, successIf?, override?, forkedFrom?, verifiedAt? } —— 铁律(仅约束本层):url 只写相对路径且解析后必须落在该 provider 推理 baseURL 的 origin 内(拒 ../ / / 协议头);认证固定复用推理同款 Bearer(需拼装/换 scheme/派生头的服务商走内置代码 adapter,不进本表);GET-only;1 条目=1 URL;覆盖内置条目必须显式 override: <内置条目 id>(静默遮蔽被拒加载),fork 条目带 forkedFrom+verifiedAt 血统戳。windows 声明式抽取(12 构件:static/each/eachObject 三形态、firstOf、used/total/remaining 二推三、invert、scale、where 仅限存在/相等/∈、名称模板+枚举映射、静态 headers、successIf 单等值、unlimited、headers 取数、秒/毫秒/ISO 时间判别;算术/跨调用注入/值比较/正则/时间差/按URL反义/头值插值 七类禁例出现即整条拒绝加载并在控制台额度页显示原因)',
|
|
132
137
|
'quotaProbes.*': '该 provider 的探测条目数组(键=provider id,如 my-gateway);每条目一张窗口表:windows { form: static|each|eachObject, path?, window|windows, plan? } —— 字段抽取 { path | header | literal, firstOf?, scale?, invertOf?, time? };used/total/remaining 任二者可推第三;where 仅限存在/相等/∈ 三谓词;名称 nameSpec { from, enumMap, fallback } 或 template 纯插值({field});successIf 单等值',
|
|
133
138
|
opencode: 'OpenCode 本地服务连接',
|
|
@@ -154,23 +159,22 @@ export const YAML_FIELD_COMMENTS_ZH = {
|
|
|
154
159
|
'proxy.mihomo.testUrl': '健康检查 / 测速地址(http 或 https,不能内嵌账号密码)。默认 https://www.gstatic.com/generate_204,即核心自身使用的 204 地址;当该地址在本机或经过节点不可达时(例如中国大陆网络)改掉它。控制台提供 Google 204 / Google / Cloudflare / OpenAI / Anthropic / Gemini 预设,但输入框可自由填写,保存后下一次测速即生效',
|
|
155
160
|
'proxy.mihomo.rules': '操作者自定义规则,按顺序在最后的 MATCH 之前求值(先匹配先赢)。每行 { type, payload, target }:type 限 DOMAIN / DOMAIN-SUFFIX / DOMAIN-KEYWORD / IP-CIDR / IP-CIDR6 / GEOIP / GEOSITE / DST-PORT / SRC-PORT / PROCESS-NAME / PROCESS-PATH。GEOIP / GEOSITE 由 Clash 面板下载的 geo 库求值——缺库时核心不会带这类规则启动;RULE-SET 仍会在加载时被丢弃(它要在线拉取规则集)。target 为 PROXY / DIRECT / REJECT,其中 PROXY 在渲染时解析为 selectedGroup。匹配内容含逗号或换行会被丢弃。缺省(未写过该键)时自动种入内置的局域网/回环直连基线;显式列表(哪怕是空列表)即为准。控制台保存后核心按新配置生效;这个列表是路由覆盖,不是规则集仓库,保持简短',
|
|
156
161
|
'proxy.mihomo.selectedNodes': '策略组名 → 节点名。每次启动后通过 External Controller 恢复,重启后仍停在同一节点',
|
|
157
|
-
|
|
158
|
-
'
|
|
159
|
-
'
|
|
160
|
-
'
|
|
161
|
-
'
|
|
162
|
-
'
|
|
163
|
-
'
|
|
164
|
-
'
|
|
165
|
-
'
|
|
166
|
-
'
|
|
167
|
-
'
|
|
168
|
-
'
|
|
169
|
-
'
|
|
170
|
-
'
|
|
171
|
-
'
|
|
172
|
-
'
|
|
173
|
-
'forwardProxy.accessLog.persistDays': '持久化访问日志的按天文件保留天数——过期文件在启动时与每日定时清理(默认 7,范围 1..365)',
|
|
162
|
+
ingressProxy: '入站前向代理(HTTP_PROXY/HTTPS_PROXY 服务端):rules 规则表逐主机决定这条连接要不要解密、字节从哪里出去(loopback 永远直连 + 透传)。解密跟随能力声明而非一刀切的默认:网关插件声明的主机与显式写了 `ingress: intercept` 的行才解密,其余一律盲隧道——除非用 `intercept: all` 打开审计姿态(见 `ingressProxy.intercept`)。被解密的 LLM 协议流量(chat/messages/responses)走路由管线,其余透明转发;流量被解密的客户端需信任导出的 CA(重启网关生效)',
|
|
163
|
+
'ingressProxy.enabled': '入站代理总开关(默认 false)',
|
|
164
|
+
'ingressProxy.port': '代理监听端口(默认 4555;客户端 HTTP_PROXY/HTTPS_PROXY 指向 http://127.0.0.1:4555)',
|
|
165
|
+
'ingressProxy.host': '代理监听地址(默认 127.0.0.1,仅本机)。入站代理不鉴权任何连接,非回环地址会被拒绝启动——给远端客户端请用隧道(SSH 端口转发 / socat),不要放宽绑定',
|
|
166
|
+
'ingressProxy.rules': '规则表(ADR-0018 第四版)——一条有序列表,先命中者生效,每行两个字段说尽一台主机的完整结局:{ match: <裸主机名 glob>, ingress: intercept | passthrough | reject, egress: direct | proxy }。ingress 是入站怎么处理——intercept 接管连接并解密(写在具体行上就是真的要接管,且该行高于任何插件声明;写在兜底行上只是「没人声明的主机」的默认姿态),passthrough 纯隧道透传字节不解密(证书固定的主机、非 HTTP 的 TLS、“这条别看”),reject 在准入阶段直接回 403(不开隧道也不签证书);egress 是字节从哪里出去——direct 直连本机出网,proxy 走 `proxy:` 段配置的上游代理。reject 行的 egress 必须是 direct(拒绝行根本不外发字节;reject + egress proxy 会被标记为无效)。loopback 永远透传直连,任何规则都改不了;没有规则命中的主机沿用兜底行的 egress,且除非 live 网关插件声明了它、或开启了 `intercept: all`,否则一律盲隧道——所以空表不解密任何东西。顺序就是语义——没有“最具体胜出”,也没有类别优先级。保存即生效',
|
|
167
|
+
'ingressProxy.intercept': '拦截姿态(默认 claims)。claims 只解密 live 网关插件声明的主机(插件自己声明它要读什么)加上你写了 `ingress: intercept` 的行,其余主机全部盲隧道——所以装上网关不会变成整机 TLS 接管。all 是审计姿态(经过本代理的每一台主机都解密),开启期间启动日志与控制台都会告警。非法值回落到 claims(绝不会回落到 all)。保存即生效',
|
|
168
|
+
'ingressProxy.maxConnections': '并发代理会话上限(默认 512,区间 16..8192):超出后新开的会话被拒绝(CONNECT 直接关连接,明文请求回 503)——每个被隧道或被解密的 socket 占两个 fd(接受的 socket 加它解密后的 loopback 对端)。准入点计数(CONNECT / 明文请求),保存即生效',
|
|
169
|
+
'ingressProxy.caDir': 'MITM CA 存放目录(默认 ~/.omnicell-router/ingress-proxy)',
|
|
170
|
+
'ingressProxy.upstreamTls': '上游 TLS 信任(代理会校验源站真实证书)。私有 CA 签发的源站——企业 TLS 检查链、内部服务、测试机——在信任它之前一律不可达。保存即生效;旧策略下建立的 h2 会话不会被复用',
|
|
171
|
+
'ingressProxy.upstreamTls.caFile': '追加到系统信任库的 PEM 证书包(是追加,不是替换)。文件轮换会在几秒内被发现;文件缺失或不可读只告警一次并保留系统信任库(绝不静默关闭校验)',
|
|
172
|
+
'ingressProxy.upstreamTls.insecure': '完全关闭上游证书校验(默认 false)。仅用于链本身已坏的应急:开启后任何源站(包括链路上的中间人)都会被接受。开启期间启动日志与控制台都会持续告警',
|
|
173
|
+
'ingressProxy.accessLog': '透明转发路径的访问日志(保存即时生效):把所有未被拦截接管的 HTTP 交互与 CONNECT 隧道决策记录在案——热视图为 300 条内存环,背后按天落盘为 <ocrHome>/ingress-proxy/access-log/ 下的 JSONL 文件(重启不丢)。LLM 协议流量继续走 /traces 归档的完整捕捉,此处不重复记录',
|
|
174
|
+
'ingressProxy.accessLog.enabled': '是否记录非拦截流量(默认 true)',
|
|
175
|
+
'ingressProxy.accessLog.bodyBytes': '每侧请求/响应 body 的捕捉上限(字节,默认 1 MiB——超限体在持久化开启时溢写到裸 body 文件,堆因此有界;0 = 仅记录头部)。header 恒经共享凭据脱敏清单',
|
|
176
|
+
'ingressProxy.accessLog.persist': '是否把事件持久化到按天的 JSONL 文件(默认 true);关闭后仅内存环,重启清零',
|
|
177
|
+
'ingressProxy.accessLog.persistDays': '持久化访问日志的按天文件保留天数——过期日文件(连同其溢写的 body sidecar)在启动时与每日定时清理(默认 7,范围 1..365)',
|
|
174
178
|
compression: 'Token 压缩(rtk 工具输出压缩 + headroom 上下文压缩 + caveman 输出风格注入;全部失败时放行原文,重启网关生效)',
|
|
175
179
|
'compression.rtk.enabled': 'rtk 工具输出压缩:git/grep/ls/tree/日志/构建输出等工具结果文本压缩 60-90%(本地确定性压缩器,不破坏上游前缀缓存)',
|
|
176
180
|
'compression.headroom.enabled': 'headroom 上下文压缩:转发前调用 headroom sidecar 的 /v1/compress(失败/超时自动放行原文;会话模式保上游前缀缓存)',
|
|
@@ -183,6 +187,10 @@ export const YAML_FIELD_COMMENTS_ZH = {
|
|
|
183
187
|
requestCapture: '请求全量捕获(HTTP 交换审计日志;默认关闭):请求/响应原文落盘 JSONL,捕获体可能含敏感数据且占用磁盘,按日期目录保留、到期或超容量自动清理;单会话另有 maxSessionMB 封顶(失控的 agent 循环不会吃光共享容量,触顶档案停止追加并落一条 archive-overflow 终态行)',
|
|
184
188
|
'requestCapture.storeMedia': 'base64 图片/文档等二进制载荷转存硬盘(默认 true):请求体中的 base64 媒体替换为 [MEDIA …sha256=… file=media/…] 占位符,内容寻址去重(同一张图多轮重发只落一份),随日期目录同批清理;关闭或写盘失败时仍替换为无 file= 的占位符(不留 base64 在归档里),对话回放页可直接显示缩略图',
|
|
185
189
|
'requestCapture.redactSecrets': '捕获凭证脱敏(强制开启):归档里凭证形请求头、查询串认证参数与 body 中 Bearer 回显一律替换为 [REDACTED];设为 false 也会被忽略——活密钥不会落盘',
|
|
190
|
+
sessionSnapshots: '会话快照交接存储(默认开启):每完成一次模型请求追加一条记录——服务端实际看到的规范请求(system 指令 + 消息 + 工具定义 + 推理签名)与规范响应——使整段对话可作为便携包**迁移**到另一实例。一个用户回合内的多次工具调用请求会各记一条。它是控制台消息 list/tree 视图的**前提**,所以才默认开启(关掉一个日志面只损失一份副本,关掉它则损失整个功能)。刻意区别于 requestCapture(字节级调试日志,默认关)。保留期与容量上限约束落盘内容;设为 false 则完全不落盘',
|
|
191
|
+
'sessionSnapshots.retentionDays': '会话文件保留天数(默认 30):早于 today-N 的记录在启动与每小时清扫时删除',
|
|
192
|
+
'sessionSnapshots.maxTotalMB': '目录总量上限(默认 1024 MB):超限时先删最旧的会话',
|
|
193
|
+
'sessionSnapshots.maxTurnMB': '单次请求上限(默认 8 MB):超过即放弃该条记录并把会话标记为不完整——静默丢了一条工具结果或一段 system 的交接比没有交接更糟,因此导出会拒绝而不是交出坏转录',
|
|
186
194
|
catalog: '目录数据源:远程 catalog 源定义与本地锚定(控制台 /catalog 页可视化编辑,改后即时生效)',
|
|
187
195
|
'catalog.syncIntervalMs': '目录自动同步周期(毫秒,默认 86400000 = 24h)',
|
|
188
196
|
'catalog.lockedModels': '本地锚定的模型 id 列表:这些模型的本地定义值(含 0 价)不被任何远程源覆盖',
|
|
@@ -190,10 +198,11 @@ export const YAML_FIELD_COMMENTS_ZH = {
|
|
|
190
198
|
'catalog.autoPullPatterns': '按服务商的自动拉取白名单:仅声明的服务商才会被定时拉取,且只拉取匹配 glob 的模型 id(逗号分隔多模式,如 zhipu/glm-*);未声明的服务商完全不自动拉取,控制台手动拉取不受影响。热生效',
|
|
191
199
|
'catalog.autoPullPatterns.*': '该服务商的自动拉取 glob:只拉取匹配的模型 id(逗号分隔多模式,如 zhipu/glm-*,openai/*, anthropic/*);留空/删除该条目即停止自动拉取该服务商',
|
|
192
200
|
combos: '自定义模型组合(combo):把若干已注册模型组成一个虚拟模型名,客户端直接以 combo id 作为 model 调用(控制台 /combos 页可视化编辑,保存后即时生效,无需重启)',
|
|
193
|
-
'combos.*.selection': '主选策略:priority 配置顺序(默认)/
|
|
201
|
+
'combos.*.selection': '主选策略:priority 配置顺序(默认)/ weighted_round_robin 加权轮询(平滑加权轮转,成员权重即份额)/ round_robin 顺序轮询(等权顺序轮转,权重被忽略)',
|
|
194
202
|
'combos.*.disabled': '禁用开关:true 时该组合下线——不再出现在模型目录(不可选),客户端以该组合 id 调用会被直接拒绝(不可用);控制台仍可查看并重新启用',
|
|
195
|
-
'combos.*.models': '成员列表(顺序即故障转移链序):成员可写 \'model-id\' 或 { id, weight }(weight
|
|
203
|
+
'combos.*.models': '成员列表(顺序即故障转移链序):成员可写 \'model-id\' 或 { id, weight, effortMap }(weight = 加权轮询的轮转份额;顺序轮询忽略;effortMap = 该成员自己的思考级别翻译表)',
|
|
196
204
|
'combos.*.note': '备注:仅控制台展示的自由文本,不参与路由',
|
|
205
|
+
'combos.*.models.effortMap': '仅作用于该成员的思考级别翻译(如 { none: high, low: high },表中未配置的级别原样透传,绝不按键继承缺省值)。每个成员各有自己的表,因为一个组合可能混合思考梯度不同的模型——绝不用整块一张表。解析按服务上下文决定:该组合被梯队以 combo:<id> 引用时,以该引用规则自身的 effortMap 为准、此成员表只作补充(整表让步,绝不按键合并);直接以组合 id 调用(无梯队)时,此成员表整表优先,仅当缺省时才回退到该成员归属梯队的翻译。只影响发往上游的级别,绝不改变由哪个成员服务',
|
|
197
206
|
clientProfileMemory: '控制台表单记忆(按环境保存):点击“接入”时才写入——记录该次挂接实际应用的完整表单状态:模型列表模式(default=默认(不添加具体模型)/ custom=自定义 / follow=跟随所选 API Key 的权限)、自定义模型列表(extraModels)、自定义虚拟档位勾选(virtualModels;缺省 = 适配器默认档位块)、写入的 API Key id(apiKeyId;挂接总是写入所选 Key,不存明文),以及槽位/角色模型引用快照(models/agentModels)供“还原上次提交”按钮回填,仅用于页面回填,不参与路由、也不影响实际接管配置',
|
|
198
207
|
defaultModels: '默认模型(网关自身内部调用花费的模型,不参与客户端路由)',
|
|
199
208
|
'defaultModels.translation': '控制台内部翻译(技能描述/README)使用的模型:填写网关可见的 modelRef(档位别名 lite/plus/pro/ultra 或已注册模型 id)。未设置 = lite;配置的模型失败降级到 lite,lite 也失败则如实报错——链条绝不自行升级到 auto(内部非关键调用不允许无上限花费;显式写 auto 视为运营者自担成本,照常生效)。可解析性在请求时校验(模型在启动时才注册);更换该值不使已缓存翻译失效(缓存按原文+语言键控,为派生数据)',
|