feat(service_livekit): per-user livekit ports via hero_cfg.toml [livekit] #176
No reviewers
Labels
No labels
prio_critical
prio_low
type_bug
type_contact
type_issue
type_lead
type_question
type_story
type_task
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
lhumina_code/hero_skills!176
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "feat/livekit-per-user-ports-auto"
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?
Closes #175. Supersedes #174 (which is now closed — the forward-compat 1-liner from that PR is folded into this single commit).
Companion to hero_livekit#34.
Summary
Single file changed (
tools/modules/services/service_livekit.nu). Two coordinated edits:svx_lk_read_hero_cfg_livekit— reads[livekit]section from~/hero/cfg/hero_cfg.toml, returns{}if missing.svx_lk_install_and_configurereads the section once and passes the values (with0fallback for missing fields) intocfg_params'slivekit_port/rtc_tcp_port/backend_port.Makes service_livekit.nu both (a) forward-compatible with hero_livekit#34's required
rtc_tcp_portparam, and (b) per-user-aware via cfg.toml.Architecture
hero_cfg.tomlis the durable per-user source. Already carries[mycelium]; adding[livekit]follows the existing pattern (service_router.nu/service_collab.nuread sections from the same file).runtime.jsonis correctly modeled as a derived cache. The wipe insvx_lk_wipe_stale_configsstays untouched — it correctly forces a clean slate on inconsistency. Per-user values survive wipes because the nextservice_livekit startre-readshero_cfg.tomland re-derives runtime.json from there.An earlier draft (#174) considered preserving runtime.json across wipes — that was the wrong layer to fix it and was dropped.
Behavior
[livekit][livekit][livekit]per userOperator workflow on a multi-user box
Then
service_livekit startand never touch it again.Compatibility matrix with hero_livekit binary versions
Land this PR at-or-before the hero_livekit binary is upgraded on operator boxes.
What's intentionally NOT in this PR
An allocator that auto-writes the
[livekit]section. The section is operator-managed today; if a tool to allocate non-overlapping triples becomes useful, it can be added as a separate small helper (e.g.hero_user_livekit_alloc <user>) — kept OUT ofmulti_user_add, which is mycelium-focused and shouldn't carry livekit-specific allocation logic.Test plan
service_livekit startwith no[livekit]section: defaults apply, single-user setup unchangedservice_livekit startwith[livekit]section: values flow into configure RPC → runtime.json → yaml → livekit-server bindservice_livekit start --reset(which wipes runtime.json): next start re-reads cfg.toml[livekit], values reconstructed5500b7b10eto489b49d584feat(service_livekit): read [livekit] section from hero_cfg.toml for per-user portsto feat(service_livekit): per-user livekit ports via hero_cfg.toml [livekit]