fix(codex): make marketplace plugin installable

This commit is contained in:
Miky 2026-08-07 10:00:23 +07:00
parent 1d113e46a2
commit 2f72c91fd6
No known key found for this signature in database
GPG Key ID: 9BC4A7EBDB000E4E
4 changed files with 57 additions and 8 deletions

View File

@ -8,11 +8,11 @@
"name": "mempalace",
"source": {
"source": "local",
"path": "./.codex-plugin"
"path": "./"
},
"policy": {
"installation": "AVAILABLE",
"authentication": "NONE"
"authentication": "ON_INSTALL"
},
"category": "Coding"
}

View File

@ -18,12 +18,7 @@
"search"
],
"skills": "./skills/",
"hooks": "./hooks.json",
"mcpServers": {
"mempalace": {
"command": "mempalace-mcp"
}
},
"mcpServers": "./.mcp.json",
"interface": {
"displayName": "MemPalace",
"shortDescription": "AI memory system for Codex",

7
.mcp.json Normal file
View File

@ -0,0 +1,7 @@
{
"mcpServers": {
"mempalace": {
"command": "mempalace-mcp"
}
}
}

View File

@ -0,0 +1,47 @@
"""Contract tests for the Codex plugin marketplace metadata."""
from __future__ import annotations
import json
from pathlib import Path
REPO_ROOT = Path(__file__).resolve().parent.parent
MARKETPLACE_PATH = REPO_ROOT / ".agents" / "plugins" / "marketplace.json"
MANIFEST_PATH = REPO_ROOT / ".codex-plugin" / "plugin.json"
MCP_PATH = REPO_ROOT / ".mcp.json"
def _read_json(path: Path) -> dict:
return json.loads(path.read_text(encoding="utf-8"))
def test_marketplace_entry_uses_supported_codex_schema():
marketplace = _read_json(MARKETPLACE_PATH)
plugin = marketplace["plugins"][0]
assert plugin["name"] == "mempalace"
assert plugin["source"] == {"source": "local", "path": "./"}
assert plugin["policy"] == {
"installation": "AVAILABLE",
"authentication": "ON_INSTALL",
}
def test_plugin_manifest_references_supported_components():
manifest = _read_json(MANIFEST_PATH)
assert manifest["mcpServers"] == "./.mcp.json"
assert "hooks" not in manifest
def test_mcp_config_registers_mempalace_server():
config = _read_json(MCP_PATH)
assert config == {
"mcpServers": {
"mempalace": {
"command": "mempalace-mcp",
}
}
}