Added new CoreSerializer methods#84
Conversation
… run_stream commands
- Updated all SDK versions to 0.1.25 - Generated changelog with git-cliff
|
Caution Review failedThe pull request is closed. WalkthroughVersion bumped to 0.1.25 across multiple package manifests. CLI output formatting updated for extra parameters. Error handling refactored with centralized message normalization across client, REST, and socket layers. New structured serialization format added for objects with type inference and payload handling. Changes
Sequence DiagramssequenceDiagram
participant Client as Client Code
participant RestClient as REST Client
participant SocketClient as Socket Client
participant ErrorHandler as Error Handler
Note over RestClient,SocketClient: Old Flow (0.1.24)
Client->>RestClient: run_agent(request)
RestClient->>SocketClient: stream request
SocketClient-->>SocketClient: raw error received
SocketClient-->>RestClient: raw error message
RestClient-->>Client: raw/formatted error
Note over RestClient,SocketClient: New Flow (0.1.25)
Client->>RestClient: run_agent(request)
RestClient->>SocketClient: stream request
SocketClient-->>SocketClient: raw error received
SocketClient->>ErrorHandler: _clean_error_message(error)
ErrorHandler-->>SocketClient: sanitized message
SocketClient-->>RestClient: cleaned error
RestClient->>ErrorHandler: categorize (AUTH/PERMISSION/etc.)
ErrorHandler-->>RestClient: error code + structured payload
RestClient-->>Client: structured error response
sequenceDiagram
participant App as Application
participant Serializer as CoreSerializer
participant TypeDetector as Type Detector
participant JSONHandler as JSON Handler
rect rgb(200, 240, 255)
Note over Serializer: Structured Serialization
App->>Serializer: serialize_object_to_structured(obj)
Serializer->>TypeDetector: _determine_type(obj)
TypeDetector-->>Serializer: type (e.g., "object", "array")
Serializer->>Serializer: _prepare_for_serialization(obj)
Serializer->>JSONHandler: json.dumps({type, payload})
JSONHandler-->>Serializer: JSON string
Serializer-->>App: structured JSON
end
rect rgb(240, 200, 255)
Note over Serializer: Structured Deserialization
App->>Serializer: deserialize_object_from_structured(json_str)
Serializer->>JSONHandler: json.loads(json_str)
JSONHandler-->>Serializer: {type, payload}
Serializer->>Serializer: type-specific reconstruction
Serializer-->>App: Python object
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 (14)
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
Chores
New Features
-yflag for--yesoption on teardown commandBug Fixes
Style