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

sergent-ts-run-record

v0.1.0

Published

Node synchronous Sergent JSON Lines Run Record harness and persistence

Readme

sergent-ts-run-record

This component turns the evidence of a Sergent Run into one portable JSON Lines file on a Node filesystem. It watches a Run from the outside and never changes what the Run does.

The Run Record and how it reaches a file

A Run Record is the complete, inert evidence of one finished Run. The Run Record specification, in "The Run Record", defines its structure.

The record does not start here. While a Run advances, the builders in sergent-ts-observability accumulate it in memory. One closing call, on success, failure, or cancellation, finishes the record, and the runtime hands it to every configured observer inside a SergentResult.

createRunRecordHarness returns a RunRecordHarness, and that harness is an ordinary observer. Hand it to the runtime together with your other observers, and it writes two framework lines for a Run: a Run start line when the Run reaches its started stage, and a Run end line carrying the complete record when the Run finishes.

At any point while the file is open, the application can add context of its own through applicationEvent and userEvent. Each of the two takes an optional EventCorrelation that ties the line to a Run, a Scene, and a revision. The harness publishes the path it composed as file_path, so an application can tell a person where the evidence landed. A final close synchronizes the file and closes it once.

The file exists from the moment you construct the harness, which creates it exclusively and refuses an existing path. The Run Record file format, in "File discipline", fixes the filename and the rules for a healthy file, and its other sections fix the line envelope and the encoding. This component implements that document and adds nothing to it.

A persisted Run end carries the complete record, which is sensitive forensic material. The "Sensitivity" section of the same file format lists what such a line can hold, and the application decides where these files live and how long they stay.

Working with the observability component

sergent-ts-observability builds the evidence and defines the observer interface. This component only persists what that evidence already is.

The split follows platforms. Observability fits a browser page or a worker; writing a file needs Node, so everything Node-only lives here and the runtime never depends on this component.

Start with the observability component when a value inside a Run Record file puzzles you. The component knowledge carries the technical design: the write path, the failure paths, and where each responsibility sits.