|
|
@@ -11371,14 +11371,7 @@
|
|
|
"$ref": "#/components/schemas/LocationInfo"
|
|
|
},
|
|
|
"data": {
|
|
|
- "anyOf": [
|
|
|
- {
|
|
|
- "$ref": "#/components/schemas/FileSystemTextContent"
|
|
|
- },
|
|
|
- {
|
|
|
- "$ref": "#/components/schemas/FileSystemBinaryContent"
|
|
|
- }
|
|
|
- ]
|
|
|
+ "$ref": "#/components/schemas/FileSystemContent"
|
|
|
}
|
|
|
},
|
|
|
"required": ["location", "data"],
|
|
|
@@ -11507,6 +11500,112 @@
|
|
|
]
|
|
|
}
|
|
|
},
|
|
|
+ "/api/fs/find": {
|
|
|
+ "get": {
|
|
|
+ "tags": ["filesystem"],
|
|
|
+ "operationId": "v2.fs.find",
|
|
|
+ "parameters": [
|
|
|
+ {
|
|
|
+ "name": "location",
|
|
|
+ "in": "query",
|
|
|
+ "schema": {
|
|
|
+ "type": "object",
|
|
|
+ "properties": {
|
|
|
+ "directory": {
|
|
|
+ "type": "string"
|
|
|
+ },
|
|
|
+ "workspace": {
|
|
|
+ "type": "string"
|
|
|
+ }
|
|
|
+ },
|
|
|
+ "additionalProperties": false
|
|
|
+ },
|
|
|
+ "required": false,
|
|
|
+ "style": "deepObject",
|
|
|
+ "explode": true
|
|
|
+ },
|
|
|
+ {
|
|
|
+ "name": "query",
|
|
|
+ "in": "query",
|
|
|
+ "schema": {
|
|
|
+ "type": "string"
|
|
|
+ },
|
|
|
+ "required": true
|
|
|
+ },
|
|
|
+ {
|
|
|
+ "name": "type",
|
|
|
+ "in": "query",
|
|
|
+ "schema": {
|
|
|
+ "type": "string",
|
|
|
+ "enum": ["file", "directory"]
|
|
|
+ },
|
|
|
+ "required": false
|
|
|
+ },
|
|
|
+ {
|
|
|
+ "name": "limit",
|
|
|
+ "in": "query",
|
|
|
+ "schema": {
|
|
|
+ "type": "string"
|
|
|
+ },
|
|
|
+ "required": false
|
|
|
+ }
|
|
|
+ ],
|
|
|
+ "security": [],
|
|
|
+ "responses": {
|
|
|
+ "200": {
|
|
|
+ "description": "Success",
|
|
|
+ "content": {
|
|
|
+ "application/json": {
|
|
|
+ "schema": {
|
|
|
+ "type": "object",
|
|
|
+ "properties": {
|
|
|
+ "location": {
|
|
|
+ "$ref": "#/components/schemas/LocationInfo"
|
|
|
+ },
|
|
|
+ "data": {
|
|
|
+ "type": "array",
|
|
|
+ "items": {
|
|
|
+ "$ref": "#/components/schemas/FileSystemEntry"
|
|
|
+ }
|
|
|
+ }
|
|
|
+ },
|
|
|
+ "required": ["location", "data"],
|
|
|
+ "additionalProperties": false
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+ },
|
|
|
+ "400": {
|
|
|
+ "description": "InvalidRequestError",
|
|
|
+ "content": {
|
|
|
+ "application/json": {
|
|
|
+ "schema": {
|
|
|
+ "$ref": "#/components/schemas/InvalidRequestError"
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+ },
|
|
|
+ "401": {
|
|
|
+ "description": "UnauthorizedError",
|
|
|
+ "content": {
|
|
|
+ "application/json": {
|
|
|
+ "schema": {
|
|
|
+ "$ref": "#/components/schemas/UnauthorizedError"
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+ },
|
|
|
+ "description": "Find recursively ranked filesystem entries relative to the requested location.",
|
|
|
+ "summary": "Find files",
|
|
|
+ "x-codeSamples": [
|
|
|
+ {
|
|
|
+ "lang": "js",
|
|
|
+ "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.v2.fs.find({\n ...\n})"
|
|
|
+ }
|
|
|
+ ]
|
|
|
+ }
|
|
|
+ },
|
|
|
"/api/command": {
|
|
|
"get": {
|
|
|
"tags": ["commands"],
|
|
|
@@ -21492,51 +21591,8 @@
|
|
|
"type": "string",
|
|
|
"enum": ["file"]
|
|
|
},
|
|
|
- "source": {
|
|
|
- "anyOf": [
|
|
|
- {
|
|
|
- "type": "object",
|
|
|
- "properties": {
|
|
|
- "type": {
|
|
|
- "type": "string",
|
|
|
- "enum": ["data"]
|
|
|
- },
|
|
|
- "data": {
|
|
|
- "type": "string"
|
|
|
- }
|
|
|
- },
|
|
|
- "required": ["type", "data"],
|
|
|
- "additionalProperties": false
|
|
|
- },
|
|
|
- {
|
|
|
- "type": "object",
|
|
|
- "properties": {
|
|
|
- "type": {
|
|
|
- "type": "string",
|
|
|
- "enum": ["url"]
|
|
|
- },
|
|
|
- "url": {
|
|
|
- "type": "string"
|
|
|
- }
|
|
|
- },
|
|
|
- "required": ["type", "url"],
|
|
|
- "additionalProperties": false
|
|
|
- },
|
|
|
- {
|
|
|
- "type": "object",
|
|
|
- "properties": {
|
|
|
- "type": {
|
|
|
- "type": "string",
|
|
|
- "enum": ["file"]
|
|
|
- },
|
|
|
- "uri": {
|
|
|
- "type": "string"
|
|
|
- }
|
|
|
- },
|
|
|
- "required": ["type", "uri"],
|
|
|
- "additionalProperties": false
|
|
|
- }
|
|
|
- ]
|
|
|
+ "uri": {
|
|
|
+ "type": "string"
|
|
|
},
|
|
|
"mime": {
|
|
|
"type": "string"
|
|
|
@@ -21545,7 +21601,7 @@
|
|
|
"type": "string"
|
|
|
}
|
|
|
},
|
|
|
- "required": ["type", "source", "mime"],
|
|
|
+ "required": ["type", "uri", "mime"],
|
|
|
"additionalProperties": false
|
|
|
},
|
|
|
"SessionNextRetry_error": {
|
|
|
@@ -24986,42 +25042,27 @@
|
|
|
"required": ["id", "projectID", "action", "resource"],
|
|
|
"additionalProperties": false
|
|
|
},
|
|
|
- "FileSystemTextContent": {
|
|
|
+ "FileSystemContent": {
|
|
|
"type": "object",
|
|
|
"properties": {
|
|
|
- "type": {
|
|
|
- "type": "string",
|
|
|
- "enum": ["text"]
|
|
|
- },
|
|
|
- "content": {
|
|
|
+ "uri": {
|
|
|
"type": "string"
|
|
|
},
|
|
|
- "mime": {
|
|
|
+ "name": {
|
|
|
"type": "string"
|
|
|
- }
|
|
|
- },
|
|
|
- "required": ["type", "content", "mime"],
|
|
|
- "additionalProperties": false
|
|
|
- },
|
|
|
- "FileSystemBinaryContent": {
|
|
|
- "type": "object",
|
|
|
- "properties": {
|
|
|
- "type": {
|
|
|
- "type": "string",
|
|
|
- "enum": ["binary"]
|
|
|
},
|
|
|
"content": {
|
|
|
"type": "string"
|
|
|
},
|
|
|
"encoding": {
|
|
|
"type": "string",
|
|
|
- "enum": ["base64"]
|
|
|
+ "enum": ["utf8", "base64"]
|
|
|
},
|
|
|
"mime": {
|
|
|
"type": "string"
|
|
|
}
|
|
|
},
|
|
|
- "required": ["type", "content", "encoding", "mime"],
|
|
|
+ "required": ["uri", "content", "encoding", "mime"],
|
|
|
"additionalProperties": false
|
|
|
},
|
|
|
"FileSystemEntry": {
|