Introducing The Sweep: OX’s New Live Security Research Series
Register Now
Breaking: The 2026 Vulnpocalypse Hits PHP: Four Critical RCEs, but How Dangerous Are They?
Read the Report
Are you exposed? Connect your apps in minutes.
Scan your apps free

@parcha/pi-browser

Latest version: v0.1.0-beta.56

Overview

Last scanned
24 Nov 2026
Published
24 Nov 2026
npm package Publisher: aj-parcha, miguel-parcha
1,259 Stars
104 Forks
38 Versions
8.1K Downloads
JavaScript Repo language

Scan summary

@parcha/pi-browser was last scanned on 24 Nov 2026 at version 0.1.0-beta.56. Risk score 0 of 100. No malicious behavior was detected.

  • Releases: 38 versions; the latest 5 were published within 3 days (22–24 Nov 2026).
  • Findings: No rules fired in version 0.1.0-beta.56.
  • Downloads: 8,140 downloads.

Versions

38 versions published
Versions and the rules that fired in each
VersionPublishedStatus
0.1.0-beta.56 LATEST 24 Nov 2026 No rules fired
0.1.0-beta.55 23 Nov 2026 No rules fired
0.1.0-beta.54 23 Nov 2026 No rules fired
0.1.0-beta.53 22 Nov 2026 Not shown
0.1.0-beta.52 22 Nov 2026 Not shown

No rules fired in 0.1.0-beta.56

Findings

Findings for v0.1.0-beta.56. The score is a capped sum of the weights of the rules that fired — not CVSS, not exploitability, and not a probability. It is not comparable across packages with different scan coverage.

The score describes 0.1.0-beta.56; other versions have their own rules, not their own score.

README

The publisher’s own README, as collected from the registry.

@parcha/pi-browser

