UNPKG

@memory-bank/mcp

Version:

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

69 lines 2.75 kB
import { DocumentPath } from '../../../domain/entities/DocumentPath.js'; import { MemoryDocument } from '../../../domain/entities/MemoryDocument.js'; import { Tag } from '../../../domain/entities/Tag.js'; import type { IFileSystemService } from '../../storage/interfaces/IFileSystemService.js'; import type { IConfigProvider } from '../../config/index.js'; import { FileSystemMemoryBankRepositoryBase } from './FileSystemMemoryBankRepositoryBase.js'; /** * Component responsible for bulk operations * Handles bulk retrieval, update, deletion of multiple documents */ export declare class BulkOperations extends FileSystemMemoryBankRepositoryBase { private readonly basePath; private readonly documentOps; private readonly tagOps; private readonly pathOps; /** * Constructor * @param basePath Base path * @param fileSystemService File system service * @param configProvider Configuration provider */ constructor(basePath: string, fileSystemService: IFileSystemService, configProvider: IConfigProvider); /** * Get multiple documents in bulk * @param paths Array of document paths to retrieve * @returns Array of documents (including null for non-existent ones) */ getDocuments(paths: DocumentPath[]): Promise<(MemoryDocument | null)[]>; /** * Save multiple documents in bulk * @param documents Array of documents to save */ saveDocuments(documents: MemoryDocument[]): Promise<void>; /** * Delete multiple documents in bulk * @param paths Array of document paths to delete * @returns Array of booleans indicating success for each deletion */ deleteDocuments(paths: DocumentPath[]): Promise<boolean[]>; /** * Find documents by tags * @param tags Array of tags to search for * @param matchAll Whether all tags must match (AND) or any tag is sufficient (OR) * @returns Array of matching documents */ findDocumentsByTags(tags: Tag[], matchAll?: boolean): Promise<MemoryDocument[]>; /** * List all documents * @returns Array of all documents */ getAllDocuments(): Promise<MemoryDocument[]>; /** * Get all documents within a specific directory * @param directoryPath Directory path * @returns Array of documents within the directory */ getDocumentsInDirectory(directoryPath: string): Promise<MemoryDocument[]>; /** * Regenerate the tag index * @returns true if successful */ rebuildTagIndex(): Promise<boolean>; /** * Validate if the directory structure is valid * @returns Validation result (true if successful) */ validateStructure(): Promise<boolean>; } //# sourceMappingURL=BulkOperations.d.ts.map