pub struct AcpContext {
pub file_executor: Option<AcpFileExecutor>,
pub shell_executor: Option<AcpShellExecutor>,
pub permission_gate: Option<AcpPermissionGate>,
pub cancel_signal: Arc<Notify>,
pub provider_override: Arc<RwLock<Option<AnyProvider>>>,
pub parent_tool_use_id: Option<String>,
pub lsp_provider: Option<AcpLspProvider>,
pub diagnostics_cache: Arc<RwLock<DiagnosticsCache>>,
}Expand description
IDE-proxied capabilities passed to the agent loop per session.
Each field is None when the IDE did not advertise the corresponding capability
during the ACP initialize() handshake. The agent loop should degrade gracefully
when optional capabilities are absent.
Fields§
§file_executor: Option<AcpFileExecutor>IDE-proxied filesystem executor (fs.readTextFile / fs.writeTextFile).
None when the IDE did not advertise filesystem capability.
shell_executor: Option<AcpShellExecutor>IDE-proxied shell executor (terminal.create / terminal.execute).
None when the IDE did not advertise terminal capability.
permission_gate: Option<AcpPermissionGate>Permission gate for tool-call approval requests sent to the IDE.
None when the IDE did not advertise permission capability.
cancel_signal: Arc<Notify>Shared cancellation signal.
Notify this to interrupt the currently running agent operation (e.g. on user cancel).
provider_override: Arc<RwLock<Option<AnyProvider>>>Shared slot for runtime model switching via set_session_config_option.
When Some, the agent should swap its provider before the next turn.
parent_tool_use_id: Option<String>Tool call ID of the parent agent’s tool call that spawned this subagent session.
None for top-level (non-subagent) sessions.
lsp_provider: Option<AcpLspProvider>LSP provider when the IDE advertised meta["lsp"] capability.
None when the IDE does not support LSP extension methods.
diagnostics_cache: Arc<RwLock<DiagnosticsCache>>Shared diagnostics cache — written by the LSP notification handler in ZephAcpAgent
and read by the agent loop context builder to inject diagnostics into the system prompt.
Auto Trait Implementations§
impl Freeze for AcpContext
impl !RefUnwindSafe for AcpContext
impl Send for AcpContext
impl Sync for AcpContext
impl Unpin for AcpContext
impl UnsafeUnpin for AcpContext
impl !UnwindSafe for AcpContext
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
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> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§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>
T in a tonic::Request