Skip to content

Commit 9f0440e

Browse files
committed
Add read-only native sub-agent flow MiniApp
1 parent feffbaa commit 9f0440e

17 files changed

Lines changed: 2442 additions & 0 deletions

File tree

‎README.md‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -78,6 +78,7 @@ The MiniMax Code Agent communicates through the host MCP client. Business reques
7878
| [Disk Insight](plugins/zch0227/disk-insight/) | See where disk space went on macOS and Windows with a sunburst space map, find junk files sorted into three safety tiers, large and duplicate files, and how much code repositories and Git worktrees take; ask an Agent about any item, and permanently delete what you select after a confirmation that lists every item. Requires MiniMax Code 3.1.2 or later | [zch0227](https://github.com/zch0227) |
7979
| [A/时差保安 / Timezone Guard](plugins/liuchen19960902/timezone-guard/) | Check the other side's local time before you message: the target city's clock turns into a green "now is fine", yellow "keep it short", or red "go to sleep" verdict. Requires MiniMax Code 3.1.2 or later | [FineCat](https://github.com/LiuChen19960902) |
8080
| [AI Node Canvas](plugins/antianqi/ai-node-canvas/) | An infinite-canvas node graph for MiniMax Code: wire text, image, video and audio runs into a graph, let each result flow downstream, and run media tools on any result | [antianqi](https://github.com/antianqi) |
81+
| [Agent Flow](plugins/huixin615/agent-flow/) | Inspect native sub-agent timelines across parent and child sessions: actual serial or overlapping execution, child tool activity, and result matches in the current parent history. Requires MiniMax Code 3.1.4 or later | [Huixin615](https://github.com/Huixin615) |
8182

8283
<details>
8384
<summary>Preview: Token Usage Board</summary>

‎README.zh-CN.md‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -78,6 +78,7 @@ MiniMax Code Agent 通过宿主 MCP 客户端与 MiniApp 协作。业务请求
7878
| [磁盘透视](plugins/zch0227/disk-insight/README.zh-CN.md) | 查看 macOS 和 Windows 的磁盘空间去向:旭日图空间地图,按三档风险分类的垃圾文件,大文件和重复文件,代码仓库和 Git worktree 的占用;任何条目都可以问 Agent,选中的条目在确认框里逐一列出,确认后直接永久删除。需要 MiniMax Code 3.1.2 或更高版本 | [zch0227](https://github.com/zch0227) |
7979
| [A/时差保安](plugins/liuchen19960902/timezone-guard/README.zh-CN.md) | 发消息前先看对方那边几点:按对方城市当地时间给出「现在可以聊 / 短聊就好 / 先睡,别发」三档判定。需要 MiniMax Code 3.1.2 或更高版本 | [FineCat](https://github.com/LiuChen19960902) |
8080
| [AI 节点画布](plugins/antianqi/ai-node-canvas/README.zh-CN.md) | MiniMax Code 里的无限画布节点图:把文本、图片、视频、音频的生成接成一张图,结果顺着连线往下传,任何一张结果都能直接做二次处理 | [antianqi](https://github.com/antianqi) |
81+
| [Agent 协作透视](plugins/huixin615/agent-flow/README.zh-CN.md) | 跨父子会话查看原生子 Agent 时间线:实际串行或重叠执行、子任务工具活动,以及当前父会话历史中的回传匹配情况;本机只读。需要 MiniMax Code 3.1.4 或更高版本 | [Huixin615](https://github.com/Huixin615) |
8182

8283
<details>
8384
<summary>预览:Token 用量看板</summary>
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
{
2+
"schemaVersion": 1,
3+
"name": "agent-flow",
4+
"displayName": "Agent 协作透视",
5+
"version": "1.0.0",
6+
"description": "Read-only timeline of native sub-agent tasks, child sessions, and result handoffs in local MiniMax Code conversations.",
7+
"author": "Huixin615",
8+
"icon": "icon.png",
9+
"category": "Code",
10+
"exampleQueries": ["打开 Agent 协作透视", "查看这次任务的子 Agent 协作过程"],
11+
"apps": [],
12+
"mcpServers": [],
13+
"skills": []
14+
}
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 Huixin615
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: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
# Agent Flow (`agent-flow`)
2+
3+
A read-only Mini App for inspecting **native `task` sub-agents** in local MiniMax Code conversations. Open it while working normally: it shows when a parent Agent delegated work, the child session and its tool activity, the child's final reply, and whether a matching result appeared in the parent conversation. It does not launch or control Agents.
4+
5+
The timeline uses persisted task times and reports whether tasks delegated in one turn actually overlapped, plus whether each result can be matched in the current parent history. Two tool calls in one parent message are not assumed to have run in parallel. A task marked “delivered” is not treated as a verified parent-history match; compaction or an unreadable history can leave that match unverified. A match does not prove the parent understood or used the result.
6+
7+
## Install and use
8+
9+
Requires MiniMax Code 3.1.4 or later.
10+
11+
Copy this whole directory, including `.minimax-plugin/`, to `~/.minimax/plugins/agent-flow/`. Restart MiniMax Code, then ask it to “Open Agent Flow” or “打开 Agent 协作透视”. The Mini App tab belongs to the conversation where it was opened; the page can still inspect earlier conversations through its picker. It follows the most recently updated local conversation as an **inference**, including conversations with zero tasks, because the Host does not expose the current chat ID to this Mini App. Use the picker to hold a specific conversation, or choose “Follow latest” to resume automatic selection. It refreshes task data every three seconds and the conversation list every fifteen seconds while open; it stops when closed.
12+
13+
The detail panel shows the `task` instruction, the child Agent's final reply, and tool names. These are recorded statements and actions, not proof that an advertised code change is correct. Previous messages removed from the active history by compaction may no longer be available in the detail panel; the persisted task and parent-child relation remain visible. The session picker starts with 40 entries and offers “Load more” when needed.
14+
15+
This version covers native `task` sub-agents only. MiniMax Bot groups, MoMo-managed tasks, cloud sessions, and arbitrary plugin-owned Agent sessions are outside its scope.
16+
17+
## Tested environment
18+
19+
- MiniMax Code 3.1.4 on macOS: read-only reconstruction verified against one real parent conversation with two foreground `explore` children and matching parent tool results. The plugin appears in the installed plugin list, and the user confirmed that the Mini App page displays both tasks.
20+
- Node.js 24.21.0: synthetic tests cover old sessions, mismatched paths, missing parent results, and nested failed background tasks; the repository `npm run check` passes.
21+
- Windows paths are implemented with Node's cross-platform path utilities but have not been tested on Windows.
22+
23+
## Data & access
24+
25+
- Reads `~/.minimax/v2/sqlite/runtime-state.sqlite` with `node:sqlite` in read-only mode, plus selected session `messages.jsonl` files under `~/.minimax/v2/sessions`. It checks that a history directory encodes the selected session ID, rejects symlinked history paths, and caches unchanged files while open. If `MAVIS_HOME` is set, that directory replaces `~/.minimax`.
26+
- The Mini App Host does not provide a supported API to observe other conversations. These paths and schemas are **internal, undocumented layouts** observed in MiniMax Code 3.1.4; a client update may break them. A missing or incompatible store produces an error, not guessed relationships.
27+
- Does not write Host files, plugin data, or browser storage. No outbound network requests, spawned processes, Agent turns, MCP endpoints, or background monitoring after the page closes.
28+
- The browser receives only selected conversation and task details from the local Node process. Nothing is uploaded. The page renders stored text as text, never as HTML.
29+
30+
## Development
31+
32+
Run `node --test plugins/huixin615/agent-flow/tests/*.test.mjs` and `npm run check` from the repository root. Synthetic tests create temporary stores and contain no real conversation content.
33+
34+
## License
35+
36+
[MIT](./LICENSE)
Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
# Agent 协作透视(`agent-flow`)
2+
3+
一个只读 MiniApp:用户照常在 MiniMax Code 对话,插件展示原生 `task` 子 Agent 何时启动、执行了哪些工具、最终回复了什么,以及结果是否出现在父会话。插件不创建或控制 Agent。
4+
5+
时间线使用任务实际起止时间,并对同一轮委派的任务标出运行区间是否重叠及结果在当前父会话历史中的匹配情况。父 Agent 同一条消息中提出两个任务,不代表两者并行。任务记录中的“已交付”不等于父会话历史已核实回传;历史被压缩或无法读取时会标为暂无法核实。即使匹配成功,也不表示父 Agent 已理解、采用或验证结果。
6+
7+
## 安装与使用
8+
9+
需要 MiniMax Code 3.1.4 或更高版本。
10+
11+
将整个目录(含 `.minimax-plugin/`)复制到 `~/.minimax/plugins/agent-flow/`,重启 MiniMax Code,然后说“打开 Agent 协作透视”。MiniApp 标签页附属于打开它的会话;在别的会话打开后,仍可在页面内选择之前的会话。宿主没有向插件提供当前聊天的 ID,因此页面**推断**最近更新的本机会话并自动跟随,包括尚无子任务的新会话;手动选择会话后保持选择,点击“跟随最新会话”可恢复自动跟随。页面打开时每三秒刷新任务、每十五秒刷新会话列表,关闭后不运行后台监控。
12+
13+
点击子任务可查看父 Agent 发出的 `task` 指令、子 Agent 最终回复与工具名称。这些内容是记录中的陈述和操作,不能单独证明代码修改正确。若旧消息已被压缩移出活动历史,详情可能缺失,但持久化的任务与父子关系仍可见。会话列表先显示 40 条,需要时可点“加载更多会话”。
14+
15+
首版只覆盖原生 `task` 子 Agent,不覆盖 MiniMax Bot 群聊、MoMo 自管任务、云端会话或任意插件自建 Agent 会话。
16+
17+
## Tested environment
18+
19+
- MiniMax Code 3.1.4 / macOS:已用一条含两个前台 `explore` 子 Agent 的真实本机会话验证任务、子会话、父会话结果可以关联;插件已显示在“插件·技能”列表,用户在桌面端打开页面并确认显示两项子任务。
20+
- Node.js 24.21.0:合成测试覆盖旧会话、错误路径、父会话回传缺失以及嵌套的失败后台任务;已运行仓库检查。
21+
- 使用 Node 跨平台路径 API;Windows 尚未实测。
22+
23+
## Data & access
24+
25+
- 只读打开 `~/.minimax/v2/sqlite/runtime-state.sqlite`,并读取 `~/.minimax/v2/sessions` 中所选会话的 `messages.jsonl`;读取前核对历史目录编码的会话 ID,拒绝符号链接路径,运行期间缓存未变化的历史文件。设置 `MAVIS_HOME` 时以该目录为根。
26+
- MiniApp 宿主没有提供观察其他普通会话的稳定 API。以上路径和结构是 MiniMax Code 3.1.4 中观察到的**未承诺稳定的内部格式**;版本变化可能导致读取失败。关联不一致时显示错误或警告,不猜测关系。
27+
- 不写入宿主文件、插件数据或浏览器存储;不向外联网、不启动进程或 Agent、不提供 MCP,也不在页面关闭后继续监控。
28+
- 文本只送到本机 MiniApp 页面,并按纯文本渲染。
29+
30+
## 开发
31+
32+
在仓库根目录运行 `node --test plugins/huixin615/agent-flow/tests/*.test.mjs` 和 `npm run check`。合成测试不包含真实会话内容。
33+
34+
## License
35+
36+
[MIT](./LICENSE)
697 Bytes
Loading

0 commit comments

Comments
 (0)