undoing changes

This commit is contained in:
Michael Neale
2025-12-12 17:49:09 +11:00
parent 0edcd3721d
commit dede50cfd4
5 changed files with 46 additions and 33 deletions
Generated
+41 -6
View File
@@ -3025,7 +3025,7 @@ dependencies = [
"rand 0.8.5",
"regex",
"reqwest 0.12.12",
"rmcp",
"rmcp 0.9.1",
"schemars",
"serde",
"serde_json",
@@ -3075,7 +3075,7 @@ dependencies = [
"once_cell",
"paste",
"regex",
"rmcp",
"rmcp 0.9.1",
"serde",
"serde_json",
"tokio",
@@ -3114,7 +3114,7 @@ dependencies = [
"open",
"rand 0.8.5",
"regex",
"rmcp",
"rmcp 0.9.1",
"rustyline",
"serde",
"serde_json",
@@ -3169,7 +3169,7 @@ dependencies = [
"rayon",
"regex",
"reqwest 0.11.27",
"rmcp",
"rmcp 0.8.5",
"schemars",
"serde",
"serde_json",
@@ -3223,7 +3223,7 @@ dependencies = [
"http 1.2.0",
"rand 0.9.2",
"reqwest 0.12.12",
"rmcp",
"rmcp 0.9.1",
"rustls 0.23.31",
"schemars",
"serde",
@@ -6200,6 +6200,28 @@ dependencies = [
"windows-sys 0.52.0",
]
[[package]]
name = "rmcp"
version = "0.8.5"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "e5947688160b56fb6c827e3c20a72c90392a1d7e9dec74749197aa1780ac42ca"
dependencies = [
"base64 0.22.1",
"chrono",
"futures",
"paste",
"pin-project-lite",
"rmcp-macros 0.8.5",
"schemars",
"serde",
"serde_json",
"thiserror 2.0.17",
"tokio",
"tokio-stream",
"tokio-util",
"tracing",
]
[[package]]
name = "rmcp"
version = "0.9.1"
@@ -6216,7 +6238,7 @@ dependencies = [
"pin-project-lite",
"process-wrap",
"reqwest 0.12.12",
"rmcp-macros",
"rmcp-macros 0.9.1",
"schemars",
"serde",
"serde_json",
@@ -6229,6 +6251,19 @@ dependencies = [
"url",
]
[[package]]
name = "rmcp-macros"
version = "0.8.5"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "01263441d3f8635c628e33856c468b96ebbce1af2d3699ea712ca71432d4ee7a"
dependencies = [
"darling 0.21.0",
"proc-macro2",
"quote",
"serde_json",
"syn 2.0.111",
]
[[package]]
name = "rmcp-macros"
version = "0.9.1"
+1 -1
View File
@@ -11,7 +11,7 @@ description.workspace = true
workspace = true
[dependencies]
rmcp = { version = "0.9.1", features = ["server", "client", "transport-io", "macros"] }
rmcp = { version = "0.8.1", features = ["server", "client", "transport-io", "macros"] }
anyhow = "1.0.94"
tokio = { version = "1", features = ["full"] }
tokio-stream = { version = "0.1", features = ["io-util"] }
+4 -17
View File
@@ -598,25 +598,12 @@ impl ExtensionManager {
.insert(name, Extension::new(config, client, info, temp_dir));
}
/// Get extensions info for building the system prompt.
/// When code_execution is enabled, it routes tools from other extensions through its
/// execute_code interface, so those extensions should not appear as separate sections
/// in the system prompt (their instructions would be irrelevant/confusing).
/// Get extensions info
pub async fn get_extensions_info(&self) -> Vec<ExtensionInfo> {
let extensions = self.extensions.lock().await;
let code_exec_enabled = extensions.contains_key("code_execution");
extensions
self.extensions
.lock()
.await
.iter()
.filter(|(name, _)| {
if code_exec_enabled {
// When code_execution is enabled, only show code_execution itself
// Other extensions' tools are accessed via code_execution's execute_code
name.as_str() == "code_execution"
} else {
true
}
})
.map(|(name, ext)| {
ExtensionInfo::new(
name,
@@ -44,7 +44,6 @@ struct SystemPromptContext {
enable_subagents: bool,
max_extensions: usize,
max_tools: usize,
code_execution_mode: bool,
}
pub struct SystemPromptBuilder<'a, M> {
@@ -139,11 +138,6 @@ impl<'a> SystemPromptBuilder<'a, PromptManager> {
})
.collect();
// Detect code_execution mode: when enabled, only code_execution extension is passed
let code_execution_mode = sanitized_extensions_info
.iter()
.any(|ext| ext.name == "code_execution");
let config = Config::global();
let goose_mode = config.get_goose_mode().unwrap_or(GooseMode::Auto);
@@ -161,7 +155,6 @@ impl<'a> SystemPromptBuilder<'a, PromptManager> {
enable_subagents: should_enabled_subagents(self.model_name.as_str()),
max_extensions: MAX_EXTENSIONS,
max_tools: MAX_TOOLS,
code_execution_mode,
};
let base_prompt = if let Some(override_prompt) = &self.manager.system_prompt_override {
-2
View File
@@ -5,7 +5,6 @@ goose uses LLM providers with tool calling capability. You can be used with diff
claude-sonnet-4, o1, llama-3.2, deepseek-r1, etc).
These models have varying knowledge cut-off dates depending on when they were trained, but typically it's between 5-10
months prior to the current date.
{% if not code_execution_mode %}
# Extensions
@@ -41,7 +40,6 @@ and platform__list_resources on this extension.
{% else %}
No extensions are defined. You should let the user know that they should add extensions.
{% endif %}
{% endif %}
{% if extension_tool_limits is defined %}
{% with (extension_count, tool_count) = extension_tool_limits %}