@liang-hz/agent-in-chrome 0.55.0
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/.ext-id.txt +4 -0
- package/LICENSE +202 -0
- package/NOTICE +5 -0
- package/PRIVACY.md +86 -0
- package/README.en.md +419 -0
- package/README.md +406 -0
- package/bin/agent-in-chrome.mjs +97 -0
- package/commands/agent-in-chrome.md +18 -0
- package/commands/install-agent-in-chrome.md +22 -0
- package/docs/AGENTS.md +94 -0
- package/docs/CLI.md +297 -0
- package/docs/client-compat.json +23 -0
- package/extension/about-toc.js +25 -0
- package/extension/about.html +240 -0
- package/extension/about.js +44 -0
- package/extension/agent-window.html +100 -0
- package/extension/icons/icon-128.png +0 -0
- package/extension/icons/icon-16.png +0 -0
- package/extension/icons/icon-24.png +0 -0
- package/extension/icons/icon-32.png +0 -0
- package/extension/icons/icon-48.png +0 -0
- package/extension/icons/icon-64.png +0 -0
- package/extension/icons/icon-attention-128.png +0 -0
- package/extension/icons/icon-attention-16.png +0 -0
- package/extension/icons/icon-attention-24.png +0 -0
- package/extension/icons/icon-attention-32.png +0 -0
- package/extension/icons/icon-attention-48.png +0 -0
- package/extension/icons/icon-attention-64.png +0 -0
- package/extension/icons/icon-attention.svg +18 -0
- package/extension/icons/icon-failed-128.png +0 -0
- package/extension/icons/icon-failed-16.png +0 -0
- package/extension/icons/icon-failed-24.png +0 -0
- package/extension/icons/icon-failed-32.png +0 -0
- package/extension/icons/icon-failed-48.png +0 -0
- package/extension/icons/icon-failed-64.png +0 -0
- package/extension/icons/icon-failed.svg +18 -0
- package/extension/icons/icon-idle-128.png +0 -0
- package/extension/icons/icon-idle-16.png +0 -0
- package/extension/icons/icon-idle-24.png +0 -0
- package/extension/icons/icon-idle-32.png +0 -0
- package/extension/icons/icon-idle-48.png +0 -0
- package/extension/icons/icon-idle-64.png +0 -0
- package/extension/icons/icon-idle.svg +18 -0
- package/extension/icons/icon-mark.svg +10 -0
- package/extension/icons/icon-running-128.png +0 -0
- package/extension/icons/icon-running-16.png +0 -0
- package/extension/icons/icon-running-24.png +0 -0
- package/extension/icons/icon-running-32.png +0 -0
- package/extension/icons/icon-running-48.png +0 -0
- package/extension/icons/icon-running-64.png +0 -0
- package/extension/icons/icon-running.svg +18 -0
- package/extension/icons/icon.svg +18 -0
- package/extension/manifest.json +44 -0
- package/extension/popup-ui.js +38 -0
- package/extension/popup.html +350 -0
- package/extension/popup.js +741 -0
- package/extension/sw.js +11127 -0
- package/extension/update-check.js +66 -0
- package/extension/welcome.html +110 -0
- package/extension/welcome.js +18 -0
- package/mcp/agent-identity.mjs +1007 -0
- package/mcp/cdp/bridge.mjs +239 -0
- package/mcp/cdp/browser-launch.mjs +1127 -0
- package/mcp/cdp/chrome-shim.mjs +1124 -0
- package/mcp/cdp/client.mjs +443 -0
- package/mcp/cli-invocation.mjs +67 -0
- package/mcp/config.mjs +191 -0
- package/mcp/foreground-guard.mjs +295 -0
- package/mcp/proc-win.mjs +112 -0
- package/mcp/secret-shape.mjs +155 -0
- package/mcp/server.mjs +3437 -0
- package/mcp/session-id.mjs +281 -0
- package/mcp/token.mjs +260 -0
- package/mcp/tool-tiers.mjs +84 -0
- package/mcp/trace.mjs +528 -0
- package/mcp/update-cli.mjs +163 -0
- package/mcp/update-notice.mjs +194 -0
- package/native-host/host.mjs +356 -0
- package/native-host/mac-foreground/aic-fg.swift +114 -0
- package/native-host/mac-foreground/build.mjs +43 -0
- package/package.json +46 -0
- package/scripts/agents.mjs +921 -0
- package/scripts/borrow-login.mjs +935 -0
- package/scripts/cli-browser.mjs +148 -0
- package/scripts/e2e-sweep.mjs +192 -0
- package/scripts/e2e.mjs +3911 -0
- package/scripts/fixture-server.mjs +1419 -0
- package/scripts/guard-publish.mjs +175 -0
- package/scripts/install.mjs +1383 -0
- package/scripts/launcher-provenance.mjs +74 -0
- package/scripts/pack-crx.mjs +82 -0
- package/scripts/pick.mjs +114 -0
- package/scripts/test-agents.mjs +968 -0
- package/scripts/test-borrow.mjs +289 -0
- package/scripts/test-config.mjs +618 -0
- package/scripts/test-e2e-sweep.mjs +251 -0
- package/scripts/test-foreground-guard.mjs +383 -0
- package/scripts/test-identity.mjs +1141 -0
- package/scripts/test-install-skill.mjs +378 -0
- package/scripts/test-protocol.mjs +712 -0
- package/scripts/test-security.mjs +1360 -0
- package/scripts/test-sw.mjs +14526 -0
- package/scripts/test-update.mjs +301 -0
- package/skills/agent-in-chrome/SKILL.md +60 -0
- package/skills/agent-in-chrome/references/actions-and-waits.md +136 -0
- package/skills/agent-in-chrome/references/amap-dir-dropdown.md +66 -0
- package/skills/agent-in-chrome/references/geetest-click-captcha.md +55 -0
- package/skills/agent-in-chrome/references/network-debugging.md +20 -0
- package/skills/agent-in-chrome/references/reading-pages.md +30 -0
- package/skills/agent-in-chrome/references/recovery.md +25 -0
- package/skills/agent-in-chrome/references/tabs-and-sessions.md +34 -0
- package/skills/install-agent-in-chrome/SKILL.md +252 -0
package/.ext-id.txt
ADDED
package/LICENSE
ADDED
|
@@ -0,0 +1,202 @@
|
|
|
1
|
+
|
|
2
|
+
Apache License
|
|
3
|
+
Version 2.0, January 2004
|
|
4
|
+
http://www.apache.org/licenses/
|
|
5
|
+
|
|
6
|
+
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
|
|
7
|
+
|
|
8
|
+
1. Definitions.
|
|
9
|
+
|
|
10
|
+
"License" shall mean the terms and conditions for use, reproduction,
|
|
11
|
+
and distribution as defined by Sections 1 through 9 of this document.
|
|
12
|
+
|
|
13
|
+
"Licensor" shall mean the copyright owner or entity authorized by
|
|
14
|
+
the copyright owner that is granting the License.
|
|
15
|
+
|
|
16
|
+
"Legal Entity" shall mean the union of the acting entity and all
|
|
17
|
+
other entities that control, are controlled by, or are under common
|
|
18
|
+
control with that entity. For the purposes of this definition,
|
|
19
|
+
"control" means (i) the power, direct or indirect, to cause the
|
|
20
|
+
direction or management of such entity, whether by contract or
|
|
21
|
+
otherwise, or (ii) ownership of fifty percent (50%) or more of the
|
|
22
|
+
outstanding shares, or (iii) beneficial ownership of such entity.
|
|
23
|
+
|
|
24
|
+
"You" (or "Your") shall mean an individual or Legal Entity
|
|
25
|
+
exercising permissions granted by this License.
|
|
26
|
+
|
|
27
|
+
"Source" form shall mean the preferred form for making modifications,
|
|
28
|
+
including but not limited to software source code, documentation
|
|
29
|
+
source, and configuration files.
|
|
30
|
+
|
|
31
|
+
"Object" form shall mean any form resulting from mechanical
|
|
32
|
+
transformation or translation of a Source form, including but
|
|
33
|
+
not limited to compiled object code, generated documentation,
|
|
34
|
+
and conversions to other media types.
|
|
35
|
+
|
|
36
|
+
"Work" shall mean the work of authorship, whether in Source or
|
|
37
|
+
Object form, made available under the License, as indicated by a
|
|
38
|
+
copyright notice that is included in or attached to the work
|
|
39
|
+
(an example is provided in the Appendix below).
|
|
40
|
+
|
|
41
|
+
"Derivative Works" shall mean any work, whether in Source or Object
|
|
42
|
+
form, that is based on (or derived from) the Work and for which the
|
|
43
|
+
editorial revisions, annotations, elaborations, or other modifications
|
|
44
|
+
represent, as a whole, an original work of authorship. For the purposes
|
|
45
|
+
of this License, Derivative Works shall not include works that remain
|
|
46
|
+
separable from, or merely link (or bind by name) to the interfaces of,
|
|
47
|
+
the Work and Derivative Works thereof.
|
|
48
|
+
|
|
49
|
+
"Contribution" shall mean any work of authorship, including
|
|
50
|
+
the original version of the Work and any modifications or additions
|
|
51
|
+
to that Work or Derivative Works thereof, that is intentionally
|
|
52
|
+
submitted to Licensor for inclusion in the Work by the copyright owner
|
|
53
|
+
or by an individual or Legal Entity authorized to submit on behalf of
|
|
54
|
+
the copyright owner. For the purposes of this definition, "submitted"
|
|
55
|
+
means any form of electronic, verbal, or written communication sent
|
|
56
|
+
to the Licensor or its representatives, including but not limited to
|
|
57
|
+
communication on electronic mailing lists, source code control systems,
|
|
58
|
+
and issue tracking systems that are managed by, or on behalf of, the
|
|
59
|
+
Licensor for the purpose of discussing and improving the Work, but
|
|
60
|
+
excluding communication that is conspicuously marked or otherwise
|
|
61
|
+
designated in writing by the copyright owner as "Not a Contribution."
|
|
62
|
+
|
|
63
|
+
"Contributor" shall mean Licensor and any individual or Legal Entity
|
|
64
|
+
on behalf of whom a Contribution has been received by Licensor and
|
|
65
|
+
subsequently incorporated within the Work.
|
|
66
|
+
|
|
67
|
+
2. Grant of Copyright License. Subject to the terms and conditions of
|
|
68
|
+
this License, each Contributor hereby grants to You a perpetual,
|
|
69
|
+
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
|
70
|
+
copyright license to reproduce, prepare Derivative Works of,
|
|
71
|
+
publicly display, publicly perform, sublicense, and distribute the
|
|
72
|
+
Work and such Derivative Works in Source or Object form.
|
|
73
|
+
|
|
74
|
+
3. Grant of Patent License. Subject to the terms and conditions of
|
|
75
|
+
this License, each Contributor hereby grants to You a perpetual,
|
|
76
|
+
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
|
77
|
+
(except as stated in this section) patent license to make, have made,
|
|
78
|
+
use, offer to sell, sell, import, and otherwise transfer the Work,
|
|
79
|
+
where such license applies only to those patent claims licensable
|
|
80
|
+
by such Contributor that are necessarily infringed by their
|
|
81
|
+
Contribution(s) alone or by combination of their Contribution(s)
|
|
82
|
+
with the Work to which such Contribution(s) was submitted. If You
|
|
83
|
+
institute patent litigation against any entity (including a
|
|
84
|
+
cross-claim or counterclaim in a lawsuit) alleging that the Work
|
|
85
|
+
or a Contribution incorporated within the Work constitutes direct
|
|
86
|
+
or contributory patent infringement, then any patent licenses
|
|
87
|
+
granted to You under this License for that Work shall terminate
|
|
88
|
+
as of the date such litigation is filed.
|
|
89
|
+
|
|
90
|
+
4. Redistribution. You may reproduce and distribute copies of the
|
|
91
|
+
Work or Derivative Works thereof in any medium, with or without
|
|
92
|
+
modifications, and in Source or Object form, provided that You
|
|
93
|
+
meet the following conditions:
|
|
94
|
+
|
|
95
|
+
(a) You must give any other recipients of the Work or
|
|
96
|
+
Derivative Works a copy of this License; and
|
|
97
|
+
|
|
98
|
+
(b) You must cause any modified files to carry prominent notices
|
|
99
|
+
stating that You changed the files; and
|
|
100
|
+
|
|
101
|
+
(c) You must retain, in the Source form of any Derivative Works
|
|
102
|
+
that You distribute, all copyright, patent, trademark, and
|
|
103
|
+
attribution notices from the Source form of the Work,
|
|
104
|
+
excluding those notices that do not pertain to any part of
|
|
105
|
+
the Derivative Works; and
|
|
106
|
+
|
|
107
|
+
(d) If the Work includes a "NOTICE" text file as part of its
|
|
108
|
+
distribution, then any Derivative Works that You distribute must
|
|
109
|
+
include a readable copy of the attribution notices contained
|
|
110
|
+
within such NOTICE file, excluding those notices that do not
|
|
111
|
+
pertain to any part of the Derivative Works, in at least one
|
|
112
|
+
of the following places: within a NOTICE text file distributed
|
|
113
|
+
as part of the Derivative Works; within the Source form or
|
|
114
|
+
documentation, if provided along with the Derivative Works; or,
|
|
115
|
+
within a display generated by the Derivative Works, if and
|
|
116
|
+
wherever such third-party notices normally appear. The contents
|
|
117
|
+
of the NOTICE file are for informational purposes only and
|
|
118
|
+
do not modify the License. You may add Your own attribution
|
|
119
|
+
notices within Derivative Works that You distribute, alongside
|
|
120
|
+
or as an addendum to the NOTICE text from the Work, provided
|
|
121
|
+
that such additional attribution notices cannot be construed
|
|
122
|
+
as modifying the License.
|
|
123
|
+
|
|
124
|
+
You may add Your own copyright statement to Your modifications and
|
|
125
|
+
may provide additional or different license terms and conditions
|
|
126
|
+
for use, reproduction, or distribution of Your modifications, or
|
|
127
|
+
for any such Derivative Works as a whole, provided Your use,
|
|
128
|
+
reproduction, and distribution of the Work otherwise complies with
|
|
129
|
+
the conditions stated in this License.
|
|
130
|
+
|
|
131
|
+
5. Submission of Contributions. Unless You explicitly state otherwise,
|
|
132
|
+
any Contribution intentionally submitted for inclusion in the Work
|
|
133
|
+
by You to the Licensor shall be under the terms and conditions of
|
|
134
|
+
this License, without any additional terms or conditions.
|
|
135
|
+
Notwithstanding the above, nothing herein shall supersede or modify
|
|
136
|
+
the terms of any separate license agreement you may have executed
|
|
137
|
+
with Licensor regarding such Contributions.
|
|
138
|
+
|
|
139
|
+
6. Trademarks. This License does not grant permission to use the trade
|
|
140
|
+
names, trademarks, service marks, or product names of the Licensor,
|
|
141
|
+
except as required for reasonable and customary use in describing the
|
|
142
|
+
origin of the Work and reproducing the content of the NOTICE file.
|
|
143
|
+
|
|
144
|
+
7. Disclaimer of Warranty. Unless required by applicable law or
|
|
145
|
+
agreed to in writing, Licensor provides the Work (and each
|
|
146
|
+
Contributor provides its Contributions) on an "AS IS" BASIS,
|
|
147
|
+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
|
|
148
|
+
implied, including, without limitation, any warranties or conditions
|
|
149
|
+
of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
|
|
150
|
+
PARTICULAR PURPOSE. You are solely responsible for determining the
|
|
151
|
+
appropriateness of using or redistributing the Work and assume any
|
|
152
|
+
risks associated with Your exercise of permissions under this License.
|
|
153
|
+
|
|
154
|
+
8. Limitation of Liability. In no event and under no legal theory,
|
|
155
|
+
whether in tort (including negligence), contract, or otherwise,
|
|
156
|
+
unless required by applicable law (such as deliberate and grossly
|
|
157
|
+
negligent acts) or agreed to in writing, shall any Contributor be
|
|
158
|
+
liable to You for damages, including any direct, indirect, special,
|
|
159
|
+
incidental, or consequential damages of any character arising as a
|
|
160
|
+
result of this License or out of the use or inability to use the
|
|
161
|
+
Work (including but not limited to damages for loss of goodwill,
|
|
162
|
+
work stoppage, computer failure or malfunction, or any and all
|
|
163
|
+
other commercial damages or losses), even if such Contributor
|
|
164
|
+
has been advised of the possibility of such damages.
|
|
165
|
+
|
|
166
|
+
9. Accepting Warranty or Additional Liability. While redistributing
|
|
167
|
+
the Work or Derivative Works thereof, You may choose to offer,
|
|
168
|
+
and charge a fee for, acceptance of support, warranty, indemnity,
|
|
169
|
+
or other liability obligations and/or rights consistent with this
|
|
170
|
+
License. However, in accepting such obligations, You may act only
|
|
171
|
+
on Your own behalf and on Your sole responsibility, not on behalf
|
|
172
|
+
of any other Contributor, and only if You agree to indemnify,
|
|
173
|
+
defend, and hold each Contributor harmless for any liability
|
|
174
|
+
incurred by, or claims asserted against, such Contributor by reason
|
|
175
|
+
of your accepting any such warranty or additional liability.
|
|
176
|
+
|
|
177
|
+
END OF TERMS AND CONDITIONS
|
|
178
|
+
|
|
179
|
+
APPENDIX: How to apply the Apache License to your work.
|
|
180
|
+
|
|
181
|
+
To apply the Apache License to your work, attach the following
|
|
182
|
+
boilerplate notice, with the fields enclosed by brackets "[]"
|
|
183
|
+
replaced with your own identifying information. (Don't include
|
|
184
|
+
the brackets!) The text should be enclosed in the appropriate
|
|
185
|
+
comment syntax for the file format. We also recommend that a
|
|
186
|
+
file or class name and description of purpose be included on the
|
|
187
|
+
same "printed page" as the copyright notice for easier
|
|
188
|
+
identification within third-party archives.
|
|
189
|
+
|
|
190
|
+
Copyright [yyyy] [name of copyright owner]
|
|
191
|
+
|
|
192
|
+
Licensed under the Apache License, Version 2.0 (the "License");
|
|
193
|
+
you may not use this file except in compliance with the License.
|
|
194
|
+
You may obtain a copy of the License at
|
|
195
|
+
|
|
196
|
+
http://www.apache.org/licenses/LICENSE-2.0
|
|
197
|
+
|
|
198
|
+
Unless required by applicable law or agreed to in writing, software
|
|
199
|
+
distributed under the License is distributed on an "AS IS" BASIS,
|
|
200
|
+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
201
|
+
See the License for the specific language governing permissions and
|
|
202
|
+
limitations under the License.
|
package/NOTICE
ADDED
package/PRIVACY.md
ADDED
|
@@ -0,0 +1,86 @@
|
|
|
1
|
+
# 隐私说明 / Privacy
|
|
2
|
+
|
|
3
|
+
> 最后更新:2026-08-19。本文描述 Agent in Chrome 实际读写的每一样东西和精确位置。
|
|
4
|
+
> 代码全部开源,每一条都可以在源码里验证。English summary at the bottom.
|
|
5
|
+
|
|
6
|
+
## 一句话
|
|
7
|
+
|
|
8
|
+
**你的数据不离开你的电脑。** Agent in Chrome 自身零网络出站——没有遥测、没有统计、没有崩溃上报、不连任何我们的服务器。它访问哪些网页,完全由你对你的 agent 下的指令决定。
|
|
9
|
+
|
|
10
|
+
## 数据流
|
|
11
|
+
|
|
12
|
+
```
|
|
13
|
+
你的 agent(Claude Code / Cursor / …)
|
|
14
|
+
↕ 本机进程间通信(stdio + unix socket,不出网卡)
|
|
15
|
+
Agent in Chrome(MCP server + native host + 扩展)
|
|
16
|
+
↕ Chrome 调试协议(本机)
|
|
17
|
+
你的 Chrome
|
|
18
|
+
```
|
|
19
|
+
|
|
20
|
+
产品自身唯一的「网络」活动是访问 `127.0.0.1`(本机 Chrome 的调试端口)。
|
|
21
|
+
版本更新检查(向 npm registry 问一次 `agent-in-chrome` 的最新版本号)是唯一的例外,它**可以关**
|
|
22
|
+
(`AGENT_IN_CHROME_NO_UPDATE_NOTIFIER=1`),且只发出「查一下最新版本号」这一个请求,不携带任何本机信息。
|
|
23
|
+
|
|
24
|
+
## 它在你本机写什么、写在哪
|
|
25
|
+
|
|
26
|
+
| 位置 | 内容 | 保留策略 |
|
|
27
|
+
|---|---|---|
|
|
28
|
+
| `~/.agent-in-chrome/agent-in-chrome/` | 运行时代码副本、启动脚本 | 卸载时删除 |
|
|
29
|
+
| `~/.agent-in-chrome/token` | 本机连接令牌(权限 `0600`) | 卸载时删除 |
|
|
30
|
+
| `~/.agent-in-chrome/traces/` | 操作留痕(每步的工具名、打码后入参、当时页面 URL 和标题) | 最近 40 个会话 / 7 天,`AGENT_IN_CHROME_TRACE=off` 可整体关闭 |
|
|
31
|
+
| `~/.agent-in-chrome/screenshots/` | agent 要求的截图 | 保留最近 100 张 |
|
|
32
|
+
| `~/.agent-in-chrome/cookies/` | 你显式要求导出的 cookie(目录 `0700`、文件 `0600`) | 不自动清理——**这是明文凭据,不用了请自己删** |
|
|
33
|
+
| `~/.agent-in-chrome/*.log` | 连接日志(不含页面内容) | 超过 2MB 轮转一代(`.log.1`),只留当前和上一代 |
|
|
34
|
+
| 各浏览器的 `NativeMessagingHosts/org.liangai.agent_in_chrome.json` | native host 注册清单 | 卸载时删除 |
|
|
35
|
+
| 你的 agent 的 MCP 配置文件 | 一条 server 注册(写前自动备份原文件) | 卸载时移除 |
|
|
36
|
+
| CLI 模式:`~/.agent-in-chrome/agent-in-chrome/cli-profile/` | 一个专用 Chrome profile(该模式下浏览的历史、cookie、缓存) | 你可随时整目录删除 |
|
|
37
|
+
|
|
38
|
+
安装器在动手前会列出将要写入的每个路径;`npx @liang-hz/agent-in-chrome check` 随时可以看当前装了什么、在哪。
|
|
39
|
+
|
|
40
|
+
## 它读什么
|
|
41
|
+
|
|
42
|
+
- **你让 agent 访问的页面**:读取内容、执行操作,这是产品的功能本身。接管期间 Chrome 顶部有关不掉的「正在被调试」提示条;放开后消失。
|
|
43
|
+
- **各 Chrome profile 的 `Preferences` 文件(只读)**:仅安装/自检时用来判断扩展是否已装上。
|
|
44
|
+
- **「这一组是谁在开」用到的几样本机信息(只读)**:父进程链(`ps`)、MCP server 进程的当前目录及其所在 git 仓库名、以及 agent 客户端自己写在本机的会话记录(如 `~/.claude/sessions/`)里的会话标题。这几样只走「MCP server → 扩展 → 弹窗」这一条本机链路,显示给你自己看,既不出网卡也不进操作留痕。
|
|
45
|
+
- **本机文件(仅当 agent 上传文件时)**:`browser_upload_file` 有一个敏感路径黑名单(`.ssh`、`.aws`、Keychain、`.env`、私钥、密码库等),命中时必须显式确认并告知你才会继续。
|
|
46
|
+
|
|
47
|
+
## 什么东西被刻意挡住不外流
|
|
48
|
+
|
|
49
|
+
打码分两种判据,各管一头:**按字段名认**(这个字段叫什么)和**按内容形状认**(这串值长什么样)。逐个出口列清楚:
|
|
50
|
+
|
|
51
|
+
| 出口 | 挡住什么 |
|
|
52
|
+
|---|---|
|
|
53
|
+
| 页面读取结果(`browser_read_page` 等) | 密码框、信用卡号、CVV、有效期、短信验证码的值,只报「已填写(N 字符)」;`type=hidden` 的隐藏域(CSRF token、OAuth 的 `state`/`code`、会话标识)同样只报长度;被 `autocomplete` 标成凭据的**可编辑区**(contenteditable,「把恢复口令粘到这里」那类)的内容不进正文 |
|
|
54
|
+
| 填写类工具的回读值(`browser_set` 等) | 同上一行,判据完全一致 |
|
|
55
|
+
| 网络请求头 / 响应头(`browser_request_detail`、`browser_as_curl`) | `Cookie`、`Set-Cookie`、`Authorization`、token、api key、password 等头字段,只显示「有、多长、前几位」 |
|
|
56
|
+
| 网络请求**体** / 响应**体**(`browser_request_detail`、`browser_network` 的匹配行、`browser_as_curl` 的 `--data-raw`) | JWT(`eyJ…` 三段式);JSON 与表单编码里键名像凭据的那些值(`access_token`、`refresh_token`、`client_secret`、`password`、`api_key`、OAuth 的 `code`…)。OAuth 回调那条 POST 的凭据全在体里,头打了码不等于挡住了 |
|
|
57
|
+
| 操作留痕 | **输入的文本只记长度**;凭据类头字段一律打码 |
|
|
58
|
+
| `browser_cookies_export` | 默认**不把 cookie 明文返回给模型**——写成 `0600` 文件,只回文件路径 |
|
|
59
|
+
|
|
60
|
+
需要原文时(排查 401、要一条能重放的 curl),显式传 `revealSecrets:true`——那一份就别往外发了。
|
|
61
|
+
|
|
62
|
+
已知边界,如实告知:
|
|
63
|
+
|
|
64
|
+
- 报文体这一侧**刻意不认「长长的随机十六进制/base64」**。哈希、内部 id、图片 data URI、压缩过的 JS 全长那样,把它们打成码只会让返回值没法读——把正常数据打成码比不打码更难用。所以认的是「一眼就是凭据」的那几种形状。
|
|
65
|
+
- 如果 agent 用 `browser_eval` 主动执行 JS 把 `document.cookie` 读进一个普通变量,按字段名的那套认不出来(这条由 MCP 侧按内容形状兜一道,见 `mcp/secret-shape.mjs`)。
|
|
66
|
+
- 页面自己把凭据当正文渲染出来(比如把 token 打印在页面上),那就是页面内容,读页面就会读到。
|
|
67
|
+
|
|
68
|
+
最后一道防线始终在上一层:skill 约定 + 你对 agent 的指令。
|
|
69
|
+
|
|
70
|
+
## Chrome 扩展权限,逐条说明用途
|
|
71
|
+
|
|
72
|
+
| 权限 | 为什么要 |
|
|
73
|
+
|---|---|
|
|
74
|
+
| `debugger` | 核心机制:通过 Chrome 调试协议读页面、发可信输入事件 |
|
|
75
|
+
| `nativeMessaging` | 和本机 MCP server 之间的唯一通道 |
|
|
76
|
+
| `tabs` / `tabGroups` | 列标签页;把 agent 开的页收进可见的彩色标签组 |
|
|
77
|
+
| `scripting` | 页面快照与元素定位的注入式管线(OOPIF 的唯一通道) |
|
|
78
|
+
| `storage` | 会话-标签页归属表、cookie 借出授权名单、agent 窗口记号。这些落在 `storage.local`,**活过重启**(授权 30 天到期,账本按页/组的生死增删);只有拨号退避档位这类临时状态放会话存储 |
|
|
79
|
+
| `alarms` | service worker 被回收后自动拉起重连 |
|
|
80
|
+
| `<all_urls>` | agent 要能操作你指定的任意站点;不装白名单是因为**你**的指令决定去哪 |
|
|
81
|
+
|
|
82
|
+
扩展不注入任何广告、不改搜索、不采集浏览历史。
|
|
83
|
+
|
|
84
|
+
## English summary
|
|
85
|
+
|
|
86
|
+
Agent in Chrome makes **zero network calls of its own** — no telemetry, no analytics, no crash reporting. All traffic is local IPC (stdio, unix sockets, localhost CDP). The only optional exception is a version check against the npm registry that carries no local data and can be disabled. Everything it writes lives under `~/.agent-in-chrome/` with restrictive permissions (cookie exports `0600`, traces auto-pruned). Credential values are redacted at every exit, by two complementary tests — *what the field is called* and *what the value looks like*: passwords, card numbers, CVV, SMS codes, `type=hidden` fields (CSRF tokens, OAuth `state`/`code`) and credential-marked contenteditable regions never appear in page-reading results; credential request/response **headers and bodies** (JWTs, `access_token`, `refresh_token`, `client_secret`, OAuth `code`) are masked in network results and in generated `curl` commands; typed text is logged as length only; cookie exports return a file path, not plaintext. Pass `revealSecrets:true` when you genuinely need the original. Deliberate limit: opaque-looking blobs (hashes, ids, base64 images) are *not* masked — over-redacting normal data is worse than not redacting it. The uninstaller removes everything it installed. Which websites the tool touches is decided entirely by the instructions you give your agent.
|