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

glassbox-sdk

v1.0.2

Published

GlassBox SDK — capture, seal, anchor (Solana mainnet) & verify AI agent reasoning

Readme

glassbox-sdk

Capture, seal, anchor & verify AI agent reasoning on Solana.

Every decision an AI agent makes — every inference, tool call, retrieval and decision — is captured as a ReasoningStep, sealed into a SHA-256 Merkle tree, and the root is anchored on Solana mainnet via the SPL Memo program. The full trace lives off-chain; anyone can recompute the root byte-for-byte and check it against the on-chain anchor. Opaque agents become transparent, tamper-evident systems.

npm install glassbox-sdk

Quickstart

import { GlassBox } from 'glassbox-sdk';

const glass = new GlassBox({
  // a funded Solana keypair enables REAL mainnet anchoring
  solana: { secretKey: process.env.SOLANA_SECRET_KEY },
  agent: { name: 'Helios Vault Keeper' },
});

// 1. Capture a reasoning process
const trace = glass.startTrace('swap-analysis-001', {
  title: 'Evaluate SOL/USDC rebalance',
  category: 'DeFi',
});

trace.retrieval('Fetch SOL/USDC orderbook', { attributes: { source: 'jupiter-api' } });
trace.observation('Detect pool imbalance', { output: { skew: 0.023 } });
trace.decision('Select route', { action: 'swap', confidence: 0.87 });

// 2. Seal → SHA-256 Merkle root, 3. Anchor → real SPL Memo tx on Solana
const { merkleRoot } = await trace.seal();
const { signature, onChain } = await trace.anchor();

// 4. Verify — recompute the tree locally and compare to the anchor
const result = glass.verifyTrace(trace);   // result.match === true

Try it without writing code:

npx glassbox demo        # seal → anchor → verify
# set SOLANA_SECRET_KEY for a real mainnet anchor transaction

Real on Solana mainnet

With a funded Solana keypair the SDK builds an SPL Memo instruction carrying glassbox|v1|anchor|<taskId>|<merkleRoot>, signs it, broadcasts it to mainnet-beta, confirms it, and returns the transaction signature and slot. The Merkle root is permanently recorded in the immutable ledger and is independently verifiable forever. Without a key, traces are sealed and verified locally.

Instrument any framework

trace.track() wraps any async operation as a step — timing and ok/error are captured automatically. No framework lock-in.

const quote = await trace.track('TOOL_CALL', 'Jupiter quote', () =>
  jupiter.quote({ inputMint, outputMint, amount }),
);

const docs = await trace.track('RETRIEVAL', 'Vector search', () =>
  retriever.getRelevantDocuments(query),       // e.g. a LangChain retriever
);

// bring your own model — logged as an INFERENCE step
const glass = new GlassBox({
  inference: async ({ prompt }) => ({ text: await myModel(prompt) }),
});

Verification

// fully local — recompute the tree, compare to the anchor, no network
const result = glass.verifyTrace(trace);
result.match;        // true → computed root === anchored root
result.steps;        // per-step leaf recomputation

// single-step Merkle inclusion proof (no full trace needed)
const proof = glass.proveStep(trace, 2);
proof.valid;         // true

API

| Method | Description | |---|---| | new GlassBox(opts) | solana?, inference?, agent?, apiUrl?, storage? | | glass.startTrace(taskId, meta?) | begin a Trace | | trace.retrieval / toolCall / observation / decision / delegation | typed steps | | trace.track(type, label, fn, attrs?) | instrument any async op | | trace.infer(label, input) | run the configured model, log an INFERENCE step | | trace.seal() | assemble the Merkle tree → root | | trace.anchor({ onChain? }) | anchor the root (real mainnet tx with a keypair) | | glass.verifyTrace(trace) | recompute + compare locally | | glass.proveStep(trace, i) | Merkle inclusion proof for one step |

Step taxonomy

INFERENCE · TOOL_CALL · RETRIEVAL · DECISION · OBSERVATION · DELEGATION

Links

  • Live: https://glassboxsol.xyz
  • Source: https://github.com/960/glassbox-protocol

License

MIT