Skip to content
Merged
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
45 changes: 29 additions & 16 deletions AGENTS.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,13 +11,15 @@ update one package at `plugins/<github-username>/<plugin-id>/`.
editing any manifest.
2. Read `docs/runtime.md` before editing `miniapp/node/*`. Read `docs/security.md` before the
Node code reads or writes files, spawns processes, or makes network requests. Read
`docs/client.md` before the page calls `window.mcode`, and `docs/agent.md` before declaring
`agentAccess`.
`docs/client.md` before the page calls `window.mcode` or a browser permission such as
`getUserMedia`, `docs/agent.md` before declaring `agentAccess`, and `docs/tool.md` before
declaring `toolAccess`.
3. Write `README.md` (English; `README.zh-CN.md` optional): what it does, how to install and open
it, and the headings `## Tested environment` and `## Data & access` (files read/written,
network hosts, spawned processes, Agent turns, where state is stored). When the package uses a
feature with a minimum client version (`docs/package-contract.md`), name a MiniMax Code version
at or above it under `## Tested environment`.
network hosts, spawned processes, Agent turns, conversations read, tools called, microphone use,
where state is stored). When the package uses a feature with a minimum client version
(`docs/package-contract.md`), name a MiniMax Code version at or above it under
`## Tested environment`.
4. Add one row to the table in both root READMEs.
5. Run `npm run check`. Done when it reports no errors and every warning is either fixed or
explained in the PR description.
Expand All @@ -38,10 +40,16 @@ update one package at `plugins/<github-username>/<plugin-id>/`.
- A Mini App package is a MiniMax Plugin. Skills, subagents (`agents`), MCP servers, hooks, host
bindings, MCP endpoints, and `hostConnectorAccess` may all be declared; `npm run check` validates
their shape only, and the Host validates them at install time. This repository documents the Mini
App payload, the page APIs, and the Agent API; treat `context.hostConnector` and the other
capabilities as outside its scope.
- `agentAccess` gives an Agent with files, shell, and MCP. Declare it only when needed, and never
answer a `permission.requested` with `allowOnce` unless the user chose it.
App payload, the page APIs, the Agent API, and the tool API; treat `context.hostConnector` and the
other capabilities as outside its scope.
- Declare exactly the access the code uses: `agentAccess` (`session.run`, `session.read`),
`toolAccess`, `deviceAccess`. A call without its declaration fails at runtime, and
`npm run check` reports it as `ACCESS_UNDECLARED`; do not declare access the app does not use.
- `agentAccess` gives an Agent with files, shell, and MCP, and `session.read` exposes every user
conversation. Never answer a `permission.requested` with `allowOnce` unless the user chose it.
- The user can switch any declared access off at any time. Handle `NOT_PERMITTED`
(`not_permitted` on the page), `TOOL_NOT_PERMITTED`, and `NotAllowedError` where the call is made,
and keep the app running.
- The runtime payload is exactly `miniapp/client` and `miniapp/node`. Keep tests and docs outside
`miniapp/`. Vendor third-party code inside the payload; `node_modules` is never committed.
- Paths are portable: ASCII, no symlinks, no `..`. `npm run check` enforces the full rule set.
Expand All @@ -51,17 +59,22 @@ update one package at `plugins/<github-username>/<plugin-id>/`.
## Review policy

Maintainers gate on three things: manifests pass `npm run check`; the README describes real
behaviour (files, network, processes, Agent turns, tested environment); the package cannot damage
Host or user data. Everything else is a suggestion.
behaviour (files, network, processes, Agent turns, conversations read, tools called, microphone
use, tested environment); the package cannot damage Host or user data. Everything else is a
suggestion.

## Navigation

