feat(cli): add packaged hermes-webui CLI entry point (#6739) - #6742
webtecnica wants to merge 2 commits into
Conversation
SummaryReading the complete two-file diff at Code referenceThe key packaging contract is at [project.scripts]
hermes-webui = "server:main"
[tool.setuptools]
include-package-data = true
packages = ["api", "static"]
py-modules = ["bootstrap", "server", "mcp_server"]That last line matters: The test coverage is also scoped to the actual contract. Diagnosis / recommendationThis is ready from a source-review perspective. Keeping the command as a no-argument alias for One non-blocking observation: the end-to-end metadata test intentionally skips in a source-only environment. That is acceptable because the declaration and target tests remain active, while packaging CI or an installed editable environment exercises the final entry-point load. Verification stepThe current GitHub matrix is green. For release acceptance, build the wheel, install it into an empty environment, confirm the generated |
nesquena-hermes
left a comment
There was a problem hiding this comment.
Thanks @webtecnica — a packaged hermes-webui console script is a nice ergonomic win, and the packaging itself is complete (the wheel carries all tracked API modules + 94 static assets, and python server.py / python -m server stay healthy). One BRICK to fix in the entry-point target:
Must-fix (BRICK, reproduced) — route through bootstrap:main, not server:main
pyproject.toml:29. server:main bypasses bootstrap's agent-interpreter selection. Verified on a clean wheel install: the UI starts healthy, but every chat fails because the wheel interpreter can't import run_agent (ModuleNotFoundError: dotenv) — server:main never runs discover_launcher_python() / ensure_python_has_webui_deps(). Booting via bootstrap selects the existing agent venv and works.
Fix:
pyproject.toml:29—hermes-webui = "bootstrap:main"(so startup runs the launcher-python discovery + dep-ensure before launching the server), matching thepython server.pypath's effective behavior.tests/test_cli_entry_point.py:24— changeEXPECTED_TARGETto"bootstrap:main"and update the server-specific test descriptions.
Confirm bootstrap.main is the right launch entry (it's what the source-checkout launch path uses) and re-push — I'll re-gate a clean-wheel chat round-trip.
What ChangedAddressed the CHANGES_REQUESTED review — the packaged
Root Cause
Verification
Ready for re-gate of the clean-wheel chat round-trip. |
|
| Filename | Overview |
|---|---|
| pyproject.toml | Registers the console-script target; existing packaging configuration and wheel tests include bootstrap.py and the required runtime tree. |
| tests/test_cli_entry_point.py | Adds useful wiring checks, but installed-package coverage always skips in maintained test environments and the callable check imports bootstrap with process-wide environment side effects. |
Flowchart
%%{init: {'theme': 'neutral'}}%%
flowchart LR
P["pip install hermes-webui"] --> C["generated hermes-webui command"]
C --> B["bootstrap.main()"]
B --> D["discover agent and Python"]
D --> E["ensure WebUI dependencies"]
E --> S["launch server.py"]
Reviews (1): Last reviewed commit: "fix(cli): route hermes-webui entry throu..." | Re-trigger Greptile
| ep = _installed_entry_point() | ||
| if ep is None: | ||
| pytest.skip("hermes-webui not installed in this test environment") |
There was a problem hiding this comment.
Installed entry-point test always skips
The maintained CI and local test runners do not install the project, so this branch always skips the only check that resolves the packaged entry point. Regressions in generated or installed console-script wiring therefore pass while the source-metadata checks remain green.
Knowledge Base Used: Developer Tooling: Lint Gates, Markdown Check, Workspace Repair, and the Pytest Harness
Note: If this suggestion doesn't match your team's coding style, reply to this and let me know. I'll remember it for next time!
| def test_console_script_target_resolves_to_callable(): | ||
| """The declared module:attr target imports and is callable.""" | ||
| module_name, _, attr = EXPECTED_TARGET.partition(":") | ||
| module = importlib.import_module(module_name) |
There was a problem hiding this comment.
Callable check mutates test environment
If a checkout contains a .env file, importing bootstrap executes _load_repo_dotenv() in the shared pytest process and overwrites the harness's isolated state and configuration variables. Later tests then inherit developer configuration instead of the isolated test paths, creating order-dependent behavior and potential access to non-test data.
Knowledge Base Used: Developer Tooling: Lint Gates, Markdown Check, Workspace Repair, and the Pytest Harness
…-webui entry point (#6742) (#7108) * fix(goals): delegate profile evaluation to native manager Use Hermes' context-local home override to run profile-scoped goal operations through the native GoalManager, preserving current judge, wait, and failure semantics while retaining the explicit-DB legacy fallback. * docs(goals): describe profile ownership boundary * fix(goals): gate native profile persistence capability * feat(cli): add packaged hermes-webui CLI entry point (#6739) * fix(cli): route hermes-webui entry through bootstrap:main for wheel install (#6742) * docs(changelog): note #6899 profile goal isolation + #6742 hermes-webui entry point * test(goals): guard hermes_cli import with importorskip for CI (agent not installed) #6899's native-contract tests imported hermes_cli unconditionally, failing CI with ModuleNotFoundError. Match the repo's established importorskip pattern so they skip cleanly when the agent isn't installed and run when it is. Co-authored-by: ticketclosed-wontfix --------- Co-authored-by: Nick <202622897+ticketclosed-wontfix@users.noreply.github.com> Co-authored-by: webtecnica <webtecnica@gmail.com> Co-authored-by: n <a@n>
|
Shipped in experimental release exp-v0.52.237. The packaged |
…+ hermes-webui entry point (nesquena#6742) (nesquena#7108) * fix(goals): delegate profile evaluation to native manager Use Hermes' context-local home override to run profile-scoped goal operations through the native GoalManager, preserving current judge, wait, and failure semantics while retaining the explicit-DB legacy fallback. * docs(goals): describe profile ownership boundary * fix(goals): gate native profile persistence capability * feat(cli): add packaged hermes-webui CLI entry point (nesquena#6739) * fix(cli): route hermes-webui entry through bootstrap:main for wheel install (nesquena#6742) * docs(changelog): note nesquena#6899 profile goal isolation + nesquena#6742 hermes-webui entry point * test(goals): guard hermes_cli import with importorskip for CI (agent not installed) nesquena#6899's native-contract tests imported hermes_cli unconditionally, failing CI with ModuleNotFoundError. Match the repo's established importorskip pattern so they skip cleanly when the agent isn't installed and run when it is. Co-authored-by: ticketclosed-wontfix --------- Co-authored-by: Nick <202622897+ticketclosed-wontfix@users.noreply.github.com> Co-authored-by: webtecnica <webtecnica@gmail.com> Co-authored-by: n <a@n>
Summary
Adds a packaged CLI entry point for the installed
hermes-webuidistribution, closing #6739.[project.scripts]console script inpyproject.toml:hermes-webui = "server:main"— the pip-installed equivalent of runningpython server.pyfrom a source checkout. It hooks into the same startuppath (
server.main()) used by the existing launch surface, so behavior isidentical to
python server.py/python -m server.tests/test_cli_entry_point.py, a smoke test that guards the wiring:the console script is declared in packaging metadata, the declared
server:maintarget resolves to a callable, and — when the package isinstalled in the test environment — the real
importlib.metadataentrypoint resolves end-to-end.
Change
pyproject.toml: new[project.scripts]table (hermes-webui = "server:main")tests/test_cli_entry_point.py: new smoke test fileNo other changes (no bootstrap/ctl.sh modifications).
Verification
pytest tests/test_cli_entry_point.py→ 2 passed, 1 skipped (entry-pointwiring test runs when the package is installed)
pip install -e .in a clean venv → generates thehermes-webuibinaryhermes-webuiprintedHermes Web UI listening on http://127.0.0.1:8899and servedHTTP 200python3 scripts/ruff_lint.py --diff→ no new violations on added/modified linesCloses #6739