Skip to main content

PeerInboundKind

Enum PeerInboundKind 

Source
pub enum PeerInboundKind {
    Message {
        id: String,
        from: String,
        org: String,
        body: String,
    },
    DeliveryFailure {
        target: String,
        org: String,
        reason: String,
    },
    WorkerSpawnFailed {
        label: String,
        reason: String,
    },
    Gotify {
        app: String,
        title: String,
        message: String,
        priority: u8,
    },
    Cron {
        prompt: String,
    },
    Voice {
        note: String,
    },
    Slack {
        workspace: String,
        channel: String,
        author: Option<String>,
        body: String,
    },
}
Expand description

One inbound peer block parsed from the user-turn text.

Wire envelopes carry fields (the send’s id, the originating org) that the previous chrome surfaced as DIM meta chunks. The redesigned chat block hides those by default - the parser still retains them, and the id is what the chat-streak grouping keys a messaging group on.

Variants§

§

Message

[Message id=m-... from agent 'X' (org 'Y')]\n\n<body>

Every peer message is this one kind: a reply is just another message, so there is nothing left for a second kind to say.

Fields

§from: String
§body: String
§

DeliveryFailure

[Message to agent 'X' (org 'Y') failed to deliver: <reason>] Sender-side delivery failure: a message parked for a sleeping project whose spawn then failed.

The older [Ask id=... to agent 'X' ... failed to deliver: ...] shape parses to this same kind, so a replayed transcript still draws its failure.

Fields

§target: String
§reason: String
§

WorkerSpawnFailed

[Worker '<label>' spawn failed id=<id>: <reason>] Lead-side notice that a team worker’s async spawn failed (subprocess crashed inside the --worktree machinery before reaching Connected). Reason text is verbatim from claude’s stderr. Kept as a one-line system notice rather than a peer row because it’s a workspace-generated lifecycle event, not a peer comm - touching its render shape is out of scope for #189.

Fields

§label: String
§reason: String
§

Gotify

[Gotify - app 'X', priority N]\n<title>\n<message> - an inbound external Gotify notification delivered as a user turn. Rendered with distinct chrome (the ◈ gotify glyph, Gotify source label) so it reads as an external event, not agent traffic. Never groups with peer envelopes (see PeerInboundKind::peer_sender_identity).

Fields

§title: String
§message: String
§priority: u8
§

Cron

[Cron]\n\n<prompt> - a durable cron that fired into this session, delivered as a user turn. Rendered with the ◴ cron glyph + a Cron source label so it reads as a scheduled internal event, not agent traffic. Never groups with peer envelopes (see PeerInboundKind::peer_sender_identity).

Fields

§prompt: String
§

Voice

[Voice]\n\n<note> - forge telling the seat’s session the reader is listening or has stopped, delivered as a user turn. The note is for the agent, so it draws as an information row rather than as the reader’s own turn. Never groups with peer envelopes (see PeerInboundKind::peer_sender_identity).

Fields

§note: String
§

Slack

[Slack - workspace 'X', <channel>] id ... ts ... then one <author>: <text> [ts ...] line per delivered message - a conversation’s news, delivered as a user turn. Rendered with the ◇ glyph + a Slack source label so it reads as an external event, not agent traffic. Never groups with peer envelopes (see PeerInboundKind::peer_sender_identity).

Fields

§workspace: String
§channel: String
§author: Option<String>

None when there is no name to print. The producer resolves the author before the prose is written, so a bot’s message carries the user id it always had and its own profile name beside it; a name that resolved to nothing leaves unknown in the clause, which is dropped here. Also None for a multi-message body, whose members each name their own author.

§body: String

Implementations§

Source§

impl PeerInboundKind

Source

pub fn org(&self) -> &str

The sender_org field threaded through every variant - drives same-project envelope grouping in a view’s chat iteration. Variants that carry an explicit org return it; the worker-spawn-failure notice has no org of its own (it’s lead-local, with no sending project) so it returns an empty string and naturally groups with adjacent lead-local envelopes.

Source

pub fn peer_sender_identity(&self) -> Option<&str>

The peer/worker sender identity used for envelope grouping (the from / target / label name). None for Gotify, Cron and Slack: those are not agent traffic and must never merge into a peer messaging group - the grouping predicates key off Some(..) here.

Trait Implementations§

Source§

impl Debug for PeerInboundKind

Source§

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

Formats the value using the given formatter. 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
§

impl<T> Any for T
where T: Any,

§

fn into_any(self: Box<T>) -> Box<dyn Any>

§

fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>

§

fn type_name(&self) -> &'static str

§

impl<T> AnySync for T
where T: Any + Send + Sync,

§

fn into_any_arc(self: Arc<T>) -> Arc<dyn Any + Sync + Send> ⓘ

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
§

impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
where ST: ?Sized, DT: ?Sized,

§

impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
where ST: ?Sized, DT: ?Sized,

§

impl<S, T> Duplex<S> for T
where T: FromSample<S> + ToSample<S>,

Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

§

impl<S> FromSample<S> for S

§

fn from_sample_(s: S) -> S

§

impl<T> Instrument for T

§

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

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

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
§

impl<T> Pointable for T

§

const ALIGN: usize

The alignment of pointer.
§

type Init = T

The type for initializers.
§

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

Initializes a with the given initializer. Read more
§

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

Dereferences the given pointer. Read more
§

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

Mutably dereferences the given pointer. Read more
§

unsafe fn drop(ptr: usize)

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

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

§

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
§

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
§

impl<T> Read<Exclusive, BecauseExclusive> for T
where T: ?Sized,

Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
§

impl<T, U> ToSample<U> for T
where U: FromSample<T>,

§

fn to_sample_(self) -> U

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

impl<V, T> VZip<V> for T
where V: MultiLane<T>,

§

fn vzip(self) -> V

§

impl<T> WithSubscriber for T

§

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
§

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

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