sbuilder-mcp 0.43.0 → 0.44.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 +8 -0
- package/CHANGELOG.vi.md +8 -0
- package/dist/transport/socket.js +38 -1
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -6,6 +6,14 @@ 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.44.0] - 2026-09-14
|
|
10
|
+
|
|
11
|
+
### Changed
|
|
12
|
+
- The live-edit socket's auth frame now names the calling harness (client, clientVersion), so the editor's presence bar and cursors can tell Claude Code, Cursor, or another agent apart instead of drawing the same robot glyph for all of them; the fields are omitted entirely when nothing identifies itself, so a client that never identified sends the exact same frame as before.
|
|
13
|
+
|
|
14
|
+
### Fixed
|
|
15
|
+
- Codegen's config-value vocabulary now provably prefers a platform declaration over a renderer's own (necessarily partial) list wherever both exist for the same key, closing a precedence that was only correct by accident of loop order and could have silently flipped on the next reshuffle; pinned by a new test rather than a runtime check, since an under-report from a renderer-only key is undetectable by construction.
|
|
16
|
+
|
|
9
17
|
## [0.43.0] - 2026-09-14
|
|
10
18
|
|
|
11
19
|
### Added
|
package/CHANGELOG.vi.md
CHANGED
|
@@ -6,6 +6,14 @@ 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.44.0] - 2026-09-14
|
|
10
|
+
|
|
11
|
+
### Changed
|
|
12
|
+
- Frame xác thực của socket live-edit giờ nêu rõ harness đang gọi (client, clientVersion), nhờ đó thanh presence và con trỏ của editor có thể phân biệt Claude Code, Cursor hay một agent khác thay vì vẽ chung một biểu tượng robot cho tất cả; các trường này bị bỏ qua hoàn toàn khi không có gì tự nhận diện, nên một client chưa từng tự nhận diện vẫn gửi đúng frame như trước.
|
|
13
|
+
|
|
14
|
+
### Fixed
|
|
15
|
+
- Bảng giá trị config của codegen giờ chứng minh được là ưu tiên một khai báo của nền tảng hơn danh sách tự thân (vốn luôn chỉ là một phần) của renderer bất cứ khi nào cả hai cùng tồn tại cho một key, khép lại một thứ tự ưu tiên trước đây chỉ đúng nhờ tình cờ của thứ tự vòng lặp và có thể âm thầm đảo ngược ở lần sắp xếp lại kế tiếp; được ghim bằng một test mới thay vì một kiểm tra lúc chạy, vì việc báo thiếu từ một key chỉ có nguồn renderer là không thể phát hiện được về mặt cấu trúc.
|
|
16
|
+
|
|
9
17
|
## [0.43.0] - 2026-09-14
|
|
10
18
|
|
|
11
19
|
### Added
|
package/dist/transport/socket.js
CHANGED
|
@@ -1,3 +1,12 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* One connection to the editor's live-edit room.
|
|
3
|
+
*
|
|
4
|
+
* The browser-shaped surface narrowed to a `SocketLike` so tests can drive a
|
|
5
|
+
* hand-written fake — fire `onopen`, deliver a message, fire `onclose` at a
|
|
6
|
+
* chosen moment — with no network and no server. This is the editor's own
|
|
7
|
+
* testing seam, and it is why every rule below has a test rather than a comment.
|
|
8
|
+
*/
|
|
9
|
+
import { agentIdentity } from './identity.js';
|
|
1
10
|
/** WebSocket.OPEN per spec, as a literal so this module never reads a global. */
|
|
2
11
|
const OPEN = 1;
|
|
3
12
|
const RETRY_BASE_MS = 500;
|
|
@@ -39,7 +48,35 @@ export class RealtimeSocket {
|
|
|
39
48
|
// Auth is the FIRST message, never a header (a browser cannot set one on a
|
|
40
49
|
// WebSocket) and never a query parameter (a token in a URL lands in logs).
|
|
41
50
|
// The server enforces a 5s deadline, so it goes out immediately.
|
|
42
|
-
|
|
51
|
+
//
|
|
52
|
+
// WHICH HARNESS, because the room draws one robot for all of them.
|
|
53
|
+
// `identityHeaders` rides on every HTTP call and CANNOT reach this socket
|
|
54
|
+
// — the header door is the very one the paragraph above closes — so the
|
|
55
|
+
// frame carries it instead. The editor paints 🤖 for `kind === 'agent'`
|
|
56
|
+
// (`PresenceBar.vue`, `PeerCursors.vue`) whether the peer is Claude Code,
|
|
57
|
+
// Cursor or a cron job, so a merchant watching their canvas move cannot
|
|
58
|
+
// tell which of their tools is doing it.
|
|
59
|
+
//
|
|
60
|
+
// ADDITIVE BY CONSTRUCTION, the same property `Peer.Kind` shipped on:
|
|
61
|
+
// `realtime.Decode` is a plain `json.Unmarshal` with no
|
|
62
|
+
// `DisallowUnknownFields`, so every deployed server IGNORES these two
|
|
63
|
+
// today and a later one reads them without this client changing again.
|
|
64
|
+
// Omitted rather than sent blank when the client named nothing — a client
|
|
65
|
+
// that identified itself and one that did not must not look alike, which
|
|
66
|
+
// is the same rule `identityHeaders` follows.
|
|
67
|
+
//
|
|
68
|
+
// A LABEL AND NEVER A CLAIM. `kind` is derived server-side from the
|
|
69
|
+
// credential (`auth.Authorize`), which is what makes it trustworthy;
|
|
70
|
+
// this is asserted by the caller and must never gate anything. It is the
|
|
71
|
+
// same string `X-Agent-Client` already puts on every HTTP request, so the
|
|
72
|
+
// socket is catching up with what the platform is told regardless.
|
|
73
|
+
const id = agentIdentity();
|
|
74
|
+
ws.send(JSON.stringify({
|
|
75
|
+
t: 'auth',
|
|
76
|
+
token: this.token(),
|
|
77
|
+
...(id.client ? { client: id.client } : {}),
|
|
78
|
+
...(id.clientVersion ? { clientVersion: id.clientVersion } : {}),
|
|
79
|
+
}));
|
|
43
80
|
};
|
|
44
81
|
ws.onmessage = (ev) => {
|
|
45
82
|
// A frame ARRIVING is the only evidence this connection is usable. An open
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "sbuilder-mcp",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.44.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",
|