pixelkiln 0.14.0 → 0.16.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/PROVIDERS.md CHANGED
@@ -9,6 +9,11 @@ PixelLab remains the default so existing manifests and spec hashes remain
9
9
  compatible. The manifest's top-level `provider` is the default; a style may
10
10
  override it. Keep service settings under the matching `providerOptions` key.
11
11
 
12
+ Provider choice and release quality are separate. Any supported single-image
13
+ style can declare one `quality` profile for native-grid recovery, a closed
14
+ palette, measurable checks, and named approval. The profile does not change the
15
+ provider request or its cost. Pack and mount use only approved derived PNGs.
16
+
12
17
  To configure a project, use [Set up PixelLab](./docs/PIXELLAB.md),
13
18
  [Set up Retro Diffusion](./docs/RETRO_DIFFUSION.md),
14
19
  [Set up ComfyUI](./docs/COMFYUI.md), or
@@ -21,7 +26,7 @@ them.
21
26
  |---|---|---|---|
22
27
  | PixelLab | Production; paid generation and account workflows live-tested | `PIXELLAB_API_KEY` | generations |
23
28
  | Retro Diffusion | Experimental; authenticated paid still generation, download, provenance, and recovery live-tested; advanced workflows pending | `RD_API_KEY` | USD |
24
- | ComfyUI | Experimental; local single-image generation, four-candidate queue, provenance, and cache-only recovery live-tested on Apple MPS | none; optional `COMFYUI_BASE_URL` | free |
29
+ | ComfyUI | Experimental; local generation, review, recovery, and image-to-image revision smoke live-tested on Apple MPS; inpaint/outpaint remain mock-tested | none; optional `COMFYUI_BASE_URL` | free |
25
30
  | Scenario | Experimental; BFL Flux 2 Dev authentication, CU preflight, paid single/two-output generation, review, download, and durable recovery live-tested | `SCENARIO_SDK_API_KEY` and `SCENARIO_SDK_API_SECRET` | compute-units |
26
31
  | FakeProvider | Test-only deterministic lifecycle | none | free |
27
32
 
@@ -76,9 +81,10 @@ prompt, size, batch, and optional seed inputs PixelKiln may replace.
76
81
 
77
82
  | Decision | ComfyUI through PixelKiln |
78
83
  |---|---|
79
- | Best fit today | Local composition experiments, private inputs, and teams prepared to maintain and manually validate custom graphs |
84
+ | Best fit today | Local composition experiments, private inputs, controlled revisions, and teams prepared to maintain and manually validate custom graphs |
80
85
  | PixelKiln generator | `map` stills |
81
86
  | Output | One PNG output node, with 1–16 review candidates |
87
+ | Revision input | `image-to-image`, `inpaint`, and user-authored `outpaint` graphs; hashed parent/mask uploads and source comparison are covered. The bundled img2img graph passed a three-strength live smoke but missed the requested winter treatment and lost alpha. |
82
88
  | Cost model | `0 free`; local compute and hosting are outside PixelKiln's estimate |
83
89
  | Reproducibility | Workflow content is hashed; model files, custom-node versions, and runtime settings must still be managed outside PixelKiln |
84
90
  | Account lifecycle | Read-only connectivity check; no balance, remote object listing, tagging, or purge |
@@ -90,6 +96,12 @@ the same graph and still differ because their checkpoint bytes, custom nodes,
90
96
  or sampler settings differ. Commit the workflow and record the model stack used
91
97
  to test it.
92
98
 
99
+ The revision manifest and dependency gate are provider-neutral, but ComfyUI is
100
+ the only built-in adapter that currently opts in. PixelLab, Retro Diffusion,
101
+ and Scenario reject revision assets offline. See
102
+ [Controlled asset revisions](./docs/REVISIONS.md) before using the bundled
103
+ square image-to-image graph.
104
+
93
105
  ## Where Scenario fits
94
106
 
95
107
  Scenario adds hosted third-party models and reusable project-specific models
package/README.md CHANGED
@@ -14,16 +14,16 @@ what to run or which image wins. The CLI handles provider calls, polling,
14
14
  hashing, downloads, and file placement.
15
15
 
16
16
  PixelLab is the production backend. Retro Diffusion, self-hosted ComfyUI, and
