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

@neurolift-technologies/rrt-advocate

v0.1.1

Published

⚠️ PROTOTYPE / not medical advice — Crisis Detection Engine (CDE) — TypeScript port of the RRT Advocate 3-layer, local-first crisis detection & assessment pipeline. NeuroLift HAIEF Solidarity Framework.

Downloads

222

Readme

⚠️ PROTOTYPE — NOT A SAFETY SYSTEM

This is an experimental crisis-detection library with stubbed/placeholder intervention layers. It is NOT medical advice, NOT a crisis service, and performs no real-time monitoring. It can miss real crisis signals (known detection/recall gaps) — do not rely on it as a safety net or as the sole safety mechanism.

If you or someone else needs help now: in the US, call or text 988 (Suicide & Crisis Lifeline) or chat 988lifeline.org; in an emergency call 911. Outside the US: findahelpline.com.

Provided AS-IS, without warranty.

@neurolift-technologies/rrt-advocate

TypeScript port of the RRT Advocate Crisis Detection Engine (CDE) — a 3-layer, local-first crisis detection and assessment pipeline from the NeuroLift HAIEF Solidarity Framework.

Safety-critical. This is a faithful port of the canonical Python CDE (src/crisis/ in this repository). It preserves every layer weight, threshold, and confidence formula. The one intentional behavioral divergence (apostrophe fail-open in Layer 1) is documented in KNOWN_LIMITATIONS.md. This package performs detection and assessment only — it does not generate responses, interventions, or persona-blended output.

Install

npm install @neurolift-technologies/rrt-advocate

vader-sentiment is an optional dependency. If installed, Layer 2 uses it for polarity scoring; otherwise it falls back to a deterministic built-in heuristic.

Usage

import { CrisisEngine, CrisisLevel } from "@neurolift-technologies/rrt-advocate";

const engine = new CrisisEngine("user-123");

const assessment = await engine.assess("I can't cope, everything is too much");

assessment.crisisLevel;          // CrisisLevel.GREEN | YELLOW | ORANGE | RED | BLACK
assessment.userSafetyScore;      // 1.0 (safe) → 0.05 (immediate danger)
assessment.confidenceScore;      // aggregate crisis confidence, 0.0–1.0
assessment.recommendedInterventions;
assessment.primaryIndicators;

if (assessment.crisisLevel !== CrisisLevel.GREEN) {
  // route to appropriate support
}

The pipeline

| Layer | Module | Weight | Signal | |---|---|---|---| | 1 | KeywordLayer | 0.45 | Semantic-field keyword matching (self-harm forces 1.0) | | 2 | SentimentLayer | 0.35 | Polarity & declining-trend detection over a sliding window | | 3 | BehavioralLayer | 0.20 | Latency, message complexity, and looping (Jaccard) |

CrisisDetector aggregates the three layers into CrisisIndicators; CrisisAssessor maps those to a CrisisAssessment using config/crisis_thresholds.yaml. CrisisEngine wires the two together.

Lower-level building blocks are exported too:

import {
  CrisisDetector,
  CrisisAssessor,
  KeywordLayer,
  SentimentLayer,
  BehavioralLayer,
} from "@neurolift-technologies/rrt-advocate";

Privacy

Everything runs locally. The behavioral layer stores only message metadata (timing, length, and HMAC-hashed word tokens) — never raw message content.

Development

npm install
npm run build   # tsc → dist/
npm test        # vitest

License

Apache-2.0 © NeuroLift Technologies, LLC