-
Notifications
You must be signed in to change notification settings - Fork 18
Update version 1.0 #49
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
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.
10 issues found across 11 files
React with 👍 or 👎 to teach cubic. Mention @cubic-dev-ai to give feedback, ask questions, or re-run the review.
| ```json | ||
| { | ||
| "max_size": 1048576 // 1MB limit | ||
| "manual_call_template": { /* original template */ }, |
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.
JSON example uses /* */ inside an object; JSON doesn’t support comments. Remove the comment to keep the example valid.
Prompt for AI agents
Address the following comment on versioned_docs/version-1.0/protocols/text.md at line 188:
<comment>JSON example uses /* */ inside an object; JSON doesn’t support comments. Remove the comment to keep the example valid.</comment>
<file context>
@@ -6,432 +6,216 @@ sidebar_position: 5
```json
{
- "max_size": 1048576 // 1MB limit
+ "manual_call_template": { /* original template */ },
+ "manual": { "tools": [] },
+ "success": false,
</file context>
| "manual_call_template": { /* original template */ }, | |
| "manual_call_template": {}, |
| ### JSON Files | ||
|
|
||
| ```json | ||
| // /path/to/manual.json |
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.
JSON code block contains a // comment line, which is invalid JSON. Remove the comment or move it outside the JSON block.
Prompt for AI agents
Address the following comment on versioned_docs/version-1.0/protocols/text.md at line 147:
<comment>JSON code block contains a // comment line, which is invalid JSON. Remove the comment or move it outside the JSON block.</comment>
<file context>
@@ -6,432 +6,216 @@ sidebar_position: 5
+### JSON Files
```json
+// /path/to/manual.json
{
- "transform": "normalize_whitespace" // Normalize all whitespace
</file context>
| "max_size": 65536 | ||
| } | ||
| "call_template_type": "text", | ||
| "file_path": "manuals/my_tools.json" // Resolved against client root_dir |
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.
JSON example includes a trailing // comment, which is invalid JSON and may confuse readers. Remove the comment or move it to surrounding prose.
Prompt for AI agents
Address the following comment on versioned_docs/version-1.0/protocols/text.md at line 66:
<comment>JSON example includes a trailing // comment, which is invalid JSON and may confuse readers. Remove the comment or move it to surrounding prose.</comment>
<file context>
@@ -6,432 +6,216 @@ sidebar_position: 5
- "max_size": 65536
- }
+ "call_template_type": "text",
+ "file_path": "manuals/my_tools.json" // Resolved against client root_dir
}
</file context>
</details>
```suggestion
"file_path": "manuals/my_tools.json"
| The Text call template has a simple structure for reading UTCP manuals from files. For complete field specifications and validation rules, see the [Text Call Template API Reference](../api/plugins/communication_protocols/text/src/utcp_text/text_call_template.md). | ||
|
|
||
| ## File Sources | ||
| ### Required Fields |
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.
Heading labels these as required, but auth is not required (it's always None). Rename the heading to avoid implying auth must be supplied.
Prompt for AI agents
Address the following comment on versioned_docs/version-1.0/protocols/text.md at line 31:
<comment>Heading labels these as required, but auth is not required (it's always None). Rename the heading to avoid implying auth must be supplied.</comment>
<file context>
@@ -6,432 +6,216 @@ sidebar_position: 5
+The Text call template has a simple structure for reading UTCP manuals from files. For complete field specifications and validation rules, see the [Text Call Template API Reference](../api/plugins/communication_protocols/text/src/utcp_text/text_call_template.md).
-## File Sources
+### Required Fields
-### Local Files
</file context>
| ### Required Fields | |
| ### Fields |
| client = UtcpClient() | ||
|
|
||
| # Register streamable HTTP provider | ||
| await client.register_tool_provider(streamable_http_manual) |
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.
The usage example calls UtcpClient.register_tool_provider, which does not exist; use register_manual instead to align with the documented API.
Prompt for AI agents
Address the following comment on versioned_docs/version-1.0/protocols/streamable-http.md at line 249:
<comment>The usage example calls UtcpClient.register_tool_provider, which does not exist; use register_manual instead to align with the documented API.</comment>
<file context>
@@ -99,7 +163,105 @@ Errors are handled similarly to the standard HTTP protocol:
+ client = UtcpClient()
+
+ # Register streamable HTTP provider
+ await client.register_tool_provider(streamable_http_manual)
+
+ # Stream large dataset
</file context>
| await client.register_tool_provider(streamable_http_manual) | |
| await client.register_manual(streamable_http_manual) |
| client = UtcpClient() | ||
|
|
||
| # Register SSE provider | ||
| await client.register_tool_provider(sse_manual) |
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.
Define the provider variable used in the example or reference an existing example provider to avoid undefined-name errors.
Prompt for AI agents
Address the following comment on versioned_docs/version-1.0/protocols/sse.md at line 412:
<comment>Define the provider variable used in the example or reference an existing example provider to avoid undefined-name errors.</comment>
<file context>
@@ -318,47 +341,86 @@ data: {"message": "Simple data without event type"}
+ client = UtcpClient()
+
+ # Register SSE provider
+ await client.register_tool_provider(sse_manual)
+
+ # Stream events with automatic filtering and reconnection
</file context>
| "retry_timeout": 30000, | ||
| "auth": { | ||
| "auth_type": "api_key", | ||
| "api_key": "${STOCK_API_KEY}", |
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.
Use a Bearer-prefixed value for Authorization to align with the API Key Authentication example and common practice.
Prompt for AI agents
Address the following comment on versioned_docs/version-1.0/protocols/sse.md at line 177:
<comment>Use a Bearer-prefixed value for Authorization to align with the API Key Authentication example and common practice.</comment>
<file context>
@@ -133,27 +162,21 @@ SSE uses standard HTTP authentication methods:
+ "retry_timeout": 30000,
+ "auth": {
+ "auth_type": "api_key",
+ "api_key": "${STOCK_API_KEY}",
+ "var_name": "Authorization",
+ "location": "header"
</file context>
| "api_key": "${STOCK_API_KEY}", | |
| "api_key": "Bearer ${STOCK_API_KEY}", |
| "manual_call_templates": [{ | ||
| "name": "github_manual", | ||
| "call_template_type": "text", | ||
| "file_path": "./github_manual.json", |
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.
Remove the trailing comma after file_path to make the JSON valid.
Prompt for AI agents
Address the following comment on versioned_docs/version-1.0/index.md at line 122:
<comment>Remove the trailing comma after file_path to make the JSON valid.</comment>
<file context>
@@ -72,31 +81,55 @@ Add a discovery endpoint to your existing API:
+ "manual_call_templates": [{
+ "name": "github_manual",
+ "call_template_type": "text",
+ "file_path": "./github_manual.json",
+ }]
+}
</file context>
| "file_path": "./github_manual.json", | |
| "file_path": "./github_manual.json" |
| Add a discovery endpoint to your existing API: | ||
| **Option A: Discovery via existing OpenAPI spec** | ||
|
|
||
| **Generate OpenAPI endpoint**: `GET http://api.github.com/openapi.json` |
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.
Use HTTPS for the GitHub OpenAPI endpoint to avoid mixed content and ensure correctness.
Prompt for AI agents
Address the following comment on versioned_docs/version-1.0/index.md at line 53:
<comment>Use HTTPS for the GitHub OpenAPI endpoint to avoid mixed content and ensure correctness.</comment>
<file context>
@@ -44,7 +48,12 @@ npm install @utcp/core @utcp/http
-Add a discovery endpoint to your existing API:
+**Option A: Discovery via existing OpenAPI spec**
+
+**Generate OpenAPI endpoint**: `GET http://api.github.com/openapi.json`
+
+
</file context>
| **Generate OpenAPI endpoint**: `GET http://api.github.com/openapi.json` | |
| **Generate OpenAPI endpoint**: `GET https://api.github.com/openapi.json` |
| "name": "weather_api", | ||
| "call_template_type": "http", | ||
| "url": "http://localhost:8000/utcp", | ||
| "url": "http://localhost:8000/utcp", // Or http://api.github.com/openapi.json, the openapi spec gets converted automatically |
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.
Inline comment makes the JSON invalid and not copy-pasteable; move the note to surrounding text or remove the comment.
Prompt for AI agents
Address the following comment on versioned_docs/version-1.0/index.md at line 95:
<comment>Inline comment makes the JSON invalid and not copy-pasteable; move the note to surrounding text or remove the comment.</comment>
<file context>
@@ -72,31 +81,55 @@ Add a discovery endpoint to your existing API:
"name": "weather_api",
"call_template_type": "http",
- "url": "http://localhost:8000/utcp",
+ "url": "http://localhost:8000/utcp", // Or http://api.github.com/openapi.json, the openapi spec gets converted automatically
"http_method": "GET"
}]
</file context>
| "url": "http://localhost:8000/utcp", // Or http://api.github.com/openapi.json, the openapi spec gets converted automatically | |
| "url": "http://localhost:8000/utcp", |
Summary by cubic
Overhauled v1.0 docs to align with current protocol behavior, add OpenAPI compatibility, and remove WebSocket references. Clarifies parameter mapping, auth, security, and updates examples across HTTP, MCP, SSE, Streamable HTTP, Text, and Quick Start.
New Features
Migration