sbuilder-mcp 0.6.0 → 0.7.1

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,26 @@ 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.7.1] - 2026-09-08
10
+
11
+ ### Added
12
+ - sb_import takes max_images (default 24), bounding how many images it uploads from the imported page, since every image is a real upload and a page shape like a sponsors wall can carry dozens of them in a single tool call.
13
+
14
+ ### Fixed
15
+ - sb_import no longer duplicates content that sits inside a nested section; it previously matched every `<section>` on the page, so an outer band and the bands nested inside it were both captured and the inner content came back twice. Only the innermost matching section is now kept, since the outermost is a candidate too and keeping it would reduce the whole page to one band.
16
+
17
+ ## [0.7.0] - 2026-09-08
18
+
19
+ ### Added
20
+ - sb_import reads any public URL and adds its structure and content to the open page as real elements — section, heading, text, image, button, list — dressed in that page's own tokens (ink and weight off the first heading, colour and size off the first body line, fill and radius off the first non-transparent button) instead of embedding the source's raw markup. An image is bounded in both axes rather than only capped in width, since an SVG has no intrinsic pixel size and would otherwise stretch a section into thousands of pixels of empty space; each image is uploaded into the site's own media library, falling back to the original URL on a failed upload, and a failure is reported grouped and counted by reason rather than as a bare count. dry_run (the default) returns what was found before anything is added.
21
+ - npm run codegen:check runs the catalog generator against a committed platform ref and writes nothing, exiting 1 and naming every file that would change, so a stale catalog is caught before a tool starts describing an element or operation the platform no longer has.
22
+
23
+ ### Changed
24
+ - The element and API catalog is regenerated: adds the bundle-items element and the kind, bundlePricing, bundleValue and bundleItems fields on a product, plus a set of relation-slot operations and a storefront-string levelling command; sb_api_find's token budget ceiling is raised to 3,500 to hold the larger product call sheet.
25
+
26
+ ### Fixed
27
+ - sb_look can now photograph a node whose box sits below roughly the first 900px of the page; a clip request previously ran against the viewport alone and failed with Playwright's "Clipped area is either empty or outside the resulting image" for anything further down, and it now captures the full page first so the clip lines up regardless of where the node sits.
28
+
9
29
  ## [0.6.0] - 2026-09-08
10
30
 
11
31
  ### Added
package/CHANGELOG.vi.md CHANGED
@@ -6,6 +6,26 @@ 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.7.1] - 2026-09-08
10
+
11
+ ### Added
12
+ - sb_import nhận max_images (mặc định 24), giới hạn số ảnh nó tải lên từ trang được import, vì mỗi ảnh là một lần upload thật và một dạng trang như tường tài trợ có thể chứa hàng chục ảnh trong một lần gọi tool.
13
+
14
+ ### Fixed
15
+ - sb_import không còn nhân đôi nội dung nằm trong một section lồng nhau; trước đây nó khớp với mọi `<section>` trên trang, nên một band bên ngoài và các band lồng bên trong nó đều bị lấy, khiến nội dung bên trong xuất hiện hai lần. Giờ chỉ section trong cùng khớp được giữ lại, vì section ngoài cùng cũng là một ứng viên và giữ nó sẽ làm cả trang chỉ còn một band.
16
+
17
+ ## [0.7.0] - 2026-09-08
18
+
19
+ ### Added
20
+ - sb_import đọc bất kỳ URL công khai nào và thêm cấu trúc, nội dung của nó vào trang đang mở dưới dạng các element thật — section, heading, text, image, button, list — được khoác token của chính trang đó (màu và độ đậm lấy từ heading đầu tiên, màu và cỡ chữ lấy từ dòng văn bản đầu tiên, màu nền và bo góc lấy từ nút không trong suốt đầu tiên) thay vì nhúng nguyên markup của nguồn. Một ảnh được giới hạn kích thước ở cả hai chiều thay vì chỉ giới hạn chiều rộng, vì một SVG không có kích thước pixel nội tại nên nếu không sẽ kéo dài cả một section thành hàng nghìn pixel khoảng trắng; mỗi ảnh được tải lên thư viện media của chính site, giữ nguyên URL gốc nếu upload thất bại, và một lỗi upload được báo cáo theo nhóm và đếm theo lý do thay vì chỉ là một con số trần trụi. dry_run (mặc định) trả về những gì tìm thấy trước khi thêm bất cứ thứ gì.
21
+ - npm run codegen:check chạy trình sinh catalog dựa trên một ref đã commit của nền tảng và không ghi gì cả, thoát với mã 1 và nêu tên mọi file sẽ thay đổi, để một catalog cũ được phát hiện trước khi một tool bắt đầu mô tả một element hay operation mà nền tảng không còn nữa.
22
+
23
+ ### Changed
24
+ - Catalog element và API được tạo lại: thêm element bundle-items cùng các trường kind, bundlePricing, bundleValue và bundleItems trên một sản phẩm, cùng một loạt operation cho relation-slot và lệnh làm phẳng chuỗi storefront; trần token budget của sb_api_find được nâng lên 3.500 để chứa call sheet sản phẩm lớn hơn.
25
+
26
+ ### Fixed
27
+ - sb_look giờ có thể chụp được một node có box nằm dưới khoảng 900px đầu tiên của trang; trước đây một yêu cầu clip chỉ chạy trên viewport và thất bại với lỗi "Clipped area is either empty or outside the resulting image" của Playwright với bất kỳ node nào nằm xa hơn, và giờ nó chụp toàn trang trước để tọa độ clip khớp bất kể node nằm ở đâu.
28
+
9
29
  ## [0.6.0] - 2026-09-08
