diff options
Diffstat (limited to 'packages/meshbay-client/src/preload.js')
| -rw-r--r-- | packages/meshbay-client/src/preload.js | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/packages/meshbay-client/src/preload.js b/packages/meshbay-client/src/preload.js index e3af68f..04dfe44 100644 --- a/packages/meshbay-client/src/preload.js +++ b/packages/meshbay-client/src/preload.js @@ -80,6 +80,16 @@ contextBridge.exposeInMainWorld('meshbay', { choose: () => ipcRenderer.invoke('root:choose'), }, + // The local node, if one is running. The renderer never sees the session + // token — it names an operation and the main process executes it, the same + // pattern as hub:fetch. + node: { + detect: () => ipcRenderer.invoke('node:detect'), + call: (method, path, body) => ipcRenderer.invoke('node:call', method, path, body), + pairingCode: () => ipcRenderer.invoke('node:pairing-code'), + setPairingCode: (code) => ipcRenderer.invoke('node:set-pairing-code', code), + }, + // A sink that writes to disk as chunks arrive, never a buffer handed over at // the end. `auto` uses the remembered folder without a dialog, which is what // "save automatically" means; without one, or when the person asked to be |