vcorp-chrome 1.8.1 → 2.2.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.
@@ -1,38 +1,41 @@
1
- {
2
- "manifest_version": 3,
3
- "name": "vcorp-chrome",
4
- "version": "1.8.1",
5
- "description": "让 AI agent 操控你已登录的 Chrome。基于花叔的 huashu-chrome(MIT)修改。",
6
- "key": "MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAq6xRqEwG4yTuHRG1Zah3j//T3B72XnazyZ+9fOCa5P4bBLPmNBN7YAGL5WnjtPVJefXT9r2Ol0qvNztayDG3dMjK6AZoWccgKa5rhxcvWgFUjanXtmBBQ0qgYwNhuEJSkdinLLtyUg6YmK7Mn72NWpfa/NfqNHdK5AHslvvtJ50iQAYmabl2Nd3vOJ9DxtLBt8a2DfoGPWizgEB3+gkqm2PB8LywwwoiGKd7acr1wZEWmWK9/s0YWdzIstjlvk5AO5XFn6EtEzW8tAAOwBka9239pcyj0kEogWctHLJn7p9VFru38r+I1USyGn6u9XQ68n9edWddxBYokETCqEMT9QIDAQAB",
7
- "minimum_chrome_version": "116",
8
- "background": {
9
- "service_worker": "background.js",
10
- "type": "module"
11
- },
12
- "action": {
13
- "default_title": "vcorp-chrome"
14
- },
15
- "permissions": [
16
- "tabs",
17
- "tabGroups",
18
- "scripting",
19
- "storage",
20
- "alarms",
21
- "offscreen",
22
- "downloads",
23
- "sidePanel",
24
- "notifications",
25
- "debugger"
26
- ],
27
- "host_permissions": [
28
- "<all_urls>"
29
- ],
30
- "icons": {
31
- "16": "icons/icon16.png",
32
- "48": "icons/icon48.png",
33
- "128": "icons/icon128.png"
34
- },
35
- "side_panel": {
36
- "default_path": "panel.html"
37
- }
38
- }
1
+ {
2
+ "manifest_version": 3,
3
+ "name": "vcorp-chrome",
4
+ "version": "2.2.0",
5
+ "description": "让 AI agent 操控你已登录的 Chrome。基于花叔的 huashu-chrome(MIT)修改。",
6
+ "key": "MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAq6xRqEwG4yTuHRG1Zah3j//T3B72XnazyZ+9fOCa5P4bBLPmNBN7YAGL5WnjtPVJefXT9r2Ol0qvNztayDG3dMjK6AZoWccgKa5rhxcvWgFUjanXtmBBQ0qgYwNhuEJSkdinLLtyUg6YmK7Mn72NWpfa/NfqNHdK5AHslvvtJ50iQAYmabl2Nd3vOJ9DxtLBt8a2DfoGPWizgEB3+gkqm2PB8LywwwoiGKd7acr1wZEWmWK9/s0YWdzIstjlvk5AO5XFn6EtEzW8tAAOwBka9239pcyj0kEogWctHLJn7p9VFru38r+I1USyGn6u9XQ68n9edWddxBYokETCqEMT9QIDAQAB",
7
+ "minimum_chrome_version": "116",
8
+ "background": {
9
+ "service_worker": "background.js",
10
+ "type": "module"
11
+ },
12
+ "action": {
13
+ "default_title": "vcorp-chrome"
14
+ },
15
+ "permissions": [
16
+ "tabs",
17
+ "tabGroups",
18
+ "scripting",
19
+ "storage",
20
+ "alarms",
21
+ "offscreen",
22
+ "downloads",
23
+ "sidePanel",
24
+ "notifications",
25
+ "debugger"
26
+ ],
27
+ "optional_permissions": [
28
+ "nativeMessaging"
29
+ ],
30
+ "host_permissions": [
31
+ "<all_urls>"
32
+ ],
33
+ "icons": {
34
+ "16": "icons/icon16.png",
35
+ "48": "icons/icon48.png",
36
+ "128": "icons/icon128.png"
37
+ },
38
+ "side_panel": {
39
+ "default_path": "panel.html"
40
+ }
41
+ }
@@ -17,11 +17,12 @@
17
17
  [hidden] { display: none !important; }
