@koda-sl/baker-cli 0.281.11-dev.0c0293389 → 0.286.0-dev.93be96120

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.
Files changed (30) hide show
  1. package/README.md +246 -109
  2. package/canvas/tiktok-captions-composition/index.html +2 -23
  3. package/dist/{chunk-2IUN3S3E.js → chunk-2IB3IL4K.js} +2 -2
  4. package/dist/{chunk-RHEQTHT7.js → chunk-D3HHUBIL.js} +4 -4
  5. package/dist/{chunk-WFWU3CHS.js → chunk-DZUVUGEP.js} +1 -9
  6. package/dist/{chunk-WFWU3CHS.js.map → chunk-DZUVUGEP.js.map} +1 -1
  7. package/dist/{chunk-XAUTT2Q6.js → chunk-EX2OIOVL.js} +7 -8
  8. package/dist/chunk-EX2OIOVL.js.map +1 -0
  9. package/dist/{chunk-P2PEABMQ.js → chunk-GU7IWEBC.js} +12 -5
  10. package/dist/chunk-GU7IWEBC.js.map +1 -0
  11. package/dist/{chunk-YNUBWTLR.js → chunk-LN5O53BG.js} +40 -172
  12. package/dist/chunk-LN5O53BG.js.map +1 -0
  13. package/dist/cli.js +12431 -7382
  14. package/dist/cli.js.map +1 -1
  15. package/dist/client-VDCCDEHE.js +17 -0
  16. package/dist/engine/index.js +3 -3
  17. package/dist/{env-C7YXL6C6.js → env-FWMZXMQK.js} +2 -6
  18. package/dist/{output-ALQGBDPQ.js → output-4H2RNBXL.js} +5 -5
  19. package/dist/{shared-UKJH3PS7.js → shared-UKL36AXT.js} +6 -6
  20. package/package.json +1 -1
  21. package/dist/chunk-P2PEABMQ.js.map +0 -1
  22. package/dist/chunk-XAUTT2Q6.js.map +0 -1
  23. package/dist/chunk-YNUBWTLR.js.map +0 -1
  24. package/dist/client-KOUPT7HU.js +0 -15
  25. /package/dist/{chunk-2IUN3S3E.js.map → chunk-2IB3IL4K.js.map} +0 -0
  26. /package/dist/{chunk-RHEQTHT7.js.map → chunk-D3HHUBIL.js.map} +0 -0
  27. /package/dist/{client-KOUPT7HU.js.map → client-VDCCDEHE.js.map} +0 -0
  28. /package/dist/{env-C7YXL6C6.js.map → env-FWMZXMQK.js.map} +0 -0
  29. /package/dist/{output-ALQGBDPQ.js.map → output-4H2RNBXL.js.map} +0 -0
  30. /package/dist/{shared-UKJH3PS7.js.map → shared-UKL36AXT.js.map} +0 -0
@@ -1,25 +1,24 @@
1
1
  import {
2
2
  debugLogHttp,
3
3
  readBodyForLog
4
- } from "./chunk-2IUN3S3E.js";
4
+ } from "./chunk-2IB3IL4K.js";
5
5
  import {
6
6
  DIRECT_ROUTE,
7
7
  __commonJS,
8
8
  __toESM,
9
9
  captureProxyCredentials,
10
10
  childEnvWith,
11
- hasFrameVisionKey,
12
11
  isChallengeBody,
13
12
  isPrivateAddress,
14
13
  isProxyFailure,
15
14
  plannedRoutes,
16
15
  refuseNonPublicUrl,
17
16
  shouldEscalate
18
- } from "./chunk-WFWU3CHS.js";
17
+ } from "./chunk-DZUVUGEP.js";
19
18
 
