//#region src/plugin-state/plugin-state-store.types.d.ts type PluginStateEntry = { key: string; value: T; createdAt: number; expiresAt?: number; }; /** Async plugin state API exposed to plugin runtimes. */ type PluginStateKeyedStore = { register(key: string, value: T, opts?: { ttlMs?: number; }): Promise; registerIfAbsent(key: string, value: T, opts?: { ttlMs?: number; }): Promise; update?: (key: string, updateValue: (current: T | undefined) => T | undefined, opts?: { ttlMs?: number; }) => Promise; lookup(key: string): Promise; consume(key: string): Promise; delete(key: string): Promise; entries(): Promise[]>; clear(): Promise; }; /** Sync plugin state API used by trusted core/plugin bootstrap paths. */ type PluginStateSyncKeyedStore = { register(key: string, value: T, opts?: { ttlMs?: number; }): void; registerIfAbsent(key: string, value: T, opts?: { ttlMs?: number; }): boolean; update?: (key: string, updateValue: (current: T | undefined) => T | undefined, opts?: { ttlMs?: number; }) => boolean; lookup(key: string): T | undefined; consume(key: string): T | undefined; delete(key: string): boolean; entries(): PluginStateEntry[]; clear(): void; }; /** Options for opening a keyed plugin-state namespace. */ type OpenKeyedStoreOptions = { namespace: string; maxEntries: number; defaultTtlMs?: number; env?: NodeJS.ProcessEnv; }; //#endregion export { PluginStateSyncKeyedStore as i, PluginStateEntry as n, PluginStateKeyedStore as r, OpenKeyedStoreOptions as t };