import { z } from 'zod';
import { defineTool, } from '../toolDefinition.js';
import { AgentToolNames } from '../shared/agentToolNames.js';
export const executeAssertArgumentsSchema = z.object({
    assertionDescription: z.string().meta({
        description: 'A clear description of exactly what needs to be verified, including variables if needed with the syntax {{@variableName}}',
    }),
    conditionalType: 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).",
    }),
});
export const executeAssertResponseSchema = z.object({
    success: z.boolean(),
    message: z.string().optional(),
});
export const ExecuteAssertToolDefinition = defineTool({
    name: 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: executeAssertArgumentsSchema,
    responseSchema: executeAssertResponseSchema,
});
//# sourceMappingURL=ExecuteAssertDefinition.js.map