webloom-framework 0.3.0 → 0.4.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/README.md +70 -42
- package/dist/advanced.d.ts +168 -0
- package/dist/advanced.js +441 -0
- package/dist/advanced.js.map +1 -0
- package/dist/chunk-4DSINPZD.js +158 -0
- package/dist/chunk-4DSINPZD.js.map +1 -0
- package/dist/chunk-ANA6GBEI.js +1737 -0
- package/dist/chunk-ANA6GBEI.js.map +1 -0
- package/dist/chunk-HJKPKWI7.js +4024 -0
- package/dist/chunk-HJKPKWI7.js.map +1 -0
- package/dist/chunk-SX46RHDI.js +433 -0
- package/dist/chunk-SX46RHDI.js.map +1 -0
- package/dist/index.d.ts +39 -259
- package/dist/index.js +38 -1359
- package/dist/index.js.map +1 -1
- package/dist/messageBus-CtrwkjrO.d.ts +5 -0
- package/dist/messagePortServiceTransport-BYprNvQY.d.ts +264 -0
- package/dist/react.d.ts +41 -28
- package/dist/react.js +79 -88
- package/dist/react.js.map +1 -1
- package/dist/runtimeTypes-DquUCHz-.d.ts +1640 -0
- package/dist/sharedWorkerHost-KI7TIGdX.d.ts +192 -0
- package/dist/testing.d.ts +18 -17
- package/dist/testing.js +23 -15
- package/dist/testing.js.map +1 -1
- package/dist/windowRuntime-BKkLPsAS.d.ts +23 -0
- package/docs/api.md +148 -111
- package/docs/proposals/webloom-v4/implementation-plan.md +443 -0
- package/docs/proposals/webloom-v4/requirements.md +555 -0
- package/docs/proposals/webloom-v4/verification.md +115 -0
- package/package.json +11 -2
- package/dist/chunk-76BGPI6M.js +0 -4261
- package/dist/chunk-76BGPI6M.js.map +0 -1
- package/dist/createPluginHost-BVsUCDKN.d.ts +0 -1318
- package/dist/resourceRegistry-BFnjmeGE.d.ts +0 -267
|
@@ -0,0 +1,115 @@
|
|
|
1
|
+
# WebLoom v4 验证记录
|
|
2
|
+
|
|
3
|
+
更新时间:2026-09-11(工作树验证)。本记录只写已经执行的命令和观察到的结果;
|
|
4
|
+
未执行的跨浏览器、产品部署和 registry-only 验收不会由本地测试推断为通过。
|
|
5
|
+
|
|
6
|
+
用户已确认 `webloom-framework@0.4.0` 已发布。本轮针对同一 v4 wire 的 patch 版本
|
|
7
|
+
`webloom-framework@0.4.1` 执行发布;发布后的 registry integrity 与消费验证将在上传后
|
|
8
|
+
补记。
|
|
9
|
+
|
|
10
|
+
## 1. WebLoom 本仓库
|
|
11
|
+
|
|
12
|
+
以下本地门禁均通过:
|
|
13
|
+
|
|
14
|
+
- `pnpm test:types`:TypeScript 检查、`.typecheck.ts` 负向类型 fixture、契约 inventory
|
|
15
|
+
gate 和临时 Git 基线回归自测均通过;正式源码 inventory 为 1 个 capability identity。
|
|
16
|
+
负向 fixture 覆盖错误 request/response/item、local capability 跨 Runtime、错误 parser
|
|
17
|
+
和旧字符串获取。基线自测验证“源码与 inventory 同时进入新 HEAD、但
|
|
18
|
+
`contractTestVersion` 未变”会在显式旧 commit 基线下失败。
|
|
19
|
+
- `pnpm test -- --reporter=dot`:17 个测试文件、106 个测试通过。
|
|
20
|
+
- `pnpm vitest run src/runtime/v4Acceptance.test.ts --reporter=verbose`:9 个 v4 acceptance
|
|
21
|
+
测试通过,包括 AT-16。
|
|
22
|
+
- `pnpm build`:四入口 `index`、`advanced`、`react`、`testing` 的 ESM 与 declaration
|
|
23
|
+
构建通过。
|
|
24
|
+
- `pnpm lint:boundaries`、`pnpm lint:v4`:通过。
|
|
25
|
+
- `pnpm run test:ablation`:AT-22 baseline 通过;删除 cancel、deadline、实例过滤、目录
|
|
26
|
+
校验、revoke 五种机制后对应探针均按预期失败;恢复源码后再次通过。
|
|
27
|
+
- `pnpm run pack:consumer`:tarball gate、声明/source-map 检查,以及 core-only、advanced、
|
|
28
|
+
React、Worker 四类独立 consumer 均通过。
|
|
29
|
+
|
|
30
|
+
### 真实 Chromium
|
|
31
|
+
|
|
32
|
+
`node scripts/real-browser-runtime-smoke.mjs` 使用 Vite production fixture 和真实
|
|
33
|
+
`SharedWorker` 通过。验证结果包括:
|
|
34
|
+
|
|
35
|
+
- 两个真实 Window 页面共享同一 `SharedWorkerGlobalScope`、同一 worker unit/setup,且每个
|
|
36
|
+
peer 的 service exposure 独立;覆盖 reverse RPC、typed stream `[1,2,3]`、基础 buffer
|
|
37
|
+
detach、重连后旧 proxy 撤销、terminal `stopping → disposed`、迟到连接和
|
|
38
|
+
`protocol_mismatch`。
|
|
39
|
+
- `transfer-matrix` 通过 10 个场景:RPC request/result 的正常与重复 transfer、不可达
|
|
40
|
+
request/result、stream request 与 item 的正常/重复/不可达 transfer、ready 前取消、发送
|
|
41
|
+
后取消和发送前取消。
|
|
42
|
+
- 矩阵实际交付并回环验证 request/result/item 的业务 `MessagePort`,验证两个
|
|
43
|
+
`Uint8Array` view 仍共享 backing buffer;不可达资源返回 `transfer_invalid`,发送前取消
|
|
44
|
+
保留 buffer/port,发送后取消保持已转移状态。
|
|
45
|
+
|
|
46
|
+
真实浏览器版本:Chrome for Testing `153.0.8010.12`,Linux x64,headless。Firefox、真实
|
|
47
|
+
Safari 和 Playwright WebKit 本轮未执行,不能宣称兼容性已验收。
|
|
48
|
+
|
|
49
|
+
AT-16 的 `1/10/100 services × 1/2/10 peers` 测量在 `v4Acceptance.test.ts` 中执行:每次
|
|
50
|
+
广播只构建一个公共 base snapshot,wire 侧按 peer 投影 grant,且不重复公开 runtime 字段。
|
|
51
|
+
|
|
52
|
+
### Contract inventory 基线策略
|
|
53
|
+
|
|
54
|
+
本地 `node scripts/check-contract-inventory.mjs` 保持以当前 `HEAD` 作为默认基线,便于
|
|
55
|
+
检查未提交工作树。提交级 CI 应执行 `pnpm run test:contract-inventory:ci`:它优先使用
|
|
56
|
+
`CONTRACT_INVENTORY_BASELINE_REF` 或 GitHub Actions 的 `GITHUB_BASE_SHA`,否则使用
|
|
57
|
+
`git merge-base HEAD origin/main`,最终显式传入 `--baseline-ref <sha>`。该门禁不会把
|
|
58
|
+
包含新源码和新 inventory 的当前提交当作自己的历史基线。
|
|
59
|
+
|
|
60
|
+
## 2. DemoWebLoom
|
|
61
|
+
|
|
62
|
+
以下门禁均通过:
|
|
63
|
+
|
|
64
|
+
- `pnpm build`:v4 boundary、`tsc --noEmit` 和 Vite production build 通过,九章入口及
|
|
65
|
+
real SharedWorker chunk 均生成。
|
|
66
|
+
- `node scripts/real-browser-smoke.mjs`:index、01–09 九章、01 插件 disable/enable、
|
|
67
|
+
07 两页真实 SharedWorker call 均通过;验证共享 worker/runtime/unit identity 与逐 peer
|
|
68
|
+
service identity。
|
|
69
|
+
|
|
70
|
+
Demo 的验证使用当前本地 WebLoom 工作树链接;这证明源码类型和真实浏览器交互,不替代
|
|
71
|
+
registry-only frozen install。0.4.0 是上一轮已发布基线;本轮 0.4.1 的 registry-only
|
|
72
|
+
消费验证在发布后单独记录。
|
|
73
|
+
|
|
74
|
+
## 3. Keymaster
|
|
75
|
+
|
|
76
|
+
以下本地代码门禁均通过:
|
|
77
|
+
|
|
78
|
+
- `pnpm test:types`:`tsc -b`、Keymaster contract inventory gate 和临时 Git 基线回归自测
|
|
79
|
+
通过,inventory 为 75 个 identity;Coordinator response/result 负向类型 fixture 通过
|
|
80
|
+
编译保护。
|
|
81
|
+
- `pnpm test`:216 个测试文件全部通过(18 个常规批次加 2 个重型隔离批次);其中
|
|
82
|
+
Coordinator worker 113 tests、Vault service 79 tests 均通过。
|
|
83
|
+
- `pnpm build`:Vite production build 通过,3982 个 module transformed;生产产物扫描
|
|
84
|
+
通过(13 个 HTML/JS/CSS 文件)。
|
|
85
|
+
- `pnpm lint:boundaries`:storage hard-switch、plugin boundary 和 Coordinator final-I/O
|
|
86
|
+
审计均通过。
|
|
87
|
+
- `git diff --check`:通过。
|
|
88
|
+
|
|
89
|
+
另外,在提交 `1edc117` 的 detached 临时 checkout 中执行
|
|
90
|
+
`pnpm install --frozen-lockfile --ignore-scripts && pnpm test:types && pnpm test`:安装
|
|
91
|
+
成功,`test:types` 通过,随后 216 个测试文件(18 个常规批次加 2 个重型隔离批次)全部
|
|
92
|
+
通过。该 fresh-install 结果也覆盖了 `@keymaster/plugin-token-bsv21` 对
|
|
93
|
+
`@noble/secp256k1` 的直接声明,以及根测试 setup 对 `@noble/secp256k1` 和
|
|
94
|
+
`@noble/hashes` 的直接声明。
|
|
95
|
+
|
|
96
|
+
Local/S3 真实浏览器、CORS/CAS、重启、多 tab、恢复、app-view 外部环境和公开部署仍需
|
|
97
|
+
产品环境证据;单元测试和 fresh-install 通过不等价于这些验收已经关闭。
|
|
98
|
+
|
|
99
|
+
## 4. 发布与 registry 边界
|
|
100
|
+
|
|
101
|
+
上一轮已实际完成 `webloom-framework@0.4.0` 的 registry integrity、Keymaster/Demo
|
|
102
|
+
lockfile 一致性、release-boundary 和 registry-only consumer 验证;该版本是本轮的已发布
|
|
103
|
+
基线。本轮发布 `webloom-framework@0.4.1`,发布后必须从 registry 读取真实 `dist.integrity`
|
|
104
|
+
并单独执行三仓 frozen-install 消费验证,不能用本地 tarball 或下游 lockfile 代替。
|
|
105
|
+
|
|
106
|
+
## 5. 尚未关闭的跨环境验收
|
|
107
|
+
|
|
108
|
+
- Firefox、真实 Safari、Playwright WebKit 的 module SharedWorker、双向 transfer 和 stream
|
|
109
|
+
组合尚未执行。
|
|
110
|
+
- Keymaster 的 app-view、Local/S3/CORS/CAS、重启/多 tab、恢复 ledger、不可逆 I/O 和部署
|
|
111
|
+
生产门禁没有本轮完整外部证据。
|
|
112
|
+
|
|
113
|
+
因此当前结论是:本轮四类 review 代码阻塞已完成修复,WebLoom/Demo 的本地与 Chromium
|
|
114
|
+
证据已补齐,0.4.1 的 registry 发布与三仓消费验证待本轮上传后补记;跨浏览器与 Keymaster
|
|
115
|
+
产品/部署验收仍保持明确的未验收状态。
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "webloom-framework",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.4.1",
|
|
4
4
|
"description": "通用前端插件生命周期框架",
|
|
5
5
|
"license": "AGPL-3.0-only",
|
|
6
6
|
"repository": {
|
|
@@ -32,6 +32,10 @@
|
|
|
32
32
|
"types": "./dist/react.d.ts",
|
|
33
33
|
"import": "./dist/react.js"
|
|
34
34
|
},
|
|
35
|
+
"./advanced": {
|
|
36
|
+
"types": "./dist/advanced.d.ts",
|
|
37
|
+
"import": "./dist/advanced.js"
|
|
38
|
+
},
|
|
35
39
|
"./testing": {
|
|
36
40
|
"types": "./dist/testing.d.ts",
|
|
37
41
|
"import": "./dist/testing.js"
|
|
@@ -42,9 +46,14 @@
|
|
|
42
46
|
"test": "vitest run",
|
|
43
47
|
"build": "tsup",
|
|
44
48
|
"lint:boundaries": "node scripts/check-boundaries.mjs",
|
|
49
|
+
"lint:v4": "node scripts/check-v4-boundary.mjs",
|
|
50
|
+
"test:types": "tsc -p tsconfig.json --noEmit && pnpm test:contract-inventory",
|
|
51
|
+
"test:contract-inventory": "node scripts/check-contract-inventory.mjs && node scripts/check-contract-inventory-self-test.mjs",
|
|
52
|
+
"test:contract-inventory:ci": "node scripts/check-contract-inventory-ci.mjs",
|
|
45
53
|
"test:browser:install": "playwright install chromium",
|
|
46
54
|
"test:browser": "pnpm run test:browser:install && node scripts/real-browser-runtime-smoke.mjs",
|
|
47
|
-
"
|
|
55
|
+
"test:ablation": "node scripts/check-v4-ablation.mjs",
|
|
56
|
+
"prepack": "pnpm test:types && pnpm test && pnpm build && pnpm lint:boundaries && pnpm lint:v4",
|
|
48
57
|
"pack": "npm pack",
|
|
49
58
|
"pack:consumer": "pnpm run prepack && node scripts/pack-consumer-smoke.mjs"
|
|
50
59
|
},
|