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

@oeltkit/runtime

v0.1.0

Published

OELT runtime core — tracking, state, navigation, and accessibility services. Bundled into every course.

Downloads

165

Readme

@oeltkit/runtime

The OELT runtime core: tracking, suspend state, navigation, and per-target adapter selection. Bundled into every course; zero runtime dependencies. Implements the contracts in specs/manifest-v0.md and specs/tracking-semantics.md.

Status: Phase-0 spike. One course → correct tracking in SCORM 1.2 / SCORM 2004 / cmi5 / standalone web from identical content. Components, theming, and the full nav model land later.

Usage

const rt = oelt.boot(courseManifest); // construct; auto-detects the target
rt.on((evt) => {
  /* observe the semantic event stream */
});
await rt.start(); // run the launch lifecycle (init → resume → first page)

After boot(), the instance's track / state / nav are also attached to the global oelt, so author markup can call them directly:

<button onclick="oelt.track.interaction({ id: 'q1', type: 'mcq', result: 'passed', score: 1 })">
  Submit
</button>

Public API

| Surface | Purpose | | ------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | | oelt.track.complete() | Mark complete (the manual completion rule). | | oelt.track.score(scaled) | Report a 0–1 score directly. | | oelt.track.progress(value) | Report 0–1 progress directly. | | oelt.track.interaction({ id, type?, result, score? }) | Report an interaction; the rules engine recomputes completion/score. | | oelt.state.get/set(key, value) | Suspend KV — quota-enforced (3 KB, tracking-semantics §8); throws QuotaExceededError over budget. Keys starting with __ are reserved. | | oelt.nav.pages / current() / go(i) / next() / prev() | Navigation driven by course.json. | | rt.on(listener) | Subscribe to the semantic event stream. | | rt.terminate() | End the session (commit + finish/terminate). |

Architecture

runtime.ts ── wires everything; exposes the public API
  ├─ adapters/detect.ts      auto-detect target → pick adapter
  ├─ adapters/{scorm12,scorm2004,cmi5,web}.ts   ← the ONLY code that touches a host LMS API
  ├─ tracking.ts             rules engine: manifest rules → normalized Outcome
  ├─ state.ts                suspend KV + quota + resume hydration
  └─ nav.ts                  page model + current + go

Adapter boundary. Every SCORM/xAPI/localStorage call lives under adapters/. The rules engine computes a normalized Outcome { completion, success, score, progress } and hands it to the adapter; the adapter maps it onto its target. The SCORM 1.2 collapse rule is expressed by success: it is non-null exactly when a score rule + mastery are defined, so the scorm12 adapter collapses success ?? completion into the single lesson_status field (tracking-semantics §4.2).

Resume. On reload the LMS retains its status, but the engine's in-memory state is gone — so the engine persists a compact snapshot into a reserved suspend key and rehydrates on start(), ensuring re-evaluation reproduces the prior outcome rather than downgrading it.

Dependencies. None. scorm-again is LMS-side (it provides window.API, not a content-side wrapper) and @xapi/cmi5 pulls in @xapi/xapi; see OQ-001 for the evaluation and the decision to keep zero-dep content-side adapters for now.

Build

npm run build -w @oeltkit/runtime

Produces dist/esm/ (plain ESM, browser-loadable, .js-extension imports) and dist/oelt.min.js (single-file IIFE exposing the global oelt). The harness serves the IIFE bundle at /runtime/oelt.min.js.