Hero OS Self-Documenting Platform — Built-in Book, Settings UI, AI-Guided Configuration #31
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?
Vision
Hero OS should be self-documenting and self-configuring. A user launches the container and can understand, configure, and operate the entire system without leaving it — through documentation (hero_books), visual configuration (Settings), or AI conversation (hero_shrimp). All three share one source of truth: a built-in book that ships with every hero_zero container.
Architecture
Two-Layer Configuration Model
docker run -e GROQ_API_KEY=...orsource ~/hero/cfg/env/*Both layers coexist. Layer 1 provides defaults at boot. Layer 2 reads those values and lets users view, modify, or add new ones. If everything is set via env vars, Settings shows "all configured." If launched bare, Settings guides the user through setup.
What Already Exists
lhumina_code/docs_herorepo withhero_os_guidecollection (7 chapters). Already seeded into hero_books at container startup alongside mycelium, geomind, ourworld books./hero_books_ui/mcp(hero_books/crates/hero_books_server/src/web/mcp.rs)mcp_servers.json/sso-loginauto-creates admin account with JWT, generates real credentials/sso-loginwith form POST + 303 redirectRemaining Tasks
1. Settings UI — Env Vars Tab (
hero_os)Extend the existing Settings page (Dioxus WASM) with an "Environment Variables" section.
Design:
••••••••by default, eye icon button to revealKey file:
hero_os/crates/hero_os_app/src/components/mobile_settings.rs2. Settings Backend — Env Var RPC (
hero_osis)RPC methods for reading/writing env vars:
config.env_list→ all known vars with current values (masked for sensitive), status, metadataconfig.env_get { name }→ single var value (requires auth)config.env_set { name, value }→ persist override to~/hero/cfg/env/overrides.env, reload into processconfig.env_test { name }→ validate API key by test call to providerStorage: Overrides saved to
~/hero/cfg/env/overrides.env. Entrypoint sources this at startup → persists across restarts.Key file:
hero_osis/crates/hero_osis_ui/src/3. Wire hero_books MCP into hero_shrimp
Add hero_books as MCP source in hero_shrimp config so AI can search/read the built-in Hero OS guide.
Key files:
hero_shrimp/mcp_servers.json,hero_books/crates/hero_books_server/src/web/mcp.rs4. Suggested Questions in AI Island (
hero_archipelagos)When AI assistant has no conversation, show clickable starter prompts:
Key files:
hero_archipelagos/— intelligence/AI chat component5. Show SSO Credentials in Settings (
hero_os+hero_auth)Auth SSO auto-created admin credentials (client_id, client_secret) should appear in Settings under Auth category. May need a new endpoint in hero_auth to retrieve admin info.
Key files:
hero_auth/src/handlers.rs, Settings UI from Task 1Env Var Registry
GIT_NAMEGIT_EMAILOPENROUTER_API_KEYGROQ_API_KEYANTHROPIC_API_KEYGEMINI_API_KEY_FREEMISTRAL_API_KEY_FREECEREBRAS_API_KEY_FREERUNPOD_API_KEYHF_TOKENFORGEJO_TOKENGITHUB_TOKENHERO_SECRETTF_VAR_mnemonicSERPER_API_KEYSEXA_API_KEYSLIVEKIT_URLLIVEKIT_API_KEYLIVEKIT_API_SECRETWorkspace & Deploy Model
Repos & Branch
/home/pctwo/Documents/temp/hero_work/lhumina_code/hero_services/hero_work/lhumina_code/(20 repos +docs_hero) +hero_work/geomind_code/zinit/development_mikacross all repos that need changes (branched fromdevelopment)developmentintodevelopment_mik— keep the feature branch cleanTwo-Tag Deploy Model
:herodevherodev.gent04.grid.tf:herohero.gent04.grid.tfSet up
herodevenvironment (createenvs/herodev/fromenvs/hero/, deploy VM) when ready to test.Promotion: When herodev is verified →
Build Flow (all binaries inside Docker, never bare metal)
Critical Rules
dist/templates/hero_redis/dx build, copy todist/share/hero_os/public/506:c9a7:e600:fdef:ff0f:1c6f:3d3e:fdbaSession 14 — Complete
All 5 deliverables implemented, deployed, and verified on
herodev.gent04.grid.tf:Done
config.env_list/get/set/testviaPOST /config/env, overrides persisted to~/hero/cfg/env/overrides.env, sourced on container startmcp_booksstdio-to-HTTP bridge, 6 MCP tools exposed (libraries_list, books_list, book_pages, page_read, search, ask)overrides.envon SSO admin creation, displayed in Auth category with mask/revealRepos touched
development_mikdevelopment_mikdevelopment_mikdevelopment_mikdevelopment_mikdevelopment_mikdevelopment_mik_6_1Known limitations
:heroimage.Follow-up
See new issue for wiring all Hero services to the AI assistant via MCP.
mik-tf referenced this issue2026-03-18 14:14:33 +00:00
Additional requirement: Initial user setup
Problem
Currently there's no way to set the initial Hero OS admin user/password without manually seeding the database.
Proposed solution (3 modes)
Mode 1 — Env var seeding:
Set
HERO_ADMIN_USERandHERO_ADMIN_PASSWORDenv vars. On first boot, hero_auth creates this user automatically. No manual setup needed for automated deployments.Mode 2 — First-user setup (no env vars set):
If no users exist and no env vars are set, the login page shows a "Create Admin Account" form instead of the login form. First person to fill it becomes admin. After creation, the form disappears and normal login resumes.
Mode 3 — Password management in Settings:
Once logged in, users can view/change their password in Hero OS Settings UI (the Settings tab from #31's deliverables).
Implementation touches
hero_authbackend: check for env vars on startup, password update RPC methodhero_os_ui: first-user setup form on login pageHERO_ADMIN_USER/HERO_ADMIN_PASSWORDenv vars