@aicopycoders/exodus 2026.11.1200-beta.15 → 2026.11.1200-beta.16

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.
@@ -703,9 +703,9 @@ The rows:
703
703
  "ugc-one-take" in the sheet before its next run.": set it only on their yes,
704
704
  and say that the next run writes that ad again, which is paid. On an ad it
705
705
  can't be made from, the write refuses it and says why. It buys a face photo,
706
- a picture of the room, a cut-out of the product and one take for each 15 or
707
- 25 seconds of script, on the member's Kie key, and text calls on their model
708
- key; it needs their ElevenLabs key and their Kie key. Its price is the
706
+ a picture of the room, a cut-out of the product, a picture of an animal when
707
+ the script puts one in the picture, and one take for each 15 or 25 seconds of
708
+ script, on the member's Kie key, and text calls on their model key; it needs their ElevenLabs key and their Kie key. Its price is the
709
709
  server's estimate, known once the swipe is written: `exodus video swipe
710
710
  sheet price <swipeId>` (free) prints it at 720p or a 480p draft, the whole
711
711
  video or the first take only, each with the most it can cost. The "about"
@@ -720,10 +720,11 @@ The rows:
720
720
  - **The saved sheet** (a kind that has one; One-take UGC today). The server
721
721
  keeps one for each swipe of such a kind, made after its write. For such a
722
722
  video this sheet's yes covers the write and its people only, and **It
723
- buys:** says so: "<n> scripts now, each with <k> people to pick from (at
724
- most $<most> for each script's people); each video after your yes on its
725
- saved sheet", with the people's part only when the dry write printed their
726
- price (People, below). The saved sheet and its yes come in step 4.
723
+ buys:** says so: "<n> scripts now, each with <k> people to pick from and
724
+ the animal when its script puts one in the picture (at most $<most> for each
725
+ script's people and animal); each video after your yes on its saved sheet",
726
+ with the people's part only when the dry write printed their price (People,
727
+ below). The saved sheet and its yes come in step 4.
727
728
  - **People** (a kind whose write can make them: One-take UGC, when the
728
729
  server offers people to pick from). Before you
729
730
  send the sheet, run that video's write line (step 4) without `--yes`: it
@@ -732,7 +733,14 @@ The rows:
732
733
  ("About $… for new people: …" and "At most $… in all: …") and the line to
733
734
  run: "On their yes, run the same command with --yes --people-max-usd
734
735
  <most>". Put that most on the sheet, as above: the sheet's yes is the yes to
735
- it. When the member gave a money limit and the people's most, added over
736
+ it. The same price names the animal: "A picture of the animal, if the
737
+ script puts one in the picture: $…". With that yes, the write also reads the
738
+ stored script for an animal it puts in the picture (the dog in a dog
739
+ product's ad) and draws one picture of it with the people, inside the same
740
+ most. The saved sheet shows it on the row "The animal", with its picture;
741
+ `exodus video swipe sheet set <swipeId> animal=none` takes it out of the
742
+ video (free). With no animal in the script the row says "No animal in the
743
+ script." and no picture is paid for. When the member gave a money limit and the people's most, added over
736
744
  every video on the sheet, is already over it, say so on the sheet and ask:
737
745
  no write goes out until what it can cost fits. When it prints no people's
738
746
  price, the write makes none. When the member
@@ -964,7 +972,10 @@ every video has started:
964
972
  write: its yes carried no --people-max-usd. See their price (free): …".
965
973
  With the figure, the write waits for the people (a line ending "Waiting for
966
974
  them, up to 5 minutes."), then prints how their ask ended and each person
967
- with their picture's address. Show each person's name and picture. Read the
975
+ with their picture's address. The animal, when the script puts one in the
976
+ picture, is on the saved sheet's row "The animal" a few minutes later
977
+ (`exodus video swipe sheet <swipeId>` shows it with its picture's address);
978
+ a start waits for it while it is still being made. Show each person's name and picture. Read the
968
979
  write's own lines; never assume one is recommended. When the ask names one
969
980
  ("Person N is recommended." and why), the write says "A start with no pick
970
981
  films person N, the recommended one." When it names none, it says "… films
@@ -98,6 +98,34 @@ export class SourceMapRefusal extends FirstCutError {
98
98
  readonly findings: SourceMapFinding[];
99
99
  }
100
100
 
101
+ /** A heard word on the cut's clock before its speed-up. */
102
+ export interface CutWordRow { text: string; start: number; end: number; scene: number }
103
+
104
+ /** #4585: the heard words the end card would cover; empty with no card or when every word ends before it. */
105
+ export function voiceUnderEndCard(rows: CutWordRow[], endCard: { in: number } | null): CutWordRow[];
106
+
107
+ /** #4585: the staff message of a cut refused because the end card would cover some of its voice. */
108
+ export function voiceUnderEndCardMessage(words: CutWordRow[]): string;
109
+
110
+ /** #4585: the end card's place and length, after the last heard word; `holdSec` is how long the picture runs on under it. */
111
+ export function endCardLayersOf(
112
+ brand: unknown, storyboard: unknown, pictureSec: number, speed?: number, voiceEndSec?: number | null,
113
+ ): { file: string; in: number; out: number; seconds: number; holdSec?: number } | null;
114
+
115
+ /** #4585: the seconds between the last heard word's end and the end card. */
116
+ export const END_CARD_AFTER_VOICE_SEC: number;
117
+
118
+ /** #4585: the end card on the cut, holding the last scene's picture under it; throws VoiceUnderEndCardRefusal when it would cover a word. */
119
+ export function placeEndCard(
120
+ timeline: unknown, brand: unknown, storyboard: unknown, pictureSec: number, speed: number, notes: string[],
121
+ ): ReturnType<typeof endCardLayersOf>;
122
+
123
+ /** #4585: the end card would cover some of the cut's voice, so the cut is not delivered. */
124
+ export class VoiceUnderEndCardRefusal extends FirstCutError {
125
+ constructor(words: CutWordRow[]);
126
+ readonly words: CutWordRow[];
127
+ }
128
+
101
129
  export interface SourceMapFinding {
102
130
  /** "refuse" stops the cut and nothing is delivered; "declared" is a measured fact the cut carries out. */
103
131
  severity: "refuse" | "declared";
@@ -2196,9 +2196,11 @@ function trimTemplateTerminalSilence(file, timeline, manifest, board, notes) {
2196
2196
  if (Math.max(authoredEnd, reservedEnd, resolvedEnd) > silenceStart + 1 / FPS) notes.push(
2197
2197
  `terminal-silence-authored: measured -50dB EOF silence starts ${silenceStart.toFixed(3)}s; ` +
2198
2198
  `resolved picture/acting reservation retained through ${Math.max(authoredEnd, reservedEnd, resolvedEnd).toFixed(3)}s, not claimed observed`);
2199
+ // #4585: the end card is quiet after the voice on purpose, so a cut with one is never trimmed short of its end.
2200
+ const cardEnd = timeline.endCard ? Math.max(0, ...timeline.spine.map((seg) => seg.startSec + seg.seconds)) : 0;
2199
2201
  const frames = Math.max(Math.ceil(silenceStart * FPS - 1e-6),
2200
2202
  Math.floor((lastWord + .3) * FPS + 1e-6), Math.ceil(authoredEnd * FPS - 1e-6),
2201
- Math.ceil(reservedEnd * FPS - 1e-6), Math.ceil(resolvedEnd * FPS - 1e-6));
2203
+ Math.ceil(reservedEnd * FPS - 1e-6), Math.ceil(resolvedEnd * FPS - 1e-6), Math.ceil(cardEnd * FPS - 1e-6));
2202
2204
  if (frames >= media.picture.frames || frames <= 0) return false;
2203
2205
  const endSec = frames / FPS;
2204
2206
  const spine = timeline.spine.filter((seg) => seg.startSec < endSec).map((seg) => {
@@ -3996,9 +3998,12 @@ export function buildFfmpegArgs(timeline, { resolve, music, out, finish = null,
3996
3998
  const [fadeIn, fadeOut] = [seg.fadeInSec ?? EDGE_FADE_SEC, seg.fadeOutSec ?? EDGE_FADE_SEC];
3997
3999
  // A cubic rise keeps a reaction's quiet start near silent until its laugh (#2666).
3998
4000
  const rise = fadeIn > EDGE_FADE_SEC ? ":curve=cub" : "";
4001
+ // #4585: the end card's held picture runs on in silence after the segment's own sound has faded out.
4002
+ const sounding = seg.seconds - (seg.endCardHoldSec ?? 0);
3999
4003
  const fitLength =
4000
- `apad,atrim=0:${sec(seg.seconds)},afade=t=in:d=${sec(fadeIn)}${rise},` +
4001
- `afade=t=out:st=${sec(seg.seconds - fadeOut)}:d=${sec(fadeOut)}`;
4004
+ `apad,atrim=0:${sec(sounding)},afade=t=in:d=${sec(fadeIn)}${rise},` +
4005
+ `afade=t=out:st=${sec(sounding - fadeOut)}:d=${sec(fadeOut)}` +
4006
+ (seg.endCardHoldSec ? `,apad,atrim=0:${sec(seg.seconds)}` : "");
4002
4007
  const fitSound = `${level},${fitLength}`;
4003
4008
  if (seg.wholeVoice) {
4004
4009
  filters.push(`anullsrc=r=48000:cl=stereo,atrim=0:${sec(seg.seconds)}[a${i}]`);
@@ -4100,25 +4105,28 @@ export function buildFfmpegArgs(timeline, { resolve, music, out, finish = null,
4100
4105
  );
4101
4106
  videoLabel = `pin${j}`;
4102
4107
  });
4103
- // endCardLayers: the brand's ground over the whole frame, then the pack photo in its box, pushing in slowly.
4108
+ // endCardLayers: the brand's ground over the whole frame and the pack photo in its box, pushing in slowly, made as
4109
+ // one card on its own clock and dissolved in over the last picture (#4585: never the ground alone, never black).
4104
4110
  if (finish?.endCard) {
4105
4111
  const e = finish.endCard;
4106
4112
  const box = END_CARD_PHOTO_BOX;
4107
4113
  const w = even((box[2] - box[0]) * WIDTH);
4108
4114
  const h = even((box[3] - box[1]) * HEIGHT);
4109
4115
  const frames = Math.max(1, Math.round(e.seconds * FPS));
4110
- const k = addInput("-loop", "1", "-t", sec(e.seconds), "-i", resolve(e.file));
4111
- filters.push(`color=c=0x${e.colors.background}:s=${WIDTH}x${HEIGHT}:r=${FPS}:d=${sec(e.out)},format=yuv420p[ecground]`);
4112
- filters.push(`[${videoLabel}][ecground]overlay=enable=between(t\\,${sec(e.in)}\\,${sec(e.out)}):eof_action=pass[ecg]`);
4116
+ const length = sec(e.out - e.in);
4117
+ const k = addInput("-loop", "1", "-t", length, "-i", resolve(e.file));
4118
+ filters.push(`color=c=0x${e.colors.background}:s=${WIDTH}x${HEIGHT}:r=${FPS}:d=${length},format=yuv420p[ecground]`);
4113
4119
  filters.push(
4114
4120
  `[${k}:v]fps=${FPS},scale=${w}:${h}:force_original_aspect_ratio=decrease,` +
4115
4121
  `pad=${w}:${h}:(ow-iw)/2:(oh-ih)/2:color=0x${e.colors.background},setsar=1,` +
4116
4122
  `zoompan=z=1+${END_CARD_PUSH_IN}*on/${frames}:x=iw/2-(iw/zoom/2):y=ih/2-(ih/zoom/2):d=1:s=${w}x${h}:fps=${FPS},` +
4117
- `format=yuv420p,fade=t=in:st=0:d=${END_CARD_PHOTO_FADE_SEC},setpts=PTS-STARTPTS+${sec(e.in)}/TB[ecpic]`,
4123
+ `format=yuv420p[ecpic]`,
4118
4124
  );
4119
4125
  filters.push(
4120
- `[ecg][ecpic]overlay=x=${Math.round(box[0] * WIDTH)}:y=${Math.round(box[1] * HEIGHT)}:enable=between(t\\,${sec(e.in)}\\,${sec(e.out)}):eof_action=pass[ecard]`,
4126
+ `[ecground][ecpic]overlay=x=${Math.round(box[0] * WIDTH)}:y=${Math.round(box[1] * HEIGHT)},` +
4127
+ `format=yuva420p,fade=t=in:st=0:d=${END_CARD_FADE_SEC}:alpha=1,setpts=PTS-STARTPTS+${sec(e.in)}/TB[ecbody]`,
4121
4128
  );
4129
+ filters.push(`[${videoLabel}][ecbody]overlay=enable=between(t\\,${sec(e.in)}\\,${sec(e.out)}):eof_action=pass[ecard]`);
4122
4130
  videoLabel = "ecard";
4123
4131
  }
4124
4132
  const speed = finish?.speed > 1 ? finish.speed : null;
@@ -4340,7 +4348,8 @@ export function sceneTimes(timeline, exact = false) {
4340
4348
  .filter((c) => c.seconds > 0)
4341
4349
  .map((c) => ({ from: c.startSec, to: c.startSec + c.seconds }));
4342
4350
  const visible = timeline.spine.flatMap((seg) => {
4343
- let pieces = [{ from: seg.startSec, to: seg.startSec + seg.seconds }];
4351
+ // #4585: the picture held under the end card is the card's, not the scene's.
4352
+ let pieces = [{ from: seg.startSec, to: seg.startSec + seg.seconds - (seg.endCardHoldSec ?? 0) }];
4344
4353
  for (const c of covers) {
4345
4354
  pieces = pieces.flatMap((p) =>
4346
4355
  c.to <= p.from || c.from >= p.to
@@ -4917,40 +4926,45 @@ export function sourceAdPaceShots(sourceAd) {
4917
4926
  }
4918
4927
 
4919
4928
  /**
4920
- * endCardLayers and brandCheck (Plan 14): the manifest's `brand`, written by
4921
- * the worker beside `finishing`: the product's pack photo it downloaded
4922
- * (`packPhoto`, a file in the folder), the product's name, the scenes whose
4923
- * picture the pull's rule draws from that photo (`photoScenes`), the end
4924
- * card's length and the brand's colours (hex), each optional. Null when the
4925
- * manifest has none, so a cut without it is the one it always was.
4929
+ * How long the end card shows, the same for every brand: Daniel's ruling on COP-309 (2026-11-14, #4585), "the card
4930
+ * comes up just after the last spoken word and shows for about 2 seconds, so nothing said is covered".
4926
4931
  */
4927
- export const END_CARD_LAYERS_SEC = 6;
4928
- export const END_CARD_MIN_SEC = 5;
4929
- export const END_CARD_MAX_SEC = 8;
4932
+ export const END_CARD_LAYERS_SEC = 2;
4930
4933
  /** The end card's colours when the brand gives none: a near-black ground, white words, a white call-to-action box. */
4931
4934
  export const END_CARD_COLORS = { background: "111111", text: "FFFFFF", accent: "FFFFFF" };
4932
4935
  /** Where the pack photo sits on the end card, as shares of the frame, and how far it pushes in across the card. */
4933
4936
  export const END_CARD_PHOTO_BOX = [0.1, 0.1, 0.9, 0.56];
4934
4937
  export const END_CARD_PUSH_IN = 0.05;
4935
- /** The words build in one after another, this far apart, after the photo has faded in. */
4936
- const END_CARD_WORD_STEP_SEC = 0.6;
4937
- const END_CARD_PHOTO_FADE_SEC = 0.4;
4938
+ /**
4939
+ * #4585: the card dissolves in over the last picture in END_CARD_FADE_SEC, so its ground never shows alone before the
4940
+ * photo, and its words build in one after another, this far apart, each fading in over END_CARD_WORD_FADE_MS, as the
4941
+ * dissolve ends. On a 2 s card the headline is fully on screen for 1.65 s, the offer 1.5 s, the call to action 1.35 s.
4942
+ */
4943
+ const END_CARD_WORD_STEP_SEC = 0.15;
4944
+ const END_CARD_FADE_SEC = 0.2;
4945
+ const END_CARD_WORD_FADE_MS = 150;
4938
4946
  /** A spoken call to action longer than this many words is too long to letter; the card then shows none. */
4939
4947
  const END_CARD_CTA_MAX_WORDS = 8;
4940
4948
 
4941
4949
  const hexColour = (value) => (typeof value === "string" && /^#?[0-9a-f]{6}$/i.test(value.trim()) ? value.trim().replace(/^#/, "").toUpperCase() : null);
4942
4950
 
4951
+ /**
4952
+ * endCardLayers and brandCheck (Plan 14): the manifest's `brand`, written by
4953
+ * the worker beside `finishing`: the product's pack photo it downloaded
4954
+ * (`packPhoto`, a file in the folder), the product's name, the scenes whose
4955
+ * picture the pull's rule draws from that photo (`photoScenes`) and the
4956
+ * brand's colours (hex), each optional. Null when the manifest has none, so a
4957
+ * cut without it is the one it always was.
4958
+ */
4943
4959
  export function brandOf(manifest) {
4944
4960
  const b = manifest?.brand;
4945
4961
  if (!b || typeof b !== "object") return null;
4946
4962
  const text = (v) => (hasText(v) ? v.trim() : null);
4947
4963
  const colors = b.colors && typeof b.colors === "object" ? b.colors : {};
4948
- const seconds = Number.isFinite(b.endCardSec) ? Math.min(END_CARD_MAX_SEC, Math.max(END_CARD_MIN_SEC, b.endCardSec)) : END_CARD_LAYERS_SEC;
4949
4964
  return {
4950
4965
  packPhoto: text(b.packPhoto),
4951
4966
  productName: text(b.productName),
4952
4967
  photoScenes: Array.isArray(b.photoScenes) ? b.photoScenes.filter((n) => Number.isInteger(n)) : [],
4953
- endCardSec: seconds,
4954
4968
  colors: {
4955
4969
  background: hexColour(colors.background) ?? END_CARD_COLORS.background,
4956
4970
  text: hexColour(colors.text) ?? END_CARD_COLORS.text,
@@ -4983,28 +4997,81 @@ export function endCardWords(storyboard, productName = null) {
4983
4997
  };
4984
4998
  }
4985
4999
 
5000
+ /** #4585: the end card comes up this long after the last heard word ends. */
5001
+ export const END_CARD_AFTER_VOICE_SEC = 0.3;
5002
+
4986
5003
  /**
4987
- * endCardLayers: the ad's last `endCardSec` seconds of screen time (`speed`
5004
+ * endCardLayers: the ad's last END_CARD_LAYERS_SEC seconds of screen time (`speed`
4988
5005
  * is the cut's speed-up, applied after) become the end card: the brand's
4989
5006
  * ground colour, the pack photo pushing in slowly, and the words drawn by
4990
- * code over it. The sound runs on under it as cut, so the call to action is
4991
- * heard over the card. Never more than half the ad. Null without a pack photo.
5007
+ * code over it. Never more than half the ad. Null without a pack photo.
5008
+ * #4585: the card never covers a heard word. When the last word (`voiceEndSec`,
5009
+ * on the cut's clock before the speed-up) ends inside those seconds, the card
5010
+ * comes up just after it, and `holdSec` is how much longer the picture must run
5011
+ * under the card so the card keeps its length.
4992
5012
  */
4993
- export function endCardLayersOf(brand, storyboard, pictureSec, speed = 1) {
5013
+ export function endCardLayersOf(brand, storyboard, pictureSec, speed = 1, voiceEndSec = null) {
4994
5014
  if (!brand?.packPhoto) return null;
4995
- const seconds = Math.min(brand.endCardSec * speed, pictureSec / 2);
5015
+ const seconds = Math.min(END_CARD_LAYERS_SEC * speed, pictureSec / 2);
4996
5016
  if (!(seconds > 0)) return null;
4997
- const at = roundMs(Math.max(0, pictureSec - seconds));
5017
+ // Only a card that would cover a word moves; one that comes up after the last word stays where it was.
5018
+ const waits = Number.isFinite(voiceEndSec) && voiceEndSec > Math.max(0, pictureSec - seconds) + 1e-3;
5019
+ const afterVoice = waits ? voiceEndSec + END_CARD_AFTER_VOICE_SEC : 0;
5020
+ const at = roundMs(Math.max(0, waits ? afterVoice : pictureSec - seconds));
5021
+ // Whole frames, so the held picture ends on the cut's own frame clock.
5022
+ const holdSec = waits ? Math.max(0, Math.ceil((at + seconds - pictureSec) * FPS - 1e-6)) / FPS : 0;
5023
+ const end = pictureSec + holdSec;
4998
5024
  return {
4999
5025
  file: brand.packPhoto,
5000
5026
  in: at,
5001
- out: roundMs(pictureSec + 1),
5002
- seconds: roundMs(pictureSec - at),
5027
+ out: roundMs(end + 1),
5028
+ seconds: roundMs(end - at),
5029
+ ...(holdSec > 0 ? { holdSec } : {}),
5003
5030
  words: endCardWords(storyboard, brand.productName),
5004
5031
  colors: brand.colors,
5005
5032
  };
5006
5033
  }
5007
5034
 
5035
+ /**
5036
+ * #4585: the heard words the end card would cover, so they would play with no picture of their scene. Each is a word
5037
+ * row (the cut's clock before the speed-up). Empty with no card, or when every word ends before the card comes up.
5038
+ */
5039
+ export function voiceUnderEndCard(rows, endCard) {
5040
+ return endCard ? rows.filter((r) => r.end > endCard.in + 1e-3) : [];
5041
+ }
5042
+
5043
+ /**
5044
+ * #4585: the end card on the cut. It comes up after the last heard word, and the last scene's picture runs on under it
5045
+ * (its sound faded out where it ends, then silence), so the card keeps its length. A cut laid on its measured map
5046
+ * cannot run on past its picture, so its card keeps the ad's last seconds. A card that would cover a heard word refuses
5047
+ * the cut (VoiceUnderEndCardRefusal). What it did goes in `notes`.
5048
+ */
5049
+ export function placeEndCard(timeline, brand, storyboard, pictureSec, speed, notes) {
5050
+ const rows = wordRows(timeline);
5051
+ const voiceEndSec = timeline.mapped ? null : Math.max(...rows.map((r) => r.end));
5052
+ const card = endCardLayersOf(brand, storyboard, pictureSec, speed, voiceEndSec);
5053
+ if (card?.holdSec) {
5054
+ const last = timeline.spine.at(-1);
5055
+ last.endCardHoldSec = card.holdSec;
5056
+ last.holdSec = (last.holdSec ?? 0) + card.holdSec;
5057
+ last.seconds += card.holdSec;
5058
+ notes.push(`the end card waits for the last word, so the ad runs ${card.holdSec.toFixed(2)}s longer under it`);
5059
+ }
5060
+ const covered = voiceUnderEndCard(rows, card);
5061
+ if (covered.length > 0) throw new VoiceUnderEndCardRefusal(covered);
5062
+ if (card) timeline.endCard = { in: card.in, out: card.out };
5063
+ return card;
5064
+ }
5065
+
5066
+ /** The staff message of a cut refused because the end card would cover some of its voice (VoiceUnderEndCardRefusal). */
5067
+ export function voiceUnderEndCardMessage(words) {
5068
+ const scenes = [...new Set(words.map((r) => r.scene))].sort((a, b) => a - b);
5069
+ const named = scenes.length > 1 ? `scenes ${scenes.slice(0, -1).join(", ")} and ${scenes.at(-1)}` : `scene ${scenes[0]}`;
5070
+ const from = Math.min(...words.map((r) => r.start));
5071
+ const to = Math.max(...words.map((r) => r.end));
5072
+ return `The end card would cover the voice of ${named} from ${from.toFixed(2)}s to ${to.toFixed(2)}s, so the cut was not attached`;
5073
+ }
5074
+
5008
5075
  /** An ASS colour (&HAABBGGRR) from a hex RRGGBB. */
5009
5076
  const assColour = (hex, alpha = "00") => `&H${alpha}${hex.slice(4, 6)}${hex.slice(2, 4)}${hex.slice(0, 2)}`;
5010
5077
 
@@ -5019,7 +5086,7 @@ function endCardStyles(colors, H) {
5019
5086
  ];
5020
5087
  }
5021
5088
 
5022
- /** The end card's words, building in one after another after the photo. `at` writes a time of the cut's clock. */
5089
+ /** The end card's words, building in one after another as the card's dissolve ends. `at` writes a time of the cut's clock. */
5023
5090
  function endCardDialogues(e, W, H, at = assTime) {
5024
5091
  const rows = [
5025
5092
  ["EndHead", e.words.headline, 0.64],
@@ -5027,8 +5094,8 @@ function endCardDialogues(e, W, H, at = assTime) {
5027
5094
  ["EndCta", e.words.cta, 0.82],
5028
5095
  ].filter(([, words]) => hasText(words));
5029
5096
  return rows.map(([style, words, y], k) => {
5030
- const from = roundMs(e.in + END_CARD_PHOTO_FADE_SEC + k * END_CARD_WORD_STEP_SEC);
5031
- return `Dialogue: 5,${at(from)},${at(e.out)},${style},,0,0,0,,{\\pos(${W / 2},${Math.round(H * y)})\\fad(250,0)}${assText(words)}`;
5097
+ const from = roundMs(e.in + END_CARD_FADE_SEC + k * END_CARD_WORD_STEP_SEC);
5098
+ return `Dialogue: 5,${at(from)},${at(e.out)},${style},,0,0,0,,{\\pos(${W / 2},${Math.round(H * y)})\\fad(${END_CARD_WORD_FADE_MS},0)}${assText(words)}`;
5032
5099
  });
5033
5100
  }
5034
5101
 
@@ -5339,11 +5406,12 @@ export function takesOf(timeline, plans, speed = 1) {
5339
5406
  const last = takes.at(-1);
5340
5407
  const endsOnReaction = Boolean(timeline.spine[i + 1]?.reaction);
5341
5408
  if (last && last.n === seg.sceneIndex && last.lastSeg === i - 1) {
5342
- Object.assign(last, { takeSec: last.takeSec + seg.seconds, lastSeg: i, endsOnReaction });
5409
+ Object.assign(last, { takeSec: last.takeSec + seg.seconds - (seg.endCardHoldSec ?? 0), lastSeg: i, endsOnReaction });
5343
5410
  return;
5344
5411
  }
5412
+ // #4585: the picture held under the end card is not the take's.
5345
5413
  takes.push({
5346
- n: seg.sceneIndex, start: seg.startSec, takeSec: seg.seconds, dialogue: seg.audio === "clip",
5414
+ n: seg.sceneIndex, start: seg.startSec, takeSec: seg.seconds - (seg.endCardHoldSec ?? 0), dialogue: seg.audio === "clip",
5347
5415
  planSec: plans.get(seg.sceneIndex)?.durationSec ?? 0, lastSeg: i, endsOnReaction,
5348
5416
  });
5349
5417
  });
@@ -5857,6 +5925,15 @@ function mediaReader(here, exists) {
5857
5925
  export const sourceMapPath = (outPath) =>
5858
5926
  path.join(path.dirname(outPath), `${path.basename(outPath, path.extname(outPath))}.source-map.json`);
5859
5927
 
5928
+ /** #4585: the end card would cover some of the cut's voice (voiceUnderEndCard), so the cut is not delivered. */
5929
+ export class VoiceUnderEndCardRefusal extends FirstCutError {
5930
+ constructor(words) {
5931
+ super(1, voiceUnderEndCardMessage(words));
5932
+ this.name = "VoiceUnderEndCardRefusal";
5933
+ this.words = words;
5934
+ }
5935
+ }
5936
+
5860
5937
  /** A required text/fulfillment obligation cannot be claimed as delivered. */
5861
5938
  export class TextFinishRefusal extends FirstCutError {
5862
5939
  constructor(holds) {
@@ -6995,7 +7072,7 @@ export function firstCut({ dir, out: outOpt, skip = new Set(), music: musicOn =
6995
7072
  const packPhoto = Boolean(brand?.packPhoto) && exists(brand.packPhoto);
6996
7073
  let endLayers = null;
6997
7074
  if (finish?.endCardLayers) {
6998
- endLayers = packPhoto ? endCardLayersOf(brand, storyboard, pictureSec, speed) : null;
7075
+ endLayers = packPhoto ? placeEndCard(timeline, brand, storyboard, pictureSec, speed, notes) : null;
6999
7076
  if (!endLayers) notes.push("the pull has no pack photo of the product, so the end card was not drawn");
7000
7077
  }
7001
7078
  if (finish && (finish.captions || finish.cards || endLayers) && !stagedText) {
@@ -539,6 +539,8 @@ export declare function priceLines(price: SwipePrice, dashboardUrl: string): str
539
539
  export declare function swipeSheetPriceFlow(swipeId: string, opts: SwipeOpts, deps: VideoDeps): Promise<FlowResult>;
540
540
  export declare function swipeSheetPeopleFlow(swipeId: string, count: number | null, maxUsd: number | null, opts: SwipeRunOptions, deps: VideoDeps): Promise<FlowResult>;
541
541
  export declare function swipeSheetVoicesFlow(swipeId: string, opts: SwipeOpts, deps: VideoDeps): Promise<FlowResult>;
542
+ export declare const ANIMAL_WAIT_LINE = "The animal the script puts in the picture is being found and drawn for this swipe. The start waits for it, until 5 minutes after the write asked for it, so the video films the one on the sheet and does not pay to find and draw it again.";
543
+ export declare const ANIMAL_GOES_ON_LINE = "The animal is still being found or drawn 5 minutes after the write asked for it, so the start goes on: the video looks for an animal in the script itself and draws one when it finds one.";
542
544
  export declare const SWIPE_ALREADY_STARTED_CODE = "SWIPE_ALREADY_STARTED";
543
545
  export declare function alreadyStartedOf(res: ApiResponse<unknown>): {
544
546
  runId: string;
@@ -251,9 +251,9 @@ export function planSwipeCommand(rest, occurrences) {
251
251
  return usage(`video swipe write --kind needs the key of a kind of ad. ${KIND_CHECKED}`);
252
252
  const peopleMost = value("people-max-usd");
253
253
  if (peopleMost === null)
254
- return usage("video swipe write --people-max-usd needs the people's most the write showed, such as 1.32.");
254
+ return usage("video swipe write --people-max-usd needs the people's most the write showed, such as 1.52.");
255
255
  if (peopleMost !== undefined && !/^\d+(\.\d{1,2})?$/.test(peopleMost.trim())) {
256
- return usage(`video swipe write --people-max-usd takes a dollar amount, such as 1.32 (got "${peopleMost}").`);
256
+ return usage(`video swipe write --people-max-usd takes a dollar amount, such as 1.52 (got "${peopleMost}").`);
257
257
  }
258
258
  const noPeople = last("people")?.flag === "no-people";
259
259
  if (peopleMost !== undefined && noPeople)
@@ -1153,7 +1153,7 @@ export async function swipeWriteFlow(breakdownId, ask, opts, deps) {
1153
1153
  const out = progress(opts);
1154
1154
  out.say("Writing the brand's version on the member's key. It takes four to nine minutes.");
1155
1155
  if (ask.peopleMaxUsd !== undefined) {
1156
- out.say(`Once the script is stored, the people to pick from are made, or taken from an earlier write of this ad with at most one check of their pictures paid; at most ${usd(ask.peopleMaxUsd)} on the member's keys.`);
1156
+ out.say(`Once the script is stored, the people to pick from are made, or taken from an earlier write of this ad with at most one check of their pictures paid, and the script is read for an animal it puts in the picture, whose picture is drawn when it has one; at most ${usd(ask.peopleMaxUsd)} on the member's keys for all of it.`);
1157
1157
  }
