feat(services): add service_os.nu #78

Merged
mahmoud merged 3 commits from development_service_os into development 2026-04-19 15:17:50 +00:00
Owner

Summary

Adds tools/modules/services/service_os.nu, a lifecycle module for the hero_os service (server + UI binaries) with install | start | stop | status subcommands. Mirrors the existing two-binary pattern from service_browser.nu.

Changes

  • tools/modules/services/service_os.nu — new module (~335 lines). Registers hero_os_server and hero_os_ui as hero_proc actions plus the hero_os service. Surfaces both Unix sockets and the http+unix://…/ui.sock/ URL in the start summary. Warns (does not fail) when the WASM asset bundle at ~/hero/share/hero_os/public/ is missing, with the exact remediation commands.
  • tools/modules/services/mod.nu — add export use service_os.nu.

--root is optional on every command; user-level is the default.

Test Results

End-to-end smoke test on the Hetzner box from a clean state (no hero_proc, no hero_os pre-built):

Step Result
service_proc install --root hero_proc workspace built, 3/3 binaries copied
service_proc start --root healthy
service_os install --root hero_os workspace built, 3/3 binaries copied
service_os start --reset --root WASM pre-flight warned (assets absent, as expected), both actions + service registered, state: running, summary block printed with rpc sock, ui sock, UI URL
service_os status --root returned record: name: hero_os, state: running, pid, restarts, current_run_id
service_os stop --root stopped and unregistered cleanly
service_os status --root (post-stop) returned expected service 'hero_os' not found RPC error

Full per-step output is on issue #77.

One bug was caught and fixed during the smoke test: an interpolated $"…" string contained literal parentheses that nu parsed as a subexpression. Replaced with a plain double-quoted string.

## Summary Adds `tools/modules/services/service_os.nu`, a lifecycle module for the `hero_os` service (server + UI binaries) with `install | start | stop | status` subcommands. Mirrors the existing two-binary pattern from `service_browser.nu`. ## Related - Closes #77 - Part of #75 ## Changes - `tools/modules/services/service_os.nu` — new module (~335 lines). Registers `hero_os_server` and `hero_os_ui` as hero_proc actions plus the `hero_os` service. Surfaces both Unix sockets and the `http+unix://…/ui.sock/` URL in the start summary. Warns (does not fail) when the WASM asset bundle at `~/hero/share/hero_os/public/` is missing, with the exact remediation commands. - `tools/modules/services/mod.nu` — add `export use service_os.nu`. `--root` is optional on every command; user-level is the default. ## Test Results End-to-end smoke test on the Hetzner box from a clean state (no hero_proc, no hero_os pre-built): | Step | Result | |---|---| | `service_proc install --root` | `hero_proc` workspace built, 3/3 binaries copied | | `service_proc start --root` | healthy | | `service_os install --root` | `hero_os` workspace built, 3/3 binaries copied | | `service_os start --reset --root` | WASM pre-flight warned (assets absent, as expected), both actions + service registered, `state: running`, summary block printed with rpc sock, ui sock, UI URL | | `service_os status --root` | returned record: `name: hero_os`, `state: running`, `pid`, `restarts`, `current_run_id` | | `service_os stop --root` | stopped and unregistered cleanly | | `service_os status --root` (post-stop) | returned expected `service 'hero_os' not found` RPC error | Full per-step output is on issue #77. One bug was caught and fixed during the smoke test: an interpolated `$"…"` string contained literal parentheses that nu parsed as a subexpression. Replaced with a plain double-quoted string.
Add a service_os module that provides install | start | stop | status
lifecycle commands for hero_os (hero_os_server + hero_os_ui) through
hero_proc, mirroring the existing two-binary pattern in service_browser.
Registers both actions and the hero_os service, prints Unix socket paths
and http+unix:// UI URL on start, warns (does not fail) when the WASM
asset bundle is missing. --root is optional; user-level by default.

#77
#75
mahmoud merged commit 4b6ccdaee1 into development 2026-04-19 15:17:50 +00:00
mahmoud deleted branch development_service_os 2026-04-19 15:17:54 +00:00
Sign in to join this conversation.
No reviewers
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
lhumina_code/hero_skills!78
No description provided.