pub enum ResolveAgentError {
NotFound {
name: String,
dir: PathBuf,
available: String,
},
Load {
name: String,
source: Error,
},
}Expand description
Failure modes of resolve_agent.
Why: resolve_agent’s callers need to distinguish “nothing named name
exists anywhere” (a caller/LLM mistake — worth listing available agents
for) from “a config for name exists but failed to load/compose” (a real
bug in that specific file, on disk or embedded) — the same two shapes
RunnerError::UnknownAgent/ConfigLoad already distinguish for the
runner’s own narrower <dir>/<name>.md-only lookup (#2897 Slice D).
What: NotFound carries the searched dir and a precomputed
available hint (disk ∪ embedded names, already joined for display —
see available_agent_names). Load wraps the underlying
md_loader/compose error, whether it came from an existing disk file
or a compiled-in embedded asset.
Test: resolve_agent_unknown_name_lists_available_agents,
resolve_agent_disk_parse_error_does_not_fall_back_to_embedded.
Variants§
NotFound
No config for name was found on disk or in the embedded roster.
Fields
Load
A config for name was found (on disk or embedded) but failed to
load, parse, or compose.
Trait Implementations§
Source§impl Debug for ResolveAgentError
impl Debug for ResolveAgentError
Source§impl Display for ResolveAgentError
impl Display for ResolveAgentError
Source§impl Error for ResolveAgentError
impl Error for ResolveAgentError
Source§fn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
1.0.0 · Source§fn description(&self) -> &str
fn description(&self) -> &str
use the Display impl or to_string()
Auto Trait Implementations§
impl Freeze for ResolveAgentError
impl RefUnwindSafe for ResolveAgentError
impl Send for ResolveAgentError
impl Sync for ResolveAgentError
impl Unpin for ResolveAgentError
impl UnsafeUnpin for ResolveAgentError
impl UnwindSafe for ResolveAgentError
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
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> ⓘ
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 moreSource§impl<T> Pointable for T
impl<T> Pointable for T
Source§impl<T> PolicyExt for Twhere
T: ?Sized,
impl<T> PolicyExt for Twhere
T: ?Sized,
Source§impl<T> ToCompactString for Twhere
T: Display,
impl<T> ToCompactString for Twhere
T: Display,
Source§fn try_to_compact_string(&self) -> Result<CompactString, ToCompactStringError>
fn try_to_compact_string(&self) -> Result<CompactString, ToCompactStringError>
ToCompactString::to_compact_string() Read moreSource§fn to_compact_string(&self) -> CompactString
fn to_compact_string(&self) -> CompactString
CompactString. Read more