Your agent gets its own browser, and you can take over and hand it back.

  • Its own browser. The agent drives a Chrome of its own: a local Chrome, or a hosted browser its host provides (agentrun-serve's Browserbase and Kernel, through its computer providers). It reads pages, clicks, types and takes screenshots. A local Chrome needs no key.
  • You can take over and hand it back. A host mounts the live view in a few lines, and then a person sees the agent's page, uses the mouse and keys, and lets the agent go on. While the person is driving, the agent's browser calls are refused. The agent can also ask a person for a step only a person can do, and wait for the answer. See Take over and hand back. For now, use the live view with test accounts on practice sites only: the model's own page code can read what a person types there.
  • Credentials you register stay out of what the model sees. Credentials you register, and keys of the common shapes, are replaced with [redacted] in every tool result, failure, filed page and log. See Credentials.
  • Every page the agent reads is filed as evidence. The file holds the page's URL, its title and its SHA-256.
  • Bot walls get a name, and failures get a code. A CAPTCHA, a login wall, a paywall or a region block is named, with a next step, when you give the package a page judge. Every failure is one envelope with one of 15 codes. See Failures.

If the process dies, a pi-durable host recovers the session and does not repeat an action. See For hosts.

Part of AgentRun. Node >=24.22.3, pi 1.5.2 exactly (its pi-durable and chord peers). ESM only: the package has import entries and no require entry.

Install

npm install @parcha/pi-browser@latest       # the library: providers, driver, durable adapter
npm install @parcha/pi-browser@latest @earendil-works/pi-durable@1.5.2 @earendil-works/chord@1.5.2 @earendil-works/pi-ai@1.5.2   # a pi-durable host: its peers, pinned to 1.5.2

Quick start

A local Chrome, one page, one snapshot. It needs Chrome or Chromium; CHROME_PATH names it. As root or in a container, Chrome cannot start its sandbox: set PI_BROWSER_NO_SANDBOX=1, or pass sandbox: false beside executablePath, and run the container with --init, or a Chrome killed on cleanup stays a zombie.

import { mkdtemp, rm } from "node:fs/promises";
import { tmpdir } from "node:os";
import { join } from "node:path";
import { cdpProvider } from "@parcha/pi-browser/providers/cdp";
import { stagehandDriver } from "@parcha/pi-browser/driver/stagehand";

const profileRoot = await mkdtemp(join(tmpdir(), "pi-browser-"));
const provider = cdpProvider({ chrome: { executablePath: process.env.CHROME_PATH ?? "/usr/bin/google-chrome", profileRoot } });
const signal = AbortSignal.timeout(60_000);
let session;
try {
  session = await provider.create({ tag: "quick-start", maxLifetimeS: 600, idleTimeoutS: 60, proxies: false, verified: false, captcha: false, viewport: { width: 1000, height: 700 }, metadata: {} }, signal);
  const driver = await stagehandDriver()(await provider.attach(session), signal);
  await driver.run({ code: `await page.goto(${JSON.stringify(process.argv[2] ?? "https://example.com")})` });
  console.log(await driver.snapshot());
  await driver.close();
} finally {
  if (session) await provider.release(session);
  await rm(profileRoot, { recursive: true, force: true });
}

Try it without a key or a Chrome

The Quick start's provider, driver and snapshot, on the package's fake backend: no browser, no key and no network. Paste it into a shell in a directory where the package is installed.

node --input-type=module <<'EOF'
import { FakeBackend, fakeDriver, fixturePage } from "@parcha/pi-browser/testing";

const start = "https://example.test/";
const backend = new FakeBackend({ start, pages: { [start]: fixturePage(start, "The answer is forty-two.", "Example") } });
const signal = AbortSignal.timeout(30_000);
const session = await backend.provider.create({ tag: "no-key", maxLifetimeS: 60, idleTimeoutS: 30, proxies: false, verified: false, captcha: false, viewport: { width: 1000, height: 700 }, metadata: {} }, signal);
const driver = await fakeDriver(backend)(await backend.provider.attach(session), signal);
console.log(await driver.snapshot());
await driver.close();
await backend.provider.release(session);
EOF

It prints the page's accessibility tree, the same text that snapshot gives a model:

[0] main
  [1] text: The answer is forty-two.

Demos

Two runnable demos live in examples/ in the repository. They are not in the npm package. Build once with npm ci && npm run build, then run one from the repository root. Each needs Chrome or Chromium (CHROME_PATH names it) except where it says otherwise.

Demo Run What it shows
examples/hold-an-irreversible-action.mjs node packages/pi-browser/examples/hold-an-irreversible-action.mjs Under the ask policy a form post is held until a person approves it. The demo refuses, and the local server it posts to counts zero requests.
examples/crash-and-resume.mjs node packages/pi-browser/examples/crash-and-resume.mjs, twice The first run sets a page title and kills itself with SIGKILL between two tool calls. The second recovers the same Chrome from the run's own store and reads the title back. A scripted model stands in for a real one. It uses the pi-durable packages the repository already installs. Delete $TMPDIR/pi-browser-crash-demo to start over.

Providers

The same tools run on any browser a BrowserProvider gives. The package carries the local one; a hosted browser is the host's, through a provider of its own (agentrun-serve drives Browserbase and Kernel through its computer providers, so the package names no vendor).

Provider What it is What it needs
Local Chrome (/providers/cdp) A Chrome the package starts and stops by exact pid, with its own profile directory and a free debugging port. It can also attach to a Chrome you already run, at a CDP endpoint. Chrome or Chromium 137 or later. No key.
A host's own (BrowserProvider, core/host.ts) Any browser that answers CDP: the host makes, finds and releases its sessions and hands over a CDP URL. Whatever the host's vendor needs.

The local Chrome's options, in cdpProvider({ chrome: { ... } }):

Option Meaning
executablePath, profileRoot The Chrome to start, and the directory its profiles live under. Both are required.
headless true by default; false shows the window.
args Extra Chrome flags, added after the package's own.
sandbox Chrome's own sandbox, on unless false. When absent, PI_BROWSER_NO_SANDBOX=1 turns it off. Turn it off only where Chrome cannot start its sandbox (root, a container, restricted user namespaces), and only for pages you trust. A Chrome that exits before it opens its debugging port fails the create with its last lines of stderr, and with this hint when it aborted or named the sandbox.

A host passes the provider it wants; see For hosts.

Take over and hand back

A person and the agent never drive the browser together. There are two ways for a person to come in.

The person drives, from a live view. The live view shows the session's page and sends the person's mouse, keys, paste, address bar, back and reload to it. While a person has driven within the last 3 seconds, every browser call from the agent is refused before it does anything (refused, person_driving, and it can be retried). While an agent call runs, the person's input is discarded with a notice. A call that waited while the person used the browser is told that the page may have changed, and the agent takes a snapshot before it acts.

The agent asks for a person. The tool browser_request_handoff takes an instruction (what the person should do) and a completion condition (what the page shows when it is done). It waits until the person finishes, cancels or the request expires. While the person has the browser, every other browser call answers waiting_for_human. Afterwards the agent takes a snapshot and checks the condition on the page. The tool is listed only when the host gives a HandoffPort, which is how the host reaches the person.

The limit. The credential guards are not in this release. Until they ship, use the live view with test accounts on practice sites only. The model's own page code can read what a person types there.

What a host wires:

  • The live view of a local Chrome: createLiveView and liveViewProvider.
  • The live-view URL of a Browserbase or Kernel session: handed to the host only, through onSession or the handoff port.
  • browser_request_handoff: listed when the host passes a handoff port.
The live view of your own Chrome

@parcha/pi-browser/live-view serves a canvas of the session's active page, and the person's mouse, keys, paste, address bar, back and reload go to it. It works for the local Chrome (the cdp provider). Browserbase and Kernel give a host a live-view URL of their own.

import { createLiveView, liveViewProvider } from "@parcha/pi-browser/live-view";
import { cdpProvider } from "@parcha/pi-browser/providers/cdp";

const liveView = createLiveView({
  hostOrigin: "https://app.example",              // the one origin that may frame the viewer (null: none)
  baseUrl: "https://app.example/live/run-123",    // where you mount it; omit it and the live view serves itself on 127.0.0.1
});
server.on("request", (req, res) => { if (!liveView.handle(req, res)) next(req, res); });
server.on("upgrade", (req, socket, head) => { if (!liveView.upgrade(req, socket, head)) socket.destroy(); });

const provider = liveViewProvider(cdpProvider({ chrome }), liveView);
createBrowserExtension({ provider: () => provider, onSession: (row) => { /* row.liveView.fullscreen is the viewer's URL */ }, ... });

The URL is a full-control credential and goes to onSession only (never a result, a record or the model): https://.../live/run-123/v/<id>#t=<token>. The token is 256 random bits in the fragment, so it reaches no server log, proxy or Referer; the viewer's script sends it as the WebSocket's first message and nothing is accepted before it. The upgrade's Origin must be the viewer's own origin (behind a proxy, pass the upgrade through with Origin intact). There is one authenticated viewer per session (a second is refused viewer_in_use); the token, the stream and the viewer's socket end at the session's release. The page is served with Referrer-Policy: no-referrer, default-src 'self' and frame-ancestors set to hostOrigin. The viewer may send a page only to http(s) addresses. Frames are held one at a time and acknowledged after they were sent; the live view writes none anywhere. A host may watch a session's frames itself, with or without a viewer (liveView.watch(tag, { frame, ended }), which AgentRun's run video records): the viewer and the watchers share the session's one screencast.

Every browser tool is a model call on its session's gate (drivingGates, shared by default between the live view and the toolset, so you pass nothing). To use your own registry, pass the same one to both sides: const gates = createDrivingGates({ idleMs: 5_000 }); createLiveView({ hostOrigin, gates }); createBrowserExtension({ ..., gates });.

drivingGates(tag).viewing() is true for as long as an authenticated viewer is connected to that session, even when the person sits still longer than the 3 s driving window (a person mid-sign-in): the host's own custody reads it before it releases a session on its own. A custom registry's gates implement viewing() and setViewing(on); the live view sets it on a viewer's hello and clears it when that viewer leaves or the session is released.

readOnly: true makes the view watch-only: every input, navigation and dialog answer a viewer sends is dropped on the server, before the browser (held read_only, and one that keeps sending is closed), its ready carries readOnly: true and the page shows "view only" with its controls off; a watching viewer never sets viewing, so it keeps no session open. A browser with no page to show (a headless one that starts with none, or whose last page closed) sends no_page, and the page says "No page yet" until one opens.

OX Radar and Response Center

Find threats in your stack.

OX Radar can check high-priority threats, like critical package CVEs, against your context.

Each incident is marked Detected or Not Detected with a remediation plan and proof all tracked in the Response Center.

Where it’s listed

The probe returned only these fields for this server — auth requirement, protocol and tool list weren’t observed, so they’re not shown (never guessed).

  • npm @parcha/pi-browser

References

The publisher’s own links, as the registry reports them. These are not sources for the assessment on this page.

Scan your whole stack

Group 1261154050 1
Group 1261154050
 

From OX Research Newsroom

Copy of Template Design OX Blog (2)
Research

NGINX2Root: Five Critical NGINX Flaws Expose Web Servers to Remote Code Execution

Vulnerability Insights

Compromised Claude Code extensions (versions 2.1.312 & 2.1.313) in Cursor try to install a backdoor

Ethersphere Hijacked With Crypto Stealing Malware (1)
npm

Ethersphere Hijacked With Crypto Stealing Malware Via Github & npm

Frame 2085668439 (1)
Group 1261154229