pixelkiln 0.93.0 → 0.95.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/dist/cli.js +3403 -2847
- package/dist/cli.js.map +1 -1
- package/dist/index.cjs +1306 -778
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +775 -46
- package/dist/index.d.ts +775 -46
- package/dist/index.js +1274 -748
- package/dist/index.js.map +1 -1
- package/docs/CLI.md +17 -1
- package/docs/MANIFEST.md +51 -1
- package/package.json +1 -1
- package/schema/manifest.schema.json +81 -0
package/docs/CLI.md
CHANGED
|
@@ -97,6 +97,17 @@ pixelkiln plan
|
|
|
97
97
|
pixelkiln plan --style neon --only anvil,hammer --json --check
|
|
98
98
|
```
|
|
99
99
|
|
|
100
|
+
`plan`, `hash` and `doctor` tolerate a manifest with broken entries: a style or
|
|
101
|
+
asset that fails validation, or that a provider rejects (a size outside its
|
|
102
|
+
limits), is left out, listed as `invalid` with the reason, and everything else
|
|
103
|
+
is still planned. Entries that depend on a dropped one (an asset in a dropped
|
|
104
|
+
style, a revision of a dropped asset) are listed too. With `--only` or
|
|
105
|
+
`--style`, entries outside the selection are counted, not listed. `--check`
|
|
106
|
+
treats any invalid entry as unsafe, and `--strict` restores the old
|
|
107
|
+
all-or-nothing failure. Commands that spend (`gen`, `submit`, and the rest)
|
|
108
|
+
always fail on an invalid manifest. A problem in the manifest's own top-level
|
|
109
|
+
fields still fails every command.
|
|
110
|
+
|
|
100
111
|
`--check` exits nonzero unless every selected entry is current. For styles with
|
|
101
112
|
`quality`, current raw output is not enough: each derived PNG must also have a
|
|
102
113
|
current named approval.
|
|
@@ -126,7 +137,11 @@ Validate the manifest, references, lockfile recovery sources, raw and quality
|
|
|
126
137
|
output paths, stale jobs, current plan, credential configuration, and provider
|
|
127
138
|
connectivity. A pending or stale quality profile is reported as a warning.
|
|
128
139
|
`--dry-run` skips only live connectivity. Supports `--json` and exits nonzero
|
|
129
|
-
for unsafe state.
|
|
140
|
+
for unsafe state. Invalid entries are reported as errors, one per entry, so every
|
|
141
|
+
problem shows at once. When the project's `package.json` pins pixelkiln, doctor
|
|
142
|
+
also compares the pin, the copy in `node_modules`, and the CLI that is running,
|
|
143
|
+
and warns when they differ: an older install rejects a manifest written for the
|
|
144
|
+
pin with errors that look like a broken manifest.
|
|
130
145
|
|
|
131
146
|
### `gen`
|
|
132
147
|
|
|
@@ -1290,6 +1305,7 @@ Print the package version. `-v` is an alias.
|
|
|
1290
1305
|
| `--dry-run` | supported mutating commands, adopt --local, quality snapshot --only | Inspect without spending or mutating provider state. |
|
|
1291
1306
|
| `--json` | plan/doctor/audit/cache/status/gallery/salvage/refine/recipe/quality/unzoom/pixelate/normal-map/vfx/font | Machine-readable stdout where supported. For `gallery`, prints the snapshot instead of serving it. |
|
|
1292
1307
|
| `--check` | plan/audit/cache | Exit nonzero when selected state is unsafe. |
|
|
1308
|
+
| `--strict` | plan/hash/doctor | Fail on any invalid manifest entry instead of listing it and continuing. |
|
|
1293
1309
|
| `--yes`, `-y` | confirmed operations | Skip an interactive confirmation. For `refine approve`, it records an already-completed human review; it does not replace one. |
|
|
1294
1310
|
| `--no-open` | pick/salvage/gallery/edit | Do not automatically open the browser (`open`, `xdg-open`, or `start`, by platform), or the editor for `edit`. |
|
|
1295
1311
|
| `--edit` | gallery | Let the page change asset prompts, sizes, category, and tags, and add assets. Rewrites the manifest only; never contacts a provider or spends. Also offers the in-browser editor. |
|
package/docs/MANIFEST.md
CHANGED
|
@@ -56,7 +56,7 @@ not merely a label edit.
|
|
|
56
56
|
|
|
57
57
|
| Field | Type/default | Meaning |
|
|
58
58
|
|---|---|---|
|
|
59
|
-
| `prompt` | string, required unless `mirror`, `portrait`, `outfit`, or a template loop (`animation.template`) | The subject wording wrapped by the selected style's prompt prefix and suffix. A template loop is described by its template; a v3, pro, or sentence (`skeleton-v3` with no template) loop still needs the motion in words. |
|
|
59
|
+
| `prompt` | string, required unless `mirror`, `derive`, `external`, `portrait`, `outfit`, or a template loop (`animation.template`) | The subject wording wrapped by the selected style's prompt prefix and suffix. A template loop is described by its template; a v3, pro, or sentence (`skeleton-v3` with no template) loop still needs the motion in words. |
|
|
60
60
|
| `width` / `height` | integer 16–8192 | Per-asset dimensions for generators that accept rectangular output. Provider limits may be lower. |
|
|
61
61
|
| `size` | integer 16–8192 | Per-asset square size where the generator uses one dimension. |
|
|
62
62
|
| `file` | string | Output path below the style's `outDir`; defaults to `<category>/<assetId>.png`. |
|
|
@@ -70,6 +70,8 @@ not merely a label edit.
|
|
|
70
70
|
| `portrait` | object | `character` styles: a bust of a base or state's south sprite, `{ "of": "<asset>", "size": 64 }`; `size` is 16, 32, 48, 64 (default), 128, or 160. See [Portraits](./CHARACTERS.md#portraits). |
|
|
71
71
|
| `outfit` | object | `character` styles: an existing loop's frames re-clothed from an outfit image, `{ "of": "<loop asset>", "reference": "<image>" }`, with optional `additionalInstructions`. See [Outfit transfer](./CHARACTERS.md#outfit-transfer). |
|
|
72
72
|
| `mirror` | string | Another asset of the same style flipped left to right, made locally at no cost. See [Mirrors](./CHARACTERS.md#mirrors). |
|
|
73
|
+
| `derive` | object | Made from existing pixels by one local transform, at no cost, with no provider. See [Derived and external assets](#derived-and-external-assets). |
|
|
74
|
+
| `external` | object | Built by a script or tool outside pixelkiln; pixelkiln records and tracks the file but never builds it. See [Derived and external assets](#derived-and-external-assets). |
|
|
73
75
|
| `vfx` | object | `vfx` styles, PixelLab only: the effect to render. `{ "preset": "explosion", "parts": [{ "name": "scorch_mark" }], "sprite": "art/chars/hero.png", "fps": 12 }`; start from one `preset` or one `recipe` (a recipe JSON or a `.vfx.json` record), with optional `parts`, `sprite`, `fps`, and `name`. Or give a `description` (with optional `artist`: `lite` or `pro`, a local PNG `sprite`, and `name`) for PixelLab's paid VFX artist instead; it excludes `preset`, `recipe`, `parts`, and `fps`. Replaces `prompt` as the required field. See [`vfx`](./GENERATORS.md#vfx) and [Described effects](./GENERATORS.md#described-effects-the-paid-vfx-artist). |
|
|
74
76
|
| `scene` | object | `map` styles, PixelLab only: draw this object into a scene image, in its style. `{ "image": "scene.png", "placement": { "oval": 0.3 } }`; `placement` is `oval` or `rectangle` (a fraction, 0.05–0.95) or `mask` (a PNG the size of the scene). See [Drawing into a scene](./GENERATORS.md#drawing-into-a-scene). |
|
|
75
77
|
| `connect` | object | `terrain` styles, PixelLab only: share a terrain with another set in the same style, keyed by this set's own side. `{ "lower": { "of": "coast", "terrain": "upper" } }` makes this set's lower terrain `coast`'s upper. The other set generates first; regenerating it makes this one stale. A sidescroller set connects only `lower`. Cycles are rejected. |
|
|
@@ -430,6 +432,54 @@ changing `provider` alone:
|
|
|
430
432
|
declare bindings (ComfyUI); a provider without them rejects a non-empty
|
|
431
433
|
object rather than ignoring it.
|
|
432
434
|
|
|
435
|
+
## Derived and external assets
|
|
436
|
+
|
|
437
|
+
Not every asset is generated. Art recolored from another asset, or built by a
|
|
438
|
+
script, still belongs in `plan`, the lockfile, and quality snapshots. Two
|
|
439
|
+
asset kinds declare that, and they are deliberately separate: one pixelkiln
|
|
440
|
+
makes itself, one it only keeps track of.
|
|
441
|
+
|
|
442
|
+
### `derive`: made by pixelkiln from existing pixels
|
|
443
|
+
|
|
444
|
+
```json
|
|
445
|
+
"hedge_autumn": { "derive": { "from": "hedge", "transform": "recolor", "map": { "#4a7a3a": "#b8742c" } } },
|
|
446
|
+
"hedge_2x": { "derive": { "from": "hedge", "transform": "scale", "width": 64, "height": 64 } },
|
|
447
|
+
"tile_snapped": { "derive": { "file": "art/tile.png", "transform": "palette-snap", "palette": ["#000000", "#ffffff"] } }
|
|
448
|
+
```
|
|
449
|
+
|
|
450
|
+
The input is `from` (another asset of the same style, which must be a single
|
|
451
|
+
image) or `file` (a committed PNG, relative to the manifest), never both. The
|
|
452
|
+
transform is one of:
|
|
453
|
+
|
|
454
|
+
| `transform` | Fields | Does |
|
|
455
|
+
|---|---|---|
|
|
456
|
+
| `recolor` | `map` | Replaces exact `#rrggbb` colors. Unmapped colors and every alpha value stay. |
|
|
457
|
+
| `palette-snap` | `palette` (2 to 256 colors) | Moves every visible pixel to the nearest palette color. |
|
|
458
|
+
| `scale` | `width`, `height`, `mode` | Resizes to the exact size. `nearest` (default) keeps hard edges; `box` averages the covered pixels, weighted by alpha. |
|
|
459
|
+
|
|
460
|
+
`gen` writes the file in the wave after its source lands, calls no provider, and
|
|
461
|
+
costs nothing in any unit. The plan reports a derived asset `stale`, free to fix,
|
|
462
|
+
when its source's recorded output, its `file`, the transform, or its parameters
|
|
463
|
+
change. An edit by hand makes it `orphaned`, like any generated file. The lock entry
|
|
464
|
+
records the input's hash under `derive`.
|
|
465
|
+
|
|
466
|
+
### `external`: built elsewhere, tracked here
|
|
467
|
+
|
|
468
|
+
```json
|
|
469
|
+
"dock": { "external": { "builder": "python tools/iso_kit.py dock", "inputs": ["tools/iso_kit.py"] } }
|
|
470
|
+
```
|
|
471
|
+
|
|
472
|
+
pixelkiln never runs the `builder`; it is the command you run, recorded so the
|
|
473
|
+
plan can tell you what to do. `inputs` are files the builder reads. Their hashes
|
|
474
|
+
and the builder text are the asset's identity. Record the built file with
|
|
475
|
+
`adopt --local`, which stores the file's hash, the builder, and the inputs' hashes.
|
|
476
|
+
|
|
477
|
+
An external asset is never actionable, so `gen` skips it, including under
|
|
478
|
+
`--force`. The plan reports it as: `untracked` when the file exists but is not
|
|
479
|
+
recorded (run `adopt --local`), `orphaned` when the file is missing, when the
|
|
480
|
+
builder or an input changed, or when the file changed since it was recorded
|
|
481
|
+
(rebuild, then `adopt --local --force`), and `ok` otherwise.
|
|
482
|
+
|
|
433
483
|
## Characters and mirrors
|
|
434
484
|
|
|
435
485
|
A `character` style holds a base drawn facing 4 or 8 directions, states, and
|
package/package.json
CHANGED
|
@@ -1825,6 +1825,87 @@
|
|
|
1825
1825
|
"type": "string",
|
|
1826
1826
|
"minLength": 1
|
|
1827
1827
|
},
|
|
1828
|
+
"derive": {
|
|
1829
|
+
"type": "object",
|
|
1830
|
+
"properties": {
|
|
1831
|
+
"from": {
|
|
1832
|
+
"type": "string",
|
|
1833
|
+
"minLength": 1
|
|
1834
|
+
},
|
|
1835
|
+
"file": {
|
|
1836
|
+
"type": "string",
|
|
1837
|
+
"minLength": 1
|
|
1838
|
+
},
|
|
1839
|
+
"transform": {
|
|
1840
|
+
"type": "string",
|
|
1841
|
+
"enum": [
|
|
1842
|
+
"recolor",
|
|
1843
|
+
"palette-snap",
|
|
1844
|
+
"scale"
|
|
1845
|
+
]
|
|
1846
|
+
},
|
|
1847
|
+
"map": {
|
|
1848
|
+
"type": "object",
|
|
1849
|
+
"additionalProperties": {
|
|
1850
|
+
"type": "string",
|
|
1851
|
+
"pattern": "^#?[0-9a-f]{6}$"
|
|
1852
|
+
},
|
|
1853
|
+
"propertyNames": {
|
|
1854
|
+
"pattern": "^#?[0-9a-f]{6}$"
|
|
1855
|
+
}
|
|
1856
|
+
},
|
|
1857
|
+
"palette": {
|
|
1858
|
+
"type": "array",
|
|
1859
|
+
"items": {
|
|
1860
|
+
"type": "string",
|
|
1861
|
+
"pattern": "^#?[0-9a-f]{6}$"
|
|
1862
|
+
},
|
|
1863
|
+
"minItems": 2,
|
|
1864
|
+
"maxItems": 256
|
|
1865
|
+
},
|
|
1866
|
+
"width": {
|
|
1867
|
+
"type": "integer",
|
|
1868
|
+
"minimum": 1,
|
|
1869
|
+
"maximum": 4096
|
|
1870
|
+
},
|
|
1871
|
+
"height": {
|
|
1872
|
+
"type": "integer",
|
|
1873
|
+
"minimum": 1,
|
|
1874
|
+
"maximum": 4096
|
|
1875
|
+
},
|
|
1876
|
+
"mode": {
|
|
1877
|
+
"type": "string",
|
|
1878
|
+
"enum": [
|
|
1879
|
+
"nearest",
|
|
1880
|
+
"box"
|
|
1881
|
+
]
|
|
1882
|
+
}
|
|
1883
|
+
},
|
|
1884
|
+
"required": [
|
|
1885
|
+
"transform"
|
|
1886
|
+
],
|
|
1887
|
+
"additionalProperties": false
|
|
1888
|
+
},
|
|
1889
|
+
"external": {
|
|
1890
|
+
"type": "object",
|
|
1891
|
+
"properties": {
|
|
1892
|
+
"builder": {
|
|
1893
|
+
"type": "string",
|
|
1894
|
+
"minLength": 1
|
|
1895
|
+
},
|
|
1896
|
+
"inputs": {
|
|
1897
|
+
"type": "array",
|
|
1898
|
+
"items": {
|
|
1899
|
+
"type": "string",
|
|
1900
|
+
"minLength": 1
|
|
1901
|
+
}
|
|
1902
|
+
}
|
|
1903
|
+
},
|
|
1904
|
+
"required": [
|
|
1905
|
+
"builder"
|
|
1906
|
+
],
|
|
1907
|
+
"additionalProperties": false
|
|
1908
|
+
},
|
|
1828
1909
|
"outputRole": {
|
|
1829
1910
|
"type": "string",
|
|
1830
1911
|
"minLength": 1
|