@gitruck/cli 1.2.7 → 1.2.8

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/CHANGELOG.md CHANGED
@@ -2,6 +2,30 @@
2
2
 
3
3
  ## 未发布
4
4
 
5
+ ### 加:视频译制配音 `video_translate_dub`(link-video-translate-dub-cli)
6
+
7
+ `gtrk tool video_translate_dub <视频或音频> --language <源语种> --translate-language <目标语种> --speaker <clone 或音色代号>`:
8
+ 把原片里的话翻译成目标语种,用所选音色或克隆原片说话人的声音逐句重新配音,画面保持原样(不做口型同步)。
9
+ 单条最长 120 分钟,超了上传前直接拒;按分钟计费,运行前实时查价。
10
+ 可选 `--ref <参考音频或视频>`(仅 `clone` 有意义,克隆别人的声音须先取得本人同意)、`--ref-lang`、`--no-keep-bgm`、`--fit-policy`、
11
+ `--speed-band <最小,最大>`、`--subtitle-mode`、`--subtitle-type`、`--project-formats <逗号分隔>`;各参数的合法取值以服务端为准,CLI 不内置枚举。
12
+
13
+ 产物:`<输入名>-dub.mp4`(音频输入为 `-dub.mp3`)、`dub.wav`、`bgm.wav` 与 `base.mp4`(有则落)、字幕 `.srt`、逐句对齐记录 `transcript.json`、
14
+ 工程文件按格式分目录(`gtrk/`、`jianying/` …),`result-output.json` 为配音对齐报告。
15
+ 提交时自动带上原片与产物目录的本机路径,各格式工程里的素材都指向本机文件,打开即用。要剪映草稿加 `--project-formats gtrk,jianying`:草稿两件套齐全后自动放进剪映草稿目录(新增 `--jianying-draft-dir`,缺省读 `gtrk init` 配置或自动探测,与 `gtrk oralcut` 一致);CapCut 草稿留在产物目录。服务端尚未升级时工程里仍是占位名、剪映草稿缺 meta,终端会各打一行提示。
16
+ 字幕、逐句记录、工程文件等附带产物偶尔缺项时只打一行 WARN,任务照常判成功。
17
+
18
+ ### 加:工具族通用「附加输入文件」
19
+
20
+ 工具可声明除主输入之外的本地文件参数(首个使用者是上面的 `--ref`):任何上传之前先本地校验文件存在与扩展名,
21
+ 主输入之后上传,`--reupload` 同样生效,`task.json` 记录 `extraInputs`;没声明的工具行为与面包屑不变。
22
+ 产物文件名带子目录时自动建父目录。
23
+
24
+ ### 改:共享参数说明与超时长报错
25
+
26
+ `--language` / `--translate-language` / `--speaker` / `--subtitle-type` 的说明改为不绑定单一工具的表述,参数名不变。
27
+ 视频类工具输入超时长的报错改为「输入时长超过 N 分钟上限,请先裁剪或分段后再提交」。
28
+
5
29
  ### 文档:`gtrk-tools` 图纸写明 `audio_tts_clone` 可选出字幕(link-add-tts-subtitle-output-cli 3.2)
6
30
 
7
31
  输入列补 `--subtitle-format <fmt>`(可选、缺省不出、不额外计费、取值以服务端为准),产物列补另产 `tts-<音色代号>.srt`(服务端降级时不留空文件);
package/README.en.md CHANGED
@@ -253,17 +253,17 @@ gtrk skills install --all
253
253
  gtrk skills install --copy
