sbuilder-mcp 0.11.2 → 0.12.0

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,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.12.0] - 2026-09-09
10
+
11
+ ### Added
12
+ - npm run codegen:check now also refuses a checkout whose HEAD carries commits touching the directories it reads (schema/src, editor/src, server/render, server/docs) that its upstream branch does not have, naming the commits; an uncommitted-only check had already been fooled once, by a feature committed locally and never pushed, so the tree read clean while the catalog it fed was ahead of every deployed platform. A detached worktree checked out at origin/main has no upstream and is therefore exempt, which is the shape the check itself recommends; `--dirty` still overrides it.
13
+
14
+ ### Fixed
15
+ - The generated request-shape catalog now covers three write operations its handler parser was missing or mis-attributing: `roles/{roleId}` (a case arm listing several HTTP methods together), `products/{productId}/categories` (a dispatcher that routes by a literal path segment rather than by method), and `sites/{siteId}/org` (a doc comment block shared by two adjacent handlers declared in the opposite order, now attributed by the name it opens with). 162 of 276 write operations now carry a shape, up from 157, so sb_api_call and sb_undo can act on all three without guessing a body.
16
+
17
+ ## [0.11.3] - 2026-09-09
18
+
19
+ ### Fixed
20
+ - sb_set now says its hover-routing note once per element type per process instead of once per node, since repairing every button on a page in one batch returned ten copies of the same 300-character paragraph; a different element type still gets its own note, because it says something different.
21
+
9
22
  ## [0.11.2] - 2026-09-09
10
23
 
11
24
  ### Fixed
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.12.0] - 2026-09-09
10
+
11
+ ### Added
12
+ - npm run codegen:check giờ cũng từ chối một checkout mà HEAD của nó mang các commit chạm vào những thư mục mà nó đọc (schema/src, editor/src, server/render, server/docs) mà nhánh upstream không có, nêu tên các commit đó; việc chỉ kiểm tra thay đổi chưa commit từng bị qua mặt một lần, bởi một tính năng đã được commit ở local nhưng chưa từng push, khiến working tree trông sạch trong khi catalog mà nó tạo ra lại đi trước mọi nền tảng đã triển khai. Một worktree tách rời checkout tại origin/main không có upstream nên được miễn kiểm tra này, đúng như cách mà chính kiểm tra này khuyến nghị; `--dirty` vẫn cho phép ghi đè.
13
+
14
+ ### Fixed
15
+ - Catalog request-shape được sinh ra giờ bao phủ thêm ba write operation mà trình phân tích handler trước đây bỏ sót hoặc gán sai: `roles/{roleId}` (một case arm liệt kê nhiều phương thức HTTP cùng lúc), `products/{productId}/categories` (một dispatcher định tuyến theo một đoạn path cố định thay vì theo method), và `sites/{siteId}/org` (một khối doc comment dùng chung cho hai handler liền kề được khai báo theo thứ tự ngược lại, giờ được gán theo đúng tên mà nó mở đầu). 162 trong số 276 write operation giờ đã có shape, tăng từ 157, nhờ đó sb_api_call và sb_undo có thể thao tác trên cả ba mà không cần đoán body.
16
+
17
+ ## [0.11.3] - 2026-09-09
18
+
19
+ ### Fixed
20
+ - sb_set giờ chỉ nói ghi chú định tuyến hover một lần cho mỗi loại element trong mỗi tiến trình thay vì một lần cho mỗi node, vì việc sửa mọi nút button trên một trang trong cùng một batch trước đây trả về mười bản sao của cùng một đoạn văn 300 ký tự; một loại element khác vẫn nhận được ghi chú riêng của nó, vì nó nói một điều khác.
21
+
9
22
  ## [0.11.2] - 2026-09-09
10
23
 
11
24
  ### Fixed
