"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.fetchSkillsResponseSchema = exports.fetchSkillsResponseItemSchema = exports.fetchSkillsParamsSchema = void 0;
exports.createFetchSkillsToolDefinition = createFetchSkillsToolDefinition;
var zod_1 = require("zod");
var toolDefinition_js_1 = require("../toolDefinition.js");
var agentToolNames_js_1 = require("../shared/agentToolNames.js");
exports.fetchSkillsParamsSchema = zod_1.z.object({
    skill_names: zod_1.z
        .array(zod_1.z.string())
        .min(1)
        .meta({
        description: 'Exact names of the skills to fetch (matched literally, not by semantic search). ' +
            'Names MUST be from the list of available skills shown in this tool description — copy them verbatim. ' +
            'Pass multiple names in one call to fetch several skills at once instead of making separate calls.',
    }),
});
exports.fetchSkillsResponseItemSchema = zod_1.z.object({
    skill_name: zod_1.z.string().meta({
        description: 'The name of the fetched skill',
    }),
    skill_title: zod_1.z.string().meta({
        description: 'The title of the skill',
    }),
    skill_instructions: zod_1.z.string().meta({
        description: 'The detailed instructions for using the skill',
    }),
});
exports.fetchSkillsResponseSchema = zod_1.z.object({
    skills: zod_1.z.array(exports.fetchSkillsResponseItemSchema).meta({
        description: 'The fetched skills, in the same order as the input skill_names.',
    }),
    unknown_skill_names: zod_1.z.array(zod_1.z.string()).meta({
        description: 'Names from the input that did not match any registered skill. Empty when all names resolved. ' +
            'When non-empty, double-check spelling against the available skills list — names use underscores, not hyphens.',
    }),
});
/**
 * Creates a FetchSkills tool definition with the given description.
 * The description is dynamic based on registered skills, so we export
 * a factory function rather than a static definition.
 */
function createFetchSkillsToolDefinition(description) {
    return (0, toolDefinition_js_1.defineTool)({
        name: agentToolNames_js_1.AgentToolNames.FetchSkills,
        description: description,
        argumentsSchema: exports.fetchSkillsParamsSchema,
        responseSchema: exports.fetchSkillsResponseSchema,
    });
}
//# sourceMappingURL=FetchSkillsDefinition.js.map