"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.ExecuteAssertToolDefinition = exports.executeAssertResponseSchema = exports.executeAssertArgumentsSchema = void 0;
var zod_1 = require("zod");
var toolDefinition_js_1 = require("../toolDefinition.js");
var agentToolNames_js_1 = require("../shared/agentToolNames.js");
exports.executeAssertArgumentsSchema = zod_1.z.object({
    assertionDescription: zod_1.z.string().meta({
        description: 'A clear description of exactly what needs to be verified, including variables if needed with the syntax {{@variableName}}',
    }),
    conditionalType: zod_1.z.enum(['IF', 'ELSEIF']).optional().meta({
        description: "When set, records this assertion as a conditional branch instead of a plain assertion. Use 'IF' to open a new conditional block (first condition only). Use 'ELSEIF' for every subsequent branch condition within the same block (after IF or another ELSEIF).",
    }),
});
exports.executeAssertResponseSchema = zod_1.z.object({
    success: zod_1.z.boolean(),
    message: zod_1.z.string().optional(),
});
exports.ExecuteAssertToolDefinition = (0, toolDefinition_js_1.defineTool)({
    name: agentToolNames_js_1.AgentToolNames.ExecuteAssert,
    description: 'Verifies that a visual part of the application is in the expected state based on the screenshot. Use this for complex assertions involving multiple elements, dynamic text, images, or layout validation. The assertionDescription parameter should be a clear description of exactly what needs to be verified, including variables if needed with the syntax {{@variableName}}. This tool evaluates the assertion by looking at the screenshot only - it cannot run code and does not have access to DOM or URL information. To open a conditional block instead of asserting, set conditionalType="IF" (first condition in a block) or conditionalType="ELSEIF" (subsequent branch).',
    argumentsSchema: exports.executeAssertArgumentsSchema,
    responseSchema: exports.executeAssertResponseSchema,
});
//# sourceMappingURL=ExecuteAssertDefinition.js.map