feat(onboarding): add one-shot bootstrap and first-run setup wizard - #285
feat(onboarding): add one-shot bootstrap and first-run setup wizard#285gabogabucho wants to merge 4 commits into
Conversation
|
Thanks for this — it's a well-structured PR that addresses a real friction point. The scope is right: get common API-key-based providers working through a browser wizard while leaving terminal-first/OAuth flows to A few things to look at before merging: 1.
|
Agent review — APPROVED WITH FIXES ✅Reviewed by Hermes agent. Full diff, security audit, test suite, and browser QA completed. This is a solid onboarding MVP contribution — the feature works end-to-end and the code is well structured. A few issues needed fixing before this is merge-ready, all addressed on review branch SummaryFirst-run onboarding wizard with one-shot bootstrap launcher. The wizard detects the Hermes agent, walks the user through provider/model selection, saves real credentials into Diff16 files (via clean cherry-pick onto current master — see stale-base note below), 3,004 insertions Security — 3 issues found and fixed[FIXED] /api/onboarding/setup not loopback-restricted. The endpoint writes API keys directly to [FIXED] Newline injection in [FIXED] [INFO] Tests — 693 passed, 0 failed (up from the 679 baseline)Four additional tests added on the review branch beyond what the PR ships:
Test isolation bugs found and fixed:
Code correctness — clean
Stale-base noteThe PR branch was cut from v0.47.1 (current master is v0.48.2). The direct diff showed:
All genuine feature commits were cherry-picked onto current master on the review branch. None of the stale-base deletions are present. The fix count is identical regardless of how the PR is eventually merged — the review branch is the authoritative version. Browser QA — PASS
Review branch:
|
Full Independent Review: PR #285 — onboarding wizard (review branch
|
| Item | Status |
|---|---|
| Security | Clean — API key injection prevented, loopback restriction, esc() on all user data |
| Bootstrap | Safe — hardcoded URLs, list args for subprocess, venv isolation |
| Tests (9 onboarding) | 4 pass directly, 5 skip without pyyaml (all pass with agent venv) |
| i18n | en + es complete |
| Architecture | Clean: read-only status endpoint + write setup endpoint + completion flag |
Ready to merge. The review branch (pr-285-review) has all fixes applied.
…G entry for PR #285 onboarding wizard
…285) Adds a bootstrap launcher and a blocking first-run onboarding wizard that guides new users through minimum Hermes setup from the browser UI. Supported provider flows: OpenRouter, Anthropic, OpenAI, custom OpenAI-compatible. OAuth/terminal-first flows remain via 'hermes model'. Security hardening applied during review: - /api/onboarding/setup restricted to loopback when auth disabled - Newline injection guard in _write_env_file - esc() on setup.unsupported_note in onboarding.js - Test isolation fix (send_key instead of bot_name in contamination test) - Skip markers for PyYAML-dependent tests in agent-less environments Tests: 693 passed (up from 679) Co-authored-by: gabogabucho <gabogabucho@gmail.com>
|
Closing this PR to reopen from the review branch — the original contributor's branch became conflicted after docs were committed to master. All code from this PR has been carefully reviewed and integrated into Thanks again @gabogabucho for the excellent contribution! |
…285) Adds a bootstrap launcher and a blocking first-run onboarding wizard that guides new users through minimum Hermes setup from the browser UI. Supported provider flows: OpenRouter, Anthropic, OpenAI, custom OpenAI-compatible. OAuth/terminal-first flows remain via 'hermes model'. Security hardening applied during review: - /api/onboarding/setup restricted to loopback when auth disabled - Newline injection guard in _write_env_file - esc() on setup.unsupported_note in onboarding.js - Test isolation fix (send_key instead of bot_name in contamination test) - Skip markers for PyYAML-dependent tests in agent-less environments Tests: 693 passed (up from 679) Co-authored-by: Nathan Esquenazi <nesquena@gmail.com> Co-authored-by: gabogabucho <gabogabucho@gmail.com>
…esquena#285) Adds a bootstrap launcher and a blocking first-run onboarding wizard that guides new users through minimum Hermes setup from the browser UI. Supported provider flows: OpenRouter, Anthropic, OpenAI, custom OpenAI-compatible. OAuth/terminal-first flows remain via 'hermes model'. Security hardening applied during review: - /api/onboarding/setup restricted to loopback when auth disabled - Newline injection guard in _write_env_file - esc() on setup.unsupported_note in onboarding.js - Test isolation fix (send_key instead of bot_name in contamination test) - Skip markers for PyYAML-dependent tests in agent-less environments Tests: 693 passed (up from 679) Co-authored-by: Nathan Esquenazi <nesquena@gmail.com> Co-authored-by: gabogabucho <gabogabucho@gmail.com>
… entries All three PRs now merged: - nesquena#285: first-run onboarding wizard - nesquena#287: self-update git pull diagnostics - nesquena#289: skip flaky redaction test in agent-less envs Final test count: 697 (up from 679) Co-authored-by: Nathan Esquenazi <nesquena@gmail.com>
…esquena#285) Adds a bootstrap launcher and a blocking first-run onboarding wizard that guides new users through minimum Hermes setup from the browser UI. Supported provider flows: OpenRouter, Anthropic, OpenAI, custom OpenAI-compatible. OAuth/terminal-first flows remain via 'hermes model'. Security hardening applied during review: - /api/onboarding/setup restricted to loopback when auth disabled - Newline injection guard in _write_env_file - esc() on setup.unsupported_note in onboarding.js - Test isolation fix (send_key instead of bot_name in contamination test) - Skip markers for PyYAML-dependent tests in agent-less environments Tests: 693 passed (up from 679) Co-authored-by: Nathan Esquenazi <nesquena@gmail.com> Co-authored-by: gabogabucho <gabogabucho@gmail.com>
… entries All three PRs now merged: - nesquena#285: first-run onboarding wizard - nesquena#287: self-update git pull diagnostics - nesquena#289: skip flaky redaction test in agent-less envs Final test count: 697 (up from 679) Co-authored-by: Nathan Esquenazi <nesquena@gmail.com>
This PR reduces the setup friction for Hermes WebUI by adding a one-shot bootstrap flow plus a first-run onboarding wizard that can perform the minimum real Hermes setup for common API-key-based providers.
Summary
bootstrap.pylauncher that installs Hermes Agent if missing, starts the WebUI, waits for health, and opens the browserWhat the onboarding wizard now supports
The wizard can now do the minimum setup needed to get a typical user chatting with Hermes from the WebUI:
.envconfig.yamlSupported provider flows in this MVP:
Why
Today Hermes + WebUI onboarding still feels too terminal-heavy for non-technical users. This change aims to let someone run one command, open the browser, follow a short wizard, and get to a working Hermes chat setup in minutes.
Important scope note
This PR intentionally does not try to recreate every Hermes CLI setup path in-browser.
Advanced/OAuth-driven flows such as:
still remain outside this wizard and should continue through
hermes model.Files changed
bootstrap.pystart.shapi/onboarding.pyapi/routes.pyapi/config.pystatic/onboarding.jsstatic/index.htmlstatic/style.cssstatic/i18n.jsREADME.mdTESTING.mdARCHITECTURE.mdROADMAP.mdtests/test_onboarding_mvp.pytests/test_onboarding_static.pyValidation
python -m py_compile "bootstrap.py" "api/onboarding.py" "api/routes.py" "api/config.py"HERMES_WEBUI_PYTHON=python python -m pytest tests/test_onboarding_mvp.py tests/test_onboarding_static.py tests/test_sprint33.py tests/test_mobile_layout.py -vHERMES_WEBUI_PYTHON=python python -m pytest tests/test_onboarding_mvp.py -vHERMES_WEBUI_PYTHON=python python -m pytest tests/test_onboarding_static.py tests/test_spanish_locale.py -v$env:HERMES_WEBUI_PYTHON=(Get-Command python).Source; python -m pytest tests/test_onboarding_mvp.py tests/test_onboarding_static.py tests/test_model_resolver.py tests/test_spanish_locale.py -vNotes