feat(service_manager): Hero Service Manager + all 33 services (closes #90) #91
No reviewers
Labels
No labels
prio_critical
prio_low
type_bug
type_contact
type_issue
type_lead
type_question
type_story
type_task
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
lhumina_code/hero_router!91
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "development_mik_service_manager"
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?
Closes #90.
Plan posted upstream: #90 (comment)
What this delivers
A third Unix socket —
service.sockalongsiderpc.sockandui.sock— serving 14service.*JSON-RPC methods over its own OpenRPC domain. Wrapshero_proc_sdkplus a build/install pipeline behind agent-introspectable methods.RPC surface (
service.*)list/inspect/status/health/build/install/start/stop/restart/delete/upgrade/verify/logs/troubleshoot. Spec atstatic/service_manager.openrpc.json, served onservice.sock GET /openrpc.json.ServiceDefinition — pure data with typed extension points
BindStrategy/Extra/InstallPolicy/ArgSource/EnvSource/Resolver. Adding a new service is one file underservice_manager/services/<name>.rsplus one line inservices::all()— no new code paths.Coverage — every Hero service (33 ports)
Every
service_<name>.numodule underhero_skills/nutools/modules/services/is represented in the registry:Documented exceptions (in
services/mod.rs):hero_proc— circular: the manager is a hero_proc client, can't supervise its own supervisor.hero_onlyoffice— Docker container; engine doesn't issuedocker runactions yet.hero_do— installer-only nu module; no daemon to supervise.service_core.nu— empty meta-module.Source vs download — both first-class
InstallPolicy::Either { asset_suffix }is the default. ELF-magic verification, freshness check (catches "rebuilt but supervisor running old binary"), atomic rename + chmod. Source path shells out tocargo build --releasein the service's checkout under$CODEROOT.Env resolution
Static("...")— literalFromCallerEnv("KEY", "default")— from manager's process env (mirrors operator-shell env-passthrough that nu modules use today; wired into hero_agent / hero_claude / hero_office / hero_proxy / hero_shrimp)FromHeroProcSecret("KEY")— stub; reserved for runtime-side resolution perhero_proc_metaResolved(Resolver::*)— typed computed values (sockets, ports, paths, mycelium addr)CLI mirrors the agent
hero_router service <op>connects toservice.sockover UDS — same dispatcher path as the agent, no in-process shortcut.Documentation (#90 deliverables)
crates/hero_router/docs/service_manager/README.md— developer guidecrates/hero_router/docs/service_manager/migration.md— 4-phase plan from nu → managercrates/hero_router/docs/service_manager/removal.md— strict bottom-up deletion orderWorkspace gate
cargo fmt --check✅cargo clippy -p hero_router --all-targets -- -D warnings✅cargo build -p hero_router --release✅cargo test -p hero_router— 125 tests (9 dispatcher e2e + 11 unit + 105 pre-existing) ✅Test plan
hero_router service --help) lists all 13 opslist_includes_full_service_settest fails if any documented service is missinginstall / start / health / troubleshooton herocifeedback_no_direct_push_except_hero_demo.mdPer-service caveats (search
Limitation:inservices/*.rs)Some nu modules paper over wrinkles the engine doesn't yet model:
Extra::OnnxRuntime, but install is operator-side today)--split)BindStrategy::Myceliumdeclared but engine treats as Loopback)The migration plan (Phase 2 — feature parity) tracks closing each gap as a follow-up issue. Until then, the nu modules remain the production path for the affected services and the manager handles the simple-shape majority.
Out-of-scope follow-ups
Tracked in
docs/service_manager/migration.md:Extra::OnnxRuntime)BindStrategy::Myceliumengine support--splitmother/childui.sockSigned-off-by: mik-tf
feat(service_manager): Hero Service Manager subsystem on service.sock (#90)to feat(service_manager): Hero Service Manager + all 33 services (closes #90)Superseded by v2
Per Kristof's redirection (full discussion on issue #90): the
ServiceDefinitionschema + interpreter pattern was over-engineered. Each service should be Rust code that useshero_proc_sdk+ shared helpers directly — like the existing nu modules, just in Rust.This PR is being closed. The work continues on
development_mik_service_manager_v2, keeping ~60% of this PR (third socket, dispatcher, helpers, docs, OpenRPC spec, CLI subcommand) and rewriting the per-service files asHeroServicetrait impls.Will open a fresh PR shortly.
Pull request closed