@leaflow/sdk 0.0.0-dev.113.g5d6fb99 → 0.0.0-dev.113.gecc0f27

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 (46) hide show
  1. package/README.md +34 -0
  2. package/dist/account/v1/index.d.ts +16 -0
  3. package/dist/account/v1/schema.d.ts +294 -3
  4. package/dist/assistant/v1/index.d.ts +74 -34
  5. package/dist/assistant/v1/schema.d.ts +1113 -157
  6. package/dist/billing/v1/index.d.ts +70 -0
  7. package/dist/billing/v1/index.js +5 -0
  8. package/dist/billing/v1/schema.d.ts +2657 -0
  9. package/dist/canopy/v1/index.d.ts +12 -0
  10. package/dist/compute/v1/index.d.ts +50 -4
  11. package/dist/compute/v1/schema.d.ts +857 -268
  12. package/dist/dns/v1/index.d.ts +42 -0
  13. package/dist/dns/v1/index.js +5 -0
  14. package/dist/dns/v1/schema.d.ts +883 -0
  15. package/dist/iam/v1/index.d.ts +28 -0
  16. package/dist/iam/v1/schema.d.ts +437 -9
  17. package/dist/index.d.ts +4 -0
  18. package/dist/monitoring/v1/index.d.ts +96 -0
  19. package/dist/monitoring/v1/schema.d.ts +2386 -496
  20. package/dist/notification/v1/index.d.ts +76 -0
  21. package/dist/notification/v1/index.js +5 -0
  22. package/dist/notification/v1/schema.d.ts +2044 -0
  23. package/dist/support/v1/index.d.ts +50 -0
  24. package/dist/support/v1/index.js +5 -0
  25. package/dist/support/v1/schema.d.ts +1078 -0
  26. package/dist/tunnel/v1/index.d.ts +14 -32
  27. package/dist/tunnel/v1/schema.d.ts +52 -496
  28. package/package.json +5 -4
  29. package/dist/gen/account/v1/schema.d.ts +0 -866
  30. package/dist/gen/assistant/v1/schema.d.ts +0 -1884
  31. package/dist/gen/canopy/v1/schema.d.ts +0 -1100
  32. package/dist/gen/compute/v1/schema.d.ts +0 -4439
  33. package/dist/gen/iam/v1/schema.d.ts +0 -1230
  34. package/dist/gen/iam/v1/schema.js +0 -5
  35. package/dist/gen/monitoring/v1/schema.d.ts +0 -2291
  36. package/dist/gen/monitoring/v1/schema.js +0 -5
  37. package/dist/gen/tunnel/v1/schema.d.ts +0 -845
  38. package/dist/gen/tunnel/v1/schema.js +0 -5
  39. package/dist/src/client.d.ts +0 -57
  40. package/dist/src/client.js +0 -41
  41. package/dist/src/index.d.ts +0 -9
  42. package/dist/src/index.js +0 -1
  43. /package/dist/{gen/account → billing}/v1/schema.js +0 -0
  44. /package/dist/{gen/assistant → dns}/v1/schema.js +0 -0
  45. /package/dist/{gen/canopy → notification}/v1/schema.js +0 -0
  46. /package/dist/{gen/compute → support}/v1/schema.js +0 -0
@@ -3,7 +3,7 @@
3
3
  * Do not make direct changes to the file.
4
4
  */
