@koda-sl/baker-cli 0.121.0-dev.36aef87f5 → 0.121.0-dev.3b02f951b
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 +35 -24
- package/dist/{chunk-MWFJ5NOP.js → chunk-7WLX7E7H.js} +303 -61
- package/dist/chunk-7WLX7E7H.js.map +1 -0
- package/dist/cli.js +1225 -1113
- package/dist/cli.js.map +1 -1
- package/dist/engine/index.d.ts +30 -0
- package/dist/engine/index.js +1 -1
- package/package.json +1 -1
- package/dist/chunk-MWFJ5NOP.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
|
|
|
@@ -339,6 +346,14 @@ type RunResult = {
|
|
|
339
346
|
duration_ms: number;
|
|
340
347
|
};
|
|
341
348
|
outputs_dir: string;
|
|
349
|
+
node_runs: NodeRunRecord[];
|
|
350
|
+
};
|
|
351
|
+
type NodeRunRecord = {
|
|
352
|
+
node_id: string;
|
|
353
|
+
node_type: string;
|
|
354
|
+
cached: boolean;
|
|
355
|
+
duration_ms: number;
|
|
356
|
+
credits: number;
|
|
342
357
|
};
|
|
343
358
|
type RunOptions = {
|
|
344
359
|
signal?: AbortSignal;
|
|
@@ -354,6 +369,13 @@ type EngineOptions = {
|
|
|
354
369
|
cache: CacheStore;
|
|
355
370
|
outputsDir: string;
|
|
356
371
|
log?: LogFn;
|
|
372
|
+
/**
|
|
373
|
+
* Stamp durable canvas-assets URLs onto fresh node outputs before they are
|
|
374
|
+
* cached — the precondition for remote cache portability and run-history
|
|
375
|
+
* records. Best-effort: a failed upload logs a warning and keeps the entry
|
|
376
|
+
* local-only, never fails the node.
|
|
377
|
+
*/
|
|
378
|
+
persistAssets?: boolean;
|
|
357
379
|
};
|
|
358
380
|
declare class Engine$1 {
|
|
359
381
|
private readonly registry;
|
|
@@ -362,6 +384,7 @@ declare class Engine$1 {
|
|
|
362
384
|
private readonly cache;
|
|
363
385
|
private readonly outputsDir;
|
|
364
386
|
private readonly log;
|
|
387
|
+
private readonly persistAssets;
|
|
365
388
|
constructor(opts: EngineOptions);
|
|
366
389
|
validate(canvas: unknown): {
|
|
367
390
|
ok: true;
|
|
@@ -467,6 +490,13 @@ declare function createEngineFromEnv(opts?: {
|
|
|
467
490
|
cacheDir?: string;
|
|
468
491
|
outputsDir?: string;
|
|
469
492
|
log?: (line: string) => void;
|
|
493
|
+
/**
|
|
494
|
+
* Layer the company-scoped remote cache over the local one (and stamp
|
|
495
|
+
* durable asset URLs onto fresh outputs) so a fresh sandbox re-runs an
|
|
496
|
+
* already-computed canvas at zero credits. Defaults to on; disable with
|
|
497
|
+
* `remoteCache: false` or env BAKER_CANVAS_REMOTE_CACHE=off.
|
|
498
|
+
*/
|
|
499
|
+
remoteCache?: boolean;
|
|
470
500
|
}): Engine$1;
|
|
471
501
|
|
|
472
502
|
export { BackendClient, Engine, LocalAssetStore, LocalCacheStore, ValidationError, createEngineFromEnv, defaultRegistry, generateCatalog, validateCanvasDeep };
|
package/dist/engine/index.js
CHANGED
package/package.json
CHANGED