From c4eb48ce6a0100d98f4e87d52105874402e738c9 Mon Sep 17 00:00:00 2001 From: Nathan Flurry Date: Tue, 17 Mar 2026 15:19:56 -0700 Subject: [PATCH] feat: [US-032] - Remove dead cdp_client() method from BrowserRuntime Co-Authored-By: Claude Opus 4.6 (1M context) --- .../packages/sandbox-agent/src/browser_runtime.rs | 14 -------------- 1 file changed, 14 deletions(-) diff --git a/server/packages/sandbox-agent/src/browser_runtime.rs b/server/packages/sandbox-agent/src/browser_runtime.rs index 9490019..b555225 100644 --- a/server/packages/sandbox-agent/src/browser_runtime.rs +++ b/server/packages/sandbox-agent/src/browser_runtime.rs @@ -549,20 +549,6 @@ impl BrowserRuntime { let _ = self.stop().await; } - /// Get a reference to the CDP client, if connected. - pub async fn cdp_client(&self) -> Result { - let state = self.inner.lock().await; - if state.state != BrowserState::Active { - return Err(BrowserProblem::not_active()); - } - // We cannot return a reference out of the Mutex, so we need to use - // the send method directly. For now, return an error if not connected. - // Callers should use `with_cdp` instead. - Err(BrowserProblem::cdp_error( - "Use with_cdp() to execute CDP commands", - )) - } - /// Execute a closure with the CDP client while holding the state lock. pub async fn with_cdp(&self, f: F) -> Result where