pub struct ClaudeProvider;Expand description
Claude Code provider.
State detection will use hooks (configured at spawn time). Output-based detection returns None — state is pushed via hook callbacks.
Trait Implementations§
Source§impl Provider for ClaudeProvider
impl Provider for ClaudeProvider
Source§fn build_command(
&self,
dir: &Path,
args: &[String],
resume_session: Option<&str>,
prompt: Option<&str>,
) -> Command
fn build_command( &self, dir: &Path, args: &[String], resume_session: Option<&str>, prompt: Option<&str>, ) -> Command
Build the command to launch the agent in a directory.
Source§fn detect_state_from_output(
&self,
_recent_output: &[u8],
_idle_duration: Duration,
) -> Option<AgentState>
fn detect_state_from_output( &self, _recent_output: &[u8], _idle_duration: Duration, ) -> Option<AgentState>
Analyze agent state from recent PTY output and time since last output.
Returns
None if this provider doesn’t do output-based detection (e.g. uses hooks).Source§fn map_hook_event(&self, event: &str) -> Option<AgentState>
fn map_hook_event(&self, event: &str) -> Option<AgentState>
Map a hook event name to an agent state.
Returns
None if this provider doesn’t handle hooks or doesn’t recognize the event.Source§fn context_usage(&self, pid: u32, dir: &Path) -> Option<ContextUsage>
fn context_usage(&self, pid: u32, dir: &Path) -> Option<ContextUsage>
Read context window usage for an agent. Returns
None if not supported
or if the data isn’t available.Auto Trait Implementations§
impl Freeze for ClaudeProvider
impl RefUnwindSafe for ClaudeProvider
impl Send for ClaudeProvider
impl Sync for ClaudeProvider
impl Unpin for ClaudeProvider
impl UnsafeUnpin for ClaudeProvider
impl UnwindSafe for ClaudeProvider
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