Add session_id param to memory_session_context tool; finalize session-init plugin

This commit is contained in:
Apunkt 2026-05-27 18:26:10 +02:00
parent 4ba8e3fc19
commit 37ee97b8ec
No known key found for this signature in database

View file

@ -192,10 +192,16 @@ export const toolSchemas: Record<ToolName, ToolSchema> = {
"Retrieve the current session context payload (identity, session handle, " +
"topic cluster, rich club). Call at session start to load relevant " +
"background memory. Returns JSON with l0, l1, l2, rich_club, and " +
"compact_handle fields.",
"compact_handle fields. Optional session_id parameter to query a specific session.",
inputSchema: {
type: "object",
properties: {},
properties: {
session_id: {
type: "string",
description:
"Optional session id to query. When omitted, uses the wrapper's current session.",
},
},
},
},
profile_get_set: {
@ -361,8 +367,10 @@ export async function invokeTool(
return bridge.call("memory_capture", args);
case "memory_consolidate":
return bridge.call("memory_consolidate", args);
case "memory_session_context":
return bridge.call("session_start_payload", {});
case "memory_session_context": {
const sessionId = (args.session_id as string) || null;
return bridge.call("session_start_payload", sessionId ? { session_id: sessionId } : {});
}
case "profile_get_set": {
const op = args.operation as string;
if (op === "get") {