diff --git a/packages/sdk/openapi.json b/packages/sdk/openapi.json index 6e350a71e..62296d37f 100644 --- a/packages/sdk/openapi.json +++ b/packages/sdk/openapi.json @@ -1568,6 +1568,77 @@ ] } }, + "/experimental/session/{sessionID}/background": { + "post": { + "tags": ["experimental"], + "operationId": "experimental.session.background", + "parameters": [ + { + "name": "sessionID", + "in": "path", + "schema": { + "type": "string", + "pattern": "^ses" + }, + "required": true + }, + { + "name": "directory", + "in": "query", + "schema": { + "type": "string" + }, + "required": false + }, + { + "name": "workspace", + "in": "query", + "schema": { + "type": "string" + }, + "required": false + } + ], + "responses": { + "200": { + "description": "Backgrounded subagents", + "content": { + "application/json": { + "schema": { + "type": "boolean", + "description": "Backgrounded subagents" + } + } + } + }, + "400": { + "description": "BadRequest | InvalidRequestError", + "content": { + "application/json": { + "schema": { + "anyOf": [ + { + "$ref": "#/components/schemas/effect_HttpApiError_BadRequest" + }, + { + "$ref": "#/components/schemas/InvalidRequestError" + } + ] + } + } + } + } + }, + "description": "Detach any synchronous subagents currently blocking the session and continue them in the background.", + "summary": "Background subagents", + "x-codeSamples": [ + { + "lang": "js", + "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.experimental.session.background({\n ...\n})" + } + ] + } + }, "/experimental/resource": { "get": { "tags": ["experimental"],