pub struct UpstreamMapRule {
pub direction: String,
pub message: String,
pub framing: String,
pub tag: Option<String>,
pub when_field: Option<String>,
pub when_value: Option<String>,
pub loc: Loc,
}Expand description
One map: projection rule: send M as json [tag "X"] /
send M as binary / receive M as json [when "f" [= "v"]] /
receive M as binary. Inbound json payloads land as v2.26.0 Json (total
navigation); the session message name is the routing + duality skeleton.
Fields§
§direction: Stringsend (axon → vendor) or receive (vendor → axon).
message: StringThe session message type this rule transcodes.
framing: Stringjson or binary (raw passthrough).
tag: Option<String>send-json only. Absent ⇒ the payload is sent VERBATIM (the vendor’s
exact wire shape, e.g. ElevenLabs {"text": …}); present ⇒ the tag
is injected as "type": "<tag>" into the payload object (the
Deepgram/OpenAI-Realtime envelope family).
when_field: Option<String>receive-json only: discriminator field. Absent ⇒ the default
equality discriminator "type" = "<MessageName>".
when_value: Option<String>receive-json only. Some(v) ⇒ equality match on when_field;
None with when_field present ⇒ field-PRESENCE match (vendors
like Gemini Live mark frame kinds by which key exists). Equality
rules dispatch before presence rules.
loc: Loc