/** * Wiki canonical-folder overlay resolver. * * Some schema-frozen folders in a team vault (`sop/`, `team-norm/`) are * reserved canonical homes whose content actually lives elsewhere on disk and * is read directly by the engine — they were never wired to receive wiki * writes, so they always render empty. Rather than copy/migrate that content * (which would drift), the wiki tree + page endpoints read THROUGH to the real * source so the folders always reflect live content. * * Overlay sources (both PER-TEAM siblings of the vault, so the wiki shows only * what the team actually owns — config/sops/ is a catalog you install FROM, * never shown directly in a team folder): * - `sop/` → `/../sops/` (SOPs the team has installed from the catalog) * - `team-norm/` → `/../norms/` (per-team norms written by update-team-norm) * * @module services/wiki/wiki-overlay.resolver */ /** Top-level vault folders that read through to a live external source. */ export type OverlayFolder = 'sop' | 'team-norm'; /** * Return the real on-disk directory backing a top-level canonical folder, or * null when the folder is not overlayed (the vault's own directory is used). * Both overlay folders resolve to a per-team sibling of the vault. * * @param vaultPath - Absolute path to the vault root (e.g. `.../teams//wiki`). * @param topFolder - The top-level folder name (e.g. `sop`, `team-norm`, `llm-curated`). * @returns Absolute source directory for read-through, or null. */ export declare function overlayRootFor(vaultPath: string, topFolder: string): string | null; /** * Resolve the absolute file path to read for an overlayed page request, with a * traversal guard against escaping the overlay source root. Returns null when * the relativePath is not under an overlay folder; callers then fall back to * the normal in-vault resolution. * * @param vaultPath - Absolute path to the vault root. * @param relativePath - Vault-relative page path, e.g. `sop/pm/progress-tracking.md`. * @returns Absolute real file path, or null if not overlayed. * @throws Error tagged `overlay_escape` when the path would escape the source root. */ export declare function resolveOverlayFilePath(vaultPath: string, relativePath: string): string | null; //# sourceMappingURL=wiki-overlay.resolver.d.ts.map