sbuilder-mcp 0.101.1 → 0.101.2
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/mcp/strict.js +19 -0
- package/dist/server.js +2 -0
- 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.101.2] - 2026-10-29
|
|
10
|
+
|
|
11
|
+
### Fixed
|
|
12
|
+
- Every tool refuses an undeclared argument with an error naming the key instead of silently ignoring it, so `sb_look` no longer screenshots the wrong page when given `page_id` and reporting a 404.
|
|
13
|
+
|
|
9
14
|
## [0.101.1] - 2026-10-29
|
|
10
15
|
|
|
11
16
|
### Changed
|
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.101.2] - 2026-10-29
|
|
10
|
+
|
|
11
|
+
### Fixed
|
|
12
|
+
- Mọi công cụ từ chối tham số không khai báo bằng lỗi nêu tên khóa thay vì lặng lẽ bỏ qua, nên `sb_look` không còn chụp nhầm trang khi nhận `page_id` rồi báo 404.
|
|
13
|
+
|
|
9
14
|
## [0.101.1] - 2026-10-29
|
|
10
15
|
|
|
11
16
|
### Changed
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
/**
|
|
3
|
+
* AN ARGUMENT A TOOL DOES NOT TAKE IS REFUSED, NOT DROPPED.
|
|
4
|
+
*
|
|
5
|
+
* The SDK wraps a raw shape in a plain `z.object`, which strips unknown keys in
|
|
6
|
+
* silence. Measured on TTG (gap #82): `sb_look` called with `page_id` of the
|
|
7
|
+
* home page dropped it and shot the session's open page instead, a page deleted
|
|
8
|
+
* hours earlier, so the call 404'd and named neither page. A refusal names the
|
|
9
|
+
* key, and the agent fixes the call instead of trusting a result about
|
|
10
|
+
* something else. Call before the first `registerTool`.
|
|
11
|
+
*/
|
|
12
|
+
export function refuseUnknownArgs(server) {
|
|
13
|
+
const register = server.registerTool.bind(server);
|
|
14
|
+
server.registerTool = ((name, config, cb) => {
|
|
15
|
+
const shape = config.inputSchema;
|
|
16
|
+
const strict = shape && !(shape instanceof z.ZodType) ? z.object(shape).strict() : shape;
|
|
17
|
+
return register(name, { ...config, inputSchema: strict }, cb);
|
|
18
|
+
});
|
|
19
|
+
}
|
package/dist/server.js
CHANGED
|
@@ -19,6 +19,7 @@ import { registerUndoTools } from './tools/undo.js';
|
|
|
19
19
|
import { registerThemeTools } from './tools/theme.js';
|
|
20
20
|
import { registerTranslateTools } from './tools/translate.js';
|
|
21
21
|
import { serializeToolCalls } from './mcp/serial.js';
|
|
22
|
+
import { refuseUnknownArgs } from './mcp/strict.js';
|
|
22
23
|
/**
|
|
23
24
|
* Sent on every handshake, so it is short, and says nothing a tool description
|
|
24
25
|
* already says. Counts come from the generated source records, never literals.
|
|
@@ -93,6 +94,7 @@ export function createServer(ctx = buildContext()) {
|
|
|
93
94
|
// Every tool that can reach the open document runs in arrival order — see
|
|
94
95
|
// mcp/serial.ts. Before the first registerTool, which installs tools/call.
|
|
95
96
|
serializeToolCalls(server, (name) => SESSION_FREE.has(name));
|
|
97
|
+
refuseUnknownArgs(server);
|
|
96
98
|
registerSessionTools(server, ctx);
|
|
97
99
|
registerApiTools(server, ctx);
|
|
98
100
|
const pageSession = registerPageTools(server, ctx);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "sbuilder-mcp",
|
|
3
|
-
"version": "0.101.
|
|
3
|
+
"version": "0.101.2",
|
|
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",
|