#[derive(thiserror::Error)]
pub enum ManifestError {
#[error("manifest is not well-formed: {0}")]
Syntax(String),
#[error(
"this is a '{kind}' at '{api_version}' — expected an 'Agent' at \
'agentplane.hupe1980.github.io/v1alpha1'. A manifest whose meaning the \
runtime has to guess is worse than no manifest"
)]
WrongDocument { api_version: String, kind: String },
#[error("{0} is empty — declare it or remove it, but do not leave it blank")]
Empty(&'static str),
#[error(
"spec.output.schema is {found}, not a JSON Schema object — a result \
contract the runtime cannot hand to a provider is a contract in name only"
)]
NotASchema { found: &'static str },
#[error("spec.topology declares {detail}")]
IncoherentTopology { detail: &'static str },
#[error("{field} cannot be enforced here: {detail}")]
Unenforceable {
field: &'static str,
detail: &'static str,
},
#[error(
"no budgets declared. An agent with no ceiling is the one that runs up a \
bill nobody authorised — write `budgets: {{}}` if you mean unbounded, so \
that the decision is in the file rather than in its absence"
)]
Unbounded,
}
crate::core::error::debug_is_display!(ManifestError);