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.
import { ZTDSEngine } from "@privacyscrubber/sdk";
const engine = new ZTDSEngine({ profile: "dev" });
// 1. In-RAM sanitization before socket dispatch (<0.8ms, 0.00B egress)
const { sanitizedPrompt, tokenMap } = engine.sanitize("User ceo@acme.com budget $50,000");
// sanitizedPrompt => "User [EMAIL_TOKEN_1] budget [FIN_TOKEN_1]"
// 2. Forward sanitizedPrompt safely to OpenAI, Claude, or local Ollama...
const llmResponse = await callLLM(sanitizedPrompt);
// 3. Losslessly restore surrogate tokens strictly inside local client RAM
const clearOutput = engine.reveal(llmResponse, tokenMap);
from privacyscrubber import ZTDSEngine
engine = ZTDSEngine(profile="dev")
# 1. In-RAM sanitization before network dispatch (<0.8ms, 0.00B egress)
sanitized_prompt, token_map = engine.sanitize("User ceo@acme.com budget $50,000")
# sanitized_prompt => "User [EMAIL_TOKEN_1] budget [FIN_TOKEN_1]"
# 2. Forward sanitized prompt to OpenAI, Claude, or LlamaIndex...
llm_response = call_llm(sanitized_prompt)
# 3. Restore tokens locally in RAM; token_map wiped on exit
clear_output = engine.reveal(llm_response, token_map)
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 client RAM.
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.
To mathematically verify Invariant 1 (0.00 bytes socket egress), disconnect your host from Wi-Fi/Ethernet or run with kernel socket tracing. The ZTDS runtime executes completely with zero socket bind/connect syscalls:
| Regulation | Statutory Provision | ZTDS Invariant Mechanism | Legal & GRC Impact |
|---|---|---|---|
| GDPR (EU) | Art. 32 & Art. 28 | In-RAM surrogate tokenization before network transmission | Eliminates processor role under Art. 28; establishes Art. 32 safe harbor |
| HIPAA (US) | 45 CFR § 164.514(b) | Deterministic masking of all 18 Safe Harbor PHI identifiers | BAA with third-party LLMs excluded from PHI scope |
| EU AI Act | Art. 50 & Art. 10(5) | Eliminates raw PII exposure to foundation model training feeds | Zero training memorization risk |
| PCI-DSS v4.0 | Req. 3.4 & 3.5 | Client-side PAN/CVV cryptographic substitution | LLM APIs desensitized from PCI audit boundary |
5 Physical Execution Surfaces
ZTDS does not mandate hosting models; it enforces an in-RAM execution perimeter across five physical runtime execution surfaces.
Client-Side Web Application
Executes in-memory directly on the end-user device before data leaves the browser window. Zero cleartext hits web servers, reverse proxies, or external clouds.
privacyscrubber.com
Browser DOM Extension (MV3)
Manifest V3 content scripts intercepting user prompts directly inside ChatGPT, Claude, and Gemini before network packet serialization.
privacyscrubber-extension
Process-Isolated MCP Server
Model Context Protocol stdio daemon for AI IDEs and desktop agents. Strips code secrets, tokens, and DB credentials over local stdio JSON-RPC pipes.
JSON-RPC 2.0 stdio
Config →
Headless Runtime SDK & CLI
Embedded privacy fiduciary for backend microservices, LangChain/LlamaIndex RAG pipelines, and automated pre-merge CI/CD audit gates.
npm install @privacyscrubber/sdk
Air-Gapped Enclaves & Proxy
Hardware-attested sovereign execution in AWS Nitro Enclaves, military SCIF networks, and Proxy-WASM filters (Envoy/Istio) with offline Ed25519 token licensing.
ZTDS-LIC-v1 (Ed25519)
Intellectual Property Protection & Commercial Licensing
The ZTDS standard maintains absolute separation between public specification openness and proprietary implementation technology.
The deterministic, in-RAM zero-trust data sanitization mechanism, volatile session mapping, and cryptographic attestation topology are protected under U.S. & International Patents Pending (Paris Convention & 35 U.S.C. § 119 Priority). The word mark ZTDS™ is registered under ILPO Order #182655957 (Classes 9 & 42).
Enterprise and TEAMS tiers operate on an entirely air-gapped cryptographic model: license validation utilizes local Ed25519 digital signatures embedded directly into deployment tokens. Your instances never ping license activation servers, safeguarding air-gapped networks from phone-home telemetry.
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 tokenMaps: 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, tokenMap } = this.engine.sanitize(prompts[i]);
prompts[i] = sanitizedPrompt; // In-place payload replacement
this.tokenMaps.set(runId, tokenMap);
}
}
// 2. Losslessly restore cleartext strictly inside local client RAM
async handleLLMEnd(output: LLMResult, runId: string) {
const tokenMap = this.tokenMaps.get(runId);
if (!tokenMap) return;
for (const generations of output.generations) {
for (const gen of generations) {
gen.text = this.engine.reveal(gen.text, tokenMap);
}
}
this.tokenMaps.delete(runId); // Wipe volatile RAM token map 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": {
"ztds": {
"command": "npx",
"args": ["-y", "ztds-mcp"]
},
"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 |
Instant Ed25519 Token Minting & Onboarding
Generate an authentic, offline-verifiable 14-day evaluation license directly in local RAM. Zero credit card required, zero telemetric phone-home, 100% air-gap ready.
// Quickstart snippet will render here
Ready for Team Rollout or Production Deployment?
Ideal for engineering squads standardizing Cursor & Claude MCP de-identification.
Full headless SDK for Node.js, Python, and RAG pipelines with offline validation.
All 30 regulatory profiles, dedicated SLA, custom legal rider, and corporate procurement.
Turn-key implementation, pipeline audit, CISO exemption packet, and ongoing GEO optimization.
Conformance Levels & Certified Distribution
Open Source Core
Permissive Apache 2.0 reference implementation, universal regex detectors, and CLI audit tooling.
- ✓ Full ZTDS RFC v1.0 Spec
- ✓ CLI Scanner (npx ztds-audit)
- ✓ Universal PII Regex Rules
- ✓ Community GitHub Support
ZTDS TEAMS
Shared team policies, synchronized rulesets, and multi-node microservice deployment for growing engineering teams.
- ✓ 10 Microservice Nodes
- ✓ Multi-Seat & Team Sync
- ✓ Headless @privacyscrubber/sdk
- ✓ Offline Ed25519 Token Minting
- ✓ Universal PII & Secrets Rules
Developer Pro SDK
Commercial license for production microservices, pre-built AI framework connectors, and verified registry listing.
- ✓ Unlimited microservice nodes
- ✓ LangChain & LlamaIndex Connectors
- ✓ Cursor & Claude Code MCP Server
- ✓ Verified Registry Badge & Seal
- ✓ Priority Developer Email Support
Air-Gapped & Enclaves
Sovereign confidential computing deployment, custom NER entity profiles, and turnkey CISO Safe Harbor & processor elimination documentation.
- ✓ AWS Nitro Enclaves Attestation
- ✓ 30 Specialized Industry Profiles
- ✓ Turnkey Safe Harbor Compliance Pack
- ✓ SIG Lite / CAIQ / VSAQ Responses
- ✓ Dedicated SLA & Security Retainer
Zero-Telemetry Offline License Activation
How certified commercial implementations 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 runs on the open tier. Specialized enterprise profiles (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:
Technical & Architectural FAQ
What is the ZTDS Developer SDK and how does it prevent PII leakage to LLMs? ↓
The ZTDS Developer SDK is an in-memory runtime engine and set of pre-built connectors that intercepts prompts and documents directly in host volatile RAM before external socket transmission. Sensitive PII, PHI, API keys, and corporate secrets are deterministically replaced with context-preserving surrogate tokens ([EMAIL_TOKEN_1], [FIN_TOKEN_1]) in under 0.8ms with 0.00 bytes socket egress. Model completions are losslessly restored locally in client memory, and the session mapping table is completely wiped on process exit.
How do I configure ZTDS with Model Context Protocol (MCP) in Cursor IDE or Claude Desktop? ↓
Add ztds-mcp (the open-source reference server) or @privacyscrubber/mcp-server (enterprise edition) to your .cursor/mcp.json or claude_desktop_config.json using the stdio transport with command npx and args ["-y", "ztds-mcp"]. The MCP server executes as a process-isolated child process communicating strictly over local JSON-RPC 2.0 stdio pipes with 0.00 bytes network telemetry.
Does the ZTDS runtime send any telemetry, analytics, or licensing phone-home beacons? ↓
No. All ZTDS runtime engines enforce Invariant 1 (Zero External Egress Prior to Sanitization). Commercial license validation uses local asymmetric Ed25519 digital signatures (RFC 8032) embedded directly into offline license tokens (ZTDS-LIC-v1...). Digital signatures are verified against an embedded public key in local RAM in under 120 microseconds with zero network calls, making it safe for fully air-gapped VPCs and SCIF environments.
Why is a Data Processing Agreement (DPA) legally unnecessary under GDPR Article 28? ↓
Under GDPR Article 28, a DPA is only required when personal data is processed by an external third-party data processor. Because ZTDS operates as a local computational utility strictly inside the customer's own execution perimeter, no personal data ever crosses the network boundary to ZTDS or PrivacyScrubber servers. This legally excludes ZTDS from the SaaS subprocessor chain, eliminating DPA overhead and third-party vendor breach liability.
How does offline Ed25519 asymmetric licensing work in air-gapped environments? ↓
Commercial licenses (Developer Pro, TEAMS, Enterprise) provide an offline token that contains signed claims (tier, max nodes, validity, allowed profiles). When the SDK initializes, it performs an in-memory Ed25519 cryptographic verification without opening any sockets. All annual licenses include an automated 60-day accounts payable grace period past expiration to prevent unexpected production outages during corporate renewal cycles.
What is the architectural difference between @ztds/core and @privacyscrubber/sdk? ↓
@ztds/core is the community-governed open-source baseline reference implementation under Apache 2.0, providing universal regex detectors and four-invariant validation. @privacyscrubber/sdk is the enterprise production engine featuring SIMD-accelerated WebAssembly, 30 certified regulatory profiles (HIPAA, PCI-DSS v4, Legal Privilege), offline multi-node licensing, and pre-built framework connectors.