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

@render-lab/media-contract

v0.2.0

Published

Registration-free bounded media handoff contract shared by Render task packs: JSON-safe media sources, destinations, results, and validation.

Downloads

114

Readme

@render-lab/media-contract

⚠️ Experimental: proof of concept. This package is part of the Render Tasks POC and is published for testing only. It is not fully tested or production ready. Task names, inputs, outputs, and behavior can change or break in any release. Pin exact versions and expect breaking changes.

The bounded media handoff contract shared by Render task packs. It is a registration-free contract library: it defines no tasks, never calls task(), holds no vendor SDK or credentials, and makes no network calls. See ADR-0022.

Why it exists

Voice, image, and video vendors exchange binary artifacts. A workflow argument or result cannot exceed the 4 MB platform limit, and copying media shapes into each vendor pack would let them drift apart and break composition. This package owns one JSON-safe vocabulary so a Replicate output URL, an ElevenLabs narration, and a Cloudinary upload all describe media the same way.

Generic byte-limit mechanism lives in @render-lab/tasks-core. This package layers media-specific policy on top: the 1 MiB inline cap and the URL / signed-PUT default handoff.

The handoff

  • URL sources and signed PUT destinations are the default. Large media never enters a task boundary as bytes.
  • Data URIs and base64 results are allowed only up to MAX_INLINE_MEDIA_BYTES (1,048,576 bytes) decoded. Anything larger must use a URL result or a signed PUT destination.
  • Every transfer has an explicit byte limit. A task rejects an oversized source or result rather than truncating binary.

MediaSource describes task input only. Task results use MediaResult, so an expired output URL can never be mistaken for a reusable input. MediaDestination.reference is a caller-chosen, nonsecret identifier such as a storage key; uploaded results echo that reference and never the signed URL.

Exports

Constants: MAX_INLINE_MEDIA_BYTES, DEFAULT_TRANSFER_MAX_BYTES.

Types: MediaSource (UrlMediaSource | DataUriMediaSource), MediaDestination, MediaMetadata, MediaResult (UrlMediaResult | Base64MediaResult | UploadedMediaResult).

Validators: assertMediaSource, assertMediaDestination, assertInlineByteCount.

Adding a variant

Adding a new source or destination variant is a contract change: update ADR-0022 and add exhaustive handling in every consuming pack.