@koda-sl/baker-cli 0.123.0-dev.70bf43ce4 → 0.123.0-dev.8e4328629
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 +33 -16
- package/dist/{chunk-VSVGPYJK.js → chunk-43KBQLP5.js} +143 -34
- package/dist/chunk-43KBQLP5.js.map +1 -0
- package/dist/cli.js +556 -136
- package/dist/cli.js.map +1 -1
- package/dist/engine/index.d.ts +33 -0
- package/dist/engine/index.js +1 -1
- package/package.json +1 -1
- package/dist/chunk-VSVGPYJK.js.map +0 -1
package/dist/engine/index.d.ts
CHANGED
|
@@ -15,6 +15,10 @@ 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;
|
|
18
22
|
};
|
|
19
23
|
type ExecResponse = {
|
|
20
24
|
outputs: Record<string, RawAssetOutput | RawAssetOutput[] | unknown>;
|
|
@@ -54,6 +58,12 @@ declare class BackendClient$1 {
|
|
|
54
58
|
}, signal?: AbortSignal): Promise<void>;
|
|
55
59
|
/** Durable run-history record — POST /api/canvas/runs (idempotent server-side on runId). */
|
|
56
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>;
|
|
57
67
|
getArtifact(kind: string, name: string, version?: string, signal?: AbortSignal): Promise<ArtifactResponse>;
|
|
58
68
|
}
|
|
59
69
|
|
|
@@ -127,6 +137,7 @@ declare const CanvasSchema: z.ZodObject<{
|
|
|
127
137
|
inputs: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
128
138
|
params: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
129
139
|
when: z.ZodOptional<z.ZodUnknown>;
|
|
140
|
+
regenerate: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodNumber]>>;
|
|
130
141
|
}, z.core.$strict>>;
|
|
131
142
|
output: z.ZodOptional<z.ZodObject<{
|
|
132
143
|
node: z.ZodString;
|
|
@@ -256,6 +267,14 @@ type ExecCtx = {
|
|
|
256
267
|
/** Content-addressed cache key for this node execution. Remote delegation
|
|
257
268
|
* derives its idempotency key from it so backend retries never double-charge. */
|
|
258
269
|
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;
|
|
259
278
|
client: BackendClient$1;
|
|
260
279
|
assets: AssetStore;
|
|
261
280
|
log: LogFn;
|
|
@@ -386,6 +405,13 @@ type RunOptions = {
|
|
|
386
405
|
cache_policy?: "read_write" | "bypass" | "read_only";
|
|
387
406
|
/** Max nodes of one layer in flight at once; invalid or missing → 5. */
|
|
388
407
|
concurrency?: number;
|
|
408
|
+
/**
|
|
409
|
+
* Node ids to force fresh for THIS run only (the `--regenerate` flag). Folds
|
|
410
|
+
* the run id into each named node's cache key so it re-renders regardless of
|
|
411
|
+
* the content cache, without editing the canvas. Persistent regeneration uses
|
|
412
|
+
* the per-node `regenerate` field instead.
|
|
413
|
+
*/
|
|
414
|
+
regenerate?: ReadonlySet<string>;
|
|
389
415
|
onProgress?: (event: RunProgressEvent) => void;
|
|
390
416
|
};
|
|
391
417
|
type EngineOptions = {
|
|
@@ -451,6 +477,13 @@ declare class Engine$1 {
|
|
|
451
477
|
private writeFinal;
|
|
452
478
|
private executeOne;
|
|
453
479
|
private materializeNodeOutputs;
|
|
480
|
+
/**
|
|
481
|
+
* Download any URL-only asset ref reachable in a local node's inputs so the
|
|
482
|
+
* bytes are on disk before the local runner stages them. Returns a copy —
|
|
483
|
+
* refs are replaced, never mutated in place, so the producer's cached output
|
|
484
|
+
* (shared object) keeps its URL-only shape.
|
|
485
|
+
*/
|
|
486
|
+
private materializeLocalInputs;
|
|
454
487
|
}
|
|
455
488
|
|
|
456
489
|
type ValidationResult = {
|
package/dist/engine/index.js
CHANGED
package/package.json
CHANGED