Expand description
Agent Mail 1.0: signed cards, sender-signed HPKE packets, and explicit local state.
Relays never receive decryption keys. A verified message is untrusted content,
not authorization to execute a task. State helpers are in-memory models;
applications must persist snapshots atomically before acknowledging delivery.
Relay paths are fixed at {route}/v1/mailboxes.
Structs§
- Delivery
Result - Sender-authenticated delivery result. It never carries the mailbox
seq. - Mail
Address - A parsed mailbox address (Mail Section 3.3).
routesis empty for the stable form. - Mail
Card Cache - Sender-side pins: the greatest-nonce card seen per (owner, mailbox),
including closed or expired cards. Save
snapshot()after every observation, even one that returns an error for an unusable new pin. - Mail
Encryption Key - Independent X25519 secret. Debug output and implicit serialization are absent.
export_secretis explicit and returns a buffer zeroized on drop. - Mail
Inbox - Cross-route message deduplication. The application stores accepted messages;
persist the inbox snapshot with them before deleting relay copies or acting.
acceptnever executes content or sends replies. - Mail
Keyring - Retained verified cards and their secrets, by card hash, through
receive_until. - Mail
Part - Mail
Relay Store - Framework-neutral in-memory relay model, NOT a hosted or durable service. All outputs are owned copies. Save/restore snapshots atomically in a real service; enforce admission limits and serialized access outside this model. The short-lived Identity nonce cache is not part of the snapshot.
- Mailbox
Card Payload - Message
Payload - Packet
Header - Packet
Payload - Packet
Record
Enums§
Constants§
Functions§
- canonical_
bytes - create_
mail_ message - decode_
bytes - decrypt_
packet - Historical verification and opening; inbox acceptance handles expiry and dedup.
- encode_
bytes - encrypt_
message - Encrypt immutable plaintext with fresh HPKE randomness, then sign the packet.
- format_
mail_ address - Format the stable address, or a contact address when routes are given.
- frame_
bytes - Exact framing, also useful for boundary conformance tests. Inputs are bounded.
- hash_
bytes - mail_
packet_ aad - Exact context bound to encryption, derived from the verified outer event.
- packet_
id - parse_
card - parse_
mail_ address - Parse
did:agent:<key>/mail/<mailbox_id>[?route=<origin>...](Mail Section 3.3). - parse_
message - parse_
packet - random_
id - sign_
card - validate_
card - Historical verification: checks intrinsic validity, not live-write freshness.
- validate_
card_ for_ sending - validate_
discovery - Informational discovery document; it never supplies delivery paths.
- validate_
mail_ schema - Validate a named structural definition; signatures and semantics are separate.
- validate_
message - Validate immutable plaintext. Authentication comes from its signed packet.
- validate_
packet - validate_
reply - Bind an immutable reply to both participants and its parent’s logical ID.
- verify_
owner_ jwt - Identity request JWT for this relay origin whose subject is the mailbox owner.
Type Aliases§
- Mailbox
Card - Packet
- The signed
mail.submitenvelope: the wire object relays store and recipients open.