import { z } from 'zod';
import { defineTool, } from '../toolDefinition.js';
import { AgentToolNames } from '../shared/agentToolNames.js';
export const executeCompleteTaskArgumentsSchema = z.object({
    summary: z.string().describe('A clear description of what was accomplished in this task and why it is now complete.'),
});
/**
 * Response schema for execute_complete_task tool.
 * The client should include information about the next task
 * to provide context for what to work on next without requiring a separate lookup.
 */
export const executeCompleteTaskResponseSchema = z.object({
    success: z.boolean(),
    message: z.string().optional(),
    // Context fields - client should include these after executing the action
    new_task_index: z.number().optional().meta({
        description: 'The 0-based index of the new current task after completion',
    }),
    new_task_description: z.string().optional().meta({
        description: 'The description of the new current task',
    }),
    has_more_tasks: z.boolean().optional().meta({
        description: 'Whether there are more tasks remaining in the test plan',
    }),
    new_screenshot: z.string().optional().meta({
        description: 'Base64-encoded PNG screenshot of the current page state',
    }),
});
export const ExecuteCompleteTaskToolDefinition = defineTool({
    name: AgentToolNames.ExecuteCompleteTask,
    description: 'Marks the current task as complete and signals to move on to the next task in the test plan. Use this tool when you have successfully completed all the actions required for the current task and the application is in the expected state to begin the next task. Calling this tool is required before you can start the next task. The client response will include details about the next task.',
    argumentsSchema: executeCompleteTaskArgumentsSchema,
    responseSchema: executeCompleteTaskResponseSchema,
});
//# sourceMappingURL=ExecuteCompleteTaskDefinition.js.map