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

@wkj24/agentic-interactive-test

v0.1.0

Published

Raw Browser, PTY/TUI, CLI, and isolated X11 interaction tools for agent-driven testing.

Readme

Interaction Tools MCP

A deliberately thin MCP server for raw Browser, PTY, and isolated X11 interaction. It gives an agent input and observation primitives; the agent or its Skill remains responsible for the user journey, waits, retries, evidence, diagnosis, assertions, and reports.

Published on npm as @wkj24/agentic-interactive-test.

Requirements and setup

  • Node.js 22
  • A C/C++ toolchain for node-pty
  • Playwright's Chromium browser
  • Linux X11 commands for the optional X11 surface
cd mcp/interaction-tools
npm install
npx playwright install chromium

# Debian/Ubuntu, for x11_* tools only
sudo apt install --no-install-recommends \
  xvfb openbox xauth xdotool ffmpeg kitty

npm run typecheck
npm test
npm run build

node-pty may require Python, make, and a C/C++ compiler on Linux; Xcode Command Line Tools on macOS; or Python and the Visual Studio C++ workload on Windows. Browser and PTY tools are portable where their dependencies support the platform. The first X11 implementation is Linux-only and checks every external command before allocating a desktop session.

Configure Codex with the absolute compiled entry path:

[mcp_servers.interaction_tools]
command = "node"
args = ["/absolute/path/to/mcp/interaction-tools/dist/src/server.js"]

The server reserves stdout for MCP protocol messages. It does not emit startup logs there.

For the published package, register the MCP server directly through npx:

codex mcp add interaction-tools -- npx -y @wkj24/agentic-interactive-test

Tool surface

The server exposes exactly 22 tools:

| Surface | Lifecycle and observation | Input | | --- | --- | --- | | Browser | web_open, web_snapshot, web_close | web_click, web_drag, web_scroll, web_type, web_key | | PTY | terminal_open, terminal_snapshot, terminal_close | terminal_text, terminal_key, terminal_mouse, terminal_resize | | X11 | x11_open, x11_snapshot, x11_close | x11_mouse, x11_key, x11_text, x11_window |

Successful open calls return a session ID. Input calls return only dispatch acceptance, not a semantic success verdict. Close calls release everything owned by that session. Driver failures are returned unchanged at the MCP boundary as one of:

{"code":"session_not_found","message":"..."}

The possible codes are session_not_found, target_not_found, process_exited, unsupported_action, and backend_error.

Browser

web_open launches Playwright and navigates to a URL. web_snapshot returns a PNG plus URL, title, and viewport metadata. Mouse coordinates are viewport pixels. Keyboard expressions use Playwright syntax. Playwright is imported only when the first Browser session opens.

PTY

terminal_open starts a real pseudoterminal and parses its bounded scrollback with a headless terminal. terminal_snapshot returns the visible text viewport, dimensions, cursor state, and raw process state. Mouse actions require the target to have enabled compatible SGR 1006 tracking; otherwise they return unsupported_action.

Closing owns and terminates the PTY process group. A target that deliberately daemonizes with setsid or otherwise leaves that group crosses the MCP's ownership boundary and must provide its own shutdown mechanism; the server does not scan and kill unrelated process trees.

A PTY/headless snapshot does not claim pixel-identical Kitty, XTerm, font, window-manager, compositor, or physical-terminal behavior. Use X11 with Kitty when those visible desktop interactions matter.

X11

x11_open creates a fresh authenticated Xvfb display, starts Openbox, then launches the requested target inside it. It uses -nolisten tcp, a private Xauthority file, private runtime/cache directories, and never attaches to the user's existing DISPLAY or WAYLAND_DISPLAY. x11_snapshot returns the framebuffer PNG, visible windows, client geometry, focus, and target process state. Window actions operate through Openbox/xdotool.

Closing a session terminates both the target process group and the complete Xvfb/Openbox group, then removes its private directory. Xvfb/Openbox coverage does not imply physical-display, GPU, compositor, input-device, accessibility, or performance coverage.

Scope and resource behavior

The server holds only active session resources. It stores no screenshot history, trace, evidence set, assertion, retry policy, or report. Playwright is loaded lazily, X11 processes start only for an X11 session, and terminal scrollback is capped at 1000 lines.

The resource smoke test prints informational RSS samples for idle, open, and closed states. It deliberately has no fixed RSS ceiling because allocators, browsers, fonts, native libraries, and platforms vary. Its hard assertions are resource ownership and cleanup: closed sessions become inaccessible, private directories disappear, and owned process groups exit.