Skip to content

Commit 6da066d

Browse files
chore: sync upstream openapi spec (v0.1.87)
1 parent 680b7ca commit 6da066d

6 files changed

Lines changed: 115 additions & 7 deletions

File tree

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ Add `opencode_sdk` to your dependencies in `mix.exs`:
1212
```elixir
1313
def deps do
1414
[
15-
{:opencode_sdk, "~> 0.1.86"}
15+
{:opencode_sdk, "~> 0.1.87"}
1616
]
1717
end
1818
```

lib/opencode/generated/experimental.ex

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,38 @@ defmodule OpenCode.Generated.Experimental do
55

66
@default_client OpenCode.Client
77

8+
@doc """
9+
Get experimental capabilities
10+
11+
Get experimental features enabled on the OpenCode server.
12+
13+
## Options
14+
15+
* `directory`
16+
* `workspace`
17+
18+
"""
19+
@spec experimental_capabilities_get(opts :: keyword) ::
20+
{:ok, OpenCode.Generated.ExperimentalCapabilities.t()}
21+
| {:error, OpenCode.Generated.BadRequestError.t()}
22+
def experimental_capabilities_get(opts \\ []) do
23+
client = opts[:client] || @default_client
24+
query = Keyword.take(opts, [:directory, :workspace])
25+
26+
client.request(%{
27+
args: [],
28+
call: {OpenCode.Generated.Experimental, :experimental_capabilities_get},
29+
url: "/experimental/capabilities",
30+
method: :get,
31+
query: query,
32+
response: [
33+
{200, {OpenCode.Generated.ExperimentalCapabilities, :t}},
34+
{400, {OpenCode.Generated.BadRequestError, :t}}
35+
],
36+
opts: opts
37+
})
38+
end
39+
840
@doc """
941
Get active Console provider metadata
1042
Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
defmodule OpenCode.Generated.ExperimentalCapabilities do
2+
@moduledoc """
3+
Provides struct and type for a ExperimentalCapabilities
4+
"""
5+
6+
@type t :: %__MODULE__{background_subagents: boolean}
7+
8+
defstruct [:background_subagents]
9+
10+
@doc false
11+
@spec __fields__(atom) :: keyword
12+
def __fields__(type \\ :t)
13+
14+
def __fields__(:t) do
15+
[background_subagents: :boolean]
16+
end
17+
end

lib/opencode/generated/integrations.ex

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -82,11 +82,6 @@ defmodule OpenCode.Generated.Integrations do
8282
location: OpenCode.Generated.LocationInfo.t()
8383
}
8484

85-
@type v2_integration_attempt_status_200_json_resp_data_time :: %{
86-
created: number | String.t(),
87-
expires: number | String.t()
88-
}
89-
9085
@type v2_integration_attempt_status_200_json_resp_data :: %{
9186
message: String.t(),
9287
status: String.t(),

mix.exs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
defmodule OpenCode.MixProject do
22
use Mix.Project
33

4-
@version "0.1.86"
4+
@version "0.1.87"
55
@source_url "https://github.com/UtkarshUsername/opencode-sdk-elixir"
66

77
def project do

priv/opencode_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": {

0 commit comments

Comments
 (0)