20
- // ../../.pnpm-store/v10/links/@/safe-stable-stringify/2.5.0/88b6d0c76c4dff408de4044be85791896193f2435af7c280bc59312c3fb9649c/node_modules/safe-stable-stringify/index.js
19
+ // ../../.pnpm-store/v10/links/@/safe-stable-stringify/2.5.0/509a695c9237c6e3727f1f1f99169917f329e3ff3f7877be290b684e24bf153d/node_modules/safe-stable-stringify/index.js
21
20
  var require_safe_stable_stringify = __commonJS({
22
- "../../.pnpm-store/v10/links/@/safe-stable-stringify/2.5.0/88b6d0c76c4dff408de4044be85791896193f2435af7c280bc59312c3fb9649c/node_modules/safe-stable-stringify/index.js"(exports, module) {
21
+ "../../.pnpm-store/v10/links/@/safe-stable-stringify/2.5.0/509a695c9237c6e3727f1f1f99169917f329e3ff3f7877be290b684e24bf153d/node_modules/safe-stable-stringify/index.js"(exports, module) {
23
22
  "use strict";
24
23
  var { hasOwnProperty } = Object.prototype;
25
24
  var stringify = configure2();
@@ -1034,17 +1033,12 @@ function failureDetail(reason) {
1034
1033
  }
1035
1034
  return { message: describeFailureReason(reason) };
1036
1035
  }
1037
- function retryVerdict(retryable) {
1038
- if (retryable === true) return "transient \u2014 retry the run";
1039
- if (retryable === false) return "not retryable \u2014 retrying will not help, fix the input";
1040
- return "retryability unknown";
1041
- }
1042
1036
  function describeCause(c) {
1043
1037
  switch (c.kind) {
1044
1038
  case "local":
1045
1039
  return c.cause instanceof Error ? c.cause.message : String(c.cause);
1046
1040
  case "remote":
1047
- return `[${c.code}] ${c.message}${c.provider ? ` (${c.provider})` : ""} \u2014 ${retryVerdict(c.retryable)}`;
1041
+ return `[${c.code}] ${c.message}${c.provider ? ` (${c.provider})` : ""}`;
1048
1042
  case "timeout":
1049
1043
  return `timeout${c.provider ? ` (${c.provider})` : ""}`;
1050
1044
  case "network":
@@ -1098,7 +1092,7 @@ function resolveAdaptFormats(params) {
1098
1092
  return params.formats ?? [];
1099
1093
  }
1100
1094
 
1101
- // ../../.pnpm-store/v10/links/@/safe-stable-stringify/2.5.0/88b6d0c76c4dff408de4044be85791896193f2435af7c280bc59312c3fb9649c/node_modules/safe-stable-stringify/esm/wrapper.js
1095
+ // ../../.pnpm-store/v10/links/@/safe-stable-stringify/2.5.0/509a695c9237c6e3727f1f1f99169917f329e3ff3f7877be290b684e24bf153d/node_modules/safe-stable-stringify/esm/wrapper.js
1102
1096
  var import__ = __toESM(require_safe_stable_stringify(), 1);
1103
1097
  var configure = import__.default.configure;
1104
1098
  var wrapper_default = import__.default;
@@ -3141,7 +3135,7 @@ var VEO_DURATIONS = [4, 6, 8];
3141
3135
  var KLING_DURATIONS2 = [5, 10];
3142
3136
  var KLING_NEGATIVE_PROMPT = "warped face, distorted hands, extra fingers, morphing, flicker, on-screen text, watermark, low quality";
3143
3137
  var KLING_CFG_SCALE = 0.7;
3144
- var SPEAKS_PROSE = (line, accent) => `The person speaks to camera; lip-sync follows the dialogue verbatim, with delivery and emotion carried in the wording itself (no bracketed cues).${accent ? ` The speech is in ${accent}.` : ""} Dialogue: "${line}"`;
3138
+ var SPEAKS_PROSE = (line) => `The person speaks to camera; lip-sync follows the dialogue verbatim, with delivery and emotion carried in the wording itself (no bracketed cues). Dialogue: "${line}"`;
3145
3139
  var SEEDANCE_PROFILE = {
3146
3140
  id: "seedance",
3147
3141
  dialogueDirective: SPEAKS_PROSE,
@@ -5514,7 +5508,6 @@ var YtDlpError = class extends Error {
5514
5508
  this.stderrTail = stderrTail;
5515
5509
  this.name = "YtDlpError";
5516
5510
  }
5517
- stderrTail;
5518
5511
  };
5519
5512
  function tail(text, maxLines) {
5520
5513
  return text.split("\n").slice(-maxLines).join("\n");
@@ -7259,24 +7252,6 @@ import { execFile as execFile3 } from "child_process";
7259
7252
  import { readFile as readFile9 } from "fs/promises";
7260
7253
  import path12 from "path";
7261
7254
  import { promisify as promisify3 } from "util";
7262
-
7263
- // src/engine/nodes/local/lib/caption-style.ts
7264
- var TERMINAL = /[.,;:!?…]$/;
7265
- function captionTextsFrom(html) {
7266
- const cards = html.match(/<div[^>]*class="[^"]*\bcaption\b[^"]*"[\s\S]*?<\/div>/g) ?? [];
7267
- return cards.map(
7268
- (card) => card.replace(/<[^>]+>/g, "").replace(/\s+/g, " ").trim()
7269
- ).filter((text) => text.length > 0);
7270
- }
7271
- function fragmentedCaptions(texts) {
7272
- if (texts.length < 2) return null;
7273
- const fragments = texts.slice(0, -1).filter((t) => !TERMINAL.test(t));
7274
- if (fragments.length === 0) return null;
7275
- const example = fragments[0];
7276
- return `${fragments.length} of ${texts.length} caption cards end mid-clause, e.g. "${example}". Split captions where the script punctuates, not on a word count \u2014 a card that ends bare is a sentence cut in half by a timing decision, and it reads as one.`;
7277
- }
7278
-
7279
- // src/engine/nodes/local/lib/hyperframe-check.ts
7280
7255
  var execFileAsync = promisify3(execFile3);
7281
7256
  var NEVER_BLOCK = [
7282
7257
  /contrast/i,
@@ -7345,74 +7320,6 @@ function classifyCheckOutput(lintRaw, inspectRaw) {
7345
7320
  warnings: findings.filter((f) => f.severity === "warning")
7346
7321
  };
7347
7322
  }
7348
- var GATE_SECTIONS = ["lint", "runtime", "layout", "motion", "contrast"];
7349
- function buildCheckArgs(dir, samples) {
7350
- return ["hyperframes", "check", dir, "--json", "--samples", String(samples), "--at-transitions"];
7351
- }
7352
- var PROMOTE_TO_BLOCKING = /GSAP target [^ ]+ not found|no deterministic font mapping/i;
7353
- function toGateFinding(section, entry) {
7354
- const f = entry;
7355
- const code = typeof f.code === "string" ? f.code : "unknown";
7356
- const message2 = typeof f.message === "string" ? f.message : "";
7357
- const isError = f.severity === "error" || PROMOTE_TO_BLOCKING.test(message2);
7358
- const fatal = PROMOTE_TO_BLOCKING.test(message2);
7359
- return {
7360
- source: section,
7361
- code,
7362
- message: message2,
7363
- severity: fatal || isError && !isAdvisory(code, message2) ? "blocking" : "warning"
7364
- };
7365
- }
7366
- function classifyGateOutput(raw) {
7367
- const parsed = parseCheckJson(raw);
7368
- const findings = GATE_SECTIONS.flatMap((section) => {
7369
- const block = parsed?.[section];
7370
- const entries = Array.isArray(block?.findings) ? block.findings : [];
7371
- return entries.map((entry) => toGateFinding(section, entry));
7372
- });
7373
- return {
7374
- blocking: findings.filter((f) => f.severity === "blocking"),
7375
- warnings: findings.filter((f) => f.severity === "warning")
7376
- };
7377
- }
7378
- function summariseWarnings(warnings) {
7379
- const groups = /* @__PURE__ */ new Map();
7380
- for (const w of warnings) {
7381
- const key = `${w.source}/${w.code}`;
7382
- const seen = groups.get(key);
7383
- if (seen) seen.count += 1;
7384
- else groups.set(key, { count: 1, message: w.message });
7385
- }
7386
- return [...groups.entries()].sort((a, b) => b[1].count - a[1].count).map(([key, g]) => `${g.count}\xD7 [${key}] ${g.message}`);
7387
- }
7388
- var FINDING_ADVICE = {
7389
- sweep_static: "the timeline never advanced, so this renders as a STILL IMAGE while billing like a video \u2014 and every other green verdict in this run is unreliable. Check the composition registers a paused timeline on `window.__timelines[<composition-id>]` and that the tweens target elements that exist.",
7390
- console_error: "the composition threw in the browser, so whatever that script was driving did not happen.",
7391
- page_error: "a script failed to evaluate \u2014 animations and any JS-driven layout in this composition did not run.",
7392
- http_error: "an asset 404ed at render time; it will be missing from the frame, not substituted.",
7393
- console_warning: "if this names a GSAP target, the element it animates does not exist, so that tween is a no-op and whatever it was meant to reveal never appears. Fix the selector or add the element before rendering."
7394
- };
7395
- function explainGateFinding(finding) {
7396
- const advice = FINDING_ADVICE[finding.code];
7397
- return advice ? `${finding.message} \u2014 ${advice}` : finding.message;
7398
- }
7399
- function condenseFrameDescriptions(markdown) {
7400
- const lines = [];
7401
- let frame = null;
7402
- for (const line of markdown.split("\n")) {
7403
- const heading = line.match(/^## (.+)$/);
7404
- if (heading) {
7405
- frame = heading[1] ?? null;
7406
- continue;
7407
- }
7408
- const text = line.trim();
7409
- if (frame && text) {
7410
- lines.push(`${frame}: ${text}`);
7411
- frame = null;
7412
- }
7413
- }
7414
- return lines;
7415
- }
7416
7323
  function buildLintArgs(dir) {
7417
7324
  return ["hyperframes", "lint", dir, "--json"];
7418
7325
  }
@@ -7444,13 +7351,8 @@ async function lintStructuralIssues(dir, timeoutMs) {
7444
7351
  function buildInspectArgs(dir, samples) {
7445
7352
  return ["hyperframes", "inspect", dir, "--json", "--samples", String(samples)];
7446
7353
  }
7447
- function buildSnapshotArgs(dir, frames, vision) {
7448
- const base = ["hyperframes", "snapshot", dir, "--frames", String(frames)];
7449
- return vision ? [
7450
- ...base,
7451
- "--describe",
7452
- "Answer four things about this frame. (1) Is it empty or near-empty? Name every element actually visible. (2) Could what is shown physically happen \u2014 object sizes, human scale, and whether every object has its real-world form (a phone has ONE screen, on its front). Say so plainly if something is impossible. (3) Read out every number, currency symbol and word visible INSIDE the picture \u2014 phone screens, documents, signage \u2014 and say whether any of it contradicts the caption on this frame. (4) Is the caption legible against what is behind it?"
7453
- ] : [...base, "--describe", "false"];
7354
+ function buildSnapshotArgs(dir, frames) {
7355
+ return ["hyperframes", "snapshot", dir, "--frames", String(frames), "--describe", "false"];
7454
7356
  }
7455
7357
  function usesNestedCompositions(indexHtml) {
7456
7358
  const withoutComments = indexHtml.replace(/<!--[\s\S]*?-->/g, "");
@@ -7479,66 +7381,44 @@ async function runSnapshotSmoke(args, timeoutMs) {
7479
7381
  return { ok: false, unavailable: false, message: (err.stderr || err.message || "snapshot failed").slice(0, 800) };
7480
7382
  }
7481
7383
  }
7482
- async function runNestedCompositionSmoke(opts) {
7483
- const { dir, nodeId, ctx, timeoutMs, samples } = opts;
7484
- const indexHtml = await readFile9(path12.join(dir, "index.html"), "utf-8").catch(() => "");
7485
- if (!indexHtml || !usesNestedCompositions(indexHtml)) return;
7486
- const snap = await runSnapshotSmoke(
7487
- buildSnapshotArgs(dir, Math.min(samples, 3), hasFrameVisionKey()),
7488
- Math.max(timeoutMs, 12e4)
7489
- );
7490
- if (snap.unavailable) {
7491
- ctx.log(`${nodeId}: hyperframes snapshot unavailable \u2014 skipping nested-composition smoke test`);
7492
- return;
7493
- }
7494
- if (!snap.ok) {
7495
- throw new Error(
7496
- `${nodeId}: nested-composition smoke test failed \u2014 an embedded block did not render. Check the host\u2194block id match, that the block's <style>/<script> live inside its <template>, and that it styles #root (not a class).
7497
- ${snap.message}`
7498
- );
7499
- }
7500
- const described = await readFile9(path12.join(dir, "snapshots", "descriptions.md"), "utf-8").catch(() => "");
7501
- for (const line of condenseFrameDescriptions(described)) {
7502
- ctx.log(`${nodeId}: frame check \u2014 ${line}`);
7503
- }
7504
- ctx.log(`${nodeId}: nested-composition smoke test passed`);
7505
- }
7506
- async function runGate(dir, timeoutMs, samples) {
7507
- const checkRaw = await runOne(buildCheckArgs(dir, samples), timeoutMs);
7508
- if (checkRaw !== null) return classifyGateOutput(checkRaw);
7384
+ async function runHyperframesCheck(opts) {
7385
+ const { dir, nodeId, ctx, timeoutMs, samples = 5 } = opts;
7509
7386
  const [lintRaw, inspectRaw] = await Promise.all([
7510
7387
  runOne(buildLintArgs(dir), timeoutMs),
7511
7388
  runOne(buildInspectArgs(dir, samples), timeoutMs)
7512
7389
  ]);
7513
- if (lintRaw === null && inspectRaw === null) return null;
7514
- return classifyCheckOutput(lintRaw ?? "", inspectRaw ?? "");
7515
- }
7516
- async function runHyperframesCheck(opts) {
7517
- const { dir, nodeId, ctx, timeoutMs, samples = 5 } = opts;
7518
- const gate = await runGate(dir, timeoutMs, samples);
7519
- if (gate === null) {
7520
- ctx.log(`${nodeId}: hyperframes check/lint/inspect unavailable \u2014 skipping pre-render check`);
7390
+ if (lintRaw === null && inspectRaw === null) {
7391
+ ctx.log(`${nodeId}: hyperframes lint/inspect unavailable \u2014 skipping pre-render check`);
7521
7392
  return;
7522
7393
  }
7523
- const { blocking, warnings } = gate;
7524
- for (const line of summariseWarnings(warnings)) {
7525
- ctx.log(`${nodeId}: hyperframe check warning ${line}`);
7394
+ const { blocking, warnings } = classifyCheckOutput(lintRaw ?? "", inspectRaw ?? "");
7395
+ for (const w of warnings) {
7396
+ ctx.log(`${nodeId}: hyperframe check warning [${w.source}/${w.code}] ${w.message}`);
7526
7397
  }
7527
7398
  if (blocking.length > 0) {
7528
- const seen = /* @__PURE__ */ new Map();
7529
- for (const b of blocking) seen.set(`${b.source}/${b.code}/${b.message}`, b);
7530
- const detail = [...seen.values()].map((b) => `\u2022 [${b.source}/${b.code}] ${explainGateFinding(b)}`).join("\n");
7531
- throw new Error(
7532
- `${nodeId}: pre-render check failed (${blocking.length} blocking, ${seen.size} distinct)
7533
- ${detail}`
7534
- );
7399
+ const detail = blocking.map((b) => `\u2022 [${b.source}/${b.code}] ${b.message}`).join("\n");
7400
+ throw new Error(`${nodeId}: pre-render check failed (${blocking.length} blocking)
7401
+ ${detail}`);
7535
7402
  }
7536
- const composition = await readFile9(path12.join(dir, "index.html"), "utf-8").catch(() => "");
7537
- const captionComplaint = fragmentedCaptions(captionTextsFrom(composition));
7538
- if (captionComplaint) {
7539
- ctx.log(`${nodeId}: caption style \u2014 ${captionComplaint}`);
7403
+ let indexHtml = "";
7404
+ try {
7405
+ indexHtml = await readFile9(path12.join(dir, "index.html"), "utf-8");
7406
+ } catch {
7407
+ indexHtml = "";
7408
+ }
7409
+ if (indexHtml && usesNestedCompositions(indexHtml)) {
7410
+ const snap = await runSnapshotSmoke(buildSnapshotArgs(dir, Math.min(samples, 3)), Math.max(timeoutMs, 12e4));
7411
+ if (snap.unavailable) {
7412
+ ctx.log(`${nodeId}: hyperframes snapshot unavailable \u2014 skipping nested-composition smoke test`);
7413
+ } else if (!snap.ok) {
7414
+ throw new Error(
7415
+ `${nodeId}: nested-composition smoke test failed \u2014 an embedded block did not render. Check the host\u2194block id match, that the block's <style>/<script> live inside its <template>, and that it styles #root (not a class).
7416
+ ${snap.message}`
7417
+ );
7418
+ } else {
7419
+ ctx.log(`${nodeId}: nested-composition smoke test passed`);
7420
+ }
7540
7421
  }
7541
- await runNestedCompositionSmoke({ dir, nodeId, ctx, timeoutMs, samples });
7542
7422
  ctx.log(`${nodeId}: pre-render check passed (${warnings.length} warning${warnings.length === 1 ? "" : "s"})`);
7543
7423
  }
7544
7424
 
@@ -8478,7 +8358,7 @@ var imageSearchNode = delegated({
8478
8358
  id: "image_search",
8479
8359
  version: "1.0.0",
8480
8360
  category: "image",
8481
- summary: "Agentic image search across Google Images, stock photography (Freepik), and Pinterest. An LLM agent picks the search tools and queries, selects the best matches, and the results are downloaded into canvas assets.",
8361
+ summary: "Agentic image search across Google Images, free stock photography (Pexels and Pixabay), and Pinterest. An LLM agent picks the search tools and queries, selects the best matches, and the results are downloaded into canvas assets.",
8482
8362
  when_to_use: "Use to gather real-world reference or inspiration images for a prompt (e.g. several photos of an australian shepherd) so a later step or the user can pick the best one. Not for creating new imagery \u2014 use image_generate for that.",
8483
8363
  inputs: z23.object({}).loose(),
8484
8364
  params: ImageSearchParams,
@@ -9045,14 +8925,7 @@ async function tryExtractAudio(inputs, ctx) {
9045
8925
  import { z as z34 } from "zod";
9046
8926
  var voiceSelectNode = delegated({
9047
8927
  id: "voice_select",
9048
- // 1.1.0: a pinned voice used to come back as an inline `{ kind, text }` with no sha256
9049
- // and no mime, which every consumer taking the id as an INPUT rejected —
9050
- // `audio_voice_convert` died on `voice_ref.sha256: expected string, received undefined`.
9051
- // The backend now uploads it as a real asset like the ranked branch, and the version has
9052
- // to move with it: the cache key is built from this string, so entries written under
9053
- // 1.0.0 kept replaying the broken shape long after the fix was deployed. A node whose
9054
- // OUTPUT shape changes has to bump, not only one whose behaviour does.
9055
- version: "1.1.0",
8928
+ version: "1.0.0",
9056
8929
  category: "audio",
9057
8930
  summary: 'Cast an ElevenLabs voice from a natural-language description (e.g. "warm, authoritative female narrator, American accent"). Lists the account\'s voices and ranks them against the brief, emitting the best `voice_id` as a bare-string text asset plus a ranked `candidates` JSON.',
9058
8931
  when_to_use: 'Use to turn a voice description (e.g. from a `video_deconstruct` blueprint\'s `voice_description`) into a usable ElevenLabs voice id, then feed it into a `tts` node by wiring `inputs.voice_ref: $ref:<this>.voice_id` and setting `params.voice: "{{voice_ref}}"` \u2014 the engine splices the id in at run time. Review `candidates` (json) to pick a different voice. Optional `gender`/`age`/`accent`/`language` hints sharpen the ranking.',
@@ -9063,11 +8936,6 @@ var voiceSelectNode = delegated({
9063
8936
  age: z34.string().optional(),
9064
8937
  accent: z34.string().optional(),
9065
8938
  language: z34.string().optional(),
9066
- /**
9067
- * A voice already chosen — an Avatar's pinned one. Given, nothing is cast: the
9068
- * ranking is skipped and this id is emitted as-is.
9069
- */
9070
- voice_id: z34.string().min(1).max(120).optional(),
9071
8939
  limit: z34.number().int().min(1).max(20).optional()
9072
8940
  }).strict(),
9073
8941
  outputs: z34.object({ voice_id: TextRef, candidates: JsonRef }).strict(),
@@ -9285,4 +9153,4 @@ export {
9285
9153
  defaultRegistry,
9286
9154
  createEngineFromEnv
9287
9155
  };
9288
- //# sourceMappingURL=chunk-YNUBWTLR.js.map
9156
+ //# sourceMappingURL=chunk-LN5O53BG.js.map