2026-01-24 02:07:45 +00:00
|
|
|
[package]
|
|
|
|
|
name = "vapora-workflow-engine"
|
|
|
|
|
version.workspace = true
|
|
|
|
|
edition.workspace = true
|
|
|
|
|
rust-version.workspace = true
|
|
|
|
|
authors.workspace = true
|
|
|
|
|
license.workspace = true
|
|
|
|
|
repository.workspace = true
|
|
|
|
|
homepage.workspace = true
|
|
|
|
|
keywords.workspace = true
|
|
|
|
|
categories.workspace = true
|
|
|
|
|
|
|
|
|
|
[dependencies]
|
|
|
|
|
vapora-shared = { workspace = true }
|
2026-02-26 14:49:34 +00:00
|
|
|
vapora-channels = { workspace = true }
|
2026-01-24 02:07:45 +00:00
|
|
|
vapora-swarm = { workspace = true }
|
|
|
|
|
vapora-agents = { workspace = true }
|
|
|
|
|
vapora-knowledge-graph = { workspace = true }
|
|
|
|
|
|
|
|
|
|
# Async runtime
|
|
|
|
|
tokio = { workspace = true, features = ["full"] }
|
|
|
|
|
futures = { workspace = true }
|
|
|
|
|
async-trait = { workspace = true }
|
|
|
|
|
|
|
|
|
|
# Message queue
|
|
|
|
|
async-nats = { workspace = true }
|
|
|
|
|
|
|
|
|
|
# Serialization
|
|
|
|
|
serde = { workspace = true, features = ["derive"] }
|
|
|
|
|
serde_json = { workspace = true }
|
|
|
|
|
toml = { workspace = true }
|
|
|
|
|
|
|
|
|
|
# Utilities
|
|
|
|
|
uuid = { workspace = true, features = ["v4"] }
|
|
|
|
|
chrono = { workspace = true, features = ["serde"] }
|
|
|
|
|
dashmap = { workspace = true }
|
|
|
|
|
|
|
|
|
|
# Logging
|
|
|
|
|
tracing = { workspace = true }
|
|
|
|
|
|
|
|
|
|
# Error handling
|
|
|
|
|
thiserror = { workspace = true }
|
|
|
|
|
anyhow = { workspace = true }
|
|
|
|
|
|
|
|
|
|
# Metrics
|
|
|
|
|
prometheus = { workspace = true }
|
|
|
|
|
|
2026-02-22 21:44:42 +00:00
|
|
|
# Persistence
|
|
|
|
|
surrealdb = { workspace = true }
|
|
|
|
|
|
|
|
|
|
# Authorization
|
|
|
|
|
cedar-policy = "4.9"
|
|
|
|
|
|
feat(workflow-engine): autonomous scheduling with timezone and distributed lock
Add cron-based autonomous workflow firing with two hardening layers:
- Timezone-aware scheduling via chrono-tz: ScheduledWorkflow.timezone
(IANA identifier), compute_next_fire_at/after_tz, validate_timezone;
DST-safe, UTC fallback when absent; validated at config load and REST API
- Distributed fire-lock via SurrealDB conditional UPDATE (locked_by/locked_at
fields, 120 s TTL); WorkflowScheduler gains instance_id (UUID) as lock owner;
prevents double-fires across multi-instance deployments without extra infra
- ScheduleStore: try_acquire_fire_lock, release_fire_lock (own-instance guard),
full CRUD (load_one/all, full_upsert, patch, delete, load_runs)
- REST: 7 endpoints (GET/PUT/PATCH/DELETE schedules, runs history, manual fire)
with timezone field in all request/response types
- Migrations 010 (schedule tables) + 011 (timezone + lock columns)
- Tests: 48 passing (was 26); ADR-0034; changelog; feature docs updated
2026-02-26 11:34:44 +00:00
|
|
|
# Scheduling
|
|
|
|
|
cron = "0.12"
|
|
|
|
|
chrono-tz = "0.10"
|
|
|
|
|
|
2026-01-24 02:07:45 +00:00
|
|
|
[dev-dependencies]
|
|
|
|
|
mockall = { workspace = true }
|
|
|
|
|
wiremock = { workspace = true }
|
|
|
|
|
tokio = { workspace = true, features = ["test-util"] }
|
2026-02-22 21:44:42 +00:00
|
|
|
tempfile = { workspace = true }
|