sbuilder-mcp 0.59.3 → 0.60.1
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 +13 -0
- package/CHANGELOG.vi.md +13 -0
- package/README.md +1 -1
- package/README.vi.md +1 -1
- package/dist/catalog/api.generated.js +59 -3
- package/dist/catalog/deadkeys.generated.js +2 -2
- package/dist/catalog/shapes.generated.js +26 -4
- package/dist/catalog/storepages.generated.js +83 -0
- package/dist/domains/site/storepage.js +1 -1
- package/dist/tools/page.js +32 -2
- package/package.json +1 -1
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.60.1] - 2026-09-16
|
|
10
|
+
|
|
11
|
+
### Fixed
|
|
12
|
+
- `sb_page_list`'s `page_types` table now carries a `page_types_note` stating that the twelve types are the storefront's fixed routed addresses, not a checklist of the pages a site needs, since login, register, contact, about, policy pages and anything else a shop must say are ordinary `page` rows with no limit on how many.
|
|
13
|
+
|
|
14
|
+
## [0.60.0] - 2026-09-16
|
|
15
|
+
|
|
16
|
+
### Added
|
|
17
|
+
- `sb_page_list` now returns a `page_types` table naming every one of the platform's twelve page types and the address or role each is served at, generated from the platform's own page-type metadata, since `sb_page_create` previously only described six of them (page, checkout, product, category, post, course) in its argument text, leaving search, account, blog, complete, error, and maintain pages undiscoverable to an agent that only read the tool.
|
|
18
|
+
|
|
19
|
+
### Changed
|
|
20
|
+
- `sb_page_create`'s `type` argument now points to `sb_page_list` for the full set of page types instead of naming a partial list inline.
|
|
21
|
+
|
|
9
22
|
## [0.59.3] - 2026-09-15
|
|
10
23
|
|
|
11
24
|
### Changed
|
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.60.1] - 2026-09-16
|
|
10
|
+
|
|
11
|
+
### Fixed
|
|
12
|
+
- Bảng `page_types` của `sb_page_list` giờ kèm `page_types_note` nói rõ mười hai loại trang là các địa chỉ cố định mà storefront định tuyến tới, không phải danh sách các trang một site cần có, vì login, register, contact, about, các trang chính sách và bất cứ điều gì shop cần nói đều là các dòng `page` thông thường, không giới hạn số lượng.
|
|
13
|
+
|
|
14
|
+
## [0.60.0] - 2026-09-16
|
|
15
|
+
|
|
16
|
+
### Added
|
|
17
|
+
- `sb_page_list` giờ trả về bảng `page_types` nêu tên cả mười hai loại trang của nền tảng cùng địa chỉ hoặc vai trò mà mỗi loại được phục vụ, sinh ra từ chính metadata loại trang của nền tảng, vì trước đó `sb_page_create` chỉ mô tả sáu trong số đó (page, checkout, product, category, post, course) trong phần mô tả tham số, khiến các trang search, account, blog, complete, error và maintain không thể được khám phá bởi một agent chỉ đọc mô tả của tool.
|
|
18
|
+
|
|
19
|
+
### Changed
|
|
20
|
+
- Tham số `type` của `sb_page_create` giờ trỏ tới `sb_page_list` để xem đầy đủ các loại trang thay vì liệt kê một danh sách không đầy đủ ngay trong mô tả.
|
|
21
|
+
|
|
9
22
|
## [0.59.3] - 2026-09-15
|
|
10
23
|
|
|
11
24
|
### Changed
|
package/README.md
CHANGED
|
@@ -112,7 +112,7 @@ in this client: one would put the very key the platform exists to hold back into
|
|
|
112
112
|
| `sb_store` | Run a store flow that must happen in a fixed order — the four writes that make a working checkout, or any of the platform's 17 form templates (login, register, forgot, contact, subscribe …) with its own field document |
|
|
113
113
|
| `sb_undo` | Put back what a PUT replaced. The SECOND answer for a page, not the only one: the platform has versions, history and restore (`sb_api_find` "page versions"), which outlive this process — reach for those first and use this for every other shaped PUT |
|
|
114
114
|
|
|
115
|
-
Twenty-eight tools, **
|
|
115
|
+
Twenty-eight tools, **527 API operations** (177 of the 236 writes carrying a body shape read
|
|
116
116
|
off the handler), 113 elements, 79 binding sources. `sb_api_find`
|
|
117
117
|
is an index rather than a tool per endpoint, so the tool list stays short while everything
|
|
118
118
|
the platform can do stays reachable — and operations added to the platform arrive with the
|
package/README.vi.md
CHANGED
|
@@ -109,7 +109,7 @@ nhét ngược lại vào mọi bản cài.
|
|
|
109
109
|
| `sb_store` | Chạy một luồng cửa hàng bắt buộc đúng thứ tự — bốn lệnh ghi tạo nên trang thanh toán, hoặc gieo bất kỳ template nào trong 17 form của nền tảng (login, register, forgot, contact, subscribe …) kèm field document của nó |
|
|
110
110
|
| `sb_undo` | Trả lại thứ mà một lệnh PUT đã ghi đè. Với TRANG thì đây là đường về thứ hai chứ không phải duy nhất: nền tảng có version, history và restore (`sb_api_find` "page versions"), và chúng sống lâu hơn tiến trình này — hãy dùng chúng trước, còn tool này cho mọi PUT có hình dạng khác |
|
|
111
111
|
|
|
112
|
-
Hai mươi tám tool, **
|
|
112
|
+
Hai mươi tám tool, **527 operation API** (177 trong 236 lệnh ghi có hình dạng body đọc thẳng
|
|
113
113
|
từ handler), 113 element, 79 nguồn binding. `sb_api_find` là
|
|
114
114
|
một chỉ mục chứ không phải mỗi endpoint một tool, nên danh sách tool vẫn ngắn trong khi mọi
|
|
115
115
|
thứ nền tảng làm được vẫn với tới — và operation mới thêm bên nền tảng sẽ tự có sau lần
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
export const SWAGGER_SOURCE = {
|
|
2
|
-
"operations":
|
|
2
|
+
"operations": 527,
|
|
3
3
|
"definitions": 107,
|
|
4
|
-
"bodyCarrying":
|
|
5
|
-
"bodyUndescribed":
|
|
4
|
+
"bodyCarrying": 195,
|
|
5
|
+
"bodyUndescribed": 76,
|
|
6
6
|
"generatedFrom": "server/docs/swagger.json"
|
|
7
7
|
};
|
|
8
8
|
export const API_OPERATIONS = [
|
|
@@ -3356,6 +3356,62 @@ export const API_OPERATIONS = [
|
|
|
3356
3356
|
"bodyRef": null,
|
|
3357
3357
|
"credential": "siteScoped"
|
|
3358
3358
|
},
|
|
3359
|
+
{
|
|
3360
|
+
"id": "get:/api/sites/{siteId}/ai/settings",
|
|
3361
|
+
"method": "GET",
|
|
3362
|
+
"path": "/api/sites/{siteId}/ai/settings",
|
|
3363
|
+
"tags": [
|
|
3364
|
+
"sites"
|
|
3365
|
+
],
|
|
3366
|
+
"summary": "Read or replace this site's own AI credentials",
|
|
3367
|
+
"params": [
|
|
3368
|
+
{
|
|
3369
|
+
"name": "siteId",
|
|
3370
|
+
"in": "path",
|
|
3371
|
+
"required": true,
|
|
3372
|
+
"type": "string",
|
|
3373
|
+
"description": "Site ID"
|
|
3374
|
+
},
|
|
3375
|
+
{
|
|
3376
|
+
"name": "settings",
|
|
3377
|
+
"in": "body",
|
|
3378
|
+
"required": false,
|
|
3379
|
+
"type": "object",
|
|
3380
|
+
"description": "provider, model, baseUrl and apiKey (PUT only; omit apiKey to keep the stored one, send \\"
|
|
3381
|
+
}
|
|
3382
|
+
],
|
|
3383
|
+
"bodyDescribed": false,
|
|
3384
|
+
"bodyRef": null,
|
|
3385
|
+
"credential": "siteScoped"
|
|
3386
|
+
},
|
|
3387
|
+
{
|
|
3388
|
+
"id": "put:/api/sites/{siteId}/ai/settings",
|
|
3389
|
+
"method": "PUT",
|
|
3390
|
+
"path": "/api/sites/{siteId}/ai/settings",
|
|
3391
|
+
"tags": [
|
|
3392
|
+
"sites"
|
|
3393
|
+
],
|
|
3394
|
+
"summary": "Read or replace this site's own AI credentials",
|
|
3395
|
+
"params": [
|
|
3396
|
+
{
|
|
3397
|
+
"name": "siteId",
|
|
3398
|
+
"in": "path",
|
|
3399
|
+
"required": true,
|
|
3400
|
+
"type": "string",
|
|
3401
|
+
"description": "Site ID"
|
|
3402
|
+
},
|
|
3403
|
+
{
|
|
3404
|
+
"name": "settings",
|
|
3405
|
+
"in": "body",
|
|
3406
|
+
"required": false,
|
|
3407
|
+
"type": "object",
|
|
3408
|
+
"description": "provider, model, baseUrl and apiKey (PUT only; omit apiKey to keep the stored one, send \\"
|
|
3409
|
+
}
|
|
3410
|
+
],
|
|
3411
|
+
"bodyDescribed": false,
|
|
3412
|
+
"bodyRef": null,
|
|
3413
|
+
"credential": "siteScoped"
|
|
3414
|
+
},
|
|
3359
3415
|
{
|
|
3360
3416
|
"id": "get:/api/sites/{siteId}/api-keys",
|
|
3361
3417
|
"method": "GET",
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
export const SHAPE_SOURCE = {
|
|
2
|
-
"writeOperations":
|
|
3
|
-
"shaped":
|
|
4
|
-
"fromHandlers":
|
|
2
|
+
"writeOperations": 236,
|
|
3
|
+
"shaped": 177,
|
|
4
|
+
"fromHandlers": 177,
|
|
5
5
|
"fromSwaggerOnly": 0,
|
|
6
6
|
"withReadOnly": 26,
|
|
7
|
-
"structsRead":
|
|
7
|
+
"structsRead": 1701
|
|
8
8
|
};
|
|
9
9
|
export const REQUEST_SHAPES = {
|
|
10
10
|
"post:/api/sites/{siteId}/api-keys": {
|
|
@@ -3018,6 +3018,28 @@ export const REQUEST_SHAPES = {
|
|
|
3018
3018
|
"source": "go",
|
|
3019
3019
|
"goType": "(inline)"
|
|
3020
3020
|
},
|
|
3021
|
+
"put:/api/sites/{siteId}/ai/settings": {
|
|
3022
|
+
"fields": [
|
|
3023
|
+
{
|
|
3024
|
+
"name": "provider",
|
|
3025
|
+
"type": "string"
|
|
3026
|
+
},
|
|
3027
|
+
{
|
|
3028
|
+
"name": "model",
|
|
3029
|
+
"type": "string"
|
|
3030
|
+
},
|
|
3031
|
+
{
|
|
3032
|
+
"name": "apiKey",
|
|
3033
|
+
"type": "string | null"
|
|
3034
|
+
},
|
|
3035
|
+
{
|
|
3036
|
+
"name": "baseUrl",
|
|
3037
|
+
"type": "string"
|
|
3038
|
+
}
|
|
3039
|
+
],
|
|
3040
|
+
"source": "go",
|
|
3041
|
+
"goType": "editoragent.SettingsInput"
|
|
3042
|
+
},
|
|
3021
3043
|
"post:/api/sites/{siteId}/fonts": {
|
|
3022
3044
|
"fields": [
|
|
3023
3045
|
{
|
|
@@ -1133,6 +1133,89 @@ export const PAGE_LAYOUT_SEEDS = {
|
|
|
1133
1133
|
}
|
|
1134
1134
|
}
|
|
1135
1135
|
};
|
|
1136
|
+
/**
|
|
1137
|
+
* EVERY page type the platform has, and what each one is FOR.
|
|
1138
|
+
*
|
|
1139
|
+
* A storefront is not one page: most of these are TEMPLATES, and a missing one
|
|
1140
|
+
* means a whole family of addresses serves nothing. `routePattern` is where the
|
|
1141
|
+
* type is served (absent = the author names the address), `ownSlug` says whether
|
|
1142
|
+
* the author names it, `servedRole` marks the two that are served by ROLE rather
|
|
1143
|
+
* than by address, and `app` names the builtin app a type needs installed.
|
|
1144
|
+
*/
|
|
1145
|
+
export const PAGE_TYPES = [
|
|
1146
|
+
{
|
|
1147
|
+
"type": "page",
|
|
1148
|
+
"group": "main",
|
|
1149
|
+
"ownSlug": true
|
|
1150
|
+
},
|
|
1151
|
+
{
|
|
1152
|
+
"type": "product",
|
|
1153
|
+
"group": "store",
|
|
1154
|
+
"ownSlug": false,
|
|
1155
|
+
"routePattern": "/products/{slug}"
|
|
1156
|
+
},
|
|
1157
|
+
{
|
|
1158
|
+
"type": "category",
|
|
1159
|
+
"group": "store",
|
|
1160
|
+
"ownSlug": false,
|
|
1161
|
+
"routePattern": "/collections/{slug}"
|
|
1162
|
+
},
|
|
1163
|
+
{
|
|
1164
|
+
"type": "course",
|
|
1165
|
+
"group": "store",
|
|
1166
|
+
"ownSlug": false,
|
|
1167
|
+
"routePattern": "/courses/{slug}",
|
|
1168
|
+
"app": "courses"
|
|
1169
|
+
},
|
|
1170
|
+
{
|
|
1171
|
+
"type": "search",
|
|
1172
|
+
"group": "main",
|
|
1173
|
+
"ownSlug": false,
|
|
1174
|
+
"routePattern": "/search"
|
|
1175
|
+
},
|
|
1176
|
+
{
|
|
1177
|
+
"type": "checkout",
|
|
1178
|
+
"group": "store",
|
|
1179
|
+
"ownSlug": false,
|
|
1180
|
+
"routePattern": "/checkout"
|
|
1181
|
+
},
|
|
1182
|
+
{
|
|
1183
|
+
"type": "complete",
|
|
1184
|
+
"group": "store",
|
|
1185
|
+
"ownSlug": false,
|
|
1186
|
+
"routePattern": "/checkout/complete"
|
|
1187
|
+
},
|
|
1188
|
+
{
|
|
1189
|
+
"type": "account",
|
|
1190
|
+
"group": "main",
|
|
1191
|
+
"ownSlug": false,
|
|
1192
|
+
"routePattern": "/account"
|
|
1193
|
+
},
|
|
1194
|
+
{
|
|
1195
|
+
"type": "blog",
|
|
1196
|
+
"group": "blog",
|
|
1197
|
+
"ownSlug": false,
|
|
1198
|
+
"routePattern": "/blog-categories/{slug}"
|
|
1199
|
+
},
|
|
1200
|
+
{
|
|
1201
|
+
"type": "post",
|
|
1202
|
+
"group": "blog",
|
|
1203
|
+
"ownSlug": false,
|
|
1204
|
+
"routePattern": "/blog/{slug}"
|
|
1205
|
+
},
|
|
1206
|
+
{
|
|
1207
|
+
"type": "error",
|
|
1208
|
+
"group": "error",
|
|
1209
|
+
"ownSlug": false,
|
|
1210
|
+
"servedRole": "notFound"
|
|
1211
|
+
},
|
|
1212
|
+
{
|
|
1213
|
+
"type": "maintain",
|
|
1214
|
+
"group": "maintain",
|
|
1215
|
+
"ownSlug": false,
|
|
1216
|
+
"servedRole": "maintenance"
|
|
1217
|
+
}
|
|
1218
|
+
];
|
|
1136
1219
|
/**
|
|
1137
1220
|
* The document an ordinary page opens with for a chosen LAYOUT.
|
|
1138
1221
|
*
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { COMPLETION_HEADLINE, COMPLETION_HEADLINE_SENTINEL, PAGE_LAYOUT_SEEDS, STORE_PAGE_SEEDS
|
|
1
|
+
import { COMPLETION_HEADLINE, COMPLETION_HEADLINE_SENTINEL, PAGE_LAYOUT_SEEDS, STORE_PAGE_SEEDS } from '../../catalog/storepages.generated.js';
|
|
2
2
|
/**
|
|
3
3
|
* WHAT A NEW STORE PAGE OPENS WITH — for an agent, as for a merchant.
|
|
4
4
|
*
|
package/dist/tools/page.js
CHANGED
|
@@ -7,7 +7,8 @@ import { addSubtree, setMany, baseOnlyKeys, moveNode, removeNode, duplicateNode,
|
|
|
7
7
|
import { baseOnlyNote } from '../domains/site/baseonly.js';
|
|
8
8
|
import { detachNote, presetIdOf, presetLayer } from '../domains/site/theme.js';
|
|
9
9
|
import { inertHintsFor } from '../domains/site/inert.js';
|
|
10
|
-
import { hasSeed, layoutDocument, seedDocument, seedSummary, seededTypes } from '../domains/site/storepage.js';
|
|
10
|
+
import { hasSeed, layoutDocument, seedDocument, seedSummary, seededTypes, } from '../domains/site/storepage.js';
|
|
11
|
+
import { PAGE_TYPES } from '../catalog/storepages.generated.js';
|
|
11
12
|
import { animationNote, deadKeyNote, unknownValueNote, unknownWriteNote, } from '../domains/site/vocabulary.js';
|
|
12
13
|
import { skinLevelNote } from '../domains/site/fieldskin.js';
|
|
13
14
|
import { siteTheme } from '../domains/site/theme-fetch.js';
|
|
@@ -1177,6 +1178,32 @@ export function registerPageTools(server, ctx) {
|
|
|
1177
1178
|
const missing = missingUsualPages(raw.pages ?? null);
|
|
1178
1179
|
return text({
|
|
1179
1180
|
...projectList(raw, 'pages', PAGE_FIELDS),
|
|
1181
|
+
// EVERY TYPE THE PLATFORM HAS, and the address each one answers at.
|
|
1182
|
+
//
|
|
1183
|
+
// Here rather than in `sb_page_create`'s argument description, because
|
|
1184
|
+
// that string rides in `tools/list` and the token budget caps it — the
|
|
1185
|
+
// table put the payload over twice while being trimmed. It is also the
|
|
1186
|
+
// better home: an agent reads this while ORIENTING, before it has
|
|
1187
|
+
// decided what to build, and a type it has never heard of is exactly
|
|
1188
|
+
// what it cannot ask for. `sb_page_create` used to name six of twelve
|
|
1189
|
+
// from a hand-typed string, so search, account, blog, complete, error
|
|
1190
|
+
// and maintain were unreachable to anyone who only read the tool.
|
|
1191
|
+
page_types: Object.fromEntries(PAGE_TYPES.map((t) => [
|
|
1192
|
+
t.type,
|
|
1193
|
+
t.routePattern ??
|
|
1194
|
+
(t.servedRole ? `served as the site's ${t.servedRole}` : 'an address you choose'),
|
|
1195
|
+
])),
|
|
1196
|
+
// NOT A LIST OF THE PAGES A SITE NEEDS, and this line is here because
|
|
1197
|
+
// the table above reads like one. A type is a fixed ADDRESS the
|
|
1198
|
+
// storefront routes by; most of a real website has no type at all —
|
|
1199
|
+
// login, register, contact, about, the policies, and whatever else this
|
|
1200
|
+
// particular shop sells or must say — and every one of those is an
|
|
1201
|
+
// ordinary `page`. Twelve is the number of routed types, never the
|
|
1202
|
+
// number of pages.
|
|
1203
|
+
page_types_note: 'Types are the storefront\'s fixed addresses, not an inventory of a site. Everything ' +
|
|
1204
|
+
'else — login, register, contact, about, policies, and anything this shop needs — is ' +
|
|
1205
|
+
'type "page" with an address you choose, and there is no limit to how many. ' +
|
|
1206
|
+
'usually_also below lists the ones most sites have; it is a floor, not a ceiling.',
|
|
1180
1207
|
...(missing.length
|
|
1181
1208
|
? {
|
|
1182
1209
|
usually_also: Object.fromEntries(missing.map((m) => [m.key, m.why])),
|
|
@@ -1195,7 +1222,10 @@ export function registerPageTools(server, ctx) {
|
|
|
1195
1222
|
inputSchema: {
|
|
1196
1223
|
site_id: z.string().optional(),
|
|
1197
1224
|
name: z.string(),
|
|
1198
|
-
type: z
|
|
1225
|
+
type: z
|
|
1226
|
+
.string()
|
|
1227
|
+
.optional()
|
|
1228
|
+
.describe('page (default); sb_page_list lists every type and where each is served'),
|
|
1199
1229
|
slug: z.string().optional(),
|
|
1200
1230
|
is_homepage: z.boolean().optional(),
|
|
1201
1231
|
settings: z.record(z.unknown()).optional(),
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "sbuilder-mcp",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.60.1",
|
|
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",
|