@aicopycoders/exodus 2026.11.1200-beta.19 → 2026.11.1200-beta.20

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.
@@ -288,6 +288,7 @@ export function finishingOf(manifest) {
288
288
  ...(f.pacePass === true ? { pacePass: true } : {}),
289
289
  ...(f.pacePass === true && paceSpeedOk(f.paceSpeed) ? { paceSpeed: f.paceSpeed } : {}),
290
290
  ...(f.captionCheck === true ? { captionCheck: true } : {}),
291
+ ...(f.keepPauses === true ? { keepPauses: true } : {}),
291
292
  };
292
293
  if (!Object.values(on).some(Boolean) && Object.keys(added).length === 0) return null;
293
294
  const target = f.targetSeconds;
@@ -956,8 +957,12 @@ export function asksPause(line) {
956
957
  * script words, inside a sentence too, keeps jump.keepAfter after the earlier
957
958
  * word and jump.keepBefore before the later one instead (jumpCutSpan), on
958
959
  * whole frames. The pauses kept above stay kept.
960
+ *
961
+ * gapMax (COP-350, keepPauses): the longest silence between two sentences that
962
+ * is kept whole, SENTENCE_GAP_MAX_SEC unless given. Infinity shortens no pause,
963
+ * and only a sound in a break is cut.
959
964
  */
960
- export function sentenceGapCuts(words, lines, levels = null, lineGap = null, jump = null) {
965
+ export function sentenceGapCuts(words, lines, levels = null, lineGap = null, jump = null, gapMax = SENTENCE_GAP_MAX_SEC) {
961
966
  const written = [];
962
967
  const pieces = [];
963
968
  let between = "";
@@ -999,11 +1004,11 @@ export function sentenceGapCuts(words, lines, levels = null, lineGap = null, jum
999
1004
  const sound = heard && { s: Math.max(floorFrame(heard.s), ceilFrame(earlier.e)), e: ceilFrame(heard.e) };
1000
1005
  const removed = sound ? sound.e - sound.s : 0;
1001
1006
  const spans = sound ? [sound] : [];
1002
- const [gapMax, gapKeep] =
1003
- lineGap && newLine ? [lineGap.max, lineGap.keep] : [SENTENCE_GAP_MAX_SEC, SENTENCE_GAP_KEEP_SEC];
1007
+ const [breakMax, gapKeep] =
1008
+ lineGap && newLine ? [lineGap.max, lineGap.keep] : [gapMax, SENTENCE_GAP_KEEP_SEC];
1004
1009
  // jumpCut: a pause over its longest keeps its two edges, with a sound in it taken out whole.
1005
1010
  const jumped = Boolean(jump) && gap - removed > jump.maxGap + 1e-6;
1006
- const paused = jumped || (sentenceBreak && gap - removed > gapMax + 1e-6);
1011
+ const paused = jumped || (sentenceBreak && gap - removed > breakMax + 1e-6);
1007
1012
  if (paused) {
1008
1013
  // Placed on the gap with the sound already out, then moved back past it.
1009
1014
  // Frame edges only ever widen what is kept, so the silence left stays
@@ -1107,7 +1112,7 @@ function clipLevels(file, filter = null) {
1107
1112
  /** Decoded final-mix levels; callers must not attribute an event to these whole-mix windows. */
1108
1113
  export const measureCutAudio = (file) => clipLevels(file);
1109
1114
 
1110
- function tightenSentenceGaps(spine, reactionCues, scriptLines, readLevels, lineGap = null, jump = null, templateBoard = null, editingTreatment = null, notes = []) {
1115
+ function tightenSentenceGaps(spine, reactionCues, scriptLines, readLevels, lineGap = null, jump = null, templateBoard = null, editingTreatment = null, notes = [], gapMax = SENTENCE_GAP_MAX_SEC) {
1111
1116
  for (const seg of spine) {
1112
1117
  if (seg.source !== "clip" || seg.audio !== "clip" || !seg.words?.length || seg.fixedLength) continue;
1113
1118
  const lines = seg.lineIds.map((id) => ({
@@ -1129,7 +1134,7 @@ function tightenSentenceGaps(spine, reactionCues, scriptLines, readLevels, lineG
1129
1134
  }) : null;
1130
1135
  const sentenceCuts = templateBoard
1131
1136
  ? edit && lineGap ? sentenceGapCuts(seg.words, lines, null, lineGap) : []
1132
- : sentenceGapCuts(seg.words, lines, readLevels(seg.file), lineGap, jump);
1137
+ : sentenceGapCuts(seg.words, lines, readLevels(seg.file), lineGap, jump, gapMax);
1133
1138
  const jumpCuts = (edit?.cuts ?? []).map((gap) => ({
1134
1139
  s: gap.startSec, e: gap.endSec, after: "speech", gap: gap.endSec - gap.startSec, kept: 0,
1135
1140
  atLine: sentenceCuts.find((cut) => cut.s < gap.endSec && cut.e > gap.startSec)?.atLine,
@@ -3285,8 +3290,14 @@ function assembleTimeline({
3285
3290
  const lineGap = pace ? { max: PACE_SPLIT_PAUSE_SEC, keep: PACE_GAP_MAX_SEC } : null;
3286
3291
  // jumpCut stays off a template launch's cut, whose selected clocks and windows hold their real time.
3287
3292
  const jump = finish?.jumpCut && manifest?.templateMotion?.enabled !== true ? JUMP_CUT : null;
3288
- tightenSentenceGaps(spine, reactionCues, scriptLines, readLevels, lineGap, jump, template ? storyboard : null,
3289
- template ? manifest.templateMotion.editingTreatment : null, notes);
3293
+ // keepPauses (COP-350, a run's saved sheet): no pause inside a talking clip is shortened, neither a long sentence gap
3294
+ // nor jumpCut's (no gap limit, no jump, no split); a sound in a break that is no heard word is still cut (#2554). A
3295
+ // template launch's own speech edit runs as before.
3296
+ const keepPauses = finish?.keepPauses === true && !template;
3297
+ if (keepPauses) notes.push("keepPauses: no pause inside a clip is shortened; a sound in one that is no heard word is still cut");
3298
+ tightenSentenceGaps(spine, reactionCues, scriptLines, readLevels, keepPauses ? null : lineGap, keepPauses ? null : jump,
3299
+ template ? storyboard : null, template ? manifest.templateMotion.editingTreatment : null, notes,
3300
+ keepPauses ? Infinity : SENTENCE_GAP_MAX_SEC);
3290
3301
  trimJoins(spine, reactionCues, scriptLines, pace ? PACE_GAP_MAX_SEC : null, finish?.talkTrim === true);
3291
3302
  if (pace) {
3292
3303
  // The pieces of one take alternate between the plain frame and the
@@ -106,6 +106,11 @@ export interface CustomerRun {
106
106
  atBoard?: boolean;
107
107
  beforePictures: boolean;
108
108
  };
109
+ place?: {
110
+ name: string;
111
+ look: string;
112
+ imageUrl: string | null;
113
+ };
109
114
  }
110
115
  export declare function spendAskLines(run: {
111
116
  spendAsk?: {
@@ -183,6 +183,16 @@ export function customerStageLines(run, page) {
183
183
  `Watch it here: ${page}`,
184
184
  ];
185
185
  case "review":
186
+ if (noPictureBeforeApproval(run) && run.place) {
187
+ return [
188
+ "Your script, place and voice are waiting for your yes. No take is filmed before you approve.",
189
+ run.place.imageUrl
190
+ ? `The place: ${run.place.imageUrl}`
191
+ : "The picture of the place didn't come out. It is drawn when you approve, before the takes are filmed.",
192
+ `Read them: exodus video storyboard ${id}`,
193
+ `Approve them: exodus video approve ${id}`,
194
+ ];
195
+ }
186
196
  if (noPictureBeforeApproval(run)) {
187
197
  return [
188
198
  "Your script and voice are waiting for your yes. No take gets a picture before you approve.",
@@ -284,6 +284,7 @@ export type SwipePriceRow = {
284
284
  lines: Array<{
285
285
  what: string;
286
286
  usd: number;
287
+ beforeStop?: true;
287
288
  }>;
288
289
  startRefusal?: string;
289
290
  } | {
@@ -1620,9 +1620,12 @@ async function startNeedsYes(swipeId, step, json, again, choice, deps) {
1620
1620
  const { buys, paidBy } = PAID[step];
1621
1621
  if (json)
1622
1622
  return { code: 0, lines: [JSON.stringify({ ok: false, needsYes: true, buys, paidBy, price })] };
1623
+ const before = price.picked.lines.filter((line) => line.beforeStop === true);
1623
1624
  const when = step === "start-one-shot"
1624
1625
  ? "paid from the start: the whole video is made with no stop"
1625
- : "paid once the storyboard is approved: the run stops there first";
1626
+ : before.length > 0
1627
+ ? `paid once the storyboard is approved, but for ${before.map((line) => `${line.what.charAt(0).toLowerCase()}${line.what.slice(1)} (${lineUsd(line.usd)})`).join(" and ")}, made before the run stops there`
1628
+ : "paid once the storyboard is approved: the run stops there first";
1626
1629
  return {
1627
1630
  code: 0,
1628
1631
  lines: [
@@ -1946,7 +1949,7 @@ export async function swipeStartFlow(swipeId, ask, opts, deps, again = false, wa
1946
1949
  "",
1947
1950
  ask.oneShot
1948
1951
  ? "The app approves the storyboard itself if its checks pass. It only stops for you if they find a problem."
1949
- : "It stops at the storyboard for the member's yes. Nothing else is bought before then.",
1952
+ : "It stops at the storyboard for the member's yes. The voices and clips are bought only after that yes.",
1950
1953
  `Check in whenever: exodus video status ${runId}`,
1951
1954
  ],
1952
1955
  };
@@ -349,6 +349,9 @@ export type RunStop = {
349
349
  heldReason?: string;
350
350
  blockingMap?: true;
351
351
  noPictureBeforeApproval?: true;
352
+ place?: {
353
+ imageUrl: string | null;
354
+ };
352
355
  } | {
353
356
  at: "final-watch";
354
357
  missingScenes?: MissingScene[];
@@ -9,8 +9,8 @@ import { missingRouteLine } from "../lib/route-support.js";
9
9
  import { probeDurationSec } from "../lib/preflight.js";
10
10
  import { composeTemplateBrief } from "../lib/templateBrief.js";
11
11
  import { scriptApprovalExpiresAt, scriptApprovalNeedsReview } from "../lib/script-approval.js";
12
- import { ASSET_UPLOAD_POLICY, pauseAheadLine, parseVoicesFlag, } from "./workflow.js";
13
- import { HELPER_LEDGER_BASE, SET_OPTION_LEDGER_BASE } from "../lib/helperLedgerBase.js";
12
+ import { ASSET_UPLOAD_POLICY, boardDrawsThePlaceFirst, pauseAheadLine, parseVoicesFlag, } from "./workflow.js";
13
+ import { HELPER_LEDGER_BASE, ONE_TAKE_BOARD_PLACE_LEDGER_INDEX, SET_OPTION_LEDGER_BASE } from "../lib/helperLedgerBase.js";
14
14
  import { ONE_TAKE_HOLD_CODES } from "../lib/oneTakeHolds.js";
15
15
  import { customerAnswer, customerRunPage, customerStageIsWorking, finalApproveLines, finalApprovedLines, customerCutHeld, customerStageLines, customerStatusLines, customerStoryboardLines, customerVoicesLines, speechSummaryLines, spendAskLines, onOwnDashboard, } from "./video-customer.js";
16
16
  import { planSwipeCommand, runSwipePlan } from "./video-swipe.js";
@@ -1036,6 +1036,10 @@ export function resolveStop(stop, cutAttached, items) {
1036
1036
  const hasLine = (n) => (stop.silentScenes?.includes(n) ? false : undefined);
1037
1037
  return { ...stop, checks: stop.sceneIndexes.map((n) => pilotCheck(n, clipOf(n), hasLine(n))) };
1038
1038
  }
1039
+ if (stop.at === "storyboard-gate") {
1040
+ const place = stop.noPictureBeforeApproval ? placeAtStop(items, stop.nodeId) : undefined;
1041
+ return place ? { ...stop, place } : stop;
1042
+ }
1039
1043
  if (stop.at !== "final-watch")
1040
1044
  return stop;
1041
1045
  const named = heldTakesOf(stop.heldScenes, items);
@@ -1054,6 +1058,14 @@ export function resolveStop(stop, cutAttached, items) {
1054
1058
  ...(items && hasAppCut(items) ? { appCutOnRun: true } : {}),
1055
1059
  };
1056
1060
  }
1061
+ function placeAtStop(items, boardNodeId) {
1062
+ const row = items?.find((i) => i.nodeId === boardNodeId && i.itemKind === "frame" && i.sceneIndex === ONE_TAKE_BOARD_PLACE_LEDGER_INDEX);
1063
+ if (row?.status === "done" && row.artifact?.type === "image" && row.artifact.imageUrl)
1064
+ return { imageUrl: row.artifact.imageUrl };
1065
+ if (row?.status === "failed")
1066
+ return { imageUrl: null };
1067
+ return undefined;
1068
+ }
1057
1069
  export function appCutOutdates(run) {
1058
1070
  return run.appCut === "making" && run.moduleKey === "script-video";
1059
1071
  }
@@ -1226,17 +1238,26 @@ export function stopLines(stop, runId, runUrl, videoPage) {
1226
1238
  if (stop.at === "storyboard-gate") {
1227
1239
  const lines = [
1228
1240
  ...(stop.heldReason ? [stop.heldReason] : []),
1229
- ...(stop.noPictureBeforeApproval
1241
+ ...(stop.noPictureBeforeApproval && stop.place
1230
1242
  ? [
1231
- "Parked: the script and the voice are waiting for your yes. No take gets a picture before you approve.",
1243
+ "Parked: the script, the place and the voice are waiting for your yes. No take is filmed before you approve.",
1244
+ stop.place.imageUrl
1245
+ ? `The place: ${stop.place.imageUrl}`
1246
+ : "The picture of the place didn't come out. It is drawn when you approve, before the takes are filmed.",
1232
1247
  `Read them: exodus video storyboard ${runId}`,
1233
1248
  `Approve them: exodus video approve ${runId}`,
1234
1249
  ]
1235
- : [
1236
- "Parked: the storyboard is waiting for your yes.",
1237
- `Read it: exodus video storyboard ${runId}`,
1238
- `Approve it: exodus video approve ${runId}`,
1239
- ]),
1250
+ : stop.noPictureBeforeApproval
1251
+ ? [
1252
+ "Parked: the script and the voice are waiting for your yes. No take gets a picture before you approve.",
1253
+ `Read them: exodus video storyboard ${runId}`,
1254
+ `Approve them: exodus video approve ${runId}`,
1255
+ ]
1256
+ : [
1257
+ "Parked: the storyboard is waiting for your yes.",
1258
+ `Read it: exodus video storyboard ${runId}`,
1259
+ `Approve it: exodus video approve ${runId}`,
1260
+ ]),
1240
1261
  ];
1241
1262
  if (stop.showAd) {
1242
1263
  lines.push(`Send back: exodus video flag ${runId} --note "what's wrong"`);
@@ -3986,6 +4007,10 @@ export async function waitFlow(runId, opts, deps) {
3986
4007
  continue;
3987
4008
  }
3988
4009
  let items = null;
4010
+ if (stop.at === "storyboard-gate" && stop.noPictureBeforeApproval) {
4011
+ const itemsRes = await deps.get(`${ITEMS_PATH}?runId=${encodeURIComponent(runId)}`).catch(() => null);
4012
+ items = itemsRes?.ok ? (itemsRes.data.items ?? []) : null;
4013
+ }
3989
4014
  if (stop.at === "pilot") {
3990
4015
  const itemsRes = await deps.get(`${ITEMS_PATH}?runId=${encodeURIComponent(runId)}`);
3991
4016
  items = itemsRes.ok ? (itemsRes.data.items ?? []) : null;
@@ -4171,7 +4196,7 @@ export async function statusFlow(runId, json, deps) {
4171
4196
  headline,
4172
4197
  ...(carryingOn(run) ? [CARRYING_ON_LINE] : []),
4173
4198
  ...guidance,
4174
- ...(stop.at === "running" && run.pauseAhead ? [pauseAheadLine(run.pauseAhead)] : []),
4199
+ ...(stop.at === "running" && run.pauseAhead ? [pauseAheadLine(run.pauseAhead, { placeFirst: boardDrawsThePlaceFirst(run) })] : []),
4175
4200
  ...planFailureLines(failedStoryboard, runId),
4176
4201
  ...said.map((w) => `Heads-up (${w.step}): ${w.warning}`),
4177
4202
  ...(run.director ? ["", ...directorLines(run.director)] : []),
@@ -463,7 +463,16 @@ export interface WorkflowRun {
463
463
  selfApproves?: true;
464
464
  };
465
465
  }
466
- export declare function pauseAheadLine(ahead: NonNullable<WorkflowRun["pauseAhead"]>): string;
466
+ export declare function boardDrawsThePlaceFirst(run: {
467
+ moduleKey?: string;
468
+ nodes?: ReadonlyArray<{
469
+ kind: string;
470
+ status?: string;
471
+ }>;
472
+ }): boolean;
473
+ export declare function pauseAheadLine(ahead: NonNullable<WorkflowRun["pauseAhead"]>, opts?: {
474
+ placeFirst?: boolean;
475
+ }): string;
467
476
  export type WorkflowRunProjection = Omit<WorkflowRun, "nodes"> & {
468
477
  nodes?: never;
469
478
  };
@@ -380,7 +380,10 @@ export function formatRulesLine(provenance) {
380
380
  : "";
381
381
  return `Format rules: ${rigName}${version}${where}.${borrowed}`;
382
382
  }
383
- export function pauseAheadLine(ahead) {
383
+ export function boardDrawsThePlaceFirst(run) {
384
+ return run.moduleKey === "script-video" && !(run.nodes ?? []).some((n) => n.kind === "scene-frames" && n.status !== "out-of-scope");
385
+ }
386
+ export function pauseAheadLine(ahead, opts = {}) {
384
387
  if (ahead.after === "picks") {
385
388
  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.";
386
389
  }
@@ -390,6 +393,9 @@ export function pauseAheadLine(ahead) {
390
393
  if (ahead.after === "frames" && ahead.selfApproves) {
391
394
  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).";
392
395
  }
396
+ if (ahead.after === "storyboard" && opts.placeFirst) {
397
+ return "This run will pause for your approval once the takes are written and one picture of the place is drawn (a few cents). No take is filmed until you approve.";
398
+ }
393
399
  return ahead.after === "frames"
394
400
  ? "This run will pause for your approval once the frames are ready. The reference, cast and scene pictures are made first (a few cents each). Nothing bigger is spent until you approve."
395
401
  : "This run will pause for your approval once the storyboard is written. Nothing is spent on pictures, voices or clips until you approve.";
@@ -1268,7 +1274,7 @@ export function formatWorkflowRun(run) {
1268
1274
  }
1269
1275
  if (run.pauseAhead) {
1270
1276
  lines.push("");
1271
- lines.push(pauseAheadLine(run.pauseAhead));
1277
+ lines.push(pauseAheadLine(run.pauseAhead, { placeFirst: boardDrawsThePlaceFirst(run) }));
1272
1278
  }
1273
1279
  const parkedNodeId = gateParkedNodeId(run.status, run.pauseReason, run.pausedNodeId);
1274
1280
  if (run.nodes.length > 0) {
@@ -1,3 +1,4 @@
1
1
  export declare const HELPER_LEDGER_BASE = 900000;
2
2
  export declare const SET_OPTION_LEDGER_BASE = 920000;
3
3
  export declare const CAST_OPTION_LEDGER_BASE = 960000;
4
+ export declare const ONE_TAKE_BOARD_PLACE_LEDGER_INDEX: number;
@@ -1,3 +1,4 @@
1
1
  export const HELPER_LEDGER_BASE = 900000;
2
2
  export const SET_OPTION_LEDGER_BASE = 920000;
3
3
  export const CAST_OPTION_LEDGER_BASE = 960000;
4
+ export const ONE_TAKE_BOARD_PLACE_LEDGER_INDEX = HELPER_LEDGER_BASE + 9100;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@aicopycoders/exodus",
3
- "version": "2026.11.1200-beta.19",
3
+ "version": "2026.11.1200-beta.20",
4
4
  "description": "CLI + Claude Code skills for the Copycoders Exodus ad pipeline",
5
5
  "repository": {
6
6
  "type": "git",