YC (S26) | Open Computer History | Continuously record your company computer work, map your workflows, help you find work worth automating, and power your agents' context
Rust agentsagiaiai-memoryaudio-recordingcomputer-visionhermeshermes-agentllmlocal-ailocal-firstmachine-learningmcpmultimodalopenclawprivacyrewindscreen-recordingspeech-to-textycombinator
fix(privacy): disable AI PII removal entirely — hide UI toggle, no-op the workers regardless of config / CLI flag, bump app to v2.4.161
Louis Beaumont8125837ff06b
diff --git a/apps/screenpipe-app-tauri/components/settings/privacy-section.tsx b/apps/screenpipe-app-tauri/components/settings/privacy-section.tsxindex a5ca57daa..15f7e1e03 100644--- a/apps/screenpipe-app-tauri/components/settings/privacy-section.tsx+++ b/apps/screenpipe-app-tauri/components/settings/privacy-section.tsx@@ -307,29 +307,11 @@ export function PrivacySection() {handleSettingsChange({ usePiiRemoval: checked }, true);};- // "AI PII removal" — single user-facing toggle that flips both the- // text reconciliation worker AND the image redactor (rfdetr_v8) on- // or off together. The technical knobs (destructive vs sibling,- // text-only vs image-only) stay CLI-only so the UI stays simple.- const aiPiiRemovalEnabled =- Boolean(settings.asyncPiiRedaction ?? false) ||- Boolean(settings.asyncImagePiiRedaction ?? false);-- const handleAiPiiRemovalChange = (checked: boolean) => {- handleSettingsChange(- {- asyncPiiRedaction: checked,- asyncImagePiiRedaction: checked,- },- true,- );- };-- // Where the AI workers run — one switch covers both modalities.- const piiBackend = (settings.piiBackend as "local" | "tinfoil" | undefined) ?? "local";- const handlePiiBackendChange = (next: "local" | "tinfoil") => {- handleSettingsChange({ piiBackend: next } as any, true);- };+ // AI PII removal toggles + backend picker were hidden in v2.4.161;+ // the feature is no-op'd at the worker spawn sites. Settings keys+ // (asyncPiiRedaction, asyncImagePiiRedaction, piiBackend) remain on+ // the schema for serde compat — anyone who had them set just gets+ // silent no-op behavior until we re-ship.const handleIncognitoToggle = (checked: boolean) => {handleSettingsChange({ ignoreIncognitoWindows: checked }, true);@@ -859,68 +841,16 @@ export function PrivacySection() {</CardContent></Card>- {/* AI PII removal — covers text + images via the async worker */}- <Card className="border-border bg-card">- <CardContent className="px-3 py-2.5">- <div className="flex items-center justify-between">- <div className="flex items-center space-x-2.5">- <Shield className="h-4 w-4 text-muted-foreground shrink-0" />- <div>- <h3 className="text-sm font-medium text-foreground flex items-center gap-1.5">- AI PII removal- <span className="text-[10px] font-medium uppercase tracking-wider text-muted-foreground bg-muted px-1.5 py-0.5 rounded">- Experimental- </span>- <HelpTooltip text="Uses an on-device AI model to detect and remove PII from both screen frames and captured text (names, emails, addresses, secrets, URLs). Downloads a ~100 MB model on first run and uses extra CPU/GPU while it processes captures in the background." />- </h3>- <p className="text-xs text-muted-foreground">- Removes PII from text and images. Uses extra resources.- </p>- </div>- </div>- <Switch- id="aiPiiRemoval"- checked={aiPiiRemovalEnabled}- onCheckedChange={handleAiPiiRemovalChange}- />- </div>- {aiPiiRemovalEnabled && (- <div className="mt-3 ml-6 space-y-2 border-l-2 border-border pl-3">- <p className="text-xs font-medium text-foreground">Where it runs</p>- <label className="flex cursor-pointer items-start gap-2 text-xs">- <input- type="radio"- name="piiBackend"- className="mt-0.5"- checked={piiBackend === "local"}- onChange={() => handlePiiBackendChange("local")}- />- <span>- <span className="font-medium text-foreground">Local</span>- <span className="text-muted-foreground">- {" "}— on your device. Strongest privacy. Slower on weak hardware.- </span>- </span>- </label>- <label className="flex cursor-pointer items-start gap-2 text-xs">- <input- type="radio"- name="piiBackend"- className="mt-0.5"- checked={piiBackend === "tinfoil"}- onChange={() => handlePiiBackendChange("tinfoil")}- />- <span>- <span className="font-medium text-foreground">Cloud (enclave)</span>- <span className="text-muted-foreground">- {" "}— screenpipe's confidential-compute enclave. Fast everywhere; your device cryptographically verifies the enclave is running the open-source build before sending anything.- </span>- </span>- </label>- </div>- )}- </CardContent>- </Card>+ {/* AI PII removal — UI hidden in v2.4.161. The feature is+ disabled at the worker spawn sites in server_core.rs and+ bin/screenpipe-engine.rs (no-op even if `asyncPiiRedaction`+ / `asyncImagePiiRedaction` are set via CLI / config). The+ local rfdetr_v8 image model had unacceptable precision AND+ recall on real screenpipe content (over-redacted code /+ docs, missed actual passwords), and the local text ONNX+ wasn't shipped — the Settings option mis-routed text+ redaction to the cloud enclave silently. Will re-surface+ when we ship a model + benchmark we can stand behind. */}</div></LockedSetting>diff --git a/apps/screenpipe-app-tauri/src-tauri/Cargo.lock b/apps/screenpipe-app-tauri/src-tauri/Cargo.lockindex 42ea60a92..38f0c71e4 100644--- a/apps/screenpipe-app-tauri/src-tauri/Cargo.lock+++ b/apps/screenpipe-app-tauri/src-tauri/Cargo.lock@@ -9976,7 +9976,7 @@ dependencies = [[[package]]name = "screenpipe-app"-version = "2.4.160"+version = "2.4.161"dependencies = ["anyhow","arboard",diff --git a/apps/screenpipe-app-tauri/src-tauri/Cargo.toml b/apps/screenpipe-app-tauri/src-tauri/Cargo.tomlindex 7b570466c..baae2e5f3 100644--- a/apps/screenpipe-app-tauri/src-tauri/Cargo.toml+++ b/apps/screenpipe-app-tauri/src-tauri/Cargo.toml@@ -1,6 +1,6 @@[package]name = "screenpipe-app"-version = "2.4.160"+version = "2.4.161"description = "24/7 memory for your desktop. 100% local."authors = ["you"]license = ""diff --git a/apps/screenpipe-app-tauri/src-tauri/src/server_core.rs b/apps/screenpipe-app-tauri/src-tauri/src/server_core.rsindex 4f9ed9a75..0955cf4ab 100644--- a/apps/screenpipe-app-tauri/src-tauri/src/server_core.rs+++ b/apps/screenpipe-app-tauri/src-tauri/src/server_core.rs@@ -472,85 +472,30 @@ impl ServerCore {warn!("mdns advertisement failed (non-fatal): {}", e);}- // ── Async PII reconciliation workers (issue #3185 / PR #3188) ─────- // Two independent workers — text and image — each gated by its- // own toggle. Both off by default; users opt in through- // Settings → Privacy → "AI PII removal".- //- // The single `pii_backend` config flag selects the inner- // adapter for BOTH modalities:- // - "local" → local ONNX (text: stub, image: rfdetr_v8)- // - "tinfoil" → confidential-compute enclave (H200) for both- let backend = config.pii_backend.as_str();- let use_tinfoil = matches!(backend, "tinfoil" | "cloud" | "enclave");-- if config.async_pii_redaction {- use screenpipe_redact::adapters::tinfoil::TinfoilRedactor;- use screenpipe_redact::pipeline::{Pipeline, PipelineConfig};- use screenpipe_redact::worker::{Worker, WorkerConfig, ALL_TARGET_TABLES};- use screenpipe_redact::Redactor;-- // Today: regardless of `pii_backend`, the text "AI" step- // is the Tinfoil enclave because the local OPF ONNX- // export is still landing (see PR description). The flag- // is here so flipping the enclave OFF on the local mode- // is a one-line change once OnnxRedactor is ready.- let ai: Arc<dyn Redactor> = Arc::new(TinfoilRedactor::from_env());- // The worker is destructive-only: it overwrites the source- // columns (`text` / `transcription` / `text_content` /- // `accessibility_text`) with the redacted text and stamps- // `*_redacted_at`. That's what the user-facing "AI PII- // removal" toggle means. The 20260507 migration drops the- // dead duplicate columns the old non-destructive mode used.- info!("starting async text-PII reconciliation worker (backend={backend})");- let pipeline = Pipeline::regex_then_ai(ai, PipelineConfig::default());- let pipeline_arc = Arc::new(pipeline) as Arc<dyn Redactor>;- let cfg = WorkerConfig {- tables: ALL_TARGET_TABLES.to_vec(),- ..Default::default()- };- let _ = Worker::new(db.pool.clone(), pipeline_arc, cfg).spawn();- }-- if config.async_image_pii_redaction {- use screenpipe_redact::adapters::rfdetr::{RfdetrConfig, RfdetrRedactor};- use screenpipe_redact::adapters::tinfoil_image::TinfoilImageRedactor;- use screenpipe_redact::image::worker::{ImageWorker, ImageWorkerConfig};- use screenpipe_redact::ImageRedactor;-- let pool = db.pool.clone();- if use_tinfoil {- info!("starting async image-PII worker (backend=tinfoil)");- let detector =- Arc::new(TinfoilImageRedactor::from_env()) as Arc<dyn ImageRedactor>;- let _ = ImageWorker::new(pool, detector, ImageWorkerConfig::default()).spawn();- } else {- // Local mode: rfdetr_v8 ONNX. First-run downloads- // ~108 MB from huggingface.co/screenpipe/pii-image-redactor- // and verifies SHA-256 before landing in ~/.screenpipe/models/.- tokio::spawn(async move {- match RfdetrRedactor::load_or_download(RfdetrConfig::default()).await {- Ok(detector) => {- info!("starting async image-PII worker (backend=local)");- let detector_arc =- Arc::new(detector) as Arc<dyn ImageRedactor>;- let _ = ImageWorker::new(- pool,- detector_arc,- ImageWorkerConfig::default(),- )- .spawn();- }- Err(e) => {- warn!(- "image-PII (local) enabled but couldn't load rfdetr_v8 model; \- skipping: {e}. switch to backend=tinfoil in Settings to use \- the cloud enclave instead."- );- }- }- });- }+ // ── AI PII removal — disabled in v2.4.161 ────────────────────────+ // The text + image PII workers are no longer spawned, even if+ // `async_pii_redaction` / `async_image_pii_redaction` are set+ // via CLI flag, settings file, or stale config. Reasoning:+ // - rfdetr_v8 had unacceptable precision AND recall on real+ // screenpipe content (over-redacted code/docs, missed+ // actual passwords). Combined with destructive writes+ // this destroyed users' timelines within hours of opt-in.+ // - The local text ONNX never shipped, so "Local" backend+ // silently routed text redaction to the cloud enclave —+ // mismatch with the toggle's label.+ // The Settings UI toggles were hidden in the same release;+ // schema fields stay on the config struct for serde compat.+ // Re-enable when we ship a model + benchmark we can stand+ // behind. Until then, log a one-shot warning if the user has+ // it enabled so they're not confused about why nothing happens.+ if config.async_pii_redaction || config.async_image_pii_redaction {+ warn!(+ "AI PII removal is disabled in this build (async_pii_redaction={}, \+ async_image_pii_redaction={}). The local rfdetr_v8 image model + \+ the unfinished local text ONNX were both unsafe defaults; the feature \+ will return when there's a model + benchmark we trust.",+ config.async_pii_redaction, config.async_image_pii_redaction+ );}Ok(Self {diff --git a/crates/screenpipe-engine/src/bin/screenpipe-engine.rs b/crates/screenpipe-engine/src/bin/screenpipe-engine.rsindex 3af216009..020f08afd 100644--- a/crates/screenpipe-engine/src/bin/screenpipe-engine.rs+++ b/crates/screenpipe-engine/src/bin/screenpipe-engine.rs@@ -1491,76 +1491,19 @@ async fn main() -> anyhow::Result<()> {});}- // Spawn the async PII reconciliation worker (issue #3185).- // Off by default — only runs when `--async-pii-redaction` is set.- // The capture path is unaffected either way.- if record_args.async_pii_redaction {- use screenpipe_redact::{- adapters::tinfoil::TinfoilRedactor,- pipeline::{Pipeline, PipelineConfig},- worker::{Worker, WorkerConfig, ALL_TARGET_TABLES},- Redactor,- };- use std::sync::Arc;-- info!("starting async PII reconciliation worker (destructive overwrite of source columns)");-- // Pipeline: regex pre-pass + Tinfoil enclave fallback. Regex- // catches structural PII deterministically and on-device; the- // Tinfoil call only fires for inputs longer than regex can- // fully cover (see PipelineConfig).- let tinfoil = Arc::new(TinfoilRedactor::from_env()) as Arc<dyn Redactor>;- let pipeline = Pipeline::regex_then_ai(tinfoil, PipelineConfig::default());- let pipeline_arc = Arc::new(pipeline) as Arc<dyn Redactor>;-- let worker_cfg = WorkerConfig {- tables: ALL_TARGET_TABLES.to_vec(),- ..Default::default()- };- let _worker_handle = Worker::new(db.pool.clone(), pipeline_arc, worker_cfg).spawn();- // The worker runs for the lifetime of the engine. We don't- // join its handle — when the process exits the runtime- // tears down the task. If we ever want graceful shutdown- // (drain in-flight HTTP calls), wire `_worker_handle` into- // the shutdown_tx flow.- }-- // Image-PII reconciliation worker (issue #3185 follow-up).- // Independent of the text worker — users can toggle either one- // without the other. Requires the rfdetr_v8.onnx model present- // and at least one of the `onnx-*` cargo features built.- if record_args.async_image_pii_redaction {- use screenpipe_redact::adapters::rfdetr::{RfdetrConfig, RfdetrRedactor};- use screenpipe_redact::image::worker::{ImageWorker, ImageWorkerConfig};- use screenpipe_redact::ImageRedactor;- use std::sync::Arc;-- // load_or_download fetches the ONNX from- // huggingface.co/screenpipe/pii-image-redactor on first run- // (~108 MB), verifies SHA-256, caches at- // ~/.screenpipe/models/rfdetr_v8.onnx. Subsequent starts are- // instant.- match RfdetrRedactor::load_or_download(RfdetrConfig::default()).await {- Ok(detector) => {- info!(- "starting async image-PII reconciliation worker (destructive overwrite of source JPGs)"- );- let cfg = ImageWorkerConfig::default();- let detector_arc = Arc::new(detector) as Arc<dyn ImageRedactor>;- let _img_handle = ImageWorker::new(db.pool.clone(), detector_arc, cfg).spawn();- }- Err(e) => {- // Loud-but-non-fatal: capture continues; user gets an- // explicit "model missing or download failed" message- // in the log, and the regular text redactor (if- // enabled) keeps running.- tracing::warn!(- "image-PII redaction enabled but couldn't load model; skipping: {e}. \- check network reachability to huggingface.co or pre-stage \- rfdetr_v8.onnx at ~/.screenpipe/models/."- );- }- }+ // AI PII removal — disabled in v2.4.161. The text + image PII+ // workers are no longer spawned even if `--async-pii-redaction` /+ // `--async-image-pii-redaction` are set. See server_core.rs in+ // the desktop app for the full rationale; same code path here.+ if record_args.async_pii_redaction || record_args.async_image_pii_redaction {+ tracing::warn!(+ "AI PII removal is disabled in this build (async_pii_redaction={}, \+ async_image_pii_redaction={}). The local rfdetr_v8 image model + \+ the unfinished local text ONNX were both unsafe defaults; the feature \+ will return when there's a model + benchmark we trust.",+ record_args.async_pii_redaction,+ record_args.async_image_pii_redaction+ );}// Add auto-destruct watcher