@koda-sl/baker-cli 0.380.0-dev.59908a419 → 0.380.0-dev.d26778d3f

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
@@ -3495,6 +3495,8 @@ baker actions create --name "Build hero" --priority high --tags landing,creative
3495
3495
  # fuller fan-out hint: re-read the draft and merge actions that touch the same system into one.
3496
3496
  # If no --tags are passed, create emits a MISSING --tags hint — the action is invisible to the backlog's tag filter.
3497
3497
  # If no --priority is passed, create emits a MISSING --priority hint — the action ranks as normal/medium in the do-first order.
3498
+ # If the name or description holds a shell name such as /bin/bash or bash where a `$0` stood (double quotes let the
3499
+ # shell expand `$` amounts), create leads with a hint to fix it with `baker actions update <tempId>` in single quotes.
3498
3500
  baker actions update <action-id> --name "Better name" --tags google-ads,strategy # --tags REPLACES the set; '' clears
3499
3501
  baker actions update <action-id> --priority urgent # urgent|high|medium|low; 'none' clears
3500
3502
  baker actions update <tempId> --description "..." # a tempId from `create` in THIS chat edits the still-staged task in place
@@ -3711,11 +3713,11 @@ baker shopify best-sellers --view repeat # what sells (--view products
3711
3713
  baker shopify segments # best, loyal, at risk, new, one-time, with this store's own rules
3712
3714
  baker shopify cohorts --months 12 # buyers by first-order month: who came back, spend per buyer
3713
3715
  baker shopify promotions <id|handle|link> # what advertises a product: ads (via page, buy link, landing), landings, Shopping
3714
- baker shopify stock-holds --product <id> # ads Baker paused because the product ran out, each with a resume verdict
3716
+ baker shopify stock-holds --product <id> # ads Baker paused because the product ran out: what to resume, and what to tell the user
3715
3717
  ```
3716
3718
 
3717
3719
  **`meta.store`** is on every answer: `connection` (`connected` · `needs_reconnect` · `disconnected`), `catalog` (`starting` · `importing` · `ready` · `failed`, with `importProgress` while importing), `unreadable` (products Baker couldn't read; `unreadableCapped` past 100), `checksFailing` (Baker couldn't check the store for changes lately), `storefront` (`online_store`, or `own` for a store that sells through its own site) and `lastActivity` (when Baker last heard from the store — not a promise the copy is current). `hints[]` turn each of these into what to tell the user.
3718
- **`store`:** `--full` adds the admin link and every country. `capped: true` means a count stopped at its ceiling — `outOfStock` and `partlyOut` at 100, `collections` at 500 — so that count reads "that many or more"; a hint says which.
3720
+ **`store`:** `--full` adds the admin link and every country. `canChange` (`products`, `publishing`, `discounts`, `redirects`, `marketing`) says which kinds of store change the store allows Baker to stage; a `false` one is allowed by the user in Shopify. `capped: true` means a count stopped at its ceiling — `outOfStock` and `partlyOut` at 100, `collections` at 500 — so that count reads "that many or more"; a hint says which.
3719
3721
  **`products`:** `--search <words>`, `--collection <handle|id>`, `--stock`, `--limit <1-100>`, `--cursor`; `--full` adds vendor, type, option count, photo link, visibility and status. Every price, here and in `product` (`price`, `compareAt`, each option's price, `pricesByCountry`), is one string with its currency beside each amount: `"USD 785.95"`, `"USD 9.95 – USD 49.95"`. A row's `availability` is absent when the product is on the store, `link_only` when it is buyable only through its link, `not_for_sale` (with `status`) when it can't be bought on the online store.
3720
3722
  **`product`:** positional `<ref>` — the numeric id, the handle, a store product link (`…/products/<handle>`, even an all-digit handle), a Baker Products link, a Shopify admin product link (`admin.shopify.com/store/<shop>/products/<n>`), or `gid://shopify/Product/<n>`. Returns options (50 per page, `--variants-cursor` for more; 250 with `--full`), `outOptions` (up to 50, `outOptionsMore` for the rest), `pricesByCountry` when the store sells at more than one price, `photos[]` (`imageId` + a Baker-hosted `url`, never a Shopify link), `url` (the product's page in Baker) and `storeUrl` (the product's page on the store — never a buy button's link). `--full` adds the whole description, SEO, category, the admin link and each option's SKU, barcode, feed id and prices by country. `NOT_FOUND` carries a hint to search instead.
3721
3723
 
@@ -3735,14 +3737,52 @@ baker shopify stock-holds --product <id> # ads Baker paused because th
3735
3737
  - **`cohorts`:** `--months <3-36>` (default 12); retention at months 1, 2, 3, 6, 12 and net per buyer by month 12 (`--full`: every month).
3736
3738
  - **`segments`:** each segment's buyers, share, net, average orders, days since the last order, top countries and first products, and its rule in this store's numbers.
3737
3739
 
3738
- **`promotions`:** positional `<ref>` like `product`. Reads the product, scans this workspace's `src/pages/*` (import graph, ≤ 300 pages, files ≤ 256 KB) for its buy link, `/products/<handle>` or an option id, then `POST /api/shopify/promotions` with the linked landings. `data.ads[]` (`platform`, `level` ad|asset_group, `name`, `campaign`, `status` active|paused, `via` product_page|buy_link|landing), `data.landings[]` (`published`, `via` links_to_product|visitors_went_on), `data.shopping[]`, `data.catalog_ads`, `data.checked` (`not_checked` names a platform it could not read), `data.remembered` (the read carried a Session and named an ad — only then can “Restart ads when a product is back” later stage turning a pause from it back on, for review). `--full` adds ids, accounts, campaign / ad group / ad set ids, the Google `resource` and the URL.
3740
+ **`promotions`:** positional `<ref>` like `product`. Reads the product, scans this workspace's `src/pages/*` (import graph, ≤ 300 pages, files ≤ 256 KB) for its buy link, `/products/<handle>` or an option id, then `POST /api/shopify/promotions` with the linked landings. `data.ads[]` (`platform`, `level` ad|asset_group, `name`, `campaign`, `status` active|paused, `via` product_page|buy_link|landing), `data.landings[]` (`published`, `via` links_to_product|visitors_went_on), `data.shopping[]`, `data.catalog_ads`, `data.checked` (`not_checked` names a platform it could not read). A read made outside a Session says so in `hints`: only a read that carried a Session and named an ad lets “Restart ads when a product is back” later stage turning a pause from it back on, for review. `--full` adds ids, accounts, campaign / ad group / ad set ids, the Google `resource`, the URL and `data.remembered`.
3739
3741
 
3740
- **`stock-holds`:** `--product <ref>`, `--all` (resolved holds too). `data.holds[]` — one per paused entity and product, with `verdict` (`resumable` · `still_out_of_stock` · `changed_since` · `already_active` · `still_promotes_out_of_stock` · `cannot_confirm`) read live from the ad platform; `data.pending_sessions[]` — out-of-stock work still waiting for review that would pause this product's ads; `data.recently_closed[]` — with `--product`, each ad whose pause for it was turned back on or let go in the last 30 days, once, with how its latest pause closed (`resolved_reason`) and when (`closed_at`).
3742
+ **`stock-holds`:** `--product <ref>`, `--all` (resolved holds too). Compact: `data.resume[]` — the one command to stage per ad Baker may turn back on now (`{ ad, command }`); `data.tell_user[]` — one sentence per ad, and per piece of out-of-stock work still waiting for review, written for the marketer; `data.pages[]` — landings the out-of-stock run changed, with the `baker chats diff … --surface landings` read of those changes. With `--product` it speaks only of that product's ads, including the ones Baker did not pause when it ran out. `--full` adds the codes behind each sentence: `holds[]` with each `verdict` read live from the ad platform, `pending_sessions[]`, `recently_closed[]`, `not_paused[]`, `pages_changed[]`.
3741
3743
 
3742
3744
  **Refusals:** `NO_SHOPIFY_CONNECTION` — no store is connected; `error.fix.action` is `request_connection` (`{ platform: "shopify" }`). `SHOPIFY_NOT_AVAILABLE` — Shopify can't be connected on this Baker yet; `error.fix.action` is `continue_without`. Both exit 1.
3743
3745
 
3744
3746
  ---
3745
3747
 
