Skip to content
Merged
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.18",
"version": "0.7.19",
"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 @@ -58,6 +58,10 @@ An unconfirmed outcome is still never replayed, but it no longer leaves its batc

Two bounds are worth knowing. The archive keeps at most 1,000 records, so a `request_id` older than that is no longer known and its work would start again. A build older than this one does not read the archive at all, so after a downgrade an archived `request_id` can run again.

## 0.7.19 The mention rule, read by the script that writes the word

0.7.16 started to read the character in front of the `@` as a word of any script, so a letter of a script that writes with spaces (`josé@alice`) makes an address and calls nobody. This release completes that: a full-width IME writes full-width letters and digits (`OK@某人`), and Thai, Lao, Khmer and Myanmar write a word right up against the `@` as Chinese does, so those characters do not swallow the mention either.

## 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
6 changes: 4 additions & 2 deletions plugins/minimax-ai/minimax-bot/miniapp/node/engine.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -1205,9 +1205,11 @@ export class Engine {
const isWord = (value) => Boolean(value && /[\p{L}\p{N}\p{M}_]/u.test(value));
// Chinese, Japanese kana and Korean write a word right up against the '@' without a space
// ("请@某人"), so a character of those scripts does not belong to an address and must not
// swallow the mention. Any other word character in front of the '@' does belong to one
// swallow the mention. Thai, Lao, Khmer and Myanmar write the same way. The full-width and
// half-width forms are what a full-width IME produces ("OK@某人"), and they stand in the
// same place. Any other word character in front of the '@' does belong to an address
// ("mail@alice.com", "josé@alice").
const isSpaceless = (value) => Boolean(value && /[\p{Script_Extensions=Han}\p{Script_Extensions=Hiragana}\p{Script_Extensions=Katakana}\p{Script_Extensions=Hangul}]/u.test(value));
const isSpaceless = (value) => Boolean(value && /[\p{Script_Extensions=Han}\p{Script_Extensions=Hiragana}\p{Script_Extensions=Katakana}\p{Script_Extensions=Hangul}\p{Script_Extensions=Thai}\p{Script_Extensions=Lao}\p{Script_Extensions=Khmer}\p{Script_Extensions=Myanmar}\uFF00-\uFFEF]/u.test(value));
const isAddressChar = (value) => isWord(value) && !isSpaceless(value);
const found = [];
for (let index = lower.indexOf('@'); index >= 0; index = lower.indexOf('@', index + 1)) {
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.18' },
serverInfo: { name: 'minimax-bot', version: '0.7.19' },
instructions: t('mcp.instructions'),
};
break;
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.18",
"version": "0.7.19",
"private": true,
"type": "module",
"mcode": {
Expand Down
14 changes: 14 additions & 0 deletions plugins/minimax-ai/minimax-bot/tests/mention-nonascii.test.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,20 @@ test('a letter of a script that writes with spaces makes an address, not a menti
assert.deepEqual(engine.mentionsIn('josé@alice @bob', group), ['bob']);
});

test('a full-width IME and the scripts that write up against the "@" still reach the member', async (t) => {
const { engine, group } = await fixture(t);
// A full-width IME writes full-width letters and digits.
assert.deepEqual(engine.mentionsIn('OK@alice', group), ['alice']);
assert.deepEqual(engine.mentionsIn('第2@alice', group), ['alice']);
// Thai, Lao, Khmer and Myanmar write a word right up against the "@" as well.
assert.deepEqual(engine.mentionsIn('\u0e02\u0e2d\u0e1a\u0e38\u0e19@alice', group), ['alice']);
assert.deepEqual(engine.mentionsIn('\u0e82\u0eb2\u0e99@alice', group), ['alice']);
assert.deepEqual(engine.mentionsIn('\u17e1\u179c\u17b7@alice', group), ['alice']);
assert.deepEqual(engine.mentionsIn('\u1000\u103b\u102c\u1019\u1038@alice', group), ['alice']);
// A letter of a script that writes with spaces still makes an address.
assert.deepEqual(engine.mentionsIn('josé@alice', group), []);
});

test('Chinese, Japanese and Korean write up against the "@" and still reach the member', async (t) => {
const { engine, group } = await fixture(t);
assert.deepEqual(engine.mentionsIn('请@alice', group), ['alice']);
Expand Down
Loading