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 surfaceBus::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 fingerprintInbox/BusMessage— application-level message dispatchAuthenticatedPeer/DeliveryProvenance— typed carrier evidence required for inbound admissionreplay::NonceCache/replay::SequenceTracker— replay defenseBus::bind_outbound_only— a bus that refuses every connection it did not dial; a reply returns on the connection its request went out onsequence::SequenceReservations/FileSequenceReservations— durable per-key sequence reservations (thebind_*_reservingbinds), 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 elsewhereBus::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