feat: initialize experimental agent repo
This commit is contained in:
@@ -0,0 +1,27 @@
|
||||
export type RuntimeSessionContext = {
|
||||
actorKey: string;
|
||||
allowLearningWrite?: boolean;
|
||||
clientSessionId: string;
|
||||
learningMode?: "interactive" | "review";
|
||||
memoryListReadScopes?: Partial<Record<"user" | "workspace", boolean>>;
|
||||
network?: string;
|
||||
projectId?: string;
|
||||
projectKey: string;
|
||||
sessionId: string;
|
||||
traceId: string;
|
||||
};
|
||||
|
||||
const contexts = new Map<string, RuntimeSessionContext>();
|
||||
|
||||
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);
|
||||
};
|
||||
Reference in New Issue
Block a user