@koda-sl/baker-cli 0.353.0-dev.5340e1062 → 0.353.0-dev.5d1d795f9

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/README.md CHANGED
@@ -5057,8 +5057,11 @@ Cast an ElevenLabs voice from a natural-language description (e.g. a blueprint's
5057
5057
  |---|---|---|---|
5058
5058
  | `description` | string | yes | the casting brief |
5059
5059
  | `gender` / `age` / `accent` / `language` | string | no | structured hints that sharpen the ranking |
5060
+ | `voice_id` | string | no | a voice already chosen — skips the ranking and emits it as-is |
5060
5061
  | `limit` | number | no | how many `candidates` to return (default 5) |
5061
5062
 
5063
+ `language` is strict: when no voice on the account speaks it, the node fails (`voice_language_unavailable`) before anything downstream is voiced. `gender` is strict within that language unless nobody there has it — then it is dropped and `baker canvas run` prints a `[warn]` naming the voice cast instead.
5064
+
5062
5065
  **Outputs** — `voice_id` (text, bare id) + `candidates` (json, ranked shortlist). Wire `voice_id` into a `tts` node: set `inputs.voice_ref: $ref:<this>.voice_id` and `params.voice: "{{voice_ref}}"` — the engine splices the id in at run time.
5063
5066
 
5064
5067
  **Cost** — free (voice listing). Generation is billed under `tts`/`dialogue`.
@@ -5553,7 +5556,7 @@ Resolves the run dir against `--outputs-dir` (default `./canvas`) or accepts an
5553
5556
 
5554
5557
  #### `baker canvas catalog`
5555
5558
 
5556
- Prints the agent-facing node catalog. By default it is a compact index (a few KB): `categories` (category → node ids), `nodes` (node id → one line) and `compositions` (the Hyperframes compositions the CLI ships: `id`, `title` and the absolute `dir` to copy from), plus `hints`. `compositions` is left out once `--node` or `--category` narrows the call. Ask for full JSON Schemas by name:
5559
+ Prints the agent-facing node catalog. By default it is a compact index (a few KB): `categories` (category → node ids) and `nodes` (node id → one line), plus `hints`. Ask for full JSON Schemas by name:
5557
5560
 
5558
5561
  - `--node <id>[,<id>…]` — those nodes' full entries: `id`, `version`, `location`, `category`, `summary`, `when_to_use`, `inputs`/`params`/`outputs` schemas, `cost_estimate_credits`, `runtime_estimate_seconds`.
5559
5562
  - `--category <name>` — narrow the index to one category; add `--full` for that category's full entries.
@@ -5565,7 +5568,6 @@ An unknown node or category exits 1 with `{ ok: false, error: { code: "NOT_FOUND
5565
5568
  baker canvas catalog
5566
5569
  baker canvas catalog --node video_generate
5567
5570
  baker canvas catalog --category audio --full
5568
- baker canvas catalog | jq '.compositions[].id'
5569
5571
  ```
5570
5572
 
5571
5573
  ---
@@ -5191,6 +5191,7 @@ var Engine = class {
5191
5191
  outputs[node.id] = hit.outputs;
5192
5192
  await this.materializeNodeOutputs(node.id, hit.outputs, writer);
5193
5193
  this.log(`[exec ] ${node.id.padEnd(20)} ${node.type.padEnd(20)} cached`);
5194
+ this.logOutputWarnings(node.id, hit.outputs);
5194
5195
  return { cached: true, credits: 0, durationMs: Date.now() - cacheT0 };
5195
5196
  }
5196
5197
  }
@@ -5233,8 +5234,18 @@ var Engine = class {
5233
5234
  }
5234
5235
  await this.materializeNodeOutputs(node.id, outputsObj, writer);
5235
5236
  this.log(`[exec ] ${node.id.padEnd(20)} ${node.type.padEnd(20)} fresh (${(elapsed / 1e3).toFixed(1)}s)`);
5237
+ this.logOutputWarnings(node.id, outputsObj);
5236
5238
  return { cached: false, credits, durationMs: elapsed };
5237
5239
  }
