sbuilder-mcp 0.4.3 → 0.4.4
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 +11 -0
- package/CHANGELOG.vi.md +11 -0
- package/README.md +5 -2
- package/README.vi.md +5 -2
- package/dist/catalog/api.generated.js +64 -1
- package/dist/catalog/checkout.generated.js +812 -0
- package/dist/catalog/search.js +15 -0
- package/dist/catalog/shapes.generated.js +6582 -0
- package/dist/domains/site/readiness.js +7 -1
- package/dist/server.js +6 -1
- package/dist/tools/api.js +24 -2
- package/dist/tools/store.js +286 -0
- package/dist/tools/undo.js +162 -0
- package/dist/transport/http.js +36 -7
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -6,6 +6,17 @@ 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.4.4] - 2026-09-08
|
|
10
|
+
|
|
11
|
+
### Added
|
|
12
|
+
- sb_api_find's call sheet now returns body_shape for 158 of the platform's 212 write operations, read directly off the Go handler that decodes each body instead of the 46 swagger.json describes, and expands one level of a nested struct (such as a product's variants, where the price actually lives) rather than stopping at the type name.
|
|
13
|
+
- sb_store runs the four fixed-order writes a working checkout needs — create an order form, save it back whole with the cart as its source, fill in the store's real payment methods and delivery options, then create and publish a checkout-type page — since building them by hand and missing one step ships a Checkout button that answers 404. dry_run (the default) returns the ordered plan and the payment_methods/delivery_options the form will carry; executing returns form_id, page_id, slug and published.
|
|
14
|
+
- sb_undo restores what a PUT made through sb_api_call just replaced, since the platform has no page history, versions or restore for pages, forms or settings; sb_api_call now reads a PUT's target through the matching GET before writing so there is something to put back.
|
|
15
|
+
|
|
16
|
+
### Fixed
|
|
17
|
+
- sb_review's checkoutPage gap now points to sb_store's checkout action instead of a fix that only creates a checkout-type page, which has no order form bound to the cart and takes no orders.
|
|
18
|
+
- Redacting a request preview (used by sb_api_call and sb_undo) now matches platform-sourced credential field names such as accessKey, apiKey, clientSecret, hashSecret, webhookSecret, orderToken and signature, not just an exact "secret", since a body sb_undo echoes back comes from the platform's own vocabulary rather than a caller's.
|
|
19
|
+
|
|
9
20
|
## [0.4.3] - 2026-09-08
|
|
10
21
|
|
|
11
22
|
### Changed
|
package/CHANGELOG.vi.md
CHANGED
|
@@ -6,6 +6,17 @@ 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.4.4] - 2026-09-08
|
|
10
|
+
|
|
11
|
+
### Added
|
|
12
|
+
- sb_api_find giờ trả về body_shape cho 158 trong tổng số 212 write operation của nền tảng, đọc trực tiếp từ handler Go giải mã từng body thay vì chỉ 46 operation mà swagger.json mô tả, và mở rộng thêm một cấp cho struct lồng nhau (như variants của một sản phẩm, nơi giá thực sự nằm ở đó) thay vì dừng lại ở tên kiểu.
|
|
13
|
+
- sb_store chạy bốn lượt ghi theo đúng thứ tự cố định mà một checkout hoạt động cần — tạo order form, lưu lại nguyên vẹn với giỏ hàng làm nguồn, điền các phương thức thanh toán và tùy chọn giao hàng thật của cửa hàng, rồi tạo và publish một trang kiểu checkout — vì tự dựng bằng tay mà bỏ sót một bước sẽ cho ra nút Checkout luôn trả về 404. dry_run (mặc định) trả về plan theo đúng thứ tự cùng payment_methods/delivery_options mà form sẽ mang; khi thực thi sẽ trả về form_id, page_id, slug và published.
|
|
14
|
+
- sb_undo khôi phục lại thứ mà một PUT qua sb_api_call vừa ghi đè, vì nền tảng không có lịch sử, phiên bản hay khôi phục cho trang, form hay settings; sb_api_call giờ đọc đối tượng của một PUT qua GET tương ứng trước khi ghi, để có thứ mà khôi phục lại.
|
|
15
|
+
|
|
16
|
+
### Fixed
|
|
17
|
+
- Gap checkoutPage của sb_review giờ trỏ tới action checkout của sb_store thay vì một cách sửa chỉ tạo trang kiểu checkout, vốn không có order form gắn với giỏ hàng nên không nhận được đơn hàng nào.
|
|
18
|
+
- Việc redact một bản xem trước request (dùng bởi sb_api_call và sb_undo) giờ khớp với các tên trường credential có nguồn gốc từ nền tảng như accessKey, apiKey, clientSecret, hashSecret, webhookSecret, orderToken và signature, chứ không chỉ khớp chính xác "secret", vì body mà sb_undo phản chiếu lại đến từ vocabulary của nền tảng chứ không phải của caller.
|
|
19
|
+
|
|
9
20
|
## [0.4.3] - 2026-09-08
|
|
10
21
|
|
|
11
22
|
### Changed
|
package/README.md
CHANGED
|
@@ -69,7 +69,7 @@ make, because those mean "this person's account".
|
|
|
69
69
|
| --- | --- |
|
|
70
70
|
| `sb_connect` | Log in, list the sites this account can operate, report which credentials are present |
|
|
71
71
|
| `sb_site_list` | List the sites this account can operate |
|
|
72
|
-
| `sb_api_find` | Find API operations by intent — one line per match — then read one operation's call sheet by id: real parameter schemas, the credential it needs, and
|
|
72
|
+
| `sb_api_find` | Find API operations by intent — one line per match — then read one operation's call sheet by id: real parameter schemas, the credential it needs, and the body's fields read off the handler that decodes them, each carrying the trap its own doc comment records |
|
|
73
73
|
| `sb_api_call` | Execute one operation. Defaults to a dry run that sends nothing |
|
|
74
74
|
| `sb_page_open` | Open a page for editing and return its outline |
|
|
75
75
|
| `sb_outline` | The open page as a compressed tree — never a raw document dump |
|
|
@@ -93,8 +93,11 @@ make, because those mean "this person's account".
|
|
|
93
93
|
| `sb_look` | Save, render, and return screenshots plus measured node boxes and layout defects measured on the render |
|
|
94
94
|
| `sb_event` | Give a node a click action — open the cart, go to a page, open a pop-up |
|
|
95
95
|
| `sb_bind` | Bind a node's content to real store data, or make a button add to the cart |
|
|
96
|
+
| `sb_store` | Run a store flow that must happen in a fixed order — today, the four writes that make a working checkout |
|
|
97
|
+
| `sb_undo` | Put back what a PUT replaced — the platform has no page history or restore, so this is the only way back |
|
|
96
98
|
|
|
97
|
-
Twenty-
|
|
99
|
+
Twenty-eight tools, **484 API operations** (158 of the 212 writes carrying a body shape read
|
|
100
|
+
off the handler), 107 elements, 77 binding sources. `sb_api_find`
|
|
98
101
|
is an index rather than a tool per endpoint, so the tool list stays short while everything
|
|
99
102
|
the platform can do stays reachable — and operations added to the platform arrive with the
|
|
100
103
|
next `npm run codegen`.
|
package/README.vi.md
CHANGED
|
@@ -66,7 +66,7 @@ là "tài khoản của người này".
|
|
|
66
66
|
| --- | --- |
|
|
67
67
|
| `sb_connect` | Đăng nhập, liệt kê site tài khoản vận hành được, báo đang có credential nào |
|
|
68
68
|
| `sb_site_list` | Liệt kê site tài khoản vận hành được |
|
|
69
|
-
| `sb_api_find` | Tìm operation theo ý định — mỗi kết quả một dòng — rồi đọc call sheet của một operation theo id: schema tham số thật, credential cần dùng, và
|
|
69
|
+
| `sb_api_find` | Tìm operation theo ý định — mỗi kết quả một dòng — rồi đọc call sheet của một operation theo id: schema tham số thật, credential cần dùng, và các trường body đọc thẳng từ handler decode chúng, mỗi trường mang theo cái bẫy doc comment của chính nó ghi lại |
|
|
70
70
|
| `sb_api_call` | Chạy một operation. Mặc định chạy khô, không gửi gì |
|
|
71
71
|
| `sb_page_open` | Mở một trang để sửa và trả về outline |
|
|
72
72
|
| `sb_outline` | Trang đang mở dạng cây nén — không bao giờ dump tài liệu thô |
|
|
@@ -90,8 +90,11 @@ là "tài khoản của người này".
|
|
|
90
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 |
|
|
91
91
|
| `sb_event` | Gắn click action cho một node — mở giỏ, sang trang, mở pop-up |
|
|
92
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ỏ |
|
|
93
|
+
| `sb_store` | Chạy một luồng cửa hàng bắt buộc đúng thứ tự — hiện là bốn lệnh ghi tạo nên một trang thanh toán hoạt động |
|
|
94
|
+
| `sb_undo` | Trả lại thứ mà một lệnh PUT đã ghi đè — nền tảng không có lịch sử trang hay restore, nên đây là đường về duy nhất |
|
|
93
95
|
|
|
94
|
-
Hai mươi
|
|
96
|
+
Hai mươi tám tool, **484 operation API** (158 trong 212 lệnh ghi có hình dạng body đọc thẳng
|
|
97
|
+
từ handler), 107 element, 77 nguồn binding. `sb_api_find` là
|
|
95
98
|
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
|
|
96
99
|
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
|
|
97
100
|
`npm run codegen` kế tiếp.
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
export const SWAGGER_SOURCE = {
|
|
2
|
-
"operations":
|
|
2
|
+
"operations": 484,
|
|
3
3
|
"definitions": 99,
|
|
4
4
|
"bodyCarrying": 171,
|
|
5
5
|
"bodyUndescribed": 62,
|
|
@@ -10625,6 +10625,48 @@ export const API_OPERATIONS = [
|
|
|
10625
10625
|
"bodyRef": null,
|
|
10626
10626
|
"credential": "siteScoped"
|
|
10627
10627
|
},
|
|
10628
|
+
{
|
|
10629
|
+
"id": "get:/api/sites/{siteId}/relation-slots",
|
|
10630
|
+
"method": "GET",
|
|
10631
|
+
"path": "/api/sites/{siteId}/relation-slots",
|
|
10632
|
+
"tags": [
|
|
10633
|
+
"relations"
|
|
10634
|
+
],
|
|
10635
|
+
"summary": "Curated relation slots and their picks",
|
|
10636
|
+
"params": [
|
|
10637
|
+
{
|
|
10638
|
+
"name": "siteId",
|
|
10639
|
+
"in": "path",
|
|
10640
|
+
"required": true,
|
|
10641
|
+
"type": "string",
|
|
10642
|
+
"description": "Site ID"
|
|
10643
|
+
}
|
|
10644
|
+
],
|
|
10645
|
+
"bodyDescribed": false,
|
|
10646
|
+
"bodyRef": null,
|
|
10647
|
+
"credential": "siteScoped"
|
|
10648
|
+
},
|
|
10649
|
+
{
|
|
10650
|
+
"id": "post:/api/sites/{siteId}/restore",
|
|
10651
|
+
"method": "POST",
|
|
10652
|
+
"path": "/api/sites/{siteId}/restore",
|
|
10653
|
+
"tags": [
|
|
10654
|
+
"sites"
|
|
10655
|
+
],
|
|
10656
|
+
"summary": "Restore a site from the trash",
|
|
10657
|
+
"params": [
|
|
10658
|
+
{
|
|
10659
|
+
"name": "siteId",
|
|
10660
|
+
"in": "path",
|
|
10661
|
+
"required": true,
|
|
10662
|
+
"type": "string",
|
|
10663
|
+
"description": "Site ID"
|
|
10664
|
+
}
|
|
10665
|
+
],
|
|
10666
|
+
"bodyDescribed": false,
|
|
10667
|
+
"bodyRef": null,
|
|
10668
|
+
"credential": "siteScoped"
|
|
10669
|
+
},
|
|
10628
10670
|
{
|
|
10629
10671
|
"id": "get:/api/sites/{siteId}/returns",
|
|
10630
10672
|
"method": "GET",
|
|
@@ -12113,6 +12155,27 @@ export const API_OPERATIONS = [
|
|
|
12113
12155
|
"bodyRef": null,
|
|
12114
12156
|
"credential": "siteScoped"
|
|
12115
12157
|
},
|
|
12158
|
+
{
|
|
12159
|
+
"id": "delete:/api/sites/{siteId}/trash",
|
|
12160
|
+
"method": "DELETE",
|
|
12161
|
+
"path": "/api/sites/{siteId}/trash",
|
|
12162
|
+
"tags": [
|
|
12163
|
+
"sites"
|
|
12164
|
+
],
|
|
12165
|
+
"summary": "Permanently delete a site that is in the trash",
|
|
12166
|
+
"params": [
|
|
12167
|
+
{
|
|
12168
|
+
"name": "siteId",
|
|
12169
|
+
"in": "path",
|
|
12170
|
+
"required": true,
|
|
12171
|
+
"type": "string",
|
|
12172
|
+
"description": "Site ID"
|
|
12173
|
+
}
|
|
12174
|
+
],
|
|
12175
|
+
"bodyDescribed": false,
|
|
12176
|
+
"bodyRef": null,
|
|
12177
|
+
"credential": "siteScoped"
|
|
12178
|
+
},
|
|
12116
12179
|
{
|
|
12117
12180
|
"id": "get:/api/sites/{siteId}/webhooks",
|
|
12118
12181
|
"method": "GET",
|