sbuilder-mcp 0.83.2 → 0.83.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 CHANGED
@@ -6,6 +6,12 @@ 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.83.3] - 2026-10-11
10
+
11
+ ### Fixed
12
+ - `sb_page_create` rejects a page `type` that does not exist and lists the valid types, instead of letting the platform silently store it as `page`; a `home` type points to `is_homepage: true`.
13
+ - `sb_page_state` and `sb_page_version` take the site of the open page when `SB_SITE` is not set, instead of refusing with "no site".
14
+
9
15
  ## [0.83.2] - 2026-10-11
10
16
 
11
17
  ### Added
package/CHANGELOG.vi.md CHANGED
@@ -6,6 +6,12 @@ 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.83.3] - 2026-10-11
10
+
11
+ ### Fixed
12
+ - `sb_page_create` từ chối `type` trang không tồn tại và liệt kê các loại hợp lệ, thay vì để platform lặng lẽ lưu thành `page`; type `home` được chỉ sang `is_homepage: true`.
13
+ - `sb_page_state` và `sb_page_version` lấy site của trang đang mở khi không có `SB_SITE`, thay vì từ chối với lỗi "no site".
14
+
9
15
  ## [0.83.2] - 2026-10-11
10
16
 
11
17
  ### Added
@@ -2227,6 +2227,14 @@ export function registerPageTools(server, ctx) {
2227
2227
  // its own type is what gives it its icon and tells the next reader what it
2228
2228
  // is for. Only when the caller named no type; an explicit one wins.
2229
2229
  const askedType = type;
2230
+ // AN UNKNOWN TYPE IS STORED AS "page", SILENTLY (page.go validType). Measured:
2231
+ // type "home" created a plain page at /home and answered 201, so the site
2232
+ // still had no homepage and nothing said so.
2233
+ if (type !== undefined && !PAGE_TYPES.some((t) => t.type === type)) {
2234
+ throw new Error(`sbuilder: page type "${type}" does not exist — the platform would store it as "page". ` +
2235
+ (/^home(page)?$/i.test(type) ? 'A homepage is is_homepage:true on any page. ' : '') +
2236
+ `Types: ${PAGE_TYPES.map((t) => t.type).join(', ')}.`);
2237
+ }
2230
2238
  type ??= purposeTypeForName(name);
2231
2239
  // TYPE IS THE ROUTE for several kinds of page: /checkout and
2232
2240
  // /products/{slug} resolve to the site's PUBLISHED page of that type and
@@ -2590,7 +2598,9 @@ export function registerPageTools(server, ctx) {
2590
2598
  },
2591
2599
  annotations: { readOnlyHint: true },
2592
2600
  }, async ({ site_id: given, page_id }) => {
2593
- const site_id = siteFor(ctx, given);
2601
+ // The open page's site, like its page id: with no SB_SITE this refused a
2602
+ // call on the page it had just been pointed at.
2603
+ const site_id = siteFor(ctx, given ?? (page_id ? undefined : session.page()?.siteId));
2594
2604
  // No open page is fine when page_id names one — `location()` throws.
2595
2605
  const here = session.page() ?? { siteId: '', pageId: '' };
2596
2606
  const pageId = page_id ?? here.pageId;
@@ -30,8 +30,8 @@ export function registerPageVersionTools(server, ctx, session) {
30
30
  },
31
31
  annotations: { readOnlyHint: false, destructiveHint: true },
32
32
  }, async ({ action, site_id: given, page_id, label, version_id, history_id, dry_run }) => {
33
- const siteId = siteFor(ctx, given);
34
33
  const open = session.page();
34
+ const siteId = siteFor(ctx, given ?? (page_id ? undefined : open?.siteId));
35
35
  const pageId = page_id ?? (open?.siteId === siteId ? open.pageId : undefined);
36
36
  if (!pageId)
37
37
  throw new Error('sbuilder: sb_page_version needs page_id, or a page opened with sb_page_open.');
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "sbuilder-mcp",
3
- "version": "0.83.2",
3
+ "version": "0.83.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",