UNPKG

memq-ai-memory

Version:

Memory SDK with Vercel AI SDK integration

193 lines 4.53 kB
export interface Memory { id: string; prompt: string; response?: string; source: string; tags?: string[]; timestamp: string; user_id?: string; session_id?: string; similarity?: number; } export interface MemoryResponse { id: string; prompt: string; response?: string; source: string; tags: string[]; timestamp: string; user_id: string; session_id?: string; similarity?: number; extracted_facts: any[]; } export interface WorkflowMemory { id: string; prompt: string; nodes: Array<{ id: string; type: string; name: string; attributes: Record<string, string>; confidence: number; }>; relations: Array<{ source_node_id: string; relation_type: string; target_node_id: string; confidence: number; timestamp: string; }>; source: string; tags: string[]; timestamp: string; user_id: string; session_id?: string; snippet?: string; } export interface Fact { id: string; content: string; entities: Array<{ name: string; type: string; }>; relationships: Array<{ source: string; target: string; type: string; }>; importance: number; category: string; similarity?: number; timestamp: string; } export interface PromptStructure { id: string; prompt_text: string; source: string; similarity?: number; timestamp: string; type: string; nodes_count?: number; relations_count?: number; is_complete?: boolean; } export interface MemoryStats { total_memories: number; total_facts: number; total_prompt_structures: number; recent_activity: number; } export interface SmartMemoryResponse { success: boolean; query: string; relevant_facts: Fact[]; memories: Memory[]; prompt_structures: PromptStructure[]; total_results: number; } export interface UserFactsResponse { success: boolean; user_id: string; facts: Fact[]; total_facts: number; } export interface UserPromptStructuresResponse { success: boolean; user_id: string; structures: PromptStructure[]; total_structures: number; } export interface APIKeyInfo { id: string; name: string; description?: string; key_prefix: string; created_at: string; expires_at?: string; last_used_at?: string; permissions: string[]; is_active: boolean; } export interface CreateAPIKeyRequest { name: string; description?: string; expires_at?: string; permissions?: string[]; } export interface CreateAPIKeyResponse { id: string; name: string; description?: string; api_key: string; key_prefix: string; created_at: string; expires_at?: string; permissions: string[]; is_active: boolean; message: string; } export interface SDKConfig { apiKey: string; baseUrl?: string; timeout?: number; retryAttempts?: number; retryDelay?: number; enableLogging?: boolean; } export interface MemoryCreateRequest { prompt: string; response?: string; source: string; tags?: string[]; user_id?: string; session_id?: string; } export interface MemorySearchRequest { query: string; user_id?: string; limit?: number; filters?: Record<string, any>; } export interface ExtensionConfig { autoSave: boolean; similarityThreshold: number; maxMemories: number; responseWaitTime: number; enableLogging: boolean; enableErrorReporting: boolean; retryAttempts: number; retryDelay: number; saveDebounce: number; enableCrossPlatformMemories: boolean; crossPlatformUserId?: string; enableDuplicatePrevention: boolean; duplicateSimilarityThreshold: number; duplicateCacheExpiry: number; duplicateMaxCacheSize: number; duplicateCheckInterval: number; duplicateMinPromptLength: number; duplicateMaxPromptLength: number; enableBackendDuplicateCheck: boolean; enableLocalDuplicateCheck: boolean; enableSemanticDuplicateCheck: boolean; enableCrossPlatformDuplicateCheck: boolean; } export interface PlatformConfig { name: string; displayName: string; color: string; priority: number; } export interface ErrorResponse { error: string; detail?: string; status?: number; } export interface SuccessResponse { success: boolean; message: string; data?: any; } //# sourceMappingURL=index.d.ts.map