aiconductor-cli 1.3.1 → 1.3.3

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.
@@ -1,6 +1,11 @@
1
1
  const fs = require("fs");
2
2
  const path = require("path");
3
- const { publishHtml, publishMdToHtml } = require("../api");
3
+ const {
4
+ publishHtml,
5
+ publishMdToHtml,
6
+ getPublishedWebpages,
7
+ deletePublishedWebpage,
8
+ } = require("../api");
4
9
  const { outputResult, outputError, resolveKeyOrExit, handleApiError } = require("../lib/cli-utils");
5
10
 
6
11
  /**
@@ -51,6 +56,47 @@ function formatPublishText(data) {
51
56
  return out.trimEnd();
52
57
  }
53
58
 
59
+ /**
60
+ * text 模式的网页列表格式化
61
+ * @param {{webpages?: Array, page?: number, page_size?: number, total?: number}} data
62
+ * @returns {string}
63
+ */
64
+ function formatWebpageListText(data) {
65
+ const webpages = data.webpages || [];
66
+ if (!webpages.length) return "没有已发布网页。";
67
+
68
+ const header = `已发布网页(第 ${data.page} 页,每页 ${data.page_size} 条,共 ${data.total} 条)`;
69
+ const entries = webpages.map((webpage) => {
70
+ const lines = [`[${webpage.id}] ${webpage.title || "未命名网页"}`];
71
+ if (webpage.online_url) lines.push(` URL: ${webpage.online_url}`);
72
+ if (webpage.source) lines.push(` 来源: ${webpage.source}`);
73
+ if (webpage.created_at) lines.push(` 发布时间: ${webpage.created_at}`);
74
+ return lines.join("\n");
75
+ });
76
+ return [header, ...entries].join("\n");
77
+ }
78
+
79
+ /**
80
+ * text 模式的网页删除格式化
81
+ * @param {{webpage_id?: number|null, message?: string}} data
82
+ * @returns {string}
83
+ */
84
+ function formatWebpageDeleteText(data) {
85
+ let output = `已删除网页 ID: ${data.webpage_id}`;
86
+ if (data.message) output += `\n信息: ${data.message}`;
87
+ return output;
88
+ }
89
+
90
+ /**
91
+ * API 业务失败时抛出统一错误
92
+ * @param {{success?: boolean, message?: string}} result
93
+ */
94
+ function throwOnApiFailure(result) {
95
+ if (result && result.success === false) {
96
+ throw Object.assign(new Error(result.message || "API 请求失败"), { type: "api_error" });
97
+ }
98
+ }
99
+
54
100
  /**
55
101
  * webpage publish 命令 — 统一发布 Markdown 或 HTML 为在线网页
56
102
  * @param {string} input - Markdown/HTML 代码或文件路径
@@ -84,4 +130,46 @@ async function publishCommand(input, options = {}) {
84
130
  }
85
131
  }
86
132
 
87
- module.exports = { publishCommand };
133
+ /**
134
+ * webpage list 命令 — 查询当前用户已发布的网页
135
+ * @param {{ apiKey?: string, format?: string, page?: string, pageSize?: string }} options
136
+ */
137
+ async function listCommand(options = {}) {
138
+ const format = options.format || "json";
139
+ const apiKey = resolveKeyOrExit(options.apiKey, format);
140
+
141
+ try {
142
+ const result = await getPublishedWebpages(apiKey, {
143
+ page: options.page,
144
+ pageSize: options.pageSize,
145
+ });
146
+ throwOnApiFailure(result);
147
+ outputResult(result, format, formatWebpageListText);
148
+ process.exit(0);
149
+ } catch (err) {
150
+ handleApiError(err, format);
151
+ process.exit(1);
152
+ }
153
+ }
154
+
155
+ /**
156
+ * webpage delete 命令 — 删除指定的已发布网页
157
+ * @param {string} webpageId
158
+ * @param {{ apiKey?: string, format?: string }} options
159
+ */
160
+ async function deleteCommand(webpageId, options = {}) {
161
+ const format = options.format || "json";
162
+ const apiKey = resolveKeyOrExit(options.apiKey, format);
163
+
164
+ try {
165
+ const result = await deletePublishedWebpage(apiKey, webpageId);
166
+ throwOnApiFailure(result);
167
+ outputResult(result, format, formatWebpageDeleteText);
168
+ process.exit(0);
169
+ } catch (err) {
170
+ handleApiError(err, format);
171
+ process.exit(1);
172
+ }
173
+ }
174
+
175
+ module.exports = { publishCommand, listCommand, deleteCommand };
@@ -1,5 +1,5 @@
1
1
  const { webSearch } = require("../api");
