Hero OS service running Rhai, Nushell, and Python scripts in isolated worker pools.
- Rust 49%
- JavaScript 35.6%
- HTML 11.2%
- CSS 4.2%
- hero_code CLI simplified to --info discovery only; lifecycle (start/stop of hero_code_server/admin) is now owned by the Hero supervisor - Admin UI: branch management modal for local and remote Forge branches (list, switch, create, delete, set default, push-and-set-default) - Admin UI: bulk tag editing across selected repos with suggestion chips, Enter key to save, and "Remove all" action - Admin UI: org/owner prefix shown in repo name column; single-row rebuild after clone avoids full list reload - Server: new forge.branches / forge.set_default_branch / forge.push_branch RPC methods calling Forgejo REST API via ureq - Server: new job.* RPC module (list, get, logs, submit, cancel, purge) proxying to the local hero_proc daemon via hero_proc_sdk - Server: list cache invalidated on hide/unhide/tag mutations so UI reflects changes immediately without waiting for the 120s TTL - Server: code.import now clones to PATH_CODE/<repo_name> (flat, no org subdirectory) matching Hero's local-scan convention - Add .codegraph/.gitignore, gitignore .hero/, remove stale status file Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com> |
||
|---|---|---|
| .cargo | ||
| .codegraph | ||
| .forgejo/workflows | ||
| .hero | ||
| crates | ||
| examples/runner | ||
| schema | ||
| testcases | ||
| tests/integration | ||
| .gitignore | ||
| Cargo.lock | ||
| Cargo.toml | ||
| Cargo.toml.hero_builder_backup | ||
| PURPOSE.md | ||
| README.md | ||
| rust-toolchain.toml | ||
hero_code
Hero OS service — multi-language script execution engine.
Runs Rhai, Nushell, and Python scripts in isolated worker pools and exposes a JSON-RPC 2.0 interface over Unix sockets.
Binaries
| Binary | Role |
|---|---|
hero_code_server |
Main RPC daemon — executes scripts, stores jobs |
hero_code_admin |
Admin dashboard web UI (Unix socket: admin.sock) |
hero_code |
CLI — registers and manages the service lifecycle |
Sockets
| Socket | Purpose |
|---|---|
$PATH_SOCKET/hero_code/rpc.sock |
JSON-RPC 2.0 API for script execution |
$PATH_SOCKET/hero_code/admin.sock |
Admin dashboard HTTP |
Languages Supported
- Rhai — embedded scripting (pre-forked worker pool)
- Nushell — shell-style scripting (pre-forked worker pool)
- Python — via
uvexternal process runner
Service Lifecycle
lab service code --install # build + install all binaries
lab service code --start # register with hero_proc and start
lab service code --stop # stop all binaries
lab service code --status # status of all binaries
Architecture
- Worker pools for Rhai and Nushell are pre-forked before the tokio runtime
starts (required to avoid unsafe
fork()in a multithreaded process). - The tokio runtime then starts the JSON-RPC HTTP server on
rpc.sock. - Jobs are stored in a local SQLite database (
~/hero/var/hero_code.db). - The admin UI is a separate Axum process registered with
hero_proc.