Files
buzz/desktop/src-tauri/src/commands/mod.rs
Will Pfleger ba776b9959 feat(desktop): add configurable transport reconnect hook (#1059)
Adds a build-time-configured transport reconnect hook so internal builds can recover the underlying transport (e.g. WARP VPN) before the relay reconnect, while OSS builds stay a pure no-op.

The generic "Reconnect to relay" button is transport-agnostic; internal users behind a VPN need the transport re-established first. A build-time env var `BUZZ_BUILD_RELAY_RECONNECT_CMD` (set only in `squareup/buzz-releases`) carries a JSON config validated into a typed Rust struct at compile time, so the OSS binary ships with zero VPN knowledge.

- New Tauri command `relay_reconnect_hook` runs structured fixed-argv steps plus a readiness probe, wrapped in `tokio::task::spawn_blocking`; non-fatal end-to-end so any failure falls through to `preconnect()`.
- `ReconnectHookConfig` lives in one dep-free source file `include!`'d by both `build.rs` and the runtime command, so the compile-time validation and runtime parse cannot drift.
- `useReconnectRelay.ts` invokes the hook before relay preconnect, guarded so a hook rejection cannot abort the reconnect.
- When `BUZZ_BUILD_RELAY_RECONNECT_CMD` is unset (OSS), the command compiles to an early-return no-op.

Signed-off-by: Will Pfleger <pfleger.will@gmail.com>
Co-authored-by: npub1mn7jgtj4w2pd0g0zeuhxsa6jy6p0rewxz4kujt98my82ahfmp72sxjexk7 <dcfd242e557282d7a1e2cf2e6877522682f1e5c6156dc92ca7d90eaedd3b0f95@sprout-oss.stage.blox.sqprod.co>
2026-06-16 10:15:15 -04:00

58 lines
1.1 KiB
Rust

mod agent_discovery;
mod agent_models;
mod agent_settings;
mod agents;
mod canvas;
mod channel_templates;
mod channels;
mod dms;
mod engrams;
mod export_util;
mod identity;
mod identity_archive;
mod legacy_storage;
mod media;
mod media_download;
mod media_transcode;
#[cfg(feature = "mesh-llm")]
mod mesh_llm;
mod messages;
pub mod pairing;
mod personas;
mod prevent_sleep;
mod profile;
mod relay_members;
mod relay_reconnect;
mod social;
mod teams;
mod workflows;
mod workspace;
pub use agent_discovery::*;
pub use agent_models::*;
pub use agent_settings::*;
pub use agents::*;
pub use canvas::*;
pub use channel_templates::*;
pub use channels::*;
pub use dms::*;
pub use engrams::*;
pub use identity::*;
pub use identity_archive::*;
pub use legacy_storage::*;
pub use media::*;
pub use media_download::*;
#[cfg(feature = "mesh-llm")]
pub use mesh_llm::*;
pub use messages::*;
pub use pairing::*;
pub use personas::*;
pub use prevent_sleep::*;
pub use profile::*;
pub use relay_members::*;
pub use relay_reconnect::*;
pub use social::*;
pub use teams::*;
pub use workflows::*;
pub use workspace::*;