pixelkiln 0.2.0 → 0.4.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/CONTRIBUTING.md CHANGED
@@ -46,13 +46,22 @@ npm run pixelkiln -- plan --manifest examples/minimal/pixelkiln.manifest.json
46
46
  ```
47
47
 
48
48
  Tests must not require a live provider account or API key. Use `FakeProvider`
49
- for pipeline behavior and mocked HTTP responses for PixelLab wire contracts.
49
+ for pipeline behavior and mocked HTTP responses for PixelLab or Retro Diffusion
50
+ wire contracts.
50
51
 
51
52
  ## Change guidelines
52
53
 
53
54
  - Start from `main` and keep one coherent change per pull request.
54
55
  - Use conventional commit subjects (`feat:`, `fix:`, `docs:`, `refactor:`,
55
56
  `test:`, `chore:`). Semantic Release derives versions from them.
57
+ - **Scope website-only work as `chore(website):`.** `website/` is not in the
58
+ package `files` allowlist, so nothing under it can reach the published
59
+ tarball. Semantic Release cannot see that, and a `feat(website):`
60
+ subject cuts a minor release whose contents are byte-identical to the one
61
+ before it. That happened once already: 0.2.0 is a favicon and an Open Graph
62
+ image. Any `website` scope is also refused a release by `releaseRules` in
63
+ `.releaserc.json`, so a slip is caught rather than published, but the right
64
+ subject keeps the changelog honest.
56
65
  - Add regression coverage for bug fixes and behavior coverage for new public
57
66
  options or exports.
58
67
  - Update README/help text and focused docs in the same change as user-facing
@@ -90,3 +99,43 @@ full check results in the PR description.
90
99
 
91
100
  Security-sensitive findings should follow [SECURITY.md](./SECURITY.md), not a
92
101
  public issue with exploit details.
102
+
103
+ ## Releases
104
+
105
+ Merging to `main` is the release. Semantic Release derives the version from the
106
+ conventional commit subjects in the range, publishes to npm, tags the commit,
107
+ writes the GitHub release, prepends to `CHANGELOG.md`, and commits the changelog
108
+ and version back to `main` with `[skip ci]`. Contributors do not run anything.
109
+
110
+ **There is no npm token.** Publishing authenticates over OIDC trusted
111
+ publishing: the workflow grants `id-token: write`, npm exchanges that for a
112
+ short-lived credential, and the npm CLI performs the exchange itself during
113
+ `npm publish`. A side effect worth keeping is that every release carries a
114
+ signed provenance attestation linking the tarball to its source commit and
115
+ workflow run.
116
+
117
+ Two conditions have to hold on the npm side, and neither lives in this
118
+ repository:
119
+
120
+ - the package must exist on the registry, and
121
+ - it must have a Trusted Publisher entry naming this repository and the
122
+ `release.yml` workflow.
123
+
124
+ When one is missing, the token exchange reports `404 OIDC token exchange error
125
+ - package not found`, and Semantic Release then falls through to token auth and
126
+ fails with `EINVALIDNPMTOKEN`. **That 404 does not necessarily mean the package
127
+ is absent.** It reads identically when the package is published but has no
128
+ Trusted Publisher entry, which is the more likely cause once a release has ever
129
+ succeeded. Check the entry before doubting the publish.
130
+
131
+ Because the exchange cannot authenticate against a package that does not exist
132
+ yet, `0.1.0` was published by hand to bootstrap that trust, and its changelog
133
+ section was written by hand for the same reason. Every release from `0.2.0`
134
+ onward is automated.
135
+
136
+ A failed release opens an issue labelled `semantic-release`, which the next
137
+ successful run closes. That label must exist in the repository or the reporting
138
+ step itself fails with a validation error and hides the original failure.
139
+
140
+ See the website scoping rule under [change guidelines](#change-guidelines) for
141
+ the one commit convention that changes whether a release happens at all.
package/NAMING.md CHANGED
@@ -1,4 +1,4 @@
1
- # Naming resolved: `pixelkiln`
1
+ # Naming resolved: `pixelkiln`
2
2
 
3
3
  **The name is settled.** The project ships as `pixelkiln`. `package.json` is
4
4
  no longer `private`.
@@ -20,19 +20,19 @@ GET https://registry.npmjs.org/pixelsmith → 200, latest 2.6.0, "Node based
20
20
  ```
21
21
 
22
22
  `pixelkiln` was never published. The "v3.5.1 CSS spritesheet builder" is
23
- **`spritesmith`**, a real and long-established package `pixelsmith` really
23
+ **`spritesmith`**, a real and long-established package. `pixelsmith` really
24
24
  is its engine, exactly as claimed, but neither of them is `pixelkiln`. The
25
25
  original research conflated the two real packages into a collision that
26
26
  didn't exist. (`pixelsmith` also appears, separately and correctly, in the
