|
3156 | 3156 | ] |
3157 | 3157 | } |
3158 | 3158 | }, |
| 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 | + }, |
3159 | 3338 | "/command": { |
3160 | 3339 | "get": { |
3161 | 3340 | "operationId": "command.list", |
|
6906 | 7085 | }, |
6907 | 7086 | "required": ["type", "properties"] |
6908 | 7087 | }, |
| 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 | + }, |
6909 | 7220 | "Event.session.compacted": { |
6910 | 7221 | "type": "object", |
6911 | 7222 | "properties": { |
|
7630 | 7941 | { |
7631 | 7942 | "$ref": "#/components/schemas/Event.session.idle" |
7632 | 7943 | }, |
| 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 | + }, |
7633 | 7953 | { |
7634 | 7954 | "$ref": "#/components/schemas/Event.session.compacted" |
7635 | 7955 | }, |
|
8289 | 8609 | "todoread": { |
8290 | 8610 | "$ref": "#/components/schemas/PermissionActionConfig" |
8291 | 8611 | }, |
| 8612 | + "question": { |
| 8613 | + "$ref": "#/components/schemas/PermissionActionConfig" |
| 8614 | + }, |
8292 | 8615 | "webfetch": { |
8293 | 8616 | "$ref": "#/components/schemas/PermissionActionConfig" |
8294 | 8617 | }, |
|
0 commit comments