5
5
  export interface paths {
6
- "/v1/attachments": {
6
+ "/api/v1/attachments": {
7
7
  parameters: {
8
8
  query?: never;
9
9
  header?: never;
@@ -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;
@@ -23,7 +27,7 @@ export interface paths {
23
27
  patch?: never;
24
28
  trace?: never;
25
29
  };
26
- "/v1/attachments/{attachment}": {
30
+ "/api/v1/attachments/{attachment}": {
27
31
  parameters: {
28
32
  query?: never;
29
33
  header?: 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;
@@ -43,7 +49,7 @@ export interface paths {
43
49
  patch?: never;
44
50
  trace?: never;
45
51
  };
46
- "/v1/bindings": {
52
+ "/api/v1/bindings": {
47
53
  parameters: {
48
54
  query?: never;
49
55
  header?: 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;
@@ -63,37 +69,37 @@ export interface paths {
63
69
  patch?: never;
64
70
  trace?: never;
65
71
  };
66
- "/v1/bindings/{binding}": {
72
+ "/api/v1/bindings/{binding}": {
67
73
  parameters: {
68
74
  query?: never;
69
75
  header?: never;
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;
81
87
  patch?: never;
82
88
  trace?: never;
83
89
  };
84
- "/v1/channels": {
90
+ "/api/v1/channels": {
85
91
  parameters: {
86
92
  query?: never;
87
93
  header?: never;
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;
@@ -102,32 +108,32 @@ export interface paths {
102
108
  patch?: never;
103
109
  trace?: never;
104
110
  };
105
- "/v1/channels/{channel}": {
111
+ "/api/v1/channels/{channel}": {
106
112
  parameters: {
107
113
  query?: never;
108
114
  header?: never;
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;
129
135
  };
130
- "/v1/channels/{channel}/binding-codes": {
136
+ "/api/v1/channels/{channel}/binding-codes": {
131
137
  parameters: {
132
138
  query?: never;
133
139
  header?: 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;
@@ -147,7 +153,7 @@ export interface paths {
147
153
  patch?: never;
148
154
  trace?: never;
149
155
  };
150
- "/v1/channels/{channel}/rejections": {
156
+ "/api/v1/channels/{channel}/rejections": {
151
157
  parameters: {
152
158
  query?: never;
153
159
  header?: 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;
@@ -167,7 +173,7 @@ export interface paths {
167
173
  patch?: never;
168
174
  trace?: never;
169
175
  };
170
- "/v1/channels/{channel}/secret": {
176
+ "/api/v1/channels/{channel}/secret": {
171
177
  parameters: {
172
178
  query?: never;
173
179
  header?: 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;
@@ -187,7 +193,7 @@ export interface paths {
187
193
  patch?: never;
188
194
  trace?: never;
189
195
  };
190
- "/v1/channels/{channel}/sender-check": {
196
+ "/api/v1/channels/{channel}/sender-check": {
191
197
  parameters: {
192
198
  query?: never;
193
199
  header?: 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;
@@ -207,7 +213,7 @@ export interface paths {
207
213
  patch?: never;
208
214
  trace?: never;
209
215
  };
210
- "/v1/channels/{channel}/weixin-logins": {
216
+ "/api/v1/channels/{channel}/weixin-logins": {
211
217
  parameters: {
212
218
  query?: never;
213
219
  header?: 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;
@@ -227,7 +233,7 @@ export interface paths {
227
233
  patch?: never;
228
234
  trace?: never;
229
235
  };
230
- "/v1/platforms": {
236
+ "/api/v1/platforms": {
231
237
  parameters: {
232
238
  query?: never;
233
239
  header?: 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;
@@ -247,7 +253,7 @@ export interface paths {
247
253
  patch?: never;
248
254
  trace?: never;
249
255
  };
250
- "/v1/weixin-logins/{login}": {
256
+ "/api/v1/weixin-logins/{login}": {
251
257
  parameters: {
252
258
  query?: never;
253
259
  header?: 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;
@@ -267,7 +273,7 @@ export interface paths {
267
273
  patch?: never;
268
274
  trace?: never;
269
275
  };
270
- "/v1/weixin-logins/{login}/verify-code": {
276
+ "/api/v1/weixin-logins/{login}/verify-code": {
271
277
  parameters: {
272
278
  query?: never;
273
279
  header?: 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
- "/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,19 +381,104 @@ 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
  };
310
- "/v1/threads": {
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
+ };
481
+ "/api/v1/threads": {
311
482
  parameters: {
312
483
  query?: never;
313
484
  header?: 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;
@@ -328,7 +499,7 @@ export interface paths {
328
499
  patch?: never;
329
500
  trace?: never;
330
501
  };
331
- "/v1/threads/{thread}": {
502
+ "/api/v1/threads/{thread}": {
332
503
  parameters: {
333
504
  query?: never;
334
505
  header?: never;
@@ -336,23 +507,35 @@ 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;
354
537
  };
355
- "/v1/threads/{thread}/approvals/{batch}": {
538
+ "/api/v1/threads/{thread}/approvals/{batch}": {
356
539
  parameters: {
357
540
  query?: never;
358
541
  header?: 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;
@@ -372,7 +555,7 @@ export interface paths {
372
555
  patch?: never;
373
556
  trace?: never;
374
557
  };
375
- "/v1/threads/{thread}/earlier": {
558
+ "/api/v1/threads/{thread}/earlier": {
376
559
  parameters: {
377
560
  query?: never;
378
561
  header?: 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;
@@ -392,7 +575,7 @@ export interface paths {
392
575
  patch?: never;
393
576
  trace?: never;
394
577
  };
395
- "/v1/threads/{thread}/interrupt": {
578
+ "/api/v1/threads/{thread}/interrupt": {
396
579
  parameters: {
397
580
  query?: never;
398
581
  header?: 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;
@@ -412,7 +595,7 @@ export interface paths {
412
595
  patch?: never;
413
596
  trace?: never;
414
597
  };
415
- "/v1/threads/{thread}/messages": {
598
+ "/api/v1/threads/{thread}/messages": {
416
599
  parameters: {
417
600
  query?: never;
418
601
  header?: 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;
@@ -432,7 +615,7 @@ export interface paths {
432
615
  patch?: never;
433
616
  trace?: never;
434
617
  };
435
- "/v1/threads/{thread}/questions/{item}": {
618
+ "/api/v1/threads/{thread}/questions/{item}": {
436
619
  parameters: {
437
620
  query?: never;
438
621
  header?: 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;
@@ -452,7 +635,7 @@ export interface paths {
452
635
  patch?: never;
453
636
  trace?: never;
454
637
  };
455
- "/v1/threads/{thread}/read": {
638
+ "/api/v1/threads/{thread}/read": {
456
639
  parameters: {
457
640
  query?: never;
458
641
  header?: 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;
@@ -469,7 +652,7 @@ export interface paths {
469
652
  patch?: never;
470
653
  trace?: never;
471
654
  };
472
- "/v1/threads/{thread}/revert": {
655
+ "/api/v1/threads/{thread}/revert": {
473
656
  parameters: {
474
657
  query?: never;
475
658
  header?: 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;
@@ -503,11 +686,39 @@ export interface components {
503
686
  status: number;
504
687
  };
505
688
  UploadedResource: {
506
- /** Format: int64 */
507
- height: number;
689
+ /**
690
+ * Format: int64
691
+ * @description Size of what was stored. For an image that has been resized, this is the resized size, not what was uploaded.
692
+ */
693
+ byteSize: number;
694
+ /**
695
+ * Format: date-time
696
+ * @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.
697
+ *
698
+ * 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.
699
+ */
700
+ draftExpiresAt: string;
701
+ filename: string;
702
+ /**
703
+ * Format: int64
704
+ * @description Null unless kind is image.
705
+ */
706
+ height: number | null;
508
707
  id: string;
509
- /** Format: int64 */
510
- width: number;
708
+ /**
709
+ * @description How the assistant will see this file.
710
+ *
711
+ * - `image` — read directly, and only by models that accept image input
712
+ * - `text` — placed inline in the message when small enough, otherwise read on demand
713
+ * - `binary` — never read directly; the assistant downloads it onto a cloud instance to work with it
714
+ * @enum {string}
715
+ */
716
+ kind: "image" | "text" | "binary";
717
+ /**
718
+ * Format: int64
719
+ * @description Null unless kind is image.
720
+ */
721
+ width: number | null;
511
722
  };
512
723
  BindingResource: {
513
724
  /** Format: uuid */
@@ -526,28 +737,28 @@ export interface components {
526
737
  verifiedAt: string | null;
527
738
  };
528
739
  LengthAwarePageBindingResource: {
529
- /** @description 这一页的内容 */
740
+ /** @description The entries on this page */
530
741
  items: components["schemas"]["BindingResource"][];
531
742
  /**
532
743
  * Format: int64
533
- * @description 这一页最多几条,回显请求里的值
744
+ * @description The page size, echoing what was requested
534
745
  */
535
746
  limit: number;
536
747
  /**
537
748
  * Format: int64
538
- * @description 跳过了多少条,回显请求里的值
749
+ * @description How many were skipped, echoing what was requested
539
750
  */
540
751
  offset: number;
541
752
  /**
542
753
  * Format: int64
543
- * @description 命中的总条数,不只是这一页
754
+ * @description How many match in total, not just on this page
544
755
  */
545
756
  total: number;
546
757
  };
547
758
  ChannelResource: {
548
759
  allowFrom: string[] | null;
549
760
  /**
550
- * @description 平台接入状态。只有 online 才收得到消息、也才签得出绑定码
761
+ * @description How far this channel is from working. Only `online` receives messages and can issue binding codes
551
762
  * @enum {string}
552
763
  */
553
764
  connState: "logged_out" | "qr_pending" | "online" | "expired";
@@ -558,7 +769,7 @@ export interface components {
558
769
  name: string;
559
770
  platform: string;
560
771
  /**
561
- * @description 常驻连接此刻的状态。回调型平台恒为 stopped
772
+ * @description The state of the long-lived connection right now. Always `stopped` for webhook platforms
562
773
  * @enum {string}
563
774
  */
564
775
  runtimeState: "stopped" | "running";
@@ -568,33 +779,33 @@ export interface components {
568
779
  status: "active" | "suspended" | "disabled";
569
780
  /** Format: date-time */
570
781
  updatedAt: string;
571
- /** @description 回调路径,网关配置和排查时用 */
782
+ /** @description The webhook path, for gateway configuration and for diagnosis */
572
783
  webhookPath: string;
573
- /** @description 填到平台后台的回调地址。部署未声明公网入口时为 null */
784
+ /** @description The webhook address to paste into that platform's console. Null when the deployment declares no public entry point */
574
785
  webhookUrl: string | null;
575
786
  };
576
787
  LengthAwarePageChannelResource: {
577
- /** @description 这一页的内容 */
788
+ /** @description The entries on this page */
578
789
  items: components["schemas"]["ChannelResource"][];
579
790
  /**
580
791
  * Format: int64
581
- * @description 这一页最多几条,回显请求里的值
792
+ * @description The page size, echoing what was requested
582
793
  */
583
794
  limit: number;
584
795
  /**
585
796
  * Format: int64
586
- * @description 跳过了多少条,回显请求里的值
797
+ * @description How many were skipped, echoing what was requested
587
798
  */
588
799
  offset: number;
589
800
  /**
590
801
  * Format: int64
591
- * @description 命中的总条数,不只是这一页
802
+ * @description How many match in total, not just on this page
592
803
  */
593
804
  total: number;
594
805
  };
595
806
  CreateChannelRequestBody: {
596
807
  allowFrom?: string[] | null;
597
- /** @description 平台侧凭据。只写不读,创建后无法取回 */
808
+ /** @description Credentials for that platform. Write-only: they cannot be read back after creation */
598
809
  credentials?: {
599
810
  [key: string]: string;
600
811
  };
@@ -602,13 +813,13 @@ export interface components {
602
813
  platform: string;
603
814
  /** @enum {string} */
604
815
  senderPolicy?: "bound_only" | "open";
605
- /** @description 平台生成密钥的平台(secretSource=supplied)必须传;我们生成的(generated)不能传,那把会在本次响应的 webhookSecret 里返回一次 */
816
+ /** @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
817
  webhookSecret?: string;
607
818
  };
608
819
  ChannelWithSecretResponseBody: {
609
820
  allowFrom: string[] | null;
610
821
  /**
611
- * @description 平台接入状态。只有 online 才收得到消息、也才签得出绑定码
822
+ * @description How far this channel is from working. Only `online` receives messages and can issue binding codes
612
823
  * @enum {string}
613
824
  */
614
825
  connState: "logged_out" | "qr_pending" | "online" | "expired";
@@ -619,7 +830,7 @@ export interface components {
619
830
  name: string;
620
831
  platform: string;
621
832
  /**
622
- * @description 常驻连接此刻的状态。回调型平台恒为 stopped
833
+ * @description The state of the long-lived connection right now. Always `stopped` for webhook platforms
623
834
  * @enum {string}
624
835
  */
625
836
  runtimeState: "stopped" | "running";
@@ -629,24 +840,24 @@ export interface components {
629
840
  status: "active" | "suspended" | "disabled";
630
841
  /** Format: date-time */
631
842
  updatedAt: string;
632
- /** @description 回调路径,网关配置和排查时用 */
843
+ /** @description The webhook path, for gateway configuration and for diagnosis */
633
844
  webhookPath: string;
634
- /** @description 我们生成的那把回调密钥,拿去粘到平台后台。**之后无法再次取回**,只能轮换出新的一把。密钥由平台生成(secretSource=supplied)或该平台不走回调时为 null */
845
+ /** @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
846
  webhookSecret: string | null;
636
- /** @description 填到平台后台的回调地址。部署未声明公网入口时为 null */
847
+ /** @description The webhook address to paste into that platform's console. Null when the deployment declares no public entry point */
637
848
  webhookUrl: string | null;
638
849
  };
639
850
  UpdateChannelRequestBody: {
640
- /** @description 放行名单。仅在同时传了 senderPolicy 时生效 */
851
+ /** @description The allow list. Only applied when senderPolicy is sent as well */
641
852
  allowFrom?: string[] | null;
642
- /** @description 整份替换而不是逐键合并。不传表示不动 */
853
+ /** @description Replaced wholesale rather than merged key by key. Absent means unchanged */
643
854
  credentials?: {
644
855
  [key: string]: string;
645
856
  };
646
857
  enabled?: boolean;
647
858
  name?: string;
648
859
  /**
649
- * @description 传了才会连同 allowFrom 一起替换
860
+ * @description Only when this is sent is allowFrom replaced along with it
650
861
  * @enum {string}
651
862
  */
652
863
  senderPolicy?: "bound_only" | "open";
@@ -656,6 +867,22 @@ export interface components {
656
867
  /** Format: date-time */
657
868
  expiresAt: string;
658
869
  };
870
+ PartResource: {
871
+ /** @description For `file` parts. Points at one of this entry's `attachments`. */
872
+ attachmentId?: string | null;
873
+ /**
874
+ * @description Addresses this part in the live stream — text arrives as `append` frames pointing at
875
+ * `/items/{item}/parts/{id}/text`.
876
+ *
877
+ * Not an array index. It looks like one today because parts are only ever appended, and a
878
+ * client that treats it as one keeps working right up until that stops being true.
879
+ */
880
+ id: string;
881
+ /** @description For `text` parts. Grows as the answer is written. */
882
+ text?: string | null;
883
+ /** @enum {string} */
884
+ type: "text" | "file";
885
+ };
659
886
  RejectionResource: {
660
887
  /** Format: date-time */
661
888
  at: string;
@@ -671,7 +898,7 @@ export interface components {
671
898
  rejections: components["schemas"]["RejectionResource"][] | null;
672
899
  };
673
900
  RotateSecretRequestBody: {
674
- /** @description 平台生成密钥的平台(secretSource=supplied)必须传新的那把;我们生成的(generated)不能传 */
901
+ /** @description Required for platforms that generate the secret themselves (secretSource=supplied). Must be absent for `generated` ones */
675
902
  webhookSecret?: string;
676
903
  };
677
904
  WebhookSecretResponseBody: {
@@ -688,14 +915,14 @@ export interface components {
688
915
  LoginResource: {
689
916
  /**
690
917
  * Format: date-time
691
- * @description 这条登录流的截止时间。到点之后不要再轮询,重新发起一次
918
+ * @description When this login flow expires. Past that, stop polling and start a new one
692
919
  */
693
920
  expiresAt: string;
694
921
  /** Format: uuid */
695
922
  id: string;
696
- /** @description 二维码的内容,由客户端编码成二维码图形渲染(不是图片地址,也不是 data URI)。码过期时这条流会自己换一张接着等,所以每次轮询拿到的可能是新的一串 */
923
+ /** @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
924
  qrcodeData: string;
698
- /** @description 失败原因。仅在 status 为 error 或 expired 时有内容 */
925
+ /** @description Why it failed. Present only when status is error or expired */
699
926
  reason: string;
700
927
  /** @enum {string} */
701
928
  status: "wait" | "scanned" | "confirmed" | "expired" | "error" | "need_verify_code";
@@ -717,9 +944,9 @@ export interface components {
717
944
  setupChallenge: "none" | "webhook" | "scan";
718
945
  /** @enum {string} */
719
946
  setupMethod: "credentials" | "scan";
720
- /** @description 回调路径模板,{channel} 处替换为通道 id */
947
+ /** @description The webhook path template; {channel} is replaced with the channel id */
721
948
  webhookPath: string;
722
- /** @description 完整回调地址模板。部署未声明公网入口时为 null */
949
+ /** @description The full webhook address template. Null when the deployment declares no public entry point */
723
950
  webhookUrlTemplate: string | null;
724
951
  };
725
952
  PlatformListResponseBody: {
@@ -728,15 +955,60 @@ export interface components {
728
955
  VerifyCodeRequestBody: {
729
956
  code: string;
730
957
  };
731
- ModelResource: {
732
- /** Format: int64 */
733
- contextWindow: number;
734
- inputModalities: string[] | null;
735
- key: string;
736
- reasoningTiers: string[] | null;
958
+ SkillResource: {
959
+ /**
960
+ * @description True when the assistant wrote this skill during a conversation rather than a person
961
+ * writing it here.
962
+ *
963
+ * Which conversation is deliberately not returned: skills are shared across the project
964
+ * while conversations belong to one person, so naming one would tell everybody in the
965
+ * project that a particular colleague had it.
966
+ */
967
+ authoredByAssistant: boolean;
968
+ /** @description Why the assistant would open this skill. It sits in every request, so it is the one field worth writing carefully. */
969
+ description: string;
970
+ enabled: boolean;
971
+ /** @description Path to contents, `SKILL.md` among them. Only returned by `get-skill`; the list leaves it out. */
972
+ files?: {
973
+ [key: string]: string;
974
+ } | null;
975
+ name: string;
976
+ /**
977
+ * @description `builtin` — provided by the platform and read-only here.
978
+ * `project` — written for this project and editable by anyone in it.
979
+ * @enum {string}
980
+ */
981
+ origin: "builtin" | "project";
982
+ shortDescription: string | null;
983
+ /**
984
+ * Format: date-time
985
+ * @description Null for built-in skills, which have no edit history here.
986
+ */
987
+ updatedAt: string | null;
988
+ };
989
+ SkillListResponseBody: {
990
+ skills: components["schemas"]["SkillResource"][];
991
+ };
992
+ SkillRequestBody: {
993
+ /** @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". */
994
+ description: string;
995
+ /** @default true */
996
+ enabled?: boolean;
997
+ /**
998
+ * @description Path to contents. `SKILL.md` is required; anything else it references goes alongside it.
999
+ *
1000
+ * Paths are relative to the skill and cannot leave it. At most 32 files, 256 KiB each and
1001
+ * 1 MiB in total.
1002
+ */
1003
+ files: {
1004
+ [key: string]: string;
1005
+ };
1006
+ /** @description Also how the assistant refers to it, so renaming is deleting and writing again. */
1007
+ name: string;
1008
+ shortDescription?: string;
737
1009
  };
738
- ModelListResponseBody: {
739
- models: components["schemas"]["ModelResource"][] | null;
1010
+ SkillEnabledRequestBody: {
1011
+ enabled: boolean;
740
1012
  };
741
1013
  ThreadSummaryResource: {
742
1014
  /** @enum {string} */
@@ -744,6 +1016,8 @@ export interface components {
744
1016
  archived: boolean;
745
1017
  /** Format: date-time */
746
1018
  createdAt: string;
1019
+ /** @description The folder this conversation is filed under, or null when it is in none */
1020
+ folderId: string | null;
747
1021
  id: string;
748
1022
  model: string;
749
1023
  title: string | null;
@@ -752,11 +1026,13 @@ export interface components {
752
1026
  updatedAt: string;
753
1027
  };
754
1028
  ThreadListResponseBody: {
1029
+ /** @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. */
1030
+ nextCursor: string | null;
755
1031
  threads: components["schemas"]["ThreadSummaryResource"][] | null;
756
1032
  };
757
1033
  CreateThreadRequestBody: {
758
1034
  /**
759
- * @description 不传则使用平台默认审批模式
1035
+ * @description Absent uses the platform's default approval mode
760
1036
  * @enum {string}
761
1037
  */
762
1038
  approvalMode?: "guardian" | "manual" | "yolo";
@@ -764,6 +1040,14 @@ export interface components {
764
1040
  ContextResource: {
765
1041
  /** Format: int64 */
766
1042
  compactAt: number | null;
1043
+ /**
1044
+ * @description What kinds of input the model behind this conversation accepts, as modality names: text, image.
1045
+ *
1046
+ * 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.
1047
+ *
1048
+ * 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.
1049
+ */
1050
+ inputModalities: string[];
767
1051
  model: string;
768
1052
  /** Format: int64 */
769
1053
  used: number | null;
@@ -779,10 +1063,24 @@ export interface components {
779
1063
  };
780
1064
  AttachmentResource: {
781
1065
  /** Format: int64 */
782
- height: number;
1066
+ byteSize: number;
1067
+ filename: string;
1068
+ /**
1069
+ * Format: int64
1070
+ * @description Null unless kind is image. Width and height are here so a client can hold the space before the image itself has loaded.
1071
+ */
1072
+ height: number | null;
783
1073
  id: string;
784
- /** Format: int64 */
785
- width: number;
1074
+ /**
1075
+ * @description What this attachment is. A client renders an image in place and everything else as a file to download.
1076
+ * @enum {string}
1077
+ */
1078
+ kind: "image" | "text" | "binary";
1079
+ /**
1080
+ * Format: int64
1081
+ * @description Null unless kind is image.
1082
+ */
1083
+ width: number | null;
786
1084
  };
787
1085
  ItemResource: {
788
1086
  /** @enum {string|null} */
@@ -790,13 +1088,25 @@ export interface components {
790
1088
  approvalReason?: string | null;
791
1089
  arguments?: string;
792
1090
  attachments?: components["schemas"]["AttachmentResource"][] | null;
1091
+ /**
1092
+ * @description The context blocks the client attached to this message.
1093
+ *
1094
+ * **Not part of what the operator wrote** — `text` is. Render the message from `text` and
1095
+ * leave these out of the bubble; they are here so a client that did not send them, or one
1096
+ * that reloaded, can still read what the assistant was given.
1097
+ *
1098
+ * The actions declared alongside them are not returned: they are re-declared as they
1099
+ * change and would make every fetch of the conversation carry them again.
1100
+ */
1101
+ clientContext?: components["schemas"]["ClientContextPart"][] | null;
793
1102
  /** Format: date-time */
794
1103
  createdAt: string;
795
1104
  detail?: string | null;
1105
+ presentation?: components["schemas"]["PresentationResource"] | null;
796
1106
  /** Format: int64 */
797
1107
  durationMs?: number | null;
798
1108
  id: string;
799
- /** @description 产出这一条的模型。用户自己发的消息为 null */
1109
+ /** @description The model that produced this entry. Null for messages the user sent */
800
1110
  model: string | null;
801
1111
  namespace?: string | null;
802
1112
  /** Format: int64 */
@@ -805,14 +1115,69 @@ export interface components {
805
1115
  /** @enum {string} */
806
1116
  status: "pending" | "in_progress" | "completed" | "failed" | "declined" | "interrupted";
807
1117
  target?: string | null;
808
- text?: string;
1118
+ /**
1119
+ * @description The content of this entry, in the order it was written. A message that is only text is a
1120
+ * single part, which is most of them.
1121
+ *
1122
+ * An attachment belongs where it was written, so render these in order rather than putting
1123
+ * them all at the end.
1124
+ */
1125
+ parts?: components["schemas"]["PartResource"][] | null;
809
1126
  tool?: string | null;
810
1127
  /**
811
- * @description 决定这一条包含哪些字段
1128
+ * @description Determines which fields this entry carries
812
1129
  * @enum {string}
813
1130
  */
814
1131
  type: "user_message" | "agent_message" | "reasoning" | "dynamic_tool_call" | "context_compaction" | "token_budget_reminder" | "turn_failure";
815
1132
  };
1133
+ /**
1134
+ * @description Structured detail produced by a tool call, in addition to the single-line `detail`. Null
1135
+ * when the call produced none.
1136
+ *
1137
+ * `kind` determines which of the remaining fields is populated.
1138
+ */
1139
+ PresentationResource: {
1140
+ fileDiff?: components["schemas"]["FileDiffResource"] | null;
1141
+ /**
1142
+ * @description Determines which of the remaining fields is populated
1143
+ * @enum {string}
1144
+ */
1145
+ kind: "file_diff";
1146
+ };
1147
+ /**
1148
+ * @description The change a tool call applied to a single file.
1149
+ *
1150
+ * Populated once the call has completed successfully. It is absent while the call is pending
1151
+ * or awaiting approval, as the file's prior contents are read during execution. To preview an
1152
+ * edit awaiting approval, derive it from the call's `old_string` and `new_string` arguments.
1153
+ */
1154
+ FileDiffResource: {
1155
+ /**
1156
+ * Format: int64
1157
+ * @description Lines added. Complete even when `unified` is null
1158
+ */
1159
+ added: number;
1160
+ /** @description Absolute path of the file on the instance */
1161
+ path: string;
1162
+ /**
1163
+ * Format: int64
1164
+ * @description Lines removed. Complete even when `unified` is null
1165
+ */
1166
+ removed: number;
1167
+ /**
1168
+ * @description What the call did to the file
1169
+ * @enum {string}
1170
+ */
1171
+ status: "added" | "modified" | "deleted";
1172
+ /**
1173
+ * @description The change as a unified diff with three lines of context. A file created by the call is
1174
+ * diffed against `/dev/null`.
1175
+ *
1176
+ * Null when the change exceeds the service's size limit. The diff is omitted in full
1177
+ * rather than truncated; `added` and `removed` remain complete.
1178
+ */
1179
+ unified?: string | null;
1180
+ };
816
1181
  StreamResource: {
817
1182
  path: string;
818
1183
  ticket: string;
@@ -845,20 +1210,34 @@ export interface components {
845
1210
  DocumentResource: {
846
1211
  context: components["schemas"]["ContextResource"];
847
1212
  cursor: string | null;
848
- earlier: components["schemas"]["EarlierResource"];
1213
+ earlier: components["schemas"]["EarlierResource"] | null;
849
1214
  items: components["schemas"]["ItemResource"][] | null;
850
1215
  status: string;
851
- stream: components["schemas"]["StreamResource"];
852
- turn: components["schemas"]["TurnResource"];
1216
+ stream: components["schemas"]["StreamResource"] | null;
1217
+ turn: components["schemas"]["TurnResource"] | null;
1218
+ /** @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. */
1219
+ todos?: components["schemas"]["TodoResource"][];
853
1220
  turnId: string | null;
854
- wait: components["schemas"]["WaitResource"];
1221
+ wait: components["schemas"]["WaitResource"] | null;
855
1222
  };
856
1223
  UpdateThreadRequestBody: {
857
1224
  /** @enum {string} */
858
1225
  approvalMode?: "guardian" | "manual" | "yolo";
859
1226
  archived?: boolean;
860
- model?: string;
861
- reasoningEffort?: string;
1227
+ /**
1228
+ * @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.
1229
+ *
1230
+ * 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.
1231
+ */
1232
+ folderId?: string | null;
1233
+ /**
1234
+ * @description Rename this conversation.
1235
+ *
1236
+ * 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.
1237
+ *
1238
+ * 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.
1239
+ */
1240
+ title?: string;
862
1241
  };
863
1242
  DecideRequestBody: {
864
1243
  approved: boolean;
@@ -869,15 +1248,144 @@ export interface components {
869
1248
  items: components["schemas"]["ItemResource"][] | null;
870
1249
  };
871
1250
  SendMessageRequestBody: {
872
- /** @description 此前上传、尚未绑定到任何消息的附件 id */
873
- attachmentIds?: string[] | null;
874
- text: string;
1251
+ client?: components["schemas"]["ClientContextRequest"];
1252
+ /**
1253
+ * @description The message, in the order it was written. A message with nothing but text is a single
1254
+ * text part; that is the ordinary case and nothing else is required.
1255
+ */
1256
+ parts: components["schemas"]["MessagePart"][];
1257
+ };
1258
+ MemoryListResponseBody: {
1259
+ items: components["schemas"]["MemoryResource"][];
1260
+ };
1261
+ MemoryResource: {
1262
+ /** @description The fact itself */
1263
+ body: string;
1264
+ /** Format: date-time */
1265
+ createdAt: string;
1266
+ id: string;
1267
+ /** @description The name the assistant gave this fact; it overwrites or deletes its own entries by that name */
1268
+ name: string;
1269
+ /** @description Which conversation the assistant learned it in. That conversation may since have been deleted */
1270
+ sourceThreadId?: string;
1271
+ /** Format: date-time */
1272
+ updatedAt: string;
1273
+ };
1274
+ /**
1275
+ * @description One piece of a message. `type` says which of the fields below carries it:
1276
+ *
1277
+ * - `text` — the words, in `text`
1278
+ * - `file` — an attachment uploaded earlier, by id in `attachmentId`
1279
+ * - `data-<something>` — context from the client, in `data`. The name after `data-` is yours;
1280
+ * it is shown to the assistant so it can tell one kind of block from another.
1281
+ *
1282
+ * Order matters: an attachment belongs where it was written, not at the end.
1283
+ */
1284
+ MessagePart: {
1285
+ /** @description For `file` parts. The attachment must have been uploaded and not yet bound to another message. */
1286
+ attachmentId?: string | null;
1287
+ /** @description For `data-*` parts. Any object; its keys reach the assistant as they are. */
1288
+ data?: {
1289
+ [key: string]: unknown;
1290
+ } | null;
1291
+ /** @description For `text` parts. */
1292
+ text?: string | null;
1293
+ type: string;
1294
+ };
1295
+ /**
1296
+ * @description Which client this is and what it can do, so the assistant can ask it to do those things
1297
+ * while it answers. What the operator is looking at travels as `data-*` parts on the message.
1298
+ *
1299
+ * Send `actions` only when they differ from the last message on this conversation. Sending the
1300
+ * block without `actions` keeps whatever was declared before.
1301
+ */
1302
+ ClientContextRequest: {
1303
+ /**
1304
+ * @description The actions on offer right now.
1305
+ *
1306
+ * Omit it when nothing changed since the last message. Send `[]` to say there is nothing
1307
+ * on offer — those are different: a client that moves off the page it was attached to has
1308
+ * to be able to say so, or the assistant keeps calling actions that no longer make sense.
1309
+ */
1310
+ actions?: components["schemas"]["ClientActionRequest"][] | null;
1311
+ /** @description Identifies this client while it stays open. Any stable string; one per tab or process. */
1312
+ clientId: string;
1313
+ /** @description How the client calls itself, for example "Leaflow console (web)". */
1314
+ label?: string;
1315
+ };
1316
+ /** @description A `data-*` part as it was sent. */
1317
+ ClientContextPart: {
1318
+ data: {
1319
+ [key: string]: unknown;
1320
+ };
1321
+ type: string;
1322
+ };
1323
+ /** @description The shape of a tool in the OpenAI Chat Completions API, plus `readOnly` and `timeoutMs`. */
1324
+ ClientActionRequest: {
1325
+ function: components["schemas"]["ClientFunctionRequest"];
1326
+ /** @description True when the action changes nothing outside the client. Anything else goes through this conversation's approval before it runs. */
1327
+ readOnly: boolean;
1328
+ /**
1329
+ * Format: int64
1330
+ * @description How long the assistant should wait for this action. Omit for the default; longer values are capped.
1331
+ */
1332
+ timeoutMs?: number;
1333
+ /**
1334
+ * @description Only functions are supported.
1335
+ * @default function
1336
+ * @enum {string}
1337
+ */
1338
+ type?: "function";
1339
+ };
1340
+ /** @description The function object from the OpenAI tools format. */
1341
+ ClientFunctionRequest: {
1342
+ /** @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. */
1343
+ description: string;
1344
+ /** @description The MCP and Anthropic spelling of `parameters`. Give one or the other, not both. */
1345
+ inputSchema?: {
1346
+ [key: string]: unknown;
1347
+ } | null;
1348
+ name: string;
1349
+ /** @description JSON Schema for the arguments. Omit for an action that takes none. */
1350
+ parameters?: {
1351
+ [key: string]: unknown;
1352
+ } | null;
1353
+ };
1354
+ DynamicCallResultRequestBody: {
1355
+ /** @description The same value sent with the message. A result from a different client is refused. */
1356
+ clientId: string;
1357
+ /** @description Why it failed, when `ok` is false. It reaches the assistant, so write it for a reader who cannot see the screen. */
1358
+ error?: string;
1359
+ /** @description Pass back when there is more to read. The assistant will call again with it. */
1360
+ nextCursor?: string;
1361
+ ok: boolean;
1362
+ /** @description What the action produced. At most 64 KiB; use `nextCursor` for anything larger. */
1363
+ output?: string;
1364
+ };
1365
+ TodoResource: {
1366
+ /** @description The same step phrased as happening now — "Installing nginx". Show this one while the item is in progress. */
1367
+ activeForm: string;
1368
+ /** @description The step as an instruction — "Install nginx". */
1369
+ content: string;
1370
+ /**
1371
+ * @description Where this step stands. At most one item is in_progress at any time.
1372
+ * @enum {string}
1373
+ */
1374
+ status: "pending" | "in_progress" | "completed";
875
1375
  };
876
1376
  TurnIDResponseBody: {
1377
+ /** @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. */
1378
+ queued: boolean;
1379
+ /**
1380
+ * Format: int64
1381
+ * @description How many messages were already waiting ahead of this one. Only meaningful when queued is true.
1382
+ */
1383
+ queuedAhead?: number;
1384
+ /** @description The turn this message started. Empty when the message was queued instead. */
877
1385
  turnId: string;
878
1386
  };
879
1387
  AnswerRequestBody: {
880
- /** @description 问题 id 到所选答案的映射 */
1388
+ /** @description A map from question id to the answer chosen */
881
1389
  answers: {
882
1390
  [key: string]: string;
883
1391
  };
@@ -885,7 +1393,7 @@ export interface components {
885
1393
  RevertRequestBody: {
886
1394
  /**
887
1395
  * Format: int64
888
- * @description 起始序号,该条及其之后的全部条目都会被撤回
1396
+ * @description The starting ordinal; that entry and everything after it is reverted
889
1397
  */
890
1398
  ordinal: number;
891
1399
  };
@@ -893,6 +1401,28 @@ export interface components {
893
1401
  /** Format: int64 */
894
1402
  reverted: number;
895
1403
  };
1404
+ FolderResource: {
1405
+ /** Format: date-time */
1406
+ createdAt: string;
1407
+ id: string;
1408
+ name: string;
1409
+ /**
1410
+ * Format: int64
1411
+ * @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.
1412
+ */
1413
+ threadCount: number;
1414
+ /** Format: date-time */
1415
+ updatedAt: string;
1416
+ };
1417
+ FolderListResponseBody: {
1418
+ folders: components["schemas"]["FolderResource"][] | null;
1419
+ };
1420
+ CreateFolderRequestBody: {
1421
+ name: string;
1422
+ };
1423
+ UpdateFolderRequestBody: {
1424
+ name: string;
1425
+ };
896
1426
  };
897
1427
  responses: never;
898
1428
  parameters: never;
@@ -904,14 +1434,17 @@ export type $defs = Record<string, never>;
904
1434
  export interface operations {
905
1435
  "upload-attachment": {
906
1436
  parameters: {
907
- query?: never;
1437
+ query?: {
1438
+ /** @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. */
1439
+ filename?: string;
1440
+ };
908
1441
  header?: never;
909
1442
  path?: never;
910
1443
  cookie?: never;
911
1444
  };
912
1445
  requestBody: {
913
1446
  content: {
914
- "application/octet-stream": string;
1447
+ "*/*": string;
915
1448
  };
916
1449
  };
917
1450
  responses: {
@@ -949,9 +1482,15 @@ export interface operations {
949
1482
  /** @description OK */
950
1483
  200: {
951
1484
  headers: {
1485
+ /** @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. */
1486
+ "Cache-Control"?: string;
1487
+ /** @description Present on everything that is not an image, carrying the original filename. Absent on images, which are meant to be rendered in place. */
1488
+ "Content-Disposition"?: string;
952
1489
  [name: string]: unknown;
953
1490
  };
954
- content?: never;
1491
+ content: {
1492
+ "*/*": string;
1493
+ };
955
1494
  };
956
1495
  /** @description Error */
957
1496
  default: {
@@ -967,13 +1506,13 @@ export interface operations {
967
1506
  "list-bindings": {
968
1507
  parameters: {
969
1508
  query?: {
970
- /** @description 这一页最多返回多少条 */
1509
+ /** @description How many entries this page returns at most */
971
1510
  limit?: number;
972
- /** @description 跳过多少条。要翻得更深请改用游标翻页的接口 */
1511
+ /** @description How many to skip. To page deeper, use the cursor-paged operation instead */
973
1512
  offset?: number;
974
1513
  platform?: string;
975
1514
  channelId?: string;
976
- /** @description 仅返回处于活跃状态的绑定 */
1515
+ /** @description Return only bindings that are active */
977
1516
  active?: boolean;
978
1517
  };
979
1518
  header?: never;
@@ -1065,12 +1604,12 @@ export interface operations {
1065
1604
  "list-channels": {
1066
1605
  parameters: {
1067
1606
  query?: {
1068
- /** @description 这一页最多返回多少条 */
1607
+ /** @description How many entries this page returns at most */
1069
1608
  limit?: number;
1070
- /** @description 跳过多少条。要翻得更深请改用游标翻页的接口 */
1609
+ /** @description How many to skip. To page deeper, use the cursor-paged operation instead */
1071
1610
  offset?: number;
1072
1611
  platform?: string;
1073
- /** @description 仅返回处于启用状态的通道 */
1612
+ /** @description Return only channels that are enabled */
1074
1613
  active?: boolean;
1075
1614
  };
1076
1615
  header?: never;
@@ -1329,9 +1868,9 @@ export interface operations {
1329
1868
  "check-sender": {
1330
1869
  parameters: {
1331
1870
  query: {
1332
- /** @description 平台上那个人的 id,和绑定、被拒记录里的是同一个值 */
1871
+ /** @description That person's id on the platform, the same value that appears in bindings and rejections */
1333
1872
  peerId: string;
1334
- /** @description 仅 Telegram 这类有用户名的平台填得出来,不带 @。留空即当作没有用户名 */
1873
+ /** @description Only platforms with usernames, such as Telegram, can supply this. Without the @. Leave it empty to mean there is no username */
1335
1874
  username?: string;
1336
1875
  };
1337
1876
  header?: never;
@@ -1488,22 +2027,400 @@ export interface operations {
1488
2027
  };
1489
2028
  };
1490
2029
  };
1491
- "list-models": {
2030
+ "submit-dynamic-call-result": {
1492
2031
  parameters: {
1493
2032
  query?: never;
1494
2033
  header?: never;
1495
- path?: never;
2034
+ path: {
2035
+ /** @description The id of the tool call entry in the conversation. */
2036
+ call: string;
2037
+ };
1496
2038
  cookie?: never;
1497
2039
  };
1498
- requestBody?: never;
1499
- responses: {
2040
+ requestBody: {
2041
+ content: {
2042
+ "application/json": components["schemas"]["DynamicCallResultRequestBody"];
2043
+ };
2044
+ };
2045
+ responses: {
2046
+ /** @description No Content */
2047
+ 204: {
2048
+ headers: {
2049
+ [name: string]: unknown;
2050
+ };
2051
+ content?: never;
2052
+ };
2053
+ /** @description Error */
2054
+ default: {
2055
+ headers: {
2056
+ [name: string]: unknown;
2057
+ };
2058
+ content: {
2059
+ "application/json": components["schemas"]["Error"];
2060
+ };
2061
+ };
2062
+ };
2063
+ };
2064
+ "list-folders": {
2065
+ parameters: {
2066
+ query?: never;
2067
+ header?: never;
2068
+ path?: never;
2069
+ cookie?: never;
2070
+ };
2071
+ requestBody?: never;
2072
+ responses: {
2073
+ /** @description OK */
2074
+ 200: {
2075
+ headers: {
2076
+ [name: string]: unknown;
2077
+ };
2078
+ content: {
2079
+ "application/json": components["schemas"]["FolderListResponseBody"];
2080
+ };
2081
+ };
2082
+ /** @description Error */
2083
+ default: {
2084
+ headers: {
2085
+ [name: string]: unknown;
2086
+ };
2087
+ content: {
2088
+ "application/json": components["schemas"]["Error"];
2089
+ };
2090
+ };
2091
+ };
2092
+ };
2093
+ "create-folder": {
2094
+ parameters: {
2095
+ query?: never;
2096
+ header?: never;
2097
+ path?: never;
2098
+ cookie?: never;
2099
+ };
2100
+ requestBody: {
2101
+ content: {
2102
+ "application/json": components["schemas"]["CreateFolderRequestBody"];
2103
+ };
2104
+ };
2105
+ responses: {
2106
+ /** @description Created */
2107
+ 201: {
2108
+ headers: {
2109
+ [name: string]: unknown;
2110
+ };
2111
+ content: {
2112
+ "application/json": components["schemas"]["FolderResource"];
2113
+ };
2114
+ };
2115
+ /** @description Error */
2116
+ default: {
2117
+ headers: {
2118
+ [name: string]: unknown;
2119
+ };
2120
+ content: {
2121
+ "application/json": components["schemas"]["Error"];
2122
+ };
2123
+ };
2124
+ };
2125
+ };
2126
+ "get-folder": {
2127
+ parameters: {
2128
+ query?: never;
2129
+ header?: never;
2130
+ path: {
2131
+ folder: string;
2132
+ };
2133
+ cookie?: never;
2134
+ };
2135
+ requestBody?: never;
2136
+ responses: {
2137
+ /** @description OK */
2138
+ 200: {
2139
+ headers: {
2140
+ [name: string]: unknown;
2141
+ };
2142
+ content: {
2143
+ "application/json": components["schemas"]["FolderResource"];
2144
+ };
2145
+ };
2146
+ /** @description Error */
2147
+ default: {
2148
+ headers: {
2149
+ [name: string]: unknown;
2150
+ };
2151
+ content: {
2152
+ "application/json": components["schemas"]["Error"];
2153
+ };
2154
+ };
2155
+ };
2156
+ };
2157
+ "delete-folder": {
2158
+ parameters: {
2159
+ query?: never;
2160
+ header?: never;
2161
+ path: {
2162
+ folder: string;
2163
+ };
2164
+ cookie?: never;
2165
+ };
2166
+ requestBody?: never;
2167
+ responses: {
2168
+ /** @description No Content */
2169
+ 204: {
2170
+ headers: {
2171
+ [name: string]: unknown;
2172
+ };
2173
+ content?: never;
2174
+ };
2175
+ /** @description Error */
2176
+ default: {
2177
+ headers: {
2178
+ [name: string]: unknown;
2179
+ };
2180
+ content: {
2181
+ "application/json": components["schemas"]["Error"];
2182
+ };
2183
+ };
2184
+ };
2185
+ };
2186
+ "update-folder": {
2187
+ parameters: {
2188
+ query?: never;
2189
+ header?: never;
2190
+ path: {
2191
+ folder: string;
2192
+ };
2193
+ cookie?: never;
2194
+ };
2195
+ requestBody: {
2196
+ content: {
2197
+ "application/json": components["schemas"]["UpdateFolderRequestBody"];
2198
+ };
2199
+ };
2200
+ responses: {
2201
+ /** @description OK */
2202
+ 200: {
2203
+ headers: {
2204
+ [name: string]: unknown;
2205
+ };
2206
+ content: {
2207
+ "application/json": components["schemas"]["FolderResource"];
2208
+ };
2209
+ };
2210
+ /** @description Error */
2211
+ default: {
2212
+ headers: {
2213
+ [name: string]: unknown;
2214
+ };
2215
+ content: {
2216
+ "application/json": components["schemas"]["Error"];
2217
+ };
2218
+ };
2219
+ };
2220
+ };
2221
+ "list-memories": {
2222
+ parameters: {
2223
+ query?: never;
2224
+ header?: never;
2225
+ path?: never;
2226
+ cookie?: never;
2227
+ };
2228
+ requestBody?: never;
2229
+ responses: {
2230
+ /** @description OK */
2231
+ 200: {
2232
+ headers: {
2233
+ [name: string]: unknown;
2234
+ };
2235
+ content: {
2236
+ "application/json": components["schemas"]["MemoryListResponseBody"];
2237
+ };
2238
+ };
2239
+ /** @description Error */
2240
+ default: {
2241
+ headers: {
2242
+ [name: string]: unknown;
2243
+ };
2244
+ content: {
2245
+ "application/json": components["schemas"]["Error"];
2246
+ };
2247
+ };
2248
+ };
2249
+ };
2250
+ "delete-memory": {
2251
+ parameters: {
2252
+ query?: never;
2253
+ header?: never;
2254
+ path: {
2255
+ memory: string;
2256
+ };
2257
+ cookie?: never;
2258
+ };
2259
+ requestBody?: never;
2260
+ responses: {
2261
+ /** @description No Content */
2262
+ 204: {
2263
+ headers: {
2264
+ [name: string]: unknown;
2265
+ };
2266
+ content?: never;
2267
+ };
2268
+ /** @description Error */
2269
+ default: {
2270
+ headers: {
2271
+ [name: string]: unknown;
2272
+ };
2273
+ content: {
2274
+ "application/json": components["schemas"]["Error"];
2275
+ };
2276
+ };
2277
+ };
2278
+ };
2279
+ "list-skills": {
2280
+ parameters: {
2281
+ query?: never;
2282
+ header?: never;
2283
+ path?: never;
2284
+ cookie?: never;
2285
+ };
2286
+ requestBody?: never;
2287
+ responses: {
2288
+ /** @description OK */
2289
+ 200: {
2290
+ headers: {
2291
+ [name: string]: unknown;
2292
+ };
2293
+ content: {
2294
+ "application/json": components["schemas"]["SkillListResponseBody"];
2295
+ };
2296
+ };
2297
+ /** @description Error */
2298
+ default: {
2299
+ headers: {
2300
+ [name: string]: unknown;
2301
+ };
2302
+ content: {
2303
+ "application/json": components["schemas"]["Error"];
2304
+ };
2305
+ };
2306
+ };
2307
+ };
2308
+ "put-skill": {
2309
+ parameters: {
2310
+ query?: never;
2311
+ header?: never;
2312
+ path?: never;
2313
+ cookie?: never;
2314
+ };
2315
+ requestBody: {
2316
+ content: {
2317
+ "application/json": components["schemas"]["SkillRequestBody"];
2318
+ };
2319
+ };
2320
+ responses: {
2321
+ /** @description OK */
2322
+ 200: {
2323
+ headers: {
2324
+ [name: string]: unknown;
2325
+ };
2326
+ content: {
2327
+ "application/json": components["schemas"]["SkillResource"];
2328
+ };
2329
+ };
2330
+ /** @description Error */
2331
+ default: {
2332
+ headers: {
2333
+ [name: string]: unknown;
2334
+ };
2335
+ content: {
2336
+ "application/json": components["schemas"]["Error"];
2337
+ };
2338
+ };
2339
+ };
2340
+ };
2341
+ "get-skill": {
2342
+ parameters: {
2343
+ query?: never;
2344
+ header?: never;
2345
+ path: {
2346
+ /** @description The skill's name, as `list-skills` returned it. */
2347
+ skill: string;
2348
+ };
2349
+ cookie?: never;
2350
+ };
2351
+ requestBody?: never;
2352
+ responses: {
1500
2353
  /** @description OK */
1501
2354
  200: {
1502
2355
  headers: {
1503
2356
  [name: string]: unknown;
1504
2357
  };
1505
2358
  content: {
1506
- "application/json": components["schemas"]["ModelListResponseBody"];
2359
+ "application/json": components["schemas"]["SkillResource"];
2360
+ };
2361
+ };
2362
+ /** @description Error */
2363
+ default: {
2364
+ headers: {
2365
+ [name: string]: unknown;
2366
+ };
2367
+ content: {
2368
+ "application/json": components["schemas"]["Error"];
2369
+ };
2370
+ };
2371
+ };
2372
+ };
2373
+ "delete-skill": {
2374
+ parameters: {
2375
+ query?: never;
2376
+ header?: never;
2377
+ path: {
2378
+ skill: string;
2379
+ };
2380
+ cookie?: never;
2381
+ };
2382
+ requestBody?: never;
2383
+ responses: {
2384
+ /** @description No Content */
2385
+ 204: {
2386
+ headers: {
2387
+ [name: string]: unknown;
2388
+ };
2389
+ content?: never;
2390
+ };
2391
+ /** @description Error */
2392
+ default: {
2393
+ headers: {
2394
+ [name: string]: unknown;
2395
+ };
2396
+ content: {
2397
+ "application/json": components["schemas"]["Error"];
2398
+ };
2399
+ };
2400
+ };
2401
+ };
2402
+ "set-skill-enabled": {
2403
+ parameters: {
2404
+ query?: never;
2405
+ header?: never;
2406
+ path: {
2407
+ skill: string;
2408
+ };
2409
+ cookie?: never;
2410
+ };
2411
+ requestBody: {
2412
+ content: {
2413
+ "application/json": components["schemas"]["SkillEnabledRequestBody"];
2414
+ };
2415
+ };
2416
+ responses: {
2417
+ /** @description OK */
2418
+ 200: {
2419
+ headers: {
2420
+ [name: string]: unknown;
2421
+ };
2422
+ content: {
2423
+ "application/json": components["schemas"]["SkillResource"];
1507
2424
  };
1508
2425
  };
1509
2426
  /** @description Error */
@@ -1520,10 +2437,20 @@ export interface operations {
1520
2437
  "list-threads": {
1521
2438
  parameters: {
1522
2439
  query?: {
1523
- /** @description 按标题搜索,大小写不敏感。留空则返回最近的对话 */
2440
+ /** @description Search titles, case-insensitively. Leave it empty for the most recent conversations */
1524
2441
  q?: string;
1525
- /** @description 为真时**只**返回已归档的对话,否则只返回未归档的 */
2442
+ /** @description When true, returns **only** archived conversations; otherwise only unarchived ones */
1526
2443
  archived?: boolean;
2444
+ /** @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. */
2445
+ folder?: string;
2446
+ /**
2447
+ * @description Where the previous page ended, from its `nextCursor`. Omit it for the first page.
2448
+ *
2449
+ * 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.
2450
+ *
2451
+ * 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.
2452
+ */
2453
+ cursor?: string;
1527
2454
  limit?: number;
1528
2455
  };
1529
2456
  header?: never;
@@ -1616,6 +2543,35 @@ export interface operations {
1616
2543
  };
1617
2544
  };
1618
2545
  };
2546
+ "delete-thread": {
2547
+ parameters: {
2548
+ query?: never;
2549
+ header?: never;
2550
+ path: {
2551
+ thread: string;
2552
+ };
2553
+ cookie?: never;
2554
+ };
2555
+ requestBody?: never;
2556
+ responses: {
2557
+ /** @description No Content */
2558
+ 204: {
2559
+ headers: {
2560
+ [name: string]: unknown;
2561
+ };
2562
+ content?: never;
2563
+ };
2564
+ /** @description Error */
2565
+ default: {
2566
+ headers: {
2567
+ [name: string]: unknown;
2568
+ };
2569
+ content: {
2570
+ "application/json": components["schemas"]["Error"];
2571
+ };
2572
+ };
2573
+ };
2574
+ };
1619
2575
  "update-thread": {
1620
2576
  parameters: {
1621
2577
  query?: never;
@@ -1688,7 +2644,7 @@ export interface operations {
1688
2644
  "list-earlier-items": {
1689
2645
  parameters: {
1690
2646
  query: {
1691
- /** @description 来自文档里的 earlier.before,取这个序号之前的条目 */
2647
+ /** @description From the document's earlier.before; returns entries before this ordinal */
1692
2648
  before: number;
1693
2649
  };
1694
2650
  header?: never;