vcorp-chrome 1.4.1 → 1.5.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/README.md +547 -547
- package/docs//344/272/221/347/253/257/345/217/221/345/270/203.md +32 -31
- package/extension/cloud-policy.js +387 -426
- package/extension/cloud.js +950 -1013
- package/extension/manifest.json +38 -38
- package/extension/panel.html +206 -204
- package/extension/panel.js +423 -428
- package/extension/welcome.html +99 -99
- package/package.json +44 -44
package/extension/welcome.html
CHANGED
|
@@ -1,99 +1,99 @@
|
|
|
1
|
-
<!doctype html>
|
|
2
|
-
<html lang="zh-CN">
|
|
3
|
-
<meta charset="utf-8" />
|
|
4
|
-
<meta name="viewport" content="width=device-width, initial-scale=1" />
|
|
5
|
-
<title>vcorp-chrome 装好了</title>
|
|
6
|
-
<style>
|
|
7
|
-
:root {
|
|
8
|
-
color-scheme: light dark;
|
|
9
|
-
--bg: #f5f5f4; --card: #fff; --ink: #1c1917; --mute: #78716c; --line: rgba(0,0,0,.08);
|
|
10
|
-
--soft: rgba(0,0,0,.045); --ok: #16a34a; --accent: #ea580c;
|
|
11
|
-
}
|
|
12
|
-
@media (prefers-color-scheme: dark) {
|
|
13
|
-
:root { --bg: #141414; --card: #1e1e1e; --ink: #f2f2f2; --mute: #a1a1aa; --line: rgba(255,255,255,.09);
|
|
14
|
-
--soft: rgba(255,255,255,.06); --ok: #22c55e; --accent: #fb923c; }
|
|
15
|
-
}
|
|
16
|
-
* { box-sizing: border-box; }
|
|
17
|
-
[hidden] { display: none !important; }
|
|
18
|
-
body { margin: 0; background: var(--bg); color: var(--ink);
|
|
19
|
-
font: 15px/1.7 -apple-system, BlinkMacSystemFont, "PingFang SC", "Microsoft YaHei", sans-serif; }
|
|
20
|
-
.page { max-width: 640px; margin: 0 auto; padding: 56px 16px 64px; }
|
|
21
|
-
.hero { display: flex; align-items: center; gap: 16px; margin-bottom: 28px; }
|
|
22
|
-
.hero img { width: 56px; height: 56px; border-radius: 50%; }
|
|
23
|
-
h1 { margin: 0; font-size: 24px; letter-spacing: .3px; }
|
|
24
|
-
.hero p { margin: 2px 0 0; color: var(--mute); }
|
|
25
|
-
ol { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 12px; }
|
|
26
|
-
li { background: var(--card); border: 1px solid var(--line); border-radius: 14px; padding: 16px 18px;
|
|
27
|
-
display: grid; grid-template-columns: 28px 1fr; gap: 4px 12px; }
|
|
28
|
-
.n { width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; font-size: 13px;
|
|
29
|
-
font-weight: 600; background: var(--soft); color: var(--mute); grid-row: span 2; }
|
|
30
|
-
li.done .n { background: var(--ok); color: #fff; }
|
|
31
|
-
h3 { margin: 0; font-size: 16px; }
|
|
32
|
-
.d { color: var(--mute); font-size: 14px; }
|
|
33
|
-
.cmd { display: flex; gap: 8px; margin-top: 10px; align-items: stretch; }
|
|
34
|
-
code { flex: 1; font: 13px/1.5 ui-monospace, SFMono-Regular, Menlo, monospace; background: var(--soft);
|
|
35
|
-
padding: 9px 12px; border-radius: 9px; word-break: break-all; }
|
|
36
|
-
button { font: inherit; font-size: 13px; border: 0; border-radius: 9px; padding: 0 14px; cursor: pointer;
|
|
37
|
-
background: var(--accent); color: #fff; font-weight: 600; flex: none; }
|
|
38
|
-
.live { display: inline-flex; align-items: center; gap: 7px; margin-top: 10px; font-size: 13.5px; color: var(--mute); }
|
|
39
|
-
.live .dot { width: 9px; height: 9px; border-radius: 50%; background: #a8a29e; animation: wait 1.4s ease-in-out infinite; }
|
|
40
|
-
.live.ok { color: var(--ok); font-weight: 600; }
|
|
41
|
-
.live.ok .dot { background: var(--ok); animation: none; }
|
|
42
|
-
@keyframes wait { 0%, 100% { opacity: 1; } 50% { opacity: .3; } }
|
|
43
|
-
.foot { margin-top: 24px; color: var(--mute); font-size: 13px; }
|
|
44
|
-
a { color: var(--accent); }
|
|
45
|
-
</style>
|
|
46
|
-
|
|
47
|
-
<div class="page">
|
|
48
|
-
<div class="hero">
|
|
49
|
-
<img src="icons/icon128.png" alt="" />
|
|
50
|
-
<div>
|
|
51
|
-
<h1>扩展装好了,还差一步</h1>
|
|
52
|
-
<p>vcorp-chrome 让你的 AI agent 用这个浏览器干活,带着你已有的全部登录。它基于花叔的 huashu-chrome(MIT)修改。</p>
|
|
53
|
-
</div>
|
|
54
|
-
</div>
|
|
55
|
-
|
|
56
|
-
<ol>
|
|
57
|
-
<li id="cloudStep">
|
|
58
|
-
<span class="n">☁</span>
|
|
59
|
-
<h3>只是要让 maker.vcorp.ai 替你发布?不用终端</h3>
|
|
60
|
-
<div class="d"
|
|
61
|
-
<div class="cmd"><button id="openPanel" style="padding:9px 14px">打开侧栏</button></div>
|
|
62
|
-
</div>
|
|
63
|
-
</li>
|
|
64
|
-
|
|
65
|
-
<li class="done">
|
|
66
|
-
<span class="n">✓</span>
|
|
67
|
-
<h3>浏览器扩展</h3>
|
|
68
|
-
<div class="d">已经装好了。</div>
|
|
69
|
-
</li>
|
|
70
|
-
|
|
71
|
-
<li id="step2">
|
|
72
|
-
<span class="n">2</span>
|
|
73
|
-
<h3>在终端里跑一行,接上你的 agent</h3>
|
|
74
|
-
<div class="d">它会自动找到你电脑上装着的 AI agent,逐个配好。需要先装 <a href="https://nodejs.org" target="_blank" rel="noopener">Node.js</a>(20 以上)。
|
|
75
|
-
<div class="cmd"><code id="cmd">npx -y vcorp-chrome@latest install</code><button id="copy">复制</button></div>
|
|
76
|
-
<div class="live" id="live"><span class="dot"></span><span id="livetxt">等待本地端连上…(agent 第一次用它时会自动拉起)</span></div>
|
|
77
|
-
</div>
|
|
78
|
-
</li>
|
|
79
|
-
|
|
80
|
-
<li>
|
|
81
|
-
<span class="n">3</span>
|
|
82
|
-
<h3>对你的 agent 说一句</h3>
|
|
83
|
-
<div class="d">重启 agent 后,试试这样说:
|
|
84
|
-
<div class="cmd"><code id="say">用 vcorp-chrome 打开小红书,看看我最近一篇笔记的数据</code><button id="copy2">复制</button></div>
|
|
85
|
-
</div>
|
|
86
|
-
</li>
|
|
87
|
-
|
|
88
|
-
<li>
|
|
89
|
-
<span class="n">4</span>
|
|
90
|
-
<h3>想看它在做什么,点工具栏的头像</h3>
|
|
91
|
-
<div class="d">侧栏会显示它正在操作哪一页、准备做什么、刚刚做了什么。建议把图标固定到工具栏:点地址栏右边的拼图图标,再点 vcorp-chrome 旁边的图钉。</div>
|
|
92
|
-
</li>
|
|
93
|
-
</ol>
|
|
94
|
-
|
|
95
|
-
<div class="foot">卡住了?在终端跑 <code style="padding:2px 6px">npx vcorp-chrome doctor</code>,它会告诉你卡在哪一步。</div>
|
|
96
|
-
</div>
|
|
97
|
-
|
|
98
|
-
<script src="welcome.js"></script>
|
|
99
|
-
</html>
|
|
1
|
+
<!doctype html>
|
|
2
|
+
<html lang="zh-CN">
|
|
3
|
+
<meta charset="utf-8" />
|
|
4
|
+
<meta name="viewport" content="width=device-width, initial-scale=1" />
|
|
5
|
+
<title>vcorp-chrome 装好了</title>
|
|
6
|
+
<style>
|
|
7
|
+
:root {
|
|
8
|
+
color-scheme: light dark;
|
|
9
|
+
--bg: #f5f5f4; --card: #fff; --ink: #1c1917; --mute: #78716c; --line: rgba(0,0,0,.08);
|
|
10
|
+
--soft: rgba(0,0,0,.045); --ok: #16a34a; --accent: #ea580c;
|
|
11
|
+
}
|
|
12
|
+
@media (prefers-color-scheme: dark) {
|
|
13
|
+
:root { --bg: #141414; --card: #1e1e1e; --ink: #f2f2f2; --mute: #a1a1aa; --line: rgba(255,255,255,.09);
|
|
14
|
+
--soft: rgba(255,255,255,.06); --ok: #22c55e; --accent: #fb923c; }
|
|
15
|
+
}
|
|
16
|
+
* { box-sizing: border-box; }
|
|
17
|
+
[hidden] { display: none !important; }
|
|
18
|
+
body { margin: 0; background: var(--bg); color: var(--ink);
|
|
19
|
+
font: 15px/1.7 -apple-system, BlinkMacSystemFont, "PingFang SC", "Microsoft YaHei", sans-serif; }
|
|
20
|
+
.page { max-width: 640px; margin: 0 auto; padding: 56px 16px 64px; }
|
|
21
|
+
.hero { display: flex; align-items: center; gap: 16px; margin-bottom: 28px; }
|
|
22
|
+
.hero img { width: 56px; height: 56px; border-radius: 50%; }
|
|
23
|
+
h1 { margin: 0; font-size: 24px; letter-spacing: .3px; }
|
|
24
|
+
.hero p { margin: 2px 0 0; color: var(--mute); }
|
|
25
|
+
ol { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 12px; }
|
|
26
|
+
li { background: var(--card); border: 1px solid var(--line); border-radius: 14px; padding: 16px 18px;
|
|
27
|
+
display: grid; grid-template-columns: 28px 1fr; gap: 4px 12px; }
|
|
28
|
+
.n { width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; font-size: 13px;
|
|
29
|
+
font-weight: 600; background: var(--soft); color: var(--mute); grid-row: span 2; }
|
|
30
|
+
li.done .n { background: var(--ok); color: #fff; }
|
|
31
|
+
h3 { margin: 0; font-size: 16px; }
|
|
32
|
+
.d { color: var(--mute); font-size: 14px; }
|
|
33
|
+
.cmd { display: flex; gap: 8px; margin-top: 10px; align-items: stretch; }
|
|
34
|
+
code { flex: 1; font: 13px/1.5 ui-monospace, SFMono-Regular, Menlo, monospace; background: var(--soft);
|
|
35
|
+
padding: 9px 12px; border-radius: 9px; word-break: break-all; }
|
|
36
|
+
button { font: inherit; font-size: 13px; border: 0; border-radius: 9px; padding: 0 14px; cursor: pointer;
|
|
37
|
+
background: var(--accent); color: #fff; font-weight: 600; flex: none; }
|
|
38
|
+
.live { display: inline-flex; align-items: center; gap: 7px; margin-top: 10px; font-size: 13.5px; color: var(--mute); }
|
|
39
|
+
.live .dot { width: 9px; height: 9px; border-radius: 50%; background: #a8a29e; animation: wait 1.4s ease-in-out infinite; }
|
|
40
|
+
.live.ok { color: var(--ok); font-weight: 600; }
|
|
41
|
+
.live.ok .dot { background: var(--ok); animation: none; }
|
|
42
|
+
@keyframes wait { 0%, 100% { opacity: 1; } 50% { opacity: .3; } }
|
|
43
|
+
.foot { margin-top: 24px; color: var(--mute); font-size: 13px; }
|
|
44
|
+
a { color: var(--accent); }
|
|
45
|
+
</style>
|
|
46
|
+
|
|
47
|
+
<div class="page">
|
|
48
|
+
<div class="hero">
|
|
49
|
+
<img src="icons/icon128.png" alt="" />
|
|
50
|
+
<div>
|
|
51
|
+
<h1>扩展装好了,还差一步</h1>
|
|
52
|
+
<p>vcorp-chrome 让你的 AI agent 用这个浏览器干活,带着你已有的全部登录。它基于花叔的 huashu-chrome(MIT)修改。</p>
|
|
53
|
+
</div>
|
|
54
|
+
</div>
|
|
55
|
+
|
|
56
|
+
<ol>
|
|
57
|
+
<li id="cloudStep">
|
|
58
|
+
<span class="n">☁</span>
|
|
59
|
+
<h3>只是要让 maker.vcorp.ai 替你发布?不用终端</h3>
|
|
60
|
+
<div class="d">打开侧栏,在「云端发布」里填网页上给的配对码。任务要去哪些网站会先问你,允许过的列在侧栏里。下面第 2、3 步是给本机 AI agent 用的,可以跳过。
|
|
61
|
+
<div class="cmd"><button id="openPanel" style="padding:9px 14px">打开侧栏</button></div>
|
|
62
|
+
</div>
|
|
63
|
+
</li>
|
|
64
|
+
|
|
65
|
+
<li class="done">
|
|
66
|
+
<span class="n">✓</span>
|
|
67
|
+
<h3>浏览器扩展</h3>
|
|
68
|
+
<div class="d">已经装好了。</div>
|
|
69
|
+
</li>
|
|
70
|
+
|
|
71
|
+
<li id="step2">
|
|
72
|
+
<span class="n">2</span>
|
|
73
|
+
<h3>在终端里跑一行,接上你的 agent</h3>
|
|
74
|
+
<div class="d">它会自动找到你电脑上装着的 AI agent,逐个配好。需要先装 <a href="https://nodejs.org" target="_blank" rel="noopener">Node.js</a>(20 以上)。
|
|
75
|
+
<div class="cmd"><code id="cmd">npx -y vcorp-chrome@latest install</code><button id="copy">复制</button></div>
|
|
76
|
+
<div class="live" id="live"><span class="dot"></span><span id="livetxt">等待本地端连上…(agent 第一次用它时会自动拉起)</span></div>
|
|
77
|
+
</div>
|
|
78
|
+
</li>
|
|
79
|
+
|
|
80
|
+
<li>
|
|
81
|
+
<span class="n">3</span>
|
|
82
|
+
<h3>对你的 agent 说一句</h3>
|
|
83
|
+
<div class="d">重启 agent 后,试试这样说:
|
|
84
|
+
<div class="cmd"><code id="say">用 vcorp-chrome 打开小红书,看看我最近一篇笔记的数据</code><button id="copy2">复制</button></div>
|
|
85
|
+
</div>
|
|
86
|
+
</li>
|
|
87
|
+
|
|
88
|
+
<li>
|
|
89
|
+
<span class="n">4</span>
|
|
90
|
+
<h3>想看它在做什么,点工具栏的头像</h3>
|
|
91
|
+
<div class="d">侧栏会显示它正在操作哪一页、准备做什么、刚刚做了什么。建议把图标固定到工具栏:点地址栏右边的拼图图标,再点 vcorp-chrome 旁边的图钉。</div>
|
|
92
|
+
</li>
|
|
93
|
+
</ol>
|
|
94
|
+
|
|
95
|
+
<div class="foot">卡住了?在终端跑 <code style="padding:2px 6px">npx vcorp-chrome doctor</code>,它会告诉你卡在哪一步。</div>
|
|
96
|
+
</div>
|
|
97
|
+
|
|
98
|
+
<script src="welcome.js"></script>
|
|
99
|
+
</html>
|
package/package.json
CHANGED
|
@@ -1,44 +1,44 @@
|
|
|
1
|
-
{
|
|
2
|
-
"name": "vcorp-chrome",
|
|
3
|
-
"version": "1.
|
|
4
|
-
"description": "让任何 AI agent 操控你自己的 Chrome——带着全部登录态。MCP + Chrome 扩展,Claude Code / Codex / Cursor / Gemini CLI 通用。",
|
|
5
|
-
"type": "module",
|
|
6
|
-
"bin": {
|
|
7
|
-
"vcorp-chrome": "src/cli.js"
|
|
8
|
-
},
|
|
9
|
-
"files": [
|
|
10
|
-
"src",
|
|
11
|
-
"extension",
|
|
12
|
-
"docs",
|
|
13
|
-
"README.md"
|
|
14
|
-
],
|
|
15
|
-
"engines": {
|
|
16
|
-
"node": ">=20"
|
|
17
|
-
},
|
|
18
|
-
"scripts": {
|
|
19
|
-
"mcp": "node src/cli.js mcp",
|
|
20
|
-
"bridge": "node src/cli.js bridge --foreground",
|
|
21
|
-
"doctor": "node src/cli.js doctor",
|
|
22
|
-
"test": "node --test test/protocol.test.js test/mcp.test.js test/fetch-pages.test.js test/liveness.test.js test/redact.test.js test/audit-redact.test.js test/learnings.test.js test/risk.test.js test/identity.test.js test/host.test.js test/presence.test.js test/act-script.test.js test/multi-instance.test.js test/compat.test.js test/cloud-policy.test.js",
|
|
23
|
-
"test:live": "node --test test/scenarios.test.js"
|
|
24
|
-
},
|
|
25
|
-
"dependencies": {
|
|
26
|
-
"@modelcontextprotocol/sdk": "^1.22.0",
|
|
27
|
-
"ws": "^8.18.3"
|
|
28
|
-
},
|
|
29
|
-
"keywords": [
|
|
30
|
-
"mcp",
|
|
31
|
-
"chrome",
|
|
32
|
-
"browser-automation",
|
|
33
|
-
"claude-code",
|
|
34
|
-
"codex",
|
|
35
|
-
"cursor",
|
|
36
|
-
"ai-agent"
|
|
37
|
-
],
|
|
38
|
-
"license": "MIT",
|
|
39
|
-
"author": "Wizard",
|
|
40
|
-
"repository": {
|
|
41
|
-
"type": "git",
|
|
42
|
-
"url": "git+https://github.com/wizd/huashu-chrome.git"
|
|
43
|
-
}
|
|
44
|
-
}
|
|
1
|
+
{
|
|
2
|
+
"name": "vcorp-chrome",
|
|
3
|
+
"version": "1.5.0",
|
|
4
|
+
"description": "让任何 AI agent 操控你自己的 Chrome——带着全部登录态。MCP + Chrome 扩展,Claude Code / Codex / Cursor / Gemini CLI 通用。",
|
|
5
|
+
"type": "module",
|
|
6
|
+
"bin": {
|
|
7
|
+
"vcorp-chrome": "src/cli.js"
|
|
8
|
+
},
|
|
9
|
+
"files": [
|
|
10
|
+
"src",
|
|
11
|
+
"extension",
|
|
12
|
+
"docs",
|
|
13
|
+
"README.md"
|
|
14
|
+
],
|
|
15
|
+
"engines": {
|
|
16
|
+
"node": ">=20"
|
|
17
|
+
},
|
|
18
|
+
"scripts": {
|
|
19
|
+
"mcp": "node src/cli.js mcp",
|
|
20
|
+
"bridge": "node src/cli.js bridge --foreground",
|
|
21
|
+
"doctor": "node src/cli.js doctor",
|
|
22
|
+
"test": "node --test test/protocol.test.js test/mcp.test.js test/fetch-pages.test.js test/liveness.test.js test/redact.test.js test/audit-redact.test.js test/learnings.test.js test/risk.test.js test/identity.test.js test/host.test.js test/presence.test.js test/act-script.test.js test/multi-instance.test.js test/compat.test.js test/cloud-policy.test.js",
|
|
23
|
+
"test:live": "node --test test/scenarios.test.js"
|
|
24
|
+
},
|
|
25
|
+
"dependencies": {
|
|
26
|
+
"@modelcontextprotocol/sdk": "^1.22.0",
|
|
27
|
+
"ws": "^8.18.3"
|
|
28
|
+
},
|
|
29
|
+
"keywords": [
|
|
30
|
+
"mcp",
|
|
31
|
+
"chrome",
|
|
32
|
+
"browser-automation",
|
|
33
|
+
"claude-code",
|
|
34
|
+
"codex",
|
|
35
|
+
"cursor",
|
|
36
|
+
"ai-agent"
|
|
37
|
+
],
|
|
38
|
+
"license": "MIT",
|
|
39
|
+
"author": "Wizard",
|
|
40
|
+
"repository": {
|
|
41
|
+
"type": "git",
|
|
42
|
+
"url": "git+https://github.com/wizd/huashu-chrome.git"
|
|
43
|
+
}
|
|
44
|
+
}
|