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

zanii-connect

v0.2.0

Published

TypeScript SDK for Zanii Connect — OAuth connections and tool execution for AI agents

Readme

zanii-connect — TypeScript SDK

TypeScript/JavaScript client for Zanii Connect: OAuth connections, encrypted token vault, and audited tool execution for AI agents.

Zero runtime dependencies — uses the platform fetch (Node 18+, browsers, edge runtimes).

Install

npm install zanii-connect

Requires Node 18+ (or any runtime with a global fetch). Ships with TypeScript types.

Quickstart

import { ZaniiClient } from "zanii-connect";

// Agents/services authenticate with a scoped API key:
const nc = new ZaniiClient({ apiKey: "nsk_..." });

// Or as a user (JWT):
const nc = new ZaniiClient();
await nc.login("[email protected]", "password");

console.log((await nc.me()).organization.name);

// Connect a provider (open the returned URL in a browser to complete OAuth):
const { url } = await nc.connect("gmail",
  "https://vault.zanii.agency/api/v1/connect/oauth/callback");

// Discover tools and execute one:
const conn = (await nc.connections()).connections[0];
const found = await nc.execute("gmail.search", conn.id, { query: "invoice" });

// Actions that need human approval return an approval link instead of executing:
const res = await nc.execute("gmail.sendEmail", conn.id,
  { to: "[email protected]", subject: "Hi", body: "Hello" });
if (res.requires_approval) console.log("Ask a human to confirm:", res.approval_url);

// Long-running work goes through the job queue:
const job = await nc.executeAsync("browser.run", conn.id, { /* ... */ });
const result = await nc.waitForJob(job.job_id, 300);

Behavior

  • Retries: 429/502/503/504 are retried up to 3 times with exponential backoff.
  • Idempotency: pass { idempotencyKey } to execute() to make retries safe for side-effecting actions.
  • Errors: non-2xx responses throw ZaniiError with .statusCode and .detail.
  • MCP: AI agents that speak MCP don't need this SDK — point them at POST https://vault.zanii.agency/api/v1/mcp with an X-API-Key header.

Surface

Mirrors the Python SDK (sdk/python), camelCased — covers the full API:

  • Account: signup, login, me, updateProfile, changePassword, forgotPassword, resetPassword, email verification, MFA (mfaEnroll/mfaEnable/mfaDisable)
  • API keys: createApiKey (plaintext returned once), apiKeys, deleteApiKey (soft revoke)
  • Org & team: org, usage, updateOrg, exportOrg, deleteOrg, users, inviteUser, updateUser, deactivateUser, roles (permissions, roles, upsertRole, deleteRole), workspaces/projects/environments
  • Registry: providers, provider, providerActions, actions, action, tools, tool, dynamic-registry admin (registerProvider, registerAction, unregisterAction)
  • Connections: connect, connections, connectionsHealth, deleteConnection, shareConnection
  • Execution: execute, executeAsync, job, waitForJob · approvals (approvals, approve)
  • Browser sandbox: createBrowserSession, browserSession, browserRun, browserRunAsync
  • Secrets / automation: secrets, setSecret, deleteSecret, triggers, webhook subscriptions
  • Observability: executions (each row carries receipt_hash + proof_url), audit, auditExportCsv, health
  • Proof-of-action: receiptsBundle (offline-verifiable audit bundle), complianceReport (json/markdown)

License

MIT © Zanii Agency