export type PluginStateEntry = { key: string; value: T; createdAt: number; expiresAt?: number; }; export type PluginStateKeyedStore = { register(key: string, value: T, opts?: { ttlMs?: number; }): Promise; registerIfAbsent(key: string, value: T, opts?: { ttlMs?: number; }): Promise; lookup(key: string): Promise; consume(key: string): Promise; delete(key: string): Promise; entries(): Promise[]>; clear(): Promise; }; export type OpenKeyedStoreOptions = { namespace: string; maxEntries: number; defaultTtlMs?: number; }; export type PluginStateStoreErrorCode = "PLUGIN_STATE_SQLITE_UNAVAILABLE" | "PLUGIN_STATE_OPEN_FAILED" | "PLUGIN_STATE_SCHEMA_UNSUPPORTED" | "PLUGIN_STATE_WRITE_FAILED" | "PLUGIN_STATE_READ_FAILED" | "PLUGIN_STATE_CORRUPT" | "PLUGIN_STATE_LIMIT_EXCEEDED" | "PLUGIN_STATE_INVALID_INPUT"; export type PluginStateStoreOperation = "load-sqlite" | "open" | "ensure-schema" | "register" | "lookup" | "consume" | "delete" | "entries" | "clear" | "sweep" | "probe" | "close"; export type PluginStateStoreErrorOptions = { code: PluginStateStoreErrorCode; operation: PluginStateStoreOperation; path?: string; cause?: unknown; }; export declare class PluginStateStoreError extends Error { readonly code: PluginStateStoreErrorCode; readonly operation: PluginStateStoreOperation; readonly path?: string; constructor(message: string, options: PluginStateStoreErrorOptions); } export type PluginStateStoreProbeStep = { name: string; ok: boolean; code?: PluginStateStoreErrorCode; message?: string; }; export type PluginStateStoreProbeResult = { ok: boolean; dbPath: string; steps: PluginStateStoreProbeStep[]; };