[workspace]
members = [
    ".",
    "crates/bamboo-domain",
    "crates/bamboo-infrastructure",
    "crates/bamboo-engine",
    "crates/bamboo-agent-core",
    "crates/bamboo-memory",
    "crates/bamboo-compression",
    "crates/bamboo-tools",
    "crates/bamboo-cli",
    "crates/bamboo-server",
    "crates/bamboo-tui",
]
resolver = "2"

[workspace.dependencies]
serde = { version = "1", features = ["derive"] }
serde_json = "1"
chrono = { version = "0.4", features = ["serde"] }
uuid = { version = "1", features = ["v4", "serde"] }
thiserror = "1"

[package]
name = "bamboo-agent"
version = "2026.5.13"
edition = "2021"
license = "MIT"
authors = ["mugeng.du@gmail.com"]
description = "A fully self-contained AI agent backend framework with built-in web services, multi-LLM provider support, and comprehensive tool execution"
homepage = "https://github.com/bigduu/Bamboo-agent"
repository = "https://github.com/bigduu/Bamboo-agent"
documentation = "https://docs.rs/bamboo-agent"
readme = "README.md"
keywords = ["ai", "agent", "llm", "automation", "assistant"]
categories = [
    "development-tools",
    "api-bindings",
    "web-programming",
    "asynchronous",
]
include = [
    "Cargo.toml",
    "Cargo.lock",
    "LICENSE",
    "README.md",
    "build.rs",
    "src/**/*",
    "builtin_skills/**/*",
    "frontend_package/**/*",
]

[dependencies]
# Workspace crates
bamboo-domain = { path = "crates/bamboo-domain", version = "2026.5.13"}
bamboo-infrastructure = { path = "crates/bamboo-infrastructure", version = "2026.5.13"}
bamboo-agent-core = { path = "crates/bamboo-agent-core", version = "2026.5.13"}
bamboo-engine = { path = "crates/bamboo-engine", version = "2026.5.13"}
bamboo-tools = { path = "crates/bamboo-tools", version = "2026.5.13"}
bamboo-server = { path = "crates/bamboo-server", version = "2026.5.13"}

# Async runtime
tokio = { version = "1", features = ["full"] }

# Web framework
actix-web = "4"
actix-cors = "0.7"
actix-files = "0.6"

# Serialization
serde = { version = "1", features = ["derive"] }
serde_json = "1"
serde_yaml = "0.9"
toml = "0.8"

# Logging and tracing
tracing = "0.1"
tracing-subscriber = { version = "0.3", features = ["env-filter"] }

# Error handling
anyhow = "1"
thiserror = "1"

# Utilities
dirs = "5"
uuid = { version = "1", features = ["v4", "serde"] }
chrono = { version = "0.4", features = ["serde"] }
chrono-tz = "0.10"
cron = "0.15"
regex = "1"
lazy_static = "1"
colored = "2"
glob = "0.3"
globset = "0.4"
walkdir = "2"
url = "2"
zip = { version = "2", default-features = false, features = ["deflate"] }

# Async utilities
futures = "0.3"
async-trait = "0.1"
async-stream = "0.3"
tokio-stream = "0.1"
tokio-util = "0.7"
eventsource-stream = "0.2"
eventsource-client = "0.17"
bytes = "1"

# Concurrency utilities
dashmap = "6"
parking_lot = "0.12"

# HTTP client (for LLM providers)
reqwest = { version = "0.12", features = ["json", "stream"] }
reqwest-eventsource = "0.6"
reqwest-middleware = { version = "0.4", features = ["json"] }
reqwest-retry = "0.7"

# Encryption
aes-gcm = "0.10"
base64 = "0.22"
sha2 = "0.10"
hex = "0.4"
rand = "0.8"

# CLI
clap = { version = "4", features = ["derive"] }

# Process management
sysinfo = "0.33"
libc = "0.2"

# Database
rusqlite = { version = "0.32", features = ["bundled", "chrono"] }

[target.'cfg(windows)'.dependencies]
# Windows-only OCR via WinRT. Used by the `hooks.image_fallback.mode="ocr"` preflight hook.
rust_ocr = "0.1.5"

[[bin]]
name = "bamboo"
path = "src/bin/bamboo.rs"

[dev-dependencies]
tempfile = "3"
wiremock = "0.6"
tokio-test = "0.4"
mockall = "0.13"
http = "1"
actix-rt = "2"
serde_json = "1"
bamboo-infrastructure = { path = "crates/bamboo-infrastructure", features = ["test-utils"], version = "2026.5.13"}
bamboo-agent-core = { path = "crates/bamboo-agent-core", version = "2026.5.13"}
bamboo-engine = { path = "crates/bamboo-engine", version = "2026.5.13"}

[profile.release]
opt-level = 3
lto = true
