Appearance
obj+me.virmesh.avatar.scriptSandbox
avatar WASM script と v1 sandbox policy を表す object です。
Description
avatar に添付できる任意の WASM script と、その実行制限を表します。 v1 では host API を定義せず、network access、filesystem access、world mutation は許可しません。 クライアントは script 実行を拒否できます。
Aliases
avatarScriptSandboxme.virmesh.avatar.scriptSandbox
Fields
urlstringRequiredWASM binary を取得する absolute URL です。
hashstringRequiredWASM binary body の content hash です。v1 では sha256:<base64url> を使います。
permissionsstring[]Requiredscript が要求する permission token 一覧です。v1 では avatar.self など低権限の token に限定します。
sandbox.runtimestringRequiredv1 では wasm です。
sandbox.networkbooleanRequirednetwork access を許可するかです。v1 では false です。
sandbox.filesystembooleanRequiredfilesystem access を許可するかです。v1 では false です。
sandbox.worldMutationbooleanRequiredworld state mutation を許可するかです。v1 では false です。
sandbox.maxMemoryBytesintegerRequiredscript に許可する最大 memory byte 数です。
sandbox.maxExecutionMillisintegerRequired1 tick または 1 call あたりの最大実行時間です。
Examples
wasm script sandbox
{
"url": "https://cdn.example.com/avatars/avatar-script.wasm",
"hash": "sha256:base64url-script-hash",
"permissions": [
"avatar.self"
],
"sandbox": {
"runtime": "wasm",
"network": false,
"filesystem": false,
"worldMutation": false,
"maxMemoryBytes": 16777216,
"maxExecutionMillis": 5
}
}Referenced by
| Kind | Reference | Field |
|---|---|---|
| Object field | obj+me.virmesh.avatar.manifest | script |