yuanflow-cli 0.1.40 → 0.1.41
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 +119 -8
- package/generated/registry.json +985 -984
- package/package.json +1 -1
- package/scripts/generate-registry.js +1 -1
- package/skills/yuanflow-skill/README.md +14 -10
- package/skills/yuanflow-skill/SKILL.md +37 -7
- package/skills/yuanflow-skill/{OSS → YuanFlow}/346/226/207/344/273/266/344/270/255/350/275/254/345/267/245/345/205/267/SKILL.md +8 -8
- package/skills/yuanflow-skill/yuanflow-cli/SKILL.md +3 -3
- package/skills/yuanflow-skill//344/275/234/345/223/201/344/270/213/350/275/275/347/273/274/345/220/210/345/267/245/345/205/267/SKILL.md +1 -1
- package/skills/yuanflow-skill//344/275/234/345/223/201/350/257/204/350/256/272/351/207/207/351/233/206/SKILL.md +1 -1
- package/skills/yuanflow-skill//350/247/206/350/247/211/347/220/206/350/247/243/SKILL.md +174 -0
- package/skills/yuanflow-skill//350/247/206/351/242/221/346/213/206/350/247/243/SKILL.md +245 -0
- package/skills/yuanflow-skill//351/237/263/350/247/206/351/242/221/345/234/250/347/272/277/350/275/254/346/226/207/345/255/227/SKILL.md +10 -10
- package/src/agent-protocol.js +8 -5
- package/src/ai-tools.js +835 -0
- package/src/cli.js +35 -1
- package/src/comment-collector.js +1 -1
- package/src/oss-tools.js +11 -11
- package/src/shortcuts.js +3 -3
- package/src/trending-tools.js +1 -1
- package/src/work-tools.js +4 -4
package/README.md
CHANGED
|
@@ -48,6 +48,14 @@ yuanflow-cli browser task-plan --platform xiaohongshu --task publish --account m
|
|
|
48
48
|
yuanflow-cli video init --input "D:\素材" --primary-audio "D:\素材\口播.mp3" --broll "D:\素材\画面.mp4" --format agent-json
|
|
49
49
|
yuanflow-cli video strategy --project "D:\素材\yuanflow-video-edit" --template-type talking_head --rules-file "D:\规则\logic.json,D:\规则\template.json,D:\规则\cli.json" --format agent-json
|
|
50
50
|
yuanflow-cli video plan --project "D:\素材\yuanflow-video-edit" --timeline-plan "D:\素材\yuanflow-video-edit\timeline_plan.agent.json" --format agent-json
|
|
51
|
+
yuanflow-cli ai qwen3-vl-plus --prompt "描述这张图" --image-url "https://example.com/image.png" --format agent-json
|
|
52
|
+
yuanflow-cli ai qwen3-vl-plus --prompt "总结这个视频画面" --video-url "https://example.com/video.mp4" --format agent-json
|
|
53
|
+
yuanflow-cli ai qwen3-vl-plus --prompt "描述本地视频" --video-file "D:\素材\demo.mp4" --format agent-json
|
|
54
|
+
yuanflow-cli ai doubao-tts voices --format agent-json
|
|
55
|
+
yuanflow-cli ai doubao-tts voice --voice zh_female_xiaohe_uranus_bigtts --format agent-json
|
|
56
|
+
yuanflow-cli ai doubao-tts voice-download --voice zh_female_xiaohe_uranus_bigtts --output "D:\voice\preview.mp3" --format agent-json
|
|
57
|
+
yuanflow-cli ai doubao-tts --text "你好" --voice zh_female_xiaohe_uranus_bigtts --output "D:\voice\doubao.mp3" --format agent-json
|
|
58
|
+
yuanflow-cli ai fun-asr --audio-url "https://example.com/audio.wav" --response-format verbose_json --format agent-json
|
|
51
59
|
yuanflow-cli list douyin
|
|
52
60
|
```
|
|
53
61
|
|
|
@@ -57,7 +65,110 @@ yuanflow-cli list douyin
|
|
|
57
65
|
YUANCHUANG_API_TOKEN=<你的令牌>
|
|
58
66
|
```
|
|
59
67
|
|
|
60
|
-
token 优先级:`--token` > `YUANCHUANG_API_TOKEN` > 本地 `config.token`。独立 CLI 用户可以使用环境变量或 `config set-token`;在 YuanFlow 主程序内使用时,token
|
|
68
|
+
token 优先级:`--token` > `YUANCHUANG_API_TOKEN` > 本地 `config.token`。独立 CLI 用户可以使用环境变量或 `config set-token`;在 YuanFlow 主程序内使用时,token 由主程序认证系统注入,不需要手动配置。本地图片/视频上传统一使用 YuanFlow 文件中转,不需要用户配置第三方平台 Key。
|
|
69
|
+
|
|
70
|
+
### AI 模型命令
|
|
71
|
+
|
|
72
|
+
`ai` 命令用于调用 YuanFlow API 的 OpenAI 兼容端点。CLI 对外只使用 YuanFlow API 模型参数,不暴露底层供应商内部模型名。
|
|
73
|
+
|
|
74
|
+
```bash
|
|
75
|
+
yuanflow-cli ai help
|
|
76
|
+
yuanflow-cli ai qwen3-vl-plus --prompt "描述这张图" --image-url "https://example.com/image.png" --format agent-json
|
|
77
|
+
yuanflow-cli ai qwen3-vl-plus --prompt "总结这个视频画面" --video-url "https://example.com/video.mp4" --format agent-json
|
|
78
|
+
yuanflow-cli ai qwen3-vl-plus --prompt "描述本地图片" --image-file "D:\素材\cover.png" --format agent-json
|
|
79
|
+
yuanflow-cli ai qwen3-vl-plus --prompt "描述本地视频" --video-file "D:\素材\demo.mp4" --format agent-json
|
|
80
|
+
yuanflow-cli ai qwen-voice-enrollment --file "D:\voice\sample.wav" --name demo --activate --format agent-json
|
|
81
|
+
yuanflow-cli ai qwen3-tts-vc-realtime-2026-01-15 --text "你好" --voice voice_xxx --output "D:\voice\qwen.mp3" --format agent-json
|
|
82
|
+
yuanflow-cli ai fun-asr --audio-url "https://example.com/audio.wav" --response-format verbose_json --format agent-json
|
|
83
|
+
yuanflow-cli ai doubao-tts voices --format agent-json
|
|
84
|
+
yuanflow-cli ai doubao-tts voice --voice zh_female_xiaohe_uranus_bigtts --format agent-json
|
|
85
|
+
yuanflow-cli ai doubao-tts voice-download --voice zh_female_xiaohe_uranus_bigtts --output "D:\voice\preview.mp3" --format agent-json
|
|
86
|
+
yuanflow-cli ai doubao-tts --text "你好" --voice zh_female_xiaohe_uranus_bigtts --output "D:\voice\doubao.mp3" --format agent-json
|
|
87
|
+
```
|
|
88
|
+
|
|
89
|
+
#### qwen3-vl-plus 视觉理解
|
|
90
|
+
|
|
91
|
+
`qwen3-vl-plus` 走 YuanFlow API 对外模型名,不在 CLI 里暴露或改写成底层供应商内部名称。它支持 4 种媒体输入方式,一次快捷调用只选一种:
|
|
92
|
+
|
|
93
|
+
```bash
|
|
94
|
+
# 图片 URL
|
|
95
|
+
yuanflow-cli ai qwen3-vl-plus --prompt "描述这张图" --image-url "https://example.com/image.png" --format agent-json
|
|
96
|
+
|
|
97
|
+
# 视频 URL
|
|
98
|
+
yuanflow-cli ai qwen3-vl-plus --prompt "总结这个视频画面" --video-url "https://example.com/video.mp4" --format agent-json
|
|
99
|
+
|
|
100
|
+
# 本地图片:先上传到 YuanFlow 文件中转,再把临时访问链接传给 YuanFlow API
|
|
101
|
+
yuanflow-cli ai qwen3-vl-plus --prompt "描述本地图片" --image-file "D:\素材\cover.png" --format agent-json
|
|
102
|
+
|
|
103
|
+
# 本地视频:先上传到 YuanFlow 文件中转,再把临时访问链接传给 YuanFlow API
|
|
104
|
+
yuanflow-cli ai qwen3-vl-plus --prompt "描述本地视频" --video-file "D:\素材\demo.mp4" --format agent-json
|
|
105
|
+
```
|
|
106
|
+
|
|
107
|
+
本地文件上传要求:
|
|
108
|
+
|
|
109
|
+
- 只需要 YuanFlow API token;CLI 会调用 `POST /atomic/oss/temp-upload` 完成 YuanFlow 文件中转。
|
|
110
|
+
- 文件上传请求体包含 `filename`、`content_base64`、`content_type` 和可选 `key`,返回里的 `signed_url` 会继续传给 `qwen3-vl-plus`。
|
|
111
|
+
- 该临时访问链接仅用于本次或短期处理,不建议长期保存;后续 skill 应在每次处理本地文件时重新上传。
|
|
112
|
+
- `--dry-run` 不读取、不上传本地文件,只预览最终请求结构。
|
|
113
|
+
|
|
114
|
+
视频调用注意:
|
|
115
|
+
|
|
116
|
+
- 视频 URL 需要能被 YuanFlow API 访问,响应头建议包含 `Content-Length` 和 `Content-Type`。
|
|
117
|
+
- 视觉模型侧建议单个视频最大 2GB,时长 2 秒到 1 小时;本地上传会经过 YuanFlow 文件中转,超大视频建议优先使用可公网访问的视频 URL。
|
|
118
|
+
- 图片/视频不要同时传;`--image-url`、`--video-url`、`--image-file`、`--video-file` 四选一。
|
|
119
|
+
|
|
120
|
+
命令清单:
|
|
121
|
+
|
|
122
|
+
- `ai qwen3-vl-plus`:`POST /v1/chat/completions`,文本/图片/视频理解,常用参数 `--prompt`、`--image-url`、`--video-url`、`--image-file`、`--video-file`。
|
|
123
|
+
- `ai qwen-voice-enrollment`:`POST /v1/audio/voices`,音色复刻,常用参数 `--file` 或 `--audio-url`、`--name`、`--activate`。
|
|
124
|
+
- `ai qwen3-tts-vc-realtime-2026-01-15`:`POST /v1/audio/speech`,复刻音色合成,`--voice` 使用 `voice_xxx` 或 `default`。
|
|
125
|
+
- `ai fun-asr`:`POST /v1/audio/transcriptions`,语音识别,`--audio-url` 适合远程音频,`--file` 适合本地音频直传。
|
|
126
|
+
- `ai doubao-tts`:`POST /v1/audio/speech`,豆包语音合成,`--voice` 直接传豆包官方音色 ID。
|
|
127
|
+
- `ai doubao-tts voices`:`GET /api/voice-assets/doubao/voices`,查询 doubao-tts 可用音色列表。
|
|
128
|
+
- `ai doubao-tts voice`:`GET /api/voice-assets/doubao/voices/{voice_type}`,查询单个音色详情。
|
|
129
|
+
- `ai doubao-tts voice-download`:`GET /api/voice-assets/doubao/voices/{voice_type}/download`,获取试听音频签名地址,传 `--output` 时下载试听音频到本地。
|
|
130
|
+
|
|
131
|
+
所有 AI 命令都支持 `--dry-run` 预览请求映射,支持 `--format agent-json` 输出稳定 Agent JSON 外壳。音频合成命令真实调用时必须传 `--output` 保存音频文件。
|
|
132
|
+
|
|
133
|
+
#### doubao-tts 音色查询、试听和合成
|
|
134
|
+
|
|
135
|
+
`doubao-tts` 的音色资源接口和合成接口要配套使用。音色接口只负责查询和下载试听音频,不参与模型调用计费;真正合成时仍调用 `ai doubao-tts`,并把音色记录里的 `voice_type` 传给 `--voice`。
|
|
136
|
+
|
|
137
|
+
完整流程:
|
|
138
|
+
|
|
139
|
+
```bash
|
|
140
|
+
# 1. 查询全部可用音色
|
|
141
|
+
yuanflow-cli ai doubao-tts voices --format agent-json
|
|
142
|
+
|
|
143
|
+
# 2. 查看某个音色详情
|
|
144
|
+
yuanflow-cli ai doubao-tts voice --voice zh_female_xiaohe_uranus_bigtts --format agent-json
|
|
145
|
+
|
|
146
|
+
# 3. 下载该音色的试听音频
|
|
147
|
+
yuanflow-cli ai doubao-tts voice-download --voice zh_female_xiaohe_uranus_bigtts --output "D:\voice\preview-xiaohe.mp3" --format agent-json
|
|
148
|
+
|
|
149
|
+
# 4. 使用同一个 voice_type 进行真实语音合成
|
|
150
|
+
yuanflow-cli ai doubao-tts --text "你好,这是豆包语音合成测试。" --voice zh_female_xiaohe_uranus_bigtts --output "D:\voice\doubao-xiaohe.mp3" --format agent-json
|
|
151
|
+
```
|
|
152
|
+
|
|
153
|
+
音色列表返回的关键字段:
|
|
154
|
+
|
|
155
|
+
- `display_name`:给用户看的名称,例如“小何”。
|
|
156
|
+
- `name`:更完整的展示名称,例如“小何 2.0”。
|
|
157
|
+
- `voice_type`:真正合成时传给 `--voice` 的 YuanFlow 音色参数,建议外部系统用它做缓存 key。
|
|
158
|
+
- `category`:音色分类,例如通用场景。
|
|
159
|
+
- `language`:语言。
|
|
160
|
+
- `capabilities`:能力说明,例如情感变化、指令遵循、ASMR。
|
|
161
|
+
- `preview_audio_key`:试听音频在资源 bucket 里的对象 key。
|
|
162
|
+
- `preview_audio_content_type`:试听音频 MIME 类型,通常是 `audio/mpeg`。
|
|
163
|
+
|
|
164
|
+
`voice-download` 默认返回签名下载地址;传 `--output` 时 CLI 会继续下载试听音频到本地。签名 URL 会过期,不建议长期保存;外部应用应缓存 `voice_type` 和本地试听文件,过期后重新调用 `voice-download` 获取新 URL。
|
|
165
|
+
|
|
166
|
+
外部系统推荐展示逻辑:
|
|
167
|
+
|
|
168
|
+
- 下拉框展示 `display_name` 或 `name`。
|
|
169
|
+
- 实际合成提交 `voice_type`。
|
|
170
|
+
- 用户点击试听时先查本地缓存;没有缓存再调用 `voice-download`。
|
|
171
|
+
- 合成接口固定使用 YuanFlow API 对外模型名 `doubao-tts`,不要把底层供应商内部资源名写到外部参数里。
|
|
61
172
|
|
|
62
173
|
### 作品评论采集
|
|
63
174
|
|
|
@@ -143,7 +254,7 @@ yuanflow-cli works detail --platform douyin --target "<aweme_id 或 share_url>"
|
|
|
143
254
|
|
|
144
255
|
### 自媒体知识库
|
|
145
256
|
|
|
146
|
-
知识库能力独立于社媒 `/social` 接口,走
|
|
257
|
+
知识库能力独立于社媒 `/social` 接口,走 YuanFlow API 的 `/api/knowledge-base/docs` 和 `/atomic/agent-rules/navigate`:
|
|
147
258
|
|
|
148
259
|
```bash
|
|
149
260
|
yuanflow-cli knowledge docs --format agent-json
|
|
@@ -192,9 +303,9 @@ yuanflow-cli video render-final --project "D:\素材\yuanflow-video-edit" --form
|
|
|
192
303
|
- `视频投流策略`:短视频、图文视频或内容素材的投流目标、人群、预算、素材分层和测试节奏。
|
|
193
304
|
- `直播投流策略`:直播预热、直播引流、直播成交和直播间投放的人群、预算、素材、节奏和复盘策略。
|
|
194
305
|
|
|
195
|
-
###
|
|
306
|
+
### YuanFlow 文件中转
|
|
196
307
|
|
|
197
|
-
|
|
308
|
+
YuanFlow 文件中转能力独立封装为兼容命令 `oss`,用于临时上传、签名链接和对象复制:
|
|
198
309
|
|
|
199
310
|
```bash
|
|
200
311
|
yuanflow-cli oss temp-upload --file ./cover.png --content-type image/png --format agent-json
|
|
@@ -233,14 +344,14 @@ yuanflow-cli browser dry-run --platform xiaohongshu --task publish --account mai
|
|
|
233
344
|
|
|
234
345
|
### 音视频在线转文字
|
|
235
346
|
|
|
236
|
-
`音视频在线转文字` 随 npm 包安装到 Skill bundle,用于通过 YuanFlow 在线 ASR 接口把音频或视频转成干净文本。视频输入需要先用 ffmpeg
|
|
347
|
+
`音视频在线转文字` 随 npm 包安装到 Skill bundle,用于通过 YuanFlow 在线 ASR 接口把音频或视频转成干净文本。视频输入需要先用 ffmpeg 分离音频,再上传到 YuanFlow 文件中转。
|
|
237
348
|
|
|
238
349
|
固定链路:
|
|
239
350
|
|
|
240
351
|
1. 判断用户提交的是音频还是视频。
|
|
241
352
|
2. 视频先抽取为音频,音频上传前改成英文文件名。
|
|
242
|
-
3. 使用 `yuanflow-cli oss temp-upload`
|
|
243
|
-
4. ASR
|
|
353
|
+
3. 使用 `yuanflow-cli oss temp-upload` 上传音频到 YuanFlow 文件中转。
|
|
354
|
+
4. ASR 请求必须优先使用文件中转返回的 `data.signed_url` 作为 `metadata.audio_url`,不要优先使用裸域名 `data.url`。
|
|
244
355
|
5. 调用 `POST https://open.yuanchuangai.com/v1/audio/transcriptions`,模型 `doubao-asr`,`response_format=json`。
|
|
245
356
|
6. 默认只返回响应里的 `text` 干净文本;视频剪辑任务需要音频对齐时,要优先保留 ASR 响应中的 `segments` / `words` 时间戳结构,后续交给 `yuanflow-cli video align --asr-file` 导入。接口没有返回时间戳时,不编造时间戳,改用 forced alignment 或人工按文案切分时间。
|
|
246
357
|
|
|
@@ -251,7 +362,7 @@ yuanflow-cli browser dry-run --platform xiaohongshu --task publish --account mai
|
|
|
251
362
|
"model": "doubao-asr",
|
|
252
363
|
"response_format": "json",
|
|
253
364
|
"metadata": {
|
|
254
|
-
"audio_url": "<
|
|
365
|
+
"audio_url": "<YuanFlow 文件中转 signed_url>"
|
|
255
366
|
}
|
|
256
367
|
}
|
|
257
368
|
```
|