"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.register = register;
const zod_1 = require("zod");
function register(server, mgr) {
    server.registerTool('skills_bump_usage', {
        description: 'Record that a skill was used. Increments usageCount and updates lastUsedAt timestamp. ' +
            'Call this after successfully applying a skill.',
        inputSchema: {
            skillId: zod_1.z.string().min(1).max(500).describe('Skill ID to bump usage for'),
        },
    }, async ({ skillId }) => {
        const ok = mgr.bumpUsage(skillId);
        if (!ok) {
            return { content: [{ type: 'text', text: 'Skill not found' }], isError: true };
        }
        return { content: [{ type: 'text', text: JSON.stringify({ skillId, bumped: true }, null, 2) }] };
    });
}
