mirror of
https://github.com/getpaseo/paseo.git
synced 2026-10-29 04:32:57 +00:00
* 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.
2.6 KiB
2.6 KiB
title, description, nav
| title | description | nav |
|---|---|---|
| SDK 快速开始 | 连接 Paseo daemon,运行一个编程 Agent,并读取它的回复。 | 快速开始 |
SDK 快速开始
npm install @getpaseo/client
需要 Node.js 22 或更高版本。
连接
import { createPaseoClient } from "@getpaseo/client";
const client = createPaseoClient({ url: "ws://127.0.0.1:6767/ws" });
await client.connect();
daemon 表明身份后,connect() 就会 resolve。如果 daemon 设置了密码,请传入密码:
const client = createPaseoClient({
url: "wss://devbox.example.com/ws",
password: "my-secret",
});
创建 Agent
const agent = await client.agents.create({
config: { provider: "codex/gpt-5.5" },
cwd: "/Users/me/dev/storefront",
prompt: "Review the current diff and name the riskiest change.",
});
config.provider 的格式始终是 provider/model。Provider 列出了 daemon 可用的 Provider,以及如何在运行时发现它们。
cwd 是 Agent 工作的目录。Paseo 会在它背后创建工作区。如何复用已有工作区,见工作区。
会话一建立,create() 就会 resolve,此时提示词仍在运行。
等待回复
const result = await agent.waitForFinish();
if (result.status === "idle") {
console.log(result.lastMessage);
}
waitForFinish() 默认最多等待 10 分钟;传入毫秒数可以修改。它返回以下四种状态之一:
| 状态 | 含义 |
|---|---|
idle |
本轮已结束,Agent 可以接收下一条提示词。 |
permission |
Agent 需要有人在 Paseo 中回应权限请求。 |
error |
Provider 以错误结束了本轮。 |
timeout |
已超过截止时间。Agent 仍在运行。 |
断开连接
await client.close();
Agent 会继续在 daemon 上运行,并在 Paseo 中保持可见。之后的程序可以通过 ID 再次访问它:
const agent = client.agents.ref("agent_01H8X...");
await agent.refresh();
await agent.run("Now write the fix.");
接下来
- Agent:后续提示词、查找已有 Agent、归档。
- Provider:从 daemon 发现模型和模式。
- Provider 选项:沙箱和 Provider 原生设置。
- 工作区:复用工作区或创建 worktree。
- 事件:以流式方式接收更新,而不是等待。