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

rais-compliance

v1.0.1

Published

RAIS Protocol v1 compliance test runner

Readme

rais-compliance

CLI compliance test runner for the RAIS Protocol v1.

Verify that any AI streaming server is RAIS-compliant in seconds.

npm RAIS v1

Usage

npx rais-compliance http://localhost:3000/api/chat

No server yet? Start the built-in mock server:

# Terminal 1
npx rais-compliance serve

# Terminal 2
npx rais-compliance http://localhost:3001/api/chat

Example output

RAIS Protocol v1 Compliance Test
Endpoint: http://localhost:3000/api/chat

  MUST (normative)
    headers.content-type      ✓  Content-Type is text/event-stream
    headers.cache-control     ✓  Cache-Control: no-cache present
    events.format             ✓  All 11 data lines are valid JSON
    events.text-type          ✓  All 10 text events have a "text" string field
    events.done               ✓  Exactly one done event, last in stream
    events.no-after-done      ✓  No events emitted after done
    events.has-text-tokens    ✓  Received 10 text token(s)

  SHOULD (recommended)
    headers.accel-buffering   ✓  X-Accel-Buffering: no present (nginx proxy-safe)
    events.sse-id             ✓  11 event(s) have id: fields (reconnect-safe)

  ABORT (resilience)
    abort.clean               ✓  AbortError thrown cleanly

✓  All 10 tests passed

  RAIS v1 Recommended ✓

Mock server scenarios

npx rais-compliance serve --scenario normal   # default
npx rais-compliance serve --scenario slow     # 200ms between tokens
npx rais-compliance serve --scenario error    # stream ends with error event
npx rais-compliance serve --scenario chunked  # split SSE packets
npx rais-compliance serve --scenario malformed
npx rais-compliance serve --scenario no-done

npx rais-compliance serve --port 4000         # custom port

Compliance checks

| Check | Level | What it verifies | |---|---|---| | headers.content-type | MUST | Content-Type: text/event-stream | | headers.cache-control | MUST | Cache-Control: no-cache | | events.format | MUST | All data: lines are valid JSON | | events.text-type | MUST | Text events have a text string field | | events.done | MUST | One done event, last in stream | | events.no-after-done | MUST | No events after done | | events.has-text-tokens | MUST | At least one text token received | | headers.accel-buffering | SHOULD | X-Accel-Buffering: no for nginx | | events.sse-id | SHOULD | id: fields on events | | abort.clean | MUST | Client abort handled cleanly |

Certification tiers

| Result | Badge | |---|---| | All 7 MUST pass | RAIS v1 Core | | All MUST + SHOULD pass | RAIS v1 Recommended |

Add the badge to your README:

![RAIS v1 Recommended](https://img.shields.io/badge/RAIS-v1%20Recommended-22c55e)

License

MIT — part of react-ai-stream