ipc
The primary IPC mechanism is a typed RPC system:
How it fires
How this agent gets triggered: by you, by Claude, or both.
- Fires itselfAuto-invocation. Claude auto-loads it when your prompt matches the work.Auto-invocation is when the right skill fires by itself at the right moment, driven by a FLOW.md router and a hook, instead of you invoking it by name. It is the difference between a skill being installed and a skill actually getting used.Read the full definition →
- You can call itInvoke it directly when you want it.
Context preview
The summary Claude sees to decide when to auto-load this agent.
The primary IPC mechanism is a typed RPC system:
Agent definition
ipc.mdIPC Conventions
RPC Pattern
The primary IPC mechanism is a typed RPC system:
- **Controllers**: `src/main/core/*/controller.ts` — define handler functions using `createRPCController`.
- **Router**: `src/main/rpc.ts` — assembles all controllers into a typed router using `createRPCRouter`.
- **Registration**: `registerRPCRouter(router, ipcMain)` in `src/main/index.ts` — auto-registers `namespace.method` channels.
- **Client**: `src/renderer/lib/ipc.ts` — creates a proxy-based typed client using `createRPCClient<RpcRouter>`.
// Main — src/main/core/example/controller.ts
import { createRPCController } from '@shared/ipc/rpc';
export const exampleController = createRPCController({
async doSomething(id: string) {
return await service.doSomething(id);
},
});
// Renderer — call via typed client
import { rpc } from '@renderer/lib/ipc';
const result = await rpc.example.doSomething('123');Preload Bridge
The preload bridge in `src/preload/index.ts` is intentionally tiny. It exposes only `invoke` (for the RPC client), `eventSend`/`eventOn` (for the typed event emitter), and `getPathForFile` on `window.electronAPI`. Add direct `window.electronAPI` surface only when a browser/Electron primitive cannot fit the RPC/event path.
Event System
Typed events use `createEventEmitter` from `src/shared/ipc/events.ts`. Event type definitions live in `src/shared/events/`.
Rules
- Prefer the RPC pattern for new IPC methods — add a handler to the appropriate controller.
- Keep the preload bridge small; do not add manual IPC channels casually.
- Keep the RPC router type (`RpcRouter`) importable by the renderer for type inference.
- Prefer existing service boundaries over adding logic directly inside controllers.
- Update tests when controller shape or IPC wiring changes.
Read more
IPC Conventions
RPC Pattern
The primary IPC mechanism is a typed RPC system:
- **Controllers**: `src/main/core/*/controller.ts` — define handler functions using `createRPCController`.
- **Router**: `src/main/rpc.ts` — assembles all controllers into a typed router using `createRPCRouter`.
- **Registration**: `registerRPCRouter(router, ipcMain)` in `src/main/index.ts` — auto-registers `namespace.method` channels.
- **Client**: `src/renderer/lib/ipc.ts` — creates a proxy-based typed client using `createRPCClient<RpcRouter>`.
// Main — src/main/core/example/controller.ts
import { createRPCController } from '@shared/ipc/rpc';
export const exampleController = createRPCController({
async doSomething(id: string) {
return await service.doSomething(id);
},
});
// Renderer — call via typed client
import { rpc } from '@renderer/lib/ipc';
const result = await rpc.example.doSomething('123');Preload Bridge
The preload bridge in `src/preload/index.ts` is intentionally tiny. It exposes only `invoke` (for the RPC client), `eventSend`/`eventOn` (for the typed event emitter), and `getPathForFile` on `window.electronAPI`. Add direct `window.electronAPI` surface only when a browser/Electron primitive cannot fit the RPC/event path.
Event System
Typed events use `createEventEmitter` from `src/shared/ipc/events.ts`. Event type definitions live in `src/shared/events/`.
Rules
- Prefer the RPC pattern for new IPC methods — add a handler to the appropriate controller.
- Keep the preload bridge small; do not add manual IPC channels casually.
- Keep the RPC router type (`RpcRouter`) importable by the renderer for type inference.
- Prefer existing service boundaries over adding logic directly inside controllers.
- Update tests when controller shape or IPC wiring changes.
Emdash is the Open-Source Agentic Development Environment (🧡 YC W26). Run multiple coding agents in parallel. Use any provider.
Repo: generalaction/emdash
Other agents on emdash.
- acp-runtime
The ACP runtime is the domain service that serves the ACP API contract. It owns the host-scoped dependencies needed to run provider ACP sessions, but it should not mix cross-session routing with per-session state projection.
Open agent - main-process
The main process is organized into domain modules under `src/main/core/`. Each domain typically has a `controller.ts` (RPC handlers) and service/implementation files.
Open agent - overview
All paths are relative to `apps/emdash-desktop/`.
Open agent - renderer
All paths are relative to `apps/emdash-desktop/`.
Open agent - shared
- Agent/provider DTOs: - `src/shared/core/agents/agent-payload.ts` - provider metadata and capabilities are sourced from `packages/plugins/src/agents/registry.ts` - IPC primitives: - `src/shared/ipc/rpc.ts` — typed RPC router, controller, and client - `src/shared/ipc/events.ts`
Open agent - workspace-server
The Workspace Server (`apps/workspace-server/`) is a Node daemon that runs on a remote machine and exposes workspace runtimes (git, files, deps, ACP, …) to Emdash clients over the `@emdash/wire` protocol. Clients connect over an SSH-forwarded Unix socket; the daemon is
Open agent

