Skip to content

Rust: Allow Agents to hold onto a Client and vice versa#109

Closed
benbrandt wants to merge 1 commit intomainfrom
capture-other-side
Closed

Rust: Allow Agents to hold onto a Client and vice versa#109
benbrandt wants to merge 1 commit intomainfrom
capture-other-side

Conversation

@benbrandt
Copy link
Copy Markdown
Member

  • Replace ClientSideConnection/AgentSideConnection structs with type aliases to RpcConnection
  • RpcConnection::new now accepts a handler factory FnOnce(Rc) and returns Rc

Before, there wasn't a way for an Agent to hold onto a way to
communicate with the Client and vice versa.

Now they can. This matches the behavior in the TS SDK

- Replace ClientSideConnection/AgentSideConnection structs with type aliases to RpcConnection
- RpcConnection::new now accepts a handler factory FnOnce(Rc<Self>) and returns Rc<Self>

Before, there wasn't a way for an Agent to hold onto a way to
communicate with the Client and vice versa.

Now they can. This matches the behavior in the TS SDK

Signed-off-by: Ben Brandt <benjamin.j.brandt@gmail.com>
@cla-bot cla-bot Bot added the cla-signed label Sep 23, 2025
@benbrandt benbrandt requested a review from agu-z September 23, 2025 14:23
@benbrandt benbrandt marked this pull request as draft September 24, 2025 19:09
@benbrandt
Copy link
Copy Markdown
Member Author

Going to revisit this as an optional API rather than a breaking change

@benbrandt benbrandt closed this Oct 20, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant