Compare commits

..

8 commits

3 changed files with 30 additions and 16 deletions

View file

@ -8,16 +8,15 @@
"name": "iai-mcp-wrapper", "name": "iai-mcp-wrapper",
"version": "0.1.0", "version": "0.1.0",
"dependencies": { "dependencies": {
"@modelcontextprotocol/sdk": "^1.0.0", "@modelcontextprotocol/sdk": "^1.0.0"
"zod": "^4.0.0"
}, },
"bin": { "bin": {
"iai-mcp-wrapper": "dist/index.js" "iai-mcp-wrapper": "dist/index.js"
}, },
"devDependencies": { "devDependencies": {
"@types/node": "^22.0.0", "@types/node": "^25.0.0",
"tsx": "^4.7.0", "tsx": "^4.7.0",
"typescript": "^5.4.0" "typescript": "^6.0.0"
}, },
"engines": { "engines": {
"node": ">=18" "node": ">=18"
@ -518,13 +517,13 @@
} }
}, },
"node_modules/@types/node": { "node_modules/@types/node": {
"version": "22.19.17", "version": "25.9.1",
"resolved": "https://registry.npmjs.org/@types/node/-/node-22.19.17.tgz", "resolved": "https://registry.npmjs.org/@types/node/-/node-25.9.1.tgz",
"integrity": "sha512-wGdMcf+vPYM6jikpS/qhg6WiqSV/OhG+jeeHT/KlVqxYfD40iYJf9/AE1uQxVWFvU7MipKRkRv8NSHiCGgPr8Q==", "integrity": "sha512-xfrlY7UD5rMJk3ZVJP8BNzS28J36YJg+xp+LPXV1TdWxr8uMH5A860QNxYDGQe/ylDSgjxE52Q9VnO7p75tJxg==",
"dev": true, "dev": true,
"license": "MIT", "license": "MIT",
"dependencies": { "dependencies": {
"undici-types": "~6.21.0" "undici-types": ">=7.24.0 <7.24.7"
} }
}, },
"node_modules/accepts": { "node_modules/accepts": {
@ -1618,9 +1617,9 @@
} }
}, },
"node_modules/typescript": { "node_modules/typescript": {
"version": "5.9.3", "version": "6.0.3",
"resolved": "https://registry.npmjs.org/typescript/-/typescript-5.9.3.tgz", "resolved": "https://registry.npmjs.org/typescript/-/typescript-6.0.3.tgz",
"integrity": "sha512-jl1vZzPDinLr9eUt3J/t7V6FgNEw9QjvBPdysz9KfQDD41fQrC2Y4vKQdiaUpFT4bXlb1RHhLpp8wtm6M5TgSw==", "integrity": "sha512-y2TvuxSZPDyQakkFRPZHKFm+KKVqIisdg9/CZwm9ftvKXLP8NRWj38/ODjNbr43SsoXqNuAisEf1GdCxqWcdBw==",
"dev": true, "dev": true,
"license": "Apache-2.0", "license": "Apache-2.0",
"bin": { "bin": {
@ -1632,9 +1631,9 @@
} }
}, },
"node_modules/undici-types": { "node_modules/undici-types": {
"version": "6.21.0", "version": "7.24.6",
"resolved": "https://registry.npmjs.org/undici-types/-/undici-types-6.21.0.tgz", "resolved": "https://registry.npmjs.org/undici-types/-/undici-types-7.24.6.tgz",
"integrity": "sha512-iwDZqg0QAGrg9Rav5H4n0M64c3mkR59cJ6wQp+7C4nI0gsmExaedaYLNO44eT4AtBBwjbTiGPMlt2Md0T9H9JQ==", "integrity": "sha512-WRNW+sJgj5OBN4/0JpHFqtqzhpbnV0GuB+OozA9gCL7a993SmU+1JBZCzLNxYsbMfIeDL+lTsphD5jN5N+n0zg==",
"dev": true, "dev": true,
"license": "MIT" "license": "MIT"
}, },

View file

@ -18,8 +18,8 @@
"@modelcontextprotocol/sdk": "^1.0.0" "@modelcontextprotocol/sdk": "^1.0.0"
}, },
"devDependencies": { "devDependencies": {
"@types/node": "^22.0.0", "@types/node": "^25.0.0",
"typescript": "^5.4.0", "typescript": "^6.0.0",
"tsx": "^4.7.0" "tsx": "^4.7.0"
}, },
"engines": { "engines": {

View file

@ -24,6 +24,7 @@ export const TOOL_NAMES = [
"memory_contradict", "memory_contradict",
"memory_capture", "memory_capture",
"memory_consolidate", "memory_consolidate",
"memory_session_context",
"profile_get_set", "profile_get_set",
"curiosity_pending", "curiosity_pending",
"schema_list", "schema_list",
@ -185,6 +186,18 @@ export const toolSchemas: Record<ToolName, ToolSchema> = {
}, },
}, },
}, },
memory_session_context: {
name: "memory_session_context",
description:
"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.",
inputSchema: {
type: "object",
properties: {},
},
},
profile_get_set: { profile_get_set: {
name: "profile_get_set", name: "profile_get_set",
description: description:
@ -348,6 +361,8 @@ export async function invokeTool(
return bridge.call("memory_capture", args); return bridge.call("memory_capture", args);
case "memory_consolidate": case "memory_consolidate":
return bridge.call("memory_consolidate", args); return bridge.call("memory_consolidate", args);
case "memory_session_context":
return bridge.call("session_start_payload", {});
case "profile_get_set": { case "profile_get_set": {
const op = args.operation as string; const op = args.operation as string;
if (op === "get") { if (op === "get") {