diff --git a/plugins/minimax-ai/minimax-pet/.minimax-plugin/plugin.json b/plugins/minimax-ai/minimax-pet/.minimax-plugin/plugin.json index 3b64abbb..e5b36948 100644 --- a/plugins/minimax-ai/minimax-pet/.minimax-plugin/plugin.json +++ b/plugins/minimax-ai/minimax-pet/.minimax-plugin/plugin.json @@ -2,7 +2,7 @@ "schemaVersion": 1, "name": "minimax-pet", "displayName": "MiniMax Pet", - "version": "0.5.8", + "version": "0.5.9", "description": "轻量桌宠,聚合主窗口可见会话的任务状态、需要回答的提醒和最新结果,支持外观切换及图集导入。", "author": "MiniMax", "icon": "icon.png", diff --git a/plugins/minimax-ai/minimax-pet/ARTWORK.md b/plugins/minimax-ai/minimax-pet/ARTWORK.md index d2f72de1..2e7a723d 100644 --- a/plugins/minimax-ai/minimax-pet/ARTWORK.md +++ b/plugins/minimax-ai/minimax-pet/ARTWORK.md @@ -1,6 +1,6 @@ # MiniMax Pet artwork -The bundled `minimax-original` pet and `icon.png` are distributed under the plugin's [MIT License](LICENSE). Copyright (c) 2026 MiniMax. +The bundled `minimax-original` and `minimax-tako` pets and `icon.png` are distributed under the plugin's [MIT License](LICENSE). Copyright (c) 2026 MiniMax. ## Default pet atlas @@ -12,10 +12,18 @@ npm run generate:art The generated atlas is 1536 × 2288 pixels: eight 192 × 208 cells per row, nine animation rows and two rows of look directions. It is compatible with the existing player, including idle, running, waving, jumping, failure, waiting, work and review poses. Tests compare decoded atlas pixels with a fresh deterministic generation, so PNG compression differences between Node releases do not change the atlas contract. This command preserves the separately authored `icon.png`. +## MiniMax Code octopus girl (`minimax-tako`) + +The second bundled pet, shown as “MiniMax Code 章鱼娘”, is an original chibi octopus girl: pink hair, round glasses, a red sound-wave hair clip, a white blouse with a wine-red bow, and wine-red tentacles with pink suckers. It was made on 2026-11-08 with MiniMax image generation, using user-provided character images as visual references for proportions and colors. The reference images are not included in the package. + +The model generated a character sheet, frame grids for each animation and nine gaze poses on a flat chroma-key background. A local script removed the background, sliced the frames, scaled them to a shared standing height and foot baseline, and assembled the exact 1536 × 2288 v2 atlas. The left-running row and the left half of the look directions are mirrored from their right-side counterparts. A small head offset strengthens each look direction. Model generation is not deterministic, so this atlas has no regeneration command; the PNG itself is the source. + +Tests run the packaged Skill validator on the shipped atlas (decoded PNG, exact size, all 73 cells non-empty with transparent backgrounds, no warnings), and the HTTP smoke test checks that both bundled pets are listed and served. Character consistency, motion and gaze direction were reviewed visually; the validator cannot judge them. Its id sorts after `minimax-original`, so the mint robot stays the default pet for a fresh profile. + ## Plugin icon The icon shows a purple octopus emerging through a mint desktop window, resting its tentacles over the front sill and waving. This ties the character to the desktop-companion concept. It was generated with OpenAI imagegen on 2026-10-26, using a user-provided octopus character image as a visual reference, then exported as a 512 × 512 transparent PNG for small plugin-icon surfaces. It is a separate asset, not a frame from the default robot atlas. The reference image is not included in the package, and the geometric atlas generator does not reproduce or overwrite this icon. The icon was reviewed on light and dark backgrounds and at small display sizes. Tests decode the actual PNG and check its square canvas, visible content and transparency; they do not claim deterministic model reproduction. The source/distribution package check compares every shipped file byte. -No externally sourced pet spritesheet is included. User-imported artwork is not part of this distribution and keeps its own license. +No externally sourced pet spritesheet is included; both bundled atlases are original MiniMax artwork. User-imported artwork is not part of this distribution and keeps its own license. diff --git a/plugins/minimax-ai/minimax-pet/PROVENANCE.md b/plugins/minimax-ai/minimax-pet/PROVENANCE.md index 76b8c886..75a01b50 100644 --- a/plugins/minimax-ai/minimax-pet/PROVENANCE.md +++ b/plugins/minimax-ai/minimax-pet/PROVENANCE.md @@ -1,6 +1,6 @@ # Source and distribution -Author: MiniMax ([MiniMax-AI](https://github.com/MiniMax-AI)). This is the 0.5.8 open-source edition of the MiniMax Pet MiniApp. It uses public MiniApp page APIs and contains no Host implementation. Public documentation, dependency URLs, and license notices have been prepared for this repository; private development references and acceptance records are not part of the package. +Author: MiniMax ([MiniMax-AI](https://github.com/MiniMax-AI)). This is the 0.5.9 open-source edition of the MiniMax Pet MiniApp. It uses public MiniApp page APIs and contains no Host implementation. Public documentation, dependency URLs, and license notices have been prepared for this repository; private development references and acceptance records are not part of the package. ## Layout @@ -29,7 +29,7 @@ The root `npm run check` validates package contracts through the repository's ex Production JavaScript uses relative modules and Node built-ins. `jsdom` 24.1.3 is used only for DOM tests; the lockfile pins public npm registry URLs and integrity values. No dependency install or build step is required by the installed plugin. -The bundled mint robot atlas is original geometric artwork generated by `scripts/generate-pet-art.mjs` from Node built-ins. `npm run generate:art` reproduces the atlas without external images or fonts and preserves `icon.png`. The purple octopus icon is a separate transparent PNG generated with OpenAI imagegen from a user-provided visual reference; model generation is not deterministic, and that reference image is not bundled. These assets use the same MiniMax [MIT License](LICENSE) as the original code and documentation; see [ARTWORK.md](ARTWORK.md). No externally sourced pet spritesheet is bundled. +The bundled mint robot atlas is original geometric artwork generated by `scripts/generate-pet-art.mjs` from Node built-ins. `npm run generate:art` reproduces the atlas without external images or fonts and preserves `icon.png`. The purple octopus icon is a separate transparent PNG generated with OpenAI imagegen from a user-provided visual reference; model generation is not deterministic, and that reference image is not bundled. The `minimax-tako` octopus girl atlas was generated with MiniMax image generation from user-provided visual references and assembled by a local script; it is not reproducible from a command, and the reference images are not bundled. These assets use the same MiniMax [MIT License](LICENSE) as the original code and documentation; see [ARTWORK.md](ARTWORK.md). No externally sourced pet spritesheet is bundled. ## Verification boundaries diff --git a/plugins/minimax-ai/minimax-pet/README.md b/plugins/minimax-ai/minimax-pet/README.md index a86bf412..350bd72f 100644 --- a/plugins/minimax-ai/minimax-pet/README.md +++ b/plugins/minimax-ai/minimax-pet/README.md @@ -50,7 +50,7 @@ The `minimax-pet` Skill opens the app and guides the current Agent through creat ## Bundled artwork -The default is an original MiniMax Pet character, with all nine animation states and sixteen look directions. Its atlas can be regenerated with Node.js from the source directory. The purple octopus plugin icon is a separate imagegen asset and is preserved when regenerating the atlas. See [ARTWORK.md](ARTWORK.md). +Two original pets are bundled, each with all nine animation states and sixteen look directions. The default is the MiniMax Pet mint robot, whose atlas can be regenerated with Node.js from the source directory. The second is “MiniMax Code 章鱼娘” (`minimax-tako`), a pink-haired octopus girl generated with MiniMax image generation and assembled into the v2 atlas. The purple octopus plugin icon is a separate imagegen asset and is preserved when regenerating the atlas. See [ARTWORK.md](ARTWORK.md). ## Development @@ -58,4 +58,4 @@ The complete editable source is at `sources/minimax-ai/minimax-pet/`. The instal ## License -Original code, documentation, the bundled pet and icon: [MIT](LICENSE), Copyright 2026 MiniMax. The default atlas is generated from editable geometric drawing code; the octopus icon was generated with imagegen from a user-provided visual reference. See [ARTWORK.md](ARTWORK.md). No externally sourced pet spritesheet is bundled. User-imported artwork keeps its own license. +Original code, documentation, the bundled pets and icon: [MIT](LICENSE), Copyright 2026 MiniMax. The default atlas is generated from editable geometric drawing code; the octopus girl atlas (MiniMax image generation) and the octopus icon (imagegen) were generated from user-provided visual references. See [ARTWORK.md](ARTWORK.md). No externally sourced pet spritesheet is bundled. User-imported artwork keeps its own license. diff --git a/plugins/minimax-ai/minimax-pet/README.zh-CN.md b/plugins/minimax-ai/minimax-pet/README.zh-CN.md index 234de2df..9717791c 100644 --- a/plugins/minimax-ai/minimax-pet/README.zh-CN.md +++ b/plugins/minimax-ai/minimax-pet/README.zh-CN.md @@ -36,4 +36,4 @@ ## 开发与许可 -保留源码/分发双目录,构建与完整字节对比步骤见 [PROVENANCE.md](PROVENANCE.md)。原创代码、文档、默认宠物和图标均按 [MIT](LICENSE) 开源,作者为 MiniMax。默认图集由可编辑的几何绘图代码生成;紫色章鱼图标由 imagegen 根据用户提供的视觉参考生成,重新生成图集不会覆盖图标。详见[素材说明](ARTWORK.md);参考图和外部宠物图集不随包分发,用户自行导入的素材保留其各自许可。 +保留源码/分发双目录,构建与完整字节对比步骤见 [PROVENANCE.md](PROVENANCE.md)。原创代码、文档、两只内置宠物和图标均按 [MIT](LICENSE) 开源,作者为 MiniMax。默认的薄荷色机器人图集由可编辑的几何绘图代码生成;第二只内置宠物“MiniMax Code 章鱼娘”(`minimax-tako`)粉发、戴眼镜、酒红触手,由 MiniMax 图像生成根据用户提供的参考图绘制后拼成 v2 图集,无法用命令重新生成;紫色章鱼图标由 imagegen 根据用户提供的视觉参考生成,重新生成图集不会覆盖图标。详见[素材说明](ARTWORK.md);参考图和外部宠物图集不随包分发,用户自行导入的素材保留其各自许可。 diff --git a/plugins/minimax-ai/minimax-pet/miniapp/client/index.html b/plugins/minimax-ai/minimax-pet/miniapp/client/index.html index 3486d6a6..cda9d283 100644 --- a/plugins/minimax-ai/minimax-pet/miniapp/client/index.html +++ b/plugins/minimax-ai/minimax-pet/miniapp/client/index.html @@ -167,7 +167,7 @@

