pub enum AgentCommand {
CreateSession {
profile_id: ProfileId,
metadata: ProtocolMetadata,
},
Prompt {
message: CanonicalMessage,
},
Steer {
text: CommandText,
},
FollowUp {
message: CanonicalMessage,
},
Abort {},
ResolveApproval {
approval_id: ApprovalId,
decision: ApprovalDecision,
},
SetModel {
model: ModelRef,
},
SetReasoningEffort {
reasoning_effort: ReasoningEffort,
},
SetProfile {
profile_id: ProfileId,
},
CompactSession {
instruction: Option<CommandText>,
},
ForkSession {
from_message_id: MessageId,
branch_id: BranchId,
},
}Expand description
A provider- and transport-neutral agent command payload.
Variants§
CreateSession
Create a session using a profile and optional extension metadata.
Fields
metadata: ProtocolMetadataBounded session extension metadata.
Prompt
Submit a canonical user message.
Fields
message: CanonicalMessageCanonical user message.
Steer
Steer the currently running turn.
Fields
text: CommandTextBounded steering text.
FollowUp
Queue a follow-up canonical user message.
Fields
message: CanonicalMessageCanonical user message.
Abort
Abort the active run.
ResolveApproval
Resolve a pending approval request.
Fields
approval_id: ApprovalIdApproval request identifier.
decision: ApprovalDecisionUser or policy decision.
SetModel
Select a model for subsequent runs.
SetReasoningEffort
Select reasoning effort for subsequent turns.
Fields
reasoning_effort: ReasoningEffortProvider-neutral reasoning effort.
SetProfile
Select a product profile for subsequent runs.
CompactSession
Request compaction with an optional bounded instruction.
Fields
instruction: Option<CommandText>Optional compaction instruction.
ForkSession
Fork the session from a message into a new branch.
Implementations§
Source§impl AgentCommand
impl AgentCommand
Sourcepub const fn command_type(&self) -> AgentCommandType
pub const fn command_type(&self) -> AgentCommandType
Returns the stable command discriminator.
Trait Implementations§
Source§impl Clone for AgentCommand
impl Clone for AgentCommand
Source§fn clone(&self) -> AgentCommand
fn clone(&self) -> AgentCommand
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more