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

vouch-guard

v1.0.0

Published

Governance guard for Claude Managed Agents. Evaluates every tool call before execution. ACCEPTED flows. RESTRICTED steers. BLOCKED stops.

Readme

vouch-guard

Governance guard for Claude Managed Agents. Evaluates every tool call before execution.

ACCEPTED flows. RESTRICTED steers. BLOCKED stops.

Install

npm install vouch-guard

Quick Start

import Anthropic from "@anthropic-ai/sdk";
import { guardSession } from "vouch-guard";

const client = new Anthropic();

// Create agent and session (see Anthropic docs)
const session = await client.beta.sessions.create({ agent: agentId, environment_id: envId });

// Send the task
await client.beta.sessions.events.send(session.id, {
    events: [{ type: "user.message", content: [{ type: "text", text: "Deploy the latest build" }] }],
});

// Guard the session — every tool call evaluated by Vouch
const audit = await guardSession(client, session.id, {
    apiKey: process.env.VOUCH_API_KEY,
    onVerdict: (v) => console.log(`${v.tool}: ${v.verdict} (${v.duration_ms}ms)`),
});

console.log(`Session complete. ${audit.governed} calls governed, ${audit.blocked} blocked.`);

Two Patterns

Pattern 1: Event Monitor (built-in tools)

Guard built-in tools (bash, write, edit, web_fetch). Governance is reactive — the tool may start executing before the verdict arrives. If RESTRICTED or BLOCKED, the guard steers the agent away from repeating the action.

const audit = await guardSession(client, sessionId, {
    apiKey: process.env.VOUCH_API_KEY,
});

Pattern 2: Custom Tool Wrapper (full prevention)

Replace built-in tools with governed custom tools. The tool does NOT execute until Vouch clears it.

import { guardSession, GOVERNED_TOOL_DEFINITIONS } from "vouch-guard";

// Create agent with governed tools instead of built-ins
const agent = await client.beta.agents.create({
    name: "Governed Assistant",
    model: "claude-sonnet-4-6",
    tools: [
        {
            type: "agent_toolset_20260401",
            default_config: { enabled: false },
            configs: [
                { name: "read", enabled: true },
                { name: "glob", enabled: true },
                { name: "grep", enabled: true },
            ],
        },
        ...GOVERNED_TOOL_DEFINITIONS,
    ],
});

// Guard with a tool executor
const audit = await guardSession(client, sessionId, {
    apiKey: process.env.VOUCH_API_KEY,
    executeTool: async (name, input) => {
        // Your execution logic here
        if (name === "governed_bash") {
            return execSync(input.command).toString();
        }
    },
});

API

guardSession(client, sessionId, options)

Guards a managed agent session. Returns an audit summary when the session goes idle.

Options:

| Option | Type | Required | Description | |--------|------|----------|-------------| | apiKey | string | Yes | Vouch API key | | apiUrl | string | No | Vouch API URL (default: vouch.atlaswithiris.com) | | policy | object | No | Custom governance policy | | onVerdict | function | No | Callback on each verdict | | onError | function | No | Callback on Vouch errors | | executeTool | function | No | Handler for custom tool execution (Pattern 2) | | failOpen | boolean | No | Fail open if Vouch unreachable (default: true) |

Returns: Audit summary object.

extractPlan(name, input)

Convert a tool call into a Vouch plan description.

GOVERNED_TOOL_DEFINITIONS

Pre-built custom tool definitions for governed_bash, governed_write, governed_edit, governed_fetch. Spread into your agent's tools array.

VouchClient

Thin API client for POST /api/v1/vouch.

License

MIT