17
- Scenario are experimental. The Retro Diffusion adapter has live coverage for
18
- RD Fast and RD Plus stills; its multi-candidate, tileset, GIF, and spritesheet
19
- paths are tested with fixtures but still need paid live runs. ComfyUI has passed
20
- local generation, four-candidate review, cache recovery, and native-grid
21
- refinement on Apple MPS. Its tested SDXL workflow can find a composition, but
22
- it is not a finished pixel-art preset. Scenario has live-tested authentication,
23
- CU preflight, single- and two-output generation, human review, and durable
24
- restore with BFL Flux 2 Dev. It remains experimental. Styles may use different providers with separate
25
- budget ceilings. The [provider comparison](./PROVIDERS.md) lists the tested limits
26
- and best routes. `FakeProvider` covers the same contract in automated tests.
17
+ Scenario are experimental. Retro Diffusion has live coverage for RD Fast and
18
+ RD Plus stills; its other paths still need paid live runs. ComfyUI has passed
19
+ local generation, candidate review, recovery, and native-grid refinement on
20
+ Apple MPS. Its tested SDXL workflow finds compositions, not finished pixel art.
21
+ Scenario has passed CU preflight, generation, human review, and durable restore
22
+ with BFL Flux 2 Dev.
23
+
24
+ Styles may use different providers with separate budget ceilings. The
25
+ [provider comparison](./PROVIDERS.md) lists the tested limits and best routes.
26
+ `FakeProvider` covers the shared contract in automated tests.
27
27
 
28
28
  ## Release
29
29
 
@@ -42,7 +42,7 @@ PixelKiln keeps the missing record:
42
42
  - a committed manifest defines assets, styles, generators, budgets, and output;
43
43
  - a committed lockfile maps each style/asset to paid provider work and exact
44
44
  output hashes;
45
- - planning distinguishes missing, stale, recoverable, in-flight, untracked, and
45
+ - planning distinguishes blocked, missing, stale, recoverable, in-flight, untracked, and
46
46
  manually changed files before money is spent;
47
47
  - local review keeps human judgment where it matters, choosing artwork;
48
48
  - content-addressed recovery prevents a transient URL failure from buying the
@@ -56,10 +56,11 @@ PixelKiln keeps the missing record:
56
56
  |---|---|
57
57
  | Plan and budget | Offline manifest/lock/disk diff, provider-grouped estimates, keyed mixed-provider budget ceilings, JSON/CI gate. |
58
58
  | Generate and review | Resumable submit/poll/pick/fetch pipeline with a fast local candidate sheet. |
59
+ | Controlled revisions | Hashed image-to-image/inpaint lineage, fail-closed parent approval, and source-versus-candidate review; ComfyUI is the first adapter. |
59
60
  | Existing-art onboarding | Manifest scaffolding, exact-hash account adoption, and prompt recovery. |
60
61
  | Recovery | Validated local content cache, durable provider-reference restore, account object-hash cache, and resumable jobs. |
61
62
  | Shared-account safety | Cross-project claim files or a registered workspace catalog, sibling-style exclusion, reviewed salvage, keep/discard tags, separate confirmed purge. |
62
- | Quality control | Palette distance, transparency, color-count, relative outlier, cache-integrity, and doctor gates. |
63
+ | Quality control | Manifest-native grid recovery, closed palettes, named approval, regression baselines, and fail-closed packaging. |
63
64
  | Sprite packaging | Deterministic RGBA packing, stable-cell mounting, explicit external input lists, structural output roles. |
64
65
  | Engine export | Lossless generic tile contract, Tiled Wang sets, and Godot 4 terrain sets. |
65
66
  | Artifact integrity | Portable source/output hashes, canonical fingerprints, manual-edit protection, transactional promotion, crash journal recovery. |
@@ -67,8 +68,9 @@ PixelKiln keeps the missing record:
67
68
 
68
69
  ### Local human review
69
70
 
70
- `pixelkiln pick` opens an actual local candidate sheet; the orchestration layer
71
- never asks a model to choose artwork for you.
71
+ `pixelkiln pick` opens a local candidate sheet. It preserves each image's aspect
72
+ ratio, fits large work without blurring small sprites, and never asks a model to
73
+ choose artwork for you.
72
74
 
73
75
  ![PixelKiln candidate review UI](./website/public/review-ui-showcase.jpg)
74
76
 
@@ -191,16 +193,12 @@ select another provider and pass namespaced `providerOptions`; see
191
193
  [Set up ComfyUI](./docs/COMFYUI.md), and
192
194
  [Set up Scenario](./docs/SCENARIO.md). The
193
195
  [provider comparison](./PROVIDERS.md) covers costs,
194
- current confidence, and limitations. The committed ComfyUI projects now include
195
- transparent cutouts, palette-controlled backgrounds, wide environment canvases,
196
- and native-grid recovery for model output that only looks like pixel art. The
197
- ComfyUI guidance is quality-first: start with 48–128px native components,
198
- apply the final palette after grid recovery, require prompt-coverage and human
199
- cluster-and-silhouette review, and compose larger scenes from accepted parts
200
- instead of chasing a larger raster. Background removal and the art decision
201
- still need the graph and a person. `pixelkiln refine` now handles grid recovery,
202
- final palette enforcement, measurable checks, and the hash-bound approval
203
- record.
196
+ current confidence, and limitations. ComfyUI works best as a composition tool:
197
+ start with 48–128px native components and build larger scenes from accepted
198
+ parts. Any single-image style can declare a `quality` profile for grid recovery,
199
+ a closed palette, measurable checks, and named human approval. `plan --check`,
200
+ `pack`, and `mount` then fail closed when that derived output is missing or
201
+ stale. Changing the profile never schedules another provider generation.
204
202
 
