pub struct ResumeEntry {
pub interrupt_id: String,
pub status: ResumeStatus,
pub payload: Option<Value>,
pub metadata: Option<JsonObject>,
}Expand description
One answer to one Interrupt, sent on the resuming request.
Fields§
§interrupt_id: StringThe Interrupt::id being answered.
status: ResumeStatusWhether the user answered or declined.
payload: Option<Value>The answer. Shape is up to the agent; when the interrupt supplied a
responseSchema, this should satisfy it. For a tool approval that was
edited before approval, agents that advertise approveWithEdits expect
{"editedArgs": …} here. Some(Value::Null) is written as an
omitted field, which is how AG-UI 1.0 spells no answer.
metadata: Option<JsonObject>Envelope data about the answer — signatures, routing keys — as opposed
to payload, which is the answer the agent asked for and will act on.
A request field, so nothing merges into it. Absent or an object — a
JSON null is rejected. See crate::metadata.
Implementations§
Source§impl ResumeEntry
impl ResumeEntry
Sourcepub fn resolved(
interrupt_id: impl Into<String>,
payload: impl Into<Value>,
) -> Self
pub fn resolved( interrupt_id: impl Into<String>, payload: impl Into<Value>, ) -> Self
Answers an interrupt with a payload.
Sourcepub fn with_metadata(self, metadata: JsonObject) -> Self
pub fn with_metadata(self, metadata: JsonObject) -> Self
Attaches envelope metadata to the answer.
Trait Implementations§
Source§impl Clone for ResumeEntry
impl Clone for ResumeEntry
Source§impl ComposeSchema for ResumeEntry
impl ComposeSchema for ResumeEntry
Source§impl Debug for ResumeEntry
impl Debug for ResumeEntry
Source§impl<'de> Deserialize<'de> for ResumeEntry
impl<'de> Deserialize<'de> for ResumeEntry
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 JsonSchema for ResumeEntry
impl JsonSchema for ResumeEntry
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 more