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/vault

v0.1.0

Published

Vault — agent identity + token storage (Vault, VaultMemory, VaultLocalStorage, VaultIndexedDB, VaultNodeFs, OAuthVault). Platform-portable: Node, browser via IndexedDB / LocalStorage, RN via the storage adapters in @onderling/react-native. Extracted from

Readme

@onderling/vault

Layer: substrate. Agent identity + token storage. Extracted from @onderling/core/identity 2026-05-11 as part of the standardisation P1 work (Phase 50.1.A — see Project Files/SDK/core-v2-coding-plan-2026-05-11.md).

Vault is a foundational data-store primitive that several substrates need (oidc-session, agent-registry, pseudo-pod). Living as its own substrate keeps the dependency direction clean: apps → substrates → core — core never imports a substrate.

npm install @onderling/vault

What's in here

The Vault family of identity / token storage:

| Class | Backend | |---|---| | Vault | Abstract base class — defines the get / set / delete / list / has contract. Subclass to plug in custom storage. | | VaultMemory | In-memory implementation. Tests, RAM-only agents, default fallbacks. | | VaultLocalStorage | Browser localStorage backend. Synchronous under the hood, async-shaped surface. | | VaultIndexedDB | Browser IndexedDB backend. Larger blobs, fully async. | | VaultNodeFs | Node filesystem backend. Encrypted-at-rest support via per-instance key. |

Plus the OAuth-token helper layered on top of a Vault:

  • OAuthVault — typed wrapper providing per-(service, account) token tracking with proactive near-expiry refresh + reactive 401 retry + in-flight coalescing.
  • makeAuthorizedFetch(oauthVault, service, accountId, opts?) — fetch wrapper that injects the bearer token from an OAuthVault and triggers refresh-on-401.

Public API

import {
  Vault,
  VaultMemory,
  VaultLocalStorage,
  VaultIndexedDB,
  VaultNodeFs,
  OAuthVault,
  makeAuthorizedFetch,
} from '@onderling/vault';

Each Vault subclass implements the same contract:

interface Vault {
  get(key: string):              Promise<string|null>;
  set(key: string, value: string): Promise<void>;
  delete(key: string):           Promise<void>;
  has(key: string):              Promise<boolean>;
  list():                        Promise<string[]>;
}

Platform notes

  • Node: VaultNodeFs is the canonical backend. Provides encrypted-at-rest persistence keyed by a per-instance secret.
  • Browser: prefer VaultIndexedDB for anything beyond trivial size; VaultLocalStorage is fine for small token caches.
  • React Native: use KeychainVault from @onderling/react-native (RN-platform-specific; not in this substrate). The Vault interface in this package is compatible if you want to wrap your own implementation.

Relationship with @onderling/core

@onderling/core consumes Vault via injection (an Agent's identity is constructed against a vault the caller provides). Core's Bootstrap accepts a vault as an arg; it doesn't construct one itself. This keeps core substrate-free.

The 2026-07-05 de-fat removed @onderling/core's deprecation re-export of the Vault family — @onderling/core no longer exports these symbols. Import them from @onderling/vault directly: import { VaultMemory } from '@onderling/vault'.

Bring it up

cd packages/vault
npm install
npm test

Tests

  • test/VaultNodeFs.test.js — Node filesystem backend + AgentIdentity round-trips. Real fs.
  • test/OAuthVault.test.js — multi-account storage, proactive refresh, reactive 401 retry, in-flight coalescing.

See also

Status

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