Map the bridge owners

Python owns acquired game data and command validation. Wulf owns the view model and commands. Gameface exposes that model and dispatches change notifications. The frontend owns its DOM and reconciliation. Those owners can become ready and disappear independently; a working engine bridge does not prove that the native parent, injected child or target DOM nodes exist.

engine, viewEnv, window.model and window.subViews are supplied by the loaded client view. They are not installed through npm. The root model belongs to the standalone/native document; window.subViews.get(resId).model addresses an attached child. Keep the child resource identity with every registered callback. A dump of a proxy model is a diagnostic snapshot and may wrap array entries in value; it is not necessarily the live model's schema.

Define the contract before rendering

Specify property type, index and default, payload schema, command name and argument keys together. A handwritten ViewModel registers storage with _addStringProperty but must implement its matching setter explicitly. Generated accessors exist because generated source defines them, not because registration manufactures methods.

A Wulf command accepts one optional payload. A no-argument readiness action and an action receiving a dictionary are different contracts. Validate finite numbers, ranges, selected identity and current owner in Python; a model function existing does not authorize arbitrary engine or server actions. Keep labels in HTML/localization, colors as CSS values, and numeric fields explicit rather than sending executable markup.

ViewModel.transaction() requests hold/commit and attempts rollback for ordinary body or commit exceptions. Its Python guard does not establish native atomicity; see transaction failure boundaries. Construct the initial model with complete initial state. Later transactions should wait for the feature's verified frontend readiness boundary. Raw loading is too early to assume the consumer can apply an update.

Read by topic

Choose a focused chapter. Complete examples and reference details are preserved on their topic pages.