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

@verdictlayer/humanlatch-sdk

v0.1.0

Published

HumanLatch JavaScript SDK for proposing AI-driven capabilities to a HumanLatch control plane.

Downloads

16

Readme

HumanLatch JavaScript SDK

JavaScript/TypeScript SDK for sending AI-driven capability proposals to a HumanLatch control plane.

Use this SDK when your app, agent, robot controller, chatbot, or manufacturing system needs to ask:

  • Can I run this capability automatically?
  • Do I need a human approval first?
  • Is this blocked by policy?

The SDK works against either:

  • self-hosted HumanLatch CE
  • a remotely hosted HumanLatch API

Install

npm install @verdictlayer/humanlatch-sdk

This package is intended for npm publication as @verdictlayer/humanlatch-sdk.

Create a Client

import { HumanLatchClient } from "@verdictlayer/humanlatch-sdk";

const client = new HumanLatchClient({
  baseUrl: "https://your-humanlatch.example.com",
  workspaceId: "your-workspace-id",
  apiKey: process.env.HUMANLATCH_API_KEY,
});

Use token for user-authenticated flows or apiKey for agent/service integrations.

Core Flow

const result = await client.proposeAction({
  action_type: "support.refund.issue",
  target: "order-10428",
  summary: "Issue a refund above the autonomous threshold",
  payload: {
    amount: 850,
    currency: "USD",
    customer_id: "cust_2041",
  },
  context: {
    environment: "production",
    requested_by: "agent:support-bot",
    domain: "chatbot",
  },
});

if (client.isApproved(result)) {
  await issueRefund();
} else if (client.requiresApproval(result)) {
  const final = await client.waitForDecision(result.id, { intervalMs: 2000, timeoutMs: 30000 });
  if (client.isApproved(final)) {
    await issueRefund();
  }
} else if (client.isBlocked(result)) {
  throw new Error("Blocked by HumanLatch policy");
}

What You Send

Every proposed capability should include:

  • action_type: machine-readable capability name
  • target: thing being affected
  • summary: human-readable explanation
  • payload: structured execution details
  • context: environment, source, actor, and policy context

Domain Examples

Cloud / DevOps

await client.proposeAction({
  action_type: "aws.iam.policy_change",
  target: "prod-admin-role",
  summary: "Attach elevated access to a production IAM role",
  payload: {
    policy_arn: "arn:aws:iam::aws:policy/AdministratorAccess",
  },
  context: {
    environment: "production",
    requested_by: "agent:terraform-bot",
    domain: "cloud",
  },
});

Chatbot / Customer Operations

await client.proposeAction({
  action_type: "support.refund.issue",
  target: "order-10428",
  summary: "Issue a refund above the autonomous threshold",
  payload: {
    amount: 850,
    currency: "USD",
  },
  context: {
    environment: "production",
    requested_by: "agent:support-bot",
    domain: "chatbot",
  },
});

Robotics

await client.proposeAction({
  action_type: "robot.motion.execute",
  target: "cell-7-arm-a",
  summary: "Move a robot into a maintenance zone",
  payload: {
    command: "enter_maintenance_zone",
    speed: "reduced",
  },
  context: {
    environment: "factory",
    requested_by: "agent:cell-controller",
    domain: "robotics",
  },
});

Manufacturing

await client.proposeAction({
  action_type: "manufacturing.line.override",
  target: "line-3",
  summary: "Override a conveyor safety threshold",
  payload: {
    threshold: 0.92,
    duration_seconds: 180,
  },
  context: {
    environment: "production",
    requested_by: "agent:line-optimizer",
    domain: "manufacturing",
  },
});

Additional Methods

await client.listActions({ status: "pending_approval", limit: 50 });
await client.getAction("action-id");
await client.approveAction("action-id", { note: "Approved by supervisor" });
await client.rejectAction("action-id", "Unsafe during shift handoff");
await client.cancelAction("action-id");
await client.waitForDecision("action-id", { intervalMs: 2000, timeoutMs: 30000 });

Integration Model

HumanLatch is not tied to one domain.

Your app keeps its own UI, runtime, and execution engine. Before it performs a sensitive capability, it asks HumanLatch for a decision:

  • approved_auto: execute now
  • pending_approval: wait for human approval
  • blocked: do not execute

That same control plane works for:

  • infrastructure agents
  • support bots
  • warehouse robots
  • manufacturing lines
  • internal copilots