Merge branch 'main' of github.com:NousResearch/hermes-agent into bb/gui

This commit is contained in:
Brooklyn Nicholson
2026-05-10 07:05:16 -04:00
386 changed files with 16873 additions and 1099 deletions
+30 -3
View File
@@ -112,12 +112,14 @@ class TestCmdUpdateBranchFallback:
def test_update_refreshes_repo_and_tui_node_dependencies(
self, mock_run, mock_which, _mock_web_ui_build_needed, mock_args
):
from hermes_cli import main as hm
mock_which.side_effect = {"uv": "/usr/bin/uv", "npm": "/usr/bin/npm"}.get
mock_run.side_effect = _make_run_side_effect(
branch="main", verify_ok=True, commit_count="1"
)
cmd_update(mock_args)
with patch.object(hm, "_is_termux_env", return_value=False):
cmd_update(mock_args)
npm_calls = [
(call.args[0], call.kwargs.get("cwd"))
@@ -146,9 +148,11 @@ class TestCmdUpdateBranchFallback:
"--no-audit",
"--progress=false",
]
assert npm_calls == [
assert npm_calls[:2] == [
(full_flags, PROJECT_ROOT),
(app_flags, PROJECT_ROOT / "ui-tui"),
]
assert npm_calls[2:] == [
(["/usr/bin/npm", "ci", "--silent"], PROJECT_ROOT / "apps" / "dashboard"),
(["/usr/bin/npm", "run", "build"], PROJECT_ROOT / "apps" / "dashboard"),
]
@@ -268,3 +272,26 @@ def test_is_termux_env_false_for_non_termux_prefix():
from hermes_cli import main as hm
assert hm._is_termux_env({"PREFIX": "/usr/local"}) is False
def test_load_installable_optional_extras_supports_termux_group(tmp_path, monkeypatch):
from hermes_cli import main as hm
pyproject = tmp_path / "pyproject.toml"
pyproject.write_text(
"""
[project]
name = "x"
version = "0.0.0"
[project.optional-dependencies]
all = ["x[mcp]"]
termux-all = ["x[termux]", "x[mcp]"]
mcp = ["mcp>=1"]
termux = ["rich>=14"]
""".strip()
)
monkeypatch.setattr(hm, "PROJECT_ROOT", tmp_path)
assert hm._load_installable_optional_extras(group="all") == ["mcp"]
assert hm._load_installable_optional_extras(group="termux-all") == ["termux", "mcp"]