@remixmate/cli 0.9.57 → 0.9.59

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.
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "schemaVersion": 1,
3
- "version": "0.9.57",
4
- "generatedAt": "2026-09-29T07:05:55.130Z",
3
+ "version": "0.9.59",
4
+ "generatedAt": "2026-09-29T12:43:37.496Z",
5
5
  "skills": [
6
6
  {
7
7
  "id": "doc-parse",
@@ -82,7 +82,7 @@
82
82
  "tier": "orchestration",
83
83
  "category": "consuming",
84
84
  "title": "Jianying (CapCut) Draft Export",
85
- "summary": "Jianying (CapCut) draft export: package asset URLs into a draft ZIP that Jianying can import. Supports automatic conversion from a RenderPlan.",
85
+ "summary": "Jianying (CapCut) draft export: package asset URLs into a draft ZIP that Jianying can import. By default exports the latest prepared render job of the current conversation (no scenes needed).",
86
86
  "triggers": [
87
87
  "Export to Jianying, Jianying draft, package for Jianying, import into Jianying",
88
88
  "Export materials to the Jianying format, generate a Jianying project",
@@ -102,13 +102,17 @@
102
102
  "parameters": {
103
103
  "type": "object",
104
104
  "properties": {
105
+ "from_job_id": {
106
+ "type": "number",
107
+ "description": "Render job id to export (the `jobId` printed by prepare_video_assets). Omit it together with scenes to export the latest prepared job of the current conversation — preferred, because asset URLs copied from chat history go stale after re-renders"
108
+ },
105
109
  "from_render_plan": {
106
110
  "type": "string",
107
- "description": "Build the draft from a RenderPlan JSON (replaces --scenes)"
111
+ "description": "Build the draft from a local RenderPlan JSON file (local debugging only)"
108
112
  },
109
113
  "scenes": {
110
114
  "type": "string",
111
- "description": "Scene array as JSON (inline string or file path)"
115
+ "description": "Hand-written scene array as JSON — only for assets that never went through prepare_video_assets. Fields per scene: imageUrl | videoUrl (one required), duration (seconds, required), audioUrl, audioDuration, subtitleText, textLayers, width, height. Any other field (text, image, audio…) is rejected"
112
116
  },
113
117
  "title": {
114
118
  "type": "string",
@@ -128,15 +132,15 @@
128
132
  "mac",
129
133
  "windows"
130
134
  ],
131
- "description": "Draft-root preset"
135
+ "description": "OS of the computer that will open the draft"
132
136
  },
133
137
  "draft_root_path": {
134
138
  "type": "string",
135
- "description": "Explicit Jianying draft root path (overrides --system)"
139
+ "description": "Absolute Jianying draft root on the user's computer (Jianying → Settings → Draft location), e.g. /Users/<username>/Movies/JianyingPro/User Data/Projects/com.lveditor.draft or C:/Users/<username>/AppData/Local/JianyingPro/User Data/Projects/com.lveditor.draft. Required when the agent runs on a server; never guess the username, ask the user"
136
140
  },
137
141
  "no_download": {
138
142
  "type": "boolean",
139
- "description": "Do not download the ZIP; print the URL only"
143
+ "description": "Do not keep a local copy of the ZIP; print the download URL only"
140
144
  },
141
145
  "output": {
142
146
  "type": "string",
@@ -147,18 +151,18 @@
147
151
  },
148
152
  "ui": {
149
153
  "primary": [
150
- "title"
151
- ],
152
- "advanced": [
153
154
  "system",
154
- "width",
155
- "height",
156
- "output"
155
+ "draft_root_path"
157
156
  ],
157
+ "advanced": [],
158
158
  "hidden": [
159
+ "title",
160
+ "width",
161
+ "height",
162
+ "output",
163
+ "from_job_id",
159
164
  "from_render_plan",
160
165
  "scenes",
161
- "draft_root_path",
162
166
  "no_download"
163
167
  ]
164
168
  }
@@ -169,7 +173,7 @@
169
173
  "tier": "atomic",
170
174
  "category": "asset",
171
175
  "title": "Digital-Human Talking-Head",
172
- "summary": "Digital-human video (HiFly): list or clone avatars; produce a talking-head video from text via TTS, or drive an avatar from an existing audio URL. Aspect ratio follows the avatar's cloned source and cannot be chosen.",
176
+ "summary": "Digital-human video (HiFly): list or clone avatars; produce a talking-head video from text via TTS, or drive an avatar from an existing audio URL. Aspect ratio follows the avatar's cloned source and cannot be chosen. Talking-head videos cost credits per second of output (5 s minimum); fails with insufficient_credits when the balance is too low.",
173
177
  "triggers": [
174
178
  "Digital human, talking-head video, AI presenter, virtual host",
175
179
  "Make a talking-head video out of this script / this audio file",
@@ -215,7 +219,7 @@
215
219
  },
216
220
  "clone": {
217
221
  "type": "boolean",
218
- "description": "Clone mode: create a custom HiFly avatar from a video (free) or a portrait image (costs HiFly credits). Requires clone_url and name. Waits until cloning finishes unless wait=false."
222
+ "description": "Clone mode: create a custom HiFly avatar from a video (free) or a portrait image (costs credits per clone, refunded automatically if cloning fails; see the pricing page). Requires clone_url and name. Waits until cloning finishes unless wait=false."
219
223
  },
220
224
  "clone_url": {
221
225
  "type": "string",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@remixmate/cli",
3
- "version": "0.9.57",
3
+ "version": "0.9.59",
4
4
  "description": "AI media generation skills for Claude Code / Codex — 12 skills covering image, video, voice, digital human, web screenshot, web recording, script, template registry, rendering, Jianying export, and video deconstruction.",
5
5
  "type": "module",
6
6
  "main": "dist/index.js",
@@ -44,24 +44,37 @@ There is no dedicated env file; the **process environment** variables of the cal
44
44
 
45
45
  1. **Script path**: read the system-injected `Base directory for this skill: <path>` as `<SkillDir>`. Every command below uses `<SkillDir>/scripts/gen_jianying_draft.py`; never hard-code paths.
46
46
  2. **Pick the input form**:
47
- - **Form A (recommended)**: `--from-job-id` — load the RenderPlan from the database without passing a file path (safe for multi-user concurrent flows).
48
- - **Form B (fallback, single-user / local debugging)**: `--from-render-plan` — read a local `render-plan.json`.
49
- 3. **Draft root**: by default the `--system mac` preset resolves the target Jianying draft directory; switch with `--system windows`, or override with `--draft-root-path`. This path is sent to the API as `draftRootPath` and embedded in the draft files.
50
- 4. **By default download the ZIP** locally (`--output` sets the path); pass `--no-download` if you only need the download URL (this flag is ignored when scenes contain `textLayers` / `subtitleText`).
47
+ - **Default (recommended)**: pass **no** `--scenes` / `--from-job-id`. When `CONVERSATION_ID` is set (always true inside the agent), the script exports the latest render job of this conversation that has prepared assets — i.e. whatever the user last re-rendered, including voices or images they changed in the editor.
48
+ - **`--from-job-id <jobId>`**: export a specific earlier job.
49
+ - **`--scenes`**: only for assets that never went through `prepare_video_assets`. **Never** rebuild scenes from URLs in the chat history: earlier tables go stale after every re-render, and you cannot see previous tool results.
50
+ - `--from-render-plan`: local debugging only.
51
+ 3. **Draft root**: pass the user's real Jianying draft directory via `--draft-root-path` (an absolute path on **the user's computer**). It is sent to the API as `draftRootPath` and embedded in the draft files, so a wrong path makes Jianying lose the media. If the user already gave a path (e.g. a `草稿目录` / `Draft folder` line in their message), use it verbatim. Otherwise ask for it — never guess the username. The path is only optional when this script runs on the user's own computer of the `--system` OS; anywhere else (e.g. a server-side agent) the script exits with an error asking for it.
52
+ 4. **Download URL**: pass `--no-download` in the agent (no local copy is kept). When subtitles / textLayers need styling the script still fetches the ZIP to a temp file, styles it, uploads it back and prints the URL of the **styled** ZIP. The printed `download URL:` is a signed link that expires after 7 days — give it to the user exactly as printed, including the whole `?Expires=…&Signature=…` query; never strip or re-encode it.
51
53
  5. **Async job**: draft generation is async (assets must be downloaded and packaged); the script polls until completion.
54
+ 6. **Report what is actually in the draft**: repeat the `📦 Draft contents` block (scene count, narration audio N/N, subtitles N/N, draft root). Don't claim subtitles or a particular voice version the block doesn't show.
52
55
 
53
- ### Load the RenderPlan from the database (recommended, multi-user safe)
56
+ ### Export the latest prepared job of this conversation (default)
54
57
 
55
- When `prepare_video_assets` was invoked with `--save-job` (default) and persisted the RenderPlan, load it directly via `--from-job-id` — no file path required:
58
+ ```bash
59
+ python3 <SkillDir>/scripts/gen_jianying_draft.py \
60
+ --system mac \
61
+ --draft-root-path "/Users/<username>/Movies/JianyingPro/User Data/Projects/com.lveditor.draft" \
62
+ --no-download
63
+ ```
64
+
65
+ - Requires `PRIV_TOKEN` and `CONVERSATION_ID` (both injected by the agent). The title defaults to the plan's title.
66
+ - Fails with a clear message if the conversation has no prepared job yet — run `prepare_video_assets` first.
67
+
68
+ ### Load a specific job from the database
56
69
 
57
70
  ```bash
58
71
  python3 <SkillDir>/scripts/gen_jianying_draft.py \
59
72
  --from-job-id <jobId> \
60
- --title "My Video"
73
+ --system mac \
74
+ --draft-root-path "/Users/<username>/Movies/JianyingPro/User Data/Projects/com.lveditor.draft"
61
75
  ```
62
76
 
63
77
  - `<jobId>` is the task id printed by `prepare_video_assets` (the line `📦 render job jobId: N`).
64
- - Requires the `PRIV_TOKEN` and `MM_BACKEND_API_URL` env vars.
65
78
 
66
79
  ### Read from a RenderPlan file (fallback, single-user / local debugging)
67
80
 
@@ -145,23 +158,26 @@ python3 <SkillDir>/scripts/gen_jianying_draft.py \
145
158
 
146
159
  ### Specify the Jianying draft root
147
160
 
148
- Default is `--system mac`. Switch to the Windows preset:
161
+ macOS:
149
162
 
150
163
  ```bash
151
164
  python3 <SkillDir>/scripts/gen_jianying_draft.py \
152
- --title "Win draft" --system windows \
165
+ --title "Mac draft" --system mac \
166
+ --draft-root-path "/Users/<username>/Movies/JianyingPro/User Data/Projects/com.lveditor.draft" \
153
167
  --scenes '[{"videoUrl":"https://example.com/v.mp4","duration":5}]'
154
168
  ```
155
169
 
156
- Explicitly specify a path (overrides `--system`):
170
+ Windows:
157
171
 
158
172
  ```bash
159
173
  python3 <SkillDir>/scripts/gen_jianying_draft.py \
160
- --title "Custom path" \
161
- --draft-root-path "/Users/yourname/Movies/JianyingPro/User Data/Projects/com.lveditor.draft" \
174
+ --title "Win draft" --system windows \
175
+ --draft-root-path "C:/Users/<username>/AppData/Local/JianyingPro/User Data/Projects/com.lveditor.draft" \
162
176
  --scenes '[{"videoUrl":"https://example.com/v.mp4","duration":5}]'
163
177
  ```
164
178
 
179
+ `<username>` is a placeholder for the user's real value — the script rejects paths that still contain `<...>`, start with `~`, contain `%VAR%` / `$VAR`, or are not absolute. Users who moved their draft folder can copy the exact path from Jianying → Settings → Draft location.
180
+
165
181
  ### Only print the download URL (no file write)
166
182
 
167
183
  ```bash
@@ -170,7 +186,7 @@ python3 <SkillDir>/scripts/gen_jianying_draft.py \
170
186
  --scenes '[{"videoUrl":"https://example.com/v.mp4","duration":5}]'
171
187
  ```
172
188
 
173
- 6. **Show the result**: by default the script prints the download URL and saves the ZIP to `--output`. At the end it prints "extract into the draft root → restart Jianying" to import. With `--no-download`, only the download URL is printed.
189
+ **Show the result**: the script prints `📦 Draft contents`, the signed `download URL:` and the import steps. Without `--no-download` it also keeps the ZIP at `--output`.
174
190
 
175
191
  See every option: `python3 <SkillDir>/scripts/gen_jianying_draft.py --help`.
176
192
 
@@ -178,31 +194,31 @@ See every option: `python3 <SkillDir>/scripts/gen_jianying_draft.py --help`.
178
194
 
179
195
  | Flag | Description | Default |
180
196
  |------|-------------|---------|
181
- | `--from-render-plan` | Convert from a RenderPlan JSON automatically (replaces `--scenes`). | — |
182
- | `--from-job-id` | Load the RenderPlan from the database (pass a jobId, replaces `--from-render-plan`). | — |
183
- | `--scenes` | Scenes JSON (inline string or file path). | required (unless using `--from-render-plan` or `--from-job-id`) |
184
- | `--title` | Draft title. | required (optional when using `--from-render-plan`) |
197
+ | `--from-job-id` | Load the RenderPlan of a specific job from the database. | latest prepared job of `CONVERSATION_ID` when no source is given |
198
+ | `--from-render-plan` | Convert a local RenderPlan JSON (local debugging). | — |
199
+ | `--scenes` | Hand-written scenes JSON (inline string or file path); unknown fields are rejected. | — |
200
+ | `--title` | Draft title. | plan title (required with `--scenes`) |
185
201
  | `--width` | Canvas width in pixels. | `1080` |
186
202
  | `--height` | Canvas height in pixels. | `1920` |
187
203
  | `--draft-name` | Jianying draft name. | same as title |
188
- | `--system` | Draft-root preset: `mac` / `windows`. | `mac` |
189
- | `--draft-root-path` | Explicit Jianying draft root path (overrides `--system`). | resolved from `--system` |
190
- | `--no-download` | Skip the ZIP download; print only the URL (ignored when textLayers / subtitleText is present). | off |
204
+ | `--system` | OS of the computer that will open the draft: `mac` / `windows`. | `mac` |
205
+ | `--draft-root-path` | Absolute Jianying draft root on the user's computer. | required unless the script runs on that computer |
206
+ | `--no-download` | Keep no local copy; print only the (post-processed, signed) URL. | off |
191
207
  | `-o` / `--output` | Download path. | `jianying_draft.zip` |
192
208
  | `--poll-interval` | Polling interval (seconds). | `5` |
193
209
  | `--max-wait` | Maximum wait time (seconds). | `300` |
194
210
  | `--private-token` | Override the token. | see table above |
195
211
 
196
- ### Draft-root presets
212
+ ### Default draft roots
197
213
 
198
- | `--system` | Resolved path |
199
- |------------|---------------|
200
- | `mac` | `~/Movies/JianyingPro/User Data/Projects/com.lveditor.draft` (`~` expands on the runner machine). |
201
- | `windows` | `%LOCALAPPDATA%/JianyingPro/User Data/Projects/com.lveditor.draft` (literal, not expanded — the target Windows machine resolves it). |
214
+ | `--system` | Jianying default (replace `<username>`) | Derived automatically only when |
215
+ |------------|------------------------------------------|---------------------------------|
216
+ | `mac` | `/Users/<username>/Movies/JianyingPro/User Data/Projects/com.lveditor.draft` | the script runs on macOS |
217
+ | `windows` | `C:/Users/<username>/AppData/Local/JianyingPro/User Data/Projects/com.lveditor.draft` | the script runs on Windows with `LOCALAPPDATA` set |
202
218
 
203
219
  ## Scene JSON shape
204
220
 
205
- Fields supported per scene:
221
+ Fields supported per scene (anything else — e.g. `text`, `image`, `audio` — makes the script exit with the correct field name; `id` is ignored):
206
222
 
207
223
  | Field | Type | Description |
208
224
  |-------|------|-------------|
@@ -240,11 +256,8 @@ When `textLayers` is present the script downloads the ZIP and post-processes `dr
240
256
 
241
257
  ## How to import into Jianying
242
258
 
243
- 1. By default the draft ZIP is saved to `--output` (default `jianying_draft.zip`).
244
- 2. Extract the ZIP into the "draft root" the script prints — i.e. the `draftRootPath` passed to the API:
245
- - mac default: `~/Movies/JianyingPro/User Data/Projects/com.lveditor.draft/`
246
- - windows default: `%LOCALAPPDATA%/JianyingPro/User Data/Projects/com.lveditor.draft/`
247
- - custom: the path passed via `--draft-root-path`
259
+ 1. Download the ZIP from the printed `download URL:` (or use the local `--output` file).
260
+ 2. Extract the ZIP into exactly the draft root that was passed as `--draft-root-path` (the script prints it as `draft root:`). Tell the user that path verbatim — not a generic `~/...` one.
248
261
  3. Start (or restart) Jianying; the draft appears in the project list.
249
262
 
250
263
  > The backend embeds `draftRootPath` into `draft_content.json` / `draft_meta_info.json`. As long as the extraction directory matches the path that was passed in, Jianying resolves the material paths correctly without extra rewrites.
@@ -253,5 +266,8 @@ When `textLayers` is present the script downloads the ZIP and post-processes `dr
253
266
 
254
267
  - **401** / **token missing** (non-OpenClaw): check or set the token via the Feishu link above.
255
268
  - **Business `code != 0`**: read the `msg` printed on stderr.
269
+ - **`unsupported field(s)`**: rename the field as the message says — or better, drop `--scenes` and export the latest job.
270
+ - **`no render job with a saved RenderPlan`**: the conversation has no prepared assets yet; run `prepare_video_assets` first.
271
+ - **`--draft-root-path is required` / `invalid --draft-root-path`**: ask the user for the real path; don't retry with a guessed one.
256
272
  - **Generation timeout**: increase `--max-wait` or retry later.
257
273
  - **Network**: check connectivity and `MM_API_BASE_URL`.