yunti-browser-runtime 0.1.1 → 0.1.2

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 CHANGED
@@ -79,6 +79,30 @@ npm run doctor
79
79
  npm run doctor:json
80
80
  ```
81
81
 
82
+ ## 复制给 Agent 的安装引导
83
+
84
+ 把下面这段话复制给你正在使用的 Agent,让它一步步引导你安装和验证:
85
+
86
+ ```text
87
+ 请帮我安装并接入 Yunti Browser Runtime。它是一个本地浏览器运行时,让你通过 MCP 操作我本机 Chrome/Edge 页面。
88
+
89
+ 请按步骤引导我完成,不要跳步:
90
+
91
+ 1. 确认我本机有 Node.js 22+。
92
+ 2. 执行:npm install -g yunti-browser-runtime
93
+ 3. 执行:yunti-browser-runtime print-config -- --agent 当前Agent名称 --human
94
+ 4. 根据输出,把 MCP server 配置加入当前 Agent 的 MCP 配置。
95
+ 5. 执行:yunti-browser-runtime bridge
96
+ 6. 引导我打开 Chrome/Edge 的扩展管理页,开启开发者模式,手动加载扩展目录:
97
+ $(npm root -g)/yunti-browser-runtime/extension
98
+ 7. 告诉我扩展里默认 bridge URL 是 http://127.0.0.1:48887,本地默认不需要 token,也不需要保存设置。
99
+ 8. 打开任意 http/https 页面并刷新。
100
+ 9. 执行:yunti-browser-runtime doctor
101
+ 10. 如果 doctor 正常,再调用 yunti_list_browser_targets 或 yunti_get_tool_usage_hints 验证你能看到浏览器页面。
102
+
103
+ 注意:Chrome 扩展不能由 npm 静默安装,必须由我手动在浏览器扩展页加载。你要一步步告诉我点哪里、复制什么、检查什么。
104
+ ```
105
+
82
106
  ## 安装浏览器扩展
83
107
 
84
108
  开发加载方式:
@@ -88,10 +112,11 @@ npm run doctor:json
88
112
  3. 点击“加载已解压的扩展程序”。
89
113
  4. 选择本项目的 `extension/` 目录。
90
114
  5. 打开任意 `http` 或 `https` 页面。
91
- 6. 点击扩展图标,确认 bridge 地址为 `http://127.0.0.1:48887`,保存设置。
92
- 7. 刷新目标页面,确认页面已连接。
115
+ 6. 刷新目标页面,确认页面已连接。
93
116
 
94
- 扩展只负责把页面注册到本地 bridge,并执行 Agent 发来的浏览器动作。
117
+ 扩展默认使用 `http://127.0.0.1:48887`,本地安装不需要 token,也不需要保存设置。
118
+ 扩展 popup 只用于自定义 bridge URL、页面匹配或可选 token。扩展只负责把页面注册到
119
+ 本地 bridge,并执行 Agent 发来的浏览器动作。
95
120
 
96
121
  也可以生成 zip 包用于分发或归档:
97
122
 
@@ -255,7 +280,7 @@ token。
255
280
 
256
281
  ## 发布状态与后续事项
257
282
 
258
- - `yunti-browser-runtime@0.1.1` 已发布到官方 npm registry。
259
- - `0.1.1` 将本地默认使用路径改为免 bridge token
283
+ - `yunti-browser-runtime@0.1.2` 已发布到官方 npm registry。
284
+ - `0.1.2` 将扩展 popup token 移入高级设置,并补充可复制给 Agent 的安装引导。
260
285
  - 发布后验证命令:`npm run release:verify-published`。
261
286
  - 如要上架浏览器扩展商店,需要再次审查 broad host permissions。
@@ -56,6 +56,7 @@
56
56
  | P4.18 | 已完成 | npm 发布后验证命令 |
57
57
  | P4.19 | 已完成 | npm 正式发布执行 |
58
58
  | P5.1 | 已完成 | 本地默认免 bridge token |
59
+ | P5.2 | 已完成 | 扩展 popup 与安装引导简化 |
59
60
 
60
61
  ## P0.1 bridge token + CORS 收紧
61
62
 
@@ -1297,6 +1298,43 @@ metadata 与当前 `package.json` 一致。
1297
1298
  - `npm run release:publish` 成功发布 `yunti-browser-runtime@0.1.1`。
1298
1299
  - `npm run release:verify-published` 返回 0。
1299
1300
 