原聊天草稿

版本与帮助
-

MiniMax Pet 0.5.8

+

MiniMax Pet 0.5.9

diff --git a/plugins/minimax-ai/minimax-pet/miniapp/client/pets/minimax-tako/pet.json b/plugins/minimax-ai/minimax-pet/miniapp/client/pets/minimax-tako/pet.json new file mode 100644 index 00000000..3688d0e1 --- /dev/null +++ b/plugins/minimax-ai/minimax-pet/miniapp/client/pets/minimax-tako/pet.json @@ -0,0 +1,9 @@ +{ + "id": "minimax-tako", + "displayName": "MiniMax Code 章鱼娘", + "description": "MiniMax Code 原创章鱼娘:粉发眼镜、酒红触手的程序员女孩,会用触手一起敲代码。采用 MIT 许可。", + "spritesheetPath": "spritesheet.png", + "spriteVersionNumber": 2, + "author": "MiniMax", + "license": "MIT" +} diff --git a/plugins/minimax-ai/minimax-pet/miniapp/client/pets/minimax-tako/spritesheet.png b/plugins/minimax-ai/minimax-pet/miniapp/client/pets/minimax-tako/spritesheet.png new file mode 100644 index 00000000..0dd68960 Binary files /dev/null and b/plugins/minimax-ai/minimax-pet/miniapp/client/pets/minimax-tako/spritesheet.png differ diff --git a/sources/minimax-ai/minimax-pet/.minimax-plugin/plugin.json b/sources/minimax-ai/minimax-pet/.minimax-plugin/plugin.json index 3b64abbb..e5b36948 100644 --- a/sources/minimax-ai/minimax-pet/.minimax-plugin/plugin.json +++ b/sources/minimax-ai/minimax-pet/.minimax-plugin/plugin.json @@ -2,7 +2,7 @@ "schemaVersion": 1, "name": "minimax-pet", "displayName": "MiniMax Pet", - "version": "0.5.8", + "version": "0.5.9", "description": "轻量桌宠,聚合主窗口可见会话的任务状态、需要回答的提醒和最新结果,支持外观切换及图集导入。", "author": "MiniMax", "icon": "icon.png", diff --git a/sources/minimax-ai/minimax-pet/ARTWORK.md b/sources/minimax-ai/minimax-pet/ARTWORK.md index d2f72de1..2e7a723d 100644 --- a/sources/minimax-ai/minimax-pet/ARTWORK.md +++ b/sources/minimax-ai/minimax-pet/ARTWORK.md @@ -1,6 +1,6 @@ # MiniMax Pet artwork -The bundled `minimax-original` pet and `icon.png` are distributed under the plugin's [MIT License](LICENSE). Copyright (c) 2026 MiniMax. +The bundled `minimax-original` and `minimax-tako` pets and `icon.png` are distributed under the plugin's [MIT License](LICENSE). Copyright (c) 2026 MiniMax. ## Default pet atlas @@ -12,10 +12,18 @@ npm run generate:art The generated atlas is 1536 × 2288 pixels: eight 192 × 208 cells per row, nine animation rows and two rows of look directions. It is compatible with the existing player, including idle, running, waving, jumping, failure, waiting, work and review poses. Tests compare decoded atlas pixels with a fresh deterministic generation, so PNG compression differences between Node releases do not change the atlas contract. This command preserves the separately authored `icon.png`. +## MiniMax Code octopus girl (`minimax-tako`) + +The second bundled pet, shown as “MiniMax Code 章鱼娘”, is an original chibi octopus girl: pink hair, round glasses, a red sound-wave hair clip, a white blouse with a wine-red bow, and wine-red tentacles with pink suckers. It was made on 2026-11-08 with MiniMax image generation, using user-provided character images as visual references for proportions and colors. The reference images are not included in the package. + +The model generated a character sheet, frame grids for each animation and nine gaze poses on a flat chroma-key background. A local script removed the background, sliced the frames, scaled them to a shared standing height and foot baseline, and assembled the exact 1536 × 2288 v2 atlas. The left-running row and the left half of the look directions are mirrored from their right-side counterparts. A small head offset strengthens each look direction. Model generation is not deterministic, so this atlas has no regeneration command; the PNG itself is the source. + +Tests run the packaged Skill validator on the shipped atlas (decoded PNG, exact size, all 73 cells non-empty with transparent backgrounds, no warnings), and the HTTP smoke test checks that both bundled pets are listed and served. Character consistency, motion and gaze direction were reviewed visually; the validator cannot judge them. Its id sorts after `minimax-original`, so the mint robot stays the default pet for a fresh profile. + ## Plugin icon The icon shows a purple octopus emerging through a mint desktop window, resting its tentacles over the front sill and waving. This ties the character to the desktop-companion concept. It was generated with OpenAI imagegen on 2026-10-26, using a user-provided octopus character image as a visual reference, then exported as a 512 × 512 transparent PNG for small plugin-icon surfaces. It is a separate asset, not a frame from the default robot atlas. The reference image is not included in the package, and the geometric atlas generator does not reproduce or overwrite this icon. The icon was reviewed on light and dark backgrounds and at small display sizes. Tests decode the actual PNG and check its square canvas, visible content and transparency; they do not claim deterministic model reproduction. The source/distribution package check compares every shipped file byte. -No externally sourced pet spritesheet is included. User-imported artwork is not part of this distribution and keeps its own license. +No externally sourced pet spritesheet is included; both bundled atlases are original MiniMax artwork. User-imported artwork is not part of this distribution and keeps its own license. diff --git a/sources/minimax-ai/minimax-pet/PROVENANCE.md b/sources/minimax-ai/minimax-pet/PROVENANCE.md index 76b8c886..75a01b50 100644 --- a/sources/minimax-ai/minimax-pet/PROVENANCE.md +++ b/sources/minimax-ai/minimax-pet/PROVENANCE.md @@ -1,6 +1,6 @@ # Source and distribution -Author: MiniMax ([MiniMax-AI](https://github.com/MiniMax-AI)). This is the 0.5.8 open-source edition of the MiniMax Pet MiniApp. It uses public MiniApp page APIs and contains no Host implementation. Public documentation, dependency URLs, and license notices have been prepared for this repository; private development references and acceptance records are not part of the package. +Author: MiniMax ([MiniMax-AI](https://github.com/MiniMax-AI)). This is the 0.5.9 open-source edition of the MiniMax Pet MiniApp. It uses public MiniApp page APIs and contains no Host implementation. Public documentation, dependency URLs, and license notices have been prepared for this repository; private development references and acceptance records are not part of the package. ## Layout @@ -29,7 +29,7 @@ The root `npm run check` validates package contracts through the repository's ex Production JavaScript uses relative modules and Node built-ins. `jsdom` 24.1.3 is used only for DOM tests; the lockfile pins public npm registry URLs and integrity values. No dependency install or build step is required by the installed plugin. -The bundled mint robot atlas is original geometric artwork generated by `scripts/generate-pet-art.mjs` from Node built-ins. `npm run generate:art` reproduces the atlas without external images or fonts and preserves `icon.png`. The purple octopus icon is a separate transparent PNG generated with OpenAI imagegen from a user-provided visual reference; model generation is not deterministic, and that reference image is not bundled. These assets use the same MiniMax [MIT License](LICENSE) as the original code and documentation; see [ARTWORK.md](ARTWORK.md). No externally sourced pet spritesheet is bundled. +The bundled mint robot atlas is original geometric artwork generated by `scripts/generate-pet-art.mjs` from Node built-ins. `npm run generate:art` reproduces the atlas without external images or fonts and preserves `icon.png`. The purple octopus icon is a separate transparent PNG generated with OpenAI imagegen from a user-provided visual reference; model generation is not deterministic, and that reference image is not bundled. The `minimax-tako` octopus girl atlas was generated with MiniMax image generation from user-provided visual references and assembled by a local script; it is not reproducible from a command, and the reference images are not bundled. These assets use the same MiniMax [MIT License](LICENSE) as the original code and documentation; see [ARTWORK.md](ARTWORK.md). No externally sourced pet spritesheet is bundled. ## Verification boundaries diff --git a/sources/minimax-ai/minimax-pet/README.md b/sources/minimax-ai/minimax-pet/README.md index a86bf412..350bd72f 100644 --- a/sources/minimax-ai/minimax-pet/README.md +++ b/sources/minimax-ai/minimax-pet/README.md @@ -50,7 +50,7 @@ The `minimax-pet` Skill opens the app and guides the current Agent through creat ## Bundled artwork -The default is an original MiniMax Pet character, with all nine animation states and sixteen look directions. Its atlas can be regenerated with Node.js from the source directory. The purple octopus plugin icon is a separate imagegen asset and is preserved when regenerating the atlas. See [ARTWORK.md](ARTWORK.md). +Two original pets are bundled, each with all nine animation states and sixteen look directions. The default is the MiniMax Pet mint robot, whose atlas can be regenerated with Node.js from the source directory. The second is “MiniMax Code 章鱼娘” (`minimax-tako`), a pink-haired octopus girl generated with MiniMax image generation and assembled into the v2 atlas. The purple octopus plugin icon is a separate imagegen asset and is preserved when regenerating the atlas. See [ARTWORK.md](ARTWORK.md). ## Development @@ -58,4 +58,4 @@ The complete editable source is at `sources/minimax-ai/minimax-pet/`. The instal ## License -Original code, documentation, the bundled pet and icon: [MIT](LICENSE), Copyright 2026 MiniMax. The default atlas is generated from editable geometric drawing code; the octopus icon was generated with imagegen from a user-provided visual reference. See [ARTWORK.md](ARTWORK.md). No externally sourced pet spritesheet is bundled. User-imported artwork keeps its own license. +Original code, documentation, the bundled pets and icon: [MIT](LICENSE), Copyright 2026 MiniMax. The default atlas is generated from editable geometric drawing code; the octopus girl atlas (MiniMax image generation) and the octopus icon (imagegen) were generated from user-provided visual references. See [ARTWORK.md](ARTWORK.md). No externally sourced pet spritesheet is bundled. User-imported artwork keeps its own license. diff --git a/sources/minimax-ai/minimax-pet/README.zh-CN.md b/sources/minimax-ai/minimax-pet/README.zh-CN.md index 234de2df..9717791c 100644 --- a/sources/minimax-ai/minimax-pet/README.zh-CN.md +++ b/sources/minimax-ai/minimax-pet/README.zh-CN.md @@ -36,4 +36,4 @@ ## 开发与许可 -保留源码/分发双目录,构建与完整字节对比步骤见 [PROVENANCE.md](PROVENANCE.md)。原创代码、文档、默认宠物和图标均按 [MIT](LICENSE) 开源,作者为 MiniMax。默认图集由可编辑的几何绘图代码生成;紫色章鱼图标由 imagegen 根据用户提供的视觉参考生成,重新生成图集不会覆盖图标。详见[素材说明](ARTWORK.md);参考图和外部宠物图集不随包分发,用户自行导入的素材保留其各自许可。 +保留源码/分发双目录,构建与完整字节对比步骤见 [PROVENANCE.md](PROVENANCE.md)。原创代码、文档、两只内置宠物和图标均按 [MIT](LICENSE) 开源,作者为 MiniMax。默认的薄荷色机器人图集由可编辑的几何绘图代码生成;第二只内置宠物“MiniMax Code 章鱼娘”(`minimax-tako`)粉发、戴眼镜、酒红触手,由 MiniMax 图像生成根据用户提供的参考图绘制后拼成 v2 图集,无法用命令重新生成;紫色章鱼图标由 imagegen 根据用户提供的视觉参考生成,重新生成图集不会覆盖图标。详见[素材说明](ARTWORK.md);参考图和外部宠物图集不随包分发,用户自行导入的素材保留其各自许可。 diff --git a/sources/minimax-ai/minimax-pet/dev/pet-art-validation.test.mjs b/sources/minimax-ai/minimax-pet/dev/pet-art-validation.test.mjs index 2618a4fc..51d6e0f3 100644 --- a/sources/minimax-ai/minimax-pet/dev/pet-art-validation.test.mjs +++ b/sources/minimax-ai/minimax-pet/dev/pet-art-validation.test.mjs @@ -3,6 +3,7 @@ import { execFile } from 'node:child_process'; import { mkdtemp, rm, symlink, writeFile } from 'node:fs/promises'; import os from 'node:os'; import path from 'node:path'; +import { fileURLToPath } from 'node:url'; import { promisify } from 'node:util'; import { deflateSync, inflateSync } from 'node:zlib'; import test from 'node:test'; @@ -113,6 +114,11 @@ test('generated v1 and v2 exports pass with the exact playable frame count', asy assert.deepEqual(await validatePetArt(second.petJsonPath), { ok: true, version: 2, width: 1536, height: 2288, frames: 73, warnings: [] }); }); +test('the bundled octopus pet passes the generation profile with no warnings', async () => { + const petJsonPath = fileURLToPath(new URL('../miniapp/client/pets/minimax-tako/pet.json', import.meta.url)); + assert.deepEqual(await validatePetArt(petJsonPath), { ok: true, version: 2, width: 1536, height: 2288, frames: 73, warnings: [] }); +}); + test('the standalone CLI returns machine-readable success and failure with exit status', async (t) => { const { petJsonPath } = await fixture(t); const success = await run(process.execPath, [script.pathname, petJsonPath]); diff --git a/sources/minimax-ai/minimax-pet/dev/smoke-api.mjs b/sources/minimax-ai/minimax-pet/dev/smoke-api.mjs index 1f23f111..fee339d8 100644 --- a/sources/minimax-ai/minimax-pet/dev/smoke-api.mjs +++ b/sources/minimax-ai/minimax-pet/dev/smoke-api.mjs @@ -14,6 +14,8 @@ const { start } = await import(resolve(packageRoot, 'miniapp/node/server.mjs')); const { readImageHeader, atlasVersionFromSize } = await import(resolve(packageRoot, 'miniapp/node/image-header.mjs')); const BUNDLED_PET = 'minimax-original'; +// Bundled pets list in id order; the first one is the default for a fresh profile. +const BUNDLED_PETS = [BUNDLED_PET, 'minimax-tako']; const petsRoot = join(packageRoot, 'miniapp/client/pets'); const results = []; @@ -299,19 +301,32 @@ try { }); } - await test('GET /api/pets lists one first-party bundled v2 pet with petJsonUrl, no-store', async () => { + await test('GET /api/pets lists the first-party bundled v2 pets with petJsonUrl, no-store', async () => { const r = await call(port, 'GET', '/api/pets'); assert.equal(r.status, 200); assert.equal(r.headers['cache-control'], 'no-store'); const pets = r.json.pets; assert.deepEqual( pets.map((p) => [p.id, p.version, p.source, p.petJsonUrl]), - [ - [BUNDLED_PET, 2, 'bundled', `/assets/pets/${BUNDLED_PET}/pet.json`], - ], + BUNDLED_PETS.map((id) => [id, 2, 'bundled', `/assets/pets/${id}/pet.json`]), ); - assert.equal(typeof pets[0].displayName, 'string'); - assert.equal(typeof pets[0].description, 'string'); + assert.equal(pets[0].id, BUNDLED_PET, 'the original robot stays first, so it remains the default pet'); + for (const pet of pets) { + assert.equal(typeof pet.displayName, 'string'); + assert.equal(typeof pet.description, 'string'); + } + }); + + await test('GET every bundled spritesheet via /assets → 200 image/png v2', async () => { + for (const id of BUNDLED_PETS) { + const json = await call(port, 'GET', `/assets/pets/${id}/pet.json`); + assert.equal(json.status, 200); + assert.equal(json.json.id, id); + const sprite = await call(port, 'GET', `/assets/pets/${id}/${json.json.spritesheetPath}`); + assert.equal(sprite.status, 200); + assert.match(sprite.headers['content-type'], /^image\/png/); + assert.deepEqual(readImageHeader(sprite.body), readImageHeader(await readFile(join(petsRoot, id, 'spritesheet.png')))); + } }); await test('PUT /api/pets → 405', async () => { @@ -340,7 +355,7 @@ try { await test('listing contains imported user-copy after bundled', async () => { const r = await call(port, 'GET', '/api/pets'); const ids = r.json.pets.map((p) => `${p.source}:${p.id}`); - assert.deepEqual(ids, [`bundled:${BUNDLED_PET}`, 'imported:user-copy']); + assert.deepEqual(ids, [...BUNDLED_PETS.map((id) => `bundled:${id}`), 'imported:user-copy']); }); await test('/imported/user-copy/pet.json → 200 normalized subset', async () => { diff --git a/sources/minimax-ai/minimax-pet/miniapp/client/index.html b/sources/minimax-ai/minimax-pet/miniapp/client/index.html index 3486d6a6..cda9d283 100644 --- a/sources/minimax-ai/minimax-pet/miniapp/client/index.html +++ b/sources/minimax-ai/minimax-pet/miniapp/client/index.html @@ -167,7 +167,7 @@

