pub struct TaskDescriptorV1 {Show 14 fields
pub schema_version: u32,
pub sender: String,
pub recipient: String,
pub tenant_id: String,
pub project_id: String,
pub action: String,
pub issued_at: DateTime<Utc>,
pub expires_at: DateTime<Utc>,
pub idempotency_key: String,
pub description: String,
pub artifact_refs: Vec<AgentArtifactRefV1>,
pub grant_ref: CapabilityGrantRefV1,
pub key_id: String,
pub signature: String,
}Fields§
§schema_version: u32§sender: String§recipient: String§tenant_id: String§project_id: String§action: String§issued_at: DateTime<Utc>§expires_at: DateTime<Utc>§idempotency_key: String§description: String§artifact_refs: Vec<AgentArtifactRefV1>§grant_ref: CapabilityGrantRefV1§key_id: String§signature: StringImplementations§
Source§impl TaskDescriptorV1
impl TaskDescriptorV1
pub fn new( sender: &str, recipient: &str, tenant_id: &str, project_id: &str, action: &str, issued_at: DateTime<Utc>, expires_at: DateTime<Utc>, idempotency_key: &str, description: &str, artifact_refs: Vec<AgentArtifactRefV1>, grant_id: &str, key_id: &str, ) -> Self
Sourcepub fn sign(&mut self, signing_key: &SigningKey)
pub fn sign(&mut self, signing_key: &SigningKey)
Bind every authority-relevant field to an Ed25519 signature over the deterministic signing transcript.
Sourcepub fn signing_bytes(&self) -> Vec<u8> ⓘ
pub fn signing_bytes(&self) -> Vec<u8> ⓘ
Deterministic signing transcript: a domain tag followed by canonical
JSON (recursively sorted keys, no whitespace) of the descriptor with an
empty signature field. Independent of struct field order and of any
map iteration order.
Sourcepub fn content_digest(&self) -> String
pub fn content_digest(&self) -> String
Digest of the signed content, excluding the signature itself.
Idempotency conflict detection compares this digest, so a retry that re-signs byte-identical content stays a duplicate rather than becoming a spurious conflict.
pub fn validate_shape(&self) -> Result<(), TaskAuthorityError>
Fail-closed authority check performed before any task store mutation.
Sender-provided capability claims are never consulted: authority comes
only from the configured peer trust entry resolved by key_id, the
Ed25519 signature over the descriptor, and the configured capability
grant it references.
Trait Implementations§
Source§impl Clone for TaskDescriptorV1
impl Clone for TaskDescriptorV1
Source§impl Debug for TaskDescriptorV1
impl Debug for TaskDescriptorV1
Source§impl<'de> Deserialize<'de> for TaskDescriptorV1
impl<'de> Deserialize<'de> for TaskDescriptorV1
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>,
impl Eq for TaskDescriptorV1
Source§impl PartialEq for TaskDescriptorV1
impl PartialEq for TaskDescriptorV1
Source§impl Serialize for TaskDescriptorV1
impl Serialize for TaskDescriptorV1
impl StructuralPartialEq for TaskDescriptorV1
Auto Trait Implementations§
impl Forget for TaskDescriptorV1
impl Freeze for TaskDescriptorV1
impl Move for TaskDescriptorV1
impl RefUnwindSafe for TaskDescriptorV1
impl Send for TaskDescriptorV1
impl Sync for TaskDescriptorV1
impl Unpin for TaskDescriptorV1
impl UnsafeUnpin for TaskDescriptorV1
impl UnwindSafe for TaskDescriptorV1
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<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
key and return true if they are equal.Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
impl<A, B, T> HttpServerConnExec<A, B> for Twhere
B: Body,
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