The agent that grows with you
Python aiai-agentai-agentsanthropicchatgptclaudeclaude-codecodexhermeshermes-agentllmnous-researchopenai
fix(packaging): ship bundled plugin manifests
joaomarcos69d1843512a3
diff --git a/pyproject.toml b/pyproject.tomlindex 8a7b3dd10a1..8278ebb6b80 100644--- a/pyproject.toml+++ b/pyproject.toml@@ -424,6 +424,10 @@ hermes_cli = ["observability/schemas/*.json", "data/*.json"]# topic-setup image disappears. Loaded via Path(__file__).parent / "assets"# in gateway/status_phrases.py and gateway/run.py.gateway = ["assets/**/*"]+# Bundled plugin discovery reads these manifests at runtime. Keep them in+# sealed wheels with the plugin Python modules; without this declaration the+# wheel contains adapters but discovery finds zero bundled plugins.+plugins = ["**/plugin.yaml", "**/plugin.yml"][tool.pytest.ini_options]testpaths = ["tests"]diff --git a/tests/test_packaging_build_guard.py b/tests/test_packaging_build_guard.pyindex 821a45eaef3..0b169f76ed8 100644--- a/tests/test_packaging_build_guard.py+++ b/tests/test_packaging_build_guard.py@@ -3,6 +3,8 @@import osimport subprocessimport sys+import tarfile+import zipfilefrom pathlib import Pathimport pytest@@ -69,4 +71,26 @@ def test_artifact_build_allows_explicit_nix_package_build_marker(kind, artifact_result = _build_artifact(kind, tmp_path, nix_build=True)assert result.returncode == 0, result.stderr- assert list(tmp_path.glob(artifact_glob))+ artifacts = list(tmp_path.glob(artifact_glob))+ assert artifacts++ expected = {+ path.relative_to(PROJECT_ROOT).as_posix()+ for pattern in ("plugin.yaml", "plugin.yml")+ for path in (PROJECT_ROOT / "plugins").rglob(pattern)+ }+ assert expected, "expected bundled plugin manifests under plugins/"++ if kind == "wheel":+ with zipfile.ZipFile(artifacts[0]) as wheel:+ shipped = set(wheel.namelist())+ else:+ with tarfile.open(artifacts[0]) as sdist:+ shipped = {+ name.split("/", 1)[1]+ for name in sdist.getnames()+ if "/" in name+ }++ missing = sorted(expected - shipped)+ assert not missing, f"{kind} omits bundled plugin manifests: {missing}"