mirror of
https://github.com/NousResearch/hermes-agent.git
synced 2026-04-25 00:51:20 +00:00
enable cronjobs in messaging platforms
This commit is contained in:
parent
0729ef7353
commit
79b62497d1
3 changed files with 11 additions and 6 deletions
|
|
@ -1102,7 +1102,7 @@ def get_all_tool_names() -> List[str]:
|
||||||
"browser_vision"
|
"browser_vision"
|
||||||
])
|
])
|
||||||
|
|
||||||
# Cronjob management tools (CLI-only, checked at runtime)
|
# Cronjob management tools (CLI + gateway, checked at runtime)
|
||||||
if check_cronjob_requirements():
|
if check_cronjob_requirements():
|
||||||
tool_names.extend([
|
tool_names.extend([
|
||||||
"schedule_cronjob", "list_cronjobs", "remove_cronjob"
|
"schedule_cronjob", "list_cronjobs", "remove_cronjob"
|
||||||
|
|
@ -2349,8 +2349,8 @@ def get_available_toolsets() -> Dict[str, Dict[str, Any]]:
|
||||||
"cronjob_tools": {
|
"cronjob_tools": {
|
||||||
"available": check_cronjob_requirements(),
|
"available": check_cronjob_requirements(),
|
||||||
"tools": ["schedule_cronjob", "list_cronjobs", "remove_cronjob"],
|
"tools": ["schedule_cronjob", "list_cronjobs", "remove_cronjob"],
|
||||||
"description": "Schedule and manage automated tasks (cronjobs) - only available in interactive CLI mode",
|
"description": "Schedule and manage automated tasks (cronjobs) - available in CLI and messaging platforms",
|
||||||
"requirements": ["HERMES_INTERACTIVE=1 (set automatically by cli.py)"]
|
"requirements": ["Interactive or gateway session"]
|
||||||
},
|
},
|
||||||
"file_tools": {
|
"file_tools": {
|
||||||
"available": check_file_requirements(),
|
"available": check_file_requirements(),
|
||||||
|
|
|
||||||
|
|
@ -340,9 +340,14 @@ def check_cronjob_requirements() -> bool:
|
||||||
"""
|
"""
|
||||||
Check if cronjob tools can be used.
|
Check if cronjob tools can be used.
|
||||||
|
|
||||||
Only available in interactive CLI mode (HERMES_INTERACTIVE=1).
|
Available in interactive CLI mode and gateway/messaging platforms.
|
||||||
|
Cronjobs are server-side scheduled tasks so they work from any interface.
|
||||||
"""
|
"""
|
||||||
return os.getenv("HERMES_INTERACTIVE") == "1"
|
return bool(
|
||||||
|
os.getenv("HERMES_INTERACTIVE")
|
||||||
|
or os.getenv("HERMES_GATEWAY_SESSION")
|
||||||
|
or os.getenv("HERMES_EXEC_ASK")
|
||||||
|
)
|
||||||
|
|
||||||
|
|
||||||
# =============================================================================
|
# =============================================================================
|
||||||
|
|
|
||||||
|
|
@ -84,7 +84,7 @@ TOOLSETS = {
|
||||||
},
|
},
|
||||||
|
|
||||||
"cronjob": {
|
"cronjob": {
|
||||||
"description": "Cronjob management tools - schedule, list, and remove automated tasks (CLI-only)",
|
"description": "Cronjob management tools - schedule, list, and remove automated tasks",
|
||||||
"tools": ["schedule_cronjob", "list_cronjobs", "remove_cronjob"],
|
"tools": ["schedule_cronjob", "list_cronjobs", "remove_cronjob"],
|
||||||
"includes": []
|
"includes": []
|
||||||
},
|
},
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue