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.2.239

Louis Beaumonta29a4a0e238e
diff --git a/Cargo.toml b/Cargo.toml
index cae5e99b7..0de3392f0 100644
--- a/Cargo.toml
+++ b/Cargo.toml
@@ -6,7 +6,7 @@ exclude = ["apps/screenpipe-app-tauri/src-tauri", "crates/screenpipe-integration
resolver = "2"
[workspace.package]
-version = "0.3.227"
+version = "0.3.228"
authors = ["louis030195 <[email protected]>"]
description = ""
repository = "https://github.com/screenpipe/screenpipe"
diff --git a/apps/screenpipe-app-tauri/lib/utils/tauri.ts b/apps/screenpipe-app-tauri/lib/utils/tauri.ts
index b85cb60de..bd19c3a9a 100644
--- a/apps/screenpipe-app-tauri/lib/utils/tauri.ts
+++ b/apps/screenpipe-app-tauri/lib/utils/tauri.ts
@@ -1138,6 +1138,16 @@ openaiCompatibleApiKey?: string | null;
* Previously stored in SettingsStore.extra["openaiCompatibleModel"].
*/
openaiCompatibleModel?: string | null;
+/**
+ * Custom HTTP headers for OpenAI-compatible transcription requests.
+ * JSON object, e.g. {"X-Custom-Header": "value"}.
+ */
+openaiCompatibleHeaders?: { [key in string]: string } | null;
+/**
+ * Send raw WAV audio instead of MP3 to OpenAI-compatible endpoint.
+ * Some ASR providers prefer uncompressed audio for better accuracy.
+ */
+openaiCompatibleRawAudio?: boolean;
/**
* HTTP server port for the screenpipe API.
*/
diff --git a/apps/screenpipe-app-tauri/src-tauri/Cargo.lock b/apps/screenpipe-app-tauri/src-tauri/Cargo.lock
index f5aab9f92..338dc2ca8 100644
--- a/apps/screenpipe-app-tauri/src-tauri/Cargo.lock
+++ b/apps/screenpipe-app-tauri/src-tauri/Cargo.lock
@@ -9347,7 +9347,7 @@ dependencies = [
[[package]]
name = "screenpipe-app"
-version = "2.2.236"
+version = "2.2.239"
dependencies = [
"anyhow",
"arboard",
@@ -9448,7 +9448,7 @@ dependencies = [
[[package]]
name = "screenpipe-audio"
-version = "0.3.226"
+version = "0.3.228"
dependencies = [
"anyhow",
"audiopipe",
@@ -9501,7 +9501,7 @@ dependencies = [
[[package]]
name = "screenpipe-config"
-version = "0.3.226"
+version = "0.3.228"
dependencies = [
"dirs 6.0.0",
"serde",
@@ -9512,7 +9512,7 @@ dependencies = [
[[package]]
name = "screenpipe-connect"
-version = "0.3.226"
+version = "0.3.228"
dependencies = [
"anyhow",
"async-trait",
@@ -9538,7 +9538,7 @@ dependencies = [
[[package]]
name = "screenpipe-core"
-version = "0.3.226"
+version = "0.3.228"
dependencies = [
"accessibility",
"accessibility-sys",
@@ -9580,7 +9580,7 @@ dependencies = [
[[package]]
name = "screenpipe-db"
-version = "0.3.226"
+version = "0.3.228"
dependencies = [
"anyhow",
"chrono",
@@ -9604,7 +9604,7 @@ dependencies = [
[[package]]
name = "screenpipe-engine"
-version = "0.3.226"
+version = "0.3.228"
dependencies = [
"anyhow",
"async-trait",
@@ -9667,7 +9667,7 @@ dependencies = [
[[package]]
name = "screenpipe-events"
-version = "0.3.226"
+version = "0.3.228"
dependencies = [
"anyhow",
"chrono",
@@ -9683,7 +9683,7 @@ dependencies = [
[[package]]
name = "screenpipe-screen"
-version = "0.3.226"
+version = "0.3.228"
dependencies = [
"accessibility-sys",
"anyhow",
@@ -9719,7 +9719,7 @@ dependencies = [
[[package]]
name = "screenpipe-vault"
-version = "0.3.226"
+version = "0.3.228"
dependencies = [
"argon2",
"chacha20poly1305",
diff --git a/apps/screenpipe-app-tauri/src-tauri/Cargo.toml b/apps/screenpipe-app-tauri/src-tauri/Cargo.toml
index ebc4d2590..f47d5d267 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.2.238"
+version = "2.2.239"
description = "24/7 memory for your desktop. 100% local."
authors = ["you"]
license = ""
diff --git a/apps/screenpipe-app-tauri/src-tauri/src/store.rs b/apps/screenpipe-app-tauri/src-tauri/src/store.rs
index 381f9496c..2d4f26ecd 100644
--- a/apps/screenpipe-app-tauri/src-tauri/src/store.rs
+++ b/apps/screenpipe-app-tauri/src-tauri/src/store.rs
@@ -586,7 +586,12 @@ impl SettingsStore {
true => Ok(None),
false => {
let raw = store.get("settings").unwrap_or(Value::Null);
- let sanitized = Self::sanitize_legacy_fields(raw);
+ let sanitized = Self::sanitize_legacy_fields(raw.clone());
+ // Persist sanitized fields back to store so the migration only warns once
+ if sanitized != raw {
+ store.set("settings", sanitized.clone());
+ let _ = store.save();
+ }
let settings = serde_json::from_value(sanitized);
match settings {
Ok(settings) => Ok(settings),
diff --git a/apps/screenpipe-app-tauri/src-tauri/swift/notification_panel.swift b/apps/screenpipe-app-tauri/src-tauri/swift/notification_panel.swift
index 75cbc96dc..c39ab5372 100644
--- a/apps/screenpipe-app-tauri/src-tauri/swift/notification_panel.swift
+++ b/apps/screenpipe-app-tauri/src-tauri/swift/notification_panel.swift
@@ -569,17 +569,13 @@ class NotificationPanelController: NSObject {
let mouseLocation = NSEvent.mouseLocation
for screen in NSScreen.screens {
if NSMouseInRect(mouseLocation, screen.frame, false) {
- let frame = screen.frame
let visible = screen.visibleFrame
- let margin: CGFloat = 16
- let shadowPad: CGFloat = 20 // padding inside panel for shadow
- // Content (320x180) is centered in panel (360x220) with 20px padding.
- // Right edge of content = panel.x + shadowPad + 320
- // We want that right edge to be `margin` from screen right edge:
- // panel.x + shadowPad + 320 = screen.right - margin
- // panel.x = screen.right - margin - shadowPad - 320
- let x = frame.origin.x + frame.size.width - margin - shadowPad - 320
- let y = visible.origin.y + visible.size.height - margin - shadowPad - 180
+ // Panel is 360x220, content is 320x180 with 20px SwiftUI padding
+ // (shadow area). Place the panel so its edge aligns with the
+ // visible screen edge — the 20px internal padding becomes the
+ // visual margin, giving equal spacing on top and right.
+ let x = visible.origin.x + visible.size.width - 360
+ let y = visible.origin.y + visible.size.height - 220
panel.setFrameOrigin(NSPoint(x: x, y: y))
break
}
diff --git a/crates/screenpipe-audio/src/core/run_record_and_transcribe.rs b/crates/screenpipe-audio/src/core/run_record_and_transcribe.rs
index d3e777a9a..6383d29b8 100644
--- a/crates/screenpipe-audio/src/core/run_record_and_transcribe.rs
+++ b/crates/screenpipe-audio/src/core/run_record_and_transcribe.rs
@@ -194,9 +194,18 @@ async fn flush_audio(
debug!("sending audio segment to audio model");
+ // Split off the overlap tail *before* sending to avoid cloning the entire buffer.
+ // The send gets everything except the tail; collected_audio retains only the overlap.
+ let overlap_tail = if collected_audio.len() > overlap_samples {
+ collected_audio.split_off(collected_audio.len() - overlap_samples)
+ } else {
+ collected_audio.clone()
+ };
+ let send_data = std::mem::replace(collected_audio, overlap_tail);
+
match whisper_sender.send_timeout(
AudioInput {
- data: Arc::new(collected_audio.clone()),
+ data: Arc::new(send_data),
device: audio_stream.device.clone(),
sample_rate: audio_stream.device_config.sample_rate().0,
channels: audio_stream.device_config.channels(),
@@ -207,10 +216,6 @@ async fn flush_audio(
Ok(_) => {
debug!("sent audio segment to audio model");
metrics.record_chunk_sent();
- if collected_audio.len() > overlap_samples {
- *collected_audio =
- collected_audio.split_off(collected_audio.len() - overlap_samples);
- }
}
Err(e) => {
if e.is_disconnected() {
diff --git a/crates/screenpipe-core/src/agents/pi.rs b/crates/screenpipe-core/src/agents/pi.rs
index dd15c82a8..4343d48dc 100644
--- a/crates/screenpipe-core/src/agents/pi.rs
+++ b/crates/screenpipe-core/src/agents/pi.rs
@@ -998,7 +998,8 @@ impl AgentExecutor for PiExecutor {
seed_pi_package_json(&install_dir);
let mut cmd = std::process::Command::new(&bun);
- cmd.current_dir(&install_dir).args(["add", PI_PACKAGE]);
+ cmd.current_dir(&install_dir)
+ .args(["add", PI_PACKAGE, "@anthropic-ai/sdk"]);
#[cfg(windows)]
{
diff --git a/crates/screenpipe-engine/src/resource_monitor.rs b/crates/screenpipe-engine/src/resource_monitor.rs
index 8a82a3506..13ba0a061 100644
--- a/crates/screenpipe-engine/src/resource_monitor.rs
+++ b/crates/screenpipe-engine/src/resource_monitor.rs
@@ -1,13 +1,9 @@
use chrono::Local;
use reqwest::Client;
use serde_json::json;
-use serde_json::Value;
use std::env;
use std::fs::File;
use std::fs::OpenOptions;
-use std::io::Read;
-use std::io::Seek;
-use std::io::SeekFrom;
use std::io::Write;
use std::sync::Arc;
use std::time::{Duration, Instant};
@@ -377,6 +373,9 @@ impl ResourceMonitor {
)
}
+ /// Max resource log file size (10 MB). When exceeded the file is truncated.
+ const MAX_RESOURCE_LOG_BYTES: u64 = 10 * 1024 * 1024;
+
async fn log_to_file(&self, metrics: (f64, f64, f64, f32, f64, Duration)) {
let (
total_memory_gb,
@@ -398,21 +397,30 @@ impl ResourceMonitor {
"total_virtual_memory_gb": total_virtual_memory_gb,
});
- if let Ok(mut file) = OpenOptions::new().read(true).write(true).open(filename) {
- let mut contents = String::new();
- if file.read_to_string(&mut contents).is_ok() {
- if let Ok(mut json_array) = serde_json::from_str::<Value>(&contents) {
- if let Some(array) = json_array.as_array_mut() {
- array.push(json_data);
- if file.set_len(0).is_ok() && file.seek(SeekFrom::Start(0)).is_ok() {
- if let Err(e) = file.write_all(json_array.to_string().as_bytes()) {
- error!("Failed to write JSON data to file: {}", e);
- }
+ // Append-only JSONL: one JSON object per line, no read-back needed.
+ if let Ok(mut file) = OpenOptions::new()
+ .create(true)
+ .append(true)
+ .open(filename)
+ {
+ // Truncate if file exceeds size limit to prevent unbounded growth.
+ if let Ok(meta) = file.metadata() {
+ if meta.len() > Self::MAX_RESOURCE_LOG_BYTES {
+ if let Ok(f) = OpenOptions::new().write(true).truncate(true).open(filename)
+ {
+ drop(f);
+ // Reopen in append mode after truncation.
+ if let Ok(reopened) = OpenOptions::new().append(true).open(filename) {
+ file = reopened;
}
}
}
}
- let _ = file.flush();
+ let mut line = json_data.to_string();
+ line.push('\n');
+ if let Err(e) = file.write_all(line.as_bytes()) {
+ error!("Failed to write resource log: {}", e);
+ }
}
}
}
@@ -464,12 +472,21 @@ impl ResourceMonitor {
let mut last_posthog_update = Instant::now();
tokio::spawn(async move {
- let mut sys = System::new_all();
+ // Only load process + CPU info — skip disks, networks, components.
+ let mut sys = System::new();
+ sys.refresh_cpu();
+ sys.refresh_processes();
+ sys.refresh_memory();
loop {
tokio::select! {
_ = tokio::time::sleep(interval) => {
- sys.refresh_all();
+ // Only refresh what collect_metrics actually uses:
+ // CPU + process list + system memory totals.
+ // Skips disks, networks, components — saves allocations.
+ sys.refresh_cpu();
+ sys.refresh_processes();
+ sys.refresh_memory();
let now = Instant::now();
let should_send_to_posthog = now.duration_since(last_posthog_update) >= posthog_interval;