diff --git a/Cargo.lock b/Cargo.lock index d3877709..f5883141 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -3457,7 +3457,6 @@ dependencies = [ "etcetera", "fs2", "futures", - "futures-util", "include_dir", "indoc 2.0.6", "jsonschema", @@ -3471,7 +3470,6 @@ dependencies = [ "mockall", "nanoid", "once_cell", - "paste", "rand 0.8.5", "regex", "reqwest 0.12.12", diff --git a/crates/goose/Cargo.toml b/crates/goose/Cargo.toml index 24623116..0eb0921f 100644 --- a/crates/goose/Cargo.toml +++ b/crates/goose/Cargo.toml @@ -54,14 +54,9 @@ base64 = "0.21" url = "2.5" axum = "0.8.1" webbrowser = "0.8" -dotenv = "0.15" -lazy_static = "1.5" tracing = "0.1" tracing-subscriber = "0.3" -wiremock = "0.6.0" keyring = { version = "3.6.1", features = ["apple-native", "windows-native", "sync-secret-service", "vendored"] } -ctor = "0.2.7" -paste = "1.0" serde_yaml = "0.9.34" once_cell = "1.20.2" etcetera = "0.8.0" @@ -82,7 +77,6 @@ jsonwebtoken = "9.3.1" blake3 = "1.5" fs2 = "0.4.3" -futures-util = "0.3.31" tokio-stream = "0.1.17" dashmap = "6.1" ahash = "0.8" @@ -102,6 +96,9 @@ mockall = "0.13.1" wiremock = "0.6.0" tokio = { version = "1.43", features = ["full"] } temp-env = "0.3.6" +dotenv = "0.15.0" +lazy_static = "1.5.0" +ctor = "0.2.9" [[example]] name = "agent" diff --git a/crates/goose/src/agents/agent.rs b/crates/goose/src/agents/agent.rs index f8d5217c..dea971e5 100644 --- a/crates/goose/src/agents/agent.rs +++ b/crates/goose/src/agents/agent.rs @@ -5,9 +5,7 @@ use std::sync::Arc; use anyhow::{anyhow, Result}; use futures::stream::BoxStream; -use futures::{FutureExt, Stream, TryStreamExt}; -use futures_util::stream; -use futures_util::stream::StreamExt; +use futures::{stream, FutureExt, Stream, StreamExt, TryStreamExt}; use mcp_core::protocol::JsonRpcMessage; use crate::agents::final_output_tool::{FINAL_OUTPUT_CONTINUATION_MESSAGE, FINAL_OUTPUT_TOOL_NAME}; diff --git a/crates/goose/src/providers/githubcopilot.rs b/crates/goose/src/providers/githubcopilot.rs index e940ba12..97bd3ad5 100644 --- a/crates/goose/src/providers/githubcopilot.rs +++ b/crates/goose/src/providers/githubcopilot.rs @@ -139,7 +139,7 @@ impl GithubCopilotProvider { async fn post(&self, mut payload: Value) -> Result { use crate::providers::utils_universal_openai_stream::{OAIStreamChunk, OAIStreamCollector}; - use futures_util::StreamExt; + use futures::StreamExt; // Detect gpt-4.1 and stream let model_name = payload.get("model").and_then(|v| v.as_str()).unwrap_or(""); let stream_only_model = GITHUB_COPILOT_STREAM_MODELS diff --git a/crates/goose/src/providers/oauth.rs b/crates/goose/src/providers/oauth.rs index a1533eac..50c6ee09 100644 --- a/crates/goose/src/providers/oauth.rs +++ b/crates/goose/src/providers/oauth.rs @@ -3,7 +3,7 @@ use axum::{extract::Query, response::Html, routing::get, Router}; use base64::Engine; use chrono::{DateTime, Utc}; use etcetera::{choose_app_strategy, AppStrategy}; -use lazy_static::lazy_static; +use once_cell::sync::Lazy; use serde::{Deserialize, Serialize}; use serde_json::Value; use sha2::Digest; @@ -11,9 +11,7 @@ use std::{collections::HashMap, fs, net::SocketAddr, path::PathBuf, sync::Arc}; use tokio::sync::{oneshot, Mutex as TokioMutex}; use url::Url; -lazy_static! { - static ref OAUTH_MUTEX: TokioMutex<()> = TokioMutex::new(()); -} +static OAUTH_MUTEX: Lazy> = Lazy::new(|| TokioMutex::new(())); #[derive(Debug, Clone)] struct OidcEndpoints {