@koda-sl/baker-cli 0.354.0 → 0.355.0-dev.c2de9a6fe

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.
package/dist/cli.js CHANGED
@@ -68,7 +68,7 @@ import {
68
68
  validateCanvasDeep,
69
69
  withoutCastName,
70
70
  ytDlpBlockSignal
71
- } from "./chunk-4HRJQGVW.js";
71
+ } from "./chunk-B7MLH3K6.js";
72
72
  import {
73
73
  csvOrJson,
74
74
  daysAgoIso,
@@ -39896,10 +39896,18 @@ function dropUncastVoices(nodes) {
39896
39896
  if (node && node.type === "voice_select" && !referenced.has(node.id)) nodes.splice(i, 1);
39897
39897
  }
39898
39898
  }
39899
- function scaffoldVideoCanvas(input, elementsInput, opts) {
39899
+ function framesReuseRefusal(blueprint, elements, requested) {
39900
+ if (requested !== "reuse") return void 0;
39901
+ const showsPeople = (blueprint.global?.cast ?? []).length > 0 || elements.some((e) => e.type.toLowerCase() === "person");
39902
+ if (!showsPeople) return void 0;
39903
+ return "--frames reuse was not applied: this video shows people, and reusing its frames would put the source's actors into our ad. Every frame is generated instead, recast to the el_* references. Reuse applies only to a video with nobody in it.";
39904
+ }
39905
+ function scaffoldVideoCanvas(input, elementsInput, requested) {
39900
39906
  const blueprint = VideoBlueprint.parse(input);
39901
39907
  injectHookPhysicality(blueprint);
39902
39908
  const elements = RecurringElements.parse(elementsInput);
39909
+ const reuseRefused = framesReuseRefusal(blueprint, elements, requested.frames);
39910
+ const opts = reuseRefused ? { ...requested, frames: "generate" } : requested;
39903
39911
  const clock = spineClockFor(blueprint);
39904
39912
  const nodes = [];
39905
39913
  emitBlueprintIngests(opts, nodes);
@@ -40006,6 +40014,7 @@ function scaffoldVideoCanvas(input, elementsInput, opts) {
40006
40014
  }
40007
40015
  const todo = {
40008
40016
  ...buildVideoTodo(videoReport(input, elementsInput), overlays.length, floating.length, opts, blueprint),
40017
+ ...reuseRefused ? { frames_reuse_refused: reuseRefused } : {},
40009
40018
  ...aspectRemapTodo(resolveAspect(blueprint.source?.aspect_ratio, opts.aspect, genAspectsFor(opts.videoModel))),
40010
40019
  model_constraints: buildModelConstraints()
40011
40020
  };
@@ -44813,6 +44822,12 @@ function videoDefinitionDescription(blueprint) {
44813
44822
  const product = g.branding?.product;
44814
44823
  return typeof product === "string" && product.trim() ? product.trim() : void 0;
44815
44824
  }
44825
+ function framesModeReport(canvas, requested) {
44826
+ const todo = canvas.metadata?.todo;
44827
+ const mode = typeof todo?.frames_mode === "string" ? todo.frames_mode : requested;
44828
+ const refused = typeof todo?.frames_reuse_refused === "string" ? todo.frames_reuse_refused : void 0;
44829
+ return { frames_mode: mode, ...refused ? { frames_reuse_refused: refused } : {} };
44830
+ }
44816
44831
  async function materializeReferenceVideo(fileArg2) {
44817
44832
  if (!/^https?:\/\//i.test(fileArg2)) return path26.resolve(fileArg2);
44818
44833
  let bytes;
@@ -44970,7 +44985,10 @@ var scaffoldVideoCommand = defineCommand116({
44970
44985
  type: "string",
44971
44986
  description: "Creative slug \u2014 writes the canvas to src/creatives/<slug>/<slug>.canvas.json (repo convention)"
44972
44987
  },
44973
- frames: { type: "string", description: '"generate" (default, anchored regen) or "reuse" (wire real frames in)' },
44988
+ frames: {
44989
+ type: "string",
44990
+ description: `"generate" (default, every frame regenerated for our ad) or "reuse" (wire the source's real frames in). Reuse applies only to a video with nobody in it \u2014 on a video showing people it is refused and every frame is generated, so the source's actors never reach our ad.`
44991
+ },
44974
44992
  ambient: {
44975
44993
  type: "boolean",
44976
44994
  description: "Give silent b-roll scenes native diegetic ambient mixed deep under the music bed (off by default)"
@@ -45158,6 +45176,7 @@ var scaffoldVideoCommand = defineCommand116({
45158
45176
  error: { code: "validation", issues: validation.issues },
45159
45177
  canvas_path: outPath,
45160
45178
  prompt_path: blueprintPath,
45179
+ ...framesModeReport(canvas, frames),
45161
45180
  note: "The canvas WAS written despite the blocking issue(s) \u2014 fix them in place, then `baker canvas validate` before running."
45162
45181
  },
45163
45182
  null,
@@ -45207,7 +45226,7 @@ var scaffoldVideoCommand = defineCommand116({
45207
45226
  source_reference: sourceRef.url,
45208
45227
  composition_dir: compositionDest,
45209
45228
  output: canvas.output,
45210
- frames_mode: frames,
45229
+ ...framesModeReport(canvas, frames),
45211
45230
  models: {
45212
45231
  deconstruct: deconstructModel,
45213
45232
  select: selectModel,