[package]
name = "meerkat-mob"
description = "Multi-agent orchestration runtime for Meerkat"
version = "0.6.4"
edition.workspace = true
rust-version.workspace = true
license.workspace = true
authors.workspace = true
repository.workspace = true
homepage.workspace = true
documentation.workspace = true
keywords.workspace = true
categories.workspace = true

[dependencies]
# Internal crates
meerkat-core = { workspace = true }
meerkat-contracts = { workspace = true }
meerkat-comms = { workspace = true }
meerkat = { workspace = true, features = ["comms", "skills", "session-compaction", "memory-store", "anthropic", "openai", "gemini"] }
meerkat-session = { workspace = true, features = ["session-compaction"] }
meerkat-client = { workspace = true }
meerkat-runtime = { workspace = true }
meerkat-machine-kernels = { workspace = true }
meerkat-machine-dsl = { workspace = true }
meerkat-machine-schema = { workspace = true }

# Async runtime
async-trait = { workspace = true }

# Serialization
serde = { workspace = true, features = ["derive"] }
serde_json = { workspace = true }
toml = { workspace = true }

# Error handling
thiserror = { workspace = true }

# Logging
tracing = { workspace = true }
meerkat-machine-derive = { workspace = true }

# Utilities
uuid = { workspace = true, features = ["v4"] }
chrono = { workspace = true }
indexmap = { workspace = true }
jsonschema = { workspace = true }
futures = { workspace = true }
tokio-util = { workspace = true }
sha2 = { workspace = true }

[target.'cfg(not(target_arch = "wasm32"))'.dependencies]
tokio = { workspace = true }
rusqlite = { workspace = true }
notify = { workspace = true }
meerkat-session = { workspace = true, features = ["session-store"] }

[target.'cfg(target_arch = "wasm32")'.dependencies]
tokio_with_wasm = { workspace = true }

[dev-dependencies]
tokio = { workspace = true, features = ["test-util", "macros", "rt-multi-thread"] }
serde_json = { workspace = true }
toml = { workspace = true }
tempfile = { workspace = true }
futures = { workspace = true }
async-stream = { workspace = true }
reqwest = { workspace = true }
tracing-subscriber = { workspace = true, features = ["env-filter"] }
meerkat-core = { workspace = true }
meerkat-store = { workspace = true, features = ["jsonl"] }
meerkat-machine-schema.workspace = true
meerkat-machine-kernels = { workspace = true, features = ["test-oracle"] }

# ## Features
#
# - `runtime-adapter` (default): pulls in `meerkat-runtime` so mob orchestration
#   can attach to an in-process `MeerkatMachine` via the `LocalMobRuntimeBridge`
#   adapter. Required for the embedded single-host deployment (CLI, RPC, WASM).
# - Building with `--no-default-features` omits `meerkat-runtime` and exposes only
#   the transport-agnostic `MobMemberRuntimeBridge` trait plus the
#   `MobSupervisorBridge` comms transport. This is the supported configuration
#   for remote-only / cross-host deployments where the runtime is reached over
#   the supervisor-bridge comms channel rather than in-process. CI exercises
#   both shapes via `make test-feature-matrix-lib`.
# - `integration-real-tests`: opt-in suite for end-to-end smoke tests that boot
#   real sessions (see `[[test]]` entries below).
[features]
default = ["runtime-adapter"]
# Vestigial: meerkat-runtime is now mandatory under the DSL cutover, so this
# feature is retained only to keep the cfg-gates compiling. The dep expression
# is empty because the dep is always present.
runtime-adapter = []
integration-real-tests = []

[package.metadata.cargo-machete]
ignored = [
    "async-stream", # proc macro (stream!)
    "meerkat-machine-dsl", # referenced by generated machine DSL macro expansion
]

[[test]]
name = "smoke_mob_resume"
path = "tests/smoke_mob_resume.rs"
required-features = ["integration-real-tests"]

[[test]]
name = "smoke_mob_flow_runtime"
path = "tests/smoke_mob_flow_runtime.rs"
required-features = ["integration-real-tests"]

[[test]]
name = "smoke_mob_pictionary"
path = "tests/smoke_mob_pictionary.rs"
required-features = ["integration-real-tests"]

[[example]]
name = "017-mob-coding-swarm"
path = "../examples/017-mob-coding-swarm-rs/main.rs"

[[example]]
name = "018-mob-research-team"
path = "../examples/018-mob-research-team-rs/main.rs"

[[example]]
name = "019-mob-pipeline"
path = "../examples/019-mob-pipeline-rs/main.rs"

[lints]
workspace = true
