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

@eleven-am/ada-sdk

v0.0.2

Published

Strictly typed Ada gRPC SDK for Node.js and browsers

Readme

Ada SDK for TypeScript

The backend client represents one authenticated namespace and shares one lazy, persistent gRPC stream per category across every principal facade.

Installation

npm install @eleven-am/ada-sdk

Node.js 20 or newer is required. Construct the backend client only in trusted server code; apiKey authenticates the entire namespace.

Backend client

import { AdaClient } from "@eleven-am/ada-sdk"

const ada = new AdaClient({
  endpoint: "https://memory.example.com",
  apiKey: process.env.ADA_API_KEY!,
  streams: {
    events: { afterEventId: savedCursor, replayLimit: 100 },
  },
})

const alice = ada.principal("alice")
const bob = ada.principal("bob")

const stopAlice = alice.events.on("memory.ingest.finished", event => {
  console.log(event.documentId)
})
const stopBob = bob.signals.on("routine.broken", signal => {
  console.log(signal)
})
const stopJob = alice.jobs.on("job.progressed", event => {
  console.log(event)
})

ada.lifecycle.on("stream.cursor", info => save(info))
ada.lifecycle.on("listener.error", info => report(info))

await alice.getMeEntity()
await ada.getPublicEventCatalog()
await ada.getSignalCatalog()

stopAlice()
stopAlice()
stopBob()
stopJob()
await ada.close()

principal("alice") accepts only a bare ID and returns a cached facade. All ingest, recall, documents, jobs, data, and summary operations are available through that facade. For example, alice.ingest(request), alice.recall(request), alice.documents.getStatus(request), and alice.data.listDocuments(request) always overwrite the request principal with "alice". The root exposes only namespace responsibilities such as catalogs, lifecycle, browser-session minting, and close.

Recall provenance is typed on each knowledge item's source:

const recalled = await alice.recall({ query: "What changed?" })
for (const item of recalled.knowledge) {
  console.log(item.source?.sourceAuthorities, item.source?.memoryGrade)
}

Use these fields instead of deprecated compatibility values in item.data.

events.on, signals.on, and jobs.on are keyed generic APIs. The literal event name determines the exact protobuf payload type and each call returns an idempotent synchronous unsubscribe function. There is no public stream object, open(), subscribe(), or async iterator.

Replay configuration belongs to the root streams.events, streams.signals, and streams.jobs options. Each accepts afterEventId, replayLimit, and bounded reconnect settings. Persist info.eventId from the typed stream.cursor lifecycle event only after the SDK has decoded and routed the envelope:

const stopCursor = ada.lifecycle.on("stream.cursor", info => {
  saveCursor(info.stream, info.eventId, info.principalId)
})

const stopTerminal = ada.lifecycle.on("stream.terminal", info => {
  reportTerminalStreamFailure(info.stream, info.error)
})

Call await ada.close() during shutdown. It is idempotent, stops reconnects, closes all three shared streams, and rejects later listener registration.

Browser

import { AdaBrowserClient } from "@eleven-am/ada-sdk/browser"

const ada = new AdaBrowserClient({
  endpoint: "https://memory.example.com",
  sessionToken,
})

const unsubscribe = ada.events.on("memory.recall.finished", event => {
  console.log(event)
})

unsubscribe()
await ada.close()

AdaBrowserClient uses gRPC-Web and is already bound to the principal encoded in its short-lived session. It has no principal() method, accepts no API key, and uses only principal-scoped streams. Never ship a namespace API key to a browser.

Mint the short-lived session in backend code with ada.createBrowserSession({ principalId: "alice", ... }), then send only its session token to the browser.