sbuilder-mcp 0.112.2 → 0.113.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 +17 -0
- package/CHANGELOG.vi.md +17 -0
- package/README.md +1 -1
- package/README.vi.md +1 -1
- package/dist/catalog/api.generated.js +2 -2
- package/dist/catalog/deadkeys.generated.js +2 -2
- package/dist/catalog/elements.generated.js +394 -0
- package/dist/catalog/shapes.generated.js +1 -1
- package/dist/catalog/source.generated.js +2 -2
- package/dist/domains/site/writecheck.js +9 -14
- package/dist/tools/page.js +3 -3
- package/dist/tools/store.js +13 -4
- package/dist/tools/tracking.js +55 -0
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -6,6 +6,23 @@ 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.113.0] - 2026-11-23
|
|
10
|
+
|
|
11
|
+
### Added
|
|
12
|
+
- `sb_store` `action: "tracking"` with `provider` and `config` writes a tracker's extra fields (Google Ads labels, a test event code, a server-events token), where `""` clears a field and the token is masked in a plan and never returned.
|
|
13
|
+
- `sb_store` `action: "tracking"` with `provider` and `test` sends the platform's test event.
|
|
14
|
+
- `sb_store` `action: "tracking"` status relays the platform's integrations health advice, and reports it as unavailable on an older platform instead of failing.
|
|
15
|
+
- The element catalog adds the text-dataset kind `sku` and the `product.sku` binding source, regenerated against web_builder baea13efb.
|
|
16
|
+
- The API catalog adds the ChatGPT Ads CAPI key, the TikTok test code and submit clicks, regenerated against web_builder fa1afd866.
|
|
17
|
+
|
|
18
|
+
## [0.112.3] - 2026-11-21
|
|
19
|
+
|
|
20
|
+
### Changed
|
|
21
|
+
- `sb_set` now defaults `pin_wider` to on (pass `pin_wider: false` to opt out), so a style key written at a narrow breakpoint no longer leaks to wider ones.
|
|
22
|
+
|
|
23
|
+
### Fixed
|
|
24
|
+
- `sb_set` pins an empty value for a wider breakpoint when no safe value exists (a preset or the element's own stylesheet sets the key, or a colour has no neutral), so neither the preset nor the element CSS is overridden.
|
|
25
|
+
|
|
9
26
|
## [0.112.2] - 2026-11-21
|
|
10
27
|
|
|
11
28
|
### Added
|
package/CHANGELOG.vi.md
CHANGED
|
@@ -6,6 +6,23 @@ 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.113.0] - 2026-11-23
|
|
10
|
+
|
|
11
|
+
### Added
|
|
12
|
+
- `sb_store` `action: "tracking"` với `provider` và `config` ghi các trường bổ sung của tracker (nhãn Google Ads, mã test event, token server-events), trong đó `""` xóa trường và token được che trong bản xem trước và không bao giờ được trả về.
|
|
13
|
+
- `sb_store` `action: "tracking"` với `provider` và `test` gửi test event của nền tảng.
|
|
14
|
+
- Trạng thái `sb_store` `action: "tracking"` chuyển tiếp lời khuyên về sức khỏe tích hợp của nền tảng, và báo là không khả dụng trên nền tảng cũ thay vì thất bại.
|
|
15
|
+
- Danh mục element có thêm kind `sku` của text-dataset và nguồn binding `product.sku`, được tạo lại theo web_builder baea13efb.
|
|
16
|
+
- Danh mục API có thêm khóa ChatGPT Ads CAPI, mã test của TikTok và lượt nhấn submit, được tạo lại theo web_builder fa1afd866.
|
|
17
|
+
|
|
18
|
+
## [0.112.3] - 2026-11-21
|
|
19
|
+
|
|
20
|
+
### Changed
|
|
21
|
+
- `sb_set` nay bật `pin_wider` theo mặc định (truyền `pin_wider: false` để tắt), nên khóa style ghi ở breakpoint hẹp không còn lan sang các breakpoint rộng hơn.
|
|
22
|
+
|
|
23
|
+
### Fixed
|
|
24
|
+
- `sb_set` ghim giá trị rỗng cho breakpoint rộng hơn khi không có giá trị an toàn (preset hoặc stylesheet riêng của element đã đặt khóa đó, hoặc màu không có giá trị trung tính), nên preset và CSS của element không bị ghi đè.
|
|
25
|
+
|
|
9
26
|
## [0.112.2] - 2026-11-21
|
|
10
27
|
|
|
11
28
|
### Added
|
package/README.md
CHANGED
|
@@ -143,7 +143,7 @@ in this client: one would put the very key the platform exists to hold back into
|
|
|
143
143
|
| `sb_undo` | Undo / redo this session's writes — page and form edits and `sb_api_call` PUTs, each named by tool and target, the open page's by default (`all: true` for every page); a page is refused if someone else saved it since. The platform's versions and history (`sb_page_version`) outlive this process |
|
|
144
144
|
|
|
145
145
|
Forty tools, **1013 API operations** (376 of the 467 writes carrying a body shape read
|
|
146
|
-
off the handler), 125 elements,
|
|
146
|
+
off the handler), 125 elements, 99 binding sources. `sb_api_find`
|
|
147
147
|
is an index rather than a tool per endpoint, so the tool list stays short while everything
|
|
148
148
|
the platform can do stays reachable — and operations added to the platform arrive with the
|
|
149
149
|
next `npm run codegen`.
|
package/README.vi.md
CHANGED
|
@@ -139,7 +139,7 @@ nhét ngược lại vào mọi bản cài.
|
|
|
139
139
|
| `sb_undo` | Hoàn tác / làm lại các thao tác ghi trong phiên — chỉnh sửa trang, form và PUT qua `sb_api_call`, mỗi mục ghi tên tool và đối tượng, mặc định của trang đang mở (`all: true` cho mọi trang); trang bị từ chối nếu người khác đã lưu sau đó. Version và history của nền tảng (`sb_page_version`) sống lâu hơn process này |
|
|
140
140
|
|
|
141
141
|
Bốn mươi tool, **1013 operation API** (376 trong 467 lệnh ghi có hình dạng body đọc thẳng
|
|
142
|
-
từ handler), 125 element,
|
|
142
|
+
từ handler), 125 element, 99 nguồn binding. `sb_api_find` là
|
|
143
143
|
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
|
|
144
144
|
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
|
|
145
145
|
`npm run codegen` kế tiếp.
|
|
@@ -14302,7 +14302,7 @@ export const API_OPERATIONS = [
|
|
|
14302
14302
|
"tags": [
|
|
14303
14303
|
"integrations"
|
|
14304
14304
|
],
|
|
14305
|
-
"summary": "List or connect site integrations (GA4, GTM, Meta Pixel, TikTok Pixel, Google Ads, Clarity)",
|
|
14305
|
+
"summary": "List or connect site integrations (GA4, GTM, Meta Pixel, TikTok Pixel, ChatGPT Ads, Google Ads, Clarity)",
|
|
14306
14306
|
"params": [
|
|
14307
14307
|
{
|
|
14308
14308
|
"name": "siteId",
|
|
@@ -14337,7 +14337,7 @@ export const API_OPERATIONS = [
|
|
|
14337
14337
|
"tags": [
|
|
14338
14338
|
"integrations"
|
|
14339
14339
|
],
|
|
14340
|
-
"summary": "List or connect site integrations (GA4, GTM, Meta Pixel, TikTok Pixel, Google Ads, Clarity)",
|
|
14340
|
+
"summary": "List or connect site integrations (GA4, GTM, Meta Pixel, TikTok Pixel, ChatGPT Ads, Google Ads, Clarity)",
|
|
14341
14341
|
"params": [
|
|
14342
14342
|
{
|
|
14343
14343
|
"name": "siteId",
|
|
@@ -19240,6 +19240,43 @@ export const ELEMENTS = {
|
|
|
19240
19240
|
"field": "specials.boundProductId"
|
|
19241
19241
|
}
|
|
19242
19242
|
],
|
|
19243
|
+
"product|sku": [
|
|
19244
|
+
{
|
|
19245
|
+
"id": "bind-price",
|
|
19246
|
+
"source": "product.price",
|
|
19247
|
+
"field": "specials.boundPrice",
|
|
19248
|
+
"target": {
|
|
19249
|
+
"type": "product",
|
|
19250
|
+
"id": "",
|
|
19251
|
+
"kind": "sku"
|
|
19252
|
+
}
|
|
19253
|
+
},
|
|
19254
|
+
{
|
|
19255
|
+
"id": "bind-compare",
|
|
19256
|
+
"source": "product.compareAtPrice",
|
|
19257
|
+
"field": "specials.boundCompare"
|
|
19258
|
+
},
|
|
19259
|
+
{
|
|
19260
|
+
"id": "bind-price-cents",
|
|
19261
|
+
"source": "product.priceCents",
|
|
19262
|
+
"field": "specials.boundPriceCents"
|
|
19263
|
+
},
|
|
19264
|
+
{
|
|
19265
|
+
"id": "bind-compare-cents",
|
|
19266
|
+
"source": "product.compareAtCents",
|
|
19267
|
+
"field": "specials.boundCompareCents"
|
|
19268
|
+
},
|
|
19269
|
+
{
|
|
19270
|
+
"id": "bind-price-mo",
|
|
19271
|
+
"source": "product.moneyOverride",
|
|
19272
|
+
"field": "specials.boundMoneyOverride"
|
|
19273
|
+
},
|
|
19274
|
+
{
|
|
19275
|
+
"id": "bind-product-id",
|
|
19276
|
+
"source": "product.id",
|
|
19277
|
+
"field": "specials.boundProductId"
|
|
19278
|
+
}
|
|
19279
|
+
],
|
|
19243
19280
|
"category|title": [
|
|
19244
19281
|
{
|
|
19245
19282
|
"id": "bind-price",
|
|
@@ -20461,6 +20498,43 @@ export const ELEMENTS = {
|
|
|
20461
20498
|
"field": "specials.boundProductId"
|
|
20462
20499
|
}
|
|
20463
20500
|
],
|
|
20501
|
+
"category|sku": [
|
|
20502
|
+
{
|
|
20503
|
+
"id": "bind-price",
|
|
20504
|
+
"source": "product.price",
|
|
20505
|
+
"field": "specials.boundPrice",
|
|
20506
|
+
"target": {
|
|
20507
|
+
"type": "product",
|
|
20508
|
+
"id": "",
|
|
20509
|
+
"kind": "sku"
|
|
20510
|
+
}
|
|
20511
|
+
},
|
|
20512
|
+
{
|
|
20513
|
+
"id": "bind-compare",
|
|
20514
|
+
"source": "product.compareAtPrice",
|
|
20515
|
+
"field": "specials.boundCompare"
|
|
20516
|
+
},
|
|
20517
|
+
{
|
|
20518
|
+
"id": "bind-price-cents",
|
|
20519
|
+
"source": "product.priceCents",
|
|
20520
|
+
"field": "specials.boundPriceCents"
|
|
20521
|
+
},
|
|
20522
|
+
{
|
|
20523
|
+
"id": "bind-compare-cents",
|
|
20524
|
+
"source": "product.compareAtCents",
|
|
20525
|
+
"field": "specials.boundCompareCents"
|
|
20526
|
+
},
|
|
20527
|
+
{
|
|
20528
|
+
"id": "bind-price-mo",
|
|
20529
|
+
"source": "product.moneyOverride",
|
|
20530
|
+
"field": "specials.boundMoneyOverride"
|
|
20531
|
+
},
|
|
20532
|
+
{
|
|
20533
|
+
"id": "bind-product-id",
|
|
20534
|
+
"source": "product.id",
|
|
20535
|
+
"field": "specials.boundProductId"
|
|
20536
|
+
}
|
|
20537
|
+
],
|
|
20464
20538
|
"article|title": [
|
|
20465
20539
|
{
|
|
20466
20540
|
"id": "bind-price",
|
|
@@ -21682,6 +21756,43 @@ export const ELEMENTS = {
|
|
|
21682
21756
|
"field": "specials.boundProductId"
|
|
21683
21757
|
}
|
|
21684
21758
|
],
|
|
21759
|
+
"article|sku": [
|
|
21760
|
+
{
|
|
21761
|
+
"id": "bind-price",
|
|
21762
|
+
"source": "product.price",
|
|
21763
|
+
"field": "specials.boundPrice",
|
|
21764
|
+
"target": {
|
|
21765
|
+
"type": "product",
|
|
21766
|
+
"id": "",
|
|
21767
|
+
"kind": "sku"
|
|
21768
|
+
}
|
|
21769
|
+
},
|
|
21770
|
+
{
|
|
21771
|
+
"id": "bind-compare",
|
|
21772
|
+
"source": "product.compareAtPrice",
|
|
21773
|
+
"field": "specials.boundCompare"
|
|
21774
|
+
},
|
|
21775
|
+
{
|
|
21776
|
+
"id": "bind-price-cents",
|
|
21777
|
+
"source": "product.priceCents",
|
|
21778
|
+
"field": "specials.boundPriceCents"
|
|
21779
|
+
},
|
|
21780
|
+
{
|
|
21781
|
+
"id": "bind-compare-cents",
|
|
21782
|
+
"source": "product.compareAtCents",
|
|
21783
|
+
"field": "specials.boundCompareCents"
|
|
21784
|
+
},
|
|
21785
|
+
{
|
|
21786
|
+
"id": "bind-price-mo",
|
|
21787
|
+
"source": "product.moneyOverride",
|
|
21788
|
+
"field": "specials.boundMoneyOverride"
|
|
21789
|
+
},
|
|
21790
|
+
{
|
|
21791
|
+
"id": "bind-product-id",
|
|
21792
|
+
"source": "product.id",
|
|
21793
|
+
"field": "specials.boundProductId"
|
|
21794
|
+
}
|
|
21795
|
+
],
|
|
21685
21796
|
"blogCategory|title": [
|
|
21686
21797
|
{
|
|
21687
21798
|
"id": "bind-price",
|
|
@@ -22903,6 +23014,43 @@ export const ELEMENTS = {
|
|
|
22903
23014
|
"field": "specials.boundProductId"
|
|
22904
23015
|
}
|
|
22905
23016
|
],
|
|
23017
|
+
"blogCategory|sku": [
|
|
23018
|
+
{
|
|
23019
|
+
"id": "bind-price",
|
|
23020
|
+
"source": "product.price",
|
|
23021
|
+
"field": "specials.boundPrice",
|
|
23022
|
+
"target": {
|
|
23023
|
+
"type": "product",
|
|
23024
|
+
"id": "",
|
|
23025
|
+
"kind": "sku"
|
|
23026
|
+
}
|
|
23027
|
+
},
|
|
23028
|
+
{
|
|
23029
|
+
"id": "bind-compare",
|
|
23030
|
+
"source": "product.compareAtPrice",
|
|
23031
|
+
"field": "specials.boundCompare"
|
|
23032
|
+
},
|
|
23033
|
+
{
|
|
23034
|
+
"id": "bind-price-cents",
|
|
23035
|
+
"source": "product.priceCents",
|
|
23036
|
+
"field": "specials.boundPriceCents"
|
|
23037
|
+
},
|
|
23038
|
+
{
|
|
23039
|
+
"id": "bind-compare-cents",
|
|
23040
|
+
"source": "product.compareAtCents",
|
|
23041
|
+
"field": "specials.boundCompareCents"
|
|
23042
|
+
},
|
|
23043
|
+
{
|
|
23044
|
+
"id": "bind-price-mo",
|
|
23045
|
+
"source": "product.moneyOverride",
|
|
23046
|
+
"field": "specials.boundMoneyOverride"
|
|
23047
|
+
},
|
|
23048
|
+
{
|
|
23049
|
+
"id": "bind-product-id",
|
|
23050
|
+
"source": "product.id",
|
|
23051
|
+
"field": "specials.boundProductId"
|
|
23052
|
+
}
|
|
23053
|
+
],
|
|
22906
23054
|
"course|title": [
|
|
22907
23055
|
{
|
|
22908
23056
|
"id": "bind-price",
|
|
@@ -24124,6 +24272,43 @@ export const ELEMENTS = {
|
|
|
24124
24272
|
"field": "specials.boundProductId"
|
|
24125
24273
|
}
|
|
24126
24274
|
],
|
|
24275
|
+
"course|sku": [
|
|
24276
|
+
{
|
|
24277
|
+
"id": "bind-price",
|
|
24278
|
+
"source": "product.price",
|
|
24279
|
+
"field": "specials.boundPrice",
|
|
24280
|
+
"target": {
|
|
24281
|
+
"type": "product",
|
|
24282
|
+
"id": "",
|
|
24283
|
+
"kind": "sku"
|
|
24284
|
+
}
|
|
24285
|
+
},
|
|
24286
|
+
{
|
|
24287
|
+
"id": "bind-compare",
|
|
24288
|
+
"source": "product.compareAtPrice",
|
|
24289
|
+
"field": "specials.boundCompare"
|
|
24290
|
+
},
|
|
24291
|
+
{
|
|
24292
|
+
"id": "bind-price-cents",
|
|
24293
|
+
"source": "product.priceCents",
|
|
24294
|
+
"field": "specials.boundPriceCents"
|
|
24295
|
+
},
|
|
24296
|
+
{
|
|
24297
|
+
"id": "bind-compare-cents",
|
|
24298
|
+
"source": "product.compareAtCents",
|
|
24299
|
+
"field": "specials.boundCompareCents"
|
|
24300
|
+
},
|
|
24301
|
+
{
|
|
24302
|
+
"id": "bind-price-mo",
|
|
24303
|
+
"source": "product.moneyOverride",
|
|
24304
|
+
"field": "specials.boundMoneyOverride"
|
|
24305
|
+
},
|
|
24306
|
+
{
|
|
24307
|
+
"id": "bind-product-id",
|
|
24308
|
+
"source": "product.id",
|
|
24309
|
+
"field": "specials.boundProductId"
|
|
24310
|
+
}
|
|
24311
|
+
],
|
|
24127
24312
|
"review|title": [
|
|
24128
24313
|
{
|
|
24129
24314
|
"id": "bind-price",
|
|
@@ -25345,6 +25530,43 @@ export const ELEMENTS = {
|
|
|
25345
25530
|
"field": "specials.boundProductId"
|
|
25346
25531
|
}
|
|
25347
25532
|
],
|
|
25533
|
+
"review|sku": [
|
|
25534
|
+
{
|
|
25535
|
+
"id": "bind-price",
|
|
25536
|
+
"source": "product.price",
|
|
25537
|
+
"field": "specials.boundPrice",
|
|
25538
|
+
"target": {
|
|
25539
|
+
"type": "product",
|
|
25540
|
+
"id": "",
|
|
25541
|
+
"kind": "sku"
|
|
25542
|
+
}
|
|
25543
|
+
},
|
|
25544
|
+
{
|
|
25545
|
+
"id": "bind-compare",
|
|
25546
|
+
"source": "product.compareAtPrice",
|
|
25547
|
+
"field": "specials.boundCompare"
|
|
25548
|
+
},
|
|
25549
|
+
{
|
|
25550
|
+
"id": "bind-price-cents",
|
|
25551
|
+
"source": "product.priceCents",
|
|
25552
|
+
"field": "specials.boundPriceCents"
|
|
25553
|
+
},
|
|
25554
|
+
{
|
|
25555
|
+
"id": "bind-compare-cents",
|
|
25556
|
+
"source": "product.compareAtCents",
|
|
25557
|
+
"field": "specials.boundCompareCents"
|
|
25558
|
+
},
|
|
25559
|
+
{
|
|
25560
|
+
"id": "bind-price-mo",
|
|
25561
|
+
"source": "product.moneyOverride",
|
|
25562
|
+
"field": "specials.boundMoneyOverride"
|
|
25563
|
+
},
|
|
25564
|
+
{
|
|
25565
|
+
"id": "bind-product-id",
|
|
25566
|
+
"source": "product.id",
|
|
25567
|
+
"field": "specials.boundProductId"
|
|
25568
|
+
}
|
|
25569
|
+
],
|
|
25348
25570
|
"brand|title": [
|
|
25349
25571
|
{
|
|
25350
25572
|
"id": "bind-price",
|
|
@@ -26566,6 +26788,43 @@ export const ELEMENTS = {
|
|
|
26566
26788
|
"field": "specials.boundProductId"
|
|
26567
26789
|
}
|
|
26568
26790
|
],
|
|
26791
|
+
"brand|sku": [
|
|
26792
|
+
{
|
|
26793
|
+
"id": "bind-price",
|
|
26794
|
+
"source": "product.price",
|
|
26795
|
+
"field": "specials.boundPrice",
|
|
26796
|
+
"target": {
|
|
26797
|
+
"type": "product",
|
|
26798
|
+
"id": "",
|
|
26799
|
+
"kind": "sku"
|
|
26800
|
+
}
|
|
26801
|
+
},
|
|
26802
|
+
{
|
|
26803
|
+
"id": "bind-compare",
|
|
26804
|
+
"source": "product.compareAtPrice",
|
|
26805
|
+
"field": "specials.boundCompare"
|
|
26806
|
+
},
|
|
26807
|
+
{
|
|
26808
|
+
"id": "bind-price-cents",
|
|
26809
|
+
"source": "product.priceCents",
|
|
26810
|
+
"field": "specials.boundPriceCents"
|
|
26811
|
+
},
|
|
26812
|
+
{
|
|
26813
|
+
"id": "bind-compare-cents",
|
|
26814
|
+
"source": "product.compareAtCents",
|
|
26815
|
+
"field": "specials.boundCompareCents"
|
|
26816
|
+
},
|
|
26817
|
+
{
|
|
26818
|
+
"id": "bind-price-mo",
|
|
26819
|
+
"source": "product.moneyOverride",
|
|
26820
|
+
"field": "specials.boundMoneyOverride"
|
|
26821
|
+
},
|
|
26822
|
+
{
|
|
26823
|
+
"id": "bind-product-id",
|
|
26824
|
+
"source": "product.id",
|
|
26825
|
+
"field": "specials.boundProductId"
|
|
26826
|
+
}
|
|
26827
|
+
],
|
|
26569
26828
|
"record|title": [
|
|
26570
26829
|
{
|
|
26571
26830
|
"id": "bind-price",
|
|
@@ -27786,6 +28045,43 @@ export const ELEMENTS = {
|
|
|
27786
28045
|
"source": "product.id",
|
|
27787
28046
|
"field": "specials.boundProductId"
|
|
27788
28047
|
}
|
|
28048
|
+
],
|
|
28049
|
+
"record|sku": [
|
|
28050
|
+
{
|
|
28051
|
+
"id": "bind-price",
|
|
28052
|
+
"source": "product.price",
|
|
28053
|
+
"field": "specials.boundPrice",
|
|
28054
|
+
"target": {
|
|
28055
|
+
"type": "product",
|
|
28056
|
+
"id": "",
|
|
28057
|
+
"kind": "sku"
|
|
28058
|
+
}
|
|
28059
|
+
},
|
|
28060
|
+
{
|
|
28061
|
+
"id": "bind-compare",
|
|
28062
|
+
"source": "product.compareAtPrice",
|
|
28063
|
+
"field": "specials.boundCompare"
|
|
28064
|
+
},
|
|
28065
|
+
{
|
|
28066
|
+
"id": "bind-price-cents",
|
|
28067
|
+
"source": "product.priceCents",
|
|
28068
|
+
"field": "specials.boundPriceCents"
|
|
28069
|
+
},
|
|
28070
|
+
{
|
|
28071
|
+
"id": "bind-compare-cents",
|
|
28072
|
+
"source": "product.compareAtCents",
|
|
28073
|
+
"field": "specials.boundCompareCents"
|
|
28074
|
+
},
|
|
28075
|
+
{
|
|
28076
|
+
"id": "bind-price-mo",
|
|
28077
|
+
"source": "product.moneyOverride",
|
|
28078
|
+
"field": "specials.boundMoneyOverride"
|
|
28079
|
+
},
|
|
28080
|
+
{
|
|
28081
|
+
"id": "bind-product-id",
|
|
28082
|
+
"source": "product.id",
|
|
28083
|
+
"field": "specials.boundProductId"
|
|
28084
|
+
}
|
|
27789
28085
|
]
|
|
27790
28086
|
},
|
|
27791
28087
|
"inspector": [
|
|
@@ -30003,6 +30299,18 @@ export const ELEMENTS = {
|
|
|
30003
30299
|
}
|
|
30004
30300
|
}
|
|
30005
30301
|
],
|
|
30302
|
+
"product|sku": [
|
|
30303
|
+
{
|
|
30304
|
+
"id": "bind-text",
|
|
30305
|
+
"source": "product.sku",
|
|
30306
|
+
"field": "specials.boundText",
|
|
30307
|
+
"target": {
|
|
30308
|
+
"type": "product",
|
|
30309
|
+
"id": "",
|
|
30310
|
+
"kind": "sku"
|
|
30311
|
+
}
|
|
30312
|
+
}
|
|
30313
|
+
],
|
|
30006
30314
|
"category|title": [
|
|
30007
30315
|
{
|
|
30008
30316
|
"id": "bind-text",
|
|
@@ -30399,6 +30707,18 @@ export const ELEMENTS = {
|
|
|
30399
30707
|
}
|
|
30400
30708
|
}
|
|
30401
30709
|
],
|
|
30710
|
+
"category|sku": [
|
|
30711
|
+
{
|
|
30712
|
+
"id": "bind-text",
|
|
30713
|
+
"source": "category.title",
|
|
30714
|
+
"field": "specials.boundText",
|
|
30715
|
+
"target": {
|
|
30716
|
+
"type": "category",
|
|
30717
|
+
"id": "",
|
|
30718
|
+
"kind": "sku"
|
|
30719
|
+
}
|
|
30720
|
+
}
|
|
30721
|
+
],
|
|
30402
30722
|
"article|title": [
|
|
30403
30723
|
{
|
|
30404
30724
|
"id": "bind-text",
|
|
@@ -30795,6 +31115,18 @@ export const ELEMENTS = {
|
|
|
30795
31115
|
}
|
|
30796
31116
|
}
|
|
30797
31117
|
],
|
|
31118
|
+
"article|sku": [
|
|
31119
|
+
{
|
|
31120
|
+
"id": "bind-text",
|
|
31121
|
+
"source": "article.title",
|
|
31122
|
+
"field": "specials.boundText",
|
|
31123
|
+
"target": {
|
|
31124
|
+
"type": "article",
|
|
31125
|
+
"id": "",
|
|
31126
|
+
"kind": "sku"
|
|
31127
|
+
}
|
|
31128
|
+
}
|
|
31129
|
+
],
|
|
30798
31130
|
"blogCategory|title": [
|
|
30799
31131
|
{
|
|
30800
31132
|
"id": "bind-text",
|
|
@@ -31191,6 +31523,18 @@ export const ELEMENTS = {
|
|
|
31191
31523
|
}
|
|
31192
31524
|
}
|
|
31193
31525
|
],
|
|
31526
|
+
"blogCategory|sku": [
|
|
31527
|
+
{
|
|
31528
|
+
"id": "bind-text",
|
|
31529
|
+
"source": "blogCategory.title",
|
|
31530
|
+
"field": "specials.boundText",
|
|
31531
|
+
"target": {
|
|
31532
|
+
"type": "blogCategory",
|
|
31533
|
+
"id": "",
|
|
31534
|
+
"kind": "sku"
|
|
31535
|
+
}
|
|
31536
|
+
}
|
|
31537
|
+
],
|
|
31194
31538
|
"course|title": [
|
|
31195
31539
|
{
|
|
31196
31540
|
"id": "bind-text",
|
|
@@ -31587,6 +31931,18 @@ export const ELEMENTS = {
|
|
|
31587
31931
|
}
|
|
31588
31932
|
}
|
|
31589
31933
|
],
|
|
31934
|
+
"course|sku": [
|
|
31935
|
+
{
|
|
31936
|
+
"id": "bind-text",
|
|
31937
|
+
"source": "course.title",
|
|
31938
|
+
"field": "specials.boundText",
|
|
31939
|
+
"target": {
|
|
31940
|
+
"type": "course",
|
|
31941
|
+
"id": "",
|
|
31942
|
+
"kind": "sku"
|
|
31943
|
+
}
|
|
31944
|
+
}
|
|
31945
|
+
],
|
|
31590
31946
|
"review|title": [
|
|
31591
31947
|
{
|
|
31592
31948
|
"id": "bind-text",
|
|
@@ -31983,6 +32339,18 @@ export const ELEMENTS = {
|
|
|
31983
32339
|
}
|
|
31984
32340
|
}
|
|
31985
32341
|
],
|
|
32342
|
+
"review|sku": [
|
|
32343
|
+
{
|
|
32344
|
+
"id": "bind-text",
|
|
32345
|
+
"source": "review.title",
|
|
32346
|
+
"field": "specials.boundText",
|
|
32347
|
+
"target": {
|
|
32348
|
+
"type": "review",
|
|
32349
|
+
"id": "",
|
|
32350
|
+
"kind": "sku"
|
|
32351
|
+
}
|
|
32352
|
+
}
|
|
32353
|
+
],
|
|
31986
32354
|
"brand|title": [
|
|
31987
32355
|
{
|
|
31988
32356
|
"id": "bind-text",
|
|
@@ -32379,6 +32747,18 @@ export const ELEMENTS = {
|
|
|
32379
32747
|
}
|
|
32380
32748
|
}
|
|
32381
32749
|
],
|
|
32750
|
+
"brand|sku": [
|
|
32751
|
+
{
|
|
32752
|
+
"id": "bind-text",
|
|
32753
|
+
"source": "brand.title",
|
|
32754
|
+
"field": "specials.boundText",
|
|
32755
|
+
"target": {
|
|
32756
|
+
"type": "brand",
|
|
32757
|
+
"id": "",
|
|
32758
|
+
"kind": "sku"
|
|
32759
|
+
}
|
|
32760
|
+
}
|
|
32761
|
+
],
|
|
32382
32762
|
"record|title": [
|
|
32383
32763
|
{
|
|
32384
32764
|
"id": "bind-text",
|
|
@@ -32774,6 +33154,18 @@ export const ELEMENTS = {
|
|
|
32774
33154
|
"kind": "duration"
|
|
32775
33155
|
}
|
|
32776
33156
|
}
|
|
33157
|
+
],
|
|
33158
|
+
"record|sku": [
|
|
33159
|
+
{
|
|
33160
|
+
"id": "bind-text",
|
|
33161
|
+
"source": "",
|
|
33162
|
+
"field": "specials.boundText",
|
|
33163
|
+
"target": {
|
|
33164
|
+
"type": "record",
|
|
33165
|
+
"id": "",
|
|
33166
|
+
"kind": "sku"
|
|
33167
|
+
}
|
|
33168
|
+
}
|
|
32777
33169
|
]
|
|
32778
33170
|
},
|
|
32779
33171
|
"inspector": [
|
|
@@ -36851,6 +37243,7 @@ export const BINDING_SOURCES = [
|
|
|
36851
37243
|
"product.priceCents",
|
|
36852
37244
|
"product.ratingAverage",
|
|
36853
37245
|
"product.ratingCount",
|
|
37246
|
+
"product.sku",
|
|
36854
37247
|
"product.summary",
|
|
36855
37248
|
"product.tags",
|
|
36856
37249
|
"product.title",
|
|
@@ -36898,6 +37291,7 @@ export const PRESENT_ONLY_SOURCES = [
|
|
|
36898
37291
|
"product.model",
|
|
36899
37292
|
"product.ratingAverage",
|
|
36900
37293
|
"product.ratingCount",
|
|
37294
|
+
"product.sku",
|
|
36901
37295
|
"product.summary",
|
|
36902
37296
|
"product.tags",
|
|
36903
37297
|
"product.variations",
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
// GENERATED by scripts/gen-catalog.ts — do not edit by hand.
|
|
2
2
|
// The platform commit every other generated file here describes.
|
|
3
3
|
export const PLATFORM_SOURCE = {
|
|
4
|
-
"commit": "
|
|
5
|
-
"committedAt": "2026-11-
|
|
4
|
+
"commit": "fa1afd8667e2df2f6da6fde8b64cf52336cbacb8",
|
|
5
|
+
"committedAt": "2026-11-21T23:14:53+07:00",
|
|
6
6
|
"dirty": false
|
|
7
7
|
};
|
|
@@ -491,7 +491,7 @@ export function cascadeTail(node, written, id, state) {
|
|
|
491
491
|
`cascade falls back UP to the nearest narrower slot, so ${wider} render the ${bp} value too.`,
|
|
492
492
|
fix: `Say the wide-screen answer at base: sb_set id "${id ?? '<id>'}", namespace style, base:true` +
|
|
493
493
|
`${state ? `, state:"${state}"` : ''}, keys { "${k}": <desktop value> } — or repeat this write with ` +
|
|
494
|
-
'pin_wider:
|
|
494
|
+
'sb_set without pin_wider:false, which pins base (a safe default, else an empty value) so it stays narrow.',
|
|
495
495
|
},
|
|
496
496
|
});
|
|
497
497
|
}
|
|
@@ -567,7 +567,6 @@ export function fallUp(node, patches, id, type, pin, preset) {
|
|
|
567
567
|
applyPatches(probe, patches);
|
|
568
568
|
const pins = [];
|
|
569
569
|
const pinned = [];
|
|
570
|
-
const why = new Map();
|
|
571
570
|
if (pin) {
|
|
572
571
|
const done = new Set();
|
|
573
572
|
for (const w of writes) {
|
|
@@ -575,24 +574,20 @@ export function fallUp(node, patches, id, type, pin, preset) {
|
|
|
575
574
|
if (done.has(tag) || saidWider(probe.nodes[id], w.bp, w.key, w.state))
|
|
576
575
|
continue;
|
|
577
576
|
done.add(tag);
|
|
578
|
-
const
|
|
579
|
-
|
|
580
|
-
|
|
581
|
-
|
|
582
|
-
|
|
577
|
+
const p = pinFor(type, w.key, w.state, preset);
|
|
578
|
+
// NO SAFE VALUE IS NOT NO PIN. An EMPTY base value is a key to the cascade
|
|
579
|
+
// (`k in values`, so the fall stops) and a declaration the browser drops
|
|
580
|
+
// (`width:;`), so it overrides neither the preset nor the element's own
|
|
581
|
+
// stylesheet — the two things every refusal above protects. It is what the
|
|
582
|
+
// editor's own store pins for every narrow-only style write (web_builder
|
|
583
|
+
// stores/node.ts setNodeValue).
|
|
584
|
+
const v = 'reason' in p ? { value: '', from: `empty base — ${p.reason}, so nothing is painted there` } : p;
|
|
583
585
|
pins.push({ op: 'set', path: ['nodes', id, ...(w.state ? ['states', w.state] : []), 'style', w.key], value: v.value });
|
|
584
586
|
pinned.push({ id, key: `style.${w.key}`, ...(w.state ? { state: w.state } : {}), value: v.value, from: v.from });
|
|
585
587
|
}
|
|
586
588
|
applyPatches(probe, pins);
|
|
587
589
|
}
|
|
588
590
|
const notes = writes.flatMap((w) => cascadeTail(probe.nodes[id], { [w.bp]: { [w.key]: true } }, id, w.state));
|
|
589
|
-
if (pin) {
|
|
590
|
-
for (const n of notes) {
|
|
591
|
-
n.note.fix =
|
|
592
|
-
`pin_wider wrote nothing for ${n.note.key} on ${type}: ${why.get(n.note.key) ?? 'no safe value'}. ` +
|
|
593
|
-
`Say the desktop value yourself: sb_set id "${id}", namespace style, base:true, keys { … }.`;
|
|
594
|
-
}
|
|
595
|
-
}
|
|
596
591
|
return { pins, pinned, notes };
|
|
597
592
|
}
|
|
598
593
|
/**
|
package/dist/tools/page.js
CHANGED
|
@@ -1757,7 +1757,7 @@ export function registerPageTools(server, ctx) {
|
|
|
1757
1757
|
pin_wider: z
|
|
1758
1758
|
.boolean()
|
|
1759
1759
|
.optional()
|
|
1760
|
-
.describe('
|
|
1760
|
+
.describe('Default ON: a narrow-only style key gets a base pin so it does not fall back up to wider widths (see pinned). false writes the narrow slot alone'),
|
|
1761
1761
|
dry_run: z.boolean().optional(),
|
|
1762
1762
|
force: z.boolean().optional().describe('Override a render-inference guard; reported as forced'),
|
|
1763
1763
|
},
|
|
@@ -1815,7 +1815,7 @@ export function registerPageTools(server, ctx) {
|
|
|
1815
1815
|
// where it went; `pin_wider` adds the base writes that stop it to this save.
|
|
1816
1816
|
// A preset is a class rule the pin (an ID rule) would override, so the pin
|
|
1817
1817
|
// asks the node's preset first — fetched only when a pin is asked for.
|
|
1818
|
-
const pinTheme = pin_wider
|
|
1818
|
+
const pinTheme = pin_wider !== false ? (await siteTheme(ctx, session.site())).theme : null;
|
|
1819
1819
|
const presetOf = (nid) => {
|
|
1820
1820
|
const pid = pinTheme ? presetIdOf(d.doc.nodes[nid]) : null;
|
|
1821
1821
|
if (!pid)
|
|
@@ -1824,7 +1824,7 @@ export function registerPageTools(server, ctx) {
|
|
|
1824
1824
|
};
|
|
1825
1825
|
const fall = [...new Set(batch.filter((e) => e.namespace === 'style').map((e) => e.id))]
|
|
1826
1826
|
.filter((nid) => d.doc.nodes[nid])
|
|
1827
|
-
.map((nid) => fallUp(d.doc.nodes[nid], patches.filter((p) => p.path[0] === 'nodes' && p.path[1] === nid), nid, d.doc.nodes[nid].data.type, pin_wider
|
|
1827
|
+
.map((nid) => fallUp(d.doc.nodes[nid], patches.filter((p) => p.path[0] === 'nodes' && p.path[1] === nid), nid, d.doc.nodes[nid].data.type, pin_wider !== false, presetOf(nid)));
|
|
1828
1828
|
for (const f of fall)
|
|
1829
1829
|
patches.push(...f.pins);
|
|
1830
1830
|
const pinnedList = fall.flatMap((f) => f.pinned);
|
package/dist/tools/store.js
CHANGED
|
@@ -571,8 +571,8 @@ export function registerStoreTools(server, ctx, session) {
|
|
|
571
571
|
'leaves the page referencing it; action:"template_save" saves one as a section template ' +
|
|
572
572
|
'(name; template_share sends one to the org\'s review). site_template offers the whole site as its org\'s ' +
|
|
573
573
|
'template (org_id attaches first; site_template_remove withdraws). ' +
|
|
574
|
-
'action:"tracking":
|
|
575
|
-
'
|
|
574
|
+
'action:"tracking": status + advice; text installs a snippet; provider+enabled|config ' +
|
|
575
|
+
'(extras, "" clears)|test. Dry run returns the plan.',
|
|
576
576
|
inputSchema: {
|
|
577
577
|
action: z.enum([
|
|
578
578
|
'checkout',
|
|
@@ -661,14 +661,23 @@ export function registerStoreTools(server, ctx, session) {
|
|
|
661
661
|
.enum(Object.keys(TRACKING_FIELDS))
|
|
662
662
|
.optional(),
|
|
663
663
|
enabled: z.boolean().optional(),
|
|
664
|
+
config: z.record(z.string(), z.string()).optional(),
|
|
665
|
+
test: z.boolean().optional(),
|
|
664
666
|
dry_run: z.boolean().optional(),
|
|
665
667
|
},
|
|
666
668
|
annotations: { readOnlyHint: false, destructiveHint: false, openWorldHint: true },
|
|
667
|
-
}, async ({ action, site_id: given, language, page_name, headline, template, name, footer, node_id, menu_id, kind, overlay_id, list_id, app_key, global_id, global_kind, template_id, description, categories, org_id, relocalize, settings, text: trackingText, provider, enabled, dry_run, }) => {
|
|
669
|
+
}, async ({ action, site_id: given, language, page_name, headline, template, name, footer, node_id, menu_id, kind, overlay_id, list_id, app_key, global_id, global_kind, template_id, description, categories, org_id, relocalize, settings, text: trackingText, provider, enabled, config: trackingConfig, test: trackingTest, dry_run, }) => {
|
|
668
670
|
const siteId = siteFor(ctx, given);
|
|
669
671
|
if (action === 'tracking') {
|
|
670
672
|
const dryRun = dry_run !== false;
|
|
671
|
-
return text(await trackingFlow(ctx, siteId, {
|
|
673
|
+
return text(await trackingFlow(ctx, siteId, {
|
|
674
|
+
text: trackingText,
|
|
675
|
+
provider,
|
|
676
|
+
enabled,
|
|
677
|
+
config: trackingConfig,
|
|
678
|
+
test: trackingTest,
|
|
679
|
+
dryRun,
|
|
680
|
+
}));
|
|
672
681
|
}
|
|
673
682
|
if (action === 'global_attach' || action === 'global_detach') {
|
|
674
683
|
// THE COMPOSED STAMP IS NEVER THE CALLER'S TO WRITE. A page references
|
package/dist/tools/tracking.js
CHANGED
|
@@ -30,6 +30,11 @@ export const TRACKING_FIELDS = {
|
|
|
30
30
|
google_ads: 'conversionId',
|
|
31
31
|
microsoft_clarity: 'projectId',
|
|
32
32
|
};
|
|
33
|
+
/** Config keys that are secrets: never echoed back in a plan or a result. */
|
|
34
|
+
const SECRET_KEYS = new Set(['accessToken']);
|
|
35
|
+
/** Keys the platform owns (delivery status): never sent back on a write. */
|
|
36
|
+
const isServerKey = (k) => k.startsWith('server');
|
|
37
|
+
const masked = (config) => Object.fromEntries(Object.entries(config).map(([k, v]) => [k, SECRET_KEYS.has(k) && v ? '***' : v]));
|
|
33
38
|
export async function trackingFlow(ctx, siteId, args) {
|
|
34
39
|
const site = encodeURIComponent(siteId);
|
|
35
40
|
const base = `/api/sites/${site}/integrations`;
|
|
@@ -43,6 +48,46 @@ export async function trackingFlow(ctx, siteId, args) {
|
|
|
43
48
|
}));
|
|
44
49
|
const current = async () => (await send('GET', base)).integrations ?? [];
|
|
45
50
|
const idOf = (i) => i.config?.[TRACKING_FIELDS[i.provider] ?? ''] ?? '';
|
|
51
|
+
if (args.test) {
|
|
52
|
+
if (!args.provider || !(args.provider in TRACKING_FIELDS)) {
|
|
53
|
+
throw new Error(`sbuilder: test needs provider, one of ${Object.keys(TRACKING_FIELDS).join(', ')}.`);
|
|
54
|
+
}
|
|
55
|
+
const row = (await current()).find((i) => i.provider === args.provider);
|
|
56
|
+
if (!row?.id)
|
|
57
|
+
throw new Error(`sbuilder: ${args.provider} is not connected.`);
|
|
58
|
+
const path = `${base}/${encodeURIComponent(row.id)}/test`;
|
|
59
|
+
if (args.dryRun)
|
|
60
|
+
return { dryRun: true, plan: [{ method: 'POST', path }] };
|
|
61
|
+
return (await send('POST', path)).test;
|
|
62
|
+
}
|
|
63
|
+
if (args.config !== undefined) {
|
|
64
|
+
if (!args.provider || !(args.provider in TRACKING_FIELDS)) {
|
|
65
|
+
throw new Error(`sbuilder: config needs provider, one of ${Object.keys(TRACKING_FIELDS).join(', ')}.`);
|
|
66
|
+
}
|
|
67
|
+
const row = (await current()).find((i) => i.provider === args.provider);
|
|
68
|
+
// The stored config never carries the token (the platform masks it); an absent
|
|
69
|
+
// accessToken key KEEPS the stored one, "" clears it. Server-owned status keys
|
|
70
|
+
// are dropped rather than written back.
|
|
71
|
+
const kept = Object.fromEntries(Object.entries(row?.config ?? {}).filter(([k]) => !isServerKey(k)));
|
|
72
|
+
const body = {
|
|
73
|
+
provider: args.provider,
|
|
74
|
+
enabled: args.enabled ?? row?.enabled ?? true,
|
|
75
|
+
config: { ...kept, ...args.config },
|
|
76
|
+
};
|
|
77
|
+
const step = row?.id
|
|
78
|
+
? { method: 'PUT', path: `${base}/${encodeURIComponent(row.id)}` }
|
|
79
|
+
: { method: 'POST', path: base };
|
|
80
|
+
if (args.dryRun)
|
|
81
|
+
return { dryRun: true, plan: [{ ...step, body: { ...body, config: masked(body.config) } }] };
|
|
82
|
+
const saved = await send(step.method, step.path, body);
|
|
83
|
+
return {
|
|
84
|
+
provider: args.provider,
|
|
85
|
+
id: idOf(saved.integration),
|
|
86
|
+
enabled: saved.integration.enabled,
|
|
87
|
+
config: saved.integration.config,
|
|
88
|
+
tokenSet: !!saved.integration.tokenSet,
|
|
89
|
+
};
|
|
90
|
+
}
|
|
46
91
|
if (args.provider !== undefined || args.enabled !== undefined) {
|
|
47
92
|
if (!args.provider || args.enabled === undefined) {
|
|
48
93
|
throw new Error('sbuilder: action:"tracking" switches a tracker with BOTH provider and enabled.');
|
|
@@ -139,6 +184,15 @@ export async function trackingFlow(ctx, siteId, args) {
|
|
|
139
184
|
};
|
|
140
185
|
}
|
|
141
186
|
const rows = await current();
|
|
187
|
+
// What the platform says is missing or broken (one rule set for the screen, the
|
|
188
|
+
// assistant and this tool). An older platform has no /health: say so, don't fail.
|
|
189
|
+
let advice = [];
|
|
190
|
+
try {
|
|
191
|
+
advice = (await send('GET', `${base}/health`)).advice ?? [];
|
|
192
|
+
}
|
|
193
|
+
catch (e) {
|
|
194
|
+
advice = { unavailable: e.message };
|
|
195
|
+
}
|
|
142
196
|
let channels = null;
|
|
143
197
|
try {
|
|
144
198
|
channels =
|
|
@@ -171,5 +225,6 @@ export async function trackingFlow(ctx, siteId, args) {
|
|
|
171
225
|
};
|
|
172
226
|
}),
|
|
173
227
|
channelsLast30Days: channels,
|
|
228
|
+
advice,
|
|
174
229
|
};
|
|
175
230
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "sbuilder-mcp",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.113.0",
|
|
4
4
|
"description": "MCP server that designs and operates a Store Builder site — pages, data, theme and publish — through the platform's own API and live-edit protocol.",
|
|
5
5
|
"mcpName": "io.github.vuluu2k/sbuilder-mcp",
|
|
6
6
|
"type": "module",
|