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

@runmu.sh/ext-activity

v1.0.1

Published

A live staff feed of player texts, LOOC and NPC actions, with filters, watches and pause.

Readme

Activity, a μClient extension

A live staff feed of player texts, LOOC and NPC actions. You can filter it by category, show global or watched activity only, search it as text, and watch characters, NPCs and locations. You can also pause it, and add an NPC as a puppet in one click (with the Puppets extension). The feed is shown only to characters the game allows, and it streams only while the panel is open.

Panel id activity (Activity). Command activity.open. Capability: send-commands.

How it shows up

  • The game sends Client.Activity.Role {allowed:true}. The session then gets the activity role (sessions.provideIdentity), and the panel is offered (role: 'activity') and added once (show: 'auto', panels.touch). A per-world Show panel: auto / on / off row is on the settings page.
  • allowed:false, or a disconnect, withdraws the role, and the host closes the panel.
  • While a panel for the session is open, the extension subscribes. When the last one closes, it unsubscribes, unless another of the player's clients still shows the feed for that session.

GMCP: Client.Activity 1

Ids may be numbers or strings ("#120"); they are compared as strings. Every client→server message carries req (a number), and the answer should echo it. An answer without req is accepted too. Schemas are in schema/ and declared in contributes.gmcp[].messages; the host validates inbound payloads.

Server → client

| Message | Payload | When | |---|---|---| | Client.Activity.Role | {allowed: bool, can_puppet?: bool} | After login, and when it changes. can_puppet counts only if allowed. | | Client.Activity.Snapshot | {req?, stream_id, last_seq, events: Event[], role?: Role, watches?: Watches} | The answer to Subscribe: the recent events (up to 1000), the role and the character's watches. | | Client.Activity.Batch | {stream_id, last_seq, events: Event[]} | New events, while subscribed. seq goes up by 1 per event in a stream. A skipped range shows "Some activity was missed." A new stream_id makes the client subscribe again. | | Client.Activity.Results | {req?, query, results: [{id, name, kind}]} | The answer to Search. | | Client.Activity.Watches | {req?, watches: Watches} | The answer to Watch / Unwatch (the full list). | | Client.Activity.Error | {req?, message} | A request failed (with req), or the feed failed (without it). The message is shown with Retry. |

Event: {id, seq, ts_ms?, kind, body?, actor?: Ref, targets?: Ref[], npc_targets?: Ref[], location?: Ref, meta?: {group_name?}}. kind takes these values:

  • handset.<x> is shown as Text. handset.group names meta.group_name.
  • looc is shown as LOOC.
  • npc.action, or anything else, is shown as NPC.

The other shapes:

  • Ref: {id, kind?: 'character'|'npc'|'location'|…, name?}.
  • Watches: {characters: [{id, label}], locations: [{id, label}]}.

Client → server

| Message | Payload | Answer | |---|---|---| | Client.Activity.Subscribe | {req} | Snapshot | | Client.Activity.Unsubscribe | {req} | none | | Client.Activity.Search | {req, query} (2+ characters, sent 250 ms after typing stops) | Results | | Client.Activity.Watch / Unwatch | {req, id, kind: 'characters'|'locations'} (NPCs go under characters) | Watches |

Add puppet uses the Puppets extension. With Puppets 1.2+ it calls api.add({npc_id, name}, sid), so the player's per-world action settings apply. With Puppets 1.1 it sends Client.Puppets.Add {npc_id} itself, and reads Client.Puppets.Manifest to show "In puppets". Without Puppets the button is not shown.

API

import type { ActivityApi } from '@runmu.sh/ext-activity/src/types';
const activity = await ctx.api<ActivityApi>('activity');
activity.allowed(sid?)            // the game allows the feed
activity.events(sid?)             // the events held while the panel is open (oldest first, ≤ 1000)
activity.watches(sid?)            // {characters, locations}
activity.onEvents((events, sid) => …)   // new events; removed when your extension is disabled
activity.open()

Develop

npm install
npm run build && npm run typecheck && npm test   # headless host + happy-dom
node <muClient>/clients/extensions/dev/serve.mjs . --port 0   # then ?demo&ext-dev=<url>

test/fixtures/session.murec is a Role → Subscribe → Snapshot → Batch session.