sbuilder-mcp 0.2.2 → 0.3.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.
package/CHANGELOG.md CHANGED
@@ -6,6 +6,28 @@ All notable changes to this project are documented in this file.
6
6
  The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/),
7
7
  and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
8
8
 
9
+ ## [0.3.0] - 2026-09-08
10
+
11
+ ### Added
12
+ - sb_event authors a click action on any node (such as open_cart), with an allow-list per element read from the catalog; a purchase action is refused here and pointed at sb_bind instead of being silently accepted and doing nothing.
13
+ - sb_bind takes action, so a purchase control can be authored at all: the binding writes the reserved id bind-product-action and stores buy_now as the document's own dynamic_checkout, which is what the renderer reads to decide a button is a purchase button.
14
+ - sb_outline lists satellite nodes (an accordion item's skin, a tab's shared button, a quantity stepper's buttons and input, a repeater's empty state) under their owner as satellite: "<config key>", so a node that used to be invisible to every tool is now on the map; it is not counted in children.
15
+ - sb_review reports accountPage and searchPage gaps when a store has no page for the fixed /account or /search paths, alongside the existing checkout/gateway/product/shipping/cartTrigger gaps.
16
+ - The install CLI accepts --site (and refuses any unrecognized flag instead of silently ignoring it), writing SB_SITE so every site_id argument falls back to it through siteFor().
17
+ - A 204 response (such as a page delete) now reports what it did instead of answering null.
18
+
19
+ ### Changed
20
+ - sb_look walks the full page before shooting a fullPage screenshot, so a lazy-loaded image below the fold is no longer photographed as an empty box.
21
+ - sb_review no longer reports empty_container for a bound media-dataset, which paints the record itself and needs no children; and no longer reports off_canvas for nodes inside the cart drawer, which is parked off-screen until a shopper opens it.
22
+ - sb_add's dataset elements (list-dataset, dataset-block, media-dataset, collection-media, product-variants, quantity-dataset, and others) now derive their bindings from the config.datasetSource supplied in the same call, instead of always seeding the element's default source; sb_set repairs a mismatched binding the same way.
23
+ - sb_site_list's error message no longer tells a key-only install to call sb_connect first, since listing sites is an account-only call a key deliberately cannot make.
24
+ - sb_api_call's error for a missing path parameter now says it belongs in path_params instead of naming the parameter without saying where it goes.
25
+ - sb_media_upload now retries on the partner upload endpoint before reporting the key's scopes as the problem, since a deployment that has not yet enabled key uploads on the primary endpoint otherwise blames a valid key.
26
+ - The API catalog is regenerated: 456 operations and 99 definitions (up from 412 and 97), recovering 44 previously-undocumented operations including the payment-gateway read/write endpoints; the element catalog grows to 107 with the addition of order-receipt.
27
+
28
+ ### Fixed
29
+ - Saving an edit to a shared global section or an overlay (the cart drawer, a global header or footer) no longer silently drops every edit after the first one in a session; the save now re-stamps each master's revision from the platform's response instead of replaying a stale one that the platform rejects with a 200.
30
+
9
31
  ## [0.2.2] - 2026-09-07
10
32
 
11
33
  ### Fixed
