"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.addInternalTools = addInternalTools;
function addInternalTools(fns) {
    const callParallel = (fnsToCall) => {
        const promises = fnsToCall.map((param) => {
            const name = param.recipient_name.split(".").pop();
            const fn = fns[name];
            const args = Object.values(param.parameters);
            return fn(...args);
        });
        return Promise.all(promises);
    };
    fns["multi_tool_use.parallel"] = callParallel;
    return fns;
}
//# sourceMappingURL=addInternalTools.js.map