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 + bilateral SAS.
  • 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::did_for;
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§

agent_card
Agent card — DID-anchored identity for a wire endpoint.
canonical
Canonical wire-byte form for events + cards.
cli
wire CLI surface.
config
On-disk state for wire.
daemon_stream
Daemon-side SSE stream subscriber (R1 phase 2, v0.5.6).
diag
P2.10 (0.5.11): structured diagnostic trace.
ensure_up
Background-process bootstrapper for the MCP path.
inbox_watch
Inbox tail-watcher — the event source for both wire notify (OS-level toasts) and the MCP wire://inbox/<peer> resources.
macaroon
Speculative macaroon-style delegation scaffold.
mcp
MCP (Model Context Protocol) server over stdio.
os_notify
Cross-platform best-effort desktop notifications.
pair_invite
Invite-URL pair flow (v0.4.0). Single-paste, zero-config pairing.
pair_profile
Agent profile + handle parsing (v0.5 — agentic hotline).
pair_session
Staged pair session for MCP.
pending_pair
Daemon-orchestrated detached pair sessions.
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.
sas
SPAKE2 PAKE + Short Authentication String (SAS).
service
P1.9 (0.5.11): install + manage an OS service unit that runs wire daemon automatically.
signing
Ed25519 sign-over-event_id (Nostr NIP-01 style).
trust
Trust state machine — v0.1 minimal subset.