pub struct Interrupt {
pub id: String,
pub reason: String,
pub message: Option<String>,
pub tool_call_id: Option<ToolCallId>,
pub response_schema: Option<JsonObject>,
pub expires_at: Option<String>,
pub metadata: Option<JsonObject>,
pub subagent_run_id: Option<SubagentRunId>,
}Expand description
A request for human input that pauses the run.
Fields§
§id: StringCorrelation id — echoed back as
ResumeEntry::interrupt_id when the run resumes.
reason: StringMachine-readable reason, for example "tool_approval".
message: Option<String>Human-readable prompt to show the user.
tool_call_id: Option<ToolCallId>The tool call awaiting approval, when the interrupt is about one.
response_schema: Option<JsonObject>JSON Schema the resume payload must satisfy — lets a client render a form for the answer.
expires_at: Option<String>When the interrupt stops being answerable, as an ISO-8601 timestamp.
metadata: Option<JsonObject>Integration-specific extras.
subagent_run_id: Option<SubagentRunId>The subagent whose work raised this interrupt, when it was raised
inside one — absent for a root-raised interrupt. Attribution lives on
each interrupt rather than on RUN_FINISHED because one run can carry
interrupts from several subagents; a client uses it to render the
approval request inside that subagent’s group. A JSON null is
rejected — see crate::event::subagent.
Implementations§
Trait Implementations§
Source§impl<'de> Deserialize<'de> for Interrupt
impl<'de> Deserialize<'de> for Interrupt
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 InterruptExt for Interrupt
impl InterruptExt for Interrupt
Source§fn resolve(&self, payload: impl Into<Value>) -> ResumeEntry
fn resolve(&self, payload: impl Into<Value>) -> ResumeEntry
Source§fn cancel(&self) -> ResumeEntry
fn cancel(&self) -> ResumeEntry
Source§fn is_tool_approval(&self) -> bool
fn is_tool_approval(&self) -> bool
Source§impl JsonSchema for Interrupt
impl JsonSchema for Interrupt
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