@koda-sl/baker-cli 0.199.0-dev.6d2f498f5 → 0.199.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.
Files changed (28) hide show
  1. package/README.md +32 -2
  2. package/dist/{chunk-ZS6BR7CU.js → chunk-2R2DEPG7.js} +3 -3
  3. package/dist/{chunk-MMP7BRV7.js → chunk-5MPIOGRO.js} +259 -202
  4. package/dist/chunk-5MPIOGRO.js.map +1 -0
  5. package/dist/{chunk-6B5RAIAC.js → chunk-6NZG2TCM.js} +82 -4
  6. package/dist/chunk-6NZG2TCM.js.map +1 -0
  7. package/dist/{chunk-CVIGWKG2.js → chunk-KHHD26LZ.js} +3 -3
  8. package/dist/{chunk-VFRDAUQH.js → chunk-SVHFT7AN.js} +4 -4
  9. package/dist/{chunk-PGPHKRK4.js → chunk-UZYVSPCA.js} +2 -2
  10. package/dist/cli.js +5787 -5180
  11. package/dist/cli.js.map +1 -1
  12. package/dist/client-MP7BKFKM.js +15 -0
  13. package/dist/engine/index.js +3 -3
  14. package/dist/{env-S4LMU6EN.js → env-FF7ZB5W5.js} +2 -2
  15. package/dist/{output-VCUZ4EBX.js → output-YGPWST77.js} +5 -5
  16. package/dist/{shared-WG5FCIHH.js → shared-CRWB5B7P.js} +6 -6
  17. package/package.json +1 -1
  18. package/dist/chunk-6B5RAIAC.js.map +0 -1
  19. package/dist/chunk-MMP7BRV7.js.map +0 -1
  20. package/dist/client-BBH4AYOK.js +0 -15
  21. /package/dist/{chunk-ZS6BR7CU.js.map → chunk-2R2DEPG7.js.map} +0 -0
  22. /package/dist/{chunk-CVIGWKG2.js.map → chunk-KHHD26LZ.js.map} +0 -0
  23. /package/dist/{chunk-VFRDAUQH.js.map → chunk-SVHFT7AN.js.map} +0 -0
  24. /package/dist/{chunk-PGPHKRK4.js.map → chunk-UZYVSPCA.js.map} +0 -0
  25. /package/dist/{client-BBH4AYOK.js.map → client-MP7BKFKM.js.map} +0 -0
  26. /package/dist/{env-S4LMU6EN.js.map → env-FF7ZB5W5.js.map} +0 -0
  27. /package/dist/{output-VCUZ4EBX.js.map → output-YGPWST77.js.map} +0 -0
  28. /package/dist/{shared-WG5FCIHH.js.map → shared-CRWB5B7P.js.map} +0 -0
package/README.md CHANGED
@@ -781,6 +781,12 @@ baker ads meta ads --account-id act_123 --all-statuses # widen to
781
781
  baker ads meta creatives --creative-id 9988
782
782
  baker ads meta preview --creative-id 9988 --ad-format MOBILE_FEED_STANDARD --out-file /tmp/p.html
783
783
 
784
+ # "Why does it show as a still image in one placement?"
785
+ baker ads meta insights --object 9988 --level ad --intent video \
786
+ --breakdowns publisher_platform,platform_position --date-preset last_30d # one ad only: hints flag placements playing far below the ad's own rate
787
+ baker ads meta preview --creative-id 9988 --placement facebook_reels_overlay --platform facebook
788
+ baker ads meta preview --list-formats # ad_format values + placement mappings
789
+
784
790
  # "What audience is this targeting?"
785
791
  baker ads meta audiences --account-id act_123
786
792
 
@@ -851,10 +857,15 @@ creatives # list per account, or fetch single via --creative-id
851
857
  audiences # custom audiences (incl. lookalikes)
852
858
  pixels # list, or --stats for one --pixel-id (see "Restricted pixel fields")
853
859
  activities # account audit log, ~90d retention
