"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.BASE_TAGS = void 0;
exports.loadTriageTools = loadTriageTools;
exports.callTriageTool = callTriageTool;
const tool_executor_1 = require("../../workflows/shared/tool-executor");
const tool_loader_1 = require("../../workflows/shared/tool-loader");
const cache_1 = require("./cache");
/** Base tags always included — triage always needs DB + compiled workflows */
exports.BASE_TAGS = ['workflows', 'compiled', 'database'];
async function loadTriageTools(tags) {
    return (0, tool_loader_1.loadToolsFromServers)(tags, { toolServerMap: cache_1.toolServerMap, toolDefCache: cache_1.toolDefCache }, {
        baseTags: exports.BASE_TAGS,
        logPrefix: 'mcpTriage',
    });
}
async function callTriageTool(qualifiedName, args) {
    return (0, tool_executor_1.callTool)(qualifiedName, args, { toolServerMap: cache_1.toolServerMap, yamlWorkflowMap: cache_1.yamlWorkflowMap });
}
