-
Notifications
You must be signed in to change notification settings - Fork 43
updated socket protocol implementation to be compatible with 1.0v #72
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
Merged
h3xxit
merged 16 commits into
universal-tool-calling-protocol:dev
from
Thuraabtech:issue/socket-1.0v
Oct 29, 2025
Merged
Changes from 13 commits
Commits
Show all changes
16 commits
Select commit
Hold shift + click to select a range
d28dc58
Update docstrings and fix README
h3xxit 018806c
Merge pull request #52 from universal-tool-calling-protocol/dev
h3xxit 0f2af7e
Merge pull request #53 from universal-tool-calling-protocol/dev
h3xxit d28c0af
Update documentation and fix MCP plugin
h3xxit 7ba8b3c
Merge pull request #61 "Update CLI" from universal-tool-calling-proto…
h3xxit 908cd40
Merge pull request #63 from universal-tool-calling-protocol/dev
h3xxit 74a11e2
Merge pull request #69 from universal-tool-calling-protocol/dev
h3xxit 03a4b9f
Merge pull request #70 from universal-tool-calling-protocol/dev
h3xxit 8443cda
Merge branch 'dev'
h3xxit 0150a3b
Merge branch 'dev'
h3xxit 6e2c671
socket protocol updated to be compatible with 1.0v utcp
9cea90f
cubic fixes done
7016987
pinned mcp-use to use langchain 0.3.27
718b668
removed mcp denpendency on langchain
ca252e5
adding the langchain dependency for testing (temporary)
45793cf
remove langchain-core pin to resolve dependency conflict
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1 +1,44 @@ | ||
| Find the UTCP readme at https://github.com/universal-tool-calling-protocol/python-utcp. | ||
| # UTCP Socket Plugin (UDP/TCP) | ||
|
|
||
| This plugin adds UDP and TCP communication protocols to UTCP 1.0. | ||
|
|
||
| ## Running Tests | ||
|
|
||
| Prerequisites: | ||
| - Python 3.10+ | ||
| - `pip` | ||
| - (Optional) a virtual environment | ||
|
|
||
| 1) Install core and the socket plugin in editable mode with dev extras: | ||
|
|
||
| ```bash | ||
| pip install -e "core[dev]" | ||
| pip install -e plugins/communication_protocols/socket[dev] | ||
| ``` | ||
|
|
||
| 2) Run the socket plugin tests: | ||
|
|
||
| ```bash | ||
| python -m pytest plugins/communication_protocols/socket/tests -v | ||
| ``` | ||
|
|
||
| 3) Run a single test or filter by keyword: | ||
|
|
||
| ```bash | ||
| # One file | ||
| python -m pytest plugins/communication_protocols/socket/tests/test_tcp_communication_protocol.py -v | ||
|
|
||
| # Filter by keyword (e.g., delimiter framing) | ||
| python -m pytest plugins/communication_protocols/socket/tests -k delimiter -q | ||
| ``` | ||
|
|
||
| 4) Optional end-to-end sanity check (mock UDP/TCP servers): | ||
|
|
||
| ```bash | ||
| python scripts/socket_sanity.py | ||
| ``` | ||
|
|
||
| Notes: | ||
| - On Windows, your firewall may prompt the first time tests open UDP/TCP sockets; allow access or run as admin if needed. | ||
| - Tests use `pytest-asyncio`. The dev extras installed above provide required dependencies. | ||
| - Streaming is single-chunk by design, consistent with HTTP/Text transports. Multi-chunk streaming can be added later behind provider configuration. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,18 @@ | ||
| from utcp.plugins.discovery import register_communication_protocol, register_call_template | ||
| from utcp_socket.tcp_communication_protocol import TCPTransport | ||
| from utcp_socket.udp_communication_protocol import UDPTransport | ||
| from utcp_socket.tcp_call_template import TCPProviderSerializer | ||
| from utcp_socket.udp_call_template import UDPProviderSerializer | ||
|
|
||
|
|
||
| def register() -> None: | ||
| # Register communication protocols | ||
| register_communication_protocol("tcp", TCPTransport()) | ||
| register_communication_protocol("udp", UDPTransport()) | ||
|
|
||
| # Register call templates and their serializers | ||
| register_call_template("tcp", TCPProviderSerializer()) | ||
| register_call_template("udp", UDPProviderSerializer()) | ||
|
|
||
|
|
||
| __all__ = ["register"] |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Probably unintended changes to the MCP package. Please remove
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I saw that the tests were failing, so i added the langchain dependencies. Even after adding the dependency, the test is still failing. Now i've removed the mcp_use dependency on langchain.