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

@onderling/core

v0.1.0

Published

Portable decentralised agent SDK — transport, security, identity, protocol

Readme

@onderling/core

Layer: SDK foundation. This is part of the agent SDK that substrates build on. Substrates and apps compose primitives from here — they MUST NOT reinvent transports, vaults, auth, merge contracts, push, skill registries, identity, emitters, or ULID; apps MUST justify any direct dependency in their README's ## Direct SDK use section. See Project Files/conventions/architectural-layering.md.

Pure-JS core of the @onderling SDK. Runs in browser, Node, and React Native (no native deps in this package). Provides:

  • Agent — composition root; skill registry, dispatch, hello/task protocols, identity rotation.
  • Identity + vault — Ed25519 keypairs, BIP39 mnemonics, pluggable vault backends (memory, Node FS, IndexedDB, localStorage).
  • SecurityLayernacl.box payload encryption + Ed25519 envelope signatures, replay window, key rotation grace period.
  • Transports — see below.
  • RoutingRoutingStrategy, FallbackTable, hop tunneling.
  • Skills + protocols — task exchange, streaming, file sharing, pubsub, key rotation, reachability oracle.
  • A2A bridge — JSON-RPC over HTTPS interop with non-@onderling agent frameworks.

For the bigger picture see the repo root README.md, QUICKSTART.md, and ARCHITECTURE.md.


npm install @onderling/core

Layers

The codebase is layered top-down:

Agent           ←  composition root + skill registry
  ↑
Protocol        ←  hello, taskExchange, streaming, keyRotation, …
  ↑
SecurityLayer   ←  encrypt + sign every envelope
  ↑
Transport       ←  sendOneWay / sendAck / request / respond

Every _put() is wrapped by SecurityLayer from Phase 1 — there is no "bypass" path. Routing picks a transport per-peer via transportFor(); replies pin to the channel the request arrived on (envelope._transport).


Transports

The four transport families used in practice:

| Class | Family | Notes | |---|---|---| | LocalTransport | Direct (in-realm) | Same-process pub/sub bus. Tests, browser tabs. | | InternalTransport | Direct (in-realm) | InternalBus-backed; pair-test friendly. | | RendezvousTransport | Direct (cross-network) | WebRTC DataChannel; needs a signalling channel (relay) for SDP/ICE. Wire via agent.enableRendezvous(...). | | RelayTransport | Centralized relay | WebSocket to @onderling/relay. Two server-side modes: rendezvous (signalling) + proxy fallback. | | NknTransport | Decentralized network | NKN public messaging. No operator; identity-derived address. Needs nkn-sdk. | | MqttTransport | Centralized broker | MQTT over WS. Optional alternative to the WS relay. | | OfflineTransport | Sentinel | Always-fail clean-error fallback. Used as "primary" by createMeshAgent so a missing network never blocks agent.start(). | | Transport (base) | — | Subclass to add a transport. Tags envelope._transport on receive. |

LAN transports (MdnsTransport, BleTransport) live in @onderling/react-native because they need native modules.

Hop / peer-as-relay

Hop tunneling is not a transport. It runs at the routing layer: a third agent calls enableTunnelForward({ policy }) (plaintext bridge) or enableSealedForwardFor(groupId) (sealed nacl.box forward — bridge can't read content). Callers reach the destination via agent.invokeWithHop(peer, skill, parts, { group }). See Design-v3/hop-tunnel.md and Design-v3/blind-forward.md.


Entry points

import {
  Agent, AgentIdentity,
  TextPart, Parts,
} from '@onderling/core';
import { VaultMemory }              from '@onderling/vault';
import { RelayTransport, NknTransport } from '@onderling/transports';

Phone factory (createMeshAgent) lives in @onderling/react-native. Quickstart snippets are in QUICKSTART.md.


Tests

npm run test:core

Test files live under test/ and end in .test.js. Vitest.


See also

  • Design-v3/topology.md — topology + reachability framing.
  • ARCHITECTURE.md — code map across all three packages.
  • coding-plans/ — current work tracks.

Status

0.x — pre-1.0; the API may move between minor versions. Versioned with changesets. Source: github.com/Onderling/basis (packages/core).