yuanflow-cli 0.1.18 → 0.1.20

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 CHANGED
@@ -141,6 +141,31 @@ yuanflow-cli oss copy --source-key temp/cover.png --target-key final/cover.png -
141
141
 
142
142
  上传本地文件前必须确认用户授权,不能上传密钥、cookie、账号凭据或隐私文件。
143
143
 
144
+ ### 音视频在线转文字
145
+
146
+ `音视频在线转文字` 随 npm 包安装到 Skill bundle,用于通过 YuanFlow 在线 ASR 接口把音频或视频转成干净文本。视频输入需要先用 ffmpeg 分离音频,再上传 OSS。
147
+
148
+ 固定链路:
149
+
150
+ 1. 判断用户提交的是音频还是视频。
151
+ 2. 视频先抽取为音频,音频上传前改成英文文件名。
152
+ 3. 使用 `yuanflow-cli oss temp-upload` 上传音频。
153
+ 4. ASR 请求必须优先使用 OSS 返回的 `data.signed_url` 作为 `metadata.audio_url`,不要优先使用裸域名 `data.url`。
154
+ 5. 调用 `POST https://open.yuanchuangai.com/v1/audio/transcriptions`,模型 `doubao-asr`,`response_format=json`。
155
+ 6. 默认只返回响应里的 `text` 干净文本;用户要求时间戳时再检查响应结构,不编造时间戳。
156
+
157
+ 请求体示例:
158
+
159
+ ```json
160
+ {
161
+ "model": "doubao-asr",
162
+ "response_format": "json",
163
+ "metadata": {
164
+ "audio_url": "<OSS signed_url>"
165
+ }
166
+ }
167
+ ```
168
+
144
169
  ### 生图技能
145
170
 
146
171
  `生图技能` 随 npm 包安装到 Skill bundle。YuanFlow 主程序内优先使用受控工具 `yuanflow_image_request`,自动注入当前用户 token 并缓存返回图片。
