Core Commands

CmdRealmCreate

Creates a new realm.

Realms represent renderable contexts (3D/2D). They can later be bound to logical targets through CmdTargetLayerUpsert to form the auto-graph.

Arguments

Field Type Description
kind RealmKind Realm kind (three-d or two-d)
importance Option (Optional) Scheduling priority (default: 1)
cachePolicy Option (Optional) Cache policy (default: 0)
flags Option (Optional) Realm flags (reserved)

Response

Returns CmdResultRealmCreate:

Field Type Description
success bool Whether the realm was created
message String Status or error message
realmId Option ID of the created realm

Validation Rules

  • kind must be a valid realm kind.
  • Realm/target/window binding is resolved later by target commands (CmdTargetUpsert + CmdTargetLayerUpsert).

Notes

  • Render routing is non-blocking and ID-driven: command order does not define final binding topology.
  • Once matching logical IDs exist, the core converges to the same resolved graph state.

When validation fails:

  • command response returns success = false
  • host also receives SystemEvent::Error (scope = "command").
Documentation Vulfram Core