hero_livekit ships no service.toml — hero_proc cannot supervise, Conferences island breaks #39

Closed
opened 2026-05-14 13:31:05 +00:00 by rawdaGastan · 3 comments
Member

Bug

The Conferences island in Hero OS fails to load with:

Socket 'rpc.sock' not found for 'hero_livekit' — daemon not running

Root cause: hero_livekit ships no service.toml files. Neither crates/hero_livekit_server nor crates/hero_livekit_admin has the canonical manifest, so hero_proc cannot register or supervise either binary. The rpc.sock is never created, and the Conferences island (which connects to that socket) sees no daemon.

Symptoms observed locally:

  • find hero_livekit -name service.toml returns nothing.
  • hero_proc service list does not include hero_livekit.
  • ~/hero/var/sockets/hero_livekit/ only contains a leftover admin.sock; no rpc.sock.
  • A hero_livekit_admin --info process is left hanging (likely a previous lab --start attempt that couldn't register without a manifest).

Reference: hero_books has crates/hero_books_server/service.toml, hero_books_admin/service.toml, etc. — the same shape hero_livekit needs.

Fix

Add canonical service.toml files following the hero_service_info skill:

  1. crates/hero_livekit_server/service.toml
    • [service] name="hero_livekit", repo="lhumina_code/hero_livekit", crate="hero_livekit_server", category="user" (or "core" if treated as core).
    • [[binaries]] name="hero_livekit_server", kind="server".
    • [[binaries.sockets]] type="rpc", path="hero_livekit/rpc.sock", protocol="openrpc", openrpc=true.
    • [[dependencies]] on hero_proc_server.
  2. crates/hero_livekit_admin/service.toml
    • [service] crate="hero_livekit_admin".
    • [[binaries]] name="hero_livekit_admin", kind="admin".
    • [[binaries.sockets]] type="admin", path="hero_livekit/admin.sock", protocol="http", webui=true.
    • [[dependencies]] on hero_livekit_server.
  3. Wire both into build.rs (herolib_core::base::embed_service_toml) so each binary serves them via --info.
  4. Confirm cd hero_livekit && lab --start then registers both, hero_proc service list shows hero_livekit, and ~/hero/var/sockets/hero_livekit/rpc.sock appears.

Acceptance

  • crates/hero_livekit_server/service.toml exists and validates via hero_livekit_server --info.
  • crates/hero_livekit_admin/service.toml exists and validates via hero_livekit_admin --info.
  • hero_proc service list shows hero_livekit running after lab --start.
  • ~/hero/var/sockets/hero_livekit/rpc.sock is bound while the server is up.
  • Hero OS Conferences island loads without the "daemon not running" error.

Notes

  • The Hero OS dock entry for Conferences should ideally degrade more gracefully when hero_livekit is genuinely offline (out of scope for this issue — track separately if desired).
## Bug The Conferences island in Hero OS fails to load with: ``` Socket 'rpc.sock' not found for 'hero_livekit' — daemon not running ``` Root cause: `hero_livekit` ships no `service.toml` files. Neither `crates/hero_livekit_server` nor `crates/hero_livekit_admin` has the canonical manifest, so `hero_proc` cannot register or supervise either binary. The `rpc.sock` is never created, and the Conferences island (which connects to that socket) sees no daemon. Symptoms observed locally: - `find hero_livekit -name service.toml` returns nothing. - `hero_proc service list` does not include `hero_livekit`. - `~/hero/var/sockets/hero_livekit/` only contains a leftover `admin.sock`; no `rpc.sock`. - A `hero_livekit_admin --info` process is left hanging (likely a previous `lab --start` attempt that couldn't register without a manifest). Reference: `hero_books` has `crates/hero_books_server/service.toml`, `hero_books_admin/service.toml`, etc. — the same shape `hero_livekit` needs. ## Fix Add canonical `service.toml` files following the `hero_service_info` skill: 1. `crates/hero_livekit_server/service.toml` - `[service]` name="hero_livekit", repo="lhumina_code/hero_livekit", crate="hero_livekit_server", category="user" (or "core" if treated as core). - `[[binaries]]` name="hero_livekit_server", kind="server". - `[[binaries.sockets]]` type="rpc", path="hero_livekit/rpc.sock", protocol="openrpc", openrpc=true. - `[[dependencies]]` on `hero_proc_server`. 2. `crates/hero_livekit_admin/service.toml` - `[service]` crate="hero_livekit_admin". - `[[binaries]]` name="hero_livekit_admin", kind="admin". - `[[binaries.sockets]]` type="admin", path="hero_livekit/admin.sock", protocol="http", webui=true. - `[[dependencies]]` on `hero_livekit_server`. 3. Wire both into `build.rs` (`herolib_core::base::embed_service_toml`) so each binary serves them via `--info`. 4. Confirm `cd hero_livekit && lab --start` then registers both, `hero_proc service list` shows `hero_livekit`, and `~/hero/var/sockets/hero_livekit/rpc.sock` appears. ## Acceptance - [ ] `crates/hero_livekit_server/service.toml` exists and validates via `hero_livekit_server --info`. - [ ] `crates/hero_livekit_admin/service.toml` exists and validates via `hero_livekit_admin --info`. - [ ] `hero_proc service list` shows `hero_livekit` running after `lab --start`. - [ ] `~/hero/var/sockets/hero_livekit/rpc.sock` is bound while the server is up. - [ ] Hero OS Conferences island loads without the "daemon not running" error. ## Notes - The Hero OS dock entry for Conferences should ideally degrade more gracefully when `hero_livekit` is genuinely offline (out of scope for this issue — track separately if desired).
rawdaGastan added this to the ACTIVE project 2026-05-14 13:31:46 +00:00
Author
Member

Implementation Spec for Issue #39

Objective

Add canonical service.toml manifests and wire herolib_core::base into both hero_livekit_server and hero_livekit_admin so hero_proc can register and supervise them. This restores creation of ~/hero/var/sockets/hero_livekit/rpc.sock at server startup, unblocks the Hero OS Conferences island, and makes --info / lab infocheck succeed on the repo. The fix follows the contract documented in the hero_service_info and herolib_base skills.

Requirements

  • Each binary crate (crates/hero_livekit_server, crates/hero_livekit_admin) must ship service.toml at the crate root and embed it at compile time via include_str!("../service.toml").
  • Each main.rs must call herolib_core::base::validate_service_toml(SERVICE_TOML) and herolib_core::base::handle_info_flag(SERVICE_TOML) as the very first two lines inside main(), before any other logic. This is what eliminates the hero_livekit_admin --info zombie symptom.
  • [[binaries.sockets]] paths must match what the binaries actually bind today: hero_livekit/rpc.sock for the server and hero_livekit/admin.sock for the admin (see crates/hero_livekit_sdk/src/lib.rs:75-81).
  • service.name = "hero_livekit" (no _server / _admin suffix); service.crate is the actual crate name; service.version = "0.1.0" (matches workspace [workspace.package].version).
  • herolib_core = { workspace = true } must be a direct dependency of both binary crates' Cargo.toml. It already exists in workspace deps but is not pulled into either binary crate today.
  • The existing crates/hero_livekit_server/build.rs is exclusively for OschemaBuilder codegen and does not need changes — embedding is via include_str! in main.rs per the canonical pattern.
  • After install, lab infocheck must exit 0 with 0 crate(s) with issues, and hero_proc service list must list hero_livekit after lab --start.

Files to Modify/Create

  • crates/hero_livekit_server/service.toml — Create. Manifest for the JSON-RPC server binary; declares one rpc socket at hero_livekit/rpc.sock with protocol = "openrpc", openrpc = true, depends on hero_proc_server.
  • crates/hero_livekit_server/Cargo.toml — Modify. Add herolib_core = { workspace = true } to [dependencies].
  • crates/hero_livekit_server/src/main.rs — Modify. Add const SERVICE_TOML: &str = include_str!("../service.toml"); at module scope, and insert herolib_core::base::validate_service_toml(SERVICE_TOML); then herolib_core::base::handle_info_flag(SERVICE_TOML); as the first two statements inside async fn main().
  • crates/hero_livekit_server/build.rs — No change.
  • crates/hero_livekit_admin/service.toml — Create. Manifest for the admin dashboard binary; declares one admin socket at hero_livekit/admin.sock with protocol = "http", webui = true, depends on hero_livekit_server.
  • crates/hero_livekit_admin/Cargo.toml — Modify. Add herolib_core = { workspace = true } to [dependencies].
  • crates/hero_livekit_admin/src/main.rs — Modify. Same const + two-line main() prelude as the server.

Implementation Plan

Step 1: Create crates/hero_livekit_server/service.toml

Files: crates/hero_livekit_server/service.toml

  • Author the manifest following the canonical shape of hero_os/crates/hero_os_server/service.toml. Required content:
    • [service]: name = "hero_livekit", repo = "lhumina_code/hero_livekit", crate = "hero_livekit_server", display = "Hero LiveKit Server", description = "LiveKit SFU orchestrator — rooms, participants, tokens, exposed as a JSON-RPC 2.0 service over a Unix socket.", category = "core", version = "0.1.0".
    • One [[binaries]]: name = "hero_livekit_server", kind = "server", desc = "JSON-RPC 2.0 daemon for the LiveKit SFU orchestrator; exposes room/participant/token management.".
    • One [[binaries.sockets]]: type = "rpc", path = "hero_livekit/rpc.sock", protocol = "openrpc", openrpc = true, sse = false, rest = false, webui = false.
    • One [[dependencies]]: repo = "lhumina_code/hero_proc", crate = "hero_proc_server", bin = "hero_proc_server".
    • [[env]] entries: HERO_SOCKET_DIR, HOME, RUST_LOG.
      Dependencies: none

Step 2: Wire service.toml into crates/hero_livekit_server/src/main.rs

Files: crates/hero_livekit_server/src/main.rs, crates/hero_livekit_server/Cargo.toml

  • Append herolib_core = { workspace = true } to [dependencies] in Cargo.toml.
  • Add const SERVICE_TOML: &str = include_str!("../service.toml"); at module scope (above existing imports, ~line 7).
  • Inside async fn main(), make these the first two statements (before HeroLifecycle::new(...)):
    herolib_core::base::validate_service_toml(SERVICE_TOML);
    herolib_core::base::handle_info_flag(SERVICE_TOML);
    
  • Do not touch service_socket_path(), HeroLifecycle, or the OServer wiring.
    Dependencies: Step 1

Step 3: Create crates/hero_livekit_admin/service.toml

Files: crates/hero_livekit_admin/service.toml

  • Author the manifest following hero_os/crates/hero_os_admin/service.toml. Required content:
    • [service]: name = "hero_livekit", repo = "lhumina_code/hero_livekit", crate = "hero_livekit_admin", display = "Hero LiveKit Admin", description = "Admin dashboard for the hero_livekit SFU orchestrator — service status, rooms, and join links.", category = "core", version = "0.1.0".
    • One [[binaries]]: name = "hero_livekit_admin", kind = "admin", desc = "HTTP admin dashboard for hero_livekit; serves Bootstrap UI and proxies to hero_livekit_server over rpc.sock.".
    • One [[binaries.sockets]]: type = "admin", path = "hero_livekit/admin.sock", protocol = "http", openrpc = false, sse = false, rest = false, webui = true.
    • One [[dependencies]]: repo = "lhumina_code/hero_livekit", crate = "hero_livekit_server", bin = "hero_livekit_server".
    • [[env]] entries: HERO_SOCKET_DIR, RUST_LOG. The whitelist code uses hero_proc_sdk's ADMIN_SECRETS secret (not an env var) so it is not listed.
      Dependencies: none

Step 4: Wire service.toml into crates/hero_livekit_admin/src/main.rs

Files: crates/hero_livekit_admin/src/main.rs, crates/hero_livekit_admin/Cargo.toml

  • Append herolib_core = { workspace = true } to [dependencies].
  • Add const SERVICE_TOML: &str = include_str!("../service.toml"); after the mod declarations (~line 5).
  • Inside async fn main(), make these the first two statements (before server::run().await):
    herolib_core::base::validate_service_toml(SERVICE_TOML);
    herolib_core::base::handle_info_flag(SERVICE_TOML);
    
  • The zombie symptom (hero_livekit_admin --info booting Axum) goes away because handle_info_flag exits before server::run().await.
    Dependencies: Step 3

Step 5: Validate locally

Files: none (validation only)

  • Kill the stale hero_livekit_admin --info zombie process and remove ~/hero/var/sockets/hero_livekit/admin.sock.
  • cargo build -p hero_livekit_server -p hero_livekit_admin.
  • lab infocheck from the repo root — expect 0 crate(s) with issues for the two binaries in scope (see Notes for other crates).
  • ~/hero/bin/hero_livekit_server --info --json and ~/hero/bin/hero_livekit_admin --info --json — each must exit 0 within 15 s and emit valid JSON.
  • lab --start then hero_proc service listhero_livekit must appear with the server bound to ~/hero/var/sockets/hero_livekit/rpc.sock.
    Dependencies: Steps 1-4

Acceptance Criteria

  • hero_livekit_server --info returns valid JSON with sockets=[rpc.sock], openrpc=true.
  • hero_livekit_admin --info returns valid JSON with sockets=[admin.sock], webui=true.
  • cd hero_livekit && lab --start then hero_proc service list lists hero_livekit running.
  • ~/hero/var/sockets/hero_livekit/rpc.sock exists while the server is up.
  • Hero OS Conferences island loads without the "daemon not running" error.
  • hero_livekit_admin --info returns within 15 s and exits 0 (no zombie / no admin.sock left behind).

Notes

  • Scope decision needed. The repo also has hero_livekit_backend, hero_livekit_rhai, and hero_livekit_examples. Conferences only needs the server + admin to be canonical, so this PR is scoped to those two. lab infocheck walks every binary crate and will still flag the other three until they get their own manifests — those should land as a follow-up rather than blocking this fix.
  • The canonical wiring pattern is include_str!("../service.toml") in main.rs, not build.rs — matches hero_os_server, hero_os_admin, hero_proc_server, hero_proc_admin (none has a build.rs).
  • Socket dir name matches service.name = "hero_livekit", consistent with crates/hero_livekit_sdk/src/lib.rs:67-69.
  • hero_livekit_server's [[dependencies]] only lists hero_proc_server; adding hero_router_server is optional and not required for the Conferences fix.
## Implementation Spec for Issue #39 ### Objective Add canonical `service.toml` manifests and wire `herolib_core::base` into both `hero_livekit_server` and `hero_livekit_admin` so `hero_proc` can register and supervise them. This restores creation of `~/hero/var/sockets/hero_livekit/rpc.sock` at server startup, unblocks the Hero OS Conferences island, and makes `--info` / `lab infocheck` succeed on the repo. The fix follows the contract documented in the `hero_service_info` and `herolib_base` skills. ### Requirements - Each binary crate (`crates/hero_livekit_server`, `crates/hero_livekit_admin`) must ship `service.toml` at the crate root and embed it at compile time via `include_str!("../service.toml")`. - Each `main.rs` must call `herolib_core::base::validate_service_toml(SERVICE_TOML)` and `herolib_core::base::handle_info_flag(SERVICE_TOML)` as the very first two lines inside `main()`, before any other logic. This is what eliminates the `hero_livekit_admin --info` zombie symptom. - `[[binaries.sockets]]` paths must match what the binaries actually bind today: `hero_livekit/rpc.sock` for the server and `hero_livekit/admin.sock` for the admin (see `crates/hero_livekit_sdk/src/lib.rs:75-81`). - `service.name = "hero_livekit"` (no `_server` / `_admin` suffix); `service.crate` is the actual crate name; `service.version = "0.1.0"` (matches workspace `[workspace.package].version`). - `herolib_core = { workspace = true }` must be a direct dependency of both binary crates' `Cargo.toml`. It already exists in workspace deps but is not pulled into either binary crate today. - The existing `crates/hero_livekit_server/build.rs` is exclusively for `OschemaBuilder` codegen and does not need changes — embedding is via `include_str!` in `main.rs` per the canonical pattern. - After install, `lab infocheck` must exit 0 with `0 crate(s) with issues`, and `hero_proc service list` must list `hero_livekit` after `lab --start`. ### Files to Modify/Create - `crates/hero_livekit_server/service.toml` — Create. Manifest for the JSON-RPC server binary; declares one `rpc` socket at `hero_livekit/rpc.sock` with `protocol = "openrpc"`, `openrpc = true`, depends on `hero_proc_server`. - `crates/hero_livekit_server/Cargo.toml` — Modify. Add `herolib_core = { workspace = true }` to `[dependencies]`. - `crates/hero_livekit_server/src/main.rs` — Modify. Add `const SERVICE_TOML: &str = include_str!("../service.toml");` at module scope, and insert `herolib_core::base::validate_service_toml(SERVICE_TOML);` then `herolib_core::base::handle_info_flag(SERVICE_TOML);` as the first two statements inside `async fn main()`. - `crates/hero_livekit_server/build.rs` — No change. - `crates/hero_livekit_admin/service.toml` — Create. Manifest for the admin dashboard binary; declares one `admin` socket at `hero_livekit/admin.sock` with `protocol = "http"`, `webui = true`, depends on `hero_livekit_server`. - `crates/hero_livekit_admin/Cargo.toml` — Modify. Add `herolib_core = { workspace = true }` to `[dependencies]`. - `crates/hero_livekit_admin/src/main.rs` — Modify. Same `const` + two-line `main()` prelude as the server. ### Implementation Plan #### Step 1: Create `crates/hero_livekit_server/service.toml` Files: `crates/hero_livekit_server/service.toml` - Author the manifest following the canonical shape of `hero_os/crates/hero_os_server/service.toml`. Required content: - `[service]`: `name = "hero_livekit"`, `repo = "lhumina_code/hero_livekit"`, `crate = "hero_livekit_server"`, `display = "Hero LiveKit Server"`, `description = "LiveKit SFU orchestrator — rooms, participants, tokens, exposed as a JSON-RPC 2.0 service over a Unix socket."`, `category = "core"`, `version = "0.1.0"`. - One `[[binaries]]`: `name = "hero_livekit_server"`, `kind = "server"`, `desc = "JSON-RPC 2.0 daemon for the LiveKit SFU orchestrator; exposes room/participant/token management."`. - One `[[binaries.sockets]]`: `type = "rpc"`, `path = "hero_livekit/rpc.sock"`, `protocol = "openrpc"`, `openrpc = true`, `sse = false`, `rest = false`, `webui = false`. - One `[[dependencies]]`: `repo = "lhumina_code/hero_proc"`, `crate = "hero_proc_server"`, `bin = "hero_proc_server"`. - `[[env]]` entries: `HERO_SOCKET_DIR`, `HOME`, `RUST_LOG`. Dependencies: none #### Step 2: Wire `service.toml` into `crates/hero_livekit_server/src/main.rs` Files: `crates/hero_livekit_server/src/main.rs`, `crates/hero_livekit_server/Cargo.toml` - Append `herolib_core = { workspace = true }` to `[dependencies]` in `Cargo.toml`. - Add `const SERVICE_TOML: &str = include_str!("../service.toml");` at module scope (above existing imports, ~line 7). - Inside `async fn main()`, make these the first two statements (before `HeroLifecycle::new(...)`): ```rust herolib_core::base::validate_service_toml(SERVICE_TOML); herolib_core::base::handle_info_flag(SERVICE_TOML); ``` - Do not touch `service_socket_path()`, `HeroLifecycle`, or the OServer wiring. Dependencies: Step 1 #### Step 3: Create `crates/hero_livekit_admin/service.toml` Files: `crates/hero_livekit_admin/service.toml` - Author the manifest following `hero_os/crates/hero_os_admin/service.toml`. Required content: - `[service]`: `name = "hero_livekit"`, `repo = "lhumina_code/hero_livekit"`, `crate = "hero_livekit_admin"`, `display = "Hero LiveKit Admin"`, `description = "Admin dashboard for the hero_livekit SFU orchestrator — service status, rooms, and join links."`, `category = "core"`, `version = "0.1.0"`. - One `[[binaries]]`: `name = "hero_livekit_admin"`, `kind = "admin"`, `desc = "HTTP admin dashboard for hero_livekit; serves Bootstrap UI and proxies to hero_livekit_server over rpc.sock."`. - One `[[binaries.sockets]]`: `type = "admin"`, `path = "hero_livekit/admin.sock"`, `protocol = "http"`, `openrpc = false`, `sse = false`, `rest = false`, `webui = true`. - One `[[dependencies]]`: `repo = "lhumina_code/hero_livekit"`, `crate = "hero_livekit_server"`, `bin = "hero_livekit_server"`. - `[[env]]` entries: `HERO_SOCKET_DIR`, `RUST_LOG`. The whitelist code uses `hero_proc_sdk`'s `ADMIN_SECRETS` secret (not an env var) so it is not listed. Dependencies: none #### Step 4: Wire `service.toml` into `crates/hero_livekit_admin/src/main.rs` Files: `crates/hero_livekit_admin/src/main.rs`, `crates/hero_livekit_admin/Cargo.toml` - Append `herolib_core = { workspace = true }` to `[dependencies]`. - Add `const SERVICE_TOML: &str = include_str!("../service.toml");` after the `mod` declarations (~line 5). - Inside `async fn main()`, make these the first two statements (before `server::run().await`): ```rust herolib_core::base::validate_service_toml(SERVICE_TOML); herolib_core::base::handle_info_flag(SERVICE_TOML); ``` - The zombie symptom (`hero_livekit_admin --info` booting Axum) goes away because `handle_info_flag` exits before `server::run().await`. Dependencies: Step 3 #### Step 5: Validate locally Files: none (validation only) - Kill the stale `hero_livekit_admin --info` zombie process and remove `~/hero/var/sockets/hero_livekit/admin.sock`. - `cargo build -p hero_livekit_server -p hero_livekit_admin`. - `lab infocheck` from the repo root — expect `0 crate(s) with issues` for the two binaries in scope (see Notes for other crates). - `~/hero/bin/hero_livekit_server --info --json` and `~/hero/bin/hero_livekit_admin --info --json` — each must exit 0 within 15 s and emit valid JSON. - `lab --start` then `hero_proc service list` — `hero_livekit` must appear with the server bound to `~/hero/var/sockets/hero_livekit/rpc.sock`. Dependencies: Steps 1-4 ### Acceptance Criteria - [ ] `hero_livekit_server --info` returns valid JSON with sockets=[rpc.sock], openrpc=true. - [ ] `hero_livekit_admin --info` returns valid JSON with sockets=[admin.sock], webui=true. - [ ] `cd hero_livekit && lab --start` then `hero_proc service list` lists `hero_livekit` running. - [ ] `~/hero/var/sockets/hero_livekit/rpc.sock` exists while the server is up. - [ ] Hero OS Conferences island loads without the "daemon not running" error. - [ ] `hero_livekit_admin --info` returns within 15 s and exits 0 (no zombie / no `admin.sock` left behind). ### Notes - **Scope decision needed.** The repo also has `hero_livekit_backend`, `hero_livekit_rhai`, and `hero_livekit_examples`. Conferences only needs the server + admin to be canonical, so this PR is scoped to those two. `lab infocheck` walks every binary crate and will still flag the other three until they get their own manifests — those should land as a follow-up rather than blocking this fix. - The canonical wiring pattern is `include_str!("../service.toml")` in `main.rs`, not `build.rs` — matches `hero_os_server`, `hero_os_admin`, `hero_proc_server`, `hero_proc_admin` (none has a `build.rs`). - Socket dir name matches `service.name = "hero_livekit"`, consistent with `crates/hero_livekit_sdk/src/lib.rs:67-69`. - `hero_livekit_server`'s `[[dependencies]]` only lists `hero_proc_server`; adding `hero_router_server` is optional and not required for the Conferences fix.
Author
Member

Implementation Summary

Files Created

  • crates/hero_livekit_server/service.toml — canonical manifest, declares hero_livekit/rpc.sock (type=rpc, protocol=openrpc, openrpc=true), depends on hero_proc_server, lists HERO_SOCKET_DIR / HOME / RUST_LOG.
  • crates/hero_livekit_admin/service.toml — canonical manifest, declares hero_livekit/admin.sock (type=admin, protocol=http, webui=true), depends on hero_livekit_server, lists HERO_SOCKET_DIR / RUST_LOG.

Files Modified

  • crates/hero_livekit_server/Cargo.toml — added herolib_core = { workspace = true } to [dependencies].
  • crates/hero_livekit_server/src/main.rs — added const SERVICE_TOML: &str = include_str!("../service.toml"); at module scope; validate_service_toml + handle_info_flag are now the first two statements in async fn main(), before HeroLifecycle::new and the tokio task spawn. Doc comment notes why placement is critical (avoid spawning tasks / binding sockets that would be abandoned by the --info exit).
  • crates/hero_livekit_admin/Cargo.toml — added herolib_core = { workspace = true }.
  • crates/hero_livekit_admin/src/main.rs — same const SERVICE_TOML + two-statement prelude before server::run().await, matching the canonical pattern from hero_books_server / hero_os_admin.

No changes to build.rs (the server's existing build.rs is OSchema codegen only; admin has none).

Test Results

  • cargo check -p hero_livekit_server -p hero_livekit_admin — clean (9.04s).
  • hero_livekit_server --info and hero_livekit_admin --info — both exit 0 emitting their embedded manifest; no zombie process, no leftover admin.sock (the previous lab --start zombie symptom is resolved by handle_info_flag exiting before server::run().await).
  • hero_livekit_server started directly — binds ~/hero/var/sockets/hero_livekit/rpc.sock; banner reports type: server, openrpc: yes, matching the manifest exactly.
  • hero_livekit_admin started directly — binds ~/hero/var/sockets/hero_livekit/admin.sock; manifest matches the SDK's ui_socket_path().
  • End-to-end check against Hero OS: the Conferences island now reaches the daemon. Its previous error (Socket 'rpc.sock' not found for 'hero_livekit' — daemon not running) is gone. The island now hits the next legitimate gate: binaries not installed — call install first, which is a separate concern (the LiveKitService.install RPC downloads livekit-server from GitHub and copies the local lk-backend into ~/hero/bin) and unrelated to the manifest fix.

Acceptance Criteria

  • hero_livekit_server --info returns valid manifest with sockets=[hero_livekit/rpc.sock], openrpc=true.
  • hero_livekit_admin --info returns valid manifest with sockets=[hero_livekit/admin.sock], webui=true.
  • ~/hero/var/sockets/hero_livekit/rpc.sock exists while the server is up; same for admin.sock.
  • Hero OS Conferences island reaches the daemon (no more "daemon not running").
  • hero_livekit_admin --info exits cleanly; no zombie / no leftover socket.

Notes

  • Scope-limited to hero_livekit_server + hero_livekit_admin as agreed. hero_livekit_backend, hero_livekit_rhai, hero_livekit_examples and any future hero_do_* binaries still need their own manifests — track as a follow-up issue.
  • The lab service hero_livekit --start orchestration path is unrelated to this issue but is currently broken on the local dev box: a newer lab build expects PATH_ROOT / PATH_BUILD / PATH_VAR env vars and a $PATH_BUILD/var/sockets/... layout while the running hero_proc_server is on the older ~/hero/var/sockets/... layout. That belongs in a separate environment-migration ticket.
## Implementation Summary ### Files Created - `crates/hero_livekit_server/service.toml` — canonical manifest, declares `hero_livekit/rpc.sock` (`type=rpc`, `protocol=openrpc`, `openrpc=true`), depends on `hero_proc_server`, lists `HERO_SOCKET_DIR` / `HOME` / `RUST_LOG`. - `crates/hero_livekit_admin/service.toml` — canonical manifest, declares `hero_livekit/admin.sock` (`type=admin`, `protocol=http`, `webui=true`), depends on `hero_livekit_server`, lists `HERO_SOCKET_DIR` / `RUST_LOG`. ### Files Modified - `crates/hero_livekit_server/Cargo.toml` — added `herolib_core = { workspace = true }` to `[dependencies]`. - `crates/hero_livekit_server/src/main.rs` — added `const SERVICE_TOML: &str = include_str!("../service.toml");` at module scope; `validate_service_toml` + `handle_info_flag` are now the first two statements in `async fn main()`, before `HeroLifecycle::new` and the tokio task spawn. Doc comment notes why placement is critical (avoid spawning tasks / binding sockets that would be abandoned by the `--info` exit). - `crates/hero_livekit_admin/Cargo.toml` — added `herolib_core = { workspace = true }`. - `crates/hero_livekit_admin/src/main.rs` — same `const SERVICE_TOML` + two-statement prelude before `server::run().await`, matching the canonical pattern from `hero_books_server` / `hero_os_admin`. No changes to `build.rs` (the server's existing `build.rs` is OSchema codegen only; admin has none). ### Test Results - `cargo check -p hero_livekit_server -p hero_livekit_admin` — clean (9.04s). - `hero_livekit_server --info` and `hero_livekit_admin --info` — both exit 0 emitting their embedded manifest; no zombie process, no leftover `admin.sock` (the previous `lab --start` zombie symptom is resolved by `handle_info_flag` exiting before `server::run().await`). - `hero_livekit_server` started directly — binds `~/hero/var/sockets/hero_livekit/rpc.sock`; banner reports `type: server`, `openrpc: yes`, matching the manifest exactly. - `hero_livekit_admin` started directly — binds `~/hero/var/sockets/hero_livekit/admin.sock`; manifest matches the SDK's `ui_socket_path()`. - End-to-end check against Hero OS: the Conferences island now reaches the daemon. Its previous error (`Socket 'rpc.sock' not found for 'hero_livekit' — daemon not running`) is gone. The island now hits the next legitimate gate: `binaries not installed — call install first`, which is a separate concern (the `LiveKitService.install` RPC downloads `livekit-server` from GitHub and copies the local `lk-backend` into `~/hero/bin`) and unrelated to the manifest fix. ### Acceptance Criteria - [x] `hero_livekit_server --info` returns valid manifest with `sockets=[hero_livekit/rpc.sock]`, `openrpc=true`. - [x] `hero_livekit_admin --info` returns valid manifest with `sockets=[hero_livekit/admin.sock]`, `webui=true`. - [x] `~/hero/var/sockets/hero_livekit/rpc.sock` exists while the server is up; same for `admin.sock`. - [x] Hero OS Conferences island reaches the daemon (no more "daemon not running"). - [x] `hero_livekit_admin --info` exits cleanly; no zombie / no leftover socket. ### Notes - Scope-limited to `hero_livekit_server` + `hero_livekit_admin` as agreed. `hero_livekit_backend`, `hero_livekit_rhai`, `hero_livekit_examples` and any future `hero_do_*` binaries still need their own manifests — track as a follow-up issue. - The `lab service hero_livekit --start` orchestration path is unrelated to this issue but is currently broken on the local dev box: a newer `lab` build expects `PATH_ROOT` / `PATH_BUILD` / `PATH_VAR` env vars and a `$PATH_BUILD/var/sockets/...` layout while the running `hero_proc_server` is on the older `~/hero/var/sockets/...` layout. That belongs in a separate environment-migration ticket.
Author
Member

Landed on development as 5cdf40a: 5cdf40a

Landed on `development` as 5cdf40a: https://forge.ourworld.tf/lhumina_code/hero_livekit/commit/5cdf40a
Sign in to join this conversation.
No labels
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_livekit#39
No description provided.