pub enum ResponseItem {
RequestMessageUser {
agent_instance_hierarchy: String,
response_id: String,
parts: Vec<RequestMessageUserPart>,
},
RequestMessageAssistant {
agent_instance_hierarchy: String,
response_id: String,
parts: Vec<AssistantResponsePart>,
},
RequestMessageTool {
agent_instance_hierarchy: String,
response_id: String,
tool_call_id: String,
parts: Vec<ToolResponsePart>,
},
VectorRequestChoices {
agent_instance_hierarchy: String,
response_id: String,
choices: Vec<VectorRequestChoice>,
},
VectorResponseVote {
agent_instance_hierarchy: String,
response_id: String,
vote: Vec<Decimal>,
},
ClientNotification {
agent_instance_hierarchy: String,
sender_agent_instance_hierarchy: String,
response_id: String,
queued_at: String,
key: Option<String>,
parts: Vec<ClientNotificationPart>,
},
AssistantResponse {
agent_instance_hierarchy: String,
response_id: String,
parts: Vec<AssistantResponsePart>,
},
ToolResponse {
agent_instance_hierarchy: String,
response_id: String,
tool_call_id: String,
parts: Vec<ToolResponsePart>,
},
Error {
agent_instance_hierarchy: String,
response_id: Option<String>,
id: i64,
delivered_at: String,
error: Value,
},
}Expand description
One yielded item. Three single-row request blobs +
three multi-row blocks. Every variant carries response_id.
sender_agent_instance_hierarchy appears only on the four
variants that have a sender ≠ producer: the three request
variants (caller AIH) and ClientNotification (enqueuer
AIH). AssistantResponse and ToolResponse are emitted BY
the agent itself — their agent_instance_hierarchy IS the
producer, so no separate sender field exists.
Block-coalescing boundary tuple: (class, agent_instance_hierarchy, response_id) for AssistantResponse;
(class, agent_instance_hierarchy, response_id, tool_call_id)
for ToolResponse (one block per tool call); (class, agent_instance_hierarchy, response_id, sender, message_queue_id)
for ClientNotification blocks.
One ClientNotification block = one consumed
message_queue parent row, so queued_at and
sender_agent_instance_hierarchy are well-defined
block-level.
Variants§
RequestMessageUser
A user-role message from the request/task input, unpacked
into content parts (each addressable via read id).
RequestMessageAssistant
An assistant-role message from the request/task input. Same
part shape as an assistant response — reasoning / tool calls /
refusal / content — but sourced from the request.
RequestMessageTool
A tool-role message from the request/task input, answering a
prior tool call. Same part shape as a tool response.
Fields
parts: Vec<ToolResponsePart>VectorRequestChoices
The response choices a vector-completion task voted over,
yielded as one block: an ordered list of choices, each with its
content parts and this agent’s inline voting key.
VectorResponseVote
The closer for a function-execution vector task: this agent’s
own vote (its score for each choice, in choice order). Inline —
no read id needed.
ClientNotification
Fields
sender_agent_instance_hierarchy: StringAIH of the enqueuer — from message_queue.sender_*
joined through message_queue_contents.id.
queued_at: Stringmessage_queue.enqueued_at of the consumed parent
queue row. One block = one parent queue row, so this
is well-defined block-level (each part’s individual
delivered_at still records its own
consumption moment).
key: Option<String>Idempotency token, if the row was enqueued with
--key via agents message --enqueue-with-key.
Surfacing it lets readers attribute a notification
to a specific enqueue beyond just the sender AIH.
parts: Vec<ClientNotificationPart>AssistantResponse
Agent emissions — the agent IS the producer of these
rows, so there’s no separate sender. The
agent_instance_hierarchy field IS the sender.
ToolResponse
One tool call’s response. Blocks are grouped per
tool_call_id (in addition to agent_instance_hierarchy +
response_id), so two responses in the same turn yield two
blocks.
Fields
parts: Vec<ToolResponsePart>Error
One logged failure (objectiveai.errors) — a spawn-path error
persisted into the agent’s history. Always a single row: the
failing attempt dies at its first raised error, so there is
nothing to coalesce. The value is returned inline (like the
vote) — no read id needed — but the row is still
id-addressable like every other event.
Trait Implementations§
Source§impl Clone for ResponseItem
impl Clone for ResponseItem
Source§fn clone(&self) -> ResponseItem
fn clone(&self) -> ResponseItem
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl CommandResponse for ResponseItem
Available on crate feature mcp only.
impl CommandResponse for ResponseItem
mcp only.fn into_mcp(self) -> McpResponseItem
Source§impl Debug for ResponseItem
impl Debug for ResponseItem
Source§impl<'de> Deserialize<'de> for ResponseItem
impl<'de> Deserialize<'de> for ResponseItem
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>,
impl Eq for ResponseItem
Source§impl JsonSchema for ResponseItem
impl JsonSchema for ResponseItem
Source§fn schema_id() -> Cow<'static, str>
fn schema_id() -> Cow<'static, str>
Source§fn json_schema(generator: &mut SchemaGenerator) -> Schema
fn json_schema(generator: &mut SchemaGenerator) -> Schema
Source§fn inline_schema() -> bool
fn inline_schema() -> bool
$ref keyword. Read moreSource§impl PartialEq for ResponseItem
impl PartialEq for ResponseItem
Source§impl Serialize for ResponseItem
impl Serialize for ResponseItem
impl StructuralPartialEq for ResponseItem
Auto Trait Implementations§
impl Freeze for ResponseItem
impl RefUnwindSafe for ResponseItem
impl Send for ResponseItem
impl Sync for ResponseItem
impl Unpin for ResponseItem
impl UnsafeUnpin for ResponseItem
impl UnwindSafe for ResponseItem
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more