From 2528122ee7de7c7db7b4c6bd6d816b4072b512f4 Mon Sep 17 00:00:00 2001 From: Nikolay Vitkov Date: Thu, 28 May 2026 13:42:31 +0200 Subject: [PATCH 1/3] refactor: use validate files on the tool level --- src/ToolHandler.ts | 6 ++++++ src/tools/ToolDefinition.ts | 5 ++--- src/tools/extensions.ts | 3 +-- src/tools/input.ts | 4 ++-- src/tools/lighthouse.ts | 3 +-- src/tools/memory.ts | 13 ++++++------- src/tools/network.ts | 3 +-- src/tools/performance.ts | 4 ++-- src/tools/screencast.ts | 2 +- src/tools/screenshot.ts | 2 +- src/tools/script.ts | 3 +-- src/tools/snapshot.ts | 4 ++-- 12 files changed, 26 insertions(+), 26 deletions(-) diff --git a/src/ToolHandler.ts b/src/ToolHandler.ts index 80950c97b..01e07d2a5 100644 --- a/src/ToolHandler.ts +++ b/src/ToolHandler.ts @@ -220,6 +220,12 @@ export class ToolHandler { response.setRedactNetworkHeaders(this.serverArgs.redactNetworkHeaders); try { + if (this.tool.verifyFilesSchema) { + for (const key of this.tool.verifyFilesSchema) { + const filePath = params[key]; + await context.validatePath(filePath as string); + } + } if (isPageScopedTool(this.tool)) { const pageId = typeof params.pageId === 'number' ? params.pageId : undefined; diff --git a/src/tools/ToolDefinition.ts b/src/tools/ToolDefinition.ts index dd8cba89b..caca1ddeb 100644 --- a/src/tools/ToolDefinition.ts +++ b/src/tools/ToolDefinition.ts @@ -32,9 +32,7 @@ import type { ToolDefinition as ThirdPartyDeveloperToolDefinition, } from './thirdPartyDeveloper.js'; -export interface BaseToolDefinition< - Schema extends zod.ZodRawShape = zod.ZodRawShape, -> { +export interface BaseToolDefinition { name: string; description: string; annotations: { @@ -48,6 +46,7 @@ export interface BaseToolDefinition< }; schema: Schema; blockedByDialog: boolean; + verifyFilesSchema?: Array; } export interface ToolDefinition< diff --git a/src/tools/extensions.ts b/src/tools/extensions.ts index f0656deda..7bbe33533 100644 --- a/src/tools/extensions.ts +++ b/src/tools/extensions.ts @@ -22,9 +22,9 @@ export const installExtension = defineTool({ .describe('Absolute path to the unpacked extension folder.'), }, blockedByDialog: false, + verifyFilesSchema: ['path'], handler: async (request, response, context) => { const {path} = request.params; - await context.validatePath(path); const id = await context.installExtension(path); response.appendResponseLine(`Extension installed. Id: ${id}`); }, @@ -80,7 +80,6 @@ export const reloadExtension = defineTool({ if (!extension) { throw new Error(`Extension with ID ${id} not found.`); } - await context.validatePath(extension.path); await context.installExtension(extension.path); response.appendResponseLine('Extension reloaded.'); }, diff --git a/src/tools/input.ts b/src/tools/input.ts index 7ff11e40f..4f5ef97b9 100644 --- a/src/tools/input.ts +++ b/src/tools/input.ts @@ -461,9 +461,9 @@ export const uploadFile = definePageTool({ includeSnapshot: includeSnapshotSchema, }, blockedByDialog: true, - handler: async (request, response, context) => { + verifyFilesSchema: ['filePath'], + handler: async (request, response, _context) => { const {uid, filePath} = request.params; - await context.validatePath(filePath); const handle = (await request.page.getElementByUid( uid, )) as ElementHandle; diff --git a/src/tools/lighthouse.ts b/src/tools/lighthouse.ts index da0a7267c..f4e9a02c5 100644 --- a/src/tools/lighthouse.ts +++ b/src/tools/lighthouse.ts @@ -44,6 +44,7 @@ export const lighthouseAudit = definePageTool({ .describe('Directory for reports. If omitted, uses temporary files.'), }, blockedByDialog: true, + verifyFilesSchema: ['outputDirPath'], handler: async (request, response, context) => { const page = request.page; const categories = [ @@ -59,8 +60,6 @@ export const lighthouseAudit = definePageTool({ outputDirPath, } = request.params; - await context.validatePath(outputDirPath); - const flags: Flags = { onlyCategories: categories, output: formats, diff --git a/src/tools/memory.ts b/src/tools/memory.ts index c2dc409b4..e9cd00215 100644 --- a/src/tools/memory.ts +++ b/src/tools/memory.ts @@ -23,9 +23,9 @@ export const takeHeapSnapshot = definePageTool({ .describe('A path to a .heapsnapshot file to save the heapsnapshot to.'), }, blockedByDialog: true, - handler: async (request, response, context) => { + verifyFilesSchema: ['filePath'], + handler: async (request, response) => { const page = request.page; - await context.validatePath(request.params.filePath); await page.pptrPage.captureHeapSnapshot({ path: ensureExtension(request.params.filePath, '.heapsnapshot'), @@ -50,8 +50,8 @@ export const getHeapSnapshotSummary = defineTool({ filePath: zod.string().describe('A path to a .heapsnapshot file to read.'), }, blockedByDialog: false, + verifyFilesSchema: ['filePath'], handler: async (request, response, context) => { - await context.validatePath(request.params.filePath); const stats = await context.getHeapSnapshotStats(request.params.filePath); const staticData = await context.getHeapSnapshotStaticData( request.params.filePath, @@ -82,8 +82,8 @@ export const getHeapSnapshotDetails = defineTool({ .describe('The page size for pagination of aggregates.'), }, blockedByDialog: false, + verifyFilesSchema: ['filePath'], handler: async (request, response, context) => { - await context.validatePath(request.params.filePath); const aggregates = await context.getHeapSnapshotAggregates( request.params.filePath, ); @@ -111,8 +111,8 @@ export const getHeapSnapshotClassNodes = defineTool({ pageSize: zod.number().optional().describe('The page size for pagination.'), }, blockedByDialog: false, + verifyFilesSchema: ['filePath'], handler: async (request, response, context) => { - await context.validatePath(request.params.filePath); const nodes = await context.getHeapSnapshotNodesById( request.params.filePath, request.params.id, @@ -135,6 +135,7 @@ export const getHeapSnapshotRetainers = defineTool({ conditions: ['experimentalMemory'], }, blockedByDialog: false, + verifyFilesSchema: ['filePath'], schema: { filePath: zod.string().describe('A path to a .heapsnapshot file to read.'), nodeId: zod.number().describe('The node ID to get retainers for.'), @@ -142,8 +143,6 @@ export const getHeapSnapshotRetainers = defineTool({ pageSize: zod.number().optional().describe('The page size for pagination.'), }, handler: async (request, response, context) => { - await context.validatePath(request.params.filePath); - const retainers = await context.getHeapSnapshotRetainers( request.params.filePath, request.params.nodeId, diff --git a/src/tools/network.ts b/src/tools/network.ts index 1df56a8ff..97f098948 100644 --- a/src/tools/network.ts +++ b/src/tools/network.ts @@ -115,9 +115,8 @@ export const getNetworkRequest = definePageTool({ ), }, blockedByDialog: true, + verifyFilesSchema: ['requestFilePath', 'responseFilePath'], handler: async (request, response, context) => { - await context.validatePath(request.params.requestFilePath); - await context.validatePath(request.params.responseFilePath); if (request.params.reqid) { response.attachNetworkRequest(request.params.reqid, { requestFilePath: request.params.requestFilePath, diff --git a/src/tools/performance.ts b/src/tools/performance.ts index 4ea5f201e..1b2a95ed7 100644 --- a/src/tools/performance.ts +++ b/src/tools/performance.ts @@ -48,8 +48,8 @@ export const startTrace = definePageTool({ filePath: filePathSchema, }, blockedByDialog: true, + verifyFilesSchema: ['filePath'], handler: async (request, response, context) => { - await context.validatePath(request.params.filePath); if (context.isRunningPerformanceTrace()) { response.appendResponseLine( 'Error: a performance trace is already running. Use performance_stop_trace to stop it. Only one trace can be running at any given time.', @@ -127,8 +127,8 @@ export const stopTrace = definePageTool({ filePath: filePathSchema, }, blockedByDialog: true, + verifyFilesSchema: ['filePath'], handler: async (request, response, context) => { - await context.validatePath(request.params.filePath); if (!context.isRunningPerformanceTrace()) { return; } diff --git a/src/tools/screencast.ts b/src/tools/screencast.ts index 11af9dfda..09a9ad108 100644 --- a/src/tools/screencast.ts +++ b/src/tools/screencast.ts @@ -39,8 +39,8 @@ export const startScreencast = definePageTool(args => ({ ), }, blockedByDialog: false, + verifyFilesSchema: ['filePath'], handler: async (request, response, context) => { - await context.validatePath(request.params.filePath); if (context.getScreenRecorder() !== null) { response.appendResponseLine( 'Error: a screencast recording is already in progress. Use screencast_stop to stop it before starting a new one.', diff --git a/src/tools/screenshot.ts b/src/tools/screenshot.ts index 746a6c11f..99abdfb59 100644 --- a/src/tools/screenshot.ts +++ b/src/tools/screenshot.ts @@ -51,8 +51,8 @@ export const screenshot = definePageTool({ ), }, blockedByDialog: true, + verifyFilesSchema: ['filePath'], handler: async (request, response, context) => { - await context.validatePath(request.params.filePath); if (request.params.uid && request.params.fullPage) { throw new Error('Providing both "uid" and "fullPage" is not allowed.'); } diff --git a/src/tools/script.ts b/src/tools/script.ts index 037200d86..bc15a896d 100644 --- a/src/tools/script.ts +++ b/src/tools/script.ts @@ -71,6 +71,7 @@ Example with arguments: \`(el) => { : {}), }, blockedByDialog: true, + verifyFilesSchema: ['filePath'], handler: async (request, response, context) => { const { serviceWorkerId, @@ -81,8 +82,6 @@ Example with arguments: \`(el) => { filePath, } = request.params; - await context.validatePath(filePath); - if (cliArgs?.categoryExtensions && serviceWorkerId) { if (uidArgs && uidArgs.length > 0) { throw new Error( diff --git a/src/tools/snapshot.ts b/src/tools/snapshot.ts index 8c0c90ef6..4a1cdd7ef 100644 --- a/src/tools/snapshot.ts +++ b/src/tools/snapshot.ts @@ -34,8 +34,8 @@ in the DevTools Elements panel (if any).`, ), }, blockedByDialog: true, - handler: async (request, response, context) => { - await context.validatePath(request.params.filePath); + verifyFilesSchema: ['filePath'], + handler: async (request, response) => { response.includeSnapshot({ verbose: request.params.verbose ?? false, filePath: request.params.filePath, From a6fd136a335e68620e53e19cc22131c8cbff291a Mon Sep 17 00:00:00 2001 From: Nikolay Vitkov Date: Thu, 28 May 2026 16:24:38 +0200 Subject: [PATCH 2/3] fix --- src/tools/ToolDefinition.ts | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/tools/ToolDefinition.ts b/src/tools/ToolDefinition.ts index caca1ddeb..5f339b04c 100644 --- a/src/tools/ToolDefinition.ts +++ b/src/tools/ToolDefinition.ts @@ -32,7 +32,9 @@ import type { ToolDefinition as ThirdPartyDeveloperToolDefinition, } from './thirdPartyDeveloper.js'; -export interface BaseToolDefinition { +export interface BaseToolDefinition< + Schema extends zod.ZodRawShape = zod.ZodRawShape, +> { name: string; description: string; annotations: { From 6c455fa90f0c821bc074cff083757200ec4ebfb5 Mon Sep 17 00:00:00 2001 From: Nikolay Vitkov Date: Thu, 28 May 2026 17:52:35 +0200 Subject: [PATCH 3/3] refactor: use validate files on the tool level --- src/tools/ToolDefinition.ts | 2 +- src/tools/console.ts | 2 ++ src/tools/emulation.ts | 1 + src/tools/extensions.ts | 4 ++++ src/tools/input.ts | 8 ++++++++ src/tools/network.ts | 1 + src/tools/pages.ts | 8 ++++++++ src/tools/performance.ts | 1 + src/tools/screencast.ts | 1 + src/tools/slim/tools.ts | 3 +++ src/tools/snapshot.ts | 1 + src/tools/thirdPartyDeveloper.ts | 2 ++ src/tools/webmcp.ts | 2 ++ tests/ToolHandler.test.ts | 4 ++++ tests/telemetry/metricsRegistry.test.ts | 3 +++ 15 files changed, 42 insertions(+), 1 deletion(-) diff --git a/src/tools/ToolDefinition.ts b/src/tools/ToolDefinition.ts index 5f339b04c..7350b2b45 100644 --- a/src/tools/ToolDefinition.ts +++ b/src/tools/ToolDefinition.ts @@ -48,7 +48,7 @@ export interface BaseToolDefinition< }; schema: Schema; blockedByDialog: boolean; - verifyFilesSchema?: Array; + verifyFilesSchema: Array; } export interface ToolDefinition< diff --git a/src/tools/console.ts b/src/tools/console.ts index c0c0fd6c6..421dccbfc 100644 --- a/src/tools/console.ts +++ b/src/tools/console.ts @@ -79,6 +79,7 @@ export const listConsoleMessages = definePageTool(cliArgs => { ), }, blockedByDialog: false, + verifyFilesSchema: [], handler: async (request, response) => { response.setIncludeConsoleData(true, { pageSize: request.params.pageSize, @@ -105,6 +106,7 @@ export const getConsoleMessage = definePageTool({ ), }, blockedByDialog: false, + verifyFilesSchema: [], handler: async (request, response) => { response.attachConsoleMessage(request.params.msgid); }, diff --git a/src/tools/emulation.ts b/src/tools/emulation.ts index 519ad5a10..8424810d2 100644 --- a/src/tools/emulation.ts +++ b/src/tools/emulation.ts @@ -100,6 +100,7 @@ export const emulate = definePageTool({ ), }, blockedByDialog: true, + verifyFilesSchema: [], handler: async (request, response, context) => { const page = request.page; await context.emulate(request.params, page.pptrPage); diff --git a/src/tools/extensions.ts b/src/tools/extensions.ts index 7bbe33533..988db973c 100644 --- a/src/tools/extensions.ts +++ b/src/tools/extensions.ts @@ -41,6 +41,7 @@ export const uninstallExtension = defineTool({ id: zod.string().describe('ID of the extension to uninstall.'), }, blockedByDialog: false, + verifyFilesSchema: [], handler: async (request, response, context) => { const {id} = request.params; await context.uninstallExtension(id); @@ -58,6 +59,7 @@ export const listExtensions = defineTool({ }, schema: {}, blockedByDialog: false, + verifyFilesSchema: [], handler: async (_request, response, _context) => { response.setListExtensions(); }, @@ -74,6 +76,7 @@ export const reloadExtension = defineTool({ id: zod.string().describe('ID of the extension to reload.'), }, blockedByDialog: false, + verifyFilesSchema: [], handler: async (request, response, context) => { const {id} = request.params; const extension = await context.getExtension(id); @@ -96,6 +99,7 @@ export const triggerExtensionAction = defineTool({ id: zod.string().describe('ID of the extension to trigger the action for.'), }, blockedByDialog: false, + verifyFilesSchema: [], handler: async (request, response, context) => { const {id} = request.params; await context.triggerExtensionAction(id); diff --git a/src/tools/input.ts b/src/tools/input.ts index 4f5ef97b9..ee4973437 100644 --- a/src/tools/input.ts +++ b/src/tools/input.ts @@ -103,6 +103,7 @@ export const click = definePageTool({ includeSnapshot: includeSnapshotSchema, }, blockedByDialog: true, + verifyFilesSchema: [], handler: async (request, response) => { const uid = request.params.uid; const handle = await request.page.getElementByUid(uid); @@ -154,6 +155,7 @@ export const clickAt = definePageTool({ includeSnapshot: includeSnapshotSchema, }, blockedByDialog: true, + verifyFilesSchema: [], handler: async (request, response) => { const page = request.page; const result = await page.waitForEventsAfterAction(async () => { @@ -189,6 +191,7 @@ export const hover = definePageTool({ includeSnapshot: includeSnapshotSchema, }, blockedByDialog: true, + verifyFilesSchema: [], handler: async (request, response) => { const uid = request.params.uid; const handle = await request.page.getElementByUid(uid); @@ -316,6 +319,7 @@ export const fill = definePageTool({ includeSnapshot: includeSnapshotSchema, }, blockedByDialog: true, + verifyFilesSchema: [], handler: async (request, response, context) => { const page = request.page; const result = await page.waitForEventsAfterAction(async () => { @@ -346,6 +350,7 @@ export const typeText = definePageTool({ submitKey: submitKeySchema, }, blockedByDialog: true, + verifyFilesSchema: [], handler: async (request, response) => { const page = request.page; const result = await page.waitForEventsAfterAction(async () => { @@ -376,6 +381,7 @@ export const drag = definePageTool({ includeSnapshot: includeSnapshotSchema, }, blockedByDialog: true, + verifyFilesSchema: [], handler: async (request, response) => { const fromHandle = await request.page.getElementByUid( request.params.from_uid, @@ -423,6 +429,7 @@ export const fillForm = definePageTool({ includeSnapshot: includeSnapshotSchema, }, blockedByDialog: true, + verifyFilesSchema: [], handler: async (request, response, context) => { const page = request.page; let lastResult: WaitForEventsResult = {}; @@ -512,6 +519,7 @@ export const pressKey = definePageTool({ includeSnapshot: includeSnapshotSchema, }, blockedByDialog: true, + verifyFilesSchema: [], handler: async (request, response) => { const page = request.page; const tokens = parseKey(request.params.key); diff --git a/src/tools/network.ts b/src/tools/network.ts index 97f098948..99d3710f4 100644 --- a/src/tools/network.ts +++ b/src/tools/network.ts @@ -71,6 +71,7 @@ export const listNetworkRequests = definePageTool({ ), }, blockedByDialog: false, + verifyFilesSchema: [], handler: async (request, response, context) => { const data = await request.page.getDevToolsData(); response.attachDevToolsData(data); diff --git a/src/tools/pages.ts b/src/tools/pages.ts index faaf5d9e8..9c501414f 100644 --- a/src/tools/pages.ts +++ b/src/tools/pages.ts @@ -85,6 +85,7 @@ export const listPages = defineTool(args => { }, schema: {}, blockedByDialog: false, + verifyFilesSchema: [], handler: async (_request, response) => { response.setIncludePages(true); response.setListThirdPartyDeveloperTools(); @@ -112,6 +113,7 @@ export const selectPage = defineTool({ .describe('Whether to focus the page and bring it to the top.'), }, blockedByDialog: false, + verifyFilesSchema: [], handler: async (request, response, context) => { const page = context.getPageById(request.params.pageId); context.selectPage(page); @@ -137,6 +139,7 @@ export const closePage = defineTool({ .describe('The ID of the page to close. Call list_pages to list pages.'), }, blockedByDialog: false, + verifyFilesSchema: [], handler: async (request, response, context) => { try { await context.closePage(request.params.pageId); @@ -189,6 +192,7 @@ export const newPage = defineTool(args => { ...timeoutSchema, }, blockedByDialog: false, + verifyFilesSchema: [], handler: async (request, response, context) => { const page = await context.newPage( request.params.background, @@ -256,6 +260,7 @@ export const navigatePage = definePageTool(args => { ...timeoutSchema, }, blockedByDialog: false, + verifyFilesSchema: [], handler: async (request, response) => { const page = request.page; const options = { @@ -391,6 +396,7 @@ export const resizePage = definePageTool({ height: zod.number().describe('Page height'), }, blockedByDialog: false, + verifyFilesSchema: [], handler: async (request, response, _context) => { const page = request.page; @@ -436,6 +442,7 @@ export const handleDialog = definePageTool({ .describe('Optional prompt text to enter into the dialog.'), }, blockedByDialog: false, + verifyFilesSchema: [], handler: async (request, response, _context) => { const page = request.page; const dialog = page.getDialog(); @@ -487,6 +494,7 @@ export const getTabId = definePageTool({ ), }, blockedByDialog: false, + verifyFilesSchema: [], handler: async (request, response, context) => { const page = context.getPageById(request.params.pageId); const tabId = (page.pptrPage as unknown as CdpPage)._tabId; diff --git a/src/tools/performance.ts b/src/tools/performance.ts index 1b2a95ed7..3526fae96 100644 --- a/src/tools/performance.ts +++ b/src/tools/performance.ts @@ -163,6 +163,7 @@ export const analyzeInsight = definePageTool({ ), }, blockedByDialog: false, + verifyFilesSchema: [], handler: async (request, response, context) => { const lastRecording = context.recordedTraces().at(-1); if (!lastRecording) { diff --git a/src/tools/screencast.ts b/src/tools/screencast.ts index 09a9ad108..96334c0e2 100644 --- a/src/tools/screencast.ts +++ b/src/tools/screencast.ts @@ -103,6 +103,7 @@ export const stopScreencast = definePageTool({ }, schema: {}, blockedByDialog: false, + verifyFilesSchema: [], handler: async (_request, response, context) => { const data = context.getScreenRecorder(); if (!data) { diff --git a/src/tools/slim/tools.ts b/src/tools/slim/tools.ts index c0132da19..a33e30272 100644 --- a/src/tools/slim/tools.ts +++ b/src/tools/slim/tools.ts @@ -19,6 +19,7 @@ export const screenshot = definePageTool({ }, schema: {}, blockedByDialog: true, + verifyFilesSchema: [], handler: async (request, response, context) => { const page = request.page; const screenshot = await page.pptrPage.screenshot({ @@ -44,6 +45,7 @@ export const navigate = definePageTool({ url: zod.string().describe('URL to navigate to'), }, blockedByDialog: false, + verifyFilesSchema: [], handler: async (request, response) => { const page = request.page; @@ -82,6 +84,7 @@ export const evaluate = definePageTool({ script: zod.string().describe(`JS script to run on the page`), }, blockedByDialog: true, + verifyFilesSchema: [], handler: async (request, response) => { const page = request.page; try { diff --git a/src/tools/snapshot.ts b/src/tools/snapshot.ts index 4a1cdd7ef..f3384d0ad 100644 --- a/src/tools/snapshot.ts +++ b/src/tools/snapshot.ts @@ -60,6 +60,7 @@ export const waitFor = definePageTool({ ...timeoutSchema, }, blockedByDialog: true, + verifyFilesSchema: [], handler: async (request, response, context) => { const page = request.page; await context.waitForTextOnPage( diff --git a/src/tools/thirdPartyDeveloper.ts b/src/tools/thirdPartyDeveloper.ts index c0cdd23a0..3a1ffb939 100644 --- a/src/tools/thirdPartyDeveloper.ts +++ b/src/tools/thirdPartyDeveloper.ts @@ -51,6 +51,7 @@ export const listThirdPartyDeveloperTools = definePageTool({ }, schema: {}, blockedByDialog: false, + verifyFilesSchema: [], handler: async (_request, response, _context) => { response.setListThirdPartyDeveloperTools(); }, @@ -71,6 +72,7 @@ export const executeThirdPartyDeveloperTool = definePageTool({ .describe('The JSON-stringified parameters to pass to the tool'), }, blockedByDialog: false, + verifyFilesSchema: [], handler: async (request, response) => { const toolName = request.params.toolName; let params: Record = {}; diff --git a/src/tools/webmcp.ts b/src/tools/webmcp.ts index 3655e554e..d352bd495 100644 --- a/src/tools/webmcp.ts +++ b/src/tools/webmcp.ts @@ -18,6 +18,7 @@ export const listWebMcpTools = definePageTool({ }, schema: {}, blockedByDialog: false, + verifyFilesSchema: [], handler: async (_request, response, _context) => { response.setListWebMcpTools(); }, @@ -38,6 +39,7 @@ export const executeWebMcpTool = definePageTool({ .describe('The JSON-stringified parameters to pass to the WebMCP tool'), }, blockedByDialog: false, + verifyFilesSchema: [], handler: async (request, response) => { const toolName = request.params.toolName; diff --git a/tests/ToolHandler.test.ts b/tests/ToolHandler.test.ts index b86516d41..868d2ec7a 100644 --- a/tests/ToolHandler.test.ts +++ b/tests/ToolHandler.test.ts @@ -37,6 +37,7 @@ describe('ToolHandler', () => { }, schema: {}, blockedByDialog: false, + verifyFilesSchema: [], pageScoped: true, handler: async () => { handlerCalled = true; @@ -78,6 +79,7 @@ describe('ToolHandler', () => { }, schema: {}, blockedByDialog: false, + verifyFilesSchema: [], handler: async () => { handlerCalled = true; }, @@ -120,6 +122,7 @@ describe('ToolHandler', () => { url: zod.string(), }, blockedByDialog: false, + verifyFilesSchema: [], handler: async () => { handlerCalled = true; }, @@ -167,6 +170,7 @@ describe('ToolHandler', () => { }, schema: {}, blockedByDialog: false, + verifyFilesSchema: [], handler: async () => { handlerCalled = true; }, diff --git a/tests/telemetry/metricsRegistry.test.ts b/tests/telemetry/metricsRegistry.test.ts index 53c335abb..afd415492 100644 --- a/tests/telemetry/metricsRegistry.test.ts +++ b/tests/telemetry/metricsRegistry.test.ts @@ -47,6 +47,7 @@ describe('metricsRegistry', () => { uid: zod.string(), // Should be blocked }, blockedByDialog: false, + verifyFilesSchema: [], handler: async () => { // no-op }, @@ -72,6 +73,7 @@ describe('metricsRegistry', () => { argEnum: zod.enum(['foo', 'bar']), }, blockedByDialog: false, + verifyFilesSchema: [], handler: async () => { // no-op }, @@ -93,6 +95,7 @@ describe('metricsRegistry', () => { }, schema: {}, blockedByDialog: false, + verifyFilesSchema: [], handler: async () => { // no-op },