Files
factory/lib/interns-mcp/tests/test_registry.py
vitya ca669d96e1 feat(lib): bundle MCP servers from .common/lib into factory/lib/
Copies source (no node_modules, dist, .tasks, .wiki, __pycache__) for:
- projects-meta-mcp v2.25.0 (TypeScript/Node)
- wiki-graph v0.3.1 (TypeScript/Node)
- interns-mcp v0.3.3 (Python/FastMCP)

.gitignore: exclude lib build artefacts (node_modules, dist, .venv, __pycache__, *.pyc)
bootstrap.ps1: add MCP build step — npm install+build for TS servers, venv+pip for Python

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-06-11 13:17:29 +03:00

40 lines
1.0 KiB
Python

"""Tests for registry loading."""
from interns_mcp.registry import load_interns, INTERN_CLASSES
def test_classes_registered():
assert "bulk_text_read" in INTERN_CLASSES
assert "repo_read" in INTERN_CLASSES
assert "transcript_distill" in INTERN_CLASSES
def test_load_creates_interns():
config = {
"endpoints": {},
"interns": {
"bulk_text_read": {
"description": "test",
"endpoint": None,
"model": "test-model",
"max_tokens": 1024,
"temperature": 0.1,
"system_prompt": "test prompt",
},
},
}
interns = load_interns(config)
assert len(interns) == 1
assert interns[0].id == "bulk_text_read"
assert interns[0].model == "test-model"
def test_unknown_intern_skipped():
config = {
"endpoints": {},
"interns": {
"unknown_intern": {"description": "ghost"},
},
}
interns = load_interns(config)
assert len(interns) == 0