Skip to content

fix(cli): list 'cron' platform in hermes tools curses UI (#51771) - #51847

Closed
mkslzk wants to merge 2 commits into
NousResearch:mainfrom
mkslzk:fix/51771-tools-cron-platform-visible
Closed

fix(cli): list 'cron' platform in hermes tools curses UI (#51771)#51847
mkslzk wants to merge 2 commits into
NousResearch:mainfrom
mkslzk:fix/51771-tools-cron-platform-visible

Conversation

@mkslzk

@mkslzk mkslzk commented Jun 24, 2026

Copy link
Copy Markdown
Contributor

Summary

hermes tools (curses UI) did not show the cron platform even though hermes tools list --platform cron worked and the docs explicitly tell users to configure per-cron-job toolsets via the wizard. Root cause: _get_enabled_platforms() in hermes_cli/tools_config.py had branches for cli/telegram/discord/slack/whatsapp/qqbot but no branch for cron, so the curses UI never offered it as a configurable platform.

Why cron belongs in the always-included list

cron is a non-messaging, local-only platform that needs no token, and hermes_cli.platforms.PLATFORMS already registers it with label "⏰ Cron" and default_toolset hermes-cron — the omission was a writer-side bug, not a missing registration. The fix adds cron to the always-included list alongside cli, which matches the docs:

website/docs/user-guide/features/cron.md: "the toolset you configured for the cron platform in hermes tools"

Repro (before the fix)

hermes tools
# curses UI shows: CLI, Discord (if configured), global — NO cron

hermes tools list --platform cron
# (works correctly, returns the platform tools)
# → no way to configure cron toolsets from the documented wizard

Behaviour (after the fix)

hermes tools
# curses UI now shows: CLI, ⏰ Cron, Discord (if configured), global — cron is configurable

Tests

  • 6 new regression tests in tests/hermes_cli/test_get_enabled_platforms.py:
    • cron is always in the enabled list (the headline [Bug]: hermes tools does not show cron platform #51771 case)
    • cron is present alongside messaging platforms
    • minimal install shows exactly {cli, cron} (no surprise platforms)
    • each messaging platform is still correctly gated by its env-var
    • cron is independent of all messaging tokens
    • the function is symmetric regardless of list ordering
  • All 97 existing tools_config tests remain green — no regressions (103/103 total)

Related

  • Issue: [Bug]: hermes tools does not show cron platform #51771
  • Cross-reference: hermes_cli/platforms.py:43 registers cron in the platform registry, so no registry update is needed — only the writer-side gate in _get_enabled_platforms()
  • Docs: website/docs/user-guide/features/cron.md already documents the workflow this PR enables

mkslzk added 2 commits June 23, 2026 15:21
…ousResearch#51166)

`_load_config()` in the Hindsight memory plugin short-circuited with
`return json.loads(...)` whenever a `~/.hermes/hindsight/config.json`
existed, so the HINDSIGHT_BANK_ID (and HINDSIGHT_MODE, HINDSIGHT_API_KEY,
HINDSIGHT_BUDGET, ...) env vars in a profile's .env were silently
ignored. The user set `HINDSIGHT_BANK_ID=nihai-tcm` but the plugin
loaded bank `hermes` (or whatever the JSON had) and routed every
auto retain/recall to the wrong bank.

After the fix, HINDSIGHT_* env vars are treated as a per-process
overlay on top of the loaded config. JSON is still the source of
truth when no env var is set; unsetting the env var is the
operator-facing way to let the JSON value win.

HINDSIGHT_BANK_ID is surfaced at both `config.bank_id` (the read site
in HindsightMemoryProvider.__init__ at line 1287) and the legacy
`config.banks.hermes.bankId` location so both lookup shapes work
regardless of which path seeded the config.

Covered by 5 regression tests in
`tests/plugins/memory/test_hindsight_load_config.py`:

- env var wins when config.json exists (the headline NousResearch#51166 case)
- all HINDSIGHT_* overlay env vars (mode, apiKey, budget) work
- JSON value still wins when env var is unset
- env vars seed the config when no config.json exists
- env-var bank_id is reachable through the read site's lookup chain

All 128 existing Hindsight tests remain green.
…h#51771)

`hermes tools` (curses UI) did not show the `cron` platform even though
`hermes tools list --platform cron` worked and the docs explicitly tell
users to configure per-cron-job toolsets via the wizard. Root cause:
`_get_enabled_platforms()` in `hermes_cli/tools_config.py` had branches
for cli/telegram/discord/slack/whatsapp/qqbot but no branch for `cron`,
so the curses UI never offered it as a configurable platform.

`cron` is a non-messaging, local-only platform that needs no token, and
`hermes_cli.platforms.PLATFORMS` already registers it with label
"⏰ Cron" and default_toolset "hermes-cron" — the omission was a
writer-side bug, not a missing registration. The fix adds `cron` to
the always-included list alongside `cli`, which matches the docs
(`website/docs/user-guide/features/cron.md`: "the toolset you
configured for the `cron` platform in `hermes tools`").

Covered by 6 regression tests in
`tests/hermes_cli/test_get_enabled_platforms.py`:

- `cron` is always in the enabled list (the headline NousResearch#51771 case)
- `cron` is present alongside messaging platforms
- minimal install shows exactly `{cli, cron}` (no surprise platforms)
- each messaging platform is still correctly gated by its env-var
- `cron` is independent of all messaging tokens
- the function is symmetric regardless of list ordering

All 97 existing `tools_config` tests remain green — no regressions.
@alt-glitch alt-glitch added type/bug Something isn't working comp/cli CLI entry point, hermes_cli/, setup wizard comp/cron Cron scheduler and job management area/config Config system, migrations, profiles P3 Low — cosmetic, nice to have duplicate This issue or pull request already exists labels Jun 24, 2026
@alt-glitch

Copy link
Copy Markdown
Collaborator

This was generated by AI during triage.

Duplicate of #51789 — same file (hermes_cli/tools_config.py) and same mechanism (adding cron to the always-included list in _get_enabled_platforms()), and #51789 is the earlier open PR for #51771. #51780 is a competing fix for the same issue via a different mechanism (shared platform registry) — related, not a duplicate. Note: this PR also bundles an unrelated plugins/memory/hindsight/__init__.py change that is outside the cron-tools fix scope.

@mkslzk

mkslzk commented Jun 29, 2026

Copy link
Copy Markdown
Contributor Author

Thanks for catching this and the detailed write-up, @alt-glitch!

You're right — #51847 duplicates #51789 (and #51780 is the maintainer-preferred approach via the shared platform registry). Closing this one in favor of #51780 as suggested.

Also noted on the scope-creep feedback regarding the unrelated plugins/memory/hindsight/__init__.py change bundled in — that was a mistake on my end. The Hindsight env-var overlay work is being tracked separately in #51375.

Appreciate the maintainer time on this 🙇

@mkslzk mkslzk closed this Jun 29, 2026
@mkslzk
mkslzk deleted the fix/51771-tools-cron-platform-visible branch June 29, 2026 07:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area/config Config system, migrations, profiles comp/cli CLI entry point, hermes_cli/, setup wizard comp/cron Cron scheduler and job management duplicate This issue or pull request already exists P3 Low — cosmetic, nice to have type/bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants