Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion plugins/minimax-ai/minimax-bot/.minimax-plugin/plugin.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"schemaVersion": 1,
"name": "minimax-bot",
"displayName": "MiniMax Bot",
"version": "0.7.32",
"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",
Expand Down
5 changes: 5 additions & 0 deletions plugins/minimax-ai/minimax-bot/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -116,6 +116,11 @@ The hand-over between two Bots of a group carried the tail of the previous reply
- Two writes the plugin fires and forgets had nothing to catch their failure: the session id recorded when a turn starts, and the scheduled-task scan that runs every 30 seconds. A failed write there became an unhandled rejection, and the Host fails the whole Mini App process on one of those — so a disk that would not take a write took every running turn with it, and the scheduled task kept retrying every 30 seconds.
- Both now report the failure through the plugin log, the way the task save next to one of them already did. The turn carries on, and the scan keeps running.

## 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.
Expand Down
2 changes: 1 addition & 1 deletion plugins/minimax-ai/minimax-bot/miniapp/node/mcp.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -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.32' },
serverInfo: { name: 'minimax-bot', version: '0.7.36' },
instructions: t('mcp.instructions'),
};
break;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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"));
Expand Down
2 changes: 1 addition & 1 deletion plugins/minimax-ai/minimax-bot/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "minimax-bot",
"version": "0.7.32",
"version": "0.7.36",
"private": true,
"type": "module",
"mcode": {
Expand Down
24 changes: 24 additions & 0 deletions plugins/minimax-ai/minimax-bot/tests/task-lifecycle.test.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -1033,3 +1033,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");
});