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

@heossihq/bee

v0.1.9

Published

Bee by HEOSSI - The Progressive Quantum-Native Intelligence Engine

Readme

@heossihq/bee

Official TypeScript / JavaScript SDK for Bee by HEOSSI - The Progressive Quantum-Native Intelligence Engine.

npm License: Apache-2.0

Bee exposes an OpenAI-compatible /chat/completions surface backed by a domain-specialised LoRA-routed model ladder - Cell, Brood, Comb, Buzz, Hive, Swarm, Enclave. This SDK is the typed entry point.

  • ✅ Pure ESM, zero runtime dependencies
  • ✅ Native fetch (Node 18+, Deno, Bun, every browser)
  • ✅ Streaming via async iterator
  • ✅ Multimodal content (text + image_url) on Hive / Swarm / Enclave
  • ✅ Structured errors (BeeActionRequiredError, BeeAuthError, BeeRateLimitError, BeeTimeoutError)

Install

npm install @heossihq/bee
# or pnpm add @heossihq/bee
# or yarn add @heossihq/bee

Quickstart

Get an API key from workspace.bee.heossi.com/account/api-keys. The default API base is https://api.bee.heossi.com/bee.

import { BeeClient } from "@heossihq/bee";

const bee = new BeeClient({ apiKey: process.env.BEE_API_KEY! });

const out = await bee.chat.completions.create({
  model: "bee-cell",
  domain: "cryptography_pqc", // optional; omit for governed automatic routing
  messages: [
    { role: "system", content: "You are a precise assistant." },
    { role: "user", content: "Summarise the SOLID principles in 2 lines." },
  ],
});

console.log(out.choices[0].message.content);

domain is typed to Bee's customer-selectable Tier-1 specialist families. Higher-tier Stage-0 families are not advertised by the SDK until they pass promotion, safety, latency and customer-path serving gates.

Streaming

const stream = await bee.chat.completions.create({
  model: "bee-cell",
  messages: [{ role: "user", content: "Write a short haiku about bees." }],
  stream: true,
});

for await (const chunk of stream) {
  process.stdout.write(chunk.choices[0]?.delta?.content ?? "");
}

Vision (Hive / Swarm / Enclave tiers)

const out = await bee.chat.completions.create({
  model: "bee-hive",
  messages: [
    {
      role: "user",
      content: [
        { type: "text", text: "What is in this image?" },
        {
          type: "image_url",
          image_url: { url: "https://example.com/photo.jpg" },
        },
      ],
    },
  ],
});

Quantum Reasoning Lab

Quantum work is a durable product job, not a chat-completion body option. Use quantumLocalSelect for customer-local CPU/GPU simulation, executeByopaDirect for a customer-owned provider adapter, or bee.quantumReasoning.create(...) for an entitled hosted product.

Durable Lab jobs require an explicit product: simulation_cloud or managed_qpu. local_simulator and byopa_direct run in the customer's own environment and are intentionally rejected by Bee's hosted job endpoint. byopa_managed remains unavailable until a provider-specific managed adapter passes its production activation gate.

For durable, inspectable runs, use the Quantum Reasoning Lab job resource:

const job = await bee.quantumReasoning.jobs.create({
  prompt: "Compare two fault-tolerant designs.",
  model: "bee-hive",
  product: "simulation_cloud",
});

const detail = await bee.quantumReasoning.jobs.wait(job.id, {
  timeout_ms: 15 * 60_000,
});
console.log(detail.status, detail.candidates, detail.inference_receipt_id);

Pass a stable idempotency_key when your application may retry creation. Reusing that key with different input returns 409; reusing it with the same input returns the original job. jobs.list({ cursor, limit, status, model }) supports cursor pagination. Automatic execution retry is deliberately unavailable; ambiguous work must be reconciled. jobs.remove(id) cancels eligible queued work or erases the content of a terminal job, subject to workspace role controls.

Jobs are tenant-scoped, encrypted at rest, and retained for 90 days. Real-QPU runs remain explicitly metered and may report a visible classical fallback.

List models

const { data } = await bee.models.list();
for (const m of data) console.log(m.id);

Self-hosted Bee Enclave

Override baseURL to point at your on-prem deployment:

const bee = new BeeClient({
  apiKey: process.env.BEE_API_KEY!,
  baseURL: "https://bee.your-company.example/bee",
});

Error handling

import {
  BeeActionRequiredError,
  BeeAuthError,
  BeeRateLimitError,
  BeeTimeoutError,
} from "@heossihq/bee";

try {
  await bee.chat.completions.create({ messages: [{ role: "user", content: "Hi" }] });
} catch (err) {
  if (err instanceof BeeActionRequiredError) {
    console.warn(err.decision.reason, err.decision.actions);
  } else if (err instanceof BeeRateLimitError) {
    console.warn(`Rate-limited. Retry after ${err.retryAfterSeconds}s`);
  } else if (err instanceof BeeAuthError) {
    console.error("Bad API key or plan does not grant this tier");
  } else if (err instanceof BeeTimeoutError) {
    console.error("Request timed out");
  } else {
    throw err;
  }
}

OpenAI SDK compatibility

Because Bee speaks the OpenAI Chat Completions wire format, you can also point the official openai package at Bee directly - useful for migration:

import OpenAI from "openai";

const bee = new OpenAI({
  apiKey: process.env.BEE_API_KEY,
  baseURL: "https://api.bee.heossi.com/bee",
});

@heossihq/bee is the lighter, dependency-free option when you don't need the full OpenAI SDK surface.

Other surfaces

License

Apache-2.0 - © HEOSSI (Pte.) Ltd.