Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
450 changes: 241 additions & 209 deletions Cargo.lock

Large diffs are not rendered by default.

10 changes: 5 additions & 5 deletions crates/goose/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -93,9 +93,9 @@ unicode-normalization = "0.1"
goose-mcp = { path = "../goose-mcp" }

# For local Whisper transcription
candle-core = { version = "0.8.4" }
candle-nn = { version = "0.8.4" }
candle-transformers = { version = "0.8.4" }
candle-core = { version = "0.9", default-features = false }
candle-nn = { version = "0.9", default-features = false }
candle-transformers = { version = "0.9", default-features = false }
byteorder = "1.5.0"
tokenizers = "0.21.0"
hf-hub = { version = "0.4.3", default-features = false, features = ["tokio"] }
Expand All @@ -120,8 +120,8 @@ winapi = { version = "0.3", features = ["wincred"] }

# Platform-specific GPU acceleration for Whisper
[target.'cfg(target_os = "macos")'.dependencies]
candle-core = { version = "0.8.4", features = ["metal"] }
candle-nn = { version = "0.8.4", features = ["metal"] }
candle-core = { version = "0.9", default-features = false, features = ["metal"] }
candle-nn = { version = "0.9", default-features = false, features = ["metal"] }

[dev-dependencies]
serial_test = { workspace = true }
Expand Down
6 changes: 3 additions & 3 deletions crates/goose/src/agents/code_execution_extension.rs
Original file line number Diff line number Diff line change
Expand Up @@ -201,7 +201,7 @@ struct ToolInfo {

impl ToolInfo {
fn from_mcp_tool(tool: &McpTool) -> Option<Self> {
let (server_name, tool_name) = tool.name.as_ref().split_once("__")?;
let (server_name, tool_name) = tool.name.split_once("__")?;
let param_names = get_parameter_names(tool);

let mut schema_value = Value::Object(tool.input_schema.as_ref().clone());
Expand Down Expand Up @@ -235,11 +235,11 @@ impl ToolInfo {
Some(Self {
server_name: server_name.to_string(),
tool_name: tool_name.to_string(),
full_name: tool.name.as_ref().to_string(),
full_name: tool.name.to_string(),
description: tool
.description
.as_ref()
.map(|d| d.as_ref().to_string())
.map(|d| d.to_string())
.unwrap_or_default(),
params,
return_type,
Expand Down
2 changes: 1 addition & 1 deletion crates/goose/src/agents/extension_manager.rs
Original file line number Diff line number Diff line change
Expand Up @@ -791,7 +791,7 @@ impl ExtensionManager {
tools
.iter()
.filter(|tool| {
let tool_prefix = tool.name.as_ref().split("__").next().unwrap_or("");
let tool_prefix = tool.name.split("__").next().unwrap_or("");

if let Some(ref excluded) = exclude_normalized {
if tool_prefix == excluded {
Expand Down
2 changes: 1 addition & 1 deletion crates/goose/src/config/search_path.rs
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ impl SearchPaths {
Self {
paths: paths
.into_iter()
.map(|s| PathBuf::from(shellexpand::tilde(&s).as_ref()))
.map(|s| PathBuf::from(&*shellexpand::tilde(&s)))
.collect(),
}
}
Expand Down
8 changes: 4 additions & 4 deletions crates/goose/src/permission/permission_inspector.rs
Original file line number Diff line number Diff line change
Expand Up @@ -131,8 +131,8 @@ impl ToolInspector for PermissionInspector {
}
}
// 2. Check if it's a readonly or regular tool (both pre-approved)
else if self.readonly_tools.contains(tool_name.as_ref())
|| self.regular_tools.contains(tool_name.as_ref())
else if self.readonly_tools.contains(&**tool_name)
|| self.regular_tools.contains(&**tool_name)
{
InspectionAction::Allow
}
Expand All @@ -153,9 +153,9 @@ impl ToolInspector for PermissionInspector {
InspectionAction::Allow => {
if goose_mode == GooseMode::Auto {
"Auto mode - all tools approved".to_string()
} else if self.readonly_tools.contains(tool_name.as_ref()) {
} else if self.readonly_tools.contains(&**tool_name) {
"Tool marked as read-only".to_string()
} else if self.regular_tools.contains(tool_name.as_ref()) {
} else if self.regular_tools.contains(&**tool_name) {
"Tool pre-approved".to_string()
} else {
"User permission allows this tool".to_string()
Expand Down
4 changes: 2 additions & 2 deletions crates/goose/src/session/session_manager.rs
Original file line number Diff line number Diff line change
Expand Up @@ -697,7 +697,7 @@ impl SessionStorage {
.bind(&session.name)
.bind(session.user_set_name)
.bind(session.session_type.to_string())
.bind(session.working_dir.to_string_lossy().as_ref())
.bind(&*session.working_dir.to_string_lossy())
.bind(session.created_at)
.bind(session.updated_at)
.bind(serde_json::to_string(&session.extension_data)?)
Expand Down Expand Up @@ -924,7 +924,7 @@ impl SessionStorage {
.bind(&today)
.bind(&name)
.bind(session_type.to_string())
.bind(working_dir.to_string_lossy().as_ref())
.bind(&*working_dir.to_string_lossy())
.fetch_one(&mut *tx)
.await?;

Expand Down
3 changes: 1 addition & 2 deletions crates/goose/src/token_counter.rs
Original file line number Diff line number Diff line change
Expand Up @@ -65,8 +65,7 @@ impl TokenCounter {
let name = &tool.name;
let description = &tool
.description
.as_ref()
.map(|d| d.as_ref())
.as_deref()
.unwrap_or_default()
.trim_end_matches('.');

Expand Down
Loading