Skip to main content

Top-level fields

Capability declarations and switches

Declare only the capabilities the app uses. This is a fragment of miniapp/miniapp.json, not a complete file:
Users can turn off individual Connector providers, Agent sessions, session reads, tool calls, host navigation observation, and microphone, camera, and system notification access in the plugin detail page’s permission panel. Declarations bound the capabilities the app may request; switches determine whether a call is allowed. A switch takes effect without restarting the Mini App, and the code must handle refused calls. See the Security model for the limits.

Host navigation permission

hostAccess is available from MiniMax Code v3.1.11 and accepts only "navigation.read". Declare the corresponding minimum version when using it:
State contains only the public page type, whether settings are open, and a context marker without conversation identity. It contains no session ID, URL, or content. Delivery requires the page to be logically visible. Single reads are also refused while hidden; returning sends only the latest state, without replaying hidden changes. Turning the switch off ends the old subscription; subscribe again after it is re-enabled.Reading the theme and active interface language, or opening a known host destination after user interaction, requires neither hostAccess nor session.read. Do not request extra permissions for these operations. See Host API for methods.Unknown items or a non-array value produce MINIAPP_HOST_ACCESS_INVALID. An older host that does not recognize hostAccess may reject the entire manifest. Feature detection cannot bypass manifest validation; see Version requirement.

Device permissions

v3.1.6 supports microphone; camera and notifications are officially supported from v3.1.9.The corresponding permission switch must also be on. A combined audio/video request requires both microphone and camera to be declared and enabled. Other unavailable page permissions, including location, clipboard read, and screen capture, remain denied. See Page device APIs for usage.When using the camera or system notifications, declare the minimum host version in miniapp/miniapp.json:
Older hosts may reject these device items; capabilities.has() cannot bypass manifest validation. Camera and notifications have no separate capability names, and an interface probe does not replace declarations or user permission switches. See Version requirement for how the lower bound is handled.

Version requirement

Put engines in miniapp/miniapp.json alongside agentAccess, rather than in plugin.json:
Only >= followed by three numeric segments is supported, without ^, ~, or multiple ranges. Confirm the target version before setting a lower bound so that otherwise usable hosts are not excluded.A host that recognizes engines but is below the bound refuses workspace publishing. For an installed package, it withholds the Mini App and its managed MCP endpoints while keeping the package’s Skills and ordinary MCP available. Earlier hosts may not recognize engines or other new fields and reject the manifest outright; a version bound cannot make unknown fields degrade gracefully.On the page, use window.mcode?.miniapp?.capabilities?.has(name); in Node, use context.capabilities?.has(name) to detect host implementation support for an interface such as agent.observe or tool. Older hosts may omit capabilities, so check for its presence first. A true result does not mean the plugin declared or was granted the capability. See Capability reference for names and the interface available on each side.

surface.window

Properties applied when the page pops out: a whitelisted subset of Electron window options. Every field is optional.You can’t declare the window’s relationship to the main window (it is always an independent top-level window whose visibility doesn’t follow the main window: hiding, minimizing, or closing the main window to the tray leaves it as is), its title (always displayName), its screen position, or open and close behavior. The page can enter a separate window through the file panel’s pop-out action or by calling window.update({ mode: 'window' }) during a user gesture. Closing the window returns the page to the file panel.