hero_mail — bring repo up to canonical Hero layout (buildenv, build_lib shim, build-linux workflow, license, README socket-path typo) #1

Open
opened 2026-04-28 14:30:48 +00:00 by ashraf · 0 comments
Member

Bring hero_mail up to canonical Hero layout

Companion issue to lhumina_code/hero_skills #158 (service_mail.nu lifecycle module). The Nushell skill module landed and works against the current binaries, but the hero_mail repo itself is missing several canonical Hero conventions — these don't block service_mail.nu but do affect CI / release / cross-tree consistency.

Items

  • Add buildenv.sh (or scripts/buildenv.sh) declaring PROJECT_NAME, BINARIES, VERSION for the standard build_lib.sh flow. Mirrors the convention used by hero_browser, hero_books, hero_livekit, etc.
  • Add scripts/build_lib.sh symlink/shim so the standard CI / release helpers can drive the build the same way they do for sibling repos.
  • Add .forgejo/workflows/build-linux.yaml so tagged releases publish prebuilt Linux binaries (amd64 musl at minimum). See the forge-release-workflow skill / sibling repos for the canonical shape.
  • Relicense to Apache-2.0. The repo currently ships under MIT; the rest of the Hero workspace is Apache-2.0. Maintainer call but worth resolving before downstream packaging.
  • Fix README socket-path documentation. README references ~/.hero/var/sockets/hero_mail_*.sock (note the leading dot before hero/). The actual binaries default to ~/hero/var/sockets/hero_mail_*.sock (no dot) per crates/hero_mail_server/src/main.rs::default_socket_path and crates/hero_mail_ui/src/main.rs::default_ui_socket_path. Update the README to the correct paths, and ideally to the canonical Hero per-service-subdir layout (~/hero/var/sockets/hero_mail/{rpc,ui}.sock) — the latter is what service_mail.nu pins via --bind flags today.
  • (Optional) Make canonical socket layout the default. If the binaries default to ~/hero/var/sockets/hero_mail/rpc.sock and ~/hero/var/sockets/hero_mail/ui.sock instead of the current flat layout, the --bind / --server overrides currently in service_mail.nu can be dropped entirely.

Why these matter

Without buildenv.sh + build_lib.sh shim, hero_mail can't be built/released through the same CI path as the rest of Hero — every operator has to know to use cargo build --workspace directly. License inconsistency surfaces at redistribution time. README typo wastes operator time when troubleshooting socket connections.

Out of scope

Stalwart integration itself is tracked separately. This issue is purely about repo-layout / packaging conventions.

## Bring `hero_mail` up to canonical Hero layout Companion issue to [`lhumina_code/hero_skills` #158](https://forge.ourworld.tf/lhumina_code/hero_skills/issues/158) (`service_mail.nu` lifecycle module). The Nushell skill module landed and works against the current binaries, but the `hero_mail` repo itself is missing several canonical Hero conventions — these don't block `service_mail.nu` but do affect CI / release / cross-tree consistency. ### Items - [ ] **Add `buildenv.sh` (or `scripts/buildenv.sh`)** declaring `PROJECT_NAME`, `BINARIES`, `VERSION` for the standard `build_lib.sh` flow. Mirrors the convention used by `hero_browser`, `hero_books`, `hero_livekit`, etc. - [ ] **Add `scripts/build_lib.sh` symlink/shim** so the standard CI / release helpers can drive the build the same way they do for sibling repos. - [ ] **Add `.forgejo/workflows/build-linux.yaml`** so tagged releases publish prebuilt Linux binaries (amd64 musl at minimum). See the `forge-release-workflow` skill / sibling repos for the canonical shape. - [ ] **Relicense to Apache-2.0.** The repo currently ships under MIT; the rest of the Hero workspace is Apache-2.0. Maintainer call but worth resolving before downstream packaging. - [ ] **Fix README socket-path documentation.** README references `~/.hero/var/sockets/hero_mail_*.sock` (note the leading dot before `hero/`). The actual binaries default to `~/hero/var/sockets/hero_mail_*.sock` (no dot) per `crates/hero_mail_server/src/main.rs::default_socket_path` and `crates/hero_mail_ui/src/main.rs::default_ui_socket_path`. Update the README to the correct paths, and ideally to the canonical Hero per-service-subdir layout (`~/hero/var/sockets/hero_mail/{rpc,ui}.sock`) — the latter is what `service_mail.nu` pins via `--bind` flags today. - [ ] **(Optional) Make canonical socket layout the default.** If the binaries default to `~/hero/var/sockets/hero_mail/rpc.sock` and `~/hero/var/sockets/hero_mail/ui.sock` instead of the current flat layout, the `--bind` / `--server` overrides currently in `service_mail.nu` can be dropped entirely. ### Why these matter Without `buildenv.sh` + `build_lib.sh` shim, hero_mail can't be built/released through the same CI path as the rest of Hero — every operator has to know to use `cargo build --workspace` directly. License inconsistency surfaces at redistribution time. README typo wastes operator time when troubleshooting socket connections. ### Out of scope Stalwart integration itself is tracked separately. This issue is purely about repo-layout / packaging conventions.
Sign in to join this conversation.
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_mail#1
No description provided.