@aicopycoders/exodus 2026.11.1000-beta.1 → 2026.11.1100-beta.1

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.
@@ -203,26 +203,26 @@ Today a run goes from the script straight to the storyboard. Run this stop
203
203
  only when `status` says the run is waiting for picks.
204
204
 
205
205
  1. `exodus video picks <runId>` lists, for each person, four faces and the
206
- voices; for each place, four rooms; on a microdrama, the camera styles and
207
- a map in metres. Each face, room and voice sample has its own link. Show it
208
- all with the run page link.
209
- 2. Ask for one face and one voice per person, one room per place, and on a
210
- microdrama a style. Send the answers as:
206
+ voices; four rooms for the set; the camera styles, when the run offers them.
207
+ Each face, room and voice sample has its own link. Show it all with the run
208
+ page link.
209
+ 2. Ask for one face and one voice per person, one room, and a style when
210
+ one is offered. Send the answers as:
211
211
 
212
212
  ```
213
213
  exodus video pick <runId> --face <who>=<n> --voice <who>=<n|voice name|voice id> \
214
- --room <place>=<n> [--style <key>] [--move <who>=<x>,<y>] [--note "<text>"]
214
+ --room <place>=<n> [--style <key>] [--note "<text>"]
215
215
  ```
216
216
 
217
- `<who>` is the name the script uses. `--face`, `--voice` and `--room`
218
- repeat once per person or place. `--style` (the camera style) and `--move`
219
- are for the microdrama; `--move` takes metres on the printed map. The run goes on only
220
- when every slot has a pick. A pick that leaves a slot open prints the open
217
+ `<who>` is the name the script uses. `--face` and `--voice` repeat once
218
+ per person. `--style` (the camera style) is for the
219
+ microdrama. The run goes on only when every slot has a pick. A pick that leaves a slot open prints the open
221
220
  slots: ask for those.
222
221
  3. "Show me other faces": `exodus video picks <runId> --redo face:<who> --note
223
- "<what to change>"`, or `room:<place>` for rooms. It draws four new
224
- pictures. The CLI prints no price for them: say so and wait for their yes.
225
- The second redo of a slot needs the note.
222
+ "<what to change>"`, or `room:<place>` for rooms. It draws four new paid
223
+ pictures. The CLI prints no price for them: say so, never guess one, and run
224
+ it only after their yes. The second redo of a slot needs the note, and a
225
+ third is refused: ask them to pick from what is shown.
226
226
 
227
227
  When `picks` answers that the server does not support it yet, the run has no
228
228
  picks stop: go to stop 3. When it answers `Unknown subcommand: "picks"`, this
@@ -264,8 +264,10 @@ Today approving the storyboard makes every clip, and the next stop is the end.
264
264
  With the pilot stop, the run makes one clip after the storyboard, checks it and
265
265
  parks. `status` then says it "made its pilot clip (scene <n>)" and whether the
266
266
  words heard match. On UGC and the authority yapper the pilot is two clips, one
267
- talking and one listening in silence. Show the pilot on the run page and the
268
- words line, then ask: keep it, or redo it.
267
+ talking and one listening in silence. Show the pilot on the run page, the
268
+ words line and every "Check failed" or "Check skipped" line, then ask: keep
269
+ it, or redo it. When `status` says the pilot clip failed, there is nothing to
270
+ keep: offer the redo it prints, which names the scene.
269
271
 
270
272
  - Keep it: `exodus video approve <runId>` makes the other clips, the expensive
271
273
  part. The CLI prints no price for it: say so, and approve on their yes.
@@ -481,6 +483,13 @@ The other template flags (`--input-mode`, `--structure`, `--reference`,
481
483
  **From the storyboard on.**
482
484
 
483
485
  ```operator-guide
486
+ exodus video picks <runId> a format with a picks stop parks before the storyboard:
487
+ the faces, voices and rooms it drew, one link each
488
+ exodus video pick <runId> --face <who>=<n> --voice <who>=<n> --room <place>=<n>
489
+ pick one of each; nothing is planned until every slot has one
490
+ exodus video picks <runId> --redo face:<who>|room:<place> --note "…"
491
+ four new paid pictures for one face or room;
492
+ only after the member's yes
484
493
  exodus video storyboard <runId> read the scene cards
485
494
  exodus video voices <runId> who speaks and with whose voice
486
495
  exodus video voices <runId> --set <character>=<voiceId> give a character a voice
@@ -433,4 +433,12 @@ export function sentenceGapCuts(
433
433
  words: Array<{ w: string; s: number; e: number }>,
434
434
  lines: Array<{ text: string; asksPause: boolean; cuesBeat: boolean }>,
435
435
  levels?: { windowSec: number; db: number[] } | null,
436
- ): Array<{ s: number; e: number; after: string; gap: number; kept: number; sound: boolean }>;
436
+ lineGap?: { max: number; keep: number } | null,
437
+ jump?: JumpCut | null,
438
+ ): Array<{ s: number; e: number; after: string; gap: number; kept: number; sound: boolean; atLine?: number }>;
439
+
440
+ /** jumpCut: a pause over maxGap between two heard words keeps keepAfter after the earlier word and keepBefore before the later. */
441
+ export interface JumpCut { maxGap: number; keepAfter: number; keepBefore: number }
442
+ export const JUMP_CUT: JumpCut;
443
+ /** jumpCut on one pause: the span it takes out, or null when it keeps the pause whole. */
444
+ export function jumpCutSpan(endSec: number, startSec: number, jump?: JumpCut): { s: number; e: number } | null;
@@ -72,6 +72,14 @@ export const PUNCH_IN_SCALE = 1.15;
72
72
  const even = (n) => 2 * Math.round(n / 2);
73
73
  const PUNCH_IN =
74
74
  `scale=${even(WIDTH * PUNCH_IN_SCALE)}:${even(HEIGHT * PUNCH_IN_SCALE)},crop=${WIDTH}:${HEIGHT},setsar=1`;
75
+ /**
76
+ * pacePass: the finished cut plays at `speed`, picture and sound, and every
77
+ * second piece of the spine is a centre crop scaled up by `zoom`, a small zoom
78
+ * step at each cut.
79
+ */
80
+ export const PACE_PASS = { speed: 1.12, zoom: 1.07 };
81
+ const PACE_ZOOM =
82
+ `scale=${even(WIDTH * PACE_PASS.zoom)}:${even(HEIGHT * PACE_PASS.zoom)},crop=${WIDTH}:${HEIGHT},setsar=1`;
75
83
  const floorFrame = (t) => Math.floor(t * FPS + 1e-6) / FPS;
76
84
  const ceilFrame = (t) => Math.ceil(t * FPS - 1e-6) / FPS;
77
85
  const stereo = "aresample=48000,aformat=channel_layouts=stereo";
@@ -97,6 +105,11 @@ export const NARRATION_JOIN_AIR_SEC = 0.25;
97
105
  * it lands. A dialogue clip's own tail ran ~1.1 s of dead air (#3423).
98
106
  */
99
107
  export const END_AIR_SEC = 0.5;
108
+ /**
109
+ * talkTrim: the most air a talking clip keeps after its last word, the ad's
110
+ * last line included. A join keeps JOIN_TAIL_SEC already, which is less.
111
+ */
112
+ export const TALK_TRIM_SEC = 0.3;
100
113
  /** A continuous low bed under the whole ad, so the joins between clips do not read as dead air. */
101
114
  const ROOM_TONE =
102
115
  "anoisesrc=color=brown:amplitude=0.0035:r=48000,highpass=f=60,lowpass=f=900,aformat=channel_layouts=stereo";
@@ -169,6 +182,22 @@ export const TRUE_PEAK_MAX_DB = -1;
169
182
  * resample is pinned to stereo, as every one after loudnorm is (loudnessApplyArgs).
170
183
  */
171
184
  export const PEAK_LIMITER = "aresample=192000,aformat=channel_layouts=stereo,alimiter=limit=0.8:level=false:attack=2:release=60";
185
+ /**
186
+ * jumpCut: inside a talking clip, a pause over maxGap between two heard words
187
+ * is cut down, keeping keepAfter after the earlier word and keepBefore before
188
+ * the later one. It rides
189
+ * the sentence-gap cut, so a pause the script writes in, one a direction asks
190
+ * for and a reaction's beat stay whole there too.
191
+ */
192
+ export const JUMP_CUT = { maxGap: 0.8, keepAfter: 0.18, keepBefore: 0.12 };
193
+
194
+ /** jumpCut on one pause, from `endSec` to `startSec`: the span it takes out, or null when it keeps the pause whole. */
195
+ export function jumpCutSpan(endSec, startSec, jump = JUMP_CUT) {
196
+ if (!(startSec - endSec > jump.maxGap + 1e-6)) return null;
197
+ const s = endSec + jump.keepAfter;
198
+ const e = startSec - jump.keepBefore;
199
+ return e > s ? { s, e } : null;
200
+ }
172
201
 
173
202
  /** Plan 14's on/off cut checks, each read only with cutChecks; paceCheck also carries its numbers. */
174
203
  const PLAN_14_CHECKS = ["floorCheck", "flashCheck", "levelStepCheck", "voFitCheck", "dashGapCheck", "nameCheck"];
