import { IWeaveProvider } from "./types.js"; /** * JsonProvider * * File-system implementation of IWeaveProvider that stores each record as an * individual JSON file inside a configurable data directory. * * Key → file-path mapping: * key = "graph:my-session" → /graph__my-session.json * * Colons in keys are replaced with double-underscores and any characters that * are not safe for all major file systems are percent-encoded, so the mapping * is always reversible. * * Backward-compatible with the original weave-graph PersistenceManager: * graph: → weave-data/.json (no namespace prefix) * That legacy layout is preserved for existing data directories. */ export declare class JsonProvider implements IWeaveProvider { private dataDir; private closed; constructor(dataDir?: string); close(): Promise; get(key: string): Promise; set(key: string, value: T): Promise; delete(key: string): Promise; list(prefix?: string): Promise; clear(prefix?: string): Promise; /** * Convert a logical key into an absolute file path. * * Rules (applied in order): * 1. Replace ":" with "__" (namespace separator) * 2. Replace "/" with "--" (path separator used in ids) * 3. Append ".json" */ private keyToPath; /** * Reverse of keyToPath — converts a filename back into a logical key. */ private pathToKey; private ensureDataDir; private assertOpen; /** Expose dataDir for testing / diagnostics. */ get directory(): string; } //# sourceMappingURL=json-provider.d.ts.map