Soul-driven AI agent with permission-hardened tools, token budgets, and multi-channel access. Runs 24/7 from CLI, Telegram or More.
fix(optimus): stay compatible with Mercury 1.4.0-1.4.2
Salman Qureshif03781061884
diff --git a/apps/desktop/src/views/settings/Devices.tsx b/apps/desktop/src/views/settings/Devices.tsxindex ef5a5bdb..88c7e266 100644--- a/apps/desktop/src/views/settings/Devices.tsx+++ b/apps/desktop/src/views/settings/Devices.tsx@@ -35,6 +35,8 @@ export function DevicesCard({ pluginId }: { pluginId?: string } = {}) {setError(null);} catch (e) {if (e instanceof ApiError && e.data.remote) setRemote(true);+ // Mercury before 1.4.3 has no /api/devices.+ else if (e instanceof ApiError && e.status === 404) setError("This version of Mercury doesn't report the microphone and permissions yet. Update Mercury on the computer it runs on (mercury upgrade), then come back.");else setError(errorText(e));}}, [pluginId]);@@ -54,7 +56,7 @@ export function DevicesCard({ pluginId }: { pluginId?: string } = {}) {</Shell>);}- if (error) return <Shell><p className="text-sm text-red">{error}</p></Shell>;+ if (error) return <Shell><p className="text-sm text-ink3">{error}</p></Shell>;if (!plugins) return <Shell><Spinner size={16} /></Shell>;if (plugins.length === 0) {return (diff --git a/plugins/optimus/companion/src/devices.rs b/plugins/optimus/companion/src/devices.rsindex e0ed6522..6a4c1d2e 100644--- a/plugins/optimus/companion/src/devices.rs+++ b/plugins/optimus/companion/src/devices.rs@@ -804,13 +804,15 @@ mod os {}}+ /// Linux has no microphone permission to refuse, and a raw ALSA device can still work without+ /// a sound server (or under an older Mercury that doesn't pass the session's details): never+ /// block a session here, just say what looks wrong. A silent mic still shows in the app's test.pub fn mic_ready() -> Result<(), String> {let e = mic_entry();- if e["state"] == "granted" {- return Ok(());+ if e["state"] != "granted" {+ crate::core::log(format!("microphone: {}", e["detail"].as_str().unwrap_or("")));}- let steps: Vec<String> = e["steps"].as_array().map(|a| a.iter().filter_map(|s| s.as_str().map(str::to_string)).collect()).unwrap_or_default();- Err(format!("{} {}", e["detail"].as_str().unwrap_or(""), steps.join(" ")))+ Ok(())}pub fn audio_steps() -> Vec<String> {