[workspace]
resolver = "3"
members = [
    "crates/mesoclaw-core",
    "crates/mesoclaw-desktop",
    "crates/mesoclaw-cli",
    "crates/mesoclaw-tui",
    "crates/mesoclaw-daemon",
]

[workspace.package]
version = "0.0.15"
edition = "2024"
license = "MIT"
authors = ["NSRTech"]
rust-version = "1.85"

[workspace.dependencies]
# Core library
mesoclaw-core = { path = "crates/mesoclaw-core", default-features = false }

# Async runtime
tokio = { version = "1.50.0", features = ["full"] }
async-trait = "0.1.89"

# HTTP gateway
axum = { version = "0.8.8", features = ["ws", "macros"] }
tower-http = { version = "0.6.8", features = ["cors", "trace"] }

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

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

# Security
keyring = { version = "3", features = ["sync-secret-service"] }
zeroize = "1"

# Error handling
thiserror = "2"

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

# Paths
directories = "6"

# Utils
chrono = { version = "0.4", features = ["serde"] }
uuid = { version = "1", features = ["v4", "serde"] }
reqwest = { version = "0.13.2", features = ["json", "stream"] }
tokio-tungstenite = { version = "0.28.0", features = ["rustls-tls-native-roots"] }

# Concurrency
dashmap = "6"
parking_lot = "0.12"
arc-swap = "1"

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

# Phase 2: Memory + Tools
sysinfo = "0.38.3"
websearch = "0.1.1"
ignore = "0.4.25"
diffy = "0.4.2"
lru = "0.16.3"
sqlite-vec = "0.1.6"
urlencoding = "2"

# Phase 3: AI Agent + Gateway
rig-core = "0.32"
tokio-stream = "0.1.17"
futures = "0.3"

# Phase 4: Agent Intelligence
serde_yaml = "0.9"

# Phase 8.11: Local Embeddings (optional)
fastembed = "4"

# API Documentation (optional)
utoipa = { version = "5", features = ["axum_extras", "chrono"] }
utoipa-scalar = { version = "0.3", features = ["axum"] }

# Phase 8: Channels (optional)
teloxide = { version = "0.17.0", features = ["macros"] }
serenity = { version = "0.12.5", default-features = false, features = ["client", "gateway", "model", "rustls_backend"] }

[workspace.lints.rust]
unsafe_code = "warn"

[workspace.lints.clippy]
unwrap_used = "warn"
expect_used = "warn"

[profile.release]
lto = true
opt-level = "z"
codegen-units = 1
strip = "debuginfo"
panic = "unwind"

[profile.ci-release]
inherits = "release"
lto = "thin"
codegen-units = 16
opt-level = "s"

[profile.release-fast]
inherits = "release"
lto = "thin"
debug = true
