#[non_exhaustive]pub enum Action {
Execute,
RequireApproval,
Defer {
at: SystemTime,
},
Reject {
reason: String,
},
}Expand description
The chat loop’s decision vocabulary for what to do with a model-emitted tool call before it runs. Produced by a strategy closure, consumed by the executor.
Every variant is a loop-flow decision; nothing in this enum influences what the tool itself does when executed. That’s deliberate — metadata and strategies are only ever allowed to change how the loop interacts with the tool, never the tool’s behavior.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Execute
Run the tool immediately.
RequireApproval
Leave the tool [ToolStatus::Pending] and pause the loop so a
human can approve, reject, or edit it before execution.
Defer
Defer execution. The executor marks the tool with its current
status and pauses the loop; the caller is expected to persist
the conversation and resume at or after at.
Currently surfaces as a pause signal with timing metadata. Full
scheduled-execution support (dedicated ToolStatus::Scheduled
variant, wake-up orchestration) is a future extension.
Fields
at: SystemTimeReject
Decline the call. Surfaces to the model via the synthesized
error response that [ToolStatus::Rejected] produces on the
wire, so the model can react.