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-openai

v0.1.2

Published

OpenAI Responses-compatible LLM adapter for Aletheia authority-governed memory.

Downloads

380

Readme

@aletheia-labs/adapters-openai

OpenAI Responses-compatible adapter for Aletheia authority-governed memory.

Status: 0.1.0 public baseline. Reference OpenAI 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-openai openai
import OpenAI from 'openai';
import { AletheiaAuthority, staticVisibilityPolicy } from '@aletheia-labs/core';
import { AletheiaOpenAIResponsesBridge } from '@aletheia-labs/adapters-openai';
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 AletheiaOpenAIResponsesBridge({
  client: new OpenAI({ apiKey: process.env.OPENAI_API_KEY }),
  authority,
  eventLedger: stores.eventLedger,
  model: 'gpt-5',
});

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 OpenAI Responses-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 package does not import the OpenAI SDK. It accepts any caller-provided object with responses.create(input):

const bridge = new AletheiaOpenAIResponsesBridge({
  client: new OpenAI({ apiKey: process.env.OPENAI_API_KEY }),
  authority,
  eventLedger: stores.eventLedger,
  model: 'gpt-5',
});

What this package does NOT do

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

Fixture Demo

After building the workspace:

pnpm -r run build
pnpm -F @aletheia-labs/adapters-openai run demo:fixture

The fixture uses a fake Responses client and should print boundaryViolations: [].

Stability

Public surface for the initial library cycle:

  • AletheiaOpenAIResponsesBridge
  • OpenAIResponsesClient
  • 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-openai typecheck
pnpm -F @aletheia-labs/adapters-openai test
pnpm -F @aletheia-labs/adapters-openai build
pnpm -F @aletheia-labs/adapters-openai run demo:fixture