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

@gluonjs/devtools-api

v1.14.0

Published

Versioned environment-neutral Gluon Devtools protocol.

Readme

@gluonjs/devtools-api

Environment-neutral protocol version 1 for independent Gluon Devtools clients. DevtoolsProtocol owns application selection and one globally ordered timeline of application, component, render, Router, Store, scheduler, event, and error records. Snapshots are JSON-safe, preserve independent application IDs, and can carry redacted source-location metadata for supported navigation targets.

External clients begin with protocol.handshake(). It returns the protocol version and immutable capability names, so a browser inspector, Vite overlay, or editor integration can refuse an incompatible bridge before subscribing to records. The current capabilities are application selection, component snapshots, source locations, the ordered timeline, and application/render/ Router/Store/scheduler/event/error records.

The package has no browser or framework dependency.

@gluonjs/devtools-api at a glance

Runtime: universal · Release: 1.14.0

Documentation guide · npm · Source

Public API: @gluonjs/devtools-api

Install

npm install @gluonjs/devtools-api

Quick start

import { DevtoolsProtocol } from '@gluonjs/devtools-api';

const protocol = new DevtoolsProtocol();
protocol.handshake();

Choose this package when

  • Inspector, overlay, and editor integrations that exchange structured records.
  • Protocol handshakes and capability gating across environments.
  • Independent application timelines and snapshots.

Choose another boundary when:

  • Does not render UI or own a browser bridge by itself.
  • Protocol consumers must validate capability compatibility.

Related documentation

Record an application timeline

Create one protocol per Devtools client, register each application with a snapshot provider, and retain every returned cleanup function:

import {
  DevtoolsProtocol,
  type ApplicationInspector,
} from '@gluonjs/devtools-api';

const inspector: ApplicationInspector = {
  id: 'shop',
  name: 'GLUON GOODS',
  snapshot: (selected) => ({
    id: 'shop',
    name: 'GLUON GOODS',
    selected,
    mounted: true,
    route: '/products/orbit-lamp',
    state: { bagCount: 1 },
    context: {},
    components: [],
    stylesheets: 3,
  }),
};

const protocol = new DevtoolsProtocol();
const unregister = protocol.registerApplication(inspector);
const unsubscribe = protocol.subscribe((snapshot, event) => {
  console.log(snapshot.selectedApplicationId, event?.sequence);
});

protocol.record('shop', 'store', { action: 'add', product: 'orbit-lamp' });
console.log(protocol.snapshot().timeline);

unsubscribe();
unregister();

record() accepts unknown payloads and converts them to the JSON-safe DevtoolsValue contract. It rejects non-application events for unknown application IDs. snapshot() returns immutable application and timeline arrays; clearTimeline() removes recorded events without unregistering applications.

toDevtoolsSourceLocation() converts caller-owned source references into a bounded protocol record. It keeps only a basename-like file label, positive line and column numbers, and a redacted flag so clients can navigate without receiving production paths or excerpts. Runtime input is untrusted: kinds, bounds, separators, URL suffixes, control characters, and even an existing redacted marker are validated again.

License

MIT License, Copyright © 2026 Marc Malerei.