import { z } from 'zod';
import { defineTool, } from '../toolDefinition.js';
export const executeEndTestArgumentsSchema = z.object({
    summary: z
        .string()
        .describe('A summary of the test that was created, including what was tested and the key validations performed.'),
});
export const executeEndTestResponseSchema = z.object({
    success: z.boolean(),
    message: z.string().optional(),
});
export const ExecuteEndTestToolDefinition = defineTool({
    name: 'execute_end_test',
    description: 'Declares that the test is complete. Use this tool when all tasks have been created and the test covers the intended functionality. This is a terminal action — calling this tool will finalize and save the test.',
    argumentsSchema: executeEndTestArgumentsSchema,
    responseSchema: executeEndTestResponseSchema,
    terminalConfirmation: 'STOP — execute_end_test is irreversible. Before calling it again, you MUST complete this checklist:\n\n' +
        '1. Call get_test_context and review the full step list\n' +
        '2. Verify every step group has at least one assertion (prefer execute_assert visual assertions)\n' +
        '3. Verify step groups are well-organized: each should represent a cohesive user action (e.g., "Search for product", "Complete checkout") and be reasonably sized (3-10 steps)\n' +
        '4. Use execute_move_steps to reorganize loose steps into step groups or split oversized groups\n' +
        '5. Ensure no hardcoded literal text that should be a variable — use {{@var}}, {{fake.*}}, {{alnum:N}}, or {{@app.defaults.username/password}} for credentials\n' +
        '6. Check that assertions use variables for dynamic values (capture first, then assert)\n' +
        '7. Delete any redundant, duplicate, or unnecessary steps with execute_delete_steps\n' +
        '8. Verify step group names are clear and action-oriented (not "Task 1" or "Step group")\n' +
        '9. Check that waits exist after navigations and async actions\n' +
        '10. Remove or fix any steps that will fail on cloud replay\n\n' +
        'Call execute_end_test again ONLY after completing this checklist. Do not explain — just do it.',
});
//# sourceMappingURL=ExecuteEndTestDefinition.js.map