@koda-sl/baker-cli 0.124.0-dev.8e4328629 → 0.124.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.
@@ -15,10 +15,6 @@ type ExecRequest = {
15
15
  /** Run-scoped dedupe key: the backend replays the stored response for a
16
16
  * repeated key instead of re-dispatching to the provider (and re-charging). */
17
17
  idempotency_key?: string;
18
- /** Run + node identity, so a completed async job can be mapped back to its
19
- * frozen run's node by the backend stale-run reconciliation sweep. */
20
- canvas_run_id?: string;
21
- node_id?: string;
22
18
  };
23
19
  type ExecResponse = {
24
20
  outputs: Record<string, RawAssetOutput | RawAssetOutput[] | unknown>;
@@ -51,19 +47,6 @@ declare class BackendClient$1 {
51
47
  putUrl: string;
52
48
  publicUrl: string;
53
49
  }>;
54
- /** Remote cache lookup. A miss (404) — or an old backend without the route — returns null. */
55
- getCacheEntry<T>(cacheKey: string, signal?: AbortSignal): Promise<T | null>;
56
- putCacheEntry(entry: {
57
- cacheKey: string;
58
- }, signal?: AbortSignal): Promise<void>;
59
- /** Durable run-history record — POST /api/canvas/runs (idempotent server-side on runId). */
60
- recordRun(payload: unknown, signal?: AbortSignal): Promise<void>;
61
- /**
62
- * Chat-scoped blueprint sync — POST /api/creatives/definition. Lets the
63
- * dashboard draw a scaffolded creative's workflow graph BEFORE the first run.
64
- * Additive on the backend (never archives siblings, never sets definitionPath).
65
- */
66
- syncCreativeDefinition(payload: unknown, signal?: AbortSignal): Promise<void>;
67
50
  getArtifact(kind: string, name: string, version?: string, signal?: AbortSignal): Promise<ArtifactResponse>;
68
51
  }
69
52
 
@@ -137,7 +120,6 @@ declare const CanvasSchema: z.ZodObject<{
137
120
  inputs: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
138
121
  params: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
139
122
  when: z.ZodOptional<z.ZodUnknown>;
140
- regenerate: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodNumber]>>;
141
123
  }, z.core.$strict>>;
