@gitruck/cli 1.3.9 → 1.3.10

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.
@@ -219,9 +219,9 @@ Common entry points: `gtrk oralcut` edits talking heads, `gtrk long2short` selec
219
219
 
220
220
  ### `gtrk long2short` / `gtrk pip` / `gtrk qc` — Additional commands
221
221
 
222
- - `gtrk long2short <input>`: select topics and jump-cut into per-clip gtrk / Jianying / XML projects. `--split-screen` uses a 720p proxy for smart split-screen; `--output-size` selects the aspect ratio; `--subtitle-out` writes captions for each clip; `--speed-factor 0.5–2.0` writes an overall speed change (pitch preserved) into every clip project (no cloud rendering, no extra charge); `--camera-move` has the cloud write push / pull camera moves as scale keyframes on main-track segments (visible and editable in the client and Jianying, not shown by local `gtrk render` or Premiere projects; `clips.md` marks "N camera moves"), and later `gtrk patch` trims / splits keep those keyframes valid. The output root also gets a whole-source transcript `json/transcript.json`, so any clip can get a client caption track: `gtrk subtitle lay --gtrk <clip dir>/gtrk/<project>.gtrk --transcript <output root>/json/transcript.json --language <source language>` (`--language` sets the cloud line-split language, default zh-CN). Run landscape and portrait separately; content determines the number of clips. See `gtrk long2short --help` for all options.
222
+ - `gtrk long2short <input>`: select topics and jump-cut into per-clip gtrk / Jianying / XML projects. `--split-screen` uses a 720p proxy for smart split-screen; `--output-size` selects the aspect ratio; `--subtitle-out` writes captions for each clip; `--speed-factor 0.5–2.0` writes an overall speed change (pitch preserved) into every clip project (no cloud rendering, no extra charge); `--camera-move` has the cloud write push / pull camera moves as scale keyframes on main-track segments (visible and editable in the client and Jianying, not shown by local `gtrk render` or Premiere projects; `clips.md` marks "N camera moves"), and later `gtrk patch` trims / splits keep those keyframes valid. The output root also gets a whole-source transcript `json/transcript.json`, so any clip can get a client caption track: `gtrk subtitle lay --gtrk <clip dir>/gtrk/<project>.gtrk --transcript <output root>/json/transcript.json --language <source language>` (`--language` sets the cloud line-split language, default zh-CN). Run landscape and portrait separately; content determines the number of clips. Before extracting audio it prints the live price and an estimate for this run (stderr; `pricing` in the `--json` root result); to get a quote first for a long source, add `--dry-run` (no extraction, no upload, no charge, no folders). See `gtrk long2short --help` for all options.
223
223
  - `gtrk pip lay`: lay a simultaneously recorded screen or second camera against the talking-head cut points. Both sources need shared audio for alignment; low-confidence matches require calibration in the client before resuming. Use `gtrk pip lay --help` for inputs, shapes, positions and offsets.
224
- - `gtrk qc <video>`: inspect flash frames, black/frozen frames, volume and synchronization. Add `--gtrk` for project context and `--fail-on` for pipeline gating. Findings locate issues; they do not automatically repair the video.
224
+ - `gtrk qc <video>`: inspect flash frames, black/frozen frames, volume and synchronization. Add `--gtrk` for project context and `--fail-on` for pipeline gating. With `--gtrk`, in-clip jump cuts and severe too-short shots name their beat and slot, and list the beat's unused candidate segments (from the project's `split/broll-plan.json`, steadiest first). Findings locate issues; they do not automatically repair the video.
225
225
 
226
226
  ### `gtrk matrix --online` — External-platform search in current source
227
227
 
@@ -285,14 +285,17 @@ gtrk media boundaries "reference.mp4" --rate 4 --threshold 0.12 --transcript "re
285
285
  |---|---|---|
286
286
  | `-s, --script <file>` | Script txt (cutting against a script is more accurate) | Looks for a `.txt` next to the raw file; otherwise reconstructs the script automatically |
287
287
  | `-p, --preset <p>` | Pacing `steady`\|`concise`\|`compact` (loose → tight) | `concise` |
288
- | `-o, --out <dir>` | Custom output folder | `<raw-name>-video-project-<timestamp>` |
288
+ | `-o, --out <dir>` | Custom output folder | `<raw-name>-video-project-<timestamp>` (`-2`… is appended when the same name is taken within the same second; the Jianying draft folder follows the same rule) |
289
289
  | `-f, --formats <list>` | Comma-separated list of the three formats | `gtrk,jianying,xml` |
290
290
  | `--jianying-draft-dir <dir>` | Jianying draft root (or `auto`) | Reads the init config / auto-detects |
291
291
  | `--reupload` | Force re-upload, ignoring the upload cache | off |
292
292
  | `--no-open` | Do not open the output folder when done | **opens automatically by default** |
293
293
  | `--json` | Machine-readable: stdout carries only the result JSON (for agents / scripts) | off |
294
+ | `--dry-run` | Probe and quote only (live price + estimate for this run): no extraction, no upload, no charge, no folders created; with `--json`, stdout is a single line `{ ok, dry_run:true, source, duration, pricing }` | off |
294
295
 
