The fastest, cheapest, most efficient open-source agent harness. Run more than 500 agents on a $10 VPS.
Rust agent-orchestrationai-agentsai-assistantdesktopllmlocal-firstmcppersonal-aiprivacyrustsecond-braintauri
feat(store): validate remote transport before saving gateway
Steven Enamakelaad8fd93df08
diff --git a/app/src-tauri/src/gateway/store.rs b/app/src-tauri/src/gateway/store.rsindex df5a79e717..15ecbd555a 100644--- a/app/src-tauri/src/gateway/store.rs+++ b/app/src-tauri/src/gateway/store.rs@@ -18,7 +18,7 @@ use std::path::PathBuf;use serde::{Deserialize, Serialize};-use super::types::{Gateway, DESKTOP_ID};+use super::types::{validate_remote_transport, Gateway, GatewaySpec, DESKTOP_ID};/// The file gateway records are written to.const STORE_FILE: &str = "gateways.json";@@ -74,6 +74,9 @@ pub fn save(gateway: Gateway) -> Result<(), String> {if gateway.id.trim().is_empty() {return Err("a gateway needs an id".to_owned());}+ if let GatewaySpec::Remote { url, token } = &gateway.spec {+ validate_remote_transport(url, token.as_deref())?;+ }let mut stored = read();match stored