"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.TestChunksSearchToolDefinition = exports.testChunksSearchToolResponseSchema = exports.testChunksSearchToolParamsSchema = void 0;
var zod_1 = require("zod");
var toolDefinition_js_1 = require("../toolDefinition.js");
var agentToolNames_js_1 = require("./agentToolNames.js");
exports.testChunksSearchToolParamsSchema = zod_1.z.object({
    task_descriptions: zod_1.z.array(zod_1.z.string()),
});
var testStepChunkMatchSchema = zod_1.z.object({
    annotated_step_descriptions: zod_1.z.string().meta({
        description: 'Detailed description of the steps in this chunk',
    }),
    context: zod_1.z.string().meta({
        description: 'A brief summary of what this chunk does',
    }),
});
var testChunksSearchResultSchema = zod_1.z.object({
    task_description: zod_1.z.string().meta({
        description: 'The task description that was searched for',
    }),
    test_chunk_summaries: zod_1.z.array(testStepChunkMatchSchema).meta({
        description: 'The test chunk summaries that were found',
    }),
});
/**
 * Response is a list of search results, each containing a task_description and its corresponding test chunk summaries
 */
exports.testChunksSearchToolResponseSchema = zod_1.z.object({
    search_results: zod_1.z.array(testChunksSearchResultSchema),
});
exports.TestChunksSearchToolDefinition = (0, toolDefinition_js_1.defineTool)({
    name: agentToolNames_js_1.AgentToolNames.TestChunksSearch,
    description: 'Search for test chunks by multiple tasks. This will return chunks of test steps from other tests that are similar to the searched-for tasks, and can be used to learn how to accomplish similar tasks.',
    argumentsSchema: exports.testChunksSearchToolParamsSchema,
    responseSchema: exports.testChunksSearchToolResponseSchema,
});
//# sourceMappingURL=TestChunksSearchDefinition.js.map