/** * Configuration boundary conversion (public-schema → internal-types). * * The public YAML schema is an independent wire language — all tmux-pilot- * owned keys are lower-kebab-case. This module defines the canonical key set, * validates composed config input at known fixed-key scopes, and provides * source-aware diagnostics for retired and unrecognised keys. * * Internal runtime types and resolver fields retain camelCase. Conversion and * validation happen at the loader boundary (readModelRouting) so resolvers * never need to touch the public-schema mapping directly. * * Validation collects structured `CollectedDiagnostic` values. `validateConfigKeys` * renders them into the warn-once console messages runtime callers have always * seen; `collectConfigDiagnostics` returns them to the web console verbatim * without touching the console or the dedup state. */ import type { ConfigDiagnostic } from "#src/config-diagnostics"; /** Reset warning tracking (for test isolation). */ export declare function clearConfigValidationWarnings(): void; export interface CanonicalScopeInventory { /** * Canonical path pattern of the scope. ``/``/`` are * dynamic-identifier placeholders; `[]` marks a sequence entry. The document * root is the empty string. */ scope: string; /** Fixed keys accepted at this scope. */ keys: string[]; /** Keys opening a nested scope rather than holding an editable leaf value. */ containers: string[]; } /** * The full accepted fixed-key surface of the canonical schema. * * Dynamic identifiers (role names, harness ids, model ids, provider ids, * import paths, harness-colour ids) are deliberately absent — they are open and * never validated against a closed enum. */ export declare function canonicalKeyInventory(): CanonicalScopeInventory[]; /** * Validate a composed config against the known canonical schema, logging each * problem once per source. * * Call once after composition, before routing resolution. * * @param config The composed config (raw YAML object). * @param source Stable identifier for dedup (e.g. the entry file path). */ export declare function validateConfigKeys(config: Record, source: string): void; /** * Structured twin of `validateConfigKeys` for the web configuration console. * * Returns the same problems as values instead of console warnings, with no * warn-once suppression — a console session must see every diagnostic for the * config in front of it, even one a prior runtime load already logged. */ export declare function collectConfigDiagnostics(config: Record, file?: string): ConfigDiagnostic[]; /** * Convert a raw composed config from the canonical public schema to the * internal camelCase resolver schema. Modifies the config IN PLACE. * * After conversion: * - Retired top-level keys that were NOT produced by the conversion from * a canonical source are stripped (resolvers fall through to defaults). * Validation (`validateConfigKeys`) already warned about them. * - Only the canonical-derived internal fields remain, so existing camelCase * resolvers continue to work unchanged. */ export declare function convertCanonicalConfig(config: Record): Record; //# sourceMappingURL=config-convert.d.ts.map