"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.getSessionManager = getSessionManager;
exports.setSessionManager = setSessionManager;
exports.getJobScheduler = getJobScheduler;
exports.setJobScheduler = setJobScheduler;
exports.getTerminalManager = getTerminalManager;
exports.setTerminalManager = setTerminalManager;
exports.getHookRouter = getHookRouter;
exports.setHookRouter = setHookRouter;
exports.getCockpitMcp = getCockpitMcp;
exports.setCockpitMcp = setCockpitMcp;
const session_manager_1 = require("./session-manager");
const smKey = "__cockpit_session_manager__";
const jsKey = "__cockpit_job_scheduler__";
const tmKey = "__cockpit_terminal_manager__";
const hrKey = "__cockpit_hook_router__";
const mcpKey = "__cockpit_mcp__";
function getSessionManager() {
    const g = globalThis;
    if (!g[smKey]) {
        g[smKey] = new session_manager_1.SessionManager();
    }
    return g[smKey];
}
function setSessionManager(manager) {
    globalThis[smKey] = manager;
}
function getJobScheduler() {
    return globalThis[jsKey] || null;
}
function setJobScheduler(scheduler) {
    globalThis[jsKey] = scheduler;
}
function getTerminalManager() {
    return globalThis[tmKey] || null;
}
function setTerminalManager(manager) {
    globalThis[tmKey] = manager;
}
function getHookRouter() {
    return globalThis[hrKey] || null;
}
function setHookRouter(router) {
    globalThis[hrKey] = router;
}
function getCockpitMcp() {
    return globalThis[mcpKey] || null;
}
function setCockpitMcp(server) {
    globalThis[mcpKey] = server;
}