- `docs/package-contract.md` — layout, the three manifests, portable paths, limits, minimum client
versions
- `docs/package-contract.md` — layout, the three manifests, portable paths, limits, permission
switches, minimum client versions, declared access versus code
- `docs/runtime.md` — `start(context)`, `dispose`, logger, lifecycle, loopback authentication
- `docs/client.md` — page APIs: `message.append`, `agent`, `window`
- `docs/agent.md` — `agentAccess`, sessions, calls, events, errors
- `docs/client.md` — page APIs: `capabilities`, browser permissions, `message.append`, `agent`,
`speech.transcribe`, `tool.request`, `window`
- `docs/agent.md` — `agentAccess`, sessions, calls, `whenBusy`, reading and observing sessions,
events, errors
- `docs/tool.md` — `toolAccess`, `context.tool`, permission prompts, errors
- `docs/security.md` — process boundary, state, writing outside `dataDir`, spawning, network, Agent
turns
turns, reading conversations, calling tools, microphone
- `docs/snippets/audio-capture.ts` — microphone capture in the format `speech.transcribe` takes
- `examples/hello-miniapp/` — the copyable starting point
- `CONTRIBUTING.md` — fork, pull request, and license steps for people
4 changes: 2 additions & 2 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@ English | [简体中文](CONTRIBUTING.zh-CN.md)
We welcome tools, games, and other interesting apps you have built for MiniMax Code.

1. Fork this repository and add your complete plugin package under `plugins/<your-github-username>/<plugin-id>/`. Use a lowercase GitHub username for the author directory.
2. Start from `examples/hello-miniapp/`. Include the hidden `.minimax-plugin/` directory, `package.json`, `miniapp/`, and all required runtime assets. The plugin must work when copied on its own, without depending on other directories in this repository. The exact rules are in `docs/package-contract.md`, `docs/runtime.md`, `docs/client.md`, `docs/agent.md`, and `docs/security.md`.
3. Add a short English `README.md`. You may also include `README.zh-CN.md` with links between the two versions. Explain what the app does, how to install and use it, tested client versions and operating systems, required configuration, file access, network requests, and any Agent turns it runs. Screenshots or GIFs are welcome. If the app uses a feature that needs a newer client, such as `agentAccess` or `surface.window`, name a MiniMax Code version at or above its minimum under `## Tested environment` (see "Minimum client version" in `docs/package-contract.md`).
2. Start from `examples/hello-miniapp/`. Include the hidden `.minimax-plugin/` directory, `package.json`, `miniapp/`, and all required runtime assets. The plugin must work when copied on its own, without depending on other directories in this repository. The exact rules are in `docs/package-contract.md`, `docs/runtime.md`, `docs/client.md`, `docs/agent.md`, `docs/tool.md`, and `docs/security.md`.
3. Add a short English `README.md`. You may also include `README.zh-CN.md` with links between the two versions. Explain what the app does, how to install and use it, tested client versions and operating systems, required configuration, file access, network requests, any Agent turns it runs, conversations it reads, tools it calls, and microphone use. Screenshots or GIFs are welcome. Declare in `miniapp/miniapp.json` exactly the access the code uses; `npm run check` reports calls without a declaration. If the app uses a feature that needs a newer client, such as `agentAccess`, `toolAccess`, `deviceAccess`, or `surface.window`, name a MiniMax Code version at or above its minimum under `## Tested environment` (see "Minimum client version" in `docs/package-contract.md`).
4. Include a `LICENSE` you are entitled to use, and preserve required attribution for third-party code and assets.
5. Add an entry to the app tables in both root READMEs, run `npm run check` (Node.js 22 or later) until it reports no errors, and open a pull request.

Expand Down
4 changes: 2 additions & 2 deletions CONTRIBUTING.zh-CN.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@
欢迎分享你为 MiniMax Code 制作的小工具、游戏和其他有趣作品。

