@funnelsgrove/cli 0.1.375 → 0.1.377

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.
@@ -1284,6 +1284,7 @@ video may be written { "variation": "<full name or vd005_01>", "size": "1080x192
1284
1284
  return {
1285
1285
  size: preview.size, fps: preview.fps, textStyle: preview.textStyle,
1286
1286
  variants: preview.variants.map((variant) => ({ name: variant.name, seconds: variant.seconds, shots: variant.shots.length })),
1287
+ ...(preview.keyframes?.length ? { keyframes: preview.keyframes } : {}),
1287
1288
  clips: preview.clips, ...(preview.music ? { music: preview.music } : {}), storyboard: index, written,
1288
1289
  };
1289
1290
  }));
@@ -1294,13 +1295,15 @@ video may be written { "variation": "<full name or vd005_01>", "size": "1080x192
1294
1295
  .option('--resolution <resolution>', MONTAGE_RESOLUTION_HINT)
1295
1296
  .option('--pack <creative>', 'Approve videos into this existing Creative, such as vd007 (default: one new Creative per batch)')
1296
1297
  .option('--estimate', 'Print the credits per step, the variants and the clips, and the balance; start nothing')
1298
+ .option('--keyframes-only', 'Make and charge only the keyframes the image model makes, to approve the board before any clip is paid; '
1299
+ + '`montage revise <id>` then writes the cut sheet that reuses them for free')
1297
1300
  .option('--wait', 'Poll until the Generation finished'))
1298
1301
  .action(run(async (scope, options, file) => {
1299
1302
  const angleId = findAngle(await input.angles(scope), options.angle).id;
1300
1303
  const packCreativeId = options.pack ? findCreative(await input.creatives(scope), options.pack).id : null;
1301
1304
  const { cutSheet } = await readMontageCutSheet(scope, file, { upload: true, variations: () => input.variations(scope) });
1302
1305
  const request = {
1303
- montage: { angleId, brand: options.brand, cutSheet },
1306
+ montage: { angleId, brand: options.brand, cutSheet, ...(options.keyframesOnly ? { keyframesOnly: true } : {}) },
1304
1307
  ...(options.model ? { model: options.model } : {}), ...(options.resolution ? { resolution: options.resolution } : {}),
1305
1308
  ...(packCreativeId ? { packCreativeId } : {}),
1306
1309
  };
@@ -1313,21 +1316,24 @@ video may be written { "variation": "<full name or vd005_01>", "size": "1080x192
1313
1316
  }));
1314
1317
  scoped(montage.command('show <generationId>').description('Show a Montage Generation: each variant\'s video and each generated clip, with their output ids')
1315
1318
  .option('--wait', 'Poll until the Generation finished')
1316
- .option('--download <dir>', 'Save every delivered video as <variant>.mp4, every delivered generated clip as clip-<shot>.mp4 and a generated music track as music.mp3'))
1319
+ .option('--download <dir>', 'Save every delivered video as <variant>.mp4, every delivered generated keyframe as keyframe-<shot>.png, every delivered generated clip as clip-<shot>.mp4 '
1320
+ + 'and a generated music track as music.mp3'))
1317
1321
  .action(run(async (scope, options, generationId) => {
1318
1322
  const detail = options.wait ? await waitForGeneration(scope, generationId) : await api(scope, 'generation', 'query', { generationId });
1319
1323
  return { ...montageSummary(detail), ...(options.download ? { downloaded: await downloadMontage(detail, options.download) } : {}) };
1320
1324
  }));
1321
- scoped(montage.command('revise <generationId>').description('Write the cut sheet of a follow-up Montage: delivered generated clips and music are reused at no cost, '
1322
- + 'rerolled and undelivered Shots generate again')
1323
- .option('--reroll <shots...>', 'Generated Shots to make again, by id')
1325
+ scoped(montage.command('revise <generationId>').description('Write the cut sheet of a follow-up Montage: delivered generated keyframes, clips, music and converted voices are reused at '
1326
+ + 'no cost, rerolled and undelivered Shots generate again')
1327
+ .option('--reroll <shots...>', 'Generated Shots to make again, by id, from their delivered keyframe (of a keyframes-only Montage: the keyframe itself)')
1324
1328
  .option('--out <file>', 'Where to write the cut sheet (default: montage-<first 8 of the id>.revised.json)'))
1325
1329
  .action(run(async (scope, options, generationId) => {
1326
1330
  const read = (id) => api(scope, 'generation', 'query', { generationId: id });
1327
1331
  const revised = await reviseCutSheet(await read(generationId), options.reroll ?? [], read);
1328
1332
  const out = options.out ?? `montage-${generationId.slice(0, 8)}.revised.json`;
1329
1333
  await writeFile(out, `${JSON.stringify(revised.cutSheet, null, 2)}\n`, 'utf8');
1330
- return { written: out, reused: revised.reused, generating: revised.generating, ...(revised.music ? { music: revised.music } : {}) };
1334
+ return { written: out, reused: revised.reused, generating: revised.generating, ...(revised.keyframes ? { keyframes: revised.keyframes } : {}),
1335
+ ...(revised.music ? { music: revised.music } : {}),
1336
+ ...(revised.voices ? { voices: revised.voices } : {}) };
1331
1337
  }));
1332
1338
  };
