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.
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: StringEvent kind: claim (default), decision, question, ack,
heartbeat. Same vocabulary as wire send.
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
action: MeshRoleActionRoute
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.
Trait Implementations§
Source§impl Debug for MeshCommand
impl Debug for MeshCommand
Source§impl FromArgMatches for MeshCommand
impl FromArgMatches for MeshCommand
Source§fn from_arg_matches(__clap_arg_matches: &ArgMatches) -> Result<Self, Error>
fn from_arg_matches(__clap_arg_matches: &ArgMatches) -> Result<Self, Error>
Source§fn from_arg_matches_mut(
__clap_arg_matches: &mut ArgMatches,
) -> Result<Self, Error>
fn from_arg_matches_mut( __clap_arg_matches: &mut ArgMatches, ) -> Result<Self, Error>
Source§fn update_from_arg_matches(
&mut self,
__clap_arg_matches: &ArgMatches,
) -> Result<(), Error>
fn update_from_arg_matches( &mut self, __clap_arg_matches: &ArgMatches, ) -> Result<(), Error>
ArgMatches to self.Source§fn update_from_arg_matches_mut<'b>(
&mut self,
__clap_arg_matches: &mut ArgMatches,
) -> Result<(), Error>
fn update_from_arg_matches_mut<'b>( &mut self, __clap_arg_matches: &mut ArgMatches, ) -> Result<(), Error>
ArgMatches to self.Source§impl Subcommand for MeshCommand
impl Subcommand for MeshCommand
Source§fn augment_subcommands<'b>(__clap_app: Command) -> Command
fn augment_subcommands<'b>(__clap_app: Command) -> Command
Source§fn augment_subcommands_for_update<'b>(__clap_app: Command) -> Command
fn augment_subcommands_for_update<'b>(__clap_app: Command) -> Command
Command so it can instantiate self via
FromArgMatches::update_from_arg_matches_mut Read moreSource§fn has_subcommand(__clap_name: &str) -> bool
fn has_subcommand(__clap_name: &str) -> bool
Self can parse a specific subcommand