Skip to main content

OutboxItem

Struct OutboxItem 

Source
pub struct OutboxItem {
Show 14 fields pub id: String, pub status: String, pub tool: String, pub kind: OutboxKind, pub args_before: Value, pub args: Value, pub summary: String, pub session_id: Option<String>, pub workspace: Option<PathBuf>, pub taint: Taint, pub created_at: String, pub resolved_at: Option<String>, pub reason: Option<String>, pub error: Option<String>,
}
Expand description

One staged outbound action.

Fields§

§id: String§status: String

pending | sent | rejected.

§tool: String

The tool a release will execute, by registry name (web__fetch).

§kind: OutboxKind

How this is reviewed. Defaulted rather than required, so items staged before the field existed load as the kind they in fact were.

§args_before: Value

The arguments as the agent drafted them. Never modified — this is the baseline the learning capture diffs against.

§args: Value

The arguments a release will execute. Starts equal to args_before; mecha outbox edit rewrites it.

§summary: String

One line for mecha outbox list.

§session_id: Option<String>

The session that drafted this, when the front-end knew it.

§workspace: Option<PathBuf>

The path jail the call was drafted under.

A staged call is a deferred tool call, and a tool call only means anything relative to the workspace it was made in: bundle here is a directory under the drafting run’s jail. Release happens in another process, minutes or hours later, from whatever directory the reviewer happens to be standing in — so without this the release resolves the argument against the wrong root. An absolute path fails loudly; a relative one is worse, because a same-named directory beside the reviewer would quietly publish the wrong bytes.

Recording it also keeps the release inside the jail the agent was held to, rather than the reviewer’s, which is the stricter of the two and the one the interlock reasoned about.

Defaulted, like kind: items staged before the field existed load as None and release exactly as they did before.

§taint: Taint

The conversation’s taint at the moment of staging. An armed snapshot means third-party text was in context when this draft was written — review it as possibly an attacker’s words, not the assistant’s.

§created_at: String§resolved_at: Option<String>§reason: Option<String>

Why it was rejected, when it was.

§error: Option<String>

The last release attempt’s failure, if any. A failed send stays pending — the draft is still good; the delivery was not.

Implementations§

Source§

impl OutboxItem

Source

pub fn edited(&self) -> bool

Source

pub fn mineable_as_writing(&self) -> bool

Whether mecha reflect may mine this item as a writing correction.

A writing-domain reflection can become a consolidated rule, and a rule rides in every future run’s system prompt inside the cached prefix. That is the longest half-life anything in this project has, so what feeds it is filtered structurally rather than by a prompt asking the reflector to use its judgement:

  • Sent, and edited. An unedited release is not a correction (that it is positive evidence is a separate, unread signal); a rejected one never went out.
  • A message. A publish’s diff(args_before, args) is a changed filesystem path or visibility flag. Mining it would teach voice rules from bookkeeping — the same mistake as learning from "Blocked by a hook:", which is machine policy read as a human correction.

Trait Implementations§

Source§

impl Clone for OutboxItem

Source§

fn clone(&self) -> OutboxItem

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 OutboxItem

Source§

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

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

impl<'de> Deserialize<'de> for OutboxItem

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 Serialize for OutboxItem

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

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<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> 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> 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 = Infallible

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

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

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