Skip to main content

Crate anyclaw_sdk_channel

Crate anyclaw_sdk_channel 

Source
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
ChannelAdapter trait — 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 Channel implementation.
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 a ChannelAdapter and implements Channel. Presenter<A> — wraps a ChannelAdapter and implements Channel.
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 Channel implementations without JSON-RPC framing.
trait_def
The Channel trait that channel authors implement.

Structs§

ChannelAckConfig
Ack configuration passed to channels via initialize handshake. Lightweight mirror of config crate’s AckConfig — SDK types must not depend on config.
ChannelCapabilities
Channel capabilities advertised during initialize handshake.
ChannelSendMessage
Channel → Anyclaw: user sent a message.
DeliverMessage
Anyclaw → Channel: deliver agent message/streaming update.
PeerInfo
Peer identity information for inbound messages.

Enums§

StopReason
Re-export the canonical StopReason from anyclaw-sdk-types (sourced from agent-client-protocol-schema). Variants: EndTurn, MaxTokens, MaxTurnRequests, Refusal, Cancelled. Reasons why an agent stops processing a prompt turn.