Sawra/util fix#85
Conversation
- Added structured serialization and deserialization methods in RunAgentClient and SocketClient to improve data handling. - Updated LocalServer to use structured output for serialization. - Modified socket_utils to send structured data to clients, ensuring compatibility with remote executions.
- Updated `/run` responses to return a minimal structured output, aligning with the new payload contract. - Enhanced documentation in the CLI guide to reflect the simplified response format. - Introduced `AgentRunResponseMinimal` schema for consistent error handling and response structure across components.
- Updated all SDK versions to 0.1.26 - Generated changelog with git-cliff
|
Caution Review failedThe pull request is closed. WalkthroughThis release bumps version to 0.1.26 across all SDKs (Python, Go, Rust, TypeScript) and introduces a unified response structure via AgentRunResponseMinimal. Client libraries are enhanced to deserialize multiple payload formats—supporting both new structured and legacy fields—while server endpoints and WebSocket handlers serialize responses using structured serializers for consistency. Changes
Sequence DiagramsequenceDiagram
actor Client
participant SDK as SDK Client
participant Server as Run Server
participant Serializer as Serializer
rect rgb(200, 220, 255)
note right of SDK: New Response Handling Path
Client->>SDK: Call run()
SDK->>Server: GET /run
Server->>Serializer: serialize_object_to_structured(result)
Serializer-->>Server: structured_json
Server-->>SDK: AgentRunResponseMinimal {<br/> success: true,<br/> data: structured_json,<br/> timestamp, request_id<br/>}
end
rect rgb(220, 255, 220)
note right of SDK: Client Deserialization (Multiple Payloads)
SDK->>SDK: Check response.data (nested/string/legacy)
alt Nested: result_data.data
SDK->>SDK: Extract result_data.data
else String payload
SDK->>Serializer: deserialize_object_from_structured(data)
Serializer-->>SDK: deserialized object
else Legacy: output_data
SDK->>Serializer: deserialize_object(output_data)
Serializer-->>SDK: deserialized object
else Fallback
SDK->>SDK: Return null or original
end
SDK-->>Client: payload (or null)
end
Estimated code review effort🎯 4 (Complex) | ⏱️ ~60 minutes
Possibly related PRs
Poem
✨ Finishing touches
🧪 Generate unit tests (beta)
📜 Recent review detailsConfiguration used: CodeRabbit UI Review profile: CHILL Plan: Pro ⛔ Files ignored due to path filters (1)
📒 Files selected for processing (18)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Summary by CodeRabbit
New Features
Bug Fixes
Documentation
Chores