sbuilder-mcp 0.112.3 → 0.113.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 +21 -0
- package/CHANGELOG.vi.md +21 -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/findings.js +31 -0
- package/dist/domains/site/review.js +27 -2
- package/dist/mcp/strict.js +28 -0
- package/dist/server.js +2 -1
- package/dist/tools/page.js +47 -34
- package/dist/tools/session.js +28 -1
- 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,27 @@ 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.1] - 2026-11-24
|
|
10
|
+
|
|
11
|
+
### Changed
|
|
12
|
+
- `sb_site_list` returns a much smaller result by dropping the repeated `effectivePermissions` of an owner's sites, timestamps, redirect settings and screenshots, while a non-owner keeps its permissions and a true template, maintenance or building flag stays.
|
|
13
|
+
- `sb_page_list` says the page-type table and its notes once per process, and keeps `pages` and `usually_also` on every call.
|
|
14
|
+
- Review findings state a problem sentence shared by every finding of the same code once under `problems[code]` instead of repeating it on each finding.
|
|
15
|
+
- The `tools/list` response is smaller because the per-tool `$schema` and default `execution` stamps are no longer sent.
|
|
16
|
+
|
|
17
|
+
### Fixed
|
|
18
|
+
- `sb_review` no longer reports a picture layer (an empty absolute block that paints its own photo or fill) as `empty_container`, so its fix no longer suggests removing the banner photo.
|
|
19
|
+
- `sb_review` no longer reports copy placed over an absolute picture child as `invisible_text` against the section's background.
|
|
20
|
+
|
|
21
|
+
## [0.113.0] - 2026-11-23
|
|
22
|
+
|
|
23
|
+
### Added
|
|
24
|
+
- `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.
|
|
25
|
+
- `sb_store` `action: "tracking"` with `provider` and `test` sends the platform's test event.
|
|
26
|
+
- `sb_store` `action: "tracking"` status relays the platform's integrations health advice, and reports it as unavailable on an older platform instead of failing.
|
|
27
|
+
- The element catalog adds the text-dataset kind `sku` and the `product.sku` binding source, regenerated against web_builder baea13efb.
|
|
28
|
+
- The API catalog adds the ChatGPT Ads CAPI key, the TikTok test code and submit clicks, regenerated against web_builder fa1afd866.
|
|
29
|
+
|
|
9
30
|
## [0.112.3] - 2026-11-21
|
|
10
31
|
|
|
11
32
|
### Changed
|
package/CHANGELOG.vi.md
CHANGED
|
@@ -6,6 +6,27 @@ 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.1] - 2026-11-24
|
|
10
|
+
|
|
11
|
+
### Changed
|
|
12
|
+
- `sb_site_list` trả về kết quả nhỏ hơn nhiều nhờ bỏ `effectivePermissions` lặp lại của các site thuộc chủ sở hữu, mốc thời gian, cài đặt chuyển hướng và ảnh chụp màn hình, trong khi người không phải chủ sở hữu vẫn giữ quyền của mình và cờ template, maintenance hoặc building đúng vẫn được giữ.
|
|
13
|
+
- `sb_page_list` chỉ nói bảng loại trang và các ghi chú của nó một lần cho mỗi tiến trình, và vẫn giữ `pages` và `usually_also` ở mọi lần gọi.
|
|
14
|
+
- Các phát hiện của review nêu câu mô tả vấn đề chung của mọi phát hiện cùng mã một lần dưới `problems[code]` thay vì lặp lại trên từng phát hiện.
|
|
15
|
+
- Phản hồi `tools/list` nhỏ hơn vì không còn gửi `$schema` theo từng tool và dấu `execution` mặc định.
|
|
16
|
+
|
|
17
|
+
### Fixed
|
|
18
|
+
- `sb_review` không còn báo lớp ảnh (khối tuyệt đối rỗng tự vẽ ảnh hoặc màu nền) là `empty_container`, nên cách sửa không còn gợi ý xóa ảnh banner.
|
|
19
|
+
- `sb_review` không còn báo phần chữ đặt trên một phần tử ảnh tuyệt đối là `invisible_text` so với nền của section.
|
|
20
|
+
|
|
21
|
+
## [0.113.0] - 2026-11-23
|
|
22
|
+
|
|
23
|
+
### Added
|
|
24
|
+
- `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ề.
|
|
25
|
+
- `sb_store` `action: "tracking"` với `provider` và `test` gửi test event của nền tảng.
|
|
26
|
+
- 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.
|
|
27
|
+
- 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.
|
|
28
|
+
- 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.
|
|
29
|
+
|
|
9
30
|
## [0.112.3] - 2026-11-21
|
|
10
31
|
|
|
11
32
|
### Changed
|
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
|
};
|
|
@@ -230,6 +230,37 @@ export function compactFindings(items) {
|
|
|
230
230
|
});
|
|
231
231
|
return { findings, fixes };
|
|
232
232
|
}
|
|
233
|
+
/**
|
|
234
|
+
* A `problem` sentence every finding of its code repeats is said ONCE, under
|
|
235
|
+
* `problems[code]` — the same move `fixes` made for the fix. Measured
|
|
236
|
+
* 2026-11-24 on a real home page: twelve empty_container findings carried the
|
|
237
|
+
* same sentence twelve times, seven handbuilt_menu ones a 300-char paragraph
|
|
238
|
+
* each. A finding whose sentence DIFFERS from its code's first one keeps it
|
|
239
|
+
* (it carries a count, a contrast, a key), so nothing a finding says is lost.
|
|
240
|
+
*/
|
|
241
|
+
export function shareProblems(items) {
|
|
242
|
+
const first = {};
|
|
243
|
+
const seen = {};
|
|
244
|
+
for (const it of items) {
|
|
245
|
+
if (typeof it.problem !== 'string')
|
|
246
|
+
continue;
|
|
247
|
+
first[it.code] ??= it.problem;
|
|
248
|
+
if (it.problem === first[it.code])
|
|
249
|
+
seen[it.code] = (seen[it.code] ?? 0) + 1;
|
|
250
|
+
}
|
|
251
|
+
const problems = {};
|
|
252
|
+
for (const [code, n] of Object.entries(seen))
|
|
253
|
+
if (n > 1)
|
|
254
|
+
problems[code] = first[code];
|
|
255
|
+
const findings = items.map((it) => {
|
|
256
|
+
if (problems[it.code] === undefined || it.problem !== problems[it.code])
|
|
257
|
+
return it;
|
|
258
|
+
const { problem, ...rest } = it;
|
|
259
|
+
void problem;
|
|
260
|
+
return rest;
|
|
261
|
+
});
|
|
262
|
+
return { findings, problems };
|
|
263
|
+
}
|
|
233
264
|
/**
|
|
234
265
|
* What a COMPOSE WARNING means for the document now in hand.
|
|
235
266
|
*
|
|
@@ -16,6 +16,20 @@ import { deadNavigation, hasPurchaseBinding, liveEventTable, PAYLOAD_NEEDS, PROD
|
|
|
16
16
|
import { unknownValueNote, unknownWriteNote, vocabularyFor, vocabularyForWrite } from './vocabulary.js';
|
|
17
17
|
import { iconNote } from './icons.js';
|
|
18
18
|
import { LINK_COLOUR, LINK_INHERITS, unstyledLinks } from './writecheck.js';
|
|
19
|
+
/** Whether `containerId` holds an absolutely-positioned child that paints a picture over it. */
|
|
20
|
+
function coveredByPicture(d, containerId) {
|
|
21
|
+
for (const k of d.nodes[containerId]?.data.nodes ?? []) {
|
|
22
|
+
const c = d.nodes[k];
|
|
23
|
+
if (!c || c.style?.position !== 'absolute')
|
|
24
|
+
continue;
|
|
25
|
+
if (c.data.type === 'image' || c.data.type === 'video')
|
|
26
|
+
return true;
|
|
27
|
+
const g = groundOf(c);
|
|
28
|
+
if (g && 'picture' in g)
|
|
29
|
+
return true;
|
|
30
|
+
}
|
|
31
|
+
return false;
|
|
32
|
+
}
|
|
19
33
|
/**
|
|
20
34
|
* A defect somebody looking at the page would see.
|
|
21
35
|
*
|
|
@@ -46,7 +60,8 @@ export const REVIEW_NOTICE = 'FIX THESE. Each one is a defect a visitor will see
|
|
|
46
60
|
'while findings stand; if you believe one is a false positive, say which and why. ' +
|
|
47
61
|
'A finding marked overlay:true is in the cart drawer or a pop-up — fix it the same way ' +
|
|
48
62
|
'(sb_set lands there), but it is SITE-WIDE, so fix it once rather than once per page. ' +
|
|
49
|
-
'`advice` lists what works but is hard to edit — never a blocker.'
|
|
63
|
+
'`advice` lists what works but is hard to edit — never a blocker. A finding with no ' +
|
|
64
|
+
'`problem` shares its code\'s sentence under `problems`; its fix is under `fixes`.';
|
|
50
65
|
/** The specials keys an element seeds that hold its visible content. */
|
|
51
66
|
function contentKeys(type) {
|
|
52
67
|
const seeded = ELEMENTS[type]?.defaults.specials ?? {};
|
|
@@ -598,7 +613,11 @@ opts = {}) {
|
|
|
598
613
|
const fg = rgbOf(ownFg ? (opts.theme ? resolveVars(opts.theme, own) : own) : presetFg);
|
|
599
614
|
let ground = null;
|
|
600
615
|
for (let x = id; x && d.nodes[x] && !ground; x = d.nodes[x].data.parent) {
|
|
601
|
-
ground
|
|
616
|
+
// A PICTURE LAYER LAID OVER THE ANCESTOR is the ground too, not only the ancestor's own
|
|
617
|
+
// fill: the banner pattern is an empty absolutely-positioned block carrying the photo,
|
|
618
|
+
// with the copy in a sibling above it. Measured 2026-11-24 on a live home page: white
|
|
619
|
+
// headings over that photo read "1.00:1" against the section's white, eight times.
|
|
620
|
+
ground = (x !== id && coveredByPicture(d, x) ? { picture: true } : null) ?? groundOf(d.nodes[x], opts.theme);
|
|
602
621
|
}
|
|
603
622
|
const bg = ground && 'color' in ground ? rgbOf(ground.color) : null;
|
|
604
623
|
const authored = (ownFg && !String(own).includes('var(')) || (!!ground && 'literal' in ground && ground.literal);
|
|
@@ -1396,8 +1415,14 @@ opts = {}) {
|
|
|
1396
1415
|
const drawsOwnControl = type === 'search-input' || filledByHost;
|
|
1397
1416
|
const isReference = (n.specials ?? {})[SPEC_GLOBAL_REF] !== undefined ||
|
|
1398
1417
|
(n.specials ?? {})[SPEC_APP_BLOCK_REF] !== undefined;
|
|
1418
|
+
// OR IT IS ITSELF THE PICTURE (or a fill): an empty block painting a photo, a gradient
|
|
1419
|
+
// scrim or a colour is a layer, not an empty band — the banner pattern above. Its fix
|
|
1420
|
+
// ("remove it with sb_remove") deleted the photo. Own paint only: a theme preset's
|
|
1421
|
+
// ground on an empty section is still an empty band.
|
|
1422
|
+
const paints = groundOf(n) !== null;
|
|
1399
1423
|
if (meta.isContainer &&
|
|
1400
1424
|
childrenOf(d, id).length === 0 &&
|
|
1425
|
+
!paints &&
|
|
1401
1426
|
!isReference &&
|
|
1402
1427
|
!drawsOwnControl &&
|
|
1403
1428
|
!(bindings.length > 0 && drawsItsOwnContent(type))) {
|
package/dist/mcp/strict.js
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { z } from 'zod';
|
|
2
|
+
import { ListToolsRequestSchema } from '@modelcontextprotocol/sdk/types.js';
|
|
2
3
|
/**
|
|
3
4
|
* AN ARGUMENT A TOOL DOES NOT TAKE IS REFUSED, NOT DROPPED.
|
|
4
5
|
*
|
|
@@ -17,3 +18,30 @@ export function refuseUnknownArgs(server) {
|
|
|
17
18
|
return register(name, { ...config, inputSchema: strict }, cb);
|
|
18
19
|
});
|
|
19
20
|
}
|
|
21
|
+
/**
|
|
22
|
+
* TOOLS/LIST CARRIES NOTHING THE SPEC ALREADY SAYS BY DEFAULT.
|
|
23
|
+
*
|
|
24
|
+
* The SDK stamps every inputSchema with `"$schema":"…draft-07…"` and every tool
|
|
25
|
+
* with `execution:{taskSupport:"forbidden"}` — the spec's own default when the
|
|
26
|
+
* key is absent. 42 tools × both was ~3,900 characters of every session's
|
|
27
|
+
* context buying nothing. Call before the first `registerTool`, which is when
|
|
28
|
+
* McpServer installs its `tools/list` handler.
|
|
29
|
+
*/
|
|
30
|
+
export function compactToolList(server) {
|
|
31
|
+
const inner = server.server;
|
|
32
|
+
const set = inner.setRequestHandler.bind(inner);
|
|
33
|
+
inner.setRequestHandler = ((schema, handler) => {
|
|
34
|
+
if (schema !== ListToolsRequestSchema)
|
|
35
|
+
return set(schema, handler);
|
|
36
|
+
return set(schema, (async (...a) => {
|
|
37
|
+
const res = (await handler(...a));
|
|
38
|
+
for (const t of res.tools) {
|
|
39
|
+
delete t.inputSchema?.$schema;
|
|
40
|
+
const ex = t.execution;
|
|
41
|
+
if (ex && (ex.taskSupport ?? 'forbidden') === 'forbidden' && Object.keys(ex).length <= 1)
|
|
42
|
+
delete t.execution;
|
|
43
|
+
}
|
|
44
|
+
return res;
|
|
45
|
+
}));
|
|
46
|
+
});
|
|
47
|
+
}
|
package/dist/server.js
CHANGED
|
@@ -24,7 +24,7 @@ import { registerUndoTools } from './tools/undo.js';
|
|
|
24
24
|
import { registerThemeTools } from './tools/theme.js';
|
|
25
25
|
import { registerTranslateTools } from './tools/translate.js';
|
|
26
26
|
import { serializeToolCalls } from './mcp/serial.js';
|
|
27
|
-
import { refuseUnknownArgs } from './mcp/strict.js';
|
|
27
|
+
import { compactToolList, refuseUnknownArgs } from './mcp/strict.js';
|
|
28
28
|
/**
|
|
29
29
|
* Sent on every handshake, so it is short, and says nothing a tool description
|
|
30
30
|
* already says. Counts come from the generated source records, never literals.
|
|
@@ -115,6 +115,7 @@ export function createServer(ctx = buildContext()) {
|
|
|
115
115
|
// mcp/serial.ts. Before the first registerTool, which installs tools/call.
|
|
116
116
|
serializeToolCalls(server, (name) => SESSION_FREE.has(name));
|
|
117
117
|
refuseUnknownArgs(server);
|
|
118
|
+
compactToolList(server);
|
|
118
119
|
registerSessionTools(server, ctx);
|
|
119
120
|
registerLoginTools(server, ctx, pkgVersion());
|
|
120
121
|
registerApiTools(server, ctx);
|
package/dist/tools/page.js
CHANGED
|
@@ -27,7 +27,7 @@ import { validateForSave } from '../domains/site/validate.js';
|
|
|
27
27
|
import { fallUp, formDocChecks, hiddenBand, sayChecks, specCheck, writeCheck } from '../domains/site/writecheck.js';
|
|
28
28
|
import { reviewDesign, REVIEW_NOTICE } from '../domains/site/review.js';
|
|
29
29
|
import { exampleCopy } from '../domains/site/examplecopy.js';
|
|
30
|
-
import { compactFindings } from '../domains/site/findings.js';
|
|
30
|
+
import { compactFindings, shareProblems } from '../domains/site/findings.js';
|
|
31
31
|
import { readinessGaps, READINESS_NOTICE, siteLanguage } from '../domains/site/readiness.js';
|
|
32
32
|
import { gatherReadiness } from '../domains/site/readiness-fetch.js';
|
|
33
33
|
import { globalWarning, restampPatches, RESPONSIVE_NOTICE, sharedWriteNotes } from '../domains/site/traps.js';
|
|
@@ -62,13 +62,17 @@ export function reviewField(ctx, doc, formTypes, pageType, formDocType, formRedi
|
|
|
62
62
|
// MAINTENANCE IS ADVICE, kept out of `findings`: it works for a visitor, so
|
|
63
63
|
// it must not stand between a page and its clean verdict. One `fixes` map
|
|
64
64
|
// serves both lists.
|
|
65
|
-
const
|
|
66
|
-
const
|
|
65
|
+
const compact = compactFindings(all.filter((f) => f.severity !== 'maintenance'));
|
|
66
|
+
const advised = compactFindings(all.filter((f) => f.severity === 'maintenance'));
|
|
67
|
+
const { findings, problems } = shareProblems(compact.findings);
|
|
68
|
+
const advice = shareProblems(advised.findings);
|
|
67
69
|
const notice = findings.length ? ctx.notices.once('review', REVIEW_NOTICE) : undefined;
|
|
70
|
+
const shared = { ...problems, ...advice.problems };
|
|
68
71
|
return {
|
|
69
72
|
...(findings.length ? { findings } : {}),
|
|
70
73
|
...(advice.findings.length ? { advice: advice.findings } : {}),
|
|
71
|
-
|
|
74
|
+
...(Object.keys(shared).length ? { problems: shared } : {}),
|
|
75
|
+
fixes: { ...compact.fixes, ...advised.fixes },
|
|
72
76
|
...(notice ? { findings_notice: notice } : {}),
|
|
73
77
|
};
|
|
74
78
|
}
|
|
@@ -2582,41 +2586,50 @@ export function registerPageTools(server, ctx) {
|
|
|
2582
2586
|
// in this server can tell a site that has them from one that does not.
|
|
2583
2587
|
// See ./inventory.ts: advice, matched by name, and the note says both.
|
|
2584
2588
|
const missing = missingUsualPages(raw.pages ?? null);
|
|
2589
|
+
// The type table and both notes are DIRECTIVES, not data about this site —
|
|
2590
|
+
// ~1,500 characters that rode on every listing. Said once per process
|
|
2591
|
+
// (ctx.notices); `usually_also` itself is data and stays on every call.
|
|
2592
|
+
const firstTypes = ctx.notices.once('page_list.types', '1') !== undefined;
|
|
2593
|
+
const firstUsual = missing.length > 0 && ctx.notices.once('page_list.usual', '1') !== undefined;
|
|
2585
2594
|
return text({
|
|
2586
2595
|
...projectList(raw, 'pages', PAGE_FIELDS),
|
|
2587
|
-
|
|
2588
|
-
|
|
2589
|
-
|
|
2590
|
-
|
|
2591
|
-
|
|
2592
|
-
|
|
2593
|
-
|
|
2594
|
-
|
|
2595
|
-
|
|
2596
|
-
|
|
2597
|
-
|
|
2598
|
-
t
|
|
2599
|
-
|
|
2600
|
-
|
|
2601
|
-
|
|
2602
|
-
|
|
2603
|
-
|
|
2604
|
-
|
|
2605
|
-
|
|
2606
|
-
|
|
2607
|
-
|
|
2608
|
-
|
|
2609
|
-
|
|
2610
|
-
'
|
|
2611
|
-
|
|
2612
|
-
|
|
2613
|
-
|
|
2596
|
+
...(firstTypes ? {
|
|
2597
|
+
// EVERY TYPE THE PLATFORM HAS, and the address each one answers at.
|
|
2598
|
+
//
|
|
2599
|
+
// Here rather than in `sb_page_create`'s argument description, because
|
|
2600
|
+
// that string rides in `tools/list` and the token budget caps it — the
|
|
2601
|
+
// table put the payload over twice while being trimmed. It is also the
|
|
2602
|
+
// better home: an agent reads this while ORIENTING, before it has
|
|
2603
|
+
// decided what to build, and a type it has never heard of is exactly
|
|
2604
|
+
// what it cannot ask for. `sb_page_create` used to name six of twelve
|
|
2605
|
+
// from a hand-typed string, so search, account, blog, complete, error
|
|
2606
|
+
// and maintain were unreachable to anyone who only read the tool.
|
|
2607
|
+
page_types: Object.fromEntries(PAGE_TYPES.map((t) => [
|
|
2608
|
+
t.type,
|
|
2609
|
+
t.routePattern ??
|
|
2610
|
+
(t.servedRole ? `served as the site's ${t.servedRole}` : 'an address you choose'),
|
|
2611
|
+
])),
|
|
2612
|
+
// NOT A LIST OF THE PAGES A SITE NEEDS, and this line is here because
|
|
2613
|
+
// the table above reads like one. A type is a fixed ADDRESS the
|
|
2614
|
+
// storefront routes by; most of a real website has no type at all —
|
|
2615
|
+
// login, register, contact, about, the policies, and whatever else this
|
|
2616
|
+
// particular shop sells or must say — and every one of those is an
|
|
2617
|
+
// ordinary `page`. Twelve is the number of routed types, never the
|
|
2618
|
+
// number of pages.
|
|
2619
|
+
page_types_note: 'Types with a pattern are the storefront\'s fixed addresses, not an inventory of a site. ' +
|
|
2620
|
+
'about, contact, policy, faq, login and register name a content page\'s PURPOSE (own ' +
|
|
2621
|
+
'icon, own slug, any number); everything else is type "page". sb_page_create picks ' +
|
|
2622
|
+
'the purpose type from the name when you pass none. ' +
|
|
2623
|
+
'usually_also below lists the ones most sites have; it is a floor, not a ceiling.',
|
|
2624
|
+
} : {}),
|
|
2614
2625
|
...(missing.length
|
|
2615
2626
|
? {
|
|
2616
2627
|
usually_also: Object.fromEntries(missing.map((m) => [m.key, m.why])),
|
|
2617
|
-
|
|
2618
|
-
'have
|
|
2619
|
-
|
|
2628
|
+
...(firstUsual ? {
|
|
2629
|
+
usually_also_note: 'Pages most sites have that this one appears not to, found by NAME because they ' +
|
|
2630
|
+
'have no type — one you named unusually will show here anyway. Advice, not ' +
|
|
2631
|
+
'defects: sb_review reports the pages the storefront routes by type.',
|
|
2632
|
+
} : {}),
|
|
2620
2633
|
}
|
|
2621
2634
|
: {}),
|
|
2622
2635
|
});
|
package/dist/tools/session.js
CHANGED
|
@@ -122,6 +122,31 @@ export async function connect(ctx, args) {
|
|
|
122
122
|
}
|
|
123
123
|
return result;
|
|
124
124
|
}
|
|
125
|
+
/**
|
|
126
|
+
* ONE SITE ROW, WITHOUT WHAT EVERY ROW REPEATS.
|
|
127
|
+
*
|
|
128
|
+
* The raw `GET /api/sites` row carries `effectivePermissions` — 54 strings, the
|
|
129
|
+
* same 54 on every site the caller owns — plus zero-value timestamps, redirect
|
|
130
|
+
* settings and a screenshot. Measured 2026-11-24: nine sites, ~12,000 characters,
|
|
131
|
+
* ~10,000 of them the permission list. An owner holds every permission, so the
|
|
132
|
+
* list is said only for a non-owner role, where it is the point. Flags that are
|
|
133
|
+
* false are left out; a `true` one (template, maintenance, building) changes what
|
|
134
|
+
* a caller should do with the site, so it stays.
|
|
135
|
+
*/
|
|
136
|
+
export function compactSite(s) {
|
|
137
|
+
const out = { id: s.id, name: s.name, slug: s.slug, url: s.publicUrl, role: s.role };
|
|
138
|
+
if (s.orgId)
|
|
139
|
+
out.org_id = s.orgId;
|
|
140
|
+
if (s.isTemplate)
|
|
141
|
+
out.template = s.templateName || true;
|
|
142
|
+
if (s.maintenanceMode)
|
|
143
|
+
out.maintenance = true;
|
|
144
|
+
if (s.building)
|
|
145
|
+
out.building = true;
|
|
146
|
+
if (s.role !== 'owner' && Array.isArray(s.effectivePermissions))
|
|
147
|
+
out.permissions = s.effectivePermissions;
|
|
148
|
+
return out;
|
|
149
|
+
}
|
|
125
150
|
export function registerSessionTools(server, ctx) {
|
|
126
151
|
server.registerTool('sb_connect', {
|
|
127
152
|
description: 'Call this first: what this install can reach, and the account\'s sites.',
|
|
@@ -153,12 +178,14 @@ export function registerSessionTools(server, ctx) {
|
|
|
153
178
|
throw new Error('sbuilder: no credential. Call sb_login (approve in the browser), or set SB_TOKEN to an ' +
|
|
154
179
|
'API key.');
|
|
155
180
|
}
|
|
156
|
-
|
|
181
|
+
const listed = (await request({
|
|
157
182
|
base: ctx.base,
|
|
158
183
|
method: 'GET',
|
|
159
184
|
path: '/api/sites',
|
|
160
185
|
token: ctx.session.token(),
|
|
161
186
|
fetchImpl: ctx.fetchImpl,
|
|
162
187
|
}));
|
|
188
|
+
const sites = (listed?.sites ?? []).map(compactSite);
|
|
189
|
+
return text({ sites, total: listed?.total ?? sites.length });
|
|
163
190
|
});
|
|
164
191
|
}
|
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.1",
|
|
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",
|