package/CHANGELOG.vi.md CHANGED
@@ -6,6 +6,28 @@ Mọi thay đổi đáng chú ý của dự án được ghi lại trong file n
6
6
  Định dạng dựa trên [Keep a Changelog](https://keepachangelog.com/en/1.1.0/),
7
7
  và dự án tuân theo [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
8
8
 
9
+ ## [0.3.0] - 2026-09-08
10
+
11
+ ### Added
12
+ - sb_event giờ có thể gán một click action lên bất kỳ node nào (như open_cart), với danh sách hành động hợp lệ cho từng element đọc từ catalog; một hành động mua hàng bị từ chối ở đây và được chỉ sang sb_bind thay vì âm thầm chấp nhận mà không làm gì.
13
+ - sb_bind nhận tham số action, nên giờ đã có thể tạo được nút mua hàng: binding ghi id cố định bind-product-action và lưu buy_now dưới dạng dynamic_checkout của chính document — đây là thứ mà renderer đọc để quyết định một nút có phải nút mua hàng hay không.
14
+ - sb_outline giờ liệt kê các node vệ tinh (skin của một mục accordion, nút dùng chung của tab, các nút và ô nhập của quantity stepper, trạng thái rỗng của một repeater) dưới owner của chúng dưới dạng satellite: "<config key>" — một loại node trước đây vô hình với mọi tool giờ đã có mặt trên bản đồ; nó không được tính vào children.
15
+ - sb_review giờ báo cáo gap accountPage và searchPage khi cửa hàng chưa có trang cho đường dẫn cố định /account hoặc /search, bên cạnh các gap checkout/gateway/product/shipping/cartTrigger đã có.
16
+ - CLI cài đặt giờ nhận --site (và từ chối mọi flag không nhận diện được thay vì âm thầm bỏ qua), ghi SB_SITE để mọi tham số site_id fallback về giá trị này qua siteFor().
17
+ - Một response 204 (như xóa trang) giờ báo cáo đã làm gì thay vì trả về null.
18
+
19
+ ### Changed
20
+ - sb_look giờ duyệt qua toàn bộ trang trước khi chụp ảnh fullPage, nên một ảnh lazy-load dưới màn hình không còn bị chụp thành hộp trống.
21
+ - sb_review không còn báo cáo empty_container cho một media-dataset đã bind, vì element này tự vẽ record và không cần child; cũng không còn báo off_canvas cho các node bên trong cart drawer, vốn nằm ngoài màn hình cho tới khi shopper mở nó ra.
22
+ - Các dataset element của sb_add (list-dataset, dataset-block, media-dataset, collection-media, product-variants, quantity-dataset, và các loại khác) giờ tính binding dựa trên config.datasetSource được truyền trong cùng lời gọi, thay vì luôn seed theo nguồn mặc định của element; sb_set sửa một binding sai lệch theo cùng cách.
23
+ - Thông báo lỗi của sb_site_list không còn bảo một cài đặt chỉ dùng key phải gọi sb_connect trước, vì liệt kê site là một lời gọi cấp tài khoản mà key không thể thực hiện được.
24
+ - Lỗi của sb_api_call khi thiếu path parameter giờ nói rõ tham số đó thuộc path_params thay vì chỉ nêu tên tham số mà không nói nó nằm ở đâu.
25
+ - sb_media_upload giờ thử lại trên endpoint upload phía đối tác trước khi báo lỗi do quyền của key, vì một bản triển khai chưa bật upload bằng key trên endpoint chính trước đây sẽ đổ lỗi sai cho một key hợp lệ.
26
+ - Catalog API được tạo lại: 456 operation và 99 definition (tăng từ 412 và 97), khôi phục 44 operation trước đây chưa được ghi nhận, bao gồm các endpoint đọc/ghi payment-gateway; catalog element tăng lên 107 với việc bổ sung order-receipt.
27
+
28
+ ### Fixed
29
+ - Lưu một chỉnh sửa vào global section dùng chung hoặc một overlay (cart drawer, header hoặc footer dùng chung) không còn âm thầm làm mất mọi chỉnh sửa sau lần đầu tiên trong một phiên; lần lưu giờ cập nhật lại revision của từng bản gốc từ response của nền tảng thay vì gửi lại một revision cũ mà nền tảng từ chối kèm mã 200.
30
+
9
31
  ## [0.2.2] - 2026-09-07
10
32
 
11
33
  ### Fixed
package/README.md CHANGED
@@ -11,11 +11,17 @@ publish it — with no human clicking anything.
11
11
  One command writes this server into every agent client on your machine:
12
12
 
13
13
  ```bash
14
- npx -y sbuilder-mcp install --token wbk_… --api https://your-host
14
+ npx -y sbuilder-mcp install --token wbk_… --api https://your-host --site site_…
15
15
  ```
16
16
 
17
17
  It knows Claude Code, Claude Desktop, Cursor, Windsurf, VS Code and Codex, and installs into
18
- the ones it finds. Name them with `--client cursor,codex`, or rehearse with `--dry-run`.
18
+ the ones it finds. Name them with `--client cursor,codex`, or rehearse with `--dry-run`. An
19
+ option it does not know is **refused**, not ignored — a flag that silently does nothing is
20
+ worse than one that does not exist.
21
+
22
+ `--site` is optional and worth passing: a key belongs to exactly one site, so it is written
23
+ as `SB_SITE` and every tool then defaults to it. Without it the model has to carry the id
24
+ through the session, which it can only get by listing pages and reading one back.
19
25
 
20
26
  It **merges**: the servers already in those files stay, whatever it replaces is copied to
21
27
  `<file>.sbuilder-backup`, and a config it cannot parse is refused rather than overwritten —
@@ -32,7 +38,7 @@ The store's **Apps → AI agent** screen hands you this command with the key alr
32
38
  "sbuilder": {
33
39
  "command": "npx",
34
40
  "args": ["-y", "sbuilder-mcp"],
35
- "env": { "SB_API": "https://api.your-host", "SB_TOKEN": "wbk_…" }
41
+ "env": { "SB_API": "https://api.your-host", "SB_TOKEN": "wbk_…", "SB_SITE": "site_…" }
36
42
  }
37
43
  }
38
44
  }
