1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
//! # Peat Protocol - Hierarchical Intelligence for Versatile Entities
//!
//! A hierarchical capability composition protocol using CRDTs for autonomous systems.
//!
//! ## Overview
//!
//! The Peat protocol enables scalable coordination of autonomous nodes through:
//! - **Three-phase protocol**: Discovery, Cell Formation, Hierarchical Operations
//! - **CRDT-based state**: Eventual consistency via Automerge over Iroh QUIC
//! - **Capability composition**: Additive, emergent, redundant, and constraint-based patterns
//!
//! ## Facade
//!
//! `peat-protocol` is the public entry point to the Peat stack. It re-exports
//! `peat_schema` (wire types) and `peat_mesh` (P2P plumbing) so downstream
//! consumers can depend on `peat-protocol` alone:
//!
//! ```toml
//! # During an rc window, Cargo does not pick pre-release versions by default
//! # — use the exact pin:
//! peat-protocol = "=0.9.0-rc.1"
//!
//! # Once 0.9.0 stable is published, the normal caret selector is fine:
//! # peat-protocol = "0.9"
//! ```
//!
//! ## Architecture
//!
//! ```text
//! ┌──────────────┐ ┌──────────────┐ ┌──────────────┐
//! │ Phase 1: │→ │ Phase 2: │→ │ Phase 3: │
//! │ Discovery │ │ Cell │ │ Hierarchical │
//! │ │ │ Formation │ │ Operations │
//! └──────────────┘ └──────────────┘ └──────────────┘
//! ```
// Bidirectional command coordination
// Cursor-on-Target translation layer (ADR-020, ADR-028)
// Backend-agnostic credential management
// AI model distribution (manifests, updates, requirements)
// Event routing and aggregation (ADR-027)
// FFI bindings for ATAK and other native consumers (Issue #258)
// Vendored geohash algorithm (supply chain audit)
// Generic policy engine for conflict resolution
// Quality of Service framework (ADR-019)
// Device authentication and PKI (ADR-006)
// Data synchronization abstraction layer
// Backend-agnostic transport abstraction for mesh topology // Peat-specific adapters for peat-mesh
pub use ;
// Facade re-exports: downstream consumers depend on peat-protocol alone.
pub use peat_mesh;
pub use peat_schema;
/// Protocol version
pub const VERSION: &str = env!;
/// Default cell size (nodes per cell)
pub const DEFAULT_CELL_SIZE: usize = 5;
/// Default discovery timeout in seconds
pub const DEFAULT_DISCOVERY_TIMEOUT_SECS: u64 = 60;
/// Default hierarchy depth (node -> cell -> zone -> network)
pub const DEFAULT_HIERARCHY_DEPTH: usize = 4;