@leaflow/sdk 0.14.2 → 0.16.0

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,8 @@ export interface paths {
13
13
  get?: never;
14
14
  put?: never;
15
15
  /**
16
- * 上传图片
17
- * @description 请求体直接是文件字节,不使用 multipart 封装,一次上传一个文件。类型由内容判定,与 Content-Type 无关。返回的 id 在发送消息时放进 attachmentIds;从未被任何消息引用的附件会被定期清除。
16
+ * Upload an image
17
+ * @description The body is the file bytes themselves, not multipart, one file per request. The type is determined from the content, not from Content-Type. Put the returned id in attachmentIds when sending a message; attachments never referenced by any message are cleared periodically.
18
18
  */
19
19
  post: operations["upload-attachment"];
20
20
  delete?: never;
@@ -31,8 +31,8 @@ export interface paths {
31
31
  cookie?: never;
32
32
  };
33
33
  /**
34
- * 取回图片
35
- * @description 按附件 id 取回原始字节,可直接作为 <img> 的地址使用。响应带长期缓存头,附件内容不会变化。附件不存在或不属于当前用户时返回 404
34
+ * Fetch an image
35
+ * @description Returns the original bytes for an attachment id, usable directly as the address of an <img>. 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.
36
36
  */
37
37
  get: operations["download-attachment"];
38
38
  put?: never;
@@ -51,8 +51,8 @@ export interface paths {
51
51
  cookie?: never;
52
52
  };
53
53
  /**
54
- * 列出绑定
55
- * @description 接入面那张表按通道列出各自绑了谁时用 channelId 过滤。
54
+ * List bindings
55
+ * @description Filter by channelId to show, per channel, who is bound to it.
56
56
  */
57
57
  get: operations["list-bindings"];
58
58
  put?: never;
@@ -70,11 +70,11 @@ export interface paths {
70
70
  path?: never;
71
71
  cookie?: never;
72
72
  };
73
- /** 查看绑定 */
73
+ /** Get a binding */
74
74
  get: operations["get-binding"];
75
75
  put?: never;
76
76
  post?: never;
77
- /** 解除绑定 */
77
+ /** Remove a binding */
78
78
  delete: operations["delete-binding"];
79
79
  options?: never;
80
80
  head?: never;
@@ -88,12 +88,12 @@ export interface paths {
88
88
  path?: never;
89
89
  cookie?: never;
90
90
  };
91
- /** 列出通道 */
91
+ /** List channels */
92
92
  get: operations["list-channels"];
93
93
  put?: never;
94
94
  /**
95
- * 创建通道
96
- * @description 回调密钥归谁定由平台决定,见 list-platforms secretSource:generated 的平台不要传 webhookSecret,我们生成的那把仅在本次响应中返回一次、之后无法再次取回,错过了只能调轮换接口换一把新的;supplied 的平台必须把平台后台那把传进来,此时响应里的webhookSecret null
95
+ * Create a channel
96
+ * @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
97
  */
98
98
  post: operations["create-channel"];
99
99
  delete?: never;
@@ -109,20 +109,20 @@ export interface paths {
109
109
  path?: never;
110
110
  cookie?: never;
111
111
  };
112
- /** 查看通道 */
112
+ /** Get a channel */
113
113
  get: operations["get-channel"];
114
114
  put?: never;
115
115
  post?: never;
116
116
  /**
117
- * 删除通道
118
- * @description 删除后该通道不再接收入站消息,其上的绑定一并失效。项目处于停服或清理状态时本接口仍然可用。
117
+ * Delete a channel
118
+ * @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
119
  */
120
120
  delete: operations["delete-channel"];
121
121
  options?: never;
122
122
  head?: never;
123
123
  /**
124
- * 修改通道
125
- * @description 只修改传了的字段。senderPolicy allowFrom 是一对,由 senderPolicy 决定是否替换;改动对常驻连接要等连接重建后才生效,回调型平台立即生效。
124
+ * Update a channel
125
+ * @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
126
  */
127
127
  patch: operations["update-channel"];
128
128
  trace?: never;
@@ -137,8 +137,8 @@ export interface paths {
137
137
  get?: never;
138
138
  put?: never;
139
139
  /**
140
- * 签发绑定码
141
- * @description 生成一个一次性绑定码交给待绑定的人,他在该平台上用自己的账号把这个码发给助手即完成绑定。绑定只能由本人以这种方式建立,不能直接指定平台账号。绑定码有有效期,过期后需重新签发。
140
+ * Issue a binding code
141
+ * @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
142
  */
143
143
  post: operations["create-binding-code"];
144
144
  delete?: never;
@@ -155,8 +155,8 @@ export interface paths {
155
155
  cookie?: never;
156
156
  };
157
157
  /**
158
- * 查看最近被拒绝的入站消息
159
- * @description 排查「发了消息但助手没有响应」时使用。按时间倒序返回最近被这条通道拒绝的入站消息及其拒绝原因,最常见的原因是发送方尚未绑定。
158
+ * List recently rejected inbound messages
159
+ * @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
160
  */
161
161
  get: operations["list-channel-rejections"];
162
162
  put?: never;
@@ -177,8 +177,8 @@ export interface paths {
177
177
  get?: never;
178
178
  put?: never;
179
179
  /**
180
- * 轮换回调密钥
181
- * @description 换一把新的回调密钥,旧的立即失效,通道降回待平台确认状态。密钥归谁定由平台决定,见 list-platforms secretSource:generated 的平台不要传请求体,新密钥仅在本次响应中返回、之后无法再次取回;supplied 的平台必须把平台后台那把新密钥传进来。
180
+ * Rotate the webhook secret
181
+ * @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
182
  */
183
183
  post: operations["rotate-channel-secret"];
184
184
  delete?: never;
@@ -195,8 +195,8 @@ export interface paths {
195
195
  cookie?: never;
196
196
  };
197
197
  /**
198
- * 推演一个发件人会不会被放行
199
- * @description 改完发件人策略之后用来自查,不发送任何消息、也不改变任何状态:它走的是和真实入站完全相同的那份判定,并说明结论由哪一条规则得出。无法推演绑定码那一条——是否是绑定码取决于对方发来的内容。
198
+ * Test whether a sender would be let through
199
+ * @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
200
  */
201
201
  get: operations["check-sender"];
202
202
  put?: never;
@@ -217,8 +217,8 @@ export interface paths {
217
217
  get?: never;
218
218
  put?: never;
219
219
  /**
220
- * 发起微信扫码登录
221
- * @description 微信个人号通道需要本人扫码登录后才能收发消息。本接口返回二维码,之后轮询 `GET /v1/weixin-logins/{login}` 获取进度;状态提示需要验证码时,调用 `POST /v1/weixin-logins/{login}/verify-code` 补交。
220
+ * Begin a WeChat QR login
221
+ * @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
222
  */
223
223
  post: operations["begin-weixin-login"];
224
224
  delete?: never;
@@ -235,8 +235,8 @@ export interface paths {
235
235
  cookie?: never;
236
236
  };
237
237
  /**
238
- * 列出可接入的平台
239
- * @description 返回本平台当前支持接入的即时通讯平台,以及各自建通道时要走的流程和要填的凭据字段。新建通道表单完全由这份响应驱动:setupMethod 决定展示录入表单还是扫码流程,credentialFields 是要填的字段,secretSource 决定要不要有回调密钥那一栏。
238
+ * List platforms that can be connected
239
+ * @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
240
  */
241
241
  get: operations["list-platforms"];
242
242
  put?: never;
@@ -255,8 +255,8 @@ export interface paths {
255
255
  cookie?: never;
256
256
  };
257
257
  /**
258
- * 查询扫码登录状态
259
- * @description 轮询本接口直到状态变为成功或失败。状态提示需要验证码时,调用补交验证码接口。
258
+ * Get the state of a QR login
259
+ * @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
260
  */
261
261
  get: operations["get-weixin-login"];
262
262
  put?: never;
@@ -277,8 +277,8 @@ export interface paths {
277
277
  get?: never;
278
278
  put?: never;
279
279
  /**
280
- * 补交登录验证码
281
- * @description 微信在扫码后要求短信或设备验证码时使用。验证码由登录发起人在自己手机上获取。
280
+ * Submit a login verification code
281
+ * @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
282
  */
283
283
  post: operations["submit-weixin-verify-code"];
284
284
  delete?: never;
@@ -287,6 +287,46 @@ export interface paths {
287
287
  patch?: never;
288
288
  trace?: never;
289
289
  };
290
+ "/api/v1/memories": {
291
+ parameters: {
292
+ query?: never;
293
+ header?: never;
294
+ path?: never;
295
+ cookie?: never;
296
+ };
297
+ /**
298
+ * List what the assistant remembers
299
+ * @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
+ */
301
+ get: operations["list-memories"];
302
+ put?: never;
303
+ post?: never;
304
+ delete?: never;
305
+ options?: never;
306
+ head?: never;
307
+ patch?: never;
308
+ trace?: never;
309
+ };
310
+ "/api/v1/memories/{memory}": {
311
+ parameters: {
312
+ query?: never;
313
+ header?: never;
314
+ path?: never;
315
+ cookie?: never;
316
+ };
317
+ get?: never;
318
+ put?: never;
319
+ post?: never;
320
+ /**
321
+ * Delete one memory
322
+ * @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.
323
+ */
324
+ delete: operations["delete-memory"];
325
+ options?: never;
326
+ head?: never;
327
+ patch?: never;
328
+ trace?: never;
329
+ };
290
330
  "/api/v1/models": {
291
331
  parameters: {
292
332
  query?: never;
@@ -295,8 +335,8 @@ export interface paths {
295
335
  cookie?: never;
296
336
  };
297
337
  /**
298
- * 列出可用模型
299
- * @description 返回本平台当前提供的模型及其上下文窗口、推理档位和支持的输入类型。用于填充对话设置里的模型选择。
338
+ * List available models
339
+ * @description The models currently offered, with their context window, reasoning levels and supported input types. Use it to populate the model picker in conversation settings.
300
340
  */
301
341
  get: operations["list-models"];
302
342
  put?: never;
@@ -315,12 +355,12 @@ export interface paths {
315
355
  cookie?: never;
316
356
  };
317
357
  /**
318
- * 列出对话
319
- * @description 按最近活动排序,只返回当前账号在当前项目里的对话。archived 是一个二选一的开关而不是「包含归档」:归档的对话不出现在默认列表里,要看它们就把这个参数打开。
358
+ * List conversations
359
+ * @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
360
  */
321
361
  get: operations["list-threads"];
322
362
  put?: never;
323
- /** 创建对话 */
363
+ /** Create a conversation */
324
364
  post: operations["create-thread"];
325
365
  delete?: never;
326
366
  options?: never;
@@ -336,8 +376,8 @@ export interface paths {
336
376
  cookie?: never;
337
377
  };
338
378
  /**
339
- * 取回对话文档
340
- * @description 对话的完整当前状态,用于首屏渲染。文档中的 stream 给出实时输出地址和入场票据,流推送的是对这份文档的增量编辑,可直接套用同一套渲染逻辑。
379
+ * Fetch the conversation document
380
+ * @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
381
  */
342
382
  get: operations["get-thread"];
343
383
  put?: never;
@@ -346,8 +386,8 @@ export interface paths {
346
386
  options?: never;
347
387
  head?: never;
348
388
  /**
349
- * 修改对话设置
350
- * @description 可修改模型、推理档位、审批模式和归档状态。改动从下一次 turn 起生效,正在执行的 turn 沿用它启动时的设置。reasoningEffort 仅在同时提供 model 时生效。
389
+ * Update conversation settings
390
+ * @description Changes the model, reasoning level, approval mode and archived state. A change takes effect from the next turn; a turn already running keeps the settings it started with. reasoningEffort only applies when model is given as well.
351
391
  */
352
392
  patch: operations["update-thread"];
353
393
  trace?: never;
@@ -362,8 +402,8 @@ export interface paths {
362
402
  get?: never;
363
403
  put?: never;
364
404
  /**
365
- * 批准或拒绝一批工具调用
366
- * @description 批次 id 来自对话文档的 wait 字段。本接口是幂等的:重复提交同一批次不会改变已经生效的决定,也不会报错。批次不属于该对话时返回 404
405
+ * Approve or decline a batch of tool calls
406
+ * @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
407
  */
368
408
  post: operations["decide-approval"];
369
409
  delete?: never;
@@ -380,8 +420,8 @@ export interface paths {
380
420
  cookie?: never;
381
421
  };
382
422
  /**
383
- * 取回更早的对话内容
384
- * @description 首屏只给对话最新的那一段,再往上的内容用本接口按需取回,一次一段。before 用文档里的 earlier.before,响应里的 earlier 是再往上那一段的游标,为 null 表示已经到顶。返回的条目和文档里的 items 是同一种形状,顺序也一样(由旧到新),直接接在现有内容前面即可。
423
+ * Fetch earlier parts of a conversation
424
+ * @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
425
  */
386
426
  get: operations["list-earlier-items"];
387
427
  put?: never;
@@ -402,8 +442,8 @@ export interface paths {
402
442
  get?: never;
403
443
  put?: never;
404
444
  /**
405
- * 中断正在执行的 turn
406
- * @description 对没有正在执行的 turn 的对话调用同样返回 204,不视为错误——用户点击停止与 turn 自然结束之间存在竞争,两种结果一致。项目处于停服或清理状态时本接口仍然可用。
445
+ * Interrupt a running turn
446
+ * @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
447
  */
408
448
  post: operations["interrupt-thread"];
409
449
  delete?: never;
@@ -422,8 +462,8 @@ export interface paths {
422
462
  get?: never;
423
463
  put?: never;
424
464
  /**
425
- * 发送消息并触发一次 turn
426
- * @description 立即返回 turnId,不等待执行完成——一次 turn 可能持续数十分钟。执行进度通过对话文档中 stream 指向的实时流获取,不在本响应里。
465
+ * Send a message and start a turn
466
+ * @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
467
  */
428
468
  post: operations["send-message"];
429
469
  delete?: never;
@@ -442,8 +482,8 @@ export interface paths {
442
482
  get?: never;
443
483
  put?: never;
444
484
  /**
445
- * 回答助手提出的问题
446
- * @description 问题 id 来自对话文档的 wait 字段。已被回答过的问题同样返回 204——可能是另一个页面提交在先,也可能是自动应答窗口已到期,两种情况下 turn 都已带着答案继续执行。
485
+ * Answer the assistant's questions
486
+ * @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
487
  */
448
488
  post: operations["answer-question"];
449
489
  delete?: never;
@@ -461,7 +501,7 @@ export interface paths {
461
501
  };
462
502
  get?: never;
463
503
  put?: never;
464
- /** 标记对话已读 */
504
+ /** Mark a conversation as read */
465
505
  post: operations["mark-thread-read"];
466
506
  delete?: never;
467
507
  options?: never;
@@ -479,8 +519,8 @@ export interface paths {
479
519
  get?: never;
480
520
  put?: never;
481
521
  /**
482
- * 从指定位置起撤回
483
- * @description 撤回 ordinal 及其之后的全部条目。被撤回的条目仍留在逐字稿中并标记 reverted,序号不会重排。返回实际撤回的条目数。
522
+ * Revert from a given point
523
+ * @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
524
  */
485
525
  post: operations["revert-thread"];
486
526
  delete?: never;
@@ -526,28 +566,28 @@ export interface components {
526
566
  verifiedAt: string | null;
527
567
  };
528
568
  LengthAwarePageBindingResource: {
529
- /** @description 这一页的内容 */
569
+ /** @description The entries on this page */
530
570
  items: components["schemas"]["BindingResource"][];
531
571
  /**
532
572
  * Format: int64
533
- * @description 这一页最多几条,回显请求里的值
573
+ * @description The page size, echoing what was requested
534
574
  */
535
575
  limit: number;
536
576
  /**
537
577
  * Format: int64
538
- * @description 跳过了多少条,回显请求里的值
578
+ * @description How many were skipped, echoing what was requested
539
579
  */
540
580
  offset: number;
541
581
  /**
542
582
  * Format: int64
543
- * @description 命中的总条数,不只是这一页
583
+ * @description How many match in total, not just on this page
544
584
  */
545
585
  total: number;
546
586
  };
547
587
  ChannelResource: {
548
588
  allowFrom: string[] | null;
549
589
  /**
550
- * @description 平台接入状态。只有 online 才收得到消息、也才签得出绑定码
590
+ * @description How far this channel is from working. Only `online` receives messages and can issue binding codes
551
591
  * @enum {string}
552
592
  */
553
593
  connState: "logged_out" | "qr_pending" | "online" | "expired";
@@ -558,7 +598,7 @@ export interface components {
558
598
  name: string;
559
599
  platform: string;
560
600
  /**
561
- * @description 常驻连接此刻的状态。回调型平台恒为 stopped
601
+ * @description The state of the long-lived connection right now. Always `stopped` for webhook platforms
562
602
  * @enum {string}
563
603
  */
564
604
  runtimeState: "stopped" | "running";
@@ -568,33 +608,33 @@ export interface components {
568
608
  status: "active" | "suspended" | "disabled";
569
609
  /** Format: date-time */
570
610
  updatedAt: string;
571
- /** @description 回调路径,网关配置和排查时用 */
611
+ /** @description The webhook path, for gateway configuration and for diagnosis */
572
612
  webhookPath: string;
573
- /** @description 填到平台后台的回调地址。部署未声明公网入口时为 null */
613
+ /** @description The webhook address to paste into that platform's console. Null when the deployment declares no public entry point */
574
614
  webhookUrl: string | null;
575
615
  };
576
616
  LengthAwarePageChannelResource: {
577
- /** @description 这一页的内容 */
617
+ /** @description The entries on this page */
578
618
  items: components["schemas"]["ChannelResource"][];
579
619
  /**
580
620
  * Format: int64
581
- * @description 这一页最多几条,回显请求里的值
621
+ * @description The page size, echoing what was requested
582
622
  */
583
623
  limit: number;
584
624
  /**
585
625
  * Format: int64
586
- * @description 跳过了多少条,回显请求里的值
626
+ * @description How many were skipped, echoing what was requested
587
627
  */
588
628
  offset: number;
589
629
  /**
590
630
  * Format: int64
591
- * @description 命中的总条数,不只是这一页
631
+ * @description How many match in total, not just on this page
592
632
  */
593
633
  total: number;
594
634
  };
595
635
  CreateChannelRequestBody: {
596
636
  allowFrom?: string[] | null;
597
- /** @description 平台侧凭据。只写不读,创建后无法取回 */
637
+ /** @description Credentials for that platform. Write-only: they cannot be read back after creation */
598
638
  credentials?: {
599
639
  [key: string]: string;
600
640
  };
@@ -602,13 +642,13 @@ export interface components {
602
642
  platform: string;
603
643
  /** @enum {string} */
604
644
  senderPolicy?: "bound_only" | "open";
605
- /** @description 平台生成密钥的平台(secretSource=supplied)必须传;我们生成的(generated)不能传,那把会在本次响应的 webhookSecret 里返回一次 */
645
+ /** @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
646
  webhookSecret?: string;
607
647
  };
608
648
  ChannelWithSecretResponseBody: {
609
649
  allowFrom: string[] | null;
610
650
  /**
611
- * @description 平台接入状态。只有 online 才收得到消息、也才签得出绑定码
651
+ * @description How far this channel is from working. Only `online` receives messages and can issue binding codes
612
652
  * @enum {string}
613
653
  */
614
654
  connState: "logged_out" | "qr_pending" | "online" | "expired";
@@ -619,7 +659,7 @@ export interface components {
619
659
  name: string;
620
660
  platform: string;
621
661
  /**
622
- * @description 常驻连接此刻的状态。回调型平台恒为 stopped
662
+ * @description The state of the long-lived connection right now. Always `stopped` for webhook platforms
623
663
  * @enum {string}
624
664
  */
625
665
  runtimeState: "stopped" | "running";
@@ -629,24 +669,24 @@ export interface components {
629
669
  status: "active" | "suspended" | "disabled";
630
670
  /** Format: date-time */
631
671
  updatedAt: string;
632
- /** @description 回调路径,网关配置和排查时用 */
672
+ /** @description The webhook path, for gateway configuration and for diagnosis */
633
673
  webhookPath: string;
634
- /** @description 我们生成的那把回调密钥,拿去粘到平台后台。**之后无法再次取回**,只能轮换出新的一把。密钥由平台生成(secretSource=supplied)或该平台不走回调时为 null */
674
+ /** @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
675
  webhookSecret: string | null;
636
- /** @description 填到平台后台的回调地址。部署未声明公网入口时为 null */
676
+ /** @description The webhook address to paste into that platform's console. Null when the deployment declares no public entry point */
637
677
  webhookUrl: string | null;
638
678
  };
639
679
  UpdateChannelRequestBody: {
640
- /** @description 放行名单。仅在同时传了 senderPolicy 时生效 */
680
+ /** @description The allow list. Only applied when senderPolicy is sent as well */
641
681
  allowFrom?: string[] | null;
642
- /** @description 整份替换而不是逐键合并。不传表示不动 */
682
+ /** @description Replaced wholesale rather than merged key by key. Absent means unchanged */
643
683
  credentials?: {
644
684
  [key: string]: string;
645
685
  };
646
686
  enabled?: boolean;
647
687
  name?: string;
648
688
  /**
649
- * @description 传了才会连同 allowFrom 一起替换
689
+ * @description Only when this is sent is allowFrom replaced along with it
650
690
  * @enum {string}
651
691
  */
652
692
  senderPolicy?: "bound_only" | "open";
@@ -671,7 +711,7 @@ export interface components {
671
711
  rejections: components["schemas"]["RejectionResource"][] | null;
672
712
  };
673
713
  RotateSecretRequestBody: {
674
- /** @description 平台生成密钥的平台(secretSource=supplied)必须传新的那把;我们生成的(generated)不能传 */
714
+ /** @description Required for platforms that generate the secret themselves (secretSource=supplied). Must be absent for `generated` ones */
675
715
  webhookSecret?: string;
676
716
  };
677
717
  WebhookSecretResponseBody: {
@@ -688,14 +728,14 @@ export interface components {
688
728
  LoginResource: {
689
729
  /**
690
730
  * Format: date-time
691
- * @description 这条登录流的截止时间。到点之后不要再轮询,重新发起一次
731
+ * @description When this login flow expires. Past that, stop polling and start a new one
692
732
  */
693
733
  expiresAt: string;
694
734
  /** Format: uuid */
695
735
  id: string;
696
- /** @description 二维码的内容,由客户端编码成二维码图形渲染(不是图片地址,也不是 data URI)。码过期时这条流会自己换一张接着等,所以每次轮询拿到的可能是新的一串 */
736
+ /** @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
737
  qrcodeData: string;
698
- /** @description 失败原因。仅在 status error expired 时有内容 */
738
+ /** @description Why it failed. Present only when status is error or expired */
699
739
  reason: string;
700
740
  /** @enum {string} */
701
741
  status: "wait" | "scanned" | "confirmed" | "expired" | "error" | "need_verify_code";
@@ -717,9 +757,9 @@ export interface components {
717
757
  setupChallenge: "none" | "webhook" | "scan";
718
758
  /** @enum {string} */
719
759
  setupMethod: "credentials" | "scan";
720
- /** @description 回调路径模板,{channel} 处替换为通道 id */
760
+ /** @description The webhook path template; {channel} is replaced with the channel id */
721
761
  webhookPath: string;
722
- /** @description 完整回调地址模板。部署未声明公网入口时为 null */
762
+ /** @description The full webhook address template. Null when the deployment declares no public entry point */
723
763
  webhookUrlTemplate: string | null;
724
764
  };
725
765
  PlatformListResponseBody: {
@@ -735,6 +775,22 @@ export interface components {
735
775
  key: string;
736
776
  reasoningTiers: string[] | null;
737
777
  };
778
+ MemoryListResponseBody: {
779
+ items: components["schemas"]["MemoryResource"][];
780
+ };
781
+ MemoryResource: {
782
+ /** @description The fact itself */
783
+ body: string;
784
+ /** Format: date-time */
785
+ createdAt: string;
786
+ id: string;
787
+ /** @description The name the assistant gave this fact; it overwrites or deletes its own entries by that name */
788
+ name: string;
789
+ /** @description Which conversation the assistant learned it in. That conversation may since have been deleted */
790
+ sourceThreadId?: string;
791
+ /** Format: date-time */
792
+ updatedAt: string;
793
+ };
738
794
  ModelListResponseBody: {
739
795
  models: components["schemas"]["ModelResource"][] | null;
740
796
  };
@@ -756,7 +812,7 @@ export interface components {
756
812
  };
757
813
  CreateThreadRequestBody: {
758
814
  /**
759
- * @description 不传则使用平台默认审批模式
815
+ * @description Absent uses the platform's default approval mode
760
816
  * @enum {string}
761
817
  */
762
818
  approvalMode?: "guardian" | "manual" | "yolo";
@@ -796,7 +852,7 @@ export interface components {
796
852
  /** Format: int64 */
797
853
  durationMs?: number | null;
798
854
  id: string;
799
- /** @description 产出这一条的模型。用户自己发的消息为 null */
855
+ /** @description The model that produced this entry. Null for messages the user sent */
800
856
  model: string | null;
801
857
  namespace?: string | null;
802
858
  /** Format: int64 */
@@ -808,7 +864,7 @@ export interface components {
808
864
  text?: string;
809
865
  tool?: string | null;
810
866
  /**
811
- * @description 决定这一条包含哪些字段
867
+ * @description Determines which fields this entry carries
812
868
  * @enum {string}
813
869
  */
814
870
  type: "user_message" | "agent_message" | "reasoning" | "dynamic_tool_call" | "context_compaction" | "token_budget_reminder" | "turn_failure";
@@ -869,15 +925,23 @@ export interface components {
869
925
  items: components["schemas"]["ItemResource"][] | null;
870
926
  };
871
927
  SendMessageRequestBody: {
872
- /** @description 此前上传、尚未绑定到任何消息的附件 id */
928
+ /** @description Ids of attachments uploaded earlier that are not yet bound to any message */
873
929
  attachmentIds?: string[] | null;
874
930
  text: string;
875
931
  };
876
932
  TurnIDResponseBody: {
933
+ /** @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. */
934
+ queued: boolean;
935
+ /**
936
+ * Format: int64
937
+ * @description How many messages were already waiting ahead of this one. Only meaningful when queued is true.
938
+ */
939
+ queuedAhead?: number;
940
+ /** @description The turn this message started. Empty when the message was queued instead. */
877
941
  turnId: string;
878
942
  };
879
943
  AnswerRequestBody: {
880
- /** @description 问题 id 到所选答案的映射 */
944
+ /** @description A map from question id to the answer chosen */
881
945
  answers: {
882
946
  [key: string]: string;
883
947
  };
@@ -885,7 +949,7 @@ export interface components {
885
949
  RevertRequestBody: {
886
950
  /**
887
951
  * Format: int64
888
- * @description 起始序号,该条及其之后的全部条目都会被撤回
952
+ * @description The starting ordinal; that entry and everything after it is reverted
889
953
  */
890
954
  ordinal: number;
891
955
  };
@@ -949,7 +1013,7 @@ export interface operations {
949
1013
  /** @description OK */
950
1014
  200: {
951
1015
  headers: {
952
- /** @description 私有而且长缓存:这些字节按 id 寻址而 id 永不复用,所以它们永远不会变;而它们属于一个人,所以不能进任何共享缓存。 */
1016
+ /** @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
1017
  "Cache-Control"?: string;
954
1018
  [name: string]: unknown;
955
1019
  };
@@ -971,13 +1035,13 @@ export interface operations {
971
1035
  "list-bindings": {
972
1036
  parameters: {
973
1037
  query?: {
974
- /** @description 这一页最多返回多少条 */
1038
+ /** @description How many entries this page returns at most */
975
1039
  limit?: number;
976
- /** @description 跳过多少条。要翻得更深请改用游标翻页的接口 */
1040
+ /** @description How many to skip. To page deeper, use the cursor-paged operation instead */
977
1041
  offset?: number;
978
1042
  platform?: string;
979
1043
  channelId?: string;
980
- /** @description 仅返回处于活跃状态的绑定 */
1044
+ /** @description Return only bindings that are active */
981
1045
  active?: boolean;
982
1046
  };
983
1047
  header?: never;
@@ -1069,12 +1133,12 @@ export interface operations {
1069
1133
  "list-channels": {
1070
1134
  parameters: {
1071
1135
  query?: {
1072
- /** @description 这一页最多返回多少条 */
1136
+ /** @description How many entries this page returns at most */
1073
1137
  limit?: number;
1074
- /** @description 跳过多少条。要翻得更深请改用游标翻页的接口 */
1138
+ /** @description How many to skip. To page deeper, use the cursor-paged operation instead */
1075
1139
  offset?: number;
1076
1140
  platform?: string;
1077
- /** @description 仅返回处于启用状态的通道 */
1141
+ /** @description Return only channels that are enabled */
1078
1142
  active?: boolean;
1079
1143
  };
1080
1144
  header?: never;
@@ -1333,9 +1397,9 @@ export interface operations {
1333
1397
  "check-sender": {
1334
1398
  parameters: {
1335
1399
  query: {
1336
- /** @description 平台上那个人的 id,和绑定、被拒记录里的是同一个值 */
1400
+ /** @description That person's id on the platform, the same value that appears in bindings and rejections */
1337
1401
  peerId: string;
1338
- /** @description Telegram 这类有用户名的平台填得出来,不带 @。留空即当作没有用户名 */
1402
+ /** @description Only platforms with usernames, such as Telegram, can supply this. Without the @. Leave it empty to mean there is no username */
1339
1403
  username?: string;
1340
1404
  };
1341
1405
  header?: never;
@@ -1492,6 +1556,64 @@ export interface operations {
1492
1556
  };
1493
1557
  };
1494
1558
  };
1559
+ "list-memories": {
1560
+ parameters: {
1561
+ query?: never;
1562
+ header?: never;
1563
+ path?: never;
1564
+ cookie?: never;
1565
+ };
1566
+ requestBody?: never;
1567
+ responses: {
1568
+ /** @description OK */
1569
+ 200: {
1570
+ headers: {
1571
+ [name: string]: unknown;
1572
+ };
1573
+ content: {
1574
+ "application/json": components["schemas"]["MemoryListResponseBody"];
1575
+ };
1576
+ };
1577
+ /** @description Error */
1578
+ default: {
1579
+ headers: {
1580
+ [name: string]: unknown;
1581
+ };
1582
+ content: {
1583
+ "application/json": components["schemas"]["Error"];
1584
+ };
1585
+ };
1586
+ };
1587
+ };
1588
+ "delete-memory": {
1589
+ parameters: {
1590
+ query?: never;
1591
+ header?: never;
1592
+ path: {
1593
+ memory: string;
1594
+ };
1595
+ cookie?: never;
1596
+ };
1597
+ requestBody?: never;
1598
+ responses: {
1599
+ /** @description No Content */
1600
+ 204: {
1601
+ headers: {
1602
+ [name: string]: unknown;
1603
+ };
1604
+ content?: never;
1605
+ };
1606
+ /** @description Error */
1607
+ default: {
1608
+ headers: {
1609
+ [name: string]: unknown;
1610
+ };
1611
+ content: {
1612
+ "application/json": components["schemas"]["Error"];
1613
+ };
1614
+ };
1615
+ };
1616
+ };
1495
1617
  "list-models": {
1496
1618
  parameters: {
1497
1619
  query?: never;
@@ -1524,9 +1646,9 @@ export interface operations {
1524
1646
  "list-threads": {
1525
1647
  parameters: {
1526
1648
  query?: {
1527
- /** @description 按标题搜索,大小写不敏感。留空则返回最近的对话 */
1649
+ /** @description Search titles, case-insensitively. Leave it empty for the most recent conversations */
1528
1650
  q?: string;
1529
- /** @description 为真时**只**返回已归档的对话,否则只返回未归档的 */
1651
+ /** @description When true, returns **only** archived conversations; otherwise only unarchived ones */
1530
1652
  archived?: boolean;
1531
1653
  limit?: number;
1532
1654
  };
@@ -1692,7 +1814,7 @@ export interface operations {
1692
1814
  "list-earlier-items": {
1693
1815
  parameters: {
1694
1816
  query: {
1695
- /** @description 来自文档里的 earlier.before,取这个序号之前的条目 */
1817
+ /** @description From the document's earlier.before; returns entries before this ordinal */
1696
1818
  before: number;
1697
1819
  };
1698
1820
  header?: never;