fix(cli): non-blocking startup update check, version consistency, and banner deduplication - #1257
Closed
0xNyk wants to merge 2 commits into
Closed
fix(cli): non-blocking startup update check, version consistency, and banner deduplication#12570xNyk wants to merge 2 commits into
0xNyk wants to merge 2 commits into
Conversation
- Change __version__ from "v1.0.0" to "0.1.0" to match pyproject.toml - Add v prefix at display time in banner title so version shows correctly as "Hermes Agent v0.1.0" instead of "Hermes Agent vv1.0.0"
- Add background thread mechanism (prefetch_update_check/get_update_result) so git fetch runs in parallel with skill sync and agent init - Fix repo path fallback in check_for_updates() for dev installs - Remove duplicate build_welcome_banner (~180 lines) and _format_context_length from cli.py — the banner.py version is now the single source of truth - Port skin banner_hero/banner_logo support and terminal width check from cli.py's version into banner.py - Add update status output to hermes version command - Add unit tests for update check, prefetch, and version string
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
__version__changed from"v1.0.0"to"0.1.0"to matchpyproject.toml;vprefix added at display time sohermes versionshowsHermes Agent v0.1.0instead ofHermes Agent vv1.0.0check_for_updates()(which callsgit fetch) now runs in a background daemon thread viaprefetch_update_check(), started early incmd_chat()so it overlaps with skill sync and agent initcheck_for_updates()now falls back toPath(__file__).parent.parentfor dev installs where~/.hermes/hermes-agent/.gitdoesn't existbuild_welcome_banner: Deleted ~195 lines of duplicated code fromcli.py(localbuild_welcome_banner,_format_context_length,_get_available_skills) that shadowed thebanner.pyimports — the shadowing meant the update check and MCP servers section never ran duringhermes chatbanner_hero,banner_logosupport and terminal width check (≥95 cols for large logo) moved from the deletedcli.pyversion intobanner.pyhermes version: Now shows update status (Update available: N commits behind — run 'hermes update'orUp to date)Priority: #4 (Performance and robustness) per CONTRIBUTING.md
Net change: ~-30 lines (removal of duplication outweighs additions)
Test plan
pytest tests/hermes_cli/test_update_check.py— 7 new tests all pass (version string, cache behavior, expired cache, no-git-dir, dev fallback, prefetch non-blocking, timeout)hermes version— showsHermes Agent v0.1.0, update statushermes chat -q "hello"— banner renders with update notification, tools, skills, MCP servers, startup not blocked