2
- const { outputResult, outputError, resolveKeyOrExit, handleApiError, safeParseInt } = require("../lib/cli-utils");
2
+ const { outputResult, outputError, resolveKeyOrExit, handleApiError } = require("../lib/cli-utils");
3
3
 
4
4
  /** text 模式的自定义格式化 */
5
5
  function formatSearchText(data) {
@@ -49,19 +49,34 @@ async function searchCommand(query, searchType, options = {}) {
49
49
  const params = { query, searchType };
50
50
 
51
51
  if (options.count !== undefined) {
52
- params.count = safeParseInt(options.count, undefined);
52
+ params.count = options.count;
53
53
  }
54
54
  if (options.timeRange) {
55
55
  params.timeRange = options.timeRange;
56
56
  }
57
57
  if (searchType === "web") {
58
- params.needSummary = options.summary !== false;
59
- }
60
- if (options.contentFormat) {
61
- params.contentFormats = options.contentFormat;
62
- }
63
- if (options.authLevel !== undefined) {
64
- params.authLevel = safeParseInt(options.authLevel, undefined);
58
+ if (options.needContent) params.needContent = true;
59
+ if (options.needUrl) params.needUrl = true;
60
+ if (options.sites) params.sites = options.sites;
61
+ if (options.blockHosts) params.blockHosts = options.blockHosts;
62
+ const authInfoLevel = options.authInfoLevel ?? options.authLevel;
63
+ if (authInfoLevel !== undefined) {
64
+ params.authInfoLevel = authInfoLevel;
65
+ }
66
+ if (options.contentFormat) params.contentFormats = options.contentFormat;
67
+ if (options.industry) params.industry = options.industry;
68
+ } else {
69
+ for (const [optionName, paramName] of [
70
+ ["imageWidthMin", "imageWidthMin"],
71
+ ["imageWidthMax", "imageWidthMax"],
72
+ ["imageHeightMin", "imageHeightMin"],
73
+ ["imageHeightMax", "imageHeightMax"],
74
+ ]) {
75
+ if (options[optionName] !== undefined) {
76
+ params[paramName] = options[optionName];
77
+ }
78
+ }
79
+ if (options.imageShapes) params.imageShapes = options.imageShapes;
65
80
  }
66
81
  if (options.queryRewrite) {
67
82
  params.queryRewrite = true;
@@ -1,141 +0,0 @@
1
- ---
2
- name: aic-web-search
3
- description: 通过 AIConductor CLI 进行网页搜索和图片搜索。当用户需要搜索网络信息、查找网页内容、搜索图片时应使用此 Skill。触发词包括:搜索/搜一下/查一下/网页搜索/图片搜索/联网搜索/web search/image search。
4
- ---
5
-
6
- ## 概述
7
-
8
- 此 Skill 通过全局安装的 `aiconductor-cli` 命令行工具,调用融合信息搜索 API,支持网页搜索和图片搜索。
9
-
10
- ## 准备工作
11
-
12
- ### API Key 配置
13
-
14
- 引导用户前往 https://dev.aiconductor.fun/register 注册并获取 API Key。
15
-
16
- 获取后配置环境变量:
17
-
18
- **macOS / Linux:**
19
- ```bash
20
- echo 'export AICONDUCTOR_API_KEY="your-api-key"' >> ~/.zshrc && source ~/.zshrc
21
- ```
22
-
23
- **Windows PowerShell:**
24
- ```powershell
25
- [Environment]::SetEnvironmentVariable("AICONDUCTOR_API_KEY", "your-api-key", "User")
26
- ```
27
-
28
- > 也可使用 `.env` 文件(项目目录下写入 `AICONDUCTOR_API_KEY=your-api-key`)。
29
-
30
- 优先级:`-k` 参数 > `AICONDUCTOR_API_KEY` 环境变量 > `.env` 文件。
31
-
32
- ## 搜索流程
33
-
34
- ### 网页搜索
35
-
36
- 使用 JSON 格式(默认,AI 友好)。
37
-
38
- ```bash
39
- aiconductor-cli search web <搜索关键词> [选项]
40
- ```
41
-
42
- **选项:**
43
-
44
- | 选项 | 说明 | 默认值 |
45
- |------|------|--------|
46
- | `-n, --count <n>` | 返回条数(最多50) | 5 |
47
- | `--time-range <range>` | 时间范围过滤 | 无 |
48
- | `--no-summary` | 不返回内容摘要 | 默认返回摘要 |
49
- | `--content-format <format>` | 内容格式:`Text` 或 `Markdown` | `Text` |
50
- | `--auth-level <level>` | 权威来源过滤:`0`=不过滤,`1`=优先权威来源 | `0` |
51
- | `--query-rewrite` | 开启 Query 改写(口语化/长问题推荐) | 关闭 |
52
- | `-k, --api-key <key>` | API Key | 环境变量或 .env |
53
- | `-f, --format <format>` | 输出格式:`json` 或 `text` | `json` |
54
-
55
- **time_range 可选值:**
56
- - `OneDay` - 最近一天
57
- - `OneWeek` - 最近一周
58
- - `OneMonth` - 最近一月
59
- - `OneYear` - 最近一年
60
- - `YYYY-MM-DD..YYYY-MM-DD` - 自定义日期区间,如 `2025-01-01..2025-04-18`
61
-
62
- **示例:**
63
-
64
- ```bash
65
- aiconductor-cli search web "北京今日天气" -n 5 --auth-level 1
66
- ```
67
-
68
- 若用户需要人类可读输出:
69
-
70
- ```bash
71
- aiconductor-cli search web "北京今日天气" -f text
72
- ```
73
-
74
- ### 图片搜索
75
-
76
- ```bash
77
- aiconductor-cli search image <搜索关键词> [选项]
78
- ```
79
-
80
- **选项:**
81
-
82
- | 选项 | 说明 | 默认值 |
83
- |------|------|--------|
84
- | `-n, --count <n>` | 返回条数(最多5) | 5 |
85
- | `--time-range <range>` | 时间范围过滤 | 无 |
86
- | `-k, --api-key <key>` | API Key | 环境变量或 .env |
87
- | `-f, --format <format>` | 输出格式:`json` 或 `text` | `json` |
88
-
89
- **示例:**
90
-
91
- ```bash
92
- aiconductor-cli search image "长城风景" -n 3
93
- ```
94
-
95
- ### 解析输出
96
-
97
- JSON 格式输出示例(网页搜索):
98
- ```json
99
- {
100
- "success": true,
101
- "data": {
102
- "success": true,
103
- "message": "搜索成功",
104
- "data": {
105
- "ResultCount": 5,
106
- "TimeCost": 234,
107
- "WebResults": [
108
- {
109
- "SortId": 1,
110
- "Title": "北京今日天气",
111
- "SiteName": "中国天气网",
112
- "Url": "https://...",
113
- "Snippet": "摘要片段...",
114
- "Summary": "内容摘要...",
115
- "Content": "页面正文...",
116
- "PublishTime": "2025-06-23",
117
- "RankScore": 0.95
118
- }
119
- ]
120
- }
121
- }
122
- }
123
- ```
124
-
125
- 从中提取 `data.data.WebResults`(网页搜索)或 `data.data.ImageResults`(图片搜索)作为搜索结果返回给用户。
126
-
127
- ### 错误处理
128
-
129
- - 缺少 API Key → 提示用户前往 https://dev.aiconductor.fun/register 注册获取
130
- - CLI 未安装 / command not found → 执行 `npm install -g aiconductor-cli`,安装后重试原命令
131
- - API 返回错误 → 展示错误信息给用户
132
- - 搜索失败不扣费,仅成功时计费
133
-
134
- ## 注意事项
135
-
136
- 1. 搜索关键词长度限制 1~100 字符
137
- 2. `need_summary`(摘要)仅对网页搜索有效,图片搜索忽略此参数
138
- 3. `auth_level=1` 适用于医疗、政策、金融等高可信度场景,仅在网页搜索时生效
139
- 4. `query_rewrite=true` 适用于口语化提问或长问题,开启后上游会先改写 query 再搜索
140
- 5. API 按次计费(0.03 元/次),计费信息不会暴露给终端用户
141
- 6. 默认使用 JSON 输出格式,便于 AI Agent 解析
@@ -1,50 +0,0 @@
1
- # 技能安装与配置
2
-
3
- 仅当用户明确要求首次安装、初始化或配置此技能时读取本文档。正常搜索流程默认环境已经可用,不要每次使用前执行初始化。
4
-
5
- ## 安装或升级 CLI
6
-
7
- 使用 npm 全局安装最新版:
8
-
9
- ```bash
10
- npm install -g aiconductor-cli@latest
11
- ```
12
-
13
- 安装后确认命令可用:
14
-
15
- ```bash
16
- aiconductor-cli --help
17
- ```
18
-
19
- ## 配置 API Key
20
-
21
- 引导用户前往 https://dev.aiconductor.fun/register 注册并获取 API Key。
22
-
23
- macOS / Linux:
24
-
25
- ```bash
26
- echo 'export AICONDUCTOR_API_KEY="your-api-key"' >> ~/.zshrc && source ~/.zshrc
27
- ```
28
-
29
- Windows PowerShell:
30
-
31
- ```powershell
32
- [Environment]::SetEnvironmentVariable("AICONDUCTOR_API_KEY", "your-api-key", "User")
33
- ```
34
-
35
- 也可在当前项目目录创建 `.env` 文件:
36
-
37
- ```env
38
- AICONDUCTOR_API_KEY=your-api-key
39
- ```
40
-
41
- 优先级:`-k` 参数 > `AICONDUCTOR_API_KEY` 环境变量 > `.env` 文件。
42
-
43
- ## 故障恢复
44
-
45
- - `command not found` / `aiconductor-cli` 无法识别:执行安装或升级命令后重试原命令
46
- - 缺少 API Key:按上方方式配置密钥后开启新的终端会话,或在当前命令中临时使用 `-k <api-key>`
47
- - API Key 无效或认证失败:请用户确认密钥是否正确、是否仍可用,再重试原命令
48
- - 版本不兼容或参数不被识别:升级到最新版后重试原命令
49
-
50
- 修复后只重试原命令一次;如果仍失败,向用户展示原始错误信息和已尝试的修复步骤。
@@ -1,219 +0,0 @@
1
- ---
2
- name: douyin-toolbox
3
- description: 抖音数据获取与处理工具箱,支持视频详情、评论抓取、用户主页、视频搜索、语音转文字等功能。当用户需要操作抖音数据时使用,例如:(1) 查看某个视频的详细信息或评论,(2) 获取用户主页视频列表或用户资料,(3) 按关键词搜索抖音用户或视频,(4) 将抖音视频语音转为文字,(5) 任何涉及抖音数据提取或分析的任务。
4
- ---
5
-
6
- ## 概述
7
-
8
- 此 Skill 通过全局安装的 `aiconductor-cli` 命令行工具,调用 AIC 抖音系列 API,支持视频详情、评论抓取、用户视频、用户详情、用户搜索、视频搜索、链接转文字共 7 个功能。
9
-
10
- 适用环境默认已配置好 CLI 和 API Key。当遇到安装或配置问题时,读取 [references/aiconductor-skills-setup.md](references/aiconductor-skills-setup.md)。仅当用户明确要求初始化或配置 Skill 时才主动读取该文件。
11
-
12
- ## 使用流程
13
-
14
- ### 获取视频详情
15
-
16
- 根据抖音视频分享链接获取视频详细信息,包括作者信息、统计数据、音乐信息等。
17
-
18
- ```bash
19
- aiconductor-cli douyin video-info <分享链接> [选项]
20
- ```
21
-
22
- **示例:**
23
-
24
- ```bash
25
- aiconductor-cli douyin video-info "https://v.douyin.com/xxx/"
26
- ```
27
-
28
- ### 获取视频评论
29
-
30
- 根据抖音视频URL获取该视频的评论列表。
31
-
32
- ```bash
33
- aiconductor-cli douyin video-comments <视频URL> [选项]
34
- ```
35
-
36
- **选项:**
37
-
38
- | 选项 | 说明 | 默认值 |
39
- |------|------|--------|
40
- | `--max-count <n>` | 获取评论数量 | 50 |
41
-
42
- **示例:**
43
-
44
- ```bash
45
- aiconductor-cli douyin video-comments "https://v.douyin.com/xxx/" --max-count 20
46
- ```
47
-
48
- ### 获取用户视频列表
49
-
50
- 根据抖音用户主页URL获取该用户发布的视频列表,支持分页和时间限制。
51
-
52
- ```bash
53
- aiconductor-cli douyin user-videos <主页URL> [选项]
54
- ```
55
-
56
- **选项:**
57
-
58
- | 选项 | 说明 | 默认值 |
59
- |------|------|--------|
60
- | `--max-pages <n>` | 最大页数 | 1 |
61
- | `--max-seconds <n>` | 最长运行时间(秒),最大180 | 50 |
62
-
63
- **示例:**
64
-
65
- ```bash
66
- aiconductor-cli douyin user-videos "https://www.douyin.com/user/xxx" --max-pages 3
67
- ```
68
-
69
- ### 获取用户详情
70
-
71
- 根据抖音用户主页URL获取用户详细信息,包括基本信息、统计数据、直播状态等。
72
-
73
- ```bash
74
- aiconductor-cli douyin user-detail <主页URL>
75
- ```
76
-
77
- **示例:**
78
-
79
- ```bash
80
- aiconductor-cli douyin user-detail "https://www.douyin.com/user/xxx"
81
- ```
82
-
83
- ### 搜索用户
84
-
85
- 根据关键词搜索抖音用户,支持按粉丝数量和用户类型筛选。
86
-
87
- ```bash
88
- aiconductor-cli douyin user-search <关键词> [选项]
89
- ```
90
-
91
- **选项:**
92
-
93
- | 选项 | 说明 | 默认值 |
94
- |------|------|--------|
95
- | `--max-pages <n>` | 最大页数,0=不限制 | 1 |
96
- | `--max-seconds <n>` | 最长运行时间(秒),最大180 | 50 |
97
- | `--fans-range <范围>` | 粉丝数筛选 | 不限 |
98
- | `--user-type <类型>` | 用户类型筛选 | 不限 |
99
-
100
- **粉丝数范围 `--fans-range`:**
101
-
102
- | 值 | 说明 |
103
- |----|------|
104
- | `0_1k` | 1000以下 |
105
- | `1k_1w` | 1000到1万 |
106
- | `1w_10w` | 1万到10万 |
107
- | `10w_100w` | 10万到100万 |
108
- | `100w_` | 100万以上 |
109
-
110
- **用户类型 `--user-type`:**
111
-
112
- | 值 | 说明 |
113
- |----|------|
114
- | `common_user` | 普通用户 |
115
- | `enterprise_user` | 企业认证用户 |
116
- | `personal_user` | 个人认证用户 |
117
-
118
- **示例:**
119
-
120
- ```bash
121
- aiconductor-cli douyin user-search "美食博主" --fans-range 1w_10w --user-type personal_user --max-pages 2
122
- ```
123
-
124
- ### 搜索视频
125
-
126
- 根据关键词搜索抖音视频,支持排序方式、发布时间、视频时长、内容类型等筛选。
127
-
128
- ```bash
129
- aiconductor-cli douyin video-search <关键词> [选项]
130
- ```
131
-
132
- **选项:**
133
-
134
- | 选项 | 说明 | 默认值 |
135
- |------|------|--------|
136
- | `--max-pages <n>` | 最大页数,0=不限制 | 1 |
137
- | `--max-seconds <n>` | 最长运行时间(秒),最大50 | 50 |
138
- | `--sort-type <类型>` | 排序方式 | 0 |
139
- | `--publish-time <时间>` | 发布时间筛选 | 0 |
140
- | `--filter-duration <时长>` | 视频时长筛选 | 0 |
141
- | `--content-type <类型>` | 内容类型筛选 | 0 |
142
-
143
- **排序方式 `--sort-type`:**
144
-
145
- | 值 | 说明 |
146
- |----|------|
147
- | `0` | 综合排序 |
148
- | `1` | 最多点赞 |
149
- | `2` | 最新发布 |
150
-
151
- **发布时间 `--publish-time`:**
152
-
153
- | 值 | 说明 |
154
- |----|------|
155
- | `0` | 不限 |
156
- | `1` | 最近一天 |
157
- | `7` | 最近一周 |
158
- | `180` | 最近半年 |
159
-
160
- **视频时长 `--filter-duration`:**
161
-
162
- | 值 | 说明 |
163
- |----|------|
164
- | `0` | 不限 |
165
- | `0-1` | 1分钟以内 |
166
- | `1-5` | 1-5分钟 |
167
- | `5-10000` | 5分钟以上 |
168
-
169
- **内容类型 `--content-type`:**
170
-
171
- | 值 | 说明 |
172
- |----|------|
173
- | `0` | 不限 |
174
- | `1` | 视频 |
175
- | `2` | 图片 |
176
- | `3` | 文章 |
177
-
178
- **示例:**
179
-
180
- ```bash
181
- aiconductor-cli douyin video-search "北京旅游" --sort-type 2 --publish-time 7 --max-pages 2
182
- ```
183
-
184
- ### 链接转文字
185
-
186
- 将抖音视频链接中的语音转换为文字。支持两套语音识别策略,自动检测转写准确度。
187
-
188
- ```bash
189
- aiconductor-cli douyin link-to-text <视频URL>
190
- ```
191
-
192
- **示例:**
193
-
194
- ```bash
195
- aiconductor-cli douyin link-to-text "https://v.douyin.com/xxx/"
196
- ```
197
-
198
- ### 通用选项
199
-
200
- 所有子命令均支持:
201
-
202
- | 选项 | 说明 |
203
- |------|------|
204
- | `-k, --api-key <key>` | AIConductor API Key(优先于环境变量和 .env) |
205
- | `-f, --format <format>` | 输出格式:`json` 或 `text`,默认 `json` |
206
-
207
- ### 错误处理
208
-
209
- - 缺少 API Key / CLI 未安装 / command not found → 读取 [references/aiconductor-skills-setup.md](references/aiconductor-skills-setup.md) 并按其步骤处理
210
- - API 返回错误 → 展示错误信息给用户
211
-
212
- ## 注意事项
213
-
214
- 1. 接口支持 POST 和 GET 两种请求方式
215
- 2. 所有接口均自动解析抖音短链接
216
- 3. 翻页接口(用户搜索/视频搜索/用户视频)按页计费,达到时间或页数限制时自动停止
217
- 4. API 按次或按页计费,计费信息不会暴露给终端用户
218
- 5. 默认使用 JSON 输出格式,便于 AI Agent 解析
219
- 6. 获取用户详情按次计费(0.03元/次)而非按秒
@@ -1,50 +0,0 @@
1
- # 技能安装与配置
2
-
3
- 仅当用户明确要求首次安装、初始化或配置此技能时读取本文档。正常操作流程默认环境已经可用,不要每次使用前执行初始化。
4
-
5
- ## 安装或升级 CLI
6
-
7
- 使用 npm 全局安装最新版:
8
-
9
- ```bash
10
- npm install -g aiconductor-cli@latest
11
- ```
12
-
13
- 安装后确认命令可用:
14
-
15
- ```bash
16
- aiconductor-cli --help
17
- ```
18
-
19
- ## 配置 API Key
20
-
21
- 引导用户前往 https://dev.aiconductor.fun/register 注册并获取 API Key。
22
-
23
- macOS / Linux:
24
-
25
- ```bash
26
- echo 'export AICONDUCTOR_API_KEY="your-api-key"' >> ~/.zshrc && source ~/.zshrc
27
- ```
28
-
29
- Windows PowerShell:
30
-
31
- ```powershell
32
- [Environment]::SetEnvironmentVariable("AICONDUCTOR_API_KEY", "your-api-key", "User")
33
- ```
34
-
35
- 也可在当前项目目录创建 `.env` 文件:
36
-
37
- ```env
38
- AICONDUCTOR_API_KEY=your-api-key
39
- ```
40
-
41
- 优先级:`-k` 参数 > `AICONDUCTOR_API_KEY` 环境变量 > `.env` 文件。
42
-
43
- ## 故障恢复
44
-
45
- - `command not found` / `aiconductor-cli` 无法识别:执行安装或升级命令后重试原命令
46
- - 缺少 API Key:按上方方式配置密钥后开启新的终端会话,或在当前命令中临时使用 `-k <api-key>`
47
- - API Key 无效或认证失败:请用户确认密钥是否正确、是否仍可用,再重试原命令
48
- - 版本不兼容或参数不被识别:升级到最新版后重试原命令
49
-
50
- 修复后只重试原命令一次;如果仍失败,向用户展示原始错误信息和已尝试的修复步骤。