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
Bump app to v2.4.282: wire screenpipe-engine binary to v45_phase3 ONNX
Louis Beaumont2a5f4bdebba3
diff --git a/apps/screenpipe-app-tauri/src-tauri/Cargo.toml b/apps/screenpipe-app-tauri/src-tauri/Cargo.tomlindex f22580b6a..9f1493ea7 100644--- a/apps/screenpipe-app-tauri/src-tauri/Cargo.toml+++ b/apps/screenpipe-app-tauri/src-tauri/Cargo.toml@@ -2,7 +2,7 @@[package]name = "screenpipe-app"-version = "2.4.281"+version = "2.4.282"description = "24/7 memory for your desktop. 100% local."authors = ["you"]license = ""diff --git a/crates/screenpipe-engine/src/bin/screenpipe-engine.rs b/crates/screenpipe-engine/src/bin/screenpipe-engine.rsindex d46cb2741..054841dd8 100644--- a/crates/screenpipe-engine/src/bin/screenpipe-engine.rs+++ b/crates/screenpipe-engine/src/bin/screenpipe-engine.rs@@ -1642,6 +1642,7 @@ async fn main() -> anyhow::Result<()> {if config.async_pii_redaction {use screenpipe_redact::{adapters::{+ onnx::{OnnxConfig, OnnxRedactor},opf::{OpfAdapter, OpfConfig},tinfoil::TinfoilRedactor,},@@ -1655,50 +1656,78 @@ async fn main() -> anyhow::Result<()> {// Pipeline: regex pre-pass + AI fallback. Regex catches// structural PII deterministically and on-device. AI step- // resolves to:- // 1. local opf-rs (candle, ~74 ms p50 on Mac CPU, 41 ms on- // Metal). First run downloads ~2.8 GB from- // huggingface.co/screenpipe/pii-text-redactor and verifies- // SHA-256 before landing at ~/.screenpipe/models/opf-v6/.- // Spawned off the boot path so a slow first-run pull- // doesn't block the engine.- // 2. Tinfoil confidential-compute enclave when TINFOIL_*- // env vars are set and local opf-rs is unavailable.- // 3. regex-only otherwise (still destructive — overwrites+ // resolves to (preference order):+ // 1. v45_phase3 ONNX (xlm-roberta-base fine-tune, INT8, ~278 MB,+ // 9 ms p50 on CPU, CoreML on macOS / DirectML on Windows+ // via the redact-onnx-* CI feature). First run downloads+ // from huggingface.co/screenpipe/pii-redactor under+ // v45_phase3_onnx/. Same checkpoint the Tinfoil container+ // and the desktop app's own worker use, so outputs match+ // across surfaces.+ // 2. Legacy opf-rs (candle, OPF v6, ~74 ms p50 on Mac CPU,+ // ~2.8 GB) if v45 ONNX isn't compiled in or the download+ // fails.+ // 3. Tinfoil confidential-compute enclave when TINFOIL_*+ // env vars are set and both local adapters are unavailable.+ // 4. Regex-only otherwise (still destructive — overwrites// regex-redacted text into the source columns).let pool = db.pool.clone();tokio::spawn(async move {info!(- "fetching local OPF v6 checkpoint (~2.8 GB on first run, cached at \- ~/.screenpipe/models/opf-v6/)"+ "fetching v45 phase 3 ONNX text redactor (~278 MB INT8 on first run, \+ cached at ~/.screenpipe/models/v45_phase3_onnx/)");- let pipeline = match OpfAdapter::load_or_download(OpfConfig::default()).await {+ let pipeline = match OnnxRedactor::load_or_download(OnnxConfig::default()).await {Ok(adapter) => {info!(- "text-PII AI step: local opf-rs (candle) — lazy load on first \- batch, idle-unload after 60s of no work"+ "text-PII AI step: local v45_phase3 ONNX — same checkpoint as the \+ desktop app + Tinfoil container, sub-10 ms p50 on CPU");- // Wrap in Arc first so we can spawn the idle- // unloader (which needs `Arc<Self>`) and still- // hand the same Arc to the Pipeline.- let adapter = Arc::new(adapter);- let _unloader = Arc::clone(&adapter).spawn_idle_unloader();- let ai: Arc<dyn Redactor> = adapter;+ let ai: Arc<dyn Redactor> = Arc::new(adapter);Pipeline::regex_then_ai(ai, PipelineConfig::default())}- Err(e) => {- if std::env::var("TINFOIL_API_KEY").is_ok()- || std::env::var("TINFOIL_BASE_URL").is_ok()- {- info!("text-PII AI step: tinfoil enclave (local opf-rs unavailable: {e})");- let ai: Arc<dyn Redactor> = Arc::new(TinfoilRedactor::from_env());- Pipeline::regex_then_ai(ai, PipelineConfig::default())- } else {- tracing::warn!(- "text-PII AI step disabled — local opf-rs unavailable ({e}) and no \- TINFOIL_* env vars set. Worker will run regex-only."- );- Pipeline::regex_only()+ Err(onnx_err) => {+ tracing::warn!(+ "couldn't load v45 phase 3 ONNX redactor ({onnx_err}); falling back \+ to OPF v6 candle"+ );+ info!(+ "fetching local OPF v6 checkpoint (~2.8 GB on first run, cached at \+ ~/.screenpipe/models/opf-v6/)"+ );+ match OpfAdapter::load_or_download(OpfConfig::default()).await {+ Ok(adapter) => {+ info!(+ "text-PII AI step: local opf-rs (candle) fallback — lazy load \+ on first batch, idle-unload after 60s of no work"+ );+ // Wrap in Arc first so we can spawn the idle+ // unloader (which needs `Arc<Self>`) and still+ // hand the same Arc to the Pipeline.+ let adapter = Arc::new(adapter);+ let _unloader = Arc::clone(&adapter).spawn_idle_unloader();+ let ai: Arc<dyn Redactor> = adapter;+ Pipeline::regex_then_ai(ai, PipelineConfig::default())+ }+ Err(e) => {+ if std::env::var("TINFOIL_API_KEY").is_ok()+ || std::env::var("TINFOIL_BASE_URL").is_ok()+ {+ info!(+ "text-PII AI step: tinfoil enclave (local adapters \+ unavailable: opf-rs={e})"+ );+ let ai: Arc<dyn Redactor> = Arc::new(TinfoilRedactor::from_env());+ Pipeline::regex_then_ai(ai, PipelineConfig::default())+ } else {+ tracing::warn!(+ "text-PII AI step disabled — both v45 ONNX and opf-rs \+ unavailable ({e}), and no TINFOIL_* env vars set. Worker \+ will run regex-only."+ );+ Pipeline::regex_only()+ }+ }}}};