@koda-sl/baker-cli 0.306.0-dev.2b6124eb2 → 0.306.0-dev.bb28562ac

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
@@ -1268,6 +1268,9 @@ baker analytics conversions --event page:a --count-mode every_time # re
1268
1268
  baker analytics conversions --rename "Lead form" --to "Lead" # merge two into one row
1269
1269
  baker analytics conversions --remove page:request_demo
1270
1270
  baker analytics conversions --remove-name "Lead"
1271
+ baker analytics sites # the websites the measurement tag is accepted from
1272
+ baker analytics sites --add example.com # and every subdomain of it — applies at once, no publish
1273
+ baker analytics website-tag # the tag for a site Baker does not publish, with the key in it
1271
1274
  baker analytics delivery --page 2 # the next page of a long list
1272
1275
  baker analytics submissions --flow contact # every attempt at a Form, delivered or not
1273
1276
  ```
@@ -1280,6 +1283,13 @@ Shared flags: `--days <n>` (default 30) or `--start-date` / `--end-date` (`YYYY-
1280
1283
  - The `sparkline` on `landings` is dropped unless `--full`, and resampled to 30 points when present. It is bucketed by `--granularity` upstream, so ninety days at `hour` is 2,160 numbers per page.
1281
1284
  - Past ~25 rows the response carries a hint naming the row count and pointing at `--output md`.
1282
1285
 
1286
+ **Measuring a website Baker does not publish.** `baker analytics website-tag` returns the tag with this company's site key in it, the websites it is accepted from, and the whole install as Markdown. Two things decide whether it does anything:
1287
+
1288
+ - **`baker analytics sites` first.** The key is public and is **silently ignored** from any origin not on the declared list, so a tag on an undeclared website is a perfect install that measures nothing, with no failing request anywhere. `--add` / `--remove` are repeatable, apply immediately, need no publish, and a tag already installed starts being accepted at once. Declare the **domain**, not the subdomain you happen to be installing on: one entry covers everything under it (`example.com` answers for `www.`, `go.` and `shop.eu.`) and it never widens upward. The response also carries `suggestedOrigins` — domains Baker already serves this company's landings on that nothing covers yet.
1289
+ - **The snippet is two scripts and both are required.** The first creates `window.baker` synchronously and queues calls; the second is the tag, which is async. Paste only the second and any outcome reported before it finishes loading reaches nothing — which on a thank-you page is the normal case. For the same reason, never guard a call with `if (!window.baker) return`: on the fastest pages that is always true, and it throws the conversion away with no error anywhere. Call `window.baker.track(…)` directly.
1290
+
1291
+ `--measure` decides whose activity is measured and defaults to `campaigns` (only visitors a Baker landing brought). `--measure all` measures the client's entire website and is a decision somebody has to ask for. `host` is the client's own landing domain when one shares a domain with the site being measured, so the script and its events stay first-party; `firstParty` in the response says which, and removing that domain from Baker means re-running this command.
1292
+
1283
1293
  **Paging the list reports.** `people`, `submissions` and `delivery` are lists of individual things rather than breakdowns — `delivery` and `submissions` are the ones the CLI exposes, `people` backs the People section of the dashboard's landing Analytics screen over the same wire — and only they take `--page <n>` (1-based) and `--page-size <n>` (up to 200, default 50). The response carries `pageInfo` with `hasMore` — when it is true there **are** more rows, so a total must never be reported from one page. Pass neither flag and a list comes back at the size it always did.
1284
1294
 
1285
1295
  **A conversion is a company-level named event, not a property of a Form.** `baker analytics conversions` is the only place "what counts" is decided, and an empty `definitions` list means every conversion number in every other report is zero — not because nobody converted, but because nothing is named as an outcome and Baker never guesses which event is the point of a page. `--candidates` lists every event these pages actually produced — each Form step and trigger, every `data-baker-*` event, every outbound destination — with volume and whether it is already counted; that list is where an event key comes from, so never invent one. `--event <key> --name "Booked a call"` starts counting it **immediately and retroactively**: the whole stored history is rescored, so naming the right event today also fixes last month. Nothing here is staged and publishing is not involved. Two events given the same `--name` become one row and one number, which is how a call booked on three different Forms reads as one outcome. `--count-mode every_time` is for the outcomes people genuinely repeat (a guide downloaded twice is two downloads); the default counts once per visit.
@@ -2132,6 +2142,7 @@ Each external source is its own subcommand. Pick the verb that matches the sourc
2132
2142
  | `baker images get <id>` | Single record | n/a |
2133
2143
  | `baker images upload <file\|url>` | Upload a local file OR remote URL to the library | always on |
2134
2144
  | `baker images delete <id>` | Delete a record | n/a |
