feat(mcp): add MCP JSON renderer and CLI support, update tests accordingly
- Add MCPRenderer to generate MCP-native JSON bundles (index.json, nav.json, modules/*.json) - Expose MCPRenderer via public API and CLI (`generate-mcp` command) - Replace Markdown-based MCP output with structured JSON resources - Update MCP renderer type stubs to match new JSON-based implementation - Refactor MCP tests to validate JSON content, bundle structure, and navigation - Fix MCP module coverage test to use explicit project_root for reliable discovery
This commit is contained in:
@@ -12,9 +12,9 @@ def test_mcp_idempotent(tmp_path: Path):
|
||||
renderer = MCPRenderer()
|
||||
|
||||
renderer.generate_sources(project, out_dir)
|
||||
first = (out_dir / "testpkg" / "mod.md").read_text()
|
||||
first = (out_dir / "modules" / "testpkg.mod.json").read_text()
|
||||
|
||||
renderer.generate_sources(project, out_dir)
|
||||
second = (out_dir / "testpkg" / "mod.md").read_text()
|
||||
second = (out_dir / "modules" / "testpkg.mod.json").read_text()
|
||||
|
||||
assert first == second
|
||||
|
||||
Reference in New Issue
Block a user