Skip to content

Commit 355a0bc

Browse files
chore: generate
1 parent 2892e97 commit 355a0bc

3 files changed

Lines changed: 69 additions & 11 deletions

File tree

packages/opencode/test/server/httpapi-exercise/index.ts

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -578,12 +578,10 @@ const scenarios: Scenario[] = [
578578
.get("/experimental/session", "experimental.session.list")
579579
.at((ctx) => ({ path: "/experimental/session?roots=false&archived=false", headers: ctx.headers() }))
580580
.json(200, array),
581-
http.protected
582-
.get("/experimental/capabilities", "experimental.capabilities.get")
583-
.json(200, (body) => {
584-
check(typeof body === "object" && body !== null, "capabilities should be an object")
585-
check("backgroundSubagents" in body, "capabilities should report background subagents")
586-
}),
581+
http.protected.get("/experimental/capabilities", "experimental.capabilities.get").json(200, (body) => {
582+
check(typeof body === "object" && body !== null, "capabilities should be an object")
583+
check("backgroundSubagents" in body, "capabilities should report background subagents")
584+
}),
587585
http.protected
588586
.post("/experimental/session/{sessionID}/background", "experimental.session.background")
589587
.mutating()

packages/sdk/openapi.json

Lines changed: 64 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -810,6 +810,60 @@
810810
]
811811
}
812812
},
813+
"/experimental/capabilities": {
814+
"get": {
815+
"tags": ["experimental"],
816+
"operationId": "experimental.capabilities.get",
817+
"parameters": [
818+
{
819+
"name": "directory",
820+
"in": "query",
821+
"schema": {
822+
"type": "string"
823+
},
824+
"required": false
825+
},
826+
{
827+
"name": "workspace",
828+
"in": "query",
829+
"schema": {
830+
"type": "string"
831+
},
832+
"required": false
833+
}
834+
],
835+
"responses": {
836+
"200": {
837+
"description": "Experimental capabilities",
838+
"content": {
839+
"application/json": {
840+
"schema": {
841+
"$ref": "#/components/schemas/ExperimentalCapabilities"
842+
}
843+
}
844+
}
845+
},
846+
"400": {
847+
"description": "Bad request",
848+
"content": {
849+
"application/json": {
850+
"schema": {
851+
"$ref": "#/components/schemas/BadRequestError"
852+
}
853+
}
854+
}
855+
}
856+
},
857+
"description": "Get experimental features enabled on the OpenCode server.",
858+
"summary": "Get experimental capabilities",
859+
"x-codeSamples": [
860+
{
861+
"lang": "js",
862+
"source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.experimental.capabilities.get({\n ...\n})"
863+
}
864+
]
865+
}
866+
},
813867
"/experimental/console": {
814868
"get": {
815869
"tags": ["experimental"],
@@ -21024,6 +21078,16 @@
2102421078
"required": ["id", "name", "source", "env", "options", "models"],
2102521079
"additionalProperties": false
2102621080
},
21081+
"ExperimentalCapabilities": {
21082+
"type": "object",
21083+
"properties": {
21084+
"backgroundSubagents": {
21085+
"type": "boolean"
21086+
}
21087+
},
21088+
"required": ["backgroundSubagents"],
21089+
"additionalProperties": false
21090+
},
2102721091
"ConsoleState": {
2102821092
"type": "object",
2102921093
"properties": {

packages/tui/src/context/sync.tsx

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -489,11 +489,7 @@ export const {
489489
setStore("provider", reconcile(providers.providers))
490490
setStore("provider_default", reconcile(providers.default))
491491
setStore("provider_next", reconcile(providerList))
492-
setStore(
493-
"capabilities",
494-
"experimentalBackgroundSubagents",
495-
capabilities?.backgroundSubagents === true,
496-
)
492+
setStore("capabilities", "experimentalBackgroundSubagents", capabilities?.backgroundSubagents === true)
497493
setStore("console_state", reconcile(consoleState))
498494
setStore("agent", reconcile(agents))
499495
setStore("config", reconcile(config))

0 commit comments

Comments
 (0)