@memory-bank/mcp
Version:
Memory-enabled Co-Pilot (MCP) server for managing project documentation and context
69 lines • 1.99 kB
TypeScript
type DocumentType = 'branch_context' | 'active_context' | 'progress' | 'system_patterns' | 'generic';
/**
* Value object representing a document path
*/
export declare class DocumentPath {
private readonly _value;
private constructor();
/**
* Factory method to create a new DocumentPath
* @param value Raw path string
* @returns DocumentPath instance
* @throws DomainError if path is invalid
*/
static create(value: string): DocumentPath;
/**
* Get the raw path value
*/
get value(): string;
/**
* Get the directory part of the path
*/
get directory(): string;
/**
* Get the filename part of the path
*/
get filename(): string;
/**
* Get the extension part of the path
*/
get extension(): string;
/**
* Check if this document is a JSON file
*/
get isJSON(): boolean;
/**
* Checks if two DocumentPath instances are equal
* @param other Other DocumentPath instance to compare with
* @returns true if both paths have the same value
*/
equals(other: DocumentPath | null | undefined): boolean;
/**
* Convert to string
* @returns Raw path value
*/
toString(): string;
/**
* Get the basename (filename without extension)
*/
get basename(): string;
inferDocumentType(): DocumentType;
/**
* Create a new path with different extension
* @param newExtension New extension (without dot)
* @returns New DocumentPath instance
*/
withExtension(newExtension: string): DocumentPath;
/**
* Get the path in the alternate format (.md <-> .json conversion)
* @returns DocumentPath in the alternate format
*/
toAlternateFormat(): DocumentPath;
/**
* Create a clone of the current DocumentPath
* @returns A new DocumentPath with the same path value
*/
clone(): DocumentPath;
}
export {};
//# sourceMappingURL=DocumentPath.d.ts.map