pub struct Directive {Show 22 fields
pub directive_id: String,
pub agent_id: String,
pub project_root: String,
pub kind: DirectiveKind,
pub subject: String,
pub version: u64,
pub slot: Option<String>,
pub worker_id: Option<String>,
pub task_id: Option<String>,
pub vault_id: String,
pub digest: String,
pub message_id: String,
pub state: DirectiveState,
pub reason_code: Option<String>,
pub reason: Option<String>,
pub reported: Option<DirectiveState>,
pub text: String,
pub release_sha256: Option<String>,
pub release_id: Option<String>,
pub released_at: Option<String>,
pub brief_sha256: Option<String>,
pub goal_sha256: Option<String>,
}Expand description
One directive for one local agent.
Fields§
§directive_id: Stringplan_id:version:slot for a plan, decision_id:status for a decision.
agent_id: String§project_root: String§kind: DirectiveKind§subject: Stringplan_id or decision_id.
version: u64Plan version; 0 for a decision.
slot: Option<String>§worker_id: Option<String>§task_id: Option<String>§vault_id: StringThe Cloud vault id the change came from.
digest: StringThe plan’s content_sha256; empty for a decision.
message_id: StringThe bus entry that carried it; empty while offered.
state: DirectiveState§reason_code: Option<String>§reason: Option<String>The agent’s own words; local only, never sent to Cloud.
reported: Option<DirectiveState>The last state Cloud recorded for this agent.
text: StringThe bus text the agent reads once the directive is released.
release_sha256: Option<String>SHA-256 (hex) of the release id: what a release is matched
against. Only this digest is in directives.json, which an agent’s
read tools may open.
release_id: Option<String>The release id itself (rid, 64 hex of 32 random bytes): the one
handle that releases this directive for this agent. In memory only:
kept in RELEASE_IDS_FILE (a secret path every agent read tool
refuses) and filled by DirectiveStore::load_for_app for the
app’s read (cloud.plan.updates), while offered.
released_at: Option<String>When the person released it (RFC 3339 UTC): the local audit of the release, shown with the version and agent on the app’s read.
brief_sha256: Option<String>The signed brief_sha256 of the agent’s slot (sha256:<64 hex> of
the brief’s UTF-8 bytes); None for a plan-wide directive and a
decision. A released brief must match it.
goal_sha256: Option<String>sha256:<64 hex> of the verified plan body’s goal; None for a
decision (and a record from before). A released goal must match it.
Trait Implementations§
Source§impl<'de> Deserialize<'de> for Directive
impl<'de> Deserialize<'de> for Directive
Source§fn deserialize<__D>(
__deserializer: __D,
) -> Result<Directive, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(
__deserializer: __D,
) -> Result<Directive, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
impl Eq for Directive
Source§impl Serialize for Directive
impl Serialize for Directive
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 Directive
Auto Trait Implementations§
impl Forget for Directive
impl Freeze for Directive
impl Move for Directive
impl RefUnwindSafe for Directive
impl Send for Directivewhere
RawVecInner: Send,
impl Sync for Directivewhere
RawVecInner: Sync,
impl Unpin for Directive
impl UnsafeUnpin for Directive
impl UnwindSafe for Directivewhere
RawVecInner: UnwindSafe,
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
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