18
18
  body { margin: 0; background: var(--bg); color: var(--ink);
19
19
  font: 13px/1.6 -apple-system, BlinkMacSystemFont, "PingFang SC", "Microsoft YaHei", sans-serif; }
20
- header { display: flex; align-items: center; gap: 10px; padding: 14px 16px 10px; }
21
- header img { width: 30px; height: 30px; border-radius: 50%; }
22
- header .t { font-weight: 600; font-size: 14px; }
23
- header .v { color: var(--mute); font-size: 11px; margin-left: 4px; font-weight: 400; }
24
- .pill { margin-left: auto; display: flex; align-items: center; gap: 6px; font-size: 11.5px; color: var(--mute);
20
+ header { position: sticky; top: 0; z-index: 1; display: flex; align-items: center; gap: 8px;
21
+ padding: 10px 12px 8px; background: var(--bg); }
22
+ header .jump { font-size: 12px; text-decoration: none; }
23
+ header .jump:hover { text-decoration: underline; }
24
+ header .jump.bad { color: var(--bad); font-weight: 500; }
25
+ .pill { display: flex; align-items: center; gap: 6px; font-size: 11.5px; color: var(--mute);
25
26
  padding: 3px 9px; border-radius: 999px; background: var(--soft); }
26
27
  .dot { width: 8px; height: 8px; border-radius: 50%; background: #a8a29e; flex: none; }
27
28
  .dot.ok { background: var(--ok); } .dot.warn { background: var(--warn); } .dot.bad { background: var(--bad); }
@@ -101,15 +102,52 @@
101
102
  a.guide { display: flex; text-decoration: none; color: inherit; cursor: pointer; border-radius: 8px; margin: 0 -6px; padding-left: 6px; padding-right: 6px; }
102
103
  a.guide:hover { background: var(--soft); }
103
104
  a.guide .go { color: var(--accent); font-size: 12px; flex: none; }
105
+ /* 需要你处理:置顶、闪烁,处理完就收起 */
106
+ .need { margin-left: auto; all: unset; cursor: pointer; font-size: 11.5px; font-weight: 600; color: #fff; background: var(--warn);
107
+ padding: 3px 9px; border-radius: 999px; animation: blink 1.2s ease-in-out infinite; }
108
+ .alert { border: 1.5px solid var(--warn); background: color-mix(in srgb, var(--warn) 8%, var(--card));
109
+ animation: flash 1.2s ease-in-out infinite; }
110
+ .alert h2 { color: var(--warn); font-weight: 600; display: flex; align-items: center; gap: 6px; }
111
+ .alert .pulse { background: var(--warn); }
112
+ .alert .task:first-child, .alert #cloudClaim:not([hidden]) + #asks .task:first-child { margin-top: 0; }
113
+ .alert .confirm { margin-top: 0; }
114
+ @keyframes flash { 0%, 100% { box-shadow: 0 0 0 0 color-mix(in srgb, var(--warn) 50%, transparent); }
115
+ 50% { box-shadow: 0 0 0 4px color-mix(in srgb, var(--warn) 22%, transparent); } }
116
+ @keyframes blink { 0%, 100% { opacity: 1; } 50% { opacity: .55; } }
117
+ @media (prefers-reduced-motion: reduce) { .alert, .need, .pulse { animation: none; } }
118
+ .top-err { margin: 0; padding: 8px 12px; border-radius: 10px; background: color-mix(in srgb, var(--bad) 10%, var(--card)); }
119
+ /* 帮助:全部折叠在最下面 */
120
+ .help details { border-top: 1px solid var(--line); padding: 2px 0 4px; }
121
+ .help details:first-of-type { border-top: 0; }
122
+ .help details summary { color: var(--ink); font-size: 12.5px; margin: 4px 0; }
123
+ .help details > div { color: var(--mute); font-size: 12px; margin: 2px 0 6px; }
124
+ .help code { flex: none; }
104
125
  </style>
105
126
 
127
+ <!-- 侧栏自带标题栏已经写了名字,这里只留状态 -->
106
128
  <header>
107
- <img src="icons/icon128.png" alt="" />
108
- <div class="t">vcorp-chrome<span class="v" id="ver"></span></div>
109
129
  <div class="pill"><span class="dot" id="pilldot"></span><span id="pilltxt">检查中…</span></div>
130
+ <a class="jump" id="connJump" href="#conn">连接详情</a>
131
+ <button class="need" id="needPill" type="button" hidden></button>
110
132
  </header>
111
133
 
112
134
  <main>
135
+ <div class="msg bad top-err" id="cloudErr" hidden></div>
136
+
137
+ <!-- 1. 要你马上点头的:配对确认、任务批准、追加的网站/文件夹/应用/桌面动作 -->
138
+ <section id="alert" class="alert" hidden>
139
+ <h2><span class="pulse"></span>需要你处理</h2>
140
+ <div id="cloudClaim" hidden>
141
+ <div class="confirm">
142
+ <div>要把这个浏览器交给 <b id="claimOrigin"></b> 上的账号 <b id="claimAccount"></b> 吗?</div>
143
+ <div class="muted" style="margin-top:4px">配对码如果是别人发给你的,点取消。</div>
144
+ <div class="row"><button class="btn" id="claimYes">确认连接</button><button class="btn ghost" id="claimNo">取消</button></div>
145
+ </div>
146
+ </div>
147
+ <div id="asks"></div>
148
+ </section>
149
+
150
+ <!-- 2. 正在发生的 -->
113
151
  <section>
114
152
  <h2>这一页</h2>
115
153
  <div id="page"><div class="empty">读取中…</div></div>
@@ -120,56 +158,39 @@
120
158
  <div class="sess" id="sess"></div>
121
159
  </section>
122
160
 
123
- <section>
124
- <h2>连接</h2>
125
- <div id="lights"></div>
126
- <div class="cmd" id="reconnRow" hidden><button class="btn" id="reconn">重连</button>
127
- <span class="sub" style="color:var(--mute);font-size:12px">插件没消失,断的只是到终端的连接</span></div>
128
- </section>
129
-
161
+ <!-- 3. 云端 -->
130
162
  <section id="cloud">
131
163
  <h2>云端发布</h2>
132
164
  <!-- 没配对 -->
133
165
  <div id="cloudPair" hidden>
134
- <div class="muted">让 maker.vcorp.ai 在这个浏览器里替你发布作品、查资料、办事——用的是你已经登录好的账号,
135
- 网站的 cookie 不会离开这台电脑。到网页上「浏览器扩展」里拿一个配对码填在这里。</div>
166
+ <div class="muted">到 maker.vcorp.ai「浏览器扩展」里拿一个配对码填在这里。</div>
136
167
  <div class="field">
137
168
  <input type="text" class="code" id="pairCode" maxlength="9" placeholder="ABCD-EFGH" autocomplete="off" spellcheck="false" />
138
169
  </div>
139
170
  <details>
140
- <summary>服务器地址</summary>
171
+ <summary>服务器地址(自建服务才需要改)</summary>
141
172
  <div class="field"><input type="text" id="pairOrigin" spellcheck="false" /></div>
142
- <div class="muted">只有自建了服务才需要改。</div>
143
173
  </details>
144
174
  <div class="row"><button class="btn" id="pairGo">下一步</button></div>
145
175
  </div>
146
- <!-- 配对第一步完成,等用户确认账号 -->
147
- <div id="cloudClaim" hidden>
148
- <div class="confirm">
149
- <div>要把这个浏览器交给 <b id="claimOrigin"></b> 上的账号 <b id="claimAccount"></b> 吗?</div>
150
- <div class="muted" style="margin-top:4px">确认后,这个账号可以申请在你允许的网站上替你操作,每个任务都要你点头。配对码如果是别人发给你的,点取消。</div>
151
- <div class="row"><button class="btn" id="claimYes">确认连接</button><button class="btn ghost" id="claimNo">取消</button></div>
152
- </div>
153
- </div>
154
176
  <!-- 已配对 -->
155
177
  <div id="cloudOn" hidden>
156
178
  <div class="light"><span class="dot" id="cloudDot"></span>
157
179
  <div><div class="name" id="cloudName"></div><div class="sub" id="cloudSub"></div></div></div>
158
- <div class="lab" style="margin-top:6px">允许它使用的网站</div>
159
- <div class="sites" id="cloudSites"></div>
160
- <div class="muted" style="margin-top:4px">任务申请网站、你点了允许,就记在这里(含子域)。不在这里、也没在任务里批准的网站,它连页面都打不开。</div>
161
180
  <div id="cloudTasks"></div>
181
+ <div class="lab" style="margin-top:10px">允许它使用的网站</div>
182
+ <div class="sites" id="cloudSites"></div>
162
183
  <label class="sw-row">
163
- <span class="txt">自动允许新任务<div class="sub">不再逐个弹窗确认。只在你信任这个账号时打开:新任务,以及它一开始就要去的网站,会直接放行。任务开始之后再加的网站,还有本地文件夹,仍然要你逐个点头</div></span>
164
- <input type="checkbox" class="toggle" id="cloudAuto" />
184
+ <span class="txt">暂停<div class="sub">云端的命令一条都不接,直到你再打开</div></span>
185
+ <input type="checkbox" class="toggle" id="cloudPause" />
165
186
  </label>
166
187
  <label class="sw-row">
167
- <span class="txt">对外动作不再逐条确认<div class="sub">发消息、投递、发帖之前不再问你。扫码、验证码仍然要你本人来。付款一律不做</div></span>
168
- <input type="checkbox" class="toggle" id="cloudAutoConfirm" />
188
+ <span class="txt">自动允许新任务<div class="sub">只在你信任这个账号时打开</div></span>
189
+ <input type="checkbox" class="toggle" id="cloudAuto" />
169
190
  </label>
170
191
  <label class="sw-row">
171
- <span class="txt">暂停<div class="sub">立刻断开,云端的命令一条都不接,直到你再打开</div></span>
172
- <input type="checkbox" class="toggle" id="cloudPause" />
192
+ <span class="txt">对外动作不再逐条确认<div class="sub">发消息、发帖前不再问你;付款一律不做</div></span>
193
+ <input type="checkbox" class="toggle" id="cloudAutoConfirm" />
173
194
  </label>
174
195
  <details>
175
196
  <summary>操作记录</summary>
@@ -177,34 +198,82 @@
177
198
  </details>
178
199
  <div class="row"><button class="btn ghost" id="cloudReconn">重连</button><button class="btn ghost" id="cloudUnpair">断开并忘记这个服务器</button></div>
179
200
  </div>
180
- <div class="msg bad" id="cloudErr" hidden></div>
181
201
  </section>
182
202
 
203
+ <!-- 4. 设置 -->
183
204
  <section>
184
205
  <h2>本地文件夹</h2>
185
- <div class="muted">挂载之后,配对的网站可以申请读取里面的文档(Markdown、文本、PDF、Word、CSV、JSON、HTML)。只读,不会改你的文件。每次真正读取之前还会再问你一次。浏览器重启后如果这里显示需要恢复,点「恢复访问」。</div>
186
206
  <div id="folderList"></div>
187
207
  <div class="row"><button class="btn" id="folderAdd" type="button">添加文件夹</button></div>
188
208
  </section>
189
209
 
210
+ <section>
211
+ <h2>桌面应用</h2>
212
+ <div id="deskState" class="sub"></div>
213
+ <div class="row">
214
+ <button class="btn" id="deskOn" type="button">启用桌面能力</button>
215
+ <button class="btn ghost" id="deskOff" type="button" hidden>停用</button>
216
+ </div>
217
+ </section>
218
+
190
219
  <section>
191
220
  <h2>设置</h2>
192
- <a class="sw-row guide" id="guide" href="welcome.html">
193
- <span class="txt">开始使用<div class="sub">配对码、接上本机 agent、第一句怎么说</div></span>
194
- <span class="go">打开</span>
195
- </a>
196
221
  <label class="sw-row">
197
- <span class="txt">高保真模式<div class="sub">需要时用浏览器级真实输入,应付严格的站点和富文本编辑器;用完自动断开</div></span>
222
+ <span class="txt">高保真模式<div class="sub">需要时用浏览器级真实输入;用完自动断开</div></span>
198
223
  <input type="checkbox" class="toggle" id="l2" />
199
224
  </label>
200
225
  <label class="sw-row">
201
- <span class="txt">页面标记<div class="sub">被操作的页面带彩色描边、光标和小头像;录屏演示时可以关掉</div></span>
226
+ <span class="txt">页面标记<div class="sub">被操作的页面带彩色描边和小头像;录屏时可以关掉</div></span>
202
227
  <input type="checkbox" class="toggle" id="mark" />
203
228
  </label>
204
229
  </section>
205
- </main>
206
230
 
207
- <footer>连不上时在终端跑 <code style="padding:1px 5px">npx vcorp-chrome doctor</code>,它会告诉你卡在哪一步。</footer>
231
+ <!-- 5. 帮助:连接诊断 + 折叠说明,都在最下面;顶上状态旁的「连接详情」跳到这里 -->
232
+ <section id="conn">
233
+ <h2>连接</h2>
234
+ <div id="lights"></div>
235
+ <div class="cmd" id="reconnRow" hidden><button class="btn" id="reconn">重连</button>
236
+ <span class="sub" style="color:var(--mute);font-size:12px">插件没消失,断的只是到终端的连接</span></div>
237
+ </section>
238
+
239
+ <section class="help">
240
+ <h2>帮助</h2>
241
+ <a class="sw-row guide" id="guide" href="welcome.html">
242
+ <span class="txt">开始使用<div class="sub">配对码、接上本机 agent、第一句怎么说</div></span>
243
+ <span class="go">打开</span>
244
+ </a>
245
+ <details>
246
+ <summary>连不上怎么办</summary>
247
+ <div>在终端跑 <code>npx vcorp-chrome doctor</code>,它会告诉你卡在哪一步。</div>
248
+ </details>
249
+ <details>
250
+ <summary>云端发布是什么</summary>
251
+ <div>让 maker.vcorp.ai 在这个浏览器里替你发布作品、查资料、办事——用的是你已经登录好的账号,网站的 cookie 不会离开这台电脑。
252
+ 配对后,这个账号可以申请在你允许的网站上替你操作,每个任务都要你点头。</div>
253
+ </details>
254
+ <details>
255
+ <summary>允许的网站</summary>
256
+ <div>任务申请网站、你点了允许,就记在名单里(含子域)。不在名单里、也没在任务里批准的网站,它连页面都打不开。没有预设的平台。</div>
257
+ </details>
258
+ <details>
259
+ <summary>自动允许和免确认</summary>
260
+ <div>「自动允许新任务」:新任务,以及它一开始就要去的网站,会直接放行。任务开始之后再加的网站,还有本地文件夹,仍然要你逐个点头。</div>
261
+ <div>「对外动作不再逐条确认」:发消息、投递、发帖之前不再问你。扫码、验证码仍然要你本人来。付款一律不做。</div>
262
+ </details>
263
+ <details>
264
+ <summary>本地文件夹</summary>
265
+ <div>挂载之后,配对的网站可以申请读取里面的文档(Markdown、文本、PDF、Word、CSV、JSON、HTML)。只读,不会改你的文件。每次真正读取之前还会再问你一次。浏览器重启后如果显示需要恢复,点「恢复访问」。</div>
266
+ </details>
267
+ <details>
268
+ <summary>桌面应用</summary>
269
+ <div>启用后,配对的网站可以申请操作这台电脑上的某个应用(比如微信、Excel)。每个任务要用的应用都会先问你。浏览器窗口、密码管理器、终端一律不碰;付款不做,发送和删除之前会问你。需要先在终端运行一次 <code>npx vcorp-chrome desktop install</code>。</div>
270
+ </details>
271
+ <details>
272
+ <summary>高保真模式</summary>
273
+ <div>需要时用浏览器级真实输入,应付严格的站点和富文本编辑器;用完自动断开。</div>
274
+ </details>
275
+ </section>
276
+ </main>
208
277
 
209
278
  <script type="module" src="panel.js"></script>
210
279
  </html>