@koda-sl/baker-cli 0.347.0-dev.043fc924c → 0.348.0-dev.78a35388f

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 +25 -15
  2. package/dist/{chunk-KGDL7F7M.js → chunk-2IC3CGQO.js} +3 -3
  3. package/dist/chunk-2OKSJNLA.js +855 -0
  4. package/dist/chunk-2OKSJNLA.js.map +1 -0
  5. package/dist/{chunk-D5P4COPD.js → chunk-4QG7SF4U.js} +85 -11
  6. package/dist/chunk-4QG7SF4U.js.map +1 -0
  7. package/dist/{chunk-XPUSSDLR.js → chunk-4QXKWIFC.js} +3 -3
  8. package/dist/{chunk-JWMLQSGK.js → chunk-NA5CPMUA.js} +4 -4
  9. package/dist/{chunk-PWGY347J.js → chunk-XWHHYHKQ.js} +2 -2
  10. package/dist/cli.js +560 -784
  11. package/dist/cli.js.map +1 -1
  12. package/dist/{client-PWRZOA3Q.js → client-ODCNYCP4.js} +4 -4
  13. package/dist/engine/index.js +3 -3
  14. package/dist/{env-TQTHWLBN.js → env-BSG7TY5Y.js} +6 -2
  15. package/dist/{output-HD63GTWI.js → output-2XBCYF7L.js} +5 -5
  16. package/dist/{shared-5662SBDW.js → shared-RYAF7Y7H.js} +6 -6
  17. package/package.json +1 -1
  18. package/dist/chunk-4VP5WWPR.js +0 -376
  19. package/dist/chunk-4VP5WWPR.js.map +0 -1
  20. package/dist/chunk-D5P4COPD.js.map +0 -1
  21. /package/dist/{chunk-KGDL7F7M.js.map → chunk-2IC3CGQO.js.map} +0 -0
  22. /package/dist/{chunk-XPUSSDLR.js.map → chunk-4QXKWIFC.js.map} +0 -0
  23. /package/dist/{chunk-JWMLQSGK.js.map → chunk-NA5CPMUA.js.map} +0 -0
  24. /package/dist/{chunk-PWGY347J.js.map → chunk-XWHHYHKQ.js.map} +0 -0
  25. /package/dist/{client-PWRZOA3Q.js.map → client-ODCNYCP4.js.map} +0 -0
  26. /package/dist/{env-TQTHWLBN.js.map → env-BSG7TY5Y.js.map} +0 -0
  27. /package/dist/{output-HD63GTWI.js.map → output-2XBCYF7L.js.map} +0 -0
  28. /package/dist/{shared-5662SBDW.js.map → shared-RYAF7Y7H.js.map} +0 -0
package/README.md CHANGED
@@ -37,6 +37,8 @@ export BAKER_CHAT_ID="<chat-id>"
37
37
  ```
38
38
 
39
39
  - `BAKER_API_KEY` must start with `bk_` (or `bkr_` for the read-only credential a Session review runs with)
40
+ - A missing or malformed `BAKER_API_KEY` / `BAKER_API_URL` ends any command that talks to Baker with `NOT_CONFIGURED` (non-retryable, with a `fix`) naming the variable and the rule it broke — never its value
41
+ - A malformed `BAKER_GOOGLE_ADS_CUSTOMER_ID`, `BAKER_LINKEDIN_AD_ACCOUNT_ID` or `BAKER_X_ADS_ACCOUNT_ID` ends it with `VALIDATION_ERROR` instead, whose `fix` says to correct or unset the variable
40
42
  - `BAKER_API_URL` is your Convex site URL — the deployment the CLI talks to, not an address to show anybody
41
43
  - `BAKER_PUBLIC_API_URL` — Baker's own host for the public API (`https://api.withbaker.com`). Set for you; not one to export by hand. It is what `analytics sending-events` publishes the `POST /v1/events` contract on, so that an integration written by a client's developers never names a deployment. Where it is unset the contract falls back to `BAKER_API_URL`, which keeps the printed request runnable against a deployment that fronts itself.
