pixelkiln 0.34.0 → 0.35.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
@@ -97,6 +97,11 @@ wire contracts.
97
97
  especially dangerous when a command can spend provider quota.
98
98
  - Never overwrite a generated file whose current bytes differ from its recorded
99
99
  hash, and never make deletion an implicit side effect of recovery/triage.
100
+ - The CLI is a thin layer. `src/cli.ts` is the bin entry, `src/cli/main.ts`
101
+ maps command names to modules under `src/cli/commands/`, `src/cli/args.ts`
102
+ parses flags, and `src/cli/project.ts` opens a project the way every
103
+ command needs it. A command module should read and print; anything it
104
+ computes belongs in `src/pipeline/` where the library exports it.
100
105
 
101
106
  ## Pull requests
102
107
 
package/README.md CHANGED
@@ -65,8 +65,8 @@ provenance and no long-lived npm token.
65
65
 
66
66
  ### Local human review
67
67
 
68
- `pixelkiln pick` opens a local candidate sheet — native aspect ratios, crisp
69
- small sprites, and no model choosing artwork for you.
68
+ `pixelkiln pick` opens a local candidate sheet with native aspect ratios and
69
+ crisp small sprites. No model chooses artwork for you.
70
70
 
71
71
  ![PixelKiln candidate review UI](./website/public/review-ui-showcase.jpg)
72
72
 
