@leaflow/sdk 0.0.0-dev.19.ga71ef8f → 0.0.0-dev.190.gdc509eb

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (63) hide show
  1. package/README.md +13 -1
  2. package/dist/account/v1/client.d.ts +4 -0
  3. package/dist/account/v1/client.js +7 -0
  4. package/dist/account/v1/index.d.ts +33 -22
  5. package/dist/account/v1/index.js +4 -4
  6. package/dist/account/v1/schema.d.ts +307 -89
  7. package/dist/assistant/v1/client.d.ts +4 -0
  8. package/dist/assistant/v1/client.js +7 -0
  9. package/dist/assistant/v1/index.d.ts +69 -40
  10. package/dist/assistant/v1/index.js +4 -4
  11. package/dist/assistant/v1/schema.d.ts +1089 -133
  12. package/dist/billing/v1/client.d.ts +6 -0
  13. package/dist/billing/v1/client.js +6 -0
  14. package/dist/billing/v1/index.d.ts +205 -0
  15. package/dist/billing/v1/index.js +5 -0
  16. package/dist/billing/v1/schema.d.ts +4969 -0
  17. package/dist/billing/v1/schema.js +5 -0
  18. package/dist/canopy/v1/client.d.ts +4 -0
  19. package/dist/canopy/v1/client.js +7 -0
  20. package/dist/canopy/v1/index.d.ts +24 -23
  21. package/dist/canopy/v1/index.js +4 -4
  22. package/dist/canopy/v1/schema.d.ts +113 -109
  23. package/dist/compute/v1/client.d.ts +4 -0
  24. package/dist/compute/v1/client.js +7 -0
  25. package/dist/compute/v1/index.d.ts +172 -125
  26. package/dist/compute/v1/index.js +4 -4
  27. package/dist/compute/v1/schema.d.ts +1581 -476
  28. package/dist/dns/v1/client.d.ts +4 -0
  29. package/dist/dns/v1/client.js +7 -0
  30. package/dist/dns/v1/index.d.ts +43 -0
  31. package/dist/dns/v1/index.js +5 -0
  32. package/dist/dns/v1/schema.d.ts +887 -0
  33. package/dist/dns/v1/schema.js +5 -0
  34. package/dist/iam/v1/client.d.ts +4 -0
  35. package/dist/iam/v1/client.js +7 -0
  36. package/dist/iam/v1/index.d.ts +55 -32
  37. package/dist/iam/v1/index.js +4 -4
  38. package/dist/iam/v1/schema.d.ts +521 -88
  39. package/dist/index.d.ts +11 -7
  40. package/dist/index.js +19 -5
  41. package/dist/monitoring/v1/client.d.ts +4 -0
  42. package/dist/monitoring/v1/client.js +7 -0
  43. package/dist/monitoring/v1/index.d.ts +130 -49
  44. package/dist/monitoring/v1/index.js +4 -4
  45. package/dist/monitoring/v1/schema.d.ts +2420 -527
  46. package/dist/notification/v1/client.d.ts +4 -0
  47. package/dist/notification/v1/client.js +7 -0
  48. package/dist/notification/v1/index.d.ts +77 -0
  49. package/dist/notification/v1/index.js +5 -0
  50. package/dist/notification/v1/schema.d.ts +2048 -0
  51. package/dist/notification/v1/schema.js +5 -0
  52. package/dist/support/v1/client.d.ts +4 -0
  53. package/dist/support/v1/client.js +7 -0
  54. package/dist/support/v1/index.d.ts +51 -0
  55. package/dist/support/v1/index.js +5 -0
  56. package/dist/support/v1/schema.d.ts +1082 -0
  57. package/dist/support/v1/schema.js +5 -0
  58. package/dist/tunnel/v1/client.d.ts +4 -0
  59. package/dist/tunnel/v1/client.js +7 -0
  60. package/dist/tunnel/v1/index.d.ts +8 -7
  61. package/dist/tunnel/v1/index.js +4 -4
  62. package/dist/tunnel/v1/schema.d.ts +40 -34
  63. package/package.json +22 -10
