SessionOptions

interface SessionOptions
devtools/src/session.ts:58

Members

authorityreadonly

authority?: AuthorityPort

Who owns the part of the simulation this client does not.

Defaults to a LocalAuthority over this session's own world, which is the single-player case and not a placeholder for one. Passing something else is how a remote authority arrives — there is deliberately no flag and no branch, so the local path is the one every host exercises by default and cannot rot unnoticed.

canFlyreadonly

canFly?: boolean

Trusted host capability. Local solo worlds grant flight to their owner.

catalogreadonly

catalog?: StarCatalog

The star catalog. A host that has the packed asset passes it; a test that does not gets SOL_ONLY_CATALOG and a galaxy that is entirely procedural outside the Solar System.

cutscenesreadonly

cutscenes?: readonly CutsceneScript[]

The scenes the director can play. The shipped ones by default; a test hands the director a script of its own here rather than registering it in a module constant.

nowreadonly

now?: () → number

Injected so nothing here reaches for a host clock.

onWorldReplacedreadonly

onWorldReplaced?: () → void

Called after the world is replaced, so a host can drop derived state.

There is exactly one question here — "what becomes stale when the world changes?" — and a host answers it in one place. Spread over three methods and answered differently in each, the client reset the origin and the scene and forgot the starfield and the terrain, so loading a save taken four light years away kept the old stars: the re-survey is gated on having moved, and from the cache's point of view nothing had.

poolSizereadonly

poolSize?: number

renderreadonly

render?: Partial<RenderHost>

The host's render side, as much of it as it has.

What is not supplied, renderHost answers headlessly — so a test names the two members it is about and the harness sees a whole port. A nested object rather than members beside world: nothing in it can shadow the getter this module exists to protect.

seedreadonly

seed?: string

storereadonly

store?: SaveStore

systemreadonly

system?: string

workersreadonly

workers?: WorkerFactory | null

Where worker tasks run. null means no pool at all — generation falls back to the main thread, which is a degraded but working game.