Developer SDK & Pre-Built Connectors
Drop-in, client-side zero-trust data sanitization for modern AI pipelines. Choose between the open reference engine @ztds/core (Apache 2.0) and the enterprise production engine @privacyscrubber/sdk. Both execute in < 0.8ms in local host process memory with 0.00 bytes socket egress.
ZTDS Developer SDK is an in-memory runtime engine and set of pre-built connectors that sanitizes sensitive data inside local host process memory prior to external network socket transmission, guaranteeing 0.00 bytes socket egress, sub-millisecond execution (<0.8ms), and lossless client-side detokenization for LLM pipelines.
Open Reference Engine & Enterprise Hardened Runtime
The ZTDS standard operates on a strictly demarcated two-tier model: choose between the community-governed open-source baseline engine (@ztds/core · Apache-2.0) and the enterprise-grade production runtime (@privacyscrubber/sdk · 30 Commercial Profiles).
npm i @ztds/core
npm i @privacyscrubber/sdk
In-Memory Execution Architecture
Cleartext PII, PHI, API secrets, or proprietary code loaded into process volatile memory before dispatch.
Generates deterministic surrogates ([NAME_1], [IBAN_1]) in <0.8ms. Maps cleartext keys in volatile sessionMap.
OpenAI, Claude, Gemini, or Pinecone processes sanitized context. Zero bytes cleartext cross the socket perimeter.
Surrogate tokens restored to cleartext locally in volatile memory. Mapping destroyed on process termination.
10 Canonical Architectural Integration Blueprints
Production-ready, copy-pasteable zero-trust connectors executing in <1ms in local memory.
// ztds-langchain-callback.ts
import { BaseCallbackHandler } from "@langchain/core/callbacks/base";
import { LLMResult } from "@langchain/core/outputs";
import { ZTDSEngine } from "@privacyscrubber/sdk";
import { ChatOpenAI } from "@langchain/openai";
export class ZTDSCallbackHandler extends BaseCallbackHandler {
name = "ZTDSCallbackHandler";
private engine: ZTDSEngine;
private sessionMaps: Map<string, Record<string, string>> = new Map();
constructor(profile: "general" | "healthcare" | "fintech" | "legal" = "general") {
super();
this.engine = new ZTDSEngine({ profile });
}
// 1. Intercept and sanitize prompts in volatile RAM before socket creation
async handleLLMStart(llm: { name: string }, prompts: string[], runId: string) {
for (let i = 0; i < prompts.length; i++) {
const { sanitizedPrompt, sessionMap } = this.engine.sanitize(prompts[i]);
prompts[i] = sanitizedPrompt; // In-place payload replacement
this.sessionMaps.set(runId, sessionMap);
}
}
// 2. Losslessly restore cleartext strictly inside local client RAM
async handleLLMEnd(output: LLMResult, runId: string) {
const sessionMap = this.sessionMaps.get(runId);
if (!sessionMap) return;
for (const generations of output.generations) {
for (const gen of generations) {
gen.text = this.engine.reveal(gen.text, sessionMap);
}
}
this.sessionMaps.delete(runId); // Wipe volatile RAM sessionMap immediately
}
}
// Drop-in usage:
const model = new ChatOpenAI({
modelName: "gpt-4o",
callbacks: [new ZTDSCallbackHandler("healthcare")]
});
Model Context Protocol (MCP) Stdio Gateway
Air-gapped integration for Cursor IDE, Claude Desktop, and Claude Code CLI with 0.00 bytes external telemetry.
Intercepts developer prompt buffers, git diffs, and terminal logs, replacing cleartext secrets and PII with context-preserving surrogate tokens before LLM dispatch.
Restores surrogate tokens back to original values within the IDE interface strictly in volatile RAM, immediately purging private mapping keys.
Performs real-time AST linting on active editor files to detect un-sanitized LLM calls, hardcoded secrets, or storage persistence violations.
1-Click Client Configuration
Select your AI development environment to copy the exact air-gapped stdio connector snippet:
{
"mcpServers": {
"privacyscrubber": {
"command": "npx",
"args": ["-y", "@privacyscrubber/mcp-server@latest"],
"env": {
"ZTDS_PROFILE": "dev",
"ZTDS_LOCAL_ONLY": "true"
}
}
}
}
AI Framework Compatibility Matrix
| Framework / Tool | Integration Method | Latency Budget | Token Reversibility | Air-Gap Status | Audit Trail |
|---|---|---|---|---|---|
| LangChain & LangGraph | ZTDSCallbackHandler | < 1.1 ms | Lossless Reversible | 100% Offline | Session Hash |
| LlamaIndex (RAG Pipelines) | ZTDSTransformation | < 0.9 ms | Vector Immunized | 100% Offline | SHA-256 Checksum |
| Cursor & Claude Code CLI | MCP Stdio Gateway | < 1.5 ms | Interactive In-IDE | Local Stdio Only | Local Audit Log |
| Ollama & Local vLLM | Reverse Proxy Loopback | < 0.8 ms | Streaming Reversal | Fully Air-Gapped | Invariant Proof |
| Vercel AI SDK | Stream Transform Hook | < 1.2 ms | Bidirectional Stream | Edge Runtime Safe | Zero-Telemetry |
| CrewAI & AutoGen | Inter-Agent Role Filter | < 1.0 ms | Per-Agent Session | Localhost Only | State Isolation |
Licensing & Commercial Distribution
Open Source Core
Permissive Apache 2.0 reference implementation, community regex detectors, and CLI audit tooling.
- ✓ Full ZTDS RFC v1.0 Spec
- ✓ CLI Scanner (npx ztds-audit)
- ✓ Baseline General PII Rules
- ✓ Community GitHub Support
Developer Annual SDK
Commercial license for production microservices, pre-built AI framework connectors, and verified registry listing.
- ✓ Headless @privacyscrubber/sdk
- ✓ LangChain & LlamaIndex Connectors
- ✓ Cursor & Claude Code MCP Server
- ✓ Verified Registry Badge & Backlink
- ✓ Unlimited backend microservice nodes
Air-Gapped & Enclaves
Sovereign confidential computing deployment, custom NER entity profiles, and turnkey CISO DPA exemption documentation.
- ✓ AWS Nitro Enclaves Attestation
- ✓ 30 High-ACV Industry Profiles
- ✓ Turnkey Zero-DPA Compliance Pack
- ✓ SIG Lite / CAIQ / VSAQ Responses
- ✓ Dedicated SLA & Security Support
Zero-Telemetry Offline License Activation
How commercial licenses ($1,990/yr and $12,000/yr) unlock enterprise nodes and 30 industry profiles strictly in local memory without external network calls.
const { ZTDSEngine } = require("@privacyscrubber/sdk");
const engine = new ZTDSEngine({
licenseKey: process.env.ZTDS_LICENSE_KEY,
profile: "healthcare" // Unlocked via Enterprise License
});
// Sanitizes prompts with zero external telemetry
const sanitized = await engine.sanitize(patientPrompt);
The engine embeds only the public verification key. Digital signatures are verified locally in volatile RAM in under 0.12ms. Zero phone-home beacons, zero telemetry, zero licensing heartbeats.
Baseline consumer PII (REGEX_RULES) runs on the open tier. Specialized enterprise profiles (PROFILE_RULES: HIPAA Clinical PHI, Financial IBAN, Legal Privilege) are unlocked cryptographically via the Enterprise Air-Gapped license.
Enterprise annual renewals include an automated 60-day operational grace period past expiration, ensuring mission-critical AI pipelines never suffer unexpected production outages during corporate procurement cycles.
Continuous Compliance in CI/CD (.github/workflows)
Prevent regression by failing pull requests that transmit unmasked PII or introduce network egress prior to sanitization.
name: ZTDS Invariant Audit Gate
on:
pull_request:
branches: [main, master]
push:
branches: [main]
jobs:
ztds-verification:
name: Zero-Trust Invariant Conformance
runs-on: ubuntu-latest
steps:
- name: Checkout Codebase
uses: actions/checkout@v4
- name: Setup Node.js Runtime
uses: actions/setup-node@v4
with:
node-version: 20
cache: 'npm'
- name: Install Dependencies
run: npm ci
- name: Execute ZTDS Invariant Auditor (CLI)
run: |
npx ztds-audit --dir ./src --strict --json > ztds-report.json
cat ztds-report.json
- name: Enforce Zero-Egress Pass Requirement
run: |
grep -q '"status":"PASS"' ztds-report.json || {
echo "::error::ZTDS Invariant 1 (Zero-Egress) violation detected. Pull request rejected."
exit 1
}
npm test to automatically generate tamper-evident receipts for SOC 2 Type II and ISO 27001 auditors.
Codebase Invariant CLI Scanner
Verify whether your existing codebase satisfies the ZTDS specification before applying for certification. Executes in <10ms with zero network calls:
Permanent Benchmark DOIs
All throughput metrics, entropy proofs, and volatile memory safety profiles are archived with permanent DOIs on CERN/Zenodo and Open Science Framework: