sbuilder-mcp 0.112.1 → 0.112.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,21 @@ 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.112.3] - 2026-11-21
10
+
11
+ ### Changed
12
+ - `sb_set` now defaults `pin_wider` to on (pass `pin_wider: false` to opt out), so a style key written at a narrow breakpoint no longer leaks to wider ones.
13
+
14
+ ### Fixed
15
+ - `sb_set` pins an empty value for a wider breakpoint when no safe value exists (a preset or the element's own stylesheet sets the key, or a colour has no neutral), so neither the preset nor the element CSS is overridden.
16
+
17
+ ## [0.112.2] - 2026-11-21
18
+
19
+ ### Added
20
+ - `sb_store` `action: "tracking"` lists Google Ads (`google_ads`) and Microsoft Clarity (`microsoft_clarity`) trackers alongside the existing providers.
21
+ - `sb_store` `action: "tracking"` reports `serverEvents` (`status`, `error`, `at`) for a Meta or TikTok tracker that has a stored token, without ever returning the token.
22
+ - The element catalog adds the carousel `config.navPosition` key, regenerated against web_builder 7ca95442e.
23
+
9
24
  ## [0.112.1] - 2026-11-21
10
25
 
11
26
  ### Added
package/CHANGELOG.vi.md CHANGED
@@ -6,6 +6,21 @@ 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.112.3] - 2026-11-21
10
+
11
+ ### Changed
12
+ - `sb_set` nay bật `pin_wider` theo mặc định (truyền `pin_wider: false` để tắt), nên khóa style ghi ở breakpoint hẹp không còn lan sang các breakpoint rộng hơn.
13
+
14
+ ### Fixed
15
+ - `sb_set` ghim giá trị rỗng cho breakpoint rộng hơn khi không có giá trị an toàn (preset hoặc stylesheet riêng của element đã đặt khóa đó, hoặc màu không có giá trị trung tính), nên preset và CSS của element không bị ghi đè.
16
+
17
+ ## [0.112.2] - 2026-11-21
18
+
19
+ ### Added
20
+ - `sb_store` `action: "tracking"` liệt kê thêm các tracker Google Ads (`google_ads`) và Microsoft Clarity (`microsoft_clarity`) bên cạnh các nhà cung cấp hiện có.
21
+ - `sb_store` `action: "tracking"` báo cáo `serverEvents` (`status`, `error`, `at`) cho tracker Meta hoặc TikTok đã lưu token, và không bao giờ trả về token.
22
+ - Danh mục element có thêm khóa `config.navPosition` của carousel, được tạo lại theo web_builder 7ca95442e.
23
+
9
24
  ## [0.112.1] - 2026-11-21
10
25
 
11
26
  ### Added
