diff --git a/plugins/minimax-ai/minimax-bot/.minimax-plugin/plugin.json b/plugins/minimax-ai/minimax-bot/.minimax-plugin/plugin.json index bdc8e0b7..5bae125d 100644 --- a/plugins/minimax-ai/minimax-bot/.minimax-plugin/plugin.json +++ b/plugins/minimax-ai/minimax-bot/.minimax-plugin/plugin.json @@ -2,7 +2,7 @@ "schemaVersion": 1, "name": "minimax-bot", "displayName": "MiniMax Bot", - "version": "0.7.34", + "version": "0.7.36", "description": "Turn MiniMax Code into an always-on team of Bots. A Chief Bot helps you build the team; in group chats the admin answers and @mentions hand work to other members. Every Bot has its own octopus avatar and memory, with scheduled tasks and usage stats.", "author": "MiniMax Code", "icon": "icon.png", diff --git a/plugins/minimax-ai/minimax-bot/README.md b/plugins/minimax-ai/minimax-bot/README.md index 857f7562..b8476500 100644 --- a/plugins/minimax-ai/minimax-bot/README.md +++ b/plugins/minimax-ai/minimax-bot/README.md @@ -127,6 +127,11 @@ The hand-over between two Bots of a group carried the tail of the previous reply - When a turn failed, the user's message kept the failed delivery state even after the reply was retried successfully: the chat showed a reply next to an input still marked as not delivered, and the line stayed that way for good. - A retry that reaches the Host now marks the request it answered as delivered, so the badge matches what happened. Only a line still carrying the first attempt's verdict is changed; anything a later action wrote stays as it is. +## 0.7.36 A shortened task result says that it was shortened + +- The report a finished task batch hands back was trimmed to 4,000 characters per task without saying so. The task record already carries a marker when it had to shorten a result itself, and the report did not consult it, so a reader had no way to tell "this is the whole answer" from "this is the first part of it". +- A result that was cut now ends with the same truncation mark the rest of the plugin uses. A result that fits is unchanged, and the full text is still read back with `get_tasks`. + ## 0.7.10 Optional group notes - A group can keep a note of what it said. After every round the group records the closing lines of the replies, and every Bot of the group gets that record in its standing brief. diff --git a/plugins/minimax-ai/minimax-bot/miniapp/node/mcp.mjs b/plugins/minimax-ai/minimax-bot/miniapp/node/mcp.mjs index 0085b970..8a836bdd 100644 --- a/plugins/minimax-ai/minimax-bot/miniapp/node/mcp.mjs +++ b/plugins/minimax-ai/minimax-bot/miniapp/node/mcp.mjs @@ -662,7 +662,7 @@ export function createMcpHandler({ team, engine }) { result = { protocolVersion: PROTOCOL_VERSIONS.includes(requested) ? requested : PROTOCOL_VERSIONS[0], capabilities: { tools: { listChanged: false } }, - serverInfo: { name: 'minimax-bot', version: '0.7.34' }, + serverInfo: { name: 'minimax-bot', version: '0.7.36' }, instructions: t('mcp.instructions'), }; break; diff --git a/plugins/minimax-ai/minimax-bot/miniapp/node/task-dispatcher.mjs b/plugins/minimax-ai/minimax-bot/miniapp/node/task-dispatcher.mjs index 8fd3339d..c6970ea3 100644 --- a/plugins/minimax-ai/minimax-bot/miniapp/node/task-dispatcher.mjs +++ b/plugins/minimax-ai/minimax-bot/miniapp/node/task-dispatcher.mjs @@ -201,7 +201,13 @@ export class TaskDispatcher { batchReport(batch) { return reportBody(t("task.results", { id: batch.id }) + "\n" + batch.tasks.map((task) => { - const report = `${this.store.getBot(task.botId)?.name ?? task.title} [${task.status}] (${task.id})\n${clip(task.result || task.error || "-", 4000)}`; + const stored = String(task.result || task.error || "-"); + // The report carries the first part of each result. Saying so matters: the task record may + // already hold a shortened copy (`resultTruncated`), and this window is shorter still, so a + // reader who is not told would take the cut for the end of the work. + const shown = clip(stored, 4000); + const cut = shown.length < stored.length || task.resultTruncated; + const report = `${this.store.getBot(task.botId)?.name ?? task.title} [${task.status}] (${task.id})\n${shown}${cut ? `\n${t("clip.truncated")}` : ""}`; // An unconfirmed outcome has no output to show: say so instead of a bare status code. return task.status === "unknown" ? `${report}\n${t("task.unknownOutcome")}` : report; }).join("\n\n")); diff --git a/plugins/minimax-ai/minimax-bot/package.json b/plugins/minimax-ai/minimax-bot/package.json index 402077f4..a297a586 100644 --- a/plugins/minimax-ai/minimax-bot/package.json +++ b/plugins/minimax-ai/minimax-bot/package.json @@ -1,6 +1,6 @@ { "name": "minimax-bot", - "version": "0.7.34", + "version": "0.7.36", "private": true, "type": "module", "mcode": { diff --git a/plugins/minimax-ai/minimax-bot/tests/task-lifecycle.test.mjs b/plugins/minimax-ai/minimax-bot/tests/task-lifecycle.test.mjs index 68ac7591..45fa988f 100644 --- a/plugins/minimax-ai/minimax-bot/tests/task-lifecycle.test.mjs +++ b/plugins/minimax-ai/minimax-bot/tests/task-lifecycle.test.mjs @@ -1035,3 +1035,27 @@ for (const continuation of ["questionnaire", "dependency verification"]) { await recoveredStore.writeChain; }); } + +test("a report that had to shorten a result says so", async (t) => { + const { engine } = await fixture(t); + const long = "x".repeat(9000); + const batch = { + id: "batch_clip", + tasks: [ + // Longer than the report window and already shortened in the record: both are silent cuts. + { id: "task_long", botId: "bot_b", status: "done", result: long.slice(0, 8000), resultTruncated: true }, + // Longer than the report window only. + { id: "task_window", botId: "bot_b", status: "done", result: long.slice(0, 5000) }, + // Short enough: nothing was cut, so nothing is said. + { id: "task_short", botId: "bot_b", status: "done", result: "All good" }, + ], + }; + + const report = engine.tasks.batchReport(batch); + const [longPart, windowPart, shortPart] = report.split("\n\n"); + + assert.ok(longPart.includes("(truncated)"), "a result shortened in the record says so"); + assert.ok(windowPart.includes("(truncated)"), "a result longer than the report window says so"); + assert.ok(!shortPart.includes("(truncated)"), "a result that fits is not marked"); + assert.ok(shortPart.includes("All good"), "a short result is still shown in full"); +});