alexhancock/mcp-crate-cleanup (#4885)
This commit is contained in:
@@ -12,7 +12,6 @@ workspace = true
|
||||
|
||||
[dependencies]
|
||||
goose = { path = "../goose" }
|
||||
mcp-core = { path = "../mcp-core" }
|
||||
goose-mcp = { path = "../goose-mcp" }
|
||||
rmcp = { workspace = true }
|
||||
schemars = "1.0"
|
||||
|
||||
@@ -9,8 +9,9 @@ use goose::providers::base::{ConfigKey, ModelInfo, ProviderMetadata};
|
||||
|
||||
use goose::session::{Session, SessionInsights};
|
||||
use rmcp::model::{
|
||||
Annotations, Content, EmbeddedResource, ImageContent, RawEmbeddedResource, RawImageContent,
|
||||
RawResource, RawTextContent, ResourceContents, Role, TextContent, Tool, ToolAnnotations,
|
||||
Annotations, Content, EmbeddedResource, ImageContent, JsonObject, RawEmbeddedResource,
|
||||
RawImageContent, RawResource, RawTextContent, ResourceContents, Role, TextContent, Tool,
|
||||
ToolAnnotations,
|
||||
};
|
||||
use utoipa::{OpenApi, ToSchema};
|
||||
|
||||
@@ -312,6 +313,7 @@ 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)
|
||||
@@ -429,6 +431,7 @@ impl<'__s> ToSchema<'__s> for AnnotatedSchema {
|
||||
ResourceContentsSchema,
|
||||
ContextLengthExceeded,
|
||||
SummarizationRequested,
|
||||
JsonObjectSchema,
|
||||
RoleSchema,
|
||||
ProviderMetadata,
|
||||
ExtensionEntry,
|
||||
|
||||
@@ -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());
|
||||
.unwrap_or_else(|| "unknown".to_string().into());
|
||||
|
||||
let success = tool_response.tool_result.is_ok();
|
||||
let result_status = if success { "success" } else { "error" };
|
||||
|
||||
Reference in New Issue
Block a user