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
// LIMITATION: No std::env::var in channel/tool binaries
// Config flows through the initialize handshake (ChannelInitializeParams.options),
// not through environment variables. Channel and tool binaries must NOT read config
// from std::env::var because: (1) the supervisor controls the subprocess environment,
// (2) env vars set on the subprocess are visible in /proc/<pid>/environ, and
// (3) the initialize handshake provides a typed, validated config path.
// See also: AGENTS.md §Anti-Patterns
//! Channel SDK for anyclaw.
//!
//! Provides the [`Channel`] trait for building messaging integrations and
//! [`ChannelHarness`] for JSON-RPC stdio framing, handshake, and message routing.
//!
//! # Stability
//!
//! This crate is **unstable** — APIs may change between releases.
//! Enums marked `#[non_exhaustive]` will have new variants added; match arms must include `_`.
/// Permission request/response oneshot management.
/// Extract displayable text from agent content values.
// D-03 boundary: DeliverMessage.content is Value — agent content shape is agent-defined
/// Error types for channel SDK operations.
/// JSON-RPC stdio harness that drives a [`Channel`] implementation.
/// Minimal JSON-RPC 2.0 types for the harness (private, avoids internal crate dep).
// D-03 boundary: params/result/error.data are Value — schemas vary per method
/// Test wrapper for unit-testing [`Channel`] implementations without JSON-RPC framing.
/// The [`Channel`] trait that channel authors implement.
// D-03 boundary: handle_unknown params/return are Value — unknown methods have no schema
pub use ;
pub use PermissionBroker;
pub use content_to_string;
pub use ChannelSdkError;
pub use ChannelHarness;
pub use Channel;