import { z } from 'zod';
import { defineTool, } from '../toolDefinition.js';
import { AgentToolNames } from '../shared/agentToolNames.js';
export const executeVisitUrlArgumentsSchema = z.object({
    url: z.string().meta({
        description: 'The URL to navigate to. Should be a fully qualified URL (e.g., https://example.com) or a relative path (e.g., /dashboard). Can include variables using {{@variableName}} syntax. Do not use to reload the current page; use execute_navigate with navigation_type "reload" instead.',
    }),
});
/**
 * Response schema for execute_visit_url tool.
 * The client should include the new screenshot and current URL after navigation
 * to show the new page state.
 */
export const executeVisitUrlResponseSchema = z.object({
    success: z.boolean(),
    message: z.string().optional(),
    // Context fields - client should include these after executing the action
    new_screenshot: z.string().optional().meta({
        description: 'Base64-encoded PNG screenshot of the page after navigation',
    }),
    current_url: z.string().optional().meta({
        description: 'The actual URL after navigation (may differ from requested due to redirects)',
    }),
});
export const ExecuteVisitUrlToolDefinition = defineTool({
    name: AgentToolNames.ExecuteVisitUrl,
    description: 'Navigates to a specific URL. The url parameter should be a fully qualified URL (including protocol like https://) or a relative URL path. This tool is used to navigate to different pages or external websites during test execution. Variables can be used in the URL using the syntax {{@variableName}}. The client response will include a new screenshot of the destination page. Do not use to reload the current page',
    argumentsSchema: executeVisitUrlArgumentsSchema,
    responseSchema: executeVisitUrlResponseSchema,
});
//# sourceMappingURL=ExecuteVisitUrlDefinition.js.map