Scan your whole stack
From OX Research Newsroom
Are you using @parcha/pi-browser?
Find out what’s in your code.
Scan your apps free in minutes (opens in a new tab)Latest version: v0.1.0-beta.56
@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.
| Version | Published | Status |
|---|---|---|
| 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 |
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.
The publisher’s own README, as collected from the registry.
Your agent gets its own browser, and you can take over and hand it back.
[redacted] in every tool result, failure, filed page and log. See Credentials.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.
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
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 });
}
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.
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. |
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.
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:
createLiveView and liveViewProvider.onSession or the handoff port.browser_request_handoff: listed when the host passes a handoff port.@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.
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.
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).
The publisher’s own links, as the registry reports them. These are not sources for the assessment on this page.