Overview of @emdash/wire
main@emdash/wire is a transport-agnostic runtime layer designed for typed API calls and real-time data synchronization. It provides a structured way to handle live model subscriptions, logs, event streams, jobs, and mutations at the API boundary.
The package is organized into four functional layers:
- Runtime utilities: Manages lifecycle via
Scope,ManagedSource, andProcessHostsupervision. - API layer: Handles contract definitions via
defineContract, controller management viacreateController, and variousTransports(memory, port, electron, etc.). - Live primitives: Manages stateful entities like
LiveState,LiveLog,EventStreamSource,LiveJob, andMutations. - Observability: Provides cross-cutting instrumentation and logging hooks across all layers.