@kg-ai/kugou-skill 0.0.16 → 0.0.17
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/SKILL.md
CHANGED
|
@@ -33,8 +33,9 @@ description: |
|
|
|
33
33
|
### 关键注意事项
|
|
34
34
|
|
|
35
35
|
- **登录是阻塞操作**:`kugou-cli auth login` 会持续轮询直到用户扫码确认。必须等到输出 `"status":"success"` 才能继续后续音乐操作。
|
|
36
|
-
-
|
|
37
|
-
- **`--output
|
|
36
|
+
- **默认模式(file)**:只保存二维码到临时文件,**需将图片发送给用户扫码**
|
|
37
|
+
- **`--output open` 模式**:保存二维码到临时文件并自动打开图片查看器
|
|
38
|
+
- **TUI 模式判断**:如果 Agent 当前为命令行交互模式(TUI),应使用 `--output open` 自动打开图片;如果是文件交互或需要用户主动获取图片的场景,应使用默认模式并**主动发送图片给用户**
|
|
38
39
|
- **音乐命令依赖登录**:除了 `auth`、`install`、`version`、`--help` 以外,所有 `music` 子命令都需要先登录。如果收到 `"not logged in"` 错误,引导用户执行 `kugou-cli auth login`。
|
|
39
40
|
- **输出均为 JSON**:所有命令输出原始 JSON 到 stdout,错误输出到 stderr。解析 `errcode` 字段判断成功与否(`0` 为成功)。
|
|
40
41
|
- **链接展示**:输出中的 `play_link` 字段,展示给用户时转为可点击格式:
|
|
@@ -55,8 +56,8 @@ description: |
|
|
|
55
56
|
使用前需要扫码登录。登录采用轮询机制,需等待用户扫码确认。
|
|
56
57
|
|
|
57
58
|
```bash
|
|
58
|
-
kugou-cli auth login #
|
|
59
|
-
kugou-cli auth login --output
|
|
59
|
+
kugou-cli auth login # 默认,只保存二维码图片到临时文件(需发送图片给用户扫码)
|
|
60
|
+
kugou-cli auth login --output open # 保存并打开图片查看器(适合 TUI 模式)
|
|
60
61
|
```
|
|
61
62
|
|
|
62
63
|
**登录轮询流程**(`kugou-cli auth login` 内部自动处理):
|
|
@@ -69,7 +70,9 @@ kugou-cli auth login --output file # 只保存二维码图片,不打开(
|
|
|
69
70
|
5. 若超时/二维码过期输出 {"status": "failed", "message": "..."}
|
|
70
71
|
```
|
|
71
72
|
|
|
72
|
-
>
|
|
73
|
+
> **TUI 模式判断**:Agent 应根据当前交互模式选择合适的输出模式:
|
|
74
|
+
> - **TUI 模式**(命令行交互,用户可直接看到弹窗):使用 `--output open` 自动打开二维码
|
|
75
|
+
> - **其他模式**(文件交互、需要用户主动操作):使用默认模式(file),**必须将 `qrcode_img_path` 对应的图片文件发送给用户**
|
|
73
76
|
|
|
74
77
|
---
|
|
75
78
|
|
|
@@ -123,25 +126,28 @@ kugou-cli auth login --output file # 只保存二维码图片,不打开(
|
|
|
123
126
|
### 1. 扫码登录
|
|
124
127
|
|
|
125
128
|
```bash
|
|
126
|
-
kugou-cli auth login
|
|
127
|
-
kugou-cli auth login --output
|
|
129
|
+
kugou-cli auth login # 默认,只保存二维码图片(需发送图片给用户扫码)
|
|
130
|
+
kugou-cli auth login --output open # 保存并打开图片查看器(适合 TUI 模式)
|
|
128
131
|
```
|
|
129
132
|
|
|
130
133
|
**参数**:
|
|
131
134
|
- `-o, --output`: 输出模式
|
|
132
|
-
- (默认)
|
|
133
|
-
- `
|
|
135
|
+
- `(默认)`: 只保存二维码图片到临时目录,**需将图片文件发送给用户扫码**
|
|
136
|
+
- `open`: 保存二维码图片到临时目录并打开图片查看器
|
|
134
137
|
|
|
135
|
-
**输出示例** (默认模式 -
|
|
138
|
+
**输出示例** (默认模式 - 保存文件):
|
|
136
139
|
```json
|
|
137
140
|
{"qrcode": "xxx", "qrcode_img_path": "C:\\Users\\xxx\\AppData\\Local\\Temp\\kugou-qrcode.png", "status": "waiting"}
|
|
138
141
|
```
|
|
139
142
|
|
|
140
|
-
**输出示例** (
|
|
143
|
+
**输出示例** (open 模式):
|
|
141
144
|
```json
|
|
142
|
-
{"qrcode": "xxx", "qrcode_img_path": "
|
|
145
|
+
{"qrcode": "xxx", "qrcode_img_path": "C:\\Users\\xxx\\AppData\\Local\\Temp\\kugou-qrcode.png", "status": "waiting"}
|
|
143
146
|
```
|
|
144
|
-
|
|
147
|
+
|
|
148
|
+
> **TUI 模式判断**:Agent 应根据当前交互模式选择:
|
|
149
|
+
> - **TUI 模式**:使用 `--output open` 自动打开二维码,用户可直接扫码
|
|
150
|
+
> - **其他模式**:使用默认模式,**必须将 `qrcode_img_path` 对应的图片文件发送给用户**
|
|
145
151
|
|
|
146
152
|
**轮询过程中的状态输出**:
|
|
147
153
|
- `{"status": "waiting", ...}` — 等待扫码
|
|
Binary file
|
package/bin/darwin-x64/kugou-cli
CHANGED
|
Binary file
|
|
Binary file
|
package/bin/linux-x64/kugou-cli
CHANGED
|
Binary file
|
|
Binary file
|