package/package.json CHANGED
@@ -1,73 +1,73 @@
1
- {
2
- "name": "yuanflow-cli",
3
- "version": "0.1.18",
4
- "description": "YuanFlow API CLI and skill installer for supported AI coding agents.",
5
- "type": "module",
6
- "license": "MIT",
7
- "private": false,
8
- "author": "zktlove",
9
- "publishConfig": {
10
- "access": "public"
11
- },
12
- "bin": {
13
- "yuanflow-cli": "bin/yuanflow-cli.js",
14
- "yuanflow-skill": "bin/yuanflow-skill.cjs"
15
- },
16
- "scripts": {
17
- "postinstall": "node ./bin/yuanflow-skill.cjs install --postinstall",
18
- "generate": "node ./scripts/generate-registry.js",
19
- "start": "node ./bin/yuanflow-cli.js",
20
- "test": "node --test test/*.test.js tests/*.test.cjs",
21
- "pack:check": "npm pack --dry-run",
22
- "release:check": "node ./bin/yuanflow-skill.cjs release-check",
23
- "publish:help": "node ./bin/yuanflow-skill.cjs publish-help"
24
- },
25
- "files": [
26
- "bin",
27
- "src",
28
- "generated",
29
- "scripts",
30
- "lib",
31
- "skills",
32
- "README.md",
33
- "LICENSE"
34
- ],
35
- "repository": {
36
- "type": "git",
37
- "url": "git+https://github.com/zktlove/yuanflow-cli.git"
38
- },
39
- "homepage": "https://github.com/zktlove/yuanflow-cli#readme",
40
- "bugs": {
41
- "url": "https://github.com/zktlove/yuanflow-cli/issues"
42
- },
43
- "yuanflowSkill": {
44
- "skillRepo": {
45
- "owner": "zktlove",
46
- "repo": "yuanflow-skill",
47
- "ref": "main"
48
- }
49
- },
50
- "engines": {
51
- "node": ">=20"
52
- },
53
- "keywords": [
54
- "skills",
55
- "ai-agent",
56
- "codex",
57
- "claude-code",
58
- "cursor",
59
- "opencode",
60
- "github-copilot",
61
- "gemini-cli",
62
- "kimi-cli",
63
- "openclaw",
64
- "trae",
65
- "windsurf",
66
- "qoder",
67
- "qwen-code",
68
- "yuanflow-cli",
69
- "yuanflow-skill",
70
- "xiaohongshu",
71
- "douyin"
72
- ]
73
- }
1
+ {
2
+ "name": "yuanflow-cli",
3
+ "version": "0.1.20",
4
+ "description": "YuanFlow API CLI and skill installer for supported AI coding agents.",
5
+ "type": "module",
6
+ "license": "MIT",
7
+ "private": false,
8
+ "author": "zktlove",
9
+ "publishConfig": {
10
+ "access": "public"
11
+ },
12
+ "bin": {
13
+ "yuanflow-cli": "bin/yuanflow-cli.js",
14
+ "yuanflow-skill": "bin/yuanflow-skill.cjs"
15
+ },
16
+ "scripts": {
17
+ "postinstall": "node ./bin/yuanflow-skill.cjs install --postinstall",
18
+ "generate": "node ./scripts/generate-registry.js",
19
+ "start": "node ./bin/yuanflow-cli.js",
20
+ "test": "node --test test/*.test.js tests/*.test.cjs",
21
+ "pack:check": "npm pack --dry-run",
22
+ "release:check": "node ./bin/yuanflow-skill.cjs release-check",
23
+ "publish:help": "node ./bin/yuanflow-skill.cjs publish-help"
24
+ },
25
+ "files": [
26
+ "bin",
27
+ "src",
28
+ "generated",
29
+ "scripts",
30
+ "lib",
31
+ "skills",
32
+ "README.md",
33
+ "LICENSE"
34
+ ],
35
+ "repository": {
36
+ "type": "git",
37
+ "url": "git+https://github.com/zktlove/yuanflow-cli.git"
38
+ },
39
+ "homepage": "https://github.com/zktlove/yuanflow-cli#readme",
40
+ "bugs": {
41
+ "url": "https://github.com/zktlove/yuanflow-cli/issues"
42
+ },
43
+ "yuanflowSkill": {
44
+ "skillRepo": {
45
+ "owner": "zktlove",
46
+ "repo": "yuanflow-skill",
47
+ "ref": "main"
48
+ }
49
+ },
50
+ "engines": {
51
+ "node": ">=20"
52
+ },
53
+ "keywords": [
54
+ "skills",
55
+ "ai-agent",
56
+ "codex",
57
+ "claude-code",
58
+ "cursor",
59
+ "opencode",
60
+ "github-copilot",
61
+ "gemini-cli",
62
+ "kimi-cli",
63
+ "openclaw",
64
+ "trae",
65
+ "windsurf",
66
+ "qoder",
67
+ "qwen-code",
68
+ "yuanflow-cli",
69
+ "yuanflow-skill",
70
+ "xiaohongshu",
71
+ "douyin"
72
+ ]
73
+ }
@@ -11,6 +11,7 @@ YuanFlow Skill 是 `yuanflow-cli` 的 Agent Skill 仓库,用于把社媒平台
11
11
  - `生图技能/`:图片生成与编辑 Skill,优先走 YuanFlow 内置 `yuanflow_image_request`。
12
12
  - `HTML报告生成/`:单页 HTML 报告生成 Skill,内置 9 种米色留白报告模板。
13
13
  - `本地音视频转文字/`:本地 SenseVoice 音视频转文字 Skill,首次明确使用时按需下载模型。
14
+ - `音视频在线转文字/`:通过 YuanFlow 在线 ASR 接口把音频或视频转成干净文本,视频会先抽取音频并通过 OSS 中转。
14
15
  - `帐号监控/`:帐号搜索、主页资料、主页作品、历史快照、变化对比和 HTML 可视化分流 Skill。
15
16
  - `个人创作库/`:长期保存、整理、复盘和复用用户认可的自媒体合格产出物。
16
17
 
@@ -24,6 +25,7 @@ YuanFlow Skill 是 `yuanflow-cli` 的 Agent Skill 仓库,用于把社媒平台
24
25
  - 生成图片、编辑图片,并缓存返回 URL 或 base64 图片。生成图片必填 `prompt`,可选 `size / quality / style / n / response_format`;编辑图片必须通过 multipart 上传本地图片。