@@ -14302,7 +14302,7 @@ export const API_OPERATIONS = [
14302
14302
  "tags": [
14303
14303
  "integrations"
14304
14304
  ],
14305
- "summary": "List or connect site integrations (GA4, GTM, Meta Pixel, TikTok Pixel)",
14305
+ "summary": "List or connect site integrations (GA4, GTM, Meta Pixel, TikTok Pixel, Google Ads, Clarity)",
14306
14306
  "params": [
14307
14307
  {
14308
14308
  "name": "siteId",
@@ -14337,7 +14337,7 @@ export const API_OPERATIONS = [
14337
14337
  "tags": [
14338
14338
  "integrations"
14339
14339
  ],
14340
- "summary": "List or connect site integrations (GA4, GTM, Meta Pixel, TikTok Pixel)",
14340
+ "summary": "List or connect site integrations (GA4, GTM, Meta Pixel, TikTok Pixel, Google Ads, Clarity)",
14341
14341
  "params": [
14342
14342
  {
14343
14343
  "name": "siteId",
@@ -33298,7 +33298,7 @@ export const API_DEFINITIONS = {
33298
33298
  "type": "string"
33299
33299
  },
33300
33300
  "provider": {
33301
- "description": "Provider is one of google_analytics, google_tag_manager, facebook_pixel, tiktok_pixel, openai_pixel.",
33301
+ "description": "Provider is one of google_analytics, google_tag_manager, facebook_pixel, tiktok_pixel, openai_pixel, google_ads, microsoft_clarity.",
33302
33302
  "type": "string"
33303
33303
  },
33304
33304
  "siteId": {
@@ -1,7 +1,7 @@
1
1
  export const DEAD_KEY_SOURCE = {
2
- "files": 7062,
3
- "identifiers": 120794,
4
- "seededKeys": 486,
2
+ "files": 6553,
3
+ "identifiers": 119773,
4
+ "seededKeys": 487,
5
5
  "dead": 0
6
6
  };
7
7
  /**
@@ -33778,6 +33778,7 @@ export const ELEMENTS = {
33778
33778
  "pauseOnHover": true,
33779
33779
  "loop": true,
33780
33780
  "transition": "slide",
33781
+ "navPosition": "sides",
33781
33782
  "transitionMs": 350,
33782
33783
  "dotColor": "",
33783
33784
  "dotActiveColor": "",
@@ -33802,6 +33803,7 @@ export const ELEMENTS = {
33802
33803
  "pauseOnHover",
33803
33804
  "loop",
33804
33805
  "transition",
33806
+ "navPosition",
33805
33807
  "transitionMs",
33806
33808
  "dotColor",
33807
33809
  "dotActiveColor",
@@ -33888,6 +33890,7 @@ export const ELEMENTS = {
33888
33890
  "pauseOnHover",
33889
33891
  "loop",
33890
33892
  "transition",
33893
+ "navPosition",
33891
33894
  "transitionMs",
33892
33895
  "dotColor",
33893
33896
  "dotActiveColor",
@@ -33922,7 +33925,8 @@ export const ELEMENTS = {
33922
33925
  "Add a carousel-slide per slide; put an image plus a heading/button inside each",
33923
33926
  "Toggle config.showArrows / config.showDots for the navigation affordances",
33924
33927
  "Enable config.autoplay (with config.autoplayMs) for a self-advancing banner",
33925
- "Set config.transition to \"fade\" for a cross-fade instead of a horizontal slide"
33928
+ "Set config.transition to \"fade\" for a cross-fade instead of a horizontal slide",
33929
+ "Set config.navPosition to \"bottom-right\" to group the arrows in the bottom-right corner with the pagination bars beside them (a fashion-store hero); \"sides\" (default) centres them on each edge"
33926
33930
  ],
33927
33931
  "semantics": [
33928
33932
  "carousel",
@@ -4,7 +4,7 @@ export const SHAPE_SOURCE = {
4
4
  "fromHandlers": 364,
5
5
  "fromSwaggerOnly": 12,
6
6
  "withReadOnly": 29,
7
- "structsRead": 3876
7
+ "structsRead": 3881
8
8
  };
9
9
  export const REQUEST_SHAPES = {
10
10
  "post:/api/ai/credits": {
@@ -5400,7 +5400,7 @@ export const REQUEST_SHAPES = {
5400
5400
  {
5401
5401
  "name": "provider",
5402
5402
  "type": "string",
5403
- "note": "Provider is one of google_analytics, google_tag_manager, facebook_pixel, tiktok_pixel, openai_pixel."
5403
+ "note": "Provider is one of google_analytics, google_tag_manager, facebook_pixel, tiktok_pixel, openai_pixel, google_ads, microsoft_clarity."
5404
5404
  },
5405
5405
  {
5406
5406
  "name": "enabled",
@@ -5443,7 +5443,7 @@ export const REQUEST_SHAPES = {
5443
5443
  {
5444
5444
  "name": "provider",
5445
5445
  "type": "string",
5446
- "note": "Provider is one of google_analytics, google_tag_manager, facebook_pixel, tiktok_pixel, openai_pixel."
5446
+ "note": "Provider is one of google_analytics, google_tag_manager, facebook_pixel, tiktok_pixel, openai_pixel, google_ads, microsoft_clarity."
5447
5447
  },
5448
5448
  {
5449
5449
  "name": "enabled",
@@ -1,7 +1,7 @@
1
1
  // GENERATED by scripts/gen-catalog.ts — do not edit by hand.
2
2
  // The platform commit every other generated file here describes.
3
3
  export const PLATFORM_SOURCE = {
4
- "commit": "72a54e84137c80e28667c0e001fce8d1dd474366",
5
- "committedAt": "2026-11-21T07:32:04+07:00",
4
+ "commit": "7ca95442e98b7639f0a6eda640897766d1e19b01",
5
+ "committedAt": "2026-11-21T16:13:23+07:00",
6
6
  "dirty": false
7
7
  };
@@ -491,7 +491,7 @@ export function cascadeTail(node, written, id, state) {
491
491
  `cascade falls back UP to the nearest narrower slot, so ${wider} render the ${bp} value too.`,
492
492
  fix: `Say the wide-screen answer at base: sb_set id "${id ?? '<id>'}", namespace style, base:true` +
493
493
  `${state ? `, state:"${state}"` : ''}, keys { "${k}": <desktop value> } — or repeat this write with ` +
494
- 'pin_wider:true, which pins a safe default at base where one exists.',
494
+ 'sb_set without pin_wider:false, which pins base (a safe default, else an empty value) so it stays narrow.',
495
495
  },
496
496
  });
497
497
  }
@@ -567,7 +567,6 @@ export function fallUp(node, patches, id, type, pin, preset) {
567
567
  applyPatches(probe, patches);
568
568
  const pins = [];
569
569
  const pinned = [];
570
- const why = new Map();
571
570
  if (pin) {
572
571
  const done = new Set();
573
572
  for (const w of writes) {
@@ -575,24 +574,20 @@ export function fallUp(node, patches, id, type, pin, preset) {
575
574
  if (done.has(tag) || saidWider(probe.nodes[id], w.bp, w.key, w.state))
576
575
  continue;
577
576
  done.add(tag);
578
- const v = pinFor(type, w.key, w.state, preset);
579
- if ('reason' in v) {
580
- why.set(`style.${w.key}`, v.reason);
581
- continue;
582
- }
577
+ const p = pinFor(type, w.key, w.state, preset);
578
+ // NO SAFE VALUE IS NOT NO PIN. An EMPTY base value is a key to the cascade
579
+ // (`k in values`, so the fall stops) and a declaration the browser drops
580
+ // (`width:;`), so it overrides neither the preset nor the element's own
581
+ // stylesheet — the two things every refusal above protects. It is what the
582
+ // editor's own store pins for every narrow-only style write (web_builder
583
+ // stores/node.ts setNodeValue).
584
+ const v = 'reason' in p ? { value: '', from: `empty base — ${p.reason}, so nothing is painted there` } : p;
583
585
  pins.push({ op: 'set', path: ['nodes', id, ...(w.state ? ['states', w.state] : []), 'style', w.key], value: v.value });
584
586
  pinned.push({ id, key: `style.${w.key}`, ...(w.state ? { state: w.state } : {}), value: v.value, from: v.from });
585
587
  }
586
588
  applyPatches(probe, pins);
587
589
  }
588
590
  const notes = writes.flatMap((w) => cascadeTail(probe.nodes[id], { [w.bp]: { [w.key]: true } }, id, w.state));
589
- if (pin) {
590
- for (const n of notes) {
591
- n.note.fix =
592
- `pin_wider wrote nothing for ${n.note.key} on ${type}: ${why.get(n.note.key) ?? 'no safe value'}. ` +
593
- `Say the desktop value yourself: sb_set id "${id}", namespace style, base:true, keys { … }.`;
594
- }
595
- }
596
591
  return { pins, pinned, notes };
597
592
  }
598
593
  /**
@@ -1757,7 +1757,7 @@ export function registerPageTools(server, ctx) {
1757
1757
  pin_wider: z
1758
1758
  .boolean()
1759
1759
  .optional()
1760
- .describe('Pin a safe base value so a narrow-only style key does not fall back up; see pinned'),
1760
+ .describe('Default ON: a narrow-only style key gets a base pin so it does not fall back up to wider widths (see pinned). false writes the narrow slot alone'),
1761
1761
  dry_run: z.boolean().optional(),
1762
1762
  force: z.boolean().optional().describe('Override a render-inference guard; reported as forced'),
1763
1763
  },
@@ -1815,7 +1815,7 @@ export function registerPageTools(server, ctx) {
1815
1815
  // where it went; `pin_wider` adds the base writes that stop it to this save.
1816
1816
  // A preset is a class rule the pin (an ID rule) would override, so the pin
1817
1817
  // asks the node's preset first — fetched only when a pin is asked for.
1818
- const pinTheme = pin_wider === true ? (await siteTheme(ctx, session.site())).theme : null;
1818
+ const pinTheme = pin_wider !== false ? (await siteTheme(ctx, session.site())).theme : null;
1819
1819
  const presetOf = (nid) => {
1820
1820
  const pid = pinTheme ? presetIdOf(d.doc.nodes[nid]) : null;
1821
1821
  if (!pid)
@@ -1824,7 +1824,7 @@ export function registerPageTools(server, ctx) {
1824
1824
  };
1825
1825
  const fall = [...new Set(batch.filter((e) => e.namespace === 'style').map((e) => e.id))]
1826
1826
  .filter((nid) => d.doc.nodes[nid])
1827
- .map((nid) => fallUp(d.doc.nodes[nid], patches.filter((p) => p.path[0] === 'nodes' && p.path[1] === nid), nid, d.doc.nodes[nid].data.type, pin_wider === true, presetOf(nid)));
1827
+ .map((nid) => fallUp(d.doc.nodes[nid], patches.filter((p) => p.path[0] === 'nodes' && p.path[1] === nid), nid, d.doc.nodes[nid].data.type, pin_wider !== false, presetOf(nid)));
1828
1828
  for (const f of fall)
1829
1829
  patches.push(...f.pins);
1830
1830
  const pinnedList = fall.flatMap((f) => f.pinned);
@@ -48,7 +48,7 @@ import { attachGlobal, buildChrome, detachGlobal, markSiteTemplate, promoteGloba
48
48
  import { bindMenu } from './menu.js';
49
49
  import { attachOverlay, ensureCartDrawer, relocalizeCartDrawer } from './overlay.js';
50
50
  import { installApp } from './app.js';
51
- import { trackingFlow } from './tracking.js';
51
+ import { TRACKING_FIELDS, trackingFlow } from './tracking.js';
52
52
  import { BUILTIN_APP_KEYS } from '../catalog/appscaffolds.generated.js';
53
53
  import { ELEMENTS } from '../catalog/elements.generated.js';
54
54
  import { PAGE_TYPES } from '../catalog/storepages.generated.js';
@@ -658,7 +658,7 @@ export function registerStoreTools(server, ctx, session) {
658
658
  'single image; needs a page of the site open'),
659
659
  text: z.string().optional(),
660
660
  provider: z
661
- .enum(['google_analytics', 'google_tag_manager', 'facebook_pixel', 'tiktok_pixel', 'openai_pixel'])
661
+ .enum(Object.keys(TRACKING_FIELDS))
662
662
  .optional(),
663
663
  enabled: z.boolean().optional(),
664
664
  dry_run: z.boolean().optional(),
@@ -27,6 +27,8 @@ export const TRACKING_FIELDS = {
27
27
  facebook_pixel: 'pixelId',
28
28
  tiktok_pixel: 'pixelId',
29
29
  openai_pixel: 'pixelId',
30
+ google_ads: 'conversionId',
31
+ microsoft_clarity: 'projectId',
30
32
  };
31
33
  export async function trackingFlow(ctx, siteId, args) {
32
34
  const site = encodeURIComponent(siteId);
@@ -155,6 +157,17 @@ export async function trackingFlow(ctx, siteId, args) {
155
157
  id: idOf(r),
156
158
  enabled: r.enabled,
157
159
  ...(r.problem ? { problem: r.problem } : {}),
160
+ // Server-side events (Meta CAPI / TikTok Events API): the token is set
161
+ // on the Integrations screen; this reports whether sending works.
162
+ ...(r.tokenSet
163
+ ? {
164
+ serverEvents: {
165
+ status: r.config?.serverStatus || 'waiting',
166
+ ...(r.config?.serverError ? { error: r.config.serverError } : {}),
167
+ ...(r.config?.serverAt ? { at: r.config.serverAt } : {}),
168
+ },
169
+ }
170
+ : {}),
158
171
  };
159
172
  }),
160
173
  channelsLast30Days: channels,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "sbuilder-mcp",
3
- "version": "0.112.1",
3
+ "version": "0.112.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",