/** * Config-center adapter — pull the effective config from the config-center control plane and * apply it OVER the env-derived defaults (env = fallback, center = override). Follows the * "universal internal schema → translate at the boundary" pattern, with our security boundary kept: * * (name history: this module tracks the control plane's product name, which has changed over time * — registry → sema-web → sema-web-admin (2026-08-26 repo/product rename; an earlier revision of * this note listed "planned sema-admin" as the next step). The module itself keeps a neutral, product-name-free * identifier ("config-center") and does not chase the rename.) * * - the CENTER owns the LOGICAL config: the model roster (names/capabilities/tier), the role map, * and collab (multi-agent discussion) templates; * - the SERVICE env still owns the SECRETS: API keys stay in env (the center never stores a secret); * keys are per-model via `apiKeyEnv` → `config.modelApiKeyEnv` → the spec's `getApiKeyAndHeaders` * (core 1.45), so each model/cascade-rung authenticates with its own upstream key. * * Per-model `baseUrl` IS transported (a catalog model may live on a different gateway; * core brain honors model.baseUrl, absent = "" = boot-env endpoint). * * Hot-reload status (复审 2026-07-29 P1-11 — 亲读判定,取代此处旧的 "models/roles are restart-to-apply" * TODO, which went stale when `mutateInPlace` landed): * - models/roles/roster/collab/projects/autonomy — **HOT**. `applyEffective` mutates `config.models`/ * `config.roles` IN PLACE, and core's Runner reads `this.deps.models/roles` per task off that very * reference. Both brains re-resolve `model.baseUrl || config.baseUrl` inside `buildRequest()` on every * call (core 2.1.0 `brain/openai.js` + `brain/anthropic.js`), so a moved gateway takes effect on the * next task with no restart. * - the same plane under a **tier-frozen** Runner — deferred, not hot: core expands a PRIVATE catalog copy * at construction, so `main` defers the whole plane and the `models-tiers` restart slice signals. * - **`degrade-route`** — the one genuinely boot-frozen catalog consumer left: reactive degrade * (`MODEL_DEGRADE_REACTIVE`) bakes the target Model + its gateway + its key into the brain composition * at boot. It cannot be hot-applied without rebuilding the brain, so it is registered on the existing * restartRequired /health contract instead (see `restart-signal.ts`). Fail-loud beats serving a stale * gateway silently on the rate-limit path. * - skills/mcp/scenarios/runtime-gates — restart-to-apply by construction (baked into the boot wiring). * * ([ref] A13, internal-lossless) This module is now a FACADE: the implementation lives * alongside it in `src/config-center/` split by responsibility group (HTTP client / EffectiveConfig * application / restart-signal detection / skills+MCP consumption). Every symbol below is * re-exported UNCHANGED — existing `from ".../config-center/facade.js"` imports need zero changes * across a rename of this file's *contents*; a path rename (this move, 2026-07-29) does require the * importers to update, which was done in the same commit. */ export { fetchEffective, fetchPrincipalCaps, fetchPrincipalOrgMemory, ConfigCenterHttpError, fetchSkillContent, fetchPromptArtifact, fetchPromptBlob, } from "./http-client.js"; export { mutateInPlace, applyEffective, type ApplyReport, applyRuntimeGates, applyRuntimeHot, resolveDefaultModelName, logEffectiveDiff, } from "./apply-effective.js"; export { restartReasons, planeHasActiveTiers, modelPlaneChanged, type RestartSlice, type RestartSliceCtx, type RestartSignal, } from "./restart-signal.js"; export { applyCenterSkills, resolveMcpServers, mcpForScenario, resolveA2aPeers, a2aForScenario } from "./skills-mcp.js"; export { applyCenterReadFace, CENTER_READ_FACE_LIVE_KEYS, type CenterReadFaceApply, type CenterReadFaceReport, type ReadFaceBaseline } from "./read-face.js"; export type { CenterSkillManifest, CenterMcpServer, CenterA2aPeer, CenterModel, CenterReadFace, EffectiveConfig, ExecutionRuling, SessionMirrorRuling, } from "./types.js"; //# sourceMappingURL=facade.d.ts.map