/** * Interface for isolated plugin file and key-value storage. */ export interface IPluginStorage { get(key: string, defaultValue?: T): Promise; set(key: string, value: T): Promise; delete(key: string): Promise; getJSON(filename: string): Promise; setJSON(filename: string, data: T): Promise; getPath(subpath?: string): string; list(subpath?: string): Promise; } /** * Creates an isolated storage sandbox for a plugin under: * ~/.weavetab/plugins// */ export declare class PluginStorageManager implements IPluginStorage { readonly pluginName: string; private readonly pluginDir; private readonly configPath; private readonly kvStorePath; private inMemoryKV; constructor(pluginName: string); /** * Returns the absolute path to the plugin's isolated directory. */ getDirectory(): string; /** * Returns the absolute path to the plugin's config.json. */ getConfigPath(): string; private ensureDir; /** * Loads the plugin's isolated config.json. If it does not exist and a defaultConfig is provided, * writes the default config to ~/.weavetab/plugins//config.json. */ loadConfig(defaultConfig?: Record): Record; /** * Saves updated configuration to ~/.weavetab/plugins//config.json. */ saveConfig(configData: Record): void; private loadKV; private persistKV; get(key: string, defaultValue?: T): Promise; set(key: string, value: T): Promise; delete(key: string): Promise; getPath(subpath?: string): string; getJSON(filename: string): Promise; setJSON(filename: string, data: T): Promise; list(subpath?: string): Promise; }