sbuilder-mcp 0.38.3 → 0.40.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 +23 -0
- package/CHANGELOG.vi.md +23 -0
- package/README.md +2 -2
- package/README.vi.md +2 -2
- package/dist/catalog/api.generated.js +1287 -289
- package/dist/catalog/shapes.generated.js +65 -3
- package/dist/domains/site/scoreboard.js +50 -0
- package/dist/domains/site/shape.js +52 -0
- package/dist/domains/site/sourcetokens.js +174 -0
- package/dist/domains/site/theme.js +116 -0
- package/dist/tools/importpage.js +153 -10
- package/dist/tools/theme.js +17 -2
- package/dist/vision/capture.js +120 -16
- package/dist/vision/imagediff.js +81 -0
- package/package.json +4 -3
package/CHANGELOG.md
CHANGED
|
@@ -6,6 +6,29 @@ 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.40.0] - 2026-09-13
|
|
10
|
+
|
|
11
|
+
### Added
|
|
12
|
+
- sb_import_site now reads the entry page's own colors and text-style scale and patches them onto the site's theme (five color roles plus a heading/text type scale), so an imported page keeps the source's look while its nodes stay re-themable instead of carrying literal colors. The write only touches named fields, never replaces the whole theme, and skips entirely — reporting `theme.failed` — if the site's own theme cannot be read, rather than falling back to the platform starter over a merchant's saved one. A new `theme` argument (default true) opts out of this site-wide write, the dry run reports a `theme_note` since the real values need a live capture, and the real run reports `theme.changed` and any `theme.unmatched` token the site's theme does not carry.
|
|
13
|
+
- sb_import and sb_import_site's results (dry run, real run, and each page of a site import) now report `coverage`, the percentage of the source page's own text — chrome excluded — that survived the import, so a page read before it finished settling is visible instead of silently looking small and correct.
|
|
14
|
+
|
|
15
|
+
### Changed
|
|
16
|
+
- sb_import and sb_import_site no longer cap how many nodes a captured page can contribute by default; a page's whole content is imported unless the caller passes `max_nodes` explicitly (`max_images` and `max_sections` are unchanged).
|
|
17
|
+
|
|
18
|
+
### Fixed
|
|
19
|
+
- sb_theme's write now clears the in-process theme cache afterward, so a following sb_node_read in the same session reports the color a write just set instead of the one it replaced.
|
|
20
|
+
|
|
21
|
+
## [0.39.0] - 2026-09-11
|
|
22
|
+
|
|
23
|
+
### Added
|
|
24
|
+
- The catalog grew from 508 to 524 API operations (175 of 234 writes now carrying a body shape, up from 170 of 223), closing sixteen routes that were live on the platform but carried no `@Router` annotation, so a browser could reach them and nothing here could.
|
|
25
|
+
- sb_api_find now covers the AI chat assistant's whole conversation surface: the inbox, a thread's messages, sending a human reply, marking a conversation bot or closed, the unread badge, the worklist stats, and chat-settings' test/models/usage operations.
|
|
26
|
+
- sb_api_find now covers both refund paths for a payment — recording a refund made elsewhere, and asking the gateway to send the money back with the record moving only once the gateway confirms — plus opening a pay link for an existing order.
|
|
27
|
+
- sb_api_find now covers three domain operations: the canonical domain (www vs bare), its redirect, and its redirect code (301 vs 302).
|
|
28
|
+
|
|
29
|
+
### Changed
|
|
30
|
+
- README.md and README.vi.md now report the catalog's current size, 524 API operations (175 of 234 writes shaped), instead of the 508 left over before this regen.
|
|
31
|
+
|
|
9
32
|
## [0.38.3] - 2026-09-11
|
|
10
33
|
|
|
11
34
|
### Fixed
|
package/CHANGELOG.vi.md
CHANGED
|
@@ -6,6 +6,29 @@ 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.40.0] - 2026-09-13
|
|
10
|
+
|
|
11
|
+
### Added
|
|
12
|
+
- sb_import_site giờ đọc màu sắc và thang kiểu chữ (text style) của chính trang entry rồi ghi chúng vào theme của site (năm vai trò màu cộng với thang kiểu chữ cho heading/text), nhờ đó trang được import giữ được diện mạo của nguồn trong khi các node vẫn có thể đổi theme lại thay vì mang màu literal cố định. Bản ghi chỉ chạm vào các field được đặt tên, không bao giờ thay thế toàn bộ theme, và bỏ qua hoàn toàn — báo `theme.failed` — nếu không đọc được theme hiện có của site, thay vì rơi về theme mặc định của nền tảng đè lên theme đã lưu của merchant. Tham số mới `theme` (mặc định true) cho phép tắt bản ghi ảnh hưởng toàn site này, dry run báo `theme_note` vì giá trị thật cần một lần capture trình duyệt thực sự, còn lần chạy thật báo `theme.changed` cùng mọi token `theme.unmatched` mà theme của site không có.
|
|
13
|
+
- Kết quả của sb_import và sb_import_site (dry run, lần chạy thật, và từng trang khi import cả site) giờ báo thêm `coverage`, phần trăm nội dung chữ của trang nguồn — không tính phần chrome — còn sống sót sau khi import, nhờ đó một trang bị đọc trước khi tải xong sẽ lộ ra thay vì trông nhỏ gọn và đúng một cách âm thầm.
|
|
14
|
+
|
|
15
|
+
### Changed
|
|
16
|
+
- sb_import và sb_import_site không còn giới hạn số node mà một trang capture được đóng góp theo mặc định; toàn bộ nội dung của trang được import trừ khi caller truyền `max_nodes` một cách tường minh (`max_images` và `max_sections` giữ nguyên).
|
|
17
|
+
|
|
18
|
+
### Fixed
|
|
19
|
+
- Bản ghi của sb_theme giờ xóa cache theme trong tiến trình ngay sau đó, để một lần gọi sb_node_read tiếp theo trong cùng phiên báo đúng màu vừa được ghi thay vì màu đã bị thay thế.
|
|
20
|
+
|
|
21
|
+
## [0.39.0] - 2026-09-11
|
|
22
|
+
|
|
23
|
+
### Added
|
|
24
|
+
- Catalog tăng từ 508 lên 524 operation API (175 trong 234 lệnh ghi có shape, tăng từ 170 trong 223), khép lại mười sáu route đã sống trên nền tảng nhưng chưa từng có annotation `@Router`, nên trình duyệt chạm tới được còn server này thì không.
|
|
25
|
+
- sb_api_find giờ bao phủ toàn bộ bề mặt hội thoại của trợ lý chat AI: hộp thư đến, tin nhắn của một luồng, gửi phản hồi của con người, đánh dấu một hội thoại là bot hoặc đã đóng, huy hiệu tin chưa đọc, số liệu worklist, cùng các operation test/models/usage của chat-settings.
|
|
26
|
+
- sb_api_find giờ bao phủ cả hai đường hoàn tiền — ghi nhận một khoản hoàn tiền đã thực hiện ở nơi khác, và yêu cầu cổng thanh toán gửi trả tiền với bản ghi chỉ chuyển trạng thái khi cổng xác nhận — cùng việc mở link thanh toán cho một đơn hàng đã có.
|
|
27
|
+
- sb_api_find giờ bao phủ ba operation quản lý domain: domain chính thức (www hay không www), redirect của nó, và mã redirect (301 hay 302).
|
|
28
|
+
|
|
29
|
+
### Changed
|
|
30
|
+
- README.md và README.vi.md giờ báo đúng quy mô hiện tại của catalog, 524 operation API (175 trong 234 lệnh ghi có shape), thay vì con số 508 còn sót lại trước lần regen này.
|
|
31
|
+
|
|
9
32
|
## [0.38.3] - 2026-09-11
|
|
10
33
|
|
|
11
34
|
### Fixed
|
package/README.md
CHANGED
|
@@ -107,12 +107,12 @@ in this client: one would put the very key the platform exists to hold back into
|
|
|
107
107
|
| `sb_event` | Give a node a click action — open the cart, go to a page, open a pop-up |
|
|
108
108
|
| `sb_bind` | Bind a node's content to real store data, or make a button add to the cart |
|
|
109
109
|
| `sb_import` | Read a page from any public URL and add its structure and content to the open page as real elements, styled with THIS page's own tokens — a translation, not a clone |
|
|
110
|
-
| `sb_import_site` | Read a WHOLE site from one URL — its sitemap, or the links on that page — and give each page found its own draft page here, built from this site's tokens |
|
|
110
|
+
| `sb_import_site` | Read a WHOLE site from one URL — its sitemap, or the links on that page — and give each page found its own draft page here, built from this site's tokens; the entry page's own colours and type scale also patch into this SITE'S theme, so it stops being purely a read |
|
|
111
111
|
| `sb_theme` | Read or patch the site's palette and type scale — the layer every style preset resolves from, so one token repaints every page |
|
|
112
112
|
| `sb_store` | Run a store flow that must happen in a fixed order — the four writes that make a working checkout, or any of the platform's 17 form templates (login, register, forgot, contact, subscribe …) with its own field document |
|
|
113
113
|
| `sb_undo` | Put back what a PUT replaced. The SECOND answer for a page, not the only one: the platform has versions, history and restore (`sb_api_find` "page versions"), which outlive this process — reach for those first and use this for every other shaped PUT |
|
|
114
114
|
|
|
115
|
-
Twenty-eight tools, **
|
|
115
|
+
Twenty-eight tools, **524 API operations** (175 of the 234 writes carrying a body shape read
|
|
116
116
|
off the handler), 112 elements, 78 binding sources. `sb_api_find`
|
|
117
117
|
is an index rather than a tool per endpoint, so the tool list stays short while everything
|
|
118
118
|
the platform can do stays reachable — and operations added to the platform arrive with the
|
package/README.vi.md
CHANGED
|
@@ -104,12 +104,12 @@ nhét ngược lại vào mọi bản cài.
|
|
|
104
104
|
| `sb_event` | Gắn click action cho một node — mở giỏ, sang trang, mở pop-up |
|
|
105
105
|
| `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ỏ |
|
|
106
106
|
| `sb_import` | Đọc một trang từ URL công khai bất kỳ và thêm cấu trúc + nội dung của nó vào trang đang mở dưới dạng element thật, mang token của CHÍNH trang này — là dịch lại, không phải sao chép |
|
|
107
|
-
| `sb_import_site` | Đọc CẢ website từ một URL — sitemap của nó, hoặc các link trên trang đó — và tạo cho mỗi trang tìm được một trang nháp riêng ở đây, dựng bằng token của site này |
|
|
107
|
+
| `sb_import_site` | Đọc CẢ website từ một URL — sitemap của nó, hoặc các link trên trang đó — và tạo cho mỗi trang tìm được một trang nháp riêng ở đây, dựng bằng token của site này; màu và thang chữ của trang gốc cũng được vá vào THEME của site này, nên đây không còn thuần là đọc |
|
|
108
108
|
| `sb_theme` | Đọc hoặc vá bảng màu và thang chữ của site — tầng mà mọi style preset phân giải từ đó, nên một token thay áo cho mọi trang |
|
|
109
109
|
| `sb_store` | Chạy một luồng cửa hàng bắt buộc đúng thứ tự — bốn lệnh ghi tạo nên trang thanh toán, hoặc gieo bất kỳ template nào trong 17 form của nền tảng (login, register, forgot, contact, subscribe …) kèm field document của nó |
|
|
110
110
|
| `sb_undo` | Trả lại thứ mà một lệnh PUT đã ghi đè. Với TRANG thì đây là đường về thứ hai chứ không phải duy nhất: nền tảng có version, history và restore (`sb_api_find` "page versions"), và chúng sống lâu hơn tiến trình này — hãy dùng chúng trước, còn tool này cho mọi PUT có hình dạng khác |
|
|
111
111
|
|
|
112
|
-
Hai mươi tám tool, **
|
|
112
|
+
Hai mươi tám tool, **524 operation API** (175 trong 234 lệnh ghi có hình dạng body đọc thẳng
|
|
113
113
|
từ handler), 112 element, 78 nguồn binding. `sb_api_find` là
|
|
114
114
|
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
|
|
115
115
|
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
|