Skip to main content

Spec

Struct Spec 

Source
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: ContextGrants

External 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 Clone for Spec

Source§

fn clone(&self) -> Self

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for Spec

Source§

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

Formats the value using the given formatter. Read more
Source§

impl Default for Spec

Source§

fn default() -> Self

Returns the “default value” for a type. Read more
Source§

impl<'de> Deserialize<'de> for Spec

Source§

fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>
where __D: Deserializer<'de>,

Deserialize this value from the given Serde deserializer. Read more
Source§

impl JsonSchema for Spec

Source§

fn schema_name() -> Cow<'static, str>

The name of the generated JSON Schema. Read more
Source§

fn schema_id() -> Cow<'static, str>

Returns a string that uniquely identifies the schema produced by this type. Read more
Source§

fn json_schema(generator: &mut SchemaGenerator) -> Schema

Generates a JSON Schema for this type. Read more
Source§

fn inline_schema() -> bool

Whether JSON Schemas generated for this type should be included directly in parent schemas, rather than being re-used where possible using the $ref keyword. Read more
Source§

impl PartialEq for Spec

Source§

fn eq(&self, other: &Self) -> bool

Equality operator ==. Read more
1.0.0 (const: unstable) · Source§

fn ne(&self, other: &Rhs) -> bool

Inequality operator !=. Read more
Source§

impl Serialize for Spec

Source§

fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error>
where __S: Serializer,

Serialize this value into the given Serde serializer. Read more
Source§

impl 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> 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<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
where ST: ?Sized, DT: ?Sized,

Source§

impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
where ST: ?Sized, DT: ?Sized,

Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> DeserializeOwned for T
where T: for<'de> Deserialize<'de>,

Source§

impl<T> DynClone for T
where T: Clone,

Source§

fn __clone_box(&self, _: Private) -> *mut ()

Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T> FromRef<T> for T
where T: Clone,

Source§

fn from_ref(input: &T) -> T

Converts to this type from a reference to the input type.
Source§

impl<T> Instrument for T

Source§

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

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

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

impl<Unshared, Shared> IntoShared<Shared> for Unshared
where Shared: FromUnshared<Unshared>,

Source§

fn into_shared(self) -> Shared

Creates a shared type from an unshared type.
Source§

impl<T> MaybeSend for T
where T: Send,

Source§

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

Source§

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

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> Read<Exclusive, BecauseExclusive> for T
where T: ?Sized,

Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

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

Source§

type Error = !

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

fn try_from(value: U) -> Result<T, !>

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

impl<V, T> VZip<V> for T
where V: MultiLane<T>,

Source§

fn vzip(self) -> V

Source§

impl<T> WithSubscriber for T

Source§

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

fn with_current_subscriber(self) -> WithDispatch<Self> ⓘ

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