@babylonjs-toolkit/agent 1.1.28 → 1.1.33

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
@@ -1,4 +1,4 @@
1
- # Babylon Toolkit Desktop Agent (1.1.28)
1
+ # Babylon Toolkit Desktop Agent (1.1.33)
2
2
 
3
3
  The desktop agent owns the entire pipeline end to end — frontend and UI design, gameplay code, shaders, generated art and audio, 3D models in headless Blender, whole game levels and prefabs in a terminal-driven Unity Editor, the interactive glTF export, the web build, the dev server, and visual QA by screenshotting both Unity and the running browser.
4
4
 
@@ -125,8 +125,8 @@ happens to be named `bt-something` is safe.
125
125
 
126
126
  | Skill | Command | What it does |
127
127
  |-------|---------|--------------|
128
- | [`bt-spec`](skills/bt-spec/SKILL.md) | `/bt-spec` | Turn a short idea into a feature spec file on a new git branch. |
129
- | [`bt-plan`](skills/bt-plan/SKILL.md) | `/bt-plan` | Produce a detailed, task-checklist technical plan from a spec. Add `--heavy` for a decision-complete plan that keeps a long, fresh-context-per-task run cohesive. |
128
+ | [`bt-spec`](skills/bt-spec/SKILL.md) | `/bt-spec` | Turn a short idea into a feature spec file on a new git branch. Add `--grill-me` to be interviewed first, `--parity` to allow numeric parity bars in the acceptance criteria. |
129
+ | [`bt-plan`](skills/bt-plan/SKILL.md) | `/bt-plan` | Produce a detailed, task-checklist technical plan from a spec. Add `--heavy` for a decision-complete plan that keeps a long, fresh-context-per-task run cohesive, and `--parity` for numeric parity gates instead of the default functional proof. |
130
130
  | [`bt-execute`](skills/bt-execute/SKILL.md) | `/bt-execute` | Implement one task, a range (`T3-T7`, `T12-`, `NEXT:3`) or all remaining tasks from a plan/spec; with no task id it runs the next unchecked task. Add `--auto-pilot` for an unattended overnight run that never stops for human input, and `--strict` for an adversarial verifier on every task. |
131
131
  | [`bt-convert`](skills/bt-convert/SKILL.md) | `/bt-convert` | Convert source code to Babylon Toolkit TypeScript. |
132
132
  | [`bt-copycat`](skills/bt-copycat/SKILL.md) | `/bt-copycat` | Re-create the specified website adapted to specified genre. |
@@ -176,6 +176,15 @@ subagent re-fetching the Agent Reference.
176
176
  /bt-execute --auto-pilot --strict @_specs/<feature>_plan.md ALL
177
177
  ```
178
178
 
179
+ Proof is sized the same way. By default a feature is proven **functionally**: tests, cheap
180
+ reference-value fixtures where a reference exists, and for anything on screen a look at the
181
+ running result in the browser — against the spec and `DESIGN.md`, or beside a reference image
182
+ when there is one — judged by the independent verifier — with no ledgers, md5 records, archived
183
+ capture trees or standing gate suites unless the brief asks. Numeric parity gates (pixel
184
+ thresholds, repeats, every engine on every criterion) are opt-in: `/bt-spec --parity …` or
185
+ `/bt-plan --parity …`. Every plan ends with an `## Estimated execution time` section that splits
186
+ **build** from **prove** hours, so you can see before running it where the time will go.
187
+
179
188
  `--strict` restores full rigor: an adversarial verifier on **every task** (mutation checks,
180
189
  oracles, re-deriving from the plan as it sees fit), live QA on every task with a rendered or
181
190
  exported surface, a full fresh re-verify on each fix attempt, and a 5-attempt fix loop. It
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@babylonjs-toolkit/agent",
3
- "version": "1.1.28",
3
+ "version": "1.1.33",
4
4
  "description": "Installs the Babylon Toolkit Desktop Agent for Claude Code, Codex, GitHub Copilot, Gemini CLI and Antigravity.",
