"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.createAgentInputSchema = void 0;
const ai_1 = require("ai");
const zod_to_json_schema_1 = require("zod-to-json-schema");
const createAgentInputSchema = (inputSchema) => {
    const agentJsonSchema = (0, zod_to_json_schema_1.zodToJsonSchema)(inputSchema, {
        $refStrategy: 'root',
        target: 'jsonSchema7',
    });
    return (0, ai_1.jsonSchema)(agentJsonSchema, {
        validate: (value) => {
            const result = inputSchema.safeParse(value);
            if (result.success) {
                return { success: true, value: result.data };
            }
            return { success: false, error: result.error };
        },
    });
};
exports.createAgentInputSchema = createAgentInputSchema;
//# sourceMappingURL=agentInputSchema.js.map