UNPKG

@kya-os/mcp-i

Version:

COMING SOON:Production-ready MCP Identity with automatic registration, key rotation, and optimized performance

42 lines (41 loc) 1.4 kB
import { PersistedIdentity } from './types'; export interface StorageProvider { load(): Promise<PersistedIdentity | null>; save(identity: PersistedIdentity): Promise<void>; exists(): Promise<boolean>; } export declare class FileStorage implements StorageProvider { private filePath; constructor(customPath?: string); load(): Promise<PersistedIdentity | null>; save(identity: PersistedIdentity): Promise<void>; exists(): Promise<boolean>; } export declare class MemoryStorage implements StorageProvider { private static instances; private key; constructor(key?: string); load(): Promise<PersistedIdentity | null>; save(identity: PersistedIdentity): Promise<void>; exists(): Promise<boolean>; static clear(): void; } export declare class EnvironmentStorage { static load(): PersistedIdentity | null; } export declare class CombinedStorage implements StorageProvider { private providers; private primaryProvider; constructor(providers: StorageProvider[]); load(): Promise<PersistedIdentity | null>; save(identity: PersistedIdentity): Promise<void>; exists(): Promise<boolean>; } export declare class StorageFactory { static create(options?: { storage?: 'file' | 'memory' | 'auto'; customPath?: string; memoryKey?: string; encryptionPassword?: string; }): StorageProvider; }