5
5
  "keywords": [
6
6
  "babylonjs",
@@ -64,7 +64,7 @@ user exactly which input failed and why, and ask for a corrected path/URL.
64
64
  - **Image generation**: pick the backend in this order:
65
65
  1. the tool or model the user named (e.g. "use nano-banana-2", "use Flux", "use Higgsfield");
66
66
  2. the **kie** image MCP (`kie-image-mcp`), the **default** where configured;
67
- 3. the **Higgsfield** MCP (`mcp__higgsfield__generate_image`) where configured;
67
+ 3. the **Higgsfield CLI** (`@higgsfield/cli`) where installed and signed in;
68
68
  4. the host's built-in image generation, or any other configured image tool.
69
69
 
70
70
  Whichever tool is used, pass BOTH the base texture and the UV layout as reference
@@ -75,23 +75,26 @@ user exactly which input failed and why, and ask for a corrected path/URL.
75
75
 
76
76
  - **kie**: `generate_image` with `reference_paths: [<base.png>, <uv_layout.png>]`
77
77
  (in that order), `out_path: <scratch>/raw/skin_var_NN.png`, `output_format: "png"`.
78
- - **Higgsfield**: it cannot read local files and has no `out_path`.
79
- 1. **Upload both references once**: `media_upload {files:[{filename:"base.png"},{filename:"uv_layout.png"}]}`,
80
- then `curl -f -X PUT --upload-file <file> '<upload_url>'` for each, then
81
- `media_confirm {type:"image", media_ids:[…]}`. Reuse the two `media_id`s for every variant.
82
- 2. **Pick a model that takes several reference images**: `gpt_image_2_5` (default),
83
- `nano_banana_2`, or `seedream_v4_5`. Never use `z_image`, which accepts no references. Pass
84
- `medias: [{role:"image_references", value:<base id>}, {role:"image_references", value:<uv id>}]`,
85
- with the base texture first, and `resolution: "2k"` for a 2048 texture.
86
- 3. **Preflight once** with `get_cost: true` and tell the user the per-variant credit cost before a
87
- large batch. Always send `use_unlim: false`.
88
- 4. For several variants, use `generate_image_batch` (≤12 per call, `index` = variant number) and then
89
- `jobs_wait`. For one variant, use `generate_image` then `job_status {jobId, sync:true}`.
90
- 5. **Download each result** from `results.rawUrl`:
91
- `curl -fL -o <scratch>/raw/skin_var_NN.png '<rawUrl>'`. Step 5 composites local files only.
92
- `composite_skin.py` resizes the output to the base texture's size itself, so an output at a
93
- different size needs no extra step.
94
- See the Babylon Toolkit reference `web-higgsfield-mcp.md` for the full tool list.
78
+ - **Higgsfield CLI**: see the Babylon Toolkit reference `web-higgsfield-cli.md`. Install it locally
79
+ (`npm i -D @higgsfield/cli`) and add the reference's download wrapper as `scripts/hf-generate.mjs` in
80
+ the project. The CLI only returns URLs; the wrapper saves the file.
81
+ 1. **Upload both references once** and reuse the IDs for every variant, because every call that names
82
+ a local path re-uploads it:
83
+ `node_modules/.bin/higgsfield upload create <base.png> --json` and the same for `<uv_layout.png>`.
84
+ Each returns `{ "id", … }`.
85
+ 2. **Use a model that takes several reference images**: `gpt_image_2_5` (default), `nano_banana_2`, or
86
+ `seedream_v4_5`. Never use `z_image`, which accepts no references. Repeat the flag, base first:
87
+ ```
88
+ node scripts/hf-generate.mjs nano_banana_2 --prompt "<prompt>" \
89
+ --image-references <base_id> --image-references <uv_id> \
90
+ --aspect_ratio 1:1 --resolution 2k --out <scratch>/raw/skin_var_NN.png
91
+ ```
92
+ 3. **Cost first**: run the same command once with `--cost` in place of `--out` (`nano_banana_2` at
93
+ `2k` with references was 2 credits per image when verified). Tell the user the per-variant cost
94
+ before a large batch.
95
+ 4. Run several variants as parallel wrapper calls from the shell, each with its own `--out`.
96
+ 5. The wrapper downloads each result to `--out`. `composite_skin.py` resizes it to the base texture's
97
+ size itself, so an output at a different size needs no extra step.
95
98
  - **Helper scripts** live in the `scripts/` folder next to this SKILL.md
96
99
  (need Python 3 + Pillow + numpy):
97
100
  - `scripts/uv_island_mask.py` — build the island mask from the UV layout.
@@ -188,8 +191,8 @@ for just those indices.
188
191
 
189
192
  ## Notes & gotchas
190
193
  - Always pass BOTH base + UV layout as references to the generator; never rely on
191
- the prompt alone to hold the layout. On Higgsfield that means two uploaded
192
- `media_id`s in `medias`, not file paths.
194
+ the prompt alone to hold the layout. On Higgsfield that means two
195
+ `--image-references` flags, base first.
193
196
  - Generated outputs (kie or Higgsfield) must end up as local files in `<scratch>/raw/`;
194
197
  never reference a remote result URL from the finals or the engine project.
195
198
  - The mask is the safety net. If a variant's island content is shifted inside its
@@ -64,15 +64,15 @@ all beats ffmpeg concat → journey.mp4
64
64
  **Which tool backs `generate_image` / `generate_video`?** These are generic
65
65
  calls, not a specific vendor. The skill routes them to whatever image/video
66
66
  generation is configured in your environment — KIE MCP servers (e.g.
67
- `kie-image-mcp` and `kie-video-mcp`, the default), Higgsfield MCP, the model's
68
- own built-in image/video generation, or any other configured image/video tool.
69
- The prompt just says "generate the footage"; the wiring picks the backend.
67
+ `kie-image-mcp` and `kie-video-mcp`, the default), the Higgsfield CLI, the
68
+ model's own built-in image/video generation, or any other configured image/video
69
+ tool. The prompt just says "generate the footage"; the wiring picks the backend.
70
70
  `image_paths` / `reference_paths` / `out_path` are the KIE/Kling parameter names.
