Add Hermes WebUI and Athena operator skill
This commit is contained in:
1 parent
335c9a8501
commit
71775891b4
15 files changed
+446
No files matched your search
@@ -0,0 +1,35 @@
|
||||
#!/usr/bin/env python3
|
||||
"""Export Hermes dependencies without attempting to build Hermes itself."""
|
||||
|
||||
from __future__ import annotations
|
||||
|
||||
import re
|
||||
import sys
|
||||
import tomllib
|
||||
from pathlib import Path
|
||||
|
||||
|
||||
def main() -> None:
|
||||
document = tomllib.loads(Path(sys.argv[1]).read_text(encoding="utf-8"))
|
||||
project = document["project"]
|
||||
optional = project.get("optional-dependencies", {})
|
||||
pending = list(project.get("dependencies", [])) + list(optional.get("all", []))
|
||||
emitted: set[str] = set()
|
||||
|
||||
while pending:
|
||||
requirement = pending.pop(0)
|
||||
match = re.fullmatch(r"hermes-agent(?:\[([^]]+)\])?", requirement.strip())
|
||||
if match:
|
||||
extras = [item.strip() for item in (match.group(1) or "").split(",") if item.strip()]
|
||||
for extra in extras:
|
||||
if extra not in optional:
|
||||
raise SystemExit(f"Unknown Hermes extra: {extra}")
|
||||
pending[:0] = optional[extra]
|
||||
continue
|
||||
if requirement not in emitted:
|
||||
print(requirement)
|
||||
emitted.add(requirement)
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
main()
|
||||
Reference in new issue
Block a user