The Hybrid Automation Router (HAR) is an intelligent routing layer that receives automation events from multiple sources (filesystem watchers, webhooks, queues, schedules) and routes them to the best automation target based on capabilities, tags, priorities, and configurable strategies.
The v0.2.0 workspace is a Rust workspace of 7 crates covering core routing, configuration management, event dispatch with retry and dead-letter handling, health checking with degradation tracking, and metrics collection with snapshots. The routing engine compiles and its tests pass; production deployment against live targets is not yet validated (Phase 1 is near complete).
HAR is designed for tight integration with RPA Elysium while remaining fully independent — either can be used standalone.
Direction (Phase 2). HAR is being extended into a declarative/imperative automation interlingua — a tool-neutral substrate (carried on A2ML) that lets heterogeneous automation estates (Puppet, Salt, Terraform, Ansible) hand off and resume across each other, with HAR as the seam. See
docs/decisions/0002-automation-interlingua-declarative-imperative.adoc.
┌──────────────────────────────────────┐
│ EVENT SOURCES │
│ Filesystem │ Webhook │ Queue │ Cron │
└──────────┬───────────────────────────┘
│
▼
┌──────────────────────────────────────┐
│ HYBRID AUTOMATION ROUTER │
│ ┌────────────┐ ┌─────────────────┐ │
│ │ Context │ │ Route Engine │ │
│ │ Analyzer │ │ (strategies) │ │
│ └─────┬──────┘ └────────┬────────┘ │
│ │ Shared ABI │ │
│ ┌─────┴──────────────────┴────────┐ │
│ │ proven-fsm │ proven-queueconn │ │
│ └─────────────────────────────────┘ │
└──────────┬───────────────┬───────────┘
│ │
┌──────────▼──────┐ ┌──────▼───────────┐
│ rpa-elysium │ │ Other targets │
│ (filesystem) │ │ (web, API, etc.) │
└─────────────────┘ └──────────────────┘
The Rust routing/dispatch core is implemented and tested. The shared ABI band (proven-fsm / proven-queueconn) and the Gleam backend are design scaffold — see Status below.
HAR and RPA Elysium are designed to share:
-
proven-fsm types — the same state-machine vocabulary for workflow transitions (planned: ABI defined, not yet wired into the Rust core).
-
proven-queueconn — HAR publishes tasks, rpa-elysium subscribes (planned: the queueconn runtime is not yet implemented).
-
Common event schema — Idris2 ABI definitions in
src/abi/(scaffold — type stubs; see Status).
| Layer | Technology | State |
|---|---|---|
Core engine |
Rust — 8 crates (har-core, har-config, har-dispatch, har-health, har-metrics, har-router, har-cli, har-abi) |
✅ implemented |
ABI |
Idris2 ( |
⚠ Idris2 stubs not yet
compiled/proven; |
Linear types |
Ephapax ( |
⚠ spec only |
FFI |
Zig ( |
⚠ scaffold (not invoked from Rust) |
Backend |
Gleam (BEAM — event bus, persistence) |
☐ planned (not started) |
Config |
Nickel (typed configuration) |
partial |
Build |
Guix ( |
✅ |
# Build
cargo build --workspace
# Run tests
cargo test --workspace
# Show registered targets
har targets
# Route a filesystem event
har route filesystem
# Route with a target hint
har route web --target web-auto| Crate | Purpose |
|---|---|
|
Core types: events, targets, routes, strategies |
|
Configuration loading and validation (JSON, file-based) |
|
Event dispatch to targets with retry and dead-letter queues |
|
Health checking for targets with degradation tracking |
|
Metrics collection for routing decisions with snapshots |
|
Routing engine — strategy-dispatched target selection |
|
Command-line interface for route management |
All seven strategies are implemented; the final target selection is dispatched on the router’s configured strategy, and selection is deterministic (it never depends on hash-map iteration order).
| Strategy | Description |
|---|---|
Direct |
Target hint bypasses all rules |
CapabilityMatch |
Match event category to target capabilities (highest weight; ties broken by id) |
TagMatch |
Tag-based routing rules |
RoundRobin |
Rotate across matching targets |
WeightedRandom |
Weight-proportional, deterministic per event (seeded from the event id) |
LeastLoaded |
Send to the least-busy target |
Failover |
Highest-weight primary with an ordered fallback chain |
-
Phase 0 (foundation): ✅ complete.
-
Phase 1 (core framework): ⚙ near complete — the 7 Rust crates are implemented and tested; remaining: proven-queueconn runtime + Gleam backend.
-
Phase 2 (automation interlingua): ◆ the current north star (see Direction above and
ROADMAP.adoc). -
Scaffold, not yet real: the Idris2 ABI (
src/abi/) and Ephapax linear types are design stubs — they do not yet compile as a package or wire into the Rust runtime;panels/and a Gleamservices/backend referenced in earlier drafts do not exist yet. Proof obligations are tracked inPROOF-NEEDS.md.
See ROADMAP.adoc for the full phased plan.
Jonathan D.A. Jewell — GitHub: @hyperpolymath