import { OperatingModeManager, getOperatingModeManager } from './operating-modes.js';
export class AgentModeManager {
    modeManager;
    constructor() {
        this.modeManager = getOperatingModeManager();
    }
    getMode() {
        return this.modeManager.getMode();
    }
    setMode(mode) {
        this.modeManager.setMode(mode);
    }
    getModeConfig() {
        return this.modeManager.getModeConfig();
    }
    isToolAllowed(toolName) {
        return this.modeManager.isToolAllowed(toolName);
    }
    getSystemPromptAddition() {
        return this.modeManager.getSystemPromptAddition();
    }
    onModeChange(listener) {
        const wrapper = (data) => listener(data.newMode);
        this.modeManager.on('mode:changed', wrapper);
        return () => {
            this.modeManager.off('mode:changed', wrapper);
        };
    }
    formatModeStatus() {
        return this.modeManager.formatModeStatus();
    }
    static getModeHelp() {
        return OperatingModeManager.getModeHelp();
    }
}
// Singleton instance
let modeManagerInstance = null;
export function getAgentModeManager() {
    if (!modeManagerInstance) {
        modeManagerInstance = new AgentModeManager();
    }
    return modeManagerInstance;
}
//# sourceMappingURL=agent-mode.js.map