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
release-app-publish
Louis Beaumont9dba45b63e9e
diff --git a/Cargo.lock b/Cargo.lockindex a1745598d..cba74e27e 100644--- a/Cargo.lock+++ b/Cargo.lock@@ -5877,7 +5877,7 @@ checksum = "94143f37725109f92c262ed2cf5e59bce7498c01bcc1502d7b9afe439a4e9f49"[[package]]name = "screenpipe-audio"-version = "0.2.69"+version = "0.2.70"dependencies = ["anyhow","bytemuck",@@ -5930,7 +5930,7 @@ dependencies = [[[package]]name = "screenpipe-core"-version = "0.2.69"+version = "0.2.70"dependencies = ["accessibility","accessibility-sys 0.2.0",@@ -5972,7 +5972,7 @@ dependencies = [[[package]]name = "screenpipe-db"-version = "0.2.69"+version = "0.2.70"dependencies = ["anyhow","chrono",@@ -5994,7 +5994,7 @@ dependencies = [[[package]]name = "screenpipe-events"-version = "0.2.69"+version = "0.2.70"dependencies = ["anyhow","chrono",@@ -6012,7 +6012,7 @@ dependencies = [[[package]]name = "screenpipe-integrations"-version = "0.2.69"+version = "0.2.70"dependencies = ["anyhow","image",@@ -6027,7 +6027,7 @@ dependencies = [[[package]]name = "screenpipe-server"-version = "0.2.69"+version = "0.2.70"dependencies = ["anyhow","axum",@@ -6089,7 +6089,7 @@ dependencies = [[[package]]name = "screenpipe-vision"-version = "0.2.69"+version = "0.2.70"dependencies = ["accessibility-sys 0.1.3","anyhow",diff --git a/Cargo.toml b/Cargo.tomlindex ffb2243b3..1f61c0ce1 100644--- a/Cargo.toml+++ b/Cargo.toml@@ -12,7 +12,7 @@ exclude = ["screenpipe-app-tauri/src-tauri"]resolver = "2"[workspace.package]-version = "0.2.69"+version = "0.2.70"authors = ["louis030195 <[email protected]>"]description = ""repository = "https://github.com/mediar-ai/screenpipe"diff --git a/screenpipe-app-tauri/src-tauri/Cargo.toml b/screenpipe-app-tauri/src-tauri/Cargo.tomlindex eac47daa4..31fe83a16 100644--- a/screenpipe-app-tauri/src-tauri/Cargo.toml+++ b/screenpipe-app-tauri/src-tauri/Cargo.toml@@ -1,6 +1,6 @@[package]name = "screenpipe-app"-version = "0.43.2"+version = "0.43.3"description = ""authors = ["you"]license = ""diff --git a/screenpipe-core/src/operator/element.rs b/screenpipe-core/src/operator/element.rsindex db8111e84..fb05ffe58 100644--- a/screenpipe-core/src/operator/element.rs+++ b/screenpipe-core/src/operator/element.rs@@ -1,10 +1,10 @@use crate::operator::errors::AutomationError;use crate::operator::selector::Selector;-use crate::operator::platforms::macos::{ClickResult, ClickMethodSelection};use std::collections::HashMap;use std::fmt::Debug;-use super::Locator;+use super::{ClickResult, Locator};+/// Represents a UI element in a desktop application#[derive(Debug)]pub struct UIElement {@@ -31,7 +31,6 @@ pub(crate) trait UIElementImpl: Send + Sync + Debug {fn parent(&self) -> Result<Option<UIElement>, AutomationError>;fn bounds(&self) -> Result<(f64, f64, f64, f64), AutomationError>; // x, y, width, heightfn click(&self) -> Result<ClickResult, AutomationError>;- fn click_with_method(&self, method: ClickMethodSelection) -> Result<ClickResult, AutomationError>;fn double_click(&self) -> Result<ClickResult, AutomationError>;fn right_click(&self) -> Result<(), AutomationError>;fn hover(&self) -> Result<(), AutomationError>;@@ -92,11 +91,6 @@ impl UIElement {self.inner.click()}- /// Click on this element using a specific click method- pub fn click_with_method(&self, method: ClickMethodSelection) -> Result<ClickResult, AutomationError> {- self.inner.click_with_method(method)- }-/// Double-click on this elementpub fn double_click(&self) -> Result<ClickResult, AutomationError> {self.inner.double_click()diff --git a/screenpipe-core/src/operator/locator.rs b/screenpipe-core/src/operator/locator.rsindex 0de42d945..a621ba4fa 100644--- a/screenpipe-core/src/operator/locator.rs+++ b/screenpipe-core/src/operator/locator.rs@@ -3,6 +3,8 @@ use crate::operator::{AutomationError, Selector, UIElement};use std::sync::Arc;use std::time::Duration;+use super::ClickResult;+/// A high-level API for finding and interacting with UI elementspub struct Locator {engine: Arc<dyn AccessibilityEngine>,@@ -96,7 +98,7 @@ impl Locator {// Convenience methods for common actions/// Click on the first matching element- pub async fn click(&self) -> Result<crate::operator::platforms::macos::ClickResult, AutomationError> {+ pub async fn click(&self) -> Result<ClickResult, AutomationError> {self.wait().await?.click()}diff --git a/screenpipe-core/src/operator/mod.rs b/screenpipe-core/src/operator/mod.rsindex 390194ba9..cd2f9daeb 100644--- a/screenpipe-core/src/operator/mod.rs+++ b/screenpipe-core/src/operator/mod.rs@@ -18,6 +18,13 @@ pub use errors::AutomationError;pub use locator::Locator;pub use selector::Selector;+// Define a new struct to hold click result information - move to module level+pub struct ClickResult {+ pub method: String,+ pub coordinates: Option<(f64, f64)>,+ pub details: String,+}+/// The main entry point for UI automationpub struct Desktop {engine: Arc<dyn platforms::AccessibilityEngine>,diff --git a/screenpipe-core/src/operator/platforms/linux.rs b/screenpipe-core/src/operator/platforms/linux.rsindex 550ea3e00..66accedbd 100644--- a/screenpipe-core/src/operator/platforms/linux.rs+++ b/screenpipe-core/src/operator/platforms/linux.rs@@ -1,7 +1,6 @@use crate::operator::element::UIElementImpl;use crate::operator::platforms::AccessibilityEngine;use crate::operator::{AutomationError, Locator, Selector, UIElement, UIElementAttributes};-use crate::operator::platforms::macos::{ClickResult, ClickMethod, ClickMethodSelection};use std::fmt::Debug;pub struct LinuxEngine;@@ -126,12 +125,6 @@ impl UIElementImpl for LinuxUIElement {))}- fn click_with_method(&self, _method: ClickMethodSelection) -> Result<ClickResult, AutomationError> {- Err(AutomationError::UnsupportedPlatform(- "Linux implementation is not yet available".to_string(),- ))- }-fn double_click(&self) -> Result<ClickResult, AutomationError> {Err(AutomationError::UnsupportedPlatform("Linux implementation is not yet available".to_string(),diff --git a/screenpipe-core/src/operator/platforms/macos.rs b/screenpipe-core/src/operator/platforms/macos.rsindex 9723ff633..dbf93becc 100644--- a/screenpipe-core/src/operator/platforms/macos.rs+++ b/screenpipe-core/src/operator/platforms/macos.rs@@ -1,4 +1,5 @@use crate::operator::platforms::AccessibilityEngine;+use crate::operator::ClickResult;use crate::operator::{element::UIElementImpl, AutomationError, Locator, Selector, UIElement, UIElementAttributes,};@@ -17,7 +18,7 @@ use core_graphics::display::{CGPoint, CGSize};use core_graphics::event::{CGEvent, CGEventFlags, CGKeyCode};use core_graphics::event_source::CGEventSource;use serde_json::{self, Value};-use std::collections::{HashMap, HashSet, VecDeque};+use std::collections::HashMap;use std::fmt;use std::sync::Arc;use tracing::{debug, trace};@@ -864,13 +865,6 @@ impl AccessibilityEngine for MacOSEngine {}}-// Define a new struct to hold click result information - move to module level-pub struct ClickResult {- pub method: ClickMethod,- pub coordinates: Option<(f64, f64)>,- pub details: String,-}-// Enum to represent which click method was used - move to module levelpub enum ClickMethod {AXPress,@@ -942,6 +936,18 @@ impl MacOSUIElement {}}+ fn click_with_method(+ &self,+ method: ClickMethodSelection,+ ) -> Result<ClickResult, AutomationError> {+ match method {+ ClickMethodSelection::Auto => self.click_auto(),+ ClickMethodSelection::AXPress => self.click_press(),+ ClickMethodSelection::AXClick => self.click_accessibility_click(),+ ClickMethodSelection::MouseSimulation => self.click_mouse_simulation(),+ }+ }+// Add these methods to the MacOSUIElement impl blockfn click_auto(&self) -> Result<ClickResult, AutomationError> {// 1. Try AXPress action first@@ -966,7 +972,7 @@ impl MacOSUIElement {Ok(_) => {debug!("Successfully clicked element with AXPress");Ok(ClickResult {- method: ClickMethod::AXPress,+ method: "AXPress".to_string(),coordinates: None,details: "Used accessibility AXPress action".to_string(),})@@ -984,7 +990,7 @@ impl MacOSUIElement {Ok(_) => {debug!("Successfully clicked element with AXClick");Ok(ClickResult {- method: ClickMethod::AXClick,+ method: "AXClick".to_string(),coordinates: None,details: "Used accessibility AXClick action".to_string(),})@@ -1070,7 +1076,7 @@ impl MacOSUIElement {);Ok(ClickResult {- method: ClickMethod::MouseSimulation,+ method: "MouseSimulation".to_string(),coordinates: Some((center_x, center_y)),details: format!("Used mouse simulation at coordinates ({:.1}, {:.1}), element bounds: ({:.1}, {:.1}, {:.1}, {:.1})",@@ -1478,18 +1484,6 @@ impl UIElementImpl for MacOSUIElement {self.click_with_method(ClickMethodSelection::Auto)}- fn click_with_method(- &self,- method: ClickMethodSelection,- ) -> Result<ClickResult, AutomationError> {- match method {- ClickMethodSelection::Auto => self.click_auto(),- ClickMethodSelection::AXPress => self.click_press(),- ClickMethodSelection::AXClick => self.click_accessibility_click(),- ClickMethodSelection::MouseSimulation => self.click_mouse_simulation(),- }- }-fn double_click(&self) -> Result<ClickResult, AutomationError> {// First clicklet first_click = self.click()?;diff --git a/screenpipe-core/src/operator/platforms/windows.rs b/screenpipe-core/src/operator/platforms/windows.rsindex 2f96f44b1..6094d93e7 100644--- a/screenpipe-core/src/operator/platforms/windows.rs+++ b/screenpipe-core/src/operator/platforms/windows.rs@@ -1,7 +1,6 @@use crate::operator::element::UIElementImpl;use crate::operator::platforms::AccessibilityEngine;use crate::operator::{AutomationError, Locator, Selector, UIElement, UIElementAttributes};-use crate::operator::platforms::macos::{ClickResult, ClickMethod, ClickMethodSelection};use std::fmt::Debug;pub struct WindowsEngine;@@ -132,12 +131,6 @@ impl UIElementImpl for WindowsUIElement {))}- fn click_with_method(&self, _method: ClickMethodSelection) -> Result<ClickResult, AutomationError> {- Err(AutomationError::UnsupportedPlatform(- "Windows implementation is not yet available".to_string(),- ))- }-fn double_click(&self) -> Result<ClickResult, AutomationError> {Err(AutomationError::UnsupportedPlatform("Windows implementation is not yet available".to_string(),