npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

@yiln-dsh/dsh-plugin-web-browser

v0.1.6

Published

DSH Web bundle plugin that adds a server-side browser view next to the terminal: Chromium runs on the DSH host, frames stream back via CDP screencast over WebSocket, and mouse/keyboard input is injected back.

Readme

@yiln-dsh/dsh-plugin-web-browser

A DSH Web bundle plugin that adds a server-side browser view next to the terminal as a page tab in the DSH Web right Sidebar.

The browser runs on the DSH host, not in the operator's browser. This is the key design point: when the DSH machine and the access end are on separate networks, the operator's browser cannot reach the intranet content that DSH can see. This plugin opens pages inside the DSH host's network, captures frames via CDP Page.startScreencast, streams JPEG frames over a WebSocket to the GUI, and injects mouse / wheel / keyboard events back into the real page.

  • Registers a 浏览器 (Browser) page tab in the DSH Web right Sidebar, next to the terminal tab, so it sits right beside it. The pane is a sibling column of the conversation, so the browser never covers the composer and the plugin leaves the conversation's composer and width handles alone.
  • Opening the Browser view automatically creates one about:blank tab and shows a clean blank new-tab canvas; navigation is done from the top address bar. Closing the last tab returns to the empty state.
  • Address bar with back / forward / reload, and a tab strip with up to 12 tabs.
  • Each conversation session gets an isolated Chromium browsing context; browser API and WebSocket calls require a live session id and never use a shared default context.
  • Frames are pushed as binary JPEG over /_dsh/web-browser/ws; the view renders them in an <img> and maps pointer / wheel / keyboard input back through the same WebSocket (CDP Input.dispatchMouseEvent / dispatchKeyEvent).
  • Security posture is intranet-first: http/https schemes (optional file), optional host allowlist, and private-network access is allowed by default because reaching intranet hosts is the point of this view. This intentionally differs from dsh-plugin-browser-use, which defaults to blocking private networks.
  • ws is a runtime dependency for the Host WebSocket upgrade route; it is installed with this package rather than relying on another plugin's copy.

Requirements

  • Chromium-family browser reachable by the DSH host. Resolution order:
    1. executablePath config,
    2. $DSH_BROWSER_EXECUTABLE,
    3. well-known OS locations (google-chrome-stable, chromium-browser, chromium, Edge…),
    4. Playwright's own browser resolution (npx playwright install chromium).
  • playwright-core is a runtime dependency and is only imported lazily when a browser is first opened.

Layout

| File | Content | | --- | --- | | index.js | Host half: /_dsh/web-browser/open|list|close routes, the /_dsh/web-browser/ws upgrade route, per-session Chromium contexts, CDP screencast frame forwarding, and input injection. | | client.js | Browser bundle: registers the browser page kind in ctx.sidebarRightTabs and its body in the sidebar.right.pane.tab seat, with address bar, navigation, tab strip, <img> frame rendering and input capture. | | cordis.patch.yml | Web-profile composition patch for the Host row. |

Install

Local source directory:

dsh plugin --profile web add file:/path/to/dsh-plugin-web-browser

The view appears in the right Sidebar's page-tab row, beside 终端. Restart dsh web after installing.

Config

dsh-plugin-web-browser accepts a config object on its bundle row (cordis.patch.yml or a profile overlay):

| Key | Default | Meaning | | --- | --- | --- | | executablePath | — | Explicit Chromium executable (else $DSH_BROWSER_EXECUTABLE, well-known locations, Playwright resolution). | | allowedHosts | [] | Host allowlist, e.g. ["intranet.example.com", "*.corp.local"]. Empty = any host. | | allowPrivateNetwork | true | Permit loopback/private/link-local http(s) targets. This panel exists to reach intranet content, so it defaults to true. | | allowFile | false | Permit file:// URLs (local HTML preview, e.g. data/study/*.html). |

Security notes

  • Scheme allowlist: http / https, plus file only when allowFile is set.
  • Host allowlist with *.suffix wildcard support; empty list allows all hosts.
  • Private-network access defaults to allowed (unlike dsh-plugin-browser-use). Tighten with allowPrivateNetwork: false or an allowedHosts list if desired.
  • The WebSocket carries no extra auth of its own; it rides the same webServer upgrade path as the rest of the GUI (and the auth-webserver gateway when deployed).
  • Chromium launches with a private HOME/XDG_* directory that is removed on close, so profile, crashpad, and caches never touch the operator's home.
  • A file: URL is read by the server-side Chromium; the operator never directly fetches intranet content in their own browser.

Known limitations

  • CDP Page.startScreencast only emits frames when the page changes (static pages emit one frame; animated content reaches ~60fps). This keeps bandwidth low but means a perfectly static page will not visibly update the cursor.
  • IME (Chinese input) is not fully supported yet — plain ASCII keys and mouse interaction work; complex composition is a follow-up.
  • The panel shows what the server-side Chromium renders; sites that detect headless automation may behave differently.

Compatibility with deeptutor / browser-use

  • dsh-deeptutor renders answers to self-contained HTML files (html parameter, html-doc skill). With allowFile: true, those files can be opened directly in this panel.
  • dsh-plugin-browser-use drives its own headless Chromium for agent tool calls. Sharing a single browser session between the agent's tools and this visible panel is planned (both speak CDP); in this release they are independent.

The published package is @yiln-dsh/[email protected].