Skip to main content

atd_protocol/
lib.rs

1//! ATD protocol layer — the spec.
2//!
3//! Shared between SDK (`atd-sdk`) and runtime (`atd-runtime`); depends on
4//! neither. Contains types, wire codec, and sanitization rules that third-
5//! party implementations must match byte-for-byte.
6
7pub mod cli_binding;
8pub mod enums;
9pub mod error;
10pub mod messages;
11pub mod result;
12pub mod sanitize;
13pub mod summary;
14pub mod tool;
15pub mod wire;
16
17pub use cli_binding::{CliBindingConfig, CliBindingConfigError, CliOutputFormat};
18pub use enums::{BindingProtocol, SafetyLevel, ToolTier, ToolVisibility, TrustLevel};
19pub use error::AtdError;
20pub use messages::{
21    ERR_AUDIENCE_MISMATCH, ERR_BROKER_FAILED, ERR_CAPABILITY_DENIED, ERR_CURSOR_EXPIRED,
22    ERR_CURSOR_INVALID, ERR_DELEGATION_TOO_DEEP, ERR_RATE_LIMITED, ERR_UCAN_EXPIRED,
23    ERR_UCAN_INVALID, Request, Response,
24};
25pub use result::{ToolResult, ToolResultMetadata};
26pub use sanitize::{desanitize_tool_name, detect_collisions, sanitize_tool_name};
27pub use summary::ToolSummary;
28pub use tool::{
29    ToolBinding, ToolCapability, ToolDefinition, ToolErrorDef, ToolResources, ToolSafety, ToolTrust,
30};
31pub use wire::{
32    WireError, read_frame, read_frame_with_deadline, write_frame, write_frame_with_deadline,
33};