MCPcopy Create free account
hub / github.com/UsefulSoftwareCo/executor / toDesktopServerConnection

Function toDesktopServerConnection

apps/desktop/src/main/index.ts:714–720  ·  view source on GitHub ↗
(conn: SidecarConnection)

Source from the content-addressed store, hash-verified

712// bearer header at the session layer (installBearerAuthHeader), so the token
713// never crosses the IPC boundary.
714const toDesktopServerConnection = (conn: SidecarConnection): DesktopServerConnection => ({
715 kind: "desktop-sidecar",
716 key: "desktop-sidecar",
717 origin: conn.baseUrl,
718 apiBaseUrl: `${conn.baseUrl.replace(/\/+$/, "")}/api`,
719 displayName: "Local Executor",
720});
721
722const registerIpcHandlers = () => {
723 ipcMain.handle("executor:server:connection", (): DesktopServerConnection | null =>

Callers 2

restartSidecarAndReloadFunction · 0.85
registerIpcHandlersFunction · 0.85

Calls 1

replaceMethod · 0.65

Tested by

no test coverage detected