254
254
  ```
255
255
 
256
- > ⚠️ **Upgrading the CLI does not refresh the skills you already installed.**
257
- > `npm i -g @gitruck/cli@latest` swaps the CLI package only; the copy under each agent's directory is still
258
- > **the snapshot from your last install** — the agent keeps working from the stale wording, **and nothing errors out**.
259
- > Refresh with `gtrk upgrade` (CLI + skills) or run `gtrk skills install` on its own.
260
- >
261
- > Since **1.1.3** this is no longer silent: the skill-backed commands (`oralcut`, `long2short`, `split`,
262
- > `matrix`, `mg`, `subtitle`, `project`) print a one-off notice on **stderr** with the fix command when they
263
- > detect that the installed skills lag behind the package; when they match, or cannot be judged, output is
264
- > **empty**. Run `gtrk doctor` any time for the "Skill freshness" row, or set
265
- > `GTRK_SKILL_FRESHNESS=off` to silence the whole thing.
266
-
256
+ > ⚠️ **Upgrading the CLI does not refresh the skills you already installed.**
257
+ > `npm i -g @gitruck/cli@latest` swaps the CLI package only; the copy under each agent's directory is still
258
+ > **the snapshot from your last install** — the agent keeps working from the stale wording, **and nothing errors out**.
259
+ > Refresh with `gtrk upgrade` (CLI + skills) or run `gtrk skills install` on its own.
260
+ >
261
+ > Since **1.1.3** this is no longer silent: the skill-backed commands (`oralcut`, `long2short`, `split`,
262
+ > `matrix`, `mg`, `subtitle`, `project`) print a one-off notice on **stderr** with the fix command when they
263
+ > detect that the installed skills lag behind the package; when they match, or cannot be judged, output is
264
+ > **empty**. Run `gtrk doctor` any time for the "Skill freshness" row, or set
265
+ > `GTRK_SKILL_FRESHNESS=off` to silence the whole thing.
266
+
267
267
  `--agents` accepts agent IDs from both the upstream adapter and the gtrk supplement layer. Chinese agents already covered include `trae`, `trae-cn`, `codebuddy`, `qoder`, `qoder-cn`, `qwen-code`, `kimi-code-cli`, `iflow-cli`, `codearts-agent` and `lingma`, plus `workbuddy`, `qoderwork` and `comate` which upstream has not registered yet. Common shorthands — `qwen`, `kimi`, `iflow`, `codearts`, `tongyi-lingma`, `qoder-work`, `baidu-comate` — are mapped automatically. When upstream adds new agents, gtrk can use the new IDs without a release; if an existing script must hardcode a directory, `--dir <skills dir>` still gives you the compatible copy mode.
268
268
 
269
269
  **Agent input UIs are not standardized**: Claude usually surfaces skill names in `/` completion; different Codex clients enter via `$`, `/skills` or a Skills panel; TRAE relies mostly on Skills settings, explicit naming or semantic triggering. So not seeing a Claude-style `/gtrk-*` dropdown does not mean the skill is missing. If a new skill does not show up, refresh the window or start a new session.
@@ -677,6 +677,7 @@ Standalone single-request capabilities, kept separate from the pipeline's lane c
677
677
  | `audio_tts_clone` | **No file**: one of `--text`/`--text-file` (≤ 5000 characters) plus a required `--speaker`; optional language/format/speed/segmentation/subtitles/**sentence pause** (`--fragment-interval <sec>`, **in-house voices only**; cloud voices **return an error** rather than silently ignoring it — the valid range is enforced server-side and stated in that error) | Voice-over audio wav/mp3 (plus optional subtitles); billed by character count — the unit and unit price come from what `gtrk tool list` shows live | Queried live before the run | Live |
678
678
  | `video_ai_subtitle` | One video or audio file; `--language <code>` required; optional `--translate-language`, `--need-render`, `--need-pure`, `--subtitle-type`, `--subtitle-color`. By default only locally extracted audio is uploaded (the raw file never leaves your machine) | `.ass` subtitles + optional burned-in / subtitle-stripped `.mp4` + `result-output.json` (summary + word-level timeline) | Queried live before the run | Live |
679
679
  | `subtitle_translate` | One **subtitle file** `.ass` / `.srt`; **both** `--language <code>` and `--translate-language <code>` are required; optional `--output-format`, `--line-mode`, `--bilingual`, `--subtitle-type`, `--subtitle-color`, `--canvas <WxH>`. No speech recognition | Translated subtitles `.ass` or `.srt` + `result-output.json` (entry counts + degradation flags) | Queried live before the run | Live |
680
+ | `video_translate_dub` | One video or audio file (**≤ 120 minutes**, uploaded whole); **all three of** `--language <source>`, `--translate-language <target>`, `--speaker <clone or voice code>` are required; optional `--ref <reference audio or video>` (only with `clone`; cloning someone else's voice requires that person's consent), `--ref-lang`, `--no-keep-bgm`, `--fit-policy`, `--speed-band <min,max>`, `--subtitle-mode`, `--subtitle-type`, `--project-formats <comma-separated>` (default: `.gtrk` only; add `jianying` to get a Jianying draft placed straight into your Jianying drafts folder), `--jianying-draft-dir`; valid values are decided server-side. Only the audio is replaced — the picture stays as it is (no lip sync); long sources take 15+ minutes | Dubbed video `<input-name>-dub.mp4` (`.mp3` for audio input) + `dub.wav` / `bgm.wav` + `.srt` subtitles + `transcript.json` + project files in per-format subfolders (`gtrk/`, `jianying/` …) + `result-output.json` (dub alignment report; includes `errors` when a side artifact is missing, without failing the run) | Queried live before the run | Live |
680
681
  | `video_long2short_pro` | One long video (uploaded whole); `--language <code>` required; optional `--output-language`, `--main-topic`, `--output-size`, `--no-jump-cut`, `--duration-pref`, `--max-clip-sec`, `--split-screen`, `--split-orientation`, `--speed-factor`, `--no-camera-move`, `--no-subtitle`, `--subtitle-translate-language` | Finished clips `clip{i}.mp4` + the human-readable report `clips.md` (including polish-degradation details) + `result-output.json` | Queried live before the run | Live |
681
682
  | `audio_separation` | One audio file; optional `--mode fast\|turbo` | Vocal and accompaniment audio (one or two items, depending on what is returned) | Queried live before the run | Live |
682
683
  | `audio_speaker_split` | One audio file; optional `--only-struct` | Per-speaker `.wav` stems + a `spoken_list` timeline (`result-output.json`) | Queried live before the run | Live |
package/README.md CHANGED
@@ -248,15 +248,15 @@ gtrk skills install --all
248
248
  gtrk skills install --copy
249
249
  ```
