import { type Document } from "yaml"; import type { ConfigDiagnostic } from "#src/config-diagnostics"; export declare const TMUX_PILOT_CONFIG_FILENAME = "tmux-pilot.config.yaml"; type Config = Record; export interface ComposedConfig { config: Config; entryDocument: Document.Parsed; entryPath: string; } /** Maps deep-merge; arrays, scalars, and type changes replace. */ export declare function mergeConfig(base: Config, overlay: Config): Config; /** Load and compose the sole tmux-pilot configuration entry file. */ export declare function readTmuxPilotConfig(configDir: string): ComposedConfig | undefined; /** Result of composing an unsaved candidate entry document. */ export interface CandidateComposition { /** Composed canonical data. Absent when parsing or import resolution failed. */ config?: Config; /** The parsed candidate entry document. Absent when parsing failed. */ document?: Document.Parsed; /** The entry's own canonical data, before imports are merged under it. */ entryConfig?: Config; /** What the imports alone contribute, before the entry's keys win. */ importedConfig?: Config; /** Absolute paths of every file imported by the candidate, depth-first. */ importedFiles: string[]; /** Structured parse/import problems. A non-empty error list blocks save. */ diagnostics: ConfigDiagnostic[]; } /** * Parse and compose an UNSAVED candidate entry document. * * Uses the same parse rules, depth-first import resolution, and merge semantics * as `readTmuxPilotConfig` — imports are still read from disk, so a draft is * composed against the user's real imported files. Nothing is written. * * Failures come back as `error` diagnostics rather than thrown exceptions; the * web console renders them and blocks save. * * @param entryPath Absolute path the candidate would be saved to. Need not exist. * @param content The candidate entry YAML text. */ export declare function composeCandidateConfig(entryPath: string, content: string): CandidateComposition; /** The `imports` patterns declared by an entry document, in declaration order. */ export declare function declaredImports(document: Document.Parsed): string[]; /** Create an empty entry document for first settings-modal writeback. */ export declare function createEmptyTmuxPilotConfig(): Document.Parsed; export {}; //# sourceMappingURL=config-loader.d.ts.map