diff options
| author | opencode-agent[bot] <opencode-agent[bot]@users.noreply.github.com> | 2026-03-04 02:36:18 +0000 |
|---|---|---|
| committer | opencode-agent[bot] <opencode-agent[bot]@users.noreply.github.com> | 2026-03-04 02:36:18 +0000 |
| commit | 2a0be8316be7ae6ec78f5d221851fc1cc0cdddb2 (patch) | |
| tree | 8d82dbc00fc185817ed6b1518f91c3805bdeca9d /packages/sdk/openapi.json | |
| parent | 7f37acdaaa89b358fb795ccd006d37ed7fa6672e (diff) | |
| download | opencode-2a0be8316be7ae6ec78f5d221851fc1cc0cdddb2.tar.gz opencode-2a0be8316be7ae6ec78f5d221851fc1cc0cdddb2.zip | |
chore: generate
Diffstat (limited to 'packages/sdk/openapi.json')
| -rw-r--r-- | packages/sdk/openapi.json | 409 |
1 files changed, 206 insertions, 203 deletions
diff --git a/packages/sdk/openapi.json b/packages/sdk/openapi.json index 8f03cb92c..7db79bcbe 100644 --- a/packages/sdk/openapi.json +++ b/packages/sdk/openapi.json @@ -1108,9 +1108,9 @@ ] } }, - "/experimental/worktree": { + "/experimental/workspace": { "post": { - "operationId": "worktree.create", + "operationId": "experimental.workspace.create", "parameters": [ { "in": "query", @@ -1127,15 +1127,15 @@ } } ], - "summary": "Create worktree", - "description": "Create a new git worktree for the current project and run any configured startup scripts.", + "summary": "Create workspace", + "description": "Create a workspace for the current project.", "responses": { "200": { - "description": "Worktree created", + "description": "Workspace created", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/Worktree" + "$ref": "#/components/schemas/Workspace" } } } @@ -1155,7 +1155,35 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/WorktreeCreateInput" + "type": "object", + "properties": { + "id": { + "type": "string", + "pattern": "^wrk.*" + }, + "type": { + "type": "string" + }, + "branch": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ] + }, + "extra": { + "anyOf": [ + {}, + { + "type": "null" + } + ] + } + }, + "required": ["type", "branch", "extra"] } } } @@ -1163,12 +1191,12 @@ "x-codeSamples": [ { "lang": "js", - "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.worktree.create({\n ...\n})" + "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.experimental.workspace.create({\n ...\n})" } ] }, "get": { - "operationId": "worktree.list", + "operationId": "experimental.workspace.list", "parameters": [ { "in": "query", @@ -1185,17 +1213,17 @@ } } ], - "summary": "List worktrees", - "description": "List all sandbox worktrees for the current project.", + "summary": "List workspaces", + "description": "List all workspaces.", "responses": { "200": { - "description": "List of worktree directories", + "description": "Workspaces", "content": { "application/json": { "schema": { "type": "array", "items": { - "type": "string" + "$ref": "#/components/schemas/Workspace" } } } @@ -1205,12 +1233,14 @@ "x-codeSamples": [ { "lang": "js", - "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.worktree.list({\n ...\n})" + "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.experimental.workspace.list({\n ...\n})" } ] - }, + } + }, + "/experimental/workspace/{id}": { "delete": { - "operationId": "worktree.remove", + "operationId": "experimental.workspace.remove", "parameters": [ { "in": "query", @@ -1225,17 +1255,26 @@ "schema": { "type": "string" } + }, + { + "in": "path", + "name": "id", + "schema": { + "type": "string", + "pattern": "^wrk.*" + }, + "required": true } ], - "summary": "Remove worktree", - "description": "Remove a git worktree and delete its branch.", + "summary": "Remove workspace", + "description": "Remove an existing workspace.", "responses": { "200": { - "description": "Worktree removed", + "description": "Workspace removed", "content": { "application/json": { "schema": { - "type": "boolean" + "$ref": "#/components/schemas/Workspace" } } } @@ -1251,26 +1290,17 @@ } } }, - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/WorktreeRemoveInput" - } - } - } - }, "x-codeSamples": [ { "lang": "js", - "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.worktree.remove({\n ...\n})" + "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.experimental.workspace.remove({\n ...\n})" } ] } }, - "/experimental/workspace/{id}": { + "/experimental/worktree": { "post": { - "operationId": "experimental.workspace.create", + "operationId": "worktree.create", "parameters": [ { "in": "query", @@ -1285,26 +1315,17 @@ "schema": { "type": "string" } - }, - { - "in": "path", - "name": "id", - "schema": { - "type": "string", - "pattern": "^wrk.*" - }, - "required": true } ], - "summary": "Create workspace", - "description": "Create a workspace for the current project.", + "summary": "Create worktree", + "description": "Create a new git worktree for the current project and run any configured startup scripts.", "responses": { "200": { - "description": "Workspace created", + "description": "Worktree created", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/Workspace" + "$ref": "#/components/schemas/Worktree" } } } @@ -1324,37 +1345,7 @@ "content": { "application/json": { "schema": { - "type": "object", - "properties": { - "branch": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ] - }, - "config": { - "anyOf": [ - { - "type": "object", - "properties": { - "directory": { - "type": "string" - }, - "type": { - "type": "string", - "const": "worktree" - } - }, - "required": ["directory", "type"] - } - ] - } - }, - "required": ["branch", "config"] + "$ref": "#/components/schemas/WorktreeCreateInput" } } } @@ -1362,12 +1353,12 @@ "x-codeSamples": [ { "lang": "js", - "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.experimental.workspace.create({\n ...\n})" + "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.worktree.create({\n ...\n})" } ] }, - "delete": { - "operationId": "experimental.workspace.remove", + "get": { + "operationId": "worktree.list", "parameters": [ { "in": "query", @@ -1382,36 +1373,20 @@ "schema": { "type": "string" } - }, - { - "in": "path", - "name": "id", - "schema": { - "type": "string", - "pattern": "^wrk.*" - }, - "required": true } ], - "summary": "Remove workspace", - "description": "Remove an existing workspace.", + "summary": "List worktrees", + "description": "List all sandbox worktrees for the current project.", "responses": { "200": { - "description": "Workspace removed", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/Workspace" - } - } - } - }, - "400": { - "description": "Bad request", + "description": "List of worktree directories", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/BadRequestError" + "type": "array", + "items": { + "type": "string" + } } } } @@ -1420,14 +1395,12 @@ "x-codeSamples": [ { "lang": "js", - "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.experimental.workspace.remove({\n ...\n})" + "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.worktree.list({\n ...\n})" } ] - } - }, - "/experimental/workspace": { - "get": { - "operationId": "experimental.workspace.list", + }, + "delete": { + "operationId": "worktree.remove", "parameters": [ { "in": "query", @@ -1444,27 +1417,43 @@ } } ], - "summary": "List workspaces", - "description": "List all workspaces.", + "summary": "Remove worktree", + "description": "Remove a git worktree and delete its branch.", "responses": { "200": { - "description": "Workspaces", + "description": "Worktree removed", "content": { "application/json": { "schema": { - "type": "array", - "items": { - "$ref": "#/components/schemas/Workspace" - } + "type": "boolean" + } + } + } + }, + "400": { + "description": "Bad request", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BadRequestError" } } } } }, + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/WorktreeRemoveInput" + } + } + } + }, "x-codeSamples": [ { "lang": "js", - "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.experimental.workspace.list({\n ...\n})" + "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.worktree.remove({\n ...\n})" } ] } @@ -9280,47 +9269,6 @@ }, "required": ["type", "properties"] }, - "Event.worktree.ready": { - "type": "object", - "properties": { - "type": { - "type": "string", - "const": "worktree.ready" - }, - "properties": { - "type": "object", - "properties": { - "name": { - "type": "string" - }, - "branch": { - "type": "string" - } - }, - "required": ["name", "branch"] - } - }, - "required": ["type", "properties"] - }, - "Event.worktree.failed": { - "type": "object", - "properties": { - "type": { - "type": "string", - "const": "worktree.failed" - }, - "properties": { - "type": "object", - "properties": { - "message": { - "type": "string" - } - }, - "required": ["message"] - } - }, - "required": ["type", "properties"] - }, "Event.workspace.ready": { "type": "object", "properties": { @@ -9472,6 +9420,47 @@ }, "required": ["type", "properties"] }, + "Event.worktree.ready": { + "type": "object", + "properties": { + "type": { + "type": "string", + "const": "worktree.ready" + }, + "properties": { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "branch": { + "type": "string" + } + }, + "required": ["name", "branch"] + } + }, + "required": ["type", "properties"] + }, + "Event.worktree.failed": { + "type": "object", + "properties": { + "type": { + "type": "string", + "const": "worktree.failed" + }, + "properties": { + "type": "object", + "properties": { + "message": { + "type": "string" + } + }, + "required": ["message"] + } + }, + "required": ["type", "properties"] + }, "Event": { "anyOf": [ { @@ -9586,12 +9575,6 @@ "$ref": "#/components/schemas/Event.vcs.branch.updated" }, { - "$ref": "#/components/schemas/Event.worktree.ready" - }, - { - "$ref": "#/components/schemas/Event.worktree.failed" - }, - { "$ref": "#/components/schemas/Event.workspace.ready" }, { @@ -9608,6 +9591,12 @@ }, { "$ref": "#/components/schemas/Event.pty.deleted" + }, + { + "$ref": "#/components/schemas/Event.worktree.ready" + }, + { + "$ref": "#/components/schemas/Event.worktree.failed" } ] }, @@ -11001,6 +10990,60 @@ "$ref": "#/components/schemas/ToolListItem" } }, + "Workspace": { + "type": "object", + "properties": { + "id": { + "type": "string", + "pattern": "^wrk.*" + }, + "type": { + "type": "string" + }, + "branch": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ] + }, + "name": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ] + }, + "directory": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ] + }, + "extra": { + "anyOf": [ + {}, + { + "type": "null" + } + ] + }, + "projectID": { + "type": "string" + } + }, + "required": ["id", "type", "branch", "name", "directory", "extra", "projectID"] + }, "Worktree": { "type": "object", "properties": { @@ -11028,46 +11071,6 @@ } } }, - "Workspace": { - "type": "object", - "properties": { - "id": { - "type": "string", - "pattern": "^wrk.*" - }, - "branch": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ] - }, - "projectID": { - "type": "string" - }, - "config": { - "anyOf": [ - { - "type": "object", - "properties": { - "directory": { - "type": "string" - }, - "type": { - "type": "string", - "const": "worktree" - } - }, - "required": ["directory", "type"] - } - ] - } - }, - "required": ["id", "branch", "projectID", "config"] - }, "WorktreeRemoveInput": { "type": "object", "properties": { |
