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

@trigger_mesh/desktop-driver-schemas

v1.0.1

Published

Type-safe schemas for desktop automation driver capabilities

Readme

Desktop Driver Schemas

Type-safe schemas for desktop automation driver capabilities. This package provides shared schema definitions for both TypeScript and Python projects.

Features

  • 🎯 Type Safety: Full TypeScript and Python type definitions
  • 🔄 Auto-generated: Schemas generated from central capabilities.json
  • 📦 Multi-language: Works with TypeScript, Python, and Node.js
  • Validation: Built-in validation with Zod (TS) and Pydantic (Python)
  • 🚀 Easy to use: Simple imports and clear API

Installation

TypeScript/Node.js

npm install @trigger_mesh/desktop-driver-schemas
# or
yarn add @trigger_mesh/desktop-driver-schemas

Python

pip install trigger-mesh-desktop-driver-schemas

Usage

TypeScript

import { ActionSchema, ClickAtAction } from '@trigger_mesh/desktop-driver-schemas';
import { z } from 'zod';

// Validate action
const action: ClickAtAction = {
  type: 'click_at',
  x: 100,
  y: 200
};

const validated = ActionSchema.parse(action);
console.log(validated); // { type: 'click_at', x: 100, y: 200 }

Python

from trigger_mesh_desktop_driver_schemas import Action, ClickAtAction, CAPABILITIES

# Validate action
action = ClickAtAction(
    type="click_at",
    x=100,
    y=200
)

print(action)  # type='click_at' x=100 y=200

# Access capabilities
print(CAPABILITIES.keys())

Raw JSON

import capabilities from '@trigger_mesh/desktop-driver-schemas/capabilities';

console.log(capabilities.focus_window);
// { description: "Focus a window by title substring", args: {...} }

Available Capabilities

The package includes schemas for 29+ desktop automation capabilities:

  • Mouse Actions: click_at, double_click, right_click, drag, scroll
  • Keyboard Actions: type_text, key_press, key_combination, xdo_sequence
  • Window Management: focus_window, wait_for_window, launch_app
  • Screenshots: screenshot, screenshot_base64, screenshot_region_base64
  • Image Detection: find_image, wait_for_image, click_image
  • File System: fs_list, fs_read, fs_write
  • OCR: ocr_read_region, ocr_find_text, ocr_wait_text
  • Accessibility: ax_wait, ax_click
  • System: shell_exec, wait

Development

Prerequisites

  • Node.js 18+
  • Python 3.8+
  • npm or yarn

Setup

# Install dependencies
npm install

# Generate schemas
npm run generate

# Build packages
npm run build

# Validate driver implementation
npm run validate

Scripts

  • npm run generate - Generate all schemas from capabilities.json
  • npm run build - Build TypeScript and prepare for publishing
  • npm run validate - Validate driver implementation
  • npm run test - Run tests

Publishing

NPM (TypeScript/Node.js)

# Login to npm
npm login

# Publish
npm publish

PyPI (Python)

# Install build tools
pip install build twine

# Build Python package
python -m build

# Upload to PyPI
twine upload dist/*

API Reference

TypeScript Exports

  • ActionSchema - Zod schema for validating actions
  • ResultSchema - Zod schema for validating results
  • ClickAtAction, ScreenshotAction, etc. - Individual action types
  • capabilities - Raw capabilities JSON

Python Exports

  • Action - Pydantic base model for actions
  • ClickAtAction, ScreenshotAction, etc. - Individual action models
  • CAPABILITIES - Raw capabilities dictionary
  • get_capability(name) - Get specific capability definition
  • validate_capability(name, args) - Validate capability arguments

Contributing

  1. Update capabilities.json with new capabilities
  2. Run npm run generate to update schemas
  3. Run npm run validate to ensure driver compatibility
  4. Test with both TypeScript and Python
  5. Submit a pull request

License

MIT License - see LICENSE file for details.