hkuds--openharness
5dd8b952ec
A lightweight open-source Python implementation of the Agent Harness architecture. 44x lighter than Claude Code (11K vs 512K lines), 98% core tool coverage. - 43 tools with Pydantic validation and parallel execution - Skills system compatible with anthropics/skills (17+ tested) - Plugin system compatible with claude-code/plugins (12+ tested) - API retry with exponential backoff - Multi-level permissions with path rules - React/Ink TUI with "Oh my Harness!" branding - 114 unit tests + 6 E2E test suites - MIT License
30 行
978 B
Python
30 行
978 B
Python
"""Tests for skill loading."""
|
|
|
|
from __future__ import annotations
|
|
|
|
from pathlib import Path
|
|
|
|
from openharness.skills import get_user_skills_dir, load_skill_registry
|
|
|
|
|
|
def test_load_skill_registry_includes_bundled(tmp_path: Path, monkeypatch):
|
|
monkeypatch.setenv("OPENHARNESS_CONFIG_DIR", str(tmp_path / "config"))
|
|
registry = load_skill_registry()
|
|
|
|
names = [skill.name for skill in registry.list_skills()]
|
|
assert "simplify" in names
|
|
assert "review" in names
|
|
|
|
|
|
def test_load_skill_registry_includes_user_skills(tmp_path: Path, monkeypatch):
|
|
monkeypatch.setenv("OPENHARNESS_CONFIG_DIR", str(tmp_path / "config"))
|
|
skills_dir = get_user_skills_dir()
|
|
(skills_dir / "deploy.md").write_text("# Deploy\nDeployment workflow guidance\n", encoding="utf-8")
|
|
|
|
registry = load_skill_registry()
|
|
deploy = registry.get("Deploy")
|
|
|
|
assert deploy is not None
|
|
assert deploy.source == "user"
|
|
assert "Deployment workflow guidance" in deploy.content
|