# THIS FILE IS AUTOMATICALLY GENERATED BY CARGO
#
# When uploading crates to the registry Cargo will automatically
# "normalize" Cargo.toml files for maximal compatibility
# with all versions of Cargo and also rewrite `path` dependencies
# to registry (e.g., crates.io) dependencies.
#
# If you are reading this file be aware that the original Cargo.toml
# will likely look very different (and much more reasonable).
# See Cargo.toml.orig for the original contents.

[package]
edition = "2024"
rust-version = "1.91"
name = "brainwires-a2a"
version = "0.8.0"
authors = ["Brainwires"]
build = "build.rs"
autolib = false
autobins = false
autoexamples = false
autotests = false
autobenches = false
description = "Agent-to-Agent (A2A) protocol — JSON-RPC, REST, and gRPC bindings"
homepage = "https://github.com/Brainwires/brainwires-framework"
documentation = "https://docs.rs/brainwires-a2a"
readme = "README.md"
keywords = [
    "a2a",
    "agent-to-agent",
    "json-rpc",
    "grpc",
    "interop",
]
categories = ["network-programming"]
license = "MIT OR Apache-2.0"
repository = "https://github.com/Brainwires/brainwires-framework"
resolver = "2"

[features]
client = ["dep:reqwest"]
default = ["native"]
full = [
    "native",
    "grpc-client",
    "grpc-server",
]
grpc = [
    "dep:tonic",
    "dep:prost",
    "dep:prost-types",
    "dep:tonic-build",
]
grpc-client = [
    "grpc",
    "client",
]
grpc-server = [
    "grpc",
    "server",
]
native = [
    "client",
    "server",
]
server = [
    "dep:hyper",
    "dep:hyper-util",
    "dep:http",
    "dep:http-body",
    "dep:http-body-util",
]

[lib]
name = "brainwires_a2a"
path = "src/lib.rs"

[[example]]
name = "a2a_client_server"
path = "examples/a2a_client_server.rs"
required-features = ["full"]

[[example]]
name = "a2a_streaming"
path = "examples/a2a_streaming.rs"
required-features = [
    "client",
    "server",
]

[[example]]
name = "agent_card"
path = "examples/agent_card.rs"

[[test]]
name = "client_server"
path = "tests/client_server.rs"

[[test]]
name = "http_integration"
path = "tests/http_integration.rs"

[[test]]
name = "serde_roundtrip"
path = "tests/serde_roundtrip.rs"

[[test]]
name = "server_features"
path = "tests/server_features.rs"

[[test]]
name = "sse_parser"
path = "tests/sse_parser.rs"

[dependencies.anyhow]
version = "1"

[dependencies.async-stream]
version = "0.3"

[dependencies.async-trait]
version = "0.1"

[dependencies.bytes]
version = "1"

[dependencies.chrono]
version = "0.4"
features = ["serde"]

[dependencies.futures]
version = "0.3"

[dependencies.http]
version = "1.1"
optional = true

[dependencies.http-body]
version = "1"
optional = true

[dependencies.http-body-util]
version = "0.1"
optional = true

[dependencies.hyper]
version = "1"
features = [
    "server",
    "client",
    "http1",
    "http2",
]
optional = true

[dependencies.hyper-util]
version = "0.1"
features = [
    "tokio",
    "server-auto",
    "client-legacy",
]
optional = true

[dependencies.prost]
version = "0.13"
optional = true

[dependencies.prost-types]
version = "0.13"
optional = true

[dependencies.reqwest]
version = "0.12"
features = [
    "json",
    "stream",
]
optional = true

[dependencies.serde]
version = "1"
features = ["derive"]

[dependencies.serde_json]
version = "1"

[dependencies.thiserror]
version = "2"

[dependencies.tokio]
version = "1.43"
features = [
    "full",
    "sync",
    "time",
    "macros",
]

[dependencies.tokio-stream]
version = "0.1"

[dependencies.tonic]
version = "0.13"
optional = true

[dependencies.tracing]
version = "0.1"

[dependencies.url]
version = "2.5"

[dependencies.uuid]
version = "1"
features = [
    "v4",
    "serde",
]

[dev-dependencies.serde_json]
version = "1"

[dev-dependencies.tempfile]
version = "3"

[dev-dependencies.tokio]
version = "1.43"
features = [
    "full",
    "full",
    "test-util",
]

[build-dependencies.tonic-build]
version = "0.13"
optional = true
