//#region src/services/layeredConfig/index.d.ts /** Repository-local doom-pi configuration directory, committed to git. */ declare const DOOM_DIR = ".doom"; /** Source identity retained for diagnostics and composition fingerprints. */ interface DoomConfigProvenance { /** Absolute path of the declaring configuration file. */ filePath: string; /** Directory used to resolve paths authored by that file. */ baseDirectory: string; } /** One `.doom` document plus the root its relative paths resolve against. */ interface DoomConfigSource extends DoomConfigProvenance { /** Absolute path of the file the document was read from. */ filePath: string; /** * Where relative paths inside this document point. * * A repository document resolves against the repository root, so `plugins/x` * keeps meaning the same thing it always has. A global document resolves * against the global `.doom` directory, so it can name plugins and extensions * that live beside it in `~/.pi/.doom` rather than inside whichever * repository happens to be open. */ baseDirectory: string; /** Raw file contents, for callers that cache parsed results by source text. */ text: string; document: TDocument; } /** * Reads one named `.doom` document from the global and repository config * directories, lowest precedence first. * * A missing or empty file contributes nothing, so either location on its own is * a complete configuration. Documents are deliberately returned unmerged: * merging is by name, and only the caller knows what a name means in its own * document, so each one folds the sources itself with the repository last. */ declare function doomConfigCandidates(fileName: string, repoRoot: string, homeDirectory?: string): Array<{ filePath: string; baseDirectory: string; }>; declare function readDoomConfigSources(fileName: string, repoRoot: string, homeDirectory?: string): Array>; /** * Merges same-named records across sources, tagging each entry with the base * directory of the document that supplied it. * * Later sources win outright rather than being deep-merged: a repository that * redefines a name is replacing it, and a half-inherited definition whose paths * straddle two roots would be impossible to resolve. */ declare function mergeNamedSources(sources: ReadonlyArray>, select: (document: TDocument) => Record | undefined): Record; //#endregion export { mergeNamedSources as a, doomConfigCandidates as i, DoomConfigProvenance as n, readDoomConfigSources as o, DoomConfigSource as r, DOOM_DIR as t }; //# sourceMappingURL=index-orVmUmlT.d.mts.map