diff options
| author | opencode-agent[bot] <opencode-agent[bot]@users.noreply.github.com> | 2026-02-27 20:37:28 +0000 |
|---|---|---|
| committer | opencode-agent[bot] <opencode-agent[bot]@users.noreply.github.com> | 2026-02-27 20:37:28 +0000 |
| commit | 7ff2710ce3e9b86bf12575aac68969589525b719 (patch) | |
| tree | e5aa62940acfb85c3f4d1862d4dba06663577973 /packages/sdk/openapi.json | |
| parent | c12ce2ffff38fae11e22762292c56f1e71c387e7 (diff) | |
| download | opencode-7ff2710ce3e9b86bf12575aac68969589525b719.tar.gz opencode-7ff2710ce3e9b86bf12575aac68969589525b719.zip | |
chore: generate
Diffstat (limited to 'packages/sdk/openapi.json')
| -rw-r--r-- | packages/sdk/openapi.json | 358 |
1 files changed, 311 insertions, 47 deletions
diff --git a/packages/sdk/openapi.json b/packages/sdk/openapi.json index 0f9c6f020..8632baf2d 100644 --- a/packages/sdk/openapi.json +++ b/packages/sdk/openapi.json @@ -1149,6 +1149,186 @@ ] } }, + "/experimental/workspace/{id}": { + "post": { + "operationId": "experimental.workspace.create", + "parameters": [ + { + "in": "query", + "name": "directory", + "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.", + "responses": { + "200": { + "description": "Workspace created", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Workspace" + } + } + } + }, + "400": { + "description": "Bad request", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BadRequestError" + } + } + } + } + }, + "requestBody": { + "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"] + } + } + } + }, + "x-codeSamples": [ + { + "lang": "js", + "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.experimental.workspace.create({\n ...\n})" + } + ] + }, + "delete": { + "operationId": "experimental.workspace.remove", + "parameters": [ + { + "in": "query", + "name": "directory", + "schema": { + "type": "string" + } + }, + { + "in": "path", + "name": "id", + "schema": { + "type": "string", + "pattern": "^wrk.*" + }, + "required": true + } + ], + "summary": "Remove workspace", + "description": "Remove an existing workspace.", + "responses": { + "200": { + "description": "Workspace removed", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Workspace" + } + } + } + }, + "400": { + "description": "Bad request", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BadRequestError" + } + } + } + } + }, + "x-codeSamples": [ + { + "lang": "js", + "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.experimental.workspace.remove({\n ...\n})" + } + ] + } + }, + "/experimental/workspace": { + "get": { + "operationId": "experimental.workspace.list", + "parameters": [ + { + "in": "query", + "name": "directory", + "schema": { + "type": "string" + } + } + ], + "summary": "List workspaces", + "description": "List all workspaces.", + "responses": { + "200": { + "description": "Workspaces", + "content": { + "application/json": { + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Workspace" + } + } + } + } + } + }, + "x-codeSamples": [ + { + "lang": "js", + "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.experimental.workspace.list({\n ...\n})" + } + ] + } + }, "/experimental/worktree/reset": { "post": { "operationId": "worktree.reset", @@ -8422,6 +8602,85 @@ }, "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": { + "type": { + "type": "string", + "const": "workspace.ready" + }, + "properties": { + "type": "object", + "properties": { + "name": { + "type": "string" + } + }, + "required": ["name"] + } + }, + "required": ["type", "properties"] + }, + "Event.workspace.failed": { + "type": "object", + "properties": { + "type": { + "type": "string", + "const": "workspace.failed" + }, + "properties": { + "type": "object", + "properties": { + "message": { + "type": "string" + } + }, + "required": ["message"] + } + }, + "required": ["type", "properties"] + }, "Pty": { "type": "object", "properties": { @@ -8535,47 +8794,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": { "anyOf": [ { @@ -8690,22 +8908,28 @@ "$ref": "#/components/schemas/Event.vcs.branch.updated" }, { - "$ref": "#/components/schemas/Event.pty.created" + "$ref": "#/components/schemas/Event.worktree.ready" }, { - "$ref": "#/components/schemas/Event.pty.updated" + "$ref": "#/components/schemas/Event.worktree.failed" }, { - "$ref": "#/components/schemas/Event.pty.exited" + "$ref": "#/components/schemas/Event.workspace.ready" }, { - "$ref": "#/components/schemas/Event.pty.deleted" + "$ref": "#/components/schemas/Event.workspace.failed" }, { - "$ref": "#/components/schemas/Event.worktree.ready" + "$ref": "#/components/schemas/Event.pty.created" }, { - "$ref": "#/components/schemas/Event.worktree.failed" + "$ref": "#/components/schemas/Event.pty.updated" + }, + { + "$ref": "#/components/schemas/Event.pty.exited" + }, + { + "$ref": "#/components/schemas/Event.pty.deleted" } ] }, @@ -10126,6 +10350,46 @@ } } }, + "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": { |