1. Fork 本仓库,在 `plugins/<你的 GitHub username>/<plugin-id>/` 下放入完整插件包。用户名目录统一使用小写。
2. 从 `examples/hello-miniapp/` 复制开始。保留 `.minimax-plugin/` 隐藏目录、`package.json`、`miniapp/` 和运行所需资源。插件应能独立复制使用,不依赖仓库里的其他目录。具体规则见 `docs/package-contract.md`、`docs/runtime.md`、`docs/client.md`、`docs/agent.md` 和 `docs/security.md`(英文)。
3. 添加简短的英文 `README.md`,可另附 `README.zh-CN.md` 并互相链接。说明用途、安装与使用方式、已验证的客户端版本和系统,以及需要的配置、文件访问、网络请求和会运行的 Agent 任务。欢迎附上截图或 GIF。如果用到了需要较新客户端的能力(如 `agentAccess`、`surface.window`),请在 `## Tested environment` 中写明不低于最低要求的 MiniMax Code 版本(见 `docs/package-contract.md` 的 “Minimum client version”)。
2. 从 `examples/hello-miniapp/` 复制开始。保留 `.minimax-plugin/` 隐藏目录、`package.json`、`miniapp/` 和运行所需资源。插件应能独立复制使用,不依赖仓库里的其他目录。具体规则见 `docs/package-contract.md`、`docs/runtime.md`、`docs/client.md`、`docs/agent.md`、`docs/tool.md` 和 `docs/security.md`(英文)。
3. 添加简短的英文 `README.md`,可另附 `README.zh-CN.md` 并互相链接。说明用途、安装与使用方式、已验证的客户端版本和系统,以及需要的配置、文件访问、网络请求、会运行的 Agent 任务、会读取的会话、会调用的工具和麦克风使用情况。欢迎附上截图或 GIF。`miniapp/miniapp.json` 中只声明代码实际用到的权限;代码调用了未声明的能力时,`npm run check` 会报出来。如果用到了需要较新客户端的能力(如 `agentAccess`、`toolAccess`、`deviceAccess`、`surface.window`),请在 `## Tested environment` 中写明不低于最低要求的 MiniMax Code 版本(见 `docs/package-contract.md` 的 “Minimum client version”)。
4. 添加你有权使用的 `LICENSE`,保留第三方代码和素材要求的署名。
5. 在根目录中英文 README 的作品表格中各增加一行,运行 `npm run check`(需要 Node.js 22 或更高版本)直到没有 error,再提交 Pull Request。

Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,7 @@ The preview uses synthetic data. The app interface is currently in Chinese. See

### Requirements

Use a MiniMax Code desktop version that supports MiniApps. Check the app's README for tested client versions, operating systems, configuration, and known limitations. Compatibility is documented per app. Apps that use newer capabilities, such as running Agent tasks or opening in their own window, need MiniMax Code 3.1.2 or later; older versions cannot install them.
Use a MiniMax Code desktop version that supports MiniApps. Check the app's README for tested client versions, operating systems, configuration, and known limitations. Compatibility is documented per app. Apps that use newer capabilities need a newer client, and older versions cannot install them: running Agent tasks or opening in their own window needs MiniMax Code 3.1.2 or later; reading your conversations, calling your installed tools, or using the microphone needs 3.1.5 or later. From 3.1.5 you can switch off each permission an app declares, one by one, in its plugin details.

### 1. Download

Expand Down
2 changes: 1 addition & 1 deletion README.zh-CN.md
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,7 @@ MiniMax Code Agent 通过宿主 MCP 客户端与 MiniApp 协作。业务请求

### 使用要求

需要支持 MiniApp 的 MiniMax Code 桌面端版本。各作品的 README 会说明已验证的客户端版本、操作系统、所需配置和已知限制,兼容性以具体作品为准。使用较新能力(如运行 Agent 任务、在独立窗口中打开)的作品需要 MiniMax Code 3.1.2 或更高版本,旧版本无法安装。
需要支持 MiniApp 的 MiniMax Code 桌面端版本。各作品的 README 会说明已验证的客户端版本、操作系统、所需配置和已知限制,兼容性以具体作品为准。使用较新能力的作品需要较新的客户端,旧版本无法安装:运行 Agent 任务、在独立窗口中打开需要 MiniMax Code 3.1.2 或更高版本;读取你的会话、调用你已安装的工具或使用麦克风需要 3.1.5 或更高版本。从 3.1.5 起,你可以在每个作品的插件详情里逐项关闭它声明的权限。

### 1. 下载

Expand Down
Loading
Loading