Rewrite the developer mcp using the rmcp sdk (#4297)

This commit is contained in:
Angela Ning
2025-09-02 11:24:43 -04:00
committed by GitHub
parent e73b6037a2
commit 6807b6d0a3
11 changed files with 3538 additions and 3647 deletions
@@ -49,6 +49,40 @@ enum TestMode {
],
vec![]
)]
#[test_case(
vec!["cargo", "run", "-p", "goose-server", "--bin", "goosed", "--", "mcp", "developer"],
vec![
ToolCall::new("text_editor", json!({
"command": "view",
"path": "~/goose/crates/goose/tests/tmp/goose.txt"
})),
ToolCall::new("text_editor", json!({
"command": "str_replace",
"path": "~/goose/crates/goose/tests/tmp/goose.txt",
"old_str": "# codename goose",
"new_str": "# codename goose (modified by test)"
})),
// Test shell command to verify file was modified
ToolCall::new("shell", json!({
"command": "cat ~/goose/crates/goose/tests/tmp/goose.txt"
})),
// Test text_editor tool to restore original content
ToolCall::new("text_editor", json!({
"command": "str_replace",
"path": "~/goose/crates/goose/tests/tmp/goose.txt",
"old_str": "# codename goose (modified by test)",
"new_str": "# codename goose"
})),
ToolCall::new("list_windows", json!({})),
ToolCall::new("screen_capture", json!({
"display": 0
})),
ToolCall::new("image_processor", json!({
"path": "~/goose/crates/goose/tests/tmp/goose-test.png"
})),
],
vec![]
)]
#[tokio::test]
async fn test_replayed_session(
command: Vec<&str>,
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long