@seekskyworld/open-browser 0.3.0 → 0.3.1
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/CONTRIBUTING.md +2 -0
- package/Docs/desktop-packages.md +45 -0
- package/Docs//350/267/250/345/271/263/345/217/260/350/257/225/347/224/250/344/270/216/345/217/221/350/241/214.md +1 -1
- package/README.md +8 -6
- package/README.zh-CN.md +2 -0
- package/api-contract.mjs +2 -1
- package/browser-extension/_locales/en/messages.json +8 -0
- package/browser-extension/_locales/zh_CN/messages.json +8 -0
- package/browser-extension/i18n.js +84 -0
- package/browser-extension/manifest.json +5 -4
- package/browser-extension/messages.js +266 -0
- package/browser-extension/newtab.css +4 -0
- package/browser-extension/newtab.html +9 -9
- package/browser-extension/newtab.js +38 -36
- package/browser-extension/page-locale.js +23 -0
- package/browser-extension/phase-labels.js +33 -6
- package/browser-extension/popup.css +2 -2
- package/browser-extension/popup.html +24 -26
- package/browser-extension/popup.js +72 -49
- package/browser-extension/tab-action.js +29 -24
- package/browser-extension/worker.js +29 -5
- package/browser-extension/workspace-title.js +2 -2
- package/build-profile.mjs +10 -2
- package/chromium-host.mjs +22 -11
- package/chromium-shell.mjs +5 -3
- package/cli.mjs +33 -30
- package/control.mjs +9 -8
- package/desktop/Info.plist +3 -1
- package/desktop/Launcher.m +10 -2
- package/desktop/OBControlBar.m +12 -8
- package/desktop/OBLocalization.h +20 -0
- package/desktop/OBPageView.m +2 -1
- package/desktop/WorkspacePanel.m +84 -83
- package/desktop/archive-release.py +5 -1
- package/desktop/build-macos.mjs +11 -5
- package/desktop/build-managed-input.mjs +2 -1
- package/desktop/build-portable.mjs +5 -3
- package/desktop/build-profile.mjs +2 -1
- package/desktop/build.mjs +2 -1
- package/desktop/create-shortcut.ps1 +7 -1
- package/desktop/en.lproj/Localizable.strings +106 -0
- package/desktop/install-menu-entry.mjs +2 -0
- package/desktop/notarize-macos.mjs +21 -24
- package/desktop/package-macos.mjs +4 -3
- package/desktop/sign.mjs +5 -4
- package/desktop/start-profile.mjs +2 -1
- package/desktop/start.mjs +3 -1
- package/desktop/verify-macos-release.mjs +9 -8
- package/desktop/zh-Hans.lproj/Localizable.strings +106 -0
- package/engine-service.mjs +1 -1
- package/hosted/cli.mjs +2 -1
- package/hosted/init.mjs +2 -1
- package/i18n.mjs +41 -0
- package/mcp-http.mjs +3 -2
- package/mcp-server.mjs +4 -3
- package/messages.zh-CN.mjs +175 -0
- package/package.json +4 -1
- package/page-activity.mjs +8 -6
- package/paths.mjs +2 -5
- package/runtime.mjs +4 -3
- package/sdk.mjs +40 -39
- package/service.mjs +2 -1
- package/skills/open-browser/SKILL.md +11 -9
- package/skills/open-browser/SKILL.zh-CN.md +22 -0
- package/skills/open-browser/references/macos.en.md +3 -0
- package/skills/open-browser/references/macos.md +2 -0
- package/skills/open-browser/references/operations.en.md +54 -0
- package/skills/open-browser/references/operations.md +2 -0
- package/skills/open-browser/references/recovery.en.md +36 -0
- package/skills/open-browser/references/recovery.md +2 -0
- package/skills/open-browser/references/windows.en.md +3 -0
- package/skills/open-browser/references/windows.md +2 -0
- package/skills/open-browser/scripts/bootstrap.mjs +6 -4
- package/skills/open-browser/scripts/guide.mjs +7 -4
- package/skills/open-browser/scripts/open-browser +5 -1
- package/studio/demo-site.mjs +5 -4
- package/studio/index.html +37 -33
- package/studio/index.mjs +10 -3
- package/studio/native-demo.mjs +8 -7
- package/studio/studio.css +3 -0
- package/studio/studio.js +98 -68
- package/system-i18n.mjs +19 -0
package/CONTRIBUTING.md
CHANGED
|
@@ -12,4 +12,6 @@ node --test service.integration.test.mjs
|
|
|
12
12
|
|
|
13
13
|
修改控制接口时,更新方法描述、SDK 类型和项目内 Skill。用 `node cli.mjs --schema` 查看 CLI、MCP 与服务使用的方法描述。修改任务执行时,请给出站点收到的结果、执行前后所用场景和复跑命令。截图、账号资料、令牌与真实站点正文留在本机。
|
|
14
14
|
|
|
15
|
+
修改界面文案或 Skill 后运行 `npm run check:i18n`。扩展和网页控制台的固定文字在 HTML 中使用 `data-i18n` 或 `data-i18n-attrs` 标记,中文译文放在 `browser-extension/messages.js`。Skill 的英文原文更新后,核对对应的中文指南,并把检查输出的 SHA-256 写入该译文末尾的 `source-sha256` 注释。
|
|
16
|
+
|
|
15
17
|
快速回归使用 `npm run test:unit`,合并前使用 `npm run test:all`。桌面签名、目标平台打包和 SHA-256 核对步骤见[跨平台试用与发行](Docs/跨平台试用与发行.md)。本地评测口径见[任务评测指南](Docs/open-browser任务评测指南.md)。安全或隐私问题请按[私下报告流程](SECURITY.md)联系维护者。
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
# Open Browser desktop packages
|
|
2
|
+
|
|
3
|
+
## Install and start
|
|
4
|
+
|
|
5
|
+
- **macOS.** Download the DMG for Apple Silicon (arm64) or Intel (x64), open it, and drag the app to Applications. Launch `open-browser.app`.
|
|
6
|
+
- **Windows x64.** Extract the entire `open-browser-win32-x64.zip` archive and run `open-browser.cmd`. To create a desktop shortcut, run `powershell -NoProfile -ExecutionPolicy Bypass -File .\create-shortcut.ps1` in the extracted directory.
|
|
7
|
+
- **Linux x64.** Extract `open-browser-linux-x64.tar.gz` and run `./open-browser` from a graphical desktop session. For a menu entry, run `./node/bin/node install-menu-entry.mjs`. Install the system libraries required by Chromium. Ubuntu build environments can use `node node_modules/playwright-core/cli.js install-deps chromium`.
|
|
8
|
+
|
|
9
|
+
Both portable packages contain Node, Chromium, the extension and the local service. Recreate the shortcut or menu entry if you move the extracted directory. The portable package includes the Chinese instructions as `README.zh-CN.md`.
|
|
10
|
+
|
|
11
|
+
Open a new tab for the Agent Console. Create a workspace through the CLI or MCP to open a managed page. Its extension lets you take over, return control and bind credentials. The macOS app also provides a floating control bar.
|
|
12
|
+
|
|
13
|
+
Use the **Language** selector in the new-tab Agent Console or local web console to choose **Follow system**, **简体中文** or **English**. The selection is saved per profile and is used by later CLI and MCP sessions. OPEN_BROWSER_LOCALE=en or OPEN_BROWSER_LOCALE=zh-CN overrides the saved choice for one process.
|
|
14
|
+
|
|
15
|
+
## Build and verify
|
|
16
|
+
|
|
17
|
+
Install Node.js 22 or later, Python 3, curl and tar. Run `npm ci` in the source checkout. `npm run build` selects the host platform. Portable archives can also be built on macOS.
|
|
18
|
+
|
|
19
|
+
| Target | Command | Output in `dist/` |
|
|
20
|
+
| --- | --- | --- |
|
|
21
|
+
| macOS arm64, local | `npm run package:macos:arm64` | App, ZIP, DMG and checksums |
|
|
22
|
+
| macOS arm64, DMG only | `npm run package:macos:dmg` | `open-browser-macos-arm64.dmg` and checksum |
|
|
23
|
+
| macOS x64, local | `npm run package:macos:x64` | Intel app, ZIP, DMG and checksums |
|
|
24
|
+
| Windows x64 | `npm run package:windows:x64` | `open-browser-win32-x64.zip` and checksum |
|
|
25
|
+
| Linux x64 | `npm run package:linux:x64` | `open-browser-linux-x64.tar.gz` and checksum |
|
|
26
|
+
|
|
27
|
+
`npm run package:macos` builds the default arm64 app, ZIP and DMG. Use `npm run package:portable:all` for both portable archives or `npm run package:all` for all local package targets. Use `npm run build:dev` or `npm run start:dev` for the development profile in `~/.open-browser/dev`. Stable builds use `npm run build:stable` or `npm start` and store data in `~/.open-browser`. Each profile has a separate browser profile, PID, socket and receipt database.
|
|
28
|
+
|
|
29
|
+
macOS requires Xcode command line tools and a Developer ID Application certificate. Run `npm run browser:install` before building. Use an arm64 Node process for Apple Silicon and an x64 Node process on Intel, under Rosetta or on an x64 runner for the Intel package. For public releases run `npm run build:release-macos:arm64` and `npm run build:release-macos:x64`. These commands sign and notarize the app, staple its ticket, then sign, notarize and staple the final DMG. Verify both using `npm run release:verify-macos -- dist/open-browser.app` and `npm run release:verify-macos -- dist/open-browser-x64.app`.
|
|
30
|
+
|
|
31
|
+
Verify the published checksums with `shasum -a 256 -c FILE.sha256` on macOS or Linux, or compare `Get-FileHash FILE -Algorithm SHA256` on Windows. Test the extracted portable bundle on its target system with `./node/bin/node verify.mjs .` or `.\node\node.exe verify.mjs .`. This starts a temporary service and extension, opens a local fixture and reads it through the CLI.
|
|
32
|
+
|
|
33
|
+
## macOS signing and release records
|
|
34
|
+
|
|
35
|
+
The signing script enables Hardened Runtime and a trusted timestamp. Set `OPEN_BROWSER_SIGN_IDENTITY` to the Developer ID name or SHA-1 if needed. For local offline debugging, use `OPEN_BROWSER_CODESIGN_TIMESTAMP=none`. Public releases require the normal timestamp.
|
|
36
|
+
|
|
37
|
+
Supply notarization credentials through one of the following mechanisms.
|
|
38
|
+
|
|
39
|
+
1. Set `OPEN_BROWSER_NOTARY_PROFILE` to a keychain profile created with `xcrun notarytool store-credentials`.
|
|
40
|
+
2. Supply an App Store Connect key file using `OPEN_BROWSER_NOTARY_KEY` and its ID via `OPEN_BROWSER_NOTARY_KEY_ID`. Team keys also require `OPEN_BROWSER_NOTARY_ISSUER`.
|
|
41
|
+
3. Supply `OPEN_BROWSER_NOTARY_APPLE_ID`, `OPEN_BROWSER_NOTARY_TEAM_ID` and an app-specific password in `OPEN_BROWSER_NOTARY_PASSWORD` or in the keychain service `open-browser-notary`.
|
|
42
|
+
|
|
43
|
+
Use `--zip`, `--dmg`, `OPEN_BROWSER_NOTARY_ZIP` or `OPEN_BROWSER_NOTARY_DMG` for custom artifact paths. Keep the source commit, target architecture, engine and Node versions, checksums, Apple request IDs and verification results with the release. Run `npm run test:all` for the automated suite and check takeover, handback and profile upgrades in a visible browser.
|
|
44
|
+
|
|
45
|
+
From the checkout, `python3 desktop/archive-release.py snapshot` writes a reproducible source archive and checksum under `dist/`. With the matching desktop archives and checksum files in place, run `python3 desktop/archive-release.py verify` to compare packaged source and write `dist/SHA256SUMS`. The bundle includes third-party notices, a Node license, a package license manifest and Chromium credits at `chrome://credits/`.
|
|
@@ -61,7 +61,7 @@ Windows x64 下载 `open-browser-win32-x64.zip` 并完整解压,运行 `open-b
|
|
|
61
61
|
|
|
62
62
|
核对 `Docs/THIRD-PARTY-NOTICES.md`、分发内 `app/third-party-packages.json`、Node LICENSE、引擎的 ABOUT 与运行中的 `chrome://credits/`。保存构建所用提交、系统和架构、Node/Chromium 版本、包 SHA-256、测试输出与已知限制。CI 执行构建和验收;对外发布版本、选定项目许可证及上传 macOS 公证均由项目所有者决定。
|
|
63
63
|
|
|
64
|
-
在项目根目录运行 `python3 desktop/archive-release.py snapshot` 会生成保留执行位、固定时间戳的源码归档和校验和,包含 Git 已跟踪和未忽略的源码。归档保存在 `dist/open-browser-source-0.3.
|
|
64
|
+
在项目根目录运行 `python3 desktop/archive-release.py snapshot` 会生成保留执行位、固定时间戳的源码归档和校验和,包含 Git 已跟踪和未忽略的源码。归档保存在 `dist/open-browser-source-0.3.1.tar.gz`。macOS 构建机可以用以下命令归档已签名应用,再比对发行包中的应用源文件、第三方声明与源码快照。在此期间保持工作树稳定。
|
|
65
65
|
|
|
66
66
|
```sh
|
|
67
67
|
ditto -c -k --keepParent --sequesterRsrc dist/open-browser.app dist/open-browser-macos-arm64.zip
|
package/README.md
CHANGED
|
@@ -15,15 +15,17 @@ open-browser is an open-source desktop browser for agents. It runs locally and s
|
|
|
15
15
|
- **Run tasks in parallel.** Workspaces progress independently and actions on each page stay in order. The service keeps same-page actions ordered while independent workspaces run concurrently. Use `npm run test:unit` and `npm run test:contract` to reproduce the local regression suites.
|
|
16
16
|
- **Use an existing signed-in tab.** Ask the agent to create a named workspace. Open the extension on the desired open-browser tab, choose that task, and approve control of that tab. The tab stays open when the task finishes.
|
|
17
17
|
- **Share a live task with an agent.** Take over during sign-in, complete the form in place and hand the same tab back with its session intact. For routine sign-ins, bind a credential to the workspace and site so the agent can fill it by reference. [Workspace and handoff guide](Docs/控制台分组与接管方案.md)
|
|
18
|
-
- **Keep Agent input visibly exclusive.** While a workspace is in Agent control, the managed page rejects human page input and shows the existing task border and action cursor. Each Agent action opens a scoped dispatch window, then the page locks again. Use
|
|
19
|
-
- **Pause safely for site verification.** When a site returns a recognized security challenge, the workspace stops Agent actions and shows
|
|
20
|
-
- **See the work without another dashboard window.** Every new tab opens the local Agent console with active workspaces, agent names, current status and recent operation records. The native task bar keeps only takeover and a one-click **
|
|
18
|
+
- **Keep Agent input visibly exclusive.** While a workspace is in Agent control, the managed page rejects human page input and shows the existing task border and action cursor. Each Agent action opens a scoped dispatch window, then the page locks again. Use **Take over** to edit the page yourself and **Return to agent** to resume.
|
|
19
|
+
- **Pause safely for site verification.** When a site returns a recognized security challenge, the workspace stops Agent actions and shows **Human verification required**. Take over the visible page, complete the site's own verification, then return control and observe again. open-browser does not hide automation signals or bypass the challenge.
|
|
20
|
+
- **See the work without another dashboard window.** Every new tab opens the local Agent console with active workspaces, agent names, current status and recent operation records. The native task bar keeps only takeover and a one-click **Finish** action.
|
|
21
21
|
- **Delegate only the access a task needs.** Grant read access to an agent that checks results and control access to one that fills forms. Managed tabs have a list of permitted origins. Reading screenshots requires a separate pixel grant. [API types](Docs/open-browser-api.d.ts)
|
|
22
22
|
- **Find out what happened after a disconnect.** The local service keeps the workspace alive when the CLI exits. Look up the receipt by operation ID. If submission is uncertain, check the site's result before retrying. [Evaluation guide](Docs/open-browser任务评测指南.md)
|
|
23
23
|
- **Read delivered results in bounded chunks.** A kept download receives a local manifest and can be read through `readOutput` in 64 KiB chunks. The manifest expires after 24 hours and stays on the local machine.
|
|
24
24
|
|
|
25
25
|
## Quick start
|
|
26
26
|
|
|
27
|
+
The desktop controls, extension, CLI, Skill guide and MCP tool descriptions support English and Simplified Chinese. Choose **Language** in the new-tab Agent Console or the local web console. **Follow system** uses the system language and falls back to English. Choosing **English** or **简体中文** switches the open controls immediately and saves the choice for this profile, including future CLI and MCP sessions. Setting `OPEN_BROWSER_LOCALE=en` or `OPEN_BROWSER_LOCALE=zh-CN` at launch overrides the preference for that process. For example, run `OPEN_BROWSER_LOCALE=zh-CN node cli.mjs skill` to read the Chinese guide.
|
|
28
|
+
|
|
27
29
|
From the repository root, install the dependencies and dedicated Chromium with Node.js 22.23.5 or later. The first engine installation requires internet access.
|
|
28
30
|
|
|
29
31
|
```sh
|
|
@@ -37,13 +39,13 @@ To try the control API, run the integration test. It starts a temporary local se
|
|
|
37
39
|
node --test service.integration.test.mjs
|
|
38
40
|
```
|
|
39
41
|
|
|
40
|
-
To open the stable desktop browser, run `npm start`. Use `npm run start:dev` for an isolated development build with separate state, PID, socket, receipts and macOS app identity. The first macOS desktop build requires Xcode command line tools and a Developer ID Application certificate. If you already have a build, open `dist/open-browser.app`. For public GitHub DMG and ZIP releases, set a notarytool profile or CI credentials and run `npm run build:release-macos:arm64` or `npm run build:release-macos:x64`, then run `npm run release:verify-macos`. Windows and Linux support running from source and x64 portable builds. For a headless service, run `node service.mjs --headless`. [Platform prerequisites and packaging](Docs
|
|
42
|
+
To open the stable desktop browser, run `npm start`. Use `npm run start:dev` for an isolated development build with separate state, PID, socket, receipts and macOS app identity. The first macOS desktop build requires Xcode command line tools and a Developer ID Application certificate. If you already have a build, open `dist/open-browser.app`. For public GitHub DMG and ZIP releases, set a notarytool profile or CI credentials and run `npm run build:release-macos:arm64` or `npm run build:release-macos:x64`, then run `npm run release:verify-macos`. Windows and Linux support running from source and x64 portable builds. For a headless service, run `node service.mjs --headless`. [Platform prerequisites and packaging](Docs/desktop-packages.md)
|
|
41
43
|
|
|
42
44
|
## Try a handoff
|
|
43
45
|
|
|
44
46
|
1. Use the CLI or SDK to open a local test page that requires a credential. The task appears in the browser's native Agent group and in the new-tab console.
|
|
45
|
-
2. Select the waiting page and choose
|
|
46
|
-
3. The Agent observes the current document again and continues with the existing session. The one-click
|
|
47
|
+
2. Select the waiting page and choose **Take over** in the bottom bar or extension. Complete the form in the original tab, then choose **Return to agent**.
|
|
48
|
+
3. The Agent observes the current document again and continues with the existing session. The one-click **Finish** action closes the active task group while keeping any result tabs you selected.
|
|
47
49
|
|
|
48
50
|
## Privacy and accounts
|
|
49
51
|
|
package/README.zh-CN.md
CHANGED
|
@@ -24,6 +24,8 @@ open-browser 是一个本机运行的开源 Agent 浏览器,自带 Chromium。
|
|
|
24
24
|
|
|
25
25
|
## 快速开始
|
|
26
26
|
|
|
27
|
+
桌面控件、扩展、CLI、Skill 指南和 MCP 工具说明均支持简体中文和英文。在新标签页 Agent 控制台或本地网页控制台的「语言」中可选「跟随系统」「简体中文」或「English」。跟随系统时,其他语言回退到英文。切换后已打开的控件立即更新,选择保存在当前配置中,新启动的 CLI 和 MCP 也会读取。要为单次启动指定语言,可设置 `OPEN_BROWSER_LOCALE=zh-CN` 或 `OPEN_BROWSER_LOCALE=en`。例如,运行 `OPEN_BROWSER_LOCALE=en node cli.mjs skill` 可阅读英文指南。
|
|
28
|
+
|
|
27
29
|
在仓库根目录使用 Node.js 22.23.5 或更新版本安装依赖和项目专用的 Chromium。首次安装需要联网。
|
|
28
30
|
|
|
29
31
|
```sh
|
package/api-contract.mjs
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { t } from './i18n.mjs';
|
|
1
2
|
import { desktopCapabilities, readCapabilities } from './capability-matrix.mjs';
|
|
2
3
|
|
|
3
4
|
const id = { type: 'string', minLength: 1 };
|
|
@@ -123,7 +124,7 @@ const definitions = {
|
|
|
123
124
|
closeWorkspace: ['Close the workspace and its managed pages.', workspace],
|
|
124
125
|
};
|
|
125
126
|
export const tools = Object.freeze(Object.entries(definitions).map(([name, [description, fields, required]]) =>
|
|
126
|
-
({ name, description, inputSchema:object(fields, required) })));
|
|
127
|
+
({ name, description: t(description), inputSchema:object(fields, required) })));
|
|
127
128
|
export const agentMethods = Object.freeze(tools.map(tool => tool.name));
|
|
128
129
|
export const capabilityProfiles = Object.freeze({
|
|
129
130
|
agent: agentMethods,
|
|
@@ -0,0 +1,84 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
// Loaded as a classic script by extension pages and the MV3 worker, and as a
|
|
4
|
+
// side-effect module by the local service. It never processes external pages.
|
|
5
|
+
globalThis.openBrowserI18n = (() => {
|
|
6
|
+
const chinese = globalThis.openBrowserChinese;
|
|
7
|
+
|
|
8
|
+
function resolveLocale(...preferences) {
|
|
9
|
+
for (const preference of preferences.flat()) {
|
|
10
|
+
const language = String(preference || '').trim().toLowerCase().split(/[-_.@]/)[0];
|
|
11
|
+
if (language === 'zh') return 'zh-CN';
|
|
12
|
+
if (['en', 'c', 'posix'].includes(language)) return 'en';
|
|
13
|
+
}
|
|
14
|
+
return 'en';
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
const browserLocale = globalThis.chrome?.i18n?.getUILanguage?.();
|
|
18
|
+
const preferences = globalThis.navigator?.languages || [];
|
|
19
|
+
const systemLocale = resolveLocale(browserLocale, preferences, Intl.DateTimeFormat().resolvedOptions().locale);
|
|
20
|
+
let locale = systemLocale;
|
|
21
|
+
|
|
22
|
+
function format(message, args) {
|
|
23
|
+
return args.length ? message.replace(/\{(\d+)\}/g, (field, i) => i < args.length ? String(args[i]) : field) : message;
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
function translate(language, source, ...args) {
|
|
27
|
+
const message = language === 'zh-CN' && Object.hasOwn(chinese, source) ? chinese[source] : source;
|
|
28
|
+
return format(message, args);
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
function t(source, ...args) { return translate(locale, source, ...args); }
|
|
32
|
+
|
|
33
|
+
function messageLabels(sources, localize = t) {
|
|
34
|
+
const labels = Object.create(null);
|
|
35
|
+
for (const [key, source] of Object.entries(sources))
|
|
36
|
+
Object.defineProperty(labels, key, { enumerable: true, get: () => localize(source) });
|
|
37
|
+
return Object.freeze(labels);
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
// Bind only the template's initial nodes. Runtime content, including user
|
|
41
|
+
// data that happens to match a message, must never enter the catalogue.
|
|
42
|
+
const templates = new WeakMap();
|
|
43
|
+
function applyDocument(doc) {
|
|
44
|
+
doc.documentElement.lang = locale;
|
|
45
|
+
if (!templates.has(doc)) {
|
|
46
|
+
const bindings = [];
|
|
47
|
+
for (const element of doc.querySelectorAll('[data-i18n]')) {
|
|
48
|
+
for (const node of element.childNodes) {
|
|
49
|
+
if (node.nodeType === 3 && node.data.trim()) bindings.push({node, raw:node.data});
|
|
50
|
+
}
|
|
51
|
+
}
|
|
52
|
+
for (const node of doc.querySelectorAll('[data-i18n-attrs]')) {
|
|
53
|
+
for (const name of node.dataset.i18nAttrs.split(/\s+/)) bindings.push({node, name, raw:node.getAttribute(name)});
|
|
54
|
+
}
|
|
55
|
+
templates.set(doc, bindings);
|
|
56
|
+
}
|
|
57
|
+
for (const { node, name, raw } of templates.get(doc)) {
|
|
58
|
+
if (!node.isConnected) continue;
|
|
59
|
+
if (name) node.setAttribute(name, t(raw));
|
|
60
|
+
else node.data = raw.replace(raw.trim(), () => t(raw.trim()));
|
|
61
|
+
}
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
function bindLanguageSelect(select, save, reportError) {
|
|
65
|
+
let settings, saving = false;
|
|
66
|
+
function show(current) {
|
|
67
|
+
settings = current;
|
|
68
|
+
select.value = current?.overridden ? current.locale : current?.preference || 'system';
|
|
69
|
+
select.disabled = !current || current.overridden || saving;
|
|
70
|
+
select.title = current?.overridden ? t('Language is set by OPEN_BROWSER_LOCALE.') : '';
|
|
71
|
+
}
|
|
72
|
+
select.onchange = async () => {
|
|
73
|
+
const choice = select.value;
|
|
74
|
+
saving = select.disabled = true;
|
|
75
|
+
try { settings = await save(choice); }
|
|
76
|
+
catch { reportError(t('Could not save the language setting.')); }
|
|
77
|
+
finally { saving = false; show(settings); }
|
|
78
|
+
};
|
|
79
|
+
return show;
|
|
80
|
+
}
|
|
81
|
+
|
|
82
|
+
return { resolveLocale, format, translate, t, messageLabels, applyDocument, bindLanguageSelect, get locale() { return locale; },
|
|
83
|
+
setLocale(value) { locale = value ? resolveLocale(value) : systemLocale; } };
|
|
84
|
+
})();
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
{
|
|
2
2
|
"manifest_version": 3,
|
|
3
3
|
"name": "open-browser",
|
|
4
|
-
"version": "0.3.
|
|
5
|
-
"description": "
|
|
4
|
+
"version": "0.3.1",
|
|
5
|
+
"description": "__MSG_description__",
|
|
6
6
|
"key": "MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAhZVSXIA/vfzO0jj4ebn25I3lbL//y8FbZUeQ8Q9shwfMWTbl3bsjcHzIITSGg5+NqVTAEB1AgjFZDi/Idoj+tgsvwQxXbMBzgdZA1tQMASXcbFRdVNTxWbRBSd4JXtsFfD7H6QeBwXuIHNqUeyQYD0sYn8Ot0c4KJCzsYshYPLU56+Lzdoy+7l6ydmmw31T4tpanZHJvUgyzATOjEekFJii+9IEI/G4BUGQhKdPqR/MBYiqzxgPB5WIr3w25z6bH5KC6wnUxblLQM0RAHa4hot38NOFul5JCW6BOLHEes7Pz3DOUpWFP+DFSkY42r0dt1Kh/5CFKr6ED3agcc+tB1wIDAQAB",
|
|
7
7
|
"permissions": [
|
|
8
8
|
"debugger",
|
|
@@ -14,7 +14,7 @@
|
|
|
14
14
|
"service_worker": "worker.js"
|
|
15
15
|
},
|
|
16
16
|
"action": {
|
|
17
|
-
"default_title": "
|
|
17
|
+
"default_title": "__MSG_workspace__",
|
|
18
18
|
"default_popup": "popup.html",
|
|
19
19
|
"default_icon": {
|
|
20
20
|
"16": "icons/open-browser-16.png",
|
|
@@ -31,5 +31,6 @@
|
|
|
31
31
|
"32": "icons/open-browser-32.png",
|
|
32
32
|
"48": "icons/open-browser-48.png",
|
|
33
33
|
"128": "icons/open-browser-128.png"
|
|
34
|
-
}
|
|
34
|
+
},
|
|
35
|
+
"default_locale": "en"
|
|
35
36
|
}
|
|
@@ -0,0 +1,266 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
// English message IDs are the fallback text. Only project-owned copy is translated.
|
|
4
|
+
globalThis.openBrowserChinese = Object.freeze({
|
|
5
|
+
"Language": "语言",
|
|
6
|
+
"Follow system": "跟随系统",
|
|
7
|
+
"Language is set by OPEN_BROWSER_LOCALE.": "界面语言由 OPEN_BROWSER_LOCALE 设置。",
|
|
8
|
+
"Could not save the language setting.": "未能保存语言设置。",
|
|
9
|
+
"Open Browser received the request but the service timed out. Check the app and try again.": "open-browser 已收到请求,但服务响应超时,请检查应用后重试。",
|
|
10
|
+
"The local service is disconnected. Start Open Browser and click Refresh.": "open-browser 服务未连接,请先启动应用后点击刷新。",
|
|
11
|
+
"The extension timed out. Reload it or restart Open Browser.": "open-browser 扩展响应超时,请重新加载扩展或重启应用。",
|
|
12
|
+
"The workspace extension is offline. Restart Open Browser.": "open-browser 工作区扩展未运行,请重新启动应用。",
|
|
13
|
+
"Could not read agent status. Click Refresh to try again.": "暂时无法读取 Agent 状态,请点击刷新重试。",
|
|
14
|
+
"Human verification required": "需要人工验证",
|
|
15
|
+
"Screenshot permission required": "需要授权截图",
|
|
16
|
+
"Waiting for credentials": "等待凭据",
|
|
17
|
+
"Idle": "待命",
|
|
18
|
+
" · Steps: {0}": " · {0} 步",
|
|
19
|
+
"Event": "事件",
|
|
20
|
+
"Loading activity…": "正在读取记录…",
|
|
21
|
+
"No redacted events to show.": "暂无可显示的脱敏事件。",
|
|
22
|
+
"View activity": "查看记录",
|
|
23
|
+
"{0} · Steps: {1}/{2}": "{0} · {1}/{2} 步",
|
|
24
|
+
"Action": "操作",
|
|
25
|
+
"Pages: {0} · No action in progress": "{0} 个页面 · 暂无正在执行的操作",
|
|
26
|
+
"Name this task": "请为此任务命名",
|
|
27
|
+
"No actions recorded": "暂无操作记录",
|
|
28
|
+
"Steps: {0}/{1}": "{0}/{1} 步",
|
|
29
|
+
"Steps: {0}": "{0} 步",
|
|
30
|
+
"Records: {0}": "{0} 条",
|
|
31
|
+
"Completed": "已完成",
|
|
32
|
+
"Local service connected": "本机服务已连接",
|
|
33
|
+
"Service disconnected": "服务未连接",
|
|
34
|
+
"Copied": "已复制",
|
|
35
|
+
"Waiting for instructions": "等待指令",
|
|
36
|
+
"Queued": "已排队",
|
|
37
|
+
"Running": "执行中",
|
|
38
|
+
"Checking target": "检查目标",
|
|
39
|
+
"Dispatching": "正在派发",
|
|
40
|
+
"Waiting for page": "等待页面",
|
|
41
|
+
"Checking result": "核对结果",
|
|
42
|
+
"Failed": "失败",
|
|
43
|
+
"Cancelled": "已取消",
|
|
44
|
+
"Outcome unknown": "结果待核实",
|
|
45
|
+
"Agent in control": "Agent 控制",
|
|
46
|
+
"Take over": "人工接管",
|
|
47
|
+
"Transferring": "交接中",
|
|
48
|
+
"Dispatched": "已派发",
|
|
49
|
+
"Bind credential": "绑定凭据",
|
|
50
|
+
"This tab is now assigned to the selected task.": "已将此页交给所选任务",
|
|
51
|
+
"Load static resources": "加载静态资源",
|
|
52
|
+
"Allow navigation and page actions": "允许导航与页面操作",
|
|
53
|
+
"Page": "页面",
|
|
54
|
+
"Download error log": "下载错误日志",
|
|
55
|
+
"No workspaces": "暂无工作区",
|
|
56
|
+
"The original tab was closed or detached.": "原标签页已关闭或解绑",
|
|
57
|
+
"Syncing": "同步中",
|
|
58
|
+
"Retry takeover": "重试人工接管",
|
|
59
|
+
"Return to agent": "交回 Agent",
|
|
60
|
+
"Take over this tab": "接管此页",
|
|
61
|
+
"Take over workspace": "接管工作区",
|
|
62
|
+
"Ordinary tab": "普通标签页",
|
|
63
|
+
" · Ask the agent to create a named workspace first": " · 请让 Agent 先创建一个命名工作区",
|
|
64
|
+
"The task ended or the service restarted.": "原任务已结束或服务已重启",
|
|
65
|
+
"Reopen the extension on the tab you want to authorize.": "请在需要授权的标签页重新打开扩展。",
|
|
66
|
+
"Connection failed": "连接失败",
|
|
67
|
+
"Take over to respond": "接管并处理",
|
|
68
|
+
"Reply": "回复",
|
|
69
|
+
"OK": "确定",
|
|
70
|
+
"Cancel": "取消",
|
|
71
|
+
"Downloading": "下载中",
|
|
72
|
+
"Ready to keep": "待保留",
|
|
73
|
+
"Kept": "已保留",
|
|
74
|
+
"Show saved location": "查看保存位置",
|
|
75
|
+
"Keep file": "保留文件",
|
|
76
|
+
"The page or control changed. Select the file again.": "页面或控制权已变更,请重新选择文件。",
|
|
77
|
+
"Each file must be 8 MiB or smaller.": "单文件上限 8 MiB",
|
|
78
|
+
"Could not read the file.": "文件读取失败",
|
|
79
|
+
"The credential request has changed.": "凭据请求已变化",
|
|
80
|
+
"Credential bound. The agent can retry.": "已绑定凭据,调用方可以重试。",
|
|
81
|
+
"In queue": "排队中",
|
|
82
|
+
"Action failed": "执行失败",
|
|
83
|
+
"H": "人",
|
|
84
|
+
"Human in control": "人工控制",
|
|
85
|
+
"Open Browser Workspace": "open-browser 工作区",
|
|
86
|
+
"Click": "点击",
|
|
87
|
+
"Fill": "填写",
|
|
88
|
+
"Fill credential": "填写凭据",
|
|
89
|
+
"Click to return control to the agent": "点击交回 Agent",
|
|
90
|
+
"Click to open the workspace panel": "点击打开工作区面板",
|
|
91
|
+
"Click to take over": "点击接管",
|
|
92
|
+
"Workspace panel": "工作区面板",
|
|
93
|
+
"Take": "接管",
|
|
94
|
+
"The extension received the request but the local service timed out. Check the service and try again.": "open-browser 扩展已收到请求,但本机服务未在时限内返回。请检查服务状态后重试。",
|
|
95
|
+
"The extension is disconnected from the local service. Start Open Browser and try again.": "open-browser 扩展未连接到本机服务,请先启动应用后重试。",
|
|
96
|
+
"Untitled task": "未命名任务",
|
|
97
|
+
"Input": "输入",
|
|
98
|
+
"Double-click": "双击",
|
|
99
|
+
"Hover": "悬停",
|
|
100
|
+
"Press key": "按键",
|
|
101
|
+
"Scroll": "滚动",
|
|
102
|
+
"Drag": "拖拽",
|
|
103
|
+
"Select": "选择",
|
|
104
|
+
"Upload": "上传",
|
|
105
|
+
"Toggle": "切换",
|
|
106
|
+
"My account": "我的账号",
|
|
107
|
+
"Sign out": "退出登录",
|
|
108
|
+
"Username": "账号",
|
|
109
|
+
"Password": "密码",
|
|
110
|
+
"Sign in": "登录",
|
|
111
|
+
"Incorrect username or password": "账号或密码不正确",
|
|
112
|
+
"Automatic sign-in": "自动登录",
|
|
113
|
+
"Supply a missing credential": "凭据补充",
|
|
114
|
+
"Sign-in assistant": "登录助手",
|
|
115
|
+
"User in control": "用户控制",
|
|
116
|
+
"Needs attention": "待处理",
|
|
117
|
+
"Agent running": "Agent 运行",
|
|
118
|
+
"Result needs verification": "结果待核对",
|
|
119
|
+
"Open page": "打开页面",
|
|
120
|
+
"Observe page": "观察页面",
|
|
121
|
+
"Page action": "页面操作",
|
|
122
|
+
"Supply the missing credential.": "请补充缺少的凭据",
|
|
123
|
+
"The site rejected the username or password. Update it and try again.": "站点拒绝了账号或密码,请更新后再试。",
|
|
124
|
+
"This entry link has been used. Reopen the console from Open Browser.": "管理入口已使用,请从 open-browser 重新打开控制台。",
|
|
125
|
+
"This entry link has expired. Reopen the console.": "管理入口已失效,请重新打开控制台。",
|
|
126
|
+
"The new page is outside this workspace's allowed sites. Create another workspace.": "新页面超出了当前工作区授权站点,请另建工作区。",
|
|
127
|
+
"The sign-in form changed. Read the page and try again.": "登录表单已变化,请读取页面后再试。",
|
|
128
|
+
"The user controls this workspace. Return control to the agent first.": "当前为用户控制,请先交回 Agent。",
|
|
129
|
+
"No observation yet": "暂无观察结果",
|
|
130
|
+
"Show password": "显示密码",
|
|
131
|
+
"Missing credential": "缺少凭据",
|
|
132
|
+
"Workspace": "工作区",
|
|
133
|
+
"Password needed": "需要补充密码",
|
|
134
|
+
"Credential needed": "需要补充凭据",
|
|
135
|
+
"Credential value": "凭据值",
|
|
136
|
+
"Supply and continue": "补充并继续",
|
|
137
|
+
"Automation paused": "自动化已暂停",
|
|
138
|
+
"Transferring control…": "正在交接",
|
|
139
|
+
"Waiting for a credential": "等待补充凭据",
|
|
140
|
+
"No completed actions": "暂无已结束操作",
|
|
141
|
+
"No visible text on this page": "当前页无可见文本",
|
|
142
|
+
"Read the signed-in account page": "已读取受保护的账号页面",
|
|
143
|
+
"Task is waiting for a password": "任务等待补充密码",
|
|
144
|
+
"Signed in and read the account page": "登录成功,已读取受保护的账号页面",
|
|
145
|
+
"My workspace": "我的工作区",
|
|
146
|
+
"Read the current page": "已读取当前页面",
|
|
147
|
+
"Credential bound. The agent can observe again and submit the remaining actions.": "已绑定缺少的凭据;调用方可重新观察并提交剩余操作",
|
|
148
|
+
"Credential bound to the site in this workspace": "已为当前工作区绑定站点凭据",
|
|
149
|
+
"You now control this workspace": "已由用户控制当前工作区",
|
|
150
|
+
"Control returned to the agent. Observe the page again.": "已交回 Agent,页面需要重新观察",
|
|
151
|
+
"Displayed the controlled page": "已显示接管页面",
|
|
152
|
+
"Workspace closed": "工作区已关闭",
|
|
153
|
+
"Opened a new page": "已打开新页面",
|
|
154
|
+
"Hide password": "隐藏密码",
|
|
155
|
+
"Disconnected": "未连接",
|
|
156
|
+
"Could not connect to the local console. Restart Open Browser.": "无法连接本机控制台,请重新启动 open-browser。",
|
|
157
|
+
"Open Browser Console": "open-browser 控制台",
|
|
158
|
+
"Connecting…": "正在连接…",
|
|
159
|
+
"Agent Console": "Agent 控制台",
|
|
160
|
+
"View current tasks and agent activity.": "查看 Agent 当前任务和运行记录。",
|
|
161
|
+
"Refresh": "刷新",
|
|
162
|
+
"Using an agent": "Agent 如何使用",
|
|
163
|
+
"Copy prompt": "复制提示词",
|
|
164
|
+
"Give this prompt to your agent to start working with Open Browser.": "把下面的提示词交给 Agent,它会按 open-browser 的安全流程操作浏览器。",
|
|
165
|
+
"Use the open-browser skill to control the browser. Call listWorkspaces first to resume an existing workspace. For a new task, provide a clear task name in name and an agent name in agentName. Use open for a specific URL, then observe, act, getOperation and observe to check the result. Call finishWorkspace when finished. After a handoff, stale_ref, outcome_unknown or host_unavailable, follow nextAction and check the result before submitting again.": "请使用 open-browser Skill 控制浏览器。先调用 listWorkspaces,继续已有工作区。创建新任务时必须填写清晰的 name 任务名称和 agentName Agent 名称,再用 open 打开明确网址,按 observe → act → getOperation → observe 核对结果,完成后调用 finishWorkspace。遇到接管、stale_ref、outcome_unknown 或 host_unavailable 时,按返回的 nextAction 处理,不要重复提交。",
|
|
166
|
+
"Active agents": "正在运行的 Agent",
|
|
167
|
+
"No agents are running.": "当前没有正在运行的 Agent。",
|
|
168
|
+
"Run history": "运行历史",
|
|
169
|
+
"No runs yet.": "暂无运行历史。",
|
|
170
|
+
"No active tasks. Open a new tab to see the Agent Console.": "当前没有活动任务。新标签页会显示 Agent 控制台。",
|
|
171
|
+
"Agent task to authorize": "授权给哪个 Agent 任务",
|
|
172
|
+
"Account alias (optional)": "账号别名(选填)",
|
|
173
|
+
"Restore the last browser session on restart and resume this task": "重启时恢复上次浏览会话,并继续此页任务",
|
|
174
|
+
"Give this tab to the agent": "让 Agent 操作此页",
|
|
175
|
+
"Generate backup authorization code": "生成备用授权码",
|
|
176
|
+
"Send this authorization to the selected agent within two minutes": "将以下授权交给所选 Agent,两分钟内有效",
|
|
177
|
+
"Tabs": "标签页",
|
|
178
|
+
"Allow file uploads": "授权上传文件",
|
|
179
|
+
"Task downloads": "任务下载",
|
|
180
|
+
"Export error log": "导出错误日志",
|
|
181
|
+
"Export redacted failures for this task to help diagnose problems.": "导出当前任务的脱敏失败记录,便于排查问题。",
|
|
182
|
+
"Finish task": "结束任务",
|
|
183
|
+
"Select the tabs to keep. The other task tabs will close.": "勾选要留给自己的标签,其余任务标签将关闭。",
|
|
184
|
+
"Finish": "结束",
|
|
185
|
+
"Supply credentials": "补充凭据",
|
|
186
|
+
"For example, Work account": "例如:工作账号",
|
|
187
|
+
"Open Browser · Workspaces": "open-browser · 工作区",
|
|
188
|
+
"New workspace": "新建工作区",
|
|
189
|
+
"Connecting": "正在连接",
|
|
190
|
+
"Open a separate browser page for a task.": "为任务打开独立的浏览器页面。",
|
|
191
|
+
"Workspace name": "工作区名称",
|
|
192
|
+
"URL to open": "打开网址",
|
|
193
|
+
"Create and open": "创建并打开",
|
|
194
|
+
"Sign-in demo": "账号登录演示",
|
|
195
|
+
"Try automatic sign-in or supply a missing password on the local demo site.": "在本机验证站试用自动登录或补充密码。",
|
|
196
|
+
"Test missing password": "测试缺少密码",
|
|
197
|
+
"Take over page": "接管页面",
|
|
198
|
+
"View controlled page": "查看接管页",
|
|
199
|
+
"Control": "控制权",
|
|
200
|
+
"Current activity": "当前活动",
|
|
201
|
+
"Latest result": "最近结果",
|
|
202
|
+
"Site": "站点",
|
|
203
|
+
"Credential reference": "凭据引用",
|
|
204
|
+
"Fill demo password": "填入演示密码",
|
|
205
|
+
"Workspace pages": "工作区页面",
|
|
206
|
+
"Open a new page": "打开新页面",
|
|
207
|
+
"Open ↗": "打开 ↗",
|
|
208
|
+
"Page observation": "页面观察",
|
|
209
|
+
"Read page": "读取页面",
|
|
210
|
+
"Run sign-in task": "运行登录任务",
|
|
211
|
+
"Bind site credentials": "绑定站点凭据",
|
|
212
|
+
"Value": "值",
|
|
213
|
+
"Bind to this page's origin": "绑定到当前页面来源",
|
|
214
|
+
"Demo account": "演示账号",
|
|
215
|
+
"Close workspace": "关闭工作区",
|
|
216
|
+
"Console activity": "控制台操作记录",
|
|
217
|
+
"No activity since the console opened": "本次打开控制台后暂无操作",
|
|
218
|
+
"Workspace list": "工作区列表",
|
|
219
|
+
"Current page": "当前页面",
|
|
220
|
+
"Local test site": "本机验证站",
|
|
221
|
+
"Sign in to your account": "登录账号",
|
|
222
|
+
"Signed in as": "当前账号",
|
|
223
|
+
"For this task: {0} · {1}": "本次{0} · {1}",
|
|
224
|
+
"Delivery needs verification · {0}": "交付待核实 · {0}",
|
|
225
|
+
"Pages kept: {0} · Pages closed: {1}": "已保留 {0} 页,已关闭 {1} 页。",
|
|
226
|
+
"{0} · Profile {1}": "{0} · 资料 {1}",
|
|
227
|
+
"Last synced {0}": "上次同步 {0}",
|
|
228
|
+
"Revoke {0} · {1}": "撤销 {0} · {1}",
|
|
229
|
+
"Revoke screenshot permission for this task · {0}": "撤销本任务截图授权 · {0}",
|
|
230
|
+
"Allow screenshots for this task · {0}": "允许本任务截图 · {0}",
|
|
231
|
+
"Last capture · {0} · {1} · {2}": "最近画面采集 · {0} · {1} · {2}",
|
|
232
|
+
"Granted {0} access to {1} for five minutes.": "已向 {0} 授权 {1},有效期五分钟。",
|
|
233
|
+
"Human · {0}": "人工 · {0}",
|
|
234
|
+
"Workspaces: {0}": "{0} 个",
|
|
235
|
+
"Pages: {0}": "{0} 页",
|
|
236
|
+
"Pages in workspace: {0}": "{0} 个页面",
|
|
237
|
+
"{0} · Queued: {1}": "{0} · 排队 {1}",
|
|
238
|
+
"Action did not complete ({0})": "操作未完成({0})",
|
|
239
|
+
"Opened “{0}”": "已打开「{0}」",
|
|
240
|
+
"Unknown": "未知",
|
|
241
|
+
"Alert": "提示",
|
|
242
|
+
"Confirmation": "确认",
|
|
243
|
+
"Prompt": "输入提示",
|
|
244
|
+
"The service is busy. Try again shortly.": "本机服务繁忙,请稍后重试。",
|
|
245
|
+
"The page binding has changed. Reopen the extension on the target tab.": "页面绑定已变更,请在目标标签页重新打开扩展。",
|
|
246
|
+
"The site is outside this task’s allowed origins.": "此站点不在当前任务的授权范围内。",
|
|
247
|
+
"Control has changed. Refresh the workspace and try again.": "控制权已变更,请刷新工作区后再试。",
|
|
248
|
+
"The current tab cannot be assigned to this workspace.": "当前标签页无法交给此工作区。",
|
|
249
|
+
"This page has closed. Select the original tab again.": "页面已关闭,请重新选择原标签页。",
|
|
250
|
+
"Closed": "已关闭",
|
|
251
|
+
"Opened": "已打开",
|
|
252
|
+
"Managed": "已纳入任务",
|
|
253
|
+
"Expired": "已过期",
|
|
254
|
+
"Service stopped": "服务已退出",
|
|
255
|
+
"Canvas snapshot": "画布快照",
|
|
256
|
+
"Screenshot": "截图",
|
|
257
|
+
"Run workflow": "运行工作流",
|
|
258
|
+
"Tab assigned": "已绑定标签页",
|
|
259
|
+
"Dispatch": "派发",
|
|
260
|
+
"Operation": "操作",
|
|
261
|
+
"Dialog": "对话框",
|
|
262
|
+
"Site verification": "站点验证",
|
|
263
|
+
"Download": "下载",
|
|
264
|
+
"Popup": "弹窗",
|
|
265
|
+
"Workspace ended": "工作区已结束"
|
|
266
|
+
});
|
|
@@ -24,3 +24,7 @@ section { margin-top: 34px; } .section-title { margin-bottom: 12px; }
|
|
|
24
24
|
.history-row .timeline { flex-basis: 100%; }
|
|
25
25
|
.empty { padding: 22px 0; } .quiet { cursor: pointer; color: color-mix(in srgb, CanvasText 68%, Canvas); background: none; border: 0; text-decoration: none; padding: 4px 0; font: inherit; } #notice.error { color: #a44b2b; } [hidden] { display: none !important; }
|
|
26
26
|
@media (max-width: 700px) { body { min-width: 0; } header { padding: 0 20px; } main { width: calc(100% - 40px); margin-top: 28px; } }
|
|
27
|
+
.console-settings { display: flex; flex-wrap: wrap; align-items: center; justify-content: flex-end; gap: 8px; }
|
|
28
|
+
.console-settings label { font-size: 13px; }
|
|
29
|
+
.console-settings select { font: inherit; color: CanvasText; background: Canvas; border: 1px solid color-mix(in srgb, CanvasText 30%, transparent); border-radius: 5px; padding: 3px 5px; }
|
|
30
|
+
@media (max-width: 520px) { header { height: auto; min-height: 58px; gap: 10px; flex-wrap: wrap; padding-block: 8px; } }
|
|
@@ -1,19 +1,19 @@
|
|
|
1
1
|
<!doctype html>
|
|
2
2
|
<meta charset="utf-8">
|
|
3
3
|
<meta name="viewport" content="width=device-width, initial-scale=1">
|
|
4
|
-
<title>
|
|
4
|
+
<title data-i18n>Open Browser Console</title>
|
|
5
5
|
<link rel="icon" type="image/png" href="icons/open-browser-32.png">
|
|
6
6
|
<link rel="stylesheet" href="newtab.css">
|
|
7
|
-
<script
|
|
8
|
-
<script defer src="workspace-title.js"></script>
|
|
9
|
-
<script defer src="newtab.js"></script>
|
|
7
|
+
<script type="module" src="page-locale.js"></script>
|
|
10
8
|
<body>
|
|
11
|
-
<header><div class="brand"><img src="icons/open-browser-48.png" width="28" height="28" alt=""><strong>open-browser</strong></div><span id="status"
|
|
9
|
+
<header><div class="brand"><img src="icons/open-browser-48.png" width="28" height="28" alt=""><strong>open-browser</strong></div><div class="console-settings"><span data-i18n id="status">Connecting…</span>
|
|
10
|
+
<label for="interface-language" data-i18n>Language</label>
|
|
11
|
+
<select id="interface-language" disabled><option value="system" data-i18n>Follow system</option><option value="zh-CN" lang="zh-CN">简体中文</option><option value="en" lang="en">English</option></select></div></header>
|
|
12
12
|
<main>
|
|
13
|
-
<section class="hero"><div><h1>Agent
|
|
14
|
-
<section class="how-to"><div class="section-title"><h2>
|
|
15
|
-
<section><div class="section-title"><h2
|
|
16
|
-
<section><div class="section-title"><h2
|
|
13
|
+
<section class="hero"><div><h1 data-i18n>Agent Console</h1><p data-i18n>View current tasks and agent activity.</p></div><button data-i18n id="refresh" class="quiet" type="button">Refresh</button></section>
|
|
14
|
+
<section class="how-to"><div class="section-title"><h2 data-i18n>Using an agent</h2><button data-i18n id="copy-prompt" class="quiet" type="button">Copy prompt</button></div><p data-i18n>Give this prompt to your agent to start working with Open Browser.</p><textarea data-i18n id="agent-prompt" readonly spellcheck="false">Use the open-browser skill to control the browser. Call listWorkspaces first to resume an existing workspace. For a new task, provide a clear task name in name and an agent name in agentName. Use open for a specific URL, then observe, act, getOperation and observe to check the result. Call finishWorkspace when finished. After a handoff, stale_ref, outcome_unknown or host_unavailable, follow nextAction and check the result before submitting again.</textarea></section>
|
|
15
|
+
<section><div class="section-title"><h2 data-i18n>Active agents</h2><span id="workspace-count"></span></div><div id="workspaces" class="workspace-grid"></div><p data-i18n id="empty" class="empty">No agents are running.</p></section>
|
|
16
|
+
<section><div class="section-title"><h2 data-i18n>Run history</h2><span id="history-count"></span></div><div id="history" class="history-list"></div><p data-i18n id="history-empty" class="empty">No runs yet.</p></section>
|
|
17
17
|
<p id="notice" role="status" hidden></p>
|
|
18
18
|
</main>
|
|
19
19
|
</body>
|