import { i as PersonaVoiceOverride } from "./profiles-CTrUCmIh.mjs"; import { I as VoiceConfig, N as ResolvedVoiceConfig, O as PlanningModeConfig, T as LenientParseResult, f as DoomConfigLayers, l as DoomConfig, t as AutocompactModeConfig, w as LenientParseOptions } from "./config-XC40aztM.mjs"; //#region src/services/config/index.d.ts declare function globalDoomConfigDirectory(homeDirectory?: string): string; declare function globalDoomConfigPath(homeDirectory?: string): string; declare function resolvePlanningPlansDirectory(configured: string | undefined, repoRoot: string, homeDirectory?: string): string; declare function repositoryDoomConfigPath(repoRoot: string): string; declare function loadDoomConfig(repoRoot: string, homeDirectory?: string): DoomConfig; /** * Loads the merged config, tolerating unknown keys in either file. * * Only `doompi sync` uses this. Everything that runs during a session keeps * `loadDoomConfig`, because a key a running extension cannot understand is * better reported than silently ignored; a build that refuses to start over * the same key is not. */ declare function loadDoomConfigLenient(repoRoot: string, homeDirectory?: string): LenientParseResult; declare function loadDoomConfigAsync(repoRoot: string, homeDirectory?: string): Promise; /** * The two config files kept apart, with the merge alongside them. * * `repoRoot` is optional because the global file is complete on its own: a * settings surface with no repository in view still has settings to show, and * demanding one would leave it with nothing to render rather than with the * global half. * * The origin answer respects the merge's own per-field rules rather than simply * preferring the repository: `editor` is read from the global side whatever the * repository says, and `projectTrust` from the repository side whatever the * global one says. Reporting a file as the source of a value the merge discards * is the exact confusion this exists to remove. */ declare function loadDoomConfigLayers(repoRoot: string | undefined, homeDirectory?: string): DoomConfigLayers; //#endregion //#region src/services/configPolicy/index.d.ts /** * The accepted values, in the order a picker should offer them. * * Exported because the config UI has to offer exactly what the parser accepts, * and a second hand-written list in the contributing package would drift. The * validating Sets below are built from these for the same reason. */ declare const DOOM_PLANNING_THINKING_LEVELS: readonly ['off', 'minimal', 'low', 'medium', 'high', 'xhigh', 'max']; declare const DOOM_VOICE_MODES: readonly ["legacy", 'live']; declare const DOOM_VOICE_ENGINES: readonly ["auto", "whisper-cpp", "openai-whisper", "mlx-whisper"]; declare const DOOM_VOICE_TTS_ENGINES: readonly ["macos-say"]; declare function parseAutocompactModeConfig(value: unknown, filePath: string, location?: string): AutocompactModeConfig; declare function parsePlanningModeConfig(value: unknown, filePath: string, location?: string): PlanningModeConfig; /** * Reads one Doom config file. * * The two-argument form is the strict contract every harness-launch consumer * relies on: an unknown key is a hard error. `doompi sync` opts into the * lenient form so a config written for a different version cannot break a * build; `doompi doctor` is the strict check that still reports those keys. * Invalid values for known keys throw in both modes. */ declare function parseDoomConfig(content: string, filePath: string): DoomConfig; declare function parseDoomConfig(content: string, filePath: string, options: LenientParseOptions): LenientParseResult; declare function mergeDoomConfigs(globalConfig: DoomConfig, repositoryConfig: DoomConfig): DoomConfig; /** * Resolves voice settings, optionally shadowed by the active profile's override. * * The override is per field, so a persona that sets only `rate` keeps the voice * from config.yaml. `engine` is deliberately not overridable: it selects the * synthesiser binary, which is a machine-level fact rather than a persona's. * * The result is read once when autonomous voice activates, because * `VoiceNarrationPlayback.config` is assigned in `activate()` and has no setter. * That is sufficient today only because every profile switch reloads the * session, which deactivates and reactivates voice. A future in-place profile * switch would leave the spoken voice stale until the next activation. */ declare function resolveVoiceConfig(config: VoiceConfig, ttsOverride?: PersonaVoiceOverride): ResolvedVoiceConfig; /** * Which files a key may be written to. * * `mergeDoomConfigs` above already decides this per field, but it decides it by * doing it: `editor` reads only from the global side, `projectTrust` only from * the repository side, and repository `voice.mode` or `voice.autoCapture` * declarations throw outright. A caller holding a key path has no way to ask. * surface offers writes that throw, or worse, writes that land in a file the * merge will ignore, so the change appears to do nothing. * * Declared here rather than beside the writer because the rule is a property of * the merge, not of the filesystem, and a test asserts the two agree. */ type ConfigKeyScope = 'global' | 'repository' | 'both'; /** * The scopes a key path accepts. An unknown root answers `both` rather than * throwing: the parser is what rejects unsupported keys, and it reports them * far better than a scope lookup could. */ declare function configScopeOf(keyPath: readonly string[]): ConfigKeyScope; /** Every root key the config accepts, so a caller can enumerate without importing the parser's internals. */ declare function configRootKeys(): readonly string[]; /** * Every key path a parsed document actually sets, as dotted strings. * * A settings surface needs to tell "this file set this key" from "this file is * silent about it", and the parsed `DoomConfig` cannot answer: an absent file * reads as `{ projectTrust: 'ask' }` and `parseDoomConfig` always returns all * known root keys, some undefined. So the question is asked of the raw document * instead, before any defaulting has happened. * * Leaves only. A list is a leaf because it is replaced whole, and an empty * record sets nothing. */ declare function configLeafKeys(value: unknown, prefix?: readonly string[]): string[]; /** The value a key path points at, or undefined when any step is missing. */ declare function valueAtKeyPath(value: unknown, keyPath: readonly string[]): unknown; //#endregion export { resolvePlanningPlansDirectory as S, loadDoomConfig as _, DOOM_VOICE_TTS_ENGINES as a, loadDoomConfigLenient as b, configScopeOf as c, parseDoomConfig as d, parsePlanningModeConfig as f, globalDoomConfigPath as g, globalDoomConfigDirectory as h, DOOM_VOICE_MODES as i, mergeDoomConfigs as l, valueAtKeyPath as m, DOOM_PLANNING_THINKING_LEVELS as n, configLeafKeys as o, resolveVoiceConfig as p, DOOM_VOICE_ENGINES as r, configRootKeys as s, ConfigKeyScope as t, parseAutocompactModeConfig as u, loadDoomConfigAsync as v, repositoryDoomConfigPath as x, loadDoomConfigLayers as y }; //# sourceMappingURL=index-YMuEaEJr.d.mts.map