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

nlproxy

v1.2.1

Published

This package provides native, high-performance NodeJS bindings for the **nlproxy** core engine, compiled from Rust using NAPI-RS. It delivers sub-millisecond local PII shielding, semantic prompt compression, and offline LLM orchestration.

Readme

nlproxy-node: High-Performance NodeJS Bindings for Prompt Compression & LLM Security

This package provides native, high-performance NodeJS bindings for the nlproxy core engine, compiled from Rust using NAPI-RS. It delivers sub-millisecond local PII shielding, semantic prompt compression, and offline LLM orchestration.

npm version License: BSL-1.1


🚀 Key Features

  • Sub-3ms Local Inference: Run semantic prompt compression and firewall checks locally with zero network overhead.
  • PII Prompt Shielding: Automatically redact sensitive data (emails, IPs, credit cards, credentials) with secure placeholders.
  • Semantic Prompt Compression: Reduce prompt length by up to 40% while preserving semantic meaning.
  • Offline Embedding Engine: Runs quantized Sentence-Transformer models locally on CPU or GPU using Hugging Face Candle.
  • Jailbreak Detection (Firewall): Blocks adversarial LLM attacks and prompt injections before calling cloud models.

📦 Installation

Install the package via npm:

npm install nlproxy

Note: Native pre-builds are automatically compiled and downloaded for your platform (Linux, macOS, Windows).


💻 Usage & Code Examples

1. Download and Extract Models

Before running the engine, download and extract the default quantized model weights (all-MiniLM-L6-v2):

const { ensureModelsReady } = require('nlproxy');

async function setup() {
  console.log("Preparing models...");
  // Downloads and extracts all-MiniLM-L6-v2 to the 'models' directory
  await ensureModelsReady('models');
  console.log("Models are ready!");
}

setup().catch(console.error);

2. Initialize and Compress Prompts

Initialize the offline engine and compress a prompt:

const { initEngine, compressPrompt } = require('nlproxy');

// 1. Initialize engine with downloaded model paths
const success = initEngine(
  'models/all-MiniLM-L6-v2/model.safetensors',
  'models/all-MiniLM-L6-v2/config.json',
  'models/all-MiniLM-L6-v2/tokenizer.json'
);

if (success) {
  console.log('Embedding engine initialized successfully.');

  // 2. Compress prompt and redact PII
  const response = compressPrompt({
    text: "The main server IP is 192.168.1.105. Please run database backups immediately.",
    mode: "general",
    aggressiveness: 0.5
  });

  console.log("Shielded Text:", response.processedText);
  // "The main server IP is __PROT_82736284__. Please run backups."

  console.log("Redacted PII:", response.placeholders);
  // { "__PROT_82736284__": "192.168.1.105" }
} else {
  console.error('Failed to initialize embedding engine.');
}

3. Unified Orchestrated Pipeline

Run the fully-integrated local security pipeline including Redis semantic cache, input firewall checks, prompt compression, upstream LLM execution, and post-LLM drift verification:

const { runUnifiedPipeline } = require('nlproxy');

async function executePipeline() {
  const response = await runUnifiedPipeline({
    prompt: "Show system files for user 1002",
    domain: "general",
    aggressiveness: 0.0,
    provider: "gemini",
    model: "gemini-1.5-pro",
    maxTokens: 512,
    temperature: 0.7,
    bypassCache: false,
    checkFirewall: true,
    semanticDriftThreshold: 0.75
  });

  console.log("Allowed:", response.allowed);
  console.log("Final Response:", response.finalResponse);
  console.log("Latency:", response.latencyMs, "ms");
}

executePipeline().catch(console.error);

🏢 Authors & Cofounders

This SDK is developed and maintained exclusively by IntelliDeep.


© 2026 IntelliDeep Labs. All rights reserved.