Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

context_server: Abstract server transport #24528

Open
wants to merge 4 commits into
base: main
Choose a base branch
from

Conversation

fdionisi
Copy link
Contributor

@fdionisi fdionisi commented Feb 9, 2025

This PR abstracts the communication layer for context servers, laying the groundwork for supporting multiple transport mechanisms and taking one step towards enabling remote servers.

Key changes centre around creating a new Transport trait with methods for sending and receiving messages. I've implemented this trait for the existing stdio-based communication, which is now encapsulated in a StdioTransport struct. The Client struct has been refactored to use this new Transport trait instead of directly managing stdin and stdout.

The next steps will involve implementing an SSE + HTTP transport and defining alternative context server settings for remote servers.

Release Notes:

  • N/A

@cla-bot cla-bot bot added the cla-signed The user has signed the Contributor License Agreement label Feb 9, 2025
@fdionisi
Copy link
Contributor Author

Hey @maxdeviant, thank you for taking over - these are changes I had in my mind, too, but I wanted to validate the direction before committing to it.

I went ahead on a separate branch to implement SSE transport, but I'm hitting a wall when trying to test it. For some reason, context servers are not getting initialised anymore on dev builds, and I cannot understand what I am doing wrong.
I'd love to get a draft PR up and have another pair of eyes looking at it, time permitting. What's the best way to move forward?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
cla-signed The user has signed the Contributor License Agreement
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants