@leaflow/sdk 0.0.0-dev.25.g6c5751f → 0.0.0-dev.252.gbe25f3b

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 (79) hide show
  1. package/README.md +22 -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 +71 -40
  10. package/dist/assistant/v1/index.js +4 -4
  11. package/dist/assistant/v1/schema.d.ts +1204 -139
  12. package/dist/billing/account/v1/client.d.ts +4 -0
  13. package/dist/billing/account/v1/client.js +7 -0
  14. package/dist/billing/account/v1/index.d.ts +169 -0
  15. package/dist/billing/account/v1/index.js +5 -0
  16. package/dist/billing/account/v1/schema.d.ts +4385 -0
  17. package/dist/billing/account/v1/schema.js +5 -0
  18. package/dist/billing/catalog/v1/client.d.ts +4 -0
  19. package/dist/billing/catalog/v1/client.js +7 -0
  20. package/dist/billing/catalog/v1/index.d.ts +33 -0
  21. package/dist/billing/catalog/v1/index.js +5 -0
  22. package/dist/billing/catalog/v1/schema.d.ts +915 -0
  23. package/dist/billing/catalog/v1/schema.js +5 -0
  24. package/dist/billing/index.d.ts +3 -0
  25. package/dist/billing/index.js +6 -0
  26. package/dist/billing/project/v1/client.d.ts +4 -0
  27. package/dist/billing/project/v1/client.js +7 -0
  28. package/dist/billing/project/v1/index.d.ts +59 -0
  29. package/dist/billing/project/v1/index.js +5 -0
  30. package/dist/billing/project/v1/schema.d.ts +1892 -0
  31. package/dist/billing/project/v1/schema.js +5 -0
  32. package/dist/canopy/v1/client.d.ts +4 -0
  33. package/dist/canopy/v1/client.js +7 -0
  34. package/dist/canopy/v1/index.d.ts +24 -23
  35. package/dist/canopy/v1/index.js +4 -4
  36. package/dist/canopy/v1/schema.d.ts +113 -109
  37. package/dist/compute/v1/client.d.ts +4 -0
  38. package/dist/compute/v1/client.js +7 -0
  39. package/dist/compute/v1/index.d.ts +207 -134
  40. package/dist/compute/v1/index.js +4 -4
  41. package/dist/compute/v1/schema.d.ts +1944 -553
  42. package/dist/dns/v1/client.d.ts +4 -0
  43. package/dist/dns/v1/client.js +7 -0
  44. package/dist/dns/v1/index.d.ts +43 -0
  45. package/dist/dns/v1/index.js +5 -0
  46. package/dist/dns/v1/schema.d.ts +887 -0
  47. package/dist/dns/v1/schema.js +5 -0
  48. package/dist/iam/v1/client.d.ts +4 -0
  49. package/dist/iam/v1/client.js +7 -0
  50. package/dist/iam/v1/index.d.ts +55 -32
  51. package/dist/iam/v1/index.js +4 -4
  52. package/dist/iam/v1/schema.d.ts +521 -88
  53. package/dist/index.d.ts +11 -7
  54. package/dist/index.js +19 -5
  55. package/dist/monitoring/v1/client.d.ts +4 -0
  56. package/dist/monitoring/v1/client.js +7 -0
  57. package/dist/monitoring/v1/index.d.ts +130 -49
  58. package/dist/monitoring/v1/index.js +4 -4
  59. package/dist/monitoring/v1/schema.d.ts +2420 -527
  60. package/dist/notification/v1/client.d.ts +4 -0
  61. package/dist/notification/v1/client.js +7 -0
  62. package/dist/notification/v1/index.d.ts +81 -0
  63. package/dist/notification/v1/index.js +5 -0
  64. package/dist/notification/v1/schema.d.ts +2048 -0
  65. package/dist/notification/v1/schema.js +5 -0
  66. package/dist/routes.d.ts +3234 -0
  67. package/dist/routes.js +3639 -0
  68. package/dist/support/v1/client.d.ts +4 -0
  69. package/dist/support/v1/client.js +7 -0
  70. package/dist/support/v1/index.d.ts +51 -0
  71. package/dist/support/v1/index.js +5 -0
  72. package/dist/support/v1/schema.d.ts +1082 -0
  73. package/dist/support/v1/schema.js +5 -0
  74. package/dist/tunnel/v1/client.d.ts +4 -0
  75. package/dist/tunnel/v1/client.js +7 -0
  76. package/dist/tunnel/v1/index.d.ts +8 -7
  77. package/dist/tunnel/v1/index.js +4 -4
  78. package/dist/tunnel/v1/schema.d.ts +40 -34
  79. package/package.json +34 -10
@@ -3,6 +3,30 @@
3
3
  * Do not make direct changes to the file.
4
4
  */
