mirror of https://github.com/openclaw/openclaw.git
* fix(plugins): expose ephemeral sessionId in tool contexts for per-conversation isolation The plugin tool context (`OpenClawPluginToolContext`) and tool hook context (`PluginHookToolContext`) only provided `sessionKey`, which is a durable channel identifier that survives /new and /reset. Plugins like mem0 that need per-conversation isolation (e.g. mapping Mem0 `run_id`) had no way to distinguish between conversations, causing session-scoped memories to persist unbounded across resets. Add `sessionId` (ephemeral UUID regenerated on /new and /reset) to: - `OpenClawPluginToolContext` (factory context for plugin tools) - `PluginHookToolContext` (before_tool_call / after_tool_call hooks) - Internal `HookContext` for tool call wrappers Thread the value from the run attempt through createOpenClawCodingTools → createOpenClawTools → resolvePluginTools and through the tool hook wrapper. Closes #31253 Made-with: Cursor * fix(agents): propagate embedded sessionId through tool hook context * test(hooks): cover sessionId in embedded tool hook contexts * docs(changelog): add sessionId hook context follow-up note * test(hooks): avoid toolCallId collision in after_tool_call e2e --------- Co-authored-by: SidQin-cyber <sidqin0410@gmail.com> |
||
|---|---|---|
| .. | ||
| runtime | ||
| bundled-dir.ts | ||
| bundled-sources.test.ts | ||
| bundled-sources.ts | ||
| cli.test.ts | ||
| cli.ts | ||
| commands.test.ts | ||
| commands.ts | ||
| config-schema.ts | ||
| config-state.test.ts | ||
| config-state.ts | ||
| discovery.test.ts | ||
| discovery.ts | ||
| enable.test.ts | ||
| enable.ts | ||
| hook-runner-global.ts | ||
| hooks.before-agent-start.test.ts | ||
| hooks.model-override-wiring.test.ts | ||
| hooks.phase-hooks.test.ts | ||
| hooks.test-helpers.ts | ||
| hooks.ts | ||
| http-path.ts | ||
| http-registry.test.ts | ||
| http-registry.ts | ||
| install.test.ts | ||
| install.ts | ||
| installs.test.ts | ||
| installs.ts | ||
| loader.test.ts | ||
| loader.ts | ||
| logger.test.ts | ||
| logger.ts | ||
| manifest-registry.test.ts | ||
| manifest-registry.ts | ||
| manifest.ts | ||
| path-safety.ts | ||
| providers.ts | ||
| registry.ts | ||
| runtime.ts | ||
| schema-validator.ts | ||
| services.test.ts | ||
| services.ts | ||
| slots.test.ts | ||
| slots.ts | ||
| source-display.test.ts | ||
| source-display.ts | ||
| status.ts | ||
| toggle-config.ts | ||
| tools.optional.test.ts | ||
| tools.ts | ||
| types.ts | ||
| uninstall.test.ts | ||
| uninstall.ts | ||
| update.test.ts | ||
| update.ts | ||
| voice-call.plugin.test.ts | ||
| wired-hooks-after-tool-call.e2e.test.ts | ||
| wired-hooks-compaction.test.ts | ||
| wired-hooks-gateway.test.ts | ||
| wired-hooks-llm.test.ts | ||
| wired-hooks-message.test.ts | ||
| wired-hooks-session.test.ts | ||
| wired-hooks-subagent.test.ts | ||