@voltro/plugin-rooms 0.0.0-stage → 0.88.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +24492 -0
- package/LICENSE +61 -0
- package/README.md +9204 -2
- package/SECURITY.md +56 -0
- package/THIRD-PARTY-NOTICES.md +12496 -0
- package/dist/actor.js +1473 -0
- package/dist/apiBinding.js +677 -0
- package/dist/apiRegistryBinding.js +398 -0
- package/dist/apiReservations.js +432 -0
- package/dist/baselines.js +72 -0
- package/dist/bots.d.ts +1485 -0
- package/dist/bots.js +562 -0
- package/dist/catalog.js +79 -0
- package/dist/checkpointJson.js +23 -0
- package/dist/checkpointStore.js +385 -0
- package/dist/client.js +55 -0
- package/dist/clockSync.js +50 -0
- package/dist/collision.js +155 -0
- package/dist/commandDelivery.js +100 -0
- package/dist/commandRecord.js +10 -0
- package/dist/commandWithdrawal.js +182 -0
- package/dist/connection.js +496 -0
- package/dist/controlCarrier.js +374 -0
- package/dist/controlRegistry.js +78 -0
- package/dist/controlTarget.js +44 -0
- package/dist/controlTransport.js +573 -0
- package/dist/developmentBinding.js +112 -0
- package/dist/directory.js +322 -0
- package/dist/directoryProjection.js +116 -0
- package/dist/errors.d.ts +125 -0
- package/dist/errors.js +52 -0
- package/dist/fixed.d.ts +284 -0
- package/dist/fixed.js +10 -0
- package/dist/fixed32.js +133 -0
- package/dist/fixedCollision.js +59 -0
- package/dist/fixedCollision32.js +108 -0
- package/dist/fixedMath.js +55 -0
- package/dist/fixedRaw.js +10 -0
- package/dist/fixedSlabs.js +33 -0
- package/dist/fixedTrig.js +47 -0
- package/dist/fixedTrig32.js +37 -0
- package/dist/fixedVectors.js +112 -0
- package/dist/fixedVectors32.js +94 -0
- package/dist/fixedWide.js +49 -0
- package/dist/fixedWords.js +45 -0
- package/dist/gateway.js +56 -0
- package/dist/geometry-retention-app/rooms.geometryJournalRetention.workflow.server.tsx +4 -0
- package/dist/geometry-retention-app/rooms.geometryJournalRetention.workflow.tsx +14 -0
- package/dist/geometry-worker/worker.d.mts +2 -0
- package/dist/geometry-worker/worker.mjs +50 -0
- package/dist/geometry.d.ts +2249 -0
- package/dist/geometry.js +40 -0
- package/dist/geometryActivation.js +81 -0
- package/dist/geometryActorInventory.js +107 -0
- package/dist/geometryAdminClient.js +86 -0
- package/dist/geometryAdminData.js +31 -0
- package/dist/geometryAdminFixtures.js +49 -0
- package/dist/geometryAdminPorts.js +4 -0
- package/dist/geometryAdminRpc.js +57 -0
- package/dist/geometryAdminRpcRoutes.js +48 -0
- package/dist/geometryAdminSchemas.js +38 -0
- package/dist/geometryAdministration.js +189 -0
- package/dist/geometryAdministrationPorts.js +4 -0
- package/dist/geometryApiBinding.js +164 -0
- package/dist/geometryAppStorage.js +57 -0
- package/dist/geometryArtifacts.js +197 -0
- package/dist/geometryAssetBundle.js +116 -0
- package/dist/geometryAssetClient.js +24 -0
- package/dist/geometryAssetData.js +105 -0
- package/dist/geometryAssetHttp.js +122 -0
- package/dist/geometryAssetPorts.js +4 -0
- package/dist/geometryAssetRpc.js +29 -0
- package/dist/geometryAssetRpcRoutes.js +39 -0
- package/dist/geometryAssetStorageGrant.js +102 -0
- package/dist/geometryBoxOverlap.js +109 -0
- package/dist/geometryCatalogueDigest.js +110 -0
- package/dist/geometryCellCoverage.js +84 -0
- package/dist/geometryCellLoader.js +27 -0
- package/dist/geometryChannel.js +133 -0
- package/dist/geometryChunkHttp.js +53 -0
- package/dist/geometryChunkLeases.js +21 -0
- package/dist/geometryClient.d.ts +1429 -0
- package/dist/geometryClient.js +148 -0
- package/dist/geometryClientChunks.js +329 -0
- package/dist/geometryClientDelta.js +24 -0
- package/dist/geometryClientHttp.js +36 -0
- package/dist/geometryClientInterest.js +108 -0
- package/dist/geometryClientStatic.js +33 -0
- package/dist/geometryCms.d.ts +763 -0
- package/dist/geometryCms.js +216 -0
- package/dist/geometryCommitCoordinator.js +240 -0
- package/dist/geometryCompactionFixture.js +83 -0
- package/dist/geometryCompactionStrategies.js +37 -0
- package/dist/geometryConnectionClient.js +22 -0
- package/dist/geometryDerivationFixtures.js +140 -0
- package/dist/geometryDerivationStrategies.js +26 -0
- package/dist/geometryDigest.js +12 -0
- package/dist/geometryEditChannel.js +69 -0
- package/dist/geometryEditIngress.js +262 -0
- package/dist/geometryEdits.js +365 -0
- package/dist/geometryEnvelope.js +40 -0
- package/dist/geometryGridRaycast.js +91 -0
- package/dist/geometryGridSweep.js +91 -0
- package/dist/geometryHeightfield.js +165 -0
- package/dist/geometryHeightfieldRaycast.js +73 -0
- package/dist/geometryHeightfieldSweep.js +84 -0
- package/dist/geometryHeightfieldVolume.js +44 -0
- package/dist/geometryHost.js +321 -0
- package/dist/geometryHostDirectory.js +206 -0
- package/dist/geometryHostMutations.js +136 -0
- package/dist/geometryHostStreams.js +123 -0
- package/dist/geometryHttpBody.js +75 -0
- package/dist/geometryHttpRoutes.js +111 -0
- package/dist/geometryImportGltf.js +299 -0
- package/dist/geometryImportLdtk.js +53 -0
- package/dist/geometryImportPng.js +143 -0
- package/dist/geometryImportPublication.js +66 -0
- package/dist/geometryImportTiled.js +38 -0
- package/dist/geometryImportTiles.js +135 -0
- package/dist/geometryImportVox.js +129 -0
- package/dist/geometryImportedSource.js +100 -0
- package/dist/geometryInspectEndpoint.js +247 -0
- package/dist/geometryInspection.js +91 -0
- package/dist/geometryInstall.js +120 -0
- package/dist/geometryJournalArchiveData.js +20 -0
- package/dist/geometryJournalArchiveIndex.js +329 -0
- package/dist/geometryJournalArchiveTable.js +20 -0
- package/dist/geometryJournalCompaction.js +99 -0
- package/dist/geometryJournalPatch.js +46 -0
- package/dist/geometryJournalRetention.js +111 -0
- package/dist/geometryJournalRetentionSchemas.js +35 -0
- package/dist/geometryJournalRetentionSweep.js +111 -0
- package/dist/geometryJournalRetentionWorkflow.js +27 -0
- package/dist/geometryJournalRetentionWorkflowData.js +30 -0
- package/dist/geometryJournalStorage.js +147 -0
- package/dist/geometryLoader.js +117 -0
- package/dist/geometryManifest.js +112 -0
- package/dist/geometryManifestChannel.js +92 -0
- package/dist/geometryManifestClient.js +121 -0
- package/dist/geometryManifestData.js +48 -0
- package/dist/geometryManifestPorts.js +4 -0
- package/dist/geometryManifestPublication.js +108 -0
- package/dist/geometryManifestSource.js +67 -0
- package/dist/geometryMigrationJournal.js +13 -0
- package/dist/geometryMigrationStrategies.js +6 -0
- package/dist/geometryMigrations.js +322 -0
- package/dist/geometryNativeMetadata.js +51 -0
- package/dist/geometryPatch.js +169 -0
- package/dist/geometryPersistence.js +448 -0
- package/dist/geometryPersistenceCapture.js +68 -0
- package/dist/geometryPersistenceData.js +139 -0
- package/dist/geometryPersistencePorts.js +4 -0
- package/dist/geometryPlayerAdmission.js +33 -0
- package/dist/geometryPlayerEditOwner.js +264 -0
- package/dist/geometryPlayerEdits.js +48 -0
- package/dist/geometryPrepared.js +187 -0
- package/dist/geometryPrivacyFence.js +23 -0
- package/dist/geometryProceduralPublication.js +90 -0
- package/dist/geometryProceduralWorker.js +163 -0
- package/dist/geometryPublication.js +109 -0
- package/dist/geometryRayAlgebra.js +115 -0
- package/dist/geometryReadClient.js +156 -0
- package/dist/geometryReadPorts.js +4 -0
- package/dist/geometryReadRpc.js +26 -0
- package/dist/geometryReadRpcRoutes.js +46 -0
- package/dist/geometryReliablePublication.js +81 -0
- package/dist/geometryReloadPorts.js +45 -0
- package/dist/geometryReloadSource.js +277 -0
- package/dist/geometryRenderCache.js +164 -0
- package/dist/geometryRenderLod.js +101 -0
- package/dist/geometryRollback.js +124 -0
- package/dist/geometryRollbackCoordinator.js +202 -0
- package/dist/geometryRollbackPorts.js +45 -0
- package/dist/geometryRollbackSource.js +208 -0
- package/dist/geometryRollbackStore.js +197 -0
- package/dist/geometrySchemas.js +26 -0
- package/dist/geometryServer.d.ts +2766 -0
- package/dist/geometryServer.js +62 -0
- package/dist/geometryShapeRaycast.js +110 -0
- package/dist/geometryShapeSegments.js +33 -0
- package/dist/geometryShapes.js +222 -0
- package/dist/geometrySnapshot.js +75 -0
- package/dist/geometrySnapshotChannel.js +159 -0
- package/dist/geometrySnapshotClient.js +158 -0
- package/dist/geometrySnapshotPreparation.js +75 -0
- package/dist/geometrySnapshotServer.js +190 -0
- package/dist/geometrySqlOwner.js +20 -0
- package/dist/geometryStorage.js +126 -0
- package/dist/geometryStorageGrant.js +68 -0
- package/dist/geometryStorageIdentity.js +8 -0
- package/dist/geometryTileArtifact.js +9 -0
- package/dist/geometryTileCodec.js +193 -0
- package/dist/geometryTileCollision.js +95 -0
- package/dist/geometryTileNavigation.js +127 -0
- package/dist/geometryTileView.js +34 -0
- package/dist/geometryVersionActivation.js +113 -0
- package/dist/geometryVersionClient.js +237 -0
- package/dist/geometryVersionCompare.js +39 -0
- package/dist/geometryVersionMigration.js +105 -0
- package/dist/geometryVoxel.js +252 -0
- package/dist/geometryWorldEntitySubject.js +31 -0
- package/dist/geometryWorldExtent.js +11 -0
- package/dist/geometryWorldMetadata.js +37 -0
- package/dist/geometryWorldStrategyFixtures.js +126 -0
- package/dist/geometryWorldView.js +306 -0
- package/dist/host.js +127 -0
- package/dist/hostBinding.js +276 -0
- package/dist/hostCellObservation.js +113 -0
- package/dist/hostClientCapacity.js +89 -0
- package/dist/hostCommandScope.js +63 -0
- package/dist/hostController.js +3093 -0
- package/dist/hostDeployment.js +64 -0
- package/dist/hostDrain.js +151 -0
- package/dist/hostDrainPorts.js +4 -0
- package/dist/hostDriver.js +178 -0
- package/dist/hostLane.js +287 -0
- package/dist/hostListener.js +78 -0
- package/dist/hostListenerBinding.js +18 -0
- package/dist/hostLoopObservation.js +89 -0
- package/dist/hostMetrics.js +55 -0
- package/dist/hostRegistryBinding.js +417 -0
- package/dist/hostSelection.js +15 -0
- package/dist/hostShutdown.js +46 -0
- package/dist/hostTurnObservation.js +52 -0
- package/dist/identities.js +3 -0
- package/dist/index.d.ts +8632 -0
- package/dist/index.js +231 -0
- package/dist/inputReceipts.js +62 -0
- package/dist/inputRedundancy.js +54 -0
- package/dist/inspect.js +237 -0
- package/dist/lockstep.d.ts +436 -0
- package/dist/lockstep.js +381 -0
- package/dist/lockstepAdmission.js +261 -0
- package/dist/lockstepAdmissionCodec.js +93 -0
- package/dist/lockstepAdmissionPorts.js +4 -0
- package/dist/lockstepClientSession.js +577 -0
- package/dist/lockstepDefinition.js +147 -0
- package/dist/lockstepHostLoop.js +242 -0
- package/dist/lockstepInitialAdmission.js +66 -0
- package/dist/lockstepInitialStrategyFixtures.js +44 -0
- package/dist/lockstepJournal.js +394 -0
- package/dist/lockstepJournalCodec.js +253 -0
- package/dist/lockstepJournalPorts.js +4 -0
- package/dist/lockstepJournalRebuild.js +207 -0
- package/dist/lockstepJournalRows.js +56 -0
- package/dist/lockstepMembers.js +130 -0
- package/dist/lockstepMessages.js +46 -0
- package/dist/lockstepOwnedRoom.js +763 -0
- package/dist/lockstepPolicies.js +83 -0
- package/dist/lockstepReact.js +46 -0
- package/dist/lockstepRecoveryTruth.js +120 -0
- package/dist/lockstepRosterConfig.js +31 -0
- package/dist/lockstepSeed.js +11 -0
- package/dist/lockstepSeedFixture.js +19 -0
- package/dist/lockstepServer.d.ts +3897 -0
- package/dist/lockstepServer.js +324 -0
- package/dist/lockstepServerConfig.js +100 -0
- package/dist/lockstepServerRoles.js +402 -0
- package/dist/lockstepServerStrategyFixtures.js +32 -0
- package/dist/lockstepStrategies.js +5 -0
- package/dist/lockstepStrategyFixtures.js +136 -0
- package/dist/lockstepTerminal.js +89 -0
- package/dist/lockstepTerminalPorts.js +4 -0
- package/dist/lockstepTransport.js +772 -0
- package/dist/lockstepTransportConfig.js +31 -0
- package/dist/lockstepWireRoster.js +33 -0
- package/dist/matchRoomProvider.js +31 -0
- package/dist/matchRooms.js +18 -0
- package/dist/membershipObserver.js +46 -0
- package/dist/moderation.js +97 -0
- package/dist/movementSpecials.js +103 -0
- package/dist/ownership.js +16 -0
- package/dist/ownershipWithdrawal.js +17 -0
- package/dist/pcg32.js +95 -0
- package/dist/ports.d.ts +1241 -0
- package/dist/ports.js +10 -0
- package/dist/quaternion.js +69 -0
- package/dist/react.d.ts +406 -0
- package/dist/react.js +108 -0
- package/dist/reaper-app/rooms.reaper.workflow.server.tsx +5 -0
- package/dist/reaper-app/rooms.reaper.workflow.tsx +13 -0
- package/dist/reaper.js +242 -0
- package/dist/reaperSchemas.js +41 -0
- package/dist/reaperWorkflow.js +69 -0
- package/dist/recovery.js +188 -0
- package/dist/recoverySeats.js +25 -0
- package/dist/replay.d.ts +273 -0
- package/dist/replay.js +484 -0
- package/dist/replayPorts.js +4 -0
- package/dist/replayRecording.js +66 -0
- package/dist/replaySchema.js +156 -0
- package/dist/replayStorage.d.ts +149 -0
- package/dist/replayStorage.js +484 -0
- package/dist/reservationBatch.js +421 -0
- package/dist/reservationSchemas.js +16 -0
- package/dist/reservations.js +258 -0
- package/dist/reservePort.js +68 -0
- package/dist/resolvedOptions.js +3 -0
- package/dist/room.d.ts +1006 -0
- package/dist/room.js +283 -0
- package/dist/roomAccessSweep.js +94 -0
- package/dist/roomAppCommandControl.js +58 -0
- package/dist/roomAuthoringStrategy.js +16 -0
- package/dist/roomErasure.js +197 -0
- package/dist/roomPoolRuntimeDefaults.js +23 -0
- package/dist/roomPoolSelection.js +18 -0
- package/dist/roomPoolTopology.js +211 -0
- package/dist/rpc.d.ts +551 -0
- package/dist/rpc.js +111 -0
- package/dist/rpcClient.js +151 -0
- package/dist/rpcRoutes.js +27 -0
- package/dist/runtime.js +1122 -0
- package/dist/schemaHistory.js +97 -0
- package/dist/seatStore.js +150 -0
- package/dist/seatStrategyFixtures.js +51 -0
- package/dist/seatSubject.js +31 -0
- package/dist/seats.js +129 -0
- package/dist/serverSession.js +810 -0
- package/dist/serverSessionConfig.js +42 -0
- package/dist/sessionAdmission.js +52 -0
- package/dist/sidecarAdmission.js +102 -0
- package/dist/sidecarConfig.js +115 -0
- package/dist/sidecarConfigPublication.js +63 -0
- package/dist/sidecarHostListener.js +207 -0
- package/dist/sidecarIpc.js +204 -0
- package/dist/sidecarPeer.js +309 -0
- package/dist/sidecarProcessPort.js +27 -0
- package/dist/sidecarRuntime.js +167 -0
- package/dist/sidecarSelection.js +141 -0
- package/dist/sidecarWire.js +177 -0
- package/dist/sidecarWrites.js +162 -0
- package/dist/simulation.d.ts +391 -0
- package/dist/simulation.js +281 -0
- package/dist/simulationAuthoring.js +28 -0
- package/dist/simulationBytes.js +26 -0
- package/dist/simulationConformance.js +304 -0
- package/dist/simulationInputHistoryCapture.js +34 -0
- package/dist/simulationInputHistoryWire.js +192 -0
- package/dist/simulationOptionsWire.js +77 -0
- package/dist/simulationRecoveryWire.js +133 -0
- package/dist/simulationReplay.js +126 -0
- package/dist/simulationSnapshotWire.js +111 -0
- package/dist/simulationState.js +177 -0
- package/dist/snapshotBlob.js +125 -0
- package/dist/snapshotBlobCleanup.js +92 -0
- package/dist/snapshotBlobIndex.js +37 -0
- package/dist/snapshotBudget.js +79 -0
- package/dist/snapshotChain.js +184 -0
- package/dist/snapshotErasure.js +171 -0
- package/dist/snapshotInspection.js +104 -0
- package/dist/snapshotSegmentBlobs.js +57 -0
- package/dist/snapshotUploads.js +165 -0
- package/dist/socketTransport.js +252 -0
- package/dist/spatial.js +103 -0
- package/dist/spectatorPolicy.js +25 -0
- package/dist/spectatorProducer.js +88 -0
- package/dist/startFailureCause.js +3 -0
- package/dist/stateCodec.js +657 -0
- package/dist/strategies.d.ts +210 -0
- package/dist/strategies.js +8 -0
- package/dist/strategiesServer.d.ts +286 -0
- package/dist/strategiesServer.js +11 -0
- package/dist/strategyFixtures.js +181 -0
- package/dist/streamFraming.js +121 -0
- package/dist/streamTransport.js +265 -0
- package/dist/subjectAdmission.js +49 -0
- package/dist/subjectPrivacy.js +280 -0
- package/dist/subjectPrivacyBinding.js +89 -0
- package/dist/systemManifest.js +181 -0
- package/dist/tables.js +158 -0
- package/dist/testHarness.js +88 -0
- package/dist/testing.d.ts +3684 -0
- package/dist/testing.js +220 -0
- package/dist/testingPorts.js +270 -0
- package/dist/testingServer.d.ts +4060 -0
- package/dist/testingServer.js +18 -0
- package/dist/transform.d.ts +692 -0
- package/dist/transform.js +216 -0
- package/dist/transform3d.js +117 -0
- package/dist/transformCollection.js +23 -0
- package/dist/transformCollection3d.js +23 -0
- package/dist/transformCollectionCore.js +155 -0
- package/dist/transformFrames.js +120 -0
- package/dist/transformPrediction3d.js +126 -0
- package/dist/transformRules.js +122 -0
- package/dist/transformSchemas.js +19 -0
- package/dist/transport.js +31 -0
- package/dist/transportAuthoring.js +28 -0
- package/dist/transportCleanup.js +21 -0
- package/dist/transportConformance.js +123 -0
- package/dist/transportConnector.js +81 -0
- package/dist/transportEndpoints.js +37 -0
- package/dist/transportsServer.d.ts +5515 -0
- package/dist/transportsServer.js +6 -0
- package/dist/viewProjection.js +15 -0
- package/dist/web.d.ts +2286 -0
- package/dist/web.js +517 -0
- package/dist/webTransportClient.js +172 -0
- package/dist/wire.d.ts +992 -0
- package/dist/wire.js +491 -0
- package/dist/withdrawalPort.js +27 -0
- package/dist/world.d.ts +1894 -0
- package/dist/world.js +332 -0
- package/dist/worldActorReceipts.js +47 -0
- package/dist/worldActorTransferSnapshot.js +13 -0
- package/dist/worldAdmissionPending.js +7 -0
- package/dist/worldBoundaryCoordinator.js +147 -0
- package/dist/worldCatalog.js +80 -0
- package/dist/worldCellAllocation.js +202 -0
- package/dist/worldCellDestination.js +67 -0
- package/dist/worldCells.js +488 -0
- package/dist/worldChange.js +31 -0
- package/dist/worldClient.js +663 -0
- package/dist/worldClientControl.js +140 -0
- package/dist/worldClientPendingInput.js +15 -0
- package/dist/worldClientRpc.js +132 -0
- package/dist/worldClientRpcRoutes.js +42 -0
- package/dist/worldClientSchemas.js +27 -0
- package/dist/worldCommands.js +139 -0
- package/dist/worldData.js +41 -0
- package/dist/worldDefaultBinding.js +376 -0
- package/dist/worldDefaultGroupAdmission.js +81 -0
- package/dist/worldDefaultGroupAppServices.js +30 -0
- package/dist/worldDefaultGroupCompensation.js +108 -0
- package/dist/worldDefaultGroupContinuation.js +95 -0
- package/dist/worldDefaultGroupControl.js +71 -0
- package/dist/worldDefaultGroupMembers.js +84 -0
- package/dist/worldDefaultGroups.js +20 -0
- package/dist/worldDefaultPending.js +78 -0
- package/dist/worldDefaultService.js +244 -0
- package/dist/worldEntities.js +2979 -0
- package/dist/worldEntityCodec.js +20 -0
- package/dist/worldEntityHandoffView.js +153 -0
- package/dist/worldGeometry.js +169 -0
- package/dist/worldGhostAdmission.js +64 -0
- package/dist/worldGhostDestination.js +117 -0
- package/dist/worldGhostGateway.js +131 -0
- package/dist/worldGhostHandshake.js +107 -0
- package/dist/worldGhostHost.js +41 -0
- package/dist/worldGhostIngress.js +131 -0
- package/dist/worldGhostNeighborhood.js +69 -0
- package/dist/worldGhostNeighbors.js +85 -0
- package/dist/worldGhostOutbound.js +109 -0
- package/dist/worldGhostPublisher.js +215 -0
- package/dist/worldGhostReceiver.js +212 -0
- package/dist/worldGhostSender.js +145 -0
- package/dist/worldGhostSocket.js +77 -0
- package/dist/worldGhostWire.js +171 -0
- package/dist/worldGroupCommand.js +48 -0
- package/dist/worldGroupDeadline.js +114 -0
- package/dist/worldGroupPreparation.js +114 -0
- package/dist/worldGroupReadyControl.js +127 -0
- package/dist/worldGroupSupervisor.js +119 -0
- package/dist/worldHandoffMetrics.js +58 -0
- package/dist/worldHandoffView.js +99 -0
- package/dist/worldHostSource.js +68 -0
- package/dist/worldInspectEndpoint.js +249 -0
- package/dist/worldInspection.js +108 -0
- package/dist/worldInstanceAdmission.js +30 -0
- package/dist/worldInstanceAllocation.js +115 -0
- package/dist/worldInstanceDestination.js +63 -0
- package/dist/worldInstanceExpiry.js +281 -0
- package/dist/worldInstanceExpirySupervisor.js +87 -0
- package/dist/worldInstanceLifecycle.js +102 -0
- package/dist/worldInstanceState.js +51 -0
- package/dist/worldInstances.js +477 -0
- package/dist/worldJoin.js +55 -0
- package/dist/worldLayers.js +150 -0
- package/dist/worldLeases.js +77 -0
- package/dist/worldManifest.js +24 -0
- package/dist/worldMovement.js +62 -0
- package/dist/worldPersistence.js +133 -0
- package/dist/worldProjection.js +220 -0
- package/dist/worldReact.js +109 -0
- package/dist/worldRecoveryActor.js +34 -0
- package/dist/worldReturnAnchor.js +48 -0
- package/dist/worldRoomHooks.js +56 -0
- package/dist/worldRoomPool.js +26 -0
- package/dist/worldRoomSteps.js +132 -0
- package/dist/worldSeatBinding.js +35 -0
- package/dist/worldServer.d.ts +6936 -0
- package/dist/worldServer.js +48 -0
- package/dist/worldSourceSeatPending.js +8 -0
- package/dist/worldStrategyFixtures.js +163 -0
- package/dist/worldTesting.js +26 -0
- package/dist/worldTransitionDefaults.js +197 -0
- package/dist/worldTransitionExecutor.js +518 -0
- package/dist/worldTransitionGroup.js +112 -0
- package/dist/worldTransitionPhysicalSteps.js +39 -0
- package/dist/worldTransitionResolver.js +227 -0
- package/dist/worldTransitionSeatGroup.js +63 -0
- package/dist/worldTransitionSeats.js +259 -0
- package/dist/worldTransitionState.js +94 -0
- package/dist/worldTransitions.js +100 -0
- package/package.json +189 -4
|
@@ -0,0 +1,1429 @@
|
|
|
1
|
+
import { Duration } from 'effect';
|
|
2
|
+
import { Schema } from 'effect';
|
|
3
|
+
|
|
4
|
+
/** Configuration consumers never invoke a player callback. Its player type
|
|
5
|
+
* stays author-owned; this inventory type does not erase it into an input. */
|
|
6
|
+
declare type AnyWorldDescriptor = WorldDescriptor<never>;
|
|
7
|
+
|
|
8
|
+
export declare const captureGeometryAssetManifest: (offered: unknown, maxAssets?: number, maxBytes?: number) => GeometryAssetManifest;
|
|
9
|
+
|
|
10
|
+
export declare const captureGeometryAssetReadGrant: (offered: unknown) => GeometryAssetReadGrant;
|
|
11
|
+
|
|
12
|
+
export declare const captureGeometryAssetReadRequest: (offered: unknown) => GeometryAssetReadRequest;
|
|
13
|
+
|
|
14
|
+
export declare const captureGeometryAssetReference: (offered: unknown) => GeometryAssetReference;
|
|
15
|
+
|
|
16
|
+
export declare const captureGeometryAssetRoot: (offered: unknown) => GeometryAssetRoot;
|
|
17
|
+
|
|
18
|
+
export declare const captureGeometryStreamManifest: (offered: unknown, maximumChunks?: number, maximumBytes?: number) => GeometryStreamManifest;
|
|
19
|
+
|
|
20
|
+
export declare const decodeGeometryChunkHttpScope: (value: string | null) => GeometryPersistenceScope;
|
|
21
|
+
|
|
22
|
+
/** Greatest admitted common divisor at or below the requested stride. Endpoint
|
|
23
|
+
* samples and exact raw extent remain unchanged; no averaging/float quantizer. */
|
|
24
|
+
export declare const defaultGeometryHeightfieldLodStride: GeometryHeightfieldLodStride;
|
|
25
|
+
|
|
26
|
+
export declare interface GeometryAdminClient {
|
|
27
|
+
reload(roomId: string, request: RoomGeometryReloadRequest, signal?: AbortSignal): Promise<void>;
|
|
28
|
+
rollback(roomId: string, request: RoomGeometryRollbackRequest, signal?: AbortSignal): Promise<void>;
|
|
29
|
+
observation(): GeometryAdminClientObservation;
|
|
30
|
+
/** Join accepted calls; unknown requests must resolve by exact explicit retry. */
|
|
31
|
+
close(): Promise<void>;
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
export declare interface GeometryAdminClientObservation {
|
|
35
|
+
readonly phase: 'open' | 'draining' | 'closed';
|
|
36
|
+
readonly pending: number;
|
|
37
|
+
readonly unconfirmed: number;
|
|
38
|
+
readonly retainedBytes: number;
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
export declare interface GeometryAdminClientOptions {
|
|
42
|
+
readonly caller: GeometryAdminRpcCaller;
|
|
43
|
+
readonly maxRetainedRequests?: number;
|
|
44
|
+
readonly maxRetainedBytes?: number;
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
export declare interface GeometryAdminRpcCaller {
|
|
48
|
+
/** Normal authenticated RPC caller; no credentials are accepted in this port. */
|
|
49
|
+
call(tag: GeometryAdminRpcTag, input: {
|
|
50
|
+
readonly roomId: string;
|
|
51
|
+
readonly request: RoomGeometryReloadRequest | RoomGeometryRollbackRequest;
|
|
52
|
+
}, options: {
|
|
53
|
+
readonly signal?: AbortSignal;
|
|
54
|
+
}): Promise<unknown>;
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
export declare type GeometryAdminRpcTag = 'rooms.geometry.reload' | 'rooms.geometry.rollback';
|
|
58
|
+
|
|
59
|
+
declare interface GeometryArtifact<C extends GeometryChunk = GeometryChunk> {
|
|
60
|
+
readonly chunk: C;
|
|
61
|
+
readonly blobSha256: string;
|
|
62
|
+
/** Canonical declared content/layout, excluding actual address/version only. */
|
|
63
|
+
readonly contentSha256: string;
|
|
64
|
+
bytes(): Uint8Array;
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
declare type GeometryArtifactLimits<K extends GeometryKind> = K extends '2d-tiles' ? Partial<GeometryTileLimits> : K extends '2d-heightfield' ? Partial<GeometryHeightfieldLimits> : K extends '3d-shapes' ? Partial<GeometryShapesLimits> : Partial<GeometryVoxelLimits>;
|
|
68
|
+
|
|
69
|
+
export declare interface GeometryAssetBundle {
|
|
70
|
+
readonly root: GeometryAssetRoot;
|
|
71
|
+
preload(signal: AbortSignal): Promise<void>;
|
|
72
|
+
at(key: string): GeometryVerifiedAsset;
|
|
73
|
+
observation(): {
|
|
74
|
+
readonly totalAssets: number;
|
|
75
|
+
readonly totalBytes: number;
|
|
76
|
+
readonly loadedAssets: number;
|
|
77
|
+
readonly loadedBytes: number;
|
|
78
|
+
readonly active: boolean;
|
|
79
|
+
readonly ready: boolean;
|
|
80
|
+
readonly closed: boolean;
|
|
81
|
+
};
|
|
82
|
+
/** Abort/join this bundle's actual accepted work only. Shared byte-cache and
|
|
83
|
+
* earlier detached aliases remain owned by their actual external lifetimes. */
|
|
84
|
+
close(): Promise<void>;
|
|
85
|
+
}
|
|
86
|
+
|
|
87
|
+
export declare interface GeometryAssetBundleOptions {
|
|
88
|
+
readonly source: Pick<GrantedGeometryAssetCache, 'load'>;
|
|
89
|
+
readonly maxAssets?: number;
|
|
90
|
+
readonly maxManifestBytes?: number;
|
|
91
|
+
readonly maxBytes?: number | undefined;
|
|
92
|
+
readonly maxConcurrent?: number | undefined;
|
|
93
|
+
}
|
|
94
|
+
|
|
95
|
+
export declare interface GeometryAssetGrantClient {
|
|
96
|
+
grant(request: GeometryAssetReadRequest, signal: AbortSignal): Promise<GeometryAssetReadGrant>;
|
|
97
|
+
}
|
|
98
|
+
|
|
99
|
+
export declare interface GeometryAssetManifest extends GeometryAssetRoot {
|
|
100
|
+
readonly assets: ReadonlyArray<GeometryAssetReference>;
|
|
101
|
+
readonly manifestSha256: string;
|
|
102
|
+
}
|
|
103
|
+
|
|
104
|
+
/** Canonical author/catalogue data only, never a grant or physical ownership
|
|
105
|
+
* proof. The actual SQL/CMS source owns publication/rights/erase/export. */
|
|
106
|
+
export declare const geometryAssetManifest: (root: GeometryAssetRoot, offeredAssets: ReadonlyArray<GeometryAssetReference>, maxAssets?: number, maxBytes?: number) => GeometryAssetManifest;
|
|
107
|
+
|
|
108
|
+
export declare interface GeometryAssetReadGrant {
|
|
109
|
+
readonly url: string;
|
|
110
|
+
readonly checksum: string;
|
|
111
|
+
readonly size: number;
|
|
112
|
+
readonly contentType: string;
|
|
113
|
+
}
|
|
114
|
+
|
|
115
|
+
export declare interface GeometryAssetReadRequest extends GeometryAssetRoot {
|
|
116
|
+
readonly key: string;
|
|
117
|
+
}
|
|
118
|
+
|
|
119
|
+
export declare interface GeometryAssetReference {
|
|
120
|
+
readonly key: string;
|
|
121
|
+
readonly fileId: string;
|
|
122
|
+
readonly bucket: string;
|
|
123
|
+
readonly checksum: string;
|
|
124
|
+
readonly size: number;
|
|
125
|
+
readonly contentType: string;
|
|
126
|
+
}
|
|
127
|
+
|
|
128
|
+
export declare interface GeometryAssetRoot {
|
|
129
|
+
readonly tenantId: string;
|
|
130
|
+
readonly worldId: string;
|
|
131
|
+
readonly layerSetId: string;
|
|
132
|
+
readonly version: string;
|
|
133
|
+
}
|
|
134
|
+
|
|
135
|
+
declare type GeometryChunk = GeometryTileChunk | GeometryHeightfieldChunk | GeometryShapesChunk | GeometryVoxelChunk;
|
|
136
|
+
|
|
137
|
+
export declare const geometryChunkHttpHeaders: Readonly<{
|
|
138
|
+
scope: "x-voltro-geometry-scope";
|
|
139
|
+
revision: "x-voltro-geometry-revision";
|
|
140
|
+
contentSha256: "x-voltro-geometry-content-sha256";
|
|
141
|
+
}>;
|
|
142
|
+
|
|
143
|
+
/** Full scoped caller -> locator query only. Tenant/kind are resolved server-side;
|
|
144
|
+
* neither this query nor its coordinates grant read rights. */
|
|
145
|
+
export declare const geometryChunkHttpQuery: (offered: GeometryPersistenceScope) => string;
|
|
146
|
+
|
|
147
|
+
export declare interface GeometryChunkHttpResponse {
|
|
148
|
+
readonly status: 200;
|
|
149
|
+
readonly headers: Readonly<Record<string, string>>;
|
|
150
|
+
readonly body: Uint8Array;
|
|
151
|
+
}
|
|
152
|
+
|
|
153
|
+
/** Actual authorized SQL/source observation -> native binary HTTP response.
|
|
154
|
+
* Helper installs no route/authorization/cache policy or second chunk/Delta
|
|
155
|
+
* format. Caller must select trusted scope and read rights before invoking. */
|
|
156
|
+
export declare const geometryChunkHttpResponse: (offered: GeometryPersistenceObservation, options?: {
|
|
157
|
+
readonly maxBytes?: number | undefined;
|
|
158
|
+
}) => GeometryChunkHttpResponse;
|
|
159
|
+
|
|
160
|
+
export declare interface GeometryClientChunkDownload {
|
|
161
|
+
readonly scope: GeometryPersistenceScope;
|
|
162
|
+
readonly revision: number;
|
|
163
|
+
readonly bytes: Uint8Array;
|
|
164
|
+
readonly blobSha256: string;
|
|
165
|
+
readonly contentSha256: string;
|
|
166
|
+
}
|
|
167
|
+
|
|
168
|
+
/** Actual authorized transport owns its request/stream close and must join it
|
|
169
|
+
* before settling, including abort. SHA/reference possession is not permission. */
|
|
170
|
+
export declare interface GeometryClientChunkSource {
|
|
171
|
+
load(scope: GeometryPersistenceScope, signal: AbortSignal): Promise<GeometryClientChunkDownload>;
|
|
172
|
+
}
|
|
173
|
+
|
|
174
|
+
/** The same pure World field selection for streaming and native render data.
|
|
175
|
+
* Never substitutes a coarse representation for authoritative collision data. */
|
|
176
|
+
export declare const geometryClientFieldsAtDistance: (offeredWorld: AnyWorldDescriptor, offeredDistance: number) => ReadonlyArray<string>;
|
|
177
|
+
|
|
178
|
+
export declare interface GeometryClientInterest {
|
|
179
|
+
readonly scope: GeometryPreparedScope;
|
|
180
|
+
readonly center: GeometryPreparedCoordinate;
|
|
181
|
+
readonly radiusChunks: number;
|
|
182
|
+
readonly prefetchChunks: number;
|
|
183
|
+
readonly visitedCoordinates: number;
|
|
184
|
+
readonly omittedPrefetch: number;
|
|
185
|
+
readonly chunks: ReadonlyArray<GeometryClientInterestEntry>;
|
|
186
|
+
}
|
|
187
|
+
|
|
188
|
+
export declare interface GeometryClientInterestEntry {
|
|
189
|
+
readonly coordinate: GeometryPreparedCoordinate;
|
|
190
|
+
readonly distanceChunks: number;
|
|
191
|
+
readonly role: 'visible' | 'prefetch';
|
|
192
|
+
/** Declared render-field selection only. Native collision snapshots remain
|
|
193
|
+
* whole; this does not invent a coarse encoder/download/asset format. */
|
|
194
|
+
readonly fields: ReadonlyArray<string>;
|
|
195
|
+
}
|
|
196
|
+
|
|
197
|
+
export declare interface GeometryClientInterestOptions {
|
|
198
|
+
readonly maxChunks?: number | undefined;
|
|
199
|
+
readonly maxVisitedCoordinates?: number;
|
|
200
|
+
/** Actual render Transform velocity in raw units/second, never server authority. */
|
|
201
|
+
readonly velocity?: GeometryWorldPointRaw | undefined;
|
|
202
|
+
}
|
|
203
|
+
|
|
204
|
+
export declare interface GeometryClientStaticSource {
|
|
205
|
+
load(reference: GeometryStaticReference, signal: AbortSignal): Promise<GeometryArtifact>;
|
|
206
|
+
}
|
|
207
|
+
|
|
208
|
+
declare type GeometryCollisionDerive = (context: GeometryDerivationContext) => GeometryChunk;
|
|
209
|
+
|
|
210
|
+
declare type GeometryCompaction = (context: GeometryCompactionContext) => GeometryPatch;
|
|
211
|
+
|
|
212
|
+
/** Genuine immutable native artifacts only. Compaction preserves the current
|
|
213
|
+
* truth; it cannot authorize a different edit, owner, revision or SQL write. */
|
|
214
|
+
declare interface GeometryCompactionContext {
|
|
215
|
+
readonly static: GeometryArtifact;
|
|
216
|
+
readonly current: GeometryArtifact;
|
|
217
|
+
readonly limits: GeometryPatchLimits;
|
|
218
|
+
readonly codecLimits: GeometryArtifactLimits<GeometryKind>;
|
|
219
|
+
}
|
|
220
|
+
|
|
221
|
+
declare interface GeometryCompactionStrategies {
|
|
222
|
+
readonly compaction: GeometryCompaction;
|
|
223
|
+
}
|
|
224
|
+
|
|
225
|
+
declare interface GeometryDeltaMigrationFrom {
|
|
226
|
+
readonly static: GeometryArtifact;
|
|
227
|
+
readonly current: GeometryArtifact;
|
|
228
|
+
readonly revision: number;
|
|
229
|
+
}
|
|
230
|
+
|
|
231
|
+
declare interface GeometryDeltaMigrationTo {
|
|
232
|
+
readonly static: GeometryArtifact;
|
|
233
|
+
}
|
|
234
|
+
|
|
235
|
+
/** Outside-Tick native data only. No query callback, provider, actor, Store or
|
|
236
|
+
* authority capability is accepted as a derivation result. */
|
|
237
|
+
declare interface GeometryDerivationContext {
|
|
238
|
+
readonly chunk: GeometryChunk;
|
|
239
|
+
readonly codecLimits: GeometryArtifactLimits<GeometryKind>;
|
|
240
|
+
}
|
|
241
|
+
|
|
242
|
+
declare interface GeometryDerivationStrategies {
|
|
243
|
+
readonly collisionDerive: GeometryCollisionDerive;
|
|
244
|
+
readonly navDerive: GeometryNavDerive;
|
|
245
|
+
}
|
|
246
|
+
|
|
247
|
+
export declare interface GeometryDirtyChunkReference {
|
|
248
|
+
readonly scope: GeometryPersistenceScope;
|
|
249
|
+
readonly revision: number;
|
|
250
|
+
readonly blobSha256: string;
|
|
251
|
+
readonly contentSha256: string;
|
|
252
|
+
}
|
|
253
|
+
|
|
254
|
+
/** Trusted server snapshot. Never derive these rights, positions, budgets or
|
|
255
|
+
* catalogs from the intent body. App policy must recheck authority at commit. */
|
|
256
|
+
declare interface GeometryEditAuthority {
|
|
257
|
+
readonly dynamicEnabled: boolean;
|
|
258
|
+
readonly ownsChunk: boolean;
|
|
259
|
+
readonly canBuild: boolean;
|
|
260
|
+
readonly cooldownReady: boolean;
|
|
261
|
+
readonly remainingOps: number;
|
|
262
|
+
readonly maxReachRaw: number;
|
|
263
|
+
readonly maxHeightUnits: number;
|
|
264
|
+
readonly position: {
|
|
265
|
+
readonly xRaw: number;
|
|
266
|
+
readonly yRaw: number;
|
|
267
|
+
readonly zRaw: number;
|
|
268
|
+
};
|
|
269
|
+
readonly materials: ReadonlyArray<GeometryTileMaterial>;
|
|
270
|
+
readonly shapes: ReadonlyArray<GeometryShapeTemplate>;
|
|
271
|
+
}
|
|
272
|
+
|
|
273
|
+
declare interface GeometryEditContext {
|
|
274
|
+
readonly chunk: GeometryChunk;
|
|
275
|
+
readonly intent: GeometryEditIntent;
|
|
276
|
+
readonly authority: GeometryEditAuthority;
|
|
277
|
+
readonly placementId: string;
|
|
278
|
+
readonly codecLimits?: GeometryArtifactLimits<GeometryKind> | undefined;
|
|
279
|
+
}
|
|
280
|
+
|
|
281
|
+
/** Player requests an action and its target, never solidity, shape dimensions,
|
|
282
|
+
* an authoritative player position, revision, owner, full chunk or Delta bytes. */
|
|
283
|
+
declare type GeometryEditIntent = {
|
|
284
|
+
readonly op: 'setTile';
|
|
285
|
+
readonly x: number;
|
|
286
|
+
readonly y: number;
|
|
287
|
+
readonly material: string;
|
|
288
|
+
} | {
|
|
289
|
+
readonly op: 'raiseHeight';
|
|
290
|
+
readonly x: number;
|
|
291
|
+
readonly y: number;
|
|
292
|
+
readonly units: number;
|
|
293
|
+
} | {
|
|
294
|
+
readonly op: 'setVoxel';
|
|
295
|
+
readonly x: number;
|
|
296
|
+
readonly y: number;
|
|
297
|
+
readonly z: number;
|
|
298
|
+
readonly material: string;
|
|
299
|
+
} | {
|
|
300
|
+
readonly op: 'placeShape';
|
|
301
|
+
readonly template: string;
|
|
302
|
+
readonly xRaw: number;
|
|
303
|
+
readonly yRaw: number;
|
|
304
|
+
readonly zRaw: number;
|
|
305
|
+
} | {
|
|
306
|
+
readonly op: 'removeShape';
|
|
307
|
+
readonly id: string;
|
|
308
|
+
};
|
|
309
|
+
|
|
310
|
+
declare interface GeometryEditStrategies {
|
|
311
|
+
/** Pure policy slot. Current native Session/SQL ownership and codec integrity cannot be overridden by this slot. */
|
|
312
|
+
readonly opValidator: (context: GeometryEditContext) => void;
|
|
313
|
+
/** Pure rule slot; returned chunk is admitted under the original identity/layout/profile. */
|
|
314
|
+
readonly applyOp: (context: GeometryEditContext) => GeometryChunk;
|
|
315
|
+
}
|
|
316
|
+
|
|
317
|
+
declare type GeometryGenerator = (context: GeometryProceduralContext) => GeometryChunk;
|
|
318
|
+
|
|
319
|
+
declare type GeometryHeightfieldChunk = (typeof GeometryHeightfieldChunkSchema)["Type"];
|
|
320
|
+
|
|
321
|
+
declare const GeometryHeightfieldChunkSchema: Schema.Struct<{
|
|
322
|
+
readonly kind: Schema.Literal<"2d-heightfield">;
|
|
323
|
+
readonly formatVersion: Schema.Literal<1>;
|
|
324
|
+
readonly address: Schema.Struct<{
|
|
325
|
+
readonly worldId: Schema.String;
|
|
326
|
+
readonly layerSetId: Schema.String;
|
|
327
|
+
readonly cx: Schema.Int;
|
|
328
|
+
readonly cy: Schema.Int;
|
|
329
|
+
}>;
|
|
330
|
+
readonly version: Schema.String;
|
|
331
|
+
readonly width: Schema.Int;
|
|
332
|
+
readonly height: Schema.Int;
|
|
333
|
+
readonly sampleSpacingRaw: Schema.Int;
|
|
334
|
+
readonly baseHeightRaw: Schema.Int;
|
|
335
|
+
readonly heightQuantumRaw: Schema.Int;
|
|
336
|
+
readonly heights: Schema.$Array<Schema.Int>;
|
|
337
|
+
}>;
|
|
338
|
+
|
|
339
|
+
declare interface GeometryHeightfieldLimits {
|
|
340
|
+
readonly maxSide: number;
|
|
341
|
+
readonly maxSamples: number;
|
|
342
|
+
readonly maxBytes: number;
|
|
343
|
+
}
|
|
344
|
+
|
|
345
|
+
export declare interface GeometryHeightfieldLodOptions {
|
|
346
|
+
readonly maxStride?: number;
|
|
347
|
+
readonly maxSamples?: number | undefined;
|
|
348
|
+
readonly codecLimits?: Partial<GeometryHeightfieldLimits> | undefined;
|
|
349
|
+
readonly strategies?: {
|
|
350
|
+
readonly sampleStride?: GeometryHeightfieldLodStride;
|
|
351
|
+
} | undefined;
|
|
352
|
+
}
|
|
353
|
+
|
|
354
|
+
export declare type GeometryHeightfieldLodStride = (chunk: GeometryHeightfieldChunk, maxStride: number) => number;
|
|
355
|
+
|
|
356
|
+
declare interface GeometryHeightfieldView {
|
|
357
|
+
readonly chunk: GeometryHeightfieldChunk;
|
|
358
|
+
heightAtSample(x: number, y: number): number;
|
|
359
|
+
heightAtRaw(xRaw: number, yRaw: number): number;
|
|
360
|
+
}
|
|
361
|
+
|
|
362
|
+
export declare interface GeometryHttpChunkSourceOptions {
|
|
363
|
+
/** Actual registered/authenticated endpoint or granted URL. No locator,
|
|
364
|
+
* credentials, scope grant or static version is inferred from a digest. */
|
|
365
|
+
readonly urlFor: (scope: GeometryPersistenceScope) => string;
|
|
366
|
+
readonly fetch?: typeof globalThis.fetch;
|
|
367
|
+
readonly maxResponseBytes?: number;
|
|
368
|
+
readonly maxReadChunks?: number;
|
|
369
|
+
}
|
|
370
|
+
|
|
371
|
+
export declare interface GeometryHttpStaticSourceOptions {
|
|
372
|
+
/** Actual storage/CDN read grant; scope/digest never creates a locator. */
|
|
373
|
+
readonly urlFor: (reference: GeometryStaticReference) => string;
|
|
374
|
+
readonly fetch?: typeof globalThis.fetch;
|
|
375
|
+
readonly maxResponseBytes?: number;
|
|
376
|
+
readonly maxReadChunks?: number;
|
|
377
|
+
readonly codecLimits?: {
|
|
378
|
+
readonly [K in GeometryKind]?: GeometryArtifactLimits<K>;
|
|
379
|
+
} | undefined;
|
|
380
|
+
}
|
|
381
|
+
|
|
382
|
+
declare type GeometryKind = GeometryChunk['kind'];
|
|
383
|
+
|
|
384
|
+
export declare type GeometryManifestIdentity = Pick<GeometryPreparedScope, 'tenantId' | 'kind' | 'worldId' | 'layerSetId'>;
|
|
385
|
+
|
|
386
|
+
/** Pure native data rule only; no SQL, actor, journal, permission or Subject. */
|
|
387
|
+
declare type GeometryMigrateDelta = (from: GeometryDeltaMigrationFrom, to: GeometryDeltaMigrationTo) => GeometryChunk | null;
|
|
388
|
+
|
|
389
|
+
declare type GeometryNavDerive = (context: GeometryDerivationContext) => GeometryTileChunk | null;
|
|
390
|
+
|
|
391
|
+
declare interface GeometryPatch {
|
|
392
|
+
readonly metadata: GeometryPatchMetadata;
|
|
393
|
+
bytes(): Uint8Array;
|
|
394
|
+
}
|
|
395
|
+
|
|
396
|
+
declare interface GeometryPatchLimits {
|
|
397
|
+
readonly maxBytes: number;
|
|
398
|
+
readonly maxMetadataBytes: number;
|
|
399
|
+
}
|
|
400
|
+
|
|
401
|
+
declare type GeometryPatchMetadata = (typeof GeometryPatchMetadataSchema)["Type"];
|
|
402
|
+
|
|
403
|
+
declare const GeometryPatchMetadataSchema: Schema.Struct<{
|
|
404
|
+
readonly kind: Schema.Literals<readonly ["2d-tiles", "2d-heightfield", "3d-shapes", "3d-voxel"]>;
|
|
405
|
+
readonly formatVersion: Schema.Literal<1>;
|
|
406
|
+
readonly worldId: Schema.String;
|
|
407
|
+
readonly layerSetId: Schema.String;
|
|
408
|
+
readonly cx: Schema.Int;
|
|
409
|
+
readonly cy: Schema.Int;
|
|
410
|
+
readonly cz: Schema.optional<Schema.Int>;
|
|
411
|
+
readonly version: Schema.String;
|
|
412
|
+
readonly baseRevision: Schema.Int;
|
|
413
|
+
readonly revision: Schema.Int;
|
|
414
|
+
readonly baseBlobSha256: Schema.String;
|
|
415
|
+
readonly blobSha256: Schema.String;
|
|
416
|
+
readonly baseContentSha256: Schema.String;
|
|
417
|
+
readonly contentSha256: Schema.String;
|
|
418
|
+
readonly changed: Schema.Boolean;
|
|
419
|
+
readonly stateSchemaHash: Schema.Int;
|
|
420
|
+
}>;
|
|
421
|
+
|
|
422
|
+
declare interface GeometryPersistenceObservation {
|
|
423
|
+
readonly scope: GeometryPersistenceScope;
|
|
424
|
+
readonly revision: number;
|
|
425
|
+
readonly artifact: GeometryArtifact;
|
|
426
|
+
}
|
|
427
|
+
|
|
428
|
+
declare interface GeometryPersistenceScope {
|
|
429
|
+
readonly tenantId: string;
|
|
430
|
+
readonly kind: GeometryKind;
|
|
431
|
+
readonly worldId: string;
|
|
432
|
+
readonly version: string;
|
|
433
|
+
readonly layerSetId: string;
|
|
434
|
+
readonly cx: number;
|
|
435
|
+
readonly cy: number;
|
|
436
|
+
readonly cz?: number | undefined;
|
|
437
|
+
}
|
|
438
|
+
|
|
439
|
+
declare interface GeometryPersistenceSubject {
|
|
440
|
+
readonly id: string;
|
|
441
|
+
readonly kind: 'user' | 'guest';
|
|
442
|
+
}
|
|
443
|
+
|
|
444
|
+
declare interface GeometryPointRaw3D {
|
|
445
|
+
readonly xRaw: number;
|
|
446
|
+
readonly yRaw: number;
|
|
447
|
+
readonly zRaw: number;
|
|
448
|
+
}
|
|
449
|
+
|
|
450
|
+
declare interface GeometryPreparedCoordinate {
|
|
451
|
+
readonly cx: number;
|
|
452
|
+
readonly cy: number;
|
|
453
|
+
readonly cz?: number | undefined;
|
|
454
|
+
}
|
|
455
|
+
|
|
456
|
+
declare type GeometryPreparedEntry = PreparedCommon & GeometryPreparedView & {
|
|
457
|
+
/** Independently prepared native collision data. Original view/artifact remains the edit/rebuild baseline. */
|
|
458
|
+
readonly collision: GeometryPreparedView;
|
|
459
|
+
readonly navigation: GeometryTileView | null;
|
|
460
|
+
};
|
|
461
|
+
|
|
462
|
+
declare interface GeometryPreparedInventory {
|
|
463
|
+
readonly scope: GeometryPreparedScope;
|
|
464
|
+
readonly entries: ReadonlyArray<GeometryPreparedEntry>;
|
|
465
|
+
readonly accountedBytes: number;
|
|
466
|
+
/** CPU-only lookup; absence is explicit, never an empty collision chunk. */
|
|
467
|
+
at(coordinate: GeometryPreparedCoordinate): GeometryPreparedEntry;
|
|
468
|
+
contains(coordinate: GeometryPreparedCoordinate): boolean;
|
|
469
|
+
}
|
|
470
|
+
|
|
471
|
+
declare interface GeometryPreparedScope {
|
|
472
|
+
readonly tenantId: string;
|
|
473
|
+
readonly kind: GeometryKind;
|
|
474
|
+
readonly worldId: string;
|
|
475
|
+
readonly layerSetId: string;
|
|
476
|
+
readonly version: string;
|
|
477
|
+
}
|
|
478
|
+
|
|
479
|
+
declare type GeometryPreparedView = ({
|
|
480
|
+
readonly kind: '2d-tiles';
|
|
481
|
+
readonly view: GeometryTileView;
|
|
482
|
+
} | {
|
|
483
|
+
readonly kind: '2d-heightfield';
|
|
484
|
+
readonly view: GeometryHeightfieldView;
|
|
485
|
+
} | {
|
|
486
|
+
readonly kind: '3d-shapes';
|
|
487
|
+
readonly view: GeometryShapesView;
|
|
488
|
+
} | {
|
|
489
|
+
readonly kind: '3d-voxel';
|
|
490
|
+
readonly view: GeometryVoxelView;
|
|
491
|
+
});
|
|
492
|
+
|
|
493
|
+
declare interface GeometryProceduralContext {
|
|
494
|
+
readonly seed: number;
|
|
495
|
+
readonly kind: GeometryKind;
|
|
496
|
+
readonly address: GeometryChunk['address'];
|
|
497
|
+
readonly version: string;
|
|
498
|
+
}
|
|
499
|
+
|
|
500
|
+
export declare interface GeometryReadGrantClient {
|
|
501
|
+
grant(reference: GeometryStaticReference, signal: AbortSignal): Promise<string>;
|
|
502
|
+
}
|
|
503
|
+
|
|
504
|
+
export declare interface GeometryRenderLod {
|
|
505
|
+
readonly fields: ReadonlyArray<string>;
|
|
506
|
+
readonly sampleStride: number;
|
|
507
|
+
readonly sourceBlobSha256: string;
|
|
508
|
+
readonly sourceContentSha256: string;
|
|
509
|
+
readonly artifact: GeometryArtifact;
|
|
510
|
+
/** Present when both full heights and heightsCoarse are selected. */
|
|
511
|
+
readonly coarseArtifact?: GeometryArtifact;
|
|
512
|
+
}
|
|
513
|
+
|
|
514
|
+
export declare interface GeometryRenderLodCache {
|
|
515
|
+
prepare(coordinate: GeometryPreparedCoordinate, distanceChunks: number): Promise<GeometryRenderLod>;
|
|
516
|
+
at(coordinate: GeometryPreparedCoordinate, distanceChunks: number): GeometryRenderLod;
|
|
517
|
+
observation(): {
|
|
518
|
+
readonly entries: number;
|
|
519
|
+
readonly encodedBytes: number;
|
|
520
|
+
readonly jobs: number;
|
|
521
|
+
readonly closed: boolean;
|
|
522
|
+
readonly withdrawn: boolean;
|
|
523
|
+
};
|
|
524
|
+
/** Clears owned references and joins all accepted preparation/hash work. It
|
|
525
|
+
* never closes the borrowed native cache/Session or erases earlier aliases. */
|
|
526
|
+
close(): Promise<void>;
|
|
527
|
+
}
|
|
528
|
+
|
|
529
|
+
export declare interface GeometryRenderLodCacheOptions {
|
|
530
|
+
readonly maxEntries?: number;
|
|
531
|
+
readonly maxEncodedBytes?: number;
|
|
532
|
+
readonly maxConcurrent?: number | undefined;
|
|
533
|
+
readonly lod?: GeometryHeightfieldLodOptions;
|
|
534
|
+
readonly strategies?: {
|
|
535
|
+
readonly prepare?: GeometryRenderLodPreparer;
|
|
536
|
+
} | undefined;
|
|
537
|
+
}
|
|
538
|
+
|
|
539
|
+
export declare type GeometryRenderLodPreparer = (world: AnyWorldDescriptor, artifact: GeometryArtifact, distanceChunks: number, options: GeometryHeightfieldLodOptions) => Promise<GeometryRenderLod>;
|
|
540
|
+
|
|
541
|
+
export declare const geometryRpcAssetGrants: (offered: RoomRpcCaller) => GeometryAssetGrantClient;
|
|
542
|
+
|
|
543
|
+
export declare const geometryRpcReadGrants: (offered: RoomRpcCaller) => GeometryReadGrantClient;
|
|
544
|
+
|
|
545
|
+
declare type GeometryShape = (typeof GeometryShapeSchema)["Type"];
|
|
546
|
+
|
|
547
|
+
declare const GeometryShapeSchema: Schema.Union<readonly [Schema.Struct<{
|
|
548
|
+
readonly halfXRaw: Schema.Int;
|
|
549
|
+
readonly halfYRaw: Schema.Int;
|
|
550
|
+
readonly halfZRaw: Schema.Int;
|
|
551
|
+
readonly id: Schema.String;
|
|
552
|
+
readonly xRaw: Schema.Int;
|
|
553
|
+
readonly yRaw: Schema.Int;
|
|
554
|
+
readonly zRaw: Schema.Int;
|
|
555
|
+
readonly kind: Schema.Literal<"aabb">;
|
|
556
|
+
}>, Schema.Struct<{
|
|
557
|
+
readonly radiusRaw: Schema.Int;
|
|
558
|
+
readonly id: Schema.String;
|
|
559
|
+
readonly xRaw: Schema.Int;
|
|
560
|
+
readonly yRaw: Schema.Int;
|
|
561
|
+
readonly zRaw: Schema.Int;
|
|
562
|
+
readonly kind: Schema.Literal<"sphere">;
|
|
563
|
+
}>]>;
|
|
564
|
+
|
|
565
|
+
declare type GeometryShapesChunk = (typeof GeometryShapesChunkSchema)["Type"];
|
|
566
|
+
|
|
567
|
+
declare const GeometryShapesChunkSchema: Schema.Struct<{
|
|
568
|
+
readonly kind: Schema.Literal<"3d-shapes">;
|
|
569
|
+
readonly formatVersion: Schema.Literal<1>;
|
|
570
|
+
readonly address: Schema.Struct<{
|
|
571
|
+
readonly worldId: Schema.String;
|
|
572
|
+
readonly layerSetId: Schema.String;
|
|
573
|
+
readonly cx: Schema.Int;
|
|
574
|
+
readonly cy: Schema.Int;
|
|
575
|
+
readonly cz: Schema.Int;
|
|
576
|
+
}>;
|
|
577
|
+
readonly version: Schema.String;
|
|
578
|
+
readonly extentXRaw: Schema.Int;
|
|
579
|
+
readonly extentYRaw: Schema.Int;
|
|
580
|
+
readonly extentZRaw: Schema.Int;
|
|
581
|
+
readonly shapes: Schema.$Array<Schema.Union<readonly [Schema.Struct<{
|
|
582
|
+
readonly halfXRaw: Schema.Int;
|
|
583
|
+
readonly halfYRaw: Schema.Int;
|
|
584
|
+
readonly halfZRaw: Schema.Int;
|
|
585
|
+
readonly id: Schema.String;
|
|
586
|
+
readonly xRaw: Schema.Int;
|
|
587
|
+
readonly yRaw: Schema.Int;
|
|
588
|
+
readonly zRaw: Schema.Int;
|
|
589
|
+
readonly kind: Schema.Literal<"aabb">;
|
|
590
|
+
}>, Schema.Struct<{
|
|
591
|
+
readonly radiusRaw: Schema.Int;
|
|
592
|
+
readonly id: Schema.String;
|
|
593
|
+
readonly xRaw: Schema.Int;
|
|
594
|
+
readonly yRaw: Schema.Int;
|
|
595
|
+
readonly zRaw: Schema.Int;
|
|
596
|
+
readonly kind: Schema.Literal<"sphere">;
|
|
597
|
+
}>]>>;
|
|
598
|
+
}>;
|
|
599
|
+
|
|
600
|
+
declare interface GeometryShapesLimits {
|
|
601
|
+
readonly maxShapes: number;
|
|
602
|
+
readonly maxBytes: number;
|
|
603
|
+
}
|
|
604
|
+
|
|
605
|
+
declare interface GeometryShapesView {
|
|
606
|
+
readonly chunk: GeometryShapesChunk;
|
|
607
|
+
containingRaw(point: GeometryPointRaw3D, maximumShapes?: number): ReadonlyArray<GeometryShape>;
|
|
608
|
+
/** Closed LOCAL segment and native volumes. Canonical ID order, not distance
|
|
609
|
+
* order; no first-hit fraction or cross-chunk ownership is implied. */
|
|
610
|
+
intersectingSegmentRaw(from: GeometryPointRaw3D, to: GeometryPointRaw3D, maximumShapes?: number): ReadonlyArray<GeometryShape>;
|
|
611
|
+
}
|
|
612
|
+
|
|
613
|
+
declare type GeometryShapeTemplate = {
|
|
614
|
+
readonly key: string;
|
|
615
|
+
readonly kind: 'aabb';
|
|
616
|
+
readonly halfXRaw: number;
|
|
617
|
+
readonly halfYRaw: number;
|
|
618
|
+
readonly halfZRaw: number;
|
|
619
|
+
} | {
|
|
620
|
+
readonly key: string;
|
|
621
|
+
readonly kind: 'sphere';
|
|
622
|
+
readonly radiusRaw: number;
|
|
623
|
+
};
|
|
624
|
+
|
|
625
|
+
declare type GeometrySource = {
|
|
626
|
+
readonly _tag: 'GeometrySource';
|
|
627
|
+
readonly kind: 'cms';
|
|
628
|
+
readonly key: string;
|
|
629
|
+
readonly channel: string;
|
|
630
|
+
} | {
|
|
631
|
+
readonly _tag: 'GeometrySource';
|
|
632
|
+
readonly kind: 'imported';
|
|
633
|
+
readonly directory: string;
|
|
634
|
+
} | {
|
|
635
|
+
readonly _tag: 'GeometrySource';
|
|
636
|
+
readonly kind: 'procedural';
|
|
637
|
+
readonly seed: number;
|
|
638
|
+
readonly generator: GeometryGenerator;
|
|
639
|
+
};
|
|
640
|
+
|
|
641
|
+
declare interface GeometryStaticReference extends GeometryPersistenceScope {
|
|
642
|
+
readonly blobSha256: string;
|
|
643
|
+
readonly contentSha256: string;
|
|
644
|
+
}
|
|
645
|
+
|
|
646
|
+
/** Authorized layer-set projection of an immutable version plus independently
|
|
647
|
+
* observed SQL dirty revisions, not one global actor frame or a read grant. */
|
|
648
|
+
export declare interface GeometryStreamManifest {
|
|
649
|
+
readonly scope: GeometryPreparedScope;
|
|
650
|
+
readonly manifestSha256: string;
|
|
651
|
+
readonly chunks: ReadonlyArray<GeometryStaticReference>;
|
|
652
|
+
readonly dirtyChunks: ReadonlyArray<GeometryDirtyChunkReference>;
|
|
653
|
+
}
|
|
654
|
+
|
|
655
|
+
declare interface GeometryTileCellBounds {
|
|
656
|
+
readonly minXRaw: number;
|
|
657
|
+
readonly minYRaw: number;
|
|
658
|
+
readonly maxXRaw: number;
|
|
659
|
+
readonly maxYRaw: number;
|
|
660
|
+
}
|
|
661
|
+
|
|
662
|
+
declare type GeometryTileChunk = (typeof GeometryTileChunkSchema)["Type"];
|
|
663
|
+
|
|
664
|
+
declare const GeometryTileChunkSchema: Schema.Struct<{
|
|
665
|
+
readonly kind: Schema.Literal<"2d-tiles">;
|
|
666
|
+
readonly formatVersion: Schema.Literal<1>;
|
|
667
|
+
readonly address: Schema.Struct<{
|
|
668
|
+
readonly worldId: Schema.String;
|
|
669
|
+
readonly layerSetId: Schema.String;
|
|
670
|
+
readonly cx: Schema.Int;
|
|
671
|
+
readonly cy: Schema.Int;
|
|
672
|
+
}>;
|
|
673
|
+
readonly version: Schema.String;
|
|
674
|
+
readonly width: Schema.Int;
|
|
675
|
+
readonly height: Schema.Int;
|
|
676
|
+
readonly tileSizeRaw: Schema.Int;
|
|
677
|
+
readonly palette: Schema.$Array<Schema.Struct<{
|
|
678
|
+
readonly key: Schema.String;
|
|
679
|
+
readonly solid: Schema.Boolean;
|
|
680
|
+
}>>;
|
|
681
|
+
readonly runs: Schema.$Array<Schema.Struct<{
|
|
682
|
+
readonly paletteIndex: Schema.Int;
|
|
683
|
+
readonly length: Schema.Int;
|
|
684
|
+
}>>;
|
|
685
|
+
}>;
|
|
686
|
+
|
|
687
|
+
declare interface GeometryTileLimits {
|
|
688
|
+
readonly maxSide: number;
|
|
689
|
+
readonly maxCells: number;
|
|
690
|
+
readonly maxPalette: number;
|
|
691
|
+
readonly maxRuns: number;
|
|
692
|
+
readonly maxBytes: number;
|
|
693
|
+
}
|
|
694
|
+
|
|
695
|
+
declare type GeometryTileMaterial = (typeof GeometryTileMaterialSchema)["Type"];
|
|
696
|
+
|
|
697
|
+
declare const GeometryTileMaterialSchema: Schema.Struct<{
|
|
698
|
+
readonly key: Schema.String;
|
|
699
|
+
readonly solid: Schema.Boolean;
|
|
700
|
+
}>;
|
|
701
|
+
|
|
702
|
+
declare interface GeometryTileView {
|
|
703
|
+
readonly chunk: GeometryTileChunk;
|
|
704
|
+
/** Local integer cell queries. Outside cells refuse; no missing-neighbor air. */
|
|
705
|
+
materialAt(x: number, y: number): GeometryTileMaterial;
|
|
706
|
+
solidAt(x: number, y: number): boolean;
|
|
707
|
+
materialAtRaw(xRaw: number, yRaw: number): GeometryTileMaterial;
|
|
708
|
+
cellBounds(x: number, y: number): GeometryTileCellBounds;
|
|
709
|
+
/** Detached row-major little-bit occupancy, never the retained mutable grid. */
|
|
710
|
+
occupancy(): Uint8Array;
|
|
711
|
+
}
|
|
712
|
+
|
|
713
|
+
/** Actual client render sample only. No authority, server state message or 3D
|
|
714
|
+
* velocity invention. Raw Q16.16 conversion refuses overflow instead of wrapping. */
|
|
715
|
+
export declare const geometryTransformInterest2D: (offered: Transform2D) => {
|
|
716
|
+
readonly focus: GeometryWorldPointRaw;
|
|
717
|
+
readonly velocity: GeometryWorldPointRaw;
|
|
718
|
+
};
|
|
719
|
+
|
|
720
|
+
export declare interface GeometryVerifiedAsset {
|
|
721
|
+
readonly root: GeometryAssetRoot;
|
|
722
|
+
readonly key: string;
|
|
723
|
+
readonly checksum: string;
|
|
724
|
+
readonly size: number;
|
|
725
|
+
readonly contentType: string;
|
|
726
|
+
/** Detached owned bytes; no URL/token/permission retained. */
|
|
727
|
+
bytes(): Uint8Array;
|
|
728
|
+
}
|
|
729
|
+
|
|
730
|
+
declare interface GeometryVersionMigrationStrategies {
|
|
731
|
+
readonly migrateDelta?: GeometryMigrateDelta;
|
|
732
|
+
}
|
|
733
|
+
|
|
734
|
+
declare type GeometryVoxelChunk = (typeof GeometryVoxelChunkSchema)["Type"];
|
|
735
|
+
|
|
736
|
+
declare const GeometryVoxelChunkSchema: Schema.Struct<{
|
|
737
|
+
readonly kind: Schema.Literal<"3d-voxel">;
|
|
738
|
+
readonly formatVersion: Schema.Literal<1>;
|
|
739
|
+
readonly address: Schema.Struct<{
|
|
740
|
+
readonly worldId: Schema.String;
|
|
741
|
+
readonly layerSetId: Schema.String;
|
|
742
|
+
readonly cx: Schema.Int;
|
|
743
|
+
readonly cy: Schema.Int;
|
|
744
|
+
readonly cz: Schema.Int;
|
|
745
|
+
}>;
|
|
746
|
+
readonly version: Schema.String;
|
|
747
|
+
readonly side: Schema.Int;
|
|
748
|
+
readonly voxelSizeRaw: Schema.Int;
|
|
749
|
+
readonly palette: Schema.$Array<Schema.Struct<{
|
|
750
|
+
readonly key: Schema.String;
|
|
751
|
+
readonly solid: Schema.Boolean;
|
|
752
|
+
}>>;
|
|
753
|
+
readonly sections: Schema.$Array<Schema.Struct<{
|
|
754
|
+
readonly sx: Schema.Int;
|
|
755
|
+
readonly sy: Schema.Int;
|
|
756
|
+
readonly sz: Schema.Int;
|
|
757
|
+
readonly runs: Schema.$Array<Schema.Struct<{
|
|
758
|
+
readonly paletteIndex: Schema.Int;
|
|
759
|
+
readonly length: Schema.Int;
|
|
760
|
+
}>>;
|
|
761
|
+
}>>;
|
|
762
|
+
}>;
|
|
763
|
+
|
|
764
|
+
declare interface GeometryVoxelLimits {
|
|
765
|
+
readonly maxSide: number;
|
|
766
|
+
readonly maxVoxels: number;
|
|
767
|
+
readonly maxPalette: number;
|
|
768
|
+
readonly maxSections: number;
|
|
769
|
+
readonly maxRunsPerSection: number;
|
|
770
|
+
readonly maxBytes: number;
|
|
771
|
+
}
|
|
772
|
+
|
|
773
|
+
declare interface GeometryVoxelView {
|
|
774
|
+
readonly chunk: GeometryVoxelChunk;
|
|
775
|
+
materialAt(x: number, y: number, z: number): GeometryTileMaterial;
|
|
776
|
+
solidAt(x: number, y: number, z: number): boolean;
|
|
777
|
+
materialAtRaw(xRaw: number, yRaw: number, zRaw: number): GeometryTileMaterial;
|
|
778
|
+
occupancy(): Uint8Array;
|
|
779
|
+
}
|
|
780
|
+
|
|
781
|
+
declare interface GeometryWorldPointRaw {
|
|
782
|
+
readonly xRaw: number;
|
|
783
|
+
readonly yRaw: number;
|
|
784
|
+
readonly zRaw?: number;
|
|
785
|
+
}
|
|
786
|
+
|
|
787
|
+
export declare interface GrantedGeometryAssetCache {
|
|
788
|
+
load(request: GeometryAssetReadRequest, signal: AbortSignal): Promise<GeometryVerifiedAsset>;
|
|
789
|
+
observation(): {
|
|
790
|
+
readonly cached: number;
|
|
791
|
+
readonly cachedBytes: number;
|
|
792
|
+
readonly active: number;
|
|
793
|
+
readonly closed: boolean;
|
|
794
|
+
};
|
|
795
|
+
close(): Promise<void>;
|
|
796
|
+
}
|
|
797
|
+
|
|
798
|
+
export declare interface GrantedGeometryAssetCacheOptions {
|
|
799
|
+
readonly grants: GeometryAssetGrantClient;
|
|
800
|
+
readonly fetch?: typeof globalThis.fetch;
|
|
801
|
+
readonly maxCachedAssets?: number;
|
|
802
|
+
readonly maxCachedBytes?: number;
|
|
803
|
+
readonly maxInFlight?: number;
|
|
804
|
+
readonly maxResponseBytes?: number;
|
|
805
|
+
readonly maxReadChunks?: number;
|
|
806
|
+
}
|
|
807
|
+
|
|
808
|
+
export declare interface GrantedGeometryHttpStaticCache {
|
|
809
|
+
/** Exact minimal source capability for manifest/native recovery composition. */
|
|
810
|
+
readonly source: GeometryClientStaticSource;
|
|
811
|
+
observation(): {
|
|
812
|
+
readonly cached: number;
|
|
813
|
+
readonly accountedBytes: number;
|
|
814
|
+
readonly active: number;
|
|
815
|
+
readonly closed: boolean;
|
|
816
|
+
};
|
|
817
|
+
close(): Promise<void>;
|
|
818
|
+
}
|
|
819
|
+
|
|
820
|
+
export declare interface GrantedGeometryHttpStaticCacheOptions extends GrantedGeometryHttpStaticSourceOptions {
|
|
821
|
+
readonly maxCachedArtifacts?: number;
|
|
822
|
+
readonly maxCachedBytes?: number;
|
|
823
|
+
readonly maxInFlight?: number;
|
|
824
|
+
}
|
|
825
|
+
|
|
826
|
+
export declare interface GrantedGeometryHttpStaticSourceOptions extends Omit<GeometryHttpStaticSourceOptions, 'urlFor'> {
|
|
827
|
+
readonly grants: GeometryReadGrantClient;
|
|
828
|
+
}
|
|
829
|
+
|
|
830
|
+
/** One captured authenticated caller lifetime. App owns it across component
|
|
831
|
+
* mounts and auth scope changes. No localStorage, tokens, queue, timer, automatic
|
|
832
|
+
* retry or invented receipts. Caller owns actual auth transport and cancellation. */
|
|
833
|
+
export declare const makeGeometryAdminClient: (offered: GeometryAdminClientOptions) => GeometryAdminClient;
|
|
834
|
+
|
|
835
|
+
/** Actual author/published catalogue and real source Port. Complete bounded
|
|
836
|
+
* preflight before work, current source grants on every preload/retry, genuine
|
|
837
|
+
* size/MIME/checksum+actual byte/hash checks; no fake progress or default assets. */
|
|
838
|
+
export declare const makeGeometryAssetBundle: (offeredManifest: GeometryAssetManifest, offered: GeometryAssetBundleOptions) => GeometryAssetBundle;
|
|
839
|
+
|
|
840
|
+
/** Native Fetch/ReadableStream transport only; same full snapshot bytes, never
|
|
841
|
+
* another Delta format. Cache still performs native scope/content/hash/extent
|
|
842
|
+
* verification. No auto route, credentials minting, retry, CDN or SQL assertion. */
|
|
843
|
+
export declare const makeGeometryHttpChunkSource: (offered: GeometryHttpChunkSourceOptions) => GeometryClientChunkSource;
|
|
844
|
+
|
|
845
|
+
/** Native immutable artifact over actual Fetch. No custom CDN headers/ETag format
|
|
846
|
+
* assumed; trusted reference's actual blob+content SHA/codec/scope are verified. */
|
|
847
|
+
export declare const makeGeometryHttpStaticSource: (offered: GeometryHttpStaticSourceOptions) => GeometryClientStaticSource;
|
|
848
|
+
|
|
849
|
+
/** Owned render-only bounded LRU over the genuine borrowed native cache. Keys
|
|
850
|
+
* include actual source blob and World fields, not permission/URL/time. Reads
|
|
851
|
+
* always verify the current native artifact again; no stale render fallback. */
|
|
852
|
+
export declare const makeGeometryRenderLodCache: (offeredCache: RoomGeometryChunkCache, offeredWorld: AnyWorldDescriptor, offeredOptions?: GeometryRenderLodCacheOptions) => GeometryRenderLodCache;
|
|
853
|
+
|
|
854
|
+
/** Fresh grant for every request/hit, same owned bounded native HTTP reader,
|
|
855
|
+
* exact bytes+MIME+SHA. Own byte cache/read jobs; no CDN origin guessing,
|
|
856
|
+
* persistent URL/token/permission, automatic retry, decoder or worker. */
|
|
857
|
+
export declare const makeGrantedGeometryAssetCache: (offered: GrantedGeometryAssetCacheOptions) => GrantedGeometryAssetCache;
|
|
858
|
+
|
|
859
|
+
/** Fresh grant for every call, including local unchanged-version reuse. One
|
|
860
|
+
* canonical implementation for owned cache and the unretained source facade. */
|
|
861
|
+
export declare const makeGrantedGeometryHttpStaticCache: (offered: GrantedGeometryHttpStaticCacheOptions) => GrantedGeometryHttpStaticCache;
|
|
862
|
+
|
|
863
|
+
/** Actual grant RPC/Port ->same bounded native static HTTP source. No cached
|
|
864
|
+
* permission/token/TTL/locator or actual request cleanup inference. */
|
|
865
|
+
export declare const makeGrantedGeometryHttpStaticSource: (offered: GrantedGeometryHttpStaticSourceOptions) => GeometryClientStaticSource;
|
|
866
|
+
|
|
867
|
+
export declare const makeManifestGeometryChunkSource: (offered: ManifestGeometryChunkSourceOptions) => GeometryClientChunkSource;
|
|
868
|
+
|
|
869
|
+
/** Actual joined connection ->same native cache. Root/version/rights/source and
|
|
870
|
+
* initial interest remain explicit actual capabilities, never guessed. */
|
|
871
|
+
export declare const makeRoomConnectionGeometryCache: (actualConnection: unknown, world: AnyWorldDescriptor, root: GeometryPreparedScope, source: GeometryClientChunkSource, options?: RoomGeometryChunkCacheOptions) => RoomGeometryChunkCache;
|
|
872
|
+
|
|
873
|
+
export declare const makeRoomConnectionGeometryManifestClient: (actualConnection: unknown, identity: GeometryManifestIdentity, options?: RoomGeometryManifestClientOptions) => RoomGeometryManifestClient;
|
|
874
|
+
|
|
875
|
+
/** Actual joined connection ->same native snapshot recovery source: an edited chunk's current state over the
|
|
876
|
+
* Room's request/snapshot channels. Bound to the connection's current Session, like the cache. */
|
|
877
|
+
export declare const makeRoomConnectionGeometrySnapshotSource: (actualConnection: unknown, root: GeometryPreparedScope, options: RoomGeometrySnapshotSourceOptions) => RoomGeometrySnapshotSource;
|
|
878
|
+
|
|
879
|
+
export declare const makeRoomConnectionGeometryVersionClient: (actualConnection: unknown, world: AnyWorldDescriptor, identity: GeometryManifestIdentity, options: RoomGeometryVersionClientOptions) => RoomGeometryVersionClient;
|
|
880
|
+
|
|
881
|
+
/** Browser-safe explicit native cache; no SQL, silent source fallback, timer,
|
|
882
|
+
* automatic retry, CDN locator guess or server-authority assertion. */
|
|
883
|
+
export declare const makeRoomGeometryChunkCache: (actualSession: unknown, offeredWorld: AnyWorldDescriptor, offeredRoot: GeometryPreparedScope, offeredSource: GeometryClientChunkSource, offered?: RoomGeometryChunkCacheOptions) => RoomGeometryChunkCache;
|
|
884
|
+
|
|
885
|
+
/** Real native joined reliable-channel subscription -> bounded actual GPD
|
|
886
|
+
* reassembly -> native hashes/queries -> owned CPU pointer. Server-reported SQL
|
|
887
|
+
* receipt is not a client SQL check; static/version/recovery custody is external. */
|
|
888
|
+
export declare const makeRoomGeometryClient: (actualSession: unknown, offeredInventory: GeometryPreparedInventory, offered?: RoomGeometryClientOptions) => RoomGeometryClient;
|
|
889
|
+
|
|
890
|
+
/** Actual compiled reliable native metadata only; no inferred locator/read grant,
|
|
891
|
+
* blob download, static format, SQL attestation or autonomous pump. */
|
|
892
|
+
export declare const makeRoomGeometryManifestClient: (actualSession: unknown, offeredIdentity: GeometryManifestIdentity, offered?: RoomGeometryManifestClientOptions) => RoomGeometryManifestClient;
|
|
893
|
+
|
|
894
|
+
/** Intention-only actual reliable request ->existing native net snapshot ->
|
|
895
|
+
* verified static/GPD/current revision. No private HTTP/SQL/transport or auto retry. */
|
|
896
|
+
export declare const makeRoomGeometrySnapshotSource: (actualSession: unknown, offeredRoot: GeometryPreparedScope, offered: RoomGeometrySnapshotSourceOptions) => RoomGeometrySnapshotSource;
|
|
897
|
+
|
|
898
|
+
/** Browser-safe native Session owner. Owns metadata, per-version request source
|
|
899
|
+
* and chunk cache; borrows Session and static grant/HTTP lifetime. A published
|
|
900
|
+
* version is server metadata, never client SQL/lease/authority attestation. */
|
|
901
|
+
export declare const makeRoomGeometryVersionClient: (actualSession: unknown, offeredWorld: AnyWorldDescriptor, offeredIdentity: GeometryManifestIdentity, offered: RoomGeometryVersionClientOptions) => RoomGeometryVersionClient;
|
|
902
|
+
|
|
903
|
+
export declare interface ManifestGeometryChunkSourceOptions {
|
|
904
|
+
/** Actual admitted native manifest client's current immutable metadata. */
|
|
905
|
+
readonly manifest: () => GeometryStreamManifest;
|
|
906
|
+
readonly staticSource: GeometryClientStaticSource;
|
|
907
|
+
/** Actual current dynamic recovery transport, e.g. `makeRoomConnectionGeometrySnapshotSource` (only its `load`
|
|
908
|
+
* is read); absent refuses dirty changes. */
|
|
909
|
+
readonly recovery?: GeometryClientChunkSource;
|
|
910
|
+
readonly maxManifestChunks?: number | undefined;
|
|
911
|
+
readonly maxManifestBytes?: number;
|
|
912
|
+
readonly maxChunkBytes?: number;
|
|
913
|
+
readonly codecLimits?: {
|
|
914
|
+
readonly [K in GeometryKind]?: GeometryArtifactLimits<K>;
|
|
915
|
+
} | undefined;
|
|
916
|
+
}
|
|
917
|
+
|
|
918
|
+
/** Pure client rendering plan, never a server player position/permission or
|
|
919
|
+
* background download loop. All visible chunks retained, nearest prefetch
|
|
920
|
+
* clipped to actual cache budget; enumeration is admitted before allocation. */
|
|
921
|
+
export declare const planGeometryClientInterest: (offeredWorld: AnyWorldDescriptor, offeredRoot: GeometryPreparedScope, offeredFocus: GeometryWorldPointRaw, offered?: GeometryClientInterestOptions) => GeometryClientInterest;
|
|
922
|
+
|
|
923
|
+
/** Native connection +actual complete source batch with owned abort cleanup.
|
|
924
|
+
* App selects full root/current read rights and coordinates; no version guess. */
|
|
925
|
+
export declare const prefetchRoomConnectionGeometryCache: (actualConnection: unknown, world: AnyWorldDescriptor, root: GeometryPreparedScope, source: GeometryClientChunkSource, coordinates: ReadonlyArray<GeometryPreparedCoordinate>, signal: AbortSignal, options?: RoomGeometryChunkCacheOptions) => Promise<RoomGeometryChunkCache>;
|
|
926
|
+
|
|
927
|
+
declare interface PreparedCommon {
|
|
928
|
+
readonly scope: GeometryPersistenceScope;
|
|
929
|
+
readonly revision: number;
|
|
930
|
+
readonly blobSha256: string;
|
|
931
|
+
readonly contentSha256: string;
|
|
932
|
+
readonly accountedBytes: number;
|
|
933
|
+
}
|
|
934
|
+
|
|
935
|
+
/** Actual native heightfield codec and hashes, for render data only. Original
|
|
936
|
+
* artifact is immutable and unchanged. It is not a full-resolution delta base,
|
|
937
|
+
* collision substitute, new persistence format or CDN authority reference. */
|
|
938
|
+
export declare const prepareGeometryHeightfieldLod: (offeredArtifact: GeometryArtifact, offered?: GeometryHeightfieldLodOptions) => Promise<GeometryRenderLod>;
|
|
939
|
+
|
|
940
|
+
/** One World field rule for all kinds. Only the declared heightsCoarse field
|
|
941
|
+
* invokes native height projection; full fields retain their genuine artifact.
|
|
942
|
+
* This local preparation does not claim reduced network downloads or assets. */
|
|
943
|
+
export declare const prepareGeometryRenderLod: (offeredWorld: AnyWorldDescriptor, offeredArtifact: GeometryArtifact, offeredDistance: number, options?: GeometryHeightfieldLodOptions) => Promise<GeometryRenderLod>;
|
|
944
|
+
|
|
945
|
+
/** Re-encode retained genuine static content under an actual new reference.
|
|
946
|
+
* Caller must separately obtain current read rights; a hash is not permission. */
|
|
947
|
+
export declare const reuseGeometryStaticArtifact: (offeredArtifact: unknown, offeredReference: GeometryStaticReference, codecLimits?: GeometryArtifactLimits<GeometryKind>) => Promise<GeometryArtifact | null>;
|
|
948
|
+
|
|
949
|
+
export declare interface RoomGeometryChunkCache {
|
|
950
|
+
/** Last downloaded native query snapshot, never implied empty terrain. */
|
|
951
|
+
at(coordinate: GeometryPreparedCoordinate): GeometryPreparedEntry;
|
|
952
|
+
contains(coordinate: GeometryPreparedCoordinate): boolean;
|
|
953
|
+
/** Full requested set commits to bounded LRU only after all loads/hash/views
|
|
954
|
+
* complete. Failed batches preserve earlier same-admission snapshots. */
|
|
955
|
+
request(coordinates: ReadonlyArray<GeometryPreparedCoordinate>): Promise<void>;
|
|
956
|
+
/** Explicit render-frame work: native Deltas/recovery, visible-first load,
|
|
957
|
+
* directional prefetch and old-cache hysteresis. Caller awaits each frame. */
|
|
958
|
+
stream(focus: GeometryWorldPointRaw, options?: GeometryClientInterestOptions): Promise<GeometryClientInterest>;
|
|
959
|
+
/** Explicit current source reconciliation, including already cached chunks. */
|
|
960
|
+
/** Explicit serial native Delta application; gaps require actual source recovery. */
|
|
961
|
+
pump(): Promise<{
|
|
962
|
+
readonly applied: number;
|
|
963
|
+
readonly duplicates: number;
|
|
964
|
+
readonly obsolete: number;
|
|
965
|
+
readonly recovery: ReadonlyArray<GeometryPreparedCoordinate>;
|
|
966
|
+
}>;
|
|
967
|
+
refresh(coordinates: ReadonlyArray<GeometryPreparedCoordinate>): Promise<void>;
|
|
968
|
+
close(): Promise<void>;
|
|
969
|
+
observation(): RoomGeometryChunkCacheObservation;
|
|
970
|
+
}
|
|
971
|
+
|
|
972
|
+
export declare interface RoomGeometryChunkCacheObservation {
|
|
973
|
+
readonly cached: number;
|
|
974
|
+
readonly accountedBytes: number;
|
|
975
|
+
readonly staged: number;
|
|
976
|
+
readonly stagedBytes: number;
|
|
977
|
+
readonly active: boolean;
|
|
978
|
+
readonly withdrawn: boolean;
|
|
979
|
+
readonly stale: number;
|
|
980
|
+
readonly queuedDeltas: number;
|
|
981
|
+
readonly queuedDeltaBytes: number;
|
|
982
|
+
readonly receiving: number;
|
|
983
|
+
readonly receivingBytes: number;
|
|
984
|
+
}
|
|
985
|
+
|
|
986
|
+
export declare interface RoomGeometryChunkCacheOptions {
|
|
987
|
+
readonly channel?: string | undefined;
|
|
988
|
+
readonly maxCachedChunks?: number;
|
|
989
|
+
readonly maxConcurrent?: number | undefined;
|
|
990
|
+
readonly maxCacheBytes?: number;
|
|
991
|
+
readonly maxStagedBytes?: number;
|
|
992
|
+
readonly maxChunkBytes?: number;
|
|
993
|
+
readonly maxPendingDeltas?: number;
|
|
994
|
+
readonly maxQueuedDeltaBytes?: number;
|
|
995
|
+
readonly codecLimits?: {
|
|
996
|
+
readonly [K in GeometryKind]?: GeometryArtifactLimits<K>;
|
|
997
|
+
} | undefined;
|
|
998
|
+
}
|
|
999
|
+
|
|
1000
|
+
export declare interface RoomGeometryClient {
|
|
1001
|
+
at(coordinate: GeometryPreparedCoordinate): GeometryPreparedEntry;
|
|
1002
|
+
contains(coordinate: GeometryPreparedCoordinate): boolean;
|
|
1003
|
+
/** Explicit serial native hash/application/query preparation outside rendering or Tick. No autonomous worker. */
|
|
1004
|
+
pump(): Promise<{
|
|
1005
|
+
readonly applied: number;
|
|
1006
|
+
readonly duplicates: number;
|
|
1007
|
+
readonly unchanged: number;
|
|
1008
|
+
}>;
|
|
1009
|
+
/** Detach/reset owned data. The actual Room Session/transport lifetime is borrowed. */
|
|
1010
|
+
close(): Promise<void>;
|
|
1011
|
+
observation(): RoomGeometryClientObservation;
|
|
1012
|
+
}
|
|
1013
|
+
|
|
1014
|
+
export declare interface RoomGeometryClientObservation {
|
|
1015
|
+
readonly queued: number;
|
|
1016
|
+
readonly queuedBytes: number;
|
|
1017
|
+
readonly receiving: number;
|
|
1018
|
+
readonly receivingBytes: number;
|
|
1019
|
+
readonly history: number;
|
|
1020
|
+
readonly historyBytes: number;
|
|
1021
|
+
readonly active: boolean;
|
|
1022
|
+
readonly withdrawn: boolean;
|
|
1023
|
+
readonly failed: boolean;
|
|
1024
|
+
readonly generation: number;
|
|
1025
|
+
}
|
|
1026
|
+
|
|
1027
|
+
export declare interface RoomGeometryClientOptions {
|
|
1028
|
+
readonly channel?: string | undefined;
|
|
1029
|
+
readonly maxQueued?: number;
|
|
1030
|
+
readonly maxQueuedBytes?: number;
|
|
1031
|
+
readonly maxPatchBytes?: number | undefined;
|
|
1032
|
+
readonly maxHistory?: number;
|
|
1033
|
+
readonly maxHistoryBytes?: number;
|
|
1034
|
+
}
|
|
1035
|
+
|
|
1036
|
+
export declare interface RoomGeometryManifestClient {
|
|
1037
|
+
current(): GeometryStreamManifest;
|
|
1038
|
+
pump(): Promise<{
|
|
1039
|
+
readonly accepted: number;
|
|
1040
|
+
}>;
|
|
1041
|
+
close(): Promise<void>;
|
|
1042
|
+
observation(): {
|
|
1043
|
+
readonly queued: number;
|
|
1044
|
+
readonly queuedBytes: number;
|
|
1045
|
+
readonly receiving: number;
|
|
1046
|
+
readonly receivingBytes: number;
|
|
1047
|
+
readonly ready: boolean;
|
|
1048
|
+
readonly active: boolean;
|
|
1049
|
+
readonly withdrawn: boolean;
|
|
1050
|
+
};
|
|
1051
|
+
}
|
|
1052
|
+
|
|
1053
|
+
export declare interface RoomGeometryManifestClientOptions {
|
|
1054
|
+
readonly channel?: string | undefined;
|
|
1055
|
+
readonly maxManifestChunks?: number | undefined;
|
|
1056
|
+
readonly maxManifestBytes?: number;
|
|
1057
|
+
readonly maxPending?: number | undefined;
|
|
1058
|
+
readonly maxPendingBytes?: number | undefined;
|
|
1059
|
+
readonly maxQueued?: number;
|
|
1060
|
+
readonly maxQueuedBytes?: number;
|
|
1061
|
+
}
|
|
1062
|
+
|
|
1063
|
+
declare interface RoomGeometryReloadRequest {
|
|
1064
|
+
readonly version: string;
|
|
1065
|
+
readonly requestId: string;
|
|
1066
|
+
}
|
|
1067
|
+
|
|
1068
|
+
/** Administrative intention only. World/version/owner/authority/baseline/patch
|
|
1069
|
+
* are resolved by the actual Host/source, never accepted as client state. */
|
|
1070
|
+
declare interface RoomGeometryRollbackRequest {
|
|
1071
|
+
readonly cx: number;
|
|
1072
|
+
readonly cy: number;
|
|
1073
|
+
readonly cz?: number | undefined;
|
|
1074
|
+
/** The actor whose changes are undone; `null` undoes every actor's changes (chunk reset to its static baseline). */
|
|
1075
|
+
readonly target: GeometryPersistenceSubject | null;
|
|
1076
|
+
readonly requestId: string;
|
|
1077
|
+
}
|
|
1078
|
+
|
|
1079
|
+
export declare interface RoomGeometrySnapshotSource extends GeometryClientChunkSource {
|
|
1080
|
+
close(): Promise<void>;
|
|
1081
|
+
observation(): {
|
|
1082
|
+
readonly pending: number;
|
|
1083
|
+
readonly jobs: number;
|
|
1084
|
+
readonly receiving: number;
|
|
1085
|
+
readonly receivingBytes: number;
|
|
1086
|
+
readonly withdrawn: boolean;
|
|
1087
|
+
};
|
|
1088
|
+
}
|
|
1089
|
+
|
|
1090
|
+
export declare interface RoomGeometrySnapshotSourceOptions {
|
|
1091
|
+
readonly manifest: () => GeometryStreamManifest;
|
|
1092
|
+
readonly staticSource: GeometryClientStaticSource;
|
|
1093
|
+
readonly requestChannel?: string;
|
|
1094
|
+
readonly responseChannel?: string;
|
|
1095
|
+
readonly requestId?: (() => string) | undefined;
|
|
1096
|
+
readonly maxPending?: number | undefined;
|
|
1097
|
+
readonly maxPatchBytes?: number | undefined;
|
|
1098
|
+
readonly maxPendingBytes?: number | undefined;
|
|
1099
|
+
readonly maxWaitMs?: number;
|
|
1100
|
+
readonly maxManifestChunks?: number | undefined;
|
|
1101
|
+
readonly maxManifestBytes?: number;
|
|
1102
|
+
readonly codecLimits?: {
|
|
1103
|
+
readonly [K in GeometryKind]?: GeometryArtifactLimits<K>;
|
|
1104
|
+
} | undefined;
|
|
1105
|
+
}
|
|
1106
|
+
|
|
1107
|
+
export declare interface RoomGeometryVersionClient {
|
|
1108
|
+
at(coordinate: GeometryPreparedCoordinate): GeometryPreparedEntry;
|
|
1109
|
+
contains(coordinate: GeometryPreparedCoordinate): boolean;
|
|
1110
|
+
/** Owned local render preparation over the selected verified version. */
|
|
1111
|
+
render(coordinate: GeometryPreparedCoordinate, distanceChunks: number): Promise<GeometryRenderLod>;
|
|
1112
|
+
/** One explicit awaited render frame: manifest pump, version handoff, then
|
|
1113
|
+
* existing visible-first native stream. No timer or player-state upload. */
|
|
1114
|
+
stream(focus: GeometryWorldPointRaw, options?: GeometryClientInterestOptions): Promise<GeometryClientInterest>;
|
|
1115
|
+
observation(): {
|
|
1116
|
+
readonly scope: GeometryPreparedScope | null;
|
|
1117
|
+
readonly ready: boolean;
|
|
1118
|
+
readonly active: boolean;
|
|
1119
|
+
readonly withdrawn: boolean;
|
|
1120
|
+
readonly retiring: number;
|
|
1121
|
+
readonly renderEntries: number;
|
|
1122
|
+
readonly renderEncodedBytes: number;
|
|
1123
|
+
readonly renderJobs: number;
|
|
1124
|
+
};
|
|
1125
|
+
close(): Promise<void>;
|
|
1126
|
+
}
|
|
1127
|
+
|
|
1128
|
+
export declare interface RoomGeometryVersionClientOptions {
|
|
1129
|
+
/** Borrowed current authorized immutable static reader. Its lifetime remains
|
|
1130
|
+
* external; compose the fresh-granted static cache for unchanged version reuse. */
|
|
1131
|
+
readonly staticSource: GeometryClientStaticSource;
|
|
1132
|
+
readonly manifest?: RoomGeometryManifestClientOptions;
|
|
1133
|
+
readonly snapshot?: Omit<RoomGeometrySnapshotSourceOptions, 'manifest' | 'staticSource'>;
|
|
1134
|
+
readonly cache?: RoomGeometryChunkCacheOptions;
|
|
1135
|
+
readonly render?: GeometryRenderLodCacheOptions;
|
|
1136
|
+
}
|
|
1137
|
+
|
|
1138
|
+
declare interface RoomRpcCaller {
|
|
1139
|
+
call(tag: string, input: unknown, options: {
|
|
1140
|
+
readonly signal: AbortSignal;
|
|
1141
|
+
}): Promise<unknown>;
|
|
1142
|
+
/** Normal framework live-query callback boundary. No polling adapter. */
|
|
1143
|
+
readonly subscribe?: (tag: string, input: unknown, handlers: {
|
|
1144
|
+
readonly onValue: (value: unknown) => void;
|
|
1145
|
+
readonly onError?: (error: unknown) => void;
|
|
1146
|
+
}) => WorldClientReceiptSubscription;
|
|
1147
|
+
}
|
|
1148
|
+
|
|
1149
|
+
declare const Transform2D: Schema.Struct<{
|
|
1150
|
+
readonly x: Schema.Number;
|
|
1151
|
+
readonly y: Schema.Number;
|
|
1152
|
+
readonly rot: Schema.Number;
|
|
1153
|
+
readonly vx: Schema.optional<Schema.Number>;
|
|
1154
|
+
readonly vy: Schema.optional<Schema.Number>;
|
|
1155
|
+
}>;
|
|
1156
|
+
|
|
1157
|
+
declare type Transform2D = (typeof Transform2D)["Type"];
|
|
1158
|
+
|
|
1159
|
+
declare type WorldBounds = readonly [minimum: WorldPoint, maximum: WorldPoint];
|
|
1160
|
+
|
|
1161
|
+
declare interface WorldClientReceiptSubscription {
|
|
1162
|
+
unsubscribe(): void;
|
|
1163
|
+
}
|
|
1164
|
+
|
|
1165
|
+
declare interface WorldDefinition<Player> {
|
|
1166
|
+
readonly name: string;
|
|
1167
|
+
readonly map: {
|
|
1168
|
+
readonly bounds: WorldBounds;
|
|
1169
|
+
};
|
|
1170
|
+
readonly zones: ReadonlyArray<WorldZone>;
|
|
1171
|
+
readonly instances?: ReadonlyArray<WorldInstance>;
|
|
1172
|
+
readonly persistence: {
|
|
1173
|
+
readonly entities: 'world';
|
|
1174
|
+
readonly snapshotEveryMs: number;
|
|
1175
|
+
readonly journal: boolean;
|
|
1176
|
+
};
|
|
1177
|
+
readonly handoff: {
|
|
1178
|
+
readonly marginUnits: number;
|
|
1179
|
+
readonly ghostUnits: number;
|
|
1180
|
+
};
|
|
1181
|
+
readonly spawn: (context: {
|
|
1182
|
+
readonly player: Player;
|
|
1183
|
+
}) => WorldPosition;
|
|
1184
|
+
readonly geometry?: WorldGeometryDefinition | undefined;
|
|
1185
|
+
readonly hosts?: {
|
|
1186
|
+
readonly pool: string;
|
|
1187
|
+
};
|
|
1188
|
+
readonly characters?: 'shared' | 'per-world';
|
|
1189
|
+
readonly transitionCooldownMs?: number;
|
|
1190
|
+
/** Authoring inventory bounds, not measured runtime capacity. */
|
|
1191
|
+
readonly budgets?: {
|
|
1192
|
+
readonly maxZones?: number;
|
|
1193
|
+
readonly maxCells?: number | undefined;
|
|
1194
|
+
readonly maxInstances?: number;
|
|
1195
|
+
};
|
|
1196
|
+
readonly strategies?: {
|
|
1197
|
+
readonly layerPolicy?: WorldLayerPolicy | undefined;
|
|
1198
|
+
readonly transitionPolicy?: WorldTransitionPolicy;
|
|
1199
|
+
readonly onWorldChange?: WorldOnWorldChange;
|
|
1200
|
+
};
|
|
1201
|
+
}
|
|
1202
|
+
|
|
1203
|
+
declare interface WorldDescriptor<Player> extends Omit<WorldDefinition<Player>, 'instances' | 'budgets' | 'characters' | 'transitionCooldownMs' | 'strategies' | 'geometry'> {
|
|
1204
|
+
readonly geometry?: WorldGeometryDescriptor | undefined;
|
|
1205
|
+
readonly _tag: 'WorldDescriptor';
|
|
1206
|
+
readonly instances: ReadonlyArray<Omit<WorldInstance, 'ttl'> & {
|
|
1207
|
+
readonly ttlMs: number;
|
|
1208
|
+
}>;
|
|
1209
|
+
readonly budgets: {
|
|
1210
|
+
readonly maxZones: number;
|
|
1211
|
+
readonly maxCells: number;
|
|
1212
|
+
readonly maxInstances: number;
|
|
1213
|
+
};
|
|
1214
|
+
readonly characters: 'shared' | 'per-world';
|
|
1215
|
+
readonly transitionCooldownMs: number;
|
|
1216
|
+
readonly cellCount: number;
|
|
1217
|
+
readonly strategies: {
|
|
1218
|
+
readonly layerPolicy: WorldLayerPolicy;
|
|
1219
|
+
readonly transitionPolicy: WorldTransitionPolicy;
|
|
1220
|
+
readonly onWorldChange: WorldOnWorldChange;
|
|
1221
|
+
};
|
|
1222
|
+
}
|
|
1223
|
+
|
|
1224
|
+
declare interface WorldGeometryDefinition {
|
|
1225
|
+
readonly strategies?: WorldGeometryStrategies | undefined;
|
|
1226
|
+
readonly kind: GeometryKind;
|
|
1227
|
+
readonly static: GeometrySource;
|
|
1228
|
+
readonly chunkSize?: number;
|
|
1229
|
+
readonly dynamic?: {
|
|
1230
|
+
readonly enabled?: boolean | undefined;
|
|
1231
|
+
readonly maxDeltaBytesPerChunk?: number;
|
|
1232
|
+
readonly persist?: {
|
|
1233
|
+
readonly everyMs?: number;
|
|
1234
|
+
readonly onUnload?: boolean;
|
|
1235
|
+
};
|
|
1236
|
+
};
|
|
1237
|
+
readonly collision?: {
|
|
1238
|
+
readonly derive?: 'bitgrid' | 'heightfield' | 'shapes';
|
|
1239
|
+
readonly resolution?: number;
|
|
1240
|
+
};
|
|
1241
|
+
readonly nav?: {
|
|
1242
|
+
readonly derive?: 'grid' | 'none';
|
|
1243
|
+
readonly navBudgetMs?: number;
|
|
1244
|
+
readonly maxAdvanceSteps?: number;
|
|
1245
|
+
};
|
|
1246
|
+
readonly streaming?: {
|
|
1247
|
+
readonly client?: {
|
|
1248
|
+
readonly radiusChunks?: number;
|
|
1249
|
+
readonly prefetchChunks?: number;
|
|
1250
|
+
readonly maxConcurrent?: number | undefined;
|
|
1251
|
+
readonly maxCachedChunks?: number;
|
|
1252
|
+
};
|
|
1253
|
+
readonly cell?: {
|
|
1254
|
+
readonly marginChunks?: number;
|
|
1255
|
+
};
|
|
1256
|
+
};
|
|
1257
|
+
readonly lod?: ReadonlyArray<{
|
|
1258
|
+
readonly beyondChunks: number;
|
|
1259
|
+
readonly fields: ReadonlyArray<string>;
|
|
1260
|
+
}>;
|
|
1261
|
+
readonly budgets?: {
|
|
1262
|
+
readonly maxPreparedChunks?: number;
|
|
1263
|
+
readonly maxPreparedBytes?: number;
|
|
1264
|
+
readonly maxLodLevels?: number;
|
|
1265
|
+
readonly maxRayCells?: number | undefined;
|
|
1266
|
+
readonly maxOverlapTests?: number | undefined;
|
|
1267
|
+
};
|
|
1268
|
+
}
|
|
1269
|
+
|
|
1270
|
+
declare interface WorldGeometryDescriptor {
|
|
1271
|
+
readonly strategies: GeometryEditStrategies & GeometryDerivationStrategies & GeometryCompactionStrategies & {
|
|
1272
|
+
readonly migrateDelta: GeometryMigrateDelta;
|
|
1273
|
+
};
|
|
1274
|
+
readonly _tag: 'WorldGeometry';
|
|
1275
|
+
readonly kind: GeometryKind;
|
|
1276
|
+
readonly static: GeometrySource;
|
|
1277
|
+
readonly chunkSize: number;
|
|
1278
|
+
readonly chunkSizeRaw: number;
|
|
1279
|
+
readonly dynamic: {
|
|
1280
|
+
readonly enabled: boolean;
|
|
1281
|
+
readonly maxDeltaBytesPerChunk: number;
|
|
1282
|
+
readonly persist: {
|
|
1283
|
+
readonly everyMs: number;
|
|
1284
|
+
readonly onUnload: boolean;
|
|
1285
|
+
};
|
|
1286
|
+
};
|
|
1287
|
+
readonly collision: {
|
|
1288
|
+
readonly derive: 'bitgrid' | 'heightfield' | 'shapes';
|
|
1289
|
+
readonly resolution: number;
|
|
1290
|
+
readonly resolutionRaw: number;
|
|
1291
|
+
};
|
|
1292
|
+
readonly nav: {
|
|
1293
|
+
readonly derive: 'grid' | 'none';
|
|
1294
|
+
readonly navBudgetMs: number;
|
|
1295
|
+
readonly maxAdvanceSteps: number;
|
|
1296
|
+
};
|
|
1297
|
+
readonly streaming: {
|
|
1298
|
+
readonly client: {
|
|
1299
|
+
readonly radiusChunks: number;
|
|
1300
|
+
readonly prefetchChunks: number;
|
|
1301
|
+
readonly maxConcurrent: number;
|
|
1302
|
+
readonly maxCachedChunks: number;
|
|
1303
|
+
};
|
|
1304
|
+
readonly cell: {
|
|
1305
|
+
readonly marginChunks: number;
|
|
1306
|
+
};
|
|
1307
|
+
};
|
|
1308
|
+
readonly lod: ReadonlyArray<{
|
|
1309
|
+
readonly beyondChunks: number;
|
|
1310
|
+
readonly fields: ReadonlyArray<string>;
|
|
1311
|
+
}>;
|
|
1312
|
+
readonly budgets: {
|
|
1313
|
+
readonly maxPreparedChunks: number;
|
|
1314
|
+
readonly maxPreparedBytes: number;
|
|
1315
|
+
readonly maxLodLevels: number;
|
|
1316
|
+
readonly maxRayCells: number;
|
|
1317
|
+
readonly maxOverlapTests: number;
|
|
1318
|
+
};
|
|
1319
|
+
}
|
|
1320
|
+
|
|
1321
|
+
declare interface WorldGeometryStrategies extends GeometryVersionMigrationStrategies, Partial<GeometryEditStrategies>, Partial<GeometryDerivationStrategies>, Partial<GeometryCompactionStrategies> {
|
|
1322
|
+
}
|
|
1323
|
+
|
|
1324
|
+
declare interface WorldInstance {
|
|
1325
|
+
readonly id: string;
|
|
1326
|
+
readonly room: string;
|
|
1327
|
+
readonly maxGroups: number;
|
|
1328
|
+
readonly ttl: Duration.Input;
|
|
1329
|
+
}
|
|
1330
|
+
|
|
1331
|
+
declare type WorldLayerDecision = {
|
|
1332
|
+
readonly kind: 'use';
|
|
1333
|
+
readonly layer: number;
|
|
1334
|
+
readonly wake: boolean;
|
|
1335
|
+
} | {
|
|
1336
|
+
readonly kind: 'create';
|
|
1337
|
+
readonly layer: number;
|
|
1338
|
+
} | {
|
|
1339
|
+
readonly kind: 'blocked';
|
|
1340
|
+
readonly reason: 'affinity-unavailable' | 'capacity' | 'layer-budget';
|
|
1341
|
+
};
|
|
1342
|
+
|
|
1343
|
+
declare interface WorldLayering {
|
|
1344
|
+
readonly maxPlayers: number;
|
|
1345
|
+
readonly splitAt: number;
|
|
1346
|
+
readonly mergeBelow: number;
|
|
1347
|
+
}
|
|
1348
|
+
|
|
1349
|
+
declare interface WorldLayerInput {
|
|
1350
|
+
readonly policy: WorldLayering;
|
|
1351
|
+
readonly layers: ReadonlyArray<WorldLayerObservation>;
|
|
1352
|
+
readonly groupSize: number;
|
|
1353
|
+
/** Actual server-owned party affinity; never silently choose a different layer. */
|
|
1354
|
+
readonly affinity: number | null;
|
|
1355
|
+
readonly maxLayers: number;
|
|
1356
|
+
}
|
|
1357
|
+
|
|
1358
|
+
declare interface WorldLayerObservation {
|
|
1359
|
+
readonly layer: number;
|
|
1360
|
+
readonly players: number;
|
|
1361
|
+
readonly state: 'live' | 'hibernated' | 'splitting' | 'merging';
|
|
1362
|
+
}
|
|
1363
|
+
|
|
1364
|
+
declare type WorldLayerPolicy = (input: WorldLayerInput) => WorldLayerDecision;
|
|
1365
|
+
|
|
1366
|
+
declare type WorldOnWorldChange = (input: WorldOnWorldChangeInput) => unknown;
|
|
1367
|
+
|
|
1368
|
+
declare interface WorldOnWorldChangeInput {
|
|
1369
|
+
readonly sourceWorldId: string;
|
|
1370
|
+
readonly targetWorldId: string;
|
|
1371
|
+
/** Current server-captured character data, never a player's wire state. */
|
|
1372
|
+
readonly sourceData: unknown;
|
|
1373
|
+
/** Actual server-selected target data before this policy. */
|
|
1374
|
+
readonly targetData: unknown;
|
|
1375
|
+
}
|
|
1376
|
+
|
|
1377
|
+
declare type WorldPoint = readonly [x: number, y: number];
|
|
1378
|
+
|
|
1379
|
+
declare interface WorldPosition {
|
|
1380
|
+
readonly zone: string;
|
|
1381
|
+
readonly at: WorldPoint;
|
|
1382
|
+
}
|
|
1383
|
+
|
|
1384
|
+
declare type WorldTransitionKind = 'cell' | 'layer' | 'zone' | 'world' | 'instance' | 'return' | 'recover';
|
|
1385
|
+
|
|
1386
|
+
declare interface WorldTransitionLocation extends WorldPosition {
|
|
1387
|
+
readonly world: string;
|
|
1388
|
+
readonly pool: string;
|
|
1389
|
+
readonly layer: number;
|
|
1390
|
+
readonly instance: string | null;
|
|
1391
|
+
}
|
|
1392
|
+
|
|
1393
|
+
declare type WorldTransitionMode = 'seamless' | 'portal' | 'recover';
|
|
1394
|
+
|
|
1395
|
+
declare interface WorldTransitionPlan {
|
|
1396
|
+
readonly kind: WorldTransitionKind;
|
|
1397
|
+
readonly mode: WorldTransitionMode;
|
|
1398
|
+
readonly crossPool: boolean;
|
|
1399
|
+
readonly persistBeforeRelease: boolean;
|
|
1400
|
+
readonly sourceCell: string;
|
|
1401
|
+
readonly targetCell: string;
|
|
1402
|
+
}
|
|
1403
|
+
|
|
1404
|
+
declare type WorldTransitionPolicy = (input: WorldTransitionPolicyInput) => WorldTransitionPlan;
|
|
1405
|
+
|
|
1406
|
+
declare interface WorldTransitionPolicyInput {
|
|
1407
|
+
readonly kind: WorldTransitionKind;
|
|
1408
|
+
readonly sourceWorld: AnyWorldDescriptor;
|
|
1409
|
+
readonly targetWorld: AnyWorldDescriptor;
|
|
1410
|
+
readonly source: WorldTransitionLocation;
|
|
1411
|
+
readonly target: WorldTransitionLocation;
|
|
1412
|
+
readonly mode: WorldTransitionMode | 'auto';
|
|
1413
|
+
readonly crossPool: boolean;
|
|
1414
|
+
/** Trusted server recovery classification, not a player intention field. */
|
|
1415
|
+
readonly recovery: boolean;
|
|
1416
|
+
}
|
|
1417
|
+
|
|
1418
|
+
declare interface WorldZone {
|
|
1419
|
+
readonly id: string;
|
|
1420
|
+
readonly bounds: WorldBounds;
|
|
1421
|
+
readonly room: string;
|
|
1422
|
+
readonly neighbors: ReadonlyArray<string>;
|
|
1423
|
+
readonly cells?: {
|
|
1424
|
+
readonly size: number;
|
|
1425
|
+
} | undefined;
|
|
1426
|
+
readonly layering?: WorldLayering;
|
|
1427
|
+
}
|
|
1428
|
+
|
|
1429
|
+
export { }
|