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-observability

v0.1.0

Published

Portable Sergent Run Records, capture, progress, and record construction

Readme

sergent-ts-observability

A Sergent Run is one short, self-contained piece of agentic work. It leaves behind a complete and honest account of what it did, and this component builds that account as the work happens.

Every Run explains itself

Agentic software is hard to trust, because the interesting decisions happen out of sight. A model proposes something, code turns the proposal into changes, and the caller sees only a final answer. The Sergent Specification treats that gap as a design problem rather than an afterthought: observability is a first-class part of the framework, and every Run that returns a result closes with a Run Record that accounts for the whole Run in execution order. The Run Record specification, in "The Run Record", fixes that account field by field, so every implementation reports the same facts, in the same form.

This component is where TypeScript builds that account. It also defines the values an application meets directly: ProgressSnapshot, a small safe-to-show view of a Run still in flight; SergentResult, what a finished Run returns; and RunObserver, the interface you implement to watch a Run go by.

One promise holds the whole thing together: this component records and does nothing else. It never picks a step, never cancels work, never changes the application state a Run works on (its Scene), and a problem while capturing a value never fails the Run. The knowledge file shows how that promise is built into the structure rather than merely declared.

Where it sits

Three components divide the work, and the division is deliberate.

sergent-ts-runtime executes a Run. It drives the recording this component performs, and it decides what happens next, whether a cancellation takes effect, and when a change becomes permanent. This component supplies the shapes and the rules for building them; runtime supplies the execution.

Writing Run Record files is a different job, so it lives in a different component, sergent-ts-run-record. The division pays twice. It keeps this component clear of the filesystem: it needs only sergent-ts-core and standard Web APIs, so the same code runs on a browser main thread and inside a worker. It also keeps persistence behind the observer interface, so turning files on is something an application adds, and a Run behaves identically when nothing is writing them.

Putting it to use

An application meets this component in three places. Implement RunObserver to watch a Run without steering it. Read the current ProgressSnapshot from the handle a Run gives you while the work is still going; it is the view you can safely put in front of a user. Take the closed Run Record from the SergentResult a Run returns, beside the final application state and the ending message and metadata.

A Run Record is sensitive forensic material; the observability specification, in "Sensitivity", says what one can contain and leaves handling to the application.

The knowledge file walks through the structure, the building rules, and the capture behavior behind these practices.