[package]
name = "feagi-services"
version.workspace = true
edition.workspace = true
authors.workspace = true
license.workspace = true
repository.workspace = true
homepage.workspace = true
description = "FEAGI Service Layer - Stable application boundary for transport adapters"

[lib]
crate-type = ["rlib"]
name = "feagi_services"

[dependencies]
# Core FEAGI crates (backend)
feagi-npu-neural = { version = "0.0.10", path = "../feagi-npu/neural" } # For types
feagi-evolutionary = { version = "0.0.10", path = "../feagi-evolutionary" }
feagi-brain-development = { version = "0.0.10", path = "../feagi-brain-development", default-features = false }
feagi-npu-burst-engine = { version = "0.0.10", path = "../feagi-npu/burst-engine", default-features = false, optional = true }
feagi-npu-plasticity = { version = "0.0.10", path = "../feagi-npu/plasticity", optional = true }
feagi-state-manager = { version = "0.0.10", path = "../feagi-state-manager", default-features = false }
# feagi-io dependency removed to break circular dependency
# AgentRegistry and types moved to feagi-services
feagi-structures = { workspace = true }

# Async runtime (optional for embedded)
async-trait = "0.1"
tokio = { version = "1.0", features = ["sync", "rt", "time", "rt-multi-thread"], optional = true }

# Synchronization
parking_lot = "0.12"
ahash = { workspace = true }

# Serialization (for DTOs)
serde = { version = "1.0", features = ["derive"] }
serde_json = "1.0"
bincode = { version = "1.3", optional = true }  # Connectome serialization
lz4 = { version = "1.28", optional = true }  # Connectome compression

# Observability
feagi-observability = { workspace = true }
tracing = "0.1"  # Required for tracing macros

# Error handling
thiserror.workspace = true

# Logging (replaced by feagi-observability)
# log = "0.4"  # Removed - use feagi-observability instead

# Time/date
chrono = "0.4"
uuid = { version = "1.0", features = ["v4", "serde"] }

[features]
default = ["std", "connectome-io"]
std = ["tokio", "feagi-brain-development/async-tokio", "feagi-npu-burst-engine/async-tokio"]  # Enable async for server deployments
no_std = []      # Disable async for embedded/RTOS
wasm = ["feagi-brain-development/wasm", "feagi-npu-burst-engine/wasm"]  # WASM builds without tokio
connectome-io = ["feagi-npu-burst-engine/connectome-io"]  # Connectome export/import functionality (types in feagi-npu-neural)
connectome-serialization = ["bincode", "connectome-compression"]  # Connectome file I/O
connectome-compression = ["lz4"]  # LZ4 compression for connectome files
plasticity = ["feagi-brain-development/plasticity", "dep:feagi-npu-plasticity"]  # Enable plasticity features (memory neurons, STDP)

[dev-dependencies]
tokio = { version = "1.0", features = ["full"] }
feagi-npu-runtime = { path = "../feagi-npu/runtime" }
tempfile = "3.8"

