Livekit single crate to start, stop, install, etc in hero_proc services #1
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
see https://forge.ourworld.tf/lhumina_code/hero_skills/src/branch/development/claude/skills/hero_proc_service_selfstart
Implementation Spec for Issue #1
Objective
Wire up the auto-generated
hero_livekitsingle-binary orchestrator so it compiles and works with hero_proc for lifecycle management (--start/--stop). The binary already exists atcrates/hero_livekit/src/bin/hero_livekit.rs(generated bysingle_bin()in build.rs) but is disabled (autobins = false, no[[bin]]section, missing dependencies).Requirements
hero_livekitbinary by adding[[bin]]section and required dependencieshero_livekit_uiinto a library + binary so the single-binary can embed the UI routerhero_livekitbinary supports--start(register with hero_proc),--stop(stop via hero_proc), and plain foreground modeFiles to Modify/Create
crates/hero_livekit_ui/src/lib.rs(new) -- Library exportingbuild_router()andUiMetacrates/hero_livekit_ui/src/main.rs-- Simplify to call librarycrates/hero_livekit_ui/Cargo.toml-- Add[lib]sectioncrates/hero_livekit/Cargo.toml-- Add[[bin]]section and dependenciesMakefile-- Addhero_livekitto install/installdev targetsImplementation Plan
Step 1: Refactor hero_livekit_ui into lib + bin
Step 2: Wire up hero_livekit binary
Step 3: Build and test
Acceptance Criteria
cargo build -p hero_livekit --bin hero_livekitcompiles successfullyhero_livekit --helpshows --start, --stop, --contexts flagshero_livekit_uistandalone binary still worksTest Results
The hero_livekit binary builds and all workspace tests pass. The --help output confirms --start, --stop, --contexts, --seed-dir, --seed-domains flags are available.
Implementation Summary
Changes Made
hero_livekit_ui refactored into lib + bin:
crates/hero_livekit_ui/src/lib.rsexportingUiMeta,build_router(),bind_unix_socket(),ui_socket_path(),service_socket_path()crates/hero_livekit_ui/src/main.rsto use the library[lib]section tocrates/hero_livekit_ui/Cargo.tomlWhitelistState::new_blocking()for synchronous initialization in embedded modehero_livekit binary enabled:
[[bin]]section and dependencies (hero_rpc_server, hero_livekit_ui, clap, tracing-subscriber, axum) tocrates/hero_livekit/Cargo.tomlautobins = falsehero_livekit_uias workspace dependencyMakefile updated:
hero_livekitbinary to install/installdev targetsResult
The
hero_livekitbinary now supports the hero_proc_service_selfstart pattern:hero_livekit --startregisters with hero_proc and startshero_livekit --stopstops via hero_prochero_livekit(no flags) runs foreground (hero_proc launches it this way)hero_livekit_uibinary continues to work independentlyPull request opened: #28
This PR implements the changes discussed in this issue.