pub struct Spec {Show 15 fields
pub identity: Option<Identity>,
pub security: Security,
pub capabilities: Capabilities,
pub budgets: Option<Budgets>,
pub tools: Vec<ToolGrant>,
pub context: ContextGrants,
pub oversight: Option<Oversight>,
pub execution: Option<Execution>,
pub topology: Option<Topology>,
pub models: Option<Models>,
pub model: Option<ModelRef>,
pub input: Option<Input>,
pub output: Option<Output>,
pub memory: Option<Memory>,
pub data_subjects: Vec<DataSubject>,
}Expand description
The declaration proper.
Fields§
§identity: Option<Identity>Who the agent is told it is.
Optional, because an embedder may compose its prompt in code. Supplying
it here is what makes the prompt part of the manifest’s digest — see
Identity.
security: Security§capabilities: Capabilities§budgets: Option<Budgets>Absent means unbounded, and that is a decision the manifest has to
state out loud — see Manifest::validate.
tools: Vec<ToolGrant>Tools this agent may call. An empty list grants nothing.
context: ContextGrantsExternal context this agent may retrieve.
Separate from tools because reads of prompts/resources do not grant an action, but they still cross a trust and data-egress boundary and must not be invisible in a manifested agent’s review artifact.
oversight: Option<Oversight>Whether a human decides before this agent’s answer is returned.
Only meaningful with execution: a hand-written skill
chooses its own moment to ask, and a declaration this crate could not
enforce would be exactly the decoration Manifest::validate refuses.
So oversight without execution is rejected rather than ignored.
execution: Option<Execution>How this agent runs — and whether it needs any code at all.
Declaring it makes the agent fully declarative: the runtime supplies
the behaviour and the embedder writes no skill. Omitting it means the
behaviour is a registered Skill, and this manifest
governs its boundary rather than its conduct.
The difference is what the digest covers. A declarative agent is content-addressed in its entirety; a coded one is content-addressed only as far as its declaration reaches.
topology: Option<Topology>What this agent is in a multi-agent arrangement.
Absent means Topology::default — a lone specialist, which is the
only shape with no inter-agent failure surface.
models: Option<Models>Which models this agent runs on.
Absent means wired in code. models: {} means no inference at all,
declared on purpose — a rules-only agent is a legitimate design, and
saying so out loud is what distinguishes it from one whose model wiring
somebody forgot.
Unlike budgets, absence is not refused: an unstated
budget is unbounded spend, whereas an unstated model is simply a wiring
decision the embedder makes. The asymmetry is deliberate — refuse the
silence that costs money, not the silence that costs nothing.
model: Option<ModelRef>Shorthand for models: { privileged: … }, the single-model case.
Resolved into models before anything reads the
document, so the digest is over the longhand: the two spellings of one
declaration have one identity. Refused beside models, which would be
two answers to one question.
input: Option<Input>The shape of what this agent takes.
Optional, because a caller writing Rust against a skill it also wrote
needs no declaration. See Input for the caller that does.
output: Option<Output>The shape of what this agent returns.
Optional, because not every agent has a machine-readable result. See
Output for why declaring it here rather than in code is the point.
memory: Option<Memory>What this agent reads from and writes to durable memory.
data_subjects: Vec<DataSubject>Whose data a run of this agent takes in, read from the run.
Each binding is resolved once per run into its DataSubjectBound
record, and every value derived from the run’s input, events and case
state is attributed to it, so a subject’s trace follows that data to
the effects it reached. A binding that resolves to nothing refuses the
run.
Trait Implementations§
Source§impl<'de> Deserialize<'de> for Spec
impl<'de> Deserialize<'de> for Spec
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Source§impl JsonSchema for Spec
impl JsonSchema for Spec
Source§fn schema_id() -> Cow<'static, str>
fn schema_id() -> Cow<'static, str>
Source§fn json_schema(generator: &mut SchemaGenerator) -> Schema
fn json_schema(generator: &mut SchemaGenerator) -> Schema
Source§fn inline_schema() -> bool
fn inline_schema() -> bool
$ref keyword. Read moreimpl StructuralPartialEq for Spec
Auto Trait Implementations§
impl !Freeze for Spec
impl RefUnwindSafe for Spec
impl Send for Spec
impl Sync for Spec
impl Unpin for Spec
impl UnsafeUnpin for Spec
impl UnwindSafe for Spec
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
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 more