sbuilder-mcp 0.4.4 → 0.6.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,31 @@ 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.6.0] - 2026-09-08
10
+
11
+ ### Added
12
+ - sb_store now takes action:"form" alongside action:"checkout", seeding any of the platform's 17 form templates (contact, subscribe, order, address, consult, booking, stay, feedback, event, quote, apply, and the five auth forms login, register, forgot, verify, reset) with their own field document, instead of the checkout order form being the only one this server could build; it creates the form, PUTs it back whole (a bare create is otherwise silently renamed and turned custom), then saves the template's field document, deleting the form again if either write fails. It makes no page, since where a login form belongs is a design decision — place it with sb_add and point specials.formId at the id returned.
13
+
14
+ ### Fixed
15
+ - sb_review no longer reports empty_container on a global section's or app block's reference node, since a page stores its shared header or footer as an empty node stamped globalRef or appBlockRef that the platform composes the master into on read; the fix the finding used to name, adding something inside it, was decomposed away by the very next save.
16
+
17
+ ## [0.5.0] - 2026-09-08
18
+
19
+ ### Added
20
+ - sb_review reports default_seed_copy when a satellite's empty state still carries the platform's own English seed text, such as a repeater's empty state saying "No products yet", which previously matched no rule and reviewed clean.
21
+ - sb_review reports form_fields_flush when a form, form-segment or form-step-nav stacks its fields with no gap between them, so each label reads as belonging to the control above it.
22
+ - The install CLI accepts --site-name, matching the flag the platform's own Agent app install line already appends; it rides in as SB_SITE_NAME alongside the site id, and sb_connect reports it back so a session can display the store's name instead of its id.
23
+ - A dry run of the install CLI now reports its own preview outcome and exit code instead of reusing the failure marker and exit code of a real install.
24
+ - sb_api_call now falls back {siteId} and {siteID} path parameters to SB_SITE across all 289 operations that name the site, matching the fallback every other tool already applies through siteFor(); an explicit argument still wins.
25
+
26
+ ### Fixed
27
+ - sb_set's state parameter now writes to the location the platform's cascade actually reads: node.states[state] at base, node.responsive[breakpoint].states[state] per breakpoint. Previously it wrote to a path nothing reads, and base:true combined with state:"hover" wrote the hover value straight into the plain style, leaving a node permanently styled as if hovered with no hover state at all.
28
+ - sb_set now refuses a state argument on specials instead of silently dropping it, since content and identity do not vary by interaction state.
29
+ - sb_review now walks into satellite nodes (a repeater's empty state, a variant option's skin, a quantity stepper's buttons, a menu or tab item's skin), so findings inside them are reported instead of being invisible to every check.
30
+ - sb_review and sb_set now report a site-wide edit as such: a change to a node inside a global section's interior, or inside a site overlay like the cart drawer, is flagged rather than reading as an ordinary page-local edit.
31
+ - sb_look now opens a closed overlay (such as the cart drawer) before measuring it, so a node_id resolving inside one can be photographed at all instead of failing with a clipping error that named neither the overlay nor the reason.
32
+ - sb_look's preview_note no longer claims the draft preview renders every repeater's empty state; the draft preview threads real store data just like a published page, and the note now describes the real caveat, which is that an entity template previews with nothing bound.
33
+
9
34
  ## [0.4.4] - 2026-09-08
10
35
 
11
36
  ### Added
