@lightcone-ai/daemon 0.23.1 → 0.23.2
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/package.json +1 -1
- package/src/agent-manager.js +7 -0
- package/src/drivers/codex.js +2 -11
package/package.json
CHANGED
package/src/agent-manager.js
CHANGED
|
@@ -707,6 +707,12 @@ export class AgentManager {
|
|
|
707
707
|
|
|
708
708
|
_buildCodexMcpArgs(mcpServers) {
|
|
709
709
|
const args = [];
|
|
710
|
+
// Codex's default tool_timeout_sec for MCP tool calls is short (~120s).
|
|
711
|
+
// Fine for fast tools, but kills slow vision/analysis tools — notably
|
|
712
|
+
// `page-understanding/analyze_page` which takes 5-10 min on long
|
|
713
|
+
// mp.weixin articles. Apply a 900s ceiling to every MCP server here;
|
|
714
|
+
// fast tools return well within this, slow tools stop getting killed.
|
|
715
|
+
const TOOL_TIMEOUT_SEC = 900;
|
|
710
716
|
for (const [serverKey, server] of Object.entries(mcpServers)) {
|
|
711
717
|
const normalizedKey = String(serverKey ?? '').trim();
|
|
712
718
|
if (!normalizedKey) continue;
|
|
@@ -722,6 +728,7 @@ export class AgentManager {
|
|
|
722
728
|
'-c', `mcp_servers.${keyExpr}.command=${commandExpr}`,
|
|
723
729
|
'-c', `mcp_servers.${keyExpr}.args=${argsExpr}`,
|
|
724
730
|
'-c', `mcp_servers.${keyExpr}.enabled=true`,
|
|
731
|
+
'-c', `mcp_servers.${keyExpr}.tool_timeout_sec=${TOOL_TIMEOUT_SEC}`,
|
|
725
732
|
);
|
|
726
733
|
if (server.required === true) {
|
|
727
734
|
args.push('-c', `mcp_servers.${keyExpr}.required=true`);
|
package/src/drivers/codex.js
CHANGED
|
@@ -214,13 +214,6 @@ export function buildCodexSpawn({
|
|
|
214
214
|
authToken: config.authToken || machineApiKey,
|
|
215
215
|
});
|
|
216
216
|
|
|
217
|
-
// Codex's default tool_timeout_sec for MCP tool calls is 60-120s. That's
|
|
218
|
-
// fine for fast tools (chat, db, etc) but breaks slow vision/analysis
|
|
219
|
-
// tools — notably `page-understanding/analyze_page` which takes 5-10 min
|
|
220
|
-
// on long mp.weixin articles (4 chunks × 1.6MB PNG → Claude vision OCR).
|
|
221
|
-
// Apply a generous 900s ceiling to every skill MCP server. Fast tools
|
|
222
|
-
// return well within this; slow tools no longer get prematurely killed.
|
|
223
|
-
const SKILL_TOOL_TIMEOUT_SEC = 900;
|
|
224
217
|
for (const [serverKey, mc] of Object.entries(skillMcpServers)) {
|
|
225
218
|
const keyExpr = formatCodexServerKey(serverKey);
|
|
226
219
|
if (!keyExpr) continue;
|
|
@@ -229,16 +222,14 @@ export function buildCodexSpawn({
|
|
|
229
222
|
args.push(
|
|
230
223
|
'-c', `mcp_servers.${keyExpr}.command=${quote('env')}`,
|
|
231
224
|
'-c', `mcp_servers.${keyExpr}.args=${quote([...envPairs, mc.command, ...(mc.args ?? [])])}`,
|
|
232
|
-
'-c', `mcp_servers.${keyExpr}.enabled=true
|
|
233
|
-
'-c', `mcp_servers.${keyExpr}.tool_timeout_sec=${SKILL_TOOL_TIMEOUT_SEC}`
|
|
225
|
+
'-c', `mcp_servers.${keyExpr}.enabled=true`
|
|
234
226
|
);
|
|
235
227
|
continue;
|
|
236
228
|
}
|
|
237
229
|
args.push(
|
|
238
230
|
'-c', `mcp_servers.${keyExpr}.command=${quote(mc.command)}`,
|
|
239
231
|
'-c', `mcp_servers.${keyExpr}.args=${quote(mc.args ?? [])}`,
|
|
240
|
-
'-c', `mcp_servers.${keyExpr}.enabled=true
|
|
241
|
-
'-c', `mcp_servers.${keyExpr}.tool_timeout_sec=${SKILL_TOOL_TIMEOUT_SEC}`
|
|
232
|
+
'-c', `mcp_servers.${keyExpr}.enabled=true`
|
|
242
233
|
);
|
|
243
234
|
}
|
|
244
235
|
|