Skip to content

Conversation

@h3xxit
Copy link
Member

@h3xxit h3xxit commented Oct 22, 2025

Summary by cubic

Adds a new @utcp/direct-call plugin to register and call JS/TS functions as UTCP tools, and updates the build to produce both ESM and CJS bundles via tsup. Also lets the Text plugin load manuals from inline content strings.

  • New Features

    • New @utcp/direct-call package with DirectCallTemplate, registerCallable/addFunctionToUtcpDirectCall helpers, streaming support, tests, and README.
    • Core auto-registers the Direct Call and CLI plugins when available.
    • Text plugin can load manuals from raw string content in addition to files.
  • Refactors

    • Switched packages to tsup and now publish ESM + CJS (updated main/module and exports).
    • replace-version script updates both index.js and index.cjs outputs.
    • Root scripts split per package; added build for direct-call and simplified clean.
    • Added tsup configs across packages and marked externals; bumped package versions.
    • Added package-lock.json for consistent installs.

h3xxit and others added 7 commits October 21, 2025 18:53
Co-authored-by: cubic-dev-ai[bot] <191113872+cubic-dev-ai[bot]@users.noreply.github.com>
Co-authored-by: cubic-dev-ai[bot] <191113872+cubic-dev-ai[bot]@users.noreply.github.com>
@h3xxit h3xxit merged commit 3602c93 into main Oct 22, 2025
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.

1 issue found across 4 files

Prompt for AI agents (all 1 issues)

Understand the root cause of the following 1 issues and fix them.


<file name="packages/text/src/text_communication_protocol.ts">

<violation number="1" location="packages/text/src/text_communication_protocol.ts:94">
When `content` is preferred but `file_path` is still present, this builds `file://direct content`, so OpenAPI conversion sees an invalid URL and cannot resolve relative refs. Please gate the URL choice off of whether content was used.</violation>
</file>

React with 👍 or 👎 to teach cubic. Mention @cubic-dev-ai to give feedback, ask questions, or re-run the review.

this._log_info('Detected OpenAPI specification. Converting to UTCP manual.');
const converter = new OpenApiConverter(data, {
specUrl: `file://${filePath}`,
specUrl: textCallTemplate.file_path ? `file://${sourceInfo}` : 'direct-content://',
Copy link
Contributor

@cubic-dev-ai cubic-dev-ai bot Oct 22, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

When content is preferred but file_path is still present, this builds file://direct content, so OpenAPI conversion sees an invalid URL and cannot resolve relative refs. Please gate the URL choice off of whether content was used.

Prompt for AI agents
Address the following comment on packages/text/src/text_communication_protocol.ts at line 94:

<comment>When `content` is preferred but `file_path` is still present, this builds `file://direct content`, so OpenAPI conversion sees an invalid URL and cannot resolve relative refs. Please gate the URL choice off of whether content was used.</comment>

<file context>
@@ -30,42 +30,68 @@ export class TextCommunicationProtocol implements CommunicationProtocol {
         this._log_info(&#39;Detected OpenAPI specification. Converting to UTCP manual.&#39;);
         const converter = new OpenApiConverter(data, {
-          specUrl: `file://${filePath}`,
+          specUrl: textCallTemplate.file_path ? `file://${sourceInfo}` : &#39;direct-content://&#39;,
           callTemplateName: textCallTemplate.name,
           authTools: textCallTemplate.auth_tools || undefined,
</file context>
Suggested change
specUrl: textCallTemplate.file_path ? `file://${sourceInfo}` : 'direct-content://',
specUrl: textCallTemplate.content ? 'direct-content://' : `file://${sourceInfo}``,
Fix with Cubic

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.

2 participants