pixelkiln 0.49.0 → 0.50.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 +111 -23
- package/dist/cli.js.map +1 -1
- package/dist/index.cjs +111 -23
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +778 -25
- package/dist/index.d.ts +778 -25
- package/dist/index.js +111 -23
- package/dist/index.js.map +1 -1
- package/docs/ENDPOINTS.md +60 -7
- package/docs/PIXELLAB.md +34 -8
- package/docs/REVISIONS.md +53 -12
- package/package.json +1 -1
- package/skills/pixelkiln/SKILL.md +7 -1
- package/skills/pixelkiln/references/pixellab-fidelity.md +186 -0
- package/skills/pixelkiln/references/pixellab-roadmap.md +176 -0
- package/skills/pixelkiln/references/pixellab.md +71 -8
package/dist/cli.js
CHANGED
|
@@ -938,17 +938,37 @@ var StyleObjectSchema = z.object({
|
|
|
938
938
|
shading: z.string().optional(),
|
|
939
939
|
detail: z.string().optional(),
|
|
940
940
|
/**
|
|
941
|
-
* `tiles` generator only. Edge length of one tile, 16-
|
|
941
|
+
* `tiles` generator only. Edge length of one tile, 16-128 (the API's own
|
|
942
|
+
* range; connectable sets narrow it further per shape, e.g. square
|
|
943
|
+
* top-down roads are fixed at 32).
|
|
942
944
|
*
|
|
943
945
|
* Ignored when `styleImages` is set: style mode takes the tile's shape
|
|
944
946
|
* and dimensions from the reference image, which is the whole reason to
|
|
945
947
|
* use it against an existing sheet.
|
|
946
948
|
*/
|
|
947
|
-
tileSize: z.number().int().min(16).max(
|
|
949
|
+
tileSize: z.number().int().min(16).max(128).optional(),
|
|
950
|
+
/** `tiles` generator only. Height in pixels (16-256) for a non-square
|
|
951
|
+
* tile (e.g. a tall building wall); omit to compute it from `tileType`
|
|
952
|
+
* geometry and the view angle. */
|
|
953
|
+
tileHeight: z.number().int().min(16).max(256).optional(),
|
|
948
954
|
/** `tiles` generator only. Defaults to the API's `isometric`. */
|
|
949
955
|
tileType: z.enum(["hex", "hex_pointy", "isometric", "oblique", "octagon", "square_topdown"]).optional(),
|
|
950
956
|
/** `tiles` generator only. Defaults to the API's `low top-down`. */
|
|
951
957
|
tileView: z.enum(["top-down", "high top-down", "low top-down", "side"]).optional(),
|
|
958
|
+
/** `tiles` generator only. Continuous view angle in degrees (0 = side,
|
|
959
|
+
* 90 = top-down), overriding `tileView` when set. */
|
|
960
|
+
tileViewAngle: z.number().min(0).max(90).optional(),
|
|
961
|
+
/** `tiles` generator only. Tile depth/thickness as a ratio (0-1) of the
|
|
962
|
+
* tile's height, overriding the default the API computes from the
|
|
963
|
+
* view. This is the tutorials' "thickness" control. */
|
|
964
|
+
tileDepthRatio: z.number().min(0).max(1).optional(),
|
|
965
|
+
/** `tiles` generator only, `tileType: "isometric"`. Top/bottom cap
|
|
966
|
+
* width in pixels: 2 for the classic look, 4 for a more modern one. */
|
|
967
|
+
tileFlatTopPx: z.number().int().min(2).max(8).optional(),
|
|
968
|
+
/** `tiles` generator only, `tileType: "oblique"` (ground tiles or
|
|
969
|
+
* building walls). Horizontal shear per pixel of height (0-1); 0.5 is
|
|
970
|
+
* a classic cabinet projection (~27°), 1.0 a full 45° diagonal. */
|
|
971
|
+
obliqueLean: z.number().min(0).max(1).optional(),
|
|
952
972
|
/**
|
|
953
973
|
* `tiles` generator only. Asks for a connectable set instead of
|
|
954
974
|
* independent variations:
|
|
@@ -963,6 +983,28 @@ var StyleObjectSchema = z.object({
|
|
|
963
983
|
* is load-bearing; do not sort a connectable set by anything else.
|
|
964
984
|
*/
|
|
965
985
|
tileFeature: z.enum(["roads", "tileset", "building"]).optional(),
|
|
986
|
+
/** `tileFeature: "building"` only. Wall height in tiles (1-3); the API
|
|
987
|
+
* defaults to 2. */
|
|
988
|
+
buildingWallTiles: z.number().int().min(1).max(3).optional(),
|
|
989
|
+
/** `tileFeature: "building"` only. `"grid"` paints each shaped piece
|
|
990
|
+
* individually (richer, the isometric default); `"materials"` paints
|
|
991
|
+
* flat swatches and renders pieces from them (more consistent for
|
|
992
|
+
* square top-down building kits). */
|
|
993
|
+
buildingLayout: z.enum(["grid", "materials"]).optional(),
|
|
994
|
+
/** `tileFeature: "building"` only. Wall material, e.g. "stone brick
|
|
995
|
+
* walls" — more reliable than relying on the main `prompt` being split
|
|
996
|
+
* into wall/floor parts. */
|
|
997
|
+
buildingWallDescription: z.string().min(1).max(500).optional(),
|
|
998
|
+
/** `tileFeature: "building"` only. Floor material, e.g. "wooden plank
|
|
999
|
+
* floor". */
|
|
1000
|
+
buildingFloorDescription: z.string().min(1).max(500).optional(),
|
|
1001
|
+
/** `tileFeature: "building"` only. Upper-storey or roof surface;
|
|
1002
|
+
* defaults to the wall material when omitted. */
|
|
1003
|
+
buildingFloor2Description: z.string().min(1).max(500).optional(),
|
|
1004
|
+
/** `tileFeature: "building"` with `tileType: "square_topdown"` only.
|
|
1005
|
+
* Wall storey height as its own camera angle in degrees (5-90),
|
|
1006
|
+
* decoupled from the ground's pitch. */
|
|
1007
|
+
buildingWallAngle: z.number().min(5).max(90).optional(),
|
|
966
1008
|
/**
|
|
967
1009
|
* `tiles` generator only. How tile edges are drawn.
|
|
968
1010
|
*
|
|
@@ -5345,9 +5387,20 @@ var PixelLabClient = class {
|
|
|
5345
5387
|
async createTilesPro(args) {
|
|
5346
5388
|
const body = { description: args.description };
|
|
5347
5389
|
if (args.tileSize != null) body.tile_size = args.tileSize;
|
|
5390
|
+
if (args.tileHeight != null) body.tile_height = args.tileHeight;
|
|
5348
5391
|
if (args.tileType) body.tile_type = args.tileType;
|
|
5349
5392
|
if (args.tileView) body.tile_view = args.tileView;
|
|
5393
|
+
if (args.tileViewAngle != null) body.tile_view_angle = args.tileViewAngle;
|
|
5394
|
+
if (args.tileDepthRatio != null) body.tile_depth_ratio = args.tileDepthRatio;
|
|
5395
|
+
if (args.tileFlatTopPx != null) body.tile_flat_top_px = args.tileFlatTopPx;
|
|
5396
|
+
if (args.obliqueLean != null) body.oblique_lean = args.obliqueLean;
|
|
5350
5397
|
if (args.tileFeature) body.tile_feature = args.tileFeature;
|
|
5398
|
+
if (args.buildingWallTiles != null) body.building_wall_tiles = args.buildingWallTiles;
|
|
5399
|
+
if (args.buildingLayout) body.building_layout = args.buildingLayout;
|
|
5400
|
+
if (args.buildingWallDescription) body.building_wall_description = args.buildingWallDescription;
|
|
5401
|
+
if (args.buildingFloorDescription) body.building_floor_description = args.buildingFloorDescription;
|
|
5402
|
+
if (args.buildingFloor2Description) body.building_floor2_description = args.buildingFloor2Description;
|
|
5403
|
+
if (args.buildingWallAngle != null) body.building_wall_angle = args.buildingWallAngle;
|
|
5351
5404
|
if (args.outlineMode) body.outline_mode = args.outlineMode;
|
|
5352
5405
|
if (args.seed != null) body.seed = args.seed;
|
|
5353
5406
|
if (args.styleImages?.length) body.style_images = args.styleImages;
|
|
@@ -5603,13 +5656,21 @@ var PixelLabClient = class {
|
|
|
5603
5656
|
/**
|
|
5604
5657
|
* Masked inpaint, PixelLab's `/inpaint-v3` (the endpoint its own docs list
|
|
5605
5658
|
* first in the Inpaint section, its convention for "reach for this by
|
|
5606
|
-
* default").
|
|
5607
|
-
*
|
|
5608
|
-
*
|
|
5609
|
-
*
|
|
5610
|
-
*
|
|
5611
|
-
*
|
|
5612
|
-
*
|
|
5659
|
+
* default"). Exercised live at nine sizes, all returning `last_response.
|
|
5660
|
+
* image` as a single `{type, base64, width, height}` (the first shape
|
|
5661
|
+
* `pollRevision` in pixellab.ts checks, so no change was ever needed):
|
|
5662
|
+
* 32x32 (1024px², billed 20, this adapter's tiering floor) through
|
|
5663
|
+
* 256x256 (65536px²) all billed 20 (the tiering wrongly predicts 25 from
|
|
5664
|
+
* 1024px² up, see estimate() in pixellab.ts); 288x288 (82944px²) and
|
|
5665
|
+
* 320x320 (102400px²) billed 25 — the middle tier is real, just starting
|
|
5666
|
+
* far higher than this tiering assumes; 352x352 (123904px²), 384x384
|
|
5667
|
+
* (147456px²), and 512x512 (262144px², the tiering ceiling) all billed
|
|
5668
|
+
* 40. Both breakpoints are now tightly bracketed: 20->25 in
|
|
5669
|
+
* (65536px², 82944px²], 25->40 in (102400px², 123904px²].
|
|
5670
|
+
* `editImagesV2` below returns the same fields under `images`, plural
|
|
5671
|
+
* and array-wrapped, not `image` — do not assume the two endpoints share
|
|
5672
|
+
* one response shape. See docs/ENDPOINTS.md and docs/REVISIONS.md for
|
|
5673
|
+
* the full shape and cost picture, including what is still unconfirmed.
|
|
5613
5674
|
*
|
|
5614
5675
|
* `crop_to_mask` defaults true upstream (confirmed in the schema): PixelLab
|
|
5615
5676
|
* otherwise blends generated pixels outside the mask edge to "fit
|
|
@@ -5632,11 +5693,15 @@ var PixelLabClient = class {
|
|
|
5632
5693
|
);
|
|
5633
5694
|
}
|
|
5634
5695
|
/**
|
|
5635
|
-
* Whole-image edit with no mask, PixelLab's `/edit-images-v2`.
|
|
5636
|
-
*
|
|
5637
|
-
* array (the endpoint supports editing several images with one
|
|
5696
|
+
* Whole-image edit with no mask, PixelLab's `/edit-images-v2`. `edit_images`
|
|
5697
|
+
* takes an array (the endpoint supports editing several images with one
|
|
5638
5698
|
* instruction); pixelkiln's `revision` model is one parent per child, so
|
|
5639
|
-
* this always sends exactly one.
|
|
5699
|
+
* this always sends exactly one. Exercised live at its floor size (32x32):
|
|
5700
|
+
* billed exactly the 20-generation estimate this adapter borrows from
|
|
5701
|
+
* `1dir`, matching `inpaintV3`'s floor exactly. The completed response is
|
|
5702
|
+
* `last_response.images`, an *array* of `{type, base64, width, height}` —
|
|
5703
|
+
* plural and array-wrapped, unlike `inpaintV3`'s singular `image` above,
|
|
5704
|
+
* even though exactly one image is ever sent or expected here.
|
|
5640
5705
|
*/
|
|
5641
5706
|
async editImagesV2(args) {
|
|
5642
5707
|
const body = {
|
|
@@ -6215,9 +6280,20 @@ var PixelLabProvider = class _PixelLabProvider {
|
|
|
6215
6280
|
const res2 = await this.client.createTilesPro({
|
|
6216
6281
|
description: spec.prompt,
|
|
6217
6282
|
tileSize: spec.tileSize,
|
|
6283
|
+
tileHeight: spec.tileHeight,
|
|
6218
6284
|
tileType: spec.tileType,
|
|
6219
6285
|
tileView: spec.tileView,
|
|
6286
|
+
tileViewAngle: spec.tileViewAngle,
|
|
6287
|
+
tileDepthRatio: spec.tileDepthRatio,
|
|
6288
|
+
tileFlatTopPx: spec.tileFlatTopPx,
|
|
6289
|
+
obliqueLean: spec.obliqueLean,
|
|
6220
6290
|
tileFeature: spec.tileFeature,
|
|
6291
|
+
buildingWallTiles: spec.buildingWallTiles,
|
|
6292
|
+
buildingLayout: spec.buildingLayout,
|
|
6293
|
+
buildingWallDescription: spec.buildingWallDescription,
|
|
6294
|
+
buildingFloorDescription: spec.buildingFloorDescription,
|
|
6295
|
+
buildingFloor2Description: spec.buildingFloor2Description,
|
|
6296
|
+
buildingWallAngle: spec.buildingWallAngle,
|
|
6221
6297
|
outlineMode: spec.outlineMode,
|
|
6222
6298
|
seed: spec.seed,
|
|
6223
6299
|
// TilesProStyleImage is flat and wants the reference's real dimensions,
|
|
@@ -6351,16 +6427,17 @@ var PixelLabProvider = class _PixelLabProvider {
|
|
|
6351
6427
|
/**
|
|
6352
6428
|
* `/inpaint-v3` and `/edit-images-v2` both hand back a plain background
|
|
6353
6429
|
* job with no resource of its own, polled generically at
|
|
6354
|
-
* `GET /background-jobs/{id}`.
|
|
6355
|
-
*
|
|
6356
|
-
*
|
|
6357
|
-
*
|
|
6358
|
-
*
|
|
6359
|
-
*
|
|
6360
|
-
*
|
|
6361
|
-
*
|
|
6362
|
-
*
|
|
6363
|
-
*
|
|
6430
|
+
* `GET /background-jobs/{id}`. Confirmed live for both, and the two do not
|
|
6431
|
+
* match: a completed `inpaint-v3` job's `last_response.image` is a single
|
|
6432
|
+
* `{type: "base64", base64, width, height}`, matched by the `imageKeys`
|
|
6433
|
+
* branch below; a completed `edit-images-v2` job's is `last_response.images`,
|
|
6434
|
+
* an *array* of that same shape, matched by the `done.images` branch below
|
|
6435
|
+
* instead — exactly why both branches exist rather than just the first one
|
|
6436
|
+
* (docs/ENDPOINTS.md, docs/REVISIONS.md). Beyond these two confirmed
|
|
6437
|
+
* shapes, this also checks a nested `{image: {base64, format}}` and a
|
|
6438
|
+
* hosted URL under a handful of plausible keys, and fails loudly, naming
|
|
6439
|
+
* the keys it actually got, rather than guess wrong silently, for whatever
|
|
6440
|
+
* shape still isn't covered.
|
|
6364
6441
|
*/
|
|
6365
6442
|
async pollRevision(jobId) {
|
|
6366
6443
|
const job = await this.client.getBackgroundJob(jobId);
|
|
@@ -7857,9 +7934,20 @@ async function resolveSpecs(loaded, filter) {
|
|
|
7857
7934
|
enforcePalette: style.enforcePalette,
|
|
7858
7935
|
noBackground: style.noBackground,
|
|
7859
7936
|
tileSize: generator === "tiles" ? tileSize : void 0,
|
|
7937
|
+
tileHeight: generator === "tiles" ? style.tileHeight : void 0,
|
|
7860
7938
|
tileType: generator === "tiles" ? style.tileType : void 0,
|
|
7861
7939
|
tileView: generator === "tiles" ? style.tileView : void 0,
|
|
7940
|
+
tileViewAngle: generator === "tiles" ? style.tileViewAngle : void 0,
|
|
7941
|
+
tileDepthRatio: generator === "tiles" ? style.tileDepthRatio : void 0,
|
|
7942
|
+
tileFlatTopPx: generator === "tiles" ? style.tileFlatTopPx : void 0,
|
|
7943
|
+
obliqueLean: generator === "tiles" ? style.obliqueLean : void 0,
|
|
7862
7944
|
tileFeature: generator === "tiles" ? style.tileFeature : void 0,
|
|
7945
|
+
buildingWallTiles: generator === "tiles" ? style.buildingWallTiles : void 0,
|
|
7946
|
+
buildingLayout: generator === "tiles" ? style.buildingLayout : void 0,
|
|
7947
|
+
buildingWallDescription: generator === "tiles" ? style.buildingWallDescription : void 0,
|
|
7948
|
+
buildingFloorDescription: generator === "tiles" ? style.buildingFloorDescription : void 0,
|
|
7949
|
+
buildingFloor2Description: generator === "tiles" ? style.buildingFloor2Description : void 0,
|
|
7950
|
+
buildingWallAngle: generator === "tiles" ? style.buildingWallAngle : void 0,
|
|
7863
7951
|
outlineMode: generator === "tiles" ? style.outlineMode : void 0,
|
|
7864
7952
|
...generator === "character" ? { character: await resolveCharacterShape(asset, style, characterKind, { root, load: loadStyleImage }) } : {},
|
|
7865
7953
|
cost: generator === "tiles" ? tilesCost(tileSize, tileVariations) : generationCost(width, height, generator),
|