Expand description
Protocol-1 wire envelope encode/decode.
Structs§
- Base
Message - Common message base with type and optional request_id.
- Envelope
- Unified
{proto, type, method, params, id}envelope. - Error
Object - Structured error nested under envelope.error.
- Event
Message - Streaming event frame from the daemon (Go
EventMessageparity). - LoopAI
Message - Loop-tagged assistant payload forwarded on
mode=messagesstreams (GoLoopAIMessageparity). - Status
Response - Status acknowledgment (Go
StatusResponseparity). Handles the camelCaseloopIdfallback emitted by some daemon builds.
Enums§
- Message
Type - Message class values for the envelope
typefield. - Typed
Message - Typed decoded message (Go
interface{}return parity).
Constants§
- CLIENT_
VERSION - Client version reported in
connection_init(crate version). - DEFAULT_
CLIENT_ CAPABILITIES - Default capabilities declared in the handshake.
- PROTO_
VERSION - Protocol version string.
Functions§
- as_str
- Coerce JSON value to string.
- decode_
message - Decode a WebSocket text frame into a JSON value.
- decode_
message_ typed - Decode a WebSocket text frame into a typed message (Go
DecodeMessageparity). - expand_
wire_ messages - Expand
event_batchframes into individual events. - extract_
soothe_ loop_ id - Extract a loop id from a decoded message (Go
ExtractSootheLoopIDparity). - is_
loop_ assistant_ phase - True when
phasetags streamable loop assistant output. - new_
connection_ init - Build connection_init.
- new_
disconnect - Build disconnect notification.
- new_
notification - Build a notification envelope (no id).
- new_
ping - Build ping.
- new_
pong - Build pong.
- new_
request - Build a request envelope with a generated id.
- new_
request_ id - Generate a 32-hex request id (UUID without dashes).
- new_
request_ with_ id - Build a request envelope with an explicit id.
- new_
subscribe - Build a subscribe envelope.
- new_
unsubscribe - Build an unsubscribe envelope.
- next_
to_ event_ message - Project a protocol-1
nextenvelope’s payload into anEventMessagewhen the payload carries a wrapped legacy event frame (GonextToEventMessageparity). - params_
map - Map helper: insert string.
- split_
wire_ payload - Split a WebSocket text payload into one or more JSON objects.
- unwrap_
next - Unwrap a
nextenvelope to its inner frame when possible.