@koda-sl/baker-cli 0.396.0-dev.88120240 → 0.396.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 +181 -83
- package/canvas/static-ad-composition/index.html +119 -63
- package/canvas/static-ad-composition/meta.json +6 -6
- package/dist/{chunk-7OVZ6SOA.js → chunk-BRIJ4OWT.js} +12 -1
- package/dist/{chunk-7OVZ6SOA.js.map → chunk-BRIJ4OWT.js.map} +1 -1
- package/dist/{chunk-EYN7G4KF.js → chunk-EEHNRAFA.js} +4 -4
- package/dist/{chunk-MNSF5SQ3.js → chunk-LHJ5IXBN.js} +3902 -2432
- package/dist/chunk-LHJ5IXBN.js.map +1 -0
- package/dist/{chunk-Z7WHG6TA.js → chunk-Q7RQ3H6Y.js} +3 -3
- package/dist/{chunk-J76AGFBH.js → chunk-QP7637HG.js} +3 -3
- package/dist/{chunk-TWSWUIDI.js → chunk-ZWMATKNS.js} +2 -2
- package/dist/cli.js +10907 -9258
- package/dist/cli.js.map +1 -1
- package/dist/{client-YUWLIYLF.js → client-4P6U75EX.js} +4 -4
- package/dist/engine/index.d.ts +178 -117
- package/dist/engine/index.js +3 -3
- package/dist/{env-RQGMYIQN.js → env-LJHSZSNA.js} +2 -2
- package/dist/{output-POG3LVBW.js → output-HVBFJX4I.js} +5 -5
- package/dist/{shared-ZAEUTUNU.js → shared-7ZEF4DIX.js} +6 -6
- package/package.json +1 -1
- package/dist/chunk-MNSF5SQ3.js.map +0 -1
- /package/dist/{chunk-EYN7G4KF.js.map → chunk-EEHNRAFA.js.map} +0 -0
- /package/dist/{chunk-Z7WHG6TA.js.map → chunk-Q7RQ3H6Y.js.map} +0 -0
- /package/dist/{chunk-J76AGFBH.js.map → chunk-QP7637HG.js.map} +0 -0
- /package/dist/{chunk-TWSWUIDI.js.map → chunk-ZWMATKNS.js.map} +0 -0
- /package/dist/{client-YUWLIYLF.js.map → client-4P6U75EX.js.map} +0 -0
- /package/dist/{env-RQGMYIQN.js.map → env-LJHSZSNA.js.map} +0 -0
- /package/dist/{output-POG3LVBW.js.map → output-HVBFJX4I.js.map} +0 -0
- /package/dist/{shared-ZAEUTUNU.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;
|
|
@@ -338,15 +245,30 @@ type ExecCtx = {
|
|
|
338
245
|
assets: AssetStore;
|
|
339
246
|
log: LogFn;
|
|
340
247
|
signal?: AbortSignal;
|
|
248
|
+
/**
|
|
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.
|
|
252
|
+
*/
|
|
253
|
+
reportCharge?: (credits: number) => void;
|
|
341
254
|
};
|
|
342
255
|
|
|
343
256
|
type CostEstimate = {
|
|
344
257
|
credits: number;
|
|
345
258
|
seconds_estimate: number;
|
|
346
259
|
};
|
|
347
|
-
|
|
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<{
|
|
348
270
|
params: P;
|
|
349
|
-
}
|
|
271
|
+
}, CostEstimate>;
|
|
350
272
|
type ExecuteArgs<I, P> = {
|
|
351
273
|
inputs: I;
|
|
352
274
|
params: P;
|
|
@@ -363,9 +285,19 @@ type ValidateExtraIssue = {
|
|
|
363
285
|
path: string;
|
|
364
286
|
message: string;
|
|
365
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";
|
|
366
294
|
type ValidateExtraFn = (args: {
|
|
367
295
|
rawParams: unknown;
|
|
368
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;
|
|
369
301
|
}) => Promise<ValidateExtraIssue[]> | ValidateExtraIssue[];
|
|
370
302
|
/**
|
|
371
303
|
* Node-supplied cache-key extras hook. Returns extra fields the executor
|
|
@@ -384,7 +316,27 @@ type CacheKeyExtrasFn = (args: {
|
|
|
384
316
|
* without running the node. Remote nodes also use it at runtime so the
|
|
385
317
|
* delegate ingestor knows how to wrap returned bytes.
|
|
386
318
|
*/
|
|
387
|
-
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>;
|
|
388
340
|
type NodeDefinition<I = unknown, P = unknown, O = unknown> = {
|
|
389
341
|
id: string;
|
|
390
342
|
version: string;
|
|
@@ -406,17 +358,130 @@ type NodeDefinition<I = unknown, P = unknown, O = unknown> = {
|
|
|
406
358
|
validateExtra?: ValidateExtraFn;
|
|
407
359
|
cacheKeyExtras?: CacheKeyExtrasFn;
|
|
408
360
|
outputKinds?: OutputKindsSpec<P>;
|
|
409
|
-
|
|
361
|
+
staticTiming?: StaticTimingFn<P>;
|
|
362
|
+
execute: ParamsFn<ExecuteArgs<I, P>, Promise<O>>;
|
|
410
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
|
+
}
|
|
411
476
|
|
|
412
477
|
declare class NodeRegistry {
|
|
413
478
|
private readonly byId;
|
|
414
|
-
register(def:
|
|
415
|
-
registerAll(defs: readonly
|
|
416
|
-
get(id: string):
|
|
479
|
+
register(def: AnyNodeDefinition): void;
|
|
480
|
+
registerAll(defs: readonly AnyNodeDefinition[]): void;
|
|
481
|
+
get(id: string): AnyNodeDefinition | undefined;
|
|
417
482
|
has(id: string): boolean;
|
|
418
483
|
ids(): string[];
|
|
419
|
-
all():
|
|
484
|
+
all(): AnyNodeDefinition[];
|
|
420
485
|
}
|
|
421
486
|
|
|
422
487
|
type RunResult = {
|
|
@@ -544,11 +609,7 @@ declare class Engine$1 {
|
|
|
544
609
|
ok: false;
|
|
545
610
|
issues: ValidationIssue[];
|
|
546
611
|
}) & {
|
|
547
|
-
perNodeCredits?:
|
|
548
|
-
node_id: string;
|
|
549
|
-
node_type: string;
|
|
550
|
-
credits: number;
|
|
551
|
-
}>;
|
|
612
|
+
perNodeCredits?: NodeCredits[];
|
|
552
613
|
}>;
|
|
553
614
|
run(input: unknown, opts?: RunOptions): Promise<RunResult>;
|
|
554
615
|
private runLayers;
|
|
@@ -563,6 +624,10 @@ declare class Engine$1 {
|
|
|
563
624
|
private pruneToOutput;
|
|
564
625
|
private writeFinal;
|
|
565
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;
|
|
566
631
|
/**
|
|
567
632
|
* Print the warnings a node left on its outputs' metadata — a `voice_select` that
|
|
568
633
|
* could not honor the requested gender, say. Left in the metadata alone they were
|
|
@@ -591,11 +656,7 @@ type ValidationResult = {
|
|
|
591
656
|
};
|
|
592
657
|
type ValidationDeep = ValidationResult & {
|
|
593
658
|
/** Per-node credit estimate, in canvas order. Useful for `validate` cost previews. */
|
|
594
|
-
perNodeCredits?:
|
|
595
|
-
node_id: string;
|
|
596
|
-
node_type: string;
|
|
597
|
-
credits: number;
|
|
598
|
-
}>;
|
|
659
|
+
perNodeCredits?: NodeCredits[];
|
|
599
660
|
};
|
|
600
661
|
/**
|
|
601
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
|