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

@mentiora-ai/loom-sdk

v0.13.4

Published

TypeScript client library for the loom browser-automation daemon

Readme

@mentiora-ai/loom-sdk

TypeScript client library for the loom browser-automation daemon.

Prerequisites

The SDK talks to a running loom-daemon over a Unix socket. Install loom (CLI + daemon + chromium pin) first via Homebrew, cargo install, or the install script — see the main README. Then start the daemon:

loom serve

Install

npm install @mentiora-ai/loom-sdk

Requires Node ≥ 20.

Quick start

import { Session } from "@mentiora-ai/loom-sdk";

const session = await Session.create();
try {
  const receipt = await session.navigate("https://example.com");
  console.log(receipt.action_hash);
} finally {
  await session.close();
}

What the SDK exposes

  • Session — session lifecycle (create / close / abort / kill / replay / inspect / validate / export).
  • Session.{navigate, click, typeText, select, hover, scroll, wait, evaluate, screenshot, snapshot} — every web action surface.
  • Admin RPCs: killSession(sessionId, ...) (force-terminate without a handle), daemonHealth({ deep?, signal? }) (operational snapshot).
  • Receipt + summary types in @mentiora-ai/loom-sdk/typesReceipt, SessionInfo, SessionInspection, DiffReport, ExportInfo, ValidationResult, GrantInfo, SchemaRegistry, LoomErrorCode, plus DaemonHealthResult, ShimDeepHealth, ShimBreakerSnapshot, ProbeStatus.
  • Typed errors: LoomError, LoomRPCError, LoomConnectionError, LoomTokenError, LoomAbortError.

Cancellation

LoomTransport.call(method, params, { signal }) accepts an AbortSignal. On abort, the transport fires a request.cancel envelope at the daemon and rejects the returned promise with LoomAbortError (name === "AbortError"). Compose with AbortSignal.timeout(ms) or your own controller:

import { LoomTransport, daemonHealth, LoomAbortError } from "@mentiora-ai/loom-sdk";

try {
  const health = await daemonHealth({
    deep: true,
    signal: AbortSignal.timeout(2_000),
  });
  console.log(health);
} catch (err) {
  if (err instanceof LoomAbortError) {
    console.log("aborted");
  } else {
    throw err;
  }
}

Connection details

Session.create() defaults work when a single user runs the daemon on their own machine. Override per-call if needed:

const session = await Session.create({
  socketPath: "/var/run/loom/loom.sock",  // custom daemon socket
  token: "...",                            // explicit HELLO-token
  profile: "standard",                     // or "safe", "full"
  networkMode: "live",                     // the only mode (see below)
  seed: 42,                                // determinism seed
});

Network mode: page traffic is always live

networkMode accepts exactly one value, "live" (the default). Page traffic is always fetched live from the network — loom records the manifest hash chain and per-request metadata, not page-network responses. Response bodies are never captured, so HAR exports contain request entries without bodies, and replay re-executes the recorded actions rather than serving recorded responses. Any other value ("recorded", "mixed", "replay") is rejected at Session.create() with invalid_network_mode.

License

Apache-2.0. See the main repository for details.