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.38",
"version": "0.7.40",
"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
4 changes: 4 additions & 0 deletions plugins/minimax-ai/minimax-bot/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -155,6 +155,10 @@ The hand-over between two Bots of a group carried the tail of the previous reply
- Asking to let a stuck chat go now shows on the page that it took: the message says the later messages may go on, and the button is gone. A message that arrives while that is being written goes out with it, instead of waiting for a second press of the button.
- A job that was stopped and then killed by the process still leaves its turn in the usage ledger. The row is written under the job's own id, so a job that did finish is not counted twice.
- Nothing else moves: a request with an unknown outcome is still never replayed on its own, and the order of the messages around it is unchanged.
## 0.7.40 A value that is not there is left out, not refused

- The reply mode of a group and the kind of a scheduled task are checked against the values the catalogue offers, so a value that is not one of them is refused instead of quietly becoming another one. A value that is not there at all was refused too, when it arrived as null: many models write an optional field they did not fill in as null, and the call failed with "reply_mode must be one of: admin, all".
- A null is now read as what it is — a field that was left out — so the default applies, the same as when the field is absent. A value that is there but is not one of the allowed ones is still refused, and so is the text "null".

## 0.7.10 Optional group notes

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.38' },
serverInfo: { name: 'minimax-bot', version: '0.7.40' },
instructions: t('mcp.instructions'),
};
break;
Expand Down
9 changes: 5 additions & 4 deletions plugins/minimax-ai/minimax-bot/miniapp/node/team.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -372,7 +372,7 @@ export class Team {
notice: String(input.notice ?? '').trim().slice(0, 500),
adminId,
memberIds,
replyMode: input.replyMode === undefined ? 'admin' : replyModeOf(input.replyMode),
replyMode: input.replyMode == null ? 'admin' : replyModeOf(input.replyMode),
pinned: false,
createdAt: Date.now(),
// F7 · the relay guardrails. The hop limit counts how many Bots may speak in one relay
Expand Down Expand Up @@ -419,7 +419,7 @@ export class Team {
const draft = { ...group, memberIds: [...group.memberIds] };
if (patch.name !== undefined) draft.name = this.validateName(patch.name, 'group', group.id);
if (patch.notice !== undefined) draft.notice = String(patch.notice).trim().slice(0, 500);
if (patch.replyMode !== undefined) draft.replyMode = replyModeOf(patch.replyMode);
if (patch.replyMode != null) draft.replyMode = replyModeOf(patch.replyMode);
if (patch.pinned !== undefined) draft.pinned = Boolean(patch.pinned);
// The relay guardrails: absent leaves the group's own setting alone. 0 = no limit.
if (patch.maxHops !== undefined) draft.maxHops = hopLimit({ maxHops: patch.maxHops });
Expand Down Expand Up @@ -593,8 +593,9 @@ export class Team {
const list = this.store.state.schedules;
const existing = input.id ? list.find((s) => s.id === input.id) : undefined;
// No kind at all is the daily default. A kind that is not one of the three is refused:
// another kind would run at a time the user never asked for.
const kind = input.kind === undefined ? 'daily' : scheduleKindOf(input.kind);
// another kind would run at a time the user never asked for. A kind that is not there at
// all — left out, or sent as null — is the same thing as leaving it out.
const kind = input.kind == null ? 'daily' : scheduleKindOf(input.kind);
const time = String(input.time ?? '09:00');
if (kind === 'daily' && !/^([01]\d|2[0-3]):[0-5]\d$/.test(time)) {
throw new EngineError('invalid', t('err.scheduleTime'));
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.38",
"version": "0.7.40",
"private": true,
"type": "module",
"mcode": {
Expand Down
29 changes: 29 additions & 0 deletions plugins/minimax-ai/minimax-bot/tests/enum-validation.test.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -273,3 +273,32 @@ test('the refusals are written in the user\'s language', async (t) => {
(error) => { assert.equal(error.code, 'invalid'); assert.match(error.message, /admin/); return true; },
);
});

test('a value that is not there at all is left out, not refused', async (t) => {
const { team } = await teamFixture(t);
const bot = await writer(team);
// A model that leaves an optional field out often writes it as null. That is the same as
// leaving it out, so the default applies. A value that is there but wrong is still refused.
const group = await team.createGroup(undefined, { name: 'NullMode', members: [bot.id], replyMode: null });
assert.equal(group.replyMode, 'admin', 'the default applies to a reply mode sent as null');
const schedule = await team.saveSchedule({ botId: bot.id, prompt: 'Daily digest', kind: null });
assert.equal(schedule.kind, 'daily', 'the default applies to a kind sent as null');

// A value that is there but not one of the allowed ones is still refused.
await assert.rejects(
() => team.createGroup(undefined, { name: 'WrongMode', members: [bot.id], replyMode: 'everyone' }),
(error) => { assert.equal(error.code, 'invalid'); return true; },
);
await assert.rejects(
() => team.saveSchedule({ botId: bot.id, prompt: 'Report', kind: 'hourly' }),
(error) => { assert.equal(error.code, 'invalid'); return true; },
);
});

test('a reply mode sent as null leaves an existing group with the setting it had', async (t) => {
const { team } = await teamFixture(t);
const bot = await writer(team);
const group = await team.createGroup(undefined, { name: 'Crew', members: [bot.id], replyMode: 'all' });
const updated = await team.updateGroup(undefined, group.id, { replyMode: null });
assert.equal(updated.replyMode, 'all', 'the mode the group had is kept');
});