Skip to main content

Runtime Environment

The runtime environment object is the first argument passed to every command.
It provides access to your plugin’s private state and to all core Inkweaver engine services.

The environment acts as the boundary between your plugin and the runtime. Commands use it to read state, trigger transitions, interact with history, access selectors, and call other high-level features.

Using the Runtime Environment

The environment is context-dependent and should only be used within the command where it is received.
You should never store it, pass it between functions, or hold onto any of the values it exposes outside the immediate call.

Each command invocation receives a fresh environment instance that reflects the correct runtime context.