71
- On **Higgsfield**, `image_paths[0]` / `[1]` become `medias` roles `start_image` /
72
- `end_image` on `kling3_0` or `seedance_2_5`. Local frames are uploaded first
73
- (`media_upload` → PUT → `media_confirm`), and `out_path` becomes "poll
74
- `job_status`, then `curl` the result into `media/`". The full table is in
75
- `3d-hero-scroll.md` §2.
71
+ On the **Higgsfield CLI** every call goes through the reference's
72
+ `scripts/hf-generate.mjs` wrapper: `image_paths[0]` / `[1]` become
73
+ `--start-image` / `--end-image` on `kling3_0` or `seedance_2_5`, reference images
74
+ become `--image-references <file>` (uploaded automatically), and `out_path`
75
+ becomes `--out media/<file>`. The full table is in `3d-hero-scroll.md` §2.
76
76
 
77
77
  **"Chain last-frame-to-first-frame" decoded:** Kling's `image_paths[0]` pins a
78
78
  clip's FIRST frame. The pipeline extracts clip N's LAST frame with ffmpeg and
@@ -40,7 +40,7 @@ memory in any framework; copy it and configure it.
40
40
  - **(a) Provided video** — skip to §3 (still needs the scrub re-encode).
41
41
  - **(b) Generate the footage** with whatever image/video generation is
42
42
  configured — KIE MCP servers (`kie-image-mcp` / `kie-video-mcp`, the
43
- **default**), Higgsfield MCP, the model's own built-in image/video
43
+ **default**), the Higgsfield CLI, the model's own built-in image/video
44
44
  generation, or any other configured image/video tool — §2.
45
45
  - **(c) No footage possible** — this pattern is wrong; use a static hero.
