GitHub Action 1 месяц назад
Родитель
Сommit
555a5ccb59
1 измененных файлов с 51 добавлено и 6 удалено
  1. 51 6
      packages/sdk/openapi.json

+ 51 - 6
packages/sdk/openapi.json

@@ -4541,9 +4541,9 @@
         ]
         ]
       }
       }
     },
     },
-    "/mcp/resources": {
+    "/experimental/resource": {
       "get": {
       "get": {
-        "operationId": "mcp.resources",
+        "operationId": "experimental.resource.list",
         "parameters": [
         "parameters": [
           {
           {
             "in": "query",
             "in": "query",
@@ -4554,7 +4554,7 @@
           }
           }
         ],
         ],
         "summary": "Get MCP resources",
         "summary": "Get MCP resources",
-        "description": "Get all available MCP resources from connected servers.",
+        "description": "Get all available MCP resources from connected servers. Optionally filter by name.",
         "responses": {
         "responses": {
           "200": {
           "200": {
             "description": "MCP resources",
             "description": "MCP resources",
@@ -4565,7 +4565,9 @@
                   "propertyNames": {
                   "propertyNames": {
                     "type": "string"
                     "type": "string"
                   },
                   },
-                  "additionalProperties": {}
+                  "additionalProperties": {
+                    "$ref": "#/components/schemas/McpResource"
+                  }
                 }
                 }
               }
               }
             }
             }
@@ -4574,7 +4576,7 @@
         "x-codeSamples": [
         "x-codeSamples": [
           {
           {
             "lang": "js",
             "lang": "js",
-            "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.mcp.resources({\n  ...\n})"
+            "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.experimental.resource.list({\n  ...\n})"
           }
           }
         ]
         ]
       }
       }
@@ -6078,6 +6080,25 @@
         },
         },
         "required": ["text", "type", "path", "range", "name", "kind"]
         "required": ["text", "type", "path", "range", "name", "kind"]
       },
       },
+      "ResourceSource": {
+        "type": "object",
+        "properties": {
+          "text": {
+            "$ref": "#/components/schemas/FilePartSourceText"
+          },
+          "type": {
+            "type": "string",
+            "const": "resource"
+          },
+          "clientName": {
+            "type": "string"
+          },
+          "uri": {
+            "type": "string"
+          }
+        },
+        "required": ["text", "type", "clientName", "uri"]
+      },
       "FilePartSource": {
       "FilePartSource": {
         "anyOf": [
         "anyOf": [
           {
           {
@@ -6085,6 +6106,9 @@
           },
           },
           {
           {
             "$ref": "#/components/schemas/SymbolSource"
             "$ref": "#/components/schemas/SymbolSource"
+          },
+          {
+            "$ref": "#/components/schemas/ResourceSource"
           }
           }
         ]
         ]
       },
       },
@@ -9880,7 +9904,7 @@
             "maximum": 9007199254740991
             "maximum": 9007199254740991
           }
           }
         },
         },
-        "required": ["name", "mode", "builtIn", "permission", "options"]
+        "required": ["name", "mode", "permission", "options"]
       },
       },
       "MCPStatusConnected": {
       "MCPStatusConnected": {
         "type": "object",
         "type": "object",
@@ -9957,6 +9981,27 @@
           }
           }
         ]
         ]
       },
       },
+      "McpResource": {
+        "type": "object",
+        "properties": {
+          "name": {
+            "type": "string"
+          },
+          "uri": {
+            "type": "string"
+          },
+          "description": {
+            "type": "string"
+          },
+          "mimeType": {
+            "type": "string"
+          },
+          "client": {
+            "type": "string"
+          }
+        },
+        "required": ["name", "uri", "client"]
+      },
       "LSPStatus": {
       "LSPStatus": {
         "type": "object",
         "type": "object",
         "properties": {
         "properties": {