10
30
 
11
31
  ### Added
package/README.md CHANGED
@@ -98,6 +98,7 @@ make, because those mean "this person's account".
98
98
  | `sb_look` | Save, render, and return screenshots plus measured node boxes and layout defects measured on the render |
99
99
  | `sb_event` | Give a node a click action — open the cart, go to a page, open a pop-up |
100
100
  | `sb_bind` | Bind a node's content to real store data, or make a button add to the cart |
101
+ | `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 |
101
102
  | `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 |
102
103
  | `sb_undo` | Put back what a PUT replaced — the platform has no page history or restore, so this is the only way back |
103
104
 
package/README.vi.md CHANGED
@@ -95,6 +95,7 @@ là "tài khoản của người này".
95
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 |
96
96
  | `sb_event` | Gắn click action cho một node — mở giỏ, sang trang, mở pop-up |
97
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ỏ |
98
+ | `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 |
98
99
  | `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ó |
99
100
  | `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 |
100
101
 
@@ -1,8 +1,8 @@
1
1
  export const SWAGGER_SOURCE = {
2
- "operations": 485,
2
+ "operations": 486,
3
3
  "definitions": 102,
4
- "bodyCarrying": 171,
5
- "bodyUndescribed": 62,
4
+ "bodyCarrying": 172,
5
+ "bodyUndescribed": 63,
6
6
  "generatedFrom": "server/docs/swagger.json"
7
7
  };
8
8
  export const API_OPERATIONS = [
@@ -10226,14 +10226,58 @@ export const API_OPERATIONS = [
10226
10226
  "bodyRef": "github_com_webbuilder_server_internal_products.Product",
10227
10227
  "credential": "siteScoped"
10228
10228
  },
10229
+ {
10230
+ "id": "get:/api/sites/{siteId}/products/{id}/bundles",
10231
+ "method": "GET",
10232
+ "path": "/api/sites/{siteId}/products/{id}/bundles",
10233
+ "tags": [
10234
+ "products",
10235
+ "products"
10236
+ ],
10237
+ "summary": "Bundles containing a product",
10238
+ "params": [
10239
+ {
10240
+ "name": "siteId",
10241
+ "in": "path",
10242
+ "required": true,
10243
+ "type": "string",
10244
+ "description": "Site ID"
10245
+ },
10246
+ {
10247
+ "name": "body",
10248
+ "in": "body",
10249
+ "required": false,
10250
+ "type": "object",
10251
+ "description": "Category IDs to set (PUT only): {\\"
10252
+ },
10253
+ {
10254
+ "name": "siteId",
10255
+ "in": "path",
10256
+ "required": true,
10257
+ "type": "string",
10258
+ "description": "Site ID"
10259
+ },
10260
+ {
10261
+ "name": "id",
10262
+ "in": "path",
10263
+ "required": true,
10264
+ "type": "string",
10265
+ "description": "Product ID"
10266
+ }
10267
+ ],
10268
+ "bodyDescribed": false,
10269
+ "bodyRef": null,
10270
+ "credential": "siteScoped"
10271
+ },
10229
10272
  {
10230
10273
  "id": "get:/api/sites/{siteId}/products/{productId}/categories",
10231
10274
  "method": "GET",
10232
10275
  "path": "/api/sites/{siteId}/products/{productId}/categories",
10233
10276
  "tags": [
10277
+ "products",
10234
10278
  "products"
10235
10279
  ],
10236
- "summary": "Get or set a product's category links",
10280
+ "summary": "Bundles containing a product",
10237
10281
  "params": [
10238
10282
  {
10239
10283
  "name": "siteId",
@@ -10255,6 +10299,13 @@ export const API_OPERATIONS = [
10255
10299
  "required": false,
10256
10300
  "type": "object",
10257
10301
  "description": "Category IDs to set (PUT only): {\\"
10302
+ },
10303
+ {
10304
+ "name": "siteId",
10305
+ "in": "path",
10306
+ "required": true,
10307
+ "type": "string",
10308
+ "description": "Site ID"
10258
10309
  }
10259
10310
  ],
10260
10311
  "bodyDescribed": false,
@@ -10266,9 +10317,10 @@ export const API_OPERATIONS = [
10266
10317
  "method": "PUT",
10267
10318
  "path": "/api/sites/{siteId}/products/{productId}/categories",
10268
10319
  "tags": [
10320
+ "products",
10269
10321
  "products"
10270
10322
  ],
10271
- "summary": "Get or set a product's category links",
10323
+ "summary": "Bundles containing a product",
10272
10324
  "params": [
10273
10325
  {
10274
10326
  "name": "siteId",
@@ -10290,6 +10342,13 @@ export const API_OPERATIONS = [
10290
10342
  "required": false,
10291
10343
  "type": "object",
10292
10344
  "description": "Category IDs to set (PUT only): {\\"
10345
+ },
10346
+ {
10347
+ "name": "siteId",
10348
+ "in": "path",
10349
+ "required": true,
10350
+ "type": "string",
10351
+ "description": "Site ID"
10293
10352
  }
10294
10353
  ],
10295
10354
  "bodyDescribed": false,
@@ -5047,7 +5047,8 @@ export const FORM_TEMPLATES = {
5047
5047
  "freg_3",
5048
5048
  "freg_4",
5049
5049
  "freg_5",
5050
- "freg_6"
5050
+ "freg_6",
5051
+ "freg_7"
5051
5052
  ],
5052
5053
  "isCanvas": false,
5053
5054
  "hidden": false,
@@ -5226,6 +5227,46 @@ export const FORM_TEMPLATES = {
5226
5227
  },
5227
5228
  "freg_6": {
5228
5229
  "id": "freg_6",
5230
+ "data": {
5231
+ "type": "form-text",
5232
+ "parent": "freg_1",
5233
+ "nodes": [],
5234
+ "isCanvas": false,
5235
+ "hidden": false,
5236
+ "custom": {}
5237
+ },
5238
+ "style": {
5239
+ "width": "100%"
5240
+ },
5241
+ "config": {
5242
+ "iconPosition": "left"
5243
+ },
5244
+ "specials": {
5245
+ "showIcon": false,
5246
+ "iconName": "",
5247
+ "name": "confirmPassword",
5248
+ "label": "Nhập lại mật khẩu",
5249
+ "placeholder": "",
5250
+ "description": "",
5251
+ "required": true,
5252
+ "showLabel": true,
5253
+ "mapTo": "",
5254
+ "prefillValue": "",
5255
+ "multiline": false,
5256
+ "inputType": "password",
5257
+ "limitChars": false,
5258
+ "minChars": 0,
5259
+ "maxChars": 500,
5260
+ "patternPreset": "",
5261
+ "pattern": "",
5262
+ "patternCountries": []
5263
+ },
5264
+ "responsive": {},
5265
+ "events": [],
5266
+ "bindings": []
5267
+ },
5268
+ "freg_7": {
5269
+ "id": "freg_7",
5229
5270
  "data": {
5230
5271
  "type": "form-submit",
5231
5272
  "parent": "freg_1",
@@ -5593,7 +5634,8 @@ export const FORM_TEMPLATES = {
5593
5634
  "fres_3",
5594
5635
  "fres_4",
5595
5636
  "fres_5",
5596
- "fres_6"
5637
+ "fres_6",
5638
+ "fres_7"
5597
5639
  ],
5598
5640
  "isCanvas": false,
5599
5641
  "hidden": false,
@@ -5772,6 +5814,46 @@ export const FORM_TEMPLATES = {
5772
5814
  },
5773
5815
  "fres_6": {
5774
5816
  "id": "fres_6",
5817
+ "data": {
5818
+ "type": "form-text",
5819
+ "parent": "fres_1",
5820
+ "nodes": [],
5821
+ "isCanvas": false,
5822
+ "hidden": false,
5823
+ "custom": {}
5824
+ },
5825
+ "style": {
5826
+ "width": "100%"
5827
+ },
5828
+ "config": {
5829
+ "iconPosition": "left"
5830
+ },
5831
+ "specials": {
5832
+ "showIcon": false,
5833
+ "iconName": "",
5834
+ "name": "confirmPassword",
5835
+ "label": "Nhập lại mật khẩu mới",
5836
+ "placeholder": "",
5837
+ "description": "",
5838
+ "required": true,
5839
+ "showLabel": true,
5840
+ "mapTo": "",
5841
+ "prefillValue": "",
5842
+ "multiline": false,
5843
+ "inputType": "password",
5844
+ "limitChars": false,
5845
+ "minChars": 0,
5846
+ "maxChars": 500,
5847
+ "patternPreset": "",
5848
+ "pattern": "",
5849
+ "patternCountries": []
5850
+ },
5851
+ "responsive": {},
5852
+ "events": [],
5853
+ "bindings": []
5854
+ },
5855
+ "fres_7": {
5856
+ "id": "fres_7",
5775
5857
  "data": {
5776
5858
  "type": "form-submit",
5777
5859
  "parent": "fres_1",