@@ -13,8 +13,12 @@ export interface paths {
13
13
  get?: never;
14
14
  put?: never;
15
15
  /**
16
- * 上传图片
17
- * @description 请求体直接是文件字节,不使用 multipart 封装,一次上传一个文件。类型由内容判定,与 Content-Type 无关。返回的 id 在发送消息时放进 attachmentIds;从未被任何消息引用的附件会被定期清除。
16
+ * Upload a file
17
+ * @description The body is the file bytes themselves, not multipart, one file per request. The kind is determined from the content, not from Content-Type or from the name. Put the returned id in attachmentIds when sending a message.
18
+ *
19
+ * An upload that no message ever references is a draft, and drafts are collected — `draftExpiresAt` in the response says when this one goes. Sending a message with the id makes it permanent.
20
+ *
21
+ * The returned `kind` says how the assistant will see it. An `image` is read directly, and only by models that accept image input. A small `text` file is placed inline in the message. A large `text` file, and anything `binary`, arrives as a reference the assistant reads on demand — for a binary that usually means downloading it onto one of the project's cloud instances.
18
22
  */
19
23
  post: operations["upload-attachment"];
20
24
  delete?: never;
@@ -31,8 +35,10 @@ export interface paths {
31
35
  cookie?: never;
32
36
  };
33
37
  /**
34
- * 取回图片
35
- * @description 按附件 id 取回原始字节,可直接作为 <img> 的地址使用。响应带长期缓存头,附件内容不会变化。附件不存在或不属于当前用户时返回 404。
38
+ * Download a file
39
+ * @description Returns the original bytes for an attachment id. The response carries long-lived cache headers because the content never changes. Returns 404 when the attachment does not exist or does not belong to the current user.
40
+ *
41
+ * Only an attachment whose `kind` is `image` comes back with its own image type and is usable as the address of an `<img>`. Everything else is served as `application/octet-stream` with `Content-Disposition: attachment`, deliberately: an uploaded file is arbitrary bytes under a name its uploader chose, and serving it back inline would run it on this origin.
36
42
  */
37
43
  get: operations["download-attachment"];
38
44
  put?: never;
@@ -51,8 +57,8 @@ export interface paths {
51
57
  cookie?: never;
52
58
  };
53
59
  /**
54
- * 列出绑定
55
- * @description 接入面那张表按通道列出各自绑了谁时用 channelId 过滤。
60
+ * List bindings
61
+ * @description Filter by channelId to show, per channel, who is bound to it.
56
62
  */
57
63
  get: operations["list-bindings"];
58
64
  put?: never;
@@ -70,11 +76,11 @@ export interface paths {
70
76
  path?: never;
71
77
  cookie?: never;
72
78
  };
73
- /** 查看绑定 */
79
+ /** Get a binding */
74
80
  get: operations["get-binding"];
75
81
  put?: never;
76
82
  post?: never;
77
- /** 解除绑定 */
83
+ /** Remove a binding */
78
84
  delete: operations["delete-binding"];
79
85
  options?: never;
80
86
  head?: never;
@@ -88,12 +94,12 @@ export interface paths {
88
94
  path?: never;
89
95
  cookie?: never;
90
96
  };
91
- /** 列出通道 */
97
+ /** List channels */
92
98
  get: operations["list-channels"];
93
99
  put?: never;
94
100
  /**
95
- * 创建通道
96
- * @description 回调密钥归谁定由平台决定,见 list-platforms 的 secretSource:generated 的平台不要传 webhookSecret,我们生成的那把仅在本次响应中返回一次、之后无法再次取回,错过了只能调轮换接口换一把新的;supplied 的平台必须把平台后台那把传进来,此时响应里的webhookSecret 为 null。
101
+ * Create a channel
102
+ * @description Which side owns the webhook secret is decided by the platform; see secretSource on list-platforms. For a `generated` platform, do not send webhookSecret — the one we generate is returned exactly once in this response and cannot be retrieved again; miss it and the only way forward is rotating to a new one. For a `supplied` platform you must pass the secret from that platform's own console, and webhookSecret in the response is null.
97
103
  */
98
104
  post: operations["create-channel"];
99
105
  delete?: never;
@@ -109,20 +115,20 @@ export interface paths {
109
115
  path?: never;
110
116
  cookie?: never;
111
117
  };
112
- /** 查看通道 */
118
+ /** Get a channel */
113
119
  get: operations["get-channel"];
114
120
  put?: never;
115
121
  post?: never;
116
122
  /**
117
- * 删除通道
118
- * @description 删除后该通道不再接收入站消息,其上的绑定一并失效。项目处于停服或清理状态时本接口仍然可用。
123
+ * Delete a channel
124
+ * @description The channel stops accepting inbound messages and every binding on it stops working. This operation remains available while the project is suspended or being cleaned up.
119
125
  */
120
126
  delete: operations["delete-channel"];
121
127
  options?: never;
122
128
  head?: never;
123
129
  /**
124
- * 修改通道
125
- * @description 只修改传了的字段。senderPolicy 与 allowFrom 是一对,由 senderPolicy 决定是否替换;改动对常驻连接要等连接重建后才生效,回调型平台立即生效。
130
+ * Update a channel
131
+ * @description Only the fields present are changed. senderPolicy and allowFrom go together, and senderPolicy decides whether they are replaced. For platforms held open by a long-lived connection the change applies once that connection is rebuilt; for webhook platforms it applies at once.
126
132
  */
127
133
  patch: operations["update-channel"];
128
134
  trace?: never;
@@ -137,8 +143,8 @@ export interface paths {
137
143
  get?: never;
138
144
  put?: never;
139
145
  /**
140
- * 签发绑定码
141
- * @description 生成一个一次性绑定码交给待绑定的人,他在该平台上用自己的账号把这个码发给助手即完成绑定。绑定只能由本人以这种方式建立,不能直接指定平台账号。绑定码有有效期,过期后需重新签发。
146
+ * Issue a binding code
147
+ * @description Produces a single-use code to hand to the person being bound. They send that code to the assistant from their own account on that platform, which completes the binding. A binding can only be established this way, by the person themselves — a platform account cannot be named directly. Codes expire and have to be reissued.
142
148
  */
143
149
  post: operations["create-binding-code"];
144
150
  delete?: never;
@@ -155,8 +161,8 @@ export interface paths {
155
161
  cookie?: never;
156
162
  };
157
163
  /**
158
- * 查看最近被拒绝的入站消息
159
- * @description 排查「发了消息但助手没有响应」时使用。按时间倒序返回最近被这条通道拒绝的入站消息及其拒绝原因,最常见的原因是发送方尚未绑定。
164
+ * List recently rejected inbound messages
165
+ * @description For diagnosing "I sent a message and the assistant never answered". Returns the inbound messages this channel rejected most recently, newest first, each with its reason. The most common reason is that the sender is not bound yet.
160
166
  */
161
167
  get: operations["list-channel-rejections"];
162
168
  put?: never;
@@ -177,8 +183,8 @@ export interface paths {
177
183
  get?: never;
178
184
  put?: never;
179
185
  /**
180
- * 轮换回调密钥
181
- * @description 换一把新的回调密钥,旧的立即失效,通道降回待平台确认状态。密钥归谁定由平台决定,见 list-platforms 的 secretSource:generated 的平台不要传请求体,新密钥仅在本次响应中返回、之后无法再次取回;supplied 的平台必须把平台后台那把新密钥传进来。
186
+ * Rotate the webhook secret
187
+ * @description Replaces the webhook secret. The old one stops working immediately and the channel drops back to awaiting confirmation from the platform. Which side owns the secret is decided by the platform; see secretSource on list-platforms. For a `generated` platform, send no body — the new secret is returned in this response only and cannot be retrieved again. For a `supplied` platform you must pass the new secret from that platform's own console.
182
188
  */
183
189
  post: operations["rotate-channel-secret"];
184
190
  delete?: never;
@@ -195,8 +201,8 @@ export interface paths {
195
201
  cookie?: never;
196
202
  };
197
203
  /**
198
- * 推演一个发件人会不会被放行
199
- * @description 改完发件人策略之后用来自查,不发送任何消息、也不改变任何状态:它走的是和真实入站完全相同的那份判定,并说明结论由哪一条规则得出。无法推演绑定码那一条——是否是绑定码取决于对方发来的内容。
204
+ * Test whether a sender would be let through
205
+ * @description For checking a sender policy after changing it. Sends nothing and changes nothing: it runs exactly the same decision a real inbound message goes through, and says which rule produced the answer. The binding-code rule cannot be tested this way — whether something is a binding code depends on what the sender actually wrote.
200
206
  */
201
207
  get: operations["check-sender"];
202
208
  put?: never;
@@ -217,8 +223,8 @@ export interface paths {
217
223
  get?: never;
218
224
  put?: never;
219
225
  /**
220
- * 发起微信扫码登录
221
- * @description 微信个人号通道需要本人扫码登录后才能收发消息。本接口返回二维码,之后轮询 `GET /v1/weixin-logins/{login}` 获取进度;状态提示需要验证码时,调用 `POST /v1/weixin-logins/{login}/verify-code` 补交。
226
+ * Begin a WeChat QR login
227
+ * @description A personal WeChat channel can only send and receive once its owner has signed in by scanning a QR code. This returns that code; poll `GET /v1/weixin-logins/{login}` for progress, and when the status asks for a verification code, submit it with `POST /v1/weixin-logins/{login}/verify-code`.
222
228
  */
223
229
  post: operations["begin-weixin-login"];
224
230
  delete?: never;
@@ -235,8 +241,8 @@ export interface paths {
235
241
  cookie?: never;
236
242
  };
237
243
  /**
238
- * 列出可接入的平台
239
- * @description 返回本平台当前支持接入的即时通讯平台,以及各自建通道时要走的流程和要填的凭据字段。新建通道表单完全由这份响应驱动:setupMethod 决定展示录入表单还是扫码流程,credentialFields 是要填的字段,secretSource 决定要不要有回调密钥那一栏。
244
+ * List platforms that can be connected
245
+ * @description The instant messaging platforms that can currently be connected, along with the flow and the credential fields each one needs. The create-channel form is driven entirely by this response: setupMethod decides between a credential form and a QR flow, credentialFields is what to ask for, and secretSource decides whether there is a webhook secret field at all.
240
246
  */
241
247
  get: operations["list-platforms"];
242
248
  put?: never;
@@ -255,8 +261,8 @@ export interface paths {
255
261
  cookie?: never;
256
262
  };
257
263
  /**
258
- * 查询扫码登录状态
259
- * @description 轮询本接口直到状态变为成功或失败。状态提示需要验证码时,调用补交验证码接口。
264
+ * Get the state of a QR login
265
+ * @description Poll this until the status is success or failure. When the status asks for a verification code, submit it with the verification-code operation.
260
266
  */
261
267
  get: operations["get-weixin-login"];
262
268
  put?: never;
@@ -277,8 +283,8 @@ export interface paths {
277
283
  get?: never;
278
284
  put?: never;
279
285
  /**
280
- * 补交登录验证码
281
- * @description 微信在扫码后要求短信或设备验证码时使用。验证码由登录发起人在自己手机上获取。
286
+ * Submit a login verification code
287
+ * @description For when WeChat asks for an SMS or device code after the scan. The person who started the login gets that code on their own phone.
282
288
  */
283
289
  post: operations["submit-weixin-verify-code"];
284
290
  delete?: never;
@@ -287,7 +293,87 @@ export interface paths {
287
293
  patch?: never;
288
294
  trace?: never;
289
295
  };
290
- "/api/v1/models": {
296
+ "/api/v1/dynamic-calls/{call}/result": {
297
+ parameters: {
298
+ query?: never;
299
+ header?: never;
300
+ path?: never;
301
+ cookie?: never;
302
+ };
303
+ get?: never;
304
+ put?: never;
305
+ /**
306
+ * Report what an action produced
307
+ * @description The assistant asks the client to run an action by adding a tool call to the conversation
308
+ * with the namespace `dynamic`; the client acts when that entry turns in_progress and reports
309
+ * back here.
310
+ *
311
+ * The first result is the one that counts. A later one is refused rather than replacing it.
312
+ */
313
+ post: operations["submit-dynamic-call-result"];
314
+ delete?: never;
315
+ options?: never;
316
+ head?: never;
317
+ patch?: never;
318
+ trace?: never;
319
+ };
320
+ "/api/v1/folders": {
321
+ parameters: {
322
+ query?: never;
323
+ header?: never;
324
+ path?: never;
325
+ cookie?: never;
326
+ };
327
+ /**
328
+ * List folders
329
+ * @description The current account's folders in this project, oldest first. That order is fixed and does not react to what happens inside a folder: a folder is a place on the screen, and a place that moves whenever something is put into it is not one anybody can aim at. Not paginated — there is a cap on how many there can be, and all of them come back at once.
330
+ */
331
+ get: operations["list-folders"];
332
+ put?: never;
333
+ /**
334
+ * Create a folder
335
+ * @description A folder groups conversations in the sidebar and does nothing else. The assistant is never told which folder a conversation is in, and a conversation behaves exactly the same inside one as outside: no shared instructions, no shared files, no shared memory.
336
+ *
337
+ * Names are unique within an account's folders in this project, because the only way to aim at a folder is to read its name.
338
+ */
339
+ post: operations["create-folder"];
340
+ delete?: never;
341
+ options?: never;
342
+ head?: never;
343
+ patch?: never;
344
+ trace?: never;
345
+ };
346
+ "/api/v1/folders/{folder}": {
347
+ parameters: {
348
+ query?: never;
349
+ header?: never;
350
+ path?: never;
351
+ cookie?: never;
352
+ };
353
+ /**
354
+ * Fetch one folder
355
+ * @description The list returns every folder at once, so this is for the case the list does not cover: a page opened straight at a folder, holding nothing but the id from the address bar. Its conversations are a separate request — `GET /api/v1/threads?folder=<id>`.
356
+ */
357
+ get: operations["get-folder"];
358
+ put?: never;
359
+ post?: never;
360
+ /**
361
+ * Delete a folder
362
+ * @description The conversations inside are **not** deleted. They leave the folder and go back to the ungrouped list, where they can be filed again. Emptying a shelf is not the same as throwing out what was on it, and deleting a conversation is a different request.
363
+ *
364
+ * Idempotent: deleting a folder that is already gone succeeds and changes nothing.
365
+ */
366
+ delete: operations["delete-folder"];
367
+ options?: never;
368
+ head?: never;
369
+ /**
370
+ * Rename a folder
371
+ * @description The conversations in it are untouched, and none of them move in the list — a folder's name is not part of what any conversation is about.
372
+ */
373
+ patch: operations["update-folder"];
374
+ trace?: never;
375
+ };
376
+ "/api/v1/memories": {
291
377
  parameters: {
292
378
  query?: never;
293
379
  header?: never;
@@ -295,18 +381,103 @@ export interface paths {
295
381
  cookie?: never;
296
382
  };
297
383
  /**
298
- * 列出可用模型
299
- * @description 返回本平台当前提供的模型及其上下文窗口、推理档位和支持的输入类型。用于填充对话设置里的模型选择。
384
+ * List what the assistant remembers
385
+ * @description Facts the assistant has written down for the current account in this project. They appear at the start of every later conversation. Members of the same project each have their own, and this returns only the current account's. Not paginated: there is a cap on how many there can be, and all of them come back at once.
300
386
  */
301
- get: operations["list-models"];
387
+ get: operations["list-memories"];
388
+ put?: never;
389
+ post?: never;
390
+ delete?: never;
391
+ options?: never;
392
+ head?: never;
393
+ patch?: never;
394
+ trace?: never;
395
+ };
396
+ "/api/v1/memories/{memory}": {
397
+ parameters: {
398
+ query?: never;
399
+ header?: never;
400
+ path?: never;
401
+ cookie?: never;
402
+ };
403
+ get?: never;
302
404
  put?: never;
303
405
  post?: never;
406
+ /**
407
+ * Delete one memory
408
+ * @description The assistant stops remembering this. It takes effect at once, so the next conversation will not carry it. The assistant may well learn the same thing again.
409
+ */
410
+ delete: operations["delete-memory"];
411
+ options?: never;
412
+ head?: never;
413
+ patch?: never;
414
+ trace?: never;
415
+ };
416
+ "/api/v1/skills": {
417
+ parameters: {
418
+ query?: never;
419
+ header?: never;
420
+ path?: never;
421
+ cookie?: never;
422
+ };
423
+ /**
424
+ * List the skills this project can use
425
+ * @description Everything the assistant can reach in this project, including the ones that are turned off —
426
+ * an entry that disappeared once it was switched off could not be switched back on.
427
+ *
428
+ * `origin` says whether a skill can be edited here. Skills belonging to the project are
429
+ * visible to everyone in it, whoever wrote them.
430
+ */
431
+ get: operations["list-skills"];
432
+ put?: never;
433
+ /**
434
+ * Write a skill for this project
435
+ * @description Creates it, or replaces the project's skill of that name. The whole package goes in each
436
+ * time: files left out of a write are removed, so the stored skill is what was sent and not
437
+ * what accumulated.
438
+ *
439
+ * A project skill takes precedence over a built-in one of the same name for this project only.
440
+ * The built-in is untouched and reappears if the project's is deleted.
441
+ */
442
+ post: operations["put-skill"];
304
443
  delete?: never;
305
444
  options?: never;
306
445
  head?: never;
307
446
  patch?: never;
308
447
  trace?: never;
309
448
  };
449
+ "/api/v1/skills/{skill}": {
450
+ parameters: {
451
+ query?: never;
452
+ header?: never;
453
+ path?: never;
454
+ cookie?: never;
455
+ };
456
+ /**
457
+ * Read one skill, with its files
458
+ * @description Works for built-in skills too; they simply cannot be written.
459
+ */
460
+ get: operations["get-skill"];
461
+ put?: never;
462
+ post?: never;
463
+ /**
464
+ * Delete this project's skill
465
+ * @description A built-in skill of the same name, if there was one, becomes visible again.
466
+ */
467
+ delete: operations["delete-skill"];
468
+ options?: never;
469
+ head?: never;
470
+ /**
471
+ * Turn a skill on or off
472
+ * @description Separate from writing it, because this is the frequent one: a skill that is off costs
473
+ * nothing and stays where it is.
474
+ *
475
+ * Only skills belonging to the project can be switched. To keep a built-in one out of the
476
+ * way, write a project skill of the same name and turn that off.
477
+ */
478
+ patch: operations["set-skill-enabled"];
479
+ trace?: never;
480
+ };
310
481
  "/api/v1/threads": {
311
482
  parameters: {
312
483
  query?: never;
@@ -315,12 +486,12 @@ export interface paths {
315
486
  cookie?: never;
316
487
  };
317
488
  /**
318
- * 列出对话
319
- * @description 按最近活动排序,只返回当前账号在当前项目里的对话。archived 是一个二选一的开关而不是「包含归档」:归档的对话不出现在默认列表里,要看它们就把这个参数打开。
489
+ * List conversations
490
+ * @description Ordered by most recent activity, limited to the current account's conversations in the current project. `archived` selects between two sets rather than widening one: archived conversations are absent from the default list, and turning the flag on shows those instead.
320
491
  */
321
492
  get: operations["list-threads"];
322
493
  put?: never;
323
- /** 创建对话 */
494
+ /** Create a conversation */
324
495
  post: operations["create-thread"];
325
496
  delete?: never;
326
497
  options?: never;
@@ -336,18 +507,30 @@ export interface paths {
336
507
  cookie?: never;
337
508
  };
338
509
  /**
339
- * 取回对话文档
340
- * @description 对话的完整当前状态,用于首屏渲染。文档中的 stream 给出实时输出地址和入场票据,流推送的是对这份文档的增量编辑,可直接套用同一套渲染逻辑。
510
+ * Fetch the conversation document
511
+ * @description The complete current state of a conversation, for the first render. Its `stream` gives the address and admission ticket for live output, and what that stream pushes are incremental edits to this same document, so the same rendering logic applies.
341
512
  */
342
513
  get: operations["get-thread"];
343
514
  put?: never;
344
515
  post?: never;
345
- delete?: never;
516
+ /**
517
+ * Delete a conversation
518
+ * @description Removes the conversation from every list and makes it unreachable by id. The assistant can no longer find it either — neither by searching past conversations nor by reading one back.
519
+ *
520
+ * Deleting is not the same as archiving, and the two are not degrees of the same thing. An archived conversation is still there and still readable, it just takes no new input; a deleted one is gone from view. Archiving can be undone; this cannot.
521
+ *
522
+ * What survives is the record itself, because a conversation with this assistant is an account of what was done to real infrastructure — which machine was changed, which disk was removed. That record is kept even though nobody can reach it here.
523
+ *
524
+ * Fails while a turn is running: stop it first. Deleting an already deleted conversation succeeds and changes nothing.
525
+ */
526
+ delete: operations["delete-thread"];
346
527
  options?: never;
347
528
  head?: never;
348
529
  /**
349
- * 修改对话设置
350
- * @description 可修改模型、推理档位、审批模式和归档状态。改动从下一次 turn 起生效,正在执行的 turn 沿用它启动时的设置。reasoningEffort 仅在同时提供 model 时生效。
530
+ * Update conversation settings
531
+ * @description Changes the title, the approval mode, and whether the conversation is archived. A change to the approval mode takes effect from the next turn; a turn already running keeps the settings it started with.
532
+ *
533
+ * Archiving makes a conversation read-only: it stays in the list under "archived", stays readable, and the assistant can still find it when it searches past conversations — it just takes no new input. Unarchive it to continue. Archiving fails while a turn is running; stop it first.
351
534
  */
352
535
  patch: operations["update-thread"];
353
536
  trace?: never;
@@ -362,8 +545,8 @@ export interface paths {
362
545
  get?: never;
363
546
  put?: never;
364
547
  /**
365
- * 批准或拒绝一批工具调用
366
- * @description 批次 id 来自对话文档的 wait 字段。本接口是幂等的:重复提交同一批次不会改变已经生效的决定,也不会报错。批次不属于该对话时返回 404。
548
+ * Approve or decline a batch of tool calls
549
+ * @description The batch id comes from the conversation document's `wait`. This is idempotent: submitting the same batch again neither changes a decision already in effect nor reports an error. Returns 404 when the batch does not belong to that conversation.
367
550
  */
368
551
  post: operations["decide-approval"];
369
552
  delete?: never;
@@ -380,8 +563,8 @@ export interface paths {
380
563
  cookie?: never;
381
564
  };
382
565
  /**
383
- * 取回更早的对话内容
384
- * @description 首屏只给对话最新的那一段,再往上的内容用本接口按需取回,一次一段。before 用文档里的 earlier.before,响应里的 earlier 是再往上那一段的游标,为 null 表示已经到顶。返回的条目和文档里的 items 是同一种形状,顺序也一样(由旧到新),直接接在现有内容前面即可。
566
+ * Fetch earlier parts of a conversation
567
+ * @description The first render only carries the latest stretch of a conversation; anything above it is fetched here, one stretch at a time. Pass the document's earlier.before as `before`; the `earlier` in the response is the cursor for the stretch above that, and null means the top has been reached. The entries have the same shape and the same order (oldest first) as `items` in the document, so they can be prepended as they are.
385
568
  */
386
569
  get: operations["list-earlier-items"];
387
570
  put?: never;
@@ -402,8 +585,8 @@ export interface paths {
402
585
  get?: never;
403
586
  put?: never;
404
587
  /**
405
- * 中断正在执行的 turn
406
- * @description 对没有正在执行的 turn 的对话调用同样返回 204,不视为错误——用户点击停止与 turn 自然结束之间存在竞争,两种结果一致。项目处于停服或清理状态时本接口仍然可用。
588
+ * Interrupt a running turn
589
+ * @description Calling this on a conversation with no running turn also returns 204 rather than an error — the user pressing stop races with the turn finishing on its own, and both outcomes are the same. This operation remains available while the project is suspended or being cleaned up.
407
590
  */
408
591
  post: operations["interrupt-thread"];
409
592
  delete?: never;
@@ -422,8 +605,8 @@ export interface paths {
422
605
  get?: never;
423
606
  put?: never;
424
607
  /**
425
- * 发送消息并触发一次 turn
426
- * @description 立即返回 turnId,不等待执行完成——一次 turn 可能持续数十分钟。执行进度通过对话文档中 stream 指向的实时流获取,不在本响应里。
608
+ * Send a message and start a turn
609
+ * @description Returns a turnId immediately without waiting for execution — a turn can run for tens of minutes. Progress arrives on the live stream the conversation document's `stream` points at, not in this response. Sending while the assistant is still working is allowed: the message is put in line and `queued` comes back true, to be read at the next step of the turn already running — so the editor should stay open rather than blocking on a busy conversation.
427
610
  */
428
611
  post: operations["send-message"];
429
612
  delete?: never;
@@ -442,8 +625,8 @@ export interface paths {
442
625
  get?: never;
443
626
  put?: never;
444
627
  /**
445
- * 回答助手提出的问题
446
- * @description 问题 id 来自对话文档的 wait 字段。已被回答过的问题同样返回 204——可能是另一个页面提交在先,也可能是自动应答窗口已到期,两种情况下 turn 都已带着答案继续执行。
628
+ * Answer the assistant's questions
629
+ * @description The question id comes from the conversation document's `wait`. An already-answered question also returns 204 — another tab may have submitted first, or the auto-answer window may have expired, and in both cases the turn has already continued with an answer.
447
630
  */
448
631
  post: operations["answer-question"];
449
632
  delete?: never;
@@ -461,7 +644,7 @@ export interface paths {
461
644
  };
462
645
  get?: never;
463
646
  put?: never;
464
- /** 标记对话已读 */
647
+ /** Mark a conversation as read */
465
648
  post: operations["mark-thread-read"];
466
649
  delete?: never;
467
650
  options?: never;
@@ -479,8 +662,8 @@ export interface paths {
479
662
  get?: never;
480
663
  put?: never;
481
664
  /**
482
- * 从指定位置起撤回
483
- * @description 撤回 ordinal 及其之后的全部条目。被撤回的条目仍留在逐字稿中并标记 reverted,序号不会重排。返回实际撤回的条目数。
665
+ * Revert from a given point
666
+ * @description Reverts the entry at `ordinal` and everything after it. Reverted entries stay in the transcript marked `reverted`, and ordinals are not renumbered. Returns how many were actually reverted.
484
667
  */
485
668
  post: operations["revert-thread"];
486
669
  delete?: never;
@@ -496,6 +679,10 @@ export interface components {
496
679
  Error: {
497
680
  code?: string;
498
681
  message: string;
682
+ /**
683
+ * @description What a given `code` carries alongside the message. The keys depend on the code,
684
+ * and a client that does not recognise one ignores it.
685
+ */
499
686
  meta?: {
500
687
  [key: string]: unknown;
501
688
  };
@@ -503,11 +690,39 @@ export interface components {
503
690
  status: number;
504
691
  };
505
692
  UploadedResource: {
506
- /** Format: int64 */
507
- height: number;
693
+ /**
694
+ * Format: int64
695
+ * @description Size of what was stored. For an image that has been resized, this is the resized size, not what was uploaded.
696
+ */
697
+ byteSize: number;
698
+ /**
699
+ * Format: date-time
700
+ * @description When this upload gets cleared if no message ever references it. Sending a message with this id makes it permanent and this stops applying — a file that belongs to a conversation is kept as long as the conversation is.
701
+ *
702
+ * It is here so the editor can say so before it happens. An attachment chip that quietly stops working a week later reads as a bug, and the person who hits it has no way to tell that what they are seeing is a draft being collected.
703
+ */
704
+ draftExpiresAt: string;
705
+ filename: string;
706
+ /**
707
+ * Format: int64
708
+ * @description Null unless kind is image.
709
+ */
710
+ height: number | null;
508
711
  id: string;
509
- /** Format: int64 */
510
- width: number;
712
+ /**
713
+ * @description How the assistant will see this file.
714
+ *
715
+ * - `image` — read directly, and only by models that accept image input
716
+ * - `text` — placed inline in the message when small enough, otherwise read on demand
717
+ * - `binary` — never read directly; the assistant downloads it onto a cloud instance to work with it
718
+ * @enum {string}
719
+ */
720
+ kind: "image" | "text" | "binary";
721
+ /**
722
+ * Format: int64
723
+ * @description Null unless kind is image.
724
+ */
725
+ width: number | null;
511
726
  };
512
727
  BindingResource: {
513
728
  /** Format: uuid */
@@ -526,28 +741,28 @@ export interface components {
526
741
  verifiedAt: string | null;
527
742
  };
528
743
  LengthAwarePageBindingResource: {
529
- /** @description 这一页的内容 */
744
+ /** @description The entries on this page */
530
745
  items: components["schemas"]["BindingResource"][];
531
746
  /**
532
747
  * Format: int64
533
- * @description 这一页最多几条,回显请求里的值
748
+ * @description The page size, echoing what was requested
534
749
  */
535
750
  limit: number;
536
751
  /**
537
752
  * Format: int64
538
- * @description 跳过了多少条,回显请求里的值
753
+ * @description How many were skipped, echoing what was requested
539
754
  */
540
755
  offset: number;
541
756
  /**
542
757
  * Format: int64
543
- * @description 命中的总条数,不只是这一页
758
+ * @description How many match in total, not just on this page
544
759
  */
545
760
  total: number;
546
761
  };
547
762
  ChannelResource: {
548
763
  allowFrom: string[] | null;
549
764
  /**
550
- * @description 平台接入状态。只有 online 才收得到消息、也才签得出绑定码
765
+ * @description How far this channel is from working. Only `online` receives messages and can issue binding codes
551
766
  * @enum {string}
552
767
  */
553
768
  connState: "logged_out" | "qr_pending" | "online" | "expired";
@@ -558,7 +773,7 @@ export interface components {
558
773
  name: string;
559
774
  platform: string;
560
775
  /**
561
- * @description 常驻连接此刻的状态。回调型平台恒为 stopped
776
+ * @description The state of the long-lived connection right now. Always `stopped` for webhook platforms
562
777
  * @enum {string}
563
778
  */
564
779
  runtimeState: "stopped" | "running";
@@ -568,33 +783,33 @@ export interface components {
568
783
  status: "active" | "suspended" | "disabled";
569
784
  /** Format: date-time */
570
785
  updatedAt: string;
571
- /** @description 回调路径,网关配置和排查时用 */
786
+ /** @description The webhook path, for gateway configuration and for diagnosis */
572
787
  webhookPath: string;
573
- /** @description 填到平台后台的回调地址。部署未声明公网入口时为 null */
788
+ /** @description The webhook address to paste into that platform's console. Null when the deployment declares no public entry point */
574
789
  webhookUrl: string | null;
575
790
  };
576
791
  LengthAwarePageChannelResource: {
577
- /** @description 这一页的内容 */
792
+ /** @description The entries on this page */
578
793
  items: components["schemas"]["ChannelResource"][];
579
794
  /**
580
795
  * Format: int64
581
- * @description 这一页最多几条,回显请求里的值
796
+ * @description The page size, echoing what was requested
582
797
  */
583
798
  limit: number;
584
799
  /**
585
800
  * Format: int64
586
- * @description 跳过了多少条,回显请求里的值
801
+ * @description How many were skipped, echoing what was requested
587
802
  */
588
803
  offset: number;
589
804
  /**
590
805
  * Format: int64
591
- * @description 命中的总条数,不只是这一页
806
+ * @description How many match in total, not just on this page
592
807
  */
593
808
  total: number;
594
809
  };
595
810
  CreateChannelRequestBody: {
596
811
  allowFrom?: string[] | null;
597
- /** @description 平台侧凭据。只写不读,创建后无法取回 */
812
+ /** @description Credentials for that platform. Write-only: they cannot be read back after creation */
598
813
  credentials?: {
599
814
  [key: string]: string;
600
815
  };
@@ -602,13 +817,13 @@ export interface components {
602
817
  platform: string;
603
818
  /** @enum {string} */
604
819
  senderPolicy?: "bound_only" | "open";
605
- /** @description 平台生成密钥的平台(secretSource=supplied)必须传;我们生成的(generated)不能传,那把会在本次响应的 webhookSecret 里返回一次 */
820
+ /** @description Required for platforms that generate the secret themselves (secretSource=supplied). Must be absent for `generated` ones, where the secret we make is returned once in webhookSecret on this response */
606
821
  webhookSecret?: string;
607
822
  };
608
823
  ChannelWithSecretResponseBody: {
609
824
  allowFrom: string[] | null;
610
825
  /**
611
- * @description 平台接入状态。只有 online 才收得到消息、也才签得出绑定码
826
+ * @description How far this channel is from working. Only `online` receives messages and can issue binding codes
612
827
  * @enum {string}
613
828
  */
614
829
  connState: "logged_out" | "qr_pending" | "online" | "expired";
@@ -619,7 +834,7 @@ export interface components {
619
834
  name: string;
620
835
  platform: string;
621
836
  /**
622
- * @description 常驻连接此刻的状态。回调型平台恒为 stopped
837
+ * @description The state of the long-lived connection right now. Always `stopped` for webhook platforms
623
838
  * @enum {string}
624
839
  */
625
840
  runtimeState: "stopped" | "running";
@@ -629,24 +844,24 @@ export interface components {
629
844
  status: "active" | "suspended" | "disabled";
630
845
  /** Format: date-time */
631
846
  updatedAt: string;
632
- /** @description 回调路径,网关配置和排查时用 */
847
+ /** @description The webhook path, for gateway configuration and for diagnosis */
633
848
  webhookPath: string;
634
- /** @description 我们生成的那把回调密钥,拿去粘到平台后台。**之后无法再次取回**,只能轮换出新的一把。密钥由平台生成(secretSource=supplied)或该平台不走回调时为 null */
849
+ /** @description The webhook secret we generated, to paste into that platform's console. **It cannot be retrieved again** — the only way forward is rotating to a new one. Null when the platform generates the secret (secretSource=supplied) or does not use webhooks at all */
635
850
  webhookSecret: string | null;
636
- /** @description 填到平台后台的回调地址。部署未声明公网入口时为 null */
851
+ /** @description The webhook address to paste into that platform's console. Null when the deployment declares no public entry point */
637
852
  webhookUrl: string | null;
638
853
  };
639
854
  UpdateChannelRequestBody: {
640
- /** @description 放行名单。仅在同时传了 senderPolicy 时生效 */
855
+ /** @description The allow list. Only applied when senderPolicy is sent as well */
641
856
  allowFrom?: string[] | null;
642
- /** @description 整份替换而不是逐键合并。不传表示不动 */
857
+ /** @description Replaced wholesale rather than merged key by key. Absent means unchanged */
643
858
  credentials?: {
644
859
  [key: string]: string;
645
860
  };
646
861
  enabled?: boolean;
647
862
  name?: string;
648
863
  /**
649
- * @description 传了才会连同 allowFrom 一起替换
864
+ * @description Only when this is sent is allowFrom replaced along with it
650
865
  * @enum {string}
651
866
  */
652
867
  senderPolicy?: "bound_only" | "open";
@@ -656,6 +871,22 @@ export interface components {
656
871
  /** Format: date-time */
657
872
  expiresAt: string;
658
873
  };
874
+ PartResource: {
875
+ /** @description For `file` parts. Points at one of this entry's `attachments`. */
876
+ attachmentId?: string | null;
877
+ /**
878
+ * @description Addresses this part in the live stream — text arrives as `append` frames pointing at
879
+ * `/items/{item}/parts/{id}/text`.
880
+ *
881
+ * Not an array index. It looks like one today because parts are only ever appended, and a
882
+ * client that treats it as one keeps working right up until that stops being true.
883
+ */
884
+ id: string;
885
+ /** @description For `text` parts. Grows as the answer is written. */
886
+ text?: string | null;
887
+ /** @enum {string} */
888
+ type: "text" | "file";
889
+ };
659
890
  RejectionResource: {
660
891
  /** Format: date-time */
661
892
  at: string;
@@ -671,7 +902,7 @@ export interface components {
671
902
  rejections: components["schemas"]["RejectionResource"][] | null;
672
903
  };
673
904
  RotateSecretRequestBody: {
674
- /** @description 平台生成密钥的平台(secretSource=supplied)必须传新的那把;我们生成的(generated)不能传 */
905
+ /** @description Required for platforms that generate the secret themselves (secretSource=supplied). Must be absent for `generated` ones */
675
906
  webhookSecret?: string;
676
907
  };
677
908
  WebhookSecretResponseBody: {
@@ -688,14 +919,14 @@ export interface components {
688
919
  LoginResource: {
689
920
  /**
690
921
  * Format: date-time
691
- * @description 这条登录流的截止时间。到点之后不要再轮询,重新发起一次
922
+ * @description When this login flow expires. Past that, stop polling and start a new one
692
923
  */
693
924
  expiresAt: string;
694
925
  /** Format: uuid */
695
926
  id: string;
696
- /** @description 二维码的内容,由客户端编码成二维码图形渲染(不是图片地址,也不是 data URI)。码过期时这条流会自己换一张接着等,所以每次轮询拿到的可能是新的一串 */
927
+ /** @description The text to encode and render as a QR code by the client — not an image address and not a data URI. When a code expires this flow issues another and keeps waiting, so each poll may return a new string */
697
928
  qrcodeData: string;
698
- /** @description 失败原因。仅在 status 为 error 或 expired 时有内容 */
929
+ /** @description Why it failed. Present only when status is error or expired */
699
930
  reason: string;
700
931
  /** @enum {string} */
701
932
  status: "wait" | "scanned" | "confirmed" | "expired" | "error" | "need_verify_code";
@@ -717,9 +948,9 @@ export interface components {
717
948
  setupChallenge: "none" | "webhook" | "scan";
718
949
  /** @enum {string} */
719
950
  setupMethod: "credentials" | "scan";
720
- /** @description 回调路径模板,{channel} 处替换为通道 id */
951
+ /** @description The webhook path template; {channel} is replaced with the channel id */
721
952
  webhookPath: string;
722
- /** @description 完整回调地址模板。部署未声明公网入口时为 null */
953
+ /** @description The full webhook address template. Null when the deployment declares no public entry point */
723
954
  webhookUrlTemplate: string | null;
724
955
  };
725
956
  PlatformListResponseBody: {
@@ -728,15 +959,60 @@ export interface components {
728
959
  VerifyCodeRequestBody: {
729
960
  code: string;
730
961
  };
731
- ModelResource: {
732
- /** Format: int64 */
733
- contextWindow: number;
734
- inputModalities: string[] | null;
735
- key: string;
736
- reasoningTiers: string[] | null;
962
+ SkillResource: {
963
+ /**
964
+ * @description True when the assistant wrote this skill during a conversation rather than a person
965
+ * writing it here.
966
+ *
967
+ * Which conversation is deliberately not returned: skills are shared across the project
968
+ * while conversations belong to one person, so naming one would tell everybody in the
969
+ * project that a particular colleague had it.
970
+ */
971
+ authoredByAssistant: boolean;
972
+ /** @description Why the assistant would open this skill. It sits in every request, so it is the one field worth writing carefully. */
973
+ description: string;
974
+ enabled: boolean;
975
+ /** @description Path to contents, `SKILL.md` among them. Only returned by `get-skill`; the list leaves it out. */
976
+ files?: {
977
+ [key: string]: string;
978
+ } | null;
979
+ name: string;
980
+ /**
981
+ * @description `builtin` — provided by the platform and read-only here.
982
+ * `project` — written for this project and editable by anyone in it.
983
+ * @enum {string}
984
+ */
985
+ origin: "builtin" | "project";
986
+ shortDescription: string | null;
987
+ /**
988
+ * Format: date-time
989
+ * @description Null for built-in skills, which have no edit history here.
990
+ */
991
+ updatedAt: string | null;
992
+ };
993
+ SkillListResponseBody: {
994
+ skills: components["schemas"]["SkillResource"][];
995
+ };
996
+ SkillRequestBody: {
997
+ /** @description Why the assistant would open this skill. It sits in every request; write it as the answer to "when do I need this", not "what does it contain". */
998
+ description: string;
999
+ /** @default true */
1000
+ enabled?: boolean;
1001
+ /**
1002
+ * @description Path to contents. `SKILL.md` is required; anything else it references goes alongside it.
1003
+ *
1004
+ * Paths are relative to the skill and cannot leave it. At most 32 files, 256 KiB each and
1005
+ * 1 MiB in total.
1006
+ */
1007
+ files: {
1008
+ [key: string]: string;
1009
+ };
1010
+ /** @description Also how the assistant refers to it, so renaming is deleting and writing again. */
1011
+ name: string;
1012
+ shortDescription?: string;
737
1013
  };
738
- ModelListResponseBody: {
739
- models: components["schemas"]["ModelResource"][] | null;
1014
+ SkillEnabledRequestBody: {
1015
+ enabled: boolean;
740
1016
  };
741
1017
  ThreadSummaryResource: {
742
1018
  /** @enum {string} */
@@ -744,6 +1020,8 @@ export interface components {
744
1020
  archived: boolean;
745
1021
  /** Format: date-time */
746
1022
  createdAt: string;
1023
+ /** @description The folder this conversation is filed under, or null when it is in none */
1024
+ folderId: string | null;
747
1025
  id: string;
748
1026
  model: string;
749
1027
  title: string | null;
@@ -752,11 +1030,13 @@ export interface components {
752
1030
  updatedAt: string;
753
1031
  };
754
1032
  ThreadListResponseBody: {
1033
+ /** @description Pass this back as `cursor` for the next page. Null means this was the last one — it is only set when there is genuinely more, so an empty final page never happens. */
1034
+ nextCursor: string | null;
755
1035
  threads: components["schemas"]["ThreadSummaryResource"][] | null;
756
1036
  };
757
1037
  CreateThreadRequestBody: {
758
1038
  /**
759
- * @description 不传则使用平台默认审批模式
1039
+ * @description Absent uses the platform's default approval mode
760
1040
  * @enum {string}
761
1041
  */
762
1042
  approvalMode?: "guardian" | "manual" | "yolo";
@@ -764,6 +1044,14 @@ export interface components {
764
1044
  ContextResource: {
765
1045
  /** Format: int64 */
766
1046
  compactAt: number | null;
1047
+ /**
1048
+ * @description What kinds of input the model behind this conversation accepts, as modality names: text, image.
1049
+ *
1050
+ * This governs images and nothing else. Text and binary attachments reach every model: a small text file is placed inline, a large one is read on demand, and a binary is downloaded onto a cloud instance — none of which asks the model to see a picture. So this decides whether pasting a screenshot does anything, not whether the attach control exists. Hiding file upload on a text-only model takes away something that would have worked.
1051
+ *
1052
+ * An empty list is not a claim that the model reads nothing: it means this deployment has not stated the modalities, or the conversation names a model that has since been retired. Treat empty as unknown and keep the control, because hiding one for a reason nobody can see is worse than a refusal that says why.
1053
+ */
1054
+ inputModalities: string[];
767
1055
  model: string;
768
1056
  /** Format: int64 */
769
1057
  used: number | null;
@@ -779,10 +1067,24 @@ export interface components {
779
1067
  };
780
1068
  AttachmentResource: {
781
1069
  /** Format: int64 */
782
- height: number;
1070
+ byteSize: number;
1071
+ filename: string;
1072
+ /**
1073
+ * Format: int64
1074
+ * @description Null unless kind is image. Width and height are here so a client can hold the space before the image itself has loaded.
1075
+ */
1076
+ height: number | null;
783
1077
  id: string;
784
- /** Format: int64 */
785
- width: number;
1078
+ /**
1079
+ * @description What this attachment is. A client renders an image in place and everything else as a file to download.
1080
+ * @enum {string}
1081
+ */
1082
+ kind: "image" | "text" | "binary";
1083
+ /**
1084
+ * Format: int64
1085
+ * @description Null unless kind is image.
1086
+ */
1087
+ width: number | null;
786
1088
  };
787
1089
  ItemResource: {
788
1090
  /** @enum {string|null} */
@@ -790,13 +1092,25 @@ export interface components {
790
1092
  approvalReason?: string | null;
791
1093
  arguments?: string;
792
1094
  attachments?: components["schemas"]["AttachmentResource"][] | null;
1095
+ /**
1096
+ * @description The context blocks the client attached to this message.
1097
+ *
1098
+ * **Not part of what the operator wrote** — `text` is. Render the message from `text` and
1099
+ * leave these out of the bubble; they are here so a client that did not send them, or one
1100
+ * that reloaded, can still read what the assistant was given.
1101
+ *
1102
+ * The actions declared alongside them are not returned: they are re-declared as they
1103
+ * change and would make every fetch of the conversation carry them again.
1104
+ */
1105
+ clientContext?: components["schemas"]["ClientContextPart"][] | null;
793
1106
  /** Format: date-time */
794
1107
  createdAt: string;
795
1108
  detail?: string | null;
1109
+ presentation?: components["schemas"]["PresentationResource"] | null;
796
1110
  /** Format: int64 */
797
1111
  durationMs?: number | null;
798
1112
  id: string;
799
- /** @description 产出这一条的模型。用户自己发的消息为 null */
1113
+ /** @description The model that produced this entry. Null for messages the user sent */
800
1114
  model: string | null;
801
1115
  namespace?: string | null;
802
1116
  /** Format: int64 */
@@ -805,14 +1119,69 @@ export interface components {
805
1119
  /** @enum {string} */
806
1120
  status: "pending" | "in_progress" | "completed" | "failed" | "declined" | "interrupted";
807
1121
  target?: string | null;
808
- text?: string;
1122
+ /**
1123
+ * @description The content of this entry, in the order it was written. A message that is only text is a
1124
+ * single part, which is most of them.
1125
+ *
1126
+ * An attachment belongs where it was written, so render these in order rather than putting
1127
+ * them all at the end.
1128
+ */
1129
+ parts?: components["schemas"]["PartResource"][] | null;
809
1130
  tool?: string | null;
810
1131
  /**
811
- * @description 决定这一条包含哪些字段
1132
+ * @description Determines which fields this entry carries
812
1133
  * @enum {string}
813
1134
  */
814
1135
  type: "user_message" | "agent_message" | "reasoning" | "dynamic_tool_call" | "context_compaction" | "token_budget_reminder" | "turn_failure";
815
1136
  };
1137
+ /**
1138
+ * @description Structured detail produced by a tool call, in addition to the single-line `detail`. Null
1139
+ * when the call produced none.
1140
+ *
1141
+ * `kind` determines which of the remaining fields is populated.
1142
+ */
1143
+ PresentationResource: {
1144
+ fileDiff?: components["schemas"]["FileDiffResource"] | null;
1145
+ /**
1146
+ * @description Determines which of the remaining fields is populated
1147
+ * @enum {string}
1148
+ */
1149
+ kind: "file_diff";
1150
+ };
1151
+ /**
1152
+ * @description The change a tool call applied to a single file.
1153
+ *
1154
+ * Populated once the call has completed successfully. It is absent while the call is pending
1155
+ * or awaiting approval, as the file's prior contents are read during execution. To preview an
1156
+ * edit awaiting approval, derive it from the call's `old_string` and `new_string` arguments.
1157
+ */
1158
+ FileDiffResource: {
1159
+ /**
1160
+ * Format: int64
1161
+ * @description Lines added. Complete even when `unified` is null
1162
+ */
1163
+ added: number;
1164
+ /** @description Absolute path of the file on the instance */
1165
+ path: string;
1166
+ /**
1167
+ * Format: int64
1168
+ * @description Lines removed. Complete even when `unified` is null
1169
+ */
1170
+ removed: number;
1171
+ /**
1172
+ * @description What the call did to the file
1173
+ * @enum {string}
1174
+ */
1175
+ status: "added" | "modified" | "deleted";
1176
+ /**
1177
+ * @description The change as a unified diff with three lines of context. A file created by the call is
1178
+ * diffed against `/dev/null`.
1179
+ *
1180
+ * Null when the change exceeds the service's size limit. The diff is omitted in full
1181
+ * rather than truncated; `added` and `removed` remain complete.
1182
+ */
1183
+ unified?: string | null;
1184
+ };
816
1185
  StreamResource: {
817
1186
  path: string;
818
1187
  ticket: string;
@@ -850,6 +1219,8 @@ export interface components {
850
1219
  status: string;
851
1220
  stream: components["schemas"]["StreamResource"] | null;
852
1221
  turn: components["schemas"]["TurnResource"] | null;
1222
+ /** @description The assistant's checklist for the work in this conversation, in the order it intends to do it. Empty when it has not written one — short tasks do not get a list. It is rewritten in full each time, so what is here is the current state. */
1223
+ todos?: components["schemas"]["TodoResource"][];
853
1224
  turnId: string | null;
854
1225
  wait: components["schemas"]["WaitResource"] | null;
855
1226
  };
@@ -857,8 +1228,20 @@ export interface components {
857
1228
  /** @enum {string} */
858
1229
  approvalMode?: "guardian" | "manual" | "yolo";
859
1230
  archived?: boolean;
860
- model?: string;
861
- reasoningEffort?: string;
1231
+ /**
1232
+ * @description File this conversation into a folder, or `null` to take it out of the one it is in. Omit the field to leave it where it is.
1233
+ *
1234
+ * Filing does not move the conversation in the list. The order answers "which conversation has something new in it", and putting one away is not that.
1235
+ */
1236
+ folderId?: string | null;
1237
+ /**
1238
+ * @description Rename this conversation.
1239
+ *
1240
+ * A conversation names itself: the first message gives it a working title, and the assistant replaces that with a better one once it has answered. Setting this stops both — a name somebody chose is never overwritten by one that was generated.
1241
+ *
1242
+ * Renaming does not move the conversation in the list. The order answers "which conversation has something new in it", and editing a title is not that.
1243
+ */
1244
+ title?: string;
862
1245
  };
863
1246
  DecideRequestBody: {
864
1247
  approved: boolean;
@@ -869,15 +1252,144 @@ export interface components {
869
1252
  items: components["schemas"]["ItemResource"][] | null;
870
1253
  };
871
1254
  SendMessageRequestBody: {
872
- /** @description 此前上传、尚未绑定到任何消息的附件 id */
873
- attachmentIds?: string[] | null;
874
- text: string;
1255
+ client?: components["schemas"]["ClientContextRequest"];
1256
+ /**
1257
+ * @description The message, in the order it was written. A message with nothing but text is a single
1258
+ * text part; that is the ordinary case and nothing else is required.
1259
+ */
1260
+ parts: components["schemas"]["MessagePart"][];
1261
+ };
1262
+ MemoryListResponseBody: {
1263
+ items: components["schemas"]["MemoryResource"][];
1264
+ };
1265
+ MemoryResource: {
1266
+ /** @description The fact itself */
1267
+ body: string;
1268
+ /** Format: date-time */
1269
+ createdAt: string;
1270
+ id: string;
1271
+ /** @description The name the assistant gave this fact; it overwrites or deletes its own entries by that name */
1272
+ name: string;
1273
+ /** @description Which conversation the assistant learned it in. That conversation may since have been deleted */
1274
+ sourceThreadId?: string;
1275
+ /** Format: date-time */
1276
+ updatedAt: string;
1277
+ };
1278
+ /**
1279
+ * @description One piece of a message. `type` says which of the fields below carries it:
1280
+ *
1281
+ * - `text` — the words, in `text`
1282
+ * - `file` — an attachment uploaded earlier, by id in `attachmentId`
1283
+ * - `data-<something>` — context from the client, in `data`. The name after `data-` is yours;
1284
+ * it is shown to the assistant so it can tell one kind of block from another.
1285
+ *
1286
+ * Order matters: an attachment belongs where it was written, not at the end.
1287
+ */
1288
+ MessagePart: {
1289
+ /** @description For `file` parts. The attachment must have been uploaded and not yet bound to another message. */
1290
+ attachmentId?: string | null;
1291
+ /** @description For `data-*` parts. Any object; its keys reach the assistant as they are. */
1292
+ data?: {
1293
+ [key: string]: unknown;
1294
+ } | null;
1295
+ /** @description For `text` parts. */
1296
+ text?: string | null;
1297
+ type: string;
1298
+ };
1299
+ /**
1300
+ * @description Which client this is and what it can do, so the assistant can ask it to do those things
1301
+ * while it answers. What the operator is looking at travels as `data-*` parts on the message.
1302
+ *
1303
+ * Send `actions` only when they differ from the last message on this conversation. Sending the
1304
+ * block without `actions` keeps whatever was declared before.
1305
+ */
1306
+ ClientContextRequest: {
1307
+ /**
1308
+ * @description The actions on offer right now.
1309
+ *
1310
+ * Omit it when nothing changed since the last message. Send `[]` to say there is nothing
1311
+ * on offer — those are different: a client that moves off the page it was attached to has
1312
+ * to be able to say so, or the assistant keeps calling actions that no longer make sense.
1313
+ */
1314
+ actions?: components["schemas"]["ClientActionRequest"][] | null;
1315
+ /** @description Identifies this client while it stays open. Any stable string; one per tab or process. */
1316
+ clientId: string;
1317
+ /** @description How the client calls itself, for example "Leaflow console (web)". */
1318
+ label?: string;
1319
+ };
1320
+ /** @description A `data-*` part as it was sent. */
1321
+ ClientContextPart: {
1322
+ data: {
1323
+ [key: string]: unknown;
1324
+ };
1325
+ type: string;
1326
+ };
1327
+ /** @description The shape of a tool in the OpenAI Chat Completions API, plus `readOnly` and `timeoutMs`. */
1328
+ ClientActionRequest: {
1329
+ function: components["schemas"]["ClientFunctionRequest"];
1330
+ /** @description True when the action changes nothing outside the client. Anything else goes through this conversation's approval before it runs. */
1331
+ readOnly: boolean;
1332
+ /**
1333
+ * Format: int64
1334
+ * @description How long the assistant should wait for this action. Omit for the default; longer values are capped.
1335
+ */
1336
+ timeoutMs?: number;
1337
+ /**
1338
+ * @description Only functions are supported.
1339
+ * @default function
1340
+ * @enum {string}
1341
+ */
1342
+ type?: "function";
1343
+ };
1344
+ /** @description The function object from the OpenAI tools format. */
1345
+ ClientFunctionRequest: {
1346
+ /** @description What the action does, written for the model. An action without one can only be guessed at from its name. The 1024 ceiling is OpenAI's own limit on `tools[].function.description`, not a number chosen here: over it the upstream call fails with `string_above_max_length`, and refusing at submission is the clearer of the two places to refuse. It was 500, which ran out at about six enumerated entries — an action that must list what it accepts had nowhere to put the list. */
1347
+ description: string;
1348
+ /** @description The MCP and Anthropic spelling of `parameters`. Give one or the other, not both. */
1349
+ inputSchema?: {
1350
+ [key: string]: unknown;
1351
+ } | null;
1352
+ name: string;
1353
+ /** @description JSON Schema for the arguments. Omit for an action that takes none. */
1354
+ parameters?: {
1355
+ [key: string]: unknown;
1356
+ } | null;
1357
+ };
1358
+ DynamicCallResultRequestBody: {
1359
+ /** @description The same value sent with the message. A result from a different client is refused. */
1360
+ clientId: string;
1361
+ /** @description Why it failed, when `ok` is false. It reaches the assistant, so write it for a reader who cannot see the screen. */
1362
+ error?: string;
1363
+ /** @description Pass back when there is more to read. The assistant will call again with it. */
1364
+ nextCursor?: string;
1365
+ ok: boolean;
1366
+ /** @description What the action produced. At most 64 KiB; use `nextCursor` for anything larger. */
1367
+ output?: string;
1368
+ };
1369
+ TodoResource: {
1370
+ /** @description The same step phrased as happening now — "Installing nginx". Show this one while the item is in progress. */
1371
+ activeForm: string;
1372
+ /** @description The step as an instruction — "Install nginx". */
1373
+ content: string;
1374
+ /**
1375
+ * @description Where this step stands. At most one item is in_progress at any time.
1376
+ * @enum {string}
1377
+ */
1378
+ status: "pending" | "in_progress" | "completed";
875
1379
  };
876
1380
  TurnIDResponseBody: {
1381
+ /** @description True when the assistant was already busy and this message was put in line instead of starting a turn. It is read at the next step of the turn already running, so there is nothing further to do — and turnId is empty in this case. */
1382
+ queued: boolean;
1383
+ /**
1384
+ * Format: int64
1385
+ * @description How many messages were already waiting ahead of this one. Only meaningful when queued is true.
1386
+ */
1387
+ queuedAhead?: number;
1388
+ /** @description The turn this message started. Empty when the message was queued instead. */
877
1389
  turnId: string;
878
1390
  };
879
1391
  AnswerRequestBody: {
880
- /** @description 问题 id 到所选答案的映射 */
1392
+ /** @description A map from question id to the answer chosen */
881
1393
  answers: {
882
1394
  [key: string]: string;
883
1395
  };
@@ -885,7 +1397,7 @@ export interface components {
885
1397
  RevertRequestBody: {
886
1398
  /**
887
1399
  * Format: int64
888
- * @description 起始序号,该条及其之后的全部条目都会被撤回
1400
+ * @description The starting ordinal; that entry and everything after it is reverted
889
1401
  */
890
1402
  ordinal: number;
891
1403
  };
@@ -893,6 +1405,28 @@ export interface components {
893
1405
  /** Format: int64 */
894
1406
  reverted: number;
895
1407
  };
1408
+ FolderResource: {
1409
+ /** Format: date-time */
1410
+ createdAt: string;
1411
+ id: string;
1412
+ name: string;
1413
+ /**
1414
+ * Format: int64
1415
+ * @description How many conversations are filed here and would show up in the default list. Archived and deleted ones are not counted, so this is exactly what `GET /api/v1/threads?folder=<id>` returns.
1416
+ */
1417
+ threadCount: number;
1418
+ /** Format: date-time */
1419
+ updatedAt: string;
1420
+ };
1421
+ FolderListResponseBody: {
1422
+ folders: components["schemas"]["FolderResource"][] | null;
1423
+ };
1424
+ CreateFolderRequestBody: {
1425
+ name: string;
1426
+ };
1427
+ UpdateFolderRequestBody: {
1428
+ name: string;
1429
+ };
896
1430
  };
897
1431
  responses: never;
898
1432
  parameters: never;
@@ -904,14 +1438,17 @@ export type $defs = Record<string, never>;
904
1438
  export interface operations {
905
1439
  "upload-attachment": {
906
1440
  parameters: {
907
- query?: never;
1441
+ query?: {
1442
+ /** @description The name to show and to give the assistant. Images do not need one; anything else does, because the name is most of what says what the file is. Falls back to a generated name. */
1443
+ filename?: string;
1444
+ };
908
1445
  header?: never;
909
1446
  path?: never;
910
1447
  cookie?: never;
911
1448
  };
912
1449
  requestBody: {
913
1450
  content: {
914
- "application/octet-stream": string;
1451
+ "*/*": string;
915
1452
  };
916
1453
  };
917
1454
  responses: {
@@ -949,12 +1486,14 @@ export interface operations {
949
1486
  /** @description OK */
950
1487
  200: {
951
1488
  headers: {
952
- /** @description 私有而且长缓存:这些字节按 id 寻址而 id 永不复用,所以它们永远不会变;而它们属于一个人,所以不能进任何共享缓存。 */
1489
+ /** @description Private and long-lived: these bytes are addressed by an id that is never reused, so they never change; and they belong to one person, so they must not enter any shared cache. */
953
1490
  "Cache-Control"?: string;
1491
+ /** @description Present on everything that is not an image, carrying the original filename. Absent on images, which are meant to be rendered in place. */
1492
+ "Content-Disposition"?: string;
954
1493
  [name: string]: unknown;
955
1494
  };
956
1495
  content: {
957
- "image/*": string;
1496
+ "*/*": string;
958
1497
  };
959
1498
  };
960
1499
  /** @description Error */
@@ -971,13 +1510,13 @@ export interface operations {
971
1510
  "list-bindings": {
972
1511
  parameters: {
973
1512
  query?: {
974
- /** @description 这一页最多返回多少条 */
1513
+ /** @description How many entries this page returns at most */
975
1514
  limit?: number;
976
- /** @description 跳过多少条。要翻得更深请改用游标翻页的接口 */
1515
+ /** @description How many to skip. To page deeper, use the cursor-paged operation instead */
977
1516
  offset?: number;
978
1517
  platform?: string;
979
1518
  channelId?: string;
980
- /** @description 仅返回处于活跃状态的绑定 */
1519
+ /** @description Return only bindings that are active */
981
1520
  active?: boolean;
982
1521
  };
983
1522
  header?: never;
@@ -1069,12 +1608,12 @@ export interface operations {
1069
1608
  "list-channels": {
1070
1609
  parameters: {
1071
1610
  query?: {
1072
- /** @description 这一页最多返回多少条 */
1611
+ /** @description How many entries this page returns at most */
1073
1612
  limit?: number;
1074
- /** @description 跳过多少条。要翻得更深请改用游标翻页的接口 */
1613
+ /** @description How many to skip. To page deeper, use the cursor-paged operation instead */
1075
1614
  offset?: number;
1076
1615
  platform?: string;
1077
- /** @description 仅返回处于启用状态的通道 */
1616
+ /** @description Return only channels that are enabled */
1078
1617
  active?: boolean;
1079
1618
  };
1080
1619
  header?: never;
@@ -1333,9 +1872,9 @@ export interface operations {
1333
1872
  "check-sender": {
1334
1873
  parameters: {
1335
1874
  query: {
1336
- /** @description 平台上那个人的 id,和绑定、被拒记录里的是同一个值 */
1875
+ /** @description That person's id on the platform, the same value that appears in bindings and rejections */
1337
1876
  peerId: string;
1338
- /** @description 仅 Telegram 这类有用户名的平台填得出来,不带 @。留空即当作没有用户名 */
1877
+ /** @description Only platforms with usernames, such as Telegram, can supply this. Without the @. Leave it empty to mean there is no username */
1339
1878
  username?: string;
1340
1879
  };
1341
1880
  header?: never;
@@ -1492,22 +2031,400 @@ export interface operations {
1492
2031
  };
1493
2032
  };
1494
2033
  };
1495
- "list-models": {
2034
+ "submit-dynamic-call-result": {
1496
2035
  parameters: {
1497
2036
  query?: never;
1498
2037
  header?: never;
1499
- path?: never;
2038
+ path: {
2039
+ /** @description The id of the tool call entry in the conversation. */
2040
+ call: string;
2041
+ };
1500
2042
  cookie?: never;
1501
2043
  };
1502
- requestBody?: never;
1503
- responses: {
1504
- /** @description OK */
1505
- 200: {
2044
+ requestBody: {
2045
+ content: {
2046
+ "application/json": components["schemas"]["DynamicCallResultRequestBody"];
2047
+ };
2048
+ };
2049
+ responses: {
2050
+ /** @description No Content */
2051
+ 204: {
2052
+ headers: {
2053
+ [name: string]: unknown;
2054
+ };
2055
+ content?: never;
2056
+ };
2057
+ /** @description Error */
2058
+ default: {
2059
+ headers: {
2060
+ [name: string]: unknown;
2061
+ };
2062
+ content: {
2063
+ "application/json": components["schemas"]["Error"];
2064
+ };
2065
+ };
2066
+ };
2067
+ };
2068
+ "list-folders": {
2069
+ parameters: {
2070
+ query?: never;
2071
+ header?: never;
2072
+ path?: never;
2073
+ cookie?: never;
2074
+ };
2075
+ requestBody?: never;
2076
+ responses: {
2077
+ /** @description OK */
2078
+ 200: {
2079
+ headers: {
2080
+ [name: string]: unknown;
2081
+ };
2082
+ content: {
2083
+ "application/json": components["schemas"]["FolderListResponseBody"];
2084
+ };
2085
+ };
2086
+ /** @description Error */
2087
+ default: {
2088
+ headers: {
2089
+ [name: string]: unknown;
2090
+ };
2091
+ content: {
2092
+ "application/json": components["schemas"]["Error"];
2093
+ };
2094
+ };
2095
+ };
2096
+ };
2097
+ "create-folder": {
2098
+ parameters: {
2099
+ query?: never;
2100
+ header?: never;
2101
+ path?: never;
2102
+ cookie?: never;
2103
+ };
2104
+ requestBody: {
2105
+ content: {
2106
+ "application/json": components["schemas"]["CreateFolderRequestBody"];
2107
+ };
2108
+ };
2109
+ responses: {
2110
+ /** @description Created */
2111
+ 201: {
2112
+ headers: {
2113
+ [name: string]: unknown;
2114
+ };
2115
+ content: {
2116
+ "application/json": components["schemas"]["FolderResource"];
2117
+ };
2118
+ };
2119
+ /** @description Error */
2120
+ default: {
2121
+ headers: {
2122
+ [name: string]: unknown;
2123
+ };
2124
+ content: {
2125
+ "application/json": components["schemas"]["Error"];
2126
+ };
2127
+ };
2128
+ };
2129
+ };
2130
+ "get-folder": {
2131
+ parameters: {
2132
+ query?: never;
2133
+ header?: never;
2134
+ path: {
2135
+ folder: string;
2136
+ };
2137
+ cookie?: never;
2138
+ };
2139
+ requestBody?: never;
2140
+ responses: {
2141
+ /** @description OK */
2142
+ 200: {
2143
+ headers: {
2144
+ [name: string]: unknown;
2145
+ };
2146
+ content: {
2147
+ "application/json": components["schemas"]["FolderResource"];
2148
+ };
2149
+ };
2150
+ /** @description Error */
2151
+ default: {
2152
+ headers: {
2153
+ [name: string]: unknown;
2154
+ };
2155
+ content: {
2156
+ "application/json": components["schemas"]["Error"];
2157
+ };
2158
+ };
2159
+ };
2160
+ };
2161
+ "delete-folder": {
2162
+ parameters: {
2163
+ query?: never;
2164
+ header?: never;
2165
+ path: {
2166
+ folder: string;
2167
+ };
2168
+ cookie?: never;
2169
+ };
2170
+ requestBody?: never;
2171
+ responses: {
2172
+ /** @description No Content */
2173
+ 204: {
2174
+ headers: {
2175
+ [name: string]: unknown;
2176
+ };
2177
+ content?: never;
2178
+ };
2179
+ /** @description Error */
2180
+ default: {
2181
+ headers: {
2182
+ [name: string]: unknown;
2183
+ };
2184
+ content: {
2185
+ "application/json": components["schemas"]["Error"];
2186
+ };
2187
+ };
2188
+ };
2189
+ };
2190
+ "update-folder": {
2191
+ parameters: {
2192
+ query?: never;
2193
+ header?: never;
2194
+ path: {
2195
+ folder: string;
2196
+ };
2197
+ cookie?: never;
2198
+ };
2199
+ requestBody: {
2200
+ content: {
2201
+ "application/json": components["schemas"]["UpdateFolderRequestBody"];
2202
+ };
2203
+ };
2204
+ responses: {
2205
+ /** @description OK */
2206
+ 200: {
2207
+ headers: {
2208
+ [name: string]: unknown;
2209
+ };
2210
+ content: {
2211
+ "application/json": components["schemas"]["FolderResource"];
2212
+ };
2213
+ };
2214
+ /** @description Error */
2215
+ default: {
2216
+ headers: {
2217
+ [name: string]: unknown;
2218
+ };
2219
+ content: {
2220
+ "application/json": components["schemas"]["Error"];
2221
+ };
2222
+ };
2223
+ };
2224
+ };
2225
+ "list-memories": {
2226
+ parameters: {
2227
+ query?: never;
2228
+ header?: never;
2229
+ path?: never;
2230
+ cookie?: never;
2231
+ };
2232
+ requestBody?: never;
2233
+ responses: {
2234
+ /** @description OK */
2235
+ 200: {
2236
+ headers: {
2237
+ [name: string]: unknown;
2238
+ };
2239
+ content: {
2240
+ "application/json": components["schemas"]["MemoryListResponseBody"];
2241
+ };
2242
+ };
2243
+ /** @description Error */
2244
+ default: {
2245
+ headers: {
2246
+ [name: string]: unknown;
2247
+ };
2248
+ content: {
2249
+ "application/json": components["schemas"]["Error"];
2250
+ };
2251
+ };
2252
+ };
2253
+ };
2254
+ "delete-memory": {
2255
+ parameters: {
2256
+ query?: never;
2257
+ header?: never;
2258
+ path: {
2259
+ memory: string;
2260
+ };
2261
+ cookie?: never;
2262
+ };
2263
+ requestBody?: never;
2264
+ responses: {
2265
+ /** @description No Content */
2266
+ 204: {
2267
+ headers: {
2268
+ [name: string]: unknown;
2269
+ };
2270
+ content?: never;
2271
+ };
2272
+ /** @description Error */
2273
+ default: {
2274
+ headers: {
2275
+ [name: string]: unknown;
2276
+ };
2277
+ content: {
2278
+ "application/json": components["schemas"]["Error"];
2279
+ };
2280
+ };
2281
+ };
2282
+ };
2283
+ "list-skills": {
2284
+ parameters: {
2285
+ query?: never;
2286
+ header?: never;
2287
+ path?: never;
2288
+ cookie?: never;
2289
+ };
2290
+ requestBody?: never;
2291
+ responses: {
2292
+ /** @description OK */
2293
+ 200: {
2294
+ headers: {
2295
+ [name: string]: unknown;
2296
+ };
2297
+ content: {
2298
+ "application/json": components["schemas"]["SkillListResponseBody"];
2299
+ };
2300
+ };
2301
+ /** @description Error */
2302
+ default: {
1506
2303
  headers: {
1507
2304
  [name: string]: unknown;
1508
2305
  };
1509
2306
  content: {
1510
- "application/json": components["schemas"]["ModelListResponseBody"];
2307
+ "application/json": components["schemas"]["Error"];
2308
+ };
2309
+ };
2310
+ };
2311
+ };
2312
+ "put-skill": {
2313
+ parameters: {
2314
+ query?: never;
2315
+ header?: never;
2316
+ path?: never;
2317
+ cookie?: never;
2318
+ };
2319
+ requestBody: {
2320
+ content: {
2321
+ "application/json": components["schemas"]["SkillRequestBody"];
2322
+ };
2323
+ };
2324
+ responses: {
2325
+ /** @description OK */
2326
+ 200: {
2327
+ headers: {
2328
+ [name: string]: unknown;
2329
+ };
2330
+ content: {
2331
+ "application/json": components["schemas"]["SkillResource"];
2332
+ };
2333
+ };
2334
+ /** @description Error */
2335
+ default: {
2336
+ headers: {
2337
+ [name: string]: unknown;
2338
+ };
2339
+ content: {
2340
+ "application/json": components["schemas"]["Error"];
2341
+ };
2342
+ };
2343
+ };
2344
+ };
2345
+ "get-skill": {
2346
+ parameters: {
2347
+ query?: never;
2348
+ header?: never;
2349
+ path: {
2350
+ /** @description The skill's name, as `list-skills` returned it. */
2351
+ skill: string;
2352
+ };
2353
+ cookie?: never;
2354
+ };
2355
+ requestBody?: never;
2356
+ responses: {
2357
+ /** @description OK */
2358
+ 200: {
2359
+ headers: {
2360
+ [name: string]: unknown;
2361
+ };
2362
+ content: {
2363
+ "application/json": components["schemas"]["SkillResource"];
2364
+ };
2365
+ };
2366
+ /** @description Error */
2367
+ default: {
2368
+ headers: {
2369
+ [name: string]: unknown;
2370
+ };
2371
+ content: {
2372
+ "application/json": components["schemas"]["Error"];
2373
+ };
2374
+ };
2375
+ };
2376
+ };
2377
+ "delete-skill": {
2378
+ parameters: {
2379
+ query?: never;
2380
+ header?: never;
2381
+ path: {
2382
+ skill: string;
2383
+ };
2384
+ cookie?: never;
2385
+ };
2386
+ requestBody?: never;
2387
+ responses: {
2388
+ /** @description No Content */
2389
+ 204: {
2390
+ headers: {
2391
+ [name: string]: unknown;
2392
+ };
2393
+ content?: never;
2394
+ };
2395
+ /** @description Error */
2396
+ default: {
2397
+ headers: {
2398
+ [name: string]: unknown;
2399
+ };
2400
+ content: {
2401
+ "application/json": components["schemas"]["Error"];
2402
+ };
2403
+ };
2404
+ };
2405
+ };
2406
+ "set-skill-enabled": {
2407
+ parameters: {
2408
+ query?: never;
2409
+ header?: never;
2410
+ path: {
2411
+ skill: string;
2412
+ };
2413
+ cookie?: never;
2414
+ };
2415
+ requestBody: {
2416
+ content: {
2417
+ "application/json": components["schemas"]["SkillEnabledRequestBody"];
2418
+ };
2419
+ };
2420
+ responses: {
2421
+ /** @description OK */
2422
+ 200: {
2423
+ headers: {
2424
+ [name: string]: unknown;
2425
+ };
2426
+ content: {
2427
+ "application/json": components["schemas"]["SkillResource"];
1511
2428
  };
1512
2429
  };
1513
2430
  /** @description Error */
@@ -1524,10 +2441,20 @@ export interface operations {
1524
2441
  "list-threads": {
1525
2442
  parameters: {
1526
2443
  query?: {
1527
- /** @description 按标题搜索,大小写不敏感。留空则返回最近的对话 */
2444
+ /** @description Search titles, case-insensitively. Leave it empty for the most recent conversations */
1528
2445
  q?: string;
1529
- /** @description 为真时**只**返回已归档的对话,否则只返回未归档的 */
2446
+ /** @description When true, returns **only** archived conversations; otherwise only unarchived ones */
1530
2447
  archived?: boolean;
2448
+ /** @description Narrow the list to one folder. Omitting it returns conversations from every folder and from none; a folder id returns that folder's; the empty value (`?folder=`) returns the ones that are in no folder at all. Empty is not the same as omitted, and a sidebar needs both: "chats" is exactly the ungrouped set, and asking for everything would let filed conversations crowd it out of the limit. */
2449
+ folder?: string;
2450
+ /**
2451
+ * @description Where the previous page ended, from its `nextCursor`. Omit it for the first page.
2452
+ *
2453
+ * It is a position, not an offset, and that matters here: this list is ordered by recent activity, and the activity happens while it is being read. An offset would hand back a conversation twice when one moves up in between, and skip one when it moves down — silently, because a conversation that was skipped simply is not there.
2454
+ *
2455
+ * Pass the same `q`, `archived` and `folder` along with it. A cursor carries a position, not the question that produced it, so changing the filters mid-scroll walks a range nobody asked for.
2456
+ */
2457
+ cursor?: string;
1531
2458
  limit?: number;
1532
2459
  };
1533
2460
  header?: never;
@@ -1620,6 +2547,35 @@ export interface operations {
1620
2547
  };
1621
2548
  };
1622
2549
  };
2550
+ "delete-thread": {
2551
+ parameters: {
2552
+ query?: never;
2553
+ header?: never;
2554
+ path: {
2555
+ thread: string;
2556
+ };
2557
+ cookie?: never;
2558
+ };
2559
+ requestBody?: never;
2560
+ responses: {
2561
+ /** @description No Content */
2562
+ 204: {
2563
+ headers: {
2564
+ [name: string]: unknown;
2565
+ };
2566
+ content?: never;
2567
+ };
2568
+ /** @description Error */
2569
+ default: {
2570
+ headers: {
2571
+ [name: string]: unknown;
2572
+ };
2573
+ content: {
2574
+ "application/json": components["schemas"]["Error"];
2575
+ };
2576
+ };
2577
+ };
2578
+ };
1623
2579
  "update-thread": {
1624
2580
  parameters: {
1625
2581
  query?: never;
@@ -1692,7 +2648,7 @@ export interface operations {
1692
2648
  "list-earlier-items": {
1693
2649
  parameters: {
1694
2650
  query: {
1695
- /** @description 来自文档里的 earlier.before,取这个序号之前的条目 */
2651
+ /** @description From the document's earlier.before; returns entries before this ordinal */
1696
2652
  before: number;
1697
2653
  };
1698
2654
  header?: never;