|
| 1 | +# MMX Octopus |
| 2 | + |
| 3 | +*A small octopus girl who lives on your desktop: she shows what your Agent is |
| 4 | +doing, and the Agent can tell her what to say.* |
| 5 | + |
| 6 | +English | [简体中文](README.zh-CN.md) |
| 7 | + |
| 8 | +Author: [antianqi](https://github.com/antianqi) · Version: `1.6.0` · |
| 9 | +Plugin ID: `mmx-octopus` · Category: `Productivity` |
| 10 | + |
| 11 | +*The app interface is in Chinese.* |
| 12 | + |
| 13 | +## What it does |
| 14 | + |
| 15 | +- **She mirrors the Agent.** She subscribes to the Host Agent's turn events |
| 16 | + (`turn.started`, `message.committed`, `turn.finished`) and switches her |
| 17 | + expression: `thinking` when a turn starts, `working` while a task runs, |
| 18 | + `celebrate` when a turn finishes with a real answer. |
| 19 | +- **She reports the end of a turn.** When a turn finishes she says one short |
| 20 | + line about what came out of it — a summary of the final reply, or a |
| 21 | + fallback line naming the session. |
| 22 | +- **She has a chat of her own.** The panel has a chat area. A message to her |
| 23 | + runs **one Agent turn in her own session**, and she answers in her own voice: |
| 24 | + short sentences, split into several bubbles as they arrive. |
| 25 | +- **She keeps a diary.** The panel's diary holds her own monologues. It is a |
| 26 | + separate file from the chat history, and she writes it on her own. |
| 27 | +- **The Agent can drive her.** This package hosts an MCP server with four |
| 28 | + tools (below), so the Agent can make her speak, change her expression, move |
| 29 | + her, or read her state. |
| 30 | +- **She stays out of the way.** The floating window is frameless, transparent, |
| 31 | + always on top and click-through, so it never blocks the desktop. It is |
| 32 | + 220 × 460 and can be dragged anywhere on the screen; the Agent can park it in |
| 33 | + one of four fixed spots (three corners and the centre). |
| 34 | +- **Finding her again.** The floating window is click-through, so it never |
| 35 | + swallows your clicks: move the pointer onto her and click-through switches off |
| 36 | + there — click her for a reaction, press and drag to move her. You can also park |
| 37 | + her in one of the four fixed spots from the panel (Settings → 「停靠位置」); that |
| 38 | + only takes effect once she is floating. The floating window is a separate |
| 39 | + window the Host opened — close it the way you close any Host window; the panel |
| 40 | + keeps running, and you can float her out again at any time. |
| 41 | + |
| 42 | +## Install |
| 43 | + |
| 44 | +Copy the whole `mmx-octopus` directory, including the hidden `.minimax-plugin` |
| 45 | +directory, into your MiniMax Code data directory: |
| 46 | + |
| 47 | +```text |
| 48 | +Repository: mmx-octopus/ |
| 49 | +Install to: <dataDir>/plugins/mmx-octopus/ |
| 50 | +Manifest: <dataDir>/plugins/mmx-octopus/.minimax-plugin/plugin.json |
| 51 | +``` |
| 52 | + |
| 53 | +The default data directory is `~/.minimax`, so the destination is normally |
| 54 | +`~/.minimax/plugins/mmx-octopus/`. |
| 55 | + |
| 56 | +Restart MiniMax Code, confirm the plugin is recognised and enabled, and open |
| 57 | +**MMX 章鱼娘** from the plugin list. The floating window appears on the |
| 58 | +desktop; the panel holds her status, the chat area and the diary. |
| 59 | + |
| 60 | +Nothing else is needed: no API key, no account, no dependency to install. |
| 61 | + |
| 62 | +## Usage |
| 63 | + |
| 64 | +1. Open the plugin from the plugin list. The floating window appears. |
| 65 | +2. Drag it to a corner, or let the Agent move it with `mmx_move`. |
| 66 | +3. Talk to the Agent as usual and watch her expression follow along. |
| 67 | +4. Open the panel and write to her — she answers in her own session. |
| 68 | + |
| 69 | +### The Agent's four tools |
| 70 | + |
| 71 | +The package hosts one Streamable HTTP MCP server (`mmx`), mounted by |
| 72 | +`miniapp.json` at `/mcp/mmx`. The Host rewrites its address and authenticates |
| 73 | +it like the rest of the port. |
| 74 | + |
| 75 | +| Tool | What it does | |
| 76 | +| --- | --- | |
| 77 | +| `mmx_say` | Pop a bubble with one or two sentences — the tool asks for no more than 120 characters, and the runtime refuses anything over 300. Good for a "task finished" notice. | |
| 78 | +| `mmx_mood` | Switch her expression: `idle`, `thinking`, `working` or `celebrate`. | |
| 79 | +| `mmx_move` | Move the floating window to one of four spots: `bottom-right`, `bottom-left`, `top-right` or `center`. | |
| 80 | +| `mmx_status` | Read her expression, her current bubble, and whether the Agent is running. | |
| 81 | + |
| 82 | +## How her body works |
| 83 | + |
| 84 | +- **94 short clips with an alpha channel** live in |
| 85 | + `miniapp/client/assets/webm/`, listed by |
| 86 | + `miniapp/client/assets/webm/manifest.json`. They are the main body |
| 87 | + animation, not a fallback. |
| 88 | +- A clip is taken from a **pool**, the pool follows a **track**, and two |
| 89 | + `<video>` elements act as **double buffers**: the front one plays while the |
| 90 | + back one loads the next clip, so two clips never leave a gap between them. |
| 91 | +- **The fallback is real.** A CSS-transform `pose` track (breathing, nodding, a |
| 92 | + small hop) takes over when the pool has nothing to play, when a clip fails |
| 93 | + to load three times in a row, or when a clip does not arrive in time. It is |
| 94 | + what you see while the clips are still loading. |
| 95 | +- **There is no lip-sync.** The clips are still pictures of her, so her mouth |
| 96 | + does not follow the words. That is a deliberate limit, not a bug. |
| 97 | + |
| 98 | +## Tested environment |
| 99 | + |
| 100 | +- MiniMax Code 3.1.7 on Windows 11 (x64). |
| 101 | +- The package needs **MiniMax Code 3.1.5 or later**: it declares |
| 102 | + `agentAccess: ["session.read", "session.run"]`, and a client older than |
| 103 | + 3.1.5 rejects the whole package rather than installing half of it. |
| 104 | +- A desktop client that supports MiniApps and Agent turns. |
| 105 | +- The bundled self-check script needs Node 22 or later. |
| 106 | + |
| 107 | +## Data & access |
| 108 | + |
| 109 | +- **What it reads** — this package's own files, read from |
| 110 | + `context.pluginRoot`: `miniapp/node/identity/AGENTS.md` and |
| 111 | + `miniapp/node/identity/STORY.md` (who she is), plus the page assets under |
| 112 | + `miniapp/client/`. |
| 113 | +- **And one file of the Host's** — to keep the name in the Host's agent list in sync |
| 114 | + with the name set in the panel, the runtime rewrites the `displayName:` line in the |
| 115 | + frontmatter of the `agent.md` of **the agent that has this Mini App installed** — |
| 116 | + the one whose folder contains `miniapps/<plugin-id>`. It never goes looking for |
| 117 | + other agents' files: it does not walk up the directory tree for an `agent.md`, and |
| 118 | + it leaves every other agent's file alone. The `agents` folder is derived from this |
| 119 | + package's own data directory rather than a hard-coded home path. **This still |
| 120 | + relies on the Host's on-disk layout, which is not a documented API.** |
| 121 | +- **What it writes** — four JSON files under `context.dataDir`, the private |
| 122 | + directory the Host creates for this plugin: `context.dataDir/state.json` (her |
| 123 | + expression, position, bubble and the Agent's busy state), |
| 124 | + `context.dataDir/chat.json` (your chat with her), |
| 125 | + `context.dataDir/diary.json` (her diary) and `context.dataDir/style.json` |
| 126 | + (how she has learned to write). Every write is atomic — a temporary file in |
| 127 | + the same directory, then a rename — so a crash cannot leave a half-written |
| 128 | + file behind. |
| 129 | +- **The two writes outside that folder** — |
| 130 | + - **`AGENTS.md` in the workspace directory of her own Agent session.** She keeps |
| 131 | + her identity there. The Host re-reads that file every turn and puts it into the |
| 132 | + system prompt, which is why her identity survives context compaction. It is |
| 133 | + written atomically (a temporary file in the same directory, then a rename) and |
| 134 | + only when its content differs from the template shipped in this package — so **a |
| 135 | + hand edit to it is lost on the next turn**. It belongs to this Mini App's own |
| 136 | + agent workspace. It is written **only when that workspace is this package's own |
| 137 | + `miniapps/<plugin-id>` folder**; if the Host resolves some other agent for her |
| 138 | + and the workspace turns out to be a real project, the file is **not** written and |
| 139 | + her identity is passed in the message instead — so a project's own `AGENTS.md` |
| 140 | + is never overwritten. |
| 141 | + - **The `displayName:` line in the frontmatter of that agent's `agent.md`**, so the |
| 142 | + name in the Host's agent list follows the name set in the panel. Only that one |
| 143 | + line is rewritten — the rest of the file is kept verbatim, and nothing is |
| 144 | + written when the file has no frontmatter. It is written when the name changes; |
| 145 | + the candidate files are tried in order and the runtime stops at the first one it |
| 146 | + can use. |
| 147 | +- **Sessions read** — the package declares `session.read`. It reads the title, |
| 148 | + the running state and the final reply of a turn, to tell whether the Agent is |
| 149 | + thinking or has finished, and to summarise the turn. The board in the panel |
| 150 | + lists the running sessions and refreshes every 30 seconds. |
| 151 | +- **Agent turns it runs** — it declares `session.run`, and it runs **one Agent |
| 152 | + turn per message you send her in the chat area**, in her own session. The |
| 153 | + turn runs through the Host Agent, so it carries the capabilities the Host |
| 154 | + grants that agent; it reads the Host's agent list once to look for an agent |
| 155 | + dedicated to the Mini App, and falls back to the default agent when there is |
| 156 | + none. It never runs turns on your own sessions. |
| 157 | +- **Agent turns it starts on its own** — besides your messages, the runtime starts |
| 158 | + a few turns by itself, and **each of them uses your model quota**: |
| 159 | + - **Idle talk** — after 20 minutes of quiet she may start a conversation of her |
| 160 | + own; at most 2 turns an hour, and at least 45 minutes apart. **Turn it off in |
| 161 | + the panel**: Settings → 「她没人的时候自己说话」 ("She talks when you are away"). |
| 162 | + - **A diary entry** — after a chat, if today has no entry yet, she writes one. |
| 163 | + - **Style learning** — after a chat, your recent chat lines are sent to the model |
| 164 | + so she can pick up how you write. |
| 165 | + - **A reply to your diary comment** — one more turn for each comment you leave |
| 166 | + on a diary entry. |
| 167 | + |
| 168 | + Her static lines (a greeting, "you have been quiet", "you ignored me") are **not** |
| 169 | + model turns and cost nothing — turning idle talk off only stops the model ones. |
| 170 | +- **Other sessions' titles** — with 「她知道我在忙什么」 ("She knows what I am |
| 171 | + busy with") **on (the default)**, the titles and running state of your **other** |
| 172 | + sessions are put into her prompt, so she can tell what you are busy with. **Turn |
| 173 | + it off in the panel**: Settings → 「她知道我在忙什么」. |
| 174 | +- **Tools it calls** — only its own four MCP tools, on its own port. It calls no |
| 175 | + connector, no provider and no third-party service. |
| 176 | +- **Processes spawned** — none. This package starts no child process and runs no |
| 177 | + external binary. |
| 178 | +- **Network** — the loopback address of this Mini App only. The page talks to |
| 179 | + the runtime over the Host's authenticated loopback port, and the runtime |
| 180 | + talks to the Host over the same port. There is no outbound request to any |
| 181 | + other host, and no credential of any kind is read, stored or forwarded. |
| 182 | +- **The microphone** — never. This package declares no `deviceAccess` and asks |
| 183 | + for no browser permission. |
| 184 | +- **State location** — `context.dataDir`. Treat it as opaque: it may move |
| 185 | + between versions, so do not hard-code it. |
| 186 | + |
| 187 | +## Known limits |
| 188 | + |
| 189 | +- The interface is Chinese only. |
| 190 | +- There is no voice: a bubble is text. |
| 191 | +- Her body animation only covers the moments the clips cover; between clips the |
| 192 | + `pose` fallback runs. |
| 193 | +- She answers in whatever agent the Host resolves for her. |
| 194 | + |
| 195 | +## License |
| 196 | + |
| 197 | +MIT — see [LICENSE](LICENSE). |
0 commit comments