pub struct DeclarativeAgentSpec {Show 13 fields
pub id: String,
pub name: String,
pub identity: String,
pub tools: Vec<String>,
pub denied_tools: Vec<String>,
pub standing_goal: String,
pub goal: Option<DeclarativeGoal>,
pub cadence: Option<AgentCadence>,
pub scenarios: Vec<Scenario>,
pub builder_draft: Option<AgentBuilderDraft>,
pub previous: Option<Box<DeclarativeAgentSpec>>,
pub enabled: bool,
pub context: ContextPolicy,
}Expand description
A declarative, in-daemon agent.
Fields§
§id: StringFilename-safe id (derived from the project slug).
name: String§identity: StringSystem prompt — who the agent is and how it behaves.
tools: Vec<String>Allowlist of tool names the agent may call. The daemon exposes ONLY these to the model; anything else is invisible. Empty = no tools (a pure-reasoning agent).
denied_tools: Vec<String>Extra hard denials layered under the allowlist (belt and suspenders).
standing_goal: StringThe agent’s persistent objective, prepended to every run.
goal: Option<DeclarativeGoal>Optional deterministic completion contract. This is not shown to the model as a tool; it is the runtime-owned verifier for each invocation.
cadence: Option<AgentCadence>The user’s structured cadence request. Existing specs predate this field, so absence remains valid and means no cadence was requested.
scenarios: Vec<Scenario>Acceptance scenarios — the contract the coder→agent loop drives to green.
builder_draft: Option<AgentBuilderDraft>The seven user-authored Agent Builder answers and selected template. Legacy and hand-authored specs have no draft and continue to load.
previous: Option<Box<DeclarativeAgentSpec>>The immediately preceding registered version. Upsert always truncates this to one level, so repeated edits cannot grow an unbounded history.
enabled: boolLifecycle toggle. A disabled agent stays registered but won’t run.
context: ContextPolicyWho manages the conversation context of a run: CAR (compaction keyed to the model’s context window, the default) or the agent itself.
#[serde(default)] is load-bearing: every spec already written to
declagents.json predates this field and must keep loading, with the
same managed behavior a new one gets.
Implementations§
Trait Implementations§
Source§impl Clone for DeclarativeAgentSpec
impl Clone for DeclarativeAgentSpec
Source§fn clone(&self) -> DeclarativeAgentSpec
fn clone(&self) -> DeclarativeAgentSpec
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for DeclarativeAgentSpec
impl Debug for DeclarativeAgentSpec
Source§impl<'de> Deserialize<'de> for DeclarativeAgentSpec
impl<'de> Deserialize<'de> for DeclarativeAgentSpec
Source§fn deserialize<__D>(
__deserializer: __D,
) -> Result<DeclarativeAgentSpec, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(
__deserializer: __D,
) -> Result<DeclarativeAgentSpec, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
Source§impl PartialEq for DeclarativeAgentSpec
impl PartialEq for DeclarativeAgentSpec
Source§impl Serialize for DeclarativeAgentSpec
impl Serialize for DeclarativeAgentSpec
Source§fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
impl StructuralPartialEq for DeclarativeAgentSpec
Auto Trait Implementations§
impl Freeze for DeclarativeAgentSpec
impl RefUnwindSafe for DeclarativeAgentSpec
impl Send for DeclarativeAgentSpec
impl Sync for DeclarativeAgentSpec
impl Unpin for DeclarativeAgentSpec
impl UnsafeUnpin for DeclarativeAgentSpec
impl UnwindSafe for DeclarativeAgentSpec
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>,
impl<S, T> Duplex<S> for Twhere
T: FromSample<S> + ToSample<S>,
impl<T> ErasedDestructor for Twhere
T: 'static,
Source§impl<S> FromSample<S> for S
impl<S> FromSample<S> for S
fn from_sample_(s: S) -> S
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