fix(codex): make mem-search MCP startup self-locating
This commit is contained in:
@@ -37,8 +37,12 @@ describe('Plugin Distribution - Skills', () => {
|
||||
describe('Plugin Distribution - Required Files', () => {
|
||||
const requiredFiles = [
|
||||
'plugin/hooks/hooks.json',
|
||||
'plugin/hooks/codex-hooks.json',
|
||||
'plugin/.claude-plugin/plugin.json',
|
||||
'plugin/.codex-plugin/plugin.json',
|
||||
'plugin/.mcp.json',
|
||||
'plugin/skills/mem-search/SKILL.md',
|
||||
'.agents/plugins/marketplace.json',
|
||||
];
|
||||
|
||||
for (const filePath of requiredFiles) {
|
||||
@@ -49,6 +53,25 @@ describe('Plugin Distribution - Required Files', () => {
|
||||
}
|
||||
});
|
||||
|
||||
describe('Plugin Distribution - Codex Marketplace', () => {
|
||||
it('points Codex at the bundled plugin root', () => {
|
||||
const marketplacePath = path.join(projectRoot, '.agents/plugins/marketplace.json');
|
||||
const marketplace = JSON.parse(readFileSync(marketplacePath, 'utf-8'));
|
||||
|
||||
expect(marketplace.plugins[0].source.path).toBe('./plugin');
|
||||
});
|
||||
|
||||
it('MCP launcher can recover without plugin root environment variables', () => {
|
||||
const mcpPath = path.join(projectRoot, 'plugin/.mcp.json');
|
||||
const mcp = JSON.parse(readFileSync(mcpPath, 'utf-8'));
|
||||
const command = mcp.mcpServers['mcp-search'].args.join(' ');
|
||||
|
||||
expect(command).toContain('.codex/plugins/cache/claude-mem-local/claude-mem');
|
||||
expect(command).toContain('.claude/plugins/cache/thedotmack/claude-mem');
|
||||
expect(command).toContain('claude-mem MCP server not found');
|
||||
});
|
||||
});
|
||||
|
||||
describe('Plugin Distribution - hooks.json Integrity', () => {
|
||||
it('should have valid JSON in hooks.json', () => {
|
||||
const hooksPath = path.join(projectRoot, 'plugin/hooks/hooks.json');
|
||||
@@ -108,11 +131,15 @@ describe('Plugin Distribution - hooks.json Integrity', () => {
|
||||
});
|
||||
|
||||
describe('Plugin Distribution - package.json Files Field', () => {
|
||||
it('should include "plugin" in root package.json files field', () => {
|
||||
it('should include bundled plugin entries in root package.json files field', () => {
|
||||
const packageJsonPath = path.join(projectRoot, 'package.json');
|
||||
const packageJson = JSON.parse(readFileSync(packageJsonPath, 'utf-8'));
|
||||
expect(packageJson.files).toBeDefined();
|
||||
expect(packageJson.files).toContain('plugin');
|
||||
expect(packageJson.files).toContain('plugin/.codex-plugin');
|
||||
expect(packageJson.files).toContain('plugin/.mcp.json');
|
||||
expect(packageJson.files).toContain('plugin/hooks');
|
||||
expect(packageJson.files).toContain('plugin/skills');
|
||||
expect(packageJson.files).toContain('plugin/scripts/*.cjs');
|
||||
});
|
||||
});
|
||||
|
||||
|
||||
Reference in New Issue
Block a user