1301
+ ## P5.2 扩展 popup 与安装引导简化
1302
+
1303
+ 状态:已完成(2026-07-03)
1304
+
1305
+ 实现摘要:
1306
+
1307
+ - 扩展 popup 首屏不再展示 Bridge Token 输入框,避免用户误以为本地默认安装需要填写
1308
+ token。
1309
+ - Bridge Token 移入“高级设置”,并标注为可选;如果用户已有 token 配置,高级设置会
1310
+ 自动展开。
1311
+ - popup 默认状态文案改为“默认无需设置,打开或刷新 http/https 页面即可”。
1312
+ - README 增加“复制给 Agent 的安装引导”,让用户可以把一段话交给 Agent,由 Agent
1313
+ 分步骤带用户完成 npm 安装、MCP 配置、扩展加载和 doctor 验证。
1314
+ - README / INSTALL 明确:加载扩展后默认不需要保存设置,不需要 token。
1315
+ - package 和 extension 版本同步提升到 `0.1.2`。
1316
+
1317
+ ### 目标
1318
+
1319
+ 让用户在安装扩展后尽量立即可用:默认无需填写 token、无需保存 popup 设置;需要
1320
+ 自定义 bridge URL、页面匹配或 token 时再进入高级/设置路径。
1321
+
1322
+ ### 验收标准
1323
+
1324
+ - popup 首屏不出现 Bridge Token 输入框。
1325
+ - popup 仍保留可选 token 配置能力。
1326
+ - README 包含可复制给 Agent 的安装引导词。
1327
+ - README / INSTALL 不再要求默认本地安装时点击 popup 保存 token 或保存设置。
1328
+ - `npm run release:check` 通过。
1329
+ - `npm run release:publish` 发布 `yunti-browser-runtime@0.1.2`,并通过
1330
+ `npm run release:verify-published` 验证。
1331
+
1332
+ ### 验收记录
1333
+
1334
+ - `npm run release:check` 通过。
1335
+ - `npm run release:publish` 成功发布 `yunti-browser-runtime@0.1.2`。
1336
+ - `npm run release:verify-published` 返回 0。
1337
+
1300
1338
  ## 每阶段完成后的固定检查
1301
1339
 
1302
1340
  ```bash
@@ -1318,10 +1356,11 @@ rg "/U[s]ers|C[o]deg|x[y]y|y[b]m100" README.md docs skills package.json
1318
1356
 
1319
1357
  ## 当前下一步
1320
1358
 
1321
- P0.1-P5.1 已完成,`yunti-browser-runtime@0.1.1` 已发布到官方 npm registry。
1359
+ P0.1-P5.2 已完成,`yunti-browser-runtime@0.1.2` 已发布到官方 npm registry。
1322
1360
 
1323
1361
  - 发布后验证已通过:`npm run release:verify-published`。
1324
1362
  - 本地默认使用不再需要 bridge token;需要加固时可显式设置
1325
1363
  `YUNTI_BROWSER_BRIDGE_TOKEN`。
1364
+ - 扩展 popup 默认不需要用户保存设置;token 已移入高级可选项。
1326
1365
  - 后续如要上架浏览器扩展商店,发布前还需重新审查 broad host permissions。
1327
1366
  - 后续版本开发前,先在本文档新增下一阶段目标、范围和验收标准。
package/docs/INSTALL.md CHANGED
@@ -54,12 +54,14 @@ Development loading:
54
54
  2. Enable developer mode.
55
55
  3. Choose "Load unpacked".
56
56
  4. Select the project `extension/` directory.
57
- 5. Click the extension icon and confirm the bridge URL is `http://127.0.0.1:48887`.
58
- 6. Open any `http` or `https` page and click the extension icon to confirm the
59
- page is connected.
60
-
61
- The extension registers browser pages with the local bridge. It does not create
62
- agent conversations or depend on a remote workspace.
57
+ 5. Open or refresh any `http` or `https` page.
58
+ 6. Click the extension icon only if you want to confirm status or customize
59
+ settings.
60
+
61
+ The extension defaults to `http://127.0.0.1:48887`. Local installs do not need a
62
+ token and do not require saving popup settings. The extension registers browser
63
+ pages with the local bridge. It does not create agent conversations or depend on
64
+ a remote workspace.
63
65
 
64
66
  To create a distributable zip:
65
67
 
@@ -2,9 +2,10 @@
2
2
 
3
3
  ## Current Phase
4
4
 
5
- Patch release `yunti-browser-runtime@0.1.1` is complete. The local loopback
6
- bridge no longer requires a token by default, and the published package is
7
- verified with `npm run release:verify-published`.
5
+ Patch release `yunti-browser-runtime@0.1.2` is complete. The local loopback
6
+ bridge no longer requires a token by default, the extension popup no longer
7
+ shows token as a first-run field, and the published package is verified with
8
+ `npm run release:verify-published`.
8
9
 
9
10
  ## Current State
10
11
 
@@ -42,7 +43,9 @@ verified with `npm run release:verify-published`.
42
43
  - `npm run release:dry-run` and `npm run release:publish` pin the official npm
43
44
  registry at `https://registry.npmjs.org/`, avoiding accidental publication to
44
45
  a locally configured mirror registry.
45
- - `yunti-browser-runtime@0.1.1` is published on the official npm registry.
46
+ - `yunti-browser-runtime@0.1.2` is published on the official npm registry.
47
+ - Extension popup keeps Bridge Token under optional advanced settings; default
48
+ local installs do not require saving popup settings.
46
49
  - `npm run test:e2e` provides an opt-in real-browser Playwright smoke test for
47
50
  extension loading, page registration, MCP target listing, snapshot, click/fill,
