Compare commits

..
Author SHA1 Message Date
Mohamed Boudra 70300fcda0 chore(release): cut 0.17.0 2026-11-21 11:48:43 +01:00
Mohamed Boudra c89a4f18c1 docs(changelog): prepare 0.17.0 stable 2026-11-21 11:40:24 +01:00
Mohamed Boudra 1fe7bf1ccc feat(hub): let Hub sessions list daemon projects (#10392)
Allow trigger editors to discover working directories on the connected daemon through the existing project list RPC.
2026-11-21 16:41:17 +07:00
Mohamed Boudra b3ea018d77 fix(app): show the quota forecast as a plain datapoint on the usage line (#10385)
The forecast sat right-aligned and tone-coloured beside the reset line, so it
read as a second kind of information. It is now one more ' · '-separated
datapoint after the reset countdown and exact time; the meter keeps the tone.
2026-11-21 16:17:21 +07:00
Mohamed Boudra daa6b5cc24 Preserve agent recovery when stopping Paseo from a terminal (#10381)
* fix(server): preserve agent recovery on foreground shutdown

A terminal interrupt could reach provider runtimes before Paseo captured running agents. The development watcher also sent the interrupt down the daemon tree, including detached children. Keep provider shutdown under the supervisor's IPC lifecycle.

* fix(dev): keep protocol and client watchers running

Pass the watch flag through the final npm workspace command. Verify both watchers start before testing the dev runner shutdown.

* test(ci): exercise foreground shutdown with dependency watchers
2026-11-21 16:05:48 +07:00
paseo-ai[bot] 2bc10ff540 fix: update lockfile signatures and Nix hash [skip ci] 2026-11-21 09:01:59 +00:00
Mohamed Boudra 24a30b183a Polish Antigravity tool calls in the timeline (#10379)
* fix(providers): render Antigravity tools with timeline details

* fix(providers): preserve search queries and ambiguous MCP names

* fix(app): bound tool call diff previews
2026-11-21 15:54:07 +07:00
47 changed files with 1098 additions and 612 deletions
+5
View File
@@ -579,6 +579,11 @@ jobs:
if: ${{ env.PASEO_CLI_TEST_SHARD == '3' }}
run: npm run test:unit --workspace=@getpaseo/cli
# The dependency watchers write build outputs, so run them after the parallel CLI tests.
- name: Run dev watch shutdown regression
if: ${{ env.PASEO_CLI_TEST_SHARD == '3' }}
run: node --import tsx packages/cli/tests/23-daemon-sigint-supervisor.test.ts --dev-watch
cli-tests-2:
name: cli-tests (shard 2/3)
needs: changes
+40 -10
View File
@@ -1,56 +1,86 @@
# Changelog
## 0.17.0-beta.1 - 2026-11-19
## 0.17.0 - 2026-11-21
- **Use existing worktrees:** Start a workspace in a worktree you already have, or create one from any branch or pull request. ([#10190](https://github.com/getpaseo/paseo/pull/10190))
- **Antigravity approvals and history:** Pick a permission mode, answer tool approvals, import CLI sessions and see your history when you reopen a chat. ([#10193](https://github.com/getpaseo/paseo/pull/10193))
- **Watch pull requests:** Agents can watch a GitHub PR and get notified when checks, reviews or comments change. ([#10148](https://github.com/getpaseo/paseo/pull/10148))
- **Use existing worktrees:** Start a workspace in a worktree you already have, or create one from a branch or pull request. Plugins can manage worktree creation, removal, and restoration. When you branch off a fork PR or MR, choose Run setup to approve workspace automation. ([#10190](https://github.com/getpaseo/paseo/pull/10190), [#10278](https://github.com/getpaseo/paseo/pull/10278))
- **Update providers in Paseo:** See each provider's status, installed version, and available updates in the provider list. Open a provider's settings from Settings, setup, or the model picker to update supported CLIs and watch their output. ([#9568](https://github.com/getpaseo/paseo/pull/9568), [#9661](https://github.com/getpaseo/paseo/pull/9661))
- **Provider quota forecasts:** Usage estimates when a quota will run out or how much will remain at reset, based on your current pace. The forecast appears inline with the reset time. ([#10289](https://github.com/getpaseo/paseo/pull/10289), [#10385](https://github.com/getpaseo/paseo/pull/10385))
- **Watch PRs and MRs:** Ask an agent to watch a GitHub, GitLab, Gitea, Forgejo, or Codeberg change request for updates to checks, reviews, or comments. Stop a watch from Background work. ([#10148](https://github.com/getpaseo/paseo/pull/10148), [#10279](https://github.com/getpaseo/paseo/pull/10279), [#10280](https://github.com/getpaseo/paseo/pull/10280))
- **Heartbeats in Background work:** See and stop an agent's heartbeats next to its background tasks. ([#10097](https://github.com/getpaseo/paseo/pull/10097), [#10216](https://github.com/getpaseo/paseo/pull/10216))
- **Agent messages wait their turn:** Reports and notifications from other agents arrive when the current turn ends instead of interrupting it. ([#9757](https://github.com/getpaseo/paseo/pull/9757))
- **Antigravity approvals and history:** Choose a permission mode, respond to tool approvals, and import or reopen sessions. Use Antigravity CLI 1.5.0 or later on the daemon host, and include `acp` if you override its command. In Hub, reselect the model and thinking level if a saved model ID includes an old effort suffix. ([#10193](https://github.com/getpaseo/paseo/pull/10193))
- **More goose models:** Select models from all providers configured in goose. Existing goose settings and sessions carry over to the bundled plugin. ([#9719](https://github.com/getpaseo/paseo/pull/9719) by [@i386](https://github.com/i386))
- **Plugin agent instructions:** Plugins can add their own instructions to agents. ([#9781](https://github.com/getpaseo/paseo/pull/9781))
### Added
- Added OpenRouter credit balances and API key spending to Usage and `paseo usage` ([#10269](https://github.com/getpaseo/paseo/pull/10269))
- Added Antigravity account quotas to Usage ([#10232](https://github.com/getpaseo/paseo/pull/10232) by [@luoph](https://github.com/luoph), [@RRD-dev](https://github.com/RRD-dev))
- Added Antigravity skill suggestions when you type `/` inside a prompt ([#10383](https://github.com/getpaseo/paseo/pull/10383))
- Added bundled orchestration skills to Antigravity on hosts where Paseo skills are installed ([#10273](https://github.com/getpaseo/paseo/pull/10273))
- Added shortcuts to open the model picker and cycle thinking levels with Cmd/Ctrl+/ and Cmd/Ctrl+Shift+/ ([#10147](https://github.com/getpaseo/paseo/pull/10147))
- Added agent settings to Command Center search before the first message ([#10182](https://github.com/getpaseo/paseo/pull/10182) by [@cleiter](https://github.com/cleiter))
- Added Rewind to Command Center for the latest turn ([#10144](https://github.com/getpaseo/paseo/pull/10144))
- Added a separate Ultracode toggle for eligible Claude models ([#10150](https://github.com/getpaseo/paseo/pull/10150) by [@fivetaku](https://github.com/fivetaku))
- Added Flex speed for Codex ([#9809](https://github.com/getpaseo/paseo/pull/9809) by [@qjqqyy](https://github.com/qjqqyy))
- Added syntax highlighting for shell scripts and Dockerfiles ([#10178](https://github.com/getpaseo/paseo/pull/10178))
- Added project listing on connected daemons for Hub sessions with `hub.execute` ([#10392](https://github.com/getpaseo/paseo/pull/10392))
- Added labels and workspace IDs to `paseo ls --json` ([#10076](https://github.com/getpaseo/paseo/pull/10076))
### Changed
- Changed `browser_new_tab` to ask agents to choose a Desktop when several are connected ([#10189](https://github.com/getpaseo/paseo/pull/10189))
- Changed workspace Git status to reuse its snapshot after a short reconnect when the checkout has not changed ([#10142](https://github.com/getpaseo/paseo/pull/10142) by [@VladimirGVP](https://github.com/VladimirGVP))
- Changed Appearance content width to Default (820 px), Wide (1,200 px), and Full presets that resize open chats, the composer, and Markdown previews together ([#10231](https://github.com/getpaseo/paseo/pull/10231))
- Changed Antigravity tool cards to show shell commands and output, file diffs, and Paseo tool details ([#10379](https://github.com/getpaseo/paseo/pull/10379))
- Changed Clone from GitHub to show matching private repositories first ([#10264](https://github.com/getpaseo/paseo/pull/10264))
- Changed worktree teardown to keep the worktree when the command exceeds one minute or the `worktree.teardownTimeoutMs` limit in `paseo.json` ([#9852](https://github.com/getpaseo/paseo/pull/9852) by [@ragokan](https://github.com/ragokan))
- Changed workspace navigation to acknowledge taps promptly and initially load fewer offscreen chat rows on mobile ([#9887](https://github.com/getpaseo/paseo/pull/9887))
- Changed worktree teardown to stop after one minute by default and keep the worktree; set `worktree.teardownTimeoutMs` in `paseo.json` for longer commands ([#9852](https://github.com/getpaseo/paseo/pull/9852) by [@ragokan](https://github.com/ragokan))
- Changed workspace Git status to reuse its snapshot after a short reconnect when the checkout has not changed ([#10142](https://github.com/getpaseo/paseo/pull/10142) by [@VladimirGVP](https://github.com/VladimirGVP))
- Changed `browser_new_tab` to ask agents to choose a Desktop when several are connected ([#10189](https://github.com/getpaseo/paseo/pull/10189))
### Fixed
- Fixed an online host's workspaces staying missing after the app evicts its cached directory ([#10318](https://github.com/getpaseo/paseo/pull/10318))
- Fixed chat history timing out when many open chats refresh at once after reconnecting ([#10368](https://github.com/getpaseo/paseo/pull/10368))
- Fixed slow reopening of long Claude chats while the daemon is busy ([#10369](https://github.com/getpaseo/paseo/pull/10369))
- Fixed images from a live reply waiting for images in another chat's history to load ([#10371](https://github.com/getpaseo/paseo/pull/10371))
- Fixed agent recovery failing and idle agents showing errors after stopping a foreground daemon with Ctrl+C on macOS or Linux ([#10381](https://github.com/getpaseo/paseo/pull/10381))
- Fixed Antigravity turns ending while a background command is still running ([#10310](https://github.com/getpaseo/paseo/pull/10310))
- Fixed slash suggestions failing when a provider reports duplicate command names ([#10275](https://github.com/getpaseo/paseo/pull/10275))
- Fixed stale Codex subagent statuses after reopening or rewinding the parent chat ([#10171](https://github.com/getpaseo/paseo/pull/10171) by [@AnalyticETH](https://github.com/AnalyticETH))
- Fixed Usage showing the previous Claude account's quota after switching accounts ([#10236](https://github.com/getpaseo/paseo/pull/10236))
- Fixed the sidebar usage row dropping period labels such as `5h` and `wk` when multiple usage windows are pinned ([#10274](https://github.com/getpaseo/paseo/pull/10274))
- Fixed Changes failing to recognize a checkout immediately after restoring its worktree ([#10224](https://github.com/getpaseo/paseo/pull/10224), [#10304](https://github.com/getpaseo/paseo/pull/10304))
- Fixed double-click word selection and triple-click line selection in diffs ([#10252](https://github.com/getpaseo/paseo/pull/10252) by [@pedrovieira](https://github.com/pedrovieira))
- Fixed the composer and chat column losing alignment when Chat outline is enabled ([#10277](https://github.com/getpaseo/paseo/pull/10277))
- Fixed the archive shortcut failing when the active workspace's sidebar group is collapsed ([#10356](https://github.com/getpaseo/paseo/pull/10356) by [@hiennd-ctrl](https://github.com/hiennd-ctrl), [@neihyud](https://github.com/neihyud))
- Fixed Android composer buttons requiring a second tap after typing or zooming a chat image ([#10057](https://github.com/getpaseo/paseo/pull/10057), [#10308](https://github.com/getpaseo/paseo/pull/10308))
- Fixed swiping a terminal in an Android browser opening the keyboard when it was closed ([#10225](https://github.com/getpaseo/paseo/pull/10225) by [@tonylt](https://github.com/tonylt))
- Fixed Collapse turns hiding a finished OMP or Pi reply when an idle provider notice appears ([#10135](https://github.com/getpaseo/paseo/pull/10135))
- Fixed repeated finish notifications while an agent responds to background tasks and its earlier finish is unread ([#10200](https://github.com/getpaseo/paseo/pull/10200))
- Fixed an empty chat losing the prompt and start of a reply after reconnecting mid-reply ([#9723](https://github.com/getpaseo/paseo/pull/9723) by [@ragokan](https://github.com/ragokan))
- Fixed changes between Claude thinking levels stopping its background work ([#10008](https://github.com/getpaseo/paseo/pull/10008) by [@gilad-rubin](https://github.com/gilad-rubin))
- Fixed OpenCode turns staying running after a shared OpenCode service stops ([#10187](https://github.com/getpaseo/paseo/pull/10187))
- Fixed OMP denying an approved tool call when session or grant choices were offered ([#10126](https://github.com/getpaseo/paseo/pull/10126) by [@dsingal0](https://github.com/dsingal0))
- Fixed a Codex message stopped before its turn starts showing an error instead of canceled ([#9931](https://github.com/getpaseo/paseo/pull/9931) by [@3ae3ae](https://github.com/3ae3ae))
- Fixed Changes failing to open when Git metadata watching reaches its limit ([#10188](https://github.com/getpaseo/paseo/pull/10188))
- Fixed copying selected reply text into plain-text targets with unwanted Markdown syntax ([#10079](https://github.com/getpaseo/paseo/pull/10079) by [@danberindei](https://github.com/danberindei))
- Fixed file views losing their scroll position when switching Preview and Source, except HTML previews on iOS ([#10195](https://github.com/getpaseo/paseo/pull/10195) by [@apple-ouyang](https://github.com/apple-ouyang))
- Fixed file tabs in split panes showing or focusing the wrong file ([#9888](https://github.com/getpaseo/paseo/pull/9888) by [@KosmoCHE](https://github.com/KosmoCHE))
- Fixed touch-screen submenus closing as soon as they open ([#10175](https://github.com/getpaseo/paseo/pull/10175) by [@christiantwu](https://github.com/christiantwu))
- Fixed dictation failing after another chat that used the microphone closes ([#10185](https://github.com/getpaseo/paseo/pull/10185) by [@Brandon168](https://github.com/Brandon168))
- Fixed composer taps being lost on Android after zooming a chat image ([#10057](https://github.com/getpaseo/paseo/pull/10057))
- Fixed clipped text on Samsung DeX ([#9995](https://github.com/getpaseo/paseo/pull/9995) by [@easyhunjune](https://github.com/easyhunjune))
- Fixed workspace images in chat failing to load after a slow host connection ([#10111](https://github.com/getpaseo/paseo/pull/10111) by [@ragokan](https://github.com/ragokan))
- Fixed desktop browser screenshots returning fully transparent images ([#9807](https://github.com/getpaseo/paseo/pull/9807) by [@monarchmaisuriya](https://github.com/monarchmaisuriya))
- Fixed Mermaid flowcharts with `@` in labels showing source instead of the diagram ([#10165](https://github.com/getpaseo/paseo/pull/10165) by [@monarchmaisuriya](https://github.com/monarchmaisuriya))
- Fixed hidden background workspaces triggering the dock badge and favicon ([#9983](https://github.com/getpaseo/paseo/pull/9983))
- Fixed desktop sidebar navigation crowding out workspaces ([#9903](https://github.com/getpaseo/paseo/pull/9903) by [@pentatonic-alex](https://github.com/pentatonic-alex))
- Fixed historical closed PR badges appearing on a repository's default branch ([#10053](https://github.com/getpaseo/paseo/pull/10053))
- Fixed plugin agents failing to reopen after their provider closes the session ([#10153](https://github.com/getpaseo/paseo/pull/10153))
- Fixed plugin screens and settings failing to use plugin state hooks ([#10049](https://github.com/getpaseo/paseo/pull/10049))
- Fixed a Codex message stopped before its turn starts showing an error instead of canceled ([#9931](https://github.com/getpaseo/paseo/pull/9931) by [@3ae3ae](https://github.com/3ae3ae))
- Fixed historical closed PR badges appearing on a repository's default branch ([#10053](https://github.com/getpaseo/paseo/pull/10053))
### Plugins
- Added a `focusHost` navigation option for plugins to select the destination host in the sidebar when opening a workspace or agent ([#5574](https://github.com/getpaseo/paseo/pull/5574) by [@discwl](https://github.com/discwl))
## 0.16.2 - 2026-11-18
+40 -10
View File
@@ -1,56 +1,86 @@
# Changelog
## 0.17.0-beta.1 - 2026-11-19
## 0.17.0 - 2026-11-21
- **使用现有 worktree**:在已有的 worktree 中启动工作区,或从任意分支或 PR 创建 worktree。([#10190](https://github.com/getpaseo/paseo/pull/10190))
- **Antigravity 审批和历史记录**:选择权限模式、回复工具审批、导入 CLI 会话,并在重新打开对话时查看历史记录。([#10193](https://github.com/getpaseo/paseo/pull/10193))
- **监视 PR**:Agent 可以监视 GitHub PR,在检查、审查或评论有变化时收到通知。([#10148](https://github.com/getpaseo/paseo/pull/10148))
- **使用现有 worktree**:在已有的 worktree 中启动工作区,或从分支或 PR 创建 worktree。插件可以管理 worktree 的创建、移除和恢复。从 fork 的 PR 或 MR 创建分支时,选择“运行设置”以批准工作区自动化。([#10190](https://github.com/getpaseo/paseo/pull/10190), [#10278](https://github.com/getpaseo/paseo/pull/10278))
- **在 Paseo 中更新 Provider**:在 Provider 列表中查看各 Provider 的状态、已安装版本和可用更新。从设置、初次配置或模型选择器打开 Provider 设置,即可更新受支持的 CLI 并查看输出。([#9568](https://github.com/getpaseo/paseo/pull/9568), [#9661](https://github.com/getpaseo/paseo/pull/9661))
- **Provider 配额预测**:“使用情况”页面根据当前使用速度估算配额何时用完,或重置时还会剩下多少。预测结果显示在重置时间同一行中。([#10289](https://github.com/getpaseo/paseo/pull/10289), [#10385](https://github.com/getpaseo/paseo/pull/10385))
- **监视 PR 和 MR**:让 Agent 监视 GitHub、GitLab、Gitea、Forgejo 或 Codeberg 上的 PR 或 MR,跟踪检查、审查或评论的变化。你可以在后台任务中停止监视。([#10148](https://github.com/getpaseo/paseo/pull/10148), [#10279](https://github.com/getpaseo/paseo/pull/10279), [#10280](https://github.com/getpaseo/paseo/pull/10280))
- **在后台任务中查看 heartbeat**:在 Agent 的后台任务旁查看和停止 heartbeat。([#10097](https://github.com/getpaseo/paseo/pull/10097), [#10216](https://github.com/getpaseo/paseo/pull/10216))
- **Agent 消息排队等待**:其他 Agent 的报告和通知会在当前轮次结束后到达,不会打断当前轮次。([#9757](https://github.com/getpaseo/paseo/pull/9757))
- **Antigravity 审批和历史记录**:选择权限模式、回复工具审批,以及导入或重新打开会话。请在 daemon 主机上使用 Antigravity CLI 1.5.0 或更新版本,如果覆盖了启动命令请包含 `acp`。如果 Hub 中保存的模型 ID 含有旧的推理强度后缀,请重新选择模型和思考级别。([#10193](https://github.com/getpaseo/paseo/pull/10193))
- **更多 goose 模型**:从 goose 中已配置的所有 Provider 选择模型。现有 goose 设置和会话会迁移到内置插件。([#9719](https://github.com/getpaseo/paseo/pull/9719),贡献者:[@i386](https://github.com/i386))
- **插件 Agent 指令**:插件可以向 Agent 添加自己的指令。([#9781](https://github.com/getpaseo/paseo/pull/9781))
### 新增
- 在“使用情况”页面和 `paseo usage` 中新增 OpenRouter 余额和 API 密钥支出 ([#10269](https://github.com/getpaseo/paseo/pull/10269))
- 在“使用情况”页面新增 Antigravity 账号配额 ([#10232](https://github.com/getpaseo/paseo/pull/10232),贡献者:[@luoph](https://github.com/luoph), [@RRD-dev](https://github.com/RRD-dev))
- 在提示词中输入 `/` 时,新增 Antigravity 技能建议 ([#10383](https://github.com/getpaseo/paseo/pull/10383))
- 在已安装 Paseo 技能的主机上,为 Antigravity 新增内置编排技能 ([#10273](https://github.com/getpaseo/paseo/pull/10273))
- 新增 Cmd/Ctrl+/ 和 Cmd/Ctrl+Shift+/ 快捷键,用于打开模型选择器和切换思考级别 ([#10147](https://github.com/getpaseo/paseo/pull/10147))
- 新增在发送第一条消息前通过命令中心搜索 Agent 设置 ([#10182](https://github.com/getpaseo/paseo/pull/10182),贡献者:[@cleiter](https://github.com/cleiter))
- 新增在命令中心回退最近轮次的操作 ([#10144](https://github.com/getpaseo/paseo/pull/10144))
- 新增符合条件的 Claude 模型的独立 Ultracode 开关 ([#10150](https://github.com/getpaseo/paseo/pull/10150),贡献者:[@fivetaku](https://github.com/fivetaku))
- 新增 Codex Flex 速度选项 ([#9809](https://github.com/getpaseo/paseo/pull/9809),贡献者:[@qjqqyy](https://github.com/qjqqyy))
- 新增 shell 脚本和 Dockerfile 的语法高亮 ([#10178](https://github.com/getpaseo/paseo/pull/10178))
- 为具有 `hub.execute` 权限的 Hub 会话新增列出已连接 daemon 活跃项目的能力 ([#10392](https://github.com/getpaseo/paseo/pull/10392))
- 新增 `paseo ls --json` 输出的标签和工作区 ID ([#10076](https://github.com/getpaseo/paseo/pull/10076))
### 变更
- 连接多个 Desktop 时,`browser_new_tab` 会让 Agent 选择打开标签页的 Desktop ([#10189](https://github.com/getpaseo/paseo/pull/10189))
- 工作区 Git 状态在短暂重连且检出的内容未更改时复用之前的快照 ([#10142](https://github.com/getpaseo/paseo/pull/10142),贡献者:[@VladimirGVP](https://github.com/VladimirGVP))
- 将“外观”中的内容宽度改为默认(820 px)、宽版(1,200 px)和全宽预设,同时调整已打开对话、Composer 和 Markdown 预览的宽度 ([#10231](https://github.com/getpaseo/paseo/pull/10231))
- Antigravity 工具卡片现在显示 shell 命令及输出、文件 diff 和 Paseo 工具详情 ([#10379](https://github.com/getpaseo/paseo/pull/10379))
- 从 GitHub 克隆时,优先显示匹配的私有仓库 ([#10264](https://github.com/getpaseo/paseo/pull/10264))
- worktree 清理命令在超过默认的一分钟或 `paseo.json` 中 `worktree.teardownTimeoutMs` 限制时保留 worktree ([#9852](https://github.com/getpaseo/paseo/pull/9852),贡献者:[@ragokan](https://github.com/ragokan))
- 工作区导航会立即响应点击,并在手机端初始加载时减少屏幕外的对话行数 ([#9887](https://github.com/getpaseo/paseo/pull/9887))
- worktree 清理命令默认在一分钟后停止并保留 worktree;如需更长时间,可在 `paseo.json` 中设置 `worktree.teardownTimeoutMs` ([#9852](https://github.com/getpaseo/paseo/pull/9852),贡献者:[@ragokan](https://github.com/ragokan))
- 工作区 Git 状态在短暂重连且检出的内容未更改时复用之前的快照 ([#10142](https://github.com/getpaseo/paseo/pull/10142),贡献者:[@VladimirGVP](https://github.com/VladimirGVP))
- 连接多个 Desktop 时,`browser_new_tab` 会让 Agent 选择打开标签页的 Desktop ([#10189](https://github.com/getpaseo/paseo/pull/10189))
### 修复
- 修复应用清除主机目录缓存后,在线主机的工作区一直不显示的问题 ([#10318](https://github.com/getpaseo/paseo/pull/10318))
- 修复重新连接后多个已打开的对话同时刷新时,历史记录加载超时的问题 ([#10368](https://github.com/getpaseo/paseo/pull/10368))
- 修复 daemon 繁忙时,重新打开较长的 Claude 对话速度慢的问题 ([#10369](https://github.com/getpaseo/paseo/pull/10369))
- 修复当前回复中的图片等待另一个对话的历史图片加载的问题 ([#10371](https://github.com/getpaseo/paseo/pull/10371))
- 修复在 macOS 或 Linux 上用 Ctrl+C 停止前台 daemon 后,Agent 恢复失败且空闲 Agent 显示错误的问题 ([#10381](https://github.com/getpaseo/paseo/pull/10381))
- 修复 Antigravity 后台命令仍在运行时轮次就已结束的问题 ([#10310](https://github.com/getpaseo/paseo/pull/10310))
- 修复 Provider 返回重复命令名称时,斜杠建议列表出错的问题 ([#10275](https://github.com/getpaseo/paseo/pull/10275))
- 修复重新打开或回退父对话后,Codex 子 Agent 状态未更新的问题 ([#10171](https://github.com/getpaseo/paseo/pull/10171),贡献者:[@AnalyticETH](https://github.com/AnalyticETH))
- 修复切换 Claude 账号后,“使用情况”页面仍显示上一个账号配额的问题 ([#10236](https://github.com/getpaseo/paseo/pull/10236))
- 修复固定多个用量窗口时,侧边栏用量行隐藏 `5h` 和 `wk` 等周期标签的问题 ([#10274](https://github.com/getpaseo/paseo/pull/10274))
- 修复恢复 worktree 后,“更改”无法立即识别检出目录的问题 ([#10224](https://github.com/getpaseo/paseo/pull/10224), [#10304](https://github.com/getpaseo/paseo/pull/10304))
- 修复 diff 中双击选词和三击选行的问题 ([#10252](https://github.com/getpaseo/paseo/pull/10252),贡献者:[@pedrovieira](https://github.com/pedrovieira))
- 修复启用聊天大纲时,Composer 与对话栏对不齐的问题 ([#10277](https://github.com/getpaseo/paseo/pull/10277))
- 修复当前工作区所在的侧边栏分组折叠时,归档快捷键失效的问题 ([#10356](https://github.com/getpaseo/paseo/pull/10356),贡献者:[@hiennd-ctrl](https://github.com/hiennd-ctrl), [@neihyud](https://github.com/neihyud))
- 修复在 Android 上输入文字或缩放对话图片后,首次点击 Composer 按钮无效的问题 ([#10057](https://github.com/getpaseo/paseo/pull/10057), [#10308](https://github.com/getpaseo/paseo/pull/10308))
- 修复在 Android 浏览器中滑动终端时弹出已关闭的键盘的问题 ([#10225](https://github.com/getpaseo/paseo/pull/10225),贡献者:[@tonylt](https://github.com/tonylt))
- 修复启用“折叠轮次”时,空闲的 Provider 通知导致已完成的 OMP 或 Pi 回复被隐藏的问题 ([#10135](https://github.com/getpaseo/paseo/pull/10135))
- 修复 Agent 响应后台任务时,在之前的完成状态未读的情况下重复发送完成通知的问题 ([#10200](https://github.com/getpaseo/paseo/pull/10200))
- 修复空对话在回复中途重连后丢失提示词和回复开头的问题 ([#9723](https://github.com/getpaseo/paseo/pull/9723),贡献者:[@ragokan](https://github.com/ragokan))
- 修复切换 Claude 思考级别时停止后台任务的问题 ([#10008](https://github.com/getpaseo/paseo/pull/10008),贡献者:[@gilad-rubin](https://github.com/gilad-rubin))
- 修复共享 OpenCode 服务停止后轮次一直显示为运行中的问题 ([#10187](https://github.com/getpaseo/paseo/pull/10187))
- 修复 OMP 提供会话或授权选项时拒绝已批准工具调用的问题 ([#10126](https://github.com/getpaseo/paseo/pull/10126),贡献者:[@dsingal0](https://github.com/dsingal0))
- 修复 Codex 消息在轮次开始前停止时显示错误而非已取消的问题 ([#9931](https://github.com/getpaseo/paseo/pull/9931),贡献者:[@3ae3ae](https://github.com/3ae3ae))
- 修复 Git 元数据监听达到上限时无法打开“更改”的问题 ([#10188](https://github.com/getpaseo/paseo/pull/10188))
- 修复将选中的回复复制到纯文本目标时出现多余 Markdown 语法的问题 ([#10079](https://github.com/getpaseo/paseo/pull/10079),贡献者:[@danberindei](https://github.com/danberindei))
- 修复在预览和源码之间切换时文件视图丢失滚动位置的问题,iOS 的 HTML 预览除外 ([#10195](https://github.com/getpaseo/paseo/pull/10195),贡献者:[@apple-ouyang](https://github.com/apple-ouyang))
- 修复拆分窗格中的文件标签页显示或聚焦错误文件的问题 ([#9888](https://github.com/getpaseo/paseo/pull/9888),贡献者:[@KosmoCHE](https://github.com/KosmoCHE))
- 修复触摸屏上的子菜单打开后立即关闭的问题 ([#10175](https://github.com/getpaseo/paseo/pull/10175),贡献者:[@christiantwu](https://github.com/christiantwu))
- 修复关闭另一个使用过麦克风的对话后无法听写的问题 ([#10185](https://github.com/getpaseo/paseo/pull/10185),贡献者:[@Brandon168](https://github.com/Brandon168))
- 修复 Android 缩放对话图片后 Composer 点击失效的问题 ([#10057](https://github.com/getpaseo/paseo/pull/10057))
- 修复 Samsung DeX 上的文字被裁剪的问题 ([#9995](https://github.com/getpaseo/paseo/pull/9995),贡献者:[@easyhunjune](https://github.com/easyhunjune))
- 修复主机连接缓慢后对话中的工作区图片无法加载的问题 ([#10111](https://github.com/getpaseo/paseo/pull/10111),贡献者:[@ragokan](https://github.com/ragokan))
- 修复桌面浏览器截图返回全透明图片的问题 ([#9807](https://github.com/getpaseo/paseo/pull/9807),贡献者:[@monarchmaisuriya](https://github.com/monarchmaisuriya))
- 修复 Mermaid 流程图标签含有 `@` 时显示源码而非图表的问题 ([#10165](https://github.com/getpaseo/paseo/pull/10165),贡献者:[@monarchmaisuriya](https://github.com/monarchmaisuriya))
- 修复隐藏的后台工作区触发程序坞徽标和网站图标状态的问题 ([#9983](https://github.com/getpaseo/paseo/pull/9983))
- 修复桌面侧边栏导航占满工作区列表空间的问题 ([#9903](https://github.com/getpaseo/paseo/pull/9903),贡献者:[@pentatonic-alex](https://github.com/pentatonic-alex))
- 修复仓库默认分支显示历史已关闭 PR 徽标的问题 ([#10053](https://github.com/getpaseo/paseo/pull/10053))
- 修复 Provider 关闭会话后插件 Agent 无法重新打开的问题 ([#10153](https://github.com/getpaseo/paseo/pull/10153))
- 修复插件页面和设置无法使用插件状态钩子的问题 ([#10049](https://github.com/getpaseo/paseo/pull/10049))
- 修复 Codex 消息在轮次开始前停止时显示错误而非已取消的问题 ([#9931](https://github.com/getpaseo/paseo/pull/9931),贡献者:[@3ae3ae](https://github.com/3ae3ae))
- 修复仓库默认分支显示历史已关闭 PR 徽标的问题 ([#10053](https://github.com/getpaseo/paseo/pull/10053))
### 插件
- 新增插件导航 `focusHost` 选项,打开工作区或 Agent 时在侧边栏选中目标主机 ([#5574](https://github.com/getpaseo/paseo/pull/5574),贡献者:[@discwl](https://github.com/discwl))
## 0.16.2 - 2026-11-18
@@ -0,0 +1,3 @@
- Use existing worktrees: Start a workspace in a worktree you already have, or create one from a branch or pull request. Plugins can manage worktree creation, removal, and restoration. When you branch off a fork PR or MR, choose Run setup to approve workspace automation.
Full notes: https://paseo.sh/changelog
@@ -0,0 +1,3 @@
- Use existing worktrees: Start a workspace in a worktree you already have, or create one from a branch or pull request. Plugins can manage worktree creation, removal, and restoration. When you branch off a fork PR or MR, choose Run setup to approve workspace automation.
Full notes: https://paseo.sh/changelog
@@ -0,0 +1,3 @@
- Use existing worktrees: Start a workspace in a worktree you already have, or create one from a branch or pull request. Plugins can manage worktree creation, removal, and restoration. When you branch off a fork PR or MR, choose Run setup to approve workspace automation.
Full notes: https://paseo.sh/changelog
@@ -0,0 +1,3 @@
- Use existing worktrees: Start a workspace in a worktree you already have, or create one from a branch or pull request. Plugins can manage worktree creation, removal, and restoration. When you branch off a fork PR or MR, choose Run setup to approve workspace automation.
Full notes: https://paseo.sh/changelog
+1 -1
View File
@@ -1 +1 @@
sha256-T3mbzIj0+IZBS4XA+4Ab6e6LtIi8PX4Rzs4wFEWeClk=
sha256-gUBXG6rGxAAMUDgSXQw6GzkJ8U0xEoL9X/kZkLM4uxg=
+29 -28
View File
@@ -1,12 +1,12 @@
{
"name": "paseo",
"version": "0.17.0-beta.1",
"version": "0.17.0",
"lockfileVersion": 3,
"requires": true,
"packages": {
"": {
"name": "paseo",
"version": "0.17.0-beta.1",
"version": "0.17.0",
"hasInstallScript": true,
"license": "Apache-2.0",
"workspaces": [
@@ -37468,7 +37468,7 @@
},
"packages/app": {
"name": "@getpaseo/app",
"version": "0.17.0-beta.1",
"version": "0.17.0",
"dependencies": {
"@codemirror/commands": "6.10.4",
"@codemirror/language": "6.12.4",
@@ -37508,6 +37508,7 @@
"@xterm/addon-webgl": "0.20.0-beta.329",
"@xterm/xterm": "6.1.0-beta.336",
"buffer": "^6.0.3",
"diff": "8.0.3",
"expo": "~57.0.30",
"expo-asset": "~57.0.20",
"expo-audio": "~57.0.5",
@@ -39637,13 +39638,13 @@
},
"packages/cli": {
"name": "@getpaseo/cli",
"version": "0.17.0-beta.1",
"version": "0.17.0",
"license": "Apache-2.0",
"dependencies": {
"@clack/prompts": "^1.0.0",
"@getpaseo/client": "0.17.0-beta.1",
"@getpaseo/protocol": "0.17.0-beta.1",
"@getpaseo/server": "0.17.0-beta.1",
"@getpaseo/client": "0.17.0",
"@getpaseo/protocol": "0.17.0",
"@getpaseo/server": "0.17.0",
"chalk": "^5.3.0",
"commander": "^12.0.0",
"mime-types": "^2.1.35",
@@ -39890,11 +39891,11 @@
},
"packages/client": {
"name": "@getpaseo/client",
"version": "0.17.0-beta.1",
"version": "0.17.0",
"license": "Apache-2.0",
"dependencies": {
"@getpaseo/protocol": "0.17.0-beta.1",
"@getpaseo/relay": "0.17.0-beta.1",
"@getpaseo/protocol": "0.17.0",
"@getpaseo/relay": "0.17.0",
"ws": "^8.20.0",
"zod": "^4.4.3"
},
@@ -39906,7 +39907,7 @@
},
"packages/desktop": {
"name": "@getpaseo/desktop",
"version": "0.17.0-beta.1",
"version": "0.17.0",
"license": "Apache-2.0",
"dependencies": {
"@getpaseo/cli": "*",
@@ -40149,7 +40150,7 @@
},
"packages/expo-two-way-audio": {
"name": "@getpaseo/expo-two-way-audio",
"version": "0.17.0-beta.1",
"version": "0.17.0",
"license": "MIT",
"devDependencies": {
"@types/jest": "^29.5.14",
@@ -40195,7 +40196,7 @@
},
"packages/highlight": {
"name": "@getpaseo/highlight",
"version": "0.17.0-beta.1",
"version": "0.17.0",
"license": "Apache-2.0",
"dependencies": {
"@codemirror/language": "6.12.4",
@@ -40225,7 +40226,7 @@
},
"packages/plugin": {
"name": "@getpaseo/plugin",
"version": "0.17.0-beta.1",
"version": "0.17.0",
"license": "Apache-2.0",
"dependencies": {
"@agentclientprotocol/sdk": "^1.4.0",
@@ -40233,8 +40234,8 @@
"use-sync-external-store": "^1.6.0"
},
"devDependencies": {
"@getpaseo/client": "0.17.0-beta.1",
"@getpaseo/protocol": "0.17.0-beta.1",
"@getpaseo/client": "0.17.0",
"@getpaseo/protocol": "0.17.0",
"@types/node": "^20.9.0",
"@types/react": "~19.2.0",
"react": "19.2.3",
@@ -40244,8 +40245,8 @@
"zod": "^4.4.3"
},
"peerDependencies": {
"@getpaseo/client": "0.17.0-beta.1",
"@getpaseo/protocol": "0.17.0-beta.1",
"@getpaseo/client": "0.17.0",
"@getpaseo/protocol": "0.17.0",
"react": ">=19.1.0 <20",
"react-native": ">=0.81.5",
"zod": "^4.4.3"
@@ -40267,7 +40268,7 @@
},
"packages/protocol": {
"name": "@getpaseo/protocol",
"version": "0.17.0-beta.1",
"version": "0.17.0",
"license": "Apache-2.0",
"dependencies": {
"semver": "^7.8.5",
@@ -40295,7 +40296,7 @@
},
"packages/relay": {
"name": "@getpaseo/relay",
"version": "0.17.0-beta.1",
"version": "0.17.0",
"license": "Apache-2.0",
"dependencies": {
"@noble/ciphers": "^2.4.0",
@@ -40517,17 +40518,17 @@
},
"packages/server": {
"name": "@getpaseo/server",
"version": "0.17.0-beta.1",
"version": "0.17.0",
"license": "Apache-2.0",
"dependencies": {
"@agentclientprotocol/sdk": "^0.17.1",
"@anthropic-ai/claude-agent-sdk": "0.3.326",
"@anthropic-ai/sdk": "^0.104.2",
"@getpaseo/client": "0.17.0-beta.1",
"@getpaseo/highlight": "0.17.0-beta.1",
"@getpaseo/plugin": "0.17.0-beta.1",
"@getpaseo/protocol": "0.17.0-beta.1",
"@getpaseo/relay": "0.17.0-beta.1",
"@getpaseo/client": "0.17.0",
"@getpaseo/highlight": "0.17.0",
"@getpaseo/plugin": "0.17.0",
"@getpaseo/protocol": "0.17.0",
"@getpaseo/relay": "0.17.0",
"@isaacs/ttlcache": "^2.1.4",
"@modelcontextprotocol/sdk": "1.29.0",
"@opencode-ai/sdk": "1.14.46",
@@ -41474,7 +41475,7 @@
},
"packages/website": {
"name": "@getpaseo/website",
"version": "0.17.0-beta.1",
"version": "0.17.0",
"dependencies": {
"@cloudflare/vite-plugin": "^1.29.1",
"@cloudflare/workers-types": "^4.20260317.1",
@@ -43084,7 +43085,7 @@
},
"plugins": {
"name": "@getpaseo/builtin-plugins",
"version": "0.17.0-beta.1",
"version": "0.17.0",
"dependencies": {
"@getpaseo/plugin": "*",
"zod": "^4.4.3"
+2 -2
View File
@@ -1,6 +1,6 @@
{
"name": "paseo",
"version": "0.17.0-beta.1",
"version": "0.17.0",
"private": true,
"description": "Paseo: voice-controlled development environment for local AI coding agents",
"keywords": [
@@ -38,7 +38,7 @@
"dev": "npm run dev:server",
"dev:win": "powershell ./scripts/dev.ps1",
"dev:server": "cross-env PASEO_LISTEN=127.0.0.1:6768 ./scripts/dev-daemon.sh",
"dev:server:watch": "concurrently --kill-others --names protocol,client,server --prefix-colors yellow,blue,cyan \"npm run watch:protocol\" \"npm run watch:client\" \"npm run dev:server:raw\"",
"dev:server:watch": "npm run dev --workspace=@getpaseo/server -- --watch-dependencies",
"dev:server:raw": "npm run dev --workspace=@getpaseo/server",
"dev:app": "cross-env PASEO_LISTEN=127.0.0.1:6768 EXPO_PORT=8081 ./scripts/dev-app.sh",
"dev:android": "npm run dev:android --workspace=@getpaseo/app",
+2 -1
View File
@@ -1,6 +1,6 @@
{
"name": "@getpaseo/app",
"version": "0.17.0-beta.1",
"version": "0.17.0",
"private": true,
"main": "index.ts",
"scripts": {
@@ -81,6 +81,7 @@
"@xterm/addon-webgl": "0.20.0-beta.329",
"@xterm/xterm": "6.1.0-beta.336",
"buffer": "^6.0.3",
"diff": "8.0.3",
"expo": "~57.0.30",
"expo-asset": "~57.0.20",
"expo-audio": "~57.0.5",
@@ -266,7 +266,33 @@ function renderCopyOutput() {
return <button type="button">Copy output</button>;
}
const searchQuery = "IANA example domains";
const queryOnlySearch = { type: "search", query: searchQuery, toolName: "web_search" } as const;
function renderSearchDetails() {
return <ToolCallDetailsContent detail={queryOnlySearch} />;
}
function SearchBadge() {
const [expanded, setExpanded] = React.useState(false);
const toggle = React.useCallback(() => setExpanded((current) => !current), []);
return (
<ExpandableBadge
label="Search"
isExpanded={expanded}
onToggle={toggle}
renderDetails={renderSearchDetails}
/>
);
}
describe("tool detail interaction", () => {
it("shows the query when an expanded search has no results", async () => {
act(() => root.render(<SearchBadge />));
await page.getByRole("button", { name: "Search" }).click();
await expect.element(page.getByText(searchQuery, { exact: true })).toBeVisible();
});
it("keeps detail controls in the tab order", async () => {
function Badge() {
const [expanded, setExpanded] = React.useState(true);
@@ -352,6 +352,9 @@ function buildSearchSections(detail: SearchDetail, ds: DetailStyles): ReactNode[
</View>,
);
}
if (out.length === 0 && detail.query) {
return [<ScrollablePlainTextSection key="search-query" text={detail.query} ds={ds} />];
}
return out;
}
+3 -4
View File
@@ -9,7 +9,7 @@ import {
formatResetTime,
} from "./format";
import { UsageMeter } from "./meter";
import { UsageResetLine } from "./reset-line";
import { UsageDatapointLine } from "./datapoint-line";
import type { UsageBalance } from "./types";
import { useRelativeTimeTick } from "./use-relative-time-tick";
@@ -77,9 +77,8 @@ export function UsageBalanceBar({
</Text>
</View>
{usedPct != null ? <UsageMeter percent={usedPct} tone={tone} /> : null}
<UsageResetLine
countdown={resetLabel}
exactTime={resetTime}
<UsageDatapointLine
datapoints={[resetLabel, resetTime]}
testID={`provider-usage-balance-${balance.id}-reset`}
/>
</View>
+26 -2
View File
@@ -63,7 +63,29 @@ const narrowWindow: UsageWindow = {
resetsAt: new Date(narrowReadingMs + 165.5 * 3_600_000).toISOString(),
};
it("keeps the French reset countdown and forecast apart in a narrow card", async () => {
it("shows the forecast as one more datapoint after the reset countdown, in the same line", async () => {
act(() =>
root.render(
<UsageWindowBar
window={narrowWindow}
forecastAt={narrowForecastAt}
displayAs="used"
pinnable={false}
pinned={false}
onTogglePin={ignorePin}
pinLabel=""
pinTestID=""
/>,
),
);
const line = Array.from(container.querySelectorAll("*")).find((node) =>
node.textContent.startsWith("resets in"),
);
expect(line?.textContent).toMatch(/^resets in .+\s· .+\s· ~\d+% left at reset$/);
});
it("wraps the forecast below the countdown in a narrow French card instead of overlapping it", async () => {
await i18n.changeLanguage("fr");
container.style.width = "272px";
act(() =>
@@ -91,5 +113,7 @@ it("keeps the French reset countdown and forecast apart in a narrow card", async
return range.getBoundingClientRect();
}
expect(textBounds("se réinitialise").right).toBeLessThan(textBounds("~").left);
const countdown = textBounds("se réinitialise");
const forecast = textBounds("~");
expect(forecast.left >= countdown.right || forecast.top >= countdown.bottom).toBe(true);
});
+38
View File
@@ -0,0 +1,38 @@
import { Fragment } from "react";
import { Text } from "react-native";
import { StyleSheet } from "react-native-unistyles";
/**
* The secondary datapoints under a usage meter, separated by " · ": reset countdown, exact reset
* time, quota forecast. They are one line of equal text that wraps at the separators when narrow.
*/
export function UsageDatapointLine({
datapoints,
testID,
}: {
datapoints: readonly (string | null)[];
testID?: string;
}) {
const shown = datapoints.filter((datapoint): datapoint is string => Boolean(datapoint));
if (shown.length === 0) return null;
return (
<Text style={styles.line} testID={testID}>
{shown.map((datapoint, index) => (
// Datapoints are distinct strings, so the text is a stable key.
<Fragment key={datapoint}>
{/* The no-break space keeps the dot on the line of the datapoint before it. */}
{index > 0 ? "\u00a0· " : null}
<Text>{datapoint}</Text>
</Fragment>
))}
</Text>
);
}
const styles = StyleSheet.create((theme) => ({
line: {
color: theme.colors.foregroundMuted,
fontSize: theme.fontSize.sm,
fontWeight: theme.fontWeight.normal,
},
}));
-40
View File
@@ -1,40 +0,0 @@
import { Text, View } from "react-native";
import { StyleSheet } from "react-native-unistyles";
/**
* The reset data of a window or balance: the countdown first, then the exact time. When the line
* is too narrow the exact time truncates and the countdown wraps within its column.
*/
export function UsageResetLine({
countdown,
exactTime,
testID,
}: {
countdown: string | null;
exactTime: string | null;
testID?: string;
}) {
if (!countdown) return null;
return (
<View style={styles.line} testID={testID}>
<Text style={[styles.text, styles.countdown]}>{countdown}</Text>
{exactTime ? (
<Text style={[styles.text, styles.exactTime]} numberOfLines={1} ellipsizeMode="tail">
{`\u00a0·\u00a0${exactTime}`}
</Text>
) : null}
</View>
);
}
const styles = StyleSheet.create((theme) => ({
line: { flexDirection: "row", alignItems: "baseline" },
text: {
flexShrink: 0,
color: theme.colors.foregroundMuted,
fontSize: theme.fontSize.sm,
fontWeight: theme.fontWeight.normal,
},
countdown: { maxWidth: "100%" },
exactTime: { flexShrink: 1, minWidth: 0 },
}));
+2 -26
View File
@@ -16,7 +16,7 @@ import {
import { UsageMeter } from "./meter";
import { displayPercent, usageWindowRowLabel } from "./model";
import { usagePace } from "./pace";
import { UsageResetLine } from "./reset-line";
import { UsageDatapointLine } from "./datapoint-line";
import type { UsageDisplayAs } from "./preferences";
import type { UsageTone, UsageWindow } from "./types";
import { useRelativeTimeTick } from "./use-relative-time-tick";
@@ -124,14 +124,7 @@ function WindowRowContent({
{pinnable ? <UsagePinGlyph pinned={pinned} /> : null}
</View>
<UsageMeter percent={percent} tone={forecast?.tone ?? "default"} />
{countdown || forecast ? (
<View style={styles.timingRow}>
<View style={styles.resetTiming}>
<UsageResetLine countdown={countdown} exactTime={exactTime} />
</View>
{forecast ? <Text style={styles.forecast(forecast.tone)}>{forecast.label}</Text> : null}
</View>
) : null}
<UsageDatapointLine datapoints={[countdown, exactTime, forecast?.label ?? null]} />
</>
);
}
@@ -199,23 +192,6 @@ function UsagePinGlyph({ pinned }: { pinned: boolean }) {
}
const styles = StyleSheet.create((theme) => ({
timingRow: {
flexDirection: "row",
alignItems: "flex-start",
gap: theme.spacing[2],
},
resetTiming: { flex: 1, minWidth: 0 },
forecast: (tone: UsageTone) => ({
color: {
danger: theme.colors.statusDanger,
warning: theme.colors.statusWarning,
default: theme.colors.foregroundMuted,
ok: theme.colors.statusSuccess,
}[tone],
fontSize: theme.fontSize.sm,
maxWidth: "50%",
textAlign: "right",
}),
row: { gap: 3, paddingVertical: theme.spacing[1.5] },
pin: { width: 12, alignItems: "center" },
tooltipText: { color: theme.colors.popoverForeground, fontSize: theme.fontSize.sm },
@@ -14,6 +14,47 @@ describe("tool-call-parsers", () => {
expect(diff.some((entry) => entry.type === "add")).toBe(true);
});
it("keeps an edit visible in a compact preview of a 6,000-line file", () => {
const context = "- a\n".repeat(3_000);
const before = context + context;
const after = `${context}- b\n${context.slice(4)}`;
const preview = buildLineDiff(before, after);
expect(preview).toHaveLength(10);
expect(preview.slice(4, 6).map((line) => line.type)).toEqual(["remove", "add"]);
expect(preview.filter((line) => line.type === "remove").map((line) => line.content)).toEqual([
"-- a",
]);
expect(preview.filter((line) => line.type === "add").map((line) => line.content)).toEqual([
"+- b",
]);
});
it("retains edits on both sides of a long unchanged range", () => {
const context = "- a\n".repeat(5_998);
const preview = buildLineDiff(`- b\n${context}- d\n`, `- c\n${context}- e\n`);
expect(preview.filter((line) => line.type === "remove").map((line) => line.content)).toEqual([
"-- b",
"-- d",
]);
expect(preview.filter((line) => line.type === "add").map((line) => line.content)).toEqual([
"+- c",
"+- e",
]);
expect(preview).toHaveLength(12);
});
it("shows a bounded replacement preview when an edit rewrites the file", () => {
const preview = buildLineDiff("- a\n".repeat(6_000), "- b\n".repeat(6_000));
expect(preview[0]).toEqual({ type: "remove", content: "-- a" });
expect(preview).toContainEqual({ type: "add", content: "+- b" });
expect(preview.at(-1)).toEqual({ type: "header", content: "…" });
expect(preview).toHaveLength(65);
});
it("parses unified diff", () => {
const parsed = parseUnifiedDiff("@@\n-old\n+new\n");
+83 -134
View File
@@ -1,3 +1,4 @@
import { diffArrays } from "diff";
import { z } from "zod";
import type { HighlightToken } from "@getpaseo/highlight";
@@ -52,156 +53,104 @@ function splitIntoWords(text: string): string[] {
return result;
}
function computeWordLevelDiff(
oldLine: string,
newLine: string,
): { oldSegments: DiffSegment[]; newSegments: DiffSegment[] } {
const oldWords = splitIntoWords(oldLine);
const newWords = splitIntoWords(newLine);
const MAX_EDIT_DISTANCE = 256;
const FULL_CONTEXT_LINE_LIMIT = 128;
const CONTEXT_LINES = 3;
const REPLACEMENT_PREVIEW_LINES = 32;
const OMITTED_LINES: DiffLine = { type: "header", content: "…" };
const m = oldWords.length;
const n = newWords.length;
function addWordHighlights(diff: DiffLine[]): void {
for (let index = 0; index + 1 < diff.length; index++) {
const before = diff[index];
const after = diff[index + 1];
if (before.type !== "remove" || after.type !== "add") continue;
if (before.content.length + after.content.length > 1024) continue;
// LCS to find common words
const dp: number[][] = Array.from({ length: m + 1 }, () => Array(n + 1).fill(0));
const words = diffArrays(
splitIntoWords(before.content.slice(1)),
splitIntoWords(after.content.slice(1)),
{ maxEditLength: 64 },
);
if (!words) continue;
for (let i = m - 1; i >= 0; i -= 1) {
for (let j = n - 1; j >= 0; j -= 1) {
if (oldWords[i] === newWords[j]) {
dp[i][j] = dp[i + 1][j + 1] + 1;
} else {
dp[i][j] = Math.max(dp[i + 1][j], dp[i][j + 1]);
}
}
before.segments = words
.filter((part) => !part.added)
.map((part) => ({ text: part.value.join(""), changed: part.removed }));
after.segments = words
.filter((part) => !part.removed)
.map((part) => ({ text: part.value.join(""), changed: part.added }));
}
}
// Mark which words are in LCS (unchanged)
const oldInLCS = new Set<number>();
const newInLCS = new Set<number>();
function contextPreview(
lines: string[],
hasEditBefore: boolean,
hasEditAfter: boolean,
): DiffLine[] {
const leadingCount = hasEditBefore ? CONTEXT_LINES : 0;
const trailingCount = hasEditAfter ? CONTEXT_LINES : 0;
if (lines.length <= leadingCount + trailingCount) return contextLines(lines);
let i = 0;
let j = 0;
while (i < m && j < n) {
if (oldWords[i] === newWords[j]) {
oldInLCS.add(i);
newInLCS.add(j);
i += 1;
j += 1;
} else if (dp[i + 1][j] >= dp[i][j + 1]) {
i += 1;
} else {
j += 1;
}
return [
...contextLines(lines.slice(0, leadingCount)),
OMITTED_LINES,
...contextLines(lines.slice(lines.length - trailingCount)),
];
}
function contextLines(lines: string[]): DiffLine[] {
return lines.map((line) => ({ type: "context", content: ` ${line}` }));
}
function splitLineChange(before: string[], after: string[]) {
let start = 0;
let beforeEnd = before.length;
let afterEnd = after.length;
while (start < beforeEnd && start < afterEnd && before[start] === after[start]) start++;
while (beforeEnd > start && afterEnd > start && before[beforeEnd - 1] === after[afterEnd - 1]) {
beforeEnd--;
afterEnd--;
}
// Build segments: consecutive unchanged or changed words merged
const buildSegments = (words: string[], inLCS: Set<number>): DiffSegment[] => {
if (words.length === 0) return [];
const segments: DiffSegment[] = [];
let currentText = "";
let currentChanged: boolean | null = null;
for (let idx = 0; idx < words.length; idx++) {
const word = words[idx];
const changed = !inLCS.has(idx);
if (currentChanged === null) {
currentText = word;
currentChanged = changed;
} else if (changed === currentChanged) {
currentText += word;
} else {
segments.push({ text: currentText, changed: currentChanged });
currentText = word;
currentChanged = changed;
}
}
if (currentText) {
segments.push({ text: currentText, changed: currentChanged ?? false });
}
return segments;
};
const oldSegments = buildSegments(oldWords, oldInLCS);
const newSegments = buildSegments(newWords, newInLCS);
return {
oldSegments,
newSegments,
leading: before.slice(0, start),
before: before.slice(start, beforeEnd),
after: after.slice(start, afterEnd),
trailing: before.slice(beforeEnd),
};
}
function buildReplacementPreview(before: string[], after: string[]): DiffLine[] {
return [
...before
.slice(0, REPLACEMENT_PREVIEW_LINES)
.map((line): DiffLine => ({ type: "remove", content: `-${line}` })),
...after
.slice(0, REPLACEMENT_PREVIEW_LINES)
.map((line): DiffLine => ({ type: "add", content: `+${line}` })),
OMITTED_LINES,
];
}
export function buildLineDiff(originalText: string, updatedText: string): DiffLine[] {
const originalLines = splitIntoLines(originalText);
const updatedLines = splitIntoLines(updatedText);
// Anchor equal file edges so an edit to a repeated line stays at its original location.
const { leading, before, after, trailing } = splitLineChange(originalLines, updatedLines);
const compact = Math.max(originalLines.length, updatedLines.length) > FULL_CONTEXT_LINE_LIMIT;
if (compact && before.length === 0 && after.length === 0) return [];
const hasAnyContent = originalLines.length > 0 || updatedLines.length > 0;
if (!hasAnyContent) {
return [];
}
const leadingRows = compact ? contextPreview(leading, false, true) : contextLines(leading);
const changes = diffArrays(before, after, { maxEditLength: MAX_EDIT_DISTANCE });
if (!changes) return [...leadingRows, ...buildReplacementPreview(before, after)];
const m = originalLines.length;
const n = updatedLines.length;
const dp: number[][] = Array.from({ length: m + 1 }, () => Array(n + 1).fill(0));
for (let i = m - 1; i >= 0; i -= 1) {
for (let j = n - 1; j >= 0; j -= 1) {
if (originalLines[i] === updatedLines[j]) {
dp[i][j] = dp[i + 1][j + 1] + 1;
} else {
dp[i][j] = Math.max(dp[i + 1][j], dp[i][j + 1]);
}
}
}
const diff: DiffLine[] = [];
let i = 0;
let j = 0;
while (i < m && j < n) {
if (originalLines[i] === updatedLines[j]) {
diff.push({ type: "context", content: ` ${originalLines[i]}` });
i += 1;
j += 1;
} else if (dp[i + 1][j] >= dp[i][j + 1]) {
diff.push({ type: "remove", content: `-${originalLines[i]}` });
i += 1;
} else {
diff.push({ type: "add", content: `+${updatedLines[j]}` });
j += 1;
}
}
while (i < m) {
diff.push({ type: "remove", content: `-${originalLines[i]}` });
i += 1;
}
while (j < n) {
diff.push({ type: "add", content: `+${updatedLines[j]}` });
j += 1;
}
// Post-process to add word-level segments for adjacent remove/add pairs
for (let idx = 0; idx < diff.length - 1; idx++) {
const curr = diff[idx];
const next = diff[idx + 1];
if (curr.type === "remove" && next.type === "add") {
// Strip the leading -/+ from content for comparison
const oldLineText = curr.content.slice(1);
const newLineText = next.content.slice(1);
const { oldSegments, newSegments } = computeWordLevelDiff(oldLineText, newLineText);
curr.segments = oldSegments;
next.segments = newSegments;
}
}
return diff;
const changedRows = changes.flatMap((part): DiffLine[] => {
if (part.removed) return part.value.map((line) => ({ type: "remove", content: `-${line}` }));
if (part.added) return part.value.map((line) => ({ type: "add", content: `+${line}` }));
return compact ? contextPreview(part.value, true, true) : contextLines(part.value);
});
addWordHighlights(changedRows);
const trailingRows = compact ? contextPreview(trailing, true, false) : contextLines(trailing);
return [...leadingRows, ...changedRows, ...trailingRows];
}
export function parseUnifiedDiff(diffText?: string): DiffLine[] {
+4 -4
View File
@@ -1,6 +1,6 @@
{
"name": "@getpaseo/cli",
"version": "0.17.0-beta.1",
"version": "0.17.0",
"description": "Paseo CLI - control your AI coding agents from the command line",
"license": "Apache-2.0",
"bin": {
@@ -29,9 +29,9 @@
},
"dependencies": {
"@clack/prompts": "^1.0.0",
"@getpaseo/client": "0.17.0-beta.1",
"@getpaseo/protocol": "0.17.0-beta.1",
"@getpaseo/server": "0.17.0-beta.1",
"@getpaseo/client": "0.17.0",
"@getpaseo/protocol": "0.17.0",
"@getpaseo/server": "0.17.0",
"chalk": "^5.3.0",
"commander": "^12.0.0",
"mime-types": "^2.1.35",
@@ -1,234 +1,241 @@
#!/usr/bin/env npx tsx
/**
* Regression: a single SIGINT sent to the supervised supervisor entrypoint must allow
* graceful daemon lifecycle shutdown to complete (no early forced exit path).
*/
import assert from "node:assert";
import { spawn, type ChildProcess } from "node:child_process";
import { mkdtemp, rm } from "node:fs/promises";
import assert from "node:assert/strict";
import { spawn } from "node:child_process";
import { once } from "node:events";
import { mkdir, mkdtemp, readFile, rm, writeFile } from "node:fs/promises";
import { tmpdir } from "node:os";
import { join } from "node:path";
import { $ } from "zx";
import { setTimeout as delay } from "node:timers/promises";
import { WebSocket } from "ws";
import { DaemonClient, type WebSocketLike } from "@getpaseo/client/internal/daemon-client";
import { readDaemonInstance } from "@getpaseo/server/daemon-control";
import { runLocalPaseo } from "./helpers/local-cli.ts";
import { getAvailablePort } from "./helpers/network.ts";
$.verbose = false;
const pollIntervalMs = 100;
const testEnv = {
PASEO_LOCAL_SPEECH_AUTO_DOWNLOAD: process.env.PASEO_LOCAL_SPEECH_AUTO_DOWNLOAD ?? "0",
PASEO_DICTATION_ENABLED: process.env.PASEO_DICTATION_ENABLED ?? "0",
PASEO_VOICE_MODE_ENABLED: process.env.PASEO_VOICE_MODE_ENABLED ?? "0",
const paseoHome = await mkdtemp(join(tmpdir(), "paseo-sigint-supervisor-"));
const cwd = join(paseoHome, "workspace");
const eventsPath = join(paseoHome, "acp-events.jsonl");
const resumePrompt = "Continue the interrupted test.";
const watchDependencies = process.argv.includes("--dev-watch");
const env = {
PASEO_HOME: paseoHome,
PASEO_NODE_INSPECT: "0",
PASEO_RELAY_ENABLED: "false",
PASEO_LOCAL_SPEECH_AUTO_DOWNLOAD: "0",
PASEO_DICTATION_ENABLED: "0",
PASEO_VOICE_MODE_ENABLED: "0",
PASEO_LOG_FORMAT: "json",
};
function sleep(ms: number): Promise<void> {
return new Promise((resolve) => setTimeout(resolve, ms));
}
type AcpEvent =
| { type: "session"; pid: number; sessionId: string }
| { type: "prompt"; sessionId: string; text: string }
| { type: "sigint"; pid: number };
function isProcessRunning(pid: number): boolean {
if (!Number.isInteger(pid) || pid <= 0) {
return false;
}
try {
process.kill(pid, 0);
return true;
} catch {
return false;
}
}
function signalProcessGroup(pid: number, signal: NodeJS.Signals): boolean {
if (!Number.isInteger(pid) || pid <= 0) {
return false;
}
if (process.platform === "win32") {
try {
process.kill(pid, signal);
return true;
} catch {
return false;
}
}
try {
process.kill(-pid, signal);
return true;
} catch {
return false;
}
}
interface DaemonStatus {
localDaemon: string | null;
pid: number | null;
}
async function readDaemonStatus(paseoHome: string): Promise<DaemonStatus> {
const result =
await $`PASEO_HOME=${paseoHome} PASEO_LOCAL_SPEECH_AUTO_DOWNLOAD=${testEnv.PASEO_LOCAL_SPEECH_AUTO_DOWNLOAD} PASEO_DICTATION_ENABLED=${testEnv.PASEO_DICTATION_ENABLED} PASEO_VOICE_MODE_ENABLED=${testEnv.PASEO_VOICE_MODE_ENABLED} npx paseo daemon status --home ${paseoHome} --json`.nothrow();
if (result.exitCode !== 0) {
return { localDaemon: null, pid: null };
}
try {
const parsed = JSON.parse(result.stdout) as { localDaemon?: unknown; pid?: unknown };
const localDaemon = typeof parsed.localDaemon === "string" ? parsed.localDaemon : null;
const pid =
typeof parsed.pid === "number" && Number.isInteger(parsed.pid) && parsed.pid > 0
? parsed.pid
: null;
return { localDaemon, pid };
} catch {
return { localDaemon: null, pid: null };
}
}
async function waitFor(
check: () => Promise<boolean> | boolean,
timeoutMs: number,
message: string,
): Promise<void> {
const deadline = Date.now() + timeoutMs;
async function poll(): Promise<void> {
if (await check()) return;
if (Date.now() >= deadline) throw new Error(message);
await sleep(pollIntervalMs);
return poll();
}
return poll();
}
interface ExitResult {
code: number | null;
signal: NodeJS.Signals | null;
}
function waitForProcessExit(processRef: ChildProcess, timeoutMs: number): Promise<ExitResult> {
return new Promise((resolve, reject) => {
const timeout = setTimeout(() => {
reject(new Error("timed out waiting for process exit"));
}, timeoutMs);
processRef.once("exit", (code, signal) => {
clearTimeout(timeout);
resolve({ code, signal });
});
async function readEvents(): Promise<AcpEvent[]> {
const contents = await readFile(eventsPath, "utf8").catch((error) => {
if (error.code === "ENOENT") return "";
throw error;
});
return contents
.split("\n")
.filter(Boolean)
.map((line) => JSON.parse(line) as AcpEvent);
}
console.log("=== Daemon SIGINT (supervisor regression) ===\n");
async function waitFor<T>(read: () => Promise<T | undefined>, message: string, timeoutMs = 15_000) {
const deadline = Date.now() + timeoutMs;
while (Date.now() < deadline) {
const value = await read();
if (value !== undefined) return value;
await delay(50);
}
throw new Error(message);
}
const port = await getAvailablePort();
const paseoHome = await mkdtemp(join(tmpdir(), "paseo-sigint-supervisor-"));
const cliRoot = join(import.meta.dirname, "..");
let supervisorProcess: ChildProcess | null = null;
let recentSupervisorLogs = "";
try {
console.log("Test 1: start supervisor-entrypoint in dev mode with isolated PASEO_HOME");
supervisorProcess = spawn(
process.execPath,
["--import", "tsx", "../server/scripts/supervisor-entrypoint.ts", "--dev"],
async function startSupervisor() {
const host = `127.0.0.1:${await getAvailablePort()}`;
const child = spawn(
watchDependencies ? "npm" : process.execPath,
watchDependencies
? ["run", "dev:server:watch"]
: ["--import", "tsx", "../server/scripts/supervisor-entrypoint.ts", "--dev"],
{
cwd: cliRoot,
cwd: join(import.meta.dirname, watchDependencies ? "../../.." : ".."),
env: {
...process.env,
...testEnv,
PASEO_HOME: paseoHome,
PASEO_LISTEN: `127.0.0.1:${port}`,
PASEO_RELAY_ENABLED: "false",
...Object.fromEntries(
Object.entries(process.env).filter(([key]) => !key.startsWith("PASEO_")),
),
HOME: paseoHome,
USERPROFILE: paseoHome,
...env,
PASEO_LISTEN: host,
CI: "true",
},
stdio: ["ignore", "pipe", "pipe"],
detached: process.platform !== "win32",
},
);
supervisorProcess.stdout?.on("data", (chunk) => {
recentSupervisorLogs = (recentSupervisorLogs + chunk.toString()).slice(-8000);
assert(child.pid, "supervisor should have a PID");
const exited = once(child, "close");
const client = new DaemonClient({
url: `ws://${host}/ws`,
clientId: "sigint-supervisor-test",
appVersion: "0.17.0-beta.1",
localCredential: async () =>
(await readFile(join(paseoHome, "local-credential"), "utf8")).trim(),
webSocketFactory: (url, options) => new WebSocket(url, options) as unknown as WebSocketLike,
reconnect: { enabled: false },
});
supervisorProcess.stderr?.on("data", (chunk) => {
recentSupervisorLogs = (recentSupervisorLogs + chunk.toString()).slice(-8000);
});
await waitFor(
async () => {
const status = await readDaemonStatus(paseoHome);
return (
status.localDaemon === "running" && status.pid !== null && isProcessRunning(status.pid)
);
},
120000,
"daemon did not become running in time",
);
console.log("✓ supervised daemon started\n");
console.log("Test 2: single SIGINT should shutdown gracefully without forced exit");
const exitPromise = waitForProcessExit(supervisorProcess, 30000);
const signaledGroup = signalProcessGroup(supervisorProcess.pid ?? -1, "SIGINT");
if (!signaledGroup) {
supervisorProcess.kill("SIGINT");
}
const exit = await exitPromise;
assert.strictEqual(
exit.signal,
null,
`supervisor should exit cleanly, got signal=${exit.signal}`,
);
assert.strictEqual(exit.code, 0, `supervisor should exit with status 0, got code=${exit.code}`);
await waitFor(
async () => {
const status = await readDaemonStatus(paseoHome);
return status.localDaemon === "stopped";
},
15000,
"daemon status did not transition to stopped after SIGINT",
);
assert(
!recentSupervisorLogs.includes("Forcing exit..."),
`worker entered forced-exit path during single SIGINT:\n${recentSupervisorLogs}`,
);
assert(
!recentSupervisorLogs.includes("Forcing shutdown - HTTP server didn't close in time"),
`worker hit shutdown timeout during single SIGINT:\n${recentSupervisorLogs}`,
);
console.log("✓ single SIGINT completed graceful shutdown without forced exit\n");
} finally {
if (supervisorProcess?.pid && isProcessRunning(supervisorProcess.pid)) {
const signaledGroup = signalProcessGroup(supervisorProcess.pid, "SIGTERM");
if (!signaledGroup) {
supervisorProcess.kill("SIGTERM");
let output = "";
const startedWatchers = new Set<string>();
function captureOutput(chunk: Buffer) {
output = (output + chunk.toString()).slice(-32000);
for (const watcher of ["protocol", "client"]) {
if (output.includes(`[${watcher}]`)) startedWatchers.add(watcher);
}
await waitFor(
() => !isProcessRunning(supervisorProcess!.pid ?? -1),
5000,
"supervisor cleanup timed out",
).catch(() => {
const killedGroup = signalProcessGroup(supervisorProcess!.pid ?? -1, "SIGKILL");
if (!killedGroup) {
supervisorProcess?.kill("SIGKILL");
}
});
}
child.stdout.on("data", captureOutput);
child.stderr.on("data", captureOutput);
try {
await Promise.race([
waitFor(
async () => {
const instance = await readDaemonInstance(paseoHome);
if (instance?.listen === host) return instance;
},
"supervisor did not publish its owned endpoint",
120_000,
),
exited.then((result) => {
throw new Error(`supervisor exited early: ${result}\n${output}`);
}),
]);
await client.connect();
if (watchDependencies) {
await waitFor(async () => {
if (startedWatchers.size === 2) return true;
}, "dev runner did not start both dependency watchers");
}
} catch (error) {
await client.close();
child.kill("SIGTERM");
throw error;
}
return { child, client, exited, output: () => output };
}
await $`PASEO_HOME=${paseoHome} PASEO_LOCAL_SPEECH_AUTO_DOWNLOAD=${testEnv.PASEO_LOCAL_SPEECH_AUTO_DOWNLOAD} PASEO_DICTATION_ENABLED=${testEnv.PASEO_DICTATION_ENABLED} PASEO_VOICE_MODE_ENABLED=${testEnv.PASEO_VOICE_MODE_ENABLED} npx paseo daemon stop --home ${paseoHome} --force`.nothrow();
function assertPidExited(pid: number) {
assert.throws(() => process.kill(pid, 0), { code: "ESRCH" }, `process ${pid} survived shutdown`);
}
async function interruptForeground(daemon: Awaited<ReturnType<typeof startSupervisor>>) {
const pid = daemon.child.pid!;
await daemon.client.close();
process.kill(process.platform === "win32" ? pid : -pid, "SIGINT");
const exit = await Promise.race([daemon.exited, delay(30_000, "timed out", { ref: false })]);
// npm re-raises SIGINT when its shell exits on the same foreground signal.
if (!watchDependencies || !Array.isArray(exit) || exit[1] !== "SIGINT") {
assert.deepEqual(exit, [0, null], daemon.output());
}
await waitFor(async () => {
if (!(await readDaemonInstance(paseoHome))) return true;
}, "supervisor did not release its PID lock");
const log = await readFile(join(paseoHome, "daemon.log"), "utf8");
assert(!log.includes("Forcing shutdown - HTTP server didn't close in time"), log.slice(-4000));
return log;
}
let daemon: Awaited<ReturnType<typeof startSupervisor>> | undefined;
try {
await mkdir(cwd);
const provider = join(import.meta.dirname, "helpers", "supervisor-acp.cjs");
await writeFile(
join(paseoHome, "config.json"),
JSON.stringify({
version: 1,
agents: {
resumeOnStartup: true,
resumePrompt,
providers: {
antigravity: { command: [process.execPath, provider, eventsPath] },
},
},
}),
);
daemon = await startSupervisor();
if (process.platform === "win32") {
await interruptForeground(daemon);
} else {
const idle = await daemon.client.createAgent({ provider: "antigravity", cwd });
const running = await daemon.client.createAgent({ provider: "antigravity", cwd });
const crashing = await daemon.client.createAgent({ provider: "antigravity", cwd });
const opened = (await readEvents()).filter((event) => event.type === "session");
const sessions = [idle, running, crashing].map((agent) => {
const handle = agent.persistence?.sessionId;
const session = opened.find((event) => handle?.includes(event.sessionId));
assert(session, `missing ACP process for agent ${agent.id}`);
return session;
});
// Exit just this provider while the host is up to prove failure reporting remains active.
process.kill(sessions[2].pid, "SIGTERM");
await waitFor(async () => {
const { agent } = (await daemon!.client.fetchAgent(crashing.id)) ?? {};
if (agent?.status === "error" && agent.attentionReason === "error") return agent;
}, "unexpected provider exit did not raise error attention");
const failure = await daemon.client.fetchAgentTimeline(crashing.id, { limit: 20 });
assert.match(JSON.stringify(failure.entries), /\[System Error\].*ACP process exited/);
console.log("Unexpected ACP exit raised error attention and added a timeline entry.");
await daemon.client.sendMessage(running.id, "Hold the turn open.");
await waitFor(async () => {
const { agent } = (await daemon!.client.fetchAgent(running.id)) ?? {};
if (agent?.status === "running") return agent;
}, "ACP turn did not start");
const workerPid = (await daemon.client.getDaemonStatus()).pid;
const log = await interruptForeground(daemon);
assert.deepEqual(
(await readEvents()).filter((event) => event.type === "sigint"),
[],
"the foreground interrupt reached an ACP process",
);
assert(!log.includes("worker_received_SIGINT"), "the foreground interrupt reached the worker");
assert.match(log, /supervisor_received_SIGINT/);
assertPidExited(workerPid);
for (const session of sessions) assertPidExited(session.pid);
console.log("Foreground SIGINT reached the supervisor. The worker and ACP processes exited.");
daemon = await startSupervisor();
const restoredIdle = (await daemon.client.fetchAgentTimeline(idle.id)).agent;
assert.equal(restoredIdle?.status, "idle");
assert.equal(restoredIdle?.requiresAttention, false);
await waitFor(async () => {
const { agent } = (await daemon!.client.fetchAgent(running.id)) ?? {};
if (agent?.status === "idle" && agent.attentionReason === "finished") return agent;
}, "interrupted agent did not finish the restart prompt");
assert.deepEqual(
(await readEvents()).filter((event) => event.type === "prompt"),
[
{ type: "prompt", sessionId: sessions[1].sessionId, text: "Hold the turn open." },
{ type: "prompt", sessionId: sessions[1].sessionId, text: resumePrompt },
],
);
console.log(
"Idle ACP reopened without error attention. The interrupted ACP turn resumed once.",
);
await interruptForeground(daemon);
}
} catch (error) {
console.error(daemon?.output());
throw error;
} finally {
await daemon?.client.close();
if (await readDaemonInstance(paseoHome)) {
await runLocalPaseo(["daemon", "stop", "--home", paseoHome, "--force"], env);
}
await rm(paseoHome, { recursive: true, force: true });
}
if (recentSupervisorLogs.trim().length === 0) {
console.log("(no supervisor logs captured)");
}
console.log("=== Supervisor SIGINT regression test passed ===");
@@ -0,0 +1,58 @@
const { randomUUID } = require("node:crypto");
const { appendFileSync } = require("node:fs");
const { createInterface } = require("node:readline");
const eventsPath = process.argv[2];
const record = (event) => appendFileSync(eventsPath, JSON.stringify(event) + "\n");
const modes = {
currentModeId: "default",
availableModes: [{ id: "default", name: "Default" }],
};
process.on("SIGINT", () => {
record({ type: "sigint", pid: process.pid });
process.exit(0);
});
createInterface({ input: process.stdin }).on("line", (line) => {
const message = JSON.parse(line);
if (message.id === undefined) return;
let result;
switch (message.method) {
case "initialize":
result = { protocolVersion: 1, agentCapabilities: { loadSession: true } };
break;
case "session/new": {
const sessionId = randomUUID();
record({ type: "session", pid: process.pid, sessionId });
result = { sessionId, modes };
break;
}
case "session/load":
result = { modes };
break;
case "session/close":
// Keep the provider alive long enough to detect a signal sent down the dev watcher tree.
setTimeout(() => reply(message.id, {}), 400);
return;
case "session/prompt": {
const { sessionId, prompt } = message.params;
const text = prompt
.filter((part) => part.type === "text")
.map((part) => part.text)
.join("");
record({ type: "prompt", sessionId, text });
if (text === "Hold the turn open.") return;
result = { stopReason: "end_turn" };
break;
}
default:
result = {};
}
reply(message.id, result);
});
function reply(id, result) {
process.stdout.write(JSON.stringify({ jsonrpc: "2.0", id, result }) + "\n");
}
+3 -3
View File
@@ -1,6 +1,6 @@
{
"name": "@getpaseo/client",
"version": "0.17.0-beta.1",
"version": "0.17.0",
"description": "Paseo client SDK package",
"license": "Apache-2.0",
"files": [
@@ -49,8 +49,8 @@
"measure:diff-materialization": "tsx scripts/measure-diff-materialization.ts"
},
"dependencies": {
"@getpaseo/protocol": "0.17.0-beta.1",
"@getpaseo/relay": "0.17.0-beta.1",
"@getpaseo/protocol": "0.17.0",
"@getpaseo/relay": "0.17.0",
"ws": "^8.20.0",
"zod": "^4.4.3"
},
+1 -1
View File
@@ -1,6 +1,6 @@
{
"name": "@getpaseo/desktop",
"version": "0.17.0-beta.1",
"version": "0.17.0",
"private": true,
"description": "Paseo desktop app (Electron wrapper)",
"homepage": "https://paseo.sh",
+1 -1
View File
@@ -1,6 +1,6 @@
{
"name": "@getpaseo/expo-two-way-audio",
"version": "0.17.0-beta.1",
"version": "0.17.0",
"description": "Native module for two way audio streaming",
"keywords": [
"ExpoTwoWayAudio",
+1 -1
View File
@@ -1,6 +1,6 @@
{
"name": "@getpaseo/highlight",
"version": "0.17.0-beta.1",
"version": "0.17.0",
"license": "Apache-2.0",
"files": [
"dist",
+5 -5
View File
@@ -1,6 +1,6 @@
{
"name": "@getpaseo/plugin",
"version": "0.17.0-beta.1",
"version": "0.17.0",
"description": "Paseo plugin SDK package",
"license": "Apache-2.0",
"files": [
@@ -78,8 +78,8 @@
"use-sync-external-store": "^1.6.0"
},
"devDependencies": {
"@getpaseo/client": "0.17.0-beta.1",
"@getpaseo/protocol": "0.17.0-beta.1",
"@getpaseo/client": "0.17.0",
"@getpaseo/protocol": "0.17.0",
"@types/node": "^20.9.0",
"@types/react": "~19.2.0",
"react": "19.2.3",
@@ -89,8 +89,8 @@
"zod": "^4.4.3"
},
"peerDependencies": {
"@getpaseo/client": "0.17.0-beta.1",
"@getpaseo/protocol": "0.17.0-beta.1",
"@getpaseo/client": "0.17.0",
"@getpaseo/protocol": "0.17.0",
"react": ">=19.1.0 <20",
"react-native": ">=0.81.5",
"zod": "^4.4.3"
@@ -16,6 +16,7 @@ import {
type SessionNotification,
type SessionUpdate,
type ToolCall,
type ToolCallContent,
type ToolCallUpdate,
type Stream,
} from "@agentclientprotocol/sdk";
@@ -408,6 +409,15 @@ interface ActivePrompt {
const DEFAULT_DEFERRED_SETTLE_DELAY_MS = 500;
const DEFAULT_DEFERRED_QUIET_LIMIT_MS = 120_000;
type AcpToolCallSource = AcpToolCallSnapshot & {
diff?: Extract<ToolCallContent, { type: "diff" }>;
};
interface AcpToolCallState {
source: AcpToolCallSource;
presentation: AcpToolCallSnapshot;
}
class AcpRuntime {
readonly connection: ClientSideConnection;
agentCapabilities: AgentCapabilities = {};
@@ -415,7 +425,8 @@ class AcpRuntime {
private readonly child: ChildProcessWithoutNullStreams | null;
private emit: (event: ProviderEvent) => void;
private readonly messages = new Map<string, string>();
private readonly toolCalls = new Map<string, AcpToolCallSnapshot>();
private readonly toolCalls = new Map<string, AcpToolCallState>();
private mcpServerNames: readonly string[] = [];
private readonly liveOpenToolIds = new Set<string>();
private readonly canceledToolCallIds = new Set<string>();
// Running tool rows published by transformers; the turn's terminal closes any left open.
@@ -577,6 +588,7 @@ class AcpRuntime {
connectionCapabilities: readonly ProviderCapability[],
): Promise<readonly ProviderCapability[]> {
const mcpServers = toAcpMcpServers(input.config);
this.mcpServerNames = mcpServers.map((server) => server.name);
let nativeSessionId = readNativeSessionId(input.persistence);
const metadata: Record<string, unknown> = {
_paseo: {
@@ -1468,7 +1480,8 @@ class AcpRuntime {
options?: { preserveQualifyingOpenTools?: boolean; suppressTrailingToolEcho?: boolean },
): void {
const preserve = options?.preserveQualifyingOpenTools === true;
for (const [id, snapshot] of this.toolCalls) {
for (const [id, tool] of this.toolCalls) {
const snapshot = tool.presentation;
if (snapshot.status !== "pending" && snapshot.status !== "in_progress") continue;
if (preserve && this.liveOpenToolIds.has(id) && this.toolKeepsTurnOpen(snapshot)) continue;
this.liveOpenToolIds.delete(id);
@@ -1477,7 +1490,10 @@ class AcpRuntime {
...snapshot,
status: state === "completed" ? "completed" : "failed",
};
this.toolCalls.set(id, completed);
this.toolCalls.set(id, {
source: { ...tool.source, status: completed.status },
presentation: completed,
});
this.emit({
type: "timeline.item",
sessionId: this.options.boundarySessionId,
@@ -1515,16 +1531,32 @@ class AcpRuntime {
if (update.sessionUpdate === "tool_call") {
this.canceledToolCallIds.delete(update.toolCallId);
}
const current = this.toolCalls.get(update.toolCallId);
const tool = this.toolCalls.get(update.toolCallId);
const current = tool?.presentation;
const wasOpenQualifying =
current !== undefined &&
this.liveOpenToolIds.has(current.id) &&
this.toolKeepsTurnOpen(current);
let snapshot = mergeToolCallSnapshot(update, current);
const context = { sessionId: this.options.boundarySessionId };
const source = mergeToolCallSnapshot(update, tool?.source);
let snapshot: AcpToolCallSnapshot = source;
const context = {
sessionId: this.options.boundarySessionId,
mcpServerNames: this.mcpServerNames,
};
for (const transformer of this.transformers)
snapshot = transformer.toolCall?.(snapshot, context) ?? snapshot;
this.toolCalls.set(snapshot.id, snapshot);
if (!snapshot.detail && source.diff && snapshot.kind === "edit") {
snapshot = {
...snapshot,
detail: {
type: "edit",
filePath: source.diff.path,
oldString: source.diff.oldText ?? undefined,
newString: source.diff.newText,
},
};
}
this.toolCalls.set(snapshot.id, { source, presentation: snapshot });
const isOpen = snapshot.status === "pending" || snapshot.status === "in_progress";
if (this.replayWindow === null) {
if (isOpen) this.liveOpenToolIds.add(snapshot.id);
@@ -1797,7 +1829,7 @@ class AcpRuntime {
private hasQualifyingOpenTools(): boolean {
for (const id of this.liveOpenToolIds) {
const snapshot = this.toolCalls.get(id);
const snapshot = this.toolCalls.get(id)?.presentation;
if (snapshot && this.toolKeepsTurnOpen(snapshot)) return true;
}
return false;
@@ -2035,8 +2067,8 @@ function ownConnectorStream(source: Stream): {
function mergeToolCallSnapshot(
update: ToolCall | ToolCallUpdate,
current: AcpToolCallSnapshot | undefined,
): AcpToolCallSnapshot {
current: AcpToolCallSource | undefined,
): AcpToolCallSource {
return {
id: update.toolCallId,
name: firstText(update.name, current?.name),
@@ -2046,6 +2078,10 @@ function mergeToolCallSnapshot(
input: jsonValue(firstDefined(update.rawInput, current?.input, null)),
output: jsonValue(firstDefined(update.rawOutput, current?.output, null)),
locations: update.locations?.map((location) => location.path) ?? current?.locations ?? [],
diff:
update.content === undefined
? current?.diff
: update.content?.find((item) => item.type === "diff"),
};
}
+4 -1
View File
@@ -142,7 +142,10 @@ export interface AcpTransformer {
notification: { method: string; params: JsonValue },
context: AcpContext,
): AcpVendorUpdate | readonly AcpVendorUpdate[] | null;
toolCall?(toolCall: AcpToolCallSnapshot, context: AcpContext): AcpToolCallSnapshot;
toolCall?(
toolCall: AcpToolCallSnapshot,
context: AcpContext & { mcpServerNames?: readonly string[] },
): AcpToolCallSnapshot;
}
export function runAcpProvider(options: RunAcpProviderOptions): ProviderRegistration {
+1 -1
View File
@@ -1,6 +1,6 @@
{
"name": "@getpaseo/protocol",
"version": "0.17.0-beta.1",
"version": "0.17.0",
"description": "Paseo shared protocol schemas and wire types",
"license": "Apache-2.0",
"files": [
+1 -1
View File
@@ -1,6 +1,6 @@
{
"name": "@getpaseo/relay",
"version": "0.17.0-beta.1",
"version": "0.17.0",
"description": "Paseo relay for bridging daemon and client connections",
"license": "Apache-2.0",
"files": [
+6 -6
View File
@@ -1,6 +1,6 @@
{
"name": "@getpaseo/server",
"version": "0.17.0-beta.1",
"version": "0.17.0",
"description": "Paseo backend server",
"license": "Apache-2.0",
"files": [
@@ -109,11 +109,11 @@
"@agentclientprotocol/sdk": "^0.17.1",
"@anthropic-ai/claude-agent-sdk": "0.3.326",
"@anthropic-ai/sdk": "^0.104.2",
"@getpaseo/client": "0.17.0-beta.1",
"@getpaseo/highlight": "0.17.0-beta.1",
"@getpaseo/plugin": "0.17.0-beta.1",
"@getpaseo/protocol": "0.17.0-beta.1",
"@getpaseo/relay": "0.17.0-beta.1",
"@getpaseo/client": "0.17.0",
"@getpaseo/highlight": "0.17.0",
"@getpaseo/plugin": "0.17.0",
"@getpaseo/protocol": "0.17.0",
"@getpaseo/relay": "0.17.0",
"@isaacs/ttlcache": "^2.1.4",
"@modelcontextprotocol/sdk": "1.29.0",
"@opencode-ai/sdk": "1.14.46",
+44 -3
View File
@@ -1,5 +1,6 @@
import { spawn } from "node:child_process";
import { fileURLToPath } from "url";
import { concurrently } from "concurrently";
import dotenv from "dotenv";
dotenv.config({
@@ -9,7 +10,27 @@ dotenv.config({
const daemonRunnerEntry = fileURLToPath(new URL("./supervisor-entrypoint.ts", import.meta.url));
const supervisorArgs = [...process.execArgv, daemonRunnerEntry, "--dev", ...process.argv.slice(2)];
const args = process.argv.slice(2);
// concurrently signals entire command trees, including detached descendants.
// Give it the dependency watchers. The daemon supervisor owns worker shutdown.
const watchers = args.includes("--watch-dependencies")
? concurrently(
[
{ command: "npm run watch:protocol", name: "protocol", prefixColor: "yellow" },
{ command: "npm run watch:client", name: "client", prefixColor: "blue" },
],
{
cwd: fileURLToPath(new URL("../../../", import.meta.url)),
killOthersOn: ["success", "failure"],
},
)
: null;
const supervisorArgs = [
...process.execArgv,
daemonRunnerEntry,
"--dev",
...args.filter((arg) => arg !== "--watch-dependencies"),
];
const supervisor = spawn(process.execPath, supervisorArgs, {
stdio: "inherit",
@@ -23,13 +44,32 @@ function exitCodeForSignal(signal: NodeJS.Signals): number {
return signal === "SIGINT" ? 130 : 1;
}
let stopping = false;
let lostWatchers = false;
function forwardSignal(signal: NodeJS.Signals): void {
if (supervisor.exitCode !== null || supervisor.signalCode !== null || supervisor.killed) {
return;
}
stopping = true;
supervisor.kill(signal);
}
const watchersStopped = watchers?.result.catch(() => undefined);
function handleWatchersStopped(): void {
if (stopping || supervisor.exitCode !== null || supervisor.signalCode !== null) return;
lostWatchers = true;
forwardSignal("SIGTERM");
}
void watchersStopped?.then(handleWatchersStopped);
async function finish(exitCode: number): Promise<void> {
stopping = true;
watchers?.commands.forEach((watcher) => watcher.kill());
await watchersStopped;
process.exit(lostWatchers ? 1 : exitCode);
}
// The supervisor handles SIGINT/SIGTERM itself and needs time to drain the
// worker gracefully. Keep this wrapper alive until the supervisor exits so npm
// does not release the shell while the daemon is still logging final shutdown.
@@ -37,9 +77,10 @@ process.on("SIGINT", () => forwardSignal("SIGINT"));
process.on("SIGTERM", () => forwardSignal("SIGTERM"));
supervisor.on("error", (error) => {
throw error;
process.stderr.write(`Failed to start daemon supervisor: ${error.message}\n`);
void finish(1);
});
supervisor.on("exit", (code, signal) => {
process.exit(code ?? (signal ? exitCodeForSignal(signal) : 1));
void finish(code ?? (signal ? exitCodeForSignal(signal) : 1));
});
+5
View File
@@ -316,14 +316,19 @@ export function runSupervisor(options: SupervisorOptions): SupervisorController
}
const spawnSpec = resolveWorkerSpawnSpec?.(workerEntry) ?? null;
// The supervisor receives terminal signals and orders shutdown over IPC.
// Providers must stay alive until the worker has captured restart recovery.
const detached = process.platform !== "win32";
writeLifecycleLog("Spawning worker", { workerEntry });
if (spawnSpec) {
child = spawn(spawnSpec.command, spawnSpec.args, {
detached,
stdio: ["inherit", "pipe", "pipe", "ipc"],
env: spawnSpec.env ?? workerEnv,
});
} else {
child = fork(workerEntry, workerArgs, {
detached,
stdio: ["inherit", "pipe", "pipe", "ipc"],
env: workerEnv,
execArgv: workerExecArgv,
@@ -9542,76 +9542,6 @@ test("onAgentAttention is not called for delegated child agents", async () => {
expect(attentionCalls).toEqual([]);
});
test.each(["read", "unread"])(
"waits for a delegated agent before reporting a finish (earlier attention is %s)",
async (attentionState) => {
const workdir = mkdtempSync(join(tmpdir(), "agent-manager-delegated-finish-"));
const config = { provider: "codex", cwd: workdir } as const;
const client = new SessionRecordingAgentClient();
const finishes: Array<{ agentId: string; attentionTimestamp: Date | null }> = [];
const manager = new AgentManager({
clients: { codex: client },
registry: new AgentStorage(join(workdir, "agents"), logger),
logger,
onAgentAttention: ({ agentId, reason, attentionTimestamp }) => {
if (reason === "finished") finishes.push({ agentId, attentionTimestamp });
},
});
const parent = await manager.createAgent(config, undefined, { workspaceId: undefined });
const child = await manager.createAgent(config, undefined, {
labels: { [PARENT_AGENT_ID_LABEL]: parent.id },
workspaceId: undefined,
});
onTestFinished(async () => {
await manager.closeAgent(child.id);
await manager.closeAgent(parent.id);
await manager.flush();
rmSync(workdir, { recursive: true, force: true });
});
const [parentSession, childSession] = client.sessions;
async function completeParentTurn(turnId: string) {
const running = waitForAgentLifecycle(manager, parent.id, "running");
parentSession.pushEvent({ type: "turn_started", provider: "codex", turnId });
await running;
const idle = waitForAgentLifecycle(manager, parent.id, "idle");
parentSession.pushEvent({ type: "turn_completed", provider: "codex", turnId });
await idle;
}
if (attentionState === "unread") {
await completeParentTurn("earlier-parent-finish");
}
const earlierFinishes = [...finishes];
const earlierAttention = manager.getAgent(parent.id)?.attention;
const childRunning = waitForAgentLifecycle(manager, child.id, "running");
const childTurn = { provider: "codex", turnId: "child-turn" } as const;
childSession.pushEvent({ ...childTurn, type: "turn_started" });
await childRunning;
await completeParentTurn("parent-handles-child-update");
expect(finishes).toEqual(earlierFinishes);
expect(manager.getAgent(parent.id)?.attention).toEqual(earlierAttention);
const childIdle = waitForAgentLifecycle(manager, child.id, "idle");
childSession.pushEvent({ ...childTurn, type: "turn_completed" });
await childIdle;
await completeParentTurn("parent-handles-child-finish");
expect(finishes).toEqual([
...earlierFinishes,
{
agentId: parent.id,
attentionTimestamp: earlierFinishes[0]?.attentionTimestamp ?? expect.any(Date),
},
]);
expect(manager.getAgent(parent.id)?.attention).toMatchObject({
requiresAttention: true,
attentionReason: "finished",
});
},
);
test("clearAgentAttention on errored agent stays cleared until a new error transition", async () => {
const workdir = mkdtempSync(join(tmpdir(), "agent-manager-attention-error-"));
const storagePath = join(workdir, "agents");
@@ -5920,10 +5920,7 @@ export class AgentManager {
return;
}
const finished =
previousStatus === "running" &&
currentStatus === "idle" &&
(isDelegatedAgent(agent) || !this.hasBusyChildAgent(agent.id));
const finished = previousStatus === "running" && currentStatus === "idle";
if (agent.attention.requiresAttention) {
// The unread finish stays the same; the notifier knows whether the user was told about it.
if (finished && agent.attention.attentionReason === "finished") {
@@ -5942,15 +5939,6 @@ export class AgentManager {
}
}
private hasBusyChildAgent(agentId: string): boolean {
for (const child of this.agents.values()) {
if (isAgentBusy(child.lifecycle) && getParentAgentIdFromLabels(child.labels) === agentId) {
return true;
}
}
return false;
}
// The failed state is only shown while error attention is unread, so every new failure raises
// it, including one that keeps the lifecycle at "error". An error outranks an unread finish,
// which would otherwise make the failure look green.
@@ -160,7 +160,7 @@ const INBOUND_PERMISSION = {
"project.github.clone.request": "workspace.manage",
"project.icon.get.request": "workspace.read",
"project.icon.set.request": "workspace.manage",
"project.list.request": "workspace.read",
"project.list.request": ["workspace.read", "hub.execute"],
"project.suggestions.request": "workspace.read",
"project.remove.request": "workspace.manage",
"project.rename.request": "workspace.manage",
@@ -419,7 +419,7 @@ const OUTBOUND_PERMISSION = {
"project.github.clone.response": "workspace.manage",
"project.icon.get.response": "workspace.read",
"project.icon.set.response": "workspace.manage",
"project.list.response": "workspace.read",
"project.list.response": ["workspace.read", "hub.execute"],
"project.suggestions.response": "workspace.read",
"project.remove.response": "workspace.manage",
"project.rename.response": "workspace.manage",
@@ -2,7 +2,6 @@ import { mkdtemp, rm, writeFile } from "node:fs/promises";
import { join } from "node:path";
import { tmpdir } from "node:os";
import { expect, test } from "vitest";
import { createWatcherLivenessCanary } from "../watcher-liveness-canary.js";
import type { FileChange } from "./index.js";
import { createNativeRecursiveBackend } from "./internal/native-recursive.js";
import { createObserverPaths } from "./internal/paths.js";
@@ -10,7 +9,6 @@ import { createObserverPaths } from "./internal/paths.js";
test("the recursive watcher remembers newly announced files before reconciliation", async () => {
const root = await mkdtemp(join(tmpdir(), "paseo-observer-native-"));
const paths = createObserverPaths(process.platform);
const canary = createWatcherLivenessCanary(root);
const changes: FileChange[] = [];
let active = true;
const backend = createNativeRecursiveBackend(
@@ -36,7 +34,7 @@ test("the recursive watcher remembers newly announced files before reconciliatio
isIgnored: () => false,
isPathInside: paths.isInside,
queueEvent: (type, path) => {
changes.push(...canary.filterEvents([{ type, path }]));
changes.push({ type, path });
},
fail: (error) => {
throw error;
@@ -46,9 +44,6 @@ test("the recursive watcher remembers newly announced files before reconciliatio
);
try {
await backend.start();
await canary.verify();
// Reconcile the removed probe before counting the files announced by the test.
await backend.updateIgnore();
const path = join(root, "new.txt");
await writeFile(path, "created");
await expect
@@ -62,6 +62,37 @@ test("Hub execute can steer ordinary agents while unrelated administration stays
expect(hub.serverInfoPermissions()).toEqual([["hub.execute"]]);
});
test("Hub execute can list daemon projects but cannot rename them", async () => {
const hub = await launchRelationship();
await hub.createSiblingWorkspace(hub.repoRoot());
expect(hub.serverInfoPermissions()).toEqual([["hub.execute"]]);
const listed = await hub.requestOrdinary({
type: "project.list.request",
requestId: "list-projects",
});
expect(listed).toMatchObject({
type: "project.list.response",
payload: {
requestId: "list-projects",
projects: [{ projectId: expect.any(String), projectRootPath: hub.repoRoot() }],
},
});
if (listed.type !== "project.list.response") throw new Error("Expected project list response");
expect(
await hub.requestOrdinary({
type: "project.rename.request",
requestId: "rename-project",
projectId: listed.payload.projects[0]?.projectId,
customName: "Hub rename",
}),
).toMatchObject({
type: "rpc_error",
payload: { requestId: "rename-project", code: "access_denied" },
});
});
test("Hub execute can title the workspace created with an agent", async () => {
const hub = await launchRelationship();
const created = await hub.requestOrdinary({
+1 -1
View File
@@ -1,6 +1,6 @@
{
"name": "@getpaseo/website",
"version": "0.17.0-beta.1",
"version": "0.17.0",
"private": true,
"type": "module",
"scripts": {
@@ -252,6 +252,225 @@ it.each([true, false])(
},
);
const completedToolCalls = [
{
toolCallId: "shell",
name: "run_command",
kind: "execute",
rawInput: {
CommandLine: "printf test; exit 7",
WaitMsBeforeAsync: 5000,
toolSummary: "Run exit code test",
},
rawOutput: { output: "Command exited with code 7.\n\nCommand output:\ntest", exit_code: 7 },
},
{
toolCallId: "read",
name: "read_file",
kind: "read",
locations: [{ path: "/repo/probe.txt" }],
rawInput: { Path: "/repo/probe.txt", StartLine: 2, EndLine: 2 },
},
{
toolCallId: "write",
name: "write_file",
kind: "edit",
locations: [{ path: "/repo/probe.txt" }],
rawInput: { Path: "/repo/probe.txt", Content: "alpha\nbeta\ngamma\n", Overwrite: true },
rawOutput: {},
content: [{ type: "diff", path: "/repo/probe.txt", newText: "alpha\nbeta\ngamma\n" }],
},
{
toolCallId: "edit",
name: "edit_file",
kind: "edit",
locations: [{ path: "/repo/probe.txt" }],
rawInput: { Path: "/repo/probe.txt", Target: "beta", Replacement: "delta" },
rawOutput: {},
content: [
{
type: "diff",
path: "/repo/probe.txt",
oldText: "alpha\nbeta\ngamma\n",
newText: "alpha\ndelta\ngamma\n",
},
],
},
{
toolCallId: "web",
name: "search_web",
kind: "search",
rawInput: { query: "IANA example domains" },
},
{
toolCallId: "paseo",
name: "mcp_paseo_send_agent_prompt",
kind: "other",
rawInput: { agentId: "agent-1", prompt: "Hello", toolSummary: "Send message" },
},
{
toolCallId: "mcp",
name: "mcp_local_tools_echo_message",
kind: "other",
rawInput: { message: "hello", toolSummary: "Echo message hello" },
},
{
toolCallId: "ambiguous",
name: "mcp_paseo_get_agent_status",
kind: "other",
rawInput: { agentId: "agent-1", toolSummary: "Get agent status" },
},
];
it.each(["live", "replay"] as const)(
"maps Antigravity tool calls in %s timelines",
async (source) => {
const { directory, launch } = await launchAgent(`
const { createInterface } = require("node:readline");
const send = (message) => process.stdout.write(JSON.stringify({ jsonrpc: "2.0", ...message }) + "\\n");
const tools = ${JSON.stringify(completedToolCalls)};
const modes = { currentModeId: "default", availableModes: [{ id: "default", name: "Default" }] };
createInterface({ input: process.stdin }).on("line", (line) => {
const { id, method, params } = JSON.parse(line);
const update = (update) => send({ method: "session/update", params: { sessionId: params.sessionId ?? "agy-session", update } });
switch (method) {
case "initialize":
send({ id, result: { protocolVersion: 1, agentCapabilities: { loadSession: true } } });
break;
case "session/new":
send({ id, result: { sessionId: "agy-session", modes } });
update({ sessionUpdate: "available_commands_update", availableCommands: [] });
break;
case "session/load":
case "session/prompt":
for (const { rawOutput, content, ...tool } of tools) {
const completed = { status: "completed", rawOutput, content };
if (method === "session/load") {
update({ sessionUpdate: "tool_call", title: tool.name, ...tool, ...completed });
} else {
update({ sessionUpdate: "tool_call", title: tool.name, ...tool, status: "in_progress" });
update({ sessionUpdate: "tool_call_update", toolCallId: tool.toolCallId, ...completed });
}
}
send({ id, result: method === "session/load" ? { modes } : { stopReason: "end_turn" } });
break;
case "session/close":
send({ id, result: {} });
break;
}
});
`);
const connection = await createAntigravityProvider().connect({
launch,
versions: [1],
capabilities: ["session.persistence", "prompt.message"],
});
const events: ProviderEvent[] = [];
connection.onEvent((event) => events.push(event));
try {
await connection.send({
type: "session.open",
requestId: "open",
sessionId: "test",
history: source === "replay" ? "replay" : "skip",
persistence:
source === "replay" ? { version: 1, data: { sessionId: "agy-session" } } : undefined,
config: {
cwd: directory,
env: {},
mcpServers: {
paseo_get: { type: "stdio", command: "other-server" },
local_tools: { type: "stdio", command: "echo-mcp" },
},
settings: {},
persist: true,
},
});
await expect
.poll(
() =>
events.find(
(event) => event.type === "session.ready" || event.type === "request.failed",
),
{ timeout: 4_000 },
)
.toMatchObject({ type: "session.ready" });
if (source === "live") {
await connection.send({
type: "session.prompt",
sessionId: "test",
prompt: {
clientMessageId: "exercise-tools",
delivery: "auto",
input: { type: "message", content: [{ type: "text", text: "Exercise tools" }] },
},
});
}
const calls = () =>
events.flatMap((event) =>
event.type === "timeline.item" && event.item.type === "tool_call" ? [event.item] : [],
);
await expect
.poll(() => calls().filter((call) => call.status === "completed").length)
.toBe(completedToolCalls.length);
const completed = Object.fromEntries(calls().map((call) => [call.id, call]));
expect(completed.shell.detail).toEqual({
type: "shell",
command: "printf test; exit 7",
output: "Command exited with code 7.\n\nCommand output:\ntest",
exitCode: 7,
});
expect(completed.read.detail).toEqual({
type: "read",
filePath: "/repo/probe.txt",
offset: 2,
limit: 1,
});
expect(completed.write.detail).toEqual({
type: "write",
filePath: "/repo/probe.txt",
content: "alpha\nbeta\ngamma\n",
});
expect(completed.edit.detail).toEqual({
type: "edit",
filePath: "/repo/probe.txt",
oldString: "alpha\nbeta\ngamma\n",
newString: "alpha\ndelta\ngamma\n",
});
expect(completed.web.detail).toEqual({
type: "search",
toolName: "web_search",
query: "IANA example domains",
});
expect(completed.paseo).toMatchObject({
name: "paseo.send_agent_prompt",
detail: { type: "unknown", input: { agentId: "agent-1", prompt: "Hello" }, output: null },
});
expect(completed.paseo.detail).not.toHaveProperty("input.toolSummary");
expect(completed.mcp).toMatchObject({
name: "local_tools.echo_message",
detail: { type: "unknown", input: { message: "hello" }, output: null },
});
expect(completed.mcp.detail).not.toHaveProperty("input.toolSummary");
expect(completed.ambiguous).toMatchObject({
name: "mcp_paseo_get_agent_status",
detail: { type: "unknown", input: { agentId: "agent-1" }, output: null },
});
if (source === "live") {
expect(calls()).toContainEqual(
expect.objectContaining({
id: "shell",
status: "running",
detail: { type: "shell", command: "printf test; exit 7" },
}),
);
}
} finally {
await connection.close();
}
},
);
describe("installation", () => {
const signal = new AbortController().signal;
@@ -6,6 +6,7 @@ import {
type ProviderRegistration,
} from "@getpaseo/plugin/server/provider";
import { z } from "zod";
import { mapToolCall } from "./tool-calls.js";
const legacySession = z.object({
version: z.literal(1),
@@ -15,8 +16,6 @@ const systemPromptCapability = z.object({
antigravity: z.object({ systemPrompt: z.object({ append: z.literal(true) }) }),
});
const fileWrite = z.object({ Path: z.string(), Content: z.string().optional() });
// agy 1.5.13 advertises these built-in commands and its invocable skills in one ACP list.
const builtInCommands = new Set([
"goal",
@@ -34,21 +33,7 @@ const antigravity: AcpTransformer = {
command(command) {
return { ...command, kind: builtInCommands.has(command.name) ? "command" : "skill" };
},
toolCall(call) {
if (call.name === "write_file") {
const input = fileWrite.safeParse(call.input);
if (input.success) {
return {
...call,
detail: { type: "write", filePath: input.data.Path, content: input.data.Content },
};
}
}
if (call.kind === "read" && call.locations[0]) {
return { ...call, detail: { type: "read", filePath: call.locations[0] } };
}
return call;
},
toolCall: mapToolCall,
sessionOpen({ persistence, systemPrompt, agentMetadata }) {
// COMPAT(antigravityStreamJson): added in v0.16.2, remove after 2027-11-19.
const saved = legacySession.safeParse(persistence);
@@ -0,0 +1,86 @@
import type { AcpToolCallSnapshot, AcpTransformer } from "@getpaseo/plugin/server/acp";
import type { ProviderToolCallDetail } from "@getpaseo/plugin/server/provider";
import { z } from "zod";
const shellInput = z.object({ CommandLine: z.string() });
const shellOutput = z.object({
output: z.string().optional(),
exit_code: z.number().nullable().optional(),
});
const fileRead = z.object({
Path: z.string().optional(),
StartLine: z.int().positive().optional(),
EndLine: z.int().positive().optional(),
});
const fileWrite = z.object({ Path: z.string(), Content: z.string().optional() });
const webSearch = z.object({ query: z.string() });
export const mapToolCall: NonNullable<AcpTransformer["toolCall"]> = (call, context) => {
if (call.name?.startsWith("mcp_")) {
return mapMcpCall(call, call.name, context.mcpServerNames ?? []);
}
const detail = mapNativeDetail(call);
return detail ? { ...call, detail } : call;
};
function mapNativeDetail(call: AcpToolCallSnapshot): ProviderToolCallDetail | undefined {
switch (call.name) {
case "run_command": {
const input = shellInput.safeParse(call.input).data;
if (!input) break;
const output = shellOutput.safeParse(call.output).data;
return {
type: "shell",
command: input.CommandLine,
output: output?.output,
exitCode: output?.exit_code,
};
}
case "write_file": {
const input = fileWrite.safeParse(call.input).data;
if (input) return { type: "write", filePath: input.Path, content: input.Content };
break;
}
case "search_web": {
const input = webSearch.safeParse(call.input).data;
if (input) return { type: "search", toolName: "web_search", query: input.query };
break;
}
}
if (call.kind !== "read") return undefined;
const input = fileRead.safeParse(call.input).data;
const filePath = call.locations[0] ?? input?.Path;
if (!filePath) return undefined;
const { StartLine: offset, EndLine: end } = input ?? {};
return {
type: "read",
filePath,
offset,
limit:
offset !== undefined && end !== undefined && end >= offset ? end - offset + 1 : undefined,
};
}
function mapMcpCall(
call: AcpToolCallSnapshot,
wireName: string,
serverNames: readonly string[],
): AcpToolCallSnapshot {
const qualifiedName = wireName.slice("mcp_".length);
// The wire uses the same separator inside names and between the server and tool.
// Paseo's own server can also appear when replaying with MCP disabled.
const matchingServers = [...new Set([...serverNames, "paseo"])].filter((name) =>
qualifiedName.startsWith(`${name}_`),
);
const server = matchingServers.length === 1 ? matchingServers[0] : undefined;
let input = call.input;
if (typeof input === "object" && input !== null && !Array.isArray(input)) {
const { toolSummary: _summary, ...args } = input;
input = args;
}
return {
...call,
name: server ? `${server}.${qualifiedName.slice(server.length + 1)}` : wireName,
detail: { type: "unknown", input, output: call.output },
};
}
+1 -1
View File
@@ -1,6 +1,6 @@
{
"name": "@getpaseo/builtin-plugins",
"version": "0.17.0-beta.1",
"version": "0.17.0",
"private": true,
"type": "module",
"scripts": {
+4
View File
@@ -438,6 +438,10 @@ hooks for vendor behavior. See [Adapt an ACP agent](/docs/plugins/providers#adap
In `discover` and `configure`, call `context.request(method, params)` to send an ACP extension
request. The promise returns a JSON value or rejects with the agent's JSON-RPC error.
In `toolCall`, use `context.mcpServerNames` to recognize servers that Paseo supplied when it opened
the ACP session. Include an empty-list fallback for older SDK versions or servers configured
directly in the agent.
Use `config(state, context)` to return the configuration snapshot that Paseo displays.
Paseo calls this synchronous hook for initial, notification, and committed configuration snapshots.
Use `configure` to send changes to the agent.
+3
View File
@@ -368,6 +368,9 @@ Paseo 刷新 Agent 的方式是关闭它当前的 Provider 会话,再用当前
在 `discover` 和 `configure` 中,调用 `context.request(method, params)` 发送 ACP 扩展请求。
Promise 返回 JSON 值,或以 Agent 的 JSON-RPC 错误拒绝。
在 `toolCall` 中,通过 `context.mcpServerNames` 识别 Paseo 打开 ACP 会话时提供的服务器。
兼容旧版 SDK 或处理直接在 agent 中配置的服务器时,可以回退到空列表。
使用 `config(state, context)` 返回 Paseo 显示的配置快照。
Paseo 在会话就绪、收到配置通知或提交配置更改时调用此同步钩子。
使用 `configure` 向 Agent 发送更改。