sbuilder-mcp 0.101.3 → 0.101.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +8 -0
- package/CHANGELOG.vi.md +8 -0
- package/dist/domains/site/theme.js +3 -1
- package/dist/tools/page.js +11 -3
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -6,6 +6,14 @@ 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.101.4] - 2026-10-30
|
|
10
|
+
|
|
11
|
+
### Added
|
|
12
|
+
- `sb_review` accepts an optional `page_id` and refuses with an error when it is not the open page, and its result names the reviewed page in `page`.
|
|
13
|
+
|
|
14
|
+
### Fixed
|
|
15
|
+
- `sb_review` scores a button with its own `transparent` background against the real surface behind it instead of the preset's fill, so it no longer reports false low-contrast findings.
|
|
16
|
+
|
|
9
17
|
## [0.101.3] - 2026-10-29
|
|
10
18
|
|
|
11
19
|
### Added
|
package/CHANGELOG.vi.md
CHANGED
|
@@ -6,6 +6,14 @@ 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.101.4] - 2026-10-30
|
|
10
|
+
|
|
11
|
+
### Added
|
|
12
|
+
- `sb_review` nhận thêm `page_id` tùy chọn và báo lỗi khi nó không phải trang đang mở, đồng thời kết quả ghi tên trang được review trong `page`.
|
|
13
|
+
|
|
14
|
+
### Fixed
|
|
15
|
+
- `sb_review` chấm nút có nền `transparent` riêng trên nền thật phía sau thay vì màu nền của preset, nên không còn báo sai lỗi tương phản thấp.
|
|
16
|
+
|
|
9
17
|
## [0.101.3] - 2026-10-29
|
|
10
18
|
|
|
11
19
|
### Added
|
|
@@ -92,7 +92,9 @@ export function groundOf(node, theme) {
|
|
|
92
92
|
if (own && own !== 'transparent') {
|
|
93
93
|
return { color: theme ? resolveVars(theme, own) : own, literal: !own.includes('var(') };
|
|
94
94
|
}
|
|
95
|
-
|
|
95
|
+
// An OWN `transparent` overrides the preset's fill (TTG: header links on
|
|
96
|
+
// button-default's #2e86ae read 2.28:1 while the page showed the bar's #eceef0).
|
|
97
|
+
if (own || !theme)
|
|
96
98
|
return null;
|
|
97
99
|
const id = presetIdOf(node);
|
|
98
100
|
const p = id ? s(findPreset(theme, id)?.base.backgroundColor) : '';
|
package/dist/tools/page.js
CHANGED
|
@@ -2038,11 +2038,18 @@ export function registerPageTools(server, ctx) {
|
|
|
2038
2038
|
server.registerTool('sb_review', {
|
|
2039
2039
|
description: 'What a VISITOR would meet on the open page (blank band, placeholder, dead binding) AND ' +
|
|
2040
2040
|
"what stands between this store and a paid order (checkout page, gateway, delivery, a " +
|
|
2041
|
-
'
|
|
2042
|
-
inputSchema: {},
|
|
2041
|
+
'cart link). Run it before calling a page done; page_id: only that page.',
|
|
2042
|
+
inputSchema: { page_id: z.string().optional() },
|
|
2043
2043
|
annotations: { readOnlyHint: true },
|
|
2044
|
-
}, async () => {
|
|
2044
|
+
}, async ({ page_id }) => {
|
|
2045
2045
|
const doc = session.current();
|
|
2046
|
+
// A REVIEW OF THE WRONG PAGE READS AS A CLEAN ONE. Measured on TTG: sb_page_open
|
|
2047
|
+
// batched with sb_review reached the server SECOND (the client's own dispatch,
|
|
2048
|
+
// past serial.ts), and the account page's review was the search page's.
|
|
2049
|
+
const open = session.page()?.pageId;
|
|
2050
|
+
if (page_id && page_id !== open) {
|
|
2051
|
+
throw new Error(`sbuilder: the open page is ${open}, not ${page_id} — call sb_page_open first, then review.`);
|
|
2052
|
+
}
|
|
2046
2053
|
// THE STORE'S OWN READINESS, which no API exposes and no page document
|
|
2047
2054
|
// can show. A page can review perfectly clean and still sit on a store
|
|
2048
2055
|
// with no checkout page, no gateway and no way back to the cart.
|
|
@@ -2102,6 +2109,7 @@ export function registerPageTools(server, ctx) {
|
|
|
2102
2109
|
// Clean = no finding a visitor meets; `advice` (maintenance) rides beside the verdict.
|
|
2103
2110
|
const clean = !field.findings;
|
|
2104
2111
|
return text({
|
|
2112
|
+
page: open,
|
|
2105
2113
|
...(clean ? { findings: [], verdict: 'Nothing a visitor would notice on this page.' } : {}),
|
|
2106
2114
|
...field,
|
|
2107
2115
|
...store,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "sbuilder-mcp",
|
|
3
|
-
"version": "0.101.
|
|
3
|
+
"version": "0.101.4",
|
|
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",
|