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-pet/.minimax-plugin/plugin.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"schemaVersion": 1,
"name": "minimax-pet",
"displayName": "MiniMax Pet",
"version": "0.9.2",
"version": "0.9.3",
"description": "轻量桌宠,聚合主窗口可见会话的任务状态、需要回答的提醒和最新结果,支持外观切换及图集导入。",
"author": "MiniMax",
"icon": "icon.png",
Expand Down
3 changes: 3 additions & 0 deletions plugins/minimax-ai/minimax-pet/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,8 @@ Version **0.9.0** also gives the desktop window one fixed size, tall enough for

Version **0.9.2** keeps the desktop window at its intended size while dragging by sending the configured size with each move, rather than carrying forward unexpected native bounds. The desktop task card is centered and capped at 264 CSS pixels; it can still fit narrower windows with the existing 8-pixel side gutters. Permissions and dependencies are unchanged.

Version **0.9.3** moves the desktop pet using the Host-confirmed window position and the pointer's offset from the grab point. The page waits for each move to finish before using another pointer sample. If you release while a move is pending, the window stays at the last position accepted by the Host.

Version **0.8.1** fixes the desktop card: the title truncates to one line, only the reply scrolls, and the actions stay pinned, so a long title or reply no longer pushes 返回任务 / 打开对话 out of the card. Expanding the card also grows the window instead of squeezing the reply into one line.

Version **0.8.0** aligns the panel with the MiniMax Code design language: 24px page margins and section gaps, 14px/22px body copy with 12px/18px supporting text, 32px minimum control height, 12px cards and 8px controls, 0.5px borders on desktop overlays, and press/focus states. The desktop pet keeps its 280px layout with the same tokens.
Expand Down Expand Up @@ -50,6 +52,7 @@ Earlier local prototypes use a different plugin ID. The Host gives `minimax-pet`
- The default atlas is checked by actual PNG decoding, frame coverage and deterministic rebuild tests. The separate octopus icon is checked by PNG decoding and visual review. On 2026-10-26, the packaged Skill was exercised with a real Agent in the macOS development build to create, validate, preview and import a custom v2 pet; all nine animation previews and the four cardinal mouse-look directions were checked. This does not replace released-client acceptance.
- Version 0.9.0 has Node/DOM tests for the card timer, the preference round trip and the copy of both languages (every key the page uses must exist in both), plus a browser check of the panel and desktop window in both languages against a simulated Host. Not verified for 0.9.0: the language the real client reports on any given install, and both languages inside a real MiniMax Code window.
- Version 0.9.2 was checked in MiniMax Code **3.1.19.232** on Windows 11 x64 (build 26200, 150% display scaling). With the task card open, four automated pointer drags moved the real window without cumulative width or height growth. A physical mouse and other display configurations were not tested for this fix.
- The drag behavior was exercised with a physical mouse in a local comparison build on MiniMax Inside Code **3.1.19.169**, Windows 11 (build 26300), and a 4K display. Version 0.9.3 has regression tests for input before and after the Host applies a pending move. Desktop testing of the final 0.9.3 package remains open.
- Not verified for 0.6.0: opening a conversation or following the theme inside a real MiniMax Code 3.1.11+ window (panel or desktop pet), any Windows GUI, and released-client installation or GUI acceptance on 3.1.6. Automated tests use synthetic data and do not prove those paths.

## Data & access
Expand Down
4 changes: 4 additions & 0 deletions plugins/minimax-ai/minimax-pet/README.zh-CN.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,8 @@

**0.9.2** 拖拽时同时发送坐标与当前缩放对应的窗口尺寸,不再沿用宿主异常放大的尺寸。桌面任务卡居中,宽度上限为 264 CSS 像素;窗口较窄时仍会缩小并保留两侧各 8 像素的留白。权限和依赖不变。

**0.9.3** 根据宿主确认的窗口位置和指针相对抓取点的偏移移动桌宠。每次移动结束后,才使用新的指针事件。如果在宿主应答前松手,窗口停在宿主最后接受的位置。

**0.8.1** 修复桌面卡片:标题单行截断,只有回复区滚动,底部操作固定在卡片内;长标题或长回复不再把「返回任务 / 打开对话」顶出卡片。展开卡片时窗口同步变高,回复不会被压成一行。

**0.8.0** 按 MiniMax Code 的设计语言对齐面板:24px 页边距与区块间距、14px/22px 正文与 12px/18px 辅助文字、控件最小高度 32px、卡片 12px 与控件 8px 圆角、桌面浮层 0.5px 描边,并补齐按下与焦点状态。桌面宠物保持 280px 布局,沿用同一套 token。
Expand All @@ -44,6 +46,8 @@

