pub enum AgentRequest {
NewSession {
cwd: PathBuf,
},
Prompt {
session: SessionId,
text: String,
context: String,
},
FileContents {
session: SessionId,
request: ReadRequestId,
path: PathBuf,
contents: Option<String>,
},
Permission {
request: PermissionRequestId,
decision: PermissionDecision,
},
PermissionCancelled {
request: PermissionRequestId,
},
TerminalResponse {
request: AgentTerminalRequestId,
response: AgentTerminalResponse,
},
Cancel {
session: SessionId,
},
Shutdown,
}Expand description
Work sent to the agent.
Variants§
NewSession
Prompt
A user turn. context is the workspace snapshot rendered as text and prepended —
small and current, because everything bulky is pulled on demand instead
(ADR-0007 §4).
FileContents
Our answer to AgentEvent::ReadFileRequested, served from the live buffer.
None means we could not read it.
Carries the request it answers rather than only the path, so two reads of the
same file in one turn cannot be confused for each other.
Permission
PermissionCancelled
Cancel a permission prompt because its owning turn/session is no longer live.
Fields
§
request: PermissionRequestIdTerminalResponse
Cancel
Shutdown
Trait Implementations§
Source§impl Clone for AgentRequest
impl Clone for AgentRequest
Source§fn clone(&self) -> AgentRequest
fn clone(&self) -> AgentRequest
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for AgentRequest
impl Debug for AgentRequest
impl Eq for AgentRequest
Source§impl PartialEq for AgentRequest
impl PartialEq for AgentRequest
impl StructuralPartialEq for AgentRequest
Auto Trait Implementations§
impl Freeze for AgentRequest
impl RefUnwindSafe for AgentRequest
impl Send for AgentRequest
impl Sync for AgentRequest
impl Unpin for AgentRequest
impl UnsafeUnpin for AgentRequest
impl UnwindSafe for AgentRequest
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more