46
46
  2. **Brand tokens** — map `--hs-bg / --hs-ink / --hs-dim / --hs-accent /
@@ -75,8 +75,8 @@ memory in any framework; copy it and configure it.
75
75
 
76
76
  The generation backend is pluggable — the pipeline below is the same whatever
77
77
  produces the frames. Choose the backend in this order: the one the user named →
78
- **KIE MCP servers** (`kie-image-mcp` / `kie-video-mcp`, the default) → **Higgsfield
79
- MCP** → the model's own built-in image/video generation → any other configured
78
+ **KIE MCP servers** (`kie-image-mcp` / `kie-video-mcp`, the default) → the **Higgsfield
79
+ CLI** → the model's own built-in image/video generation → any other configured
80
80
  image/video tool. The parameter names below (`reference_paths`, `image_paths`,
81
81
  `out_path`) are KIE/Kling's; map them to your backend (Higgsfield mapping below).
82
82
 
@@ -85,27 +85,32 @@ image/video tool. The parameter names below (`reference_paths`, `image_paths`,
85
85
  > first (per CLAUDE.md). Those servers read the key from `.env` — a file named
86
86
  > `env` is ignored.
87
87
 
88
- > **If using the Higgsfield MCP** (`mcp__higgsfield__*`): fetch the Agent
89
- > Reference's `web-higgsfield-mcp.md` sub-document first. Higgsfield has no
90
- > `out_path` and cannot read local files, so every KIE-shaped call maps like this:
88
+ > **If using the Higgsfield CLI** (`@higgsfield/cli`): fetch the Agent
89
+ > Reference's `web-higgsfield-cli.md` sub-document first. Install the CLI
90
+ > locally (`npm i -D @higgsfield/cli`) and the reference's download wrapper as
91
+ > `scripts/hf-generate.mjs`. The CLI only returns CDN URLs; the wrapper saves
92
+ > each result to `--out`. KIE-shaped calls map like this:
91
93
  >
92
- > | KIE shape | Higgsfield |
94
+ > | KIE shape | Higgsfield CLI |
93
95
  > |---|---|
94
- > | local `reference_paths` / `image_paths` | upload first: `media_upload` → `curl -f -X PUT --upload-file <f> '<upload_url>'` → `media_confirm {type:"image"}` → `media_id`. A previous Higgsfield output (anchor image, generated still) needs no upload; pass its `job_id` |
95
- > | anchor/reference image | `generate_image` `medias: [{role:"image_references", value}]` (`gpt_image_2_5` or `nano_banana_pro`) |
96
- > | `image_paths[0]` = first frame | `generate_video` `medias: [{role:"start_image", value}]` |
97
- > | `image_paths[1]` = last frame | `medias: [{role:"end_image", value}]` |
98
- > | Kling 3 `std`/`pro` | `model: "kling3_0"`, `mode: "std"|"pro"|"4k"`, `duration` 3–15, `aspect_ratio` 16:9 |
99
- > | general video | `model: "seedance_2_5"` (`duration` 4–30, `resolution` 480p/720p/1080p) |
100
- > | `out_path` | `job_status {jobId, sync:true}` until `completed` (video ~60–180 s), then `curl -fL -o clipN.mp4 '<result url>'` |
96
+ > | `generate_image({ prompt, out_path })` | `node scripts/hf-generate.mjs gpt_image_2_5 --prompt "…" --aspect_ratio 16:9 --resolution 2k --out media/hero.png` (or `nano_banana_pro`) |
97
+ > | `reference_paths: [hero.png]` | `--image-references media/hero.png` (a local path is uploaded automatically; repeat the flag for several) |
98
+ > | `image_paths[0]` = first frame | `--start-image media/clip1-last.jpg` |
99
+ > | `image_paths[1]` = last frame | `--end-image media/hero.png` |
100
+ > | Kling 3 `std`/`pro` | `node scripts/hf-generate.mjs kling3_0 --mode std\|pro\|4k --duration <s> --aspect_ratio 16:9 --sound off …` |
101
+ > | general video | `seedance_2_5 --duration <s> --resolution 720p\|1080p --generate_audio false …` |
102
+ > | `out_path: "clipN.mp4"` | `--out media/clipN.mp4` (the wrapper waits: `--timeout 20m` default) |
101
103
  >
102
- > The scrub encode strips audio (`-an`), so turn generated audio **off**. That is
103
- > `sound: "off"` on `kling3_0` and `generate_audio: false` on `seedance_2_5`, and
104
- > it also lowers the credit cost. Preflight each clip with `get_cost: true`,
105
- > always send `use_unlim: false`, and tell the user the total credits for the
106
- > film before submitting it: a 4-clip film is the expensive part of this pattern.
107
- > The extracted last frame (`last.jpg`) is a local file, so it goes through
108
- > the upload step before it can pin the next clip's `start_image`.
104
+ > Image results are **PNG**. The wrapper saves `--out hero.jpg` as `hero.png` and
105
+ > reports the real path, so name anchors `.png` or convert them. The scrub encode
106
+ > strips audio (`-an`), so turn generated audio **off**: `--sound off` on
107
+ > `kling3_0` and `--generate_audio false` on `seedance_2_5`. It also lowers the
108
+ > cost. Run every clip once with `--cost` in place of `--out` (a 5 s `kling3_0`
109
+ > `std` clip with sound off was 7.5 credits when verified) and tell the user the
110
+ > total for the film before submitting it: a 4-clip film is the expensive part
111
+ > of this pattern. Sign-in is browser OAuth the user completes
112
+ > (`higgsfield auth login`), and a workspace must be selected first
113
+ > (`higgsfield workspace list` → `workspace set <id>`).
109
114
 
110
115
  1. **One hero anchor image first** (image model, e.g. nano-banana-pro, 16:9,
111
116
  2K). Every other asset references it (reference/anchor image input) so it is