0.9.2 已在 Windows 11 x64(构建 26200,屏幕缩放 150%)的 MiniMax Code **3.1.19.232** 中测试。任务卡展开时通过自动化指针连续拖拽四次,真实窗口发生位移,宽高未逐次累加。此修复未测试物理鼠标及其他显示配置。

本地对照构建已在 Windows 11(构建 26300)、4K 显示器和 MiniMax Inside Code **3.1.19.169** 下用物理鼠标测试。0.9.3 的回归测试覆盖宿主应用窗口移动前后到达的指针事件。0.9.3 正式打包版本仍待桌面验收。

## 数据与能力边界

只申请 `session.read`,读取 Host 对本插件可见的用户会话状态和所选会话最新回复,不直接读取 Host 数据库、日志、配置或凭据。状态和提醒只在页面内存中,关闭或静音不修改 Host 的任务或未读事实。
Expand Down
2 changes: 1 addition & 1 deletion plugins/minimax-ai/minimax-pet/miniapp/client/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -181,7 +181,7 @@ <h2 id="connection-title" data-i18n="settings.connection">任务连接</h2>
<details class="panel-help">
<summary data-i18n="settings.help">版本与帮助</summary>
<div class="help-content">
<p class="muted">MiniMax Pet 0.9.2</p>
<p class="muted">MiniMax Pet 0.9.3</p>
<div class="row">
<span id="version-badge" class="badge" hidden></span>
<span id="source-badge" class="badge"></span>
Expand Down
41 changes: 25 additions & 16 deletions plugins/minimax-ai/minimax-pet/miniapp/client/pet-app.js
Original file line number Diff line number Diff line change
Expand Up @@ -144,6 +144,7 @@ const app = {
ctFailures: 0,
pointer: null,
drag: null,
dragMove: null,
dragging: false,
menuOpen: false,
menuView: 'root',
Expand Down Expand Up @@ -897,22 +898,26 @@ function onSpritePointerDown(e) {
} catch (error) {
console.warn('[pet] pointer_capture_failed:', errCode(error), error);
}
const startX = app.winPos?.x ?? e.clientX;
app.drag = {
pointerId: e.pointerId,
startX: e.screenX,
startY: e.screenY,
win: app.winPos ? { ...app.winPos } : null,
grabX: e.clientX,
grabY: e.clientY,
startX,
active: false,
dir: null,
extreme: e.screenX,
extreme: startX,
};
}

