sbuilder-mcp 0.59.1 → 0.59.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,17 @@ 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.59.3] - 2026-09-15
10
+
11
+ ### Changed
12
+ - The call sheet for `POST /api/sites/{siteId}/ai/messages` now documents its `context` body field — the page outline plus the selected element's trait list, value types and current values — so a call through `sb_api_call` can pass the editor's own capability list instead of guessing at the shape.
13
+
14
+ ## [0.59.2] - 2026-09-15
15
+
16
+ ### Fixed
17
+ - The call sheet for creating or replacing a product now states, at the moment a price is written, that `priceCents`, `compareAtCents`, `costCents`, and a shipping method's `feeCents` are minor units divided by 100 on the storefront, instead of only as the fix for a readiness gap that clears the moment a product exists.
18
+ - The call sheet now states that the variant picker renders from `product.attributes`, not from `variants[].options` alone, so a product with variants but no declared attributes no longer silently ships the element's seed options ("Color: Red / Green / Blue") on the published page.
19
+
9
20
  ## [0.59.1] - 2026-09-15
10
21
 
11
22
  ### Added
package/CHANGELOG.vi.md CHANGED
@@ -6,6 +6,17 @@ 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.59.3] - 2026-09-15
10
+
11
+ ### Changed
12
+ - Call sheet cho `POST /api/sites/{siteId}/ai/messages` giờ mô tả trường `context` trong body — gồm outline của trang cùng danh sách trait, kiểu giá trị và giá trị hiện tại của phần tử đang chọn — nhờ đó một lệnh gọi qua `sb_api_call` có thể gửi đúng danh sách năng lực của editor thay vì phải đoán hình dạng của nó.
13
+
14
+ ## [0.59.2] - 2026-09-15
15
+
16
+ ### Fixed
17
+ - Call sheet để tạo hoặc thay thế sản phẩm giờ nêu rõ, ngay tại thời điểm giá được ghi, rằng `priceCents`, `compareAtCents`, `costCents` và `feeCents` của một shipping method đều là đơn vị nhỏ nhất, được chia cho 100 trên storefront, thay vì chỉ xuất hiện như hướng khắc phục cho một lỗi sẵn sàng vốn biến mất ngay khi có sản phẩm.
18
+ - Call sheet giờ nêu rõ bộ chọn variant hiển thị từ `product.attributes`, không phải chỉ từ `variants[].options`, nhờ đó một sản phẩm có variant nhưng chưa khai báo attributes sẽ không còn âm thầm hiển thị các tuỳ chọn gieo sẵn của phần tử ("Color: Red / Green / Blue") trên trang đã publish.
19
+
9
20
  ## [0.59.1] - 2026-09-15
10
21
 
11
22
  ### Added
@@ -3349,7 +3349,7 @@ export const API_OPERATIONS = [
3349
3349
  "in": "body",
3350
3350
  "required": true,
3351
3351
  "type": "object",
3352
- "description": "question (required) and history (prior turns: role user|assistant, text)"
3352
+ "description": "question (required), history (prior turns: role user|assistant, text) and context (the selected element the agent may propose edits to)"
3353
3353
  }
3354
3354
  ],
3355
3355
  "bodyDescribed": false,
@@ -1,6 +1,6 @@
1
1
  export const DEAD_KEY_SOURCE = {
2
- "files": 4007,
3
- "identifiers": 76941,
2
+ "files": 4023,
3
+ "identifiers": 77197,
4
4
  "seededKeys": 384,
5
5
  "dead": 0
6
6
  };
@@ -352,7 +352,7 @@ export function describeOperation(op) {
352
352
  '/apps/blocks again for what it contributed.',
353
353
  };
354
354
  }
355
- // FILLING A CATALOGUE WAS REACHABLE AND THREE FACTS ABOUT IT WERE NOT, each
355
+ // FILLING A CATALOGUE WAS REACHABLE AND FIVE FACTS ABOUT IT WERE NOT, each
356
356
  // failing silently. Attached to the call sheet for the same reason the
357
357
  // translation table is: this is where the agent is when it decides what to
