-
Notifications
You must be signed in to change notification settings - Fork 12
Dev #8
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
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>
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.
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://', |
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.
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('Detected OpenAPI specification. Converting to UTCP manual.');
const converter = new OpenApiConverter(data, {
- specUrl: `file://${filePath}`,
+ specUrl: textCallTemplate.file_path ? `file://${sourceInfo}` : 'direct-content://',
callTemplateName: textCallTemplate.name,
authTools: textCallTemplate.auth_tools || undefined,
</file context>
| specUrl: textCallTemplate.file_path ? `file://${sourceInfo}` : 'direct-content://', | |
| specUrl: textCallTemplate.content ? 'direct-content://' : `file://${sourceInfo}``, |
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
Refactors