vela-agent
v0.2.0
Published
Vela dev probe — a one-line require('vela-agent').attach() in an Electron main process that exposes IPC introspection + main-process eval to the Vela test framework (dev-only).
Maintainers
Readme
vela-agent
Vela Agent is a lightweight dev probe for Electron main processes.
A single attach() call in your main process registers IPC introspection and a main-process eval channel, giving the vela-mcp server the ability to call vela_ipc_list, vela_ipc_invoke, and vela_main_eval tools during development and testing.
Integration
Add one line at the top of your main.js / main.ts, before any ipcMain.handle calls:
if (process.env.NODE_ENV !== 'production') require('vela-agent').attach();That is the entire integration. The probe is:
- Dev-only — the
NODE_ENVguard means it is completely inert in production builds. - Environment/token-gated — the agent only activates when the Vela environment token is present, so it will not interfere with regular
npm startruns unless a Vela test session is active. - Zero runtime dependencies — nothing extra is bundled into your production app.
What it enables
| vela-mcp tool | Requires vela-agent |
|---------------|-------------------|
| vela_ipc_list | Yes — lists every registered ipcMain.handle channel |
| vela_ipc_invoke | Yes — calls a channel as if from a renderer |
| vela_main_eval | Yes — evaluates arbitrary JS in the main process |
All other Vela tools (CDP-based renderer eval, screenshot, debugger, specs, capture) work without vela-agent.
