mirror of
https://github.com/NousResearch/hermes-agent.git
synced 2026-07-15 14:22:43 +00:00
fix(cli): widen --yolo env guarantee to the _prepare_agent_startup chokepoint + AUTHOR_MAP
The salvaged fix sets HERMES_YOLO_MODE in main()'s dispatch path before _prepare_agent_startup(); this follow-up also sets it inside _prepare_agent_startup() itself so every launcher that triggers plugin/tool discovery (incl. the Termux fast-CLI path) gets the same ordering guarantee before tools.approval freezes _YOLO_MODE_FROZEN (#60328).
This commit is contained in:
parent
501616e8e6
commit
d2e64fcb89
2 changed files with 10 additions and 0 deletions
|
|
@ -12414,6 +12414,15 @@ def _should_background_mcp_startup(args) -> bool:
|
|||
|
||||
def _prepare_agent_startup(args) -> None:
|
||||
"""Discover plugins/MCP/hooks for commands that can run an agent turn."""
|
||||
# --yolo: chokepoint guarantee that HERMES_YOLO_MODE is set before ANY
|
||||
# plugin/tool discovery below imports tools.approval, which freezes
|
||||
# _YOLO_MODE_FROZEN at import time (PR #7994 security design). main()'s
|
||||
# dispatch path also sets this earlier, but _prepare_agent_startup() is
|
||||
# reachable from other launchers too (e.g. the Termux fast-CLI path),
|
||||
# so the guarantee lives here where the import is actually triggered
|
||||
# (#60328).
|
||||
if getattr(args, "yolo", False):
|
||||
os.environ["HERMES_YOLO_MODE"] = "1"
|
||||
_apply_safe_mode(args)
|
||||
|
||||
_sub_attr, _sub_set = _AGENT_SUBCOMMANDS.get(args.command, (None, None))
|
||||
|
|
|
|||
|
|
@ -299,6 +299,7 @@ AUTHOR_MAP = {
|
|||
"290859878+synapsesx@users.noreply.github.com": "synapsesx",
|
||||
"157689911+itsflownium@users.noreply.github.com": "itsflownium",
|
||||
"dirtyren@users.noreply.github.com": "dirtyren",
|
||||
"chenkun_lws@126.com": "bytesnail", # PR #60360 salvage (--yolo startup ordering; #60328)
|
||||
"iamgexin@qq.com": "nullptr0807", # PR #60956 salvage (gateway hygiene in-place compaction; #60947)
|
||||
"embwl0x@users.noreply.github.com": "embwl0x", # PR #60810 salvage (channel directory offload)
|
||||
"caztronics@yahoo.com": "doncazper",
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue