import { f as MemoryEntry, g as MemoryScope, h as MemorySearchResult, i as MemoryConfig } from '../../types-Ks98Z0E_.js'; export { j as MemoryBackend } from '../../types-Ks98Z0E_.js'; import 'zod'; /** * EADK Memory Service * * Pluggable memory system with scoped storage, semantic search, and entity tracking. * Combines Google ADK state scoping, CrewAI entity memory, and LangGraph checkpointing. */ /** * Abstract memory backend interface. * Implementations handle actual storage (memory, OPFS, IndexedDB, etc.). */ interface MemoryBackendInterface { save(entry: MemoryEntry): Promise; get(key: string, scope: MemoryScope): Promise; delete(key: string, scope: MemoryScope): Promise; list(scope: MemoryScope): Promise; search(query: string, scope: MemoryScope, limit?: number): Promise; clear(scope?: MemoryScope): Promise; } /** * MemoryService provides a unified API over pluggable backends. */ declare class MemoryService { private backend; private config; constructor(backend: MemoryBackendInterface, config: MemoryConfig); /** * Save a value to memory. */ save(key: string, value: unknown, scope?: MemoryScope, metadata?: Record): Promise; /** * Get a value from memory. */ get(key: string, scope?: MemoryScope): Promise; /** * Semantic search over memory entries. */ search(query: string, scope?: MemoryScope, limit?: number): Promise; /** * Delete a memory entry. */ delete(key: string, scope?: MemoryScope): Promise; /** * List all entries in a scope. */ list(scope?: MemoryScope): Promise; /** * Clear memory. */ clear(scope?: MemoryScope): Promise; /** * Save an entity (CrewAI pattern). */ saveEntity(entityType: string, entityId: string, data: Record): Promise; /** * Get an entity. */ getEntity(entityType: string, entityId: string): Promise | undefined>; /** * Save a short-term working memory entry (auto-expires). */ saveWorkingMemory(key: string, value: unknown, ttlMs?: number): Promise; } /** * In-Memory Backend * * Simple in-memory storage. Fast but non-persistent. * Suitable for testing and short-lived sessions. */ declare class InMemoryBackend implements MemoryBackendInterface { private store; private key; save(entry: MemoryEntry): Promise; get(key: string, scope: MemoryScope): Promise; delete(key: string, scope: MemoryScope): Promise; list(scope: MemoryScope): Promise; search(query: string, scope: MemoryScope, limit?: number): Promise; clear(scope?: MemoryScope): Promise; } /** * IndexedDB Memory Backend * * Persistent browser-based storage using IndexedDB. * Integrates with existing edgework-sdk storage patterns. */ declare class IndexedDBBackend implements MemoryBackendInterface { private dbPromise; private getDB; private compositeKey; save(entry: MemoryEntry): Promise; get(key: string, scope: MemoryScope): Promise; delete(key: string, scope: MemoryScope): Promise; list(scope: MemoryScope): Promise; search(query: string, scope: MemoryScope, limit?: number): Promise; clear(scope?: MemoryScope): Promise; } /** * EADK Memory — Public API */ /** * Create a memory service with the appropriate backend. */ declare function createMemoryService(config: MemoryConfig): MemoryService; export { InMemoryBackend, IndexedDBBackend, type MemoryBackendInterface, MemoryConfig, MemoryEntry, MemoryScope, MemorySearchResult, MemoryService, createMemoryService };