import { tool } from 'ai';
import { z } from 'zod';
export function createListWorkflowsTool(engine) {
    return tool({
        description: 'List workflows deployed in the active engine instance.',
        parameters: z.object({
            includeInactive: z.boolean().optional().default(true),
        }),
        execute: async ({ includeInactive }) => {
            const workflows = await engine.listWorkflows();
            return {
                workflows: includeInactive ? workflows : workflows.filter((workflow) => workflow.active),
            };
        },
    });
}
//# sourceMappingURL=list-workflows.js.map