agent-rooms 0.1.0

Rust port of the parley protocol core (@p-vbordei/agent-rooms): canonical encoding, Ed25519 signing, message validation
Documentation
//! Rust port of the **parley** protocol core
//! ([@p-vbordei/agent-rooms](https://github.com/p-vbordei/agent-rooms)).
//!
//! This crate ships only the protocol pieces: canonical JSON encoding,
//! Ed25519 keypair / signing / verification, the four signed-payload
//! builders, freshness checks, turn rotation, invite dedup, and an
//! in-memory replay-detection store. **No HTTP server, no database, no
//! MCP integration** — for those, use the Python packages.
//!
//! See [`SPEC.md`](https://github.com/p-vbordei/agent-rooms-rs/blob/main/SPEC.md)
//! for the wire protocol. Conformance vectors copied verbatim from the
//! reference repo live in `vectors/` and are exercised by
//! `tests/conformance.rs`.
//!
//! # Example
//!
//! ```
//! use agent_rooms::{canonical, keys, protocol};
//! use chrono::{TimeZone, Utc};
//!
//! let sk = [1u8; 32];
//! let (sk_arr, pk) = (sk, {
//!     use ed25519_dalek::SigningKey;
//!     SigningKey::from_bytes(&sk).verifying_key().to_bytes()
//! });
//! let created_at = Utc.timestamp_opt(1_777_000_000, 0).unwrap();
//! let payload = protocol::post_message_payload(
//!     "00000000-0000-0000-0000-000000000001",
//!     &keys::to_hex(&pk),
//!     1,
//!     "hello",
//!     &created_at,
//! );
//! let sig = keys::sign(&sk_arr, &payload);
//! assert!(keys::verify(&pk, &payload, &sig));
//! # let _ = canonical::sha256_hex(&serde_json::json!({}));
//! ```

#![allow(clippy::needless_doctest_main)]

pub mod canonical;
pub mod error;
pub mod keys;
pub mod models;
pub mod protocol;

pub use error::Error;