Rewrite extension management tools (#5057)

Signed-off-by: Angela Ning <aning@squareup.com>
This commit is contained in:
Angela Ning
2025-10-17 14:22:58 -04:00
committed by GitHub
parent db8fe34ff9
commit bccfa0156c
19 changed files with 926 additions and 354 deletions
@@ -3,9 +3,6 @@ use cliclack::spinner;
use console::style;
use goose::agents::extension::ToolInfo;
use goose::agents::extension_manager::get_parameter_names;
use goose::agents::platform_tools::{
PLATFORM_LIST_RESOURCES_TOOL_NAME, PLATFORM_READ_RESOURCE_TOOL_NAME,
};
use goose::agents::Agent;
use goose::agents::{extension::Envs, ExtensionConfig};
use goose::config::declarative_providers::{create_custom_provider, remove_custom_provider};
@@ -1449,10 +1446,6 @@ pub async fn configure_tool_permissions_dialog() -> Result<(), Box<dyn Error>> {
.list_tools(Some(selected_extension_name.clone()))
.await
.into_iter()
.filter(|tool| {
tool.name != PLATFORM_LIST_RESOURCES_TOOL_NAME
&& tool.name != PLATFORM_READ_RESOURCE_TOOL_NAME
})
.map(|tool| {
ToolInfo::new(
&tool.name,
+2
View File
@@ -324,6 +324,8 @@ pub async fn build_session(session_config: SessionBuilderConfig) -> CliSession {
.extension_manager
.set_context(PlatformExtensionContext {
session_id: session_id.clone(),
extension_manager: Some(Arc::downgrade(&agent.extension_manager)),
tool_route_manager: Some(Arc::downgrade(&agent.tool_route_manager)),
})
.await;