Skip to main content

wire/
lib.rs

1//! wire — magic-wormhole for AI agents.
2//!
3//! v0.1 surface (this crate):
4//!   - [`canonical`] — sorted-key, no-whitespace JSON; the wire-byte form.
5//!   - [`signing`] — Ed25519 sign-over-event_id (Nostr NIP-01 style).
6//!   - [`agent_card`] — DID-anchored agent identity + bilateral SAS.
7//!   - [`trust`] — per-peer tier state machine (UNTRUSTED → VERIFIED).
8//!
9//! v0.2+ (NOT in this crate yet, see `BACKLOG.md`):
10//!   - relay client/server, SPAKE2 handshake, CLI, file_share/file_revoke kinds.
11
12pub mod adapters;
13pub mod agent_card;
14pub mod canonical;
15pub mod character;
16pub mod cli;
17pub mod config;
18pub mod daemon_stream;
19pub mod daemon_supervisor;
20pub mod diag;
21pub mod endpoints;
22pub mod enroll;
23pub mod ensure_up;
24pub mod group;
25pub mod identity;
26pub mod inbox_watch;
27pub mod macaroon;
28pub mod mcp;
29pub mod org_membership;
30pub mod org_policy;
31pub mod os_notify;
32pub mod pair_decision;
33pub mod pair_invite;
34pub mod pair_profile;
35pub mod pair_session;
36pub mod pending_inbound_pair;
37pub mod pending_pair;
38pub mod platform;
39pub mod pull;
40pub mod relay_client;
41pub mod relay_server;
42pub mod sas;
43pub mod send;
44pub mod service;
45pub mod session;
46pub mod signing;
47pub mod sso_provider;
48pub mod tls;
49pub mod trust;
50
51// Curated re-exports for ergonomic call sites.
52pub use signing::{
53    KIND_RANGES, KindClass, SignError, VerifyError, b64decode, b64encode, compute_event_id,
54    fingerprint, generate_keypair, kind_class, kinds, make_key_id, sign_message_v31,
55    verify_message_v31,
56};
57
58pub use agent_card::{
59    AgentCard, CARD_SCHEMA_VERSION, CardError, DID_METHOD, build_agent_card, card_canonical,
60    compute_sas, did_for, sign_agent_card, verify_agent_card,
61};
62
63pub use trust::{
64    Tier, Trust, add_agent_card_pin, add_self_to_trust, empty_trust, get_tier, promote_to_verified,
65};