Expand description
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 _.
Re-exports§
pub use broker::PermissionBroker;pub use content::content_to_string;pub use error::ChannelSdkError;pub use harness::ChannelHarness;pub use trait_def::Channel;pub use adapter::ChannelAdapter;pub use adapter::SessionRenderer;pub use error::RenderError;pub use permission_responder::PermissionResponder;pub use platform_config::PlatformConfig;pub use presenter::Presenter;pub use session_map::SessionMap;pub use snapshot::MediaKind;pub use snapshot::MediaSnapshot;pub use snapshot::ResponseSnapshot;pub use snapshot::ThoughtSnapshot;pub use snapshot::ToolSnapshot;pub use snapshot::TurnEvent;pub use snapshot::TurnSnapshot;pub use split::split_text;
Modules§
- adapter
ChannelAdaptertrait — the primary API for channel authors (presenter path). ChannelAdapter trait — the primary API for channel authors.- broker
- Permission request/response oneshot management.
- content
- Extract displayable text from agent content values.
- error
- Error types for channel SDK operations.
- harness
- JSON-RPC stdio harness that drives a
Channelimplementation. - permission_
responder - One-shot permission responder. One-shot permission responder.
- platform_
config - Platform configuration for the presenter layer. Platform configuration for the presenter layer.
- presenter
Presenter<A>— wraps aChannelAdapterand implementsChannel.Presenter<A>— wraps aChannelAdapterand implementsChannel.- session_
map - Session-to-platform-context mapping helper. Session-to-platform-context mapping helper.
- snapshot
- Turn snapshot types for the presenter layer. Turn snapshot types for the presenter layer.
- split
- Text splitting logic for message length limits. Text splitting logic for message length limits.
- testing
- Test wrapper for unit-testing
Channelimplementations without JSON-RPC framing. - trait_
def - The
Channeltrait that channel authors implement.
Structs§
- Channel
AckConfig - Ack configuration passed to channels via initialize handshake. Lightweight mirror of config crate’s AckConfig — SDK types must not depend on config.
- Channel
Capabilities - Channel capabilities advertised during initialize handshake.
- Channel
Send Message - Channel → Anyclaw: user sent a message.
- Deliver
Message - Anyclaw → Channel: deliver agent message/streaming update.
- Peer
Info - Peer identity information for inbound messages.
Enums§
- Stop
Reason - Re-export the canonical
StopReasonfromanyclaw-sdk-types(sourced fromagent-client-protocol-schema). Variants:EndTurn,MaxTokens,MaxTurnRequests,Refusal,Cancelled. Reasons why an agent stops processing a prompt turn.