UNAVI Docs unavi.xyz
Build · How it works

Trust and permissions

Every script runs with the trust level assigned to its document's author on your device, and that level determines which host APIs the script may call.

Trust is strictly local. Each peer maintains its own table keyed by DID (decentralized identifier), stored on the device and never shared over the network.

Levels

Each trust level includes all permissions from the levels below it:

LevelApplies toAdds
BlockedPeers you have explicitly blockedNothing; the peer is disconnected and its changes are reverted
AnonymousPeers without a verified DIDReading the scene, writing their own documents, local messaging, input aimed at their own prims, reading document authorship
GuestAny DID without an explicit entryCreating documents, opening portals
TrustedPeers you have marked as trustedDurable commits, reading your identity and body pose
MyselfYour own DIDFull device input, physics, persistent storage, portal travel

Ordinary interactive objects from strangers (such as a ball, door, or whiteboard) work at Guest with no confirmation prompt. Higher levels gate sensitive capabilities that untrusted objects should not access silently, such as reading your identity or tracking your body pose.

Myself is derived from your local identity rather than stored in the trust table, so it cannot be granted to another peer by mistake. You can also lower your default level for unknown DIDs to Anonymous to prevent a blocked user from regaining Guest access simply by generating a fresh key.

Calling an API outside the script's trust level fails with error.permission. Permissions are checked when a resource handle is created, so handles a script already owns continue working if trust changes later.

Shared writes from other people

Each peer writes shared state into its own session layer on a document, and your peer filters which properties each layer is allowed to apply. The document author's layer can modify any property. Any other peer's layer is limited to properties in the state group (which only scripts read) and portal pairing (if their trust level allows opening portals). A blocked peer's layer has no effect.

This boundary prevents a visitor from attaching a script to your home space. Because session properties apply just like authored ones, allowing arbitrary peers to write script would run their code under your document's permissions. Disallowed writes are stored in the layer but ignored during composition. When a peer departs, your peer adopts their valid shared writes if they are trusted at Guest or above, and discards them otherwise.

Limits

Trust also scales the resource budgets allocated to each peer's scripts. Two kinds of limits apply:

Each peer receives a percentage of the base per-peer budget according to its trust level:

LevelBudget share
Blocked0%
Anonymous5%
Guest25%
Trusted100%
Myself400%

Guest objects have enough headroom for normal interaction while spam scripts hit their limits quickly. Your own scripts receive the highest share, yet remain bounded so a runaway script cannot exhaust the host machine. Shared writes are always charged to the writing peer's budget, even when they target a document authored by someone else.