Skip to content
Open
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions src/npx-cli/commands/install.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1599,6 +1599,7 @@ async function runInstallCommandInner(options: InstallOptions, summary: InstallS
}
writeInstallMarker(cacheDir, version, bunVersion, uvVersion);
}
writeInstallMarker(join(marketplaceDirectory(), 'plugin'), version, bunVersion, uvVersion);
return `Runtime ready (Bun ${bunVersion}, uv ${uvVersion}) ${pc.green('OK')}`;
},
},
Expand Down
6 changes: 3 additions & 3 deletions src/services/integrations/CodexCliInstaller.ts
Original file line number Diff line number Diff line change
Expand Up @@ -420,9 +420,9 @@ export async function installCodexCli(marketplaceRootOverride?: string): Promise
registerCodexMarketplace(marketplaceRoot);
enableCodexPluginConfig();
runCodexBestEffort(
['plugin', 'marketplace', 'upgrade', MARKETPLACE_NAME],
'Refreshed Codex marketplace and installed plugin cache.',
'Could not refresh Codex marketplace cache; reinstall or upgrade claude-mem from /plugins if Codex still uses old MCP config',
['plugin', 'add', CODEX_PLUGIN_ID],
'Installed Codex plugin cache.',
`Could not install Codex plugin cache; run: codex plugin add ${CODEX_PLUGIN_ID}`,
);
Comment thread
greptile-apps[bot] marked this conversation as resolved.
Outdated
if (!cleanupLegacyCodexAgentsMdContext()) {
console.warn(` Native Codex hooks registered, but failed to remove legacy AGENTS.md context from ${CODEX_AGENTS_MD_PATH}.`);
Expand Down
14 changes: 11 additions & 3 deletions tests/install-non-tty.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -147,13 +147,21 @@ describe('Install Non-TTY Support', () => {
expect(installSource).toContain('installCodexCli(marketplaceDirectory())');
});

it('refreshes Codex marketplace cache after registration', () => {
it('installs the Codex plugin cache after local marketplace registration', () => {
const installRegion = codexInstallerSource.slice(
codexInstallerSource.indexOf('export async function installCodexCli'),
codexInstallerSource.indexOf('export function uninstallCodexCli'),
);
expect(installRegion).toContain("['plugin', 'marketplace', 'upgrade', MARKETPLACE_NAME]");
expect(installRegion).toContain('installed plugin cache');
expect(installRegion).toContain("['plugin', 'add', CODEX_PLUGIN_ID]");
expect(installRegion).not.toContain("['plugin', 'marketplace', 'upgrade', MARKETPLACE_NAME]");
});

it('copies the install marker into the bundled marketplace plugin before Codex installs it', () => {
const runtimeSetupRegion = installSource.slice(
installSource.indexOf("title: 'Setting up runtime"),
installSource.indexOf("return `Runtime ready"),
);
expect(runtimeSetupRegion).toContain("writeInstallMarker(join(marketplaceDirectory(), 'plugin'), version, bunVersion, uvVersion)");
});

it('replaces stale Codex marketplace registrations from a different source', () => {
Expand Down