From ee5c2daa28e081408c6e87e4e261689ad6c45314 Mon Sep 17 00:00:00 2001 From: StillHammer Date: Sun, 25 Jan 2026 11:47:45 +0700 Subject: [PATCH] Set minimum listen timeout to 10 minutes --- README.md | 2 +- broker/index.js | 4 ++-- mcp-partner/tools/listen.js | 4 ++-- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/README.md b/README.md index 607da2d..76a533b 100644 --- a/README.md +++ b/README.md @@ -85,7 +85,7 @@ listen() |------|-------------| | `register(name?)` | Register with the network (optional, auto on startup) | | `talk(message, to?, conversation?)` | Send a message | -| `listen(conversation?, timeout?)` | Listen for messages (2-60 min timeout, default 30) | +| `listen(conversation?, timeout?)` | Listen for messages (10-60 min timeout, default 30) | | `list_partners()` | List connected partners | ### Conversations diff --git a/broker/index.js b/broker/index.js index 4b23664..211b721 100644 --- a/broker/index.js +++ b/broker/index.js @@ -245,9 +245,9 @@ app.get("/listen/:partnerId", (req, res) => { const { partnerId } = req.params; const { conversationId } = req.query; - // Timeout en minutes (min 2, max 60, défaut 30) + // Timeout en minutes (min 10, max 60, défaut 30) let timeoutMinutes = parseInt(req.query.timeout) || 30; - timeoutMinutes = Math.max(2, Math.min(60, timeoutMinutes)); + timeoutMinutes = Math.max(10, Math.min(60, timeoutMinutes)); const timeoutMs = timeoutMinutes * 60 * 1000; DB.setPartnerOnline(partnerId); diff --git a/mcp-partner/tools/listen.js b/mcp-partner/tools/listen.js index 16d9b52..5949cb8 100644 --- a/mcp-partner/tools/listen.js +++ b/mcp-partner/tools/listen.js @@ -12,7 +12,7 @@ export const definition = { }, timeout: { type: "number", - description: "Timeout en minutes (min: 2, max: 60, défaut: 30)", + description: "Timeout en minutes (min: 10, max: 60, défaut: 30)", }, }, }, @@ -23,7 +23,7 @@ export async function handler(args) { await ensureRegistered(); let timeoutMinutes = args.timeout || 30; - timeoutMinutes = Math.max(2, Math.min(60, timeoutMinutes)); + timeoutMinutes = Math.max(10, Math.min(60, timeoutMinutes)); let url = `/listen/${myId}?timeout=${timeoutMinutes}`; if (args.conversation) {