aiecho/lib.rs
1//! AI-LAN Service Discovery System
2//!
3//! A lightweight, zero-config, high-performance LAN AI microservice discovery mechanism
4//! that enables AI Agents to dynamically discover and invoke various AI tool services
5//! deployed within a local network.
6//!
7//! ## Core Features
8//!
9//! - UDP broadcast discovery (port 53535)
10//! - Service announcement on startup
11//! - .echo file based configuration
12//! - Real-time service monitoring
13//! - CLI tools for easy usage
14//!
15//! ## Usage
16//!
17//! ### As server (service provider)
18//! ```bash
19//! aiecho agent --root-path ./services
20//! ```
21//!
22//! ### As client (AI scanner)
23//! ```bash
24//! aiecho scan --output json
25//! ```
26
27pub mod config;
28pub mod discoverer;
29pub mod protocol;
30pub mod scanner;
31pub mod server;
32
33pub use config::{ClientConfig, EchoConfig, ServiceConfig};
34pub use discoverer::{discover_services, get_local_ip};
35pub use protocol::{
36 build_announce, build_discover_req, build_discover_res, build_goodbye, parse_message,
37 ServiceEvent, ServiceInfo, DISCOVERY_PORT, DISCOVER_REQ, DISCOVER_RES, PROTOCOL_VERSION,
38 SERVICE_ANNOUNCE, SERVICE_GOODBYE,
39};
40pub use scanner::{DiscoveredService, DiscoveryScanner};
41pub use server::DiscoveryServer;
42
43pub const VERSION: &str = env!("CARGO_PKG_VERSION");