Files
paseo/packages/client
paseo-bot[bot]and김동선 839d45103b Reconnect promptly when the app returns to a stalled handshake (#10348)
* fix(client): reconnect right away when the app returns to the foreground

While the app is hidden the OS blocks the network, so relay retries fail
and the backoff climbs to 24-30s. On returning, ensureConnected({ verify })
either waited for a connect attempt started while hidden to hit its 15s
timeout, or retried after that inflated backoff, leaving the mobile app on
"Reconnecting to host" for 40-60s.

Foregrounding now resets the backoff, and replaces a connect attempt that
has been pending for 3s or more instead of waiting out its timeout.

* fix(client): keep the base retry delay after a foreground reconnect

Use the immediate retry path when replacing a stalled connection attempt.
Arming a retry timer first would raise the backoff even though the
replacement cancels that timer before it fires.

Co-authored-by: 김동선 <88572124+dongsun1@users.noreply.github.com>

* fix(client): keep queued requests during foreground reconnect

A stalled handshake has not sent the queued requests. Replace its transport while the client remains connecting so the new handshake can send them with their existing deadlines.

* fix(client): serialize foreground credential lookup and handshake

Enter connecting before reading credentials so a foreground event shares the active connection attempt. Retire the previous transport before the read so no obsolete socket can disconnect the new one.

* fix(client): time out stalled credential lookups

Keep a single connection attempt from credential lookup through hello. Foreground recovery can replace that attempt, and only the current lookup can install a transport.

* fix(client): retire the connection deadline before retrying

A failed hello already schedules its retry. Clear the ended attempt at the retry transition so its deadline cannot change the error or raise the delay.

* Preserve the handshake timeout after credential lookup

---------

Co-authored-by: 김동선 <88572124+dongsun1@users.noreply.github.com>
Co-authored-by: paseo-bot[bot] <266920839+paseo-bot[bot]@users.noreply.github.com>
2026-11-30 08:42:51 +00:00
..

@getpaseo/client

TypeScript SDK for building integrations on top of a Paseo daemon.

npm install @getpaseo/client
import { createPaseoClient } from "@getpaseo/client";

const client = createPaseoClient({ url: "ws://127.0.0.1:6767/ws" });
await client.connect();

const agent = await client.agents.create({
  config: { provider: "codex/gpt-5.5" },
  cwd: "/Users/me/dev/storefront",
  prompt: "Review the current diff and name the riskiest change.",
});

const result = await agent.waitForFinish();
console.log(result.lastMessage);

await client.close();

The public API is the package root. Imports under @getpaseo/client/internal/* are unsupported implementation details used by Paseo's own packages.

Read the SDK documentation for agents, workspaces, terminals, provider discovery, events, recipes, and the API reference. Runnable TypeScript patterns also live in examples/.

Runtime

The client needs a WebSocket implementation. Modern browsers and Node.js 22 provide one globally.

Use a WebSocket URL ending in /ws, such as ws://127.0.0.1:6767/ws. Pass password when the daemon requires authentication.

The client advertises its supported protocol capabilities by default. Optional capabilities overrides extend or override that declaration; browser hosting must be supplied by the caller. Connecting alone does not subscribe to agent timelines or catalog events. See the event guide for subscription lifetimes and timeline replacements.

Stability

The high-level API exported from @getpaseo/client is the supported SDK surface. The SDK and daemon remain protocol-compatible across versions, but newly added capabilities can require a newer daemon.