UNPKG

@memory-bank/mcp

Version:

Memory-enabled Co-Pilot (MCP) server for managing project documentation and context

49 lines 2 kB
import { BranchInfo } from "../../../domain/entities/BranchInfo.js"; import { DocumentPath } from "../../../domain/entities/DocumentPath.js"; import { MemoryDocument } from "../../../domain/entities/MemoryDocument.js"; /** * Handles document Input/Output operations within a specific branch directory. * Assumes the branch directory already exists when methods are called. */ export declare class DocumentIO { private readonly branchMemoryBankPath; /** * Constructor * @param rootPath Root path for the memory bank (e.g., docs/) */ constructor(rootPath: string); /** * Gets the full path for a given document within a branch. * @param branchInfo Branch information. * @param documentPath Document path relative to the branch. * @returns The full file path. */ private getFullFilePath; /** * Checks if a file exists. (Currently unused, kept for potential future use) * @param filePath Full file path * @returns Promise resolving to boolean indicating if file exists */ /** * Reads a document from the file system. * @param branchInfo Branch information * @param documentPath Document path * @returns Promise resolving to MemoryDocument if found, null otherwise */ getDocument(branchInfo: BranchInfo, documentPath: DocumentPath): Promise<MemoryDocument | null>; /** * Saves a document to the file system. * @param branchInfo Branch information * @param document Document to save * @returns Promise resolving when done */ saveDocument(branchInfo: BranchInfo, document: MemoryDocument): Promise<void>; /** * Deletes a document from the file system. * @param branchInfo Branch information * @param documentPath Document path * @returns Promise resolving to boolean indicating success */ deleteDocument(branchInfo: BranchInfo, documentPath: DocumentPath): Promise<boolean>; } //# sourceMappingURL=DocumentIO.d.ts.map