@kg-ai/kugou-skill 0.0.5 → 0.0.6

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
@@ -22,7 +22,7 @@ description: |
22
22
 
23
23
  ### 关键注意事项
24
24
 
25
- - **登录是阻塞操作**:`kugou-cli auth login` 会持续轮询直到用户扫码确认。必须等到输出 `"status":"success"` 才能继续后续音乐操作。
25
+ - **登录是阻塞操作**:`kugou-cli auth login` 会持续轮询直到用户扫码确认。必须等到输出 `"status":"success"` 才能继续后续音乐操作。TUI Agent(如 OpenCode)推荐使用 `--output terminal` 模式,自动弹出系统图片查看器。`base64` 模式适合 Web 前端场景。
26
26
  - **音乐命令依赖登录**:除了 `auth`、`install`、`version`、`--help` 以外,所有 `music` 子命令都需要先登录。如果收到 `"not logged in"` 错误,引导用户执行 `kugou-cli auth login`。
27
27
  - **输出均为 JSON**:所有命令输出原始 JSON 到 stdout,错误输出到 stderr。解析 `errcode` 字段判断成功与否(`0` 为成功)。
28
28
  - **链接展示**:输出中的 `play_link` 字段,展示给用户时转为可点击格式:
@@ -46,7 +46,7 @@ description: |
46
46
  kugou-cli auth login
47
47
  kugou-cli auth login --output image # 默认,保存二维码图片到临时目录
48
48
  kugou-cli auth login --output base64 # 输出 base64 图片数据(含 data:image/png;base64, 前缀)
49
- kugou-cli auth login --output terminal # 打开系统图片查看器扫码
49
+ kugou-cli auth login --output terminal # 自动打开系统图片查看器扫码(推荐 TUI Agent 使用)
50
50
  ```
51
51
 
52
52
  **登录轮询流程**(`kugou-cli auth login` 内部自动处理):
@@ -59,7 +59,7 @@ kugou-cli auth login --output terminal # 打开系统图片查看器扫码
59
59
  5. 若超时/二维码过期输出 {"status": "failed", "message": "..."}
60
60
  ```
61
61
 
62
- > **重要**:登录成功后 token 自动持久化到 `~/.config/kugou-cli/auth.json`,后续无需重复登录。
62
+ > **输出模式选择建议**:`terminal` 模式会自动调用系统图片查看器弹出二维码,用户直接扫码即可,适合 OpenCode 等 TUI Agent 使用。`image` 模式保存到临时文件,需手动打开。`base64` 模式适合需要内嵌二维码图片展示的场景。
63
63
 
64
64
  ---
65
65
 
@@ -116,14 +116,14 @@ kugou-cli auth login --output terminal # 打开系统图片查看器扫码
116
116
  kugou-cli auth login
117
117
  kugou-cli auth login --output image # 默认,保存二维码图片到临时目录
118
118
  kugou-cli auth login --output base64 # 输出 base64 编码的图片数据(含 data:image/png;base64, 前缀)
119
- kugou-cli auth login --output terminal # 打开图片查看器扫码(Windows/macOS/Linux)
119
+ kugou-cli auth login --output terminal # 自动打开系统图片查看器,适合 OpenCode 等 TUI Agent
120
120
  ```
121
121
 
122
122
  **参数**:
123
123
  - `-o, --output`: 输出模式
124
124
  - `image` (默认): 保存二维码图片到临时目录,输出图片路径
125
125
  - `base64`: 输出 base64 编码的图片数据(含 `data:image/png;base64,` 前缀)
126
- - `terminal`: 打开系统图片查看器扫码(非 ASCII 渲染)
126
+ - `terminal`: 自动打开系统图片查看器显示二维码,适合 OpenCode 等 TUI Agent 使用。用户无需手动打开文件,系统会自动弹出二维码窗口供扫码。
127
127
 
128
128
  **输出示例** (image 模式):
129
129
  ```json
Binary file
Binary file
Binary file
Binary file
Binary file
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@kg-ai/kugou-skill",
3
- "version": "0.0.5",
3
+ "version": "0.0.6",
4
4
  "description": "Kugou Skill CLI",
5
5
  "main": "index.js",
6
6
  "bin": {