Skip to content

Commit 2f9c81a

Browse files
Merge pull request #5 from dropbox/codex/update-claude-manifest-validation
[codex] Update Claude manifest validation path
2 parents 2fe3bd5 + 66bdc47 commit 2f9c81a

2 files changed

Lines changed: 10 additions & 5 deletions

File tree

mcp_host_skills_tests.py

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@
5353
}
5454

5555
MANIFEST_PATHS = {
56-
"claude": Path("claude/plugin.json"),
56+
"claude": Path("claude/.claude-plugin/plugin.json"),
5757
"codex": Path("codex/.codex-plugin/plugin.json"),
5858
}
5959

@@ -62,15 +62,20 @@ def _read_json(path: Path) -> dict[str, object]:
6262
return json.loads((PLUGIN_ROOT / path).read_text())
6363

6464

65+
def _manifest_skill_path(mcp_host_root: Path, raw_path: str) -> Path:
66+
skill_path = (mcp_host_root / raw_path.removeprefix("./")).resolve()
67+
if skill_path.name != "SKILL.md":
68+
skill_path /= "SKILL.md"
69+
return skill_path
70+
71+
6572
def _manifest_skill_paths(mcp_host: str) -> list[Path]:
6673
manifest = _read_json(MANIFEST_PATHS[mcp_host])
6774
skills = manifest.get("skills", [])
6875
mcp_host_root = PLUGIN_ROOT / mcp_host
6976

7077
if isinstance(skills, list):
71-
return [
72-
(mcp_host_root / skill.removeprefix("./")).resolve() for skill in skills
73-
]
78+
return [_manifest_skill_path(mcp_host_root, skill) for skill in skills]
7479

7580
if isinstance(skills, str):
7681
skill_dir = mcp_host_root / skills.removeprefix("./")

package_validation_tests.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@
2020
}
2121

2222
MANIFEST_PATHS = [
23-
Path("claude/plugin.json"),
23+
Path("claude/.claude-plugin/plugin.json"),
2424
Path("codex/.codex-plugin/plugin.json"),
2525
]
2626

0 commit comments

Comments
 (0)