pub struct Suspension {
pub reason: String,
pub input_schema: Value,
}Expand description
A tool’s request to park the run and wait for a human (or any out-of-band) input before continuing.
Suspension is a value a tool
returns, not a runtime call available to orchestration. A tool that needs
approval returns ToolOutcome::Suspend carrying one of these. The run
parks durably; salvor resume later supplies an input that is validated
against input_schema before the run continues.
The schema is a raw JSON Schema Value rather than a typed handle,
because the tool decides at runtime what shape the resume input must take,
and that shape can differ from one suspension to the next. A tool that
wants a typed resume input can build the schema with
serde_json::to_value(schemars::schema_for!(T)); the layer stores whatever
Value it is given and does not interpret it.
Fields§
§reason: StringWhy the run is parking, in human-readable form. This is what the approval inbox shows the person who has to act.
input_schema: ValueThe JSON Schema the resume input must satisfy. salvor resume validates
the supplied input against this before recording it and continuing.
Trait Implementations§
Source§impl Clone for Suspension
impl Clone for Suspension
Source§fn clone(&self) -> Suspension
fn clone(&self) -> Suspension
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more