import { z } from 'zod';
import { defineTool, } from '../toolDefinition.js';
export const executeSetCookieArgumentsSchema = z.object({
    name: z.string().meta({
        description: 'The name of the cookie to set.',
    }),
    value: z.string().meta({
        description: 'The value to assign to the cookie.',
    }),
    domain: z.string().optional().meta({
        description: 'The domain for which the cookie is valid (e.g., "example.com"). If omitted, the cookie applies to the current domain.',
    }),
    path: z.string().optional().meta({
        description: 'The URL path for which the cookie is valid (e.g., "/"). If omitted, defaults to the current path.',
    }),
    secure: z.boolean().optional().meta({
        description: 'Whether the cookie should only be transmitted over HTTPS.',
    }),
    httpOnly: z.boolean().optional().meta({
        description: 'Whether the cookie should be inaccessible to JavaScript (HTTP-only). Use this for security-sensitive cookies.',
    }),
    sameSite: z.enum(['Strict', 'Lax', 'None']).optional().meta({
        description: 'The SameSite attribute controlling cross-site cookie behavior. "Strict" blocks all cross-site requests, "Lax" allows top-level navigation, "None" allows all cross-site requests (requires Secure).',
    }),
    expires: z.number().optional().meta({
        description: 'The cookie expiry time in seconds from now. If omitted, the cookie is a session cookie and will be cleared when the browser is closed.',
    }),
    url: z.string().optional().meta({
        description: 'The URL to associate the cookie with. Use this to set cookies for a specific URL rather than the current page URL.',
    }),
});
export const executeSetCookieResponseSchema = z.object({
    success: z.boolean(),
    message: z.string().optional(),
});
export const ExecuteSetCookieToolDefinition = defineTool({
    name: 'execute_set_cookie',
    description: 'Sets a browser cookie with the specified name and value. Use this when the test needs to establish session state, set authentication tokens, or configure cookies before navigating to a page. Only name and value are required; all other options are optional.',
    argumentsSchema: executeSetCookieArgumentsSchema,
    responseSchema: executeSetCookieResponseSchema,
});
//# sourceMappingURL=ExecuteSetCookieDefinition.js.map