Files
paseo/public-docs/browser.zh-CN.md
T
Mohamed Boudra bd15e40e94 Serve paseo.sh in Simplified Chinese (#7373)
* feat(website): serve paseo.sh in Simplified Chinese

Every page of the website now has a Simplified Chinese version under
/zh-CN: the interface, docs, blog posts, comparison pages, legal pages,
all changelog releases and the homepage mockup. English URLs are unchanged.

The URL alone decides the language. There is no browser-language redirect
and no stored preference, because either would have to redirect the
unprefixed English URLs that people share and search engines index.
Internal links carry the page's language instead, and hreflang alternates
point Chinese search results at /zh-CN.

Translated headings pin the English anchor with {#id}, so section links
work in both languages. content-translations.test.ts fails when a page
has no translation or a translation's headings drift from the English.
Changelog releases and plugin listings without a translation render
whole in English under a notice, so a release never waits on one.

Plugin manifests and the registry gain optional translations and
OVERVIEW.zh-CN.md fields; older clients and registries ignore them.

* feat(website): replace the native language select with an EN/ZH menu

The header showed an OS-native select whose popup did not match the site.
The trigger now shows the language abbreviated (EN, ZH) and opens a menu in
the app's dropdown style that names each language in itself, with its name
in the page language underneath. Rows are real links to the same page in
that language; arrows, Escape, outside presses and taps behave as a menu
button, and the menu keeps itself on screen when a narrow header pushes the
trigger toward an edge.

Also drops the stray space after the full-width comma in the Chinese
homepage subtitle.

* docs(website): translate main's new docs and 0.12.0 release notes

Main added Keep run workspaces to the schedules docs, rewrote plugin icons
around inline SVG, and promoted 0.12.0 with new entries. Bring the Chinese
pages and changelog in line so no section falls back to English.

* fix(server): leave plugin listing translations to the registry

The daemon rejected manifests whose translations the registry would refuse,
so a plugin main installs could fail to load here. Paseo never reads
translations; the registry validates them at publish. Docs now say which
checks are automated at publish and which are human review.

* docs(plugins): describe the registry's final overview translation discovery

* style(server): format manifest test

* test(app): measure sidebar rows one at a time

After a reload the developer error toast appears while expectVerticalOrder
measures every row at once. Each concurrent boundingBox runs the toast
locator handler, and only one of them resumes, so the poll timed out on
every attempt since #7424. Measuring sequentially keeps one action in flight.

* test(app): return sidebar row measuring to main

#7480 hides the developer toast instead of running a locator handler, so
measuring the rows concurrently no longer races it. Reverts 41ac23016.

* test(app): wait for the compact shell before opening compact Changes

The shell survives the breakpoint, so right after the resize the wide
Explorer could still be visible: the test skipped the Explorer toggle and
the tab then disappeared, or toggled at the wrong time. Wait for the
compact-shell marker, as the composer helpers do since #7424.

* docs(website): translate main's plugin file panel docs

* test(app): edit the code font size after the font family remount

A committed appearance change remounts the settings screen through
AppearanceStyleBoundary, and the new form starts from the stored size.
Filling the size before that remount lost the edit in CI.

* docs(website): translate main's client/ui import docs

Follows #7474: one /client/ui entry, StreamedText instead of useRevealedText,
SettingsGroup dropped from the settings table, and the new
'UI imports in v0.13' migration section.

* test(app): wait for the previous layout's file panel picker to leave

After a resize the old layout's picker animates out while the new one is
already mounted, so the Use button matched two elements and the strict
locator failed. Wait for the shell's layout and a single picker first.
2026-10-21 13:13:03 +07:00

4.2 KiB
Raw Blame History

title, description, nav
title description nav
浏览器自动化 在 Paseo 中给 Agent 一个真实的浏览器,用来打开页面、点击、输入并验证它们的工作。 概览

浏览器自动化

Paseo 中的 Agent 可以操作真实的浏览器标签页,也就是你在 Paseo 桌面应用中看到的那些标签页。Agent 可以打开你的开发服务器、读取页面、点击走完一个流程、填写表单并截图,全程不离开你的机器。

这让前端工作形成了闭环:Agent 不再告诉你“这个改动应该能用”,而是打开页面亲自检查。

典型用途:

  • 验证自己的改动。 修改组件后,Agent 打开开发服务器,对页面做快照,确认新的文字或布局确实出现了。
  • 复现和诊断 bug。 按 bug 报告中的确切步骤点击,然后读取控制台和网络日志。
  • 完整走查流程。 表单、多步向导、悬停菜单、拖放、文件上传。
  • 在已登录的会话中工作。 标签页会保留会话状态。你自己登录一次,Agent 就可以在登录后的页面中工作。

因为你和 Agent 共享浏览器,你可以看着它工作,并随时介入。

启用

浏览器工具默认关闭。按主机开启:

  • 在应用中:打开 设置 → 你的主机 → Agents,开启 Browser tools。
  • 在 config.json 中(~/.paseo/config.json):
{
  "daemon": {
    "browserTools": {
      "enabled": true
    }
  }
}

这些工具属于 Paseo MCP 工具集,因此同一页面上的 启用 Paseo tools 也必须开启,Agent 才能获得它们。已有的 Agent 可能需要重新加载才能获得新工具。

浏览器工具允许 Agent 访问和控制 Paseo 浏览器标签页,包括已登录的浏览器状态。只为你信任的 Agent 启用。

目前仅限桌面端

浏览器标签页由 Paseo 桌面应用承载。daemon 本身不运行浏览器:它把工具调用路由到已连接的桌面应用,没有已连接的桌面应用时返回错误。通信协议与宿主无关,因此以后其他宿主也可以承载同样的工具。

Agent 如何看到页面

主要工具是 browser_snapshot,它以无障碍树的形式返回页面(标题、文本、表单状态和层级结构),而不是原始 HTML:

- document "Settings"
  - heading "Workspace" [level=1]
  - text: "Connected as Maya"
  - textbox "Display name" [ref=@e2]
  - button "Save changes" [ref=@e3]

可交互元素带有类似 @e3 的引用。Agent 把引用传给 browser_click、browser_fill 和其他操作工具。引用来自该标签页的最新快照,页面变化后会失效;使用过期的引用会返回错误,而不是作用到错误的元素上。

对于无障碍树无法捕获的内容,Agent 会退回到 browser_screenshot,browser_logs 则提供控制台消息和网络耗时。

架构

agent ──MCP──▶ daemon (broker) ──▶ browser host (desktop app) ──▶ webview
  • 按工作区隔离的标签页。 Agent 只能看到和控制自己工作区中的标签页。新标签页在后台打开,不会抢走你的焦点。
  • 标签页到宿主的路由。 daemon 记住每个标签页属于哪个宿主,并把标签页命令路由过去。browser_list_tabs 汇总所有已连接的宿主。
  • 可信输入。 点击、按键、悬停和拖动都以真实的浏览器输入事件派发:CSS :hover 会触发,页面无法区分 Agent 的点击和用户的点击。每个操作都会先等待目标可见、可用且稳定。
  • 对话框永不阻塞。 alert 会被接受;confirm、prompt 和 beforeunload 会被取消。每个被处理的对话框都会在工具结果中报告,让 Agent 知道页面流程发生了变化。

安全

  • 导航仅限 http(s) URL。
  • 文件上传只能引用 Agent 工作区内的文件。
  • 标签页共享你在 Paseo 中使用的浏览器配置,包括 cookie 和登录状态。这正是登录后测试能够工作的原因,也是该功能需要按主机手动开启的原因。

完整的工具列表见工具参考。