@@ -210,6 +239,10 @@ export function finishingOf(manifest) {
210
239
  // Plan 14: the end card from the pack photo, and the record of whether the brand reached the ad (brandOf).
211
240
  ...(f.endCardLayers === true ? { endCardLayers: true } : {}),
212
241
  ...(f.brandCheck === true ? { brandCheck: true } : {}),
242
+ ...(f.jumpCut === true ? { jumpCut: true } : {}),
243
+ ...(f.talkTrim === true ? { talkTrim: true } : {}),
244
+ ...(on.captions && f.captionsByLine === true && f.captionColours === true ? { captionColours: true } : {}),
245
+ ...(f.pacePass === true ? { pacePass: true } : {}),
213
246
  };
214
247
  if (!Object.values(on).some(Boolean) && Object.keys(added).length === 0) return null;
215
248
  const target = f.targetSeconds;
@@ -408,6 +441,17 @@ const SAME_WORD_SPELLINGS = new Map([
408
441
  ["too", "to"],
409
442
  ]);
410
443
 
444
+ /**
445
+ * A word as people say it, read as its written long form, as in scout
446
+ * scribe.ts SPOKEN_FORMS: "go get 'em" is "go get them", "gonna" is "going to".
447
+ */
448
+ const SPOKEN_FORMS = new Map([
449
+ ["em", ["them"]], ["gonna", ["going", "to"]], ["wanna", ["want", "to"]], ["gotta", ["got", "to"]],
450
+ ["kinda", ["kind", "of"]], ["sorta", ["sort", "of"]], ["lemme", ["let", "me"]], ["gimme", ["give", "me"]],
451
+ ["cause", ["because"]], ["cuz", ["because"]], ["til", ["until"]], ["till", ["until"]], ["ya", ["you"]],
452
+ ["yeah", ["yes"]], ["yep", ["yes"]],
453
+ ]);
454
+
411
455
  /**
412
456
  * #3433: the number reading of scout spokenNumbers.ts, so a script's "$29" and a
413
457
  * scribe's "twenty nine dollars" line up here as they do in the server's cut.
@@ -532,7 +576,7 @@ function spokenForms(word) {
532
576
 
533
577
  /** The spoken tokens of one written word; empty for pure punctuation. */
534
578
  function spokenWords(word) {
535
- return spokenForms(word).map((t) => SAME_WORD_SPELLINGS.get(t) ?? t);
579
+ return spokenForms(word).flatMap((t) => SPOKEN_FORMS.get(t) ?? [t]).map((t) => SAME_WORD_SPELLINGS.get(t) ?? t);
536
580
  }
537
581
 
538
582
  /** { tokens, sourceIndex }: tokens[i] came from written word sourceIndex[i]. */
