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

@rayspec/file-runtime

v1.7.0

Published

The generic Tier-B file-ingest capability (file_input) — a bounded raw-byte upload plus a JSON submit that seals the file and emits a durable workflow trigger. Product-neutral; a record×audio hybrid (record_input donates the manifest/event/submit template

Downloads

904

Readme

@rayspec/file-runtime

The generic Tier-B file-ingest capability (file_input): one bounded raw-byte PUT /files/{file_id} upload (a {kind:'stream', mode:'ingest'} route) plus one POST /files/{file_id}/submit that seals the bytes and emits the file_input.file_submitted workflow trigger event. Product-neutral by law — the file content is arbitrary product DATA (never instructions — the trust boundary); this package carries zero product vocabulary.

A record×audio HYBRID by design: @rayspec/record-runtime donates the manifest/event/submit template (JSON side); @rayspec/audio-runtime donates the stream-route byte transport — but the upload core is designed, not mirrored: never the audio path's unbounded arrayBuffer().

The byte bound

  • Content-Length pre-check — absent / non-numeric / chunked / over-cap declared lengths are a 413 BEFORE any body byte is read (the api-auth OIDC-cap pattern).
  • Drain-time enforcement — the body is read chunk-wise with a running count; crossing the cap cancels the read (a lying Content-Length buys at most cap + one chunk of memory). sha256 is computed in the same pass.
  • Default cap 25 MiB (DEFAULT_MAX_FILE_BYTES); v1 content-type allowlist text/plain · text/markdown · text/csv · application/json · application/pdf — both deployment-overridable (FileCapabilityConfig), construction-validated fail-closed.

The state machine (upload → submit)

PUT bytes → pointer row (uploaded) → submit seals (submitted) + emits the event. Idempotency is sha256 over the raw bytes: identical re-upload/re-submit → deduped (ONE durable run — idempotency via the file_id:<id> enqueue key); divergent re-upload pre-seal → last-write-wins; divergent anything post-seal → loud 409 with the stored-event heal (best-effort; the cross-tenant FileEventRejectedError family stays fail-closed → 403). Blob keys are content-addressed (files/<file_id>/<sha256>, server-derived only — the client filename is a DATA column, NEVER a key/path component).

Composition

mountFileCapability({ fileSubmittedSink }) returns the {stores, api, handlers} fragments a deployment merges (ADDITIVE only — no platform file changes). The workflow seam is @rayspec/file-workflow-bridge, wired into compose/product-boot behind the neutrality gate; the durable file_input.parse_text node extracts text.