Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,8 @@ jobs:
cargo test -- --skip scenario_tests::scenarios::tests
cargo test --jobs 1 scenario_tests::scenarios::tests
working-directory: crates
env:
RUST_MIN_STACK: 8388608


rust-lint:
Expand Down
22 changes: 11 additions & 11 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ uninlined_format_args = "allow"
string_slice = "warn"

[workspace.dependencies]
rmcp = { version = "0.13.0", features = ["schemars", "auth"] }
rmcp = { version = "0.14.0", features = ["schemars", "auth"] }
anyhow = "1.0"
futures = "0.3"
regex = "1.12"
Expand Down
47 changes: 31 additions & 16 deletions crates/goose-cli/src/session/export.rs
Original file line number Diff line number Diff line change
Expand Up @@ -410,7 +410,7 @@ pub fn message_to_markdown(message: &Message, export_all_content: bool) -> Strin
mod tests {
use super::*;
use goose::conversation::message::{Message, ToolRequest, ToolResponse};
use rmcp::model::{CallToolRequestParam, Content, RawTextContent, TextContent};
use rmcp::model::{CallToolRequestParams, Content, RawTextContent, TextContent};
use rmcp::object;
use serde_json::json;

Expand Down Expand Up @@ -526,7 +526,8 @@ mod tests {

#[test]
fn test_tool_request_to_markdown_shell() {
let tool_call = CallToolRequestParam {
let tool_call = CallToolRequestParams {
meta: None,
task: None,
name: "developer__shell".into(),
arguments: Some(object!({
Expand All @@ -552,7 +553,8 @@ mod tests {

#[test]
fn test_tool_request_to_markdown_text_editor() {
let tool_call = CallToolRequestParam {
let tool_call = CallToolRequestParams {
meta: None,
task: None,
name: "developer__text_editor".into(),
arguments: Some(object!({
Expand Down Expand Up @@ -636,7 +638,8 @@ mod tests {

#[test]
fn test_message_to_markdown_with_tool_request() {
let tool_call = CallToolRequestParam {
let tool_call = CallToolRequestParams {
meta: None,
task: None,
name: "test_tool".into(),
arguments: Some(object!({"param": "value"})),
Expand Down Expand Up @@ -696,7 +699,8 @@ mod tests {

#[test]
fn test_shell_tool_with_code_output() {
let tool_call = CallToolRequestParam {
let tool_call = CallToolRequestParams {
meta: None,
task: None,
name: "developer__shell".into(),
arguments: Some(object!({
Expand Down Expand Up @@ -751,7 +755,8 @@ if __name__ == "__main__":

#[test]
fn test_shell_tool_with_git_commands() {
let git_status_call = CallToolRequestParam {
let git_status_call = CallToolRequestParams {
meta: None,
task: None,
name: "developer__shell".into(),
arguments: Some(object!({
Expand Down Expand Up @@ -798,7 +803,8 @@ if __name__ == "__main__":

#[test]
fn test_shell_tool_with_build_output() {
let cargo_build_call = CallToolRequestParam {
let cargo_build_call = CallToolRequestParams {
meta: None,
task: None,
name: "developer__shell".into(),
arguments: Some(object!({
Expand Down Expand Up @@ -851,7 +857,8 @@ warning: unused variable `x`

#[test]
fn test_shell_tool_with_json_api_response() {
let curl_call = CallToolRequestParam {
let curl_call = CallToolRequestParams {
meta: None,
task: None,
name: "developer__shell".into(),
arguments: Some(object!({
Expand Down Expand Up @@ -906,7 +913,8 @@ warning: unused variable `x`

#[test]
fn test_text_editor_tool_with_code_creation() {
let editor_call = CallToolRequestParam {
let editor_call = CallToolRequestParams {
meta: None,
task: None,
name: "developer__text_editor".into(),
arguments: Some(object!({
Expand Down Expand Up @@ -956,7 +964,8 @@ warning: unused variable `x`

#[test]
fn test_text_editor_tool_view_code() {
let editor_call = CallToolRequestParam {
let editor_call = CallToolRequestParams {
meta: None,
task: None,
name: "developer__text_editor".into(),
arguments: Some(object!({
Expand Down Expand Up @@ -1015,7 +1024,8 @@ def process_data(data: List[Dict]) -> List[Dict]:

#[test]
fn test_shell_tool_with_error_output() {
let error_call = CallToolRequestParam {
let error_call = CallToolRequestParams {
meta: None,
task: None,
name: "developer__shell".into(),
arguments: Some(object!({
Expand Down Expand Up @@ -1059,7 +1069,8 @@ Command failed with exit code 2"#;

#[test]
fn test_shell_tool_complex_script_execution() {
let script_call = CallToolRequestParam {
let script_call = CallToolRequestParams {
meta: None,
task: None,
name: "developer__shell".into(),
arguments: Some(object!({
Expand Down Expand Up @@ -1114,7 +1125,8 @@ Command failed with exit code 2"#;

#[test]
fn test_shell_tool_with_multi_command() {
let multi_call = CallToolRequestParam {
let multi_call = CallToolRequestParams {
meta: None,
task: None,
name: "developer__shell".into(),
arguments: Some(object!({
Expand Down Expand Up @@ -1167,7 +1179,8 @@ drwx------ 3 user staff 96 Dec 6 16:20 com.apple.launchd.abc

#[test]
fn test_developer_tool_grep_code_search() {
let grep_call = CallToolRequestParam {
let grep_call = CallToolRequestParams {
meta: None,
task: None,
name: "developer__shell".into(),
arguments: Some(object!({
Expand Down Expand Up @@ -1219,7 +1232,8 @@ src/middleware.rs:12:async fn auth_middleware(req: Request, next: Next) -> Resul
#[test]
fn test_shell_tool_json_detection_works() {
// This test shows that JSON detection in tool responses DOES work
let tool_call = CallToolRequestParam {
let tool_call = CallToolRequestParams {
meta: None,
task: None,
name: "developer__shell".into(),
arguments: Some(object!({
Expand Down Expand Up @@ -1262,7 +1276,8 @@ src/middleware.rs:12:async fn auth_middleware(req: Request, next: Next) -> Resul

#[test]
fn test_shell_tool_with_package_management() {
let npm_call = CallToolRequestParam {
let npm_call = CallToolRequestParams {
meta: None,
task: None,
name: "developer__shell".into(),
arguments: Some(object!({
Expand Down
16 changes: 8 additions & 8 deletions crates/goose-cli/src/session/output.rs
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ use goose::conversation::message::{
use goose::providers::canonical::maybe_get_canonical_model;
use goose::utils::safe_truncate;
use indicatif::{MultiProgress, ProgressBar, ProgressStyle};
use rmcp::model::{CallToolRequestParam, JsonObject, PromptArgument};
use rmcp::model::{CallToolRequestParams, JsonObject, PromptArgument};
use serde_json::Value;
use std::cell::RefCell;
use std::collections::HashMap;
Expand Down Expand Up @@ -424,7 +424,7 @@ pub fn render_builtin_error(names: &str, error: &str) {
println!();
}

fn render_text_editor_request(call: &CallToolRequestParam, debug: bool) {
fn render_text_editor_request(call: &CallToolRequestParams, debug: bool) {
print_tool_header(call);

// Print path first with special formatting
Expand Down Expand Up @@ -453,13 +453,13 @@ fn render_text_editor_request(call: &CallToolRequestParam, debug: bool) {
println!();
}

fn render_shell_request(call: &CallToolRequestParam, debug: bool) {
fn render_shell_request(call: &CallToolRequestParams, debug: bool) {
print_tool_header(call);
print_params(&call.arguments, 0, debug);
println!();
}

fn render_execute_code_request(call: &CallToolRequestParam, debug: bool) {
fn render_execute_code_request(call: &CallToolRequestParams, debug: bool) {
let tool_graph = call
.arguments
.as_ref()
Expand Down Expand Up @@ -514,7 +514,7 @@ fn render_execute_code_request(call: &CallToolRequestParam, debug: bool) {
println!();
}

fn render_subagent_request(call: &CallToolRequestParam, debug: bool) {
fn render_subagent_request(call: &CallToolRequestParams, debug: bool) {
print_tool_header(call);

if let Some(args) = &call.arguments {
Expand Down Expand Up @@ -555,7 +555,7 @@ fn render_subagent_request(call: &CallToolRequestParam, debug: bool) {
println!();
}

fn render_todo_request(call: &CallToolRequestParam, _debug: bool) {
fn render_todo_request(call: &CallToolRequestParams, _debug: bool) {
print_tool_header(call);

if let Some(args) = &call.arguments {
Expand All @@ -566,15 +566,15 @@ fn render_todo_request(call: &CallToolRequestParam, _debug: bool) {
println!();
}

fn render_default_request(call: &CallToolRequestParam, debug: bool) {
fn render_default_request(call: &CallToolRequestParams, debug: bool) {
print_tool_header(call);
print_params(&call.arguments, 0, debug);
println!();
}

// Helper functions

fn print_tool_header(call: &CallToolRequestParam) {
fn print_tool_header(call: &CallToolRequestParams) {
let parts: Vec<_> = call.name.rsplit("__").collect();
let tool_header = format!(
"─── {} | {} ──────────────────────────",
Expand Down
6 changes: 3 additions & 3 deletions crates/goose-mcp/src/computercontroller/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ use rmcp::{
handler::server::{router::tool::ToolRouter, wrapper::Parameters},
model::{
AnnotateAble, CallToolResult, Content, ErrorCode, ErrorData, Implementation,
ListResourcesResult, PaginatedRequestParam, RawResource, ReadResourceRequestParam,
ListResourcesResult, PaginatedRequestParams, RawResource, ReadResourceRequestParams,
ReadResourceResult, Resource, ResourceContents, ServerCapabilities, ServerInfo,
},
schemars::JsonSchema,
Expand Down Expand Up @@ -1313,7 +1313,7 @@ impl ServerHandler for ComputerControllerServer {

async fn list_resources(
&self,
_pagination: Option<PaginatedRequestParam>,
_pagination: Option<PaginatedRequestParams>,
_context: RequestContext<RoleServer>,
) -> Result<ListResourcesResult, ErrorData> {
let active_resources = self.active_resources.lock().unwrap();
Expand All @@ -1336,7 +1336,7 @@ impl ServerHandler for ComputerControllerServer {

async fn read_resource(
&self,
params: ReadResourceRequestParam,
params: ReadResourceRequestParams,
_context: RequestContext<RoleServer>,
) -> Result<ReadResourceResult, ErrorData> {
let active_resources = self.active_resources.lock().unwrap();
Expand Down
8 changes: 4 additions & 4 deletions crates/goose-mcp/src/developer/rmcp_developer.rs
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@ use rmcp::{
handler::server::{router::tool::ToolRouter, wrapper::Parameters},
model::{
CallToolResult, CancelledNotificationParam, Content, ErrorCode, ErrorData,
GetPromptRequestParam, GetPromptResult, Implementation, ListPromptsResult, LoggingLevel,
LoggingMessageNotificationParam, PaginatedRequestParam, Prompt, PromptArgument,
GetPromptRequestParams, GetPromptResult, Implementation, ListPromptsResult, LoggingLevel,
LoggingMessageNotificationParam, PaginatedRequestParams, Prompt, PromptArgument,
PromptMessage, PromptMessageRole, Role, ServerCapabilities, ServerInfo,
},
schemars::JsonSchema,
Expand Down Expand Up @@ -394,7 +394,7 @@ impl ServerHandler for DeveloperServer {
// implementation with the macro-based approach for better maintainability.
fn list_prompts(
&self,
_request: Option<PaginatedRequestParam>,
_request: Option<PaginatedRequestParams>,
_context: RequestContext<RoleServer>,
) -> impl Future<Output = Result<ListPromptsResult, ErrorData>> + Send + '_ {
let prompts: Vec<Prompt> = self.prompts.values().cloned().collect();
Expand All @@ -407,7 +407,7 @@ impl ServerHandler for DeveloperServer {

fn get_prompt(
&self,
request: GetPromptRequestParam,
request: GetPromptRequestParams,
_context: RequestContext<RoleServer>,
) -> impl Future<Output = Result<GetPromptResult, ErrorData>> + Send + '_ {
let prompt_name = request.name;
Expand Down
Loading
Loading