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

@brimveyn/aimux-plugin

v0.1.9

Published

Plugin authoring API for aimux — context, effects, events and RPC for in-process plugins.

Readme

@brimveyn/aimux-plugin

Authoring API for aimux plugins.

A plugin is a directory with a manifest and up to two entry files — one per host process. aimux loads them in-process, so a plugin renders real UI and reacts to real events; and it unloads them by running every disposer they registered, so editing one reloads it in place.

my-plugin/
  aimux-plugin.json      manifest — read without executing any code
  ui.ts                  UI half     (optional)
  daemon.ts              daemon half (optional)
  package.json
// aimux-plugin.json
{
  "id": "acme.telegram-notify",
  "name": "Telegram notify",
  "version": "0.1.0",
  "apiVersion": 1,
  "minAimuxVersion": "1.24.0",
  "entries": { "daemon": "./daemon.ts" },
  "config": {
    "botToken": { "type": "string", "required": true, "secret": true },
  },
}
// daemon.ts
import { type DaemonPluginContext, definePlugin } from '@brimveyn/aimux-plugin'

export default definePlugin<DaemonPluginContext>({
  apply(ctx) {
    ctx.on('tab:turnComplete', ({ tabId }) => {
      ctx.log.info('turn complete', { tabId })
    })

    ctx.effect(() => {
      const timer = setInterval(poll, 60_000)
      return () => clearInterval(timer)
    })
  },
})

The one rule

Everything a plugin registers must be reversible. Register through ctx.on, ctx.effect, or an API that returns a disposer, and unloading is automatic. Reach around the context — a global, a bare setInterval, a listener on someone else's emitter — and it survives the reload as a leak.

Context

| Member | What it does | | ------------------------------------------------- | ---------------------------------------------------------------- | | ctx.id, ctx.manifest, ctx.host | identity, and which process this half runs in | | ctx.log | writes to <state>/plugin.log, readable via aimux plugin log | | ctx.config | manifest schema ⊕ registry ⊕ aimux.config.ts, defaults applied | | ctx.paths | root, config, state, log | | ctx.effect(setup) | run now, dispose on unload (reverse order) | | ctx.on(event, listener) | subscribe; auto-disposed | | ctx.emit / parallel / serial / bail / waterfall | five dispatch modes | | ctx.rpc.call / handle / broadcast | talk to this plugin's other half across the process boundary | | ctx.provide / ctx.service | publish and read services other plugins may inject |

Testing

createTestContext() builds a context with the real event bus and effect stack behind it, and stubs only what crosses a process boundary.

import { createTestContext } from '@brimveyn/aimux-plugin'
import plugin from './daemon'

test('notifies on turn complete', async () => {
  const t = createTestContext({ config: { botToken: 'x' }, onCall: () => ({ ok: true }) })
  await t.apply(plugin)

  t.bus.emit('tab:turnComplete', { tabId: 't1' })

  await t.dispose()
  expect(t.effectCount()).toBe(0)
})

Author loop

aimux plugin new acme.thing --daemon   # scaffold
aimux plugin link ./acme-thing         # register + build, watched from now on
aimux plugin log acme.thing -f         # watch it work
aimux plugin doctor ./acme-thing       # validate manifest, dry-import, list registrations

Full docs: docs/developer/plugins.md in the aimux repository.