Hero OS service running Rhai, Nushell, and Python scripts in isolated worker pools.
  • Rust 45.8%
  • JavaScript 37.4%
  • HTML 12.1%
  • CSS 4.6%
Find a file
despiegk 50b785105b
Some checks failed
Build and Test / build (push) Failing after 10s
Tests / test (push) Failing after 12s
lab publish / publish (push) Failing after 7m17s
feat: update to new oschema action types and add generated SDK client
- Replace KillOther/HealthCheck/HealthCheckPolicy with ActionKillOther/ActionHealthCheck/ActionHealthCheckPolicy
- Switch Option<T> fields to concrete types with zero-value defaults
- Add auto-generated openrpc_code client for hero_code_sdk

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-06-07 08:43:40 +02:00
.cargo hero_builder: add musl cross-compilation support and documentation 2026-05-08 22:19:37 +02:00
.forgejo/workflows ci: install lab onto PATH from ~/.local/bin in the publish workflow 2026-05-29 15:42:12 -04:00
.hero chore: rename FORGEJO_TOKEN→FORGE_TOKEN and HERO_SOCKET_DIR→PATH_SOCKET, prune stale env vars 2026-05-26 12:28:19 +02:00
code/status/fixrepos99 chore: bump Cargo.lock — update hero_lib, hero_proc, hero_website_framework, and lab deps 2026-06-01 10:25:36 +02:00
crates feat: update to new oschema action types and add generated SDK client 2026-06-07 08:43:40 +02:00
examples/runner chore: remove deprecated hero_runner crates 2026-04-05 17:11:46 +02:00
schema refactor(service.toml): migrate to canonical field names and add oschema definitions 2026-05-31 22:51:43 +02:00
testcases feat(runner): embed nushell alongside rhai and python 2026-04-19 10:28:27 +02:00
tests/integration Refactor: add hero_builder and reorganize code architecture 2026-05-08 21:31:43 +02:00
.gitignore Auto-sync: local changes 2026-05-02 22:26:30 +02:00
Cargo.toml feat: migrate hero_code_server to oschema-first approach 2026-06-06 21:31:46 +02:00
Cargo.toml.hero_builder_backup chore: downgrade rust-version to 1.95.0 and restore builder backup 2026-06-01 12:59:38 +02:00
PURPOSE.md chore: rename FORGEJO_TOKEN→FORGE_TOKEN and HERO_SOCKET_DIR→PATH_SOCKET, prune stale env vars 2026-05-26 12:28:19 +02:00
README.md chore: rename FORGEJO_TOKEN→FORGE_TOKEN and HERO_SOCKET_DIR→PATH_SOCKET, prune stale env vars 2026-05-26 12:28:19 +02:00
rust-toolchain.toml refactor: migrate service_base! to baso_info! and pin rust-version to 1.95.0 2026-06-01 07:36:41 +02:00

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 uv external 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

  1. Worker pools for Rhai and Nushell are pre-forked before the tokio runtime starts (required to avoid unsafe fork() in a multithreaded process).
  2. The tokio runtime then starts the JSON-RPC HTTP server on rpc.sock.
  3. Jobs are stored in a local SQLite database (~/hero/var/hero_code.db).
  4. The admin UI is a separate Axum process registered with hero_proc.