-
Notifications
You must be signed in to change notification settings - Fork 38
Socket and GraphQL Plugins #76
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
Conversation
* socket protocol updated to be compatible with 1.0v utcp * cubic fixes done * pinned mcp-use to use langchain 0.3.27 * removed mcp denpendency on langchain * adding the langchain dependency for testing (temporary) * remove langchain-core pin to resolve dependency conflict --------- Co-authored-by: Razvan Radulescu <43811028+h3xxit@users.noreply.github.com> Co-authored-by: Salman Mohammed <thuraabtec@gmail.com>
* socket protocol updated to be compatible with 1.0v utcp * cubic fixes done * pinned mcp-use to use langchain 0.3.27 * removed mcp denpendency on langchain * adding the langchain dependency for testing (temporary) * remove langchain-core pin to resolve dependency conflict * feat: Updated Graphql implementation to be compatible with UTCP 1.0v * Added gql 'how to use' guide in the README.md * updated cubic comments for GraphQl * Update comment on delimeter handling Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> --------- Co-authored-by: Razvan Radulescu <43811028+h3xxit@users.noreply.github.com> Co-authored-by: Salman Mohammed <thuraabtec@gmail.com> Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
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.
3 issues found across 18 files
Prompt for AI agents (all 3 issues)
Check if these issues are valid — if so, understand the root cause of each and fix them.
<file name="plugins/communication_protocols/socket/README.md">
<violation number="1" location="plugins/communication_protocols/socket/README.md:16">
Add the `./` prefix so pip installs the editable local core package instead of trying to fetch an unrelated PyPI project.</violation>
</file>
<file name="plugins/communication_protocols/gql/src/utcp_gql/gql_communication_protocol.py">
<violation number="1" location="plugins/communication_protocols/gql/src/utcp_gql/gql_communication_protocol.py:193">
GraphQL variables are forced to type `String`, so operations that expect other input types now always fail and there is no way for callers to provide correctly typed variables.</violation>
<violation number="2" location="plugins/communication_protocols/gql/src/utcp_gql/gql_communication_protocol.py:198">
Auto-generated GraphQL operations omit a selection set, so any field that returns an object immediately fails validation and callers can no longer supply their own query to fix it.</violation>
</file>
Reply to cubic to teach it or ask questions. Re-run a review with @cubic-dev-ai review this PR
| arg_pass = f"({arg_pass})" if arg_pass else "" | ||
| gql_str = f"{op_type} {var_defs} {{ {tool_name}{arg_pass} }}" | ||
|
|
||
| gql_str = f"{op_type} {var_defs} {{ {base_tool_name}{arg_pass} }}" |
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.
Auto-generated GraphQL operations omit a selection set, so any field that returns an object immediately fails validation and callers can no longer supply their own query to fix it.
Prompt for AI agents
Check if this issue is valid — if so, understand the root cause and fix it. At plugins/communication_protocols/gql/src/utcp_gql/gql_communication_protocol.py, line 198:
<comment>Auto-generated GraphQL operations omit a selection set, so any field that returns an object immediately fails validation and callers can no longer supply their own query to fix it.</comment>
<file context>
@@ -39,98 +58,158 @@ async def _handle_oauth2(self, auth: OAuth2Auth) -> str:
arg_pass = f"({arg_pass})" if arg_pass else ""
- gql_str = f"{op_type} {var_defs} {{ {tool_name}{arg_pass} }}"
+
+ gql_str = f"{op_type} {var_defs} {{ {base_tool_name}{arg_pass} }}"
document = gql_query(gql_str)
- result = await session.execute(document, variable_values=tool_args)
</file context>
| header_fields = tool_call_template.header_fields or [] | ||
| filtered_args = {k: v for k, v in tool_args.items() if k not in header_fields} | ||
|
|
||
| arg_str = ", ".join(f"${k}: String" for k in filtered_args.keys()) |
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.
GraphQL variables are forced to type String, so operations that expect other input types now always fail and there is no way for callers to provide correctly typed variables.
Prompt for AI agents
Check if this issue is valid — if so, understand the root cause and fix it. At plugins/communication_protocols/gql/src/utcp_gql/gql_communication_protocol.py, line 193:
<comment>GraphQL variables are forced to type `String`, so operations that expect other input types now always fail and there is no way for callers to provide correctly typed variables.</comment>
<file context>
@@ -39,98 +58,158 @@ async def _handle_oauth2(self, auth: OAuth2Auth) -> str:
+ header_fields = tool_call_template.header_fields or []
+ filtered_args = {k: v for k, v in tool_args.items() if k not in header_fields}
+
+ arg_str = ", ".join(f"${k}: String" for k in filtered_args.keys())
var_defs = f"({arg_str})" if arg_str else ""
- arg_pass = ', '.join(f"{k}: ${k}" for k in tool_args.keys())
</file context>
✅ Addressed in 7e1d47d
Summary by cubic
Adds UTCP 1.0-compatible GraphQL and Socket (TCP/UDP) communication protocol plugins, with discovery, auth, framing, and full tests. This enables registering manuals and calling tools over GraphQL, TCP, and UDP; CI now runs socket tests.
New Features
Refactors
Written for commit d4d8ede. Summary will update automatically on new commits.