diff --git a/plugins/minimax-ai/minimax-bot/.minimax-plugin/plugin.json b/plugins/minimax-ai/minimax-bot/.minimax-plugin/plugin.json index c98f2705..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.35", + "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 4183ebac..e7f6907d 100644 --- a/plugins/minimax-ai/minimax-bot/README.md +++ b/plugins/minimax-ai/minimax-bot/README.md @@ -134,6 +134,11 @@ The hand-over between two Bots of a group carried the tail of the previous reply - A pass is no longer kept as the round's result, so a round that ends on a pass keeps the last thing that was really said. The pass itself is still marked and still skipped: nothing changes about who speaks. - A round in which every member passed still finished, so it ends as a finished round with an empty reply — not as a turn that never reached the Agent. Before this section, such a round settled its task as `cancelled`; it settles as `done` now. +## 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 bdc9f9e4..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.35' }, + 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 a34e286d..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.35", + "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 5d52438f..ed1a8023 100644 --- a/plugins/minimax-ai/minimax-bot/tests/task-lifecycle.test.mjs +++ b/plugins/minimax-ai/minimax-bot/tests/task-lifecycle.test.mjs @@ -1055,3 +1055,27 @@ test("a discussion in which every member passes finishes as done with an empty r assert.ok(passes.length >= 1, "the member's pass is still in the chat, marked as a pass"); assert.ok(passes.every((message) => /^\s*\[?PASS\]?\s*[.。]?\s*$/i.test(message.text))); }); + +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"); +});