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

@equationalapplications/core-okf

v6.0.0

Published

Zero-dependency Open Knowledge Format (OKF) v0.1 + v0.2 primitives: frontmatter serialization (with flow mappings / sequences), concept documents, index.md and log.md builders, trust-tier and staleness helpers.

Readme

@equationalapplications/core-okf

npm version npm downloads

Overview

A zero-dependency library for parsing and producing Open Knowledge Format (OKF) v0.1 and v0.2 bundles. This package provides the raw primitives to work with OKF frontmatter, concept documents, and index/log files, completely decoupled from any specific database or data model.

For a ready-made MemoryDump ⇄ OKF bundle adapter, see the OKF Import/Export section in @equationalapplications/core-llm-wiki.

For the llm-wiki interoperability profiles (llm-wiki/1 and llm-wiki/2), see docs/okf-profile.md. Conformance fixtures live in fixtures/.

GraphRAG compatibility: core-okf is database-agnostic. The adapter that can populate llm_wiki_edges for traverseGraph() lives in @equationalapplications/core-llm-wiki. See root README: GraphRAG.

Installation

npm install @equationalapplications/core-okf

API Reference

serializeFrontmatter / parseFrontmatter

Produces and parses YAML frontmatter for OKF concept documents.

const yaml = serializeFrontmatter({ type: 'fact', id: 'fact_123' });
const { frontmatter, rest } = parseFrontmatter(fileContent);

buildConceptDocument / parseConcept

Combines frontmatter and markdown body into a single string, or splits an existing OKF file into its component parts.

const markdown = buildConceptDocument({ type: 'task', id: 'task_1' }, '# Buy groceries');
const { frontmatter, body } = parseConcept(markdown);

buildIndexMd / buildRootIndexMd

Generates directory index lists or root OKF catalog manifests.

const sections = [{ heading: 'Facts', entries: [{ path: 'facts/fact_123.md', title: 'Fact 123' }] }];
const dirIndex = buildIndexMd(sections);
const rootIndex = buildRootIndexMd('0.1', sections);

buildLogMd / parseLogMd

Serializes chronological append-only events or parses them back into discrete entries.

const log = buildLogMd([{ date: '2026-06-23', text: 'Observation made' }]);
const events = parseLogMd(logContent);

extractMarkdownLinks

Parses relative markdown cross-links to map knowledge graph edges.

const links = extractMarkdownLinks('See [preferences](facts/fact_abc.md) for more.');
// links: [{ text: 'preferences', path: 'facts/fact_abc.md' }]

Monorepo Ecosystem

| Package | Purpose | | --- | --- | | @equationalapplications/core-llm-wiki | Persistent episodic memory | | @equationalapplications/expo-llm-wiki | Persistent episodic memory for Expo/React Native | | @equationalapplications/react-llm-wiki | Persistent episodic memory for Web | | @equationalapplications/prisma-outbox | Sync SQLite outbox events to Prisma | | @equationalapplications/core-llm-tools | Gemini tool schemas and capability injector | | @equationalapplications/core-okf | Zero-dependency Open Knowledge Format (OKF) v0.1 + v0.2 primitives — parse and produce interoperable knowledge bundles. | | @equationalapplications/schema-org-llm-wiki | Curated schema.org warm-agent ontology manifest |

OKF v0.2 conformance

This package conforms to OKF v0.2. New helpers for v0.2:

  • deriveTrustTier(verified) — derive 'unverified' | 'machine-confirmed' | 'human-reviewed'.
  • isStaleAfter(staleAfter, now) — staleness check against an absolute YYYY-MM-DD cutoff.
  • parseVerifiedFlexible(value) — accept either an array or a bare { by, at } mapping.
  • extractFootnotes(body) / serializeFootnotes(footnotes) — preserve footnote attribution verbatim.
  • parseFlowMapping(text) / parseFlowSequence(text) — flow parsing with at most one level of mapping-value nesting (no anchors/aliases outside quoted strings).

The serializeFrontmatter function emits plain objects as flow mappings and actor strings (containing / or :) via serializeActorString. Anchor/alias expansion is rejected; only unquoted & or * characters are treated as opaque (quoted spans are excluded from the scan, so URL query strings like "https://x/a?p=1&q=2" remain valid).