@koda-sl/baker-cli 0.395.0-dev.f8ecbaa42 → 0.395.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 +243 -132
- package/canvas/static-ad-composition/index.html +3 -154
- package/canvas/static-ad-composition/meta.json +1 -1
- package/dist/{chunk-AOVFDDVW.js → chunk-BRIJ4OWT.js} +14 -2
- package/dist/{chunk-AOVFDDVW.js.map → chunk-BRIJ4OWT.js.map} +1 -1
- package/dist/{chunk-NEZ3NAJV.js → chunk-EEHNRAFA.js} +4 -4
- package/dist/{chunk-Q3LMLQAI.js → chunk-LHJ5IXBN.js} +3963 -2664
- package/dist/chunk-LHJ5IXBN.js.map +1 -0
- package/dist/{chunk-OKE2QJSJ.js → chunk-Q7RQ3H6Y.js} +3 -3
- package/dist/{chunk-T2UNK5BW.js → chunk-QP7637HG.js} +3 -3
- package/dist/{chunk-QIQ57EIA.js → chunk-ZWMATKNS.js} +2 -2
- package/dist/cli.js +11599 -11312
- package/dist/cli.js.map +1 -1
- package/dist/{client-EQOSDYJL.js → client-4P6U75EX.js} +4 -4
- package/dist/engine/index.d.ts +175 -120
- package/dist/engine/index.js +3 -3
- package/dist/{env-ANKM47IJ.js → env-LJHSZSNA.js} +2 -2
- package/dist/{output-NR4EJQDV.js → output-HVBFJX4I.js} +5 -5
- package/dist/{shared-SLCDVV45.js → shared-7ZEF4DIX.js} +6 -6
- package/package.json +2 -1
- package/dist/chunk-Q3LMLQAI.js.map +0 -1
- /package/dist/{chunk-NEZ3NAJV.js.map → chunk-EEHNRAFA.js.map} +0 -0
- /package/dist/{chunk-OKE2QJSJ.js.map → chunk-Q7RQ3H6Y.js.map} +0 -0
- /package/dist/{chunk-T2UNK5BW.js.map → chunk-QP7637HG.js.map} +0 -0
- /package/dist/{chunk-QIQ57EIA.js.map → chunk-ZWMATKNS.js.map} +0 -0
- /package/dist/{client-EQOSDYJL.js.map → client-4P6U75EX.js.map} +0 -0
- /package/dist/{env-ANKM47IJ.js.map → env-LJHSZSNA.js.map} +0 -0
- /package/dist/{output-NR4EJQDV.js.map → output-HVBFJX4I.js.map} +0 -0
- /package/dist/{shared-SLCDVV45.js.map → shared-7ZEF4DIX.js.map} +0 -0
|
@@ -4,9 +4,9 @@ import {
|
|
|
4
4
|
apiGetWithHeaders,
|
|
5
5
|
apiPost,
|
|
6
6
|
validateConvexId
|
|
7
|
-
} from "./chunk-
|
|
8
|
-
import "./chunk-
|
|
9
|
-
import "./chunk-
|
|
7
|
+
} from "./chunk-Q7RQ3H6Y.js";
|
|
8
|
+
import "./chunk-ZWMATKNS.js";
|
|
9
|
+
import "./chunk-BRIJ4OWT.js";
|
|
10
10
|
export {
|
|
11
11
|
ApiError,
|
|
12
12
|
apiGet,
|
|
@@ -14,4 +14,4 @@ export {
|
|
|
14
14
|
apiPost,
|
|
15
15
|
validateConvexId
|
|
16
16
|
};
|
|
17
|
-
//# sourceMappingURL=client-
|
|
17
|
+
//# sourceMappingURL=client-4P6U75EX.js.map
|
package/dist/engine/index.d.ts
CHANGED
|
@@ -28,8 +28,10 @@ type ExecResponse = {
|
|
|
28
28
|
/** A resumable run as reported by `GET /api/canvas/runs/active`. */
|
|
29
29
|
type ActiveRunInfo = {
|
|
30
30
|
runId: string;
|
|
31
|
-
status: "running" | "completed" | "failed";
|
|
31
|
+
status: "running" | "completed" | "failed" | "awaiting_approval";
|
|
32
32
|
interrupted?: boolean;
|
|
33
|
+
/** The backend's verdict: an unfinished run another sandbox may take over. */
|
|
34
|
+
adoptable?: boolean;
|
|
33
35
|
updatedAt?: number;
|
|
34
36
|
canvasSha?: string;
|
|
35
37
|
canvasSnapshotUrl?: string;
|
|
@@ -37,7 +39,7 @@ type ActiveRunInfo = {
|
|
|
37
39
|
/** The newest snapshot-bearing run for a creative — `GET /api/canvas/runs/latest`. */
|
|
38
40
|
type SnapshotRunInfo = {
|
|
39
41
|
runId: string;
|
|
40
|
-
status: "running" | "completed" | "failed";
|
|
42
|
+
status: "running" | "completed" | "failed" | "awaiting_approval";
|
|
41
43
|
interrupted?: boolean;
|
|
42
44
|
canvasSha?: string;
|
|
43
45
|
canvasSnapshotUrl: string;
|
|
@@ -64,9 +66,10 @@ declare class BackendClient$1 {
|
|
|
64
66
|
});
|
|
65
67
|
exec(req: ExecRequest, signal?: AbortSignal): Promise<ExecResponse>;
|
|
66
68
|
private pollJob;
|
|
67
|
-
presignAssetUpload(sha256: string, mime: string, signal?: AbortSignal, purpose?: "output" | "source" | "blueprint"): Promise<{
|
|
69
|
+
presignAssetUpload(sha256: string, mime: string, signal?: AbortSignal, purpose?: "output" | "source" | "blueprint", conditional?: boolean): Promise<{
|
|
68
70
|
putUrl: string;
|
|
69
71
|
publicUrl: string;
|
|
72
|
+
conditional?: boolean;
|
|
70
73
|
}>;
|
|
71
74
|
/** Remote cache lookup. A miss (404) — or an old backend without the route — returns null. */
|
|
72
75
|
getCacheEntry<T>(cacheKey: string, signal?: AbortSignal): Promise<T | null>;
|
|
@@ -130,81 +133,6 @@ type NodeFailureDetail = {
|
|
|
130
133
|
retryable?: boolean;
|
|
131
134
|
};
|
|
132
135
|
|
|
133
|
-
declare const CanvasSchema: z.ZodObject<{
|
|
134
|
-
schema: z.ZodLiteral<"baker-canvas/1">;
|
|
135
|
-
cache_salt: z.ZodOptional<z.ZodString>;
|
|
136
|
-
metadata: z.ZodOptional<z.ZodObject<{
|
|
137
|
-
name: z.ZodOptional<z.ZodString>;
|
|
138
|
-
description: z.ZodOptional<z.ZodString>;
|
|
139
|
-
todo: z.ZodOptional<z.ZodUnknown>;
|
|
140
|
-
video: z.ZodOptional<z.ZodObject<{
|
|
141
|
-
duration_s: z.ZodNumber;
|
|
142
|
-
timeline: z.ZodOptional<z.ZodObject<{
|
|
143
|
-
spine_node: z.ZodString;
|
|
144
|
-
expected_total_s: z.ZodNumber;
|
|
145
|
-
audio_mix_node: z.ZodOptional<z.ZodString>;
|
|
146
|
-
}, z.core.$strict>>;
|
|
147
|
-
vo_segments: z.ZodDefault<z.ZodArray<z.ZodObject<{
|
|
148
|
-
slot: z.ZodString;
|
|
149
|
-
start_s: z.ZodNumber;
|
|
150
|
-
end_s: z.ZodNumber;
|
|
151
|
-
scene: z.ZodOptional<z.ZodNumber>;
|
|
152
|
-
speaker: z.ZodOptional<z.ZodString>;
|
|
153
|
-
}, z.core.$strip>>>;
|
|
154
|
-
talking_scenes: z.ZodDefault<z.ZodArray<z.ZodUnion<readonly [z.ZodNumber, z.ZodObject<{
|
|
155
|
-
scene: z.ZodNumber;
|
|
156
|
-
voice_convert_node: z.ZodString;
|
|
157
|
-
scene_s: z.ZodOptional<z.ZodNumber>;
|
|
158
|
-
est_speech_s: z.ZodOptional<z.ZodNumber>;
|
|
159
|
-
speech_words: z.ZodOptional<z.ZodNumber>;
|
|
160
|
-
}, z.core.$strip>, z.ZodObject<{
|
|
161
|
-
scene: z.ZodNumber;
|
|
162
|
-
lipsync_node: z.ZodString;
|
|
163
|
-
}, z.core.$strip>]>>>;
|
|
164
|
-
lip_sync_caution: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
165
|
-
scene: z.ZodNumber;
|
|
166
|
-
speaker: z.ZodString;
|
|
167
|
-
tts_over_native: z.ZodArray<z.ZodString>;
|
|
168
|
-
}, z.core.$strip>>>;
|
|
169
|
-
motion_board: z.ZodOptional<z.ZodArray<z.ZodUnknown>>;
|
|
170
|
-
elements: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
171
|
-
ref: z.ZodString;
|
|
172
|
-
label: z.ZodString;
|
|
173
|
-
type: z.ZodString;
|
|
174
|
-
description: z.ZodOptional<z.ZodString>;
|
|
175
|
-
}, z.core.$strip>>>;
|
|
176
|
-
clip_spans: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
177
|
-
node: z.ZodString;
|
|
178
|
-
span_s: z.ZodNumber;
|
|
179
|
-
}, z.core.$strip>>>;
|
|
180
|
-
graph_stats: z.ZodOptional<z.ZodObject<{
|
|
181
|
-
nodes_total: z.ZodNumber;
|
|
182
|
-
nodes_billable: z.ZodNumber;
|
|
183
|
-
node_types: z.ZodRecord<z.ZodString, z.ZodNumber>;
|
|
184
|
-
scene_routes: z.ZodArray<z.ZodObject<{
|
|
185
|
-
scene: z.ZodNumber;
|
|
186
|
-
route: z.ZodString;
|
|
187
|
-
window_s: z.ZodNumber;
|
|
188
|
-
}, z.core.$strip>>;
|
|
189
|
-
}, z.core.$strict>>;
|
|
190
|
-
}, z.core.$strict>>;
|
|
191
|
-
}, z.core.$strict>>;
|
|
192
|
-
nodes: z.ZodArray<z.ZodObject<{
|
|
193
|
-
id: z.ZodString;
|
|
194
|
-
type: z.ZodString;
|
|
195
|
-
version: z.ZodOptional<z.ZodString>;
|
|
196
|
-
inputs: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
197
|
-
params: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
198
|
-
when: z.ZodOptional<z.ZodUnknown>;
|
|
199
|
-
regenerate: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodNumber]>>;
|
|
200
|
-
}, z.core.$strict>>;
|
|
201
|
-
output: z.ZodOptional<z.ZodObject<{
|
|
202
|
-
node: z.ZodString;
|
|
203
|
-
output: z.ZodString;
|
|
204
|
-
}, z.core.$strict>>;
|
|
205
|
-
}, z.core.$strict>;
|
|
206
|
-
type Canvas = z.infer<typeof CanvasSchema>;
|
|
207
|
-
|
|
208
136
|
declare const AssetRef: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
209
137
|
url: z.ZodOptional<z.ZodString>;
|
|
210
138
|
path: z.ZodOptional<z.ZodString>;
|
|
@@ -297,27 +225,6 @@ declare class LocalAssetStore$1 implements AssetStore {
|
|
|
297
225
|
ingestRemote(args: IngestRemoteArgs): Promise<AssetRef>;
|
|
298
226
|
}
|
|
299
227
|
|
|
300
|
-
type CacheEntry = {
|
|
301
|
-
cacheKey: string;
|
|
302
|
-
nodeType: string;
|
|
303
|
-
nodeVersion: string;
|
|
304
|
-
outputs: Record<string, unknown>;
|
|
305
|
-
refs: string[];
|
|
306
|
-
createdAt: number;
|
|
307
|
-
};
|
|
308
|
-
interface CacheStore {
|
|
309
|
-
rootDir: string;
|
|
310
|
-
get(cacheKey: string): Promise<CacheEntry | null>;
|
|
311
|
-
put(entry: CacheEntry): Promise<void>;
|
|
312
|
-
}
|
|
313
|
-
declare class LocalCacheStore$1 implements CacheStore {
|
|
314
|
-
rootDir: string;
|
|
315
|
-
constructor(rootDir: string);
|
|
316
|
-
private filePath;
|
|
317
|
-
get(cacheKey: string): Promise<CacheEntry | null>;
|
|
318
|
-
put(entry: CacheEntry): Promise<void>;
|
|
319
|
-
}
|
|
320
|
-
|
|
321
228
|
type LogFn = (line: string) => void;
|
|
322
229
|
type ExecCtx = {
|
|
323
230
|
canvasRunId: string;
|
|
@@ -339,9 +246,9 @@ type ExecCtx = {
|
|
|
339
246
|
log: LogFn;
|
|
340
247
|
signal?: AbortSignal;
|
|
341
248
|
/**
|
|
342
|
-
*
|
|
343
|
-
*
|
|
344
|
-
*
|
|
249
|
+
* Report credits the backend actually charged for this node. Kept off the
|
|
250
|
+
* node's outputs because those are cached, and a cache hit costs nothing.
|
|
251
|
+
* Called once per backend call; the executor sums them.
|
|
345
252
|
*/
|
|
346
253
|
reportCharge?: (credits: number) => void;
|
|
347
254
|
};
|
|
@@ -350,9 +257,18 @@ type CostEstimate = {
|
|
|
350
257
|
credits: number;
|
|
351
258
|
seconds_estimate: number;
|
|
352
259
|
};
|
|
353
|
-
|
|
260
|
+
/**
|
|
261
|
+
* A function of a node's params, declared as a METHOD so it is checked
|
|
262
|
+
* bivariantly: that is what lets a concrete `NodeDefinition<I, P, O>` stand in
|
|
263
|
+
* for the type-erased `AnyNodeDefinition` a registry holds, with no cast at every
|
|
264
|
+
* registration. The registry only ever calls it with params its own schema parsed.
|
|
265
|
+
*/
|
|
266
|
+
type ParamsFn<P, R> = {
|
|
267
|
+
fn(params: P): R;
|
|
268
|
+
}["fn"];
|
|
269
|
+
type CostFn<P> = ParamsFn<{
|
|
354
270
|
params: P;
|
|
355
|
-
}
|
|
271
|
+
}, CostEstimate>;
|
|
356
272
|
type ExecuteArgs<I, P> = {
|
|
357
273
|
inputs: I;
|
|
358
274
|
params: P;
|
|
@@ -369,9 +285,19 @@ type ValidateExtraIssue = {
|
|
|
369
285
|
path: string;
|
|
370
286
|
message: string;
|
|
371
287
|
};
|
|
288
|
+
/**
|
|
289
|
+
* What a raw input will hold at run time, as far as the graph says before the
|
|
290
|
+
* run: an asset kind, `list` (a whole list output rather than one element of it),
|
|
291
|
+
* `value` (not an asset at all), or `unknown` (only running it would tell).
|
|
292
|
+
*/
|
|
293
|
+
type StaticInputKind = AssetRef["kind"] | "list" | "value" | "unknown";
|
|
372
294
|
type ValidateExtraFn = (args: {
|
|
373
295
|
rawParams: unknown;
|
|
374
296
|
rawInputs: unknown;
|
|
297
|
+
/** The canvas node id, when validating a whole canvas. */
|
|
298
|
+
nodeId?: string;
|
|
299
|
+
/** Reads a raw input value's kind off the node it references. */
|
|
300
|
+
inputKindOf?: (value: unknown) => StaticInputKind;
|
|
375
301
|
}) => Promise<ValidateExtraIssue[]> | ValidateExtraIssue[];
|
|
376
302
|
/**
|
|
377
303
|
* Node-supplied cache-key extras hook. Returns extra fields the executor
|
|
@@ -390,7 +316,27 @@ type CacheKeyExtrasFn = (args: {
|
|
|
390
316
|
* without running the node. Remote nodes also use it at runtime so the
|
|
391
317
|
* delegate ingestor knows how to wrap returned bytes.
|
|
392
318
|
*/
|
|
393
|
-
type OutputKindsSpec<P> = Record<string, AssetRef["kind"]> |
|
|
319
|
+
type OutputKindsSpec<P> = Record<string, AssetRef["kind"]> | ParamsFn<P, Record<string, AssetRef["kind"]>>;
|
|
320
|
+
/**
|
|
321
|
+
* What a node's output will measure, known before anything runs: its length and
|
|
322
|
+
* raster. Each field is present only when the params (and the timing of what is
|
|
323
|
+
* wired in) settle it; an absent field means "only running it would tell".
|
|
324
|
+
*/
|
|
325
|
+
type StaticTiming = {
|
|
326
|
+
duration_s?: number;
|
|
327
|
+
width?: number;
|
|
328
|
+
height?: number;
|
|
329
|
+
};
|
|
330
|
+
/**
|
|
331
|
+
* Node-supplied static timing hook: the output's length and size from its parsed
|
|
332
|
+
* params plus the static timing of each wired input (keyed by input slot, absent
|
|
333
|
+
* when upstream cannot say). Pure; `canvas validate` calls it to prove the
|
|
334
|
+
* timeline without running anything.
|
|
335
|
+
*/
|
|
336
|
+
type StaticTimingFn<P> = ParamsFn<{
|
|
337
|
+
params: P;
|
|
338
|
+
inputs: Readonly<Record<string, StaticTiming | undefined>>;
|
|
339
|
+
}, StaticTiming>;
|
|
394
340
|
type NodeDefinition<I = unknown, P = unknown, O = unknown> = {
|
|
395
341
|
id: string;
|
|
396
342
|
version: string;
|
|
@@ -412,17 +358,130 @@ type NodeDefinition<I = unknown, P = unknown, O = unknown> = {
|
|
|
412
358
|
validateExtra?: ValidateExtraFn;
|
|
413
359
|
cacheKeyExtras?: CacheKeyExtrasFn;
|
|
414
360
|
outputKinds?: OutputKindsSpec<P>;
|
|
415
|
-
|
|
361
|
+
staticTiming?: StaticTimingFn<P>;
|
|
362
|
+
execute: ParamsFn<ExecuteArgs<I, P>, Promise<O>>;
|
|
416
363
|
};
|
|
364
|
+
/**
|
|
365
|
+
* Any node definition, its input/param/output types erased: what a registry
|
|
366
|
+
* holds and the executor runs. Every `defineNode(...)` result is assignable to it.
|
|
367
|
+
*/
|
|
368
|
+
type AnyNodeDefinition = NodeDefinition<unknown, unknown, unknown>;
|
|
369
|
+
|
|
370
|
+
type NodeCredits = {
|
|
371
|
+
node_id: string;
|
|
372
|
+
node_type: string;
|
|
373
|
+
credits: number;
|
|
374
|
+
};
|
|
375
|
+
|
|
376
|
+
declare const CanvasSchema: z.ZodObject<{
|
|
377
|
+
schema: z.ZodLiteral<"baker-canvas/1">;
|
|
378
|
+
cache_salt: z.ZodOptional<z.ZodString>;
|
|
379
|
+
metadata: z.ZodOptional<z.ZodObject<{
|
|
380
|
+
name: z.ZodOptional<z.ZodString>;
|
|
381
|
+
description: z.ZodOptional<z.ZodString>;
|
|
382
|
+
todo: z.ZodOptional<z.ZodUnknown>;
|
|
383
|
+
video: z.ZodOptional<z.ZodObject<{
|
|
384
|
+
duration_s: z.ZodNumber;
|
|
385
|
+
timeline: z.ZodOptional<z.ZodObject<{
|
|
386
|
+
spine_node: z.ZodString;
|
|
387
|
+
expected_total_s: z.ZodNumber;
|
|
388
|
+
audio_mix_node: z.ZodOptional<z.ZodString>;
|
|
389
|
+
}, z.core.$strict>>;
|
|
390
|
+
vo_segments: z.ZodDefault<z.ZodArray<z.ZodObject<{
|
|
391
|
+
slot: z.ZodString;
|
|
392
|
+
start_s: z.ZodNumber;
|
|
393
|
+
end_s: z.ZodNumber;
|
|
394
|
+
scene: z.ZodOptional<z.ZodNumber>;
|
|
395
|
+
speaker: z.ZodOptional<z.ZodString>;
|
|
396
|
+
}, z.core.$strip>>>;
|
|
397
|
+
talking_scenes: z.ZodDefault<z.ZodArray<z.ZodUnion<readonly [z.ZodNumber, z.ZodObject<{
|
|
398
|
+
scene: z.ZodNumber;
|
|
399
|
+
voice_convert_node: z.ZodString;
|
|
400
|
+
scene_s: z.ZodOptional<z.ZodNumber>;
|
|
401
|
+
est_speech_s: z.ZodOptional<z.ZodNumber>;
|
|
402
|
+
speech_words: z.ZodOptional<z.ZodNumber>;
|
|
403
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
404
|
+
scene: z.ZodNumber;
|
|
405
|
+
lipsync_node: z.ZodString;
|
|
406
|
+
}, z.core.$strip>]>>>;
|
|
407
|
+
lip_sync_caution: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
408
|
+
scene: z.ZodNumber;
|
|
409
|
+
speaker: z.ZodString;
|
|
410
|
+
tts_over_native: z.ZodArray<z.ZodString>;
|
|
411
|
+
}, z.core.$strip>>>;
|
|
412
|
+
motion_board: z.ZodOptional<z.ZodArray<z.ZodUnknown>>;
|
|
413
|
+
elements: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
414
|
+
ref: z.ZodString;
|
|
415
|
+
label: z.ZodString;
|
|
416
|
+
type: z.ZodString;
|
|
417
|
+
description: z.ZodOptional<z.ZodString>;
|
|
418
|
+
}, z.core.$strip>>>;
|
|
419
|
+
clip_spans: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
420
|
+
node: z.ZodString;
|
|
421
|
+
span_s: z.ZodNumber;
|
|
422
|
+
}, z.core.$strip>>>;
|
|
423
|
+
graph_stats: z.ZodOptional<z.ZodObject<{
|
|
424
|
+
nodes_total: z.ZodNumber;
|
|
425
|
+
nodes_billable: z.ZodNumber;
|
|
426
|
+
node_types: z.ZodRecord<z.ZodString, z.ZodNumber>;
|
|
427
|
+
scene_routes: z.ZodArray<z.ZodObject<{
|
|
428
|
+
scene: z.ZodNumber;
|
|
429
|
+
route: z.ZodString;
|
|
430
|
+
window_s: z.ZodNumber;
|
|
431
|
+
}, z.core.$strip>>;
|
|
432
|
+
}, z.core.$strict>>;
|
|
433
|
+
}, z.core.$strict>>;
|
|
434
|
+
}, z.core.$strict>>;
|
|
435
|
+
nodes: z.ZodArray<z.ZodObject<{
|
|
436
|
+
id: z.ZodString;
|
|
437
|
+
type: z.ZodString;
|
|
438
|
+
version: z.ZodOptional<z.ZodString>;
|
|
439
|
+
inputs: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
440
|
+
params: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
441
|
+
regenerate: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodNumber]>>;
|
|
442
|
+
tags: z.ZodOptional<z.ZodObject<{
|
|
443
|
+
scene: z.ZodOptional<z.ZodNumber>;
|
|
444
|
+
role: z.ZodOptional<z.ZodString>;
|
|
445
|
+
region: z.ZodOptional<z.ZodNumber>;
|
|
446
|
+
on_camera: z.ZodOptional<z.ZodBoolean>;
|
|
447
|
+
}, z.core.$strict>>;
|
|
448
|
+
}, z.core.$strict>>;
|
|
449
|
+
output: z.ZodOptional<z.ZodObject<{
|
|
450
|
+
node: z.ZodString;
|
|
451
|
+
output: z.ZodString;
|
|
452
|
+
}, z.core.$strict>>;
|
|
453
|
+
}, z.core.$strict>;
|
|
454
|
+
type Canvas = z.infer<typeof CanvasSchema>;
|
|
455
|
+
|
|
456
|
+
type CacheEntry = {
|
|
457
|
+
cacheKey: string;
|
|
458
|
+
nodeType: string;
|
|
459
|
+
nodeVersion: string;
|
|
460
|
+
outputs: Record<string, unknown>;
|
|
461
|
+
refs: string[];
|
|
462
|
+
createdAt: number;
|
|
463
|
+
};
|
|
464
|
+
interface CacheStore {
|
|
465
|
+
rootDir: string;
|
|
466
|
+
get(cacheKey: string): Promise<CacheEntry | null>;
|
|
467
|
+
put(entry: CacheEntry): Promise<void>;
|
|
468
|
+
}
|
|
469
|
+
declare class LocalCacheStore$1 implements CacheStore {
|
|
470
|
+
rootDir: string;
|
|
471
|
+
constructor(rootDir: string);
|
|
472
|
+
private filePath;
|
|
473
|
+
get(cacheKey: string): Promise<CacheEntry | null>;
|
|
474
|
+
put(entry: CacheEntry): Promise<void>;
|
|
475
|
+
}
|
|
417
476
|
|
|
418
477
|
declare class NodeRegistry {
|
|
419
478
|
private readonly byId;
|
|
420
|
-
register(def:
|
|
421
|
-
registerAll(defs: readonly
|
|
422
|
-
get(id: string):
|
|
479
|
+
register(def: AnyNodeDefinition): void;
|
|
480
|
+
registerAll(defs: readonly AnyNodeDefinition[]): void;
|
|
481
|
+
get(id: string): AnyNodeDefinition | undefined;
|
|
423
482
|
has(id: string): boolean;
|
|
424
483
|
ids(): string[];
|
|
425
|
-
all():
|
|
484
|
+
all(): AnyNodeDefinition[];
|
|
426
485
|
}
|
|
427
486
|
|
|
428
487
|
type RunResult = {
|
|
@@ -550,11 +609,7 @@ declare class Engine$1 {
|
|
|
550
609
|
ok: false;
|
|
551
610
|
issues: ValidationIssue[];
|
|
552
611
|
}) & {
|
|
553
|
-
perNodeCredits?:
|
|
554
|
-
node_id: string;
|
|
555
|
-
node_type: string;
|
|
556
|
-
credits: number;
|
|
557
|
-
}>;
|
|
612
|
+
perNodeCredits?: NodeCredits[];
|
|
558
613
|
}>;
|
|
559
614
|
run(input: unknown, opts?: RunOptions): Promise<RunResult>;
|
|
560
615
|
private runLayers;
|
|
@@ -569,6 +624,10 @@ declare class Engine$1 {
|
|
|
569
624
|
private pruneToOutput;
|
|
570
625
|
private writeFinal;
|
|
571
626
|
private executeOne;
|
|
627
|
+
/** A cache hit replayed as this node's result: its outputs written, and free. */
|
|
628
|
+
private replayCached;
|
|
629
|
+
/** Best-effort: a failed upload keeps the outputs local-only, never fails the node. */
|
|
630
|
+
private persistOutputs;
|
|
572
631
|
/**
|
|
573
632
|
* Print the warnings a node left on its outputs' metadata — a `voice_select` that
|
|
574
633
|
* could not honor the requested gender, say. Left in the metadata alone they were
|
|
@@ -597,11 +656,7 @@ type ValidationResult = {
|
|
|
597
656
|
};
|
|
598
657
|
type ValidationDeep = ValidationResult & {
|
|
599
658
|
/** Per-node credit estimate, in canvas order. Useful for `validate` cost previews. */
|
|
600
|
-
perNodeCredits?:
|
|
601
|
-
node_id: string;
|
|
602
|
-
node_type: string;
|
|
603
|
-
credits: number;
|
|
604
|
-
}>;
|
|
659
|
+
perNodeCredits?: NodeCredits[];
|
|
605
660
|
};
|
|
606
661
|
/**
|
|
607
662
|
* Async second pass that lets each node run its own `validateExtra` hook.
|
package/dist/engine/index.js
CHANGED
|
@@ -8,9 +8,9 @@ import {
|
|
|
8
8
|
defaultRegistry,
|
|
9
9
|
generateCatalog,
|
|
10
10
|
validateCanvasDeep
|
|
11
|
-
} from "../chunk-
|
|
12
|
-
import "../chunk-
|
|
13
|
-
import "../chunk-
|
|
11
|
+
} from "../chunk-LHJ5IXBN.js";
|
|
12
|
+
import "../chunk-ZWMATKNS.js";
|
|
13
|
+
import "../chunk-BRIJ4OWT.js";
|
|
14
14
|
export {
|
|
15
15
|
BackendClient,
|
|
16
16
|
Engine,
|
|
@@ -13,7 +13,7 @@ import {
|
|
|
13
13
|
requireChatId,
|
|
14
14
|
requireConnection,
|
|
15
15
|
resolveChatId
|
|
16
|
-
} from "./chunk-
|
|
16
|
+
} from "./chunk-BRIJ4OWT.js";
|
|
17
17
|
export {
|
|
18
18
|
captureBudgetMs,
|
|
19
19
|
captureProxyCredentials,
|
|
@@ -30,4 +30,4 @@ export {
|
|
|
30
30
|
requireConnection,
|
|
31
31
|
resolveChatId
|
|
32
32
|
};
|
|
33
|
-
//# sourceMappingURL=env-
|
|
33
|
+
//# sourceMappingURL=env-LJHSZSNA.js.map
|
|
@@ -4,10 +4,10 @@ import {
|
|
|
4
4
|
writeAdsJson,
|
|
5
5
|
writeAdsOutput,
|
|
6
6
|
writeJsonEnvelope
|
|
7
|
-
} from "./chunk-
|
|
8
|
-
import "./chunk-
|
|
9
|
-
import "./chunk-
|
|
10
|
-
import "./chunk-
|
|
7
|
+
} from "./chunk-QP7637HG.js";
|
|
8
|
+
import "./chunk-Q7RQ3H6Y.js";
|
|
9
|
+
import "./chunk-ZWMATKNS.js";
|
|
10
|
+
import "./chunk-BRIJ4OWT.js";
|
|
11
11
|
export {
|
|
12
12
|
resolveCustomerId,
|
|
13
13
|
toCsvRow,
|
|
@@ -15,4 +15,4 @@ export {
|
|
|
15
15
|
writeAdsOutput,
|
|
16
16
|
writeJsonEnvelope
|
|
17
17
|
};
|
|
18
|
-
//# sourceMappingURL=output-
|
|
18
|
+
//# sourceMappingURL=output-HVBFJX4I.js.map
|
|
@@ -9,11 +9,11 @@ import {
|
|
|
9
9
|
resolveEffectiveStatus,
|
|
10
10
|
statusFilterHints,
|
|
11
11
|
todayIso
|
|
12
|
-
} from "./chunk-
|
|
13
|
-
import "./chunk-
|
|
14
|
-
import "./chunk-
|
|
15
|
-
import "./chunk-
|
|
16
|
-
import "./chunk-
|
|
12
|
+
} from "./chunk-EEHNRAFA.js";
|
|
13
|
+
import "./chunk-QP7637HG.js";
|
|
14
|
+
import "./chunk-Q7RQ3H6Y.js";
|
|
15
|
+
import "./chunk-ZWMATKNS.js";
|
|
16
|
+
import "./chunk-BRIJ4OWT.js";
|
|
17
17
|
export {
|
|
18
18
|
NAME_CONTAINS_ARG,
|
|
19
19
|
csvOrJson,
|
|
@@ -26,4 +26,4 @@ export {
|
|
|
26
26
|
statusFilterHints,
|
|
27
27
|
todayIso
|
|
28
28
|
};
|
|
29
|
-
//# sourceMappingURL=shared-
|
|
29
|
+
//# sourceMappingURL=shared-7ZEF4DIX.js.map
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@koda-sl/baker-cli",
|
|
3
|
-
"version": "0.395.0
|
|
3
|
+
"version": "0.395.0",
|
|
4
4
|
"description": "AI-agent-first CLI for interacting with Baker, including the Baker creative canvas.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"bin": {
|
|
@@ -38,6 +38,7 @@
|
|
|
38
38
|
"quantize": "^1.0.2",
|
|
39
39
|
"sharp": "^0.34.5",
|
|
40
40
|
"undici": "7.29.0",
|
|
41
|
+
"yaml": "^2.6.1",
|
|
41
42
|
"zod": "^4.3.6"
|
|
42
43
|
},
|
|
43
44
|
"devDependencies": {
|