Skip to content

Commit c487abc

Browse files
committed
feat(minimax-bot-bridge): add the MiniMax Bot Bridge Mini App
Pairs a phone with the MiniMax Bot team on your desktop. The bridge shows a pairing code, lists and revokes paired phones, and carries the team's conversations and tool activity over a relay the operator runs. The runtime payload is self-contained: Node's standard library only, with the shared protocol vendored into miniapp/node/protocol. The package declares agentAccess [session.run] and toolAccess [call], writes only inside the Host's data directory, and spawns no processes.
1 parent 8abfa32 commit c487abc

67 files changed

Lines changed: 16205 additions & 0 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

‎README.md‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -86,6 +86,7 @@ The MiniMax Code Agent communicates through the host MCP client. Business reques
8686
| [蹬王之王 · Expiry Guardian](plugins/hylouis233/expiry-guardian/) | Track credit and reset-card expiry from a local ledger you maintain, and get a "spend the card or let the credits burn first" recommendation with the reasoning spelled out | [Hylouis](https://github.com/Hylouis233) |
8787
| [MiniMax Pet](plugins/minimax-ai/minimax-pet/) | A lightweight companion with appearance, task and settings tabs, visible-session activity, answer-needed reminders and a transparent desktop pet. Requires MiniMax Code 3.1.6 or later | [MiniMax](https://github.com/MiniMax-AI) |
8888
| [MCP OAuth Console](plugins/microbiosis/mcp-oauth-console/) | Sign in to MCP servers that require OAuth: device-code or authorization-code + PKCE flow, the `Authorization` header written into the MCP configuration, and an opt-in refresh before expiry | [Microbiosis](https://github.com/Microbiosis) |
89+
| [MiniMax Bot Bridge](plugins/nattiini45/minimax-bot-bridge/) | Pair a phone with the MiniMax Bot team on your desktop: a pairing code, the paired phones, and the relay configuration, with the team's conversations and tool activity carried over a relay you operate. Requires MiniMax Code 3.1.5 or later and the official MiniMax Bot plugin | [nattiini45](https://github.com/nattiini45) |
8990

9091
<details>
9192
<summary>Preview: Cutline</summary>

‎README.zh-CN.md‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -86,6 +86,7 @@ MiniMax Code Agent 通过宿主 MCP 客户端与 MiniApp 协作。业务请求
8686
| [蹬王之王](plugins/hylouis233/expiry-guardian/README.md) | 看你自己维护的本地账本,算出「该用卡还是该留积分」,并把理由说清楚 | [Hylouis](https://github.com/Hylouis233) |
8787
| [MiniMax Pet](plugins/minimax-ai/minimax-pet/README.zh-CN.md) | 提供外观/任务/设置、可见会话状态、需要回答提醒和透明桌宠;需要 MiniMax Code 3.1.6 或更高版本 | [MiniMax](https://github.com/MiniMax-AI) |
8888
| [MCP OAuth 令牌台](plugins/microbiosis/mcp-oauth-console/README.zh-CN.md) | 给需要 OAuth 的 MCP 服务器完成登录:设备码或授权码 + PKCE 流程,把 `Authorization` 头写入 MCP 配置,并可选择在到期前自动续期 | [Microbiosis](https://github.com/Microbiosis) |
89+
| [MiniMax Bot Bridge](plugins/nattiini45/minimax-bot-bridge/README.zh-CN.md) | 把手机和桌面上的 MiniMax Bot 团队配对:申请配对码、查看并撤销已配对的手机,并通过你自己运营的中继转发团队对话与工具活动。需要 MiniMax Code 3.1.5 或更高版本,以及官方 MiniMax Bot 插件 | [nattiini45](https://github.com/nattiini45) |
8990

9091
<details>
9192
<summary>预览:Cutline</summary>
Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
{
2+
"schemaVersion": 1,
3+
"name": "minimax-bot-bridge",
4+
"displayName": "MiniMax Bot Bridge",
5+
"version": "0.1.0",
6+
"description": "Pairs your phone with the MiniMax Bot team on your desktop: a pairing code, the paired phones, and the relay configuration, with the team's conversations and tool activity carried over a relay you operate.",
7+
"author": "nattiini45",
8+
"icon": "icon.png",
9+
"darkIcon": "icon-dark.png",
10+
"category": "Productivity",
11+
"exampleQueries": [
12+
"Open MiniMax Bot Bridge and pair my phone",
13+
"Show the pairing code for my phone",
14+
"Which phones are linked to this desktop?"
15+
],
16+
"apps": [],
17+
"mcpServers": [],
18+
"skills": []
19+
}
Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
MIT License
2+
3+
Copyright (c) 2026 nattiini45 and contributors
4+
5+
Permission is hereby granted, free of charge, to any person obtaining a copy
6+
of this software and associated documentation files (the "Software"), to deal
7+
in the Software without restriction, including without limitation the rights
8+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9+
copies of the Software, and to permit persons to whom the Software is
10+
furnished to do so, subject to the following conditions:
11+
12+
The above copyright notice and this permission notice shall be included in all
13+
copies or substantial portions of the Software.
14+
15+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21+
SOFTWARE.
Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
MIT License
2+
3+
Copyright (c) 2026 MiniMax
4+
5+
Permission is hereby granted, free of charge, to any person obtaining a copy
6+
of this software and associated documentation files (the "Software"), to deal
7+
in the Software without restriction, including without limitation the rights
8+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9+
copies of the Software, and to permit persons to whom the Software is
10+
furnished to do so, subject to the following conditions:
11+
12+
The above copyright notice and this permission notice shall be included in all
13+
copies or substantial portions of the Software.
14+
15+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21+
SOFTWARE.
Lines changed: 121 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,121 @@
1+
# MiniMax Bot Bridge
2+
3+
English | [简体中文](README.zh-CN.md)
4+
5+
Pair your phone with the **MiniMax Bot** team on your desktop. The bridge is the Mini App that
6+
runs on the desktop: it shows a pairing code, keeps the list of paired phones, and carries your
7+
team's conversations and tool activity over a relay you control to the mobile client.
8+
9+
This is an independent project, not an official MiniMax application. It does not modify or
10+
reproduce the official MiniMax Bot plugin — it calls the team tools the Host already exposes and
11+
leaves the desktop in charge.
12+
13+
## What it does
14+
15+
- **Pairing surface.** Request a single-use six-digit code, read it on the desktop, and list or
16+
revoke the phones paired with this desktop.
17+
- **Relay configuration.** Set the relay address, the account id, the bridge id, the bridge
18+
credential and the display name. The bridge reconnects when the configuration changes, and it
19+
refuses a relay it may not talk to.
20+
- **Team access.** Read the team's profiles, group membership and conversation history through the
21+
`minimax-bot` tools the Host exposes, and send messages as a Bot.
22+
- **Hosted turns.** A Bot turn can run in a session the bridge owns instead of the team's own
23+
conversation, with streaming output and the desktop's permission prompts.
24+
25+
The phone is a separate app: [MiniMax Bot Mobile](https://github.com/nattiini45/minimax-bot-mobile),
26+
an Expo / React Native client for Android, iOS and the web. The bridge is useless without it,
27+
and it is useful without nothing else: the relay is the only third piece.
28+
29+
## Requirements
30+
31+
- MiniMax Code 3.1.5 or later — see [Tested environment](#tested-environment).
32+
- The official **MiniMax Bot** plugin on the same desktop. The bridge calls that plugin's tools
33+
through the Host's tool API. Without it the bridge still starts, pairs and reports its
34+
diagnostics, but it cannot show or drive your team.
35+
- A relay you operate, and a bridge credential minted for it. See
36+
[Pairing and credentials](docs/PAIRING.md) for the wire flow, and the mobile app's repository
37+
for the relay Worker and the minting command.
38+
39+
## Install
40+
41+
Copy the entire plugin directory, including the hidden `.minimax-plugin` directory, into the
42+
client's `plugins` directory:
43+
44+
```text
45+
Repository: plugins/nattiini45/minimax-bot-bridge/
46+
Install to: <dataDir>/plugins/minimax-bot-bridge/
47+
Manifest: <dataDir>/plugins/minimax-bot-bridge/.minimax-plugin/plugin.json
48+
```
49+
50+
`dataDir` is the `.minimax` directory in your home folder (`~/.minimax`) by default. The author
51+
directory (`nattiini45/`) only groups the contribution in the registry; the installed plugin is
52+
`minimax-bot-bridge`. Restart MiniMax Code, confirm the plugin is recognised and enabled, and ask
53+
the Agent to open "MiniMax Bot Bridge".
54+
55+
To update, close the app and exit MiniMax Code, then replace the complete plugin directory. Keep
56+
a backup outside `plugins/`. The bridge's own state lives in the Host's data directory, not in the
57+
plugin directory, so replacing the directory does not lose it.
58+
59+
## Configure and pair
60+
61+
1. Open the bridge surface.
62+
2. Enter the relay address (`wss://…` or `https://…`), the account id, the bridge id and the
63+
bridge token minted with the relay secret.
64+
3. Request a pairing code and read the six digits aloud.
65+
4. Enter the same relay address, the same account id and those six digits in the phone app.
66+
67+
The code is single-use and expires after five minutes. The phone can be revoked from the bridge
68+
surface at any time.
69+
70+
## Tested environment
71+
72+
- MiniMax Code 3.1.10 on Windows 11 (x64), with the official MiniMax Bot plugin installed.
73+
- Node.js 24.22.1 and npm 11.19.1.
74+
- The bridge's own suite passes on that machine: `npm test` inside the plugin directory. It needs
75+
no dependencies and no network.
76+
77+
## Data & access
78+
79+
| | |
80+
| --- | --- |
81+
| **Files written** | Only inside the Host's private data directory (`context.dataDir`): `bridge-config.json` (relay address, account id, bridge id, display name, per-Bot turn mode), `bridge-token` (the relay credential, written for its owner only) and `ledger.json` (turn, tool and permission records — counters and identifiers, not message text). One `rooms/<hash>/ledger.json` is added per room. |
82+
| **Files read** | Those same files, on start. Nothing else: no Host files, no other plugins' files, no user documents. |
83+
| **Network** | The relay address you configure, over HTTPS or WSS only. A cleartext `http://` or `ws://` address is accepted only for a loopback relay. `wss://` and `https://` name the same relay, and the credential never crosses between them. |
84+
| **Spawned processes** | None. The bridge is one Node process with no child processes. |
85+
| **Agent turns** | Yes — `agentAccess: ["session.run"]`. The bridge runs a Bot turn through the Host Agent in a session it owns and asks it for a model. It never reads your other conversations: `session.read` is not declared, and the team conversation history it shows comes from the team tools. |
86+
| **Tools called** | Yes — `toolAccess: ["call"]`. The bridge calls the `minimax-bot` team tools the Host exposes (`mcp__minimax-bot__…`) to read the team, its groups and its conversation history, and to send messages. Each call is judged by your permission rules. |
87+
| **Microphone** | Not used. The bridge records no audio and transcribes nothing. |
88+
| **State** | The Host's private data directory, whose location is opaque and owned by the Host. Nothing is written outside it. The relay keeps its own state on the relay operator's account. |
89+
90+
### Security notes
91+
92+
- **The desktop is a trust boundary.** The bridge binds loopback and checks the caller's own
93+
headers and a per-process secret before it answers a request that could change its
94+
configuration. That defends the local web surface; it does not sandbox other native processes
95+
on the same machine.
96+
- **A paired phone is desktop access.** A paired device can exercise the bridge's available
97+
functionality. Share pairing codes only with the people you mean to, and revoke devices you no
98+
longer control.
99+
- **Trust your relay.** TLS protects each connection, but the JSON the relay forwards is not
100+
end-to-end encrypted. The relay operator can read conversations and operation payloads.
101+
- **Capabilities are granted, not reproduced.** The bridge works through the capabilities the
102+
Host and the team tools offer on that desktop. It holds no MiniMax account credential of its
103+
own; the desktop's existing account and grants are what it uses.
104+
105+
## Development
106+
107+
```sh
108+
npm test
109+
```
110+
111+
The suite runs on Node's built-in test runner and needs no dependencies and no network. The
112+
runtime payload is self-contained: it uses Node's standard library only, and the shared protocol
113+
is vendored into `miniapp/node/protocol/`.
114+
115+
## License
116+
117+
The bridge is MIT licensed — see [LICENSE](LICENSE). The icon uses MiniMax's mascot artwork,
118+
which MiniMax licenses under the MIT terms in [LICENSE-MINIMAX.txt](LICENSE-MINIMAX.txt).
119+
120+
MiniMax names and marks identify the products this project connects to. The project license does
121+
not grant trademark rights and does not imply MiniMax's endorsement.
Lines changed: 105 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,105 @@
1+
# MiniMax Bot Bridge
2+
3+
[English](README.md) | 简体中文
4+
5+
把你的手机和桌面上的 **MiniMax Bot** 团队配对起来。Bridge 是运行在桌面端的 Mini App:它显示配对码、
6+
保存已配对的手机,并通过你自己运营的中继,把团队的对话和工具活动转发给手机客户端。
7+
8+
这是一个独立项目,不是 MiniMax 官方应用。它不修改、也不复刻官方 MiniMax Bot 插件——它调用 Host 已经
9+
暴露的团队工具,桌面端始终掌握主导权。
10+
11+
## 它能做什么
12+
13+
- **配对界面。** 申请一个一次性的六位配对码,在桌面上读出来,并查看或撤销与这台桌面配对的手机。
14+
- **中继配置。** 设置中继地址、账号 ID、桥接 ID、桥接凭据和显示名称。配置变化后桥接会自动重连;
15+
它拒绝使用自己不该连接的中继地址。
16+
- **团队访问。** 通过 Host 暴露的 `minimax-bot` 工具读取团队成员资料、群组成员和对话历史,并以某个 Bot
17+
的身份发送消息。
18+
- **托管回合。** Bot 的回合可以运行在桥接自己拥有的会话里,而不是团队自己的对话中,并带有流式输出和
19+
桌面的权限提示。
20+
21+
手机端是另一个应用:[MiniMax Bot Mobile](https://github.com/nattiini45/minimax-bot-mobile),
22+
一个面向 Android、iOS 和网页的 Expo / React Native 客户端。没有它,桥接没有意义;而除了中继之外,
23+
它也不需要别的组件。
24+
25+
## 运行要求
26+
27+
- MiniMax Code 3.1.5 或更高版本——见[环境与兼容](#环境与兼容)。
28+
- 同一台桌面上装有官方 **MiniMax Bot** 插件。桥接通过 Host 的工具 API 调用该插件的工具。没有它,
29+
桥接仍然可以启动、配对并报告诊断信息,但无法展示或驱动你的团队。
30+
- 你自己运营的中继,以及为它签发的桥接凭据。线路流程见[配对与凭据](docs/PAIRING.md),
31+
中继 Worker 和签发命令见手机端仓库。
32+
33+
## 安装
34+
35+
把整个插件目录(包含隐藏的 `.minimax-plugin` 目录)复制到客户端的 `plugins` 目录:
36+
37+
```text
38+
仓库路径:plugins/nattiini45/minimax-bot-bridge/
39+
安装到: <dataDir>/plugins/minimax-bot-bridge/
40+
清单文件:<dataDir>/plugins/minimax-bot-bridge/.minimax-plugin/plugin.json
41+
```
42+
43+
`dataDir` 默认是用户主目录下的 `.minimax` 目录(`~/.minimax`)。作者目录(`nattiini45/`)只是在仓库里
44+
归类贡献者,安装后的插件 ID 是 `minimax-bot-bridge`。重启 MiniMax Code,确认插件已被识别并启用,然后
45+
让 Agent 打开「MiniMax Bot Bridge」。
46+
47+
更新时,先关闭应用并退出 MiniMax Code,再整体替换插件目录;备份请放在 `plugins/` 之外。桥接自己的状态
48+
保存在 Host 的数据目录里,不在插件目录里,所以替换目录不会丢状态。
49+
50+
## 配置与配对
51+
52+
1. 打开桥接界面。
53+
2. 填入中继地址(`wss://…` 或 `https://…`)、账号 ID、桥接 ID,以及用中继密钥签发的桥接令牌。
54+
3. 申请配对码,把这六位数字念出来。
55+
4. 在手机端填入同样的中继地址、同样的账号 ID 和这六位数字。
56+
57+
配对码一次性使用,五分钟后过期。手机随时可以在桥接界面上撤销。
58+
59+
界面目前为英文。
60+
61+
## 环境与兼容
62+
63+
- MiniMax Code 3.1.10,Windows 11(x64),并安装了官方 MiniMax Bot 插件。
64+
- Node.js 24.22.1 与 npm 11.19.1。
65+
- 桥接自带测试在该机器上全部通过:在插件目录里执行 `npm test`。不需要安装依赖,也不需要网络。
66+
67+
## 数据与能力边界
68+
69+
| | |
70+
| --- | --- |
71+
| **写入的文件** | 仅限 Host 的私有数据目录(`context.dataDir`):`bridge-config.json`(中继地址、账号 ID、桥接 ID、显示名称、每个 Bot 的回合模式)、`bridge-token`(中继凭据,仅所有者可读)和 `ledger.json`(回合、工具与权限记录——计数与标识,不含消息正文)。每个房间另有 `rooms/<hash>/ledger.json`。 |
72+
| **读取的文件** | 启动时只读上面这几个文件。没有别的:不读 Host 文件,不读其他插件的文件,不读用户文档。 |
73+
| **网络** | 只访问你配置的中继地址,且只走 HTTPS 或 WSS。明文的 `http://`/`ws://` 地址只接受回环地址。`wss://` 和 `https://` 指的是同一个中继,凭据不会在两者之间传递。 |
74+
| **启动的进程** | 没有。桥接是一个 Node 进程,不派生任何子进程。 |
75+
| **Agent 回合** | 有——`agentAccess: ["session.run"]`。桥接通过 Host Agent 在自己拥有的会话里运行 Bot 回合,并向它索取模型。它从不读取你的其他对话:没有声明 `session.read`,它展示的团队对话历史来自团队工具。 |
76+
| **调用的工具** | 有——`toolAccess: ["call"]`。桥接调用 Host 暴露的 `minimax-bot` 团队工具(`mcp__minimax-bot__…`),用来读取团队、群组和对话历史,并发送消息。每次调用都按你的权限规则判定。 |
77+
| **麦克风** | 不使用。桥接不录音,也不做语音转写。 |
78+
| **状态存放位置** | Host 的私有数据目录,位置由 Host 管理且不透明。除此之外不写任何文件。中继的状态保存在中继运营方那边。 |
79+
80+
### 安全说明
81+
82+
- **桌面端是信任边界。** 桥接只监听回环地址,并在回答可能改变配置的请求前校验调用方自身的请求头和一个
83+
每进程生成的密钥。这保护的是本地网页界面,并不能隔离同一台机器上的其他原生进程。
84+
- **配对成功就等于授予了桌面访问权。** 已配对的设备可以行使桥接提供的能力。只把配对码告诉你要授权的人,
85+
并撤销不再使用的设备。
86+
- **信任你的中继。** TLS 保护的是每一段连接,但中继转发的 JSON 没有端到端加密。中继运营方可以读到对话和
87+
操作负载。
88+
- **能力是被授予的,不是被复刻的。** 桥接只使用那台桌面上的 Host 与团队工具所提供的能力。它自己不持有
89+
MiniMax 账号凭据,用的是桌面端已有的账号和授权。
90+
91+
## 开发
92+
93+
```sh
94+
npm test
95+
```
96+
97+
测试基于 Node 内置的测试运行器,不需要依赖,也不需要网络。运行时负载是自包含的:只用 Node 标准库,
98+
共享协议已经内置在 `miniapp/node/protocol/`。
99+
100+
## 许可
101+
102+
桥接采用 MIT 许可——见 [LICENSE](LICENSE)。图标使用 MiniMax 的吉祥物美术作品,MiniMax 以 MIT 条款授权,
103+
见 [LICENSE-MINIMAX.txt](LICENSE-MINIMAX.txt)。
104+
105+
MiniMax 的名称与标识用于指代本项目所连接的产品。本项目的许可不授予商标权,也不代表 MiniMax 的背书。

0 commit comments

Comments
 (0)