fix(agents): honor bundle mcp tool allowlist · openclaw/openclaw@fc6cfbd
steipete
·
2026-04-27
·
via Recent Commits to openclaw:main
File tree
src/agents/pi-embedded-runner/run
| Original file line number | Diff line number | Diff line change |
|---|
@@ -117,6 +117,12 @@ describe("shouldCreateBundleMcpRuntimeForAttempt", () => {
|
117 | 117 | toolsAllow: ["memory_search", "memory_get"], |
118 | 118 | }), |
119 | 119 | ).toBe(false); |
| 120 | +expect( |
| 121 | +shouldCreateBundleMcpRuntimeForAttempt({ |
| 122 | +toolsEnabled: true, |
| 123 | +toolsAllow: ["bundle-mcp"], |
| 124 | +}), |
| 125 | +).toBe(true); |
120 | 126 | expect( |
121 | 127 | shouldCreateBundleMcpRuntimeForAttempt({ |
122 | 128 | toolsEnabled: true, |
|
| Original file line number | Diff line number | Diff line change |
|---|
@@ -490,7 +490,9 @@ export function shouldCreateBundleMcpRuntimeForAttempt(params: {
|
490 | 490 | if (!params.toolsAllow || params.toolsAllow.length === 0) { |
491 | 491 | return true; |
492 | 492 | } |
493 | | -return params.toolsAllow.some((toolName) => toolName.includes(TOOL_NAME_SEPARATOR)); |
| 493 | +return params.toolsAllow.some( |
| 494 | +(toolName) => toolName === "bundle-mcp" || toolName.includes(TOOL_NAME_SEPARATOR), |
| 495 | +); |
494 | 496 | } |
495 | 497 | |
496 | 498 | function collectAttemptExplicitToolAllowlistSources(params: { |
|
此内容由惯性聚合(RSS阅读器)自动聚合整理,仅供阅读参考。 原文来自 — 版权归原作者所有。