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

@hwy-fm/kernel

v0.1.3

Published

Kernel is not a framework. It is the thing you use to build one.

Readme

@hwy-fm/kernel

License: MIT TypeScript

Kernel is not a framework. It is the thing you use to build one.

Kernel is a statically compiled computation kernel. It defines five primitives — Seed, Instruction, Slot, Composer, Context — that let you assemble any architecture: how many pipeline stages, what protocols, what execution topology. Those are your decisions, not Kernel's.

@hwy-fm/std is proof: its entire framework — 8 Slots, a default protocol, one-liner decorators — is built from these five primitives plus one registerModelHook() call. std is not special. It is one possible architecture. You can build a completely different one.

Five Primitives

| Primitive | Role | |-----------|------| | Seed | Addressable computation. Match pattern (URL, command, event, any identifier) + execute(). | | Instruction | Processing step that runs around Seeds. Can be atomic — or an entire sub-Kernel. | | Slot | Named pipeline position. Stage (INGRESS / PROCESS / EGRESS) + topology anchors for ordering. | | Composer | Execution physics within a Slot — onion, linear, or custom. | | Context | The state that flows through the pipeline from start to finish. |

INGRESS    [ Slots you define: parse, authenticate, validate, ... ]
    ↓
PROCESS    [ Seed.execute() — your computation ]
    ↓
EGRESS     [ Slots you define: format, log, trace, ... ]
             always executes (finally semantics)

Architecture as Code

Your architecture is not a comment. Not a diagram. It is compilable structure:

const System   = KernelModel();
const Auth     = KernelModel();
const Business = KernelModel();
const View     = KernelModel();

// Each Kernel defines its own pipeline shape
@Auth.slot({ name: 'identify', stage: 'INGRESS' })
@Auth.slot({ name: 'verify',   stage: 'PROCESS' })
@Auth.slot({ name: 'session',  stage: 'EGRESS' })

@Business.slot({ name: 'validate', stage: 'INGRESS' })
@Business.slot({ name: 'execute',  stage: 'PROCESS' })
@Business.slot({ name: 'event',    stage: 'EGRESS' })

@View.slot({ name: 'resolve', stage: 'INGRESS' })
@View.slot({ name: 'render',  stage: 'PROCESS' })
@View.slot({ name: 'cache',   stage: 'EGRESS' })

// Connect them — each bridge is an Instruction
@System.instruction({ protocol: SYS, slotName: 'auth', match: '**' })
class AuthBridge { /* → dispatch into Auth Kernel */ }

@System.instruction({ protocol: SYS, slotName: 'process', match: '**' })
class BusinessBridge { /* → dispatch into Business Kernel */ }

@System.instruction({ protocol: SYS, slotName: 'deliver', match: '**' })
class ViewBridge { /* → dispatch into View Kernel */ }
                        System
                ┌─────────┼─────────┐
                │         │         │
              Auth     Business    View
             ┌──┼──┐   ┌──┼──┐   ┌──┼──┐
             I  P  E   I  P  E   I  P  E

I = INGRESS    P = PROCESS    E = EGRESS
Each box is a complete Kernel — own Slots, own compilation, own DI tree.

Four isolated systems — each with its own Slots, Seeds, compilation, and DI tree — composed through Kernel's own primitives. Every KernelModel() is a physically independent Kernel: own registry, own routing, own compilation. Yet every Kernel exposes the same createContext() / forward() interface. Teams own separate Kernels. The pattern is the same at every scale.

Static Compilation

Kernel is statically compiled. The entire pipeline structure — Slot topology, Instruction matching, route resolution — compiles once at mount(). At runtime, nothing is interpreted.

mount() — once at startup:
  Slots      → topologically sorted by anchors (DAG)
  Routes     → compiled into a Radix Tree
  Pipeline   → immutable, cached execution plan

dispatch() — every request:
  match address → O(k), k = path segments
  execute plan  → pre-compiled, zero reflection

Building on Kernel

registerModelHook() is how frameworks are born. Every hook is applied once per KernelModel() call — injecting Slots, providers, and custom API onto the model without touching Kernel source code:

// How @hwy-fm/std builds its entire framework — a single Model Hook
registerModelHook({
  bootstrapProviders: () => [
    { provide: STD_PROTOCOL, useValue: STD_PROTOCOL },
  ],
  setup(model) {
    setupSlotDrive(model);   // declareSlot / ingress / process / egress
    setupStdSlots(model);    // 8 pre-configured Slots
    setupAdmissionOfficers(model);
  },
});

Admission Officers let you filter or transform Instructions at compile time:

@model.admission()
class SecurityAdmission {
  admitInstruction(instruction) {
    if (!instruction.protocol) return null;  // veto
    return instruction;                       // pass through
  }
}

Install

npm install @hwy-fm/kernel @hwy-fm/di

For a ready-to-use architecture built on Kernel, see @hwy-fm/std.

API Reference

KernelModel

const model = KernelModel();

| Method | Description | |--------|-------------| | model.seed(def) | Register a Seed (class or method decorator) | | model.instruction(def) | Register an Instruction (class or method decorator) | | model.slot(def) | Register a Slot (class decorator) | | model.exclude(def) | Exclude a specific Instruction from a Seed's pipeline | | model.reset(def) | Reset all Instructions in a Slot for a Seed | | model.admission() | Register an Admission Officer (compile-time filter) | | model.configure(options) | Set timeout, debug mode, concurrency, logger | | model.security(config) | Set security limits | | model.bootstrap | Bootstrap decorator | | model.kernel | Access the bootstrapped Kernel instance | | model.destroy() | Destroy all Kernel instances |

Kernel Instance

| Method | Description | |--------|-------------| | kernel.createContext(options) | Create a Context | | kernel.dispatch(ctx) | Full dispatch — telemetry, timeout, debug tracing | | kernel.forward(ctx) | Lightweight dispatch — no telemetry overhead | | kernel.mount() | Compile pending Seeds into Pipelines | | kernel.remount() | Recompile all Pipelines | | kernel.shutdown(timeout?) | Graceful shutdown — drain in-flight, then abort | | kernel.inject(token) | Resolve a dependency from the Kernel injector | | kernel.events | Subscribe to lifecycle events |

Full API inventory — Context fields, Configuration, EGRESS semantics, Events, Exceptions, Inspector, extension points — is in KERNEL_CORE_PRINCIPLES.md.

Related Packages

| Package | Description | |---------|-------------| | @hwy-fm/di | The DI container powering Kernel — Scoping, Hooks, Async Governance | | @hwy-fm/std | An architecture built on Kernel — 8 pre-configured Slots, Gateway, one-liner decorators | | @hwy-fm/cli | Build tools + CLI scaffolding |

Documentation

| Document | Description | |----------|-------------| | KERNEL_CORE_PRINCIPLES.md | Full API reference, internal design, extensibility interfaces |

License

MIT © hwyn