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

@atrib/trace

v0.3.0

Published

MCP server for atrib. Walks informed_by chains backward from a record_hash to surface the reasoning chain that produced it.

Readme

@atrib/trace

MCP server exposing the trace tool — walks a record's informed_by chain backward to surface the reasoning chain that led to it.

Closes the consumer-side cognitive-loop primitive: recall returns raw records; trace returns the causal chain, so an agent asking "why did I do X?" can see "X was informed by Y, which was informed by Z" without manually walking informed_by hash-by-hash.

Tool

mcp__atrib-trace__trace({
  record_hash: "sha256:<64-hex>",  // start
  depth?: number,                   // hop cap (default 3, max 10)
  max_nodes?: number,               // safety cap (default 200, max 500)
  compact?: boolean                 // omit signature/content_id bytes (default true)
})
→ {
  start_hash, direction: "backward",
  depth_requested, depth_reached,
  visited: [
    {
      depth, record_hash, parent_hashes, source,
      event_type, context_id, creator_key, timestamp,
      next_informed_by, next_resolved, next_dangling,
      sidecar_summary?: { tool_name?, topics?, what?, importance?, producer? }
    }
  ],
  dangling: string[],
  truncated_by_depth, truncated_by_cap,
  warnings
}

Reads

Every *.jsonl mirror under ~/.atrib/records/ (override via ATRIB_RECORDS_DIR). Tolerates both producer envelope shapes:

  • Bare AtribRecord per line (legacy / wrapper convention pre-sidecar)
  • { record, _local?, written_at } envelope (current shape)

When the envelope carries an optional _local sidecar (per the local-mirror sidecar pattern shipped in @atrib/mcp v0.2.x), trace surfaces a compact sidecar_summary per record: tool_name, topics, first ~200 chars of what/summary, and importance for annotations. Without the sidecar (legacy entries), the per-record output still includes the cryptographic evidence (event_type, hashes, creator_key, timestamp) — just without the semantic context.

Behaviors

  • Cycle-safe: every record visited at most once, even with multiple parents referencing it.
  • Cap-safe: hits max_nodes → returns partial result with truncated_by_cap: true.
  • Depth-safe: hits depth → returns partial result with truncated_by_depth: true.
  • Dangling-aware: informed_by entries pointing at records not in the local mirror surface in dangling and do NOT advance the walk.
  • Local-only (v1): reads only the local mirror. v2 will fall back to log.atrib.dev/v1/lookup/<hash> for hashes not in the local mirror.
  • Backward-only (v1): walks informed_by upstream. Forward-walk (records that reference THIS one) is a v2 concern via the graph service.

Wire-up

Add to your MCP host config (e.g. ~/.claude.json mcpServers):

{
  "atrib-trace": {
    "command": "node",
    "args": ["/path/to/atrib-trace/dist/main.js"]
  }
}

Or run as a one-off subprocess via pnpm --filter @atrib/trace start.

Status

Initial scaffold (v0.1.0). 8 tests covering: empty-mirror, single-record, one-hop walk, multi-hop chain, depth truncation, diamond fan-in, dangling references, max_nodes cap. Full workspace tests green.

The companion consumer-side primitive atrib-summarize (synthesizes narrative across N records) is the next ship.