Sawra/runagent cloud support wip#73
Conversation
|
Caution Review failedThe pull request is closed. WalkthroughAdds streaming run support across CLI, client, server, and schema; refactors REST/socket clients and server handlers to new request/response formats; introduces fingerprint/is_local agent metadata and revised deployment with metadata+zip flows; updates auth validation; adjusts templates’ entrypoints; standardizes error handling and path/Path usage. Changes
Sequence Diagram(s)sequenceDiagram
autonumber
actor User
participant CLI as CLI (run_stream)
participant RAC as RunAgentClient
participant SC as SocketClient
participant Srv as Local Server
participant WS as WebSocket
User->>CLI: run_stream --id <agent_id> --tag <..._stream>
CLI->>RAC: run_stream(args, kwargs)
RAC->>SC: connect /api/v1/agents/{id}/run-stream?token=...
SC->>Srv: WebSocket OPEN
SC->>WS: send JSON {entrypoint_tag, input_args, input_kwargs}
alt Valid streaming entrypoint
WS-->>SC: status stream_started
loop chunks
WS-->>SC: data {chunk}
SC-->>CLI: yield chunk
end
WS-->>SC: status stream_completed
SC-->>RAC: complete
RAC-->>CLI: done
else Error
WS-->>SC: error {message, code}
SC-->>RAC: raise
RAC-->>CLI: formatted error
end
sequenceDiagram
autonumber
participant CLI as CLI (run)
participant RAC as RunAgentClient
participant RC as RestClient
participant Srv as Local Server (HTTP)
CLI->>RAC: run(agent_id, tag, args, kwargs)
RAC->>RC: POST /api/v1/agents/{id}/run {entrypoint_tag,input_args,input_kwargs}
RC->>Srv: Request
alt Success
Srv-->>RC: AgentRunResponseV2 {data: ExecutionData}
RC-->>RAC: unwrap result_data/output_data
RAC-->>CLI: result
else Failure
Srv-->>RC: AgentRunResponseV2 {error: ErrorDetail}
RC-->>RAC: error info
RAC-->>CLI: formatted error/exit
end
sequenceDiagram
autonumber
participant CLI as CLI (deploy/upload)
participant SDK as RunAgentSDK
participant RD as RemoteDeployment
participant RC as RestClient
participant DB as Local DB
CLI->>SDK: upload_agent(Path)
SDK->>RD: upload_agent_to_server(Path)
RD->>RC: upload_agent_metadata_and_zip(Path)
RC->>RC: validate + fingerprint
RC->>DB: check by fingerprint/path
alt Duplicate detected
RC-->>RD: decision path (overwrite/new/cancel)
else New content
RC->>RC: _upload_agent_metadata_core
RC->>RC: _upload_agent_zip_file_core
RC-->>RD: upload complete
end
Estimated code review effort🎯 5 (Critical) | ⏱️ ~120 minutes Possibly related PRs
Poem
✨ Finishing touches
🧪 Generate unit tests (beta)
📜 Recent review detailsConfiguration used: CodeRabbit UI Review profile: CHILL Plan: Pro 📒 Files selected for processing (17)
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
Refactor
Chores