pixelkiln 0.89.0 → 0.89.2
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 +61 -2
- package/dist/cli.js.map +1 -1
- package/dist/index.cjs +65 -2
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +459 -1
- package/dist/index.d.ts +459 -1
- package/dist/index.js +63 -2
- package/dist/index.js.map +1 -1
- package/docs/ARCHITECTURE.md +8 -0
- package/docs/ENDPOINTS.md +23 -5
- package/docs/GENERATORS.md +1 -1
- package/docs/MANIFEST.md +1 -1
- package/docs/PIXELLAB.md +6 -5
- package/docs/REVISIONS.md +4 -4
- package/package.json +1 -1
- package/skills/pixelkiln/references/pixellab-roadmap.md +21 -10
- package/skills/pixelkiln/references/pixellab.md +11 -1
package/dist/index.js
CHANGED
|
@@ -1313,6 +1313,18 @@ var LockTerrainConnectSchema = z.record(
|
|
|
1313
1313
|
TerrainSideSchema,
|
|
1314
1314
|
z.object({ sourceAssetId: z.string().min(1), sourceObjectId: z.string().min(1) }).strict()
|
|
1315
1315
|
);
|
|
1316
|
+
var LockTerrainSettingsSchema = z.object({
|
|
1317
|
+
terrainMode: z.string().optional(),
|
|
1318
|
+
terrainShapeStyle: z.string().optional(),
|
|
1319
|
+
terrainSpreadX: z.number().optional(),
|
|
1320
|
+
terrainSlopeSize: z.number().optional(),
|
|
1321
|
+
terrainRaggedness: z.number().optional(),
|
|
1322
|
+
terrainTransitionSize: z.number().optional(),
|
|
1323
|
+
terrainView: z.string().optional(),
|
|
1324
|
+
terrainLowerDescription: z.string().optional(),
|
|
1325
|
+
terrainUpperDescription: z.string().optional(),
|
|
1326
|
+
terrainTransitionDescription: z.string().optional()
|
|
1327
|
+
});
|
|
1316
1328
|
var LockHistoryEntrySchema = z.object({
|
|
1317
1329
|
specHash: z.string(),
|
|
1318
1330
|
generator: GeneratorSchema,
|
|
@@ -1337,6 +1349,8 @@ var LockHistoryEntrySchema = z.object({
|
|
|
1337
1349
|
postprocess: PostprocessSchema.optional(),
|
|
1338
1350
|
/** A connected terrain set's other sets; see LockEntrySchema.terrainConnect. */
|
|
1339
1351
|
terrainConnect: LockTerrainConnectSchema.optional(),
|
|
1352
|
+
/** A terrain set's settings outside specHash; see LockEntrySchema.terrainSettings. */
|
|
1353
|
+
terrainSettings: LockTerrainSettingsSchema.optional(),
|
|
1340
1354
|
/** When the replacement was submitted. */
|
|
1341
1355
|
retiredAt: z.string()
|
|
1342
1356
|
});
|
|
@@ -1411,6 +1425,14 @@ var LockEntrySchema = z.object({
|
|
|
1411
1425
|
* Absent (not null) otherwise, so other entries do not grow the key.
|
|
1412
1426
|
*/
|
|
1413
1427
|
terrainConnect: LockTerrainConnectSchema.optional(),
|
|
1428
|
+
/**
|
|
1429
|
+
* For a terrain set: the settings it was submitted with that `specHash`
|
|
1430
|
+
* leaves out (see LockTerrainSettingsSchema). The plan marks the entry
|
|
1431
|
+
* stale when the manifest's differ. Absent on entries submitted before
|
|
1432
|
+
* it was recorded, which are taken as current, and on every other
|
|
1433
|
+
* generator's entries.
|
|
1434
|
+
*/
|
|
1435
|
+
terrainSettings: LockTerrainSettingsSchema.optional(),
|
|
1414
1436
|
/**
|
|
1415
1437
|
* Output hashes owned by the previous generation while its replacement is
|
|
1416
1438
|
* pending. They authorize replacing only unchanged PixelKiln-owned files.
|
|
@@ -3935,8 +3957,9 @@ function specHash(spec, styleImageHashes, providerOptionIdentity = spec.provider
|
|
|
3935
3957
|
uiColorPalette: spec.uiColorPalette,
|
|
3936
3958
|
// The older terrain knobs (terrainMode, terrainTransitionSize, and the
|
|
3937
3959
|
// rest) were never part of this hash, and adding them now would make
|
|
3938
|
-
// every existing terrain entry stale
|
|
3939
|
-
//
|
|
3960
|
+
// every existing terrain entry stale; terrainSettings below records
|
|
3961
|
+
// them per entry instead. The Pro shape controls added after them are
|
|
3962
|
+
// identity, each only when set.
|
|
3940
3963
|
terrainRoundness: spec.terrainRoundness,
|
|
3941
3964
|
terrainBoundaryAmplitude: spec.terrainBoundaryAmplitude,
|
|
3942
3965
|
terrainBoundarySeed: spec.terrainBoundarySeed,
|
|
@@ -4062,6 +4085,22 @@ function specHash(spec, styleImageHashes, providerOptionIdentity = spec.provider
|
|
|
4062
4085
|
})
|
|
4063
4086
|
);
|
|
4064
4087
|
}
|
|
4088
|
+
function terrainSettings(spec) {
|
|
4089
|
+
if (spec.generator !== "terrain") return void 0;
|
|
4090
|
+
const settings = {
|
|
4091
|
+
terrainMode: spec.terrainMode,
|
|
4092
|
+
terrainShapeStyle: spec.terrainShapeStyle,
|
|
4093
|
+
terrainSpreadX: spec.terrainSpreadX,
|
|
4094
|
+
terrainSlopeSize: spec.terrainSlopeSize,
|
|
4095
|
+
terrainRaggedness: spec.terrainRaggedness,
|
|
4096
|
+
terrainTransitionSize: spec.terrainTransitionSize,
|
|
4097
|
+
terrainView: spec.terrainView,
|
|
4098
|
+
terrainLowerDescription: spec.terrainLowerDescription,
|
|
4099
|
+
terrainUpperDescription: spec.terrainUpperDescription,
|
|
4100
|
+
terrainTransitionDescription: spec.terrainTransitionDescription
|
|
4101
|
+
};
|
|
4102
|
+
return Object.fromEntries(Object.entries(settings).filter(([, value]) => value !== void 0));
|
|
4103
|
+
}
|
|
4065
4104
|
|
|
4066
4105
|
// src/pixellab-mcp.ts
|
|
4067
4106
|
var PIXELLAB_MCP_URL = "https://api.pixellab.ai/mcp";
|
|
@@ -12984,6 +13023,15 @@ function changedTerrainConnection(spec, entry, lock) {
|
|
|
12984
13023
|
}
|
|
12985
13024
|
return null;
|
|
12986
13025
|
}
|
|
13026
|
+
function changedTerrainSettings(spec, entry) {
|
|
13027
|
+
const recorded = entry.terrainSettings;
|
|
13028
|
+
const current = terrainSettings(spec);
|
|
13029
|
+
if (!recorded || !current) return null;
|
|
13030
|
+
const show = (value) => value === void 0 ? "unset" : JSON.stringify(value);
|
|
13031
|
+
const fields = /* @__PURE__ */ new Set([...Object.keys(recorded), ...Object.keys(current)]);
|
|
13032
|
+
const changes = [...fields].filter((field) => recorded[field] !== current[field]).map((field) => `${field} changed from ${show(recorded[field])} to ${show(current[field])}`);
|
|
13033
|
+
return changes.length ? changes.join("; ") : null;
|
|
13034
|
+
}
|
|
12987
13035
|
function resumeCommandForStatus(status) {
|
|
12988
13036
|
if (status === "pending" || status === "processing") return "poll";
|
|
12989
13037
|
if (status === "review") return "pick";
|
|
@@ -13016,6 +13064,7 @@ async function buildPlan(specs, lock, opts = {}) {
|
|
|
13016
13064
|
let state;
|
|
13017
13065
|
let reason;
|
|
13018
13066
|
const changedConnection = entry ? changedTerrainConnection(spec, entry, lock) : null;
|
|
13067
|
+
const changedSettings = entry ? changedTerrainSettings(spec, entry) : null;
|
|
13019
13068
|
const revision = await inspectRevisionReadiness(spec, lock);
|
|
13020
13069
|
if (revision && !revision.ready) {
|
|
13021
13070
|
state = "blocked";
|
|
@@ -13054,6 +13103,9 @@ async function buildPlan(specs, lock, opts = {}) {
|
|
|
13054
13103
|
} else if (changedConnection) {
|
|
13055
13104
|
state = "stale";
|
|
13056
13105
|
reason = `connected set ${changedConnection} was regenerated; draw this set from its new terrain`;
|
|
13106
|
+
} else if (changedSettings) {
|
|
13107
|
+
state = "stale";
|
|
13108
|
+
reason = changedSettings;
|
|
13057
13109
|
} else if (entry.status === "download-failed") {
|
|
13058
13110
|
state = "recoverable";
|
|
13059
13111
|
const force = entry.error?.includes("pass --force") ? " --force" : "";
|
|
@@ -14523,6 +14575,7 @@ function retireGeneration(entry, retiredAt) {
|
|
|
14523
14575
|
provider: entry.provider,
|
|
14524
14576
|
postprocess: entry.postprocess,
|
|
14525
14577
|
...entry.terrainConnect ? { terrainConnect: entry.terrainConnect } : {},
|
|
14578
|
+
...entry.terrainSettings ? { terrainSettings: entry.terrainSettings } : {},
|
|
14526
14579
|
retiredAt
|
|
14527
14580
|
};
|
|
14528
14581
|
}
|
|
@@ -14617,6 +14670,9 @@ async function revertGeneration(provider, spec, lock, lockPath, opts) {
|
|
|
14617
14670
|
// A connected set comes back with the connection it was drawn from, so
|
|
14618
14671
|
// the plan compares the restored generation, not the one it replaced.
|
|
14619
14672
|
terrainConnect: generation.terrainConnect,
|
|
14673
|
+
// Likewise its settings; a generation from before they were recorded
|
|
14674
|
+
// comes back with none and is taken as current.
|
|
14675
|
+
terrainSettings: generation.terrainSettings,
|
|
14620
14676
|
history
|
|
14621
14677
|
});
|
|
14622
14678
|
await saveLock(lockPath, lock);
|
|
@@ -15694,6 +15750,9 @@ async function submit(provider, loaded, items, lock, lockPath, opts = {}) {
|
|
|
15694
15750
|
referenceSha256: spec.character.outfit.reference.sha256
|
|
15695
15751
|
} : null,
|
|
15696
15752
|
terrainConnect: spec.terrainConnect ? terrainConnect : void 0,
|
|
15753
|
+
// The terrain knobs specHash leaves out, so the plan can tell a
|
|
15754
|
+
// changed one; undefined (no key) for every other generator.
|
|
15755
|
+
terrainSettings: terrainSettings(spec),
|
|
15697
15756
|
status: "pending",
|
|
15698
15757
|
jobId: previousJobId ?? null,
|
|
15699
15758
|
...previousJobId ? { submissionComplete: false } : { submissionComplete: void 0 },
|
|
@@ -20705,6 +20764,7 @@ export {
|
|
|
20705
20764
|
LockEntrySchema,
|
|
20706
20765
|
LockHistoryEntrySchema,
|
|
20707
20766
|
LockSchema,
|
|
20767
|
+
LockTerrainSettingsSchema,
|
|
20708
20768
|
MAX_DOWNLOAD_BYTES,
|
|
20709
20769
|
MAX_HAND_EDIT_BYTES,
|
|
20710
20770
|
MAX_RETRIES,
|
|
@@ -20976,6 +21036,7 @@ export {
|
|
|
20976
21036
|
summarize,
|
|
20977
21037
|
tagAdopted,
|
|
20978
21038
|
terrainCost,
|
|
21039
|
+
terrainSettings,
|
|
20979
21040
|
terrainTileCount,
|
|
20980
21041
|
tileFeatureOutputCount,
|
|
20981
21042
|
tileVariationCount,
|