mirror of
https://github.com/instructkr/claw-code.git
synced 2026-10-29 00:00:35 +08:00
- Add error types and error code enumerations - Implement frame types for SDK wire protocol (FrameType enum) - Create Frame struct with JSON serialization/deserialization - Implement SdkTransport with async WebSocket connection handling - Support request/response correlation via request IDs - Handle frame parsing and routing with background task - Add comprehensive unit tests for frame creation and correlation - Implement proper async handling with tokio and futures Implements protocol version 3 with: - Token-based authentication via query parameter - Frame size limits (4 MiB max payload) - Request timeout handling - Proper error propagation and correlation
19 lines
375 B
TOML
19 lines
375 B
TOML
[package]
|
|
name = "sdk"
|
|
version = "0.1.0"
|
|
edition = "2021"
|
|
publish = false
|
|
|
|
[dependencies]
|
|
tokio = { version = "1", features = ["full"] }
|
|
tokio-tungstenite = "0.23"
|
|
futures-util = "0.3"
|
|
serde_json = "1"
|
|
serde = { version = "1", features = ["derive"] }
|
|
uuid = { version = "1", features = ["v4", "serde"] }
|
|
thiserror = "1"
|
|
tracing = "0.1"
|
|
|
|
[dev-dependencies]
|
|
tokio-test = "0.4"
|