854
- insights # see "Smart defaults" above
855
- preview # iframe HTML for a creative or ad in a given ad_format
860
+ insights # see "Smart defaults" above; a single-ad placement breakdown returns hints
861
+ # naming placements playing far below that ad's own play rate — or saying
862
+ # none is, which it never leaves unsaid
863
+ preview # iframe HTML for a creative or ad in a given ad_format, or in the
864
+ # placement an insights breakdown reported (--placement, --list-formats)
856
865
  ```
857
866
 
867
+ Placement diagnostics deliberately stop at evidence. `insights` names a suspect placement with its share of delivery, `preview` shows what Meta renders there, and neither asserts *why* — Meta documents an eligibility error for a video creative in a video-incompatible placement, not a silent fallback to the cover frame. Ad-set writes that pin placements warn about the learning-phase reset, and a placement set missing the `feed` Meta requires alongside `marketplace`/`search`/`profile_feed`/`notification` is rejected at stage time.
868
+
858
869
  The HTTP backend exposes more endpoints (catalogs, ad-studies, ad-images, labels, high-demand-periods, raw currency lookup). They're intentionally not surfaced as CLI commands because AI agents rarely need them. Hit them via curl against `/api/ads/meta/*` if needed.
859
870
 
860
871
  #### Auth + caching
@@ -1827,6 +1838,8 @@ Each external source is its own subcommand. Pick the verb that matches the sourc
1827
1838
  | `baker images delete <id>` | Delete a record | n/a |
1828
1839
  | `baker images normalize <files>` | Local recolor + bg removal + trim + resize | n/a (operates on disk, no upload) |
1829
1840
  | `baker images upscale <imageId>` | Real-ESRGAN super-resolution via backend ($0.05/image, cost-tracked) | n/a (operates on library image) |
1841
+ | `baker images layerize <imageId>` | Split into editable layers — transparent cutouts per element plus baked-in copy recovered as editable text (costs credits) | n/a (operates on library image) |
1842
+ | `baker images layers <imageId>` | Read the layers of an already-split image (free) | n/a (operates on library image) |
1830
1843
  | `baker images crop <file>` | Coordinate-based rectangular extract — local file or URL | n/a |
1831
1844
  | `baker images dimensions <file\|url>` | Read width / height / aspect / format without decoding | n/a |
1832
1845
  | `baker images download <targets>` | Remote URLs and/or library ids → local files, so the local transforms can read them | n/a (writes to disk, no upload) |
@@ -2306,6 +2319,23 @@ Validation errors return `VALIDATION_ERROR`:
2306
2319
  - Malformed `--color` (must be `#RGB` or `#RRGGBB`)
2307
2320
  - Empty file pattern or no matches
2308
2321
 
2322
+ ### `baker images layerize <imageId>`
2323
+
2324
+ Splits a library image into editable layers and waits for completion (~90s). Returns a transparent PNG per element — each at a permanent URL usable as a canvas input — plus any headline that was drawn into the picture, recovered as real copy with its font, size, weight and colour.
2325
+
2326
+ ```bash
2327
+ baker images layerize j571abc123def
2328
+ baker images layerize j571abc123def --full # geometry + typography
2329
+ baker images layerize j571abc123def --instructions "keep the bottle and its shadow together"
2330
+ baker images layerize j571abc123def --max-wait 0 # fire-and-forget
2331
+ ```
2332
+
2333
+ The model separates what was *visible* and does not repaint what sat behind a subject, so the flat picture is kept as an `Original image` layer underneath.
2334
+
2335
+ ### `baker images layers <imageId>`
2336
+
2337
+ Reads back the layers of an image already split with `layerize`. Free — no provider call. `--full` includes geometry and typography.
2338
+
2309
2339
  ### `baker images upscale <imageId>`
2310
2340
 
2311
2341
  Super-resolution via the Convex backend (Replicate, cost-tracked at $0.05/image). Operates on a library image by ID — upload the file first via `baker images upload`, then upscale.
@@ -1,10 +1,10 @@
1
1
  import {
2
2
  debugLogHttp,
3
3
  readBodyForLog
4
- } from "./chunk-PGPHKRK4.js";
4
+ } from "./chunk-UZYVSPCA.js";
5
5
  import {
6
6
  getEnv
7
- } from "./chunk-6B5RAIAC.js";
7
+ } from "./chunk-6NZG2TCM.js";
8
8
 
9
9
  // src/client.ts
10
10
  var MAX_RATE_LIMIT_RETRIES = 3;
@@ -198,4 +198,4 @@ export {
198
198
  apiGet,
199
199
  apiPost
200
200
  };
201
- //# sourceMappingURL=chunk-ZS6BR7CU.js.map
201
+ //# sourceMappingURL=chunk-2R2DEPG7.js.map