sbuilder-mcp 0.46.0 → 0.46.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 +5 -0
- package/CHANGELOG.vi.md +5 -0
- package/dist/tools/page.js +19 -1
- 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.46.1] - 2026-09-14
|
|
10
|
+
|
|
11
|
+
### Fixed
|
|
12
|
+
- sb_remove's dry run now reports removing as an actual node count instead of the total patch count, which was off by one in the ordinary case because deleting a subtree also emits one extra patch to unlink it from its parent's child list; the raw patch count is still available under the new patches field.
|
|
13
|
+
|
|
9
14
|
## [0.46.0] - 2026-09-14
|
|
10
15
|
|
|
11
16
|
### Added
|
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.46.1] - 2026-09-14
|
|
10
|
+
|
|
11
|
+
### Fixed
|
|
12
|
+
- Dry run của sb_remove giờ báo removing là số node thực sự thay vì tổng số patch, vốn bị lệch một do việc xoá một subtree còn phát sinh thêm một patch để gỡ nó khỏi danh sách con của node cha; tổng số patch thô vẫn có sẵn qua trường patches mới.
|
|
13
|
+
|
|
9
14
|
## [0.46.0] - 2026-09-14
|
|
10
15
|
|
|
11
16
|
### Added
|
package/dist/tools/page.js
CHANGED
|
@@ -684,8 +684,26 @@ export function registerPageTools(server, ctx) {
|
|
|
684
684
|
}, async ({ id, dry_run }) => {
|
|
685
685
|
const d = session.current();
|
|
686
686
|
const patches = removeNode(d, id);
|
|
687
|
+
// NODES, NOT PATCHES — this reported `patches.length` and the field is
|
|
688
|
+
// called `removing` on a tool whose description is "Remove a node and its
|
|
689
|
+
// whole subtree", so every caller reads it as a node count.
|
|
690
|
+
//
|
|
691
|
+
// It is off by one in the ORDINARY case and exact in the rare one, which
|
|
692
|
+
// is the worst arrangement available: `removeNode` emits one `unset` per
|
|
693
|
+
// doomed node PLUS one `remove` that takes the id out of its parent's
|
|
694
|
+
// child list — and that second patch exists only when the parent is still
|
|
695
|
+
// in the document. A childless section under ROOT therefore reported 2,
|
|
696
|
+
// and a four-node subtree whose parent had already been deleted reported
|
|
697
|
+
// 4 and was right. Both numbers were believed here: the 2 was read as
|
|
698
|
+
// evidence of a hidden node attached by `parent` alone, and a page-source
|
|
699
|
+
// dump then proved no such node exists.
|
|
700
|
+
//
|
|
701
|
+
// The doomed set is exactly the `unset` patches that name a node
|
|
702
|
+
// directly; the parent-list patch is an `insert`/`remove` four segments
|
|
703
|
+
// deep, so length is what separates them without re-deriving the walk.
|
|
704
|
+
const nodes = patches.filter((p) => p.op === 'unset' && p.path.length === 2).length;
|
|
687
705
|
if (dry_run !== false)
|
|
688
|
-
return text({ dry_run: true, removing: patches.length });
|
|
706
|
+
return text({ dry_run: true, removing: nodes, patches: patches.length });
|
|
689
707
|
await session.applyAndSave(patches);
|
|
690
708
|
return text({ removed: id, rev: d.rev });
|
|
691
709
|
});
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "sbuilder-mcp",
|
|
3
|
-
"version": "0.46.
|
|
3
|
+
"version": "0.46.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",
|