250
250
 
251
- > ⚠️ **升级 CLI 不会自动刷新已装的 skill。** `npm i -g @gitruck/cli@latest` 只换掉 CLI 包本体,
252
- > 各 Agent 目录下那份 skill 仍是**上次装进去的快照** —— agent 会照着旧口径干活,**而且不报错**。
253
- > 刷新走 `gtrk upgrade`(升 CLI + 刷 skill)或单独跑 `gtrk skills install`。
254
- >
255
- > 自 **1.1.3** 起这件事有信号了:需要 skill 的命令(`oralcut` / `long2short` / `split` / `matrix` /
256
- > `mg` / `subtitle` / `project`)在检测到本机 skill 落后时,会往 **stderr** 提示一次并给出修复命令;
257
- > 一致或判不出时**零输出**。随时自查跑 `gtrk doctor`,里面有一行「Skill 新鲜度」;
258
- > 嫌吵用环境变量 `GTRK_SKILL_FRESHNESS=off` 整块关掉。
259
-
251
+ > ⚠️ **升级 CLI 不会自动刷新已装的 skill。** `npm i -g @gitruck/cli@latest` 只换掉 CLI 包本体,
252
+ > 各 Agent 目录下那份 skill 仍是**上次装进去的快照** —— agent 会照着旧口径干活,**而且不报错**。
253
+ > 刷新走 `gtrk upgrade`(升 CLI + 刷 skill)或单独跑 `gtrk skills install`。
254
+ >
255
+ > 自 **1.1.3** 起这件事有信号了:需要 skill 的命令(`oralcut` / `long2short` / `split` / `matrix` /
256
+ > `mg` / `subtitle` / `project`)在检测到本机 skill 落后时,会往 **stderr** 提示一次并给出修复命令;
257
+ > 一致或判不出时**零输出**。随时自查跑 `gtrk doctor`,里面有一行「Skill 新鲜度」;
258
+ > 嫌吵用环境变量 `GTRK_SKILL_FRESHNESS=off` 整块关掉。
259
+
260
260
  `--agents` 接受上游适配器和 gtrk 补充层的 Agent ID。国产 Agent 已覆盖 `trae`、`trae-cn`、`codebuddy`、`qoder`、`qoder-cn`、`qwen-code`、`kimi-code-cli`、`iflow-cli`、`codearts-agent`、`lingma`,并额外补充上游尚未登记的 `workbuddy`、`qoderwork`、`comate`。常见简写 `qwen`、`kimi`、`iflow`、`codearts`、`tongyi-lingma`、`qoder-work`、`baidu-comate` 也会自动映射。以后上游新增 Agent,gtrk 无须发版也能直接使用新 ID;已有脚本若必须写死一个目录,仍可用 `--dir <skills目录>` 走兼容复制模式。
