Signed-off-by: Jack Amadeo <jackamadeo@squareup.com> Co-authored-by: Jack Amadeo <jackamadeo@squareup.com>
This commit is contained in:
@@ -12,7 +12,7 @@ use tokio_util::sync::CancellationToken;
|
||||
|
||||
use goose::agents::extension::{Envs, ExtensionConfig};
|
||||
use goose::agents::extension_manager::{ExtensionManager, ExtensionManagerCapabilities};
|
||||
use goose::agents::GoosePlatform;
|
||||
use goose::agents::{GoosePlatform, MCP_PROTOCOL_VERSION};
|
||||
use goose_providers::model::ModelConfig;
|
||||
|
||||
use test_case::test_case;
|
||||
@@ -167,18 +167,23 @@ async fn test_replayed_session(
|
||||
tool_calls: Vec<CallToolRequestParams>,
|
||||
required_envs: Vec<&str>,
|
||||
) {
|
||||
// The working directory is sent to the server verbatim in our `roots/list`
|
||||
// response, so it is part of the recorded protocol traffic. It must be an
|
||||
// absolute path (relative paths are not convertible to a `file://` URL) and
|
||||
// it must be stable across machines, otherwise playback compares a recorded
|
||||
// path against whatever cwd the test happens to run in.
|
||||
const TEST_WORKING_DIR: &str = "/tmp/goose_test";
|
||||
fs::create_dir_all(TEST_WORKING_DIR).ok();
|
||||
|
||||
let _env = env_lock::lock_env([
|
||||
("GOOSE_MCP_CLIENT_VERSION", Some("0.0.0")),
|
||||
("GOOSE_PROVIDER", Some("openai")),
|
||||
("GOOSE_MODEL", Some("gpt-4o")),
|
||||
("GOOSE_WORKING_DIR", Some("/tmp/goose_test")),
|
||||
("GOOSE_WORKING_DIR", Some(TEST_WORKING_DIR)),
|
||||
]);
|
||||
|
||||
// Setup test file for developer extension tests
|
||||
let test_file_path = "/tmp/goose_test/goose.txt";
|
||||
if let Some(parent) = std::path::Path::new(test_file_path).parent() {
|
||||
fs::create_dir_all(parent).ok();
|
||||
}
|
||||
fs::write(test_file_path, "# goose\n").ok();
|
||||
let replay_file_name = command
|
||||
.iter()
|
||||
@@ -257,6 +262,8 @@ async fn test_replayed_session(
|
||||
ExtensionManagerCapabilities {
|
||||
mcpui: true,
|
||||
host_info: None,
|
||||
elicitation_handler: None,
|
||||
protocol_version: Some(MCP_PROTOCOL_VERSION),
|
||||
},
|
||||
true,
|
||||
));
|
||||
|
||||
File diff suppressed because one or more lines are too long
+4
-4
@@ -1,6 +1,6 @@
|
||||
STDIN: {"jsonrpc":"2.0","id":0,"method":"initialize","params":{"protocolVersion":"2025-11-25","capabilities":{"extensions":{"io.modelcontextprotocol/ui":{"mimeTypes":["text/html;profile=mcp-app"]}},"roots":{},"sampling":{},"elicitation":{}},"clientInfo":{"name":"goose-desktop","version":"0.0.0"}}}
|
||||
STDERR: warning: The `native-tls` setting is deprecated and will be removed in a future release. Use `system-certs` instead.
|
||||
STDERR: /Users/jackamadeo/.cache/uv/archive-v0/qVA6xesA-RY1n0SG/lib/python3.14/site-packages/fastmcp/server/auth/providers/jwt.py:10: AuthlibDeprecationWarning: authlib.jose module is deprecated, please use joserfc instead.
|
||||
STDERR: /Users/jackamadeo/.cache/uv/archive-v0/al1Eg6tdenSv08iE/lib/python3.14/site-packages/fastmcp/server/auth/providers/jwt.py:10: AuthlibDeprecationWarning: authlib.jose module is deprecated, please use joserfc instead.
|
||||
STDERR: It will be compatible before version 2.0.0.
|
||||
STDERR: from authlib.jose import JsonWebKey, JsonWebToken
|
||||
STDERR:
|
||||
@@ -25,14 +25,14 @@ STDERR: │ ✨ FastMCP 3.0 is coming!
|
||||
STDERR: │ Pin `fastmcp < 3` in production, then upgrade when you're ready. │
|
||||
STDERR: ╰──────────────────────────────────────────────────────────────────────────────╯
|
||||
STDERR: ╭──────────────────────────────────────────────────────────────────────────────╮
|
||||
STDERR: │ 🎉 Update available: 3.4.5 │
|
||||
STDERR: │ 🎉 Update available: 3.4.7 │
|
||||
STDERR: │ Run: pip install --upgrade fastmcp │
|
||||
STDERR: ╰──────────────────────────────────────────────────────────────────────────────╯
|
||||
STDERR:
|
||||
STDERR:
|
||||
STDERR: [07/29/26 10:52:55] INFO Starting MCP server 'mymcp' with server.py:2506
|
||||
STDERR: [08/11/26 11:30:18] INFO Starting MCP server 'mymcp' with server.py:2506
|
||||
STDERR: transport 'stdio'
|
||||
STDERR: /Users/jackamadeo/.cache/uv/archive-v0/qVA6xesA-RY1n0SG/lib/python3.14/site-packages/redis/asyncio/connection.py:1628: DeprecationWarning: FakeConnection is deprecated. Use FakeAsyncRedisConnection instead
|
||||
STDERR: /Users/jackamadeo/.cache/uv/archive-v0/al1Eg6tdenSv08iE/lib/python3.14/site-packages/redis/asyncio/connection.py:2861: DeprecationWarning: FakeConnection is deprecated. Use FakeAsyncRedisConnection instead
|
||||
STDERR: return self.connection_class(**self.connection_kwargs)
|
||||
STDOUT: {"jsonrpc":"2.0","id":0,"result":{"protocolVersion":"2025-11-25","capabilities":{"experimental":{},"prompts":{"listChanged":false},"resources":{"subscribe":false,"listChanged":false},"tools":{"listChanged":true},"tasks":{"list":{},"cancel":{},"requests":{"tools":{"call":{}},"prompts":{"get":{}},"resources":{"read":{}}}}},"serverInfo":{"name":"mymcp","version":"2.14.4"}}}
|
||||
STDIN: {"jsonrpc":"2.0","method":"notifications/initialized"}
|
||||
|
||||
Reference in New Issue
Block a user