5240
+ /**
5241
+ * Print the warnings a node left on its outputs' metadata — a `voice_select` that
5242
+ * could not honor the requested gender, say. Left in the metadata alone they were
5243
+ * read only after the render was paid for and somebody listened. Printed on a
5244
+ * cached replay too: the output still carries the compromise.
5245
+ */
5246
+ logOutputWarnings(nodeId, outputs) {
5247
+ for (const warning of outputWarnings(outputs)) this.log(`[warn ] ${nodeId}: ${warning}`);
5248
+ }
5238
5249
  async materializeNodeOutputs(nodeId, outputs, writer) {
5239
5250
  for (const [name, value] of Object.entries(outputs)) {
5240
5251
  if (isAssetRef(value)) {
@@ -5279,6 +5290,16 @@ var Engine = class {
5279
5290
  return await fix(inputs);
5280
5291
  }
5281
5292
  };
5293
+ function refWarnings(ref) {
5294
+ if (!isAssetRef(ref)) return [];
5295
+ const warnings = ref.metadata?.warnings;
5296
+ if (!Array.isArray(warnings)) return [];
5297
+ return warnings.filter((w) => typeof w === "string" && w.length > 0);
5298
+ }
5299
+ function outputWarnings(outputs) {
5300
+ const refs = Object.values(outputs).flatMap((value) => Array.isArray(value) ? value : [value]);
5301
+ return [...new Set(refs.flatMap(refWarnings))];
5302
+ }
5282
5303
  function resolveRegenerateToken(node, forced, runId) {
5283
5304
  if (forced?.has(node.id)) return `run:${runId}`;
5284
5305
  if (node.regenerate !== void 0) return `node:${String(node.regenerate)}`;
@@ -9563,10 +9584,14 @@ var voiceSelectNode = delegated({
9563
9584
  // to move with it: the cache key is built from this string, so entries written under
9564
9585
  // 1.0.0 kept replaying the broken shape long after the fix was deployed. A node whose
9565
9586
  // OUTPUT shape changes has to bump, not only one whose behaviour does.
9566
- version: "1.1.0",
9587
+ // 1.2.0: `language` is a hard constraint — a language no voice on the account speaks
9588
+ // fails the node instead of casting a voice of another language, and a gender nobody
9589
+ // in the language has is relaxed with a printed warning. Bumped so a 1.1.0 cache entry
9590
+ // holding a wrong-language cast stops replaying.
9591
+ version: "1.2.0",
9567
9592
  category: "audio",
9568
9593
  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.',
9569
- 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.',
9594
+ 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. `language` is strict: when no voice on the account speaks it the node fails before anything is voiced (add a voice in that language, or pass its `voice_id`). A `gender` nobody in that language has is dropped and `baker canvas run` prints a `[warn]` naming the voice cast instead.',
9570
9595
  inputs: z34.object({}).loose(),
9571
9596
  params: z34.object({
9572
9597
  description: z34.string().min(1),
@@ -9609,8 +9634,7 @@ function generateCatalog(registry, opts = {}) {
9609
9634
  schema: "baker-canvas-catalog/2",
9610
9635
  generated_at: opts.generatedAt ?? (/* @__PURE__ */ new Date()).toISOString(),
9611
9636
  categories: groupIds(entries),
9612
- entries,
9613
- compositions: opts.compositions ?? []
9637
+ entries
9614
9638
  };
9615
9639
  }
9616
9640
  var INDEX_SUMMARY_MAX = 160;
@@ -9666,15 +9690,8 @@ function catalogView(catalog, opts) {
9666
9690
  const entries = catalog.entries.filter((e) => requestedIds.includes(e.id));
9667
9691
  return { ok: true, schema: catalog.schema, categories: groupIds(entries), entries };
9668
9692
  }
9669
- const compositions = opts.category === void 0 ? { compositions: catalog.compositions } : {};
9670
9693
  if (opts.full) {
9671
- return {
9672
- ok: true,
9673
- schema: catalog.schema,
9674
- categories,
9675
- entries: catalog.entries.filter(inCategory),
9676
- ...compositions
9677
- };
9694
+ return { ok: true, schema: catalog.schema, categories, entries: catalog.entries.filter(inCategory) };
9678
9695
  }
9679
9696
  const nodes = {};
9680
9697
  for (const e of catalog.entries.filter(inCategory)) nodes[e.id] = oneLine(e.summary);
@@ -9683,13 +9700,9 @@ function catalogView(catalog, opts) {
9683
9700
  schema: catalog.schema,
9684
9701
  categories,
9685
9702
  nodes,
9686
- ...compositions,
9687
9703
  hints: [
9688
9704
  "One node's params, inputs, outputs, models and when to use it: baker canvas catalog --node <id> (comma-separate several).",
9689
- "Every schema in a category: --category <name> --full. Every node: --full (large; prefer --node).",
9690
- ...opts.category === void 0 ? [
9691
- "compositions: ready-made motion graphics. Copy one's `dir` next to your canvas, then point a hyperframe_render or hyperframe_snapshot `params.composition` at the copy; its meta.json lists the params."
9692
- ] : []
9705
+ "Every schema in a category: --category <name> --full. Every node: --full (large; prefer --node)."
9693
9706
  ]
9694
9707
  };
9695
9708
  }
@@ -9879,7 +9892,6 @@ export {
9879
9892
  durationSeconds,
9880
9893
  canonicalUrl,
9881
9894
  toModelSafeImage,
9882
- loadCompositionMeta,
9883
9895
  catalogView,
9884
9896
  BackendClient2,
9885
9897
  Engine2 as Engine,
@@ -9891,4 +9903,4 @@ export {
9891
9903
  defaultRegistry,
9892
9904
  createEngineFromEnv
9893
9905
  };
9894
- //# sourceMappingURL=chunk-Q2VR3FVM.js.map
9906
+ //# sourceMappingURL=chunk-PHHQLFY3.js.map