feat(sdk): implement GJC SDK wire transport with WebSocket support

- 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
This commit is contained in:
clawdbot committed 2026-10-12 23:43:10 +00:00
1 parent 620ac1dbad
commit 3b1f7220c5
6 files changed
+777 -35

No files matched your search

+18
View File
@@ -0,0 +1,18 @@
[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"