[package]
name = "meerkat"
description = "Modular, high-performance agent harness for LLM-powered applications"
version.workspace = true
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]
meerkat-core = { workspace = true, features = ["jsonschema"] }
meerkat-client = { workspace = true }
meerkat-store = { workspace = true }
meerkat-tools = { workspace = true }
meerkat-session = { workspace = true }
meerkat-memory = { workspace = true, optional = true }
meerkat-mcp = { workspace = true, optional = true }
meerkat-comms = { workspace = true, optional = true }
meerkat-hooks = { workspace = true }
meerkat-contracts = { workspace = true }
meerkat-skills = { workspace = true, optional = true }
async-trait = { workspace = true }
serde_json = { workspace = true }
futures = { workspace = true }
thiserror = { workspace = true }
tracing = { workspace = true }

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

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

[dev-dependencies]
tempfile = { workspace = true }
tokio = { workspace = true, features = ["test-util", "macros"] }
serde = { workspace = true }
serde_json = { workspace = true }
toml = { workspace = true }
futures = { workspace = true }
async-trait = { workspace = true }
schemars = { workspace = true }
which = { workspace = true }
indexmap = { workspace = true }
# meerkat-mob and meerkat-mcp-server depend on us, not the other way around.
# Binaries (rkat, meerkat-rest) depend on them directly.

[target.'cfg(unix)'.dev-dependencies]
nix = { workspace = true }

[features]
default = ["anthropic", "openai", "gemini"]
integration-real-tests = []

# LLM providers
anthropic = ["meerkat-client/anthropic"]
openai = ["meerkat-client/openai"]
gemini = ["meerkat-client/gemini"]
all-providers = ["anthropic", "openai", "gemini"]

# Storage backends
jsonl-store = ["meerkat-store/jsonl"]
memory-store = ["meerkat-store/memory"]

# Session capabilities
session-store = ["meerkat-session/session-store"]
session-compaction = ["meerkat-session/session-compaction"]
memory-store-session = ["dep:meerkat-memory"]

# Optional subsystems
comms = ["dep:meerkat-comms", "meerkat-tools/comms"]
mcp = ["dep:meerkat-mcp", "meerkat-tools/mcp"]
sub-agents = ["meerkat-tools/sub-agents"]
skills = ["dep:meerkat-skills", "meerkat-skills/skills-http", "meerkat-tools/skills"]

[package.metadata.cargo-machete]
ignored = ["which"]  # dev-dependency used in e2e tests

[lints]
workspace = true

[[example]]
name = "comms_verbose"
path = "examples/comms_verbose.rs"
required-features = ["comms"]

[[example]]
name = "simple"
path = "examples/simple.rs"
required-features = ["jsonl-store"]

[[example]]
name = "with_tools"
path = "examples/with_tools.rs"
required-features = ["jsonl-store"]

[[example]]
name = "multi_turn_tools"
path = "examples/multi_turn_tools.rs"
required-features = ["jsonl-store"]

# ── Reference examples (examples/ at workspace root) ────────────────────────

[[example]]
name = "001-hello-meerkat"
path = "../examples/001-hello-meerkat-rs/main.rs"
required-features = ["jsonl-store"]

[[example]]
name = "005-streaming-events"
path = "../examples/005-streaming-events-rs/main.rs"
required-features = ["jsonl-store"]

[[example]]
name = "006-custom-tools"
path = "../examples/006-custom-tools-rs/main.rs"
required-features = ["jsonl-store"]

[[example]]
name = "009-budget-and-retry"
path = "../examples/009-budget-and-retry-rs/main.rs"
required-features = ["jsonl-store"]

[[example]]
name = "011-hooks-guardrails"
path = "../examples/011-hooks-guardrails-rs/main.rs"
required-features = ["jsonl-store"]

[[example]]
name = "012-skills-loading"
path = "../examples/012-skills-loading-rs/main.rs"
required-features = ["jsonl-store", "skills"]

[[example]]
name = "013-context-compaction"
path = "../examples/013-context-compaction-rs/main.rs"
required-features = ["jsonl-store", "session-compaction"]

[[example]]
name = "014-semantic-memory"
path = "../examples/014-semantic-memory-rs/main.rs"
required-features = ["jsonl-store", "memory-store-session"]

[[example]]
name = "015-session-persistence"
path = "../examples/015-session-persistence-rs/main.rs"
required-features = ["jsonl-store"]

[[example]]
name = "016-sub-agent-orchestration"
path = "../examples/016-sub-agent-orchestration-rs/main.rs"
required-features = ["jsonl-store"]

[[example]]
name = "020-comms-peer-messaging"
path = "../examples/020-comms-peer-messaging-rs/main.rs"
required-features = ["jsonl-store", "comms"]

[[example]]
name = "024-host-mode-event-mesh"
path = "../examples/024-host-mode-event-mesh-rs/main.rs"
required-features = ["jsonl-store"]

[[example]]
name = "025-full-stack-agent"
path = "../examples/025-full-stack-agent-rs/main.rs"
required-features = ["jsonl-store"]

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

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

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

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