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

@arbidocs/core

v0.3.9

Published

Shared operations layer for ARBI — auth, config, SSE, WebSocket, and API operations

Readme

@arbidocs/core

High-level TypeScript SDK for the ARBI platform. Wraps authentication, workspace encryption, and all API operations into a single Arbi class.

Install

npm install @arbidocs/core

For Node.js, also install the IndexedDB polyfill:

npm install fake-indexeddb

Quick Start

import 'fake-indexeddb/auto' // Node.js only
import { Arbi } from '@arbidocs/core'

const arbi = new Arbi({ url: 'https://arbi.mycompany.com' })

// Login
await arbi.login('[email protected]', 'password')

// Pick a workspace
const workspaces = await arbi.workspaces.list()
await arbi.selectWorkspace(workspaces[0].external_id)

// Use it
const docs = await arbi.documents.list()
const tags = await arbi.tags.list()
const conversations = await arbi.conversations.list()

Streaming AI Queries

const result = await arbi.assistant.query('What does section 3 say?', {
  docIds: [docs[0].external_id],
  onToken: (token) => process.stdout.write(token),
  onStreamStart: ({ assistant_message_ext_id }) => {
    console.log('Stream started:', assistant_message_ext_id)
  },
  onComplete: () => console.log('\nDone'),
})

Session Recovery

After login, the SDK automatically persists your signing key (encrypted) in IndexedDB. You can also recover a session using the raw private key:

// Save the key after first login (e.g. the recovery key download)
const signingKeyBase64 = '...'

// Later, recover without password:
await arbi.loginWithKey('[email protected]', signingKeyBase64)

API Reference

Constructor

const arbi = new Arbi({
  url: 'https://arbi.mycompany.com',     // Required: backend URL
  deploymentDomain: 'arbi.mycompany.com', // Optional: defaults to URL hostname
  credentials: 'omit',                    // Optional: 'omit' | 'include' | 'same-origin'
})

Lifecycle

| Method | Description | |--------|-------------| | login(email, password) | Authenticate with email and password | | loginWithKey(email, signingKeyBase64) | Authenticate with a stored signing key | | selectWorkspace(workspaceId) | Select a workspace (decrypts workspace key) | | logout() | Log out and securely clear key material |

Properties

| Property | Type | Description | |----------|------|-------------| | isLoggedIn | boolean | Whether the user is authenticated | | hasWorkspace | boolean | Whether a workspace is selected |

Operations

All operations are namespaced and require a workspace to be selected (except workspaces and health).

| Namespace | Methods | |-----------|---------| | arbi.workspaces | list(), create(), update(), delete(), listUsers(), addUsers(), removeUsers(), setUserRole() | | arbi.documents | list(), get(), upload(), update(), delete() | | arbi.conversations | list(), getThreads(), updateTitle(), share(), delete() | | arbi.assistant | query(question, options), retrieve(messageExtId) | | arbi.tags | list(), create(), update(), delete() | | arbi.doctags | assign(), remove() | | arbi.contacts | list(), search() | | arbi.health | check() |

Browser Entry Point

For browser environments (no Node.js APIs like fs), import from the browser entry:

import { Arbi } from '@arbidocs/core/browser'

Security

  • Zero-knowledge auth: Passwords never leave the client. Ed25519 keys are derived locally via Argon2id.
  • E2E workspace encryption: Each workspace has a symmetric key, wrapped with your public key.
  • Encrypted key storage: Private keys in IndexedDB are encrypted with a non-extractable Web Crypto AES-GCM key.
  • Key zeroing on logout: Signing and session keys are scrubbed from memory on logout.

Examples

Requirements

  • Browser: Any modern browser with Web Crypto API
  • Node.js: v18+ (needs fetch, FormData, Blob globals). Install fake-indexeddb.
  • TypeScript: 5.0+ (optional)