pub struct SubagentRoleCatalog { /* private fields */ }Expand description
Validated catalog of built-in and configured subagent roles plus global defaults.
Implementations§
Source§impl SubagentRoleCatalog
impl SubagentRoleCatalog
Sourcepub fn builtin() -> Self
pub fn builtin() -> Self
Builds the default catalog containing Merry’s 3 built-in roles:
explore, coder, and review.
Sourcepub fn with_default_override(
self,
default_override: SubagentDefaultOverride,
) -> Self
pub fn with_default_override( self, default_override: SubagentDefaultOverride, ) -> Self
Replaces the [subagents.default] override layer.
Sourcepub fn default_override(&self) -> &SubagentDefaultOverride
pub fn default_override(&self) -> &SubagentDefaultOverride
Returns the configured [subagents.default] override layer.
Sourcepub fn apply_role_overlay(
&mut self,
name: &str,
overlay: SubagentRoleOverlay,
) -> Result<(), SubagentRoleError>
pub fn apply_role_overlay( &mut self, name: &str, overlay: SubagentRoleOverlay, ) -> Result<(), SubagentRoleError>
Applies one role overlay on top of an existing role or its declared base
role (defaulting to coder for new custom roles).
Sourcepub fn apply_toggles(
&mut self,
toggles: &BTreeMap<String, bool>,
) -> Result<(), SubagentRoleError>
pub fn apply_toggles( &mut self, toggles: &BTreeMap<String, bool>, ) -> Result<(), SubagentRoleError>
Applies [subagents.toggle] flags for known roles.
Sourcepub fn role(&self, name: &str) -> Option<&SubagentRoleSpec>
pub fn role(&self, name: &str) -> Option<&SubagentRoleSpec>
Looks up a role by name.
Sourcepub fn enabled_role_summaries(&self) -> Vec<(String, String)>
pub fn enabled_role_summaries(&self) -> Vec<(String, String)>
Returns (name, description) summaries for all enabled roles in deterministic order.
Trait Implementations§
Source§impl Clone for SubagentRoleCatalog
impl Clone for SubagentRoleCatalog
Auto Trait Implementations§
impl !RefUnwindSafe for SubagentRoleCatalog
impl !UnwindSafe for SubagentRoleCatalog
impl Forget for SubagentRoleCatalog
impl Freeze for SubagentRoleCatalogwhere
*const ArcInner<dyn ModelProvider> is !null: Freeze,
PhantomData<ArcInner<dyn ModelProvider>>: Freeze,
*const u8 is !null: Freeze,
PhantomData<u8>: Freeze,
*const LeafNode<String, SubagentRoleSpec> is !null: Freeze,
PhantomData<(Owned, LeafOrInternal)>: Freeze,
PhantomData<Box<(String, SubagentRoleSpec)>>: Freeze,
impl Move for SubagentRoleCatalog
impl Send for SubagentRoleCatalogwhere
Arc<dyn ModelProvider>: Send,
RawVecInner: Send,
NodeRef<Owned, String, SubagentRoleSpec, LeafOrInternal>: Send,
BoxRaw<(String, SubagentRoleSpec)>: Send,
impl Sync for SubagentRoleCatalogwhere
Arc<dyn ModelProvider>: Sync,
RawVecInner: Sync,
NodeRef<Owned, String, SubagentRoleSpec, LeafOrInternal>: Sync,
BoxRaw<(String, SubagentRoleSpec)>: Sync,
impl Unpin for SubagentRoleCatalogwhere
Arc<dyn ModelProvider>: Unpin,
*const u8 is !null: Unpin,
*const LeafNode<String, SubagentRoleSpec> is !null: Unpin,
Box<(String, SubagentRoleSpec)>: Unpin,
impl UnsafeUnpin for SubagentRoleCatalogwhere
*const ArcInner<dyn ModelProvider> is !null: UnsafeUnpin,
PhantomData<ArcInner<dyn ModelProvider>>: UnsafeUnpin,
*const u8 is !null: UnsafeUnpin,
PhantomData<u8>: UnsafeUnpin,
*const LeafNode<String, SubagentRoleSpec> is !null: UnsafeUnpin,
PhantomData<(Owned, LeafOrInternal)>: UnsafeUnpin,
PhantomData<Box<(String, SubagentRoleSpec)>>: UnsafeUnpin,
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