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

proviso-sdk

v0.1.0

Published

Give your AI agent a spending policy it cannot break.

Downloads

124

Readme

proviso-sdk

Give your AI agent a spending policy it cannot break.

Proviso is a payment layer an agent spends through. Every spend is bounded by an on-chain policy the owner sets - budget cap, per-transaction max, velocity limit, allowed merchants, kill switch - enforced on Stellar so the agent physically cannot spend outside it.

This package is the client. It is non-custodial by construction: the only way it can turn an unsigned transaction into a spendable one is ProvisoClient.cosign(), which asks the co-signer service to check the policy and add Proviso's signature. The service holds Proviso's key; this client never does. Proviso's signature is weight 1 against a threshold of 2, so even a co-signature cannot move funds without the agent's own signature. Neither side spends alone.

Install

npm install proviso-sdk

Use

import { ProvisoClient, purchase } from "proviso-sdk";
import { Keypair, Networks } from "@stellar/stellar-sdk";

const client = new ProvisoClient({
  baseUrl: process.env.PROVISO_COSIGNER_URL!,
  token: process.env.PROVISO_AGENT_TOKEN!,
});

// See the room before spending.
const policy = await client.policy();

// Pay a quote (from a site skill). Dry run by default; arm to actually pay.
const result = await purchase({
  client,
  quote,                                  // { destination, memo, memoType, amountStroops, network, ... }
  agentKp: Keypair.fromSecret(process.env.PROVISO_AGENT_SECRET!),
  sourceAccountId: process.env.PROVISO_ACCOUNT_ID!,
  horizonUrl: "https://horizon-testnet.stellar.org",
  networkPassphrase: Networks.TESTNET,
  maxAmountStroops: 20_0000000n,
  expectedMemoType: "text",
  arm: false,                             // true to actually pay
});

If the co-signer refuses, result is { ok: false, reason } with the policy reason (over budget cap, over per-transaction max, over velocity limit, destination not allowed, policy paused). A refusal is the policy working; do not retry to sneak under a limit.

MCP

The package ships an MCP server so any MCP-speaking agent (Claude Code, Cursor, ...) can use Proviso as tools (proviso_policy, proviso_purchase). Configure it from the environment:

{
  "mcpServers": {
    "proviso": {
      "command": "proviso-mcp",
      "env": {
        "PROVISO_COSIGNER_URL": "http://localhost:8787",
        "PROVISO_AGENT_TOKEN": "...",
        "PROVISO_AGENT_SECRET": "S...",
        "PROVISO_ACCOUNT_ID": "G...",
        "PROVISO_NETWORK": "testnet"
      }
    }
  }
}

Config comes from the environment, never from tool arguments, so an agent cannot point itself at a different co-signer or swap its signing key mid-conversation.

Networks

Defaults to Stellar testnet. Mainnet is opt-in via PROVISO_NETWORK=public.