diff --git a/crates/goose-types/src/lib.rs b/crates/goose-types/src/lib.rs index c9fad52588c2..88749664e5da 100644 --- a/crates/goose-types/src/lib.rs +++ b/crates/goose-types/src/lib.rs @@ -89,6 +89,23 @@ impl Default for MessageMetadata { pub type MessageProviderMetadata = serde_json::Map; +#[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize, ToSchema)] +#[serde(rename_all = "camelCase")] +pub enum SystemNotificationType { + ThinkingMessage, + InlineMessage, + CreditsExhausted, +} + +#[derive(Debug, Clone, PartialEq, Serialize, Deserialize, ToSchema)] +#[serde(rename_all = "camelCase")] +pub struct SystemNotificationContent { + pub notification_type: SystemNotificationType, + pub msg: String, + #[serde(skip_serializing_if = "Option::is_none")] + pub data: Option, +} + impl MessageMetadata { pub fn agent_only() -> Self { Self { diff --git a/crates/goose/src/conversation/message.rs b/crates/goose/src/conversation/message.rs index c117de41ee0d..5bef9acd28a8 100644 --- a/crates/goose/src/conversation/message.rs +++ b/crates/goose/src/conversation/message.rs @@ -4,7 +4,7 @@ use crate::utils::sanitize_unicode_tags; use chrono::Utc; pub use goose_types::{ InferenceMetadata, MessageMetadata, MessageProviderMetadata as ProviderMetadata, - RedactedThinkingContent, ThinkingContent, + RedactedThinkingContent, SystemNotificationContent, SystemNotificationType, ThinkingContent, }; use rmcp::model::{ AnnotateAble, CallToolRequestParams, CallToolResult, Content, ImageContent, JsonObject, @@ -229,23 +229,6 @@ pub struct FrontendToolRequest { pub tool_call: ToolResult, } -#[derive(Debug, Clone, PartialEq, Serialize, Deserialize, ToSchema)] -#[serde(rename_all = "camelCase")] -pub enum SystemNotificationType { - ThinkingMessage, - InlineMessage, - CreditsExhausted, -} - -#[derive(Debug, Clone, PartialEq, Serialize, Deserialize, ToSchema)] -#[serde(rename_all = "camelCase")] -pub struct SystemNotificationContent { - pub notification_type: SystemNotificationType, - pub msg: String, - #[serde(skip_serializing_if = "Option::is_none")] - pub data: Option, -} - #[derive(Debug, Clone, PartialEq, Serialize, Deserialize, ToSchema)] /// Content passed inside a message, which can be both simple content and tool content #[serde(tag = "type", rename_all = "camelCase")]