Orca is the place for working with a fleet of agents (e.g. Grok Bot, Claude Code). Run any coding agent with your own subscription. Available on desktop, mobile and remote runtime.
TypeScript adeagent-ideai-agentsautomationbotclaude-codecodexghosttygrok-bothermes-agentmobile-appmuseopenclawopencodeorchestrationpiruntimeterminalworktreesyc-backed
import { ipcRenderer } from 'electron'
import type { PluginFrameEntry } from '../../shared/plugins/frames/plugin-frame-bridge'
import type { PluginHostCallOutcome } from '../../shared/plugins/frames/plugin-protocol'
import type { PluginConsentRequest } from '../../shared/plugins/approval/plugin-consent-request'
import type { PluginChangeEvent } from '../../shared/plugins/events/plugin-change-event'
import type {
PluginAutoUpdateEvent,
PluginHostInstallResult,
PluginHostInstallSource,
PluginHostListEntry,
PluginHostLogLine,
PreloadApi
} from '../api-types'
export const pluginsApi = {
list: (): Promise<PluginHostListEntry[]> => ipcRenderer.invoke('plugins:list'),
listLanguagePacks: () => ipcRenderer.invoke('plugins:listLanguagePacks'),
listThemes: () => ipcRenderer.invoke('plugins:listThemes'),
listTerminalThemes: () => ipcRenderer.invoke('plugins:listTerminalThemes'),
listIconThemes: () => ipcRenderer.invoke('plugins:listIconThemes'),
loadIconTheme: (id) => ipcRenderer.invoke('plugins:loadIconTheme', id),
listSyntaxes: () => ipcRenderer.invoke('plugins:listSyntaxes'),
loadSyntax: (id) => ipcRenderer.invoke('plugins:loadSyntax', id),
consent: (args: PluginConsentRequest): Promise<PluginHostListEntry[]> =>
ipcRenderer.invoke('plugins:consent', args),
setEnabled: (args: { pluginKey: string; enabled: boolean }): Promise<PluginHostListEntry[]> =>
ipcRenderer.invoke('plugins:setEnabled', args),
readPanelEntry: (args: {
pluginKey: string
panelId: string
}): Promise<PluginFrameEntry | null> => ipcRenderer.invoke('plugins:readPanelEntry', args),
readCustomEditorEntry: (args: {
pluginKey: string
editorId: string
}): Promise<PluginFrameEntry | null> => ipcRenderer.invoke('plugins:readCustomEditorEntry', args),
readNewFileTemplate: (args: { pluginKey: string; newFileId: string }): Promise<string | null> =>
ipcRenderer.invoke('plugins:readNewFileTemplate', args),
invokeCommand: (args: { pluginKey: string; commandId: string; args?: unknown }) =>
ipcRenderer.invoke('plugins:invokeCommand', args),
panelAction: (args: {
sessionToken: string
action: string
params?: unknown
}): Promise<PluginHostCallOutcome> => ipcRenderer.invoke('plugins:panelAction', args),
install: (source: PluginHostInstallSource): Promise<PluginHostInstallResult> =>
ipcRenderer.invoke('plugins:install', source),
listMarketplaces: () => ipcRenderer.invoke('plugins:listMarketplaces'),
addMarketplace: (source) => ipcRenderer.invoke('plugins:addMarketplace', source),
removeMarketplace: (args) => ipcRenderer.invoke('plugins:removeMarketplace', args),
refreshMarketplaces: (args = {}) => ipcRenderer.invoke('plugins:refreshMarketplaces', args),
listMarketplacePlugins: () => ipcRenderer.invoke('plugins:listMarketplacePlugins'),
suggestForFileType: (fileType, purpose) =>
ipcRenderer.invoke('plugins:suggestForFileType', fileType, purpose),
previewMarketplacePlugin: (args) => ipcRenderer.invoke('plugins:previewMarketplacePlugin', args),
installMarketplacePlugin: (preview) =>
ipcRenderer.invoke('plugins:installMarketplacePlugin', preview),
previewMarketplaceUpdate: (args) => ipcRenderer.invoke('plugins:previewMarketplaceUpdate', args),
rollbackMarketplacePlugin: (args) =>
ipcRenderer.invoke('plugins:rollbackMarketplacePlugin', args),
getRollbackVersion: (args) => ipcRenderer.invoke('plugins:getRollbackVersion', args),
getInstalledManifest: (args) => ipcRenderer.invoke('plugins:getInstalledManifest', args),
remove: (args: { pluginKey: string }): Promise<PluginHostListEntry[]> =>
ipcRenderer.invoke('plugins:remove', args),
getLogs: (args: { pluginKey: string }): Promise<PluginHostLogLine[]> =>
ipcRenderer.invoke('plugins:getLogs', args),
refresh: (): Promise<PluginHostListEntry[]> => ipcRenderer.invoke('plugins:refresh'),
onChanged: (callback): (() => void) => {
const listener = (_event: Electron.IpcRendererEvent, change: PluginChangeEvent): void =>
callback(change)
ipcRenderer.on('plugins:changed', listener)
return () => {
ipcRenderer.removeListener('plugins:changed', listener)
}
},
getAutoUpdateState: () => ipcRenderer.invoke('plugins:getAutoUpdateState'),
onAutoUpdateChanged: (callback): (() => void) => {
const listener = (_event: Electron.IpcRendererEvent, change: PluginAutoUpdateEvent): void =>
callback(change)
ipcRenderer.on('plugins:autoUpdateChanged', listener)
return () => {
ipcRenderer.removeListener('plugins:autoUpdateChanged', listener)
}
}
} satisfies PreloadApi['plugins']