7a779c8560f4080bcaf36b04cd4a62c72610f8f7
When Claude Code calls an MCP tool via /mcp/execute, the bridge now: 1. Looks up the tool in OpenClaw's global plugin registry (getGlobalPluginRegistry) 2. Calls the tool's factory with proper context (config from globalThis, canonical session key "agent:<agentId>:direct:bridge" for memory agentId resolution) 3. Executes the real tool implementation and returns the AgentToolResult text This replaces the manual memory_search/memory_get implementations in memory-handlers.ts with a generic relay that works for any registered OpenClaw tool. The agentId is now propagated from dispatchToClaude through the MCP server env (AGENT_ID) to /mcp/execute. The OpenClaw config is stored in globalThis._contractorOpenClawConfig during plugin registration (index.ts api.config) since getRuntimeConfigSnapshot() uses module-level state not shared across bundle boundaries. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Description
No description provided
Languages
TypeScript
79.6%
JavaScript
20.4%