Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
17 commits
Select commit Hold shift + click to select a range
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
18 changes: 9 additions & 9 deletions Cargo.lock

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

16 changes: 8 additions & 8 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ members = [
# Shared across every crate in the workspace so a release moves one number.
# `sync-version` tooling (see the Makefile) reads these.
[workspace.package]
version = "1.3.1"
version = "1.3.2"
edition = "2021"
rust-version = "1.94"
license = "MIT OR Apache-2.0"
Expand Down Expand Up @@ -59,13 +59,13 @@ directories = "6"
base64 = "0.23"

# Internal
ed-agent = { version = "1.3.1", path = "crates/ed-agent" }
ed-mcp = { version = "1.3.1", path = "crates/ed-mcp" }
ed-acp = { version = "1.3.1", path = "crates/ed-acp" }
ed-acp-tauri = { version = "1.3.1", path = "crates/ed-acp-tauri" }
ed-acp-tui = { version = "1.3.1", path = "crates/ed-acp-tui" }
ed-acp-testkit = { version = "1.3.1", path = "crates/ed-acp-testkit" }
ed-onde-account = { version = "1.3.1", path = "crates/ed-onde-account" }
ed-agent = { version = "1.3.2", path = "crates/ed-agent" }
ed-mcp = { version = "1.3.2", path = "crates/ed-mcp" }
ed-acp = { version = "1.3.2", path = "crates/ed-acp" }
ed-acp-tauri = { version = "1.3.2", path = "crates/ed-acp-tauri" }
ed-acp-tui = { version = "1.3.2", path = "crates/ed-acp-tui" }
ed-acp-testkit = { version = "1.3.2", path = "crates/ed-acp-testkit" }
ed-onde-account = { version = "1.3.2", path = "crates/ed-onde-account" }

# gemm-common (via candle, via onde) depends on sysctl for every
# `target_vendor = "apple"`, but sysctl 0.6.0 only has a `sys` module behind
Expand Down
8 changes: 4 additions & 4 deletions crates/ed-mcp/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -24,10 +24,10 @@ serde_json.workspace = true
anyhow.workspace = true
tracing.workspace = true

# Spawning an MCP server as a child process needs `exec`, which Apple hides on tvOS (`libc`
# has no `execv` there, so `nix` under `process-wrap` doesn't compile). The stdio transport
# is everywhere else.
[target.'cfg(not(target_os = "tvos"))'.dependencies]
# Spawning an MCP server as a child process needs `exec`, which Apple hides on tvOS and
# watchOS (`libc` has no `execv` there, so `nix` under `process-wrap` doesn't compile). The
# stdio transport is everywhere else.
[target.'cfg(not(any(target_os = "tvos", target_os = "watchos")))'.dependencies]
rmcp = { workspace = true, features = ["transport-child-process"] }

[features]
Expand Down
20 changes: 10 additions & 10 deletions crates/ed-mcp/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ use rmcp::model::{
};
use rmcp::service::{NotificationContext, PeerRequestOptions, RequestContext, RunningService};
use rmcp::transport::StreamableHttpClientTransport;
#[cfg(not(target_os = "tvos"))]
#[cfg(not(any(target_os = "tvos", target_os = "watchos")))]
use rmcp::transport::TokioChildProcess;
use rmcp::transport::streamable_http_client::StreamableHttpClientTransportConfig;
use rmcp::{ClientHandler, ErrorData as McpError, RoleClient, ServiceExt};
Expand Down Expand Up @@ -144,12 +144,12 @@ pub enum Transport {
/// Start `command args…` with extra environment variables and talk over its stdio.
///
/// Stdio is only available on platforms that can spawn a child process.
/// On `target_os = "tvos"` the OS does not allow apps to create other
/// processes, so this variant is **not** supported on tvOS builds: the
/// matching arm in [`Connection::connect_with`] returns an error at
/// runtime instead of compiling out the variant. Use [`Transport::Http`]
/// for tvOS; if you only know the transport at runtime, branch on the
/// current `target_os` before constructing a `Stdio` spec.
/// On `target_os = "tvos"` and `target_os = "watchos"` the OS does not allow
/// apps to create other processes, so this variant is **not** supported on
/// tvOS or watchOS builds: the matching arm in [`Connection::connect_with`]
/// returns an error at runtime instead of compiling out the variant. Use
/// [`Transport::Http`] there; if you only know the transport at runtime,
/// branch on the current `target_os` before constructing a `Stdio` spec.
Stdio {
command: PathBuf,
args: Vec<String>,
Expand Down Expand Up @@ -360,16 +360,16 @@ impl Connection {
elicitation,
};
let handshake = match &spec.transport {
#[cfg(not(target_os = "tvos"))]
#[cfg(not(any(target_os = "tvos", target_os = "watchos")))]
Transport::Stdio { command, args, env } => {
let mut cmd = tokio::process::Command::new(command);
cmd.args(args).envs(env.iter().map(|(k, v)| (k, v)));
let transport = TokioChildProcess::new(cmd)
.with_context(|| format!("starting {}", command.display()))?;
tokio::time::timeout(timeout, handler.serve(transport)).await
}
// tvOS can't start a process, so there is no stdio transport to offer.
#[cfg(target_os = "tvos")]
// tvOS and watchOS can't start a process, so there is no stdio transport to offer.
#[cfg(any(target_os = "tvos", target_os = "watchos"))]
Transport::Stdio { command, .. } => {
Comment thread
setoelkahfi marked this conversation as resolved.
bail!(
"can't start {}: this platform can't run MCP servers as processes",
Expand Down
Loading