[package]
name = "brainwires-agents"
description = "Agent orchestration, coordination, and lifecycle management for the Brainwires Agent Framework"
version.workspace = true
edition.workspace = true
license.workspace = true
rust-version.workspace = true
repository.workspace = true
homepage.workspace = true
authors.workspace = true
readme = "README.md"
documentation = "https://docs.rs/brainwires-agents"
keywords = ["ai-agents", "multi-agent", "task-orchestration", "llm", "autonomous"]
categories = ["development-tools"]

[dependencies]
# Internal crates
brainwires-core.workspace = true
brainwires-tool-system.workspace = true

# Async runtime
tokio = { workspace = true, features = ["sync", "time", "rt", "macros"] }

# Serialization
serde = { workspace = true }
serde_json = { workspace = true }

# Error handling
anyhow.workspace = true

# Identifiers & time
uuid.workspace = true
chrono.workspace = true

# Hashing (for prompt hash snapshotting)
sha2.workspace = true
hex.workspace = true

# Git (for worktree management, native only)
git2 = { workspace = true, optional = true }

# Graph algorithms (for state model dependency analysis)
petgraph = "0.7"

# Process liveness checking (Unix, native only)
libc = { version = "0.2", optional = true }

# Async traits
async-trait.workspace = true

# Code search (optional, for reasoning module)
regex = { workspace = true, optional = true }

# Eval framework (optional)
thiserror = { workspace = true, optional = true }
futures = { workspace = true, optional = true }

# ── SEAL deps ──────────────────────────────────────────────────────────
brainwires-cognition = { workspace = true, optional = true }
brainwires-mdap = { workspace = true, optional = true }
brainwires-permissions = { workspace = true, optional = true }

# OpenTelemetry (optional, for otel feature)
opentelemetry = { version = "0.28", optional = true }

# Logging
tracing.workspace = true

[dev-dependencies]
tokio = { workspace = true, features = ["full", "test-util"] }
futures.workspace = true
tempfile.workspace = true
tracing-subscriber = "0.3"
brainwires-cognition = { workspace = true, features = ["knowledge", "prompting"] }
brainwires-permissions = { workspace = true }

[features]
default = ["native"]
native = ["dep:git2", "dep:libc", "brainwires-core/native", "brainwires-tool-system/native"]
wasm = ["brainwires-core/wasm", "brainwires-tool-system/wasm"]
# Reasoning module (merged from brainwires-reasoning)
reasoning = ["dep:regex"]
# Evaluation framework (merged from brainwires-eval)
eval = ["dep:thiserror", "dep:futures"]
# OpenTelemetry span export for agent execution traces
otel = ["dep:opentelemetry"]
# SEAL (Self-Evolving Agentic Learning)
seal = ["dep:regex"]
seal-mdap = ["seal", "dep:brainwires-mdap"]
seal-feedback = ["seal", "dep:brainwires-permissions"]
seal-knowledge = ["seal", "dep:brainwires-cognition", "brainwires-cognition/knowledge"]
