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

@qmilab/lodestar-cognitive-core

v0.5.0

Published

Claim extraction, evidence linking, and belief adoption for the Lodestar epistemic chain — the layer above the Memory Firewall. Part of Lodestar, the trust layer for AI agents.

Readme

@qmilab/lodestar-cognitive-core

Claim extraction, evidence linking, and belief adoption for the Lodestar epistemic chain — the layer above the Memory Firewall. Part of Lodestar — the trust layer for AI agents.

The Cognitive Core is what turns an Observation into a Claim, links that Claim to its supporting evidence, and proposes it to the Memory Firewall for adoption as a Belief.

Install

npm install @qmilab/lodestar-cognitive-core
# or
bun add @qmilab/lodestar-cognitive-core

What it does

  • Claim extractorsregisterExtractor() declares how a given observation schema produces candidate claims. Two extractors ship built-in via registerBuiltInExtractors(): GitStatusExtractor and FsReadExtractor. Both are pattern-based, not LLM-based.
  • Evidence linker — binds a candidate claim to its source observations and any related prior beliefs, returning an EvidenceSet the firewall can evaluate.
  • Explanation generator — produces a structured Explanation for chain transitions.
  • World model — an in-memory key-value store of currently-adopted beliefs, keyed by topic.
  • Belief adoptioncore.ingest(observation, context) runs the end-to-end pass and proposes adoption through the Memory Firewall. The firewall decides whether to adopt, at what truth/retrieval status, and with what freshness. The Cognitive Core never promotes a claim itself.

Usage

import {
  CognitiveCore,
  EvidenceLinker,
  ExplanationGenerator,
  InMemoryWorldModel,
  registerBuiltInExtractors,
} from "@qmilab/lodestar-cognitive-core"
import {
  MemoryFirewall,
  InMemoryClaimStore,
  InMemoryBeliefStore,
  InMemoryEvidenceStore,
} from "@qmilab/lodestar-memory-firewall"

registerBuiltInExtractors()

const claims = new InMemoryClaimStore()
const beliefs = new InMemoryBeliefStore()
const evidence = new InMemoryEvidenceStore()
const firewall = new MemoryFirewall(claims, beliefs, evidence, async () => {})

const core = new CognitiveCore(
  firewall,
  new EvidenceLinker(evidence, beliefs),
  new ExplanationGenerator("agent-1"),
  new InMemoryWorldModel(),
)

await core.ingest({
  observation,
  context: {
    actor_id: "agent-1",
    project_id: "my-project",
    session_id: "sess-1",
    default_scope: { level: "project", identifier: "my-project" },
    default_sensitivity: "internal",
  },
})

Invariants

  1. The Cognitive Core does not promote claims. It proposes; the Memory Firewall disposes. The split is intentional.
  2. No claim without an observation. Every Claim references at least one source Observation.
  3. No belief without evidence. Adoption is gated by the firewall, which requires an EvidenceSet built by the EvidenceLinker.
  4. Evidence kind is part of the contract. A claim derived from external_document or model_inference evidence is labeled as such; the firewall's auto-observation gate then refuses to silently promote it to truth_status: supported.

License

Apache 2.0.