Skip to content

World State

Status: Running today. Realm R-WSTATE-* is the shipped shared present-state authority.

World state is the durable shared present of a world. It answers "what does this world look like right now." Mutations require an explicit commit envelope; truth and history sit on either side of state.

For the side-by-side comparison with history (when each surface updates per effectClass), see State vs History.

What World State Is

PropertyValue
StorageRealm R-WSTATE-*
ShapeCurrent snapshot of the world
MutationThrough admitted commit envelope
AuthorityRealm
Read patternSingle-state read or projection

State is not a cache. It is canonical present. Apps that read state get the current truth; the read does not require reconstruction from history.

The Commit Envelope

Every state mutation is bound to an explicit commit envelope.

FieldPurpose
worldIdWhich world is being mutated
appIdWhich app is committing
sessionIdSession lineage
effectClassNONE / STATE_ONLY / STATE_AND_HISTORY
scopeWORLD / ENTITY / RELATION
schemaIdWhat schema this commit conforms to
schemaVersionWhich version of the schema
actorRefsWho acted
reasonWhy
evidenceRefsSupporting evidence

Creator tooling and authorized world-connected apps use the same commit envelope model. There is no privileged shortcut for creator tooling.

Effect Class

effectClass controls what the commit affects:

ValueMeaning
NONENo state change; this is a dry run / probe / observation
STATE_ONLYMutates state without appending to history
STATE_AND_HISTORYMutates state and appends to history

Most real mutations are STATE_AND_HISTORY. STATE_ONLY is for specific cases (transient adjustments, certain policy operations). NONE is for dry-runs and observation.

Scope

scope controls what slice of the world is targeted:

ValueTargeting
WORLDWorld-level state
ENTITYA specific entity inside the world
RELATIONA relation between entities

A commit must declare its scope; ambiguous scope is rejected.

Reader Scenario: A State Mutation From An Extension App

An admitted extension-app wants to change a participant's position in the world.

  1. Build the envelope. App constructs:
    • worldId: this world
    • appId: this extension-app
    • sessionId: the active session
    • effectClass: STATE_AND_HISTORY
    • scope: ENTITY
    • schemaId / schemaVersion: position-update schema
    • actorRefs: the participant being moved
    • reason: "participant moved into building"
    • evidenceRefs: supporting evidence (e.g., a participant action that caused the move)
  2. Submit. Realm receives the commit.
  3. Validate. Realm checks: app-world binding active, schema admitted, scope appropriate, evidence valid.
  4. Apply. State updates; history appends.
  5. Audit. Commit lineage recorded.

The envelope is what makes state mutations auditable. Every mutation can be reconstructed: who, when, why, with what evidence.

Reader Scenario: A Read Of Current State

An app wants to render a world's current state.

  1. Query state. Through admitted Realm reads, the app queries world state for the relevant scope.
  2. Realm returns current state. Single-snapshot read.
  3. App renders. The app sees the current state.

The app does not reconstruct state from history. State is canonical present, optimized for read.

Reader Scenario: A Mutation That Crosses Multiple Primitives

An action causes social, economic, and presence consequences — say, gifting an item in a public scene.

  1. Multiple commits. The platform may use multiple commits to atomically capture the consequences:
    • Item ownership transfer (scope: RELATION, effectClass: STATE_AND_HISTORY)
    • Social interaction event (related social state)
    • Economic event (gift event in append-only economy)
    • Presence record (witnesses)
  2. Each commit envelope. Carries its own typed envelope.
  3. History records each. Each commit appends a history record.

The action is one product moment; the underlying contract spreads the consequences across the right surfaces with the right typed envelopes.

What Apps Cannot Do

ForbiddenWhy
Mutate state without an envelopeAuditability requires envelopes
Use a free-form schemaIdSchemas are admitted at the kernel
Use undeclared scopeScope is admitted; ambiguous scope is rejected
Skip evidence referencesEvidence is required for traceability

Source Basis

Nimi AI open world platform documentation.