dsh-web-annotator 0.0.0-stage → 0.2.0-alpha.12
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 +125 -0
- package/CONTRIBUTING.md +90 -0
- package/LICENSE +21 -0
- package/README.md +110 -2
- package/README_en.md +136 -0
- package/THIRD_PARTY_NOTICES.md +15 -0
- package/cordis.patch.yml +15 -0
- package/docs/AGENTS.md +16 -0
- package/docs/README.md +25 -0
- package/docs/architecture.md +170 -0
- package/docs/browser-integration.md +94 -0
- package/docs/distribution.md +66 -0
- package/docs/harness-browser-annotation.patch +1909 -0
- package/docs/images/annotation-expanded-dark.png +0 -0
- package/docs/images/annotation-expanded.png +0 -0
- package/docs/images/annotation-image.png +0 -0
- package/docs/images/annotation-message.png +0 -0
- package/docs/images/annotation-region.png +0 -0
- package/docs/marketplace/cslkkl__dsh-web-annotator.yml +7 -0
- package/docs/publishing.md +169 -0
- package/docs/roadmap.md +31 -0
- package/docs/verification.md +179 -0
- package/dsh-plugin.naming.json +27 -0
- package/examples/responsive-demo/AGENTS.md +12 -0
- package/examples/responsive-demo/README.md +33 -0
- package/examples/responsive-demo/index.html +13 -0
- package/examples/responsive-demo/src/main.tsx +110 -0
- package/examples/responsive-demo/src/style.css +344 -0
- package/examples/responsive-demo/vite.config.ts +9 -0
- package/lib/THIRD_PARTY_LICENSES.md +345 -0
- package/lib/bridge.js +890 -0
- package/lib/bridge.js.map +7 -0
- package/lib/client.js +1083 -0
- package/lib/client.js.map +7 -0
- package/lib/host/THIRD_PARTY_NOTICES.md +15 -0
- package/lib/host/browser-provider/LICENSE +21 -0
- package/lib/host/browser-provider/README.md +130 -0
- package/lib/host/browser-provider/lib/client.css +217 -0
- package/lib/host/browser-provider/lib/client.css.map +7 -0
- package/lib/host/browser-provider/lib/client.js +2360 -0
- package/lib/host/browser-provider/lib/client.js.map +7 -0
- package/lib/host/browser-provider/lib/index.js +7 -0
- package/lib/host/browser-provider/lib/index.js.map +7 -0
- package/lib/host/browser-provider/package.json +23 -0
- package/lib/host/bundle.json +27 -0
- package/lib/host/chat-provider/LICENSE +21 -0
- package/lib/host/chat-provider/README.md +186 -0
- package/lib/host/chat-provider/lib/client.css +1604 -0
- package/lib/host/chat-provider/lib/client.css.map +7 -0
- package/lib/host/chat-provider/lib/client.js +11074 -0
- package/lib/host/chat-provider/lib/client.js.map +7 -0
- package/lib/host/chat-provider/lib/index.js +911 -0
- package/lib/host/chat-provider/lib/index.js.map +7 -0
- package/lib/host/chat-provider/package.json +31 -0
- package/lib/host/layout-provider/LICENSE +21 -0
- package/lib/host/layout-provider/README.md +109 -0
- package/lib/host/layout-provider/lib/client.css +177 -0
- package/lib/host/layout-provider/lib/client.css.map +7 -0
- package/lib/host/layout-provider/lib/client.js +565 -0
- package/lib/host/layout-provider/lib/client.js.map +7 -0
- package/lib/host/layout-provider/lib/index.js +7 -0
- package/lib/host/layout-provider/lib/index.js.map +7 -0
- package/lib/host/layout-provider/package.json +25 -0
- package/lib/index.d.ts +2 -0
- package/lib/index.js +9 -0
- package/lib/index.js.map +7 -0
- package/lib/vite.d.ts +8 -0
- package/lib/vite.js +1254 -0
- package/lib/vite.js.map +7 -0
- package/licenses/deepseek-harness-MIT.txt +21 -0
- package/locale/AGENTS.md +11 -0
- package/locale/README.md +11 -0
- package/locale/en.json +6 -0
- package/locale/zh.json +6 -0
- package/package.json +154 -4
- package/screenshots.json +7 -0
package/CHANGELOG.md
ADDED
|
@@ -0,0 +1,125 @@
|
|
|
1
|
+
# Changelog
|
|
2
|
+
|
|
3
|
+
## 0.2.0-alpha.12 — 发布链路接上 npm 的 OIDC
|
|
4
|
+
|
|
5
|
+
- 发布链路新增 npm 一路:推 `v*` 标签后,Release 建完再由 **Trusted Publishing(OIDC)**
|
|
6
|
+
把同一份产物发到 npm 的 `alpha` dist-tag,仓库里不存 token(`id-token: write` + `--provenance`)。
|
|
7
|
+
它排在建 Release **之后**:npm 那半失败时用户仍拿得到安装包,也排除了「npm 有、GitHub 没有」。
|
|
8
|
+
- 本版是这条路径的第一次真实运行,兼作 npm Trusted Publisher 连接的激活发布 ——
|
|
9
|
+
新建的连接**有 2 天激活期**,过期后连字段都不可改。
|
|
10
|
+
- 文档补上这轮踩到的三处,都写在 [发布链路](docs/publishing.md) 与 [AGENTS.md](AGENTS.md)
|
|
11
|
+
的「活跃坑」:本机 npm 指向镜像时登录/发布报 `Public registration is not allowed`;
|
|
12
|
+
Trusted Publisher 的 `Allowed actions` 默认**不含**直接发布(漏勾则 CI 全绿而 npm 上没有新版本);
|
|
13
|
+
发布成功后头几分钟 `npm install` 会因传播延迟报 `ETARGET`,那不是失败。
|
|
14
|
+
- 插件代码与宿主提供方**没有变化**,界面行为与 alpha.11 相同。
|
|
15
|
+
|
|
16
|
+
## 0.2.0-alpha.11 — 输入框入口不再显成“被选中”
|
|
17
|
+
|
|
18
|
+
- 输入框左侧的“批注网页”不再是一块恒有灰底的实心按钮。它原先借用了 `variant="toolbar"`
|
|
19
|
+
—— 那是给 **Browser 标签页工具栏**准备的实心样式,放在输入框这一排会显得像被选中/按下,
|
|
20
|
+
与旁边同样透明的“工作区内修改”不一致。现在改用 `ghost`:平时透明,悬停才显色。
|
|
21
|
+
- **Browser 工具栏里的同一个按钮保持实心不变**:那里与“刷新”同处一个工具栏表面,实心是对的。
|
|
22
|
+
两处从此各用各的变体,不再共用。
|
|
23
|
+
- 只动 Client 半端。宿主提供方、补丁与存储格式都没变,因此这一版不影响已有草稿。
|
|
24
|
+
|
|
25
|
+
## 0.2.0-alpha.10 — 聊天内批注呈现
|
|
26
|
+
|
|
27
|
+
- 本插件发出的批注消息不再平铺正文,改为默认显示“N 条注释”:展开后逐条给出序号、目标元素
|
|
28
|
+
(最近候选元素的标签与文本,缺候选时回落到“框选区域”/“页面位置”)和你的评论或提问。
|
|
29
|
+
定位资料仍是独立的折叠,默认收起。
|
|
30
|
+
- 图片模式与混合模式的附件在 Client 半端重画:在宿主截图之上叠加与附图序号一致的蓝底白字徽标,
|
|
31
|
+
并补齐所选范围的蓝框;拿不到 canvas 或重画失败时保留宿主截图,证据不因绘制失败而丢失。
|
|
32
|
+
- 新增 `annotation-thumbnail.ts`(目标标签、徽标锚点、重画)与 `tests/annotation-message.test.ts`。
|
|
33
|
+
序号只用于呈现:请求正文、`screenshotIndex` 与识别逻辑都不变,历史消息照旧折叠。
|
|
34
|
+
- **0.2.0-alpha.9 的改动一并随本版发布**:那一版打好了包却从未发布过 Release,
|
|
35
|
+
留着就会出现一个用户下不到的版本号。条目见下,不另发。
|
|
36
|
+
|
|
37
|
+
## 0.2.0-alpha.9 — 清理 0.1 遗留层,补齐门禁(未单独发布,内容并入 alpha.10)
|
|
38
|
+
|
|
39
|
+
- 删除 0.1 的布局扫描 / 保留区域整层:`src/bridge/`、`src/shared/`、`src/client/bridge-client.ts`、
|
|
40
|
+
`review-storage.ts`、`copy.ts`、`styles.ts`。`lib/bridge.js` 现在只包含开发页批注传输。
|
|
41
|
+
- 运行时名字统一为 `web-annotator`。**接入 Vite 的项目需要同步改名**:
|
|
42
|
+
桥接路由 `__web-annotator__/bridge.js`、源码提示属性 `data-web-annotator-source`、
|
|
43
|
+
内联配置全局 `__WEB_ANNOTATOR_CONFIG__`。函数名 `webAnnotator` 不变,旧 `layoutCare` 别名保留。
|
|
44
|
+
- 批注存储键改为 `dsh.web-annotator.browser-annotations.v1`。
|
|
45
|
+
旧的 `dsh.layout-care.browser-annotations.v1` 会读一次并自动迁移,新键提交成功后才删除旧值。
|
|
46
|
+
- 新增质量门禁:ESLint、依赖分层检查、文档路径检查,均随 `npm run check` 运行。
|
|
47
|
+
`.node-version` 固定 Node 24.15.0,CI 改为从该文件读取版本。
|
|
48
|
+
- 开发页传输层可注入拾取器,因此第一次有了覆盖来源白名单、通道生命周期与取消的单元测试。
|
|
49
|
+
- 修复 `DSH_HOST_CHECKOUT` 对局部类型检查不生效(CI 里会看不到 `.host-source`);
|
|
50
|
+
测试 home 改为落在仓库父目录,不再越级到上层目录;补丁校验的临时目录用后即删。
|
|
51
|
+
- 文档网络重建:根维护索引、架构说明、各子树 `AGENTS.md` + `README.md`、决策记录。
|
|
52
|
+
示例页面与贡献说明不再描述已删除的扫描流程。
|
|
53
|
+
|
|
54
|
+
## 0.2.0-alpha.8 — 草稿可靠性与操作修复
|
|
55
|
+
|
|
56
|
+
- 截图队列改用 IndexedDB,修复超过 localStorage 配额后刷新丢草稿的问题;自动迁移旧记录,显示保存失败提示。
|
|
57
|
+
- 修复属性框在中文输入法确认时误保存,以及目标被页面删除后展开确认按钮仍可点击的问题。
|
|
58
|
+
- 图片和定位资料混合发送保留可用截图,并准确标明附图序号;纯图片请求不再受未发送的 DOM 资料大小影响。
|
|
59
|
+
- 保存后的批注可以编辑,队列支持逐条勾选分批发送;满队列提前拦截,避免写完才发现无法保存。
|
|
60
|
+
- 新增大截图重载、存储失败恢复、编辑、中文输入法、窄窗口与混合附件的实际浏览器回归。
|
|
61
|
+
|
|
62
|
+
## 0.2.0-alpha.7 — 项目命名与单包安装
|
|
63
|
+
|
|
64
|
+
- 项目改名为 DSH Web Annotator(DSH 网页批注),包名改为 `dsh-web-annotator`。
|
|
65
|
+
- Vite 接入函数改为 `webAnnotator`,保留旧 `layoutCare` 别名;批注存储键与页面连接协议保持兼容。
|
|
66
|
+
- 这是首次开源前的命名调整。配套宿主扩展仍以精确 Harness 0.2.0-rc.2 为目标。
|
|
67
|
+
- Browser、Chat 与 Layout 扩展随主包预构建分发,通过官方插件管理只安装一个包;卸载 bundle 会恢复官方提供方。
|
|
68
|
+
- 增加宿主来源与许可证、打包完整性检查、市场截图声明及单包安装验收。
|
|
69
|
+
|
|
70
|
+
## 0.2.0-alpha.6 — 全屏浏览器遮挡修复
|
|
71
|
+
|
|
72
|
+
- 修复壁纸玻璃效果下,聊天首页或对话输入框浮到全屏网页上方的问题。
|
|
73
|
+
- 全屏期间隐藏并禁用后方主内容,保持布局与组件挂载;退出后恢复同一输入框及草稿。
|
|
74
|
+
- 配套增加 Layout 提供方,以及首页、已有对话、玻璃开关和网页输入的真实宿主验收。
|
|
75
|
+
|
|
76
|
+
## 0.2.0-alpha.5 — 草稿生命周期修复
|
|
77
|
+
|
|
78
|
+
- 批注编辑不再在两分钟后自动关闭,保留取消与导航清理,以及连接握手的超时检查。
|
|
79
|
+
- 增加超过两分钟仍可编辑、保存及取消的真实宿主验收。
|
|
80
|
+
- 实际 DSH Desktop 已验证 GitHub 页面的元素点选、属性卡片、原生截图与蓝框预览、三种发送选项;未调用真实模型。
|
|
81
|
+
|
|
82
|
+
## 0.2.0-alpha.4 — 属性卡片与图片发送
|
|
83
|
+
|
|
84
|
+
- 展开选项改为同一张属性卡片,包含颜色、字体、透明度等输入;修改要求随批注发送给 AI,取消不改写网页。
|
|
85
|
+
- 桌面 Browser 保存时捕获实际视口并标出所选位置;支持图片、定位资料和两者一起发送。有截图时默认发送图片。
|
|
86
|
+
- 通过正式会话图片附件流程提交;没有截图的旧记录保留并提示发送定位资料。
|
|
87
|
+
- 新增 Chat 用户正文扩展,详细批注默认仅显示用户文字,定位资料按需展开;已有格式匹配的批注消息也可折叠。
|
|
88
|
+
- 增加真实图片入库、详细消息重载、普通消息回退和属性校验验收。原生截图捕获与真实模型识图仍待验证。
|
|
89
|
+
|
|
90
|
+
## 0.2.0-alpha.3 — 简洁批注输入框
|
|
91
|
+
|
|
92
|
+
- 默认浮层改为单行胶囊:选项图标、无边框输入区、灰色圆形确认按钮。
|
|
93
|
+
- 评论/提问、元素路径和上下级选择收进选项面板;Esc 或点击外部关闭面板并保留文字。
|
|
94
|
+
- Shift+Enter 换行时输入区自动增高,空内容禁用确认。
|
|
95
|
+
|
|
96
|
+
## 0.2.0-alpha.2 — 工具栏入口位置
|
|
97
|
+
|
|
98
|
+
- “批注网页”直接显示在原有 Browser 工具栏中,紧挨“刷新”左侧。
|
|
99
|
+
- 工具栏按钮显示文字,进入批注后显示“退出批注”。
|
|
100
|
+
|
|
101
|
+
## 0.2.0-alpha.1 — Browser 内批注
|
|
102
|
+
|
|
103
|
+
- 主入口改为 Harness 原有 Browser 标签页的工具栏。
|
|
104
|
+
- 支持点击元素、点击空白位置与拖动框选实际矩形区域;就地输入评论或提问。
|
|
105
|
+
- 按住空格临时操作网页,松开恢复批注;输入框中的空格保持正常输入。
|
|
106
|
+
- 按会话和完整 URL 保留批注队列,发送前可预览;失败保留批注。
|
|
107
|
+
- 提问与评论分别表达意图,区域候选元素不会替代框选范围。
|
|
108
|
+
- 配套的 Browser 源码扩展针对 0.2.0-rc.2;未经此扩展的原版宿主不支持本功能。
|
|
109
|
+
- Web 已验证开发页面连接;Desktop 原生网页接入代码尚未在真实 DSH Desktop 中验证。
|
|
110
|
+
|
|
111
|
+
这是集成预览版,尚未公开发布。批注请求包含坐标与 DOM 资料,不附网页截图;真实模型修改源码仍未验收。
|
|
112
|
+
|
|
113
|
+
## 0.1.0 — 初始实现
|
|
114
|
+
|
|
115
|
+
- 本地开发网页的右侧预览与元素批注。
|
|
116
|
+
- 水平内容溢出、元素视口越界候选检测与 CSS 选择器排除。
|
|
117
|
+
- 记录保留区域,并比较文本、部分计算样式与几何位置。
|
|
118
|
+
- 将批注和引用证据通过当前 Harness 会话的正常请求流程发送。
|
|
119
|
+
- Vite 开发桥接、精确父页面来源验证、页面重载后重新握手。
|
|
120
|
+
- 同一父页面重新连接可更换 token;回复完整页面 URL,防止导航后混用旧页面资料。
|
|
121
|
+
- AST 添加 JSX 原生 DOM 节点源码提示,保留源码映射;可关闭提示。
|
|
122
|
+
- 手机卡片越界、正常横滚区域与保留页眉的演示页面。
|
|
123
|
+
- 逻辑、协议、实际 Vite 发布入口及生产排除测试。
|
|
124
|
+
|
|
125
|
+
目标宿主为 Harness 0.2.0-rc.2。此版本不提供截图采集、像素对比或自动源码修改。具体运行验证以对应验证记录为准。
|
package/CONTRIBUTING.md
ADDED
|
@@ -0,0 +1,90 @@
|
|
|
1
|
+
# 参与 DSH Web Annotator
|
|
2
|
+
|
|
3
|
+
欢迎用真实页面复现问题、改进批注交互、补充测试和完善说明。
|
|
4
|
+
|
|
5
|
+
主流程是 Harness 原有 Browser 内的点选 / 框选 / 评论 / 提问。
|
|
6
|
+
宿主接入方式与验证边界见 [Browser 集成说明](docs/browser-integration.md)。
|
|
7
|
+
|
|
8
|
+
## 开发环境
|
|
9
|
+
|
|
10
|
+
- Node.js **24.15.0**(见 [.node-version](.node-version)),npm。
|
|
11
|
+
- 提交 `package-lock.json` 的变化,不要混用其他包管理器锁文件。
|
|
12
|
+
- 目标 Harness 版本是 **0.2.0-rc.2**;升级该目标要同时检查客户端接口、包元数据与真实加载流程。
|
|
13
|
+
|
|
14
|
+
```sh
|
|
15
|
+
npm ci
|
|
16
|
+
npm run check
|
|
17
|
+
```
|
|
18
|
+
|
|
19
|
+
`npm run check` 串起格式、lint、分层、文档路径、构建、类型检查和测试。
|
|
20
|
+
测试消费构建后的 `lib/vite.js`,所以只跑 `npm test` 前也要先有最新构建(`npm run check` 已经包含)。
|
|
21
|
+
|
|
22
|
+
代码格式用锁定版本的 Prettier,改完跑 `npm run format`。
|
|
23
|
+
构建产物在 `lib/`,由 [scripts/build.mjs](scripts/build.mjs) 生成,不要直接编辑。
|
|
24
|
+
命令与门禁细节见 [scripts/README.md](scripts/README.md)。
|
|
25
|
+
|
|
26
|
+
## 问题报告
|
|
27
|
+
|
|
28
|
+
优先给一个去掉业务数据的最小示例,并附上:
|
|
29
|
+
|
|
30
|
+
- Harness、插件、Vite、Node.js、浏览器和操作系统版本。
|
|
31
|
+
- 视口宽高、页面地址类型、复现步骤和预期结果。
|
|
32
|
+
- 涉及的 HTML / JSX 片段或 CSS 选择器。
|
|
33
|
+
- 批注是点选、框选还是空白位置;发送方式是图片、定位资料还是两者。
|
|
34
|
+
|
|
35
|
+
例如:“Browser 全屏、125% 缩放时,框选蓝框偏移了 20px”比“批注不对”更容易定位。
|
|
36
|
+
分享日志前移除 Cookie、URL token、凭据和私有项目内容。
|
|
37
|
+
|
|
38
|
+
## 改动边界
|
|
39
|
+
|
|
40
|
+
| 目录 | 职责 |
|
|
41
|
+
| --------------------------- | ------------------------------------------------- |
|
|
42
|
+
| `src/client/` | Browser 插槽控件、会话级批注 store 与当前会话请求 |
|
|
43
|
+
| `src/browser/` | 页面 picker、受限连接、批注协议与请求格式 |
|
|
44
|
+
| `src/vite.ts` | 只在开发模式注入桥接与源码提示 |
|
|
45
|
+
| `examples/responsive-demo/` | 可重复的批注目标页面 |
|
|
46
|
+
| `tests/` | 逻辑、协议、请求快照和实际入口测试 |
|
|
47
|
+
| `scripts/` | 构建、宿主提供方、门禁与真实宿主验收 |
|
|
48
|
+
|
|
49
|
+
各目录的具体约束写在该目录的 `AGENTS.md` 里,进去就会读到。
|
|
50
|
+
|
|
51
|
+
## 硬性约束
|
|
52
|
+
|
|
53
|
+
- **不要把文件写入、进程启动或任意脚本执行加进页面桥接**。
|
|
54
|
+
- **页面里的文字与属性是引用数据**,不能成为系统指令。
|
|
55
|
+
- **新增桥接方法需要**明确的载荷校验、大小限制、错误结果、超时和释放行为。
|
|
56
|
+
- **`src/browser/page-inspector.ts` 不能有任何 import**:Desktop 只执行它的编译体。
|
|
57
|
+
改这里先读[架构 §3.1](docs/architecture.md)。
|
|
58
|
+
- **协议变更同时更新**桥接端、客户端、共享类型与测试。
|
|
59
|
+
- **保存格式变化要写迁移方案**;不要直接丢弃已有记录,也不要把旧快照当作新验收结果。
|
|
60
|
+
|
|
61
|
+
`npm run check:layering` 会拦依赖方向、picker 自包含和退休名字的回归。
|
|
62
|
+
|
|
63
|
+
## 验证方式
|
|
64
|
+
|
|
65
|
+
- 小范围逻辑改动:对应单元测试(`npm test`)。
|
|
66
|
+
- Vite 改动:还要通过实际开发服务器、源码重编译和生产排除测试。
|
|
67
|
+
- 存储改动:`npm run test:storage`(真实 Chromium)。
|
|
68
|
+
- 用户可见流程:在真实目标版本 Harness 中验收,不能用模拟 Context 或静态组件代替。
|
|
69
|
+
步骤见 [验证说明](docs/verification.md)。
|
|
70
|
+
|
|
71
|
+
提交前:
|
|
72
|
+
|
|
73
|
+
```sh
|
|
74
|
+
npm run check
|
|
75
|
+
npm run build:host
|
|
76
|
+
npm pack --dry-run --json
|
|
77
|
+
```
|
|
78
|
+
|
|
79
|
+
检查打包清单包含入口、声明、浏览器桥接、客户端 bundle、locale、patch 和许可证,
|
|
80
|
+
且不含 `node_modules` 或临时验证资料。用本地 `.tgz` 在隔离的测试 Profile 中验证,
|
|
81
|
+
不要改动日常 Profile。
|
|
82
|
+
|
|
83
|
+
## 提交说明
|
|
84
|
+
|
|
85
|
+
说明具体触发场景、改后的行为和运行过的验证。
|
|
86
|
+
修复误报时保留一条能区分正常设计与真实问题的回归案例。
|
|
87
|
+
用户可见变化更新 [CHANGELOG.md](CHANGELOG.md);契约、安装或行为边界变化时同步 README 与相关文档。
|
|
88
|
+
|
|
89
|
+
核心路线是在原有 Browser 中指出位置、添加评论或问题,并把截图或定位资料准确送到当前会话。
|
|
90
|
+
新功能先明确使用场景和成功标准,再决定是否进入首版。
|
package/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 DSH Web Annotator contributors
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
package/README.md
CHANGED
|
@@ -1,3 +1,111 @@
|
|
|
1
|
-
#
|
|
1
|
+
# DSH Web Annotator · 网页批注与提问
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
在 Harness 原有 Browser 标签页里,点击或框选网页,然后就地添加评论、向当前 Agent 提问。
|
|
4
|
+
|
|
5
|
+
[](https://github.com/cslkkl/dsh-web-annotator/actions/workflows/ci.yml)
|
|
6
|
+
[](LICENSE)
|
|
7
|
+
[](.node-version)
|
|
8
|
+
[](docs/browser-integration.md)
|
|
9
|
+
|
|
10
|
+
**简体中文** · [English](README_en.md)
|
|
11
|
+
|
|
12
|
+

|
|
13
|
+
|
|
14
|
+
## 它能做什么
|
|
15
|
+
|
|
16
|
+
- **就地批注**:点选元素、点击空白位置,或拖动框选矩形区域,在选区旁写评论或提问。
|
|
17
|
+
- **边看边改属性**:展开同一张属性卡片调整颜色、字体、间距,改动随批注交给 Agent,保存前不改写网页。
|
|
18
|
+
- **临时操作网页**:按住空格键与网页交互,松开回到批注;输入框里的空格照常打字。
|
|
19
|
+
- **带图或带定位资料发送**:截图会用蓝框或蓝圈标出所选位置,并叠加与附图一致的序号徽标;
|
|
20
|
+
没有截图时可只发坐标与 DOM 证据,也可两者一起发。
|
|
21
|
+
- **聊天里一眼看清**:本插件发出的批注消息只显示“N 条注释”,展开后逐条给出序号、目标元素与
|
|
22
|
+
你的评论/提问;完整定位资料仍在同一个折叠里。
|
|
23
|
+
- **多条管理**:保存后可编辑、逐条勾选、分批发送;失败保留,成功只移除本次发出去的。
|
|
24
|
+
- **草稿不丢**:按会话与完整 URL 存进 IndexedDB;发送失败或保存失败都不会清空内容。
|
|
25
|
+
|
|
26
|
+
**0.2.0-alpha 是预览版,精确支持 Harness 0.2.0-rc.2。**
|
|
27
|
+
一个预构建安装包同时包含插件和 Browser、Chat、Layout 扩展,安装后正常重启 Desktop 即可使用。
|
|
28
|
+
扩展尚未合入官方 Harness;npm 尚未发布,插件市场尚未收录。
|
|
29
|
+
每个版本的安装包与验证记录由[发布链路](.github/workflows/release.yml)在标签上构建并附到 Release。
|
|
30
|
+
|
|
31
|
+
## 安装
|
|
32
|
+
|
|
33
|
+
从 [预览 Release](https://github.com/cslkkl/dsh-web-annotator/releases) 下载最新 `dsh-web-annotator-*.tgz`,
|
|
34
|
+
在 DSH 插件管理页选择该本地包,或使用官方 CLI:
|
|
35
|
+
|
|
36
|
+
```sh
|
|
37
|
+
dsh plugin --profile desktop add --ignore-scripts /absolute/path/dsh-web-annotator-<版本>.tgz
|
|
38
|
+
```
|
|
39
|
+
|
|
40
|
+
只装这一个包,然后正常退出并重开 Desktop。使用其他 Profile 时替换 `desktop`。
|
|
41
|
+
包内已有运行产物,不需要用户编译或放行构建脚本。
|
|
42
|
+
|
|
43
|
+
该 bundle 在启用期间**替换官方 Browser、Chat 和 Layout 提供方**。
|
|
44
|
+
请先确认 Harness 内核是 **0.2.0-rc.2**,不要在其他版本或另一套同类提供方上混装。
|
|
45
|
+
卸载整个 bundle 会撤销这些替换,重启后恢复官方提供方。
|
|
46
|
+
|
|
47
|
+
旧本地预览用户先移除 `dsh-layout-care` 和 `dsh-layout-care-browser-preview` 再安装新包。
|
|
48
|
+
已有批注会自动迁移。详见 [安装和市场发布](docs/distribution.md)。
|
|
49
|
+
|
|
50
|
+
## 使用方式
|
|
51
|
+
|
|
52
|
+
1. 在当前会话点击“批注网页”,打开 Harness 原有的 Browser。
|
|
53
|
+
2. 输入网页地址,点击工具栏中“刷新”左边的“批注网页”。
|
|
54
|
+
3. 点击元素或空白位置,或者拖动鼠标框选区域,在选区旁输入内容。
|
|
55
|
+
4. 浮层默认只有选项图标、输入区和圆形 ✓。点左侧图标展开属性卡片,查看标签、颜色、字体等,
|
|
56
|
+
也可切换“评论/提问”和元素层级。点击 ✓ 或按 Enter 保存;Shift+Enter 换行并自动增高;
|
|
57
|
+
Esc 先收起卡片,再取消批注。
|
|
58
|
+
5. 需要操作网页时按住空格键,松开回到批注。
|
|
59
|
+
6. 保存后可编辑文字,勾选本次要发送的批注,再选择发送方式,预览后发送到当前会话。
|
|
60
|
+
|
|
61
|
+

|
|
62
|
+
|
|
63
|
+
图片通过 Harness 的正式图片附件流程发送。图片模式只发批注正文、网页 URL 和对应截图;
|
|
64
|
+
详细模式保留坐标与 DOM 证据,但聊天默认只显示“N 条注释”,点击展开逐条卡片(序号、目标元素、
|
|
65
|
+
评论或提问),再点“查看定位资料”展开完整请求;附件截图上的序号与卡片序号一致。
|
|
66
|
+
模型能否直接识别图片取决于当前模型的图片能力。
|
|
67
|
+
|
|
68
|
+
## 当前支持范围
|
|
69
|
+
|
|
70
|
+
| 能力 | 状态 |
|
|
71
|
+
| ---------------------------------------------- | ---------------------------------------- |
|
|
72
|
+
| 原有 Browser 工具栏与网页内批注浮层 | 已验证 |
|
|
73
|
+
| 元素点选、空白位置、矩形框选、空格临时操作 | 已验证 |
|
|
74
|
+
| 多条批注、预览、失败重试、会话请求与持久化日志 | 已验证(模型端用官方 replay) |
|
|
75
|
+
| 图片附件与详细资料折叠 | 已验证;Electron 截图边界用测试替代 |
|
|
76
|
+
| 聊天内“N 条注释”折叠与逐条卡片 | 已验证(附件序号徽标随图片模式验收) |
|
|
77
|
+
| Desktop 原生网页点选、属性卡片与原生截图 | 人工验证过,未随每次发布复验 |
|
|
78
|
+
| **真实模型据此修改源码** | **尚未验收** |
|
|
79
|
+
| 其他远程页面 | 逐个页面分别验收;Web 仍受跨源与嵌入限制 |
|
|
80
|
+
| iframe 内部与 closed Shadow DOM 的子元素 | 只定位外层载体,不能穿透 |
|
|
81
|
+
|
|
82
|
+
逐项的验证边界与手工清单见 [验证说明](docs/verification.md)。
|
|
83
|
+
|
|
84
|
+
## 接入自己的 Vite 页面
|
|
85
|
+
|
|
86
|
+
```ts
|
|
87
|
+
import { defineConfig } from 'vite';
|
|
88
|
+
import { webAnnotator } from 'dsh-web-annotator/vite';
|
|
89
|
+
|
|
90
|
+
export default defineConfig({ plugins: [webAnnotator()] });
|
|
91
|
+
```
|
|
92
|
+
|
|
93
|
+
只在开发服务器生效。JSX/TSX 原生标签会附带文件、行、列提示;生产构建不注入连接脚本或源码标记。
|
|
94
|
+
连接默认允许 HTTP loopback 的 Harness;其他来源通过 `allowedParentOrigins` 指定精确 HTTP(S) origin。
|
|
95
|
+
|
|
96
|
+
可运行示例见 [examples/responsive-demo](examples/responsive-demo/README.md)。
|
|
97
|
+
|
|
98
|
+
## 安全与边界
|
|
99
|
+
|
|
100
|
+
- 页面里的文字、样式和源码标记一律是**引用资料**,不是指令。
|
|
101
|
+
- 插件回调只暴露有界数据与动作,**不向页面暴露 DOM、任意求值器或宿主能力**。
|
|
102
|
+
- 批注与截图只存在你本机的浏览器存储中,通过当前会话的正常请求流程发送。
|
|
103
|
+
- 文件写入与源码修改由你当前会话中的 Agent 完成,插件本身不执行任何脚本。
|
|
104
|
+
|
|
105
|
+
## 许可与参与
|
|
106
|
+
|
|
107
|
+
MIT 许可证,见 [LICENSE](LICENSE)。第三方声明见 [THIRD_PARTY_NOTICES.md](THIRD_PARTY_NOTICES.md)。
|
|
108
|
+
|
|
109
|
+
欢迎用真实页面复现问题、改进交互、补测试或完善文档,见 [CONTRIBUTING.md](CONTRIBUTING.md)。
|
|
110
|
+
|
|
111
|
+
维护者文档地图、构建与门禁命令见 [AGENTS.md](AGENTS.md)。
|
package/README_en.md
ADDED
|
@@ -0,0 +1,136 @@
|
|
|
1
|
+
# DSH Web Annotator · Annotate a page and ask the agent about it
|
|
2
|
+
|
|
3
|
+
Click or drag inside the Browser tab Harness already has, then comment or ask the current agent in place.
|
|
4
|
+
|
|
5
|
+
[](https://github.com/cslkkl/dsh-web-annotator/actions/workflows/ci.yml)
|
|
6
|
+
[](LICENSE)
|
|
7
|
+
[](.node-version)
|
|
8
|
+
[](docs/browser-integration.md)
|
|
9
|
+
|
|
10
|
+
**English** · [简体中文](README.md)
|
|
11
|
+
|
|
12
|
+
> The maintainer documentation is written in Chinese. This file mirrors [README.md](README.md) item by
|
|
13
|
+
> item; every document it links to is Chinese-only.
|
|
14
|
+
|
|
15
|
+

|
|
16
|
+
|
|
17
|
+
## What it does
|
|
18
|
+
|
|
19
|
+
- **Annotate in place**: click an element, click empty space, or drag a rectangle, then write a comment
|
|
20
|
+
or a question next to the selection.
|
|
21
|
+
- **Change attributes while you look**: expand the same card to adjust colour, font and spacing. The
|
|
22
|
+
changes travel with the annotation to the agent and never rewrite the page before you save.
|
|
23
|
+
- **Operate the page temporarily**: hold Space to interact with the page and release it to return to
|
|
24
|
+
annotating; spaces typed into the editor stay spaces.
|
|
25
|
+
- **Send with an image or with location details**: the screenshot marks your selection with a blue frame
|
|
26
|
+
or circle and adds an index badge that matches the attachment; without a screenshot you can send the
|
|
27
|
+
coordinates and DOM evidence, or both together.
|
|
28
|
+
- **Readable in the chat**: an annotation message shows "N notes" instead of a wall of text. Expanding it
|
|
29
|
+
lists each note's index, target element and your comment or question; the full location details stay in
|
|
30
|
+
the same collapsible block.
|
|
31
|
+
- **Manage several notes**: edit a saved note, tick the ones to send, and send them in batches. A failed
|
|
32
|
+
send keeps the note; a successful one removes only what that send included.
|
|
33
|
+
- **Drafts survive**: notes are stored per session and full URL in IndexedDB. Neither a failed send nor a
|
|
34
|
+
failed save clears them.
|
|
35
|
+
|
|
36
|
+
**0.2.0-alpha is a preview and targets exactly Harness 0.2.0-rc.2.**
|
|
37
|
+
One prebuilt package ships the plugin together with the Browser, Chat and Layout extensions, so a normal
|
|
38
|
+
restart of Desktop is all it takes. The extensions are not part of the official Harness yet; nothing has
|
|
39
|
+
been published to npm and no plugin market lists it yet.
|
|
40
|
+
Each release's package and verification record are built by the
|
|
41
|
+
[release workflow](.github/workflows/release.yml) on the tag and attached to the Release.
|
|
42
|
+
|
|
43
|
+
## Install
|
|
44
|
+
|
|
45
|
+
Download the latest `dsh-web-annotator-*.tgz` from the
|
|
46
|
+
[preview releases](https://github.com/cslkkl/dsh-web-annotator/releases), pick it in the DSH plugin
|
|
47
|
+
manager, or use the official CLI:
|
|
48
|
+
|
|
49
|
+
```sh
|
|
50
|
+
dsh plugin --profile desktop add --ignore-scripts /absolute/path/dsh-web-annotator-<version>.tgz
|
|
51
|
+
```
|
|
52
|
+
|
|
53
|
+
Install this one package, then quit and reopen Desktop normally. Substitute your own profile name for
|
|
54
|
+
`desktop`. The package already contains its runtime artifacts, so nothing has to be compiled and no build
|
|
55
|
+
script has to be approved.
|
|
56
|
+
|
|
57
|
+
While the bundle is enabled it **replaces the official Browser, Chat and Layout providers**. Check first
|
|
58
|
+
that the Harness kernel is **0.2.0-rc.2**, and do not mix it with another plugin that provides the same
|
|
59
|
+
rows. Uninstalling the whole bundle undoes the replacement and a restart brings the official providers
|
|
60
|
+
back.
|
|
61
|
+
|
|
62
|
+
If you used an earlier local preview, remove `dsh-layout-care` and `dsh-layout-care-browser-preview`
|
|
63
|
+
first. Existing annotations migrate automatically. Details are in
|
|
64
|
+
[distribution](docs/distribution.md) (Chinese).
|
|
65
|
+
|
|
66
|
+
## Using it
|
|
67
|
+
|
|
68
|
+
1. In the current session click "批注网页" to open the Browser Harness already has.
|
|
69
|
+
2. Enter a page address, then click "批注网页" in the toolbar, to the left of the reload button.
|
|
70
|
+
3. Click an element or empty space, or drag to select a region, and type next to the selection.
|
|
71
|
+
4. The floating editor is a single line by default: an options icon, the input and a round ✓. The icon on
|
|
72
|
+
the left expands the attribute card with the tag, colour, font and so on, and switches between
|
|
73
|
+
comment/question and element level. Click ✓ or press Enter to save; Shift+Enter adds a line and grows
|
|
74
|
+
the box; Esc collapses the card first and cancels the annotation second.
|
|
75
|
+
5. Hold Space when you need to operate the page, and release it to return to annotating.
|
|
76
|
+
6. After saving you can edit the text, tick the notes to send, choose how to send them, preview, and send
|
|
77
|
+
them into the current session.
|
|
78
|
+
|
|
79
|
+

|
|
80
|
+
|
|
81
|
+
Images travel through Harness's own image-attachment flow. Image mode sends only the annotation text, the
|
|
82
|
+
page URL and the matching screenshot. Detailed mode keeps the coordinates and DOM evidence, but the chat
|
|
83
|
+
shows "N notes" by default; expanding it gives one card per note (index, target element, comment or
|
|
84
|
+
question), and "view location details" reveals the full request. The index on the screenshot is the same
|
|
85
|
+
index as on the card. Whether the model can read an image directly depends on that model's image support.
|
|
86
|
+
|
|
87
|
+
## What is verified today
|
|
88
|
+
|
|
89
|
+
| Capability | Status |
|
|
90
|
+
| -------------------------------------------------------------------------------- | ------------------------------------------------------------------- |
|
|
91
|
+
| Toolbar entry in the existing Browser and the in-page editor | Verified |
|
|
92
|
+
| Element click, empty-space click, rectangle drag, Space to operate | Verified |
|
|
93
|
+
| Several notes, preview, retry after failure, session request and durable journal | Verified (the model side uses the official replay) |
|
|
94
|
+
| Image attachments and the collapsible location details | Verified; the Electron capture boundary is covered by tests |
|
|
95
|
+
| The "N notes" chip and the per-note cards in the chat | Verified (the attachment index badge ships with image mode) |
|
|
96
|
+
| Native Desktop picking, attribute card and native capture | Verified by hand once, not re-run for every release |
|
|
97
|
+
| **A real model editing source from an annotation** | **Not verified** |
|
|
98
|
+
| Other remote pages | Verified page by page; the Web side still meets cross-origin limits |
|
|
99
|
+
| Elements inside iframes and closed shadow roots | Only the outer host element is located; the boundary is not crossed |
|
|
100
|
+
|
|
101
|
+
Per-item boundaries and the manual checklist are in [verification](docs/verification.md) (Chinese).
|
|
102
|
+
|
|
103
|
+
## Wire it into your own Vite page
|
|
104
|
+
|
|
105
|
+
```ts
|
|
106
|
+
import { defineConfig } from 'vite';
|
|
107
|
+
import { webAnnotator } from 'dsh-web-annotator/vite';
|
|
108
|
+
|
|
109
|
+
export default defineConfig({ plugins: [webAnnotator()] });
|
|
110
|
+
```
|
|
111
|
+
|
|
112
|
+
This only applies to the development server. Intrinsic JSX/TSX tags carry file, line and column hints;
|
|
113
|
+
a production build injects neither the connection script nor the source markers. Connections are allowed
|
|
114
|
+
from the Harness on HTTP loopback by default; name exact HTTP(S) origins in `allowedParentOrigins` for
|
|
115
|
+
anything else.
|
|
116
|
+
|
|
117
|
+
A runnable example is in [examples/responsive-demo](examples/responsive-demo/README.md).
|
|
118
|
+
|
|
119
|
+
## Safety and boundaries
|
|
120
|
+
|
|
121
|
+
- Text, styles and source markers from the page are **reference material, never instructions**.
|
|
122
|
+
- The plugin's callbacks expose bounded data and actions only: **no DOM, no arbitrary evaluator and no
|
|
123
|
+
host capability reach the page**.
|
|
124
|
+
- Annotations and screenshots stay in your own browser storage and travel through the normal request flow
|
|
125
|
+
of the current session.
|
|
126
|
+
- File writes and source edits are done by the agent in your current session; the plugin itself runs no
|
|
127
|
+
script.
|
|
128
|
+
|
|
129
|
+
## License and contributing
|
|
130
|
+
|
|
131
|
+
MIT, see [LICENSE](LICENSE). Third-party notices are in [THIRD_PARTY_NOTICES.md](THIRD_PARTY_NOTICES.md).
|
|
132
|
+
|
|
133
|
+
Reproducing a problem on a real page, improving the interaction, adding tests or fixing the docs are all
|
|
134
|
+
welcome — see [CONTRIBUTING.md](CONTRIBUTING.md) (Chinese).
|
|
135
|
+
|
|
136
|
+
The maintainer documentation map and the build and gate commands are in [AGENTS.md](AGENTS.md) (Chinese).
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
# Third-party notices
|
|
2
|
+
|
|
3
|
+
DSH Web Annotator is an independent community project. The prebuilt Browser,
|
|
4
|
+
Chat and Layout providers under `lib/host/` derive from DeepSeek Harness
|
|
5
|
+
0.2.0-rc.2, commit `639ed015397290b3745d163aafe02ffee4aa3f84`, licensed under MIT
|
|
6
|
+
by DeepSeek. The original notice is retained in
|
|
7
|
+
`licenses/deepseek-harness-MIT.txt` and each provider's `LICENSE`.
|
|
8
|
+
|
|
9
|
+
Changes are recorded in `docs/harness-browser-annotation.patch`. Package and
|
|
10
|
+
module identities from Harness are retained for integration; these modified
|
|
11
|
+
providers are not official Harness releases.
|
|
12
|
+
|
|
13
|
+
Complete license texts for other packages included in the JavaScript bundles
|
|
14
|
+
are collected from build source maps in `lib/THIRD_PARTY_LICENSES.md`.
|
|
15
|
+
Dependencies installed separately retain their own package licenses.
|
package/cordis.patch.yml
ADDED
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
- id: ui-sidebar-browser
|
|
2
|
+
disabled: true
|
|
3
|
+
- id: ui-chat
|
|
4
|
+
disabled: true
|
|
5
|
+
- id: ui-layout
|
|
6
|
+
disabled: true
|
|
7
|
+
- insert:
|
|
8
|
+
- id: cslkkl-web-annotator-browser
|
|
9
|
+
name: ./lib/host/browser-provider/lib/index.js
|
|
10
|
+
- id: cslkkl-web-annotator-chat
|
|
11
|
+
name: ./lib/host/chat-provider/lib/index.js
|
|
12
|
+
- id: cslkkl-web-annotator-layout
|
|
13
|
+
name: ./lib/host/layout-provider/lib/index.js
|
|
14
|
+
- id: cslkkl-web-annotator
|
|
15
|
+
name: dsh-web-annotator
|
package/docs/AGENTS.md
ADDED
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
# docs/ — 规则层
|
|
2
|
+
|
|
3
|
+
继承 [../AGENTS.md](../AGENTS.md)。
|
|
4
|
+
|
|
5
|
+
docs/ 特有约束:
|
|
6
|
+
|
|
7
|
+
- **只放辅助文档**:设计决策、宿主接入、验证记录、分发与优先级。
|
|
8
|
+
文件级清单归各子树 `README.md`,不写在这里。
|
|
9
|
+
- **写“为什么”,不写步骤手册**:`architecture.md` 是设计圣经;
|
|
10
|
+
操作步骤进 `browser-integration.md` 或 `verification.md`。
|
|
11
|
+
- **不抄会漂的值**:版本号、测试数量、产物哈希都指向自更新来源(`package.json`、
|
|
12
|
+
CI 记录、`integration/*.json`),不要写死在正文里。
|
|
13
|
+
- **`harness-browser-annotation.patch` 是生成物**:由宿主检出 `git diff HEAD` 生成,
|
|
14
|
+
不要手改。生成方式见 [browser-integration.md](browser-integration.md)。
|
|
15
|
+
- **相对链接必须可解析**:`npm run check:doc-paths` 会拦;改文件名时同批改引用。
|
|
16
|
+
- 有什么文档、改哪见 [README.md](README.md)。
|
package/docs/README.md
ADDED
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
# docs/ — 辅助文档索引
|
|
2
|
+
|
|
3
|
+
- 约束与写作偏好 → 见 [AGENTS.md](AGENTS.md)。
|
|
4
|
+
|
|
5
|
+
| 文档 | 回答什么 | 改它的时机 |
|
|
6
|
+
| ------------------------------------------------ | -------------------------------------------------- | ---------------------------- |
|
|
7
|
+
| [architecture.md](architecture.md) | 不变的设计决策、契约、失败模式、分层与编号防错清单 | 契约、边界或门禁变化时 |
|
|
8
|
+
| [browser-integration.md](browser-integration.md) | 宿主补丁是什么、怎么应用、怎么构建与打包 | 补丁、提供方或打包流程变化时 |
|
|
9
|
+
| [verification.md](verification.md) | 验到了什么程度、哪些**没有**验证 | 每次真实验收之后 |
|
|
10
|
+
| [distribution.md](distribution.md) | 安装方式、各市场收录规则、发布顺序 | 分发渠道或版本状态变化时 |
|
|
11
|
+
| [publishing.md](publishing.md) | CI 跑什么、门禁怎么分工、`.github/` 的规矩 | workflow 或门禁串联变化时 |
|
|
12
|
+
| [roadmap.md](roadmap.md) | 维护优先级与未立项方向 | 优先级变化时 |
|
|
13
|
+
| [images/](images/) | 文档截图 | 界面变化时同时更新 |
|
|
14
|
+
| [marketplace/](marketplace/) | 向社区目录提交的条目 | 提交或更新市场条目时 |
|
|
15
|
+
|
|
16
|
+
## 生成物
|
|
17
|
+
|
|
18
|
+
[harness-browser-annotation.patch](harness-browser-annotation.patch) 由宿主检出生成,不是手写文档:
|
|
19
|
+
|
|
20
|
+
```powershell
|
|
21
|
+
git -C ../harness-browser-integration diff HEAD --output docs/harness-browser-annotation.patch
|
|
22
|
+
```
|
|
23
|
+
|
|
24
|
+
生成后必须跑 `npm run verify:browser-patch` 确认它仍能应用到精确基线。
|
|
25
|
+
生成产物不得入库到别处;`prepack` 会用它的哈希拦住不一致的包。
|