|
| 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. |
0 commit comments