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

@drvibeai/phi-guard

v0.1.0

Published

Agent PHI-minimization toolkit: a BAA compliance gate + local redact/rehydrate so patient identifiers never reach a non-BAA model. Risk reduction, NOT certified de-identification.

Downloads

166

Readme

@drvibeai/phi-guard

A tiny, dependency-free toolkit that lets an agent manage PHI posture instead of just disclaiming it. Three functions:

  • complianceGate({ deployment }) — decide the operating mode from the host AI's BAA status: full (BAA-covered) or minimized (not / unknown), with guidance and a route to compliance review.
  • redact({ record, text }) — tokenize direct identifiers (name, email, phone, DOB, address, MRN, SSN) locally; scrub emails/phones from free text. Returns the redacted data plus a map (token → real value) you keep on the user's machine.
  • rehydrate({ text, map }) — restore the real identifiers into the approved draft, locally, right before a human sends it.

The model reasons over [NAME-1]; the real value never leaves the device.

Honest about what this is. This minimizes direct identifiers (best-effort). It is not certified HIPAA Safe-Harbor de-identification — free text can hide identifiers and quasi-identifiers (city/ZIP, rare conditions) may remain. The compliant path for real PHI is a BAA-covered deployment. A human must review redacted output. See the repo DISCLAIMER.

Install

npm install @drvibeai/phi-guard

Use

import { complianceGate, redact, rehydrate } from "@drvibeai/phi-guard";

// 1) Gate first.
const gate = complianceGate({ deployment: { baa_covered: false, vendor: "ChatGPT (free)" } });
// gate.mode === "minimized"  -> redact before the model sees anything

// 2) Redact locally; keep the map on-device.
const { redacted, map } = redact({
  record: { full_name: "Jane Doe", contact_email: "[email protected]", reason_for_visit: "follow up" },
});
// redacted.full_name === "[NAME-1]"   (map["[NAME-1]"] === "Jane Doe")

// 3) The model drafts with tokens; a human approves; rehydrate locally before sending.
const sent = rehydrate({ text: "Hi [NAME-1], reach you at [EMAIL-1]?", map });
// sent.text === "Hi Jane Doe, reach you at [email protected]?"

Why

Patient-facing agent work is inherently identified — you can't "de-identify and still follow up." phi-guard lets the reasoning happen over de-identified text while identifiers stay local, and routes naive users toward a BAA-covered deployment when they need real PHI. It's the reusable pattern behind DrVibe's patient-facing skills.

Test

npm test   # offline, deterministic

Apache-2.0 © DrVibe.ai