mirror of
https://github.com/openclaw/openclaw.git
synced 2026-05-06 18:10:45 +00:00
fix: pass gateway config to tool policies
This commit is contained in:
@@ -447,6 +447,7 @@ describe("POST /tools/invoke", () => {
|
||||
toolName: "agents_list",
|
||||
ctx: expect.objectContaining({
|
||||
agentId: "main",
|
||||
config: cfg,
|
||||
sessionKey: "agent:main:main",
|
||||
loopDetection: { warnAt: 3 },
|
||||
}),
|
||||
@@ -995,6 +996,7 @@ describe("tools.invoke Gateway RPC", () => {
|
||||
toolCallId: "rpc-rpc-tool-test",
|
||||
ctx: expect.objectContaining({
|
||||
agentId: "main",
|
||||
config: cfg,
|
||||
sessionKey: "agent:main:main",
|
||||
}),
|
||||
}),
|
||||
|
||||
@@ -254,6 +254,7 @@ export async function invokeGatewayTool(params: {
|
||||
toolCallId,
|
||||
ctx: {
|
||||
agentId,
|
||||
config: params.cfg,
|
||||
sessionKey,
|
||||
loopDetection: resolveToolLoopDetectionConfig({ cfg: params.cfg, agentId }),
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user