delimit-cli 3.14.40 → 3.14.41

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.
@@ -322,19 +322,32 @@ async function main() {
322
322
  const serverDir = path.join(DELIMIT_HOME, 'server');
323
323
  const correctEntry = `\n[mcp_servers.delimit]\ncommand = "${python}"\nargs = ["${actualServer}"]\ncwd = "${serverDir}"\n\n[mcp_servers.delimit.env]\nPYTHONPATH = "${serverDir}:${path.join(serverDir, 'ai')}"\n`;
324
324
 
325
- if (toml.includes('[mcp_servers.delimit]')) {
326
- // Remove old entry and replace with correct paths for this machine
327
- toml = toml.replace(/\[mcp_servers\.delimit\][\s\S]*?(?=\n\[|\n*$)/, '').trim();
328
- toml += correctEntry;
329
- fs.writeFileSync(CODEX_CONFIG, toml, { mode: 0o644 });
330
- await logp(` ${green('✓')} Updated Delimit paths in Codex config`);
331
- configuredTools.push('Codex');
332
- } else {
333
- toml += correctEntry;
334
- fs.writeFileSync(CODEX_CONFIG, toml, { mode: 0o644 });
335
- await logp(` ${green('')} Added delimit to Codex (${CODEX_CONFIG})`);
336
- configuredTools.push('Codex');
325
+ // Remove ALL existing delimit MCP entries (prevents duplicates)
326
+ const existed = toml.includes('mcp_servers.delimit');
327
+ const lines = toml.split('\n');
328
+ const cleaned = [];
329
+ let skipBlock = false;
330
+ for (const line of lines) {
331
+ if (line.match(/^\[mcp_servers\.delimit/)) {
332
+ skipBlock = true;
333
+ continue;
334
+ }
335
+ if (skipBlock && (line.startsWith('[') || line.trim() === '')) {
336
+ if (line.startsWith('[') && !line.match(/^\[mcp_servers\.delimit/)) {
337
+ skipBlock = false;
338
+ cleaned.push(line);
339
+ }
340
+ continue;
341
+ }
342
+ if (!skipBlock) {
343
+ cleaned.push(line);
344
+ }
337
345
  }
346
+ toml = cleaned.join('\n').replace(/\n{3,}/g, '\n\n').trim();
347
+ toml += correctEntry;
348
+ fs.writeFileSync(CODEX_CONFIG, toml, { mode: 0o644 });
349
+ await logp(` ${green('✓')} ${existed ? 'Updated' : 'Added'} Delimit in Codex config`);
350
+ configuredTools.push('Codex');
338
351
  } catch (e) {
339
352
  log(` ${yellow('!')} Could not configure Codex: ${e.message}`);
340
353
  }
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "delimit-cli",
3
3
  "mcpName": "io.github.delimit-ai/delimit-mcp-server",
4
- "version": "3.14.40",
4
+ "version": "3.14.41",
5
5
  "description": "Unify Claude Code, Codex, Cursor, and Gemini CLI with persistent context, governance, and multi-model debate.",
6
6
  "main": "index.js",
7
7
  "files": [