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

@hebbs/sdk

v0.3.0

Published

TypeScript SDK for HEBBS cognitive memory engine (gRPC)

Downloads

289

Readme

@hebbs/sdk — TypeScript SDK for HEBBS

Async gRPC client for the HEBBS cognitive memory engine. Node.js 18+ only.

Install

npm install @hebbs/sdk

Quick Start

import { HebbsClient } from '@hebbs/sdk';

const client = new HebbsClient('localhost:6380', {
  apiKey: process.env.HEBBS_API_KEY,
});
await client.connect();

// Store a memory
const memory = await client.remember({
  content: 'User prefers dark mode',
  importance: 0.8,
  entityId: 'user-123',
});

// Recall by similarity
const { results } = await client.recall({
  cue: 'user preferences',
  strategies: ['similarity'],
});

// Prime a session
const primeOut = await client.prime({ entityId: 'user-123' });

// Real-time subscribe
const sub = await client.subscribe({ entityId: 'user-123' });
await sub.feed('Tell me about user preferences');
for await (const push of sub) {
  console.log('Surfaced:', push.memory.content);
}
await sub.close();

await client.close();

API

HebbsClient

| Method | Description | |--------|------------| | connect() | Open gRPC channel | | close() | Close connection | | remember(params) | Store a memory | | get(memoryId) | Retrieve by ID | | recall(params) | Multi-strategy recall | | prime(params) | Session warm-up | | revise(memoryId, params) | Update a memory | | forget(params) | GDPR-compliant erasure | | setPolicy(params) | Configure tenant policy | | subscribe(params) | Real-time streaming | | reflect(params) | Generate insights | | insights(params) | Retrieve insights | | health() | Server health check | | count() | Total memory count |

Recall Strategies

  • similarity — semantic vector search
  • temporal — time-ordered retrieval
  • causal — cause-and-effect graph traversal
  • analogical — cross-domain pattern matching

Error Handling

All SDK errors extend HebbsError. Specific subclasses map to gRPC status codes:

| Error | gRPC Status | |-------|-------------| | HebbsConnectionError | Channel failure | | HebbsUnavailableError | UNAVAILABLE | | HebbsTimeoutError | DEADLINE_EXCEEDED | | HebbsNotFoundError | NOT_FOUND | | HebbsInvalidArgumentError | INVALID_ARGUMENT | | HebbsAuthenticationError | UNAUTHENTICATED | | HebbsPermissionDeniedError | PERMISSION_DENIED | | HebbsInternalError | INTERNAL | | HebbsRateLimitError | RESOURCE_EXHAUSTED |

Testing

# Unit tests (no server needed)
npm test

# Integration tests (requires live server)
HEBBS_TEST_SERVER=localhost:6380 HEBBS_API_KEY=hb_... npm run test:integration

# E2E validation (requires live server + OpenAI for reflect)
HEBBS_API_KEY=hb_... OPENAI_API_KEY=sk-... npm run test:e2e

Demo App

cd demo && npm install

# Interactive mode (mock LLM, no API keys)
npx tsx src/index.ts interactive --mock-llm

# Interactive mode (real OpenAI)
OPENAI_API_KEY=sk-... npx tsx src/index.ts interactive

# Run scripted scenarios
npx tsx src/index.ts scenarios --all --mock-llm

License

Apache-2.0