@koda-sl/baker-cli 0.114.0-dev.249eaa8ed → 0.115.0-dev.3bcc79f9c
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 +61 -0
- package/dist/{chunk-5AWO4BHJ.js → chunk-OCMOQOIJ.js} +401 -69
- package/dist/chunk-OCMOQOIJ.js.map +1 -0
- package/dist/cli.js +551 -108
- package/dist/cli.js.map +1 -1
- package/dist/engine/index.d.ts +44 -0
- package/dist/engine/index.js +1 -1
- package/package.json +1 -1
- package/dist/chunk-5AWO4BHJ.js.map +0 -1
package/README.md
CHANGED
|
@@ -681,6 +681,12 @@ baker ads google keyword-lists add --customer-id 1234567890 --list-ref <list-id>
|
|
|
681
681
|
baker ads google ads create --customer-id 1234567890 --ad-group-ref g_temp_<adgroup> \
|
|
682
682
|
--headlines "Fast Widgets,Buy Online,Free Shipping" --descriptions "Best widgets around.,Ships tomorrow." \
|
|
683
683
|
--final-url https://example.com
|
|
684
|
+
# Responsive display ad — images are fields on the ad; register each image as an asset first (returns a g_temp_* ref)
|
|
685
|
+
baker ads google assets create --customer-id 1234567890 --file '{"type":"image","imageId":"<baker_image_id>","name":"Hero"}'
|
|
686
|
+
baker ads google ads create --customer-id 1234567890 --ad-group-ref g_temp_<adgroup> --format responsiveDisplay \
|
|
687
|
+
--headlines "Come back and save" --long-headline "Finish signing up and get 20% off" \
|
|
688
|
+
--descriptions "Fast setup, no card required" --business-name "Acme" --final-url https://example.com \
|
|
689
|
+
--marketing-images g_temp_<img_landscape> --square-marketing-images g_temp_<img_square> --logo-images g_temp_<img_logo>
|
|
684
690
|
|
|
685
691
|
# Review / undo staged changes
|
|
686
692
|
baker ads google draft list # readable campaign ▸ ad group ▸ ad tree + completeness advisories
|
|
@@ -2574,12 +2580,36 @@ Auth: same `BAKER_API_KEY` + `BAKER_API_URL` as the rest of the CLI.
|
|
|
2574
2580
|
```bash
|
|
2575
2581
|
# 1. Validate (free, never calls the API)
|
|
2576
2582
|
baker canvas validate my-canvas.json
|
|
2583
|
+
# Blocking issues exit non-zero. Advisory `warnings[]` (exit 0) flag likely-wrong-but-
|
|
2584
|
+
# legal config to review before billing — a frame that describes a recurring element
|
|
2585
|
+
# (a pet/product) but doesn't wire its reference (VIDEO_REFERENCE_MISSING), or a scene
|
|
2586
|
+
# span that exceeds the assigned model's max clip duration (VIDEO_SPAN_EXCEEDS_MODEL).
|
|
2577
2587
|
|
|
2578
2588
|
# 2. Run (executes nodes, writes files to ./canvas/<run_id>/)
|
|
2579
2589
|
baker canvas run my-canvas.json
|
|
2580
2590
|
# Only nodes reachable from the declared output execute (orphaned nodes are skipped,
|
|
2581
2591
|
# not billed). Add --keep-runs N to prune old r_* run dirs, keeping the N newest.
|
|
2582
2592
|
|
|
2593
|
+
# 2b. Independent nodes ALREADY fan out in parallel — every node in the same
|
|
2594
|
+
# topological layer (e.g. all the per-clip video_generate nodes) runs concurrently
|
|
2595
|
+
# up to a bound. Raise it with --parallel N (alias: --concurrency N; default 5;
|
|
2596
|
+
# env BAKER_CANVAS_CONCURRENCY). A single clip failing NO LONGER strands its
|
|
2597
|
+
# siblings: the whole layer settles, cached siblings survive, and a re-run resumes
|
|
2598
|
+
# from cache. There is no need to render clips one at a time or pin `output` to a
|
|
2599
|
+
# single node — that old serial workaround is obsolete.
|
|
2600
|
+
baker canvas run my-canvas.json --parallel 8
|
|
2601
|
+
|
|
2602
|
+
# 2c. Runs persist across sandboxes/sessions by default: node results sync to a
|
|
2603
|
+
# company-scoped remote cache (small JSON pointers; bytes stay in R2), so a FRESH
|
|
2604
|
+
# sandbox re-runs an already-computed canvas at zero credits — assets rehydrate
|
|
2605
|
+
# from R2, sha-verified. Every run also posts a durable history record (per-node
|
|
2606
|
+
# outputs, credits, cached/fresh) that powers the dashboard's Creatives
|
|
2607
|
+
# generations timeline. Opt out with --remote-cache off (env
|
|
2608
|
+
# BAKER_CANVAS_REMOTE_CACHE=off) and --no-record. With --remote-cache off,
|
|
2609
|
+
# assets are not uploaded, so a recorded run keeps its stats but has no
|
|
2610
|
+
# browsable outputs — pass --no-record too if you want nothing persisted.
|
|
2611
|
+
baker canvas run my-canvas.json --remote-cache off --no-record
|
|
2612
|
+
|
|
2583
2613
|
# 3. Inspect a finished run (per-node timing, file list, optional video thumbs)
|
|
2584
2614
|
baker canvas inspect <run_id>
|
|
2585
2615
|
|
|
@@ -3323,6 +3353,15 @@ Ref-image MIMEs: `image/png`, `image/jpeg`, `image/webp`, `image/gif` (via OpenR
|
|
|
3323
3353
|
"duration": 6, "resolution": "1080p", "aspect_ratio": "16:9", "enhance_prompt": true } }
|
|
3324
3354
|
```
|
|
3325
3355
|
|
|
3356
|
+
> **Switching a clip's model has cross-node constraints** — validate after every model edit. `validate` gates all of these before any billed run:
|
|
3357
|
+
> - **One aspect_ratio for the whole canvas.** Every `video_generate` node must agree (`VIDEO_ASPECT_MISMATCH`), or the composite silently crops/letterboxes. Switching one clip to Veo (which only offers `16:9`/`9:16`) forces every other clip to a shared ratio too.
|
|
3358
|
+
> - **`duration` is a per-model hard enum.** Seedance `4,5,6,8,10,12,15`; Veo `4,6,8` only. A value outside the model's set is rejected; a scene whose natural span exceeds the model's max is flagged (`VIDEO_SPAN_EXCEEDS_MODEL`, advisory) — a 9.2s scene can't fit Veo's 8s cap and would truncate; split the scene or keep it on a longer-max model.
|
|
3359
|
+
> - **`person_generation` differs.** Veo accepts only `allow_all`.
|
|
3360
|
+
>
|
|
3361
|
+
> A scaffolded canvas carries this table inline at `metadata.todo.model_constraints`.
|
|
3362
|
+
|
|
3363
|
+
> **Content-policy blocks are deterministic, not flaky.** fal.ai/Seedance rejects any first/last frame that reads as a real-person likeness (even an AI-generated face) — surfaced as `content_policy_blocked` (HTTP 422, **non-retryable**), even when fal's proxy chain masks it as a 5xx. Retrying **never** succeeds and wastes credits. Fix the cause: switch the clip to the other curated model (Veo routes around fal's filter), or make the source frame less photorealistic.
|
|
3364
|
+
|
|
3326
3365
|
---
|
|
3327
3366
|
|
|
3328
3367
|
##### `tts`
|
|
@@ -3874,6 +3913,7 @@ baker canvas run ./reference-ad.video.canvas.json
|
|
|
3874
3913
|
| Flag | Default | Effect |
|
|
3875
3914
|
|---|---|---|
|
|
3876
3915
|
| `--out <path>` | `<video-dir>/<name>.video.canvas.json` | Where to write the canvas (composition is copied alongside). |
|
|
3916
|
+
| `--slug <slug>` | — | Creative slug (lowercase kebab): writes the canvas to `src/creatives/<slug>/<slug>.canvas.json` — the repo convention that attaches every run to the creative's dashboard generation history. `--out` wins over `--slug`. |
|
|
3877
3917
|
| `--frames <mode>` | `generate` | `generate` emits ONE recast keyframe per scene (the original frame is dropped so the dropped `el_*` assets drive identity); `reuse` wires the real extracted first+last frames straight into the clips (faithful, cheaper, no recast). |
|
|
3878
3918
|
| `--ambient` | off | Give silent **b-roll** scenes native diegetic ambient (Seedance `generate_audio`), mixed deep under the music bed. Talking scenes already carry voice; check levels don't muddy the mix before keeping it. |
|
|
3879
3919
|
| `--max-scenes <n>` | all source scenes | **Cost lever that reduces fidelity** — caps the deconstruct, MERGING away every scene beyond the cap (fewer cuts, lost beats). Prints a warning when set; omit it to reproduce every scene. |
|
|
@@ -3915,6 +3955,7 @@ baker canvas run ./static-ad.canvas.json
|
|
|
3915
3955
|
|---|---|---|
|
|
3916
3956
|
| `--context <text>` | — | Known provenance (advertiser, category, market) to ground the describe. |
|
|
3917
3957
|
| `--out <path>` | `<image-dir>/static-ad.canvas.json` (cwd when `<image>` is a URL) | Where to write the canvas (`prompt.json` is written alongside). |
|
|
3958
|
+
| `--slug <slug>` | — | Creative slug (lowercase kebab): writes the canvas to `src/creatives/<slug>/<slug>.canvas.json` — the repo convention that attaches every run to the creative's dashboard generation history. `--out` wins over `--slug`. |
|
|
3918
3959
|
| `--describe-model <id>` | registry default (`~google/gemini-pro-latest`) | Override the `image_describe` model. |
|
|
3919
3960
|
| `--select-model <id>` | registry default (`~google/gemini-flash-latest`) | Override the element-selection `text_generate` model. |
|
|
3920
3961
|
| `--layout-model <id>` | registry default (`~google/gemini-flash-latest`) | Override the global-layout `text_generate` model. |
|
|
@@ -4386,6 +4427,26 @@ import {
|
|
|
4386
4427
|
} from "@koda-sl/baker-cli/engine";
|
|
4387
4428
|
```
|
|
4388
4429
|
|
|
4430
|
+
## Creatives
|
|
4431
|
+
|
|
4432
|
+
Publish an approved canvas render as a first-class Baker creative. The image uploads to the Baker image library (tagged `creative`), a creative record is created/updated, and the command prints the creative reference JSON the dashboard renders in chat.
|
|
4433
|
+
|
|
4434
|
+
```bash
|
|
4435
|
+
baker creatives publish ./canvas/<run_id>/<final>.png --title "Spring Offer 4x5" \
|
|
4436
|
+
--slug spring-offer-4x5 --run-id r_01JXYZ... \
|
|
4437
|
+
--source-reference-url "https://www.facebook.com/ads/library/?id=..."
|
|
4438
|
+
```
|
|
4439
|
+
|
|
4440
|
+
| Flag | Effect |
|
|
4441
|
+
|---|---|
|
|
4442
|
+
| `--title <text>` | Required. Human title for the creative. |
|
|
4443
|
+
| `--slug <slug>` | Creative slug (`src/creatives/<slug>/`) — attaches the image to that creative's row, marks it `published`. |
|
|
4444
|
+
| `--run-id <r_…>` | Pins the approved generation from the creative's run history as the published one. |
|
|
4445
|
+
| `--source-reference-url <url>` | Original reference ad URL, recorded on the creative. |
|
|
4446
|
+
| `--context <text>` | Optional describe context for the uploaded image asset. |
|
|
4447
|
+
|
|
4448
|
+
Without `--slug` the command behaves as before (one creative record per published image). With `--slug` it upserts the repo-convention row — the same one the dashboard's Creatives tab and the `src/creatives/{slug}/` folder describe — so publish, repo sync, and run history all land on a single record regardless of order.
|
|
4449
|
+
|
|
4389
4450
|
## Help & Discovery
|
|
4390
4451
|
|
|
4391
4452
|
Every command supports `--help` for usage info:
|