pub struct AgentSpec {
pub spec_id: Uuid,
pub spec_digest: String,
pub git_sha: String,
pub graph_digest: String,
pub prompts_digest: String,
pub tools_digest: String,
pub config_digest: String,
pub created_at: DateTime<Utc>,
pub metadata: Value,
}Expand description
Canonical specification for an agent, including all digest components.
Fields§
§spec_id: UuidUnique identifier for this spec version.
spec_digest: StringSHA256 hex digest of canonical JSON representation.
git_sha: StringGit commit SHA where this spec was defined.
graph_digest: StringSHA256 hex of graph definition bytes.
prompts_digest: StringSHA256 hex of prompts definition.
tools_digest: StringSHA256 hex of tools definition.
config_digest: StringSHA256 hex of configuration.
created_at: DateTime<Utc>When this spec was created.
metadata: ValueAdditional metadata.
Implementations§
Source§impl AgentSpec
impl AgentSpec
Sourcepub fn new(
git_sha: String,
graph_digest: String,
prompts_digest: String,
tools_digest: String,
config_digest: String,
) -> Result<Self>
pub fn new( git_sha: String, graph_digest: String, prompts_digest: String, tools_digest: String, config_digest: String, ) -> Result<Self>
Create a new agent spec with computed digest.
Sourcepub fn compute_digest(fields: &AgentSpecFields) -> Result<String>
pub fn compute_digest(fields: &AgentSpecFields) -> Result<String>
Compute stable SHA256 digest from canonical JSON (RFC 8785-compliant).
Sourcepub fn verify_digest(&self) -> Result<()>
pub fn verify_digest(&self) -> Result<()>
Verify that spec_digest matches computed digest.
Trait Implementations§
Source§impl<'de> Deserialize<'de> for AgentSpec
impl<'de> Deserialize<'de> for AgentSpec
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>,
Deserialize this value from the given Serde deserializer. Read more
impl Eq for AgentSpec
impl StructuralPartialEq for AgentSpec
Auto Trait Implementations§
impl Freeze for AgentSpec
impl RefUnwindSafe for AgentSpec
impl Send for AgentSpec
impl Sync for AgentSpec
impl Unpin for AgentSpec
impl UnsafeUnpin for AgentSpec
impl UnwindSafe for AgentSpec
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
Mutably borrows from an owned value. Read more
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.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>
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 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>
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