@@ -85,7 +91,8 @@ make, because those mean "this person's account".
85
91
  | `sb_media_upload` | Add an image and get its URL — the only route, the upload is multipart |
86
92
  | `sb_live_join` | Join the editor's live-edit room as a visible peer — edits then appear live |
87
93
  | `sb_look` | Save, render, and return screenshots plus measured node boxes and layout defects measured on the render |
88
- | `sb_bind` | Bind a node's content to real store data |
94
+ | `sb_event` | Give a node a click action — open the cart, go to a page, open a pop-up |
95
+ | `sb_bind` | Bind a node's content to real store data, or make a button add to the cart |
89
96
 
90
97
  Twenty-five tools, **412 API operations**, 106 elements, 77 binding sources. `sb_api_find`
91
98
  is an index rather than a tool per endpoint, so the tool list stays short while everything
package/README.vi.md CHANGED
@@ -11,11 +11,17 @@ quả rồi xuất bản — mà không cần người bấm gì.
11
11
  Một lệnh ghi server này vào mọi agent client trên máy bạn:
12
12
 
13
13
  ```bash
14
- npx -y sbuilder-mcp install --token wbk_… --api https://your-host
14
+ npx -y sbuilder-mcp install --token wbk_… --api https://your-host --site site_…
15
15
  ```
16
16
 
17
17
  Nó biết Claude Code, Claude Desktop, Cursor, Windsurf, VS Code và Codex, và cài vào những
18
- cái nó tìm thấy. Chỉ định bằng `--client cursor,codex`, hoặc diễn thử với `--dry-run`.
18
+ cái nó tìm thấy. Chỉ định bằng `--client cursor,codex`, hoặc diễn thử với `--dry-run`. Một
19
+ tuỳ chọn nó không biết sẽ bị **từ chối**, không phải bỏ qua — một cờ âm thầm không làm gì
20
+ còn tệ hơn một cờ không tồn tại.
21
+
22
+ `--site` là tuỳ chọn nhưng nên truyền: một khoá chỉ thuộc đúng một site, nên nó được ghi
23
+ thành `SB_SITE` và mọi tool sau đó mặc định dùng site đó. Không có nó thì model phải mang
24
+ theo id suốt phiên, mà cách duy nhất để lấy là liệt kê trang rồi đọc ngược ra.
19
25
 
20
26
  Nó **gộp**: các server đã có trong file được giữ nguyên, thứ nó thay thế được chép sang
21
27
  `<file>.sbuilder-backup`, và một config nó không đọc được thì bị từ chối chứ không ghi đè —
@@ -31,7 +37,7 @@ Màn hình **Apps → AI agent** của cửa hàng đưa sẵn lệnh này kèm
31
37
  "sbuilder": {
32
38
  "command": "npx",
33
39
  "args": ["-y", "sbuilder-mcp"],
34
- "env": { "SB_API": "https://api.your-host", "SB_TOKEN": "wbk_…" }
40
+ "env": { "SB_API": "https://api.your-host", "SB_TOKEN": "wbk_…", "SB_SITE": "site_…" }
35
41
  }
36
42
  }
37
43
  }
@@ -82,7 +88,8 @@ là "tài khoản của người này".
82
88
  | `sb_media_upload` | Thêm ảnh và lấy URL — đường duy nhất, vì upload là multipart |
83
89
  | `sb_live_join` | Vào phòng live-edit của editor như một peer nhìn thấy được — sửa gì hiện ngay |
84
90
  | `sb_look` | Lưu, render, trả về ảnh chụp kèm box đo được của node và lỗi bố cục đo trên bản render |
85
- | `sb_bind` | Gắn nội dung một node vào dữ liệu cửa hàng thật |
91
+ | `sb_event` | Gắn click action cho một node mở giỏ, sang trang, mở pop-up |
92
+ | `sb_bind` | Gắn nội dung một node vào dữ liệu cửa hàng thật, hoặc biến một nút thành nút thêm vào giỏ |
86
93
 
87
94
  Hai mươi lăm tool, **412 operation API**, 106 element, 77 nguồn binding. `sb_api_find` là
88
95
  một chỉ mục chứ không phải mỗi endpoint một tool, nên danh sách tool vẫn ngắn trong khi mọi