feat(services): add service_office.nu #98

Merged
mahmoud merged 1 commit from development_service_office into development 2026-04-21 06:31:38 +00:00
Owner

Adds tools/modules/services/service_office.nu for the hero_office service (OnlyOffice connector — server + UI).

Mirrors the in-repo hero_office/scripts/nu_service.nu with four deliberate deviations:

  • install gains --reset.
  • install short-circuits via svc_bins_ok when both binaries are already in place.
  • start gains a svx_check_foundry soft-dep warning (hero_foundry socket missing → 6-line hint, non-fatal; server starts and passes health).
  • start grows the ship-house summary (rpc sock / ui sock / ui url / commands hints).

Env pass-through uses upsert inside is-not-empty guards — unset vars are truly omitted from the action env rather than passed as empty strings (OnlyOffice's config.rs treats unset as "use default"; an empty OO_SERVER_URL would shadow that default).

Smoke-tested end to end on Hetzner — full summary on the sub-issue. Soft-dep path fully validated (foundry absent → warning fires → service still healthy, both probes 200).

Closes #97
Refs #75

Adds `tools/modules/services/service_office.nu` for the `hero_office` service (OnlyOffice connector — server + UI). Mirrors the in-repo `hero_office/scripts/nu_service.nu` with four deliberate deviations: - `install` gains `--reset`. - `install` short-circuits via `svc_bins_ok` when both binaries are already in place. - `start` gains a `svx_check_foundry` soft-dep warning (hero_foundry socket missing → 6-line hint, non-fatal; server starts and passes health). - `start` grows the ship-house summary (rpc sock / ui sock / ui url / commands hints). Env pass-through uses `upsert` inside `is-not-empty` guards — unset vars are truly omitted from the action env rather than passed as empty strings (OnlyOffice's `config.rs` treats unset as "use default"; an empty `OO_SERVER_URL` would shadow that default). Smoke-tested end to end on Hetzner — full summary on the sub-issue. Soft-dep path fully validated (foundry absent → warning fires → service still healthy, both probes 200). Closes #97 Refs #75
Adds tools/modules/services/service_office.nu managing the hero_office
service lifecycle through hero_proc. Two registered actions
(hero_office_server, hero_office_ui) — no CLI binary.

Mirrors the in-repo lhumina_code/hero_office/scripts/nu_service.nu with
four deliberate deviations that match the newer modules in this tree:
- install gains a --reset flag.
- install short-circuits via svc_bins_ok when both binaries are already
  in place and neither --reset nor --update was passed.
- start gains a svx_check_foundry soft-dep preflight that warns (non-
  fatally) when the hero_foundry socket is absent. The server starts
  and passes health checks without it; only document read/write RPCs
  fail until foundry comes up, and the server retries on the next call.
- start grows the ship-house summary block (rpc sock, ui sock, ui url,
  commands hints).

Env pass-through uses `upsert` inside `is-not-empty` guards so unset
variables are OMITTED from the action env rather than passed as empty
strings — hero_office config.rs treats unset as "use default", and an
empty OO_SERVER_URL would shadow that default and break OnlyOffice
client URLs. hero_zero/services/hero_office.toml has unrelated bugs
(references a non-existent hero_office CLI binary, no [ui] block); the
nushell lifecycle path bypasses that TOML entirely, so the fix is
tracked as a separate hero_zero cleanup.

Smoke-tested end to end on Hetzner with --root (20 assertions): down-
path errors, install then short-circuit then --reset rebuild, start
with foundry absent (warning fires, service healthy), rpc.sock /health
+ /openrpc.json (6 methods), ui.sock redirect to /admin/, /admin/
returns 200 HTML, status record, idempotent start, 15 s observation
stable, start --reset reclaims both sockets across restart, clean
stop, post-stop status returns 'service not found', no leftover
processes or sockets.

Refs: #75
Closes: #97
mahmoud merged commit 67c9e9fada into development 2026-04-21 06:31:38 +00:00
mahmoud deleted branch development_service_office 2026-04-21 06:31:42 +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!98
No description provided.