sbuilder-mcp 0.35.0 → 0.36.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,15 @@ 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.36.0] - 2026-09-11
10
+
11
+ ### Added
12
+ - The `/apps` call sheet now explains marketplace app installation as two separate questions: suggesting one is always possible on any credential (`GET /api/sites/{siteId}/apps` plus `GET /oauth/authorize-info` for the app's publisher, privacy policy, scopes, and price), while installing one requires a session (`POST /oauth/authorize`) because an agent key is not an access token and the platform refuses it by design. It also documents that a paid app is refused without an explicit `acceptedPrice`, so this server can never commit a merchant to a subscription on its own.
13
+ - The catalog now carries the two `/oauth` operations behind that flow, `GET /oauth/authorize-info` and `POST /oauth/authorize`, including the request shape for the latter.
14
+
15
+ ### Changed
16
+ - The `builtin-apps` call sheet no longer tells the caller that a marketplace app "cannot be installed from here at all"; that line was stricter than the platform actually enforces.
17
+
9
18
  ## [0.35.0] - 2026-09-11
10
19
 
11
20
  ### Added
package/CHANGELOG.vi.md CHANGED
@@ -6,6 +6,15 @@ 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.36.0] - 2026-09-11
10
+
11
+ ### Added
12
+ - Call sheet của `/apps` giờ giải thích việc cài một app từ marketplace như hai câu hỏi tách biệt: gợi ý một app luôn khả thi với bất kỳ credential nào (`GET /api/sites/{siteId}/apps` cùng `GET /oauth/authorize-info` để lấy nhà phát hành, chính sách riêng tư, scope và giá của app), còn cài đặt thì cần một session (`POST /oauth/authorize`) vì agent key không phải access token và nền tảng cố tình từ chối nó. Call sheet cũng ghi rõ một app trả phí sẽ bị từ chối nếu thiếu `acceptedPrice` tường minh, nên server này không bao giờ tự ý khiến merchant phải trả tiền cho một gói đăng ký.
13
+ - Catalog giờ mang theo hai operation `/oauth` phía sau luồng đó, `GET /oauth/authorize-info` và `POST /oauth/authorize`, kèm request shape cho operation thứ hai.
14
+
15
+ ### Changed
16
+ - Call sheet của `builtin-apps` không còn nói với caller rằng một app marketplace "không thể cài từ đây được"; câu đó khắt khe hơn mức nền tảng thực sự yêu cầu.
17
+
9
18
  ## [0.35.0] - 2026-09-11
10
19
 
11
20
  ### Added
@@ -1,8 +1,8 @@
1
1
  export const SWAGGER_SOURCE = {
2
- "operations": 506,
2
+ "operations": 508,
3
3
  "definitions": 105,
4
- "bodyCarrying": 182,
5
- "bodyUndescribed": 67,
4
+ "bodyCarrying": 183,
5
+ "bodyUndescribed": 68,
6
6
  "generatedFrom": "server/docs/swagger.json"
7
7
  };
8
8
  export const API_OPERATIONS = [
@@ -15239,6 +15239,62 @@ export const API_OPERATIONS = [
15239
15239
  "bodyDescribed": false,
15240
15240
  "bodyRef": null,
15241
15241
  "credential": "apiKey"
15242
+ },
15243
+ {
15244
+ "id": "post:/oauth/authorize",
15245
+ "method": "POST",
15246
+ "path": "/oauth/authorize",
15247
+ "tags": [
15248
+ "apps"
15249
+ ],
15250
+ "summary": "Agree to an app's scopes and install it on a site",
15251
+ "params": [
15252
+ {
15253
+ "name": "body",
15254
+ "in": "body",
15255
+ "required": true,
15256
+ "type": "object",
15257
+ "description": "{siteId, clientId, versionId, redirectUri, scopes, state, acceptedPrice?}"
15258
+ }
15259
+ ],
15260
+ "bodyDescribed": false,
15261
+ "bodyRef": null,
15262
+ "credential": "siteScoped"
15263
+ },
15264
+ {
15265
+ "id": "get:/oauth/authorize-info",
15266
+ "method": "GET",
15267
+ "path": "/oauth/authorize-info",
15268
+ "tags": [
15269
+ "apps"
15270
+ ],
15271
+ "summary": "What an app is asking for, before anyone agrees to it",
15272
+ "params": [
15273
+ {
15274
+ "name": "client_id",
15275
+ "in": "query",
15276
+ "required": true,
15277
+ "type": "string",
15278
+ "description": "The app's client id"
15279
+ },
15280
+ {
15281
+ "name": "version_id",
15282
+ "in": "query",
15283
+ "required": false,
15284
+ "type": "string",
15285
+ "description": "A specific version; the current one otherwise"
15286
+ },
15287
+ {
15288
+ "name": "redirect_uri",
15289
+ "in": "query",
15290
+ "required": true,
15291
+ "type": "string",
15292
+ "description": "Must match one the app registered"
15293
+ }
15294
+ ],
15295
+ "bodyDescribed": false,
15296
+ "bodyRef": null,
15297
+ "credential": "siteScoped"
15242
15298
  }
15243
15299
  ];
