@getnote/cli 1.8.1 → 1.9.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.
- package/README.md +10 -1
- package/package.json +1 -1
- package/prebuilt/darwin-amd64/getnote +0 -0
- package/prebuilt/darwin-arm64/getnote +0 -0
- package/prebuilt/linux-amd64/getnote +0 -0
- package/prebuilt/linux-arm64/getnote +0 -0
- package/prebuilt/windows-amd64/getnote.exe +0 -0
- package/prebuilt/windows-arm64/getnote.exe +0 -0
- package/skills/getnote-auth/SKILL.md +23 -4
- package/skills/getnote-kb/SKILL.md +10 -0
- package/skills/getnote-note/SKILL.md +13 -3
- package/skills/getnote-search/SKILL.md +1 -1
package/README.md
CHANGED
|
@@ -233,7 +233,7 @@ getnote search '主题' --response-mode snippet --max-snippet-chars 400 -o json
|
|
|
233
233
|
|
|
234
234
|
课程响应的 `coverage` 说明实际覆盖范围,省略类型也不表示包含未关联课程身份的心得或录音。JSON 输出及 `--all` 保留该对象中的未知类型和新增字段;任一页的 `partial` 或警告都会保留,存在未解决问题时 `traversal.completed=false`,不能因分页结束便声称结果完整。
|
|
235
235
|
|
|
236
|
-
|
|
236
|
+
错误保留合法值及完整 `error.rate_limit_detail`。明确 `not_started/retry_same_operation` 的 QPS 拒绝由客户端复用同一步骤,最多额外重试 2 次、累计等待不超过 5 秒;日/月额度等到重置,上传滚动额度先完成已有操作,零限额联系管理员,配置不可用暂停。Agent 不叠加重试循环。同一身份队列仅在进程内协调,跨 CLI 进程、token 和 MCP 调用仍需排队;频率以实时策略为准。
|
|
237
237
|
|
|
238
238
|
### 认证
|
|
239
239
|
|
|
@@ -384,6 +384,14 @@ gnote note quick <note_id>
|
|
|
384
384
|
|
|
385
385
|
CLI 已登录时也可使用 `file-token <extension>` 获取 token、`upload` 直传,再用 `file-add <topic_id> <directory_id> --metadata-file <上传结果文件>` 提交。临时 token 不提供通用 OpenAPI 权限。
|
|
386
386
|
|
|
387
|
+
`image-config` / `file-capabilities` 的 runtime 声明 `operation_replay`、幂等头和状态入口时,凭证命令可保留 `--operation-id`;旧服务或治理关闭时不发送凭证幂等头。签发结果未知或失败 `data.upload_recovery` 要求查询原操作时,分别使用 `image-operation <operation_id>` / `file-operation <operation_id>`。`issued` 且未过 `resume_until` 复用原凭证,`processing/needs_reconciliation` 停止新签发,`expired` 先查已有对象与保存/入库结果;重放不延长原期限。
|
|
388
|
+
|
|
389
|
+
图片已上传而保存被限流时,失败 `data.uploaded_image` 保留对象地址和原 `client_request_id`。把原 HTTPS 地址写入权限 0600 的私有文件,使用 `getnote save --image-url-file ./private-uploaded-url.txt --idempotency-key <原笔记键> -o json` 续接保存,不重领 token 或重传图片。凭证、签名 URL 和对象私有地址不贴聊天、不放命令参数。支持情况以 capabilities 的 `same_identity_request_queue/safe_not_started_retries/upload_operation_recovery` 和服务 runtime 为准。
|
|
390
|
+
|
|
391
|
+
`file-add -o json` 保留历史数字字段 `id`、`topic_id`、`directory_id`,同时提供精确的十进制字符串 `id_str`、`topic_id_str`、`directory_id_str`;新消费者应使用后者,避免 JavaScript 大整数精度损失。旧服务端缺少字符串字段时,CLI 会无损补齐。`capabilities.guarantees.ids_as_strings=false` 表示不保证所有历史 ID 字段均为字符串,各命令的推荐字段以 `command_results` 为准。
|
|
392
|
+
|
|
393
|
+
发芽月份必须是合法的 `YYYY-MM`;非法月份在发请求前报错。`note chapters <id>` 读取章节时间线,与录音标记独立;没有可识别章节时返回空 `items`。
|
|
394
|
+
|
|
387
395
|
---
|
|
388
396
|
|
|
389
397
|
## 全局参数
|
|
@@ -463,6 +471,7 @@ $ getnote search "工作日志" --limit 7 -o json
|
|
|
463
471
|
|
|
464
472
|
| 日期 | 版本 | 新能力 | 适合怎么用 |
|
|
465
473
|
|------|------|--------|------------|
|
|
474
|
+
| 2026-11-04 | **v1.9.0** | 按服务端限流决策排队与有界重试;查询和恢复原图片、文件凭证;图片续接保留完整原保存请求 | 限流后复用原对象、请求键和目标位置;结果未知时先查询原操作,不重复上传 |
|
|
466
475
|
| 2026-10-13 | **v1.7.1** | 修复订阅书库布尔筛选字段解析错误;完善随包 Skill 的作者、课程、文稿和评论查找规则 | 按作者查书籍;搜索未命中时在同一来源范围补查,区分全部笔记与划线 |
|
|
467
476
|
| 2026-10-13 | **v1.7.0** | 支持书名、作者、书籍 ID 定位;引用来源与时间筛选;保留分页和来源元数据 | 列表定位后通过 detail 读取完整笔记,分别核对原文与评论;Top-K 不代表全量 |
|
|
468
477
|
| 2026-09-24 | **v1.6.0** | 支持文件上传、临时 OSS 上传凭据,以及独立标记、发芽和章节时间线 | 云 MCP 已授权时可用 CLI 直传文件,提交入库后确认解析状态 |
|
package/package.json
CHANGED
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
@@ -29,7 +29,7 @@ description: 安装和连接得到大脑,完成浏览器授权、环境诊断
|
|
|
29
29
|
| 诊断连接 | `getnote doctor -o json` |
|
|
30
30
|
| 查看 CLI 能力契约 | `getnote capabilities -o json` |
|
|
31
31
|
| 为本机 AI 同步领域 Skill | `getnote setup` |
|
|
32
|
-
|
|
|
32
|
+
| 查看开放平台调用额度 | `getnote quota -o json` |
|
|
33
33
|
| 查看版本 | `getnote version` |
|
|
34
34
|
| 检查升级 | `getnote update --check` |
|
|
35
35
|
| 执行升级 | `getnote update` |
|
|
@@ -44,14 +44,14 @@ description: 安装和连接得到大脑,完成浏览器授权、环境诊断
|
|
|
44
44
|
| `getnote auth status` | `Authenticated` / `Not authenticated` 或环境变量登录状态 | 未登录才启动 `auth login`;状态里只能出现掩码。 |
|
|
45
45
|
| `getnote auth logout` | `Logged out successfully.` | 只说明本机已退出;不声称已撤销服务端授权。 |
|
|
46
46
|
| `getnote doctor -o json` | `diagnostics_completed`、`local_ready`、`ready/status/summary`、`checks[]`、`issues[]`、`next_actions[]`、`update`、`integrations[]` | `ready=true,status=ready` 才表示完整可用;`degraded` 需继续处理警告。`platforms[]` 仅表示检测到应用或命令,不能证明 Skill 已安装;用 `integrations[].skill_status/ready` 判断 AI 接入状态。 |
|
|
47
|
-
| `getnote capabilities -o json` | `contract_version`、`commands`、`command_aliases`、`command_results`、`guarantees` |
|
|
47
|
+
| `getnote capabilities -o json` | `contract_version`、`commands`、`command_aliases`、`command_results`、`guarantees` | 只在安装、升级或兼容排查时读取;这是命令和结果字段的唯一事实源。限流恢复还要核对 `guarantees.same_identity_request_queue/safe_not_started_retries/upload_operation_recovery`,并读取服务当前 runtime;不能只凭版本推定已启用。 |
|
|
48
48
|
| `getnote setup -o json` | `success`、`targets[]`、`installed_cli`、`installed_skills`、`authenticated`、`platforms[]`、`next_actions[]`、`next` | `platforms[].status=installed` 表示本地安装完成;`verify_in_platform` 表示 OpenClaw(小龙虾)或 QClaw 由平台管理,只引导用户完成对应的唯一 `next_action`。没有识别到 AI 平台不影响 CLI 和账号连接。 |
|
|
49
|
-
| `getnote quota -o json` | `data.read/write/write_note` 下的 `daily/monthly.limit/used/remaining/reset_at` |
|
|
49
|
+
| `getnote quota -o json` | `data.read/write/write_note` 下的 `daily/monthly.limit/used/remaining/reset_at` 及可选实时速率策略 | 按真实桶、作用域和速率说明额度,不自行换算、合并桶或假定固定频率。 |
|
|
50
50
|
| `getnote version` | 版本文本 | 只用于展示版本;机器契约仍以 `capabilities -o json` 为准。 |
|
|
51
51
|
| `getnote update --check` | 当前/可用新版本文本 | 有新版本再运行 `getnote update`。 |
|
|
52
52
|
| `getnote update` | CLI 更新、Skills 同步和 doctor 验证结果 | 默认由新版 CLI 自动完成完整更新闭环;只有全部步骤成功才能说升级完成。只升级 CLI 时使用 `--cli-only`。 |
|
|
53
53
|
|
|
54
|
-
所有命令以退出码为第一判断:退出码非 0 即失败。使用 `-o json` 的 API 与本地错误均返回 `success=false`、`
|
|
54
|
+
所有命令以退出码为第一判断:退出码非 0 即失败。使用 `-o json` 的 API 与本地错误均返回 `success=false`、`error.code/message/reason/retryable` 和可选 `request_id`;`data` 通常为空,但恢复失败可携带 `upload_recovery` 或 `uploaded_image`,必须保留并按笔记/文件流程续接;不能把 HTTP 200 或“命令运行过”当成成功。
|
|
55
55
|
|
|
56
56
|
### Doctor 机器决策规则
|
|
57
57
|
|
|
@@ -72,6 +72,25 @@ description: 安装和连接得到大脑,完成浏览器授权、环境诊断
|
|
|
72
72
|
3. 检查更新输出中的 CLI 版本、五个领域 Skill 同步结果和 doctor 结果。
|
|
73
73
|
4. 用最近笔记读取做验收,再告诉用户版本、诊断结果和仍需动作。
|
|
74
74
|
|
|
75
|
+
## 限流与同一操作恢复
|
|
76
|
+
|
|
77
|
+
调用额度、上传对象日/滚动额度、OSS 字节上传、异步笔记或文件处理是不同阶段,分别核对结果。同一账号在普通 API、渠道和云 MCP 间共享用户预算;企业委托还可能按客户端在不同授权和用户间共享预算。按实时 quota/runtime 的 `scope_type/scope_id`、`algorithm`、`sustained_rate_per_second/burst` 判断,不硬编码 1 QPS,也不靠换 token 或授权绕过。
|
|
78
|
+
|
|
79
|
+
客户端只协调进程内的同一身份请求,不能协调其它 CLI 进程、工具或 MCP 副本;Agent 要把仍共享预算的任务排队,避免并发放大。客户端已对明确安全的未执行请求做最多额外 2 次、累计等待不超过 5 秒的重试;Agent 不在外层再套重试循环或启动并行补偿。
|
|
80
|
+
|
|
81
|
+
失败读取 `error.code/message/reason/retryable`、`request_id` 和完整 `error.rate_limit_detail`(MCP 错误中的同名字段)。保留 `dimension/bucket/algorithm/scope_type/scope_id`、速率/突发、`limit/remaining/reset_at`、`retry_after_ms/retry_after_seconds`、`request_execution/retry_action`,按以下决策行动:
|
|
82
|
+
|
|
83
|
+
| 真实返回 | 下一步 |
|
|
84
|
+
|---|---|
|
|
85
|
+
| QPS 拒绝(10202)、`retryable=true`、`request_execution=not_started` 且 `retry_action=retry_same_operation` | 当前步骤未执行。客户端在上述预算内复用原参数、`client_request_id` / 幂等键及已上传对象;写操作也不能一概判为不可重试。客户端已返回最终失败时按建议等待并报告,停止本轮自动重试,不另开 CLI/MCP 重跑整条上传流程。 |
|
|
86
|
+
| 日/月额度,`pause_until_reset` | 停止短周期重试,说明真实桶和 `reset_at`;到重置后再继续。 |
|
|
87
|
+
| 上传滚动额度,`complete_existing` | 停止申请新凭证,优先核对并完成已有对象/任务;不重传字节。 |
|
|
88
|
+
| 零限额,`contact_admin` | 停止调用并联系管理员;等待一秒或换授权无效。 |
|
|
89
|
+
| 配置或状态不可用,503 / `pause` | 暂停,保留原操作标识和 `request_id`,待服务恢复后先核对原结果。 |
|
|
90
|
+
| 只有 `retryable=true`,缺少安全未执行证据,或写入结果未知 | 先查询原任务/既有结果,不能据此重复创建。 |
|
|
91
|
+
|
|
92
|
+
向用户用大白话说明“等多久”“暂时停止”“复用哪一步”和真实 `request_id`。不展示 API Key、token、签名、签名 URL 或上传对象私有地址。
|
|
93
|
+
|
|
75
94
|
## 安全与恢复
|
|
76
95
|
|
|
77
96
|
- 不展示或记录完整凭证;`auth status` 只能出现掩码。
|
|
@@ -33,6 +33,7 @@ description: 按书名或作者查找书籍笔记,查看和管理得到大脑
|
|
|
33
33
|
| 使用 MCP 临时凭据直传本地文件到 OSS | `getnote upload <file>` |
|
|
34
34
|
| 查询文件约束 | `getnote file-capabilities` |
|
|
35
35
|
| CLI 已登录时获取上传 token | `getnote file-token <extension>` |
|
|
36
|
+
| 查询原文件凭证申请状态 | `getnote file-operation <operation_id>` |
|
|
36
37
|
| CLI 已登录时提交 OSS 结果入库 | `getnote file-add <topic_id> <directory_id>` |
|
|
37
38
|
|
|
38
39
|
`gnote` 和短命令是稳定别名;旧环境没有别名时回退到 `getnote kb directories/directory-create/directory-update/directory-delete`。参数一律以目标命令 `--help` 为准。
|
|
@@ -99,6 +100,14 @@ getnote note original '<返回的 note_id>' -o json
|
|
|
99
100
|
|
|
100
101
|
已有 CLI 授权时,可用 `getnote file-capabilities -o json`、`getnote file-token <extension> -o json` 获取同一能力和 token,再以 `getnote file-add <topic_id> <directory_id> --metadata-file <upload-result.json> -o json` 入库。仅 MCP 已授权时不要为这两个认证命令要求用户再登录,使用对应 MCP 工具即可。临时 token 文件权限限当前用户。
|
|
101
102
|
|
|
103
|
+
### 文件凭证恢复
|
|
104
|
+
|
|
105
|
+
`file-capabilities` 的 `data.runtime` 返回当前 `governance_enabled/upload_quota_enforced`、`rolling_limit/rolling_window_seconds`、`operation_replay/idempotency_header/operation_status_endpoint`、`dedup_retention_seconds/recovery_deadline`。仅实时声明支持恢复时,才使用 `getnote file-token <extension> --operation-id <原操作标识> -o json`;治理关闭或旧服务不强塞凭证幂等头。限流按连接与额度指南(CLI 的 `getnote-auth` / 独立 Skill 的 `references/auth.md`)中的决策处理,不混淆调用配额、上传对象额度、OSS 上传和解析完成。
|
|
106
|
+
|
|
107
|
+
签发断流、结果未确认或 `data.upload_recovery.retry_action=query_original_operation` 时,保留 `kind/operation_id/state`,执行 `getnote file-operation <operation_id> -o json`;MCP 已授权则使用其原文件凭证状态工具,不额外登录 CLI。返回 `operation_id/upload_id/state/resume_until`:`issued` 且未过期复用原 `credential`;`processing/needs_reconciliation` 停止新签发,核对原状态;`expired` 先核对已有对象/入库结果,再明确启动新操作,不换 ID 自动重领或延长原期限。`dedup_retention_seconds` 不延长凭证和对象期限。`issued` 若缺少 `credential` 或 `resume_until`,保留原 ID 并暂停,报告状态不完整。
|
|
108
|
+
|
|
109
|
+
已返回 `stage=oss_uploaded` 时复用原 `topic_id/directory_id/file_name/file_type/md5/url`,只续接原入库步骤。`file-add` 不提供额外笔记幂等键;凭证 `operation_id` 只标识签发,不能当入库幂等键。入库返回后保留同一资源 ID,任务结果未知先按原目标库/目录和元数据查询原资源,不盲目重新提交或上传。临时凭证、签名 URL 及元数据文件只在权限 0600 的受控文件或 stdin 间传递,不贴聊天。客户端负责有界安全重试,Agent 不另开循环或并行 CLI/MCP 补偿。
|
|
110
|
+
|
|
102
111
|
## 博主和直播
|
|
103
112
|
|
|
104
113
|
1. 用户给出抖音主页并要求持续关注时,先确认目标知识库和写权限,再使用 `blogger-follow`;只是找某条内容时先查询,不创建订阅。
|
|
@@ -109,6 +118,7 @@ getnote note original '<返回的 note_id>' -o json
|
|
|
109
118
|
|
|
110
119
|
| 命令 | 成功结果必须包含 | 回复规则 |
|
|
111
120
|
|---|---|---|
|
|
121
|
+
| `getnote file-operation <operation_id> -o json` | `success=true`、`data.operation_id/state/resume_until`,可选 `credential` | 保留原 ID,按状态复用/等待/核对,凭证不回显。 |
|
|
112
122
|
| `getnote kbs --scope <scope> -o json` | `success=true`、`data.topics[].topic_id/name/scope/stats`、`has_more/total` | 默认 scope 为 `DEFAULT`;特殊类型必须显式传 scope。 |
|
|
113
123
|
| `getnote kbs-sub --scope <scope> -o json` | `success=true`、`data.topics[].topic_id/name/scope`、`has_more/total` | 只返回该 scope 下真实订阅的他人知识库,通常只读。 |
|
|
114
124
|
| `getnote kb <topic_id> -o json` | `success=true`、`data.notes[].note_id/title/note_type`、`has_more/total` | 返回知识库内真实笔记;需要链接时再用 `note` 读取详情。 |
|
|
@@ -19,13 +19,14 @@ description: 使用得到大脑保存文字、链接、图片和长笔记,按
|
|
|
19
19
|
}
|
|
20
20
|
```
|
|
21
21
|
|
|
22
|
-
失败结果为 `success=false` 或命令退出码非 0,读取 `error.code`、`error.message`、`error.reason`、`error.retryable`
|
|
22
|
+
失败结果为 `success=false` 或命令退出码非 0,读取 `error.code`、`error.message`、`error.reason`、`error.retryable`、`error.rate_limit_detail`、可选 `request_id` 及 `data.upload_recovery/uploaded_image`。HTTP 成功、上传完成、出现任务 ID 或拿到空笔记链接,都不能替代最终成功结果。
|
|
23
23
|
|
|
24
24
|
## 意图路由
|
|
25
25
|
|
|
26
26
|
| 意图 | 命令入口 |
|
|
27
27
|
|---|---|
|
|
28
28
|
| 保存文字、链接或本地图片 | `getnote save` |
|
|
29
|
+
| 图片运行策略、凭证与原申请状态 | `getnote image-config`、`getnote image-token <extension>`、`getnote image-operation <operation_id>` |
|
|
29
30
|
| 查询异步保存任务 | `getnote task` |
|
|
30
31
|
| 查看最近笔记 | `getnote notes` |
|
|
31
32
|
| 按预算读取少量个人笔记正文/原文 | `getnote notes batch` |
|
|
@@ -117,7 +118,7 @@ getnote notes --source dedao --note-type ref --article-url '<reference.article.u
|
|
|
117
118
|
|
|
118
119
|
退出码0和 success=true 只代表批量调用成功:逐条检查 status=ok/unavailable/failed/deferred_budget、content_state、partial、pending_ids。成功项正文完整,deferred_budget 整条待读,不能把 omitted 当空正文;未知未来状态原样保留并说明未确认。用户确需全文时再用旧 `getnote note original '<真实note_id>' -o json` 补读,不自动并发20次单条请求。不存在与无权统一 unavailable,不判断对象是否存在;首版不批量读知识库共享笔记,不绕过原单条权限。
|
|
119
120
|
|
|
120
|
-
参数错误读取 field/supported_values
|
|
121
|
+
参数错误读取 field/supported_values;限流保留完整 `error.rate_limit_detail`,按连接与额度指南(CLI 的 `getnote-auth` / 独立 Skill 的 `references/auth.md`)中的“限流与同一操作恢复”处理。只有明确未执行且允许重试的同一步骤由客户端有界重试;Agent 不叠加循环或并发重试。
|
|
121
122
|
|
|
122
123
|
## 保存流程
|
|
123
124
|
|
|
@@ -140,11 +141,17 @@ getnote notes --source dedao --note-type ref --article-url '<reference.article.u
|
|
|
140
141
|
2. CLI 会校验真实文件格式、上传图片并轮询识别任务。
|
|
141
142
|
3. 只有最终笔记详情返回有效 `note_id/title/note_url` 才算成功;“图片已上传”不是“笔记已生成”。
|
|
142
143
|
|
|
144
|
+
图片凭证与恢复先读 `getnote image-config -o json` 的 `data.runtime`:`governance_enabled`、`upload_quota_enforced`、`rolling_limit/rolling_window_seconds`、`operation_replay`、`idempotency_header`、`operation_status_endpoint`、`dedup_retention_seconds/recovery_deadline`。仅服务声明支持恢复时,才用 `getnote image-token <extension> --operation-id <原操作标识> -o json`;不要向旧服务或治理关闭的服务强塞凭证 `Idempotency-Key`。凭证操作 ID 与保存笔记的 `--idempotency-key` 分开保留。
|
|
145
|
+
|
|
146
|
+
- 签发断流或 `data.upload_recovery` 出现时,读取其 `kind/operation_id/state/retry_action/retryable`;`query_original_operation` 要求用原 ID 执行 `getnote image-operation <operation_id> -o json`,不是重新申请。将含凭证的结果写入权限 0600 的受控文件供机器读取,不回显聊天。
|
|
147
|
+
- 状态结果保留 `operation_id/upload_id/state/resume_until`。`issued` 且未过 `resume_until` 才复用原 `credential`;`processing` / `needs_reconciliation` 时停止新签发并核对原状态;`expired` 先查已有对象和保存结果,再明确启动新操作。不能换 ID 重领、重传已存在字节或通过重放延长原期限;`dedup_retention_seconds` 不是凭证有效期。`issued` 若缺少 `credential` 或 `resume_until`,保留原 ID 并暂停,报告状态不完整。
|
|
148
|
+
- OSS 已上传而保存受限或结果未确认时,保留 `data.uploaded_image={stage:oss_uploaded,url,client_request_id,task_id,request}`;`request` 是包含原 `image_urls/title/tags/topic_id/parent_id/client_request_id` 的完整保存请求,不再申请 token 或上传。将整个失败 JSON、`data` 或 `uploaded_image` 对象原样保存到权限 0600 的私有 JSON 文件,核对原结果并确认允许续接后,使用 `getnote save --image-url-file ./private-image-recovery.json -o json` 恢复原参数;有原 `task_id` 时只查询原任务,不再次保存。显式提供的标题、标签、库、父笔记和请求键必须与快照一致,冲突在发请求前拒绝。旧的仅含原 HTTPS 地址的文件仍可用,但必须同时传回原 `--idempotency-key` 以及原有的全部 `--title/--tag/--topic-id/--parent-id` 参数,不能省略或修改。恢复 JSON、凭证和对象私有地址不得贴聊天或放进命令参数。客户端已耗尽重试时停止本轮自动重试,报告等待建议并保留上述材料,不在外层重跑命令来重置重试预算。
|
|
149
|
+
|
|
143
150
|
### 异步超时与安全重试
|
|
144
151
|
|
|
145
152
|
- `getnote save ... -o json` 正常会等待最终结果;若退出码非 0 且输出含 `task_id`、`status=pending|processing`,操作结果仍不确定。
|
|
146
153
|
- 结果不确定时使用 `getnote task <task_id> -o json` 查询原任务。`done|success` 且有有效 `note_id` 后再读取笔记;`failed` 时展示 `error_msg` 或 `msg`。
|
|
147
|
-
-
|
|
154
|
+
- 超时、断流或网络错误后禁止直接再次保存;先查询原任务或最近笔记。明确 `not_started/retry_same_operation` 的有界重试交给客户端;其它结果未知的写操作先核对原结果,不凭 `retryable=true` 重复创建。
|
|
148
155
|
|
|
149
156
|
## 查询和深层读取
|
|
150
157
|
|
|
@@ -174,6 +181,9 @@ getnote notes --source dedao --note-type ref --article-url '<reference.article.u
|
|
|
174
181
|
| 命令 | 成功结果必须包含 | 回复规则 |
|
|
175
182
|
|---|---|---|
|
|
176
183
|
| `getnote save … -o json` | `success=true`、`data.note.note_id/title/note_url` | 回复“已保存《标题》”和真实链接。链接/图片先只得到 `task_id` 时还未成功,继续查任务。 |
|
|
184
|
+
| `getnote image-config -o json` | `success=true`、`data.runtime` | 读取当前策略与恢复开关;不硬编码频率或上传限制。 |
|
|
185
|
+
| `getnote image-token <extension> -o json` | `success=true`、`data.access_url` 等临时凭证 | 仅机器读取;能力支持时保留同一 `--operation-id`。 |
|
|
186
|
+
| `getnote image-operation <operation_id> -o json` | `success=true`、`data.operation_id/state/resume_until`,可选 `credential` | 按上面的状态分流,凭证不回显。 |
|
|
177
187
|
| `getnote task <task_id> -o json` | `data.task_id/status/note_id?/msg?/error_msg?` | 仅 `done`/`success` 且有 `note_id` 为完成;`pending`/`processing` 是处理中;`failed` 说明真实原因。 |
|
|
178
188
|
| `getnote notes -o json` | `data.notes[].note_id/title/note_url`;新筛选响应另有 `pagination` | 返回标题、字符串 ID 和真实链接。新筛选按 `pagination.has_more/next_cursor` 翻页;仅无 `pagination` 的旧响应按 `has_more/cursor`。旧 `total` 不能当作筛选后数量。 |
|
|
179
189
|
| `getnote note <id> -o json` | `data.note.note_id/title/note_url/note_type`,按需读 `content` | 先给摘要和链接;私密全文只在用户明确要求时展开。 |
|
|
@@ -124,7 +124,7 @@ getnote search "客户反馈" --kb <topic_id> --limit 5 -o json
|
|
|
124
124
|
## 失败、隐私与后续动作
|
|
125
125
|
|
|
126
126
|
- `success=false` 或退出码非 0:回复失败步骤、`error.message` / `error.reason`、是否 `retryable` 和可选 `request_id`;不要将 HTTP 成功或空输出说成搜索成功。
|
|
127
|
-
- 参数错误先读取 field/supported_values
|
|
127
|
+
- 参数错误先读取 field/supported_values;限流保留完整 `error.rate_limit_detail`,按连接与额度指南(CLI 的 `getnote-auth` / 独立 Skill 的 `references/auth.md`)中的“限流与同一操作恢复”处理。客户端负责明确安全未执行请求的有界重试;Agent 不叠加循环、并发重试或固定 1 QPS 假设,日/月额度按 reset_at 暂停。
|
|
128
128
|
- 若 CLI 提示“搜索服务响应超时”,这是检索未完成,不是“没有结果”。建议稍后重试,或缩小关键词、指定知识库后再试;不要伪造空列表。
|
|
129
129
|
- 检索结果可能包含私密正文。群聊或共享会话默认只展示标题、必要摘要和真实链接;用户明确要求后再展开全文。
|
|
130
130
|
- 用户选中结果后,复用返回的字符串 `note_id`,再读取 `getnote note <note_id> -o json`;不要从 URL 截取或转换为数字。
|