/**
* VaultProvider interface - abstraction for vault access
* This allows swapping between Git, direct file access, CouchDB, etc.
*/
export interface SearchResult {
path: string;
content: string;
matches?: number;
}
export interface Note {
path: string;
content: string;
frontmatter?: Record<string, any>;
}
export interface VaultProvider {
/**
* Initialize the vault (clone, sync, etc.)
*/
initialize(): Promise<void>;
/**
* Read a note by path
*/
read(path: string): Promise<Note>;
/**
* Write or update a note
*/
write(path: string, content: string, frontmatter?: Record<string, any>): Promise<void>;
/**
* Delete a note
*/
delete(path: string): Promise<void>;
/**
* Search notes by content
*/
search(query: string, options?: { limit?: number }): Promise<SearchResult[]>;
/**
* List all notes or filter by pattern
*/
list(pattern?: string): Promise<string[]>;
/**
* Sync changes (git pull/push, database sync, etc.)
*/
sync(): Promise<void>;
/**
* Get the local vault path
*/
getVaultPath(): string;
}