"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.FlowSearchToolDefinition = exports.flowSearchToolResponseSchema = exports.flowSearchToolParamsSchema = 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.flowSearchToolParamsSchema = 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 flowSearchResultSchema = zod_1.z.object({
    task_description: zod_1.z.string(),
    flow_summaries: zod_1.z.array(schemas_js_1.flowInfoSchema),
});
/**
 * Response is a list of search results, each containing a task_description and its corresponding flow summaries
 */
exports.flowSearchToolResponseSchema = zod_1.z.object({
    search_results: zod_1.z.array(flowSearchResultSchema),
});
exports.FlowSearchToolDefinition = (0, toolDefinition_js_1.defineTool)({
    name: agentToolNames_js_1.AgentToolNames.FlowSearch,
    description: 'Search for flows by multiple tasks',
    argumentsSchema: exports.flowSearchToolParamsSchema,
    responseSchema: exports.flowSearchToolResponseSchema,
});
//# sourceMappingURL=FlowSearchDefinition.js.map