42
44
  - `BAKER_GOOGLE_ADS_CUSTOMER_ID` — default Google Ads customer ID (10 digits). Used when `--customer-id` is not passed. If neither is set and the account has exactly one Google Ads customer, it is auto-selected.
@@ -302,7 +304,7 @@ Read it before interpreting any null. Field coverage is folded page by page on t
302
304
  }
303
305
  ```
304
306
 
305
- Never total or count from a response carrying it — re-run with `--all --limit 10000 --out data.csv` (the API accepts page sizes up to 10,000) and check the re-run came back without the warning. A read that returns one row by construction — `FROM customer` with no segment selected, such as `--preset account-summary` — has no page to fill, so it never carries `TRUNCATED_RESULTS`, nor `CONVERSION_MIX`, since one account-wide row has no campaigns to total or compare. Warnings reach every output format, so no `--output` choice can hide one:
307
+ Never total or count from a response carrying it — re-run with `--all --limit 8192 --out data.csv` (one read returns at most 8,192 rows; split a bigger data set into narrower queries — a shorter date range or one campaign each) and check the re-run came back without the warning. A read that returns one row by construction — `FROM customer` with no segment selected, such as `--preset account-summary` — has no page to fill, so it never carries `TRUNCATED_RESULTS`, nor `CONVERSION_MIX`, since one account-wide row has no campaigns to total or compare. Warnings reach every output format, so no `--output` choice can hide one:
306
308
 
307
309
  | `--output` | Where warnings land |
308
310
  |------------|---------------------|
@@ -341,11 +343,11 @@ The same lines also go to stderr. A read with nothing to report prints none of i
341
343
  |-----------------|--------------------------------------------------------------|
342
344
  | `--customer-id` | Google Ads customer ID (10 digits, no dashes). Falls back to `BAKER_GOOGLE_ADS_CUSTOMER_ID` env var. |
343
345
  | `--preset` | Named query template (see presets below) |
344
- | `--date-range` | Override preset date range (LAST_7_DAYS, LAST_30_DAYS, etc.) |
346
+ | `--date-range` | Override preset date range: a Google literal (LAST_7_DAYS, LAST_30_DAYS, LAST_MONTH, etc.) or `BETWEEN 'YYYY-MM-DD' AND 'YYYY-MM-DD'` — there is no LAST_90_DAYS |
345
347
  | `--include-paused` | Include paused entities in preset results. Off by default: presets return only actually-serving entities (enabled campaign **and** ad group **and** ad). Google Ads has no single serving flag, so the whole chain must be `ENABLED` for an entity to serve. |
346
- | `--limit` | Max rows per page (default 200) |
348
+ | `--limit` | Max rows per page (default 200, at most 8,192) |
347
349
  | `--cursor` | Pagination cursor from previous response |
348
- | `--all` | Auto-paginate all results. Exhausts the pages, not the statement's `LIMIT` — pair it with a `--limit` above the expected row count, and a read that still fills its cap is flagged `TRUNCATED_RESULTS` either way |
350
+ | `--all` | Auto-paginate all results. Exhausts the pages, not the statement's `LIMIT` — pair it with a `LIMIT` in the statement above the expected row count (at most 8,192 — split bigger reads into narrower queries), and a read that still fills its cap is flagged `TRUNCATED_RESULTS` either way |
349
351
  | `--out` | Write data to file (format from extension: .csv, .jsonl, .json) |
350
352
  | `--append` | Append to existing file (skip CSV headers) |
351
353
  | `--output` | Output format: `json` \| `csv` \| `jsonl` \| `md` |
@@ -389,6 +391,8 @@ The CLI rejects or automatically corrects common GAQL mistakes before hitting th
389
391
  | `shopping_performance_view.product_*` | Rewrites to `segments.product_*` | Field renamed |
390
392
  | `campaign.status = 'ACTIVE'` | Rewrites to `= 'ENABLED'` | Enum corrected |
391
393
  | `segments.conversion_action_name` with `metrics.cost_micros` | Rejects; split into separate conversion-action and spend queries | `INCOMPATIBLE_FIELDS` with `fix.action: "split_query"` |
394
+ | `DURING` with a literal Google does not accept (`LAST_90_DAYS`, `LAST_12_MONTHS`, `THIS_YEAR` …) | Rejects before any request; `DURING` takes only `TODAY`, `YESTERDAY`, `LAST_7_DAYS`, `LAST_14_DAYS`, `LAST_30_DAYS`, `LAST_BUSINESS_WEEK`, `THIS_MONTH`, `LAST_MONTH`, `THIS_WEEK_SUN_TODAY`, `THIS_WEEK_MON_TODAY`, `LAST_WEEK_SUN_SAT`, `LAST_WEEK_MON_SUN` | `INVALID_DATE_RANGE`, with `fix.correctedCommand` spelling the same window as `BETWEEN 'YYYY-MM-DD' AND 'YYYY-MM-DD'` |
395
+ | `--limit` outside 1–8,192, or a statement `LIMIT` above 8,192 | Rejects before any request — one read returns at most 8,192 rows | `VALIDATION_ERROR` naming the cap and how to split a bigger read; a statement `LIMIT` also gets `fix.correctedCommand` at `LIMIT 8192` |
392
396
  | `FROM ad_group_criterion` without `negative` field | Warns | `"ad_group_criterion returns BOTH positive and negative keywords. Use --preset positive-keywords or negative-keywords."` |
393
397
 
394
398
  Auto-fixed queries proceed normally. Warnings appear in the response:
@@ -1279,7 +1283,7 @@ baker analytics tracking --platform meta # the same for one platform, read from
1279
1283
  baker analytics map --platform google --set kw=keyword # name a parameter, seen or not yet
1280
1284
  baker analytics map --platform google --remove kw # take that answer back
1281
1285
  baker analytics conversions # what counts, what each produced, and which Forms count nothing
1282
- baker analytics conversions --candidates # everything these pages do, and which of it is counted
1286
+ baker analytics conversions --candidates --output md # everything these pages do, and which of it is counted, as tables
1283
1287
  baker analytics conversions --flow contact # one Form's endings as event keys, traffic or not
1284
1288
  baker analytics conversions --event page:request_demo --name "Demo requested"
1285
1289
  baker analytics conversions --event page:a --event submit:b --name "Lead" # both, as one number
@@ -3458,9 +3462,7 @@ baker actions update <tempId> --description "..." # a tempId from `create` in
3458
3462
  # ...folds into the staged create op — flesh out a task you just created instead of removing and recreating it
3459
3463
  baker actions complete <action-id-or-tempId> --note "What was done" # stages — applies on chat publish
3460
3464
  # --note is REQUIRED (≥20 chars): what changed, where, and the outcome. It is the durable, client-facing
3461
- # record surfaced by `baker actions log` and shown on the Task, so it is written in product terms: a note carrying
3462
- # a file path, a platform account id, an error code or a `baker` command is rejected with a VALIDATION_ERROR naming them,
3463
- # as is a missing/too-short note.
3465
+ # record surfaced by `baker actions log`. A missing/too-short note is rejected with a VALIDATION_ERROR.
3464
3466
  baker actions discard <action-id> --reason "obsolete"
3465
3467
 
3466
3468
  # Tags — taxonomy is built-in defaults + company custom tags; --tags is STRICT (unknown slugs are rejected)
@@ -3924,8 +3926,9 @@ baker canvas sync-definition src/creatives/<slug>/
3924
3926
  # 3. Inspect a finished run (per-node timing, file list, optional video thumbs)
3925
3927
  baker canvas inspect <run_id>
3926
3928
 
3927
- # 4. Discover what's available (all node types, all models, all compositions)
3928
- baker canvas catalog | jq
3929
+ # 4. Discover what's available: a one-line index of every node, then one node's full schema
3930
+ baker canvas catalog
3931
+ baker canvas catalog --node video_generate
3929
3932
 
3930
3933
  # 5. Safely edit a node's prompt without hand-jq (UTF-8 safe — use --text-file for
3931
3934
  # multi-line / accented copy; the edit is re-validated before it is written back)
@@ -5228,8 +5231,8 @@ The tables above mirror `packages/canvas-contract/src/registry.ts` at the time o
5228
5231
 
5229
5232
  ```bash
