pub struct ClaudeAcpAgent { /* private fields */ }Expand description
Claude ACP Agent
The main agent struct that holds configuration and session state. This is shared across all request handlers.
Configuration is loaded from (in priority order):
- Environment variables (e.g., ANTHROPIC_MODEL, ANTHROPIC_BASE_URL)
- Settings files (~/.claude/settings.json, .claude/settings.json, etc.)
- Defaults
Implementations§
Source§impl ClaudeAcpAgent
impl ClaudeAcpAgent
Sourcepub fn new() -> Self
pub fn new() -> Self
Create a new agent with configuration from environment and settings files
Configuration is loaded from:
- Environment variables (highest priority)
- Settings files (~/.claude/settings.json, .claude/settings.json, etc.)
- Defaults
Sourcepub fn with_config(config: AgentConfig) -> Self
pub fn with_config(config: AgentConfig) -> Self
Create with custom configuration
Sourcepub fn config(&self) -> &AgentConfig
pub fn config(&self) -> &AgentConfig
Get the agent configuration
Sourcepub fn sessions(&self) -> &Arc<SessionManager>
pub fn sessions(&self) -> &Arc<SessionManager>
Get the session manager
Sourcepub fn prompt_manager(&self) -> &Arc<PromptManager>
pub fn prompt_manager(&self) -> &Arc<PromptManager>
Get the prompt manager
Trait Implementations§
Source§impl Debug for ClaudeAcpAgent
impl Debug for ClaudeAcpAgent
Auto Trait Implementations§
impl Freeze for ClaudeAcpAgent
impl !RefUnwindSafe for ClaudeAcpAgent
impl Send for ClaudeAcpAgent
impl Sync for ClaudeAcpAgent
impl Unpin for ClaudeAcpAgent
impl !UnwindSafe for ClaudeAcpAgent
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> FutureExt for T
impl<T> FutureExt for T
Source§fn with_context(self, otel_cx: Context) -> WithContext<Self>
fn with_context(self, otel_cx: Context) -> WithContext<Self>
Source§fn with_current_context(self) -> WithContext<Self>
fn with_current_context(self) -> WithContext<Self>
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoMaybeUndefined<T> for T
impl<T> IntoMaybeUndefined<T> for T
fn into_maybe_undefined(self) -> MaybeUndefined<T>
Source§impl<T> IntoOption<T> for T
impl<T> IntoOption<T> for T
fn into_option(self) -> Option<T>
Source§impl<T> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
Source§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
Wrap the input message
T in a tonic::Request