pub struct ApprovalDecisionInput {
pub choice_id: String,
pub feedback: Option<String>,
}Expand description
The caller’s answer to one server-authored approval request.
Fields§
§choice_id: StringOne of the choice ids the request offers. Any other is refused: the
session sends the offered Denied choice, else the offered Abort
choice, and fails the approval’s turn with a MuseError::Protocol
carrying the ApprovalRoutingError::UnofferedChoice message once the
host accepts that answer, or at once when neither is offered. For a
stage the session already knows the host resolved or moved past, it
sends nothing and fails no turn, and a -32051 or -32053 reply to
the rejecting choice fails none either. An approval the session already
retired for its own fault is not one the host moved past: its turn
fails at once, unless the session has already received the host’s
resolution, and if that fault comes while the rejecting choice is out,
a -32053 reply fails it too.
feedback: Option<String>Free-text guidance delivered to the model with the decision, never
stored durably. Set it only on a choice whose accepts_feedback is
true: on any other choice the SDK refuses the decision before sending
it, as it does an unoffered choice. The session sends the offered
Denied choice, else the offered Abort choice, and nothing when
neither is offered, and the approval’s turn fails with a
MuseError::Protocol carrying the
ApprovalRoutingError::FeedbackNotAccepted message when and as
choice_id says an unoffered choice’s turn fails.