"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.ExecuteVisitUrlToolDefinition = exports.executeVisitUrlResponseSchema = exports.executeVisitUrlArgumentsSchema = void 0;
var zod_1 = require("zod");
var toolDefinition_js_1 = require("../toolDefinition.js");
var agentToolNames_js_1 = require("../shared/agentToolNames.js");
exports.executeVisitUrlArgumentsSchema = zod_1.z.object({
    url: zod_1.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.
 */
exports.executeVisitUrlResponseSchema = zod_1.z.object({
    success: zod_1.z.boolean(),
    message: zod_1.z.string().optional(),
    // Context fields - client should include these after executing the action
    new_screenshot: zod_1.z.string().optional().meta({
        description: 'Base64-encoded PNG screenshot of the page after navigation',
    }),
    current_url: zod_1.z.string().optional().meta({
        description: 'The actual URL after navigation (may differ from requested due to redirects)',
    }),
});
exports.ExecuteVisitUrlToolDefinition = (0, toolDefinition_js_1.defineTool)({
    name: agentToolNames_js_1.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: exports.executeVisitUrlArgumentsSchema,
    responseSchema: exports.executeVisitUrlResponseSchema,
});
//# sourceMappingURL=ExecuteVisitUrlDefinition.js.map