Model Context Protocol (MCP) Read Specification →
ZTDS.ai Open AI Security Standard
Developer Engine · Apache 2.0 Dual License
IETF Internet-Draft: draft-01 →

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.

$ npm install @privacyscrubber/sdk
30-Second Quickstart
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);
Architecture Definition (RFC v1.0)

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.

Dual-Tier Implementation Architecture

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).

Open Source (Apache-2.0)
@ztds/core
Free community baseline. 4 Invariants, universal regex rules.
npm i @ztds/core
Enterprise Engine
@privacyscrubber/sdk
SIMD WebAssembly, 30 sector profiles, offline air-gap node licensing.
npm i @privacyscrubber/sdk
Local Latency
< 0.8 ms
OSF Benchmark (10.17605/OSF.IO/5BYJF)
Socket Egress
0.00 Bytes
Zero outbound network telemetry
Memory Security
Volatile RAM
Wiped on process termination
Statutory Safe Harbor
Art. 32 / Art. 28
Processor path elimination & defense-in-depth
Data Plane Primitive

In-Memory Execution Architecture

Invariant 1 · 0.00 Bytes Egress
Step 01 · Client Host
Raw Ingestion in RAM

Cleartext PII, PHI, API secrets, or proprietary code loaded into process volatile memory before dispatch.

Client Volatile Memory
Step 02 · Local Tokenizer
In-Memory Sanitization

Generates deterministic surrogates ([NAME_1], [IBAN_1]) in <0.8ms. Maps cleartext keys in volatile client RAM.

< 0.8ms · Invariant 2
Step 03 · Egress Wire
External AI Provider

OpenAI, Claude, Gemini, or Pinecone processes sanitized context. Zero bytes cleartext cross the socket perimeter.

0 Bytes Egress Exposure
Step 04 · Client Host
Local Lossless Reversal

Surrogate tokens restored to cleartext locally in volatile memory. Mapping destroyed on process termination.

Zero Disk Persistence
Independent Zero-Egress Audit Protocol (Airplane Mode Test) RFC v1.0 Section 4

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:

AIRPLANE_MODE=1 strace -e trace=network node -e "const { ZTDSEngine } = require('@privacyscrubber/sdk'); const e = new ZTDSEngine(); console.log(e.sanitize('Patient John Doe SSN 000-12-3456'));"
Syscall verification: 0 network sockets opened · Latency: < 0.8ms Download CISO Verification Memo (PDF) →
Statutory Compliance & Safe Harbor Crosswalk (GDPR Art. 32 & Art. 28) Safe Harbor Certified
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
PHYSICAL DEPLOYMENT TOPOLOGIES

5 Physical Execution Surfaces

ZTDS does not mandate hosting models; it enforces an in-RAM execution perimeter across five physical runtime execution surfaces.

Zero Cloud Proxies
Surface 01 < 0.20 ms

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.

Target: SPAs, SaaS Portals, CRM UI
Distribution: V8 / WebWorker / WASM
Perimeter: Client Device RAM
privacyscrubber.com
Surface 02 < 0.25 ms

Browser DOM Extension (MV3)

Manifest V3 content scripts intercepting user prompts directly inside ChatGPT, Claude, and Gemini before network packet serialization.

Target: Chrome, Edge, Brave, Opera
Distribution: Chrome Web Store (MV3)
Perimeter: Isolated DOM Context
privacyscrubber-extension
Surface 03 < 0.50 ms

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.

Target: Cursor, Windsurf, Claude Desktop
Distribution: npx ztds-mcp / @privacyscrubber/mcp-server
Perimeter: Stdio Process Sandbox
JSON-RPC 2.0 stdio Config →
Surface 04 < 0.80 ms

Headless Runtime SDK & CLI

Embedded privacy fiduciary for backend microservices, LangChain/LlamaIndex RAG pipelines, and automated pre-merge CI/CD audit gates.

Target: Node.js, Python, RAG Ingestion
Distribution: npm / npx ztds-audit
Perimeter: Host Runtime RAM
npm install @privacyscrubber/sdk
Surface 05 < 0.05 ms

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.

Target: Defense, Banks, SCIF, Private VPC
Distribution: Nitro Enclaves / Proxy-WASM
Perimeter: Hardware Enclave Boundary
ZTDS-LIC-v1 (Ed25519)
PATENT PENDING · WIPO PRIORITY LOCKED

Intellectual Property Protection & Commercial Licensing

The ZTDS standard maintains absolute separation between public specification openness and proprietary implementation technology.

Patent: Patents Pending Trademark: ZTDS™
01 · Patent Monopoly & International Priority

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).

