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

@cnstra/persist-dto

v0.2.0

Published

Canonical, name-based data model for CNStra resumable execution: run/stimulation/task DTOs (emit) and persisted entities, plus the frontier progress DTO. Zero-runtime types shared by @cnstra/persist and the devtools.

Readme

@cnstra/persist-dto

⚠️ Experimental: API may change.

The canonical, name-based, zero-runtime model for CNStra resumable execution — the shared type contract behind @cnstra/persist, @cnstra/persist-postgres, the queue integrations, and the devtools protocol. Topology is referenced by name everywhere and never persisted (code is its source of truth).

The model (naming — read this to avoid confusion)

| role | type | id | |---|---|---| | the stable logical unit a human retries | Stimulation — TCNSStimulation{Dto,Persisted} | stimulationId (+ optional scopeName) | | one attempt / execution (a cns.stimulate / cns.activate) | StimulationAttempt — TCNSStimulationAttempt{Dto,Persisted} | stimulationAttemptId + attemptNumber | | one settled hop | StimulationTask — TCNSStimulationTask{Dto,Persisted} | ordinal index (belongs to an attempt) |

(stimulationId, attemptNumber) is unique. Mnemonic ≈ Temporal: Stimulation ≈ Workflow (stable), StimulationAttempt ≈ Run (a specific execution). A Stimulation groups its attempts; progress ({ tasks, context }, by name) is the live resume state carried across attempts.

scopeName

TCNSStimulation carries an optional scopeName?: string — the identity of a CNS/graph. All attempts of a stimulation inherit it (a stimulation never spans scopes). Unset → one default scope (everything in one bucket); set → routing + isolation: neuron/collateral names are unique within a scope, and resume reads stimulation.scopeName to hydrate the frontier against the right CNS/registry — so auto-resume lands in the right CNS even when two graphs reuse a neuron name. Topology is stored/served under scopeName (a scopeName = one CNS's graph).

Emit vs stored

Each entity has a Dto form (emitted, pre-id) and a Persisted form (stored, richer, defined independently). Task input is inline on the Dto (input: TCNSSignalRef) but deduped to an inputIndex slot on the Persisted form (input space = [entry(0..k-1), tasks(k..)]).

License

MIT