IPC API reference
Status: This document specifies the intended Electron IPC surface for the planned Configuration Explorer (see Electron Config Explorer architecture). A matching preload/main implementation is not checked into this repository yet; farm/editor/ currently hosts Jest tests only.
When implemented, requests are expected to use ipcRenderer.invoke(channel, payload) with structured responses, and preload should expose window.electronAPI with methods that wrap allowed channels.
General Envelope
- Success:
{ success: true, payload } - Error:
{ success: false, error: string }
Channels
Config
config:loadreq{ filePath?: string, format?: 'json'|'yaml'|'toml' }→ payload{ config, metadata, filePath?, timestamp }config:savereq{ config, filePath?, format?, backup?, ifMatchMtime? }→ payload{ filePath, size, mtime, format, timestamp }config:exportreq{ config, format, filePath?, includeMetadata?, subsetPath?, paths? }→ payload{ filePath, content, size, format, timestamp }config:importreq{ filePath?, content?, format?, validate?, merge? }→ payload{ config, metadata, source, timestamp }config:validatereq{ config, partial?, rules? }→ payload{ isValid, errors, warnings, config, validationTime, timestamp }
Templates
config:template:loadreq{ templateName, category? }config:template:savereq{ template, config, overwrite? }config:template:deletereq{ templateName, category? }config:template:listreq{ category?, includeSystem?, includeUser? }
History
config:history:savereq{ history, currentIndex, maxEntries? }config:history:loadreq{ maxEntries?, since?, filter? }config:history:clearreq{}→ payload{ success: true, timestamp }
File System
fs:file:existsreq{ filePath }→ payload{ exists, isFile, isDirectory, size?, modified? }fs:file:readreq{ filePath, encoding?, options? }→ payload{ content, encoding, size, modified, mimeType }fs:file:writereq{ filePath, content, encoding?, options? }→ payload{ filePath, written, size, backupCreated?, backupPath? }fs:file:deletereq{ filePath, backup? }→ payload{ filePath, deleted, backupCreated?, backupPath? }fs:directory:readreq{ dirPath, recursive?, filter? }→ payload{ entries[], totalCount, fileCount, directoryCount }fs:directory:createreq{ dirPath, recursive?, mode? }→ payload{ dirPath, created, existing }fs:directory:deletereq{ dirPath, recursive?, backup? }→ payload{ dirPath, deleted, backupCreated?, backupPath? }
Dialogs
dialog:openreq{ ...options }→ Native file open dialog resultdialog:savereq{ ...options }→ Native file save dialog result
App/System
app:pingreq{}→ payload{ success, timestamp }app:settings:getreq{ keys?, category? }→ payload{ settings, timestamp }app:settings:setreq{ settings, category?, persist? }→ payload{ success, updatedKeys[], timestamp }app:version:getreq{}→ payload{ version, build, platform, arch, timestamp }app:path:getreq{ type }→ payload{ path, type, timestamp }system:info:getreq{}→ payload hardware and OS info
Events (preload on/once allowlist)
config:loaded,config:saved,config:validation:complete,validation:errorconfig:template:created,config:template:deleted,config:history:updatedfs:operation:complete
Security
- Preload allowlists channels for
invoke/sendand for events - Main restricts file access to: home, appData, userData, documents, desktop, downloads