"use strict";var n=require("electron");n.contextBridge.exposeInMainWorld("desktopApi",{send:(e,o)=>{["setMenu","locale","appConfig","pluginsLoaded","run-command","plugin-manager","request-backend-token","request-plugin-permission-secrets","open-plugin-folder","request-backend-port","cluster-changed"].includes(e)&&n.ipcRenderer.send(e,o)},receive:(e,o)=>{["currentMenu","setMenu","locale","appConfig","command-stdout","command-stderr","command-exit","plugin-manager","backend-token","plugin-permission-secrets","open-about-dialog","backend-port"].includes(e)&&n.ipcRenderer.on(e,(s,...i)=>o(...i))},removeListener:(e,o)=>{n.ipcRenderer.removeListener(e,o)},mcp:{executeTool:(e,o,t)=>n.ipcRenderer.invoke("mcp-execute-tool",{toolName:e,args:o,toolCallId:t}),getStatus:()=>n.ipcRenderer.invoke("mcp-get-status"),resetClient:()=>n.ipcRenderer.invoke("mcp-reset-client"),getConfig:()=>n.ipcRenderer.invoke("mcp-get-config"),updateConfig:e=>n.ipcRenderer.invoke("mcp-update-config",e),getToolsConfig:()=>n.ipcRenderer.invoke("mcp-get-tools-config"),updateToolsConfig:e=>n.ipcRenderer.invoke("mcp-update-tools-config",e),setToolEnabled:(e,o,t)=>n.ipcRenderer.invoke("mcp-set-tool-enabled",{serverName:e,toolName:o,enabled:t}),getToolStats:(e,o)=>n.ipcRenderer.invoke("mcp-get-tool-stats",{serverName:e,toolName:o}),clusterChange:e=>n.ipcRenderer.invoke("mcp-cluster-change",{cluster:e})},notifyClusterChange:e=>{n.ipcRenderer.send("cluster-changed",e)}});