2145
+ | `baker images describe <id>` | Correct a record's stored name / description / tags | n/a |
2135
2146
  | `baker images normalize <files>` | Local recolor + bg removal + trim + resize | n/a (operates on disk, no upload) |
2136
2147
  | `baker images upscale <imageId>` | Real-ESRGAN super-resolution via backend ($0.05/image, cost-tracked) | n/a (operates on library image) |
2137
2148
  | `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) |
@@ -2572,6 +2583,20 @@ baker images delete j571abc123def --dry-run
2572
2583
  baker images delete j571abc123def
2573
2584
  ```
2574
2585
 
2586
+ ### `baker images describe <id>`
2587
+
2588
+ Correct what the library says an image is. The stored `description` is what `baker images library` retrieves on, so an AI description that came out wrong is what makes an asset unfindable — this is the fix, rather than another query.
2589
+
2590
+ Only the flags you pass change; everything else keeps its current value. `--tags` **replaces** the whole tag set rather than adding to it, so read the current one with `baker images get <id>` first if you mean to extend it. It is repeatable (`--tags a --tags b`) as well as comma-separated — both spellings keep every value.
2591
+
2592
+ ```bash
2593
+ baker images describe j571abc123def --description "Founder on stage at SaaStr, blue backdrop, mid-gesture"
2594
+ baker images describe j571abc123def --name "SaaStr keynote" --tags event,team
2595
+ baker images describe j571abc123def --description "…" --full # also returns the whole library row
2596
+ ```
2597
+
2598
+ The semantic index rebuilds in the background, so a `library` search run immediately afterwards may still rank on the old wording. The response says so in `hints`.
2599
+
2575
2600
  ### `baker images normalize <files> [options]`
2576
2601
 
2577
2602
  Local-file image normalization for logos and brand assets. Declarative — describe the desired final state via flags and the pipeline runs the needed stages in order. Operates on files in the sandbox; pair with `baker images upload` to ship results to the library. For super-resolution, upload first then use `baker images upscale <imageId>` (runs on the Convex backend, cost-tracked).
@@ -2838,6 +2863,15 @@ Requires `yt-dlp` on `PATH` (present in the Baker Runtime). Private, age-restric
2838
2863
 
2839
2864
  Delete a video by ID.
2840
2865
 
2866
+ ### `baker videos describe <id>`
2867
+
2868
+ The same correction for a clip: fix the stored `name`, `description` or `tags` when the analysis read the video wrong. Only the flags you pass change, `--tags` replaces the whole set, and the search index rebuilds in the background.
2869
+
2870
+ ```bash
2871
+ baker videos describe j571abc123def --description "Customer explaining how onboarding cut setup from a week to a day"
2872
+ baker videos describe j571abc123def --tags testimonial
2873
+ ```
2874
+
2841
2875
  ### `baker videos tags`
2842
2876
 
2843
2877
  List the available video tag names — built-in defaults plus the company's custom tags — straight from the backend. Use it before filtering with `--tags`. Defaults to a markdown list (`--output json` for the `{ ok, data }` envelope).
@@ -3221,6 +3255,7 @@ baker tags draft # review the staged changes awaiting publish
3221
3255
 
3222
3256
  Notes:
3223
3257
 
3258
+ - **Both reads restate the write path, on stderr.** `list` and `draft` end with the two lines that say the approval form is the only way to change a tag, that it rides on every turn, and that a tag change is never a Task. They are there because a chat concluded from its tool list alone that the form did not exist, never called it, and filed the change as a Task for the user to carry out by hand. stdout stays the list, so piping it is unaffected; `--json` carries the same lines in the envelope's `hints`.
3224
3259
  - **`list` prints each tag's full readable config.** Every non-secret field is shown in full under the tag — the Clarity `projectId`, GA4 `measurementId`, the entire custom `code` snippet, etc. — so the agent reuses a stored value to pre-fill a follow-up change instead of asking the user for something already installed. Secrets are never among these fields. (`--json` emits the same data as the raw envelope.)
3225
3260
  - **Secrets never travel through this CLI or the chat.** Secret fields (`accessToken`, `apiSecret`, `authorizationToken`, `apiKey`, `conversionToken`, `oauthProviderId`) are entered only in the dashboard's secure tag form and flow straight into the staged draft; tool responses only ever name which secret fields are set/pending.
3226
3261
  - Staged creates get a server-generated `tag_temp_*` ref (returned in the tool result and printed by `list`). Use it (or a real tag id) as flow side-effect `tagIds` — the published tag keeps resolving under the temp ref.