25
26
  - 把自媒体分析、数据复盘、文案方案、账号监控、知识梳理和执行计划生成可直接打开的单页 HTML 报告。
26
27
  - 在用户明确要求本地转写时,把本地音频或视频转成文字;视频会先抽取音频,模型和缓存都保存在 Skill 自己目录下。
28
+ - 在用户要求在线转写、云端转写或 doubao-asr 时,把本地音频或视频经 OSS 中转后提交在线 ASR,默认只返回干净文本。
27
29
  - 监控抖音、小红书、微博、知乎、Bilibili、TikTok、YouTube、Twitter/X 帐号主页,保存快照并对比历史变化;抖音链路优先使用 `get-sec-user-id -> user-profile -> user-posts -> works detail`。
28
30
  - 在用户要求保存、归档、复盘或复用已完成创作成果时,把选题、标题、文案、脚本、封面、剪辑思路、发布计划和数据复盘沉淀进个人创作库。
29
31
 
@@ -96,6 +98,8 @@ yuanflow-skill list-skills
96
98
  ├─ 本地音视频转文字
97
99
  │ ├─ SKILL.md
98
100
  │ └─ scripts/
101
+ ├─ 音视频在线转文字
102
+ │ └─ SKILL.md
99
103
  ├─ 个人创作库
100
104
  │ ├─ SKILL.md
101
105
  │ ├─ raw/
@@ -23,6 +23,7 @@ description: Use when the user asks about social-media API workflows, platform d
23
23
  - `生图技能/`
24
24
  - `HTML报告生成/`
25
25
  - `本地音视频转文字/`
26
+ - `音视频在线转文字/`
26
27
  - `帐号监控/`
27
28
  - `个人创作库/`
28
29
 
@@ -204,6 +205,20 @@ description: Use when the user asks about social-media API workflows, platform d
204
205
 
205
206
  - `本地音视频转文字`
206
207
 
208
+ ### 13. 走 `音视频在线转文字`
209
+
210
+ 遇到下面这些需求,优先进入这个子 Skill:
211
+
212
+ - 用户要求在线转文字、云端转写、快速转写、音频识别或视频提取文字。
213
+ - 用户提供本地音频或视频文件,并希望通过 YuanFlow 在线 ASR 获取完整文字稿。
214
+ - 用户明确要求使用 `doubao-asr`。
215
+
216
+ 如果用户明确要求离线、本地模型或本地 ASR,改用 `本地音视频转文字`。
217
+
218
+ 子 Skill 名称:
219
+
220
+ - `音视频在线转文字`
221
+
207
222
  ## 多需求时怎么处理
208
223
 
209
224
  如果用户一次提了多段流程,不要强行塞进一个子 Skill,按阶段拆开:
@@ -7,6 +7,18 @@ description: Use when the user asks to generate images, create pictures, make po
7
7
 
8
8
  当用户提到生成图片、画图、出图、做海报、生成视觉素材、编辑图片或修改本地图片时,优先使用本 Skill。
9
9
 
10
+ ## 提示词参考
11
+
12
+ 当用户需求比较模糊、没有明确风格方向,或需要补足海报、商品图、角色、人像、UI 截图、信息图、科研图等提示词结构时,可按需读取 `references/image-prompt-reference.md`。
13
+
14
+ 该参考库只作为方向参考,不是强制模板:
15
+
16
+ - 用户已经给出明确提示词时,以用户提示词为主。
17
+ - 不要原样复制案例,要结合用户主题、平台、比例、文字、保存要求重新改写。
18
+ - 只借鉴案例里的构图、镜头、材质、灯光、版式、文字约束、负面提示和 JSON/config-style 结构。
19
+ - 不要主动加入案例中的真实品牌、真实人物、个人签名、Logo、水印或作者标识。
20
+ - 中文海报、信息图、社交截图等含文字场景,需要明确要求文字清晰、简体中文、不乱码、层级正确。
21
+
10
22
  ## YuanFlow 内置环境
11
23
 
12
24
  如果当前 Agent 可用 `yuanflow_image_request`,优先使用该受控工具。它会自动注入当前用户 token,并把接口返回的 URL 或 base64 图片缓存为可预览资源。