@koda-sl/baker-cli 0.356.0 → 0.358.0

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
@@ -1426,8 +1426,8 @@ baker experiment plan --landing oferta --variant oferta--1 --goal submit:book-a-
1426
1426
  baker experiment start --landing oferta --variant oferta--1 --because "60% of visitors never scroll past the hero" --change "put the price in the headline"
1427
1427
  baker experiment update --id temp_exp_1 --goal submit:book-a-call # a staged test can still change what it measures
1428
1428
  baker experiment update --id a3f91c2b --because "…" # a live one can only change its wording
1429
- baker experiment status # the verdict on every test
1430
- baker experiment status --id a3f91c2b --full # one test, with the confidence and posteriors behind it
1429
+ baker experiment status # the verdict on every test, first; dates as calendar dates
1430
+ baker experiment status --id a3f91c2b --full # one test, with everything the dashboard reads and the posteriors
1431
1431
  baker experiment history --landing oferta # every finished test on a page: claim, numbers, decision, learning
1432
1432
  baker experiment pause --id a3f91c2b # everyone sees the original for now
1433
1433
  baker experiment resume --id a3f91c2b # the split picks up with the same sides
@@ -5082,8 +5082,11 @@ Cast an ElevenLabs voice from a natural-language description (e.g. a blueprint's
5082
5082
  |---|---|---|---|
5083
5083
  | `description` | string | yes | the casting brief |
5084
5084
  | `gender` / `age` / `accent` / `language` | string | no | structured hints that sharpen the ranking |
5085
+ | `voice_id` | string | no | a voice already chosen — skips the ranking and emits it as-is |
5085
5086
  | `limit` | number | no | how many `candidates` to return (default 5) |
5086
5087
 
5088
+ `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.
5089
+
5087
5090
  **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.
5088
5091
 
5089
5092
  **Cost** — free (voice listing). Generation is billed under `tts`/`dialogue`.
@@ -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),
@@ -9879,4 +9904,4 @@ export {
9879
9904
  defaultRegistry,
9880
9905
  createEngineFromEnv
9881
9906
  };
9882
- //# sourceMappingURL=chunk-H3SAAHZA.js.map
9907
+ //# sourceMappingURL=chunk-AI4HWQVN.js.map