Skip to main content
On the GCS half, Mission Control runs the bridge and the plugin’s iframe talks to it over postMessage. There are two kinds of message:
  • Requests the plugin sends, each answered by one response.
  • Events Mission Control pushes into the frame, with no response.
Plugins never receive unsolicited requests. For the agent-side event bus that an agent half publishes and subscribes on, see Event hooks and bus. For the typed SDK wrappers over these methods, see the TypeScript SDK.

Methods the plugin can call

The bridge resolves the capability each call needs from the method (and, where noted, from its arguments) and checks it against the plugin’s grants. A method not in this list is rejected with method_unknown. The plugin never computes the capability id itself. The capability an envelope claims is ignored; the bridge re-resolves it.

Host-pushed events

Other host-pushed topics (for example the video.overlay host props, or an agent plugin’s state read-back) arrive on the same channel and are read with ctx.events.subscribe(topic, handler).

Wire shape

The SDK’s PluginClient builds these: it generates the id, attaches the protocol version, and waits for the correlated response.

Error envelopes

When the bridge rejects a request it returns a response with error: { code, message }. The SDK throws a HostError whose code carries the machine-readable code: Branch on code, not on message.
There is also an origin_mismatch error, but the bridge never sends it to the plugin. A message from a window that is not the plugin’s iframe is dropped and recorded as a security event on the host side.

Theming

theme.changed arrives once on mount and again on every theme change. The payload is a Record<string, string> of CSS variables. Apply them by walking the entries:
The SDK does not apply them for you, so a plugin can scope them to its own root or ignore them.

i18n

A plugin ships a locale bundle in its archive; Mission Control streams the active bundle to the frame on mount. Format keys with ctx.i18n.t(key, params):
A missing key falls back to the key itself.

Next steps

TypeScript SDK

The typed wrappers over these methods.

Event hooks and bus

The agent-side event bus.

Permissions

The capabilities these methods check.
Last modified on October 11, 2026