@koda-sl/baker-cli 0.403.0 → 0.405.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.
@@ -572,6 +572,13 @@ type RunOptions = {
572
572
  * for none of them twice.
573
573
  */
574
574
  stop_before_kinds?: ReadonlySet<string>;
575
+ /**
576
+ * Run only what is already paid for: before a layer dispatches, a billed node (one with a
577
+ * credit estimate) that would miss the cache stops the run, so nothing in that layer is
578
+ * billed. Raises `RunAbortedError("cache_only")`; the cached nodes before it stay done.
579
+ * A static ad whose pictures are spent re-draws its copy this way (render-budget.ts).
580
+ */
581
+ billed_from_cache_only?: boolean;
575
582
  onProgress?: (event: RunProgressEvent) => void;
576
583
  };
577
584
  type EngineOptions = {
@@ -632,6 +639,22 @@ declare class Engine$1 {
632
639
  private pruneToOutput;
633
640
  private writeFinal;
634
641
  private executeOne;
642
+ /**
643
+ * Every reason a layer must not dispatch, checked before any of its nodes starts, so a stop
644
+ * never leaves a layer half billed: a signal, the cost cap, a checkpoint, and a billed node
645
+ * the cache cannot serve when the run is cache-only.
646
+ */
647
+ private assertLayerMayRun;
648
+ /**
649
+ * The billed nodes of a layer that would miss the cache, found before any of them runs:
650
+ * each is prepared exactly as `executeOne` would (same inputs, params and cache key).
651
+ *
652
+ * `executeOne` prepares each node again when it runs, so a cache-only layer hydrates its
653
+ * text slots and hashes its `cacheKeyExtras` twice. Deliberate: a re-draw's layers are
654
+ * small, and threading this preparation into `executeOne` would couple the check to the
655
+ * run path, where a stale preparation would bill the wrong key.
656
+ */
657
+ private billedMisses;
635
658
  /** A cache hit replayed as this node's result: its outputs written, and free. */
636
659
  private replayCached;
637
660
  /** Best-effort: a failed upload keeps the outputs local-only, never fails the node. */
@@ -8,7 +8,7 @@ import {
8
8
  defaultRegistry,
9
9
  generateCatalog,
10
10
  validateCanvasDeep
11
- } from "../chunk-X7PLV5QH.js";
11
+ } from "../chunk-DGZ5DLXK.js";
12
12
  import "../chunk-5X5LUMVV.js";
13
13
  import "../chunk-N72QYDJY.js";
14
14
  export {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@koda-sl/baker-cli",
3
- "version": "0.403.0",
3
+ "version": "0.405.0",
4
4
  "description": "AI-agent-first CLI for interacting with Baker, including the Baker creative canvas.",
5
5
  "type": "module",
6
6
  "bin": {