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

@mubit-ai/sdk

v0.5.0

Published

Public unified Mubit SDK with one Client facade

Readme

@mubit-ai/sdk

Canonical JavaScript SDK for MuBit.

Install

npm install @mubit-ai/sdk

Quickstart

import { Client } from "@mubit-ai/sdk";

const client = new Client({
  transport: process.env.MUBIT_TRANSPORT ?? "auto",
  run_id: "sdk-js-demo",
  api_key: process.env.MUBIT_API_KEY,
});

await client.remember({
  session_id: "sdk-js-demo",
  agent_id: "sdk-quickstart",
  content: "Cache invalidation failures usually show up after stale token reuse.",
  intent: "lesson",
  lesson_type: "failure",
  lesson_scope: "session",
  metadata: { source: "readme" },
});

const answer = await client.recall({
  session_id: "sdk-js-demo",
  query: "What should I watch for before retrying auth?",
  entry_types: ["lesson", "rule"],
});
console.log(answer.final_answer, answer.evidence?.length ?? 0);

Surface Model

  • Low-level raw APIs remain available on client.auth.*, client.core.*, and client.control.*.
  • High-level helper APIs live on Client:
    • remember
    • recall
    • getContext
    • archive
    • archiveBlock
    • dereference
    • memoryHealth
    • diagnose
    • reflect
    • forget
    • checkpoint
    • registerAgent
    • listAgents
    • recordOutcome
    • surfaceStrategies
    • handoff
    • feedback
  • Helper APIs use session_id as the ergonomic alias for run_id.

MAS / Learning Loop Example

await client.registerAgent({
  session_id: "sdk-js-demo",
  agent_id: "planner",
  role: "planner",
  read_scopes: ["rule", "lesson", "fact"],
  write_scopes: ["lesson", "trace"],
  shared_memory_lanes: ["knowledge", "history"],
});

const checkpoint = await client.checkpoint({
  session_id: "sdk-js-demo",
  label: "pre-compaction-1",
  context_snapshot: "Planner has narrowed the failure to token refresh ordering.",
  metadata: { window: 1 },
});

const strategies = await client.surfaceStrategies({
  session_id: "sdk-js-demo",
  lesson_types: ["success", "failure"],
  max_strategies: 3,
});

console.log(checkpoint.checkpoint_id, strategies.strategies?.length ?? 0);

Exact References

const archived = await client.archive({
  session_id: "sdk-js-demo",
  artifact_kind: "patch_fragment",
  content: "--- a/query.py\n+++ b/query.py\n@@ ...",
  labels: ["django", "retry"],
  family: "patch-repair",
});

const exact = await client.dereference({
  session_id: "sdk-js-demo",
  reference_id: archived.reference_id,
});

console.log(exact.evidence?.content);

Endpoint Resolution

transport defaults to auto (gRPC primary, HTTP fallback).

Endpoint resolution order:

  • explicit endpoint / http_endpoint / grpc_endpoint config fields
  • env vars MUBIT_ENDPOINT, MUBIT_HTTP_ENDPOINT, MUBIT_GRPC_ENDPOINT
  • shared defaults https://api.mubit.ai and grpc.api.mubit.ai:443

Package Example Lanes

Public adoption scenarios are the primary learning path:

node sdk/javascript/mubit-sdk/examples/public/run_public_examples.mjs --list
node sdk/javascript/mubit-sdk/examples/public/run_public_examples.mjs --scenario 01_remember_recall
node sdk/javascript/mubit-sdk/examples/public/run_public_examples.mjs --scenario 10_full_learning_loop_smoke

Internal raw-smoke scenarios remain available for compatibility and wire-level verification:

node sdk/javascript/mubit-sdk/examples/internal/run_internal_examples.mjs --list
node sdk/javascript/mubit-sdk/examples/internal/run_internal_examples.mjs --scenario auth_lifecycle