# Runtime Protocol API URL: /runtime/api/protocol # Runtime Protocol API [#runtime-protocol-api] Custom transports use `runtimeDocumentProtocolSchemas` from `@taucad/runtime/transport` to validate messages at both boundaries. `RuntimeDocumentProtocol` from `@taucad/runtime/types` is derived from that schema authority. Ordinary consumers use the [client](/runtime/api/client). ## Calls and Notifications [#calls-and-notifications] `documentProtocolCallNames` names six acknowledged calls: `initialize`, `describe`, `export`, `snapshotSource`, `transcode`, `dispose`. `documentProtocolClientNotifyNames` names document/view commands: `open`, `update`, `close`, `openView`, `updateView`, `closeView`, `abort`, `binaryMaterialised`. `documentProtocolWorkerNotifyNames` names host notifications: `described`, `evaluating`, `evaluated`, `rendering`, `rendered`, `progress`, `errorEvent`, `stateChanged`, `log`, `logBatch`, `telemetry`, `capabilitiesUpdated`. `documentProtocolNotifyNames` combines both directions. Import these names from `@taucad/runtime/types`. Document, evaluation, view, request, and operation identities correlate work to its owner. Preserve them through admission, supersession, error reporting, and binary materialization. A stale notification must not replace a newer evaluation or projection. ## Binary Delivery [#binary-delivery] `WireArtifact`, `WireRendering`, `WireExportFile`, and `WireExportResult` retain transport-owned binary delivery handles. Public `Rendering` artifacts and `ExportResult.files` contain materialized owned bytes. A successful wire export preserves the nonempty tuple invariant. Custom transports resolve delivery before publishing a consumer result and acknowledge `binaryMaterialised` so retained storage can be released. Text SVG content remains text. Unknown MIME types remain opaque artifacts; consumers choose a renderer separately from transport delivery. ## Telemetry and Closure [#telemetry-and-closure] `TelemetryOrigin`, `TelemetrySpanRecord`, and `TelemetryBatch` identify sources and correlate bounded observations. Log and telemetry delivery precedes the associated terminal notification. Transport loss rejects pending work with `RuntimeTerminatedError`. Explicit document/view closure and normal supersession retain their own outcome semantics. An operation-scoped `errorEvent` must settle only its correlated operation; a connection-scoped failure belongs to the client. ## Related [#related] * [Transport API](/runtime/api/transport) * [Client API](/runtime/api/client) * [Runtime architecture](/runtime/concepts/architecture)