"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.ExecuteCompleteTaskToolDefinition = exports.executeCompleteTaskResponseSchema = exports.executeCompleteTaskArgumentsSchema = void 0;
var zod_1 = require("zod");
var toolDefinition_js_1 = require("../toolDefinition.js");
var agentToolNames_js_1 = require("../shared/agentToolNames.js");
exports.executeCompleteTaskArgumentsSchema = zod_1.z.object({
    summary: zod_1.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.
 */
exports.executeCompleteTaskResponseSchema = zod_1.z.object({
    success: zod_1.z.boolean(),
    message: zod_1.z.string().optional(),
    // Context fields - client should include these after executing the action
    new_task_index: zod_1.z.number().optional().meta({
        description: 'The 0-based index of the new current task after completion',
    }),
    new_task_description: zod_1.z.string().optional().meta({
        description: 'The description of the new current task',
    }),
    has_more_tasks: zod_1.z.boolean().optional().meta({
        description: 'Whether there are more tasks remaining in the test plan',
    }),
    new_screenshot: zod_1.z.string().optional().meta({
        description: 'Base64-encoded PNG screenshot of the current page state',
    }),
});
exports.ExecuteCompleteTaskToolDefinition = (0, toolDefinition_js_1.defineTool)({
    name: agentToolNames_js_1.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: exports.executeCompleteTaskArgumentsSchema,
    responseSchema: exports.executeCompleteTaskResponseSchema,
});
//# sourceMappingURL=ExecuteCompleteTaskDefinition.js.map