@gitruck/cli 1.2.14 → 1.2.15
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/AGENT.md +29 -10
- package/CHANGELOG.md +4 -2
- package/README.en.md +48 -13
- package/README.md +48 -13
- package/dist/index.js +244 -243
- package/docs/reference.en.md +24 -22
- package/docs/reference.md +35 -23
- package/package.json +3 -2
- package/skills/gtrk-ai-drama/SKILL.md +3 -1
- package/skills/gtrk-ai-drama/references/sparse-key-scenes.md +38 -0
- package/skills/gtrk-tools/SKILL.md +31 -3
package/AGENT.md
CHANGED
|
@@ -8,6 +8,25 @@
|
|
|
8
8
|
> → 拉回 gtrk/剪映/PR 三方工程文件 →(可选)本地 ffmpeg 渲染成片 → 三端打开**。云端零改动、纯结构产物,
|
|
9
9
|
> 源视频不出本地。结果/报告恒落盘 `result.json`,可按 `task_id` 秒级取回、无需重跑(见 §2.1 / §4)。
|
|
10
10
|
|
|
11
|
+
## Agent 去水印/去字幕
|
|
12
|
+
|
|
13
|
+
按用户意图选择流程,文字候选不等于该删除的内容;图形台标由 Agent 判断并补框。
|
|
14
|
+
|
|
15
|
+
**去除前必须主动问用户选模式并等答复**:快速 ffmpeg 做基础模糊,可能留涂抹痕迹;慢速 raft 做内容修复,通常更自然、可接近无痕,但不保证无损或还原遮挡细节。不得替用户默认任何模式。“无需复核选区”不等于选了模式;本任务已经明确选择的无需重复问。仅检测、编辑和空清单原片返回不受影响。模式不可因失败、耗时或限额自动切换,本地 ffmpeg 兜底也须另获用户同意。
|
|
16
|
+
|
|
17
|
+
1. `gtrk purify detect <视频> --out <目录> --json`:只检测,返回待审区域文件、摘要、代表时间点和运行记录。
|
|
18
|
+
2. 读取摘要、按代表时间查看原片;用 `gtrk purify edit <区域文件> --select-roi x,y,w,h --delete-id det-000001 --watermark-region x,y,w,h --protect-region x,y,w,h --out <最终文件>` 做本地筛选和补框。各筛选参数按需使用;完整 JSON 留在文件,不灌入对话。
|
|
19
|
+
3. `gtrk purify apply <最终文件> --purify-func-type <用户选定模式> --json`:只按最终清单处理,不重新检测。
|
|
20
|
+
|
|
21
|
+
用户明确全部清理范围时,可用 `gtrk purify run <视频> --detect-scope subtitle --watermark-region x,y,w,h --purify-func-type <用户选定模式> --json` 连续完成。run 必须明确 full_screen/subtitle/custom;custom 同时传 --detect-roi。
|
|
22
|
+
|
|
23
|
+
- `--purify-func-type ffmpeg|raft`:处理前显式必选,无默认值;ffmpeg 快速模糊,raft 慢速内容修复。保留处用 protect-region,保护优先。
|
|
24
|
+
- `gtrk purify resume <运行记录.json> --json`:继续已有任务和下载,沿用已选模式;旧记录尚未建处理任务时须询问并补 --purify-func-type。提交结果未知时停止重发,先核对云端任务。
|
|
25
|
+
- 空最终清单直接返回原视频,不创建处理任务。
|
|
26
|
+
- 检测与处理按原计费口径各计一次;本地 edit 免费。源路径、SHA256 与云文件绑定,换片须重检。
|
|
27
|
+
- JSON 回执给出实际文件路径;状态是 awaiting_review / completed / unchanged。
|
|
28
|
+
- 新处理请求会先查询 /task/video_purify/capabilities,必须支持 review_protocol=2;未升级会在上传与计费前停止。先更新 worker,再开放 HTTP 能力声明。
|
|
29
|
+
|
|
11
30
|
> **写/改 structure 级成片图纸**(旅拍 / 口播链 / 直播切片 / Vlog……)先过 `docs/成片型图纸公约.md`
|
|
12
31
|
> ——双模式命名(快速成片 / 逐步推进)、决策前置三条腿、MG 临场泛化的横切正本与自检清单都在那里。
|
|
13
32
|
|
|
@@ -132,16 +151,16 @@ gtrk transcript <本地视频.mp4> --json # 转成一个含总结/时
|
|
|
132
151
|
- **不越过用户自装的 ffmpeg**:定位仍是 `--ffmpeg-path` → `~/.gitruck/ffmpeg` → 系统 PATH。
|
|
133
152
|
- 字体落 `~/.gitruck/fonts`,经 `ass` 滤镜 `fontsdir` 供给——**不动用户的系统字体表**。
|
|
134
153
|
- 平台未覆盖时(如 linux-arm64)会明确报错并指引手工安装,**不会错装其他架构的包**。
|
|
135
|
-
|
|
136
|
-
6. **skill 新鲜度(agent 纪律 · fix-skill-install-staleness)**:随包 `/gtrk-*` skill 是
|
|
137
|
-
**装进去的那一刻的快照**,`npm i -g @gitruck/cli@latest` 升级 CLI **不会**刷新它们。
|
|
138
|
-
⇒ **你正在读的这份 skill 有可能落后于当前 CLI 版本,而且落后时不会报任何错。**
|
|
139
|
-
需要 skill 的命令在检测到落后时会往 **stderr** 打一次提示并附修复命令;
|
|
140
|
-
见到它 **MUST** 转告用户跑 `gtrk skills install`(或 `gtrk upgrade`),
|
|
141
|
-
**MUST NOT** 当噪音忽略 —— 「照着旧口径继续干活」正是这条提示要防的事。
|
|
142
|
-
随时自查:`gtrk doctor` 里的「Skill 新鲜度」一行。判不出或一致时**零输出**,
|
|
143
|
-
所以没看到提示不等于装过(没装过 manifest 就不存在,doctor 会如实说判不出)。
|
|
144
|
-
|
|
154
|
+
|
|
155
|
+
6. **skill 新鲜度(agent 纪律 · fix-skill-install-staleness)**:随包 `/gtrk-*` skill 是
|
|
156
|
+
**装进去的那一刻的快照**,`npm i -g @gitruck/cli@latest` 升级 CLI **不会**刷新它们。
|
|
157
|
+
⇒ **你正在读的这份 skill 有可能落后于当前 CLI 版本,而且落后时不会报任何错。**
|
|
158
|
+
需要 skill 的命令在检测到落后时会往 **stderr** 打一次提示并附修复命令;
|
|
159
|
+
见到它 **MUST** 转告用户跑 `gtrk skills install`(或 `gtrk upgrade`),
|
|
160
|
+
**MUST NOT** 当噪音忽略 —— 「照着旧口径继续干活」正是这条提示要防的事。
|
|
161
|
+
随时自查:`gtrk doctor` 里的「Skill 新鲜度」一行。判不出或一致时**零输出**,
|
|
162
|
+
所以没看到提示不等于装过(没装过 manifest 就不存在,doctor 会如实说判不出)。
|
|
163
|
+
|
|
145
164
|
|
|
146
165
|
---
|
|
147
166
|
|
package/CHANGELOG.md
CHANGED
|
@@ -9,8 +9,10 @@
|
|
|
9
9
|
> ⚠️ **`gitHead` 只是旁证**:1.2.7 是从**带未提交改动的工作区**发的——`link-cloud-font-library` 的实现
|
|
10
10
|
> 在 1.2.7 的包体里逐字可见,却要到 2026-09-19 的 `4ee4f74` 才进仓。判版本归属一律以包体为准。
|
|
11
11
|
|
|
12
|
-
## 未发布
|
|
13
|
-
|
|
12
|
+
## 未发布
|
|
13
|
+
|
|
14
|
+
- 视频去水印不再默认 FFmpeg:Agent 必须在处理前说明快速模糊与慢速内容修复的效果代价,等待用户选模式;`purify run/apply`、人工框和 `tool video_purify` 缺少显式模式时在上传前停止。仅检测、编辑和空清单不受影响;旧记录未建处理单时需补选模式,已建单继续原任务。失败后不得擅自改用快速或本地 FFmpeg。
|
|
15
|
+
|
|
14
16
|
- `tool --batch` 补齐整批费用预估:标准价/超额价积分与额度包单位数分别汇总,按分钟收费先本地探时长,逐任务取整后求和;跳过项不计费、不探测。价格或计量不可用时明确说明无法预估。
|
|
15
17
|
|
|
16
18
|
- `ai-drama lay` 成功回轨后提示先显式指定口播音频运行 `patch snap --dry-run` 检查,再执行吸附并用 `patch seal` 补缝;只提示,不自动编辑。
|
package/README.en.md
CHANGED
|
@@ -10,8 +10,9 @@
|
|
|
10
10
|
<p>
|
|
11
11
|
<a href="#demo">Demo</a> ·
|
|
12
12
|
<a href="#quick-start">Quick start</a> ·
|
|
13
|
-
<a href="https://hocassian.feishu.cn/wiki/HCFpwoF7SivIFbkKosgcFMcEnxk">Tutorials</a> ·
|
|
14
|
-
<a href="
|
|
13
|
+
<a href="https://hocassian.feishu.cn/wiki/HCFpwoF7SivIFbkKosgcFMcEnxk">Tutorials</a> ·
|
|
14
|
+
<a href="https://github.com/Gitruck/ai-drama-desk">AI Drama Desk</a> ·
|
|
15
|
+
<a href="docs/development.en.md">Develop</a> ·
|
|
15
16
|
<a href="README.md">简体中文</a>
|
|
16
17
|
</p>
|
|
17
18
|
|
|
@@ -156,9 +157,35 @@ flowchart LR
|
|
|
156
157
|
|
|
157
158
|
**Conversations currently happen in your own agent; the desktop client has no built-in AI chat.** Review and refine the project in the client after your agent changes it, or render with `gtrk render`. Motion graphics that require cloud rendering are billed separately; cached renders can be reused.
|
|
158
159
|
|
|
159
|
-
The three-format rough-cut output and the export of a fully packaged project have different support boundaries. The [workflow guide](docs/workflow.en.md) explains where each deliverable opens and which effects need rendering.
|
|
160
|
-
|
|
161
|
-
##
|
|
160
|
+
The three-format rough-cut output and the export of a fully packaged project have different support boundaries. The [workflow guide](docs/workflow.en.md) explains where each deliverable opens and which effects need rendering.
|
|
161
|
+
|
|
162
|
+
## gtrk + AI Drama Desk: from storyboard to editable clips
|
|
163
|
+
|
|
164
|
+
For AI-generated story scenes, connect [Gitruck AI Drama Desk](https://github.com/Gitruck/ai-drama-desk) to the same project workflow. The responsibilities stay separate:
|
|
165
|
+
|
|
166
|
+
| Component | What it does | Output |
|
|
167
|
+
| --- | --- | --- |
|
|
168
|
+
| `gtrk CLI` | Understands the request in your agent, orchestrates workflows and manages `.gtrk` projects | An editable video project |
|
|
169
|
+
| `AI Drama Desk` | Imports storyboards, manages characters and styles, generates keyframes / I2V clips and exports a handoff package | A `return-v1` clip package + `manifest` |
|
|
170
|
+
| `gtrk ai-drama lay` | Places exported clips back into the project by beat windows | A dedicated AI video track |
|
|
171
|
+
|
|
172
|
+
The typical path looks like this:
|
|
173
|
+
|
|
174
|
+
```text
|
|
175
|
+
storyboard.md → AI Drama Desk → references / keyframes / I2V → return-v1 package
|
|
176
|
+
↓
|
|
177
|
+
gtrk ai-drama lay → .gtrk project → client refinement
|
|
178
|
+
```
|
|
179
|
+
|
|
180
|
+
The desk supports mock, cloud and optional local ComfyUI engines. Start with a zero-GPU, zero-key rehearsal, then enable a real engine when needed. For an existing desk project, the CLI only needs the **API base and project ID**; it does not scan the repository:
|
|
181
|
+
|
|
182
|
+
```bash
|
|
183
|
+
gtrk ai-drama lay --project ./my-video --desk-project <project-id>
|
|
184
|
+
```
|
|
185
|
+
|
|
186
|
+
→ [AI Drama Desk README](https://github.com/Gitruck/ai-drama-desk) · [AI drama tutorial](https://hocassian.feishu.cn/wiki/FRAKwUvBWib2vrkqZ5XcLDRqnOe) · [command reference](docs/reference.en.md#command-reference)
|
|
187
|
+
|
|
188
|
+
## Use just one tool, too
|
|
162
189
|
|
|
163
190
|
| What you need | Start here |
|
|
164
191
|
| --- | --- |
|
|
@@ -168,9 +195,7 @@ The three-format rough-cut output and the export of a fully packaged project hav
|
|
|
168
195
|
| A visual style for your show | [Style-maker Skill](skills/gtrk-style-maker/SKILL.md) |
|
|
169
196
|
| Third-party animation, typography or creative Skills | [Skill map](https://hocassian.feishu.cn/wiki/SxRtwJ0G7inTbQkwckFcZmClnrd) |
|
|
170
197
|
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
## FAQ
|
|
198
|
+
## FAQ
|
|
174
199
|
|
|
175
200
|
**Do I need to code?**
|
|
176
201
|
|
|
@@ -188,11 +213,21 @@ Talking-head and long-to-short project workflows keep the original locally and u
|
|
|
188
213
|
|
|
189
214
|
The CLI runs across platforms. The Windows client provides visual preview and refinement; the CLI can render existing projects. Jianying and Premiere support depends on the installed software and the project format.
|
|
190
215
|
|
|
191
|
-
**Skills are missing, or a task failed. What now?**
|
|
192
|
-
|
|
193
|
-
Open a new agent session and run `gtrk doctor`. Use `gtrk skills install` to refresh Skills. If a task already has an ID, recover its results before submitting it again. See [workflow and troubleshooting](docs/workflow.en.md).
|
|
194
|
-
|
|
195
|
-
##
|
|
216
|
+
**Skills are missing, or a task failed. What now?**
|
|
217
|
+
|
|
218
|
+
Open a new agent session and run `gtrk doctor`. Use `gtrk skills install` to refresh Skills. If a task already has an ID, recover its results before submitting it again. See [workflow and troubleshooting](docs/workflow.en.md).
|
|
219
|
+
|
|
220
|
+
## Star History
|
|
221
|
+
|
|
222
|
+
<a href="https://star-history.com/#Gitruck/cli&Date">
|
|
223
|
+
<picture>
|
|
224
|
+
<source media="(prefers-color-scheme: dark)" srcset="https://api.star-history.com/svg?repos=Gitruck/cli&type=Date&theme=dark" />
|
|
225
|
+
<source media="(prefers-color-scheme: light)" srcset="https://api.star-history.com/svg?repos=Gitruck/cli&type=Date" />
|
|
226
|
+
<img alt="gtrk CLI Star History" src="https://api.star-history.com/svg?repos=Gitruck/cli&type=Date" />
|
|
227
|
+
</picture>
|
|
228
|
+
</a>
|
|
229
|
+
|
|
230
|
+
## Documentation and contributions
|
|
196
231
|
|
|
197
232
|
[Full tutorials](https://hocassian.feishu.cn/wiki/HCFpwoF7SivIFbkKosgcFMcEnxk) · [Workflow](docs/workflow.en.md) · [Command reference](docs/reference.en.md) · [Development](docs/development.en.md) · [Changelog](CHANGELOG.md)
|
|
198
233
|
|
package/README.md
CHANGED
|
@@ -10,8 +10,9 @@
|
|
|
10
10
|
<p>
|
|
11
11
|
<a href="#demo">观看演示</a> ·
|
|
12
12
|
<a href="#quick-start">快速开始</a> ·
|
|
13
|
-
<a href="https://hocassian.feishu.cn/wiki/HCFpwoF7SivIFbkKosgcFMcEnxk">使用教程</a> ·
|
|
14
|
-
<a href="
|
|
13
|
+
<a href="https://hocassian.feishu.cn/wiki/HCFpwoF7SivIFbkKosgcFMcEnxk">使用教程</a> ·
|
|
14
|
+
<a href="https://github.com/Gitruck/ai-drama-desk">AI Drama Desk</a> ·
|
|
15
|
+
<a href="docs/development.md">开发文档</a> ·
|
|
15
16
|
<a href="README.en.md">English</a>
|
|
16
17
|
</p>
|
|
17
18
|
|
|
@@ -156,9 +157,35 @@ flowchart LR
|
|
|
156
157
|
|
|
157
158
|
**当前对话入口在你自己的 Agent 中,客户端没有内置 AI 对话框。** Agent 修改工程后,在客户端查看效果、继续精修;也可以用 `gtrk render` 渲染成片。需要云端渲染的动态图会单独计费,缓存可复用。
|
|
158
159
|
|
|
159
|
-
粗剪阶段的三端工程,与完整包装后的导出支持范围不同;[工作流指南](docs/workflow.md)说明每种交付物在哪打开、哪些效果需要渲染。
|
|
160
|
-
|
|
161
|
-
##
|
|
160
|
+
粗剪阶段的三端工程,与完整包装后的导出支持范围不同;[工作流指南](docs/workflow.md)说明每种交付物在哪打开、哪些效果需要渲染。
|
|
161
|
+
|
|
162
|
+
## gtrk + AI Drama Desk:从分镜到可回轨片段
|
|
163
|
+
|
|
164
|
+
如果你的素材不是实拍,而是希望把一份分镜稿变成 AI 情景片段,可以把 [Gitruck AI Drama Desk](https://github.com/Gitruck/ai-drama-desk) 接到同一条工程链里。两者分工很清楚:
|
|
165
|
+
|
|
166
|
+
| 组件 | 负责什么 | 产物 |
|
|
167
|
+
| --- | --- | --- |
|
|
168
|
+
| `gtrk CLI` | 在 Agent 中理解需求、组织工作流、管理 `.gtrk` 工程 | 可继续精修的视频工程 |
|
|
169
|
+
| `AI Drama Desk` | 导入分镜稿、管理角色与画风、生成 keyframe / I2V 片段、导出回轨包 | `return-v1` 片段包 + `manifest` |
|
|
170
|
+
| `gtrk ai-drama lay` | 把工作台导出的片段按 beat 区间铺回工程 | 独立 AI 视频轨 |
|
|
171
|
+
|
|
172
|
+
典型路径是:
|
|
173
|
+
|
|
174
|
+
```text
|
|
175
|
+
分镜稿 md → AI Drama Desk → 角色参考图 / keyframe / I2V → return-v1 导出包
|
|
176
|
+
↓
|
|
177
|
+
gtrk ai-drama lay → .gtrk 工程 → 客户端精修
|
|
178
|
+
```
|
|
179
|
+
|
|
180
|
+
工作台支持 mock、云端出口和可选的本地 ComfyUI;你可以先零 GPU、零 Key 跑通流程,再按需要启用真实引擎。已有工作台项目时,CLI 只需要 **API 地址 + 项目 ID**,不需要扫描仓库目录:
|
|
181
|
+
|
|
182
|
+
```bash
|
|
183
|
+
gtrk ai-drama lay --project ./my-video --desk-project <project-id>
|
|
184
|
+
```
|
|
185
|
+
|
|
186
|
+
→ [AI Drama Desk README](https://github.com/Gitruck/ai-drama-desk) · [AI 漫剧教程](https://hocassian.feishu.cn/wiki/FRAKwUvBWib2vrkqZ5XcLDRqnOe) · [命令参考](docs/reference.md#命令参考)
|
|
187
|
+
|
|
188
|
+
## 成片之外,也能只做一件事
|
|
162
189
|
|
|
163
190
|
| 想做什么 | 从这里开始 |
|
|
164
191
|
| --- | --- |
|
|
@@ -168,9 +195,7 @@ flowchart LR
|
|
|
168
195
|
| 给自己的栏目建立视觉风格 | [风格体系 Skill](skills/gtrk-style-maker/SKILL.md) |
|
|
169
196
|
| 接入第三方动画、排版或创作 Skills | [Skill 地图](https://hocassian.feishu.cn/wiki/SxRtwJ0G7inTbQkwckFcZmClnrd) |
|
|
170
197
|
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
## 常见问题
|
|
198
|
+
## 常见问题
|
|
174
199
|
|
|
175
200
|
**需要会写代码吗?**
|
|
176
201
|
|
|
@@ -188,11 +213,21 @@ CLI 代码采用 MIT 许可证;同合云能力按对应规则计费,你使
|
|
|
188
213
|
|
|
189
214
|
CLI 可以跨平台执行。Windows 客户端用于可视化预览与精修;已有工程也可通过 CLI 渲染。剪映、Premiere 的使用取决于对应软件和工程格式的支持情况。
|
|
190
215
|
|
|
191
|
-
**安装后找不到 Skills,或任务出错怎么办?**
|
|
192
|
-
|
|
193
|
-
重新打开 Agent 会话,运行 `gtrk doctor` 检查环境;补装用 `gtrk skills install`。任务已有 ID 时优先恢复结果,避免重新提交云端任务。详见[工作流与排障](docs/workflow.md)。
|
|
194
|
-
|
|
195
|
-
##
|
|
216
|
+
**安装后找不到 Skills,或任务出错怎么办?**
|
|
217
|
+
|
|
218
|
+
重新打开 Agent 会话,运行 `gtrk doctor` 检查环境;补装用 `gtrk skills install`。任务已有 ID 时优先恢复结果,避免重新提交云端任务。详见[工作流与排障](docs/workflow.md)。
|
|
219
|
+
|
|
220
|
+
## Star History
|
|
221
|
+
|
|
222
|
+
<a href="https://star-history.com/#Gitruck/cli&Date">
|
|
223
|
+
<picture>
|
|
224
|
+
<source media="(prefers-color-scheme: dark)" srcset="https://api.star-history.com/svg?repos=Gitruck/cli&type=Date&theme=dark" />
|
|
225
|
+
<source media="(prefers-color-scheme: light)" srcset="https://api.star-history.com/svg?repos=Gitruck/cli&type=Date" />
|
|
226
|
+
<img alt="gtrk CLI Star History" src="https://api.star-history.com/svg?repos=Gitruck/cli&type=Date" />
|
|
227
|
+
</picture>
|
|
228
|
+
</a>
|
|
229
|
+
|
|
230
|
+
## 文档与参与
|
|
196
231
|
|
|
197
232
|
[完整教程](https://hocassian.feishu.cn/wiki/HCFpwoF7SivIFbkKosgcFMcEnxk) · [工作流](docs/workflow.md) · [命令参考](docs/reference.md) · [开发文档](docs/development.md) · [更新日志](CHANGELOG.md)
|
|
198
233
|
|