# homecore-automation — HOMECORE automation engine, trigger evaluator, and
# MiniJinja template evaluator.
# Implements ADR-129 (HOMECORE-AUTO): YAML automation parser, trigger/condition/
# action evaluation, AutomationEngine runtime that subscribes to the HOMECORE
# event bus and fires automations.

[package]
name = "homecore-automation"
version = "0.1.0-alpha.0"
edition = "2021"
license = "MIT"
authors = ["rUv <ruv@ruv.net>", "HOMECORE Contributors"]
description = "Automation engine, trigger evaluator, and MiniJinja template evaluator for HOMECORE (ADR-129)"
repository = "https://github.com/ruvnet/RuView"

[lib]
name = "homecore_automation"
path = "src/lib.rs"

[dependencies]
# HOMECORE core — state machine, event bus, service registry, entity types
homecore = { path = "../homecore" }

# Async runtime
tokio = { version = "1", features = ["sync", "rt", "rt-multi-thread", "time", "macros"] }

# Serialization — YAML automation files + JSON service call data
serde = { version = "1", features = ["derive"] }
serde_yaml = "0.9"
serde_json = "1"

# MiniJinja — HA-compatible Jinja2 template engine in pure Rust (ADR-129 §2.1)
minijinja = { version = "2", features = ["json", "loader"] }

# Error handling
thiserror = "1"

# Time — chrono DateTime for triggers + condition evaluation
chrono = { version = "0.4", features = ["serde"] }

# Async trait for EvaluateTrigger + condition evaluate
async-trait = "0.1"

# Unique IDs for automation instances
uuid = { version = "1", features = ["v4"] }

[dev-dependencies]
tokio = { version = "1", features = ["sync", "rt", "rt-multi-thread", "time", "macros", "test-util"] }
