pub struct ScriptedAgent { /* private fields */ }Expand description
An AgentService that replays a recorded stream.
Implementations§
Source§impl ScriptedAgent
impl ScriptedAgent
pub fn new() -> Self
Sourcepub fn with_turn(self, updates: Vec<ScriptedUpdate>) -> Self
pub fn with_turn(self, updates: Vec<ScriptedUpdate>) -> Self
Queue a turn. The first prompt replays the first turn, and so on.
Sourcepub fn with_capabilities(self, capabilities: AgentCapabilities) -> Self
pub fn with_capabilities(self, capabilities: AgentCapabilities) -> Self
Set what the fake connection reports during its handshake. The first poll emits
Ready exactly once, matching the protocol-neutral event the real ACP transport
produces before any session behavior (ADR-0014 §4).
Sourcepub fn sent(&self) -> &[AgentRequest]
pub fn sent(&self) -> &[AgentRequest]
Every request the client has sent.
Sourcepub fn served(&self) -> &[(PathBuf, Option<String>)]
pub fn served(&self) -> &[(PathBuf, Option<String>)]
The file contents the client served, in the order they were asked for.
Sourcepub fn is_exhausted(&self) -> bool
pub fn is_exhausted(&self) -> bool
Whether the script has been fully consumed.
Trait Implementations§
Source§impl AgentService for ScriptedAgent
impl AgentService for ScriptedAgent
fn integration(&self) -> AgentIntegration
Source§fn send(&mut self, request: AgentRequest)
fn send(&mut self, request: AgentRequest)
Queue work for the agent. Never blocks the caller.
Source§fn poll(&mut self) -> Vec<AgentEvent>
fn poll(&mut self) -> Vec<AgentEvent>
Take whatever the agent has produced since the last call. Read more
fn capabilities(&self) -> ClientCapabilities
Source§impl Debug for ScriptedAgent
impl Debug for ScriptedAgent
Source§impl Default for ScriptedAgent
impl Default for ScriptedAgent
Source§fn default() -> ScriptedAgent
fn default() -> ScriptedAgent
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl Freeze for ScriptedAgent
impl RefUnwindSafe for ScriptedAgent
impl Send for ScriptedAgent
impl Sync for ScriptedAgent
impl Unpin for ScriptedAgent
impl UnsafeUnpin for ScriptedAgent
impl UnwindSafe for ScriptedAgent
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
Source§impl<T> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere
T: Any,
Source§fn into_any(self: Box<T>) -> Box<dyn Any>
fn into_any(self: Box<T>) -> Box<dyn Any>
Convert
Box<dyn Trait> (where Trait: Downcast) to Box<dyn Any>. Box<dyn Any> can
then be further downcast into Box<ConcreteType> where ConcreteType implements Trait.Source§fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
Convert
Rc<Trait> (where Trait: Downcast) to Rc<Any>. Rc<Any> can then be
further downcast into Rc<ConcreteType> where ConcreteType implements Trait.Source§fn as_any(&self) -> &(dyn Any + 'static)
fn as_any(&self) -> &(dyn Any + 'static)
Convert
&Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &Any’s vtable from &Trait’s.Source§fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
Convert
&mut Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &mut Any’s vtable from &mut Trait’s.