358
358
  // send, on both credential surfaces a product can be created or replaced on.
@@ -360,6 +360,37 @@ export function describeOperation(op) {
360
360
  out.product_traps = {
361
361
  price: 'Price lives on the VARIANT, not the product — variants[].priceCents. A product ' +
362
362
  'posted with no variant renders a catalogue entry nobody can buy.',
363
+ // MINOR UNITS, SAID WHERE THE NUMBER IS BEING WRITTEN.
364
+ //
365
+ // The fact was already in the codebase — `readiness.ts` carries it twice —
366
+ // but only as the FIX on a store gap that fires when the catalogue is
367
+ // EMPTY or has no priced product. The moment an agent creates products the
368
+ // gap clears, so the sentence is on screen exactly while it cannot be
369
+ // acted on and gone the moment it could be.
370
+ //
371
+ // MEASURED: a whole storefront built with every price 100× low. Cherry at
372
+ // "8.500 ₫", a 3.2M gift basket at "32.000 ₫" — read back through the
373
+ // renderer, published, and only caught because the numbers looked absurd
374
+ // to a human. Nothing refused them: `priceCents` takes any integer, and a
375
+ // store whose every price is wrong by the same factor looks internally
376
+ // consistent.
377
+ units: 'priceCents is MINOR UNITS — the storefront divides by 100, so VND 280.000 is ' +
378
+ "28000000. Same for compareAtCents, costCents and a shipping method's feeCents. " +
379
+ 'Nothing refuses a wrong one, and every price wrong by the same factor looks ' +
380
+ 'deliberate. Write one, read the rendered price, then write the rest.',
381
+ // THE PICKER A PRODUCT GETS WHEN NOBODY DECLARED ITS OPTIONS.
382
+ //
383
+ // `variants[].options` alone is not enough: the buy box reads
384
+ // `attributes` for the control, and a product with variants but no
385
+ // attributes renders the ELEMENT'S SEED — "Color: Red / Green / Blue",
386
+ // "Size: S / M / L" — on a real product page, published.
387
+ //
388
+ // MEASURED on a fruit-gift store: every one of 19 products offered Color
389
+ // and Size until attributes were added.
390
+ attributes: 'The variant picker comes from product.attributes — [{ name, values[] }] — not ' +
391
+ "from variants[].options alone. Variants without attributes render the element's " +
392
+ 'seed ("Color: Red / Green / Blue") on the published page. Declare attributes, and ' +
393
+ "match each variant's options keys to them.",
363
394
  slug: 'A colliding slug is RENAMED, not refused, and the write still answers 200/201. ' +
364
395
  'Re-running an import does not error — it DOUBLES the catalogue in silence.',
365
396
  images: 'POST /api/media/{siteId}/from-url ingests a photo straight from its URL, one hop ' +
@@ -4,7 +4,7 @@ export const SHAPE_SOURCE = {
4
4
  "fromHandlers": 176,
5
5
  "fromSwaggerOnly": 0,
6
6
  "withReadOnly": 26,
7
- "structsRead": 1678
7
+ "structsRead": 1697
8
8
  };
9
9
  export const REQUEST_SHAPES = {
10
10
  "post:/api/sites/{siteId}/api-keys": {
@@ -3008,6 +3008,11 @@ export const REQUEST_SHAPES = {
3008
3008
  "name": "history",
3009
3009
  "type": "llm.Turn[]",
3010
3010
  "note": "History is sent by the CLIENT, unlike the storefront chatbot's, which removed it as a security fix."
3011
+ },
3012
+ {
3013
+ "name": "context",
3014
+ "type": "editoragent.EditContext | null",
3015
+ "note": "Context is the PAGE as the EDITOR described it — the outline of ROOT's children, and the selected element with its trait list, value types and current values, read off the live registries at send time. IT IS THE CAPABILITY LIST, not a hint."
3011
3016
  }
3012
3017
  ],
3013
3018
  "source": "go",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "sbuilder-mcp",
3
- "version": "0.59.1",
3
+ "version": "0.59.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",