/** * Hot Cache - Persistent Encrypted Cache * * Stores the top ~30 high-importance facts (encrypted at rest) for instant * auto-recall on conversation start. Also caches fact count, last-synced * block number, and Smart Account address. * * File format: [nonce:24][tag:16][ciphertext] (XChaCha20-Poly1305) * Default location: ~/.totalreclaw/cache.enc */ /** * A cached fact with ID, text, and importance score. */ export interface HotFact { id: string; text: string; importance: number; } /** * A small persistent cache that stores the top ~30 high-importance facts * encrypted at rest for instant auto-recall on conversation start. */ export declare class HotCache { private cachePath; private hotFacts; private factCount; private lastSyncedBlock; private smartAccountAddress; private key; /** * Create a new HotCache instance. * * @param cachePath - Filesystem path for the encrypted cache file * @param hexKey - 64-character hex string (32-byte AES-256 key) */ constructor(cachePath: string, hexKey: string); /** Return a shallow copy of the cached hot facts. */ getHotFacts(): HotFact[]; /** Return the cached total fact count. */ getFactCount(): number; /** Return the last synced block number. */ getLastSyncedBlock(): number; /** Return the cached Smart Account address. */ getSmartAccountAddress(): string; /** * Replace the hot facts list. * * Facts are sorted by importance (descending) and truncated to * {@link MAX_HOT_FACTS} entries. */ setHotFacts(facts: HotFact[]): void; /** Set the total fact count. */ setFactCount(count: number): void; /** Set the last synced block number. */ setLastSyncedBlock(block: number): void; /** Set the Smart Account address. */ setSmartAccountAddress(addr: string): void; /** * Encrypt the current cache state and write it to disk. * * File format: `[iv:12][tag:16][ciphertext]` * Creates parent directories as needed. */ flush(): void; /** * Read the cache file from disk and decrypt it. * * Gracefully degrades to an empty cache if the file is missing, * corrupted, or encrypted with a different key. */ load(): void; } //# sourceMappingURL=hot-cache.d.ts.map