* Show how to include agent targets in schedule listings
* fix(cli): show the schedule hint in every table format
Use the renderer's output settings so the table alias includes the same hint about agent-target schedules.
Co-authored-by: Shane Su <26364206+suniceman@users.noreply.github.com>
---------
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>
- Background catalogue refresh started full OMP sessions whose startup routing-hint calls were cancelled on close every tick (#11128).
- Pass --no-skills --no-session --no-title to fetchCatalog sessions only; agent sessions keep skills.
- Test that the flags apply to catalogue launches and not agent launches.
* fix(omp): keep the idle deadline on provider silence
- Honor agent_end.isTerminal: a queued continuation or async delivery no longer starts the 600 s failure clock; the final end owns the idle wait.
- Measure the deadline from the last provider event and suspend it while an extension-UI question or approval waits for the user.
- Abort the provider before failing a timed-out turn so the next prompt is not rejected with "Agent is already processing"; replace the runtime on the next prompt if the abort fails.
- Clear pending UI requests when the turn settles so idle runtime collection is not blocked.
Refs #8908.
* test(omp): prove the idle gate skips non-terminal agent_end
The first version observed getState counts, but the gate calls getState once before it blocks on the scheduler, so the assertion could pass on the old code. Count scheduler waits instead: the broken gate waits, the fixed one does not.
* fix(app): show focus on the composer frame
The composer frame kept its resting border whatever you did, so it was the
only text input that never showed hover or focus, and its 200ms
border-color transition on web never ran.
Focus now turns the frame's border the theme accent, as other inputs show
their focus ring. On web, hovering an unfocused frame raises the border to
surface4: the controlHover colour (borderAccent) is already the composer's
resting border, so reusing it would change nothing. Read-only and disabled
composers stay at rest. The phase comes from getControlInteractionPhase,
the helper the other inputs use, and hover follows docs/hover.md (pointer
events on the plain frame View).
* test(app): cover composer frame hover and focus
Reads the frame's settled border colour at rest, on hover, while focused and after blur.
The Claude listing heap test capped its child at 96 MB, but most of
that budget went to loading the modules. Since prompt attachments
import the file-upload module, agent.ts also loads the protocol message
schemas, about 50 MB more. The 14 MB listing then ran out of heap on
runs where GC ran late. The test now measures what the imports retain
in a first child, then caps the listing child at that plus 64 MiB. That
is still below the 128 MiB transcript, so loading a whole history still
runs out of heap.
The opening-scene tests advanced the paused page clock once, right
after the scroll. The scene starts a few page tasks later
(IntersectionObserver, then a React render and effect). When the clock
advance ran first, the scene started on a paused clock and the request
never appeared. The tests now advance the clock in 1 s steps until the
request shows.
CI also uploads the website Playwright results when that step fails,
so the next stall has a trace.
* fix(ci): let Docker and Desktop Packages runs on main finish
Each merge cancelled the packaging runs still going for the previous main commit, and the CANCELLED checks painted that commit red. #11192 fixed this for CI only.
* test(terminal): give slow Windows output time to reach the buffer
The test allowed 10s for 3000 console writes. Passing Windows CI runs take 0.7s to 9.5s, so a loaded runner crossed the limit. The suite allows 30s per test.
* feat(providers): choose which models pickers show first
Provider settings now let you check the models pickers should list first,
with Reset and Undo. Claude's previous releases are marked legacy so
pickers can fold them; the default model is never legacy.
shownModels is overlaid on the provider snapshot at publish time instead of
living in the provider definition's configuration. Anything in that
configuration rebuilds the client and rediscovers the catalog when it
changes, which a checkbox toggle must not do. The catalog is never trimmed,
so search still finds every model.
The settings list keeps its order while you check boxes and re-sorts only
on search, reload, reset or undo, so rows never move under the pointer.
Gated on server_info.features.providerShownModels.
* feat(app): browse models in a two-pane desktop picker
On wide layouts the model picker shows a rail of Profiles and providers
beside the open provider's models. Each provider lists its chosen models
first and folds the rest under "Older models" or "All models". Search
covers every provider and profile at once, ranks shown models ahead of
folded ones, and tags folded matches. Arrow keys move between the rail
and the list, and Escape clears a query before it closes the picker.
The rail is kept on any surface that offers profiles, even with none
yet, so a one-provider host can still reach profile creation. Surfaces
without profiles and with one provider get a single 360px pane. Compact
layouts keep the existing sheet.
* feat(app): set up agents from one drawer on phones
The compact composer opened a second sheet on top of the first for the model
and each control. Phones now get one "Agent settings" drawer whose pages swap
in place: Home inlines thinking and speed pills, switches, and Mode as a radio
list (bypass modes in the warning colour); Model stacks providers as cards with
the open one in a fixed 220px box, so the others stay reachable below it, and
search sits in the thumb zone; Profiles lists saved profiles. Escape clears the
search, then returns Home, then closes. The standalone selector reuses the
Model page. Wide and desktop layouts are unchanged.
The Model page shows an empty state when the host lists no providers, which is
also the state before the first provider snapshot; the shared picker otherwise
falls back to its profiles rail and the page threw.
Themed padding sits on wrapper Views, not contentContainerStyle: the sheet
scrollers drop a themed contentContainerStyle on web.
* fix(app): finish the model picker redesign on phones and in search
- Cycle modes with the keyboard on phones again. The shortcut lived in the
Mode control, which on phones only mounts while the settings drawer is
open; the composer's controls now own it on every layout.
- Scroll a folded selected model into view when the phone Model page
reopens. The fold opened, but the list stayed at the top.
- Rank search results by match strength before shown-vs-folded. Putting
every shown row first let loose letter-order matches on uncurated
providers bury exact matches on folded models, such as "Opus 4.6".
Shown models still win ties.
- Drop ModelBrowser options and sheet scrolling that no caller uses, and
let SettingsCard shrink instead of the phone list copying its style.
* feat(app): polish mobile model drawer, thinking slider, and desktop focus
- Use a pencil icon button for provider model customization instead of a text label.
- Restore composer focus after picking a model on desktop in workspace drafts and New Workspace, which previously omitted onDropdownClose on DraftAgentControls.
- Move Profiles out of the phone Home card into the Model accordion as the first collapsible category with unified profile + model search, and let every accordion section collapse.
- Render ordered thinking effort and token-budget ranges on phones as a switch-style stepped capsule slider with step dots, and restore the provider icon beside the selected model name plus control icons on inline sections.
* fix(app): fix Android bottom search dock height and update E2E picker helpers
- Give SheetSearchDock flexDirection: "row" and relax SearchField's input height from 20 to minHeight: 20. Inside a column container, SearchField's flex: 1 collapsed vertically on Android and clipped text at the bottom of the Model drawer.
- Update E2E helpers for the redesigned picker: selectPluginModel picks directly from the two-pane rail without clicking Back; applyProfileFromPicker opens the Profiles rail entry first; selectModel clears search on first Escape before closing on second; codex-speed interacts with compact Speed pills inline on Home and verifies the section header icon highlight.
* fix(nix): trace runtime edges with dynamic import and verify Nix on PRs
Bundling @getpaseo/cli in #11155 added an esbuild banner that aliases
createRequire as __paseoCliCreateRequire. @vercel/nft only follows
injected require() calls in ESM when createRequire is imported unaliased,
so scripts/trace-daemon.mjs silently dropped @getpaseo/server's exports.js
and exited 0 while the Nix daemon smoke failed at startup.
Inject runtime dependency edges with dynamic import() so nft follows them
in ESM regardless of createRequire aliasing and in CJS without changing
the parsed module type. Assert after tracing that every declared runtime
dependency target and its importer edge are present in nft's file list
before expanding additionalInputs, and run the Linux Nix build and daemon
smoke on pull requests touching Nix, CLI, server, or daemon packaging
inputs.
* fix(nix): include desktop and is-main-module in Nix PR path filter
scripts/trace-daemon.mjs imports scripts/is-main-module.mjs and the
Linux Nix build job also builds .#desktop with PASEO_TRACE_DESKTOP=1.
Include both paths in nix.yml pull_request.paths so changes to either
exercise the Nix build and trace checks before merge.
* fix(ci): finish main runs and run CLI tests on daemon changes
Cancelling a main run mid-flight left CANCELLED checks that painted the
commit red. Server PRs skipped cli-tests, which drive a real daemon, so two
server regressions first failed on main.
* test(plugin): let the ACP crash be reported before replay ends
The fake agent exits 20 ms after its last history chunk, and the provider
ended replay after 100 ms of silence. When Windows reported the exit later
than that, the open succeeded and the test never saw request.failed.
The fake agent streams a history chunk every 20 ms, but the provider ended
replay after 100 ms without one. A runner stall longer than that ended
replay before the daemon stopped, so the reopen finished and the timeline
request resolved instead of being rejected. A 1 s quiet period keeps the
test on the path it checks: shutdown while replay is still streaming.
Co-authored-by: paseo-bot[bot] <266920839+paseo-bot[bot]@users.noreply.github.com>
The v2 thinking picker listed only a model's explicit variants, so a user who
picked one could not go back to the model's base behaviour. List Default first,
as the v1 adapter does, and send no `variant` when it is selected.
Closes#7225
Co-authored-by: 3ae3ae <ogyshjsm@naver.com>
While a reply streams, the last line of an open code block can hold one or
two backticks of the fence that will close it. Painted, they are a line of
code that disappears a moment later.
The reveal now withholds that line while the turn streams until it closes
the block or turns out to be code. Finished turns paint everything.
Co-authored-by: RoundRedDot <roundreddot@gmail.com>
* refactor(server): let the daemon decide whether an agent message is a tool call or a message
Lifecycle notices (finished, errored, needs permission, closed, still working) now reach
clients as ordinary plain-text tool calls such as "Agent finished · Child". Only peer
send_agent_prompt messages keep the agentMessage sender so they still render as a
"Sent by" bubble. No protocol fields were added.
Delivered prompts carry a trailing <paseo-message .../> marker instead of a leading
<paseo-system> envelope, so the body (including a slash command) stays at character 0
and is no longer XML-escaped. Plain human messages get no marker unless they share a
turn with agent messages or contain marker syntax. Legacy envelopes and legacy
agentMessage notification rows keep rendering (COMPAT tagged).
* fix(server): keep a delivered message's sender when a provider trims the replayed prompt
Claude history replay trims each user prompt, so a body that started with whitespace came
back shorter than the marker's length and replayed as raw text. Drop the body's leading
whitespace before writing the marker.
* fix(server): stop waking the parent when a delegated child ends its turn but is still working
#10864 told the caller "ended its turn but is still working" whenever a child's turn ended
with work pending, and "is still working" after 24 hours of following. The caller could not
act on either notice; it only woke up to wait again. The watch now follows such a child
silently and reports once: finished when it settles, or errored, permission, and closed as
they happen. After 24 hours it reports finished with the child's last reply, so a task that
never ends cannot hold the caller forever.
The still-working event and its agent_still_working tool are gone. Transcripts with #10864's
event="message" notices replay as messages from the child, as clients showed them then.
* fix(server): report every turn end and keep following until the child settles
A child that ends its turn while it still has pending work (a background task such as
`npm run dev`, queued messages, or its own delegated agents) now reports `finished` to its
caller at once. The notice names the pending work and says the caller will hear again. The
subscription keeps following the child: each later turn end reports again, and the child
settling with nothing pending, with or without another turn, sends the final `finished`.
The 24-hour follow limit sends a final `finished` with the child's last reply.
Every notice is a plain `agent_finished` tool call. There is no still-working event.
The observation's initial wait no longer repeats a turn end the stream already reported,
which would have sent the first turn end twice.
* fix(server): share concurrent agent refresh results
Keep a refresh in flight until provider history has been hydrated so concurrent
requests receive the same reload outcome across connections.
* fix(server): keep concurrent refreshes within their daemon
Hold reload and history hydration together across client connections, and scope
pending work to the agent manager that owns it. Exercise the real daemon with a
slow-history provider, separate managers, shared failures and subsequent retries.
Co-authored-by: tieo <65707274+tieo@users.noreply.github.com>
* fix(server): capture reload reply before publishing updates
* test(server): run concurrent refresh coverage in CI
* fix(server): preserve each refresh caller workspace recovery
---------
Co-authored-by: tieo <65707274+tieo@users.noreply.github.com>
Co-authored-by: paseo-bot[bot] <266920839+paseo-bot[bot]@users.noreply.github.com>
* fix(server): reuse provider images across daemon restarts
Co-authored-by: Christoph Leiter <christoph@leiter.io>
* test(server): isolate provider image fixtures from the daemon home
---------
Co-authored-by: paseo-bot[bot] <266920839+paseo-bot[bot]@users.noreply.github.com>
Co-authored-by: Christoph Leiter <christoph@leiter.io>
* feat(server,client): support activeTurnBehavior queue without sourceAgentId
Plugins and human UI surfaces previously had to pass steer or interrupt when sending a prompt without sourceAgentId, which could interrupt in-flight tool calls. Non-agent senders can now pass activeTurnBehavior: "queue" to wait behind a running turn and deliver as a normal user prompt once the turn ends, or start immediately when the agent is idle.
- Allow optional source in AgentMessageDelivery; non-agent queued messages skip the 2-second agent coalescing window when idle, stay unwrapped when dispatched alone, and use kind="user-message" envelopes when sharing a provider prompt with other messages.
- Route non-agent queue requests through Session's message queue with prepareAgentMessage, MessageReceipts deduplication, and clearPendingPermissions: false.
- Advertise features.nonAgentMessageQueue and gate non-agent queue in DaemonClient.activeTurnBehaviorForHost with COMPAT(nonAgentMessageQueue).
* docs: document non-agent activeTurnBehavior queue support
* chore: tag nonAgentMessageQueue COMPAT comments with v0.18.2
* test(cli): update terminal-worker upgrade test for protocol version 7
Commit d9497fb1e (#11163) bumped TERMINAL_WORKER_PROTOCOL_VERSION from 6 to 7 with a v6 draining adapter, leaving protocols 0-5 obsolete. Update 46-daemon-terminal-worker-upgrade.test.ts to match protocol version 7 so cli-tests shard 1 passes.
* feat(usage): push live Claude and Codex usage telemetry and preserve poll schedule
Stream Claude rate_limit_event and Codex account/rateLimits/updated observations
into cached discovered account reports, push status.usage_report_changed updates
to subscribed clients, preserve the 5-minute poll schedule across sidebar
toggles, and retry failed usage fetches with exponential backoff from 30s.
Closes#11115
Co-authored-by: Zayooo <mrcold135@gmail.com>
* fix(usage): preserve poll schedule on push and schedule trailing post-turn refetch
---------
Co-authored-by: Zayooo <mrcold135@gmail.com>
When Claude or Codex runs through a wrapper command (such as TeamClaude or a per-profile proxy wrapper) or an explicit login environment token (CLAUDE_CODE_OAUTH_TOKEN, ANTHROPIC_API_KEY, ANTHROPIC_AUTH_TOKEN, CODEX_API_KEY, CODEX_ACCESS_TOKEN), Paseo previously fell back to reading local ~/.claude / macOS Keychain or ~/.codex/auth.json from disk and showed another account's quota card or a rejected-login error.
- Add buildProviderUsageLaunch and expose resolved launch metadata from ClaudeAgentClient/ClaudeAgentSession, CodexAppServerAgentClient/CodexAppServerAgentSession, and ProviderSnapshotManager.listProviderEnvironments.
- Allow built-in claude and codex usage sources to declare provider so PluginService attaches resolved launch metadata on global discovery.
- Suppress local ~/.claude / Keychain and ~/.codex/auth.json fallback across global discovery, configured-provider host discovery (selectProviderUsageEnv), and agent session discovery when launched via a wrapper command, login token override, or foreign endpoint/cloud backend.
- Preserve plain OPENAI_API_KEY without OPENAI_BASE_URL for Codex (matching Codex load_auth precedence), legitimate custom CLAUDE_CONFIG_DIR / CODEX_HOME profiles, custom paths to the default claude / codex binary, and independent OpenCode/Pi/OMP harness routes.
Closes#3228
Dependency declarations that `import "node"` (e.g. utif2) pulled @types/node
into the install-time type walk, which failed on node: specifiers newer than
the host Node (node:stream/iter on Node 24) or, with @types/node absent,
on the unresolved "node" import. Map bare "node" in declarations to
@types/node and treat any node: specifier as a builtin.
Co-authored-by: Gabriele Magno <gabrigmm@gmail.com>
Co-authored-by: Gabriele Magno <36011800+nkwib@users.noreply.github.com>
Co-authored-by: paseo-bot[bot] <266920839+paseo-bot[bot]@users.noreply.github.com>
* feat(mcp,plugin): expose workspace metadata updates via MCP and plugin snapshots
* fix(app,server): persist workspace metadata in replica cache and normalize null keys on create
* fix(pi): finish tintinweb subagents collected with get_subagent_result
@tintinweb/pi-subagents returns get_subagent_result as plain text with no
details, and reading a result cancels the completion notification. The
adapter only read details.status, so a background child collected this way
stayed running, and history replay after a restart rebuilt it as running.
Read the status from the result's "Agent: <id> / Type: ... | Status: <status>"
header, and look the child up by the header's id, because agent_id can be
the agent's name instead of its id.
* fix(pi): match tintinweb results to the spawn or resume that produced them
A resumed agent gets a new Agent call and its own row, but results were
matched by agent id to whichever call was latest. A completion notification
built before a resume, or a get_subagent_result that started before one,
could mark the resumed run finished while it was still running.
Notifications now go to the call named in their <tool-use-id>, and a
follow-up goes to the attempt that was latest when it started. A
notification without details is read from its <task-notification> blocks.
* fix(pi): finish tintinweb rows for scheduled spawns
An `Agent` call with `schedule` registers a job and returns only text, with
no `details` and no agent id. The adapter added a running row for the call
and never sent a final status, so every scheduled spawn stayed running.
When a completed `Agent` call with `schedule` has no `details`, the row now
ends `completed` if the text reports the registered job (`Scheduled "<name>"
(id: <id>, type: <type>)`), and `failed` for the extension's refusals, such
as scheduling being disabled.
* fix(pi): match name-based follow-ups to the attempt they started on
get_subagent_result accepts a handle such as `explore` as well as an
agent id. The adapter only saved a target for follow-ups that used an
id, so a follow-up by name fell back to the agent's latest call. If the
agent was resumed before the result arrived, the old result marked the
resumed run finished.
Record each agent's spawn and resume calls in order, and note how many
calls existed when a follow-up started. The result header supplies the
agent id, and the follow-up resolves to that agent's latest call from
before it started, whether it named the agent by id or by handle.
* fix(pi): keep collected subagent results on the right run
History replay visits every call in an assistant message before processing their results. Record attempt order as the calls start and attach the native ID when it arrives, so a collected result can finish the child it belongs to. Keep scheduled job registration outside the scope of this fix.
Co-authored-by: Andrew McFague <144809+amcfague@users.noreply.github.com>
---------
Co-authored-by: Andrew McFague <144809+amcfague@users.noreply.github.com>
Co-authored-by: paseo-bot[bot] <266920839+paseo-bot[bot]@users.noreply.github.com>
Reconcile streamed Claude content blocks per block index instead of
against the whole message, preventing duplicate final thinking/text
blocks in multi-block messages (#6463). Buffer thinking deltas until
each block's completed snapshot arrives so blocks marked in
`narration_block_indexes` render as assistant text (for example before
AskUserQuestion) rather than inside Thinking (#6199), while flushing
any unfinished thinking on message stop or terminal turn events with
their explicit turnId preserved.
Co-authored-by: ThePharmer <metastallion@gmail.com>
Pi and OMP tag streamed assistant deltas with contentIndex and can emit deltas for an earlier block after a later block starts. Forwarding deltas in raw arrival order split thinking blocks and cut answer text mid-word or mid-code-fence during live streaming.
Share a MessageContentStream helper across PiRpcAgentSession and OmpAgentSession that holds later indexed text/thinking blocks behind active earlier blocks until block end, flushes buffered content on message boundaries and on turn abort/interrupt/error paths, and avoids blocking on non-streamed or toolCall entries.
Send the active terminal defaultColors at creation time and sync live palette
updates from the focused viewer through active-viewer ownership (mirroring
terminal-size-ownership). Derive COLORFGBG at PTY spawn unless already set in
env, keep the daemon as the single OSC 10/11/12 responder, track DEC mode 2031
(CSI ? 2031 h/l + DECRQM) and DSR 996/997 reports on live light/dark polarity
switches, and bump TERMINAL_WORKER_PROTOCOL_VERSION from 6 to 7 with a v6
draining adapter.
Closes#2795
Supersedes #4345
Co-authored-by: Glen Stampoultzis <gstamp@gmail.com>
Android 12+ system "Bold text" sets Configuration.fontWeightAdjustment (+300).
TextView applies that weight increase at draw time to text without an explicit
fontWeight or fontFamily, while React Native 0.86.3's TextLayoutManager measures
the text unbolded. The wider drawn glyphs overflow the measured box and clip
trailing words, characters, and lines app-wide (#4057, #10152, #10850).
Add an Android Expo config plugin that overrides MainActivity.attachBaseContext
to zero fontWeightAdjustment on an empty sparse Configuration(), so measurement
and drawing agree while unrelated configuration fields (uiMode, densityDpi,
orientation, screenWidthDp, fontScale, locales) continue updating across
onConfigurationChanged and compose cleanly with PaseoDisplayMetrics (#9995).
Paseo's own bold styles (Markdown **bold**, headings, bold labels) remain bold.
Co-authored-by: JustinJoshi <JustinJoshi@proton.me>
* fix: prevent workspace update storms and batch client directory commits
Fixes three compounding causes of reconnect stalls, 60s RPC timeouts, and
client freezes/ANRs on hosts with many workspaces (especially sharing a Git
checkout):
1. Seed sequenced workspace subscriptions in Session from the full, untagged,
visibility-filtered descriptor set instead of syncSeq-tagged or partial
changes-mode response entries, eliminating redundant workspace_update
re-emits and preserving includeBackground filtering and git observation.
2. Retain a bounded LRU (2,000 entries) of last-known WorkspaceGitService
snapshots past the 90s warm release grace, serving retained snapshots
stale-while-revalidate on non-forced getSnapshot reads while revalidating
in the background Git lane and staying silent when Git state is unchanged.
3. Coalesce overlapping workspace update flushes per subscription and pace
multi-workspace workspace_update bursts one drained frame at a time so
interactive RPC replies are never head-of-line blocked on the transport.
4. Batch incoming workspace_update frames per animation frame/tick in
DirectorySync and WorkspaceDirectoryReplica so a 200-workspace burst
produces one mergeWorkspaces store commit and one checkpoint write.
Closes#5530
Refs #9487, #7760
Co-authored-by: Daniel Stieglmayr <theunlimited64@gmail.com>
* fix(server): decouple paced workspace burst queue from flush and bootstrap
---------
Co-authored-by: Daniel Stieglmayr <theunlimited64@gmail.com>
* fix(desktop): isolate browser webview focus during agent automation
Prevent Electron browser guests from stealing keyboard focus from the
chat composer while an agent drives parked or visible split-pane tabs:
- Gate BrowserPane's webview focus/mousedown promoter so non-presented
panes and agent-guarded presses never call onFocusPane, webview.focus,
or paseo:browser:focus; mark parked 1x1 surfaces inert with tabindex=-1.
- Focus browser_type and browser_keypress targets via DOM element.focus
plus caret-to-end positioning instead of CDP mousePressed.
- Bracket CDP pointer presses (browser_click, browser_drag) with a
ref-counted host focus guard (including IME composition protection,
50ms late-focus recheck, and Emulation.setFocusEmulationEnabled(true)).
Closes#4679
Supersedes #10603
Co-authored-by: Oleg Puchkov <puchkoff@gmail.com>
* fix(desktop): verify DOM focus in browser_type and require host focus guard in ipc
---------
Co-authored-by: Oleg Puchkov <puchkoff@gmail.com>
* fix(usage): discover configured custom provider accounts with strict source scoping and locator env allowlist
Host Usage listings previously scanned only the daemon's default login stores,
leaving custom Claude and Codex providers configured with their own
CLAUDE_CONFIG_DIR, CLAUDE_SECURESTORAGE_CONFIG_DIR, or CODEX_HOME invisible in
Usage until one of their agents was opened.
Host Usage now discovers enabled providers that configure usage-locator
environment variables, while enforcing two strict security boundaries:
- Provider-matched dispatch: each configured provider scope is sent ONLY to
usage sources whose declared `providers` list includes that provider's base
provider ID (never broadcast to unrelated or third-party usage plugins).
- Explicit locator env allowlist: only non-secret config-directory /
credential-store locator environment variables (including
CLAUDE_CONFIG_DIR, CLAUDE_SECURESTORAGE_CONFIG_DIR, CODEX_HOME,
OPENCODE_CONFIG_DIR, XDG_CONFIG_HOME, XDG_DATA_HOME, HOME, etc.) cross into
usage discovery. Raw auth tokens, API keys, and arbitrary custom env vars
are stripped, and foreign-endpoint providers are excluded daemon-side.
Also adds CLAUDE_SECURESTORAGE_CONFIG_DIR support to Claude Keychain route
derivation and preserves cached usage, recovery history, sidebar summary, and
source-toggle behavior across provider renames.
Closes#3589
Co-authored-by: Qichang Zheng <qichang.zheng2000@gmail.com>
* refactor(usage): keep provider env allowlist filtering solely inside UsageSourceRegistry
* fix(usage): allow OPENCODE_DB in host usage discovery locator env allowlist
---------
Co-authored-by: Qichang Zheng <qichang.zheng2000@gmail.com>
* perf(cli): cut CLI startup overhead with lean client, lazy dispatch, and esbuild bundling
- Add lean protocol codec and @getpaseo/client/node/lean entry that skip ws-outbound.aot.js and full Zod message schemas, and dynamically import @getpaseo/relay only for pairing-offer/E2EE targets
- Replace eager command imports in packages/cli/src/cli.ts with a static command manifest + lazy dynamic imports, remove duplicate createCli() in run.ts, and lazy-load yaml/chalk in output rendering
- Extract zero-Zod PID, home, and credential helpers to @getpaseo/server/daemon-files
- Bundle @getpaseo/cli with esbuild code splitting (--splitting --format=esm --minify) and update scripts/trace-daemon.mjs
- Fast-path complete agent UUIDs in resolveAgentEntry() via fetchAgent() without paginating archived agents
* fix(client): generate zero-Zod schema defaults for lean protocol codec
- Generate message-defaults.ts from Zod protocol schemas inside generate-validation-aot.mjs (50 outbound + 11 inbound tables, agent snapshot defaults, legacy transform fallbacks, and hello.rejected reasons)
- Apply generated defaults in leanProtocolCodec so older daemons get the same defaulted fields as strictProtocolCodec without loading Zod or ws-outbound.aot.js
- Add strict-vs-lean parity tests across legacy outbound, inbound, and status payloads
- Deduplicate sync/async CLI renderer dispatch between render.ts and render-async.ts
- Switch startup-boundary runtime hook test to module.registerHooks + synchronous stderr flush and it.skipIf for missing dist
* fix(protocol): support prefault and reject unlisted non-pure schemas in defaults generator
- Support Zod .prefault() nodes directly in message-defaults.ts (e.g., pull_request_timeline_response with omitted payload)
- Fail generate:validators loudly if any new .catch() or .transform()/.preprocess() schema is added without a lean rule or explicit legacy allowlist entry
- Add pull_request_timeline_response omitted-payload parity test to lean.test.ts
* feat(plugins): add tunnel provider plugins with cloudflared and tailscale funnel built-ins
Plugins can now register a tunnel provider that turns a local HTTP host:port
into a public HTTPS URL. The daemon's TunnelManager owns exposures and their
lifecycle, so a provider only reports state through report() and stops when
its signal aborts. Exposures close when the owning plugin stops, reloads, is
disabled, or crashes, and when the daemon shuts down.
This is the shared primitive that later work uses to expose MCP servers and
workspace services. Clients gate on server_info.features.tunnelProviders.
* fix(plugins): keep tunnel exposures from reporting wrong URLs or outliving Paseo
- cloudflared: the quick-tunnel URL pattern matched api.trycloudflare.com in
provisioning errors, so an offline open reported ready with the API endpoint.
- tailscale-funnel: `funnel --bg` stored the Funnel in tailscaled, so a crashed
plugin or daemon left the target public with no owner. Run the Funnel in the
foreground instead; tailscaled drops it when the CLI exits.
- tailscale-funnel: a failed `funnel status` counted as "no ports in use" and
could replace and later remove the user's own handler. Fail the open instead.
- Add the Chinese translation of the tunnel providers reference section.
* fix(plugins): ship cloudflared with quick tunnels only
A named Cloudflare tunnel routes through ingress set in the Cloudflare
dashboard, so its URL never served the exposure target. Two exposures for
different targets both reported ready at the same URL. Named tunnels return
later with per-target routing.
Also mark the tunnel-provider example as requiring 0.18.0-beta.1, like the
notifications example, so the example build test loads it.
* fix(plugins): detect missing tunnel CLIs and run tunnel tests on Windows
On Windows a bare name that is not on PATH runs through cmd.exe, which exits
9009 instead of failing the spawn with ENOENT. The providers reported a
missing tailscale as "not running". Treat exit 9009 as not installed.
The fake CLIs were shebang scripts, which Windows does not run, and the
tests relied on SIGTERM handlers that a Windows force kill skips. The fakes
now get a .cmd launcher on Windows, and the tests check that the fake
process is gone instead of a handler side effect.
* test(plugins): replace the Windows Path variable in tunnel CLI tests
Windows keeps the original case of environment names, usually `Path`.
Spreading process.env and setting `PATH` left the real search path beside
the override, so the missing-CLI tests could still find or query a real CLI.
The missing-CLI tests now assert the exact "not installed" status.
* test(plugin): parse shared declarations once in SDK boundary type checks
Each typeErrors() call built a fresh program and parsed the SDK, library,
and dependency declarations again. On a slow Windows runner one check took
over the 5 s test timeout. The checks now share the parsed configuration
and declaration files, so each one parses only its snippet. The file runs
in about a quarter of the time locally.
* fix(plugins): launch tunnel CLIs without a shell so a missing CLI reads as not installed
On Windows a bare name that is not on PATH ran through cmd.exe, which exits
with a generic code and a localized "not recognized" message. The providers
then reported a missing tailscale or cloudflared as "not running" or "failed
to query". Without a shell the spawn fails with ENOENT on every platform.
Both CLIs ship as executables; a .cmd set as a full binary path still runs
through cmd.exe. This replaces the exit-code 9009 check, which cmd.exe does
not return as the process exit code.
Cursor 3.27+ encrypts `cursorAuth/accessToken` in `state.vscdb` with a
`cursor-safe-storage:v1:` Electron safeStorage prefix, so sending that
value as a bearer token caused Usage to fail with HTTP 401. At the same
time, discovery missed the macOS Keychain (`cursor-access-token` /
`cursor-user`), macOS `~/.cursor/auth.json`, and Windows
`%APPDATA%\Cursor\auth.json`, and stopped at the first candidate instead
of letting the usage registry fall back after a 401.
- Skip `cursor-safe-storage:` values across every token store and reader
so ciphertext is never sent as a bearer token.
- Add macOS Keychain (`cursor-access-token` / `cursor-user`) and
`~/.cursor/auth.json` discovery to both global and session lookup.
- Add Windows `%APPDATA%\Cursor\auth.json` discovery to global lookup.
- Return all unique usable credentials in priority order so
`UsageSourceRegistry.fetchWithFallback` tries the next candidate when
an earlier credential is rejected.
Co-authored-by: jasonhnd <3293256+jasonhnd@users.noreply.github.com>
Co-authored-by: Kevin <kevin.pierrot@gmail.com>
Co-authored-by: Sian Lerk Lau <kiawin@gmail.com>
Co-authored-by: ChicorSun <125846596+ChicorSun@users.noreply.github.com>
Co-authored-by: Karl Bitz <kb@wardbitz.com>
* fix(usage): support OpenCode v2 usageSession, session scopes, and Codex opencode.db logins
- Implement usageSession() on OpenCodeV2Session with provider "opencode",
authoritative model tracking (info.model falling back to config.model),
effective provider + launch harness environment, and a stable sessionKey.
- Read active and migrated OpenAI OAuth logins from OpenCode v2's opencode.db
in codex-usage-source (honoring absolute/relative OPENCODE_DB, active=1 or
migrated active IS NULL, falling back to v1 auth.json, and normalizing
provider to "opencode").
- Add OpenCode session-scope discovery to built-in usage sources OpenCode
serves (opencode-go, minimax, zai, kimi, grok, copilot, openrouter-host).
Co-authored-by: Jiayang Wu <651475459@qq.com>
* fix(usage): keep Copilot/Kimi default visibility hints and deduplicate session discovery helpers
---------
Co-authored-by: Jiayang Wu <651475459@qq.com>
* feat(app,server): upload image attachments via file.upload.request
Previously, sending images inlined base64 payloads directly inside
send_agent_message_request and create_agent_request JSON messages,
causing phone photos to exceed relay message limits (#2668) and
multi-photo batches on Android to overflow OkHttp's 16 MiB outbound
WebSocket queue and close with code 1001 (#11117).
- Upload attached images sequentially via DaemonClient.uploadFile
(file.upload.request + 128 KiB FileChunk frames) across all composer,
queued send, draft creation, new workspace, and workspace setup paths.
- Pace DaemonClient.uploadFile on unpaced transports (supportsDrain=false)
with a 1 MiB correlated ping/pong flush barrier so single >16 MiB files
cannot overflow OkHttp's outbound queue, and start the 60s RPC response
deadline only after FileEnd so slow uplinks do not time out mid-stream.
- Resolve uploadedImages on the daemon into native { type: "image" }
provider content blocks after enforcing canonical realpath containment
inside join(paseoHome, "uploads"), and project UploadedImage metadata
onto user_message timeline items so thumbnails and lightbox previews
persist across reloads and devices.
- Preserve full resolution and quality for JPEG/PNG images (picker
quality: 1, no downscaling for already-supported formats) while keeping
HEIC/HEIF conversion to resized JPEG for provider vision compatibility.
* test(server): canonicalize temp paseoHome path in prompt-attachments test
* refactor(protocol,app,server): carry uploaded images as uploaded_file attachments with role="image"
Replace the separate top-level `uploadedImages` wire field with an
optional `role: "image"` hint on `UploadedFileAttachmentSchema` inside
the existing `attachments` array.
- On current daemons, `resolveAgentPrompt` partitions `uploaded_file`
entries with `role: "image"` out of `attachments`, validates canonical
`realpath` containment in `$PASEO_HOME/uploads`, resolves them into
native `{ type: "image", data, mimeType }` provider vision blocks, and
projects `user_message.images` thumbnails.
- On older daemons (v0.1.91-v0.18.1), Zod strips only the unknown
optional `role` field and preserves the valid `uploaded_file`
attachment (`type`, `id`, `fileName`, `mimeType`, `size`, `path`), so
an auto-updated mobile or web app never silently drops photos against
an older host.
- Plain `Upload file` attachments (without `role: "image"`) remain
unchanged (`Uploaded file: ... Path: ...`).
- Also reverts the unrelated conditional-spread refactor in
`DaemonClient.createLegacyAgent`.
Local agent subprocesses expect an HTTP loopback URL for Paseo's built-in
MCP server (/mcp/agents) and terminal activity hooks (/api/terminal-activity).
Previously, bootstrap derived both URLs directly from the primary listener,
so Unix-socket and named-pipe daemons returned null (silently omitting MCP
and terminal activity) and non-loopback TCP listeners handed agents a
non-loopback address that fails loopback validation and proxy bypass. In
addition, providers spawned under a user's HTTP_PROXY routed local 127.0.0.1
MCP requests through the proxy and failed with HTTP 502 / handshake errors.
Introduce a daemon-owned loopback agent endpoint that reuses the primary
listener when it is already loopback-reachable TCP and otherwise binds a
dedicated 127.0.0.1:0 HTTP server exposing only /mcp/agents and
/api/terminal-activity with loopback remote-address, Host-header, and bearer
auth checks. Merge 127.0.0.1, localhost, and ::1 into NO_PROXY (and no_proxy
when set) in the shared provider launch environment without clobbering user
entries.
* fix(app): replace hidden Android terminal TextInput with native input view
Android's hidden React Native TextInput splits every IME edit into two
unsynchronized JS events (onChangeText and onKeyPress), hides Android's
active composing span, omits deleteSurroundingTextInCodePoints, and leaves
multiline newline residue after Enter. Those boundary flaws caused doubled
first/initial characters, locked or dropped Backspace, swallowed Latin
candidates in mixed CJK/English keyboards, broken Korean Hangul after
Enter, and duplicate hardware Enter presses.
Replace the hidden Android TextInput with a dedicated 1x1 native Android
PaseoTerminalInputView backed by a custom BaseInputConnection
(TerminalInputConnection) and onKeyDown handler in paseo-terminal. The
native input connection coalesces batch edits, diffs against real Android
composing spans, clears its private Editable after commit/finish, handles
all three Backspace paths, emits a single CR on Enter, and sets
EditorInfo flags directly without ReactFindViewUtil patching.
Co-authored-by: Ouyang Xingyuan <galaxyroaming@qq.com>
Co-authored-by: Lennart Schoch <lennart@usebounce.com>
Co-authored-by: Jason <jaeysin@gmail.com>
* fix(app): expose composing state via ComposingTextOwner and deduplicate terminal input types
React Native's BaseViewManager.setTestId overwrites the unkeyed View.tag
with the string testID, which would hide PaseoTerminalInputView's active
IME composing span from PaseoHardwareKeyboardModule.
Introduce ComposingTextOwner in paseo-hardware-keyboard and implement it
on PaseoTerminalInputView so hardware arrow routing reads composing state
without touching View.tag. Also re-export shared terminal input types
from terminal-input.types.ts in terminal-input.native.tsx and drop its
unreachable Android hardware-keyboard effect.
---------
Co-authored-by: Ouyang Xingyuan <galaxyroaming@qq.com>
Co-authored-by: Lennart Schoch <lennart@usebounce.com>
Co-authored-by: Jason <jaeysin@gmail.com>
On Windows, node-pty's kill closes the pseudoconsole and kills the
console's processes only after a forked helper reports them. The force
step of killAndWait repeated that same soft kill. The terminal worker
exits right after killAndWait during shutdown, so on a slow machine the
helper's kill never ran and the program outlived its worker. This made
"Restart and close terminals" leave the program running and flaked the
terminal-worker-lifecycle Windows test.
The force step now kills the program's process tree with tree-kill.
Co-authored-by: paseo-bot[bot] <266920839+paseo-bot[bot]@users.noreply.github.com>
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
The new tagline is the sponsor's own wording and is much longer. With two
long captions the footer sponsors band pushed "Become a sponsor" onto its
own row in the docs column (max-w-prose, about 700px), so the footer
placement uses narrower captions and a smaller column gap.
The interface font rule applies to every element outside a `data-pmono`
surface. The terminal root had no marker, so xterm's DOM renderer rows took
the interface font while the cell grid was measured with the code font.
Fixes#6903
Co-authored-by: sh0nuff <sh0nuff@users.noreply.github.com>
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
Codex combines process-level -c overrides and thread/start request config
overrides sequentially in build_cli_overrides_layer. Sending a whole-table
mcp_servers object (including an empty {}) replaces the entire mcp_servers
table built from earlier -c mcp_servers.* flags, wiping out alias-configured
MCP servers.
Emit dotted mcp_servers.<name> keys (and omit MCP keys entirely when empty)
so Paseo-injected MCP servers and tool-policy preapprovals merge alongside
alias -c overrides and config.toml servers. Fall back to a single whole-table
mcp_servers only when a server name contains a dot, which Codex's
path.split('.') override parser cannot represent as one segment.
Close three verified provider child-process leaks (Part of #4450):
1. Single-flight Claude query launch (`ensureQuery`): concurrent callers
(such as the app and plugins both requesting commands on resume) now
share one in-flight `queryStart` promise instead of spawning duplicate
`claude` processes and overwriting `this.childProcess`. A restart
requested mid-launch retires the stale query and relaunches once, a
pre-launch restart mark is consumed when launch options are copied,
and `queryStarting` is always cleared in `finally`.
2. Pre-init prompt withdrawal (`ClaudeRuntimeSafety`): track `initSeen`
separately from `turnSeen` so withdrawing every unstarted prompt before
`system/init` clears `turnSeen` and allows idle collection to stop the
runtime, while preserving the hold when a turn had already started or
announced `init`.
3. Bounded structured metadata generation (`generateStructuredAgentResponse`):
enforce a 300s default deadline across retries and share one deadline
across `generateStructuredAgentResponseWithFallback`, so stalled
internal metadata agents always reach `finally` and call `closeAgent`.
Co-authored-by: Desmond Leong <desmond@returning.ai>
Co-authored-by: Nicholas Salgueiro <nickmaglowsch3@gmail.com>
Add image converted HEIC photos to full-resolution PNG. Inlined as base64,
a sub-5 MB iPhone photo became a 56 MiB message and was rejected by the
32 MiB relay limit (getpaseo/paseo#2668).
HEIC/HEIF now becomes JPEG (quality 0.85); other unsupported formats still
become PNG to keep transparency. Any picked image whose long edge exceeds
2000 px is downscaled to fit, keeping its JPEG/PNG format.
Co-authored-by: Brandon Elliott <923787+Brandon168@users.noreply.github.com>
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
* feat(plugin): show ACP form elicitations as native question cards
The shared plugin ACP client advertised empty clientCapabilities and
had no createElicitation handler, so ACP agents like Antigravity (agy)
could not send structured form elicitations and fell back to plain
markdown option lists (leaving ask_question unanswerable via Paseo's
question card).
Advertise clientCapabilities.elicitation.form by default and map ACP
1.x form elicitation schemas onto Paseo's existing kind: "question"
permission card inside packages/plugin/src/server/acp-internal:
- Track tool approvals and form elicitations in one unified pending map
so deferred turns, mode-switch guards, turn end, interrupt, close,
and failure cleanup stay consistent.
- Never auto-accept elicitations in autoAcceptMode; decline url mode,
out-of-turn, mismatched-session, and unsupported/malformed schemas
cleanly without throwing.
- Fold optional sibling <key>_other string fields into allowOther for
both no-sentinel (agy) and "other"-sentinel schemas, preserve unique
headers/labels and ", " multi-select handling, mark defaults, and
keep __proto__ keys safe via Object.hasOwn and Object.fromEntries.
Co-authored-by: Daniel JB Clark <djbclark@gmail.com>
Co-authored-by: Jake Cattrall <krazyjakee@gmail.com>
* fix(plugin): keep _other separate when required choice has no other sentinel
---------
Co-authored-by: Daniel JB Clark <djbclark@gmail.com>
Co-authored-by: Jake Cattrall <krazyjakee@gmail.com>