From a4d80a31965d31ad28b8167ce2ca3b437ab10cbb Mon Sep 17 00:00:00 2001 From: Michael Neale Date: Tue, 4 Nov 2025 18:13:56 +1100 Subject: [PATCH] this slop is exhausting --- crates/goose-server/src/commands/agent.rs | 1 - crates/goose-server/src/routes/tunnel.rs | 3 --- crates/goose-server/src/state.rs | 4 ---- crates/goose-server/src/tunnel/mod.rs | 6 ------ 4 files changed, 14 deletions(-) diff --git a/crates/goose-server/src/commands/agent.rs b/crates/goose-server/src/commands/agent.rs index 6af20553f9..5888bf508d 100644 --- a/crates/goose-server/src/commands/agent.rs +++ b/crates/goose-server/src/commands/agent.rs @@ -64,7 +64,6 @@ pub async fn run() -> Result<()> { let local_addr = listener.local_addr()?; info!("listening on {}", local_addr); - // Auto-start tunnel if configured (spawn as background task to not block server startup) let port = local_addr.port(); let app_state_clone = app_state.clone(); tokio::spawn(async move { diff --git a/crates/goose-server/src/routes/tunnel.rs b/crates/goose-server/src/routes/tunnel.rs index 3719f1b05a..f323567f8a 100644 --- a/crates/goose-server/src/routes/tunnel.rs +++ b/crates/goose-server/src/routes/tunnel.rs @@ -21,8 +21,6 @@ pub struct ErrorResponse { } /// Start the tunnel -/// -/// Starts a Lapstone tunnel with the specified port. #[utoipa::path( post, path = "/api/tunnel/start", @@ -40,7 +38,6 @@ pub async fn start_tunnel( ) -> Response { match state.tunnel_manager.start(req.port).await { Ok(_info) => { - // Return current status (includes auto_start flag) let status = state.tunnel_manager.get_status().await; (StatusCode::OK, Json(status)).into_response() } diff --git a/crates/goose-server/src/state.rs b/crates/goose-server/src/state.rs index 560dba9ec6..752ebb87be 100644 --- a/crates/goose-server/src/state.rs +++ b/crates/goose-server/src/state.rs @@ -36,13 +36,9 @@ impl AppState { })) } - /// Auto-start tunnel if configured to do so pub async fn auto_start_tunnel(&self, port: u16) { let status = self.tunnel_manager.get_status().await; - // Only auto-start if: - // 1. auto_start is enabled - // 2. tunnel is not already running if status.auto_start && status.state == crate::tunnel::TunnelState::Idle { tracing::info!("Auto-starting tunnel on port {}", port); match self.tunnel_manager.start(port).await { diff --git a/crates/goose-server/src/tunnel/mod.rs b/crates/goose-server/src/tunnel/mod.rs index 05066326b1..2c4f2e3cf4 100644 --- a/crates/goose-server/src/tunnel/mod.rs +++ b/crates/goose-server/src/tunnel/mod.rs @@ -5,9 +5,6 @@ use serde::{Deserialize, Serialize}; use std::sync::Arc; use tokio::sync::RwLock; -// Note: TunnelMode removed - only Lapstone is currently supported -// See tunnel/archived/README.md for archived Tailscale implementation - #[derive(Debug, Clone, Serialize, Deserialize, PartialEq, Default)] #[serde(rename_all = "lowercase")] pub enum TunnelState { @@ -86,7 +83,6 @@ impl TunnelManager { { let mut cfg = self.config.write().await; f(&mut cfg); - // Save config via goose Config system (keyring + config.yaml) if let Err(e) = config::save_config(&cfg).await { tracing::error!("Failed to save tunnel config: {}", e); } @@ -102,7 +98,6 @@ impl TunnelManager { let config = self.config.read().await.clone(); - // Only Lapstone tunnel is currently supported let tunnel_secret = config.secret.clone().unwrap_or_else(generate_secret); let server_secret = std::env::var("GOOSE_SERVER__SECRET_KEY") .expect("GOOSE_SERVER__SECRET_KEY must be set for tunnel to work"); @@ -138,7 +133,6 @@ impl TunnelManager { } pub async fn stop(&self, clear_auto_start: bool) { - // Only Lapstone tunnel is currently supported lapstone::stop(self.lapstone_handle.clone()).await; *self.state.write().await = TunnelState::Idle;