@askexenow/exe-os 0.9.29 → 0.9.30

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.
package/dist/bin/cli.js CHANGED
@@ -30395,6 +30395,46 @@ status_line = [${DEFAULT_CODEX_STATUS_LINE.map((s) => `"${s}"`).join(", ")}]`;
30395
30395
  await writeFile9(configPath, content);
30396
30396
  return "installed";
30397
30397
  }
30398
+ function desiredCodexMcpSection(serverJsPath) {
30399
+ return [
30400
+ "[mcp_servers.exe-os]",
30401
+ `command = "node"`,
30402
+ `args = ["${serverJsPath}"]`,
30403
+ `startup_timeout_sec = ${CODEX_EXE_MCP_STARTUP_TIMEOUT_SEC}`,
30404
+ `tool_timeout_sec = ${CODEX_EXE_MCP_TOOL_TIMEOUT_SEC}`,
30405
+ ""
30406
+ ].join("\n");
30407
+ }
30408
+ function reconcileCodexMcpSection(sectionContent, serverJsPath) {
30409
+ const desiredLines = {
30410
+ command: `command = "node"`,
30411
+ args: `args = ["${serverJsPath}"]`,
30412
+ startup: `startup_timeout_sec = ${CODEX_EXE_MCP_STARTUP_TIMEOUT_SEC}`,
30413
+ tool: `tool_timeout_sec = ${CODEX_EXE_MCP_TOOL_TIMEOUT_SEC}`
30414
+ };
30415
+ let next = sectionContent;
30416
+ let changed = false;
30417
+ const replaceOrAppend = (regex, desired) => {
30418
+ if (regex.test(next)) {
30419
+ const updated = next.replace(regex, desired);
30420
+ if (updated !== next) {
30421
+ next = updated;
30422
+ changed = true;
30423
+ }
30424
+ return;
30425
+ }
30426
+ next = next.endsWith("\n") ? `${next}${desired}
30427
+ ` : `${next}
30428
+ ${desired}
30429
+ `;
30430
+ changed = true;
30431
+ };
30432
+ replaceOrAppend(/^command\s*=.*$/m, desiredLines.command);
30433
+ replaceOrAppend(/^args\s*=.*$/m, desiredLines.args);
30434
+ replaceOrAppend(/^startup_timeout_sec\s*=.*$/m, desiredLines.startup);
30435
+ replaceOrAppend(/^tool_timeout_sec\s*=.*$/m, desiredLines.tool);
30436
+ return { content: next, changed };
30437
+ }
30398
30438
  async function registerCodexMcpServer(packageRoot, homeDir = os20.homedir()) {
30399
30439
  const codexDir = path45.join(homeDir, ".codex");
30400
30440
  const configPath = path45.join(codexDir, "config.toml");
@@ -30411,21 +30451,15 @@ async function registerCodexMcpServer(packageRoot, homeDir = os20.homedir()) {
30411
30451
  const nextSectionMatch = afterHeader.match(/\n\[(?!mcp_servers\.exe-os)/);
30412
30452
  const sectionEnd = nextSectionMatch ? headerIndex + sectionHeader.length + nextSectionMatch.index : content.length;
30413
30453
  const sectionContent = content.slice(headerIndex, sectionEnd);
30414
- if (sectionContent.includes(serverJsPath)) {
30454
+ const reconciled = reconcileCodexMcpSection(sectionContent, serverJsPath);
30455
+ if (!reconciled.changed) {
30415
30456
  return "already-registered";
30416
30457
  }
30417
- const newSection2 = `${sectionHeader}
30418
- command = "node"
30419
- args = ["${serverJsPath}"]
30420
- `;
30421
- content = content.slice(0, headerIndex) + newSection2 + content.slice(sectionEnd);
30458
+ content = content.slice(0, headerIndex) + reconciled.content + content.slice(sectionEnd);
30422
30459
  await writeFile9(configPath, content);
30423
30460
  return "updated";
30424
30461
  }
30425
- const newSection = `[mcp_servers.exe-os]
30426
- command = "node"
30427
- args = ["${serverJsPath}"]
30428
- `;
30462
+ const newSection = desiredCodexMcpSection(serverJsPath);
30429
30463
  const separator = content.length > 0 && !content.endsWith("\n") ? "\n\n" : content.length > 0 ? "\n" : "";
30430
30464
  content = content + separator + newSection;
30431
30465
  await writeFile9(configPath, content);
@@ -30483,7 +30517,7 @@ async function runCodexInstaller(homeDir) {
30483
30517
  `
