Hero OS service running Rhai, Nushell, and Python scripts in isolated worker pools.
- JavaScript 45%
- Rust 43.2%
- HTML 7.1%
- CSS 4.7%
|
All checks were successful
lab release / release (push) Successful in 40m17s
The job/file editor and job-output pages each have their own bespoke direct-fetch RPC helper that bypasses rpc.js and sent params flat, so struct-param methods failed with "missing field input": - job_editor.js: job.submit (New Job form) - file_editor.js: file.write, job.submit - job_output.js: job.logs Add a small per-page wrap map keyed by full method name; scalar-param methods (file.read, job.get) stay flat. Verified the New Job editor submits and runs. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com> |
||
|---|---|---|
| .cargo | ||
| .codegraph | ||
| .forgejo/workflows | ||
| crates | ||
| .gitignore | ||
| Cargo.lock | ||
| Cargo.toml | ||
| 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.