openagents_sdk::runs::commands
Commands delivered through the run host's existing device channel.
| Item | What it does |
|---|---|
CommandOutcome enum | The host's handling result. |
CommandReceipt struct | A result bound to the caller's run and request ID. |
CommandRefusal enum | Why a host could not accept a command. |
RunCommand struct | The body of POST /v1/runs/{id}/commands. |
SessionCommand enum | A change requested from a run's host. |
CommandOutcome
pub enum CommandOutcome {
Accepted,
Refused { reason: CommandRefusal },
}
The host's handling result.
CommandReceipt
pub struct CommandReceipt {
pub run: String,
pub request_id: String,
pub outcome: CommandOutcome,
}
A result bound to the caller's run and request ID.
CommandRefusal
pub enum CommandRefusal {
NotSteerable,
NoGrant,
RunEnded,
Offline,
Unavailable,
}
Why a host could not accept a command.
RunCommand
pub struct RunCommand {
pub request_id: String,
pub command: SessionCommand,
}
The body of POST /v1/runs/{id}/commands. Keep this exact body on retry.
RunCommand::valid
pub fn valid(&self) -> bool
Whether the request ID and command meet the API's bounds.
SessionCommand
pub enum SessionCommand {
Message { text: String },
Steer { text: String },
Stop,
Restart { brief: Option<String> },
}
A change requested from a run's host. Acceptance means the host recorded the command; it does not mean a turn finished.
SessionCommand::valid
pub fn valid(&self) -> bool
Whether text fits the command's limits: nonblank, at most 16 KiB, no NUL.