@@ -747,8 +791,13 @@ export function asksPause(line) {
747
791
  * lineGap ({ max, keep }, cutPace): where one line ends and the next begins,
748
792
  * a silence over `max` is cut to `keep` instead, and that break's last span
749
793
  * carries `atLine`, the index of the line after it, where the take is split.
794
+ *
795
+ * jump (JUMP_CUT, the jumpCut setting): any pause over jump.maxGap between two
796
+ * script words, inside a sentence too, keeps jump.keepAfter after the earlier
797
+ * word and jump.keepBefore before the later one instead (jumpCutSpan), on
798
+ * whole frames. The pauses kept above stay kept.
750
799
  */
751
- export function sentenceGapCuts(words, lines, levels = null, lineGap = null) {
800
+ export function sentenceGapCuts(words, lines, levels = null, lineGap = null, jump = null) {
752
801
  const written = [];
753
802
  const pieces = [];
754
803
  let between = "";
@@ -779,7 +828,9 @@ export function sentenceGapCuts(words, lines, levels = null, lineGap = null) {
779
828
  const newLine = a.li !== b.li;
780
829
  // A name heard split in two (#2300) ends on its last heard word.
781
830
  const [earlier, later] = [words[spoken.findLast((w) => w < to)], words[to]];
782
- if (!newLine && !SENTENCE_END.test(b.before) && !heardSentenceEnd(earlier.w)) continue;
831
+ const sentenceBreak = newLine || SENTENCE_END.test(b.before) || heardSentenceEnd(earlier.w);
832
+ // Inside a sentence only jumpCut acts, and only on a pause over its longest.
833
+ if (!sentenceBreak && !(jump && jumpCutSpan(earlier.e, later.s, jump))) continue;
783
834
  if (WRITTEN_PAUSE.test(b.before) || lines[a.li].asksPause || lines[b.li].asksPause) continue;
784
835
  if (newLine && lines[a.li].cuesBeat) continue;
785
836
  const gap = later.s - earlier.e;
@@ -790,14 +841,17 @@ export function sentenceGapCuts(words, lines, levels = null, lineGap = null) {
790
841
  const spans = sound ? [sound] : [];
791
842
  const [gapMax, gapKeep] =
792
843
  lineGap && newLine ? [lineGap.max, lineGap.keep] : [SENTENCE_GAP_MAX_SEC, SENTENCE_GAP_KEEP_SEC];
793
- const paused = gap - removed > gapMax + 1e-6;
844
+ // jumpCut: a pause over its longest keeps its two edges, with a sound in it taken out whole.
845
+ const jumped = Boolean(jump) && gap - removed > jump.maxGap + 1e-6;
846
+ const paused = jumped || (sentenceBreak && gap - removed > gapMax + 1e-6);
794
847
  if (paused) {
795
848
  // Placed on the gap with the sound already out, then moved back past it.
796
849
  // Frame edges only ever widen what is kept, so the silence left stays
797
850
  // between the kept length and the longest allowed.
798
851
  const back = (t) => (sound && t > sound.s ? t + removed : t);
799
- const s = back(ceilFrame(earlier.e + gapKeep / 2));
800
- const e = back(floorFrame(later.s - removed - gapKeep / 2));
852
+ const [keepAfter, keepBefore] = jumped ? [jump.keepAfter, jump.keepBefore] : [gapKeep / 2, gapKeep / 2];
853
+ const s = back(ceilFrame(earlier.e + keepAfter));
854
+ const e = back(floorFrame(later.s - removed - keepBefore));
801
855
  if (e > s) spans.push({ s, e });
802
856
  }
803
857
  const merged = [];
@@ -893,7 +947,7 @@ function clipLevels(file, filter = null) {
893
947
  /** Decoded final-mix levels; callers must not attribute an event to these whole-mix windows. */
894
948
  export const measureCutAudio = (file) => clipLevels(file);
895
949
 
896
- function tightenSentenceGaps(spine, reactionCues, scriptLines, readLevels, lineGap = null) {
950
+ function tightenSentenceGaps(spine, reactionCues, scriptLines, readLevels, lineGap = null, jump = null) {
897
951
  for (const seg of spine) {
898
952
  if (seg.source !== "clip" || seg.audio !== "clip" || !seg.words?.length || seg.fixedLength) continue;
899
953
  const lines = seg.lineIds.map((id) => ({
@@ -901,7 +955,7 @@ function tightenSentenceGaps(spine, reactionCues, scriptLines, readLevels, lineG
901
955
  asksPause: asksPause(scriptLines.get(id)),
902
956
  cuesBeat: reactionCues.has(id),
903
957
  }));
904
- const heardCuts = sentenceGapCuts(seg.words, lines, readLevels(seg.file), lineGap);
958
+ const heardCuts = sentenceGapCuts(seg.words, lines, readLevels(seg.file), lineGap, jump);
905
959
  // The measured map: on whole slots of the clip's own picture, so both lose the same frames.
906
960
  const cuts = seg.map?.picture ? cutsOnSlots(heardCuts, seg.map.deltaSec) : heardCuts;
907
961
  if (cuts.length === 0) continue;
@@ -1212,8 +1266,11 @@ export function brollWindow(seg, counts, cueLineId, texts, broll) {
1212
1266
  * word, so the action it ends on (her setting the mat down, #3199) is seen, and
1213
1267
  * one marked with actionLeadSec keeps that long before its first word, so the
1214
1268
  * action it opens on (the dog stepping onto the mat, #3272) is seen.
1269
+ *
1270
+ * talkTrim: no talking clip keeps more than TALK_TRIM_SEC of air after its last
1271
+ * word, the ad's last one included; a scene's actionTailSec still holds.
1215
1272
  */
1216
- function trimJoins(spine, reactionCues, scriptLines, gapMax = null) {
1273
+ function trimJoins(spine, reactionCues, scriptLines, gapMax = null, talkTrim = false) {
1217
1274
  // cutPace: the beat before someone new answers shrinks so the join holds at most gapMax of air.
1218
1275
  const newSpeakerLead = gapMax === null
1219
1276
  ? JOIN_LEAD_NEW_SPEAKER_SEC
@@ -1235,7 +1292,8 @@ function trimJoins(spine, reactionCues, scriptLines, gapMax = null) {
1235
1292
  inSec = Math.max(inSec, Math.min(clear, floorFrame(firstWord)));
1236
1293
  }
1237
1294
  const endsAd = k === spine.length - 1 && !reactionCues.has(seg.lineIds.at(-1));
1238
- const tailSec = Math.max(endsAd ? END_AIR_SEC : JOIN_TAIL_SEC, seg.actionTailSec ?? 0);
1295
+ const airSec = endsAd ? END_AIR_SEC : JOIN_TAIL_SEC;
1296
+ const tailSec = Math.max(talkTrim ? Math.min(airSec, TALK_TRIM_SEC) : airSec, seg.actionTailSec ?? 0);
1239
1297
  let outSec = ceilFrame(lastWord + tailSec);
1240
1298
  if (after.length > 0) {
1241
1299
  const clear = floorFrame(Math.min(...after.map((w) => w.s)) - EXTRA_CLEARANCE_SEC);
@@ -1380,6 +1438,17 @@ function markPunchIns(spine, sameShot) {
1380
1438
 
1381
1439
  const sameSpeaker = (prev, seg) => Boolean(prev.lastSpeaker && seg.firstSpeaker === prev.lastSpeaker);
1382
1440
 
1441
+ /** pacePass: every second piece of the spine zooms, where no punch-in does already. Answers the cut's note. */
1442
+ export function paceZooms(spine) {
1443
+ let zoomed = 0;
1444
+ spine.forEach((seg, k) => {
1445
+ if (k % 2 === 0 || seg.punchIn) return;
1446
+ seg.paceZoom = true;
1447
+ zoomed += 1;
1448
+ });
1449
+ return `pacePass: the cut plays at ${PACE_PASS.speed}x and ${zoomed} piece${zoomed === 1 ? "" : "s"} zoom ${PACE_PASS.zoom}x`;
1450
+ }
1451
+
1383
1452
  /** cutPace: two pieces of one take, back to back. */
1384
1453
  const samePiece = (prev, seg) =>
1385
1454
  Boolean(prev.piece && seg.piece && prev.file === seg.file && prev.piece.take === seg.piece.take);
@@ -2611,8 +2680,10 @@ export function buildTimeline({
2611
2680
  }
2612
2681
  const pace = finish?.cutPace === true;
2613
2682
  const lineGap = pace ? { max: PACE_SPLIT_PAUSE_SEC, keep: PACE_GAP_MAX_SEC } : null;
2614
- tightenSentenceGaps(spine, reactionCues, scriptLines, readLevels, lineGap);
2615
- trimJoins(spine, reactionCues, scriptLines, pace ? PACE_GAP_MAX_SEC : null);
2683
+ // jumpCut stays off a template launch's cut, whose selected clocks and windows hold their real time.
2684
+ const jump = finish?.jumpCut && manifest?.templateMotion?.enabled !== true ? JUMP_CUT : null;
2685
+ tightenSentenceGaps(spine, reactionCues, scriptLines, readLevels, lineGap, jump);
2686
+ trimJoins(spine, reactionCues, scriptLines, pace ? PACE_GAP_MAX_SEC : null, finish?.talkTrim === true);
2616
2687
  if (pace) {
2617
2688
  // The pieces of one take alternate between the plain frame and the
2618
2689
  // punch-in, and a jump-cut run's alternation carries on across them.
@@ -3161,6 +3232,7 @@ export function buildFfmpegArgs(timeline, { resolve, music, out, finish = null,
3161
3232
  }
3162
3233
  if (seg.holdSec > 0.01) fit.push(`tpad=stop_mode=clone:stop_duration=${sec(seg.holdSec)}`);
3163
3234
  if (seg.punchIn) fit.push(PUNCH_IN);
3235
+ if (seg.paceZoom) fit.push(PACE_ZOOM);
3164
3236
  filters.push(`${norm(`${i}:v`)}${fit.length ? `,${fit.join(",")}` : ""}[v${i}]`);
3165
3237
  // A segment split around a reaction beat starts partway into its sound too.
3166
3238
  const skipIn = inSec > 0.001 ? `atrim=start=${sec(inSec)},asetpts=PTS-STARTPTS,` : "";
@@ -3730,6 +3802,29 @@ export const CAPTION_CLEAR_SEC = 0.02;
3730
3802
  export const CAPTION_MIN_SEC = 0.35;
3731
3803
  /** captionsByLine: the caption font is at most this share of the frame's height (69 px of 1920). */
3732
3804
  export const CAPTION_MAX_SHARE = 0.036;
3805
+ /** captionColours: the speakers' caption colours in the order they first speak (ASS, &HBBGGRR&): white, yellow, cyan. */
3806
+ export const CAPTION_COLOURS = ["&HFFFFFF&", "&H00FFFF&", "&HFFFF00&"];
3807
+ /** captionColours: a coloured screen's black edge, at least this thick, so yellow or cyan still reads on a light picture. */
3808
+ export const CAPTION_COLOUR_MIN_OUTLINE = 4;
3809
+
3810
+ /**
3811
+ * captionColours: each line caption screen (lineCaptionScreens) in its
3812
+ * speaker's colour, so a viewer follows who talks when one of them is off
3813
+ * screen. The speaker is the screen's script line's speakerId, a narrator's
3814
+ * line (no speakerId) one speaker of its own; the colours go in the order the
3815
+ * speakers first speak and start again after the last. A screen whose line
3816
+ * the script does not hold stays as it is.
3817
+ */
3818
+ export function colourScreens(screens, storyboard) {
3819
+ const speakerOf = new Map((storyboard?.script ?? []).map((line) => [line?.lineId, line?.speakerId ?? null]));
3820
+ const order = [];
3821
+ return screens.map((c) => {
3822
+ if (!speakerOf.has(c.line)) return c;
3823
+ const who = speakerOf.get(c.line);
3824
+ if (!order.includes(who)) order.push(who);
3825
+ return { ...c, colour: CAPTION_COLOURS[order.indexOf(who) % CAPTION_COLOURS.length] };
3826
+ });
3827
+ }
3733
3828
 
3734
3829
  export function lineCaptionScreens(words, cap = null) {
3735
3830
  const per = Math.max(1, Math.round(cap?.wordsPerLine?.median ?? 3));
@@ -3834,7 +3929,7 @@ export function editAss({ captions = [], cap = null, cards = [], hook = null, en
3834
3929
  `Style: End,Helvetica,${Math.round(H * 0.045)},&H00FFFFFF,&H00FFFFFF,&H20101010,&H00000000,-1,0,0,0,100,100,2,0,3,40,0,5,0,0,0,1`,
3835
3930
  ...(endLayers ? endCardStyles(endLayers.colors, H) : []), "",
3836
3931
  "[Events]", "Format: Layer, Start, End, Style, Name, MarginL, MarginR, MarginV, Effect, Text",
3837
- ...captions.map((c) => `Dialogue: 1,${assTime(c.s)},${assTime(c.e)},Cap,,0,0,0,,{\\pos(${W / 2},${y})}${c.text}`),
3932
+ ...captions.map((c) => `Dialogue: 1,${assTime(c.s)},${assTime(c.e)},Cap,,0,0,0,,{\\pos(${W / 2},${y})${c.colour ? `\\c${c.colour}${thick ? "" : `\\bord${CAPTION_COLOUR_MIN_OUTLINE}`}` : ""}}${c.text}`),
3838
3933
  ...cards.filter((c) => c.label).map((c) => `Dialogue: 2,${assTime(c.in)},${assTime(c.out)},Card,,0,0,0,,{${box(c.box)}\\fs${Math.round(H * 0.036)}\\fad(60,0)}${assText(c.label)}`),
3839
3934
  ...(hook?.text ? [`Dialogue: 3,${assTime(hook.in)},${assTime(hook.out)},Card,,0,0,0,,{${box(hook.box)}\\fs${Math.round(H * 0.026)}}${assText(hook.text)}`] : []),
3840
3935
  ...(endCard ? [`Dialogue: 4,${assTime(endCard.in)},${assTime(endCard.out)},End,,0,0,0,,{\\pos(${W / 2},${H / 2})\\fad(120,0)}${assText(endCard.text)}`] : []),
@@ -5526,10 +5621,18 @@ export function firstCut({ dir, out: outOpt, skip = new Set(), music: musicOn =
5526
5621
  // The finishing settings' part of the render: the speed, the burned
5527
5622
  // captions and cards, and where the mix goes before its loudness pass.
5528
5623
  const notes = [];
5624
+ if (finish?.captionColours && stagedText) notes.push("captionColours: the text stage draws these captions, so they stay one colour");
5529
5625
  const pictureSec = timeline.spine.reduce((sum, seg) => sum + seg.seconds, 0);
5530
5626
  // A song and selected semantic action clocks are never globally accelerated.
5531
5627
  const protectedMotion = [...timeline.spine, ...timeline.cutaways].some((s) => s.motionProtection);
5532
- const speed = finish?.cutPace && !timeline.wholeVoice && !protectedMotion ? speedFor(pictureSec, finish.targetSeconds) : 1;
5628
+ // pacePass: its speed in place of cutPace's, on a cut no clock is held to (no song laid whole, no selected or mapped clock).
5629
+ const paced = finish?.pacePass === true && !timeline.wholeVoice && !protectedMotion && !timeline.mapped &&
5630
+ manifest.templateMotion?.enabled !== true;
5631
+ if (finish?.pacePass && !paced) notes.push("this cut keeps a real-time clock, so pacePass did not speed it up or zoom it");
5632
+ if (paced) notes.push(paceZooms(timeline.spine));
5633
+ const speed = paced
5634
+ ? PACE_PASS.speed
5635
+ : finish?.cutPace && !timeline.wholeVoice && !protectedMotion ? speedFor(pictureSec, finish.targetSeconds) : 1;
5533
5636
  if (finish?.cutPace && protectedMotion) notes.push("selected action/listening/ending obligations keep their real-time clock; cutPace does not accelerate the whole cut");
5534
5637
  if (timeline.sourceMap) {
5535
5638
  // The exact bytes every measured clock was read from, for whoever binds an approval to them.
@@ -5611,7 +5714,7 @@ export function firstCut({ dir, out: outOpt, skip = new Set(), music: musicOn =
5611
5714
  if (finish.captions) burned = screens;
5612
5715
  burnedCards = finish.cards ? (copied ? copied.cards : storyboardCards(storyboard, timeline)) : [];
5613
5716
  writeFileSync(here(ass), editAss({
5614
- captions: screens,
5717
+ captions: finish.captionColours ? colourScreens(screens, storyboard) : screens,
5615
5718
  cap,
5616
5719
  ...(finish.captionsByLine ? { capMaxShare: CAPTION_MAX_SHARE } : {}),
5617
5720
  cards: burnedCards,
@@ -1,4 +1,4 @@
1
- export type CustomerRunStage = "waiting" | "planning" | "drawing" | "filming" | "editing" | "review" | "ready" | "failed" | "cancelled";
1
+ export type CustomerRunStage = "waiting" | "planning" | "picking" | "drawing" | "filming" | "editing" | "review" | "pilot" | "ready" | "failed" | "cancelled";
2
2
  export interface CustomerRunScene {
3
3
  sceneIndex: number;
4
4
  line: string | null;
@@ -71,6 +71,13 @@ export function customerStageLines(run, page) {
71
71
  case "filming":
72
72
  case "editing":
73
73
  return [WORKING_SENTENCE[run.stage]];
74
+ case "picking":
75
+ return ["This video is waiting for its picks: a face, a voice and a room for each part. The team makes them for now."];
76
+ case "pilot":
77
+ return [
78
+ "Your pilot clip is being checked: one clip is made first, so a wrong voice or face is caught before the others are made. The team checks it, and redoes it if needed, before the others are made.",
79
+ `Watch it here: ${page}`,
80
+ ];
74
81
  case "review":
75
82
  return [
76
83
  "Your storyboard is ready for your review.",
@@ -24,6 +24,7 @@ export declare const RUN_PATH = "/api/v2/workflow";
24
24
  export declare const ITEMS_PATH = "/api/v2/workflow/items";
25
25
  export declare const FINAL_PATH = "/api/v2/video/final";
26
26
  export declare const VOICES_PATH = "/api/v2/video/voices";
27
+ export declare const PICKS_PATH = "/api/v2/video/picks";
27
28
  export declare const ASSET_UPLOAD_URL_PATH = "/api/v2/workflows/asset-upload-url";
28
29
  export declare const ASSETS_PATH = "/api/v2/workflows/assets";
29
30
  export interface ClipWord {
@@ -185,8 +186,12 @@ export interface VideoRun {
185
186
  status: string;
186
187
  isTerminal: boolean;
187
188
  error?: string;
188
- pauseReason?: BuilderPauseReason;
189
+ pauseReason?: BuilderPauseReason | "pilot";
189
190
  pausedNodeId?: string;
191
+ pilot?: {
192
+ sceneIndexes?: number[];
193
+ approvedAt?: number;
194
+ };
190
195
  requestQuotePending?: boolean;
191
196
  sourceEditMap?: true;
192
197
  nodes: VideoRunNode[];
@@ -303,8 +308,17 @@ export type RunStop = {
303
308
  at: "final-watch";
304
309
  missingScenes?: MissingScene[];
305
310
  framesNodeId?: string;
311
+ } | {
312
+ at: "pilot";
313
+ nodeId?: string;
314
+ sceneIndexes: number[];
315
+ silentScenes?: number[];
316
+ checks?: PilotCheck[];
306
317
  } | {
307
318
  at: "request-quote";
319
+ } | {
320
+ at: "picks";
321
+ nodeId: string;
308
322
  } | {
309
323
  at: "paused";
310
324
  nodeId?: string;
@@ -327,10 +341,19 @@ export type ResolvedStop = Exclude<RunStop, {
327
341
  }> & {
328
342
  cutAttached: boolean | null;
329
343
  });
344
+ export interface PilotCheck {
345
+ sceneIndex: number;
346
+ clip: "made" | "failed" | "making";
347
+ error?: string;
348
+ words?: string;
349
+ failed: string[];
350
+ skipped: string[];
351
+ }
352
+ export declare function pilotCheck(sceneIndex: number, row: NodeItem | undefined, hasLine?: boolean): PilotCheck;
330
353
  export declare function classifyRun(run: VideoRun): RunStop;
331
354
  export declare function hasAttachedCut(items: NodeItem[]): boolean;
332
355
  export declare function scenesBeingRedone(run: VideoRun, items: NodeItem[]): number[];
333
- export declare function resolveStop(stop: RunStop, cutAttached: boolean | null): ResolvedStop;
356
+ export declare function resolveStop(stop: RunStop, cutAttached: boolean | null, items?: NodeItem[] | null): ResolvedStop;
334
357
  export declare function resolveStopAtPark(stop: RunStop, runId: string, deps: Pick<VideoDeps, "get">): Promise<ResolvedStop>;
335
358
  export declare function stageWord(stage: string): string;
336
359
  export declare function stepName(kind: string | undefined): string;
@@ -557,6 +580,108 @@ export declare function approveFlow(runId: string, opts: {
557
580
  acceptFindings?: boolean;
558
581
  requestQuoteHash?: string;
559
582
  }, deps: VideoDeps): Promise<FlowResult>;
583
+ export interface PicksPicture {
584
+ n: number;
585
+ model: string;
586
+ imageUrl?: string;
587
+ }
588
+ export interface PicksStyleCard {
589
+ title: string;
590
+ moves: string;
591
+ slots: {
592
+ look: string;
593
+ camera: string;
594
+ staging: string;
595
+ actors: string;
596
+ };
597
+ }
598
+ export interface PicksView {
599
+ runId: string;
600
+ parked: boolean;
601
+ options: {
602
+ people: Array<{
603
+ who: string;
604
+ description: string;
605
+ lines: number;
606
+ faces: PicksPicture[];
607
+ voices: Array<{
608
+ n: number;
609
+ voiceId: string;
610
+ name: string;
611
+ sampleUrl?: string;
612
+ }>;
613
+ faceRedos: number;
614
+ }>;
615
+ places: Array<{
616
+ place: string;
617
+ word?: string;
618
+ from: "script" | "terrain";
619
+ rooms: PicksPicture[];
620
+ roomRedos: number;
621
+ }>;
622
+ styles?: string[];
623
+ drawnAt: number;
624
+ } | null;
625
+ choice: {
626
+ faces: Array<{
627
+ who: string;
628
+ n: number;
629
+ }>;
630
+ voices: Array<{
631
+ who: string;
632
+ voiceId: string;
633
+ label?: string;
634
+ n?: number;
635
+ }>;
636
+ rooms: Array<{
637
+ place: string;
638
+ n: number;
639
+ }>;
640
+ style?: string;
641
+ note?: string;
642
+ } | null;
643
+ open: string[];
644
+ pickedAt: number | null;
645
+ redoing: string | null;
646
+ styleCards?: Record<string, PicksStyleCard>;
647
+ mapNote?: string;
648
+ }
649
+ export interface PickReceipt {
650
+ done: boolean;
651
+ open: string[];
652
+ }
653
+ export declare function picksLines(view: PicksView, runId: string, runUrl: string): string[];
654
+ export declare function picksFlow(runId: string, json: boolean, deps: VideoDeps): Promise<FlowResult>;
655
+ export interface PickRequest {
656
+ faces: Array<{
657
+ who: string;
658
+ n: number;
659
+ }>;
660
+ voices: Array<{
661
+ who: string;
662
+ voice: string;
663
+ }>;
664
+ rooms: Array<{
665
+ place: string;
666
+ n: number;
667
+ }>;
668
+ moves: Array<{
669
+ who: string;
670
+ x: number;
671
+ y: number;
672
+ }>;
673
+ style?: string;
674
+ note?: string;
675
+ }
676
+ export declare function parsePickFlags(occurrences: FlagOccurrence[]): {
677
+ ok: true;
678
+ request: PickRequest;
679
+ } | {
680
+ ok: false;
681
+ line: string;
682
+ };
683
+ export declare function pickFlow(runId: string, request: PickRequest, json: boolean, deps: VideoDeps): Promise<FlowResult>;
684
+ export declare function redoPicksFlow(runId: string, slot: string, note: string | undefined, json: boolean, deps: VideoDeps): Promise<FlowResult>;
560
685
  export declare function flagFlow(runId: string, note: string, json: boolean, deps: VideoDeps): Promise<FlowResult>;
561
686
  export declare function retryFrameFlow(runId: string, nodeId: string | undefined, sceneIndex: number, note: string | undefined, json: boolean, deps: VideoDeps): Promise<FlowResult>;
562
687
  export declare const BROLL_EDIT_STALE_MS: number;
@@ -63,6 +63,16 @@ The whole loop, in order:
63
63
  also settle the voices here, at the launch, instead of at step 5 — the
64
64
  launch flags all live in: exodus workflow --help
65
65
 
66
+ A format with a picks stop stops first, before anything is planned:
67
+ exodus video picks <runId>
68
+ The faces, voices and rooms it drew for each person and place, a link
69
+ each.
70
+ exodus video pick <runId> --face <who>=<n> --voice <who>=<n> --room <place>=<n>
71
+ Nothing is planned until every slot has a pick. A pick that leaves one
72
+ open is saved and starts nothing.
73
+ exodus video picks <runId> --redo face:<who> --note "<what to change>"
74
+ Four new paid pictures for one face or room.
75
+
66
76
  4. exodus video storyboard <runId>
67
77
  The scene cards: what each scene says and the picture it will look like.
68
78
 
@@ -85,6 +95,12 @@ The whole loop, in order:
85
95
  request, even on a One-shot run. Review its exact requests and prices here,
86
96
  then approve those same requests with --request-quote <reviewSha256>.
87
97
 
98
+ A format with a pilot clip makes one clip after this approval and stops
99
+ again before the others. status prints the pilot's scene, whether its
100
+ clip was made, and every check that failed or could not run. Redo it
101
+ with retry-clip; approve again to make the other clips.
102
+ A One-shot run makes every clip without stopping.
103
+
88
104
  7. exodus video status <runId>
89
105
  Where the run is and how each scene's clip turned out. If the storyboard
90
106
  failed, it also says which parts of it were accepted and why the next one
@@ -122,7 +138,8 @@ The whole loop, in order:
122
138
  hear on the recording keeps it from being approved.
123
139
 
124
140
  exodus video retry-clip <runId> --scene <n>
125
- Redo ONE finished clip while the run waits for the cut. Everything
141
+ Redo ONE finished clip while the run waits for the cut, or redo the
142
+ pilot clip while the run waits after it. Everything
126
143
  else stays. A --note steers the motion, never the words. Add
127
144
  --voice-first when the words came out wrong: the line is recorded in
128
145
  the character's own voice first, then the clip is made to match it.
@@ -150,6 +167,8 @@ Usage:
150
167
  exodus video song <runId> [--json]
151
168
  exodus video song approve <runId> --master <masterSha256> [--json]
152
169
  exodus video song import <runId> --file <audio> --lyric <text|@file> --rights "<statement>" [--from <s> --to <s>] [--json]
170
+ exodus video picks <runId> [--redo face:<who>|room:<place>] [--note "..."] [--json]
171
+ exodus video pick <runId> [--face <who>=<n>] [--voice <who>=<n|name|id>] [--room <place>=<n>] [--style <key>] [--move <who>=<x>,<y>] [--note "..."] [--json]
153
172
  exodus video storyboard <runId> [--json]
154
173
  exodus video approve <runId> [--approve-stale-cut] [--json]
155
174
  exodus video retry-frame <runId> [--node <nodeId>] --scene <n> [--note "..."] [--json]
@@ -174,8 +193,9 @@ Options:
174
193
  --file <cut.mp4> Your finished cut (upload). MP4, MOV or WebM, up to 200MB
175
194
  --duration <sec> How long your cut is, in seconds. Only needed when the
176
195
  length can't be read off the file itself
177
- --note "<text>" How to steer one redo (retry-frame, retry-clip), or
178
- what a B-roll shot should show (broll add, broll move)
196
+ --note "<text>" How to steer one redo (retry-frame, retry-clip, picks
197
+ --redo), what a B-roll shot should show (broll add,
198
+ broll move), or a note saved with your picks (pick)
179
199
  --line <id> The script line a B-roll shot goes on (broll add,
180
200
  broll move). exodus video broll <runId> lists the ids
181
201
  --node <nodeId> Which scene-frames node holds the still (retry-frame;
@@ -203,6 +223,18 @@ Options:
203
223
  --clear <who> Take a character's voice off again (voices). Repeatable
204
224
  --from <file.json> A file of characters and voices, by name or ID (voices).
205
225
  --set and --clear win over the same name in the file
226
+ --face <who>=<n> The face to keep for a person (pick). <who> is the name
227
+ the script uses, <n> the option picks printed. Repeat
228
+ it once per person
229
+ --voice <who>=<v> The voice for a person (pick): an option number, a
230
+ catalog voice's name or an ElevenLabs voice ID.
231
+ Repeatable
232
+ --room <place>=<n> The room to keep for a place (pick). Repeatable
233
+ --style <key> The director style (pick), when the run offers one
234
+ --move <who>=<x>,<y> Where a person stands on the blocking map, in metres
235
+ (pick). Refused until a format has a blocking map
236
+ --redo <slot> Four new paid pictures for face:<who> or room:<place>
237
+ (picks). The second redo of the same slot needs --note
206
238
  --catalog List the voices you can pick by name (voices). No run
207
239
  needed. With a run, also the best few for each
208
240
  character who speaks
@@ -399,6 +431,9 @@ Examples:
399
431
  exodus video retry-clip run_123 --scene 3 --note "keep the handshake in frame"
400
432
  exodus video retry-clip run_123 --scene 3 --voice-first
401
433
  exodus video revoice run_123 --all
434
+ exodus video picks run_123
435
+ exodus video pick run_123 --face STRATEGIST=2 --voice STRATEGIST=3 --room OFFICE=4
436
+ exodus video picks run_123 --redo face:STRATEGIST --note "older, greyer"
402
437
  exodus video voices run_123
403
438
  exodus video voices --catalog
404
439
  exodus video voices run_123 --catalog
@@ -438,6 +473,7 @@ const REVOICE_NOT_ON_THIS_SERVER = "This Exodus server does not have the voice r
438
473
  "was spent. It arrives with the next server update.";
439
474
  export const FINAL_PATH = "/api/v2/video/final";
440
475
  export const VOICES_PATH = "/api/v2/video/voices";
476
+ export const PICKS_PATH = "/api/v2/video/picks";
441
477
  export const ASSET_UPLOAD_URL_PATH = "/api/v2/workflows/asset-upload-url";
442
478
  export const ASSETS_PATH = "/api/v2/workflows/assets";
443
479
  function withoutJudgeFields({ judgeDetail: _d, judgeSeverity: _s, ...rest }) {
@@ -557,6 +593,60 @@ function errorResult(res, json) {
557
593
  : [videoApiError(res)],
558
594
  };
559
595
  }
596
+ const SPEECH_CODE = /^speech-/;
597
+ const SKIPPED_CODE = /-check-skipped$/;
598
+ export function pilotCheck(sceneIndex, row, hasLine) {
599
+ if (!row)
600
+ return { sceneIndex, clip: "failed", error: "No clip was made for this scene", failed: [], skipped: [] };
601
+ if (row.status === "failed") {
602
+ return { sceneIndex, clip: "failed", ...(row.error ? { error: row.error } : {}), failed: [], skipped: [] };
603
+ }
604
+ if (row.status !== "done")
605
+ return { sceneIndex, clip: "making", failed: [], skipped: [] };
606
+ const findings = row.findings ?? [];
607
+ const speech = findings.filter((f) => SPEECH_CODE.test(f.code));
608
+ const wrong = speech.filter((f) => f.severity === "fail");
609
+ const speechSkipped = speech.find((f) => f.code === "speech-check-skipped");
610
+ const words = wrong.length
611
+ ? `no match: ${wrong[0].detail}${wrong.length > 1 ? ` (and ${wrong.length - 1} more)` : ""}`
612
+ : speechSkipped
613
+ ? `not checked: ${speechSkipped.detail}`
614
+ : hasLine === false
615
+ ? "no line to check"
616
+ : "no problem found";
617
+ const others = findings.filter((f) => !SPEECH_CODE.test(f.code));
618
+ const failed = others.filter((f) => f.severity === "fail").map((f) => f.detail);
619
+ const skipped = others.filter((f) => f.severity !== "fail" && SKIPPED_CODE.test(f.code)).map((f) => f.detail);
620
+ return { sceneIndex, clip: "made", words, failed, skipped };
621
+ }
622
+ function pilotScenesWithoutLine(run, scenes) {
623
+ const artifact = run.nodes
624
+ .flatMap((n) => n.outputs ?? [])
625
+ .find((a) => a.type === "storyboard");
626
+ let board = artifact?.storyboard;
627
+ if (board === undefined && typeof artifact?.storyboardJson === "string") {
628
+ try {
629
+ board = JSON.parse(artifact.storyboardJson);
630
+ }
631
+ catch {
632
+ return [];
633
+ }
634
+ }
635
+ const boardScenes = board?.scenes;
636
+ if (!Array.isArray(boardScenes))
637
+ return [];
638
+ return scenes.filter((n) => {
639
+ const scene = boardScenes.find((b) => b.sceneIndex === n);
640
+ return scene !== undefined && !(scene.dialogue ?? []).some((d) => (d.line ?? "").trim().length > 0);
641
+ });
642
+ }
643
+ function pilotScenesOf(run) {
644
+ if (run.pilot?.sceneIndexes?.length)
645
+ return [...run.pilot.sceneIndexes].sort((a, b) => a - b);
646
+ const parked = run.nodes.find((n) => n.nodeId === run.pausedNodeId);
647
+ const scenes = (parked?.outputs ?? []).flatMap((o) => o.type === "video" && typeof o.sceneIndex === "number" ? [o.sceneIndex] : []);
648
+ return [...new Set(scenes)].sort((a, b) => a - b);
649
+ }
560
650
  const GATE_NODE_KINDS = new Set(["scene-frames", "storyboard"]);
561
651
  function isAwaitingApproval(status) {
562
652
  return status === "awaiting-approval" || status === "awaiting-review";
@@ -598,9 +688,22 @@ export function classifyRun(run) {
598
688
  ...(why ? { error: why } : {}),
599
689
  };
600
690
  }
691
+ if (run.pauseReason === "pilot") {
692
+ const sceneIndexes = pilotScenesOf(run);
693
+ const silentScenes = pilotScenesWithoutLine(run, sceneIndexes);
694
+ return {
695
+ at: "pilot",
696
+ ...(run.pausedNodeId ? { nodeId: run.pausedNodeId } : {}),
697
+ sceneIndexes,
698
+ ...(silentScenes.length ? { silentScenes } : {}),
699
+ };
700
+ }
601
701
  if (run.requestQuotePending === true)
602
702
  return { at: "request-quote" };
603
703
  const pausedNode = run.nodes.find((n) => n.nodeId === run.pausedNodeId);
704
+ if (pausedNode?.kind === "picks" && !parkedByBuilderCheckpoint(run)) {
705
+ return { at: "picks", nodeId: pausedNode.nodeId };
706
+ }
604
707
  if (pausedNode && parkedAtStoryboardGate(run, pausedNode)) {
605
708
  const held = heldReason(run);
606
709
  return {
@@ -655,18 +758,26 @@ export function scenesBeingRedone(run, items) {
655
758
  }
656
759
  return [...scenes].sort((a, b) => a - b);
657
760
  }
658
- export function resolveStop(stop, cutAttached) {
761
+ export function resolveStop(stop, cutAttached, items) {
762
+ if (stop.at === "pilot") {
763
+ if (!items)
764
+ return stop;
765
+ const clipOf = (sceneIndex) => items.find((i) => i.itemKind === "clip" && i.sceneIndex === sceneIndex && (!stop.nodeId || i.nodeId === stop.nodeId));
766
+ const hasLine = (n) => (stop.silentScenes?.includes(n) ? false : undefined);
767
+ return { ...stop, checks: stop.sceneIndexes.map((n) => pilotCheck(n, clipOf(n), hasLine(n))) };
768
+ }
659
769
  if (stop.at !== "final-watch")
660
770
  return stop;
661
771
  return { ...stop, cutAttached };
662
772
  }
663
773
  export async function resolveStopAtPark(stop, runId, deps) {
664
- if (stop.at !== "final-watch")
774
+ if (stop.at !== "final-watch" && stop.at !== "pilot")
665
775
  return stop;
666
776
  const res = await deps.get(`${ITEMS_PATH}?runId=${encodeURIComponent(runId)}`);
667
777
  if (!res.ok)
668
778
  return resolveStop(stop, null);
669
- return resolveStop(stop, hasAttachedCut(res.data.items ?? []));
779
+ const items = res.data.items ?? [];
780
+ return resolveStop(stop, hasAttachedCut(items), items);
670
781
  }
671
782
  const STAGE_WORDS = {
672
783
  brief: "reading the script",
@@ -725,7 +836,50 @@ function missingSceneLines(missing, framesNodeId, runId, runUrl) {
725
836
  lines.push("The ad can't be approved until every scene has a clip.", `Watch it here: ${runUrl}`);
726
837
  return lines;
727
838
  }
839
+ function pilotLines(stop, runId, runUrl) {
840
+ const scenes = stop.sceneIndexes;
841
+ const checks = stop.checks ?? [];
842
+ const failedScenes = checks.filter((c) => c.clip === "failed").map((c) => c.sceneIndex);
843
+ const allMade = checks.length > 0 && checks.every((c) => c.clip === "made");
844
+ const which = scenes.length ? ` (${scenesPhrase(scenes)})` : "";
845
+ const headline = failedScenes.length
846
+ ? `Run ${runId}'s pilot clip failed (${scenesPhrase(failedScenes)}) and is waiting for you.`
847
+ : allMade
848
+ ? `Run ${runId} made its pilot clip${scenes.length > 1 ? "s" : ""}${which} and is waiting for you.`
849
+ : `Run ${runId} stopped at its pilot clip${which} and is waiting for you.`;
850
+ const lines = [headline, `Watch it here: ${runUrl}`];
851
+ const one = checks.length === 1;
852
+ const label = (name, sceneIndex) => one ? `${name}:`.padEnd(22) : `${name}, scene ${sceneIndex}: `;
853
+ for (const c of checks) {
854
+ if (c.clip === "failed") {
855
+ lines.push(`${label("Clip failed", c.sceneIndex)}${c.error ?? "no clip was made"}`);
856
+ continue;
857
+ }
858
+ if (c.clip === "making") {
859
+ lines.push(`${label("Clip", c.sceneIndex)}still being made, not checked yet`);
860
+ continue;
861
+ }
862
+ lines.push(`${label("Word check", c.sceneIndex)}${c.words}`);
863
+ for (const detail of c.failed)
864
+ lines.push(`${label("Check failed", c.sceneIndex)}${detail}`);
865
+ for (const detail of c.skipped)
866
+ lines.push(`${label("Check skipped", c.sceneIndex)}${detail}`);
867
+ }
868
+ const redoScene = failedScenes[0] ?? scenes[0];
869
+ lines.push(`Redo it: exodus video retry-clip ${runId} --scene ${redoScene ?? "<n>"} --note "<what is wrong>"`, `Make the other clips: exodus video approve ${runId}`);
870
+ return lines;
871
+ }
728
872
  export function stopLines(stop, runId, runUrl) {
873
+ if (stop.at === "picks") {
874
+ return [
875
+ "Parked: the run is waiting for your picks. Nothing is planned or filmed until every slot has one.",
876
+ `See them: exodus video picks ${runId}`,
877
+ `Pick: exodus video pick ${runId} --face <who>=<n> --voice <who>=<n> --room <place>=<n>`,
878
+ `Watch it here: ${runUrl}`,
879
+ ];
880
+ }
881
+ if (stop.at === "pilot")
882
+ return pilotLines(stop, runId, runUrl);
729
883
  if (stop.at === "request-quote")
730
884
  return [
731
885
  "Parked: final provider requests are prepared; the unapproved paid operations have not been sent.",
@@ -3334,6 +3488,10 @@ export async function waitFlow(runId, opts, deps) {
3334
3488
  continue;
3335
3489
  }
3336
3490
  let items = null;
3491
+ if (stop.at === "pilot") {
3492
+ const itemsRes = await deps.get(`${ITEMS_PATH}?runId=${encodeURIComponent(runId)}`);
3493
+ items = itemsRes.ok ? (itemsRes.data.items ?? []) : null;
3494
+ }
3337
3495
  if (stop.at === "final-watch") {
3338
3496
  const itemsRes = await deps.get(`${ITEMS_PATH}?runId=${encodeURIComponent(runId)}`);
3339
3497
  items = itemsRes.ok ? (itemsRes.data.items ?? []) : null;
@@ -3346,7 +3504,7 @@ export async function waitFlow(runId, opts, deps) {
3346
3504
  continue;
3347
3505
  }
3348
3506
  }
3349
- const resolved = resolveStop(stop, items ? hasAttachedCut(items) : null);
3507
+ const resolved = resolveStop(stop, items ? hasAttachedCut(items) : null, items);
3350
3508
  if (opts.json) {
3351
3509
  return {
3352
3510
  code: stop.at === "failed" ? 1 : 0,
@@ -3403,7 +3561,7 @@ export async function statusFlow(runId, json, deps) {
3403
3561
  return errorResult(itemsRes, json);
3404
3562
  const items = itemsRes.data.items ?? [];
3405
3563
  const hasFinal = hasAttachedCut(items);
3406
- const stop = resolveStop(classifyRun(run), hasFinal);
3564
+ const stop = resolveStop(classifyRun(run), hasFinal, items);
3407
3565
  const failedStoryboard = failedStoryboardNode(run);
3408
3566
  const guidance = stopLines(stop.at === "failed" && errorEchoesReasons(stop.error, failedStoryboard?.planFailure)
3409
3567
  ? { ...stop, error: undefined }
@@ -3881,6 +4039,203 @@ export async function approveFlow(runId, opts, deps) {
3881
4039
  ],
3882
4040
  };
3883
4041
  }
4042
+ function shellWord(word) {
4043
+ return /^[\w.:-]+$/.test(word) ? word : `'${word.replace(/'/g, "'\\''")}'`;
4044
+ }
4045
+ function placeName(place) {
4046
+ return place.word ?? place.place;
4047
+ }
4048
+ function pickCommand(runId, view) {
4049
+ const parts = view.open.map((slot) => {
4050
+ const [kind, ...rest] = slot.split(":");
4051
+ const name = shellWord(rest.join(":"));
4052
+ if (kind === "style")
4053
+ return "--style <key>";
4054
+ return `--${kind} ${name}=<n>`;
4055
+ });
4056
+ return `exodus video pick ${runId} ${parts.join(" ")}`.trimEnd();
4057
+ }
4058
+ export function picksLines(view, runId, runUrl) {
4059
+ const options = view.options;
4060
+ if (!options) {
4061
+ return [
4062
+ `Run ${runId} has no picks to choose from yet. It draws them before its storyboard.`,
4063
+ `Check back with: exodus video status ${runId}`,
4064
+ ];
4065
+ }
4066
+ if (view.pickedAt !== null) {
4067
+ const chosen = [
4068
+ ...(view.choice?.faces ?? []).map((f) => `${f.who} face ${f.n}`),
4069
+ ...(view.choice?.voices ?? []).map((v) => `${v.who} voice ${v.label ?? v.voiceId}`),
4070
+ ...(view.choice?.rooms ?? []).map((r) => {
4071
+ const place = options.places.find((p) => p.place === r.place);
4072
+ return `${(place ? placeName(place) : r.place).toUpperCase()} room ${r.n}`;
4073
+ }),
4074
+ ...(view.choice?.style ? [`style ${view.choice.style}`] : []),
4075
+ ];
4076
+ return [
4077
+ `Run ${runId} has its picks${chosen.length ? `: ${chosen.join(", ")}` : ""}.`,
4078
+ `Follow it: exodus video status ${runId}`,
4079
+ ];
4080
+ }
4081
+ if (view.redoing) {
4082
+ return [
4083
+ `Run ${runId} is drawing new options for ${view.redoing}.`,
4084
+ `Check back with: exodus video picks ${runId}`,
4085
+ ];
4086
+ }
4087
+ if (!view.parked) {
4088
+ return [`Run ${runId} isn't waiting for picks right now.`, `See where it is: exodus video status ${runId}`];
4089
+ }
4090
+ const chosenFace = (who) => view.choice?.faces.find((f) => f.who === who)?.n;
4091
+ const chosenVoice = (who) => view.choice?.voices.find((v) => v.who === who);
4092
+ const chosenRoom = (place) => view.choice?.rooms.find((r) => r.place === place)?.n;
4093
+ const mark = (yes) => (yes ? " (picked)" : "");
4094
+ const lines = [`Run ${runId} is waiting for your picks.`, `See the pictures and hear the voices: ${runUrl}`, ""];
4095
+ for (const person of options.people) {
4096
+ lines.push(`${person.who} (speaks ${person.lines} ${person.lines === 1 ? "line" : "lines"})`);
4097
+ const modelWidth = Math.max(0, ...person.faces.map((f) => f.model.length));
4098
+ for (const face of person.faces) {
4099
+ lines.push(` face ${face.n} ${face.model.padEnd(modelWidth)} ${face.imageUrl ?? "(no link yet)"}${mark(chosenFace(person.who) === face.n)}`);
4100
+ }
4101
+ if (person.voices.length === 0) {
4102
+ lines.push(" voice: this run's video model casts the voice itself from the script, so there is none to pick.");
4103
+ }
4104
+ const nameWidth = Math.max(0, ...person.voices.map((v) => v.name.length));
4105
+ const voice = chosenVoice(person.who);
4106
+ for (const option of person.voices) {
4107
+ lines.push(` voice ${option.n} ${option.name.padEnd(nameWidth)} ${option.sampleUrl ?? "(no sample link)"}${mark(voice?.voiceId === option.voiceId)}`);
4108
+ }
4109
+ if (voice && !person.voices.some((o) => o.voiceId === voice.voiceId)) {
4110
+ lines.push(` voice: ${voice.label ?? voice.voiceId} (picked)`);
4111
+ }
4112
+ }
4113
+ for (const place of options.places) {
4114
+ const from = place.from === "terrain" ? " (the script names no place, so this is the format's own)" : "";
4115
+ lines.push(`${placeName(place).toUpperCase()}${from}`);
4116
+ lines.push(` ${place.rooms.map((room) => `room ${room.n} ${room.imageUrl ?? "(no link yet)"}${mark(chosenRoom(place.place) === room.n)}`).join(" ")}`);
4117
+ }
4118
+ if (options.styles?.length) {
4119
+ lines.push("STYLE");
4120
+ const width = Math.max(...options.styles.map((key) => key.length));
4121
+ for (const key of options.styles) {
4122
+ const card = view.styleCards?.[key];
4123
+ const about = card ? `${card.title}. ${card.slots.camera}` : "";
4124
+ lines.push(` ${key.padEnd(width)} ${about}${mark(view.choice?.style === key)}`.trimEnd());
4125
+ }
4126
+ }
4127
+ if (view.mapNote)
4128
+ lines.push("MAP", ` ${view.mapNote}`);
4129
+ lines.push("");
4130
+ if (view.choice)
4131
+ lines.push(`Still open: ${view.open.join(", ")}`);
4132
+ lines.push(`Pick with: ${pickCommand(runId, view)}`);
4133
+ lines.push(`New options for one face or room: exodus video picks ${runId} --redo face:<who> --note "<what to change>"`);
4134
+ return lines;
4135
+ }
4136
+ export async function picksFlow(runId, json, deps) {
4137
+ const res = await deps.get(`${PICKS_PATH}?runId=${encodeURIComponent(runId)}`);
4138
+ if (!res.ok)
4139
+ return errorResult(res, json);
4140
+ const view = res.data;
4141
+ if (json)
4142
+ return { code: 0, lines: [JSON.stringify(view, null, 2)] };
4143
+ return { code: 0, lines: picksLines(view, runId, reviewUrl(deps.dashboardUrl, { _id: runId })) };
4144
+ }
4145
+ export function parsePickFlags(occurrences) {
4146
+ const request = { faces: [], voices: [], rooms: [], moves: [] };
4147
+ for (const { flag, value } of occurrences) {
4148
+ if (!["face", "voice", "room", "move", "style", "note"].includes(flag))
4149
+ continue;
4150
+ if (value === undefined || !value.trim())
4151
+ return { ok: false, line: `--${flag} needs a value.` };
4152
+ if (flag === "style") {
4153
+ request.style = value.trim();
4154
+ continue;
4155
+ }
4156
+ if (flag === "note") {
4157
+ request.note = value.trim();
4158
+ continue;
4159
+ }
4160
+ const eq = value.lastIndexOf("=");
4161
+ const name = eq > 0 ? value.slice(0, eq).trim() : "";
4162
+ const picked = eq > 0 ? value.slice(eq + 1).trim() : "";
4163
+ if (!name || !picked) {
4164
+ const shape = flag === "move" ? "<who>=<x>,<y>" : flag === "voice" ? "<who>=<n|voice name|voice id>" : flag === "room" ? "<place>=<n>" : "<who>=<n>";
4165
+ return { ok: false, line: `--${flag} must look like ${shape} (got "${value}").` };
4166
+ }
4167
+ if (flag === "voice") {
4168
+ request.voices.push({ who: name, voice: picked });
4169
+ continue;
4170
+ }
4171
+ if (flag === "move") {
4172
+ const [x, y, ...extra] = picked.split(",").map((part) => Number(part.trim()));
4173
+ if (extra.length > 0 || !Number.isFinite(x) || !Number.isFinite(y)) {
4174
+ return { ok: false, line: `--move ${name} needs metres as <x>,<y>, for example --move ${shellWord(name)}=1.25,2 (got "${picked}").` };
4175
+ }
4176
+ request.moves.push({ who: name, x, y });
4177
+ continue;
4178
+ }
4179
+ const n = Number(picked);
4180
+ if (!Number.isInteger(n) || n < 1) {
4181
+ return { ok: false, line: `--${flag} ${name}=${picked}: the option is a whole number from 1, as exodus video picks prints it.` };
4182
+ }
4183
+ if (flag === "face")
4184
+ request.faces.push({ who: name, n });
4185
+ else
4186
+ request.rooms.push({ place: name, n });
4187
+ }
4188
+ const any = request.faces.length + request.voices.length + request.rooms.length + request.moves.length > 0 || request.style !== undefined;
4189
+ if (!any) {
4190
+ return { ok: false, line: "video pick needs at least one --face <who>=<n>, --voice <who>=<n>, --room <place>=<n> or --style <key>." };
4191
+ }
4192
+ return { ok: true, request };
4193
+ }
4194
+ export async function pickFlow(runId, request, json, deps) {
4195
+ const res = await deps.post(PICKS_PATH, {
4196
+ runId,
4197
+ ...(request.faces.length ? { faces: request.faces } : {}),
4198
+ ...(request.voices.length ? { voices: request.voices } : {}),
4199
+ ...(request.rooms.length ? { rooms: request.rooms } : {}),
4200
+ ...(request.moves.length ? { moves: request.moves } : {}),
4201
+ ...(request.style !== undefined ? { style: request.style } : {}),
4202
+ ...(request.note !== undefined ? { note: request.note } : {}),
4203
+ });
4204
+ if (!res.ok)
4205
+ return errorResult(res, json);
4206
+ const receipt = res.data;
4207
+ if (json)
4208
+ return { code: 0, lines: [JSON.stringify({ ok: true, runId, ...receipt })] };
4209
+ if (receipt.done) {
4210
+ return {
4211
+ code: 0,
4212
+ lines: [`Picked. Run ${runId} goes on and plans its storyboard on your picks.`, `Follow it: exodus video status ${runId}`],
4213
+ };
4214
+ }
4215
+ return {
4216
+ code: 0,
4217
+ lines: [
4218
+ `Saved. Still open: ${receipt.open.join(", ")}.`,
4219
+ "Nothing starts until every slot has a pick.",
4220
+ `See the options: exodus video picks ${runId}`,
4221
+ ],
4222
+ };
4223
+ }
4224
+ export async function redoPicksFlow(runId, slot, note, json, deps) {
4225
+ const res = await deps.post(PICKS_PATH, { runId, redo: slot, ...(note !== undefined ? { note } : {}) });
4226
+ if (!res.ok)
4227
+ return errorResult(res, json);
4228
+ const data = res.data;
4229
+ if (json)
4230
+ return { code: 0, lines: [JSON.stringify({ ok: true, runId, ...data })] };
4231
+ return {
4232
+ code: 0,
4233
+ lines: [
4234
+ `Drawing four new options for ${data.slot}. The other picks stay.`,
4235
+ `See them when they are ready: exodus video picks ${runId}`,
4236
+ ],
4237
+ };
4238
+ }
3884
4239
  export async function flagFlow(runId, note, json, deps) {
3885
4240
  const res = await deps.post(FLAG_PATH, { runId, note });
3886
4241
  if (!res.ok)
@@ -4105,6 +4460,7 @@ export function planClipRedo(run, items, target) {
4105
4460
  (row.status === "done" &&
4106
4461
  (row.flagged === true ||
4107
4462
  stop.at === "final-watch" ||
4463
+ (stop.at === "pilot" && stop.sceneIndexes.includes(target.sceneIndex)) ||
4108
4464
  (stop.at === "running" && stop.autoRedoScenes !== undefined)));
4109
4465
  if (!redoable) {
4110
4466
  if (row.status === "done") {
@@ -5414,6 +5770,10 @@ const VALUE_FLAGS = new Set([
5414
5770
  "lyric",
5415
5771
  "rights",
5416
5772
  "request-quote",
5773
+ "face",
5774
+ "room",
5775
+ "move",
5776
+ "redo",
5417
5777
  ]);
5418
5778
  export function parsePositional(args = process.argv.slice(3)) {
5419
5779
  const out = [];
@@ -5499,6 +5859,8 @@ export async function run(flags, occurrences) {
5499
5859
  "review",
5500
5860
  "song",
5501
5861
  "quote",
5862
+ "picks",
5863
+ "pick",
5502
5864
  ];
5503
5865
  if (sub === "voices" && flags["catalog"] !== undefined && flags["catalog"] !== false) {
5504
5866
  return printResult(await voiceCatalogFlow(runId, json, defaultDeps));
@@ -5545,6 +5907,20 @@ export async function run(flags, occurrences) {
5545
5907
  }
5546
5908
  if (sub === "storyboard")
5547
5909
  return printResult(await storyboardFlow(runId, json, defaultDeps));
5910
+ if (sub === "picks") {
5911
+ const redo = flagString(flags, "redo");
5912
+ if (flags["redo"] !== undefined && !redo?.trim())
5913
+ usage("video picks --redo needs face:<who> or room:<place>.");
5914
+ if (redo)
5915
+ return printResult(await redoPicksFlow(runId, redo.trim(), flagString(flags, "note"), json, defaultDeps));
5916
+ return printResult(await picksFlow(runId, json, defaultDeps));
5917
+ }
5918
+ if (sub === "pick") {
5919
+ const plan = parsePickFlags(occurrences);
5920
+ if (!plan.ok)
5921
+ usage(plan.line);
5922
+ return printResult(await pickFlow(runId, plan.request, json, defaultDeps));
5923
+ }
5548
5924
  if (sub === "director") {
5549
5925
  const choice = parseDirectorSwitch(rest[1]);
5550
5926
  if (!choice)
@@ -6,7 +6,7 @@ import { type RunDeliverySummary } from "../lib/runVerdict.js";
6
6
  import { type Channel } from "../lib/channel.js";
7
7
  import { type VoiceMap } from "./video.js";
8
8
  export declare const helpText: string;
9
- export type WorkflowNodeKind = "brief" | "brief-form" | "asset" | "bot" | "primer" | "image" | "image-rig" | "rig" | "storyboard" | "reference" | "scene-frames" | "video" | "voiceover" | "output" | "call" | "show-set" | "show-cast" | "show-voices" | "product-truth" | "transform" | "formatter" | "splitter" | "collector" | "checkpoint" | "prompt";
9
+ export type WorkflowNodeKind = "brief" | "brief-form" | "asset" | "bot" | "primer" | "image" | "image-rig" | "rig" | "storyboard" | "reference" | "scene-frames" | "video" | "voiceover" | "output" | "call" | "show-set" | "show-cast" | "show-voices" | "product-truth" | "transform" | "formatter" | "splitter" | "collector" | "checkpoint" | "prompt" | "picks";
10
10
  export type WorkflowSlotState = "locked" | "auto" | "ask" | "inferred";
11
11
  export interface WorkflowSlot {
12
12
  id: string;
@@ -388,7 +388,7 @@ export interface WorkflowRunSession {
388
388
  title: string;
389
389
  botSlug: string;
390
390
  }
391
- export type WorkflowPauseReason = "taste" | "repair" | "slots" | "call" | "checkpoint";
391
+ export type WorkflowPauseReason = "taste" | "repair" | "slots" | "call" | "checkpoint" | "pilot";
392
392
  export interface WorkflowPendingSlot {
393
393
  id: string;
394
394
  label?: string;
@@ -459,7 +459,7 @@ export interface WorkflowRun {
459
459
  provenance?: RunProvenance;
460
460
  pauseAhead?: {
461
461
  nodeId: string;
462
- after: "frames" | "storyboard";
462
+ after: "frames" | "storyboard" | "picks" | "pilot";
463
463
  selfApproves?: true;
464
464
  };
465
465
  }
@@ -380,6 +380,12 @@ export function formatRulesLine(provenance) {
380
380
  return `Format rules: ${rigName}${version}${where}.${borrowed}`;
381
381
  }
382
382
  export function pauseAheadLine(ahead) {
383
+ if (ahead.after === "picks") {
384
+ return "This run will stop for your picks before anything is planned. It draws the faces and rooms to pick from first. Nothing else is made until every slot has a pick.";
385
+ }
386
+ if (ahead.after === "pilot") {
387
+ return "This run will stop after its pilot clip. One clip is made and checked first; the other clips are made only when you approve it.";
388
+ }
383
389
  if (ahead.after === "frames" && ahead.selfApproves) {
384
390
  return "When the frames are ready, the app checks the storyboard and approves it itself if the checks pass, then goes on to the voices and clips. It only stops for your approval if a check finds a problem. The reference, cast and scene pictures are made first (a few cents each).";
385
391
  }
@@ -562,7 +568,7 @@ function progressLine(node, parked = false) {
562
568
  function gateParkedNodeId(status, pauseReason, pausedNodeId) {
563
569
  if (!status || normalizeRunStatus(status) !== "awaiting-approval")
564
570
  return undefined;
565
- if (pauseReason === "taste" || pauseReason === "checkpoint" || pauseReason === undefined) {
571
+ if (pauseReason === "taste" || pauseReason === "checkpoint" || pauseReason === "pilot" || pauseReason === undefined) {
566
572
  return pausedNodeId;
567
573
  }
568
574
  return undefined;
@@ -578,6 +584,13 @@ export function formatPauseNotice(pauseReason, runId, dashboardUrl, { workerStop
578
584
  if (pauseReason === "call") {
579
585
  return [" ⏸ waiting on a child workflow run — it resumes on its own."];
580
586
  }
587
+ if (pauseReason === "pilot") {
588
+ return [
589
+ " ⏸ paused after the pilot clip — the other clips wait for your approval.",
590
+ ` Resolve here: exodus video status ${runId}`,
591
+ ` Or in the app: ${dashboardUrl}${RUN_PAGE_PREFIX}${runId}`,
592
+ ];
593
+ }
581
594
  if (pauseReason === "checkpoint") {
582
595
  return [
583
596
  " ⏸ paused at a checkpoint — what's flowing through it is waiting on your approval.",
@@ -2095,7 +2108,7 @@ function videoParkStop(raw) {
2095
2108
  if (!isParkedSnapshot(raw))
2096
2109
  return undefined;
2097
2110
  const stop = classifyRun(asVideoRun(raw));
2098
- return stop.at === "storyboard-gate" || stop.at === "final-watch" ? stop : undefined;
2111
+ return stop.at === "storyboard-gate" || stop.at === "final-watch" || stop.at === "picks" || stop.at === "pilot" ? stop : undefined;
2099
2112
  }
2100
2113
  async function waitForRun(runId, opts, deps) {
2101
2114
  const seen = new Map();
@@ -2662,6 +2675,8 @@ export function parkBadge(pauseReason) {
2662
2675
  return "slots";
2663
2676
  if (pauseReason === "checkpoint")
2664
2677
  return "checkpoint";
2678
+ if (pauseReason === "pilot")
2679
+ return "pilot";
2665
2680
  return "legacy";
2666
2681
  }
2667
2682
  export function invocationBadge(row) {
@@ -2725,6 +2740,8 @@ function describePark(run) {
2725
2740
  return "parked on a child workflow";
2726
2741
  case "checkpoint":
2727
2742
  return `parked at a checkpoint (use: exodus workflow checkpoint ${run._id})`;
2743
+ case "pilot":
2744
+ return `parked after its pilot clip (use: exodus video status ${run._id})`;
2728
2745
  default:
2729
2746
  return "parked at the cost gate (legacy)";
2730
2747
  }
@@ -2735,6 +2752,7 @@ const PARK_LABEL = {
2735
2752
  slots: "slot answers",
2736
2753
  call: "a child workflow",
2737
2754
  checkpoint: "a checkpoint approval",
2755
+ pilot: "the pilot clip's approval",
2738
2756
  };
2739
2757
  async function preflightPark(runId, expected, verb, json, deps) {
2740
2758
  const res = await deps.get(`${STATUS_PATH}?runId=${encodeURIComponent(runId)}`);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@aicopycoders/exodus",
3
- "version": "2026.11.1000-beta.1",
3
+ "version": "2026.11.1100-beta.1",
4
4
  "description": "CLI + Claude Code skills for the Copycoders Exodus ad pipeline",
5
5
  "repository": {
6
6
  "type": "git",