@@ -6052,6 +6087,9 @@ This CLI is designed for AI agent consumption. Key patterns:
6052
6087
  - **0.259.0**: `baker canvas scaffold-ad` is listed in `baker canvas --help` with a description, and the three video routes are separated in the skill. It had a usage line and no description row, so an agent reading help saw two scaffolders explained and a bare name — and three runs from the same prompt took three different wrong paths: hand-directing the flow, reproducing a competitor ad found via `winning-ads`, and hand-authoring a canvas. The routes now state their own boundary: `scaffold-ad` is the default for a new ad, `scaffold-video` only reproduces a video the USER supplied, and `video-flow.md` opens by saying so rather than calling itself the default eleven times.
6053
6088
  - **0.257.0**: the frame-vision pass now asks whether what is on screen could physically happen, not just whether the frame is empty. The defect that motivated it was a generated shot of a solar panel roughly five metres tall being lifted onto a roof by one person — well lit, on brief, perfectly legible, and impossible. That is what reads loudest as "AI-generated", and the previous question could not see it: nothing was missing, something present was the wrong size. Asked the new question, the pass called the rejected shot *"physically implausible due to the immense weight and surface area"* and the replacement *"consistent with what two people could reasonably maneuver"* — the same verdict a person reached, unprompted.
6054
6089
  - **0.256.0**: the pre-render gate reports caption cards that end mid-clause. The first cut of this check asked for consistency and got it the wrong way round — stripping terminal punctuation makes the cards agree and leaves them wrong, because "En solo nueve días tu casa" is not a line anyone wrote, it is a sentence halved by a word count. Captions split where the script punctuates; each card is then a clause carrying its own mark, grammatical, and consistent as a by-product. The last card is exempt, since a CTA legitimately ends bare. Reported, never rewritten — the copy belongs to whoever wrote it.
6090
+ - **0.297.0**: `baker images describe <id>` and `baker videos describe <id>` correct a library asset's stored `name`, `description` or `tags`. Until now `--context` at ingest time was the only way to influence a description, so an AI description that came out wrong was unfixable by an agent — and that description is what every `baker images library` / `baker videos search` retrieves on, which made the asset quietly unfindable rather than merely mislabelled. Only the flags passed are changed; the rest keep their stored values, because the dashboard's editor always has all three in a form and an agent fixing one sentence does not. `--tags` replaces the whole set (as the dashboard's does) and is repeatable as well as comma-separated, via the shared `repeatedFlags` helper — read off `rawArgs` because citty collapses a repeated flag to its last value, which on a wholesale-replace write deletes the rest. Compact by default; `--full` returns the whole library row in the same round trip. Both re-index in the background, so the response hints that an immediate re-search may still rank on the old wording. A row that is still being analysed is refused with `CONFLICT` rather than written: the describe pass overwrites `name`/`description`/`tags` with the model's own output when it lands, so a correction made in that window disappeared minutes after the CLI reported success. The dashboard never hit it because a non-ready card is not clickable; the agent's door had no such gate. An `error` row stays writable — nothing is scheduled against it.
6091
+
6092
+ ## Publishing
6055
6093
 
6056
6094
  ### Auto-publish (CI)
6057
6095
 
@@ -6104,7 +6142,7 @@ Pushing to `main` with changes in `packages/cli/` triggers the GitHub Actions wo
6104
6142
 
6105
6143
  - **0.291.0**: **the image handover Task no longer depends on having uploaded the images.** It was built only from staged `asset.create` image ops, so a Session that audited a live account — found the brand campaign carrying 22 image extensions and the generic one carrying none, and reached for `assets attach` on assets that were *already in the library* — got Google's refusal and nothing else: no upload to hang a Task on, and a CLI hint telling the agent not to raise one by hand because "Baker stages it itself". The one step only the user can take reached them as a sentence in a chat that scrolls away. An image `assets attach` is now **skipped rather than refused**: it still never reaches Google (re-verified live with `validate_only` on v23 *and* v25 against 3865083115, against a control op that validates clean in the same request — `AD_IMAGE` → `UNSUPPORTED_FIELD_TYPE` at customer and campaign level, `MARKETING_IMAGE` → `FIELD_TYPE_INCOMPATIBLE_WITH_CAMPAIGN_TYPE`, `BUSINESS_LOGO` → `CUSTOMER_NOT_VERIFIED`, which is what proves the field type is the objection; **we are not on Google's allowlist for it**), but the skip carries the image and campaign names, recorded on the draft so the next staged op cannot recompute the Task away, and a batch that also carries sitelinks keeps them instead of failing whole. The schema stopped refusing the field type for the same reason: a boundary refusal has no chat to record a handover against.
6106
6144
 
