[package]
name = "meerkat-comms"
description = "Inter-agent communication for Meerkat"
version.workspace = true
edition.workspace = true
rust-version.workspace = true
license.workspace = true
authors.workspace = true
repository.workspace = true
homepage.workspace = true
documentation.workspace = true
keywords.workspace = true
categories.workspace = true

[dependencies]
# Internal crates
meerkat-core = { workspace = true }
meerkat-contracts = { workspace = true }
meerkat-skills = { workspace = true }
inventory = { workspace = true }

# Serialization
serde = { workspace = true, features = ["derive"] }
serde_json = { workspace = true }
serde_bytes = "0.11"
ciborium = "0.2"
schemars = { workspace = true }

# Encryption/Identity
ed25519-dalek = { version = "2.0", features = ["rand_core"] }
zeroize = "1"

# Async runtime
futures = { workspace = true }
async-trait = { workspace = true }

# Error handling
thiserror = { workspace = true }

# Utilities
uuid = { workspace = true, features = ["v4"] }
base64 = "0.22"
rand = "0.8"
parking_lot = "0.12"
tracing = { workspace = true }

[target.'cfg(not(target_arch = "wasm32"))'.dependencies]
tokio = { workspace = true, features = ["fs", "net", "sync", "rt", "io-util", "macros", "time"] }
tokio-util = { version = "0.7", features = ["codec"] }
toml = { workspace = true }
bytes = "1"

[target.'cfg(target_arch = "wasm32")'.dependencies]
tokio_with_wasm = { workspace = true }
getrandom = { version = "0.3", features = ["wasm_js"] }
getrandom02 = { package = "getrandom", version = "0.2", features = ["js"] }

[dev-dependencies]
tokio = { workspace = true, features = ["fs", "rt-multi-thread", "macros", "time", "test-util"] }
tempfile = { workspace = true }
ciborium = "0.2"

[features]
default = []
integration-real-tests = []

[[test]]
name = "router_integration"
path = "tests/router_integration.rs"
required-features = ["integration-real-tests"]

[[test]]
name = "e2e"
path = "tests/e2e.rs"
required-features = ["integration-real-tests"]

[package.metadata.cargo-machete]
ignored = ["getrandom", "toml"]  # cfg(target_arch = "wasm32") / feature-gated

[lints]
workspace = true
