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

@ai-gui/plugin-topology

v0.49.0

Published

Infrastructure topology diagrams for AIGUI — nodes in hosts and racks, links, states, laid out automatically, with steps that play a process: messages moving, nodes failing over.

Readme

@ai-gui/plugin-topology

Infrastructure topology diagrams for AIGUI: nodes in hosts, racks and zones, the links between them and the state each is in — laid out automatically — with steps that play a process over them: a write travelling to the primary, the replication to its replica, the replica taking over when the primary fails.

pnpm add @ai-gui/core @ai-gui/plugin-topology
import { topology } from "@ai-gui/plugin-topology"
const plugins = [topology()]

What the model writes

Nothing is placed by hand. The model says what exists, where it lives and what connects to what; dagre lays it out in layers and the groups are drawn round their members. A step says only what changes — a state set in step 2 holds afterwards.

{
  "title": "Database replication",
  "groups": [
    { "id": "h1", "label": "node-a" },
    { "id": "h2", "label": "node-b" }
  ],
  "nodes": [
    { "id": "app", "label": "app", "kind": "client" },
    { "id": "db1", "label": "db", "kind": "database", "group": "h1", "state": "primary", "note": "primary" },
    { "id": "db2", "label": "db", "kind": "database", "group": "h2", "state": "secondary", "note": "replica" }
  ],
  "links": [
    { "from": "app", "to": "db1", "label": "writes" },
    { "id": "rep", "from": "db1", "to": "db2", "label": "sync replication" }
  ],
  "steps": [
    { "caption": "The app writes to the primary", "messages": [{ "from": "app", "to": "db1", "label": "write" }], "highlight": ["db1"] },
    { "caption": "The primary replicates the write to the replica", "messages": [{ "from": "db1", "to": "db2", "label": "data" }] },
    { "caption": "The replica acks once on disk; only then is the write complete", "messages": [{ "from": "db2", "to": "db1", "label": "ack" }] },
    { "caption": "node-a fails; replication stops", "states": { "db1": "failed" }, "links": { "rep": "down" } },
    { "caption": "node-b is promoted and takes over writes", "states": { "db2": "primary" }, "highlight": ["db2"] }
  ]
}

The example above, drawn still

In the page the steps play: each step's messages travel along the links, then its state changes land, with controls to pause and step. Drawn still (animate: false, as @ai-gui/image draws it), every message is a numbered marker on its route and the steps are listed under the picture.

| | | | --- | --- | | Node | id, label, kind (server, vm, container, disk, database, network, balancer, client, service, process, queue, cloud), group, state, note | | State | primary active ok (green), secondary standby (blue), syncing degraded warning (amber), failed down (red), offline unknown (grey), diskless (purple) | | Group | id, label, group (nested inside another) | | Link | from, to, id, label, style (solid, dashed), directed, state (up, down, active) | | Step | caption, messages (from, to, label), states, links, highlight |

Every reference is checked: a link to a node that does not exist, a group inside itself, an empty group or a step changing a link with no id is refused with a message naming it.

Options

  • animate?: boolean — play the steps. false draws the finished state with every step numbered. Default true.
  • stepMs?: number — milliseconds per step. Default 2400.
  • maxNodes?: number — refuse a topology with more nodes than this. Default 60.
  • maxSourceBytes?: number — refuse a larger fence before parsing it. Default 48 KiB.