1333
1339
  export const registerCreativeCommands = (program, deps) => {
@@ -1392,6 +1398,7 @@ Examples:
1392
1398
  fgrove creatives montage guide takes
1393
1399
  fgrove creatives montage preview ./vd007/cut.json --project acme
1394
1400
  fgrove creatives montage start ./vd007/cut.json --angle C004 --brand "Acme Claims" --model kling-4 --estimate --project acme
1401
+ fgrove creatives montage start ./vd007/cut.json --angle C004 --brand "Acme Claims" --keyframes-only --wait --project acme
1395
1402
  fgrove creatives montage show <generation id> --wait --download ./vd007/out --project acme
1396
1403
  fgrove creatives montage revise <generation id> --reroll s04 --out ./vd007/cut.v2.json --project acme`);
1397
1404
  const settings = root.command('settings').description('Project creative settings');
@@ -60,6 +60,12 @@ export type MontagePreview = {
60
60
  seconds: number;
61
61
  credits: number;
62
62
  } | null;
63
+ /** CRE-BR-054: the keyframes the image model makes at start. */
64
+ keyframes?: {
65
+ shotId: string;
66
+ model: string;
67
+ credits: number;
68
+ }[];
63
69
  };
64
70
  /** `0:03`, `1:02.5`. */
65
71
  export declare const montageTime: (seconds: number) => string;
@@ -74,6 +80,13 @@ export declare const writeStoryboard: (preview: MontagePreview, dir: string, tit
74
80
  export type MontageRecipe = {
75
81
  flow: 'montage';
76
82
  cutSheet: Json;
83
+ /** CRE-BR-054: the keyframes the image model makes, in the order of their keyframe outputs; alone with `keyframesOnly`. */
84
+ keyframes?: {
85
+ shotId: string;
86
+ prompt: string;
87
+ model: string;
88
+ }[];
89
+ keyframesOnly?: boolean;
77
90
  clips: {
78
91
  shotId: string;
79
92
  seconds: number;
@@ -85,12 +98,20 @@ export type MontageRecipe = {
85
98
  prompt: string;
86
99
  seconds: number;
87
100
  } | null;
101
+ /** CRE-BR-053: each voice's converted takes, in the order of their voiceover outputs. */
102
+ voices?: {
103
+ name: string;
104
+ conversions: {
105
+ seconds: number;
106
+ shots: string[];
107
+ }[];
108
+ }[];
88
109
  variants: {
89
110
  name: string;
90
111
  seconds: number;
91
112
  }[];
92
113
  };
93
- /** The variants' videos in order, the generated clips with their Shots and the generated music track. */
114
+ /** The variants' videos in order, the generated keyframes and clips with their Shots and the generated music track. */
94
115
  export declare const montageOutputs: (detail: GenerationDetail) => {
95
116
  recipe: MontageRecipe;
96
117
  variants: {
@@ -98,6 +119,12 @@ export declare const montageOutputs: (detail: GenerationDetail) => {
98
119
  name: string;
99
120
  seconds: number;
100
121
  }[];
122
+ keyframes: {
123
+ output: GenerationOutput | undefined;
124
+ shotId: string;
125
+ prompt: string;
126
+ model: string;
127
+ }[];
101
128
  clips: {
102
129
  output: GenerationOutput | undefined;
103
130
  shotId: string;
@@ -110,29 +137,32 @@ export declare const montageOutputs: (detail: GenerationDetail) => {
110
137
  prompt: string;
111
138
  seconds: number;
112
139
  } | null;
140
+ voices: {
141
+ output: GenerationOutput | undefined;
142
+ seconds: number;
143
+ shots: string[];
144
+ voice: string;
145
+ }[];
113
146
  };
114
- /** The `montage` part of `montage show`: each variant's video and each generated clip, with their outputs. */
147
+ /** The `montage` part of `montage show`: each variant's video and each generated keyframe and clip, with their outputs. */
115
148
  export declare const summarizeMontage: (detail: GenerationDetail) => {
116
149
  approving?: string | undefined;
117
- music?: {
150
+ voices?: {
151
+ voice: string;
152
+ shots: string[];
118
153
  seconds: number;
119
154
  outputId: string | null;
120
155
  status: string | null;
121
156
  url: string | null;
122
157
  error: string | null;
123
- } | undefined;
124
- variants: {
125
- name: string;
158
+ }[] | undefined;
159
+ music?: {
126
160
  seconds: number;
127
- outputId: string;
128
- status: string;
129
- videoUrl: string | null;
130
- posterUrl: string | null;
161
+ outputId: string | null;
162
+ status: string | null;
163
+ url: string | null;
131
164
  error: string | null;
132
- keptVariationId: string | null;
133
- heard: string;
134
- findings: string[];
135
- }[];
165
+ } | undefined;
136
166
  clips: {
137
167
  heard?: string | undefined;
138
168
  words?: (string | number)[][] | undefined;
@@ -145,18 +175,53 @@ export declare const summarizeMontage: (detail: GenerationDetail) => {
145
175
  url: string | null;
146
176
  error: string | null;
147
177
  }[];
178
+ keyframesOnly?: boolean | undefined;
179
+ revising?: string | undefined;
180
+ keyframes?: {
181
+ shotId: string;
182
+ model: string;
183
+ outputId: string | null;
184
+ status: string | null;
185
+ url: string | null;
186
+ error: string | null;
187
+ }[] | undefined;
188
+ variants: {
189
+ name: string;
190
+ seconds: number;
191
+ outputId: string;
192
+ status: string;
193
+ videoUrl: string | null;
194
+ posterUrl: string | null;
195
+ error: string | null;
196
+ keptVariationId: string | null;
197
+ heard: string;
198
+ findings: string[];
199
+ }[];
148
200
  };
149
- /** Saves every delivered variant video as `<variant>.mp4`, every delivered clip as `clip-<shot>.mp4` and a generated track as `music.mp3`. */
201
+ /**
202
+ * Saves every delivered variant video as `<variant>.mp4`, every delivered keyframe as `keyframe-<shot>.png`, every
203
+ * delivered clip as `clip-<shot>.mp4` and a generated track as `music.mp3`.
204
+ */
150
205
  export declare const downloadMontage: (detail: GenerationDetail, dir: string, fetchFn?: typeof fetch) => Promise<string[]>;
151
206
  /**
152
207
  * The cut sheet of a follow-up Montage (CRE-BR-045): each `generate` Shot whose clip was delivered becomes a `clip`
153
- * naming that clip, unless it is rerolled, and a delivered generated music track becomes a stored track (CRE-BR-052);
154
- * everything else is copied as stored. A rerolled Shot that shows a clip an
155
- * earlier Montage generated gets that Montage's keyframe and prompt back (`earlier` reads it), so a Shot can be made
156
- * again in any later revision.
208
+ * naming that clip, unless it is rerolled, a delivered generated keyframe becomes a stored keyframe (CRE-BR-054), a
209
+ * delivered generated music track becomes a stored track (CRE-BR-052), and a voiced Shot whose converted take was
210
+ * delivered plays it as stored audio (CRE-BR-053); everything else is copied as stored. A rerolled Shot is made again
211
+ * from its delivered keyframe, except in a keyframes-only Montage, where the keyframe is what is made again. A rerolled
212
+ * Shot that shows a clip an earlier Montage generated gets that Montage's keyframe and prompt back (`earlier` reads it),
213
+ * so a Shot can be made again in any later revision.
157
214
  */
158
215
  export declare const reviseCutSheet: (detail: GenerationDetail, reroll: string[], earlier: (generationId: string) => Promise<GenerationDetail>) => Promise<{
216
+ voices?: {
217
+ reused: string[];
218
+ converting: string[];
219
+ } | undefined;
159
220
  music?: "reused" | "generating" | undefined;
221
+ keyframes?: {
222
+ reused: string[];
223
+ generating: string[];
224
+ } | undefined;
160
225
  cutSheet: Json;
161
226
  reused: string[];
162
227
  generating: string[];
@@ -1,5 +1,5 @@
1
1
  /**
2
- * `fgrove creatives montage …` helpers (CRE-BR-045 to CRE-BR-048): the local cut sheet's conveniences, the storyboard
2
+ * `fgrove creatives montage …` helpers (CRE-BR-045 to CRE-BR-054): the local cut sheet's conveniences, the storyboard
3
3
  * of a preview, the summary of a Montage Generation and the cut sheet of a follow-up Montage.
4
4
  *
5
5
  * A local cut sheet is the API's cut sheet where a stored file may also be written `{ "file": "<path>" }` (relative to
@@ -29,7 +29,16 @@ const mapMediaRefs = async (sheet, map) => {
29
29
  }
30
30
  }
31
31
  if (isObject(shot.generate) && shot.generate.keyframe !== undefined) {
32
- next.generate = { ...shot.generate, keyframe: await map(shot.generate.keyframe, `${where}.generate.keyframe`, id) };
32
+ let keyframe = await map(shot.generate.keyframe, `${where}.generate.keyframe`, id);
33
+ // CRE-BR-054: the reference images of a keyframe the image model makes.
34
+ if (isObject(keyframe) && isObject(keyframe.image) && Array.isArray(keyframe.image.refs)) {
35
+ const refs = [];
36
+ for (const [index, ref] of keyframe.image.refs.entries()) {
37
+ refs.push(await map(ref, `${where}.generate.keyframe.image.refs[${index}]`, id));
38
+ }
39
+ keyframe = { ...keyframe, image: { ...keyframe.image, refs } };
40
+ }
41
+ next.generate = { ...shot.generate, keyframe };
33
42
  }
34
43
  return next;
35
44
  };
@@ -132,7 +141,8 @@ export const storyboardHtml = (preview, title) => {
132
141
  };
133
142
  const rows = preview.variants.map((variant) => `<section><h2>${escapeHtml(variant.name)} <span>${round(variant.seconds)} s · ${variant.shots.length} shots</span></h2>`
134
143
  + `<ol class="row">${variant.shots.map((shot, index) => tile(variant.name, shot, index)).join('')}</ol></section>`).join('\n');
135
- const credits = preview.clips.reduce((sum, clip) => sum + clip.credits, 0) + (preview.music?.credits ?? 0);
144
+ const keyframes = preview.keyframes ?? [];
145
+ const credits = [...keyframes, ...preview.clips].reduce((sum, item) => sum + item.credits, 0) + (preview.music?.credits ?? 0);
136
146
  return `<!doctype html>
137
147
  <html lang="en"><head><meta charset="utf-8"><meta name="viewport" content="width=device-width,initial-scale=1">
138
148
  <title>${escapeHtml(title)} storyboard</title>
@@ -159,7 +169,7 @@ h2 span{font-size:13px;font-weight:400;margin-left:8px}
159
169
  .time{padding:2px 8px 8px;font-family:"Geist Mono",ui-monospace,SFMono-Regular,Menlo,monospace;font-variant-numeric:tabular-nums}
160
170
  </style></head>
161
171
  <body><header><h1>${escapeHtml(title)}</h1><p>${escapeHtml(preview.size)} · ${preview.fps} fps · ${escapeHtml(preview.textStyle)} · `
162
- + `${preview.clips.length} generated clip(s)${preview.music ? `, a ${preview.music.seconds} s music track` : ''}, ${credits} credits</p></header>
172
+ + `${keyframes.length > 0 ? `${keyframes.length} generated keyframe(s), ` : ''}${preview.clips.length} generated clip(s)${preview.music ? `, a ${preview.music.seconds} s music track` : ''}, ${credits} credits</p></header>
163
173
  ${rows}
164
174
  </body></html>
165
175
  `;
@@ -192,7 +202,7 @@ const recipeOf = (detail) => {
192
202
  };
193
203
  const urlOf = (output) => output.files[0]?.url ?? output.raw_url;
194
204
  const delivered = (output) => output?.status === 'succeeded' && Boolean(urlOf(output));
195
- /** The variants' videos in order, the generated clips with their Shots and the generated music track. */
205
+ /** The variants' videos in order, the generated keyframes and clips with their Shots and the generated music track. */
196
206
  export const montageOutputs = (detail) => {
197
207
  const recipe = recipeOf(detail);
198
208
  const videos = detail.outputs.filter((output) => output.role === 'video')
@@ -200,15 +210,18 @@ export const montageOutputs = (detail) => {
200
210
  return {
201
211
  recipe,
202
212
  variants: recipe.variants.map((variant, index) => ({ ...variant, output: videos[index] })),
213
+ keyframes: (recipe.keyframes ?? []).map((keyframe, index) => ({ ...keyframe, output: detail.outputs.find((output) => output.role === 'keyframe' && output.scene_index === index) })),
203
214
  clips: recipe.clips.map((clip, index) => ({ ...clip, output: detail.outputs.find((output) => output.role === 'clip' && output.scene_index === index) })),
204
215
  music: recipe.music ? { ...recipe.music, output: detail.outputs.find((output) => output.role === 'music') } : null,
216
+ voices: (recipe.voices ?? []).flatMap((voice) => voice.conversions.map((conversion) => ({ voice: voice.name, ...conversion })))
217
+ .map((conversion, index) => ({ ...conversion, output: detail.outputs.find((output) => output.role === 'voiceover' && output.scene_index === index) })),
205
218
  };
206
219
  };
207
220
  /** `music.mp3` or `music.wav`, after the stored track. */
208
221
  const musicFileName = (output) => `music.${/\.wav(\?|$)/.test(urlOf(output) ?? '') ? 'wav' : 'mp3'}`;
209
- /** The `montage` part of `montage show`: each variant's video and each generated clip, with their outputs. */
222
+ /** The `montage` part of `montage show`: each variant's video and each generated keyframe and clip, with their outputs. */
210
223
  export const summarizeMontage = (detail) => {
211
- const { variants, clips, music } = montageOutputs(detail);
224
+ const { recipe, variants, keyframes, clips, music, voices } = montageOutputs(detail);
212
225
  const videoIds = variants.flatMap(({ output }) => (delivered(output) ? [output.id] : []));
213
226
  return {
214
227
  variants: variants.map(({ name, seconds, output }) => ({
@@ -218,20 +231,30 @@ export const summarizeMontage = (detail) => {
218
231
  heard: output?.words?.words.map((word) => word.text).join(' ') ?? '',
219
232
  findings: (output?.qa.softFindings ?? []).map((finding) => finding.message),
220
233
  })),
221
- clips: clips.map(({ shotId, seconds, model, resolution, output }) => ({
234
+ ...(keyframes.length > 0 ? { keyframes: keyframes.map(({ shotId, model, output }) => ({ shotId, model, outputId: output?.id ?? null, status: output?.status ?? null,
235
+ url: output ? urlOf(output) : null, error: output?.error?.message ?? null })) } : {}),
236
+ // CRE-BR-054: the command that writes the cut sheet of the full Montage, which reuses the delivered keyframes for free.
237
+ ...(recipe.keyframesOnly ? { keyframesOnly: true, revising: `fgrove creatives montage revise ${detail.generation.id}` } : {}),
238
+ clips: recipe.keyframesOnly ? [] : clips.map(({ shotId, seconds, model, resolution, output }) => ({
222
239
  shotId, seconds, model, resolution, outputId: output?.id ?? null, status: output?.status ?? null, url: output ? urlOf(output) : null,
223
240
  error: output?.error?.message ?? null,
224
241
  ...(output?.words ? { heard: output.words.words.map((word) => word.text).join(' '), words: output.words.words.map(({ text, start, end }) => [text, start, end]) } : {}),
225
242
  })),
226
243
  ...(music ? { music: { seconds: music.seconds, outputId: music.output?.id ?? null, status: music.output?.status ?? null,
227
244
  url: music.output ? urlOf(music.output) : null, error: music.output?.error?.message ?? null } } : {}),
245
+ ...(voices.length > 0 ? { voices: voices.map(({ voice, shots, seconds, output }) => ({ voice, shots, seconds, outputId: output?.id ?? null,
246
+ status: output?.status ?? null, url: output ? urlOf(output) : null, error: output?.error?.message ?? null })) } : {}),
228
247
  ...(videoIds.length > 0 ? { approving: `fgrove creatives generations approve ${videoIds.join(' ')}` } : {}),
229
248
  };
230
249
  };
231
- /** Saves every delivered variant video as `<variant>.mp4`, every delivered clip as `clip-<shot>.mp4` and a generated track as `music.mp3`. */
250
+ /**
251
+ * Saves every delivered variant video as `<variant>.mp4`, every delivered keyframe as `keyframe-<shot>.png`, every
252
+ * delivered clip as `clip-<shot>.mp4` and a generated track as `music.mp3`.
253
+ */
232
254
  export const downloadMontage = async (detail, dir, fetchFn = fetch) => {
233
- const { variants, clips, music } = montageOutputs(detail);
255
+ const { variants, keyframes, clips, music } = montageOutputs(detail);
234
256
  const files = [
257
+ ...keyframes.flatMap(({ shotId, output }) => (delivered(output) ? [{ url: urlOf(output), file: path.join(dir, `keyframe-${shotId}.png`) }] : [])),
235
258
  ...variants.flatMap(({ name, output }) => (delivered(output) ? [{ url: urlOf(output), file: path.join(dir, `${name}.mp4`) }] : [])),
236
259
  ...clips.flatMap(({ shotId, output }) => (delivered(output) ? [{ url: urlOf(output), file: path.join(dir, `clip-${shotId}.mp4`) }] : [])),
237
260
  ...(delivered(music?.output) ? [{ url: urlOf(music.output), file: path.join(dir, musicFileName(music.output)) }] : []),
@@ -252,35 +275,56 @@ const shotsOf = (sheet) => [
252
275
  ...(Array.isArray(sheet.variants) ? sheet.variants : [])
253
276
  .flatMap((variant) => (isObject(variant) && isObject(variant.replace) ? Object.values(variant.replace).flat() : [])),
254
277
  ].filter(isObject);
278
+ /**
279
+ * A ref to the keyframe a Montage delivered for a Shot (CRE-BR-054), following `{ shot }` keyframes to the Shot that
280
+ * made it; undefined when none was delivered.
281
+ */
282
+ const keyframeRef = (detail, shotId) => {
283
+ const { recipe, keyframes } = montageOutputs(detail);
284
+ const shots = shotsOf(recipe.cutSheet);
285
+ let id = shotId;
286
+ for (const seen = new Set(); !seen.has(id); seen.add(id)) {
287
+ const keyframe = shots.find((shot) => shot.id === id)?.generate?.keyframe;
288
+ if (!isObject(keyframe) || typeof keyframe.shot !== 'string' || keyframe.generation !== undefined) {
289
+ break;
290
+ }
291
+ id = keyframe.shot;
292
+ }
293
+ return delivered(keyframes.find((keyframe) => keyframe.shotId === id)?.output) ? { generation: detail.generation.id, shot: id, keyframe: true } : undefined;
294
+ };
255
295
  /**
256
296
  * The cut sheet of a follow-up Montage (CRE-BR-045): each `generate` Shot whose clip was delivered becomes a `clip`
257
- * naming that clip, unless it is rerolled, and a delivered generated music track becomes a stored track (CRE-BR-052);
258
- * everything else is copied as stored. A rerolled Shot that shows a clip an
259
- * earlier Montage generated gets that Montage's keyframe and prompt back (`earlier` reads it), so a Shot can be made
260
- * again in any later revision.
297
+ * naming that clip, unless it is rerolled, a delivered generated keyframe becomes a stored keyframe (CRE-BR-054), a
298
+ * delivered generated music track becomes a stored track (CRE-BR-052), and a voiced Shot whose converted take was
299
+ * delivered plays it as stored audio (CRE-BR-053); everything else is copied as stored. A rerolled Shot is made again
300
+ * from its delivered keyframe, except in a keyframes-only Montage, where the keyframe is what is made again. A rerolled
301
+ * Shot that shows a clip an earlier Montage generated gets that Montage's keyframe and prompt back (`earlier` reads it),
302
+ * so a Shot can be made again in any later revision.
261
303
  */
262
304
  export const reviseCutSheet = async (detail, reroll, earlier) => {
263
- const { recipe, clips, music } = montageOutputs(detail);
305
+ const { recipe, clips, music, voices, keyframes } = montageOutputs(detail);
264
306
  const generated = new Set(recipe.clips.map((clip) => clip.shotId));
265
307
  const sheet = recipe.cutSheet;
266
308
  const restored = new Map();
267
309
  const unknown = [];
268
310
  for (const id of reroll.filter((shotId) => !generated.has(shotId))) {
269
311
  const ref = shotsOf(sheet).find((shot) => shot.id === id)?.clip;
270
- const source = isObject(ref) && typeof ref.generation === 'string'
271
- ? shotsOf(recipeOf(await earlier(ref.generation)).cutSheet).find((shot) => shot.id === ref.shot)?.generate
272
- : undefined;
312
+ const before = isObject(ref) && typeof ref.generation === 'string' ? await earlier(ref.generation) : undefined;
313
+ const shotId = isObject(ref) ? ref.shot : '';
314
+ const source = before ? shotsOf(recipeOf(before).cutSheet).find((shot) => shot.id === shotId)?.generate : undefined;
315
+ // The earlier Montage's generated keyframe comes back as the keyframe it delivered (CRE-BR-054).
273
316
  if (source === undefined) {
274
317
  unknown.push(id);
275
318
  }
276
319
  else {
277
- restored.set(id, source);
320
+ restored.set(id, { ...source, keyframe: keyframeRef(before, shotId) ?? source.keyframe });
278
321
  }
279
322
  }
280
323
  if (unknown.length > 0) {
281
324
  throw new Error(`--reroll ${unknown.join(', ')}: not a generated Shot of this Montage (${[...generated].join(', ') || 'none'})`);
282
325
  }
283
326
  const reuse = new Set(clips.filter(({ shotId, output }) => delivered(output) && !reroll.includes(shotId)).map(({ shotId }) => shotId));
327
+ const keptKeyframes = new Set(keyframes.filter(({ shotId, output }) => delivered(output) && !(recipe.keyframesOnly && reroll.includes(shotId))).map(({ shotId }) => shotId));
284
328
  const generating = [];
285
329
  const reviseShot = (shot) => {
286
330
  if (!isObject(shot)) {
@@ -297,7 +341,9 @@ export const reviseCutSheet = async (detail, reroll, earlier) => {
297
341
  }
298
342
  if (!reuse.has(id)) {
299
343
  generating.push(id);
300
- return shot;
344
+ const generate = shot.generate;
345
+ return keptKeyframes.has(id) && isObject(generate.keyframe) && generate.keyframe.image !== undefined
346
+ ? { ...shot, generate: { ...generate, keyframe: { generation: detail.generation.id, shot: id, keyframe: true } } } : shot;
301
347
  }
302
348
  const { generate: _generate, ...rest } = shot;
303
349
  return { ...rest, clip: { generation: detail.generation.id, shot: id } };
@@ -317,5 +363,34 @@ export const reviseCutSheet = async (detail, reroll, earlier) => {
317
363
  const { generate: _generate, ...rest } = sheet.music;
318
364
  cutSheet.music = { ...rest, track: { generation: detail.generation.id, music: true } };
319
365
  }
320
- return { cutSheet, reused: [...reuse], generating, ...(generatedMusic ? { music: delivered(music?.output) ? 'reused' : 'generating' } : {}) };
366
+ // A converted take is reused while the take it was made from is: a take made again is converted again.
367
+ const takeOf = (shot) => (shot.sound === true ? (isObject(shot.reuse) ? shot.reuse.shot : shot.id) : isObject(shot.sound) ? shot.sound.shot : undefined);
368
+ const byId = new Map(shotsOf(sheet).map((shot) => [shot.id, shot]));
369
+ const voiced = new Set(voices.filter(({ output }) => delivered(output)).flatMap(({ shots }) => shots)
370
+ .filter((id) => !generating.includes(takeOf(byId.get(id) ?? {}) ?? id)));
371
+ const playConverted = (shot) => {
372
+ if (!isObject(shot) || !voiced.has(shot.id)) {
373
+ return shot;
374
+ }
375
+ const from = shot.sound === true ? shot.from ?? 0 : shot.sound.from;
376
+ return { ...shot, sound: { audio: { generation: detail.generation.id, shot: shot.id, voice: true }, from } };
377
+ };
378
+ cutSheet.shots = cutSheet.shots.map(playConverted);
379
+ if (Array.isArray(cutSheet.variants)) {
380
+ cutSheet.variants = cutSheet.variants.map((variant) => (isObject(variant) && isObject(variant.replace)
381
+ ? { ...variant, replace: Object.fromEntries(Object.entries(variant.replace).map(([id, shots]) => [id, shots.map(playConverted)])) }
382
+ : variant));
383
+ }
384
+ const sheetVoices = (Array.isArray(sheet.voices) ? sheet.voices : []).filter(isObject);
385
+ if (sheetVoices.length > 0) {
386
+ cutSheet.voices = sheetVoices.map((voice) => ({ ...voice, shots: voice.shots.filter((id) => !voiced.has(id)) }))
387
+ .filter((voice) => voice.shots.length > 0);
388
+ }
389
+ return {
390
+ cutSheet, reused: [...reuse], generating,
391
+ ...(keyframes.length > 0 ? { keyframes: { reused: keyframes.filter(({ shotId }) => keptKeyframes.has(shotId) && generating.includes(shotId)).map(({ shotId }) => shotId),
392
+ generating: keyframes.filter(({ shotId }) => !keptKeyframes.has(shotId) && generating.includes(shotId)).map(({ shotId }) => shotId) } } : {}),
393
+ ...(generatedMusic ? { music: delivered(music?.output) ? 'reused' : 'generating' } : {}),
394
+ ...(sheetVoices.length > 0 ? { voices: { reused: [...voiced], converting: sheetVoices.flatMap((voice) => voice.shots).filter((id) => !voiced.has(id)) } } : {}),
395
+ };
321
396
  };
@@ -5,10 +5,10 @@
5
5
  * Plain text: an agent reads it from a terminal.
6
6
  */
7
7
  export declare const MONTAGE_GUIDE_TOPICS: {
8
- readonly 'cut-sheet': "\nTHE CUT SHEET\n\nOne JSON object. The API's error names the Shot and the rule when a sheet is wrong.\n\nTOP LEVEL\n\n size \"1080x1920\" (default), \"1080x1350\", \"1080x1080\" or \"1920x1080\"\n fps 24, 25 or 30 (default 30); 24 when most Shots are generated\n subtitles true draws every Shot's \"say\" as subtitles (default false)\n language two letters, the language of the lines (default \"en\"); used to recognize them\n disclaimer the small line at the bottom of every Shot\n textStyle \"plate-light\" (default: black words on a white plate) or \"plate-dark\"\n music { \"track\": <file>, \"from\": <seconds>, \"volume\": 0 to 1 }; fades out over the last 0.6 s. In place of\n \"track\", \"generate\": { \"prompt\", \"seconds\"? } has the music model make it: 10 to 120 whole seconds, by\n default the longest variant rounded up; 30 credits per started minute, made once for every variant\n shots the body in order: up to 80 Shots, 120 s, 40 generated clips\n variants up to 5; without any, one video\n\nA SHOT\n\n id lower-case letters, digits and hyphens\n seconds 0.5 to 15: how long the Shot lasts in the cut\n\nand exactly one picture:\n\n \"clip\": <file> a stored video, shown from \"from\" seconds\n \"generate\": { \"keyframe\": <file>, \"prompt\", \"seconds\"?, \"model\"?, \"resolution\"? }\n a clip made from your keyframe, 4 to 15 whole seconds, shown from \"from\"\n \"still\": <file> an image held for the Shot\n \"freeze\": { \"shot\": \"<id>\", \"at\": <s> } one frame of that Shot's video\n \"reuse\": { \"shot\": \"<id>\" } that Shot's video again, from this Shot's own \"from\"\n\nand any of:\n\n sound true: the Shot plays its own clip's sound. { \"shot\": \"<id>\", \"from\": <seconds> }: it plays another Shot's\n clip from that moment (a cutaway under a voice). Without \"sound\" a Shot is silent.\n say the line spoken during the Shot, up to 240 characters; a line break starts a new subtitle. It is drawn as\n subtitles and compared with what is heard. On a silent Shot it is a caption.\n text a plate of words in the upper half, up to 120 characters (\"\\n\" breaks a line)\n checklist up to 4 checked rows instead of the plate's words\n footer a small line near the bottom\n zoom 1 to 4: the picture enlarged; \"focus\": { \"x\": 0 to 1, \"y\": 0 to 1 } is the point kept in the middle\n clean true: nothing is drawn over the Shot, not even the disclaimer (a reused end card)\n\nA <file> is one of:\n\n { \"file\": \"clips/a.mp4\" } a local file, relative to the cut sheet; uploaded once\n { \"variation\": \"BND_vd001_01_H1\" } a Variation's video (\"size\" picks one)\n { \"generation\": \"<id>\", \"shot\": \"<id>\" } a clip an earlier Montage generated; \"montage revise\" writes these\n { \"generation\": \"<id>\", \"music\": true } the music track an earlier Montage generated; \"revise\" writes it\n\nA VARIANT\n\n { \"name\": \"H2\",\n \"replace\": { \"<shot id>\": [ <Shot>, ... ] }, other Shots in the place of one; an empty list leaves it out\n \"text\": { \"<shot id>\": \"words\" }, a plate on a Shot of the body\n \"post\": { \"shots\": [\"<shot id>\", ...], \"name\", \"handle\", \"text\", \"meta\"?, \"stats\"? } }\n these Shots are shown inside a social post: author, words, the\n picture in a window, subtitles inside it\n\nSOUND\n\nA clip that carries a line is cleaned of the background of its take (a denoiser takes about 20 dB off rain, traffic and\nroom noise; other people's voices stay) and set to the same level as every other; the lines are evened out, the music\nsits under them and dips while a line is spoken, and the finished video is set to -14 LUFS. A clip without any line\n(rain, a car) stays quiet, and a Shot that sounds without a line fades in and out over 0.15 s; cut from a clip that\ncarries lines, it plays at that clip's level. Sound asked from past the end of its clip is an error that names the\nShot.\n\nAN EXAMPLE\n\n {\n \"size\": \"1080x1920\", \"fps\": 24, \"subtitles\": true,\n \"disclaimer\": \"Illustrative. Individual results may vary. AI-generated.\",\n \"music\": { \"track\": { \"file\": \"music.mp3\" } },\n \"shots\": [\n { \"id\": \"door\", \"seconds\": 3.5, \"from\": 0.9, \"clip\": { \"generation\": \"<id>\", \"shot\": \"door\" }, \"sound\": true,\n \"say\": \"You said we were going!\" },\n { \"id\": \"mentor\", \"seconds\": 2.75, \"from\": 0.5, \"clip\": { \"generation\": \"<id>\", \"shot\": \"mentor\" }, \"sound\": true,\n \"say\": \"You think he was always this calm?\" },\n { \"id\": \"listens\", \"seconds\": 2.875, \"from\": 0.3, \"clip\": { \"generation\": \"<id>\", \"shot\": \"listens\" },\n \"sound\": { \"shot\": \"mentor\", \"from\": 3.25 }, \"say\": \"We play these little games every day.\\nFive minutes.\" },\n { \"id\": \"mentor-2\", \"seconds\": 2.5, \"from\": 6.125, \"reuse\": { \"shot\": \"mentor\" }, \"sound\": true,\n \"say\": \"The rules keep changing, that's the point.\" },\n { \"id\": \"day1\", \"seconds\": 4.375, \"clip\": { \"generation\": \"<id>\", \"shot\": \"day1\" }, \"sound\": true, \"text\": \"DAY 1\",\n \"say\": \"Now red means go!\\nThat's not fair!\" },\n { \"id\": \"cards\", \"seconds\": 7, \"from\": 73.8, \"clip\": { \"variation\": \"BND_vd001_01_H1\" }, \"clean\": true }\n ],\n \"variants\": [\n { \"name\": \"H1\" },\n { \"name\": \"H2\", \"post\": { \"shots\": [\"door\"], \"name\": \"Emma Clarke\", \"handle\": \"@emmaclarke\", \"text\": \"WHY DOES MY KID FALL APART EVERY TIME PLANS CHANGE?\" } },\n { \"name\": \"H3\", \"text\": { \"door\": \"HE'S NOT STUBBORN. HIS BRAIN CAN'T SWITCH GEARS \\u2014 YET.\" } }\n ]\n }\n";
8
+ readonly 'cut-sheet': "\nTHE CUT SHEET\n\nOne JSON object. The API's error names the Shot and the rule when a sheet is wrong.\n\nTOP LEVEL\n\n size \"1080x1920\" (default), \"1080x1350\", \"1080x1080\" or \"1920x1080\"\n fps 24, 25 or 30 (default 30); 24 when most Shots are generated\n subtitles true draws every Shot's \"say\" as subtitles (default false)\n language two letters, the language of the lines (default \"en\"); used to recognize them\n disclaimer the small line at the bottom of every Shot\n textStyle \"plate-light\" (default: black words on a white plate) or \"plate-dark\"\n music { \"track\": <file>, \"from\": <seconds>, \"volume\": 0 to 1 }; fades out over the last 0.6 s. In place of\n \"track\", \"generate\": { \"prompt\", \"seconds\"? } has the music model make it: 10 to 120 whole seconds, by\n default the longest variant rounded up; 30 credits per started minute, made once for every variant\n shots the body in order: up to 80 Shots, 120 s, 40 generated clips\n variants up to 5; without any, one video\n voices up to 10 of { \"name\", \"sample\": { \"shot\": \"<id>\" } or { \"clip\": <file> }, \"shots\": [\"<id>\", ...] }: the\n speech of those Shots in the voice of the sample; each Shot sounds from a clip, generate or reuse take\n and is in one voice; 24 credits per started minute of every converted take together\n\nA SHOT\n\n id lower-case letters, digits and hyphens\n seconds 0.5 to 15: how long the Shot lasts in the cut\n\nand exactly one picture:\n\n \"clip\": <file> a stored video, shown from \"from\" seconds\n \"generate\": { \"keyframe\": <keyframe>, \"prompt\", \"seconds\"?, \"model\"?, \"resolution\"? }\n a clip made from the keyframe, 4 to 15 whole seconds, shown from \"from\"\n \"still\": <file> an image held for the Shot\n \"freeze\": { \"shot\": \"<id>\", \"at\": <s> } one frame of that Shot's video\n \"reuse\": { \"shot\": \"<id>\" } that Shot's video again, from this Shot's own \"from\"\n\nand any of:\n\n sound true: the Shot plays its own clip's sound. { \"shot\": \"<id>\", \"from\": <seconds> }: it plays another Shot's\n clip from that moment (a cutaway under a voice). { \"audio\": <file>, \"from\"?: <seconds> }: a stored audio\n file from that moment. Without \"sound\" a Shot is silent.\n say the line spoken during the Shot, up to 240 characters; a line break starts a new subtitle. It is drawn as\n subtitles and compared with what is heard. On a silent Shot it is a caption.\n text a plate of words in the upper half, up to 120 characters (\"\\n\" breaks a line)\n checklist up to 4 checked rows instead of the plate's words\n footer a small line near the bottom\n zoom 1 to 4: the picture enlarged; \"focus\": { \"x\": 0 to 1, \"y\": 0 to 1 } is the point kept in the middle\n clean true: nothing is drawn over the Shot, not even the disclaimer (a reused end card)\n\nA <file> is one of:\n\n { \"file\": \"clips/a.mp4\" } a local file, relative to the cut sheet; uploaded once\n { \"variation\": \"BND_vd001_01_H1\" } a Variation's video (\"size\" picks one)\n { \"generation\": \"<id>\", \"shot\": \"<id>\" } a clip an earlier Montage generated; \"montage revise\" writes these\n { \"generation\": \"<id>\", \"music\": true } the music track an earlier Montage generated; \"revise\" writes it\n { \"generation\": \"<id>\", \"shot\": \"<id>\", \"voice\": true }\n a Shot's take an earlier Montage converted to a voice, as \"audio\"\n { \"generation\": \"<id>\", \"shot\": \"<id>\", \"keyframe\": true }\n a keyframe an earlier Montage made, such as a keyframes-only one;\n \"revise\" writes these\n\nA <keyframe> is one of:\n\n <file> a stored image (png, jpg or webp)\n { \"image\": { \"prompt\", \"refs\"?, \"model\"? } }\n made by the image model before every clip, once for every Shot that\n names it: \"refs\" up to 6, each a <file> (a cast photo, a reference frame\n of a place) or { \"shot\": \"<id>\" } (that Shot's keyframe, made first);\n \"model\" \"nano-banana-2.1\" (default, 2K, 11 credits) or \"gpt-image-2\"\n (high quality, 43 credits). A failed keyframe costs nothing and fails\n what starts from it with \"keyframe_failed\"\n { \"shot\": \"<id>\" } that Shot's keyframe again\n\nA VARIANT\n\n { \"name\": \"H2\",\n \"replace\": { \"<shot id>\": [ <Shot>, ... ] }, other Shots in the place of one; an empty list leaves it out\n \"text\": { \"<shot id>\": \"words\" }, a plate on a Shot of the body\n \"post\": { \"shots\": [\"<shot id>\", ...], \"name\", \"handle\", \"text\", \"meta\"?, \"stats\"? } }\n these Shots are shown inside a social post: author, words, the\n picture in a window, subtitles inside it\n\nSOUND\n\nA clip that carries a line is cleaned of the background of its take (a denoiser takes about 20 dB off rain, traffic and\nroom noise; other people's voices stay) and set to the same level as every other; the lines are evened out, the music\nsits under them and dips while a line is spoken, and the finished video is set to -14 LUFS. A clip without any line\n(rain, a car) stays quiet, and a Shot that sounds without a line fades in and out over 0.15 s; cut from a clip that\ncarries lines, it plays at that clip's level. Sound asked from past the end of its clip is an error that names the\nShot.\n\nAN EXAMPLE\n\n {\n \"size\": \"1080x1920\", \"fps\": 24, \"subtitles\": true,\n \"disclaimer\": \"Illustrative. Individual results may vary. AI-generated.\",\n \"music\": { \"track\": { \"file\": \"music.mp3\" } },\n \"shots\": [\n { \"id\": \"door\", \"seconds\": 3.5, \"from\": 0.9, \"clip\": { \"generation\": \"<id>\", \"shot\": \"door\" }, \"sound\": true,\n \"say\": \"You said we were going!\" },\n { \"id\": \"mentor\", \"seconds\": 2.75, \"from\": 0.5, \"clip\": { \"generation\": \"<id>\", \"shot\": \"mentor\" }, \"sound\": true,\n \"say\": \"You think he was always this calm?\" },\n { \"id\": \"listens\", \"seconds\": 2.875, \"from\": 0.3, \"clip\": { \"generation\": \"<id>\", \"shot\": \"listens\" },\n \"sound\": { \"shot\": \"mentor\", \"from\": 3.25 }, \"say\": \"We play these little games every day.\\nFive minutes.\" },\n { \"id\": \"mentor-2\", \"seconds\": 2.5, \"from\": 6.125, \"reuse\": { \"shot\": \"mentor\" }, \"sound\": true,\n \"say\": \"The rules keep changing, that's the point.\" },\n { \"id\": \"day1\", \"seconds\": 4.375, \"clip\": { \"generation\": \"<id>\", \"shot\": \"day1\" }, \"sound\": true, \"text\": \"DAY 1\",\n \"say\": \"Now red means go!\\nThat's not fair!\" },\n { \"id\": \"cards\", \"seconds\": 7, \"from\": 73.8, \"clip\": { \"variation\": \"BND_vd001_01_H1\" }, \"clean\": true }\n ],\n \"variants\": [\n { \"name\": \"H1\" },\n { \"name\": \"H2\", \"post\": { \"shots\": [\"door\"], \"name\": \"Emma Clarke\", \"handle\": \"@emmaclarke\", \"text\": \"WHY DOES MY KID FALL APART EVERY TIME PLANS CHANGE?\" } },\n { \"name\": \"H3\", \"text\": { \"door\": \"HE'S NOT STUBBORN. HIS BRAIN CAN'T SWITCH GEARS \\u2014 YET.\" } }\n ]\n }\n";
9
9
  readonly takes: "\nTHE PROMPT OF A TAKE\n\nA take is one generated clip, 4 to 15 s, in which people do and say what the prompt tells them. Write it in this\norder; the example below is one prompt.\n\n1. One shot. Start with: \"Continuous, unbroken shot, static camera, no scene cuts, no zoom.\" Without it Gemini cuts\n between several shots of its own.\n2. Who and where, in one sentence, in the words of the keyframe.\n3. What happens, with times in square brackets. Put each line in double quotes after the person who says it, with the\n manner (\"quietly\", \"tired but trying to sound upbeat\"). Leave half a second before the first line and after the last.\n [0-1s] She looks down. [1-3.5s] She looks up at her friend and says quietly: \"The wedding's in four weeks.\"\n4. Who stays silent: \"The friend does not speak and keeps her mouth closed.\" A take without a line says \"No dialogue:\n nobody speaks.\" Otherwise the model gives everyone in the frame something to say.\n5. A line from outside the frame: \"From behind the camera his mother says gently: ...\". The person in the frame only\n listens.\n6. The voice of each speaker, the same words in every take of that person: the age, the kind of voice, the accent,\n and for a child what it is not.\n \"Mike, the father, speaks in a low, calm man's baritone with an American accent.\"\n \"Noah is a small boy of seven and sounds it: a high, thin, slightly hoarse little-boy voice with an American\n accent. It is never a woman's voice and never a teenager's.\"\n The manner of a line moves the voice. A child's line said \"calmly\" or \"quietly\" comes out in a grown woman's voice;\n \"small and bright, with a little smile\" keeps the child. The model has no reliable old voice: give a line to someone\n it voices well (a young woman rather than a grandmother), or plan several rerolls.\n7. Sound, for a take with a line: \"Sound design: the voice alone, recorded close and dry as in a studio: no rain, no\n engine, no room tone, no crowd, no other sound under it.\" Every take brings its own background otherwise, and the\n cut steps from one to the next at every line. Rain, a car or a playground belong to a take without a line\n (\"Sound design: rain on the glass\"). Then: \"No background music.\" The cut brings its own music.\n8. End with: \"No captions, no subtitles, no on-screen text.\"\n\nLines: 15 words or fewer a sentence; a take of 15 s holds about four sentences with pauses. A name is spelled as it\nsounds. One action per sentence, in order. Name what must stay as it is (\"We never see the phone's screen\").\n\nAn example of a whole prompt:\n\n Continuous, unbroken shot, static camera with a very slight handheld sway, no scene cuts, no zoom. A man talks to\n his wife, who is off camera, late at night in their kitchen. [0-3.5s] He says in a low, tired, worried voice: \"We\n can't change a single thing without a meltdown.\" [3.5-5s] He pauses and shakes his head slightly. [5-7.5s] He says:\n \"Kate's wedding is in four weeks.\" [7.5-8s] He presses his lips together and looks down. His lips move naturally\n with the words. Mike, the father, speaks in a low, calm man's baritone with an American accent. Sound design: the\n voice alone, recorded close and dry as in a studio: no room tone, no other sound under it. No background music. No\n captions, no subtitles, no on-screen text.\n\nA cutaway is a take of 4 s of the listener: what they do while they listen (lower the eyes, lean in, read a phone,\nstart to smile) and \"No dialogue: nobody speaks, her mouth stays closed.\"\n";
10
10
  readonly bloopers: "\nTHE BLOOPER LIST\n\nReroll the clip or cut again when any of these shows. Look at consecutive frames: fast motion hides a mistake in one\nframe and shows it in the next.\n\nIn a clip\n\n- Hands and limbs: a sixth finger, fused fingers, a limb that bends wrong, an arm that belongs to nobody, a foot that\n slides.\n- A changed person: another face, age, hair or outfit than the keyframe or the other Shots of the scene; someone who\n was not there. A wide laugh ages a face: ask for a soft smile.\n- Objects that morph, double or vanish: a ball, a cup, a phone, a seat belt.\n- A screen: any interface the model drew. A phone's screen stays turned away; a product screen is a recording.\n- Stray text: letters, logos or watermarks.\n- A mouth without a voice, a voice without a mouth: someone whose lips form words in a clip where they have no line,\n or the speaker in frame with closed lips while the line is heard.\n- The wrong voice: a man's line in a woman's voice, a child's in an adult's, a grandmother's in a young woman's, an\n accent the others do not have. \"heard\" cannot show it and pitch alone cannot either (a child's calm line at 290 Hz\n was a woman's voice to every listener): it takes listening (\"fgrove creatives montage guide listening\").\n- One character, two voices: the same person in another take sounds like someone else.\n- Cuts inside the clip: the model changed the shot. The prompt must start with \"Continuous, unbroken shot\".\n- Music or a voice-over the model added.\n\nIn the finished video\n\n- A line cut off: a word that starts before its Shot or ends after it. Move \"from\" or lengthen the Shot.\n- A breath or a laugh cut off by the end of its Shot.\n- The background steps at a cut: rain or traffic under one line, silence under the next. The take was not asked for a\n dry voice, or a Shot without a line plays its clip's air between clean lines.\n- A subtitle over a face, a subtitle that differs from the line by a letter, a subtitle left on a Shot where nobody\n speaks.\n- A plate over a face, or words that say what the picture under them contradicts.\n- A jump cut: two Shots with the same framing in a row.\n- A one-frame flash at a cut: the last frame of a Shot belongs to another moment.\n- A place that changes inside a scene: another door, other seats, the people on other sides.\n- Leftovers of the source: burned-in captions, a timer, another ad's graphics in reused footage.\n- A prop that argues with the story: a tablet in the background of an ad about less screen time.\n";
11
- readonly listening: "\nLISTENING WHEN YOU CANNOT HEAR\n\nYou read frames and words; you do not hear. \"heard\" gives the words of every clip, a meter gives a level, and neither\ntells whose voice a line is in, how old it sounds, or whether the background jumps at a cut. Someone or something that\nhears has to listen. Choose what you have.\n\nWHAT TO PREPARE\n\nOne sound file per line, cut from the take by the line's own times, and the finished video:\n\n ffmpeg -ss <from> -t <seconds> -i takes/clip-<shot>.mp4 -vn -ac 1 line-<character>-<n>.wav\n\nTHE PERSON YOU WORK FOR LISTENS\n\nTheir answer settles a voice. Ask in the doubt reel of check 2 (main guide, step 6): only the lines in doubt, each\nunder its question, about 20 seconds; a whole film to listen to waits for hours. These are the questions:\n\n- For each character: are these all one person? Which line is someone else, older, younger, or in another accent?\n- Does every voice fit who we see: the child a child, the grandmother old, the man a man?\n- In the finished video: does the noise behind the voices jump at a cut? Is a word, a breath or a laugh cut off? Is\n the music ever in the way of a line?\n\nA MODEL THAT HEARS LISTENS\n\nA model shortlists doubts for the reel; it does not decide them. When you can call a model that takes audio (Gemini\ndoes), ask it these three things. Ask at least two models and act\nonly on what two of them report about the same line: one model alone hears two people in a single unbroken take.\n\n1. One voice, blind. Send one line and do not say who should be speaking:\n \"One person speaks in this clip. From what you hear: sex; age group (young child, older child, teenager, young\n adult, middle-aged, older adult); accent; how sure you are of the age group.\"\n Ask it of the take, and again of the same line cut out of the finished video: what was done to the sound in\n between can change the voice.\n2. One character. Send all the lines of one character as numbered clips, in the order of the film:\n \"All these clips should be the same character: <who>. The moods differ, which is normal for one person. Group\n the clips by voice; for each clip that stands apart say how it differs and how noticeable it is; give the age\n each clip sounds.\"\n Choosing between rerolls of one line: send three or four good lines of the character as the reference, then the\n candidates, and ask which a viewer would take for the same person.\n3. The finished video, with the list of lines and the times their Shots start:\n \"Report every problem a viewer could notice, with its time and how noticeable it is: a voice that changes or\n does not fit its speaker; clicks, a word cut off, a jump in background noise between two Shots; music too loud,\n pumping, a jarring start or end; a line too quiet or too loud.\"\n A model that knows the script hears what it expects: it called a child's line an adult's twice where the blind\n question and the character question both heard a child. Believe questions 1 and 2 over question 3 for voices, and\n question 3 for the background, cut-off sounds and the music. Ask for faults and their times, never for a verdict:\n asked whether a video would pass as professional work, both models failed one that people had already accepted.\n\nWHAT DOES NOT WORK\n\n- Pitch as a measure of age, and moving the pitch of a line to fix its voice: listeners hear the processing.\n- Removing a take's background afterwards with a speech isolator: it drops a child's scream and the tail of a breath,\n and it turned a girl of ten into a grown woman (the same take, left alone, was a child to every model). Ask for a\n dry voice in the take's prompt instead (\"fgrove creatives montage guide takes\").\n";
11
+ readonly listening: "\nLISTENING WHEN YOU CANNOT HEAR\n\nYou read frames and words; you do not hear. \"heard\" gives the words of every clip, a meter gives a level, and neither\ntells whose voice a line is in, how old it sounds, or whether the background jumps at a cut. Someone or something that\nhears has to listen. Choose what you have.\n\nWHAT TO PREPARE\n\nOne sound file per line, cut from the take by the line's own times, and the finished video:\n\n ffmpeg -ss <from> -t <seconds> -i takes/clip-<shot>.mp4 -vn -ac 1 line-<character>-<n>.wav\n\nTHE PERSON YOU WORK FOR LISTENS\n\nSend them the lines of one character at a time, in the order of the film, and the finished video, with these\nquestions. It takes them about as long as the film is.\n\n- For each character: are these all one person? Which line is someone else, older, younger, or in another accent?\n- Does every voice fit who we see: the child a child, the grandmother old, the man a man?\n- In the finished video: does the noise behind the voices jump at a cut? Is a word, a breath or a laugh cut off? Is\n the music ever in the way of a line?\n\nA MODEL THAT HEARS LISTENS\n\nWhen you can call a model that takes audio (Gemini does), ask it these three things. Ask at least two models and act\nonly on what two of them report about the same line: one model alone hears two people in a single unbroken take.\n\n1. One voice, blind. Send one line and do not say who should be speaking:\n \"One person speaks in this clip. From what you hear: sex; age group (young child, older child, teenager, young\n adult, middle-aged, older adult); accent; how sure you are of the age group.\"\n Ask it of the take, and again of the same line cut out of the finished video: what was done to the sound in\n between can change the voice.\n2. One character. Send all the lines of one character as numbered clips, in the order of the film:\n \"All these clips should be the same character: <who>. The moods differ, which is normal for one person. Group\n the clips by voice; for each clip that stands apart say how it differs and how noticeable it is; give the age\n each clip sounds.\"\n Choosing between rerolls of one line: send three or four good lines of the character as the reference, then the\n candidates, and ask which a viewer would take for the same person.\n3. The finished video, with the list of lines and the times their Shots start:\n \"Report every problem a viewer could notice, with its time and how noticeable it is: a voice that changes or\n does not fit its speaker; clicks, a word cut off, a jump in background noise between two Shots; music too loud,\n pumping, a jarring start or end; a line too quiet or too loud.\"\n A model that knows the script hears what it expects: it called a child's line an adult's twice where the blind\n question and the character question both heard a child. Believe questions 1 and 2 over question 3 for voices, and\n question 3 for the background, cut-off sounds and the music. Ask for faults and their times, never for a verdict:\n asked whether a video would pass as professional work, both models failed one that people had already accepted.\n\nWHAT DOES NOT WORK\n\n- Pitch as a measure of age, and moving the pitch of a line to fix its voice: listeners hear the processing.\n- Removing a take's background afterwards with a speech isolator: it drops a child's scream and the tail of a breath,\n and it turned a girl of ten into a grown woman (the same take, left alone, was a child to every model). Ask for a\n dry voice in the take's prompt instead (\"fgrove creatives montage guide takes\").\n";
12
12
  };
13
13
  export type MontageGuideTopic = keyof typeof MONTAGE_GUIDE_TOPICS;
14
14
  /** The guide, or one of its topics; an unknown topic is an error that names the topics. */
@@ -8,9 +8,9 @@ const MAIN = `
8
8
  MAKE A VIDEO AD FROM A SCRIPT WITH THE MONTAGE FLOW
9
9
 
10
10
  A Montage cuts one video per variant from Shots that a JSON cut sheet describes. A Shot's picture is a stored video, a
11
- clip the video model makes from a keyframe you give, a still, a frozen frame or another Shot's clip. FunnelsGrove draws
12
- everything written over it: a plate of words, the subtitles of the spoken line, the disclaimer. A Shot may sound: the
13
- people in a generated clip say the lines its prompt gives them.
11
+ clip the video model makes from a keyframe (one the image model makes, or a stored image), a still, a frozen frame or
12
+ another Shot's clip. FunnelsGrove draws everything written over it: a plate of words, the subtitles of the spoken line,
13
+ the disclaimer. A Shot may sound: the people in a generated clip say the lines its prompt gives them.
14
14
 
15
15
  This is the order of work. Four topics hold the detail of a step; read each when its step comes:
16
16
 
@@ -21,27 +21,14 @@ This is the order of work. Four topics hold the detail of a step; read each when
21
21
 
22
22
  Every command prints JSON. Choose the workspace and project once with "fgrove use", or pass --project.
23
23
 
24
- THE USER'S THREE CHECKS
25
-
26
- You measure whatever has a number. The user judges what needs eyes, ears and taste, at three checks and nowhere else.
27
- A check costs them three minutes at most: send what to look at and how long it takes, questions each answered in a
28
- word, and your recommendation; then wait for the answer. A short listen by a person settled what several hundred model
29
- listens had not.
30
-
31
- 1. The board, end of step 3. Does the story read? Are these the people and the places? Which Shots to redo? Is the
32
- estimate accepted? Nothing is paid for before it.
33
- 2. The rough cut, end of step 6. The whole cut and the doubt reel (step 6). For each doubt: fine or redo. After it
34
- the Shots' lengths are frozen, and one round of fixes follows.
35
- 3. The final, step 7. One variant end to end: approve, or what to change.
36
-
37
- "Minor is fine" from the user closes a doubt: note it and do not raise it again.
38
-
39
24
  COSTS
40
25
 
41
- A generated clip costs per started 5 seconds: Gemini Omni 1.2 Flash 105 credits at 1080p (70 at 720p), Kling 4.0 236
42
- (157). A generated music track costs 30 credits per started minute of its length. An assembled video costs 1 credit
43
- per variant. Previews, uploads, stored clips and stored music are free. 100 credits are $1. A 90-second drama of 25
44
- takes is about 3 000 credits. Before anything paid:
26
+ A keyframe the image model makes costs 11 credits (Nano Banana 2.1 at 2K; 43 with GPT Image 2 at high quality). A
27
+ generated clip costs per started 5 seconds: Gemini Omni 1.2 Flash 105 credits at 1080p (70 at 720p), Kling 4.0 236
28
+ (157). A generated music track costs 30 credits per started minute of its length. Takes converted to one voice cost 24
29
+ credits per started minute of all of them together. An assembled video costs 1 credit per variant. Previews,
30
+ uploads, stored clips and stored music are free. 100 credits are $1. A 90-second drama of 25 takes is about 3 000
31
+ credits. Before anything paid:
45
32
 
46
33
  fgrove creatives credits
47
34
  fgrove creatives montage start cut.json --angle <angle> --brand <brand> --estimate
@@ -72,16 +59,23 @@ the lengths add up to the length the user asked for.
72
59
 
73
60
  2. CAST FIRST, THEN A KEYFRAME FOR EVERY TAKE AND CUTAWAY
74
61
 
75
- A generated clip starts from a keyframe: its first frame. Make keyframes with any image tool you have, at 9:16. Codex's
76
- image tool is free: codex exec --skip-git-repo-check -i cast.png -- "<prompt>"
77
- A brand's footage, ads and reference frames go only to FunnelsGrove's generation providers (Gemini, OpenAI, sume,
78
- ElevenLabs); ask the user before any other tool.
62
+ A generated clip starts from a keyframe: its first frame. FunnelsGrove's image model makes it from a prompt and up to
63
+ six reference images, at the cut sheet's size, before any clip:
79
64
 
80
- - Cast sheet. First make one image of the people standing side by side, full height, in plain light, and describe each
81
- in words you will repeat in every prompt (age, hair, build). Attach the cast sheet to every keyframe prompt and say
82
- that clothes, place and light are as the prompt says.
83
- - One place, one look. The first keyframe of a place is a reference for every other keyframe of that place: the same
84
- door, sofa, car seats, coats on the wall.
65
+ "generate": { "keyframe": { "image": { "prompt": "<the frame>", "refs": [<file> or { "shot": "<id>" }, ...] } }, ... }
66
+
67
+ Make keyframes this way only: every paid step goes through FunnelsGrove's credits. A brand's footage, ads and reference
68
+ frames go only to FunnelsGrove's generation providers (Gemini, OpenAI, sume, ElevenLabs); ask the user before any other
69
+ tool.
70
+
71
+ - Cast sheet. Describe each person in words you will repeat in every prompt (age, hair, build). The first keyframe is
72
+ the cast: the people standing side by side, full height, in plain light (a photo the user gives goes as a <file>
73
+ instead). Give it as { "shot": "<id>" } in the "refs" of every keyframe they appear in and say that clothes, place
74
+ and light are as the prompt says.
75
+ - One place, one look. The first keyframe of a place ({ "shot": "<id>" }) or a reference frame of it (a <file>) goes in
76
+ the "refs" of every other keyframe of that place: the same door, sofa, car seats, coats on the wall. A keyframe is
77
+ made after the keyframes it refers to; two keyframes never refer to each other.
78
+ - Two clips from one first frame: the second Shot's keyframe is { "shot": "<id>" } of the first; it is made once.
85
79
  - The first frame is the start of the action: lips just parted to speak, the calm before an outburst. An image model
86
80
  refuses a screaming or crying child; draw the moment before and let the clip's prompt carry the outburst.
87
81
  - Zones of a 9:16 frame. Faces between 24% and 52% of the height. Nothing that matters between 60% and 76%: subtitles
@@ -90,24 +84,41 @@ ElevenLabs); ask the user before any other tool.
90
84
  - No words and no interface in a picture. A phone's screen stays turned away from the camera. For a product screen,
91
85
  record the real product and use the recording as a stored clip.
92
86
 
93
- Done when you have opened every keyframe at full size and each shows the same people as the cast sheet, the same place
94
- as the other keyframes of its scene, hands with five fingers, and its zones free.
87
+ Done when every take and cutaway has a keyframe prompt with its references.
95
88
 
96
- 3. STORYBOARD (FREE)
89
+ 3. THE BOARD: STORYBOARD (FREE), THEN THE KEYFRAMES ALONE (CHECK 1)
97
90
 
98
- Write the cut sheet with every Shot as it will be in the finished video (the picture as a "still" of its keyframe for
99
- now) and render the words over the keyframes:
91
+ Write the cut sheet with every Shot as it will be in the finished video (a take's Shot as a "generate" with its
92
+ keyframe) and render the words for free:
100
93
 
101
94
  fgrove creatives montage preview cut.json --out storyboard
102
95
 
103
- Open storyboard/index.html: plates, the first subtitle of each line, the post of a variant. Send it to the user with
104
- the estimate for check 1, and name every place where you departed from the script.
96
+ A keyframe the image model makes does not exist yet, so its Shot shows the words without a picture. Then buy the
97
+ keyframes alone; no clip is made or charged:
98
+
99
+ fgrove creatives montage start cut.json --angle <angle> --brand <brand> --keyframes-only --wait
100
+ fgrove creatives montage show <generationId> --download board
105
101
 
106
- Done when no plate or subtitle covers a face and the user has passed check 1.
102
+ Open every board/keyframe-<shot>.png at full size. A keyframe that is wrong is made again: revise with --reroll (the
103
+ delivered ones are kept for free), edit the rerolled Shots' prompts, and start keyframes only again.
104
+
105
+ fgrove creatives montage revise <generationId> --reroll <shot> [<shot> ...] --out cut.json
106
+
107
+ Check 1: send the user the keyframes and the storyboard, name every place where you departed from the script, and wait
108
+ for their approval before step 4: it is the last point before clips are paid. Then
109
+
110
+ fgrove creatives montage revise <generationId> --out board.json
111
+
112
+ writes the cut sheet in which every delivered keyframe is stored ({ "generation", "shot", "keyframe": true }): step 4
113
+ starts from it and pays for no keyframe again.
114
+
115
+ Done when each keyframe shows the same people as the cast, the same place as the other keyframes of its scene, hands
116
+ with five fingers and its zones free, no plate or subtitle covers a face, and the user approved the board.
107
117
 
108
118
  4. FIRST CUT: BUY THE TAKES
109
119
 
110
- Write a second cut sheet with one "generate" Shot per take and per cutaway. Each Shot shows its whole clip ("seconds"
120
+ From board.json write a second cut sheet with one "generate" Shot per take and per cutaway, each from its approved
121
+ keyframe. Each Shot shows its whole clip ("seconds"
111
122
  equal to the clip's length), has "sound": true and carries its lines in "say". This cut is long and rough on purpose:
112
123
  it buys the clips and brings back what each one says, word by word.
113
124
 
@@ -142,8 +153,6 @@ kling-4.
142
153
  - Reroll what fails; everything delivered is reused at no cost:
143
154
  fgrove creatives montage revise <generationId> --reroll <shot> [<shot> ...] --out takes-2.json
144
155
  Edit the rerolled Shots' prompts in takes-2.json and start it like the first cut.
145
- - Two rerolls per Shot at most. After that, restage it: the line from off screen over the listener, a cutaway, the
146
- Shot split in two, or the sound of an accepted take under the new picture.
147
156
 
148
157
  Done when every take says its lines exactly and passes the blooper list frame by frame, and every character's lines
149
158
  have been listened to as one voice.
@@ -152,8 +161,8 @@ have been listened to as one voice.
152
161
 
153
162
  fgrove creatives montage revise <generationId> --out cut.json
154
163
 
155
- writes a cut sheet in which every delivered clip, and a generated music track, is a stored file. Turn it into the
156
- finished video ("guide cut-sheet" has every field):
164
+ writes a cut sheet in which every delivered clip, a generated music track and a converted take is a stored file. Turn
165
+ it into the finished video ("guide cut-sheet" has every field):
157
166
 
158
167
  - A Shot per line. Set "from" and "seconds" from the clip's "words": start 0.3 s before the line's first word, end
159
168
  0.4 s after its last. Recognition often puts the first word after a silence too early: trust the word's end.
@@ -172,6 +181,11 @@ finished video ("guide cut-sheet" has every field):
172
181
  puts a plate on a Shot.
173
182
  - An end card from an earlier ad: a "clip" of that Variation from the card's first clean frame, with "clean": true, so
174
183
  nothing is drawn over the card's own graphics.
184
+ - A voice that drifts: a character who sounds like another person from take to take gets a "voices" entry. Its
185
+ "sample" is the take of that character the user accepted (that Shot's id, or its clip); its "shots" are the other
186
+ Shots of the character. Each of their takes is converted whole to the sample's voice, keeping its timing, and the
187
+ cut plays the converted sound; the sample keeps its own. Listening stays with the user: have them hear the cut
188
+ before it is approved.
175
189
  - Music: one instrumental track, a file or "generate": { "prompt" }, made as long as the longest variant. Keep the
176
190
  prompt plain (style, mood, instruments): one that spelled the ending out in bars came back 48 s long for 30. With
177
191
  lines in the cut it becomes a bed under them and dips while someone speaks; turn it down further with "volume".
@@ -182,14 +196,7 @@ finished video ("guide cut-sheet" has every field):
182
196
  This costs 1 credit per variant. Read "findings" of every variant and fix what they name; cut again as often as
183
197
  needed.
184
198
 
185
- Then the doubt reel for check 2: every moment you are unsure of, cut out and joined, each under a plate with one
186
- question. It is one more Montage of the delivered clips, 1 credit: a Shot per doubt with the same "clip" and "from" as
187
- the moment, 2 to 4 s, "sound": true, and a "text" that numbers it and asks ("2 of 4. Jess: the same woman as in 1?").
188
- Put the listening models' shortlist ("guide listening") in it, never their verdict. A doubt about the mix (the music, a
189
- jump in the background at a cut) is a time in the whole cut instead.
190
-
191
- Done when every variant is delivered, its "findings" are empty or each one is explained to the user, and the user has
192
- passed check 2.
199
+ Done when every variant is delivered and its "findings" are empty or each one is explained to the user.
193
200
 
194
201
  7. CHECK THE FINISHED VIDEOS, THEN APPROVE
195
202
 
@@ -206,7 +213,6 @@ passed check 2.
206
213
  - Hand the videos to a reviewer that did not make them: a subagent with the shot list, the lines and the cut times,
207
214
  told to assume there are mistakes and to report each with a timestamp and a saved frame. You have seen every clip too
208
215
  often to see it.
209
- - Check 3: send the user one variant end to end and what you changed since check 2.
210
216
 
211
217
  fgrove creatives generations approve <outputId> [<outputId> ...]
212
218
 
@@ -234,6 +240,9 @@ TOP LEVEL
234
240
  default the longest variant rounded up; 30 credits per started minute, made once for every variant
235
241
  shots the body in order: up to 80 Shots, 120 s, 40 generated clips
236
242
  variants up to 5; without any, one video
243
+ voices up to 10 of { "name", "sample": { "shot": "<id>" } or { "clip": <file> }, "shots": ["<id>", ...] }: the
244
+ speech of those Shots in the voice of the sample; each Shot sounds from a clip, generate or reuse take
245
+ and is in one voice; 24 credits per started minute of every converted take together
237
246
 
238
247
  A SHOT
239
248
 
@@ -243,8 +252,8 @@ A SHOT
243
252
  and exactly one picture:
244
253
 
245
254
  "clip": <file> a stored video, shown from "from" seconds
246
- "generate": { "keyframe": <file>, "prompt", "seconds"?, "model"?, "resolution"? }
247
- a clip made from your keyframe, 4 to 15 whole seconds, shown from "from"
255
+ "generate": { "keyframe": <keyframe>, "prompt", "seconds"?, "model"?, "resolution"? }
256
+ a clip made from the keyframe, 4 to 15 whole seconds, shown from "from"
248
257
  "still": <file> an image held for the Shot
249
258
  "freeze": { "shot": "<id>", "at": <s> } one frame of that Shot's video
250
259
  "reuse": { "shot": "<id>" } that Shot's video again, from this Shot's own "from"
@@ -252,7 +261,8 @@ and exactly one picture:
252
261
  and any of:
253
262
 
254
263
  sound true: the Shot plays its own clip's sound. { "shot": "<id>", "from": <seconds> }: it plays another Shot's
255
- clip from that moment (a cutaway under a voice). Without "sound" a Shot is silent.
264
+ clip from that moment (a cutaway under a voice). { "audio": <file>, "from"?: <seconds> }: a stored audio
265
+ file from that moment. Without "sound" a Shot is silent.
256
266
  say the line spoken during the Shot, up to 240 characters; a line break starts a new subtitle. It is drawn as
257
267
  subtitles and compared with what is heard. On a silent Shot it is a caption.
258
268
  text a plate of words in the upper half, up to 120 characters ("\\n" breaks a line)
@@ -267,6 +277,23 @@ A <file> is one of:
267
277
  { "variation": "BND_vd001_01_H1" } a Variation's video ("size" picks one)
268
278
  { "generation": "<id>", "shot": "<id>" } a clip an earlier Montage generated; "montage revise" writes these
269
279
  { "generation": "<id>", "music": true } the music track an earlier Montage generated; "revise" writes it
280
+ { "generation": "<id>", "shot": "<id>", "voice": true }
281
+ a Shot's take an earlier Montage converted to a voice, as "audio"
282
+ { "generation": "<id>", "shot": "<id>", "keyframe": true }
283
+ a keyframe an earlier Montage made, such as a keyframes-only one;
284
+ "revise" writes these
285
+
286
+ A <keyframe> is one of:
287
+
288
+ <file> a stored image (png, jpg or webp)
289
+ { "image": { "prompt", "refs"?, "model"? } }
290
+ made by the image model before every clip, once for every Shot that
291
+ names it: "refs" up to 6, each a <file> (a cast photo, a reference frame
292
+ of a place) or { "shot": "<id>" } (that Shot's keyframe, made first);
293
+ "model" "nano-banana-2.1" (default, 2K, 11 credits) or "gpt-image-2"
294
+ (high quality, 43 credits). A failed keyframe costs nothing and fails
295
+ what starts from it with "keyframe_failed"
296
+ { "shot": "<id>" } that Shot's keyframe again
270
297
 
271
298
  A VARIANT
272
299
 
@@ -412,8 +439,8 @@ One sound file per line, cut from the take by the line's own times, and the fini
412
439
 
413
440
  THE PERSON YOU WORK FOR LISTENS
414
441
 
415
- Their answer settles a voice. Ask in the doubt reel of check 2 (main guide, step 6): only the lines in doubt, each
416
- under its question, about 20 seconds; a whole film to listen to waits for hours. These are the questions:
442
+ Send them the lines of one character at a time, in the order of the film, and the finished video, with these
443
+ questions. It takes them about as long as the film is.
417
444
 
418
445
  - For each character: are these all one person? Which line is someone else, older, younger, or in another accent?
419
446
  - Does every voice fit who we see: the child a child, the grandmother old, the man a man?
@@ -422,8 +449,7 @@ under its question, about 20 seconds; a whole film to listen to waits for hours.
422
449
 
423
450
  A MODEL THAT HEARS LISTENS
424
451
 
425
- A model shortlists doubts for the reel; it does not decide them. When you can call a model that takes audio (Gemini
426
- does), ask it these three things. Ask at least two models and act
452
+ When you can call a model that takes audio (Gemini does), ask it these three things. Ask at least two models and act
427
453
  only on what two of them report about the same line: one model alone hears two people in a single unbroken take.
428
454
 
429
455
  1. One voice, blind. Send one line and do not say who should be speaking:
@@ -4,10 +4,10 @@
4
4
  "minimumCliVersion": "0.1.20",
5
5
  "entries": [
6
6
  {
7
- "repositoryCliVersion": "0.1.375",
7
+ "repositoryCliVersion": "0.1.377",
8
8
  "manifest": {
9
9
  "schemaVersion": 1,
10
- "bundleVersion": "2.0.368",
10
+ "bundleVersion": "2.0.370",
11
11
  "stepContractVersion": 3,
12
12
  "contractHash": "d761e91d5ac6ff9e72c6d49c5bcd014270912473a66f99c49d726c65998085cf",
13
13
  "managedFiles": [
@@ -45,7 +45,7 @@
45
45
  },
46
46
  {
47
47
  "path": "docs/funnelsgrove/migrations/step-contract-v3.md",
48
- "sha256": "f241802bdd646f3d2a2278320626bac3394b60d02dcbddb0df91c5936f850718"
48
+ "sha256": "8562244c23530dfec6a41ae726d3b783f7e97fe45f330e4b712251d3a5fdb964"
49
49
  },
50
50
  {
51
51
  "path": "docs/funnelsgrove/qa/analytics.md",
@@ -145,16 +145,16 @@
145
145
  },
146
146
  {
147
147
  "path": "funnel-docs.config.json",
148
- "sha256": "1d0984a547eb8015bae73d1fdb468aed35324cf77c988fa0fa013370cf4bbfa3"
148
+ "sha256": "40f7cc95b92b28762c32d6a869bbd63491d8042feecaf34ddcfb4f26d6fa2e71"
149
149
  }
150
150
  ]
151
151
  }
152
152
  },
153
153
  {
154
- "repositoryCliVersion": "0.1.374",
154
+ "repositoryCliVersion": "0.1.376",
155
155
  "manifest": {
156
156
  "schemaVersion": 1,
157
- "bundleVersion": "2.0.367",
157
+ "bundleVersion": "2.0.369",
158
158
  "stepContractVersion": 3,
159
159
  "contractHash": "d761e91d5ac6ff9e72c6d49c5bcd014270912473a66f99c49d726c65998085cf",
160
160
  "managedFiles": [
@@ -192,7 +192,7 @@
192
192
  },
193
193
  {
194
194
  "path": "docs/funnelsgrove/migrations/step-contract-v3.md",
195
- "sha256": "10c3663aaabb8dcb8dbdd23c588e6d6aab1d93aadc9fa0416a04b03ff341e43b"
195
+ "sha256": "935aba10baa60e209ac6c7af37b66d3c990a669861cea579042bde9b87e8e1cf"
196
196
  },
197
197
  {
198
198
  "path": "docs/funnelsgrove/qa/analytics.md",
@@ -292,16 +292,16 @@
292
292
  },
293
293
  {
294
294
  "path": "funnel-docs.config.json",
295
- "sha256": "5d67b18fcfc8d7c3e630b8ce74ea3b6b71a80becc3d68f1d46f430b25c202a36"
295
+ "sha256": "e9873f658d4ca6534769cb2019cb8b04bf0c09088fed1edda4a93fb810f95368"
296
296
  }
297
297
  ]
298
298
  }
299
299
  },
300
300
  {
301
- "repositoryCliVersion": "0.1.373",
301
+ "repositoryCliVersion": "0.1.375",
302
302
  "manifest": {
303
303
  "schemaVersion": 1,
304
- "bundleVersion": "2.0.366",
304
+ "bundleVersion": "2.0.368",
305
305
  "stepContractVersion": 3,
306
306
  "contractHash": "d761e91d5ac6ff9e72c6d49c5bcd014270912473a66f99c49d726c65998085cf",
307
307
  "managedFiles": [
@@ -339,7 +339,7 @@
339
339
  },
340
340
  {
341
341
  "path": "docs/funnelsgrove/migrations/step-contract-v3.md",
342
- "sha256": "cfa50813a9abe7fa68c2af75ff17436fc85e74d1925477de8edcbce46ea4088e"
342
+ "sha256": "f241802bdd646f3d2a2278320626bac3394b60d02dcbddb0df91c5936f850718"
343
343
  },
344
344
  {
345
345
  "path": "docs/funnelsgrove/qa/analytics.md",
@@ -439,16 +439,16 @@
439
439
  },
440
440
  {
441
441
  "path": "funnel-docs.config.json",
442
- "sha256": "fe0596aab0c1fc32510645957f5aa57e968d716440a720b3619b30a0312d230e"
442
+ "sha256": "1d0984a547eb8015bae73d1fdb468aed35324cf77c988fa0fa013370cf4bbfa3"
443
443
  }
444
444
  ]
445
445
  }
446
446
  },
447
447
  {
448
- "repositoryCliVersion": "0.1.372",
448
+ "repositoryCliVersion": "0.1.374",
449
449
  "manifest": {
450
450
  "schemaVersion": 1,
451
- "bundleVersion": "2.0.365",
451
+ "bundleVersion": "2.0.367",
452
452
  "stepContractVersion": 3,
453
453
  "contractHash": "d761e91d5ac6ff9e72c6d49c5bcd014270912473a66f99c49d726c65998085cf",
454
454
  "managedFiles": [
@@ -486,7 +486,7 @@
486
486
  },
487
487
  {
488
488
  "path": "docs/funnelsgrove/migrations/step-contract-v3.md",
489
- "sha256": "3a4bed43f0853688e930f1a0c005f39cc362ed295b4601fe195396eb38acd89a"
489
+ "sha256": "10c3663aaabb8dcb8dbdd23c588e6d6aab1d93aadc9fa0416a04b03ff341e43b"
490
490
  },
491
491
  {
492
492
  "path": "docs/funnelsgrove/qa/analytics.md",
@@ -586,16 +586,16 @@
586
586
  },
587
587
  {
588
588
  "path": "funnel-docs.config.json",
589
- "sha256": "0b86aa9c6fd78412728225b661c7b1bac97394cf4a9bebaf4f0c54890021d027"
589
+ "sha256": "5d67b18fcfc8d7c3e630b8ce74ea3b6b71a80becc3d68f1d46f430b25c202a36"
590
590
  }
591
591
  ]
592
592
  }
593
593
  },
594
594
  {
595
- "repositoryCliVersion": "0.1.371",
595
+ "repositoryCliVersion": "0.1.373",
596
596
  "manifest": {
597
597
  "schemaVersion": 1,
598
- "bundleVersion": "2.0.364",
598
+ "bundleVersion": "2.0.366",
599
599
  "stepContractVersion": 3,
600
600
  "contractHash": "d761e91d5ac6ff9e72c6d49c5bcd014270912473a66f99c49d726c65998085cf",
601
601
  "managedFiles": [
@@ -633,7 +633,7 @@
633
633
  },
634
634
  {
635
635
  "path": "docs/funnelsgrove/migrations/step-contract-v3.md",
636
- "sha256": "73fb5bc68fe203f8375380139af08baebe7b4af45421872f60d839f8c229aa5f"
636
+ "sha256": "cfa50813a9abe7fa68c2af75ff17436fc85e74d1925477de8edcbce46ea4088e"
637
637
  },
638
638
  {
639
639
  "path": "docs/funnelsgrove/qa/analytics.md",
@@ -733,16 +733,16 @@
733
733
  },
734
734
  {
735
735
  "path": "funnel-docs.config.json",
736
- "sha256": "58201e37f2a2fb93d912e2ed8d0335ca4dccbb4fbbf5fb892c4cdc32cdaa96b9"
736
+ "sha256": "fe0596aab0c1fc32510645957f5aa57e968d716440a720b3619b30a0312d230e"
737
737
  }
738
738
  ]
739
739
  }
740
740
  },
741
741
  {
742
- "repositoryCliVersion": "0.1.370",
742
+ "repositoryCliVersion": "0.1.372",
743
743
  "manifest": {
744
744
  "schemaVersion": 1,
745
- "bundleVersion": "2.0.363",
745
+ "bundleVersion": "2.0.365",
746
746
  "stepContractVersion": 3,
747
747
  "contractHash": "d761e91d5ac6ff9e72c6d49c5bcd014270912473a66f99c49d726c65998085cf",
748
748
  "managedFiles": [
@@ -780,7 +780,7 @@
780
780
  },
781
781
  {
782
782
  "path": "docs/funnelsgrove/migrations/step-contract-v3.md",
783
- "sha256": "20fa52d74baf761ec9fa1b8042bb1e680872c5bef8c6d253da658867dca419ba"
783
+ "sha256": "3a4bed43f0853688e930f1a0c005f39cc362ed295b4601fe195396eb38acd89a"
784
784
  },
785
785
  {
786
786
  "path": "docs/funnelsgrove/qa/analytics.md",
@@ -880,16 +880,16 @@
880
880
  },
881
881
  {
882
882
  "path": "funnel-docs.config.json",
883
- "sha256": "67f7d08d21485b19fb066e639a119095934545097c5623635f7862edfc2d304a"
883
+ "sha256": "0b86aa9c6fd78412728225b661c7b1bac97394cf4a9bebaf4f0c54890021d027"
884
884
  }
885
885
  ]
886
886
  }
887
887
  },
888
888
  {
889
- "repositoryCliVersion": "0.1.369",
889
+ "repositoryCliVersion": "0.1.371",
890
890
  "manifest": {
891
891
  "schemaVersion": 1,
892
- "bundleVersion": "2.0.362",
892
+ "bundleVersion": "2.0.364",
893
893
  "stepContractVersion": 3,
894
894
  "contractHash": "d761e91d5ac6ff9e72c6d49c5bcd014270912473a66f99c49d726c65998085cf",
895
895
  "managedFiles": [
@@ -927,7 +927,7 @@
927
927
  },
928
928
  {
929
929
  "path": "docs/funnelsgrove/migrations/step-contract-v3.md",
930
- "sha256": "034e15a21dd82f0f15468015f3b70e4ba34bd6aeee9ce29a3718e0857da93759"
930
+ "sha256": "73fb5bc68fe203f8375380139af08baebe7b4af45421872f60d839f8c229aa5f"
931
931
  },
932
932
  {
933
933
  "path": "docs/funnelsgrove/qa/analytics.md",
@@ -1027,7 +1027,7 @@
1027
1027
  },
1028
1028
  {
1029
1029
  "path": "funnel-docs.config.json",
1030
- "sha256": "d6d910da200611b719c9385d8467cf3675450dbae684f2e961c1442d9ac98eb3"
1030
+ "sha256": "58201e37f2a2fb93d912e2ed8d0335ca4dccbb4fbbf5fb892c4cdc32cdaa96b9"
1031
1031
  }
1032
1032
  ]
1033
1033
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@funnelsgrove/cli",
3
- "version": "0.1.375",
3
+ "version": "0.1.377",
4
4
  "description": "FunnelsGrove command-line tools for editing, syncing, and publishing funnels",
5
5
  "repository": {
6
6
  "type": "git",
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "schemaVersion": 1,
3
- "bundleVersion": "2.0.368",
3
+ "bundleVersion": "2.0.370",
4
4
  "stepContractVersion": 3,
5
5
  "contractHash": "d761e91d5ac6ff9e72c6d49c5bcd014270912473a66f99c49d726c65998085cf",
6
6
  "managedFiles": [
@@ -38,7 +38,7 @@
38
38
  },
39
39
  {
40
40
  "path": "docs/funnelsgrove/migrations/step-contract-v3.md",
41
- "sha256": "f241802bdd646f3d2a2278320626bac3394b60d02dcbddb0df91c5936f850718"
41
+ "sha256": "8562244c23530dfec6a41ae726d3b783f7e97fe45f330e4b712251d3a5fdb964"
42
42
  },
43
43
  {
44
44
  "path": "docs/funnelsgrove/qa/analytics.md",
@@ -138,7 +138,7 @@
138
138
  },
139
139
  {
140
140
  "path": "funnel-docs.config.json",
141
- "sha256": "1d0984a547eb8015bae73d1fdb468aed35324cf77c988fa0fa013370cf4bbfa3"
141
+ "sha256": "40f7cc95b92b28762c32d6a869bbd63491d8042feecaf34ddcfb4f26d6fa2e71"
142
142
  }
143
143
  ]
144
144
  }
@@ -17,7 +17,7 @@ Supported read versions: `1`, `2`, `3`. Authoring and publish target version `3`
17
17
 
18
18
  ### Package release order
19
19
 
20
- Release `@funnelsgrove/sdk` `0.4.0` first, then `@funnelsgrove/runtime` `0.46.0`, then `@funnelsgrove/analytics` `0.29.0`, then `@funnelsgrove/payments` `0.73.0`. The production deploy verifies the zero-traffic API candidate, publishes and verifies `@funnelsgrove/cli` `0.1.375`, and only then promotes the candidate to production traffic. The serving API must never advertise an unpublished preferred CLI. Publishing packages and deploying production remain separately approved operational actions.
20
+ Release `@funnelsgrove/sdk` `0.4.0` first, then `@funnelsgrove/runtime` `0.46.0`, then `@funnelsgrove/analytics` `0.29.0`, then `@funnelsgrove/payments` `0.73.0`. The production deploy verifies the zero-traffic API candidate, publishes and verifies `@funnelsgrove/cli` `0.1.377`, and only then promotes the candidate to production traffic. The serving API must never advertise an unpublished preferred CLI. Publishing packages and deploying production remain separately approved operational actions.
21
21
  <!-- funnelsgrove:generated:end contract-v3/migration/step-contract-v3 -->
22
22
 
23
23
  ## Version-last policy
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "schemaVersion": 1,
3
- "bundleVersion": "2.0.368",
3
+ "bundleVersion": "2.0.370",
4
4
  "contractSource": "funnelsgrove-repository://apps/funnel-runtime/contracts/step-contract-v2.json",
5
5
  "fullyGenerated": [
6
6
  ".funnelsgrove-docs.json",
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "schemaVersion": 1,
3
- "bundleVersion": "2.0.368",
3
+ "bundleVersion": "2.0.370",
4
4
  "stepContractVersion": 3,
5
5
  "contractHash": "d761e91d5ac6ff9e72c6d49c5bcd014270912473a66f99c49d726c65998085cf",
6
6
  "managedFiles": [
@@ -38,7 +38,7 @@
38
38
  },
39
39
  {
40
40
  "path": "docs/funnelsgrove/migrations/step-contract-v3.md",
41
- "sha256": "f241802bdd646f3d2a2278320626bac3394b60d02dcbddb0df91c5936f850718"
41
+ "sha256": "8562244c23530dfec6a41ae726d3b783f7e97fe45f330e4b712251d3a5fdb964"
42
42
  },
43
43
  {
44
44
  "path": "docs/funnelsgrove/qa/analytics.md",
@@ -138,7 +138,7 @@
138
138
  },
139
139
  {
140
140
  "path": "funnel-docs.config.json",
141
- "sha256": "1d0984a547eb8015bae73d1fdb468aed35324cf77c988fa0fa013370cf4bbfa3"
141
+ "sha256": "40f7cc95b92b28762c32d6a869bbd63491d8042feecaf34ddcfb4f26d6fa2e71"
142
142
  }
143
143
  ]
144
144
  }
@@ -1,8 +1,8 @@
1
1
  {
2
2
  "schemaVersion": 1,
3
- "sourceTreeHash": "eee3a83efb2c7abc418fa426f734281a0146679d4147eb0d191c0bb3146fcc06",
3
+ "sourceTreeHash": "dd21a08d3da5e8f4299d66a6cbc954524e564becd1684aa0077a5c31d3ef5d2e",
4
4
  "stepContractVersion": 3,
5
- "docsBundleVersion": "2.0.368",
5
+ "docsBundleVersion": "2.0.370",
6
6
  "files": [
7
7
  {
8
8
  "path": ".env.example",
@@ -16,7 +16,7 @@
16
16
  },
17
17
  {
18
18
  "path": ".funnelsgrove-docs.json",
19
- "sha256": "5081f81411d10c4d55b060ed2ad1315775922829627597ac942b51e644af3155",
19
+ "sha256": "1a42d552801cd9b094528e56515b639694bf7b702a7de2daf1a0fc259c95b399",
20
20
  "mode": "100644"
21
21
  },
22
22
  {
@@ -76,7 +76,7 @@
76
76
  },
77
77
  {
78
78
  "path": "docs/funnelsgrove/migrations/step-contract-v3.md",
79
- "sha256": "f241802bdd646f3d2a2278320626bac3394b60d02dcbddb0df91c5936f850718",
79
+ "sha256": "8562244c23530dfec6a41ae726d3b783f7e97fe45f330e4b712251d3a5fdb964",
80
80
  "mode": "100644"
81
81
  },
82
82
  {
@@ -206,7 +206,7 @@
206
206
  },
207
207
  {
208
208
  "path": "funnel-docs.config.json",
209
- "sha256": "1d0984a547eb8015bae73d1fdb468aed35324cf77c988fa0fa013370cf4bbfa3",
209
+ "sha256": "40f7cc95b92b28762c32d6a869bbd63491d8042feecaf34ddcfb4f26d6fa2e71",
210
210
  "mode": "100644"
211
211
  },
212
212
  {
@@ -17,7 +17,7 @@ Supported read versions: `1`, `2`, `3`. Authoring and publish target version `3`
17
17
 
18
18
  ### Package release order
19
19
 
20
- Release `@funnelsgrove/sdk` `0.4.0` first, then `@funnelsgrove/runtime` `0.46.0`, then `@funnelsgrove/analytics` `0.29.0`, then `@funnelsgrove/payments` `0.73.0`. The production deploy verifies the zero-traffic API candidate, publishes and verifies `@funnelsgrove/cli` `0.1.375`, and only then promotes the candidate to production traffic. The serving API must never advertise an unpublished preferred CLI. Publishing packages and deploying production remain separately approved operational actions.
20
+ Release `@funnelsgrove/sdk` `0.4.0` first, then `@funnelsgrove/runtime` `0.46.0`, then `@funnelsgrove/analytics` `0.29.0`, then `@funnelsgrove/payments` `0.73.0`. The production deploy verifies the zero-traffic API candidate, publishes and verifies `@funnelsgrove/cli` `0.1.377`, and only then promotes the candidate to production traffic. The serving API must never advertise an unpublished preferred CLI. Publishing packages and deploying production remain separately approved operational actions.
21
21
  <!-- funnelsgrove:generated:end contract-v3/migration/step-contract-v3 -->
22
22
 
23
23
  ## Version-last policy
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "schemaVersion": 1,
3
- "bundleVersion": "2.0.368",
3
+ "bundleVersion": "2.0.370",
4
4
  "contractSource": "funnelsgrove-repository://apps/funnel-runtime/contracts/step-contract-v2.json",
5
5
  "fullyGenerated": [
6
6
  ".funnelsgrove-docs.json",