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

@rn-ai/openmed

v0.2.0

Published

OpenMed clinical analysis and AI SDK prompt-sanitizing middleware for React Native

Readme

@rn-ai/openmed

OpenMed 1.9.1 clinical NER, PII extraction, de-identification, and AI SDK 7 prompt middleware. This is deliberately not a language-model provider.

Native installation

The package links OpenMed through a Nitro module. Bun applications must list @rn-ai/openmed in trustedDependencies, or run bunx rn-ai install-native before CocoaPods/Gradle configuration. Published native artifacts are SHA-256 verified by the installer; maintainers build the pinned upstream v1.9.1 tag locally with scripts/build-ios-xcframework.sh and the upstream Android Gradle project.

No model weights are included. Runtime download into the app-private cache is the recommended delivery path on both iOS and Android. A local/bundled path remains available for development or managed distributions, but a normal app should not ask the user to locate an OpenMed model folder.

Model layout

  • Android uses ONNX. The model directory must contain model_int8.onnx, model_fp16.onnx, or model.onnx for the corresponding variant; int8 is the memory-first default. id2LabelPath can override the label map.
  • iOS supports mlx model directories and coreml model files. Core ML requires id2LabelPath; tokenizer name/folder and maxSequenceLength are configurable. The iOS default is MLX.

Download and use the iOS MLX model

OpenMed models are directories, so use remote-directory. This is the verified ClinicalE5 Small 33M MLX preset used by the example app on a physical iPhone or iPad:

import { createOnDeviceRuntime } from '@rn-ai/core'
import { createOpenMedEngine } from '@rn-ai/openmed'

const revision = '0b72ee8568236cbcf991212e729cbd65ca26aa7c'
const modelUrl = (path: string) =>
  `https://huggingface.co/OpenMed/OpenMed-PII-ClinicalE5-Small-33M-v1-mlx/resolve/${revision}/${path}?download=1`

const runtime = createOnDeviceRuntime()
const openmed = createOpenMedEngine({
  runtime,
  model: {
    source: {
      kind: 'remote-directory',
      directoryName: 'openmed-pii-clinicale5-small-33m-mlx-0b72ee85',
      artifacts: [
        {
          path: 'config.json',
          url: modelUrl('config.json'),
          sizeBytes: 6_528,
          sha256: '04a9234e83fec48eb9efef644abeb095c6c8c4296c7d089b9a5292647ab9d29f',
        },
        {
          path: 'id2label.json',
          url: modelUrl('id2label.json'),
          sizeBytes: 2_598,
          sha256: '40f57c6fa3d84775c7d3cd58d6ef3c4736250261f08572cbbaef1290b577c898',
        },
        {
          path: 'weights.safetensors',
          url: modelUrl('weights.safetensors'),
          sizeBytes: 133_032_689,
          sha256: '87fff672bfae2ee052b0c046b5cbe1bc14792b93eaeca2b2526ac6dd2926cdc9',
        },
      ],
    },
    backend: 'mlx',
    maxSequenceLength: 512,
  },
})

await openmed.control.download({
  onProgress: ({ fraction }) => console.log(`${Math.round(fraction * 100)}%`),
})
await openmed.control.prepare()
const note = 'Patient Jane Doe can be reached at [email protected].'
const result = await openmed.deidentify(note, { policy: 'hipaa_safe_harbor' })
await openmed.control.unload()

The runtime downloads the files concurrently, verifies each one, and exposes the directory only after the complete manifest succeeds. iOS MLX is unavailable in the Simulator.

For Android, use the same remote-directory pattern with a revision-pinned ONNX repository. The directory must include model_int8.onnx, model_fp16.onnx, or model.onnx for the configured variant, plus any tokenizer/config files required by that model. Pin every artifact's exact size and SHA-256; this package does not currently claim a built-in verified Android preset.

Preparation is always explicit. Call analyze, extractPii, deidentify, or wrap a V4 model with createOpenMedMiddleware. Middleware recursively sanitizes textual system/user/assistant content, text-backed file parts, tool inputs/results, and approval reasons before inference. It reports detected spans only through onDetected and never re-identifies model output.