yunti-browser-runtime 0.1.3 → 0.2.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 +41 -9
- package/bin/yunti-browser-runtime.js +6 -0
- package/docs/ACTION_RESULT_COVERAGE.md +41 -0
- package/docs/AGENT_WORKFLOW_CONTRACT.md +108 -0
- package/docs/EXECUTION_PLAN.md +1433 -5
- package/docs/EXTENSION_DISTRIBUTION.md +146 -0
- package/docs/EXTENSION_PERMISSION_STRATEGY.md +167 -0
- package/docs/EXTENSION_STORE_COPY.md +213 -0
- package/docs/INSTALL.md +13 -7
- package/docs/NEXT_MAJOR_PLAN.md +808 -0
- package/docs/PROJECT_STATUS.md +1037 -7
- package/docs/PUBLISHING_BLOCKERS.md +1 -1
- package/docs/RELEASE.md +6 -2
- package/docs/RELEASE_0_2_0_CHECKLIST.md +827 -0
- package/docs/ROADMAP.md +44 -0
- package/docs/SECURITY.md +34 -0
- package/docs/TOOL_GUIDE.md +290 -5
- package/extension/background.js +20 -0
- package/extension/cdp.js +4 -0
- package/extension/content.js +167 -16
- package/extension/dom-observer.js +588 -0
- package/extension/manifest.json +3 -2
- package/extension/popup.js +2 -2
- package/extension/session-manager.js +106 -4
- package/extension/tool-handlers.js +1090 -156
- package/mcp/bridge-hub.js +257 -3
- package/mcp/http-server.js +213 -0
- package/mcp/memory.js +5 -5
- package/mcp/redaction.js +52 -3
- package/mcp/server.js +2 -0
- package/mcp/tools.js +421 -38
- package/package.json +4 -2
- package/scripts/check-action-result-coverage.js +145 -0
- package/scripts/doctor.js +6 -1
- package/scripts/package-extension.js +1 -0
- package/scripts/release-check.js +3 -0
- package/skills/yunti-browser-runtime/SKILL.md +128 -3
package/docs/EXECUTION_PLAN.md
CHANGED
|
@@ -58,6 +58,267 @@
|
|
|
58
58
|
| P5.1 | 已完成 | 本地默认免 bridge token |
|
|
59
59
|
| P5.2 | 已完成 | 扩展 popup 与安装引导简化 |
|
|
60
60
|
| P5.3 | 已完成 | 扩展首屏零配置 |
|
|
61
|
+
| P6.0 | 已完成 | 0.2.0 产品方向护栏 |
|
|
62
|
+
| P6.1.1 | 已完成 | `yunti_observe_page` schema、tool hints、bridge routing |
|
|
63
|
+
| P6.1.2 | 已完成 | content-script DOM observer、文本树、字段状态、scroll 元数据、最小脱敏 |
|
|
64
|
+
| P6.1.3 | 已完成 | fresh observe uid 兼容现有 click/hover/fill action |
|
|
65
|
+
| P6.1.4 | 已完成 | 真实浏览器 `observe -> click uid -> observe/verify` 闭环 |
|
|
66
|
+
| P6.2.1 | 已完成 | action result 兼容契约与主要 action 主路径结构化字段 |
|
|
67
|
+
| P6.2.2 | 已完成 | `yunti_select` uid/selector/value/text 语义与失败诊断 |
|
|
68
|
+
| P6.2.3 | 已完成 | `yunti_fill` / `yunti_fill_form` 字段状态、contenteditable、值保持诊断 |
|
|
69
|
+
| P6.2.4 | 已完成 | `yunti_scroll` uid/coordinate/no-movement/partial/fallback 诊断 |
|
|
70
|
+
| P6.2.5 | 已完成 | 异步 UI 的 `wait -> observe -> fresh uid` 恢复指导 |
|
|
71
|
+
| P6.2.6 | 已完成 | `yunti_wait_for` 自身结构化 action result 与恢复语义 |
|
|
72
|
+
| P6.2.7 | 已完成 | 结构化 action result 覆盖审计与真实浏览器闭环补验准备 |
|
|
73
|
+
| P6.3.1 | 已完成 | Agent 默认工作流契约与可复制提示词 |
|
|
74
|
+
| P6.3.2 | 已完成 | Tool Guide 最小用例:点击、填表、滚动找元素、切 tab、等待异步结果 |
|
|
75
|
+
| P6.4.1 | 已完成 | DOM 脱敏策略深化,与 network/console redaction 对齐 |
|
|
76
|
+
| P6.4.2 | 已完成 | learning memory / diagnostic artifacts 的 secret 边界收敛 |
|
|
77
|
+
| P6.4.3 | 已完成 | raw CDP / screenshot 非默认脱敏诊断的提示与清理边界 |
|
|
78
|
+
| P6.5.1 | 已完成 | 可选本地运行时控制台最小闭环 |
|
|
79
|
+
| P6.5.2 | 已完成 | 控制台诊断增强第一刀 |
|
|
80
|
+
| P6.5.3 | 已完成 | 控制台真实浏览器验收与 UX 收口 |
|
|
81
|
+
| P6.6.1 | 已完成 | 浏览器扩展分发准备 |
|
|
82
|
+
| P6.6.2 | 已完成 | 商店权限与隐私文案草案 |
|
|
83
|
+
| P6.6.3 | 已完成 | 商店前权限策略决策 |
|
|
84
|
+
| P6.6.4 | 后置 | Store candidate 权限 UX 设计 |
|
|
85
|
+
| P7.1 | 已完成 | 0.2.0 npm/unpacked 发布收口 |
|
|
86
|
+
|
|
87
|
+
当前 0.2.0 推进快照(2026-07-05):
|
|
88
|
+
|
|
89
|
+
- P6.2 最新完成切片:
|
|
90
|
+
- action result 主路径覆盖;
|
|
91
|
+
- `yunti_select` selector/value、uid/value、uid/text;
|
|
92
|
+
- select uid/selector 失败诊断与 disabled option 诊断;
|
|
93
|
+
- contenteditable fill;
|
|
94
|
+
- selector/uid fill 失败诊断与 `yunti_fill_form` 聚合诊断;
|
|
95
|
+
- uid scroll、scroll no-movement、directional `edgeHint`、结构化 `recoveryHint`、
|
|
96
|
+
机器可读 `decision` 和可执行 `suggestedRetry`;
|
|
97
|
+
- scroll partial movement 的 `partialMovement` 观察前置诊断;
|
|
98
|
+
- uid scroll 缺失/过期/不可解析目标的结构化恢复诊断;
|
|
99
|
+
- coordinate scroll 命中元素、滚动容器、document fallback 诊断和恢复提示;
|
|
100
|
+
- fill/select/scroll 异步 UI 的 `wait -> observe -> fresh uid` 恢复指导;
|
|
101
|
+
- uid/selector fill 不可编辑、隐藏、disabled、readonly 目标诊断;
|
|
102
|
+
- uid fill 填后值保持验证与 `VALUE_NOT_APPLIED` 长度级诊断;
|
|
103
|
+
- `yunti_observe_page` 字段状态、select 当前选中项与 `options[]` 提示。
|
|
104
|
+
- P6.1:`yunti_observe_page` schema、tool hints、bridge routing、content-script observer
|
|
105
|
+
和 deterministic fixtures 已落地;真实浏览器 `observe -> click uid -> observe/verify`
|
|
106
|
+
闭环已在本机 `pytest-playwright` 环境下用临时 Node Playwright 1.58.0 补验通过。
|
|
107
|
+
- P6.2:结构化 action result 正在按兼容优先的小切片推进;已覆盖主要单动作路径:uid click/hover/fill
|
|
108
|
+
keyboard/fill select、coordinate click/hover、selector hover/click/fill passthrough 和
|
|
109
|
+
scroll passthrough、type_text uid/selector fallback、press_key uid/selector fallback、
|
|
110
|
+
upload uid/selector path、coordinate drag、standalone `yunti_select` content-script
|
|
111
|
+
passthrough、aggregate `yunti_fill_form` summary;`yunti_select` 也已补齐 selector/value、
|
|
112
|
+
uid/value、uid/text 三条路径,并开始返回 uid 与 selector option miss / non-select target
|
|
113
|
+
的结构化失败诊断;更深语义已推进到 contenteditable fill、selector/uid fill 失败诊断、fresh
|
|
114
|
+
observed scroll container uid、scroll no-movement、directional `edgeHint`、结构化
|
|
115
|
+
`recoveryHint`、机器可读 `decision` 和可执行 `suggestedRetry` 诊断。
|
|
116
|
+
- P6.2 第一轮 action result 覆盖、select uid/text、contenteditable fill 和 scroll
|
|
117
|
+
recovery diagnostics 已补齐;selector/uid fill 失败诊断和 `yunti_fill_form` 聚合诊断也已落地。
|
|
118
|
+
uid/selector fill 的不可编辑、隐藏、disabled/readonly 目标诊断也已补齐:失败时返回
|
|
119
|
+
`filled: false`、`ok: false`、`code: "TARGET_NOT_EDITABLE"`、`recoveryHint` 和
|
|
120
|
+
`nextStepHint`,并保留所有既有成功路径、兼容字段与 CDP fallback。下一步继续进入更深的
|
|
121
|
+
select/fill/scroll 语义增强与真实浏览器闭环补验。`yunti_observe_page` 也开始为字段类元素
|
|
122
|
+
暴露 `editable`、`fillable`、`readOnly`、`fillBlockReason`、select 当前选中项摘要和
|
|
123
|
+
`options[]` 摘要,让 agent 在填表或选择前先判断字段状态。
|
|
124
|
+
- P6.2 uid fill 的填后验证已补齐:keyboard/contenteditable 路径会在派发输入后尽量读取
|
|
125
|
+
目标字段的长度级状态;如果页面框架、mask 或受控状态导致值没有保持,返回
|
|
126
|
+
`filled: false`、`ok: false`、`code: "VALUE_NOT_APPLIED"`、`expectedValueLength`、
|
|
127
|
+
`actualValueLength`、`recoveryHint.decision: "inspect-controlled-or-masked-field-before-retry"`
|
|
128
|
+
和 `nextStepHint`。该诊断不回传实际字段内容,只回传长度摘要;既有成功路径和兼容字段保持不变。
|
|
129
|
+
- P6.2 scroll partial movement 诊断已补齐:当 `before` / `after` 可比较且 scroll
|
|
130
|
+
实际移动距离小于请求 `deltaX` / `deltaY` 时,结果保持 `ok: true`,并新增
|
|
131
|
+
`partialMovement`,包含 requested/actual delta、affected axes、`edgeHint`、
|
|
132
|
+
`decision: "observe-before-continuing-scroll"` 和 `nextAction: "observe-again"`。
|
|
133
|
+
该诊断用于提示 agent 先重新 observe 和比较滚动位置,再决定是否继续滚同一容器。
|
|
134
|
+
- P6.2 uid scroll 失败诊断已补齐:当 uid 缺失、过期、隐藏或无法解析坐标时,
|
|
135
|
+
`yunti_scroll` 返回 `scrolled: false`、`ok: false`、`recoverable: true`、
|
|
136
|
+
`code: "UID_NOT_FOUND"` 或 `code: "UID_COORDINATES_UNAVAILABLE"`、`recoveryHint` 和
|
|
137
|
+
`nextStepHint`,提示重新 observe 并从 `scrollableContainers[]` 选择 fresh uid,或使用
|
|
138
|
+
document/coordinate fallback;既有成功 scroll、no-movement 和 partialMovement 路径保持兼容。
|
|
139
|
+
- P6.2 coordinate scroll 命中/回退诊断已补齐:当传入 `x` / `y` 时,content script 会返回
|
|
140
|
+
`coordinateTarget`、`scrollContainerFound` 和必要时的
|
|
141
|
+
`coordinateScrollFallback: "document"`,让 agent 区分坐标是否真正命中嵌套滚动容器,
|
|
142
|
+
还是回退到 document 滚动。该切片只新增诊断字段,不改变既有 coordinate/document/uid
|
|
143
|
+
scroll 行为。
|
|
144
|
+
- P6.2 coordinate scroll document fallback 恢复提示已补齐:当 handler 收到
|
|
145
|
+
`coordinateScrollFallback: "document"` 时,成功结果保持 `ok: true` /
|
|
146
|
+
`recoverable: false`,并新增 `coordinateFallbackHint` 与更明确的 `nextStepHint`,
|
|
147
|
+
指向 `yunti_observe_page` 和 fresh `scrollableContainers[]` uid,避免 agent 误以为
|
|
148
|
+
nested panel 已经被滚动。
|
|
149
|
+
- P6.2 wait-observe 恢复指导已补齐:`yunti_get_tool_usage_hints`、Tool Guide 和 skill
|
|
150
|
+
现在明确要求异步渲染、校验、option 加载或新内容加载时,先用 `yunti_wait_for`
|
|
151
|
+
等待预期 text/selector/state,再调用 `yunti_observe_page`,最后用 fresh uid 继续
|
|
152
|
+
fill/select/scroll,而不是复用旧 uid 或盲目重复同一动作。
|
|
153
|
+
- P6.2.6 已完成:`yunti_wait_for` 自身现在补齐结构化返回字段,保留既有
|
|
154
|
+
`found`、`text`、`selector`、`condition`、`value`、`waitedMs` 等兼容字段,同时新增
|
|
155
|
+
`action: "wait_for"`、`target`、`ok`、`recoverable`、`nextStepHint`;超时返回
|
|
156
|
+
`code: "WAIT_TIMEOUT"` 和 `recoveryHint`,让等待工具也能自然接入
|
|
157
|
+
`wait -> observe -> fresh uid` 恢复闭环。
|
|
158
|
+
- P6.2.6 最新验证:`git diff --check` 通过;token 残留检查无输出;
|
|
159
|
+
`node --test tests/tool-handlers.test.js` 通过 42 个用例;
|
|
160
|
+
`node --test tests/bridge.test.js` 通过 66 个用例;`YUNTI_E2E=1 npm run test:e2e`
|
|
161
|
+
因当前环境缺少 Playwright/Chromium 跳过;`npm run release:check` 通过,覆盖
|
|
162
|
+
116 个 node:test 用例,其中 115 个通过、1 个真实浏览器 smoke 默认跳过,并完成 npm
|
|
163
|
+
package 与 extension zip 内容检查。
|
|
164
|
+
- P6.2.7 目标:重新审计结构化 action result 覆盖面,确认
|
|
165
|
+
wait/click/hover/fill/select/scroll/type/press/upload/drag/fill_form 的成功和主要失败路径
|
|
166
|
+
都有可读的 `ok` / `code` / `recoverable` / `nextStepHint`,并整理真实浏览器闭环补验入口。
|
|
167
|
+
- P6.2.7 已完成:新增 `docs/ACTION_RESULT_COVERAGE.md` 作为结构化 action result 覆盖矩阵,
|
|
168
|
+
覆盖 click、hover、fill、select、fill_form、wait_for、scroll、type_text、press_key、
|
|
169
|
+
upload_file、drag 共 11 个 action surfaces;新增 `npm run check:action-results` 和
|
|
170
|
+
`scripts/check-action-result-coverage.js`,并接入 `npm run release:check`,避免后续
|
|
171
|
+
上下文压缩或代码变更后忘记维护覆盖状态。
|
|
172
|
+
- P6.2.7 最新验证:`npm run check:action-results` 通过,识别 11 行覆盖矩阵;
|
|
173
|
+
`npm run check` 通过;`git diff --check` 通过;token 残留检查无输出;
|
|
174
|
+
`YUNTI_E2E=1 npm run test:e2e` 因当前环境缺少 Playwright/Chromium 跳过;
|
|
175
|
+
`npm run release:check` 通过,覆盖 116 个 node:test 用例,其中 115 个通过、1 个
|
|
176
|
+
真实浏览器 smoke 默认跳过,并完成 npm package 内容检查 44 个文件和 extension zip
|
|
177
|
+
内容检查 13 个文件。
|
|
178
|
+
- 下一步推进顺序:如果当前环境补齐 Playwright/Chromium,先关闭 P6.1.4 真实浏览器
|
|
179
|
+
`observe -> click uid -> observe/verify` 闭环;如果环境仍不可用,则进入 P6.3.1,
|
|
180
|
+
把 agent 默认工作流契约和可复制提示词沉淀成文档、Tool Guide 和 skill 引导。
|
|
181
|
+
- P6.3.1 已完成:新增 `docs/AGENT_WORKFLOW_CONTRACT.md`,沉淀默认
|
|
182
|
+
`hints -> list targets -> observe -> act by fresh uid -> wait if needed -> observe -> verify`
|
|
183
|
+
操作循环、恢复规则、危险操作确认边界和可复制提示词;`yunti_get_tool_usage_hints`
|
|
184
|
+
新增 `workflow` topic、`defaultPageOperation`、`confirmationBoundary` 和
|
|
185
|
+
`copyableAgentPrompt`;`docs/TOOL_GUIDE.md` 和 packaged skill 已同步默认页面操作契约。
|
|
186
|
+
- P6.3.1 最新验证:`node --test tests/bridge.test.js` 通过 67 个用例;`git diff --check`
|
|
187
|
+
通过;token 残留检查无输出;`YUNTI_E2E=1 npm run test:e2e` 因当前环境缺少
|
|
188
|
+
Playwright/Chromium 跳过;`npm run release:check` 通过,覆盖 117 个 node:test 用例,
|
|
189
|
+
其中 116 个通过、1 个真实浏览器 smoke 默认跳过,并完成 npm package 内容检查 45 个文件和
|
|
190
|
+
extension zip 内容检查 13 个文件。
|
|
191
|
+
- 下一步固定为 P6.3.2:在 Tool Guide 和 skill 中补齐最小用例,包括点击、填表、
|
|
192
|
+
滚动找元素、切 tab、等待异步结果,并确保这些用例复用 P6.3.1 默认循环和 P6.2
|
|
193
|
+
结构化结果读取规则。
|
|
194
|
+
- P6.3.2 已完成:`docs/TOOL_GUIDE.md` 和 packaged skill 已补齐五个最小用例:
|
|
195
|
+
Click、Fill Form、Scroll To Find、Switch Tab、Wait For Async Result;
|
|
196
|
+
`yunti_get_tool_usage_hints` 的 `workflow` topic 现在返回 `minimalUseCases`,
|
|
197
|
+
包含 `clickByUid`、`fillForm`、`scrollToFind`、`switchTab` 和
|
|
198
|
+
`waitForAsyncResult`,并由 `tests/bridge.test.js` 锁住关键规则。
|
|
199
|
+
- P6.3.2 最新验证:`node --test tests/bridge.test.js` 通过 68 个用例;`git diff --check`
|
|
200
|
+
通过;token 残留检查无输出;`YUNTI_E2E=1 npm run test:e2e` 因当前环境缺少
|
|
201
|
+
Playwright/Chromium 跳过;`npm run release:check` 通过,覆盖 118 个 node:test 用例,
|
|
202
|
+
其中 117 个通过、1 个真实浏览器 smoke 默认跳过,并完成 npm package 内容检查 45 个文件和
|
|
203
|
+
extension zip 内容检查 13 个文件。
|
|
204
|
+
- P6.4.1 已完成:`extension/dom-observer.js` 的 strict redaction 现在覆盖
|
|
205
|
+
page title、label、name、visible text、placeholder、value preview、select
|
|
206
|
+
selected value/text、options value/text、scrollable container name,以及 email、
|
|
207
|
+
phone、Luhn-valid payment-card-like 和 address-like 文本;balanced 保持 credential-like
|
|
208
|
+
默认保护,`off` 仍仅用于显式本地调试。
|
|
209
|
+
- P6.4.1 最新验证:`node --check extension/dom-observer.js` 通过;
|
|
210
|
+
`node --test tests/dom-observer.test.js` 通过 6 个 DOM observer 用例;
|
|
211
|
+
`node --test tests/bridge.test.js` 通过 68 个用例;`git diff --check` 通过;
|
|
212
|
+
token 残留检查无输出;`YUNTI_E2E=1 npm run test:e2e` 因当前环境缺少
|
|
213
|
+
Playwright/Chromium 跳过;`npm run release:check` 通过,覆盖 119 个 node:test
|
|
214
|
+
用例,其中 118 个通过、1 个真实浏览器 smoke 默认跳过,并完成 npm package 内容检查
|
|
215
|
+
45 个文件和 extension zip 内容检查 13 个文件。
|
|
216
|
+
- P6.4.2 已完成:`mcp/redaction.js` 的共享文本脱敏覆盖 Bearer、JWT、private key、
|
|
217
|
+
长 token-like、email、phone、Luhn-valid payment-card-like 和 address-like 内容;
|
|
218
|
+
learning memory 的 title/detail/tags/source 写盘前统一脱敏;console diagnostics 的
|
|
219
|
+
text/stack/args 缓存前统一脱敏;raw CDP events 保持明确的低层原始诊断例外,并要求调试后清理。
|
|
220
|
+
- P6.4.2 最新验证:`node --check mcp/redaction.js`、`node --check mcp/memory.js` 和
|
|
221
|
+
`node --check mcp/bridge-hub.js` 通过;`node --test tests/bridge.test.js` 通过 70 个用例;
|
|
222
|
+
`git diff --check` 通过;token 残留检查无输出;`npm run check` 通过;`npm test`
|
|
223
|
+
通过,覆盖 121 个 node:test 用例,其中 120 个通过、1 个真实浏览器 smoke 默认跳过;
|
|
224
|
+
`YUNTI_E2E=1 npm run test:e2e` 因当前环境缺少 Playwright/Chromium 跳过;
|
|
225
|
+
`npm run release:check` 通过,并完成 npm package 内容检查 45 个文件和 extension zip
|
|
226
|
+
内容检查 13 个文件。
|
|
227
|
+
- P6.4.3 已完成:`yunti_get_tool_usage_hints` 新增 raw CDP 和 screenshot 专项 guidance;
|
|
228
|
+
`yunti_get_cdp_events` 明确 raw payload、不默认脱敏、优先 sanitized diagnostics、按
|
|
229
|
+
`method` / `limit` 缩小范围,并在调试后用 `yunti_clear_cdp_events` 清理;`yunti_take_screenshot`
|
|
230
|
+
和 `yunti_capture_visible_tab` 明确截图是真实像素、不继承 DOM redaction,优先 viewport
|
|
231
|
+
和安全摘要,不把 raw image data 写入 learning memory。
|
|
232
|
+
- P6.4.3 最新验证:`node --check mcp/tools.js` 通过;`node --test tests/bridge.test.js`
|
|
233
|
+
通过 71 个用例,新增 raw CDP / screenshot safety boundary usage hints 覆盖;
|
|
234
|
+
`git diff --check` 通过;token 残留检查无输出;`npm run check` 通过;`npm test`
|
|
235
|
+
通过,覆盖 122 个 node:test 用例,其中 121 个通过、1 个真实浏览器 smoke 默认跳过;
|
|
236
|
+
`YUNTI_E2E=1 npm run test:e2e` 因当前环境缺少 Playwright/Chromium 跳过;
|
|
237
|
+
`npm run release:check` 通过,并完成 npm package 内容检查 45 个文件和 extension zip
|
|
238
|
+
内容检查 13 个文件。
|
|
239
|
+
- P6.1.4 最新验证:使用 `/opt/miniconda3/envs/pytest-playwright` 中已有的 Playwright
|
|
240
|
+
浏览器缓存,临时执行
|
|
241
|
+
`PLAYWRIGHT_SKIP_BROWSER_DOWNLOAD=1 npm install --no-save --package-lock=false playwright@1.58.0`
|
|
242
|
+
补齐 Node E2E 依赖;随后 `YUNTI_E2E=1 npm run test:e2e` 通过真实浏览器扩展
|
|
243
|
+
bridge smoke,覆盖 `observe -> click uid -> verify` 闭环。完整门禁也已通过:
|
|
244
|
+
`git diff --check`、token 残留检查、`npm run check`、`npm test`、
|
|
245
|
+
`YUNTI_E2E=1 npm run test:e2e` 和 `npm run release:check`。
|
|
246
|
+
- P6.5.1 已完成:bridge 内置可选本地控制台 `/console` 和脱敏状态接口
|
|
247
|
+
`/console/state`;CLI 新增 `yunti-browser-runtime console`;控制台展示连接页面、
|
|
248
|
+
pending/queued runtime 请求、最近工具 activity、network/console/CDP 诊断数量,并提供
|
|
249
|
+
`cancel pending` 操作清理 runtime 仍在等待或排队的请求。控制台保持非必选,不改变 MCP
|
|
250
|
+
工具路径、扩展 popup 零配置路径或首跑安装路径。
|
|
251
|
+
- P6.5.1 最新验证:`git diff --check` 通过;token 残留检查无输出;`npm run check`
|
|
252
|
+
通过;`npm test` 通过,覆盖 125 个 node:test 用例,其中 124 个通过、1 个真实浏览器
|
|
253
|
+
smoke 默认跳过;`YUNTI_E2E=1 npm run test:e2e` 通过 1 个真实浏览器 smoke;`npm run
|
|
254
|
+
release:check` 通过,并完成 npm package 内容检查 45 个文件和 extension zip 内容检查 13
|
|
255
|
+
个文件。
|
|
256
|
+
- P6.5.2 已完成:控制台支持 `HEAD /console`,`/console/state` 返回 runtime version、
|
|
257
|
+
expected extension version、session extension version 和 warnings;扩展注册 session 时上报
|
|
258
|
+
`client.extensionVersion`;控制台页面展示 runtime/extension 版本与 warning 面板;doctor
|
|
259
|
+
JSON 和 human summary 增加 console URL;空状态指引改为 reload extension、打开/刷新
|
|
260
|
+
http/https 页面再运行 doctor。
|
|
261
|
+
- P6.5.2 最新验证:`git diff --check` 通过;token 残留检查无输出;`npm run check`
|
|
262
|
+
通过;`npm test` 通过,覆盖 126 个 node:test 用例,其中 125 个通过、1 个真实浏览器
|
|
263
|
+
smoke 默认跳过;`YUNTI_E2E=1 npm run test:e2e` 通过 1 个真实浏览器 smoke;`npm run
|
|
264
|
+
release:check` 通过,并完成 npm package 内容检查 45 个文件和 extension zip 内容检查 13
|
|
265
|
+
个文件。
|
|
266
|
+
- P6.5.3 已完成:`tests/e2e.test.js` 的真实浏览器 smoke 现在会加载扩展、注册真实页面、
|
|
267
|
+
检查 `HEAD /console`、读取 `/console` 页面和 `/console/state`,并验证 runtime version、
|
|
268
|
+
expected extension version、session extension version 都与 package version 一致,且不会出现
|
|
269
|
+
`NO_CONNECTED_PAGES` 或 `EXTENSION_VERSION_MISMATCH` warning。
|
|
270
|
+
- P6.5.3 最新验证:`git diff --check` 通过;token 残留检查无输出;`npm run check`
|
|
271
|
+
通过;`npm test` 通过,覆盖 126 个 node:test 用例,其中 125 个通过、1 个真实浏览器
|
|
272
|
+
smoke 默认跳过;`YUNTI_E2E=1 npm run test:e2e` 通过 1 个真实浏览器 smoke;`npm run
|
|
273
|
+
release:check` 通过,并完成 npm package 内容检查 45 个文件和 extension zip 内容检查 13
|
|
274
|
+
个文件。
|
|
275
|
+
- P6.6.1 已完成:浏览器扩展分发准备,已沉淀权限/隐私/商店材料清单和当前 manifest
|
|
276
|
+
差距审计,未改权限或上架。
|
|
277
|
+
- P6.6.2 已完成:商店权限与隐私文案草案已沉淀为可审核、可复用的
|
|
278
|
+
store-facing 文案。
|
|
279
|
+
- P6.6.3 已完成:商店前权限策略决策已沉淀,当前 npm/unpacked 路径保持完整能力;
|
|
280
|
+
当前 broad-permission manifest 不作为默认推荐商店提交版本。
|
|
281
|
+
- P6.6.4 已后置到 post-0.2 / store-candidate track,不作为 0.2.0 发布硬门槛。
|
|
282
|
+
- 当前固定进入 P7.1:0.2.0 npm/unpacked 发布收口,先完成版本 bump、发布文档更新、
|
|
283
|
+
release gates、真实浏览器 E2E 和 dry-run。
|
|
284
|
+
|
|
285
|
+
## 压缩上下文恢复锚点
|
|
286
|
+
|
|
287
|
+
如果上下文被压缩或切换线程,新的 agent 应先读取:
|
|
288
|
+
|
|
289
|
+
1. `docs/PROJECT_STATUS.md` 顶部的 `Current Phase` 和 `Open Work`。
|
|
290
|
+
2. 本文档的 `阶段总览`、`当前 0.2.0 推进快照` 和对应 P6 小节。
|
|
291
|
+
3. `docs/NEXT_MAJOR_PLAN.md` 的 `Yunti-First Principle`。
|
|
292
|
+
|
|
293
|
+
恢复后按以下节奏继续:
|
|
294
|
+
|
|
295
|
+
1. 只做一个兼容优先的小切片。
|
|
296
|
+
2. 先更新 `docs/EXECUTION_PLAN.md` 和 `docs/PROJECT_STATUS.md` 的目标与状态。
|
|
297
|
+
3. 如果工具行为、schema、usage hint 或 agent 引导变化,同步更新
|
|
298
|
+
`mcp/tools.js`、`docs/TOOL_GUIDE.md` 和 `skills/yunti-browser-runtime/SKILL.md`。
|
|
299
|
+
4. 每个切片保留既有兼容字段,不移除 CDP、截图、network、console、upload、tab control
|
|
300
|
+
等 Yunti 自身能力。
|
|
301
|
+
5. 验证后再提交,并记录 skipped E2E 是否只是环境限制。
|
|
302
|
+
|
|
303
|
+
当前下一步提示词:
|
|
304
|
+
|
|
305
|
+
```text
|
|
306
|
+
继续推进 yunti-browser-runtime 0.2.0。请先读取 docs/PROJECT_STATUS.md、
|
|
307
|
+
docs/EXECUTION_PLAN.md 和 docs/NEXT_MAJOR_PLAN.md,只做一个兼容优先的小切片。
|
|
308
|
+
当前锚点是 P7.1:0.2.0 npm/unpacked 发布收口。P6.6.1 已完成浏览器扩展分发准备,
|
|
309
|
+
包括 manifest 权限审计、商店材料清单和 docs/EXTENSION_DISTRIBUTION.md。P6.6.2 已完成
|
|
310
|
+
docs/EXTENSION_STORE_COPY.md,包含商店描述、权限说明、隐私草案、data disclosure
|
|
311
|
+
和 reviewer notes。P6.6.3 已完成 docs/EXTENSION_PERMISSION_STRATEGY.md,结论是
|
|
312
|
+
npm/unpacked 路径保持完整能力,商店候选版本另行设计 optional host access 和 optional
|
|
313
|
+
network diagnostics;P6.6.4 后置到 post-0.2,不阻塞发布。P6.5.1 已完成可选本地控制台最小闭环,
|
|
314
|
+
P6.5.2 已完成版本 warning、HEAD /console、doctor console URL 和空状态指引增强,
|
|
315
|
+
P6.5.3 已完成控制台真实浏览器 E2E 验收。P6.1.4 真实浏览器 observe -> click uid ->
|
|
316
|
+
observe/verify 闭环已补验通过。保留现有兼容字段,必要时更新
|
|
317
|
+
mcp/tools.js、docs/TOOL_GUIDE.md、skills/yunti-browser-runtime/SKILL.md、
|
|
318
|
+
docs/EXECUTION_PLAN.md 和 docs/PROJECT_STATUS.md,并运行规定门禁。不要把项目改成
|
|
319
|
+
Page Agent 克隆,保持 Yunti local-first、MCP-native、真实 Chrome/Edge、
|
|
320
|
+
细粒度 yunti_* 工具的特色。
|
|
321
|
+
```
|
|
61
322
|
|
|
62
323
|
## P0.1 bridge token + CORS 收紧
|
|
63
324
|
|
|
@@ -1368,7 +1629,1104 @@ metadata 与当前 `package.json` 一致。
|
|
|
1368
1629
|
|
|
1369
1630
|
### 验收记录
|
|
1370
1631
|
|
|
1371
|
-
-
|
|
1632
|
+
- `npm run release:check` 通过。
|
|
1633
|
+
- `npm run release:publish` 成功发布 `yunti-browser-runtime@0.1.3`。
|
|
1634
|
+
- 首次 `npm run release:verify-published` 遇到 npm registry 同步延迟;重试后返回 0。
|
|
1635
|
+
- `npm view yunti-browser-runtime version dist-tags.latest --registry=https://registry.npmjs.org/`
|
|
1636
|
+
返回 `0.1.3`。
|
|
1637
|
+
|
|
1638
|
+
## P6.0 0.2.0 产品方向护栏
|
|
1639
|
+
|
|
1640
|
+
状态:已完成(2026-07-03)
|
|
1641
|
+
|
|
1642
|
+
实现摘要:
|
|
1643
|
+
|
|
1644
|
+
- 新增 `docs/NEXT_MAJOR_PLAN.md`,作为 `0.2.0 Best Browser Automation Runtime`
|
|
1645
|
+
的持久执行契约。
|
|
1646
|
+
- 明确 `0.2.0` 是 Yunti-first 增强周期,目标是做最好用的本地浏览器自动化操作层,
|
|
1647
|
+
而不是克隆某一个参考项目。
|
|
1648
|
+
- 明确参考范围扩展到 Playwright、Puppeteer、Selenium、CDP、browser-use、Page Agent、
|
|
1649
|
+
BrowserGym 和浏览器扩展/本地运行时生态,吸收它们的可靠 action、locator/uid、
|
|
1650
|
+
trace/debug、文本 DOM、benchmark fixture、权限透明和安装体验等优点。
|
|
1651
|
+
- 明确执行顺序:先参考 Page Agent / browser-use,把 P6.1 页面观察和 P6.2 indexed
|
|
1652
|
+
action 主线做扎实;其他生态优点后续再分阶段吸收,避免一次性铺太大。
|
|
1653
|
+
- 明确不吸收的方向:默认不内置 LLM API key、不把细粒度 MCP 工具替换成单一
|
|
1654
|
+
`execute_task`、不让 hub tab/side panel 成为必选项、不把远程多用户模式混入本地
|
|
1655
|
+
单用户核心。
|
|
1656
|
+
- 明确必须保留 Yunti 自己的特色:细粒度 MCP 工具、真实 Chrome/Edge 状态、CDP、
|
|
1657
|
+
截图、network/console 诊断、tab 控制、本地 bridge 路由和零配置本地安装。
|
|
1658
|
+
- 将 P6.1-P6.6 写入本执行计划和 `docs/ROADMAP.md`。
|
|
1659
|
+
- 将 `docs/PROJECT_STATUS.md` 的当前阶段更新为 `0.2.0` 规划状态。
|
|
1660
|
+
|
|
1661
|
+
### 多视角审稿结论
|
|
1662
|
+
|
|
1663
|
+
已从产品、架构/API、Agent 工作流、安全隐私、测试发布五个视角审阅 `0.2.0` 计划。
|
|
1664
|
+
共识如下:
|
|
1665
|
+
|
|
1666
|
+
- 方向正确:Yunti-first、本地优先、MCP 原生、真实浏览器状态和细粒度工具必须保留。
|
|
1667
|
+
- 需要把“最好用”变成可验证承诺:更少误点、更少盲目重试、更清晰恢复、更低安装心智。
|
|
1668
|
+
- P6.1 必须前置最小安全基线,不能等到 P6.4 才处理 DOM observation 脱敏。
|
|
1669
|
+
- `yunti_observe_page` 需要字段级输入/输出契约、uid 生命周期、错误码和工具兼容矩阵。
|
|
1670
|
+
- P6.1/P6.2 需要 deterministic fixture,而不是只写能力描述。
|
|
1671
|
+
- P6.3 的 skill/tool hints 和可复制工作流提示词应在 P6.1 schema 合并时同步更新。
|
|
1672
|
+
|
|
1673
|
+
### 目标
|
|
1674
|
+
|
|
1675
|
+
避免上下文压缩或线程切换后丢失下一大版本方向,尤其避免因为阅读单一参考项目而偏离
|
|
1676
|
+
Yunti 自己的特色。后续实现应直接从仓库文档恢复目标、非目标、阶段顺序、验收标准和
|
|
1677
|
+
下一步。
|
|
1678
|
+
|
|
1679
|
+
### 验收标准
|
|
1680
|
+
|
|
1681
|
+
- 仓库中存在独立的下一大版本计划文档。
|
|
1682
|
+
- `ROADMAP`、`PROJECT_STATUS`、`EXECUTION_PLAN` 都指向或记录 `0.2.0` 方向。
|
|
1683
|
+
- 下一步明确从 P6.1 `yunti_observe_page` 开始。
|
|
1684
|
+
|
|
1685
|
+
### 验收记录
|
|
1686
|
+
|
|
1687
|
+
- `npm run release:check` 通过;公开文档残留检查、Markdown 相对链接检查、语法检查、
|
|
1688
|
+
单测、npm pack 内容检查和 extension zip 内容检查均通过。
|
|
1689
|
+
|
|
1690
|
+
## P6.1 Agent 友好的页面观察
|
|
1691
|
+
|
|
1692
|
+
状态:实现中(首个 schema / hints / bridge routing 合约切片已落地)
|
|
1693
|
+
|
|
1694
|
+
目标:
|
|
1695
|
+
|
|
1696
|
+
新增 `yunti_observe_page`,返回适合外部 Agent 使用的页面观察结果:URL/title、页面
|
|
1697
|
+
尺寸、滚动位置、可交互文本树、稳定 uid、scrollable 容器信息和脱敏元数据。
|
|
1698
|
+
|
|
1699
|
+
第一阶段以 Page Agent 的 PageController / browser-state 思路为主要参考,但实现要适配
|
|
1700
|
+
Yunti 的 MCP/extension/bridge 架构。
|
|
1701
|
+
|
|
1702
|
+
### Page Agent 参考审计
|
|
1703
|
+
|
|
1704
|
+
当前参考源:`alibaba/page-agent`。
|
|
1705
|
+
|
|
1706
|
+
可吸收点:
|
|
1707
|
+
|
|
1708
|
+
- `PageController.getBrowserState()`:把 URL/title、页面尺寸、滚动提示和可交互 DOM
|
|
1709
|
+
文本合成一个面向 Agent 的观察结果。
|
|
1710
|
+
- `updateTree()`:把观察刷新与动作执行分开,适合作为 `observe -> act -> verify`
|
|
1711
|
+
工作流的前置步骤。
|
|
1712
|
+
- `selectorMap` 与 simplified HTML:证明 indexed interactive elements 比原始 CSS
|
|
1713
|
+
selector 更适合 Agent 使用;Yunti 需要适配成现有 uid 体系。
|
|
1714
|
+
- `data-scrollable`:对多面板业务系统很重要,应结构化进入 `scrollableContainers`。
|
|
1715
|
+
- prompt 规则:评估上一步结果、不要盲目重试、只有存在 pixels above/below 时再滚动。
|
|
1716
|
+
|
|
1717
|
+
不复制点:
|
|
1718
|
+
|
|
1719
|
+
- 不复制内置 LLM loop。
|
|
1720
|
+
- 不让 hub/sidebar/operator UI 成为必选项。
|
|
1721
|
+
- 不把 Yunti 收窄为单页任务工具;仍保留 tabs、CDP、network、console、screenshot、
|
|
1722
|
+
file upload 和诊断能力。
|
|
1723
|
+
- 不追求 Page Agent API 兼容;只吸收思路并转成 Yunti 的 MCP 工具契约。
|
|
1724
|
+
|
|
1725
|
+
### 文档先行约束
|
|
1726
|
+
|
|
1727
|
+
在动功能代码前,先确认以下契约:
|
|
1728
|
+
|
|
1729
|
+
- `yunti_observe_page` 是增量增强,不替换或破坏 `yunti_get_page_snapshot` 与
|
|
1730
|
+
`yunti_take_snapshot`。
|
|
1731
|
+
- 第一版优先走 content script DOM collection,使基础页面观察不依赖 CDP attach。
|
|
1732
|
+
- 输出同时包含结构化字段和紧凑文本树,便于程序消费和 LLM prompt 消费。
|
|
1733
|
+
- uid 与最新 observation 绑定;uid 过期、缺失或不可见时,错误提示应引导重新调用
|
|
1734
|
+
`yunti_observe_page`。
|
|
1735
|
+
- 默认不返回 password、token-like、credential-like 输入值;完整 DOM 脱敏策略放到
|
|
1736
|
+
P6.4 深化。
|
|
1737
|
+
|
|
1738
|
+
### 字段级契约草案
|
|
1739
|
+
|
|
1740
|
+
输入:
|
|
1741
|
+
|
|
1742
|
+
- `browserSessionId`:可选目标浏览器 session。
|
|
1743
|
+
- `mode`:默认 `viewport`;后续支持有边界的 `fullPage`。
|
|
1744
|
+
- `maxElements` / `maxTextLength`:默认限量,防止一次返回过多页面内容。
|
|
1745
|
+
- `includeHidden`:默认 false。
|
|
1746
|
+
- `includeTextTree` / `includeRects`:默认 true。
|
|
1747
|
+
- `redaction`:默认 `balanced`;`strict` 用于更强隐私;`off` 仅允许显式本地调试,
|
|
1748
|
+
不进入默认 agent workflow。
|
|
1749
|
+
|
|
1750
|
+
输出:
|
|
1751
|
+
|
|
1752
|
+
- `observationId`、`browserSessionId`、`capturedAt`、`uidMapVersion`。
|
|
1753
|
+
- `page`:URL、脱敏 URL preview、title、origin、readyState。
|
|
1754
|
+
- `viewport`:width、height、devicePixelRatio。
|
|
1755
|
+
- `scroll`:x/y、page size、pixels/pages above/below。
|
|
1756
|
+
- `elements[]`:`uid`、`role`、`tag`、`name`、`text`、`label`、`placeholder`、
|
|
1757
|
+
`valuePreview`、`valueRedacted`、`type`、`hrefPreview`、`rect`、`visible`、
|
|
1758
|
+
`disabled`、`editable`、`checked`、`selected`、`scrollable`、`containerUid`。
|
|
1759
|
+
- `textTree`:面向 Agent 的紧凑文本树。
|
|
1760
|
+
- `scrollableContainers[]`:`uid`、`tag`、`name`、`rect`、`scrollTop`、
|
|
1761
|
+
`scrollHeight`、`clientHeight`、`canScrollVertical`、`canScrollHorizontal`、
|
|
1762
|
+
各方向剩余像素。
|
|
1763
|
+
- `limits`、`redactions`、`hints[]`、`warnings[]`。
|
|
1764
|
+
|
|
1765
|
+
uid 生命周期:
|
|
1766
|
+
|
|
1767
|
+
- uid 只对当前 `browserSessionId` 的最近一次 observe/snapshot 有效,不承诺跨刷新或跨
|
|
1768
|
+
页面永久稳定。
|
|
1769
|
+
- action 应接受来自 `yunti_observe_page` 或 `yunti_take_snapshot` 的 uid,但错误提示
|
|
1770
|
+
必须说明应重新 observe 还是重新 snapshot。
|
|
1771
|
+
- stale uid 使用结构化错误码,例如 `STALE_OBSERVATION_UID`,并提示重新
|
|
1772
|
+
`yunti_observe_page`。
|
|
1773
|
+
- uid map 只放内存,不写入 learning memory、task history 或长期诊断日志。
|
|
1774
|
+
|
|
1775
|
+
最小脱敏基线:
|
|
1776
|
+
|
|
1777
|
+
- P6.1 默认 `balanced`,隐藏 password、hidden token、token/secret/auth/cookie/session/
|
|
1778
|
+
api-key/credential/otp-like 值、JWT-like、Bearer-like、private-key-like 和长随机串。
|
|
1779
|
+
- DOM observation 默认使用属性白名单,不返回任意 attributes。
|
|
1780
|
+
- URL query 默认摘要化或局部脱敏。
|
|
1781
|
+
- DOM redaction 不代表 screenshot redaction;截图按真实可见像素处理。
|
|
1782
|
+
|
|
1783
|
+
受限/降级状态:
|
|
1784
|
+
|
|
1785
|
+
- content script 不可用、browser internal page、跨域 iframe 内容省略、session stale、
|
|
1786
|
+
tab changed、无可见交互元素、页面仍在 loading、动作验证不确定时,都需要返回
|
|
1787
|
+
`hints[]` 或结构化错误。
|
|
1788
|
+
|
|
1789
|
+
### 本阶段不做
|
|
1790
|
+
|
|
1791
|
+
- 不把 LLM task loop 放进 runtime。
|
|
1792
|
+
- 不引入必选 hub tab、side panel 或运行时控制台。
|
|
1793
|
+
- 不做完整 Playwright locator engine。
|
|
1794
|
+
- 不做大规模 benchmark harness,只做最小 fixture/smoke。
|
|
1795
|
+
- 不混入 remote multi-user browser orchestration。
|
|
1796
|
+
|
|
1797
|
+
### 第一批验收
|
|
1798
|
+
|
|
1799
|
+
- 文档确认 `yunti_observe_page` 的输出契约、uid 关系、默认脱敏和第一条 smoke 路径。
|
|
1800
|
+
- Page Agent 参考审计已沉淀为 Yunti 术语,不再依赖上下文记忆。
|
|
1801
|
+
- 首个实现切片只添加 MCP schema、`yunti_get_tool_usage_hints` observe-first 指引和
|
|
1802
|
+
bridge routing 合约测试;不实现 content script DOM collector,不重写 action layer。
|
|
1803
|
+
- 后续代码实现再进入 content script collection、uid map 与 action 兼容、最小
|
|
1804
|
+
`observe -> click uid -> observe` 闭环、测试和 skill/docs 更新。
|
|
1805
|
+
- P6.1 完成必须包括 schema 单测、bridge routing 单测、content fixture 单测、真实浏览器
|
|
1806
|
+
smoke、skill 更新和 `yunti_get_tool_usage_hints` 更新。
|
|
1807
|
+
|
|
1808
|
+
最新切片记录(2026-07-03):
|
|
1809
|
+
|
|
1810
|
+
- `mcp/tools.js` 已新增 `yunti_observe_page` 输入 schema,覆盖 `mode`、`maxElements`、
|
|
1811
|
+
`maxTextLength`、`includeHidden`、`includeTextTree`、`includeRects` 和 `redaction`。
|
|
1812
|
+
- `yunti_get_tool_usage_hints` 已新增 `yunti_observe_page` guidance,并把
|
|
1813
|
+
click/hover/fill 的 uid 说明更新为 observe/snapshot fresh uid。
|
|
1814
|
+
- `tests/bridge.test.js` 已覆盖工具 surface、observe usage hints schema,以及
|
|
1815
|
+
`yunti_observe_page` 从 bridge 转发到 extension 的路由合约。
|
|
1816
|
+
- `extension/dom-observer.js` 已新增 content-script DOM observation MVP,返回 fresh uid、
|
|
1817
|
+
compact text tree、viewport/document scroll、scrollable container metadata、balanced
|
|
1818
|
+
redaction metadata 和恢复 hints。
|
|
1819
|
+
- `extension/content.js` 已接入 `yunti_observe_page`,`extension/manifest.json` 和
|
|
1820
|
+
extension/package release gates 已纳入 `dom-observer.js`。
|
|
1821
|
+
- `tests/dom-observer.test.js` 已覆盖基础 DOM 观察、fresh uid、textTree、balanced
|
|
1822
|
+
redaction、URL query 脱敏和 scroll metadata。
|
|
1823
|
+
- `tests/e2e.test.js` 已把 `yunti_observe_page` 加入 opt-in real-browser smoke。
|
|
1824
|
+
- 最新验证:`git diff --check` 通过;`npm run release:check` 通过,覆盖 70 个
|
|
1825
|
+
node:test 用例,其中 69 个通过、1 个 real-browser smoke 按默认配置跳过;
|
|
1826
|
+
`YUNTI_E2E=1 npm run test:e2e` 在当前环境因缺少 Playwright/Chromium 被跳过。
|
|
1827
|
+
- `extension/tool-handlers.js` 已把 `yunti_observe_page` 返回的 elements 写入最新页面
|
|
1828
|
+
uid map,`yunti_click` / `yunti_hover` / `yunti_fill` 继续通过现有 uid resolver 使用
|
|
1829
|
+
fresh observe uid,同时保留 `yunti_take_snapshot` 兼容路径。
|
|
1830
|
+
- `tests/tool-handlers.test.js` 已覆盖 `observe -> click uid` 的 background dispatcher
|
|
1831
|
+
最小闭环,以及 missing uid 时提示重新 observe/snapshot。
|
|
1832
|
+
- `tests/tool-handlers.test.js` 也已覆盖最新 observation 替换旧 uid map:第二次 observe
|
|
1833
|
+
后旧 uid 会失败并提示重新 observe/snapshot,新 uid 可以继续驱动现有 click 路径。
|
|
1834
|
+
- `tests/dom-observer.test.js` 已覆盖 hidden/offscreen targets:默认 viewport observe 会
|
|
1835
|
+
排除隐藏和视口外元素,`fullPage` 可包含视口外元素,显式 `includeHidden` 才包含隐藏元素。
|
|
1836
|
+
- `tests/dom-observer.test.js` 已覆盖 redaction edge modes:balanced 会遮蔽 Bearer、
|
|
1837
|
+
token-like、URL query secret 和长随机串,strict 会进一步遮蔽较长普通值,`off` 会返回
|
|
1838
|
+
原值并带本地调试 warning。
|
|
1839
|
+
- `tests/e2e.test.js` 的 opt-in real-browser smoke 已改为先 observe,再用 observe uid
|
|
1840
|
+
执行 click;本切片不重写 fill/select/scroll action layer。
|
|
1841
|
+
|
|
1842
|
+
P6.1 真实浏览器闭环验证 runbook:
|
|
1843
|
+
|
|
1844
|
+
- 验证目标:在真实 Chromium + unpacked extension 环境中跑通
|
|
1845
|
+
`observe -> click uid -> observe/verify`,证明 content script observe 生成的 fresh uid
|
|
1846
|
+
能驱动现有 `yunti_click` 路径,并且点击后的页面状态可以被后续读取验证。
|
|
1847
|
+
- 环境准备:安装 Playwright npm 依赖和 Chromium 浏览器二进制;如果本地只安装了项目依赖但
|
|
1848
|
+
缺少浏览器二进制,应先执行 Playwright 的 Chromium 安装命令,再运行本 smoke。
|
|
1849
|
+
- 执行命令:`YUNTI_E2E=1 npm run test:e2e`。
|
|
1850
|
+
- 当前 smoke 行为:测试会启动本地 bridge、加载 unpacked extension、打开本地 fixture 页面、
|
|
1851
|
+
调用 `yunti_observe_page` 找到 "Click me" fresh uid、用该 uid 调用 `yunti_click`,
|
|
1852
|
+
再通过页面读回确认点击计数和填充值。
|
|
1853
|
+
- 成功判定:`real browser extension bridge smoke` 不再 skip,测试通过,并且 artifact
|
|
1854
|
+
目录没有 failure screenshot 或 error log。
|
|
1855
|
+
- 环境缺口判定:如果输出 `install Playwright and Chromium before running
|
|
1856
|
+
YUNTI_E2E=1 npm run test:e2e`,该结果只说明当前机器缺少真实浏览器验证依赖,不代表
|
|
1857
|
+
P6.1 runtime 逻辑失败;在进入 P6.2 前应重新补跑或明确记录为环境限制。
|
|
1858
|
+
- 失败恢复:优先查看测试输出的 artifact 目录、`failure.png` 和 `error.log`;再确认 extension
|
|
1859
|
+
是否加载、bridge URL 是否写入 extension storage、页面是否刷新注册、以及
|
|
1860
|
+
`yunti_list_browser_targets` 是否能看到测试页面。
|
|
1861
|
+
|
|
1862
|
+
详细范围、非目标和验收标准见 `docs/NEXT_MAJOR_PLAN.md`。
|
|
1863
|
+
|
|
1864
|
+
## P6.2 稳定 DOM action 层
|
|
1865
|
+
|
|
1866
|
+
状态:进行中(2026-07-03)
|
|
1867
|
+
|
|
1868
|
+
目标:
|
|
1869
|
+
|
|
1870
|
+
抽取并增强 DOM action 层,提高 click、hover、fill、select、contenteditable、scroll
|
|
1871
|
+
容器操作的稳定性,让动作结果更容易被 Agent 验证和恢复。
|
|
1872
|
+
|
|
1873
|
+
第一阶段优先参考 Page Agent 的 click/input/select/scroll 事件序列;Playwright/CDP 风格
|
|
1874
|
+
的 auto-wait、trace 和更深诊断后续再逐步补。
|
|
1875
|
+
|
|
1876
|
+
### Page Agent 参考审计
|
|
1877
|
+
|
|
1878
|
+
可吸收点:
|
|
1879
|
+
|
|
1880
|
+
- `clickElement()` 的 pointer/mouse/focus/click 顺序。
|
|
1881
|
+
- `inputTextElement()` 对 input、textarea、contenteditable 的分支和插入后验证思路。
|
|
1882
|
+
- `selectOptionElement()` 的 visible text 选择思路。
|
|
1883
|
+
- `scrollVertically()` / `scrollHorizontally()` 的容器优先滚动、边界判断和结果消息。
|
|
1884
|
+
|
|
1885
|
+
不复制点:
|
|
1886
|
+
|
|
1887
|
+
- 不引入隐藏细粒度工具的大型 action runner。
|
|
1888
|
+
- 不移除 selector、coordinate、CDP fallback。
|
|
1889
|
+
- 不把动作结果只做自然语言字符串;Yunti 应返回结构化结果,必要时附带人类可读 hint。
|
|
1890
|
+
|
|
1891
|
+
### 文档先行约束
|
|
1892
|
+
|
|
1893
|
+
- 保持现有 `yunti_click`、`yunti_hover`、`yunti_fill`、`yunti_select`、
|
|
1894
|
+
`yunti_type_text`、`yunti_press_key`、`yunti_scroll` 工具名稳定。
|
|
1895
|
+
- 让 uid action 自然衔接 P6.1 `yunti_observe_page`。
|
|
1896
|
+
- 错误提示要帮助 Agent 判断下一步是重新 observe、scroll、wait、switch tab,还是使用
|
|
1897
|
+
selector/coordinate fallback。
|
|
1898
|
+
- 保留 CDP、selector 和 coordinate fallback,不把动作层收窄成 page-only abstraction。
|
|
1899
|
+
|
|
1900
|
+
### 本阶段不做
|
|
1901
|
+
|
|
1902
|
+
- 不引入隐藏细粒度工具的大型 action runner。
|
|
1903
|
+
- 不要求用户打开 mandatory replay/trace UI。
|
|
1904
|
+
- 不移除现有 CDP fallback 能力。
|
|
1905
|
+
|
|
1906
|
+
### 动作优先级与结果契约
|
|
1907
|
+
|
|
1908
|
+
动作优先级:
|
|
1909
|
+
|
|
1910
|
+
- P0:`observe -> click uid -> observe`。
|
|
1911
|
+
- P0:`observe -> fill uid -> verify value`,覆盖 input、textarea、contenteditable。
|
|
1912
|
+
- P0:页面滚动与 container 滚动恢复。
|
|
1913
|
+
- P1:select visible text/value、tab 选择/切换、新 tab 续接、等待与验证模板。
|
|
1914
|
+
- P2:把 console/network/screenshot/CDP 诊断接入“为什么没成功”的恢复建议。
|
|
1915
|
+
|
|
1916
|
+
动作结果至少包含:
|
|
1917
|
+
|
|
1918
|
+
- 当前兼容返回可以继续保留 `clicked`、`hovered`、`filled`、`selected`、`scrolled`、
|
|
1919
|
+
`uid`、`selector`、`x/y`、`method`、`valueLength`、`before/after`、
|
|
1920
|
+
`browserSessionId` 等现有字段。
|
|
1921
|
+
- P6.2 目标结构以增量方式收敛到:`action`、`browserSessionId`、`target`、`ok`、
|
|
1922
|
+
`code`、`recoverable`、`nextStepHint`。
|
|
1923
|
+
- `target` 应能表达 uid、selector、coordinate 或 scroll container,不强迫单一路径。
|
|
1924
|
+
- 必要时包含 before/after 摘要,例如 scroll position、value length、selected option、
|
|
1925
|
+
URL/title 变化、toast/dialog 状态。
|
|
1926
|
+
- 迁移期间不移除现有成功布尔值或 selector/coordinate 字段,避免破坏外部 Agent 和旧 workflow。
|
|
1927
|
+
|
|
1928
|
+
`yunti_select` 兼容缺口:
|
|
1929
|
+
|
|
1930
|
+
- 当前 selector/value 路径保留。
|
|
1931
|
+
- P6.2 已增加 `uid + value` runtime 路径,并写明如何与 `yunti_observe_page` 的 uid
|
|
1932
|
+
衔接。
|
|
1933
|
+
- P6.2 已增加 `uid + visible text` runtime 路径;Agent 可以在 fresh uid 下传 `text`,
|
|
1934
|
+
但 selector 路径仍保持 selector/value 兼容,不支持 selector/text。
|
|
1935
|
+
|
|
1936
|
+
最新切片记录(2026-07-03):
|
|
1937
|
+
|
|
1938
|
+
- `yunti_get_tool_usage_hints` 已新增 P6.2 前置 action recovery guidance,不改写实际
|
|
1939
|
+
action layer。
|
|
1940
|
+
- `yunti_click` / `yunti_hover` / `yunti_fill` hints 现在明确失败或无页面变化后应先
|
|
1941
|
+
observe/verify,再根据情况 scroll、wait、switch tab、使用 selector/coordinate fallback
|
|
1942
|
+
或询问用户,避免盲目重复同一动作。
|
|
1943
|
+
- `tests/bridge.test.js` 已覆盖 action recovery guidance,确保 fresh uid、stale/missing
|
|
1944
|
+
uid、滚动、等待、tab 切换和 fallback 的恢复提示不会退化。
|
|
1945
|
+
- 最新验证:`git diff --check` 通过;`node --test tests/bridge.test.js` 通过 63 项;
|
|
1946
|
+
`npm run release:check` 通过,覆盖 71 个 node:test 用例,其中 70 个通过、1 个
|
|
1947
|
+
real-browser smoke 按默认配置跳过;`YUNTI_E2E=1 npm run test:e2e` 在当前环境因缺少
|
|
1948
|
+
Playwright/Chromium 被跳过;token 残留检查无输出。
|
|
1949
|
+
- `yunti_get_tool_usage_hints` 已新增 action result contract guidance,明确当前 action
|
|
1950
|
+
返回是 compatibility-shaped,P6.2 后续只能增量收敛到结构化 `action` / `target` /
|
|
1951
|
+
`ok` / `code` / `recoverable` / `nextStepHint` / before-after 摘要,不能破坏现有
|
|
1952
|
+
`clicked` / `filled` / `hovered` / selector / coordinate 返回字段。
|
|
1953
|
+
- 最新验证:`git diff --check` 通过;`node --test tests/bridge.test.js` 通过 64 项;
|
|
1954
|
+
`npm run release:check` 通过,覆盖 72 个 node:test 用例,其中 71 个通过、1 个
|
|
1955
|
+
real-browser smoke 按默认配置跳过;`YUNTI_E2E=1 npm run test:e2e` 在当前环境因缺少
|
|
1956
|
+
Playwright/Chromium 被跳过;token 残留检查无输出。
|
|
1957
|
+
- `tests/tool-handlers.test.js` 已新增 dispatcher action result shape 测试,锁定当前
|
|
1958
|
+
uid click、uid hover、uid fill 和 content-script scroll passthrough 的兼容返回字段,
|
|
1959
|
+
作为后续增量加入结构化 `action` / `target` / `ok` / `nextStepHint` 字段前的回归保护。
|
|
1960
|
+
- 最新 targeted 验证:`git diff --check` 通过;`node --test tests/tool-handlers.test.js`
|
|
1961
|
+
通过 4 项。
|
|
1962
|
+
- 最新完整验证:`npm run release:check` 通过,覆盖 73 个 node:test 用例,其中 72 个
|
|
1963
|
+
通过、1 个 real-browser smoke 按默认配置跳过;`YUNTI_E2E=1 npm run test:e2e` 在当前
|
|
1964
|
+
环境因缺少 Playwright/Chromium 被跳过;token 残留检查无输出。
|
|
1965
|
+
- `extension/tool-handlers.js` 已为 uid-based `yunti_click` 结果增量追加结构化字段:
|
|
1966
|
+
`action: "click"`、`target`、`ok`、`recoverable`、`nextStepHint`,同时保留
|
|
1967
|
+
`clicked`、`uid`、`x/y`、`browserSessionId` 兼容字段。
|
|
1968
|
+
- `tests/tool-handlers.test.js` 已更新 uid click 断言,确保结构化字段不会替代或破坏
|
|
1969
|
+
既有兼容返回。
|
|
1970
|
+
- 最新验证:`git diff --check` 通过;`node --test tests/tool-handlers.test.js` 通过 4 项;
|
|
1971
|
+
`npm run release:check` 通过,覆盖 73 个 node:test 用例,其中 72 个通过、1 个
|
|
1972
|
+
real-browser smoke 按默认配置跳过;`YUNTI_E2E=1 npm run test:e2e` 在当前环境因缺少
|
|
1973
|
+
Playwright/Chromium 被跳过;token 残留检查无输出。
|
|
1974
|
+
- `extension/tool-handlers.js` 已为 uid-based `yunti_hover` 结果增量追加结构化字段:
|
|
1975
|
+
`action: "hover"`、`target`、`ok`、`recoverable`、`nextStepHint`,同时保留
|
|
1976
|
+
`hovered`、`uid`、`x/y`、`browserSessionId` 兼容字段。
|
|
1977
|
+
- `tests/tool-handlers.test.js` 已更新 uid hover 断言,确保结构化字段不会替代或破坏
|
|
1978
|
+
既有兼容返回。
|
|
1979
|
+
- 最新 targeted 验证:`git diff --check` 通过;`node --test tests/tool-handlers.test.js`
|
|
1980
|
+
通过 4 项。
|
|
1981
|
+
- 最新完整验证:`npm run release:check` 通过,覆盖 73 个 node:test 用例,其中 72 个
|
|
1982
|
+
通过、1 个 real-browser smoke 按默认配置跳过;`YUNTI_E2E=1 npm run test:e2e` 在当前
|
|
1983
|
+
环境因缺少 Playwright/Chromium 被跳过;token 残留检查无输出。
|
|
1984
|
+
- `extension/tool-handlers.js` 已为 uid-based `yunti_fill` keyboard path 结果增量追加
|
|
1985
|
+
结构化字段:`action: "fill"`、`target`、`ok`、`recoverable`、`nextStepHint`,同时保留
|
|
1986
|
+
`filled`、`uid`、`method`、`value`、`browserSessionId` 兼容字段;本切片不改
|
|
1987
|
+
select/contenteditable/scroll 语义。
|
|
1988
|
+
- `tests/tool-handlers.test.js` 已更新 uid fill keyboard path 断言,确保结构化字段不会替代或
|
|
1989
|
+
破坏既有兼容返回。
|
|
1990
|
+
- 最新 targeted 验证:`git diff --check` 通过;`node --test tests/tool-handlers.test.js`
|
|
1991
|
+
通过 4 项。
|
|
1992
|
+
- 最新完整验证:`npm run release:check` 通过,覆盖 73 个 node:test 用例,其中 72 个
|
|
1993
|
+
通过、1 个 real-browser smoke 按默认配置跳过;extension zip 内容检查通过,包含 13 个文件;
|
|
1994
|
+
npm package 内容检查通过,包含 42 个文件;`YUNTI_E2E=1 npm run test:e2e` 在当前环境
|
|
1995
|
+
因缺少 Playwright/Chromium 被跳过;token 残留检查无输出。
|
|
1996
|
+
- `extension/tool-handlers.js` 已为 uid-based `yunti_fill` select path 结果增量追加
|
|
1997
|
+
结构化字段:`action: "fill"`、`target`、`ok`、`recoverable`、`nextStepHint`,同时保留
|
|
1998
|
+
`filled`、`uid`、`method: "select"`、`value`、`browserSessionId` 兼容字段;本切片不改
|
|
1999
|
+
select 赋值、change/input 事件派发或 keyboard/contenteditable/scroll 语义。
|
|
2000
|
+
- `tests/tool-handlers.test.js` 已新增 uid fill select path 断言,确保结构化字段不会替代或
|
|
2001
|
+
破坏既有 select 兼容返回。
|
|
2002
|
+
- 最新 targeted 验证:`git diff --check` 通过;`node --test tests/tool-handlers.test.js`
|
|
2003
|
+
通过 5 项。
|
|
2004
|
+
- 最新完整验证:`npm run release:check` 通过,覆盖 74 个 node:test 用例,其中 73 个
|
|
2005
|
+
通过、1 个 real-browser smoke 按默认配置跳过;extension zip 内容检查通过,包含 13 个文件;
|
|
2006
|
+
npm package 内容检查通过,包含 42 个文件;`YUNTI_E2E=1 npm run test:e2e` 在当前环境
|
|
2007
|
+
因缺少 Playwright/Chromium 被跳过;token 残留检查无输出。
|
|
2008
|
+
- `extension/tool-handlers.js` 已为 coordinate fallback `yunti_click` 结果增量追加
|
|
2009
|
+
结构化字段:`action: "click"`、`target`、`ok`、`recoverable`、`nextStepHint`,同时保留
|
|
2010
|
+
`clicked`、`x/y`、`method: "coordinate"`、`browserSessionId` 兼容字段;本切片不改坐标点击
|
|
2011
|
+
的 CDP mouse event 派发语义。
|
|
2012
|
+
- `tests/tool-handlers.test.js` 已新增 coordinate click 断言,确保结构化字段不会替代或
|
|
2013
|
+
破坏既有 coordinate fallback 兼容返回。
|
|
2014
|
+
- 最新 targeted 验证:`git diff --check` 通过;`node --test tests/tool-handlers.test.js`
|
|
2015
|
+
通过 6 项。
|
|
2016
|
+
- 最新完整验证:`npm run release:check` 通过,覆盖 75 个 node:test 用例,其中 74 个
|
|
2017
|
+
通过、1 个 real-browser smoke 按默认配置跳过;extension zip 内容检查通过,包含 13 个文件;
|
|
2018
|
+
npm package 内容检查通过,包含 42 个文件;`YUNTI_E2E=1 npm run test:e2e` 在当前环境
|
|
2019
|
+
因缺少 Playwright/Chromium 被跳过;token 残留检查无输出。
|
|
2020
|
+
- `extension/tool-handlers.js` 已为 coordinate fallback `yunti_hover` 结果增量追加
|
|
2021
|
+
结构化字段:`action: "hover"`、`target`、`ok`、`recoverable`、`nextStepHint`,同时保留
|
|
2022
|
+
`hovered`、`x/y`、`method: "coordinate"`、`browserSessionId` 兼容字段;本切片不改坐标 hover
|
|
2023
|
+
的 CDP mouse move 派发语义。
|
|
2024
|
+
- `tests/tool-handlers.test.js` 已新增 coordinate hover 断言,确保结构化字段不会替代或
|
|
2025
|
+
破坏既有 coordinate fallback 兼容返回。
|
|
2026
|
+
- 最新 targeted 验证:`git diff --check` 通过;`node --test tests/tool-handlers.test.js`
|
|
2027
|
+
通过 7 项。
|
|
2028
|
+
- 最新完整验证:`npm run release:check` 通过,覆盖 76 个 node:test 用例,其中 75 个
|
|
2029
|
+
通过、1 个 real-browser smoke 按默认配置跳过;extension zip 内容检查通过,包含 13 个文件;
|
|
2030
|
+
npm package 内容检查通过,包含 42 个文件;`YUNTI_E2E=1 npm run test:e2e` 在当前环境
|
|
2031
|
+
因缺少 Playwright/Chromium 被跳过;token 残留检查无输出。
|
|
2032
|
+
- `extension/tool-handlers.js` 已为 selector fallback `yunti_hover` 结果增量追加
|
|
2033
|
+
结构化字段:`action: "hover"`、`target`、`ok`、`recoverable`、`nextStepHint`,同时保留
|
|
2034
|
+
`hovered`、`selector`、`x/y`、`method: "selector"`、`browserSessionId` 兼容字段;本切片不改
|
|
2035
|
+
selector 定位、scrollIntoView 或 CDP mouse move 派发语义。
|
|
2036
|
+
- `tests/tool-handlers.test.js` 已新增 selector hover 断言,确保结构化字段不会替代或
|
|
2037
|
+
破坏既有 selector fallback 兼容返回。
|
|
2038
|
+
- 最新 targeted 验证:`git diff --check` 通过;`node --test tests/tool-handlers.test.js`
|
|
2039
|
+
通过 8 项。
|
|
2040
|
+
- 最新完整验证:`npm run release:check` 通过,覆盖 77 个 node:test 用例,其中 76 个
|
|
2041
|
+
通过、1 个 real-browser smoke 按默认配置跳过;extension zip 内容检查通过,包含 13 个文件;
|
|
2042
|
+
npm package 内容检查通过,包含 42 个文件;`YUNTI_E2E=1 npm run test:e2e` 在当前环境
|
|
2043
|
+
因缺少 Playwright/Chromium 被跳过;token 残留检查无输出。
|
|
2044
|
+
- `extension/tool-handlers.js` 已为 selector fallback `yunti_click` content-script passthrough
|
|
2045
|
+
结果增量追加结构化字段:`action: "click"`、`target`、`ok`、`recoverable`、`nextStepHint`,
|
|
2046
|
+
同时保留 content-script 返回的 `clicked`、`element` 字段,并追加 `selector`、
|
|
2047
|
+
`method: "selector"`、`browserSessionId` 兼容字段;本切片不改 content-script click
|
|
2048
|
+
的 `scrollIntoView`、`element.click()` 或失败返回语义。
|
|
2049
|
+
- `tests/tool-handlers.test.js` 已新增 selector click passthrough 断言,确保结构化字段不会替代或
|
|
2050
|
+
破坏既有 content-script selector click 返回。
|
|
2051
|
+
- 最新 targeted 验证:`git diff --check` 通过;`node --test tests/tool-handlers.test.js`
|
|
2052
|
+
通过 9 项。
|
|
2053
|
+
- 最新完整验证:`npm run release:check` 通过,覆盖 78 个 node:test 用例,其中 77 个
|
|
2054
|
+
通过、1 个 real-browser smoke 按默认配置跳过;extension zip 内容检查通过,包含 13 个文件;
|
|
2055
|
+
npm package 内容检查通过,包含 42 个文件;`YUNTI_E2E=1 npm run test:e2e` 在当前环境
|
|
2056
|
+
因缺少 Playwright/Chromium 被跳过;token 残留检查无输出。
|
|
2057
|
+
- `extension/tool-handlers.js` 已为 `yunti_scroll` content-script passthrough 结果增量追加
|
|
2058
|
+
结构化字段:`action: "scroll"`、`ok`、`recoverable`、`nextStepHint` 和
|
|
2059
|
+
`browserSessionId`,同时保留 content-script 返回的 `scrolled`、`deltaX/Y`、`target`、
|
|
2060
|
+
`before/after` 兼容字段;本切片不改 document/container 滚动选择、坐标命中或
|
|
2061
|
+
`scrollBy` 派发语义。
|
|
2062
|
+
- `tests/tool-handlers.test.js` 已更新 scroll passthrough 断言,确保结构化字段不会替代或
|
|
2063
|
+
破坏既有 scroll 返回。
|
|
2064
|
+
- 最新 targeted 验证:`git diff --check` 通过;`node --test tests/tool-handlers.test.js`
|
|
2065
|
+
通过 9 项。
|
|
2066
|
+
- 最新完整验证:`npm run release:check` 通过,覆盖 78 个 node:test 用例,其中 77 个
|
|
2067
|
+
通过、1 个 real-browser smoke 按默认配置跳过;extension zip 内容检查通过,包含 13 个文件;
|
|
2068
|
+
npm package 内容检查通过,包含 42 个文件;`YUNTI_E2E=1 npm run test:e2e` 在当前环境
|
|
2069
|
+
因缺少 Playwright/Chromium 被跳过;token 残留检查无输出。
|
|
2070
|
+
- `extension/tool-handlers.js` 已为 selector fallback `yunti_fill` content-script passthrough
|
|
2071
|
+
结果增量追加结构化字段:`action: "fill"`、`target`、`ok`、`recoverable`、
|
|
2072
|
+
`nextStepHint`、`selector`、`method: "selector"` 和 `browserSessionId`,同时保留
|
|
2073
|
+
content-script 返回的 `filled`、`element`、`valueLength` 兼容字段;本切片不改
|
|
2074
|
+
content-script fill 的 `scrollIntoView`、`setEditableText`、input/change 事件或
|
|
2075
|
+
contenteditable 处理语义。
|
|
2076
|
+
- `tests/tool-handlers.test.js` 已新增 selector fill passthrough 断言,确保结构化字段不会替代或
|
|
2077
|
+
破坏既有 content-script selector fill 返回。
|
|
2078
|
+
- 最新 targeted 验证:`git diff --check` 通过;`node --test tests/tool-handlers.test.js`
|
|
2079
|
+
通过 10 项。
|
|
2080
|
+
- 最新完整验证:`npm run release:check` 通过,覆盖 79 个 node:test 用例,其中 78 个
|
|
2081
|
+
通过、1 个 real-browser smoke 按默认配置跳过;extension zip 内容检查通过,包含 13 个文件;
|
|
2082
|
+
npm package 内容检查通过,包含 42 个文件;`YUNTI_E2E=1 npm run test:e2e` 在当前环境
|
|
2083
|
+
因缺少 Playwright/Chromium 被跳过;token 残留检查无输出。
|
|
2084
|
+
- `extension/tool-handlers.js` 已为 `yunti_type_text` uid path 和 content-script
|
|
2085
|
+
passthrough 结果增量追加结构化字段:`action: "type_text"`、`target`、`ok`、
|
|
2086
|
+
`recoverable`、`nextStepHint` 和 `browserSessionId`,同时保留 uid path 的 `typed`、
|
|
2087
|
+
`uid`、`text`、`method` 兼容字段,以及 content-script 返回的 `typed`、`element`、
|
|
2088
|
+
`textLength`、`mode` 兼容字段;本切片不改 CDP keyboard 派发、selector/coordinate/focused
|
|
2089
|
+
fallback 或 content-script `setEditableText` 语义。
|
|
2090
|
+
- `tests/tool-handlers.test.js` 已新增 uid type_text 和 selector type_text 断言,确保结构化字段
|
|
2091
|
+
不会替代或破坏既有 type_text 返回。
|
|
2092
|
+
- 最新 targeted 验证:`git diff --check` 通过;`node --test tests/tool-handlers.test.js`
|
|
2093
|
+
通过 12 项。
|
|
2094
|
+
- 最新完整验证:`npm run release:check` 通过,覆盖 81 个 node:test 用例,其中 80 个
|
|
2095
|
+
通过、1 个 real-browser smoke 按默认配置跳过;extension zip 内容检查通过,包含 13 个文件;
|
|
2096
|
+
npm package 内容检查通过,包含 42 个文件;`YUNTI_E2E=1 npm run test:e2e` 在当前环境
|
|
2097
|
+
因缺少 Playwright/Chromium 被跳过;token 残留检查无输出。
|
|
2098
|
+
- `extension/tool-handlers.js` 已为 `yunti_press_key` uid path 和 content-script
|
|
2099
|
+
passthrough 结果增量追加结构化字段:`action: "press_key"`、`target`、`ok`、
|
|
2100
|
+
`recoverable`、`nextStepHint` 和 `browserSessionId`,同时保留 uid path 的 `pressed`、
|
|
2101
|
+
`uid`、`key` 兼容字段,以及 content-script 返回的 `pressed`、`key`、`element`、
|
|
2102
|
+
`valueChanged` 兼容字段;本切片不改 CDP keyDown/keyUp 派发、selector/coordinate/focused
|
|
2103
|
+
fallback 或 content-script key event 语义。
|
|
2104
|
+
- `tests/tool-handlers.test.js` 已新增 uid press_key 和 selector press_key 断言,确保结构化字段
|
|
2105
|
+
不会替代或破坏既有 press_key 返回。
|
|
2106
|
+
- 最新 targeted 验证:`git diff --check` 通过;`node --test tests/tool-handlers.test.js`
|
|
2107
|
+
通过 14 项。
|
|
2108
|
+
- 最新完整验证:`npm run release:check` 通过,覆盖 83 个 node:test 用例,其中 82 个
|
|
2109
|
+
通过、1 个 real-browser smoke 按默认配置跳过;extension zip 内容检查通过,包含 13 个文件;
|
|
2110
|
+
npm package 内容检查通过,包含 42 个文件;`YUNTI_E2E=1 npm run test:e2e` 在当前环境
|
|
2111
|
+
因缺少 Playwright/Chromium 被跳过;token 残留检查无输出。
|
|
2112
|
+
- `extension/tool-handlers.js` 已为 `yunti_upload_file` uid path 和 selector path
|
|
2113
|
+
结果增量追加结构化字段:`action: "upload_file"`、`target`、`ok`、`recoverable`、
|
|
2114
|
+
`nextStepHint` 和 `browserSessionId`,同时保留 `uploaded`、`fileCount`、`filePaths`
|
|
2115
|
+
兼容字段;本切片不改 `DOM.getNodeForLocation`、`DOM.querySelector`、`DOM.describeNode`
|
|
2116
|
+
或 `DOM.setFileInputFiles` 上传语义。
|
|
2117
|
+
- `tests/tool-handlers.test.js` 已新增 uid upload_file 和 selector upload_file 断言,确保结构化
|
|
2118
|
+
字段不会替代或破坏既有 upload 返回。
|
|
2119
|
+
- 最新 targeted 验证:`git diff --check` 通过;`node --test tests/tool-handlers.test.js`
|
|
2120
|
+
通过 16 项。
|
|
2121
|
+
- 最新完整验证:`npm run release:check` 通过,覆盖 85 个 node:test 用例,其中 84 个
|
|
2122
|
+
通过、1 个 real-browser smoke 按默认配置跳过;extension zip 内容检查通过,包含 13 个文件;
|
|
2123
|
+
npm package 内容检查通过,包含 42 个文件;`YUNTI_E2E=1 npm run test:e2e` 在当前环境
|
|
2124
|
+
因缺少 Playwright/Chromium 被跳过;token 残留检查无输出。
|
|
2125
|
+
- `extension/tool-handlers.js` 已为 coordinate `yunti_drag` 结果增量追加结构化字段:
|
|
2126
|
+
`action: "drag"`、`target`、`ok`、`recoverable`、`nextStepHint` 和
|
|
2127
|
+
`browserSessionId`,同时保留 `dragged`、`from`、`to`、`steps` 兼容字段;本切片不改
|
|
2128
|
+
CDP `Input.dispatchMouseEvent` 的 mousePressed / mouseMoved / mouseReleased 派发语义。
|
|
2129
|
+
- `tests/tool-handlers.test.js` 已新增 coordinate drag 断言,确保结构化字段不会替代或破坏
|
|
2130
|
+
既有 drag 返回,并锁定 mouse event 序列。
|
|
2131
|
+
- 最新 targeted 验证:`git diff --check` 通过;`node --test tests/tool-handlers.test.js`
|
|
2132
|
+
通过 17 项。
|
|
2133
|
+
- 最新完整验证:`npm run release:check` 通过,覆盖 86 个 node:test 用例,其中 85 个
|
|
2134
|
+
通过、1 个 real-browser smoke 按默认配置跳过;extension zip 内容检查通过,包含 13 个文件;
|
|
2135
|
+
npm package 内容检查通过,包含 42 个文件;`YUNTI_E2E=1 npm run test:e2e` 在当前环境
|
|
2136
|
+
因缺少 Playwright/Chromium 被跳过;token 残留检查无输出。
|
|
2137
|
+
|
|
2138
|
+
### Action result 覆盖清单(2026-07-03)
|
|
2139
|
+
|
|
2140
|
+
已完成结构化字段的 action paths:
|
|
2141
|
+
|
|
2142
|
+
- `yunti_click`:uid path、coordinate fallback、selector passthrough;保留 `clicked`、
|
|
2143
|
+
`uid`、`selector`、`x/y`、`method`、`element` 等兼容字段。
|
|
2144
|
+
- `yunti_hover`:uid path、coordinate fallback、selector fallback;保留 `hovered`、
|
|
2145
|
+
`uid`、`selector`、`x/y`、`method` 等兼容字段。
|
|
2146
|
+
- `yunti_fill`:uid keyboard path、uid select path、selector passthrough;保留 `filled`、
|
|
2147
|
+
`uid`、`selector`、`method`、`value`、`valueLength`、`element` 等兼容字段。
|
|
2148
|
+
- `yunti_scroll`:content-script passthrough;保留 `scrolled`、`deltaX/Y`、`target`、
|
|
2149
|
+
`before/after` 等兼容字段。注意 scroll 原有 `target` 是兼容字段,结构化字段只增量补
|
|
2150
|
+
`action`、`ok`、`recoverable`、`nextStepHint`、`browserSessionId`。
|
|
2151
|
+
- `yunti_type_text`:uid CDP keyboard path、selector passthrough;保留 `typed`、`uid`、
|
|
2152
|
+
`text`、`method`、`element`、`textLength`、`mode` 等兼容字段。
|
|
2153
|
+
- `yunti_press_key`:uid CDP keyboard path、selector passthrough;保留 `pressed`、`uid`、
|
|
2154
|
+
`key`、`element`、`valueChanged` 等兼容字段。
|
|
2155
|
+
- `yunti_upload_file`:uid path、selector path;保留 `uploaded`、`fileCount`、`filePaths`
|
|
2156
|
+
等兼容字段。
|
|
2157
|
+
- `yunti_drag`:coordinate path;保留 `dragged`、`from`、`to`、`steps` 等兼容字段。
|
|
2158
|
+
- `yunti_select`:standalone content-script passthrough;保留 `selected`、`element`、
|
|
2159
|
+
`value` 等兼容字段。
|
|
2160
|
+
- `yunti_select`:uid/value 和 uid/text runtime paths;保留 `selected`、`uid`、
|
|
2161
|
+
`value`、`text`、`selectedIndex` 等兼容字段,同时保留 selector/value 兼容路径。
|
|
2162
|
+
- `yunti_fill_form`:aggregate summary;保留 `filled`、`failed`、`results`、
|
|
2163
|
+
`browserSessionId` 等兼容字段。
|
|
2164
|
+
|
|
2165
|
+
本覆盖清单确认 P6.2 action result 第一阶段已覆盖主要 action surfaces,并且 `yunti_select`
|
|
2166
|
+
已完成 selector/value、uid/value、uid/text 三条操作路径;后续可以进入更深的
|
|
2167
|
+
fill/select/scroll 语义增强,但仍必须小切片推进,并保留兼容字段与 CDP fallback。
|
|
2168
|
+
|
|
2169
|
+
最新验证:`git diff --check` 通过;`npm run release:check` 通过,覆盖 86 个
|
|
2170
|
+
node:test 用例,其中 85 个通过、1 个 real-browser smoke 按默认配置跳过;extension zip
|
|
2171
|
+
内容检查通过,包含 13 个文件;npm package 内容检查通过,包含 42 个文件;本切片只更新
|
|
2172
|
+
文档和 skill,不涉及真实浏览器行为,未额外运行 `YUNTI_E2E=1 npm run test:e2e`;token
|
|
2173
|
+
残留检查无输出。
|
|
2174
|
+
|
|
2175
|
+
- `extension/tool-handlers.js` 已为 standalone `yunti_select` content-script passthrough
|
|
2176
|
+
结果增量追加结构化字段:`action: "select"`、`target`、`ok`、`recoverable`、
|
|
2177
|
+
`nextStepHint` 和 `browserSessionId`,同时保留 `selected`、`element`、`value`
|
|
2178
|
+
兼容字段;本切片不改 content-script `selectElement` 的 value 设置或 input/change 事件
|
|
2179
|
+
派发语义。
|
|
2180
|
+
- `tests/tool-handlers.test.js` 已新增 selector select 断言,确保结构化字段不会替代或破坏
|
|
2181
|
+
既有 standalone select 返回。
|
|
2182
|
+
- 最新 targeted 验证:`git diff --check` 通过;`node --test tests/tool-handlers.test.js`
|
|
2183
|
+
通过 18 项。
|
|
2184
|
+
- 最新 full 验证:`git diff --check` 通过;`npm run release:check` 通过,覆盖 87 个
|
|
2185
|
+
node:test 用例,其中 86 个通过、1 个 real-browser smoke 按默认配置跳过;extension zip
|
|
2186
|
+
内容检查通过,包含 13 个文件;npm package 内容检查通过,包含 42 个文件;
|
|
2187
|
+
`YUNTI_E2E=1 npm run test:e2e` 已执行但因本地缺少 Playwright/Chromium 跳过;token
|
|
2188
|
+
残留检查无输出。
|
|
2189
|
+
- `extension/tool-handlers.js` 已为 aggregate `yunti_fill_form` summary 增量追加
|
|
2190
|
+
结构化字段:`action: "fill_form"`、`target`、`ok`、`recoverable`、`nextStepHint`
|
|
2191
|
+
和 `browserSessionId`,同时保留 `filled`、`failed`、`results` 兼容字段;本切片不改
|
|
2192
|
+
逐字段 `fillByUid` 或 content-script selector fill 语义。
|
|
2193
|
+
- `tests/tool-handlers.test.js` 已新增部分成功/部分失败的 fill_form aggregate 断言,确保
|
|
2194
|
+
结构化字段不会替代或破坏既有 aggregate summary 与 per-field results。
|
|
2195
|
+
- 最新 targeted 验证:`git diff --check` 通过;`node --test tests/tool-handlers.test.js`
|
|
2196
|
+
通过 19 项。
|
|
2197
|
+
- 最新 full 验证:`git diff --check` 通过;`npm run release:check` 通过,覆盖 88 个
|
|
2198
|
+
node:test 用例,其中 87 个通过、1 个 real-browser smoke 按默认配置跳过;extension zip
|
|
2199
|
+
内容检查通过,包含 13 个文件;npm package 内容检查通过,包含 42 个文件;
|
|
2200
|
+
`YUNTI_E2E=1 npm run test:e2e` 已执行但因本地缺少 Playwright/Chromium 跳过;token
|
|
2201
|
+
残留检查无输出。
|
|
2202
|
+
- `mcp/tools.js` 已为 `yunti_select` 增加 P6.2 uid / visible text 前置契约:schema
|
|
2203
|
+
继续要求当前 runtime 真实支持的 `selector` / `value`,并暴露 planned `uid` 和 `text`
|
|
2204
|
+
参数说明;usage hints 明确当前 runtime 仍保持 selector/value 兼容路径,并记录 observe、
|
|
2205
|
+
inspect options、wait、switch tab 的恢复路径;本切片不改 extension runtime 行为。
|
|
2206
|
+
- `tests/bridge.test.js` 已新增 `yunti_select` usage hints 断言,锁住 selector/value
|
|
2207
|
+
兼容边界、planned uid/text 参数和可用选项检查提示。
|
|
2208
|
+
- 最新 targeted 验证:`git diff --check` 通过;`node --test tests/bridge.test.js`
|
|
2209
|
+
通过 65 项。
|
|
2210
|
+
- 最新 full 验证:`git diff --check` 通过;`npm run release:check` 通过,覆盖 89 个
|
|
2211
|
+
node:test 用例,其中 88 个通过、1 个 real-browser smoke 按默认配置跳过;extension zip
|
|
2212
|
+
内容检查通过,包含 13 个文件;npm package 内容检查通过,包含 42 个文件;本切片只更新
|
|
2213
|
+
schema、usage hints、文档和 skill,不改真实浏览器 runtime 行为,未额外运行
|
|
2214
|
+
`YUNTI_E2E=1 npm run test:e2e`;token 残留检查无输出。
|
|
2215
|
+
- `extension/tool-handlers.js` 已为 `yunti_select` 增加 `uid + value` runtime path:
|
|
2216
|
+
复用当前 `browserSessionId` 最新 observe/snapshot uid map 定位元素,只按 option
|
|
2217
|
+
`value` 匹配并派发 `change` / `input` 事件;selector/value 兼容路径保持不变,本切片
|
|
2218
|
+
不实现 visible text 选择。
|
|
2219
|
+
- `mcp/tools.js`、`docs/TOOL_GUIDE.md` 和 `skills/yunti-browser-runtime/SKILL.md`
|
|
2220
|
+
已同步为 selector/value 与 uid/value 均可用,visible option `text` 仍为计划中能力。
|
|
2221
|
+
- `tests/tool-handlers.test.js` 已新增 uid select value path 断言,确保结果保留
|
|
2222
|
+
`selected`、`uid`、`value`、`selectedIndex` 等兼容字段并追加结构化 action result。
|
|
2223
|
+
- `tests/bridge.test.js` 已更新 select usage hints 断言,锁住 schema 的 selector 或 uid
|
|
2224
|
+
二选一路径,以及 visible text 仍 planned 的边界。
|
|
2225
|
+
- 最新 targeted 验证:`git diff --check` 通过;`node --test tests/tool-handlers.test.js
|
|
2226
|
+
tests/bridge.test.js` 通过 85 项。
|
|
2227
|
+
- 最新 full 验证:`git diff --check` 通过;`npm run release:check` 通过,覆盖 90 个
|
|
2228
|
+
node:test 用例,其中 89 个通过、1 个 real-browser smoke 按默认配置跳过;extension zip
|
|
2229
|
+
内容检查通过,包含 13 个文件;npm package 内容检查通过,包含 42 个文件;
|
|
2230
|
+
`YUNTI_E2E=1 npm run test:e2e` 已执行但因本地缺少 Playwright/Chromium 跳过;token
|
|
2231
|
+
残留检查无输出。
|
|
2232
|
+
- `extension/tool-handlers.js` 已为 `yunti_select` 增加 `uid + visible text` runtime path:
|
|
2233
|
+
复用 fresh uid 定位 select,通过 option 可见文本精确匹配并派发 `change` / `input`
|
|
2234
|
+
事件;selector/value 和 uid/value 路径保持不变。
|
|
2235
|
+
- `mcp/tools.js`、`docs/TOOL_GUIDE.md` 和 `skills/yunti-browser-runtime/SKILL.md`
|
|
2236
|
+
已同步为 selector/value、uid/value、uid/text 三条路径均可用,同时明确 selector
|
|
2237
|
+
路径仍保持 selector/value 兼容。
|
|
2238
|
+
- `tests/tool-handlers.test.js` 已新增 uid select visible text path 断言,确保结果保留
|
|
2239
|
+
`selected`、`uid`、`value`、`text`、`selectedIndex` 等兼容字段并追加结构化 action result。
|
|
2240
|
+
- `tests/bridge.test.js` 已更新 select usage hints 断言,锁住 schema 的 selector/value、
|
|
2241
|
+
uid/value、uid/text 三条路径。
|
|
2242
|
+
- 最新 targeted 验证:`git diff --check` 通过;`node --test tests/tool-handlers.test.js
|
|
2243
|
+
tests/bridge.test.js` 通过 86 项。
|
|
2244
|
+
- 最新 full 验证:`git diff --check` 通过;`npm run release:check` 通过,覆盖 91 个
|
|
2245
|
+
node:test 用例,其中 90 个通过、1 个 real-browser smoke 按默认配置跳过;extension zip
|
|
2246
|
+
内容检查通过,包含 13 个文件;npm package 内容检查通过,包含 42 个文件;
|
|
2247
|
+
`YUNTI_E2E=1 npm run test:e2e` 已执行但因本地缺少 Playwright/Chromium 跳过;token
|
|
2248
|
+
残留检查无输出。
|
|
2249
|
+
- `yunti_select` uid 失败路径已开始返回结构化可恢复诊断:当 uid path 选项未命中时,
|
|
2250
|
+
返回 `selected: false`、`code: "OPTION_NOT_FOUND"`、`matchMode`、`targetOption`、
|
|
2251
|
+
`availableValues` / `availableTexts` 和 `recoveryHint`,提示先检查可用选项再重试;当
|
|
2252
|
+
uid 指向非 select 元素时,返回 `code: "NOT_SELECT"` 和
|
|
2253
|
+
`recoveryHint.decision: "use-select-element-or-selector-fallback"`。本切片保留
|
|
2254
|
+
selector/value、uid/value、uid/text 成功路径和兼容字段,不恢复为抛错式失败。
|
|
2255
|
+
- 最新 targeted 验证:`node --test tests/tool-handlers.test.js tests/bridge.test.js`
|
|
2256
|
+
通过 93 项。
|
|
2257
|
+
- 最新 full 验证:`git diff --check` 通过;`node --test tests/tool-handlers.test.js
|
|
2258
|
+
tests/bridge.test.js` 通过 93 项;`npm run release:check` 通过,覆盖 98 个 node:test
|
|
2259
|
+
用例,其中 97 个通过、1 个 real-browser smoke 按默认配置跳过;npm package 内容检查通过,
|
|
2260
|
+
包含 42 个文件;extension zip 内容检查通过,包含 13 个文件;`YUNTI_E2E=1 npm run
|
|
2261
|
+
test:e2e` 已执行但因本地缺少 Playwright/Chromium 跳过;token 残留检查无输出。
|
|
2262
|
+
- `yunti_select` selector/value 失败路径已补齐结构化可恢复诊断:当 content-script
|
|
2263
|
+
返回的实际值与目标 `value` 不匹配时,返回 `selected: false`、
|
|
2264
|
+
`code: "OPTION_NOT_FOUND"`、`actualValue`、`matchMode: "value"`、`targetOption`
|
|
2265
|
+
和 `recoveryHint`;当 selector 指向非 select 目标或 content-script 抛错时,返回
|
|
2266
|
+
`code: "SELECTOR_SELECT_FAILED"` 与 `recoveryHint.decision:
|
|
2267
|
+
"use-select-element-or-uid-fallback"`。本切片保留 selector/value 成功路径和既有兼容字段,
|
|
2268
|
+
只在失败时追加结构化诊断。
|
|
2269
|
+
- 最新 targeted 验证:`node --test tests/tool-handlers.test.js tests/bridge.test.js`
|
|
2270
|
+
通过 95 项。
|
|
2271
|
+
- 最新 full 验证:`git diff --check` 通过;`node --test tests/tool-handlers.test.js
|
|
2272
|
+
tests/bridge.test.js` 通过 95 项;`npm run release:check` 通过,覆盖 100 个 node:test
|
|
2273
|
+
用例,其中 99 个通过、1 个 real-browser smoke 按默认配置跳过;npm package 内容检查通过,
|
|
2274
|
+
包含 42 个文件;extension zip 内容检查通过,包含 13 个文件;`YUNTI_E2E=1 npm run
|
|
2275
|
+
test:e2e` 已执行但因本地缺少 Playwright/Chromium 跳过;token 残留检查无输出。
|
|
2276
|
+
- P6.2 action path 覆盖清单已重新审计:主要 action result surfaces 均有结构化字段覆盖,
|
|
2277
|
+
`yunti_select` 的 selector/value、uid/value、uid/text 路径均已落地并记录;下一步明确
|
|
2278
|
+
转向更深 fill/select/scroll 语义增强,而不是继续停留在 select 缺口。
|
|
2279
|
+
- 最新覆盖审计验证:`git diff --check` 通过;`npm run release:check` 通过,覆盖
|
|
2280
|
+
91 个 node:test 用例,其中 90 个通过、1 个 real-browser smoke 按默认配置跳过;
|
|
2281
|
+
npm package 内容检查通过,包含 42 个文件;extension zip 内容检查通过,包含 13 个文件;
|
|
2282
|
+
token 残留检查无输出。本次为 docs-only 覆盖审计补记,未重新执行真实浏览器 E2E。
|
|
2283
|
+
- `yunti_fill` uid contenteditable 路径已开始进入更深语义增强:保持现有 CDP keyboard
|
|
2284
|
+
输入流程不变,但当目标为 contenteditable 时返回 `method: "contenteditable"`,并附带
|
|
2285
|
+
`before` / `after` textLength 摘要和更明确的验证提示。selector fill 和普通 keyboard
|
|
2286
|
+
path 兼容字段保持不变。
|
|
2287
|
+
- 最新 targeted 验证:`node --test tests/tool-handlers.test.js` 通过 22 项。
|
|
2288
|
+
- 最新 full 验证:`git diff --check` 通过;`node --test tests/tool-handlers.test.js
|
|
2289
|
+
tests/bridge.test.js` 通过 87 项;`npm run release:check` 通过,覆盖 92 个 node:test
|
|
2290
|
+
用例,其中 91 个通过、1 个 real-browser smoke 按默认配置跳过;npm package 内容检查通过,
|
|
2291
|
+
包含 42 个文件;extension zip 内容检查通过,包含 13 个文件;`YUNTI_E2E=1 npm run
|
|
2292
|
+
test:e2e` 已执行但因本地缺少 Playwright/Chromium 跳过;token 残留检查无输出。
|
|
2293
|
+
- `yunti_fill` 失败路径开始返回结构化恢复诊断:selector 抛错和 uid select option miss
|
|
2294
|
+
不再只依赖外层通用 error,而是返回 `filled: false`、`ok: false`、`recoverable: true`、
|
|
2295
|
+
`code`、`recoveryHint` 和 `nextStepHint`。select option miss 会附带
|
|
2296
|
+
`availableValues` / `availableTexts`,帮助 agent 先检查可选项再重试。本切片保持所有成功
|
|
2297
|
+
fill 兼容字段与派发语义不变。
|
|
2298
|
+
- 最新 targeted 验证:`node --check extension/tool-handlers.js` 通过;
|
|
2299
|
+
`node --test tests/tool-handlers.test.js` 通过 32 项。
|
|
2300
|
+
- 最新 full 验证:`git diff --check` 通过;token 残留检查无输出;
|
|
2301
|
+
`YUNTI_E2E=1 npm run test:e2e` 已执行但因本地缺少 Playwright/Chromium 跳过;
|
|
2302
|
+
`npm run release:check` 通过,覆盖 102 个 node:test 用例,其中 101 个通过、1 个
|
|
2303
|
+
real-browser smoke 按默认配置跳过;npm package 内容检查通过,包含 42 个文件;
|
|
2304
|
+
extension zip 内容检查通过,包含 13 个文件。
|
|
2305
|
+
- `yunti_fill_form` 聚合结果现在会保留单字段结构化失败诊断:批量填表仍保留
|
|
2306
|
+
`filled`、`failed`、`results`、`action: "fill_form"`、`target`、`ok`、`recoverable`
|
|
2307
|
+
和 `nextStepHint` 兼容字段;失败字段的 `results[]` item 会继续携带来自 `yunti_fill`
|
|
2308
|
+
的 `code`、`recoveryHint`、`availableValues` / `availableTexts` 和字段级
|
|
2309
|
+
`nextStepHint`,帮助 agent 对单个失败字段恢复,而不是只看到 `{ ok: false, error }`。
|
|
2310
|
+
- 最新 targeted 验证:`node --check extension/tool-handlers.js` 通过;
|
|
2311
|
+
`node --test tests/tool-handlers.test.js` 通过 32 项。
|
|
2312
|
+
- 最新 full 验证:`git diff --check` 通过;token 残留检查无输出;
|
|
2313
|
+
`YUNTI_E2E=1 npm run test:e2e` 已执行但因本地缺少 Playwright/Chromium 跳过;
|
|
2314
|
+
`npm run release:check` 通过,覆盖 102 个 node:test 用例,其中 101 个通过、1 个
|
|
2315
|
+
real-browser smoke 按默认配置跳过;npm package 内容检查通过,包含 42 个文件;
|
|
2316
|
+
extension zip 内容检查通过,包含 13 个文件。
|
|
2317
|
+
- `yunti_fill` 不可编辑目标诊断已补齐:uid fill 会在派发键盘事件前检查目标是否隐藏、
|
|
2318
|
+
disabled、readonly 或不是 input/textarea/select/contenteditable 等可编辑目标;selector
|
|
2319
|
+
fill 的 content-script 路径也会在 `setEditableText` 前检查 hidden/no-size、disabled、
|
|
2320
|
+
readonly 和不可编辑 input type。失败时返回或归类为 `code: "TARGET_NOT_EDITABLE"`,
|
|
2321
|
+
透传 `filled: false`、`ok: false`、`recoverable: true`、`recoveryHint` 和
|
|
2322
|
+
`nextStepHint`,uid 路径还会附带轻量 `element` 诊断元数据。本切片不改变成功 fill、
|
|
2323
|
+
select、contenteditable 或 CDP fallback 兼容字段。
|
|
2324
|
+
- 最新 targeted 验证:`node --check extension/tool-handlers.js` 通过;
|
|
2325
|
+
`node --check extension/content.js` 通过;`node --test tests/tool-handlers.test.js`
|
|
2326
|
+
通过 34 项。
|
|
2327
|
+
- 最新 full 验证:`git diff --check` 通过;token 残留检查无输出;
|
|
2328
|
+
`YUNTI_E2E=1 npm run test:e2e` 已执行但因本地缺少 Playwright/Chromium 跳过;
|
|
2329
|
+
`npm run release:check` 通过,覆盖 104 个 node:test 用例,其中 103 个通过、1 个
|
|
2330
|
+
real-browser smoke 按默认配置跳过;npm package 内容检查通过,包含 42 个文件;
|
|
2331
|
+
extension zip 内容检查通过,包含 13 个文件。
|
|
2332
|
+
- `yunti_observe_page` 字段状态提示已补齐:观察元素现在可追加 `editable`、`fillable`、
|
|
2333
|
+
`readOnly`、`fillBlockReason` 和 select `options[]` 摘要,帮助 agent 在调用
|
|
2334
|
+
`yunti_fill` / `yunti_select` 前判断字段是否可填、是否 readonly/disabled/hidden,以及
|
|
2335
|
+
可选项 value/text。该切片只追加观察字段和使用提示,不改变 uid 生命周期、redaction 默认值、
|
|
2336
|
+
click/fill/select/scroll/CDP/截图/network/console 等既有动作能力。
|
|
2337
|
+
- 最新 targeted 验证:`node --check extension/dom-observer.js` 通过;
|
|
2338
|
+
`node --test tests/dom-observer.test.js` 通过 5 项;`node --test tests/bridge.test.js`
|
|
2339
|
+
通过 65 项。
|
|
2340
|
+
- 最新 full 验证:`git diff --check` 通过;token 残留检查无输出;
|
|
2341
|
+
`YUNTI_E2E=1 npm run test:e2e` 已执行但因本地缺少 Playwright/Chromium 跳过;
|
|
2342
|
+
`npm run release:check` 通过,覆盖 105 个 node:test 用例,其中 104 个通过、1 个
|
|
2343
|
+
real-browser smoke 按默认配置跳过;npm package 内容检查通过,包含 42 个文件;
|
|
2344
|
+
extension zip 内容检查通过,包含 13 个文件。
|
|
2345
|
+
- `yunti_observe_page` select 当前状态提示已补齐:select 元素现在可追加
|
|
2346
|
+
`selectedIndex`、`selectedValue`、`selectedValueRedacted` 和 `selectedText`,并保留
|
|
2347
|
+
已有 `options[]` 摘要。Agent 可以先读取当前选中项,再决定是否需要调用
|
|
2348
|
+
`yunti_select`,避免重复选择或盲目试错。本切片只追加观察元数据,不改变
|
|
2349
|
+
`yunti_select` 执行路径、uid 生命周期或 redaction 默认值。
|
|
2350
|
+
- 最新 targeted 验证:`node --check extension/dom-observer.js` 通过;
|
|
2351
|
+
`node --test tests/dom-observer.test.js` 通过 5 项。
|
|
2352
|
+
- `yunti_select` disabled option 诊断已补齐:uid/value、uid/text 和 selector/value
|
|
2353
|
+
路径遇到已禁用 option 时会返回 `selected: false`、`code: "OPTION_DISABLED"`、
|
|
2354
|
+
`disabledValue`、`disabledText` 和结构化 `recoveryHint.decision:
|
|
2355
|
+
"choose-enabled-option-or-unlock-field"`,帮助 agent 选择可用选项、等待字段解锁或询问用户。
|
|
2356
|
+
本切片不改变正常 select 成功路径、uid 生命周期、selector/value 兼容路径或 CDP 能力。
|
|
2357
|
+
- 最新 targeted 验证:`node --check extension/tool-handlers.js` 通过;
|
|
2358
|
+
`node --check extension/content.js` 通过;`node --test tests/tool-handlers.test.js`
|
|
2359
|
+
通过 36 项。
|
|
2360
|
+
- 最新 full 验证:`git diff --check` 通过;token 残留检查无输出;
|
|
2361
|
+
`YUNTI_E2E=1 npm run test:e2e` 已执行但因本地缺少 Playwright/Chromium 跳过;
|
|
2362
|
+
`npm run release:check` 通过,覆盖 107 个 node:test 用例,其中 106 个通过、1 个
|
|
2363
|
+
real-browser smoke 按默认配置跳过;npm package 内容检查通过,包含 42 个文件;
|
|
2364
|
+
extension zip 内容检查通过,包含 13 个文件。
|
|
2365
|
+
- `yunti_scroll` 已开始支持 fresh scrollable container uid:`yunti_observe_page` 返回的
|
|
2366
|
+
`scrollableContainers[]` 会进入当前 browserSessionId 最新 uid map;调用 `yunti_scroll`
|
|
2367
|
+
传 `uid` 时会解析容器中心点并复用既有 content-script coordinate/container scroll 路径。
|
|
2368
|
+
本切片保留原 `target` 兼容字段,新增 `uid`、`method: "uid"` 和 `scrollTarget`。
|
|
2369
|
+
- 最新 targeted 验证:`node --test tests/tool-handlers.test.js` 通过 23 项。
|
|
2370
|
+
- 最新 full 验证:`git diff --check` 通过;`node --test tests/tool-handlers.test.js
|
|
2371
|
+
tests/bridge.test.js` 通过 88 项;`npm run release:check` 通过,覆盖 93 个 node:test
|
|
2372
|
+
用例,其中 92 个通过、1 个 real-browser smoke 按默认配置跳过;npm package 内容检查通过,
|
|
2373
|
+
包含 42 个文件;extension zip 内容检查通过,包含 13 个文件;`YUNTI_E2E=1 npm run
|
|
2374
|
+
test:e2e` 已执行但因本地缺少 Playwright/Chromium 跳过;token 残留检查无输出。
|
|
2375
|
+
- `yunti_scroll` 已增加无位移诊断:当 content-script 返回的 `before` / `after`
|
|
2376
|
+
scroll position 可比较时,runtime 会追加 `moved`;若位置未变化,则返回
|
|
2377
|
+
`code: "NO_SCROLL_MOVEMENT"`、`ok: false`、`recoverable: true`,并提示 observe、
|
|
2378
|
+
检查边界、尝试最近的 scrollable container uid 或停止重复同一 scroll。本切片不改变
|
|
2379
|
+
原有 scroll 派发路径和 `scrolled`、`target`、`before/after` 兼容字段。
|
|
2380
|
+
- 最新 targeted 验证:`node --test tests/tool-handlers.test.js` 通过 24 项。
|
|
2381
|
+
- 最新 full 验证:`git diff --check` 通过;`node --test tests/tool-handlers.test.js
|
|
2382
|
+
tests/bridge.test.js` 通过 89 项;`npm run release:check` 通过,覆盖 94 个 node:test
|
|
2383
|
+
用例,其中 93 个通过、1 个 real-browser smoke 按默认配置跳过;npm package 内容检查通过,
|
|
2384
|
+
包含 42 个文件;extension zip 内容检查通过,包含 13 个文件;`YUNTI_E2E=1 npm run
|
|
2385
|
+
test:e2e` 已执行但因本地缺少 Playwright/Chromium 跳过;token 残留检查无输出。
|
|
2386
|
+
- `yunti_scroll` 无位移诊断已增加方向性 `edgeHint`:在 `moved: false` 且 delta 方向
|
|
2387
|
+
可判断时,返回 `possible-bottom-edge`、`possible-top-edge`、`possible-right-edge` 或
|
|
2388
|
+
`possible-left-edge`,帮助 Agent 判断是否可能到达滚动边界、需要换方向、换容器或停止重复。
|
|
2389
|
+
本切片仍不改变原有 scroll 派发路径和兼容字段。
|
|
2390
|
+
- 最新 targeted 验证:`node --test tests/tool-handlers.test.js` 通过 25 项。
|
|
2391
|
+
- 最新 full 验证:`git diff --check` 通过;`node --test tests/tool-handlers.test.js
|
|
2392
|
+
tests/bridge.test.js` 通过 90 项;`npm run release:check` 通过,覆盖 95 个 node:test
|
|
2393
|
+
用例,其中 94 个通过、1 个 real-browser smoke 按默认配置跳过;npm package 内容检查通过,
|
|
2394
|
+
包含 42 个文件;extension zip 内容检查通过,包含 13 个文件;`YUNTI_E2E=1 npm run
|
|
2395
|
+
test:e2e` 已执行但因本地缺少 Playwright/Chromium 跳过;token 残留检查无输出。
|
|
2396
|
+
- `yunti_scroll` 无位移诊断已新增结构化 `recoveryHint`:在
|
|
2397
|
+
`NO_SCROLL_MOVEMENT` 时返回 `reason`、`nextAction`、`recommendedTools`、
|
|
2398
|
+
`currentTarget`、`edgeHint`,若使用 fresh scrollable container uid,还会附带
|
|
2399
|
+
`lastObservedContainer` 的滚动能力与 remaining pixels 摘要。该字段用于帮助 Agent
|
|
2400
|
+
判断 observe、换方向、换容器或停止重复 scroll;本切片不改变 scroll 派发路径和兼容字段。
|
|
2401
|
+
- 最新 targeted 验证:`node --test tests/tool-handlers.test.js` 通过 26 项。
|
|
2402
|
+
- 最新 full 验证:`git diff --check` 通过;`node --test tests/tool-handlers.test.js
|
|
2403
|
+
tests/bridge.test.js` 通过 91 项;`npm run release:check` 通过,覆盖 96 个 node:test
|
|
2404
|
+
用例,其中 95 个通过、1 个 real-browser smoke 按默认配置跳过;npm package 内容检查通过,
|
|
2405
|
+
包含 42 个文件;extension zip 内容检查通过,包含 13 个文件;`YUNTI_E2E=1 npm run
|
|
2406
|
+
test:e2e` 已执行但因本地缺少 Playwright/Chromium 跳过;token 残留检查无输出。
|
|
2407
|
+
- `yunti_scroll` 无位移恢复提示已新增 `recoveryHint.suggestedRetry`:当
|
|
2408
|
+
`edgeHint` 能推导出反向方向时,返回一次性反向 `deltaX` / `deltaY`;uid scroll
|
|
2409
|
+
路径会保留同一个 fresh container uid,方便 Agent 尝试一次反向滚动后立即重新 observe。
|
|
2410
|
+
该字段是纯新增诊断信息,不改变 scroll 派发路径、兼容字段、`nextAction` 或既有
|
|
2411
|
+
`recoveryHint` 结构。
|
|
2412
|
+
- 最新 targeted 验证:`node --test tests/tool-handlers.test.js tests/bridge.test.js`
|
|
2413
|
+
通过 91 项。
|
|
2414
|
+
- 最新 full 验证:`git diff --check` 通过;`node --test tests/tool-handlers.test.js
|
|
2415
|
+
tests/bridge.test.js` 通过 91 项;`npm run release:check` 通过,覆盖 96 个 node:test
|
|
2416
|
+
用例,其中 95 个通过、1 个 real-browser smoke 按默认配置跳过;npm package 内容检查通过,
|
|
2417
|
+
包含 42 个文件;extension zip 内容检查通过,包含 13 个文件;`YUNTI_E2E=1 npm run
|
|
2418
|
+
test:e2e` 已执行但因本地缺少 Playwright/Chromium 跳过;token 残留检查无输出。
|
|
2419
|
+
- `yunti_scroll` 无位移恢复提示已新增 `recoveryHint.decision`:在
|
|
2420
|
+
`NO_SCROLL_MOVEMENT` 时根据 `edgeHint` 和是否使用 fresh container uid,返回机器可读的
|
|
2421
|
+
恢复决策,例如 `observe-for-scrollable-container`、
|
|
2422
|
+
`observe-for-horizontal-scrollable-container`、
|
|
2423
|
+
`retry-opposite-vertical-on-same-container-once`、
|
|
2424
|
+
`retry-opposite-horizontal-on-same-container-once` 或 `provide-nonzero-delta`。
|
|
2425
|
+
该字段帮助 Agent 在 `nextAction` 和 `suggestedRetry` 之间少做分支判断;本切片仍不改变
|
|
2426
|
+
scroll 派发路径、兼容字段或既有恢复字段。
|
|
2427
|
+
- 最新 targeted 验证:`node --test tests/tool-handlers.test.js tests/bridge.test.js`
|
|
2428
|
+
通过 91 项。
|
|
2429
|
+
- 最新 full 验证:`git diff --check` 通过;`node --test tests/tool-handlers.test.js
|
|
2430
|
+
tests/bridge.test.js` 通过 91 项;`npm run release:check` 通过,覆盖 96 个 node:test
|
|
2431
|
+
用例,其中 95 个通过、1 个 real-browser smoke 按默认配置跳过;npm package 内容检查通过,
|
|
2432
|
+
包含 42 个文件;extension zip 内容检查通过,包含 13 个文件;`YUNTI_E2E=1 npm run
|
|
2433
|
+
test:e2e` 已执行但因本地缺少 Playwright/Chromium 跳过;token 残留检查无输出。
|
|
2434
|
+
- `yunti_scroll` coordinate scroll 命中/回退诊断已补齐:当 content script 收到 `x` / `y`
|
|
2435
|
+
时,会返回 `coordinateTarget`、`scrollContainerFound` 和必要时的
|
|
2436
|
+
`coordinateScrollFallback: "document"`,用于区分坐标是否命中嵌套 scroll container,
|
|
2437
|
+
还是回退到 document 滚动。本切片只新增诊断字段,不改变 coordinate/document/uid
|
|
2438
|
+
scroll 派发行为。
|
|
2439
|
+
- `yunti_scroll` coordinate document fallback 恢复提示已补齐:当 handler 收到
|
|
2440
|
+
`coordinateScrollFallback: "document"` 时,成功结果保持 `ok: true` /
|
|
2441
|
+
`recoverable: false`,并新增 `coordinateFallbackHint` 与更明确的 `nextStepHint`,
|
|
2442
|
+
引导 Agent 重新 observe 并优先选择 fresh `scrollableContainers[]` uid,避免误判 nested
|
|
2443
|
+
panel 已经被滚动。
|
|
2444
|
+
- 最新 targeted 验证:`node --test tests/tool-handlers.test.js tests/bridge.test.js
|
|
2445
|
+
tests/content-scroll.test.js` 通过 107 项。
|
|
2446
|
+
- 最新 full 验证:`git diff --check` 通过;token 残留检查无输出;
|
|
2447
|
+
`YUNTI_E2E=1 npm run test:e2e` 已执行但因本地缺少 Playwright/Chromium 跳过;
|
|
2448
|
+
`npm run release:check` 通过,覆盖 113 个 node:test 用例,其中 112 个通过、1 个
|
|
2449
|
+
real-browser smoke 按默认配置跳过;npm package 内容检查通过,包含 42 个文件;
|
|
2450
|
+
extension zip 内容检查通过,包含 13 个文件。
|
|
2451
|
+
- `yunti_get_tool_usage_hints` wait-observe 恢复指导已补齐:action recovery workflow
|
|
2452
|
+
和 fill/select/scroll 的工具级 recovery 都明确建议,在异步 UI transition、表单校验、
|
|
2453
|
+
option 异步加载或内容继续加载时,使用 `yunti_wait_for` 等待预期 text/selector/state,
|
|
2454
|
+
然后重新 `yunti_observe_page` 并用 fresh uid 继续。本切片只更新 agent guidance
|
|
2455
|
+
和测试,不改变 runtime action 行为。
|
|
2456
|
+
- 最新 targeted 验证:`node --test tests/bridge.test.js` 通过 65 项。
|
|
2457
|
+
- 最新 full 验证:`git diff --check` 通过;token 残留检查无输出;
|
|
2458
|
+
`YUNTI_E2E=1 npm run test:e2e` 已执行但因本地缺少 Playwright/Chromium 跳过;
|
|
2459
|
+
`npm run release:check` 通过,覆盖 113 个 node:test 用例,其中 112 个通过、1 个
|
|
2460
|
+
real-browser smoke 按默认配置跳过;npm package 内容检查通过,包含 42 个文件;
|
|
2461
|
+
extension zip 内容检查通过,包含 13 个文件。
|
|
2462
|
+
|
|
2463
|
+
详细范围、非目标和验收标准见 `docs/NEXT_MAJOR_PLAN.md`。
|
|
2464
|
+
|
|
2465
|
+
## P6.3 Agent 工作流契约
|
|
2466
|
+
|
|
2467
|
+
状态:已完成
|
|
2468
|
+
|
|
2469
|
+
目标:
|
|
2470
|
+
|
|
2471
|
+
将 `observe -> act -> verify` 作为默认 Agent 使用范式写入 skill、tool hints 和文档,
|
|
2472
|
+
减少盲目重试和坐标操作。
|
|
2473
|
+
|
|
2474
|
+
P6.3 的一部分应前置到 P6.1 schema 合并时完成:
|
|
2475
|
+
|
|
2476
|
+
- `yunti_get_tool_usage_hints` 必须同步新增 observe-first guidance。
|
|
2477
|
+
- `skills/yunti-browser-runtime/SKILL.md` 应加入默认循环:
|
|
2478
|
+
`hints -> list targets -> observe -> act by uid -> wait if needed -> observe -> verify -> recover or continue`。
|
|
2479
|
+
- `docs/TOOL_GUIDE.md` 应补点击、填表、滚动找元素、切 tab、等待异步结果五个最小用例。
|
|
2480
|
+
- 提供可复制提示词,指导外部 Agent 避免盲目重复失败动作,并在提交、删除、支付、
|
|
2481
|
+
上传敏感文件或修改生产数据前请求用户确认。
|
|
2482
|
+
|
|
2483
|
+
详细范围、非目标和验收标准见 `docs/NEXT_MAJOR_PLAN.md`。
|
|
2484
|
+
|
|
2485
|
+
## P6.4 DOM 脱敏与页面内容策略
|
|
2486
|
+
|
|
2487
|
+
状态:已完成
|
|
2488
|
+
|
|
2489
|
+
目标:
|
|
2490
|
+
|
|
2491
|
+
把 DOM observation 的敏感内容脱敏提升为一等能力,与现有 network/console redaction
|
|
2492
|
+
形成统一安全边界。
|
|
2493
|
+
|
|
2494
|
+
P6.1 已前置最小 DOM observation 脱敏基线;P6.4 负责深化:
|
|
2495
|
+
|
|
2496
|
+
- `strict` 模式覆盖 email、phone、证件号/银行卡-like、地址-like 和正文中的 credential-like
|
|
2497
|
+
片段。
|
|
2498
|
+
- 对齐 DOM、network、console 的敏感词和字段策略。
|
|
2499
|
+
- 明确 learning memory、task history、diagnostic artifacts 默认不存 secret,并提供清理路径。
|
|
2500
|
+
- 明确截图默认是真实像素,不承诺被 DOM redaction 遮蔽。
|
|
2501
|
+
|
|
2502
|
+
P6.4.1 已落地:
|
|
2503
|
+
|
|
2504
|
+
- `strict` 模式会在 DOM observation 的 page title、label、name、visible text、
|
|
2505
|
+
placeholder、value preview、select selected value/text、options value/text 和
|
|
2506
|
+
scrollable container name 中遮蔽更广的 PII-like 内容。
|
|
2507
|
+
- 新增类别包括 `email`、`phone`、`payment_card` 和 `address`;payment card-like
|
|
2508
|
+
值要求 13-19 位数字且通过 Luhn 校验,减少普通长数字误伤。
|
|
2509
|
+
- `balanced` 仍保持默认 credential-like 保护,不因普通业务文本变长而过度遮蔽;
|
|
2510
|
+
`off` 仍只用于显式本地调试。
|
|
2511
|
+
- `docs/TOOL_GUIDE.md`、`skills/yunti-browser-runtime/SKILL.md`、`docs/SECURITY.md`
|
|
2512
|
+
和 `yunti_get_tool_usage_hints` 已同步 strict/balanced/off 的使用边界。
|
|
2513
|
+
- `tests/dom-observer.test.js` 已覆盖 strict PII 类别、select option text 脱敏、
|
|
2514
|
+
page title 脱敏和 balanced 普通业务文本不误伤。
|
|
2515
|
+
|
|
2516
|
+
P6.4.2 已落地:
|
|
2517
|
+
|
|
2518
|
+
- `mcp/redaction.js` 统一增强 likely-sensitive text 脱敏,覆盖 Bearer、JWT、
|
|
2519
|
+
private key、长 token-like、email、phone、Luhn-valid payment-card-like 和 address-like。
|
|
2520
|
+
- `yunti_remember_learning` 写入 title、detail、tags、source 前统一脱敏,避免 learning
|
|
2521
|
+
memory 成为 secret 或 PII-like 长期存储。
|
|
2522
|
+
- `yunti_list_console_messages` / `yunti_get_console_message` 返回的 text、stackTrace 和 args
|
|
2523
|
+
在缓存前统一脱敏。
|
|
2524
|
+
- `yunti_get_cdp_events` 保持 raw low-level diagnostics 语义,但文档和 tool hints 已明确
|
|
2525
|
+
这是例外,应在调试后用 `yunti_clear_cdp_events` 清理。
|
|
2526
|
+
|
|
2527
|
+
P6.4.3 已落地:
|
|
2528
|
+
|
|
2529
|
+
- `yunti_get_tool_usage_hints` 已为 `yunti_get_cdp_events`、`yunti_clear_cdp_events`、
|
|
2530
|
+
`yunti_take_screenshot` 和 `yunti_capture_visible_tab` 增加安全边界和清理 guidance。
|
|
2531
|
+
- Raw CDP 诊断明确优先使用 sanitized network/console 工具,必要时按 `method` 和 `limit`
|
|
2532
|
+
缩小范围,用后清理,且不复制 raw params 到聊天、文档或 learning memory。
|
|
2533
|
+
- Screenshot 诊断明确是真实可见像素,不受 DOM redaction 保护;优先 viewport 截图,
|
|
2534
|
+
只总结安全视觉结论,不把 raw image data 存入 learning memory。
|
|
2535
|
+
|
|
2536
|
+
详细范围、非目标和验收标准见 `docs/NEXT_MAJOR_PLAN.md`。
|
|
2537
|
+
|
|
2538
|
+
## P6.5 可选本地运行时控制台
|
|
2539
|
+
|
|
2540
|
+
状态:已完成;P6.5.1-P6.5.3 已完成
|
|
2541
|
+
|
|
2542
|
+
目标:
|
|
2543
|
+
|
|
2544
|
+
提供非必选的本地调试控制台,用于查看 bridge 状态、连接页面、最近工具调用、错误和
|
|
2545
|
+
stop/cancel 操作,同时保持 popup 零配置。
|
|
2546
|
+
|
|
2547
|
+
P6.5.1 完成范围:
|
|
2548
|
+
|
|
2549
|
+
- `yunti-browser-runtime console` 启动 bridge 并打印本地控制台 URL。
|
|
2550
|
+
- bridge 提供 `/console` 页面、`/console/state` 脱敏状态 JSON 和
|
|
2551
|
+
`/console/cancel-pending` 取消 runtime pending/queued 请求接口。
|
|
2552
|
+
- 控制台展示 connected pages、pending/queued requests、network/console/CDP 诊断数量和
|
|
2553
|
+
最近工具 activity;页面标题、用户信息、URL 和错误摘要统一走脱敏/URL 清洗。
|
|
2554
|
+
- 启用 `YUNTI_BROWSER_BRIDGE_TOKEN` 时,`/console/state` 和 cancel 接口仍受 token 保护;
|
|
2555
|
+
页面 shell 只提示需要受保护诊断,不泄露 session 明细。
|
|
2556
|
+
- cancel 只清理 runtime 仍在等待或排队的请求,不承诺撤销已经发生的浏览器副作用。
|
|
2557
|
+
|
|
2558
|
+
P6.5.2 完成范围:
|
|
2559
|
+
|
|
2560
|
+
- 增强空状态和 stale session 的操作指引。
|
|
2561
|
+
- 展示 bridge/package 与 extension version mismatch 警告。
|
|
2562
|
+
- `HEAD /console` 与 `GET /console` 一样返回 200,便于探活工具检查。
|
|
2563
|
+
- `doctor` JSON 和 human summary 中加入 console URL。
|
|
2564
|
+
|
|
2565
|
+
P6.5.3 完成范围:
|
|
2566
|
+
|
|
2567
|
+
- `YUNTI_E2E=1 npm run test:e2e` 覆盖真实扩展注册后控制台状态。
|
|
2568
|
+
- 验证 `HEAD /console`、`GET /console` 和 `/console/state` 都可用。
|
|
2569
|
+
- 验证 runtime version、expected extension version 和 session extension version 与
|
|
2570
|
+
package version 一致。
|
|
2571
|
+
- 验证真实页面连接后不会出现 `NO_CONNECTED_PAGES` 或
|
|
2572
|
+
`EXTENSION_VERSION_MISMATCH` warning。
|
|
2573
|
+
|
|
2574
|
+
P6.6.1 完成范围:
|
|
2575
|
+
|
|
2576
|
+
- 审计当前 `extension/manifest.json` 的 permissions / host_permissions。
|
|
2577
|
+
- 整理 Chrome Web Store / Edge Add-ons 所需的权限说明、隐私说明和素材清单。
|
|
2578
|
+
- 保留 unpacked extension 开发路径,不在第一刀里改变现有权限行为。
|
|
2579
|
+
- 新增 `docs/EXTENSION_DISTRIBUTION.md`,并从 README、Security 和 Roadmap 链接。
|
|
2580
|
+
|
|
2581
|
+
P6.6.2 完成范围:
|
|
2582
|
+
|
|
2583
|
+
- 起草面向 Chrome Web Store / Edge Add-ons 的权限说明和隐私披露文本。
|
|
2584
|
+
- 覆盖 `debugger`、`tabs`、`webRequest`、广泛 `http` / `https` host access、
|
|
2585
|
+
localhost bridge、DOM observation、screenshots、network/console diagnostics
|
|
2586
|
+
和 learning memory。
|
|
2587
|
+
- 只沉淀文案与决策依据;不在这一刀直接收窄 manifest 权限。
|
|
2588
|
+
- 新增 `docs/EXTENSION_STORE_COPY.md`,包含 short/long description、permission
|
|
2589
|
+
rationale、privacy-policy draft、store data disclosure guidance、reviewer notes
|
|
2590
|
+
和 final review checklist。
|
|
2591
|
+
|
|
2592
|
+
P6.6.3 完成范围:
|
|
2593
|
+
|
|
2594
|
+
- 决定商店版本前的权限策略:继续 broad host access、迁移到 optional host
|
|
2595
|
+
permissions、将 `webRequest` 诊断可选化,或明确 0.2.0 继续只保留 unpacked/npm
|
|
2596
|
+
分发路径。
|
|
2597
|
+
- 如果改变行为,需要同步 extension manifest/UX、`mcp/tools.js`、Tool Guide、skill、
|
|
2598
|
+
Security docs 和测试。
|
|
2599
|
+
- 新增 `docs/EXTENSION_PERMISSION_STRATEGY.md`,明确当前 npm/unpacked 路径保持完整能力;
|
|
2600
|
+
当前 broad-permission manifest 不建议默认直接提交商店;store-candidate track
|
|
2601
|
+
需要先设计 optional host access、missing-permission recovery 和 optional diagnostics。
|
|
2602
|
+
- 本切片不改变 extension manifest 或 runtime 行为。
|
|
2603
|
+
|
|
2604
|
+
P6.6.4 后置:
|
|
2605
|
+
|
|
2606
|
+
- 设计 store-candidate 权限 UX 和技术原型计划。
|
|
2607
|
+
- 明确 popup/doctor/MCP error/tool hints/Tool Guide/skill/tests 在 optional host access
|
|
2608
|
+
和 optional network diagnostics 下如何变化。
|
|
2609
|
+
|
|
2610
|
+
详细范围、非目标和验收标准见 `docs/NEXT_MAJOR_PLAN.md`。
|
|
2611
|
+
|
|
2612
|
+
## P6.6 浏览器扩展分发准备
|
|
2613
|
+
|
|
2614
|
+
状态:0.2.0 npm/unpacked 范围已完成;P6.6.4 后置到 post-0.2 store-candidate track
|
|
2615
|
+
|
|
2616
|
+
目标:
|
|
2617
|
+
|
|
2618
|
+
准备 Chrome Web Store / Edge Add-ons 上架材料和权限说明,降低最终用户手动加载扩展的
|
|
2619
|
+
安装成本,同时保留 unpacked extension 开发路径。
|
|
2620
|
+
|
|
2621
|
+
P6.6.1 已完成:
|
|
2622
|
+
|
|
2623
|
+
- `docs/EXTENSION_DISTRIBUTION.md` 记录当前 manifest 权限审计、官方策略参考、
|
|
2624
|
+
store submission checklist、隐私披露主题和权限收窄选项。
|
|
2625
|
+
- 该审计已接入 README、Security 和 Roadmap,避免后续发布商店版本前丢失上下文。
|
|
2626
|
+
- 本切片不改变 extension runtime 行为,也不收窄 manifest 权限。
|
|
2627
|
+
|
|
2628
|
+
P6.6.1 最新验证:
|
|
2629
|
+
|
|
2630
|
+
- `git diff --check` 通过。
|
|
2631
|
+
- token 残留检查无输出。
|
|
2632
|
+
- `npm run check` 通过。
|
|
2633
|
+
- `npm test` 通过,覆盖 126 个 node:test 用例,其中 125 个通过、1 个默认真实浏览器
|
|
2634
|
+
smoke 按配置跳过。
|
|
2635
|
+
- `YUNTI_E2E=1 npm run test:e2e` 在本机 `pytest-playwright` 环境下通过 1 个真实浏览器
|
|
2636
|
+
extension bridge smoke;conda 仅打印 requests 依赖版本 warning,不影响结果。
|
|
2637
|
+
- `npm run release:check` 通过,包含 public documentation residue check、15 个公开
|
|
2638
|
+
Markdown 文件链接检查、action result coverage 11 行、npm package 内容 46 个文件和
|
|
2639
|
+
extension zip 内容 13 个文件。
|
|
2640
|
+
|
|
2641
|
+
P6.6.2 已完成:
|
|
2642
|
+
|
|
2643
|
+
- 将 P6.6.1 的审计结果转成可提交商店时使用的 permission rationale 和 privacy copy 草案。
|
|
2644
|
+
- 明确哪些内容可直接用于 store listing,哪些仍需用户/维护者最终确认。
|
|
2645
|
+
- `docs/EXTENSION_STORE_COPY.md` 已沉淀 store listing description、permission
|
|
2646
|
+
rationale、privacy policy draft、data disclosure guidance、reviewer notes 和
|
|
2647
|
+
final review checklist。
|
|
2648
|
+
- 本切片不改变 extension manifest 或 runtime 行为。
|
|
2649
|
+
|
|
2650
|
+
P6.6.2 最新验证:
|
|
2651
|
+
|
|
2652
|
+
- `git diff --check` 通过。
|
|
2653
|
+
- token 残留检查无输出。
|
|
2654
|
+
- `npm run check` 通过。
|
|
2655
|
+
- `npm test` 通过,覆盖 126 个 node:test 用例,其中 125 个通过、1 个默认真实浏览器
|
|
2656
|
+
smoke 按配置跳过。
|
|
2657
|
+
- `YUNTI_E2E=1 npm run test:e2e` 在本机 `pytest-playwright` 环境下通过 1 个真实浏览器
|
|
2658
|
+
extension bridge smoke;conda 仅打印 requests 依赖版本 warning,不影响结果。
|
|
2659
|
+
- `npm run release:check` 通过,包含 public documentation residue check、16 个公开
|
|
2660
|
+
Markdown 文件链接检查、action result coverage 11 行、npm package 内容 47 个文件和
|
|
2661
|
+
extension zip 内容 13 个文件。
|
|
2662
|
+
|
|
2663
|
+
P6.6.3 已完成:
|
|
2664
|
+
|
|
2665
|
+
- 在不迷失 Yunti local-first / MCP-native 特色的前提下,做商店前权限策略决策。
|
|
2666
|
+
- 优先评估 broad host permissions 和 `webRequest` 是否继续保持默认、改为 optional,或
|
|
2667
|
+
延后商店上架。
|
|
2668
|
+
- `docs/EXTENSION_PERMISSION_STRATEGY.md` 已明确两轨策略:developer/npm track
|
|
2669
|
+
保持当前 zero-config broad-access 体验;store-candidate track 另行设计可选 host access
|
|
2670
|
+
和可选 network diagnostics。
|
|
2671
|
+
- 当前 manifest 和 runtime 行为不变。
|
|
2672
|
+
|
|
2673
|
+
P6.6.3 最新验证:
|
|
2674
|
+
|
|
2675
|
+
- `git diff --check` 通过。
|
|
2676
|
+
- token 残留检查无输出。
|
|
2677
|
+
- `npm run check` 通过。
|
|
2678
|
+
- `npm test` 通过,覆盖 126 个 node:test 用例,其中 125 个通过、1 个默认真实浏览器
|
|
2679
|
+
smoke 按配置跳过。
|
|
2680
|
+
- `YUNTI_E2E=1 npm run test:e2e` 在本机 `pytest-playwright` 环境下通过 1 个真实浏览器
|
|
2681
|
+
extension bridge smoke;conda 仅打印 requests 依赖版本 warning,不影响结果。
|
|
2682
|
+
- `npm run release:check` 通过,包含 public documentation residue check、17 个公开
|
|
2683
|
+
Markdown 文件链接检查、action result coverage 11 行、npm package 内容 48 个文件和
|
|
2684
|
+
extension zip 内容 13 个文件。
|
|
2685
|
+
|
|
2686
|
+
P6.6.4 后置:
|
|
2687
|
+
|
|
2688
|
+
- 做 store-candidate 权限 UX 设计,列清楚用户操作、agent 恢复提示、doctor 检查和测试矩阵。
|
|
2689
|
+
- 该设计完成后,再决定是否进入 manifest/extension 代码实现。
|
|
2690
|
+
- 该工作不作为 0.2.0 npm/unpacked 发布硬门槛,后续作为 store-candidate track 单独推进。
|
|
2691
|
+
|
|
2692
|
+
## P7.1 0.2.0 npm/unpacked 发布收口
|
|
2693
|
+
|
|
2694
|
+
状态:已完成
|
|
2695
|
+
|
|
2696
|
+
目标:
|
|
2697
|
+
|
|
2698
|
+
冻结 0.2.0 范围,发布 npm/unpacked extension 形态;商店候选版权限 UX 后置。
|
|
2699
|
+
|
|
2700
|
+
完成范围:
|
|
2701
|
+
|
|
2702
|
+
- package 和 extension 版本同步提升到 `0.2.0`。
|
|
2703
|
+
- README / Release / status / execution plan 先更新为 0.2.0 发布候选状态,并在发布后
|
|
2704
|
+
更新为已发布状态。
|
|
2705
|
+
- 执行 `npm run check:metadata`、`npm run release:prepublish`、真实浏览器 E2E、
|
|
2706
|
+
`npm run release:dry-run`、`npm run release:publish` 和
|
|
2707
|
+
`npm run release:verify-published`。
|
|
2708
|
+
|
|
2709
|
+
当前验证:
|
|
2710
|
+
|
|
2711
|
+
- `git diff --check` 通过。
|
|
2712
|
+
- token 残留检查无输出。
|
|
2713
|
+
- `npm run check:metadata` 通过,确认 GitHub repository/homepage/bugs URL 为 200。
|
|
2714
|
+
- `npm run release:check` 通过,包含 public documentation residue check、18 个公开
|
|
2715
|
+
Markdown 文件链接检查、version consistency check `0.2.0`、CLI smoke `0.2.0`、
|
|
2716
|
+
action result coverage 11 行、npm package 内容 49 个文件和 extension zip 内容 13 个文件。
|
|
2717
|
+
- `YUNTI_E2E=1 npm run test:e2e` 在本机 `pytest-playwright` 环境下通过 1 个真实浏览器
|
|
2718
|
+
extension bridge smoke;conda 仅打印 requests 依赖版本 warning,不影响结果。
|
|
2719
|
+
- `npm run release:dry-run` 通过,生成 `yunti-browser-runtime-0.2.0.tgz` dry-run
|
|
2720
|
+
预览,tarball 共 49 个文件。
|
|
2721
|
+
- `npm run release:publish` 已发布 `yunti-browser-runtime@0.2.0` 到官方 npm registry。
|
|
2722
|
+
- `npm run release:verify-published` 已验证 name、version、repository、homepage、bugs
|
|
2723
|
+
和 tarball URL。
|
|
2724
|
+
|
|
2725
|
+
下一步:
|
|
2726
|
+
|
|
2727
|
+
- 选择 post-0.2 下一阶段;P6.6.4 store-candidate 权限 UX 仍作为浏览器商店方向后置。
|
|
2728
|
+
|
|
2729
|
+
详细范围、非目标和验收标准见 `docs/NEXT_MAJOR_PLAN.md`。
|
|
1372
2730
|
|
|
1373
2731
|
## 每阶段完成后的固定检查
|
|
1374
2732
|
|
|
@@ -1383,6 +2741,24 @@ npm test
|
|
|
1383
2741
|
npm run test:e2e
|
|
1384
2742
|
```
|
|
1385
2743
|
|
|
2744
|
+
P6.1/P6.2 browser behavior 变更合并前必须执行:
|
|
2745
|
+
|
|
2746
|
+
```bash
|
|
2747
|
+
YUNTI_E2E=1 npm run test:e2e
|
|
2748
|
+
```
|
|
2749
|
+
|
|
2750
|
+
最小 fixture 矩阵:
|
|
2751
|
+
|
|
2752
|
+
- `observe-basic.fixture.html`
|
|
2753
|
+
- `observe-redaction.fixture.html`
|
|
2754
|
+
- `observe-scroll.fixture.html`
|
|
2755
|
+
- `observe-dynamic.fixture.html`
|
|
2756
|
+
- `actions-form.fixture.html`
|
|
2757
|
+
- `actions-contenteditable.fixture.html`
|
|
2758
|
+
- `actions-scroll-container.fixture.html`
|
|
2759
|
+
|
|
2760
|
+
这些 fixture 是本地确定性回归,不是 benchmark 优化目标。
|
|
2761
|
+
|
|
1386
2762
|
涉及文档/开源化时额外检查:
|
|
1387
2763
|
|
|
1388
2764
|
```bash
|
|
@@ -1391,11 +2767,63 @@ rg "/U[s]ers|C[o]deg|x[y]y|y[b]m100" README.md docs skills package.json
|
|
|
1391
2767
|
|
|
1392
2768
|
## 当前下一步
|
|
1393
2769
|
|
|
1394
|
-
P0.1-
|
|
2770
|
+
P0.1-P7.1 已完成,`yunti-browser-runtime@0.2.0` 已发布到官方 npm registry。
|
|
2771
|
+
|
|
2772
|
+
## P7.2 0.2.1 安装后自动注入 / 自动注册页面
|
|
2773
|
+
|
|
2774
|
+
状态:实施中,代码与文档已完成,等待完整验证和提交。
|
|
2775
|
+
|
|
2776
|
+
目标:
|
|
2777
|
+
|
|
2778
|
+
让用户加载扩展后尽量不需要手动刷新页面。扩展后台应主动扫描可访问的 `http` /
|
|
2779
|
+
`https` tabs,对没有注册 session 的页面注入 `dom-observer.js`、`content.js` 和
|
|
2780
|
+
`content.css`,再触发 `yunti_refresh_registration`,使 Agent 能直接发现和操作已打开页面。
|
|
2781
|
+
bridge 重启或 background service worker 恢复后,也应尽量自动恢复注册。
|
|
2782
|
+
|
|
2783
|
+
非目标:
|
|
2784
|
+
|
|
2785
|
+
- 不绕过 Chrome 对 `chrome://`、扩展页、Web Store、权限不足页面等不可注入页面的限制。
|
|
2786
|
+
- 不引入远程服务、不要求用户填写 token、不要求默认打开 popup。
|
|
2787
|
+
- 不改变普通 observe-first action 的非 CDP 默认路径。
|
|
2788
|
+
|
|
2789
|
+
验收:
|
|
2790
|
+
|
|
2791
|
+
- manifest 增加必要的 `scripting` 能力。
|
|
2792
|
+
- background/session manager 支持 scan -> ping -> inject -> refresh registration。
|
|
2793
|
+
- 安装/startup、tab update/activation、popup refresh、targets inventory/recovery 等路径能触发恢复。
|
|
2794
|
+
- README / INSTALL / skill / Tool Guide / usage hints / doctor guidance 不再默认要求用户刷新;
|
|
2795
|
+
只把刷新作为无法注入时的兜底恢复。
|
|
2796
|
+
- `git diff --check`、token 残留检查、`npm run release:check` 通过;涉及真实浏览器链路时执行
|
|
2797
|
+
`YUNTI_E2E=1 npm run test:e2e`。
|
|
2798
|
+
|
|
2799
|
+
进展:
|
|
2800
|
+
|
|
2801
|
+
- manifest 已新增 `scripting` 权限,用于向已打开的受支持页面注入打包内容脚本。
|
|
2802
|
+
- session manager 已支持 scan -> ping -> inject -> refresh registration,并带同页短时间去重。
|
|
2803
|
+
- background 已接入 install/startup/background start、tab activated、tab updated complete。
|
|
2804
|
+
- popup refresh 和 `yunti_list_browser_targets` 已接入自动恢复。
|
|
2805
|
+
- README、INSTALL、doctor、console guidance、skill、store/permission docs 已改为自动注册优先,
|
|
2806
|
+
刷新页面只作为浏览器限制下的兜底。
|
|
1395
2807
|
|
|
1396
|
-
-
|
|
2808
|
+
- 发布后验证已通过:`npm run release:verify-published`。
|
|
1397
2809
|
- 本地默认使用不再需要 bridge token;需要加固时可显式设置
|
|
1398
2810
|
`YUNTI_BROWSER_BRIDGE_TOKEN`。
|
|
1399
2811
|
- 扩展 popup 默认不需要用户保存设置;Bridge URL、页面匹配和 token 已移入高级设置。
|
|
1400
|
-
-
|
|
1401
|
-
|
|
2812
|
+
- `0.2.0 Best Browser Automation Runtime` 的大版本计划已沉淀到
|
|
2813
|
+
`docs/NEXT_MAJOR_PLAN.md`。
|
|
2814
|
+
- 继续 0.2.0 的小切片推进:P6.4 已完成 DOM strict redaction、learning memory /
|
|
2815
|
+
console diagnostics 存储边界、raw CDP / screenshot 非默认脱敏提示与清理边界。
|
|
2816
|
+
P6.1.4 真实浏览器闭环已补验通过,P6.5.1 可选本地运行时控制台最小闭环已完成,
|
|
2817
|
+
P6.5.2 控制台诊断增强第一刀已完成,P6.5.3 控制台真实浏览器 E2E 验收已完成,
|
|
2818
|
+
P6.6.1 浏览器扩展分发准备已完成,P6.6.2 商店权限与隐私文案草案已完成,
|
|
2819
|
+
P6.6.3 商店前权限策略决策已完成。P6.6.4 Store candidate 权限 UX 设计已后置;
|
|
2820
|
+
P7.1 0.2.0 npm/unpacked 发布收口已完成。
|
|
2821
|
+
- 保持兼容:不改变成功 fill、select、scroll、CDP、截图、network/console、file upload 或 tab
|
|
2822
|
+
能力;新增诊断只在失败结果或 observe 元数据里追加更具体的 `code`、`recoveryHint`、
|
|
2823
|
+
`element` / 字段状态摘要和验证提示。
|
|
2824
|
+
- 验证重点:继续执行
|
|
2825
|
+
`git diff --check`、token 残留检查、`YUNTI_E2E=1 npm run test:e2e` 和
|
|
2826
|
+
`npm run release:check`。
|
|
2827
|
+
- 后续如要上架浏览器扩展商店,按 `docs/EXTENSION_PERMISSION_STRATEGY.md` 单独推进
|
|
2828
|
+
store-candidate 权限 UX 和 broad host permissions 审查。
|
|
2829
|
+
- 后续版本开发前,先按 `docs/NEXT_MAJOR_PLAN.md` 拆阶段执行并更新本文档验收记录。
|