27
- rejected-candidates list below a real name in a different, adjacent
28
- project which should have been the tell.)
27
+ rejected-candidates list below. It is a real name in a different, adjacent
28
+ project, which should have been the tell.)
29
29
 
30
30
  A GitHub search for `pixelkiln` returns nothing but this repository, and a
31
31
  general web search turns up no product, tool, or project by that name
32
32
  anywhere. Nothing else needs to change: `bin/pixelkiln.js`, `package.json`'s
33
33
  `name`/`bin`, the README, `scripts/gen-schema.ts`'s schema title, and
34
- heybud-admin's `package.json` badge scripts already all say `pixelkiln` —
35
- there is no rename to do, only the `private: true` flag to drop, which is
34
+ heybud-admin's `package.json` badge scripts already all say `pixelkiln`.
35
+ There is no rename to do, only the `private: true` flag to drop, which is
36
36
  done.
37
37
 
38
38
  ## What the space already looks like
@@ -44,13 +44,13 @@ The "manifest-driven AI asset generation CLI" idea is not novel. Prior art found
44
44
  | [pickbitsai/sprite-generator](https://github.com/pickbitsai/sprite-generator) | Closest. JSON manifest, `assets[]` with id/category/description, `defaultStyle`, `--dry-run`, `--category`, `--concurrency` | OpenAI `gpt-image-1` |
45
45
  | [mcp-tool-shop-org/sprite-foundry](https://github.com/mcp-tool-shop-org/sprite-foundry) | SQLite lifecycle tracking, review/accept/reject, provenance, deterministic export with manifest + checksums | ComfyUI (local GPU) |
46
46
  | [lx-0/restyle-sprites](https://github.com/lx-0/restyle-sprites) | Restyle a whole pack from source + style reference | Gemini / OpenAI |
47
- | [trebeljahr/sprite-tools](https://github.com/trebeljahr/sprite-tools) | Post-processing toolkit atlas, collision, palette | n/a |
47
+ | [trebeljahr/sprite-tools](https://github.com/trebeljahr/sprite-tools) | Post-processing toolkit for atlas, collision, and palette | n/a |
48
48
  | [dt-pirate/openrender](https://github.com/dt-pirate/openrender) | Installs generated assets into engines, manifests, rollback | n/a |
49
49
  | [freema/pixelforge-mcp](https://github.com/freema/pixelforge-mcp) | MCP server for pixel art | Gemini |
50
50
  | [ralphy](https://ralphy.mintlify.app/advanced/asset-manifest) | `asset-manifest.json` slot pointers + `generations.jsonl` audit log | multi |
51
51
 
52
- **Implication for naming:** the `sprite-*` namespace is crowded `sprite-generator`,
53
- `sprite-foundry`, `sprite-tools`, `restyle-sprites` all exist. Avoid it.
52
+ **Implication for naming:** the `sprite-*` namespace is crowded. `sprite-generator`,
53
+ `sprite-foundry`, `sprite-tools`, and `restyle-sprites` all exist. Avoid it.
54
54
 
55
55
  ## What is actually differentiated here
56
56
 
@@ -67,7 +67,7 @@ Worth knowing, because the name should point at it:
67
67
  table plus a log. A committed, sorted, hash-on-both-sides lockfile in the npm
68
68
  sense was not found.
69
69
 
70
- ## Shortlist (historical kept for context, decision is above)
70
+ ## Shortlist (historical, kept for context)
71
71
 
72
72
  All verified free on npm, zero GitHub repos by that name, no web presence
73
73
  (checked 2026-07-29 for the alternates; `pixelkiln` itself re-verified
@@ -75,13 +75,13 @@ All verified free on npm, zero GitHub repos by that name, no web presence
75
75
 
76
76
  | Candidate | Note |
77
77
  |---|---|
78
- | **pixelkiln** ✅ **chosen** | Firing/baking metaphor fits pixel art, avoids the crowded `sprite-*` space. The npm collision this was shelved for turned out not to exist see Resolution. |
79
- | pixelquarry | Extraction metaphor you quarry many candidates and keep the good ones. Still free, not needed. |
78
+ | **pixelkiln** ✅ **chosen** | Firing/baking metaphor fits pixel art, avoids the crowded `sprite-*` space. The npm collision this was shelved for turned out not to exist. See Resolution. |
79
+ | pixelquarry | Extraction metaphor, since you quarry many candidates and keep the good ones. Still free, not needed. |
80
80
  | pixelcrate | Packaging/inventory feel; leans toward the lockfile idea. Still free, not needed. |
81
81
  | dithermill | Most pixel-art-native word available; "mill" carries batch production. Still free, not needed. |
82
82
  | spriteledger | Points hardest at provenance, but inherits the crowded `sprite-` prefix. Still free, not needed. |
83
83
 
84
- Rejected after checking: `pixelwright` (three live businesses use it an AI app
85
- builder, an iOS audit firm, a UI developer's brand), `spritefoundry` (taken by a
86
- real project), `pixelsmith` (real package, `spritesmith`'s engine see
84
+ Rejected after checking: `pixelwright` (three live businesses use it: an AI app
85
+ builder, an iOS audit firm, and a UI developer's brand), `spritefoundry` (taken by a
86
+ real project), `pixelsmith` (real package, `spritesmith`'s engine, see
87
87
  Resolution), `spritemill`, `pixelloom`, `bitforge`, `spritelab`.
package/PROVIDERS.md CHANGED
@@ -1,96 +1,134 @@
1
- # Multi-provider status and notes
1
+ # PixelLab and Retro Diffusion
2
2
 
3
- **The seam is built.** `src/provider.ts` defines the interface;
4
- `src/providers/pixellab.ts` is the reference implementation and
5
- `src/providers/fake.ts` is the in-memory test double. Nothing above the
6
- interface knows about PixelLab.
3
+ PixelKiln can route one manifest through either PixelLab or Retro Diffusion.
4
+ The project model keeps planning, hard budgets, lockfile provenance, human
5
+ review, recovery, and packaging. Each adapter owns its service's
6
+ authentication, pricing, validation, request lifecycle, and output formats.
7
7
 
8
- That is an architectural guarantee, not a compatibility claim: PixelLab is the
9
- only production adapter and the only backend exercised against a live account
10
- today. `FakeProvider` verifies the contract without network access. Until a
11
- second production adapter ships, describe PixelKiln as **provider-neutral by
12
- design and proven with PixelLab**, not as already multi-provider.
8
+ PixelLab remains the default so existing manifests and spec hashes remain
9
+ compatible. Select Retro Diffusion with the manifest's top-level `provider`
10
+ field and keep its settings under `providerOptions.retrodiffusion`.
13
11
 
14
- Both concerns this file previously flagged as blockers are resolved:
12
+ Ready to configure a project? Use [Set up PixelLab](./docs/PIXELLAB.md) for the
13
+ production provider or
14
+ [Set up Retro Diffusion](./docs/RETRO_DIFFUSION.md) for the experimental
15
+ adapter. This page focuses on choosing between them.
15
16
 
16
- - **Cost is no longer assumed to be "generations."** `CostEstimate` carries a
17
- `unit` of `generations | usd | free`, `plan` prints it, and `--budget` is
18
- interpreted in it. `resolveSpecs(..., { provider })` asks the adapter for its
19
- offline estimate, submission validates it again, and lock/status accounting
20
- keeps fractional values separated by unit.
21
- - **Free multi-candidate returns are no longer assumed universal.**
22
- `estimate().candidates` is a provider property; `candidateCount()` moved
23
- behind the interface.
17
+ ## Support status
24
18
 
25
- What remains is writing a second adapter. This file records which one and why.
26
-
27
- ## Midjourney is the wrong first target
28
-
29
- Verified 2026-07-29: **Midjourney has no public developer API.** API keys are
30
- restricted to the Enterprise dashboard and require applying for access. Every
31
- third-party "Midjourney API" works by automating the Discord or web interface,
32
- which violates Midjourney's terms of service and risks the underlying account
33
- being banned.
34
-
35
- Building that adapter would mean shipping something fragile, unsupported, and
36
- capable of getting a user's account terminated. Not worth it.
37
-
38
- ## The right first target: Retro Diffusion
39
-
40
- [Retro Diffusion](https://retrodiffusion.ai/) is PixelLab's closest competitor
41
- and the natural second provider:
42
-
43
- - A real, documented developer API, with
44
- [published examples](https://github.com/Retro-Diffusion/api-examples).
45
- - Purpose-built for pixel art — grid-aligned output, no blur or anti-aliasing —
46
- so it shares this tool's domain model rather than needing a downscale and
47
- quantize pass bolted on.
48
- - Supports seamless tiles, sprite-sheet animation, and free cost estimates,
49
- which map onto `plan` almost directly.
50
-
51
- Other candidates, in rough order of fit:
52
-
53
- | Provider | API | Pixel-native | Notes |
19
+ | Provider | PixelKiln status | Credential | Cost unit |
54
20
  |---|---|---|---|
55
- | Retro Diffusion | yes | yes | Recommended first adapter |
56
- | [Scenario](https://www.scenario.com/) | yes | partly | Game-asset focused, hosts Retro Diffusion models |
57
- | OpenAI `gpt-image-1` | yes | no | Raster; needs downscale + palette quantization |
58
- | Google Gemini image | yes | no | Same caveat |
59
- | Local ComfyUI + pixel LoRA | n/a | yes | No per-call cost, but a GPU dependency |
60
- | Midjourney | **no** | no | See above |
61
-
62
- ## Resolved: the two economic assumptions
63
-
64
- Both were global assumptions baked into `plan`; both are now provider-owned.
65
- Kept here as the rationale, since a second adapter has to honour them.
66
-
67
- 1. **Cost is not universally "generations".** `Plan.cost` used to be a bare
68
- number meaning PixelLab subscription generations. It now carries a unit —
69
- USD for OpenAI, generations for PixelLab, free for local — so `plan` prints
70
- an honest figure and `--budget` means something in every backend.
71
-
72
- 2. **Free candidates were a PixelLab quirk.** The core loop generate small,
73
- get 16 candidates for one fixed price, pick the best works because
74
- PixelLab charges per *call* and scales candidates inversely with canvas
75
- size. OpenAI charges per *image*, so 16 candidates costs 16×. The picker
76
- still works either way, but the strategy advice in the README does not
77
- generalise, which is why `candidateCount()` moved behind the interface.
78
-
79
- See `src/provider.ts` for the shipped interface. Lock entries carry a
80
- `provider` field plus `costUnit`, defaulted to `pixellab` and `generations` so
81
- pre-provider/pre-unit v2 lockfiles stay readable. The CLI reports both the
82
- successful-submission estimate and the provider balance delta observed across
83
- the run; those are deliberately separate because provider balances may settle
84
- asynchronously.
85
-
86
- ## Done: the integration tests it unblocked
87
-
88
- `FakeProvider` turned out to be exactly the better test double predicted here.
89
- 17 integration tests now cover `submit → poll → fetch`, `pushTags` and `adopt`
90
- — the stages that spend money and previously had zero coverage, where four of
91
- the five real bugs in this project lived. Verified non-vacuous by mutation:
92
- breaking the output hashes, the budget check, or the v1 lock rejection each
93
- fails tests.
94
-
95
- The contact-sheet request paths are covered through the picker and salvage
96
- integration tests as well as their HTML unit tests.
21
+ | PixelLab | Production; paid generation and account workflows live-tested | `PIXELLAB_API_KEY` | generations |
22
+ | Retro Diffusion | Experimental; authenticated paid still generation, download, provenance, and recovery live-tested; advanced workflows pending | `RD_API_KEY` | USD |
23
+ | FakeProvider | Test-only deterministic lifecycle | none | free |
24
+
25
+ Live tests now cover single-candidate RD Fast and RD Plus stills from cost quote
26
+ through submit, poll, PNG download, lockfile provenance, and cache validation.
27
+ The RD Plus run covered isometric-asset, top-down-asset, and environment styles.
28
+ Retro Diffusion's multi-candidate review, tileset, GIF, and spritesheet paths
29
+ have mocked integration coverage but still need representative paid live runs.
30
+
31
+ ## PixelLab vs. Retro Diffusion
32
+
33
+ This comparison describes the adapters PixelKiln ships today, not every feature
34
+ the providers offer directly.
35
+
36
+ | Decision | PixelLab | Retro Diffusion |
37
+ |---|---|---|
38
+ | Best fit today | Established PixelKiln projects, account reconciliation, and fully live-tested generation | Native pixel-art styles, cash-denominated cost control, animation, and alternate tileset workflows |
39
+ | PixelKiln generators | `map`, `pixflux`, `1dir`, `tiles` | `map` and `pixflux` stills, `tiles`, `animation` |
40
+ | Output | PNG stills, candidates, and structural tile members | PNG stills/tiles/spritesheets or animated GIF |
41
+ | Candidate review | Yes; count varies by generator and size | Yes for 1–16 still candidates; animations and tilesets currently use one result |
42
+ | References | `1dir` and tile style modes | Up to nine for supported RD Pro/user still styles; constrained inputs for animation and tiles |
43
+ | Cost model | Subscription generations | Prepaid USD balance |
44
+ | Cost safety | Offline estimate plus hard generation budget | Offline estimate, hard USD budget, then a free authoritative quote before submission |
45
+ | Account lifecycle | Balance, list, adopt, salvage, tag, and confirmed purge | Balance only in the current adapter |
46
+ | Live confidence | Full paid generation workflows exercised | RD Fast and RD Plus single-candidate stills exercised end to end; multi-candidate, tileset, GIF, and spritesheet runs pending |
47
+
48
+ Choose PixelLab when mature account-object recovery and reconciliation matter,
49
+ or when the measured one-generation `map`/`pixflux` routes fit the work. Choose
50
+ Retro Diffusion when a native animation or spritesheet is required, an RD style
51
+ is the desired look, or a USD quote is easier to budget. For a production batch,
52
+ run one representative asset through the selected provider before expanding the
53
+ scope.
54
+
55
+ ## Large environments, mountains, and buildings
56
+
57
+ Start by deciding whether the result is an isolated map object or a complete
58
+ background. That distinction matters more than raw canvas size.
59
+
60
+ | Asset type | PixelLab through PixelKiln | Retro Diffusion through PixelKiln |
61
+ |---|---|---|
62
+ | Isolated house, building, mountain, or landmark | Start with `map`: arbitrary dimensions up to 400×400 and a measured one-generation cost. Live benchmark outputs had opaque backgrounds, so plan for cleanup. Use `1dir` only when references or candidate variety justify 20–40 generations and a square canvas. | Start with `rd_plus__topdown_asset`, `rd_plus__isometric_asset`, or `rd_tile__scene_object`, depending on perspective. `rd_tile__scene_object` is specifically intended for 64–384px objects placed on tile maps. |
63
+ | Full scenic background | Use `pixflux` with `noBackground: false` when an exact palette matters, or `map` for a simple scene. Current PixelKiln routes top out at 400×400. | `rd_plus__environment` targets one-point-perspective scenes; `rd_plus__topdown_map` targets 3/4 top-down maps. These styles support up to 384×384. |
64
+ | Style consistency across a set | `1dir` accepts a style reference and returns size-dependent candidates, but it is more expensive and capped at the square-object range. | RD Pro accepts up to nine references and has stronger prompt following, but its common styles top out at 256×256 and cost $0.18 per image. Environment-specific RD Plus styles trade references for a larger 384px canvas. |
65
+ | Very large final scene | Generate reusable objects, terrain, and background layers separately; assemble them deterministically and integer-upscale the result. | Use the same layered approach. The API has a 512px overall ceiling, but the useful environment and scene-object styles currently cap at 384px. |
66
+
67
+ For production environments, prefer a kit over a monolith: seamless terrain,
68
+ separate landmarks/buildings, foreground occluders, and a distant backdrop.
69
+ This produces reusable assets, cleaner parallax, easier collision/lighting, and
70
+ cheaper targeted re-rolls. Generate at the intended native pixel resolution,
71
+ then scale by an integer with nearest-neighbor filtering.
72
+
73
+ A visual benchmark should use the same briefs for an isolated building, a
74
+ top-down landmark, and a full scenic background. Use the same intended native
75
+ size and review count. Score silhouette readability, perspective, palette,
76
+ edge cleanliness, tiling/layerability, prompt adherence, and usable results per
77
+ provider unit. Seeds are provider-specific, so equal seed numbers do not make
78
+ the outputs directly reproducible across services.
79
+
80
+ See the [environment provider benchmark](./docs/PROVIDER_BENCHMARK.md) for the
81
+ twelve generated images, prompts, manifests, measured costs, and review.
82
+
83
+ ## Cost comparison
84
+
85
+ The services use different billing units, so PixelKiln never adds their costs
86
+ together.
87
+
88
+ PixelLab figures below are measurements from the endpoints PixelKiln currently
89
+ uses; they are not a conversion to dollars:
90
+
91
+ | PixelLab route | Measured cost |
92
+ |---|---:|
93
+ | `map` | 1 generation |
94
+ | `pixflux` | 1 generation |
95
+ | `1dir` | 20–40 generations |
96
+ | `tiles` | 20–40 generations |
97
+
98
+ Retro Diffusion publishes USD formulas and fixed prices. Examples relevant to
99
+ PixelKiln include RD Fast from about $0.015 per image, RD Plus from about $0.025,
100
+ RD Pro at $0.18, animations from $0.07–$0.25, and tilesets at $0.10. Pixel count,
101
+ style, and candidate count affect the exact still-image quote. Treat
102
+ `pixelkiln plan` as the offline ceiling and the provider's free preflight quote
103
+ as the authoritative submit-time check. See Retro Diffusion's
104
+ [official API examples and pricing formulas](https://github.com/Retro-Diffusion/api-examples#pricing).
105
+
106
+ ## Capability boundary
107
+
108
+ The provider boundary owns behavior that differs between services:
109
+
110
+ - supported generators and provider-specific validation;
111
+ - offline estimates, arbitrary non-empty cost units, and candidate counts;
112
+ - submit/poll response schemas and candidate selection when applicable;
113
+ - downloads and optional account capabilities such as balance, listing,
114
+ tagging, and deletion.
115
+
116
+ Planning groups costs by unit instead of adding incompatible values. A budget
117
+ is interpreted in the active provider's unit. Providers without a balance or
118
+ account-management endpoint can still generate safely because the offline
119
+ estimate and hard budget remain enforced.
120
+
121
+ ## Next validation and expansion
122
+
123
+ 1. Complete representative paid Retro Diffusion multi-candidate, tileset, GIF,
124
+ and spritesheet smoke tests without logging credentials. Single-candidate RD
125
+ Fast and RD Plus still paths have passed end to end.
126
+ 2. Promote only the workflows proven against the live service; keep unsupported
127
+ account operations explicit capability errors.
128
+ 3. Evaluate Scenario as another hosted game-asset provider.
129
+ 4. Add a local ComfyUI adapter for GPU-backed, no-per-call-cost generation.
130
+ 5. Consider general raster providers only with explicit nearest-neighbor,
131
+ palette, transparency, and reproducibility checks.
132
+
133
+ Midjourney is not an adapter target without an official public API. Automating
134
+ its consumer UI would be fragile and could violate provider terms.
package/README.md CHANGED
@@ -15,10 +15,15 @@ local contact sheet, and commit exact provenance beside the files. No LLM is in
15
15
  the orchestration loop; provider calls, polling, hashing, downloads, and filing
16
16
  are deterministic software mechanics.
17
17
 
18
- The orchestration layer is provider-neutral by design. PixelLab is currently
19
- the only production adapter and the only live-tested generation backend;
20
- `FakeProvider` exercises the same contract deterministically in tests. A second
21
- production adapter is roadmap work, not current compatibility.
18
+ The orchestration layer is provider-neutral. PixelLab is the production,
19
+ live-tested backend. An experimental Retro Diffusion adapter supports native
20
+ pixel-art stills, candidate batches, tileset sheets, animated GIFs, and PNG
21
+ spritesheets. Authenticated RD Fast and RD Plus single-candidate still paths
22
+ have passed from quote through validated output and recovery. Multi-candidate,
23
+ tileset, GIF, and spritesheet live runs remain. See
24
+ [PixelLab vs. Retro Diffusion](./PROVIDERS.md) for the trade-offs, including
25
+ large environment and building workflows.
26
+ `FakeProvider` exercises the same contract deterministically in tests.
22
27
 
23
28
  > **Release status:** the package is pre-1.0 and the first npm publication is
24
29
  > tracked in [issue #1](https://github.com/gfargo/pixelkiln/issues/1). Until it
@@ -38,7 +43,7 @@ PixelKiln supplies the missing project model:
38
43
  output hashes;
39
44
  - planning distinguishes missing, stale, recoverable, in-flight, untracked, and
40
45
  manually changed files before money is spent;
41
- - local review keeps human judgment where it matterschoosing artwork;
46
+ - local review keeps human judgment where it matters, choosing artwork;
42
47
  - content-addressed recovery prevents a transient URL failure from buying the
43
48
  same image twice;
44
49
  - derived artifact bundles retain source provenance and recover across ordinary
@@ -52,7 +57,7 @@ PixelKiln supplies the missing project model:
52
57
  | Generate and review | Resumable submit/poll/pick/fetch pipeline with a fast local candidate sheet. |
53
58
  | Existing-art onboarding | Manifest scaffolding, exact-hash account adoption, and prompt recovery. |
54
59
  | Recovery | Validated local content cache, provider URL restore, account object-hash cache, and resumable jobs. |
55
- | Shared-account safety | Cross-project claim files, sibling-style exclusion, reviewed salvage, keep/discard tags, separate confirmed purge. |
60
+ | Shared-account safety | Cross-project claim files or a registered workspace catalog, sibling-style exclusion, reviewed salvage, keep/discard tags, separate confirmed purge. |
56
61
  | Quality control | Palette distance, transparency, color-count, relative outlier, cache-integrity, and doctor gates. |
57
62
  | Sprite packaging | Deterministic RGBA packing, stable-cell mounting, explicit external input lists, structural output roles. |
58
63
  | Engine export | Lossless generic tile contract, Tiled Wang sets, and Godot 4 terrain sets. |
@@ -99,7 +104,11 @@ cd ../my-game
99
104
  Put the provider credential in `.env.local` beside the manifest:
100
105
 
101
106
  ```dotenv
107
+ # PixelLab (the default provider)
102
108
  PIXELLAB_API_KEY=...
109
+
110
+ # Or Retro Diffusion when `provider` is `retrodiffusion`
111
+ RD_API_KEY=...
103
112
  ```
104
113
 
105
114
  Validate locally, inspect exact work/cost, then generate with a hard ceiling:
@@ -127,6 +136,9 @@ pixelkiln plan
127
136
  ```
128
137
 
129
138
  See [Getting started](./docs/GETTING_STARTED.md) for new and existing projects.
139
+ Use [Set up PixelLab](./docs/PIXELLAB.md) or
140
+ [Set up Retro Diffusion](./docs/RETRO_DIFFUSION.md) for provider-specific
141
+ credentials, manifest examples, and current limits.
130
142
 
131
143
  ## Agent skill
132
144
 
@@ -149,6 +161,7 @@ packaging layer.
149
161
  {
150
162
  "$schema": "./node_modules/pixelkiln/schema/manifest.schema.json",
151
163
  "name": "my-game",
164
+ "provider": "pixellab",
152
165
  "styles": {
153
166
  "base": {
154
167
  "generator": "map",
@@ -168,7 +181,12 @@ packaging layer.
168
181
  Styles are namespaces. Adding a second style re-derives the same asset ids into
169
182
  a separate output directory and separate lock keys without clobbering the first
170
183
  set. Generator choice, reference-image bytes, dimensions, palette, seed, and
171
- prompt settings participate in deterministic spec identity.
184
+ prompt settings participate in deterministic spec identity. A manifest may
185
+ select `retrodiffusion` instead and pass namespaced `providerOptions`; see
186
+ [Set up PixelLab](./docs/PIXELLAB.md),
187
+ [Set up Retro Diffusion](./docs/RETRO_DIFFUSION.md), and
188
+ [PixelLab vs. Retro Diffusion](./PROVIDERS.md) for configuration, costs,
189
+ current confidence, and limitations.
172
190
 
173
191
  The schema rejects unknown fields and invalid generator combinations before
174
192
  planning. See the [Manifest reference](./docs/MANIFEST.md).
@@ -212,6 +230,11 @@ replace a hard palette or reference-image constraint. See
212
230
  [Generator selection](./docs/GENERATORS.md) and the
213
231
  [measured endpoint reference](./docs/ENDPOINTS.md).
214
232
 
233
+ Generator names describe PixelKiln workflows; their exact capabilities and
234
+ prices depend on the selected provider. Retro Diffusion also supports the
235
+ provider-specific `animation` generator. Compare the adapters in
236
+ [PixelLab vs. Retro Diffusion](./PROVIDERS.md).
237
+
215
238
  ## Derived artifacts
216
239
 
217
240
  ```bash
@@ -253,9 +276,21 @@ pixelkiln purge
253
276
  ```
254
277
 
255
278
  Salvage imports, keeps, or tags discard; it never deletes. On shared accounts,
256
- pass every other project lockfile via `--claims` so shipped art cannot appear
257
- unowned. Purge only targets objects already tagged discard and requires an
258
- explicit confirmation. See [Recovery and account safety](./docs/RECOVERY.md).
279
+ pass every other project lockfile via `--claims`, or register siblings once in
280
+ a workspace catalog and pass `--workspace`, so shipped art cannot appear
281
+ unowned:
282
+
283
+ ```bash
284
+ pixelkiln workspace add ../other-game/pixelkiln.manifest.json
285
+ pixelkiln workspace status
286
+ pixelkiln salvage --workspace pixelkiln.workspace.json
287
+ ```
288
+
289
+ A registered project's missing or unreadable lockfile is a hard error for
290
+ `workspace claims` and `salvage --workspace`. Missing claims are never skipped.
291
+ Purge only targets objects already tagged discard and requires an explicit
292
+ confirmation.
293
+ See [Recovery and account safety](./docs/RECOVERY.md).
259
294
 
260
295
  ## Automation
261
296
 
@@ -301,10 +336,13 @@ writes, and offline provenance verification. See [Library API](./docs/LIBRARY.md
301
336
  |---|---|
302
337
  | [Documentation index](./docs/README.md) | All user, workflow, reference, and architecture guides. |
303
338
  | [Getting started](./docs/GETTING_STARTED.md) | First project, existing-art onboarding, everyday workflow, and what to commit. |
339
+ | [Set up PixelLab](./docs/PIXELLAB.md) | Production-provider credentials, manifest, generators, and account workflows. |
340
+ | [Set up Retro Diffusion](./docs/RETRO_DIFFUSION.md) | Experimental-provider credentials, styles, formats, cost checks, and limits. |
304
341
  | [CLI reference](./docs/CLI.md) | Every command, flag, JSON mode, and exit contract. |
305
342
  | [Manifest reference](./docs/MANIFEST.md) | Every style/asset field and generator constraint. |
306
- | [Agent workflows](./docs/AGENTS.md) | Official skill install, operating model, and PixelLab MCP pairing. |
343
+ | [Agent workflows](./docs/AGENTS.md) | Official skill install, operating model, and provider-aware safety. |
307
344
  | [Generators](./docs/GENERATORS.md) | Capability choice, measured costs, palettes, style references, and tiles. |
345
+ | [Environment provider benchmark](./docs/PROVIDER_BENCHMARK.md) | Twelve matched outputs comparing buildings, landmarks, backgrounds, cost, and file readiness. |
308
346
  | [Derived artifacts](./docs/ARTIFACTS.md) | Pack, mount, export, provenance, ownership, transactions, and recovery. |
309
347
  | [Recovery](./docs/RECOVERY.md) | Restore, caches, adopt, salvage, claims, and purge safety. |
310
348
  | [Quality gates](./docs/QUALITY.md) | Plan, doctor, audit, cache, JSON, and CI. |
@@ -312,6 +350,7 @@ writes, and offline provenance verification. See [Library API](./docs/LIBRARY.md
312
350
  | [Library API](./docs/LIBRARY.md) | Public TypeScript contracts and examples. |
313
351
  | [Tiles](./docs/TILES.md) | Structural outputs and generic/Tiled/Godot formats. |
314
352
  | [Endpoint research](./docs/ENDPOINTS.md) | Measured PixelLab API behavior and recipes. |
353
+ | [PixelLab vs. Retro Diffusion](./PROVIDERS.md) | Provider selection, costs, supported workflows, confidence, and limitations. |
315
354
 
316
355
  The [public documentation site](https://pixelkiln.griffen.codes/docs) is built by
317
356
  the application in [`website/`](./website/README.md). It reads these Markdown
@@ -319,14 +358,16 @@ files directly at build time, so the website and published package share one
319
358
  documentation source.
320
359
 
321
360
  Project policies: [Contributing](./CONTRIBUTING.md),
322
- [Security](./SECURITY.md), and [provider notes](./PROVIDERS.md).
361
+ [Security](./SECURITY.md), and [provider comparison](./PROVIDERS.md).
323
362
 
324
363
  ## Scope
325
364
 
326
- Animated eight-direction characters and their ZIP/engine-resource export are not
327
- currently implemented. See the open
328
- [roadmap issues](https://github.com/gfargo/pixelkiln/issues) for provider and
329
- workspace-catalog work.
365
+ Animated eight-direction characters and their ZIP/engine-resource export are
366
+ not currently implemented. Cross-project content-cache reuse and
367
+ `workspace find <hash|asset-id>` are deferred beyond the current read-only
368
+ workspace catalog. See the open
369
+ [roadmap issues](https://github.com/gfargo/pixelkiln/issues) for additional
370
+ provider adapters and this remaining workspace work.
330
371
 
331
372
  ## License
332
373
 
package/SECURITY.md CHANGED
@@ -28,11 +28,12 @@ reporter.
28
28
 
29
29
  ## Sensitive areas
30
30
 
31
- Pixelkiln handles provider credentials, paid API actions, remote object deletion,
31
+ PixelKiln handles provider credentials, paid API actions, remote object deletion,
32
32
  local output paths, a localhost review server, and generated HTML containing
33
33
  provider data. Reports involving authentication leakage, path traversal,
34
34
  cross-origin review actions, HTML/script injection, unsafe overwrite/delete
35
35
  behavior, lockfile corruption, or budget bypass are security relevant.
36
36
 
37
- Never attach a real `PIXELLAB_API_KEY`, `.env` file, private provider URL, or
38
- unredacted lockfile from a confidential project to a public report.
37
+ Never attach a real `PIXELLAB_API_KEY`, `RD_API_KEY`, `.env` file, private
38
+ provider URL, or unredacted lockfile from a confidential project to a public
39
+ report.
package/dist/cli.d.ts CHANGED
@@ -34,8 +34,25 @@ interface Args {
34
34
  minTransparency?: number;
35
35
  maxColors?: number;
36
36
  sigma?: number;
37
+ /** `workspace`: add/remove/list/status/claims. */
38
+ subcommand?: string;
39
+ /** Path to a workspace catalog. Defaults to `pixelkiln.workspace.json` in cwd. */
40
+ workspace?: string;
41
+ /** `workspace add`: manifest path. `workspace remove`: project id or manifest path. */
42
+ target?: string;
43
+ /** `workspace add`: provider id to register the project under. Defaults to "pixellab". */
44
+ provider?: string;
45
+ /** `workspace add`: free-form account label, e.g. distinguishing sandboxes. */
46
+ account?: string;
47
+ /**
48
+ * Raw `--lock` value with no manifest-relative default applied. `workspace
49
+ * add` needs to know whether the user actually passed `--lock`, since the
50
+ * ambient default (beside `--manifest`, which usually names an unrelated
51
+ * project) is meaningless for the manifest being registered.
52
+ */
53
+ explicitLock?: string;
37
54
  }
38
- declare const COMMANDS: readonly ["init", "plan", "doctor", "gen", "submit", "poll", "pick", "fetch", "restore", "adopt", "accept", "salvage", "purge", "prune", "audit", "cache", "pack", "mount", "export", "tag", "balance", "status", "help", "--help", "-h", "--version", "-v"];
55
+ declare const COMMANDS: readonly ["init", "plan", "doctor", "gen", "submit", "poll", "pick", "fetch", "restore", "adopt", "accept", "salvage", "purge", "prune", "audit", "cache", "pack", "mount", "export", "tag", "balance", "status", "workspace", "help", "--help", "-h", "--version", "-v"];
39
56
  /**
40
57
  * Strict parsing. Unknown flags are a hard error rather than being ignored,
41
58
  * because a silently-dropped filter is expensive here: `--styles neon` (plural,