Skip to content

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

Bump app to v2.4.188 — rfdetr-mlx feature wiring + macOS-26 runtime gate — release-app

Louis Beaumontd7f564bed2ae
diff --git a/apps/screenpipe-app-tauri/src-tauri/Cargo.lock b/apps/screenpipe-app-tauri/src-tauri/Cargo.lock
index a2fba239a..39d798e8d 100644
--- a/apps/screenpipe-app-tauri/src-tauri/Cargo.lock
+++ b/apps/screenpipe-app-tauri/src-tauri/Cargo.lock
@@ -7064,6 +7064,7 @@ version = "0.25.3"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "f3a0f592c5839b0237b3072530b1d3c503923579a2009ee0761df3edd1b1f27b"
dependencies = [
+ "bytemuck",
"dyn-clone",
"half",
"itertools 0.14.0",
@@ -7077,6 +7078,7 @@ dependencies = [
"num_enum",
"parking_lot",
"paste",
+ "safetensors 0.6.2",
"smallvec 1.15.1",
"strum",
"thiserror 2.0.18",
@@ -10406,6 +10408,16 @@ dependencies = [
"serde_json",
]
+[[package]]
+name = "safetensors"
+version = "0.6.2"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "172dd94c5a87b5c79f945c863da53b2ebc7ccef4eca24ac63cca66a41aab2178"
+dependencies = [
+ "serde",
+ "serde_json",
+]
+
[[package]]
name = "safetensors"
version = "0.7.0"
@@ -10557,7 +10569,7 @@ dependencies = [
[[package]]
name = "screenpipe-app"
-version = "2.4.186"
+version = "2.4.188"
dependencies = [
"aes",
"anyhow",
@@ -10949,6 +10961,7 @@ dependencies = [
"ort",
"regex",
"reqwest 0.13.3",
+ "screenpipe-rfdetr-mlx",
"serde",
"sha2 0.10.9",
"sqlx",
@@ -10958,6 +10971,17 @@ dependencies = [
"tracing",
]
+[[package]]
+name = "screenpipe-rfdetr-mlx"
+version = "0.3.327"
+dependencies = [
+ "image 0.25.10",
+ "mlx-rs",
+ "mlx-sys",
+ "safetensors 0.6.2",
+ "thiserror 1.0.69",
+]
+
[[package]]
name = "screenpipe-screen"
version = "0.3.327"
diff --git a/apps/screenpipe-app-tauri/src-tauri/Cargo.toml b/apps/screenpipe-app-tauri/src-tauri/Cargo.toml
index ea0ffe8f1..2d5a31734 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.187"
+version = "2.4.188"
description = "24/7 memory for your desktop. 100% local."
authors = ["you"]
license = ""
@@ -251,6 +251,10 @@ qwen3-asr = ["screenpipe-engine/qwen3-asr"]
parakeet = ["screenpipe-engine/parakeet"]
# macOS only — requires Apple MLX (Metal)
parakeet-mlx = ["screenpipe-engine/parakeet-mlx"]
+# Apple Silicon only — image-PII detector via mlx-rs (~6× faster than
+# ONNX CoreML EP). Forwards to screenpipe-engine which forwards to
+# screenpipe-redact/mlx-mac.
+rfdetr-mlx = ["screenpipe-engine/rfdetr-mlx"]
jemalloc = ["tikv-jemallocator"]
diff --git a/crates/screenpipe-redact/src/adapters/rfdetr_mlx.rs b/crates/screenpipe-redact/src/adapters/rfdetr_mlx.rs
index 162edb1fc..c5e40061a 100644
--- a/crates/screenpipe-redact/src/adapters/rfdetr_mlx.rs
+++ b/crates/screenpipe-redact/src/adapters/rfdetr_mlx.rs
@@ -33,6 +33,48 @@ use crate::SpanLabel;
const NAME: &str = "rfdetr-mlx";
const VERSION: u32 = 9; // tracks rfdetr_v9 weights
+/// Minimum macOS major version that's safe for MLX at runtime.
+///
+/// Mirrors `screenpipe_config::PARAKEET_MIN_MACOS_MAJOR` — mlx-sys's
+/// pre-compiled `.metallib` uses Metal 3.2+ features (simdgroup_matrix
+/// kernels) that segfault during Metal init on older macOS. The
+/// build-time deployment target gate (14.0) lets the binary *launch*
+/// on macOS 14+; this runtime gate prevents us from actually invoking
+/// MLX on anything below 26.
+const MIN_MACOS_MAJOR: u32 = 26;
+
+/// Returns true iff this host can safely run MLX at runtime.
+///
+/// On macOS aarch64, shells out to `sw_vers -productVersion` and
+/// gates on [`MIN_MACOS_MAJOR`] — same shape as
+/// `screenpipe_config::macos_major_version`, inlined here so this
+/// crate doesn't pick up screenpipe-config just for one fn. On any
+/// other platform this always returns `false` — the cfg gates
+/// elsewhere keep the rest of the module from compiling, but having
+/// this fn always callable simplifies the public API.
+fn is_runtime_supported() -> bool {
+ #[cfg(all(target_os = "macos", target_arch = "aarch64"))]
+ {
+ macos_major_version()
+ .map(|v| v >= MIN_MACOS_MAJOR)
+ .unwrap_or(false)
+ }
+ #[cfg(not(all(target_os = "macos", target_arch = "aarch64")))]
+ {
+ false
+ }
+}
+
+#[cfg(all(target_os = "macos", target_arch = "aarch64"))]
+fn macos_major_version() -> Option<u32> {
+ let output = std::process::Command::new("sw_vers")
+ .arg("-productVersion")
+ .output()
+ .ok()?;
+ let s = String::from_utf8_lossy(&output.stdout);
+ s.trim().split('.').next()?.parse().ok()
+}
+
/// Configuration for [`RfdetrMlxRedactor`].
#[derive(Debug, Clone)]
pub struct RfdetrMlxConfig {
@@ -86,7 +128,19 @@ impl RfdetrMlxConfig {
/// `<model_path>.partial`, gets verified, then renames over
/// `<model_path>`. A killed process leaves at most a `.partial`
/// that the next call cleans up.
+ ///
+ /// Returns [`RedactError::Unavailable`] without touching the disk
+ /// if the host macOS is too old for MLX at runtime (see
+ /// [`is_runtime_supported`]) — the engine falls through to the
+ /// ONNX adapter cleanly, and we don't waste a 108 MB download on
+ /// a machine that can't use it.
pub async fn ensure_model_present(&self) -> Result<(), RedactError> {
+ if !is_runtime_supported() {
+ return Err(RedactError::Unavailable(format!(
+ "rfdetr-mlx requires macOS {MIN_MACOS_MAJOR}+ at runtime; \
+ fall through to the ONNX adapter"
+ )));
+ }
if self.model_path.exists() && Self::sha256_matches(&self.model_path)? {
return Ok(());
}
@@ -199,13 +253,18 @@ mod imp {
impl RfdetrMlxRedactor {
/// Sync constructor. Returns [`RedactError::Unavailable`] if
- /// the safetensors file is missing — caller can fall back to
- /// the ONNX adapter.
+ /// the safetensors file is missing or the host macOS is too
+ /// old for MLX — caller can fall back to the ONNX adapter.
pub fn load(cfg: RfdetrMlxConfig) -> Result<Self, RedactError> {
+ if !is_runtime_supported() {
+ return Err(RedactError::Unavailable(format!(
+ "rfdetr-mlx requires macOS {MIN_MACOS_MAJOR}+ at runtime"
+ )));
+ }
if !cfg.model_path.exists() {
return Err(RedactError::Unavailable(format!(
"rfdetr-mlx safetensors not found at {} \
- (convert from rfdetr_v9.onnx via convert/onnx_to_mlx.py)",
+ (download via RfdetrMlxConfig::ensure_model_present)",
cfg.model_path.display()
)));
}