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

@sourceacademy/web-cse-machine

v3.0.0

Published

The web/host-side CSE machine plugin: receives evaluation snapshots for rendering

Readme

Features

  • Subscribes to the CSE channel and delivers snapshot batches to the host app's visualization layer
  • Language-agnostic: works with any evaluator that sends CseSnapshots via the runner plugin
  • Re-exports all protocol types from @sourceacademy/common-cse-machine so host apps need only one import

Installation

In production, use the plugin directory hosted on GitHub Pages. It contains a list of all plugins available in this monorepo. Your host app should be able to load plugins from the plugin directory (the Source Academy frontend does).

For locally hosting the plugin repository, run yarn build at the root of the repository. Then serve the plugin directory with:

yarn dlx serve --cors dist/ -p 1915

The plugin directory will be available at http://localhost:1915/directory.json.

To install the package directly:

yarn add @sourceacademy/web-cse-machine
# OR
npm i @sourceacademy/web-cse-machine
# OR
pnpm add @sourceacademy/web-cse-machine

Structure

This package (@sourceacademy/web-cse-machine) contains the CseMachineHostPlugin abstract class — a Conductor host plugin that subscribes to the CSE_CHANNEL and delivers received CseSnapshot batches to the host app.

The plugin owns only the transport/receipt. Wiring snapshots into the actual visualization layer (adapter + renderer) is the host app's responsibility and stays in the host repo, because it is tightly coupled to the host's existing CSE machine UI.

API Reference

| Name | Description | |------|-------------| | abstract receiveSnapshots(snapshots: CseSnapshot[]): void | Called by the plugin each time a batch of snapshots arrives. Implement this in your host app to wire the snapshots into your visualization layer. |

Usage

Extend CseMachineHostPlugin and implement receiveSnapshots to connect incoming snapshots to your rendering layer:

import { CseMachineHostPlugin } from '@sourceacademy/web-cse-machine';
import type { CseSnapshot } from '@sourceacademy/web-cse-machine'; // re-exported from common

export class MyCseMachinePlugin extends CseMachineHostPlugin {
  receiveSnapshots(snapshots: CseSnapshot[]): void {
    // Hand snapshots to your visualization layer, e.g.:
    cseMachineStore.setSnapshots(snapshots);
  }
}

For a full example of how the Source Academy frontend wires this into its CSE machine UI, see the frontend source.

Further reading