Revert "Internal MCP Crate Cleanup (#4800)" (#4883)

This commit is contained in:
Alex Hancock
2025-09-29 14:21:30 -04:00
committed by GitHub
parent 2cfef016e2
commit b9ba8dca29
78 changed files with 1090 additions and 844 deletions
+1
View File
@@ -12,6 +12,7 @@ workspace = true
[dependencies]
goose = { path = "../goose" }
mcp-core = { path = "../mcp-core" }
goose-mcp = { path = "../goose-mcp" }
rmcp = { workspace = true }
schemars = "1.0"
+2 -5
View File
@@ -9,9 +9,8 @@ use goose::providers::base::{ConfigKey, ModelInfo, ProviderMetadata};
use goose::session::{Session, SessionInsights};
use rmcp::model::{
Annotations, Content, EmbeddedResource, ImageContent, JsonObject, RawEmbeddedResource,
RawImageContent, RawResource, RawTextContent, ResourceContents, Role, TextContent, Tool,
ToolAnnotations,
Annotations, Content, EmbeddedResource, ImageContent, RawEmbeddedResource, RawImageContent,
RawResource, RawTextContent, ResourceContents, Role, TextContent, Tool, ToolAnnotations,
};
use utoipa::{OpenApi, ToSchema};
@@ -313,7 +312,6 @@ derive_utoipa!(Tool as ToolSchema);
derive_utoipa!(ToolAnnotations as ToolAnnotationsSchema);
derive_utoipa!(Annotations as AnnotationsSchema);
derive_utoipa!(ResourceContents as ResourceContentsSchema);
derive_utoipa!(JsonObject as JsonObjectSchema);
// Create a manual schema for the generic Annotated type
// We manually define this to avoid circular references from RawContent::Audio(AudioContent)
@@ -431,7 +429,6 @@ impl<'__s> ToSchema<'__s> for AnnotatedSchema {
ResourceContentsSchema,
ContextLengthExceeded,
SummarizationRequested,
JsonObjectSchema,
RoleSchema,
ProviderMetadata,
ExtensionEntry,
+2 -2
View File
@@ -11,13 +11,13 @@ use futures::{stream::StreamExt, Stream};
use goose::conversation::message::{Message, MessageContent};
use goose::conversation::Conversation;
use goose::execution::SessionExecutionMode;
use goose::mcp_utils::ToolResult;
use goose::permission::{Permission, PermissionConfirmation};
use goose::session::SessionManager;
use goose::{
agents::{AgentEvent, SessionConfig},
permission::permission_confirmation::PrincipalType,
};
use mcp_core::ToolResult;
use rmcp::model::{Content, ServerNotification};
use serde::{Deserialize, Serialize};
use serde_json::json;
@@ -66,7 +66,7 @@ fn track_tool_telemetry(content: &MessageContent, all_messages: &[Message]) {
}
})
})
.unwrap_or_else(|| "unknown".to_string().into());
.unwrap_or_else(|| "unknown".to_string());
let success = tool_response.tool_result.is_ok();
let result_status = if success { "success" } else { "error" };