package/CHANGELOG.vi.md CHANGED
@@ -6,6 +6,31 @@ 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.6.0] - 2026-09-08
10
+
11
+ ### Added
12
+ - sb_store giờ nhận action:"form" bên cạnh action:"checkout", gieo bất kỳ template nào trong 17 template form của nền tảng (contact, subscribe, order, address, consult, booking, stay, feedback, event, quote, apply, và năm form xác thực login, register, forgot, verify, reset) cùng field document riêng của nó, thay vì trước đây server này chỉ dựng được đúng order form của checkout; nó tạo form, PUT lại nguyên vẹn (nếu không thì một lần tạo đơn thuần sẽ bị âm thầm đổi tên và chuyển thành custom), rồi lưu field document của template, và xoá lại form nếu một trong hai lệnh ghi đó thất bại. Nó không tạo trang, vì đặt form login ở đâu là quyết định thiết kế — hãy đặt form bằng sb_add rồi trỏ specials.formId vào id được trả về.
13
+
14
+ ### Fixed
15
+ - sb_review không còn báo cáo empty_container trên node tham chiếu của một global section hay app block, vì một trang lưu header hoặc footer dùng chung dưới dạng node rỗng gắn cờ globalRef hoặc appBlockRef mà nền tảng sẽ ghép bản gốc vào khi đọc; cách sửa mà finding này từng nêu ra — thêm gì đó vào bên trong — sẽ bị lần lưu kế tiếp phân rã mất ngay.
16
+
17
+ ## [0.5.0] - 2026-09-08
18
+
19
+ ### Added
20
+ - sb_review giờ báo cáo default_seed_copy khi một node vệ tinh ở trạng thái rỗng vẫn còn mang seed text tiếng Anh của nền tảng, chẳng hạn trạng thái rỗng của một repeater ghi "No products yet" — trước đây không khớp với rule nào nên review vẫn báo sạch.
21
+ - sb_review giờ báo cáo form_fields_flush khi một form, form-segment hoặc form-step-nav xếp các field mà không có gap, khiến mỗi label đọc như thể thuộc về control phía trên nó.
22
+ - CLI cài đặt giờ nhận --site-name, khớp với flag mà dòng lệnh cài đặt của chính Agent app trên nền tảng đã thêm vào; giá trị này đi kèm dưới dạng SB_SITE_NAME cùng với site id, và sb_connect báo cáo lại giá trị này để một session có thể hiển thị tên cửa hàng thay vì id.
23
+ - Một dry run của CLI cài đặt giờ báo cáo kết quả xem trước và exit code riêng, thay vì dùng chung dấu hiệu thất bại và exit code của một lần cài đặt thật.
24
+ - sb_api_call giờ fallback các path parameter {siteId} và {siteID} về SB_SITE trên toàn bộ 289 operation có tên site, khớp với cách fallback mà mọi tool khác đã áp dụng qua siteFor(); một tham số được truyền rõ ràng vẫn được ưu tiên.
25
+
26
+ ### Fixed
27
+ - Tham số state của sb_set giờ ghi đúng vào vị trí mà cascade của nền tảng thực sự đọc: node.states[state] ở base, node.responsive[breakpoint].states[state] theo từng breakpoint. Trước đây nó ghi vào một đường dẫn không ai đọc, và base:true kết hợp với state:"hover" ghi thẳng giá trị hover vào style thường, khiến node mang màu hover vĩnh viễn mà không hề có trạng thái hover.
28
+ - sb_set giờ từ chối tham số state trên specials thay vì âm thầm bỏ qua, vì nội dung và identity không thay đổi theo trạng thái tương tác.
29
+ - sb_review giờ đi vào cả các node vệ tinh (trạng thái rỗng của repeater, skin của một variant option, các nút của quantity stepper, skin của một mục menu hoặc tab), nên các finding bên trong chúng được báo cáo thay vì vô hình với mọi check.
30
+ - sb_review và sb_set giờ báo cáo một chỉnh sửa có phạm vi toàn site đúng như bản chất của nó: thay đổi một node bên trong phần thân của một global section, hoặc bên trong một overlay của site như cart drawer, giờ được gắn cờ thay vì đọc như một chỉnh sửa cục bộ trên trang.
31
+ - sb_look giờ mở một overlay đang đóng (như cart drawer) trước khi đo, nên một node_id nằm bên trong overlay đó giờ có thể được chụp ảnh, thay vì thất bại với lỗi clip không nêu rõ overlay hay lý do.
32
+ - preview_note của sb_look không còn khẳng định rằng bản xem trước bản nháp render trạng thái rỗng của mọi repeater; bản xem trước bản nháp truyền dữ liệu cửa hàng thật giống như một trang đã publish, và ghi chú giờ mô tả đúng lưu ý thực sự — đó là một entity template xem trước sẽ không có gì được bind.
33
+
9
34
  ## [0.4.4] - 2026-09-08
10
35
 
11
36
  ### Added
package/README.md CHANGED
@@ -23,6 +23,11 @@ worse than one that does not exist.
23
23
  as `SB_SITE` and every tool then defaults to it. Without it the model has to carry the id
24
24
  through the session, which it can only get by listing pages and reading one back.
25
25
 
