/** * Provider configuration mode detection (issue #1136). * * Runtime mode is decided by the presence of an *active* `provider` section — not by the * runtime.yaml file merely existing (an inactive `version: 1` file keeps legacy behavior). * When an active runtime section coexists with any legacy provider setting, mode detection * fails fast with an error that names each legacy location and its migration target, rather * than silently merging or preferring one side. */ import { type RuntimeProviderFile, type McpSection } from './schema.js'; export type ProviderConfigMode = 'legacy' | 'runtime-v1'; export interface LegacyProviderSignal { /** Legacy setting that was found (e.g. `provider_routing`). */ setting: string; /** Where it lives (e.g. `config.yaml:provider_routing`). */ location: string; /** Runtime-v1 destination it should move to (e.g. `provider.targets`). */ migrateTo: string; } export interface DetermineProviderConfigModeInput { runtimeFile: RuntimeProviderFile | undefined; legacyProviderSignals: LegacyProviderSignal[]; } /** True only when the runtime.yaml carries a provider section with meaningful content. */ export declare function hasActiveProviderSection(file: RuntimeProviderFile | undefined): boolean; /** * True only when the runtime.yaml carries an `mcp` section with meaningful * content. The `mcp` section is independent from `provider` — it may be active * alone (order.md:36, plan MCP-LEGACY-GATE). Server definitions become active * only when a default or positive target assignment references them. */ export declare function hasActiveMcpSection(file: RuntimeProviderFile | undefined): boolean; /** Section-level variant: true only when a default or positive target assignment exists. */ export declare function hasActiveMcpAssignments(mcp: McpSection | undefined): boolean; export declare function determineProviderConfigMode(input: DetermineProviderConfigModeInput): { mode: ProviderConfigMode; }; //# sourceMappingURL=mode.d.ts.map