pub struct CursorAgent { /* private fields */ }Implementations§
Source§impl CursorAgent
impl CursorAgent
pub fn new() -> Self
Sourcepub fn from_config(config: &AgentConfig) -> Self
pub fn from_config(config: &AgentConfig) -> Self
Create from project agent config.
Trait Implementations§
Source§impl Agent for CursorAgent
impl Agent for CursorAgent
Source§fn launch_command(&self, _session: &Session) -> String
fn launch_command(&self, _session: &Session) -> String
Single shell string the runtime will run inside its execution context.
fn environment(&self, session: &Session) -> Vec<(String, String)>
Source§fn system_prompt(&self) -> Option<String>
fn system_prompt(&self) -> Option<String>
System rules / workflow guidance that must be prepended to the user
prompt by the caller. Read more
Source§fn initial_prompt(&self, session: &Session) -> String
fn initial_prompt(&self, session: &Session) -> String
First prompt to deliver after the process is up.
Source§fn detect_activity<'life0, 'life1, 'async_trait>(
&'life0 self,
session: &'life1 Session,
) -> Pin<Box<dyn Future<Output = Result<ActivityState>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn detect_activity<'life0, 'life1, 'async_trait>(
&'life0 self,
session: &'life1 Session,
) -> Pin<Box<dyn Future<Output = Result<ActivityState>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Inspect whatever evidence this agent leaves behind (log files,
terminal scrollback, pid probes, …) and report its current
activity state. Called once per lifecycle tick. Read more
Source§fn cost_estimate<'life0, 'life1, 'async_trait>(
&'life0 self,
session: &'life1 Session,
) -> Pin<Box<dyn Future<Output = Result<Option<CostEstimate>, AoError>> + Send + 'async_trait>>where
'life0: 'async_trait,
'life1: 'async_trait,
Self: 'async_trait,
fn cost_estimate<'life0, 'life1, 'async_trait>(
&'life0 self,
session: &'life1 Session,
) -> Pin<Box<dyn Future<Output = Result<Option<CostEstimate>, AoError>> + Send + 'async_trait>>where
'life0: 'async_trait,
'life1: 'async_trait,
Self: 'async_trait,
Poll current aggregated token usage / cost from the agent’s logs. Read more
Auto Trait Implementations§
impl Freeze for CursorAgent
impl RefUnwindSafe for CursorAgent
impl Send for CursorAgent
impl Sync for CursorAgent
impl Unpin for CursorAgent
impl UnsafeUnpin for CursorAgent
impl UnwindSafe for CursorAgent
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