Skip to main content

MeshCommand

Enum MeshCommand 

Source
pub enum MeshCommand {
    Status {
        stale_secs: u64,
        json: bool,
    },
    Broadcast {
        kind: String,
        scope: String,
        exclude: Vec<String>,
        noreply: bool,
        body: String,
        json: bool,
    },
    Role {
        action: MeshRoleAction,
    },
    Route {
        role: String,
        strategy: String,
        exclude: Vec<String>,
        kind: String,
        body: String,
        json: bool,
    },
}
Expand description

v0.6.3: top-level wire mesh verbs. Each verb operates on the current session’s view of the pinned peer set. status is the read-only observability primitive (alias for wire session mesh-status); broadcast fans a signed event to every pinned peer in one call.

Variants§

§

Status

Alias for wire session mesh-status. Reports the N×N pin matrix + per-edge health roll-up across every sister session on this machine.

Fields

§stale_secs: u64

Threshold in seconds for “stale” classification on an edge.

§json: bool
§

Broadcast

Fan one signed event to every pinned peer. Each peer receives a distinct event_id but every copy shares the same broadcast_id UUID so receivers can correlate them as a single broadcast.

--scope local (default) only fans to peers reachable via a same- machine local relay. --scope federation only to public-relay peers. --scope both to every pinned peer.

--exclude <peer> (repeatable) skips a specific handle. Useful for “ack-loop” prevention: a peer responding to a broadcast can exclude its own broadcaster when re-broadcasting.

Body parsing follows wire send: literal string, @/path reads a file, - reads stdin (JSON if parseable, else literal).

Pinned-peers-only by construction. NEVER broadcasts to non-paired peers — that would re-introduce the phonebook-scrape risk closed in v0.5.14 (T8).

Fields

§kind: String

Event kind: claim (default), decision, question, ack, heartbeat. Same vocabulary as wire send.

§scope: String

local, federation, or both. Default local.

§exclude: Vec<String>

Skip a specific peer handle. Repeatable.

§noreply: bool

Drop the broadcast event ID from the relay-side attentiveness nag (phyllis) — useful when broadcasting to many peers and the per-peer “X hasn’t pulled in 5min” lines would be noise.

§body: String

Body — string, @/path for a file, or - for stdin.

§json: bool
§

Role

v0.6.4 (issue #20): assign role tags to sister sessions for capability-aware addressing. Stored as profile.role on the signed agent-card — propagates over the existing pair / .well- known plumbing, no new persistence.

First slice of the Layer-2 capability metadata umbrella (#13). wire mesh route (issue #21) will consume these tags to pick the right sister for a task.

Fields

§

Route

v0.6.5 (issue #21): capability-match routing. Resolve a role tag to one sister session and deliver an event to that one peer. Closes the orchestration-primitive arc opened in v0.6.0 — operators can now address “the reviewer” instead of hard-coding a handle.

Strategies:

  • round-robin (default): per-role cursor, persisted at <state_dir>/mesh-route-cursor.json. Alternates fairly.
  • first: alphabetically-first matching sister. Deterministic.
  • random: uniform random among matches. Stateless.

Pinned-peers-only by construction (same posture as broadcast). Caller must already have the target sister pinned in state.peers — otherwise we can’t sign + push. Run wire session pair-all-local first if the mesh isn’t wired.

Fields

§role: String

Role to match (operator-defined tag from wire mesh role set).

§strategy: String

round-robin (default), first, or random.

§exclude: Vec<String>

Skip a specific sister handle. Repeatable.

§kind: String

Event kind: claim (default), decision, question, ack, heartbeat. Same vocabulary as wire send / broadcast.

§body: String

Body — string, @/path for a file, or - for stdin.

§json: bool

Trait Implementations§

Source§

impl Debug for MeshCommand

Source§

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

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

impl FromArgMatches for MeshCommand

Source§

fn from_arg_matches(__clap_arg_matches: &ArgMatches) -> Result<Self, Error>

Instantiate Self from ArgMatches, parsing the arguments as needed. Read more
Source§

fn from_arg_matches_mut( __clap_arg_matches: &mut ArgMatches, ) -> Result<Self, Error>

Instantiate Self from ArgMatches, parsing the arguments as needed. Read more
Source§

fn update_from_arg_matches( &mut self, __clap_arg_matches: &ArgMatches, ) -> Result<(), Error>

Assign values from ArgMatches to self.
Source§

fn update_from_arg_matches_mut<'b>( &mut self, __clap_arg_matches: &mut ArgMatches, ) -> Result<(), Error>

Assign values from ArgMatches to self.
Source§

impl Subcommand for MeshCommand

Source§

fn augment_subcommands<'b>(__clap_app: Command) -> Command

Append to Command so it can instantiate Self via FromArgMatches::from_arg_matches_mut Read more
Source§

fn augment_subcommands_for_update<'b>(__clap_app: Command) -> Command

Append to Command so it can instantiate self via FromArgMatches::update_from_arg_matches_mut Read more
Source§

fn has_subcommand(__clap_name: &str) -> bool

Test whether Self can parse a specific subcommand

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> 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: 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: 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, 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<V, T> VZip<V> for T
where V: MultiLane<T>,

Source§

fn vzip(self) -> V

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

impl<A, B, T> HttpServerConnExec<A, B> for T
where B: Body,