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

@gonk/core

v0.0.20

Published

Barrel over the gonk foundation — the typed tool registry (@gonk/tool-registry) and the five-tier scope system (@gonk/scope) under one import. `import { ToolRegistry, createScope } from "@gonk/core"`. Import the focused package directly for a tighter depe

Readme

@gonk/core

Convenience barrel over the two gonk foundation packages — the typed tool registry (@gonk/tool-registry) and the five-tier scope system (@gonk/scope) — under a single import:

import { ToolRegistry, createScope } from "@gonk/core";

It re-exports the public surface of both packages with explicit, named, type/value-split re-exports (no export *), so the surface stays auditable and tree-shakeable. Reach for the focused package directly when you want a tighter dependency@gonk/core exists for the common case where you want both at once.

What it brings in

From @gonk/tool-registry: the ToolDefinition shape, ToolRegistry, makeBaseContext, the schema helpers (shape, passthrough), ToolError + ERROR_CODES, the metrics sinks (noopSink, consoleSink, inMemorySink, compositeSink), approval resolution (resolveApproval, ToolApproval, ToolTier helpers), and the full type surface (ToolContext, ToolEvent, ToolResult, ToolHandler, Logger, Display, …).

From @gonk/scope: the five-tier scope store (FsScopeStore, MemoryScopeStore, createScope), root/document discovery (findProjectRoot, scanDocuments, bindRoots, resolveTierHomes), substrate helpers (substrateDir, resolveNativeSubstrateHome, the migration family), session resolution (resolveSessionId, resolveStableSessionId, sessionMemoryDbPath), and the type surface (ScopeStore, ScopeName, RootKind, DocumentEntry, …).

See each package's README for the full, documented API.

Install

npm i @gonk/core

Example

import { ToolRegistry, makeBaseContext, createScope } from "@gonk/core";

const scope = createScope();                   // FsScopeStore over process.cwd()
const r = new ToolRegistry();
r.register({
  name: "echo",
  description: "echo input",
  input: { "~standard": { vendor: "…" } },      // any Standard Schema
  handler: async (input) => ({ data: { echoed: input.text } }),
});

for await (const event of r.invoke("echo", { text: "hi" }, makeBaseContext({ scope }))) {
  if (event.type === "result") console.log(event.data);
}

License

Apache-2.0.