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
chore: updates
Louis Beaumontfa14f4f8f082
diff --git a/screenpipe-app-tauri/src-tauri/Cargo.lock b/screenpipe-app-tauri/src-tauri/Cargo.lockindex 370bb011e..60686c5e3 100755--- a/screenpipe-app-tauri/src-tauri/Cargo.lock+++ b/screenpipe-app-tauri/src-tauri/Cargo.lock@@ -1458,17 +1458,35 @@ dependencies = ["half",]+[[package]]+name = "cidre"+version = "0.13.1"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "aeb5b1ace98faf1a55e3631d63427f267897cfab7b65b1d5928cb0b8e6a4a194"+dependencies = [+ "cidre-macros 0.4.0",+ "half",+ "parking_lot",+ "tokio",+]+[[package]]name = "cidre"version = "0.14.0"source = "git+https://github.com/yury/cidre.git#1c1f8bc2d8246dfb9d394a62faf1b2d72d8a9921"dependencies = [- "cidre-macros",+ "cidre-macros 0.5.0","half","parking_lot","tokio",]+[[package]]+name = "cidre-macros"+version = "0.4.0"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "5da2cdee573cf967cf4fec1f95f12a16dce31efb6d104238a8cb114cbdae1780"+[[package]]name = "cidre-macros"version = "0.5.0"@@ -1959,7 +1977,7 @@ version = "0.15.3"source = "git+https://github.com/louis030195/cpal.git?branch=main#c3eaee9cb793c90ec54da63f50908c2cb6ce95a7"dependencies = ["alsa",- "cidre",+ "cidre 0.14.0","core-foundation-sys 0.8.7","coreaudio-rs","dasp_sample",@@ -8552,7 +8570,7 @@ name = "sck-rs"version = "0.1.0"source = "git+https://github.com/louis030195/sck-rs#4bb14e4e18722fad1bdc8a105f568dbc30acfe8a"dependencies = [- "cidre",+ "cidre 0.14.0","core-foundation 0.10.1","core-graphics 0.24.0","image 0.25.5",@@ -8574,6 +8592,24 @@ version = "1.2.0"source = "registry+https://github.com/rust-lang/crates.io-index"checksum = "94143f37725109f92c262ed2cf5e59bce7498c01bcc1502d7b9afe439a4e9f49"+[[package]]+name = "screenpipe-accessibility"+version = "0.1.0"+dependencies = [+ "anyhow",+ "chrono",+ "cidre 0.13.1",+ "crossbeam-channel",+ "parking_lot",+ "regex",+ "screenpipe-core",+ "screenpipe-db",+ "serde",+ "serde_json",+ "tracing",+ "windows 0.58.0",+]+[[package]]name = "screenpipe-app"version = "2.0.212"@@ -8821,7 +8857,7 @@ dependencies = ["candle-nn","candle-transformers","chrono",- "cidre",+ "cidre 0.14.0","clap","clap_complete","colored",@@ -8846,6 +8882,7 @@ dependencies = ["regex","reqwest","rust-stemmers",+ "screenpipe-accessibility","screenpipe-audio","screenpipe-core","screenpipe-db",@@ -8882,7 +8919,7 @@ dependencies = ["atspi-proxies","base64 0.22.1","chrono",- "cidre",+ "cidre 0.14.0","clap","core-foundation 0.10.1","image 0.25.5",diff --git a/screenpipe-app-tauri/src-tauri/Cargo.toml b/screenpipe-app-tauri/src-tauri/Cargo.tomlindex 6ebc81e0a..e4638e168 100644--- a/screenpipe-app-tauri/src-tauri/Cargo.toml+++ b/screenpipe-app-tauri/src-tauri/Cargo.toml@@ -105,7 +105,7 @@ md5 = "0.7"screenpipe-core = { path = "../../screenpipe-core", features = ["cloud-sync"] }# Embedded screenpipe server-screenpipe-server = { path = "../../screenpipe-server", default-features = false }+screenpipe-server = { path = "../../screenpipe-server", default-features = false, features = ["ui-events"] }screenpipe-vision = { path = "../../screenpipe-vision" }screenpipe-audio = { path = "../../screenpipe-audio" }screenpipe-db = { path = "../../screenpipe-db" }diff --git a/screenpipe-app-tauri/src-tauri/src/embedded_server.rs b/screenpipe-app-tauri/src-tauri/src/embedded_server.rsindex 460f98158..c4dff3066 100644--- a/screenpipe-app-tauri/src-tauri/src/embedded_server.rs+++ b/screenpipe-app-tauri/src-tauri/src/embedded_server.rs@@ -46,6 +46,8 @@ pub struct EmbeddedServerConfig {impl EmbeddedServerConfig {pub fn from_store(store: &SettingsStore, data_dir: PathBuf) -> Self {+ info!("Building EmbeddedServerConfig from store: enable_ui_events={}, disable_audio={}, disable_vision={}",+ store.enable_ui_events, store.disable_audio, store.disable_vision);Self {port: store.port,data_dir,@@ -350,6 +352,7 @@ pub async fn start_embedded_server(}// Start UI event recording (accessibility events)+ info!("UI events setting: enable_ui_events={}", config.enable_ui_events);if config.enable_ui_events {let ui_config = UiRecorderConfig {enabled: true,@@ -358,8 +361,10 @@ pub async fn start_embedded_server(let db_clone = db.clone();tokio::spawn(async move {match start_ui_recording(db_clone, ui_config).await {- Ok(_handle) => {+ Ok(handle) => {info!("UI event recording started successfully");+ // Keep the handle alive - don't drop it or UI recording stops+ std::mem::forget(handle);}Err(e) => {error!("Failed to start UI event recording: {}", e);diff --git a/screenpipe-app-tauri/src-tauri/src/obsidian_sync.rs b/screenpipe-app-tauri/src-tauri/src/obsidian_sync.rsindex 91dc4d493..39408bd0a 100644--- a/screenpipe-app-tauri/src-tauri/src/obsidian_sync.rs+++ b/screenpipe-app-tauri/src-tauri/src/obsidian_sync.rs@@ -4,13 +4,14 @@//! The agent queries screenpipe API in chunks and generates markdown summaries.use crate::pi;+use crate::store::{ObsidianSettingsStore, SettingsStore};use serde::{Deserialize, Serialize};use specta::Type;use std::path::PathBuf;use std::sync::Arc;use tauri::{AppHandle, Emitter};use tokio::sync::Mutex;-use tracing::{debug, info, warn};+use tracing::{info, warn};/// Obsidian sync settings stored in the app store#[derive(Debug, Clone, Serialize, Deserialize, Type, Default)]@@ -367,6 +368,19 @@ pub async fn obsidian_start_scheduler(// Stop existing scheduler if anyobsidian_stop_scheduler(state.clone()).await?;+ // Save settings to persistent store for auto-restart on app launch+ let store_settings = ObsidianSettingsStore {+ enabled: settings.enabled,+ vault_path: settings.vault_path.clone(),+ notes_path: settings.notes_path.clone(),+ sync_interval_minutes: settings.sync_interval_minutes,+ custom_prompt: settings.custom_prompt.clone(),+ sync_hours: settings.sync_hours,+ };+ if let Err(e) = store_settings.save(&app) {+ warn!("Failed to save obsidian settings to store: {}", e);+ }+if !settings.enabled || settings.sync_interval_minutes == 0 {info!("Obsidian sync scheduler not started (disabled or interval=0)");return Ok(());@@ -385,20 +399,25 @@ pub async fn obsidian_start_scheduler();let handle = tokio::spawn(async move {+ info!("Obsidian scheduler task started, interval: {}min", interval_mins);+let mut interval =tokio::time::interval(tokio::time::Duration::from_secs(interval_mins as u64 * 60));// Skip the first tick (immediate)interval.tick().await;+ info!("Obsidian scheduler: first tick skipped, waiting for next interval");loop {+ info!("Obsidian scheduler: waiting for next tick...");interval.tick().await;+ info!("Obsidian scheduler: tick received at {:?}", chrono::Utc::now());// Check if we should sync{let status = status_arc.lock().await;if status.is_syncing {- debug!("Skipping scheduled sync - already syncing");+ info!("Obsidian scheduler: skipping - already syncing");continue;}}@@ -408,8 +427,13 @@ pub async fn obsidian_start_scheduler(// Run synclet result = run_scheduled_sync(&app_handle, &settings_clone, &status_arc, ¤t_pid_arc, token_clone.as_deref()).await;- if let Err(e) = result {- warn!("Scheduled obsidian sync failed: {}", e);+ match result {+ Ok(_) => {+ info!("Scheduled obsidian sync completed successfully");+ }+ Err(e) => {+ warn!("Scheduled obsidian sync failed: {}", e);+ }}}});diff --git a/screenpipe-app-tauri/src-tauri/src/store.rs b/screenpipe-app-tauri/src-tauri/src/store.rsindex aac09e30a..0815c3700 100644--- a/screenpipe-app-tauri/src-tauri/src/store.rs+++ b/screenpipe-app-tauri/src-tauri/src/store.rs@@ -567,4 +567,44 @@ pub fn init_onboarding_store(app: &AppHandle) -> Result<OnboardingStore, String>onboarding.save(app).unwrap();}Ok(onboarding)+}++/// Obsidian sync settings stored persistently+#[derive(Serialize, Deserialize, Type, Clone, Default)]+#[serde(rename_all = "camelCase")]+pub struct ObsidianSettingsStore {+ pub enabled: bool,+ pub vault_path: String,+ #[serde(default = "default_notes_path")]+ pub notes_path: String,+ pub sync_interval_minutes: u32,+ pub custom_prompt: String,+ pub sync_hours: u32,+}++fn default_notes_path() -> String {+ "screenpipe/logs".to_string()+}++impl ObsidianSettingsStore {+ pub fn get(app: &AppHandle) -> Result<Option<Self>, String> {+ let store = get_store(app, None).map_err(|e| e.to_string())?;++ match store.is_empty() {+ true => Ok(None),+ false => {+ let settings = serde_json::from_value(store.get("obsidian").unwrap_or(Value::Null));+ match settings {+ Ok(settings) => Ok(settings),+ Err(_) => Ok(None),+ }+ }+ }+ }++ pub fn save(&self, app: &AppHandle) -> Result<(), String> {+ let store = get_store(app, None).map_err(|e| e.to_string())?;+ store.set("obsidian", json!(self));+ store.save().map_err(|e| e.to_string())+ }}\ No newline at end of file