Skip to content

ClientEnvelope

ClientEnvelope = ChartRequestMessage | AssistantInjectionMessage | AcknowledgedAssistantMessage | HistoryGetMessage | DiagnosticSubscription | AgentInputMessage

Defined in: packages/protocol/src/lib/envelope.ts:188

Every message a client may send to an engine host over the duplex stream.

Every ChartRequestMessage / AssistantInjectionMessage — i.e. every EngineMessage — is a valid ClientEnvelope; the envelope module adds the transport-only HistoryGetMessage, AcknowledgedAssistantMessage and DiagnosticSubscription, which the LLM never sees, and the AgentInputMessage that feeds the Agent Session. The legacy assistant arm remains fire-and-forget; only the acknowledged arm requests a response. Discriminated on type, so a host router can use one switch.