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

cathedral-memory

v1.1.0

Published

Persistent memory for AI agents — JavaScript/TypeScript client for Cathedral

Readme

cathedral-memory

JavaScript/TypeScript client for Cathedral — persistent memory for AI agents.

Your agent forgets everything when the context resets. Cathedral fixes that.

Install

npm install cathedral-memory

Works in Node.js 18+ and any environment with native fetch. Zero dependencies.

Quickstart

import { CathedralClient } from "cathedral-memory";

// Register once — save the key and recovery token
const { client, result } = await CathedralClient.register(
  "MyAgent",
  "A research assistant that remembers everything"
);
console.log(result.api_key);        // cathedral_...
console.log(result.recovery_token); // save this somewhere safe

// On every session start
const c = new CathedralClient({ apiKey: "cathedral_your_key_here" });
const ctx = await c.wake(); // full identity + memory reconstruction
console.log(`Welcome back, ${ctx.agent}`);
console.log(ctx.identity_memories);
console.log(ctx.core_memories);

// Store memories
await c.remember({
  content: "User prefers concise answers",
  category: "relationship",
  importance: 0.9,
});
await c.remember({
  content: "Solved the rate limiting bug using exponential backoff",
  category: "skill",
  importance: 0.7,
});

// Search memories
const { memories } = await c.memories({ query: "rate limiting" });

TypeScript

Full type declarations are included. No extra @types package needed.

import { CathedralClient, type WakeResponse, type DriftResult } from "cathedral-memory";

API

Session

await c.wake()    // full identity reconstruction — call at session start
await c.me()      // agent profile and memory stats

Memory

await c.remember({ content, category, importance, tags, ttl_days })
await c.memories({ query, category, limit, cursor })
await c.memory(id)
await c.updateMemory(id, { content, category, importance, tags })
await c.deleteMemory(id)
await c.bulkRemember([...])   // up to 50 memories in one call

Categories: identity | skill | relationship | goal | experience | general

Importance: 0.0–1.0 — memories >= 0.8 appear in wake() core_memories

Drift detection

const d = await c.drift();
// d.divergence_score  — 0.0 (stable) to 1.0
// d.hashes_match      — boolean
// d.flagged           — boolean
// d.changes           — { added, removed, modified }

Snapshots

await c.snapshot("before-major-update")   // create named snapshot
await c.snapshots()                        // list all snapshots
await c.getSnapshot(id)                    // get specific snapshot

Behaviour log

await c.logBehaviour({ action: "replied to user", context: "billing question", outcome: "resolved" })
await c.behaviour({ limit: 20 })

Memory compaction

const proposal = await c.compact();             // review what would be removed
await c.compactConfirm(proposal.proposal_id);  // apply it

External verification

// Ridgeline or other external behavioural summary
const result = await c.verifyExternal(behaviourSummary);
// result.external_divergence_score  — 0.0 to 1.0

Recovery

const { client, apiKey } = await CathedralClient.recover("your-recovery-token");

CommonJS

const { CathedralClient } = require("cathedral-memory");

Links