pixelkiln 0.20.2 → 0.22.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 +15 -14
- package/dist/cli.d.ts +6 -2
- package/dist/cli.js +3763 -562
- package/dist/cli.js.map +1 -1
- package/dist/index.cjs +3349 -316
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +864 -148
- package/dist/index.d.ts +864 -148
- package/dist/index.js +3335 -317
- package/dist/index.js.map +1 -1
- package/docs/CLI.md +130 -6
- package/docs/GETTING_STARTED.md +9 -0
- package/docs/LIBRARY.md +58 -0
- package/package.json +1 -1
- package/skills/pixelkiln/SKILL.md +5 -0
package/dist/index.d.ts
CHANGED
|
@@ -7262,6 +7262,55 @@ declare function tagAdopted(provider: Provider, specs: ResolvedSpec[], lock: Loc
|
|
|
7262
7262
|
onProgress?: (msg: string) => void;
|
|
7263
7263
|
}): Promise<number>;
|
|
7264
7264
|
|
|
7265
|
+
interface SheetGroup {
|
|
7266
|
+
key: string;
|
|
7267
|
+
assetId: string;
|
|
7268
|
+
styleId: string;
|
|
7269
|
+
prompt: string;
|
|
7270
|
+
reviewObjectId: string;
|
|
7271
|
+
frameUrls: string[];
|
|
7272
|
+
width: number;
|
|
7273
|
+
height: number;
|
|
7274
|
+
mode?: "candidates" | "frame-set";
|
|
7275
|
+
frameLabels?: string[];
|
|
7276
|
+
fps?: number;
|
|
7277
|
+
revision?: {
|
|
7278
|
+
mode: "image-to-image" | "inpaint" | "outpaint";
|
|
7279
|
+
sourceAssetId: string;
|
|
7280
|
+
sourceUrl: string;
|
|
7281
|
+
width: number;
|
|
7282
|
+
height: number;
|
|
7283
|
+
};
|
|
7284
|
+
/** The art this generation replaces, shown beside the candidates. */
|
|
7285
|
+
current?: {
|
|
7286
|
+
url: string;
|
|
7287
|
+
width: number;
|
|
7288
|
+
height: number;
|
|
7289
|
+
};
|
|
7290
|
+
}
|
|
7291
|
+
/**
|
|
7292
|
+
* A contact sheet for choosing among generated candidates.
|
|
7293
|
+
*
|
|
7294
|
+
* This is the only step that needs human judgement, so it is optimised for one
|
|
7295
|
+
* thing: deciding fast. Small candidates render at an exact integer zoom with
|
|
7296
|
+
* a transparency checkerboard and a true-size swatch. Large candidates are
|
|
7297
|
+
* fitted without changing their aspect ratio, so a wide browser cannot turn a
|
|
7298
|
+
* review into an oversized or stretched image wall. Keyboard-first, one row
|
|
7299
|
+
* per asset, and the page posts back and closes itself.
|
|
7300
|
+
*/
|
|
7301
|
+
interface RenderSheetOptions {
|
|
7302
|
+
/** Where selections are POSTed. Default `/apply`, the standalone review server. */
|
|
7303
|
+
applyUrl?: string;
|
|
7304
|
+
/** Extra headers on the apply request, e.g. a gallery session token. */
|
|
7305
|
+
applyHeaders?: Record<string, string>;
|
|
7306
|
+
/**
|
|
7307
|
+
* Hosted inside another page: after a successful apply the sheet tells its
|
|
7308
|
+
* parent window (same origin only) so the host can close it and refresh.
|
|
7309
|
+
*/
|
|
7310
|
+
embedded?: boolean;
|
|
7311
|
+
}
|
|
7312
|
+
declare function renderSheet(groups: SheetGroup[], options?: RenderSheetOptions): string;
|
|
7313
|
+
|
|
7265
7314
|
interface PickResult {
|
|
7266
7315
|
selected: number;
|
|
7267
7316
|
skipped: number;
|
|
@@ -7271,56 +7320,828 @@ interface ReviewReadyInfo {
|
|
|
7271
7320
|
keys: string[];
|
|
7272
7321
|
}
|
|
7273
7322
|
/**
|
|
7274
|
-
*
|
|
7275
|
-
*
|
|
7276
|
-
*
|
|
7277
|
-
*
|
|
7278
|
-
|
|
7279
|
-
|
|
7323
|
+
* Everything a review needs except the HTTP server: the candidate groups to
|
|
7324
|
+
* show, the local files the sheet may load, and the apply step. `runPicker`
|
|
7325
|
+
* wraps this in the one-shot review server; the gallery hosts the same sheet
|
|
7326
|
+
* inside its own long-lived server instead.
|
|
7327
|
+
*/
|
|
7328
|
+
interface ReviewSession {
|
|
7329
|
+
groups: SheetGroup[];
|
|
7330
|
+
/** Exact local media routes the sheet references (revision sources). */
|
|
7331
|
+
assets: ReadonlyMap<string, {
|
|
7332
|
+
path: string;
|
|
7333
|
+
contentType: string;
|
|
7334
|
+
}>;
|
|
7335
|
+
/** Render the sheet, optionally addressed for an embedding host. */
|
|
7336
|
+
html(options?: RenderSheetOptions): string;
|
|
7337
|
+
/**
|
|
7338
|
+
* Commit the posted selections through the provider and write the lockfile.
|
|
7339
|
+
* Selections are persisted before the caller responds, so a closed tab never
|
|
7340
|
+
* loses a choice. Throws (leaving the sheet free to retry) on a provider error.
|
|
7341
|
+
*/
|
|
7342
|
+
apply(body: unknown, lockPath: string): Promise<PickResult>;
|
|
7343
|
+
}
|
|
7344
|
+
interface PrepareReviewOptions {
|
|
7345
|
+
onProgress?: (msg: string) => void;
|
|
7346
|
+
/** Optional lock-key selection for a filtered or mixed-provider run. */
|
|
7347
|
+
keys?: Iterable<string>;
|
|
7348
|
+
/** Resolved intent supplies immutable revision context for comparison. */
|
|
7349
|
+
specs?: ResolvedSpec[];
|
|
7350
|
+
/** Prefix for the sheet's local media routes when hosted under a sub-path. */
|
|
7351
|
+
routePrefix?: string;
|
|
7352
|
+
}
|
|
7353
|
+
/** Gather every entry in review for this provider. Null when nothing is waiting. */
|
|
7354
|
+
declare function prepareReview(provider: Provider, lock: Lock, opts?: PrepareReviewOptions): Promise<ReviewSession | null>;
|
|
7355
|
+
/**
|
|
7356
|
+
* Serves the contact sheet on localhost, waits for the selections to be
|
|
7357
|
+
* applied, then shuts down.
|
|
7358
|
+
*
|
|
7359
|
+
* Selections are committed through the provider (`select-frames` promotes the chosen
|
|
7360
|
+
* candidate to its own object and drops the rest) and written to the lockfile
|
|
7361
|
+
* before the browser gets its response, so a closed tab never loses a choice.
|
|
7362
|
+
*/
|
|
7363
|
+
declare function runPicker(provider: Provider, lock: Lock, lockPath: string, opts?: {
|
|
7364
|
+
port?: number;
|
|
7365
|
+
open?: boolean;
|
|
7366
|
+
onProgress?: (msg: string) => void;
|
|
7367
|
+
/** Optional lock-key selection for a filtered or mixed-provider run. */
|
|
7368
|
+
keys?: Iterable<string>;
|
|
7369
|
+
/** Resolved intent supplies immutable revision context for comparison. */
|
|
7370
|
+
specs?: ResolvedSpec[];
|
|
7371
|
+
/** Receives the live URL as soon as the server listens. */
|
|
7372
|
+
onReady?: (info: ReviewReadyInfo) => void;
|
|
7373
|
+
}): Promise<PickResult>;
|
|
7374
|
+
|
|
7375
|
+
/**
|
|
7376
|
+
* One sibling project registered in a workspace catalog. Only paths and
|
|
7377
|
+
* identity live here — never a credential. Each project keeps loading its own
|
|
7378
|
+
* key from its own `.env`, the same as it does standalone.
|
|
7379
|
+
*/
|
|
7380
|
+
declare const WorkspaceProjectSchema: z.ZodObject<{
|
|
7381
|
+
id: z.ZodString;
|
|
7382
|
+
/** Manifest path, relative to the catalog file's own directory. */
|
|
7383
|
+
manifest: z.ZodString;
|
|
7384
|
+
/** Lockfile path, relative to the catalog file's own directory. */
|
|
7385
|
+
lock: z.ZodString;
|
|
7386
|
+
provider: z.ZodDefault<z.ZodString>;
|
|
7387
|
+
/** Free-form label for a shared account, e.g. distinguishing sandboxes. */
|
|
7388
|
+
account: z.ZodOptional<z.ZodString>;
|
|
7389
|
+
}, "strict", z.ZodTypeAny, {
|
|
7390
|
+
provider: string;
|
|
7391
|
+
id: string;
|
|
7392
|
+
manifest: string;
|
|
7393
|
+
lock: string;
|
|
7394
|
+
account?: string | undefined;
|
|
7395
|
+
}, {
|
|
7396
|
+
id: string;
|
|
7397
|
+
manifest: string;
|
|
7398
|
+
lock: string;
|
|
7399
|
+
provider?: string | undefined;
|
|
7400
|
+
account?: string | undefined;
|
|
7401
|
+
}>;
|
|
7402
|
+
declare const WorkspaceSchema: z.ZodObject<{
|
|
7403
|
+
version: z.ZodLiteral<1>;
|
|
7404
|
+
projects: z.ZodDefault<z.ZodArray<z.ZodObject<{
|
|
7405
|
+
id: z.ZodString;
|
|
7406
|
+
/** Manifest path, relative to the catalog file's own directory. */
|
|
7407
|
+
manifest: z.ZodString;
|
|
7408
|
+
/** Lockfile path, relative to the catalog file's own directory. */
|
|
7409
|
+
lock: z.ZodString;
|
|
7410
|
+
provider: z.ZodDefault<z.ZodString>;
|
|
7411
|
+
/** Free-form label for a shared account, e.g. distinguishing sandboxes. */
|
|
7412
|
+
account: z.ZodOptional<z.ZodString>;
|
|
7413
|
+
}, "strict", z.ZodTypeAny, {
|
|
7414
|
+
provider: string;
|
|
7415
|
+
id: string;
|
|
7416
|
+
manifest: string;
|
|
7417
|
+
lock: string;
|
|
7418
|
+
account?: string | undefined;
|
|
7419
|
+
}, {
|
|
7420
|
+
id: string;
|
|
7421
|
+
manifest: string;
|
|
7422
|
+
lock: string;
|
|
7423
|
+
provider?: string | undefined;
|
|
7424
|
+
account?: string | undefined;
|
|
7425
|
+
}>, "many">>;
|
|
7426
|
+
}, "strict", z.ZodTypeAny, {
|
|
7427
|
+
version: 1;
|
|
7428
|
+
projects: {
|
|
7429
|
+
provider: string;
|
|
7430
|
+
id: string;
|
|
7431
|
+
manifest: string;
|
|
7432
|
+
lock: string;
|
|
7433
|
+
account?: string | undefined;
|
|
7434
|
+
}[];
|
|
7435
|
+
}, {
|
|
7436
|
+
version: 1;
|
|
7437
|
+
projects?: {
|
|
7438
|
+
id: string;
|
|
7439
|
+
manifest: string;
|
|
7440
|
+
lock: string;
|
|
7441
|
+
provider?: string | undefined;
|
|
7442
|
+
account?: string | undefined;
|
|
7443
|
+
}[] | undefined;
|
|
7444
|
+
}>;
|
|
7445
|
+
type WorkspaceProject = z.infer<typeof WorkspaceProjectSchema>;
|
|
7446
|
+
type Workspace = z.infer<typeof WorkspaceSchema>;
|
|
7447
|
+
/**
|
|
7448
|
+
* Parses a workspace catalog, rejecting anything that is not v1.
|
|
7449
|
+
*
|
|
7450
|
+
* Mirrors `parseLock`'s stance: no migration path, fail loudly rather than
|
|
7451
|
+
* guess at a hand-edited or corrupted file's intent.
|
|
7452
|
+
*/
|
|
7453
|
+
declare function parseWorkspace(raw: unknown): Workspace;
|
|
7454
|
+
declare function loadWorkspace(workspacePath: string): Promise<Workspace>;
|
|
7455
|
+
/** Atomic write — a crash mid-save must not leave a truncated catalog. */
|
|
7456
|
+
declare function saveWorkspace(workspacePath: string, ws: Workspace): Promise<void>;
|
|
7457
|
+
/** Stored path convention: relative to the catalog's directory, forward-slash. */
|
|
7458
|
+
declare function toPortablePath(dir: string, absolute: string): string;
|
|
7459
|
+
/** Resolve a registered project's stored paths against the catalog's directory. */
|
|
7460
|
+
declare function resolveProject(dir: string, project: WorkspaceProject): {
|
|
7461
|
+
manifestPath: string;
|
|
7462
|
+
lockPath: string;
|
|
7463
|
+
};
|
|
7464
|
+
interface WorkspaceDiagnostic {
|
|
7465
|
+
id: "duplicate-id" | "duplicate-lock" | "duplicate-manifest" | "missing-manifest" | "missing-lock" | "absolute-path" | "mixed-provider";
|
|
7466
|
+
level: "error" | "warning";
|
|
7467
|
+
message: string;
|
|
7468
|
+
}
|
|
7469
|
+
/**
|
|
7470
|
+
* Checks the catalog without touching the network or any registered
|
|
7471
|
+
* project's files. Duplicate ids and duplicate lock paths are errors — either
|
|
7472
|
+
* would corrupt the union claim set. A duplicate manifest is only a warning,
|
|
7473
|
+
* because a manifest paired with a variant `--lock` is an already-supported
|
|
7474
|
+
* pattern (see `cachePathFor`). Missing files are errors: a claim set derived
|
|
7475
|
+
* from a workspace that silently skipped a project is the exact hazard this
|
|
7476
|
+
* catalog exists to prevent.
|
|
7477
|
+
*/
|
|
7478
|
+
declare function validateWorkspace(ws: Workspace, dir: string): WorkspaceDiagnostic[];
|
|
7479
|
+
|
|
7480
|
+
/**
|
|
7481
|
+
* A read-only view of everything the project has generated, built from the
|
|
7482
|
+
* same three sources `plan` reads — manifest, lockfile, and disk — and nothing
|
|
7483
|
+
* else. No provider is contacted, so the snapshot is free to rebuild on every
|
|
7484
|
+
* page refresh while a `gen` runs in another terminal.
|
|
7485
|
+
*
|
|
7486
|
+
* The lockfile is the record of paid work, so the gallery is lock-first: an
|
|
7487
|
+
* entry the manifest no longer declares still appears (as `undeclared`) rather
|
|
7488
|
+
* than vanishing, and a declared asset with no entry yet appears as a
|
|
7489
|
+
* placeholder so the gallery also shows what has *not* been made.
|
|
7490
|
+
*/
|
|
7491
|
+
type GalleryState = PlanState | "undeclared";
|
|
7492
|
+
interface GalleryMedia {
|
|
7493
|
+
/** Absolute path of the file the server may read for this id. */
|
|
7494
|
+
path: string;
|
|
7495
|
+
contentType: MediaType;
|
|
7496
|
+
}
|
|
7497
|
+
interface GalleryOutput {
|
|
7498
|
+
/** Manifest-relative path as recorded (or as the manifest would record it). */
|
|
7499
|
+
path: string;
|
|
7500
|
+
absolutePath: string;
|
|
7501
|
+
/** Null for a file PixelKiln did not download (untracked or `source` art). */
|
|
7502
|
+
sha256: string | null;
|
|
7503
|
+
role: string | null;
|
|
7504
|
+
mediaType: MediaType | null;
|
|
7505
|
+
exists: boolean;
|
|
7506
|
+
bytes: number | null;
|
|
7507
|
+
/** Served only while the gallery runs; null when the file is missing. */
|
|
7508
|
+
url: string | null;
|
|
7509
|
+
}
|
|
7510
|
+
interface GalleryQuality {
|
|
7511
|
+
state: QualityProfileInspection["state"];
|
|
7512
|
+
reason: string;
|
|
7513
|
+
/** Manifest-relative refined output path. */
|
|
7514
|
+
output: string;
|
|
7515
|
+
/** Manifest-relative quality companion path. */
|
|
7516
|
+
record: string;
|
|
7517
|
+
recordExists: boolean;
|
|
7518
|
+
outputs: GalleryOutput[];
|
|
7519
|
+
palette: string[] | null;
|
|
7520
|
+
review: {
|
|
7521
|
+
status: "pending";
|
|
7522
|
+
} | {
|
|
7523
|
+
status: "approved";
|
|
7524
|
+
reviewer: string;
|
|
7525
|
+
approvedAt: string;
|
|
7526
|
+
note: string | null;
|
|
7527
|
+
} | null;
|
|
7528
|
+
nativeGrid: {
|
|
7529
|
+
confidence: string;
|
|
7530
|
+
consensus: string;
|
|
7531
|
+
stepX: number;
|
|
7532
|
+
stepY: number;
|
|
7533
|
+
sourceWidth: number;
|
|
7534
|
+
sourceHeight: number;
|
|
7535
|
+
nativeWidth: number;
|
|
7536
|
+
nativeHeight: number;
|
|
7537
|
+
} | null;
|
|
7538
|
+
audit: {
|
|
7539
|
+
safe: boolean;
|
|
7540
|
+
colorCount: number;
|
|
7541
|
+
transparency: number;
|
|
7542
|
+
reasons: string[];
|
|
7543
|
+
} | null;
|
|
7544
|
+
frameSet: {
|
|
7545
|
+
fps: number;
|
|
7546
|
+
count: number;
|
|
7547
|
+
roles: string[];
|
|
7548
|
+
} | null;
|
|
7549
|
+
/** Fail-closed verdict from the record itself, when one could be read. */
|
|
7550
|
+
check: {
|
|
7551
|
+
safe: boolean;
|
|
7552
|
+
current: boolean;
|
|
7553
|
+
reasons: string[];
|
|
7554
|
+
} | null;
|
|
7555
|
+
}
|
|
7556
|
+
interface GalleryItem {
|
|
7557
|
+
/** Page identity: the lock key, prefixed by project id in a workspace. */
|
|
7558
|
+
id: string;
|
|
7559
|
+
/** Workspace project id, or null for a single-project gallery. */
|
|
7560
|
+
project: string | null;
|
|
7561
|
+
key: string;
|
|
7562
|
+
styleId: string;
|
|
7563
|
+
assetId: string;
|
|
7564
|
+
/** False for a lock entry the current manifest no longer declares. */
|
|
7565
|
+
declared: boolean;
|
|
7566
|
+
state: GalleryState;
|
|
7567
|
+
reason: string;
|
|
7568
|
+
/** Lock lifecycle status; null when nothing has been submitted. */
|
|
7569
|
+
status: LockEntry["status"] | null;
|
|
7570
|
+
provider: string;
|
|
7571
|
+
generator: string;
|
|
7572
|
+
/** The prompt actually sent, or the prompt that would be sent. */
|
|
7573
|
+
prompt: string;
|
|
7574
|
+
/** Current resolved prompt when it differs from the one recorded (stale work). */
|
|
7575
|
+
currentPrompt: string | null;
|
|
7576
|
+
width: number;
|
|
7577
|
+
height: number;
|
|
7578
|
+
tileFeature: string | null;
|
|
7579
|
+
/** Playback rate for an ordered frame set, from the quality record or provider metadata. */
|
|
7580
|
+
fps: number | null;
|
|
7581
|
+
cost: number;
|
|
7582
|
+
costUnit: string;
|
|
7583
|
+
/** Offline estimate for the current spec; null for undeclared entries. */
|
|
7584
|
+
estimatedCost: number | null;
|
|
7585
|
+
candidates: number | null;
|
|
7586
|
+
submittedAt: string | null;
|
|
7587
|
+
downloadedAt: string | null;
|
|
7588
|
+
jobId: string | null;
|
|
7589
|
+
objectId: string | null;
|
|
7590
|
+
reviewObjectId: string | null;
|
|
7591
|
+
candidateIndex: number | null;
|
|
7592
|
+
error: string | null;
|
|
7593
|
+
recordedSpecHash: string | null;
|
|
7594
|
+
currentSpecHash: string | null;
|
|
7595
|
+
revision: LockEntry["revision"];
|
|
7596
|
+
/** Parent lock key for a revision, so the page can link lineage. */
|
|
7597
|
+
revisionParentKey: string | null;
|
|
7598
|
+
outputs: GalleryOutput[];
|
|
7599
|
+
quality: GalleryQuality | null;
|
|
7600
|
+
providerMetadata: Record<string, unknown>;
|
|
7601
|
+
/** Manifest asset as declared, for the "intent" side of the record. */
|
|
7602
|
+
asset: Asset | null;
|
|
7603
|
+
/** Manifest-relative committed art placed instead of generated output. */
|
|
7604
|
+
source: string | null;
|
|
7605
|
+
tags: string[];
|
|
7606
|
+
category: string | null;
|
|
7607
|
+
}
|
|
7608
|
+
interface GalleryStyle {
|
|
7609
|
+
id: string;
|
|
7610
|
+
/** Workspace project id, or null for a single-project gallery. */
|
|
7611
|
+
project: string | null;
|
|
7612
|
+
provider: string;
|
|
7613
|
+
generator: string;
|
|
7614
|
+
outDir: string;
|
|
7615
|
+
/** Resolved look, after inheritance. */
|
|
7616
|
+
promptPrefix: string;
|
|
7617
|
+
promptSuffix: string;
|
|
7618
|
+
palette: string[];
|
|
7619
|
+
quality: boolean;
|
|
7620
|
+
tags: string[];
|
|
7621
|
+
/** Parent style id when this style `extends` one. */
|
|
7622
|
+
extends: string | null;
|
|
7623
|
+
/**
|
|
7624
|
+
* Fields the style declares itself, as written. A field absent here is
|
|
7625
|
+
* inherited (or a default), which is what decides whether a parent edit
|
|
7626
|
+
* reaches this style.
|
|
7627
|
+
*/
|
|
7628
|
+
ownFields: string[];
|
|
7629
|
+
items: number;
|
|
7630
|
+
spendByUnit: Record<string, number>;
|
|
7631
|
+
/** What regenerating every declared asset in this style would cost now. */
|
|
7632
|
+
regenerate: {
|
|
7633
|
+
assets: number;
|
|
7634
|
+
cost: number;
|
|
7635
|
+
costUnit: string;
|
|
7636
|
+
};
|
|
7637
|
+
/** Candidates one generation returns for this style; null when its assets disagree or none resolve. */
|
|
7638
|
+
candidates: number | null;
|
|
7639
|
+
/** Whether that count is a provider option the manifest can set (`patch-style`). */
|
|
7640
|
+
candidatesEditable: boolean;
|
|
7641
|
+
/** Declared assets `plan` would generate right now, with their offline estimate. */
|
|
7642
|
+
actionable: {
|
|
7643
|
+
keys: string[];
|
|
7644
|
+
cost: number;
|
|
7645
|
+
costUnit: string;
|
|
7646
|
+
};
|
|
7647
|
+
}
|
|
7648
|
+
interface GalleryProject {
|
|
7649
|
+
/** Workspace catalog id; the manifest name for a single project. */
|
|
7650
|
+
id: string;
|
|
7651
|
+
name: string;
|
|
7652
|
+
manifest: string;
|
|
7653
|
+
lock: string;
|
|
7654
|
+
root: string;
|
|
7655
|
+
/** Manifest default provider, or the catalog provider when the manifest failed to load. */
|
|
7656
|
+
provider: string;
|
|
7657
|
+
account: string | null;
|
|
7658
|
+
/** Hash of the manifest bytes this snapshot was built from; an edit must quote it. */
|
|
7659
|
+
manifestSha256: string | null;
|
|
7660
|
+
entries: number;
|
|
7661
|
+
items: number;
|
|
7662
|
+
spendByUnit: Record<string, number>;
|
|
7663
|
+
/** Why this project contributed nothing; a broken sibling never hides the rest. */
|
|
7664
|
+
error: string | null;
|
|
7665
|
+
}
|
|
7666
|
+
interface GallerySnapshot {
|
|
7667
|
+
version: 1;
|
|
7668
|
+
generatedAt: string;
|
|
7669
|
+
/** The one project shown; null in a workspace gallery. */
|
|
7670
|
+
project: GalleryProject | null;
|
|
7671
|
+
/** Every registered project, in catalog order; null for a single project. */
|
|
7672
|
+
workspace: {
|
|
7673
|
+
path: string;
|
|
7674
|
+
dir: string;
|
|
7675
|
+
projects: GalleryProject[];
|
|
7676
|
+
} | null;
|
|
7677
|
+
/** Active `--style`/`--only` filters, so the page can say what it is showing. */
|
|
7678
|
+
filter: {
|
|
7679
|
+
styles: string[];
|
|
7680
|
+
assets: string[];
|
|
7681
|
+
};
|
|
7682
|
+
totals: {
|
|
7683
|
+
entries: number;
|
|
7684
|
+
items: number;
|
|
7685
|
+
byState: Record<string, number>;
|
|
7686
|
+
byStatus: Record<string, number>;
|
|
7687
|
+
spendByUnit: Record<string, number>;
|
|
7688
|
+
};
|
|
7689
|
+
styles: GalleryStyle[];
|
|
7690
|
+
items: GalleryItem[];
|
|
7691
|
+
}
|
|
7692
|
+
interface GalleryBuild {
|
|
7693
|
+
snapshot: GallerySnapshot;
|
|
7694
|
+
/** Exactly the files the page may load, keyed by their route id. */
|
|
7695
|
+
media: Map<string, GalleryMedia>;
|
|
7696
|
+
}
|
|
7697
|
+
interface BuildGalleryOptions {
|
|
7698
|
+
loaded: LoadedManifest;
|
|
7699
|
+
specs: ResolvedSpec[];
|
|
7700
|
+
lock: Lock;
|
|
7701
|
+
lockPath: string;
|
|
7702
|
+
filter?: {
|
|
7703
|
+
styles?: string[];
|
|
7704
|
+
assets?: string[];
|
|
7705
|
+
};
|
|
7706
|
+
/** Deterministic clock hook for tests. */
|
|
7707
|
+
now?: () => Date;
|
|
7708
|
+
}
|
|
7709
|
+
/** Route id for one absolute path: stable across refreshes, not enumerable. */
|
|
7710
|
+
declare function galleryMediaId(absolutePath: string): string;
|
|
7711
|
+
declare function galleryMediaRoute(id: string): string;
|
|
7712
|
+
declare function buildGallerySnapshot(opts: BuildGalleryOptions): Promise<GalleryBuild>;
|
|
7713
|
+
interface BuildWorkspaceGalleryOptions {
|
|
7714
|
+
workspace: Workspace;
|
|
7715
|
+
/** Catalog path; project paths resolve against its directory. */
|
|
7716
|
+
workspacePath: string;
|
|
7717
|
+
filter?: {
|
|
7718
|
+
styles?: string[];
|
|
7719
|
+
assets?: string[];
|
|
7720
|
+
};
|
|
7721
|
+
now?: () => Date;
|
|
7722
|
+
}
|
|
7723
|
+
/**
|
|
7724
|
+
* One gallery for every project a workspace catalog registers. Each project
|
|
7725
|
+
* is built with the single-project builder and its items are namespaced by
|
|
7726
|
+
* project id, so two projects can both own `base/anvil`. A project whose
|
|
7727
|
+
* manifest or lock fails to load is listed with its error and contributes
|
|
7728
|
+
* nothing, mirroring `workspace status`: one broken sibling must not hide
|
|
7729
|
+
* the rest. A `--style`/`--only` filter is applied per project and a project
|
|
7730
|
+
* that has none of the requested ids simply shows zero items.
|
|
7731
|
+
*/
|
|
7732
|
+
declare function buildWorkspaceGallerySnapshot(opts: BuildWorkspaceGalleryOptions): Promise<GalleryBuild>;
|
|
7733
|
+
|
|
7734
|
+
/**
|
|
7735
|
+
* The gallery page: every generation the project has made, at integer zoom,
|
|
7736
|
+
* with the provenance record behind each one a click away.
|
|
7737
|
+
*
|
|
7738
|
+
* It shares the review sheet's visual language on purpose — same palette, same
|
|
7739
|
+
* square corners, same monospace identity — so `pick` and `gallery` read as two
|
|
7740
|
+
* rooms of one tool. Where `pick` is built for deciding fast, this page is
|
|
7741
|
+
* built for looking things up: search, filter, and a detail drawer that shows
|
|
7742
|
+
* the lockfile, quality record, and manifest intent side by side.
|
|
7743
|
+
*
|
|
7744
|
+
* Everything is rendered client-side from one embedded snapshot, and the same
|
|
7745
|
+
* code re-renders from `/api/gallery.json` on Refresh, so the page can stay
|
|
7746
|
+
* open while `gen` runs elsewhere. All text reaches the DOM via textContent;
|
|
7747
|
+
* the only escaping needed is keeping the JSON from closing its script tag
|
|
7748
|
+
* (`<\/` and `<\u0021--` are both still valid JSON, so the page can parse
|
|
7749
|
+
* the very same bytes back for the refresh path).
|
|
7750
|
+
*/
|
|
7751
|
+
interface RenderGalleryOptions {
|
|
7752
|
+
/** Present when the server accepts any write; the page sends it back on every POST. */
|
|
7753
|
+
session?: string;
|
|
7754
|
+
/** Manifest editing is enabled (`--edit`). */
|
|
7755
|
+
editable?: boolean;
|
|
7756
|
+
/** Generation jobs are enabled (`--budget`). */
|
|
7757
|
+
generation?: boolean;
|
|
7758
|
+
}
|
|
7759
|
+
declare function renderGallery(snapshot: GallerySnapshot, opts?: RenderGalleryOptions): string;
|
|
7760
|
+
|
|
7761
|
+
declare const ManifestEditSchema: z.ZodDiscriminatedUnion<"action", [z.ZodObject<{
|
|
7762
|
+
action: z.ZodLiteral<"patch-asset">;
|
|
7763
|
+
/** Workspace project id; omitted for a single-project gallery. */
|
|
7764
|
+
project: z.ZodOptional<z.ZodString>;
|
|
7765
|
+
assetId: z.ZodString;
|
|
7766
|
+
/** Manifest bytes the page last saw; a mismatch refuses the write. */
|
|
7767
|
+
expectedSha256: z.ZodString;
|
|
7768
|
+
patch: z.ZodObject<{
|
|
7769
|
+
prompt: z.ZodOptional<z.ZodString>;
|
|
7770
|
+
/** Per-style override for the style being viewed; null removes it. */
|
|
7771
|
+
promptForStyle: z.ZodOptional<z.ZodObject<{
|
|
7772
|
+
styleId: z.ZodString;
|
|
7773
|
+
prompt: z.ZodNullable<z.ZodString>;
|
|
7774
|
+
}, "strip", z.ZodTypeAny, {
|
|
7775
|
+
prompt: string | null;
|
|
7776
|
+
styleId: string;
|
|
7777
|
+
}, {
|
|
7778
|
+
prompt: string | null;
|
|
7779
|
+
styleId: string;
|
|
7780
|
+
}>>;
|
|
7781
|
+
category: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
7782
|
+
width: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
7783
|
+
height: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
7784
|
+
size: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
7785
|
+
tags: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
7786
|
+
}, "strict", z.ZodTypeAny, {
|
|
7787
|
+
width?: number | null | undefined;
|
|
7788
|
+
height?: number | null | undefined;
|
|
7789
|
+
size?: number | null | undefined;
|
|
7790
|
+
tags?: string[] | undefined;
|
|
7791
|
+
prompt?: string | undefined;
|
|
7792
|
+
category?: string | null | undefined;
|
|
7793
|
+
promptForStyle?: {
|
|
7794
|
+
prompt: string | null;
|
|
7795
|
+
styleId: string;
|
|
7796
|
+
} | undefined;
|
|
7797
|
+
}, {
|
|
7798
|
+
width?: number | null | undefined;
|
|
7799
|
+
height?: number | null | undefined;
|
|
7800
|
+
size?: number | null | undefined;
|
|
7801
|
+
tags?: string[] | undefined;
|
|
7802
|
+
prompt?: string | undefined;
|
|
7803
|
+
category?: string | null | undefined;
|
|
7804
|
+
promptForStyle?: {
|
|
7805
|
+
prompt: string | null;
|
|
7806
|
+
styleId: string;
|
|
7807
|
+
} | undefined;
|
|
7808
|
+
}>;
|
|
7809
|
+
}, "strict", z.ZodTypeAny, {
|
|
7810
|
+
assetId: string;
|
|
7811
|
+
patch: {
|
|
7812
|
+
width?: number | null | undefined;
|
|
7813
|
+
height?: number | null | undefined;
|
|
7814
|
+
size?: number | null | undefined;
|
|
7815
|
+
tags?: string[] | undefined;
|
|
7816
|
+
prompt?: string | undefined;
|
|
7817
|
+
category?: string | null | undefined;
|
|
7818
|
+
promptForStyle?: {
|
|
7819
|
+
prompt: string | null;
|
|
7820
|
+
styleId: string;
|
|
7821
|
+
} | undefined;
|
|
7822
|
+
};
|
|
7823
|
+
expectedSha256: string;
|
|
7824
|
+
action: "patch-asset";
|
|
7825
|
+
project?: string | undefined;
|
|
7826
|
+
}, {
|
|
7827
|
+
assetId: string;
|
|
7828
|
+
patch: {
|
|
7829
|
+
width?: number | null | undefined;
|
|
7830
|
+
height?: number | null | undefined;
|
|
7831
|
+
size?: number | null | undefined;
|
|
7832
|
+
tags?: string[] | undefined;
|
|
7833
|
+
prompt?: string | undefined;
|
|
7834
|
+
category?: string | null | undefined;
|
|
7835
|
+
promptForStyle?: {
|
|
7836
|
+
prompt: string | null;
|
|
7837
|
+
styleId: string;
|
|
7838
|
+
} | undefined;
|
|
7839
|
+
};
|
|
7840
|
+
expectedSha256: string;
|
|
7841
|
+
action: "patch-asset";
|
|
7842
|
+
project?: string | undefined;
|
|
7843
|
+
}>, z.ZodObject<{
|
|
7844
|
+
action: z.ZodLiteral<"add-asset">;
|
|
7845
|
+
project: z.ZodOptional<z.ZodString>;
|
|
7846
|
+
assetId: z.ZodString;
|
|
7847
|
+
expectedSha256: z.ZodString;
|
|
7848
|
+
asset: z.ZodObject<{
|
|
7849
|
+
prompt: z.ZodString;
|
|
7850
|
+
category: z.ZodOptional<z.ZodString>;
|
|
7851
|
+
width: z.ZodOptional<z.ZodNumber>;
|
|
7852
|
+
height: z.ZodOptional<z.ZodNumber>;
|
|
7853
|
+
size: z.ZodOptional<z.ZodNumber>;
|
|
7854
|
+
tags: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
7855
|
+
/** Restrict to these styles; empty or omitted means every style. */
|
|
7856
|
+
styles: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
7857
|
+
}, "strict", z.ZodTypeAny, {
|
|
7858
|
+
prompt: string;
|
|
7859
|
+
width?: number | undefined;
|
|
7860
|
+
height?: number | undefined;
|
|
7861
|
+
size?: number | undefined;
|
|
7862
|
+
tags?: string[] | undefined;
|
|
7863
|
+
category?: string | undefined;
|
|
7864
|
+
styles?: string[] | undefined;
|
|
7865
|
+
}, {
|
|
7866
|
+
prompt: string;
|
|
7867
|
+
width?: number | undefined;
|
|
7868
|
+
height?: number | undefined;
|
|
7869
|
+
size?: number | undefined;
|
|
7870
|
+
tags?: string[] | undefined;
|
|
7871
|
+
category?: string | undefined;
|
|
7872
|
+
styles?: string[] | undefined;
|
|
7873
|
+
}>;
|
|
7874
|
+
}, "strict", z.ZodTypeAny, {
|
|
7875
|
+
assetId: string;
|
|
7876
|
+
asset: {
|
|
7877
|
+
prompt: string;
|
|
7878
|
+
width?: number | undefined;
|
|
7879
|
+
height?: number | undefined;
|
|
7880
|
+
size?: number | undefined;
|
|
7881
|
+
tags?: string[] | undefined;
|
|
7882
|
+
category?: string | undefined;
|
|
7883
|
+
styles?: string[] | undefined;
|
|
7884
|
+
};
|
|
7885
|
+
expectedSha256: string;
|
|
7886
|
+
action: "add-asset";
|
|
7887
|
+
project?: string | undefined;
|
|
7888
|
+
}, {
|
|
7889
|
+
assetId: string;
|
|
7890
|
+
asset: {
|
|
7891
|
+
prompt: string;
|
|
7892
|
+
width?: number | undefined;
|
|
7893
|
+
height?: number | undefined;
|
|
7894
|
+
size?: number | undefined;
|
|
7895
|
+
tags?: string[] | undefined;
|
|
7896
|
+
category?: string | undefined;
|
|
7897
|
+
styles?: string[] | undefined;
|
|
7898
|
+
};
|
|
7899
|
+
expectedSha256: string;
|
|
7900
|
+
action: "add-asset";
|
|
7901
|
+
project?: string | undefined;
|
|
7902
|
+
}>, z.ZodObject<{
|
|
7903
|
+
action: z.ZodLiteral<"patch-style">;
|
|
7904
|
+
project: z.ZodOptional<z.ZodString>;
|
|
7905
|
+
styleId: z.ZodString;
|
|
7906
|
+
expectedSha256: z.ZodString;
|
|
7907
|
+
patch: z.ZodEffects<z.ZodObject<{
|
|
7908
|
+
/** Candidates per generation, written to the provider's own option. */
|
|
7909
|
+
candidates: z.ZodOptional<z.ZodNumber>;
|
|
7910
|
+
/** Empty clears the style's own value (inherit, or the default). */
|
|
7911
|
+
promptPrefix: z.ZodOptional<z.ZodString>;
|
|
7912
|
+
promptSuffix: z.ZodOptional<z.ZodString>;
|
|
7913
|
+
/** `#rrggbb` values; null or empty clears the style's own palette. */
|
|
7914
|
+
palette: z.ZodOptional<z.ZodNullable<z.ZodArray<z.ZodString, "many">>>;
|
|
7915
|
+
}, "strict", z.ZodTypeAny, {
|
|
7916
|
+
candidates?: number | undefined;
|
|
7917
|
+
palette?: string[] | null | undefined;
|
|
7918
|
+
promptSuffix?: string | undefined;
|
|
7919
|
+
promptPrefix?: string | undefined;
|
|
7920
|
+
}, {
|
|
7921
|
+
candidates?: number | undefined;
|
|
7922
|
+
palette?: string[] | null | undefined;
|
|
7923
|
+
promptSuffix?: string | undefined;
|
|
7924
|
+
promptPrefix?: string | undefined;
|
|
7925
|
+
}>, {
|
|
7926
|
+
candidates?: number | undefined;
|
|
7927
|
+
palette?: string[] | null | undefined;
|
|
7928
|
+
promptSuffix?: string | undefined;
|
|
7929
|
+
promptPrefix?: string | undefined;
|
|
7930
|
+
}, {
|
|
7931
|
+
candidates?: number | undefined;
|
|
7932
|
+
palette?: string[] | null | undefined;
|
|
7933
|
+
promptSuffix?: string | undefined;
|
|
7934
|
+
promptPrefix?: string | undefined;
|
|
7935
|
+
}>;
|
|
7936
|
+
}, "strict", z.ZodTypeAny, {
|
|
7937
|
+
styleId: string;
|
|
7938
|
+
patch: {
|
|
7939
|
+
candidates?: number | undefined;
|
|
7940
|
+
palette?: string[] | null | undefined;
|
|
7941
|
+
promptSuffix?: string | undefined;
|
|
7942
|
+
promptPrefix?: string | undefined;
|
|
7943
|
+
};
|
|
7944
|
+
expectedSha256: string;
|
|
7945
|
+
action: "patch-style";
|
|
7946
|
+
project?: string | undefined;
|
|
7947
|
+
}, {
|
|
7948
|
+
styleId: string;
|
|
7949
|
+
patch: {
|
|
7950
|
+
candidates?: number | undefined;
|
|
7951
|
+
palette?: string[] | null | undefined;
|
|
7952
|
+
promptSuffix?: string | undefined;
|
|
7953
|
+
promptPrefix?: string | undefined;
|
|
7954
|
+
};
|
|
7955
|
+
expectedSha256: string;
|
|
7956
|
+
action: "patch-style";
|
|
7957
|
+
project?: string | undefined;
|
|
7958
|
+
}>]>;
|
|
7959
|
+
type ManifestEdit = z.infer<typeof ManifestEditSchema>;
|
|
7960
|
+
/** The page showed a manifest that has since changed; the write is refused. */
|
|
7961
|
+
declare class ManifestDriftError extends Error {
|
|
7962
|
+
readonly status = 409;
|
|
7963
|
+
constructor(manifestPath: string);
|
|
7964
|
+
}
|
|
7965
|
+
/** A request the schema or the manifest rules reject; nothing was written. */
|
|
7966
|
+
declare class ManifestEditError extends Error {
|
|
7967
|
+
readonly status = 400;
|
|
7968
|
+
constructor(message: string);
|
|
7969
|
+
}
|
|
7970
|
+
interface ManifestEditResult {
|
|
7971
|
+
manifestPath: string;
|
|
7972
|
+
/** Hash of the manifest after the write, for the next edit's `expectedSha256`. */
|
|
7973
|
+
sha256: string;
|
|
7974
|
+
changed: boolean;
|
|
7975
|
+
}
|
|
7976
|
+
/**
|
|
7977
|
+
* Apply one edit to the manifest on disk. The write is refused when the file
|
|
7978
|
+
* no longer matches what the page saw, and rolled back when the edited
|
|
7979
|
+
* manifest fails to load or resolve — an invalid manifest never lands.
|
|
7280
7980
|
*/
|
|
7281
|
-
declare function
|
|
7282
|
-
|
|
7283
|
-
|
|
7981
|
+
declare function applyManifestEdit(manifestPath: string, edit: ManifestEdit): Promise<ManifestEditResult>;
|
|
7982
|
+
interface GalleryEditHandlerOptions {
|
|
7983
|
+
/** Resolves the manifest an edit may rewrite; must never trust a client path. */
|
|
7984
|
+
manifestFor: (project?: string) => string | Promise<string>;
|
|
7985
|
+
/** Rebuilds the gallery after a successful write. */
|
|
7986
|
+
reload: () => Promise<GalleryBuild>;
|
|
7284
7987
|
onProgress?: (msg: string) => void;
|
|
7285
|
-
|
|
7286
|
-
|
|
7287
|
-
|
|
7288
|
-
specs?: ResolvedSpec[];
|
|
7289
|
-
/** Receives the live URL as soon as the server listens. */
|
|
7290
|
-
onReady?: (info: ReviewReadyInfo) => void;
|
|
7291
|
-
}): Promise<PickResult>;
|
|
7988
|
+
}
|
|
7989
|
+
/** The `edit` callback `serveGallery` expects: validate, apply, rebuild. */
|
|
7990
|
+
declare function createGalleryEditHandler(opts: GalleryEditHandlerOptions): (body: unknown) => Promise<GalleryBuild>;
|
|
7292
7991
|
|
|
7293
|
-
|
|
7294
|
-
|
|
7295
|
-
|
|
7296
|
-
|
|
7297
|
-
|
|
7298
|
-
|
|
7299
|
-
|
|
7300
|
-
|
|
7301
|
-
|
|
7302
|
-
|
|
7303
|
-
|
|
7304
|
-
|
|
7305
|
-
|
|
7306
|
-
|
|
7307
|
-
|
|
7308
|
-
|
|
7309
|
-
|
|
7310
|
-
|
|
7992
|
+
/**
|
|
7993
|
+
* Generation from the gallery is the CLI's `gen`, run as a background job:
|
|
7994
|
+
* the same `buildPlan`, the same per-provider budget and balance preflight,
|
|
7995
|
+
* the same `submit → poll → fetch` library calls writing the same lockfile.
|
|
7996
|
+
* The page adds nothing the terminal cannot do; it only shows the estimate,
|
|
7997
|
+
* asks, and reports progress.
|
|
7998
|
+
*
|
|
7999
|
+
* Two ceilings guard spend. The session budget is passed when the gallery
|
|
8000
|
+
* starts (`--budget`, optionally keyed per provider) and every job's estimate
|
|
8001
|
+
* is charged against it up front, so the page can never exceed what the
|
|
8002
|
+
* person typed. Each submission also carries the remaining ceiling as its
|
|
8003
|
+
* own `budget`, the way `gen --budget` does, so a provider estimate that
|
|
8004
|
+
* grows between plan and submit is refused rather than paid.
|
|
8005
|
+
*/
|
|
8006
|
+
type GeneratePhase = "queued" | "submitting" | "polling" | "fetching" | "review" | "done" | "failed";
|
|
8007
|
+
interface GenerateJob {
|
|
8008
|
+
id: string;
|
|
8009
|
+
project: string | null;
|
|
8010
|
+
keys: string[];
|
|
8011
|
+
/** `resume` skips submission: poll, review, and fetch existing work at no cost. */
|
|
8012
|
+
mode: "generate" | "resume";
|
|
8013
|
+
phase: GeneratePhase;
|
|
8014
|
+
startedAt: string;
|
|
8015
|
+
finishedAt: string | null;
|
|
8016
|
+
/** Progress lines, exactly what the CLI would have printed. */
|
|
8017
|
+
messages: string[];
|
|
8018
|
+
error: string | null;
|
|
8019
|
+
/** Successful-submission estimates this job charged, by provider. */
|
|
8020
|
+
spent: Record<string, number>;
|
|
8021
|
+
/** Keys still waiting for a human choice. */
|
|
8022
|
+
review: string[];
|
|
8023
|
+
counts: {
|
|
8024
|
+
submitted: number;
|
|
8025
|
+
failed: number;
|
|
8026
|
+
downloaded: number;
|
|
7311
8027
|
};
|
|
7312
8028
|
}
|
|
8029
|
+
interface GalleryProjectContext {
|
|
8030
|
+
loaded: LoadedManifest;
|
|
8031
|
+
/** Every spec the project declares, unfiltered. */
|
|
8032
|
+
specs: ResolvedSpec[];
|
|
8033
|
+
lock: Lock;
|
|
8034
|
+
lockPath: string;
|
|
8035
|
+
}
|
|
8036
|
+
interface SessionBudget {
|
|
8037
|
+
/** Unkeyed ceiling, valid only when a run involves a single provider. */
|
|
8038
|
+
amount?: number;
|
|
8039
|
+
/** Provider-keyed ceilings. */
|
|
8040
|
+
byProvider: Record<string, number>;
|
|
8041
|
+
}
|
|
8042
|
+
interface GenerateHandlerOptions {
|
|
8043
|
+
/** Load a project fresh from disk; `project` is the workspace id, if any. */
|
|
8044
|
+
loadProject: (project?: string) => Promise<GalleryProjectContext>;
|
|
8045
|
+
/** An online provider for a project; the caller owns env loading and caching. */
|
|
8046
|
+
providerFor: (project: string | undefined, providerId: string) => Provider;
|
|
8047
|
+
budget: SessionBudget;
|
|
8048
|
+
reload: () => Promise<GalleryBuild>;
|
|
8049
|
+
onProgress?: (msg: string) => void;
|
|
8050
|
+
/** Test hooks. */
|
|
8051
|
+
pollIntervalMs?: number;
|
|
8052
|
+
submitSpacingMs?: number;
|
|
8053
|
+
/** Deterministic clock hook. */
|
|
8054
|
+
now?: () => Date;
|
|
8055
|
+
}
|
|
8056
|
+
interface GenerateStatus {
|
|
8057
|
+
jobs: GenerateJob[];
|
|
8058
|
+
budget: SessionBudget;
|
|
8059
|
+
/** Estimates charged so far this session, by provider. */
|
|
8060
|
+
spent: Record<string, number>;
|
|
8061
|
+
/** Providers whose spend unit is known, for display. */
|
|
8062
|
+
units: Record<string, CostUnit>;
|
|
8063
|
+
}
|
|
8064
|
+
interface GalleryGenerateHandlers {
|
|
8065
|
+
start(body: unknown): Promise<GenerateJob>;
|
|
8066
|
+
status(): GenerateStatus;
|
|
8067
|
+
/** The embedded review sheet for a job's waiting keys; null when nothing waits. */
|
|
8068
|
+
review(jobId: string, options: RenderSheetOptions & {
|
|
8069
|
+
routePrefix: string;
|
|
8070
|
+
}): Promise<ReviewSession | null>;
|
|
8071
|
+
applyReview(jobId: string, body: unknown): Promise<PickResult>;
|
|
8072
|
+
}
|
|
8073
|
+
declare const GenerateRequestSchema: z.ZodObject<{
|
|
8074
|
+
project: z.ZodOptional<z.ZodString>;
|
|
8075
|
+
keys: z.ZodArray<z.ZodString, "many">;
|
|
8076
|
+
/** Regenerate work that is up to date, as `gen --force` does. */
|
|
8077
|
+
force: z.ZodOptional<z.ZodBoolean>;
|
|
8078
|
+
/** Advance in-flight, review, or selected work without submitting anything. */
|
|
8079
|
+
resume: z.ZodOptional<z.ZodBoolean>;
|
|
8080
|
+
}, "strict", z.ZodTypeAny, {
|
|
8081
|
+
keys: string[];
|
|
8082
|
+
resume?: boolean | undefined;
|
|
8083
|
+
force?: boolean | undefined;
|
|
8084
|
+
project?: string | undefined;
|
|
8085
|
+
}, {
|
|
8086
|
+
keys: string[];
|
|
8087
|
+
resume?: boolean | undefined;
|
|
8088
|
+
force?: boolean | undefined;
|
|
8089
|
+
project?: string | undefined;
|
|
8090
|
+
}>;
|
|
8091
|
+
declare class GenerateRequestError extends Error {
|
|
8092
|
+
readonly status: number;
|
|
8093
|
+
constructor(message: string, status?: number);
|
|
8094
|
+
}
|
|
8095
|
+
declare function createGenerateHandlers(opts: GenerateHandlerOptions): GalleryGenerateHandlers;
|
|
8096
|
+
|
|
7313
8097
|
/**
|
|
7314
|
-
*
|
|
8098
|
+
* The gallery's HTTP surface. Unlike the review server this is long-lived:
|
|
8099
|
+
* three GET routes, bound to loopback, running until the caller closes it
|
|
8100
|
+
* (the CLI does so on Ctrl+C). It has no write path unless the caller opts
|
|
8101
|
+
* in: `edit` adds one POST route for manifest edits, and `generate` adds the
|
|
8102
|
+
* routes that start a generation job and host its review sheet.
|
|
7315
8103
|
*
|
|
7316
|
-
*
|
|
7317
|
-
*
|
|
7318
|
-
*
|
|
7319
|
-
*
|
|
7320
|
-
*
|
|
7321
|
-
*
|
|
8104
|
+
* Every POST is guarded twice, because a page on localhost is reachable by
|
|
8105
|
+
* every other page in the browser: the request's Origin must be this server,
|
|
8106
|
+
* and it must carry the session token minted at startup, which only the
|
|
8107
|
+
* served page knows. A cross-origin page can neither read the token nor send
|
|
8108
|
+
* the custom header without a preflight this server refuses.
|
|
8109
|
+
*
|
|
8110
|
+
* The snapshot is rebuilt on every page load and every `/api/gallery.json`
|
|
8111
|
+
* request, and the media allowlist is replaced with it, so the page's Refresh
|
|
8112
|
+
* button shows a `gen` that finished in another terminal — including files
|
|
8113
|
+
* that did not exist when the server started. Only paths the current
|
|
8114
|
+
* snapshot names are ever read; nothing else on disk is reachable.
|
|
7322
8115
|
*/
|
|
7323
|
-
|
|
8116
|
+
interface GalleryServerOptions {
|
|
8117
|
+
/** Rebuilds the snapshot and the allowlist of servable files. */
|
|
8118
|
+
load: () => Promise<GalleryBuild>;
|
|
8119
|
+
/** Called once listening, with the localhost URL. */
|
|
8120
|
+
onReady?: (url: string) => void;
|
|
8121
|
+
onProgress?: (msg: string) => void;
|
|
8122
|
+
port?: number;
|
|
8123
|
+
/** Open the URL in the system browser once listening. Default true. */
|
|
8124
|
+
open?: boolean;
|
|
8125
|
+
/**
|
|
8126
|
+
* Enable `POST /api/edit`. The handler receives the parsed JSON body and
|
|
8127
|
+
* returns the rebuilt gallery; it should throw an error carrying `status`
|
|
8128
|
+
* (400 for a rejected edit, 409 for a manifest that changed underneath) so
|
|
8129
|
+
* the page can explain what happened.
|
|
8130
|
+
*/
|
|
8131
|
+
edit?: (body: unknown) => Promise<GalleryBuild>;
|
|
8132
|
+
/**
|
|
8133
|
+
* Enable `POST /api/generate`, `GET /api/jobs`, and the `/review/<job>`
|
|
8134
|
+
* sheet. The handlers own budgets and provider access; see `generate.ts`.
|
|
8135
|
+
*/
|
|
8136
|
+
generate?: GalleryGenerateHandlers;
|
|
8137
|
+
}
|
|
8138
|
+
interface GalleryServer {
|
|
8139
|
+
url: string;
|
|
8140
|
+
/** Session token the served page must present on writes; null when read-only. */
|
|
8141
|
+
session: string | null;
|
|
8142
|
+
close(): Promise<void>;
|
|
8143
|
+
}
|
|
8144
|
+
declare function serveGallery(opts: GalleryServerOptions): Promise<GalleryServer>;
|
|
7324
8145
|
|
|
7325
8146
|
/** Minimal PNG header read — avoids pulling in an image library just for dimensions. */
|
|
7326
8147
|
declare function pngSize(buf: Buffer): {
|
|
@@ -7520,111 +8341,6 @@ interface SalvageSheetContext {
|
|
|
7520
8341
|
*/
|
|
7521
8342
|
declare function renderSalvageSheet(orphans: Orphan[], ctx?: SalvageSheetContext): string;
|
|
7522
8343
|
|
|
7523
|
-
/**
|
|
7524
|
-
* One sibling project registered in a workspace catalog. Only paths and
|
|
7525
|
-
* identity live here — never a credential. Each project keeps loading its own
|
|
7526
|
-
* key from its own `.env`, the same as it does standalone.
|
|
7527
|
-
*/
|
|
7528
|
-
declare const WorkspaceProjectSchema: z.ZodObject<{
|
|
7529
|
-
id: z.ZodString;
|
|
7530
|
-
/** Manifest path, relative to the catalog file's own directory. */
|
|
7531
|
-
manifest: z.ZodString;
|
|
7532
|
-
/** Lockfile path, relative to the catalog file's own directory. */
|
|
7533
|
-
lock: z.ZodString;
|
|
7534
|
-
provider: z.ZodDefault<z.ZodString>;
|
|
7535
|
-
/** Free-form label for a shared account, e.g. distinguishing sandboxes. */
|
|
7536
|
-
account: z.ZodOptional<z.ZodString>;
|
|
7537
|
-
}, "strict", z.ZodTypeAny, {
|
|
7538
|
-
provider: string;
|
|
7539
|
-
id: string;
|
|
7540
|
-
manifest: string;
|
|
7541
|
-
lock: string;
|
|
7542
|
-
account?: string | undefined;
|
|
7543
|
-
}, {
|
|
7544
|
-
id: string;
|
|
7545
|
-
manifest: string;
|
|
7546
|
-
lock: string;
|
|
7547
|
-
provider?: string | undefined;
|
|
7548
|
-
account?: string | undefined;
|
|
7549
|
-
}>;
|
|
7550
|
-
declare const WorkspaceSchema: z.ZodObject<{
|
|
7551
|
-
version: z.ZodLiteral<1>;
|
|
7552
|
-
projects: z.ZodDefault<z.ZodArray<z.ZodObject<{
|
|
7553
|
-
id: z.ZodString;
|
|
7554
|
-
/** Manifest path, relative to the catalog file's own directory. */
|
|
7555
|
-
manifest: z.ZodString;
|
|
7556
|
-
/** Lockfile path, relative to the catalog file's own directory. */
|
|
7557
|
-
lock: z.ZodString;
|
|
7558
|
-
provider: z.ZodDefault<z.ZodString>;
|
|
7559
|
-
/** Free-form label for a shared account, e.g. distinguishing sandboxes. */
|
|
7560
|
-
account: z.ZodOptional<z.ZodString>;
|
|
7561
|
-
}, "strict", z.ZodTypeAny, {
|
|
7562
|
-
provider: string;
|
|
7563
|
-
id: string;
|
|
7564
|
-
manifest: string;
|
|
7565
|
-
lock: string;
|
|
7566
|
-
account?: string | undefined;
|
|
7567
|
-
}, {
|
|
7568
|
-
id: string;
|
|
7569
|
-
manifest: string;
|
|
7570
|
-
lock: string;
|
|
7571
|
-
provider?: string | undefined;
|
|
7572
|
-
account?: string | undefined;
|
|
7573
|
-
}>, "many">>;
|
|
7574
|
-
}, "strict", z.ZodTypeAny, {
|
|
7575
|
-
version: 1;
|
|
7576
|
-
projects: {
|
|
7577
|
-
provider: string;
|
|
7578
|
-
id: string;
|
|
7579
|
-
manifest: string;
|
|
7580
|
-
lock: string;
|
|
7581
|
-
account?: string | undefined;
|
|
7582
|
-
}[];
|
|
7583
|
-
}, {
|
|
7584
|
-
version: 1;
|
|
7585
|
-
projects?: {
|
|
7586
|
-
id: string;
|
|
7587
|
-
manifest: string;
|
|
7588
|
-
lock: string;
|
|
7589
|
-
provider?: string | undefined;
|
|
7590
|
-
account?: string | undefined;
|
|
7591
|
-
}[] | undefined;
|
|
7592
|
-
}>;
|
|
7593
|
-
type WorkspaceProject = z.infer<typeof WorkspaceProjectSchema>;
|
|
7594
|
-
type Workspace = z.infer<typeof WorkspaceSchema>;
|
|
7595
|
-
/**
|
|
7596
|
-
* Parses a workspace catalog, rejecting anything that is not v1.
|
|
7597
|
-
*
|
|
7598
|
-
* Mirrors `parseLock`'s stance: no migration path, fail loudly rather than
|
|
7599
|
-
* guess at a hand-edited or corrupted file's intent.
|
|
7600
|
-
*/
|
|
7601
|
-
declare function parseWorkspace(raw: unknown): Workspace;
|
|
7602
|
-
declare function loadWorkspace(workspacePath: string): Promise<Workspace>;
|
|
7603
|
-
/** Atomic write — a crash mid-save must not leave a truncated catalog. */
|
|
7604
|
-
declare function saveWorkspace(workspacePath: string, ws: Workspace): Promise<void>;
|
|
7605
|
-
/** Stored path convention: relative to the catalog's directory, forward-slash. */
|
|
7606
|
-
declare function toPortablePath(dir: string, absolute: string): string;
|
|
7607
|
-
/** Resolve a registered project's stored paths against the catalog's directory. */
|
|
7608
|
-
declare function resolveProject(dir: string, project: WorkspaceProject): {
|
|
7609
|
-
manifestPath: string;
|
|
7610
|
-
lockPath: string;
|
|
7611
|
-
};
|
|
7612
|
-
interface WorkspaceDiagnostic {
|
|
7613
|
-
id: "duplicate-id" | "duplicate-lock" | "duplicate-manifest" | "missing-manifest" | "missing-lock" | "absolute-path" | "mixed-provider";
|
|
7614
|
-
level: "error" | "warning";
|
|
7615
|
-
message: string;
|
|
7616
|
-
}
|
|
7617
|
-
/**
|
|
7618
|
-
* Checks the catalog without touching the network or any registered
|
|
7619
|
-
* project's files. Duplicate ids and duplicate lock paths are errors — either
|
|
7620
|
-
* would corrupt the union claim set. A duplicate manifest is only a warning,
|
|
7621
|
-
* because a manifest paired with a variant `--lock` is an already-supported
|
|
7622
|
-
* pattern (see `cachePathFor`). Missing files are errors: a claim set derived
|
|
7623
|
-
* from a workspace that silently skipped a project is the exact hazard this
|
|
7624
|
-
* catalog exists to prevent.
|
|
7625
|
-
*/
|
|
7626
|
-
declare function validateWorkspace(ws: Workspace, dir: string): WorkspaceDiagnostic[];
|
|
7627
|
-
|
|
7628
8344
|
interface WorkspaceClaims {
|
|
7629
8345
|
/** Provider-qualified remote ids (`provider:id`) across every lock. */
|
|
7630
8346
|
claimed: Set<string>;
|
|
@@ -7679,4 +8395,4 @@ interface WorkspaceStatusReport {
|
|
|
7679
8395
|
*/
|
|
7680
8396
|
declare function workspaceStatus(ws: Workspace, dir: string): Promise<WorkspaceStatusReport>;
|
|
7681
8397
|
|
|
7682
|
-
export { type AdoptResult, type ApproveQualityOptions, type ApprovedQualityReview, type ArtifactBundleManifest, type ArtifactBundleOptions, type ArtifactBundleResult, type ArtifactFile, type ArtifactProvenance, type ArtifactSource, type ArtifactVerification, type Asset, type AssetAudit, AssetSchema, type AuditEvaluation, type AuditThresholds, type AuditViolation, type Balance, type BalanceChange, type BalanceInfo, type CacheHealthOptions, type CacheHealthReport, type CandidateSelection, type ComfyUIBinding, type ComfyUIBindings, type ComfyUIFramesOptions, type ComfyUIImageInput, type ComfyUIOptions, ComfyUIProvider, type ContentCacheHealth, type ContentCacheIssue, type CostEstimate, type CostUnit, DEFAULT_QUALITY_TOLERANCES, DEFAULT_RATE_LIMIT, type DoctorCheck, type DoctorLevel, type DoctorOptions, type DoctorReport, FAKE_PNG, type FakeOptions, FakeProvider, type FetchResult, type Generator, GeneratorSchema, type GenericTileset, type GridConfidence, GridConfidenceSchema, type ImageQualityMetrics, ImageQualityMetricsSchema, InheritedStyleSchema, type InstallRecipeOptions, type InstallRecipeResult, type JobState, type LoadedManifest, type LoadedRecipe, type Lock, type LockEntry, LockEntrySchema, type LockOutput, LockSchema, MAX_DOWNLOAD_BYTES, MAX_RETRIES, type ManagedArtifactBundleOptions, type Manifest, ManifestInputSchema, ManifestSchema, type MapObject, MediaType, type MountPlacement, type MountedSheet, type NormalizedTileRules, type Orphan, type OrphanGroups, type OutputSelection, type OutputSource, PIXEL_ART_FIXER_REVISION, PIXEL_ART_FIXER_URL, type PackedFrame, type PackedSheet, type PackedSource, type PendingQualityReview, type PickResult, type PixelArtFixerDetection, PixelLabClient, PixelLabError, type PixelLabObject, PixelLabProvider, type Plan, type PlanItem, type PlanState, type PollContext, type PollOptions, type PollResult, type Provider, type ProviderFactory, type ProviderInputContext, type ProviderInputScalar, type ProviderInputValue, type ProviderMetadata, type ProviderMode, type ProviderOptionContext, type ProviderSubmission, type QualityBaseline, QualityBaselineSchema, type QualityCheck, type QualityProfile, type QualityProfileInspection, QualityProfileSchema, type QualityProfileState, type QualityRegressionCaseResult, type QualityRegressionReport, type QualitySnapshotResult, QualityToleranceSchema, type QualityTolerances, type RateLimit, type Recipe, type RecipeFileVerification, type RecipeModelVerification, RecipeSchema, type RecipeVerification, type RefineAudit, type RefineFrameSetOptions, type RefineFrameSetResult, type RefineOptions, type RefineQualityProfilesOptions, type RefineQualityProfilesResult, type RefineRecordOptions, type RefineResult, type RemoteAsset, type RemoteHashCacheHealth, type ResolvedOutput, type ResolvedProviderInputs, type ResolvedProviderOptions, type ResolvedQualityInput, type ResolvedQualityProfile, type ResolvedRevision, type ResolvedSpec, type ResolvedStyleImage, type ResumeAction, type ResumeCommand, type RetroDiffusionOptions, RetroDiffusionProvider, type ReviewReadyInfo, type Revision, type RevisionMode, RevisionModeSchema, type RevisionReadiness, RevisionSchema, type SalvageAction, type SalvageResult, type ScannedAsset, type ScenarioOptions, ScenarioProvider, type SheetGroup, type SiblingManifest, type SpriteInput, type Style, type StyleAudit, type StyleInput, StyleInputSchema, StyleSchema, type SubmissionCheckpoint, type SubmitContext, type SubmitOptions, type SubmitResult, type TilesPro, type TilesetExport, type TilesetExportOptions, type TilesetFormat, UnsupportedCapabilityError, type Workspace, type WorkspaceClaims, type WorkspaceDiagnostic, type WorkspaceProject, WorkspaceProjectSchema, type WorkspaceProjectStatus, WorkspaceSchema, type WorkspaceStatusReport, adopt, applyTags, approveQualityRecord, auditStyle, availableProviders, backoffMs, buildManifest, buildPlan, bundledRecipeRoot, cacheFileName, candidateCount, checkQualityBaseline, checkQualityRecord, clientFromEnv, colorDistance, countNumberedDescriptions, createArtifactBundleManifest, createProvider, currentEntryOutputPath, currentOutputPath, detectMediaType, doctor, evaluateAudit, expectedOutputPath, exportTileset, fallbackOutputRole, fetchAssets, findOrphans, formatCost, generationCost, groupOrphansByStyle, hex, idFromPrompt, imageMetadata, inspectCaches, inspectQualityProfile, inspectRevisionReadiness, installRecipe, isSensitiveSourceUrl, listBundledRecipes, loadClaims, loadLock, loadManifest, loadSiblingManifests, loadWorkspace, lockKey, matchOrphanStyle, measureBalanceChange, measureDecodedImageQuality, measureImageQuality, mediaExtension, mediaTypeFromExtension, mergePalettes, mountSprites, mountStyle, normalizeLockOutputPaths, normalizeRefinementPalette, normalizeTileRules, outliers, outputId, packSprites, packStyle, paletteDistance, parseLock, parseWorkspace, pngSize, poll, portableOutputPath, primaryOutput, providerCredentialEnvs, providerFactory, pushTags, qualityFrameOutputPath, qualityRecordPath, quantizeToPalette, readArtifactBundleManifest, readQualityBaseline, recipeDigest, refineAsset, refineFrameSet, refineQualityProfiles, registerProvider, remove, renderSalvageSheet, renderSheet, requireApprovedQualitySources, requireBalance, requireDelete, requireList, requireRevisionReady, requireSelectCandidate, resolveEntryOutputs, resolveOutputPath, resolvePackInputs, resolveProject, resolveQualityInputs, resolveRecipe, resolveSpecEntryOutputs, resolveSpecOutputs, resolveSpecs, resolveStyleImages, resolveStyleOutputs, resumeActions, resumeCommandForStatus, retryAfterMs, runPicker, runSalvage, saveLock, saveWorkspace, scanAssets, selectEntryOutput, sha256, sha256File, shouldPersistSourceUrl, shouldRetry, slugify, snapshotQualityBaseline, specHash, spendByUnit, styleImagesBase64, submit, summarize, tagAdopted, tileFeatureOutputCount, tileVariationCount, tilesCost, toPortablePath, totalSpend, upsert, validateCostEstimate, validateMedia, validateWorkspace, verifyArtifactBundle, verifyRecipe, withArtifactManifest, workspaceClaims, workspaceStatus, writeArtifactBundle, writeManagedArtifactBundle };
|
|
8398
|
+
export { type AdoptResult, type ApproveQualityOptions, type ApprovedQualityReview, type ArtifactBundleManifest, type ArtifactBundleOptions, type ArtifactBundleResult, type ArtifactFile, type ArtifactProvenance, type ArtifactSource, type ArtifactVerification, type Asset, type AssetAudit, AssetSchema, type AuditEvaluation, type AuditThresholds, type AuditViolation, type Balance, type BalanceChange, type BalanceInfo, type BuildGalleryOptions, type BuildWorkspaceGalleryOptions, type CacheHealthOptions, type CacheHealthReport, type CandidateSelection, type ComfyUIBinding, type ComfyUIBindings, type ComfyUIFramesOptions, type ComfyUIImageInput, type ComfyUIOptions, ComfyUIProvider, type ContentCacheHealth, type ContentCacheIssue, type CostEstimate, type CostUnit, DEFAULT_QUALITY_TOLERANCES, DEFAULT_RATE_LIMIT, type DoctorCheck, type DoctorLevel, type DoctorOptions, type DoctorReport, FAKE_PNG, type FakeOptions, FakeProvider, type FetchResult, type GalleryBuild, type GalleryEditHandlerOptions, type GalleryGenerateHandlers, type GalleryItem, type GalleryMedia, type GalleryOutput, type GalleryProject, type GalleryProjectContext, type GalleryQuality, type GalleryServer, type GalleryServerOptions, type GallerySnapshot, type GalleryState, type GalleryStyle, type GenerateHandlerOptions, type GenerateJob, type GeneratePhase, GenerateRequestError, GenerateRequestSchema, type GenerateStatus, type Generator, GeneratorSchema, type GenericTileset, type GridConfidence, GridConfidenceSchema, type ImageQualityMetrics, ImageQualityMetricsSchema, InheritedStyleSchema, type InstallRecipeOptions, type InstallRecipeResult, type JobState, type LoadedManifest, type LoadedRecipe, type Lock, type LockEntry, LockEntrySchema, type LockOutput, LockSchema, MAX_DOWNLOAD_BYTES, MAX_RETRIES, type ManagedArtifactBundleOptions, type Manifest, ManifestDriftError, type ManifestEdit, ManifestEditError, type ManifestEditResult, ManifestEditSchema, ManifestInputSchema, ManifestSchema, type MapObject, MediaType, type MountPlacement, type MountedSheet, type NormalizedTileRules, type Orphan, type OrphanGroups, type OutputSelection, type OutputSource, PIXEL_ART_FIXER_REVISION, PIXEL_ART_FIXER_URL, type PackedFrame, type PackedSheet, type PackedSource, type PendingQualityReview, type PickResult, type PixelArtFixerDetection, PixelLabClient, PixelLabError, type PixelLabObject, PixelLabProvider, type Plan, type PlanItem, type PlanState, type PollContext, type PollOptions, type PollResult, type PrepareReviewOptions, type Provider, type ProviderFactory, type ProviderInputContext, type ProviderInputScalar, type ProviderInputValue, type ProviderMetadata, type ProviderMode, type ProviderOptionContext, type ProviderSubmission, type QualityBaseline, QualityBaselineSchema, type QualityCheck, type QualityProfile, type QualityProfileInspection, QualityProfileSchema, type QualityProfileState, type QualityRegressionCaseResult, type QualityRegressionReport, type QualitySnapshotResult, QualityToleranceSchema, type QualityTolerances, type RateLimit, type Recipe, type RecipeFileVerification, type RecipeModelVerification, RecipeSchema, type RecipeVerification, type RefineAudit, type RefineFrameSetOptions, type RefineFrameSetResult, type RefineOptions, type RefineQualityProfilesOptions, type RefineQualityProfilesResult, type RefineRecordOptions, type RefineResult, type RemoteAsset, type RemoteHashCacheHealth, type RenderGalleryOptions, type RenderSheetOptions, type ResolvedOutput, type ResolvedProviderInputs, type ResolvedProviderOptions, type ResolvedQualityInput, type ResolvedQualityProfile, type ResolvedRevision, type ResolvedSpec, type ResolvedStyleImage, type ResumeAction, type ResumeCommand, type RetroDiffusionOptions, RetroDiffusionProvider, type ReviewReadyInfo, type ReviewSession, type Revision, type RevisionMode, RevisionModeSchema, type RevisionReadiness, RevisionSchema, type SalvageAction, type SalvageResult, type ScannedAsset, type ScenarioOptions, ScenarioProvider, type SessionBudget, type SheetGroup, type SiblingManifest, type SpriteInput, type Style, type StyleAudit, type StyleInput, StyleInputSchema, StyleSchema, type SubmissionCheckpoint, type SubmitContext, type SubmitOptions, type SubmitResult, type TilesPro, type TilesetExport, type TilesetExportOptions, type TilesetFormat, UnsupportedCapabilityError, type Workspace, type WorkspaceClaims, type WorkspaceDiagnostic, type WorkspaceProject, WorkspaceProjectSchema, type WorkspaceProjectStatus, WorkspaceSchema, type WorkspaceStatusReport, adopt, applyManifestEdit, applyTags, approveQualityRecord, auditStyle, availableProviders, backoffMs, buildGallerySnapshot, buildManifest, buildPlan, buildWorkspaceGallerySnapshot, bundledRecipeRoot, cacheFileName, candidateCount, checkQualityBaseline, checkQualityRecord, clientFromEnv, colorDistance, countNumberedDescriptions, createArtifactBundleManifest, createGalleryEditHandler, createGenerateHandlers, createProvider, currentEntryOutputPath, currentOutputPath, detectMediaType, doctor, evaluateAudit, expectedOutputPath, exportTileset, fallbackOutputRole, fetchAssets, findOrphans, formatCost, galleryMediaId, galleryMediaRoute, generationCost, groupOrphansByStyle, hex, idFromPrompt, imageMetadata, inspectCaches, inspectQualityProfile, inspectRevisionReadiness, installRecipe, isSensitiveSourceUrl, listBundledRecipes, loadClaims, loadLock, loadManifest, loadSiblingManifests, loadWorkspace, lockKey, matchOrphanStyle, measureBalanceChange, measureDecodedImageQuality, measureImageQuality, mediaExtension, mediaTypeFromExtension, mergePalettes, mountSprites, mountStyle, normalizeLockOutputPaths, normalizeRefinementPalette, normalizeTileRules, outliers, outputId, packSprites, packStyle, paletteDistance, parseLock, parseWorkspace, pngSize, poll, portableOutputPath, prepareReview, primaryOutput, providerCredentialEnvs, providerFactory, pushTags, qualityFrameOutputPath, qualityRecordPath, quantizeToPalette, readArtifactBundleManifest, readQualityBaseline, recipeDigest, refineAsset, refineFrameSet, refineQualityProfiles, registerProvider, remove, renderGallery, renderSalvageSheet, renderSheet, requireApprovedQualitySources, requireBalance, requireDelete, requireList, requireRevisionReady, requireSelectCandidate, resolveEntryOutputs, resolveOutputPath, resolvePackInputs, resolveProject, resolveQualityInputs, resolveRecipe, resolveSpecEntryOutputs, resolveSpecOutputs, resolveSpecs, resolveStyleImages, resolveStyleOutputs, resumeActions, resumeCommandForStatus, retryAfterMs, runPicker, runSalvage, saveLock, saveWorkspace, scanAssets, selectEntryOutput, serveGallery, sha256, sha256File, shouldPersistSourceUrl, shouldRetry, slugify, snapshotQualityBaseline, specHash, spendByUnit, styleImagesBase64, submit, summarize, tagAdopted, tileFeatureOutputCount, tileVariationCount, tilesCost, toPortablePath, totalSpend, upsert, validateCostEstimate, validateMedia, validateWorkspace, verifyArtifactBundle, verifyRecipe, withArtifactManifest, workspaceClaims, workspaceStatus, writeArtifactBundle, writeManagedArtifactBundle };
|