sbuilder-mcp 0.107.1 → 0.108.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,21 @@ 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.108.0] - 2026-11-19
10
+
11
+ ### Added
12
+ - `sb_components` lists a site's code components read-only, with each component's latest version and every version's `propsSchema`, and works with either a site API key or a session.
13
+ - `sb_add` and `sb_set` place and configure the `code-component` element, checking the pinned component, version and props against that version's `propsSchema` before writing, including on `dry_run`.
14
+ - `sb_add` and `sb_set` report server-derived keys such as `html`, `clientUrl` and `hydrateProps` under `derived` and return the platform's `codeComponentRender` save warning in `render_warnings`.
15
+ - The API catalog covers the `code-component` element and the code-components routes, so `sb_traits_for`, `sb_add` and `sb_api_find` recognise them.
16
+
17
+ ### Changed
18
+ - `sb_set` re-checks the code component pin on `unset` and merges all edits to one node in a batch into a single check on the final state.
19
+ - The server instructions mention code components next to custom code for gaps that no native element covers.
20
+
21
+ ### Fixed
22
+ - `sb_add` and `sb_set` reject code component link, image, text, richtext and enum prop values that the platform would sanitize away, such as non-http(s) links, oversized values or invalid UTF-8.
23
+
9
24
  ## [0.107.1] - 2026-11-18
10
25
 
11
26
  ### Fixed
package/CHANGELOG.vi.md CHANGED
@@ -6,6 +6,21 @@ 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.108.0] - 2026-11-19
10
+
11
+ ### Added
12
+ - `sb_components` liệt kê code component của site ở chế độ chỉ đọc, kèm version mới nhất và `propsSchema` của từng version, dùng được với API key của site hoặc phiên đăng nhập.
13
+ - `sb_add` và `sb_set` đặt và cấu hình element `code-component`, kiểm tra component, version và props đã pin theo `propsSchema` của đúng version đó trước khi ghi, kể cả khi `dry_run`.
14
+ - `sb_add` và `sb_set` báo các key do máy chủ suy ra như `html`, `clientUrl` và `hydrateProps` trong `derived`, và trả nguyên văn cảnh báo lưu `codeComponentRender` của nền tảng trong `render_warnings`.
15
+ - Catalog API bao phủ element `code-component` và các route code-components, nên `sb_traits_for`, `sb_add` và `sb_api_find` nhận ra chúng.
16
+
17
+ ### Changed
18
+ - `sb_set` kiểm tra lại pin của code component khi `unset` và gộp mọi chỉnh sửa trên cùng một node trong batch thành một lần kiểm tra trên trạng thái cuối.
19
+ - Phần hướng dẫn của máy chủ nhắc đến code component cạnh custom code cho những khoảng trống mà không element gốc nào phủ.
20
+
21
+ ### Fixed
22
+ - `sb_add` và `sb_set` từ chối giá trị prop link, image, text, richtext và enum của code component mà nền tảng sẽ loại bỏ khi làm sạch, như link không phải http(s), giá trị quá lớn hoặc UTF-8 không hợp lệ.
23
+
9
24
  ## [0.107.1] - 2026-11-18
10
25
 
11
26
  ### Fixed
package/README.md CHANGED
@@ -100,6 +100,7 @@ in this client: one would put the very key the platform exists to hold back into
100
100
  | `sb_page_create` | Create a page — a store type arrives with the editor's own starting document; `type` is the route for checkout, product, category, post, course |
101
101
  | `sb_page_update` | Edit a page's name, slug, home flag, order, SEO (title, description, Open Graph, robots, meta tags, JSON-LD) and members-only flag — merged into `settings`, so the keys it does not name survive. On a template page: make it the type's default, or choose which products/categories/posts render through it |
102
102
  | `sb_page_version` | A page's platform recovery points — list named versions and autosave history, snapshot the draft, restore one |