5
5
  export interface paths {
6
+ "/api/v1/models": {
7
+ parameters: {
8
+ query?: never;
9
+ header?: never;
10
+ path?: never;
11
+ cookie?: never;
12
+ };
13
+ /**
14
+ * List assistant model choices
15
+ * @description Returns Canopy's models filtered by Assistant's saved allowlist and selection policy. There is no separately maintained assistant catalogue. The complete list is not paginated and is ordered by displayName, then id.
16
+ *
17
+ * When allowModelSelection is true, models contains allowed Canopy models that remain callable, support tools and have positive context and output limits. When false, only the default is returned if it meets those conditions. defaultModelId is null if no usable default is known. Disallowed, retired and incompatible models are omitted, while saved preferences may still reference them.
18
+ *
19
+ * This operation reads capabilities without making an inference request. It does not check live provider health or the inference key's model restrictions. If Canopy cannot be read and no usable cached snapshot exists, it returns 503 with code MODEL_CATALOG_UNAVAILABLE; a failed read is not an empty catalogue. An empty allowlist returns an empty list without needing Canopy. Supplier connection details and credentials are not returned.
20
+ */
21
+ get: operations["list-models"];
22
+ put?: never;
23
+ post?: never;
24
+ delete?: never;
25
+ options?: never;
26
+ head?: never;
27
+ patch?: never;
28
+ trace?: never;
29
+ };
6
30
  "/api/v1/attachments": {
7
31
  parameters: {
8
32
  query?: never;
@@ -13,8 +37,12 @@ export interface paths {
13
37
  get?: never;
14
38
  put?: never;
15
39
  /**
16
- * 上传图片
17
- * @description 请求体直接是文件字节,不使用 multipart 封装,一次上传一个文件。类型由内容判定,与 Content-Type 无关。返回的 id 在发送消息时放进 attachmentIds;从未被任何消息引用的附件会被定期清除。
40
+ * Upload a file
41
+ * @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.
42
+ *
43
+ * 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.
44
+ *
45
+ * 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
46
  */
19
47
  post: operations["upload-attachment"];
20
48
  delete?: never;
@@ -31,8 +59,10 @@ export interface paths {
31
59
  cookie?: never;
32
60
  };
33
61
  /**
34
- * 取回图片
35
- * @description 按附件 id 取回原始字节,可直接作为 <img> 的地址使用。响应带长期缓存头,附件内容不会变化。附件不存在或不属于当前用户时返回 404。
62
+ * Download a file
63
+ * @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.
64
+ *
65
+ * 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
66
  */
37
67
  get: operations["download-attachment"];
38
68
  put?: never;
@@ -51,8 +81,8 @@ export interface paths {
51
81
  cookie?: never;
52
82
  };
53
83
  /**
54
- * 列出绑定
55
- * @description 接入面那张表按通道列出各自绑了谁时用 channelId 过滤。
84
+ * List bindings
85
+ * @description Filter by channelId to show, per channel, who is bound to it.
56
86
  */
57
87
  get: operations["list-bindings"];
58
88
  put?: never;
@@ -70,11 +100,11 @@ export interface paths {
70
100
  path?: never;
71
101
  cookie?: never;
72
102
  };
73
- /** 查看绑定 */
103
+ /** Get a binding */
74
104
  get: operations["get-binding"];
75
105
  put?: never;
76
106
  post?: never;
77
- /** 解除绑定 */
107
+ /** Remove a binding */
78
108
  delete: operations["delete-binding"];
79
109
  options?: never;
80
110
  head?: never;
@@ -88,12 +118,12 @@ export interface paths {
88
118
  path?: never;
89
119
  cookie?: never;
90
120
  };
91
- /** 列出通道 */
121
+ /** List channels */
92
122
  get: operations["list-channels"];
93
123
  put?: never;
94
124
  /**
95
- * 创建通道
96
- * @description 回调密钥归谁定由平台决定,见 list-platforms 的 secretSource:generated 的平台不要传 webhookSecret,我们生成的那把仅在本次响应中返回一次、之后无法再次取回,错过了只能调轮换接口换一把新的;supplied 的平台必须把平台后台那把传进来,此时响应里的webhookSecret 为 null。
125
+ * Create a channel
126
+ * @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
127
  */
98
128
  post: operations["create-channel"];
99
129
  delete?: never;
@@ -109,20 +139,20 @@ export interface paths {
109
139
  path?: never;
110
140
  cookie?: never;
111
141
  };
112
- /** 查看通道 */
142
+ /** Get a channel */
113
143
  get: operations["get-channel"];
114
144
  put?: never;
115
145
  post?: never;
116
146
  /**
117
- * 删除通道
118
- * @description 删除后该通道不再接收入站消息,其上的绑定一并失效。项目处于停服或清理状态时本接口仍然可用。
147
+ * Delete a channel
148
+ * @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
149
  */
120
150
  delete: operations["delete-channel"];
121
151
  options?: never;
122
152
  head?: never;
123
153
  /**
124
- * 修改通道
125
- * @description 只修改传了的字段。senderPolicy 与 allowFrom 是一对,由 senderPolicy 决定是否替换;改动对常驻连接要等连接重建后才生效,回调型平台立即生效。
154
+ * Update a channel
155
+ * @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
156
  */
127
157
  patch: operations["update-channel"];
128
158
  trace?: never;
@@ -137,8 +167,8 @@ export interface paths {
137
167
  get?: never;
138
168
  put?: never;
139
169
  /**
140
- * 签发绑定码
141
- * @description 生成一个一次性绑定码交给待绑定的人,他在该平台上用自己的账号把这个码发给助手即完成绑定。绑定只能由本人以这种方式建立,不能直接指定平台账号。绑定码有有效期,过期后需重新签发。
170
+ * Issue a binding code
171
+ * @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
172
  */
143
173
  post: operations["create-binding-code"];
144
174
  delete?: never;
@@ -155,8 +185,8 @@ export interface paths {
155
185
  cookie?: never;
156
186
  };
157
187
  /**
158
- * 查看最近被拒绝的入站消息
159
- * @description 排查「发了消息但助手没有响应」时使用。按时间倒序返回最近被这条通道拒绝的入站消息及其拒绝原因,最常见的原因是发送方尚未绑定。
188
+ * List recently rejected inbound messages
189
+ * @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
190
  */
161
191
  get: operations["list-channel-rejections"];
162
192
  put?: never;
@@ -177,8 +207,8 @@ export interface paths {
177
207
  get?: never;
178
208
  put?: never;
179
209
  /**
180
- * 轮换回调密钥
181
- * @description 换一把新的回调密钥,旧的立即失效,通道降回待平台确认状态。密钥归谁定由平台决定,见 list-platforms 的 secretSource:generated 的平台不要传请求体,新密钥仅在本次响应中返回、之后无法再次取回;supplied 的平台必须把平台后台那把新密钥传进来。
210
+ * Rotate the webhook secret
211
+ * @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
212
  */
183
213
  post: operations["rotate-channel-secret"];
184
214
  delete?: never;
@@ -195,8 +225,8 @@ export interface paths {
195
225
  cookie?: never;
196
226
  };
197
227
  /**
198
- * 推演一个发件人会不会被放行
199
- * @description 改完发件人策略之后用来自查,不发送任何消息、也不改变任何状态:它走的是和真实入站完全相同的那份判定,并说明结论由哪一条规则得出。无法推演绑定码那一条——是否是绑定码取决于对方发来的内容。
228
+ * Test whether a sender would be let through
229
+ * @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
230
  */
201
231
  get: operations["check-sender"];
202
232
  put?: never;
@@ -217,8 +247,8 @@ export interface paths {
217
247
  get?: never;
218
248
  put?: never;
219
249
  /**
220
- * 发起微信扫码登录
221
- * @description 微信个人号通道需要本人扫码登录后才能收发消息。本接口返回二维码,之后轮询 `GET /v1/weixin-logins/{login}` 获取进度;状态提示需要验证码时,调用 `POST /v1/weixin-logins/{login}/verify-code` 补交。
250
+ * Begin a WeChat QR login
251
+ * @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
252
  */
223
253
  post: operations["begin-weixin-login"];
224
254
  delete?: never;
@@ -235,8 +265,8 @@ export interface paths {
235
265
  cookie?: never;
236
266
  };
237
267
  /**
238
- * 列出可接入的平台
239
- * @description 返回本平台当前支持接入的即时通讯平台,以及各自建通道时要走的流程和要填的凭据字段。新建通道表单完全由这份响应驱动:setupMethod 决定展示录入表单还是扫码流程,credentialFields 是要填的字段,secretSource 决定要不要有回调密钥那一栏。
268
+ * List platforms that can be connected
269
+ * @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
270
  */
241
271
  get: operations["list-platforms"];
242
272
  put?: never;
@@ -255,8 +285,8 @@ export interface paths {
255
285
  cookie?: never;
256
286
  };
257
287
  /**
258
- * 查询扫码登录状态
259
- * @description 轮询本接口直到状态变为成功或失败。状态提示需要验证码时,调用补交验证码接口。
288
+ * Get the state of a QR login
289
+ * @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
290
  */
261
291
  get: operations["get-weixin-login"];
262
292
  put?: never;
@@ -277,8 +307,8 @@ export interface paths {
277
307
  get?: never;
278
308
  put?: never;
279
309
  /**
280
- * 补交登录验证码
281
- * @description 微信在扫码后要求短信或设备验证码时使用。验证码由登录发起人在自己手机上获取。
310
+ * Submit a login verification code
311
+ * @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
312
  */
283
313
  post: operations["submit-weixin-verify-code"];
284
314
  delete?: never;
@@ -287,26 +317,191 @@ export interface paths {
287
317
  patch?: never;
288
318
  trace?: never;
289
319
  };
290
- "/api/v1/models": {
320
+ "/api/v1/dynamic-calls/{call}/result": {
291
321
  parameters: {
292
322
  query?: never;
293
323
  header?: never;
294
324
  path?: never;
295
325
  cookie?: never;
296
326
  };
327
+ get?: never;
328
+ put?: never;
297
329
  /**
298
- * 列出可用模型
299
- * @description 返回本平台当前提供的模型及其上下文窗口、推理档位和支持的输入类型。用于填充对话设置里的模型选择。
330
+ * Report what an action produced
331
+ * @description The assistant asks the client to run an action by adding a tool call to the conversation
332
+ * with the namespace `dynamic`; the client acts when that entry turns in_progress and reports
333
+ * back here.
334
+ *
335
+ * The first result is the one that counts. A later one is refused rather than replacing it.
300
336
  */
301
- get: operations["list-models"];
337
+ post: operations["submit-dynamic-call-result"];
338
+ delete?: never;
339
+ options?: never;
340
+ head?: never;
341
+ patch?: never;
342
+ trace?: never;
343
+ };
344
+ "/api/v1/folders": {
345
+ parameters: {
346
+ query?: never;
347
+ header?: never;
348
+ path?: never;
349
+ cookie?: never;
350
+ };
351
+ /**
352
+ * List folders
353
+ * @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.
354
+ */
355
+ get: operations["list-folders"];
356
+ put?: never;
357
+ /**
358
+ * Create a folder
359
+ * @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.
360
+ *
361
+ * 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.
362
+ */
363
+ post: operations["create-folder"];
364
+ delete?: never;
365
+ options?: never;
366
+ head?: never;
367
+ patch?: never;
368
+ trace?: never;
369
+ };
370
+ "/api/v1/folders/{folder}": {
371
+ parameters: {
372
+ query?: never;
373
+ header?: never;
374
+ path?: never;
375
+ cookie?: never;
376
+ };
377
+ /**
378
+ * Fetch one folder
379
+ * @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>`.
380
+ */
381
+ get: operations["get-folder"];
382
+ put?: never;
383
+ post?: never;
384
+ /**
385
+ * Delete a folder
386
+ * @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.
387
+ *
388
+ * Idempotent: deleting a folder that is already gone succeeds and changes nothing.
389
+ */
390
+ delete: operations["delete-folder"];
391
+ options?: never;
392
+ head?: never;
393
+ /**
394
+ * Rename a folder
395
+ * @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.
396
+ */
397
+ patch: operations["update-folder"];
398
+ trace?: never;
399
+ };
400
+ "/api/v1/memories": {
401
+ parameters: {
402
+ query?: never;
403
+ header?: never;
404
+ path?: never;
405
+ cookie?: never;
406
+ };
407
+ /**
408
+ * List what the assistant remembers
409
+ * @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.
410
+ */
411
+ get: operations["list-memories"];
412
+ put?: never;
413
+ post?: never;
414
+ delete?: never;
415
+ options?: never;
416
+ head?: never;
417
+ patch?: never;
418
+ trace?: never;
419
+ };
420
+ "/api/v1/memories/{memory}": {
421
+ parameters: {
422
+ query?: never;
423
+ header?: never;
424
+ path?: never;
425
+ cookie?: never;
426
+ };
427
+ get?: never;
302
428
  put?: never;
303
429
  post?: never;
430
+ /**
431
+ * Delete one memory
432
+ * @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.
433
+ */
434
+ delete: operations["delete-memory"];
435
+ options?: never;
436
+ head?: never;
437
+ patch?: never;
438
+ trace?: never;
439
+ };
440
+ "/api/v1/skills": {
441
+ parameters: {
442
+ query?: never;
443
+ header?: never;
444
+ path?: never;
445
+ cookie?: never;
446
+ };
447
+ /**
448
+ * List the skills this project can use
449
+ * @description Everything the assistant can reach in this project, including the ones that are turned off —
450
+ * an entry that disappeared once it was switched off could not be switched back on.
451
+ *
452
+ * `origin` says whether a skill can be edited here. Skills belonging to the project are
453
+ * visible to everyone in it, whoever wrote them.
454
+ */
455
+ get: operations["list-skills"];
456
+ put?: never;
457
+ /**
458
+ * Write a skill for this project
459
+ * @description Creates it, or replaces the project's skill of that name. The whole package goes in each
460
+ * time: files left out of a write are removed, so the stored skill is what was sent and not
461
+ * what accumulated.
462
+ *
463
+ * A project skill takes precedence over a built-in one of the same name for this project only.
464
+ * The built-in is untouched and reappears if the project's is deleted.
465
+ */
466
+ post: operations["put-skill"];
304
467
  delete?: never;
305
468
  options?: never;
306
469
  head?: never;
307
470
  patch?: never;
308
471
  trace?: never;
309
472
  };
473
+ "/api/v1/skills/{skill}": {
474
+ parameters: {
475
+ query?: never;
476
+ header?: never;
477
+ path?: never;
478
+ cookie?: never;
479
+ };
480
+ /**
481
+ * Read one skill, with its files
482
+ * @description Works for built-in skills too; they simply cannot be written.
483
+ */
484
+ get: operations["get-skill"];
485
+ put?: never;
486
+ post?: never;
487
+ /**
488
+ * Delete this project's skill
489
+ * @description A built-in skill of the same name, if there was one, becomes visible again.
490
+ */
491
+ delete: operations["delete-skill"];
492
+ options?: never;
493
+ head?: never;
494
+ /**
495
+ * Turn a skill on or off
496
+ * @description Separate from writing it, because this is the frequent one: a skill that is off costs
497
+ * nothing and stays where it is.
498
+ *
499
+ * Only skills belonging to the project can be switched. To keep a built-in one out of the
500
+ * way, write a project skill of the same name and turn that off.
501
+ */
502
+ patch: operations["set-skill-enabled"];
503
+ trace?: never;
504
+ };
310
505
  "/api/v1/threads": {
311
506
  parameters: {
312
507
  query?: never;
@@ -315,12 +510,17 @@ export interface paths {
315
510
  cookie?: never;
316
511
  };
317
512
  /**
318
- * 列出对话
319
- * @description 按最近活动排序,只返回当前账号在当前项目里的对话。archived 是一个二选一的开关而不是「包含归档」:归档的对话不出现在默认列表里,要看它们就把这个参数打开。
513
+ * List conversations
514
+ * @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
515
  */
321
516
  get: operations["list-threads"];
322
517
  put?: never;
323
- /** 创建对话 */
518
+ /**
519
+ * Create a conversation
520
+ * @description Omit preferredModelId or set it to null to follow the platform default. A non-null preference is accepted only while model selection is enabled; otherwise the request fails with 403 and code MODEL_SELECTION_DISABLED.
521
+ *
522
+ * A well-formed preference for a Canopy model that is no longer allowed or has been retired or removed is retained and uses the default when a turn starts. This also handles a catalogue change between displaying the selector and submitting the choice. Creating a conversation does not contact a model provider and remains possible when generation is unavailable.
523
+ */
324
524
  post: operations["create-thread"];
325
525
  delete?: never;
326
526
  options?: never;
@@ -336,18 +536,36 @@ export interface paths {
336
536
  cookie?: never;
337
537
  };
338
538
  /**
339
- * 取回对话文档
340
- * @description 对话的完整当前状态,用于首屏渲染。文档中的 stream 给出实时输出地址和入场票据,流推送的是对这份文档的增量编辑,可直接套用同一套渲染逻辑。
539
+ * Fetch the conversation document
540
+ * @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
541
  */
342
542
  get: operations["get-thread"];
343
543
  put?: never;
344
544
  post?: never;
345
- delete?: never;
545
+ /**
546
+ * Delete a conversation
547
+ * @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.
548
+ *
549
+ * 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.
550
+ *
551
+ * 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.
552
+ *
553
+ * Fails while a turn is running: stop it first. Deleting an already deleted conversation succeeds and changes nothing.
554
+ */
555
+ delete: operations["delete-thread"];
346
556
  options?: never;
347
557
  head?: never;
348
558
  /**
349
- * 修改对话设置
350
- * @description 可修改模型、推理档位、审批模式和归档状态。改动从下一次 turn 起生效,正在执行的 turn 沿用它启动时的设置。reasoningEffort 仅在同时提供 model 时生效。
559
+ * Update conversation settings
560
+ * @description Changes the title, folder, approval mode, model preference, and whether the conversation is archived. Approval and model preference changes take effect from the next turn; a turn already running keeps the settings it started with.
561
+ *
562
+ * Omit preferredModelId to leave the preference unchanged, or set it to null to follow the platform default. A non-null preference is accepted only while model selection is enabled; otherwise the whole request fails with 403 and code MODEL_SELECTION_DISABLED and none of its fields are changed. Clearing a preference remains allowed while selection is disabled. A well-formed preference for a disallowed, retired or removed Canopy model is retained and falls back to the default when used.
563
+ *
564
+ * Model switching is allowed on an existing conversation, including while a turn is generating or waiting for approval or an answer. The response immediately returns the saved preferredModelId, while model continues to identify the running turn's effective model until it finishes. Messages queued into that running turn also keep its captured model choices. The next turn uses the latest saved preference.
565
+ *
566
+ * Changing the preference does not create a new conversation, start a turn, call a model provider, clear the transcript, or rewrite historical model attribution. Before the next turn sends its first request to the selected model, the service checks that model's input capabilities and usable context budget. A switch to a smaller window may require compaction under the compaction policy above; saving the preference alone does not establish that the conversation fits.
567
+ *
568
+ * 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
569
  */
352
570
  patch: operations["update-thread"];
353
571
  trace?: never;
@@ -362,8 +580,8 @@ export interface paths {
362
580
  get?: never;
363
581
  put?: never;
364
582
  /**
365
- * 批准或拒绝一批工具调用
366
- * @description 批次 id 来自对话文档的 wait 字段。本接口是幂等的:重复提交同一批次不会改变已经生效的决定,也不会报错。批次不属于该对话时返回 404。
583
+ * Approve or decline a batch of tool calls
584
+ * @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
585
  */
368
586
  post: operations["decide-approval"];
369
587
  delete?: never;
@@ -380,8 +598,8 @@ export interface paths {
380
598
  cookie?: never;
381
599
  };
382
600
  /**
383
- * 取回更早的对话内容
384
- * @description 首屏只给对话最新的那一段,再往上的内容用本接口按需取回,一次一段。before 用文档里的 earlier.before,响应里的 earlier 是再往上那一段的游标,为 null 表示已经到顶。返回的条目和文档里的 items 是同一种形状,顺序也一样(由旧到新),直接接在现有内容前面即可。
601
+ * Fetch earlier parts of a conversation
602
+ * @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
603
  */
386
604
  get: operations["list-earlier-items"];
387
605
  put?: never;
@@ -402,8 +620,8 @@ export interface paths {
402
620
  get?: never;
403
621
  put?: never;
404
622
  /**
405
- * 中断正在执行的 turn
406
- * @description 对没有正在执行的 turn 的对话调用同样返回 204,不视为错误——用户点击停止与 turn 自然结束之间存在竞争,两种结果一致。项目处于停服或清理状态时本接口仍然可用。
623
+ * Interrupt a running turn
624
+ * @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
625
  */
408
626
  post: operations["interrupt-thread"];
409
627
  delete?: never;
@@ -422,8 +640,8 @@ export interface paths {
422
640
  get?: never;
423
641
  put?: never;
424
642
  /**
425
- * 发送消息并触发一次 turn
426
- * @description 立即返回 turnId,不等待执行完成——一次 turn 可能持续数十分钟。执行进度通过对话文档中 stream 指向的实时流获取,不在本响应里。
643
+ * Send a message and start a turn
644
+ * @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
645
  */
428
646
  post: operations["send-message"];
429
647
  delete?: never;
@@ -442,8 +660,8 @@ export interface paths {
442
660
  get?: never;
443
661
  put?: never;
444
662
  /**
445
- * 回答助手提出的问题
446
- * @description 问题 id 来自对话文档的 wait 字段。已被回答过的问题同样返回 204——可能是另一个页面提交在先,也可能是自动应答窗口已到期,两种情况下 turn 都已带着答案继续执行。
663
+ * Answer the assistant's questions
664
+ * @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
665
  */
448
666
  post: operations["answer-question"];
449
667
  delete?: never;
@@ -461,7 +679,7 @@ export interface paths {
461
679
  };
462
680
  get?: never;
463
681
  put?: never;
464
- /** 标记对话已读 */
682
+ /** Mark a conversation as read */
465
683
  post: operations["mark-thread-read"];
466
684
  delete?: never;
467
685
  options?: never;
@@ -479,8 +697,8 @@ export interface paths {
479
697
  get?: never;
480
698
  put?: never;
481
699
  /**
482
- * 从指定位置起撤回
483
- * @description 撤回 ordinal 及其之后的全部条目。被撤回的条目仍留在逐字稿中并标记 reverted,序号不会重排。返回实际撤回的条目数。
700
+ * Revert from a given point
701
+ * @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
702
  */
485
703
  post: operations["revert-thread"];
486
704
  delete?: never;
@@ -493,9 +711,46 @@ export interface paths {
493
711
  export type webhooks = Record<string, never>;
494
712
  export interface components {
495
713
  schemas: {
714
+ /** @description A read-only view of a Canopy model. No model definition is created or edited through Assistant. */
715
+ ModelResource: {
716
+ /** @description Canopy model id, used unchanged in settings, conversation preferences and inference. There is no second assistant model id. */
717
+ id: string;
718
+ /** @description The display_name maintained in Canopy */
719
+ displayName: string;
720
+ /**
721
+ * Format: int64
722
+ * @description The context_length maintained in Canopy. The assistant reserves room for instructions, tools and an answer rather than using this entire window for history.
723
+ */
724
+ contextWindow: number;
725
+ /**
726
+ * Format: int64
727
+ * @description The max_output_tokens maintained in Canopy. Answer and summary budgets must respect this limit and the remaining context capacity.
728
+ */
729
+ maxOutputTokens: number;
730
+ /** @description Canopy supports_tools. Must be true before the model can be allowed for Assistant. */
731
+ supportsTools: boolean;
732
+ /** @description Canopy supports_reasoning. False requires reasoning_effort to be omitted. */
733
+ supportsReasoning: boolean;
734
+ /** @description Levels reported by Canopy reasoning_tiers. An empty list requires reasoning_effort to be omitted. List order does not imply reasoning strength. */
735
+ reasoningTiers: string[];
736
+ /** @description Contains text, and also image when Canopy reports supports_vision. Other attachments remain accessible through file tools. */
737
+ inputModalities: ("text" | "image")[];
738
+ };
739
+ ModelListResponseBody: {
740
+ /** @description Whether users can set a non-null model preference. When false, hide the selector and use the platform default for new turns. */
741
+ allowModelSelection: boolean;
742
+ /** @description The default Canopy model id, present in models when non-null. Null means no usable default is known from the current allowlist and capability snapshot; it does not report live provider health. */
743
+ defaultModelId: string | null;
744
+ /** @description Allowed, usable Canopy choices, or only the default when selection is disabled. Empty is an empty array, never null. */
745
+ models: components["schemas"]["ModelResource"][];
746
+ };
496
747
  Error: {
497
748
  code?: string;
498
749
  message: string;
750
+ /**
751
+ * @description What a given `code` carries alongside the message. The keys depend on the code,
752
+ * and a client that does not recognise one ignores it.
753
+ */
499
754
  meta?: {
500
755
  [key: string]: unknown;
501
756
  };
@@ -503,11 +758,39 @@ export interface components {
503
758
  status: number;
504
759
  };
505
760
  UploadedResource: {
506
- /** Format: int64 */
507
- height: number;
761
+ /**
762
+ * Format: int64
763
+ * @description Size of what was stored. For an image that has been resized, this is the resized size, not what was uploaded.
764
+ */
765
+ byteSize: number;
766
+ /**
767
+ * Format: date-time
768
+ * @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.
769
+ *
770
+ * 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.
771
+ */
772
+ draftExpiresAt: string;
773
+ filename: string;
774
+ /**
775
+ * Format: int64
776
+ * @description Null unless kind is image.
777
+ */
778
+ height: number | null;
508
779
  id: string;
509
- /** Format: int64 */
510
- width: number;
780
+ /**
781
+ * @description How the assistant will see this file.
782
+ *
783
+ * - `image` — read directly, and only by models that accept image input
784
+ * - `text` — placed inline in the message when small enough, otherwise read on demand
785
+ * - `binary` — never read directly; the assistant downloads it onto a cloud instance to work with it
786
+ * @enum {string}
787
+ */
788
+ kind: "image" | "text" | "binary";
789
+ /**
790
+ * Format: int64
791
+ * @description Null unless kind is image.
792
+ */
793
+ width: number | null;
511
794
  };
512
795
  BindingResource: {
513
796
  /** Format: uuid */
@@ -526,28 +809,28 @@ export interface components {
526
809
  verifiedAt: string | null;
527
810
  };
528
811
  LengthAwarePageBindingResource: {
529
- /** @description 这一页的内容 */
812
+ /** @description The entries on this page */
530
813
  items: components["schemas"]["BindingResource"][];
531
814
  /**
532
815
  * Format: int64
533
- * @description 这一页最多几条,回显请求里的值
816
+ * @description The page size, echoing what was requested
534
817
  */
535
818
  limit: number;
536
819
  /**
537
820
  * Format: int64
538
- * @description 跳过了多少条,回显请求里的值
821
+ * @description How many were skipped, echoing what was requested
539
822
  */
540
823
  offset: number;
541
824
  /**
542
825
  * Format: int64
543
- * @description 命中的总条数,不只是这一页
826
+ * @description How many match in total, not just on this page
544
827
  */
545
828
  total: number;
546
829
  };
547
830
  ChannelResource: {
548
831
  allowFrom: string[] | null;
549
832
  /**
550
- * @description 平台接入状态。只有 online 才收得到消息、也才签得出绑定码
833
+ * @description How far this channel is from working. Only `online` receives messages and can issue binding codes
551
834
  * @enum {string}
552
835
  */
553
836
  connState: "logged_out" | "qr_pending" | "online" | "expired";
@@ -558,7 +841,7 @@ export interface components {
558
841
  name: string;
559
842
  platform: string;
560
843
  /**
561
- * @description 常驻连接此刻的状态。回调型平台恒为 stopped
844
+ * @description The state of the long-lived connection right now. Always `stopped` for webhook platforms
562
845
  * @enum {string}
563
846
  */
564
847
  runtimeState: "stopped" | "running";
@@ -568,33 +851,33 @@ export interface components {
568
851
  status: "active" | "suspended" | "disabled";
569
852
  /** Format: date-time */
570
853
  updatedAt: string;
571
- /** @description 回调路径,网关配置和排查时用 */
854
+ /** @description The webhook path, for gateway configuration and for diagnosis */
572
855
  webhookPath: string;
573
- /** @description 填到平台后台的回调地址。部署未声明公网入口时为 null */
856
+ /** @description The webhook address to paste into that platform's console. Null when the deployment declares no public entry point */
574
857
  webhookUrl: string | null;
575
858
  };
576
859
  LengthAwarePageChannelResource: {
577
- /** @description 这一页的内容 */
860
+ /** @description The entries on this page */
578
861
  items: components["schemas"]["ChannelResource"][];
579
862
  /**
580
863
  * Format: int64
581
- * @description 这一页最多几条,回显请求里的值
864
+ * @description The page size, echoing what was requested
582
865
  */
583
866
  limit: number;
584
867
  /**
585
868
  * Format: int64
586
- * @description 跳过了多少条,回显请求里的值
869
+ * @description How many were skipped, echoing what was requested
587
870
  */
588
871
  offset: number;
589
872
  /**
590
873
  * Format: int64
591
- * @description 命中的总条数,不只是这一页
874
+ * @description How many match in total, not just on this page
592
875
  */
593
876
  total: number;
594
877
  };
595
878
  CreateChannelRequestBody: {
596
879
  allowFrom?: string[] | null;
597
- /** @description 平台侧凭据。只写不读,创建后无法取回 */
880
+ /** @description Credentials for that platform. Write-only: they cannot be read back after creation */
598
881
  credentials?: {
599
882
  [key: string]: string;
600
883
  };
@@ -602,13 +885,13 @@ export interface components {
602
885
  platform: string;
603
886
  /** @enum {string} */
604
887
  senderPolicy?: "bound_only" | "open";
605
- /** @description 平台生成密钥的平台(secretSource=supplied)必须传;我们生成的(generated)不能传,那把会在本次响应的 webhookSecret 里返回一次 */
888
+ /** @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
889
  webhookSecret?: string;
607
890
  };
608
891
  ChannelWithSecretResponseBody: {
609
892
  allowFrom: string[] | null;
610
893
  /**
611
- * @description 平台接入状态。只有 online 才收得到消息、也才签得出绑定码
894
+ * @description How far this channel is from working. Only `online` receives messages and can issue binding codes
612
895
  * @enum {string}
613
896
  */
614
897
  connState: "logged_out" | "qr_pending" | "online" | "expired";
@@ -619,7 +902,7 @@ export interface components {
619
902
  name: string;
620
903
  platform: string;
621
904
  /**
622
- * @description 常驻连接此刻的状态。回调型平台恒为 stopped
905
+ * @description The state of the long-lived connection right now. Always `stopped` for webhook platforms
623
906
  * @enum {string}
624
907
  */
625
908
  runtimeState: "stopped" | "running";
@@ -629,24 +912,24 @@ export interface components {
629
912
  status: "active" | "suspended" | "disabled";
630
913
  /** Format: date-time */
631
914
  updatedAt: string;
632
- /** @description 回调路径,网关配置和排查时用 */
915
+ /** @description The webhook path, for gateway configuration and for diagnosis */
633
916
  webhookPath: string;
634
- /** @description 我们生成的那把回调密钥,拿去粘到平台后台。**之后无法再次取回**,只能轮换出新的一把。密钥由平台生成(secretSource=supplied)或该平台不走回调时为 null */
917
+ /** @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
918
  webhookSecret: string | null;
636
- /** @description 填到平台后台的回调地址。部署未声明公网入口时为 null */
919
+ /** @description The webhook address to paste into that platform's console. Null when the deployment declares no public entry point */
637
920
  webhookUrl: string | null;
638
921
  };
639
922
  UpdateChannelRequestBody: {
640
- /** @description 放行名单。仅在同时传了 senderPolicy 时生效 */
923
+ /** @description The allow list. Only applied when senderPolicy is sent as well */
641
924
  allowFrom?: string[] | null;
642
- /** @description 整份替换而不是逐键合并。不传表示不动 */
925
+ /** @description Replaced wholesale rather than merged key by key. Absent means unchanged */
643
926
  credentials?: {
644
927
  [key: string]: string;
645
928
  };
646
929
  enabled?: boolean;
647
930
  name?: string;
648
931
  /**
649
- * @description 传了才会连同 allowFrom 一起替换
932
+ * @description Only when this is sent is allowFrom replaced along with it
650
933
  * @enum {string}
651
934
  */
652
935
  senderPolicy?: "bound_only" | "open";
@@ -656,6 +939,22 @@ export interface components {
656
939
  /** Format: date-time */
657
940
  expiresAt: string;
658
941
  };
942
+ PartResource: {
943
+ /** @description For `file` parts. Points at one of this entry's `attachments`. */
944
+ attachmentId?: string | null;
945
+ /**
946
+ * @description Addresses this part in the live stream — text arrives as `append` frames pointing at
947
+ * `/items/{item}/parts/{id}/text`.
948
+ *
949
+ * Not an array index. It looks like one today because parts are only ever appended, and a
950
+ * client that treats it as one keeps working right up until that stops being true.
951
+ */
952
+ id: string;
953
+ /** @description For `text` parts. Grows as the answer is written. */
954
+ text?: string | null;
955
+ /** @enum {string} */
956
+ type: "text" | "file";
957
+ };
659
958
  RejectionResource: {
660
959
  /** Format: date-time */
661
960
  at: string;
@@ -671,7 +970,7 @@ export interface components {
671
970
  rejections: components["schemas"]["RejectionResource"][] | null;
672
971
  };
673
972
  RotateSecretRequestBody: {
674
- /** @description 平台生成密钥的平台(secretSource=supplied)必须传新的那把;我们生成的(generated)不能传 */
973
+ /** @description Required for platforms that generate the secret themselves (secretSource=supplied). Must be absent for `generated` ones */
675
974
  webhookSecret?: string;
676
975
  };
677
976
  WebhookSecretResponseBody: {
@@ -688,14 +987,14 @@ export interface components {
688
987
  LoginResource: {
689
988
  /**
690
989
  * Format: date-time
691
- * @description 这条登录流的截止时间。到点之后不要再轮询,重新发起一次
990
+ * @description When this login flow expires. Past that, stop polling and start a new one
692
991
  */
693
992
  expiresAt: string;
694
993
  /** Format: uuid */
695
994
  id: string;
696
- /** @description 二维码的内容,由客户端编码成二维码图形渲染(不是图片地址,也不是 data URI)。码过期时这条流会自己换一张接着等,所以每次轮询拿到的可能是新的一串 */
995
+ /** @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
996
  qrcodeData: string;
698
- /** @description 失败原因。仅在 status 为 error 或 expired 时有内容 */
997
+ /** @description Why it failed. Present only when status is error or expired */
699
998
  reason: string;
700
999
  /** @enum {string} */
701
1000
  status: "wait" | "scanned" | "confirmed" | "expired" | "error" | "need_verify_code";
@@ -717,9 +1016,9 @@ export interface components {
717
1016
  setupChallenge: "none" | "webhook" | "scan";
718
1017
  /** @enum {string} */
719
1018
  setupMethod: "credentials" | "scan";
720
- /** @description 回调路径模板,{channel} 处替换为通道 id */
1019
+ /** @description The webhook path template; {channel} is replaced with the channel id */
721
1020
  webhookPath: string;
722
- /** @description 完整回调地址模板。部署未声明公网入口时为 null */
1021
+ /** @description The full webhook address template. Null when the deployment declares no public entry point */
723
1022
  webhookUrlTemplate: string | null;
724
1023
  };
725
1024
  PlatformListResponseBody: {
@@ -728,15 +1027,60 @@ export interface components {
728
1027
  VerifyCodeRequestBody: {
729
1028
  code: string;
730
1029
  };
731
- ModelResource: {
732
- /** Format: int64 */
733
- contextWindow: number;
734
- inputModalities: string[] | null;
735
- key: string;
736
- reasoningTiers: string[] | null;
1030
+ SkillResource: {
1031
+ /**
1032
+ * @description True when the assistant wrote this skill during a conversation rather than a person
1033
+ * writing it here.
1034
+ *
1035
+ * Which conversation is deliberately not returned: skills are shared across the project
1036
+ * while conversations belong to one person, so naming one would tell everybody in the
1037
+ * project that a particular colleague had it.
1038
+ */
1039
+ authoredByAssistant: boolean;
1040
+ /** @description Why the assistant would open this skill. It sits in every request, so it is the one field worth writing carefully. */
1041
+ description: string;
1042
+ enabled: boolean;
1043
+ /** @description Path to contents, `SKILL.md` among them. Only returned by `get-skill`; the list leaves it out. */
1044
+ files?: {
1045
+ [key: string]: string;
1046
+ } | null;
1047
+ name: string;
1048
+ /**
1049
+ * @description `builtin` — provided by the platform and read-only here.
1050
+ * `project` — written for this project and editable by anyone in it.
1051
+ * @enum {string}
1052
+ */
1053
+ origin: "builtin" | "project";
1054
+ shortDescription: string | null;
1055
+ /**
1056
+ * Format: date-time
1057
+ * @description Null for built-in skills, which have no edit history here.
1058
+ */
1059
+ updatedAt: string | null;
737
1060
  };
738
- ModelListResponseBody: {
739
- models: components["schemas"]["ModelResource"][] | null;
1061
+ SkillListResponseBody: {
1062
+ skills: components["schemas"]["SkillResource"][];
1063
+ };
1064
+ SkillRequestBody: {
1065
+ /** @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". */
1066
+ description: string;
1067
+ /** @default true */
1068
+ enabled?: boolean;
1069
+ /**
1070
+ * @description Path to contents. `SKILL.md` is required; anything else it references goes alongside it.
1071
+ *
1072
+ * Paths are relative to the skill and cannot leave it. At most 32 files, 256 KiB each and
1073
+ * 1 MiB in total.
1074
+ */
1075
+ files: {
1076
+ [key: string]: string;
1077
+ };
1078
+ /** @description Also how the assistant refers to it, so renaming is deleting and writing again. */
1079
+ name: string;
1080
+ shortDescription?: string;
1081
+ };
1082
+ SkillEnabledRequestBody: {
1083
+ enabled: boolean;
740
1084
  };
741
1085
  ThreadSummaryResource: {
742
1086
  /** @enum {string} */
@@ -744,27 +1088,45 @@ export interface components {
744
1088
  archived: boolean;
745
1089
  /** Format: date-time */
746
1090
  createdAt: string;
1091
+ /** @description The folder this conversation is filed under, or null when it is in none */
1092
+ folderId: string | null;
747
1093
  id: string;
748
- model: string;
1094
+ /** @description The actual Canopy model id for the running turn, or the first candidate for the next turn when idle. Null when no model can be selected. This can differ from preferredModelId after fallback or while selection is disabled. */
1095
+ model: string | null;
1096
+ /** @description The saved preferred Canopy model id, independent of the model actually used. Null follows the platform default. Kept when selection is disabled, the model is removed, or a request falls back. */
1097
+ preferredModelId: string | null;
749
1098
  title: string | null;
750
1099
  unread: boolean;
751
1100
  /** Format: date-time */
752
1101
  updatedAt: string;
753
1102
  };
754
1103
  ThreadListResponseBody: {
1104
+ /** @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. */
1105
+ nextCursor: string | null;
755
1106
  threads: components["schemas"]["ThreadSummaryResource"][] | null;
756
1107
  };
757
1108
  CreateThreadRequestBody: {
758
1109
  /**
759
- * @description 不传则使用平台默认审批模式
1110
+ * @description Absent uses the platform's default approval mode
760
1111
  * @enum {string}
761
1112
  */
762
1113
  approvalMode?: "guardian" | "manual" | "yolo";
1114
+ /** @description A Canopy model id to prefer. Omit or pass null to follow the platform default. Non-null requires allowModelSelection; a disallowed, retired or removed id falls back to the default without clearing the preference. */
1115
+ preferredModelId?: string | null;
763
1116
  };
764
1117
  ContextResource: {
765
1118
  /** Format: int64 */
766
1119
  compactAt: number | null;
767
- model: string;
1120
+ /**
1121
+ * @description What kinds of input the model behind this conversation accepts, as modality names: text, image.
1122
+ *
1123
+ * 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.
1124
+ *
1125
+ * This describes the effective model, including a replacement chosen through fallback, rather than the saved preference. An empty list means no effective model is available to describe; it is not a claim that every model rejects files.
1126
+ */
1127
+ inputModalities: string[];
1128
+ /** @description The effective Canopy model id, matching the conversation summary's model. Null when no model can be selected; window and compactAt are then null and inputModalities is empty. */
1129
+ model: string | null;
768
1130
  /** Format: int64 */
769
1131
  used: number | null;
770
1132
  /** Format: int64 */
@@ -779,10 +1141,24 @@ export interface components {
779
1141
  };
780
1142
  AttachmentResource: {
781
1143
  /** Format: int64 */
782
- height: number;
1144
+ byteSize: number;
1145
+ filename: string;
1146
+ /**
1147
+ * Format: int64
1148
+ * @description Null unless kind is image. Width and height are here so a client can hold the space before the image itself has loaded.
1149
+ */
1150
+ height: number | null;
783
1151
  id: string;
784
- /** Format: int64 */
785
- width: number;
1152
+ /**
1153
+ * @description What this attachment is. A client renders an image in place and everything else as a file to download.
1154
+ * @enum {string}
1155
+ */
1156
+ kind: "image" | "text" | "binary";
1157
+ /**
1158
+ * Format: int64
1159
+ * @description Null unless kind is image.
1160
+ */
1161
+ width: number | null;
786
1162
  };
787
1163
  ItemResource: {
788
1164
  /** @enum {string|null} */
@@ -790,13 +1166,25 @@ export interface components {
790
1166
  approvalReason?: string | null;
791
1167
  arguments?: string;
792
1168
  attachments?: components["schemas"]["AttachmentResource"][] | null;
1169
+ /**
1170
+ * @description The context blocks the client attached to this message.
1171
+ *
1172
+ * **Not part of what the operator wrote** — `text` is. Render the message from `text` and
1173
+ * leave these out of the bubble; they are here so a client that did not send them, or one
1174
+ * that reloaded, can still read what the assistant was given.
1175
+ *
1176
+ * The actions declared alongside them are not returned: they are re-declared as they
1177
+ * change and would make every fetch of the conversation carry them again.
1178
+ */
1179
+ clientContext?: components["schemas"]["ClientContextPart"][] | null;
793
1180
  /** Format: date-time */
794
1181
  createdAt: string;
795
1182
  detail?: string | null;
1183
+ presentation?: components["schemas"]["PresentationResource"] | null;
796
1184
  /** Format: int64 */
797
1185
  durationMs?: number | null;
798
1186
  id: string;
799
- /** @description 产出这一条的模型。用户自己发的消息为 null */
1187
+ /** @description The Canopy model id that actually produced this entry, including after fallback. Never replaced by the conversation's preference or rewritten when the model is retired or removed from the allowlist. Null for messages the user sent. */
800
1188
  model: string | null;
801
1189
  namespace?: string | null;
802
1190
  /** Format: int64 */
@@ -805,14 +1193,69 @@ export interface components {
805
1193
  /** @enum {string} */
806
1194
  status: "pending" | "in_progress" | "completed" | "failed" | "declined" | "interrupted";
807
1195
  target?: string | null;
808
- text?: string;
1196
+ /**
1197
+ * @description The content of this entry, in the order it was written. A message that is only text is a
1198
+ * single part, which is most of them.
1199
+ *
1200
+ * An attachment belongs where it was written, so render these in order rather than putting
1201
+ * them all at the end.
1202
+ */
1203
+ parts?: components["schemas"]["PartResource"][] | null;
809
1204
  tool?: string | null;
810
1205
  /**
811
- * @description 决定这一条包含哪些字段
1206
+ * @description Determines which fields this entry carries
812
1207
  * @enum {string}
813
1208
  */
814
1209
  type: "user_message" | "agent_message" | "reasoning" | "dynamic_tool_call" | "context_compaction" | "token_budget_reminder" | "turn_failure";
815
1210
  };
1211
+ /**
1212
+ * @description Structured detail produced by a tool call, in addition to the single-line `detail`. Null
1213
+ * when the call produced none.
1214
+ *
1215
+ * `kind` determines which of the remaining fields is populated.
1216
+ */
1217
+ PresentationResource: {
1218
+ fileDiff?: components["schemas"]["FileDiffResource"] | null;
1219
+ /**
1220
+ * @description Determines which of the remaining fields is populated
1221
+ * @enum {string}
1222
+ */
1223
+ kind: "file_diff";
1224
+ };
1225
+ /**
1226
+ * @description The change a tool call applied to a single file.
1227
+ *
1228
+ * Populated once the call has completed successfully. It is absent while the call is pending
1229
+ * or awaiting approval, as the file's prior contents are read during execution. To preview an
1230
+ * edit awaiting approval, derive it from the call's `old_string` and `new_string` arguments.
1231
+ */
1232
+ FileDiffResource: {
1233
+ /**
1234
+ * Format: int64
1235
+ * @description Lines added. Complete even when `unified` is null
1236
+ */
1237
+ added: number;
1238
+ /** @description Absolute path of the file on the instance */
1239
+ path: string;
1240
+ /**
1241
+ * Format: int64
1242
+ * @description Lines removed. Complete even when `unified` is null
1243
+ */
1244
+ removed: number;
1245
+ /**
1246
+ * @description What the call did to the file
1247
+ * @enum {string}
1248
+ */
1249
+ status: "added" | "modified" | "deleted";
1250
+ /**
1251
+ * @description The change as a unified diff with three lines of context. A file created by the call is
1252
+ * diffed against `/dev/null`.
1253
+ *
1254
+ * Null when the change exceeds the service's size limit. The diff is omitted in full
1255
+ * rather than truncated; `added` and `removed` remain complete.
1256
+ */
1257
+ unified?: string | null;
1258
+ };
816
1259
  StreamResource: {
817
1260
  path: string;
818
1261
  ticket: string;
@@ -850,6 +1293,8 @@ export interface components {
850
1293
  status: string;
851
1294
  stream: components["schemas"]["StreamResource"] | null;
852
1295
  turn: components["schemas"]["TurnResource"] | null;
1296
+ /** @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. */
1297
+ todos?: components["schemas"]["TodoResource"][];
853
1298
  turnId: string | null;
854
1299
  wait: components["schemas"]["WaitResource"] | null;
855
1300
  };
@@ -857,8 +1302,26 @@ export interface components {
857
1302
  /** @enum {string} */
858
1303
  approvalMode?: "guardian" | "manual" | "yolo";
859
1304
  archived?: boolean;
860
- model?: string;
861
- reasoningEffort?: string;
1305
+ /**
1306
+ * @description Switch this existing conversation's model. Omit to keep the preference; null clears it and follows the platform default; a string sets it for the next turn. The transcript is preserved and saving the preference does not start a turn.
1307
+ *
1308
+ * Non-null requires allowModelSelection. A disallowed, retired or removed Canopy id is retained and uses the default when needed. The preference can be changed while a turn is running or waiting, but that turn and messages queued into it keep their captured model choices.
1309
+ */
1310
+ preferredModelId?: string | null;
1311
+ /**
1312
+ * @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.
1313
+ *
1314
+ * 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.
1315
+ */
1316
+ folderId?: string | null;
1317
+ /**
1318
+ * @description Rename this conversation.
1319
+ *
1320
+ * 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.
1321
+ *
1322
+ * 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.
1323
+ */
1324
+ title?: string;
862
1325
  };
863
1326
  DecideRequestBody: {
864
1327
  approved: boolean;
@@ -869,30 +1332,181 @@ export interface components {
869
1332
  items: components["schemas"]["ItemResource"][] | null;
870
1333
  };
871
1334
  SendMessageRequestBody: {
872
- /** @description 此前上传、尚未绑定到任何消息的附件 id */
873
- attachmentIds?: string[] | null;
874
- text: string;
1335
+ client?: components["schemas"]["ClientContextRequest"];
1336
+ /**
1337
+ * @description The message, in the order it was written. A message with nothing but text is a single
1338
+ * text part; that is the ordinary case and nothing else is required.
1339
+ */
1340
+ parts: components["schemas"]["MessagePart"][];
875
1341
  };
876
- TurnIDResponseBody: {
877
- turnId: string;
1342
+ MemoryListResponseBody: {
1343
+ items: components["schemas"]["MemoryResource"][];
878
1344
  };
879
- AnswerRequestBody: {
880
- /** @description 问题 id 到所选答案的映射 */
881
- answers: {
882
- [key: string]: string;
883
- };
1345
+ MemoryResource: {
1346
+ /** @description The fact itself */
1347
+ body: string;
1348
+ /** Format: date-time */
1349
+ createdAt: string;
1350
+ id: string;
1351
+ /** @description The name the assistant gave this fact; it overwrites or deletes its own entries by that name */
1352
+ name: string;
1353
+ /** @description Which conversation the assistant learned it in. That conversation may since have been deleted */
1354
+ sourceThreadId?: string;
1355
+ /** Format: date-time */
1356
+ updatedAt: string;
884
1357
  };
885
- RevertRequestBody: {
1358
+ /**
1359
+ * @description One piece of a message. `type` says which of the fields below carries it:
1360
+ *
1361
+ * - `text` — the words, in `text`
1362
+ * - `file` — an attachment uploaded earlier, by id in `attachmentId`
1363
+ * - `data-<something>` — context from the client, in `data`. The name after `data-` is yours;
1364
+ * it is shown to the assistant so it can tell one kind of block from another.
1365
+ *
1366
+ * Order matters: an attachment belongs where it was written, not at the end.
1367
+ */
1368
+ MessagePart: {
1369
+ /** @description For `file` parts. The attachment must have been uploaded and not yet bound to another message. */
1370
+ attachmentId?: string | null;
1371
+ /** @description For `data-*` parts. Any object; its keys reach the assistant as they are. */
1372
+ data?: {
1373
+ [key: string]: unknown;
1374
+ } | null;
1375
+ /** @description For `text` parts. */
1376
+ text?: string | null;
1377
+ type: string;
1378
+ };
1379
+ /**
1380
+ * @description Which client this is and what it can do, so the assistant can ask it to do those things
1381
+ * while it answers. What the operator is looking at travels as `data-*` parts on the message.
1382
+ *
1383
+ * Send `actions` only when they differ from the last message on this conversation. Sending the
1384
+ * block without `actions` keeps whatever was declared before.
1385
+ */
1386
+ ClientContextRequest: {
886
1387
  /**
887
- * Format: int64
888
- * @description 起始序号,该条及其之后的全部条目都会被撤回
1388
+ * @description The actions on offer right now.
1389
+ *
1390
+ * Omit it when nothing changed since the last message. Send `[]` to say there is nothing
1391
+ * on offer — those are different: a client that moves off the page it was attached to has
1392
+ * to be able to say so, or the assistant keeps calling actions that no longer make sense.
889
1393
  */
890
- ordinal: number;
1394
+ actions?: components["schemas"]["ClientActionRequest"][] | null;
1395
+ /** @description Identifies this client while it stays open. Any stable string; one per tab or process. */
1396
+ clientId: string;
1397
+ /** @description How the client calls itself, for example "Leaflow console (web)". */
1398
+ label?: string;
1399
+ };
1400
+ /** @description A `data-*` part as it was sent. */
1401
+ ClientContextPart: {
1402
+ data: {
1403
+ [key: string]: unknown;
1404
+ };
1405
+ type: string;
1406
+ };
1407
+ /** @description The shape of a tool in the OpenAI Chat Completions API, plus `readOnly` and `timeoutMs`. */
1408
+ ClientActionRequest: {
1409
+ function: components["schemas"]["ClientFunctionRequest"];
1410
+ /** @description True when the action changes nothing outside the client. Anything else goes through this conversation's approval before it runs. */
1411
+ readOnly: boolean;
1412
+ /**
1413
+ * Format: int64
1414
+ * @description How long the assistant should wait for this action. Omit for the default; longer values are capped.
1415
+ */
1416
+ timeoutMs?: number;
1417
+ /**
1418
+ * @description Only functions are supported.
1419
+ * @default function
1420
+ * @enum {string}
1421
+ */
1422
+ type?: "function";
1423
+ };
1424
+ /** @description The function object from the OpenAI tools format. */
1425
+ ClientFunctionRequest: {
1426
+ /** @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. */
1427
+ description: string;
1428
+ /** @description The MCP and Anthropic spelling of `parameters`. Give one or the other, not both. */
1429
+ inputSchema?: {
1430
+ [key: string]: unknown;
1431
+ } | null;
1432
+ name: string;
1433
+ /** @description JSON Schema for the arguments. Omit for an action that takes none. */
1434
+ parameters?: {
1435
+ [key: string]: unknown;
1436
+ } | null;
1437
+ };
1438
+ DynamicCallResultRequestBody: {
1439
+ /** @description The same value sent with the message. A result from a different client is refused. */
1440
+ clientId: string;
1441
+ /** @description Why it failed, when `ok` is false. It reaches the assistant, so write it for a reader who cannot see the screen. */
1442
+ error?: string;
1443
+ /** @description Pass back when there is more to read. The assistant will call again with it. */
1444
+ nextCursor?: string;
1445
+ ok: boolean;
1446
+ /** @description What the action produced. At most 64 KiB; use `nextCursor` for anything larger. */
1447
+ output?: string;
1448
+ };
1449
+ TodoResource: {
1450
+ /** @description The same step phrased as happening now — "Installing nginx". Show this one while the item is in progress. */
1451
+ activeForm: string;
1452
+ /** @description The step as an instruction — "Install nginx". */
1453
+ content: string;
1454
+ /**
1455
+ * @description Where this step stands. At most one item is in_progress at any time.
1456
+ * @enum {string}
1457
+ */
1458
+ status: "pending" | "in_progress" | "completed";
1459
+ };
1460
+ TurnIDResponseBody: {
1461
+ /** @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. */
1462
+ queued: boolean;
1463
+ /**
1464
+ * Format: int64
1465
+ * @description How many messages were already waiting ahead of this one. Only meaningful when queued is true.
1466
+ */
1467
+ queuedAhead?: number;
1468
+ /** @description The turn this message started. Empty when the message was queued instead. */
1469
+ turnId: string;
1470
+ };
1471
+ AnswerRequestBody: {
1472
+ /** @description A map from question id to the answer chosen */
1473
+ answers: {
1474
+ [key: string]: string;
1475
+ };
1476
+ };
1477
+ RevertRequestBody: {
1478
+ /**
1479
+ * Format: int64
1480
+ * @description The starting ordinal; that entry and everything after it is reverted
1481
+ */
1482
+ ordinal: number;
891
1483
  };
892
1484
  RevertedCountResponseBody: {
893
1485
  /** Format: int64 */
894
1486
  reverted: number;
895
1487
  };
1488
+ FolderResource: {
1489
+ /** Format: date-time */
1490
+ createdAt: string;
1491
+ id: string;
1492
+ name: string;
1493
+ /**
1494
+ * Format: int64
1495
+ * @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.
1496
+ */
1497
+ threadCount: number;
1498
+ /** Format: date-time */
1499
+ updatedAt: string;
1500
+ };
1501
+ FolderListResponseBody: {
1502
+ folders: components["schemas"]["FolderResource"][] | null;
1503
+ };
1504
+ CreateFolderRequestBody: {
1505
+ name: string;
1506
+ };
1507
+ UpdateFolderRequestBody: {
1508
+ name: string;
1509
+ };
896
1510
  };
897
1511
  responses: never;
898
1512
  parameters: never;
@@ -902,16 +1516,48 @@ export interface components {
902
1516
  }
903
1517
  export type $defs = Record<string, never>;
904
1518
  export interface operations {
905
- "upload-attachment": {
1519
+ "list-models": {
906
1520
  parameters: {
907
1521
  query?: never;
908
1522
  header?: never;
909
1523
  path?: never;
910
1524
  cookie?: never;
911
1525
  };
1526
+ requestBody?: never;
1527
+ responses: {
1528
+ /** @description OK */
1529
+ 200: {
1530
+ headers: {
1531
+ [name: string]: unknown;
1532
+ };
1533
+ content: {
1534
+ "application/json": components["schemas"]["ModelListResponseBody"];
1535
+ };
1536
+ };
1537
+ /** @description Error */
1538
+ default: {
1539
+ headers: {
1540
+ [name: string]: unknown;
1541
+ };
1542
+ content: {
1543
+ "application/json": components["schemas"]["Error"];
1544
+ };
1545
+ };
1546
+ };
1547
+ };
1548
+ "upload-attachment": {
1549
+ parameters: {
1550
+ query?: {
1551
+ /** @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. */
1552
+ filename?: string;
1553
+ };
1554
+ header?: never;
1555
+ path?: never;
1556
+ cookie?: never;
1557
+ };
912
1558
  requestBody: {
913
1559
  content: {
914
- "application/octet-stream": string;
1560
+ "*/*": string;
915
1561
  };
916
1562
  };
917
1563
  responses: {
@@ -949,12 +1595,14 @@ export interface operations {
949
1595
  /** @description OK */
950
1596
  200: {
951
1597
  headers: {
952
- /** @description 私有而且长缓存:这些字节按 id 寻址而 id 永不复用,所以它们永远不会变;而它们属于一个人,所以不能进任何共享缓存。 */
1598
+ /** @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
1599
  "Cache-Control"?: string;
1600
+ /** @description Present on everything that is not an image, carrying the original filename. Absent on images, which are meant to be rendered in place. */
1601
+ "Content-Disposition"?: string;
954
1602
  [name: string]: unknown;
955
1603
  };
956
1604
  content: {
957
- "image/*": string;
1605
+ "*/*": string;
958
1606
  };
959
1607
  };
960
1608
  /** @description Error */
@@ -971,13 +1619,13 @@ export interface operations {
971
1619
  "list-bindings": {
972
1620
  parameters: {
973
1621
  query?: {
974
- /** @description 这一页最多返回多少条 */
1622
+ /** @description How many entries this page returns at most */
975
1623
  limit?: number;
976
- /** @description 跳过多少条。要翻得更深请改用游标翻页的接口 */
1624
+ /** @description How many to skip. To page deeper, use the cursor-paged operation instead */
977
1625
  offset?: number;
978
1626
  platform?: string;
979
1627
  channelId?: string;
980
- /** @description 仅返回处于活跃状态的绑定 */
1628
+ /** @description Return only bindings that are active */
981
1629
  active?: boolean;
982
1630
  };
983
1631
  header?: never;
@@ -1069,12 +1717,12 @@ export interface operations {
1069
1717
  "list-channels": {
1070
1718
  parameters: {
1071
1719
  query?: {
1072
- /** @description 这一页最多返回多少条 */
1720
+ /** @description How many entries this page returns at most */
1073
1721
  limit?: number;
1074
- /** @description 跳过多少条。要翻得更深请改用游标翻页的接口 */
1722
+ /** @description How many to skip. To page deeper, use the cursor-paged operation instead */
1075
1723
  offset?: number;
1076
1724
  platform?: string;
1077
- /** @description 仅返回处于启用状态的通道 */
1725
+ /** @description Return only channels that are enabled */
1078
1726
  active?: boolean;
1079
1727
  };
1080
1728
  header?: never;
@@ -1333,9 +1981,9 @@ export interface operations {
1333
1981
  "check-sender": {
1334
1982
  parameters: {
1335
1983
  query: {
1336
- /** @description 平台上那个人的 id,和绑定、被拒记录里的是同一个值 */
1984
+ /** @description That person's id on the platform, the same value that appears in bindings and rejections */
1337
1985
  peerId: string;
1338
- /** @description 仅 Telegram 这类有用户名的平台填得出来,不带 @。留空即当作没有用户名 */
1986
+ /** @description Only platforms with usernames, such as Telegram, can supply this. Without the @. Leave it empty to mean there is no username */
1339
1987
  username?: string;
1340
1988
  };
1341
1989
  header?: never;
@@ -1492,7 +2140,41 @@ export interface operations {
1492
2140
  };
1493
2141
  };
1494
2142
  };
1495
- "list-models": {
2143
+ "submit-dynamic-call-result": {
2144
+ parameters: {
2145
+ query?: never;
2146
+ header?: never;
2147
+ path: {
2148
+ /** @description The id of the tool call entry in the conversation. */
2149
+ call: string;
2150
+ };
2151
+ cookie?: never;
2152
+ };
2153
+ requestBody: {
2154
+ content: {
2155
+ "application/json": components["schemas"]["DynamicCallResultRequestBody"];
2156
+ };
2157
+ };
2158
+ responses: {
2159
+ /** @description No Content */
2160
+ 204: {
2161
+ headers: {
2162
+ [name: string]: unknown;
2163
+ };
2164
+ content?: never;
2165
+ };
2166
+ /** @description Error */
2167
+ default: {
2168
+ headers: {
2169
+ [name: string]: unknown;
2170
+ };
2171
+ content: {
2172
+ "application/json": components["schemas"]["Error"];
2173
+ };
2174
+ };
2175
+ };
2176
+ };
2177
+ "list-folders": {
1496
2178
  parameters: {
1497
2179
  query?: never;
1498
2180
  header?: never;
@@ -1507,7 +2189,351 @@ export interface operations {
1507
2189
  [name: string]: unknown;
1508
2190
  };
1509
2191
  content: {
1510
- "application/json": components["schemas"]["ModelListResponseBody"];
2192
+ "application/json": components["schemas"]["FolderListResponseBody"];
2193
+ };
2194
+ };
2195
+ /** @description Error */
2196
+ default: {
2197
+ headers: {
2198
+ [name: string]: unknown;
2199
+ };
2200
+ content: {
2201
+ "application/json": components["schemas"]["Error"];
2202
+ };
2203
+ };
2204
+ };
2205
+ };
2206
+ "create-folder": {
2207
+ parameters: {
2208
+ query?: never;
2209
+ header?: never;
2210
+ path?: never;
2211
+ cookie?: never;
2212
+ };
2213
+ requestBody: {
2214
+ content: {
2215
+ "application/json": components["schemas"]["CreateFolderRequestBody"];
2216
+ };
2217
+ };
2218
+ responses: {
2219
+ /** @description Created */
2220
+ 201: {
2221
+ headers: {
2222
+ [name: string]: unknown;
2223
+ };
2224
+ content: {
2225
+ "application/json": components["schemas"]["FolderResource"];
2226
+ };
2227
+ };
2228
+ /** @description Error */
2229
+ default: {
2230
+ headers: {
2231
+ [name: string]: unknown;
2232
+ };
2233
+ content: {
2234
+ "application/json": components["schemas"]["Error"];
2235
+ };
2236
+ };
2237
+ };
2238
+ };
2239
+ "get-folder": {
2240
+ parameters: {
2241
+ query?: never;
2242
+ header?: never;
2243
+ path: {
2244
+ folder: string;
2245
+ };
2246
+ cookie?: never;
2247
+ };
2248
+ requestBody?: never;
2249
+ responses: {
2250
+ /** @description OK */
2251
+ 200: {
2252
+ headers: {
2253
+ [name: string]: unknown;
2254
+ };
2255
+ content: {
2256
+ "application/json": components["schemas"]["FolderResource"];
2257
+ };
2258
+ };
2259
+ /** @description Error */
2260
+ default: {
2261
+ headers: {
2262
+ [name: string]: unknown;
2263
+ };
2264
+ content: {
2265
+ "application/json": components["schemas"]["Error"];
2266
+ };
2267
+ };
2268
+ };
2269
+ };
2270
+ "delete-folder": {
2271
+ parameters: {
2272
+ query?: never;
2273
+ header?: never;
2274
+ path: {
2275
+ folder: string;
2276
+ };
2277
+ cookie?: never;
2278
+ };
2279
+ requestBody?: never;
2280
+ responses: {
2281
+ /** @description No Content */
2282
+ 204: {
2283
+ headers: {
2284
+ [name: string]: unknown;
2285
+ };
2286
+ content?: never;
2287
+ };
2288
+ /** @description Error */
2289
+ default: {
2290
+ headers: {
2291
+ [name: string]: unknown;
2292
+ };
2293
+ content: {
2294
+ "application/json": components["schemas"]["Error"];
2295
+ };
2296
+ };
2297
+ };
2298
+ };
2299
+ "update-folder": {
2300
+ parameters: {
2301
+ query?: never;
2302
+ header?: never;
2303
+ path: {
2304
+ folder: string;
2305
+ };
2306
+ cookie?: never;
2307
+ };
2308
+ requestBody: {
2309
+ content: {
2310
+ "application/json": components["schemas"]["UpdateFolderRequestBody"];
2311
+ };
2312
+ };
2313
+ responses: {
2314
+ /** @description OK */
2315
+ 200: {
2316
+ headers: {
2317
+ [name: string]: unknown;
2318
+ };
2319
+ content: {
2320
+ "application/json": components["schemas"]["FolderResource"];
2321
+ };
2322
+ };
2323
+ /** @description Error */
2324
+ default: {
2325
+ headers: {
2326
+ [name: string]: unknown;
2327
+ };
2328
+ content: {
2329
+ "application/json": components["schemas"]["Error"];
2330
+ };
2331
+ };
2332
+ };
2333
+ };
2334
+ "list-memories": {
2335
+ parameters: {
2336
+ query?: never;
2337
+ header?: never;
2338
+ path?: never;
2339
+ cookie?: never;
2340
+ };
2341
+ requestBody?: never;
2342
+ responses: {
2343
+ /** @description OK */
2344
+ 200: {
2345
+ headers: {
2346
+ [name: string]: unknown;
2347
+ };
2348
+ content: {
2349
+ "application/json": components["schemas"]["MemoryListResponseBody"];
2350
+ };
2351
+ };
2352
+ /** @description Error */
2353
+ default: {
2354
+ headers: {
2355
+ [name: string]: unknown;
2356
+ };
2357
+ content: {
2358
+ "application/json": components["schemas"]["Error"];
2359
+ };
2360
+ };
2361
+ };
2362
+ };
2363
+ "delete-memory": {
2364
+ parameters: {
2365
+ query?: never;
2366
+ header?: never;
2367
+ path: {
2368
+ memory: string;
2369
+ };
2370
+ cookie?: never;
2371
+ };
2372
+ requestBody?: never;
2373
+ responses: {
2374
+ /** @description No Content */
2375
+ 204: {
2376
+ headers: {
2377
+ [name: string]: unknown;
2378
+ };
2379
+ content?: never;
2380
+ };
2381
+ /** @description Error */
2382
+ default: {
2383
+ headers: {
2384
+ [name: string]: unknown;
2385
+ };
2386
+ content: {
2387
+ "application/json": components["schemas"]["Error"];
2388
+ };
2389
+ };
2390
+ };
2391
+ };
2392
+ "list-skills": {
2393
+ parameters: {
2394
+ query?: never;
2395
+ header?: never;
2396
+ path?: never;
2397
+ cookie?: never;
2398
+ };
2399
+ requestBody?: never;
2400
+ responses: {
2401
+ /** @description OK */
2402
+ 200: {
2403
+ headers: {
2404
+ [name: string]: unknown;
2405
+ };
2406
+ content: {
2407
+ "application/json": components["schemas"]["SkillListResponseBody"];
2408
+ };
2409
+ };
2410
+ /** @description Error */
2411
+ default: {
2412
+ headers: {
2413
+ [name: string]: unknown;
2414
+ };
2415
+ content: {
2416
+ "application/json": components["schemas"]["Error"];
2417
+ };
2418
+ };
2419
+ };
2420
+ };
2421
+ "put-skill": {
2422
+ parameters: {
2423
+ query?: never;
2424
+ header?: never;
2425
+ path?: never;
2426
+ cookie?: never;
2427
+ };
2428
+ requestBody: {
2429
+ content: {
2430
+ "application/json": components["schemas"]["SkillRequestBody"];
2431
+ };
2432
+ };
2433
+ responses: {
2434
+ /** @description OK */
2435
+ 200: {
2436
+ headers: {
2437
+ [name: string]: unknown;
2438
+ };
2439
+ content: {
2440
+ "application/json": components["schemas"]["SkillResource"];
2441
+ };
2442
+ };
2443
+ /** @description Error */
2444
+ default: {
2445
+ headers: {
2446
+ [name: string]: unknown;
2447
+ };
2448
+ content: {
2449
+ "application/json": components["schemas"]["Error"];
2450
+ };
2451
+ };
2452
+ };
2453
+ };
2454
+ "get-skill": {
2455
+ parameters: {
2456
+ query?: never;
2457
+ header?: never;
2458
+ path: {
2459
+ /** @description The skill's name, as `list-skills` returned it. */
2460
+ skill: string;
2461
+ };
2462
+ cookie?: never;
2463
+ };
2464
+ requestBody?: never;
2465
+ responses: {
2466
+ /** @description OK */
2467
+ 200: {
2468
+ headers: {
2469
+ [name: string]: unknown;
2470
+ };
2471
+ content: {
2472
+ "application/json": components["schemas"]["SkillResource"];
2473
+ };
2474
+ };
2475
+ /** @description Error */
2476
+ default: {
2477
+ headers: {
2478
+ [name: string]: unknown;
2479
+ };
2480
+ content: {
2481
+ "application/json": components["schemas"]["Error"];
2482
+ };
2483
+ };
2484
+ };
2485
+ };
2486
+ "delete-skill": {
2487
+ parameters: {
2488
+ query?: never;
2489
+ header?: never;
2490
+ path: {
2491
+ skill: string;
2492
+ };
2493
+ cookie?: never;
2494
+ };
2495
+ requestBody?: never;
2496
+ responses: {
2497
+ /** @description No Content */
2498
+ 204: {
2499
+ headers: {
2500
+ [name: string]: unknown;
2501
+ };
2502
+ content?: never;
2503
+ };
2504
+ /** @description Error */
2505
+ default: {
2506
+ headers: {
2507
+ [name: string]: unknown;
2508
+ };
2509
+ content: {
2510
+ "application/json": components["schemas"]["Error"];
2511
+ };
2512
+ };
2513
+ };
2514
+ };
2515
+ "set-skill-enabled": {
2516
+ parameters: {
2517
+ query?: never;
2518
+ header?: never;
2519
+ path: {
2520
+ skill: string;
2521
+ };
2522
+ cookie?: never;
2523
+ };
2524
+ requestBody: {
2525
+ content: {
2526
+ "application/json": components["schemas"]["SkillEnabledRequestBody"];
2527
+ };
2528
+ };
2529
+ responses: {
2530
+ /** @description OK */
2531
+ 200: {
2532
+ headers: {
2533
+ [name: string]: unknown;
2534
+ };
2535
+ content: {
2536
+ "application/json": components["schemas"]["SkillResource"];
1511
2537
  };
1512
2538
  };
1513
2539
  /** @description Error */
@@ -1524,10 +2550,20 @@ export interface operations {
1524
2550
  "list-threads": {
1525
2551
  parameters: {
1526
2552
  query?: {
1527
- /** @description 按标题搜索,大小写不敏感。留空则返回最近的对话 */
2553
+ /** @description Search titles, case-insensitively. Leave it empty for the most recent conversations */
1528
2554
  q?: string;
1529
- /** @description 为真时**只**返回已归档的对话,否则只返回未归档的 */
2555
+ /** @description When true, returns **only** archived conversations; otherwise only unarchived ones */
1530
2556
  archived?: boolean;
2557
+ /** @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. */
2558
+ folder?: string;
2559
+ /**
2560
+ * @description Where the previous page ended, from its `nextCursor`. Omit it for the first page.
2561
+ *
2562
+ * 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.
2563
+ *
2564
+ * 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.
2565
+ */
2566
+ cursor?: string;
1531
2567
  limit?: number;
1532
2568
  };
1533
2569
  header?: never;
@@ -1620,6 +2656,35 @@ export interface operations {
1620
2656
  };
1621
2657
  };
1622
2658
  };
2659
+ "delete-thread": {
2660
+ parameters: {
2661
+ query?: never;
2662
+ header?: never;
2663
+ path: {
2664
+ thread: string;
2665
+ };
2666
+ cookie?: never;
2667
+ };
2668
+ requestBody?: never;
2669
+ responses: {
2670
+ /** @description No Content */
2671
+ 204: {
2672
+ headers: {
2673
+ [name: string]: unknown;
2674
+ };
2675
+ content?: never;
2676
+ };
2677
+ /** @description Error */
2678
+ default: {
2679
+ headers: {
2680
+ [name: string]: unknown;
2681
+ };
2682
+ content: {
2683
+ "application/json": components["schemas"]["Error"];
2684
+ };
2685
+ };
2686
+ };
2687
+ };
1623
2688
  "update-thread": {
1624
2689
  parameters: {
1625
2690
  query?: never;
@@ -1692,7 +2757,7 @@ export interface operations {
1692
2757
  "list-earlier-items": {
1693
2758
  parameters: {
1694
2759
  query: {
1695
- /** @description 来自文档里的 earlier.before,取这个序号之前的条目 */
2760
+ /** @description From the document's earlier.before; returns entries before this ordinal */
1696
2761
  before: number;
1697
2762
  };
1698
2763
  header?: never;