feat(cron): profile-scoped cron listing for the Routines pane (#37) - #86803
feat(cron): profile-scoped cron listing for the Routines pane (#37)#86803BowmanStephen wants to merge 1 commit into
Conversation
…search#37) The desktop Routines pane claims to follow the active bot, but cron.manage only ever read the connected gateway's own cron store. A bot whose profile runs its own gateway (separate HERMES_HOME) appeared to have 'no cron jobs' — its store was invisible. - cronjob(action='list', home=...) scopes the read to another profile's cron store via the existing use_cron_store() ContextVar (per-profile isolation NousResearch#4707; override is context-local and restored on exit). Only 'list' is scoped — mutating another profile's store through this tool stays deliberately unsupported. - cron.manage RPC accepts an optional profile param: resolves the profile to its HERMES_HOME and forwards it. Unknown profile -> clean RPC error. Old UIs unaffected (param omitted). - The desktop plugin marks scoped reads (data.scoped) so untagged jobs are treated as the bot's own, and the pane can drop its 'check with hermes -p <bot> cron list' empty state. Tests: 2 new (foreign-store read + isolation, missing store -> empty). 717 cron/tool tests pass.
feat(cron): profile-scoped cron listing for the Routines pane (#37) No blocking issues found. A few minor observations:
|
|
Your backend approach (profile-scoped cron listing via a |
Problem
The desktop Routines pane claims to follow the active bot, but
cron.manageonly ever read the connected gateway's own cron store. A bot whose profile runs its own gateway (separateHERMES_HOME) appeared to have 'no cron jobs' — its store was invisible (Hermes-Bot-Mode issue #37, cross-referenced from Hermes-Bot-Mode PR #62).Change
cronjob(action='list', home=...)scopes the read to another profile's cron store via the existinguse_cron_store()ContextVar (per-profile isolation [Bug]: cron under profile-scoped launchd gateway falls back to default~/.hermesinstead of profileHERMES_HOME#4707; override is context-local and restored on exit). Onlylistis scoped — mutating another profile's store through this tool stays deliberately unsupported.cron.manageRPC accepts an optionalprofileparam: resolves the profile to itsHERMES_HOMEand forwards it. Unknown profile → clean RPC error. Old UIs unaffected (param omitted).data.scoped) so untagged jobs are treated as the bot's own and the pane can drop its 'check withhermes -p <bot> cron list' empty state (companion plugin PR will follow).Tests
2 new: foreign-store read + isolation (caller's own store untouched), missing store → empty. 717 cron/tool tests pass.