update readme & add scripts

This commit is contained in:
Timur Gordon
2025-08-27 15:35:28 +02:00
parent 9406509866
commit 9c83048694
3 changed files with 173 additions and 10 deletions

View File

@@ -1,20 +1,84 @@
# Hero Code Home
## Architecture Overview
The Hero Code system follows a hierarchical job execution architecture with three main components:
### [Coordinator](https://git.ourworld.tf/herocode/herocoordinator)
- Manages DAGs (Direct Acyclic Graphs) that define flows of jobs
- Orchestrates job execution by dispatching individual steps from DAGs to supervisors
- Handles flow logic and determines the next steps based on job completion results
### [Supervisor](https://git.ourworld.tf/herocode/supervisor)
- Receive job assignments from the coordinator
- Dispatch jobs to appropriate runners based on job requirements
- Act as intermediaries between coordinators and runners
- Return job results back to the coordinator
### [Runner](https://git.ourworld.tf/herocode/herorunner)
- Execute the actual jobs assigned by supervisors
- Run job-specific code and return responses to supervisors
- Specialized for different types of workloads and environments
- Use Hero DB as their data layer for persistent storage and data operations
Runners run scripts in rhai or heroscript and are written in multiple languages. Each runner uses Hero DB as its data layer for persistent storage and data operations.
- [System Runner](https://git.ourworld.tf/herocode/runner_system)
- [OSIS Runner](https://git.ourworld.tf/herocode/runner_osis)
- [V Runner](https://git.ourworld.tf/herocode/runner_v)
- [Python Runner](https://git.ourworld.tf/herocode/runner_python)
```mermaid
graph TD
C[Coordinator<br/>DAG Management & Flow Logic]
subgraph N1["Node 1 (Linux User)"]
S1[Supervisor 1]
R1[Runner 1<br/>System Runner]
R2[Runner 2<br/>Python Runner]
DB1[(Hero DB 1)]
end
subgraph N2["Node 2 (Linux User)"]
S2[Supervisor 2]
R3[Runner 3<br/>V Runner]
R4[Runner 4<br/>OSIS Runner]
DB2[(Hero DB 2)]
end
C <-->|Job & Result| S1
C <-->|Job & Result| S2
S1 <-->|Job & Result| R1
S1 <-->|Job & Result| R2
S2 <-->|Job & Result| R3
S2 <-->|Job & Result| R4
R1 <-->|Data| DB1
R2 <-->|Data| DB1
R3 <-->|Data| DB2
R4 <-->|Data| DB2
style C fill:#e1f5fe
style S1 fill:#f3e5f5
style S2 fill:#f3e5f5
style R1 fill:#e8f5e8
style R2 fill:#e8f5e8
style R3 fill:#e8f5e8
style R4 fill:#e8f5e8
style DB1 fill:#fff3e0
style DB2 fill:#fff3e0
```
## Local Embedded Application Front End ([leaf](https://git.ourworld.tf/herocode/leaf))
Leaf is a local embedded application front end. It is a web application that can be embedded in any web application. It is a set of widgets that can be used to build web applications.
## Hero Backend ([baobab](https://git.ourworld.tf/herocode/baobab))
## [Hero DB](https://git.ourworld.tf/herocode/herodb)
Baobab is the hero backend. It is a Base Object and Actor Backend. It offers OpenRPC interfaces over WebSockets and Unix, and has a supervisor to manage actors, their lifecycles, and jobs dispatched.
## Actors ([actor](https://git.ourworld.tf/herocode/baobab/core/actor))
Actors are self contained job runner binaries that connect to the baobab backend and run jobs dispatched by the baobab supervisor. Actors run scripts in rhai or heroscript and are written in multiple languages.
- [System Actor](https://git.ourworld.tf/herocode/actor_system)
- [OSIS Actor](https://git.ourworld.tf/herocode/actor_osis)
- [V Actor](https://git.ourworld.tf/herocode/actor_v)
- [Python Actor](https://git.ourworld.tf/herocode/actor_python)
Hero DB is the data layer used by runners in each node. It provides persistent storage and data operations for runners, enabling them to store and retrieve data as needed during job execution.
## Herolibs