@koda-sl/baker-cli 0.114.0-dev.249eaa8ed → 0.115.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.
- package/README.md +61 -0
- package/dist/{chunk-5AWO4BHJ.js → chunk-OCMOQOIJ.js} +401 -69
- package/dist/chunk-OCMOQOIJ.js.map +1 -0
- package/dist/cli.js +551 -108
- package/dist/cli.js.map +1 -1
- package/dist/engine/index.d.ts +44 -0
- package/dist/engine/index.js +1 -1
- package/package.json +1 -1
- package/dist/chunk-5AWO4BHJ.js.map +0 -1
package/dist/engine/index.d.ts
CHANGED
|
@@ -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
|
|
|
@@ -54,6 +61,7 @@ type ValidationIssue = {
|
|
|
54
61
|
path: string;
|
|
55
62
|
code: string;
|
|
56
63
|
message: string;
|
|
64
|
+
severity?: "error" | "warning";
|
|
57
65
|
received?: unknown;
|
|
58
66
|
expected?: string;
|
|
59
67
|
did_you_mean?: string[];
|
|
@@ -99,6 +107,16 @@ declare const CanvasSchema: z.ZodObject<{
|
|
|
99
107
|
tts_over_native: z.ZodArray<z.ZodString>;
|
|
100
108
|
}, z.core.$strip>>>;
|
|
101
109
|
motion_board: z.ZodOptional<z.ZodArray<z.ZodUnknown>>;
|
|
110
|
+
elements: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
111
|
+
ref: z.ZodString;
|
|
112
|
+
label: z.ZodString;
|
|
113
|
+
type: z.ZodString;
|
|
114
|
+
description: z.ZodOptional<z.ZodString>;
|
|
115
|
+
}, z.core.$strip>>>;
|
|
116
|
+
clip_spans: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
117
|
+
node: z.ZodString;
|
|
118
|
+
span_s: z.ZodNumber;
|
|
119
|
+
}, z.core.$strip>>>;
|
|
102
120
|
}, z.core.$strict>>;
|
|
103
121
|
}, z.core.$strict>>;
|
|
104
122
|
nodes: z.ZodArray<z.ZodObject<{
|
|
@@ -327,6 +345,14 @@ type RunResult = {
|
|
|
327
345
|
duration_ms: number;
|
|
328
346
|
};
|
|
329
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;
|
|
330
356
|
};
|
|
331
357
|
type RunOptions = {
|
|
332
358
|
signal?: AbortSignal;
|
|
@@ -342,6 +368,13 @@ type EngineOptions = {
|
|
|
342
368
|
cache: CacheStore;
|
|
343
369
|
outputsDir: string;
|
|
344
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;
|
|
345
378
|
};
|
|
346
379
|
declare class Engine$1 {
|
|
347
380
|
private readonly registry;
|
|
@@ -350,11 +383,13 @@ declare class Engine$1 {
|
|
|
350
383
|
private readonly cache;
|
|
351
384
|
private readonly outputsDir;
|
|
352
385
|
private readonly log;
|
|
386
|
+
private readonly persistAssets;
|
|
353
387
|
constructor(opts: EngineOptions);
|
|
354
388
|
validate(canvas: unknown): {
|
|
355
389
|
ok: true;
|
|
356
390
|
canvas: Canvas;
|
|
357
391
|
estimatedCredits: number;
|
|
392
|
+
warnings?: ValidationIssue[];
|
|
358
393
|
} | {
|
|
359
394
|
ok: false;
|
|
360
395
|
issues: ValidationIssue[];
|
|
@@ -364,6 +399,7 @@ declare class Engine$1 {
|
|
|
364
399
|
ok: true;
|
|
365
400
|
canvas: Canvas;
|
|
366
401
|
estimatedCredits: number;
|
|
402
|
+
warnings?: ValidationIssue[];
|
|
367
403
|
} | {
|
|
368
404
|
ok: false;
|
|
369
405
|
issues: ValidationIssue[];
|
|
@@ -392,6 +428,7 @@ type ValidationResult = {
|
|
|
392
428
|
ok: true;
|
|
393
429
|
canvas: Canvas;
|
|
394
430
|
estimatedCredits: number;
|
|
431
|
+
warnings?: ValidationIssue[];
|
|
395
432
|
} | {
|
|
396
433
|
ok: false;
|
|
397
434
|
issues: ValidationIssue[];
|
|
@@ -452,6 +489,13 @@ declare function createEngineFromEnv(opts?: {
|
|
|
452
489
|
cacheDir?: string;
|
|
453
490
|
outputsDir?: string;
|
|
454
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;
|
|
455
499
|
}): Engine$1;
|
|
456
500
|
|
|
457
501
|
export { BackendClient, Engine, LocalAssetStore, LocalCacheStore, ValidationError, createEngineFromEnv, defaultRegistry, generateCatalog, validateCanvasDeep };
|
package/dist/engine/index.js
CHANGED
package/package.json
CHANGED