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: pin webview launchers and refresh capability builds
Ezra Ellettefdf900a33d2e
diff --git a/apps/screenpipe-app-tauri/e2e/COVERAGE.md b/apps/screenpipe-app-tauri/e2e/COVERAGE.mdindex 17ca1d505..1e4105b91 100644--- a/apps/screenpipe-app-tauri/e2e/COVERAGE.md+++ b/apps/screenpipe-app-tauri/e2e/COVERAGE.md@@ -11,8 +11,8 @@ and layer declared in the manifest, weighted by confidence and criticality.- Manifest: `e2e/coverage-map.json`- Specs directory: `e2e/specs`- Mapped specs: 142-- Declared test blocks: 410-- Weighted coverage points: 330.5+- Declared test blocks: 411+- Weighted coverage points: 331.5Confidence weights: strong=1.0, partial=0.7, conditional=0.4, smoke=0.3.Criticality weights: high=1.0, medium=0.7, low=0.4.@@ -23,9 +23,9 @@ can execute more runtime cases than this number shows.| Platform | Specs | Declared tests | Weighted points | Layers | Features | Critical score || --- | --- | --- | --- | --- | --- | --- |-| windows | 108 | 347 | 290.1 | 15 | 123 | 85% |-| macos | 138 | 372 | 300.3 | 17 | 133 | 88% |-| linux | 96 | 305 | 259.5 | 14 | 120 | 80% |+| windows | 108 | 348 | 291.1 | 15 | 123 | 85% |+| macos | 138 | 373 | 301.3 | 17 | 133 | 88% |+| linux | 96 | 306 | 260.5 | 14 | 120 | 80% |## Runtime Results@@ -46,13 +46,13 @@ pass/fail/skip counts.| local-api | 29 specs / 121 tests / 102.0 pts | 40 specs / 119 tests / 101.9 pts | 24 specs / 89 tests / 80.2 pts || notifications | 4 specs / 26 tests / 17.3 pts | 3 specs / 5 tests / 3.4 pts | 2 specs / 4 tests / 3.1 pts || onboarding | 9 specs / 39 tests / 34.8 pts | 11 specs / 43 tests / 38.2 pts | 9 specs / 39 tests / 34.8 pts |-| os-integration | 8 specs / 36 tests / 30.9 pts | 17 specs / 35 tests / 22.8 pts | 3 specs / 19 tests / 14.8 pts |+| os-integration | 8 specs / 37 tests / 31.9 pts | 17 specs / 36 tests / 23.8 pts | 3 specs / 20 tests / 15.8 pts || performance | 3 specs / 45 tests / 45.0 pts | 5 specs / 36 tests / 31.8 pts | 2 specs / 30 tests / 30.0 pts || pipes | 6 specs / 20 tests / 20.0 pts | 8 specs / 26 tests / 26.0 pts | 6 specs / 20 tests / 20.0 pts || real-ui-e2e | 80 specs / 241 tests / 204.9 pts | 98 specs / 260 tests / 220.3 pts | 74 specs / 217 tests / 190.9 pts || settings | 15 specs / 42 tests / 39.0 pts | 17 specs / 36 tests / 31.7 pts | 14 specs / 33 tests / 30.0 pts || storage-privacy | 10 specs / 44 tests / 35.3 pts | 10 specs / 29 tests / 28.1 pts | 7 specs / 22 tests / 21.1 pts |-| tauri-command | 24 specs / 68 tests / 54.9 pts | 36 specs / 91 tests / 73.3 pts | 23 specs / 69 tests / 55.8 pts |+| tauri-command | 24 specs / 69 tests / 55.9 pts | 36 specs / 92 tests / 74.3 pts | 23 specs / 70 tests / 56.8 pts || window-lifecycle | 22 specs / 71 tests / 59.5 pts | 23 specs / 55 tests / 40.9 pts | 16 specs / 44 tests / 34.4 pts |## Critical Feature Matrix@@ -234,7 +234,7 @@ pass/fail/skip counts.| tray-search.spec.ts | windows, macos, linux | window-lifecycle, tauri-command, real-ui-e2e | tray-search, home-search, window-lifecycle | high | partial | command | 2 | Invokes open_search_window and verifies focused floating Search. || updater-banner.spec.ts | windows, macos, linux | real-ui-e2e, settings | update-surfacing, settings-persistence | high | partial | mixed | 2 | Synthetic update-available event surfaces the restart-to-update banner. A real Auto-update toggle plus delayed store save verifies restart waits for preference persistence and survives settings-store re-hydration; an E2E-only handoff suppresses the destructive relaunch. Real check/download/install + rollback stay manual via e2e/mock-updates because the debug E2E build disables updater checks. || viewer-deeplink.spec.ts | windows, macos, linux | window-lifecycle, tauri-command | viewer-deeplink, window-lifecycle | medium | partial | command | 3 | Viewer window creation and per-path dedupe. |-| webview-shell-scope.spec.ts | windows, macos, linux | tauri-command, os-integration | webview-shell-scope, ai-tools | high | strong | command | 4 | Calls the shell plugin from a real app webview. The removed exec-sh, sh, cmd and any-argument open entries are rejected by the capability scope, and the macOS Claude/Cursor install check still reaches fs exists. |+| webview-shell-scope.spec.ts | windows, macos, linux | tauri-command, os-integration | webview-shell-scope, ai-tools | high | strong | command | 5 | Calls the shell plugin from a real app webview. The removed exec-sh, sh, cmd and any-argument open entries are rejected by the capability scope. On macOS, a caller-supplied PATH cannot replace the system launcher, and the Claude/Cursor install check still reaches fs exists. || window-activation.spec.ts | macos | window-lifecycle, tauri-command, real-ui-e2e | window-lifecycle, chat | medium | conditional | real-user-flow | 2 | macOS-only show_window_activated focus coverage. || window-lifecycle.spec.ts | windows, macos, linux | window-lifecycle, tauri-command, real-ui-e2e | window-lifecycle, onboarding, tray-search | high | strong | mixed | 3 | Home, Search, and onboarding window routing. || windows-core-recording.spec.ts | windows | capture-ocr, local-api, audio-device, notifications, storage-privacy, real-ui-e2e | capture-ocr, local-api-auth, local-api-search, audio-device-health, timeline, low-disk-recording-guard | high | conditional | mixed | 13 | Windows recording-enabled lane; low-disk coverage requires teardown of a real CaptureSession and continued API/search availability, while hosted runners can skip only frame-dependent OCR assertions. |diff --git a/apps/screenpipe-app-tauri/e2e/coverage-map.json b/apps/screenpipe-app-tauri/e2e/coverage-map.jsonindex 268886be4..1b36730b9 100644--- a/apps/screenpipe-app-tauri/e2e/coverage-map.json+++ b/apps/screenpipe-app-tauri/e2e/coverage-map.json@@ -2964,7 +2964,7 @@"criticality": "high","confidence": "strong","ux": "command",- "notes": "Calls the shell plugin from a real app webview. The removed exec-sh, sh, cmd and any-argument open entries are rejected by the capability scope, and the macOS Claude/Cursor install check still reaches fs exists."+ "notes": "Calls the shell plugin from a real app webview. The removed exec-sh, sh, cmd and any-argument open entries are rejected by the capability scope. On macOS, a caller-supplied PATH cannot replace the system launcher, and the Claude/Cursor install check still reaches fs exists."},{"spec": "window-activation.spec.ts",diff --git a/apps/screenpipe-app-tauri/e2e/specs/webview-shell-scope.spec.ts b/apps/screenpipe-app-tauri/e2e/specs/webview-shell-scope.spec.tsindex 07017bb73..e96fd0feb 100644--- a/apps/screenpipe-app-tauri/e2e/specs/webview-shell-scope.spec.ts+++ b/apps/screenpipe-app-tauri/e2e/specs/webview-shell-scope.spec.ts@@ -1,7 +1,7 @@// screenpipe — AI that knows everything you've seen, said, or heard// https://screenpipe.com-import { existsSync, rmSync } from "node:fs";+import { existsSync, mkdtempSync, rmSync, writeFileSync } from "node:fs";import { tmpdir } from "node:os";import { join } from "node:path";import { openHomeWindow, waitForAppReady } from "../helpers/test-utils.js";@@ -36,8 +36,12 @@ async function invoke(command: string, args: Record<string, unknown>): Promise<I// `program` is the scope entry's `name`, not the binary: the shell plugin// looks the name up in the capability scope before it spawns anything.-function execute(program: string, args: string[]): Promise<InvokeResult> {- return invoke("plugin:shell|execute", { program, args, options: {} });+function execute(+ program: string,+ args: string[],+ options: Record<string, unknown> = {},+): Promise<InvokeResult> {+ return invoke("plugin:shell|execute", { program, args, options });}function expectScopeRejection(result: InvokeResult): void {@@ -79,6 +83,29 @@ describe("Webview shell scope", function () {expect((await execute("open-reveal", ["-R", "-a"])).ok).toBe(false);});+ it("does not resolve an allowed launcher through the caller's PATH", async function () {+ if (process.platform !== "darwin") this.skip();+ const directory = mkdtempSync(join(tmpdir(), "screenpipe-shell-path-"));+ const executable = join(directory, "open");+ const executed = `${executable}.executed`;+ try {+ writeFileSync(+ executable,+ '#!/bin/sh\nprintf "unexpected PATH lookup\\n" > "$0.executed"\n',+ { mode: 0o700 },+ );+ // A missing target lets the real open report an error without opening Finder.+ const result = await execute("open-reveal", ["-R", join(directory, "missing")], {+ env: { PATH: directory },+ });+ expect(result.failure).toBe("");+ expect(result.ok).toBe(true);+ expect(existsSync(executed)).toBe(false);+ } finally {+ rmSync(directory, { recursive: true, force: true });+ }+ });+it("can still check whether Claude and Cursor are installed on macOS", async function () {if (process.platform !== "darwin") this.skip();for (const path of ["/Applications/Claude.app", "/Applications/Cursor.app"]) {diff --git a/apps/screenpipe-app-tauri/lib/__tests__/shell-capability-scope.test.ts b/apps/screenpipe-app-tauri/lib/__tests__/shell-capability-scope.test.tsindex 940c48dc2..5fcaf4594 100644--- a/apps/screenpipe-app-tauri/lib/__tests__/shell-capability-scope.test.ts+++ b/apps/screenpipe-app-tauri/lib/__tests__/shell-capability-scope.test.ts@@ -78,6 +78,14 @@ describe("webview shell scope", () => {expect(unrestricted.map((e) => e.name)).toEqual([]);});+ it("pins system launchers so a caller cannot replace them through PATH", () => {+ const launchers = shellEntries().filter((e) => !e.sidecar);+ expect(launchers.length).toBeGreaterThan(0);+ for (const launcher of launchers) {+ expect(launcher.cmd, launcher.name).toBe("/usr/bin/open");+ }+ });+it("has a scope entry for every Command.create call in the frontend", () => {const names = new Set(shellEntries().map((e) => e.name));const calls = ["app", "components", "lib"]diff --git a/apps/screenpipe-app-tauri/src-tauri/build.rs b/apps/screenpipe-app-tauri/src-tauri/build.rsindex cbc846a62..6b0af3353 100644--- a/apps/screenpipe-app-tauri/src-tauri/build.rs+++ b/apps/screenpipe-app-tauri/src-tauri/build.rs@@ -784,6 +784,8 @@ fn main() {}}+ // A custom capabilities_path_pattern disables tauri-build's default watch.+ println!("cargo:rerun-if-changed=capabilities");let mut attributes = tauri_build::Attributes::new();if std::env::var_os("CARGO_FEATURE_E2E").is_some() {validate_e2e_command_inventory();diff --git a/apps/screenpipe-app-tauri/src-tauri/capabilities/main.json b/apps/screenpipe-app-tauri/src-tauri/capabilities/main.jsonindex 82d449a14..ee5c144e1 100644--- a/apps/screenpipe-app-tauri/src-tauri/capabilities/main.json+++ b/apps/screenpipe-app-tauri/src-tauri/capabilities/main.json@@ -594,7 +594,7 @@"allow": [{"name": "open-reveal",- "cmd": "open",+ "cmd": "/usr/bin/open","args": ["-R",{@@ -605,7 +605,7 @@},{"name": "open-app",- "cmd": "open",+ "cmd": "/usr/bin/open","args": ["-a",{@@ -616,7 +616,7 @@},{"name": "open-codex-url",- "cmd": "open",+ "cmd": "/usr/bin/open","args": ["-b","com.openai.codex",@@ -628,7 +628,7 @@},{"name": "open-full-disk-access",- "cmd": "open",+ "cmd": "/usr/bin/open","args": ["x-apple.systempreferences:com.apple.preference.security?Privacy_AllFiles"],diff --git a/docs/COVERAGE.md b/docs/COVERAGE.mdindex 775abf5d6..759ad3d83 100644--- a/docs/COVERAGE.md+++ b/docs/COVERAGE.md@@ -25,14 +25,14 @@ results and `cargo llvm-cov` data on top when judging release confidence.### Tauri E2E- Mapped specs: 142-- Declared test blocks: 410-- Weighted coverage points: 330.5+- Declared test blocks: 411+- Weighted coverage points: 331.5| Platform | Specs | Declared tests | Weighted points | Layers | Features | Critical score || --- | --- | --- | --- | --- | --- | --- |-| windows | 108 | 347 | 290.1 | 15 | 123 | 85% |-| macos | 138 | 372 | 300.3 | 17 | 133 | 88% |-| linux | 96 | 305 | 259.5 | 14 | 120 | 80% |+| windows | 108 | 348 | 291.1 | 15 | 123 | 85% |+| macos | 138 | 373 | 301.3 | 17 | 133 | 88% |+| linux | 96 | 306 | 260.5 | 14 | 120 | 80% |### Core Engine