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

@amaster.ai/pi-computer-use

v0.1.15

Published

Cross-platform computer-use tools for Pi desktop automation

Readme

@amaster.ai/pi-computer-use

pi-computer-use preview

Cross-platform computer-use tools for Pi desktop automation. The extension exposes a native MCP tool surface with a computer_use_ prefix. The bundled runtime comes from the official Cua Driver Rust 0.9.0 release.

What it provides

  • One Rust 0.9.0 driver line across macOS, Linux, and Windows
  • 49 version-pinned upstream tools, including sessions, element tokens, accessibility + screenshot state, native input, browser tools, diagnostics, recording, and permission policy support
  • Full MCP text, image, and structuredContent forwarding
  • Owned daemon + MCP proxy lifecycle with session-owned reconnect and per-call cancellation
  • A non-prompting Linux/Windows permission probe on session start
  • Once-per-session app-launch approval and confirmation for high-risk operations
  • Bounded text and structured results before they enter Pi's context
  • Optional secondary vision analysis through a configured Pi model

get_window_state is the primary perception tool. Cua Driver 0.9 returns the accessibility tree, structured elements with element_token, and a screenshot in one response. The standalone screenshot tool no longer exists.

Install

bun add @amaster.ai/pi-computer-use

The package bundles signed/precompiled driver assets. No separate Cua Driver installation is required.

Configuration

Configure .pi/settings.json or ~/.pi/agent/settings.json:

Project settings are loaded only after project trust is accepted. ${ENV_VAR} interpolation is supported in user and agent settings, but not in project settings.

{
  "pi-computer-use": {
    "mode": "bundled",
    "confirmAppLaunch": true,
    "confirmDangerousActions": true
  }
}

| Option | Type | Default | Description | | --- | --- | --- | --- | | mode | "bundled" \| "path" | "bundled" | Use the packaged 0.9.0 driver or a compatible custom binary | | binaryPath | string | — | Custom driver path when mode is "path" | | extraArgs | string[] | — | Additional arguments appended to cua-driver mcp | | confirmAppLaunch | boolean | true | Ask once per app target before launch_app | | confirmDangerousActions | boolean | true | Confirm high-risk tools such as kill_app and replay_trajectory; recording always requires confirmation | | visionModel | { provider, model } | — | Register computer_use_analyze_screenshot |

In non-interactive modes, confirmation-required tools return an error unless the corresponding confirmation setting is explicitly disabled.

Optional vision model

{
  "pi-computer-use": {
    "visionModel": {
      "provider": "openai",
      "model": "gpt-4o"
    }
  }
}

computer_use_analyze_screenshot requires both pid and window_id. It calls get_window_state, reuses the returned image, and invokes the configured model. Use it only when the primary model cannot resolve visual ambiguity.

Runtime and permissions

On macOS, session_start registers the generated 0.9.0 manifest without starting the driver. The signed app and MCP proxy start lazily on the first computer-use tool call, which requests any missing permissions through check_permissions({ prompt: true }). Existing grants do not raise another system dialog. The requested tool still runs and reports its own capability or permission error. Linux and Windows keep eager startup: they discover the exact live tools/list surface and call check_permissions({ prompt: false }). If discovery fails, the extension registers computer_use_connect (and /computer-use-connect) so a later retry can install the exact live platform contract without advertising another OS's schemas.

Driver startup, reconnect, and the first macOS permission probe are session-owned. Cancelling a tool stops only that caller's wait or MCP request; session shutdown aborts the shared work. macOS and Linux also use a transient pipe-backed lease to stop the owned daemon after an abrupt host exit; no persistent service or system scheduler is installed.

  • Bundled macOS: launches the signed CuaDriver.app through LaunchServices, so Accessibility and Screen Recording grants belong to com.trycua.driver.
  • Custom macOS binary: uses Cua Driver embedded mode and inherits the host application's TCC responsibility chain.
  • Linux/Windows: starts an extension-owned daemon in the interactive user session and tears it down on session shutdown.

Supported targets

| Platform | Bundled target | | --- | --- | | macOS ARM64 / x64 | bin/darwin-universal/CuaDriver.app | | Linux x64 | bin/linux-x64/cua-driver | | Linux ARM64 | bin/linux-arm64/cua-driver | | Windows x64 | bin/win32-x64/cua-driver.exe + cua-driver-uia.exe | | Windows ARM64 | bin/win32-arm64/cua-driver.exe + cua-driver-uia.exe |

Canonical workflow

  1. computer_use_start_session
  2. computer_use_launch_app or computer_use_list_windows
  3. computer_use_get_window_state
  4. Act using element_token/element_index, falling back to pixels for custom-drawn surfaces
  5. Re-run computer_use_get_window_state and verify the change
  6. computer_use_end_session

Linux and Windows tool descriptions and schemas come from the exact live driver. macOS uses the generated manifest for the bundled driver release.

License

Apache-2.0 for this package. Bundled Cua Driver assets retain their upstream license and release metadata.