fix: pass gateway config to tool policies

This commit is contained in:
Eva
2026-05-01 20:57:21 +07:00
committed by Josh Lehman
parent 761738f96d
commit 33ddd748ed
2 changed files with 3 additions and 0 deletions

View File

@@ -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",
}),
}),

View File

@@ -254,6 +254,7 @@ export async function invokeGatewayTool(params: {
toolCallId,
ctx: {
agentId,
config: params.cfg,
sessionKey,
loopDetection: resolveToolLoopDetectionConfig({ cfg: params.cfg, agentId }),
},