codync_network/lib.rs
1//! **codync-network** — Agent Tailscale.
2//!
3//! The agents on your computers find and message each other, peer to peer. It comes in layers,
4//! so new ways of working together don't change the ones below:
5//!
6//! - **Computers** ([`Node`]): each has a key that is also its address, a copy of the network's
7//! roster, and joins with a one-time invite. Letters go straight from one computer to the other
8//! over QUIC ([iroh](https://iroh.computer)), through a relay that sees only ciphertext when no
9//! direct path exists ([`Connector`]), and wait in the sender's outbox while the other is away.
10//! Two computers keep one connection open and use it both ways, so one whose firewall lets in
11//! only what it started is still reached.
12//! - **Letters** ([`Letter`], [`Message`]): text from one agent to another, which wakes it or, as a
13//! notice, waits for its next turn. `reply_to` links letters and `meta` carries an app's own
14//! structure, so requests and replies, rooms or task boards are built on letters, and the
15//! network never reads them.
16//! - **Reach** ([`Reach`]): how a letter gets into the agent. The app delivers to its own agents;
17//! the network knocks on Claude Code sessions and Codex threads itself.
18//! - **Budgets** ([`guard`]): nothing reaches an agent unless an agent sends a letter or someone
19//! asks who is around, and the receiving computer refuses long chains, bursts and repeats.
20//! - **Rules** ([`rules`]): the receiving computer decides which agents elsewhere may write to
21//! which of its own; with none, every member may.
22
23pub mod guard;
24mod node;
25mod reach;
26mod roster;
27pub mod rules;
28mod types;
29mod wire;
30
31pub use node::{INVITE_FOR, Node};
32pub use reach::Reach;
33pub use roster::Role;
34pub use rules::{Access, Rule};
35pub use types::{Address, Connector, Letter, Message, Peer, Sent};
36pub use wire::{Agent, AgentKind, InviteInfo, MAX_ADDRESS, MAX_BODY, read_invite};