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

opencode-hapticfeedback-mx4

v0.0.1

Published

OpenCode plugin for Logitech MX Master 4 haptic feedback via HapticWebPlugin

Readme

opencode-hapticfeedback-mx4

Public OpenCode plugin for Logitech MX Master 4 haptic feedback. It maps OpenCode lifecycle events to haptic waveforms through HapticWebPlugin.

Install (Public Plugin)

Add this plugin to your OpenCode config:

{
  "plugin": ["opencode-hapticfeedback-mx4@latest"]
}

Restart OpenCode.

Current release: 0.0.1

Alternative install directly from GitHub:

{
  "plugin": ["github:emi/opencode-hapticfeedback-mx4#v0.0.1"]
}

If you want to test before npm publish, use the local repo path in plugin instead.

Quick Start

  1. Connect Logitech MX Master 4.
  2. Ensure Logi Options+ and Logi Plugin Service are running.
  3. Install HapticWebPlugin:
    • https://haptics.jmw.nz/install
    • or releases: https://github.com/fallstop/HapticWebPlugin/releases
  4. Restart OpenCode.

The haptics service should run at https://local.jmw.nz:41443.

Verification

# Service health
curl https://local.jmw.nz:41443/

# Hardware pulse test
curl -X POST -d '' https://local.jmw.nz:41443/haptic/completed

Event Mapping

| OpenCode Trigger | Waveform | Purpose | | --- | --- | --- | | session.idle | completed | Task completed | | session.error | angry_alert | Session/request error | | tool.execute.before for task | knock | Subagent invocation | | session.created | sharp_state_change | New session start | | session.status = busy | damp_state_change | Work started | | message.updated (assistant completed) | happy_alert | Assistant response completed | | tui.toast.show = success | happy_alert | Success toast | | tui.toast.show = warning | square | Warning toast | | tui.toast.show = error | angry_alert | Error toast | | tui.toast.show = info | subtle_collision | Info toast |

Configuration

Environment variables (optional):

  • MX4_HAPTICS_ENABLED (true/false, default true)
  • MX4_HAPTICS_URL (default https://local.jmw.nz:41443)
  • MX4_HAPTICS_TIMEOUT_MS (default 1200)
  • MX4_HAPTICS_COOLDOWN_MS (default 700)

Notes

  • The plugin sends non-blocking HTTP POST calls to /haptic/{waveform} with an empty body.
  • If the local haptics service is unavailable, OpenCode continues running and logs warnings via client.app.log.

Publish This Plugin

This repository now includes a public package entrypoint at src/index.js and package.json.

  1. Ensure version is updated in package.json and CHANGELOG.md.
  2. Login to npm:
    • npm login
  3. Publish:
    • npm publish
  4. Tag a release in GitHub (recommended):
    • git tag v0.0.1 && git push --tags

Version tracking policy:

  • Patch (0.0.x): bug fixes and non-breaking behavior tweaks
  • Minor (0.x.0): new non-breaking event mappings or config options
  • Major (x.0.0): breaking changes to config or behavior defaults

After publishing, other users can install with:

{
  "plugin": ["opencode-hapticfeedback-mx4@latest"]
}