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

@meshsig/sdk

v0.1.1

Published

Cryptographic security layer for AI agents. Verify instruction origin before execution.

Downloads

21

Readme

@meshsig/sdk

Cryptographic security layer for AI agents. Verify instruction origin before execution.

npm install @meshsig/sdk

Why

In February 2026, a hacker exploited Cline's automated GitHub issue triage — a Claude-powered workflow — by injecting malicious instructions into an issue title. Claude executed them as if they were legitimate commands, poisoned the build cache, stole npm publish tokens, and silently installed malware on 4,000 developer machines.

The root cause: the agent had no way to distinguish a legitimate instruction from injected content.

MeshSig fixes this. Every instruction that an agent executes must carry a valid Ed25519 signature from a known did:msig: identity. No signature, no execution.

How It Works

Without MeshSig:
  Agent reads GitHub issue → Claude sees instruction → executes

With MeshSig:
  Agent reads GitHub issue → verify(instruction, signature, did) → no sig → blocked

Quick Start

import { generateIdentity, sign, verify, verifyWithDid } from '@meshsig/sdk';

// Generate an identity for your agent
const agent = await generateIdentity();
console.log(agent.did); // did:msig:3icqQkmJWby4S5rpaSRoCcKvjKWdTvqViy...

// Sign an instruction (trusted source only)
const signature = await sign('deploy to production', agent.privateKey);

// Before executing ANY instruction — verify origin
const trusted = await verifyWithDid('deploy to production', signature, agent.did);
if (!trusted) throw new Error('Instruction origin not verified — blocked');

Middleware Pattern

import { verifyWithDid, MeshError } from '@meshsig/sdk';

// Drop this before any tool call in your agent
async function safeExecute(instruction: string, signature: string, fromDid: string) {
  const trusted = await verifyWithDid(instruction, signature, fromDid);
  if (!trusted) throw new MeshError('Untrusted instruction', 'INVALID_SIGNATURE', 401);
  // safe to execute
}

Handshake Between Agents

import {
  createHandshakeRequest,
  verifyHandshakeRequest,
  createHandshakeResponse,
} from '@meshsig/sdk';

// Agent A initiates
const request = await createHandshakeRequest(
  agentA.did, agentB.did, agentA.privateKey, ['execute:task']
);

// Agent B verifies and responds
await verifyHandshakeRequest(request, agentB.publicKey);
const response = await createHandshakeResponse(
  request, agentB.did, agentB.privateKey, true, ['execute:task'], channelId
);

Works With Any Framework

// LangChain, CrewAI, AutoGen, OpenClaw, or any agent system
import { verifyWithDid } from '@meshsig/sdk';

// Wrap your tool executor
const originalExecute = agent.execute.bind(agent);
agent.execute = async (instruction, meta) => {
  if (meta?.signature && meta?.fromDid) {
    const ok = await verifyWithDid(instruction, meta.signature, meta.fromDid);
    if (!ok) throw new Error('Blocked: unverified instruction origin');
  }
  return originalExecute(instruction, meta);
};

API

Identity

  • generateIdentity()AgentIdentity — Ed25519 keypair + did:msig: DID
  • isValidDid(did)boolean
  • didToPublicKey(did)Uint8Array

Signing & Verification

  • sign(message, privateKey)signature
  • verify(message, signature, publicKey)boolean
  • verifyWithDid(message, signature, did)boolean
  • hashPayload(payload)hex
  • generateNonce()string

Handshake

  • createHandshakeRequest(fromDid, toDid, privateKey, permissions)
  • verifyHandshakeRequest(request, publicKey)
  • createHandshakeResponse(request, did, privateKey, accepted, permissions, channelId)
  • verifyHandshakeResponse(response, request, publicKey)

Security Utilities

  • RateLimiter — per-IP rate limiting
  • ReplayGuard — prevent signature replay attacks
  • validateAgentName(name) — sanitize agent names
  • validateCapabilities(caps) — sanitize capability lists

Full Server

Need the full MeshSig server with dashboard, audit log, and MCP support?

npm install -g meshsig
meshsig start

github.com/carlostroy/meshsig

License

MIT