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

@honeybee-ai/hivemind-sdk

v0.2.17

Published

Hivemind platform SDK — auth, marketplace, colony, carapace, contracts, integrations

Readme

@honeybee-ai/hivemind-sdk

Platform SDK for the Honeybee Hivemind API. Typed client for marketplace, Colony, Carapace, billing, and telemetry. Zod-validated contracts for every API surface.

Install

npm install @honeybee-ai/hivemind-sdk

Requires Node.js 20+.

Quick start

import { createHivemindClient } from '@honeybee-ai/hivemind-sdk';

const client = createHivemindClient({ profileName: 'personal' });

// List your hives
const { data } = await client.listHives();

// Search the marketplace
const specs = await client.searchSpecs('code-review');

// Scan text with Carapace
const result = await client.scan({ message: 'some user input' });

Authentication uses profiles stored by wgl auth login. The client handles token refresh automatically, with a mutex to prevent concurrent refresh races.

Subpath imports

The package exposes 4 subpath entry points alongside the main export:

@honeybee-ai/hivemind-sdk/contracts

Zod schemas for every API request and response. Namespaced by product surface.

import { marketplace, colony, carapace, billing } from '@honeybee-ai/hivemind-sdk/contracts';

// Validate marketplace input
const parsed = marketplace.publishSpecInput.parse(userInput);

// Shared pagination
import { paginationInput, paginatedResponse } from '@honeybee-ai/hivemind-sdk/contracts';

Covers: marketplace specs, marketplace integrations, Colony hives/keys, Carapace scans/dashboard, billing/pollen, auth, and common pagination/error shapes.

@honeybee-ai/hivemind-sdk/integrations

Types for building Incubator plugins and integration modules.

import type {
  IntegrationModule,
  IntegrationFactory,
  IncubatorPlugin,
  PluginFactory,
  ToolEntry,
  ToolDef,
  ToolResult,
} from '@honeybee-ai/hivemind-sdk/integrations';

IntegrationModule is the base interface (start/stop/onEvent/getTools). IncubatorPlugin extends it with getToolEntries() for rich tool support. Legacy IntegrationModule packages are auto-wrapped by the plugin manager.

@honeybee-ai/hivemind-sdk/telemetry

Local-first telemetry with optional cloud sync. Events write to local JSONL immediately. Cloud ingest is opt-in and pre-aggregated.

import {
  TelemetryReporter,
  createTelemetryFromEnv,
  NO_OP_TELEMETRY,
} from '@honeybee-ai/hivemind-sdk/telemetry';

// Auto-configure from TELEMETRY_ENDPOINT + TELEMETRY_API_KEY env vars
const reporter = createTelemetryFromEnv({ projectRoot: process.cwd() });

// Record an event (sync queue push, never throws)
reporter.record('scan.complete', { score: 42, action: 'PASS' });

// Query local telemetry
import { localOverview, localTimeline, localEvents } from '@honeybee-ai/hivemind-sdk/telemetry';

Telemetry never sends without explicit configuration. NO_OP_TELEMETRY is a safe default that discards everything.

@honeybee-ai/hivemind-sdk/config

Unified config resolution for the Honeybee toolchain. Handles .wglrc files (user preferences) and .honeyb/ directories (runtime state).

import {
  resolveConfig,
  loadProjectRc,
  loadGlobalRc,
  getHomeDir,
  loadSessionState,
  saveSessionState,
} from '@honeybee-ai/hivemind-sdk/config';

import type { WglRcConfig, ResolvedConfig } from '@honeybee-ai/hivemind-sdk/config';

// Resolve all config sources (global rc + project rc + env vars + defaults)
const config: ResolvedConfig = resolveConfig(process.cwd());

Also exports constants (HONEYB_DIR, AUTH_FILE, SPECS_DIR, etc.), auth store helpers, session/brood state management, and log rotation utilities.

Platform client methods

The client returned by createHivemindClient() provides:

| Surface | Methods | |---------|---------| | Marketplace (specs) | searchSpecs, getSpec, downloadSpec, publishSpec, updateSpec, forkSpec, listMySpecs, deleteSpec, listReviews, createReview, deleteReview | | Marketplace (integrations) | searchIntegrations, getIntegration, downloadIntegration, publishIntegration, updateIntegration, deleteIntegration, listIntegrationReviews, createIntegrationReview, deleteIntegrationReview | | Colony | listHives, createHive, getHive, deleteHive, pauseHive, resumeHive, startHive, getHiveEvents, getHiveAgents, setProviderKey, setSecret, listSecrets, deleteSecret, listKeys, createKey, revokeKey | | Billing | getBalance, getTransactions, getRates, purchasePollen, estimateCost | | Carapace | scan, carapaceDashboard, carapaceUsage, carapaceBlocked, listCarapaceKeys, createCarapaceKey, deleteCarapaceKey | | Telemetry | telemetryOverview, telemetryTimeline, telemetryEvents | | Fleet | registerNode, heartbeatNode, listNodes, getNode, removeNode, drainNode | | Auth | getMe |

Auth

import {
  startDeviceFlow,
  pollDeviceFlow,
  exchangeGitHubToken,
  getActiveProfile,
  setProfile,
  listProfiles,
} from '@honeybee-ai/hivemind-sdk';

Device flow authenticates via GitHub OAuth. The CLI (wgl auth login) handles this interactively. The SDK exposes the primitives if you need to build your own auth flow.

License

MIT