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

@aletheia-labs/adapters-anthropic

v0.1.2

Published

Anthropic-compatible LLM adapter for Aletheia authority-governed memory.

Downloads

365

Readme

@aletheia-labs/adapters-anthropic

Anthropic-compatible adapter for Aletheia authority-governed memory.

Status: 0.1.0 public baseline. Reference Anthropic integration is live as a narrow library adapter. It does not own OAuth, API keys, terminal UX, tools, publication, or provider account state.

Requirements

  • Node 20+.
  • ESM-only. Add "type": "module" to your package.json, use .mjs, or use a build tool/runtime that handles ESM. CommonJS require() is not shipped in 0.1.x.

Quickstart

pnpm add @aletheia-labs/core @aletheia-labs/store-sqlite @aletheia-labs/adapters-anthropic @anthropic-ai/sdk
import Anthropic from '@anthropic-ai/sdk';
import { AletheiaAuthority, staticVisibilityPolicy } from '@aletheia-labs/core';
import { AletheiaAnthropicBridge } from '@aletheia-labs/adapters-anthropic';
import { openSqliteStores } from '@aletheia-labs/store-sqlite';

const stores = openSqliteStores('./aletheia.sqlite');
const authority = new AletheiaAuthority({
  eventLedger: stores.eventLedger,
  memoryStore: stores.memoryStore,
  conflictRegistry: stores.conflictRegistry,
  visibilityPolicy: staticVisibilityPolicy([{ kind: 'private:user' }]),
});

const bridge = new AletheiaAnthropicBridge({
  client: new Anthropic({ apiKey: process.env.ANTHROPIC_API_KEY }),
  authority,
  eventLedger: stores.eventLedger,
  model: 'claude-3-5-sonnet-latest',
});

Hosts own credentials, retries, rate limits, and provider selection. This adapter only receives an already-authenticated client.

What this package does

  • Records conversation turns as append-only Aletheia events.
  • Asks an Anthropic-compatible client to draft memory proposals as JSON.
  • Sends every draft through AletheiaAuthority.propose() before anything becomes a MemoryAtom.
  • Recalls memory through AletheiaAuthority.recall() and re-checks action authority through tryAct() before calling the model for an answer.
  • Refuses to call the model when recall/action authority fails closed.

Client contract

The adapter accepts any object with the messages.create(input) shape exposed by @anthropic-ai/sdk:

const bridge = new AletheiaAnthropicBridge({
  client: new Anthropic({ apiKey: process.env.ANTHROPIC_API_KEY }),
  authority,
  eventLedger,
  model: 'claude-3-5-sonnet-latest',
});

@anthropic-ai/sdk is an optional peer dependency. @aletheia-labs/core stays SDK-free.

What this package does NOT do

  • No OAuth, device login, refresh-token handling, or subscription plumbing.
  • No authority upgrade from model output.
  • No tool execution.
  • No semantic retrieval, embeddings, vector index, or ranking.
  • No bypass around propose, recall, or tryAct.

Stability

Public surface for the initial library cycle:

  • AletheiaAnthropicBridge
  • AnthropicMessagesClient
  • ConversationIngestionInput
  • AnswerWithRecallInput
  • ConversationIngestionResult
  • AnswerWithRecallResult

Everything else is adapter plumbing and may change during the 0.x line.

Development

From the repo root:

pnpm install
pnpm -F @aletheia-labs/adapters-anthropic typecheck
pnpm -F @aletheia-labs/adapters-anthropic test
pnpm -F @aletheia-labs/adapters-anthropic build

Boundary

The model may suggest memory. It never grants authority. Receipts, scope, visibility, status, conflicts, freshness, and action classification remain receiver-side checks.