# Sentry AI: Complete Technical & Architectural Specification > Full Reference Context for AI Models, Autonomous Coding Agents, and Security Researchers. ## 1. Executive Summary Sentry AI is an advanced browser privacy and cyber-defense extension engineered natively for Chromium Manifest V3 and Mozilla Firefox AMO. Sentry AI synthesizes the high-performance network filtering capabilities of uBlock Origin, the mathematical anti-fingerprinting defenses of CanvasBlocker, and the parameter purification of ClearURLs into a single unified privacy engine. In addition, Sentry AI introduces a first-of-its-kind defense tier: Anti-AI Model Scraping Defense and an Encrypted Data Broker Remediation Vault. ## 2. Core Architectural Pillars ### Pillar 1: Mathematical Anti-Fingerprinting Core - File: `sentry-extension/src/content/canvasDefender.ts` (executed in `world: "MAIN"` at `run_at: "document_start"`). - Canvas 2D Defense: Intercepts `HTMLCanvasElement.prototype.toDataURL`, `toBlob`, and `CanvasRenderingContext2D.prototype.getImageData`. Injects subtle deterministic mathematical noise via a Mulberry32 PRNG seeded by `window.location.host + 1337`. This ensures identical rendering on the same origin (preventing detection or breaking CAPTCHAs) while producing unique, randomized hashes across different origins. - WebGL GPU Masking: Overrides `WebGLRenderingContext.prototype.getParameter` for `UNMASKED_VENDOR_WEBGL (0x9245)` and `UNMASKED_RENDERER_WEBGL (0x9246)`, normalizing GPU profiles to standard Intel UHD / NVIDIA baselines, and injects micro-noise into `readPixels` buffers. - Web Audio Perturbation: Adds microscopic deterministic frequency jitter (±10⁻⁷) to `AudioBuffer.prototype.copyFromChannel` and `AnalyserNode.prototype.getFloatFrequencyData`, defeating acoustic decay tracking without causing audible distortion during media playback. - Sub-Pixel Layout Dithering: Patches `Element.prototype.getBoundingClientRect`, `getClientRects`, and `measureText` with ±0.0001px offsets to defeat font enumeration probes. - Timezone & V8 Live Clock Cloaking: Hooks `Intl.DateTimeFormat`, `Date.prototype.getTimezoneOffset`, `Date.prototype.toString`, and intercepts GeoIP `fetch`/`XHR` responses and live DOM elements (`#hyaho`, `#lilpb`) to prevent timezone leaks. ### Pillar 2: Manifest V3 Declarative Traffic Filtering - File: `sentry-extension/src/background/serviceWorker.ts` and static rulesets `rules/rules_ai_trackers.json`, `rules/rules_privacy_headers.json`, `rules/rules_url_cleaner.json`. - Compiles 120,000+ threat rules into declarative JSON rule structures evaluated directly by Chromium's native C++ network engine (`chrome.declarativeNetRequest`). - Injects `Sec-GPC: 1` (Global Privacy Control) and `DNT: 1` headers into 100% of outbound requests. - Dynamic matrix rules for 1st-party vs 3rd-party scripts, frames, and websockets. - Memory footprint < 45 MB RAM under multi-tab load; 0ms JavaScript execution latency. ### Pillar 3: Universal Cookie Consent Guard - Automatically detects major Consent Management Platforms (OneTrust, Cookiebot, Didomi, Complianz, TrustArc, Quantcast). - Automatically triggers background clicks on "Reject All", "Decline", or "Only Necessary" buttons. - Multi-Stage Negotiation: If a banner lacks a direct "Reject All" button, Sentry AI programmatically clicks "Manage Settings" / "Preferences" and saves minimal essential cookies. - Scroll Restorer: Unfreezes modal-locked pages by clearing `overflow: hidden !important` on `body` and `html`. ### Pillar 4: In-Flight URL Cleaner & Redirect Unmasker - File: `sentry-extension/src/content/urlCleaner.ts` and `rules_url_cleaner.json`. - Strips 50+ tracking parameters (`utm_source`, `utm_medium`, `utm_campaign`, `fbclid`, `gclid`, `msclkid`, `twclid`, `ttclid`, `mc_eid`, `aff_id`, `ref`). - Normalizes Amazon paths by stripping `/ref=...` and tracking tokens. - Unmasks redirection shims (Google `/url?q=...`, Facebook `l.php?u=...`). - Neutralizes hyperlink auditing (``) and search engine link-rewriting scripts (`window.rwt`). ### Pillar 5: Commercial Anti-AI Scraping Defense - Blocks Meta Pixel, TikTok Insight, ByteDance, and LinkedIn tracking beacons that harvest browsing history for LLM training. - Injects `X-Robots-Tag: noai, noimageai` into response and request headers. - Built-in Data Broker Remediation Hub providing automated CCPA and GDPR Article 17 erasure requests for 18+ major data brokers. - Encrypted Personal Vault: Zero-knowledge client storage protected by PBKDF2 (100,000 rounds) and AES-256-GCM encryption. ### Pillar 6: Persistent Site Element Zapper - File: `sentry-extension/src/content/domZapper.ts`. - Interactive point-and-click cosmetic purifier that generates optimal CSS selectors. - Rules are saved permanently per site in `chrome.storage.local` and injected at `document_start` with `MutationObserver` enforcement, ensuring elements remain invisible across reloads without visual flicker. ## 3. Monorepo Organization - `sentry-extension/`: Production extension for Chrome, Brave, Edge, Arc (MV3) and Firefox (AMO). - `sentry-web/`: Official high-craft Next.js web portal with intelligent browser auto-detection, live exposure auditor, and zapper playground. - `docs/`: In-depth engineering specifications (`WHY-SENTRY.md`, `FEATURE-ANALYSIS.md`, `SENTRY-CHROME-EXTENSION-PRD.md`, `WEBSITE-PRD.md`, `mydeviceinfo.md`). - GitHub Repository: https://github.com/arklabai/sentry