295
- `--json` output (a single stdout line on success): `{ ok, outDir, files:{gtrk,jianying,xml}, jianyingDraftPath, rendered, report, errors, taskId, fileId }`; on failure the process exits non-zero, errors go to stderr, and stdout carries no JSON.
296
+ `--json` output (a single stdout line on success): `{ ok, outDir, files:{gtrk,jianying,xml}, jianyingDraftPath, rendered, report, errors, taskId, fileId, pricing }`; on failure the process exits non-zero, errors go to stderr, and stdout carries no JSON.
297
+
298
+ > **Billing notice**: before extracting audio, the CLI anonymously looks up the live price once and prints a "billing notice" line to stderr (unit price + an estimate for this run based on the source duration; the server's settlement is final). `pricing` in the `--json` result carries the same data. If the price cannot be fetched, the line reads "live price unavailable, the server's settlement is final" and the run continues. `long2short` works the same way.
296
299
 
297
300
  > Every run **always writes a `result.json` into the output folder** (regardless of `--json`), and once submission succeeds it also drops a `task.json` breadcrumb. Even if stdout is lost or the run crashes midway, the report and `taskId` are on disk, and `oralcut-result` below can fetch everything back in seconds without re-running the cloud job.
298
301
 
@@ -561,7 +564,7 @@ gtrk project export --gtrk <project-file> --formats jianying,xml --out <output-d
561
564
  |---|---|
562
565
  | `--project <dir>` / `--gtrk <path>` | Locate the standard `gtrk/project.gtrk`, or explicitly select a project file; use one of the two |
563
566
  | `-f, --formats <list>` | `xml`, `fcpxml`, `otio`, `jianying`, `capcut`, `gtrk`; default `jianying,xml`; legacy fine-grained names are also accepted |
564
- | `--jianying-draft-dir <dir>` | Jianying/CapCut draft root; when omitted, use user config and standard locations |
567
+ | `--jianying-draft-dir <dir>` | Jianying/CapCut draft root; when omitted, use user config and standard locations. The draft lands in `<draft root>/<output folder name>`; on a name clash it gets `-2`… with a warning, and the existing draft is left untouched |
565
568
  | `--no-particles` | Skip MG particle pre-rendering while continuing structural export; skipped particles are recorded in the result |
566
569
  | `--particle-concurrency <n>` | Particle qtrle pre-render concurrency, 1–8, default 6 |
567
570
 
@@ -615,7 +618,7 @@ Standalone single-request capabilities, kept separate from the pipeline's lane c
615
618
  | `image_matting` | One image (phone photos with an EXIF orientation are uprighted to their display orientation before upload; the original is untouched) | Transparent-background png (`--param` can request a backing plate) | Queried live before the run | Live |
616
619
  | `image_blackborder_remove` | One local image | Image with black borders removed | Queried live before the run | Live |
617
620
  | `image_canvas_adapt` | One local image; optional target width/height and `normal` / `rectangle` / `square` | Aspect-adapted image | Queried live before the run | Live |
618
- | `image_purify` | One local image; optional `full_screen` / `region` and region boxes (only material you have the rights to process) | Image cleaned of watermarks, logos or overlays | Queried live before the run | Live |
621
+ | `image_purify` | One local image; optional `full_screen` / `region` and region boxes, optional `--redraw` mode (only material you have the rights to process) | Image cleaned of watermarks, logos or overlays | Queried live before the run | Live |
619
622
  | `video_matting` | One video (**≤ 10 minutes**, uploaded as-is with no proxy) | Transparent-background webm | Queried live before the run | Live |
620
623
  | `video_blackborder_remove` | One local video | Video with black borders removed | Queried live before the run | Live |
621
624
  | `video_canvas_adapt` | One local video; optional target width/height, clip range, canvas mode and audio-free output | Aspect-adapted video | Queried live before the run | Live |
@@ -632,7 +635,7 @@ Standalone single-request capabilities, kept separate from the pipeline's lane c
632
635
  | `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 |
633
636
  | `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 |
634
637
  | `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 |
635
- | `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 |
638
+ | `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 — re-running the same source overwrites its previous draft, while a same-named source from another folder gets `…-2` instead), `--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 |
636
639
  | `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 |
637
640
  | `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 |
638
641
  | `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 |
@@ -643,7 +646,7 @@ Standalone single-request capabilities, kept separate from the pipeline's lane c
643
646
  | `piano_audio_enhance` | One audio file | High-quality WAV + accompanying MIDI (two artifacts) | Queried live before the run | Live |
644
647
  | `image_to_square` | One image; optional `--max-line <px>` (≤ 20000) | Square image | Queried live before the run | Live |
645
648
  | `image_to_live` | One image | A short video of about 4 seconds `.mp4` (silent); or an Android motion photo `.jpg` plus the same clip as a companion `.mp4` | Queried live before the run | Live |
646
- | `image_classic_template` | **Several images** + a required `--main-title`; optional subtitle/mode/ratio/quality/count/layout | Finished cover/collage (text/pic/render groups, possibly several images) | Queried live before the run | Live |
649
+ | `image_classic_template` | **Several images** + `--main-title` (required for covers; may be omitted with `--template-mode image`, collage only); optional subtitle/mode/ratio/quality/count/layout | Finished cover/collage (text/pic/render groups, possibly several images) | Queried live before the run | Live |
647
650
  | `image_vertical_stitch` | **Several images** (order = top-to-bottom stitching order) | One vertically stitched long image | Queried live before the run | Live |
648
651
  | `video_split_screen` | **2–16 video segments** (multiple positionals); the precise tier uses `--clips-json` (entries `{input:0-based index, begin_time_ms, end_time_ms, crop}`, millisecond time base); nine optional layout/aspect/audio parameters | One split-screen video (its length matches the shortest segment) | Queried live before the run | Live |
649
652
  | `mad` | One material folder (3–10 videos) + optional `--bgm` | An AE master-composition project `.jsx` (AE only) | Only `--bgm` triggers a live price query | Live |
@@ -660,8 +663,9 @@ The seven shared video tools — black-border removal, aspect adaptation, stabil
660
663
  - `gtrk tool image_canvas_adapt ./photo.jpg --canvas-width 1080 --canvas-height 1920 --canvas-type rectangle [--json]` — image aspect conversion; omitting the canvas parameters uses the server defaults. Per the actual runtime contract the canvas mode accepts only `normal`, `rectangle` and `square`, not the `fit` from older docs.
661
664
  - `gtrk tool image_purify ./photo.jpg [--json]` — clean watermarks, logos or overlays from an image you have the rights to process.
662
665
  - `gtrk tool image_purify ./photo.jpg --purify-scope region --purify-region 0.02,0.02,0.15,0.08 [--json]` — remove a box directly: no recognition, **everything inside the box is processed**; smaller boxes that fit the element tightly give better results.
666
+ - `gtrk tool image_purify ./photo.jpg --redraw [--json]` — Redraw mode: an image-editing model regenerates the whole image, which also clears semi-transparent or grid watermarks that cover it; with `--purify-scope region` only the inside of the boxes is replaced and everything outside stays identical to the original. **Priced separately** (the pre-run quote uses the redraw tier), with no free runs; the image is sent to a third-party model service outside mainland China and details may differ slightly from the original; if the content review refuses it, the task fails (error code 6054) and credits are refunded. `--params-json '{"purify_method":"redraw"}'` also works.
663
667
  - `gtrk tool video_blackborder_remove ./clip.mp4 [--json]` — automatically crops black borders from one video while keeping the original audio.
664
- - `gtrk tool video_canvas_adapt ./clip.mp4 --canvas-width 1080 --canvas-height 1920 --canvas-type rectangle --clip-start 12 --clip-end 60 --without-audio [--json]` — video aspect conversion; `--clip-start/--clip-end` are start/end frame numbers, omitted fields use the server defaults, and the canvas mode accepts only `normal`, `rectangle`, `square`.
668
+ - `gtrk tool video_canvas_adapt ./clip.mp4 --canvas-width 1080 --canvas-height 1920 --canvas-type rectangle --clip-start 1.5 --clip-end 4 --without-audio [--json]` — video aspect conversion; `--clip-start/--clip-end` are start/end times in seconds (decimals allowed; `--clip-start` must be less than the video duration, `--clip-end` must be greater than `--clip-start`, values past the end stop at the end), omitted fields use the server defaults, and the canvas mode accepts only `normal`, `rectangle`, `square`.
665
669
  - `gtrk tool video_stabilizer ./clip.mp4 --stabilizer-method turbo [--json]` — video stabilization; supports `fast`, `exp` and `turbo`, where `exp` is experimental and you should check the result yourself.
666
670
  - `gtrk tool video_vaporwave ./clip.mp4 --vaporwave-filter "灼熱苦夏" [--json]` — add a vaporwave filter using an exact preset name; omitting it explicitly uses `愈漸升溫`.
667
671
  Before video cleanup, ask the user to choose fast FFmpeg blurring (basic results, visible traces possible) or slower RAFT content repair (usually more natural, not guaranteed lossless restoration). There is no default. Replace `<chosen-mode>` with the user-selected `ffmpeg` or `raft`; never switch modes after a failure without their agreement. The top-level `gtrk purify` uses `--purify-func-type`; detection, local editing and empty lists do not require a mode. Unsubmitted legacy journals need an explicit mode on resume; submitted jobs retain their original mode.
@@ -686,7 +690,7 @@ Before video cleanup, ask the user to choose fast FFmpeg blurring (basic results
686
690
  - `gtrk tool piano_audio_enhance ./piano.mp3` — piano recording restoration, producing a high-quality WAV as the main artifact plus a companion MIDI.
687
691
  - `gtrk tool image_to_square ./long.jpg [--max-line 8000]` — long image to square; `--max-line` defaults to 4000 and caps at 20000.
688
692
  - `gtrk tool image_to_live ./photo.jpg [--output-format motion_photo]` — bring a still photo to life. By default the artifact is a silent `.mp4` video of about 4 seconds; `--output-format motion_photo` instead delivers an **Android motion photo** (a single `.jpg` with the clip embedded after the still image, so a gallery plays it on long-press), plus the same clip as a companion `.mp4`. Both formats cost the same. Compatibility: Android galleries that support the standard recognise and play it; **iOS does not** and shows a plain still image; a few Android models may only ever show the still.
689
- - `gtrk tool image_classic_template a.jpg b.jpg c.jpg --main-title "新品速览"` — title + several images into a cover/collage; `--output-pic-count`/`--output-text-count` are clamped to ≤ 20 by the server.
693
+ - `gtrk tool image_classic_template a.jpg b.jpg c.jpg --main-title "新品速览"` — title + several images into a cover/collage; `--output-pic-count`/`--output-text-count` are clamped to ≤ 20 by the server. For a collage with no title, add `--template-mode image` and `--main-title` can be left out. A title containing characters the cover fonts cannot draw (emoji and the like) is rejected by the server before the task is created (error code 6046, no charge).
690
694
  - `gtrk tool image_vertical_stitch top.png mid.png bottom.png` — stitch several images vertically in the order given.
691
695
  - `gtrk tool video_split_screen a.mp4 b.mp4 --output-ratio 16:9` — simple tier: automatic split-screen layout over the whole clips (reaction / side-by-side comparison).
692
696
  - `gtrk tool video_split_screen a.mp4 b.mp4 --clips-json '[{"input":0,"begin_time_ms":0,"end_time_ms":5000},{"input":1,"crop":{"x":0.1,"y":0,"width":0.8,"height":1}}]'` — precise tier: specify each segment's millisecond range and normalized crop box by 0-based index; the same file can appear several times to fill several windows.
package/docs/reference.md CHANGED
@@ -222,9 +222,9 @@ DO_NOT_TRACK=1 gtrk … # 业界通用的「不追踪」约定,同样生效
222
222
 
223
223
  ### `gtrk long2short` / `gtrk pip` / `gtrk qc` — 常用补充
224
224
 
225
- - `gtrk long2short <input>`:按话题选段并跳剪,逐 clip 输出 gtrk / 剪映 / XML 工程;`--split-screen` 使用 720p 代理做智能分屏;`--output-size` 选择画幅;`--subtitle-out` 另产逐 clip 字幕;`--speed-factor 0.5–2.0` 把整体调速(保音高)写进逐 clip 工程(云端不渲染、不加价);`--camera-move` 让云端把推 / 拉镜头写成主轨片段的缩放关键帧(客户端与剪映可见可改,本地 `gtrk render` 与 PR 工程不呈现;`clips.md` 标「运镜 N 处」),之后 `gtrk patch` 裁剪 / 切分会同步维护关键帧。产物根另落整片转写 `json/transcript.json`,可对任一 clip 上客户端字幕轨:`gtrk subtitle lay --gtrk <clip 目录>/gtrk/<工程>.gtrk --transcript <产物根>/json/transcript.json --language <源语种>`(`--language` 为云端拆行语种,缺省 zh-CN)。每次只选一种画幅,横竖屏分别运行;成片条数由内容决定。完整参数见 `gtrk long2short --help`。
225
+ - `gtrk long2short <input>`:按话题选段并跳剪,逐 clip 输出 gtrk / 剪映 / XML 工程;`--split-screen` 使用 720p 代理做智能分屏;`--output-size` 选择画幅;`--subtitle-out` 另产逐 clip 字幕;`--speed-factor 0.5–2.0` 把整体调速(保音高)写进逐 clip 工程(云端不渲染、不加价);`--camera-move` 让云端把推 / 拉镜头写成主轨片段的缩放关键帧(客户端与剪映可见可改,本地 `gtrk render` 与 PR 工程不呈现;`clips.md` 标「运镜 N 处」),之后 `gtrk patch` 裁剪 / 切分会同步维护关键帧。产物根另落整片转写 `json/transcript.json`,可对任一 clip 上客户端字幕轨:`gtrk subtitle lay --gtrk <clip 目录>/gtrk/<工程>.gtrk --transcript <产物根>/json/transcript.json --language <源语种>`(`--language` 为云端拆行语种,缺省 zh-CN)。每次只选一种画幅,横竖屏分别运行;成片条数由内容决定。抽音频之前打一行实时价格与本次预估(stderr;`--json` 根结果的 `pricing`),长片想先报价就加 `--dry-run`(零抽取、零上传、零计费、不建目录)。完整参数见 `gtrk long2short --help`。
226
226
  - `gtrk pip lay`:把同步录制的屏录或第二机位按口播剪点铺成画中画。两源需有可对齐的公共声音;低置信时先在客户端校准,再按提示恢复。运行 `gtrk pip lay --help` 查看输入、形状、位置和偏移参数。
227
- - `gtrk qc <成片>`:检查闪帧、黑帧、冻结、音量和同步问题;用 `--gtrk` 提供工程上下文,`--fail-on` 控制管线门槛。检查结论供定位问题,不自动替你修片。
227
+ - `gtrk qc <成片>`:检查闪帧、黑帧、冻结、音量和同步问题;用 `--gtrk` 提供工程上下文,`--fail-on` 控制管线门槛。带 `--gtrk` 时,段内跳切和判为严重的过短镜头会标出所在 beat 与槽位,并列出同一 beat 里还没用上的候选段(取自工程的 `split/broll-plan.json`,按画面稳定程度排序)。检查结论供定位问题,不自动替你修片。
228
228
 
229
229
  ### `gtrk matrix --online` — 当前源码的外部平台检索入口
230
230
 
@@ -288,14 +288,17 @@ gtrk media boundaries "参考片.mp4" --rate 4 --threshold 0.12 --transcript "
288
288
  |---|---|---|
289
289
  | `-s, --script <file>` | 文字稿 txt(有稿按稿剪、更准) | 探毛片同名 `.txt`;无则无稿智能重建 |
290
290
  | `-p, --preset <p>` | 节奏 `steady`\|`concise`\|`compact`(松→紧) | `concise` |
291
- | `-o, --out <dir>` | 自定义产物目录 | `<毛片名>-video-project-<时间戳>` |
291
+ | `-o, --out <dir>` | 自定义产物目录 | `<毛片名>-video-project-<时间戳>`(同目录同名同秒撞名时追加 `-2`…;剪映草稿文件夹同理) |
292
292
  | `-f, --formats <list>` | 三方格式逗号分隔 | `gtrk,jianying,xml` |
293
293
  | `--jianying-draft-dir <dir>` | 剪映草稿根目录(或 `auto`) | 读 init 配置 / 自动探测 |
294
294
  | `--reupload` | 强制重传,忽略上传缓存 | 关 |
295
295
  | `--no-open` | 完成后不自动打开产物目录 | **默认自动打开** |
296
296
  | `--json` | 机读:stdout 只输出结果 JSON(给 agent / 脚本) | 关 |
297
+ | `--dry-run` | 只探测并报价(实时价格 + 本次预估),零抽取、零上传、零计费、不建任何目录;`--json` 时 stdout 单行 `{ ok, dry_run:true, source, duration, pricing }` | 关 |
297
298
 
298
- `--json` 输出(成功时 stdout 单行):`{ ok, outDir, files:{gtrk,jianying,xml}, jianyingDraftPath, rendered, report, errors, taskId, fileId }`;命令失败则进程非 0 退出、报错走 stderr、stdout 无 JSON。
299
+ `--json` 输出(成功时 stdout 单行):`{ ok, outDir, files:{gtrk,jianying,xml}, jianyingDraftPath, rendered, report, errors, taskId, fileId, pricing }`;命令失败则进程非 0 退出、报错走 stderr、stdout 无 JSON。
300
+
301
+ > **计费提示**:抽音频之前,CLI 匿名查一次官网实时价格,往 stderr 打一行「计费提示」(单价 + 按原片时长算的本次预估积分,以服务端结算为准);`--json` 结果的 `pricing` 是同一份数据。查不到时打「实时价格暂不可用,以服务端结算为准」,不阻断。`long2short` 同口径。
299
302
 
300
303
  > 每次跑批都会把这份结果**恒写一份 `result.json` 到产物目录**(不受 `--json` 约束);提交成功后还会落一份 `task.json` 面包屑。即便 stdout 丢了、或中途崩了,报告与 `taskId` 都在盘上,可用下面的 `oralcut-result` 秒级取回、无需重跑云端。
301
304
 
@@ -523,7 +526,7 @@ gtrk matrix lay --project <目录> [--plan <path>] # ③ 消费(
523
526
  **落点与时长由命令钉定**:派单模式的 `composition_id` 取自 `dispatch.mg` 那条(`<工程slug>-<beatId>`,不是 `--slot` 收的 beat id),颗粒内嵌 IR 的 `id` 与 `canvas.duration` 被钉到「期望 id」与「坑位包络 + 0.3s 余量」(铁律⑦,贴模板末尾的层跟着钉),再走 `mg compile` 同一条本地编译链重编——产物仍是 `ir` 态,`1-cid-expect` 天然对得上。独立模式 `--as` 同样改写颗粒内部 id,`--duration` 钉时长;`--slot` 与 `--duration` 互斥。两者都没改、且目标画幅就是模板的 1920×1080 时原字节落盘。
524
527
  **画幅**:按目标画幅编(IR 住在 1920 参考系,画幅是编译入参)。派单模式缺省取工程 `.gtrk` 的 `video_size`(显式 `--canvas` 与它不符当场拒;找不到 `.gtrk` 时按 1920×1080 编并提示补 `--canvas`),独立模式取 `--canvas`、不给即 1920×1080;`--json` 带 `canvas` 与 `canvas_from`(`flag` / `project` / `reference`)。
525
528
  - **compile**(`gtrk mg compile <ir.json | 颗粒.html> [--canvas <WxH>] [--out <dir>] [--remote]`):把 IR **确定性编译**成颗粒(**0 积分**)。改字、换色、改字号描边阴影、改时长都走它——改 IR 再编,比手改 HTML 干净,且颗粒保持 `ir` 态(云端还能继续调)。缺省在本地编(零请求、断网可用,与服务端编译器逐字节等价);`--remote` 改走服务端,留给排查与对拍。给颗粒 HTML = 按它内嵌的 IR 重置回模板。`--canvas` 是目标画幅:不给时重置沿用那颗自己的画幅、`.ir.json` 按 1920×1080;`--remote` 把同一画幅交给服务端,产物画幅与请求不符(旧服务端不认画幅)时不落盘。
526
- - **edit**(`gtrk mg edit <颗粒.html> --say "<一句话>" [--n 1|3] [--pick <k>] [--yes]`):自然语言改写文字模板颗粒,经云端模型链出候选。`--n` 只收 1 或 3,**它就是计费单位数**(2 积分/候选,首次与改写同价、无免费次数)。`detached` / 无内嵌 IR 的颗粒**本地就拒**,不提交云任务、不花钱。候选带 `scope`:`L1` = 在模板可调范围内、`L2` = 越界即新生成(**不是失败**);服务端说做不到时给一句 `refusal`,命令如实转述并以非 0 退出码区分于网络错误。不给 `--pick` 就只落候选不动原文件;给了才替换并留 `<cid>.bak.html`。
529
+ - **edit**(`gtrk mg edit <颗粒.html> --say "<一句话>" [--n 1|3] [--pick <k>] [--yes]`):自然语言改写文字模板颗粒,经云端模型链出候选。`--n` 只收 1 或 3,**它就是计费单位数**(6 积分/候选,前 200 个之后 8 积分/候选;首次与改写同价、无免费次数)。`detached` / 无内嵌 IR 的颗粒**本地就拒**,不提交云任务、不花钱。候选带 `scope`:`L1` = 在模板可调范围内、`L2` = 越界即新生成(**不是失败**);服务端说做不到时给一句 `refusal`,命令如实转述并以非 0 退出码区分于网络错误。不给 `--pick` 就只落候选不动原文件;给了才替换并留 `<cid>.bak.html`。
527
530
 
528
531
  `--json` 输出:`{ ok, mode:"lay"|"lint"|"status", … }`(各模式带对应字段,如铺轨的 `laid` / `skipped`、status 的逐 beat 状态)。铺轨模式另带 **`track_total`**(轨上现存已铺数)、**`kept`** / **`kept_ids`**(其中**上轮遗留**、本次没重铺的颗数与 `composition_id` 清单)与 **`removed`**(本次被剥的旧自产颗粒数)——`laid`(本次)、`track_total`(轨上共)与 `kept`(上轮遗留)**要一起读**,恒有 `track_total = laid + kept`;只看 `laid` 会让「铺 1 颗、剥 20 颗」跟「补铺 1 颗」长得一模一样,只看前两个又会漏掉「轨上那几颗不是这一轮的版本」这条代价(`kept_ids` 与 `skipped` 会重叠:这轮没铺成、上一轮那条还在轨上)。非全绿时另带机读 **`reason`**:`skipped`(部分没铺上)/ `empty_queue`(**拒写回**,工程未被改动,另带 `refused:true` 与 `blocked[]`)/ `no_project`(工程缺失未铺轨)。真写回过的运行另带 **`integrity`**(素材落盘自检,与 `gtrk matrix` 同名同形,口径见上节)。
529
532
 
@@ -594,7 +597,7 @@ gtrk project export --gtrk <工程文件> --formats jianying,xml --out <产物
594
597
  |---|---|
595
598
  | `--project <dir>` / `--gtrk <path>` | 自动定位标准布局的 `gtrk/project.gtrk`,或显式指定工程文件,二选一 |
596
599
  | `-f, --formats <list>` | `xml`、`fcpxml`、`otio`、`jianying`、`capcut`、`gtrk`;缺省 `jianying,xml`,也兼容旧细粒度格式名 |
597
- | `--jianying-draft-dir <dir>` | 剪映/CapCut 草稿根;省略时按用户配置与标准位置探测 |
600
+ | `--jianying-draft-dir <dir>` | 剪映/CapCut 草稿根;省略时按用户配置与标准位置探测。草稿落 `<草稿根>/<产物目录名>`,撞名时追加 `-2`… 并提示,原草稿不动 |
598
601
  | `--no-particles` | 不预渲 MG 颗粒;结构导出仍继续,结果会记录被跳过的颗粒 |
599
602
  | `--particle-concurrency <n>` | 颗粒 qtrle 预渲并发数,1–8,默认 6 |
600
603
 
@@ -648,7 +651,7 @@ gtrk project background --gtrk <工程文件> --clear
648
651
  | `image_matting` | 单张图片(带 EXIF 方向的手机照片先按显示方向摆正再上传,原图不动) | 透明背景 png(可 `--param` 请求背景底板) | 运行前实时查询 | 已上线 |
649
652
  | `image_blackborder_remove` | 单张本地图片 | 去黑边图片 | 运行前实时查询 | 已上线 |
650
653
  | `image_canvas_adapt` | 单张本地图片;可选目标宽高与 `normal` / `rectangle` / `square` | 比例适配图片 | 运行前实时查询 | 已上线 |
651
- | `image_purify` | 单张本地图片;可选 `full_screen` / `region` 与区域框(仅处理你有权处理的素材) | 清理水印、Logo 或叠加元素后的净化图片 | 运行前实时查询 | 已上线 |
654
+ | `image_purify` | 单张本地图片;可选 `full_screen` / `region` 与区域框,可选 `--redraw` 重绘模式(仅处理你有权处理的素材) | 清理水印、Logo 或叠加元素后的净化图片 | 运行前实时查询 | 已上线 |
652
655
  | `video_matting` | 单条视频(**≤10 分钟**,原片直传不压代理) | 透明背景 webm | 运行前实时查询 | 已上线 |
653
656
  | `video_blackborder_remove` | 单条本地视频 | 去黑边视频 | 运行前实时查询 | 已上线 |
654
657
  | `video_canvas_adapt` | 单条本地视频;可选目标宽高、片段、画布模式和无音轨输出 | 比例适配视频 | 运行前实时查询 | 已上线 |
@@ -666,7 +669,7 @@ gtrk project background --gtrk <工程文件> --clear
666
669
  | `audio_tts_clone` | **无文件**:`--text`/`--text-file` 二选一(≤5000 字)+ `--speaker` 必填;可选语言/格式/语速/切分法/字幕/**句间停顿**(`--fragment-interval <秒>`,**仅自训音色**;云引擎音色传了会**报错**而非静默忽略,合法区间由服务端校验并在报错里给出) | 配音音频 wav/mp3(+ 可选字幕);按文本字符数计费,计量单位与单价以 `gtrk tool list` 实时显示为准 | 运行前实时查询 | 已上线 |
667
670
  | `video_ai_subtitle` | 单条视频或音频;`--language <码>` 必填;可选 `--translate-language`、`--need-render`、`--need-pure`、`--subtitle-type`、`--subtitle-color`。默认只传本地抽出的音频(毛片不上传) | `.ass` 字幕 + 可选烧录/去字幕 `.mp4` + `result-output.json`(摘要 + 字级时间轴) | 运行前实时查询 | 已上线 |
668
671
  | `subtitle_translate` | 单个**字幕文件** `.ass` / `.srt`;`--language <码>` 与 `--translate-language <码>` **双必填**;可选 `--output-format`、`--line-mode`、`--bilingual`、`--subtitle-type`、`--subtitle-color`、`--canvas <WxH>`。不含语音识别 | 译文字幕 `.ass` 或 `.srt` + `result-output.json`(条数统计 + 降级标记) | 运行前实时查询 | 已上线 |
669
- | `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`,不判失败) | 运行前实时查询 | 已上线 |
672
+ | `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`,草稿自动放进剪映草稿目录:同一毛片重跑覆盖上一次的,别的目录下的同名毛片撞上时改落 `…-2`)、`--jianying-draft-dir`;取值以服务端为准。只换音轨、画面保持原样(不做口型同步),长片耗时十几分钟起 | 配音成片 `<输入名>-dub.mp4`(音频输入为 `.mp3`)+ `dub.wav` / `bgm.wav` + 字幕 `.srt` + `transcript.json` + 工程文件按格式分目录(`gtrk/`、`jianying/` …)+ `result-output.json`(配音对齐报告;附带产物缺项时含 `errors`,不判失败) | 运行前实时查询 | 已上线 |
670
673
  | `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` | 运行前实时查询 | 已上线 |
671
674
  | `audio_separation` | 单条音频;可选 `--mode fast\|turbo` | 人声与伴奏音频(按实际返回可为一项或两项) | 运行前实时查询 | 已上线 |
672
675
  | `audio_speaker_split` | 单条音频;可选 `--only-struct` | 各说话人 `.wav` 分轨 + `spoken_list` 时间线(`result-output.json`) | 运行前实时查询 | 已上线 |
@@ -677,7 +680,7 @@ gtrk project background --gtrk <工程文件> --clear
677
680
  | `piano_audio_enhance` | 单条音频 | 高质量 WAV + 配套 MIDI(双产物) | 运行前实时查询 | 已上线 |
678
681
  | `image_to_square` | 单张图片;可选 `--max-line <px>`(≤20000) | 方形图片 | 运行前实时查询 | 已上线 |
679
682
  | `image_to_live` | 单张图片 | 约 4 秒短视频 `.mp4`(无声);或安卓动态照片 `.jpg` + 附带同一条 `.mp4` | 运行前实时查询 | 已上线 |
680
- | `image_classic_template` | **多张图片** + `--main-title` 必填;可选副标题/模式/比例/质量/数量/版式 | 封面/拼图成品(text/pic/render 三组、可多张) | 运行前实时查询 | 已上线 |
683
+ | `image_classic_template` | **多张图片** + `--main-title`(封面模式必填;`--template-mode image` 只要拼图时可省);可选副标题/模式/比例/质量/数量/版式 | 封面/拼图成品(text/pic/render 三组、可多张) | 运行前实时查询 | 已上线 |
681
684
  | `image_vertical_stitch` | **多张图片**(顺序=自上而下拼接顺序) | 一张垂直拼接长图 | 运行前实时查询 | 已上线 |
682
685
  | `video_split_screen` | **2~16 段视频**(多 positional);精确档 `--clips-json`(条目 `{input:0 起序号, begin_time_ms, end_time_ms, crop}`,毫秒时基);九个可选布局/画幅/音频参数 | 一条分屏成片(成片时长对齐最短段) | 运行前实时查询 | 已上线 |
683
686
  | `mad` | 一个素材文件夹(3~10 条视频)+ 可选 `--bgm` | AE 母合成成片工程 `.jsx`(仅支持 AE) | 仅 `--bgm` 触发实时查价 | 已上线 |
@@ -694,8 +697,9 @@ gtrk project background --gtrk <工程文件> --clear
694
697
  仅接受 `normal`、`rectangle`、`square`
695
698
  - `gtrk tool image_purify ./photo.jpg [--json]` — 清理你有权处理的图片中的水印、Logo 或叠加元素。
696
699
  - `gtrk tool image_purify ./photo.jpg --purify-scope region --purify-region 0.02,0.02,0.15,0.08 [--json]` — 按框直接去除:不做识别,**框内全部内容都会被处理**;框越小、越贴近要去除的元素效果越好。
700
+ - `gtrk tool image_purify ./photo.jpg --redraw [--json]` — 重绘模式:整张图交给图片编辑模型重新生成,铺满全图的半透明、网格水印也能去掉;与 `--purify-scope region` 同用时只替换框内、框外与原图一致。**单独计价**(运行前报价按重绘档),不设免费次数;图片会发送给中国大陆以外的第三方模型服务处理,细节可能与原图略有不同;内容审核拒绝时任务失败(错误码 6054)、积分退回。也可 `--params-json '{"purify_method":"redraw"}'`。
697
701
  - `gtrk tool video_blackborder_remove ./clip.mp4 [--json]` — 自动裁去单条视频四周黑边并保留原音轨。
698
- - `gtrk tool video_canvas_adapt ./clip.mp4 --canvas-width 1080 --canvas-height 1920 --canvas-type rectangle --clip-start 12 --clip-end 60 --without-audio [--json]` — 视频比例转换;`--clip-start/--clip-end` 是起止帧序号,省略字段时沿用服务端默认,画布模式只接受 `normal`、`rectangle`、`square`。
702
+ - `gtrk tool video_canvas_adapt ./clip.mp4 --canvas-width 1080 --canvas-height 1920 --canvas-type rectangle --clip-start 1.5 --clip-end 4 --without-audio [--json]` — 视频比例转换;`--clip-start/--clip-end` 是起止时间(秒,可带小数;`--clip-start` 须小于视频时长,`--clip-end` 须大于 `--clip-start`,超过时长截到结尾),省略字段时沿用服务端默认,画布模式只接受 `normal`、`rectangle`、`square`。
699
703
  - `gtrk tool video_stabilizer ./clip.mp4 --stabilizer-method turbo [--json]` — 视频防抖;支持 `fast`、`exp`、`turbo`,其中 `exp` 为实验方式,产物观感需自行检查。
700
704
  - `gtrk tool video_vaporwave ./clip.mp4 --vaporwave-filter "灼熱苦夏" [--json]` — 使用精确预设名称添加蒸汽波滤镜;省略时显式使用 `愈漸升溫`。
701
705
  视频去水印必须先问用户选快速(ffmpeg:基础模糊,可能留痕)还是精细(raft:较慢的内容修复,通常更自然、可接近无痕,不保证无损还原)。没有默认模式;`<用户选定模式>` 必须替换为用户已选择的 ffmpeg 或 raft,失败后不得自行降档。只检测、编辑和空清单不要求选择。旧运行记录尚未建处理任务时,resume 也须补显式模式;已建单继续原任务。
@@ -728,7 +732,7 @@ gtrk project background --gtrk <工程文件> --clear
728
732
  - `gtrk tool piano_audio_enhance ./piano.mp3` — 钢琴录音修复增强,产高质量 WAV 主产物 + 配套 MIDI 副产物。
729
733
  - `gtrk tool image_to_square ./long.jpg [--max-line 8000]` — 长图转方图;`--max-line` 默认 4000、上限 20000。
730
734
  - `gtrk tool image_to_live ./photo.jpg [--output-format motion_photo]` — 让静态照片动起来。缺省产出约 4 秒的 `.mp4` 短视频(无声);`--output-format motion_photo` 改为直出**安卓动态照片**(单个 `.jpg`,静图末尾内嵌该视频,相册里长按即播),并附带同一条 `.mp4`,两种格式同价。兼容边界:支持该标准的安卓相册可识别并播放;**iOS 不识别**,表现为普通静态图片;少数安卓机型可能只显示静图。
731
- - `gtrk tool image_classic_template a.jpg b.jpg c.jpg --main-title "新品速览"` — 标题+多图出封面/拼图;`--output-pic-count`/`--output-text-count` 由服务端钳制 ≤20。
735
+ - `gtrk tool image_classic_template a.jpg b.jpg c.jpg --main-title "新品速览"` — 标题+多图出封面/拼图;`--output-pic-count`/`--output-text-count` 由服务端钳制 ≤20。只要拼图不要标题时加 `--template-mode image`,可不传 `--main-title`。标题含 emoji 等封面字体画不出的字符时,服务端建单前即拒(错误码 6046,不扣费)。
732
736
  - `gtrk tool image_vertical_stitch top.png mid.png bottom.png` — 多图按传入顺序竖拼成一张长图。
733
737
  - `gtrk tool video_split_screen a.mp4 b.mp4 --output-ratio 16:9` — 简单档:整段视频自动布局分屏(reaction/对比同框)。
734
738
  - `gtrk tool video_split_screen a.mp4 b.mp4 --clips-json '[{"input":0,"begin_time_ms":0,"end_time_ms":5000},{"input":1,"crop":{"x":0.1,"y":0,"width":0.8,"height":1}}]'` — 精确档:按 0 起索引指定每段毫秒区间与归一化裁剪框;同一文件可多条目出多窗口。
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@gitruck/cli",
3
- "version": "1.3.9",
3
+ "version": "1.3.10",
4
4
  "description": "同合云成片流水线 CLI —— agent 驱动云端任务、产物拉回本地、三方工程文件(客户端/剪映/PR)互通。",
5
5
  "license": "MIT",
6
6
  "author": "Gitruck (同合云)",
@@ -56,7 +56,7 @@
56
56
  "test:purify": "esbuild src/commands/purify.ts --bundle --platform=node --format=esm --external:bun:sqlite --outfile=.test-build/purify-cmd.mjs && node --test test/purify-cmd.test.mjs",
57
57
  "build": "bun build ./src/index.ts --target=node --minify --outfile dist/index.js",
58
58
  "typecheck": "tsc --noEmit",
59
- "prepublishOnly": "npm run typecheck && npm test && bun run build",
59
+ "prepublishOnly": "node scripts/plugin-manifest-check.mjs && npm run typecheck && npm test && bun run build",
60
60
  "test": "node scripts/workspace-pollution-gate.mjs --snapshot && esbuild src/lib/compliance-notice.ts src/lib/config.ts src/lib/crash-report.ts src/lib/usage-analytics.ts src/lib/log.ts src/lib/read-json.ts src/lib/sidecar-write.ts src/lib/user-config.ts src/lib/enum-catalog.ts src/lib/first-run-tutorial.ts src/lib/desktop-client-hint.ts src/lib/command-path.ts src/lib/user-path.ts src/lib/runtime-channel.ts src/lib/self-install.ts src/lib/chunk-upload.ts src/lib/upload-cache.ts src/lib/upload-submit.ts src/lib/render.ts src/lib/cloud.ts src/lib/materialize.ts src/lib/jianying.ts src/lib/clip-brief.ts src/lib/media.ts src/lib/projection.ts src/lib/reproject.ts src/lib/splitdoc.ts src/lib/gtrk-writeback.ts src/lib/project-background.ts src/lib/client-only-state.ts src/lib/gtrk-patch.ts src/lib/frame-domain.ts src/lib/clock-adapter.ts src/lib/gtrk-invariants.ts src/lib/clip-speed.ts src/lib/clip-keyframes.ts src/lib/column-config.ts src/lib/third-party-catalog.ts src/lib/mg-adopt.ts src/lib/mg-registry.ts src/lib/matrix.ts src/lib/online-broll-client.ts src/lib/online-search-journal.ts src/lib/matrix-material.ts src/lib/matrix-fetch.ts src/lib/matrix-lay.ts src/lib/arrange-metering.ts src/lib/arrange-wire.ts src/lib/arrange-apply.ts src/lib/arrange-client.ts src/lib/arrange-gate.ts src/lib/arrange-decision-pin.ts src/lib/arrange-qc.ts src/lib/arrange-qc-bind.ts src/lib/rate-limit-wait.ts src/lib/embed-client.ts src/lib/describe.ts src/lib/highlight-rubric.ts src/lib/highlight-input.ts src/lib/local-index.ts src/lib/character-input.ts src/lib/index-decode.ts src/lib/local-search.ts src/lib/qc.ts src/lib/alignment-qc.ts src/lib/bgm-history.ts src/lib/image-move.ts src/lib/cloud-render-guard.ts src/lib/outdir-guard.ts src/lib/landing-wait.ts src/lib/material-integrity.ts src/lib/project-health.ts src/lib/contact-sheet.ts src/lib/media-transcript.ts src/lib/media-grid.ts src/lib/media-ffmpeg.ts src/lib/solid-png.ts src/lib/mask-raster.ts src/lib/mg-lint.ts src/lib/mg-visual-job.ts src/lib/mg-track-identity.ts src/lib/particle-identity.ts src/lib/text-ir/compile.ts src/lib/text-ir/validate.ts src/lib/text-ir/compile-local.ts src/lib/text-templates.ts src/lib/text-ir-client.ts src/lib/mg-lay.ts src/lib/mg-render.ts src/lib/particle-qtrle.ts src/lib/composite-particle.ts src/lib/composite-lay.ts src/lib/composite-lint.ts src/lib/composite-browser.ts src/lib/composite-plan.ts src/lib/composite-shots.ts src/lib/composite-resolve.ts src/lib/composite-profile.ts src/lib/composite-scene.ts src/lib/composite-bake-plan.ts src/lib/composite-bake.ts src/lib/composite-export.ts src/lib/tool-descriptors.ts src/lib/tool-runner.ts src/lib/tool-batch.ts src/lib/tool-pricing.ts src/lib/transcript.ts src/lib/runtime-assets.ts src/lib/subtitle-lay.ts src/lib/caption-align.ts src/lib/subtitle-line-split-client.ts src/lib/audio-align.ts src/lib/audio-tighten.ts src/lib/cut-snap.ts src/lib/mg-coverage.ts src/lib/ai-drama-lay.ts src/lib/ai-drama-pack.ts src/lib/desk-locate.ts src/lib/pip-lay.ts --bundle --platform=node --format=esm --external:bun:sqlite --outdir=.test-build --out-extension:.js=.mjs && esbuild src/lib/text-ir/compile.ts --bundle --platform=node --external:bun:sqlite --format=esm --outfile=.test-build/text-ir-compile.mjs && esbuild src/commands/split.ts --bundle --platform=node --external:bun:sqlite --format=esm --outdir=.test-build --out-extension:.js=.mjs && esbuild src/commands/patch.ts --bundle --platform=node --external:bun:sqlite --format=esm --external:commander --outfile=.test-build/patch-cmd.mjs && esbuild src/commands/matrix.ts --bundle --platform=node --format=esm --external:bun:sqlite --outfile=.test-build/matrix-cmd.mjs && esbuild src/commands/mg.ts --bundle --platform=node --external:bun:sqlite --format=esm --outfile=.test-build/mg-cmd.mjs && esbuild src/commands/mg-text.ts --bundle --platform=node --external:bun:sqlite --format=esm --outfile=.test-build/mg-text-cmd.mjs && esbuild src/commands/tool.ts --bundle --platform=node --external:bun:sqlite --format=esm --outfile=.test-build/tool-cmd.mjs && esbuild src/commands/transcript.ts --bundle --platform=node --external:bun:sqlite --format=esm --outfile=.test-build/transcript-cmd.mjs && esbuild src/commands/project.ts --bundle --platform=node --external:bun:sqlite --format=esm --outfile=.test-build/project-cmd.mjs && esbuild src/commands/audio.ts --bundle --platform=node --external:bun:sqlite --format=esm --outfile=.test-build/audio-cmd.mjs && esbuild src/commands/subtitle.ts --bundle --platform=node --external:bun:sqlite --format=esm --outfile=.test-build/subtitle-cmd.mjs && esbuild src/commands/ai-drama.ts --bundle --platform=node --external:bun:sqlite --format=esm --outfile=.test-build/ai-drama-cmd.mjs && esbuild src/commands/feedback.ts --bundle --platform=node --external:bun:sqlite --format=esm --outfile=.test-build/feedback-cmd.mjs && esbuild src/commands/music-visualizer.ts --bundle --platform=node --external:bun:sqlite --format=esm --external:commander --outfile=.test-build/music-visualizer-cmd.mjs && esbuild src/commands/long2short.ts --bundle --platform=node --external:bun:sqlite --format=esm --external:commander --outfile=.test-build/long2short-cmd.mjs && esbuild src/commands/oralcut.ts --bundle --platform=node --external:bun:sqlite --format=esm --external:commander --outfile=.test-build/oralcut-cmd.mjs && esbuild src/commands/oralcut-result.ts --bundle --platform=node --external:bun:sqlite --format=esm --external:commander --outfile=.test-build/oralcut-result-cmd.mjs && esbuild src/commands/skills.ts --bundle --platform=node --external:bun:sqlite --format=esm --outfile=.test-build/skills-cmd.mjs && esbuild src/commands/qc.ts --bundle --platform=node --format=esm --external:commander --external:bun:sqlite --outfile=.test-build/qc-cmd.mjs && esbuild src/commands/media.ts --bundle --platform=node --format=esm --external:commander --external:bun:sqlite --outfile=.test-build/media-cmd.mjs && esbuild src/commands/doctor.ts --bundle --platform=node --external:bun:sqlite --format=esm --external:commander --outfile=.test-build/doctor-cmd.mjs && esbuild src/lib/convert/ir_to_jsx.ts src/lib/convert/ir_to_am.ts src/lib/convert/ir_to_nv.ts src/lib/convert/am_parse.ts src/lib/convert/nv_parse.ts src/lib/convert/parse.ts src/lib/convert/download.ts src/lib/convert/bake_ops.ts --bundle --platform=node --external:bun:sqlite --format=esm --outdir=.test-build/convert --out-extension:.js=.mjs && esbuild src/lib/mad/selector.ts src/lib/mad/techniques.ts src/lib/mad/beat.ts src/lib/mad/scan.ts src/lib/mad/data.ts src/lib/mad/pool.ts src/lib/mad/cloud-beat.ts src/lib/mad/mad.ts --bundle --platform=node --external:bun:sqlite --format=esm --outdir=.test-build/mad --out-extension:.js=.mjs && esbuild src/commands/composite.ts --bundle --platform=node --format=esm --external:bun:sqlite --external:commander --outfile=.test-build/composite-cmd.mjs && esbuild src/commands/purify.ts --bundle --platform=node --format=esm --external:bun:sqlite --outfile=.test-build/purify-cmd.mjs && node --import ./test/helpers/test-home.mjs --test \"test/*.test.mjs\" && node scripts/workspace-pollution-gate.mjs --verify",
61
61
  "test:linux": "node scripts/test-linux.mjs",
62
62
  "openspec:gate": "node openspec/gate.mjs",
@@ -19,7 +19,7 @@ description: 美食解说垂类图纸(解说链示例)——把探店/密着
19
19
  | **探店 · 密着** | 一条纪实长片(二创;带字幕文件的直接当台词锚,无则转写)或自拍探店素材夹 | 软窗档缺省:进店→点单→出品→吃→人的故事,流程线单调、允许蒙太奇跳 |
20
20
  | **做饭流程** | 一条做饭记录或素材夹 | 软窗档且**步骤线忠实**:工序 MUST NOT 乱序重排 |
21
21
 
22
- 稿源与声音基座随正本开工问询(AI 代写/自备稿;TTS/自己念);精剪包装的开工告知与烘焙浏览器问询随正本(公约 §三⁵)。**推荐面(公约 §三‴)**:问答收口时可问一句「要不要看看第三方 skill?」;题材命中场景触发词才定向推荐,读取 `gtrk skills recommend --scene <id> --json`;用户拒绝后不执行推荐动作。**MUST NOT 执行任何网络下载**;二创长片是第三方作品,版权与平台二创规则责任归用户。
22
+ 稿源与声音基座随正本开工问询(AI 代写/自备稿;TTS/自己念);精剪包装的开工告知与烘焙浏览器问询随正本(公约 §三⁵)。**推荐面(公约 §三‴)**:问答收口时可问一句「要不要看看第三方 skill?」;题材命中场景触发词才定向推荐,读取 `gtrk skills recommend --scene <id> --json`;用户拒绝后不执行推荐动作。**MUST NOT 下载二创源片 / 主体素材**:用户提供的长片或素材夹就是输入,下载动作归用户;二创长片是第三方作品,版权与平台二创规则责任归用户。平台授权素材(素材矩阵的 BGM / 空镜)可按其签名直链落地;这条例外不适用于源片与主体画面素材。
23
23
 
24
24
  ## 二、美食要素层(写稿规约,叠在通用框架层之上)
25
25
 
@@ -255,11 +255,11 @@ gtrk project background --gtrk "<产物根>/clip{i}/gtrk/<该 clip 的 .gtrk>" -
255
255
 
256
256
  ## 八、计费与预算速查(跑前转述给用户)
257
257
 
258
- - 计费基 = **上传物音频流时长**(≈源片时长),**2 积分/分钟**。
258
+ - 计费基 = **上传物音频流时长**(≈源片时长);单价以 CLI 跑前打印的实时价格为准,本图纸不写数字。
259
259
  - **分段不改总量**:切段总时长≈原片,所以分不分段花的钱差不多,分段买的是「能跑通」和「粒度更细的选题清单」。费用以实时价格和音频时长为准。
260
260
  - **建单期被拒是零计费的**(如超 2h 硬闸)——试探性提交不会烧钱,但会白传一个大文件。
261
261
  - **任务失败按服务端回执处理**;只有回执明确退款时才向用户说明可重跑。
262
- - 运行时 CLI 自动查实时价格并打印,**把提示原样转述**;长片先向用户确认再跑。
262
+ - 先报价再开跑:`gtrk long2short <源片或切段> --language <码> --dry-run --json`(零抽取、零上传、零计费),把 `pricing` 里的单价与预估**原样转述**,长片等用户确认再正式跑;正式运行在抽音频之前也会往 stderr 打同一行「计费提示」。
263
263
 
264
264
  ## 九、排错
265
265
 
@@ -62,14 +62,15 @@ gtrk long2short "D:/毛片/对谈.mp4" --language zh-CN --split-screen --split-o
62
62
  | `--camera-move` | 运镜:云端按与精剪同一套调度给主轨片段写推 / 拉镜头关键帧(概率抽取、推拉交替、幅度克制),零渲染、不加价。客户端与剪映可见可改;本地 `gtrk render` 与 PR 工程不呈现。**缺省不加**,直播切片图纸开工会问;细项走 `--params-json` |
63
63
  | `--output-size <s>` | 画布 `9:16|16:9|1:1` 或 `WxH`(缺省 9:16 竖版) |
64
64
  | `-f, --formats <list>` | 三方格式,缺省 `gtrk,jianying,xml`(云端逐 clip 直产;gtrk 恒有) |
65
- | `--jianying-draft-dir <dir>` | 剪映草稿根(或 `auto`);各 clip 草稿落 `<草稿根>/<产物根名>_clip{i}` |
65
+ | `--jianying-draft-dir <dir>` | 剪映草稿根(或 `auto`);各 clip 草稿落 `<草稿根>/<产物根名>_clip{i}`。同一毛片重跑照旧覆盖这一组;别的目录下的同名毛片撞上时整组改落 `<产物根名>-2_clip{i}` 并提示,原草稿不动 |
66
66
  | `-o/--out`、`--no-open`、`--json`、`--reupload`、`--param/--params-json` | 与 oralcut 同口径 |
67
67
 
68
68
  ## 计费与跑前须知(每次都转述给用户)
69
69
 
70
70
  - **合成包装问一次**(公约 §三⁵):「出来的切片要不要做合成包装?」**缺省不做**;答要则跑完后对每条 clip 做(见「产物」末条),并在这次一起问烘焙浏览器装不装(`gtrk composite bake --abi` 报没装时)。
71
71
 
72
- - 运行时 CLI 自动查询实时价格并在跑前打印——**把计费提示原样转述**;按**上传物音频时长**计费(≈原片时长),**长片先向用户确认再跑**。
72
+ - 按**上传物音频时长**计费(≈原片时长)。**长片先报价、等用户确认再跑**:同一条命令加 `--dry-run --json`,只探测并报价(零抽取、零上传、零计费、不建目录),把 stdout 那行 `pricing` 里的单价与预估**原样转述**;别自己报数字、别引用旧价。
73
+ - 正式运行时 CLI 在抽音频之前查一次实时价格,往 stderr 打一行「计费提示」(单价 + 本次预估),`--json` 根结果的 `pricing` 也有;查不到时是「实时价格暂不可用,以服务端结算为准」,照实转述。
73
74
  - **源片 > 2 小时跑不了**:CLI 在上传前就会拦下(零抽取、零上传、零扣费),不是跑到一半才失败。
74
75
  遇到超长源片(直播回放常见)**先分段再逐段跑**,建议 **40 分钟/段**——
75
76
  切段用流拷贝、秒级完成、不重编码:`ffmpeg -ss 0 -t 2400 -i "<源片>" -c copy "<源片名>_seg01.mp4"`。
@@ -90,7 +91,7 @@ gtrk long2short "D:/毛片/对谈.mp4" --language zh-CN --split-screen --split-o
90
91
  - **合成包装**(跑前答了要才做):对每条 clip 交棒 `/gtrk-composite` 做**精剪包装**(公约 §三⁵:快速成片 auto ≤ 25% → 逐窗口复核 → 构建机检 → 铺轨烘焙,不停;回执列「做了 / 建议了没做 / 烘焙结果」;逐步推进按合成 skill 两个检查点停;开工时用户说了不要就跳过);参数同上面字幕那条:`--gtrk <产物根>/clip{i}/gtrk/clip{i}_project.gtrk --transcript <产物根>/json/transcript.json`。
91
92
  - **先看 `clips.md`**(产物根,人读总览):一张表列全部切片的标题/时长/评分/一句话简介 —— 用它给用户复述「出了哪几条、各讲什么、建议先精修哪条」,别让用户自己开工程猜。逐条的入选理由、跳剪说明、高光词在 `clip{i}/clip.md`。
92
93
  - 开了 `--split-screen` 时:**分屏素材落在毛片旁的 `split_screen/` 子目录**(工程素材路径指向那里,别移动/删除,移动了工程会缺素材)——这点要提前告知用户。
93
- - 剪映草稿已拷入草稿根(给了 `--jianying-draft-dir` 时),剪映里直接可见 `<产物根名>_clip{i}`。**判据**:草稿目录里必须是 `draft_content.json` + `draft_meta_info.json` 两个精确文件名(云端产物侧的 `clip{i}_` 前缀在拷进草稿根这一跳被剥掉,产物目录 `clip{i}/jianying/` 里保留带前缀的归档原名)。CLI 日志按实际齐全条数报「N/M 条两件套齐全」,不齐的记进 `result.json` 的 `errors`、该 clip 的 `jianyingDraftPath` 为 `null`。
94
+ - 剪映草稿已拷入草稿根(给了 `--jianying-draft-dir` 时),剪映里直接可见 `<产物根名>_clip{i}`;CLI 提示「剪映草稿组……已被占用,本次改落……-2」时,告诉用户这一组叫 `<产物根名>-2_clip{i}`(另一条同名毛片的草稿原样保留),以 `result.json` 里各 clip 的 `jianyingDraftPath` 为准。**判据**:草稿目录里必须是 `draft_content.json` + `draft_meta_info.json` 两个精确文件名(云端产物侧的 `clip{i}_` 前缀在拷进草稿根这一跳被剥掉,产物目录 `clip{i}/jianying/` 里保留带前缀的归档原名)。CLI 日志按实际齐全条数报「N/M 条两件套齐全」,不齐的记进 `result.json` 的 `errors`、该 clip 的 `jianyingDraftPath` 为 `null`。
94
95
 
95
96
  ## 排错
96
97
 
@@ -1,6 +1,6 @@
1
1
  ---
2
2
  name: gtrk-matrix
3
- description: B-roll 检索铺轨编排手册——成片管线里第一个铺的车道(SOP ③ B-roll 底轨阶段)。消费拆分派单的 FILM_BROLL 队列(`dispatch.film_broll`),检索素材并在工程里平铺 N 条候选 B-roll 轨,供用户在 opencut 里用轨道小眼睛切换对比、挑选/调整;确认后交棒同阶段的 AI 情景片段腿(`/gtrk-ai-drama`,车道非空时)。命令族还含:**本地素材模式**(`matrix index` 建索引、`--local` 用自己的素材铺轨,**素材本体不上云**)、**按需理解**(`matrix describe`,为排序提供画质与看点信号)、**源时间窗检索**(`--source-window`,电影解说式逐段推进)、**通用三态素材检索**(`matrix material`:clip/image/audio 整条素材下载向,BGM/配图主场)、**plan 可编辑通路**(agent 改 plan 后 `matrix lay` 消费)。当用户想「铺 B-roll / 检索素材 / 找空镜 / 给空镜配画面 / 填 B-roll 候选 / 单独搜个词补个空槽 / 找 BGM / 搜配乐 / 搜张配图 / 用我自己的素材铺 B-roll / 给素材文件夹建索引 / 理解一下这些素材能不能用 / 把这堆素材剪成片 / 影视解说配画面」时使用本 skill。凡涉及把素材检索并铺进工程,优先用本 skill 驱动 gtrk CLI 的 `matrix` 命令族,别让用户自己去终端敲、也别手搓检索。
3
+ description: B-roll 检索铺轨编排手册——成片管线里第一个铺的车道(SOP ③ B-roll 底轨阶段)。消费拆分派单的 FILM_BROLL 队列(`dispatch.film_broll`),检索素材并在工程里平铺 N 条候选 B-roll 轨,供用户在 opencut 里用轨道小眼睛切换对比、挑选/调整;确认后交棒同阶段的 AI 情景片段腿(`/gtrk-ai-drama`,车道非空时)。命令族还含:**本地素材模式**(`matrix index` 建索引、`--local` 用自己的素材铺轨,**视频本体不上云**,只送抽帧图;选中上轨的图片会上云转运镜,`--no-image-broll` 可排除)、**按需理解**(`matrix describe`,为排序提供画质与看点信号)、**源时间窗检索**(`--source-window`,电影解说式逐段推进)、**通用三态素材检索**(`matrix material`:clip/image/audio 整条素材下载向,BGM/配图主场)、**plan 可编辑通路**(agent 改 plan 后 `matrix lay` 消费)。当用户想「铺 B-roll / 检索素材 / 找空镜 / 给空镜配画面 / 填 B-roll 候选 / 单独搜个词补个空槽 / 找 BGM / 搜配乐 / 搜张配图 / 用我自己的素材铺 B-roll / 给素材文件夹建索引 / 理解一下这些素材能不能用 / 把这堆素材剪成片 / 影视解说配画面」时使用本 skill。凡涉及把素材检索并铺进工程,优先用本 skill 驱动 gtrk CLI 的 `matrix` 命令族,别让用户自己去终端敲、也别手搓检索。
4
4
  ---
5
5
 
6
6
  # B-roll 检索铺轨编排手册(gtrk-matrix)
@@ -136,7 +136,7 @@ description: MG 动态图颗粒铺轨器——成片 SOP 第 ⑤ 步(**最后
136
136
  - 反方向(槽位派 `overlay`、颗粒却是实心)仍是**非致命**告警:那只是多盖了底轨,看得见、改得动,
137
137
  不是「以为有其实没有」的静默落空。两个方向后果不对称,判据也就不对称。
138
138
  3. **改字(L0,0 积分)**:把内嵌的 IR 存成 `<id>.ir.json`,改 `slots` 里的文字(也可改 `colors` / `font` / `stroke` / `shadow` / `canvas.duration`),然后 `gtrk mg compile <id>.ir.json --out <目录>`。竖屏 / 方形工程加 `--canvas <工程画幅>`(如 `--canvas 1080x1920`)——`.ir.json` 里不记画幅,不给就按 1920×1080 编;给颗粒 HTML 重置时缺省沿用那颗自己的画幅。
139
- 4. **改效果(2 积分/候选)**:`gtrk mg edit <particle.html> --say "打字机快一倍,副标改成青色" [--n 1|3]`。`--n` 只收 1 或 3,**它就是计费单位数**。返回的候选带 `scope`:`L1` = 在模板可调范围内,`L2` = 越界了、等于新生成(**不是失败**)。服务端说做不到时会给一句 `refusal`,**如实转述给用户**——他要的是「为什么不能」,不是一个没有解释的错误。
139
+ 4. **改效果(6 积分/候选,前 200 个之后 8)**:`gtrk mg edit <particle.html> --say "打字机快一倍,副标改成青色" [--n 1|3]`。`--n` 只收 1 或 3,**它就是计费单位数**。返回的候选带 `scope`:`L1` = 在模板可调范围内,`L2` = 越界了、等于新生成(**不是失败**)。服务端说做不到时会给一句 `refusal`,**如实转述给用户**——他要的是「为什么不能」,不是一个没有解释的错误。
140
140
  5. **lint → 铺**:同中性块,`gtrk mg lint` 过致命项 → `gtrk mg --project <目录>`。
141
141
  6. **竖屏 / 方形工程**:文字模板按工程画幅现编(IR 住在 1920 参考系、画幅是编译入参),**不用另做**。
142
142
  - 派单模式缺省就取工程 `.gtrk` 的 `video_size`,不用给 `--canvas`;给了却与工程不符命令会拒(跨比例挂载是非等比缩放,铺进去就是拉伸)。
@@ -317,9 +317,17 @@ gtrk mg --project "<split产物目录>" --json
317
317
  `gtrk render` 出片后跑 `gtrk qc <成片> --gtrk <工程> --json`。它报的缺陷**带工程坐标**(`beat` / 槽位序号 / `clip_id` / 源窗),不是一串光秃秃的成片时码——所以「换哪一段」是可答的,闭环走法:
318
318
 
319
319
  1. **读缺陷的坐标**,定位到是哪个 beat 的第几槽、用的哪条 `clip_id` 的哪个源窗。
320
- 2. **读它给的排序备选**:同 beat 里未被采用的候选段,按「稳」排序(运动量升序 → 段内切点数升序 → score 降序)。索引无运动信号时退回单维排序,回执会标注**口径受限**——那时别把第一名当定论。
321
- 3. **改 plan 换段**(`split/broll-plan.json`),把该槽位换成备选里的第一名。⚠️ 改的时候把候选条目**原样搬**,别自己重写 `segments`——`cuts` / `motion` 就住在里面,重写即丢(详见 `/gtrk-matrix` 的 plan 编辑口径)。
322
- 4. **`gtrk matrix lay --project <目录> --plan <path>`** 消费改过的 plan 重铺 B-roll ⇒ 本 skill 的 MG 颗粒**按增量重铺受影响的那几颗**(`--only <beat>`)⇒ 重渲 ⇒ 再 QC 复核那条缺陷是否消失。
320
+ 2. **读它给的排序备选**:段内跳切与判 `error` 的过短镜头条目带 `alternatives`——同 beat 里还没上轨的候选段(取自工程的 `split/broll-plan.json`,按段判、不按 `clip_id`),每条给 `clip_id`、段区间与排序依据,按「稳」排序(运动量升序 → 段内切点密度升序 → score 降序),实际参与排序的维度在 `alternatives_ranked_by`。候选缺运动或切点信号时 `alternatives_note` 会标注**口径受限**——那时别把第一名当定论。`alternatives: []` 只说明 plan 里这个 beat 的段都已上轨、没有备用段,不等于这处换不了:要换就先重新检索补候选(`/gtrk-matrix` 的单独检索 `gtrk matrix search`),或在同一素材里另找避开切点的段,拟换方案照第 3 步列给用户;没有 `alternatives` 键、只有 note 是没读到 plan,同样别读成「没得换」。排序备选是**建议,不是授权**:它判的是晃不晃、切点多不多,不知道用户当初为什么选了现在这一段。
321
+ 3. **先列给用户,等他同意**:把可换段的缺陷一次列成清单,每行一处——哪个 beat 第几槽、成片时码、现在用的段、拟换成的段及排序依据(口径受限的照标)。清单后说清连带影响:
322
+ - 该 beat 的 B-roll 按改过的 plan 重铺。本地素材的工程重铺要走云端编排、按编排量计费,而且全片 beat 都会重新编排、落点可能微挪,不只换的那几处;花多少先带 `--arrange-estimate-only` 估一次(零调用、零改动);
323
+ - 受影响 beat 的 MG 颗粒按 `--only` 重铺,那几颗上的手调会被覆盖;
324
+ - 重渲时内容没变的颗粒命中缓存不计费,重新产过的那几颗按 `gtrk render` 的预估再确认一次。
325
+
326
+ 然后停下等答复:整批换、挑着换、都不换都行,只换用户同意的那几处。一次列全,别逐条碎问。**用户同意之前 MUST NOT 改 plan、跑 `gtrk matrix lay`、`gtrk mg --only` 或重渲。**
327
+ 4. **留副本,再改 plan 换段**:先用同一个时间戳留两份副本——`split/broll-plan.json` 复制为同目录 `broll-plan.before-qc-<yymmdd-HHMMSS>.json`,`gtrk/project.gtrk` 复制为同目录 `project.before-qc-<yymmdd-HHMMSS>.gtrk`。告诉用户回退方法:把这两份副本拷回原文件名,就回到换段前的 plan 与时间线(MG 颗粒的落点一并回来),不再计费;别用副本再跑一次 `gtrk matrix lay` 回退,那要再付一次编排费,铺出来也不是原样。再把用户同意的槽位换成备选(他没另指就用第一名)。⚠️ 改的时候把候选条目**原样搬**,别自己重写 `segments`——`cuts` / `motion` 就住在里面,重写即丢(详见 `/gtrk-matrix` 的 plan 编辑口径)。
328
+ 5. **`gtrk matrix lay --project <目录> --plan <path>`** 消费改过的 plan 重铺 B-roll ⇒ 本 skill 的 MG 颗粒**按增量重铺受影响的那几颗**(`--only <beat>`)⇒ 重渲 ⇒ 再 QC 复核那条缺陷是否消失。
329
+
330
+ **事先授权的例外**:用户在本会话里事先明确说过「出片后 QC 报的画面问题你直接换」之类的话,第 3 步「换哪几处」可以不再征询;第 4 步照留副本,换完 SHALL 列出换了哪些槽位、换成了什么。⚠️ 这份授权**只免换不换段这一问,不免计费确认**:第 5 步里本地素材工程的云端编排、颗粒重渲,照 `/gtrk-matrix` 与上文 render 一节的口径先报预估、等同意,**MUST NOT 因为这句授权就自带 `--yes`**——除非用户明说了「花钱也不用问」。授权只在本会话有效。
323
331
 
324
332
  🔴 **这是「换素材」而不是「调参数」**:QC 报的多数画面级缺陷(晃、糊、闪)根子在选中的那一段本身,调 `--score-floor` / 阈值只会连带影响全片其它槽位。先换段,换不动再谈调参。
325
333
 
@@ -24,7 +24,7 @@ description: 通用解说视频创作图纸(解说链正本)——把「一
24
24
 
25
25
  ## 二、输入契约与开工七问
26
26
 
27
- **输入**:本地素材语料(素材夹,或单条长片——影视/游戏实况先建索引拆条)±稿件 ± 用户自己念的口播毛片。**MUST NOT 执行任何网络下载**(版权责任归用户)。
27
+ **输入**:本地素材语料(素材夹,或单条长片——影视/游戏实况先建索引拆条)±稿件 ± 用户自己念的口播毛片。**MUST NOT 下载二创源片 / 主体素材**(版权责任归用户)。平台授权素材(素材矩阵的 BGM / 空镜)可按其签名直链落地;这条例外不适用于源片与主体画面素材。
28
28
 
29
29
  | # | 问 | 怎么取证 | 决定什么 |
30
30
  |---|---|---|---|
@@ -41,6 +41,7 @@ description: 通用解说视频创作图纸(解说链正本)——把「一
41
41
  > **推荐面(公约 §三‴)**:问答收口时可问一句「要不要看看第三方 skill?」;题材命中场景触发词才定向推荐,读取 `gtrk skills recommend --scene <id> --json`;用户拒绝后不执行推荐动作。
42
42
  >
43
43
  > 语种必须在转写前确认。非中文素材传错语种会让检查点①拿到错误稿件并产生重复 ASR 成本;不要静默使用 `zh-CN`。粤语建议填写 `zh-HK` 作为元数据,当前 `--json` 路径按字级转写;无对白素材回答「无对白 / 不转写」即可。
44
+ > **内容离机要在这张表里说清**:转写会把长片抽出的音轨上传同合云做云端语音识别(按时长计费);建索引会上传 512px 抽帧图做向量化(即传即弃,视频本体不上云)。问⑦时一并告知,用户不愿音频上云就答「不转写」,台词锚改用字幕文件或画面。
44
45
  >
45
46
  ## 三、时序铺排三档(本图纸的技术正本)
46
47
 
@@ -297,6 +298,6 @@ gtrk subtitle lay --project "<工程>" --style <样式> --color <色> --json
297
298
 
298
299
  ## 九、计费与排错
299
300
 
300
- - 计费大头:TTS(按字数)与可选的 long2short 引用海选(按时长);实时价格 CLI 自动打印,**原样转述**后再动。
301
+ - 计费大头:TTS(按字数)与可选的 long2short 引用海选(按时长);CLI 在提交前打印实时价格(long2short 另可先 `--dry-run --json` 零计费报价),**原样转述**后再动。
301
302
  - 索引/理解/本地检索按矩阵成员口径(多为免费或豁免),以运行时打印为准。
302
303
  - 排错:低置信对照段处理见 §三 乙;`6004`/上传类症状以 `gtrk-oralcut`、拼装路以 `gtrk project` 各自口径为准;其余零件症状回各零件 skill,本图纸不搬。
@@ -107,7 +107,7 @@ gtrk oralcut "<align 结果 JSON 的 output,即 *_extaudio.mp4>" [原有参数
107
107
  | `intra_gap_max` / `intra_gap_target` | 0.45 / 0.15 | 0.35 / 0.10 | 0.25 / 0.05 | 0.35 / 0.10 |
108
108
  | `pad_in` / `pad_out` | 0.05 / 0.10 | 0.05 / 0.08 | 0.03 / 0.05 | 0.05 / 0.08 |
109
109
 
110
- > **因势象形举例**:「教学口播、别删太狠、句号后多顿一下」→ `--preset steady --params-json '{"punctuation_breaks":{"。":0.7}}'`;「英文短视频卡点狠、顺便出成片」→ `--lang en-US --preset compact --render`;「上次有句话没剪进去」→ `--visual-assist`。用户**自己点名**某参数+值 → 照他原样 `--param`/`--params-json` 透传(CLI 底层支持任意云端参数)。
110
+ > **因势象形举例**:「教学口播、别删太狠、句号后多顿一下」→ `--preset steady --params-json '{"punctuation_breaks":{"。":0.7}}'`;「英文短视频卡点狠、顺便渲染成 mp4」→ `--lang en-US --preset compact --render`;「上次有句话没剪进去」→ `--visual-assist`。用户**自己点名**某参数+值 → 照他原样 `--param`/`--params-json` 透传(CLI 底层支持任意云端参数)。
111
111
  >
112
112
  > **以上就是你需要的全部参数——本 skill 自足,别去别处查**(`gtrk oralcut --help` 也随时列全部 flag)。官网另有一份面向开发者的原始 HTTP API 文档,那是给人看的,你不必也无法访问。
113
113
 
@@ -121,7 +121,9 @@ gtrk oralcut "<毛片绝对路径>" [--script "<txt路径>"] [--preset steady|co
121
121
  ```
122
122
 
123
123
  - `--json`:人读日志走 stderr,**成功时 stdout 只有一行结果 JSON**:
124
- `{ ok, outDir, files:{gtrk:[],jianying:[],xml:[]}, jianyingDraftPath, rendered, report, errors, taskId, fileId }`(`rendered`=本地渲染成片路径,未开 `--render` 时为 `null`)
124
+ `{ ok, outDir, files:{gtrk:[],jianying:[],xml:[]}, jianyingDraftPath, rendered, report, errors, taskId, fileId, pricing }`(`rendered`=本地渲染成片路径,未开 `--render` 时为 `null`)
125
+ - **计费**:按上传物音频时长(≈毛片时长)计。CLI 在抽音频之前查一次实时价格,往 stderr 打一行「计费提示」(单价 + 本次预估积分),`--json` 结果的 `pricing` 里也有;给用户交代时**原样转述**,别自己报数字、别引用旧价。查不到时这一行是「实时价格暂不可用,以服务端结算为准」,照实说即可。
126
+ - **想先报价再开跑**(用户问「要花多少」、长片要先确认):同一条命令加 `--dry-run`,只探测并报价,零抽取、零上传、零计费、不建任何目录,`--json` 时 stdout 一行 `{ok, dry_run:true, source, duration, pricing}`。
125
127
  - **命令失败**(毛片路径错 / 鉴权失败 / 参数越界 6016 等)→ **进程非 0 退出、报错打到 stderr、stdout 无 JSON**。先看退出码,非 0 就把 stderr 的报错如实回给用户、别当成功。
126
128
  - 默认会自动打开产物目录(用户能直接看到文件);纯脚本/无头环境才加 `--no-open`。
127
129
  - 云端处理是分钟级,耐心等命令返回。
@@ -152,19 +154,28 @@ gtrk oralcut "<毛片绝对路径>" [--script "<txt路径>"] [--preset steady|co
152
154
  ## 回给用户(三端打开方式)
153
155
 
154
156
  - **客户端**:在同合云桌面客户端(OpenCut Gitruck Edition)里「打开工程」选 `files.gtrk[0]`(…/gtrk/project.gtrk)。
155
- - **剪映**:已自动落到剪映草稿目录(`jianyingDraftPath`),开剪映在项目列表里找**同名工程**即可。
157
+ - **剪映**:已自动落到剪映草稿目录(`jianyingDraftPath`),开剪映在项目列表里找与 `jianyingDraftPath` 末级目录**同名**的草稿即可。
156
158
  - **PR/FCP**:Premiere 里「文件 > 导入」`files.xml[0]`(…/xml/premiere.xml)。
157
159
  同时提醒用户:若导入时弹出「链接媒体」框(素材被移动、改名,或路径在这台机器上无效),链接前先确认目标文件;勾着「自动重新链接其他媒体」时,Premiere 会按**文件名**在所选位置查找其余缺失素材并自动链上,链错也不提示——同合云素材多以编号命名,不同工程里同名文件很常见,链完要在项目面板「媒体路径」列逐条核对,拿不准就取消该选项、逐个链接。用户反馈 PR 里素材脱机时,先问素材是否移动过、路径在这台机器上是否有效;**MUST NOT** 建议勾「自动重新链接其他媒体」一把链完。
158
160
 
159
- 产物目录名形如 `<毛片名>-video-project-<时间戳>`,靠文件名 + 时间认出是哪一次剪辑、互不覆盖。
161
+ 产物目录名形如 `<毛片名>-video-project-<时间戳>`,靠文件名 + 时间认出是哪一次剪辑。时间戳只精确到秒,同一目录下同名毛片同一秒再起一次(如 `clip0.mp4` 与 `clip0.mov` 并行)时,后到的那份追加 `-2`。剪映草稿根是所有毛片共用的一层目录,不同目录下的同名毛片(换卡后重复的 `C0001.MP4` 之类)同秒开剪也会撞名:后到的那份草稿改叫 `…-2`,原草稿不动。最终落点以 `outDir` 与 `jianyingDraftPath` 为准,别按名字去猜。
160
162
 
161
- ## 下一步(自动接力,别停在交工)
163
+ ## 下一步(按请求范围决定接不接力)
162
164
 
163
- 口播工程剪好只是成片一条龙的第一站。确认 `ok=true`、`files.gtrk[0]` 与 transcript 就绪后,**别停下等用户开口**——顺势接力到视觉拆分:触发 `/gtrk-splitter`(把这条工程 + transcript 拆成 beat 级分镜派单,agent 再跑 `gtrk split` 产 `dispatch.json`),驱动后续各车道生产+铺轨。一句话交代即推进:「口播工程已就绪,我接着把它拆成分镜派单」。
165
+ 口播工程剪好,可能就是用户要的全部,也可能只是成片一条龙的第一站。确认 `ok=true`、`files.gtrk[0]` 与 transcript 就绪后,**看用户这次要多少**:
166
+
167
+ - **请求覆盖下游 → 顺势接力**:用户要成片、出片、完整包装、一条龙,或点名要 B-roll、字卡、BGM、字幕中的任一项;或这个会话里先前已说过「一路做到成片」。这时不追问「要不要继续」,直接触发 `/gtrk-splitter`(把这条工程 + transcript 拆成 beat 级分镜派单,agent 再跑 `gtrk split` 产 `dispatch.json`),驱动后续各车道生产+铺轨。一句话交代即推进:「口播工程已就绪,我接着把它拆成分镜派单」。
168
+ - **窄请求或判不清 → 停在交工**:用户只要剪辑工程、剪映 / PR 草稿、去停顿去废话、剪一版;或只说「帮我剪个视频」,看不出要不要成片。这时交付三端打开方式后停下,**一句话交代下一步,不发问**。示范:「剪辑工程已就绪(三端打开方式见上)。要往成片做的话,下一步是拆成分镜派单,再配 B-roll、字卡、BGM 和字幕,你说一声我就接着做。」
169
+
170
+ ⚠️ **上面的说法只是举例、不是白名单**——判据是「**用户的请求覆盖不覆盖下游**」,换个说法照样得听懂。只要把剪好的口播渲染成 mp4(`--render`)不算覆盖下游,那是本 skill 自己的产物。**判不清按窄请求处理**,也不为此在开剪前先发问:误停只多一句话,用户说「继续」就接上;误接力会跑一串工具调用、往工程里写拆分稿与候选轨,回退还要清理。
171
+
172
+ ### 作为图纸的一步被调用时
173
+
174
+ 如果你是在按某张图纸(`/gtrk-talking-head` 等)跑粗剪这一步,剪完**交回图纸**:以图纸的停点与模式为准(口播链是 §四 检查点①,必停),本节的接力规则不适用,MUST NOT 自行接力到 `/gtrk-splitter`。
164
175
 
165
176
  ### 逃生门:两种信号都要认(范围 + 节奏)
166
177
 
167
- **用户表达了范围保留或节奏保留,就停在这一步、别自动接力。** 两者语义正交,认漏一个都会误冲:
178
+ **请求覆盖下游时,用户若还表达了范围保留或节奏保留,就停在这一步、别自动接力。** 两者语义正交,认漏一个都会误冲:
168
179
 
169
180
  - **范围信号 = 走多远**(我只要这一个产物):「只要这版剪辑工程」「先不往下」「暂不出片」。
170
181
  - **节奏信号 = 怎么走**(每步停等我):**「逐步推进」**(这是本仓公约立法定名的正式模式名,
@@ -178,7 +189,7 @@ gtrk oralcut "<毛片绝对路径>" [--script "<txt路径>"] [--preset steady|co
178
189
  停下时**必须交代下一步是什么、他说一声就继续**,别退化成事事请示。示范:
179
190
  「口播工程已就绪。按你说的逐步来,我先停在这。下一步是拆成 beat 级分镜派单,你说一声我就接着做。」
180
191
 
181
- **没有这两类信号时不改默认**:仍按上文自动接力,别问「要不要继续」。
192
+ **请求覆盖下游、又没有这两类信号时,照旧自动接力**,别问「要不要继续」。
182
193
 
183
194
  > 原则:**agent 替用户跑 CLI / 接力 skill,用户只对话**——别让用户自己去终端敲下一条 gtrk 命令。
184
195
 
@@ -1,6 +1,6 @@
1
1
  ---
2
2
  name: gtrk-splitter
3
- description: 视觉拆分派单器——把一条已剪好的口播工程(gtrk + transcript)拆成 beat 级「视觉拆分稿」,为每个连续文稿段指定唯一主层(A_ROLL 真人出镜 / MG 动态图 / AI_DRAMA 再现 / FILM_BROLL 影视素材)+ 辅助层,产机器可消费的派单清单(MG 槽位 / B-roll 检索队列 / AI 动画队列)驱动后续铺轨。当用户想「文稿视觉化拆分 / 视觉拆分稿 / beat 时间线 / 派分镜 / A-roll B-roll 分配 / 哪些段做动态图·哪些做 AI 情景动画·哪些用影视素材 / 给这条口播派单」时使用本 skill。凡涉及把口播成片拆成分镜派工,优先用本 skill 驱动 gtrk CLI 的 `split` 命令,绝不手写时码、绝不抄原文定位。
3
+ description: 视觉拆分派单器——把一条已剪好的口播工程(gtrk + transcript)拆成 beat 级「视觉拆分稿」,为每个连续文稿段指定唯一主层(A_ROLL 真人出镜 / MG 动态图 / AI_DRAMA 再现 / FILM_BROLL 影视素材)+ 辅助层,产机器可消费的派单清单(MG 槽位 / B-roll 检索队列 / AI 动画队列),要成片时再交棒后续铺轨。当用户想「文稿视觉化拆分 / 视觉拆分稿 / beat 时间线 / 派分镜 / A-roll B-roll 分配 / 哪些段做动态图·哪些做 AI 情景动画·哪些用影视素材 / 给这条口播派单」时使用本 skill。凡涉及把口播成片拆成分镜派工,优先用本 skill 驱动 gtrk CLI 的 `split` 命令,绝不手写时码、绝不抄原文定位。
4
4
  ---
5
5
 
6
6
  # 视觉拆分派单器(gtrk-splitter)
@@ -186,9 +186,22 @@ gtrk split "<拆分稿.json>" --project "<oralcut产物目录>" --md --json
186
186
  - **被收缩的 beat**(部分被剪、按存活句包络收窄,`beats.shrunk[]`)——提示人工复核。
187
187
  - 下游各拿各的:`dispatch.mg`(MG 槽位表,`composition_id` 已按 `<工程slug>-<beatId>` 命名)/ `dispatch.film_broll`(B-roll 检索队列)/ `dispatch.ai_drama`(AI 动画队列)。
188
188
 
189
- ### 7. 交棒下游 SOP(有序,别停在派单)
189
+ ### 7. 交棒下游 SOP(按请求范围决定交不交棒)
190
190
 
191
- dispatch 落地后**不要收工**——但下游各车道是**有先后的 SOP、每步用户可介入**,**不是并行一次铺完**。次序:
191
+ dispatch 落地、摘要报完之后,**看用户这次要多少**:
192
+
193
+ - **请求覆盖下游 → 按序交棒**:用户要成片、出片、完整包装、一条龙,或点名要铺 B-roll、字卡、BGM、字幕中的任一项;或你是被 `/gtrk-oralcut` 按「请求覆盖下游」接力过来的(oralcut 只在用户要成片时才接力,那次接力就是结论,别让用户把同一句话再说一遍);或这个会话里先前已说过「一路做到成片」。这时不追问「要不要继续」,按下面的次序往下走。
194
+ - **窄请求或判不清 → 停在派单**:用户只要拆分稿、派单、视觉拆分、派分镜、车道分配;或只说「帮我拆一下」,看不出要不要往成片做。这时交付上面的 dispatch 摘要后停下,**一句话交代下一步,不发问**,并点明下一步会改工程。示范:「派单出来了:MG N 槽 / B-roll M 段 / AI K 段(人读版在 `split/visual-split.md`)。要往成片做的话,下一步是按派单铺 B-roll 底轨,会往工程里加几条候选轨,你说一声我就接着做。」
195
+
196
+ ⚠️ **上面的说法只是举例、不是白名单**——判据是「**用户的请求覆盖不覆盖下游**」,换个说法照样得听懂。**判不清按窄请求处理**,也不为此在拆分前先发问:误停只多一句话,用户说「继续」就接上;误交棒会往工程里铺候选轨,走公开口检索或本地素材云端编排时还会计费,事后要清理。
197
+
198
+ #### 作为图纸的一步被调用时
199
+
200
+ 如果你是在按某张图纸(`/gtrk-talking-head`、`/gtrk-narration` 等)跑到拆分这一步,落地后**交回图纸**:以图纸的停点与模式为准(快速成片一杆到底、逐步推进每步停),本节的交棒规则不适用,别自己另起交棒,也别自己停下。
201
+
202
+ #### 交棒时的次序
203
+
204
+ 下游各车道是**有先后的 SOP、每步用户可介入**,**不是并行一次铺完**。次序:
192
205
 
193
206
  > **③ B-roll 底轨全铺齐(影视素材 / 本地素材 / AI 情景片段)→ ④ 全局抽帧检查画面构图 → ⑤ MG(含 ov)叠上 → `gtrk subtitle lay` 上字幕(快速成片模式必做)→ `gtrk render` 收口**
194
207
 
@@ -207,11 +220,11 @@ dispatch 落地后**不要收工**——但下游各车道是**有先后的 SOP
207
220
 
208
221
  **各车道的生产 skill 由栏目配置解析(业务分离)**:读 `style.skills[]`,取 `produces` 归一(旧 `RRV_MG`→`MG`)== 该车道 的条目 → 触发其 `ref` 指向的 skill;`routing:"none"` 跳过;无匹配 = 无生产 skill(B-roll 无需、A_ROLL 就是口播本身)。生产 skill 是栏目资产、留纯净、不知 gtrk 命令。
209
222
 
210
- > 每车道有专属**驱动 skill**(懂 SOP 位置 + 管用户检查点):拆分派单后**直接交棒 ③ `/gtrk-matrix`**(B-roll 底轨的影视/本地素材腿),AI 车道非空时它再交棒同阶段的 `/gtrk-ai-drama`;三源落齐 + ④ 抽帧检查过后,才交棒 ⑤ `/gtrk-mg`。你(agent)触发 `/gtrk-matrix` 起步即可。**agent 替用户跑 CLI,用户只对话。**
223
+ > 每车道有专属**驱动 skill**(懂 SOP 位置 + 管用户检查点):请求覆盖下游时,拆分派单后**交棒 ③ `/gtrk-matrix`**(B-roll 底轨的影视/本地素材腿),AI 车道非空时它再交棒同阶段的 `/gtrk-ai-drama`;三源落齐 + ④ 抽帧检查过后,才交棒 ⑤ `/gtrk-mg`。你(agent)触发 `/gtrk-matrix` 起步即可。**agent 替用户跑 CLI,用户只对话。**
211
224
 
212
225
  #### 逃生门:两种信号都要认(范围 + 节奏)
213
226
 
214
- 上面的「别停在派单、直接交棒 `/gtrk-matrix`」是**默认**,但**用户表达了范围保留或节奏保留时
227
+ 请求覆盖下游时,上面的按序交棒是**默认**,但**用户若还表达了范围保留或节奏保留,
215
228
  SHALL 停在派单这一步、SHALL NOT 自动交棒**。两者语义正交,认漏一个都会误冲:
216
229
 
217
230
  - **范围信号 = 走多远**(我只要这一个产物):「只要这份拆分稿」「派单出来我先看看」「先不铺轨」。
@@ -226,7 +239,7 @@ SHALL 停在派单这一步、SHALL NOT 自动交棒**。两者语义正交,
226
239
  停下时**必须交代下一步是什么、他说一声就继续**(例:「派单出来了:MG N 槽 / B-roll M 段 / AI K 段。
227
240
  按你说的逐步来我先停在这,下一步是铺 B-roll 底轨,你说一声我就接着做」),别退化成事事请示。
228
241
 
229
- **没有这两类信号时不改默认**:仍按上文有序推进、每步替用户跑命令。
242
+ **请求覆盖下游、又没有这两类信号时,照旧有序推进**,每步替用户跑命令。
230
243
 
231
244
  ---
232
245
 
@@ -82,7 +82,7 @@ description: "能生产 skill 的 meta skill——通过启发式访谈引导视
82
82
  1. **起 skill 目录**(用户作坊目录为正本,如 `D:\<他的工作区>\skills\<skill-name>\`):SKILL.md(frontmatter `name`+`description`,description 即触发器,写清「当用户想…时使用」)+ **README.md 必产**(含「正本→安装」单向流声明)+ 按需 references/ assets/。exemplar 一旦在 SKILL.md 里被引用就必须真实存在——「计划中的案例」不能以文件路径形式出现。skill 正文结构**由访谈产出的维度决定**,不套模板。
83
83
  2. **契约绑定**:产物命中管线 handoff 类型的,查 `contracts/handoff-contracts.json`(本 CLI 包内);映射到契约的(如 HTML 动画颗粒 → gsap-emit v1),在 skill 中引用「契约名+版本」并把契约合规项加进其自检清单;映射为 null 或管线外产物,无此要求。
84
84
  3. **共享词表**(条件产出,见第⑤招)。
85
- 4. **安装**:以作坊里的 skill 目录为源,运行 `npx -y skills add "<skill正本目录>" -g -y`,让通用适配器自动探测 Agent,并以统一正本 + symlink/junction 安装;用户明确指定宿主时追加 `-a <agent-id>`(可重复),明确要求独立副本时追加 `--copy`。不要在本 skill 里维护各 Agent 宿主的安装路径表(探测归适配器)。skill README 写明**「正本→安装」单向流**:源码正本在作坊,安装位是产物,改动先改正本再重装。
85
+ 4. **安装**:安装会把 skill 长期链接进用户机器上的 Agent 宿主,**先问用户装到哪些 Agent**(缺省只装当前在用的这一个,如 Claude Code 为 `claude-code`、Codex 为 `codex`)。拿到答复后以作坊里的 skill 目录为源,运行 `npx -y skills@1.7.4 add "<skill正本目录>" -g -y -a <agent-id>`(`-a` 可重复);用户明确说「全都装」才省掉 `-a`,交给通用适配器自动探测全部 Agent。统一正本 + symlink/junction 安装,明确要求独立副本时追加 `--copy`。适配器版本钉在 `skills@1.7.4`,MUST NOT 去掉版本号:不钉版本,每次安装都会拉上游最新代码来执行。不要在本 skill 里维护各 Agent 宿主的安装路径表(探测归适配器)。skill README 写明**「正本→安装」单向流**:源码正本在作坊,安装位是产物,改动先改正本再重装。
86
86
  5. **登记**:把 `{id, ref: <正本路径>, produces: <handoff 类型或自造串>}` **追加**进本地栏目配置 `style.skills`(词表进 `style.shared`)。配置文件位置以 gtrk 的 paths 口径为准(当前 `~/.gitruck/columns/<栏目id>.json`);文件不存在则创建最小骨架 `{meta:{id},style:{skills:[…]}}`。**追加,绝不清空既有条目**。产物是管线外的(封面等),登记时加 `routing:"none"`。
87
87
 
88
88
  **顺带问一句看点准则**:访谈里若已问出「这个栏目什么样的画面才叫有看点」(哪怕只是几条口语判据),