@voltro/plugin-rooms 0.0.0-stage → 0.88.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +24492 -0
- package/LICENSE +61 -0
- package/README.md +9204 -2
- package/SECURITY.md +56 -0
- package/THIRD-PARTY-NOTICES.md +12496 -0
- package/dist/actor.js +1473 -0
- package/dist/apiBinding.js +677 -0
- package/dist/apiRegistryBinding.js +398 -0
- package/dist/apiReservations.js +432 -0
- package/dist/baselines.js +72 -0
- package/dist/bots.d.ts +1485 -0
- package/dist/bots.js +562 -0
- package/dist/catalog.js +79 -0
- package/dist/checkpointJson.js +23 -0
- package/dist/checkpointStore.js +385 -0
- package/dist/client.js +55 -0
- package/dist/clockSync.js +50 -0
- package/dist/collision.js +155 -0
- package/dist/commandDelivery.js +100 -0
- package/dist/commandRecord.js +10 -0
- package/dist/commandWithdrawal.js +182 -0
- package/dist/connection.js +496 -0
- package/dist/controlCarrier.js +374 -0
- package/dist/controlRegistry.js +78 -0
- package/dist/controlTarget.js +44 -0
- package/dist/controlTransport.js +573 -0
- package/dist/developmentBinding.js +112 -0
- package/dist/directory.js +322 -0
- package/dist/directoryProjection.js +116 -0
- package/dist/errors.d.ts +125 -0
- package/dist/errors.js +52 -0
- package/dist/fixed.d.ts +284 -0
- package/dist/fixed.js +10 -0
- package/dist/fixed32.js +133 -0
- package/dist/fixedCollision.js +59 -0
- package/dist/fixedCollision32.js +108 -0
- package/dist/fixedMath.js +55 -0
- package/dist/fixedRaw.js +10 -0
- package/dist/fixedSlabs.js +33 -0
- package/dist/fixedTrig.js +47 -0
- package/dist/fixedTrig32.js +37 -0
- package/dist/fixedVectors.js +112 -0
- package/dist/fixedVectors32.js +94 -0
- package/dist/fixedWide.js +49 -0
- package/dist/fixedWords.js +45 -0
- package/dist/gateway.js +56 -0
- package/dist/geometry-retention-app/rooms.geometryJournalRetention.workflow.server.tsx +4 -0
- package/dist/geometry-retention-app/rooms.geometryJournalRetention.workflow.tsx +14 -0
- package/dist/geometry-worker/worker.d.mts +2 -0
- package/dist/geometry-worker/worker.mjs +50 -0
- package/dist/geometry.d.ts +2249 -0
- package/dist/geometry.js +40 -0
- package/dist/geometryActivation.js +81 -0
- package/dist/geometryActorInventory.js +107 -0
- package/dist/geometryAdminClient.js +86 -0
- package/dist/geometryAdminData.js +31 -0
- package/dist/geometryAdminFixtures.js +49 -0
- package/dist/geometryAdminPorts.js +4 -0
- package/dist/geometryAdminRpc.js +57 -0
- package/dist/geometryAdminRpcRoutes.js +48 -0
- package/dist/geometryAdminSchemas.js +38 -0
- package/dist/geometryAdministration.js +189 -0
- package/dist/geometryAdministrationPorts.js +4 -0
- package/dist/geometryApiBinding.js +164 -0
- package/dist/geometryAppStorage.js +57 -0
- package/dist/geometryArtifacts.js +197 -0
- package/dist/geometryAssetBundle.js +116 -0
- package/dist/geometryAssetClient.js +24 -0
- package/dist/geometryAssetData.js +105 -0
- package/dist/geometryAssetHttp.js +122 -0
- package/dist/geometryAssetPorts.js +4 -0
- package/dist/geometryAssetRpc.js +29 -0
- package/dist/geometryAssetRpcRoutes.js +39 -0
- package/dist/geometryAssetStorageGrant.js +102 -0
- package/dist/geometryBoxOverlap.js +109 -0
- package/dist/geometryCatalogueDigest.js +110 -0
- package/dist/geometryCellCoverage.js +84 -0
- package/dist/geometryCellLoader.js +27 -0
- package/dist/geometryChannel.js +133 -0
- package/dist/geometryChunkHttp.js +53 -0
- package/dist/geometryChunkLeases.js +21 -0
- package/dist/geometryClient.d.ts +1429 -0
- package/dist/geometryClient.js +148 -0
- package/dist/geometryClientChunks.js +329 -0
- package/dist/geometryClientDelta.js +24 -0
- package/dist/geometryClientHttp.js +36 -0
- package/dist/geometryClientInterest.js +108 -0
- package/dist/geometryClientStatic.js +33 -0
- package/dist/geometryCms.d.ts +763 -0
- package/dist/geometryCms.js +216 -0
- package/dist/geometryCommitCoordinator.js +240 -0
- package/dist/geometryCompactionFixture.js +83 -0
- package/dist/geometryCompactionStrategies.js +37 -0
- package/dist/geometryConnectionClient.js +22 -0
- package/dist/geometryDerivationFixtures.js +140 -0
- package/dist/geometryDerivationStrategies.js +26 -0
- package/dist/geometryDigest.js +12 -0
- package/dist/geometryEditChannel.js +69 -0
- package/dist/geometryEditIngress.js +262 -0
- package/dist/geometryEdits.js +365 -0
- package/dist/geometryEnvelope.js +40 -0
- package/dist/geometryGridRaycast.js +91 -0
- package/dist/geometryGridSweep.js +91 -0
- package/dist/geometryHeightfield.js +165 -0
- package/dist/geometryHeightfieldRaycast.js +73 -0
- package/dist/geometryHeightfieldSweep.js +84 -0
- package/dist/geometryHeightfieldVolume.js +44 -0
- package/dist/geometryHost.js +321 -0
- package/dist/geometryHostDirectory.js +206 -0
- package/dist/geometryHostMutations.js +136 -0
- package/dist/geometryHostStreams.js +123 -0
- package/dist/geometryHttpBody.js +75 -0
- package/dist/geometryHttpRoutes.js +111 -0
- package/dist/geometryImportGltf.js +299 -0
- package/dist/geometryImportLdtk.js +53 -0
- package/dist/geometryImportPng.js +143 -0
- package/dist/geometryImportPublication.js +66 -0
- package/dist/geometryImportTiled.js +38 -0
- package/dist/geometryImportTiles.js +135 -0
- package/dist/geometryImportVox.js +129 -0
- package/dist/geometryImportedSource.js +100 -0
- package/dist/geometryInspectEndpoint.js +247 -0
- package/dist/geometryInspection.js +91 -0
- package/dist/geometryInstall.js +120 -0
- package/dist/geometryJournalArchiveData.js +20 -0
- package/dist/geometryJournalArchiveIndex.js +329 -0
- package/dist/geometryJournalArchiveTable.js +20 -0
- package/dist/geometryJournalCompaction.js +99 -0
- package/dist/geometryJournalPatch.js +46 -0
- package/dist/geometryJournalRetention.js +111 -0
- package/dist/geometryJournalRetentionSchemas.js +35 -0
- package/dist/geometryJournalRetentionSweep.js +111 -0
- package/dist/geometryJournalRetentionWorkflow.js +27 -0
- package/dist/geometryJournalRetentionWorkflowData.js +30 -0
- package/dist/geometryJournalStorage.js +147 -0
- package/dist/geometryLoader.js +117 -0
- package/dist/geometryManifest.js +112 -0
- package/dist/geometryManifestChannel.js +92 -0
- package/dist/geometryManifestClient.js +121 -0
- package/dist/geometryManifestData.js +48 -0
- package/dist/geometryManifestPorts.js +4 -0
- package/dist/geometryManifestPublication.js +108 -0
- package/dist/geometryManifestSource.js +67 -0
- package/dist/geometryMigrationJournal.js +13 -0
- package/dist/geometryMigrationStrategies.js +6 -0
- package/dist/geometryMigrations.js +322 -0
- package/dist/geometryNativeMetadata.js +51 -0
- package/dist/geometryPatch.js +169 -0
- package/dist/geometryPersistence.js +448 -0
- package/dist/geometryPersistenceCapture.js +68 -0
- package/dist/geometryPersistenceData.js +139 -0
- package/dist/geometryPersistencePorts.js +4 -0
- package/dist/geometryPlayerAdmission.js +33 -0
- package/dist/geometryPlayerEditOwner.js +264 -0
- package/dist/geometryPlayerEdits.js +48 -0
- package/dist/geometryPrepared.js +187 -0
- package/dist/geometryPrivacyFence.js +23 -0
- package/dist/geometryProceduralPublication.js +90 -0
- package/dist/geometryProceduralWorker.js +163 -0
- package/dist/geometryPublication.js +109 -0
- package/dist/geometryRayAlgebra.js +115 -0
- package/dist/geometryReadClient.js +156 -0
- package/dist/geometryReadPorts.js +4 -0
- package/dist/geometryReadRpc.js +26 -0
- package/dist/geometryReadRpcRoutes.js +46 -0
- package/dist/geometryReliablePublication.js +81 -0
- package/dist/geometryReloadPorts.js +45 -0
- package/dist/geometryReloadSource.js +277 -0
- package/dist/geometryRenderCache.js +164 -0
- package/dist/geometryRenderLod.js +101 -0
- package/dist/geometryRollback.js +124 -0
- package/dist/geometryRollbackCoordinator.js +202 -0
- package/dist/geometryRollbackPorts.js +45 -0
- package/dist/geometryRollbackSource.js +208 -0
- package/dist/geometryRollbackStore.js +197 -0
- package/dist/geometrySchemas.js +26 -0
- package/dist/geometryServer.d.ts +2766 -0
- package/dist/geometryServer.js +62 -0
- package/dist/geometryShapeRaycast.js +110 -0
- package/dist/geometryShapeSegments.js +33 -0
- package/dist/geometryShapes.js +222 -0
- package/dist/geometrySnapshot.js +75 -0
- package/dist/geometrySnapshotChannel.js +159 -0
- package/dist/geometrySnapshotClient.js +158 -0
- package/dist/geometrySnapshotPreparation.js +75 -0
- package/dist/geometrySnapshotServer.js +190 -0
- package/dist/geometrySqlOwner.js +20 -0
- package/dist/geometryStorage.js +126 -0
- package/dist/geometryStorageGrant.js +68 -0
- package/dist/geometryStorageIdentity.js +8 -0
- package/dist/geometryTileArtifact.js +9 -0
- package/dist/geometryTileCodec.js +193 -0
- package/dist/geometryTileCollision.js +95 -0
- package/dist/geometryTileNavigation.js +127 -0
- package/dist/geometryTileView.js +34 -0
- package/dist/geometryVersionActivation.js +113 -0
- package/dist/geometryVersionClient.js +237 -0
- package/dist/geometryVersionCompare.js +39 -0
- package/dist/geometryVersionMigration.js +105 -0
- package/dist/geometryVoxel.js +252 -0
- package/dist/geometryWorldEntitySubject.js +31 -0
- package/dist/geometryWorldExtent.js +11 -0
- package/dist/geometryWorldMetadata.js +37 -0
- package/dist/geometryWorldStrategyFixtures.js +126 -0
- package/dist/geometryWorldView.js +306 -0
- package/dist/host.js +127 -0
- package/dist/hostBinding.js +276 -0
- package/dist/hostCellObservation.js +113 -0
- package/dist/hostClientCapacity.js +89 -0
- package/dist/hostCommandScope.js +63 -0
- package/dist/hostController.js +3093 -0
- package/dist/hostDeployment.js +64 -0
- package/dist/hostDrain.js +151 -0
- package/dist/hostDrainPorts.js +4 -0
- package/dist/hostDriver.js +178 -0
- package/dist/hostLane.js +287 -0
- package/dist/hostListener.js +78 -0
- package/dist/hostListenerBinding.js +18 -0
- package/dist/hostLoopObservation.js +89 -0
- package/dist/hostMetrics.js +55 -0
- package/dist/hostRegistryBinding.js +417 -0
- package/dist/hostSelection.js +15 -0
- package/dist/hostShutdown.js +46 -0
- package/dist/hostTurnObservation.js +52 -0
- package/dist/identities.js +3 -0
- package/dist/index.d.ts +8632 -0
- package/dist/index.js +231 -0
- package/dist/inputReceipts.js +62 -0
- package/dist/inputRedundancy.js +54 -0
- package/dist/inspect.js +237 -0
- package/dist/lockstep.d.ts +436 -0
- package/dist/lockstep.js +381 -0
- package/dist/lockstepAdmission.js +261 -0
- package/dist/lockstepAdmissionCodec.js +93 -0
- package/dist/lockstepAdmissionPorts.js +4 -0
- package/dist/lockstepClientSession.js +577 -0
- package/dist/lockstepDefinition.js +147 -0
- package/dist/lockstepHostLoop.js +242 -0
- package/dist/lockstepInitialAdmission.js +66 -0
- package/dist/lockstepInitialStrategyFixtures.js +44 -0
- package/dist/lockstepJournal.js +394 -0
- package/dist/lockstepJournalCodec.js +253 -0
- package/dist/lockstepJournalPorts.js +4 -0
- package/dist/lockstepJournalRebuild.js +207 -0
- package/dist/lockstepJournalRows.js +56 -0
- package/dist/lockstepMembers.js +130 -0
- package/dist/lockstepMessages.js +46 -0
- package/dist/lockstepOwnedRoom.js +763 -0
- package/dist/lockstepPolicies.js +83 -0
- package/dist/lockstepReact.js +46 -0
- package/dist/lockstepRecoveryTruth.js +120 -0
- package/dist/lockstepRosterConfig.js +31 -0
- package/dist/lockstepSeed.js +11 -0
- package/dist/lockstepSeedFixture.js +19 -0
- package/dist/lockstepServer.d.ts +3897 -0
- package/dist/lockstepServer.js +324 -0
- package/dist/lockstepServerConfig.js +100 -0
- package/dist/lockstepServerRoles.js +402 -0
- package/dist/lockstepServerStrategyFixtures.js +32 -0
- package/dist/lockstepStrategies.js +5 -0
- package/dist/lockstepStrategyFixtures.js +136 -0
- package/dist/lockstepTerminal.js +89 -0
- package/dist/lockstepTerminalPorts.js +4 -0
- package/dist/lockstepTransport.js +772 -0
- package/dist/lockstepTransportConfig.js +31 -0
- package/dist/lockstepWireRoster.js +33 -0
- package/dist/matchRoomProvider.js +31 -0
- package/dist/matchRooms.js +18 -0
- package/dist/membershipObserver.js +46 -0
- package/dist/moderation.js +97 -0
- package/dist/movementSpecials.js +103 -0
- package/dist/ownership.js +16 -0
- package/dist/ownershipWithdrawal.js +17 -0
- package/dist/pcg32.js +95 -0
- package/dist/ports.d.ts +1241 -0
- package/dist/ports.js +10 -0
- package/dist/quaternion.js +69 -0
- package/dist/react.d.ts +406 -0
- package/dist/react.js +108 -0
- package/dist/reaper-app/rooms.reaper.workflow.server.tsx +5 -0
- package/dist/reaper-app/rooms.reaper.workflow.tsx +13 -0
- package/dist/reaper.js +242 -0
- package/dist/reaperSchemas.js +41 -0
- package/dist/reaperWorkflow.js +69 -0
- package/dist/recovery.js +188 -0
- package/dist/recoverySeats.js +25 -0
- package/dist/replay.d.ts +273 -0
- package/dist/replay.js +484 -0
- package/dist/replayPorts.js +4 -0
- package/dist/replayRecording.js +66 -0
- package/dist/replaySchema.js +156 -0
- package/dist/replayStorage.d.ts +149 -0
- package/dist/replayStorage.js +484 -0
- package/dist/reservationBatch.js +421 -0
- package/dist/reservationSchemas.js +16 -0
- package/dist/reservations.js +258 -0
- package/dist/reservePort.js +68 -0
- package/dist/resolvedOptions.js +3 -0
- package/dist/room.d.ts +1006 -0
- package/dist/room.js +283 -0
- package/dist/roomAccessSweep.js +94 -0
- package/dist/roomAppCommandControl.js +58 -0
- package/dist/roomAuthoringStrategy.js +16 -0
- package/dist/roomErasure.js +197 -0
- package/dist/roomPoolRuntimeDefaults.js +23 -0
- package/dist/roomPoolSelection.js +18 -0
- package/dist/roomPoolTopology.js +211 -0
- package/dist/rpc.d.ts +551 -0
- package/dist/rpc.js +111 -0
- package/dist/rpcClient.js +151 -0
- package/dist/rpcRoutes.js +27 -0
- package/dist/runtime.js +1122 -0
- package/dist/schemaHistory.js +97 -0
- package/dist/seatStore.js +150 -0
- package/dist/seatStrategyFixtures.js +51 -0
- package/dist/seatSubject.js +31 -0
- package/dist/seats.js +129 -0
- package/dist/serverSession.js +810 -0
- package/dist/serverSessionConfig.js +42 -0
- package/dist/sessionAdmission.js +52 -0
- package/dist/sidecarAdmission.js +102 -0
- package/dist/sidecarConfig.js +115 -0
- package/dist/sidecarConfigPublication.js +63 -0
- package/dist/sidecarHostListener.js +207 -0
- package/dist/sidecarIpc.js +204 -0
- package/dist/sidecarPeer.js +309 -0
- package/dist/sidecarProcessPort.js +27 -0
- package/dist/sidecarRuntime.js +167 -0
- package/dist/sidecarSelection.js +141 -0
- package/dist/sidecarWire.js +177 -0
- package/dist/sidecarWrites.js +162 -0
- package/dist/simulation.d.ts +391 -0
- package/dist/simulation.js +281 -0
- package/dist/simulationAuthoring.js +28 -0
- package/dist/simulationBytes.js +26 -0
- package/dist/simulationConformance.js +304 -0
- package/dist/simulationInputHistoryCapture.js +34 -0
- package/dist/simulationInputHistoryWire.js +192 -0
- package/dist/simulationOptionsWire.js +77 -0
- package/dist/simulationRecoveryWire.js +133 -0
- package/dist/simulationReplay.js +126 -0
- package/dist/simulationSnapshotWire.js +111 -0
- package/dist/simulationState.js +177 -0
- package/dist/snapshotBlob.js +125 -0
- package/dist/snapshotBlobCleanup.js +92 -0
- package/dist/snapshotBlobIndex.js +37 -0
- package/dist/snapshotBudget.js +79 -0
- package/dist/snapshotChain.js +184 -0
- package/dist/snapshotErasure.js +171 -0
- package/dist/snapshotInspection.js +104 -0
- package/dist/snapshotSegmentBlobs.js +57 -0
- package/dist/snapshotUploads.js +165 -0
- package/dist/socketTransport.js +252 -0
- package/dist/spatial.js +103 -0
- package/dist/spectatorPolicy.js +25 -0
- package/dist/spectatorProducer.js +88 -0
- package/dist/startFailureCause.js +3 -0
- package/dist/stateCodec.js +657 -0
- package/dist/strategies.d.ts +210 -0
- package/dist/strategies.js +8 -0
- package/dist/strategiesServer.d.ts +286 -0
- package/dist/strategiesServer.js +11 -0
- package/dist/strategyFixtures.js +181 -0
- package/dist/streamFraming.js +121 -0
- package/dist/streamTransport.js +265 -0
- package/dist/subjectAdmission.js +49 -0
- package/dist/subjectPrivacy.js +280 -0
- package/dist/subjectPrivacyBinding.js +89 -0
- package/dist/systemManifest.js +181 -0
- package/dist/tables.js +158 -0
- package/dist/testHarness.js +88 -0
- package/dist/testing.d.ts +3684 -0
- package/dist/testing.js +220 -0
- package/dist/testingPorts.js +270 -0
- package/dist/testingServer.d.ts +4060 -0
- package/dist/testingServer.js +18 -0
- package/dist/transform.d.ts +692 -0
- package/dist/transform.js +216 -0
- package/dist/transform3d.js +117 -0
- package/dist/transformCollection.js +23 -0
- package/dist/transformCollection3d.js +23 -0
- package/dist/transformCollectionCore.js +155 -0
- package/dist/transformFrames.js +120 -0
- package/dist/transformPrediction3d.js +126 -0
- package/dist/transformRules.js +122 -0
- package/dist/transformSchemas.js +19 -0
- package/dist/transport.js +31 -0
- package/dist/transportAuthoring.js +28 -0
- package/dist/transportCleanup.js +21 -0
- package/dist/transportConformance.js +123 -0
- package/dist/transportConnector.js +81 -0
- package/dist/transportEndpoints.js +37 -0
- package/dist/transportsServer.d.ts +5515 -0
- package/dist/transportsServer.js +6 -0
- package/dist/viewProjection.js +15 -0
- package/dist/web.d.ts +2286 -0
- package/dist/web.js +517 -0
- package/dist/webTransportClient.js +172 -0
- package/dist/wire.d.ts +992 -0
- package/dist/wire.js +491 -0
- package/dist/withdrawalPort.js +27 -0
- package/dist/world.d.ts +1894 -0
- package/dist/world.js +332 -0
- package/dist/worldActorReceipts.js +47 -0
- package/dist/worldActorTransferSnapshot.js +13 -0
- package/dist/worldAdmissionPending.js +7 -0
- package/dist/worldBoundaryCoordinator.js +147 -0
- package/dist/worldCatalog.js +80 -0
- package/dist/worldCellAllocation.js +202 -0
- package/dist/worldCellDestination.js +67 -0
- package/dist/worldCells.js +488 -0
- package/dist/worldChange.js +31 -0
- package/dist/worldClient.js +663 -0
- package/dist/worldClientControl.js +140 -0
- package/dist/worldClientPendingInput.js +15 -0
- package/dist/worldClientRpc.js +132 -0
- package/dist/worldClientRpcRoutes.js +42 -0
- package/dist/worldClientSchemas.js +27 -0
- package/dist/worldCommands.js +139 -0
- package/dist/worldData.js +41 -0
- package/dist/worldDefaultBinding.js +376 -0
- package/dist/worldDefaultGroupAdmission.js +81 -0
- package/dist/worldDefaultGroupAppServices.js +30 -0
- package/dist/worldDefaultGroupCompensation.js +108 -0
- package/dist/worldDefaultGroupContinuation.js +95 -0
- package/dist/worldDefaultGroupControl.js +71 -0
- package/dist/worldDefaultGroupMembers.js +84 -0
- package/dist/worldDefaultGroups.js +20 -0
- package/dist/worldDefaultPending.js +78 -0
- package/dist/worldDefaultService.js +244 -0
- package/dist/worldEntities.js +2979 -0
- package/dist/worldEntityCodec.js +20 -0
- package/dist/worldEntityHandoffView.js +153 -0
- package/dist/worldGeometry.js +169 -0
- package/dist/worldGhostAdmission.js +64 -0
- package/dist/worldGhostDestination.js +117 -0
- package/dist/worldGhostGateway.js +131 -0
- package/dist/worldGhostHandshake.js +107 -0
- package/dist/worldGhostHost.js +41 -0
- package/dist/worldGhostIngress.js +131 -0
- package/dist/worldGhostNeighborhood.js +69 -0
- package/dist/worldGhostNeighbors.js +85 -0
- package/dist/worldGhostOutbound.js +109 -0
- package/dist/worldGhostPublisher.js +215 -0
- package/dist/worldGhostReceiver.js +212 -0
- package/dist/worldGhostSender.js +145 -0
- package/dist/worldGhostSocket.js +77 -0
- package/dist/worldGhostWire.js +171 -0
- package/dist/worldGroupCommand.js +48 -0
- package/dist/worldGroupDeadline.js +114 -0
- package/dist/worldGroupPreparation.js +114 -0
- package/dist/worldGroupReadyControl.js +127 -0
- package/dist/worldGroupSupervisor.js +119 -0
- package/dist/worldHandoffMetrics.js +58 -0
- package/dist/worldHandoffView.js +99 -0
- package/dist/worldHostSource.js +68 -0
- package/dist/worldInspectEndpoint.js +249 -0
- package/dist/worldInspection.js +108 -0
- package/dist/worldInstanceAdmission.js +30 -0
- package/dist/worldInstanceAllocation.js +115 -0
- package/dist/worldInstanceDestination.js +63 -0
- package/dist/worldInstanceExpiry.js +281 -0
- package/dist/worldInstanceExpirySupervisor.js +87 -0
- package/dist/worldInstanceLifecycle.js +102 -0
- package/dist/worldInstanceState.js +51 -0
- package/dist/worldInstances.js +477 -0
- package/dist/worldJoin.js +55 -0
- package/dist/worldLayers.js +150 -0
- package/dist/worldLeases.js +77 -0
- package/dist/worldManifest.js +24 -0
- package/dist/worldMovement.js +62 -0
- package/dist/worldPersistence.js +133 -0
- package/dist/worldProjection.js +220 -0
- package/dist/worldReact.js +109 -0
- package/dist/worldRecoveryActor.js +34 -0
- package/dist/worldReturnAnchor.js +48 -0
- package/dist/worldRoomHooks.js +56 -0
- package/dist/worldRoomPool.js +26 -0
- package/dist/worldRoomSteps.js +132 -0
- package/dist/worldSeatBinding.js +35 -0
- package/dist/worldServer.d.ts +6936 -0
- package/dist/worldServer.js +48 -0
- package/dist/worldSourceSeatPending.js +8 -0
- package/dist/worldStrategyFixtures.js +163 -0
- package/dist/worldTesting.js +26 -0
- package/dist/worldTransitionDefaults.js +197 -0
- package/dist/worldTransitionExecutor.js +518 -0
- package/dist/worldTransitionGroup.js +112 -0
- package/dist/worldTransitionPhysicalSteps.js +39 -0
- package/dist/worldTransitionResolver.js +227 -0
- package/dist/worldTransitionSeatGroup.js +63 -0
- package/dist/worldTransitionSeats.js +259 -0
- package/dist/worldTransitionState.js +94 -0
- package/dist/worldTransitions.js +100 -0
- package/package.json +189 -4
|
@@ -0,0 +1,324 @@
|
|
|
1
|
+
import { BudgetExceeded as e, ProtocolError as t, RoomAuthoringError as n } from "./errors.js";
|
|
2
|
+
import { unsignedWord as r } from "./fixedWords.js";
|
|
3
|
+
import { freezeSimulationValue as i, simulationOwnData as a } from "./simulationAuthoring.js";
|
|
4
|
+
import { captureSimulationBytes as o } from "./simulationBytes.js";
|
|
5
|
+
import { simulationValueCodec as s } from "./simulationState.js";
|
|
6
|
+
import { captureLockstepRosterOptions as c } from "./lockstepRosterConfig.js";
|
|
7
|
+
import { RoomInputCodec as l } from "./stateCodec.js";
|
|
8
|
+
import { RoomLockstepJournalPort as u } from "./lockstepJournalPorts.js";
|
|
9
|
+
import { RoomLockstepAdmissionPort as d } from "./lockstepAdmissionPorts.js";
|
|
10
|
+
import { RoomLockstepTerminalPort as f } from "./lockstepTerminalPorts.js";
|
|
11
|
+
import { RoomLockstepMemberOwner as p } from "./lockstepMembers.js";
|
|
12
|
+
import { captureRoomAdmittedSessionReader as m } from "./serverSession.js";
|
|
13
|
+
import { dataStoreRoomLockstepJournal as h, roomLockstepJournalLayer as g } from "./lockstepJournal.js";
|
|
14
|
+
import { rebuildRoomLockstepAuthorityFromSql as _, rebuildRoomLockstepFromSql as v } from "./lockstepJournalRebuild.js";
|
|
15
|
+
import { dataStoreRoomLockstepAdmission as y, roomLockstepAdmissionLayer as b } from "./lockstepAdmission.js";
|
|
16
|
+
import { dataStoreRoomLockstepTerminal as x, roomLockstepTerminalLayer as S } from "./lockstepTerminal.js";
|
|
17
|
+
import { RoomRuntime as C } from "./runtime.js";
|
|
18
|
+
import { RoomLockstepServer as w, createRoomLockstepServer as T } from "./lockstepServerRoles.js";
|
|
19
|
+
import { RoomLockstepHostLoop as E, createRoomLockstepHostLoop as D } from "./lockstepHostLoop.js";
|
|
20
|
+
import { RoomLockstepTransportOwner as O, createRoomLockstepTransportOwner as k } from "./lockstepTransport.js";
|
|
21
|
+
import { RoomLockstepOwnedRoom as A } from "./lockstepOwnedRoom.js";
|
|
22
|
+
import { Result as j } from "effect";
|
|
23
|
+
// src/lockstepServer.ts
|
|
24
|
+
function M(e) {
|
|
25
|
+
throw new t({ detail: e });
|
|
26
|
+
}
|
|
27
|
+
function N(e) {
|
|
28
|
+
throw new n({
|
|
29
|
+
room: "lockstep",
|
|
30
|
+
detail: e
|
|
31
|
+
});
|
|
32
|
+
}
|
|
33
|
+
var P = (e, t) => t !== null && Object.keys(e).every((n) => t[n] === e[n]), F = (e) => {
|
|
34
|
+
let t = 0, n = 0;
|
|
35
|
+
for (let r of e) r < 32 ? n = (n | 1 << r) >>> 0 : t = (t | 1 << r - 32) >>> 0;
|
|
36
|
+
return Object.freeze({
|
|
37
|
+
hi: t,
|
|
38
|
+
lo: n
|
|
39
|
+
});
|
|
40
|
+
}, I = class {
|
|
41
|
+
#e;
|
|
42
|
+
#t;
|
|
43
|
+
#n;
|
|
44
|
+
#r;
|
|
45
|
+
#i;
|
|
46
|
+
#a = !1;
|
|
47
|
+
#o = !1;
|
|
48
|
+
#s = /* @__PURE__ */ new Map();
|
|
49
|
+
#c = /* @__PURE__ */ new Map();
|
|
50
|
+
#l = /* @__PURE__ */ new Set();
|
|
51
|
+
#u = /* @__PURE__ */ new Set();
|
|
52
|
+
#d = /* @__PURE__ */ new Map();
|
|
53
|
+
#f = /* @__PURE__ */ new Map();
|
|
54
|
+
#p = 0;
|
|
55
|
+
#m = 0;
|
|
56
|
+
constructor(e, t, n = {}) {
|
|
57
|
+
let i = a(t, [
|
|
58
|
+
"roomId",
|
|
59
|
+
"tenantId",
|
|
60
|
+
"epoch"
|
|
61
|
+
], [
|
|
62
|
+
"roomId",
|
|
63
|
+
"tenantId",
|
|
64
|
+
"epoch"
|
|
65
|
+
]), o = (e) => typeof e == "string" && e.length > 0 && e.length <= 191 && e.trim() === e && !/[\u0000-\u001f\u007f]/.test(e) ? e : N("Invalid lockstep roster owner scope"), u = r(i.epoch);
|
|
66
|
+
u > 2147483647 && N("Lockstep epoch exceeds SQL ownership range"), this.#e = Object.freeze({
|
|
67
|
+
roomId: o(i.roomId),
|
|
68
|
+
tenantId: o(i.tenantId),
|
|
69
|
+
epoch: u
|
|
70
|
+
});
|
|
71
|
+
let d = c(n);
|
|
72
|
+
this.#t = d, this.#i = d.initialTick;
|
|
73
|
+
let f = Math.min(4096, d.maxPendingBytes * 7);
|
|
74
|
+
this.#n = new l(e, {
|
|
75
|
+
maxBytes: d.maxPendingBytes,
|
|
76
|
+
maxFieldId: f
|
|
77
|
+
}), this.#r = s(e, {
|
|
78
|
+
maxBytes: d.maxPendingBytes,
|
|
79
|
+
maxFieldId: f
|
|
80
|
+
}, !1, !0);
|
|
81
|
+
}
|
|
82
|
+
get tick() {
|
|
83
|
+
return this.#i;
|
|
84
|
+
}
|
|
85
|
+
get sealed() {
|
|
86
|
+
return this.#a;
|
|
87
|
+
}
|
|
88
|
+
metrics() {
|
|
89
|
+
return Object.freeze({
|
|
90
|
+
pendingInputs: this.#p,
|
|
91
|
+
pendingBytes: this.#m,
|
|
92
|
+
players: this.#s.size
|
|
93
|
+
});
|
|
94
|
+
}
|
|
95
|
+
work(e) {
|
|
96
|
+
if (this.#o) return M("Lockstep roster work cannot reenter admission, input, projection or privacy");
|
|
97
|
+
this.#o = !0;
|
|
98
|
+
try {
|
|
99
|
+
return e();
|
|
100
|
+
} finally {
|
|
101
|
+
this.#o = !1;
|
|
102
|
+
}
|
|
103
|
+
}
|
|
104
|
+
admit(e, t) {
|
|
105
|
+
return this.work(() => this.admitOwned(e, t));
|
|
106
|
+
}
|
|
107
|
+
admitAt(e, t) {
|
|
108
|
+
return this.work(() => {
|
|
109
|
+
let n = a(e, ["slot", "playerId"], ["slot", "playerId"]);
|
|
110
|
+
return !Number.isInteger(n.slot) || n.slot < 0 || n.slot > 63 ? M("Restored roster requires an actual bounded slot") : this.admitOwned(r(n.playerId), t, n.slot);
|
|
111
|
+
});
|
|
112
|
+
}
|
|
113
|
+
rebind(e) {
|
|
114
|
+
return this.work(() => {
|
|
115
|
+
let t = m(e), n = t.identity(), r = n ? this.#c.get(n.sessionId) : void 0, i = r === void 0 ? void 0 : this.#s.get(r);
|
|
116
|
+
return !this.#a || !n || !i || i.read.identity() !== null || n.roomId !== this.#e.roomId || n.tenantId !== this.#e.tenantId || n.epoch !== this.#e.epoch || n.subjectId !== i.evidence.subjectId || n.sessionId !== i.evidence.sessionId || t.inputSchemaHash() !== this.#n.schemaHash ? M("Reconnect requires the same retained withdrawn player with actual current admission") : (this.#s.set(i.player.slot, Object.freeze({
|
|
117
|
+
player: i.player,
|
|
118
|
+
evidence: n,
|
|
119
|
+
read: t
|
|
120
|
+
})), i.player);
|
|
121
|
+
});
|
|
122
|
+
}
|
|
123
|
+
seal() {
|
|
124
|
+
return this.work(() => this.sealOwned());
|
|
125
|
+
}
|
|
126
|
+
join(e, t, n) {
|
|
127
|
+
return this.work(() => {
|
|
128
|
+
if (!this.#a) return M("Late join requires a sealed roster");
|
|
129
|
+
let i = a(e, ["slot", "playerId"], ["slot", "playerId"]);
|
|
130
|
+
if (!Number.isInteger(i.slot) || i.slot < 0 || i.slot > 63) return M("Late join requires an actual bounded slot");
|
|
131
|
+
if (!Number.isSafeInteger(n) || n <= this.#i || n > 4294967295) return M("Late join tick must lie ahead of the consumed frontier");
|
|
132
|
+
this.#a = !1;
|
|
133
|
+
try {
|
|
134
|
+
let e = this.admitOwned(r(i.playerId), t, i.slot);
|
|
135
|
+
return this.#d.set(e.slot, n), e;
|
|
136
|
+
} finally {
|
|
137
|
+
this.#a = !0;
|
|
138
|
+
}
|
|
139
|
+
});
|
|
140
|
+
}
|
|
141
|
+
activeAt(e) {
|
|
142
|
+
return [...this.#s].filter(([t]) => (this.#d.get(t) ?? 0) <= e).sort((e, t) => e[0] - t[0]);
|
|
143
|
+
}
|
|
144
|
+
submit(e, t, n) {
|
|
145
|
+
return this.work(() => this.submitOwned(e, t, n));
|
|
146
|
+
}
|
|
147
|
+
next() {
|
|
148
|
+
return this.work(() => this.nextOwned());
|
|
149
|
+
}
|
|
150
|
+
consumeNext() {
|
|
151
|
+
return this.work(() => this.consumeNextOwned());
|
|
152
|
+
}
|
|
153
|
+
eraseSubject(e, t) {
|
|
154
|
+
return this.work(() => this.eraseSubjectOwned(e, t));
|
|
155
|
+
}
|
|
156
|
+
exportSubject(e, t) {
|
|
157
|
+
return this.work(() => this.exportSubjectOwned(e, t));
|
|
158
|
+
}
|
|
159
|
+
playerForSession(e) {
|
|
160
|
+
return this.work(() => {
|
|
161
|
+
let t = m(e).identity(), n = t ? this.#c.get(t.sessionId) : void 0, r = n === void 0 ? void 0 : this.#s.get(n);
|
|
162
|
+
return !this.#a || !r || !P(r.evidence, t) || !this.current(r) ? M("Lockstep player admission is no longer current") : r.player;
|
|
163
|
+
});
|
|
164
|
+
}
|
|
165
|
+
playersForSubject(e, t) {
|
|
166
|
+
return this.work(() => (this.privacyScope(e, t), Object.freeze([...this.#s.values()].filter((e) => e.evidence.subjectId === t).map((e) => e.player))));
|
|
167
|
+
}
|
|
168
|
+
withdraw() {
|
|
169
|
+
this.work(() => {
|
|
170
|
+
for (let e of [...this.#s.keys()]) this.removeSlot(e);
|
|
171
|
+
});
|
|
172
|
+
}
|
|
173
|
+
privacyScope(e, t) {
|
|
174
|
+
if (e !== this.#e.tenantId || typeof t != "string" || !t || t.length > 191) return M("Lockstep privacy scope does not match its Room owner");
|
|
175
|
+
}
|
|
176
|
+
current(e) {
|
|
177
|
+
return P(e.evidence, e.read.identity()) && e.read.inputSchemaHash() === this.#n.schemaHash;
|
|
178
|
+
}
|
|
179
|
+
admitOwned(t, n, i) {
|
|
180
|
+
if (r(t), this.#a) return M("Lockstep roster is sealed; late admission requires actual server snapshot integration");
|
|
181
|
+
let a = m(n), o = a.identity();
|
|
182
|
+
if (!o || o.roomId !== this.#e.roomId || o.tenantId !== this.#e.tenantId || o.epoch !== this.#e.epoch || a.inputSchemaHash() !== this.#n.schemaHash) return M("Lockstep requires the exact actual player admission and input layout");
|
|
183
|
+
if (this.#l.has(t) || this.#c.has(o.sessionId)) return M("Lockstep player/session identity is already assigned");
|
|
184
|
+
if (this.#u.size >= this.#t.maxPlayers) throw new e({
|
|
185
|
+
budget: "lockstepRosterSlots",
|
|
186
|
+
limit: this.#t.maxPlayers
|
|
187
|
+
});
|
|
188
|
+
let s = i ?? 0;
|
|
189
|
+
if (i === void 0) for (; this.#u.has(s);) s++;
|
|
190
|
+
if (this.#u.has(s)) return M("Lockstep player slot is already assigned");
|
|
191
|
+
let c = Object.freeze({
|
|
192
|
+
slot: s,
|
|
193
|
+
playerId: t
|
|
194
|
+
}), l = Object.freeze({
|
|
195
|
+
player: c,
|
|
196
|
+
evidence: o,
|
|
197
|
+
read: a
|
|
198
|
+
});
|
|
199
|
+
return this.#s.set(s, l), this.#c.set(o.sessionId, s), this.#l.add(t), this.#u.add(s), c;
|
|
200
|
+
}
|
|
201
|
+
sealOwned() {
|
|
202
|
+
if (this.#s.size === 0 || [...this.#s.values()].some((e) => !this.current(e))) return M("Cannot seal unavailable lockstep player admissions");
|
|
203
|
+
let e = Object.freeze([...this.#s.values()].map((e) => e.player));
|
|
204
|
+
return this.#a = !0, e;
|
|
205
|
+
}
|
|
206
|
+
submitOwned(t, n, a) {
|
|
207
|
+
if (!this.#a) return M("Lockstep input requires a sealed actual roster");
|
|
208
|
+
let s = m(t).identity(), c = s ? this.#c.get(s.sessionId) : void 0, l = c === void 0 ? void 0 : this.#s.get(c);
|
|
209
|
+
if (!l || !P(l.evidence, s) || !this.current(l)) return M("Lockstep player admission is no longer current");
|
|
210
|
+
if (r(n), !Array.isArray(a) || a.length < 1 || a.length > this.#t.maxBatchInputs || Reflect.ownKeys(a).length !== a.length + 1 || n > 4294967295 - a.length + 1) return M("Lockstep input batch exceeds dense/count/tick work");
|
|
211
|
+
let u = [], d = 0, f = 0, p = 0;
|
|
212
|
+
for (let t = 0; t < a.length; t++) {
|
|
213
|
+
let r = n + t;
|
|
214
|
+
if (r <= this.#i || r < (this.#d.get(l.player.slot) ?? 0)) {
|
|
215
|
+
f++;
|
|
216
|
+
continue;
|
|
217
|
+
}
|
|
218
|
+
if (r > this.#i + this.#t.maxFutureTicks) throw new e({
|
|
219
|
+
budget: "lockstepFutureTicks",
|
|
220
|
+
limit: this.#t.maxFutureTicks
|
|
221
|
+
});
|
|
222
|
+
let s = Object.getOwnPropertyDescriptor(a, String(t));
|
|
223
|
+
if (!s?.enumerable || !("value" in s)) return M("Lockstep input batch accessors refuse");
|
|
224
|
+
let c = o(s.value, this.#t.maxPendingBytes, "lockstepPendingBytes"), m = this.#f.get(r)?.get(l.player.slot);
|
|
225
|
+
if (m) {
|
|
226
|
+
if (c.length !== m.bytes.length || c.some((e, t) => e !== m.bytes[t])) return M("Conflicting lockstep intent for an admitted player tick");
|
|
227
|
+
d++;
|
|
228
|
+
continue;
|
|
229
|
+
}
|
|
230
|
+
if (this.#p + u.length + 1 > this.#t.maxPendingInputs) throw new e({
|
|
231
|
+
budget: "lockstepPendingInputs",
|
|
232
|
+
limit: this.#t.maxPendingInputs
|
|
233
|
+
});
|
|
234
|
+
if (p += c.length, this.#m + p > this.#t.maxPendingBytes) throw new e({
|
|
235
|
+
budget: "lockstepPendingBytes",
|
|
236
|
+
limit: this.#t.maxPendingBytes
|
|
237
|
+
});
|
|
238
|
+
let h = this.#n.decodeFull(c);
|
|
239
|
+
if (j.isFailure(h)) throw h.failure;
|
|
240
|
+
let g = i(this.#r.capture(h.success));
|
|
241
|
+
u.push({
|
|
242
|
+
tick: r,
|
|
243
|
+
pending: Object.freeze({
|
|
244
|
+
input: g,
|
|
245
|
+
bytes: c
|
|
246
|
+
})
|
|
247
|
+
});
|
|
248
|
+
}
|
|
249
|
+
for (let e of u) {
|
|
250
|
+
let t = this.#f.get(e.tick);
|
|
251
|
+
t || (t = /* @__PURE__ */ new Map(), this.#f.set(e.tick, t)), t.set(l.player.slot, e.pending);
|
|
252
|
+
}
|
|
253
|
+
return this.#p += u.length, this.#m += p, Object.freeze({
|
|
254
|
+
accepted: u.length,
|
|
255
|
+
duplicates: d,
|
|
256
|
+
expired: f
|
|
257
|
+
});
|
|
258
|
+
}
|
|
259
|
+
nextOwned() {
|
|
260
|
+
if (!this.#a) return M("Lockstep next input requires a sealed roster");
|
|
261
|
+
let e = r(this.#i + 1), t = this.activeAt(e);
|
|
262
|
+
if (!t.length) return Object.freeze({
|
|
263
|
+
_tag: "empty",
|
|
264
|
+
tick: e
|
|
265
|
+
});
|
|
266
|
+
let n = this.#f.get(e), a = [], o = [];
|
|
267
|
+
for (let [e, r] of t) {
|
|
268
|
+
let t = n?.get(e);
|
|
269
|
+
!t || !this.current(r) ? a.push(e) : o.push(Object.freeze({
|
|
270
|
+
playerId: r.player.playerId,
|
|
271
|
+
input: i(this.#r.capture(t.input))
|
|
272
|
+
}));
|
|
273
|
+
}
|
|
274
|
+
for (let [e, n] of t) !this.current(n) && !a.includes(e) && a.push(e);
|
|
275
|
+
return a.length ? Object.freeze({
|
|
276
|
+
_tag: "waiting",
|
|
277
|
+
tick: e,
|
|
278
|
+
waitingFor: F(a)
|
|
279
|
+
}) : Object.freeze({
|
|
280
|
+
_tag: "complete",
|
|
281
|
+
tick: e,
|
|
282
|
+
players: F(t.map(([e]) => e)),
|
|
283
|
+
inputs: Object.freeze(o)
|
|
284
|
+
});
|
|
285
|
+
}
|
|
286
|
+
consumeNextOwned() {
|
|
287
|
+
let e = this.nextOwned();
|
|
288
|
+
if (e._tag !== "complete") return e;
|
|
289
|
+
let t = this.#f.get(e.tick);
|
|
290
|
+
if (!t) return M("Lockstep pending matrix disappeared");
|
|
291
|
+
for (let e of t.values()) this.#p--, this.#m -= e.bytes.length;
|
|
292
|
+
return this.#f.delete(e.tick), this.#i = e.tick, e;
|
|
293
|
+
}
|
|
294
|
+
removeSlot(e) {
|
|
295
|
+
let t = this.#s.get(e);
|
|
296
|
+
if (t) {
|
|
297
|
+
for (let [t, n] of this.#f) {
|
|
298
|
+
let r = n.get(e);
|
|
299
|
+
r && (this.#p--, this.#m -= r.bytes.length, r.bytes.fill(0), n.delete(e)), n.size || this.#f.delete(t);
|
|
300
|
+
}
|
|
301
|
+
this.#s.delete(e), this.#c.delete(t.evidence.sessionId), this.#d.delete(e);
|
|
302
|
+
}
|
|
303
|
+
}
|
|
304
|
+
eraseSubjectOwned(e, t) {
|
|
305
|
+
this.privacyScope(e, t);
|
|
306
|
+
let n = [...this.#s.entries()].filter(([, e]) => e.evidence.subjectId === t).map(([e]) => e);
|
|
307
|
+
for (let e of n) this.removeSlot(e);
|
|
308
|
+
return n.length;
|
|
309
|
+
}
|
|
310
|
+
exportSubjectOwned(e, t) {
|
|
311
|
+
this.privacyScope(e, t);
|
|
312
|
+
let n = [];
|
|
313
|
+
for (let [e, r] of this.#s) if (r.evidence.subjectId === t) for (let [t, a] of this.#f) {
|
|
314
|
+
let o = a.get(e);
|
|
315
|
+
o && n.push(Object.freeze({
|
|
316
|
+
tick: t,
|
|
317
|
+
playerId: r.player.playerId,
|
|
318
|
+
input: i(this.#r.capture(o.input))
|
|
319
|
+
}));
|
|
320
|
+
}
|
|
321
|
+
return n.sort((e, t) => e.tick - t.tick || e.playerId - t.playerId), Object.freeze(n);
|
|
322
|
+
}
|
|
323
|
+
}, L = (e, t, n = {}) => new I(e, t, n);
|
|
324
|
+
export { d as RoomLockstepAdmissionPort, E as RoomLockstepHostLoop, I as RoomLockstepInputRoster, u as RoomLockstepJournalPort, p as RoomLockstepMemberOwner, A as RoomLockstepOwnedRoom, w as RoomLockstepServer, f as RoomLockstepTerminalPort, O as RoomLockstepTransportOwner, C as RoomRuntime, D as createRoomLockstepHostLoop, L as createRoomLockstepInputRoster, T as createRoomLockstepServer, k as createRoomLockstepTransportOwner, y as dataStoreRoomLockstepAdmission, h as dataStoreRoomLockstepJournal, x as dataStoreRoomLockstepTerminal, _ as rebuildRoomLockstepAuthorityFromSql, v as rebuildRoomLockstepFromSql, b as roomLockstepAdmissionLayer, g as roomLockstepJournalLayer, S as roomLockstepTerminalLayer };
|
|
@@ -0,0 +1,100 @@
|
|
|
1
|
+
import { RoomAuthoringError as e } from "./errors.js";
|
|
2
|
+
import { simulationOwnData as t } from "./simulationAuthoring.js";
|
|
3
|
+
import { captureLockstepRosterOptions as n } from "./lockstepRosterConfig.js";
|
|
4
|
+
import { createLockstepPolicies as r, defaultLockstepStallPolicy as i } from "./lockstepPolicies.js";
|
|
5
|
+
// src/lockstepServerConfig.ts
|
|
6
|
+
function a(t) {
|
|
7
|
+
throw new e({
|
|
8
|
+
room: "lockstep",
|
|
9
|
+
detail: t
|
|
10
|
+
});
|
|
11
|
+
}
|
|
12
|
+
var o = Object.freeze({
|
|
13
|
+
refereeLagTicks: 12,
|
|
14
|
+
hashEvery: 10,
|
|
15
|
+
hashHistoryTicks: 64,
|
|
16
|
+
maxQueuedTicks: 64,
|
|
17
|
+
maxQueuedInputBytes: 1048576,
|
|
18
|
+
maxPendingHashes: 256,
|
|
19
|
+
maxRefereeSteps: 8,
|
|
20
|
+
maxReplayTicks: 16,
|
|
21
|
+
maxReplayInputBytes: 1048576,
|
|
22
|
+
maxSnapshotBudgetBytes: 134217728,
|
|
23
|
+
maxRejectionAttempts: 64
|
|
24
|
+
}), s = Object.freeze({
|
|
25
|
+
refereeLagTicks: 4096,
|
|
26
|
+
hashEvery: 4096,
|
|
27
|
+
hashHistoryTicks: 4096,
|
|
28
|
+
maxQueuedTicks: 4096,
|
|
29
|
+
maxQueuedInputBytes: 16777216,
|
|
30
|
+
maxPendingHashes: 262144,
|
|
31
|
+
maxRefereeSteps: 4096,
|
|
32
|
+
maxReplayTicks: 4096,
|
|
33
|
+
maxReplayInputBytes: 16777216,
|
|
34
|
+
maxSnapshotBudgetBytes: 268435456,
|
|
35
|
+
maxRejectionAttempts: 65536
|
|
36
|
+
}), c = (e = {}) => {
|
|
37
|
+
let c = [
|
|
38
|
+
"maxPlayers",
|
|
39
|
+
"maxFutureTicks",
|
|
40
|
+
"maxBatchInputs",
|
|
41
|
+
"maxPendingInputs",
|
|
42
|
+
"maxPendingBytes"
|
|
43
|
+
], l = t(e, [
|
|
44
|
+
...c,
|
|
45
|
+
...Object.keys(o),
|
|
46
|
+
"serverRole",
|
|
47
|
+
"onDesync",
|
|
48
|
+
"stallPolicy",
|
|
49
|
+
"strategies"
|
|
50
|
+
], []), u = Object.hasOwn(l, "serverRole") ? l.serverRole : "relay";
|
|
51
|
+
if (u !== "relay" && u !== "referee" && u !== "full") return a("Invalid lockstep server role");
|
|
52
|
+
let d = { ...o };
|
|
53
|
+
for (let e of Object.keys(o)) {
|
|
54
|
+
let t = Object.hasOwn(l, e) ? l[e] : o[e];
|
|
55
|
+
if (!Number.isSafeInteger(t) || t < (e === "refereeLagTicks" ? 0 : 1) || t > s[e]) return a("Invalid bounded lockstep role work limit");
|
|
56
|
+
Object.defineProperty(d, e, {
|
|
57
|
+
value: t,
|
|
58
|
+
enumerable: !0
|
|
59
|
+
});
|
|
60
|
+
}
|
|
61
|
+
let f = Object.hasOwn(l, "onDesync") ? l.onDesync : "resync";
|
|
62
|
+
if (f !== "resync" && f !== "end" && f !== "flag" && typeof f != "function") return a("Invalid lockstep desync policy");
|
|
63
|
+
let p = t(Object.hasOwn(l, "strategies") ? l.strategies : {}, [
|
|
64
|
+
"refereeLag",
|
|
65
|
+
"stallPolicy",
|
|
66
|
+
"onDesync"
|
|
67
|
+
], []);
|
|
68
|
+
if (typeof f == "function") {
|
|
69
|
+
if (Object.hasOwn(p, "onDesync")) return a("Configure desync through one actual callback or strategy slot");
|
|
70
|
+
p.onDesync = f;
|
|
71
|
+
}
|
|
72
|
+
let m = d.refereeLagTicks, h = i(Object.hasOwn(l, "stallPolicy") ? l.stallPolicy : {}), g = r({
|
|
73
|
+
refereeLagTicks: m,
|
|
74
|
+
stallPolicy: h,
|
|
75
|
+
onDesync: typeof f == "function" ? "resync" : f
|
|
76
|
+
}, p);
|
|
77
|
+
if (Object.defineProperty(d, "refereeLagTicks", {
|
|
78
|
+
value: g.refereeLagTicks,
|
|
79
|
+
enumerable: !0
|
|
80
|
+
}), d.refereeLagTicks >= d.maxQueuedTicks) return a("Referee queue must exceed its configured lag");
|
|
81
|
+
let _ = {};
|
|
82
|
+
for (let e of c) Object.hasOwn(l, e) && (_[e] = l[e]);
|
|
83
|
+
let { initialTick: v, ...y } = n(_), b = Object.freeze(p), x = Object.freeze({
|
|
84
|
+
...d,
|
|
85
|
+
...y,
|
|
86
|
+
refereeLagTicks: m,
|
|
87
|
+
serverRole: u,
|
|
88
|
+
stallPolicy: h,
|
|
89
|
+
onDesync: typeof f == "function" ? "resync" : f,
|
|
90
|
+
strategies: b
|
|
91
|
+
});
|
|
92
|
+
return Object.freeze({
|
|
93
|
+
role: u,
|
|
94
|
+
limits: Object.freeze(d),
|
|
95
|
+
roster: Object.freeze(y),
|
|
96
|
+
policies: g,
|
|
97
|
+
options: x
|
|
98
|
+
});
|
|
99
|
+
};
|
|
100
|
+
export { c as captureRoomLockstepServerOptions };
|