Files
paseo/public-docs/hub/github.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

3.2 KiB

title, description, nav
title description nav
GitHub 访问 为 workflow 中的某个 step 授予限定范围的 GitHub token 和 git 设置。 GitHub 访问

GitHub 访问

触发器不授予任何 GitHub 凭据。请在需要仓库权限的 step 上添加 github 块:

name: implement-request
on: github.issue_comment
max_runtime: 2h
filters:
  repo: example/project
  contains: "@paseo"
  from_users: [maintainer]
steps:
  - id: implement
    environment: development
    max_runtime: 90m
    idle_timeout: 10m
    agent: codex
    github:
      connection: example-github
      repositories: [example/project]
      permissions:
        contents: write
        pull_requests: write
    prompt:
      - text: |
          Implement the request, push a branch, and open a pull request with gh.
          Call hub.finish_execution when done.
          ${{ paseo.prompt }}

Agent 可以在声明的仓库和权限范围内使用 git 和 gh。当请求延续某个 Agent 时 token 的生命周期,见 Agent 延续。

字段

字段 说明
connection 项目的 GitHub 连接 slug。
repositories token 可以访问的仓库。在由 GitHub 触发的运行中,默认是触发它的仓库。其他 Provider 必须填写。
permissions 安装 token 的权限,例如 contents、pull_requests 和 issues。默认为 contents: read。
duration token 的有效期,为正数,最长 1h。默认为 1h,即 GitHub 允许的最大值。

请求的权限不能超过 GitHub App 安装所具有的权限。如果无法解析连接、仓库或权限,激活和派发会明确失败。

Agent 环境

Hub 通过环境变量提供 GH_TOKEN 以及进程级的 git 配置:

  • 提交使用 App 机器人的登录名作为 user.name,使用 <app-id>+<bot-login>@users.noreply.github.com 作为 user.email。
  • git@github.com: 和 ssh://git@github.com/ 远程地址会被改写为 HTTPS。
  • gh auth git-credential 负责处理该 step 的 GitHub 凭据。
  • 用户全局和系统级的 git 配置会被忽略,终端凭据提示会被禁用。
  • 不会读取或修改 daemon 主机的 git 身份和凭据。

当 step 带有 github 块时,GH_TOKEN 和 Hub 的 git 配置变量是保留的;workflow 的 env 不能替换它们。

把权限留给执行者

分类器可以在没有 GitHub 权限的情况下读取不受信任的请求文本。只在之后真正做出改动的分支上添加 github 块。Workflow 路由展示了按顺序排列的分类器/执行者结构。

其他集成的连接值仍然是显式的 step 环境变量值:

env:
  SOME_TOKEN: "${{ paseo.connections.some-connection.token }}"

Hub 在准备 Agent 的环境时解析这个值。Provider 和主机的边界见 Hub 安全。