Skip to main content

Module executor_contract

Module executor_contract 

Source
Expand description

Executor contract — canonical response types and error constants for window.host.* bridge calls.

Host implementations (host-rs, dotli) use these definitions to ensure SPAs receive identical promise resolution values regardless of which host they run on.

§Response value conventions

Most bridge calls resolve with bare values — a string, an integer, a boolean, or null. Only mediaGetUserMedia resolves with a structured JSON object. The types below document the exact JS-level value the promise resolves with.

See also docs/executor-contract.md for behavioral rules that types cannot express (listener lifecycle, error semantics, identity rules).

Structs§

CrdtJoinResult
crdtJoin(roomId, opts?) — resolves with room metadata.
GetDisplayMediaResult
mediaGetDisplayMedia() — resolves with the allocated screen track ID.
GetUserMediaResult
mediaGetUserMedia({ audio, video }) — resolves with a JSON object containing the allocated local track IDs before the corresponding mediaTrackReady events fire.
MeshControlEnvelope
Capability-scoped control envelope for mesh 1.2 private channels.
MeshObjectPolicy
mesh.objects.put(path, dataBase64, policy?) retention and preview policy.
MeshObjectResult
mesh.objects.getResult(path) and structured negative meshReply model.
MeshPrivateObjectRef
mesh.private.objects.put(dataBase64, policy?) opaque object reference.
MeshStatusResult
meshStatus() — resolves with the current mesh backend health and queue state.

Enums§

MeshControlMode
MeshObjectReadReason

Constants§

ERR_ADDRESS_REQUIRED
ERR_AUDIO_PERMISSION
ERR_CAMERA_PERMISSION
ERR_CHAIN_PERMISSION
ERR_CRDT_ROOM_ID_REQUIRED
ERR_CRDT_ROOM_NOT_FOUND
ERR_DATA_PERMISSION
ERR_FILENAME_REQUIRED
ERR_GROUP_ID_REQUIRED
ERR_GROUP_TOO_LARGE
ERR_INVALID_ELEMENT_ID
ERR_MEDIA_PERMISSION
ERR_NO_PENDING_CALL_FOR_PEER
ERR_PEER_ADDRESS_EMPTY
ERR_PENDING_CONNECT
ERR_PENDING_SIGN
ERR_PENDING_SUBMIT
ERR_SCREEN_DENIED_BY_OS
ERR_SCREEN_PERMISSION
ERR_STATEMENTS_PERMISSION
ERR_WALLET_NOT_CONNECTED
ERR_WALLET_NOT_ENABLED