export type RuntimeSessionContext = { actorKey: string; allowLearningWrite?: boolean; clientSessionId: string; learningMode?: "interactive" | "review"; memoryListReadScopes?: Partial>; network?: string; projectId?: string; projectKey: string; sessionId: string; traceId: string; }; const contexts = new Map(); export const setRuntimeSessionContext = (context: RuntimeSessionContext) => { contexts.set(context.sessionId, { ...context }); }; export const getRuntimeSessionContext = (sessionId: string) => { const context = contexts.get(sessionId); return context ? { ...context } : null; }; export const removeRuntimeSessionContext = (sessionId: string) => { contexts.delete(sessionId); };