15244
15300
  export const API_DEFINITIONS = {
@@ -114,9 +114,29 @@ export function describeOperation(op) {
114
114
  'reduces the subtree back to the reference. Configure the block through its own ' +
115
115
  'props/slots, never by editing what it rendered.',
116
116
  installing: 'A BUILT-IN app installs with POST /api/sites/{siteId}/builtin-apps/{key} and that key ' +
117
- "parameter's description names every installable one. A MARKETPLACE app cannot be " +
118
- 'installed from here at all: it goes through an OAuth consent screen a person has to ' +
119
- 'approve, so ask the merchant to install it and then read /apps/blocks again.',
117
+ "parameter's description names every installable one.",
118
+ // A MARKETPLACE APP IS A PERMISSION GRANT, and who may make it is the
119
+ // platform's line rather than this client's caution. `consent`
120
+ // authenticates as a USER — the platform parses an ACCESS TOKEN, so a
121
+ // session reaches it and a `wbk_` key does not — because an installed app
122
+ // holds SCOPES against the store. And `acceptedPrice` is a pointer:
123
+ // omitting it means a free app, and omitting it for a paid one is REFUSED
124
+ // rather than assumed, so nothing automated can commit a merchant to a
125
+ // subscription.
126
+ //
127
+ // So the honest answer is neither "ask a human" nor "just install it". It
128
+ // is: always be able to SUGGEST, and install only what the credential in
129
+ // hand is allowed to install, having shown what it grants.
130
+ marketplace: 'SUGGESTING one is always available: GET /api/sites/{siteId}/apps lists what this store ' +
131
+ 'can install, and GET /oauth/authorize-info?client_id=… answers with the app, its ' +
132
+ 'publisher, its privacy policy, the SCOPES it would hold and whether it is paid. Show ' +
133
+ 'that to whoever is accountable for it. INSTALLING is POST /oauth/authorize with ' +
134
+ '{siteId, clientId, versionId, redirectUri, scopes} — it needs a SESSION ' +
135
+ '(SB_EMAIL/SB_PASSWORD), because an agent key is not an access token and the platform ' +
136
+ 'refuses it by design: the app holds scopes against the store. A FREE app installs with ' +
137
+ 'no acceptedPrice; a PAID one is refused without it rather than having a price assumed ' +
138
+ 'on the merchant\'s behalf, so never send one they have not seen. Then read ' +
139
+ '/apps/blocks again for what it contributed.',
120
140
  };
121
141
  }
122
142
  const shape = REQUEST_SHAPES[op.id];
@@ -1,7 +1,7 @@
1
1
  export const SHAPE_SOURCE = {
2
- "writeOperations": 222,
3
- "shaped": 169,
4
- "fromHandlers": 169,
2
+ "writeOperations": 223,
3
+ "shaped": 170,
4
+ "fromHandlers": 170,
5
5
  "fromSwaggerOnly": 0,
6
6
  "withReadOnly": 26,
7
7
  "structsRead": 1658
@@ -31,6 +31,41 @@ export const REQUEST_SHAPES = {
31
31
  "source": "go",
32
32
  "goType": "versionChoice"
33
33
  },
34
+ "post:/oauth/authorize": {
35
+ "fields": [
36
+ {
37
+ "name": "siteId",
38
+ "type": "string"
39
+ },
40
+ {
41
+ "name": "clientId",
42
+ "type": "string"
43
+ },
44
+ {
45
+ "name": "versionId",
46
+ "type": "string"
47
+ },
48
+ {
49
+ "name": "redirectUri",
50
+ "type": "string"
51
+ },
52
+ {
53
+ "name": "scopes",
54
+ "type": "string[]"
55
+ },
56
+ {
57
+ "name": "state",
58
+ "type": "string"
59
+ },
60
+ {
61
+ "name": "AcceptedPrice",
62
+ "type": "object",
63
+ "note": "AcceptedPrice is the amount the merchant was LOOKING AT when they pressed the button, echoed back from the authorize response above."
64
+ }
65
+ ],
66
+ "source": "go",
67
+ "goType": "(inline)"
68
+ },
34
69
  "post:/api/orgs/{orgId}/apps": {
35
70
  "fields": [
36
71
  {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "sbuilder-mcp",
3
- "version": "0.35.0",
3
+ "version": "0.36.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",