@koda-sl/baker-cli 0.119.0 → 0.120.0-dev.3bcc79f9c

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.
@@ -47,6 +47,13 @@ declare class BackendClient$1 {
47
47
  putUrl: string;
48
48
  publicUrl: string;
49
49
  }>;
50
+ /** Remote cache lookup. A miss (404) — or an old backend without the route — returns null. */
51
+ getCacheEntry<T>(cacheKey: string, signal?: AbortSignal): Promise<T | null>;
52
+ putCacheEntry(entry: {
53
+ cacheKey: string;
54
+ }, signal?: AbortSignal): Promise<void>;
55
+ /** Durable run-history record — POST /api/canvas/runs (idempotent server-side on runId). */
56
+ recordRun(payload: unknown, signal?: AbortSignal): Promise<void>;
50
57
  getArtifact(kind: string, name: string, version?: string, signal?: AbortSignal): Promise<ArtifactResponse>;
51
58
  }
52
59
 
@@ -90,7 +97,6 @@ declare const CanvasSchema: z.ZodObject<{
90
97
  voice_convert_node: z.ZodString;
91
98
  scene_s: z.ZodOptional<z.ZodNumber>;
92
99
  est_speech_s: z.ZodOptional<z.ZodNumber>;
93
- speech_words: z.ZodOptional<z.ZodNumber>;
94
100
  }, z.core.$strip>, z.ZodObject<{
95
101
  scene: z.ZodNumber;
96
102
  lipsync_node: z.ZodString;
@@ -339,6 +345,14 @@ type RunResult = {
339
345
  duration_ms: number;
340
346
  };
341
347
  outputs_dir: string;
348
+ node_runs: NodeRunRecord[];
349
+ };
350
+ type NodeRunRecord = {
351
+ node_id: string;
352
+ node_type: string;
353
+ cached: boolean;
354
+ duration_ms: number;
355
+ credits: number;
342
356
  };
343
357
  type RunOptions = {
344
358
  signal?: AbortSignal;
@@ -354,6 +368,13 @@ type EngineOptions = {
354
368
  cache: CacheStore;
355
369
  outputsDir: string;
356
370
  log?: LogFn;
371
+ /**
372
+ * Stamp durable canvas-assets URLs onto fresh node outputs before they are
373
+ * cached — the precondition for remote cache portability and run-history
374
+ * records. Best-effort: a failed upload logs a warning and keeps the entry
375
+ * local-only, never fails the node.
376
+ */
377
+ persistAssets?: boolean;
357
378
  };
358
379
  declare class Engine$1 {
359
380
  private readonly registry;
@@ -362,6 +383,7 @@ declare class Engine$1 {
362
383
  private readonly cache;
363
384
  private readonly outputsDir;
364
385
  private readonly log;
386
+ private readonly persistAssets;
365
387
  constructor(opts: EngineOptions);
366
388
  validate(canvas: unknown): {
367
389
  ok: true;
@@ -467,6 +489,13 @@ declare function createEngineFromEnv(opts?: {
467
489
  cacheDir?: string;
468
490
  outputsDir?: string;
469
491
  log?: (line: string) => void;
492
+ /**
493
+ * Layer the company-scoped remote cache over the local one (and stamp
494
+ * durable asset URLs onto fresh outputs) so a fresh sandbox re-runs an
495
+ * already-computed canvas at zero credits. Defaults to on; disable with
496
+ * `remoteCache: false` or env BAKER_CANVAS_REMOTE_CACHE=off.
497
+ */
498
+ remoteCache?: boolean;
470
499
  }): Engine$1;
471
500
 
472
501
  export { BackendClient, Engine, LocalAssetStore, LocalCacheStore, ValidationError, createEngineFromEnv, defaultRegistry, generateCatalog, validateCanvasDeep };
@@ -8,7 +8,7 @@ import {
8
8
  defaultRegistry,
9
9
  generateCatalog,
10
10
  validateCanvasDeep
11
- } from "../chunk-MF34WJ7M.js";
11
+ } from "../chunk-OCMOQOIJ.js";
12
12
  export {
13
13
  BackendClient,
14
14
  Engine,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@koda-sl/baker-cli",
3
- "version": "0.119.0",
3
+ "version": "0.120.0-dev.3bcc79f9c",
4
4
  "description": "AI-agent-first CLI for interacting with Baker, including the Baker creative canvas.",
5
5
  "type": "module",
6
6
  "bin": {