Skip to content

Conversation

@h3xxit
Copy link
Member

@h3xxit h3xxit commented Nov 29, 2025

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

    • GraphQL protocol and call template with schema introspection, HTTPS/localhost enforcement, and auth (API key, Basic, OAuth2).
    • Map selected input fields into request headers via header_fields; filters those from GraphQL variables.
    • TCP/UDP protocols with UTCP 1.0 manual registration and tool_call_template normalization (converts legacy tool_provider).
    • Framing support: fixed_length, delimiter (with interpret_escape_sequences), and stream.
    • Added tests for GraphQL, TCP, and UDP, a socket sanity script, and README guides.
  • Refactors

    • Migrated plugins to the CommunicationProtocol interface and added call template serializers.
    • Plugin registration via utcp.plugins (register() and entry-points).
    • CI installs and runs socket tests.
    • mcp dev deps updated (temporary langchain pin) to unblock tests.

Written for commit d4d8ede. Summary will update automatically on new commits.

Thuraabtech and others added 2 commits October 29, 2025 17:55
* 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>
Copy link
Contributor

@cubic-dev-ai cubic-dev-ai bot left a 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} }}"
Copy link
Contributor

@cubic-dev-ai cubic-dev-ai bot Nov 29, 2025

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) -&gt; str:
             arg_pass = f&quot;({arg_pass})&quot; if arg_pass else &quot;&quot;
-            gql_str = f&quot;{op_type} {var_defs} {{ {tool_name}{arg_pass} }}&quot;
+
+            gql_str = f&quot;{op_type} {var_defs} {{ {base_tool_name}{arg_pass} }}&quot;
             document = gql_query(gql_str)
-            result = await session.execute(document, variable_values=tool_args)
</file context>
Fix with Cubic

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())
Copy link
Contributor

@cubic-dev-ai cubic-dev-ai bot Nov 29, 2025

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) -&gt; 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 = &quot;, &quot;.join(f&quot;${k}: String&quot; for k in filtered_args.keys())
             var_defs = f&quot;({arg_str})&quot; if arg_str else &quot;&quot;
-            arg_pass = &#39;, &#39;.join(f&quot;{k}: ${k}&quot; for k in tool_args.keys())
</file context>

✅ Addressed in 7e1d47d

@h3xxit h3xxit merged commit 629621e into main Nov 29, 2025
18 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants