zerocut-cli 0.4.0 → 0.4.2

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.
@@ -89,7 +89,7 @@ async function getMaterialUri(session, fileName, options = {}) {
89
89
  }
90
90
  const saveToPath = `/home/user/cerevox-zerocut/projects/${session.terminal.id}/materials/${fileName}`;
91
91
  const files = session.files;
92
- await files.upload(localPath, saveToPath);
92
+ await files.upload(localPath, saveToPath, { overwrite: true });
93
93
  }
94
94
  else if (res.status > 299) {
95
95
  throw new Error(`Failed to get material from ${url}. Details: ${res.statusText}`);
@@ -34,7 +34,7 @@ Based on user topic, purpose, duration, style, references, and subject assets:
34
34
 
35
35
  Required workflow:
36
36
 
37
- project preparation -> subject creation -> scene planning (ensure `./materials/scene-bible.md` exists) -> storyboard generation -> scene video generation -> BGM generation -> final composition
37
+ project preparation -> subject creation -> scene planning (ensure `./scene-bible.md` exists) -> storyboard generation -> scene video generation -> BGM generation -> final composition
38
38
 
39
39
  ## Runtime Preparation
40
40
 
@@ -89,6 +89,10 @@ npx zerocut-cli config --ott <token> --region <cn|us>
89
89
 
90
90
  - If user does not provide exact script, generate concise narration/dialogue aligned with story and duration.
91
91
  - If user provides script or key message, keep original intent, wording priority, and brand keywords.
92
+ - If narration exists for a scene, inject it at the beginning of the scene video prompt with this exact format:
93
+ - `【narration_tone】Narration:<text_content>\n`
94
+ - `narration_tone` must be a concrete tone string derived from the voice formula, not a placeholder.
95
+ - `text_content` must be written in the user-required language.
92
96
  - Estimate speech duration with normal-slow pace.
93
97
  - Per-scene narration/dialogue total should not exceed 12 seconds.
94
98
  - If over limit, compress script or split into more scenes.
@@ -99,6 +103,17 @@ npx zerocut-cli config --ott <token> --region <cn|us>
99
103
  - Keep narration voice stable across the full video unless story explicitly changes narrator.
100
104
  - Use voice formula internally:
101
105
  - gender + age range + vocal traits + speaking pace + emotional baseline + language
106
+ - Convert the formula into a concise `narration_tone` label and keep it stable across scenes.
107
+ - `narration_tone` should explicitly encode the same dimensions as the formula.
108
+
109
+ ### Narration Tone Construction Example
110
+
111
+ - Voice formula example:
112
+ - female + 20-25 + bright thin tone with slight breathiness + medium-slow pace + gentle restrained with subtle hesitation + Mandarin Chinese
113
+ - Valid `narration_tone` example:
114
+ - `female_20-25_bright-breathy_medium-slow_gentle-hesitant_mandarin`
115
+ - Prompt prefix example:
116
+ - `【female_20-25_bright-breathy_medium-slow_gentle-hesitant_mandarin】Narration:夜色刚落下,她把那封信重新折好,放回口袋。\n`
102
117
 
103
118
  ## Subject Creation Rules
104
119
 
@@ -115,7 +130,7 @@ npx zerocut-cli image --prompt "<subject turnaround prompt>" --model banana2 --t
115
130
 
116
131
  ## Scene Planning And Scene-Bible Rules
117
132
 
118
- Scene planning is a critical quality gate. Before any storyboard or video generation, create a complete `./materials/scene-bible.md` and treat it as the single source of truth for all downstream prompts.
133
+ Scene planning is a critical quality gate. Before any storyboard or video generation, create a complete `./scene-bible.md` and treat it as the single source of truth for all downstream prompts.
119
134
 
120
135
  ### Mandatory Scene-Bible Checklist
121
136
 
@@ -136,7 +151,7 @@ Scene planning is a critical quality gate. Before any storyboard or video genera
136
151
  7. **Shot plan per scene**
137
152
  - each shot has self-contained prompt requirements and camera intention
138
153
  8. **Narration/dialogue plan**
139
- - per scene script and estimated speech duration (must stay within 12s per scene)
154
+ - per scene script, narration tone, language, and estimated speech duration (must stay within 12s per scene)
140
155
  9. **Asset binding**
141
156
  - which references are required for each scene (`--storyboard`, `--persons`, `--refs`)
142
157
  10. **Output plan**
@@ -146,7 +161,7 @@ Scene planning is a critical quality gate. Before any storyboard or video genera
146
161
 
147
162
  ### Scene-Bible Template
148
163
 
149
- Use this structure when writing `./materials/scene-bible.md`:
164
+ Use this structure when writing `./scene-bible.md`:
150
165
 
151
166
  ```markdown
152
167
  # Scene Bible
@@ -280,6 +295,8 @@ For each scene, planning output must include:
280
295
  ## Storyboard Rules
281
296
 
282
297
  - Every scene must have a storyboard image.
298
+ - Storyboard generation must use `npx zerocut-cli image` with `--type storyboard`.
299
+ - `--type` value is strictly locked to `storyboard` for storyboard generation. Do not use `default`, `subject-turnaround`, or any other value.
283
300
  - Storyboard must include environment, subject position/action, framing, camera movement, rhythm, and key emotion.
284
301
  - If a subject appears in that scene, include matching subject references.
285
302
  - Storyboard prompts must be complete and self-contained.
@@ -295,6 +312,8 @@ If no subject references are required in that scene, omit `--refs`.
295
312
  ## Prompt Independence Hard Constraint
296
313
 
297
314
  - Every shot prompt and every scene video prompt must be fully self-contained.
315
+ - If narration is present, the prompt must start with `【narration_tone】Narration:<text_content>\n`.
316
+ - Validate narration before generation: tone must match voice design and text language must match user requirement.
298
317
  - Do not use shorthand such as:
299
318
  - "same as previous shot"
300
319
  - "continue above"
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "zerocut-cli",
3
- "version": "0.4.0",
3
+ "version": "0.4.2",
4
4
  "description": "ZeroCut CLI: AI assistant CLI for creating and editing images/audio/video",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",
@@ -96,7 +96,7 @@ export async function getMaterialUri(
96
96
  }
97
97
  const saveToPath = `/home/user/cerevox-zerocut/projects/${session.terminal.id}/materials/${fileName}`;
98
98
  const files = session.files;
99
- await files.upload(localPath, saveToPath);
99
+ await files.upload(localPath, saveToPath, { overwrite: true });
100
100
  } else if (res.status > 299) {
101
101
  throw new Error(`Failed to get material from ${url}. Details: ${res.statusText}`);
102
102
  }
@@ -34,7 +34,7 @@ Based on user topic, purpose, duration, style, references, and subject assets:
34
34
 
35
35
  Required workflow:
36
36
 
37
- project preparation -> subject creation -> scene planning (ensure `./materials/scene-bible.md` exists) -> storyboard generation -> scene video generation -> BGM generation -> final composition
37
+ project preparation -> subject creation -> scene planning (ensure `./scene-bible.md` exists) -> storyboard generation -> scene video generation -> BGM generation -> final composition
38
38
 
39
39
  ## Runtime Preparation
40
40
 
@@ -89,6 +89,10 @@ npx zerocut-cli config --ott <token> --region <cn|us>
89
89
 
90
90
  - If user does not provide exact script, generate concise narration/dialogue aligned with story and duration.
91
91
  - If user provides script or key message, keep original intent, wording priority, and brand keywords.
92
+ - If narration exists for a scene, inject it at the beginning of the scene video prompt with this exact format:
93
+ - `【narration_tone】Narration:<text_content>\n`
94
+ - `narration_tone` must be a concrete tone string derived from the voice formula, not a placeholder.
95
+ - `text_content` must be written in the user-required language.
92
96
  - Estimate speech duration with normal-slow pace.
93
97
  - Per-scene narration/dialogue total should not exceed 12 seconds.
94
98
  - If over limit, compress script or split into more scenes.
@@ -99,6 +103,17 @@ npx zerocut-cli config --ott <token> --region <cn|us>
99
103
  - Keep narration voice stable across the full video unless story explicitly changes narrator.
100
104
  - Use voice formula internally:
101
105
  - gender + age range + vocal traits + speaking pace + emotional baseline + language
106
+ - Convert the formula into a concise `narration_tone` label and keep it stable across scenes.
107
+ - `narration_tone` should explicitly encode the same dimensions as the formula.
108
+
109
+ ### Narration Tone Construction Example
110
+
111
+ - Voice formula example:
112
+ - female + 20-25 + bright thin tone with slight breathiness + medium-slow pace + gentle restrained with subtle hesitation + Mandarin Chinese
113
+ - Valid `narration_tone` example:
114
+ - `female_20-25_bright-breathy_medium-slow_gentle-hesitant_mandarin`
115
+ - Prompt prefix example:
116
+ - `【female_20-25_bright-breathy_medium-slow_gentle-hesitant_mandarin】Narration:夜色刚落下,她把那封信重新折好,放回口袋。\n`
102
117
 
103
118
  ## Subject Creation Rules
104
119
 
@@ -115,7 +130,7 @@ npx zerocut-cli image --prompt "<subject turnaround prompt>" --model banana2 --t
115
130
 
116
131
  ## Scene Planning And Scene-Bible Rules
117
132
 
118
- Scene planning is a critical quality gate. Before any storyboard or video generation, create a complete `./materials/scene-bible.md` and treat it as the single source of truth for all downstream prompts.
133
+ Scene planning is a critical quality gate. Before any storyboard or video generation, create a complete `./scene-bible.md` and treat it as the single source of truth for all downstream prompts.
119
134
 
120
135
  ### Mandatory Scene-Bible Checklist
121
136
 
@@ -136,7 +151,7 @@ Scene planning is a critical quality gate. Before any storyboard or video genera
136
151
  7. **Shot plan per scene**
137
152
  - each shot has self-contained prompt requirements and camera intention
138
153
  8. **Narration/dialogue plan**
139
- - per scene script and estimated speech duration (must stay within 12s per scene)
154
+ - per scene script, narration tone, language, and estimated speech duration (must stay within 12s per scene)
140
155
  9. **Asset binding**
141
156
  - which references are required for each scene (`--storyboard`, `--persons`, `--refs`)
142
157
  10. **Output plan**
@@ -146,7 +161,7 @@ Scene planning is a critical quality gate. Before any storyboard or video genera
146
161
 
147
162
  ### Scene-Bible Template
148
163
 
149
- Use this structure when writing `./materials/scene-bible.md`:
164
+ Use this structure when writing `./scene-bible.md`:
150
165
 
151
166
  ```markdown
152
167
  # Scene Bible
@@ -280,6 +295,8 @@ For each scene, planning output must include:
280
295
  ## Storyboard Rules
281
296
 
282
297
  - Every scene must have a storyboard image.
298
+ - Storyboard generation must use `npx zerocut-cli image` with `--type storyboard`.
299
+ - `--type` value is strictly locked to `storyboard` for storyboard generation. Do not use `default`, `subject-turnaround`, or any other value.
283
300
  - Storyboard must include environment, subject position/action, framing, camera movement, rhythm, and key emotion.
284
301
  - If a subject appears in that scene, include matching subject references.
285
302
  - Storyboard prompts must be complete and self-contained.
@@ -295,6 +312,8 @@ If no subject references are required in that scene, omit `--refs`.
295
312
  ## Prompt Independence Hard Constraint
296
313
 
297
314
  - Every shot prompt and every scene video prompt must be fully self-contained.
315
+ - If narration is present, the prompt must start with `【narration_tone】Narration:<text_content>\n`.
316
+ - Validate narration before generation: tone must match voice design and text language must match user requirement.
298
317
  - Do not use shorthand such as:
299
318
  - "same as previous shot"
300
319
  - "continue above"