6107
- - **0.306.0**: review fixes across the avatar and ad paths. **A silent clip is 5 seconds again** — the 8s speaking floor was applied to every `studio animate` call, not just ones that cast an avatar, so plain b-roll was lengthened by three seconds and billed for them. **`scaffold-ad` validates the mark it will actually draw**: the logo gates read the path the spec named rather than the one `fetchClientLogo` had just put there, so a fetched mark either skipped both checks or was refused as unreadable. **The render review is told where the ad is set, who it is for and what the script says** — read off the blueprint beside the canvas; without them the watch pass judged an accent against nothing and still graded the verdict as blocking. **A beat is "too short" by its LINE, not by the clip floor** — the old test needed a 25-word clause, so it fired on all three beats of this command's own documented example. `--voice-id` / `--voice-description` are gone from `baker avatars create` (0.252.0 said so; the flags were still declared and still sent), `end_card.cta` is documented as having no default, and the dead Veo/Omni content-block fallbacks are removed.
6145
+ - **0.306.0**: review fixes across the avatar and ad paths. **A silent clip is 5 seconds again** — the 8s speaking floor was applied to every `studio animate` call, not just ones that cast an avatar, so plain b-roll was lengthened by three seconds and billed for them. **`scaffold-ad` validates the mark it will actually draw**: the logo gates read the path the spec named rather than the one `fetchClientLogo` had just put there, so a fetched mark either skipped both checks or was refused as unreadable. **The render review is told where the ad is set, who it is for and what the script says** — read off the blueprint beside the canvas; without them the watch pass judged an accent against nothing and still graded the verdict as blocking. **A beat is "too short" by its LINE, not by the clip floor** — the old test needed a 25-word clause, so it fired on all three beats of this command's own documented example. **A voiceover stays a voiceover** — a phrase nobody is shown speaking was being folded into the presenter's clip and said on camera, words that shot was never generated for; the fold now applies only where there is a mouth for the words to contradict. `--voice-id` / `--voice-description` are gone from `baker avatars create` (0.252.0 said so; the flags were still declared and still sent), `end_card.cta` is documented as having no default, and the dead Veo/Omni content-block fallbacks are removed.
6108
6146
 
6109
6147
  ### Testing a pre-release in sandboxes
6110
6148
 
@@ -17,9 +17,9 @@ import {
17
17
  shouldEscalate
18
18
  } from "./chunk-WFWU3CHS.js";
19
19
 
20
- // ../../.pnpm-store/v10/links/@/safe-stable-stringify/2.5.0/509a695c9237c6e3727f1f1f99169917f329e3ff3f7877be290b684e24bf153d/node_modules/safe-stable-stringify/index.js
20
+ // ../../.pnpm-store/v10/links/@/safe-stable-stringify/2.5.0/766ad107c42df28eeadaf0ac2f9089c8a9e200f6ba0b2b1a817b8d536cbdcc49/node_modules/safe-stable-stringify/index.js
21
21
  var require_safe_stable_stringify = __commonJS({
22
- "../../.pnpm-store/v10/links/@/safe-stable-stringify/2.5.0/509a695c9237c6e3727f1f1f99169917f329e3ff3f7877be290b684e24bf153d/node_modules/safe-stable-stringify/index.js"(exports, module) {
22
+ "../../.pnpm-store/v10/links/@/safe-stable-stringify/2.5.0/766ad107c42df28eeadaf0ac2f9089c8a9e200f6ba0b2b1a817b8d536cbdcc49/node_modules/safe-stable-stringify/index.js"(exports, module) {
23
23
  "use strict";
24
24
  var { hasOwnProperty } = Object.prototype;
25
25
  var stringify = configure2();
@@ -1111,7 +1111,7 @@ function resolveAdaptFormats(params) {
1111
1111
  return params.formats ?? [];
1112
1112
  }
1113
1113
 
1114
- // ../../.pnpm-store/v10/links/@/safe-stable-stringify/2.5.0/509a695c9237c6e3727f1f1f99169917f329e3ff3f7877be290b684e24bf153d/node_modules/safe-stable-stringify/esm/wrapper.js
1114
+ // ../../.pnpm-store/v10/links/@/safe-stable-stringify/2.5.0/766ad107c42df28eeadaf0ac2f9089c8a9e200f6ba0b2b1a817b8d536cbdcc49/node_modules/safe-stable-stringify/esm/wrapper.js
1115
1115
  var import__ = __toESM(require_safe_stable_stringify(), 1);
1116
1116
  var configure = import__.default.configure;
1117
1117
  var wrapper_default = import__.default;
@@ -9662,4 +9662,4 @@ export {
9662
9662
  defaultRegistry,
9663
9663
  createEngineFromEnv
9664
9664
  };
9665
- //# sourceMappingURL=chunk-UBNLCVGN.js.map
9665
+ //# sourceMappingURL=chunk-3TEVIAAV.js.map