Open source Grok Bot alternative, Bring your own agent and subscription: message Claude Code, Codex, Gemini CLI, Cursor, Copilot and 40+ AI agents as bots on your own computer, from iPhone, Mac, Windows, Linux or terminal. Agent-agnostic and free. Also a Muse and Dots alternative. Built in Rust.
Rust acpagent-client-protocolai-agentsai-assistantclaudeclaude-codecodexcoding-agentscursorgeminigemini-cligrok-bot-alternativeiosiphonelinuxmacosmcpopen-sourcerustself-hosted
fix(host): accept pinned OCI connector images
leepokaia4d5707ff15c
diff --git a/docs/features/marketplace.md b/docs/features/marketplace.mdindex 61e89489..b243fdea 100644--- a/docs/features/marketplace.md+++ b/docs/features/marketplace.md@@ -11,6 +11,8 @@ The Plugins screen configures capabilities installed on the selected computer. AThe Connectors shelf opens with a short featured list, then pages through the whole MCP Registry (`marketConnectors {search, cursor}` → `{items, nextCursor}`, 60 metadata records per API page; the UI initially shows 12 and reveals another 12 only when *Load more connectors* is pressed). Apps through Composio use the same 12-at-a-time display with *Load more apps*. Searching resets the visible batch; late responses from an older search are ignored. Scrolling never triggers another catalog fetch. Listed: stdio npm/PyPI/OCI/NuGet packages (the registry's runtime and package arguments become inputs) and streamable-HTTP or SSE remotes (URL `{variables}` become inputs). Not listed: MCPB bundles and packages that serve HTTP locally; add those as a custom connector.+Registry package installs use pinned package references: npm, PyPI and NuGet require the package’s own version; OCI uses the tag or SHA-256 digest already in its image identifier, even when the separate package version is omitted. Untagged images, `latest` tags without a digest, and invalid references are rejected; a server-level version does not pin the executable package.+A custom connector is a command line (split like a shell), a URL, or a pasted MCP config (`importConnectors {config}`: the `mcpServers` / `servers` JSON from READMEs, Claude, Cursor or VS Code, or one server's entry); every server in a config is added.A connector installed on the computer (or an app connected through Composio) is turned on for every existing bot, and a new bot starts with all of them on; each bot can turn one off in its settings. An enabled connector is passed to the agent as an MCP server when its session starts or resumes. Local connectors are spawned by the agent; remote ones always go through the host's stdio proxy (`codync-host mcp remote`, `host/src/mcp.rs`), so they work with agents that only speak stdio and always carry a fresh token. The proxy speaks streamable HTTP and falls back to the older HTTP+SSE transport when the first POST fails with 400/404/405, as the MCP spec suggests.diff --git a/host/src/market/install.rs b/host/src/market/install.rsindex f53625f5..162a3b44 100644--- a/host/src/market/install.rs+++ b/host/src/market/install.rs@@ -116,6 +116,35 @@ fn fill(template: Option<&str>, value: &str) -> String {}}+/// The exact package reference passed to the runtime. OCI embeds its version in+/// the identifier; server metadata cannot pin an otherwise floating image.+fn package_reference(p: &Value) -> Result<String> {+ let id = p["identifier"].as_str().ok_or_else(|| anyhow!("package has no identifier"))?;+ let unpinned = || anyhow!("{id} has no pinned version in the MCP Registry, so it can't be installed safely");+ let pinned = |v: &str| !v.is_empty() && v != "latest" && !v.contains(['^', '~', '*', ' ']);+ if p["registryType"] == "oci" {+ let valid = if let Some((_, digest)) = id.split_once('@') {+ digest+ .strip_prefix("sha256:")+ .is_some_and(|hash| hash.len() == 64 && hash.bytes().all(|b| b.is_ascii_hexdigit()))+ } else {+ // A registry port is not an image tag.+ id.rsplit('/').next().and_then(|name| name.rsplit_once(':')).is_some_and(|(_, tag)| {+ pinned(tag)+ && tag.len() <= 128+ && tag.starts_with(|c: char| c.is_ascii_alphanumeric() || c == '_')+ && tag.bytes().all(|b| b.is_ascii_alphanumeric() || b"_.-".contains(&b))+ })+ };+ if !valid {+ return Err(unpinned());+ }+ return Ok(id.to_owned());+ }+ let version = p["version"].as_str().filter(|v| pinned(v)).ok_or_else(unpinned)?;+ Ok(if p["registryType"] == "pypi" { format!("{id}=={version}") } else { format!("{id}@{version}") })+}+/// Installs a registry server with the user's inputs (`{NAME: value}`).pub async fn install_connector(store: &crate::store::Store, name: &str, option: &str, inputs: &Value) -> Result<Value> {let server = registry_server(name).await?;@@ -143,14 +172,7 @@ pub async fn install_connector(store: &crate::store::Store, name: &str, option:match kind {"package" => {let p = server["packages"].get(index).ok_or_else(|| anyhow!("unknown package"))?;- let id = p["identifier"].as_str().ok_or_else(|| anyhow!("package has no identifier"))?;- // A package runs as the user: install exactly the version the registry lists, never "latest".- let version = p["version"]- .as_str()- .filter(|v| !v.is_empty() && *v != "latest" && !v.contains(['^', '~', '*', ' ']))- .ok_or_else(|| {- anyhow!("{id} has no pinned version in the MCP Registry, so it can't be installed safely")- })?;+ let reference = package_reference(p)?;for e in p["environmentVariables"].as_array().into_iter().flatten() {let Some(k) = e["name"].as_str() else { continue };match input(k).or_else(|| e["default"].as_str().map(str::to_owned)) {@@ -182,11 +204,7 @@ pub async fn install_connector(store: &crate::store::Store, name: &str, option:args.push(a);}}- args.push(match p["registryType"].as_str() {- Some("pypi") => format!("{id}=={version}"),- Some("oci") => id.to_owned(),- _ => format!("{id}@{version}"),- });+ args.push(reference);if p["registryType"] == "nuget" {args.push("--yes".into());}@@ -347,6 +365,57 @@ pub fn remove_connector(store: &crate::store::Store, id: &str) -> Result<()> {mod tests {use super::*;+ #[test]+ fn oci_references_do_not_need_a_separate_package_version() {+ for id in [+ "ghcr.io/github/github-mcp-server:2.0.2".to_owned(),+ "localhost:5000/team/server:2.0.2".to_owned(),+ "server:v2.0.2-rc.1".to_owned(),+ format!("ghcr.io/team/server@sha256:{}", "a".repeat(64)),+ format!("ghcr.io/team/server:latest@sha256:{}", "b".repeat(64)),+ ] {+ let mut package = json!({"registryType": "oci", "identifier": id});+ assert_eq!(package_reference(&package).unwrap(), id);+ // Older registry entries also supply a separate package version.+ package["version"] = json!("0.20.0");+ assert_eq!(package_reference(&package).unwrap(), id);+ }+ }++ #[test]+ fn package_metadata_cannot_pin_a_floating_or_invalid_oci_reference() {+ for id in [+ "ghcr.io/github/github-mcp-server",+ "localhost:5000/team/server",+ "server:latest",+ "server:",+ "server:^2.0.2",+ "server:2.*",+ "server:2.0.2 invalid",+ "server:2.0.2\n",+ "server@sha256:",+ "server@sha256:not-a-digest",+ "server:2.0.2@sha256:invalid",+ ] {+ for version in [Value::Null, json!("2.0.2")] {+ let package = json!({"registryType": "oci", "identifier": id, "version": version});+ assert!(package_reference(&package).is_err(), "accepted {package}");+ }+ }+ }++ #[test]+ fn other_registries_still_require_their_own_package_version() {+ for (kind, expected) in [("npm", "[email protected]"), ("pypi", "server==2.0.2"), ("nuget", "[email protected]")] {+ let mut package = json!({"registryType": kind, "identifier": "server", "version": "2.0.2"});+ assert_eq!(package_reference(&package).unwrap(), expected);+ for version in [Value::Null, json!(""), json!("latest"), json!("^2.0.2"), json!("~2.0.2"), json!("*")] {+ package["version"] = version;+ assert!(package_reference(&package).is_err(), "accepted {package}");+ }+ }+ }+#[test]fn registry_arguments_become_words() {let list = json!([