30484
30518
  );
30485
30519
  }
30486
- var DEFAULT_CODEX_STATUS_LINE;
30520
+ var DEFAULT_CODEX_STATUS_LINE, CODEX_EXE_MCP_STARTUP_TIMEOUT_SEC, CODEX_EXE_MCP_TOOL_TIMEOUT_SEC;
30487
30521
  var init_installer3 = __esm({
30488
30522
  "src/adapters/codex/installer.ts"() {
30489
30523
  "use strict";
@@ -30497,6 +30531,8 @@ var init_installer3 = __esm({
30497
30531
  "run-state",
30498
30532
  "context-used"
30499
30533
  ];
30534
+ CODEX_EXE_MCP_STARTUP_TIMEOUT_SEC = 30;
30535
+ CODEX_EXE_MCP_TOOL_TIMEOUT_SEC = 120;
30500
30536
  }
30501
30537
  });
30502
30538
 
@@ -3696,6 +3696,46 @@ status_line = [${DEFAULT_CODEX_STATUS_LINE.map((s) => `"${s}"`).join(", ")}]`;
3696
3696
  await writeFile5(configPath, content);
3697
3697
  return "installed";
3698
3698
  }
3699
+ function desiredCodexMcpSection(serverJsPath) {
3700
+ return [
3701
+ "[mcp_servers.exe-os]",
3702
+ `command = "node"`,
3703
+ `args = ["${serverJsPath}"]`,
3704
+ `startup_timeout_sec = ${CODEX_EXE_MCP_STARTUP_TIMEOUT_SEC}`,
3705
+ `tool_timeout_sec = ${CODEX_EXE_MCP_TOOL_TIMEOUT_SEC}`,
3706
+ ""
3707
+ ].join("\n");
3708
+ }
3709
+ function reconcileCodexMcpSection(sectionContent, serverJsPath) {
3710
+ const desiredLines = {
3711
+ command: `command = "node"`,
3712
+ args: `args = ["${serverJsPath}"]`,
3713
+ startup: `startup_timeout_sec = ${CODEX_EXE_MCP_STARTUP_TIMEOUT_SEC}`,
3714
+ tool: `tool_timeout_sec = ${CODEX_EXE_MCP_TOOL_TIMEOUT_SEC}`
3715
+ };
3716
+ let next = sectionContent;
3717
+ let changed = false;
3718
+ const replaceOrAppend = (regex, desired) => {
3719
+ if (regex.test(next)) {
3720
+ const updated = next.replace(regex, desired);
3721
+ if (updated !== next) {
3722
+ next = updated;
3723
+ changed = true;
3724
+ }
3725
+ return;
3726
+ }
3727
+ next = next.endsWith("\n") ? `${next}${desired}
3728
+ ` : `${next}
3729
+ ${desired}
3730
+ `;
3731
+ changed = true;
3732
+ };
3733
+ replaceOrAppend(/^command\s*=.*$/m, desiredLines.command);
3734
+ replaceOrAppend(/^args\s*=.*$/m, desiredLines.args);
3735
+ replaceOrAppend(/^startup_timeout_sec\s*=.*$/m, desiredLines.startup);
3736
+ replaceOrAppend(/^tool_timeout_sec\s*=.*$/m, desiredLines.tool);
3737
+ return { content: next, changed };
3738
+ }
3699
3739
  async function registerCodexMcpServer(packageRoot, homeDir = os10.homedir()) {
3700
3740
  const codexDir = path13.join(homeDir, ".codex");
3701
3741
  const configPath = path13.join(codexDir, "config.toml");
@@ -3712,21 +3752,15 @@ async function registerCodexMcpServer(packageRoot, homeDir = os10.homedir()) {
3712
3752
  const nextSectionMatch = afterHeader.match(/\n\[(?!mcp_servers\.exe-os)/);
3713
3753
  const sectionEnd = nextSectionMatch ? headerIndex + sectionHeader.length + nextSectionMatch.index : content.length;
3714
3754
  const sectionContent = content.slice(headerIndex, sectionEnd);
3715
- if (sectionContent.includes(serverJsPath)) {
3755
+ const reconciled = reconcileCodexMcpSection(sectionContent, serverJsPath);
3756
+ if (!reconciled.changed) {
3716
3757
  return "already-registered";
3717
3758
  }
3718
- const newSection2 = `${sectionHeader}
3719
- command = "node"
3720
- args = ["${serverJsPath}"]
3721
- `;
3722
- content = content.slice(0, headerIndex) + newSection2 + content.slice(sectionEnd);
3759
+ content = content.slice(0, headerIndex) + reconciled.content + content.slice(sectionEnd);
3723
3760
  await writeFile5(configPath, content);
3724
3761
  return "updated";
3725
3762
  }
3726
- const newSection = `[mcp_servers.exe-os]
3727
- command = "node"
3728
- args = ["${serverJsPath}"]
3729
- `;
3763
+ const newSection = desiredCodexMcpSection(serverJsPath);
3730
3764
  const separator = content.length > 0 && !content.endsWith("\n") ? "\n\n" : content.length > 0 ? "\n" : "";
3731
3765
  content = content + separator + newSection;
3732
3766
  await writeFile5(configPath, content);
@@ -3784,7 +3818,7 @@ async function runCodexInstaller(homeDir) {
3784
3818
  `
3785
3819
  );
