sbuilder-mcp 0.1.2 → 0.1.4
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 +42 -4
- package/CHANGELOG.vi.md +51 -0
- package/README.md +35 -9
- package/README.vi.md +34 -8
- package/dist/catalog/api.generated.js +6246 -2867
- package/dist/catalog/element-search.js +103 -0
- package/dist/catalog/elements.generated.js +8192 -4664
- package/dist/catalog/search.js +35 -3
- package/dist/core/tree.js +23 -0
- package/dist/domains/site/builder.js +72 -1
- package/dist/domains/site/document.js +3 -1
- package/dist/domains/site/findings.js +51 -0
- package/dist/domains/site/review.js +19 -11
- package/dist/live/session.js +31 -3
- package/dist/mcp/notices.js +21 -0
- package/dist/mcp/response.js +6 -3
- package/dist/server.js +17 -24
- package/dist/tools/api.js +190 -22
- package/dist/tools/live.js +118 -48
- package/dist/tools/page.js +180 -157
- package/dist/tools/project.js +38 -0
- package/dist/tools/session.js +13 -5
- package/dist/transport/http.js +21 -4
- package/dist/transport/media.js +4 -1
- package/dist/vision/boxes.js +35 -0
- package/dist/vision/measure.js +4 -3
- package/dist/vision/shoot.js +175 -74
- package/package.json +3 -2
package/CHANGELOG.md
CHANGED
|
@@ -1,10 +1,48 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
**English** · [Tiếng Việt](./CHANGELOG.vi.md)
|
|
4
4
|
|
|
5
|
-
|
|
5
|
+
All notable changes to this project are documented in this file.
|
|
6
|
+
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/),
|
|
7
|
+
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
|
|
6
8
|
|
|
7
|
-
## 0.1.
|
|
9
|
+
## [0.1.4] - 2026-09-07
|
|
10
|
+
|
|
11
|
+
### Added
|
|
12
|
+
- sb_set accepts an edits[] batch so many nodes save and publish in one call instead of one round trip per node.
|
|
13
|
+
- sb_api_call shapes list answers with pick and max_items, and cuts an oversized list to fit the result cap while saying how many items were shown and how to narrow the call.
|
|
14
|
+
- All 25 tools carry MCP annotations (readOnlyHint, destructiveHint, idempotentHint, openWorldHint), so compliant clients stop asking for confirmation on reads.
|
|
15
|
+
- Trap 5 is now guarded in code: an edit inside an app block's interior is refused instead of being silently lost on save.
|
|
16
|
+
- The catalog is regenerated from the platform: 106 elements, 412 API operations, and 26 binding sources.
|
|
17
|
+
|
|
18
|
+
### Changed
|
|
19
|
+
- sb_look keeps Chrome open across calls, launching it lazily and reusing it while connected, and captures multiple widths in parallel instead of one at a time.
|
|
20
|
+
- sb_look screenshots are JPEG by default (format: "png" still available), which cuts image size and cost without changing token count.
|
|
21
|
+
- sb_look's node_id boxes now count depth from the framed node and cover only its subtree.
|
|
22
|
+
- sb_page_list, sb_templates and sb_media_list return a smaller, whitelisted set of fields instead of the whole document or settings blob.
|
|
23
|
+
- sb_look's measured layout boxes are returned as compact tuples ([id, type, x, y, w, h]) instead of pretty-printed objects, with box_depth controlling how deep the tree goes.
|
|
24
|
+
- Tool descriptions for sb_bind, sb_look, sb_live_join, sb_review and sb_api_find are shorter; sb_bind no longer interpolates all 26 binding sources into its schema.
|
|
25
|
+
- The server's handshake instructions are shorter, take their tool/element/operation counts from generated source records, and no longer claim a base style value vanishes on publish.
|
|
26
|
+
- Findings from sb_page_open, sb_review and sb_look reuse one fix template per kind of defect, and directives such as FIX THESE are said once per process instead of on every call.
|
|
27
|
+
- Every tool result is now compact JSON.
|
|
28
|
+
|
|
29
|
+
### Fixed
|
|
30
|
+
- sb_live_join reports why an API key cannot join a live session instead of joining silently into a socket that never opens, since the platform refuses wbk_ keys.
|
|
31
|
+
- Multipart uploads now surface the platform's per-field validation errors instead of a generic failure.
|
|
32
|
+
- Duplicating a subtree that contains an app block is refused instead of being silently reduced.
|
|
33
|
+
- fill() throws when a code has no template instead of returning an empty fix.
|
|
34
|
+
- sb_api_call's publish step splits an ops batch to stay under the live socket's 4 MiB frame cap instead of risking a dropped connection.
|
|
35
|
+
- A non-list answer's size is no longer silently cut, and asking for max_items on a non-list answer is now reported instead of ignored.
|
|
36
|
+
- A platform response field named truncated is no longer overwritten by the result-shaping logic.
|
|
37
|
+
- Each screenshot page now closes in its own finally block, so a tab lost to a first rejection can no longer leak for the life of the process.
|
|
38
|
+
|
|
39
|
+
## [0.1.2] - 2026-08-29
|
|
40
|
+
|
|
41
|
+
### Added
|
|
42
|
+
- The server reports which machine and which client it runs on, so the store's Agent app can show every connected agent.
|
|
43
|
+
- sb_look measures the render: content past the viewport, overlapping siblings, and text too small to read are reported with the width they happen at.
|
|
44
|
+
|
|
45
|
+
## [0.1.1] - 2026-08-28
|
|
8
46
|
|
|
9
47
|
- fix(release): ask for the one-time password instead of dying on it
|
|
10
48
|
- feat: sb_media_upload — the agent can add images
|
|
@@ -49,7 +87,7 @@
|
|
|
49
87
|
- feat: repo skeleton, response helpers, and a green build/test/smoke gate
|
|
50
88
|
- docs: design spec and phase-1 implementation plan for @sbuilder/mcp
|
|
51
89
|
|
|
52
|
-
## 0.1.0
|
|
90
|
+
## [0.1.0]
|
|
53
91
|
|
|
54
92
|
First release.
|
|
55
93
|
|
package/CHANGELOG.vi.md
ADDED
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
# Changelog
|
|
2
|
+
|
|
3
|
+
[English](./CHANGELOG.md) · **Tiếng Việt**
|
|
4
|
+
|
|
5
|
+
Mọi thay đổi đáng chú ý của dự án được ghi lại trong file này.
|
|
6
|
+
Định dạng dựa trên [Keep a Changelog](https://keepachangelog.com/en/1.1.0/),
|
|
7
|
+
và dự án tuân theo [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
|
|
8
|
+
|
|
9
|
+
## [0.1.4] - 2026-09-07
|
|
10
|
+
|
|
11
|
+
### Added
|
|
12
|
+
- sb_set nhận một mảng edits[] để ghi nhiều node trong một lần gọi, thay vì lưu và publish riêng cho từng node.
|
|
13
|
+
- sb_api_call định dạng lại kết quả dạng danh sách bằng pick và max_items, và cắt bớt danh sách quá lớn để vừa giới hạn kết quả, kèm thông báo đã hiển thị bao nhiêu mục và cách thu hẹp lời gọi.
|
|
14
|
+
- Cả 25 tool đều mang chú thích MCP (readOnlyHint, destructiveHint, idempotentHint, openWorldHint), giúp các client tuân thủ chuẩn không còn hỏi xác nhận cho thao tác chỉ đọc.
|
|
15
|
+
- Bẫy thứ 5 giờ được chặn bằng code: một chỉnh sửa bên trong app block bị từ chối thay vì âm thầm mất khi lưu.
|
|
16
|
+
- Catalog được tạo lại từ nền tảng: 106 element, 412 API operation, và 26 nguồn binding.
|
|
17
|
+
|
|
18
|
+
### Changed
|
|
19
|
+
- sb_look giữ Chrome mở giữa các lần gọi, khởi chạy lười và tái sử dụng khi còn kết nối, đồng thời chụp nhiều chiều rộng song song thay vì lần lượt.
|
|
20
|
+
- Ảnh chụp của sb_look mặc định là JPEG (vẫn có thể chọn format: "png"), giúp giảm dung lượng ảnh và chi phí mà không đổi số token.
|
|
21
|
+
- Các box theo node_id của sb_look giờ tính độ sâu từ node được khung và chỉ bao phủ subtree của nó.
|
|
22
|
+
- sb_page_list, sb_templates và sb_media_list trả về tập trường được lọc sẵn nhỏ hơn, thay vì cả document hay cả khối settings.
|
|
23
|
+
- Các box đo layout của sb_look giờ trả về dạng tuple gọn ([id, type, x, y, w, h]) thay vì object in đẹp, với box_depth điều khiển độ sâu duyệt cây.
|
|
24
|
+
- Mô tả của các tool sb_bind, sb_look, sb_live_join, sb_review và sb_api_find được rút gọn; sb_bind không còn chèn cả 26 nguồn binding vào schema.
|
|
25
|
+
- Hướng dẫn bắt tay của server ngắn hơn, lấy số lượng tool/element/operation từ dữ liệu sinh tự động, và không còn nói sai rằng giá trị style ở base biến mất khi publish.
|
|
26
|
+
- Các finding từ sb_page_open, sb_review và sb_look dùng chung một mẫu fix cho mỗi loại lỗi, và các chỉ dẫn như FIX THESE chỉ được nói một lần cho mỗi tiến trình thay vì lặp lại ở mọi lần gọi.
|
|
27
|
+
- Mọi kết quả trả về của tool giờ là JSON rút gọn.
|
|
28
|
+
|
|
29
|
+
### Fixed
|
|
30
|
+
- sb_live_join báo rõ lý do một API key không thể tham gia phiên live, thay vì âm thầm tham gia vào một socket không bao giờ mở, vì nền tảng từ chối key dạng wbk_.
|
|
31
|
+
- Upload dạng multipart giờ trả về đúng lỗi kiểm tra theo từng trường của nền tảng thay vì một lỗi chung chung.
|
|
32
|
+
- Nhân bản một subtree chứa app block bị từ chối thay vì bị âm thầm rút gọn.
|
|
33
|
+
- fill() báo lỗi khi một code không có template thay vì trả về một fix rỗng.
|
|
34
|
+
- Bước publish của sb_api_call chia nhỏ batch ops để nằm dưới giới hạn khung 4 MiB của socket live, thay vì có nguy cơ làm rớt kết nối.
|
|
35
|
+
- Kết quả không phải danh sách không còn bị cắt âm thầm, và việc dùng max_items trên một kết quả không phải danh sách giờ được báo thay vì bị bỏ qua.
|
|
36
|
+
- Trường truncated do nền tảng trả về không còn bị logic định dạng kết quả ghi đè.
|
|
37
|
+
- Mỗi trang chụp ảnh giờ đóng trong khối finally riêng, nên một tab bị lỗi lần đầu không còn rò rỉ suốt vòng đời tiến trình.
|
|
38
|
+
|
|
39
|
+
## [0.1.2] - 2026-08-29
|
|
40
|
+
|
|
41
|
+
### Added
|
|
42
|
+
- Server báo cho nền tảng biết nó đang chạy trên máy nào và trong client nào, để app Agent của cửa hàng hiển thị được mọi agent đang kết nối.
|
|
43
|
+
- sb_look đo kết quả render: nội dung tràn khỏi viewport, các phần tử anh em chồng lên nhau, và chữ quá nhỏ để đọc được báo cáo kèm chiều rộng mà lỗi xảy ra.
|
|
44
|
+
|
|
45
|
+
## [0.1.1] - 2026-08-28
|
|
46
|
+
|
|
47
|
+
Sửa lỗi, thêm tool, và vòng lặp nhìn.
|
|
48
|
+
|
|
49
|
+
## [0.1.0]
|
|
50
|
+
|
|
51
|
+
Bản phát hành đầu tiên.
|
package/README.md
CHANGED
|
@@ -63,13 +63,13 @@ make, because those mean "this person's account".
|
|
|
63
63
|
| --- | --- |
|
|
64
64
|
| `sb_connect` | Log in, list the sites this account can operate, report which credentials are present |
|
|
65
65
|
| `sb_site_list` | List the sites this account can operate |
|
|
66
|
-
| `sb_api_find` | Find API operations by intent —
|
|
66
|
+
| `sb_api_find` | Find API operations by intent — one line per match — then read one operation's call sheet by id: real parameter schemas, the credential it needs, and an explicit note when the platform's document fails to describe a request body |
|
|
67
67
|
| `sb_api_call` | Execute one operation. Defaults to a dry run that sends nothing |
|
|
68
68
|
| `sb_page_open` | Open a page for editing and return its outline |
|
|
69
69
|
| `sb_outline` | The open page as a compressed tree — never a raw document dump |
|
|
70
70
|
| `sb_node_read` | One node in full, with a warning if it is a shared global |
|
|
71
71
|
| `sb_catalog_search` | Find an element by what it should do, using the platform's own AI hints |
|
|
72
|
-
| `sb_traits_for` |
|
|
72
|
+
| `sb_traits_for` | An element's inspector — tabs, groups, controls and what each declared one writes — plus its AI hints, defaults and containment rules |
|
|
73
73
|
| `sb_add` | Add an element — or a whole nested subtree — in one call |
|
|
74
74
|
| `sb_set` | Write style/config/specials. Per breakpoint by default |
|
|
75
75
|
| `sb_move` | Move a node to another parent |
|
|
@@ -84,12 +84,17 @@ make, because those mean "this person's account".
|
|
|
84
84
|
| `sb_media_list` | The site's media library |
|
|
85
85
|
| `sb_media_upload` | Add an image and get its URL — the only route, the upload is multipart |
|
|
86
86
|
| `sb_live_join` | Join the editor's live-edit room as a visible peer — edits then appear live |
|
|
87
|
-
| `sb_look` | Save, render, and return screenshots plus measured node boxes |
|
|
87
|
+
| `sb_look` | Save, render, and return screenshots plus measured node boxes and layout defects measured on the render |
|
|
88
88
|
| `sb_bind` | Bind a node's content to real store data |
|
|
89
89
|
|
|
90
|
-
Twenty-five tools, **
|
|
91
|
-
|
|
92
|
-
operations added to the platform arrive with the
|
|
90
|
+
Twenty-five tools, **412 API operations**, 106 elements, 26 binding sources. `sb_api_find`
|
|
91
|
+
is an index rather than a tool per endpoint, so the tool list stays short while everything
|
|
92
|
+
the platform can do stays reachable — and operations added to the platform arrive with the
|
|
93
|
+
next `npm run codegen`.
|
|
94
|
+
|
|
95
|
+
Every result is compact JSON, every directive is said once per process, and every tool
|
|
96
|
+
carries MCP annotations — a client that honours them stops asking a person to confirm a
|
|
97
|
+
read.
|
|
93
98
|
|
|
94
99
|
Full reference: [`docs/tools.md`](./docs/tools.md).
|
|
95
100
|
|
|
@@ -117,9 +122,27 @@ npm run smoke # offline self-test; must print ALL GOOD
|
|
|
117
122
|
Contributor guide: [`CLAUDE.md`](./CLAUDE.md). Design rationale:
|
|
118
123
|
[`docs/superpowers/specs/`](./docs/superpowers/specs/).
|
|
119
124
|
|
|
125
|
+
### Release
|
|
126
|
+
|
|
127
|
+
A push to `main` that touches `src/**` releases on its own
|
|
128
|
+
(`.github/workflows/auto-release.yml`): the gate runs (build, test, smoke), the version
|
|
129
|
+
bump is read off the commit subject — `feat` is minor, `BREAKING CHANGE` or `!` is major,
|
|
130
|
+
anything else is patch — Claude writes the changelog entry in both languages,
|
|
131
|
+
`server.json` is synced, the release is committed as `chore(release): vX.Y.Z` and tagged,
|
|
132
|
+
then published to npm, as a GitHub Release, and to the MCP Registry through GitHub OIDC.
|
|
133
|
+
`workflow_dispatch` runs the same flow with a bump you choose. A commit whose subject
|
|
134
|
+
contains `chore(release):` or `release: v` is skipped, so a release never triggers another.
|
|
135
|
+
|
|
136
|
+
The workflow needs two repository secrets in the `prod` environment: `NPM_ACCESS_TOKEN`
|
|
137
|
+
and `CLAUDE_CODE_OAUTH_TOKEN`. The registry step needs none.
|
|
138
|
+
|
|
139
|
+
`npm run release` (`scripts/release.mjs`) is the offline path — a machine with no CI, or a
|
|
140
|
+
release cut while a secret is being rotated. It runs the same gate and writes the same
|
|
141
|
+
`## [x.y.z] - date` changelog heading, so the two never disagree.
|
|
142
|
+
|
|
120
143
|
## Designing safely
|
|
121
144
|
|
|
122
|
-
|
|
145
|
+
Five platform rules fail **silently** if a client does not know them, so they are encoded
|
|
123
146
|
here as tested code rather than advice:
|
|
124
147
|
|
|
125
148
|
- **Band order** — ROOT's children must read `[header][middle][footer]`, or the platform
|
|
@@ -131,12 +154,15 @@ here as tested code rather than advice:
|
|
|
131
154
|
publishing cascades. Any result touching one says so.
|
|
132
155
|
- **Responsive by default** — `sb_set` writes per breakpoint, because a design should
|
|
133
156
|
respond. Base is the cascade's fallback layer, not a trap.
|
|
157
|
+
- **App blocks** — a marketplace app's subtree is composed onto the page on read and reduced
|
|
158
|
+
back to one reference node on save, so an edit inside it is lost without a word. Every
|
|
159
|
+
write refuses the interior; the outline flags the block root `app: true`.
|
|
134
160
|
|
|
135
161
|
## Status
|
|
136
162
|
|
|
137
163
|
All three phases shipped: authentication and full API reach; the page document, patch
|
|
138
|
-
protocol, builder and the
|
|
139
|
-
loop.
|
|
164
|
+
protocol, builder and the five traps; the live-edit socket, the yield rule, and the vision
|
|
165
|
+
loop. Since then: a token diet across every result, and releases that cut themselves.
|
|
140
166
|
|
|
141
167
|
Requires **Node ≥22** (the global `WebSocket`) and, for `sb_look` only, **system Google
|
|
142
168
|
Chrome** — `playwright-core` bundles no browser, so installing downloads nothing.
|
package/README.vi.md
CHANGED
|
@@ -60,13 +60,13 @@ là "tài khoản của người này".
|
|
|
60
60
|
| --- | --- |
|
|
61
61
|
| `sb_connect` | Đăng nhập, liệt kê site tài khoản vận hành được, báo đang có credential nào |
|
|
62
62
|
| `sb_site_list` | Liệt kê site tài khoản vận hành được |
|
|
63
|
-
| `sb_api_find` | Tìm operation theo ý định —
|
|
63
|
+
| `sb_api_find` | Tìm operation theo ý định — mỗi kết quả một dòng — rồi đọc call sheet của một operation theo id: schema tham số thật, credential cần dùng, và cảnh báo rõ ràng khi tài liệu của nền tảng không mô tả request body |
|
|
64
64
|
| `sb_api_call` | Chạy một operation. Mặc định chạy khô, không gửi gì |
|
|
65
65
|
| `sb_page_open` | Mở một trang để sửa và trả về outline |
|
|
66
66
|
| `sb_outline` | Trang đang mở dạng cây nén — không bao giờ dump tài liệu thô |
|
|
67
67
|
| `sb_node_read` | Một node đầy đủ, kèm cảnh báo nếu nó là global dùng chung |
|
|
68
68
|
| `sb_catalog_search` | Tìm element theo việc nó cần làm, dùng chính AI hints của nền tảng |
|
|
69
|
-
| `sb_traits_for` |
|
|
69
|
+
| `sb_traits_for` | Inspector của element — tab, nhóm, control và mỗi control khai báo sẵn ghi vào đâu — kèm AI hints, default và luật chứa con |
|
|
70
70
|
| `sb_add` | Thêm một element — hoặc cả cây con lồng nhau — trong một lần gọi |
|
|
71
71
|
| `sb_set` | Ghi style/config/specials. Mặc định theo breakpoint |
|
|
72
72
|
| `sb_move` | Chuyển node sang cha khác |
|
|
@@ -81,12 +81,16 @@ là "tài khoản của người này".
|
|
|
81
81
|
| `sb_media_list` | Thư viện ảnh của site |
|
|
82
82
|
| `sb_media_upload` | Thêm ảnh và lấy URL — đường duy nhất, vì upload là multipart |
|
|
83
83
|
| `sb_live_join` | Vào phòng live-edit của editor như một peer nhìn thấy được — sửa gì hiện ngay |
|
|
84
|
-
| `sb_look` | Lưu, render, trả về ảnh chụp kèm box đo được của
|
|
84
|
+
| `sb_look` | Lưu, render, trả về ảnh chụp kèm box đo được của node và lỗi bố cục đo trên bản render |
|
|
85
85
|
| `sb_bind` | Gắn nội dung một node vào dữ liệu cửa hàng thật |
|
|
86
86
|
|
|
87
|
-
Hai mươi lăm tool, **
|
|
88
|
-
tool, nên danh sách tool vẫn ngắn trong khi mọi
|
|
89
|
-
operation mới thêm bên nền tảng sẽ tự có sau lần
|
|
87
|
+
Hai mươi lăm tool, **412 operation API**, 106 element, 26 nguồn binding. `sb_api_find` là
|
|
88
|
+
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
|
|
89
|
+
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
|
|
90
|
+
`npm run codegen` kế tiếp.
|
|
91
|
+
|
|
92
|
+
Mọi kết quả đều là JSON nén, mọi directive chỉ nói một lần mỗi process, và mọi tool đều mang
|
|
93
|
+
MCP annotation — client nào tôn trọng chúng sẽ thôi hỏi người dùng xác nhận một lần đọc.
|
|
90
94
|
|
|
91
95
|
Tra cứu đầy đủ: [`docs/tools.vi.md`](./docs/tools.vi.md).
|
|
92
96
|
|
|
@@ -114,9 +118,27 @@ npm run smoke # tự kiểm offline; phải in ALL GOOD
|
|
|
114
118
|
Hướng dẫn đóng góp: [`CLAUDE.md`](./CLAUDE.md). Lý do thiết kế:
|
|
115
119
|
[`docs/superpowers/specs/`](./docs/superpowers/specs/).
|
|
116
120
|
|
|
121
|
+
### Phát hành
|
|
122
|
+
|
|
123
|
+
Một lần push lên `main` có đụng `src/**` sẽ tự phát hành
|
|
124
|
+
(`.github/workflows/auto-release.yml`): cổng kiểm chạy (build, test, smoke), mức tăng phiên
|
|
125
|
+
bản đọc từ tiêu đề commit — `feat` là minor, `BREAKING CHANGE` hoặc `!` là major, còn lại là
|
|
126
|
+
patch — Claude viết mục changelog bằng cả hai ngôn ngữ, `server.json` được đồng bộ, bản phát
|
|
127
|
+
hành được commit là `chore(release): vX.Y.Z` và gắn tag, rồi publish lên npm, thành GitHub
|
|
128
|
+
Release, và lên MCP Registry qua GitHub OIDC. `workflow_dispatch` chạy đúng luồng đó với mức
|
|
129
|
+
tăng bạn chọn. Commit có tiêu đề chứa `chore(release):` hoặc `release: v` thì bị bỏ qua, nên
|
|
130
|
+
một lần phát hành không bao giờ kích hoạt lần khác.
|
|
131
|
+
|
|
132
|
+
Workflow cần hai secret của repo trong environment `prod`: `NPM_ACCESS_TOKEN` và
|
|
133
|
+
`CLAUDE_CODE_OAUTH_TOKEN`. Bước registry không cần secret nào.
|
|
134
|
+
|
|
135
|
+
`npm run release` (`scripts/release.mjs`) là đường offline — máy không có CI, hoặc phát hành
|
|
136
|
+
đúng lúc đang xoay secret. Nó chạy cùng cổng kiểm và ghi cùng tiêu đề changelog
|
|
137
|
+
`## [x.y.z] - date`, nên hai bên không bao giờ lệch nhau.
|
|
138
|
+
|
|
117
139
|
## Thiết kế an toàn
|
|
118
140
|
|
|
119
|
-
|
|
141
|
+
Năm luật của nền tảng hỏng **im lặng** nếu client không biết, nên chúng được viết thành code
|
|
120
142
|
có test chứ không phải lời khuyên:
|
|
121
143
|
|
|
122
144
|
- **Thứ tự băng** — con của ROOT phải đọc `[header][middle][footer]`, sai là nền tảng từ
|
|
@@ -127,11 +149,15 @@ có test chứ không phải lời khuyên:
|
|
|
127
149
|
thì lan. Mọi kết quả đụng tới nó đều nói rõ.
|
|
128
150
|
- **Mặc định responsive** — `sb_set` ghi theo breakpoint, vì một thiết kế nên đáp ứng. Base
|
|
129
151
|
là lớp dự phòng của cascade, không phải cái bẫy.
|
|
152
|
+
- **App block** — cây con của một app trên marketplace được ghép vào trang lúc đọc và thu về
|
|
153
|
+
một node tham chiếu lúc lưu, nên sửa gì bên trong là mất mà không một lời. Mọi lần ghi đều
|
|
154
|
+
từ chối phần bên trong; outline cắm cờ `app: true` cho gốc block.
|
|
130
155
|
|
|
131
156
|
## Trạng thái
|
|
132
157
|
|
|
133
158
|
Cả ba giai đoạn đã xong: xác thực và với tới toàn bộ API; tài liệu trang, giao thức patch,
|
|
134
|
-
builder và
|
|
159
|
+
builder và năm cái bẫy; socket live-edit, luật nhường, và vòng lặp thị giác. Sau đó: một đợt
|
|
160
|
+
ăn kiêng token trên mọi kết quả, và phát hành tự cắt.
|
|
135
161
|
|
|
136
162
|
Cần **Node ≥22** (WebSocket toàn cục) và, chỉ với `sb_look`, **Google Chrome của hệ thống** —
|
|
137
163
|
`playwright-core` không kèm trình duyệt nào nên lúc cài không tải gì.
|