service_livekit.nu: read [livekit] section from hero_cfg.toml for per-user ports #175
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#175
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?
Context
hero_livekit#34 makes
rtc_tcp_portconfigurable via runtime.json + configure RPC. hero_skills#173 addsrtc_tcp_port: 0to the configure call so it stops failing.With both of those, the wrapper can hold per-user TCP-RTC ports — but service_livekit.nu always passes 0, so multi-user setups fall back to default 7881 (collision). Operators can manually call configure RPC via curl with explicit ports (the bypass workaround we used during the multi-user dev box debugging), but those values get destroyed on the next
--resetor stale-config wipe.Architecture
The right durable per-user source is
hero_cfg.toml. It already carries[mycelium]; adding[livekit]follows the established pattern (service_router.nu / service_collab.nu read sections from the same file).runtime.jsonunder~/hero/var/hero_livekit/is correctly modeled as a derived cache. The wipe forces it regenerated on inconsistency — that intent is preserved. Values survive wipes because the nextservice_livekit startre-readshero_cfg.tomland re-derivesruntime.jsonfrom there.Change
In
service_livekit.nu:svx_lk_read_hero_cfg_livekit— reads[livekit]section from~/hero/cfg/hero_cfg.toml, returns{}if missing.svx_lk_install_and_configure, replace hardcoded0placeholders forlivekit_port/rtc_tcp_port/backend_portwith values read from the section. Each field still defaults to 0 ("keep current / use default") if absent.Behavior
[livekit][livekit][livekit]per userWhat this issue does NOT cover
Per-user port allocation policy. The
[livekit]section is operator-managed today. If automating it becomes useful, that's a separate, optional helper (e.g.hero_user_livekit_alloc <user>) — out of scope for this issue and intentionally NOT bolted ontomulti_user_add(which stays mycelium-focused, in pattern with the rest of the codebase).