sbuilder-mcp 0.45.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 +13 -0
- package/CHANGELOG.vi.md +13 -0
- package/dist/catalog/elements.generated.js +39 -0
- package/dist/tools/page.js +19 -1
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -6,6 +6,19 @@ 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
|
+
|
|
14
|
+
## [0.46.0] - 2026-09-14
|
|
15
|
+
|
|
16
|
+
### Added
|
|
17
|
+
- Codegen now also scans a second declaration shape — a typed array of const-object members, such as `OPTION_SOURCES: OptionSource[] = [...]` — not just the plain `as-const` array it already read, growing scanned declarations from 23 to 57 and the catalog's legal-value vocabulary from 61 to 64 entries; form-select, form-radio and form-checkbox now carry a vocabulary for optionSource, reachable through sb_traits_for's specials_values and sb_set's out-of-vocabulary warning.
|
|
18
|
+
|
|
19
|
+
### Fixed
|
|
20
|
+
- A shared vocabulary module is now only joined to a config or specials key when the module's own name names that key, closing the false-join risk a wider scan would otherwise reopen (a seed value like "category" or "text" is a common word that coincidentally matches unrelated shared lists); verified against the newly-widened scan, which would otherwise have wrongly joined filterSource's "category" value to an unrelated option-source list.
|
|
21
|
+
|
|
9
22
|
## [0.45.0] - 2026-09-14
|
|
10
23
|
|
|
11
24
|
### Added
|
package/CHANGELOG.vi.md
CHANGED
|
@@ -6,6 +6,19 @@ 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
|
+
|
|
14
|
+
## [0.46.0] - 2026-09-14
|
|
15
|
+
|
|
16
|
+
### Added
|
|
17
|
+
- Codegen giờ quét thêm một dạng khai báo thứ hai — một mảng có kiểu gồm các thành viên từ const-object, ví dụ `OPTION_SOURCES: OptionSource[] = [...]` — chứ không chỉ mảng `as-const` thuần như trước, nâng số khai báo được quét từ 23 lên 57 và bảng giá trị hợp lệ của catalog từ 61 lên 64 mục; form-select, form-radio và form-checkbox giờ có bảng giá trị cho optionSource, tra được qua specials_values của sb_traits_for và cảnh báo giá trị nằm ngoài bảng của sb_set.
|
|
18
|
+
|
|
19
|
+
### Fixed
|
|
20
|
+
- Một module vocabulary dùng chung giờ chỉ được nối với một key config hoặc specials khi chính tên của module đó nêu tên key ấy, khép lại nguy cơ nối sai mà việc quét rộng hơn lẽ ra sẽ mở lại (một giá trị seed như "category" hay "text" là từ tiếng Anh thông dụng, tình cờ trùng với các danh sách dùng chung không liên quan); được xác minh trên chính bản quét đã mở rộng, vốn nếu không sẽ nối sai giá trị "category" của filterSource vào một danh sách option-source không liên quan.
|
|
21
|
+
|
|
9
22
|
## [0.45.0] - 2026-09-14
|
|
10
23
|
|
|
11
24
|
### Added
|
|
@@ -37034,6 +37034,45 @@ export const ELEMENT_VALUES = {
|
|
|
37034
37034
|
"readBy": "COLOR_MODES (editor/src/components/inspector/ScenePaletteRows.vue)"
|
|
37035
37035
|
}
|
|
37036
37036
|
},
|
|
37037
|
+
"form-select": {
|
|
37038
|
+
"optionSource": {
|
|
37039
|
+
"target": "config",
|
|
37040
|
+
"writeKey": "optionSource",
|
|
37041
|
+
"values": [
|
|
37042
|
+
"article",
|
|
37043
|
+
"category",
|
|
37044
|
+
"manual",
|
|
37045
|
+
"product"
|
|
37046
|
+
],
|
|
37047
|
+
"readBy": "OPTION_SOURCES (schema/src/elements/formOptionSource.ts)"
|
|
37048
|
+
}
|
|
37049
|
+
},
|
|
37050
|
+
"form-radio": {
|
|
37051
|
+
"optionSource": {
|
|
37052
|
+
"target": "config",
|
|
37053
|
+
"writeKey": "optionSource",
|
|
37054
|
+
"values": [
|
|
37055
|
+
"article",
|
|
37056
|
+
"category",
|
|
37057
|
+
"manual",
|
|
37058
|
+
"product"
|
|
37059
|
+
],
|
|
37060
|
+
"readBy": "OPTION_SOURCES (schema/src/elements/formOptionSource.ts)"
|
|
37061
|
+
}
|
|
37062
|
+
},
|
|
37063
|
+
"form-checkbox": {
|
|
37064
|
+
"optionSource": {
|
|
37065
|
+
"target": "config",
|
|
37066
|
+
"writeKey": "optionSource",
|
|
37067
|
+
"values": [
|
|
37068
|
+
"article",
|
|
37069
|
+
"category",
|
|
37070
|
+
"manual",
|
|
37071
|
+
"product"
|
|
37072
|
+
],
|
|
37073
|
+
"readBy": "OPTION_SOURCES (schema/src/elements/formOptionSource.ts)"
|
|
37074
|
+
}
|
|
37075
|
+
},
|
|
37037
37076
|
"form-date": {
|
|
37038
37077
|
"format": {
|
|
37039
37078
|
"target": "specials",
|
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.
|
|
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",
|