hermes-agent/hermes_cli/subcommands
Teknium 660e36f097
fix(cron): scope job execution to its owning profile (#32091 follow-up) (#50993)
The #32091 fix moved every profile's cron jobs into one shared root store,
but never wired the execution-scoping half it recommended: a job still ran
under whichever profile's ticker picked it up, not its owning profile. So a
job created under `hermes -p donna` could execute with the root profile's
.env / config.yaml / credentials.

- jobs.py: create_job auto-captures the active profile (explicit profile=
  override available) and stores it on the job; resolve_profile_home() maps a
  profile name to its HERMES_HOME; legacy jobs backfill to 'default'.
- scheduler.py: run_job applies the job's profile via a scoped HERMES_HOME
  override (env var + in-process ContextVar) before any .env/config/script
  load, restored in finally. tick() routes profile-mismatched jobs to the
  single-worker sequential pool so the env mutation can't race.
- cronjob tool threads profile through (NOT exposed in the model schema, to
  avoid cross-profile privilege escalation); hermes cron add gains --profile.

E2E verified against a temp HERMES_HOME with a real profile dir: a root-profile
ticker runs a profile='donna' job with HERMES_HOME=donna during execution and
restores the ticker env afterward.
2026-06-22 14:54:28 -07:00
..
__init__.py refactor(cli): extract hermes cron parser into hermes_cli/subcommands/ (god-file Phase 2) 2026-06-07 22:18:14 -07:00
_shared.py refactor(cli): extract hermes cron parser into hermes_cli/subcommands/ (god-file Phase 2) 2026-06-07 22:18:14 -07:00
acp.py refactor(cli): promote 9 closure handlers to top-level + extract their parsers (god-file Phase 2 follow-up) 2026-06-07 22:56:23 -07:00
auth.py refactor(cli): extract 25 more subcommand parsers into hermes_cli/subcommands/ 2026-06-07 22:18:14 -07:00
backup.py refactor(cli): extract 25 more subcommand parsers into hermes_cli/subcommands/ 2026-06-07 22:18:14 -07:00
claw.py refactor(cli): promote 9 closure handlers to top-level + extract their parsers (god-file Phase 2 follow-up) 2026-06-07 22:56:23 -07:00
config.py refactor(cli): extract 25 more subcommand parsers into hermes_cli/subcommands/ 2026-06-07 22:18:14 -07:00
cron.py fix(cron): scope job execution to its owning profile (#32091 follow-up) (#50993) 2026-06-22 14:54:28 -07:00
dashboard.py fix(security): close hermes-0day MCP-persistence attack surface 2026-06-21 19:05:27 -07:00
debug.py refactor(cli): extract 25 more subcommand parsers into hermes_cli/subcommands/ 2026-06-07 22:18:14 -07:00
doctor.py refactor(cli): extract 25 more subcommand parsers into hermes_cli/subcommands/ 2026-06-07 22:18:14 -07:00
dump.py refactor(cli): extract 25 more subcommand parsers into hermes_cli/subcommands/ 2026-06-07 22:18:14 -07:00
gateway.py feat(relay): connector⇄gateway channel auth + signed-HTTP inbound receiver + enroll CLI (#48147) 2026-06-18 12:01:54 +10:00
gui.py refactor(cli): extract 25 more subcommand parsers into hermes_cli/subcommands/ 2026-06-07 22:18:14 -07:00
hooks.py refactor(cli): extract 25 more subcommand parsers into hermes_cli/subcommands/ 2026-06-07 22:18:14 -07:00
import_cmd.py refactor(cli): extract 25 more subcommand parsers into hermes_cli/subcommands/ 2026-06-07 22:18:14 -07:00
insights.py refactor(cli): promote 9 closure handlers to top-level + extract their parsers (god-file Phase 2 follow-up) 2026-06-07 22:56:23 -07:00
login.py fix(cli): deprecated hermes login fails gracefully for any provider 2026-06-17 12:55:40 +05:30
logout.py refactor(cli): extract 25 more subcommand parsers into hermes_cli/subcommands/ 2026-06-07 22:18:14 -07:00
logs.py refactor(cli): extract 25 more subcommand parsers into hermes_cli/subcommands/ 2026-06-07 22:18:14 -07:00
mcp.py fix(mcp): preserve stdio argv passthrough 2026-06-11 08:59:55 -07:00
memory.py refactor(cli): promote 9 closure handlers to top-level + extract their parsers (god-file Phase 2 follow-up) 2026-06-07 22:56:23 -07:00
model.py refactor(cli): extract 25 more subcommand parsers into hermes_cli/subcommands/ 2026-06-07 22:18:14 -07:00
pairing.py refactor(cli): promote 9 closure handlers to top-level + extract their parsers (god-file Phase 2 follow-up) 2026-06-07 22:56:23 -07:00
plugins.py refactor(cli): promote 9 closure handlers to top-level + extract their parsers (god-file Phase 2 follow-up) 2026-06-07 22:56:23 -07:00
postinstall.py refactor(cli): extract 25 more subcommand parsers into hermes_cli/subcommands/ 2026-06-07 22:18:14 -07:00
profile.py fix(profile): make clone-from a full source selector 2026-06-13 07:33:58 -07:00
prompt_size.py refactor(cli): extract 25 more subcommand parsers into hermes_cli/subcommands/ 2026-06-07 22:18:14 -07:00
security.py refactor(cli): extract 25 more subcommand parsers into hermes_cli/subcommands/ 2026-06-07 22:18:14 -07:00
setup.py refactor(cli): extract 25 more subcommand parsers into hermes_cli/subcommands/ 2026-06-07 22:18:14 -07:00
skills.py feat(skills): find & diff user-modified bundled skills 2026-06-18 12:26:20 +05:30
slack.py refactor(cli): extract 25 more subcommand parsers into hermes_cli/subcommands/ 2026-06-07 22:18:14 -07:00
status.py refactor(cli): extract 25 more subcommand parsers into hermes_cli/subcommands/ 2026-06-07 22:18:14 -07:00
tools.py refactor(cli): promote 9 closure handlers to top-level + extract their parsers (god-file Phase 2 follow-up) 2026-06-07 22:56:23 -07:00
uninstall.py refactor(cli): extract 25 more subcommand parsers into hermes_cli/subcommands/ 2026-06-07 22:18:14 -07:00
update.py refactor(cli): extract 25 more subcommand parsers into hermes_cli/subcommands/ 2026-06-07 22:18:14 -07:00
version.py refactor(cli): extract 25 more subcommand parsers into hermes_cli/subcommands/ 2026-06-07 22:18:14 -07:00
webhook.py refactor(cli): extract 25 more subcommand parsers into hermes_cli/subcommands/ 2026-06-07 22:18:14 -07:00
whatsapp.py refactor(cli): extract 25 more subcommand parsers into hermes_cli/subcommands/ 2026-06-07 22:18:14 -07:00