48
51
  and CDP `Runtime.evaluate`.
@@ -248,6 +251,13 @@ verified with `npm run release:verify-published`.
248
251
  real-browser smoke skipped by configuration; `npm run check` and
249
252
  `npm run release:check` passed; `npm run release:publish` published
250
253
  `yunti-browser-runtime@0.1.1`; `npm run release:verify-published` returned 0.
254
+ - P5.2 extension popup and onboarding simplification is complete: Bridge Token
255
+ is now optional under advanced settings, README contains a copyable Agent
256
+ installation prompt, and default extension loading no longer asks users to
257
+ save popup settings.
258
+ - Latest P5.2 validation: `npm run release:check` passed; `npm run
259
+ release:publish` published `yunti-browser-runtime@0.1.2`; `npm run
260
+ release:verify-published` returned 0.
251
261
 
252
262
  ## Known Risks
253
263
 
@@ -7,7 +7,7 @@ publishing `yunti-browser-runtime`.
7
7
 
8
8
  No active npm publish blockers as of 2026-07-03.
9
9
 
10
- `yunti-browser-runtime@0.1.0` is published on the official npm registry and
10
+ `yunti-browser-runtime@0.1.2` is published on the official npm registry and
11
11
  verified with `npm run release:verify-published`.
12
12
 
13
13
  ## Resolved Blocker: npm 2FA Publish Token
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "manifest_version": 3,
3
3
  "name": "Yunti Browser Runtime",
4
- "version": "0.1.1",
4
+ "version": "0.1.2",
5
5
  "description": "Local browser runtime for AI agents through MCP.",
6
6
  "permissions": [
7
7
  "activeTab",
@@ -34,6 +34,22 @@ label {
34
34
  font-size: 12px;
35
35
  }
36
36
 
37
+ details {
38
+ display: grid;
39
+ gap: 6px;
40
+ color: #334155;
41
+ font-size: 12px;
42
+ }
43
+
44
+ summary {
45
+ cursor: pointer;
46
+ font-weight: 600;
47
+ }
48
+
49
+ details label {
50
+ margin-top: 6px;
51
+ }
52
+
37
53
  input,
38
54
  textarea {
39
55
  width: 100%;
@@ -14,14 +14,17 @@
14
14
  Bridge URL
15
15
  <input id="bridgeUrl" autocomplete="off" />
16
16
  </label>
17
- <label>
18
- Bridge Token
19
- <input id="bridgeToken" autocomplete="off" type="password" />
20
- </label>
21
17
  <label>
22
18
  页面匹配
23
19
  <textarea id="platformMatches" rows="3"></textarea>
24
20
  </label>
21
+ <details id="advancedSettings">
22
+ <summary>高级设置</summary>
23
+ <label>
24
+ Bridge Token(可选)
25
+ <input id="bridgeToken" autocomplete="off" type="password" />
26
+ </label>
27
+ </details>
25
28
  <button id="save">保存设置</button>
26
29
  <button id="refresh">刷新状态</button>
27
30
  </main>
@@ -2,6 +2,7 @@ const statusEl = document.querySelector("#status")
2
2
  const bridgeUrlEl = document.querySelector("#bridgeUrl")
3
3
  const bridgeTokenEl = document.querySelector("#bridgeToken")
4
4
  const platformMatchesEl = document.querySelector("#platformMatches")
5
+ const advancedSettingsEl = document.querySelector("#advancedSettings")
5
6
  document.querySelector("#save").addEventListener("click", save)
6
7
  document.querySelector("#refresh").addEventListener("click", refresh)
7
8
 
@@ -17,7 +18,7 @@ async function refresh() {
17
18
  setStatus(
18
19
  state.activeSession
19
20
  ? `页面已连接\n${state.activeSession.title || state.activeSession.url}`
20
- : "请打开任意 http/https 页面,并确认本地 bridge 已启动。"
21
+ : "默认无需设置。请打开或刷新任意 http/https 页面。"
21
22
  )
22
23
  }
23
24
 
@@ -35,12 +36,13 @@ async function save() {
35
36
  return
36
37
  }
37
38
  renderSettings(state.settings || {})
38
- setStatus("设置已保存,请刷新目标页面完成重新注册。")
39
+ setStatus("设置已保存。请刷新目标页面完成重新注册。")
39
40
  }
40
41
 
41
42
  function renderSettings(settings) {
42
43
  bridgeUrlEl.value = settings.bridgeUrl || "http://127.0.0.1:48887"
43
44
  bridgeTokenEl.value = settings.bridgeToken || ""
45
+ advancedSettingsEl.open = Boolean(settings.bridgeToken)
44
46
  platformMatchesEl.value = Array.isArray(settings.platformMatches)
45
47
  ? settings.platformMatches.join("\n")
46
48
  : "*"
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "yunti-browser-runtime",
3
- "version": "0.1.1",
3
+ "version": "0.1.2",
4
4
  "type": "module",
5
5
  "description": "Local browser runtime and MCP tools for AI agents.",
6
6
  "license": "MIT",