Skip to main content

AssemblyError

Enum AssemblyError 

pub enum AssemblyError {
Show 40 variants Manifest(Error), DuplicateTool { tool: String, }, UnknownTool { origin: Origin, tool: String, suggestion: Option<String>, available: Vec<String>, }, UnknownPlugin { origin: Origin, plugin: String, suggestion: Option<String>, available: Vec<String>, }, UnknownRetryTool { origin: Origin, tool: String, suggestion: Option<String>, available: Vec<String>, }, InvalidRetry { origin: Origin, tool: String, reason: String, }, NoToolMatches { origin: Origin, pattern: String, available: Vec<String>, }, Template { origin: Origin, line: u32, problem: TemplateProblem, }, UnknownVar { origin: Origin, line: u32, var: String, suggestion: Option<String>, declared: Vec<String>, }, UnknownVarValue { origin: Origin, var: String, suggestion: Option<String>, declared: Vec<String>, }, UnusedVar { origin: Origin, var: String, }, UnsetVar { origin: Origin, var: String, }, UnknownAgent { agent: String, suggestion: Option<String>, known: Vec<String>, }, ModelAlias { origin: Origin, alias: String, problem: AliasProblem, }, InvalidReasoningEffort { origin: Origin, source: NotAnEffort, }, UnknownModelPreset { origin: Origin, preset: String, suggestion: Option<String>, known: Vec<String>, }, ReasoningEffort { origin: Origin, effort: String, set_by: EffortSource, model: String, suggestion: Option<String>, allowed: Vec<String>, }, OutputCap { origin: Origin, set_by: CapSource, cap: u32, limit: u32, model: String, }, Build { origin: Origin, source: BuildError, }, UnknownSkill { origin: Origin, field: SkillField, skill: String, suggestion: Option<String>, available: Vec<String>, }, PreloadNotSelected { origin: Origin, skill: String, selected: Vec<String>, }, SkillFilesUnavailable { origin: Origin, skill: String, file: String, }, SkillTooLarge { origin: Origin, skill: String, bytes: u64, limit: u64, }, ReservedToolName { origin: Origin, tool: String, }, SubagentToolClash { origin: Origin, parent: String, tool: String, clash: ToolClash, }, GroupName { origin: Origin, group: String, reason: &'static str, }, SearchableGroup { origin: Origin, group: String, }, GroupOverlap { origin: Origin, tool: String, first: String, second: String, }, ReservedLoaderName { origin: Origin, tool: String, }, RemoteAuth { origin: Origin, var: String, problem: RemoteAuthProblem, }, RemoteUrl { origin: Origin, url: String, problem: RemoteUrlProblem, }, RemoteNotEnabled { origin: Origin, }, McpNotConnected { origin: Origin, servers: Vec<String>, }, McpChanged { origin: Origin, }, McpForeignTool { origin: Origin, tool: String, servers: Vec<String>, }, McpToolClash { origin: Origin, tool: String, }, McpUnknownAgent { agent: String, suggestion: Option<String>, known: Vec<String>, }, Mcp { origin: Origin, class: ErrorClass, source: Box<dyn Error + Send + Sync>, }, NotOneAgent { root: PathBuf, found: Vec<String>, }, MissingCardDescription { origin: Origin, },
}
Expand description

Why an AgentDef could not be bound to agents.

A mistake in the agent’s files or in how it is put together, found when the process starts. The same input never succeeds, so every variant is [ErrorClass::Invalid] (except Manifest, which keeps the class of its source).

Variants§

§

Manifest(Error)

The manifest could not be read: an embedded manifest that does not decode, or a source that could not be loaded.

§

DuplicateTool

Two registered tools have one name, so tools: could not tell them apart.

Fields

§tool: String

The repeated name.

§

UnknownTool

tools: names a tool nobody registered.

Fields

§origin: Origin

The agent and file that name it.

§tool: String

The name as written.

§suggestion: Option<String>

The closest registered name, when one is close.

§available: Vec<String>

Every registered tool, in registration order.

§

UnknownPlugin

plugins: names a plugin the deployment did not register (ADR 0050, slice H6): the agent does not start.

Fields

§origin: Origin

The agent and file that name it.

§plugin: String

The name as written.

§suggestion: Option<String>

The closest registered name, when one is close.

§available: Vec<String>

Every registered plugin.

§

UnknownRetryTool

retry: names a tool the agent does not have (ADR 0061).

Fields

§origin: Origin

The agent and file that name it.

§tool: String

The name as written.

§suggestion: Option<String>

The closest of the agent’s tools, when one is close.

§available: Vec<String>

The agent’s tools, in order.

§

InvalidRetry

A retry: entry that is not a policy, in a manifest the loader did not check: one built in code, or embedded by another version (the loader refuses such an entry in a file).

Fields

§origin: Origin

The agent and file.

§tool: String

The tool it is for.

§reason: String

What is wrong.

§

NoToolMatches

A tools: pattern (linear__*) matches no registered tool.

Fields

§origin: Origin

The agent and file that name it.

§pattern: String

The pattern as written.

§available: Vec<String>

Every registered tool, in registration order.

§

Template

A {{ in the prompt that is not a placeholder.

Fields

§origin: Origin

The agent and the prompt file (instructions.md or an instructions/*.md part).

§line: u32

The line within the body of that file: the frontmatter is not counted.

§problem: TemplateProblem

What is wrong.

§

UnknownVar

The prompt uses a placeholder the agent does not declare under vars.

Fields

§origin: Origin

The agent and the prompt file.

§line: u32

The line within the body of that file: the frontmatter is not counted.

§var: String

The var as written.

§suggestion: Option<String>

The closest declared var, when one is close.

§declared: Vec<String>

Every declared var, sorted.

§

UnknownVarValue

The code supplied a value for a var the agent does not declare.

Fields

§origin: Origin

The agent and file whose vars lack it.

§var: String

The var as supplied.

§suggestion: Option<String>

The closest declared var, when one is close.

§declared: Vec<String>

Every declared var, sorted.

§

UnusedVar

A var is declared and the prompt never uses it.

Fields

§origin: Origin

The agent and file that declare it.

§var: String

The var.

§

UnsetVar

A var the prompt uses has no value: it is declared with an empty default (vars: { repo: }) and the code did not supply one.

Fields

§origin: Origin

The agent and file that declare it.

§var: String

The var.

§

UnknownAgent

Values were supplied for an agent the definition does not contain.

Fields

§agent: String

The name as given to AgentDef::agent_var.

§suggestion: Option<String>

The closest agent, when one is close.

§known: Vec<String>

Every agent of the definition, root first.

§

ModelAlias

A model alias was refused.

Fields

§origin: Origin

The agent that uses the alias, and its file.

§alias: String

The alias.

§problem: AliasProblem

Why it was refused.

§

InvalidReasoningEffort

The agent’s reasoning_effort is not one of the seven levels (ADR 0063).

Fields

§origin: Origin

The agent and file that set it.

§source: NotAnEffort

What is wrong, naming the word and the seven levels.

§

UnknownModelPreset

The agent’s model_preset names a preset the deployment’s model profiles do not declare (ADR 0064).

Fields

§origin: Origin

The agent and file that name it.

§preset: String

The preset as written.

§suggestion: Option<String>

The closest declared preset, when one is close.

§known: Vec<String>

Every declared preset, sorted.

§

ReasoningEffort

A reasoning effort the agent resolves to is not one of the levels of its model’s profile (ADR 0063, decision 4): its own reasoning_effort, a preset its model_preset names, or the model profile’s (its own value or its base preset’s).

Fields

§origin: Origin

The agent and file whose calls would send it.

§effort: String

The level as resolved, by its wire word.

§set_by: EffortSource

Where it was set.

§model: String

The model alias whose profile bounds it.

§suggestion: Option<String>

The closest level the model takes, when one is close.

§allowed: Vec<String>

The levels the model takes, lowest first; empty when it takes none.

§

OutputCap

A preset’s output cap is above the maximum the model documents for one request (ADR 0064, decision 2): a preset is the deployment’s promise, so it is refused rather than clamped.

Fields

§origin: Origin

The agent and file whose calls would send it.

§set_by: CapSource

Where it was set.

§cap: u32

The value the preset asked for.

§limit: u32

The model’s documented maximum for one request.

§model: String

The model alias whose profile bounds it.

§

Build

LlmAgent refused to be built: a tool needs state the composition root did not give (BoundDef::state).

Fields

§origin: Origin

The agent that could not be built.

§source: BuildError

Why.

§

UnknownSkill

skills: or preload_skills: names a skill the agent does not have. An agent’s skills are the ones under its own skills/; a subagent inherits none.

Fields

§origin: Origin

The agent and file that name it.

§field: SkillField

The key that names it.

§skill: String

The name as written.

§suggestion: Option<String>

The closest skill of the agent, when one is close.

§available: Vec<String>

Every skill of the agent, sorted.

§

PreloadNotSelected

preload_skills: names a skill that skills: does not select.

Fields

§origin: Origin

The agent and file that name it.

§skill: String

The skill.

§selected: Vec<String>

The skills skills: selects, in order.

§

SkillFilesUnavailable

A selected skill bundles a file whose bytes were not supplied: the manifest was made without its source. An embedded agent, AgentDef::from_source and AgentDef::resources_from supply them.

Fields

§origin: Origin

The agent that uses the skill.

§skill: String

The skill.

§file: String

The first file without bytes.

§

SkillTooLarge

A skill bundles more than SKILL_RESOURCE_LIMIT bytes: they are held in memory, so the build script refuses it too.

Fields

§origin: Origin

The agent that owns the skill and the skill’s SKILL.md.

§skill: String

The skill.

§bytes: u64

The size of its files (or the running total when the limit was passed).

§limit: u64

The limit.

§

ReservedToolName

A tool the agent gets from its own definition has a name a registered tool already has: the skills’ load_skill and read_skill_file, a group’s load__group__<name> loader, or the reserved load__ prefix.

Fields

§origin: Origin

The agent and file.

§tool: String

The name in conflict.

§

SubagentToolClash

A subagent is called as a tool named after it, and its parent already has a tool of that name.

Fields

§origin: Origin

The subagent and its file.

§parent: String

The registration name of the parent.

§tool: String

The tool name, which is the subagent’s name.

§clash: ToolClash

What it collides with.

§

GroupName

A group’s name or keywords do not fit, or two groups have one name (ADR 0066).

Fields

§origin: Origin

The agent and file.

§group: String

The group.

§reason: &'static str

What is wrong with it.

§

SearchableGroup

A searchable group is not built yet (ADR 0066, slice S2).

Fields

§origin: Origin

The agent and file.

§group: String

The group.

§

GroupOverlap

A tool belongs to two groups. A load must append it once, from one group, and the refusal that names the group would be ambiguous.

Fields

§origin: Origin

The agent and file.

§tool: String

The tool.

§first: String

The group that already has it.

§second: String

The group that also names it.

§

ReservedLoaderName

A tool name starts with the loaders’ reserved prefix (load__). The loaders are own tools named load__group__<name>, and an MCP tool is <server>__<tool>, so the names would collide.

Fields

§origin: Origin

The agent and file.

§tool: String

The name in conflict.

§

RemoteAuth

A remote subagent’s auth: bearer:VAR names an environment variable that cannot give a token. The token is read at AgentDef::bind, and a remote subagent with no usable credential is refused (fail closed) rather than called without.

Fields

§origin: Origin

The remote subagent and its file.

§var: String

The variable’s name (never its value).

§problem: RemoteAuthProblem

What is wrong with it.

§

RemoteUrl

A remote subagent’s a2a: URL cannot be used.

Fields

§origin: Origin

The remote subagent and its file.

§url: String

The URL as it can be shown: without a user name or password, and without a query.

§problem: RemoteUrlProblem

Why.

§

RemoteNotEnabled

A subagent file has a2a:, which makes it a remote subagent, and this build has no A2A client: adam-assembly was built without its feature remote (on by default). Refused at AgentDef::bind before any secret is read, so the agent never starts without a tool its files promise (fail closed).

Fields

§origin: Origin

The remote subagent and its file.

§

McpNotConnected

An agent’s mcp.json lists MCP servers and nothing was connected for it: the tools of those servers would be missing, and an agent must not start without tools its files promise (fail closed).

Fields

§origin: Origin

The agent and its mcp.json.

§servers: Vec<String>

The servers the file lists, sorted.

§

McpChanged

The servers were connected from an mcp.json that is not the one the agent has now.

Fields

§origin: Origin

The agent and its mcp.json.

§

McpForeignTool

A tool given for an agent with AgentDef::mcp_tools is not named after one of the servers of the agent’s own mcp.json.

Fields

§origin: Origin

The agent and its mcp.json.

§tool: String

The tool’s name.

§servers: Vec<String>

The servers of the agent’s mcp.json, sorted.

§

McpToolClash

An MCP tool has the name of a registered tool, so tools: could not tell them apart.

Fields

§origin: Origin

The agent and its mcp.json.

§tool: String

The name in conflict.

§

McpUnknownAgent

AgentDef::mcp_tools names an agent the definition does not contain.

Fields

§agent: String

The name as given to AgentDef::mcp_tools.

§suggestion: Option<String>

The closest agent, when one is close.

§known: Vec<String>

Every agent of the definition, root first.

§

Mcp

The MCP servers of an agent could not be connected. Only AgentDef::connect_mcp (feature mcp) makes it, but the variant is always there, so that the feature adds no variant to this exhaustive enum and a match that compiles with the feature compiles without it.

Fields

§origin: Origin

The agent and its mcp.json.

§class: ErrorClass

The class of the client’s error, kept here because source is opaque: a server that is down is [ErrorClass::Transient], the rest of what the client refuses is [ErrorClass::Invalid].

§source: Box<dyn Error + Send + Sync>

Why: with the feature mcp, an adam_mcp::Error, which downcast_ref gets back. Boxed: the error of the client is larger than the rest of this enum, and opaque so that this crate’s public type does not name the client without the feature.

§

NotOneAgent

A folder that was to hold one agent holds none, or several (AgentFolder::load): a process serves one agent.

Fields

§root: PathBuf

The folder that was read.

§found: Vec<String>

The root agents it holds, by name; empty when it holds none.

§

MissingCardDescription

The A2A card needs a description and the agent has none.

Fields

§origin: Origin

The root agent and its file.

Trait Implementations§

§

impl Classify for Error

§

fn class(&self) -> ErrorClass

What to do about this error.
§

fn retry_after(&self) -> Option<Duration>

How long to wait before retrying, when the peer said so.
§

fn is_retryable(&self) -> bool

Derived from class; never hand-written.
§

impl Debug for Error

§

fn fmt(&self, f: &mut Formatter<'_>) -> Result<(), Error>

Formats the value using the given formatter. Read more
§

impl Display for Error

§

fn fmt(&self, __formatter: &mut Formatter<'_>) -> Result<(), Error>

Formats the value using the given formatter. Read more
§

impl Error for Error

§

fn source(&self) -> Option<&(dyn Error + 'static)>

Returns the lower-level source of this error, if any. Read more
1.0.0 · Source§

fn description(&self) -> &str

👎Deprecated since 1.42.0:

use the Display impl or to_string()

1.0.0 · Source§

fn cause(&self) -> Option<&dyn Error>

👎Deprecated since 1.33.0:

replaced by Error::source, which can support downcasting

Source§

fn provide<'a>(&'a self, request: &mut Request<'a>)

🔬This is a nightly-only experimental API. (error_generic_member_access)
Provides type-based access to context intended for error reports. Read more
§

impl From<Error> for ReloadError

§

fn from(source: Error) -> ReloadError

Converts to this type from the input type.
§

impl From<Error> for Error

§

fn from(source: Error) -> Error

Converts to this type from the input type.

Auto Trait Implementations§

§

impl !RefUnwindSafe for Error

§

impl !UnwindSafe for Error

§

impl Freeze for Error

§

impl Send for Error

§

impl Sync for Error

§

impl Unpin for Error

§

impl UnsafeUnpin for Error

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

§

impl<T> Instrument for T

§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided [Span], returning an Instrumented wrapper. Read more
§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> IntoEither for T

Source§

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 more
Source§

fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
where F: FnOnce(&Self) -> bool,

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 more
§

impl<T> IntoRequest<T> for T

§

fn into_request(self) -> Request<T>

Wrap the input message T in a tonic::Request
§

impl<L> LayerExt<L> for L

§

fn named_layer<S>(&self, service: S) -> Layered<<L as Layer<S>>::Service, S>
where L: Layer<S>,

Applies the layer to a service and wraps it in [Layered].
§

impl<T> PolicyExt for T
where T: ?Sized,

§

fn and<P, B, E>(self, other: P) -> And<T, P>
where T: Sized + Policy<B, E>, P: Policy<B, E>,

Create a new Policy that returns [Action::Follow] only if self and other return Action::Follow. Read more
§

fn or<P, B, E>(self, other: P) -> Or<T, P>
where T: Sized + Policy<B, E>, P: Policy<B, E>,

Create a new Policy that returns [Action::Follow] if either self or other returns Action::Follow. Read more
Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
§

impl<T> ServiceExt for T

§

fn map_response_body<F>(self, f: F) -> MapResponseBody<Self, F>
where Self: Sized,

Apply a transformation to the response body. Read more
§

fn trace_for_http(self) -> Trace<Self, SharedClassifier<ServerErrorsAsFailures>>
where Self: Sized,

High level tracing that classifies responses using HTTP status codes. Read more
§

fn trace_for_grpc(self) -> Trace<Self, SharedClassifier<GrpcErrorsAsFailures>>
where Self: Sized,

High level tracing that classifies responses using gRPC headers. Read more
§

fn follow_redirects(self) -> FollowRedirect<Self>
where Self: Sized,

Follow redirect resposes using the Standard policy. Read more
Source§

impl<T> ToString for T
where T: Display + ?Sized,

Source§

fn to_string(&self) -> String

Converts the given value to a String. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
§

impl<T> WithSubscriber for T

§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a [WithDispatch] wrapper. Read more
§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a [WithDispatch] wrapper. Read more