pixelkiln 0.145.0 → 0.147.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/README.md CHANGED
@@ -136,10 +136,10 @@ npx pixelkiln plan
136
136
  npx pixelkiln gen --budget 120
137
137
  ```
138
138
 
139
- `gen` submits, polls, opens the candidate-review sheet when necessary,
140
- downloads validated output, populates the recovery cache, and updates
141
- `pixelkiln.lock.json`. Commit the manifest, lockfile, generated art, and any
142
- derived artifact companions. Do not commit credentials or `.pixelkiln/`.
139
+ `gen` submits, polls, opens the candidate-review sheet when necessary (or
140
+ takes each first candidate with `--accept-first`), downloads validated output,
141
+ populates the recovery cache, and updates `pixelkiln.lock.json`. Commit the
142
+ manifest, lockfile, art, and derived companions, never credentials or `.pixelkiln/`.
143
143
 
144
144
  For an existing art tree:
145
145
 
package/dist/cli.js CHANGED
@@ -181,6 +181,7 @@ var BOOL_FLAGS = [
181
181
  "--force",
182
182
  "--yes",
183
183
  "-y",
184
+ "--accept-first",
184
185
  "--dry-run",
185
186
  "--all",
186
187
  "--json",
@@ -552,6 +553,7 @@ function parseArgs(argv) {
552
553
  force: rest.includes("--force"),
553
554
  mergeConnected: rest.includes("--merge-connected"),
554
555
  yes: rest.includes("--yes") || rest.includes("-y"),
556
+ acceptFirst: rest.includes("--accept-first"),
555
557
  budget,
556
558
  providerBudgets,
557
559
  dryRun: rest.includes("--dry-run"),
@@ -935,6 +937,7 @@ Options
935
937
  --check plan/audit/cache: exit nonzero when the selected state is unsafe
936
938
  --yes, -y Skip the confirmation prompt; gen also accepts assets with a single
937
939
  candidate or one frame set (2+ candidates still open the pick page)
940
+ --accept-first gen/pick: take every asset's first candidate, open no pick page
938
941
  --no-open Do not auto-open the browser (pick, salvage, gallery) or editor (edit)
939
942
  --edit gallery: allow manifest edits from the page (never spends)
940
943
  --no-editor gallery: do not offer or serve the in-browser editor
@@ -28206,12 +28209,12 @@ async function runPicker(provider, lock, lockPath, opts = {}) {
28206
28209
  });
28207
28210
  if (!session) return { selected: 0, skipped: 0 };
28208
28211
  let autoSelected = 0;
28209
- if (opts.autoAcceptSingle) {
28210
- const singles = session.groups.filter((g) => g.mode === "frame-set" || g.frameUrls.length === 1);
28212
+ if (opts.acceptFirst || opts.autoAcceptSingle) {
28213
+ const singles = opts.acceptFirst ? session.groups : session.groups.filter((g) => g.mode === "frame-set" || g.frameUrls.length === 1);
28211
28214
  if (singles.length) {
28212
28215
  const res = await session.apply({ selections: singles.map((g) => ({ key: g.key, index: 0 })) }, lockPath);
28213
28216
  autoSelected = res.selected;
28214
- log2(` --yes: accepted ${res.selected} single-candidate asset(s)`);
28217
+ log2(opts.acceptFirst ? ` --accept-first: accepted the first candidate of ${res.selected} asset(s)` : ` --yes: accepted ${res.selected} single-candidate asset(s)`);
28215
28218
  const rest = session.groups.filter((g) => !singles.includes(g)).map((g) => g.key);
28216
28219
  session = rest.length ? await prepareReview(provider, lock, { onProgress: log2, keys: rest, specs: opts.specs, lockPath }) : null;
28217
28220
  if (!session) return { selected: autoSelected, skipped: 0 };
@@ -29231,6 +29234,7 @@ async function runLifecycle(args, wave, spent) {
29231
29234
  onProgress: log,
29232
29235
  onReady: announceReviewReady,
29233
29236
  autoAcceptSingle: args.yes,
29237
+ acceptFirst: args.acceptFirst,
29234
29238
  // A reroll from the page is `gen --force` for that one asset, inside
29235
29239
  // this run: same plan, same budget ceiling, same submit and poll.
29236
29240
  reroll: args.command === "gen" ? async (key3) => {
@@ -35274,7 +35278,12 @@ var RecipeSchema = z18.object({
35274
35278
  sourceImage: RecipeBindingSchema.optional(),
35275
35279
  maskImage: RecipeBindingSchema.optional(),
35276
35280
  strength: RecipeBindingSchema.optional()
35277
- }).strict()
35281
+ }).catchall(RecipeBindingSchema),
35282
+ /** Frame-set options; required when the style's generator is `frames`. */
35283
+ frames: z18.object({
35284
+ vary: z18.string().min(1),
35285
+ seedStep: z18.number().int().optional()
35286
+ }).strict().optional()
35278
35287
  }).strict().optional(),
35279
35288
  quality: z18.object({
35280
35289
  stage: z18.enum(["composition-source", "production-candidate"]),
@@ -35368,11 +35377,27 @@ var RecipeSchema = z18.object({
35368
35377
  });
35369
35378
  return;
35370
35379
  }
35380
+ const frames = recipe.workflow.frames;
35381
+ if (recipe.style.generator === "frames" !== (frames !== void 0)) {
35382
+ context.addIssue({
35383
+ code: z18.ZodIssueCode.custom,
35384
+ path: ["workflow", "frames"],
35385
+ message: "is required for a frames style and only allowed there"
35386
+ });
35387
+ }
35388
+ if (frames && !Object.hasOwn(recipe.workflow.bindings, frames.vary)) {
35389
+ context.addIssue({
35390
+ code: z18.ZodIssueCode.custom,
35391
+ path: ["workflow", "frames", "vary"],
35392
+ message: "must name a workflow binding"
35393
+ });
35394
+ }
35371
35395
  const expected = {
35372
35396
  workflowFile: `${RECIPE_DIR_TOKEN}/${recipe.workflow.path}`,
35373
35397
  outputNodeId: recipe.workflow.outputNodeId,
35374
35398
  numImages: recipe.workflow.numImages,
35375
- bindings: recipe.workflow.bindings
35399
+ bindings: recipe.workflow.bindings,
35400
+ frames
35376
35401
  };
35377
35402
  if (JSON.stringify(canonical3(options)) !== JSON.stringify(canonical3(expected))) {
35378
35403
  context.addIssue({