import { jsonSchema } from 'ai';
import { zodToJsonSchema } from 'zod-to-json-schema';
export const createAgentInputSchema = (inputSchema) => {
    const agentJsonSchema = zodToJsonSchema(inputSchema, {
        $refStrategy: 'root',
        target: 'jsonSchema7',
    });
    return jsonSchema(agentJsonSchema, {
        validate: (value) => {
            const result = inputSchema.safeParse(value);
            if (result.success) {
                return { success: true, value: result.data };
            }
            return { success: false, error: result.error };
        },
    });
};
//# sourceMappingURL=agentInputSchema.js.map