[package]
name = "philharmonic"
version = "0.1.0"
edition = "2024"

description = "Philharmonic workflow orchestration system — meta-crate re-exporting the entire crate family. Depends on all published library crates; feature-gates connector implementations so consumers can pick individually with default-features = false."
license = "Apache-2.0 OR MPL-2.0"
repository = "https://github.com/metastable-void/philharmonic"
readme = "README.md"
rust-version = "1.88"

keywords = ["philharmonic", "workflow", "orchestration"]
categories = ["data-structures"]

[features]
default = [
    "connector-http-forward",
    "connector-llm-openai-compat",
    "connector-sql-postgres",
    "connector-sql-mysql",
    "connector-embed",
    "connector-vector-search",
]

# TLS support for bin targets (forwards to mechanics/https).
https = ["mechanics/https", "dep:tokio-rustls"]

# --- Shipped connector implementations (default-on) ---
connector-http-forward = ["dep:philharmonic-connector-impl-http-forward"]
connector-llm-openai-compat = ["dep:philharmonic-connector-impl-llm-openai-compat"]
connector-sql-postgres = ["dep:philharmonic-connector-impl-sql-postgres"]
connector-sql-mysql = ["dep:philharmonic-connector-impl-sql-mysql"]
connector-embed = ["dep:philharmonic-connector-impl-embed"]
connector-vector-search = ["dep:philharmonic-connector-impl-vector-search"]

# --- Unshipped connector implementations (off by default until 0.1.0) ---
connector-llm-anthropic = ["dep:philharmonic-connector-impl-llm-anthropic"]
connector-llm-gemini = ["dep:philharmonic-connector-impl-llm-gemini"]
connector-email-smtp = ["dep:philharmonic-connector-impl-email-smtp"]

[dependencies]
async-trait = "0.1"
axum = "0.8"
clap = { version = "4", features = ["derive"] }
coset = "0.4"
hex = "0.4"
http = "1"
hyper-util = { version = "0.1", features = ["full"] }
rand_core = { version = "0.6", features = ["getrandom"] }
reqwest = { version = "0.13", default-features = false, features = ["json", "rustls"] }
rust-embed = "8"
serde = { version = "1", features = ["derive"] }
serde_json = "1"
tokio = { version = "1", features = ["full"] }
tokio-rustls = { version = "0.26", optional = true }
toml = "0.8"
tower = "0.5"
x25519-dalek = { version = "2", features = ["static_secrets"] }
zeroize = { version = "1", features = ["derive"] }

# Core vocabulary
philharmonic-types = "0.3.5"

# Storage substrate
philharmonic-store = "0.1.1"
philharmonic-store-sqlx-mysql = "0.1.1"

# Execution substrate
mechanics-config = "0.1.0"
mechanics-core = "0.3.0"
mechanics = "0.4.0"

# Policy and workflow
philharmonic-policy = "0.2.0"
philharmonic-workflow = "0.1.1"

# Connector layer — always-on crates
philharmonic-connector-common = "0.2.0"
philharmonic-connector-client = "0.1.0"
philharmonic-connector-router = "0.1.0"
philharmonic-connector-service = "0.2.0"
philharmonic-connector-impl-api = "0.1.1"

# Connector implementations — feature-gated (shipped, default-on)
philharmonic-connector-impl-http-forward = { version = "0.1.0", optional = true }
philharmonic-connector-impl-llm-openai-compat = { version = "0.1.0", optional = true }
philharmonic-connector-impl-sql-postgres = { version = "0.1.0", optional = true }
philharmonic-connector-impl-sql-mysql = { version = "0.1.0", optional = true }
philharmonic-connector-impl-embed = { version = "0.1.0", optional = true }
philharmonic-connector-impl-vector-search = { version = "0.1.0", optional = true }

# Connector implementations — feature-gated (unshipped, off by default)
philharmonic-connector-impl-llm-anthropic = { version = "0.0.0", optional = true }
philharmonic-connector-impl-llm-gemini = { version = "0.0.0", optional = true }
philharmonic-connector-impl-email-smtp = { version = "0.0.0", optional = true }

# API
philharmonic-api = "0.1.1"

[[bin]]
name = "mechanics-worker"
path = "src/bin/mechanics_worker/main.rs"

[[bin]]
name = "philharmonic-connector"
path = "src/bin/philharmonic_connector/main.rs"

[[bin]]
name = "philharmonic-api"
path = "src/bin/philharmonic_api/main.rs"

[dev-dependencies]
tokio = { version = "1", features = ["macros", "rt", "time"] }

[profile.release]
opt-level = 3
lto = true
strip = true
codegen-units = 1
panic = "abort"
overflow-checks = true
