summaryrefslogtreecommitdiffhomepage
path: root/packages/sdk
diff options
context:
space:
mode:
authoropencode-agent[bot] <opencode-agent[bot]@users.noreply.github.com>2026-04-14 19:45:10 +0000
committeropencode-agent[bot] <opencode-agent[bot]@users.noreply.github.com>2026-04-14 19:45:10 +0000
commit85674f4bfd15723c6c8afd96d74120ded9b8437b (patch)
tree2b0483419b34c978024a031ce4f476df368ea979 /packages/sdk
parentf2525a63c92dd46beeefc8741afcb98153abc776 (diff)
downloadopencode-85674f4bfd15723c6c8afd96d74120ded9b8437b.tar.gz
opencode-85674f4bfd15723c6c8afd96d74120ded9b8437b.zip
chore: generate
Diffstat (limited to 'packages/sdk')
-rw-r--r--packages/sdk/js/src/v2/gen/sdk.gen.ts6
-rw-r--r--packages/sdk/js/src/v2/gen/types.gen.ts46
-rw-r--r--packages/sdk/openapi.json117
3 files changed, 91 insertions, 78 deletions
diff --git a/packages/sdk/js/src/v2/gen/sdk.gen.ts b/packages/sdk/js/src/v2/gen/sdk.gen.ts
index b5fc976bb..cbd8b59f2 100644
--- a/packages/sdk/js/src/v2/gen/sdk.gen.ts
+++ b/packages/sdk/js/src/v2/gen/sdk.gen.ts
@@ -105,10 +105,10 @@ import type {
PtyRemoveResponses,
PtyUpdateErrors,
PtyUpdateResponses,
- QuestionAnswer,
QuestionListResponses,
QuestionRejectErrors,
QuestionRejectResponses,
+ QuestionReply,
QuestionReplyErrors,
QuestionReplyResponses,
SessionAbortErrors,
@@ -2738,7 +2738,7 @@ export class Question extends HeyApiClient {
requestID: string
directory?: string
workspace?: string
- answers?: Array<QuestionAnswer>
+ questionReply?: QuestionReply
},
options?: Options<never, ThrowOnError>,
) {
@@ -2750,7 +2750,7 @@ export class Question extends HeyApiClient {
{ in: "path", key: "requestID" },
{ in: "query", key: "directory" },
{ in: "query", key: "workspace" },
- { in: "body", key: "answers" },
+ { key: "questionReply", map: "body" },
],
},
],
diff --git a/packages/sdk/js/src/v2/gen/types.gen.ts b/packages/sdk/js/src/v2/gen/types.gen.ts
index e2a9a88ad..141c93c52 100644
--- a/packages/sdk/js/src/v2/gen/types.gen.ts
+++ b/packages/sdk/js/src/v2/gen/types.gen.ts
@@ -264,6 +264,11 @@ export type QuestionInfo = {
custom?: boolean
}
+export type QuestionTool = {
+ messageID: string
+ callID: string
+}
+
export type QuestionRequest = {
id: string
sessionID: string
@@ -271,10 +276,7 @@ export type QuestionRequest = {
* Questions to ask
*/
questions: Array<QuestionInfo>
- tool?: {
- messageID: string
- callID: string
- }
+ tool?: QuestionTool
}
export type EventQuestionAsked = {
@@ -284,21 +286,25 @@ export type EventQuestionAsked = {
export type QuestionAnswer = Array<string>
+export type QuestionReplied = {
+ sessionID: string
+ requestID: string
+ answers: Array<QuestionAnswer>
+}
+
export type EventQuestionReplied = {
type: "question.replied"
- properties: {
- sessionID: string
- requestID: string
- answers: Array<QuestionAnswer>
- }
+ properties: QuestionReplied
+}
+
+export type QuestionRejected = {
+ sessionID: string
+ requestID: string
}
export type EventQuestionRejected = {
type: "question.rejected"
- properties: {
- sessionID: string
- requestID: string
- }
+ properties: QuestionRejected
}
export type Todo = {
@@ -1919,6 +1925,13 @@ export type SubtaskPartInput = {
command?: string
}
+export type QuestionReply = {
+ /**
+ * User answers in order of questions (each answer is an array of selected labels)
+ */
+ answers: Array<QuestionAnswer>
+}
+
export type ProviderAuthMethod = {
type: "oauth" | "api"
label: string
@@ -4246,12 +4259,7 @@ export type QuestionListResponses = {
export type QuestionListResponse = QuestionListResponses[keyof QuestionListResponses]
export type QuestionReplyData = {
- body?: {
- /**
- * User answers in order of questions (each answer is an array of selected labels)
- */
- answers: Array<QuestionAnswer>
- }
+ body?: QuestionReply
path: {
requestID: string
}
diff --git a/packages/sdk/openapi.json b/packages/sdk/openapi.json
index 54f11eccf..e0233b152 100644
--- a/packages/sdk/openapi.json
+++ b/packages/sdk/openapi.json
@@ -4769,17 +4769,7 @@
"content": {
"application/json": {
"schema": {
- "type": "object",
- "properties": {
- "answers": {
- "description": "User answers in order of questions (each answer is an array of selected labels)",
- "type": "array",
- "items": {
- "$ref": "#/components/schemas/QuestionAnswer"
- }
- }
- },
- "required": ["answers"]
+ "$ref": "#/components/schemas/QuestionReply"
}
}
}
@@ -7859,16 +7849,26 @@
},
"required": ["question", "header", "options"]
},
+ "QuestionTool": {
+ "type": "object",
+ "properties": {
+ "messageID": {
+ "type": "string"
+ },
+ "callID": {
+ "type": "string"
+ }
+ },
+ "required": ["messageID", "callID"]
+ },
"QuestionRequest": {
"type": "object",
"properties": {
"id": {
- "type": "string",
- "pattern": "^que.*"
+ "type": "string"
},
"sessionID": {
- "type": "string",
- "pattern": "^ses.*"
+ "type": "string"
},
"questions": {
"description": "Questions to ask",
@@ -7878,17 +7878,7 @@
}
},
"tool": {
- "type": "object",
- "properties": {
- "messageID": {
- "type": "string",
- "pattern": "^msg.*"
- },
- "callID": {
- "type": "string"
- }
- },
- "required": ["messageID", "callID"]
+ "$ref": "#/components/schemas/QuestionTool"
}
},
"required": ["id", "sessionID", "questions"]
@@ -7912,6 +7902,24 @@
"type": "string"
}
},
+ "QuestionReplied": {
+ "type": "object",
+ "properties": {
+ "sessionID": {
+ "type": "string"
+ },
+ "requestID": {
+ "type": "string"
+ },
+ "answers": {
+ "type": "array",
+ "items": {
+ "$ref": "#/components/schemas/QuestionAnswer"
+ }
+ }
+ },
+ "required": ["sessionID", "requestID", "answers"]
+ },
"Event.question.replied": {
"type": "object",
"properties": {
@@ -7920,28 +7928,23 @@
"const": "question.replied"
},
"properties": {
- "type": "object",
- "properties": {
- "sessionID": {
- "type": "string",
- "pattern": "^ses.*"
- },
- "requestID": {
- "type": "string",
- "pattern": "^que.*"
- },
- "answers": {
- "type": "array",
- "items": {
- "$ref": "#/components/schemas/QuestionAnswer"
- }
- }
- },
- "required": ["sessionID", "requestID", "answers"]
+ "$ref": "#/components/schemas/QuestionReplied"
}
},
"required": ["type", "properties"]
},
+ "QuestionRejected": {
+ "type": "object",
+ "properties": {
+ "sessionID": {
+ "type": "string"
+ },
+ "requestID": {
+ "type": "string"
+ }
+ },
+ "required": ["sessionID", "requestID"]
+ },
"Event.question.rejected": {
"type": "object",
"properties": {
@@ -7950,18 +7953,7 @@
"const": "question.rejected"
},
"properties": {
- "type": "object",
- "properties": {
- "sessionID": {
- "type": "string",
- "pattern": "^ses.*"
- },
- "requestID": {
- "type": "string",
- "pattern": "^que.*"
- }
- },
- "required": ["sessionID", "requestID"]
+ "$ref": "#/components/schemas/QuestionRejected"
}
},
"required": ["type", "properties"]
@@ -12369,6 +12361,19 @@
},
"required": ["type", "prompt", "description", "agent"]
},
+ "QuestionReply": {
+ "type": "object",
+ "properties": {
+ "answers": {
+ "description": "User answers in order of questions (each answer is an array of selected labels)",
+ "type": "array",
+ "items": {
+ "$ref": "#/components/schemas/QuestionAnswer"
+ }
+ }
+ },
+ "required": ["answers"]
+ },
"ProviderAuthMethod": {
"type": "object",
"properties": {