5230
5233
  baker canvas catalog | jq '.categories | keys'
5231
- baker canvas catalog | jq '.categories.image_generate[].id'
5232
- baker canvas catalog | jq '.categories.video_generate[]'
5234
+ baker canvas catalog --node image_generate | jq '.entries[0].params'
5235
+ baker canvas catalog --node video_generate | jq '.entries[0].params'
5233
5236
  ```
5234
5237
 
5235
5238
  The validator surfaces unknown models / illegal aspect ratios / out-of-range params / missing required inputs with `did_you_mean` hints **before** the run starts.
@@ -5549,11 +5552,18 @@ Resolves the run dir against `--outputs-dir` (default `./canvas`) or accepts an
5549
5552
 
5550
5553
  #### `baker canvas catalog`
5551
5554
 
5552
- Prints the agent-facing node + composition catalog as JSON Schema. Every node has `id`, `version`, `location`, `category`, `summary`, `inputs`/`params`/`outputs` schemas, `cost_estimate_credits`, `runtime_estimate_seconds`, and (when present) `when_to_use`. Grouped by `category`. The `compositions` array enumerates every `@baker/*` composition with its full `meta.json`.
5555
+ Prints the agent-facing node catalog. By default it is a compact index (a few KB): `categories` (category → node ids) and `nodes` (node id → one line), plus `hints`. Ask for full JSON Schemas by name:
5556
+
5557
+ - `--node <id>[,<id>…]` — those nodes' full entries: `id`, `version`, `location`, `category`, `summary`, `when_to_use`, `inputs`/`params`/`outputs` schemas, `cost_estimate_credits`, `runtime_estimate_seconds`.
5558
+ - `--category <name>` — narrow the index to one category; add `--full` for that category's full entries.
5559
+ - `--full` — every node's full entry (~160 KB).
5560
+
5561
+ An unknown node or category exits 1 with `{ ok: false, error: { code: "NOT_FOUND", fix } }` naming the valid ones.
5553
5562
 
5554
5563
  ```bash
5555
- baker canvas catalog | jq '.categories | keys'
5556
- baker canvas catalog | jq '.compositions[].id'
5564
+ baker canvas catalog
5565
+ baker canvas catalog --node video_generate
5566
+ baker canvas catalog --category audio --full
5557
5567
  ```
5558
5568
 
5559
5569
  ---
@@ -1,10 +1,10 @@
1
1
  import {
2
2
  ApiError,
3
3
  apiGet
4
- } from "./chunk-XPUSSDLR.js";
4
+ } from "./chunk-4QXKWIFC.js";
5
5
  import {
6
6
  getEnv
7
- } from "./chunk-4VP5WWPR.js";
7
+ } from "./chunk-2OKSJNLA.js";
8
8
 
9
9
  // src/error-handler.ts
10
10
  var REQUEST_CONNECTION_PLATFORM = {
@@ -294,4 +294,4 @@ export {
294
294
  writeAdsOutput,
295
295
  resolveCustomerId
296
296
  };
297
- //# sourceMappingURL=chunk-KGDL7F7M.js.map
297
+ //# sourceMappingURL=chunk-2IC3CGQO.js.map