This repository hosts community Mini App packages for MiniMax Code. Most tasks add or update one
package at plugins/<github-username>/<plugin-id>/; the rest change the checks or the docs (see
"Change the checks or the docs").
- New package: copy
examples/hello-miniapp/toplugins/<you>/<plugin-id>/, then replacename,displayName,description,author,exampleQueries, the<title>, the README, and the LICENSE holder. Update: open the existing package, keep its plugin ID, and raiseversioninplugin.json. A newly declared field that raises the minimum client version (docs/package-contract.md) drops older clients; say so in the README and the PR. Readdocs/package-contract.mdbefore editing any manifest. - Read
docs/runtime.mdbefore editingminiapp/node/*. Readdocs/security.mdbefore the Node code reads or writes files, spawns processes, or makes network requests. Readdocs/client.mdbefore the page callswindow.mcodeor a browser permission such asgetUserMediaorNotification,docs/agent.mdbefore declaringagentAccess, anddocs/tool.mdbefore declaringtoolAccess. - Write
README.md(English;README.zh-CN.mdoptional): what it does, how to install and open it, and the headings## Tested environmentand## Data & access(files read/written, network hosts, spawned processes, Agent turns, conversations read, tools called, microphone, camera, and notification use, Host navigation read, 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. - Add one row to the table in both root READMEs.
- Run
npm run check. Done when it reports no errors and every warning is either fixed or explained in the PR description. - Open the PR with a short opener: one to three sentences on what changed and why, plus a
screenshot when the page looks different. Keep these visible below it: the tested environment
and results, what you did not verify, each remaining
npm run checkwarning with its reason, and any new access or higher minimum client version. Put the rest of a long description inside<details><summary>Written by <model></summary> … </details>, with a blank line after</summary>; without it GitHub shows the Markdown inside as plain text. Ask the person you work for to read and edit the opener before you submit.
context.dataDiris your private state directory, created and owned by the Host. Store durable state there and treat its location as opaque. Reading Host files has no supported API; a plugin that does so must state in its README which files, how it locates them, and that this relies on unspecified layout.- stdout and stdin belong to the Host. Log through
context.logger. - The Node entry is ESM with a named export
start(context). Resolvestartonly after the listener accepts connections oncontext.listen. Return{ dispose };disposecloses everything the entry started: server, timers, child processes, streams, file handles, within 2 seconds. - While no page is visible, the Host may stop the Node process or reload the page without notice
or callback. Write durable state as it changes and save view state on
visibilitychange; polling and heartbeats keep nothing alive. - Bind only
context.listen.host/context.listen.port, with anode:httpserver (or a framework on top of it);https,http2,tls, rawnet, or a child process on that port never becomes ready. Servesurface.pathplus your own routes, none under/__mavis/. - A Mini App package is a MiniMax Plugin. Skills, subagents (
agents), MCP servers, hooks, host bindings, MCP endpoints, andhostConnectorAccessmay all be declared;npm run checkvalidates their shape only, and the Host validates them at install time. This repository documents the Mini App payload, the page APIs, the Agent API, and the tool API; treatcontext.hostConnectorand the other capabilities as outside its scope. - Declare exactly the access the code uses:
agentAccess(session.run,session.read),toolAccess,deviceAccess(microphone,camera,notifications),hostAccess(navigation.read). A call without its declaration fails at runtime, andnpm run checkreports it asACCESS_UNDECLARED; do not declare access the app does not use. agentAccessgives an Agent with files, shell, and MCP, andsession.readexposes every user conversation. Never answer apermission.requestedwithallowOnceunless the user chose it.- The user can switch any declared access off at any time. Handle
NOT_PERMITTED(not_permittedon the page),TOOL_NOT_PERMITTED, andNotAllowedErrorwhere the call is made, and keep the app running. - The runtime payload is exactly
miniapp/clientandminiapp/node. Keep tests and docs outsideminiapp/. Vendor third-party code inside the payload;node_modulesis never committed. - Paths are portable: ASCII, no symlinks, no
...npm run checkenforces the full rule set. - Secrets stay in the Node process: never in HTML, Client JavaScript, logs, or error responses.
- Plugin ID = directory name =
plugin.json.name, unique across the repository.
Maintainers gate on three things: manifests pass npm run check; the README describes real
behaviour (files, network, processes, Agent turns, conversations read, tools called, device use,
tested environment); the package cannot damage Host or user data. Everything else is a
suggestion.
scripts/ mirrors the MiniMax Code package reader; docs/ publishes the same contract.
- A minimum in
FEATURE_MIN_HOST_VERSIONis the first MiniMax Code release that accepts the field and has installers for both macOS and Windows on the production CDN. A tag, a preview build, or a release on one platform only is not evidence: 3.1.5 shipped no installers and 3.1.8 none for Windows. Check thatMiniMax%20Code-<version>-arm64.dmgandMiniMax%20Code%20Setup%20<version>.exeanswer 200 under bothhttps://filecdn.minimax.chat/public/minimax-agent-prod/release/andhttps://file.cdn.minimax.io/public/minimax-agent-prod/release/. - A feature that ships first in the next release uses
NEXT_RELEASEinscripts/lib/contract.mjs. Its PR stays a draft until that release's installers pass the check above. - Change
scripts/lib/contract.mjs, the rule, itstest/<rule>.test.mjs, and the matchingdocs/page together, and update the docs'Verified againstline. The checker stays dependency-free. - CI validates every package under
plugins/. A new error must leave existing packages at zero errors; otherwise ship it as a warning first. - Keep contract changes in their own PR, apart from package updates.
- Describe the PR as in step 6 of "Add or update a Mini App": a short opener, what was and was not verified in view, the rest folded.
docs/package-contract.md— layout, the three manifests, portable paths, limits, permission switches, minimum client versions, declared access versus codedocs/runtime.md—start(context),dispose, logger, lifecycle and reclaim, loopback authenticationdocs/client.md— page APIs:capabilities, browser permissions (microphone, camera, notifications),message.append,agent,speech.transcribe,tool.request,host,windowdocs/agent.md—agentAccess, sessions, calls,whenBusy, reading and observing sessions, events, errorsdocs/tool.md—toolAccess,context.tool, permission prompts, errorsdocs/security.md— process boundary, state, writing outsidedataDir, spawning, network, Agent turns, reading conversations, calling tools, microphone and camera, notifications, Host navigationdocs/snippets/audio-capture.ts— microphone capture in the formatspeech.transcribetakesexamples/hello-miniapp/— the copyable starting pointCONTRIBUTING.md— fork, pull request, and license steps for people