feat(scripting): add nu_service.nu + hero_do_hero_livekit Rhai binary #17
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "development_nu_service_rhai"
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?
Summary
scripts/nu_service.nu— two-action Nushell module (hero_livekit_server+hero_livekit_ui) delegating tohero_proc. Subcommandsinstall/start/stop/statuswith--root/--reset.crates/hero_livekit_rhai— new workspace crate producing thehero_do_hero_livekitbinary. Manual Rhai bindings (no macros) expose the fullLiveKitServiceOpenRPC surface plusRoom/Participant/AccessTokencustom types. Binary injectsSCRIPT_DIR/SCRIPT_FILE/ARGSinto the Rhai scope perrhai_bindings_cmd_path..rhaiscripts:01_status,02_list_rooms,03_create_delete_room,04_issue_token,05_full_lifecycle.Makefile+ rootbuild-rhai/install-rhai/run-rhai-examplepassthrough targets.Service lifecycle via hero_procandScripting (Rhai)sections.Related Issue
Closes #12
Changes
Nushell service module
scripts/nu_service.nu— follows thenu_servicetwo-action skill template.lk-backendis inSVX_BINARIES(copied byinstall) but not inSVX_ACTIONS— it is supervised byhero_livekit_server, not run standalone under hero_proc.New crate
crates/hero_livekit_rhaiCargo.toml— library +[[bin]] hero_do_hero_livekitwithrequired-features = ["rhai"].rhai = { version = "1", features = ["sync"], optional = true }.src/client.rs—LiveKitRhaiClientowning a tokioRuntime+Arc<LiveKitClient>so Rhai (sync) can call blocking methods.default_socket_path()cascades$HERO_SOCKET_DIR→~/hero/var/sockets/hero_livekit/rpc.sock.src/bindings.rs— manualregister_fn/register_type_with_name/register_getfor every OpenRPC method (install/configure/start/stop/restart/status/create_room/list_rooms/delete_room/list_participants/remove_participant/issue_token) and forRoom/Participant/AccessToken.src/lib.rs— publicregister(&mut Engine)+create_engine() -> Engine.src/main.rs— CLI entry:<script.rhai> [args...],<directory>,-istdin,--run <name>,--version,--help. Thread-localSCRIPT_DIR+run("other.rhai")helper.buildenv.sh—PROJECT_NAME/BINARIES/ALL_FEATURES/VERSION/PATCHLEVEL.Examples
examples/rhai/01_status.rhaiexamples/rhai/02_list_rooms.rhaiexamples/rhai/03_create_delete_room.rhaiexamples/rhai/04_issue_token.rhaiexamples/rhai/05_full_lifecycle.rhairhai_check-compliant (notry/catch, no decorative headers).Makefiles
crates/hero_livekit_rhai/Makefile—build,build-do,build-release,install,installdev,check,clippy,test,run-examples,example EXAMPLE=<file>.Makefile—build-rhai,install-rhai,run-rhai-examplepassthroughs; added to.PHONY.Docs
README.md— newService lifecycle via hero_procandScripting (Rhai)sections.Test Results
cargo check --workspace— PASScargo test --workspace— 8 passed, 0 failed, 3 ignored (pre-existing rustdoc examples)cargo test):nu scripts/nu_service.nu statusrequires a runninghero_proc.hero_do_hero_livekit examples/rhai/01_status.rhairequireshero_livekit_serveron$HERO_SOCKET_DIR/hero_livekit/rpc.sock.Out of scope
.claude/+CLAUDE.mddeliverables from the original issue were dropped per the maintainer's follow-up comment.room.set,participant.get, etc.) is not bound — the generatedLiveKitClientexposes only the 12LiveKitService.*methods today. If CRUD surfaces in future codegen, the Rhai layer can be extended in a follow-up.