pub enum IpcPayload {
Show 19 variants
RawJson(Value),
UserInput {
text: String,
session_id: String,
context: Option<Value>,
},
AgentResponse {
text: String,
is_final: bool,
session_id: String,
},
ApprovalRequired {
request_id: String,
action: String,
resource: String,
reason: String,
},
ApprovalResponse {
request_id: String,
decision: String,
reason: Option<String>,
},
OnboardingRequired {
capsule_id: String,
fields: Vec<OnboardingField>,
},
LlmRequest {
request_id: Uuid,
model: String,
messages: Vec<Message>,
tools: Vec<LlmToolDefinition>,
system: String,
},
LlmStreamEvent {
request_id: Uuid,
event: StreamEvent,
},
LlmResponse {
request_id: Uuid,
response: LlmResponse,
},
ToolExecuteRequest {
call_id: String,
tool_name: String,
arguments: Value,
},
ToolExecuteResult {
call_id: String,
result: ToolCallResult,
},
ToolCancelRequest {
call_ids: Vec<String>,
},
SelectionRequired {
request_id: String,
title: String,
options: Vec<SelectionOption>,
callback_topic: String,
},
ElicitRequest {
request_id: Uuid,
capsule_id: String,
field: OnboardingField,
},
ElicitResponse {
request_id: Uuid,
value: Option<String>,
values: Option<Vec<String>>,
},
Connect,
Disconnect {
reason: Option<String>,
},
Custom {
data: Value,
},
Unknown,
}Expand description
Standardized cross-boundary payload schemas.
Variants§
RawJson(Value)
Raw, arbitrary JSON.
UserInput
User input provided via a frontend (CLI, Telegram).
Fields
AgentResponse
A response generated by an agent.
Fields
ApprovalRequired
An interceptor or capsule request for capability approval.
Fields
ApprovalResponse
Response to an ApprovalRequired.
Fields
OnboardingRequired
A capsule needs environment variables to be provided by the user.
Fields
fields: Vec<OnboardingField>Rich field descriptors for each missing env var.
LlmRequest
Request an LLM provider capsule to generate a response.
Fields
tools: Vec<LlmToolDefinition>The tools available to the model.
LlmStreamEvent
A stream event from an LLM provider capsule.
Fields
event: StreamEventThe actual stream event (TokenDelta, ToolCallStart, etc).
LlmResponse
The final, non-streaming LLM response.
Fields
response: LlmResponseThe final response object.
ToolExecuteRequest
Request the Tool Router capsule to execute a tool.
Fields
ToolExecuteResult
The result of a tool execution.
Fields
result: ToolCallResultThe result of the execution.
ToolCancelRequest
Request cancellation of in-flight tool executions.
SelectionRequired
A capsule is requesting the user to select from a list of options.
Fields
options: Vec<SelectionOption>The selectable options.
ElicitRequest
A lifecycle hook is requesting user input via the elicit API.
Fields
field: OnboardingFieldField descriptor reusing the onboarding schema.
ElicitResponse
Response to an ElicitRequest.
Fields
Connect
A client has connected.
Disconnect
A client is disconnecting gracefully.
Custom
Arbitrary JSON data for unstructured plugins.
Unknown
Unrecognized payload type from a newer protocol version.
Implementations§
Source§impl IpcPayload
impl IpcPayload
Sourcepub fn is_known_tag(tag: &str) -> bool
pub fn is_known_tag(tag: &str) -> bool
Returns true if tag matches a known serde variant name.
Sourcepub fn from_json_value(data: Value) -> Self
pub fn from_json_value(data: Value) -> Self
Trait Implementations§
Source§impl Clone for IpcPayload
impl Clone for IpcPayload
Source§fn clone(&self) -> IpcPayload
fn clone(&self) -> IpcPayload
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for IpcPayload
impl Debug for IpcPayload
Source§impl<'de> Deserialize<'de> for IpcPayload
impl<'de> Deserialize<'de> for IpcPayload
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Source§impl PartialEq for IpcPayload
impl PartialEq for IpcPayload
Source§fn eq(&self, other: &IpcPayload) -> bool
fn eq(&self, other: &IpcPayload) -> bool
self and other values to be equal, and is used by ==.