@mintlify/cli 4.0.1776 → 4.0.1778

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -185,6 +185,16 @@ describe('agent setup MCP configuration', () => {
185
185
  }
186
186
  );
187
187
 
188
+ it('refuses to extend an inline Codex mcp_servers table', async () => {
189
+ const original = 'mcp_servers = { other = { url = "https://example.com/mcp" } }\n';
190
+ await fixture(path.join(cwd, '.codex/config.toml'), original);
191
+
192
+ await expect(prepareMcpConfig('codex', options())).rejects.toThrow(
193
+ `Add a ${ADMIN_MCP_NAME} entry with url = "${ADMIN_MCP_URL}" to mcp_servers manually.`
194
+ );
195
+ expect(await fs.readFile(path.join(cwd, '.codex/config.toml'), 'utf8')).toBe(original);
196
+ });
197
+
188
198
  it('skips a matching Codex server without enabling or rewriting it', async () => {
189
199
  const original = `[mcp_servers.${ADMIN_MCP_NAME}]\nurl = "${ADMIN_MCP_URL}"\nenabled = false\nstartup_timeout_sec = 20\n`;
190
200
  await fixture(path.join(cwd, '.codex/config.toml'), original);
@@ -100,7 +100,7 @@ export function prepareMcpConfig(agent, options) {
100
100
  parseToml(contents);
101
101
  }
102
102
  catch (_b) {
103
- throw new Error(`Cannot safely extend ${file}. Add [mcp_servers.${ADMIN_MCP_NAME}] with url = "${ADMIN_MCP_URL}" manually.`);
103
+ throw new Error(`Cannot safely extend ${file}. Add a ${ADMIN_MCP_NAME} entry with url = "${ADMIN_MCP_URL}" to mcp_servers manually.`);
104
104
  }
105
105
  }
106
106
  else {