Match Hermes flag probe at a boundary, cover the mise path

Review follow-up on the readiness probe. The two greps were fixed-string
substring matches, so a future release listing only --tui-theme or
--query-log while dropping the bare --tui/--query omarchy-agent passes
would read as ready -- the same false verdict inverted. Anchor both to a
flag boundary.

Add a regression case pinning that a substring-only help is rejected,
and one exercising --check through a mise-installed hermes in both
capability directions: the desktop and foreign cases only covered their
own wrappers, and the mise path is what a machine without the app runs.

Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
Spencer BullandClaude committed 2026-09-01 15:53:52 -05:00
1 parent f08840d6cc
commit f7078b9136
2 files changed
+59 -2

No files matched your search

+7 -2
View File
@@ -92,12 +92,17 @@ hermes_runs() {
# session and --tui to keep it interactive -- rather than a flag that merely
# shipped alongside them: the previous marker, --oneshot, was dropped in Hermes
# v0.20 and left working installs stranded as "not ready".
#
# Matched at a flag boundary, not as a substring: a bare grep for --tui also
# accepts a release that lists only --tui-theme while having dropped --tui
# itself, which would call an install ready that omarchy-agent cannot drive --
# the same false verdict this check exists to prevent, merely inverted.
hermes_prompt_ready() {
local help
hermes_runs &&
help=$(timeout 15 "$HOME/.local/bin/hermes" chat --help 2>/dev/null) &&
grep -qF -- '--tui' <<<"$help" &&
grep -qF -- '--query' <<<"$help"
grep -qE -- '--tui([^[:alnum:]-]|$)' <<<"$help" &&
grep -qE -- '--query([^[:alnum:]-]|$)' <<<"$help"
}
# --owns answers whether the wrapper on PATH is the one this command wrote, so