pub struct SubagentIndexLoader;Available on crate feature
cli-integration only.Expand description
Loader for SubagentIndex - only loads metadata, not full prompt.
Implementations§
Source§impl SubagentIndexLoader
impl SubagentIndexLoader
pub fn new() -> Self
Sourcepub fn parse_index(&self, content: &str, path: &Path) -> Result<SubagentIndex>
pub fn parse_index(&self, content: &str, path: &Path) -> Result<SubagentIndex>
Parse a subagent file and create an index (metadata only). The prompt content is NOT loaded - it will be loaded lazily via ContentSource.
Sourcepub fn parse_frontmatter_only(
&self,
content: &str,
path: &Path,
) -> Result<SubagentIndex>
pub fn parse_frontmatter_only( &self, content: &str, path: &Path, ) -> Result<SubagentIndex>
Parse frontmatter only from content, returning the index.
Sourcepub async fn load_file(&self, path: &Path) -> Result<SubagentIndex>
pub async fn load_file(&self, path: &Path) -> Result<SubagentIndex>
Load a subagent index from a file.
Sourcepub async fn scan_directory(&self, dir: &Path) -> Result<Vec<SubagentIndex>>
pub async fn scan_directory(&self, dir: &Path) -> Result<Vec<SubagentIndex>>
Scan a directory for subagent files and create indices.
Sourcepub fn create_inline(
name: impl Into<String>,
description: impl Into<String>,
prompt: impl Into<String>,
) -> SubagentIndex
pub fn create_inline( name: impl Into<String>, description: impl Into<String>, prompt: impl Into<String>, ) -> SubagentIndex
Create an inline subagent index with in-memory content.
Trait Implementations§
Source§impl Clone for SubagentIndexLoader
impl Clone for SubagentIndexLoader
Source§fn clone(&self) -> SubagentIndexLoader
fn clone(&self) -> SubagentIndexLoader
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 moreSource§impl Debug for SubagentIndexLoader
impl Debug for SubagentIndexLoader
Source§impl Default for SubagentIndexLoader
impl Default for SubagentIndexLoader
Source§fn default() -> SubagentIndexLoader
fn default() -> SubagentIndexLoader
Returns the “default value” for a type. Read more
impl Copy for SubagentIndexLoader
Auto Trait Implementations§
impl Freeze for SubagentIndexLoader
impl RefUnwindSafe for SubagentIndexLoader
impl Send for SubagentIndexLoader
impl Sync for SubagentIndexLoader
impl Unpin for SubagentIndexLoader
impl UnwindSafe for SubagentIndexLoader
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> FutureExt for T
impl<T> FutureExt for T
Source§fn with_context(self, otel_cx: Context) -> WithContext<Self>
fn with_context(self, otel_cx: Context) -> WithContext<Self>
Source§fn with_current_context(self) -> WithContext<Self>
fn with_current_context(self) -> WithContext<Self>
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>
Converts
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>
Converts
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 moreCreates a shared type from an unshared type.