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

okf-cloudflare

v3.1.0

Published

One-bundle R2, MCP, and queue composition for OKF

Readme

okf-cloudflare

Generated directory navigation

createR2OkfV1Operations exposes okf_v1_index({ bundle, path: "." }). By default it generates navigation from live bundle analysis. Consumers that precompute views can provide indexes: async () => storedIndexesOrNull to serve a generated snapshot; null falls back to live analysis.

In onApplied, call generateBundleIndexes(analysis) from okf-core and persist the result outside the authored prefix. Reuse that same snapshot in the reader payload. Explicit rebuilds must call the generator too, using the documents already loaded. Generated navigation never becomes authored content or semantic graph edges. The consumer owns regeneration and failure reporting.

Use this package to run exactly one OKF Bundle on Cloudflare. It provides an R2 adapter, the versioned okf_v1_* MCP operations, hooks for Cloudflare Access and authorization, and a Queue consumer that safely handles repeated delivery while rebuilding deterministic visualizations.

import {
  createApplyChangeDurableObject,
  durableObjectStubForBundle,
  createOkfV1Worker,
  createR2OkfV1Operations,
  createVisualizationQueueWorker,
  R2BundleAdapter,
  withDurableObjectApply,
} from "okf-cloudflare";

You configure identity, authorization, Bundle and Profile selection, Worker bindings, routes, and observability. The package accesses only its configured Bundle. R2 supports conditional puts but not conditional deletes or multi-key transactions. To handle concurrent delete or move writers, serialize apply operations with the package's Bundle-named Durable Object coordinator. An author allowlist cannot serialize writes.

function directOperations(env: Env) {
  const adapter = new R2BundleAdapter(env.OKF_BUCKET, {
    bundle: "shared",
    prefix: "shared",
  });
  return createR2OkfV1Operations({ adapter });
}

export const SharedOkfApply = createApplyChangeDurableObject<Env>({
  apply(request, env) {
    return directOperations(env).applyChange(request);
  },
});

function operations(env: Env) {
  return withDurableObjectApply(
    directOperations(env),
    durableObjectStubForBundle(env.OKF_APPLY, "shared"),
  );
}

Bind and migrate the Durable Object class, and route every writer for a Bundle through the same namespace and Bundle name. Reads and previews use the direct R2 operations.

Pass the visualization generator to the Queue consumer. Use okf-core and okf-viz so local and hosted projections consume the same Bundle Analysis.