[nu-demo] Documentation index: heronu deployment flow, AI grounding chain, per-service gaps #23
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?
Why this issue
During the heronu nu-shell demo deploy (single TF Grid VM, no Docker), we re-learned the whole Hero stack the hard way — by trial, error, and tailing logs. Most of the friction was missing documentation rather than broken code; the architecture is clean, but devs and ops have no single reference for:
This issue is the map that points to every individual gap already filed, plus the canonical flow for each subsystem. Use it as the starting point; each row links to its own fix.
1. Deployment topology (nu-shell, single VM)
Key points most newcomers miss:
http://10.1.2.2:9988/hero_<svc>/<path>). There is no hero_proxy on port 6666 in nu-shell mode — that was a hero_zero (Docker) thing.rpc.sock= JSON-RPC 2.0,ui.sock= HTML dashboard + /api/*,rest.sock= REST (where applicable, e.g. hero_aibroker speaks OpenAI-compatible REST). The router-to-socket mapping is in hero_router's scanner (hero_router/src/scanner.rs) and follows thehero_socketsconvention. See https://forge.ourworld.tf/lhumina_code/hero_router/src/branch/development/CLAUDE.md.X-Hero-Context: <number>(or name). hero_router was previously overwriting it withstate.context— fix in lhumina_code/home#125.2. AI grounding chain — the whole flow
This is the path that makes "What is Hero OS?" come back with real docs_hero content instead of a hallucination:
Env vars the hero_agent_server action MUST set
AIBROKER_API_ENDPOINThttp://10.1.2.2:9988/hero_aibroker/rest/v1hero_zero/services/hero_agent.toml.HERO_AGENT_AIBROKER_MODELSclaude-haiku-4.5,claude-3-5-sonnet-latest,gpt-4o-miniOSIS_URLhttp://10.1.2.2:9988/hero_osis/uiOSIS_CONTEXTdefaultOPENROUTER_API_KEY(S)sk-or-v1-...These are missing from current
service_agent.nu(lhumina_code/home#135 — module doesn't even exist yet). Applied manually on heronu viahero_proc action set /home/driver/tmp_action.json.Gaps already filed on this chain
service_agent.numissing entirely (hero_agent not installable via service_install_all)OPENROUTER_API_KEYS(plural) with no fallback to singular--resetclobbers editstool_router.rsneedssearch_hero_docsin defaultalways_include; prompt.rs needs MANDATORY directive for hero_* questions ortool_choice=requiredplumbed through.3. libraries.txt → hero_books flow
hero_books indexes external markdown doc repos into the embedder on startup. Config at
$BOOKS_DIR/libraries.txt(onename URLper line):On startup: hero_books_server reads that file →
git cloneorgit pulleach repo → indexes all .md into embedder namespace=<name>→ serves viasearch.query. FORGEJO_TOKEN must be in env for private repos (onlyheroworked on heronu — the other three returned 404/auth; see open gap).4. WASM compression (lhumina_code/home#140 — completed on heronu)
Before: hero_os WASM shell = 211 MB debug build, ServeDir with runtime CompressionLayer. First page load ≥60 s on any real network.
After (merged in
development_mik_nu_demoon the VM, commits71abce9+e997afc):CARGO_TARGET_DIR/CARGO_BUILD_JOBSin bothinstall-assets-releaseandinstall/installdevtargets.dist-release-compressedtarget: builds WASM in release mode (wasm-opt -Oz), then generates*.wasm.br(brotli -q 11) and*.wasm.gz(gzip -9) sidecars alongside the raw WASM.hero_os_ui/src/main.rs: all fourServeDir+ twoServeFilenow call.precompressed_br().precompressed_gzip()— tower-http serves the sidecar automatically based onAccept-Encoding.CompressionLayerremoved (was doing work at request time; sidecars pre-compute it once).Verified over public gateway:
Combined reduction vs. old debug path: 211 MB → 1.8 MB = ~117×. Well inside the ≤8 MB budget for first paint.
5. The gap catalog (lhumina_code/home#122 – 147)
Every fix-in-place on heronu was paired with a
[nu-demo]issue so reviewers can opt in later. Full list:/Volumes/T7macOS path in dashboard.jswebfeature (WASM 404)~/.cargo/bin/dx_servervs plainOPENROUTER_API_KEYSplural with no singular fallback--resetreseeds modelsconfig.yml and clobbers operator edits<img>tags don't render despite webdav serving valid JPEGs6. Where this belongs once merged
docs_hero/collections/hero_os_guide/architecture.md— currently listshero_services,zinit,hero_shrimp. Needs rewrite:hero_zero,hero_proc,hero_agent,hero_routeradded to repo table; 4-crate OServer pattern documented; nu-shell deploy path alongside Docker.docs_hero/collections/hero_os_guide/services.md— "AI Assistant (Shrimp)" should become "AI Assistant (hero_agent)"; add hero_router, hero_proc, hero_logic, hero_db, hero_livekit, hero_collab, hero_slides, hero_whiteboard, hero_browser, hero_office, hero_codescalers, hero_books, hero_matrixchat. Supervisor is hero_proc, not zinit.docs_hero/collections/hero_os_guide/quickstart.md— add "Option B: direct nu-shell install on Linux VM" alongside the existing Docker path, pointing athero_skills install-all && hero_proc start ....hero_zero/README.mdor newhero_proc/OPS.md— the physical topology diagram and env-var table from §1 and §2.All edits staged on
development_mik_nu_demobranch — reviewers can opt in when ready.7. Quick reference card for the next dev who lands on a fresh heronu-style VM
Signed-off-by: mik-tf
Originally filed as home#148 on 2026-04-24 by mik-tf — moved to hero_demo as part of consolidating issue tracking.