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

@openagentry/adapter-storage-r2

v0.1.0-alpha.0

Published

OpenAgentry StorageAdapter implementation for Cloudflare R2 (S3-compatible API)

Readme

@openagentry/adapter-storage-r2

Version License

StorageAdapter implementation for OpenAgentry, backed by Cloudflare R2 via the S3-compatible API.

Why R2?

  • No egress fees. Read it from anywhere — workers, browsers, agents — without per-byte charges.
  • S3-compatible. SigV4, ListObjectsV2, presigned URLs all work out of the box.
  • Pairs natively with Cloudflare Workers. Same account; same network; cheap and fast.

Install

pnpm add @openagentry/adapter-storage-r2

Usage

See LLM.md for the complete reference. Quick start:

import storage from '@openagentry/adapter-storage-r2';

await storage.put('reports/2026-q1.pdf', pdfBuffer);
const obj = await storage.get('reports/2026-q1.pdf');
await storage.delete('reports/2026-q1.pdf');

Configuration

Required env vars: OA_R2_ACCOUNT_ID, OA_R2_ACCESS_KEY_ID, OA_R2_SECRET_ACCESS_KEY, OA_R2_BUCKET.

Optional: OA_R2_PUBLIC_BASE_URL, OA_R2_PRESIGN_TTL, OA_R2_ENDPOINT.

For a non-default config, use createR2StorageAdapter(input) directly.

URL strategy

  • put(key, body, { public: true }) — returns a stable URL via publicBaseUrl.
  • put(key, body) — returns a transient SigV4-presigned GET URL (default 1h TTL).

The public flag round-trips through custom metadata (x-amz-meta-oa-public: 1), so get() returns the same URL flavor the object was uploaded with.

Limits

This v0 alpha ships single-PUT uploads only (max ~5 GB). Multipart, streaming, range reads, and Workers binding integration are deferred.

Troubleshooting

  • 403 on every request — verify the access key is scoped to the bucket with Object Read & Write.
  • E_R2_PUBLIC_NOT_CONFIGURED — set publicBaseUrl in config or OA_R2_PUBLIC_BASE_URL env var.
  • Presigned URLs return 403 — most often clock skew. Confirm system time is accurate.
  • Local development — run pnpm test to exercise the adapter against a MinIO container; no real R2 credentials needed.

License

Apache-2.0.