import { z } from 'zod';
import { defineTool } from '../toolDefinition.js';
import { AgentToolNames } from './agentToolNames.js';
export const getOriginalTestPlanResponseSchema = z.object({
    plan_markdown: z.string().meta({
        description: 'The original test plan/outline as markdown, exactly as produced by the planning agent',
    }),
    test_information: z
        .object({
        name: z.string().optional(),
        description: z.string().optional(),
        test_case: z.string().optional(),
        deployment_id: z.string().optional(),
        application_id: z.string().optional(),
        environment_id: z.string().optional(),
        url_override: z.string().optional(),
        credentials_id: z.string().optional(),
        application_name: z.string().optional(),
        environment_name: z.string().optional(),
        deployment_url: z.string().optional(),
        credentials_name: z.string().optional(),
        viewport_width: z.number().optional(),
        viewport_height: 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: 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: z
        .array(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.',
    }),
});
export const GetOriginalTestPlanToolDefinition = defineTool({
    name: 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: z.object({}),
    responseSchema: getOriginalTestPlanResponseSchema,
});
//# sourceMappingURL=GetOriginalTestPlanDefinition.js.map