feat(services): add service_collab.nu #85

Merged
mahmoud merged 1 commit from development_service_collab into development 2026-04-19 19:35:32 +00:00
Owner

Summary

Adds tools/modules/services/service_collab.nu, a lifecycle module for the hero_collab service (server + UI). Pure copy-rename of service_whiteboard.nu — confirms the minimal template is the new default for services with no special quirks.

Changes

  • tools/modules/services/service_collab.nu — new module (~275 lines). Registers hero_collab_server and hero_collab_ui as hero_proc actions plus the hero_collab service.
  • tools/modules/services/mod.nu — add export use service_collab.nu.

--root optional on every command; user-level default.

Why this was another copy-rename

  • Virtual workspace (no --workspace pass).
  • No serve subcommand (both main.rs launch directly).
  • No env placeholders (only RUST_LOG=info).
  • No dependency preflight (no depends_on in TOML, DB auto-created, sockets auto-cleaned).

Notes on defaults

hero_collab_server accepts optional --auth-mode, --livekit-*, --seed-dev-users flags (per crates/hero_collab_server/src/main.rs:38-95). The module passes none, selecting production-safe defaults: auth_mode=proxy (fail-closed — raw RPC without hero_proxy's X-Hero-User header is rejected, but the service starts cleanly and health checks pass) and LiveKit huddles disabled. Operators who need dev-mode auth or LiveKit add the flags to the action spec themselves.

Test Results

End-to-end smoke test on the Hetzner box. Every service_collab assertion passed.

# Assertion Result
1a–1c hero_proc-down error paths PASS
2a service_proc start --root healthy PASS
2b service_collab install --root produced 3 binaries PASS
2c service_collab start --reset --root registers + starts PASS
2d–2e Both rpc.sock and ui.sock live unix sockets PASS
2f–2g Both sockets accept HTTP PASS
2h status returns {name: hero_collab, state: running, restarts: 0} PASS
2i Idempotent start prints "already running" PASS
2j 15 s observation — no new restarts, state held running PASS
2k stop cleanly unregisters PASS
2l Post-stop status returns expected service 'hero_collab' not found PASS

Full per-step output on issue #84.

## Summary Adds `tools/modules/services/service_collab.nu`, a lifecycle module for the `hero_collab` service (server + UI). Pure copy-rename of `service_whiteboard.nu` — confirms the minimal template is the new default for services with no special quirks. ## Related - Closes #84 - Part of #75 ## Changes - `tools/modules/services/service_collab.nu` — new module (~275 lines). Registers `hero_collab_server` and `hero_collab_ui` as hero_proc actions plus the `hero_collab` service. - `tools/modules/services/mod.nu` — add `export use service_collab.nu`. `--root` optional on every command; user-level default. ### Why this was another copy-rename - Virtual workspace (no `--workspace` pass). - No `serve` subcommand (both `main.rs` launch directly). - No env placeholders (only `RUST_LOG=info`). - No dependency preflight (no `depends_on` in TOML, DB auto-created, sockets auto-cleaned). ### Notes on defaults `hero_collab_server` accepts optional `--auth-mode`, `--livekit-*`, `--seed-dev-users` flags (per `crates/hero_collab_server/src/main.rs:38-95`). The module passes none, selecting production-safe defaults: `auth_mode=proxy` (fail-closed — raw RPC without hero_proxy's `X-Hero-User` header is rejected, but the service starts cleanly and health checks pass) and LiveKit huddles disabled. Operators who need dev-mode auth or LiveKit add the flags to the action spec themselves. ## Test Results End-to-end smoke test on the Hetzner box. Every `service_collab` assertion passed. | # | Assertion | Result | |---|---|---| | 1a–1c | hero_proc-down error paths | PASS | | 2a | `service_proc start --root` healthy | PASS | | 2b | `service_collab install --root` produced 3 binaries | PASS | | 2c | `service_collab start --reset --root` registers + starts | PASS | | 2d–2e | Both `rpc.sock` and `ui.sock` live unix sockets | PASS | | 2f–2g | Both sockets accept HTTP | PASS | | 2h | `status` returns `{name: hero_collab, state: running, restarts: 0}` | PASS | | 2i | Idempotent `start` prints "already running" | PASS | | 2j | 15 s observation — no new restarts, state held `running` | PASS | | 2k | `stop` cleanly unregisters | PASS | | 2l | Post-stop `status` returns expected `service 'hero_collab' not found` | PASS | Full per-step output on issue #84.
Add a service_collab module that provides install | start | stop | status
lifecycle commands for hero_collab (hero_collab_server + hero_collab_ui)
through hero_proc.

Pure copy-rename of service_whiteboard.nu: virtual workspace so plain
cargo build covers all members, no `serve` subcommand, no env
placeholders, no dependency preflight. auth_mode defaults to proxy
(fail-closed, production-safe) and LiveKit huddles are off by default —
operators who need dev-mode auth or LiveKit must add the relevant clap
flags to the action spec manually.

#84
#75
mahmoud merged commit 5b31272649 into development 2026-04-19 19:35:32 +00:00
mahmoud deleted branch development_service_collab 2026-04-19 19:35:35 +00:00
Sign in to join this conversation.
No reviewers
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_skills!85
No description provided.