This repository hosts community Mini App packages for MiniMax Code. One task dominates: add or
update one package at plugins/<github-username>/<plugin-id>/.
- 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. 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.mcode, anddocs/agent.mdbefore declaringagentAccess. - 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, 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.
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. - 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, and the Agent API; treatcontext.hostConnectorand the other capabilities as outside its scope. agentAccessgives an Agent with files, shell, and MCP. Declare it only when needed, and never answer apermission.requestedwithallowOnceunless the user chose it.- 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, tested environment); the package cannot damage
Host or user data. Everything else is a suggestion.
docs/package-contract.md— layout, the three manifests, portable paths, limits, minimum client versionsdocs/runtime.md—start(context),dispose, logger, lifecycle, loopback authenticationdocs/client.md— page APIs:message.append,agent,windowdocs/agent.md—agentAccess, sessions, calls, events, errorsdocs/security.md— process boundary, state, writing outsidedataDir, spawning, network, Agent turnsexamples/hello-miniapp/— the copyable starting pointCONTRIBUTING.md— fork, pull request, and license steps for people