@@ -1,7 +1,7 @@
1
1
  export const SHAPE_SOURCE = {
2
2
  "writeOperations": 212,
3
- "shaped": 157,
4
- "fromHandlers": 157,
3
+ "shaped": 162,
4
+ "fromHandlers": 162,
5
5
  "fromSwaggerOnly": 0,
6
6
  "withReadOnly": 26,
7
7
  "structsRead": 1597
@@ -171,6 +171,110 @@ export const REQUEST_SHAPES = {
171
171
  "source": "go",
172
172
  "goType": "versionInput"
173
173
  },
174
+ "post:/api/orgs/{orgId}/apps/{appId}/versions/{versionId}/withdraw": {
175
+ "fields": [
176
+ {
177
+ "name": "version",
178
+ "type": "string"
179
+ },
180
+ {
181
+ "name": "scopes",
182
+ "type": "string[]"
183
+ },
184
+ {
185
+ "name": "embedUrl",
186
+ "type": "string"
187
+ },
188
+ {
189
+ "name": "redirectUri",
190
+ "type": "string"
191
+ },
192
+ {
193
+ "name": "summary",
194
+ "type": "string"
195
+ },
196
+ {
197
+ "name": "description",
198
+ "type": "string"
199
+ },
200
+ {
201
+ "name": "category",
202
+ "type": "string",
203
+ "note": "Category is the marketplace shelf, from apps."
204
+ },
205
+ {
206
+ "name": "pricingModel",
207
+ "type": "string",
208
+ "note": "PricingModel, PriceCents, PriceCurrency and BillingInterval are what this version costs a merchant. THIS ROUTE IS A FULL REPLACEMENT, and that includes the price: a client that omits `pricingModel` is saying free, exactly as one that…"
209
+ },
210
+ {
211
+ "name": "priceCents",
212
+ "type": "number"
213
+ },
214
+ {
215
+ "name": "priceCurrency",
216
+ "type": "string"
217
+ },
218
+ {
219
+ "name": "billingInterval",
220
+ "type": "string"
221
+ }
222
+ ],
223
+ "source": "go",
224
+ "goType": "versionInput"
225
+ },
226
+ "post:/api/orgs/{orgId}/apps/{appId}/versions/{versionId}/images": {
227
+ "fields": [
228
+ {
229
+ "name": "version",
230
+ "type": "string"
231
+ },
232
+ {
233
+ "name": "scopes",
234
+ "type": "string[]"
235
+ },
236
+ {
237
+ "name": "embedUrl",
238
+ "type": "string"
239
+ },
240
+ {
241
+ "name": "redirectUri",
242
+ "type": "string"
243
+ },
244
+ {
245
+ "name": "summary",
246
+ "type": "string"
247
+ },
248
+ {
249
+ "name": "description",
250
+ "type": "string"
251
+ },
252
+ {
253
+ "name": "category",
254
+ "type": "string",
255
+ "note": "Category is the marketplace shelf, from apps."
256
+ },
257
+ {
258
+ "name": "pricingModel",
259
+ "type": "string",
260
+ "note": "PricingModel, PriceCents, PriceCurrency and BillingInterval are what this version costs a merchant. THIS ROUTE IS A FULL REPLACEMENT, and that includes the price: a client that omits `pricingModel` is saying free, exactly as one that…"
261
+ },
262
+ {
263
+ "name": "priceCents",
264
+ "type": "number"
265
+ },
266
+ {
267
+ "name": "priceCurrency",
268
+ "type": "string"
269
+ },
270
+ {
271
+ "name": "billingInterval",
272
+ "type": "string"
273
+ }
274
+ ],
275
+ "source": "go",
276
+ "goType": "versionInput"
277
+ },
174
278
  "post:/api/sites/{siteId}/quizzes": {
175
279
  "fields": [
176
280
  {
@@ -1790,7 +1894,7 @@ export const REQUEST_SHAPES = {
1790
1894
  "source": "go",
1791
1895
  "goType": "courses.Course"
1792
1896
  },
1793
- "put:/api/sites/{siteId}/courses/{courseId}/sections/{sectionId}": {
1897
+ "post:/api/sites/{siteId}/courses/{courseId}/sections": {
1794
1898
  "fields": [
1795
1899
  {
1796
1900
  "name": "id",
@@ -1833,7 +1937,7 @@ export const REQUEST_SHAPES = {
1833
1937
  "source": "go",
1834
1938
  "goType": "courses.Section"
1835
1939
  },
1836
- "post:/api/sites/{siteId}/courses/{courseId}/sections": {
1940
+ "put:/api/sites/{siteId}/courses/{courseId}/sections/{sectionId}": {
1837
1941
  "fields": [
1838
1942
  {
1839
1943
  "name": "id",
@@ -1876,7 +1980,7 @@ export const REQUEST_SHAPES = {
1876
1980
  "source": "go",
1877
1981
  "goType": "courses.Section"
1878
1982
  },
1879
- "put:/api/sites/{siteId}/courses/{courseId}/lessons/{lessonId}": {
1983
+ "post:/api/sites/{siteId}/courses/{courseId}/lessons": {
1880
1984
  "fields": [
1881
1985
  {
1882
1986
  "name": "id",
@@ -1972,7 +2076,7 @@ export const REQUEST_SHAPES = {
1972
2076
  "source": "go",
1973
2077
  "goType": "courses.Lesson"
1974
2078
  },
1975
- "post:/api/sites/{siteId}/courses/{courseId}/lessons": {
2079
+ "put:/api/sites/{siteId}/courses/{courseId}/lessons/{lessonId}": {
1976
2080
  "fields": [
1977
2081
  {
1978
2082
  "name": "id",
@@ -4762,10 +4866,10 @@ export const REQUEST_SHAPES = {
4762
4866
  "updatedAt"
4763
4867
  ]
4764
4868
  },
4765
- "put:/api/sites/{siteId}/product-categories/{id}/products": {
4869
+ "put:/api/sites/{siteId}/products/{productId}/categories": {
4766
4870
  "fields": [
4767
4871
  {
4768
- "name": "productIds",
4872
+ "name": "categoryIds",
4769
4873
  "type": "string[]"
4770
4874
  }
4771
4875
  ],
@@ -4782,6 +4886,16 @@ export const REQUEST_SHAPES = {
4782
4886
  "source": "go",
4783
4887
  "goType": "(inline)"
4784
4888
  },
4889
+ "put:/api/sites/{siteId}/product-categories/{id}/products": {
4890
+ "fields": [
4891
+ {
4892
+ "name": "productIds",
4893
+ "type": "string[]"
4894
+ }
4895
+ ],
4896
+ "source": "go",
4897
+ "goType": "(inline)"
4898
+ },
4785
4899
  "post:/api/sites/{siteId}/product-categories": {
4786
4900
  "fields": [
4787
4901
  {
@@ -6337,6 +6451,30 @@ export const REQUEST_SHAPES = {
6337
6451
  "source": "go",
6338
6452
  "goType": "(inline)"
6339
6453
  },
6454
+ "put:/api/sites/{siteId}/roles/{roleId}": {
6455
+ "fields": [
6456
+ {
6457
+ "name": "name",
6458
+ "type": "string"
6459
+ },
6460
+ {
6461
+ "name": "permissions",
6462
+ "type": "site.Permission[]"
6463
+ }
6464
+ ],
6465
+ "source": "go",
6466
+ "goType": "(inline)"
6467
+ },
6468
+ "put:/api/sites/{siteId}/org": {
6469
+ "fields": [
6470
+ {
6471
+ "name": "orgId",
6472
+ "type": "string"
6473
+ }
6474
+ ],
6475
+ "source": "go",
6476
+ "goType": "(inline)"
6477
+ },
6340
6478
  "put:/api/sites/{id}/owner": {
6341
6479
  "fields": [
6342
6480
  {
@@ -305,17 +305,26 @@ export function registerPageTools(server, ctx) {
305
305
  }
306
306
  const { patches, touched } = setMany(d, batch);
307
307
  // WHERE A HOVER ACTUALLY WENT. Routing it silently would leave a caller
308
- // who reads the node back looking for keys in a slot they never wrote to
309
- // and, for the elements with no compiler on either home, believing they
310
- // had styled something.
311
- const hoverNotes = {};
308
+ // who reads the node back looking for keys in a slot they never wrote to.
309
+ //
310
+ // ONCE PER PROCESS PER ELEMENT TYPE, not once per node. A batch repairing
311
+ // every button on a page carried ten copies of the same 300-character
312
+ // paragraph — measured, on this repo's own storefront — which is the shape
313
+ // `ctx.notices` exists to prevent. The type is the whole content of the
314
+ // note, so a second copy tells the caller nothing they were not just told,
315
+ // and the ids it applies to are already in `set`.
316
+ const hoverTypes = new Set();
312
317
  for (const e of batch) {
313
318
  if (e.state !== HOVER_STATE || e.namespace !== 'style')
314
319
  continue;
315
- const note = hoverRoutingNote(d.doc.nodes[e.id]?.data.type ?? '');
316
- if (note)
317
- hoverNotes[e.id] = note;
320
+ const type = d.doc.nodes[e.id]?.data.type ?? '';
321
+ if (hoverRoutingNote(type))
322
+ hoverTypes.add(type);
318
323
  }
324
+ const hoverNote = [...hoverTypes]
325
+ .map((t) => ctx.notices.once(`hover-home:${t}`, hoverRoutingNote(t)))
326
+ .filter((n) => !!n)
327
+ .join(' ');
319
328
  // THE STICKY WARNING IS COMPUTED AGAINST THE DOCUMENT AS IT WILL BE, so
320
329
  // the dry run and the real run say the same thing. A caller who is told
321
330
  // only after committing has already shipped a header that does not move.
@@ -346,7 +355,7 @@ export function registerPageTools(server, ctx) {
346
355
  dry_run: true,
347
356
  patches,
348
357
  ...(Object.keys(sw).length ? { warnings: sw } : {}),
349
- ...(Object.keys(hoverNotes).length ? { hover: hoverNotes } : {}),
358
+ ...(hoverNote ? { hover: hoverNote } : {}),
350
359
  ...(note ? { note } : {}),
351
360
  });
352
361
  }
@@ -360,19 +369,18 @@ export function registerPageTools(server, ctx) {
360
369
  }
361
370
  if (!edits) {
362
371
  const warn = warnings[batch[0].id];
363
- const hv = hoverNotes[batch[0].id];
364
372
  return text({
365
373
  set: touched[0].keys,
366
374
  rev: d.rev,
367
375
  ...(warn ? { warning: warn } : {}),
368
- ...(hv ? { hover: hv } : {}),
376
+ ...(hoverNote ? { hover: hoverNote } : {}),
369
377
  });
370
378
  }
371
379
  return text({
372
380
  set: touched,
373
381
  rev: d.rev,
374
382
  ...(Object.keys(warnings).length ? { warnings } : {}),
375
- ...(Object.keys(hoverNotes).length ? { hover: hoverNotes } : {}),
383
+ ...(hoverNote ? { hover: hoverNote } : {}),
376
384
  });
377
385
  });
378
386
  server.registerTool('sb_move', {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "sbuilder-mcp",
3
- "version": "0.11.2",
3
+ "version": "0.12.0",
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",