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(build): BOOL i8/bool mismatch on x86_64 macOS + cargo fmt new export files
Louis Beaumontfecf38f84e00
diff --git a/apps/screenpipe-app-tauri/src-tauri/src/permissions.rs b/apps/screenpipe-app-tauri/src-tauri/src/permissions.rsindex fa13f1f98..8bf619ddf 100644--- a/apps/screenpipe-app-tauri/src-tauri/src/permissions.rs+++ b/apps/screenpipe-app-tauri/src-tauri/src/permissions.rs@@ -125,7 +125,7 @@ fn request_av_permission(app: tauri::AppHandle, media_type: nokhwa_bindings_macouse tauri_nspanel::block::ConcreteBlock;let callback = move |granted: BOOL| {- if is_audio && granted {+ if is_audio && granted != NO {info!("Microphone permission granted via AV callback — restarting capture for audio reinit");diff --git a/crates/screenpipe-engine/src/cli/export.rs b/crates/screenpipe-engine/src/cli/export.rsindex e0b9bf0d1..89ea9ee0b 100644--- a/crates/screenpipe-engine/src/cli/export.rs+++ b/crates/screenpipe-engine/src/cli/export.rs@@ -39,9 +39,7 @@ pub async fn handle_export_command(args: &ExportArgs) -> anyhow::Result<()> {let start =parse_flexible_datetime(start_raw).map_err(|e| anyhow::anyhow!("--start: {e}"))?;let end = match args.end.as_deref() {- Some(s) => {- parse_flexible_datetime(s).map_err(|e| anyhow::anyhow!("--end: {e}"))?- }+ Some(s) => parse_flexible_datetime(s).map_err(|e| anyhow::anyhow!("--end: {e}"))?,None => Utc::now(),};Mode::Range(start, end)diff --git a/crates/screenpipe-engine/src/meeting_export.rs b/crates/screenpipe-engine/src/meeting_export.rsindex 4ecb47157..148b6bf98 100644--- a/crates/screenpipe-engine/src/meeting_export.rs+++ b/crates/screenpipe-engine/src/meeting_export.rs@@ -179,7 +179,10 @@ pub async fn export_range_to_mp4(let out = frames_dir.join(format!("s_{i:06}.png"));match extract_snapshot_frame(&ffmpeg_path, file_path, target_w, target_h, &out).await {Ok(()) => frame_out[i] = Some(out),- Err(e) => warn!("skipping snapshot frame {} ({}): {}", frame_id, file_path, e),+ Err(e) => warn!(+ "skipping snapshot frame {} ({}): {}",+ frame_id, file_path, e+ ),}}@@ -200,11 +203,19 @@ pub async fn export_range_to_mp4(extract_chunk_frames_batch(&ffmpeg_path, file_path, &offs, target_w, target_h, &pattern).await{- warn!("skipping chunk {} ({} frames): {}", file_path, offs.len(), e);+ warn!(+ "skipping chunk {} ({} frames): {}",+ file_path,+ offs.len(),+ e+ );continue;}- let pos_of_off: HashMap<i64, usize> =- offs.iter().enumerate().map(|(p, off)| (*off, p + 1)).collect();+ let pos_of_off: HashMap<i64, usize> = offs+ .iter()+ .enumerate()+ .map(|(p, off)| (*off, p + 1))+ .collect();for &i in idxs {if let Some(&p) = pos_of_off.get(&frames[i].2) {let f = frames_dir.join(format!("c{gid}_{p:05}.png"));@@ -553,8 +564,20 @@ async fn run_mux(if audio.is_empty() {// No audio in range — emit a silent video.cmd.args([- "-map", "0:v:0", "-c:v", "libx264", "-pix_fmt", "yuv420p", "-preset", "veryfast",- "-crf", "23", "-vsync", "vfr", "-movflags", "+faststart",+ "-map",+ "0:v:0",+ "-c:v",+ "libx264",+ "-pix_fmt",+ "yuv420p",+ "-preset",+ "veryfast",+ "-crf",+ "23",+ "-vsync",+ "vfr",+ "-movflags",+ "+faststart",]);cmd.arg(output_path);return run_checked(cmd, "mux (silent)").await;@@ -587,9 +610,28 @@ async fn run_mux(cmd.arg("-filter_complex").arg(&graph);cmd.args([- "-map", "0:v:0", "-map", "[aout]", "-c:v", "libx264", "-pix_fmt", "yuv420p", "-preset",- "veryfast", "-crf", "23", "-vsync", "vfr", "-c:a", "aac", "-b:a", "160k", "-ar", "48000",- "-movflags", "+faststart",+ "-map",+ "0:v:0",+ "-map",+ "[aout]",+ "-c:v",+ "libx264",+ "-pix_fmt",+ "yuv420p",+ "-preset",+ "veryfast",+ "-crf",+ "23",+ "-vsync",+ "vfr",+ "-c:a",+ "aac",+ "-b:a",+ "160k",+ "-ar",+ "48000",+ "-movflags",+ "+faststart",]);cmd.arg(output_path);run_checked(cmd, "mux").await@@ -694,9 +736,18 @@ mod tests {let origin = parse_ts("2026-05-28T18:00:00Z").unwrap();// first frame 5s after origin (leading audio gap), then +2s, +3slet f = vec![- (PathBuf::from("/tmp/a.png"), parse_ts("2026-05-28T18:00:05Z").unwrap()),- (PathBuf::from("/tmp/b.png"), parse_ts("2026-05-28T18:00:07Z").unwrap()),- (PathBuf::from("/tmp/c.png"), parse_ts("2026-05-28T18:00:10Z").unwrap()),+ (+ PathBuf::from("/tmp/a.png"),+ parse_ts("2026-05-28T18:00:05Z").unwrap(),+ ),+ (+ PathBuf::from("/tmp/b.png"),+ parse_ts("2026-05-28T18:00:07Z").unwrap(),+ ),+ (+ PathBuf::from("/tmp/c.png"),+ parse_ts("2026-05-28T18:00:10Z").unwrap(),+ ),];let body = build_concat_list(&f, origin, 15.0).unwrap();let durations: Vec<f64> = body@@ -720,8 +771,14 @@ mod tests {let origin = parse_ts("2026-05-28T18:00:00Z").unwrap();// two frames with identical timestamps would yield a 0s middle durationlet f = vec![- (PathBuf::from("/tmp/a.png"), parse_ts("2026-05-28T18:00:00Z").unwrap()),- (PathBuf::from("/tmp/b.png"), parse_ts("2026-05-28T18:00:00Z").unwrap()),+ (+ PathBuf::from("/tmp/a.png"),+ parse_ts("2026-05-28T18:00:00Z").unwrap(),+ ),+ (+ PathBuf::from("/tmp/b.png"),+ parse_ts("2026-05-28T18:00:00Z").unwrap(),+ ),];let body = build_concat_list(&f, origin, 4.0).unwrap();let durations: Vec<f64> = bodydiff --git a/crates/screenpipe-engine/src/routes/meetings.rs b/crates/screenpipe-engine/src/routes/meetings.rsindex af0ff74b6..daefde446 100644--- a/crates/screenpipe-engine/src/routes/meetings.rs+++ b/crates/screenpipe-engine/src/routes/meetings.rs@@ -686,8 +686,12 @@ pub(crate) async fn export_handler(State(state): State<Arc<AppState>>,axum::Json(body): axum::Json<ExportRequest>,) -> Result<JsonResponse<ExportResponse>, (StatusCode, JsonResponse<Value>)> {- let bad_request =- |msg: String| (StatusCode::BAD_REQUEST, JsonResponse(json!({ "error": msg })));+ let bad_request = |msg: String| {+ (+ StatusCode::BAD_REQUEST,+ JsonResponse(json!({ "error": msg })),+ )+ };let server_error = |e: anyhow::Error| {(StatusCode::INTERNAL_SERVER_ERROR,@@ -703,10 +707,10 @@ pub(crate) async fn export_handler(.filter(|p| !p.is_empty()).map(std::path::PathBuf::from);let default_output = |stem: String| {- state.screenpipe_dir.join("exports").join(format!(- "{stem}_{}.mp4",- Utc::now().format("%Y%m%d_%H%M%S")- ))+ state+ .screenpipe_dir+ .join("exports")+ .join(format!("{stem}_{}.mp4", Utc::now().format("%Y%m%d_%H%M%S")))};// meeting_id XOR start/end, same contract as the `screenpipe export` CLI.