@kg-ai/kugou-skill 0.1.8 → 0.1.10
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 +198 -198
- package/SKILL.md +291 -222
- package/bin/darwin-arm64/kugou-cli +0 -0
- package/bin/darwin-x64/kugou-cli +0 -0
- package/bin/linux-arm64/kugou-cli +0 -0
- package/bin/linux-x64/kugou-cli +0 -0
- package/bin/win32-x64/kugou-cli.exe +0 -0
- package/package.json +1 -1
- package/references/auth.md +0 -4
- package/references/control.md +723 -680
- package/references/error-handling.md +18 -22
- package/references/music.md +526 -526
- package/references/output-format.md +101 -6
- package/references/update.md +2 -2
|
@@ -1,22 +1,18 @@
|
|
|
1
|
-
# 错误处理
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
|
15
|
-
|
|
16
|
-
|
|
|
17
|
-
| `
|
|
18
|
-
| `
|
|
19
|
-
| `HTTP error: 500` | 服务端错误 | 稍后重试,或告知用户 |
|
|
20
|
-
| `API error: <errmsg> (code=<N>)` | 业务错误(上游 errcode ≠ 0) | 根据 errmsg 提示用户 |
|
|
21
|
-
| `network error: ...` | 网络连接问题 | 检查网络,可尝试 `--proxy` |
|
|
22
|
-
| `failed to get device info` | 设备信息获取失败(仅 control) | 运行时环境异常,检查权限 |
|
|
1
|
+
# 错误处理
|
|
2
|
+
|
|
3
|
+
> **判定优先级**:退出码(非 0 = 失败)→ stdout body 的 `errcode` 字段 → stderr 文案。
|
|
4
|
+
> Agent **不应依赖 stderr 文案字面量**判断错误类型——文案可能随版本变化;以退出码和下表为准。
|
|
5
|
+
|
|
6
|
+
---
|
|
7
|
+
|
|
8
|
+
## 常见错误及处理
|
|
9
|
+
|
|
10
|
+
| 错误信息 | 原因 | 处理方式 |
|
|
11
|
+
|---------|------|---------|
|
|
12
|
+
| `账号登录过期,请重新登录` | 登录态已过期(errcode 语义由上游约定)。CLI 已**自动**清理本地登录态 | 引导用户重新登录:`kugou-cli auth login`(扫码)或 `kugou-cli auth set-secret "<新 secret>"` |
|
|
13
|
+
| `not logged in` / `auth file not found` | 未登录 | 引导用户执行 `kugou-cli auth login` |
|
|
14
|
+
| `HTTP error: 400` | 请求参数有误 | 检查命令参数是否正确 |
|
|
15
|
+
| `HTTP error: 500` | 服务端错误 | 稍后重试,或告知用户 |
|
|
16
|
+
| `API error: <errmsg> (code=<N>)` | 业务错误(上游 errcode ≠ 0) | 根据 errmsg 提示用户 |
|
|
17
|
+
| `network error: ...` | 网络连接问题 | 检查网络,可尝试 `--proxy` |
|
|
18
|
+
| `failed to get device info` | 设备信息获取失败(仅 control) | 运行时环境异常,检查权限 |
|