103
+ | `sb_components` | The site's code components (its own React, pushed with `sb site push`) — each name and latest version with its props schema (every version with `name`); `sb_add` / `sb_set` check a `code-component` pin and its props against it |
103
104
  | `sb_code` | The site's custom code files (tracking pixels, analytics, chat widgets, site CSS; html/css/js/scss/ts injected, json/text served at `/_wb/code/<name>`) for every page or one — list, create, merge-update, remove; scss/ts compile on write and report `compile_error` |
104
105
  | `sb_function` | The site's backend functions — server-side TypeScript/JavaScript served at `/_wb/fn/<slug>` with the site's sealed secrets, collections and `fetch` (a `_` slug is an importable module) — list, read, create, merge-update, remove, test-run (counts toward the monthly quota), the run log, this month's usage, and write-only secrets; a failed build reports `compile_error` |
105
106
  | `sb_collection` | The site's data tables (collections) — create, rename, delete tables; add, edit, reorder and delete typed fields (text, number, integer, select, tags, reference, gallery…); list, read, add, merge-edit, delete, move and reorder records; CSV export and import; upsert by external id. An edit keeps the row's published flag and sends its `rev` |
@@ -120,8 +121,8 @@ in this client: one would put the very key the platform exists to hold back into
120
121
  | `sb_store` | Run a store flow that must happen in a fixed order — `checkout` (the four writes that make a working one), `checkout_sync` (the store's current payment and delivery methods into every existing order form, checkout page republished), `form` (any of the platform's 17 templates with its own field document), `chrome` (one shared header or footer on a real site menu — site name linked home, desktop menu, mobile drawer, search, cart and account icons), `menu` (a menu node bound to the site's menu, its links resolved), `overlay_attach` (a pop-up or quick view on the open page), `cart` (the site's cart drawer, when it has none; `relocalize` puts an existing one in the site's language) and `app` (a built-in app plus the pages it needs), `global_attach` / `global_detach` (put an EXISTING shared section on the open page, or take it off), `global_promote` (make a section on the page a NEW shared section) and `template_save` (save a section as a reusable template) |
121
122
  | `sb_undo` | Undo / redo this session's writes — page and form edits and `sb_api_call` PUTs, each named by tool and target, the open page's by default (`all: true` for every page); a page is refused if someone else saved it since. The platform's versions and history (`sb_page_version`) outlive this process |
122
123
 
123
- Thirty-nine tools, **969 API operations** (362 of the 451 writes carrying a body shape read
124
- off the handler), 124 elements, 96 binding sources. `sb_api_find`
124
+ Forty tools, **1007 API operations** (373 of the 464 writes carrying a body shape read
125
+ off the handler), 125 elements, 96 binding sources. `sb_api_find`
125
126
  is an index rather than a tool per endpoint, so the tool list stays short while everything
126
127
  the platform can do stays reachable — and operations added to the platform arrive with the
127
128
  next `npm run codegen`.
package/README.vi.md CHANGED
@@ -97,6 +97,7 @@ nhét ngược lại vào mọi bản cài.
97
97
  | `sb_page_create` | Tạo một trang — trang cửa hàng sinh ra đã có sẵn tài liệu như trong editor; `type` là đường đi cho checkout, product, category, post, course |
98
98
  | `sb_page_update` | Sửa tên, slug, cờ trang chủ, thứ tự, SEO (title, description, Open Graph, robots, meta tag, JSON-LD) và cờ chỉ-thành-viên của một trang — merge vào `settings`, nên các khoá không nhắc tới vẫn còn nguyên. Với trang template: đặt làm mặc định của loại, hoặc chọn sản phẩm/danh mục/bài viết nào hiển thị qua nó |
99
99
  | `sb_page_version` | Các điểm khôi phục của trang trên platform — liệt kê phiên bản có tên và lịch sử autosave, chụp draft, khôi phục |
100
+ | `sb_components` | Các code component của site (React riêng, đẩy lên bằng `sb site push`) — tên và version mới nhất kèm schema props (mọi version khi có `name`); `sb_add` / `sb_set` kiểm tra pin `code-component` và props của nó theo đó |
100
101
  | `sb_code` | Các file mã tuỳ chỉnh của site (pixel theo dõi, analytics, widget chat, CSS toàn site; html/css/js/scss/ts được chèn, json/text phục vụ tại `/_wb/code/<name>`) cho mọi trang hoặc một trang — liệt kê, tạo, cập nhật gộp, xoá; scss/ts biên dịch lúc ghi và báo `compile_error` |
101
102
  | `sb_function` | Các backend function của site — TypeScript/JavaScript chạy phía server tại `/_wb/fn/<slug>` với secret đã niêm phong, collection và `fetch` của site (slug bắt đầu bằng `_` là module để import) — liệt kê, đọc, tạo, cập nhật gộp, xoá, chạy thử (tính vào hạn mức tháng), nhật ký chạy, lượng dùng tháng này, và secret chỉ-ghi; build lỗi thì báo `compile_error` |
102
103
  | `sb_collection` | Các bảng dữ liệu (collection) của site — tạo, đổi tên, xoá bảng; thêm, sửa, sắp xếp và xoá trường có kiểu (text, number, integer, select, tags, reference, gallery…); liệt kê, đọc, thêm, sửa gộp, xoá, di chuyển và sắp xếp bản ghi; xuất và nhập CSV; upsert theo external id. Lệnh sửa giữ nguyên trạng thái đăng và gửi kèm `rev` của bản ghi |
@@ -117,8 +118,8 @@ nhét ngược lại vào mọi bản cài.
117
118
  | `sb_store` | Chạy một luồng cửa hàng bắt buộc đúng thứ tự — `checkout` (bốn lệnh ghi tạo nên trang thanh toán), `checkout_sync` (đưa phương thức thanh toán và giao hàng hiện tại vào mọi form đặt hàng đã có, publish lại trang thanh toán), `form` (một trong 17 template của nền tảng kèm field document của nó), `chrome` (một header hoặc footer dùng chung trên menu thật của site — tên site dẫn về trang chủ, menu desktop, drawer mobile, ô tìm kiếm, icon giỏ hàng và tài khoản), `menu` (một node menu bind vào menu của site, link đã phân giải), `overlay_attach` (một pop-up hay quick view trên trang đang mở), `cart` (ngăn giỏ hàng của site, khi chưa có; `relocalize` đưa ngăn giỏ đã có về ngôn ngữ của site), `app` (một app dựng sẵn kèm những trang nó cần), và `global_attach` / `global_detach` (đặt một section dùng chung ĐÃ CÓ lên trang đang mở, hoặc gỡ ra), `global_promote` (biến một section trên trang thành section dùng chung MỚI) và `template_save` (lưu một section làm mẫu dùng lại) |
118
119
  | `sb_undo` | Hoàn tác / làm lại các thao tác ghi trong phiên — chỉnh sửa trang, form và PUT qua `sb_api_call`, mỗi mục ghi tên tool và đối tượng, mặc định của trang đang mở (`all: true` cho mọi trang); trang bị từ chối nếu người khác đã lưu sau đó. Version và history của nền tảng (`sb_page_version`) sống lâu hơn process này |
119
120
 
120
- Ba mươi chín tool, **969 operation API** (362 trong 451 lệnh ghi có hình dạng body đọc thẳng
121
- từ handler), 124 element, 96 nguồn binding. `sb_api_find` là
121
+ Bốn mươi tool, **1007 operation API** (373 trong 464 lệnh ghi có hình dạng body đọc thẳng
122
+ từ handler), 125 element, 96 nguồn binding. `sb_api_find` là
122
123
  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
123
124
  thứ nền tảng làm được vẫn với tới — và operation mới thêm bên nền tảng sẽ tự có sau lần
124
125
  `npm run codegen` kế tiếp.