pub struct Mandate {Show 28 fields
pub id: String,
pub goal_id: String,
pub source_goal_id: Option<String>,
pub name: Option<String>,
pub objective: String,
pub status: MandateStatus,
pub autonomy_mode: MandateAutonomyMode,
pub authority: MandateAuthority,
pub strategy: Option<MandateStrategySnapshot>,
pub objective_control: Option<MandateObjectiveControl>,
pub suspension: Option<MandateSuspension>,
pub constraints: Vec<String>,
pub success_criteria: Vec<String>,
pub stop_conditions: Vec<String>,
pub min_review_secs: i64,
pub max_review_secs: i64,
pub default_review_secs: i64,
pub review_effort: String,
pub next_review_at: String,
pub review_lease_token: Option<String>,
pub review_lease_expires_at: Option<String>,
pub expires_at: Option<String>,
pub confirmed_at: Option<String>,
pub version: i64,
pub owner_principal_id: String,
pub created_by_session: String,
pub created_at: String,
pub updated_at: String,
}Fields§
§id: String§goal_id: StringContinuous orchestration goal used by the durable scheduler/executor.
source_goal_id: Option<String>Optional personal goal that motivated this delegation.
name: Option<String>The short name the owner gave the mandate when creating it, as the model passed it (never parsed from the objective). Shown in lists and cards, and a selector for later actions.
objective: String§status: MandateStatus§autonomy_mode: MandateAutonomyModeExplicit owner-confirmed operating posture. This is separate from the authority envelope so selecting Autopilot cannot authorize a new tool, operation, target, account, effect, or query parameter.
strategy: Option<MandateStrategySnapshot>Owner-confirmed, immutable strategy material. This may guide how the objective is pursued, but it never contributes authority.
objective_control: Option<MandateObjectiveControl>Owner-confirmed measurable control loop. This is policy state, not a promise that the external metric will improve.
suspension: Option<MandateSuspension>Typed reason for a non-active, non-terminal lifecycle state.
constraints: Vec<String>§success_criteria: Vec<String>§stop_conditions: Vec<String>§min_review_secs: i64Lower and upper bounds for an agent-selected next review.
max_review_secs: i64§default_review_secs: i64§review_effort: StringHuman-readable resource policy. Runtime token arithmetic is derived internally from this effort level and the review cadence.
next_review_at: StringDurable next wake time for the MAPE-K deliberation loop.
review_lease_token: Option<String>Short-lived single-writer lease used by heartbeat dispatch.
review_lease_expires_at: Option<String>§expires_at: Option<String>§confirmed_at: Option<String>Durable proof that the owner explicitly confirmed this delegation. Pending-confirmation mandates keep this NULL and cannot be activated or resumed through ordinary lifecycle transitions.
version: i64Authority epoch, incremented whenever owner-controlled configuration or lifecycle state changes so stale decisions and updates fail closed.
owner_principal_id: StringStable authorization principal. Session/bot routes may be linked or moved without changing this identity or inferring equivalence from a session-name suffix.
created_by_session: String§created_at: String§updated_at: StringImplementations§
Source§impl Mandate
impl Mandate
pub fn new( goal_id: &str, source_goal_id: Option<String>, objective: &str, created_by_session: &str, authority: MandateAuthority, min_review_secs: i64, max_review_secs: i64, default_review_secs: i64, ) -> Self
Sourcepub fn has_name(&self, name: &str) -> bool
pub fn has_name(&self, name: &str) -> bool
Whether the owner gave this mandate name (trimmed, ignoring case).
Sourcepub fn scheduled_next_review(&self) -> Option<&str>
pub fn scheduled_next_review(&self) -> Option<&str>
When the next review will wake this mandate; None unless it is
active, because only active mandates are ever claimed.
pub fn is_active(&self) -> bool
pub fn clamp_review_secs(&self, requested: Option<i64>) -> i64
Sourcepub fn review_secs_for_activity(&self, activity: MandateActivityLevel) -> i64
pub fn review_secs_for_activity(&self, activity: MandateActivityLevel) -> i64
Deterministic activity-to-cadence edge in the proactive review graph. The result always remains inside the owner-confirmed bounds.
Sourcepub fn bounded_next_review_at(
&self,
requested_secs: Option<i64>,
now: DateTime<Utc>,
) -> String
pub fn bounded_next_review_at( &self, requested_secs: Option<i64>, now: DateTime<Utc>, ) -> String
Choose the next durable review time without ever scheduling work past the owner-approved expiry boundary.
Sourcepub fn validate_content_bounds(&self) -> Result<(), String>
pub fn validate_content_bounds(&self) -> Result<(), String>
Content bounds shared by every mandate ingestion path. Persistence calls this again so callers cannot bypass the owner-facing tool schema.
Trait Implementations§
Source§impl<'de> Deserialize<'de> for Mandate
impl<'de> Deserialize<'de> for Mandate
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 Mandate
impl StructuralPartialEq for Mandate
Auto Trait Implementations§
impl Forget for Mandate
impl Freeze for Mandatewhere
*const u8 is !null: Freeze,
PhantomData<u8>: Freeze,
PhantomData<String>: Freeze,
PhantomData<MandateOperationScope>: Freeze,
impl Move for Mandate
impl RefUnwindSafe for Mandate
impl Send for Mandatewhere
RawVecInner: Send,
impl Sync for Mandatewhere
RawVecInner: Sync,
impl Unpin for Mandate
impl UnsafeUnpin for Mandatewhere
*const u8 is !null: UnsafeUnpin,
PhantomData<u8>: UnsafeUnpin,
PhantomData<String>: UnsafeUnpin,
PhantomData<MandateOperationScope>: UnsafeUnpin,
impl UnwindSafe for Mandatewhere
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
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