UNPKG

@codai/cbd

Version:

Codai Better Database - High-Performance Vector Memory System with HPKV-inspired architecture and MCP server

35 lines 1.39 kB
/** * CBD Native Storage Adapter * Pure binary storage implementation - no SQL */ import { ConversationExchange, StorageAdapter, SearchQuery, DatabaseStats } from '../types/index.js'; export declare class CBDNativeStorageAdapter implements StorageAdapter { private dataPath; private header; private indexCache; private connected; constructor(dataPath?: string); connect(): Promise<void>; disconnect(): Promise<void>; storeConversation(exchange: ConversationExchange): Promise<string>; getConversation(structuredKey: string): Promise<ConversationExchange | null>; searchConversations(query: SearchQuery): Promise<ConversationExchange[]>; updateConversation(structuredKey: string, updates: Partial<ConversationExchange>): Promise<boolean>; deleteConversation(structuredKey: string): Promise<boolean>; getStats(): Promise<DatabaseStats>; getNextSequenceNumber(projectName: string, sessionName: string): Promise<number>; private loadHeader; private saveHeader; private buildIndexCache; private updateIndex; private serializeExchange; private deserializeExchange; private serializeHeader; private deserializeHeader; private serializeIndex; private deserializeIndex; private appendToFile; private readFromFile; private matchesQuery; } //# sourceMappingURL=CBDNativeStorageAdapter.d.ts.map