"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.getMCPToolsForDomain = getMCPToolsForDomain;
const types_1 = require("../types");
const truPulseTools_1 = require("./truPulseTools");
const securityConfigArgusTools_1 = require("./securityConfigArgusTools");
/**
 * Get tools for a domain - supports both direct REST and MCP modes
 */
async function getMCPToolsForDomain(domain, mcpClient) {
    // If MCP client is provided and initialized, use MCP tools
    if (mcpClient && mcpClient.hasInitialized) {
        try {
            const mcpTools = mcpClient.getAllTools();
            if (mcpTools && mcpTools.length > 0) {
                return mcpTools;
            }
        }
        catch (error) {
            // Fall back to direct tools if MCP fails
            console.warn('Failed to get MCP tools, falling back to direct tools:', error);
        }
    }
    // Fall back to direct REST tools
    switch (domain) {
        case types_1.ArgusDomain.SECURITY_CONFIG:
            return (0, securityConfigArgusTools_1.getSecurityConfigArgusTools)();
        case types_1.ArgusDomain.TRU_PULSE:
        case types_1.ArgusDomain.TRU_GUARD:
        case types_1.ArgusDomain.TRU_EVAL:
        case types_1.ArgusDomain.TRU_SCOUT:
            return (0, truPulseTools_1.getTruPulseTools)();
        default:
            return [];
    }
}
//# sourceMappingURL=toolRegistry.js.map