@koda-sl/baker-cli 0.114.1 → 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 +83 -0
- package/dist/{chunk-ZWMMCLJ4.js → chunk-OCMOQOIJ.js} +241 -57
- package/dist/chunk-OCMOQOIJ.js.map +1 -0
- package/dist/cli.js +2753 -652
- 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-ZWMMCLJ4.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
|
|
|
@@ -338,6 +345,14 @@ type RunResult = {
|
|
|
338
345
|
duration_ms: number;
|
|
339
346
|
};
|
|
340
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;
|
|
341
356
|
};
|
|
342
357
|
type RunOptions = {
|
|
343
358
|
signal?: AbortSignal;
|
|
@@ -353,6 +368,13 @@ type EngineOptions = {
|
|
|
353
368
|
cache: CacheStore;
|
|
354
369
|
outputsDir: string;
|
|
355
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;
|
|
356
378
|
};
|
|
357
379
|
declare class Engine$1 {
|
|
358
380
|
private readonly registry;
|
|
@@ -361,6 +383,7 @@ declare class Engine$1 {
|
|
|
361
383
|
private readonly cache;
|
|
362
384
|
private readonly outputsDir;
|
|
363
385
|
private readonly log;
|
|
386
|
+
private readonly persistAssets;
|
|
364
387
|
constructor(opts: EngineOptions);
|
|
365
388
|
validate(canvas: unknown): {
|
|
366
389
|
ok: true;
|
|
@@ -466,6 +489,13 @@ declare function createEngineFromEnv(opts?: {
|
|
|
466
489
|
cacheDir?: string;
|
|
467
490
|
outputsDir?: string;
|
|
468
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;
|
|
469
499
|
}): Engine$1;
|
|
470
500
|
|
|
471
501
|
export { BackendClient, Engine, LocalAssetStore, LocalCacheStore, ValidationError, createEngineFromEnv, defaultRegistry, generateCatalog, validateCanvasDeep };
|
package/dist/engine/index.js
CHANGED