function onSpritePointerMove(e) {
const d = app.drag;
if (!d || e.pointerId !== d.pointerId || app.scaleChanging) return;
const dx = e.screenX - d.startX;
const dy = e.screenY - d.startY;
// While the Host is moving the window, client coordinates may be relative to either origin.
// Resume from the next pointer event after the Host confirms the new bounds.
if (!d || e.pointerId !== d.pointerId || app.scaleChanging || app.dragMove) return;
const origin = app.winPos;
const dx = e.clientX - d.grabX;
const dy = e.clientY - d.grabY;
if (!d.active) {
if (Math.hypot(dx, dy) <= DRAG_THRESHOLD) return;
d.active = true;
Expand All @@ -923,20 +928,22 @@ function onSpritePointerMove(e) {
hideQuickbar();
els.sprite.classList.add('is-dragging');
refreshInteractivity();
if (!d.win) console.warn('[pet] drag_without_window_position: no window position yet, animation only');
if (!origin) console.warn('[pet] drag_without_window_position: no window position yet, animation only');
}
updateDragDirection(d, e.screenX);
if (!d.win) return;
const x = origin ? Math.round(origin.x + dx) : e.clientX;
updateDragDirection(d, x);
if (!origin) return;
const y = Math.round(origin.y + dy);
if (x === origin.x && y === origin.y) return;
// On Windows a position-only update can return enlarged native bounds. Send the
// design size with the move, rather than carrying the enlarged bounds into the next one.
callBridge(() => win.update({
x: Math.round(d.win.x + dx), y: Math.round(d.win.y + dy),
width: DESK_WIDTH, height: deskHeight(prefs.scale),
})).catch((error) => {
app.dragMove = callBridge(() => win.update({ x, y, width: DESK_WIDTH, height: deskHeight(prefs.scale) })).then((state) => {
if (app.mode === 'window') onWindowState(state);
}).catch((error) => {
const code = errCode(error);
if (code === 'not_permitted') console.debug('[pet] drag_move_rejected: not_permitted (target is off every display)');
else console.warn('[pet] drag_move_failed:', code, error);
});
}).finally(() => { app.dragMove = null; });
}

function updateDragDirection(d, sx) {
Expand Down Expand Up @@ -965,6 +972,7 @@ function updateDragDirection(d, sx) {
function finishDrag(e, cancelled) {
const d = app.drag;
if (!d || e.pointerId !== d.pointerId) return;
if (!cancelled && d.active) onSpritePointerMove(e);
app.drag = null;
try {
if (els.sprite.hasPointerCapture(e.pointerId)) els.sprite.releasePointerCapture(e.pointerId);
Expand All @@ -978,7 +986,7 @@ function finishDrag(e, cancelled) {
// Hover already owns the same three-cycle jump; release must not queue it twice.
animationGate?.invalidate(); applyActivity();
} else playOneShot('jumping');
callBridge(() => win.getState()).then(onWindowState, logError('get_state_after_drag'));
if (!app.dragMove) callBridge(() => win.getState()).then(onWindowState, logError('get_state_after_drag'));
} else if (!cancelled) {
void openWorkbench('tasks');
}
Expand Down Expand Up @@ -1515,6 +1523,7 @@ function setScale(value) {
cancelDrag();
const current = () => !disposed && intent === scaleIntent;
scaleUpdates = scaleUpdates.then(async () => {
if (app.dragMove) await app.dragMove;
if (!current()) return;
if (app.workbenchOpen) await closeWorkbench();
if (!current()) return;
Expand Down
2 changes: 1 addition & 1 deletion sources/minimax-ai/minimax-pet/.minimax-plugin/plugin.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"schemaVersion": 1,
"name": "minimax-pet",
"displayName": "MiniMax Pet",
"version": "0.9.2",
"version": "0.9.3",
"description": "轻量桌宠,聚合主窗口可见会话的任务状态、需要回答的提醒和最新结果,支持外观切换及图集导入。",
"author": "MiniMax",
"icon": "icon.png",
Expand Down
1 change: 1 addition & 0 deletions sources/minimax-ai/minimax-pet/DEVELOPMENT.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ npm run check:package
- Resizing the desktop pet first brings the transparent window inside the available screen area so smaller sprites remain reachable.
- Click-through follows the pixels, never a whole mode: the same rule covers the pet, the bubble, the notification stack, the quick bar, the menu and the open card. An expanded card window is 300x488 around a 284x147 card, so treating "card open" as "window interactive" swallows every click in the margin. Only a drag or an open menu justify the whole window, and a card opened from the keyboard (no pointer sample yet) stays interactive.
- Opening or closing the card must never change the window geometry. The window is one fixed 280 x `deskHeight(scale)` size that already fits the open card; resizing on click moves the native origin, and the previous layout is repainted at the new top-left for a frame, so the pet visibly jumps up (and left, while the card was wider). `dev/desk-interactivity.test.mjs` fails if `openWorkbench` or `closeWorkbench` touches geometry, and checks the fixed height still leaves room for the card at every pet scale. The area above the pet is transparent and forwards clicks, so a permanently tall window costs no desktop clicks.
- A drag sends at most one window move at a time. Pointer events received before its reply may use either window origin. The next event after the reply uses the confirmed bounds. The drag tests cover move and release on both sides of the native bounds change.
- Opening the card must not change the running sprite animation. Hover runs the `jumping` row; reverting to the base state on open restarts it at frame 0, which reads as a flicker on every click. The menu still takes the pet back to its base animation, because the menu is a deliberate choice.
- Every user-visible string comes from `miniapp/client/i18n.mjs` through `t()`; static markup carries `data-i18n` / `data-i18n-attr`. Keys are `<domain>.<context>.<name>`, interpolation is `{{name}}`, a missing key renders as the key itself, and `dev/i18n.test.mjs` fails when a key the client uses is missing from either language. Conversation titles, replies and error text from the Host are data and stay in the language the Agent wrote them.
- Text created once when a view is built (segmented labels, compact-view buttons) must be re-applied on a language change, or it keeps the language of the moment it was built.
Expand Down
3 changes: 3 additions & 0 deletions sources/minimax-ai/minimax-pet/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,8 @@ Version **0.9.0** also gives the desktop window one fixed size, tall enough for

Version **0.9.2** keeps the desktop window at its intended size while dragging by sending the configured size with each move, rather than carrying forward unexpected native bounds. The desktop task card is centered and capped at 264 CSS pixels; it can still fit narrower windows with the existing 8-pixel side gutters. Permissions and dependencies are unchanged.

Version **0.9.3** moves the desktop pet using the Host-confirmed window position and the pointer's offset from the grab point. The page waits for each move to finish before using another pointer sample. If you release while a move is pending, the window stays at the last position accepted by the Host.

Version **0.8.1** fixes the desktop card: the title truncates to one line, only the reply scrolls, and the actions stay pinned, so a long title or reply no longer pushes 返回任务 / 打开对话 out of the card. Expanding the card also grows the window instead of squeezing the reply into one line.

Version **0.8.0** aligns the panel with the MiniMax Code design language: 24px page margins and section gaps, 14px/22px body copy with 12px/18px supporting text, 32px minimum control height, 12px cards and 8px controls, 0.5px borders on desktop overlays, and press/focus states. The desktop pet keeps its 280px layout with the same tokens.
Expand Down Expand Up @@ -50,6 +52,7 @@ Earlier local prototypes use a different plugin ID. The Host gives `minimax-pet`
- The default atlas is checked by actual PNG decoding, frame coverage and deterministic rebuild tests. The separate octopus icon is checked by PNG decoding and visual review. On 2026-10-26, the packaged Skill was exercised with a real Agent in the macOS development build to create, validate, preview and import a custom v2 pet; all nine animation previews and the four cardinal mouse-look directions were checked. This does not replace released-client acceptance.
- Version 0.9.0 has Node/DOM tests for the card timer, the preference round trip and the copy of both languages (every key the page uses must exist in both), plus a browser check of the panel and desktop window in both languages against a simulated Host. Not verified for 0.9.0: the language the real client reports on any given install, and both languages inside a real MiniMax Code window.
- Version 0.9.2 was checked in MiniMax Code **3.1.19.232** on Windows 11 x64 (build 26200, 150% display scaling). With the task card open, four automated pointer drags moved the real window without cumulative width or height growth. A physical mouse and other display configurations were not tested for this fix.
- The drag behavior was exercised with a physical mouse in a local comparison build on MiniMax Inside Code **3.1.19.169**, Windows 11 (build 26300), and a 4K display. Version 0.9.3 has regression tests for input before and after the Host applies a pending move. Desktop testing of the final 0.9.3 package remains open.
- Not verified for 0.6.0: opening a conversation or following the theme inside a real MiniMax Code 3.1.11+ window (panel or desktop pet), any Windows GUI, and released-client installation or GUI acceptance on 3.1.6. Automated tests use synthetic data and do not prove those paths.

## Data & access
Expand Down
4 changes: 4 additions & 0 deletions sources/minimax-ai/minimax-pet/README.zh-CN.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,8 @@

**0.9.2** 拖拽时同时发送坐标与当前缩放对应的窗口尺寸,不再沿用宿主异常放大的尺寸。桌面任务卡居中,宽度上限为 264 CSS 像素;窗口较窄时仍会缩小并保留两侧各 8 像素的留白。权限和依赖不变。

**0.9.3** 根据宿主确认的窗口位置和指针相对抓取点的偏移移动桌宠。每次移动结束后,才使用新的指针事件。如果在宿主应答前松手,窗口停在宿主最后接受的位置。

**0.8.1** 修复桌面卡片:标题单行截断,只有回复区滚动,底部操作固定在卡片内;长标题或长回复不再把「返回任务 / 打开对话」顶出卡片。展开卡片时窗口同步变高,回复不会被压成一行。

**0.8.0** 按 MiniMax Code 的设计语言对齐面板:24px 页边距与区块间距、14px/22px 正文与 12px/18px 辅助文字、控件最小高度 32px、卡片 12px 与控件 8px 圆角、桌面浮层 0.5px 描边,并补齐按下与焦点状态。桌面宠物保持 280px 布局,沿用同一套 token。
Expand All @@ -44,6 +46,8 @@

0.9.2 已在 Windows 11 x64(构建 26200,屏幕缩放 150%)的 MiniMax Code **3.1.19.232** 中测试。任务卡展开时通过自动化指针连续拖拽四次,真实窗口发生位移,宽高未逐次累加。此修复未测试物理鼠标及其他显示配置。

本地对照构建已在 Windows 11(构建 26300)、4K 显示器和 MiniMax Inside Code **3.1.19.169** 下用物理鼠标测试。0.9.3 的回归测试覆盖宿主应用窗口移动前后到达的指针事件。0.9.3 正式打包版本仍待桌面验收。

## 数据与能力边界

只申请 `session.read`,读取 Host 对本插件可见的用户会话状态和所选会话最新回复,不直接读取 Host 数据库、日志、配置或凭据。状态和提醒只在页面内存中,关闭或静音不修改 Host 的任务或未读事实。
Expand Down
Loading