205
203
  Versioned recipes capture tested workflows, model hashes, license links, and
206
204
  manifest-ready styles with quality boundaries. Start with `pixelkiln recipe install comfyui/pixel-art-xl-environment@1.0.0`.
@@ -226,11 +224,10 @@ pixelkiln restore
226
224
  pixelkiln audit --check --max-distance 35 --min-transparency 0.1
227
225
  pixelkiln cache --check
228
226
 
229
- # Provider-neutral pixel cleanup after selecting a generated candidate.
230
- pixelkiln refine --from candidate.png --out art/native.png \
231
- --palette "#141b1e,#23312a,#384d4f,#526a8d,#709fcf,#865c45,#c6a766,#f1bb70"
232
- pixelkiln refine approve --from art/native.pixelkiln.json --reviewer "Your Name"
233
- pixelkiln refine check --from art/native.pixelkiln.json
227
+ # Build and verify the quality output declared by style.quality.
228
+ pixelkiln refine --style base
229
+ pixelkiln refine approve --from assets/final/anvil.pixelkiln.json --reviewer "Your Name"
230
+ pixelkiln refine check --style base
234
231
  ```
235
232
 
236
233
  Repeated `--style`, `--only`, `--claims`, and `--output-role` filters
@@ -272,11 +269,10 @@ pixelkiln mount --style ground
272
269
  pixelkiln export --style ground --only terrain --format tiled
273
270
  ```
274
271
 
275
- Pack, mount, and export write managed bundles. A `.pixelkiln.json` companion
276
- records portable source paths/hashes, layout/export options, output hashes, and
277
- a canonical fingerprint. Existing unowned output is adopted only when already
278
- byte-identical; manual edits stop the whole write unless `--force` explicitly
279
- takes ownership.
272
+ Pack, mount, and export write managed bundles. When a style has a quality
273
+ profile, pack and mount consume only its current approved PNGs and include their
274
+ records in provenance. Existing unowned output is adopted only when already
275
+ byte-identical; manual edits stop the whole write unless `--force` takes ownership.
280
276
 
281
277
  All changing members stage before promotion. Ordinary failures roll back.
282
278
  Abrupt termination leaves a validated transaction journal: the next invocation
@@ -346,8 +342,9 @@ const plan = await buildPlan(specs, await loadLock("pixelkiln.lock.json"))
346
342
  console.log(plan.groups, plan.actionable.length)
347
343
  ```
348
344
 
349
- The package also exports audit and image-regression gates, provider-neutral refinement, lock/output
350
- helpers, provider contracts, pipeline stages, sprite packing/mounting, tile
345
+ The package also exports audit and image-regression gates, quality-profile
346
+ inspection and refinement, revision-readiness checks, lock/output helpers,
347
+ provider contracts, sprite packing/mounting, tile
351
348
  exporters, managed artifact writes, and offline provenance verification. See
352
349
  [Library API](./docs/LIBRARY.md).
353
350
 
@@ -362,8 +359,9 @@ exporters, managed artifact writes, and offline provenance verification. See
362
359
  | [Set up ComfyUI](./docs/COMFYUI.md) | Experimental self-hosted server, workflow bindings, local cost semantics, and limits. |
363
360
  | [Set up Scenario](./docs/SCENARIO.md) | Experimental hosted models, two-part credentials, CU preflight, review, and durable downloads. |
364
361
  | [Versioned recipes](./docs/RECIPES.md) | Pinned workflow packs, model hashes, manifest templates, and quality contracts. |
362
+ | [Controlled revisions](./docs/REVISIONS.md) | Image-to-image/inpaint parents, masks, fail-closed readiness, provenance, and ComfyUI bindings. |
365
363
  | [CLI reference](./docs/CLI.md) | Every command, flag, JSON mode, and exit contract. |
366
- | [Manifest reference](./docs/MANIFEST.md) | Every style/asset field and generator constraint. |
364
+ | [Manifest reference](./docs/MANIFEST.md) | Style/asset fields, quality profiles, and generator constraints. |
367
365
  | [Mixed-provider projects](./docs/MIXED_PROVIDERS.md) | Per-style routing, provider-keyed budgets, recovery, and account commands. |
368
366
  | [Agent workflows](./docs/AGENTS.md) | Official skill install, operating model, and provider-aware safety. |
369
367
  | [Generators](./docs/GENERATORS.md) | Capability choice, measured costs, palettes, style references, and tiles. |
package/dist/cli.d.ts CHANGED
@@ -1,5 +1,8 @@
1
1
  #!/usr/bin/env node
2
- type GridConfidence = "low" | "medium" | "high";
2
+ import { z } from 'zod';
3
+
4
+ declare const GridConfidenceSchema: z.ZodEnum<["low", "medium", "high"]>;
5
+ type GridConfidence = z.infer<typeof GridConfidenceSchema>;
3
6
 
4
7
  type TilesetFormat = "generic" | "tiled" | "godot";
5
8