@@ -84,7 +84,7 @@ reviews from the page under that ceiling.
84
84
  Hand edits live beside the art, not in place of the record. [`pixelkiln edit`](docs/CLI.md#edit)
85
85
  opens a copy in your own editor; with `--edit` the gallery does the same, or opens
86
86
  it in a pinned, hash-verified [Pixelorama](docs/CLI.md#tools) build right in the page
87
- and saves it back — layers kept, frame and tile sets one file per member.
87
+ and saves it back with its layers kept, one file per member for frame and tile sets.
88
88
 
89
89
  ![PixelKiln in-browser editor](./website/public/gallery-editor-showcase.jpg)
90
90
 
@@ -337,18 +337,18 @@ artifacts agree rather than regenerate them. See
337
337
  ## TypeScript library
338
338
 
339
339
  ```ts
340
- import {
341
- buildPlan,
342
- loadLock,
343
- loadManifest,
344
- resolveSpecs,
345
- } from "pixelkiln"
346
- const loaded = await loadManifest("pixelkiln.manifest.json")
347
- const specs = await resolveSpecs(loaded)
348
- const plan = await buildPlan(specs, await loadLock("pixelkiln.lock.json"))
340
+ import { openProject } from "pixelkiln"
341
+
342
+ const project = await openProject("pixelkiln.manifest.json")
343
+ const plan = await project.plan()
349
344
  console.log(plan.groups, plan.actionable.length)
350
345
  ```
351
346
 
347
+ `openProject` reads the env files beside the manifest, loads it, resolves
348
+ every spec, and loads the lockfile with its paths canonicalised for this
349
+ checkout. `project.specs`, `project.lock`, and `project.lockPath` are what the
350
+ lower-level `submit`, `poll`, and `fetchAssets` calls take.
351
+
352
352
  The package also exports audit and image-regression gates, quality-profile
353
353
  inspection and refinement, revision-readiness checks, lock/output helpers, the
354
354
  gallery snapshot and server, hand edits and the editor install, provider contracts,
package/dist/cli.d.ts CHANGED
@@ -1,104 +1 @@
1
1
  #!/usr/bin/env node
2
- import { z } from 'zod';
3
-
4
- declare const GridConfidenceSchema: z.ZodEnum<["low", "medium", "high"]>;
5
- type GridConfidence = z.infer<typeof GridConfidenceSchema>;
6
-
7
- interface ReviewReadyInfo {
8
- url: string;
9
- keys: string[];
10
- }
11
-
12
- type TilesetFormat = "generic" | "tiled" | "godot";
13
-
14
- interface CliWritable {
15
- isTTY?: boolean;
16
- write(chunk: string): unknown;
17
- }
18
- /**
19
- * Interactive readiness is progress, not command output. Keep it on stdout in
20
- * a terminal, but use stderr when stdout is piped so consumers such as `tail`
21
- * cannot hold the only copy of the live URL until the server exits.
22
- */
23
- declare function announceReviewReady(info: ReviewReadyInfo, stdout?: CliWritable, stderr?: CliWritable): void;
24
- /** Same stream rule as review readiness: the live URL must not wait behind a pipe. */
25
- declare function announceGalleryReady(url: string, count: number, stdout?: CliWritable, stderr?: CliWritable, edit?: boolean, budget?: string | null): void;
26
- interface Args {
27
- command: string;
28
- manifest: string;
29
- lock: string;
30
- styles: string[];
31
- assets: string[];
32
- force: boolean;
33
- yes: boolean;
34
- budget?: number;
35
- /** Repeatable provider-keyed budgets used by a mixed-provider run. */
36
- providerBudgets: Record<string, number>;
37
- dryRun: boolean;
38
- all: boolean;
39
- json: boolean;
40
- check: boolean;
41
- noOpen: boolean;
42
- tag: boolean;
43
- /** gallery: allow the page to edit manifest intent (prompts, sizes, tags, new assets). */
44
- edit: boolean;
45
- /** gallery: do not offer the in-browser editor even with --edit. */
46
- noEditor: boolean;
47
- /** fetch: re-download downloaded outputs and replace files whose object changed upstream. */
48
- refresh: boolean;
49
- from?: string;
50
- out?: string;
51
- generator?: string;
52
- exclude: string[];
53
- name?: string;
54
- writePrompts: boolean;
55
- columns?: number;
56
- port?: number;
57
- inputs?: string;
58
- claims: string[];
59
- format?: TilesetFormat;
60
- outputRoles: string[];
61
- primaryOnly: boolean;
62
- prune: boolean;
63
- maxDistance?: number;
64
- minTransparency?: number;
65
- maxColors?: number;
66
- sigma?: number;
67
- palette: string[];
68
- fixerPython?: string;
69
- fixerRevision?: string;
70
- minGridConfidence?: GridConfidence;
71
- reviewer?: string;
72
- note?: string;
73
- /** ComfyUI `models` directory used for offline recipe model verification. */
74
- modelRoot?: string;
75
- /** restore: a previous generation to bring back — 1-based, newest first, or an output hash prefix. */
76
- generation?: string;
77
- /** Subcommand for `quality`, `recipe`, `refine`, or `workspace`. */
78
- subcommand?: string;
79
- /** Path to a workspace catalog. Defaults to `pixelkiln.workspace.json` in cwd. */
80
- workspace?: string;
81
- /** Positional target for recipe and workspace subcommands. */
82
- target?: string;
83
- /** Account provider selector; also the `workspace add` catalog provider hint. */
84
- provider?: string;
85
- /** `workspace add`: free-form account label, e.g. distinguishing sandboxes. */
86
- account?: string;
87
- /**
88
- * Raw `--lock` value with no manifest-relative default applied. `workspace
89
- * add` needs to know whether the user actually passed `--lock`, since the
90
- * ambient default (beside `--manifest`, which usually names an unrelated
91
- * project) is meaningless for the manifest being registered.
92
- */
93
- explicitLock?: string;
94
- }
95
- 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", "gallery", "edit", "tools", "history", "quality", "refine", "recipe", "workspace", "help", "--help", "-h", "--version", "-v"];
96
- /**
97
- * Strict parsing. Unknown flags are a hard error rather than being ignored,
98
- * because a silently-dropped filter is expensive here: `--styles neon` (plural,
99
- * a typo) would otherwise fall through to "no filter" and generate the entire
100
- * manifest instead of one style.
101
- */
102
- declare function parseArgs(argv: string[]): Args;
103
-
104
- export { COMMANDS, announceGalleryReady, announceReviewReady, parseArgs };