app, the call site is rpc.app.<service>.<method>(...). Core’s own services live under rpc.core.<service>.
Type inference
TypeScript types flow from the service definition to the renderer call site. Parameters, return types, and method names are all inferred. Types are generated byzen link (runs automatically during zen dev) and stored in .zenbu/types/, so if you rename a method or change its signature, the renderer code shows a type error immediately.
Async
All RPC calls are async from the renderer’s perspective, even if the service method is synchronous. This is because calls cross a process boundary.Error handling
Errors thrown in service methods are serialized and re-thrown in the renderer.Method conventions
- Take a single object argument. This keeps argument signatures stable as the API grows.
- Return JSON-serializable values. Anything that round-trips through
JSON.stringifyworks.

