pub struct AgentCatalog { /* private fields */ }Expand description
A resolved catalog of agents from a project.
This type owns project-relative/inherited resolution context.
Implementations§
Source§impl AgentCatalog
impl AgentCatalog
Sourcepub fn empty(project_root: PathBuf) -> Self
pub fn empty(project_root: PathBuf) -> Self
Create an empty catalog for a project with no settings.
Sourcepub fn project_root(&self) -> &Path
pub fn project_root(&self) -> &Path
The project root directory.
Sourcepub fn get(&self, name: &str) -> Result<&AgentSpec, SettingsError>
pub fn get(&self, name: &str) -> Result<&AgentSpec, SettingsError>
Get a specific agent by name.
Sourcepub fn user_invocable(&self) -> impl Iterator<Item = &AgentSpec>
pub fn user_invocable(&self) -> impl Iterator<Item = &AgentSpec>
Iterate over user-invocable agents.
Sourcepub fn agent_invocable(&self) -> impl Iterator<Item = &AgentSpec>
pub fn agent_invocable(&self) -> impl Iterator<Item = &AgentSpec>
Iterate over agent-invocable agents.
Sourcepub fn resolve(
&self,
name: &str,
cwd: &Path,
) -> Result<AgentSpec, SettingsError>
pub fn resolve( &self, name: &str, cwd: &Path, ) -> Result<AgentSpec, SettingsError>
Resolve and return a named agent spec ready for runtime use.
Sourcepub fn resolve_default(
&self,
model: &LlmModel,
reasoning_effort: Option<ReasoningEffort>,
cwd: &Path,
) -> AgentSpec
pub fn resolve_default( &self, model: &LlmModel, reasoning_effort: Option<ReasoningEffort>, cwd: &Path, ) -> AgentSpec
Resolve and return a default (no-mode) agent spec ready for runtime use.
Trait Implementations§
Source§impl Clone for AgentCatalog
impl Clone for AgentCatalog
Source§fn clone(&self) -> AgentCatalog
fn clone(&self) -> AgentCatalog
Returns a duplicate of the value. Read more
1.0.0 · 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 Freeze for AgentCatalog
impl RefUnwindSafe for AgentCatalog
impl Send for AgentCatalog
impl Sync for AgentCatalog
impl Unpin for AgentCatalog
impl UnsafeUnpin for AgentCatalog
impl UnwindSafe for AgentCatalog
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