fix(install): promote croniter to a core dependency#17577
Merged
Conversation
Cron is a built-in Hermes feature (CLI `hermes cron`, `cronjob` agent tool, gateway ticker, scheduler in cron/scheduler.py) but croniter has been gated behind the [cron] optional extra. Users who do a plain `pip install hermes-agent` can create jobs via /cron but any recurring cron schedule silently returns next_run_at=None (HAS_CRONITER=False), which then gets wrapped into a 'state=error' message only after a tick. Move croniter into core dependencies so scheduled jobs work out of the box on any install path. The [cron] extra is kept as an empty passthrough so existing `pip install hermes-agent[cron]` installs and the [all]/[termux] extras continue to resolve. Also update the now-stale user-facing error message in `compute_next_run()` that still tells users to install `hermes-agent[cron]`. Salvaged from #17234 (authored by @txbxxx) with a corrected premise: the original PR claimed [cron] wasn't in [all], but it is (pyproject.toml line 112). The real UX problem is the plain no-extras install path, which this fix addresses.
Contributor
|
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.
Salvages #17234 from @txbxxx with a corrected premise.
Summary
pip install hermes-agent(no extras) now yields a working cron scheduler out of the box. Previously, plain installs leftHAS_CRONITER=False, so any recurring cron/interval schedule silently returnednext_run_at=Noneand only surfaced as astate=errormessage on tick — bad first-run UX for a feature that ships in the core CLI, gateway ticker, andcronjobagent tool.Changes
pyproject.toml—croniter>=6.0.0,<7moved into coredependenciespyproject.toml—cron = []kept as empty passthrough so existinghermes-agent[cron]installs and the[all]/[termux]extras continue to resolvecron/jobs.py— update the now-stalecompute_next_run()warning message (no longer tells users to install the[cron]extra)scripts/release.py— AUTHOR_MAP entry for @txbxxxSalvage note
The original PR claimed
[cron]wasn't included in[all], but it is (pyproject.tomlline 112 on main), so the stated failure mode ("hermes update strips croniter") doesn't happen via[all]. But the deeper UX argument is right: cron is a built-in first-class feature, not an optional integration likemodalormatrix, and should work on a bare install. croniter is a tiny pure-Python dep (~60KB, zero native extensions). Kept the[cron]extra as an empty passthrough for back-compat.Also: the original PR branch was severely stale (would have reverted the entire
minimax-oauthfeature landed this morning, plus nix workflow hardening, anthropic adapter lazy-load, lmstudio provider, BOOT.md hook, and dozens more unrelated changes). Rebuilt the fix directly on current main.Validation
pip install hermes-agent(no extras)HAS_CRONITER=False, schedules silently brokenHAS_CRONITER=True, schedules workpip install 'hermes-agent[cron]'pip install 'hermes-agent[all]'pip install -e .(no extras) →HAS_CRONITER=True,compute_next_run({'kind':'cron','expr':'*/5 * * * *'})→ valid ISO timestamppip install -e '.[cron]'→ still resolves cleanly, croniter present via coretests/cron/— 263/263 passOriginal PR: #17234