sbuilder-mcp 0.59.2 → 0.60.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 +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 +60 -4
- package/dist/catalog/deadkeys.generated.js +2 -2
- package/dist/catalog/shapes.generated.js +31 -4
- package/dist/catalog/storepages.generated.js +83 -0
- package/dist/domains/site/storepage.js +1 -1
- package/dist/tools/page.js +21 -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.0] - 2026-09-16
|
|
10
|
+
|
|
11
|
+
### Added
|
|
12
|
+
- `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.
|
|
13
|
+
|
|
14
|
+
### Changed
|
|
15
|
+
- `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.
|
|
16
|
+
|
|
17
|
+
## [0.59.3] - 2026-09-15
|
|
18
|
+
|
|
19
|
+
### Changed
|
|
20
|
+
- 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.
|
|
21
|
+
|
|
9
22
|
## [0.59.2] - 2026-09-15
|
|
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.60.0] - 2026-09-16
|
|
10
|
+
|
|
11
|
+
### Added
|
|
12
|
+
- `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.
|
|
13
|
+
|
|
14
|
+
### Changed
|
|
15
|
+
- 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ả.
|
|
16
|
+
|
|
17
|
+
## [0.59.3] - 2026-09-15
|
|
18
|
+
|
|
19
|
+
### Changed
|
|
20
|
+
- 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ó.
|
|
21
|
+
|
|
9
22
|
## [0.59.2] - 2026-09-15
|
|
10
23
|
|
|
11
24
|
### Fixed
|
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 = [
|
|
@@ -3349,7 +3349,63 @@ export const API_OPERATIONS = [
|
|
|
3349
3349
|
"in": "body",
|
|
3350
3350
|
"required": true,
|
|
3351
3351
|
"type": "object",
|
|
3352
|
-
"description": "question (required)
|
|
3352
|
+
"description": "question (required), history (prior turns: role user|assistant, text) and context (the selected element the agent may propose edits to)"
|
|
3353
|
+
}
|
|
3354
|
+
],
|
|
3355
|
+
"bodyDescribed": false,
|
|
3356
|
+
"bodyRef": null,
|
|
3357
|
+
"credential": "siteScoped"
|
|
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 \\"
|
|
3353
3409
|
}
|
|
3354
3410
|
],
|
|
3355
3411
|
"bodyDescribed": false,
|
|
@@ -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": {
|
|
@@ -3008,11 +3008,38 @@ 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",
|
|
3014
3019
|
"goType": "(inline)"
|
|
3015
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
|
+
},
|
|
3016
3043
|
"post:/api/sites/{siteId}/fonts": {
|
|
3017
3044
|
"fields": [
|
|
3018
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,21 @@ 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
|
+
])),
|
|
1180
1196
|
...(missing.length
|
|
1181
1197
|
? {
|
|
1182
1198
|
usually_also: Object.fromEntries(missing.map((m) => [m.key, m.why])),
|
|
@@ -1195,7 +1211,10 @@ export function registerPageTools(server, ctx) {
|
|
|
1195
1211
|
inputSchema: {
|
|
1196
1212
|
site_id: z.string().optional(),
|
|
1197
1213
|
name: z.string(),
|
|
1198
|
-
type: z
|
|
1214
|
+
type: z
|
|
1215
|
+
.string()
|
|
1216
|
+
.optional()
|
|
1217
|
+
.describe('page (default); sb_page_list lists every type and where each is served'),
|
|
1199
1218
|
slug: z.string().optional(),
|
|
1200
1219
|
is_homepage: z.boolean().optional(),
|
|
1201
1220
|
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.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",
|