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

@console-one/sequence

v0.1.0

Published

Append-only behavioral type kernel. Types and values are the same continuum; mount a fact, see what's missing (gaps), fill gaps through compose, capabilities activate. One operation (mount), one data structure (Sequence), one protocol (ft text in/out).

Readme

@console-one/sequence

Append-only behavioral type kernel. Types and values are the same continuum — a value IS a maximally concrete type. Mount a typed fact, see what's missing (gaps), fill gaps through compose, capabilities activate. One operation (mount), one data structure (Sequence), one protocol (ft text in/out).

Install

npm install @console-one/sequence

Quick start

import { Sequence, FT } from '@console-one/sequence';

const seq = new Sequence();
seq.mount('schema', 'count', FT.number());
seq.mount('bind', 'count', 42);

seq.get('count');        // 42
seq.concreteness('count'); // 1 — value satisfies schema

Core API

  • Sequence — append-only block log with derived projection. mount() is the only write operation.
  • FT.* — builder convenience API: FT.string(), FT.object({...}), FT.fn({...}), FT.segmented([...]), etc.
  • createType — lower-level type constructor with full constraint vocabulary.
  • compose — lattice meet. compose(a, b) returns the tightest type consistent with both.
  • backwardInfer — given a required output, derive the required input.
  • hoist / hoistForReader — emit projection as ft text, optionally scoped to a reader contract.
  • receive — parse ft text into the sequence.
  • loadEnv — boot a Sequence from a clock, snapshots, entries, and capability impls.
  • rotate — lock-holder moves a range to a destination with a transparent redirect. The compression/federation/retention primitive.
  • renderForReader — cluster → score → rank → budget → hoist pipeline.

Design invariants

  1. Types and values are the same continuum. A value is a maximally concrete type.
  2. = overwrites, << narrows. Ordered choice on unions.
  3. prev for all self-reference. Prior value at same path, or prior element in array.
  4. Behavioral predicates are refinement types.
  5. The "compiler" is the Sequence — parse → walk → mount; no separate compilation.
  6. Hoist output is valid ft input. Round-trippable.
  7. Mount → cascade (via backward index) → enforce admission → report changes.
  8. Kernel internals are values. _deps.*, _rdeps.*, _caps, _blocks.* all readable via get().
  9. Application features are type state, not kernel methods. Backlinks, indexes, ranking, sharding — all expressible as classes/capabilities mounted on the Sequence.
  10. Reader contracts separate kernel from renderer.

Source layout

src/
├── sequence.ts     # kernel: append-only log, derived projection, cascade
├── type.ts         # FieldType + constraint vocabulary
├── compose.ts      # lattice meet, covers, backward inference, CDF, conjugate update
├── statement.ts    # Statement/Block/MountEntry primitives
├── laws.ts         # pre-mount admission laws (law({admission: true, check}))
├── builder.ts      # FT.* convenience API
├── hoist.ts        # emit projection as ft text
├── env.ts          # loadEnv — boot with clock, snapshots, impls
├── rotation.ts     # rotate(seq, {source, destination, author}) primitive
├── dsl/            # tokenize → parse → walk → mount
├── runtime/
│   └── render.ts   # cluster → score → rank → budget → hoist
└── test/           # 623 tests across 38 suites

Specs

See specs/docs/ for the full architecture and invariant documentation:

  • ARCHITECTURE.md — overview
  • KERNEL_BOOT.md — boot contract
  • DSL_REQUIREMENTS.md — DSL specification
  • NARRATIVE_IS_TOOL.md — the unification statement

Development

npm install
npm run build       # tsc
npm test            # jest
npm run lint        # tsc --noEmit

Git hooks

Hooks are tracked under .githooks/. Enable after cloning:

git config core.hooksPath .githooks
  • pre-commit: tsc --noEmit
  • pre-push: jest

License

MIT