Skip to main content

Mandate

Struct Mandate 

Source
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: String

Continuous 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: MandateAutonomyMode

Explicit 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.

§authority: MandateAuthority§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: i64

Lower and upper bounds for an agent-selected next review.

§max_review_secs: i64§default_review_secs: i64§review_effort: String

Human-readable resource policy. Runtime token arithmetic is derived internally from this effort level and the review cadence.

§next_review_at: String

Durable 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: i64

Authority epoch, incremented whenever owner-controlled configuration or lifecycle state changes so stale decisions and updates fail closed.

§owner_principal_id: String

Stable 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: String

Implementations§

Source§

impl Mandate

Source

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

Source

pub fn has_name(&self, name: &str) -> bool

Whether the owner gave this mandate name (trimmed, ignoring case).

Source

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.

Source

pub fn is_active(&self) -> bool

Source

pub fn clamp_review_secs(&self, requested: Option<i64>) -> i64

Source

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.

Source

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.

Source

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 Clone for Mandate

Source§

fn clone(&self) -> Self

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for Mandate

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl<'de> Deserialize<'de> for Mandate

Source§

fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>
where __D: Deserializer<'de>,

Deserialize this value from the given Serde deserializer. Read more
Source§

impl Eq for Mandate

Source§

impl PartialEq for Mandate

Source§

fn eq(&self, other: &Self) -> bool

Equality operator ==. Read more
1.0.0 (const: unstable) · Source§

fn ne(&self, other: &Rhs) -> bool

Inequality operator !=. Read more
Source§

impl Serialize for Mandate

Source§

fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error>
where __S: Serializer,

Serialize this value into the given Serde serializer. Read more
Source§

impl StructuralPartialEq for Mandate

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> DeserializeOwned for T
where T: for<'de> Deserialize<'de>,

Source§

impl<Q, K> Equivalent<K> for Q
where Q: Eq + ?Sized, K: Borrow<Q> + ?Sized,

Source§

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
where Q: Eq + ?Sized, K: Borrow<Q> + ?Sized,

Source§

fn equivalent(&self, key: &K) -> bool

Checks if this value is equivalent to the given key. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T> Instrument for T

Source§

fn instrument(self, span: Span) -> Instrumented<Self> ⓘ

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more
Source§

fn in_current_span(self) -> Instrumented<Self> ⓘ

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> IntoEither for T

Source§

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 more
Source§

fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
where F: FnOnce(&Self) -> bool,

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
Source§

impl<T> Pointable for T

Source§

const ALIGN: usize

The alignment of pointer.
Source§

type Init = T

The type for initializers.
Source§

unsafe fn init(init: <T as Pointable>::Init) -> usize

Initializes a with the given initializer. Read more
Source§

unsafe fn deref<'a>(ptr: usize) -> &'a T

Dereferences the given pointer. Read more
Source§

unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T

Mutably dereferences the given pointer. Read more
Source§

unsafe fn drop(ptr: usize)

Drops the object pointed to by the given pointer. Read more
Source§

impl<T> PolicyExt for T
where T: ?Sized,

Source§

fn and<P, B, E>(self, other: P) -> And<T, P>
where T: Sized + Policy<B, E>, P: Policy<B, E>,

Create a new Policy that returns Action::Follow only if self and other return Action::Follow. Read more
Source§

fn or<P, B, E>(self, other: P) -> Or<T, P>
where T: Sized + Policy<B, E>, P: Policy<B, E>,

Create a new Policy that returns Action::Follow if either self or other returns Action::Follow. Read more
Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = !

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, !>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
Source§

impl<T> WithSubscriber for T

Source§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self> ⓘ
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
Source§

fn with_current_subscriber(self) -> WithDispatch<Self> ⓘ

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more