sbuilder-mcp 0.1.4 → 0.2.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 +31 -0
- package/CHANGELOG.vi.md +31 -0
- package/README.md +3 -3
- package/README.vi.md +3 -3
- package/dist/catalog/elements.generated.js +16691 -2009
- package/dist/domains/site/builder.js +115 -18
- package/dist/domains/site/document.js +36 -1
- package/dist/domains/site/findings.js +10 -1
- package/dist/domains/site/node.js +17 -1
- package/dist/domains/site/readiness-fetch.js +52 -0
- package/dist/domains/site/readiness.js +126 -0
- package/dist/domains/site/review.js +74 -5
- package/dist/domains/site/validate.js +37 -17
- package/dist/mcp/response.js +6 -1
- package/dist/tools/live.js +48 -9
- package/dist/tools/page.js +72 -14
- package/dist/transport/media.js +13 -0
- package/dist/vision/shoot.js +11 -1
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -6,6 +6,37 @@ 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.2.0] - 2026-09-07
|
|
10
|
+
|
|
11
|
+
### Added
|
|
12
|
+
- sb_review reports static_in_dataset when an element inside a repeater (such as a plain image in a product card) can only render one authored value across every record, and names the record-capable element to swap in instead.
|
|
13
|
+
- sb_review reports unbound_dataset_element when a dataset element capable of showing a record carries no binding at all, instead of silently rendering the same authored content on every row.
|
|
14
|
+
- sb_page_open reports blank_page_repair when a page's stored document names its root under rootId instead of root_node_id, the alias that renders as an empty page.
|
|
15
|
+
|
|
16
|
+
### Fixed
|
|
17
|
+
- Opening a page whose document names its root under rootId no longer fails as a damaged document; the document adopts the alias so the next save writes the canonical key and the page stops rendering blank.
|
|
18
|
+
|
|
19
|
+
## [0.1.5] - 2026-09-07
|
|
20
|
+
|
|
21
|
+
### Added
|
|
22
|
+
- sb_review reports store_gaps: the platform's own readiness rules — no published checkout page, no live payment gateway, no published product page, no shipping method, nothing that opens the cart — none of which any API exposes and all of which survive publish silently.
|
|
23
|
+
- sb_page_create takes type, slug and is_homepage, so an agent can create the checkout and product pages that /checkout and /products/{slug} resolve by type rather than by slug.
|
|
24
|
+
- sb_look takes url to shoot a given address (typically the published storefront) instead of the draft preview, which threads no store data and renders every repeater's empty state.
|
|
25
|
+
|
|
26
|
+
### Changed
|
|
27
|
+
- sb_set re-derives a dataset element's bindings when config.datasetSource or config.kind changes, instead of leaving them pointing at the entity they used to describe.
|
|
28
|
+
- sb_add and sb_set now refuse a caller writing specials.globalId, specials.appBlockId or specials.appBlockHash, which are stamps the server writes on compose; authoring one decomposes the node over its shared master on the next save.
|
|
29
|
+
- Binding sources for sb_bind and sb_review grew from 26 to 77 by also reading the editor's own binding context, so a platform-seeded binding such as price is no longer reported as dead.
|
|
30
|
+
- sb_bind's source argument no longer lists every binding source in its schema; an unknown source is still refused with the full list.
|
|
31
|
+
|
|
32
|
+
### Fixed
|
|
33
|
+
- Newly added dataset elements (text-dataset, pricing-dataset, list-dataset, and others) now carry the bindings the editor would have given them at drop time, instead of saving, publishing and rendering their placeholder forever.
|
|
34
|
+
- Removing a node now also removes its satellite nodes (list-empty, list-loading, the quantity and product-variant-label nodes), which attach by parent pointer alone and used to survive removal and fail the next save with unrecognized ids.
|
|
35
|
+
- sb_publish now posts to the site's publish endpoint with pageIds instead of a per-page publish route that the platform answers with 404.
|
|
36
|
+
- A tool result built from an empty response body (such as a 204 on delete) no longer fails client-side validation.
|
|
37
|
+
- sb_page_open, sb_set and sb_look no longer refuse a real page's satellite nodes (list-empty, list-loading, the quantity and product-variant-label nodes) as orphans; the save check now verifies attachment to the tree instead of exact parent/child-list agreement.
|
|
38
|
+
- sb_media_upload reports that a key-only install cannot upload media, since /api/media is mounted behind session auth only, instead of surfacing a bare unauthorized error.
|
|
39
|
+
|
|
9
40
|
## [0.1.4] - 2026-09-07
|
|
10
41
|
|
|
11
42
|
### Added
|
package/CHANGELOG.vi.md
CHANGED
|
@@ -6,6 +6,37 @@ 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.2.0] - 2026-09-07
|
|
10
|
+
|
|
11
|
+
### Added
|
|
12
|
+
- sb_review giờ báo cáo static_in_dataset khi một element bên trong repeater (như một image thường trong thẻ sản phẩm) chỉ có thể render một giá trị đã gán cho mọi record, đồng thời chỉ ra element có thể hiển thị record để thay thế.
|
|
13
|
+
- sb_review giờ báo cáo unbound_dataset_element khi một dataset element có khả năng hiển thị record nhưng không mang binding nào, thay vì âm thầm render cùng một nội dung đã gán cho mọi dòng.
|
|
14
|
+
- sb_page_open giờ báo cáo blank_page_repair khi document lưu trữ của trang đặt tên root là rootId thay vì root_node_id — alias khiến trang render rỗng.
|
|
15
|
+
|
|
16
|
+
### Fixed
|
|
17
|
+
- Mở một trang có document đặt tên root là rootId không còn bị từ chối như document hỏng; document giờ tự nhận alias này để lần lưu kế tiếp ghi đúng khóa chuẩn và trang không còn render rỗng.
|
|
18
|
+
|
|
19
|
+
## [0.1.5] - 2026-09-07
|
|
20
|
+
|
|
21
|
+
### Added
|
|
22
|
+
- sb_review giờ báo cáo store_gaps: các quy tắc sẵn sàng bán hàng của chính nền tảng — chưa có trang checkout đã publish, chưa có cổng thanh toán live, chưa có trang product đã publish, chưa có phương thức vận chuyển, không có gì mở lại giỏ hàng — không API nào lộ ra các quy tắc này và tất cả đều sống sót qua publish một cách âm thầm.
|
|
23
|
+
- sb_page_create nhận type, slug và is_homepage, để agent tạo được trang checkout và product mà /checkout và /products/{slug} phân giải theo type chứ không theo slug.
|
|
24
|
+
- sb_look nhận url để chụp một địa chỉ cho trước (thường là storefront đã publish) thay vì bản xem trước dạng draft, vốn không truyền dữ liệu cửa hàng và khiến mọi repeater render trạng thái rỗng.
|
|
25
|
+
|
|
26
|
+
### Changed
|
|
27
|
+
- sb_set giờ tính lại binding của một dataset element khi config.datasetSource hoặc config.kind thay đổi, thay vì để binding tiếp tục trỏ vào entity cũ.
|
|
28
|
+
- sb_add và sb_set giờ từ chối khi caller ghi specials.globalId, specials.appBlockId hoặc specials.appBlockHash — đây là các stamp do server ghi khi compose; tự ghi một trong số đó sẽ khiến lần lưu kế tiếp decompose node đó đè lên bản gốc chung.
|
|
29
|
+
- Số nguồn binding cho sb_bind và sb_review tăng từ 26 lên 77 nhờ đọc thêm context binding của editor, nên một binding do nền tảng tự seed như price không còn bị báo là dead.
|
|
30
|
+
- Tham số source của sb_bind không còn liệt kê toàn bộ nguồn binding trong schema; một nguồn không hợp lệ vẫn bị từ chối kèm danh sách đầy đủ.
|
|
31
|
+
|
|
32
|
+
### Fixed
|
|
33
|
+
- Các dataset element mới thêm (text-dataset, pricing-dataset, list-dataset, và các loại khác) giờ mang đúng binding mà editor sẽ gán lúc kéo-thả, thay vì lưu, publish và render mãi ở trạng thái placeholder.
|
|
34
|
+
- Xóa một node giờ cũng xóa các node vệ tinh của nó (list-empty, list-loading, các node quantity và product-variant-label), vốn chỉ gắn qua con trỏ parent và trước đây sống sót qua việc xóa rồi làm lần lưu kế tiếp bị từ chối vì id không xác định.
|
|
35
|
+
- sb_publish giờ gọi endpoint publish cấp site với pageIds, thay vì một route publish theo từng trang mà nền tảng trả về 404.
|
|
36
|
+
- Một kết quả tool được dựng từ response rỗng (như 204 khi xóa) không còn bị client từ chối do lỗi validate.
|
|
37
|
+
- sb_page_open, sb_set và sb_look không còn từ chối các node vệ tinh của một trang thật (list-empty, list-loading, các node quantity và product-variant-label) như thể chúng là orphan; kiểm tra khi lưu giờ xác minh sự gắn kết vào cây thay vì yêu cầu parent và child-list khớp chính xác.
|
|
38
|
+
- sb_media_upload giờ báo rõ rằng một cài đặt chỉ dùng API key không thể upload media, vì /api/media chỉ chấp nhận xác thực bằng session, thay vì trả về lỗi unauthorized trần trụi.
|
|
39
|
+
|
|
9
40
|
## [0.1.4] - 2026-09-07
|
|
10
41
|
|
|
11
42
|
### Added
|
package/README.md
CHANGED
|
@@ -78,16 +78,16 @@ make, because those mean "this person's account".
|
|
|
78
78
|
| `sb_templates` | The store's saved section templates — designed sections to start from |
|
|
79
79
|
| `sb_template_use` | Instantiate a template into a page |
|
|
80
80
|
| `sb_page_list` | Every page on the site |
|
|
81
|
-
| `sb_page_create` | Create a page |
|
|
81
|
+
| `sb_page_create` | Create a page; `type` is the route for checkout, product, category, post, course |
|
|
82
82
|
| `sb_publish` | Compile the draft into the live page (cascades to shared globals) |
|
|
83
|
-
| `sb_review` | Every defect a visitor would see, each with the
|
|
83
|
+
| `sb_review` | Every defect a visitor would see, each with its fix, plus the five gaps between this store and a paid order |
|
|
84
84
|
| `sb_media_list` | The site's media library |
|
|
85
85
|
| `sb_media_upload` | Add an image and get its URL — the only route, the upload is multipart |
|
|
86
86
|
| `sb_live_join` | Join the editor's live-edit room as a visible peer — edits then appear live |
|
|
87
87
|
| `sb_look` | Save, render, and return screenshots plus measured node boxes and layout defects measured on the render |
|
|
88
88
|
| `sb_bind` | Bind a node's content to real store data |
|
|
89
89
|
|
|
90
|
-
Twenty-five tools, **412 API operations**, 106 elements,
|
|
90
|
+
Twenty-five tools, **412 API operations**, 106 elements, 77 binding sources. `sb_api_find`
|
|
91
91
|
is an index rather than a tool per endpoint, so the tool list stays short while everything
|
|
92
92
|
the platform can do stays reachable — and operations added to the platform arrive with the
|
|
93
93
|
next `npm run codegen`.
|
package/README.vi.md
CHANGED
|
@@ -75,16 +75,16 @@ là "tài khoản của người này".
|
|
|
75
75
|
| `sb_templates` | Section template đã lưu của cửa hàng — section thiết kế sẵn để bắt đầu |
|
|
76
76
|
| `sb_template_use` | Thả một template vào trang |
|
|
77
77
|
| `sb_page_list` | Mọi trang của site |
|
|
78
|
-
| `sb_page_create` | Tạo một trang |
|
|
78
|
+
| `sb_page_create` | Tạo một trang; `type` là đường đi cho checkout, product, category, post, course |
|
|
79
79
|
| `sb_publish` | Biên dịch bản nháp thành trang live (lan sang global dùng chung) |
|
|
80
|
-
| `sb_review` | Mọi khiếm khuyết người xem sẽ thấy, kèm lệnh sửa từng cái |
|
|
80
|
+
| `sb_review` | Mọi khiếm khuyết người xem sẽ thấy, kèm lệnh sửa từng cái, và năm khoảng trống chắn giữa cửa hàng với một đơn đã thanh toán |
|
|
81
81
|
| `sb_media_list` | Thư viện ảnh của site |
|
|
82
82
|
| `sb_media_upload` | Thêm ảnh và lấy URL — đường duy nhất, vì upload là multipart |
|
|
83
83
|
| `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
84
|
| `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
85
|
| `sb_bind` | Gắn nội dung một node vào dữ liệu cửa hàng thật |
|
|
86
86
|
|
|
87
|
-
Hai mươi lăm tool, **412 operation API**, 106 element,
|
|
87
|
+
Hai mươi lăm tool, **412 operation API**, 106 element, 77 nguồn binding. `sb_api_find` là
|
|
88
88
|
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
|
|
89
89
|
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
|
|
90
90
|
`npm run codegen` kế tiếp.
|