No description
  • Rust 90.3%
  • Shell 7.6%
  • HTML 0.9%
  • V 0.7%
  • Makefile 0.5%
Find a file
despiegk 8c13952736
Some checks failed
Build and Test / build (push) Failing after 2s
Update LICENSE
2026-05-27 17:58:10 +00:00
.forgejo/workflows Add build_lib standardization: buildenv.sh, scripts/build_lib.sh, Makefile, CI workflows 2026-02-07 09:48:08 +04:00
_archive recator 2026-02-08 13:59:53 +04:00
benches recator 2026-02-08 13:59:53 +04:00
bin recator 2026-02-08 13:59:53 +04:00
docs recator 2026-02-08 13:59:53 +04:00
examples recator 2026-02-08 13:59:53 +04:00
lib recator 2026-02-08 13:59:53 +04:00
scripts recator 2026-02-08 13:59:53 +04:00
specs/schemas recator 2026-02-08 13:59:53 +04:00
tests recator 2026-02-08 13:59:53 +04:00
.gitignore first commit 2025-12-17 10:23:26 +01:00
buildenv.sh Add build_lib standardization: buildenv.sh, scripts/build_lib.sh, Makefile, CI workflows 2026-02-07 09:48:08 +04:00
Cargo.toml recator 2026-02-08 13:59:53 +04:00
LICENSE Update LICENSE 2026-05-27 17:58:10 +00:00
Makefile Fix Makefile cargo and shell compatibility 2026-02-07 20:54:09 +04:00
README.md docs: restructure README with standard sections 2026-05-27 16:26:10 +02:00

hero_coordinator

What this is

hero_coordinator (Horus) is a comprehensive monorepo workspace for Hero infrastructure components, consolidating job orchestration, runner management, domain models with Redis persistence, and Rhai scripting integration into a single, well-organized codebase.

The supervisor provides job lifecycle management (create, start, stop, delete), runner registration and management, Redis-based job queuing, and an OpenRPC JSON-RPC API with authentication. Domain models include 19 types with consistent patterns: BaseData (common fields like id, namespace, timestamps, tags), type-safe Builder Pattern construction via derive_builder, and optional Rhai scripting support.

What this repository contains

  • bin/supervisor — Job orchestration and runner management daemon
  • bin/runners/sal — System Abstraction Layer runner
  • lib/models — 19 domain models with Redis persistence (Note, Account, User, Group, Membership, Invoice, Expense, Event, KycInfo, Contract, Verification, FlowTemplate, FlowInstance, Asset, Transaction, and more)
  • lib/models/job — Job model types and builders
  • lib/clients/supervisor — OpenRPC client (native + WASM)
  • lib/clients/job — Redis-based job client
  • lib/runner — Core runner library for executing jobs
  • lib/rhai — Rhai integration macros and derives

Role in the stack

Part of the Hero infrastructure layer. The supervisor orchestrates jobs across runners, manages their lifecycle, and provides an OpenRPC JSON-RPC API with authentication. Models provide a consistent domain layer with Redis-backed persistence. This component integrates with other Hero services to provide centralized job management and execution.

Relation to ThreeFold

This technology is used within the ThreeFold ecosystem and was first deployed on the ThreeFold Grid. The component itself is designed as reusable infrastructure technology and should be understood by its technical function first, independent of any specific deployment.

Ownership

This repository is owned and maintained by TF-Tech NV, a Belgian company responsible for the development and maintenance of this technology.

License

This project is licensed under the Apache License 2.0 — see the LICENSE file for details.


Building

Build everything

cargo build --workspace

Build supervisor binary

cargo build -p hero-supervisor

Build client library

cargo build -p hero-supervisor-openrpc-client

Running

Start the supervisor

cargo run -p hero-supervisor -- \
  --bind-address 127.0.0.1 \
  --port 3030 \
  --redis-url redis://127.0.0.1:6379

With configuration file

cargo run -p hero-supervisor -- --config config.toml

Development

Run tests

cargo test --workspace

Check all code

cargo check --workspace

Format code

cargo fmt --all

Lint

cargo clippy --workspace -- -D warnings

Dependencies

  • Rust: 1.70+
  • Redis: Required for job queuing

Installation

hero_coordinator is installed via heroscripts and herolib installers. This ensures safe, replicable, and versioned installation. See installation heroscript.