pub enum Outgoing {
SetSlotValuesResp {
success: bool,
message: Option<String>,
},
GetSlotValuesResp {
values: HashMap<String, Value>,
},
ListSlotsResp {
slots: Vec<SlotInfo>,
},
ListMethodsResp {
methods: Vec<MethodInfo>,
},
InvokeResp {
success: bool,
request_id: Option<String>,
value: Option<Value>,
message: Option<String>,
},
Error {
request_id: Option<String>,
message: String,
},
SlotValuesChanged {
values: HashMap<String, Value>,
},
}Expand description
Messages sent to WebSocket clients.
All outgoing messages use a type field to discriminate the message kind.
Variants§
SetSlotValuesResp
Response to SetSlotValues message.
Example: {"type": "set_slot_values_resp", "success": true}
Fields
GetSlotValuesResp
Response to GetSlotValues message.
Example: {"type": "get_slot_values_resp", "values": {"face/mouth": {"f64": 0.5}}}
ListSlotsResp
Response to ListSlots message.
Example: {"type": "list_slots_resp", "slots": [...]}
ListMethodsResp
Response to ListMethods message.
Example: {"type": "list_methods_resp", "methods": [...]}
Fields
methods: Vec<MethodInfo>List of matching methods
InvokeResp
Response to Invoke message.
Example: {"type": "invoke_resp", "success": true, "request_id": "req-1"}
Fields
Error
Generic error response for parse failures or unknown message types.
Example: {"type": "error", "message": "Invalid JSON"}
Fields
SlotValuesChanged
Server-initiated push: slot values changed (e.g. the runtime wrote new state). Sent unsolicited to subscribed clients — the live-edit feed.
Example: {"type": "slot_values_changed", "values": {"face/mouth": {"f64": 0.5}}}