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(ci): rustfmt drift across a11y/connect/engine (unbreak Code Quality)
Louis Beaumont066291bc4ccd
diff --git a/crates/screenpipe-a11y/src/platform/macos.rs b/crates/screenpipe-a11y/src/platform/macos.rsindex 81cd8ba98..dcccd2e39 100644--- a/crates/screenpipe-a11y/src/platform/macos.rs+++ b/crates/screenpipe-a11y/src/platform/macos.rs@@ -16,7 +16,7 @@ use crossbeam_channel::{bounded, Receiver, Sender};use parking_lot::Mutex;use screenpipe_core::pii_removal::remove_pii;use std::ffi::c_void;-use std::sync::atomic::{AtomicBool, AtomicI8, AtomicI32, AtomicPtr, Ordering};+use std::sync::atomic::{AtomicBool, AtomicI32, AtomicI8, AtomicPtr, Ordering};use std::sync::Arc;use std::thread;use std::time::Instant;@@ -768,12 +768,9 @@ fn run_event_tap(.name("ctx-capture".into()).spawn(move || {while let Ok(req) = context_rx.recv() {- if let Some(element) = get_element_at_position(- req.x,- req.y,- &req.config,- req.app_pid,- ) {+ if let Some(element) =+ get_element_at_position(req.x, req.y, &req.config, req.app_pid)+ {let ctx_event = UiEvent {id: None,timestamp: Utc::now(),diff --git a/crates/screenpipe-connect/src/remote_sync.rs b/crates/screenpipe-connect/src/remote_sync.rsindex 62b535b3c..0762e41cf 100644--- a/crates/screenpipe-connect/src/remote_sync.rs+++ b/crates/screenpipe-connect/src/remote_sync.rs@@ -338,7 +338,9 @@ const EXEC_TIMEOUT: std::time::Duration = std::time::Duration::from_secs(10 * 60pub async fn exec_remote(config: &SyncConfig, command: &str) -> Result<ExecResult> {tokio::time::timeout(EXEC_TIMEOUT, exec_remote_inner(config, command)).await- .map_err(|_| anyhow::anyhow!("remote command timed out after {}s", EXEC_TIMEOUT.as_secs()))?+ .map_err(|_| {+ anyhow::anyhow!("remote command timed out after {}s", EXEC_TIMEOUT.as_secs())+ })?}async fn exec_remote_inner(config: &SyncConfig, command: &str) -> Result<ExecResult> {@@ -1158,7 +1160,9 @@ mod tests {assert!(should_skip("thing.bak"));// Stale secret-store copies must NEVER leave the machine.assert!(should_skip("store.bin.bak-20260423-150300"));- assert!(should_skip("store.bin.encrypted-before-recovery-20260514-155057"));+ assert!(should_skip(+ "store.bin.encrypted-before-recovery-20260514-155057"+ ));// ...but the live secret store and real media are kept.assert!(!should_skip("store.bin"));assert!(!should_skip("data"));diff --git a/crates/screenpipe-engine/src/archive.rs b/crates/screenpipe-engine/src/archive.rsindex 825b3c8a8..1cf09adc7 100644--- a/crates/screenpipe-engine/src/archive.rs+++ b/crates/screenpipe-engine/src/archive.rs@@ -554,7 +554,11 @@ pub async fn archive_download(};}- spawn_download_task(manager, output_dir.clone(), state.archive_state.download.clone());+ spawn_download_task(+ manager,+ output_dir.clone(),+ state.archive_state.download.clone(),+ );info!("archive-download: started → {}", output_dir.display());@@ -720,7 +724,11 @@ struct WindowWalker {impl WindowWalker {fn new(start: DateTime<Utc>, end: DateTime<Utc>, page_limit: usize) -> Self {- let stack = if start <= end { vec![(start, end)] } else { Vec::new() };+ let stack = if start <= end {+ vec![(start, end)]+ } else {+ Vec::new()+ };Self { stack, page_limit }}@@ -1623,7 +1631,10 @@ mod tests {#[test]fn sniff_media_extension_detects_types() {- assert_eq!(sniff_media_extension(&[0xFF, 0xD8, 0xFF, 0xE0, 0x00]), "jpg");+ assert_eq!(+ sniff_media_extension(&[0xFF, 0xD8, 0xFF, 0xE0, 0x00]),+ "jpg"+ );assert_eq!(sniff_media_extension(b"\x89PNG\r\n\x1a\nrest"), "png");let mut mp4 = vec![0x00, 0x00, 0x00, 0x20];@@ -1716,7 +1727,10 @@ mod tests {let (covered, steps, truncated) = simulate(&blobs, 10);let expected: HashSet<i64> = blobs.iter().copied().collect();- assert_eq!(covered, expected, "every blob must be downloaded exactly once");+ assert_eq!(+ covered, expected,+ "every blob must be downloaded exactly once"+ );assert_eq!(truncated, 0, "no window should be truncated");assert!(steps > 1, "must have split at least once");}diff --git a/crates/screenpipe-engine/src/cli/agent.rs b/crates/screenpipe-engine/src/cli/agent.rsindex bd62382e8..0bebd082f 100644--- a/crates/screenpipe-engine/src/cli/agent.rs+++ b/crates/screenpipe-engine/src/cli/agent.rs@@ -227,7 +227,10 @@ fn merge_mcp_yaml(path: &Path, remote: bool, api_url: &str) -> Result<()> {let existing = std::fs::read_to_string(path).unwrap_or_default();if existing.contains("screenpipe-mcp") {- println!(" • {} already references screenpipe-mcp; left as-is", path.display());+ println!(+ " • {} already references screenpipe-mcp; left as-is",+ path.display()+ );return Ok(());}if existing.contains("mcp_servers:") {@@ -264,7 +267,10 @@ fn merge_mcp_toml(path: &Path, remote: bool, api_url: &str) -> Result<()> {);let existing = std::fs::read_to_string(path).unwrap_or_default();if existing.contains("[mcp_servers.screenpipe]") {- println!(" • {} already has [mcp_servers.screenpipe]; left as-is", path.display());+ println!(+ " • {} already has [mcp_servers.screenpipe]; left as-is",+ path.display()+ );return Ok(());}let mut out = existing;@@ -288,7 +294,10 @@ mod tests {fn test_host_port() {assert_eq!(host_port("http://localhost:3030"), "localhost:3030");assert_eq!(host_port("https://1.2.3.4:3030/"), "1.2.3.4:3030");- assert_eq!(host_port("http://box.tail.ts.net:3030"), "box.tail.ts.net:3030");+ assert_eq!(+ host_port("http://box.tail.ts.net:3030"),+ "box.tail.ts.net:3030"+ );}#[test]diff --git a/crates/screenpipe-engine/src/cli/service.rs b/crates/screenpipe-engine/src/cli/service.rsindex 22c861fd0..31320f61f 100644--- a/crates/screenpipe-engine/src/cli/service.rs+++ b/crates/screenpipe-engine/src/cli/service.rs@@ -21,7 +21,11 @@ pub enum ServiceCommand {/// Args appended to `screenpipe record`. Default is serve-only (no/// capture) — right for a headless box that just serves synced/cloud/// data to an agent. Pass `--record-args ""` to capture instead.- #[arg(long, allow_hyphen_values = true, default_value = "--disable-vision --disable-audio")]+ #[arg(+ long,+ allow_hyphen_values = true,+ default_value = "--disable-vision --disable-audio"+ )]record_args: String,},/// Stop + remove the service.@@ -88,7 +92,9 @@ fn launchd_plist(program_args: &[String]) -> String {}fn xml_escape(s: &str) -> String {- s.replace('&', "&").replace('<', "<").replace('>', ">")+ s.replace('&', "&")+ .replace('<', "<")+ .replace('>', ">")}fn screenpipe_exe() -> Result<String> {@@ -143,7 +149,15 @@ fn install(record_args: &str) -> Result<()> {run_quiet("loginctl", &["enable-linger", &user]);}run("systemctl", &["--user", "daemon-reload"])?;- run("systemctl", &["--user", "enable", "--now", &format!("{SERVICE_NAME}.service")])?;+ run(+ "systemctl",+ &[+ "--user",+ "enable",+ "--now",+ &format!("{SERVICE_NAME}.service"),+ ],+ )?;println!(" ✓ screenpipe service enabled + started — runs at boot, restarts on crash");println!(" logs: journalctl --user -u {SERVICE_NAME} -f");Ok(())@@ -160,7 +174,8 @@ fn install(record_args: &str) -> Result<()> {let dir = home.join("Library/LaunchAgents");std::fs::create_dir_all(&dir).context("create LaunchAgents dir")?;let plist_path = dir.join(format!("{LAUNCHD_LABEL}.plist"));- std::fs::write(&plist_path, &plist).with_context(|| format!("write {}", plist_path.display()))?;+ std::fs::write(&plist_path, &plist)+ .with_context(|| format!("write {}", plist_path.display()))?;println!(" ✓ wrote {}", plist_path.display());let p = plist_path.to_string_lossy().into_owned();@@ -212,7 +227,12 @@ fn uninstall() -> Result<()> {fn status() -> Result<()> {let _ = run("systemctl",- &["--user", "status", "--no-pager", &format!("{SERVICE_NAME}.service")],+ &[+ "--user",+ "status",+ "--no-pager",+ &format!("{SERVICE_NAME}.service"),+ ],);Ok(())}@@ -234,7 +254,10 @@ mod tests {#[test]fn test_systemd_unit() {- let u = systemd_unit("/usr/local/bin/screenpipe record --disable-vision", "/usr/bin");+ let u = systemd_unit(+ "/usr/local/bin/screenpipe record --disable-vision",+ "/usr/bin",+ );assert!(u.contains("ExecStart=/usr/local/bin/screenpipe record --disable-vision"));assert!(u.contains("Restart=always"));assert!(u.contains("WantedBy=default.target"));