diff --git a/plugins/minimax-ai/minimax-bot/.minimax-plugin/plugin.json b/plugins/minimax-ai/minimax-bot/.minimax-plugin/plugin.json index b6285c4..b914bff 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.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", diff --git a/plugins/minimax-ai/minimax-bot/README.md b/plugins/minimax-ai/minimax-bot/README.md index 638dec4..3f56e1e 100644 --- a/plugins/minimax-ai/minimax-bot/README.md +++ b/plugins/minimax-ai/minimax-bot/README.md @@ -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. diff --git a/plugins/minimax-ai/minimax-bot/miniapp/node/engine.mjs b/plugins/minimax-ai/minimax-bot/miniapp/node/engine.mjs index 73dddf6..cee96f1 100644 --- a/plugins/minimax-ai/minimax-bot/miniapp/node/engine.mjs +++ b/plugins/minimax-ai/minimax-bot/miniapp/node/engine.mjs @@ -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)) { diff --git a/plugins/minimax-ai/minimax-bot/miniapp/node/mcp.mjs b/plugins/minimax-ai/minimax-bot/miniapp/node/mcp.mjs index e0ff4d1..be20894 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.18' }, + serverInfo: { name: 'minimax-bot', version: '0.7.19' }, instructions: t('mcp.instructions'), }; break; diff --git a/plugins/minimax-ai/minimax-bot/package.json b/plugins/minimax-ai/minimax-bot/package.json index e994569..ba8ce2b 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.18", + "version": "0.7.19", "private": true, "type": "module", "mcode": { diff --git a/plugins/minimax-ai/minimax-bot/tests/mention-nonascii.test.mjs b/plugins/minimax-ai/minimax-bot/tests/mention-nonascii.test.mjs index f0668db..3275e39 100644 --- a/plugins/minimax-ai/minimax-bot/tests/mention-nonascii.test.mjs +++ b/plugins/minimax-ai/minimax-bot/tests/mention-nonascii.test.mjs @@ -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']);