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
6 changes: 5 additions & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
[workspace]
members = ["mixtape-core", "mixtape-anthropic-sdk", "mixtape-tools", "mixtape-cli", "mixtape-server"]
members = ["mixtape-core", "mixtape-anthropic-sdk", "mixtape-tools", "mixtape-cli", "mixtape-server", "mixtape-acp"]
resolver = "2"

[workspace.package]
Expand All @@ -16,6 +16,7 @@ mixtape-anthropic-sdk = { version = "0.3.1", path = "./mixtape-anthropic-sdk" }
mixtape-tools = { path = "./mixtape-tools" }
mixtape-cli = { path = "./mixtape-cli" }
mixtape-server = { path = "./mixtape-server" }
mixtape-acp = { path = "./mixtape-acp" }

# Async runtime
tokio = { version = "1.41", features = ["full"] }
Expand All @@ -24,6 +25,8 @@ tokio-stream = "0.1"
async-trait = "0.1"
async-stream = "0.3"
futures = "0.3"
agent-client-protocol = "0.9"
tokio-util = { version = "0.7", features = ["compat"] }

# HTTP Server
axum = { version = "0.7", features = ["macros"] }
Expand Down Expand Up @@ -73,6 +76,7 @@ regex = "1.10"
url = "2.5"
http = "1.1"
shellexpand = "3.1"
log = "0.4"

# MCP
rmcp = { version = "0.11", features = ["client", "transport-child-process", "transport-streamable-http-client-reqwest"] }
Expand Down
38 changes: 38 additions & 0 deletions mixtape-acp/Cargo.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
[package]
name = "mixtape-acp"
version.workspace = true
edition.workspace = true
license.workspace = true
repository.workspace = true
homepage.workspace = true
description = "ACP (Agent Client Protocol) adapter for the mixtape agent framework"
documentation = "https://docs.rs/mixtape-acp"
readme = "../README.md"
keywords = ["ai", "agents", "acp", "editor", "coding"]
categories = ["development-tools", "api-bindings", "asynchronous"]
exclude = [".cargo-husky/", ".claude/", ".github/", ".idea/"]

[dependencies]
mixtape-core.workspace = true
agent-client-protocol.workspace = true
tokio.workspace = true
tokio-util.workspace = true
futures.workspace = true
serde.workspace = true
serde_json.workspace = true
thiserror.workspace = true
uuid.workspace = true
parking_lot.workspace = true
async-trait.workspace = true
log.workspace = true

[dev-dependencies]
mixtape-core = { workspace = true, features = ["test-utils", "bedrock"] }
tokio-test.workspace = true
cargo-husky.workspace = true

[[example]]
name = "echo_agent"

[[example]]
name = "echo_agent_bedrock"
25 changes: 25 additions & 0 deletions mixtape-acp/examples/echo_agent.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
// ACP echo agent using MockProvider — no credentials required.
//
// This example starts an ACP server over stdio that responds to every prompt
// with a fixed text reply. Useful for verifying that the ACP protocol wiring
// works end-to-end without needing real LLM credentials.
//
// Run with:
// cargo run -p mixtape-acp --example echo_agent

use mixtape_acp::{serve_stdio, MixtapeAcpBuilder};
use mixtape_core::test_utils::MockProvider;
use mixtape_core::Agent;

#[tokio::main]
async fn main() -> Result<(), Box<dyn std::error::Error>> {
let server = MixtapeAcpBuilder::new("echo-agent", env!("CARGO_PKG_VERSION"))
.with_agent_factory(|| async {
let provider = MockProvider::new().with_text("Hello from the echo agent!");
Agent::builder().provider(provider).build().await
})
.build()?;

serve_stdio(server).await?;
Ok(())
}
27 changes: 27 additions & 0 deletions mixtape-acp/examples/echo_agent_bedrock.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
// ACP agent backed by Claude Haiku 4.5 on Bedrock.
//
// This example starts an ACP server over stdio that creates a real
// mixtape Agent for each session, using Claude Haiku 4.5 via AWS Bedrock.
// Requires valid AWS credentials in the environment.
//
// Run with:
// cargo run -p mixtape-acp --example echo_agent_bedrock

use mixtape_acp::{serve_stdio, MixtapeAcpBuilder};
use mixtape_core::{Agent, ClaudeHaiku4_5};

#[tokio::main]
async fn main() -> Result<(), Box<dyn std::error::Error>> {
let server = MixtapeAcpBuilder::new("bedrock-agent", env!("CARGO_PKG_VERSION"))
.with_agent_factory(|| async {
Agent::builder()
.bedrock(ClaudeHaiku4_5)
.with_system_prompt("You are a helpful coding assistant.")
.build()
.await
})
.build()?;

serve_stdio(server).await?;
Ok(())
}
Loading