summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorGitHub Action <[email protected]>2026-01-08 03:30:18 +0000
committerGitHub Action <[email protected]>2026-01-08 03:30:18 +0000
commit83f3c729e9f8fd60b7f4ed967190aa7c23b9e9e3 (patch)
tree87bc6a87c5bb03ae0ddd57114dd16cdddd37f40d
parente37fd9c1056ad461577948d4e968daed1ece8398 (diff)
downloadopencode-83f3c729e9f8fd60b7f4ed967190aa7c23b9e9e3.tar.gz
opencode-83f3c729e9f8fd60b7f4ed967190aa7c23b9e9e3.zip
chore: generate
-rw-r--r--packages/sdk/js/src/v2/gen/types.gen.ts17
-rw-r--r--packages/sdk/openapi.json323
2 files changed, 332 insertions, 8 deletions
diff --git a/packages/sdk/js/src/v2/gen/types.gen.ts b/packages/sdk/js/src/v2/gen/types.gen.ts
index d42e7d176..ea86b022d 100644
--- a/packages/sdk/js/src/v2/gen/types.gen.ts
+++ b/packages/sdk/js/src/v2/gen/types.gen.ts
@@ -517,13 +517,6 @@ export type EventSessionIdle = {
}
}
-export type EventSessionCompacted = {
- type: "session.compacted"
- properties: {
- sessionID: string
- }
-}
-
export type QuestionOption = {
/**
* Display text (1-5 words, concise)
@@ -585,6 +578,13 @@ export type EventQuestionRejected = {
}
}
+export type EventSessionCompacted = {
+ type: "session.compacted"
+ properties: {
+ sessionID: string
+ }
+}
+
export type EventFileEdited = {
type: "file.edited"
properties: {
@@ -849,10 +849,10 @@ export type Event =
| EventPermissionReplied
| EventSessionStatus
| EventSessionIdle
- | EventSessionCompacted
| EventQuestionAsked
| EventQuestionReplied
| EventQuestionRejected
+ | EventSessionCompacted
| EventFileEdited
| EventTodoUpdated
| EventTuiPromptAppend
@@ -1297,6 +1297,7 @@ export type PermissionConfig =
external_directory?: PermissionRuleConfig
todowrite?: PermissionActionConfig
todoread?: PermissionActionConfig
+ question?: PermissionActionConfig
webfetch?: PermissionActionConfig
websearch?: PermissionActionConfig
codesearch?: PermissionActionConfig
diff --git a/packages/sdk/openapi.json b/packages/sdk/openapi.json
index f697f6e3f..13346a625 100644
--- a/packages/sdk/openapi.json
+++ b/packages/sdk/openapi.json
@@ -3156,6 +3156,185 @@
]
}
},
+ "/question": {
+ "get": {
+ "operationId": "question.list",
+ "parameters": [
+ {
+ "in": "query",
+ "name": "directory",
+ "schema": {
+ "type": "string"
+ }
+ }
+ ],
+ "summary": "List pending questions",
+ "description": "Get all pending question requests across all sessions.",
+ "responses": {
+ "200": {
+ "description": "List of pending questions",
+ "content": {
+ "application/json": {
+ "schema": {
+ "type": "array",
+ "items": {
+ "$ref": "#/components/schemas/QuestionRequest"
+ }
+ }
+ }
+ }
+ }
+ },
+ "x-codeSamples": [
+ {
+ "lang": "js",
+ "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.question.list({\n ...\n})"
+ }
+ ]
+ }
+ },
+ "/question/{requestID}/reply": {
+ "post": {
+ "operationId": "question.reply",
+ "parameters": [
+ {
+ "in": "query",
+ "name": "directory",
+ "schema": {
+ "type": "string"
+ }
+ },
+ {
+ "in": "path",
+ "name": "requestID",
+ "schema": {
+ "type": "string"
+ },
+ "required": true
+ }
+ ],
+ "summary": "Reply to question request",
+ "description": "Provide answers to a question request from the AI assistant.",
+ "responses": {
+ "200": {
+ "description": "Question answered successfully",
+ "content": {
+ "application/json": {
+ "schema": {
+ "type": "boolean"
+ }
+ }
+ }
+ },
+ "400": {
+ "description": "Bad request",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/BadRequestError"
+ }
+ }
+ }
+ },
+ "404": {
+ "description": "Not found",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/NotFoundError"
+ }
+ }
+ }
+ }
+ },
+ "requestBody": {
+ "content": {
+ "application/json": {
+ "schema": {
+ "type": "object",
+ "properties": {
+ "answers": {
+ "type": "array",
+ "items": {
+ "type": "string"
+ }
+ }
+ },
+ "required": ["answers"]
+ }
+ }
+ }
+ },
+ "x-codeSamples": [
+ {
+ "lang": "js",
+ "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.question.reply({\n ...\n})"
+ }
+ ]
+ }
+ },
+ "/question/{requestID}/reject": {
+ "post": {
+ "operationId": "question.reject",
+ "parameters": [
+ {
+ "in": "query",
+ "name": "directory",
+ "schema": {
+ "type": "string"
+ }
+ },
+ {
+ "in": "path",
+ "name": "requestID",
+ "schema": {
+ "type": "string"
+ },
+ "required": true
+ }
+ ],
+ "summary": "Reject question request",
+ "description": "Reject a question request from the AI assistant.",
+ "responses": {
+ "200": {
+ "description": "Question rejected successfully",
+ "content": {
+ "application/json": {
+ "schema": {
+ "type": "boolean"
+ }
+ }
+ }
+ },
+ "400": {
+ "description": "Bad request",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/BadRequestError"
+ }
+ }
+ }
+ },
+ "404": {
+ "description": "Not found",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/NotFoundError"
+ }
+ }
+ }
+ }
+ },
+ "x-codeSamples": [
+ {
+ "lang": "js",
+ "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.question.reject({\n ...\n})"
+ }
+ ]
+ }
+ },
"/command": {
"get": {
"operationId": "command.list",
@@ -6906,6 +7085,138 @@
},
"required": ["type", "properties"]
},
+ "QuestionOption": {
+ "type": "object",
+ "properties": {
+ "label": {
+ "description": "Display text (1-5 words, concise)",
+ "type": "string"
+ },
+ "description": {
+ "description": "Explanation of choice",
+ "type": "string"
+ }
+ },
+ "required": ["label", "description"]
+ },
+ "QuestionInfo": {
+ "type": "object",
+ "properties": {
+ "question": {
+ "description": "Complete question",
+ "type": "string"
+ },
+ "header": {
+ "description": "Very short label (max 12 chars)",
+ "type": "string",
+ "maxLength": 12
+ },
+ "options": {
+ "description": "Available choices",
+ "type": "array",
+ "items": {
+ "$ref": "#/components/schemas/QuestionOption"
+ }
+ }
+ },
+ "required": ["question", "header", "options"]
+ },
+ "QuestionRequest": {
+ "type": "object",
+ "properties": {
+ "id": {
+ "type": "string",
+ "pattern": "^que.*"
+ },
+ "sessionID": {
+ "type": "string",
+ "pattern": "^ses.*"
+ },
+ "questions": {
+ "description": "Questions to ask",
+ "type": "array",
+ "items": {
+ "$ref": "#/components/schemas/QuestionInfo"
+ }
+ },
+ "tool": {
+ "type": "object",
+ "properties": {
+ "messageID": {
+ "type": "string"
+ },
+ "callID": {
+ "type": "string"
+ }
+ },
+ "required": ["messageID", "callID"]
+ }
+ },
+ "required": ["id", "sessionID", "questions"]
+ },
+ "Event.question.asked": {
+ "type": "object",
+ "properties": {
+ "type": {
+ "type": "string",
+ "const": "question.asked"
+ },
+ "properties": {
+ "$ref": "#/components/schemas/QuestionRequest"
+ }
+ },
+ "required": ["type", "properties"]
+ },
+ "Event.question.replied": {
+ "type": "object",
+ "properties": {
+ "type": {
+ "type": "string",
+ "const": "question.replied"
+ },
+ "properties": {
+ "type": "object",
+ "properties": {
+ "sessionID": {
+ "type": "string"
+ },
+ "requestID": {
+ "type": "string"
+ },
+ "answers": {
+ "type": "array",
+ "items": {
+ "type": "string"
+ }
+ }
+ },
+ "required": ["sessionID", "requestID", "answers"]
+ }
+ },
+ "required": ["type", "properties"]
+ },
+ "Event.question.rejected": {
+ "type": "object",
+ "properties": {
+ "type": {
+ "type": "string",
+ "const": "question.rejected"
+ },
+ "properties": {
+ "type": "object",
+ "properties": {
+ "sessionID": {
+ "type": "string"
+ },
+ "requestID": {
+ "type": "string"
+ }
+ },
+ "required": ["sessionID", "requestID"]
+ }
+ },
+ "required": ["type", "properties"]
+ },
"Event.session.compacted": {
"type": "object",
"properties": {
@@ -7631,6 +7942,15 @@
"$ref": "#/components/schemas/Event.session.idle"
},
{
+ "$ref": "#/components/schemas/Event.question.asked"
+ },
+ {
+ "$ref": "#/components/schemas/Event.question.replied"
+ },
+ {
+ "$ref": "#/components/schemas/Event.question.rejected"
+ },
+ {
"$ref": "#/components/schemas/Event.session.compacted"
},
{
@@ -8289,6 +8609,9 @@
"todoread": {
"$ref": "#/components/schemas/PermissionActionConfig"
},
+ "question": {
+ "$ref": "#/components/schemas/PermissionActionConfig"
+ },
"webfetch": {
"$ref": "#/components/schemas/PermissionActionConfig"
},