原聊天草稿

版本与帮助
-

MiniMax Pet 0.5.8

+

MiniMax Pet 0.5.9

diff --git a/sources/minimax-ai/minimax-pet/miniapp/client/pets/minimax-tako/pet.json b/sources/minimax-ai/minimax-pet/miniapp/client/pets/minimax-tako/pet.json new file mode 100644 index 00000000..3688d0e1 --- /dev/null +++ b/sources/minimax-ai/minimax-pet/miniapp/client/pets/minimax-tako/pet.json @@ -0,0 +1,9 @@ +{ + "id": "minimax-tako", + "displayName": "MiniMax Code 章鱼娘", + "description": "MiniMax Code 原创章鱼娘:粉发眼镜、酒红触手的程序员女孩,会用触手一起敲代码。采用 MIT 许可。", + "spritesheetPath": "spritesheet.png", + "spriteVersionNumber": 2, + "author": "MiniMax", + "license": "MIT" +} diff --git a/sources/minimax-ai/minimax-pet/miniapp/client/pets/minimax-tako/spritesheet.png b/sources/minimax-ai/minimax-pet/miniapp/client/pets/minimax-tako/spritesheet.png new file mode 100644 index 00000000..0dd68960 Binary files /dev/null and b/sources/minimax-ai/minimax-pet/miniapp/client/pets/minimax-tako/spritesheet.png differ diff --git a/sources/minimax-ai/minimax-pet/package-lock.json b/sources/minimax-ai/minimax-pet/package-lock.json index 26d9e79d..a0642887 100644 --- a/sources/minimax-ai/minimax-pet/package-lock.json +++ b/sources/minimax-ai/minimax-pet/package-lock.json @@ -1,12 +1,12 @@ { "name": "minimax-pet-source", - "version": "0.5.8", + "version": "0.5.9", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "minimax-pet-source", - "version": "0.5.8", + "version": "0.5.9", "devDependencies": { "jsdom": "24.1.3" }, diff --git a/sources/minimax-ai/minimax-pet/package.json b/sources/minimax-ai/minimax-pet/package.json index a97442e3..a2a6f95b 100644 --- a/sources/minimax-ai/minimax-pet/package.json +++ b/sources/minimax-ai/minimax-pet/package.json @@ -1,6 +1,6 @@ { "name": "minimax-pet-source", - "version": "0.5.8", + "version": "0.5.9", "private": true, "type": "module", "description": "桌宠插件的开发与验证工具,不进入分发包。",