fix(core): enable global session and persistent approval for web_fetch (#23295)

Co-authored-by: Spencer <spencertang@google.com>
This commit is contained in:
N. Taylor Mullen
2026-03-21 10:32:07 -07:00
committed by GitHub
parent 0df9498674
commit 4a3d9414ef
5 changed files with 35 additions and 19 deletions
+18
View File
@@ -752,6 +752,24 @@ describe('WebFetchTool', () => {
});
});
describe('getPolicyUpdateOptions', () => {
it('should return empty object for any outcome to allow global approval', () => {
const tool = new WebFetchTool(mockConfig, bus);
const invocation = tool.build({ prompt: 'fetch https://example.com' });
expect(
invocation.getPolicyUpdateOptions!(
ToolConfirmationOutcome.ProceedAlways,
),
).toEqual({});
expect(
invocation.getPolicyUpdateOptions!(
ToolConfirmationOutcome.ProceedAlwaysAndSave,
),
).toEqual({});
});
});
describe('Message Bus Integration', () => {
let policyEngine: PolicyEngine;
let messageBus: MessageBus;