Migrate all repos to directory socket convention #116
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?
Background
The Hero stack uses two socket conventions:
$HERO_SOCKET_DIR/hero_<name>_server.sock$HERO_SOCKET_DIR/hero_<name>/rpc.sock+hero_<name>/ui.sockhero_agent and hero_aibroker were migrated by devops. The skills docs were updated in PR #73 on hero_skills. But ~50% of repos still reference the old flat convention.
Repos to migrate
Convention
Env var cascade:
$HERO_<NAME>_SOCKET→$HERO_SOCKET_DIR/<name>/rpc.sock→$HOME/hero/var/sockets/<name>/rpc.sockReference: hero_agent commit 6e4b9e4, hero_skills PR #73
Compliance Audit: hero_browser_mcp
Audited the hero_browser_mcp repository against two Hero standards: Hero Sockets and CLI-managed Service Selfstart.
Pattern 1 — Hero Sockets ✅
hero_browser/(nothero_browser_server/orhero_browser_mcp/)rpc.sockandui.sockpresent under$HERO_SOCKET_DIR/hero_browser/rpc.sock:POST /rpc,GET /openrpc.json,GET /health,GET /.well-known/heroservice.jsonui.sockhas/healthand/.well-known/heroservice.jsonPattern 2 — CLI-managed Service Selfstart ✅
hero_browserowns--startand--stop--startcorrectly callsrestart_service()(idempotent — safe whether service is running or stopped)--stopcallsstop_service()hero_browser_server) and UI binary (hero_browser_ui) have no lifecycle flags, noclap, no direct process management.is_process(),kill_other(socket/port cleanup), and health checks configuredruntarget correctly callshero_browser --startResult
100% compliant — no issues found. No changes required.
https://forge.ourworld.tf/lhumina_code/hero_auth_archive
is now archived, is part of new proxy
hero_books compliance fixes for
hero_proc_service_selfstartpatternChecked the
hero_booksrepo against the CLI-managed service registration pattern and applied two fixes:Fix 1: Removed unused
hero_proc_sdkfromhero_books_server/Cargo.tomlThe server binary had
hero_proc_sdklisted as a dependency but never imported or used. Per the pattern, only the CLI binary (hero_books) should depend onhero_proc_sdk. Removed fromcrates/hero_books_server/Cargo.toml.Fix 2: Replaced empty
Some(vec![])/Some(String::new())withNoneinkill_otherAll three actions (
hero_books_server,hero_books_ui,hero_books_admin) had theirkill_otherfields set with empty placeholders instead ofNone:Note: UI and admin health checks correctly keep all check-type fields as
None—hero_proc'sHttphealth check only supports TCP host:port connections and has no HTTP-over-Unix-socket support, so there is no valid health check type forui.sockandweb_admin.sock. Those fall back to process liveness monitoring.Overall compliance: the repo was already well-aligned with the pattern —
--startcallsrestart_service(), all actions have.is_process()andkill_other, socket paths follow$HERO_SOCKET_DIR/hero_books/<type>.sock, and the Makefile correctly delegates to the CLI binary only.hero_foundry_ui — migration complete ✓
Repo: https://forge.ourworld.tf/lhumina_code/hero_foundry_ui
Branch:
developmentChanges applied
Socket path correction (
hero_foundry_ui_sdk,hero_foundry_ui_server)hero_foundry_ui/rpc.sock→hero_foundry/rpc.sockhero_foundry_ui/ui.sock→hero_foundry/ui.sock$HERO_SOCKET_DIR(fallback~/hero/var/sockets)Server binary implemented (
hero_foundry_ui_server/src/main.rs)POST /rpc(JSON-RPC 2.0),GET /openrpc.json,GET /health,GET /.well-known/heroservice.jsonUI binary — TCP → Unix socket (
hero_foundry_ui/src/main.rs).bind("127.0.0.1:8654")with.bind_uds(hero_foundry/ui.sock)GET /health+GET /.well-known/heroservice.jsonroutesNew CLI crate (
crates/hero_foundry/)hero_foundrywith--start(callshp.restart_service()) and--stopkill_other+is_process()+ health checksBuild files
Cargo.toml— addedcrates/hero_foundryworkspace memberbuildenv.sh— addedhero_foundrytoBINARIES, fixed socket path commentsMakefile—run→hero_foundry --start, newstop→hero_foundry --stop(removed zinit calls)cargo check --workspacepasses cleanly.