Skip to content
This repository was archived by the owner on Apr 1, 2026. It is now read-only.

Commit 83f3c72

Browse files
committed
chore: generate
1 parent e37fd9c commit 83f3c72

2 files changed

Lines changed: 332 additions & 8 deletions

File tree

packages/sdk/js/src/v2/gen/types.gen.ts

Lines changed: 9 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -517,13 +517,6 @@ export type EventSessionIdle = {
517517
}
518518
}
519519

520-
export type EventSessionCompacted = {
521-
type: "session.compacted"
522-
properties: {
523-
sessionID: string
524-
}
525-
}
526-
527520
export type QuestionOption = {
528521
/**
529522
* Display text (1-5 words, concise)
@@ -585,6 +578,13 @@ export type EventQuestionRejected = {
585578
}
586579
}
587580

581+
export type EventSessionCompacted = {
582+
type: "session.compacted"
583+
properties: {
584+
sessionID: string
585+
}
586+
}
587+
588588
export type EventFileEdited = {
589589
type: "file.edited"
590590
properties: {
@@ -849,10 +849,10 @@ export type Event =
849849
| EventPermissionReplied
850850
| EventSessionStatus
851851
| EventSessionIdle
852-
| EventSessionCompacted
853852
| EventQuestionAsked
854853
| EventQuestionReplied
855854
| EventQuestionRejected
855+
| EventSessionCompacted
856856
| EventFileEdited
857857
| EventTodoUpdated
858858
| EventTuiPromptAppend
@@ -1297,6 +1297,7 @@ export type PermissionConfig =
12971297
external_directory?: PermissionRuleConfig
12981298
todowrite?: PermissionActionConfig
12991299
todoread?: PermissionActionConfig
1300+
question?: PermissionActionConfig
13001301
webfetch?: PermissionActionConfig
13011302
websearch?: PermissionActionConfig
13021303
codesearch?: PermissionActionConfig

packages/sdk/openapi.json

Lines changed: 323 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3156,6 +3156,185 @@
31563156
]
31573157
}
31583158
},
3159+
"/question": {
3160+
"get": {
3161+
"operationId": "question.list",
3162+
"parameters": [
3163+
{
3164+
"in": "query",
3165+
"name": "directory",
3166+
"schema": {
3167+
"type": "string"
3168+
}
3169+
}
3170+
],
3171+
"summary": "List pending questions",
3172+
"description": "Get all pending question requests across all sessions.",
3173+
"responses": {
3174+
"200": {
3175+
"description": "List of pending questions",
3176+
"content": {
3177+
"application/json": {
3178+
"schema": {
3179+
"type": "array",
3180+
"items": {
3181+
"$ref": "#/components/schemas/QuestionRequest"
3182+
}
3183+
}
3184+
}
3185+
}
3186+
}
3187+
},
3188+
"x-codeSamples": [
3189+
{
3190+
"lang": "js",
3191+
"source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.question.list({\n ...\n})"
3192+
}
3193+
]
3194+
}
3195+
},
3196+
"/question/{requestID}/reply": {
3197+
"post": {
3198+
"operationId": "question.reply",
3199+
"parameters": [
3200+
{
3201+
"in": "query",
3202+
"name": "directory",
3203+
"schema": {
3204+
"type": "string"
3205+
}
3206+
},
3207+
{
3208+
"in": "path",
3209+
"name": "requestID",
3210+
"schema": {
3211+
"type": "string"
3212+
},
3213+
"required": true
3214+
}
3215+
],
3216+
"summary": "Reply to question request",
3217+
"description": "Provide answers to a question request from the AI assistant.",
3218+
"responses": {
3219+
"200": {
3220+
"description": "Question answered successfully",
3221+
"content": {
3222+
"application/json": {
3223+
"schema": {
3224+
"type": "boolean"
3225+
}
3226+
}
3227+
}
3228+
},
3229+
"400": {
3230+
"description": "Bad request",
3231+
"content": {
3232+
"application/json": {
3233+
"schema": {
3234+
"$ref": "#/components/schemas/BadRequestError"
3235+
}
3236+
}
3237+
}
3238+
},
3239+
"404": {
3240+
"description": "Not found",
3241+
"content": {
3242+
"application/json": {
3243+
"schema": {
3244+
"$ref": "#/components/schemas/NotFoundError"
3245+
}
3246+
}
3247+
}
3248+
}
3249+
},
3250+
"requestBody": {
3251+
"content": {
3252+
"application/json": {
3253+
"schema": {
3254+
"type": "object",
3255+
"properties": {
3256+
"answers": {
3257+
"type": "array",
3258+
"items": {
3259+
"type": "string"
3260+
}
3261+
}
3262+
},
3263+
"required": ["answers"]
3264+
}
3265+
}
3266+
}
3267+
},
3268+
"x-codeSamples": [
3269+
{
3270+
"lang": "js",
3271+
"source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.question.reply({\n ...\n})"
3272+
}
3273+
]
3274+
}
3275+
},
3276+
"/question/{requestID}/reject": {
3277+
"post": {
3278+
"operationId": "question.reject",
3279+
"parameters": [
3280+
{
3281+
"in": "query",
3282+
"name": "directory",
3283+
"schema": {
3284+
"type": "string"
3285+
}
3286+
},
3287+
{
3288+
"in": "path",
3289+
"name": "requestID",
3290+
"schema": {
3291+
"type": "string"
3292+
},
3293+
"required": true
3294+
}
3295+
],
3296+
"summary": "Reject question request",
3297+
"description": "Reject a question request from the AI assistant.",
3298+
"responses": {
3299+
"200": {
3300+
"description": "Question rejected successfully",
3301+
"content": {
3302+
"application/json": {
3303+
"schema": {
3304+
"type": "boolean"
3305+
}
3306+
}
3307+
}
3308+
},
3309+
"400": {
3310+
"description": "Bad request",
3311+
"content": {
3312+
"application/json": {
3313+
"schema": {
3314+
"$ref": "#/components/schemas/BadRequestError"
3315+
}
3316+
}
3317+
}
3318+
},
3319+
"404": {
3320+
"description": "Not found",
3321+
"content": {
3322+
"application/json": {
3323+
"schema": {
3324+
"$ref": "#/components/schemas/NotFoundError"
3325+
}
3326+
}
3327+
}
3328+
}
3329+
},
3330+
"x-codeSamples": [
3331+
{
3332+
"lang": "js",
3333+
"source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.question.reject({\n ...\n})"
3334+
}
3335+
]
3336+
}
3337+
},
31593338
"/command": {
31603339
"get": {
31613340
"operationId": "command.list",
@@ -6906,6 +7085,138 @@
69067085
},
69077086
"required": ["type", "properties"]
69087087
},
7088+
"QuestionOption": {
7089+
"type": "object",
7090+
"properties": {
7091+
"label": {
7092+
"description": "Display text (1-5 words, concise)",
7093+
"type": "string"
7094+
},
7095+
"description": {
7096+
"description": "Explanation of choice",
7097+
"type": "string"
7098+
}
7099+
},
7100+
"required": ["label", "description"]
7101+
},
7102+
"QuestionInfo": {
7103+
"type": "object",
7104+
"properties": {
7105+
"question": {
7106+
"description": "Complete question",
7107+
"type": "string"
7108+
},
7109+
"header": {
7110+
"description": "Very short label (max 12 chars)",
7111+
"type": "string",
7112+
"maxLength": 12
7113+
},
7114+
"options": {
7115+
"description": "Available choices",
7116+
"type": "array",
7117+
"items": {
7118+
"$ref": "#/components/schemas/QuestionOption"
7119+
}
7120+
}
7121+
},
7122+
"required": ["question", "header", "options"]
7123+
},
7124+
"QuestionRequest": {
7125+
"type": "object",
7126+
"properties": {
7127+
"id": {
7128+
"type": "string",
7129+
"pattern": "^que.*"
7130+
},
7131+
"sessionID": {
7132+
"type": "string",
7133+
"pattern": "^ses.*"
7134+
},
7135+
"questions": {
7136+
"description": "Questions to ask",
7137+
"type": "array",
7138+
"items": {
7139+
"$ref": "#/components/schemas/QuestionInfo"
7140+
}
7141+
},
7142+
"tool": {
7143+
"type": "object",
7144+
"properties": {
7145+
"messageID": {
7146+
"type": "string"
7147+
},
7148+
"callID": {
7149+
"type": "string"
7150+
}
7151+
},
7152+
"required": ["messageID", "callID"]
7153+
}
7154+
},
7155+
"required": ["id", "sessionID", "questions"]
7156+
},
7157+
"Event.question.asked": {
7158+
"type": "object",
7159+
"properties": {
7160+
"type": {
7161+
"type": "string",
7162+
"const": "question.asked"
7163+
},
7164+
"properties": {
7165+
"$ref": "#/components/schemas/QuestionRequest"
7166+
}
7167+
},
7168+
"required": ["type", "properties"]
7169+
},
7170+
"Event.question.replied": {
7171+
"type": "object",
7172+
"properties": {
7173+
"type": {
7174+
"type": "string",
7175+
"const": "question.replied"
7176+
},
7177+
"properties": {
7178+
"type": "object",
7179+
"properties": {
7180+
"sessionID": {
7181+
"type": "string"
7182+
},
7183+
"requestID": {
7184+
"type": "string"
7185+
},
7186+
"answers": {
7187+
"type": "array",
7188+
"items": {
7189+
"type": "string"
7190+
}
7191+
}
7192+
},
7193+
"required": ["sessionID", "requestID", "answers"]
7194+
}
7195+
},
7196+
"required": ["type", "properties"]
7197+
},
7198+
"Event.question.rejected": {
7199+
"type": "object",
7200+
"properties": {
7201+
"type": {
7202+
"type": "string",
7203+
"const": "question.rejected"
7204+
},
7205+
"properties": {
7206+
"type": "object",
7207+
"properties": {
7208+
"sessionID": {
7209+
"type": "string"
7210+
},
7211+
"requestID": {
7212+
"type": "string"
7213+
}
7214+
},
7215+
"required": ["sessionID", "requestID"]
7216+
}
7217+
},
7218+
"required": ["type", "properties"]
7219+
},
69097220
"Event.session.compacted": {
69107221
"type": "object",
69117222
"properties": {
@@ -7630,6 +7941,15 @@
76307941
{
76317942
"$ref": "#/components/schemas/Event.session.idle"
76327943
},
7944+
{
7945+
"$ref": "#/components/schemas/Event.question.asked"
7946+
},
7947+
{
7948+
"$ref": "#/components/schemas/Event.question.replied"
7949+
},
7950+
{
7951+
"$ref": "#/components/schemas/Event.question.rejected"
7952+
},
76337953
{
76347954
"$ref": "#/components/schemas/Event.session.compacted"
76357955
},
@@ -8289,6 +8609,9 @@
82898609
"todoread": {
82908610
"$ref": "#/components/schemas/PermissionActionConfig"
82918611
},
8612+
"question": {
8613+
"$ref": "#/components/schemas/PermissionActionConfig"
8614+
},
82928615
"webfetch": {
82938616
"$ref": "#/components/schemas/PermissionActionConfig"
82948617
},

0 commit comments

Comments
 (0)