openpencil/vendor/anthropic-agent-sdk/Cargo.toml

98 lines
2.8 KiB
TOML

# Vendored from https://github.com/bartolli/anthropic-agent-sdk @ main
# (2026-05-14). Trimmed for OP's needs:
# - Removed inner [workspace] block + demo workspace members so OP's
# root Cargo workspace owns the build.
# - Removed [[example]] entries (examples/ + demos/ dirs were stripped
# since they aren't part of what OP needs from the SDK).
# - Kept the rest of the dep set intact so OP's openpencil-desktop can
# consume `anthropic_agent_sdk::transport::SubprocessTransport`
# verbatim as the Claude Code IPC bridge.
#
# Modifications relative to upstream are tracked in this commit's diff;
# upstream updates flow in via re-vendoring rather than git submodule so
# any OP-specific patches stay local to this directory.
[package]
name = "anthropic-agent-sdk"
version = "0.2.75"
edition = "2024"
authors = ["Angel Bartolli <bartolli@gmail.com>"]
description = "Rust SDK for Claude Code CLI - streaming queries, hooks, permissions, and MCP integration"
license = "MIT"
repository = "https://github.com/bartolli/anthropic-agent-sdk"
keywords = ["claude", "ai", "sdk", "anthropic", "agent"]
categories = ["api-bindings", "asynchronous"]
rust-version = "1.85.0"
[profile.release]
opt-level = 3
lto = true
codegen-units = 1
strip = true
[dependencies]
# Async runtime
tokio = { version = "1.48.0", features = ["full"] }
tokio-util = { version = "0.7.17", features = ["codec", "rt"] }
# Serialization
serde = { version = "1.0", features = ["derive"] }
serde_json = "1.0"
# Official Anthropic MCP SDK (optional - for SDK MCP servers)
rmcp = { version = "0.12.0", optional = true, features = [
"server",
"client",
"transport-io",
"transport-child-process",
"transport-streamable-http-server",
"transport-worker",
"macros",
] }
# Error handling
thiserror = "2.0.17"
# Builder pattern
# Upstream used 0.23.2 but that release relies on stable let-chains
# (Rust 1.88+). OP pins rustc 1.85 for skia-safe-op compatibility, so
# we hold the version at 0.21 which is the last release without
# let-chains. SDK source compiles cleanly against the 0.21 API.
typed-builder = "=0.21.0"
# Async streams
futures = "0.3"
async-stream = "0.3"
async-trait = "0.1"
# Process utilities
which = "8.0.0"
# Directory utilities (for config paths)
dirs = "6.0.0"
# Tracing (always available - zero cost when no subscriber attached)
tracing = "0.1.44"
# Optional dependencies
schemars = { version = "1.1.0", optional = true }
sha2 = "0.10.9"
base64 = "0.22.1"
reqwest = { version = "0.12.28", default-features = false, features = [
"rustls-tls",
"json",
"stream",
] }
[dev-dependencies]
anyhow = "1.0"
tokio-test = "0.4"
tempfile = "3.0"
tracing = "0.1.43"
tracing-subscriber = { version = "0.3.22", features = ["env-filter"] }
chrono = "0.4"
[features]
default = []
rmcp = ["dep:rmcp", "dep:schemars"]