Skip to main content

Crate wire

Crate wire 

Source
Expand description

wire — magic-wormhole for AI agents.

v0.1 surface (this crate):

  • canonical — sorted-key, no-whitespace JSON; the wire-byte form.
  • signing — Ed25519 sign-over-event_id (Nostr NIP-01 style).
  • agent_card — DID-anchored agent identity.
  • trust — per-peer tier state machine (UNTRUSTED → VERIFIED).

v0.2+ (NOT in this crate yet, see BACKLOG.md):

  • relay client/server, SPAKE2 handshake, CLI, file_share/file_revoke kinds.

Re-exports§

pub use signing::KIND_RANGES;
pub use signing::KindClass;
pub use signing::SignError;
pub use signing::VerifyError;
pub use signing::b64decode;
pub use signing::b64encode;
pub use signing::compute_event_id;
pub use signing::fingerprint;
pub use signing::generate_keypair;
pub use signing::kind_class;
pub use signing::kinds;
pub use signing::make_key_id;
pub use signing::sign_message_v31;
pub use signing::verify_message_v31;
pub use agent_card::AgentCard;
pub use agent_card::CARD_SCHEMA_VERSION;
pub use agent_card::CardError;
pub use agent_card::DID_METHOD;
pub use agent_card::build_agent_card;
pub use agent_card::card_canonical;
pub use agent_card::compute_sas;
pub use agent_card::sign_agent_card;
pub use agent_card::verify_agent_card;
pub use trust::Tier;
pub use trust::Trust;
pub use trust::add_agent_card_pin;
pub use trust::add_self_to_trust;
pub use trust::empty_trust;
pub use trust::get_tier;
pub use trust::promote_to_verified;

Modules§

adapters
Adapter registries — pluggable per-category contracts so a new integration point (a host, an IdP, a plugin) is a one-file change instead of a five-file edit.
agent_card
Agent card — DID-anchored identity for a wire endpoint.
blocklist
RFC-001 Security §T16 — per-peer block-list (rogue / compromised org admin containment).
canonical
Canonical wire-byte form for events + cards.
character
Character — deterministic nickname, emoji, and color palette per identity.
cli
wire CLI surface.
config
On-disk state for wire.
daemon_stream
Daemon-side SSE stream subscriber (R1 phase 2, v0.5.6).
daemon_supervisor
wire daemon --all-sessions — multi-session supervisor.
diag
P2.10 (0.5.11): structured diagnostic trace.
enc
D1 — DM body encryption (RFC-006). See wire_x25519 for the crypto core and docs/rfc/0006-d1-nip44-design.md for the design.
endpoints
Multi-endpoint routing for v0.5.17 (dual-slot sessions).
enroll
RFC-001 — operator / organization enrollment (producer side).
ensure_up
Background-process bootstrapper for the MCP path.
group
Group chat (v0.13.3) — signed member-set model.
identity
RFC-001 §1: operator / organization identity certs.
inbox_watch
Inbox tail-watcher — the event source for both wire notify (OS-level toasts) and the MCP wire://inbox/<peer> resources.
init
Idempotent local-identity creation.
macaroon
Speculative macaroon-style delegation scaffold.
mcp
MCP (Model Context Protocol) server over stdio.
nuke
wire nuke — hard reset of all wire state on the machine.
org_bind
RFC-001 §2 / amendment-sso §A — DNS-TXT org binding (the domain-rooted trust floor).
org_membership
RFC-001 Phase 1 — evaluate a received agent-card’s organizational membership claims and decide which orgs vouch for the peer.
org_policy
RFC-001 Phase 3 (minimal) — per-org pairing policy persistence.
os_notify
Cross-platform best-effort desktop notifications.
pair_decision
RFC-001 Phase 1b — map a verified org-membership outcome + the receiver’s per-org policy to a pairing action.
pair_invite
Invite-URL pair flow (v0.4.0). Single-paste, zero-config pairing.
pair_profile
Agent profile + handle parsing (v0.5 — agentic hotline).
pending_inbound_pair
Pending-inbound pair store (v0.5.14).
platform
Cross-platform process-management primitives.
pull
Pull-event processing — pure logic shared by wire pull and the daemon sync loop.
relay_client
HTTP client for wire-relay-server.
relay_server
HTTP mailbox relay — minimal, persistent, bearer-authenticated.
send
Synchronous event delivery — collapses the legacy wire send → outbox → daemon push → relay 3-step into a single direct relay POST.
service
Install + manage OS service units that run wire components automatically across reboots.
session
Multi-session wire on one machine (v0.5.16).
signing
Ed25519 sign-over-event_id (Nostr NIP-01 style).
sso_provider
Pluggable SSO / OIDC provider adapters — the seam from issue #92.
tls
Shared rustls ClientConfig for every wire HTTPS surface.
trust
Trust state machine — v0.1 minimal subset, extended in v3.2 (RFC-001).