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

@theaiinc/veil

v0.1.1

Published

Provider-agnostic data protection, classification, abstraction, and rehydration framework for AI-enabled applications.

Readme

@theaiinc/veil

Provider-agnostic data protection, classification, abstraction, transformation, and rehydration framework for AI-enabled applications.

Veil turns sensitive content into AI-safe representations while preserving semantic meaning — and lets you restore the original context after the AI responds. Send a problem to an external model without leaking PII, source code, internal architecture, or customer data.

npm install @theaiinc/veil
# add at least one detector provider:
npm install @theaiinc/veil-regex

Quick start

import { Veil } from "@theaiinc/veil";
import { RegexDetector } from "@theaiinc/veil-regex";

const veil = new Veil();
veil.registerDetector(new RegexDetector());

const result = await veil.process({
  content: "Email [email protected] about the billing issue.",
  profile: "public-cloud",
});

result.transformedContent; // "Email <email:1> about the billing issue."
result.mappings;           // [{ token: "<email:1>", originalValue: "[email protected]" }]
result.classification;     // "CONFIDENTIAL"

// After the external AI replies, restore the original values:
const restored = await veil.rehydrate(result.document, aiResponse);

How it works

Everything operates on a VeilDocument — no stage ever touches a raw string. The pipeline runs in a fixed order and audits every step:

raw content → VeilDocument → taggers → detectors → classifiers
→ policy engine → transformers → safe context → external AI
→ response → rehydrators → final output
  • Taggers describe what the content is (pii, source-code, financial, …).
  • Detectors find entities (people, emails, secrets) and contribute them with confidence scores; overlapping detections are merged, highest confidence wins.
  • Classifiers assign a sensitivity level: PUBLIC | INTERNAL | CONFIDENTIAL | SECRET | RESTRICTED.
  • Policy engine maps the level to an action: allow | abstract | tokenize | local-only | block | review.
  • Transformers produce the safe context — e.g. mask-pii replaces Steve Tran with <person:1>.
  • Rehydrators reverse the tokens in the model's response.

Public API

const veil = new Veil();

veil.createDocument(content, options?);     // build a VeilDocument
await veil.classify(document, options?);    // tag + detect + classify (no mutation)
await veil.transform(document);             // run the full pipeline incl. transformers
await veil.rehydrate(document, response);   // restore original values
await veil.process({ content, profile });   // one-shot → VeilProcessResult

process() returns { document, transformedContent, mappings, classification, tags, audit }.

Manual overrides

// Manual tags merge with automatic ones; manual classification overrides automatic.
await veil.process({
  content,
  tags: ["proprietary", "architecture"],
  classification: "SECRET",
});

Profiles

| Profile | Behavior | | --- | --- | | public-cloud | Mask PII, abstract domain terms, allow external AI. | | enterprise | Stricter — tokenize from INTERNAL upward. | | air-gapped | Everything local-only; nothing leaves the boundary. |

Plugins

Every system is replaceable. Register your own:

veil.registerDetector(myDetector);
veil.registerTagger(myTagger);
veil.registerClassifier(myClassifier);
veil.registerTransformer(myTransformer);
veil.registerPolicy(myPolicyProvider);
veil.registerAuditor(myAuditor);
veil.registerRehydrator(myRehydrator);

Implement the matching interface (VeilDetector, VeilTransformer, …) — all exported from this package.

Providers

Scope (0.1.0)

Implemented: artifact-based architecture, plugin framework, automatic + manual tagging, automatic + manual classification, policy engine, entity tokenization, rehydration, audit logging, transformer framework (including a thin rule-based abstraction default), profiles.

Not yet included: LLM-backed abstraction, spaCy/Azure/AWS/GCP providers, dashboards, persistence, and orchestration.

License

MIT