agent-mesh-bus 0.8.0

High-level pub/sub + request-reply API for agent-mesh
Documentation

agent-mesh-bus

High-level pub/sub + request-reply API over the agent-mesh transport. Topics are namespaced to the issuing user's fingerprint, so two unrelated users on the same LAN can never collide, and a replay defense layer rejects duplicate nonces and out-of-order sequence numbers from known peers.

Inbound delivery is fail-closed at one transport-neutral boundary: every envelope's certificate, payload CID, and signature are verified before replay state changes, and direct deliveries must bind the original envelope signer to the transport-authenticated carrier and the local user's certified root. Request correlations are likewise bound to the intended responder, so another authenticated agent cannot win a reply race or consume the honest waiter.

Key types:

  • Bus — the high-level pub/sub + request/reply surface
  • Bus::open_session / Bus::handle_sessions / Session — long-lived, full-duplex conversations over one QUIC stream, authorized at open from the opener's certificate (docs/decisions/session_streams.md)
  • Topic — pub/sub names scoped to the issuing user's fingerprint
  • Inbox / BusMessage — application-level message dispatch
  • AuthenticatedPeer / DeliveryProvenance — typed carrier evidence required for inbound admission
  • replay::NonceCache / replay::SequenceTracker — replay defense
  • Bus::bind_outbound_only — a bus that refuses every connection it did not dial; a reply returns on the connection its request went out on
  • sequence::SequenceReservations / FileSequenceReservations — durable per-key sequence reservations (the bind_*_reserving binds), so a peer that outlives a bus still admits its successor under the same agent key. The file store is Unix-only and fails closed elsewhere
  • Bus::close(self) returns only after the endpoint's socket is released, so the port can be bound again

Part of agent-mesh, cryptographic peer-to-peer agent coordination — no broker, no centralized configuration.

License

Apache-2.0