@mind-harness/mh-browser 0.2.6 → 0.2.8
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/extension/manifest.json +1 -1
- package/extension/welcome.html +4 -0
- package/extension/welcome.js +10 -0
- package/lib/client.cjs +143 -319
- package/lib/index.js +1994 -1540
- package/lib/types/call.d.ts +23 -0
- package/lib/types/card.d.ts +1 -2
- package/lib/types/client.d.ts +6 -17
- package/lib/types/config.d.ts +4 -2
- package/lib/types/index.d.ts +2 -2
- package/lib/types/locales.d.ts +6 -2
- package/lib/types/location.d.ts +3 -1
- package/lib/types/routes.d.ts +43 -0
- package/lib/types/row.d.ts +2 -4
- package/lib/types/service/browser.d.ts +5 -0
- package/lib/types/service/extension.d.ts +7 -0
- package/lib/types/service/launch-plan.d.ts +30 -0
- package/lib/types/service/locate.d.ts +17 -1
- package/lib/types/service/profile.d.ts +11 -0
- package/lib/types/service/service.d.ts +10 -7
- package/lib/types/settings.d.ts +9 -6
- package/lib/types/types.d.ts +13 -1
- package/package.json +16 -31
- package/THIRD-PARTY-NOTICES +0 -23
- package/lib/typert.host.d.ts +0 -3
- package/lib/typert.host.js +0 -462
- package/lib/typert.remote-client.d.ts +0 -28
- package/lib/typert.remote-client.js +0 -96
package/extension/manifest.json
CHANGED
package/extension/welcome.html
CHANGED
|
@@ -34,6 +34,10 @@
|
|
|
34
34
|
<p class="line" data-text="keep">
|
|
35
35
|
Please keep this browser running. When the agent needs you, the conversation will tell you.
|
|
36
36
|
</p>
|
|
37
|
+
<p class="line" data-text="edge" hidden>
|
|
38
|
+
If the browser asks to turn off an extension that is in developer mode, keep it. The agent
|
|
39
|
+
uses it to open tabs and group them.
|
|
40
|
+
</p>
|
|
37
41
|
<p class="hint" data-text="closes">This window closes when the agent opens its first page.</p>
|
|
38
42
|
</main>
|
|
39
43
|
</body>
|
package/extension/welcome.js
CHANGED
|
@@ -4,6 +4,16 @@ const ZH = {
|
|
|
4
4
|
what: 'Agent 在这里替你打开网页、读取内容、完成操作。你在这里登录过的网站,Agent 之后也能用上。',
|
|
5
5
|
keep: '请不要退出这个浏览器。需要你来接手时,对话里会提示你。',
|
|
6
6
|
closes: 'Agent 打开第一个网页后,这个窗口会自动关闭。',
|
|
7
|
+
edge: '浏览器如果提示关闭开发人员模式的扩展,请选择保留:Agent 靠它打开标签页、管理标签页组。',
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
const brands = navigator.userAgentData && navigator.userAgentData.brands
|
|
11
|
+
const edge =
|
|
12
|
+
(Array.isArray(brands) && brands.some((item) => /edge/i.test(String(item.brand)))) ||
|
|
13
|
+
/Edg\//.test(navigator.userAgent)
|
|
14
|
+
if (edge) {
|
|
15
|
+
const note = document.querySelector('[data-text="edge"]')
|
|
16
|
+
if (note !== null) note.hidden = false
|
|
7
17
|
}
|
|
8
18
|
|
|
9
19
|
if (navigator.language.toLowerCase().startsWith('zh')) {
|