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 agent_card;
13pub mod canonical;
14pub mod character;
15pub mod cli;
16pub mod config;
17pub mod daemon_stream;
18pub mod diag;
19pub mod endpoints;
20pub mod enroll;
21pub mod ensure_up;
22pub mod group;
23pub mod identity;
24pub mod inbox_watch;
25pub mod macaroon;
26pub mod mcp;
27pub mod org_membership;
28pub mod org_policy;
29pub mod os_notify;
30pub mod pair_decision;
31pub mod pair_invite;
32pub mod pair_profile;
33pub mod pair_session;
34pub mod pending_inbound_pair;
35pub mod pending_pair;
36pub mod platform;
37pub mod pull;
38pub mod relay_client;
39pub mod relay_server;
40pub mod sas;
41pub mod service;
42pub mod session;
43pub mod signing;
44pub mod sso_provider;
45pub mod trust;
46
47// Curated re-exports for ergonomic call sites.
48pub use signing::{
49    KIND_RANGES, KindClass, SignError, VerifyError, b64decode, b64encode, compute_event_id,
50    fingerprint, generate_keypair, kind_class, kinds, make_key_id, sign_message_v31,
51    verify_message_v31,
52};
53
54pub use agent_card::{
55    AgentCard, CARD_SCHEMA_VERSION, CardError, DID_METHOD, build_agent_card, card_canonical,
56    compute_sas, did_for, sign_agent_card, verify_agent_card,
57};
58
59pub use trust::{
60    Tier, Trust, add_agent_card_pin, add_self_to_trust, empty_trust, get_tier, promote_to_verified,
61};