1158
1158
  const ended = await poll(() => deps.get(`${SWIPES_PATH}?job=${encodeURIComponent(job)}`), (polled) => {
1159
1159
  if (!polled.ok)
@@ -1738,15 +1738,8 @@ export async function swipeSheetVoicesFlow(swipeId, opts, deps) {
1738
1738
  ],
1739
1739
  };
1740
1740
  }
1741
- async function peopleBeforeStart(swipeId, opts, deps) {
1742
- let first = null;
1743
- try {
1744
- const res = await deps.get(peopleSheetPath(swipeId));
1745
- first = res.ok ? sheetOf(res.data) : null;
1746
- }
1747
- catch {
1748
- first = null;
1749
- }
1741
+ async function peopleBeforeStart(swipeId, opts, deps, read) {
1742
+ const first = read !== undefined ? read : await readSheetForStart(swipeId, deps);
1750
1743
  const who = first ? rowOfSheet(first.sheet, "who") : undefined;
1751
1744
  if (!who)
1752
1745
  return null;
@@ -1773,6 +1766,40 @@ async function peopleBeforeStart(swipeId, opts, deps) {
1773
1766
  return { lines: [...out.kept, ...(sentence ? [sentence] : []), ...(films ? [films] : [])], stillMaking: false, waited: true, who: ended.done.who };
1774
1767
  }
1775
1768
  const PEOPLE_MADE_WAIT_MS = 5 * 60_000;
1769
+ async function readSheetForStart(swipeId, deps) {
1770
+ try {
1771
+ const res = await deps.get(peopleSheetPath(swipeId));
1772
+ return res.ok ? sheetOf(res.data) : null;
1773
+ }
1774
+ catch {
1775
+ return null;
1776
+ }
1777
+ }
1778
+ export const ANIMAL_WAIT_LINE = "The animal the script puts in the picture is being found and drawn for this swipe. The start waits for it, until 5 minutes after the write asked for it, so the video films the one on the sheet and does not pay to find and draw it again.";
1779
+ export const ANIMAL_GOES_ON_LINE = "The animal is still being found or drawn 5 minutes after the write asked for it, so the start goes on: the video looks for an animal in the script itself and draws one when it finds one.";
1780
+ async function animalBeforeStart(swipeId, first, opts, deps) {
1781
+ const animal = first ? rowOfSheet(first.sheet, "animal") : undefined;
1782
+ if (animal?.optionsStatus?.making !== true)
1783
+ return { sheet: first, lines: [] };
1784
+ const out = progress(opts);
1785
+ const leftMs = PEOPLE_MADE_WAIT_MS - Math.max(0, animal.optionsStatus.makingForMs ?? 0);
1786
+ if (leftMs <= 0) {
1787
+ out.say(ANIMAL_GOES_ON_LINE);
1788
+ return { sheet: first, lines: out.kept };
1789
+ }
1790
+ out.say(ANIMAL_WAIT_LINE);
1791
+ let last = first;
1792
+ const ended = await poll(() => deps.get(peopleSheetPath(swipeId)), (res) => {
1793
+ const sheet = res.ok ? sheetOf(res.data) : null;
1794
+ if (!sheet)
1795
+ return { done: false };
1796
+ last = sheet;
1797
+ return rowOfSheet(sheet.sheet, "animal")?.optionsStatus?.making === true ? null : { done: true };
1798
+ }, Math.ceil(leftMs / POLL_MS), deps, deps.now() + leftMs);
1799
+ if (!("done" in ended) || !ended.done)
1800
+ out.say(ANIMAL_GOES_ON_LINE);
1801
+ return { sheet: last, lines: out.kept };
1802
+ }
1776
1803
  const checksOnly = (who, aged) => aged && who.optionsStatus?.making === true && typeof who.optionsStatus.count !== "number";
1777
1804
  function goesOnLine(who, aged, why) {
1778
1805
  const checking = checksOnly(who, aged);
@@ -1819,9 +1846,14 @@ export async function swipeStartFlow(swipeId, ask, opts, deps, again = false, wa
1819
1846
  if (!opts.yes) {
1820
1847
  return startNeedsYes(swipeId, ask.oneShot ? "start-one-shot" : "start", json, again, again ? ["With --again: a second video from this swipe, even if it already has one. It is paid on its own."] : [], deps);
1821
1848
  }
1822
- const people = waitPeople ? await peopleBeforeStart(swipeId, opts, deps) : null;
1849
+ const animal = waitPeople ? await animalBeforeStart(swipeId, await readSheetForStart(swipeId, deps), opts, deps) : null;
1850
+ const people = waitPeople ? await peopleBeforeStart(swipeId, opts, deps, animal?.sheet ?? null) : null;
1823
1851
  if (people)
1824
- return withPeopleWait(await swipeStartFlow(swipeId, ask, opts, deps, again), people, json);
1852
+ return withPeopleWait(await swipeStartFlow(swipeId, ask, opts, deps, again), { ...people, lines: [...(animal?.lines ?? []), ...people.lines] }, json);
1853
+ if (animal && animal.lines.length > 0) {
1854
+ const result = await swipeStartFlow(swipeId, ask, opts, deps, again);
1855
+ return json ? result : { ...result, lines: [...animal.lines, ...result.lines] };
1856
+ }
1825
1857
  if (ask.maxUsd !== undefined) {
1826
1858
  const unheld = await maxUsdUnsupported(swipeId, ask.maxUsd, deps);
1827
1859
  if (unheld)
@@ -94,7 +94,7 @@ export type ArtifactSubset = {
94
94
  type: "image";
95
95
  imageUrl?: string;
96
96
  storageId?: string;
97
- anchor?: "set-plate" | "product-sheet" | "filled-plate" | "product-plate" | "layout-plate";
97
+ anchor?: "set-plate" | "product-sheet" | "filled-plate" | "product-plate" | "layout-plate" | "animal-plate";
98
98
  holds?: string[];
99
99
  lid?: "closed";
100
100
  camera?: string;
@@ -561,9 +561,12 @@ swipe write also makes people to pick from for a kind whose sheet has a person,
561
561
  when the server offers them: without --yes it says their price too, and the
562
562
  yes line carries their most (--people-max-usd <n>). The write then makes 4 on
563
563
  the member's own keys once the script is stored, waits a few minutes for them
564
- and shows each, with the one a check of the faces recommends. --yes alone, or
565
- --no-people, writes without them. swipe start waits while people are being
566
- made, until 5 minutes after they were asked for.
564
+ and shows each, with the one a check of the faces recommends. Inside the same
565
+ most it also reads the stored script for an animal it puts in the picture and
566
+ draws one picture of it: the sheet's row "The animal" shows it, and swipe sheet
567
+ set <swipeId> animal=none takes it out. --yes alone, or --no-people, writes
568
+ without them. swipe start waits while people or the animal are being made,
569
+ until 5 minutes after they were asked for.
567
570
  The template picks the kind of ad: swipe template prints it and its look, so
568
571
  ask the member before the write. A swipe run has no picks stop and no pilot
569
572
  clip; it stops at the storyboard unless --one-shot. --wait on swipe and swipe
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@aicopycoders/exodus",
3
- "version": "2026.11.1200-beta.15",
3
+ "version": "2026.11.1200-beta.16",
4
4
  "description": "CLI + Claude Code skills for the Copycoders Exodus ad pipeline",
5
5
  "repository": {
6
6
  "type": "git",