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

@regain/hermes

v2.0.0

Published

TypeScript types, validation, and utilities for the Hermes clinical supervision protocol

Readme

Regain Hermes™

The industry-standard protocol for safe, auditable, and traceable clinical AI supervision.

CI npm version License

Overview

Regain Hermes™ is a protocol for clinical AI supervision. It defines the Epistemological Contract required for safe communication between reasoning agents (the "Brain") and independent supervision systems (the "Shield").

By standardizing how AI systems propose interventions, provide evidence, and measure uncertainty, Hermes enables a modular ecosystem of trusted clinical AI that is regulatory-ready from day one.

Read our Project Vision to learn how we are building the "Grammar of Safety."

Package Features

This package provides the reference implementation of the Hermes protocol:

  • TypeScript Types - Complete type definitions for all Hermes messages.
  • JSON Schema Validation - Runtime validation for inter-agent communication.
  • Epistemology Utilities - Hard2Vary™ (HTV) scoring, uncertainty calibration, and evidence grading.
  • Audit Tooling - Standardized formats for regulatory-grade, de-identified audit exports.
  • Test Fixtures - A comprehensive library of clinical scenarios for unit testing.

Project Status: Public Alpha

Regain Hermes™ is currently in Public Alpha. The core protocol schemas and validation logic are stable for early adoption, but the broader commercial ecosystem (Certification and Managed Services) is currently under development.

Installation

# npm
npm install @regain/hermes

Certification (Roadmap 2026)

To ensure future ecosystem trust, we are developing a Certification Program with three proposed tiers:

  • Hermes Compatible (Free) - Automated conformance.
  • Hermes Certified (Paid) - Technical review & support.
  • Hermes Certified Clinical (Paid) - Full clinical audit & regulatory readiness.

If you are interested in becoming a launch partner for the certification program, please contact [email protected].

Enterprise & Managed Services (Coming Soon)

For organizations that prefer a fully managed solution, Regain, Inc. is developing hosted supervision infrastructure:

  • Regain Popper™ Cloud - Managed policy engine with deterministic safety gates and audit logging.
  • Enterprise Support - SLA-backed support for mission-critical clinical deployments.
  • Regulatory Packages - Pre-configured compliance documentation for FDA, HIPAA, and IMDRF.

These services are currently in development. Contact [email protected] to join the early access waitlist.

Documentation

For Developers

Project Governance

Quick Start

Validate Messages

import { validateHermesMessage, parseHermesMessage } from '@regain/hermes';

// Option 1: Check validity without throwing
const result = validateHermesMessage(payload);
if (!result.valid) {
  console.error('Validation errors:', result.errors);
}

// Option 2: Parse with type safety (throws on failure)
const request = parseHermesMessage(payload);
console.log(`Trace: ${request.trace.trace_id}`);

Compute Epistemic Scores

import { computeHTVScore, getHTVQualityLevel } from '@regain/hermes';

const score = computeHTVScore({
  interdependence: 0.9,
  specificity: 0.85,
  parsimony: 0.8,
  falsifiability: 0.9,
});

console.log(score.composite);  // 0.8625
console.log(getHTVQualityLevel(score.composite));  // 'good'

Type Guard Pattern

import { isValidHermesMessage, type SupervisionRequest } from '@regain/hermes';

if (isValidHermesMessage(payload)) {
  // TypeScript knows payload is HermesMessage
  if (payload.message_type === 'supervision_request') {
    handleRequest(payload as SupervisionRequest);
  }
}

API Summary

Validation

| Function | Description | |----------|-------------| | validateHermesMessage(msg) | Validate against JSON Schema, returns { valid, errors } | | parseHermesMessage(msg) | Validate and parse, throws HermesValidationError on failure | | isValidHermesMessage(msg) | Type guard for Hermes messages |

Epistemology Utilities

| Function | Description | |----------|-------------| | computeHTVScore(dims, weights?) | Calculate Hard2Vary™ composite score (0.0-1.0) | | meetsHTVThreshold(score, threshold?) | Check if score meets minimum threshold | | getHTVQualityLevel(score) | Get quality level: 'excellent', 'good', 'moderate', 'poor', 'refuted' | | computeUncertainty(inputs) | Calculate calibrated uncertainty with drivers | | isUncertaintyAcceptable(unc, maxLevel?) | Check if uncertainty is acceptable | | compareEvidenceGrades(a, b) | Compare evidence strength (negative if a stronger) |

Builders

| Function | Description | |----------|-------------| | htvScore() | Fluent builder for HTV scores | | createFalsificationCriteria(...) | Create falsification criteria for claims | | createUniformHTVScore(value) | Create HTV with all dimensions equal |

See API Reference for complete documentation including constants, types, and examples.


Contributing

Contributions are welcome! Please read our contributing guidelines and governance model before submitting pull requests.

Trademarks

"Regain Hermes™", "Regain Popper™", "Popper™", "Regain Deutsch™", and "Hard2Vary™" are trademarks of Regain, Inc. See our Trademark Policy for usage guidelines.

Links


Regain Hermes™, Regain Deutsch™, Regain Popper™, Popper™, and Hard2Vary™ are trademarks of Regain, Inc. All rights reserved.