import { z } from 'zod';
import { defineTool, } from '../toolDefinition.js';
import { AgentToolNames } from './agentToolNames.js';
import { flowInfoSchema } from './schemas.js';
const MAX_TASK_DESCRIPTIONS = 10;
export const flowSearchToolParamsSchema = z.object({
    task_descriptions: z.array(z.string()).meta({
        description: `List of task descriptions to search for. Maximum of ${MAX_TASK_DESCRIPTIONS} task descriptions will be processed. If more are provided, only the first ${MAX_TASK_DESCRIPTIONS} will be used.`,
    }),
});
const flowSearchResultSchema = z.object({
    task_description: z.string(),
    flow_summaries: z.array(flowInfoSchema),
});
/**
 * Response is a list of search results, each containing a task_description and its corresponding flow summaries
 */
export const flowSearchToolResponseSchema = z.object({
    search_results: z.array(flowSearchResultSchema),
});
export const FlowSearchToolDefinition = defineTool({
    name: AgentToolNames.FlowSearch,
    description: 'Search for flows by multiple tasks',
    argumentsSchema: flowSearchToolParamsSchema,
    responseSchema: flowSearchToolResponseSchema,
});
//# sourceMappingURL=FlowSearchDefinition.js.map