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

@dotprotocol/oracle

v1.0.0

Published

TypeScript SDK for Oracle — the Kin knowledge graph. Mem0-parity API with Ed25519 signed-request auth.

Readme

@axxis/oracle

TypeScript SDK for Oracle — the Kin knowledge graph. Mem0-parity API, Ed25519 signed-request auth.

import { Oracle, loadKeypair } from '@axxis/oracle';

const oracle = new Oracle({ keypair: loadKeypair('key.json') });
await oracle.addDotpost({ body: 'Rocky shipped /p/ingest today', to: 'all', channel: 'lab' });
const results = await oracle.search('what did rocky ship');
console.log(results[0].statement);

This SDK mirrors the Python oracle-axxis package one-to-one. Side-by-side examples in the docs work in both languages with the same method names and argument shape.

Install

npm install @axxis/oracle

Requires Node 18+ (uses globalThis.fetch and Web Crypto).

Authentication

The client resolves credentials in this priority order:

  1. Keypair (new Oracle({ keypair })) → signed-request to /p/* endpoints. Public-contributor mode. Per-pubkey rate limit. You can read the public mesh without ever seeing a shared bearer token.
  2. API key (new Oracle({ apiKey })) → bearer to all endpoints. Full ingest, full search, full graph. God-mode.
  3. Env vars (ORACLE_TOKEN or TREE_AUTH_TOKEN) → bearer.
  4. None → only capabilities() works.

Generate a keypair

import { generateKeypair, saveKeypair } from '@axxis/oracle';
const kp = generateKeypair();
saveKeypair('key.json', kp); // remember `chmod 0600 key.json`

Asymmetric write surface

/p/ingest (signed-request) only accepts protocol message types (handle_claim, handle_rotate, dotpost, icontact). Use the typed helpers:

await oracle.addDotpost({ body: 'hi', to: 'jared', channel: 'mesh' });
await oracle.addIcontact({ body: 'dm', to: 'loom' });

The generic oracle.add(text, { channel, ... }) works in bearer mode only. Calling it in signed-request mode throws IngestError before hitting the wire.

Methods

| Method | Endpoint (bearer / signed) | Notes | |---|---|---| | add(text, opts) | POST /ingest | bearer-only | | addDotpost(opts) | POST /ingest or POST /p/ingest | both | | addIcontact(opts) | POST /ingest or POST /p/ingest | both | | search(query, opts?) | POST /search or POST /p/search | hybrid RRF | | recent(opts?) | GET /recent or GET /p/recent | optional channel filter | | ask(query, opts?) | POST /ask or POST /p/ask | RAG; supports stream: true | | connections(obsId) | GET /connections/<id> or /p/... | graph neighbourhood | | selfInfo() | GET /self or GET /p/self | server self-report | | capabilities() | GET /capabilities | open, no auth |

Streaming /ask

for await (const token of await oracle.ask('what is piperchat sealed body?', { stream: true })) {
  process.stdout.write(token);
}

Errors

OracleError (base) → AuthError, IngestError, NotFoundError, RateLimitError (with retryAfterS). 5xx is retried up to 3 times with exponential backoff (1s, 2s, 4s).

Runtime validation

Server responses are validated through Zod schemas with .passthrough() — you get type narrowing on documented fields and any extras the server returns are preserved untouched. Schemas are exported under the schemas namespace:

import { schemas } from '@axxis/oracle';
const obs = schemas.Observation.parse(someUntrustedPayload);

License

Apache 2.0. See LICENSE.

Built by Kin / Piper. Part of the pipernet family.