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

@almanac-ai/agentlogs-node

v0.1.0

Published

Structured local logs your coding agent can read — Node/Express SDK with one trace across services.

Readme

@almanac-ai/agentlogs-node

Structured local logs your coding agent can read — the Node/Express SDK. Writes the same JSONL contract as the Python SDK and the CLI, so one trace stitches your whole stack together. See the repo root and contract.

npm install @almanac-ai/agentlogs-node

Use

import { logger, agentMiddleware, loggedFetch } from "@almanac-ai/agentlogs-node";

// Express — per-request trace context + request.completed
app.use(agentMiddleware({ service: "backend" }));

const log = logger("pages");
log.info("publish.started", { pageId });

await log.time("publish", { pageId }, async () => {   // → publish.completed + duration_ms
  await savePage(pageId);
});

// outbound calls carry the trace and log fetch lifecycle events
await loggedFetch("https://payments.internal/charge", { method: "POST" });

Non-HTTP work (a worker, a script):

import { startTrace, logger } from "@almanac-ai/agentlogs-node";
const log = logger("sync");
await startTrace("nightly-sync", async () => {
  log.info("sync.started");
});

API

| Export | Does | |---|---| | logger(name) | a logger for one area of code | | log.debug/info/warn/error(event, fields?) | emit a structured event | | log.time(name, fields?, fn) | time an async/sync block | | agentMiddleware({ service }) | Express/Connect per-request trace context | | loggedFetch(url, init?) | fetch that propagates the trace and logs fetch lifecycle events | | startTrace(name, fn) | begin a trace outside HTTP | | configure({ service, file, enabled, environment }) | global config | | buildTraceparent / parseTraceparent | W3C header helpers |

Config

On by default → ~/.agentlogs/app.log. AGENTLOGS=0 disables; AGENTLOGS_FILE overrides the path (contained to ~/.agentlogs/ or temp). Trace context uses AsyncLocalStorage, so logs inside a request or startTrace/time block carry the right ids without you passing anything.

For the browser/React side — LoggingProvider, browser loggedFetch, and the ingest route — see @almanac-ai/agentlogs-next.

Develop

npm install
npm run test:node
npm run build