sbuilder-mcp 0.11.2 → 0.11.3
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 +5 -0
- package/CHANGELOG.vi.md +5 -0
- package/dist/tools/page.js +19 -11
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -6,6 +6,11 @@ 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.11.3] - 2026-09-09
|
|
10
|
+
|
|
11
|
+
### Fixed
|
|
12
|
+
- sb_set now says its hover-routing note once per element type per process instead of once per node, since repairing every button on a page in one batch returned ten copies of the same 300-character paragraph; a different element type still gets its own note, because it says something different.
|
|
13
|
+
|
|
9
14
|
## [0.11.2] - 2026-09-09
|
|
10
15
|
|
|
11
16
|
### Fixed
|
package/CHANGELOG.vi.md
CHANGED
|
@@ -6,6 +6,11 @@ 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.11.3] - 2026-09-09
|
|
10
|
+
|
|
11
|
+
### Fixed
|
|
12
|
+
- sb_set giờ chỉ nói ghi chú định tuyến hover một lần cho mỗi loại element trong mỗi tiến trình thay vì một lần cho mỗi node, vì việc sửa mọi nút button trên một trang trong cùng một batch trước đây trả về mười bản sao của cùng một đoạn văn 300 ký tự; một loại element khác vẫn nhận được ghi chú riêng của nó, vì nó nói một điều khác.
|
|
13
|
+
|
|
9
14
|
## [0.11.2] - 2026-09-09
|
|
10
15
|
|
|
11
16
|
### Fixed
|
package/dist/tools/page.js
CHANGED
|
@@ -305,17 +305,26 @@ export function registerPageTools(server, ctx) {
|
|
|
305
305
|
}
|
|
306
306
|
const { patches, touched } = setMany(d, batch);
|
|
307
307
|
// WHERE A HOVER ACTUALLY WENT. Routing it silently would leave a caller
|
|
308
|
-
// who reads the node back looking for keys in a slot they never wrote to
|
|
309
|
-
//
|
|
310
|
-
//
|
|
311
|
-
|
|
308
|
+
// who reads the node back looking for keys in a slot they never wrote to.
|
|
309
|
+
//
|
|
310
|
+
// ONCE PER PROCESS PER ELEMENT TYPE, not once per node. A batch repairing
|
|
311
|
+
// every button on a page carried ten copies of the same 300-character
|
|
312
|
+
// paragraph — measured, on this repo's own storefront — which is the shape
|
|
313
|
+
// `ctx.notices` exists to prevent. The type is the whole content of the
|
|
314
|
+
// note, so a second copy tells the caller nothing they were not just told,
|
|
315
|
+
// and the ids it applies to are already in `set`.
|
|
316
|
+
const hoverTypes = new Set();
|
|
312
317
|
for (const e of batch) {
|
|
313
318
|
if (e.state !== HOVER_STATE || e.namespace !== 'style')
|
|
314
319
|
continue;
|
|
315
|
-
const
|
|
316
|
-
if (
|
|
317
|
-
|
|
320
|
+
const type = d.doc.nodes[e.id]?.data.type ?? '';
|
|
321
|
+
if (hoverRoutingNote(type))
|
|
322
|
+
hoverTypes.add(type);
|
|
318
323
|
}
|
|
324
|
+
const hoverNote = [...hoverTypes]
|
|
325
|
+
.map((t) => ctx.notices.once(`hover-home:${t}`, hoverRoutingNote(t)))
|
|
326
|
+
.filter((n) => !!n)
|
|
327
|
+
.join(' ');
|
|
319
328
|
// THE STICKY WARNING IS COMPUTED AGAINST THE DOCUMENT AS IT WILL BE, so
|
|
320
329
|
// the dry run and the real run say the same thing. A caller who is told
|
|
321
330
|
// only after committing has already shipped a header that does not move.
|
|
@@ -346,7 +355,7 @@ export function registerPageTools(server, ctx) {
|
|
|
346
355
|
dry_run: true,
|
|
347
356
|
patches,
|
|
348
357
|
...(Object.keys(sw).length ? { warnings: sw } : {}),
|
|
349
|
-
...(
|
|
358
|
+
...(hoverNote ? { hover: hoverNote } : {}),
|
|
350
359
|
...(note ? { note } : {}),
|
|
351
360
|
});
|
|
352
361
|
}
|
|
@@ -360,19 +369,18 @@ export function registerPageTools(server, ctx) {
|
|
|
360
369
|
}
|
|
361
370
|
if (!edits) {
|
|
362
371
|
const warn = warnings[batch[0].id];
|
|
363
|
-
const hv = hoverNotes[batch[0].id];
|
|
364
372
|
return text({
|
|
365
373
|
set: touched[0].keys,
|
|
366
374
|
rev: d.rev,
|
|
367
375
|
...(warn ? { warning: warn } : {}),
|
|
368
|
-
...(
|
|
376
|
+
...(hoverNote ? { hover: hoverNote } : {}),
|
|
369
377
|
});
|
|
370
378
|
}
|
|
371
379
|
return text({
|
|
372
380
|
set: touched,
|
|
373
381
|
rev: d.rev,
|
|
374
382
|
...(Object.keys(warnings).length ? { warnings } : {}),
|
|
375
|
-
...(
|
|
383
|
+
...(hoverNote ? { hover: hoverNote } : {}),
|
|
376
384
|
});
|
|
377
385
|
});
|
|
378
386
|
server.registerTool('sb_move', {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "sbuilder-mcp",
|
|
3
|
-
"version": "0.11.
|
|
3
|
+
"version": "0.11.3",
|
|
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",
|