/** * docsManager.ts * Handle Git repository operations and file system access */ import type { RepoStatus } from './types.js'; export declare class DocsManager { private git; private repoPath; private contentPath; private fileCache; constructor(); /** * Initialize the docs manager * Checks if repo exists, clones if needed */ initialize(): Promise; /** * Check if repository exists locally */ private checkRepoExists; /** * Clone the repository. * Clones into a temp directory and renames into place so that two * processes starting on a fresh machine (e.g. two MCP servers sharing one * cache) don't corrupt each other; the loser discards its redundant copy. */ private cloneRepo; /** * Get repository status */ getStatus(): Promise; /** * Update repository (git pull) * Returns true if updates were pulled */ updateRepo(): Promise; /** * Get all markdown files from a section * @param section - Section name (learn, reference, etc.) * @returns Array of file paths relative to content root */ getDocsInSection(section: string): Promise; /** * Get all markdown files across all sections * @returns Array of file paths relative to content root */ getAllDocs(): Promise; /** * Filter a list of section names down to those whose directory actually * exists under the content root. Lets the server avoid advertising * sections that are empty in the checked-out docs (e.g. a versioned * snapshot that predates a section). */ getExistingSections(sections: readonly string[]): Promise; /** * Read file content * @param relativePath - Path relative to content root * @returns Raw file content */ readDoc(relativePath: string): Promise; /** * Check if file exists * @param relativePath - Path relative to content root */ docExists(relativePath: string): Promise; } //# sourceMappingURL=docsManager.d.ts.map