mirror of
https://github.com/NousResearch/hermes-agent.git
synced 2026-11-17 04:11:35 +00:00
12 lines
615 B
TypeScript
12 lines
615 B
TypeScript
import { contextBridge, ipcRenderer } from 'electron'
|
|
|
|
// Deliberate fixture IPC only; the renderer still uses production gateway/WS code.
|
|
contextBridge.exposeInMainWorld('hermesDesktop', {
|
|
getConnection: (profile: string) => ipcRenderer.invoke('retirement-fixture:descriptor', profile),
|
|
getConnectionFor: ({ profile }: { profile: string }) => ipcRenderer.invoke('retirement-fixture:descriptor', profile)
|
|
})
|
|
contextBridge.exposeInMainWorld('retirementFixture', {
|
|
onRetiring: (handler: (key: string) => void) => {
|
|
ipcRenderer.on('retirement-fixture:retiring', (_event, key: string) => handler(key))
|
|
}
|
|
})
|