This commit is contained in:
John Lancaster
2026-06-21 20:24:05 -05:00
parent dcbf570a13
commit 3603471699
2 changed files with 12 additions and 10 deletions
@@ -42,19 +42,21 @@ def make_skill_frontmatter_payload(
) -> str: ) -> str:
"""Builds frontmatter payload YAML for skill conversion tests.""" """Builds frontmatter payload YAML for skill conversion tests."""
canonical_name = name or skill_id canonical_name = name or skill_id
x_personal_mcp: dict[str, Any] = {
"id": skill_id,
"version": version,
"tags": list(tags),
"capabilities": list(capabilities or (f"resource://skills/{canonical_name}/document",)),
"depends_on": list(depends_on),
}
if references is not None:
x_personal_mcp["references"] = references
payload: dict[str, Any] = { payload: dict[str, Any] = {
"name": canonical_name, "name": canonical_name,
"description": description, "description": description,
"x-personal-mcp": { "x-personal-mcp": x_personal_mcp,
"id": skill_id,
"version": version,
"tags": list(tags),
"capabilities": list(capabilities or (f"resource://skills/{canonical_name}/document",)),
"depends_on": list(depends_on),
},
} }
if references is not None:
payload["x-personal-mcp"]["references"] = references
return yaml.safe_dump(payload, sort_keys=False) return yaml.safe_dump(payload, sort_keys=False)
+1 -1
View File
@@ -27,7 +27,7 @@ class TestMcpHttpEndpoints:
@pytest.mark.asyncio @pytest.mark.asyncio
async def test_serves_docs_entrypoint(self, client: AsyncClient) -> None: async def test_serves_docs_entrypoint(self, client: AsyncClient) -> None:
"""Ensures GET /docs returns the docs site entrypoint response.""" """Ensures GET /docs returns the docs site entrypoint response."""
response = await client.get("/docs") response = await client.get("/docs", follow_redirects=True)
assert response.status_code == 200 assert response.status_code == 200
assert "text/html" in response.headers["content-type"] assert "text/html" in response.headers["content-type"]