Struct ScopedAssembled
pub struct ScopedAssembled {
pub registry: ScopedToolRegistry,
pub delegate_handle: Option<Arc<RwLock<RawRwLock, Vec<Arc<dyn Tool>>>>>,
pub ask_user_handle: Option<Arc<RwLock<RawRwLock, HashMap<String, Arc<dyn Channel>>>>>,
pub reaction_handle: Arc<RwLock<RawRwLock, HashMap<String, Arc<dyn Channel>>>>,
pub poll_handle: Option<Arc<RwLock<RawRwLock, HashMap<String, Arc<dyn Channel>>>>>,
pub escalate_handle: Option<Arc<RwLock<RawRwLock, HashMap<String, Arc<dyn Channel>>>>>,
pub channel_room_handle: Option<Arc<RwLock<RawRwLock, HashMap<String, Arc<dyn Channel>>>>>,
pub activated_handle: Option<Arc<Mutex<ActivatedToolSet>>>,
pub mcp_tool_names: HashSet<String>,
/* private fields */
}Expand description
Output of ScopedToolRegistry::assemble: the scoped registry plus the
side-channel handles + the deferred-MCP prompt section the callers thread on.
Fields§
§registry: ScopedToolRegistry§delegate_handle: Option<Arc<RwLock<RawRwLock, Vec<Arc<dyn Tool>>>>>§ask_user_handle: Option<Arc<RwLock<RawRwLock, HashMap<String, Arc<dyn Channel>>>>>§reaction_handle: Arc<RwLock<RawRwLock, HashMap<String, Arc<dyn Channel>>>>§poll_handle: Option<Arc<RwLock<RawRwLock, HashMap<String, Arc<dyn Channel>>>>>§escalate_handle: Option<Arc<RwLock<RawRwLock, HashMap<String, Arc<dyn Channel>>>>>§channel_room_handle: Option<Arc<RwLock<RawRwLock, HashMap<String, Arc<dyn Channel>>>>>§activated_handle: Option<Arc<Mutex<ActivatedToolSet>>>Live handle to the activated deferred-MCP set (present only when a deferred
tool_search tool was registered).
mcp_tool_names: HashSet<String>Implementations§
Source§impl ScopedAssembled
impl ScopedAssembled
Sourcepub fn combined_mcp_prompt_section(&self) -> String
pub fn combined_mcp_prompt_section(&self) -> String
The deferred-MCP tool-search listing and the pinned-MCP-resources section,
composed into ONE prompt block. For callers that inject a single combined MCP
prompt section: run, process_message, and independent delegation.
Centralizing the composition here (instead of each caller hand-rolling
append_pinned_mcp_section(&mut deferred_section, &pinned_section) after its own
destructure) is what makes dropping pinned_section a thing that can no longer
happen silently - the field isn’t reachable except through this method or
Self::pinned_section, so a caller must consciously pick one.
Sourcepub fn deferred_section(&self) -> &str
pub fn deferred_section(&self) -> &str
The deferred-MCP tool-search listing on its own, for callers with two distinct
prompt slots that inject each separately (Agent::from_config’s Agent, whose
prompt is composed per-turn later rather than at assemble-call time). See
Self::pinned_section for its counterpart, and
Self::combined_mcp_prompt_section for the single-block shape.
Sourcepub fn pinned_section(&self) -> &str
pub fn pinned_section(&self) -> &str
The pinned-MCP-resources section on its own. See Self::deferred_section.
Auto Trait Implementations§
impl Freeze for ScopedAssembled
impl !RefUnwindSafe for ScopedAssembled
impl Send for ScopedAssembled
impl Sync for ScopedAssembled
impl Unpin for ScopedAssembled
impl UnsafeUnpin for ScopedAssembled
impl !UnwindSafe for ScopedAssembled
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
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§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 more