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: cargo fmt + remove unused deps (mime_guess, tempfile) in screenpipe-integrations
Louis Beaumontc78f5e2abbfd
diff --git a/Cargo.lock b/Cargo.lockindex 0e4fe5ad0..3084260bc 100644--- a/Cargo.lock+++ b/Cargo.lock@@ -5388,7 +5388,7 @@ dependencies = [[[package]]name = "screenpipe-audio"-version = "0.3.152"+version = "0.3.153"dependencies = ["anyhow","bytemuck",@@ -5444,7 +5444,7 @@ dependencies = [[[package]]name = "screenpipe-core"-version = "0.3.152"+version = "0.3.153"dependencies = ["accessibility","accessibility-sys",@@ -5485,7 +5485,7 @@ dependencies = [[[package]]name = "screenpipe-db"-version = "0.3.152"+version = "0.3.153"dependencies = ["anyhow","chrono",@@ -5510,7 +5510,7 @@ dependencies = [[[package]]name = "screenpipe-events"-version = "0.3.152"+version = "0.3.153"dependencies = ["anyhow","chrono",@@ -5528,7 +5528,7 @@ dependencies = [[[package]]name = "screenpipe-integrations"-version = "0.3.152"+version = "0.3.153"dependencies = ["anyhow","chrono",@@ -5549,7 +5549,7 @@ dependencies = [[[package]]name = "screenpipe-server"-version = "0.3.152"+version = "0.3.153"dependencies = ["anyhow","async-trait",@@ -5608,7 +5608,7 @@ dependencies = [[[package]]name = "screenpipe-vision"-version = "0.3.152"+version = "0.3.153"dependencies = ["accessibility-sys","anyhow",diff --git a/crates/screenpipe-audio/src/meeting_detector.rs b/crates/screenpipe-audio/src/meeting_detector.rsindex d2cdb710d..6555bcddb 100644--- a/crates/screenpipe-audio/src/meeting_detector.rs+++ b/crates/screenpipe-audio/src/meeting_detector.rs@@ -446,8 +446,7 @@ mod tests {let detector = MeetingDetector::new();// Simulate speech that happened longer ago than the detection window- let expired_ts =- now_millis() - AUDIO_CALL_DETECTION_WINDOW.as_millis() as i64 - 1000;+ let expired_ts = now_millis() - AUDIO_CALL_DETECTION_WINDOW.as_millis() as i64 - 1000;detector.last_input_speech_ts.store(expired_ts, Ordering::Relaxed);diff --git a/crates/screenpipe-audio/src/vad/mod.rs b/crates/screenpipe-audio/src/vad/mod.rsindex bcf77e03a..f26a74b0d 100644--- a/crates/screenpipe-audio/src/vad/mod.rs+++ b/crates/screenpipe-audio/src/vad/mod.rs@@ -24,9 +24,11 @@ pub enum VadSensitivity {impl VadSensitivity {pub fn min_speech_ratio(&self) -> f32 {match self {- VadSensitivity::Low => 0.01, // 1% of frames must be speech+ // High sensitivity = detect even quiet speech (low threshold)+ VadSensitivity::High => 0.01, // 1% of frames must be speechVadSensitivity::Medium => 0.05, // 5% of frames must be speech- VadSensitivity::High => 0.2, // 20% of frames must be speech+ // Low sensitivity = only loud/clear speech (high threshold)+ VadSensitivity::Low => 0.2, // 20% of frames must be speech}}}diff --git a/crates/screenpipe-db/src/db.rs b/crates/screenpipe-db/src/db.rsindex 7cb8aaf63..3bf614588 100644--- a/crates/screenpipe-db/src/db.rs+++ b/crates/screenpipe-db/src/db.rs@@ -792,14 +792,12 @@ impl DatabaseManager {// Calculate offset outside the write tx too (read-only query)let offset_index: i64 = match offset_index {Some(idx) => idx,- None => {- sqlx::query_scalar(- "SELECT COALESCE(MAX(offset_index), -1) + 1 FROM frames WHERE video_chunk_id = ?1",- )- .bind(video_chunk_id)- .fetch_one(&self.pool)- .await?- }+ None => sqlx::query_scalar(+ "SELECT COALESCE(MAX(offset_index), -1) + 1 FROM frames WHERE video_chunk_id = ?1",+ )+ .bind(video_chunk_id)+ .fetch_one(&self.pool)+ .await?,};debug!("insert_frame Using offset_index: {}", offset_index);diff --git a/crates/screenpipe-db/tests/fts_contention_test.rs b/crates/screenpipe-db/tests/fts_contention_test.rsindex b196b40f2..d3748d2a4 100644--- a/crates/screenpipe-db/tests/fts_contention_test.rs+++ b/crates/screenpipe-db/tests/fts_contention_test.rs@@ -283,7 +283,9 @@ mod fts_contention_tests {eprintln!("Frame insert latencies during micro-batch FTS: avg={:?}, max={:?}, count={}",- avg_latency, max_latency, latencies.len()+ avg_latency,+ max_latency,+ latencies.len());assert_eq!(latencies.len(), 10, "All 10 frame inserts should complete");diff --git a/crates/screenpipe-db/tests/query_plan_test.rs b/crates/screenpipe-db/tests/query_plan_test.rsindex 1c143ab56..66121881e 100644--- a/crates/screenpipe-db/tests/query_plan_test.rs+++ b/crates/screenpipe-db/tests/query_plan_test.rs@@ -480,11 +480,12 @@ mod query_plan_tests {let read_handle = tokio::spawn(async move {// Read-only query (uses pool directly, not write semaphore)- let _rows: Vec<(i64,)> =- sqlx::query_as::<_, (i64,)>("SELECT id FROM frames ORDER BY timestamp DESC LIMIT 10")- .fetch_all(&pool)- .await- .unwrap();+ let _rows: Vec<(i64,)> = sqlx::query_as::<_, (i64,)>(+ "SELECT id FROM frames ORDER BY timestamp DESC LIMIT 10",+ )+ .fetch_all(&pool)+ .await+ .unwrap();});// Both should complete within 5 secondsdiff --git a/crates/screenpipe-integrations/Cargo.toml b/crates/screenpipe-integrations/Cargo.tomlindex a6e2e438f..518bd49a7 100644--- a/crates/screenpipe-integrations/Cargo.toml+++ b/crates/screenpipe-integrations/Cargo.toml@@ -13,9 +13,7 @@ reqwest = { workspace = true }serde_json = "1.0"tokio = { version = "1.0", features = ["full"] }log = "0.4"-tempfile = "3.2"anyhow = "1.0"-mime_guess = "2.0.5"screenpipe-core = { path = "../screenpipe-core" }tracing = { workspace = true }diff --git a/crates/screenpipe-server/src/routes/health.rs b/crates/screenpipe-server/src/routes/health.rsindex c646b9b77..142dddfda 100644--- a/crates/screenpipe-server/src/routes/health.rs+++ b/crates/screenpipe-server/src/routes/health.rs@@ -284,7 +284,8 @@ pub async fn health_check(State(state): State<Arc<AppState>>) -> JsonResponse<Helast_audio_timestamp: if last_audio_ts > 0 {Utc.timestamp_opt(last_audio_ts as i64, 0).single()} else if most_recent_audio_timestamp > 0 {- Utc.timestamp_opt(most_recent_audio_timestamp as i64, 0).single()+ Utc.timestamp_opt(most_recent_audio_timestamp as i64, 0)+ .single()} else {None},