
Research
/Security News
jscrambler npm Package Compromised in Supply Chain Attack
A compromised jscrambler npm release added a malicious preinstall hook that runs hidden native binaries on Linux, macOS, and Windows.
@mastra/browser-viewer
Advanced tools
Affected versions:
Playwright-based browser viewer for Mastra workspaces with CLI provider support.
@mastra/browser-viewer provides BrowserViewer, which launches Chrome via Playwright and exposes the CDP URL for CLI tools (agent-browser, browser-use, or browse) to connect. This gives you:
npm install @mastra/browser-viewer
import { BrowserViewer } from '@mastra/browser-viewer';
const viewer = new BrowserViewer({
cli: 'agent-browser', // Which CLI the agent will use
headless: false, // Show browser window
});
// Launch browser
await viewer.launch();
// Get CDP URL for CLIs to connect
const cdpUrl = await viewer.getCdpUrl();
console.log(cdpUrl); // ws://127.0.0.1:9222/devtools/browser/...
import { BrowserViewer } from '@mastra/browser-viewer';
const viewer = new BrowserViewer({
cli: 'agent-browser',
cdpUrl: 'ws://127.0.0.1:9222/devtools/browser/abc123',
});
The CDP URL is automatically injected into CLI commands when used with workspace tools.
import { Workspace, LocalSandbox } from '@mastra/core';
import { BrowserViewer } from '@mastra/browser-viewer';
const workspace = new Workspace({
sandbox: new LocalSandbox({ cwd: './workspace' }),
browser: new BrowserViewer({
cli: 'agent-browser',
headless: false,
}),
});
// When agent runs: agent-browser open https://google.com
// Mastra auto-injects the CDP connection so CLI uses Mastra's browser
| Option | Type | Default | Description |
|---|---|---|---|
cli | 'agent-browser' | 'browser-use' | 'browse' | 'browse-cli' | Required | Which CLI the agent uses |
cdpUrl | string | - | Connect to existing browser instead of launching |
headless | boolean | true | Run browser in headless mode |
cdpPort | number | 0 (auto) | Port for Chrome remote debugging |
viewport | { width, height } | 1280x720 | Browser viewport size |
executablePath | string | - | Path to Chrome executable |
--remote-debugging-portworkspace_execute_command--cdp <port>)--cdp-url <url>)--ws <url>)Apache-2.0
FAQs
Playwright-based browser viewer for Mastra CLI providers
The npm package @mastra/browser-viewer receives a total of 1,288 weekly downloads. As such, @mastra/browser-viewer popularity was classified as popular.
We found that @mastra/browser-viewer demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 6 open source maintainers collaborating on the project.
Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Research
/Security News
A compromised jscrambler npm release added a malicious preinstall hook that runs hidden native binaries on Linux, macOS, and Windows.

Research
/Security News
A malicious .NET package is typosquatting the Braintree SDK to steal live payment card data, merchant API keys, and host secrets from production apps.

Security News
/Research
Compromised Injective SDK npm version 1.20.21 exfiltrates wallet private keys and mnemonics through fake telemetry functionality.