pub struct InteractionPoint {
pub name: String,
pub prompt: String,
pub required: bool,
pub style: InteractionStyle,
pub options: Vec<String>,
pub directives: HashMap<String, String>,
pub abort_options: Vec<String>,
pub edit_options: Vec<String>,
pub document_region: Option<String>,
}Expand description
A point where a stage can request user input.
Fields§
§name: StringUnique name for this interaction point
prompt: StringPrompt to show the user
required: boolWhether input is required (vs optional)
style: InteractionStyleStyle of interaction (free text, multiple choice, confirm)
options: Vec<String>Options for MultipleChoice style
directives: HashMap<String, String>Directives keyed by option label.
When the user picks an option present in this map (e.g. “Revise - I’ll
describe changes”), the mapped directive text is injected into the
agent’s conversation context and the stage re-runs inference IN-STAGE
(bounded by a revision cap) instead of falling through to a stage
transition. The directive tells the agent what to do next - e.g. call
ask_user_text to learn what to change, or edit_document to let the
user edit the plan directly - so the routing decision is deterministic
(code) while the actual input capture is an agent tool call.
abort_options: Vec<String>Options that, when selected, immediately abort the run: the engine marks the run cancelled and stops with no further inference and no transition resolution. Matched against the selected option label with the same dash/whitespace normalization used for directive lookup.
edit_options: Vec<String>Options that, when selected, open the stage’s most recent output (e.g. the plan) in an editable field so the user can modify it directly. The engine issues the edit interaction itself and injects the edited text back into context - deterministic, with no dependence on the model choosing to call an edit tool. Matched with the same normalization.
document_region: Option<String>Optional pinned region to hold this point’s authoritative document (e.g.
"plan"). When set, each time the point is presented the current
document - the produced text, or the user’s direct edit - replaces that
region’s content, so later revisions and downstream stages build on the
current version rather than regenerating from the task. None ⇒ the
document lives only in the rolling conversation / output.
Trait Implementations§
Source§impl Clone for InteractionPoint
impl Clone for InteractionPoint
Source§fn clone(&self) -> InteractionPoint
fn clone(&self) -> InteractionPoint
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more