import { z } from 'zod';
import { defineTool, } from '../toolDefinition.js';
const ACCESSIBILITY_SEVERITIES = ['critical', 'serious', 'moderate', 'minor'];
export const executeAccessibilityCheckArgumentsSchema = z.object({
    fail_on_severity: z
        .enum(ACCESSIBILITY_SEVERITIES)
        .optional()
        .meta({
        description: 'Optional minimum violation severity that will cause the test to fail at runtime. ' +
            '**Default: omit this field** unless the user has explicitly asked the test to fail ' +
            'on accessibility issues. An omitted field records a non-blocking informational check ' +
            '— violations appear in the run report without breaking the test, which is the right ' +
            'behavior for most prompts (including ones that say "check accessibility", "run axe", ' +
            '"scan for WCAG issues", or "verify compliance"). Only set a value when the user ' +
            'explicitly asks for a gate ("fail the test if there are critical issues", "block on ' +
            "serious a11y bugs\"); 'critical' is the usual choice. Matches axe-core severity taxonomy.",
    }),
    disabled_rules: z
        .array(z.string())
        .max(50)
        .optional()
        .meta({
        description: 'Optional list of axe-core rule IDs to disable for this check. Use sparingly ' +
            'and only when the page legitimately violates the rule in a way that is not actionable. ' +
            'Examples: ["document-title"] to skip the page-title rule; ["html-has-lang"] to skip ' +
            'the lang-attribute rule. Full rule list: https://github.com/dequelabs/axe-core/blob/develop/doc/rule-descriptions.md',
    }),
    tags: z
        .array(z.string())
        .max(20)
        .optional()
        .meta({
        description: 'Optional axe-core tag filter. Only rules bearing one of these tags will run. ' +
            "Defaults to axe-core's default tag set (covers common WCAG levels). " +
            'Leave unset unless the user asks for a specific compliance level, in which case ' +
            'pass the axe-core tag names they requested (e.g., wcag2aa, wcag21aa).',
    }),
});
export const executeAccessibilityCheckResponseSchema = z.object({
    success: z.boolean(),
    message: z.string().optional(),
});
export const ExecuteAccessibilityCheckToolDefinition = defineTool({
    name: 'execute_accessibility_check',
    description: 'Records and runs an accessibility check against the current page using axe-core. ' +
        'Use when the user asks to check a11y, accessibility, run axe, or verify WCAG compliance. ' +
        'The check step itself IS the compliance verification — do not add follow-up assertions ' +
        'or step groups to verify it. Fetch the `accessibility-checks` skill first for ' +
        'severity/tag/rule choices and how to interpret the scan result.',
    argumentsSchema: executeAccessibilityCheckArgumentsSchema,
    responseSchema: executeAccessibilityCheckResponseSchema,
});
//# sourceMappingURL=ExecuteAccessibilityCheckDefinition.js.map