@voltro/plugin-rooms 0.87.0 → 0.89.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 +272 -6
- package/THIRD-PARTY-NOTICES.md +1542 -368
- package/dist/actor.js +1 -2
- package/dist/apiBinding.js +1 -2
- package/dist/apiRegistryBinding.js +1 -2
- package/dist/apiReservations.js +3 -4
- package/dist/baselines.js +1 -2
- package/dist/bots.js +2 -3
- package/dist/catalog.js +1 -2
- package/dist/checkpointJson.js +1 -2
- package/dist/checkpointStore.js +13 -14
- package/dist/client.js +1 -2
- package/dist/clockSync.js +1 -2
- package/dist/collision.js +3 -4
- package/dist/commandDelivery.js +1 -2
- package/dist/commandRecord.js +1 -2
- package/dist/commandWithdrawal.js +1 -2
- package/dist/connection.js +1 -2
- package/dist/controlCarrier.js +1 -2
- package/dist/controlRegistry.js +1 -2
- package/dist/controlTarget.js +1 -2
- package/dist/controlTransport.js +1 -2
- package/dist/developmentBinding.js +1 -2
- package/dist/directory.js +3 -4
- package/dist/directoryProjection.js +1 -2
- package/dist/errors.js +1 -2
- package/dist/fixed32.js +1 -2
- package/dist/fixedCollision.js +1 -2
- package/dist/fixedCollision32.js +1 -2
- package/dist/fixedMath.js +1 -2
- package/dist/fixedRaw.js +1 -2
- package/dist/fixedSlabs.js +1 -2
- package/dist/fixedTrig.js +1 -2
- package/dist/fixedTrig32.js +1 -2
- package/dist/fixedVectors.js +1 -2
- package/dist/fixedVectors32.js +1 -2
- package/dist/fixedWide.js +1 -2
- package/dist/fixedWords.js +1 -2
- package/dist/gateway.js +1 -2
- package/dist/geometryActivation.js +1 -2
- package/dist/geometryActorInventory.js +1 -2
- package/dist/geometryAdminClient.js +1 -2
- package/dist/geometryAdminData.js +1 -2
- package/dist/geometryAdminFixtures.js +1 -2
- package/dist/geometryAdminPorts.js +1 -2
- package/dist/geometryAdminRpc.js +1 -2
- package/dist/geometryAdminRpcRoutes.js +1 -2
- package/dist/geometryAdminSchemas.js +1 -2
- package/dist/geometryAdministration.js +1 -2
- package/dist/geometryAdministrationPorts.js +1 -2
- package/dist/geometryApiBinding.js +1 -2
- package/dist/geometryAppStorage.js +1 -2
- package/dist/geometryArtifacts.js +1 -2
- package/dist/geometryAssetBundle.js +1 -2
- package/dist/geometryAssetClient.js +1 -2
- package/dist/geometryAssetData.js +1 -2
- package/dist/geometryAssetHttp.js +1 -2
- package/dist/geometryAssetPorts.js +1 -2
- package/dist/geometryAssetRpc.js +1 -2
- package/dist/geometryAssetRpcRoutes.js +1 -2
- package/dist/geometryAssetStorageGrant.js +1 -2
- package/dist/geometryBoxOverlap.js +1 -2
- package/dist/geometryCatalogueDigest.js +1 -2
- package/dist/geometryCellCoverage.js +1 -2
- package/dist/geometryCellLoader.js +1 -2
- package/dist/geometryChannel.js +1 -2
- package/dist/geometryChunkHttp.js +1 -2
- package/dist/geometryChunkLeases.js +1 -2
- package/dist/geometryClient.js +1 -2
- package/dist/geometryClientChunks.js +1 -2
- package/dist/geometryClientDelta.js +1 -2
- package/dist/geometryClientHttp.js +1 -2
- package/dist/geometryClientInterest.js +1 -2
- package/dist/geometryClientStatic.js +1 -2
- package/dist/geometryCms.js +1 -2
- package/dist/geometryCommitCoordinator.js +1 -2
- package/dist/geometryCompactionFixture.js +1 -2
- package/dist/geometryCompactionStrategies.js +1 -2
- package/dist/geometryConnectionClient.js +1 -2
- package/dist/geometryDerivationFixtures.js +1 -2
- package/dist/geometryDerivationStrategies.js +1 -2
- package/dist/geometryDigest.js +1 -2
- package/dist/geometryEditChannel.js +1 -2
- package/dist/geometryEditIngress.js +1 -2
- package/dist/geometryEdits.js +1 -2
- package/dist/geometryEnvelope.js +1 -2
- package/dist/geometryGridRaycast.js +1 -2
- package/dist/geometryGridSweep.js +1 -2
- package/dist/geometryHeightfield.js +1 -2
- package/dist/geometryHeightfieldRaycast.js +1 -2
- package/dist/geometryHeightfieldSweep.js +1 -2
- package/dist/geometryHeightfieldVolume.js +1 -2
- package/dist/geometryHost.js +2 -3
- package/dist/geometryHostDirectory.js +1 -2
- package/dist/geometryHostMutations.js +1 -2
- package/dist/geometryHostStreams.js +1 -2
- package/dist/geometryHttpBody.js +1 -2
- package/dist/geometryHttpRoutes.js +1 -2
- package/dist/geometryImportGltf.js +1 -2
- package/dist/geometryImportLdtk.js +1 -2
- package/dist/geometryImportPng.js +1 -2
- package/dist/geometryImportPublication.js +1 -2
- package/dist/geometryImportTiled.js +1 -2
- package/dist/geometryImportTiles.js +1 -2
- package/dist/geometryImportVox.js +1 -2
- package/dist/geometryImportedSource.js +1 -2
- package/dist/geometryInspectEndpoint.js +1 -2
- package/dist/geometryInspection.js +1 -2
- package/dist/geometryInstall.js +1 -2
- package/dist/geometryJournalArchiveData.js +1 -2
- package/dist/geometryJournalArchiveIndex.js +2 -3
- package/dist/geometryJournalArchiveTable.js +1 -2
- package/dist/geometryJournalCompaction.js +1 -2
- package/dist/geometryJournalPatch.js +1 -2
- package/dist/geometryJournalRetention.js +1 -2
- package/dist/geometryJournalRetentionSchemas.js +1 -2
- package/dist/geometryJournalRetentionSweep.js +1 -2
- package/dist/geometryJournalRetentionWorkflow.js +1 -2
- package/dist/geometryJournalRetentionWorkflowData.js +1 -2
- package/dist/geometryJournalStorage.js +1 -2
- package/dist/geometryLoader.js +1 -2
- package/dist/geometryManifest.js +1 -2
- package/dist/geometryManifestChannel.js +1 -2
- package/dist/geometryManifestClient.js +1 -2
- package/dist/geometryManifestData.js +1 -2
- package/dist/geometryManifestPorts.js +1 -2
- package/dist/geometryManifestPublication.js +1 -2
- package/dist/geometryManifestSource.js +1 -2
- package/dist/geometryMigrationJournal.js +1 -2
- package/dist/geometryMigrationStrategies.js +1 -2
- package/dist/geometryMigrations.js +1 -2
- package/dist/geometryNativeMetadata.js +1 -2
- package/dist/geometryPatch.js +1 -2
- package/dist/geometryPersistence.js +1 -2
- package/dist/geometryPersistenceCapture.js +1 -2
- package/dist/geometryPersistenceData.js +1 -2
- package/dist/geometryPersistencePorts.js +1 -2
- package/dist/geometryPlayerAdmission.js +1 -2
- package/dist/geometryPlayerEditOwner.js +1 -2
- package/dist/geometryPlayerEdits.js +1 -2
- package/dist/geometryPrepared.js +1 -2
- package/dist/geometryPrivacyFence.js +1 -2
- package/dist/geometryProceduralPublication.js +1 -2
- package/dist/geometryProceduralWorker.js +1 -2
- package/dist/geometryPublication.js +1 -2
- package/dist/geometryRayAlgebra.js +1 -2
- package/dist/geometryReadClient.js +1 -2
- package/dist/geometryReadPorts.js +1 -2
- package/dist/geometryReadRpc.js +1 -2
- package/dist/geometryReadRpcRoutes.js +1 -2
- package/dist/geometryReliablePublication.js +1 -2
- package/dist/geometryReloadPorts.js +1 -2
- package/dist/geometryReloadSource.js +1 -2
- package/dist/geometryRenderCache.js +1 -2
- package/dist/geometryRenderLod.js +1 -2
- package/dist/geometryRollback.js +1 -2
- package/dist/geometryRollbackCoordinator.js +2 -3
- package/dist/geometryRollbackPorts.js +1 -2
- package/dist/geometryRollbackSource.js +1 -2
- package/dist/geometryRollbackStore.js +1 -2
- package/dist/geometrySchemas.js +1 -2
- package/dist/geometryShapeRaycast.js +1 -2
- package/dist/geometryShapeSegments.js +1 -2
- package/dist/geometryShapes.js +1 -2
- package/dist/geometrySnapshot.js +1 -2
- package/dist/geometrySnapshotChannel.js +1 -2
- package/dist/geometrySnapshotClient.js +1 -2
- package/dist/geometrySnapshotPreparation.js +1 -2
- package/dist/geometrySnapshotServer.js +1 -2
- package/dist/geometrySqlOwner.js +1 -2
- package/dist/geometryStorage.js +1 -2
- package/dist/geometryStorageGrant.js +1 -2
- package/dist/geometryStorageIdentity.js +1 -2
- package/dist/geometryTileArtifact.js +1 -2
- package/dist/geometryTileCodec.js +1 -2
- package/dist/geometryTileCollision.js +1 -2
- package/dist/geometryTileNavigation.js +1 -2
- package/dist/geometryTileView.js +1 -2
- package/dist/geometryVersionActivation.js +1 -2
- package/dist/geometryVersionClient.js +1 -2
- package/dist/geometryVersionCompare.js +1 -2
- package/dist/geometryVersionMigration.js +1 -2
- package/dist/geometryVoxel.js +1 -2
- package/dist/geometryWorldEntitySubject.js +1 -2
- package/dist/geometryWorldExtent.js +1 -2
- package/dist/geometryWorldMetadata.js +1 -2
- package/dist/geometryWorldStrategyFixtures.js +1 -2
- package/dist/geometryWorldView.js +1 -2
- package/dist/host.js +1 -2
- package/dist/hostBinding.js +1 -2
- package/dist/hostCellObservation.js +1 -2
- package/dist/hostClientCapacity.js +1 -2
- package/dist/hostCommandScope.js +1 -2
- package/dist/hostController.js +2 -3
- package/dist/hostDeployment.js +1 -2
- package/dist/hostDrain.js +1 -2
- package/dist/hostDrainPorts.js +1 -2
- package/dist/hostDriver.js +1 -2
- package/dist/hostLane.js +1 -2
- package/dist/hostListener.js +1 -2
- package/dist/hostListenerBinding.js +1 -2
- package/dist/hostLoopObservation.js +1 -2
- package/dist/hostMetrics.js +1 -2
- package/dist/hostRegistryBinding.js +1 -2
- package/dist/hostSelection.js +1 -2
- package/dist/hostShutdown.js +1 -2
- package/dist/hostTurnObservation.js +1 -2
- package/dist/identities.js +1 -2
- package/dist/index.js +1 -2
- package/dist/inputReceipts.js +1 -2
- package/dist/inputRedundancy.js +1 -2
- package/dist/inspect.js +1 -2
- package/dist/lockstep.js +1 -2
- package/dist/lockstepAdmission.js +1 -2
- package/dist/lockstepAdmissionCodec.js +1 -2
- package/dist/lockstepAdmissionPorts.js +1 -2
- package/dist/lockstepClientSession.js +1 -2
- package/dist/lockstepDefinition.js +1 -2
- package/dist/lockstepHostLoop.js +1 -2
- package/dist/lockstepInitialAdmission.js +1 -2
- package/dist/lockstepInitialStrategyFixtures.js +1 -2
- package/dist/lockstepJournal.js +1 -2
- package/dist/lockstepJournalCodec.js +1 -2
- package/dist/lockstepJournalPorts.js +1 -2
- package/dist/lockstepJournalRebuild.js +1 -2
- package/dist/lockstepJournalRows.js +1 -2
- package/dist/lockstepMembers.js +1 -2
- package/dist/lockstepMessages.js +1 -2
- package/dist/lockstepOwnedRoom.js +1 -2
- package/dist/lockstepPolicies.js +1 -2
- package/dist/lockstepReact.js +1 -2
- package/dist/lockstepRecoveryTruth.js +1 -2
- package/dist/lockstepRosterConfig.js +1 -2
- package/dist/lockstepSeed.js +1 -2
- package/dist/lockstepSeedFixture.js +1 -2
- package/dist/lockstepServer.js +1 -2
- package/dist/lockstepServerConfig.js +1 -2
- package/dist/lockstepServerRoles.js +1 -2
- package/dist/lockstepServerStrategyFixtures.js +1 -2
- package/dist/lockstepStrategies.js +1 -2
- package/dist/lockstepStrategyFixtures.js +1 -2
- package/dist/lockstepTerminal.js +1 -2
- package/dist/lockstepTerminalPorts.js +1 -2
- package/dist/lockstepTransport.js +1 -2
- package/dist/lockstepTransportConfig.js +1 -2
- package/dist/lockstepWireRoster.js +1 -2
- package/dist/matchRoomProvider.js +1 -2
- package/dist/matchRooms.js +1 -2
- package/dist/membershipObserver.js +1 -2
- package/dist/moderation.js +1 -2
- package/dist/movementSpecials.js +1 -2
- package/dist/ownership.js +1 -2
- package/dist/ownershipWithdrawal.js +1 -2
- package/dist/pcg32.js +1 -2
- package/dist/ports.js +1 -2
- package/dist/quaternion.js +2 -3
- package/dist/react.js +1 -2
- package/dist/reaper.js +1 -2
- package/dist/reaperSchemas.js +1 -2
- package/dist/reaperWorkflow.js +1 -2
- package/dist/recovery.js +1 -2
- package/dist/recoverySeats.js +1 -2
- package/dist/replay.js +8 -9
- package/dist/replayPorts.js +1 -2
- package/dist/replayRecording.js +2 -3
- package/dist/replaySchema.js +1 -2
- package/dist/replayStorage.js +1 -2
- package/dist/reservationBatch.js +1 -2
- package/dist/reservationSchemas.js +1 -2
- package/dist/reservations.js +1 -2
- package/dist/reservePort.js +1 -2
- package/dist/resolvedOptions.js +1 -2
- package/dist/room.js +1 -2
- package/dist/roomAccessSweep.js +1 -2
- package/dist/roomAppCommandControl.js +1 -2
- package/dist/roomAuthoringStrategy.js +1 -2
- package/dist/roomErasure.js +1 -2
- package/dist/roomPoolRuntimeDefaults.js +1 -2
- package/dist/roomPoolSelection.js +1 -2
- package/dist/roomPoolTopology.js +1 -2
- package/dist/rpc.js +1 -2
- package/dist/rpcClient.js +1 -2
- package/dist/rpcRoutes.js +1 -2
- package/dist/runtime.js +2 -3
- package/dist/schemaHistory.js +1 -2
- package/dist/seatStore.js +1 -2
- package/dist/seatStrategyFixtures.js +1 -2
- package/dist/seatSubject.js +1 -2
- package/dist/seats.js +1 -2
- package/dist/serverSession.js +1 -2
- package/dist/serverSessionConfig.js +1 -2
- package/dist/sessionAdmission.js +1 -2
- package/dist/sidecarAdmission.js +1 -2
- package/dist/sidecarConfig.js +2 -3
- package/dist/sidecarConfigPublication.js +1 -2
- package/dist/sidecarHostListener.js +1 -2
- package/dist/sidecarIpc.js +1 -2
- package/dist/sidecarPeer.js +1 -2
- package/dist/sidecarProcessPort.js +1 -2
- package/dist/sidecarRuntime.js +1 -2
- package/dist/sidecarSelection.js +1 -2
- package/dist/sidecarWire.js +4 -5
- package/dist/sidecarWrites.js +1 -2
- package/dist/simulation.js +1 -2
- package/dist/simulationAuthoring.js +1 -2
- package/dist/simulationBytes.js +1 -2
- package/dist/simulationConformance.js +1 -2
- package/dist/simulationInputHistoryCapture.js +1 -2
- package/dist/simulationInputHistoryWire.js +1 -2
- package/dist/simulationOptionsWire.js +1 -2
- package/dist/simulationRecoveryWire.js +1 -2
- package/dist/simulationReplay.js +1 -2
- package/dist/simulationSnapshotWire.js +1 -2
- package/dist/simulationState.js +1 -2
- package/dist/snapshotBlob.js +2 -3
- package/dist/snapshotBlobCleanup.js +1 -2
- package/dist/snapshotBlobIndex.js +1 -2
- package/dist/snapshotBudget.js +1 -2
- package/dist/snapshotChain.js +1 -2
- package/dist/snapshotErasure.js +1 -2
- package/dist/snapshotInspection.js +1 -2
- package/dist/snapshotSegmentBlobs.js +1 -2
- package/dist/snapshotUploads.js +1 -2
- package/dist/socketTransport.js +1 -2
- package/dist/spatial.js +2 -3
- package/dist/spectatorPolicy.js +3 -4
- package/dist/spectatorProducer.js +2 -3
- package/dist/startFailureCause.js +1 -2
- package/dist/stateCodec.js +2 -3
- package/dist/strategyFixtures.js +1 -2
- package/dist/streamFraming.js +1 -2
- package/dist/streamTransport.js +1 -2
- package/dist/subjectAdmission.js +1 -2
- package/dist/subjectPrivacy.js +1 -2
- package/dist/subjectPrivacyBinding.js +1 -2
- package/dist/systemManifest.js +1 -2
- package/dist/tables.js +1 -2
- package/dist/testHarness.js +1 -2
- package/dist/testing.js +1 -2
- package/dist/testingPorts.js +1 -2
- package/dist/transform.js +4 -5
- package/dist/transform3d.js +1 -2
- package/dist/transformCollection.js +1 -2
- package/dist/transformCollection3d.js +1 -2
- package/dist/transformCollectionCore.js +2 -3
- package/dist/transformFrames.js +1 -2
- package/dist/transformPrediction3d.js +2 -3
- package/dist/transformRules.js +1 -2
- package/dist/transformSchemas.js +1 -2
- package/dist/transport.js +1 -2
- package/dist/transportAuthoring.js +1 -2
- package/dist/transportCleanup.js +1 -2
- package/dist/transportConformance.js +1 -2
- package/dist/transportConnector.js +1 -2
- package/dist/transportEndpoints.js +1 -2
- package/dist/viewProjection.js +1 -2
- package/dist/web.js +1 -2
- package/dist/webTransportClient.js +1 -2
- package/dist/wire.js +4 -5
- package/dist/withdrawalPort.js +1 -2
- package/dist/world.js +8 -9
- package/dist/worldActorReceipts.js +1 -2
- package/dist/worldActorTransferSnapshot.js +1 -2
- package/dist/worldAdmissionPending.js +1 -2
- package/dist/worldBoundaryCoordinator.js +1 -2
- package/dist/worldCatalog.js +3 -4
- package/dist/worldCellAllocation.js +2 -3
- package/dist/worldCellDestination.js +1 -2
- package/dist/worldCells.js +5 -6
- package/dist/worldChange.js +4 -5
- package/dist/worldClient.js +1 -2
- package/dist/worldClientControl.js +6 -7
- package/dist/worldClientPendingInput.js +1 -2
- package/dist/worldClientRpc.js +1 -2
- package/dist/worldClientRpcRoutes.js +1 -2
- package/dist/worldClientSchemas.js +1 -2
- package/dist/worldCommands.js +5 -6
- package/dist/worldData.js +3 -4
- package/dist/worldDefaultBinding.js +1 -2
- package/dist/worldDefaultGroupAdmission.js +1 -2
- package/dist/worldDefaultGroupAppServices.js +1 -2
- package/dist/worldDefaultGroupCompensation.js +1 -2
- package/dist/worldDefaultGroupContinuation.js +1 -2
- package/dist/worldDefaultGroupControl.js +1 -2
- package/dist/worldDefaultGroupMembers.js +1 -2
- package/dist/worldDefaultGroups.js +1 -2
- package/dist/worldDefaultPending.js +1 -2
- package/dist/worldDefaultService.js +1 -2
- package/dist/worldEntities.js +49 -50
- package/dist/worldEntityCodec.js +1 -2
- package/dist/worldEntityHandoffView.js +1 -2
- package/dist/worldGeometry.js +1 -2
- package/dist/worldGhostAdmission.js +1 -2
- package/dist/worldGhostDestination.js +3 -4
- package/dist/worldGhostGateway.js +1 -2
- package/dist/worldGhostHandshake.js +1 -2
- package/dist/worldGhostHost.js +1 -2
- package/dist/worldGhostIngress.js +1 -2
- package/dist/worldGhostNeighborhood.js +1 -2
- package/dist/worldGhostNeighbors.js +1 -2
- package/dist/worldGhostOutbound.js +1 -2
- package/dist/worldGhostPublisher.js +1 -2
- package/dist/worldGhostReceiver.js +1 -2
- package/dist/worldGhostSender.js +1 -2
- package/dist/worldGhostSocket.js +1 -2
- package/dist/worldGhostWire.js +3 -4
- package/dist/worldGroupCommand.js +1 -2
- package/dist/worldGroupDeadline.js +1 -2
- package/dist/worldGroupPreparation.js +1 -2
- package/dist/worldGroupReadyControl.js +8 -9
- package/dist/worldGroupSupervisor.js +3 -4
- package/dist/worldHandoffMetrics.js +1 -2
- package/dist/worldHandoffView.js +1 -2
- package/dist/worldHostSource.js +5 -6
- package/dist/worldInspectEndpoint.js +1 -2
- package/dist/worldInspection.js +1 -2
- package/dist/worldInstanceAdmission.js +1 -2
- package/dist/worldInstanceAllocation.js +1 -2
- package/dist/worldInstanceDestination.js +1 -2
- package/dist/worldInstanceExpiry.js +1 -2
- package/dist/worldInstanceExpirySupervisor.js +1 -2
- package/dist/worldInstanceLifecycle.js +1 -2
- package/dist/worldInstanceState.js +1 -2
- package/dist/worldInstances.js +1 -2
- package/dist/worldJoin.js +1 -2
- package/dist/worldLayers.js +6 -7
- package/dist/worldLeases.js +5 -6
- package/dist/worldManifest.js +1 -2
- package/dist/worldMovement.js +1 -2
- package/dist/worldPersistence.js +4 -5
- package/dist/worldProjection.js +6 -7
- package/dist/worldReact.js +1 -2
- package/dist/worldRecoveryActor.js +1 -2
- package/dist/worldReturnAnchor.js +1 -2
- package/dist/worldRoomHooks.js +5 -6
- package/dist/worldRoomPool.js +2 -3
- package/dist/worldRoomSteps.js +1 -2
- package/dist/worldSeatBinding.js +1 -2
- package/dist/worldSourceSeatPending.js +1 -2
- package/dist/worldStrategyFixtures.js +1 -2
- package/dist/worldTesting.js +1 -2
- package/dist/worldTransitionDefaults.js +1 -2
- package/dist/worldTransitionExecutor.js +9 -10
- package/dist/worldTransitionGroup.js +1 -2
- package/dist/worldTransitionPhysicalSteps.js +1 -2
- package/dist/worldTransitionResolver.js +8 -9
- package/dist/worldTransitionSeatGroup.js +1 -2
- package/dist/worldTransitionSeats.js +2 -3
- package/dist/worldTransitionState.js +1 -2
- package/dist/worldTransitions.js +8 -9
- package/package.json +10 -10
package/dist/worldPersistence.js
CHANGED
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
import { BudgetExceeded as e, ProtocolError as t } from "./errors.js";
|
|
2
2
|
import { Effect as n } from "effect";
|
|
3
3
|
import { randomUUID as r } from "node:crypto";
|
|
4
|
-
|
|
4
|
+
// src/worldPersistence.ts
|
|
5
5
|
function i(e) {
|
|
6
6
|
throw new t({ detail: e });
|
|
7
7
|
}
|
|
8
8
|
var a = (e) => typeof e == "string" && /^[A-Za-z0-9][A-Za-z0-9_.:-]{0,190}$/.test(e) ? e : i("Invalid World persistence scope"), o = (e) => typeof e == "number" && Number.isSafeInteger(e) && e > 0 && e < 2147483647 ? e : i("Invalid World persistence budget"), s = (e) => {
|
|
9
|
-
|
|
9
|
+
e && Object.getPrototypeOf(e) === Object.prototype || i("World persistence requires own options");
|
|
10
10
|
for (let t of Reflect.ownKeys(e)) {
|
|
11
11
|
let n = Object.getOwnPropertyDescriptor(e, t);
|
|
12
|
-
|
|
12
|
+
typeof t == "string" && [
|
|
13
13
|
"tenantId",
|
|
14
14
|
"roomId",
|
|
15
15
|
"maxEntries",
|
|
@@ -17,7 +17,7 @@ var a = (e) => typeof e == "string" && /^[A-Za-z0-9][A-Za-z0-9_.:-]{0,190}$/.tes
|
|
|
17
17
|
"maxDelayMs",
|
|
18
18
|
"epochNow",
|
|
19
19
|
"onPersisted"
|
|
20
|
-
].includes(t)
|
|
20
|
+
].includes(t) && n?.enumerable && "value" in n || i("Invalid World persistence option");
|
|
21
21
|
}
|
|
22
22
|
}, c = (e) => Array.isArray(e) ? e.map(c) : typeof e == "object" && e ? Object.fromEntries(Object.entries(e).sort(([e], [t]) => e < t ? -1 : +(e > t)).map(([e, t]) => [e, c(t)])) : e, l = (e, t) => e.tenantId === t.tenantId && e.entityId === t.entityId && e.source.worldId === t.source.worldId && e.source.zoneId === t.source.zoneId && e.source.layer === t.source.layer && e.source.roomId === t.source.roomId && e.source.epoch === t.source.epoch, u = (r) => n.suspend(() => {
|
|
23
23
|
let i;
|
|
@@ -130,5 +130,4 @@ var a = (e) => typeof e == "string" && /^[A-Za-z0-9][A-Za-z0-9_.:-]{0,190}$/.tes
|
|
|
130
130
|
}))
|
|
131
131
|
});
|
|
132
132
|
};
|
|
133
|
-
//#endregion
|
|
134
133
|
export { d as makeWorldPersistence };
|
package/dist/worldProjection.js
CHANGED
|
@@ -2,15 +2,15 @@ import { BudgetExceeded as e, ProtocolError as t } from "./errors.js";
|
|
|
2
2
|
import { captureWorldCatalog as n, worldCellAt as r } from "./world.js";
|
|
3
3
|
import { Effect as i, Option as a } from "effect";
|
|
4
4
|
import { HotError as o, readHotStoreWithFallback as s } from "@voltro/kv/hot/contract";
|
|
5
|
-
|
|
5
|
+
// src/worldProjection.ts
|
|
6
6
|
function c(e) {
|
|
7
7
|
throw new t({ detail: e });
|
|
8
8
|
}
|
|
9
9
|
var l = (e) => typeof e == "string" && e.length > 0 && e.length <= 191 && e.trim() === e ? e : c("Invalid World projection identity"), u = (e, t = 0) => typeof e == "number" && Number.isSafeInteger(e) && e >= t ? e : c("Invalid World projection counter"), d = (e, t) => {
|
|
10
|
-
|
|
10
|
+
typeof e == "object" && e && Object.getPrototypeOf(e) === Object.prototype || c("World projection requires plain own data");
|
|
11
11
|
for (let n of Reflect.ownKeys(e)) {
|
|
12
12
|
let r = Object.getOwnPropertyDescriptor(e, n);
|
|
13
|
-
|
|
13
|
+
typeof n == "string" && t.includes(n) && r?.enumerable && "value" in r || c("Invalid World projection field");
|
|
14
14
|
}
|
|
15
15
|
}, f = (e) => {
|
|
16
16
|
d(e, [
|
|
@@ -76,7 +76,7 @@ var l = (e) => typeof e == "string" && e.length > 0 && e.length <= 191 && e.trim
|
|
|
76
76
|
let n = [], r = /* @__PURE__ */ new Set(), i = /* @__PURE__ */ new Set();
|
|
77
77
|
for (let e = 0; e < t.length; e++) {
|
|
78
78
|
let a = Object.getOwnPropertyDescriptor(t, String(e));
|
|
79
|
-
|
|
79
|
+
a && "value" in a || c("World projection entries must be own data");
|
|
80
80
|
let o = p(a.value, h), s = JSON.stringify([
|
|
81
81
|
o.zoneId,
|
|
82
82
|
o.cellId,
|
|
@@ -103,7 +103,7 @@ var l = (e) => typeof e == "string" && e.length > 0 && e.length <= 191 && e.trim
|
|
|
103
103
|
});
|
|
104
104
|
for (let e = 0; e < n.length; e++) {
|
|
105
105
|
let t = Object.getOwnPropertyDescriptor(n, String(e));
|
|
106
|
-
|
|
106
|
+
t?.enumerable && "value" in t || c("World SQL projection source must contain own data");
|
|
107
107
|
}
|
|
108
108
|
let t = n.map((e) => (d(e, [
|
|
109
109
|
"id",
|
|
@@ -205,7 +205,7 @@ var l = (e) => typeof e == "string" && e.length > 0 && e.length <= 191 && e.trim
|
|
|
205
205
|
"availabilityRole"
|
|
206
206
|
]);
|
|
207
207
|
let r = n.availabilityRole, i = e.connectionAvailability?.bind(e), a = e.hotStore?.bind(e);
|
|
208
|
-
|
|
208
|
+
e.connectionRegistry && a && (r === void 0 || i) || c("World projection requires the app-owned connection registry and tenant HotStore"), r !== void 0 && l(r);
|
|
209
209
|
let o = r === void 0 ? "fail" : i(r), s = f({
|
|
210
210
|
namespace: n.namespace,
|
|
211
211
|
tenantId: n.tenantId,
|
|
@@ -217,5 +217,4 @@ var l = (e) => typeof e == "string" && e.length > 0 && e.length <= 191 && e.trim
|
|
|
217
217
|
});
|
|
218
218
|
return m(t, await a({ tenantId: s.tenantId }), s);
|
|
219
219
|
};
|
|
220
|
-
//#endregion
|
|
221
220
|
export { h as bindWorldCellProjection, m as makeWorldCellProjection };
|
package/dist/worldReact.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { createElement as e, useId as t, useLayoutEffect as n, useRef as r, useState as i, useSyncExternalStore as a } from "react";
|
|
2
|
-
|
|
2
|
+
// src/worldReact.ts
|
|
3
3
|
var o = (e) => a((t) => e.subscribe(t), () => e.observation, () => e.observation), s = {
|
|
4
4
|
en: {
|
|
5
5
|
title: "Moving to another location",
|
|
@@ -106,5 +106,4 @@ var o = (e) => a((t) => e.subscribe(t), () => e.observation, () => e.observation
|
|
|
106
106
|
onClick: () => x("cancel")
|
|
107
107
|
}, p.cancel))) : null);
|
|
108
108
|
};
|
|
109
|
-
//#endregion
|
|
110
109
|
export { c as TransitionScreen, o as useWorldTransition };
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { ProtocolError as e } from "./errors.js";
|
|
2
2
|
import { captureWorldData as t } from "./worldData.js";
|
|
3
|
-
|
|
3
|
+
// src/worldRecoveryActor.ts
|
|
4
4
|
var n = /* @__PURE__ */ new WeakSet(), r = (t, r) => {
|
|
5
5
|
if (!t || !n.has(t) || t.scope.tenantId !== r.tenantId || t.scope.roomId !== r.roomId || t.scope.hostId !== r.hostId || t.scope.epoch !== r.epoch || t.scope.priorEpoch !== r.priorEpoch || (t.scope.worldRecoveryEpoch ?? t.scope.priorEpoch) !== (r.worldRecoveryEpoch ?? r.priorEpoch)) throw new e({ detail: "World recovery actor requires its active adoption scope" });
|
|
6
6
|
return t;
|
|
@@ -31,5 +31,4 @@ var n = /* @__PURE__ */ new WeakSet(), r = (t, r) => {
|
|
|
31
31
|
n.delete(d), c && await c;
|
|
32
32
|
}
|
|
33
33
|
};
|
|
34
|
-
//#endregion
|
|
35
34
|
export { r as captureWorldRecoveryActor, i as withWorldRecoveryActor };
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { ProtocolError as e } from "./errors.js";
|
|
2
2
|
import { captureWorldData as t } from "./worldData.js";
|
|
3
3
|
import { worldCellAt as n } from "./world.js";
|
|
4
|
-
|
|
4
|
+
// src/worldReturnAnchor.ts
|
|
5
5
|
var r = (r, i) => {
|
|
6
6
|
let a = () => {
|
|
7
7
|
throw new e({ detail: "Invalid immutable World entity return anchor" });
|
|
@@ -45,5 +45,4 @@ var r = (r, i) => {
|
|
|
45
45
|
})
|
|
46
46
|
}));
|
|
47
47
|
};
|
|
48
|
-
//#endregion
|
|
49
48
|
export { r as captureWorldEntityReturnAnchor };
|
package/dist/worldRoomHooks.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { RoomAuthoringError as e } from "./errors.js";
|
|
2
|
-
|
|
2
|
+
// src/worldRoomHooks.ts
|
|
3
3
|
var t = (t, n) => {
|
|
4
4
|
let r = () => {
|
|
5
5
|
throw new e({
|
|
@@ -17,15 +17,15 @@ var t = (t, n) => {
|
|
|
17
17
|
"onMemberEnter"
|
|
18
18
|
].includes(e))) && r();
|
|
19
19
|
let i = Object.getOwnPropertyDescriptor(n, "maxPendingTransitions");
|
|
20
|
-
i
|
|
20
|
+
!i || i.enumerable && "value" in i || r();
|
|
21
21
|
let a = i?.value ?? 128;
|
|
22
22
|
(!Number.isSafeInteger(a) || a < 1 || a > 4096) && r();
|
|
23
23
|
let o = (e) => {
|
|
24
24
|
let t = Object.getOwnPropertyDescriptor(n, e);
|
|
25
|
-
return
|
|
25
|
+
return t?.enumerable && "value" in t && typeof t.value == "function" || r(), t.value;
|
|
26
26
|
}, s = Object.getOwnPropertyDescriptor(n, "movement"), c;
|
|
27
27
|
if (s) {
|
|
28
|
-
|
|
28
|
+
s.enumerable && "value" in s || r();
|
|
29
29
|
let e = s.value, t = [
|
|
30
30
|
"maxEntities",
|
|
31
31
|
"maxBytesPerTick",
|
|
@@ -43,7 +43,7 @@ var t = (t, n) => {
|
|
|
43
43
|
});
|
|
44
44
|
}
|
|
45
45
|
let l = Object.getOwnPropertyDescriptor(n, "onMemberEnter");
|
|
46
|
-
return l
|
|
46
|
+
return !l || l.enumerable && "value" in l && typeof l.value == "function" || r(), Object.freeze({
|
|
47
47
|
maxPendingTransitions: a,
|
|
48
48
|
...c ? { movement: c } : {},
|
|
49
49
|
onEnter: o("onEnter"),
|
|
@@ -53,5 +53,4 @@ var t = (t, n) => {
|
|
|
53
53
|
...l ? { onMemberEnter: l.value } : {}
|
|
54
54
|
});
|
|
55
55
|
};
|
|
56
|
-
//#endregion
|
|
57
56
|
export { t as captureRoomWorldHooks };
|
package/dist/worldRoomPool.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { ProtocolError as e } from "./errors.js";
|
|
2
2
|
import { ROOM_HOSTS_TABLE as t } from "./identities.js";
|
|
3
3
|
import { eq as n } from "@voltro/database";
|
|
4
|
-
|
|
4
|
+
// src/worldRoomPool.ts
|
|
5
5
|
var r = async (r, i, a, o = !1) => {
|
|
6
6
|
if (i.hosts === void 0) return;
|
|
7
7
|
let s = () => {
|
|
@@ -11,7 +11,7 @@ var r = async (r, i, a, o = !1) => {
|
|
|
11
11
|
a.state !== "hibernated" && s();
|
|
12
12
|
return;
|
|
13
13
|
}
|
|
14
|
-
|
|
14
|
+
typeof a.hostId == "string" && a.hostId || s();
|
|
15
15
|
let c = await r.query({
|
|
16
16
|
table: t,
|
|
17
17
|
predicate: n("id", a.hostId),
|
|
@@ -23,5 +23,4 @@ var r = async (r, i, a, o = !1) => {
|
|
|
23
23
|
});
|
|
24
24
|
(c.length !== 1 || c[0].id !== a.hostId || c[0].pool !== i.hosts.pool) && s();
|
|
25
25
|
};
|
|
26
|
-
//#endregion
|
|
27
26
|
export { r as assertWorldRoomPool };
|
package/dist/worldRoomSteps.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { ProtocolError as e } from "./errors.js";
|
|
2
2
|
import { admitWorldTransitionStep as t, worldTransitionExecutionGroupTokens as n, worldTransitionExecutionLeaseToken as r } from "./worldTransitionExecutor.js";
|
|
3
3
|
import { Effect as i, Option as a } from "effect";
|
|
4
|
-
|
|
4
|
+
// src/worldRoomSteps.ts
|
|
5
5
|
var o = (t, n) => i.tryPromise({
|
|
6
6
|
try: t,
|
|
7
7
|
catch: (t) => t instanceof e ? t : new e({ detail: n })
|
|
@@ -129,5 +129,4 @@ var o = (t, n) => i.tryPromise({
|
|
|
129
129
|
capture: (e) => n(e.tenantId, e.roomId, e.epoch).pipe(i.flatMap((t) => t.capture(e)))
|
|
130
130
|
});
|
|
131
131
|
};
|
|
132
|
-
//#endregion
|
|
133
132
|
export { s as controllerWorldRoomSteps, u as hostWorldRoomStepHandler, d as remoteWorldRoomSteps, f as routedWorldRoomSteps, l as worldRoomStepAuthority };
|
package/dist/worldSeatBinding.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { ProtocolError as e } from "./errors.js";
|
|
2
|
-
|
|
2
|
+
// src/worldSeatBinding.ts
|
|
3
3
|
var t = (t) => {
|
|
4
4
|
let n = () => {
|
|
5
5
|
throw new e({ detail: "Invalid durable World target Seat binding" });
|
|
@@ -32,5 +32,4 @@ var t = (t) => {
|
|
|
32
32
|
}
|
|
33
33
|
if ("worldTarget" in n) throw new e({ detail: "Inherited World target Seat binding" });
|
|
34
34
|
};
|
|
35
|
-
//#endregion
|
|
36
35
|
export { t as captureWorldTargetSeatBinding, n as worldTargetSeatBindingFromReceipt };
|
|
@@ -1,9 +1,8 @@
|
|
|
1
1
|
import { ProtocolError as e } from "./errors.js";
|
|
2
|
-
|
|
2
|
+
// src/worldSourceSeatPending.ts
|
|
3
3
|
var t = class extends e {
|
|
4
4
|
constructor() {
|
|
5
5
|
super({ detail: "World source Seat awaits transfer compensation" });
|
|
6
6
|
}
|
|
7
7
|
};
|
|
8
|
-
//#endregion
|
|
9
8
|
export { t as WorldSourceSeatPending };
|
|
@@ -3,7 +3,7 @@ import { defaultWorldOnWorldChange as n, resolveWorldOnWorldChange as r } from "
|
|
|
3
3
|
import { defaultWorldTransitionPolicy as i, resolveWorldTransitionPolicy as a } from "./worldTransitions.js";
|
|
4
4
|
import { defineWorld as o, rect as s } from "./world.js";
|
|
5
5
|
import { Effect as c } from "effect";
|
|
6
|
-
|
|
6
|
+
// src/worldStrategyFixtures.ts
|
|
7
7
|
var l = () => ({
|
|
8
8
|
name: "world-fixture",
|
|
9
9
|
map: { bounds: s(0, 0, 8, 4) },
|
|
@@ -160,5 +160,4 @@ var l = () => ({
|
|
|
160
160
|
expected: { coins: 5 }
|
|
161
161
|
}
|
|
162
162
|
};
|
|
163
|
-
//#endregion
|
|
164
163
|
export { f as worldLayerPolicySlotFixture, m as worldOnWorldChangeSlotFixture, p as worldTransitionPolicySlotFixture };
|
package/dist/worldTesting.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { ProtocolError as e } from "./errors.js";
|
|
2
2
|
import { WorldTransitionPort as t } from "./worldCommands.js";
|
|
3
3
|
import { Effect as n, Layer as r, Result as i } from "effect";
|
|
4
|
-
|
|
4
|
+
// src/worldTesting.ts
|
|
5
5
|
var a = (t = {}) => {
|
|
6
6
|
let r = () => n.fail(new e({ detail: "World transition fixture has no configured provider" }));
|
|
7
7
|
return Object.freeze({
|
|
@@ -23,5 +23,4 @@ var a = (t = {}) => {
|
|
|
23
23
|
expected: "ProtocolError"
|
|
24
24
|
}
|
|
25
25
|
};
|
|
26
|
-
//#endregion
|
|
27
26
|
export { o as fakeWorldTransitionLayer, a as fakeWorldTransitionService, s as worldTransitionFakeLayer, c as worldTransitionPortFixture };
|
|
@@ -7,7 +7,7 @@ import { dataStoreWorldCellDestination as l } from "./worldCellDestination.js";
|
|
|
7
7
|
import { dataStoreWorldInstanceDestination as u } from "./worldInstanceDestination.js";
|
|
8
8
|
import { and as d, eq as f } from "@voltro/database";
|
|
9
9
|
import { Effect as p } from "effect";
|
|
10
|
-
|
|
10
|
+
// src/worldTransitionDefaults.ts
|
|
11
11
|
var m = (t) => new e({ detail: t }), h = (e, t, n) => {
|
|
12
12
|
let r = n.split(":"), i = Number(r.pop()), o = Number(r.pop()), s = e.zones.find((e) => e.id === t);
|
|
13
13
|
if (!s || r.join(":") !== t || !Number.isSafeInteger(o) || !Number.isSafeInteger(i)) throw m("Stored World cell is not declared");
|
|
@@ -194,5 +194,4 @@ var m = (t) => new e({ detail: t }), h = (e, t, n) => {
|
|
|
194
194
|
})))))
|
|
195
195
|
});
|
|
196
196
|
};
|
|
197
|
-
//#endregion
|
|
198
197
|
export { y as defaultWorldClientAuthority, g as defaultWorldTransitionPolicies };
|
|
@@ -4,7 +4,7 @@ import { nextWorldTransitionPhase as n } from "./worldTransitionState.js";
|
|
|
4
4
|
import { worldTransitionGroupFromRecords as r } from "./worldTransitionGroup.js";
|
|
5
5
|
import { isVerifiedWorldTransitionLease as i, worldTransitionLeaseToken as a } from "./worldLeases.js";
|
|
6
6
|
import { Effect as o, Option as s } from "effect";
|
|
7
|
-
|
|
7
|
+
// src/worldTransitionExecutor.ts
|
|
8
8
|
var c = /* @__PURE__ */ new WeakMap(), l = (t, n, r) => o.suspend(() => {
|
|
9
9
|
let i = t, a = i && typeof i == "object" ? c.get(i) : void 0;
|
|
10
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" }))));
|
|
@@ -90,10 +90,10 @@ function _() {
|
|
|
90
90
|
throw new e({ detail: "Invalid World transition executor admission" });
|
|
91
91
|
}
|
|
92
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
|
-
|
|
93
|
+
e && typeof e == "object" && Object.getPrototypeOf(e) === Object.prototype || _();
|
|
94
94
|
for (let n of Reflect.ownKeys(e)) {
|
|
95
95
|
let r = Object.getOwnPropertyDescriptor(e, n);
|
|
96
|
-
|
|
96
|
+
typeof n == "string" && t.includes(n) && r?.enumerable && "value" in r || _();
|
|
97
97
|
}
|
|
98
98
|
}, b = (e, t) => {
|
|
99
99
|
y(e, [
|
|
@@ -121,9 +121,9 @@ var v = (e, t = 191) => typeof e == "string" && e.length <= t && /^[A-Za-z0-9][A
|
|
|
121
121
|
};
|
|
122
122
|
return r(n), n;
|
|
123
123
|
}, S = (e, t) => {
|
|
124
|
-
|
|
124
|
+
typeof e == "object" && e || _();
|
|
125
125
|
let n = Object.getOwnPropertyDescriptor(e, t);
|
|
126
|
-
return
|
|
126
|
+
return n && "value" in n && typeof n.value == "function" || _(), n.value.bind(e);
|
|
127
127
|
}, C = (t) => o.suspend(() => {
|
|
128
128
|
let n = t();
|
|
129
129
|
return o.isEffect(n) ? n : o.fail(new e({ detail: "World transition provider requires an Effect" }));
|
|
@@ -150,7 +150,7 @@ var v = (e, t = 191) => typeof e == "string" && e.length <= t && /^[A-Za-z0-9][A
|
|
|
150
150
|
let i = v(t.tenantId), l = t.maxPhaseSteps;
|
|
151
151
|
(!Number.isSafeInteger(l) || l < 1 || l > 1024) && _();
|
|
152
152
|
let u = Object.getOwnPropertyDescriptor(t.leases, "tenantId");
|
|
153
|
-
|
|
153
|
+
u && "value" in u && u.value === i || _();
|
|
154
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
155
|
"guard",
|
|
156
156
|
"prepare",
|
|
@@ -329,7 +329,7 @@ var v = (e, t = 191) => typeof e == "string" && e.length <= t && /^[A-Za-z0-9][A
|
|
|
329
329
|
let t = /* @__PURE__ */ new Set(), n = [];
|
|
330
330
|
for (let r = 0; r < e.length; r++) {
|
|
331
331
|
let a = Object.getOwnPropertyDescriptor(e, String(r));
|
|
332
|
-
|
|
332
|
+
a?.enumerable && "value" in a || _();
|
|
333
333
|
let o = a.value;
|
|
334
334
|
y(o, ["origin", "expectedSubject"]);
|
|
335
335
|
let s = b(o.origin, i), c = x(o.expectedSubject), l = JSON.stringify(s);
|
|
@@ -356,7 +356,7 @@ var v = (e, t = 191) => typeof e == "string" && e.length <= t && /^[A-Za-z0-9][A
|
|
|
356
356
|
let t = [];
|
|
357
357
|
for (let e of i) t.push(yield* P(e.origin));
|
|
358
358
|
let a = r(t);
|
|
359
|
-
|
|
359
|
+
a && new Set(t.map((e) => e.entityId)).size === t.length || _();
|
|
360
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
361
|
let c = () => o.gen(function* () {
|
|
362
362
|
for (let e of d) yield* j(e);
|
|
@@ -379,7 +379,7 @@ var v = (e, t = 191) => typeof e == "string" && e.length <= t && /^[A-Za-z0-9][A
|
|
|
379
379
|
let i = t.phase === "requested" ? "guard" : t.phase === "reserving" ? "prepare" : t.phase === "ghosting" ? "ghost" : t.phase === "detaching" ? "detach" : void 0;
|
|
380
380
|
yield* c(), i && (yield* D(i, t, c, p, u)), yield* c();
|
|
381
381
|
let o = n(t.mode, t.phase);
|
|
382
|
-
|
|
382
|
+
o && o !== "committed" || _();
|
|
383
383
|
let s = yield* C(() => f({
|
|
384
384
|
origin: t.origin,
|
|
385
385
|
expectedRevision: t.revision,
|
|
@@ -515,5 +515,4 @@ var v = (e, t = 191) => typeof e == "string" && e.length <= t && /^[A-Za-z0-9][A
|
|
|
515
515
|
let a = n[0];
|
|
516
516
|
return i.cancel(a.origin, "room_owner_recovery", a.subject ?? void 0).pipe(o.asVoid);
|
|
517
517
|
});
|
|
518
|
-
//#endregion
|
|
519
518
|
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 };
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { ProtocolError as e } from "./errors.js";
|
|
2
2
|
import { createHash as t } from "node:crypto";
|
|
3
|
-
|
|
3
|
+
// src/worldTransitionGroup.ts
|
|
4
4
|
function n() {
|
|
5
5
|
throw new e({ detail: "World transition group receipt or membership is invalid" });
|
|
6
6
|
}
|
|
@@ -109,5 +109,4 @@ var r = (e, t) => {
|
|
|
109
109
|
}
|
|
110
110
|
return r;
|
|
111
111
|
};
|
|
112
|
-
//#endregion
|
|
113
112
|
export { c as captureWorldTransitionGroup, u as captureWorldTransitionGroupReceipt, d as worldTransitionGroupFromRecords, l as worldTransitionGroupReceipts };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { Effect as e } from "effect";
|
|
2
|
-
|
|
2
|
+
// src/worldTransitionPhysicalSteps.ts
|
|
3
3
|
var t = (t) => {
|
|
4
4
|
let { rooms: n, seats: r, maxBytes: i } = t, a = (e, t, r, a, o) => n.step({
|
|
5
5
|
tenantId: t.origin.tenantId,
|
|
@@ -36,5 +36,4 @@ var t = (t) => {
|
|
|
36
36
|
action: "withdraw",
|
|
37
37
|
maxBytes: t
|
|
38
38
|
}, r);
|
|
39
|
-
//#endregion
|
|
40
39
|
export { t as worldTransitionPhysicalSteps, n as worldTransitionSeatWithdrawal };
|
|
@@ -6,19 +6,19 @@ import { worldTransitionRequest as i } from "./worldCommands.js";
|
|
|
6
6
|
import { captureWorldCatalog as a, worldCellAt as o } from "./world.js";
|
|
7
7
|
import { captureWorldEntityReturnAnchor as s } from "./worldReturnAnchor.js";
|
|
8
8
|
import { Effect as c } from "effect";
|
|
9
|
-
|
|
9
|
+
// src/worldTransitionResolver.ts
|
|
10
10
|
function l() {
|
|
11
11
|
throw new e({ detail: "World transition resolution refused" });
|
|
12
12
|
}
|
|
13
13
|
var u = (e, t = 191) => typeof e == "string" && e.length <= t && /^[A-Za-z0-9][A-Za-z0-9_.:-]*$/.test(e) ? e : l(), d = (e) => typeof e == "number" && Number.isSafeInteger(e) && e > 0 && e <= 2147483647 ? e : l(), f = (e, t) => {
|
|
14
|
-
|
|
14
|
+
e && typeof e == "object" && Object.getPrototypeOf(e) === Object.prototype && Reflect.ownKeys(e).length === t.length || l();
|
|
15
15
|
for (let n of t) {
|
|
16
16
|
let t = Object.getOwnPropertyDescriptor(e, n);
|
|
17
|
-
|
|
17
|
+
t?.enumerable && "value" in t || l();
|
|
18
18
|
}
|
|
19
19
|
}, p = (e, t) => {
|
|
20
20
|
let n = e && typeof e == "object" ? Object.getOwnPropertyDescriptor(e, t) : void 0;
|
|
21
|
-
return
|
|
21
|
+
return n && "value" in n && typeof n.value == "function" || l(), n.value.bind(e);
|
|
22
22
|
}, m = (t) => c.suspend(() => {
|
|
23
23
|
let n = t();
|
|
24
24
|
return c.isEffect(n) ? n : c.fail(new e({ detail: "World resolution requires actual Effects" }));
|
|
@@ -37,7 +37,7 @@ var u = (e, t = 191) => typeof e == "string" && e.length <= t && /^[A-Za-z0-9][A
|
|
|
37
37
|
let g = u(h.tenantId), _ = d(h.maxDataBytes), v = u(h.placementClass, 120), y = a(h.worlds);
|
|
38
38
|
/^[A-Za-z0-9][A-Za-z0-9_-]{0,119}$/.test(v) || l();
|
|
39
39
|
let b = Object.getOwnPropertyDescriptor(h.entities, "worlds");
|
|
40
|
-
|
|
40
|
+
b && "value" in b || l();
|
|
41
41
|
let x = a(b.value);
|
|
42
42
|
(!y.length || x.length !== y.length || x.some((e, t) => e !== y[t])) && l();
|
|
43
43
|
let S = p(h.entities, "capturePersistence"), C = p(h.entities, "observe"), w = p(h, "authorize"), T = p(h, "captureCurrent"), E = p(h, "resolveDestination"), D = p(h, "admit"), O = (e) => y.find((t) => t.name === e) ?? l(), k = (e) => {
|
|
@@ -48,10 +48,10 @@ var u = (e, t = 191) => typeof e == "string" && e.length <= t && /^[A-Za-z0-9][A
|
|
|
48
48
|
"layer",
|
|
49
49
|
"roomId",
|
|
50
50
|
"epoch"
|
|
51
|
-
]),
|
|
51
|
+
]), Array.isArray(e.at) && Object.getPrototypeOf(e.at) === Array.prototype && Reflect.ownKeys(e.at).length === 3 || l();
|
|
52
52
|
for (let t of ["0", "1"]) {
|
|
53
53
|
let n = Object.getOwnPropertyDescriptor(e.at, t);
|
|
54
|
-
|
|
54
|
+
n?.enumerable && "value" in n || l();
|
|
55
55
|
}
|
|
56
56
|
let t = O(u(e.worldId)), n = u(e.zoneId), r = d(e.layer);
|
|
57
57
|
t.characters !== "shared" && l();
|
|
@@ -165,7 +165,7 @@ var u = (e, t = 191) => typeof e == "string" && e.length <= t && /^[A-Za-z0-9][A
|
|
|
165
165
|
entity: a,
|
|
166
166
|
current: c
|
|
167
167
|
}), j = A(yield* m(() => E(k))), M = h.target, N = j.location;
|
|
168
|
-
(N.roomId === c.location.roomId || M.kind !== "world" && N.worldId !== c.location.worldId) && l(),
|
|
168
|
+
(N.roomId === c.location.roomId || M.kind !== "world" && N.worldId !== c.location.worldId) && l(), M.kind !== "cell" && M.kind !== "zone" || N.zoneId === M.zone && N.at[0] === M.at[0] && N.at[1] === M.at[1] && N.layer === c.location.layer || l(), M.kind === "layer" && (N.layer !== M.layer || N.zoneId !== c.location.zoneId) && l(), M.kind === "world" && N.worldId !== M.world && l(), M.kind === "instance" && !p.instances.some((e) => e.id === M.instance) && l(), M.kind !== "return" || i && N.worldId === i.source.worldId && N.zoneId === i.source.zoneId && N.layer === i.source.layer && N.at[0] === i.source.at[0] && N.at[1] === i.source.at[1] || l();
|
|
169
169
|
let P = O(N.worldId), F = r({
|
|
170
170
|
kind: M.kind,
|
|
171
171
|
sourceWorld: p,
|
|
@@ -224,5 +224,4 @@ var u = (e, t = 191) => typeof e == "string" && e.length <= t && /^[A-Za-z0-9][A
|
|
|
224
224
|
}));
|
|
225
225
|
};
|
|
226
226
|
};
|
|
227
|
-
//#endregion
|
|
228
227
|
export { h as makeWorldTransitionResolver };
|
|
@@ -4,7 +4,7 @@ import { captureRoomReservationBatch as n } from "./reservationBatch.js";
|
|
|
4
4
|
import { worldTransitionGroupFromRecords as r } from "./worldTransitionGroup.js";
|
|
5
5
|
import { and as i, eq as a } from "@voltro/database";
|
|
6
6
|
import { Effect as o } from "effect";
|
|
7
|
-
|
|
7
|
+
// src/worldTransitionSeatGroup.ts
|
|
8
8
|
function s() {
|
|
9
9
|
throw new e({ detail: "World Seat group requires complete original membership" });
|
|
10
10
|
}
|
|
@@ -60,5 +60,4 @@ var c = (e) => e.group ? `world-group:${e.group.key}` : `world:${e.id}`, l = (e,
|
|
|
60
60
|
},
|
|
61
61
|
catch: () => new e({ detail: "World Seat group observation is incomplete or changed" })
|
|
62
62
|
});
|
|
63
|
-
//#endregion
|
|
64
63
|
export { u as readWorldTransitionSeatGroup, l as worldTransitionSeatBatch, c as worldTransitionSeatRequestId };
|
|
@@ -12,7 +12,7 @@ import { assertWorldInstanceSeatAdmission as p } from "./worldInstanceAdmission.
|
|
|
12
12
|
import { and as m, eq as h } from "@voltro/database";
|
|
13
13
|
import { Subject as g } from "@voltro/protocol";
|
|
14
14
|
import { Effect as _, Schema as v } from "effect";
|
|
15
|
-
|
|
15
|
+
// src/worldTransitionSeats.ts
|
|
16
16
|
function y() {
|
|
17
17
|
throw new e({ detail: "World target Seat authority is incomplete or changed" });
|
|
18
18
|
}
|
|
@@ -31,7 +31,7 @@ var b = (e, t) => {
|
|
|
31
31
|
"authorize"
|
|
32
32
|
]) {
|
|
33
33
|
let t = Object.getOwnPropertyDescriptor(C, e);
|
|
34
|
-
|
|
34
|
+
t && "value" in t || y();
|
|
35
35
|
}
|
|
36
36
|
let w = Object.getOwnPropertyDescriptor(C, "pendingAdmission");
|
|
37
37
|
(w && (!("value" in w) || w.value !== !0) || !w && "pendingAdmission" in C) && y();
|
|
@@ -256,5 +256,4 @@ var b = (e, t) => {
|
|
|
256
256
|
}))
|
|
257
257
|
});
|
|
258
258
|
};
|
|
259
|
-
//#endregion
|
|
260
259
|
export { S as dataStoreWorldTransitionSeats };
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { worldTransitionPhases as e } from "./worldCommands.js";
|
|
2
2
|
import { WORLD_TRANSITIONS_TABLE as t } from "./identities.js";
|
|
3
3
|
import { id as n, integer as r, json as i, table as a, text as o, timestamp as s } from "@voltro/database";
|
|
4
|
-
|
|
4
|
+
// src/worldTransitionState.ts
|
|
5
5
|
var c = a(t, {
|
|
6
6
|
id: n({ prefix: "wtran" }),
|
|
7
7
|
tenantId: o().maxLength(191),
|
|
@@ -91,5 +91,4 @@ var c = a(t, {
|
|
|
91
91
|
"failed",
|
|
92
92
|
"rolledBack"
|
|
93
93
|
].includes(t);
|
|
94
|
-
//#endregion
|
|
95
94
|
export { t as WORLD_TRANSITIONS_TABLE, u as canAdvanceWorldTransition, l as nextWorldTransitionPhase, e as worldTransitionPhases, c as worldTransitionsTable };
|
package/dist/worldTransitions.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { RoomAuthoringError as e } from "./errors.js";
|
|
2
2
|
import { worldCellAt as t } from "./world.js";
|
|
3
|
-
|
|
3
|
+
// src/worldTransitions.ts
|
|
4
4
|
function n(t) {
|
|
5
5
|
throw new e({
|
|
6
6
|
room: "world",
|
|
@@ -8,13 +8,13 @@ function n(t) {
|
|
|
8
8
|
});
|
|
9
9
|
}
|
|
10
10
|
var r = (e, t) => {
|
|
11
|
-
|
|
11
|
+
typeof e == "object" && e && Object.getPrototypeOf(e) === Object.prototype || n("World transition requires own data");
|
|
12
12
|
for (let r of Reflect.ownKeys(e)) {
|
|
13
13
|
let i = Object.getOwnPropertyDescriptor(e, r);
|
|
14
|
-
|
|
14
|
+
typeof r == "string" && t.includes(r) && i?.enumerable && "value" in i || n("Invalid World transition field");
|
|
15
15
|
}
|
|
16
16
|
}, i = (e) => {
|
|
17
|
-
|
|
17
|
+
typeof e == "string" && /^[A-Za-z0-9][A-Za-z0-9_-]{0,119}$/.test(e) || n("Invalid World transition identity");
|
|
18
18
|
}, a = (e, a) => (r(e, [
|
|
19
19
|
"world",
|
|
20
20
|
"pool",
|
|
@@ -35,7 +35,7 @@ var r = (e, t) => {
|
|
|
35
35
|
"mode",
|
|
36
36
|
"crossPool",
|
|
37
37
|
"recovery"
|
|
38
|
-
]),
|
|
38
|
+
]), [
|
|
39
39
|
"cell",
|
|
40
40
|
"layer",
|
|
41
41
|
"zone",
|
|
@@ -43,16 +43,16 @@ var r = (e, t) => {
|
|
|
43
43
|
"instance",
|
|
44
44
|
"return",
|
|
45
45
|
"recover"
|
|
46
|
-
].includes(e.kind)
|
|
46
|
+
].includes(e.kind) && [
|
|
47
47
|
"auto",
|
|
48
48
|
"seamless",
|
|
49
49
|
"portal",
|
|
50
50
|
"recover"
|
|
51
|
-
].includes(e.mode)
|
|
51
|
+
].includes(e.mode) && typeof e.crossPool == "boolean" && typeof e.recovery == "boolean" || n("Invalid World transition policy input");
|
|
52
52
|
let t = a(e.source, e.sourceWorld), i = a(e.target, e.targetWorld), s = t.id, c = i.id, l = e.source.world === e.target.world, u = e.source.pool === e.target.pool;
|
|
53
53
|
l && e.sourceWorld !== e.targetWorld && n("One World identity must resolve to one captured declaration");
|
|
54
54
|
let d = e.source.zone === e.target.zone, f = e.source.instance === e.target.instance, p = e.source.at[0] === e.target.at[0] && e.source.at[1] === e.target.at[1], m = e.sourceWorld.zones.find((t) => t.id === e.source.zone), h = e.targetWorld.zones.find((t) => t.id === e.target.zone), g = m.neighbors.includes(h.id) && h.neighbors.includes(m.id), _ = o(t.bounds, i.bounds) && (d || g), v = !u;
|
|
55
|
-
v && !e.crossPool && n("Cross-pool World transition requires explicit selection"), e.kind
|
|
55
|
+
v && !e.crossPool && n("Cross-pool World transition requires explicit selection"), e.kind !== "cell" || l && u && f && e.source.layer === e.target.layer && s !== c || n("Cell transition requires a different declared cell in the same World/pool/layer"), e.kind !== "layer" || l && u && d && f && e.source.layer !== e.target.layer || n("Layer transition requires another layer of the same Zone"), e.kind !== "zone" || l && u && !d && f || n("Zone transition requires another Zone in the same World/pool"), e.kind === "world" && (l || e.source.instance !== null || e.target.instance !== null) && n("World transition requires distinct non-instance Worlds"), e.kind !== "instance" || l && u && e.source.instance === null && e.target.instance !== null || n("Instance entry requires a declared target instance"), e.kind !== "return" || l && u && e.source.instance !== null && e.target.instance === null || n("Instance return requires a non-instance target"), (e.kind === "recover" !== e.recovery || e.mode === "recover" && e.kind !== "recover") && n("Recovery classification must come from the trusted server");
|
|
56
56
|
let y = l && u && f && ((e.kind === "cell" || e.kind === "zone") && _ || e.kind === "layer" && p), b;
|
|
57
57
|
return e.kind === "recover" ? (e.mode !== "auto" && e.mode !== "recover" && n("Recovery requires recovery mode"), b = "recover") : e.mode === "auto" ? b = y ? "seamless" : "portal" : e.mode === "seamless" ? (y || n("Seamless transition is unavailable for this topology"), b = "seamless") : b = "portal", Object.freeze({
|
|
58
58
|
kind: e.kind,
|
|
@@ -97,5 +97,4 @@ var r = (e, t) => {
|
|
|
97
97
|
targetCell: o.targetCell
|
|
98
98
|
});
|
|
99
99
|
};
|
|
100
|
-
//#endregion
|
|
101
100
|
export { s as defaultWorldTransitionPolicy, c as resolveWorldTransitionPolicy, o as worldBoundsShareEdge };
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@voltro/plugin-rooms",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.89.0",
|
|
4
4
|
"description": "Room simulation and API control sources; integration remains unverified",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"voltro",
|
|
@@ -164,18 +164,18 @@
|
|
|
164
164
|
"node": ">=24.0.0"
|
|
165
165
|
},
|
|
166
166
|
"dependencies": {
|
|
167
|
-
"@voltro/database": "0.
|
|
168
|
-
"@voltro/kv": "0.
|
|
169
|
-
"@voltro/plugin-storage": "0.
|
|
170
|
-
"@voltro/protocol": "0.
|
|
171
|
-
"@voltro/runtime": "0.
|
|
172
|
-
"@voltro/workflow": "0.
|
|
173
|
-
"@voltro/plugin-licensing": "0.
|
|
167
|
+
"@voltro/database": "0.89.0",
|
|
168
|
+
"@voltro/kv": "0.89.0",
|
|
169
|
+
"@voltro/plugin-storage": "0.89.0",
|
|
170
|
+
"@voltro/protocol": "0.89.0",
|
|
171
|
+
"@voltro/runtime": "0.89.0",
|
|
172
|
+
"@voltro/workflow": "0.89.0",
|
|
173
|
+
"@voltro/plugin-licensing": "0.89.0"
|
|
174
174
|
},
|
|
175
175
|
"peerDependencies": {
|
|
176
|
-
"effect": "4.0
|
|
176
|
+
"effect": "4.1.0",
|
|
177
177
|
"react": "^19.0.0",
|
|
178
|
-
"@voltro/cms": "0.
|
|
178
|
+
"@voltro/cms": "0.89.0"
|
|
179
179
|
},
|
|
180
180
|
"peerDependenciesMeta": {
|
|
181
181
|
"react": {
|