The open source coding agent.
TypeScript
chore: generate
GitHub Action83f3c729e9f8
diff --git a/packages/sdk/js/src/v2/gen/types.gen.ts b/packages/sdk/js/src/v2/gen/types.gen.tsindex d42e7d176a2..ea86b022daf 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?: PermissionRuleConfigtodowrite?: PermissionActionConfigtodoread?: PermissionActionConfig+ question?: PermissionActionConfigwebfetch?: PermissionActionConfigwebsearch?: PermissionActionConfigcodesearch?: PermissionActionConfigdiff --git a/packages/sdk/openapi.json b/packages/sdk/openapi.jsonindex f697f6e3f3e..13346a625d9 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": {@@ -7630,6 +7941,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"},