mirror of
https://github.com/NousResearch/hermes-agent.git
synced 2026-05-13 03:52:00 +00:00
test(skill_usage): add mark_agent_created to regression test
The cherry-picked test predates #19618/#19621 which rewrote list_agent_created_skill_names() to require an explicit created_by: 'agent' provenance marker. Without mark_agent_created(), my-skill is excluded from the list and the positive assertion fails.
This commit is contained in:
parent
68c1a08ad1
commit
4d0f59fa5a
1 changed files with 6 additions and 1 deletions
|
|
@ -226,7 +226,11 @@ def test_agent_created_excludes_hub_installed(skills_home):
|
||||||
|
|
||||||
|
|
||||||
def test_agent_created_excludes_hub_installed_frontmatter_name(skills_home):
|
def test_agent_created_excludes_hub_installed_frontmatter_name(skills_home):
|
||||||
from tools.skill_usage import is_agent_created, list_agent_created_skill_names
|
from tools.skill_usage import (
|
||||||
|
is_agent_created,
|
||||||
|
list_agent_created_skill_names,
|
||||||
|
mark_agent_created,
|
||||||
|
)
|
||||||
|
|
||||||
skills_dir = skills_home / "skills"
|
skills_dir = skills_home / "skills"
|
||||||
hub_skill = skills_dir / "productivity" / "getnote"
|
hub_skill = skills_dir / "productivity" / "getnote"
|
||||||
|
|
@ -242,6 +246,7 @@ description: test skill
|
||||||
encoding="utf-8",
|
encoding="utf-8",
|
||||||
)
|
)
|
||||||
_write_skill(skills_dir, "my-skill")
|
_write_skill(skills_dir, "my-skill")
|
||||||
|
mark_agent_created("my-skill")
|
||||||
hub_dir = skills_dir / ".hub"
|
hub_dir = skills_dir / ".hub"
|
||||||
hub_dir.mkdir()
|
hub_dir.mkdir()
|
||||||
(hub_dir / "lock.json").write_text(
|
(hub_dir / "lock.json").write_text(
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue