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

fix(connect): GET /connections/:id recognizes browsers

Louis Beaumont495ea970012a
diff --git a/Cargo.lock b/Cargo.lock
index 19a7f8c54..591cd04ec 100644
--- a/Cargo.lock
+++ b/Cargo.lock
@@ -6870,7 +6870,7 @@ dependencies = [
[[package]]
name = "screenpipe-audio"
-version = "0.3.302"
+version = "0.3.303"
dependencies = [
"anyhow",
"audiopipe",
@@ -6931,7 +6931,7 @@ dependencies = [
[[package]]
name = "screenpipe-config"
-version = "0.3.302"
+version = "0.3.303"
dependencies = [
"dirs 6.0.0",
"serde",
@@ -6944,7 +6944,7 @@ dependencies = [
[[package]]
name = "screenpipe-connect"
-version = "0.3.302"
+version = "0.3.303"
dependencies = [
"anyhow",
"async-trait",
@@ -6976,7 +6976,7 @@ dependencies = [
[[package]]
name = "screenpipe-core"
-version = "0.3.302"
+version = "0.3.303"
dependencies = [
"accessibility",
"accessibility-sys",
@@ -7024,7 +7024,7 @@ dependencies = [
[[package]]
name = "screenpipe-db"
-version = "0.3.302"
+version = "0.3.303"
dependencies = [
"anyhow",
"chrono",
@@ -7050,7 +7050,7 @@ dependencies = [
[[package]]
name = "screenpipe-engine"
-version = "0.3.302"
+version = "0.3.303"
dependencies = [
"anyhow",
"arc-swap",
@@ -7122,7 +7122,7 @@ dependencies = [
[[package]]
name = "screenpipe-events"
-version = "0.3.302"
+version = "0.3.303"
dependencies = [
"anyhow",
"chrono",
@@ -7140,7 +7140,7 @@ dependencies = [
[[package]]
name = "screenpipe-screen"
-version = "0.3.302"
+version = "0.3.303"
dependencies = [
"accessibility-sys",
"anyhow",
@@ -7198,7 +7198,7 @@ dependencies = [
[[package]]
name = "screenpipe-vault"
-version = "0.3.302"
+version = "0.3.303"
dependencies = [
"argon2",
"chacha20poly1305",
diff --git a/Cargo.toml b/Cargo.toml
index 875210414..7577f0eba 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.302"
+version = "0.3.303"
authors = ["louis030195 <[email protected]>"]
description = ""
repository = "https://github.com/screenpipe/screenpipe"
diff --git a/crates/screenpipe-engine/src/connections_api.rs b/crates/screenpipe-engine/src/connections_api.rs
index 8bf2009bb..df1fed795 100644
--- a/crates/screenpipe-engine/src/connections_api.rs
+++ b/crates/screenpipe-engine/src/connections_api.rs
@@ -148,6 +148,30 @@ async fn get_connection(
) -> axum::response::Response {
use axum::response::IntoResponse;
+ // Browsers live in the registry, not in the integration table — so a
+ // generic `GET /connections/user-browser` would otherwise fall into
+ // ConnectionManager::find() and 400 with "unknown integration". Return
+ // the registry entry's natural-language description instead, which
+ // already embeds the eval/status endpoints the agent needs to drive it.
+ for b in state.browser_registry.list().await {
+ if b.id() == id {
+ let body = json!({
+ "id": b.id(),
+ "name": b.name(),
+ "category": "browser",
+ "connected": b.is_ready().await,
+ "description": format!(
+ "{}\n\nControl: GET /connections/browsers/{}/status, \
+ POST /connections/browsers/{}/eval {{\"code\":\"...\",\"url\":\"...\"}}.",
+ b.description(),
+ b.id(),
+ b.id(),
+ ),
+ });
+ return (StatusCode::OK, Json(body)).into_response();
+ }
+ }
+
let mgr = state.cm.lock().await;
let has_proxy = mgr.find_proxy_config(&id).is_some();