Open Specification: Public domain · Apache 2.0 / CC BY 4.0
Commercial Runtimes: Proprietary licensed implementation
Canonical Pioneer: PrivacyScrubber (Product #001)
02 · Air-Gapped Licensing & Dynamic Rule Updates

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.

License Verification: Offline Ed25519 · Zero Network Calls
Compliance Feeds: Continuous dynamic updates (30+ Industry Profiles)
Regulatory Coverage: HIPAA Safe Harbor, PCI-DSS v4.0, GDPR Recital 26
Need an Air-Gapped Enterprise Deployment License? Certified Developer SDK and TEAMS implementations (via PrivacyScrubber.com) include offline Ed25519 tokens with instant fulfillment.
RFC v1.0 CANONICAL BLUEPRINTS

10 Canonical Architectural Integration Blueprints

Production-ready, copy-pasteable zero-trust connectors executing in <1ms in local memory.

ztds-langchain-callback.ts
Blueprint 01 · LangChain BaseCallbackHandler Middleware Transparently intercepts prompts and completions across any LCEL chain, ChatOpenAI, ChatAnthropic, or LangGraph agent with zero cleartext network egress.
// 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")]
});
JSON-RPC 2.0 · STDIO TRANSPORT

Model Context Protocol (MCP) Stdio Gateway

Air-gapped integration for Cursor IDE, Claude Desktop, and Claude Code CLI with 0.00 bytes external telemetry.

RFC v1.0 · IETF draft-01 Compliant ↑ View Blueprint 05 Code Recipe
MCP Stdio Communication Protocol
Claude Desktop / Cursor IDE Prompt & Code Buffers
← JSON-RPC 2.0 via stdio → Zero Socket Telemetry
ztds-mcp / @privacyscrubber/mcp-server Volatile RAM Sanitization Engine
• ztds_sanitize_prompt

Intercepts developer prompt buffers, git diffs, and terminal logs, replacing cleartext secrets and PII with context-preserving surrogate tokens before LLM dispatch.

Returns: sanitizedPrompt, sessionKey
• ztds_restore_response

Restores surrogate tokens back to original values within the IDE interface strictly in volatile RAM, immediately purging private mapping keys.

Returns: restoredPrompt
• ztds_verify_compliance

Performs real-time AST linting on active editor files to detect un-sanitized LLM calls, hardcoded secrets, or storage persistence violations.

Returns: compliant, score, auditHash

1-Click Client Configuration

Select your AI development environment to copy the exact air-gapped stdio connector snippet:

.cursor/mcp.json
{
  "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"
      }
    }
  }
}
Zero Socket Calls · stdio Pipe Transport Only
Get Certified →
Ecosystem Coverage

AI Framework Compatibility Matrix

6 Supported Environments
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
14-Day Full Evaluation Workbench

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.

Primary Integration Target
Open Standard vs. Certified Implementations

Conformance Levels & Certified Distribution

Calculate Enterprise ROI →
Open Specification

Open Source Core

Apache 2.0 / Open Standard

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
Read RFC v1.0 Spec →
Team Collaboration

ZTDS TEAMS

Certified Tier / via PrivacyScrubber

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
Reference Engine
Developer Pro

Developer Pro SDK

Certified SDK / via PrivacyScrubber

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
Enterprise GRC

Air-Gapped & Enclaves

Enterprise / Custom MSA

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
Enterprise Scope →
Asymmetric Cryptography · Ed25519 (RFC 8032)

Zero-Telemetry Offline License Activation

How certified commercial implementations unlock enterprise nodes and 30 industry profiles strictly in local memory without external network calls.

0.00 B Egress <120μs Verification
# 1. Set environment variable in air-gapped node or Docker container:
export ZTDS_LICENSE_KEY="ZTDS-LIC-v1.eyJjdXN0b21lci...wKfZEL5HHw"
# 2. Or initialize directly in your microservice / LangChain handler:
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);
100% Offline Cryptographic Integrity

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.

Cryptographic Vertical Profile Gating

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.

60-Day Accounts Payable Grace Period

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.

Ed25519 Offline Token Decoder & In-Memory Verifier
Verification Latency: —
Automated Pre-Merge Assurance

Continuous Compliance in CI/CD (.github/workflows)

Prevent regression by failing pull requests that transmit unmasked PII or introduce network egress prior to sanitization.

GitOps Verified
.github/workflows/ztds-audit.yml
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
          }
Enterprise Security Evidence Binder Generation Run alongside npm test to automatically generate tamper-evident receipts for SOC 2 Type II and ISO 27001 auditors.
SOC 2 Evidence Controls →
Automated Pre-Flight

Codebase Invariant CLI Scanner

Verify whether your existing codebase satisfies the ZTDS specification before applying for certification. Executes in <10ms with zero network calls:

npx ztds-audit --dir ./src Free CLI
View Perimeter Scanner Documentation →
Empirical Attestation

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:

Throughput (10k tokens) < 0.8 ms
RAM Overhead < 4 MB
OSF Benchmark Archive DOI: 10.17605/OSF.IO/5BYJF →
FREQUENTLY ASKED QUESTIONS

Technical & Architectural FAQ

RFC v1.0 · Model Context Protocol · Compliance
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.