Recipe config to limit tool availability (#4020)
This commit is contained in:
@@ -113,6 +113,7 @@ pub async fn handle_configure() -> Result<(), Box<dyn Error>> {
|
||||
timeout: Some(goose::config::DEFAULT_EXTENSION_TIMEOUT),
|
||||
bundled: Some(true),
|
||||
description: None,
|
||||
available_tools: Vec::new(),
|
||||
},
|
||||
})?;
|
||||
}
|
||||
@@ -771,6 +772,7 @@ pub fn configure_extensions_dialog() -> Result<(), Box<dyn Error>> {
|
||||
timeout: Some(timeout),
|
||||
bundled: Some(true),
|
||||
description: None,
|
||||
available_tools: Vec::new(),
|
||||
},
|
||||
})?;
|
||||
|
||||
@@ -878,6 +880,7 @@ pub fn configure_extensions_dialog() -> Result<(), Box<dyn Error>> {
|
||||
description,
|
||||
timeout: Some(timeout),
|
||||
bundled: None,
|
||||
available_tools: Vec::new(),
|
||||
},
|
||||
})?;
|
||||
|
||||
@@ -980,6 +983,7 @@ pub fn configure_extensions_dialog() -> Result<(), Box<dyn Error>> {
|
||||
description,
|
||||
timeout: Some(timeout),
|
||||
bundled: None,
|
||||
available_tools: Vec::new(),
|
||||
},
|
||||
})?;
|
||||
|
||||
@@ -1107,6 +1111,7 @@ pub fn configure_extensions_dialog() -> Result<(), Box<dyn Error>> {
|
||||
description,
|
||||
timeout: Some(timeout),
|
||||
bundled: None,
|
||||
available_tools: Vec::new(),
|
||||
},
|
||||
})?;
|
||||
|
||||
@@ -1736,6 +1741,7 @@ pub async fn handle_openrouter_auth() -> Result<(), Box<dyn Error>> {
|
||||
timeout: Some(goose::config::DEFAULT_EXTENSION_TIMEOUT),
|
||||
bundled: Some(true),
|
||||
description: None,
|
||||
available_tools: Vec::new(),
|
||||
},
|
||||
}) {
|
||||
Ok(_) => println!("✓ Developer extension enabled"),
|
||||
|
||||
@@ -143,6 +143,7 @@ mod tests {
|
||||
description: None,
|
||||
timeout: None,
|
||||
bundled: None,
|
||||
available_tools: Vec::new(),
|
||||
},
|
||||
ExtensionConfig::Stdio {
|
||||
name: "slack-mcp".to_string(),
|
||||
@@ -153,6 +154,7 @@ mod tests {
|
||||
timeout: None,
|
||||
description: None,
|
||||
bundled: None,
|
||||
available_tools: Vec::new(),
|
||||
},
|
||||
ExtensionConfig::Builtin {
|
||||
name: "builtin-ext".to_string(),
|
||||
@@ -160,6 +162,7 @@ mod tests {
|
||||
description: None,
|
||||
timeout: None,
|
||||
bundled: None,
|
||||
available_tools: Vec::new(),
|
||||
},
|
||||
]),
|
||||
context: None,
|
||||
@@ -237,6 +240,7 @@ mod tests {
|
||||
description: None,
|
||||
timeout: None,
|
||||
bundled: None,
|
||||
available_tools: Vec::new(),
|
||||
},
|
||||
ExtensionConfig::Stdio {
|
||||
name: "service-b".to_string(),
|
||||
@@ -247,6 +251,7 @@ mod tests {
|
||||
timeout: None,
|
||||
description: None,
|
||||
bundled: None,
|
||||
available_tools: Vec::new(),
|
||||
},
|
||||
]),
|
||||
context: None,
|
||||
@@ -294,6 +299,7 @@ mod tests {
|
||||
description: None,
|
||||
timeout: None,
|
||||
bundled: None,
|
||||
available_tools: Vec::new(),
|
||||
}]),
|
||||
sub_recipes: Some(vec![SubRecipe {
|
||||
name: "child-recipe".to_string(),
|
||||
|
||||
@@ -211,6 +211,7 @@ impl Session {
|
||||
// TODO: should set timeout
|
||||
timeout: Some(goose::config::DEFAULT_EXTENSION_TIMEOUT),
|
||||
bundled: None,
|
||||
available_tools: Vec::new(),
|
||||
};
|
||||
|
||||
self.agent
|
||||
@@ -244,6 +245,7 @@ impl Session {
|
||||
// TODO: should set timeout
|
||||
timeout: Some(goose::config::DEFAULT_EXTENSION_TIMEOUT),
|
||||
bundled: None,
|
||||
available_tools: Vec::new(),
|
||||
};
|
||||
|
||||
self.agent
|
||||
@@ -278,6 +280,7 @@ impl Session {
|
||||
// TODO: should set timeout
|
||||
timeout: Some(goose::config::DEFAULT_EXTENSION_TIMEOUT),
|
||||
bundled: None,
|
||||
available_tools: Vec::new(),
|
||||
};
|
||||
|
||||
self.agent
|
||||
@@ -304,6 +307,7 @@ impl Session {
|
||||
timeout: Some(goose::config::DEFAULT_EXTENSION_TIMEOUT),
|
||||
bundled: None,
|
||||
description: None,
|
||||
available_tools: Vec::new(),
|
||||
};
|
||||
self.agent
|
||||
.add_extension(config)
|
||||
|
||||
Reference in New Issue
Block a user