"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.GetOriginalTestPlanToolDefinition = exports.getOriginalTestPlanResponseSchema = void 0;
var zod_1 = require("zod");
var toolDefinition_js_1 = require("../toolDefinition.js");
var agentToolNames_js_1 = require("./agentToolNames.js");
exports.getOriginalTestPlanResponseSchema = zod_1.z.object({
    plan_markdown: zod_1.z.string().meta({
        description: 'The original test plan/outline as markdown, exactly as produced by the planning agent',
    }),
    test_information: zod_1.z
        .object({
        name: zod_1.z.string().optional(),
        description: zod_1.z.string().optional(),
        test_case: zod_1.z.string().optional(),
        deployment_id: zod_1.z.string().optional(),
        application_id: zod_1.z.string().optional(),
        environment_id: zod_1.z.string().optional(),
        url_override: zod_1.z.string().optional(),
        credentials_id: zod_1.z.string().optional(),
        application_name: zod_1.z.string().optional(),
        environment_name: zod_1.z.string().optional(),
        deployment_url: zod_1.z.string().optional(),
        credentials_name: zod_1.z.string().optional(),
        viewport_width: zod_1.z.number().optional(),
        viewport_height: zod_1.z.number().optional(),
    })
        .meta({
        description: 'The structured test information from planning, including both IDs and resolved human-readable names for deployments, applications, environments, and credentials',
    }),
    planning_conversation: zod_1.z
        .string()
        .optional()
        .meta({
        description: 'The full planning conversation between the user and the planning agent. ' +
            'Contains clarifications, decisions, and scope refinements that may not be captured in the outline alone. ' +
            'Read this when the outline is missing or unclear about specifics the user discussed during planning.',
    }),
    reference_test_ids: zod_1.z
        .array(zod_1.z.string())
        .optional()
        .meta({
        description: 'Test IDs the user selected as references during planning. ' +
            'Use get_test_definition to study these tests — they represent examples the user wants the new test to be modeled after.',
    }),
});
exports.GetOriginalTestPlanToolDefinition = (0, toolDefinition_js_1.defineTool)({
    name: agentToolNames_js_1.AgentToolNames.GetOriginalTestPlan,
    description: 'Retrieve the original test plan and test information as produced during planning. ' +
        'This is a read-only snapshot that cannot be modified — use it to recover the plan if the working copy in agent files was corrupted or overwritten. ' +
        'Returns empty plan_markdown when no plan was created during planning — this is normal (the user may have skipped planning or gone straight to generation). ' +
        'When empty, create your own plan based on the test information instead.',
    argumentsSchema: zod_1.z.object({}),
    responseSchema: exports.getOriginalTestPlanResponseSchema,
});
//# sourceMappingURL=GetOriginalTestPlanDefinition.js.map