26
+ `--site-name "Your Store"` rides alongside it as `SB_SITE_NAME`. It is a label, never an
27
+ address — nothing resolves by it — but it lets the agent say the store's name back to you
28
+ instead of a 32-character id you did not choose. The **Apps → AI agent** screen appends it
29
+ whenever the store has a name.
30
+
26
31
  It **merges**: the servers already in those files stay, whatever it replaces is copied to
27
32
  `<file>.sbuilder-backup`, and a config it cannot parse is refused rather than overwritten —
28
33
  a file with a trailing comma is far likelier than one worth discarding, and it is what you
@@ -93,7 +98,7 @@ make, because those mean "this person's account".
93
98
  | `sb_look` | Save, render, and return screenshots plus measured node boxes and layout defects measured on the render |
94
99
  | `sb_event` | Give a node a click action — open the cart, go to a page, open a pop-up |
95
100
  | `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 |
101
+ | `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 |
97
102
  | `sb_undo` | Put back what a PUT replaced — the platform has no page history or restore, so this is the only way back |
98
103
 
99
104
  Twenty-eight tools, **484 API operations** (158 of the 212 writes carrying a body shape read
package/README.vi.md CHANGED
@@ -23,6 +23,11 @@ còn tệ hơn một cờ không tồn tại.
23
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
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.
25
25
 
26
+ `--site-name "Tên Cửa Hàng"` đi kèm, được ghi thành `SB_SITE_NAME`. Nó là một nhãn, không phải
27
+ địa chỉ — không có gì phân giải theo nó — nhưng nhờ nó agent gọi được tên cửa hàng thay vì
28
+ đọc lại một id 32 ký tự bạn không đặt. Màn hình **Apps → AI agent** tự thêm nó khi cửa hàng
29
+ có tên.
30
+
26
31
  Nó **gộp**: các server đã có trong file được giữ nguyên, thứ nó thay thế được chép sang
27
32
  `<file>.sbuilder-backup`, và một config nó không đọc được thì bị từ chối chứ không ghi đè —
28
33
  một file thừa dấu phẩy khả dĩ hơn nhiều một file đáng vứt, và đó chính là thứ bạn cần để sửa.
@@ -90,7 +95,7 @@ là "tài khoản của người này".
90
95
  | `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
96
  | `sb_event` | Gắn click action cho một node — mở giỏ, sang trang, mở pop-up |
92
97
  | `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 |
98
+ | `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ó |
94
99
  | `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 |
95
100
 
96
101
  Hai mươi tám tool, **484 operation API** (158 trong 212 lệnh ghi có hình dạng body đọc thẳng
@@ -1,6 +1,6 @@
1
1
  export const SWAGGER_SOURCE = {
2
- "operations": 484,
3
- "definitions": 99,
2
+ "operations": 485,
3
+ "definitions": 102,
4
4
  "bodyCarrying": 171,
5
5
  "bodyUndescribed": 62,
6
6
  "generatedFrom": "server/docs/swagger.json"
@@ -10646,6 +10646,34 @@ export const API_OPERATIONS = [
10646
10646
  "bodyRef": null,
10647
10647
  "credential": "siteScoped"
10648
10648
  },
10649
+ {
10650
+ "id": "get:/api/sites/{siteId}/relation-slots/usage",
10651
+ "method": "GET",
10652
+ "path": "/api/sites/{siteId}/relation-slots/usage",
10653
+ "tags": [
10654
+ "relations"
10655
+ ],
10656
+ "summary": "How many curated shelves reference an item",
10657
+ "params": [
10658
+ {
10659
+ "name": "siteId",
10660
+ "in": "path",
10661
+ "required": true,
10662
+ "type": "string",
10663
+ "description": "Site ID"
10664
+ },
10665
+ {
10666
+ "name": "itemId",
10667
+ "in": "query",
10668
+ "required": true,
10669
+ "type": "string",
10670
+ "description": "Product or article id"
10671
+ }
10672
+ ],
10673
+ "bodyDescribed": false,
10674
+ "bodyRef": null,
10675
+ "credential": "siteScoped"
10676
+ },
10649
10677
  {
10650
10678
  "id": "post:/api/sites/{siteId}/restore",
10651
10679
  "method": "POST",
@@ -15482,6 +15510,36 @@ export const API_DEFINITIONS = {
15482
15510
  }
15483
15511
  }
15484
15512
  },
15513
+ "github_com_webbuilder_server_internal_products.BundleItem": {
15514
+ "type": "object",
15515
+ "properties": {
15516
+ "position": {
15517
+ "description": "Position is the merchant's arrangement — the order the components are\nlisted on the product page.",
15518
+ "type": "integer"
15519
+ },
15520
+ "productId": {
15521
+ "type": "string"
15522
+ },
15523
+ "quantity": {
15524
+ "description": "Quantity is how many units of the component one combo contains (≥ 1).",
15525
+ "type": "integer"
15526
+ },
15527
+ "variantId": {
15528
+ "type": "string"
15529
+ }
15530
+ }
15531
+ },
15532
+ "github_com_webbuilder_server_internal_products.BundlePricing": {
15533
+ "type": "string",
15534
+ "enum": [
15535
+ "fixed",
15536
+ "percent"
15537
+ ],
15538
+ "x-enum-varnames": [
15539
+ "BundlePricingFixed",
15540
+ "BundlePricingPercent"
15541
+ ]
15542
+ },
15485
15543
  "github_com_webbuilder_server_internal_products.MetaTag": {
15486
15544
  "type": "object",
15487
15545
  "properties": {
@@ -15533,6 +15591,24 @@ export const API_DEFINITIONS = {
15533
15591
  "brand": {
15534
15592
  "type": "string"
15535
15593
  },
15594
+ "bundleItems": {
15595
+ "description": "BundleItems is what one combo contains. Empty on every simple product, and\non a combo a merchant has not finished building — which is authorable but\nnot sellable (ApplyBundleTotals).",
15596
+ "type": "array",
15597
+ "items": {
15598
+ "$ref": "#/definitions/github_com_webbuilder_server_internal_products.BundleItem"
15599
+ }
15600
+ },
15601
+ "bundlePricing": {
15602
+ "description": "BundlePricing and BundleValue are how a combo is priced: a flat price in\ncents (\"fixed\") or a percentage off the components' total (\"percent\",\n0–100). The two share one Value field for the reason discounts.Discount\ndoes — the unit is a function of the mode, and two fields would let a\nmerchant leave the unused one holding a number that means nothing.\n\nBoth are ignored (and cleared) on a simple product.",
15603
+ "allOf": [
15604
+ {
15605
+ "$ref": "#/definitions/github_com_webbuilder_server_internal_products.BundlePricing"
15606
+ }
15607
+ ]
15608
+ },
15609
+ "bundleValue": {
15610
+ "type": "integer"
15611
+ },
15536
15612
  "compareAtCents": {
15537
15613
  "description": "CompareAt of the min-price visible variant; 0 = none",
15538
15614
  "type": "integer"
@@ -15558,6 +15634,14 @@ export const API_DEFINITIONS = {
15558
15634
  "type": "string"
15559
15635
  }
15560
15636
  },
15637
+ "kind": {
15638
+ "description": "Kind says whether this is an ordinary product or a COMBO whose price and\navailability are derived from the components in BundleItems. Absent on the\nwire means simple — see bundle.go, which owns every rule below.",
15639
+ "allOf": [
15640
+ {
15641
+ "$ref": "#/definitions/github_com_webbuilder_server_internal_products.ProductKind"
15642
+ }
15643
+ ]
15644
+ },
15561
15645
  "moneyOverride": {
15562
15646
  "description": "MoneyOverride is an opaque per-product money-display override (compact-convert\nrules + exchange-rate overrides), stored as a JSONB blob. The domain keeps it\nopaque — it is decoded at the render boundary (bindings.ProductSource →\nrender.ProductData) — so products stays decoupled from render/money, the same\nway the site settings document is an opaque blob. Empty ({}/null) → no override.",
15563
15647
  "type": "array",
@@ -15694,6 +15778,17 @@ export const API_DEFINITIONS = {
15694
15778
  }
15695
15779
  }
15696
15780
  },
15781
+ "github_com_webbuilder_server_internal_products.ProductKind": {
15782
+ "type": "string",
15783
+ "enum": [
15784
+ "simple",
15785
+ "bundle"
15786
+ ],
15787
+ "x-enum-varnames": [
15788
+ "ProductKindSimple",
15789
+ "ProductKindBundle"
15790
+ ]
15791
+ },
15697
15792
  "github_com_webbuilder_server_internal_products.ProductStatus": {
15698
15793
  "type": "string",
15699
15794
  "enum": [