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

@anokye-labs/kbexplorer-core

v0.6.0

Published

Shared contracts for kbexplorer: pure graph types, kg:// identity, relation taxonomy, JSON-LD helpers, and the Source / Provider / Representation interfaces.

Readme

@anokye-labs/kbexplorer-core

Shared contracts for the kbexplorer system. This package is the single source of truth for the types and interface seams that both kbexplorer-cli and kbexplorer-template — and any third-party provider — depend on.

It is intentionally dependency-free and side-effect-free: pure data types and interfaces, no runtime engine, no I/O.

What lives here

  • Graph typesKBNode / KBEdge / KBGraph / KBConfig (pure data; no styling, no engine imports).
  • Identity — configurable, source-agnostic addresses of the form <scheme>://<authority>/<body>. The scheme is configurable (default kg), the authority is optional (it names the system of record), and the body is opaque — it names a resource and does not encode the entity's type, so an entity can be re-typed or re-homed without its id changing. Mint addresses with buildAddress(body, { scheme, authority }); configure defaults via KBConfig.identity. The legacy kg://<type>/<slug> helpers (buildId / ID_RE) are retained for back-compat.
  • Relation taxonomy — the canonical edge-relation vocabulary.
  • JSON-LD helpers — deterministic serialization of the pure graph.
  • Seams — the Source, GraphProvider, ProviderRegistry, GraphStore, and Representation interfaces that make providers, optional content-addressed caches, and render targets pluggable.

Architecture layers

This repository is the contracts layer of the kbexplorer stack. The responsibilities are intentionally split so new code lands in the right place:

  • kbexplorer-core — pure data types and interface seams only (KBNode, KBGraph, KBConfig, Source, GraphProvider, ProviderRegistry, GraphStore, Representation). No runtime, no I/O, no rendering, no browser coupling.
  • kbexplorer-engine (new) — Node-safe implementation for provider orchestration, parsing, identity minting, transforms, content-model building, and sqlite-backed GraphStore implementations. It depends on core and must be able to run under plain Node for offline/non-web graph management.
  • Consumers (kbexplorer-template, kbexplorer-cli) — platform-specific adapters on top of engine (browser rendering + React viewers for the template; CLI I/O, git/gh access, and LLM extraction for the CLI).

New logic belongs in the layer that owns the behavior. If a change is purely a contract or seam, it belongs here in kbexplorer-core.

Phase 1 stands up the package; the contracts above are filled in by the follow-up tasks tracked in this repo.

Consuming (git dependency)

Until this is published to npm, consumers depend on it directly from git. npm runs the package's prepare script on install, which builds dist/:

// package.json
{
  "dependencies": {
    "@anokye-labs/kbexplorer-core": "github:anokye-labs/kbexplorer-core#v0.1.0"
  }
}

Pin to a release tag (e.g. #v0.1.0) or a commit SHA — not a moving branch — so builds are reproducible.

Releases

0.1.0

First tagged release — the Wave 0a identity foundation. Strictly additive and back-compatible (defaults unchanged; kg:// stays the default scheme, and buildId / ID_RE are retained as legacy helpers):

  • Configurable, source-agnostic identity — addresses of the form <scheme>://<authority>/<body> with an opaque body (no embedded type). New: buildAddress / parseAddress / isAddress, AddressingOptions / ParsedAddress, and KBConfig.identity (IdentityAddressingConfig).
  • Alias-based peoplealiasBody / buildPersonAddress, plus an optional alias? on the person node source (display names are never identity).
  • Markdown sourcesNodeSourceFile.format now includes 'markdown'.

Develop

npm ci
npm run typecheck
npm run build      # tsup -> dist/ (esm + cjs + d.ts)
npm test           # vitest

Engines policy

  • Libraries (this package, @anokye-labs/kbexplorer-provider-rich-markdown, and future @anokye-labs/kbexplorer-engine) declare ngines.node: ">=20". Libraries set the floor for their consumers, so they must not require a higher Node version than any app that depends on them.
  • Apps/CLIs (kbexplorer-cli, kbexplorer-search, kbexplorer-template) may declare a higher floor (e.g. ">=22") but must never require a lower floor than any library they depend on.
  • Rationale: an inverted policy (library requiring a newer Node than its consumer) silently breaks consumers on older-but-still-supported runtimes. Keep the library floor at or below every consumer's floor.