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

@bursar/toolset

v0.1.0

Published

Bursar mandate tools for agent frameworks: inspect, quote, pay and settlements, strings in and out.

Readme

@bursar/toolset

Four tools over one Bursar mandate, for any agent framework: inspect, quote, pay and settlements. Strings in, strings out. The adapters @bursar/agentkit, @bursar/langchain, @bursar/openai-agents and @bursar/ai-sdk wrap this package; use it directly for a framework that has no adapter yet.

A mandate is a contract on Robinhood Chain that holds USDG and the limits an agent spends inside: per call, per day, per month, which providers, which capabilities, and the amount above which a person has to sign. The tools read and spend through @bursar/sdk, and every refusal comes back as a sentence that names the limit.

Install

npm install @bursar/toolset

Node 22 or newer. ESM only.

Use

import { createToolset, usdg } from '@bursar/toolset';

const toolset = createToolset({
  mandate: '0x8605853aC6A64dA11F4ED0Ff0Ad128961Cc3cd5c',
  account: process.env.BURSAR_AGENT_KEY,        // the mandate's agent key, or any viem account
  spendCap: { total: usdg('5') },               // this agent's own ceiling, on top of the mandate
});

for (const tool of toolset.tools()) console.log(tool.name, tool.parameters.map((p) => p.name));

console.log(await toolset.inspect());
console.log(await toolset.pay({ provider, capability: 'gpu.render:1', amount: '250000', input: 'render a koi' }));

toolsetFromEnv() reads the same from BURSAR_MANDATE, BURSAR_AGENT_KEY (or BURSAR_KEYSTORE with BURSAR_KEYSTORE_PASSWORD_FILE, the format cast wallet import writes), BURSAR_RPC and BURSAR_SPEND_CAP. Without a key the toolset reads and quotes but cannot pay.

The tools

| Tool | Arguments | What it does | | --- | --- | --- | | bursar_inspect | none | The limits, what is left in each window, the balance, the escrow floor, this agent's cap. Nothing is spent. | | bursar_quote | provider, capability, amount | What the mandate would decide, and which limit stops it. Nothing moves. | | bursar_pay | provider, capability, amount, input?, deliverWithinSeconds? | Quotes first, then locks the amount in escrow for the provider. The reply carries the settlement id and the transaction. | | bursar_settlements | settlementId? | This agent's payments, newest first, with where each stands on the escrow. Or one by id. |

Amounts are USDG in six-decimal units as digit strings: "250000" is 0.25 USDG. A decimal point is refused with the fix in the answer. input is committed with the payment, so both sides can prove what was asked.

spendCap is per toolset instance, which is per agent: perCall and total, in micro-USD via usdg('0.50'). It is checked before the chain is asked, and refunds are not credited back to it. The mandate's own limits are enforced by the contract whatever this cap says.

jsonSchemaFor(tool) gives a tool's arguments as JSON Schema, which is how the adapters hand them to each framework.