feagi-api 0.0.1-beta.22

FEAGI REST API layer with HTTP and ZMQ transport adapters
Documentation
[package]
name = "feagi-api"
version.workspace = true
edition.workspace = true
authors.workspace = true
license.workspace = true
repository.workspace = true
homepage.workspace = true
description = "FEAGI REST API layer with HTTP and ZMQ transport adapters"

[dependencies]
# Core FEAGI
# feagi-services is always needed (for trait definitions), but can work without tokio
feagi-services = { version = "0.0.1-beta.22", path = "../feagi-services", default-features = false, features = ["wasm", "connectome-io"] }
feagi-npu-neural = { version = "0.0.1-beta.22", path = "../feagi-npu/neural", default-features = false } # For types
feagi-npu-plasticity = { version = "0.0.1-beta.22", path = "../feagi-npu/plasticity", optional = true } # For memory stats cache
feagi-evolutionary = { version = "0.0.1-beta.22", path = "../feagi-evolutionary" } # For embedded default genomes
feagi-io = { version = "0.0.1-beta.22", path = "../feagi-io", optional = true, features = ["zmq-transport", "websocket-transport-std"] } # For transport primitives and domain logic
feagi-brain-development = { version = "0.0.1-beta.22", path = "../feagi-brain-development", optional = true } # For examples
feagi-npu-burst-engine = { version = "0.0.1-beta.22", path = "../feagi-npu/burst-engine", default-features = false, optional = true } # For examples
feagi-state-manager = { version = "0.0.1-beta.22", path = "../feagi-state-manager", default-features = false, optional = true }
feagi-structures = { workspace = true }
feagi-serialization = { version = "0.0.1-beta.22", path = "../feagi-serialization" }
feagi-agent = { version = "0.0.1-beta.22", path = "../feagi-agent", optional = true, default-features = false }
feagi-config = { version = "0.0.1-beta.22", path = "../feagi-config" }

# HTTP/REST (optional - not needed for WASM)
axum = { version = "0.7", optional = true, features = ["multipart"] }
tower = { version = "0.4", optional = true, features = ["util"] }
tower-http = { version = "0.5", features = ["cors", "trace", "fs"], optional = true }
hyper = { version = "1.0", optional = true }
http-body-util = { version = "0.1", optional = true }

# Note: ZMQ provided by feagi-io transport primitives

# Async runtime (optional - not needed for WASM)
tokio = { version = "1.0", features = ["full"], optional = true }

# Serialization
serde = { version = "1.0", features = ["derive"] }
serde_json = "1.0"
base64 = "0.21"

# Validation
validator = { version = "0.18", features = ["derive"] }

# OpenAPI (utoipa - compile-time, full OpenAPI 3.0 support)
# Available even without http feature (for endpoint documentation)
utoipa = { version = "4.0", features = ["axum_extras"], default-features = false }
utoipa-swagger-ui = { version = "6.0", features = ["axum"], optional = true }

# Observability
feagi-observability = { workspace = true }

# Logging (now via feagi-observability)
tracing = "0.1"
tracing-subscriber = { version = "0.3", features = ["env-filter"] }

# Date/Time
chrono = { version = "0.4", features = ["serde"] }

# Security (stubs for now, all MIT/Apache-2.0 compatible)
chacha20poly1305 = { version = "0.10", optional = true }
x25519-dalek = { version = "2.0", optional = true }
jsonwebtoken = { version = "9.0", optional = true }
argon2 = { version = "0.5", optional = true }

# TLS
rustls = { version = "0.21", optional = true }
tokio-rustls = { version = "0.24", optional = true }

# Error handling
thiserror = "1.0"

# HTTP client (for testing against Python API)
reqwest = { version = "0.11", features = ["json"] }

# Concurrency
parking_lot = "0.12"

# Async traits
async-trait = "0.1"

# UUID generation
uuid = { version = "1.0", features = ["v4", "serde"] }

# ZMQ (for transport primitives from feagi-io)
zeromq = { version = "0.4.1", optional = true }

[dev-dependencies]
# Contract testing
insta = "1.34"
wiremock = "0.6"
assert-json-diff = "2.0"
tokio-test = "0.4"
feagi-npu-runtime = { version = "0.0.1-beta.22", path = "../feagi-npu/runtime", features = ["std"] }

[features]
default = ["http", "services"]
http = ["axum", "tower", "tower-http", "hyper", "http-body-util", "tokio", "utoipa-swagger-ui", "services"]
services = ["feagi-services/std", "feagi-io", "feagi-brain-development", "feagi-npu-burst-engine", "feagi-npu-plasticity", "feagi-state-manager/std", "feagi-agent"]
zmq = ["feagi-io", "dep:zeromq", "services"]  # feagi-io provides transport primitives
security = ["chacha20poly1305", "x25519-dalek", "jsonwebtoken", "argon2"]
tls = ["rustls", "tokio-rustls"]