import { MemoryStorageInterface, ScopedMemoryInterface } from '../../../Types/AgentGraph/AgentGraphTypes'; /** * ScopedMemory - Wrapper over MemoryStorageInterface * Encapsulates threadId and agentId, providing simple key-based access for agents */ export default class ScopedMemory implements ScopedMemoryInterface { private storage; private threadId; private agentId; /** * Create a new ScopedMemory instance * @param storage - Underlying memory storage * @param threadId - Thread identifier * @param agentId - Agent identifier */ constructor(storage: MemoryStorageInterface, threadId: string, agentId: string); /** * Get agent private memory by key * @param key - Memory key * @returns Promise resolving to stored value or null */ get(key: string): Promise; /** * Set agent private memory by key (replaces existing value) * @param key - Memory key * @param data - Data to store */ set(key: string, data: any): Promise; /** * Get shared thread memory by key (accessible by all agents in thread) * @param key - Memory key * @returns Promise resolving to stored value or null */ getShared(key: string): Promise; /** * Set shared thread memory by key (replaces existing value) * @param key - Memory key * @param data - Data to store */ setShared(key: string, data: any): Promise; /** * Get global memory by key (accessible by all threads) * @param key - Memory key * @returns Promise resolving to stored value or null */ getGlobal(key: string): Promise; /** * Set global memory by key (replaces existing value) * @param key - Memory key * @param data - Data to store */ setGlobal(key: string, data: any): Promise; }