3748
+ ### `baker shopify change | draft | changes | undo | tracking`
3749
+
3750
+ **Changes to the connected store, staged on the Session (`BAKER_CHAT_ID`)** and made only when the user publishes it — reviewed first in the chat's Store tab. Nothing here calls Shopify to change anything mid-Session; every applied change can be put back by `undo`, through another publish.
3751
+
3752
+ ```bash
3753
+ baker shopify change product update the-snowboard --title "The Snowboard" --seo-title "…" --add-tags summer
3754
+ baker shopify change variant update 456 --sku SNOW-L --barcode 4006381333931 --weight 1.5 --weight-unit kg # kg, g, lb or oz
3755
+ baker shopify change variant update 456 --price 18.95 --sale-price none # money: the user says yes first
3756
+ baker shopify change field set product:the-snowboard custom.care --value "Hand wash"
3757
+ baker shopify change collection create --title "Summer boards" --products a,b # shown on the online store unless --hidden
3758
+ baker shopify change collection hide summer-boards # also update, show, delete, add, remove
3759
+ baker shopify change discount create --code SPRING10 --percent 10 --ends <iso> # money
3760
+ baker shopify change discount stop SPRING10 # money
3761
+ baker shopify change discount dates SPRING10 --starts <iso> --ends never # money
3762
+ baker shopify change redirect create --from /old --to /new
3763
+ baker shopify change redirect remove /old
3764
+ baker shopify change campaign add --platform google-ads --account … --campaign … # show a Baker campaign in Shopify Marketing
3765
+ baker shopify change measurement reconnect # the fix `tracking audit` names
3766
+ baker shopify change product update --json '[{"kind":"shopify.product.update","target":"<handle>","payload":{"addTags":["summer"]}}, …]'
3767
+ baker shopify draft list # also show <ref>, remove <ref>, clear
3768
+ baker shopify draft amend <ref> --patch '{…}'
3769
+ baker shopify changes --limit 20 # applied changes, each with its changeId
3770
+ baker shopify undo <changeId>… # stage putting them back, as one batch
3771
+ baker shopify tracking audit # read-only: is the store's tracking right?
3772
+ ```
3773
+
3774
+ **Money.** A price, a sale price or a discount code changes money: the first call exits 1 with `NEEDS_USER_APPROVAL` and `error.fix.askUserQuestion` — the exact question to ask with AskUserQuestion. When the user answers "Yes, make these changes", run the same command again; a declined one is refused, still carrying the question in case the user asks for it again later. `amend` of a price asks again, and publish refuses any money change whose lines are not the approved ones.
3775
+
3776
+ **Stage-time checks.** Each change is read against the live store when it is staged (the "before" the Store tab shows), checked, and refused with a reason the agent can act on — a collection whose undo could not rebuild it (rules, an image, custom fields, a discount or menu pointing at it), descriptions with scripts or frames, unknown products. Publish re-reads each target first: a change made in Shopify since staging is not overwritten; the op is marked failed with why. Up to 100 changes per call, 250 per Session.
3777
+
3778
+ **Undo.** `changes` lists what Baker applied (`changeId`, `undoable`, why not). `undo` stages the inverses in one batch, read from the store as it was before each change; a money undo asks once for all its lines. A deleted collection comes back with the same address, content and products (as a new collection).
3779
+
3780
+ **`tracking audit`:** reads only. `data.checks[]` (`measurement`, `theme_switch`, `visitor_on_orders`, `sales_reporting`, `consent`, `storefront`) each with a `status` and a `fix` that is `staged` (a command to stage), `merchant` (something the user does in Shopify) or `decision` (a choice only the user makes).
3781
+
3782
+ **Refusals:** `SHOPIFY_PERMISSION_NEEDED` — the store has not allowed this kind of change yet; `error.fix.action` is `request_connection` (`{ platform: "shopify", reason }`) and the user allows it in Shopify. `NEEDS_USER_APPROVAL` — the money answer: `fix.action` `ask_user` with the question, or `continue_without` after a no. A payload with a key its kind doesn't take (`--json`, `draft amend --patch`) is refused naming the keys it takes. All exit 1.
3783
+
3784
+ ---
3785
+
3746
3786
  ### `baker chats list | view | transcript | diff`
3747
3787
 
3748
3788
  Read-only inspection of **other Sessions (chats) on the same account** — so an agent can reuse prior work ("like we did in that other chat, but for X"). Same-account only; never crosses a company boundary and has no write surface.