"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.SnippetSearchToolDefinition = exports.snippetSearchToolResponseSchema = exports.snippetSearchToolParamsSchema = void 0;
var zod_1 = require("zod");
var toolDefinition_js_1 = require("../toolDefinition.js");
var agentToolNames_js_1 = require("./agentToolNames.js");
var schemas_js_1 = require("./schemas.js");
var MAX_TASK_DESCRIPTIONS = 10;
exports.snippetSearchToolParamsSchema = zod_1.z.object({
    task_descriptions: zod_1.z.array(zod_1.z.string()).meta({
        description: "List of task descriptions to search for. Maximum of ".concat(MAX_TASK_DESCRIPTIONS, " task descriptions will be processed. If more are provided, only the first ").concat(MAX_TASK_DESCRIPTIONS, " will be used."),
    }),
});
var snippetSearchResultSchema = zod_1.z.object({
    task_description: zod_1.z.string(),
    snippet_summaries: zod_1.z.array(schemas_js_1.snippetInfoSchema),
});
/**
 * Response is a list of search results, each containing a task_description and its corresponding snippet summaries
 */
exports.snippetSearchToolResponseSchema = zod_1.z.object({
    search_results: zod_1.z.array(snippetSearchResultSchema),
});
exports.SnippetSearchToolDefinition = (0, toolDefinition_js_1.defineTool)({
    name: agentToolNames_js_1.AgentToolNames.SnippetSearch,
    description: 'Search for snippets by multiple tasks',
    argumentsSchema: exports.snippetSearchToolParamsSchema,
    responseSchema: exports.snippetSearchToolResponseSchema,
});
//# sourceMappingURL=SnippetSearchDefinition.js.map