mirror of
https://github.com/pewdiepie-archdaemon/odysseus.git
synced 2026-10-17 04:12:24 +02:00
Squash Odysseus development history
This commit is contained in:
@@ -0,0 +1,42 @@
|
||||
from routes.session_routes import _context_info_skill_inventory
|
||||
|
||||
|
||||
class FakeSkillsManager:
|
||||
def index_for(self, owner=None, **_kwargs):
|
||||
assert owner == "alice"
|
||||
return [
|
||||
{
|
||||
"name": "openai-docs",
|
||||
"description": "Use official OpenAI docs.",
|
||||
"category": "system",
|
||||
"status": "published",
|
||||
}
|
||||
]
|
||||
|
||||
def load(self, owner=None):
|
||||
assert owner == "alice"
|
||||
return [
|
||||
{
|
||||
"name": "openai-docs",
|
||||
"description": "Use official OpenAI docs.",
|
||||
"path": "/skills/openai-docs/SKILL.md",
|
||||
"procedure": "Full body should not be exposed in context_info.",
|
||||
}
|
||||
]
|
||||
|
||||
|
||||
def test_context_info_skill_inventory_is_compact_owner_scoped_metadata():
|
||||
skills = _context_info_skill_inventory(FakeSkillsManager(), owner="alice")
|
||||
|
||||
assert skills == [
|
||||
{
|
||||
"name": "openai-docs",
|
||||
"description": "Use official OpenAI docs.",
|
||||
"source": "file: /skills/openai-docs/SKILL.md",
|
||||
}
|
||||
]
|
||||
assert "procedure" not in skills[0]
|
||||
|
||||
|
||||
def test_context_info_skill_inventory_tolerates_missing_manager():
|
||||
assert _context_info_skill_inventory(None, owner="alice") == []
|
||||
Reference in New Issue
Block a user