@leaflow/sdk 0.0.0-dev.9.gd1c7e65 → 0.0.0-dev.91.g8a09696

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.
@@ -13,8 +13,10 @@ 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; attachments never referenced by any message are cleared periodically.
18
+ *
19
+ * 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
20
  */
19
21
  post: operations["upload-attachment"];
20
22
  delete?: never;
@@ -31,8 +33,10 @@ export interface paths {
31
33
  cookie?: never;
32
34
  };
33
35
  /**
34
- * 取回图片
35
- * @description 按附件 id 取回原始字节,可直接作为 <img> 的地址使用。响应带长期缓存头,附件内容不会变化。附件不存在或不属于当前用户时返回 404
36
+ * Download a file
37
+ * @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.
38
+ *
39
+ * 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
40
  */
37
41
  get: operations["download-attachment"];
38
42
  put?: never;
@@ -51,8 +55,8 @@ export interface paths {
51
55
  cookie?: never;
52
56
  };
53
57
  /**
54
- * 列出绑定
55
- * @description 接入面那张表按通道列出各自绑了谁时用 channelId 过滤。
58
+ * List bindings
59
+ * @description Filter by channelId to show, per channel, who is bound to it.
56
60
  */
57
61
  get: operations["list-bindings"];
58
62
  put?: never;
@@ -70,11 +74,11 @@ export interface paths {
70
74
  path?: never;
71
75
  cookie?: never;
72
76
  };
73
- /** 查看绑定 */
77
+ /** Get a binding */
74
78
  get: operations["get-binding"];
75
79
  put?: never;
76
80
  post?: never;
77
- /** 解除绑定 */
81
+ /** Remove a binding */
78
82
  delete: operations["delete-binding"];
79
83
  options?: never;
80
84
  head?: never;
@@ -88,12 +92,12 @@ export interface paths {
88
92
  path?: never;
89
93
  cookie?: never;
90
94
  };
91
- /** 列出通道 */
95
+ /** List channels */
92
96
  get: operations["list-channels"];
93
97
  put?: never;
94
98
  /**
95
- * 创建通道
96
- * @description 回调密钥归谁定由平台决定,见 list-platforms secretSource:generated 的平台不要传 webhookSecret,我们生成的那把仅在本次响应中返回一次、之后无法再次取回,错过了只能调轮换接口换一把新的;supplied 的平台必须把平台后台那把传进来,此时响应里的webhookSecret null
99
+ * Create a channel
100
+ * @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
101
  */
98
102
  post: operations["create-channel"];
99
103
  delete?: never;
@@ -109,20 +113,20 @@ export interface paths {
109
113
  path?: never;
110
114
  cookie?: never;
111
115
  };
112
- /** 查看通道 */
116
+ /** Get a channel */
113
117
  get: operations["get-channel"];
114
118
  put?: never;
115
119
  post?: never;
116
120
  /**
117
- * 删除通道
118
- * @description 删除后该通道不再接收入站消息,其上的绑定一并失效。项目处于停服或清理状态时本接口仍然可用。
121
+ * Delete a channel
122
+ * @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
123
  */
120
124
  delete: operations["delete-channel"];
121
125
  options?: never;
122
126
  head?: never;
123
127
  /**
124
- * 修改通道
125
- * @description 只修改传了的字段。senderPolicy allowFrom 是一对,由 senderPolicy 决定是否替换;改动对常驻连接要等连接重建后才生效,回调型平台立即生效。
128
+ * Update a channel
129
+ * @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
130
  */
127
131
  patch: operations["update-channel"];
128
132
  trace?: never;
@@ -137,8 +141,8 @@ export interface paths {
137
141
  get?: never;
138
142
  put?: never;
139
143
  /**
140
- * 签发绑定码
141
- * @description 生成一个一次性绑定码交给待绑定的人,他在该平台上用自己的账号把这个码发给助手即完成绑定。绑定只能由本人以这种方式建立,不能直接指定平台账号。绑定码有有效期,过期后需重新签发。
144
+ * Issue a binding code
145
+ * @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
146
  */
143
147
  post: operations["create-binding-code"];
144
148
  delete?: never;
@@ -155,8 +159,8 @@ export interface paths {
155
159
  cookie?: never;
156
160
  };
157
161
  /**
158
- * 查看最近被拒绝的入站消息
159
- * @description 排查「发了消息但助手没有响应」时使用。按时间倒序返回最近被这条通道拒绝的入站消息及其拒绝原因,最常见的原因是发送方尚未绑定。
162
+ * List recently rejected inbound messages
163
+ * @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
164
  */
161
165
  get: operations["list-channel-rejections"];
162
166
  put?: never;
@@ -177,8 +181,8 @@ export interface paths {
177
181
  get?: never;
178
182
  put?: never;
179
183
  /**
180
- * 轮换回调密钥
181
- * @description 换一把新的回调密钥,旧的立即失效,通道降回待平台确认状态。密钥归谁定由平台决定,见 list-platforms secretSource:generated 的平台不要传请求体,新密钥仅在本次响应中返回、之后无法再次取回;supplied 的平台必须把平台后台那把新密钥传进来。
184
+ * Rotate the webhook secret
185
+ * @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
186
  */
183
187
  post: operations["rotate-channel-secret"];
184
188
  delete?: never;
@@ -195,8 +199,8 @@ export interface paths {
195
199
  cookie?: never;
196
200
  };
197
201
  /**
198
- * 推演一个发件人会不会被放行
199
- * @description 改完发件人策略之后用来自查,不发送任何消息、也不改变任何状态:它走的是和真实入站完全相同的那份判定,并说明结论由哪一条规则得出。无法推演绑定码那一条——是否是绑定码取决于对方发来的内容。
202
+ * Test whether a sender would be let through
203
+ * @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
204
  */
201
205
  get: operations["check-sender"];
202
206
  put?: never;
@@ -217,8 +221,8 @@ export interface paths {
217
221
  get?: never;
218
222
  put?: never;
219
223
  /**
220
- * 发起微信扫码登录
221
- * @description 微信个人号通道需要本人扫码登录后才能收发消息。本接口返回二维码,之后轮询 `GET /v1/weixin-logins/{login}` 获取进度;状态提示需要验证码时,调用 `POST /v1/weixin-logins/{login}/verify-code` 补交。
224
+ * Begin a WeChat QR login
225
+ * @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
226
  */
223
227
  post: operations["begin-weixin-login"];
224
228
  delete?: never;
@@ -235,8 +239,8 @@ export interface paths {
235
239
  cookie?: never;
236
240
  };
237
241
  /**
238
- * 列出可接入的平台
239
- * @description 返回本平台当前支持接入的即时通讯平台,以及各自建通道时要走的流程和要填的凭据字段。新建通道表单完全由这份响应驱动:setupMethod 决定展示录入表单还是扫码流程,credentialFields 是要填的字段,secretSource 决定要不要有回调密钥那一栏。
242
+ * List platforms that can be connected
243
+ * @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
244
  */
241
245
  get: operations["list-platforms"];
242
246
  put?: never;
@@ -255,8 +259,8 @@ export interface paths {
255
259
  cookie?: never;
256
260
  };
257
261
  /**
258
- * 查询扫码登录状态
259
- * @description 轮询本接口直到状态变为成功或失败。状态提示需要验证码时,调用补交验证码接口。
262
+ * Get the state of a QR login
263
+ * @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
264
  */
261
265
  get: operations["get-weixin-login"];
262
266
  put?: never;
@@ -277,8 +281,8 @@ export interface paths {
277
281
  get?: never;
278
282
  put?: never;
279
283
  /**
280
- * 补交登录验证码
281
- * @description 微信在扫码后要求短信或设备验证码时使用。验证码由登录发起人在自己手机上获取。
284
+ * Submit a login verification code
285
+ * @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
286
  */
283
287
  post: operations["submit-weixin-verify-code"];
284
288
  delete?: never;
@@ -287,18 +291,42 @@ export interface paths {
287
291
  patch?: never;
288
292
  trace?: never;
289
293
  };
290
- "/api/v1/models": {
294
+ "/api/v1/dynamic-calls/{call}/result": {
291
295
  parameters: {
292
296
  query?: never;
293
297
  header?: never;
294
298
  path?: never;
295
299
  cookie?: never;
296
300
  };
301
+ get?: never;
302
+ put?: never;
297
303
  /**
298
- * 列出可用模型
299
- * @description 返回本平台当前提供的模型及其上下文窗口、推理档位和支持的输入类型。用于填充对话设置里的模型选择。
304
+ * Report what an action produced
305
+ * @description The assistant asks the client to run an action by adding a tool call to the conversation
306
+ * with the namespace `dynamic`; the client acts when that entry turns in_progress and reports
307
+ * back here.
308
+ *
309
+ * The first result is the one that counts. A later one is refused rather than replacing it.
300
310
  */
301
- get: operations["list-models"];
311
+ post: operations["submit-dynamic-call-result"];
312
+ delete?: never;
313
+ options?: never;
314
+ head?: never;
315
+ patch?: never;
316
+ trace?: never;
317
+ };
318
+ "/api/v1/memories": {
319
+ parameters: {
320
+ query?: never;
321
+ header?: never;
322
+ path?: never;
323
+ cookie?: never;
324
+ };
325
+ /**
326
+ * List what the assistant remembers
327
+ * @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.
328
+ */
329
+ get: operations["list-memories"];
302
330
  put?: never;
303
331
  post?: never;
304
332
  delete?: never;
@@ -307,6 +335,91 @@ export interface paths {
307
335
  patch?: never;
308
336
  trace?: never;
309
337
  };
338
+ "/api/v1/memories/{memory}": {
339
+ parameters: {
340
+ query?: never;
341
+ header?: never;
342
+ path?: never;
343
+ cookie?: never;
344
+ };
345
+ get?: never;
346
+ put?: never;
347
+ post?: never;
348
+ /**
349
+ * Delete one memory
350
+ * @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.
351
+ */
352
+ delete: operations["delete-memory"];
353
+ options?: never;
354
+ head?: never;
355
+ patch?: never;
356
+ trace?: never;
357
+ };
358
+ "/api/v1/skills": {
359
+ parameters: {
360
+ query?: never;
361
+ header?: never;
362
+ path?: never;
363
+ cookie?: never;
364
+ };
365
+ /**
366
+ * List the skills this project can use
367
+ * @description Everything the assistant can reach in this project, including the ones that are turned off —
368
+ * an entry that disappeared once it was switched off could not be switched back on.
369
+ *
370
+ * `origin` says whether a skill can be edited here. Skills belonging to the project are
371
+ * visible to everyone in it, whoever wrote them.
372
+ */
373
+ get: operations["list-skills"];
374
+ put?: never;
375
+ /**
376
+ * Write a skill for this project
377
+ * @description Creates it, or replaces the project's skill of that name. The whole package goes in each
378
+ * time: files left out of a write are removed, so the stored skill is what was sent and not
379
+ * what accumulated.
380
+ *
381
+ * A project skill takes precedence over a built-in one of the same name for this project only.
382
+ * The built-in is untouched and reappears if the project's is deleted.
383
+ */
384
+ post: operations["put-skill"];
385
+ delete?: never;
386
+ options?: never;
387
+ head?: never;
388
+ patch?: never;
389
+ trace?: never;
390
+ };
391
+ "/api/v1/skills/{skill}": {
392
+ parameters: {
393
+ query?: never;
394
+ header?: never;
395
+ path?: never;
396
+ cookie?: never;
397
+ };
398
+ /**
399
+ * Read one skill, with its files
400
+ * @description Works for built-in skills too; they simply cannot be written.
401
+ */
402
+ get: operations["get-skill"];
403
+ put?: never;
404
+ post?: never;
405
+ /**
406
+ * Delete this project's skill
407
+ * @description A built-in skill of the same name, if there was one, becomes visible again.
408
+ */
409
+ delete: operations["delete-skill"];
410
+ options?: never;
411
+ head?: never;
412
+ /**
413
+ * Turn a skill on or off
414
+ * @description Separate from writing it, because this is the frequent one: a skill that is off costs
415
+ * nothing and stays where it is.
416
+ *
417
+ * Only skills belonging to the project can be switched. To keep a built-in one out of the
418
+ * way, write a project skill of the same name and turn that off.
419
+ */
420
+ patch: operations["set-skill-enabled"];
421
+ trace?: never;
422
+ };
310
423
  "/api/v1/threads": {
311
424
  parameters: {
312
425
  query?: never;
@@ -315,12 +428,12 @@ export interface paths {
315
428
  cookie?: never;
316
429
  };
317
430
  /**
318
- * 列出对话
319
- * @description 按最近活动排序,只返回当前账号在当前项目里的对话。archived 是一个二选一的开关而不是「包含归档」:归档的对话不出现在默认列表里,要看它们就把这个参数打开。
431
+ * List conversations
432
+ * @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
433
  */
321
434
  get: operations["list-threads"];
322
435
  put?: never;
323
- /** 创建对话 */
436
+ /** Create a conversation */
324
437
  post: operations["create-thread"];
325
438
  delete?: never;
326
439
  options?: never;
@@ -336,8 +449,8 @@ export interface paths {
336
449
  cookie?: never;
337
450
  };
338
451
  /**
339
- * 取回对话文档
340
- * @description 对话的完整当前状态,用于首屏渲染。文档中的 stream 给出实时输出地址和入场票据,流推送的是对这份文档的增量编辑,可直接套用同一套渲染逻辑。
452
+ * Fetch the conversation document
453
+ * @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
454
  */
342
455
  get: operations["get-thread"];
343
456
  put?: never;
@@ -346,8 +459,8 @@ export interface paths {
346
459
  options?: never;
347
460
  head?: never;
348
461
  /**
349
- * 修改对话设置
350
- * @description 可修改模型、推理档位、审批模式和归档状态。改动从下一次 turn 起生效,正在执行的 turn 沿用它启动时的设置。reasoningEffort 仅在同时提供 model 时生效。
462
+ * Update conversation settings
463
+ * @description Changes the approval mode and archived state. A change takes effect from the next turn; a turn already running keeps the settings it started with.
351
464
  */
352
465
  patch: operations["update-thread"];
353
466
  trace?: never;
@@ -362,8 +475,8 @@ export interface paths {
362
475
  get?: never;
363
476
  put?: never;
364
477
  /**
365
- * 批准或拒绝一批工具调用
366
- * @description 批次 id 来自对话文档的 wait 字段。本接口是幂等的:重复提交同一批次不会改变已经生效的决定,也不会报错。批次不属于该对话时返回 404
478
+ * Approve or decline a batch of tool calls
479
+ * @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
480
  */
368
481
  post: operations["decide-approval"];
369
482
  delete?: never;
@@ -380,8 +493,8 @@ export interface paths {
380
493
  cookie?: never;
381
494
  };
382
495
  /**
383
- * 取回更早的对话内容
384
- * @description 首屏只给对话最新的那一段,再往上的内容用本接口按需取回,一次一段。before 用文档里的 earlier.before,响应里的 earlier 是再往上那一段的游标,为 null 表示已经到顶。返回的条目和文档里的 items 是同一种形状,顺序也一样(由旧到新),直接接在现有内容前面即可。
496
+ * Fetch earlier parts of a conversation
497
+ * @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
498
  */
386
499
  get: operations["list-earlier-items"];
387
500
  put?: never;
@@ -402,8 +515,8 @@ export interface paths {
402
515
  get?: never;
403
516
  put?: never;
404
517
  /**
405
- * 中断正在执行的 turn
406
- * @description 对没有正在执行的 turn 的对话调用同样返回 204,不视为错误——用户点击停止与 turn 自然结束之间存在竞争,两种结果一致。项目处于停服或清理状态时本接口仍然可用。
518
+ * Interrupt a running turn
519
+ * @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
520
  */
408
521
  post: operations["interrupt-thread"];
409
522
  delete?: never;
@@ -422,8 +535,8 @@ export interface paths {
422
535
  get?: never;
423
536
  put?: never;
424
537
  /**
425
- * 发送消息并触发一次 turn
426
- * @description 立即返回 turnId,不等待执行完成——一次 turn 可能持续数十分钟。执行进度通过对话文档中 stream 指向的实时流获取,不在本响应里。
538
+ * Send a message and start a turn
539
+ * @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
540
  */
428
541
  post: operations["send-message"];
429
542
  delete?: never;
@@ -442,8 +555,8 @@ export interface paths {
442
555
  get?: never;
443
556
  put?: never;
444
557
  /**
445
- * 回答助手提出的问题
446
- * @description 问题 id 来自对话文档的 wait 字段。已被回答过的问题同样返回 204——可能是另一个页面提交在先,也可能是自动应答窗口已到期,两种情况下 turn 都已带着答案继续执行。
558
+ * Answer the assistant's questions
559
+ * @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
560
  */
448
561
  post: operations["answer-question"];
449
562
  delete?: never;
@@ -461,7 +574,7 @@ export interface paths {
461
574
  };
462
575
  get?: never;
463
576
  put?: never;
464
- /** 标记对话已读 */
577
+ /** Mark a conversation as read */
465
578
  post: operations["mark-thread-read"];
466
579
  delete?: never;
467
580
  options?: never;
@@ -479,8 +592,8 @@ export interface paths {
479
592
  get?: never;
480
593
  put?: never;
481
594
  /**
482
- * 从指定位置起撤回
483
- * @description 撤回 ordinal 及其之后的全部条目。被撤回的条目仍留在逐字稿中并标记 reverted,序号不会重排。返回实际撤回的条目数。
595
+ * Revert from a given point
596
+ * @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
597
  */
485
598
  post: operations["revert-thread"];
486
599
  delete?: never;
@@ -503,11 +616,32 @@ export interface components {
503
616
  status: number;
504
617
  };
505
618
  UploadedResource: {
506
- /** Format: int64 */
507
- height: number;
619
+ /**
620
+ * Format: int64
621
+ * @description Size of what was stored. For an image that has been resized, this is the resized size, not what was uploaded.
622
+ */
623
+ byteSize: number;
624
+ filename: string;
625
+ /**
626
+ * Format: int64
627
+ * @description Null unless kind is image.
628
+ */
629
+ height: number | null;
508
630
  id: string;
509
- /** Format: int64 */
510
- width: number;
631
+ /**
632
+ * @description How the assistant will see this file.
633
+ *
634
+ * - `image` — read directly, and only by models that accept image input
635
+ * - `text` — placed inline in the message when small enough, otherwise read on demand
636
+ * - `binary` — never read directly; the assistant downloads it onto a cloud instance to work with it
637
+ * @enum {string}
638
+ */
639
+ kind: "image" | "text" | "binary";
640
+ /**
641
+ * Format: int64
642
+ * @description Null unless kind is image.
643
+ */
644
+ width: number | null;
511
645
  };
512
646
  BindingResource: {
513
647
  /** Format: uuid */
@@ -526,28 +660,28 @@ export interface components {
526
660
  verifiedAt: string | null;
527
661
  };
528
662
  LengthAwarePageBindingResource: {
529
- /** @description 这一页的内容 */
663
+ /** @description The entries on this page */
530
664
  items: components["schemas"]["BindingResource"][];
531
665
  /**
532
666
  * Format: int64
533
- * @description 这一页最多几条,回显请求里的值
667
+ * @description The page size, echoing what was requested
534
668
  */
535
669
  limit: number;
536
670
  /**
537
671
  * Format: int64
538
- * @description 跳过了多少条,回显请求里的值
672
+ * @description How many were skipped, echoing what was requested
539
673
  */
540
674
  offset: number;
541
675
  /**
542
676
  * Format: int64
543
- * @description 命中的总条数,不只是这一页
677
+ * @description How many match in total, not just on this page
544
678
  */
545
679
  total: number;
546
680
  };
547
681
  ChannelResource: {
548
682
  allowFrom: string[] | null;
549
683
  /**
550
- * @description 平台接入状态。只有 online 才收得到消息、也才签得出绑定码
684
+ * @description How far this channel is from working. Only `online` receives messages and can issue binding codes
551
685
  * @enum {string}
552
686
  */
553
687
  connState: "logged_out" | "qr_pending" | "online" | "expired";
@@ -558,7 +692,7 @@ export interface components {
558
692
  name: string;
559
693
  platform: string;
560
694
  /**
561
- * @description 常驻连接此刻的状态。回调型平台恒为 stopped
695
+ * @description The state of the long-lived connection right now. Always `stopped` for webhook platforms
562
696
  * @enum {string}
563
697
  */
564
698
  runtimeState: "stopped" | "running";
@@ -568,33 +702,33 @@ export interface components {
568
702
  status: "active" | "suspended" | "disabled";
569
703
  /** Format: date-time */
570
704
  updatedAt: string;
571
- /** @description 回调路径,网关配置和排查时用 */
705
+ /** @description The webhook path, for gateway configuration and for diagnosis */
572
706
  webhookPath: string;
573
- /** @description 填到平台后台的回调地址。部署未声明公网入口时为 null */
707
+ /** @description The webhook address to paste into that platform's console. Null when the deployment declares no public entry point */
574
708
  webhookUrl: string | null;
575
709
  };
576
710
  LengthAwarePageChannelResource: {
577
- /** @description 这一页的内容 */
711
+ /** @description The entries on this page */
578
712
  items: components["schemas"]["ChannelResource"][];
579
713
  /**
580
714
  * Format: int64
581
- * @description 这一页最多几条,回显请求里的值
715
+ * @description The page size, echoing what was requested
582
716
  */
583
717
  limit: number;
584
718
  /**
585
719
  * Format: int64
586
- * @description 跳过了多少条,回显请求里的值
720
+ * @description How many were skipped, echoing what was requested
587
721
  */
588
722
  offset: number;
589
723
  /**
590
724
  * Format: int64
591
- * @description 命中的总条数,不只是这一页
725
+ * @description How many match in total, not just on this page
592
726
  */
593
727
  total: number;
594
728
  };
595
729
  CreateChannelRequestBody: {
596
730
  allowFrom?: string[] | null;
597
- /** @description 平台侧凭据。只写不读,创建后无法取回 */
731
+ /** @description Credentials for that platform. Write-only: they cannot be read back after creation */
598
732
  credentials?: {
599
733
  [key: string]: string;
600
734
  };
@@ -602,13 +736,13 @@ export interface components {
602
736
  platform: string;
603
737
  /** @enum {string} */
604
738
  senderPolicy?: "bound_only" | "open";
605
- /** @description 平台生成密钥的平台(secretSource=supplied)必须传;我们生成的(generated)不能传,那把会在本次响应的 webhookSecret 里返回一次 */
739
+ /** @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
740
  webhookSecret?: string;
607
741
  };
608
742
  ChannelWithSecretResponseBody: {
609
743
  allowFrom: string[] | null;
610
744
  /**
611
- * @description 平台接入状态。只有 online 才收得到消息、也才签得出绑定码
745
+ * @description How far this channel is from working. Only `online` receives messages and can issue binding codes
612
746
  * @enum {string}
613
747
  */
614
748
  connState: "logged_out" | "qr_pending" | "online" | "expired";
@@ -619,7 +753,7 @@ export interface components {
619
753
  name: string;
620
754
  platform: string;
621
755
  /**
622
- * @description 常驻连接此刻的状态。回调型平台恒为 stopped
756
+ * @description The state of the long-lived connection right now. Always `stopped` for webhook platforms
623
757
  * @enum {string}
624
758
  */
625
759
  runtimeState: "stopped" | "running";
@@ -629,24 +763,24 @@ export interface components {
629
763
  status: "active" | "suspended" | "disabled";
630
764
  /** Format: date-time */
631
765
  updatedAt: string;
632
- /** @description 回调路径,网关配置和排查时用 */
766
+ /** @description The webhook path, for gateway configuration and for diagnosis */
633
767
  webhookPath: string;
634
- /** @description 我们生成的那把回调密钥,拿去粘到平台后台。**之后无法再次取回**,只能轮换出新的一把。密钥由平台生成(secretSource=supplied)或该平台不走回调时为 null */
768
+ /** @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
769
  webhookSecret: string | null;
636
- /** @description 填到平台后台的回调地址。部署未声明公网入口时为 null */
770
+ /** @description The webhook address to paste into that platform's console. Null when the deployment declares no public entry point */
637
771
  webhookUrl: string | null;
638
772
  };
639
773
  UpdateChannelRequestBody: {
640
- /** @description 放行名单。仅在同时传了 senderPolicy 时生效 */
774
+ /** @description The allow list. Only applied when senderPolicy is sent as well */
641
775
  allowFrom?: string[] | null;
642
- /** @description 整份替换而不是逐键合并。不传表示不动 */
776
+ /** @description Replaced wholesale rather than merged key by key. Absent means unchanged */
643
777
  credentials?: {
644
778
  [key: string]: string;
645
779
  };
646
780
  enabled?: boolean;
647
781
  name?: string;
648
782
  /**
649
- * @description 传了才会连同 allowFrom 一起替换
783
+ * @description Only when this is sent is allowFrom replaced along with it
650
784
  * @enum {string}
651
785
  */
652
786
  senderPolicy?: "bound_only" | "open";
@@ -656,6 +790,22 @@ export interface components {
656
790
  /** Format: date-time */
657
791
  expiresAt: string;
658
792
  };
793
+ PartResource: {
794
+ /** @description For `file` parts. Points at one of this entry's `attachments`. */
795
+ attachmentId?: string | null;
796
+ /**
797
+ * @description Addresses this part in the live stream — text arrives as `append` frames pointing at
798
+ * `/items/{item}/parts/{id}/text`.
799
+ *
800
+ * Not an array index. It looks like one today because parts are only ever appended, and a
801
+ * client that treats it as one keeps working right up until that stops being true.
802
+ */
803
+ id: string;
804
+ /** @description For `text` parts. Grows as the answer is written. */
805
+ text?: string | null;
806
+ /** @enum {string} */
807
+ type: "text" | "file";
808
+ };
659
809
  RejectionResource: {
660
810
  /** Format: date-time */
661
811
  at: string;
@@ -671,7 +821,7 @@ export interface components {
671
821
  rejections: components["schemas"]["RejectionResource"][] | null;
672
822
  };
673
823
  RotateSecretRequestBody: {
674
- /** @description 平台生成密钥的平台(secretSource=supplied)必须传新的那把;我们生成的(generated)不能传 */
824
+ /** @description Required for platforms that generate the secret themselves (secretSource=supplied). Must be absent for `generated` ones */
675
825
  webhookSecret?: string;
676
826
  };
677
827
  WebhookSecretResponseBody: {
@@ -688,14 +838,14 @@ export interface components {
688
838
  LoginResource: {
689
839
  /**
690
840
  * Format: date-time
691
- * @description 这条登录流的截止时间。到点之后不要再轮询,重新发起一次
841
+ * @description When this login flow expires. Past that, stop polling and start a new one
692
842
  */
693
843
  expiresAt: string;
694
844
  /** Format: uuid */
695
845
  id: string;
696
- /** @description 二维码的内容,由客户端编码成二维码图形渲染(不是图片地址,也不是 data URI)。码过期时这条流会自己换一张接着等,所以每次轮询拿到的可能是新的一串 */
846
+ /** @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
847
  qrcodeData: string;
698
- /** @description 失败原因。仅在 status error expired 时有内容 */
848
+ /** @description Why it failed. Present only when status is error or expired */
699
849
  reason: string;
700
850
  /** @enum {string} */
701
851
  status: "wait" | "scanned" | "confirmed" | "expired" | "error" | "need_verify_code";
@@ -717,9 +867,9 @@ export interface components {
717
867
  setupChallenge: "none" | "webhook" | "scan";
718
868
  /** @enum {string} */
719
869
  setupMethod: "credentials" | "scan";
720
- /** @description 回调路径模板,{channel} 处替换为通道 id */
870
+ /** @description The webhook path template; {channel} is replaced with the channel id */
721
871
  webhookPath: string;
722
- /** @description 完整回调地址模板。部署未声明公网入口时为 null */
872
+ /** @description The full webhook address template. Null when the deployment declares no public entry point */
723
873
  webhookUrlTemplate: string | null;
724
874
  };
725
875
  PlatformListResponseBody: {
@@ -728,15 +878,60 @@ export interface components {
728
878
  VerifyCodeRequestBody: {
729
879
  code: string;
730
880
  };
731
- ModelResource: {
732
- /** Format: int64 */
733
- contextWindow: number;
734
- inputModalities: string[] | null;
735
- key: string;
736
- reasoningTiers: string[] | null;
881
+ SkillResource: {
882
+ /**
883
+ * @description True when the assistant wrote this skill during a conversation rather than a person
884
+ * writing it here.
885
+ *
886
+ * Which conversation is deliberately not returned: skills are shared across the project
887
+ * while conversations belong to one person, so naming one would tell everybody in the
888
+ * project that a particular colleague had it.
889
+ */
890
+ authoredByAssistant: boolean;
891
+ /** @description Why the assistant would open this skill. It sits in every request, so it is the one field worth writing carefully. */
892
+ description: string;
893
+ enabled: boolean;
894
+ /** @description Path to contents, `SKILL.md` among them. Only returned by `get-skill`; the list leaves it out. */
895
+ files?: {
896
+ [key: string]: string;
897
+ } | null;
898
+ name: string;
899
+ /**
900
+ * @description `builtin` — provided by the platform and read-only here.
901
+ * `project` — written for this project and editable by anyone in it.
902
+ * @enum {string}
903
+ */
904
+ origin: "builtin" | "project";
905
+ shortDescription: string | null;
906
+ /**
907
+ * Format: date-time
908
+ * @description Null for built-in skills, which have no edit history here.
909
+ */
910
+ updatedAt: string | null;
737
911
  };
738
- ModelListResponseBody: {
739
- models: components["schemas"]["ModelResource"][] | null;
912
+ SkillListResponseBody: {
913
+ skills: components["schemas"]["SkillResource"][];
914
+ };
915
+ SkillRequestBody: {
916
+ /** @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". */
917
+ description: string;
918
+ /** @default true */
919
+ enabled?: boolean;
920
+ /**
921
+ * @description Path to contents. `SKILL.md` is required; anything else it references goes alongside it.
922
+ *
923
+ * Paths are relative to the skill and cannot leave it. At most 32 files, 256 KiB each and
924
+ * 1 MiB in total.
925
+ */
926
+ files: {
927
+ [key: string]: string;
928
+ };
929
+ /** @description Also how the assistant refers to it, so renaming is deleting and writing again. */
930
+ name: string;
931
+ shortDescription?: string;
932
+ };
933
+ SkillEnabledRequestBody: {
934
+ enabled: boolean;
740
935
  };
741
936
  ThreadSummaryResource: {
742
937
  /** @enum {string} */
@@ -756,7 +951,7 @@ export interface components {
756
951
  };
757
952
  CreateThreadRequestBody: {
758
953
  /**
759
- * @description 不传则使用平台默认审批模式
954
+ * @description Absent uses the platform's default approval mode
760
955
  * @enum {string}
761
956
  */
762
957
  approvalMode?: "guardian" | "manual" | "yolo";
@@ -764,6 +959,14 @@ export interface components {
764
959
  ContextResource: {
765
960
  /** Format: int64 */
766
961
  compactAt: number | null;
962
+ /**
963
+ * @description What kinds of input the model behind this conversation accepts, as modality names: text, image.
964
+ *
965
+ * 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.
966
+ *
967
+ * 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.
968
+ */
969
+ inputModalities: string[];
767
970
  model: string;
768
971
  /** Format: int64 */
769
972
  used: number | null;
@@ -779,10 +982,24 @@ export interface components {
779
982
  };
780
983
  AttachmentResource: {
781
984
  /** Format: int64 */
782
- height: number;
985
+ byteSize: number;
986
+ filename: string;
987
+ /**
988
+ * Format: int64
989
+ * @description Null unless kind is image. Width and height are here so a client can hold the space before the image itself has loaded.
990
+ */
991
+ height: number | null;
783
992
  id: string;
784
- /** Format: int64 */
785
- width: number;
993
+ /**
994
+ * @description What this attachment is. A client renders an image in place and everything else as a file to download.
995
+ * @enum {string}
996
+ */
997
+ kind: "image" | "text" | "binary";
998
+ /**
999
+ * Format: int64
1000
+ * @description Null unless kind is image.
1001
+ */
1002
+ width: number | null;
786
1003
  };
787
1004
  ItemResource: {
788
1005
  /** @enum {string|null} */
@@ -790,13 +1007,25 @@ export interface components {
790
1007
  approvalReason?: string | null;
791
1008
  arguments?: string;
792
1009
  attachments?: components["schemas"]["AttachmentResource"][] | null;
1010
+ /**
1011
+ * @description The context blocks the client attached to this message.
1012
+ *
1013
+ * **Not part of what the operator wrote** — `text` is. Render the message from `text` and
1014
+ * leave these out of the bubble; they are here so a client that did not send them, or one
1015
+ * that reloaded, can still read what the assistant was given.
1016
+ *
1017
+ * The actions declared alongside them are not returned: they are re-declared as they
1018
+ * change and would make every fetch of the conversation carry them again.
1019
+ */
1020
+ clientContext?: components["schemas"]["ClientContextPart"][] | null;
793
1021
  /** Format: date-time */
794
1022
  createdAt: string;
795
1023
  detail?: string | null;
1024
+ presentation?: components["schemas"]["PresentationResource"] | null;
796
1025
  /** Format: int64 */
797
1026
  durationMs?: number | null;
798
1027
  id: string;
799
- /** @description 产出这一条的模型。用户自己发的消息为 null */
1028
+ /** @description The model that produced this entry. Null for messages the user sent */
800
1029
  model: string | null;
801
1030
  namespace?: string | null;
802
1031
  /** Format: int64 */
@@ -805,14 +1034,69 @@ export interface components {
805
1034
  /** @enum {string} */
806
1035
  status: "pending" | "in_progress" | "completed" | "failed" | "declined" | "interrupted";
807
1036
  target?: string | null;
808
- text?: string;
1037
+ /**
1038
+ * @description The content of this entry, in the order it was written. A message that is only text is a
1039
+ * single part, which is most of them.
1040
+ *
1041
+ * An attachment belongs where it was written, so render these in order rather than putting
1042
+ * them all at the end.
1043
+ */
1044
+ parts?: components["schemas"]["PartResource"][] | null;
809
1045
  tool?: string | null;
810
1046
  /**
811
- * @description 决定这一条包含哪些字段
1047
+ * @description Determines which fields this entry carries
812
1048
  * @enum {string}
813
1049
  */
814
1050
  type: "user_message" | "agent_message" | "reasoning" | "dynamic_tool_call" | "context_compaction" | "token_budget_reminder" | "turn_failure";
815
1051
  };
1052
+ /**
1053
+ * @description Structured detail produced by a tool call, in addition to the single-line `detail`. Null
1054
+ * when the call produced none.
1055
+ *
1056
+ * `kind` determines which of the remaining fields is populated.
1057
+ */
1058
+ PresentationResource: {
1059
+ fileDiff?: components["schemas"]["FileDiffResource"] | null;
1060
+ /**
1061
+ * @description Determines which of the remaining fields is populated
1062
+ * @enum {string}
1063
+ */
1064
+ kind: "file_diff";
1065
+ };
1066
+ /**
1067
+ * @description The change a tool call applied to a single file.
1068
+ *
1069
+ * Populated once the call has completed successfully. It is absent while the call is pending
1070
+ * or awaiting approval, as the file's prior contents are read during execution. To preview an
1071
+ * edit awaiting approval, derive it from the call's `old_string` and `new_string` arguments.
1072
+ */
1073
+ FileDiffResource: {
1074
+ /**
1075
+ * Format: int64
1076
+ * @description Lines added. Complete even when `unified` is null
1077
+ */
1078
+ added: number;
1079
+ /** @description Absolute path of the file on the instance */
1080
+ path: string;
1081
+ /**
1082
+ * Format: int64
1083
+ * @description Lines removed. Complete even when `unified` is null
1084
+ */
1085
+ removed: number;
1086
+ /**
1087
+ * @description What the call did to the file
1088
+ * @enum {string}
1089
+ */
1090
+ status: "added" | "modified" | "deleted";
1091
+ /**
1092
+ * @description The change as a unified diff with three lines of context. A file created by the call is
1093
+ * diffed against `/dev/null`.
1094
+ *
1095
+ * Null when the change exceeds the service's size limit. The diff is omitted in full
1096
+ * rather than truncated; `added` and `removed` remain complete.
1097
+ */
1098
+ unified?: string | null;
1099
+ };
816
1100
  StreamResource: {
817
1101
  path: string;
818
1102
  ticket: string;
@@ -850,6 +1134,8 @@ export interface components {
850
1134
  status: string;
851
1135
  stream: components["schemas"]["StreamResource"] | null;
852
1136
  turn: components["schemas"]["TurnResource"] | null;
1137
+ /** @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. */
1138
+ todos?: components["schemas"]["TodoResource"][];
853
1139
  turnId: string | null;
854
1140
  wait: components["schemas"]["WaitResource"] | null;
855
1141
  };
@@ -857,8 +1143,6 @@ export interface components {
857
1143
  /** @enum {string} */
858
1144
  approvalMode?: "guardian" | "manual" | "yolo";
859
1145
  archived?: boolean;
860
- model?: string;
861
- reasoningEffort?: string;
862
1146
  };
863
1147
  DecideRequestBody: {
864
1148
  approved: boolean;
@@ -869,15 +1153,144 @@ export interface components {
869
1153
  items: components["schemas"]["ItemResource"][] | null;
870
1154
  };
871
1155
  SendMessageRequestBody: {
872
- /** @description 此前上传、尚未绑定到任何消息的附件 id */
873
- attachmentIds?: string[] | null;
874
- text: string;
1156
+ client?: components["schemas"]["ClientContextRequest"];
1157
+ /**
1158
+ * @description The message, in the order it was written. A message with nothing but text is a single
1159
+ * text part; that is the ordinary case and nothing else is required.
1160
+ */
1161
+ parts: components["schemas"]["MessagePart"][];
1162
+ };
1163
+ MemoryListResponseBody: {
1164
+ items: components["schemas"]["MemoryResource"][];
1165
+ };
1166
+ MemoryResource: {
1167
+ /** @description The fact itself */
1168
+ body: string;
1169
+ /** Format: date-time */
1170
+ createdAt: string;
1171
+ id: string;
1172
+ /** @description The name the assistant gave this fact; it overwrites or deletes its own entries by that name */
1173
+ name: string;
1174
+ /** @description Which conversation the assistant learned it in. That conversation may since have been deleted */
1175
+ sourceThreadId?: string;
1176
+ /** Format: date-time */
1177
+ updatedAt: string;
1178
+ };
1179
+ /**
1180
+ * @description One piece of a message. `type` says which of the fields below carries it:
1181
+ *
1182
+ * - `text` — the words, in `text`
1183
+ * - `file` — an attachment uploaded earlier, by id in `attachmentId`
1184
+ * - `data-<something>` — context from the client, in `data`. The name after `data-` is yours;
1185
+ * it is shown to the assistant so it can tell one kind of block from another.
1186
+ *
1187
+ * Order matters: an attachment belongs where it was written, not at the end.
1188
+ */
1189
+ MessagePart: {
1190
+ /** @description For `file` parts. The attachment must have been uploaded and not yet bound to another message. */
1191
+ attachmentId?: string | null;
1192
+ /** @description For `data-*` parts. Any object; its keys reach the assistant as they are. */
1193
+ data?: {
1194
+ [key: string]: unknown;
1195
+ } | null;
1196
+ /** @description For `text` parts. */
1197
+ text?: string | null;
1198
+ type: string;
1199
+ };
1200
+ /**
1201
+ * @description Which client this is and what it can do, so the assistant can ask it to do those things
1202
+ * while it answers. What the operator is looking at travels as `data-*` parts on the message.
1203
+ *
1204
+ * Send `actions` only when they differ from the last message on this conversation. Sending the
1205
+ * block without `actions` keeps whatever was declared before.
1206
+ */
1207
+ ClientContextRequest: {
1208
+ /**
1209
+ * @description The actions on offer right now.
1210
+ *
1211
+ * Omit it when nothing changed since the last message. Send `[]` to say there is nothing
1212
+ * on offer — those are different: a client that moves off the page it was attached to has
1213
+ * to be able to say so, or the assistant keeps calling actions that no longer make sense.
1214
+ */
1215
+ actions?: components["schemas"]["ClientActionRequest"][] | null;
1216
+ /** @description Identifies this client while it stays open. Any stable string; one per tab or process. */
1217
+ clientId: string;
1218
+ /** @description How the client calls itself, for example "Leaflow console (web)". */
1219
+ label?: string;
1220
+ };
1221
+ /** @description A `data-*` part as it was sent. */
1222
+ ClientContextPart: {
1223
+ data: {
1224
+ [key: string]: unknown;
1225
+ };
1226
+ type: string;
1227
+ };
1228
+ /** @description The shape of a tool in the OpenAI Chat Completions API, plus `readOnly` and `timeoutMs`. */
1229
+ ClientActionRequest: {
1230
+ function: components["schemas"]["ClientFunctionRequest"];
1231
+ /** @description True when the action changes nothing outside the client. Anything else goes through this conversation's approval before it runs. */
1232
+ readOnly: boolean;
1233
+ /**
1234
+ * Format: int64
1235
+ * @description How long the assistant should wait for this action. Omit for the default; longer values are capped.
1236
+ */
1237
+ timeoutMs?: number;
1238
+ /**
1239
+ * @description Only functions are supported.
1240
+ * @default function
1241
+ * @enum {string}
1242
+ */
1243
+ type?: "function";
1244
+ };
1245
+ /** @description The function object from the OpenAI tools format. */
1246
+ ClientFunctionRequest: {
1247
+ /** @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. */
1248
+ description: string;
1249
+ /** @description The MCP and Anthropic spelling of `parameters`. Give one or the other, not both. */
1250
+ inputSchema?: {
1251
+ [key: string]: unknown;
1252
+ } | null;
1253
+ name: string;
1254
+ /** @description JSON Schema for the arguments. Omit for an action that takes none. */
1255
+ parameters?: {
1256
+ [key: string]: unknown;
1257
+ } | null;
1258
+ };
1259
+ DynamicCallResultRequestBody: {
1260
+ /** @description The same value sent with the message. A result from a different client is refused. */
1261
+ clientId: string;
1262
+ /** @description Why it failed, when `ok` is false. It reaches the assistant, so write it for a reader who cannot see the screen. */
1263
+ error?: string;
1264
+ /** @description Pass back when there is more to read. The assistant will call again with it. */
1265
+ nextCursor?: string;
1266
+ ok: boolean;
1267
+ /** @description What the action produced. At most 64 KiB; use `nextCursor` for anything larger. */
1268
+ output?: string;
1269
+ };
1270
+ TodoResource: {
1271
+ /** @description The same step phrased as happening now — "Installing nginx". Show this one while the item is in progress. */
1272
+ activeForm: string;
1273
+ /** @description The step as an instruction — "Install nginx". */
1274
+ content: string;
1275
+ /**
1276
+ * @description Where this step stands. At most one item is in_progress at any time.
1277
+ * @enum {string}
1278
+ */
1279
+ status: "pending" | "in_progress" | "completed";
875
1280
  };
876
1281
  TurnIDResponseBody: {
1282
+ /** @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. */
1283
+ queued: boolean;
1284
+ /**
1285
+ * Format: int64
1286
+ * @description How many messages were already waiting ahead of this one. Only meaningful when queued is true.
1287
+ */
1288
+ queuedAhead?: number;
1289
+ /** @description The turn this message started. Empty when the message was queued instead. */
877
1290
  turnId: string;
878
1291
  };
879
1292
  AnswerRequestBody: {
880
- /** @description 问题 id 到所选答案的映射 */
1293
+ /** @description A map from question id to the answer chosen */
881
1294
  answers: {
882
1295
  [key: string]: string;
883
1296
  };
@@ -885,7 +1298,7 @@ export interface components {
885
1298
  RevertRequestBody: {
886
1299
  /**
887
1300
  * Format: int64
888
- * @description 起始序号,该条及其之后的全部条目都会被撤回
1301
+ * @description The starting ordinal; that entry and everything after it is reverted
889
1302
  */
890
1303
  ordinal: number;
891
1304
  };
@@ -904,14 +1317,17 @@ export type $defs = Record<string, never>;
904
1317
  export interface operations {
905
1318
  "upload-attachment": {
906
1319
  parameters: {
907
- query?: never;
1320
+ query?: {
1321
+ /** @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. */
1322
+ filename?: string;
1323
+ };
908
1324
  header?: never;
909
1325
  path?: never;
910
1326
  cookie?: never;
911
1327
  };
912
1328
  requestBody: {
913
1329
  content: {
914
- "application/octet-stream": string;
1330
+ "*/*": string;
915
1331
  };
916
1332
  };
917
1333
  responses: {
@@ -949,12 +1365,14 @@ export interface operations {
949
1365
  /** @description OK */
950
1366
  200: {
951
1367
  headers: {
952
- /** @description 私有而且长缓存:这些字节按 id 寻址而 id 永不复用,所以它们永远不会变;而它们属于一个人,所以不能进任何共享缓存。 */
1368
+ /** @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
1369
  "Cache-Control"?: string;
1370
+ /** @description Present on everything that is not an image, carrying the original filename. Absent on images, which are meant to be rendered in place. */
1371
+ "Content-Disposition"?: string;
954
1372
  [name: string]: unknown;
955
1373
  };
956
1374
  content: {
957
- "image/*": string;
1375
+ "*/*": string;
958
1376
  };
959
1377
  };
960
1378
  /** @description Error */
@@ -971,13 +1389,13 @@ export interface operations {
971
1389
  "list-bindings": {
972
1390
  parameters: {
973
1391
  query?: {
974
- /** @description 这一页最多返回多少条 */
1392
+ /** @description How many entries this page returns at most */
975
1393
  limit?: number;
976
- /** @description 跳过多少条。要翻得更深请改用游标翻页的接口 */
1394
+ /** @description How many to skip. To page deeper, use the cursor-paged operation instead */
977
1395
  offset?: number;
978
1396
  platform?: string;
979
1397
  channelId?: string;
980
- /** @description 仅返回处于活跃状态的绑定 */
1398
+ /** @description Return only bindings that are active */
981
1399
  active?: boolean;
982
1400
  };
983
1401
  header?: never;
@@ -1069,12 +1487,12 @@ export interface operations {
1069
1487
  "list-channels": {
1070
1488
  parameters: {
1071
1489
  query?: {
1072
- /** @description 这一页最多返回多少条 */
1490
+ /** @description How many entries this page returns at most */
1073
1491
  limit?: number;
1074
- /** @description 跳过多少条。要翻得更深请改用游标翻页的接口 */
1492
+ /** @description How many to skip. To page deeper, use the cursor-paged operation instead */
1075
1493
  offset?: number;
1076
1494
  platform?: string;
1077
- /** @description 仅返回处于启用状态的通道 */
1495
+ /** @description Return only channels that are enabled */
1078
1496
  active?: boolean;
1079
1497
  };
1080
1498
  header?: never;
@@ -1333,9 +1751,9 @@ export interface operations {
1333
1751
  "check-sender": {
1334
1752
  parameters: {
1335
1753
  query: {
1336
- /** @description 平台上那个人的 id,和绑定、被拒记录里的是同一个值 */
1754
+ /** @description That person's id on the platform, the same value that appears in bindings and rejections */
1337
1755
  peerId: string;
1338
- /** @description Telegram 这类有用户名的平台填得出来,不带 @。留空即当作没有用户名 */
1756
+ /** @description Only platforms with usernames, such as Telegram, can supply this. Without the @. Leave it empty to mean there is no username */
1339
1757
  username?: string;
1340
1758
  };
1341
1759
  header?: never;
@@ -1492,7 +1910,41 @@ export interface operations {
1492
1910
  };
1493
1911
  };
1494
1912
  };
1495
- "list-models": {
1913
+ "submit-dynamic-call-result": {
1914
+ parameters: {
1915
+ query?: never;
1916
+ header?: never;
1917
+ path: {
1918
+ /** @description The id of the tool call entry in the conversation. */
1919
+ call: string;
1920
+ };
1921
+ cookie?: never;
1922
+ };
1923
+ requestBody: {
1924
+ content: {
1925
+ "application/json": components["schemas"]["DynamicCallResultRequestBody"];
1926
+ };
1927
+ };
1928
+ responses: {
1929
+ /** @description No Content */
1930
+ 204: {
1931
+ headers: {
1932
+ [name: string]: unknown;
1933
+ };
1934
+ content?: never;
1935
+ };
1936
+ /** @description Error */
1937
+ default: {
1938
+ headers: {
1939
+ [name: string]: unknown;
1940
+ };
1941
+ content: {
1942
+ "application/json": components["schemas"]["Error"];
1943
+ };
1944
+ };
1945
+ };
1946
+ };
1947
+ "list-memories": {
1496
1948
  parameters: {
1497
1949
  query?: never;
1498
1950
  header?: never;
@@ -1507,7 +1959,194 @@ export interface operations {
1507
1959
  [name: string]: unknown;
1508
1960
  };
1509
1961
  content: {
1510
- "application/json": components["schemas"]["ModelListResponseBody"];
1962
+ "application/json": components["schemas"]["MemoryListResponseBody"];
1963
+ };
1964
+ };
1965
+ /** @description Error */
1966
+ default: {
1967
+ headers: {
1968
+ [name: string]: unknown;
1969
+ };
1970
+ content: {
1971
+ "application/json": components["schemas"]["Error"];
1972
+ };
1973
+ };
1974
+ };
1975
+ };
1976
+ "delete-memory": {
1977
+ parameters: {
1978
+ query?: never;
1979
+ header?: never;
1980
+ path: {
1981
+ memory: string;
1982
+ };
1983
+ cookie?: never;
1984
+ };
1985
+ requestBody?: never;
1986
+ responses: {
1987
+ /** @description No Content */
1988
+ 204: {
1989
+ headers: {
1990
+ [name: string]: unknown;
1991
+ };
1992
+ content?: never;
1993
+ };
1994
+ /** @description Error */
1995
+ default: {
1996
+ headers: {
1997
+ [name: string]: unknown;
1998
+ };
1999
+ content: {
2000
+ "application/json": components["schemas"]["Error"];
2001
+ };
2002
+ };
2003
+ };
2004
+ };
2005
+ "list-skills": {
2006
+ parameters: {
2007
+ query?: never;
2008
+ header?: never;
2009
+ path?: never;
2010
+ cookie?: never;
2011
+ };
2012
+ requestBody?: never;
2013
+ responses: {
2014
+ /** @description OK */
2015
+ 200: {
2016
+ headers: {
2017
+ [name: string]: unknown;
2018
+ };
2019
+ content: {
2020
+ "application/json": components["schemas"]["SkillListResponseBody"];
2021
+ };
2022
+ };
2023
+ /** @description Error */
2024
+ default: {
2025
+ headers: {
2026
+ [name: string]: unknown;
2027
+ };
2028
+ content: {
2029
+ "application/json": components["schemas"]["Error"];
2030
+ };
2031
+ };
2032
+ };
2033
+ };
2034
+ "put-skill": {
2035
+ parameters: {
2036
+ query?: never;
2037
+ header?: never;
2038
+ path?: never;
2039
+ cookie?: never;
2040
+ };
2041
+ requestBody: {
2042
+ content: {
2043
+ "application/json": components["schemas"]["SkillRequestBody"];
2044
+ };
2045
+ };
2046
+ responses: {
2047
+ /** @description OK */
2048
+ 200: {
2049
+ headers: {
2050
+ [name: string]: unknown;
2051
+ };
2052
+ content: {
2053
+ "application/json": components["schemas"]["SkillResource"];
2054
+ };
2055
+ };
2056
+ /** @description Error */
2057
+ default: {
2058
+ headers: {
2059
+ [name: string]: unknown;
2060
+ };
2061
+ content: {
2062
+ "application/json": components["schemas"]["Error"];
2063
+ };
2064
+ };
2065
+ };
2066
+ };
2067
+ "get-skill": {
2068
+ parameters: {
2069
+ query?: never;
2070
+ header?: never;
2071
+ path: {
2072
+ /** @description The skill's name, as `list-skills` returned it. */
2073
+ skill: string;
2074
+ };
2075
+ cookie?: never;
2076
+ };
2077
+ requestBody?: never;
2078
+ responses: {
2079
+ /** @description OK */
2080
+ 200: {
2081
+ headers: {
2082
+ [name: string]: unknown;
2083
+ };
2084
+ content: {
2085
+ "application/json": components["schemas"]["SkillResource"];
2086
+ };
2087
+ };
2088
+ /** @description Error */
2089
+ default: {
2090
+ headers: {
2091
+ [name: string]: unknown;
2092
+ };
2093
+ content: {
2094
+ "application/json": components["schemas"]["Error"];
2095
+ };
2096
+ };
2097
+ };
2098
+ };
2099
+ "delete-skill": {
2100
+ parameters: {
2101
+ query?: never;
2102
+ header?: never;
2103
+ path: {
2104
+ skill: string;
2105
+ };
2106
+ cookie?: never;
2107
+ };
2108
+ requestBody?: never;
2109
+ responses: {
2110
+ /** @description No Content */
2111
+ 204: {
2112
+ headers: {
2113
+ [name: string]: unknown;
2114
+ };
2115
+ content?: never;
2116
+ };
2117
+ /** @description Error */
2118
+ default: {
2119
+ headers: {
2120
+ [name: string]: unknown;
2121
+ };
2122
+ content: {
2123
+ "application/json": components["schemas"]["Error"];
2124
+ };
2125
+ };
2126
+ };
2127
+ };
2128
+ "set-skill-enabled": {
2129
+ parameters: {
2130
+ query?: never;
2131
+ header?: never;
2132
+ path: {
2133
+ skill: string;
2134
+ };
2135
+ cookie?: never;
2136
+ };
2137
+ requestBody: {
2138
+ content: {
2139
+ "application/json": components["schemas"]["SkillEnabledRequestBody"];
2140
+ };
2141
+ };
2142
+ responses: {
2143
+ /** @description OK */
2144
+ 200: {
2145
+ headers: {
2146
+ [name: string]: unknown;
2147
+ };
2148
+ content: {
2149
+ "application/json": components["schemas"]["SkillResource"];
1511
2150
  };
1512
2151
  };
1513
2152
  /** @description Error */
@@ -1524,9 +2163,9 @@ export interface operations {
1524
2163
  "list-threads": {
1525
2164
  parameters: {
1526
2165
  query?: {
1527
- /** @description 按标题搜索,大小写不敏感。留空则返回最近的对话 */
2166
+ /** @description Search titles, case-insensitively. Leave it empty for the most recent conversations */
1528
2167
  q?: string;
1529
- /** @description 为真时**只**返回已归档的对话,否则只返回未归档的 */
2168
+ /** @description When true, returns **only** archived conversations; otherwise only unarchived ones */
1530
2169
  archived?: boolean;
1531
2170
  limit?: number;
1532
2171
  };
@@ -1692,7 +2331,7 @@ export interface operations {
1692
2331
  "list-earlier-items": {
1693
2332
  parameters: {
1694
2333
  query: {
1695
- /** @description 来自文档里的 earlier.before,取这个序号之前的条目 */
2334
+ /** @description From the document's earlier.before; returns entries before this ordinal */
1696
2335
  before: number;
1697
2336
  };
1698
2337
  header?: never;