@voltro/plugin-rooms 0.0.0-stage → 0.87.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 +24329 -0
- package/LICENSE +61 -0
- package/README.md +9204 -2
- package/SECURITY.md +56 -0
- package/THIRD-PARTY-NOTICES.md +11322 -0
- package/dist/actor.js +1474 -0
- package/dist/apiBinding.js +678 -0
- package/dist/apiRegistryBinding.js +399 -0
- package/dist/apiReservations.js +433 -0
- package/dist/baselines.js +73 -0
- package/dist/bots.d.ts +1485 -0
- package/dist/bots.js +563 -0
- package/dist/catalog.js +80 -0
- package/dist/checkpointJson.js +24 -0
- package/dist/checkpointStore.js +386 -0
- package/dist/client.js +56 -0
- package/dist/clockSync.js +51 -0
- package/dist/collision.js +156 -0
- package/dist/commandDelivery.js +101 -0
- package/dist/commandRecord.js +11 -0
- package/dist/commandWithdrawal.js +183 -0
- package/dist/connection.js +497 -0
- package/dist/controlCarrier.js +375 -0
- package/dist/controlRegistry.js +79 -0
- package/dist/controlTarget.js +45 -0
- package/dist/controlTransport.js +574 -0
- package/dist/developmentBinding.js +113 -0
- package/dist/directory.js +323 -0
- package/dist/directoryProjection.js +117 -0
- package/dist/errors.d.ts +125 -0
- package/dist/errors.js +53 -0
- package/dist/fixed.d.ts +284 -0
- package/dist/fixed.js +10 -0
- package/dist/fixed32.js +134 -0
- package/dist/fixedCollision.js +60 -0
- package/dist/fixedCollision32.js +109 -0
- package/dist/fixedMath.js +56 -0
- package/dist/fixedRaw.js +11 -0
- package/dist/fixedSlabs.js +34 -0
- package/dist/fixedTrig.js +48 -0
- package/dist/fixedTrig32.js +38 -0
- package/dist/fixedVectors.js +113 -0
- package/dist/fixedVectors32.js +95 -0
- package/dist/fixedWide.js +50 -0
- package/dist/fixedWords.js +46 -0
- package/dist/gateway.js +57 -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 +82 -0
- package/dist/geometryActorInventory.js +108 -0
- package/dist/geometryAdminClient.js +87 -0
- package/dist/geometryAdminData.js +32 -0
- package/dist/geometryAdminFixtures.js +50 -0
- package/dist/geometryAdminPorts.js +5 -0
- package/dist/geometryAdminRpc.js +58 -0
- package/dist/geometryAdminRpcRoutes.js +49 -0
- package/dist/geometryAdminSchemas.js +39 -0
- package/dist/geometryAdministration.js +190 -0
- package/dist/geometryAdministrationPorts.js +5 -0
- package/dist/geometryApiBinding.js +165 -0
- package/dist/geometryAppStorage.js +58 -0
- package/dist/geometryArtifacts.js +198 -0
- package/dist/geometryAssetBundle.js +117 -0
- package/dist/geometryAssetClient.js +25 -0
- package/dist/geometryAssetData.js +106 -0
- package/dist/geometryAssetHttp.js +123 -0
- package/dist/geometryAssetPorts.js +5 -0
- package/dist/geometryAssetRpc.js +30 -0
- package/dist/geometryAssetRpcRoutes.js +40 -0
- package/dist/geometryAssetStorageGrant.js +103 -0
- package/dist/geometryBoxOverlap.js +110 -0
- package/dist/geometryCatalogueDigest.js +111 -0
- package/dist/geometryCellCoverage.js +85 -0
- package/dist/geometryCellLoader.js +28 -0
- package/dist/geometryChannel.js +134 -0
- package/dist/geometryChunkHttp.js +54 -0
- package/dist/geometryChunkLeases.js +22 -0
- package/dist/geometryClient.d.ts +1429 -0
- package/dist/geometryClient.js +149 -0
- package/dist/geometryClientChunks.js +330 -0
- package/dist/geometryClientDelta.js +25 -0
- package/dist/geometryClientHttp.js +37 -0
- package/dist/geometryClientInterest.js +109 -0
- package/dist/geometryClientStatic.js +34 -0
- package/dist/geometryCms.d.ts +763 -0
- package/dist/geometryCms.js +217 -0
- package/dist/geometryCommitCoordinator.js +241 -0
- package/dist/geometryCompactionFixture.js +84 -0
- package/dist/geometryCompactionStrategies.js +38 -0
- package/dist/geometryConnectionClient.js +23 -0
- package/dist/geometryDerivationFixtures.js +141 -0
- package/dist/geometryDerivationStrategies.js +27 -0
- package/dist/geometryDigest.js +13 -0
- package/dist/geometryEditChannel.js +70 -0
- package/dist/geometryEditIngress.js +263 -0
- package/dist/geometryEdits.js +366 -0
- package/dist/geometryEnvelope.js +41 -0
- package/dist/geometryGridRaycast.js +92 -0
- package/dist/geometryGridSweep.js +92 -0
- package/dist/geometryHeightfield.js +166 -0
- package/dist/geometryHeightfieldRaycast.js +74 -0
- package/dist/geometryHeightfieldSweep.js +85 -0
- package/dist/geometryHeightfieldVolume.js +45 -0
- package/dist/geometryHost.js +322 -0
- package/dist/geometryHostDirectory.js +207 -0
- package/dist/geometryHostMutations.js +137 -0
- package/dist/geometryHostStreams.js +124 -0
- package/dist/geometryHttpBody.js +76 -0
- package/dist/geometryHttpRoutes.js +112 -0
- package/dist/geometryImportGltf.js +300 -0
- package/dist/geometryImportLdtk.js +54 -0
- package/dist/geometryImportPng.js +144 -0
- package/dist/geometryImportPublication.js +67 -0
- package/dist/geometryImportTiled.js +39 -0
- package/dist/geometryImportTiles.js +136 -0
- package/dist/geometryImportVox.js +130 -0
- package/dist/geometryImportedSource.js +101 -0
- package/dist/geometryInspectEndpoint.js +248 -0
- package/dist/geometryInspection.js +92 -0
- package/dist/geometryInstall.js +121 -0
- package/dist/geometryJournalArchiveData.js +21 -0
- package/dist/geometryJournalArchiveIndex.js +330 -0
- package/dist/geometryJournalArchiveTable.js +21 -0
- package/dist/geometryJournalCompaction.js +100 -0
- package/dist/geometryJournalPatch.js +47 -0
- package/dist/geometryJournalRetention.js +112 -0
- package/dist/geometryJournalRetentionSchemas.js +36 -0
- package/dist/geometryJournalRetentionSweep.js +112 -0
- package/dist/geometryJournalRetentionWorkflow.js +28 -0
- package/dist/geometryJournalRetentionWorkflowData.js +31 -0
- package/dist/geometryJournalStorage.js +148 -0
- package/dist/geometryLoader.js +118 -0
- package/dist/geometryManifest.js +113 -0
- package/dist/geometryManifestChannel.js +93 -0
- package/dist/geometryManifestClient.js +122 -0
- package/dist/geometryManifestData.js +49 -0
- package/dist/geometryManifestPorts.js +5 -0
- package/dist/geometryManifestPublication.js +109 -0
- package/dist/geometryManifestSource.js +68 -0
- package/dist/geometryMigrationJournal.js +14 -0
- package/dist/geometryMigrationStrategies.js +7 -0
- package/dist/geometryMigrations.js +323 -0
- package/dist/geometryNativeMetadata.js +52 -0
- package/dist/geometryPatch.js +170 -0
- package/dist/geometryPersistence.js +449 -0
- package/dist/geometryPersistenceCapture.js +69 -0
- package/dist/geometryPersistenceData.js +140 -0
- package/dist/geometryPersistencePorts.js +5 -0
- package/dist/geometryPlayerAdmission.js +34 -0
- package/dist/geometryPlayerEditOwner.js +265 -0
- package/dist/geometryPlayerEdits.js +49 -0
- package/dist/geometryPrepared.js +188 -0
- package/dist/geometryPrivacyFence.js +24 -0
- package/dist/geometryProceduralPublication.js +91 -0
- package/dist/geometryProceduralWorker.js +164 -0
- package/dist/geometryPublication.js +110 -0
- package/dist/geometryRayAlgebra.js +116 -0
- package/dist/geometryReadClient.js +157 -0
- package/dist/geometryReadPorts.js +5 -0
- package/dist/geometryReadRpc.js +27 -0
- package/dist/geometryReadRpcRoutes.js +47 -0
- package/dist/geometryReliablePublication.js +82 -0
- package/dist/geometryReloadPorts.js +46 -0
- package/dist/geometryReloadSource.js +278 -0
- package/dist/geometryRenderCache.js +165 -0
- package/dist/geometryRenderLod.js +102 -0
- package/dist/geometryRollback.js +125 -0
- package/dist/geometryRollbackCoordinator.js +203 -0
- package/dist/geometryRollbackPorts.js +46 -0
- package/dist/geometryRollbackSource.js +209 -0
- package/dist/geometryRollbackStore.js +198 -0
- package/dist/geometrySchemas.js +27 -0
- package/dist/geometryServer.d.ts +2766 -0
- package/dist/geometryServer.js +62 -0
- package/dist/geometryShapeRaycast.js +111 -0
- package/dist/geometryShapeSegments.js +34 -0
- package/dist/geometryShapes.js +223 -0
- package/dist/geometrySnapshot.js +76 -0
- package/dist/geometrySnapshotChannel.js +160 -0
- package/dist/geometrySnapshotClient.js +159 -0
- package/dist/geometrySnapshotPreparation.js +76 -0
- package/dist/geometrySnapshotServer.js +191 -0
- package/dist/geometrySqlOwner.js +21 -0
- package/dist/geometryStorage.js +127 -0
- package/dist/geometryStorageGrant.js +69 -0
- package/dist/geometryStorageIdentity.js +9 -0
- package/dist/geometryTileArtifact.js +10 -0
- package/dist/geometryTileCodec.js +194 -0
- package/dist/geometryTileCollision.js +96 -0
- package/dist/geometryTileNavigation.js +128 -0
- package/dist/geometryTileView.js +35 -0
- package/dist/geometryVersionActivation.js +114 -0
- package/dist/geometryVersionClient.js +238 -0
- package/dist/geometryVersionCompare.js +40 -0
- package/dist/geometryVersionMigration.js +106 -0
- package/dist/geometryVoxel.js +253 -0
- package/dist/geometryWorldEntitySubject.js +32 -0
- package/dist/geometryWorldExtent.js +12 -0
- package/dist/geometryWorldMetadata.js +38 -0
- package/dist/geometryWorldStrategyFixtures.js +127 -0
- package/dist/geometryWorldView.js +307 -0
- package/dist/host.js +128 -0
- package/dist/hostBinding.js +277 -0
- package/dist/hostCellObservation.js +114 -0
- package/dist/hostClientCapacity.js +90 -0
- package/dist/hostCommandScope.js +64 -0
- package/dist/hostController.js +3094 -0
- package/dist/hostDeployment.js +65 -0
- package/dist/hostDrain.js +152 -0
- package/dist/hostDrainPorts.js +5 -0
- package/dist/hostDriver.js +179 -0
- package/dist/hostLane.js +288 -0
- package/dist/hostListener.js +79 -0
- package/dist/hostListenerBinding.js +19 -0
- package/dist/hostLoopObservation.js +90 -0
- package/dist/hostMetrics.js +56 -0
- package/dist/hostRegistryBinding.js +418 -0
- package/dist/hostSelection.js +16 -0
- package/dist/hostShutdown.js +47 -0
- package/dist/hostTurnObservation.js +53 -0
- package/dist/identities.js +4 -0
- package/dist/index.d.ts +8632 -0
- package/dist/index.js +232 -0
- package/dist/inputReceipts.js +63 -0
- package/dist/inputRedundancy.js +55 -0
- package/dist/inspect.js +238 -0
- package/dist/lockstep.d.ts +436 -0
- package/dist/lockstep.js +382 -0
- package/dist/lockstepAdmission.js +262 -0
- package/dist/lockstepAdmissionCodec.js +94 -0
- package/dist/lockstepAdmissionPorts.js +5 -0
- package/dist/lockstepClientSession.js +578 -0
- package/dist/lockstepDefinition.js +148 -0
- package/dist/lockstepHostLoop.js +243 -0
- package/dist/lockstepInitialAdmission.js +67 -0
- package/dist/lockstepInitialStrategyFixtures.js +45 -0
- package/dist/lockstepJournal.js +395 -0
- package/dist/lockstepJournalCodec.js +254 -0
- package/dist/lockstepJournalPorts.js +5 -0
- package/dist/lockstepJournalRebuild.js +208 -0
- package/dist/lockstepJournalRows.js +57 -0
- package/dist/lockstepMembers.js +131 -0
- package/dist/lockstepMessages.js +47 -0
- package/dist/lockstepOwnedRoom.js +764 -0
- package/dist/lockstepPolicies.js +84 -0
- package/dist/lockstepReact.js +47 -0
- package/dist/lockstepRecoveryTruth.js +121 -0
- package/dist/lockstepRosterConfig.js +32 -0
- package/dist/lockstepSeed.js +12 -0
- package/dist/lockstepSeedFixture.js +20 -0
- package/dist/lockstepServer.d.ts +3897 -0
- package/dist/lockstepServer.js +325 -0
- package/dist/lockstepServerConfig.js +101 -0
- package/dist/lockstepServerRoles.js +403 -0
- package/dist/lockstepServerStrategyFixtures.js +33 -0
- package/dist/lockstepStrategies.js +6 -0
- package/dist/lockstepStrategyFixtures.js +137 -0
- package/dist/lockstepTerminal.js +90 -0
- package/dist/lockstepTerminalPorts.js +5 -0
- package/dist/lockstepTransport.js +773 -0
- package/dist/lockstepTransportConfig.js +32 -0
- package/dist/lockstepWireRoster.js +34 -0
- package/dist/matchRoomProvider.js +32 -0
- package/dist/matchRooms.js +19 -0
- package/dist/membershipObserver.js +47 -0
- package/dist/moderation.js +98 -0
- package/dist/movementSpecials.js +104 -0
- package/dist/ownership.js +17 -0
- package/dist/ownershipWithdrawal.js +18 -0
- package/dist/pcg32.js +96 -0
- package/dist/ports.d.ts +1241 -0
- package/dist/ports.js +11 -0
- package/dist/quaternion.js +70 -0
- package/dist/react.d.ts +406 -0
- package/dist/react.js +109 -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 +243 -0
- package/dist/reaperSchemas.js +42 -0
- package/dist/reaperWorkflow.js +70 -0
- package/dist/recovery.js +189 -0
- package/dist/recoverySeats.js +26 -0
- package/dist/replay.d.ts +273 -0
- package/dist/replay.js +485 -0
- package/dist/replayPorts.js +5 -0
- package/dist/replayRecording.js +67 -0
- package/dist/replaySchema.js +157 -0
- package/dist/replayStorage.d.ts +149 -0
- package/dist/replayStorage.js +485 -0
- package/dist/reservationBatch.js +422 -0
- package/dist/reservationSchemas.js +17 -0
- package/dist/reservations.js +259 -0
- package/dist/reservePort.js +69 -0
- package/dist/resolvedOptions.js +4 -0
- package/dist/room.d.ts +1006 -0
- package/dist/room.js +284 -0
- package/dist/roomAccessSweep.js +95 -0
- package/dist/roomAppCommandControl.js +59 -0
- package/dist/roomAuthoringStrategy.js +17 -0
- package/dist/roomErasure.js +198 -0
- package/dist/roomPoolRuntimeDefaults.js +24 -0
- package/dist/roomPoolSelection.js +19 -0
- package/dist/roomPoolTopology.js +212 -0
- package/dist/rpc.d.ts +551 -0
- package/dist/rpc.js +112 -0
- package/dist/rpcClient.js +152 -0
- package/dist/rpcRoutes.js +28 -0
- package/dist/runtime.js +1123 -0
- package/dist/schemaHistory.js +98 -0
- package/dist/seatStore.js +151 -0
- package/dist/seatStrategyFixtures.js +52 -0
- package/dist/seatSubject.js +32 -0
- package/dist/seats.js +130 -0
- package/dist/serverSession.js +811 -0
- package/dist/serverSessionConfig.js +43 -0
- package/dist/sessionAdmission.js +53 -0
- package/dist/sidecarAdmission.js +103 -0
- package/dist/sidecarConfig.js +116 -0
- package/dist/sidecarConfigPublication.js +64 -0
- package/dist/sidecarHostListener.js +208 -0
- package/dist/sidecarIpc.js +205 -0
- package/dist/sidecarPeer.js +310 -0
- package/dist/sidecarProcessPort.js +28 -0
- package/dist/sidecarRuntime.js +168 -0
- package/dist/sidecarSelection.js +142 -0
- package/dist/sidecarWire.js +178 -0
- package/dist/sidecarWrites.js +163 -0
- package/dist/simulation.d.ts +391 -0
- package/dist/simulation.js +282 -0
- package/dist/simulationAuthoring.js +29 -0
- package/dist/simulationBytes.js +27 -0
- package/dist/simulationConformance.js +305 -0
- package/dist/simulationInputHistoryCapture.js +35 -0
- package/dist/simulationInputHistoryWire.js +193 -0
- package/dist/simulationOptionsWire.js +78 -0
- package/dist/simulationRecoveryWire.js +134 -0
- package/dist/simulationReplay.js +127 -0
- package/dist/simulationSnapshotWire.js +112 -0
- package/dist/simulationState.js +178 -0
- package/dist/snapshotBlob.js +126 -0
- package/dist/snapshotBlobCleanup.js +93 -0
- package/dist/snapshotBlobIndex.js +38 -0
- package/dist/snapshotBudget.js +80 -0
- package/dist/snapshotChain.js +185 -0
- package/dist/snapshotErasure.js +172 -0
- package/dist/snapshotInspection.js +105 -0
- package/dist/snapshotSegmentBlobs.js +58 -0
- package/dist/snapshotUploads.js +166 -0
- package/dist/socketTransport.js +253 -0
- package/dist/spatial.js +104 -0
- package/dist/spectatorPolicy.js +26 -0
- package/dist/spectatorProducer.js +89 -0
- package/dist/startFailureCause.js +4 -0
- package/dist/stateCodec.js +658 -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 +182 -0
- package/dist/streamFraming.js +122 -0
- package/dist/streamTransport.js +266 -0
- package/dist/subjectAdmission.js +50 -0
- package/dist/subjectPrivacy.js +281 -0
- package/dist/subjectPrivacyBinding.js +90 -0
- package/dist/systemManifest.js +182 -0
- package/dist/tables.js +159 -0
- package/dist/testHarness.js +89 -0
- package/dist/testing.d.ts +3684 -0
- package/dist/testing.js +221 -0
- package/dist/testingPorts.js +271 -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 +217 -0
- package/dist/transform3d.js +118 -0
- package/dist/transformCollection.js +24 -0
- package/dist/transformCollection3d.js +24 -0
- package/dist/transformCollectionCore.js +156 -0
- package/dist/transformFrames.js +121 -0
- package/dist/transformPrediction3d.js +127 -0
- package/dist/transformRules.js +123 -0
- package/dist/transformSchemas.js +20 -0
- package/dist/transport.js +32 -0
- package/dist/transportAuthoring.js +29 -0
- package/dist/transportCleanup.js +22 -0
- package/dist/transportConformance.js +124 -0
- package/dist/transportConnector.js +82 -0
- package/dist/transportEndpoints.js +38 -0
- package/dist/transportsServer.d.ts +5515 -0
- package/dist/transportsServer.js +6 -0
- package/dist/viewProjection.js +16 -0
- package/dist/web.d.ts +2286 -0
- package/dist/web.js +518 -0
- package/dist/webTransportClient.js +173 -0
- package/dist/wire.d.ts +992 -0
- package/dist/wire.js +492 -0
- package/dist/withdrawalPort.js +28 -0
- package/dist/world.d.ts +1894 -0
- package/dist/world.js +333 -0
- package/dist/worldActorReceipts.js +48 -0
- package/dist/worldActorTransferSnapshot.js +14 -0
- package/dist/worldAdmissionPending.js +8 -0
- package/dist/worldBoundaryCoordinator.js +148 -0
- package/dist/worldCatalog.js +81 -0
- package/dist/worldCellAllocation.js +203 -0
- package/dist/worldCellDestination.js +68 -0
- package/dist/worldCells.js +489 -0
- package/dist/worldChange.js +32 -0
- package/dist/worldClient.js +664 -0
- package/dist/worldClientControl.js +141 -0
- package/dist/worldClientPendingInput.js +16 -0
- package/dist/worldClientRpc.js +133 -0
- package/dist/worldClientRpcRoutes.js +43 -0
- package/dist/worldClientSchemas.js +28 -0
- package/dist/worldCommands.js +140 -0
- package/dist/worldData.js +42 -0
- package/dist/worldDefaultBinding.js +377 -0
- package/dist/worldDefaultGroupAdmission.js +82 -0
- package/dist/worldDefaultGroupAppServices.js +31 -0
- package/dist/worldDefaultGroupCompensation.js +109 -0
- package/dist/worldDefaultGroupContinuation.js +96 -0
- package/dist/worldDefaultGroupControl.js +72 -0
- package/dist/worldDefaultGroupMembers.js +85 -0
- package/dist/worldDefaultGroups.js +21 -0
- package/dist/worldDefaultPending.js +79 -0
- package/dist/worldDefaultService.js +245 -0
- package/dist/worldEntities.js +2980 -0
- package/dist/worldEntityCodec.js +21 -0
- package/dist/worldEntityHandoffView.js +154 -0
- package/dist/worldGeometry.js +170 -0
- package/dist/worldGhostAdmission.js +65 -0
- package/dist/worldGhostDestination.js +118 -0
- package/dist/worldGhostGateway.js +132 -0
- package/dist/worldGhostHandshake.js +108 -0
- package/dist/worldGhostHost.js +42 -0
- package/dist/worldGhostIngress.js +132 -0
- package/dist/worldGhostNeighborhood.js +70 -0
- package/dist/worldGhostNeighbors.js +86 -0
- package/dist/worldGhostOutbound.js +110 -0
- package/dist/worldGhostPublisher.js +216 -0
- package/dist/worldGhostReceiver.js +213 -0
- package/dist/worldGhostSender.js +146 -0
- package/dist/worldGhostSocket.js +78 -0
- package/dist/worldGhostWire.js +172 -0
- package/dist/worldGroupCommand.js +49 -0
- package/dist/worldGroupDeadline.js +115 -0
- package/dist/worldGroupPreparation.js +115 -0
- package/dist/worldGroupReadyControl.js +128 -0
- package/dist/worldGroupSupervisor.js +120 -0
- package/dist/worldHandoffMetrics.js +59 -0
- package/dist/worldHandoffView.js +100 -0
- package/dist/worldHostSource.js +69 -0
- package/dist/worldInspectEndpoint.js +250 -0
- package/dist/worldInspection.js +109 -0
- package/dist/worldInstanceAdmission.js +31 -0
- package/dist/worldInstanceAllocation.js +116 -0
- package/dist/worldInstanceDestination.js +64 -0
- package/dist/worldInstanceExpiry.js +282 -0
- package/dist/worldInstanceExpirySupervisor.js +88 -0
- package/dist/worldInstanceLifecycle.js +103 -0
- package/dist/worldInstanceState.js +52 -0
- package/dist/worldInstances.js +478 -0
- package/dist/worldJoin.js +56 -0
- package/dist/worldLayers.js +151 -0
- package/dist/worldLeases.js +78 -0
- package/dist/worldManifest.js +25 -0
- package/dist/worldMovement.js +63 -0
- package/dist/worldPersistence.js +134 -0
- package/dist/worldProjection.js +221 -0
- package/dist/worldReact.js +110 -0
- package/dist/worldRecoveryActor.js +35 -0
- package/dist/worldReturnAnchor.js +49 -0
- package/dist/worldRoomHooks.js +57 -0
- package/dist/worldRoomPool.js +27 -0
- package/dist/worldRoomSteps.js +133 -0
- package/dist/worldSeatBinding.js +36 -0
- package/dist/worldServer.d.ts +6936 -0
- package/dist/worldServer.js +48 -0
- package/dist/worldSourceSeatPending.js +9 -0
- package/dist/worldStrategyFixtures.js +164 -0
- package/dist/worldTesting.js +27 -0
- package/dist/worldTransitionDefaults.js +198 -0
- package/dist/worldTransitionExecutor.js +519 -0
- package/dist/worldTransitionGroup.js +113 -0
- package/dist/worldTransitionPhysicalSteps.js +40 -0
- package/dist/worldTransitionResolver.js +228 -0
- package/dist/worldTransitionSeatGroup.js +64 -0
- package/dist/worldTransitionSeats.js +260 -0
- package/dist/worldTransitionState.js +95 -0
- package/dist/worldTransitions.js +101 -0
- package/package.json +189 -4
|
@@ -0,0 +1,519 @@
|
|
|
1
|
+
import { ProtocolError as e } from "./errors.js";
|
|
2
|
+
import { worldTransitionRequest as t } from "./worldCommands.js";
|
|
3
|
+
import { nextWorldTransitionPhase as n } from "./worldTransitionState.js";
|
|
4
|
+
import { worldTransitionGroupFromRecords as r } from "./worldTransitionGroup.js";
|
|
5
|
+
import { isVerifiedWorldTransitionLease as i, worldTransitionLeaseToken as a } from "./worldLeases.js";
|
|
6
|
+
import { Effect as o, Option as s } from "effect";
|
|
7
|
+
//#region src/worldTransitionExecutor.ts
|
|
8
|
+
var c = /* @__PURE__ */ new WeakMap(), l = (t, n, r) => o.suspend(() => {
|
|
9
|
+
let i = t, a = i && typeof i == "object" ? c.get(i) : void 0;
|
|
10
|
+
return !a?.active || i.tenantId !== n.origin.tenantId || i.entityId !== n.entityId || i.transitionId !== n.id || i.revision !== n.revision || i.operation !== r ? o.fail(new e({ detail: "World actor operation requires its active leased executor callback" })) : a.renew().pipe(o.flatMap(() => a.active ? o.void : o.fail(new e({ detail: "World executor callback authority expired" }))));
|
|
11
|
+
}), u = (t, n, i) => l(t, n, i).pipe(o.flatMap(() => o.suspend(() => {
|
|
12
|
+
let i = c.get(t), a = i?.members;
|
|
13
|
+
return !i?.active || !a || !r(a) || !a.some((e) => e.id === n.id && e.revision === n.revision) ? o.fail(new e({ detail: "World operation requires every original group lease" })) : o.succeed(a);
|
|
14
|
+
}))), d = (t, n, r, i, a) => u(t, n, i).pipe(o.flatMap((n) => o.suspend(() => {
|
|
15
|
+
let s = c.get(t);
|
|
16
|
+
if (!s?.active || !n.some((e) => e.id === r.id && e.entityId === r.entityId && e.origin.tenantId === r.origin.tenantId && e.revision === r.revision)) return o.fail(new e({ detail: "World group callback cannot acquire another member scope" }));
|
|
17
|
+
let l = Object.freeze({
|
|
18
|
+
tenantId: r.origin.tenantId,
|
|
19
|
+
entityId: r.entityId,
|
|
20
|
+
transitionId: r.id,
|
|
21
|
+
revision: r.revision,
|
|
22
|
+
operation: i
|
|
23
|
+
}), u = {
|
|
24
|
+
active: !0,
|
|
25
|
+
members: n,
|
|
26
|
+
...s.tokens ? { tokens: s.tokens } : {},
|
|
27
|
+
renew: () => s.active ? s.renew().pipe(o.flatMap(() => s.active ? o.void : o.fail(new e({ detail: "World parent group callback expired" })))) : o.fail(new e({ detail: "World parent group callback expired" }))
|
|
28
|
+
};
|
|
29
|
+
return c.set(l, u), o.suspend(() => {
|
|
30
|
+
let t = a(l);
|
|
31
|
+
return o.isEffect(t) ? t : o.fail(new e({ detail: "World member callback requires an Effect" }));
|
|
32
|
+
}).pipe(o.ensuring(o.sync(() => {
|
|
33
|
+
u.active = !1, c.delete(l);
|
|
34
|
+
})));
|
|
35
|
+
}))), f = (e) => {
|
|
36
|
+
let t = e, n = t && typeof t == "object" ? c.get(t) : void 0;
|
|
37
|
+
return n?.active ? n.tokens?.get(t.entityId) : void 0;
|
|
38
|
+
}, p = (t) => {
|
|
39
|
+
let n = t, r = n && typeof n == "object" ? c.get(n) : void 0;
|
|
40
|
+
if (r?.active && r.members) return r.members.map((t) => {
|
|
41
|
+
let n = r.tokens?.get(t.entityId);
|
|
42
|
+
if (n === void 0) throw new e({ detail: "A remote World group step needs every member lease token" });
|
|
43
|
+
return Object.freeze({
|
|
44
|
+
record: t,
|
|
45
|
+
leaseToken: n
|
|
46
|
+
});
|
|
47
|
+
});
|
|
48
|
+
}, m = Object.freeze({
|
|
49
|
+
guard: ["requested"],
|
|
50
|
+
prepare: ["reserving"],
|
|
51
|
+
ghost: ["ghosting"],
|
|
52
|
+
detach: ["detaching"],
|
|
53
|
+
switchClient: ["switching"],
|
|
54
|
+
enter: ["switching"],
|
|
55
|
+
settle: ["committed"],
|
|
56
|
+
rollback: ["failed"],
|
|
57
|
+
retire: ["settled", "rolledBack"]
|
|
58
|
+
}), h = [
|
|
59
|
+
"reserving",
|
|
60
|
+
"prepared",
|
|
61
|
+
"ghosting",
|
|
62
|
+
"persisting",
|
|
63
|
+
"detaching",
|
|
64
|
+
"switching"
|
|
65
|
+
], g = (t, n) => o.suspend(() => {
|
|
66
|
+
let { record: a, operation: s, lease: l, group: u } = t, d = u ?? [{
|
|
67
|
+
record: a,
|
|
68
|
+
lease: l
|
|
69
|
+
}], f = u !== void 0 && (s === "prepare" || s === "ghost" || s === "detach") ? h : m[s];
|
|
70
|
+
if (!m[s]?.includes(a.phase) || d.some((e) => !i(e.lease) || !f?.includes(e.record.phase)) || !d.some((e) => e.record.id === a.id && e.record.revision === a.revision) || u !== void 0 && !r(u.map((e) => e.record))) return o.fail(new e({ detail: "World step is not current for its transition phase" }));
|
|
71
|
+
let p = d.map((e) => e.lease.renew.bind(e.lease)), g = () => o.forEach(p, (t) => o.suspend(() => t()).pipe(o.catchCause(() => o.succeed(!1)), o.flatMap((t) => t === !0 ? o.void : o.fail(new e({ detail: "World step lost its transition lease" })))), { discard: !0 }), _ = Object.freeze({
|
|
72
|
+
tenantId: a.origin.tenantId,
|
|
73
|
+
entityId: a.entityId,
|
|
74
|
+
transitionId: a.id,
|
|
75
|
+
revision: a.revision,
|
|
76
|
+
operation: s
|
|
77
|
+
}), v = {
|
|
78
|
+
active: !0,
|
|
79
|
+
renew: g,
|
|
80
|
+
...u ? { members: Object.freeze(u.map((e) => e.record)) } : {}
|
|
81
|
+
};
|
|
82
|
+
return c.set(_, v), o.suspend(() => {
|
|
83
|
+
let t = n(_);
|
|
84
|
+
return o.isEffect(t) ? t : o.fail(new e({ detail: "World step requires an Effect" }));
|
|
85
|
+
}).pipe(o.ensuring(o.sync(() => {
|
|
86
|
+
v.active = !1, c.delete(_);
|
|
87
|
+
})));
|
|
88
|
+
});
|
|
89
|
+
function _() {
|
|
90
|
+
throw new e({ detail: "Invalid World transition executor admission" });
|
|
91
|
+
}
|
|
92
|
+
var v = (e, t = 191) => typeof e == "string" && e.length <= t && /^[A-Za-z0-9][A-Za-z0-9_.:-]*$/.test(e) ? e : _(), y = (e, t) => {
|
|
93
|
+
(!e || typeof e != "object" || Object.getPrototypeOf(e) !== Object.prototype) && _();
|
|
94
|
+
for (let n of Reflect.ownKeys(e)) {
|
|
95
|
+
let r = Object.getOwnPropertyDescriptor(e, n);
|
|
96
|
+
(typeof n != "string" || !t.includes(n) || !r?.enumerable || !("value" in r)) && _();
|
|
97
|
+
}
|
|
98
|
+
}, b = (e, t) => {
|
|
99
|
+
y(e, [
|
|
100
|
+
"tenantId",
|
|
101
|
+
"roomId",
|
|
102
|
+
"requestId"
|
|
103
|
+
]);
|
|
104
|
+
let n = Object.freeze({
|
|
105
|
+
tenantId: v(e.tenantId),
|
|
106
|
+
roomId: v(e.roomId),
|
|
107
|
+
requestId: v(e.requestId, 384)
|
|
108
|
+
});
|
|
109
|
+
return n.tenantId !== t && _(), n;
|
|
110
|
+
}, x = (e) => {
|
|
111
|
+
if (e !== void 0) return y(e, ["id", "kind"]), e.kind !== "user" && e.kind !== "guest" && _(), Object.freeze({
|
|
112
|
+
id: v(e.id),
|
|
113
|
+
kind: e.kind
|
|
114
|
+
});
|
|
115
|
+
}, ee = (e) => {
|
|
116
|
+
let n = t(e), r = (e) => {
|
|
117
|
+
if (typeof e == "object" && e) {
|
|
118
|
+
for (let t of Object.values(e)) r(t);
|
|
119
|
+
Object.freeze(e);
|
|
120
|
+
}
|
|
121
|
+
};
|
|
122
|
+
return r(n), n;
|
|
123
|
+
}, S = (e, t) => {
|
|
124
|
+
(typeof e != "object" || !e) && _();
|
|
125
|
+
let n = Object.getOwnPropertyDescriptor(e, t);
|
|
126
|
+
return (!n || !("value" in n) || typeof n.value != "function") && _(), n.value.bind(e);
|
|
127
|
+
}, C = (t) => o.suspend(() => {
|
|
128
|
+
let n = t();
|
|
129
|
+
return o.isEffect(n) ? n : o.fail(new e({ detail: "World transition provider requires an Effect" }));
|
|
130
|
+
}).pipe(o.catchCause(() => o.fail(new e({ detail: "World transition execution remains incomplete" })))), w = (t) => {
|
|
131
|
+
y(t, [
|
|
132
|
+
"tenantId",
|
|
133
|
+
"maxPhaseSteps",
|
|
134
|
+
"states",
|
|
135
|
+
"leases",
|
|
136
|
+
"authorize",
|
|
137
|
+
"resolve",
|
|
138
|
+
"guard",
|
|
139
|
+
"prepare",
|
|
140
|
+
"ghost",
|
|
141
|
+
"detach",
|
|
142
|
+
"switchClient",
|
|
143
|
+
"enter",
|
|
144
|
+
"settle",
|
|
145
|
+
"rollback",
|
|
146
|
+
"retire",
|
|
147
|
+
"authorizeTogether",
|
|
148
|
+
"maxTogetherRows"
|
|
149
|
+
]);
|
|
150
|
+
let i = v(t.tenantId), l = t.maxPhaseSteps;
|
|
151
|
+
(!Number.isSafeInteger(l) || l < 1 || l > 1024) && _();
|
|
152
|
+
let u = Object.getOwnPropertyDescriptor(t.leases, "tenantId");
|
|
153
|
+
(!u || !("value" in u) || u.value !== i) && _();
|
|
154
|
+
let d = S(t.states, "begin"), f = S(t.states, "advance"), p = S(t.states, "observe"), m = S(t.leases, "acquire"), h = S(t, "resolve"), g = S(t, "authorize"), w = (e, t) => C(() => g(e, Object.freeze(t))), T = Object.freeze(Object.fromEntries([
|
|
155
|
+
"guard",
|
|
156
|
+
"prepare",
|
|
157
|
+
"ghost",
|
|
158
|
+
"detach",
|
|
159
|
+
"switchClient",
|
|
160
|
+
"enter",
|
|
161
|
+
"settle",
|
|
162
|
+
"rollback"
|
|
163
|
+
].map((e) => [e, S(t, e)]))), E = (e, t, n, r, i, a) => o.suspend(() => {
|
|
164
|
+
let s = Object.freeze({
|
|
165
|
+
tenantId: n.origin.tenantId,
|
|
166
|
+
entityId: n.entityId,
|
|
167
|
+
transitionId: n.id,
|
|
168
|
+
revision: n.revision,
|
|
169
|
+
operation: t
|
|
170
|
+
}), l = {
|
|
171
|
+
active: !0,
|
|
172
|
+
renew: r,
|
|
173
|
+
...i ? { members: Object.freeze([...i]) } : {},
|
|
174
|
+
...a ? { tokens: a } : {}
|
|
175
|
+
};
|
|
176
|
+
return c.set(s, l), C(() => e(n, s)).pipe(o.ensuring(o.sync(() => {
|
|
177
|
+
l.active = !1, c.delete(s);
|
|
178
|
+
})));
|
|
179
|
+
}), D = (e, t, n, r, i) => E(T[e], e, t, n, r, i), O = (e) => {
|
|
180
|
+
let t = e.flatMap(([e, t]) => {
|
|
181
|
+
let n = a(t);
|
|
182
|
+
return n === void 0 ? [] : [[e, n]];
|
|
183
|
+
});
|
|
184
|
+
return t.length ? new Map(t) : void 0;
|
|
185
|
+
}, k = Object.getOwnPropertyDescriptor(t, "retire") === void 0 ? void 0 : S(t, "retire"), A = (e, t, n) => o.gen(function* () {
|
|
186
|
+
return e.phase !== "settled" && e.phase !== "rolledBack" && _(), k && (yield* t(), yield* E(k, "retire", e, t, void 0, n), yield* t()), e;
|
|
187
|
+
}), j = (t) => C(() => t.renew()).pipe(o.flatMap((t) => t === !0 ? o.void : o.fail(new e({ detail: "World transition lost its temporary lease" })))), M = (t, n) => o.uninterruptible(o.gen(function* () {
|
|
188
|
+
let r = yield* C(() => m(t));
|
|
189
|
+
if (s.isNone(r)) return yield* o.fail(new e({ detail: "World transition is already in progress" }));
|
|
190
|
+
let i = r.value;
|
|
191
|
+
return yield* n(i).pipe(o.ensuring(C(() => i.release()).pipe(o.orDie)));
|
|
192
|
+
})).pipe(o.catchDefect(() => o.fail(new e({ detail: "World transition execution remains incomplete" })))), N = (t, r, i) => C(() => o.gen(function* () {
|
|
193
|
+
if (t.group && i !== "switching" && !["committed", "settled"].includes(t.phase)) return yield* o.fail(new e({ detail: "Grouped World transition requires its complete coordinating operation" }));
|
|
194
|
+
let a = t, s = O([[t.entityId, r]]), c = (e) => j(r).pipe(o.flatMap(() => C(() => f({
|
|
195
|
+
origin: a.origin,
|
|
196
|
+
expectedRevision: a.revision,
|
|
197
|
+
phase: e
|
|
198
|
+
}))));
|
|
199
|
+
for (let e = 0; e < l; e++) {
|
|
200
|
+
if (a.phase === "settled" || a.phase === "rolledBack") return yield* A(a, () => j(r), s);
|
|
201
|
+
if (i === "switching" && (a.phase === "switching" || a.phase === "committed")) return a;
|
|
202
|
+
switch (yield* j(r), a.phase) {
|
|
203
|
+
case "requested":
|
|
204
|
+
yield* D("guard", a, () => j(r), void 0, s);
|
|
205
|
+
break;
|
|
206
|
+
case "reserving":
|
|
207
|
+
yield* D("prepare", a, () => j(r), void 0, s);
|
|
208
|
+
break;
|
|
209
|
+
case "ghosting":
|
|
210
|
+
yield* D("ghost", a, () => j(r), void 0, s);
|
|
211
|
+
break;
|
|
212
|
+
case "detaching":
|
|
213
|
+
yield* D("detach", a, () => j(r), void 0, s);
|
|
214
|
+
break;
|
|
215
|
+
case "switching":
|
|
216
|
+
yield* D("switchClient", a, () => j(r), void 0, s), yield* j(r), yield* D("enter", a, () => j(r), void 0, s);
|
|
217
|
+
break;
|
|
218
|
+
case "committed":
|
|
219
|
+
yield* D("settle", a, () => j(r), void 0, s);
|
|
220
|
+
break;
|
|
221
|
+
case "failed": yield* D("rollback", a, () => j(r), void 0, s);
|
|
222
|
+
}
|
|
223
|
+
let e = n(a.mode, a.phase);
|
|
224
|
+
if (e === null) return a;
|
|
225
|
+
a = yield* c(e);
|
|
226
|
+
}
|
|
227
|
+
return a.phase === "settled" || a.phase === "rolledBack" ? yield* A(a, () => j(r), s) : i === "switching" && (a.phase === "switching" || a.phase === "committed") ? a : yield* o.fail(new e({ detail: "World transition reached its phase-step budget" }));
|
|
228
|
+
})), P = (t) => C(() => p(t)).pipe(o.flatMap((t) => t === null ? o.fail(new e({ detail: "World transition request was not found" })) : o.succeed(t))), F = (t, n, r, a) => {
|
|
229
|
+
let s, c, l;
|
|
230
|
+
try {
|
|
231
|
+
l = x(a), s = ee(t), c = b(n, i);
|
|
232
|
+
} catch {
|
|
233
|
+
return o.fail(new e({ detail: "Invalid World transition command" }));
|
|
234
|
+
}
|
|
235
|
+
return w("transition", {
|
|
236
|
+
origin: c,
|
|
237
|
+
intent: s
|
|
238
|
+
}).pipe(o.flatMap(() => M(s.entityId, (e) => o.gen(function* () {
|
|
239
|
+
let t = yield* C(() => p(c)), n;
|
|
240
|
+
t === null ? (n = yield* C(() => h(s, c)), y(n, [
|
|
241
|
+
"tenantId",
|
|
242
|
+
"entityId",
|
|
243
|
+
"expectedRevision",
|
|
244
|
+
"source",
|
|
245
|
+
"target",
|
|
246
|
+
"data",
|
|
247
|
+
"sourceData",
|
|
248
|
+
"origin",
|
|
249
|
+
"mode",
|
|
250
|
+
"intent",
|
|
251
|
+
"expectedSubject"
|
|
252
|
+
]), (n.entityId !== s.entityId || n.tenantId !== i) && _(), n = {
|
|
253
|
+
...n,
|
|
254
|
+
origin: c,
|
|
255
|
+
intent: s
|
|
256
|
+
}) : n = {
|
|
257
|
+
tenantId: i,
|
|
258
|
+
entityId: t.entityId,
|
|
259
|
+
expectedRevision: t.requestedRevision,
|
|
260
|
+
source: t.source,
|
|
261
|
+
target: t.target,
|
|
262
|
+
data: t.data,
|
|
263
|
+
sourceData: t.sourceData,
|
|
264
|
+
mode: t.mode,
|
|
265
|
+
origin: c,
|
|
266
|
+
intent: s
|
|
267
|
+
}, l !== void 0 && (n = {
|
|
268
|
+
...n,
|
|
269
|
+
expectedSubject: l
|
|
270
|
+
}), yield* j(e);
|
|
271
|
+
let a = yield* C(() => d(n));
|
|
272
|
+
return yield* N(a, e, r);
|
|
273
|
+
}))));
|
|
274
|
+
}, I = (e, t) => F(e, t).pipe(o.asVoid), L = (e, t, n) => F(e, t, "switching", n), R = (t) => {
|
|
275
|
+
let n;
|
|
276
|
+
try {
|
|
277
|
+
n = b(t, i);
|
|
278
|
+
} catch {
|
|
279
|
+
return o.fail(new e({ detail: "Invalid World transition status scope" }));
|
|
280
|
+
}
|
|
281
|
+
return w("status", { origin: n }).pipe(o.flatMap(() => P(n)));
|
|
282
|
+
}, z = (t) => {
|
|
283
|
+
let n;
|
|
284
|
+
try {
|
|
285
|
+
n = b(t, i);
|
|
286
|
+
} catch {
|
|
287
|
+
return o.fail(new e({ detail: "Invalid World transition resume scope" }));
|
|
288
|
+
}
|
|
289
|
+
return w("resume", { origin: n }).pipe(o.flatMap(() => P(n)), o.flatMap((e) => M(e.entityId, (t) => P(e.origin).pipe(o.flatMap((e) => N(e, t))))));
|
|
290
|
+
}, B = (t, n, r) => {
|
|
291
|
+
let a, s, c;
|
|
292
|
+
try {
|
|
293
|
+
c = x(r), a = b(t, i), s = v(n, 120);
|
|
294
|
+
} catch {
|
|
295
|
+
return o.fail(new e({ detail: "Invalid World transition cancellation" }));
|
|
296
|
+
}
|
|
297
|
+
return w("cancel", {
|
|
298
|
+
origin: a,
|
|
299
|
+
reason: s
|
|
300
|
+
}).pipe(o.flatMap(() => P(a)), o.flatMap((t) => M(t.entityId, (t) => o.gen(function* () {
|
|
301
|
+
let n = yield* P(a);
|
|
302
|
+
return n.group ? yield* o.fail(new e({ detail: "Grouped World transition forbids individual cancellation" })) : c && (n.subject?.id !== c.id || n.subject?.kind !== c.kind) ? yield* o.fail(new e({ detail: "World cancellation belongs to another Subject" })) : n.phase === "committed" || n.phase === "settled" ? yield* o.fail(new e({ detail: "Committed World transition cannot roll back" })) : (n.phase !== "failed" && n.phase !== "rolledBack" && (yield* j(t), n = yield* C(() => f({
|
|
303
|
+
origin: a,
|
|
304
|
+
expectedRevision: n.revision,
|
|
305
|
+
phase: "failed",
|
|
306
|
+
failure: s
|
|
307
|
+
}))), yield* N(n, t));
|
|
308
|
+
}))));
|
|
309
|
+
}, te = (t, n) => {
|
|
310
|
+
let r, a;
|
|
311
|
+
try {
|
|
312
|
+
a = x(n), r = b(t, i);
|
|
313
|
+
} catch {
|
|
314
|
+
return o.fail(new e({ detail: "Invalid World client commit scope" }));
|
|
315
|
+
}
|
|
316
|
+
return w("resume", { origin: r }).pipe(o.flatMap(() => P(r)), o.flatMap((t) => M(t.entityId, (t) => P(r).pipe(o.flatMap((n) => a && (n.subject?.id !== a.id || n.subject?.kind !== a.kind) ? o.fail(new e({ detail: "World client commit belongs to another Subject" })) : n.phase === "switching" || n.phase === "committed" || n.phase === "settled" ? N(n, t) : o.fail(new e({ detail: "World client commit requires a prepared switching request" })))))));
|
|
317
|
+
}, V = Object.getOwnPropertyDescriptor(t.states, "commitBatch"), H = Object.getOwnPropertyDescriptor(t.states, "batchCommitRows");
|
|
318
|
+
(V && (!("value" in V) || typeof V.value != "function") || H && !("value" in H)) && _();
|
|
319
|
+
let U = H?.value;
|
|
320
|
+
(V !== void 0 != (H !== void 0) || H && (typeof U != "number" || !Number.isSafeInteger(U) || U < 1 || U >= 2147483647)) && _();
|
|
321
|
+
let W = V === void 0 ? void 0 : S(t.states, "commitBatch"), G = Object.getOwnPropertyDescriptor(t.states, "advanceGroup");
|
|
322
|
+
G && (!("value" in G) || typeof G.value != "function") && _();
|
|
323
|
+
let K = G === void 0 ? void 0 : S(t.states, "advanceGroup"), q = Object.getOwnPropertyDescriptor(t.states, "requiresGroupReadiness"), J = Object.getOwnPropertyDescriptor(t.states, "confirmGroupReady");
|
|
324
|
+
(q && (!("value" in q) || typeof q.value != "boolean") || J && (!("value" in J) || typeof J.value != "function") || q?.value === !0 && J === void 0) && _();
|
|
325
|
+
let Y = q?.value === !0, X = J === void 0 ? void 0 : S(t.states, "confirmGroupReady"), Z = t.authorizeTogether === void 0 ? void 0 : S(t, "authorizeTogether"), Q = t.maxTogetherRows;
|
|
326
|
+
(Z === void 0 != (Q === void 0) || Q !== void 0 && (!W || typeof U != "number" || !Number.isSafeInteger(Q) || Q < 1 || Q > 1024 || Q > U)) && _();
|
|
327
|
+
let $ = (e) => {
|
|
328
|
+
(!Z || Q === void 0 || typeof U != "number" || !Array.isArray(e) || Object.getPrototypeOf(e) !== Array.prototype || !e.length || e.length > Q || e.length > U || Reflect.ownKeys(e).length !== e.length + 1) && _();
|
|
329
|
+
let t = /* @__PURE__ */ new Set(), n = [];
|
|
330
|
+
for (let r = 0; r < e.length; r++) {
|
|
331
|
+
let a = Object.getOwnPropertyDescriptor(e, String(r));
|
|
332
|
+
(!a?.enumerable || !("value" in a)) && _();
|
|
333
|
+
let o = a.value;
|
|
334
|
+
y(o, ["origin", "expectedSubject"]);
|
|
335
|
+
let s = b(o.origin, i), c = x(o.expectedSubject), l = JSON.stringify(s);
|
|
336
|
+
t.has(l) && _(), t.add(l), n.push(Object.freeze({
|
|
337
|
+
origin: s,
|
|
338
|
+
...c === void 0 ? {} : { expectedSubject: c }
|
|
339
|
+
}));
|
|
340
|
+
}
|
|
341
|
+
return Object.freeze(n);
|
|
342
|
+
};
|
|
343
|
+
return Object.freeze({
|
|
344
|
+
transition: I,
|
|
345
|
+
prepare: L,
|
|
346
|
+
prepareTogether: (t) => {
|
|
347
|
+
let i;
|
|
348
|
+
try {
|
|
349
|
+
i = $(t);
|
|
350
|
+
} catch {
|
|
351
|
+
return o.fail(new e({ detail: "World group preparation requires bounded complete authority" }));
|
|
352
|
+
}
|
|
353
|
+
return C(() => o.uninterruptible(o.gen(function* () {
|
|
354
|
+
yield* C(() => Z(i));
|
|
355
|
+
for (let e of i) yield* w("resume", { origin: e.origin });
|
|
356
|
+
let t = [];
|
|
357
|
+
for (let e of i) t.push(yield* P(e.origin));
|
|
358
|
+
let a = r(t);
|
|
359
|
+
(!a || new Set(t.map((e) => e.entityId)).size !== t.length) && _();
|
|
360
|
+
let s = [...t].sort((e, t) => e.entityId < t.entityId ? -1 : 1), c = (u, d) => u < s.length ? M(s[u].entityId, (e) => c(u + 1, [...d, e])) : C(() => o.gen(function* () {
|
|
361
|
+
let c = () => o.gen(function* () {
|
|
362
|
+
for (let e of d) yield* j(e);
|
|
363
|
+
}), u = O(s.map((e, t) => [e.entityId, d[t]])), p = [];
|
|
364
|
+
for (let e = 0; e < i.length; e++) {
|
|
365
|
+
let n = i[e], r = yield* P(n.origin);
|
|
366
|
+
(r.id !== t[e].id || r.entityId !== t[e].entityId || n.expectedSubject && (r.subject?.id !== n.expectedSubject.id || r.subject?.kind !== n.expectedSubject.kind) || [
|
|
367
|
+
"failed",
|
|
368
|
+
"rolledBack",
|
|
369
|
+
"committed",
|
|
370
|
+
"settled"
|
|
371
|
+
].includes(r.phase)) && _(), p.push(r);
|
|
372
|
+
}
|
|
373
|
+
JSON.stringify(r(p)) !== JSON.stringify(a) && _();
|
|
374
|
+
for (let e = 0; e < l; e++) {
|
|
375
|
+
if (p.every((e) => e.phase === "switching")) return Object.freeze([...p]);
|
|
376
|
+
for (let e = 0; e < p.length; e++) {
|
|
377
|
+
let t = p[e];
|
|
378
|
+
if (t.phase === "switching" || t.phase !== "requested" && p.some((e) => e.phase === "requested")) continue;
|
|
379
|
+
let i = t.phase === "requested" ? "guard" : t.phase === "reserving" ? "prepare" : t.phase === "ghosting" ? "ghost" : t.phase === "detaching" ? "detach" : void 0;
|
|
380
|
+
yield* c(), i && (yield* D(i, t, c, p, u)), yield* c();
|
|
381
|
+
let o = n(t.mode, t.phase);
|
|
382
|
+
(!o || o === "committed") && _();
|
|
383
|
+
let s = yield* C(() => f({
|
|
384
|
+
origin: t.origin,
|
|
385
|
+
expectedRevision: t.revision,
|
|
386
|
+
phase: o
|
|
387
|
+
}));
|
|
388
|
+
(s.id !== t.id || s.entityId !== t.entityId || s.phase !== o || s.revision !== t.revision + 1) && _(), p[e] = s, JSON.stringify(r(p)) !== JSON.stringify(a) && _();
|
|
389
|
+
}
|
|
390
|
+
}
|
|
391
|
+
return p.every((e) => e.phase === "switching") ? Object.freeze([...p]) : yield* o.fail(new e({ detail: "World group preparation reached its phase-step budget" }));
|
|
392
|
+
}));
|
|
393
|
+
return yield* c(0, []);
|
|
394
|
+
})));
|
|
395
|
+
},
|
|
396
|
+
commit: te,
|
|
397
|
+
commitTogether: (t) => {
|
|
398
|
+
let n;
|
|
399
|
+
try {
|
|
400
|
+
W || _(), n = $(t);
|
|
401
|
+
} catch {
|
|
402
|
+
return o.fail(new e({ detail: "World common commit requires actual complete batch and group authorization providers" }));
|
|
403
|
+
}
|
|
404
|
+
return C(() => o.uninterruptible(o.gen(function* () {
|
|
405
|
+
yield* C(() => Z(n));
|
|
406
|
+
for (let e of n) yield* w("resume", { origin: e.origin });
|
|
407
|
+
let e = [];
|
|
408
|
+
for (let t of n) e.push(yield* P(t.origin));
|
|
409
|
+
new Set(e.map((e) => e.entityId)).size !== e.length && _(), r(e);
|
|
410
|
+
let t = [...e].sort((e, t) => e.entityId < t.entityId ? -1 : 1), i = (a, s) => a < t.length ? M(t[a].entityId, (e) => i(a + 1, [...s, e])) : C(() => o.gen(function* () {
|
|
411
|
+
let i = () => o.gen(function* () {
|
|
412
|
+
for (let e of s) yield* j(e);
|
|
413
|
+
}), a = O(t.map((e, t) => [e.entityId, s[t]])), c = [];
|
|
414
|
+
for (let t = 0; t < n.length; t++) {
|
|
415
|
+
let r = n[t], i = yield* P(r.origin);
|
|
416
|
+
(i.id !== e[t].id || i.entityId !== e[t].entityId || r.expectedSubject && (i.subject?.id !== r.expectedSubject.id || i.subject?.kind !== r.expectedSubject.kind)) && _(), [
|
|
417
|
+
"switching",
|
|
418
|
+
"committed",
|
|
419
|
+
"settled"
|
|
420
|
+
].includes(i.phase) || _(), c.push(i);
|
|
421
|
+
}
|
|
422
|
+
let l = r(c), u = c.every((e) => e.phase === "switching"), d = c.every((e) => e.phase === "committed" || e.phase === "settled");
|
|
423
|
+
if (!u && !d && _(), u && (l !== void 0 && Y || c.some((e) => e.group?.requiresReadiness || e.ready !== void 0)) && (X || _(), yield* i(), yield* C(() => X(c.map((e) => e.origin)))), u) for (let e of c) yield* i(), yield* D("switchClient", e, i, c, a), yield* i(), yield* D("enter", e, i, c, a);
|
|
424
|
+
yield* i();
|
|
425
|
+
let p = yield* C(() => W(c.map((e) => ({
|
|
426
|
+
origin: e.origin,
|
|
427
|
+
expectedRevision: e.revision - (e.phase === "settled" ? 2 : +(e.phase === "committed"))
|
|
428
|
+
}))));
|
|
429
|
+
p.length !== n.length && _();
|
|
430
|
+
let m = [];
|
|
431
|
+
for (let e = 0; e < p.length; e++) {
|
|
432
|
+
let t = p[e];
|
|
433
|
+
(t.id !== c[e].id || t.phase !== "committed" && t.phase !== "settled" || t.result === null) && _(), t.phase === "committed" && (yield* i(), yield* D("settle", t, i, void 0, a), yield* i(), t = yield* C(() => f({
|
|
434
|
+
origin: t.origin,
|
|
435
|
+
expectedRevision: t.revision,
|
|
436
|
+
phase: "settled"
|
|
437
|
+
}))), m.push(t);
|
|
438
|
+
}
|
|
439
|
+
for (let e of m) yield* A(e, i, a);
|
|
440
|
+
return Object.freeze(m);
|
|
441
|
+
}));
|
|
442
|
+
return yield* i(0, []);
|
|
443
|
+
})));
|
|
444
|
+
},
|
|
445
|
+
cancelTogether: (t, n) => {
|
|
446
|
+
let i, a;
|
|
447
|
+
try {
|
|
448
|
+
K || _(), i = $(t), a = v(n, 120);
|
|
449
|
+
} catch {
|
|
450
|
+
return o.fail(new e({ detail: "World group cancellation requires actual complete source and authority providers" }));
|
|
451
|
+
}
|
|
452
|
+
return C(() => o.uninterruptible(o.gen(function* () {
|
|
453
|
+
yield* C(() => Z(i));
|
|
454
|
+
for (let e of i) yield* w("cancel", {
|
|
455
|
+
origin: e.origin,
|
|
456
|
+
reason: a
|
|
457
|
+
});
|
|
458
|
+
let e = [];
|
|
459
|
+
for (let t of i) e.push(yield* P(t.origin));
|
|
460
|
+
(r(e) === void 0 || new Set(e.map((e) => e.entityId)).size !== e.length) && _();
|
|
461
|
+
let t = [...e].sort((e, t) => e.entityId < t.entityId ? -1 : 1), n = (s, c) => s < t.length ? M(t[s].entityId, (e) => n(s + 1, [...c, e])) : C(() => o.gen(function* () {
|
|
462
|
+
let n = () => o.gen(function* () {
|
|
463
|
+
for (let e of c) yield* j(e);
|
|
464
|
+
}), s = O(t.map((e, t) => [e.entityId, c[t]])), l = [];
|
|
465
|
+
for (let t = 0; t < i.length; t++) {
|
|
466
|
+
let n = i[t], r = yield* P(n.origin);
|
|
467
|
+
(r.id !== e[t].id || r.entityId !== e[t].entityId || n.expectedSubject && (r.subject?.id !== n.expectedSubject.id || r.subject?.kind !== n.expectedSubject.kind) || r.phase === "committed" || r.phase === "settled") && _(), l.push(r);
|
|
468
|
+
}
|
|
469
|
+
r(l) === void 0 && _();
|
|
470
|
+
let u = (t) => C(() => o.gen(function* () {
|
|
471
|
+
let i = l.map((e) => ({
|
|
472
|
+
origin: e.origin,
|
|
473
|
+
expectedRevision: e.revision - t
|
|
474
|
+
})), o = yield* C(() => K({
|
|
475
|
+
phase: "rolledBack",
|
|
476
|
+
members: i
|
|
477
|
+
}));
|
|
478
|
+
(o.length !== l.length || o.some((e, t) => e.id !== l[t].id || e.entityId !== l[t].entityId || e.phase !== "rolledBack" || e.failure !== a || e.revision !== i[t].expectedRevision + 1) || JSON.stringify(r(o)) !== JSON.stringify(r(e))) && _();
|
|
479
|
+
for (let e of o) yield* A(e, n, s);
|
|
480
|
+
return o;
|
|
481
|
+
}));
|
|
482
|
+
if (l.every((e) => e.phase === "rolledBack" && e.failure === a)) return yield* n(), yield* u(1);
|
|
483
|
+
(l.some((e) => e.phase === "rolledBack") || l.some((e) => e.phase === "failed" && e.failure !== a) || l.some((e) => e.phase === "failed") && !l.every((e) => e.phase === "failed")) && _(), l.every((e) => e.phase === "failed") || (yield* n(), l = [...yield* C(() => K({
|
|
484
|
+
phase: "failed",
|
|
485
|
+
failure: a,
|
|
486
|
+
members: l.map((e) => ({
|
|
487
|
+
origin: e.origin,
|
|
488
|
+
expectedRevision: e.revision
|
|
489
|
+
}))
|
|
490
|
+
}))]), (l.length !== i.length || l.some((t, n) => t.id !== e[n].id || t.phase !== "failed" || t.failure !== a)) && _(), JSON.stringify(r(l)) !== JSON.stringify(r(e)) && _();
|
|
491
|
+
for (let e of l) yield* n(), yield* D("rollback", e, n, l, s);
|
|
492
|
+
return yield* n(), yield* u(0);
|
|
493
|
+
}));
|
|
494
|
+
return yield* n(0, []);
|
|
495
|
+
})));
|
|
496
|
+
},
|
|
497
|
+
resume: z,
|
|
498
|
+
cancel: B,
|
|
499
|
+
status: R
|
|
500
|
+
});
|
|
501
|
+
}, T = (e, n) => {
|
|
502
|
+
let r = v(e), i = S(n, "transition");
|
|
503
|
+
return Object.freeze({
|
|
504
|
+
run: Object.freeze({ [r]: (e, n) => C(() => i(t(e), n)) }),
|
|
505
|
+
publish: Object.freeze({})
|
|
506
|
+
});
|
|
507
|
+
}, E = (t) => (n, r) => o.suspend(() => {
|
|
508
|
+
if (!n.length || n.some((e) => e.origin.tenantId !== n[0].origin.tenantId)) return o.fail(new e({ detail: "World recovery compensation requires one tenant" }));
|
|
509
|
+
let i = t(n[0].origin.tenantId, r);
|
|
510
|
+
if (n[0].group) return i.cancelTogether(n.map((e) => ({
|
|
511
|
+
origin: e.origin,
|
|
512
|
+
...e.subject ? { expectedSubject: e.subject } : {}
|
|
513
|
+
})), "room_owner_recovery").pipe(o.asVoid);
|
|
514
|
+
if (n.length !== 1) return o.fail(new e({ detail: "Ungrouped World recovery compensation requires one transition" }));
|
|
515
|
+
let a = n[0];
|
|
516
|
+
return i.cancel(a.origin, "room_owner_recovery", a.subject ?? void 0).pipe(o.asVoid);
|
|
517
|
+
});
|
|
518
|
+
//#endregion
|
|
519
|
+
export { g as admitWorldTransitionStep, l as assertWorldTransitionExecution, w as makeWorldTransitionExecutor, d as withWorldTransitionGroupMember, E as worldRecoveryTransitionCompensation, T as worldSingleTransitionCommandBindings, u as worldTransitionExecutionGroup, p as worldTransitionExecutionGroupTokens, f as worldTransitionExecutionLeaseToken };
|
|
@@ -0,0 +1,113 @@
|
|
|
1
|
+
import { ProtocolError as e } from "./errors.js";
|
|
2
|
+
import { createHash as t } from "node:crypto";
|
|
3
|
+
//#region src/worldTransitionGroup.ts
|
|
4
|
+
function n() {
|
|
5
|
+
throw new e({ detail: "World transition group receipt or membership is invalid" });
|
|
6
|
+
}
|
|
7
|
+
var r = (e, t) => {
|
|
8
|
+
if (!e || typeof e != "object" || Object.getPrototypeOf(e) !== Object.prototype || Reflect.ownKeys(e).length !== t.length) return n();
|
|
9
|
+
let r = Object.getOwnPropertyDescriptors(e);
|
|
10
|
+
return t.some((e) => !r[e] || !Object.hasOwn(r[e], "value")) ? n() : Object.fromEntries(t.map((e) => [e, r[e].value]));
|
|
11
|
+
}, i = (e, t = 191) => typeof e == "string" && e.length <= t && /^[A-Za-z0-9][A-Za-z0-9_.:-]*$/.test(e) ? e : n(), a = (e) => typeof e == "number" && Number.isSafeInteger(e) && e > 0 && e < 2147483647 ? e : n(), o = (e) => t("sha256").update(JSON.stringify(e)).digest("hex"), s = (e) => JSON.stringify([
|
|
12
|
+
e.tenantId,
|
|
13
|
+
e.roomId,
|
|
14
|
+
e.requestId
|
|
15
|
+
]), c = (e, t) => {
|
|
16
|
+
let o = r(e, [
|
|
17
|
+
"tenantId",
|
|
18
|
+
"requestId",
|
|
19
|
+
"members"
|
|
20
|
+
]), c = i(o.tenantId), l = i(o.requestId, 384), u = o.members;
|
|
21
|
+
if (!Array.isArray(u) || !Number.isSafeInteger(t) || t < 1 || u.length < 1 || u.length > t || Reflect.ownKeys(u).length !== u.length + 1) return n();
|
|
22
|
+
let d = /* @__PURE__ */ new Set(), f = /* @__PURE__ */ new Set(), p = [];
|
|
23
|
+
for (let e = 0; e < u.length; e++) {
|
|
24
|
+
let t = Object.getOwnPropertyDescriptor(u, e);
|
|
25
|
+
if (!t || !Object.hasOwn(t, "value")) return n();
|
|
26
|
+
let o = r(t.value, [
|
|
27
|
+
"origin",
|
|
28
|
+
"expectedRevision",
|
|
29
|
+
"subject"
|
|
30
|
+
]), l = r(o.origin, [
|
|
31
|
+
"tenantId",
|
|
32
|
+
"roomId",
|
|
33
|
+
"requestId"
|
|
34
|
+
]), m = Object.freeze({
|
|
35
|
+
tenantId: i(l.tenantId),
|
|
36
|
+
roomId: i(l.roomId),
|
|
37
|
+
requestId: i(l.requestId, 384)
|
|
38
|
+
}), h = r(o.subject, ["id", "kind"]);
|
|
39
|
+
if (h.kind !== "guest" && h.kind !== "user") return n();
|
|
40
|
+
let g = Object.freeze({
|
|
41
|
+
id: i(h.id),
|
|
42
|
+
kind: h.kind
|
|
43
|
+
});
|
|
44
|
+
if (m.tenantId !== c || d.has(s(m)) || f.has(g.id)) return n();
|
|
45
|
+
d.add(s(m)), f.add(g.id), p.push(Object.freeze({
|
|
46
|
+
origin: m,
|
|
47
|
+
expectedRevision: a(o.expectedRevision),
|
|
48
|
+
subject: g
|
|
49
|
+
}));
|
|
50
|
+
}
|
|
51
|
+
return p.sort((e, t) => s(e.origin) < s(t.origin) ? -1 : 1), Object.freeze({
|
|
52
|
+
tenantId: c,
|
|
53
|
+
requestId: l,
|
|
54
|
+
members: Object.freeze(p)
|
|
55
|
+
});
|
|
56
|
+
}, l = (e, t = !1) => {
|
|
57
|
+
if (typeof t != "boolean") return n();
|
|
58
|
+
let r = c(e, e.members.length), i = o([
|
|
59
|
+
"world-transition-group-v1",
|
|
60
|
+
r.tenantId,
|
|
61
|
+
r.requestId,
|
|
62
|
+
r.members.map((e) => e.origin)
|
|
63
|
+
]);
|
|
64
|
+
return Object.freeze(r.members.map((e, n) => Object.freeze({
|
|
65
|
+
requiresReadiness: t,
|
|
66
|
+
key: i,
|
|
67
|
+
digest: o(r),
|
|
68
|
+
requestId: r.requestId,
|
|
69
|
+
size: r.members.length,
|
|
70
|
+
ordinal: n,
|
|
71
|
+
boundRevision: e.expectedRevision
|
|
72
|
+
})));
|
|
73
|
+
}, u = (e) => {
|
|
74
|
+
let t = r(e, [
|
|
75
|
+
"requiresReadiness",
|
|
76
|
+
"key",
|
|
77
|
+
"digest",
|
|
78
|
+
"requestId",
|
|
79
|
+
"size",
|
|
80
|
+
"ordinal",
|
|
81
|
+
"boundRevision"
|
|
82
|
+
]), o = a(t.size), s = t.ordinal;
|
|
83
|
+
return typeof t.requiresReadiness != "boolean" || typeof t.key != "string" || !/^[a-f0-9]{64}$/.test(t.key) || typeof t.digest != "string" || !/^[a-f0-9]{64}$/.test(t.digest) || typeof s != "number" || !Number.isSafeInteger(s) || s < 0 || s >= o ? n() : Object.freeze({
|
|
84
|
+
requiresReadiness: t.requiresReadiness,
|
|
85
|
+
key: t.key,
|
|
86
|
+
digest: t.digest,
|
|
87
|
+
requestId: i(t.requestId, 384),
|
|
88
|
+
size: o,
|
|
89
|
+
ordinal: s,
|
|
90
|
+
boundRevision: a(t.boundRevision)
|
|
91
|
+
});
|
|
92
|
+
}, d = (e) => {
|
|
93
|
+
if (!e.length) return n();
|
|
94
|
+
if (e.every((e) => e.group === void 0)) return;
|
|
95
|
+
let t = e[0].group;
|
|
96
|
+
if (!t || t.size !== e.length || e.some((e) => !e.group || e.subject === null)) return n();
|
|
97
|
+
let r = c({
|
|
98
|
+
tenantId: e[0].origin.tenantId,
|
|
99
|
+
requestId: t.requestId,
|
|
100
|
+
members: e.map((e) => ({
|
|
101
|
+
origin: e.origin,
|
|
102
|
+
expectedRevision: e.group.boundRevision,
|
|
103
|
+
subject: e.subject
|
|
104
|
+
}))
|
|
105
|
+
}, e.length), i = l(r, t.requiresReadiness);
|
|
106
|
+
for (let t of e) {
|
|
107
|
+
let e = r.members.findIndex((e) => s(e.origin) === s(t.origin)), a = u(t.group), o = i[e];
|
|
108
|
+
if (!o || t.revision <= a.boundRevision || Object.keys(o).some((e) => a[e] !== o[e])) return n();
|
|
109
|
+
}
|
|
110
|
+
return r;
|
|
111
|
+
};
|
|
112
|
+
//#endregion
|
|
113
|
+
export { c as captureWorldTransitionGroup, u as captureWorldTransitionGroupReceipt, d as worldTransitionGroupFromRecords, l as worldTransitionGroupReceipts };
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
import { Effect as e } from "effect";
|
|
2
|
+
//#region src/worldTransitionPhysicalSteps.ts
|
|
3
|
+
var t = (t) => {
|
|
4
|
+
let { rooms: n, seats: r, maxBytes: i } = t, a = (e, t, r, a, o) => n.step({
|
|
5
|
+
tenantId: t.origin.tenantId,
|
|
6
|
+
roomId: e.roomId,
|
|
7
|
+
epoch: e.epoch,
|
|
8
|
+
origin: t.origin,
|
|
9
|
+
action: r,
|
|
10
|
+
maxBytes: i,
|
|
11
|
+
...o === void 0 ? {} : { receipt: o }
|
|
12
|
+
}, a);
|
|
13
|
+
return Object.freeze({
|
|
14
|
+
guard: () => e.void,
|
|
15
|
+
prepare: (t, n) => a(t.source, t, "snapshot", n).pipe(e.andThen(r.prepare(t.origin, n)), e.andThen(a(t.target, t, "preview", n))),
|
|
16
|
+
ghost: (e, t) => a(e.target, e, "ghost", t),
|
|
17
|
+
detach: (e, t) => a(e.source, e, "detach", t),
|
|
18
|
+
switchClient: (t, n) => t.mode === "seamless" ? a(t.source, t, "detach", n) : e.void,
|
|
19
|
+
enter: (e, t) => a(e.target, e, "preview", t),
|
|
20
|
+
settle: (e, t) => a(e.target, e, "commit", t),
|
|
21
|
+
rollback: (t, n) => r.rollback(t.origin, n).pipe(e.andThen(a(t.source, t, "restore", n))),
|
|
22
|
+
retire: (t, n) => e.forEach([
|
|
23
|
+
"enter",
|
|
24
|
+
"exit",
|
|
25
|
+
"ghost"
|
|
26
|
+
], (r) => e.forEach([t.source, t.target], (e) => a(e, t, "retire", n, {
|
|
27
|
+
requestId: `${t.id}:${r}`,
|
|
28
|
+
operation: r
|
|
29
|
+
}), { discard: !0 }), { discard: !0 })
|
|
30
|
+
});
|
|
31
|
+
}, n = (e, t) => (n, r) => e.step({
|
|
32
|
+
tenantId: n.origin.tenantId,
|
|
33
|
+
roomId: n.target.roomId,
|
|
34
|
+
epoch: n.target.epoch,
|
|
35
|
+
origin: n.origin,
|
|
36
|
+
action: "withdraw",
|
|
37
|
+
maxBytes: t
|
|
38
|
+
}, r);
|
|
39
|
+
//#endregion
|
|
40
|
+
export { t as worldTransitionPhysicalSteps, n as worldTransitionSeatWithdrawal };
|