142
124
  output: z.ZodOptional<z.ZodObject<{
143
125
  node: z.ZodString;
@@ -267,14 +249,6 @@ type ExecCtx = {
267
249
  /** Content-addressed cache key for this node execution. Remote delegation
268
250
  * derives its idempotency key from it so backend retries never double-charge. */
269
251
  cacheKey?: string;
270
- /**
271
- * Whether this node's outputs must be downloaded to the local content store.
272
- * False when NO downstream consumer is a local (ffmpeg/magick) node — the
273
- * backend already persisted the bytes to R2 with a durable sha256 URL, so the
274
- * redundant R2→sandbox transfer is skipped and the ref is kept URL-only.
275
- * Absent/true means download (the safe default for older call sites).
276
- */
277
- downloadOutputs?: boolean;
278
252
  client: BackendClient$1;
279
253
  assets: AssetStore;
280
254
  log: LogFn;
@@ -337,12 +311,6 @@ type NodeDefinition<I = unknown, P = unknown, O = unknown> = {
337
311
  outputs: z.ZodType<O>;
338
312
  /** "local" runs in-process; "remote" delegates to Convex via ctx.client */
339
313
  location: "local" | "remote";
340
- /**
341
- * Local node that only forwards asset refs and never reads their bytes
342
- * (e.g. `collect`). Exempts its upstream producers from the forced R2→disk
343
- * download local consumers otherwise trigger.
344
- */
345
- passthroughRefs?: true;
346
314
  cost?: CostFn<P>;
347
315
  validateExtra?: ValidateExtraFn;
348
316
  cacheKeyExtras?: CacheKeyExtrasFn;
@@ -371,39 +339,6 @@ type RunResult = {
371
339
  duration_ms: number;
372
340
  };
373
341
  outputs_dir: string;
374
- node_runs: NodeRunRecord[];
375
- };
376
- type NodeRunRecord = {
377
- node_id: string;
378
- node_type: string;
379
- cached: boolean;
380
- duration_ms: number;
381
- credits: number;
382
- };
383
- /**
384
- * Live run telemetry: the plan (post-prune node list + dependency edges) fires
385
- * once before any node executes, then start/settled/failed per node. Consumers
386
- * stream these into run-history progress snapshots; a throwing consumer is
387
- * swallowed — telemetry must never fail a paid run.
388
- */
389
- type RunProgressEvent = {
390
- kind: "plan";
391
- nodes: Array<{
392
- node_id: string;
393
- node_type: string;
394
- deps: string[];
395
- params: unknown;
396
- }>;
397
- } | {
398
- kind: "node_start";
399
- node_id: string;
400
- } | {
401
- kind: "node_settled";
402
- run: NodeRunRecord;
403
- outputs: Record<string, unknown>;
404
- } | {
405
- kind: "node_failed";
406
- node_id: string;
407
342
  };
408
343
  type RunOptions = {
409
344
  signal?: AbortSignal;
@@ -411,14 +346,6 @@ type RunOptions = {
411
346
  cache_policy?: "read_write" | "bypass" | "read_only";
412
347
  /** Max nodes of one layer in flight at once; invalid or missing → 5. */
413
348
  concurrency?: number;
414
- /**
415
- * Node ids to force fresh for THIS run only (the `--regenerate` flag). Folds
416
- * the run id into each named node's cache key so it re-renders regardless of
417
- * the content cache, without editing the canvas. Persistent regeneration uses
418
- * the per-node `regenerate` field instead.
419
- */
420
- regenerate?: ReadonlySet<string>;
421
- onProgress?: (event: RunProgressEvent) => void;
422
349
  };
423
350
  type EngineOptions = {
424
351
  registry: NodeRegistry;
@@ -427,13 +354,6 @@ type EngineOptions = {
427
354
  cache: CacheStore;
428
355
  outputsDir: string;
429
356
  log?: LogFn;
430
- /**
431
- * Stamp durable canvas-assets URLs onto fresh node outputs before they are
432
- * cached — the precondition for remote cache portability and run-history
433
- * records. Best-effort: a failed upload logs a warning and keeps the entry
434
- * local-only, never fails the node.
435
- */
436
- persistAssets?: boolean;
437
357
  };
438
358
  declare class Engine$1 {
439
359
  private readonly registry;
@@ -442,7 +362,6 @@ declare class Engine$1 {
442
362
  private readonly cache;
443
363
  private readonly outputsDir;
444
364
  private readonly log;
445
- private readonly persistAssets;
446
365
  constructor(opts: EngineOptions);
447
366
  validate(canvas: unknown): {
448
367
  ok: true;
@@ -471,8 +390,6 @@ declare class Engine$1 {
471
390
  }>;
472
391
  run(input: unknown, opts?: RunOptions): Promise<RunResult>;
473
392
  private runLayers;
474
- /** Progress consumers are observers only — an exception there must never fail the run. */
475
- private emitProgress;
476
393
  /**
477
394
  * Dead-node elimination: when the canvas declares an `output`, execute only the
478
395
  * nodes that output transitively depends on. Orphaned nodes (left by an edit or
@@ -483,13 +400,6 @@ declare class Engine$1 {
483
400
  private writeFinal;
484
401
  private executeOne;
485
402
  private materializeNodeOutputs;
486
- /**
487
- * Download any URL-only asset ref reachable in a local node's inputs so the
488
- * bytes are on disk before the local runner stages them. Returns a copy —
489
- * refs are replaced, never mutated in place, so the producer's cached output
490
- * (shared object) keeps its URL-only shape.
491
- */
492
- private materializeLocalInputs;
493
403
  }
494
404
 
495
405
  type ValidationResult = {
@@ -557,13 +467,6 @@ declare function createEngineFromEnv(opts?: {
557
467
  cacheDir?: string;
558
468
  outputsDir?: string;
559
469
  log?: (line: string) => void;
560
- /**
561
- * Layer the company-scoped remote cache over the local one (and stamp
562
- * durable asset URLs onto fresh outputs) so a fresh sandbox re-runs an
563
- * already-computed canvas at zero credits. Defaults to on; disable with
564
- * `remoteCache: false` or env BAKER_CANVAS_REMOTE_CACHE=off.
565
- */
566
- remoteCache?: boolean;
567
470
  }): Engine$1;
568
471
 
569
472
  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-Q3K5TXC6.js";
11
+ } from "../chunk-IWPAXJC3.js";
12
12
  import "../chunk-5WRI5ZAA.js";
13
13
  export {
14
14
  BackendClient,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@koda-sl/baker-cli",
3
- "version": "0.124.0-dev.8e4328629",
3
+ "version": "0.124.0",
4
4
  "description": "AI-agent-first CLI for interacting with Baker, including the Baker creative canvas.",
5
5
  "type": "module",
6
6
  "bin": {