Compare commits

...
17 Commits
Author SHA1 Message Date
paseo-bot[bot] c37a407bc8 fix(claude): remove the terminal shortcut from Stop hook warnings (#11792)
The chat warning told users to open the Claude Code transcript with Ctrl+O. In Paseo on Linux, that shortcut opens Add project. Remove the terminal hint at the Claude notification boundary.

Co-authored-by: paseo-bot[bot] <266920839+paseo-bot[bot]@users.noreply.github.com>
2026-12-02 21:12:50 +00:00
paseo-bot[bot] ef8de256ce fix(app): release replaced plugin installations (#11800)
The current plugin’s RPC closure kept the previous catalog alive after a reload. Create each plugin installation outside the catalog update scope so the previous installation can be collected.

Co-authored-by: paseo-bot[bot] <266920839+paseo-bot[bot]@users.noreply.github.com>
2026-12-02 20:13:31 +00:00
KiritoXD 68a1cd9a33 fix(cli): resolve terminal workspaces beyond the first ten (#11799) 2026-12-02 20:13:09 +00:00
d4d8441f06 Preserve a follow-up draft while an earlier send settles (#11448)
* Preserve a follow-up draft while an earlier send settles

* Guard composer submission with the shared draft version

* Cover attachments added from Changes during a pending send

---------

Co-authored-by: Shane Su <26364206+suniceman@users.noreply.github.com>
Co-authored-by: paseo-bot[bot] <266920839+paseo-bot[bot]@users.noreply.github.com>
2026-12-02 20:12:48 +00:00
515392cd7b fix(app): mount a web popover's content once per open (#11748)
* fix(app): mount a web popover's content once per open

An anchored menu surface renders off-screen until its anchor and content
are measured, then changed its key from "measuring" to "placed". The key
change remounted the surface and everything inside it, so a plugin
popover's Content mounted, unmounted and mounted again on every open:
effects and requests ran twice and the first mount's state was lost.

Web plays its entering animation through the Web Animations API when the
surface is placed, so the remount did nothing there. The key now stays
stable on web. Native still remounts, because Reanimated's `entering`
only runs on mount.

Fixes #9103

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* docs(menus): only native remounts an anchored surface on placement

Web keeps the surface mounted and starts its entering animation when it is
placed, so a popover's content mounts once per open.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* ci: retrigger checks for the popover fix

* Wait for the desktop device menu before clicking a preset

---------

Co-authored-by: Tom Gringauz <17593920+tomgrin10@users.noreply.github.com>
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
Co-authored-by: paseo-bot[bot] <266920839+paseo-bot[bot]@users.noreply.github.com>
2026-12-02 19:12:50 +00:00
paseo-bot[bot] 230037c03b test(app): keep the plugin-buttons still check polling when the subject remounts (#11801)
expectStill polled locator.screenshot() inside expect.poll. A screenshot of an
element that detaches while Playwright waits for it to be stable throws, and
expect.poll does not retry a callback that throws, so one remount of the
Workspace actions toolbar failed the test at once. Treat a detached subject as
not still yet and keep polling.

Co-authored-by: paseo-bot[bot] <266920839+paseo-bot[bot]@users.noreply.github.com>
2026-12-02 18:50:01 +00:00
paseo-bot[bot] 0d9e960d10 fix(app): open outside folder links without trailing slashes (#11786)
Absolute Markdown paths skipped the directory probe and sent existing folders to the file viewer. Use the same host path as file preview so the directory check stays outside the workspace Files listing.

Co-authored-by: paseo-bot[bot] <266920839+paseo-bot[bot]@users.noreply.github.com>
2026-12-02 17:12:55 +00:00
paseo-bot[bot]andClaude Opus 5.5 8d7676a5af Fix flaky OSC 11 query test that echoed the reply onto the capture line (#11773)
The capture script wrote the OSC 11 query before it put stdin in raw
mode. When the daemon's reply arrived first, the tty was still in
cooked mode with echo on, so it printed the reply as `^[]11;rgb:...`
on the same line as the capture. The test then counted two replies.
Put stdin in raw mode before the query, as a real program does.

Co-authored-by: paseo-bot[bot] <266920839+paseo-bot[bot]@users.noreply.github.com>
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
2026-12-02 15:48:03 +00:00
Mohamed Boudra 56a88882d8 Stop completed agent turns from flashing back to running (#11764)
* fix(server,app): stop completed turns from flashing back to running

Session forwarded agent_state asynchronously through AgentUpdatesService while sending agent_stream synchronously. When a provider emitted usage_updated right before turn_completed (as ACP providers do on every prompt response carrying usage), agent_stream turn_completed overtook the queued running agent_update on the wire, and a slow workspace_update stretched the gap before the idle agent_update landed. On the client, TurnLiveness forgot the closed turnId on stream_close, so the lagging running snapshot re-opened the turn for a few frames.

Keep workspace broadcasts off the per-agent agent_update queue, serialize an agent's outbound agent_stream events behind any in-flight agent_update for that agent (staying synchronous when none is queued), and remember closed turn IDs in TurnLiveness so lagging snapshots from older daemons or concurrent fetches cannot re-open a finished turn.

* refactor(server): sequence agent_update and agent_stream on one per-agent queue

Replace the separate Session.agentStreamTails queue and pendingAgentUpdate() bridge with AgentUpdatesService.runAfterUpdates() so interleaved agent_update and agent_stream frames share a single per-agent FIFO queue while staying synchronous when nothing is queued.

* fix(app): preserve closedTurnId across idle snapshots and directory catch-up

An empty AgentDirectoryReplica.commitChanges() re-projects unchanged idle agents as activeTurn: null, which previously cleared closedTurnId and let a later lagging running snapshot re-open the finished turn. Keep closedTurnId on idle TurnLiveness until a newer turn opens or destructive_close resets liveness.
2026-12-02 22:29:27 +07:00
paseo-bot[bot]andodoo-mvds 2929e99147 Refresh the Scripts menu after external paseo.json edits (#11768)
* fix(server): refresh workspace scripts when paseo.json changes

Directory workspaces had no observer at all, and Git workspaces only
picked up a new paseo.json when the edit also changed their Git
snapshot. A connected app therefore kept a stale Scripts menu after
paseo.json was edited outside Paseo.

The workspace observer now watches paseo.json for every observed
workspace, Git or not, through the existing single-file observer, and
refreshes the workspace cards for that directory on change. Workspaces
sharing a directory share one watch.

Co-authored-by: odoo-mvds <odoo@applix.be>

* Keep pending file changes visible to existing subscribers

---------

Co-authored-by: odoo-mvds <odoo@applix.be>
Co-authored-by: paseo-bot[bot] <266920839+paseo-bot[bot]@users.noreply.github.com>
2026-12-02 15:12:56 +00:00
Mohamed Boudra f9529add94 Open the reconcile PR during release preparation (#11758)
* Open the reconcile PR during release preparation

reconcile-release gains --ref so it can read the release branch before any
tag exists. The release docs open the unmerged reconcile PR right after the
release branch push, so its CI overlaps with the branch checks, and merge it
at Ship alongside npm publication.

* Check the reconcile PR against the tag before merging at Ship
2026-12-02 22:00:11 +07:00
paseo-ai[bot] 6eb595f556 fix: update lockfile signatures and Nix hash [skip ci] 2026-12-02 14:28:23 +00:00
Mohamed Boudra d8c29bbc85 chore(release): reconcile v0.19.0-beta.1 (#11757) 2026-12-02 21:17:42 +07:00
7b8be44ac7 fix(app): inset the tool call details empty state (#9129)
* fix(app): inset the tool call details empty state

The details sheet renders full-bleed sections that carry their own insets, so the
empty-state line had none and started at the screen edge while the section content
above it was inset.

Give the empty state the same box as the loading skeleton it replaces.

Closes #9128

* test(app): cover tool call details empty state inset

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>

---------

Co-authored-by: Mohamed Boudra <boudra.moha@gmail.com>
Co-authored-by: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-12-02 20:39:11 +07:00
Omer Cohen 64ab894ff3 feat(plugin): expose provider icons to client UI (#4664)
Export ProviderIcon and PluginProviderIconProps from @getpaseo/plugin/client/ui (with type re-export on @getpaseo/plugin/client), default hostId to the enclosing plugin installation host while supporting explicit hostId overrides, hydrate host provider snapshots before installing client contributions, and add SDK boundary, unit, and Playwright E2E coverage.
2026-12-02 20:18:41 +07:00
paseo-bot[bot] 423178804f Keep OpenCode reply paragraphs from running together (#11745)
* fix(opencode): keep reply paragraphs separate across text parts

OpenCode can put multiple text parts in one assistant message. Preserve their paragraph boundary when Paseo joins the streamed chunks or replays history.

* refactor(opencode): name timeline text arguments

---------

Co-authored-by: paseo-bot[bot] <266920839+paseo-bot[bot]@users.noreply.github.com>
2026-12-02 13:12:52 +00:00
KiritoXD 5f3396fec0 Reject malformed label filters in agent listings (#11707) 2026-12-02 12:42:43 +00:00
82 changed files with 2316 additions and 376 deletions
+144
View File
@@ -1,5 +1,149 @@
# Changelog
## 0.19.0-beta.1 - 2026-12-02
- **Switch providers mid-chat:** Switch a chat to another provider and keep the conversation, with chat history now stored on the host. ([#11410](https://github.com/getpaseo/paseo/pull/11410))
- **Queue survives restarts:** Queued messages now live on the host, so they survive app reloads, device switches and daemon restarts. ([#11424](https://github.com/getpaseo/paseo/pull/11424), [#11566](https://github.com/getpaseo/paseo/pull/11566), [#11740](https://github.com/getpaseo/paseo/pull/11740))
- **One switch for agent tools:** Agent tools now sit behind one Enable tools setting with orchestration, schedules, PR watching and browser groups, and are on by default. ([#11189](https://github.com/getpaseo/paseo/pull/11189))
- **Connected devices list:** Settings → Devices now shows which clients and hosts are connected and what each one can access. ([#11209](https://github.com/getpaseo/paseo/pull/11209))
- **Plugin scorecards:** Plugin pages in the app and on paseo.sh show a scorecard, update history, related plugins and sponsor links. ([#11563](https://github.com/getpaseo/paseo/pull/11563), [#11674](https://github.com/getpaseo/paseo/pull/11674), [#11691](https://github.com/getpaseo/paseo/pull/11691))
- **Share services through tunnels:** Share a running workspace service at a public URL from the Scripts menu, and dev servers keep their live-reload connections. Services now open at `localhost:<port>`, and `*.localhost` service URLs are removed. ([#11490](https://github.com/getpaseo/paseo/pull/11490))
- **Lower CPU while agents run:** Running agents use far less CPU, GPU and battery, with lighter status rings, loaders and tool-call animations. ([#11456](https://github.com/getpaseo/paseo/pull/11456), [#11474](https://github.com/getpaseo/paseo/pull/11474), [#11564](https://github.com/getpaseo/paseo/pull/11564), [#11586](https://github.com/getpaseo/paseo/pull/11586), [#11591](https://github.com/getpaseo/paseo/pull/11591) by [@djbclark](https://github.com/djbclark), [@luoph](https://github.com/luoph), [@mariotaku](https://github.com/mariotaku))
- **Steadier streaming replies:** Streaming replies show their final formatting as they arrive, and long replies no longer get slower to render as they grow. ([#11572](https://github.com/getpaseo/paseo/pull/11572), [#11582](https://github.com/getpaseo/paseo/pull/11582) by [@luoph](https://github.com/luoph))
- **Faster mobile launch:** The mobile app shows your last workspace sooner after a cold launch, about 0.7 seconds on Android. ([#11390](https://github.com/getpaseo/paseo/pull/11390) by [@luoph](https://github.com/luoph), [@maci0](https://github.com/maci0))
- **Desktop browser profiles:** Desktop browser tabs can use separate colored profiles, so you can stay signed in to two accounts on one site. ([#10357](https://github.com/getpaseo/paseo/pull/10357) by [@clkao](https://github.com/clkao))
- **Swipe away the iOS keyboard:** Drag the chat down to hide the iOS keyboard, and chat controls now work on the first tap while it is open. ([#11625](https://github.com/getpaseo/paseo/pull/11625))
### Breaking
- Paseo CLI and daemon now require Node.js 22.16.0 or later ([#11410](https://github.com/getpaseo/paseo/pull/11410))
### Added
- Added Antigravity quota to Usage, refreshed only when you select Refresh ([#11585](https://github.com/getpaseo/paseo/pull/11585))
- Added conversation-only rewind for OpenCode v2 agents ([#11675](https://github.com/getpaseo/paseo/pull/11675))
- Added desktop browser tabs for workspaces on hosts connected through another host ([#11561](https://github.com/getpaseo/paseo/pull/11561))
- Added `paseo hub run` to start Hub manual triggers from the terminal ([#11408](https://github.com/getpaseo/paseo/pull/11408))
- Added Claude Enterprise monthly spend to the Usage card and sidebar summary ([#11514](https://github.com/getpaseo/paseo/pull/11514) by [@vivekkalyan](https://github.com/vivekkalyan))
- Added Spend credits amounts for Codex individual spend limits ([#11702](https://github.com/getpaseo/paseo/pull/11702) by [@vivekkalyan](https://github.com/vivekkalyan))
### Improved
- Opened chats faster by skipping Markdown preparation for replies without workspace links ([#11327](https://github.com/getpaseo/paseo/pull/11327))
- Reduced work on each workspace switch by updating Git actions only for the visible workspace ([#11332](https://github.com/getpaseo/paseo/pull/11332))
- Stopped the sidebar re-rendering on agent updates that change only token usage ([#11565](https://github.com/getpaseo/paseo/pull/11565) by [@jl97mcad](https://github.com/jl97mcad))
- Released hidden workspace composers after ten minutes during repeated workspace switches ([#11613](https://github.com/getpaseo/paseo/pull/11613) by [@js2me](https://github.com/js2me))
- Kept typing responsive in long multiline drafts ([#11418](https://github.com/getpaseo/paseo/pull/11418))
- Served the desktop app's web UI with Brotli and gzip compression instead of an uncompressed 25 MB bundle ([#10635](https://github.com/getpaseo/paseo/pull/10635) by [@djbclark](https://github.com/djbclark))
- Changed chat loading to one steady spinner that reveals the chat and composer together, without an Updating messages flash ([#11575](https://github.com/getpaseo/paseo/pull/11575))
- Kept the Restoring screen up until a restored workspace is ready ([#11486](https://github.com/getpaseo/paseo/pull/11486))
- Showed a spinner on a worktree row while archive checks for uncommitted changes ([#11519](https://github.com/getpaseo/paseo/pull/11519), [#11574](https://github.com/getpaseo/paseo/pull/11574) by [@cxroop](https://github.com/cxroop))
- Showed each host's icon with a status dot on host selectors ([#11568](https://github.com/getpaseo/paseo/pull/11568))
- Sent the prompt with hardware-keyboard Return on iPhone, as on iPad ([#11537](https://github.com/getpaseo/paseo/pull/11537))
- Replaced the Direct connection Advanced field with a Form and URI switch, so a pasted `tcp://` URI connects in one tap ([#11402](https://github.com/getpaseo/paseo/pull/11402) by [@thecardcheat](https://github.com/thecardcheat))
### Changed
- Changed archiving to keep a worktree that has uncommitted changes unless you confirm removal ([#11430](https://github.com/getpaseo/paseo/pull/11430))
- Changed closing a New Agent tab with an unsent draft to ask before discarding it ([#11660](https://github.com/getpaseo/paseo/pull/11660))
- Changed Cmd/Ctrl+click on a sidebar workspace to open it instead of entering select mode ([#11472](https://github.com/getpaseo/paseo/pull/11472))
- Changed agents that already reported to their caller with `send_agent_prompt` to skip the extra finished notice ([#11583](https://github.com/getpaseo/paseo/pull/11583))
### Fixed
- Fixed an attached image over 2000 px breaking every later turn in its chat ([#5119](https://github.com/getpaseo/paseo/pull/5119) by [@RUIIIOVO](https://github.com/RUIIIOVO))
- Fixed voice mode agents never speaking back when Paseo tools were off ([#11161](https://github.com/getpaseo/paseo/pull/11161))
- Fixed turning off voice mode without a daemon connection leaving the microphone on ([#11587](https://github.com/getpaseo/paseo/pull/11587) by [@luoph](https://github.com/luoph), [@RRD-dev](https://github.com/RRD-dev))
- Fixed the app taking up to a minute to reconnect after returning from the background ([#10348](https://github.com/getpaseo/paseo/pull/10348) by [@dongsun1](https://github.com/dongsun1))
- Fixed one failed WebSocket handshake doubling the reconnect delay ([#11428](https://github.com/getpaseo/paseo/pull/11428) by [@suniceman](https://github.com/suniceman))
- Fixed chats staying on Reconnecting after the app switched to a faster connection ([#11029](https://github.com/getpaseo/paseo/pull/11029) by [@tmhaha](https://github.com/tmhaha))
- Fixed Updating messages staying visible after reopening a cached chat ([#11464](https://github.com/getpaseo/paseo/pull/11464) by [@oyzh888](https://github.com/oyzh888))
- Fixed terminal output stopping after a reconnect reused its subscription ([#10433](https://github.com/getpaseo/paseo/pull/10433) by [@chirag127](https://github.com/chirag127))
- Fixed Files showing Host is not connected when the app launched before the host connected ([#11679](https://github.com/getpaseo/paseo/pull/11679))
- Fixed Created and Last prompt sorting disappearing while a host is offline ([#11728](https://github.com/getpaseo/paseo/pull/11728))
- Fixed iOS header taps scrolling the chat, Explorer or workspace list to the top ([#11262](https://github.com/getpaseo/paseo/pull/11262) by [@yzim](https://github.com/yzim))
- Fixed a file sheet dismissed while opening leaving an invisible backdrop that blocked taps ([#11317](https://github.com/getpaseo/paseo/pull/11317) by [@LiebeLee](https://github.com/LiebeLee))
- Fixed bottom sheets staying open when dismissed before their open animation started ([#11632](https://github.com/getpaseo/paseo/pull/11632))
- Fixed Android attaching nothing when the app was recreated during image selection ([#7734](https://github.com/getpaseo/paseo/pull/7734))
- Fixed pasting a file into the web composer inserting its path instead of attaching it ([#11718](https://github.com/getpaseo/paseo/pull/11718))
- Fixed Content font size not applying to existing user messages in web chat ([#11469](https://github.com/getpaseo/paseo/pull/11469) by [@bearyjd](https://github.com/bearyjd))
- Fixed `<br>` in a Markdown table cell splitting the table row ([#9587](https://github.com/getpaseo/paseo/pull/9587) by [@apple-ouyang](https://github.com/apple-ouyang))
- Fixed hidden chat rows shifting the reading position on web ([#11538](https://github.com/getpaseo/paseo/pull/11538) by [@kogekiplay](https://github.com/kogekiplay))
- Fixed a plugin slash command with an attachment being sent to the agent as a message ([#11483](https://github.com/getpaseo/paseo/pull/11483) by [@suniceman](https://github.com/suniceman))
- Fixed Archive finished subagents skipping closed subagents ([#10865](https://github.com/getpaseo/paseo/pull/10865) by [@sbhas2k](https://github.com/sbhas2k))
- Fixed Import Session missing the newest ACP sessions ([#10675](https://github.com/getpaseo/paseo/pull/10675))
- Fixed Import Session hiding the provider error while Retry runs ([#11654](https://github.com/getpaseo/paseo/pull/11654))
- Fixed setup dropping project suggestions from providers that answer after 60 seconds ([#11438](https://github.com/getpaseo/paseo/pull/11438) by [@suniceman](https://github.com/suniceman))
- Fixed Open in file manager showing for workspaces on remote hosts ([#11463](https://github.com/getpaseo/paseo/pull/11463) by [@sleroq](https://github.com/sleroq))
- Fixed Reveal in Finder for workspaces rooted at `/` ([#11206](https://github.com/getpaseo/paseo/pull/11206) by [@suniceman](https://github.com/suniceman))
- Fixed large HTML files previewing as a blank pane on desktop ([#11504](https://github.com/getpaseo/paseo/pull/11504))
- Fixed the Paseo RPM failing to install alongside other Electron RPMs ([#11354](https://github.com/getpaseo/paseo/pull/11354))
- Fixed Restart and close terminals leaving terminal programs running on Windows ([#11398](https://github.com/getpaseo/paseo/pull/11398))
- Fixed agent creation hanging behind provider checks for deleted worktrees ([#11646](https://github.com/getpaseo/paseo/pull/11646) by [@ralston](https://github.com/ralston))
- Fixed finished Claude subagents showing as running or canceled after reopening a chat or restarting the daemon ([#10848](https://github.com/getpaseo/paseo/pull/10848), [#11594](https://github.com/getpaseo/paseo/pull/11594), [#11602](https://github.com/getpaseo/paseo/pull/11602) by [@monarchmaisuriya](https://github.com/monarchmaisuriya), [@desmond-rai](https://github.com/desmond-rai))
- Fixed Claude agents started by Paseo missing Claude Code's chat titles ([#11057](https://github.com/getpaseo/paseo/pull/11057) by [@Zayooo00](https://github.com/Zayooo00))
- Fixed turns Claude starts on its own staying hidden in reopened chats until Reload ([#11405](https://github.com/getpaseo/paseo/pull/11405))
- Fixed Claude Code system notices being dropped from the chat ([#11419](https://github.com/getpaseo/paseo/pull/11419) by [@minamorl](https://github.com/minamorl))
- Fixed Claude Code's Goal set reply missing from imported chats ([#11733](https://github.com/getpaseo/paseo/pull/11733))
- Fixed listing commands in an archived Claude chat starting Claude Code ([#11521](https://github.com/getpaseo/paseo/pull/11521) by [@RawSalmon69](https://github.com/RawSalmon69))
- Fixed Stop failing on unresponsive Pi and OMP agents ([#11618](https://github.com/getpaseo/paseo/pull/11618) by [@LouisDeconinck](https://github.com/LouisDeconinck))
- Fixed Pi turns never finishing when an extension handles the prompt ([#10572](https://github.com/getpaseo/paseo/pull/10572) by [@jsilhan](https://github.com/jsilhan))
- Fixed Pi prompts timing out during extension preflight and then running anyway ([#11525](https://github.com/getpaseo/paseo/pull/11525) by [@Stelath](https://github.com/Stelath))
- Fixed Pi showing the prompt twice when an extension sends context before the reply ([#11533](https://github.com/getpaseo/paseo/pull/11533) by [@Stelath](https://github.com/Stelath))
- Fixed Pi chats skipping project skills and settings in trusted workspaces ([#11527](https://github.com/getpaseo/paseo/pull/11527) by [@patrick-motard](https://github.com/patrick-motard))
- Fixed new Pi agents failing with an old extension error after the conflict was fixed ([#11642](https://github.com/getpaseo/paseo/pull/11642))
- Fixed the OMP Fast toggle missing before the first prompt ([#11553](https://github.com/getpaseo/paseo/pull/11553))
- Fixed finished OMP form questions losing the question and chosen answer ([#11697](https://github.com/getpaseo/paseo/pull/11697), [#11706](https://github.com/getpaseo/paseo/pull/11706) by [@luoph](https://github.com/luoph), [@RRD-dev](https://github.com/RRD-dev))
- Fixed Codex sends reporting failure after 60 seconds while Codex was still starting ([#11547](https://github.com/getpaseo/paseo/pull/11547) by [@nonononull](https://github.com/nonononull))
- Fixed Codex features staying hidden behind a wrapper command such as `env codex` ([#11221](https://github.com/getpaseo/paseo/pull/11221) by [@suniceman](https://github.com/suniceman))
- Fixed answers to Codex async questions being rejected ([#11225](https://github.com/getpaseo/paseo/pull/11225) by [@suniceman](https://github.com/suniceman))
- Fixed reopening a Codex chat resetting its last-activity time ([#10760](https://github.com/getpaseo/paseo/pull/10760) by [@Juns-g](https://github.com/Juns-g))
- Fixed Antigravity subagent tool calls splitting streamed replies mid-word ([#11535](https://github.com/getpaseo/paseo/pull/11535) by [@Suhail](https://github.com/Suhail))
- Fixed Antigravity turns ending as completed after an internal executor error ([#10885](https://github.com/getpaseo/paseo/pull/10885) by [@vecyang1](https://github.com/vecyang1), [@luoph](https://github.com/luoph))
- Fixed ACP chats failing to reopen when the provider rejects the saved thinking level ([#10333](https://github.com/getpaseo/paseo/pull/10333))
- Fixed the ACP thinking picker keeping the old level after a mode change ([#11478](https://github.com/getpaseo/paseo/pull/11478) by [@suniceman](https://github.com/suniceman))
- Fixed ACP setting errors leaving out the provider's explanation ([#11431](https://github.com/getpaseo/paseo/pull/11431) by [@suniceman](https://github.com/suniceman))
- Fixed Muse usage losing token totals after a context update ([#11389](https://github.com/getpaseo/paseo/pull/11389) by [@suniceman](https://github.com/suniceman))
- Fixed the Claude Usage card staying rate limited for hours ([#11597](https://github.com/getpaseo/paseo/pull/11597))
- Fixed Claude Usage showing the old plan after a subscription change ([#11685](https://github.com/getpaseo/paseo/pull/11685) by [@matchy233](https://github.com/matchy233))
- Fixed Codex Usage showing 0 credits for accounts without a credit balance ([#11515](https://github.com/getpaseo/paseo/pull/11515) by [@vivekkalyan](https://github.com/vivekkalyan))
- Fixed Copilot Usage failing when the premium request quota is exceeded ([#11006](https://github.com/getpaseo/paseo/pull/11006) by [@nathanmcnulty](https://github.com/nathanmcnulty))
- Fixed Copilot Usage reading the token of another host or account from GitHub CLI ([#11689](https://github.com/getpaseo/paseo/pull/11689))
- Fixed Create PR from a fork opening the pull request on the fork instead of its parent ([#11436](https://github.com/getpaseo/paseo/pull/11436) by [@suniceman](https://github.com/suniceman))
- Fixed a fork pull request disappearing from its worktree workspace after the first push ([#11441](https://github.com/getpaseo/paseo/pull/11441) by [@suniceman](https://github.com/suniceman))
- Fixed Create PR returning the API URL instead of the pull request page ([#11439](https://github.com/getpaseo/paseo/pull/11439) by [@suniceman](https://github.com/suniceman))
- Fixed GitHub check details failing to load annotations ([#11476](https://github.com/getpaseo/paseo/pull/11476) by [@suniceman](https://github.com/suniceman))
- Fixed GitHub check details dropping annotations when a job log is unavailable ([#11509](https://github.com/getpaseo/paseo/pull/11509))
- Fixed Gitea and Forgejo draft pull requests showing as open and conflicting ([#11545](https://github.com/getpaseo/paseo/pull/11545) by [@goodideal](https://github.com/goodideal))
- Fixed workspaces with an IPv6 Git remote not detecting their Gitea or Forgejo forge ([#11692](https://github.com/getpaseo/paseo/pull/11692) by [@jamescordrey-ops](https://github.com/jamescordrey-ops))
- Fixed workspace refreshes stalling when a `gh` or `glab` command ignores its timeout ([#11252](https://github.com/getpaseo/paseo/pull/11252), [#11411](https://github.com/getpaseo/paseo/pull/11411))
- Fixed scheduled runs in a Paseo worktree creating a duplicate project ([#10378](https://github.com/getpaseo/paseo/pull/10378) by [@kotusenka](https://github.com/kotusenka))
- Fixed archiving an agent failing with Unknown agent while another archive or close runs ([#10590](https://github.com/getpaseo/paseo/pull/10590) by [@apple-ouyang](https://github.com/apple-ouyang))
- Fixed an agent's last reply being cut off when a notification arrived mid-reply ([#11578](https://github.com/getpaseo/paseo/pull/11578) by [@KiritoXDone](https://github.com/KiritoXDone))
- Fixed a queued message running in the mode of a prompt sent after it ([#11722](https://github.com/getpaseo/paseo/pull/11722))
- Fixed `paseo ls --json` dropping timestamps and background work ([#11423](https://github.com/getpaseo/paseo/pull/11423) by [@KiritoXDone](https://github.com/KiritoXDone))
- Fixed `paseo inspect` and `paseo ls` hiding the model for Cursor Auto ([#11693](https://github.com/getpaseo/paseo/pull/11693))
- Fixed `paseo workspace ls` reporting a wrong password as a stopped daemon ([#11676](https://github.com/getpaseo/paseo/pull/11676) by [@chirag127](https://github.com/chirag127))
- Fixed `paseo daemon status` leaving out unconfirmed terminal cleanup ([#11658](https://github.com/getpaseo/paseo/pull/11658) by [@chirag127](https://github.com/chirag127))
- Fixed CLI archive, detach and reload scanning all agent history for a full agent ID ([#11617](https://github.com/getpaseo/paseo/pull/11617) by [@maci0](https://github.com/maci0))
### Security
- Blocked client file access to the daemon's own state in the Paseo home directory, and warned when a saved host's daemon key changes ([#11452](https://github.com/getpaseo/paseo/pull/11452))
- Restricted loopback origin matching to `localhost`, `127.0.0.1` and `::1` for daemon WebSocket and HTTP requests ([#11686](https://github.com/getpaseo/paseo/pull/11686))
- Stopped images in pull request comments and reviews from loading files from the host ([#11699](https://github.com/getpaseo/paseo/pull/11699))
- Stopped `.worktreeinclude` from copying local files into worktrees from fork pull requests ([#11709](https://github.com/getpaseo/paseo/pull/11709))
- Rejected schedule IDs that point outside the schedules directory ([#11727](https://github.com/getpaseo/paseo/pull/11727))
### Plugins
- Added a workspace layout API so plugins can open, move and close panes and tabs ([#11328](https://github.com/getpaseo/paseo/pull/11328))
- Added `requirements.app` to set a separate minimum app version from the daemon's ([#11494](https://github.com/getpaseo/paseo/pull/11494) by [@mcowger](https://github.com/mcowger))
- Fixed a plugin error in a press handler or timer closing the iOS and Android app ([#11412](https://github.com/getpaseo/paseo/pull/11412))
- Fixed plugin operations deleting plugin entries added to `config.json` by hand ([#11501](https://github.com/getpaseo/paseo/pull/11501) by [@matchy233](https://github.com/matchy233))
- Fixed registry plugin installs failing with Missing npm artifact when npm leaves registry URLs out of lockfiles ([#11656](https://github.com/getpaseo/paseo/pull/11656) by [@Brandon168](https://github.com/Brandon168))
- Fixed local plugin reloads taking 12 to 21 seconds when the daemon runs under a large directory ([#11653](https://github.com/getpaseo/paseo/pull/11653))
## 0.18.2 - 2026-11-30
- **Redesigned model picker:** Pick models from a two-pane desktop view with cross-provider search, an in-place phone drawer with a thinking slider, and per-provider model lists in settings. ([#11186](https://github.com/getpaseo/paseo/pull/11186), [#11280](https://github.com/getpaseo/paseo/pull/11280), [#11295](https://github.com/getpaseo/paseo/pull/11295), [#11371](https://github.com/getpaseo/paseo/pull/11371), [#11313](https://github.com/getpaseo/paseo/pull/11313))
+144
View File
@@ -1,5 +1,149 @@
# Changelog
## 0.19.0-beta.1 - 2026-12-02
- **对话中切换 Provider**:可将对话切换到其他 Provider 并保留对话内容,对话记录现在存储在主机上。([#11410](https://github.com/getpaseo/paseo/pull/11410))
- **排队消息重启不丢失**:排队消息现在保存在主机上,应用重新加载、切换设备或 daemon 重启后都不会丢失。([#11424](https://github.com/getpaseo/paseo/pull/11424), [#11566](https://github.com/getpaseo/paseo/pull/11566), [#11740](https://github.com/getpaseo/paseo/pull/11740))
- **一键开关 Agent 工具**:Agent 工具现在由一个 **启用工具** 设置统一控制,包含编排、定时任务、PR 监控和浏览器分组,并默认开启。([#11189](https://github.com/getpaseo/paseo/pull/11189))
- **已连接设备列表**:**设置 → 设备** 现在会显示哪些客户端和主机已连接,以及各自可以访问的内容。([#11209](https://github.com/getpaseo/paseo/pull/11209))
- **插件评分卡**:应用和 paseo.sh 上的插件页面现在会显示评分卡、更新历史、相关插件和赞助链接。([#11563](https://github.com/getpaseo/paseo/pull/11563), [#11674](https://github.com/getpaseo/paseo/pull/11674), [#11691](https://github.com/getpaseo/paseo/pull/11691))
- **通过隧道共享服务**:可从 Scripts 菜单将正在运行的工作区服务共享到公网地址,开发服务器也会保留实时重载连接。服务现在通过 `localhost:<port>` 打开,`*.localhost` 服务地址已移除。([#11490](https://github.com/getpaseo/paseo/pull/11490))
- **Agent 运行时更省资源**:运行中的 Agent 占用的 CPU、GPU 和电量大幅减少,状态环、加载指示器和工具调用动画也更轻量。([#11456](https://github.com/getpaseo/paseo/pull/11456), [#11474](https://github.com/getpaseo/paseo/pull/11474), [#11564](https://github.com/getpaseo/paseo/pull/11564), [#11586](https://github.com/getpaseo/paseo/pull/11586), [#11591](https://github.com/getpaseo/paseo/pull/11591),贡献者:[@djbclark](https://github.com/djbclark), [@luoph](https://github.com/luoph), [@mariotaku](https://github.com/mariotaku))
- **更稳定的流式回复**:流式回复在到达时即显示最终格式,长回复的渲染也不再随长度增长而变慢。([#11572](https://github.com/getpaseo/paseo/pull/11572), [#11582](https://github.com/getpaseo/paseo/pull/11582),贡献者:[@luoph](https://github.com/luoph))
- **更快的移动端启动**:移动端冷启动后会更快显示上次的工作区,在 Android 上约快 0.7 秒。([#11390](https://github.com/getpaseo/paseo/pull/11390),贡献者:[@luoph](https://github.com/luoph), [@maci0](https://github.com/maci0))
- **桌面端浏览器配置文件**:桌面端浏览器标签页可以使用不同颜色的独立配置文件,便于在同一网站上同时登录两个账号。([#10357](https://github.com/getpaseo/paseo/pull/10357),贡献者:[@clkao](https://github.com/clkao))
- **下滑收起 iOS 键盘**:向下拖动对话即可收起 iOS 键盘,键盘打开时对话控件首次点击即可生效。([#11625](https://github.com/getpaseo/paseo/pull/11625))
### 破坏性变更
- Paseo CLI 和 daemon 现在需要 Node.js 22.16.0 或更高版本 ([#11410](https://github.com/getpaseo/paseo/pull/11410))
### 新增
- 在用量中新增 Antigravity 配额,仅在选择 **刷新** 时更新 ([#11585](https://github.com/getpaseo/paseo/pull/11585))
- 为 OpenCode v2 Agent 新增仅回退对话的功能 ([#11675](https://github.com/getpaseo/paseo/pull/11675))
- 为通过其他主机连接的主机上的工作区新增桌面端浏览器标签页 ([#11561](https://github.com/getpaseo/paseo/pull/11561))
- 新增 `paseo hub run`,可从终端启动 Hub 手动触发器 ([#11408](https://github.com/getpaseo/paseo/pull/11408))
- 在用量卡片和侧边栏摘要中新增 Claude Enterprise 月度支出 ([#11514](https://github.com/getpaseo/paseo/pull/11514),贡献者:[@vivekkalyan](https://github.com/vivekkalyan))
- 为 Codex 个人支出限额新增 Spend credits 金额显示 ([#11702](https://github.com/getpaseo/paseo/pull/11702),贡献者:[@vivekkalyan](https://github.com/vivekkalyan))
### 改进
- 对不含工作区链接的回复跳过 Markdown 预处理,加快对话打开速度 ([#11327](https://github.com/getpaseo/paseo/pull/11327))
- 仅为可见工作区更新 Git 操作,减少每次切换工作区的开销 ([#11332](https://github.com/getpaseo/paseo/pull/11332))
- 仅改变 token 用量的 Agent 更新不再触发侧边栏重新渲染 ([#11565](https://github.com/getpaseo/paseo/pull/11565),贡献者:[@jl97mcad](https://github.com/jl97mcad))
- 反复切换工作区时,隐藏的工作区 Composer 会在十分钟后释放 ([#11613](https://github.com/getpaseo/paseo/pull/11613),贡献者:[@js2me](https://github.com/js2me))
- 在较长的多行草稿中保持输入流畅 ([#11418](https://github.com/getpaseo/paseo/pull/11418))
- 桌面应用的网页界面改用 Brotli 和 gzip 压缩传输,不再发送未压缩的 25 MB 包 ([#10635](https://github.com/getpaseo/paseo/pull/10635),贡献者:[@djbclark](https://github.com/djbclark))
- 对话加载改为显示一个稳定的加载指示器,并同时显示对话和 Composer,不再闪现 **正在更新消息** ([#11575](https://github.com/getpaseo/paseo/pull/11575))
- 恢复工作区时保持 Restoring 界面,直到工作区就绪 ([#11486](https://github.com/getpaseo/paseo/pull/11486))
- 归档检查未提交的更改时,在 worktree 行上显示加载指示器 ([#11519](https://github.com/getpaseo/paseo/pull/11519), [#11574](https://github.com/getpaseo/paseo/pull/11574),贡献者:[@cxroop](https://github.com/cxroop))
- 在主机选择器上显示各主机的图标和状态圆点 ([#11568](https://github.com/getpaseo/paseo/pull/11568))
- iPhone 上按硬件键盘的 Return 键即可发送提示词,与 iPad 一致 ([#11537](https://github.com/getpaseo/paseo/pull/11537))
- 将 **直接连接** 的 Advanced 字段替换为 **表单** 与 URI 切换,粘贴 `tcp://` URI 后一次点击即可连接 ([#11402](https://github.com/getpaseo/paseo/pull/11402),贡献者:[@thecardcheat](https://github.com/thecardcheat))
### 变更
- 归档时如果 worktree 有未提交的更改,除非确认删除,否则保留该 worktree ([#11430](https://github.com/getpaseo/paseo/pull/11430))
- 关闭带有未发送草稿的 **新建 Agent** 标签页时,会先询问是否丢弃草稿 ([#11660](https://github.com/getpaseo/paseo/pull/11660))
- 在侧边栏中 Cmd/Ctrl+点击工作区改为打开该工作区,而不再进入选择模式 ([#11472](https://github.com/getpaseo/paseo/pull/11472))
- 已通过 `send_agent_prompt` 向调用方汇报的 Agent 不再额外发送完成通知 ([#11583](https://github.com/getpaseo/paseo/pull/11583))
### 修复
- 修复附加超过 2000 px 的图片后,该对话之后的每一轮都失败的问题 ([#5119](https://github.com/getpaseo/paseo/pull/5119),贡献者:[@RUIIIOVO](https://github.com/RUIIIOVO))
- 修复关闭 Paseo 工具时语音模式 Agent 始终不回话的问题 ([#11161](https://github.com/getpaseo/paseo/pull/11161))
- 修复在没有 daemon 连接时关闭语音模式后麦克风仍保持开启的问题 ([#11587](https://github.com/getpaseo/paseo/pull/11587),贡献者:[@luoph](https://github.com/luoph), [@RRD-dev](https://github.com/RRD-dev))
- 修复应用从后台返回后需要长达一分钟才能重新连接的问题 ([#10348](https://github.com/getpaseo/paseo/pull/10348),贡献者:[@dongsun1](https://github.com/dongsun1))
- 修复一次 WebSocket 握手失败就使重连延迟翻倍的问题 ([#11428](https://github.com/getpaseo/paseo/pull/11428),贡献者:[@suniceman](https://github.com/suniceman))
- 修复应用切换到更快的连接后,对话仍停留在 **正在重新连接** 的问题 ([#11029](https://github.com/getpaseo/paseo/pull/11029),贡献者:[@tmhaha](https://github.com/tmhaha))
- 修复重新打开已缓存的对话后 **正在更新消息** 一直显示的问题 ([#11464](https://github.com/getpaseo/paseo/pull/11464),贡献者:[@oyzh888](https://github.com/oyzh888))
- 修复重连复用订阅后终端输出停止的问题 ([#10433](https://github.com/getpaseo/paseo/pull/10433),贡献者:[@chirag127](https://github.com/chirag127))
- 修复应用在主机连接前启动时 **文件** 显示 **Host 未连接** 的问题 ([#11679](https://github.com/getpaseo/paseo/pull/11679))
- 修复主机离线时 **创建时间** 和 **最近提示词** 排序选项消失的问题 ([#11728](https://github.com/getpaseo/paseo/pull/11728))
- 修复在 iOS 上点击标题栏会将对话、Explorer 或工作区列表滚动到顶部的问题 ([#11262](https://github.com/getpaseo/paseo/pull/11262),贡献者:[@yzim](https://github.com/yzim))
- 修复文件面板在打开过程中被关闭后,留下阻挡点击的不可见遮罩的问题 ([#11317](https://github.com/getpaseo/paseo/pull/11317),贡献者:[@LiebeLee](https://github.com/LiebeLee))
- 修复底部面板在打开动画开始前被关闭后仍保持打开的问题 ([#11632](https://github.com/getpaseo/paseo/pull/11632))
- 修复 Android 在选择图片期间重建应用后未附加任何内容的问题 ([#7734](https://github.com/getpaseo/paseo/pull/7734))
- 修复在网页版 Composer 中粘贴文件时插入文件路径而不是添加附件的问题 ([#11718](https://github.com/getpaseo/paseo/pull/11718))
- 修复 **内容字体大小** 未应用到网页端对话中已有用户消息的问题 ([#11469](https://github.com/getpaseo/paseo/pull/11469),贡献者:[@bearyjd](https://github.com/bearyjd))
- 修复 Markdown 表格单元格中的 `<br>` 拆分表格行的问题 ([#9587](https://github.com/getpaseo/paseo/pull/9587),贡献者:[@apple-ouyang](https://github.com/apple-ouyang))
- 修复网页端隐藏的对话行导致阅读位置偏移的问题 ([#11538](https://github.com/getpaseo/paseo/pull/11538),贡献者:[@kogekiplay](https://github.com/kogekiplay))
- 修复带附件的插件斜杠命令被当作消息发送给 Agent 的问题 ([#11483](https://github.com/getpaseo/paseo/pull/11483),贡献者:[@suniceman](https://github.com/suniceman))
- 修复 **归档已完成的 subagent** 跳过已关闭子 Agent 的问题 ([#10865](https://github.com/getpaseo/paseo/pull/10865),贡献者:[@sbhas2k](https://github.com/sbhas2k))
- 修复 **导入会话** 遗漏最新 ACP 会话的问题 ([#10675](https://github.com/getpaseo/paseo/pull/10675))
- 修复 **导入会话** 在 **重试** 期间隐藏 Provider 错误的问题 ([#11654](https://github.com/getpaseo/paseo/pull/11654))
- 修复设置时丢弃 60 秒后才响应的 Provider 所给出的项目建议的问题 ([#11438](https://github.com/getpaseo/paseo/pull/11438),贡献者:[@suniceman](https://github.com/suniceman))
- 修复远程主机上的工作区显示 Open in file manager 的问题 ([#11463](https://github.com/getpaseo/paseo/pull/11463),贡献者:[@sleroq](https://github.com/sleroq))
- 修复根目录为 `/` 的工作区无法使用 Reveal in Finder 的问题 ([#11206](https://github.com/getpaseo/paseo/pull/11206),贡献者:[@suniceman](https://github.com/suniceman))
- 修复桌面端预览大型 HTML 文件时显示空白面板的问题 ([#11504](https://github.com/getpaseo/paseo/pull/11504))
- 修复 Paseo RPM 无法与其他 Electron RPM 同时安装的问题 ([#11354](https://github.com/getpaseo/paseo/pull/11354))
- 修复 Windows 上 Restart and close 终端后终端程序仍在运行的问题 ([#11398](https://github.com/getpaseo/paseo/pull/11398))
- 修复已删除 worktree 的 Provider 检查导致 Agent 创建卡住的问题 ([#11646](https://github.com/getpaseo/paseo/pull/11646),贡献者:[@ralston](https://github.com/ralston))
- 修复重新打开对话或重启 daemon 后,已完成的 Claude 子 Agent 显示为运行中或已取消的问题 ([#10848](https://github.com/getpaseo/paseo/pull/10848), [#11594](https://github.com/getpaseo/paseo/pull/11594), [#11602](https://github.com/getpaseo/paseo/pull/11602),贡献者:[@monarchmaisuriya](https://github.com/monarchmaisuriya), [@desmond-rai](https://github.com/desmond-rai))
- 修复由 Paseo 启动的 Claude Agent 缺少 Claude Code 对话标题的问题 ([#11057](https://github.com/getpaseo/paseo/pull/11057),贡献者:[@Zayooo00](https://github.com/Zayooo00))
- 修复 Claude 自行开始的轮次在重新打开的对话中被隐藏、直到 **重新加载** 才显示的问题 ([#11405](https://github.com/getpaseo/paseo/pull/11405))
- 修复 Claude Code 系统通知从对话中丢失的问题 ([#11419](https://github.com/getpaseo/paseo/pull/11419),贡献者:[@minamorl](https://github.com/minamorl))
- 修复导入的 Claude Code 对话中缺少 Goal set 回复的问题 ([#11733](https://github.com/getpaseo/paseo/pull/11733))
- 修复在已归档的 Claude 对话中列出命令时启动 Claude Code 的问题 ([#11521](https://github.com/getpaseo/paseo/pull/11521),贡献者:[@RawSalmon69](https://github.com/RawSalmon69))
- 修复 **停止** 对无响应的 Pi 和 OMP Agent 无效的问题 ([#11618](https://github.com/getpaseo/paseo/pull/11618),贡献者:[@LouisDeconinck](https://github.com/LouisDeconinck))
- 修复扩展处理提示词时 Pi 轮次永远无法结束的问题 ([#10572](https://github.com/getpaseo/paseo/pull/10572),贡献者:[@jsilhan](https://github.com/jsilhan))
- 修复 Pi 提示词在扩展预检期间超时后仍继续执行的问题 ([#11525](https://github.com/getpaseo/paseo/pull/11525),贡献者:[@Stelath](https://github.com/Stelath))
- 修复扩展在回复前发送上下文时 Pi 重复显示提示词的问题 ([#11533](https://github.com/getpaseo/paseo/pull/11533),贡献者:[@Stelath](https://github.com/Stelath))
- 修复在受信任的工作区中 Pi 对话跳过项目技能和设置的问题 ([#11527](https://github.com/getpaseo/paseo/pull/11527),贡献者:[@patrick-motard](https://github.com/patrick-motard))
- 修复冲突解决后新建 Pi Agent 仍报旧扩展错误的问题 ([#11642](https://github.com/getpaseo/paseo/pull/11642))
- 修复首次发送提示词前缺少 OMP **快速** 开关的问题 ([#11553](https://github.com/getpaseo/paseo/pull/11553))
- 修复已完成的 OMP 表单提问不再显示提问内容和所选答案的问题 ([#11697](https://github.com/getpaseo/paseo/pull/11697), [#11706](https://github.com/getpaseo/paseo/pull/11706),贡献者:[@luoph](https://github.com/luoph), [@RRD-dev](https://github.com/RRD-dev))
- 修复 Codex 仍在启动时发送消息于 60 秒后报告失败的问题 ([#11547](https://github.com/getpaseo/paseo/pull/11547),贡献者:[@nonononull](https://github.com/nonononull))
- 修复通过 `env codex` 等包装命令启动时 Codex 功能被隐藏的问题 ([#11221](https://github.com/getpaseo/paseo/pull/11221),贡献者:[@suniceman](https://github.com/suniceman))
- 修复 Codex 异步提问的回答被拒绝的问题 ([#11225](https://github.com/getpaseo/paseo/pull/11225),贡献者:[@suniceman](https://github.com/suniceman))
- 修复重新打开 Codex 对话时重置其最近活动时间的问题 ([#10760](https://github.com/getpaseo/paseo/pull/10760),贡献者:[@Juns-g](https://github.com/Juns-g))
- 修复 Antigravity 子 Agent 工具调用将流式回复从单词中间截断的问题 ([#11535](https://github.com/getpaseo/paseo/pull/11535),贡献者:[@Suhail](https://github.com/Suhail))
- 修复 Antigravity 轮次在内部执行器出错后仍以完成状态结束的问题 ([#10885](https://github.com/getpaseo/paseo/pull/10885),贡献者:[@vecyang1](https://github.com/vecyang1), [@luoph](https://github.com/luoph))
- 修复 Provider 拒绝已保存的思考强度时 ACP 对话无法重新打开的问题 ([#10333](https://github.com/getpaseo/paseo/pull/10333))
- 修复切换模式后 ACP 思考强度选择器仍保留旧级别的问题 ([#11478](https://github.com/getpaseo/paseo/pull/11478),贡献者:[@suniceman](https://github.com/suniceman))
- 修复 ACP 设置错误中缺少 Provider 说明的问题 ([#11431](https://github.com/getpaseo/paseo/pull/11431),贡献者:[@suniceman](https://github.com/suniceman))
- 修复上下文更新后 Muse 用量丢失 token 总数的问题 ([#11389](https://github.com/getpaseo/paseo/pull/11389),贡献者:[@suniceman](https://github.com/suniceman))
- 修复 Claude 用量卡片持续数小时显示受速率限制的问题 ([#11597](https://github.com/getpaseo/paseo/pull/11597))
- 修复订阅变更后 Claude 用量仍显示旧套餐的问题 ([#11685](https://github.com/getpaseo/paseo/pull/11685),贡献者:[@matchy233](https://github.com/matchy233))
- 修复没有额度余额的账号 Codex 用量显示 0 额度的问题 ([#11515](https://github.com/getpaseo/paseo/pull/11515),贡献者:[@vivekkalyan](https://github.com/vivekkalyan))
- 修复超出高级请求配额时 Copilot 用量获取失败的问题 ([#11006](https://github.com/getpaseo/paseo/pull/11006),贡献者:[@nathanmcnulty](https://github.com/nathanmcnulty))
- 修复 Copilot 用量从 GitHub CLI 读取其他 GitHub 主机或账号 token 的问题 ([#11689](https://github.com/getpaseo/paseo/pull/11689))
- 修复从 fork 执行 **创建 PR** 时将 PR 创建在 fork 而非其上游仓库的问题 ([#11436](https://github.com/getpaseo/paseo/pull/11436),贡献者:[@suniceman](https://github.com/suniceman))
- 修复 fork PR 在首次推送后从其 worktree 工作区中消失的问题 ([#11441](https://github.com/getpaseo/paseo/pull/11441),贡献者:[@suniceman](https://github.com/suniceman))
- 修复 **创建 PR** 返回 API 地址而非 PR 页面的问题 ([#11439](https://github.com/getpaseo/paseo/pull/11439),贡献者:[@suniceman](https://github.com/suniceman))
- 修复 GitHub 检查详情无法加载注释的问题 ([#11476](https://github.com/getpaseo/paseo/pull/11476),贡献者:[@suniceman](https://github.com/suniceman))
- 修复作业日志不可用时 GitHub 检查详情丢失注释的问题 ([#11509](https://github.com/getpaseo/paseo/pull/11509))
- 修复 Gitea 和 Forgejo 的草稿 PR 显示为已打开且存在冲突的问题 ([#11545](https://github.com/getpaseo/paseo/pull/11545),贡献者:[@goodideal](https://github.com/goodideal))
- 修复 Git 远程地址为 IPv6 的工作区无法识别其 Gitea 或 Forgejo forge 的问题 ([#11692](https://github.com/getpaseo/paseo/pull/11692),贡献者:[@jamescordrey-ops](https://github.com/jamescordrey-ops))
- 修复 `gh` 或 `glab` 命令忽略超时导致工作区刷新卡住的问题 ([#11252](https://github.com/getpaseo/paseo/pull/11252), [#11411](https://github.com/getpaseo/paseo/pull/11411))
- 修复在 Paseo worktree 中运行定时任务时创建重复项目的问题 ([#10378](https://github.com/getpaseo/paseo/pull/10378),贡献者:[@kotusenka](https://github.com/kotusenka))
- 修复在其他归档或关闭操作进行时归档 Agent 报 Unknown agent 错误的问题 ([#10590](https://github.com/getpaseo/paseo/pull/10590),贡献者:[@apple-ouyang](https://github.com/apple-ouyang))
- 修复 Agent 回复过程中收到通知导致最后一条回复被截断的问题 ([#11578](https://github.com/getpaseo/paseo/pull/11578),贡献者:[@KiritoXDone](https://github.com/KiritoXDone))
- 修复排队消息以之后发送的提示词的模式运行的问题 ([#11722](https://github.com/getpaseo/paseo/pull/11722))
- 修复 `paseo ls --json` 丢失时间戳和后台任务的问题 ([#11423](https://github.com/getpaseo/paseo/pull/11423),贡献者:[@KiritoXDone](https://github.com/KiritoXDone))
- 修复 `paseo inspect` 和 `paseo ls` 隐藏 Cursor Auto 模型的问题 ([#11693](https://github.com/getpaseo/paseo/pull/11693))
- 修复 `paseo workspace ls` 将密码错误报告为 daemon 已停止的问题 ([#11676](https://github.com/getpaseo/paseo/pull/11676),贡献者:[@chirag127](https://github.com/chirag127))
- 修复 `paseo daemon status` 遗漏未确认的终端清理的问题 ([#11658](https://github.com/getpaseo/paseo/pull/11658),贡献者:[@chirag127](https://github.com/chirag127))
- 修复 CLI 归档、分离和重新加载时为匹配完整 Agent ID 而扫描全部 Agent 历史记录的问题 ([#11617](https://github.com/getpaseo/paseo/pull/11617),贡献者:[@maci0](https://github.com/maci0))
### 安全
- 阻止客户端访问 Paseo 主目录中 daemon 自身的状态文件,并在已保存主机的 daemon 密钥变化时发出警告 ([#11452](https://github.com/getpaseo/paseo/pull/11452))
- 将 daemon WebSocket 和 HTTP 请求的回环来源匹配限制为 `localhost`、`127.0.0.1` 和 `::1` ([#11686](https://github.com/getpaseo/paseo/pull/11686))
- 禁止 PR 评论和审查中的图片读取主机上的文件 ([#11699](https://github.com/getpaseo/paseo/pull/11699))
- 禁止 `.worktreeinclude` 将本地文件复制到来自 fork PR 的 worktree 中 ([#11709](https://github.com/getpaseo/paseo/pull/11709))
- 拒绝指向定时任务目录之外的定时任务 ID ([#11727](https://github.com/getpaseo/paseo/pull/11727))
### 插件
- 新增工作区布局 API,插件可以打开、移动和关闭面板与标签页 ([#11328](https://github.com/getpaseo/paseo/pull/11328))
- 新增 `requirements.app`,可单独设置与 daemon 不同的最低应用版本 ([#11494](https://github.com/getpaseo/paseo/pull/11494),贡献者:[@mcowger](https://github.com/mcowger))
- 修复插件在按下处理函数或定时器中出错导致 iOS 和 Android 应用关闭的问题 ([#11412](https://github.com/getpaseo/paseo/pull/11412))
- 修复插件操作删除手动添加到 `config.json` 中插件条目的问题 ([#11501](https://github.com/getpaseo/paseo/pull/11501),贡献者:[@matchy233](https://github.com/matchy233))
- 修复 npm 在锁文件中省略 registry 地址时,注册表插件安装报 Missing npm artifact 错误的问题 ([#11656](https://github.com/getpaseo/paseo/pull/11656),贡献者:[@Brandon168](https://github.com/Brandon168))
- 修复 daemon 运行在大型目录下时,本地插件重新加载耗时 12 至 21 秒的问题 ([#11653](https://github.com/getpaseo/paseo/pull/11653))
## 0.18.2 - 2026-11-30
- **重新设计的模型选择器**:桌面端采用支持跨 Provider 搜索的双栏视图,手机端合并为带思考强度滑块的单层抽屉,并支持在设置中按 Provider 筛选常用模型。([#11186](https://github.com/getpaseo/paseo/pull/11186), [#11280](https://github.com/getpaseo/paseo/pull/11280), [#11295](https://github.com/getpaseo/paseo/pull/11295), [#11371](https://github.com/getpaseo/paseo/pull/11371), [#11313](https://github.com/getpaseo/paseo/pull/11313))
+5 -3
View File
@@ -216,9 +216,11 @@ its own.
grew once its data arrived left the menu clipped, or hanging over its anchor, until it moved
again. `AnchoredSurface` plays the same keyframes through the Web Animations API on web, which
leaves no inline style; native keeps the Reanimated `Keyframe`.
- **Animate only once placed.** `AnchoredSurface` remounts the surface when its position resolves,
so the entering animation runs at the final position rather than ending unseen at the
off-screen measuring position.
- **Animate only once placed.** The entering animation must run at the final position, not end
unseen at the off-screen measuring position. Native remounts the surface when its position
resolves, because Reanimated's `entering` runs only on mount. Web keeps the surface mounted and
starts its Web Animations entering animation on placement, so a popover's content mounts once
per open.
- **Sheets size to content.** `enableDynamicSizing`, not fixed snap points. A pushed page is
rarely the height of the page before it. A fill page is the one exception.
- **The sheet's content is teleported out of the menu's subtree**, so `MenuSheetSurface` rebuilds
+7 -3
View File
@@ -257,9 +257,13 @@ Do not put any other code modules in the plugin root.
Shared files import contract helpers and types from `@getpaseo/plugin`. Server handler files import
`PluginHandlerContext` from `@getpaseo/plugin/server`. Client files import Paseo UI from
`@getpaseo/plugin/client/ui`. Its `Icon` draws a Lucide name from the client's installed
icon set, or any `PluginIcon` through its `icon` prop; an unknown name or unsafe SVG renders nothing
so it cannot break the plugin surface.
`@getpaseo/plugin/client/ui`. The module provides host-rendered `Icon` and `ProviderIcon`
components. `Icon` draws a Lucide name from the client's installed icon set, or any `PluginIcon`
through its `icon` prop; an unknown name or unsafe SVG renders nothing so it cannot break the
plugin surface. `ProviderIcon` resolves a built-in, catalog, or host-scoped plugin provider icon,
defaulting to the installation's host when `hostId` is omitted; unknown providers render the
standard provider fallback. `PluginCatalogSync` hydrates the host's provider snapshot before
installing client contributions so `ProviderIcon` resolves plugin SVGs on initial render.
Its controlled modal keeps presentation metadata on `<Modal title="…" icon={…}>` and body UI in
`<Modal.Content>`. Body layout, sheet-aware scrolling, and clipboard actions follow the
[host UI contract](../public-docs/plugins/reference.md#host-ui).
+36 -25
View File
@@ -16,8 +16,9 @@ Preparation is reversible and runs on the release branch before the user authori
4. Run the [pre-release sanity check](#pre-release-sanity-check) for stable releases, and report any findings to the user.
5. Commit the approved changelog and any requested ACP update, then run `npm run format`, `npm run lint`, and `npm run typecheck`.
6. Run `npm run release:prep:<mode>` to create the `chore(release): cut <version>` commit without a tag.
7. Push `release/vX.Y.Z` or `release/vX.Y.Z-beta.N` and wait for `CI` and `Desktop Packages` on that branch to pass (never wait on `main` CI).
8. Run the [pre-release dependency checks](#pre-release-dependency-checks) on the release commit.
7. Push `release/vX.Y.Z` or `release/vX.Y.Z-beta.N`.
8. Right after the push, open the unmerged [reconcile `main`](#reconcile-main) PR from `reconcile/vX.Y.Z` or `reconcile/vX.Y.Z-beta.N`, so its CI runs in parallel with the release branch's `CI` and `Desktop Packages`. Do not merge it during Preparation.
9. Wait for `CI` and `Desktop Packages` on the release branch to pass (never wait on `main` CI), and run the [pre-release dependency checks](#pre-release-dependency-checks) on the release commit.
### Ship
@@ -25,7 +26,7 @@ Ship starts after the user says "go ahead". All tag-triggered GitHub Actions wor
1. Run `npm run release:push` first to verify the clean release branch and push `vX.Y.Z` or `vX.Y.Z-beta.N`. Pushing the tag takes a few seconds and starts `Desktop Release`, `Android APK Release`, `Docker`, `Release Notes Sync`, and (for stable tags) `Deploy App` on GitHub Actions, plus `Release Mobile` (stable) or `Release iOS Beta` (beta) on EAS. (`Deploy Website` runs later on the `release: published` event when `Desktop Release` publishes the stable GitHub Release.)
2. Run `npm run release:publish` (stable) or `npm run release:publish:beta` (beta) in parallel with the remote builds. `scripts/publish-release-packages.mjs` publishes the seven `@getpaseo/*` packages in dependency waves and polls npm visibility between packages to avoid `E409` or `E404` propagation races.
3. Open the [reconcile `main`](#reconcile-main) PR from `reconcile/vX.Y.Z` or `reconcile/vX.Y.Z-beta.N` right after `npm run release:push` finishes, so its CI run overlaps with npm publication and the release builds.
3. Check the green [reconcile `main`](#reconcile-main) PR against the pushed tag, then merge it right after `npm run release:push` finishes, in parallel with npm publication and the release builds. Wait for its checks only if the tag check produced changes.
4. Create the release heartbeat immediately with `create_heartbeat` to track every ship step to completion.
### Sync gates
@@ -120,6 +121,7 @@ An explicit user instruction can select another base.
`CI` (all 21 jobs) and `Desktop Packages` (Linux user-namespace smoke) in their own concurrency
groups, isolated from `main` traffic. Never wait on `main` CI, because `main` runs queue behind
each other and a newer merge replaces the pending one.
Open the [reconcile `main`](#reconcile-main) PR now so its CI runs in parallel with these two.
Wait for both runs on the release branch commit to pass before shipping.
Complete the [pre-release dependency checks](#pre-release-dependency-checks) on that commit.
Pushing a `release/**` branch without a `v*` tag triggers no publish workflows.
@@ -127,9 +129,8 @@ An explicit user instruction can select another base.
Because the release branch is already pushed at `HEAD`, no second branch CI run starts, and only
the tag release workflows run.
7. Immediately in parallel after `npm run release:push` finishes: publish npm packages with
`npm run release:publish` (stable) or `npm run release:publish:beta` (beta), start
[Reconcile `main`](#reconcile-main) so its PR checks overlap with desktop and EAS builds, and
create the release heartbeat. (`npm run release:ship` and `npm run release:ship:beta` also run
`npm run release:publish` (stable) or `npm run release:publish:beta` (beta), merge the
already-green [reconcile `main`](#reconcile-main) PR, and create the release heartbeat. (`npm run release:ship` and `npm run release:ship:beta` also run
`release:push` before `release:publish`, so tag builds never wait behind npm.)
When promoting or branching from a tag created before `release:prep:*`, `release:ship`, and the
@@ -174,27 +175,35 @@ For a promotion, every item defaults to defer.
## Reconcile main
Right after `npm run release:push` pushes the tag (in parallel with npm publication and all desktop, APK, Docker, and EAS builds), open a PR into `main` from a fresh branch off `origin/main` named `reconcile/vX.Y.Z` or `reconcile/vX.Y.Z-beta.N`. Reconcile reads only the tagged git commit, so it does not wait for npm or any release build:
Open the reconcile PR during Preparation, right after pushing `release/vX.Y.Z` or `release/vX.Y.Z-beta.N`. Its CI takes about 30 minutes and npm publication takes about 5, so opening it at Ship would leave Ship waiting on CI. An unmerged PR changes nothing on `main`. Reconcile reads only the release branch commit, so it does not wait for the release branch's `CI` or `Desktop Packages`:
```bash
git fetch origin --tags
git fetch origin
git checkout -b reconcile/vX.Y.Z origin/main
npm run release:reconcile -- --tag vX.Y.Z
npm run release:reconcile -- --ref origin/release/vX.Y.Z
```
Use `release/vX.Y.Z-beta.N` and `reconcile/vX.Y.Z-beta.N` for a beta. `--tag vX.Y.Z` reads a published tag instead, for a release that is already tagged.
`scripts/reconcile-release.mjs` updates the working tree without cherry-picking stale lockfile
hunks from the release base:
- Copies the tagged `CHANGELOG.md` and `CHANGELOG.zh-CN.md` entries verbatim. A beta or promotion
- Copies the release branch's `CHANGELOG.md` and `CHANGELOG.zh-CN.md` entries verbatim. A beta or promotion
entry replaces the series beta entry on `main`. A stable hotfix on an older line is placed below
any newer entries.
- Copies the generated F-Droid changelog files from the tag for stable releases.
- Copies the generated F-Droid changelog files from the release branch for stable releases.
- Updates every `package.json` version and regenerates `package-lock.json` on top of current `main`
only when the shipped version is newer than `main`'s version.
- Leaves unshipped work on `main` untouched and makes no claims about unshipped work in the
changelog entry.
Commit, open the PR into `main`, and merge once its checks pass. Delete the remote release branch
Commit and open the PR into `main`, but do not merge it during Preparation:
- If the release is cancelled, close the PR. `main` is untouched.
- If the release branch changes during Preparation, re-run `npm run release:reconcile -- --ref origin/release/vX.Y.Z` on the same branch and push to the same PR.
- At Ship, right after `npm run release:push` pushes the tag, run `npm run release:reconcile -- --tag vX.Y.Z` on the reconcile branch. A clean `git status` means the PR already matches the tag, so merge it in parallel with `npm run release:publish` and the tag builds. If it shows changes, push them and wait for the PR checks before merging.
Delete the remote release branch
(`git push origin --delete release/vX.Y.Z` or `release/vX.Y.Z-beta.N`) only after the reconcile PR
merges and every [sync gate](#sync-gates) passes. The tag is the record of shipped source, and
Paseo maintains no release track besides `main`.
@@ -250,16 +259,16 @@ npm run release:prep:patch
# or:
npm run release:prep:minor
# 2. Push the release branch and wait for CI + Desktop Packages on this commit.
# 2. Push the release branch, then open the reconcile/vX.Y.Z PR into main (do not merge it).
git push -u origin HEAD
# Complete the pre-release dependency checks on this commit.
# Wait for CI + Desktop Packages on this commit and complete the pre-release dependency checks.
# 3. After go-ahead and green release-branch checks: push the tag first to start builds.
npm run release:push
# 4. Run these in parallel immediately after step 3:
npm run release:publish
# Also open the reconcile/vX.Y.Z PR into main and create the release heartbeat.
# Also merge the green reconcile/vX.Y.Z PR and create the release heartbeat.
# (`npm run release:ship` runs `release:push` before `release:publish` if used standalone.)
```
@@ -294,12 +303,13 @@ npm run release:check # Typecheck, build, dry-run pack
npm run version:all:patch
npm run version:all:minor
git push -u origin HEAD # Trigger CI + Desktop Packages on release/vX.Y.Z
# Open the reconcile/vX.Y.Z PR into main now (do not merge it).
# Wait for CI and Desktop Packages and complete the pre-release dependency checks.
# After go-ahead:
npm run release:push # Create tag vX.Y.Z on HEAD and push (starts release builds)
# In parallel right after release:push:
npm run release:publish # Publish to npm (idempotent, with propagation + beta dist-tag sync)
# Open reconcile/vX.Y.Z PR into main and create the release heartbeat.
# Merge the green reconcile/vX.Y.Z PR and create the release heartbeat.
```
## Beta flow
@@ -312,23 +322,24 @@ npm run release:prep:beta:minor # Start the next minor beta line
# or for follow-up betas:
npm run release:prep:beta:next # Cut X.Y.Z-beta.2, beta.3, ...
# 2. Push the release branch and wait for CI + Desktop Packages to pass:
# 2. Push the release branch and open the reconcile/vX.Y.Z-beta.N PR into main (do not merge it):
git push -u origin HEAD
# Complete the pre-release dependency checks on this commit.
# Wait for CI + Desktop Packages to pass and complete the pre-release dependency checks.
# 3. After go-ahead: push the tag first, then run npm publish, reconcile, and heartbeat in parallel:
# 3. After go-ahead: push the tag first, then run npm publish, merge the reconcile PR, and heartbeat in parallel:
npm run release:push
npm run release:publish:beta
# (Or run `npm run release:ship:beta` in one shell while opening reconcile/vX.Y.Z-beta.N.)
# (Or run `npm run release:ship:beta` in one shell while merging reconcile/vX.Y.Z-beta.N.)
# Later, after soak, promote on release/vX.Y.Z:
npm run release:prep:promote
git push -u origin HEAD
# Open the reconcile/vX.Y.Z PR into main (do not merge it).
# Wait for CI + Desktop Packages and complete the pre-release dependency checks.
# After go-ahead:
npm run release:push
npm run release:publish
# Open reconcile/vX.Y.Z PR into main and create the release heartbeat in parallel.
# Merge the green reconcile/vX.Y.Z PR and create the release heartbeat in parallel.
```
- Beta tags are published GitHub prereleases like `v0.1.41-beta.1`
@@ -1004,9 +1015,9 @@ Every entry covers `previous stable release → release source`: first beta, lat
- [ ] Every PR in the release range has been opened, and its full description and every linked issue have been read before drafting the changelog
- [ ] Fold this beta into the series' single `CHANGELOG.md` entry (heading `## X.Y.Z-beta.N - YYYY-MM-DD`, previous stable → release source), review it against the changelog policy, get approval, and commit it with its [`CHANGELOG.zh-CN.md` translation](#changelog-translations) before running `release:prep:*`
- [ ] The diff from the previous stable to the resolved release source is classified as patch or minor, with the target version and rationale approved
- [ ] `npm run release:prep:beta:patch`, `release:prep:beta:minor`, or `release:prep:beta:next` created the version commit on `release/vX.Y.Z-beta.N` without a tag, and the pushed branch passed `CI` and `Desktop Packages` before shipping (never relying on `main` CI)
- [ ] `npm run release:prep:beta:patch`, `release:prep:beta:minor`, or `release:prep:beta:next` created the version commit on `release/vX.Y.Z-beta.N` without a tag, and the pushed branch passed `CI` and `Desktop Packages` before shipping (never relying on `main` CI), with the unmerged reconcile PR opened right after the branch push
- [ ] Complete the [pre-release dependency checks](#pre-release-dependency-checks) on the release commit
- [ ] After go-ahead, `npm run release:push` pushed the `vX.Y.Z-beta.N` tag without triggering a second CI run, while `npm run release:publish:beta`, the `reconcile/vX.Y.Z-beta.N` PR, and the release heartbeat started in parallel
- [ ] After go-ahead, `npm run release:push` pushed the `vX.Y.Z-beta.N` tag without triggering a second CI run, while `npm run release:publish:beta`, the merge of the green `reconcile/vX.Y.Z-beta.N` PR, and the release heartbeat started in parallel
- [ ] All seven `@getpaseo/*` npm packages show the version under the `beta` dist-tag, not `latest`
- [ ] The GitHub prerelease was published only after the three beta manifests were uploaded, and it has the changelog body and every expected macOS, Linux, Windows, and Android APK asset
- [ ] GitHub `Desktop Release` workflow for the `v*-beta.N` tag is green
@@ -1028,9 +1039,9 @@ Every entry covers `previous stable release → release source`: first beta, lat
- [ ] Update `CHANGELOG.md` with user-facing release notes (features, fixes, not refactors). Promotion renames the series' `## X.Y.Z-beta.N` entry to `## X.Y.Z - YYYY-MM-DD` and re-checks it covers the full release. Commit the matching [`CHANGELOG.zh-CN.md` entry](#changelog-translations) with it
- [ ] Verify the changelog heading follows strict `## X.Y.Z - YYYY-MM-DD` format
- [ ] Ensure local format, lint, and typecheck pass and the working tree is clean before running `release:prep:*`
- [ ] `npm run release:prep:patch`, `release:prep:minor`, or `release:prep:promote` created the version commit on `release/vX.Y.Z` without a tag, and the pushed branch passed `CI` and `Desktop Packages` before shipping (never relying on `main` CI)
- [ ] `npm run release:prep:patch`, `release:prep:minor`, or `release:prep:promote` created the version commit on `release/vX.Y.Z` without a tag, and the pushed branch passed `CI` and `Desktop Packages` before shipping (never relying on `main` CI), with the unmerged reconcile PR opened right after the branch push
- [ ] Complete the [pre-release dependency checks](#pre-release-dependency-checks) on the release commit
- [ ] After go-ahead, `npm run release:push` pushed the `vX.Y.Z` tag without triggering a second CI run, while `npm run release:publish`, the `reconcile/vX.Y.Z` PR, and the release heartbeat started in parallel
- [ ] After go-ahead, `npm run release:push` pushed the `vX.Y.Z` tag without triggering a second CI run, while `npm run release:publish`, the merge of the green `reconcile/vX.Y.Z` PR, and the release heartbeat started in parallel
- [ ] All seven `@getpaseo/*` npm packages show `latest` at the new stable, and `beta` at the new stable too unless an active newer beta holds `beta`
- [ ] The GitHub Release was published only after the three stable manifests were uploaded, and it has the changelog body and every expected macOS, Linux, Windows, and Android APK asset
- [ ] GitHub `Desktop Release` workflow for the `v*` tag is green
+1 -1
View File
@@ -1 +1 @@
sha256-x6E6SY98/8pUNLomlPzSNedZ+ZKJPzsQeS9L455i+n0=
sha256-oBd6CQ8+BhzMHhrpRIwzojuFPUwqXpgc3ZAPqKPs5QQ=
+29 -29
View File
@@ -1,12 +1,12 @@
{
"name": "paseo",
"version": "0.18.2",
"version": "0.19.0-beta.1",
"lockfileVersion": 3,
"requires": true,
"packages": {
"": {
"name": "paseo",
"version": "0.18.2",
"version": "0.19.0-beta.1",
"hasInstallScript": true,
"license": "Apache-2.0",
"workspaces": [
@@ -37552,7 +37552,7 @@
},
"packages/app": {
"name": "@getpaseo/app",
"version": "0.18.2",
"version": "0.19.0-beta.1",
"dependencies": {
"@codemirror/commands": "6.10.4",
"@codemirror/language": "6.12.4",
@@ -39705,13 +39705,13 @@
},
"packages/cli": {
"name": "@getpaseo/cli",
"version": "0.18.2",
"version": "0.19.0-beta.1",
"license": "Apache-2.0",
"dependencies": {
"@clack/prompts": "^1.0.0",
"@getpaseo/client": "0.18.2",
"@getpaseo/protocol": "0.18.2",
"@getpaseo/server": "0.18.2",
"@getpaseo/client": "0.19.0-beta.1",
"@getpaseo/protocol": "0.19.0-beta.1",
"@getpaseo/server": "0.19.0-beta.1",
"chalk": "^5.3.0",
"commander": "^12.0.0",
"mime-types": "^2.1.35",
@@ -39961,11 +39961,11 @@
},
"packages/client": {
"name": "@getpaseo/client",
"version": "0.18.2",
"version": "0.19.0-beta.1",
"license": "Apache-2.0",
"dependencies": {
"@getpaseo/protocol": "0.18.2",
"@getpaseo/relay": "0.18.2",
"@getpaseo/protocol": "0.19.0-beta.1",
"@getpaseo/relay": "0.19.0-beta.1",
"ws": "^8.20.0",
"zod": "^4.4.3"
},
@@ -39977,7 +39977,7 @@
},
"packages/desktop": {
"name": "@getpaseo/desktop",
"version": "0.18.2",
"version": "0.19.0-beta.1",
"license": "Apache-2.0",
"dependencies": {
"@getpaseo/cli": "*",
@@ -40221,7 +40221,7 @@
},
"packages/expo-two-way-audio": {
"name": "@getpaseo/expo-two-way-audio",
"version": "0.18.2",
"version": "0.19.0-beta.1",
"license": "MIT",
"devDependencies": {
"@types/jest": "^29.5.14",
@@ -40267,7 +40267,7 @@
},
"packages/highlight": {
"name": "@getpaseo/highlight",
"version": "0.18.2",
"version": "0.19.0-beta.1",
"license": "Apache-2.0",
"dependencies": {
"@codemirror/language": "6.12.4",
@@ -40297,7 +40297,7 @@
},
"packages/plugin": {
"name": "@getpaseo/plugin",
"version": "0.18.2",
"version": "0.19.0-beta.1",
"license": "Apache-2.0",
"dependencies": {
"@agentclientprotocol/sdk": "^1.4.0",
@@ -40305,8 +40305,8 @@
"use-sync-external-store": "^1.6.0"
},
"devDependencies": {
"@getpaseo/client": "0.18.2",
"@getpaseo/protocol": "0.18.2",
"@getpaseo/client": "0.19.0-beta.1",
"@getpaseo/protocol": "0.19.0-beta.1",
"@types/node": "^20.9.0",
"@types/react": "~19.2.0",
"react": "19.2.3",
@@ -40316,8 +40316,8 @@
"zod": "^4.4.3"
},
"peerDependencies": {
"@getpaseo/client": "0.18.2",
"@getpaseo/protocol": "0.18.2",
"@getpaseo/client": "0.19.0-beta.1",
"@getpaseo/protocol": "0.19.0-beta.1",
"react": ">=19.1.0 <20",
"react-native": ">=0.81.5",
"zod": "^4.4.3"
@@ -40339,7 +40339,7 @@
},
"packages/protocol": {
"name": "@getpaseo/protocol",
"version": "0.18.2",
"version": "0.19.0-beta.1",
"license": "Apache-2.0",
"dependencies": {
"semver": "^7.8.5",
@@ -40366,7 +40366,7 @@
}
},
"packages/react-native-enriched-markdown": {
"version": "0.18.2",
"version": "0.19.0-beta.1",
"hasInstallScript": true,
"license": "MIT",
"peerDependencies": {
@@ -40382,7 +40382,7 @@
},
"packages/relay": {
"name": "@getpaseo/relay",
"version": "0.18.2",
"version": "0.19.0-beta.1",
"license": "Apache-2.0",
"dependencies": {
"@noble/ciphers": "^2.4.0",
@@ -40604,17 +40604,17 @@
},
"packages/server": {
"name": "@getpaseo/server",
"version": "0.18.2",
"version": "0.19.0-beta.1",
"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.18.2",
"@getpaseo/highlight": "0.18.2",
"@getpaseo/plugin": "0.18.2",
"@getpaseo/protocol": "0.18.2",
"@getpaseo/relay": "0.18.2",
"@getpaseo/client": "0.19.0-beta.1",
"@getpaseo/highlight": "0.19.0-beta.1",
"@getpaseo/plugin": "0.19.0-beta.1",
"@getpaseo/protocol": "0.19.0-beta.1",
"@getpaseo/relay": "0.19.0-beta.1",
"@isaacs/ttlcache": "^2.1.4",
"@modelcontextprotocol/node": "2.1.2",
"@modelcontextprotocol/sdk": "1.29.0",
@@ -41579,7 +41579,7 @@
},
"packages/website": {
"name": "@getpaseo/website",
"version": "0.18.2",
"version": "0.19.0-beta.1",
"dependencies": {
"@cloudflare/vite-plugin": "^1.29.1",
"@cloudflare/workers-types": "^4.20260317.1",
@@ -43205,7 +43205,7 @@
},
"plugins": {
"name": "@getpaseo/builtin-plugins",
"version": "0.18.2",
"version": "0.19.0-beta.1",
"dependencies": {
"@getpaseo/plugin": "*",
"zod": "^4.4.3"
+1 -1
View File
@@ -1,6 +1,6 @@
{
"name": "paseo",
"version": "0.18.2",
"version": "0.19.0-beta.1",
"private": true,
"description": "Paseo: voice-controlled development environment for local AI coding agents",
"keywords": [
@@ -1,5 +1,8 @@
import { mkdir, writeFile } from "node:fs/promises";
import path from "node:path";
import { gateNextAgentMessage } from "../support/helpers/agent-message-gate";
import { expectComposerDraft, submitMessage } from "../support/helpers/composer";
import { expectAgentIdle } from "../support/helpers/agent-stream";
import { test, expect, type Page } from "../support/fixtures";
import { seedMockAgentWorkspace, openAgentRoute } from "../support/helpers/mock-agent";
import { openChangesPanel, openChangesTreePanel } from "../support/helpers/workspace-tabs";
@@ -55,3 +58,45 @@ for (const width of [1400, 390]) {
}
});
}
async function addChangedFileToChat(page: Page) {
await openChangesPanel(page);
await page.getByTestId("diff-file-0-toggle").click({ button: "right" });
await page.getByTestId("diff-file-0-add-to-chat").click();
}
async function expectFollowUpAttachment(page: Page) {
await expect(page.getByTestId("composer-workspace-file-attachment-pill")).toContainText(
"follow-up.ts",
);
}
test("keeps a file added from Changes when an earlier send fails", async ({ page }) => {
const gate = await gateNextAgentMessage(page);
const workspace = await seedMockAgentWorkspace({
repoPrefix: "attachment-during-send-",
title: "Target chat",
featureValues: { mockPromptRejections: 1 },
});
try {
await writeFile(path.join(workspace.cwd, "follow-up.ts"), "export const followUp = true;\n");
await workspace.client.checkoutRefresh(workspace.cwd);
await openAgentRoute(page, workspace);
await expectAgentIdle(page);
await submitMessage(page, "Send this first.");
await gate.waitForRequest();
await addChangedFileToChat(page);
await expectFollowUpAttachment(page);
gate.accept();
await expect(
page.getByRole("alert").filter({ hasText: "Requested mock prompt rejection" }),
).toBeVisible();
await expectFollowUpAttachment(page);
await expectComposerDraft(page, "");
} finally {
await workspace.cleanup();
}
});
@@ -1219,6 +1219,30 @@ test.describe("Agent message submission", () => {
await retryRestoredSubmission(page, prompt);
});
test("keeps a follow-up draft after the earlier send is rejected", async ({ page }, testInfo) => {
const gate = await gateNextAgentMessage(page);
const agent = await seedMockAgentWorkspace({
repoPrefix: `pending-rejection-${testInfo.workerIndex}-`,
title: "Pending rejection",
model: "ten-second-stream",
featureValues: { mockPromptRejections: 1 },
});
try {
await openAgentRoute(page, { workspaceId: agent.workspaceId, agentId: agent.agentId });
await expectAgentIdle(page);
await submitMessage(page, "Send this first.");
await gate.waitForRequest();
await fillComposerDraft(page, "Keep this follow-up.");
gate.accept();
await expect(
page.getByRole("alert").filter({ hasText: "Requested mock prompt rejection" }),
).toBeVisible();
await expectComposerDraft(page, "Keep this follow-up.");
} finally {
await agent.cleanup();
}
});
test("restores an ambiguous Steer failure without retrying or interrupting", async ({
page,
}, testInfo) => {
@@ -9,7 +9,8 @@ import {
expectRemovedPlugin,
} from "../support/helpers/plugin-reconnect";
import { verifyPluginTranslations } from "../support/helpers/plugin-translations";
import { pluginRequirements } from "../support/helpers/plugin-fixture";
import { copyPluginExample, pluginRequirements } from "../support/helpers/plugin-fixture";
import { expectProviderIcon, readIconPaths } from "../support/helpers/plugin-provider-icons";
import { mkdtemp, readFile, rm, writeFile } from "node:fs/promises";
import { tmpdir } from "node:os";
import path from "node:path";
@@ -26,7 +27,7 @@ const TINY_PNG = Buffer.from(
);
const PLUGIN_SOURCE = `import { usePaseo } from "@getpaseo/plugin/client";
import { Icon, Modal, useToast, Markdown } from "@getpaseo/plugin/client/ui";
import { Icon, Modal, ProviderIcon, useToast, Markdown } from "@getpaseo/plugin/client/ui";
import { useQueryClient } from "@tanstack/react-query";
import React, { useState } from "react";
import { Pressable, Text, View } from "react-native";
@@ -53,7 +54,7 @@ function ModalBody({ onSaved }) {
</View>;
}
function Surface({ playAudio }) {
function Surface({ host, theme, playAudio }) {
const [audioStatus, setAudioStatus] = useState("Audio ready");
async function play(base64) {
setAudioStatus("Playing audio");
@@ -62,6 +63,18 @@ function Surface({ playAudio }) {
}
const [open, setOpen] = useState(false);
return <View>
<View testID="plugin-provider-icon-builtin">
<ProviderIcon provider="codex" size={18} color={theme.colors.foreground} />
</View>
<View testID="plugin-provider-icon-plugin">
<ProviderIcon provider="direct-example" hostId={host.id} size={18} color={theme.colors.foreground} />
</View>
<View testID="plugin-provider-icon-fallback">
<ProviderIcon provider="unknown-provider-e2e" size={18} color={theme.colors.foreground} />
</View>
<View testID="plugin-provider-icon-bot-ref">
<Icon name="Bot" size={18} color={theme.colors.foreground} />
</View>
<Text>{audioStatus}</Text>
<Markdown>{"![Before](" + SCREENSHOT_PATH + ")\\n\\n![After](" + SCREENSHOT_FILE_URL + ")"}</Markdown>
<Pressable accessibilityRole="button" onPress={() => play(AUDIO_BASE64)}><Text>Play plugin audio</Text></Pressable>
@@ -86,7 +99,7 @@ function Surface({ playAudio }) {
}
export default function contribute(plugin) {
plugin.addSurface("main", () => <Surface playAudio={plugin.playAudio} />);
plugin.addSurface("main", (props) => <Surface {...props} playAudio={plugin.playAudio} />);
plugin.addSidebarItem({
id: "main",
title: "Host UI",
@@ -166,8 +179,9 @@ async function savePluginIssue(page: Page): Promise<void> {
await expect(page.getByText("Plugin modal contexts ready", { exact: true })).not.toBeVisible();
}
test("plugin modal adapts its presentation and preserves host contexts", async ({ page }) => {
test("plugin host UI renders provider icons and preserves modal contexts", async ({ page }) => {
const directory = await mkdtemp(path.join(tmpdir(), "paseo-plugin-host-ui-e2e-"));
const providerPlugin = await copyPluginExample("provider-direct");
const client = await connectNewWorkspaceDaemonClient({ ownProjects: false });
const previousConfig = await client.getDaemonConfig();
await writeFile(
@@ -187,10 +201,29 @@ test("plugin modal adapts its presentation and preserves host contexts", async (
try {
await client.patchDaemonConfig({ pluginsEnabled: true });
await client.installDirectoryPlugin(providerPlugin.directory);
await client.installDirectoryPlugin(directory);
await useNonCompactLayout(page);
await openHostUiPlugin(page);
await test.step("ProviderIcon renders built-in, daemon plugin SVG, and fallback icons", async () => {
const providerIconPaths = await readIconPaths(page, providerPlugin.directory);
await expectProviderIcon(page.getByTestId("plugin-provider-icon-plugin"), providerIconPaths);
const builtinSvg = page.getByTestId("plugin-provider-icon-builtin").locator("svg");
const fallbackSvg = page.getByTestId("plugin-provider-icon-fallback").locator("svg");
const botRefSvg = page.getByTestId("plugin-provider-icon-bot-ref").locator("svg");
await expect(builtinSvg).toBeVisible();
await expect(fallbackSvg).toBeVisible();
await expect(botRefSvg).toBeVisible();
const fallbackMarkup = await fallbackSvg.innerHTML();
const botRefMarkup = await botRefSvg.innerHTML();
const builtinMarkup = await builtinSvg.innerHTML();
expect(fallbackMarkup).toBe(botRefMarkup);
expect(builtinMarkup).not.toBe(botRefMarkup);
});
await test.step("plugin screen Markdown renders local absolute and file:// PNG images inline", async () => {
await expectLoadedMarkdownImage(page, "Before");
await expectLoadedMarkdownImage(page, "After");
@@ -217,11 +250,13 @@ test("plugin modal adapts its presentation and preserves host contexts", async (
});
} finally {
await client.removePlugin(PLUGIN_ID).catch(() => undefined);
await client.removePlugin("provider-direct-example").catch(() => undefined);
await client
.patchDaemonConfig({ pluginsEnabled: previousConfig.config.pluginsEnabled ?? false })
.catch(() => undefined);
await client.close().catch(() => undefined);
await rm(directory, { recursive: true, force: true });
await providerPlugin.cleanup();
}
});
@@ -18,7 +18,8 @@ function finish() {
process.exit(0);
}
process.stdout.write("\\x1b]11;?\\x07");
// Raw mode before the query: a reply that arrives while the tty still echoes
// would be printed on the capture line as a second "]11;rgb:".
if (process.stdin.isTTY) {
process.stdin.setRawMode(true);
}
@@ -26,6 +27,7 @@ process.stdin.resume();
process.stdin.on("data", (chunk) => {
captured = Buffer.concat([captured, chunk]);
});
process.stdout.write("\\x1b]11;?\\x07");
setTimeout(finish, 700);
`;
@@ -45,6 +45,9 @@ function Details({ workspaceId, theme, layout, close }) {
owner.subscribe({ snapshot(value) { setOwnerId(value.subscriptionId); }, update() { setUpdates((n) => n + 1); } });
return () => { void owner.release(); };
}, [paseo]);
React.useEffect(() => {
globalThis.__buttonContentMounts = (globalThis.__buttonContentMounts ?? 0) + 1;
}, []);
const rpc = useRpc(summary);
const query = useQuery({ queryKey: ["summary"], queryFn: () => rpc({}) });
if (failed) throw new Error("Button content failed");
@@ -198,6 +201,13 @@ async function expectDetails(page: Page) {
await expect(page.getByText("All systems operational", { exact: true })).toBeInViewport();
}
/** How many times button content has mounted on the page, counted by the content itself. */
async function contentMounts(page: Page): Promise<number> {
return page.evaluate(
() => (globalThis as { __buttonContentMounts?: number }).__buttonContentMounts ?? 0,
);
}
// The details render before the daemon answers their event subscription, and reopened
// details show the cached summary at once, so wait for the subscription id to arrive.
async function readContentObservation(page: Page): Promise<string> {
@@ -231,14 +241,17 @@ async function expectCompactDetails(page: Page) {
await expect(menu.getByText("Presentation: compact", { exact: true })).toBeVisible();
}
/** Resolves once `subject` renders the same pixels twice in a row: entering animations are done. */
/**
* Resolves once `subject` renders the same pixels twice in a row: entering animations are done.
* A remount detaches the element mid-screenshot; that is not still yet, so the poll starts over.
*/
async function expectStill(subject: Locator) {
let previous: Buffer | null = null;
await expect
.poll(
async () => {
const current = await subject.screenshot();
const still = previous !== null && current.equals(previous);
const current = await screenshotAttached(subject);
const still = previous !== null && current !== null && current.equals(previous);
previous = current;
return still;
},
@@ -247,6 +260,17 @@ async function expectStill(subject: Locator) {
.toBe(true);
}
async function screenshotAttached(subject: Locator): Promise<Buffer | null> {
try {
return await subject.screenshot();
} catch (error) {
if (error instanceof Error && error.message.includes("Element is not attached to the DOM")) {
return null;
}
throw error;
}
}
/** Attaches the screen once per colour scheme, for review alongside the run. */
async function captureSchemes(page: Page, info: TestInfo, name: string, subject: Locator) {
for (const colorScheme of ["light", "dark"] as const) {
@@ -360,15 +384,18 @@ export async function withButtonShowcase(
await run({
verifyObservationLifetime: () =>
test.step("closing and crashing content release its owner while sibling buttons and app remain live", async () => {
const mountsBefore = await contentMounts(page);
await press(page, "Header status");
await expectDetails(page);
const first = await readContentObservation(page);
expect(await contentMounts(page)).toBe(mountsBefore + 1);
await press(page, "Close deployment details");
await expect.poll(() => released.has(first)).toBe(true);
await press(page, "Composer status");
await expectDetails(page);
const second = await readContentObservation(page);
expect(second).not.toBe(first);
expect(await contentMounts(page)).toBe(mountsBefore + 2);
await workspace.client.renameProject(workspace.projectId, "Observer control");
await expect(page.getByText("Observed updates: 1", { exact: true })).toBeVisible();
await press(page, "Fail button content");
@@ -15,7 +15,7 @@ const MODEL_LABEL = "Select model (Example 1)";
const WIDE = { width: 1400, height: 950 };
const COMPACT = { width: 390, height: 844 };
async function readIconPaths(page: Page, pluginDirectory: string): Promise<string[]> {
export async function readIconPaths(page: Page, pluginDirectory: string): Promise<string[]> {
const svg = await readFile(path.join(pluginDirectory, "icon.svg"), "utf8");
return page.evaluate(
(source) =>
@@ -33,7 +33,7 @@ function readIconDrawings(icons: SVGElement[]): string[][] {
);
}
async function expectProviderIcon(surface: Locator, paths: string[]): Promise<void> {
export async function expectProviderIcon(surface: Locator, paths: string[]): Promise<void> {
await expect(surface).toBeVisible();
// Provider icons are decorative SVGs without accessible names. Compare the
// plugin asset's drawing, allowing surface-specific size and theme colours.
+1 -1
View File
@@ -1,6 +1,6 @@
{
"name": "@getpaseo/app",
"version": "0.18.2",
"version": "0.19.0-beta.1",
"private": true,
"main": "index.ts",
"scripts": {
@@ -242,6 +242,28 @@ const longEditDetail = {
newString: "new line\n".repeat(80),
};
describe("tool detail empty state", () => {
it("insets the empty-state text from the disclosure edge", () => {
act(() =>
root.render(
<QueryClientProvider client={queryClient}>
<ToolCallDetailsContent maxHeight={200} />
</QueryClientProvider>,
),
);
const text = view().getByText("No additional details available");
const style = getComputedStyle(text);
expect(style.paddingTop).toBe("12px");
expect(style.paddingRight).toBe("12px");
expect(style.paddingBottom).toBe("12px");
expect(style.paddingLeft).toBe("12px");
const textBox = text.getBoundingClientRect();
const containerBox = container.getBoundingClientRect();
expect(textBox.left).toBeGreaterThanOrEqual(containerBox.left);
expect(textBox.right).toBeLessThanOrEqual(containerBox.right);
});
});
describe("capped tool scrolling", () => {
it.each([longShellDetail, longEditDetail])(
"gives a capped $type detail one vertical scroll owner",
@@ -55,6 +55,47 @@ it("keeps unavailable probes and external paths on the existing file-open path",
}
});
it("opens an existing absolute folder outside the workspace without a trailing slash", async () => {
const root = await mkdtemp(path.join(tmpdir(), "outside-folder-link-"));
roots.push(root);
const workspaceRoot = path.join(root, "workspace");
const folder = path.join(root, "reports").split(path.sep).join("/");
const file = path.join(root, "notes.txt").split(path.sep).join("/");
await mkdir(workspaceRoot);
await mkdir(folder);
await writeFile(file, "notes");
const { classifyForResolution } = await import("./resolver");
const { resolveInlinePathDestination } = await import("./path-open");
const client = {
listDirectory: (cwd: string, requestedPath: string) => {
const absolute = path.resolve(cwd, requestedPath);
if (path.relative(cwd, absolute).split(path.sep)[0] === "..") {
throw new Error("Access outside of workspace is not allowed");
}
return readdir(absolute);
},
getDirectorySuggestions: async () => ({ entries: [], error: null }),
};
const destination = async (href: string) => {
const resolution = classifyForResolution({ href, text: "Open path" }, { workspaceRoot });
if (resolution.kind !== "resolved" || resolution.value.kind !== "file") {
throw new Error("Expected an explicit path link");
}
return resolveInlinePathDestination({ target: resolution.value.target, workspaceRoot, client });
};
await expect(destination(file)).resolves.toMatchObject({
kind: "file",
location: { path: file },
});
await expect(destination(folder + "/")).resolves.toEqual({
kind: "outsideDirectory",
path: folder,
});
await expect(destination(folder)).resolves.toEqual({ kind: "outsideDirectory", path: folder });
});
it("ignores an older probe after a newer file link opens", async () => {
const { createInlinePathOpener } = await import("./path-open");
let rejectProbe!: (error: Error) => void;
@@ -4,6 +4,7 @@ import {
type WorkspaceFileLocation,
type OpenFileDisposition,
} from "@/workspace/file-open";
import { resolveFilePreviewReadTarget } from "@/file-explorer/preview-target";
import { isAbsolutePath } from "@/utils/path";
import { resolveMissingNestedRelativeFile, type GetDirectorySuggestions } from "./resolver";
@@ -26,27 +27,30 @@ function isOutsideWorkspacePath(pathValue: string): boolean {
return isAbsolutePath(pathValue) || pathValue === "~" || pathValue.startsWith("~/");
}
/** Resolve workspace folders from filesystem facts, including names that contain dots. */
/** Resolve folders from filesystem facts, including names that contain dots. */
export async function resolveInlinePathOpen(input: PathOpenInput): Promise<PathOpenTarget> {
if (!input.file) {
return isOutsideWorkspacePath(input.directory)
? { kind: "outsideDirectory", directoryPath: input.directory }
: { kind: "directory", directoryPath: input.directory };
}
if (
input.lineStart !== undefined ||
isAbsolutePath(input.file) ||
!input.workspaceRoot.trim() ||
!input.client
) {
if (input.lineStart !== undefined || !input.workspaceRoot.trim() || !input.client) {
return { kind: "file" };
}
const outside = isOutsideWorkspacePath(input.file);
const probe = outside
? resolveFilePreviewReadTarget({ path: input.file, workspaceRoot: input.workspaceRoot })
: { cwd: input.workspaceRoot, path: input.file };
if (!probe) return { kind: "file" };
try {
await input.client.listDirectory(input.workspaceRoot, input.file);
await input.client.listDirectory(probe.cwd, probe.path);
} catch {
return { kind: "file" };
}
return { kind: "directory", directoryPath: input.file };
return {
kind: outside ? "outsideDirectory" : "directory",
directoryPath: input.file,
};
}
export type InlinePathDestination =
@@ -747,6 +747,7 @@ const styles = StyleSheet.create((theme) => {
color: theme.colors.destructive,
},
emptyStateText: {
padding: insets.padding,
color: theme.colors.foregroundMuted,
fontSize: theme.fontSize.base,
fontStyle: "italic",
@@ -120,6 +120,27 @@ describe("anchored menu surface on web", () => {
},
);
it("mounts its content once per open", async () => {
const lifecycle: string[] = [];
function RecordsMounts() {
useEffect(() => {
lifecycle.push("mount");
return () => {
lifecycle.push("unmount");
};
}, []);
return <View testID="body" style={SHORT} />;
}
mountMenuAbovePill(<RecordsMounts />);
await wait(SETTLE_MS);
expect(element("panel").getBoundingClientRect().bottom).toBeLessThanOrEqual(
element("pill").getBoundingClientRect().top,
);
expect(lifecycle).toEqual(["mount"]);
});
it("widens when its content widens after the entering animation", async () => {
mountMenuAbovePill(<GrowsAfterOpen afterMs={GROWS_BEFORE_CLEANUP_MS} from={SHORT} to={WIDE} />);
@@ -284,9 +284,12 @@ export function AnchoredSurface({
// The surface is placed once both measurements land. Until then it sits off-screen so it can
// be measured, and it must not animate: an entering animation that ran there would be over
// before anyone saw the menu. Remounting on placement starts the native animation from the
// final position; web starts its own animation on placement.
// before anyone saw the menu. Native remounts the surface on placement so Reanimated's
// `entering` starts from the final position. Web keeps it mounted and starts its own animation
// on placement: a remount would mount the content twice per open, running its effects and
// requests again and dropping its first state.
const placed = position !== null;
const surfaceKey = isWeb || placed ? "placed" : "measuring";
useWebContentEntering({ placed, surfaceNativeID });
@@ -365,7 +368,7 @@ export function AnchoredSurface({
) : null}
<View pointerEvents="box-none" style={frame.holder}>
<FloatingSurface
key={placed ? "placed" : "measuring"}
key={surfaceKey}
collapsable={false}
tabIndex={-1}
nativeID={surfaceNativeID}
@@ -467,6 +467,7 @@ export function WorkspaceSetupDialog() {
attachments={chatDraft.attachments}
onChangeAttachments={chatDraft.setAttachments}
cwd={sourceDirectory}
getDraftRevision={chatDraft.getRevision}
clearDraft={chatDraft.clear}
autoFocus
commandDraft={composerState?.commandDraft}
@@ -68,6 +68,7 @@ export interface AgentInputDraft {
textReplacement: TextReplacement;
attachments: UserComposerAttachment[];
setAttachments: (updater: AttachmentUpdater) => void;
getRevision: () => number;
clear: (lifecycle: "sent" | "abandoned") => void;
isHydrated: boolean;
attachmentFocusRequestId: number;
@@ -195,6 +196,11 @@ export function useAgentInputDraft(input: UseAgentInputDraftInput): AgentInputDr
[draftKey],
);
const getRevision = useCallback(
() => useDraftStore.getState().getDraftRevision(draftKey),
[draftKey],
);
const clear = useCallback(
(lifecycle: "sent" | "abandoned") => {
useDraftStore.getState().clearDraftInput({ draftKey, lifecycle });
@@ -381,6 +387,7 @@ export function useAgentInputDraft(input: UseAgentInputDraftInput): AgentInputDr
textReplacement,
attachments,
setAttachments,
getRevision,
clear,
isHydrated,
attachmentFocusRequestId,
@@ -587,6 +587,7 @@ export function WorkspaceDraftComposer({
onOpenWorkspaceAttachment={handleOpenWorkspaceAttachment}
onChangeAttachments={draftInput.setAttachments}
cwd={composerState.workingDir}
getDraftRevision={draftInput.getRevision}
clearDraft={draftInput.clear}
editingSession={editingSession}
autoFocus={shouldAutoFocusWorkspaceDraftComposer({ isPaneFocused, isSubmitting })}
+4
View File
@@ -952,6 +952,7 @@ interface ComposerProps {
onForgeChangeRequestDetected?: () => void;
onForgeChangeRequestAutoAttach?: (item: ForgeSearchItem) => void;
cwd: string;
getDraftRevision: () => number;
clearDraft: (lifecycle: "sent" | "abandoned") => void;
/** When true, auto-focuses the text input on web. */
autoFocus?: boolean;
@@ -1280,6 +1281,7 @@ function ComposerContentImpl({
onForgeChangeRequestDetected,
onForgeChangeRequestAutoAttach,
cwd,
getDraftRevision,
clearDraft,
autoFocus = false,
autoFocusKey,
@@ -1882,6 +1884,7 @@ function ComposerContentImpl({
await submitMessage(submitText, submitAttachments);
},
clearDraft,
getDraftRevision,
setUserInput: replaceUserInput,
setAttachments: (nextAttachments) => {
setSelectedAttachments(composerWorkspaceAttachment.userAttachmentsOnly(nextAttachments));
@@ -1904,6 +1907,7 @@ function ComposerContentImpl({
clearDraft,
completeSubmit,
enqueueMessage,
getDraftRevision,
hasExternalContent,
isAgentRunning,
supportsQueue,
+53
View File
@@ -35,6 +35,7 @@ describe("submitAgentInput", () => {
canSubmit: true,
queueMessage,
submitMessage,
getDraftRevision: () => 0,
clearDraft,
setUserInput,
setAttachments,
@@ -59,6 +60,53 @@ describe("submitAgentInput", () => {
expect(clearDraft).toHaveBeenCalledWith("sent");
});
it.each([
{ delivery: "send", outcome: "failed" },
{ delivery: "send", outcome: "submitted" },
{ delivery: "queue", outcome: "failed" },
{ delivery: "queue", outcome: "queued" },
] as const)(
"preserves edits made while a $delivery is pending ($outcome)",
async ({ delivery, outcome }) => {
let revision = 0;
let text = "first message";
let attachments = ["first.txt"];
const setUserInput = (next: string) => {
text = next;
revision++;
};
const setAttachments = (next: string[]) => {
attachments = next;
revision++;
};
const deferred = createDeferredPromise<void>();
const result = submitAgentInput({
message: text,
attachments,
isAgentRunning: delivery === "queue",
canSubmit: true,
queueMessage: () => deferred.promise,
submitMessage: () => deferred.promise,
clearDraft: () => {
setUserInput("");
setAttachments([]);
},
setUserInput,
setAttachments,
getDraftRevision: () => revision,
setSendError: vi.fn(),
setIsProcessing: vi.fn(),
});
setUserInput("follow-up");
setAttachments(["second.txt"]);
if (outcome === "failed") deferred.reject(new Error("offline"));
else deferred.resolve();
expect(await result).toBe(outcome);
expect(text).toBe("follow-up");
expect(attachments).toEqual(["second.txt"]);
},
);
it("preserves the composer before an in-flight submit resolves when requested", async () => {
const deferred = createDeferredPromise<void>();
const attachments = [{ id: "img-1" }];
@@ -80,6 +128,7 @@ describe("submitAgentInput", () => {
canSubmit: true,
queueMessage,
submitMessage,
getDraftRevision: () => 0,
clearDraft,
setUserInput,
setAttachments,
@@ -123,6 +172,7 @@ describe("submitAgentInput", () => {
submitMessage: async ({ message }) => {
sent.push(message);
},
getDraftRevision: () => 0,
clearDraft: (lifecycle) => {
composer.draft = lifecycle;
},
@@ -193,6 +243,7 @@ describe("submitAgentInput", () => {
canSubmit: true,
queueMessage,
submitMessage,
getDraftRevision: () => 0,
clearDraft,
setUserInput,
setAttachments,
@@ -232,6 +283,7 @@ describe("submitAgentInput", () => {
submitMessage: async () => {
throw error;
},
getDraftRevision: () => 0,
clearDraft: vi.fn(),
setUserInput,
setAttachments,
@@ -265,6 +317,7 @@ describe("submitAgentInput", () => {
canSubmit: true,
queueMessage,
submitMessage,
getDraftRevision: () => 0,
clearDraft,
setUserInput,
setAttachments,
+6 -2
View File
@@ -17,6 +17,7 @@ export interface AgentInputSubmitActionInput<TAttachment> {
clearDraft: (lifecycle: "sent" | "abandoned") => void;
setUserInput: (text: string) => void;
setAttachments: (attachments: TAttachment[]) => void;
getDraftRevision: () => number;
setSendError: (message: string | null) => void;
setIsProcessing: (isProcessing: boolean) => void;
onSubmitError?: (error: unknown) => void;
@@ -50,18 +51,21 @@ export async function submitAgentInput<TAttachment>(
input.setUserInput("");
input.setAttachments([]);
}
const submittedRevision = shouldClearOnSubmit ? input.getDraftRevision() : null;
input.setSendError(null);
input.setIsProcessing(true);
try {
const deliver = shouldQueue ? input.queueMessage : input.submitMessage;
await deliver({ message: trimmedMessage, attachments });
input.clearDraft("sent");
if (!shouldClearOnSubmit || input.getDraftRevision() === submittedRevision) {
input.clearDraft("sent");
}
input.setIsProcessing(false);
return shouldQueue ? "queued" : "submitted";
} catch (error) {
input.onSubmitError?.(error);
if (shouldClearOnSubmit) {
if (shouldClearOnSubmit && input.getDraftRevision() === submittedRevision) {
input.setUserInput(trimmedMessage);
input.setAttachments(attachments);
}
+4
View File
@@ -1192,6 +1192,7 @@ const ChatAgentReadyContent = memo(function ChatAgentReadyContent({
textReplacement,
attachments,
setAttachments,
getRevision,
clear,
isHydrated,
attachmentFocusRequestId,
@@ -1205,6 +1206,7 @@ const ChatAgentReadyContent = memo(function ChatAgentReadyContent({
textReplacement,
attachments,
setAttachments,
getRevision,
clear,
isHydrated,
attachmentFocusRequestId,
@@ -1217,6 +1219,7 @@ const ChatAgentReadyContent = memo(function ChatAgentReadyContent({
textReplacement,
attachments,
setAttachments,
getRevision,
clear,
isHydrated,
attachmentFocusRequestId,
@@ -1859,6 +1862,7 @@ function ActiveAgentComposer({
onOpenWorkspaceAttachment={handleOpenWorkspaceAttachment}
onChangeAttachments={agentInputDraft.setAttachments}
cwd={cwd}
getDraftRevision={agentInputDraft.getRevision}
clearDraft={agentInputDraft.clear}
editingSession={editingSession}
autoFocus
@@ -3,8 +3,13 @@ import appPackage from "../../package.json";
import { afterEach, expect, it } from "vitest";
import { QueryObserver } from "@tanstack/react-query";
import { DaemonClient } from "@getpaseo/client/internal/daemon-client";
import type { SessionOutboundMessage } from "@getpaseo/protocol/messages";
import type {
GetProvidersSnapshotResponseMessage,
SessionOutboundMessage,
} from "@getpaseo/protocol/messages";
import { compactProviderSnapshot } from "@getpaseo/protocol/provider-snapshot-codec";
import { settingsRpc } from "@getpaseo/plugin";
import { providerSnapshotIcons, replaceProviderSnapshotIcons } from "@/data/provider-icons";
import { syncPluginCatalog } from "./catalog-sync-model";
import { createPluginHosts } from "./hosts";
import { openPluginNotification } from "./notification-open";
@@ -569,3 +574,90 @@ it("keeps catalog loading before server_info arrives so cold-launch plugin taps
expect(h.registry.getCatalogStatus("host")).toBe("ready");
expect(openedRoutes).toEqual(["/h/host/plugin/ci-alerts/surface/alert?param.buildId=77"]);
});
function providerSnapshotPayload(
provider: string,
iconSvg: string,
snapshotHash: string,
): GetProvidersSnapshotResponseMessage["payload"] {
const entries = [
{
provider,
label: provider,
iconSvg,
enabled: true,
available: true,
status: "ready" as const,
updatedAt: "2026-01-01T00:00:00.000Z",
},
];
const compactSnapshot = compactProviderSnapshot(entries);
return {
requestId: "snapshot-req",
snapshotHash,
generatedAt: "2026-01-01T00:00:00.000Z",
entries,
compactSnapshot,
};
}
it("hydrates provider snapshot icons before installing plugins and refreshes them on catalog changes", async () => {
replaceProviderSnapshotIcons("host", []);
const events: string[] = [];
const firstSvg = '<svg viewBox="0 0 24 24"><path d="M2 2h20v20H2z" /></svg>';
const secondSvg = '<svg viewBox="0 0 24 24"><path d="M6 6h12v12H6z" /></svg>';
let current = { svg: firstSvg, hash: "hash-1" };
class SnapshotCatalogClient extends CatalogClient {
override async getProvidersSnapshot() {
events.push(`snapshot:${current.hash}`);
return providerSnapshotPayload("direct-example", current.svg, current.hash);
}
override async getPluginCatalog() {
events.push(
`catalog:${providerSnapshotIcons.getState().get("host")?.get("direct-example") ?? "missing"}`,
);
return super.getPluginCatalog();
}
}
const h = harness();
const client = new SnapshotCatalogClient();
h.sync({ client, supportsProviderSnapshots: true });
await expect.poll(() => h.registry.getCatalogStatus("host")).toBe("ready");
expect(events).toEqual(["snapshot:hash-1", `catalog:${firstSvg}`]);
expect(providerSnapshotIcons.getState().get("host")?.get("direct-example")).toBe(firstSvg);
current = { svg: secondSvg, hash: "hash-2" };
client.update({
type: "status",
payload: { status: "plugin_catalog_changed", pluginId: "direct-example" },
});
await expect
.poll(() => providerSnapshotIcons.getState().get("host")?.get("direct-example"))
.toBe(secondSvg);
expect(events).toEqual([
"snapshot:hash-1",
`catalog:${firstSvg}`,
"snapshot:hash-2",
`catalog:${secondSvg}`,
]);
});
it("still installs the plugin catalog when provider icon hydration fails", async () => {
replaceProviderSnapshotIcons("host", []);
class FailingSnapshotClient extends CatalogClient {
override async getProvidersSnapshot(): Promise<GetProvidersSnapshotResponseMessage["payload"]> {
throw new Error("Snapshot unavailable");
}
}
const h = harness();
h.sync({ client: new FailingSnapshotClient(), supportsProviderSnapshots: true });
await expect.poll(() => h.registry.getCatalogStatus("host")).toBe("ready");
expect(h.installed().id).toBe("reports");
});
+37 -17
View File
@@ -1,5 +1,7 @@
import { CancelledError } from "@tanstack/react-query";
import type { AudioEngine } from "@/audio";
import type { DaemonClient } from "@getpaseo/client/internal/daemon-client";
import { fetchProvidersSnapshot } from "@/data/providers-snapshot";
import type { PluginRegistry } from "./registry";
import { pluginSettingsKey, pluginSettingsPrefix } from "./settings/query";
@@ -10,6 +12,7 @@ interface CatalogSyncInput {
connected: boolean;
/** `null` while `server_info` has not yet arrived for this host. */
supported: boolean | null;
supportsProviderSnapshots?: boolean;
registry: Pick<
PluginRegistry,
"installCatalog" | "getSnapshot" | "removeHost" | "setCatalogStatus"
@@ -23,6 +26,7 @@ export function syncPluginCatalog({
audio,
connected,
supported,
supportsProviderSnapshots = false,
registry,
onCatalogChanged,
}: CatalogSyncInput): () => void {
@@ -41,27 +45,42 @@ export function syncPluginCatalog({
registry.setCatalogStatus(serverId, "loading");
const installationOptions = { client, audio };
let cancelled = false;
const abortController = new AbortController();
let refreshQueue = Promise.resolve();
async function prepareProviderIcons() {
if (!supportsProviderSnapshots) return;
try {
await fetchProvidersSnapshot({
client,
serverId,
cwd: null,
signal: abortController.signal,
});
} catch (error) {
if (!cancelled && !(error instanceof CancelledError)) {
console.warn(`[Plugins] Failed to load provider icons for ${serverId}`, error);
}
}
}
function refresh(replacePluginId?: string) {
refreshQueue = refreshQueue.then(() => {
refreshQueue = refreshQueue.then(async () => {
if (cancelled) return undefined;
registry.setCatalogStatus(serverId, "loading");
return client
.getPluginCatalog()
.then((catalog) => {
if (!cancelled) {
registry.installCatalog(serverId, catalog, { ...installationOptions, replacePluginId });
registry.setCatalogStatus(serverId, "ready");
}
return undefined;
})
.catch((error) => {
if (!cancelled) {
registry.setCatalogStatus(serverId, "error");
console.warn(`[Plugins] Failed to load catalog for ${serverId}`, error);
}
return undefined;
});
await prepareProviderIcons();
if (cancelled) return undefined;
try {
const catalog = await client.getPluginCatalog();
if (!cancelled) {
registry.installCatalog(serverId, catalog, { ...installationOptions, replacePluginId });
registry.setCatalogStatus(serverId, "ready");
}
} catch (error) {
if (!cancelled) {
registry.setCatalogStatus(serverId, "error");
console.warn(`[Plugins] Failed to load catalog for ${serverId}`, error);
}
}
return undefined;
});
return refreshQueue;
}
@@ -104,6 +123,7 @@ export function syncPluginCatalog({
});
return () => {
cancelled = true;
abortController.abort();
void observation
.release()
.catch((error) => console.warn("[Plugins] Failed to release catalog", error));
+4 -2
View File
@@ -2,7 +2,7 @@ import { useVoiceAudioEngineOptional } from "@/contexts/voice-context";
import { useEffect } from "react";
import { useQueryClient } from "@tanstack/react-query";
import type { DaemonClient } from "@getpaseo/client/internal/daemon-client";
import { useHostFeatureAvailability } from "@/runtime/host-features";
import { useHostFeature, useHostFeatureAvailability } from "@/runtime/host-features";
import { useHostRuntimeIsConnected } from "@/runtime/host-runtime";
import { pluginListQueryKey } from "./plugin-list";
import { pluginRegistry } from "./registry";
@@ -18,6 +18,7 @@ export function PluginCatalogSync({
const audio = useVoiceAudioEngineOptional();
const connected = useHostRuntimeIsConnected(serverId);
const supported = useHostFeatureAvailability(serverId, "plugins");
const supportsProviderSnapshots = useHostFeature(serverId, "providersSnapshot");
const queryClient = useQueryClient();
useEffect(
@@ -28,12 +29,13 @@ export function PluginCatalogSync({
audio,
connected,
supported,
supportsProviderSnapshots,
registry: pluginRegistry,
onCatalogChanged: () => {
void queryClient.invalidateQueries({ queryKey: pluginListQueryKey(serverId) });
},
}),
[audio, client, connected, queryClient, serverId, supported],
[audio, client, connected, queryClient, serverId, supported, supportsProviderSnapshots],
);
useEffect(() => () => pluginRegistry.removeHost(serverId), [serverId]);
+2 -2
View File
@@ -798,10 +798,10 @@ describe("evaluatePluginClientBundle", () => {
const plugin = evaluatePluginClientBundle(
"example",
`(function(require) {
const { Icon, Modal, useToast, SettingsSection, SidebarRow, StreamedText } = require("@getpaseo/plugin/client/ui");
const { Icon, ProviderIcon, Modal, useToast, SettingsSection, SidebarRow, StreamedText } = require("@getpaseo/plugin/client/ui");
const module = { exports: {} };
module.exports.default = function(plugin) {
if (typeof Icon !== "function" || typeof Modal !== "function" || typeof Modal.Content !== "function" || typeof useToast !== "function" || typeof SettingsSection !== "function" || typeof SidebarRow !== "function" || typeof StreamedText !== "function") {
if (typeof Icon !== "function" || typeof ProviderIcon !== "function" || typeof Modal !== "function" || typeof Modal.Content !== "function" || typeof useToast !== "function" || typeof SettingsSection !== "function" || typeof SidebarRow !== "function" || typeof StreamedText !== "function") {
throw new Error("React Native plugin UI is incomplete");
}
plugin.addSurface("main", function Surface() { return null; });
+166 -6
View File
@@ -1,14 +1,77 @@
import { Settings } from "lucide-react-native";
import React, { isValidElement, type ReactElement, type ReactNode } from "react";
import { SvgXml } from "react-native-svg";
import { describe, expect, it } from "vitest";
// @vitest-environment jsdom
import { createPaseoApi } from "@getpaseo/client";
import { DaemonClient } from "@getpaseo/client/internal/daemon-client";
import type { PluginIconProps } from "@getpaseo/plugin";
import { Icon, parsePluginIcon, parseSerializablePluginIcon, PluginIconView } from "./icons";
import { PluginTranslationRuntime } from "@getpaseo/plugin/client/host";
import { QueryClient } from "@tanstack/react-query";
import { act, cleanup, renderHook } from "@testing-library/react";
import { Bot, Settings } from "lucide-react-native";
import React, { isValidElement, type ReactElement, type ReactNode } from "react";
import Svg, { SvgXml } from "react-native-svg";
import { afterEach, describe, expect, it } from "vitest";
import { replaceProviderSnapshotIcons } from "@/data/provider-icons";
import { runPluginClientBundle, type PluginClientRuntime } from "./evaluate";
import {
Icon,
parsePluginIcon,
parseSerializablePluginIcon,
PluginIconView,
ProviderIcon,
} from "./icons";
import { PluginInstallationProvider } from "./installation-provider";
import type { InstalledPlugin } from "./types";
const SVG = '<svg viewBox="0 0 24 24"><path fill="currentColor" d="M4 4h16v16H4z" /></svg>';
const SVG_ICON = { svg: SVG };
const GLYPHS = new Set<unknown>([Settings, SvgXml]);
const GLYPHS = new Set<unknown>([Settings, Bot, Svg, SvgXml]);
afterEach(() => {
cleanup();
replaceProviderSnapshotIcons("host-a", []);
replaceProviderSnapshotIcons("host-b", []);
});
function makePlugin(serverId: string): InstalledPlugin {
return {
id: "icons-test",
serverId,
clientBundle: "",
lifetime: new AbortController(),
locale: "en",
i18n: new PluginTranslationRuntime({ getLocale: () => "en", subscribe: () => () => {} }),
paseo: createPaseoApi(
new DaemonClient({
url: "ws://127.0.0.1:1",
clientId: "icons-test",
reconnect: { enabled: false },
}),
),
invoke: async () => undefined,
subscribe: () => {
throw new Error("Subscriptions are not used here");
},
queryClient: new QueryClient(),
cleanup: () => undefined,
settingsScreens: [],
surfaces: [],
sidebarViews: [],
sidebarItems: { header: [], footer: [] },
legacySidebarItems: [],
workspaceRowBadgeItems: [],
filePanels: [],
composerItems: [],
newWorkspaceItems: [],
workspacePanels: [],
commandCenterItems: [],
clientSlashCommands: [],
attachmentSources: [],
themes: [],
timelineTransformers: [],
timelineRenderers: [],
notificationOpenHandlers: [],
};
}
/** Expands function components down to what reaches the screen: a Lucide glyph, SvgXml, or DOM. */
function draw(node: ReactNode): ReactElement | null {
@@ -102,3 +165,100 @@ describe("Icon", () => {
expect(Icon({ icon: { svg: '<svg onload="run()"></svg>' } })).toBeNull();
});
});
describe("ProviderIcon", () => {
function hostWrapper(serverId: string) {
const plugin = makePlugin(serverId);
return function Wrapper({ children }: { children: ReactNode }) {
return <PluginInstallationProvider plugin={plugin}>{children}</PluginInstallationProvider>;
};
}
it("renders built-in, catalog, host-scoped daemon plugin SVGs, reactive updates, and fallback icons", () => {
const evaluated = runPluginClientBundle(
{ serverId: "host-a", pluginId: "icons-test" },
`(function(require) {
const { ProviderIcon } = require("@getpaseo/plugin/client/ui");
return {
default: function(plugin) {
plugin.addSurface("main", function() { return null; });
plugin.__ProviderIcon = ProviderIcon;
return function() {};
},
};
})`,
{} as PluginClientRuntime,
);
expect(evaluated.surfaces.map((s) => s.id)).toEqual(["main"]);
const hostASvg = '<svg viewBox="0 0 24 24"><path d="M4 4h16v16H4z" /></svg>';
const hostBSvg = '<svg viewBox="0 0 24 24"><path d="M12 2L2 22h20z" /></svg>';
replaceProviderSnapshotIcons("host-a", [{ provider: "direct-example", iconSvg: hostASvg }]);
replaceProviderSnapshotIcons("host-b", [{ provider: "direct-example", iconSvg: hostBSvg }]);
const wrapper = hostWrapper("host-a");
// Built-in provider resolves without hostId
const builtin = renderHook(
() => ProviderIcon({ provider: "codex", size: 18, color: "#123456" }),
{ wrapper },
);
expect(draw(builtin.result.current)).toMatchObject({
type: Svg,
props: { width: 18, height: 18, fill: "#123456" },
});
// Catalog provider resolves with defaults
const catalog = renderHook(() => ProviderIcon({ provider: "devin" }), { wrapper });
expect(draw(catalog.result.current)).toMatchObject({
type: SvgXml,
props: { width: 24, height: 24, color: "currentColor" },
});
// Daemon-registered plugin provider defaults to enclosing installation host and reacts to updates
const implicitHost = renderHook(
() => ProviderIcon({ provider: "direct-example", size: 20, color: "#abcdef" }),
{ wrapper },
);
expect(draw(implicitHost.result.current)).toMatchObject({
type: SvgXml,
props: { xml: hostASvg, width: 20, height: 20, color: "#abcdef" },
});
const updatedSvg = '<svg viewBox="0 0 24 24"><path d="M1 1h22v22H1z" /></svg>';
act(() => {
replaceProviderSnapshotIcons("host-a", [{ provider: "direct-example", iconSvg: updatedSvg }]);
});
expect(draw(implicitHost.result.current)).toMatchObject({
type: SvgXml,
props: { xml: updatedSvg, width: 20, height: 20, color: "#abcdef" },
});
// Explicit hostId targets the named host without leaking across hosts
const explicitHost = renderHook(
() =>
ProviderIcon({ provider: "direct-example", hostId: "host-b", size: 16, color: "#654321" }),
{ wrapper },
);
expect(draw(explicitHost.result.current)).toMatchObject({
type: SvgXml,
props: { xml: hostBSvg, width: 16, height: 16, color: "#654321" },
});
// Unknown provider falls back to Bot
const fallback = renderHook(
() =>
ProviderIcon({
provider: "unknown-provider",
hostId: "host-a",
size: 18,
color: "#111111",
}),
{ wrapper },
);
expect(draw(fallback.result.current)).toMatchObject({
type: Bot,
props: { size: 18, color: "#111111" },
});
});
});
+15 -2
View File
@@ -8,8 +8,9 @@ import {
type PluginSvgIcon,
} from "@getpaseo/plugin";
import type { PluginIcon } from "@getpaseo/plugin/client";
import type { IconProps } from "@getpaseo/plugin/client/ui";
import { SvgIcon } from "@/components/provider-icons";
import type { IconProps, PluginProviderIconProps } from "@getpaseo/plugin/client/ui";
import { SvgIcon, useProviderIcon } from "@/components/provider-icons";
import { usePluginInstallationServerId } from "./installation-provider";
/** Host surfaces may thin a Lucide stroke; SVG and plugin components ignore it. */
type HostIconProps = PluginIconProps & { strokeWidth?: number };
@@ -153,3 +154,15 @@ export function Icon(props: IconProps): ReactElement | null {
const color = props.color ?? "currentColor";
return createElement(PluginIconView, { icon, size, color });
}
/** The kit `ProviderIcon`. Resolves built-in, catalog, or host-scoped plugin provider icons. */
export function ProviderIcon({
provider,
hostId,
size = 24,
color = "currentColor",
}: PluginProviderIconProps): ReactElement {
const installationServerId = usePluginInstallationServerId();
const icon = useProviderIcon(provider, hostId ?? installationServerId);
return createElement(icon, { size, color });
}
+1 -1
View File
@@ -20,7 +20,7 @@ export { FilePanelLoading as Loading } from "@/file-panels/loading";
// COMPAT(pluginSettingsGroup): added in v0.13.0, remove after 2027-04-20
export { SettingsGroup } from "@/components/settings";
export { Icon } from "../icons";
export { Icon, ProviderIcon } from "../icons";
export { Action, Combobox, Select, Toggle } from "./composer-controls";
export { Modal } from "./modal";
export { ScrollView, FlatList } from "./scroll-view";
@@ -1,3 +1,4 @@
import { Session } from "node:inspector/promises";
import { getPluginClientApi } from "./client-state/api";
import { filePanelTitle } from "@/file-panels/choice/presentation";
import { i18n } from "@/i18n/i18next";
@@ -236,3 +237,27 @@ test("locale snapshots preserve installation state and observations, then releas
expect(listeners.size).toBe(0);
await expect.poll(() => h.open.size).toBe(0);
});
test("reloading a plugin releases the previous installation", async () => {
const h = registry();
const options = { client: h.client, audio };
const entry = catalog("reloaded");
h.plugins.installCatalog("host", [entry], options);
// The published snapshot is a copy. Its lifetime belongs to the installation itself.
const previous = new WeakRef(h.plugins.getSnapshot()[0]!.lifetime);
h.plugins.installCatalog("host", [entry], { ...options, replacePluginId: entry.id });
expect(h.plugins.getSnapshot()[0]?.lifetime).not.toBe(previous.deref());
const inspector = new Session();
inspector.connect();
try {
await new Promise<void>((resolve) => setImmediate(resolve));
await inspector.post("HeapProfiler.collectGarbage");
expect(previous.deref() === undefined).toBe(true);
expect(h.plugins.getSnapshot()).toHaveLength(1);
} finally {
inspector.disconnect();
h.plugins.removeHost("host");
}
});
+107 -85
View File
@@ -89,91 +89,15 @@ export class PluginRegistry {
this.publish();
for (const plugin of removed) this.dispose(plugin);
}
const installed = catalog.flatMap((entry) => {
const key = `${serverId}/${entry.id}`;
let installation: InstalledPlugin | undefined;
try {
if (!entry.clientBundle) return [];
assertPluginCompatibility({ ...entry, version: this.dependencies.version, runtime: "app" });
const existing = preserved.find(
(plugin) => plugin.id === entry.id && plugin.clientBundle === entry.clientBundle,
);
if (existing) {
this.evaluationErrors.delete(key);
return [existing];
}
const client = options.client;
const lifetime = new AbortController();
installation = {
lifetime,
locale: this.dependencies.localeSource.getLocale(),
i18n: new PluginTranslationRuntime(this.dependencies.localeSource),
paseo: createPaseoApi(client),
invoke: (method, input) => client.invokePluginRpc(entry.id, method, input),
subscribe: createPluginSubscribe({
client,
pluginId: entry.id,
lifetime: lifetime.signal,
}),
id: entry.id,
serverId,
clientBundle: entry.clientBundle,
requirements: entry.requirements,
queryClient: new QueryClient(),
cleanup: () => undefined,
surfaces: [],
settingsScreens: [],
sidebarViews: [],
sidebarItems: { header: [], footer: [] },
legacySidebarItems: [],
workspaceRowBadgeItems: [],
filePanels: [],
composerItems: [],
newWorkspaceItems: [],
workspacePanels: [],
commandCenterItems: [],
clientSlashCommands: [],
attachmentSources: [],
themes: [],
timelineTransformers: [],
timelineRenderers: [],
notificationOpenHandlers: [],
};
const unsubscribeTranslations = installation.i18n.subscribe(() => this.publish());
installation.lifetime.signal.addEventListener("abort", unsubscribeTranslations, {
once: true,
});
const runtime = this.dependencies.createRuntime(installation, options.audio);
const evaluated = runPluginClientBundle(
{ serverId, pluginId: entry.id },
entry.clientBundle,
runtime,
() => this.publish(),
);
Object.assign(installation, evaluated);
const paseo = installation.paseo;
installation.cleanup = async () => {
const results = await Promise.allSettled([paseo.dispose(), evaluated.cleanup()]);
const failures = results.filter((result) => result.status === "rejected");
if (failures.length)
throw new AggregateError(
failures.map((result) => result.reason),
"Plugin cleanup failed",
);
};
this.evaluationErrors.delete(key);
return [installation];
} catch (error) {
installation?.lifetime.abort();
installation?.i18n.dispose();
void installation?.paseo
.dispose()
.catch((failure) => console.warn(`[Plugins] API cleanup failed for ${key}`, failure));
this.evaluationErrors.set(key, error instanceof Error ? error.message : String(error));
console.warn(`[Plugins] Failed to evaluate ${serverId}/${entry.id}`, error);
return [];
}
});
const installed = catalog.flatMap((entry) =>
this.installPlugin({
serverId,
entry,
preserved,
client: options.client,
audio: options.audio,
}),
);
const configuredIds = new Set(catalog.map((entry) => entry.id));
for (const key of this.evaluationErrors.keys()) {
if (key.startsWith(`${serverId}/`) && !configuredIds.has(key.slice(serverId.length + 1))) {
@@ -215,6 +139,104 @@ export class PluginRegistry {
this.publish();
}
// Keep the closures for one installation out of the scope that holds the previous catalog.
private installPlugin({
serverId,
entry,
preserved,
client,
audio,
}: {
serverId: string;
entry: CatalogPlugin;
preserved: InstalledPlugin[];
client: DaemonClient;
audio: Pick<AudioEngine, "play">;
}): InstalledPlugin[] {
const key = `${serverId}/${entry.id}`;
let installation: InstalledPlugin | undefined;
try {
if (!entry.clientBundle) return [];
assertPluginCompatibility({ ...entry, version: this.dependencies.version, runtime: "app" });
const existing = preserved.find(
(plugin) => plugin.id === entry.id && plugin.clientBundle === entry.clientBundle,
);
if (existing) {
this.evaluationErrors.delete(key);
return [existing];
}
const lifetime = new AbortController();
installation = {
lifetime,
locale: this.dependencies.localeSource.getLocale(),
i18n: new PluginTranslationRuntime(this.dependencies.localeSource),
paseo: createPaseoApi(client),
invoke: (method, input) => client.invokePluginRpc(entry.id, method, input),
subscribe: createPluginSubscribe({
client,
pluginId: entry.id,
lifetime: lifetime.signal,
}),
id: entry.id,
serverId,
clientBundle: entry.clientBundle,
requirements: entry.requirements,
queryClient: new QueryClient(),
cleanup: () => undefined,
surfaces: [],
settingsScreens: [],
sidebarViews: [],
sidebarItems: { header: [], footer: [] },
legacySidebarItems: [],
workspaceRowBadgeItems: [],
filePanels: [],
composerItems: [],
newWorkspaceItems: [],
workspacePanels: [],
commandCenterItems: [],
clientSlashCommands: [],
attachmentSources: [],
themes: [],
timelineTransformers: [],
timelineRenderers: [],
notificationOpenHandlers: [],
};
const unsubscribeTranslations = installation.i18n.subscribe(() => this.publish());
installation.lifetime.signal.addEventListener("abort", unsubscribeTranslations, {
once: true,
});
const runtime = this.dependencies.createRuntime(installation, audio);
const evaluated = runPluginClientBundle(
{ serverId, pluginId: entry.id },
entry.clientBundle,
runtime,
() => this.publish(),
);
Object.assign(installation, evaluated);
const paseo = installation.paseo;
installation.cleanup = async () => {
const results = await Promise.allSettled([paseo.dispose(), evaluated.cleanup()]);
const failures = results.filter((result) => result.status === "rejected");
if (failures.length)
throw new AggregateError(
failures.map((result) => result.reason),
"Plugin cleanup failed",
);
};
this.evaluationErrors.delete(key);
return [installation];
} catch (error) {
installation?.lifetime.abort();
installation?.i18n.dispose();
void installation?.paseo
.dispose()
.catch((failure) => console.warn(`[Plugins] API cleanup failed for ${key}`, failure));
this.evaluationErrors.set(key, error instanceof Error ? error.message : String(error));
console.warn(`[Plugins] Failed to evaluate ${serverId}/${entry.id}`, error);
return [];
}
}
private hostEvaluationErrors(serverId: string): string {
const prefix = `${serverId}/`;
return JSON.stringify(
@@ -271,6 +271,53 @@ describe("AgentDirectoryReplica", () => {
store.clearSession(serverId);
});
it("ignores a lagging running snapshot for a turn already closed by stream_close", () => {
const serverId = "agent-replica-stale-running-snapshot";
const store = useSessionStore.getState();
store.initializeSession(serverId, null as unknown as DaemonClient);
const replica = new AgentDirectoryReplica(serverId, () => undefined);
replica.commitSnapshot(
[
entry({
...payload("running"),
status: "running",
activeTurn: { turnId: "turn-1", startedAt: "2026-07-17T00:01:00.000Z" },
}),
],
[],
);
replica.applyTurnLiveness("agent", { type: "stream_close", turnId: "turn-1" });
expect(selectAgentTurnPresentation(store.getSession(serverId), "agent").isActive).toBe(false);
// An empty directory catch-up re-projects the unchanged idle agent as activeTurn: null;
// it must preserve the closed turn marker so a lagging running delta still cannot re-open it.
replica.commitChanges([], [], []);
replica.applyDelta({
kind: "upsert",
agent: {
...payload("stale usage update"),
status: "running",
activeTurn: { turnId: "turn-1", startedAt: "2026-07-17T00:01:00.000Z" },
},
project: entry(payload("project")).project,
});
expect(selectAgentTurnPresentation(store.getSession(serverId), "agent").isActive).toBe(false);
replica.applyDelta({
kind: "upsert",
agent: { ...payload("idle"), status: "idle", activeTurn: null },
project: entry(payload("project")).project,
});
expect(selectAgentTurnPresentation(store.getSession(serverId), "agent").isActive).toBe(false);
expect(store.getSession(serverId)?.agents.get("agent")?.turn).toMatchObject({
phase: "idle",
cancellationRequestId: null,
});
store.clearSession(serverId);
});
it("preserves an unchanged running agent's turn identity during catch-up", () => {
const serverId = "agent-replica-catch-up";
const store = useSessionStore.getState();
@@ -200,6 +200,7 @@ interface NewWorkspaceScreenProps {
const NO_TERMINAL_ATTACHMENTS: UserComposerAttachment[] = [];
function noopChangeAttachments() {}
function noopClearDraft() {}
const getTerminalDraftRevision = () => 0;
// Stable reference so the keyboard-action handler doesn't re-register each render.
const PROJECT_PICK_ACTIONS: readonly KeyboardActionId[] = [
@@ -1685,6 +1686,7 @@ export function NewWorkspaceScreen({
attachments={NO_TERMINAL_ATTACHMENTS}
onChangeAttachments={noopChangeAttachments}
cwd={workingDirectory ?? ""}
getDraftRevision={getTerminalDraftRevision}
clearDraft={noopClearDraft}
autoFocus={terminalTakesPrompt}
autoFocusKey={launchFocusKey}
@@ -1716,6 +1718,7 @@ export function NewWorkspaceScreen({
onForgeChangeRequestDetected={handleForgeChangeRequestDetected}
onForgeChangeRequestAutoAttach={handleForgeChangeRequestAutoAttach}
cwd={workingDirectory ?? ""}
getDraftRevision={chatDraft.getRevision}
clearDraft={handleClearDraft}
autoFocus
autoFocusKey={launchFocusKey}
@@ -45,6 +45,7 @@ import { hasDraftContent } from "@/composer/draft/input-draft-core";
export type { DraftInput, DraftLifecycleState } from "./state";
interface DraftStoreActions {
getDraftRevision: (draftKey: string) => number;
getDraftInput: (draftKey: string) => DraftInput | undefined;
hydrateDraftInput: (input: { draftKey: string }) => Promise<DraftInput | undefined>;
saveDraftInput: (input: { draftKey: string; draft: DraftInput }) => void;
@@ -283,6 +284,11 @@ export const useDraftStore = create<DraftStore>()(
textReplacementRequestByDraftKey: {},
metadataByDraftKey: {},
getDraftRevision: (draftKey) => {
get().flushDraftText(draftKey);
return get().drafts[draftKey]?.version ?? 0;
},
getDraftInput: (draftKey) => {
const record = get().drafts[draftKey];
return toDraftInputIfReady(record);
@@ -28,6 +28,12 @@ describe("draft-store lifecycle", () => {
expect(editDraftRecordText(edited, "", 3).lifecycle).toBe("active");
expect(editDraftRecordText(undefined, "", 3).lifecycle).toBe("abandoned");
});
it("keeps the version when a cleared draft publishes empty text again", () => {
const cleared = editDraftRecordText(undefined, "", 1);
expect(editDraftRecordText(cleared, "", 2)).toBe(cleared);
expect(editDraftRecordText(cleared, "follow-up", 2).version).toBe(cleared.version + 1);
});
it("prunes finalized tombstones after TTL", () => {
const nowMs = 1_000_000;
const drafts = {
+5 -1
View File
@@ -38,7 +38,11 @@ export function editDraftRecordText(
text: string,
now: number,
): DraftRecord {
if (record?.lifecycle === "active" && record.input.text === text) return record;
if (
record?.input.text === text &&
(record.lifecycle === "active" || record.lifecycle === "abandoned")
)
return record;
const attachments = record?.lifecycle === "active" ? record.input.attachments : [];
return {
input: { text, attachments },
@@ -75,4 +75,49 @@ describe("turn activity", () => {
turnId: null,
});
});
it("does not re-open a turn from a lagging snapshot after stream_close ended it", () => {
const open = reduceTurnLiveness(TURN_LIVENESS_IDLE, {
type: "stream_open",
turn: { turnId: "turn-1", startedAt },
});
const closed = reduceTurnLiveness(open, { type: "stream_close", turnId: "turn-1" });
expect(closed.phase).toBe("idle");
// A stale running snapshot for the just-closed turn must not flash it back to open.
const afterStaleSnapshot = reduceTurnLiveness(closed, {
type: "snapshot",
activeTurn: { turnId: "turn-1", startedAt },
});
expect(afterStaleSnapshot).toBe(closed);
expect(resolveTurnPresentation(afterStaleSnapshot, false).isActive).toBe(false);
// An idle snapshot (including an empty directory catch-up) preserves the closed turn marker
// so a delayed running snapshot for the same turn still cannot re-open it.
const afterIdleSnapshot = reduceTurnLiveness(afterStaleSnapshot, {
type: "snapshot",
activeTurn: null,
});
expect(afterIdleSnapshot).toBe(closed);
expect(
reduceTurnLiveness(afterIdleSnapshot, {
type: "snapshot",
activeTurn: { turnId: "turn-1", startedAt },
}),
).toBe(closed);
// A snapshot for a different turn still opens immediately.
const nextStartedAt = new Date("2026-07-31T10:01:00.000Z");
expect(
reduceTurnLiveness(closed, {
type: "snapshot",
activeTurn: { turnId: "turn-2", startedAt: nextStartedAt },
}),
).toEqual({
phase: "open",
turnId: "turn-2",
startedAt: nextStartedAt,
cancellationRequestId: null,
});
});
});
+38 -7
View File
@@ -4,7 +4,7 @@ export interface ActiveTurnIdentity {
}
export type TurnLiveness =
| { phase: "idle"; cancellationRequestId: number | null }
| { phase: "idle"; cancellationRequestId: number | null; closedTurnId?: string }
| {
phase: "open";
turnId: string | null;
@@ -42,8 +42,15 @@ export function applyTurnLivenessTransition(
const next = transitions.reduce(reduceTurnLiveness, current);
if (next === current) return turns as Map<string, TurnLiveness>;
const updated = new Map(turns);
if (next.phase === "idle" && next.cancellationRequestId === null) updated.delete(agentId);
else updated.set(agentId, next);
if (
next.phase === "idle" &&
next.cancellationRequestId === null &&
next.closedTurnId === undefined
) {
updated.delete(agentId);
} else {
updated.set(agentId, next);
}
return updated;
}
@@ -109,7 +116,14 @@ function closeTurn(current: TurnLiveness, turnId: string | null): TurnLiveness {
turnId !== null &&
current.turnId !== null &&
turnId !== current.turnId;
return targetsDifferentIdentifiedTurn ? current : TURN_LIVENESS_IDLE;
if (targetsDifferentIdentifiedTurn) return current;
// Remember the closed turn id until a newer turn opens or destructive_close resets liveness,
// so a lagging running snapshot (even after an empty directory catch-up) cannot re-open a turn
// the stream already ended.
const closedTurnId = turnId ?? (current.phase === "open" ? current.turnId : current.closedTurnId);
return closedTurnId
? { phase: "idle", cancellationRequestId: null, closedTurnId }
: TURN_LIVENESS_IDLE;
}
function openTurn(current: TurnLiveness, activeTurn: ActiveTurnIdentity): TurnLiveness {
@@ -147,7 +161,24 @@ export function reduceTurnLiveness(
return closeTurn(current, transition.turnId);
}
const activeTurn = transition.type === "snapshot" ? transition.activeTurn : transition.turn;
if (!activeTurn) return TURN_LIVENESS_IDLE;
return openTurn(current, activeTurn);
if (transition.type === "snapshot") {
if (!transition.activeTurn) {
if (current.phase === "idle") {
return current.cancellationRequestId === null
? current
: { ...current, cancellationRequestId: null };
}
return TURN_LIVENESS_IDLE;
}
if (
current.phase === "idle" &&
current.closedTurnId !== undefined &&
transition.activeTurn.turnId === current.closedTurnId
) {
return current;
}
return openTurn(current, transition.activeTurn);
}
return openTurn(current, transition.turn);
}
+4 -4
View File
@@ -1,6 +1,6 @@
{
"name": "@getpaseo/cli",
"version": "0.18.2",
"version": "0.19.0-beta.1",
"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.18.2",
"@getpaseo/protocol": "0.18.2",
"@getpaseo/server": "0.18.2",
"@getpaseo/client": "0.19.0-beta.1",
"@getpaseo/protocol": "0.19.0-beta.1",
"@getpaseo/server": "0.19.0-beta.1",
"chalk": "^5.3.0",
"commander": "^12.0.0",
"mime-types": "^2.1.35",
@@ -81,6 +81,11 @@ describe("buildAgentLsFetchOptions", () => {
});
});
it("preserves empty values and punctuation in repeated label filters", () => {
const options = buildAgentLsFetchOptions({ label: ["tag=v=1,rc", "empty="] });
expect(options.filter?.labels).toEqual({ tag: "v=1,rc", empty: "" });
});
it("asks the daemon for internal agents only with --internal", () => {
expect(buildAgentLsFetchOptions({ background: true, global: true })).toEqual({
filter: { includeBackground: true },
@@ -126,6 +131,17 @@ describe("buildAgentLsFetchOptions", () => {
});
describe("runLsCommand", () => {
it.each(["team", "=blue", " =blue"])(
"rejects the whole listing when a label filter is malformed (%j)",
async (label) => {
await expect(
listAgents({ daemonTarget, label: ["bot=worker", label] }, async () =>
createPagingClient(),
),
).rejects.toMatchObject({ code: "INVALID_LABEL", message: `Invalid label format: ${label}` });
},
);
it("includes agent snapshot metadata in JSON listings", async () => {
const result = await listAgents({ daemonTarget, global: true }, async () =>
createPagingClient(),
+17 -13
View File
@@ -141,16 +141,20 @@ export interface AgentLsOptions extends CommandOptions {
}
function parseLabelFilters(labels: string[] | undefined): Record<string, string> {
const labelFilters: Record<string, string> = {};
for (const labelStr of labels ?? []) {
const eqIndex = labelStr.indexOf("=");
if (eqIndex !== -1) {
const key = labelStr.slice(0, eqIndex);
const value = labelStr.slice(eqIndex + 1);
labelFilters[key] = value;
}
}
return labelFilters;
return Object.fromEntries(
(labels ?? []).map((label) => {
const separator = label.indexOf("=");
const key = label.slice(0, separator);
if (separator === -1 || !key.trim()) {
throw {
code: "INVALID_LABEL",
message: `Invalid label format: ${label}`,
details: "Labels must include a non-empty key in key=value format",
} satisfies CommandError;
}
return [key, label.slice(separator + 1)];
}),
);
}
export function buildAgentLsFetchOptions(
@@ -211,6 +215,7 @@ export async function listAgents(
options: Parameters<typeof connectToDaemon>[0],
) => Promise<AgentLsClient> = connectToDaemon,
): Promise<AgentLsResult> {
const fetchOptions = buildAgentLsFetchOptions(options);
const client = await connect({ target: options.daemonTarget });
try {
@@ -223,8 +228,6 @@ export async function listAgents(
throw error;
}
const labelFilters = parseLabelFilters(options.label);
const fetchOptions = buildAgentLsFetchOptions(options);
let agents = await fetchAllAgents(client, fetchOptions);
// By default, exclude archived agents. `-a` includes them.
@@ -243,7 +246,8 @@ export async function listAgents(
}
// Apply label filtering only when explicitly requested.
if (Object.keys(labelFilters).length > 0) {
const labelFilters = fetchOptions.filter?.labels;
if (labelFilters) {
agents = agents.filter((a) => {
const agentLabels = a.labels;
for (const [key, value] of Object.entries(labelFilters)) {
+1 -5
View File
@@ -17,11 +17,7 @@ export async function connectTerminalClient(target: DaemonTarget) {
try {
const daemonClient = await connectToDaemon({ target });
const terminals = createTerminalActions(daemonClient, async (workspaceId) => {
const result = await daemonClient.fetchWorkspaces({
filter: { idPrefix: workspaceId, includeBackground: true },
page: { limit: 10 },
});
const workspace = result.entries.find((entry) => entry.id === workspaceId);
const workspace = await daemonClient.findWorkspace(workspaceId);
if (!workspace?.workspaceDirectory) {
throw new Error(`Workspace ${workspaceId} is not active or has no available directory`);
}
@@ -73,6 +73,18 @@ try {
await cli(["terminal", "kill", feature.id]);
assert.deepEqual(await cli(["terminal", "ls", "--workspace", second.id]), []);
assert.deepEqual(await cli(["terminal", "ls", "--workspace", first.id]), [main]);
for (let i = 0; i < 9; i++) {
await sdk.workspaces.create({
source: { kind: "directory", path: ctx.workDir },
title: `extra-${i}`,
});
}
const workspaces = await cli(["workspace", "ls"]);
assert.equal(workspaces.length, 11);
const { workspaceId, cwd } = workspaces[10];
const created = await cli(["terminal", "create", "--workspace", workspaceId, "--name", "Older"]);
assert.deepEqual(created, { id: created.id, name: "Older", workspaceId, cwd });
await cli(["terminal", "kill", created.id]);
console.log("Terminal workspace CLI: ownership, lists, input, capture, kill, and errors passed");
} finally {
await sdk.close();
+3 -3
View File
@@ -1,6 +1,6 @@
{
"name": "@getpaseo/client",
"version": "0.18.2",
"version": "0.19.0-beta.1",
"description": "Paseo client SDK package",
"license": "Apache-2.0",
"files": [
@@ -57,8 +57,8 @@
"measure:diff-materialization": "tsx scripts/measure-diff-materialization.ts"
},
"dependencies": {
"@getpaseo/protocol": "0.18.2",
"@getpaseo/relay": "0.18.2",
"@getpaseo/protocol": "0.19.0-beta.1",
"@getpaseo/relay": "0.19.0-beta.1",
"ws": "^8.20.0",
"zod": "^4.4.3"
},
+7 -6
View File
@@ -669,9 +669,10 @@ async function clickGuestElement(page, client, browserId, selector) {
}
async function selectDeviceSize(page, label) {
await page.locator('[aria-label="Device size"]').click();
const item = page.getByText(label, { exact: true });
await item.waitFor({ state: "visible", timeout: timeoutMs });
const trigger = page.getByLabel("Device size", { exact: true });
const item = page.getByRole("menuitem", { name: label, exact: true });
await trigger.click();
await item.click({ trial: true, timeout: timeoutMs });
const rect = await item.boundingBox();
assert(rect, `Device size menu item ${label} had no bounds`);
const clip = {
@@ -685,9 +686,9 @@ async function selectDeviceSize(page, label) {
await item.waitFor({ state: "hidden", timeout: timeoutMs });
const closedPixels = await page.screenshot({ clip });
await page.locator('[aria-label="Device size"]').click();
await item.waitFor({ state: "visible", timeout: timeoutMs });
await page.mouse.click(rect.x + rect.width / 2, rect.y + rect.height / 2);
await trigger.click();
// The reopened menu renders off-screen while measuring. Click its current position after layout.
await item.click({ timeout: timeoutMs });
await page.keyboard.press("Escape");
return !openPixels.equals(closedPixels);
}
+1 -1
View File
@@ -1,6 +1,6 @@
{
"name": "@getpaseo/desktop",
"version": "0.18.2",
"version": "0.19.0-beta.1",
"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.18.2",
"version": "0.19.0-beta.1",
"description": "Native module for two way audio streaming",
"keywords": [
"ExpoTwoWayAudio",
+1 -1
View File
@@ -1,6 +1,6 @@
{
"name": "@getpaseo/highlight",
"version": "0.18.2",
"version": "0.19.0-beta.1",
"license": "Apache-2.0",
"files": [
"dist",
+5 -5
View File
@@ -1,6 +1,6 @@
{
"name": "@getpaseo/plugin",
"version": "0.18.2",
"version": "0.19.0-beta.1",
"description": "Paseo plugin SDK package",
"license": "Apache-2.0",
"files": [
@@ -83,8 +83,8 @@
"use-sync-external-store": "^1.6.0"
},
"devDependencies": {
"@getpaseo/client": "0.18.2",
"@getpaseo/protocol": "0.18.2",
"@getpaseo/client": "0.19.0-beta.1",
"@getpaseo/protocol": "0.19.0-beta.1",
"@types/node": "^20.9.0",
"@types/react": "~19.2.0",
"react": "19.2.3",
@@ -94,8 +94,8 @@
"zod": "^4.4.3"
},
"peerDependencies": {
"@getpaseo/client": "0.18.2",
"@getpaseo/protocol": "0.18.2",
"@getpaseo/client": "0.19.0-beta.1",
"@getpaseo/protocol": "0.19.0-beta.1",
"react": ">=19.1.0 <20",
"react-native": ">=0.81.5",
"zod": "^4.4.3"
+47
View File
@@ -1009,3 +1009,50 @@ describe("tunnel provider SDK boundary", () => {
).toEqual([]);
});
});
describe("provider icon SDK boundary", () => {
it("exposes ProviderIcon and PluginProviderIconProps from client UI and client types", () => {
expect(
typeErrors(`
import type {
PluginClientContext,
PluginProviderIconProps,
PluginSurfaceProps,
} from "@getpaseo/plugin/client";
import {
Icon,
ProviderIcon,
type PluginProviderIconProps as UiProviderIconProps,
} from "@getpaseo/plugin/client/ui";
function Surface({ host, theme }: PluginSurfaceProps) {
const explicit: PluginProviderIconProps = {
provider: "codex",
hostId: host.id,
size: 18,
color: theme.colors.foreground,
};
const implicit: UiProviderIconProps = {
provider: "claude",
};
return (
<>
<Icon name="Settings" size={18} color={theme.colors.foreground} />
<ProviderIcon {...explicit} />
<ProviderIcon {...implicit} />
{/* @ts-expect-error provider is required */}
<ProviderIcon hostId={host.id} />
{/* @ts-expect-error hostId must be a string when passed */}
<ProviderIcon provider="codex" hostId={123} />
</>
);
}
export default function contribute(client: PluginClientContext) {
client.addScreen({ id: "main", title: "Main", Component: Surface });
return () => {};
}
`),
).toEqual([]);
});
});
+8
View File
@@ -159,6 +159,14 @@ export type PluginIcon<Props extends PluginIconProps = PluginIconProps> =
| PluginSerializableIcon
| ComponentType<Props>;
export interface PluginProviderIconProps {
provider: string;
/** Target host ID. Defaults to the current plugin installation's host. */
hostId?: string;
size?: number;
color?: string;
}
export type PluginPanelLocation = "workspace" | "explorer";
export interface PluginOpenPanelOptions {
+1
View File
@@ -22,6 +22,7 @@ export type {
PluginWorkspaceRowBadgeItemProps,
PluginWorkspaceRowBadgeItemContribution,
PluginIcon,
PluginProviderIconProps,
PluginPanelLocation,
PluginOpenPanelOptions,
PluginWorkspacePanelProps,
+4 -1
View File
@@ -19,7 +19,7 @@ import type {
TextProps,
} from "react-native";
import type { PluginIconProps } from "../icons.js";
import type { PluginIcon } from "./contracts.js";
import type { PluginIcon, PluginProviderIconProps } from "./contracts.js";
export interface ModalProps {
title: string;
@@ -60,6 +60,8 @@ export type IconProps = Partial<PluginIconProps> &
({ name: string; icon?: never } | { icon: PluginIcon; name?: never });
export declare const Icon: ComponentType<IconProps>;
/** Renders Paseo's icon for a built-in, catalog, or plugin-provided agent provider. */
export declare const ProviderIcon: ComponentType<PluginProviderIconProps>;
export declare const Modal: ModalComponent;
export declare function useToast(): ToastApi;
export interface StreamedTextProps extends Omit<TextProps, "children"> {
@@ -70,6 +72,7 @@ export interface StreamedTextProps extends Omit<TextProps, "children"> {
export declare const StreamedText: ComponentType<StreamedTextProps>;
export type { PluginIconProps } from "../icons.js";
export type { PluginProviderIconProps } from "./contracts.js";
/** React Native scrolling with the host's sheet gestures when rendered inside a sheet. */
export declare const ScrollView: ForwardRefExoticComponent<
+1 -1
View File
@@ -1,6 +1,6 @@
{
"name": "@getpaseo/protocol",
"version": "0.18.2",
"version": "0.19.0-beta.1",
"description": "Paseo shared protocol schemas and wire types",
"license": "Apache-2.0",
"files": [
@@ -1,6 +1,6 @@
{
"name": "react-native-enriched-markdown",
"version": "0.18.2",
"version": "0.19.0-beta.1",
"private": true,
"description": "Markdown-based Rich Text solution for React Native",
"main": "./lib/module/index",
+1 -1
View File
@@ -1,6 +1,6 @@
{
"name": "@getpaseo/relay",
"version": "0.18.2",
"version": "0.19.0-beta.1",
"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.18.2",
"version": "0.19.0-beta.1",
"description": "Paseo backend server",
"license": "Apache-2.0",
"files": [
@@ -114,11 +114,11 @@
"@agentclientprotocol/sdk": "^0.17.1",
"@anthropic-ai/claude-agent-sdk": "0.3.326",
"@anthropic-ai/sdk": "^0.104.2",
"@getpaseo/client": "0.18.2",
"@getpaseo/highlight": "0.18.2",
"@getpaseo/plugin": "0.18.2",
"@getpaseo/protocol": "0.18.2",
"@getpaseo/relay": "0.18.2",
"@getpaseo/client": "0.19.0-beta.1",
"@getpaseo/highlight": "0.19.0-beta.1",
"@getpaseo/plugin": "0.19.0-beta.1",
"@getpaseo/protocol": "0.19.0-beta.1",
"@getpaseo/relay": "0.19.0-beta.1",
"@isaacs/ttlcache": "^2.1.4",
"@modelcontextprotocol/node": "2.1.2",
"@modelcontextprotocol/sdk": "1.29.0",
@@ -4583,6 +4583,7 @@ describe("ClaudeAgentSession context window usage", () => {
[
notification("code-mode-opt-in", "Code Mode isn't available.", "medium"),
notification("urgent", "Something needs attention.", "immediate"),
notification("stop-hook-error", "stop hook problem · ctrl+o to see", "immediate"),
createSuccessResult(),
],
]),
@@ -4600,6 +4601,7 @@ describe("ClaudeAgentSession context window usage", () => {
).toEqual([
{ type: "notification", level: "info", message: "Code Mode isn't available." },
{ type: "notification", level: "warning", message: "Something needs attention." },
{ type: "notification", level: "warning", message: "stop hook problem" },
]);
expect(
logs
@@ -4608,6 +4610,7 @@ describe("ClaudeAgentSession context window usage", () => {
).toEqual([
{ level: 30, key: "code-mode-opt-in", text: "Code Mode isn't available." },
{ level: 40, key: "urgent", text: "Something needs attention." },
{ level: 40, key: "stop-hook-error", text: "stop hook problem · ctrl+o to see" },
]);
} finally {
await session.close();
@@ -5525,10 +5525,16 @@ class ClaudeAgentSession implements AgentSession {
const fields = { key: message.key, priority: message.priority, text: message.text };
if (urgent) this.logger.warn(fields, "claude.notification");
else this.logger.info(fields, "claude.notification");
// Claude Code's transcript shortcut only works in its terminal UI.
const transcriptHint = " · ctrl+o to see";
const text =
message.key === "stop-hook-error" && message.text.endsWith(transcriptHint)
? message.text.slice(0, -transcriptHint.length)
: message.text;
events.push({
type: "timeline",
provider: "claude",
item: { type: "notification", level: urgent ? "warning" : "info", message: message.text },
item: { type: "notification", level: urgent ? "warning" : "info", message: text },
});
}
@@ -1,3 +1,5 @@
import { lastAssistantMessageText } from "../../../assistant-message.js";
import { projectTimelineRows } from "../../../timeline-projection.js";
import { collectTimelineSnapshot } from "../test-utils/v2-timeline.js";
import type { SessionMessageAssistant } from "@opencode/client";
import { execFileSync } from "node:child_process";
@@ -136,3 +138,37 @@ test.each(["delta", "snapshot"] as const)(
expect(retainedBytesAfterStreaming(mode, chunks)).toBeLessThan(textBytes * 32);
},
);
test.each(["snapshot", "stream"] as const)(
"empty reasoning between two text parts keeps their paragraphs distinct in %s",
async (mode) => {
const timeline = new V2Timeline();
const message = assistant([
{ type: "text", text: "I checked content search." },
{ type: "reasoning", text: "" },
{ type: "text", text: "The newly named tool works." },
]);
const liveEvents = [];
if (mode === "stream") {
const commentary = { assistantMessageID: message.id, type: "text" as const, ordinal: 0 };
timeline.startPart(commentary);
liveEvents.push(timeline.delta({ ...commentary, delta: "I checked content search." }));
const final = { ...commentary, ordinal: 1 };
timeline.startPart(final);
liveEvents.push(timeline.delta({ ...final, delta: "The newly" }));
}
const replayEvents = await collectTimelineSnapshot(timeline, [message]);
const rows = [...liveEvents, ...replayEvents].flatMap((event, index) =>
event?.type === "timeline"
? [{ item: event.item, timestamp: event.timestamp, seq: index + 1, turnId: "turn" }]
: [],
);
const replies = projectTimelineRows({ rows, mode: "projected" }).flatMap(({ item }) =>
item.type === "assistant_message" ? [item.text] : [],
);
const expected = "I checked content search.\n\nThe newly named tool works.";
expect.soft(replies).toEqual([expected]);
expect.soft(lastAssistantMessageText(rows)).toBe(expected);
},
);
@@ -49,11 +49,13 @@ export class V2Timeline {
if (!text.startsWith(emitted))
throw new Error("OpenCode changed previously emitted message content");
this.content.set(key, text);
const suffix = detachedSuffix(text, emitted.length);
const item: AgentTimelineItem =
event.type === "text"
? { type: "assistant_message", text: suffix, messageId: event.assistantMessageID }
: { type: "reasoning", text: suffix };
const item = this.textItem({
messageID: event.assistantMessageID,
type: event.type,
ordinal: event.ordinal,
text,
previous: emitted,
});
return { type: "timeline", provider: "opencode", item, timestamp: new Date().toISOString() };
}
@@ -199,10 +201,35 @@ export class V2Timeline {
if (!part.text.startsWith(previous))
throw new Error("OpenCode changed previously emitted message content");
this.content.set(key, part.text);
const suffix = detachedSuffix(part.text, previous.length);
if (part.type === "text")
push({ type: "assistant_message", text: suffix, messageId: messageID });
else push({ type: "reasoning", text: suffix });
push(this.textItem({ messageID, type: part.type, ordinal, text: part.text, previous }));
}
private textItem({
messageID,
type,
ordinal,
text,
previous,
}: {
messageID: string;
type: "text" | "reasoning";
ordinal: number;
text: string;
previous: string;
}): AgentTimelineItem {
const suffix = detachedSuffix(text, previous.length);
if (type === "reasoning") return { type: "reasoning", text: suffix };
// Projection joins chunks with the same message ID. Separate OpenCode text parts
// once, at the first emitted chunk, so live output and history replay agree.
if (previous.length === 0) {
for (let earlier = ordinal - 1; earlier >= 0; earlier--) {
if (this.content.has(textPartKey(messageID, "text", earlier))) {
return { type: "assistant_message", text: `\n\n${suffix}`, messageId: messageID };
}
}
}
return { type: "assistant_message", text: suffix, messageId: messageID };
}
private async toolPart(
@@ -422,3 +422,49 @@ function isFixtureProcessRunning(pid: number): boolean {
throw error;
}
}
async function observeWorkspaceScriptNames(
daemonClient: DaemonClient,
): Promise<Map<string, string[]>> {
const scriptNames = new Map<string, string[]>();
daemonClient.subscribe((event) => {
if (event.type !== "workspace_update" || event.payload.kind !== "upsert") return;
const names = event.payload.workspace.scripts.map((script) => script.scriptName);
scriptNames.set(event.workspaceId, names);
});
await daemonClient.fetchWorkspaces({ subscribe: {} });
return scriptNames;
}
test("editing paseo.json refreshes every subscribed client for each workspace sharing a directory", async () => {
const first = await createWorkspace("First workspace");
const second = await createWorkspace("Second workspace");
const registry = path.join(daemon.paseoHome, "projects", "workspaces.json");
const originalRegistry = await readFile(registry, "utf8");
const observer = new DaemonClient({ url: `ws://127.0.0.1:${daemon.port}/ws` });
await observer.connect();
try {
const seen = await Promise.all([client, observer].map(observeWorkspaceScriptNames));
const expectScripts = (names: string[]) =>
expect
.poll(() => seen.map((scriptNames) => [scriptNames.get(first), scriptNames.get(second)]), {
timeout: 10_000,
})
.toEqual([
[names, names],
[names, names],
]);
await writeFile(
path.join(cwd, "paseo.json"),
JSON.stringify({ scripts: { build: { command: "npm run build" } } }),
);
await expectScripts(["build"]);
await rm(path.join(cwd, "paseo.json"));
await expectScripts([]);
expect(await readFile(registry, "utf8")).toBe(originalRegistry);
expect((await client.listTerminals()).terminals).toEqual([]);
} finally {
await observer.close();
}
});
@@ -35,8 +35,16 @@ class ObservationControls implements FileObserverDependencies {
this.interval = null;
}
async fileChanged(filename: string): Promise<void> {
signalFileChange(filename: string): void {
this.change?.(filename);
}
async fileChanged(filename: string): Promise<void> {
this.signalFileChange(filename);
await this.flushPendingChange();
}
async flushPendingChange(): Promise<void> {
const timeout = this.timeout;
this.timeout = null;
await timeout?.();
@@ -82,6 +90,30 @@ describe("FileObserver", () => {
expect(controls.closes).toBe(1);
});
test("reports a pending edit to existing listeners when another listener joins", async () => {
const root = await workspace();
const controls = new ObservationControls();
const observer = new FileObserver(controls);
const input = { cwd: root, path: "file.txt" };
const updates: string[] = [];
const first = await observer.subscribe(input, (version) => updates.push(version.status));
await unlink(path.join(root, input.path));
controls.signalFileChange(input.path);
const newListenerUpdates: string[] = [];
const second = await observer.subscribe(input, (version) =>
newListenerUpdates.push(version.status),
);
expect(second.initial.status).toBe("missing");
await controls.flushPendingChange();
expect(updates).toEqual(["missing"]);
expect(newListenerUpdates).toEqual([]);
first.unsubscribe();
second.unsubscribe();
});
test("coalesces concurrent subscriptions onto one watcher", async () => {
const root = await workspace();
const controls = new ObservationControls();
@@ -26,8 +26,10 @@ interface ObservedFile {
cwd: string;
path: string;
basename: string;
listeners: Map<(version: FileVersion) => void, { cwd: string; path: string }>;
fingerprint: string;
listeners: Map<
(version: FileVersion) => void,
{ cwd: string; path: string; fingerprint: string }
>;
watcher: FileWatch | null;
debounce: ReturnType<typeof setTimeout> | null;
fallback: ReturnType<typeof setInterval> | null;
@@ -62,29 +64,27 @@ export class FileObserver {
const target = await resolveExplorerFilePath({ root: input.cwd, relativePath: input.path });
let observed = this.observed.get(target);
if (!observed) {
const initial = await getExplorerFileVersion({ root: input.cwd, relativePath: input.path });
observed = this.observed.get(target);
if (!observed) {
observed = {
cwd: input.cwd,
path: input.path,
basename: path.basename(target),
listeners: new Map(),
fingerprint: fingerprint(initial),
watcher: null,
debounce: null,
fallback: null,
};
this.observed.set(target, observed);
this.startWatching(target, path.dirname(target), observed);
}
observed = {
cwd: input.cwd,
path: input.path,
basename: path.basename(target),
listeners: new Map(),
watcher: null,
debounce: null,
fallback: null,
};
this.observed.set(target, observed);
this.startWatching(target, path.dirname(target), observed);
}
const initial = await getExplorerFileVersion({
root: input.cwd,
relativePath: input.path,
});
observed.listeners.set(listener, { cwd: initial.cwd, path: initial.path });
observed.fingerprint = fingerprint(initial);
observed.listeners.set(listener, {
cwd: initial.cwd,
path: initial.path,
fingerprint: fingerprint(initial),
});
let active = true;
return {
@@ -148,10 +148,10 @@ export class FileObserver {
relativePath: observed.path,
});
const nextFingerprint = fingerprint(version);
if (nextFingerprint === observed.fingerprint) return;
observed.fingerprint = nextFingerprint;
for (const [listener, identity] of observed.listeners) {
listener({ ...version, ...identity });
for (const [listener, subscription] of observed.listeners) {
if (nextFingerprint === subscription.fingerprint) continue;
subscription.fingerprint = nextFingerprint;
listener({ ...version, cwd: subscription.cwd, path: subscription.path });
}
}
+169
View File
@@ -7577,3 +7577,172 @@ describe("agent.queue RPCs and live updates in Session", () => {
}
});
});
describe("session agent_update and agent_stream ordering", () => {
test("delivers queued agent_update snapshots ahead of agent_stream turn_completed and keeps subsequent stream events ordered", async () => {
const messages: SessionOutboundMessage[] = [];
let listener: ((event: AgentManagerEvent) => void) | null = null;
const record = createStoredAgentRecord({
id: "agent-order",
cwd: "/tmp/order-repo",
workspaceId: "ws-order",
provider: "antigravity",
title: "Order Test",
});
const workspace = createPersistedWorkspaceRecord({
workspaceId: "ws-order",
projectId: "proj-order",
cwd: record.cwd,
kind: "directory",
displayName: "Order Workspace",
createdAt: record.createdAt,
updatedAt: record.updatedAt,
});
const project = createPersistedProjectRecord({
projectId: workspace.projectId,
rootPath: workspace.cwd,
kind: "non_git",
displayName: "order-repo",
createdAt: record.createdAt,
updatedAt: record.updatedAt,
});
const storageReads: Array<{ resolve: (value: StoredAgentRecord | null) => void }> = [];
const providers = createProviderSnapshotManagerStub();
providers.listRegisteredProviderIds.mockReturnValue(["antigravity"]);
const makeManaged = (
lifecycle: "running" | "idle",
activeTurnId: string | null,
usage?: { inputTokens: number; outputTokens: number },
): ManagedAgent =>
({
id: record.id,
provider: record.provider,
cwd: record.cwd,
workspaceId: record.workspaceId,
lifecycle,
activeTurnId,
activeForegroundTurnId: activeTurnId,
activeTurnStartedAt: activeTurnId ? new Date("2026-12-02T12:00:00.000Z") : null,
createdAt: new Date(record.createdAt),
updatedAt: new Date("2026-12-02T12:00:05.000Z"),
lastUserMessageAt: new Date("2026-12-02T12:00:00.000Z"),
config: { provider: record.provider, cwd: record.cwd },
capabilities: {
supportsStreaming: true,
supportsSessionPersistence: true,
supportsDynamicModes: true,
supportsMcpServers: true,
supportsReasoningStream: true,
supportsToolInvocations: true,
},
currentModeId: null,
availableModes: [],
pendingPermissions: new Map(),
persistence: null,
lastUsage: usage,
labels: {},
attention: { requiresAttention: false },
internal: false,
background: false,
}) as unknown as ManagedAgent;
const session = createSessionForTest({
messages,
providerSnapshotManager: providers.manager,
permissions: ["workspace.read"],
agentManager: {
getAgent: () => undefined,
getAgentBackgroundWorkSummary: () => undefined,
subscribe: (callback: (event: AgentManagerEvent) => void) => {
listener = callback;
return () => {};
},
},
agentStorage: {
get: () =>
new Promise<StoredAgentRecord | null>((resolve) => {
storageReads.push({ resolve });
}),
listAll: async () => [],
},
workspaceRegistry: { get: vi.fn(async () => workspace) },
projectRegistry: { get: async () => project },
});
try {
session.updateClientCapabilities({ all_providers: true });
await session.handleMessage({
type: "fetch_agents_request",
requestId: "sub-agents",
subscribe: { subscriptionId: "agents-sub" },
});
messages.length = 0;
if (!listener) throw new Error("Agent event listener was not installed");
// Mirror Antigravity turn end with interleaved stream events:
// U1 (running, usage_updated) -> S1 (timeline) -> U2 (idle) -> S2 (turn_completed) -> S3 (turn_started).
listener({
type: "agent_state",
agent: makeManaged("running", "turn-1", { inputTokens: 100, outputTokens: 20 }),
});
listener({
type: "agent_stream",
agentId: record.id,
event: {
type: "timeline",
provider: "antigravity",
item: { type: "assistant_message", text: "ok" },
turnId: "turn-1",
},
timestamp: "2026-12-02T12:00:04.999Z",
});
listener({
type: "agent_state",
agent: makeManaged("idle", null, { inputTokens: 100, outputTokens: 20 }),
});
listener({
type: "agent_stream",
agentId: record.id,
event: { type: "turn_completed", provider: "antigravity", turnId: "turn-1" },
timestamp: "2026-12-02T12:00:05.000Z",
});
listener({
type: "agent_stream",
agentId: record.id,
event: { type: "turn_started", provider: "antigravity", turnId: "turn-2" },
timestamp: "2026-12-02T12:00:05.001Z",
});
// While the first storage read is still pending, no stream event may cut ahead.
await expect.poll(() => storageReads.length).toBe(1);
expect(messages.filter((m) => m.type === "agent_stream")).toEqual([]);
// Complete both agent_update storage reads in order.
storageReads.shift()!.resolve(record);
await expect.poll(() => storageReads.length).toBe(1);
storageReads.shift()!.resolve(record);
const relevantMessages = () =>
messages.filter((m) => m.type === "agent_update" || m.type === "agent_stream");
await expect.poll(() => relevantMessages().length).toBe(5);
const sequence = relevantMessages().map((m) =>
m.type === "agent_update"
? `agent_update:${m.payload.kind === "upsert" ? `${m.payload.agent.status}:${m.payload.agent.activeTurn?.turnId ?? "null"}` : "remove"}`
: `agent_stream:${m.payload.event.type}:${"turnId" in m.payload.event ? (m.payload.event.turnId ?? "null") : "none"}`,
);
expect(sequence).toEqual([
"agent_update:running:turn-1",
"agent_stream:timeline:turn-1",
"agent_update:idle:null",
"agent_stream:turn_completed:turn-1",
"agent_stream:turn_started:turn-2",
]);
} finally {
await session.cleanup();
}
});
});
+26 -21
View File
@@ -2468,30 +2468,35 @@ export class Session {
"agent.session.forward_stream",
);
this.forwardAgentStream(event, serializedEvent);
// An internal agent streams only to clients subscribed to it by id;
// session-wide prompts would surface it everywhere.
const internal = this.agentManager.getAgent(event.agentId)?.internal === true;
if (event.event.type === "permission_requested" && !internal) {
this.emit({
type: "agent_permission_request",
payload: {
agentId: event.agentId,
request: event.event.request,
},
});
} else if (event.event.type === "permission_resolved") {
// A provider event is not the outcome of whichever request is currently running.
this.emitSubscribedEvent({
type: "agent_permission_resolved",
payload: {
agentId: event.agentId,
requestId: event.event.requestId,
resolution: event.event.resolution,
},
});
}
const streamEventWithTimestamp =
event.timestamp !== undefined ? event : { ...event, timestamp: new Date().toISOString() };
this.agentUpdates.runAfterUpdates(event.agentId, () => {
if (this.isCleanedUp) return;
this.forwardAgentStream(streamEventWithTimestamp, serializedEvent);
if (event.event.type === "permission_requested" && !internal) {
this.emit({
type: "agent_permission_request",
payload: {
agentId: event.agentId,
request: event.event.request,
},
});
} else if (event.event.type === "permission_resolved") {
// A provider event is not the outcome of whichever request is currently running.
this.emitSubscribedEvent({
type: "agent_permission_resolved",
payload: {
agentId: event.agentId,
requestId: event.event.requestId,
resolution: event.event.resolution,
},
});
}
});
// Title updates may be applied asynchronously after agent creation.
},
@@ -96,6 +96,7 @@ function makeProject(overrides?: Partial<ProjectPlacementPayload>): ProjectPlace
function buildHarness() {
const emitted: SessionOutboundMessage[] = [];
const workspaceUpdates: string[] = [];
const queuedWorkspaceUpdates: Promise<void>[] = [];
const loggedErrors: unknown[][] = [];
const payloadById = new Map<string, AgentSnapshotPayload>();
const queuedPayloadBuilds: Promise<AgentSnapshotPayload>[] = [];
@@ -136,6 +137,10 @@ function buildHarness() {
projectByWorkspaceId.get(workspaceId) ?? null,
emitWorkspaceUpdateForWorkspaceId: async (workspaceId) => {
workspaceUpdates.push(workspaceId);
const pending = queuedWorkspaceUpdates.shift();
if (pending) {
await pending;
}
},
sequenceAgentUpdate: (payload, agent, project, agentId, includeSequence) =>
directorySync.sequenceAgentUpdate(
@@ -176,6 +181,9 @@ function buildHarness() {
queuePayloadBuilds(...payloads: Promise<AgentSnapshotPayload>[]) {
queuedPayloadBuilds.push(...payloads);
},
queueWorkspaceUpdates(...updates: Promise<void>[]) {
queuedWorkspaceUpdates.push(...updates);
},
agentUpdates(): AgentUpdatePayload[] {
return emitted
.filter((message) => message.type === "agent_update")
@@ -795,3 +803,36 @@ test("non-sync paginated subscriptions (snapshotAgentIds: null) still emit remov
expect(h.agentUpdates()).toEqual([{ kind: "remove", agentId: "page-2-agent" }]);
});
test("does not block a subsequent agent_update behind a slow workspace update", async () => {
const h = buildHarness();
h.service.beginSubscription({ subscriptionId: "sub", filter: {} });
h.service.flushBootstrapped("sub");
const running = makeAgentPayload({ id: "a", workspaceId: "ws-1", status: "running" });
const idle = makeAgentPayload({ id: "a", workspaceId: "ws-1", status: "idle" });
h.register(running);
h.queuePayloadBuilds(Promise.resolve(running), Promise.resolve(idle));
const slowWorkspaceUpdate = deferred<void>();
h.queueWorkspaceUpdates(slowWorkspaceUpdate.promise);
const runningForward = h.service.forwardLiveAgent(h.managed("a"));
const idleForward = h.service.forwardLiveAgent(h.managed("a"));
// Both agent_update emissions complete while the first workspace broadcast is still in flight.
await expect
.poll(() => h.agentUpdates().map((update) => update.kind === "upsert" && update.agent.status))
.toEqual(["running", "idle"]);
let flushed = false;
const flushPromise = (async () => {
await h.service.flushPendingUpdates();
flushed = true;
})();
await Promise.resolve();
expect(flushed).toBe(false);
slowWorkspaceUpdate.resolve();
await Promise.all([runningForward, idleForward, flushPromise]);
expect(flushed).toBe(true);
});
@@ -62,6 +62,12 @@ export interface AgentUpdatesService {
removeAgent(agentId: string): Promise<void>;
/** Await all currently queued agent update emissions so callers can order follow-up broadcasts after them. */
flushPendingUpdates(): Promise<void>;
/**
* Runs a per-agent outbound step (such as forwarding an `agent_stream` event) in strict FIFO
* order with queued `agent_update` frames for that agent. Runs synchronously when nothing is
* queued for the agent, and never waits on workspace broadcasts.
*/
runAfterUpdates(agentId: string, action: () => void): void;
dispose(): void;
}
@@ -182,6 +188,7 @@ function agentUpdateTargetId(update: AgentUpdatePayload): string {
export function createAgentUpdatesService(deps: AgentUpdatesServiceDeps): AgentUpdatesService {
const subscriptions = new Map<string, AgentUpdatesSubscriptionState>();
const liveAgentUpdateTails = new Map<string, Promise<void>>();
const pendingWorkspaceUpdates = new Set<Promise<void>>();
const sequence = <T extends AgentUpdatePayload>(
sub: AgentUpdatesSubscriptionState,
payload: T,
@@ -344,13 +351,22 @@ export function createAgentUpdatesService(deps: AgentUpdatesServiceDeps): AgentU
return payload;
}
async function emitAgentUpdate(
workspaceId: string | undefined,
projectPayload?: () => AgentSnapshotPayload | Promise<AgentSnapshotPayload>,
function triggerWorkspaceUpdate(workspaceId: string): Promise<void> {
const update = deps.emitWorkspaceUpdateForWorkspaceId(workspaceId).catch((error) => {
deps.logger.error({ err: error }, "Failed to emit agent update");
});
pendingWorkspaceUpdates.add(update);
void update.finally(() => {
pendingWorkspaceUpdates.delete(update);
});
return update;
}
async function emitAgentPayload(
projectPayload: () => AgentSnapshotPayload | Promise<AgentSnapshotPayload>,
): Promise<void> {
try {
if (projectPayload && hasSubscription()) await publishPayload(await projectPayload());
if (workspaceId) await deps.emitWorkspaceUpdateForWorkspaceId(workspaceId);
if (hasSubscription()) await publishPayload(await projectPayload());
} catch (error) {
deps.logger.error({ err: error }, "Failed to emit agent update");
}
@@ -371,23 +387,40 @@ export function createAgentUpdatesService(deps: AgentUpdatesServiceDeps): AgentU
return next;
}
function forwardWithWorkspaceUpdate(
agentId: string,
workspaceId: string | undefined,
projectPayload: () => AgentSnapshotPayload | Promise<AgentSnapshotPayload>,
): Promise<void> {
if (!hasSubscription()) {
return workspaceId ? triggerWorkspaceUpdate(workspaceId) : Promise.resolve();
}
// Keep workspace broadcasts off the per-agent queue so a slow workspace rebuild cannot
// stall a subsequent agent_update (for example, running -> idle) or agent_stream frame.
let workspaceUpdate: Promise<void> | null = null;
const agentUpdate = enqueueAgentUpdate(agentId, async () => {
await emitAgentPayload(projectPayload);
if (workspaceId) {
workspaceUpdate = triggerWorkspaceUpdate(workspaceId);
}
});
return agentUpdate.then(() => workspaceUpdate ?? undefined);
}
function forwardLiveAgent(agent: ManagedAgent): Promise<void> {
if (!hasSubscription()) {
const workspaceId = agent.workspaceId;
return workspaceId
? enqueueAgentUpdate(agent.id, () => emitAgentUpdate(workspaceId))
: Promise.resolve();
return agent.workspaceId ? triggerWorkspaceUpdate(agent.workspaceId) : Promise.resolve();
}
const payload = toAgentPayload(agent);
return enqueueAgentUpdate(payload.id, () =>
emitAgentUpdate(payload.workspaceId, () => deps.enrichAgentPayload(payload)),
return forwardWithWorkspaceUpdate(payload.id, payload.workspaceId, () =>
deps.enrichAgentPayload(payload),
);
}
function forwardStoredAgent(record: StoredAgentRecord): Promise<void> {
if (!hasSubscription() && !record.workspaceId) return Promise.resolve();
return enqueueAgentUpdate(record.id, () =>
emitAgentUpdate(record.workspaceId, () => deps.buildStoredAgentPayload(record)),
return forwardWithWorkspaceUpdate(record.id, record.workspaceId, () =>
deps.buildStoredAgentPayload(record),
);
}
@@ -400,10 +433,23 @@ export function createAgentUpdatesService(deps: AgentUpdatesServiceDeps): AgentU
}
async function flushPendingUpdates(): Promise<void> {
if (liveAgentUpdateTails.size === 0) return;
// Await a single snapshot of currently queued tails so pre-barrier updates settle
// ahead of workspace broadcasts without starving on unrelated active streams.
await Promise.allSettled(liveAgentUpdateTails.values());
if (liveAgentUpdateTails.size === 0 && pendingWorkspaceUpdates.size === 0) return;
// Await currently queued agent updates first (which may trigger workspace broadcasts),
// then settle any pending workspace updates.
if (liveAgentUpdateTails.size > 0) {
await Promise.allSettled(liveAgentUpdateTails.values());
}
if (pendingWorkspaceUpdates.size > 0) {
await Promise.allSettled(pendingWorkspaceUpdates);
}
}
function runAfterUpdates(agentId: string, action: () => void): void {
if (!liveAgentUpdateTails.has(agentId)) {
action();
return;
}
void enqueueAgentUpdate(agentId, action);
}
function dispose(): void {
@@ -421,6 +467,7 @@ export function createAgentUpdatesService(deps: AgentUpdatesServiceDeps): AgentU
emitStoredRecord,
removeAgent,
flushPendingUpdates,
runAfterUpdates,
dispose,
};
}
@@ -1,6 +1,7 @@
import { resolve } from "node:path";
import type pino from "pino";
import { describe, expect, test } from "vitest";
import type { FileObserver } from "../../file-explorer/observer.js";
import type { WorkspaceDescriptorPayload } from "../../messages.js";
import type {
WorkspaceGitListener,
@@ -49,7 +50,9 @@ function flushMicrotasks(): Promise<void> {
return new Promise((done) => setImmediate(done));
}
function buildHarness(opts: { emitCwdRejects?: boolean } = {}) {
function buildHarness(
opts: { emitCwdRejects?: boolean; configWatchRejects?: boolean; configExists?: boolean } = {},
) {
const listeners = new Map<string, WorkspaceGitListener>();
const registerCalls: string[] = [];
const unsubscribeCalls: string[] = [];
@@ -57,6 +60,30 @@ function buildHarness(opts: { emitCwdRejects?: boolean } = {}) {
const statusCalls: Array<{ cwd: string; branch: string | null }> = [];
const branchChanges: Array<[string, string | null, string | null]> = [];
const warnCalls: unknown[][] = [];
const configWatchCalls: Array<{ cwd: string; path: string }> = [];
const configUnwatchCalls: string[] = [];
const configListeners = new Map<string, () => void>();
const pendingConfigWatches: Array<() => void> = [];
// paseo.json watches stay pending until a test calls resolveConfigWatches(), so a test
// controls when each watch starts.
const configObserver: Pick<FileObserver, "subscribe"> = {
async subscribe(input, listener) {
configWatchCalls.push(input);
if (opts.configWatchRejects) throw new Error("watch boom");
await new Promise<void>((done) => pendingConfigWatches.push(done));
configListeners.set(input.cwd, () => listener({ status: "missing", ...input }));
return {
initial: opts.configExists
? { status: "ready", ...input, size: 2, modifiedAt: "2026-01-01T00:00:00.000Z" }
: { status: "missing", ...input },
unsubscribe() {
configUnwatchCalls.push(input.cwd);
configListeners.delete(input.cwd);
},
};
},
};
const workspaceGitService: Pick<WorkspaceGitService, "registerWorkspace"> = {
registerWorkspace({ cwd }, listener) {
@@ -85,6 +112,7 @@ function buildHarness(opts: { emitCwdRejects?: boolean } = {}) {
onBranchChanged: (workspaceId, oldBranch, newBranch) => {
branchChanges.push([workspaceId, oldBranch, newBranch]);
},
configObserver,
logger: { warn: (...args: unknown[]) => warnCalls.push(args) } as unknown as pino.Logger,
});
@@ -96,9 +124,25 @@ function buildHarness(opts: { emitCwdRejects?: boolean } = {}) {
listener(makeSnapshot(cwd, branch));
}
function changeConfig(cwd: string): void {
const listener = configListeners.get(cwd);
if (!listener) {
throw new Error(`no paseo.json listener registered for ${cwd}`);
}
listener();
}
function resolveConfigWatches(): void {
for (const done of pendingConfigWatches.splice(0)) done();
}
return {
service,
emitSnapshot,
changeConfig,
resolveConfigWatches,
configWatchCalls,
configUnwatchCalls,
registerCalls,
unsubscribeCalls,
emitCwdCalls,
@@ -342,3 +386,88 @@ describe("teardown", () => {
expect(h.branchChanges).toEqual([]);
});
});
describe("paseo.json observation", () => {
const directory = (id: string, workspaceDirectory: string) =>
makeDescriptor({
id,
workspaceDirectory,
projectKind: "directory",
workspaceKind: "directory",
});
test("watches paseo.json for Git and directory workspaces and refreshes on start and change", async () => {
const h = buildHarness({ configExists: true });
h.service.syncObservers([
directory("ws1", WS1),
makeDescriptor({ id: "ws2", workspaceDirectory: WS2 }),
]);
expect(h.configWatchCalls).toEqual([
{ cwd: WS1, path: "paseo.json" },
{ cwd: WS2, path: "paseo.json" },
]);
h.resolveConfigWatches();
await flushMicrotasks();
expect(h.emitCwdCalls).toEqual([WS1, WS2]);
h.changeConfig(WS1);
await flushMicrotasks();
expect(h.emitCwdCalls).toEqual([WS1, WS2, WS1]);
});
test("shares one watch per directory until its last workspace is removed", async () => {
const h = buildHarness();
h.service.syncObservers([directory("ws1", WS1), directory("ws2", WS1)]);
h.service.syncObservers([directory("ws1", WS1)]);
h.resolveConfigWatches();
await flushMicrotasks();
expect(h.configWatchCalls).toHaveLength(1);
expect(h.emitCwdCalls).toEqual([]);
h.service.removeForWorkspaceId("ws1");
expect(h.configUnwatchCalls).toEqual([]);
h.service.removeForWorkspaceId("ws2");
expect(h.configUnwatchCalls).toEqual([WS1]);
});
test("moves the watch when a workspace changes directory", async () => {
const h = buildHarness();
h.service.syncObservers([directory("ws1", WS1)]);
h.resolveConfigWatches();
await flushMicrotasks();
h.service.syncObservers([directory("ws1", WS2)]);
expect(h.configUnwatchCalls).toEqual([WS1]);
expect(h.configWatchCalls.map((call) => call.cwd)).toEqual([WS1, WS2]);
});
test("releases a watch removed before its subscription resolves", async () => {
const h = buildHarness();
h.service.syncObservers([directory("ws1", WS1)]);
h.service.removeForWorkspaceId("ws1");
expect(h.configUnwatchCalls).toEqual([]);
h.resolveConfigWatches();
await flushMicrotasks();
expect(h.configUnwatchCalls).toEqual([WS1]);
});
test("reconcile and dispose release watches", async () => {
const h = buildHarness();
h.service.syncObservers([directory("ws1", WS1), directory("ws2", WS2)]);
h.resolveConfigWatches();
await flushMicrotasks();
h.service.reconcileObservers([directory("ws2", WS2)]);
expect(h.configUnwatchCalls).toEqual([WS1]);
h.service.dispose();
expect(h.configUnwatchCalls).toEqual([WS1, WS2]);
});
test("logs a failed watch without failing the sync", async () => {
const h = buildHarness({ configWatchRejects: true });
expect(() => h.service.syncObservers([directory("ws1", WS1)])).not.toThrow();
await flushMicrotasks();
expect(h.warnCalls).toHaveLength(1);
});
});
@@ -1,5 +1,7 @@
import { resolve } from "node:path";
import type pino from "pino";
import { PASEO_CONFIG_FILE_NAME } from "../../../utils/paseo-config-file.js";
import { workspaceFileObserver, type FileObserver } from "../../file-explorer/observer.js";
import type { WorkspaceDescriptorPayload } from "../../messages.js";
import type {
WorkspaceGitRuntimeSnapshot,
@@ -32,6 +34,9 @@ export interface WorkspaceGitObserverMetrics {
* Branch changes reach `onBranchChanged` from two paths that share `lastBranchName`: the
* on-disk snapshot listener (handleBranchSnapshot) and the workspace-emit loop's Git runtime
* projection (recordDescriptorState). Both stay inside this module so the shared state is coherent.
*
* Every workspace, Git or not, also watches its paseo.json and refreshes its workspace cards on
* change, so the Scripts menu follows edits made outside Paseo.
*/
export interface WorkspaceGitObserverService {
syncObservers(workspaces: Iterable<WorkspaceDescriptorPayload>): void;
@@ -56,6 +61,7 @@ export function createWorkspaceGitObserverService(deps: {
oldBranch: string | null,
newBranch: string | null,
) => void;
configObserver?: Pick<FileObserver, "subscribe">;
logger: pino.Logger;
}): WorkspaceGitObserverService {
const {
@@ -63,12 +69,72 @@ export function createWorkspaceGitObserverService(deps: {
emitWorkspaceUpdateForCwd,
emitStatusUpdate,
onBranchChanged,
configObserver = workspaceFileObserver,
logger,
} = deps;
const watchTargets = new Map<string, WorkspaceGitWatchTarget>();
const workspaceStates = new Map<string, WorkspaceGitWatchState>();
const subscriptions = new Map<string, () => void>();
const configWatches = new Map<string, { workspaceIds: Set<string>; release: () => void }>();
const configCwds = new Map<string, string>();
function observeConfig(cwd: string, workspaceId: string): void {
const currentCwd = configCwds.get(workspaceId);
if (currentCwd === cwd) return;
if (currentCwd !== undefined) unobserveConfig(workspaceId);
configCwds.set(workspaceId, cwd);
const existing = configWatches.get(cwd);
if (existing) {
existing.workspaceIds.add(workspaceId);
return;
}
let unsubscribe: (() => void) | null = null;
let released = false;
configWatches.set(cwd, {
workspaceIds: new Set([workspaceId]),
release: () => {
released = true;
unsubscribe?.();
},
});
const refresh = () => {
void emitWorkspaceUpdateForCwd(cwd).catch((error) => {
logger.warn({ err: error, cwd }, "Failed to emit workspace update after paseo.json change");
});
};
void (async () => {
try {
const subscription = await configObserver.subscribe(
{ cwd, path: PASEO_CONFIG_FILE_NAME },
refresh,
);
if (released) {
subscription.unsubscribe();
return;
}
unsubscribe = subscription.unsubscribe;
// Catch an edit made between the client's snapshot and the watch starting.
// shortcut: a removal in that window stays stale until the next edit; drop the check if that matters.
if (subscription.initial.status !== "missing") refresh();
} catch (error) {
logger.warn({ err: error, cwd }, "Failed to observe paseo.json");
}
})();
}
function unobserveConfig(workspaceId: string): void {
const cwd = configCwds.get(workspaceId);
if (cwd === undefined) return;
configCwds.delete(workspaceId);
const watch = configWatches.get(cwd);
watch?.workspaceIds.delete(workspaceId);
if (watch?.workspaceIds.size === 0) {
configWatches.delete(cwd);
watch.release();
}
}
function rememberDescriptorState(
workspaceId: string,
@@ -95,7 +161,7 @@ export function createWorkspaceGitObserverService(deps: {
subscriptions.delete(normalizedCwd);
}
function removeForWorkspaceId(workspaceId: string): void {
function removeGitObservation(workspaceId: string): void {
const state = workspaceStates.get(workspaceId);
if (!state) {
return;
@@ -108,6 +174,11 @@ export function createWorkspaceGitObserverService(deps: {
}
}
function removeForWorkspaceId(workspaceId: string): void {
unobserveConfig(workspaceId);
removeGitObservation(workspaceId);
}
function handleBranchSnapshot(cwd: string, branchName: string | null): void {
const target = watchTargets.get(resolve(cwd));
if (!target) {
@@ -130,12 +201,13 @@ export function createWorkspaceGitObserverService(deps: {
function syncObserver(cwd: string, options: { isGit: boolean; workspaceId: string }): void {
const normalizedCwd = resolve(cwd);
observeConfig(normalizedCwd, options.workspaceId);
const currentState = workspaceStates.get(options.workspaceId);
if (currentState && currentState.cwd !== normalizedCwd) {
removeForWorkspaceId(options.workspaceId);
removeGitObservation(options.workspaceId);
}
if (!options.isGit) {
removeForWorkspaceId(options.workspaceId);
removeGitObservation(options.workspaceId);
return;
}
@@ -168,7 +240,7 @@ export function createWorkspaceGitObserverService(deps: {
emitStatusUpdate(normalizedCwd, snapshot);
});
} catch (error) {
removeForWorkspaceId(options.workspaceId);
removeGitObservation(options.workspaceId);
throw error;
}
subscriptions.set(normalizedCwd, subscription.unsubscribe);
@@ -187,7 +259,7 @@ export function createWorkspaceGitObserverService(deps: {
return {
reconcileObservers(workspaces) {
const retained = new Map([...workspaces].map((workspace) => [workspace.id, workspace]));
for (const workspaceId of workspaceStates.keys()) {
for (const workspaceId of new Set([...workspaceStates.keys(), ...configCwds.keys()])) {
if (!retained.has(workspaceId)) removeForWorkspaceId(workspaceId);
}
for (const workspace of retained.values()) {
@@ -228,6 +300,11 @@ export function createWorkspaceGitObserverService(deps: {
subscriptions.clear();
watchTargets.clear();
workspaceStates.clear();
for (const watch of configWatches.values()) {
watch.release();
}
configWatches.clear();
configCwds.clear();
},
};
}
+1 -1
View File
@@ -1,6 +1,6 @@
{
"name": "@getpaseo/website",
"version": "0.18.2",
"version": "0.19.0-beta.1",
"private": true,
"type": "module",
"scripts": {
+1 -1
View File
@@ -1,6 +1,6 @@
{
"name": "@getpaseo/builtin-plugins",
"version": "0.18.2",
"version": "0.19.0-beta.1",
"private": true,
"type": "module",
"scripts": {
+19 -1
View File
@@ -278,7 +278,7 @@ guarantee compatibility with another host's renderer.
These exact module specifiers use the host's runtime instances. A client bundle that requests another host module fails with `Module "<name>" is not available in plugin client code`.
Do not import `lucide-react-native`, `react-native-svg`, or DOM libraries. Set contribution `icon` fields to a [Lucide icon name](https://lucide.dev/icons/), inline SVG, or a component; Paseo validates the icon and renders it. See [Icons](#icons).
Do not import `lucide-react-native`, `react-native-svg`, or DOM libraries. Use the host-rendered `Icon` and `ProviderIcon` components in plugin UI. Contribution `icon` fields take a [Lucide icon name](https://lucide.dev/icons/), inline SVG, or a component; Paseo validates the icon and renders it. See [Icons](#icons).
### Cross-platform rules
@@ -1658,6 +1658,24 @@ not import `lucide-react-native` or `react-native-svg`.
An unknown name or an SVG that breaks a rule renders nothing.
`ProviderIcon` renders Paseo's icon for a built-in, catalog, or plugin-provided agent provider.
When `hostId` is omitted, it uses the current plugin installation's host; pass `hostId` explicitly
when rendering across hosts, such as in a sidebar view.
```tsx
<ProviderIcon provider="codex" size={18} color={theme.colors.foreground} />
<ProviderIcon provider="codex" hostId={host.id} size={18} color={theme.colors.foreground} />
```
| Prop | Type | Required | Behavior |
| ---------- | -------- | -------- | ------------------------------------------------------------ |
| `provider` | `string` | Yes | Provider ID, such as `codex`, `claude`, or `cursor`. |
| `hostId` | `string` | No | Target host ID. Defaults to the current plugin installation. |
| `size` | `number` | No | Icon width and height. Defaults to 24. |
| `color` | `string` | No | Icon color and SVG `currentColor`. Use a plugin theme token. |
Unknown providers render Paseo's standard provider fallback.
## Timeline items
A plugin can replace an agent timeline entry with its own data and React Native renderer. Both
+17 -1
View File
@@ -228,7 +228,7 @@ Paseo 为客户端代码提供以下模块:
这些确切的模块标识符使用宿主的运行时实例。请求其他宿主模块的客户端包会以 `Module "<name>" is not available in plugin client code` 失败。
不要导入 `lucide-react-native`、`react-native-svg` 或 DOM 库。把贡献的 `icon` 字段设为一个 [Lucide 图标名称](https://lucide.dev/icons/)、内联 SVG 或组件;Paseo 会校验图标并渲染它。参见[图标](#icons)。
不要导入 `lucide-react-native`、`react-native-svg` 或 DOM 库。在插件 UI 中请使用宿主渲染的 `Icon` 和 `ProviderIcon` 组件。贡献的 `icon` 字段接受 [Lucide 图标名称](https://lucide.dev/icons/)、内联 SVG 或组件;Paseo 会校验图标并渲染它。参见[图标](#icons)。
### 跨平台规则 {#cross-platform-rules}
@@ -1317,6 +1317,22 @@ client.addWorkspacePanel({ id: "review", title: "Review", icon: { svg: reviewIco
未知的名称或违反规则的 SVG 不会渲染任何内容。
`ProviderIcon` 用于渲染内置、目录或插件提供的 Agent Provider 图标。省略 `hostId` 时,默认使用当前插件安装所在的宿主;跨宿主渲染(例如在侧边栏视图中)时请显式传入 `hostId`。
```tsx
<ProviderIcon provider="codex" size={18} color={theme.colors.foreground} />
<ProviderIcon provider="codex" hostId={host.id} size={18} color={theme.colors.foreground} />
```
| 属性 | 类型 | 是否必填 | 行为 |
| ---------- | -------- | -------- | ---------------------------------------------------------- |
| `provider` | `string` | 是 | Provider ID,例如 `codex`、`claude` 或 `cursor`。 |
| `hostId` | `string` | 否 | 目标宿主 ID。默认使用当前插件安装所在的宿主。 |
| `size` | `number` | 否 | 图标的宽度和高度。默认为 24。 |
| `color` | `string` | 否 | 图标颜色,也是 SVG 的 `currentColor`。请使用插件主题令牌。 |
未知的 Provider 会渲染 Paseo 的标准 Provider 回退图标。
## 时间线条目 {#timeline-items}
插件可以用自己的数据和 React Native 渲染器替换 Agent 时间线中的条目。两项注册都是客户端贡献。Paseo 在构建渲染模型时应用转换器,包括每一次实时的流式更新。
+38 -24
View File
@@ -16,12 +16,15 @@ const __dirname = path.dirname(fileURLToPath(import.meta.url));
const rootDir = path.resolve(__dirname, "..");
function usageAndExit(code = 1) {
process.stderr.write("Usage: node scripts/reconcile-release.mjs --tag <vX.Y.Z[-beta.N]>\n");
process.stderr.write(
"Usage: node scripts/reconcile-release.mjs (--ref <git-ref> | --tag <vX.Y.Z[-beta.N]>)\n",
);
process.exit(code);
}
function parseArgs(argv) {
let tag = "";
let ref = "";
for (let index = 0; index < argv.length; index += 1) {
const arg = argv[index];
if (arg === "--tag") {
@@ -29,15 +32,20 @@ function parseArgs(argv) {
index += 1;
continue;
}
if (arg === "--ref") {
ref = argv[index + 1] ?? "";
index += 1;
continue;
}
if (arg === "--help" || arg === "-h") {
usageAndExit(0);
}
usageAndExit(1);
}
if (!tag) {
if (Boolean(tag) === Boolean(ref)) {
usageAndExit(1);
}
return { tag };
return ref ? { ref } : { tag };
}
function splitRawEntries(content) {
@@ -60,12 +68,12 @@ function safeParseVersion(version) {
}
}
export function mergeChangelogEntry(mainContent, tagContent, targetVersion) {
export function mergeChangelogEntry(mainContent, releaseContent, targetVersion) {
const target = parseReleaseVersion(targetVersion);
const tagParsed = splitRawEntries(tagContent);
const taggedBlock = tagParsed.blocks.find((block) => block.version === target.version);
if (!taggedBlock) {
throw new Error(`No changelog entry found for ${target.version} in tagged changelog.`);
const releaseParsed = splitRawEntries(releaseContent);
const releaseBlock = releaseParsed.blocks.find((block) => block.version === target.version);
if (!releaseBlock) {
throw new Error(`No changelog entry found for ${target.version} in release changelog.`);
}
const mainParsed = splitRawEntries(mainContent);
@@ -114,7 +122,7 @@ export function mergeChangelogEntry(mainContent, tagContent, targetVersion) {
insertIndex = kept.length;
}
kept.splice(insertIndex, 0, taggedBlock);
kept.splice(insertIndex, 0, releaseBlock);
const parts = [];
if (mainParsed.preamble.length > 0) {
@@ -126,15 +134,15 @@ export function mergeChangelogEntry(mainContent, tagContent, targetVersion) {
return `${parts.join("\n\n")}\n`;
}
function defaultVerifyTag(tag, cwd) {
execFileSync("git", ["rev-parse", "--verify", `refs/tags/${tag}^{commit}`], {
function defaultVerifyRef(ref, cwd) {
execFileSync("git", ["rev-parse", "--verify", `${ref}^{commit}`], {
cwd,
stdio: "ignore",
});
}
function defaultReadTagFile(tag, filePath, cwd) {
return execFileSync("git", ["show", `${tag}:${filePath}`], {
function defaultReadRefFile(ref, filePath, cwd) {
return execFileSync("git", ["show", `${ref}:${filePath}`], {
cwd,
encoding: "utf8",
});
@@ -169,23 +177,29 @@ function lockfileMatchesVersion(cwd, rootPackage, version) {
export function reconcileRelease(options, deps = {}) {
const cwd = options.cwd ?? rootDir;
const tag = normalizeReleaseTag(options.tag);
const version = tag.slice(1);
const parsed = parseReleaseVersion(version);
if (Boolean(options.ref) === Boolean(options.tag)) {
throw new Error("Pass exactly one of --ref or --tag.");
}
// A release tag and a release branch are both git refs; everything below reads from `ref`.
const tag = options.tag ? normalizeReleaseTag(options.tag) : null;
const ref = tag ? `refs/tags/${tag}` : options.ref;
const verifyTag = deps.verifyTag ?? ((targetTag) => defaultVerifyTag(targetTag, cwd));
const readTagFile =
deps.readTagFile ?? ((targetTag, filePath) => defaultReadTagFile(targetTag, filePath, cwd));
const verifyRef = deps.verifyRef ?? ((target) => defaultVerifyRef(target, cwd));
const readRefFile =
deps.readRefFile ?? ((target, filePath) => defaultReadRefFile(target, filePath, cwd));
const runNpm = deps.runNpm ?? ((args) => defaultRunNpm(args, cwd));
const getFdroidVersionCodes = deps.getFdroidVersionCodes ?? defaultGetFdroidVersionCodes;
verifyTag(tag);
verifyRef(ref);
const version = tag ? tag.slice(1) : JSON.parse(readRefFile(ref, "package.json")).version;
const parsed = parseReleaseVersion(version);
for (const changelogFile of ["CHANGELOG.md", "CHANGELOG.zh-CN.md"]) {
const targetPath = path.join(cwd, changelogFile);
const mainContent = readFileSync(targetPath, "utf8");
const tagContent = readTagFile(tag, changelogFile);
const merged = mergeChangelogEntry(mainContent, tagContent, version);
const refContent = readRefFile(ref, changelogFile);
const merged = mergeChangelogEntry(mainContent, refContent, version);
writeFileSync(targetPath, merged);
}
@@ -200,7 +214,7 @@ export function reconcileRelease(options, deps = {}) {
"changelogs",
`${versionCode}.txt`,
);
const content = readTagFile(tag, relativePath.replaceAll("\\", "/"));
const content = readRefFile(ref, relativePath.replaceAll("\\", "/"));
const destination = path.join(cwd, relativePath);
mkdirSync(path.dirname(destination), { recursive: true });
writeFileSync(destination, content);
@@ -232,7 +246,7 @@ export function reconcileRelease(options, deps = {}) {
console.log(`Kept main version at ${currentMainVersion} (newer than or equal to ${version}).`);
}
return { tag, version, versionUpdated, fdroidFiles };
return { ref, version, versionUpdated, fdroidFiles };
}
if (isMainModule(import.meta.url)) {
+114 -8
View File
@@ -144,13 +144,13 @@ test("reconcileRelease updates changelogs, F-Droid files, and versions only when
{ abi: "armeabi-v7a", versionCode: 160031 },
{ abi: "arm64-v8a", versionCode: 160032 },
],
readTagFile(_tag, filePath) {
readRefFile(_ref, filePath) {
if (!tagFiles.has(filePath)) {
throw new Error(`Missing ${filePath}`);
}
return tagFiles.get(filePath);
},
verifyTag: () => {},
verifyRef: () => {},
runNpm(args) {
ranCommands.push(args);
},
@@ -189,10 +189,10 @@ test("reconcileRelease updates changelogs, F-Droid files, and versions only when
{ tag: "v0.17.0", cwd: dir },
{
getFdroidVersionCodes: () => [{ abi: "armeabi-v7a", versionCode: 170001 }],
readTagFile(_tag, filePath) {
readRefFile(_ref, filePath) {
return tagFiles.get(filePath);
},
verifyTag: () => {},
verifyRef: () => {},
runNpm(args) {
ranCommands.push(args);
},
@@ -249,8 +249,8 @@ test("reconcileRelease retries version sync and lockfile install when a prior ru
const result = reconcileRelease(
{ tag: "v0.17.0-beta.2", cwd: dir },
{
readTagFile: (_tag, filePath) => tagFiles.get(filePath),
verifyTag: () => {},
readRefFile: (_ref, filePath) => tagFiles.get(filePath),
verifyRef: () => {},
runNpm(args) {
ranCommands.push(args);
if (args[1] === "release:prepare") {
@@ -274,8 +274,8 @@ test("reconcileRelease retries version sync and lockfile install when a prior ru
const idempotent = reconcileRelease(
{ tag: "v0.17.0-beta.2", cwd: dir },
{
readTagFile: (_tag, filePath) => tagFiles.get(filePath),
verifyTag: () => {},
readRefFile: (_ref, filePath) => tagFiles.get(filePath),
verifyRef: () => {},
runNpm(args) {
ranCommands.push(args);
},
@@ -287,3 +287,109 @@ test("reconcileRelease retries version sync and lockfile install when a prior ru
rmSync(dir, { recursive: true, force: true });
}
});
function makeRefDeps(dir, refFiles, calls = {}) {
return {
getFdroidVersionCodes: () => [{ abi: "arm64-v8a", versionCode: 170002 }],
verifyRef(ref) {
calls.verified = ref;
},
readRefFile(ref, filePath) {
calls.reads = [...(calls.reads ?? []), `${ref}:${filePath}`];
if (!refFiles.has(filePath)) {
throw new Error(`Missing ${filePath}`);
}
return refFiles.get(filePath);
},
runNpm(args) {
calls.npm = [...(calls.npm ?? []), args];
},
};
}
function writeMainCheckout(dir) {
writeFileSync(path.join(dir, "CHANGELOG.md"), MAIN_CHANGELOG_WITH_BETA);
writeFileSync(
path.join(dir, "CHANGELOG.zh-CN.md"),
"# Changelog\n\n## 0.17.0-beta.1 - 2026-11-19\n\n- 旧内容\n",
);
writeFileSync(
path.join(dir, "package.json"),
`${JSON.stringify({ name: "paseo", version: "0.17.0-beta.1" }, null, 2)}\n`,
);
}
test("reconcileRelease reads a beta release branch ref without any tag", () => {
const dir = mkdtempSync(path.join(tmpdir(), "reconcile-ref-beta-"));
try {
writeMainCheckout(dir);
const refFiles = new Map([
["package.json", `${JSON.stringify({ name: "paseo", version: "0.17.0-beta.2" })}\n`],
["CHANGELOG.md", "# Changelog\n\n## 0.17.0-beta.2 - 2026-11-21\n\n- Beta 2\n"],
["CHANGELOG.zh-CN.md", "# Changelog\n\n## 0.17.0-beta.2 - 2026-11-21\n\n- 测试版 2\n"],
]);
const calls = {};
const result = reconcileRelease(
{ ref: "origin/release/v0.17.0-beta.2", cwd: dir },
makeRefDeps(dir, refFiles, calls),
);
assert.equal(calls.verified, "origin/release/v0.17.0-beta.2");
assert.equal(result.version, "0.17.0-beta.2");
assert.equal(result.versionUpdated, true);
assert.deepEqual(result.fdroidFiles, []);
assert.deepEqual(calls.npm, [
["run", "version:sync-internal"],
["run", "release:prepare"],
]);
assert.match(
readFileSync(path.join(dir, "CHANGELOG.md"), "utf8"),
/^# Changelog\n\n## 0\.17\.0-beta\.2 - 2026-11-21\n/,
);
assert.doesNotMatch(readFileSync(path.join(dir, "CHANGELOG.md"), "utf8"), /beta\.1/);
} finally {
rmSync(dir, { recursive: true, force: true });
}
});
test("reconcileRelease reads a stable release branch ref including F-Droid changelogs", () => {
const dir = mkdtempSync(path.join(tmpdir(), "reconcile-ref-stable-"));
try {
writeMainCheckout(dir);
const refFiles = new Map([
["package.json", `${JSON.stringify({ name: "paseo", version: "0.17.0" })}\n`],
["CHANGELOG.md", "# Changelog\n\n## 0.17.0 - 2026-11-22\n\n- Stable\n"],
["CHANGELOG.zh-CN.md", "# Changelog\n\n## 0.17.0 - 2026-11-22\n\n- 稳定版\n"],
["fastlane/metadata/android/en-US/changelogs/170002.txt", "Stable notes\n"],
]);
const calls = {};
const result = reconcileRelease(
{ ref: "release/v0.17.0", cwd: dir },
makeRefDeps(dir, refFiles, calls),
);
assert.equal(calls.verified, "release/v0.17.0");
assert.equal(result.version, "0.17.0");
assert.equal(result.versionUpdated, true);
assert.deepEqual(result.fdroidFiles, [
path.join("fastlane", "metadata", "android", "en-US", "changelogs", "170002.txt"),
]);
assert.equal(
readFileSync(path.join(dir, "fastlane/metadata/android/en-US/changelogs/170002.txt"), "utf8"),
"Stable notes\n",
);
assert.ok(calls.reads.every((read) => read.startsWith("release/v0.17.0:")));
} finally {
rmSync(dir, { recursive: true, force: true });
}
});
test("reconcileRelease requires exactly one of ref or tag", () => {
assert.throws(() => reconcileRelease({}), /exactly one of --ref or --tag/);
assert.throws(
() => reconcileRelease({ ref: "release/v0.17.0", tag: "v0.17.0" }),
/exactly one of --ref or --tag/,
);
});