Skip to main content

SpecBuilder

Struct SpecBuilder 

Source
pub struct SpecBuilder<S: State = Empty> { /* private fields */ }
Expand description

Use builder syntax to set the inputs and finish with build().

Implementations§

Source§

impl<S: State> SpecBuilder<S>

Source

pub fn build(self) -> Spec
where S: IsComplete,

Finish building and return the requested object

Source

pub fn name(self, value: Name) -> SpecBuilder<SetName<S>>
where S::Name: IsUnset,

Required.

Stable workflow-facing agent name.

This is an identifier such as manager-daily-brief or booking-triage, not a human display label. It connects prompt packets, outputs, and audit evidence back to the spec that constrained the agent run.

Source

pub fn purpose(self, value: Purpose) -> SpecBuilder<SetPurpose<S>>
where S::Purpose: IsUnset,

Required.

Business purpose for the agent’s draft or evidence work.

The purpose should state the resort operation being supported, such as summarizing labor risk, drafting customer-safe follow-up, or routing vaccine-document ambiguity; it does not grant live-action authority.

Source

pub fn allowed_tools( self, value: Vec<ToolName>, ) -> SpecBuilder<SetAllowedTools<S>>
where S::AllowedTools: IsUnset,

Required.

Tool names the runtime may expose to this agent.

These should be read-only, draft-only, or task-creation surfaces scoped to the workflow. They are the positive capability list for context building, not permission to bypass review gates or mutate source systems.

Source

pub fn forbidden_actions( self, value: Vec<ForbiddenAction>, ) -> SpecBuilder<SetForbiddenActions<S>>
where S::ForbiddenActions: IsUnset,

Required.

Live or unsafe actions the agent must not perform directly.

Examples include confirming bookings, promising availability, changing labor schedules, waiving deposits, diagnosing pets, or sending customer messages without approval.

Source

pub fn default_review_gates( self, value: Vec<ReviewGate>, ) -> SpecBuilder<SetDefaultReviewGates<S>>
where S::DefaultReviewGates: IsUnset,

Required.

Human or deterministic app review gates required for the workflow.

These gates keep manager approval, customer-message approval, medical document review, and similar authority outside the model-generated output.

Auto Trait Implementations§

§

impl<S> Freeze for SpecBuilder<S>

§

impl<S> RefUnwindSafe for SpecBuilder<S>

§

impl<S> Send for SpecBuilder<S>

§

impl<S> Sync for SpecBuilder<S>

§

impl<S> Unpin for SpecBuilder<S>

§

impl<S> UnsafeUnpin for SpecBuilder<S>

§

impl<S> UnwindSafe for SpecBuilder<S>

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.

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, 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.