pub struct ConnectContext {
pub agent: Arc<Agent>,
pub tools: Arc<dyn ToolExecutor>,
pub session_repo: SessionRepository,
pub agent_runners: Arc<RwLock<HashMap<String, AgentRunner>>>,
pub session_event_senders: Arc<RwLock<HashMap<String, Sender<AgentEvent>>>>,
pub account_feed_inbox: Option<AccountFeedInbox>,
pub app_data_dir: Option<PathBuf>,
pub config: Arc<RwLock<Config>>,
pub provider_registry: Arc<ProviderRegistry>,
pub permission_checker: Arc<dyn PermissionChecker>,
}Expand description
Shared dependencies the bridge needs to run sessions through the
canonical execution path. Cheap to clone (every field is an Arc, or
small/Clone).
Fields§
§agent: Arc<Agent>§tools: Arc<dyn ToolExecutor>§session_repo: SessionRepository§agent_runners: Arc<RwLock<HashMap<String, AgentRunner>>>§session_event_senders: Arc<RwLock<HashMap<String, Sender<AgentEvent>>>>§account_feed_inbox: Option<AccountFeedInbox>§app_data_dir: Option<PathBuf>§config: Arc<RwLock<Config>>§provider_registry: Arc<ProviderRegistry>§permission_checker: Arc<dyn PermissionChecker>Shared with AppState::permission_checker — needed so an approved
permission prompt (a gated tool asked to run, answered through
connect) actually grants the session permission the re-executed tool
call is checked against on resume (issue #458; see
approvals::EngineResponder).
Trait Implementations§
Source§impl Clone for ConnectContext
impl Clone for ConnectContext
Source§fn clone(&self) -> ConnectContext
fn clone(&self) -> ConnectContext
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations§
impl !RefUnwindSafe for ConnectContext
impl !UnwindSafe for ConnectContext
impl Freeze for ConnectContext
impl Send for ConnectContext
impl Sync for ConnectContext
impl Unpin for ConnectContext
impl UnsafeUnpin for ConnectContext
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