261
261
 
262
262
  不同 Agent 的**输入 UI 不统一**:Claude 常把 skill 名放进 `/` 补全;Codex 的不同客户端可从 `$`、`/skills` 或 Skills 面板进入;TRAE 以 Skills 设置、显式点名或语义触发为主。因此没看到 Claude 风格的 `/gtrk-*` 下拉,不代表 skill 没安装。新 skill 没出现时,刷新窗口或新开会话。
@@ -695,6 +695,7 @@ gtrk matrix lay --project <目录> [--plan <path>] # ③ 消费(
695
695
  | `audio_tts_clone` | **无文件**:`--text`/`--text-file` 二选一(≤5000 字)+ `--speaker` 必填;可选语言/格式/语速/切分法/字幕/**句间停顿**(`--fragment-interval <秒>`,**仅自训音色**;云引擎音色传了会**报错**而非静默忽略,合法区间由服务端校验并在报错里给出) | 配音音频 wav/mp3(+ 可选字幕);按文本字符数计费,计量单位与单价以 `gtrk tool list` 实时显示为准 | 运行前实时查询 | 已上线 |
696
696
  | `video_ai_subtitle` | 单条视频或音频;`--language <码>` 必填;可选 `--translate-language`、`--need-render`、`--need-pure`、`--subtitle-type`、`--subtitle-color`。默认只传本地抽出的音频(毛片不上传) | `.ass` 字幕 + 可选烧录/去字幕 `.mp4` + `result-output.json`(摘要 + 字级时间轴) | 运行前实时查询 | 已上线 |
697
697
  | `subtitle_translate` | 单个**字幕文件** `.ass` / `.srt`;`--language <码>` 与 `--translate-language <码>` **双必填**;可选 `--output-format`、`--line-mode`、`--bilingual`、`--subtitle-type`、`--subtitle-color`、`--canvas <WxH>`。不含语音识别 | 译文字幕 `.ass` 或 `.srt` + `result-output.json`(条数统计 + 降级标记) | 运行前实时查询 | 已上线 |
698
+ | `video_translate_dub` | 单条视频或音频(**≤120 分钟**,整片上传);`--language <源语种>`、`--translate-language <目标语种>`、`--speaker <clone 或音色代号>` **三项必填**;可选 `--ref <参考音频或视频>`(仅 `clone`;克隆别人的声音须先取得本人同意)、`--ref-lang`、`--no-keep-bgm`、`--fit-policy`、`--speed-band <最小,最大>`、`--subtitle-mode`、`--subtitle-type`、`--project-formats <逗号分隔>`(缺省只出 `.gtrk`;要剪映草稿写 `gtrk,jianying`,草稿自动放进剪映草稿目录)、`--jianying-draft-dir`;取值以服务端为准。只换音轨、画面保持原样(不做口型同步),长片耗时十几分钟起 | 配音成片 `<输入名>-dub.mp4`(音频输入为 `.mp3`)+ `dub.wav` / `bgm.wav` + 字幕 `.srt` + `transcript.json` + 工程文件按格式分目录(`gtrk/`、`jianying/` …)+ `result-output.json`(配音对齐报告;附带产物缺项时含 `errors`,不判失败) | 运行前实时查询 | 已上线 |
698
699
  | `video_long2short_pro` | 单条长视频(整片上传);`--language <码>` 必填;可选 `--output-language`、`--main-topic`、`--output-size`、`--no-jump-cut`、`--duration-pref`、`--max-clip-sec`、`--split-screen`、`--split-orientation`、`--speed-factor`、`--no-camera-move`、`--no-subtitle`、`--subtitle-translate-language` | 逐条成片 `clip{i}.mp4` + 人读报告 `clips.md`(含润色降级明细) + `result-output.json` | 运行前实时查询 | 已上线 |
699
700
  | `audio_separation` | 单条音频;可选 `--mode fast\|turbo` | 人声与伴奏音频(按实际返回可为一项或两项) | 运行前实时查询 | 已上线 |
700
701
  | `audio_speaker_split` | 单条音频;可选 `--only-struct` | 各说话人 `.wav` 分轨 + `spoken_list` 时间线(`result-output.json`) | 运行前实时查询 | 已上线 |