Files
paseo/packages/client
Mohamed Boudra eaf38b6eb2 Fix protected relay security review findings
Relay channel:
- Validate a record header against the bytes received before allocating
  the assembly buffer.
- Client record failures close with 4003 (browser-safe) instead of 1011,
  which a browser WebSocket.close rejects and leaves the socket open.
- A present but malformed protected ready fails the handshake instead of
  falling through to a later legacy ready.
- A hello buffered while the ready send is in flight is answered: an
  identical retry gets the same ready, a changed hello closes 1008.
- Cipher-state nonce exhaustion is tested in both directions.

Client:
- DaemonClient and the Node host connector raise their endpoint security
  floor to protected once a daemon negotiates it, so a reconnect cannot be
  answered in legacy mode.
- The relay E2EE transport reports a channel-decided close synchronously
  and no longer forwards channel errors ahead of it; the client was
  reconnecting on the error before it saw the 4002 close.
- Module-mocked transport tests are replaced with real secure-channel
  tests through an in-memory link and a real ws server.

App:
- The protected pin belongs to the daemon identity: every relay route to
  the same key is pinned, and a new relay address for a pinned key
  inherits the pin.

Docs: relay URI parameter is security=protected; enabling the flag
protects new admissions only, so restart or disconnect sessions to finish
enforcement; SECURITY.md scopes confidentiality, forgery and replay
claims per mode.
2026-10-21 14:51:08 +02: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.