3786
3820
  }
3787
- var DEFAULT_CODEX_STATUS_LINE;
3821
+ var DEFAULT_CODEX_STATUS_LINE, CODEX_EXE_MCP_STARTUP_TIMEOUT_SEC, CODEX_EXE_MCP_TOOL_TIMEOUT_SEC;
3788
3822
  var init_installer2 = __esm({
3789
3823
  "src/adapters/codex/installer.ts"() {
3790
3824
  "use strict";
@@ -3798,6 +3832,8 @@ var init_installer2 = __esm({
3798
3832
  "run-state",
3799
3833
  "context-used"
3800
3834
  ];
3835
+ CODEX_EXE_MCP_STARTUP_TIMEOUT_SEC = 30;
3836
+ CODEX_EXE_MCP_TOOL_TIMEOUT_SEC = 120;
3801
3837
  }
3802
3838
  });
3803
3839
 
@@ -1585,6 +1585,46 @@ status_line = [${DEFAULT_CODEX_STATUS_LINE.map((s) => `"${s}"`).join(", ")}]`;
1585
1585
  await writeFile4(configPath, content);
1586
1586
  return "installed";
1587
1587
  }
1588
+ function desiredCodexMcpSection(serverJsPath) {
1589
+ return [
1590
+ "[mcp_servers.exe-os]",
1591
+ `command = "node"`,
1592
+ `args = ["${serverJsPath}"]`,
1593
+ `startup_timeout_sec = ${CODEX_EXE_MCP_STARTUP_TIMEOUT_SEC}`,
1594
+ `tool_timeout_sec = ${CODEX_EXE_MCP_TOOL_TIMEOUT_SEC}`,
1595
+ ""
1596
+ ].join("\n");
1597
+ }
1598
+ function reconcileCodexMcpSection(sectionContent, serverJsPath) {
1599
+ const desiredLines = {
1600
+ command: `command = "node"`,
1601
+ args: `args = ["${serverJsPath}"]`,
1602
+ startup: `startup_timeout_sec = ${CODEX_EXE_MCP_STARTUP_TIMEOUT_SEC}`,
1603
+ tool: `tool_timeout_sec = ${CODEX_EXE_MCP_TOOL_TIMEOUT_SEC}`
1604
+ };
1605
+ let next = sectionContent;
1606
+ let changed = false;
1607
+ const replaceOrAppend = (regex, desired) => {
1608
+ if (regex.test(next)) {
1609
+ const updated = next.replace(regex, desired);
1610
+ if (updated !== next) {
1611
+ next = updated;
1612
+ changed = true;
1613
+ }
1614
+ return;
1615
+ }
1616
+ next = next.endsWith("\n") ? `${next}${desired}
1617
+ ` : `${next}
1618
+ ${desired}
1619
+ `;
1620
+ changed = true;
1621
+ };
1622
+ replaceOrAppend(/^command\s*=.*$/m, desiredLines.command);
1623
+ replaceOrAppend(/^args\s*=.*$/m, desiredLines.args);
1624
+ replaceOrAppend(/^startup_timeout_sec\s*=.*$/m, desiredLines.startup);
1625
+ replaceOrAppend(/^tool_timeout_sec\s*=.*$/m, desiredLines.tool);
1626
+ return { content: next, changed };
1627
+ }
1588
1628
  async function registerCodexMcpServer(packageRoot, homeDir = os6.homedir()) {
1589
1629
  const codexDir = path8.join(homeDir, ".codex");
1590
1630
  const configPath = path8.join(codexDir, "config.toml");
@@ -1601,21 +1641,15 @@ async function registerCodexMcpServer(packageRoot, homeDir = os6.homedir()) {
1601
1641
  const nextSectionMatch = afterHeader.match(/\n\[(?!mcp_servers\.exe-os)/);
1602
1642
  const sectionEnd = nextSectionMatch ? headerIndex + sectionHeader.length + nextSectionMatch.index : content.length;
1603
1643
  const sectionContent = content.slice(headerIndex, sectionEnd);
1604
- if (sectionContent.includes(serverJsPath)) {
1644
+ const reconciled = reconcileCodexMcpSection(sectionContent, serverJsPath);
1645
+ if (!reconciled.changed) {
1605
1646
  return "already-registered";
1606
1647
  }
1607
- const newSection2 = `${sectionHeader}
1608
- command = "node"
1609
- args = ["${serverJsPath}"]
1610
- `;
1611
- content = content.slice(0, headerIndex) + newSection2 + content.slice(sectionEnd);
1648
+ content = content.slice(0, headerIndex) + reconciled.content + content.slice(sectionEnd);
1612
1649
  await writeFile4(configPath, content);
1613
1650
  return "updated";
1614
1651
  }
1615
- const newSection = `[mcp_servers.exe-os]
1616
- command = "node"
1617
- args = ["${serverJsPath}"]
1618
- `;
1652
+ const newSection = desiredCodexMcpSection(serverJsPath);
1619
1653
  const separator = content.length > 0 && !content.endsWith("\n") ? "\n\n" : content.length > 0 ? "\n" : "";
1620
1654
  content = content + separator + newSection;
1621
1655
  await writeFile4(configPath, content);
@@ -1673,7 +1707,7 @@ async function runCodexInstaller(homeDir) {
1673
1707
  `
1674
1708
  );
1675
1709
  }
1676
- var DEFAULT_CODEX_STATUS_LINE;
1710
+ var DEFAULT_CODEX_STATUS_LINE, CODEX_EXE_MCP_STARTUP_TIMEOUT_SEC, CODEX_EXE_MCP_TOOL_TIMEOUT_SEC;
1677
1711
  var init_installer2 = __esm({
1678
1712
  "src/adapters/codex/installer.ts"() {
1679
1713
  "use strict";
@@ -1687,6 +1721,8 @@ var init_installer2 = __esm({
1687
1721
  "run-state",
1688
1722
  "context-used"
1689
1723
  ];
1724
+ CODEX_EXE_MCP_STARTUP_TIMEOUT_SEC = 30;
1725
+ CODEX_EXE_MCP_TOOL_TIMEOUT_SEC = 120;
1690
1726
  }
1691
1727
  });
1692
1728
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@askexenow/exe-os",
3
- "version": "0.9.29",
3
+ "version": "0.9.30",
4
4
  "description": "AI employee operating system — persistent memory, task management, and multi-agent coordination for Claude Code.",
5
5
  "license": "SEE LICENSE IN LICENSE",
6
6
  "type": "module",