agentscape3d 1.0.0-beta.1 → 1.0.0-beta.2

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.
Files changed (386) hide show
  1. package/README.md +23 -48
  2. package/dist/core.d.ts +68 -0
  3. package/dist/core.js +209 -0
  4. package/dist/core.js.map +1 -0
  5. package/dist/index.d.ts +10 -229
  6. package/dist/index.js +192 -15462
  7. package/dist/index.js.map +1 -1
  8. package/package.json +11 -40
  9. package/cli.mjs +0 -27
  10. package/dist/AssetCompiler-CDFiElji.js +0 -2451
  11. package/dist/AssetCompiler-CDFiElji.js.map +0 -1
  12. package/dist/AssetInputContracts-Dy8iU4eT.js +0 -228
  13. package/dist/AssetInputContracts-Dy8iU4eT.js.map +0 -1
  14. package/dist/AssetRecipe-DmFpzxr-.js +0 -55
  15. package/dist/AssetRecipe-DmFpzxr-.js.map +0 -1
  16. package/dist/BrowserCodeWorker.js +0 -53615
  17. package/dist/KinematicHypothesisScreen-D-z6qgMB.js +0 -242
  18. package/dist/KinematicHypothesisScreen-D-z6qgMB.js.map +0 -1
  19. package/dist/SceneSerializer-DPVOyeRk.js +0 -353
  20. package/dist/SceneSerializer-DPVOyeRk.js.map +0 -1
  21. package/dist/StylePack-DNrdLeGI.js +0 -6314
  22. package/dist/StylePack-DNrdLeGI.js.map +0 -1
  23. package/dist/WorldArchive-pSBIGxLa.js +0 -420
  24. package/dist/WorldArchive-pSBIGxLa.js.map +0 -1
  25. package/dist/WorldIO-wsDfZGM4.js +0 -150
  26. package/dist/WorldIO-wsDfZGM4.js.map +0 -1
  27. package/dist/blankWorld-CBWbwJGj.js +0 -76
  28. package/dist/blankWorld-CBWbwJGj.js.map +0 -1
  29. package/dist/disposeObject3D-BQ9TyVC_.js +0 -54
  30. package/dist/disposeObject3D-BQ9TyVC_.js.map +0 -1
  31. package/dist/environments-DgH66NqV.js +0 -4220
  32. package/dist/environments-DgH66NqV.js.map +0 -1
  33. package/dist/gltfIO-B87nJaat.js +0 -10
  34. package/dist/gltfIO-B87nJaat.js.map +0 -1
  35. package/dist/grandUrbanBlock-Ob9pN-CB.js +0 -516
  36. package/dist/grandUrbanBlock-Ob9pN-CB.js.map +0 -1
  37. package/dist/magicCabin-D64fD1E2.js +0 -11024
  38. package/dist/magicCabin-D64fD1E2.js.map +0 -1
  39. package/dist/mcp.d.ts +0 -2
  40. package/dist/mcp.js +0 -1
  41. package/dist/monumentHall-BKbs0UOQ.js +0 -404
  42. package/dist/monumentHall-BKbs0UOQ.js.map +0 -1
  43. package/dist/node.d.ts +0 -16
  44. package/dist/node.js +0 -25
  45. package/dist/ruinedCourtyard-BoZxHldu.js +0 -697
  46. package/dist/ruinedCourtyard-BoZxHldu.js.map +0 -1
  47. package/dist/runtime/application/AgentTools.js +0 -25
  48. package/dist/runtime/application/README.md +0 -14
  49. package/dist/runtime/application/buildTaskObservation.js +0 -117
  50. package/dist/runtime/application/code-execution/AuthoringSandboxEntry.js +0 -46
  51. package/dist/runtime/application/code-execution/BrowserCodeExecutor.js +0 -35
  52. package/dist/runtime/application/code-execution/BrowserCodeWorker.js +0 -17
  53. package/dist/runtime/application/code-execution/RemoteAuthoringDocument.js +0 -72
  54. package/dist/runtime/application/createSession.js +0 -66
  55. package/dist/runtime/application/createWorldAuthoringContext.js +0 -400
  56. package/dist/runtime/application/generation/GenerationOrchestrator.js +0 -629
  57. package/dist/runtime/application/generation/GenerationRuntime.js +0 -214
  58. package/dist/runtime/application/generation/PromptHybridWorldOrchestrator.js +0 -285
  59. package/dist/runtime/application/native-scene/CodeProject.js +0 -119
  60. package/dist/runtime/application/native-scene/CodeProjectModules.js +0 -128
  61. package/dist/runtime/application/native-scene/NativeEnvironmentGeometry.js +0 -62
  62. package/dist/runtime/application/native-scene/NativeOverlayCheckpoint.js +0 -127
  63. package/dist/runtime/application/native-scene/NativeRenderDiscovery.js +0 -51
  64. package/dist/runtime/application/native-scene/NativeSceneHost.js +0 -164
  65. package/dist/runtime/application/native-scene/NativeSceneOverlay.js +0 -116
  66. package/dist/runtime/application/native-scene/NativeThreeModule.js +0 -16
  67. package/dist/runtime/application/object-forge/SceneObjectForge.js +0 -232
  68. package/dist/runtime/application/programmatic-assets/ProgrammaticAssetBuilder.js +0 -54
  69. package/dist/runtime/application/programmatic-assets/ProgrammaticAssetContract.js +0 -22
  70. package/dist/runtime/application/programmatic-assets/ThreeCodeAsset.js +0 -40
  71. package/dist/runtime/application/scene/CapabilityResolver.js +0 -79
  72. package/dist/runtime/application/scene/RequestWindow.js +0 -54
  73. package/dist/runtime/application/scene/SceneAgentTools.js +0 -21
  74. package/dist/runtime/application/scene/SceneContracts.js +0 -45
  75. package/dist/runtime/application/scene/SceneEditService.js +0 -144
  76. package/dist/runtime/application/scene/SceneFacade.js +0 -267
  77. package/dist/runtime/application/scene/SceneInteractionAdapters.js +0 -40
  78. package/dist/runtime/application/scene/SceneJobController.js +0 -229
  79. package/dist/runtime/application/scene/ScenePackage.js +0 -162
  80. package/dist/runtime/application/scene/ScenePersistence.js +0 -50
  81. package/dist/runtime/application/scene/SceneProject.js +0 -95
  82. package/dist/runtime/application/scene/SceneSkillNames.js +0 -5
  83. package/dist/runtime/application/scene/StarterScene.js +0 -56
  84. package/dist/runtime/application/scene/WorldArchive.js +0 -87
  85. package/dist/runtime/application/scene/WorldDirectory.js +0 -20
  86. package/dist/runtime/application/scene/WorldDocument.js +0 -74
  87. package/dist/runtime/application/scene/WorldIO.js +0 -103
  88. package/dist/runtime/application/scene/WorldStorage.js +0 -137
  89. package/dist/runtime/application/skills/SkillRegistry.js +0 -163
  90. package/dist/runtime/application/skills/packs/acceptanceSkills.js +0 -32
  91. package/dist/runtime/application/skills/packs/affordanceSkills.js +0 -36
  92. package/dist/runtime/application/skills/packs/assetSkills.js +0 -46
  93. package/dist/runtime/application/skills/packs/authoringSkills.js +0 -16
  94. package/dist/runtime/application/skills/packs/batchSkills.js +0 -22
  95. package/dist/runtime/application/skills/packs/codeSkills.js +0 -106
  96. package/dist/runtime/application/skills/packs/generationSkills.js +0 -45
  97. package/dist/runtime/application/skills/packs/interactionSkills.js +0 -46
  98. package/dist/runtime/application/skills/packs/recoverySkills.js +0 -80
  99. package/dist/runtime/application/skills/packs/sceneSkills.js +0 -24
  100. package/dist/runtime/application/skills/packs/spatialSkills.js +0 -35
  101. package/dist/runtime/application/skills/packs/verificationSkills.js +0 -14
  102. package/dist/runtime/application/skills/packs/worldSkills.js +0 -45
  103. package/dist/runtime/application/skills/registerCoreSkills.js +0 -31
  104. package/dist/runtime/application/skills/skillPrimitives.js +0 -4
  105. package/dist/runtime/application/tasks/CabinetCupTask.js +0 -76
  106. package/dist/runtime/application/tasks.jsonl +0 -67
  107. package/dist/runtime/application/world-authoring/AuthoringAssetProducer.js +0 -42
  108. package/dist/runtime/application/world-authoring/AuthoringDiff.js +0 -149
  109. package/dist/runtime/application/world-authoring/AuthoringDocument.js +0 -825
  110. package/dist/runtime/application/world-authoring/AuthoringExecutionHost.js +0 -109
  111. package/dist/runtime/application/world-authoring/AuthoringIdentity.js +0 -17
  112. package/dist/runtime/application/world-authoring/AuthoringModelResolver.js +0 -29
  113. package/dist/runtime/application/world-authoring/AuthoringPatch.js +0 -118
  114. package/dist/runtime/application/world-authoring/AuthoringPromotionController.js +0 -334
  115. package/dist/runtime/application/world-authoring/AuthoringPromotionSource.js +0 -126
  116. package/dist/runtime/application/world-authoring/AuthoringRevisionHistory.js +0 -144
  117. package/dist/runtime/application/world-authoring/HeadlessImageExport.js +0 -174
  118. package/dist/runtime/application/world-authoring/ModelRef.js +0 -62
  119. package/dist/runtime/apps/mcp-server/AUTHORING.md +0 -71
  120. package/dist/runtime/apps/mcp-server/AuthoringSandboxEntry.js +0 -1
  121. package/dist/runtime/apps/mcp-server/AuthoringSandboxWorker.mjs +0 -30
  122. package/dist/runtime/apps/mcp-server/BuildEnvironment.js +0 -17
  123. package/dist/runtime/apps/mcp-server/CodeExecutor.js +0 -71
  124. package/dist/runtime/apps/mcp-server/DEPLOYMENT-PC2.md +0 -42
  125. package/dist/runtime/apps/mcp-server/DockerBuildRunner.js +0 -66
  126. package/dist/runtime/apps/mcp-server/FileAssetRepository.js +0 -159
  127. package/dist/runtime/apps/mcp-server/HeadlessAssetIO.js +0 -8
  128. package/dist/runtime/apps/mcp-server/HeadlessGLTFLoader.js +0 -47
  129. package/dist/runtime/apps/mcp-server/HeadlessWorldHost.js +0 -132
  130. package/dist/runtime/apps/mcp-server/IsolatedAuthoringExecutor.js +0 -6
  131. package/dist/runtime/apps/mcp-server/PROGRAMMATIC-ASSETS.md +0 -116
  132. package/dist/runtime/apps/mcp-server/ProgrammaticAssets.js +0 -60
  133. package/dist/runtime/apps/mcp-server/README.md +0 -150
  134. package/dist/runtime/apps/mcp-server/RemoteAuthoringDocument.js +0 -1
  135. package/dist/runtime/apps/mcp-server/SandboxBundle.js +0 -13
  136. package/dist/runtime/apps/mcp-server/SessionManager.js +0 -80
  137. package/dist/runtime/apps/mcp-server/StudioBridgeHttp.js +0 -58
  138. package/dist/runtime/apps/mcp-server/StudioLiveBridge.js +0 -190
  139. package/dist/runtime/apps/mcp-server/TrustedAuthoringWorker.mjs +0 -16
  140. package/dist/runtime/apps/mcp-server/VALIDATION.md +0 -45
  141. package/dist/runtime/apps/mcp-server/acceptance-evidence.json +0 -332
  142. package/dist/runtime/apps/mcp-server/errorDiagnostics.js +0 -32
  143. package/dist/runtime/apps/mcp-server/examples/code-house.js +0 -24
  144. package/dist/runtime/apps/mcp-server/examples/procedural-assets.js +0 -37
  145. package/dist/runtime/apps/mcp-server/main.mjs +0 -56
  146. package/dist/runtime/apps/mcp-server/registerTools.js +0 -215
  147. package/dist/runtime/apps/mcp-server/sandbox/run.mjs +0 -23
  148. package/dist/runtime/apps/mcp-server/security.js +0 -21
  149. package/dist/runtime/apps/mcp-server/tasks.jsonl +0 -9
  150. package/dist/runtime/apps/server/CapabilityAdapterRegistry.js +0 -157
  151. package/dist/runtime/apps/server/README.md +0 -7
  152. package/dist/runtime/apps/server/WorldDiskStorage.js +0 -51
  153. package/dist/runtime/apps/server/openai-compatible-agent-gateway.mjs +0 -278
  154. package/dist/runtime/apps/server/tasks.jsonl +0 -10
  155. package/dist/runtime/foundation/EventBus.js +0 -18
  156. package/dist/runtime/foundation/JsonGateway.js +0 -47
  157. package/dist/runtime/foundation/PolicyEngine.js +0 -21
  158. package/dist/runtime/foundation/README.md +0 -7
  159. package/dist/runtime/foundation/TraceRecorder.js +0 -76
  160. package/dist/runtime/foundation/errors.js +0 -8
  161. package/dist/runtime/foundation/simulation/SimulationProfile.js +0 -143
  162. package/dist/runtime/foundation/version.js +0 -2
  163. package/dist/runtime/modules/agent/README.md +0 -11
  164. package/dist/runtime/modules/agent/ToolCallingAgent.js +0 -19
  165. package/dist/runtime/modules/agent/bootstrapWorld.js +0 -10
  166. package/dist/runtime/modules/agent/buildRecoveryProposals.js +0 -533
  167. package/dist/runtime/modules/agent/execution/AgentExecutionRules.js +0 -127
  168. package/dist/runtime/modules/agent/execution/AgentRunResults.js +0 -55
  169. package/dist/runtime/modules/agent/execution/AgentRunSession.js +0 -390
  170. package/dist/runtime/modules/agent/execution/AgentToolInvoker.js +0 -39
  171. package/dist/runtime/modules/agent/gateway/HttpLLMGateway.js +0 -19
  172. package/dist/runtime/modules/agent/prompt/index.js +0 -46
  173. package/dist/runtime/modules/agent/tasks.jsonl +0 -94
  174. package/dist/runtime/modules/artifact/ArtifactContentGate.js +0 -144
  175. package/dist/runtime/modules/artifact/ArtifactDescriptor.js +0 -280
  176. package/dist/runtime/modules/artifact/ArtifactImporter.js +0 -185
  177. package/dist/runtime/modules/artifact/ArtifactModule.js +0 -111
  178. package/dist/runtime/modules/artifact/ArtifactRegistry.js +0 -197
  179. package/dist/runtime/modules/artifact/IncrementalSha256.js +0 -129
  180. package/dist/runtime/modules/artifact/MemoryArtifactByteStore.js +0 -115
  181. package/dist/runtime/modules/artifact/README.md +0 -7
  182. package/dist/runtime/modules/artifact/storage/IndexedDbArtifactStore.js +0 -67
  183. package/dist/runtime/modules/artifact/tasks.jsonl +0 -31
  184. package/dist/runtime/modules/asset/AssetModule.js +0 -399
  185. package/dist/runtime/modules/asset/README.md +0 -54
  186. package/dist/runtime/modules/asset/loading/AssetLoader.js +0 -157
  187. package/dist/runtime/modules/asset/loading/GltfAssetLoader.js +0 -61
  188. package/dist/runtime/modules/asset/loading/builtins/BuiltinAssets.js +0 -95
  189. package/dist/runtime/modules/asset/loading/builtins/HouseDoor.js +0 -33
  190. package/dist/runtime/modules/asset/loading/builtins/IndustrialCabinet.js +0 -103
  191. package/dist/runtime/modules/asset/model/AssetInputContracts.js +0 -95
  192. package/dist/runtime/modules/asset/model/AssetRef.js +0 -12
  193. package/dist/runtime/modules/asset/model/MechanicalAssetDraft.js +0 -172
  194. package/dist/runtime/modules/asset/model/admission.js +0 -117
  195. package/dist/runtime/modules/asset/model/errors.js +0 -6
  196. package/dist/runtime/modules/asset/model/parts.js +0 -27
  197. package/dist/runtime/modules/asset/model/resourceBudget.js +0 -10
  198. package/dist/runtime/modules/asset/model/schema.js +0 -150
  199. package/dist/runtime/modules/asset/persistence/AssetManifestStore.js +0 -78
  200. package/dist/runtime/modules/asset/persistence/CompiledAssetStore.js +0 -84
  201. package/dist/runtime/modules/asset/persistence/LocalAssetLibrary.js +0 -86
  202. package/dist/runtime/modules/asset/persistence/LocalAssetLibraryStore.js +0 -81
  203. package/dist/runtime/modules/asset/production/AssetProductionPipeline.js +0 -272
  204. package/dist/runtime/modules/asset/production/AssetRecipe.js +0 -32
  205. package/dist/runtime/modules/asset/production/adapters/EmbodiedGenAdapter.js +0 -45
  206. package/dist/runtime/modules/asset/production/adapters/EmbodiedGenBundleAdapter.js +0 -590
  207. package/dist/runtime/modules/asset/production/compiler/AssetCompiler.js +0 -173
  208. package/dist/runtime/modules/asset/production/compiler/evidence/AnimationMotionEvidence.js +0 -124
  209. package/dist/runtime/modules/asset/production/compiler/evidence/StaticPanelEvidence.js +0 -56
  210. package/dist/runtime/modules/asset/production/compiler/gltfIO.js +0 -6
  211. package/dist/runtime/modules/asset/production/compiler/partGeometry.js +0 -74
  212. package/dist/runtime/modules/asset/production/compiler/passes/ArticulatedCollisionPass.js +0 -63
  213. package/dist/runtime/modules/asset/production/compiler/passes/ArticulationCandidatePass.js +0 -48
  214. package/dist/runtime/modules/asset/production/compiler/passes/AuthoringIntentPass.js +0 -16
  215. package/dist/runtime/modules/asset/production/compiler/passes/ColliderFallbackPass.js +0 -30
  216. package/dist/runtime/modules/asset/production/compiler/passes/CompileQualityPass.js +0 -75
  217. package/dist/runtime/modules/asset/production/compiler/passes/ExplicitDefinitionPass.js +0 -20
  218. package/dist/runtime/modules/asset/production/compiler/passes/GLTFInspectPass.js +0 -34
  219. package/dist/runtime/modules/asset/production/compiler/passes/GeometryPass.js +0 -32
  220. package/dist/runtime/modules/asset/production/compiler/passes/JointFramePass.js +0 -116
  221. package/dist/runtime/modules/asset/production/compiler/passes/KinematicEvidencePass.js +0 -84
  222. package/dist/runtime/modules/asset/production/compiler/passes/ManifestPass.js +0 -63
  223. package/dist/runtime/modules/asset/production/compiler/passes/NormalizeTransformPass.js +0 -16
  224. package/dist/runtime/modules/asset/production/compiler/passes/OptimizeGLBPass.js +0 -23
  225. package/dist/runtime/modules/asset/production/compiler/passes/PartColliderPass.js +0 -50
  226. package/dist/runtime/modules/asset/production/compiler/passes/PartGeometryEnrichmentPass.js +0 -60
  227. package/dist/runtime/modules/asset/production/compiler/passes/PartProposalPass.js +0 -93
  228. package/dist/runtime/modules/asset/production/compiler/passes/RemoteEnrichmentPass.js +0 -32
  229. package/dist/runtime/modules/asset/production/compiler/passes/ResourceBudgetPass.js +0 -55
  230. package/dist/runtime/modules/asset/production/compiler/passes/SegmentMaterializePass.js +0 -203
  231. package/dist/runtime/modules/asset/production/compiler/passes/SegmentationEvidencePass.js +0 -43
  232. package/dist/runtime/modules/asset/production/compiler/passes/SemanticHeuristicPass.js +0 -33
  233. package/dist/runtime/modules/asset/production/compiler/passes/StructurePass.js +0 -60
  234. package/dist/runtime/modules/asset/production/compiler/providers/HttpCompilerProvider.js +0 -23
  235. package/dist/runtime/modules/asset/production/verification/KinematicHypothesisScreen.js +0 -198
  236. package/dist/runtime/modules/asset/registry/AssetCatalog.js +0 -72
  237. package/dist/runtime/modules/asset/registry/AssetRegistry.js +0 -51
  238. package/dist/runtime/modules/asset/registry/manifests/index.js +0 -173
  239. package/dist/runtime/modules/asset/tasks.jsonl +0 -87
  240. package/dist/runtime/modules/generation/README.md +0 -9
  241. package/dist/runtime/modules/generation/connector/ConnectorArtifactClient.js +0 -45
  242. package/dist/runtime/modules/generation/connector/ConnectorCapabilityAdapter.js +0 -169
  243. package/dist/runtime/modules/generation/connector/ConnectorClient.js +0 -192
  244. package/dist/runtime/modules/generation/connector/ConnectorJobClient.js +0 -167
  245. package/dist/runtime/modules/generation/connector/ConnectorJobEventClient.js +0 -179
  246. package/dist/runtime/modules/generation/connector/ConnectorSession.js +0 -202
  247. package/dist/runtime/modules/generation/jobs/GenerationJobProjection.js +0 -239
  248. package/dist/runtime/modules/generation/jobs/GenerationJobReconciler.js +0 -99
  249. package/dist/runtime/modules/generation/jobs/GenerationJobStore.js +0 -91
  250. package/dist/runtime/modules/generation/jobs/GenerationJobTransportOverlay.js +0 -50
  251. package/dist/runtime/modules/generation/providers/ProviderRegistry.js +0 -304
  252. package/dist/runtime/modules/generation/tasks.jsonl +0 -35
  253. package/dist/runtime/modules/navigation/NavigationBackend.js +0 -17
  254. package/dist/runtime/modules/navigation/RecastNavigationBackend.js +0 -245
  255. package/dist/runtime/modules/physics/JoltPhysicsBackend.js +0 -850
  256. package/dist/runtime/modules/physics/PhysicsApiSurface.js +0 -651
  257. package/dist/runtime/modules/physics/PhysicsBackend.js +0 -88
  258. package/dist/runtime/modules/physics/RapierPhysicsBackend.js +0 -410
  259. package/dist/runtime/modules/rendering/README.md +0 -7
  260. package/dist/runtime/modules/rendering/RendererProbe.js +0 -153
  261. package/dist/runtime/modules/rendering/WebGpuPostFxPipeline.js +0 -140
  262. package/dist/runtime/modules/rendering/createRenderer.js +0 -76
  263. package/dist/runtime/modules/rendering/disposeObject3D.js +0 -34
  264. package/dist/runtime/modules/rendering/loadGaussianSplatVisual.js +0 -74
  265. package/dist/runtime/modules/rendering/style/StylePack.js +0 -34
  266. package/dist/runtime/modules/rendering/style/StyleSystem.js +0 -173
  267. package/dist/runtime/modules/rendering/tasks.jsonl +0 -7
  268. package/dist/runtime/modules/world/README.md +0 -13
  269. package/dist/runtime/modules/world/build/WorldBuilder.js +0 -170
  270. package/dist/runtime/modules/world/compiler/PipelineEngine.js +0 -32
  271. package/dist/runtime/modules/world/compiler/WorldAdmission.js +0 -43
  272. package/dist/runtime/modules/world/compiler/WorldBehaviorCompiler.js +0 -68
  273. package/dist/runtime/modules/world/compiler/WorldCompilation.js +0 -157
  274. package/dist/runtime/modules/world/compiler/WorldComposer.js +0 -201
  275. package/dist/runtime/modules/world/compiler/WorldPhysicsAdmission.js +0 -76
  276. package/dist/runtime/modules/world/compiler/WorldRecompiler.js +0 -356
  277. package/dist/runtime/modules/world/compiler/WorldRetry.js +0 -75
  278. package/dist/runtime/modules/world/compiler/createWorldPipeline.js +0 -379
  279. package/dist/runtime/modules/world/content/blankWorld.js +0 -35
  280. package/dist/runtime/modules/world/content/environments.js +0 -84
  281. package/dist/runtime/modules/world/content/grandUrbanBlock.js +0 -189
  282. package/dist/runtime/modules/world/content/magic-cabin/README.md +0 -28
  283. package/dist/runtime/modules/world/content/magic-cabin/affordances.js +0 -64
  284. package/dist/runtime/modules/world/content/magic-cabin/cabinContents.js +0 -7078
  285. package/dist/runtime/modules/world/content/magic-cabin/lighting.js +0 -26
  286. package/dist/runtime/modules/world/content/magic-cabin/materials.js +0 -20
  287. package/dist/runtime/modules/world/content/magicCabin.js +0 -190
  288. package/dist/runtime/modules/world/content/monumentHall.js +0 -154
  289. package/dist/runtime/modules/world/content/ruinedCourtyard.js +0 -196
  290. package/dist/runtime/modules/world/content/suzhouGarden/README.md +0 -141
  291. package/dist/runtime/modules/world/content/suzhouGarden/index.js +0 -137
  292. package/dist/runtime/modules/world/content/suzhouGarden/src/arch.js +0 -491
  293. package/dist/runtime/modules/world/content/suzhouGarden/src/buildings.js +0 -670
  294. package/dist/runtime/modules/world/content/suzhouGarden/src/core.js +0 -578
  295. package/dist/runtime/modules/world/content/suzhouGarden/src/lod.js +0 -127
  296. package/dist/runtime/modules/world/content/suzhouGarden/src/main.js +0 -642
  297. package/dist/runtime/modules/world/content/suzhouGarden/src/nature.js +0 -650
  298. package/dist/runtime/modules/world/content/suzhouGarden/src/rockery.js +0 -280
  299. package/dist/runtime/modules/world/content/suzhouGarden/src/sky.js +0 -242
  300. package/dist/runtime/modules/world/content/suzhouGarden/src/water.js +0 -215
  301. package/dist/runtime/modules/world/content/woodlandWorkshop.js +0 -192
  302. package/dist/runtime/modules/world/content/yuanmingyuan/README.md +0 -36
  303. package/dist/runtime/modules/world/content/yuanmingyuan/arch.js +0 -351
  304. package/dist/runtime/modules/world/content/yuanmingyuan/buildings.js +0 -490
  305. package/dist/runtime/modules/world/content/yuanmingyuan/core.js +0 -505
  306. package/dist/runtime/modules/world/content/yuanmingyuan/index.js +0 -101
  307. package/dist/runtime/modules/world/content/yuanmingyuan/nature.js +0 -435
  308. package/dist/runtime/modules/world/content/yuanmingyuan/sky.js +0 -169
  309. package/dist/runtime/modules/world/content/yuanmingyuan/water.js +0 -245
  310. package/dist/runtime/modules/world/errors.js +0 -9
  311. package/dist/runtime/modules/world/generated/GeneratedWorldCoordinates.js +0 -50
  312. package/dist/runtime/modules/world/generated/GeneratedWorldLoader.js +0 -297
  313. package/dist/runtime/modules/world/runtime/CommandHistory.js +0 -80
  314. package/dist/runtime/modules/world/runtime/ObjectStore.js +0 -31
  315. package/dist/runtime/modules/world/runtime/ObjectTransform.js +0 -62
  316. package/dist/runtime/modules/world/runtime/ObservedEntity.js +0 -37
  317. package/dist/runtime/modules/world/runtime/ProjectCapabilities.js +0 -207
  318. package/dist/runtime/modules/world/runtime/SceneSerializer.js +0 -246
  319. package/dist/runtime/modules/world/runtime/WorldAuthority.js +0 -41
  320. package/dist/runtime/modules/world/runtime/WorldCollisionSignature.js +0 -14
  321. package/dist/runtime/modules/world/runtime/WorldCommands.js +0 -502
  322. package/dist/runtime/modules/world/runtime/WorldObservation.js +0 -71
  323. package/dist/runtime/modules/world/runtime/WorldQueries.js +0 -340
  324. package/dist/runtime/modules/world/runtime/WorldRecovery.js +0 -78
  325. package/dist/runtime/modules/world/runtime/WorldRuntime.js +0 -649
  326. package/dist/runtime/modules/world/runtime/affordance/ObjectAffordances.js +0 -107
  327. package/dist/runtime/modules/world/runtime/affordance/WorldAffordances.js +0 -130
  328. package/dist/runtime/modules/world/runtime/behavior/BehaviorCompiler.js +0 -79
  329. package/dist/runtime/modules/world/runtime/behavior/ProjectStateMachine.js +0 -195
  330. package/dist/runtime/modules/world/runtime/behavior/RuleGraph.js +0 -70
  331. package/dist/runtime/modules/world/runtime/behavior/RuleRuntime.js +0 -115
  332. package/dist/runtime/modules/world/runtime/graph/SceneGraph.js +0 -216
  333. package/dist/runtime/modules/world/runtime/interaction/ArticulationRuntime.js +0 -214
  334. package/dist/runtime/modules/world/runtime/interaction/CarryCapability.js +0 -65
  335. package/dist/runtime/modules/world/runtime/interaction/CarryRuntime.js +0 -222
  336. package/dist/runtime/modules/world/runtime/interaction/InteractionApproach.js +0 -130
  337. package/dist/runtime/modules/world/runtime/interaction/InteractionContract.js +0 -57
  338. package/dist/runtime/modules/world/runtime/interaction/RecoveryRuntime.js +0 -123
  339. package/dist/runtime/modules/world/runtime/interaction/SettleRuntime.js +0 -120
  340. package/dist/runtime/modules/world/runtime/semantic/SemanticWorldView.js +0 -102
  341. package/dist/runtime/modules/world/runtime/simulation/SimulationClock.js +0 -89
  342. package/dist/runtime/modules/world/runtime/simulation/SimulationSession.js +0 -99
  343. package/dist/runtime/modules/world/runtime/simulation/ThermalSystem.js +0 -269
  344. package/dist/runtime/modules/world/runtime/spatial/SpatialSnapshot.js +0 -56
  345. package/dist/runtime/modules/world/runtime/spatial/ThreeBvhRuntime.js +0 -36
  346. package/dist/runtime/modules/world/runtime/systems/InteractionSystem.js +0 -728
  347. package/dist/runtime/modules/world/runtime/systems/LocomotionSystem.js +0 -269
  348. package/dist/runtime/modules/world/runtime/systems/NavigationSystem.js +0 -469
  349. package/dist/runtime/modules/world/runtime/systems/PhysicsSystem.js +0 -1657
  350. package/dist/runtime/modules/world/runtime/systems/RenderingSystem.js +0 -457
  351. package/dist/runtime/modules/world/runtime/systems/SpatialSystem.js +0 -284
  352. package/dist/runtime/modules/world/spec/WorldIR.js +0 -165
  353. package/dist/runtime/modules/world/spec/WorldIRToolSchema.js +0 -86
  354. package/dist/runtime/modules/world/spec/WorldPlannerProposal.js +0 -51
  355. package/dist/runtime/modules/world/spec/WorldRevision.js +0 -231
  356. package/dist/runtime/modules/world/spec/WorldSpec.js +0 -86
  357. package/dist/runtime/modules/world/tasks.jsonl +0 -530
  358. package/dist/runtime/modules/world/verification/ArticulationVerifier.js +0 -254
  359. package/dist/runtime/modules/world/verification/Finding.js +0 -105
  360. package/dist/runtime/modules/world/verification/InteractionEvidence.js +0 -69
  361. package/dist/runtime/modules/world/verification/RepairEngine.js +0 -49
  362. package/dist/runtime/modules/world/verification/WorldAcceptance.js +0 -158
  363. package/dist/runtime/modules/world/verification/WorldValidator.js +0 -65
  364. package/dist/runtime/package-lock.json +0 -6245
  365. package/dist/runtime/package.json +0 -91
  366. package/dist/runtime/public/assets/cabinet.glb +0 -0
  367. package/dist/runtime/public/assets/grand-urban-block/clean_asphalt_diff_1k.jpg +0 -0
  368. package/dist/runtime/public/assets/grand-urban-block/clean_asphalt_nor_gl_1k.jpg +0 -0
  369. package/dist/runtime/public/assets/grand-urban-block/concrete_pavement_diff_1k.jpg +0 -0
  370. package/dist/runtime/public/assets/grand-urban-block/urban_street_01_1k.hdr +0 -0
  371. package/dist/runtime/public/assets/monument-hall/marble_diff_1k.jpg +0 -0
  372. package/dist/runtime/public/assets/monument-hall/marble_nor_gl_1k.jpg +0 -0
  373. package/dist/runtime/public/assets/monument-hall/marble_rough_1k.jpg +0 -0
  374. package/dist/runtime/public/assets/monument-hall/solitude_interior_1k.hdr +0 -0
  375. package/dist/runtime/public/assets/ruined-courtyard/courtyard_1k.hdr +0 -0
  376. package/dist/runtime/public/assets/ruined-courtyard/mossy_cobblestone_diff_1k.jpg +0 -0
  377. package/dist/runtime/public/assets/ruined-courtyard/mossy_cobblestone_nor_gl_1k.jpg +0 -0
  378. package/dist/runtime/public/assets/ruined-courtyard/mossy_sandstone_diff_1k.jpg +0 -0
  379. package/dist/schema-Dudvovhu.js +0 -364
  380. package/dist/schema-Dudvovhu.js.map +0 -1
  381. package/dist/suzhouGarden-BCx_JeV5.js +0 -6159
  382. package/dist/suzhouGarden-BCx_JeV5.js.map +0 -1
  383. package/dist/woodlandWorkshop-BGNWPNdK.js +0 -484
  384. package/dist/woodlandWorkshop-BGNWPNdK.js.map +0 -1
  385. package/dist/yuanmingyuan-DAIb1msO.js +0 -4962
  386. package/dist/yuanmingyuan-DAIb1msO.js.map +0 -1
@@ -1 +0,0 @@
1
- {"version":3,"file":"SceneSerializer-DPVOyeRk.js","names":["clone"],"sources":["../../../modules/world/runtime/behavior/RuleGraph.js","../../../modules/world/runtime/WorldAuthority.js","../../../modules/world/runtime/SceneSerializer.js"],"sourcesContent":["const SCHEMA='agentscape.rule-graph';\nconst VERSION=1;\nconst allowedEffectKinds=new Set(['set-state']);\nconst clean=v=>typeof v==='string'?v.trim():'';\nconst scalar=v=>v===null||typeof v==='string'||typeof v==='number'||typeof v==='boolean';\n\nexport function compileRuleGraph(rules=[]){\n if(!Array.isArray(rules)) throw new TypeError('Rules must be an array');\n const ids=new Set();\n const compiled=rules.map((rule,index)=>{\n if(!rule||typeof rule!=='object'||Array.isArray(rule)) throw new TypeError(`Rule[${index}] must be an object`);\n const id=clean(rule.id),event=clean(rule.event),effect=rule.effect;\n if(!id||ids.has(id)) throw new TypeError(`Rule[${index}] requires unique id`); ids.add(id);\n if(!event) throw new TypeError(`Rule[${index}] requires event`);\n if(!effect||typeof effect!=='object'||allowedEffectKinds.has(effect.kind)===false) throw new TypeError(`Rule[${index}] unsupported effect`);\n const targetId=clean(effect.targetId),stateKey=clean(effect.stateKey);\n if(!targetId||!stateKey||!Object.prototype.hasOwnProperty.call(effect,'value')||!scalar(effect.value)) throw new TypeError(`Rule[${index}] set-state effect requires targetId/stateKey/scalar value`);\n const condition=rule.condition?compileCondition(rule.condition,`Rule[${index}] condition`):null;\n return {id,event,condition,effect:{kind:'set-state',targetId,stateKey,value:effect.value},description:clean(rule.description)||undefined};\n });\n return {schema:SCHEMA,schemaVersion:VERSION,rules:compiled};\n}\n\nfunction compileCondition(condition,label){\n if(!condition||typeof condition!=='object'||Array.isArray(condition)) throw new TypeError(`${label} must be an object`);\n const kind=clean(condition.kind);\n if(kind==='equals'){\n if(!clean(condition.targetId)||!clean(condition.stateKey)||!Object.prototype.hasOwnProperty.call(condition,'value')||!scalar(condition.value)) throw new TypeError(`${label} equals requires targetId/stateKey/value`);\n return {kind:'equals',targetId:clean(condition.targetId),stateKey:clean(condition.stateKey),value:condition.value};\n }\n if(kind==='not-equals'){\n if(!clean(condition.targetId)||!clean(condition.stateKey)||!Object.prototype.hasOwnProperty.call(condition,'value')||!scalar(condition.value)) throw new TypeError(`${label} not-equals requires targetId/stateKey/value`);\n return {kind:'not-equals',targetId:clean(condition.targetId),stateKey:clean(condition.stateKey),value:condition.value};\n }\n throw new TypeError(`${label} unsupported kind: ${kind}`);\n}\n\nexport function evaluateRuleGraph(graph,event,stateReader){\n if(graph?.schema!==SCHEMA||graph.schemaVersion!==VERSION) throw new TypeError('Unsupported rule graph');\n if(typeof stateReader!=='function') throw new TypeError('stateReader must be a function');\n const matches=[];\n for(const rule of graph.rules){\n if(rule.event!==event) continue;\n if(rule.condition&&!evaluateCondition(rule.condition,stateReader)) continue;\n matches.push(structuredClone(rule.effect));\n }\n return matches;\n}\n\nfunction evaluateCondition(condition,stateReader){\n const value=stateReader(condition.targetId,condition.stateKey);\n return condition.kind==='equals' ? Object.is(value,condition.value) : !Object.is(value,condition.value);\n}\n\nexport function executeRuleEffects(runtime,effects,{source='rule-graph',eventId=null,ruleCascadeDepth=null}={}){\n if(!Array.isArray(effects)) throw new TypeError('Rule effects must be an array');\n if(!effects.length) return Promise.resolve({status:'no-rule-match',effects:[]});\n return runtime.mutate(`rule:${eventId||source}`,async()=>{\n const applied=[];\n for(const effect of effects){\n if(effect.kind!=='set-state') { const error=new TypeError(`Unsupported rule effect: ${effect.kind}`); error.code='RULE_EFFECT_UNSUPPORTED'; throw error; }\n const result=runtime.applyStateTransition(effect.targetId,effect.stateKey,effect.value,{source:'rule-graph',event:eventId,...(ruleCascadeDepth == null ? {} : {ruleCascadeDepth})});\n if(result?.status!=='state-transition-applied') throw new Error(`Rule state transition rejected: ${effect.targetId}.${effect.stateKey}`);\n applied.push(result);\n }\n return {status:'rule-effects-applied',effects:applied};\n }, ruleCascadeDepth == null ? {} : {ruleCascadeDepth});\n}\n\nexport {SCHEMA as RULE_GRAPH_SCHEMA,VERSION as RULE_GRAPH_VERSION};\n","const clone = (value) => value == null ? value : structuredClone(value);\r\n\r\nexport function captureWorldAuthority(runtime) {\r\n return {\r\n currentWorldRevision:clone(runtime.currentWorldRevision) || null,\r\n currentBehaviorBundle:clone(runtime.currentBehaviorBundle) || null,\r\n currentPhysicsRequirements:clone(runtime.currentPhysicsRequirements) || null,\r\n lastAcceptanceBundle:clone(runtime.lastAcceptanceBundle) || null,\r\n restoredAcceptanceEvidence:clone(runtime.restoredAcceptanceEvidence) || null,\r\n interactionEvidence:runtime.interactionEvidence instanceof Map\r\n ? [...runtime.interactionEvidence.entries()].map(([key,value]) => [key,clone(value)])\r\n : null\r\n };\r\n}\r\n\r\nexport function restoreWorldAuthority(runtime, authority = {}) {\r\n runtime.currentWorldRevision = clone(authority.currentWorldRevision) || null;\r\n runtime.currentBehaviorBundle = clone(authority.currentBehaviorBundle) || null;\r\n runtime.currentPhysicsRequirements = clone(authority.currentPhysicsRequirements) || null;\r\n runtime.lastAcceptanceBundle = clone(authority.lastAcceptanceBundle) || null;\r\n runtime.restoredAcceptanceEvidence = clone(authority.restoredAcceptanceEvidence) || null;\r\n if (authority.interactionEvidence === null) delete runtime.interactionEvidence;\r\n else runtime.interactionEvidence = new Map((authority.interactionEvidence || []).map(([key,value]) => [key,clone(value)]));\r\n runtime.loadRuleGraph?.(authority.currentBehaviorBundle?.ruleGraph || []);\r\n}\r\n\r\nexport function commitWorldAuthority(runtime, {\r\n worldIR,\r\n behaviorBundle,\r\n physicsRequirements,\r\n acceptanceBundle = null\r\n} = {}) {\r\n runtime.currentWorldRevision = worldIR\r\n ? { revision:clone(worldIR.revision), provenance:clone(worldIR.provenance) }\r\n : null;\r\n runtime.currentBehaviorBundle = clone(behaviorBundle) || null;\r\n runtime.currentPhysicsRequirements = clone(physicsRequirements) || null;\r\n runtime.lastAcceptanceBundle = clone(acceptanceBundle) || null;\r\n runtime.restoredAcceptanceEvidence = null;\r\n runtime.loadRuleGraph?.(behaviorBundle?.ruleGraph || []);\r\n}\r\n","import { uniformScaleValue } from './ObjectTransform.js';\nimport { thermalStateSchema,validateThermalStateForProfile } from '../../../foundation/simulation/SimulationProfile.js';\nimport { compileRuleGraph } from './behavior/RuleGraph.js';\nimport { captureWorldAuthority, restoreWorldAuthority } from './WorldAuthority.js';\n\nexport const SCENE_SCHEMA = 'agentscape.scene';\nexport const SCENE_VERSION = 1;\n\nconst clone = (value) => JSON.parse(JSON.stringify(value));\nconst isFiniteVec = (value, length) => Array.isArray(value) && value.length === length && value.every(Number.isFinite);\n\nexport class SceneSerializer {\n *objects(runtime) {\n for (const [id, record] of runtime.store.entries()) {\n const object = record.object;\n const articulation = runtime.physics?.captureArticulationPose?.(id) || [];\n yield { id, assetId: record.assetId,\n transform: { position: object.position.toArray(), quaternion: object.quaternion.toArray(), scale: object.scale.toArray() },\n state: clone(record.state || {}), ...(runtime.thermal?.capture?.(id) ? { simulation:runtime.thermal.capture(id) } : {}),\n ...(record.active === false ? { active: false } : {}),\n ...(articulation.length ? { articulation } : record.dormantArticulation?.length ? { articulation: clone(record.dormantArticulation) } : {}) };\n }\n }\n\n serialize(runtime, { name = 'Untitled World', includeRelations = true, includeObjects = true } = {}) {\n if (includeRelations) runtime.sceneGraph?.update?.();\n const objects = includeObjects ? Array.from(this.objects(runtime)) : [];\n const usedAssets = new Set(objects.map(object => object.assetId));\n const assets = [...usedAssets].map(assetId => runtime.assetModule.getManifest(assetId))\n .filter(manifest => ['glb', 'compiled'].includes(manifest.source?.kind)).map(clone);\n\n const worldRevision=runtime.currentWorldRevision ? clone(runtime.currentWorldRevision) : null;\n const acceptanceEvidence=runtime.lastAcceptanceBundle ? clone(runtime.lastAcceptanceBundle) : null;\n const cameraState=runtime.rendering?.cameraState?.() || null;\n const stylePack=runtime.rendering?.serializeStyle?.() || null;\n return {\n schema: SCENE_SCHEMA,\n schemaVersion: SCENE_VERSION,\n metadata: {\n name,\n savedAt: new Date().toISOString(),\n generator: `AgentScape/${runtime.version || 'unknown'}`,\n environment: runtime.environment?.id || null,\n ...(stylePack?{stylePack}:{}),\n ...(runtime.environment?.snapshot ? {environmentState:clone(runtime.environment.snapshot())} : {}),\n ...(worldRevision?{worldRevision}:{})\n },\n assets,\n objects,\n configuration: {\n behaviorBundle: runtime.currentBehaviorBundle ? clone(runtime.currentBehaviorBundle) : null,\n physicsRequirements: runtime.currentPhysicsRequirements ? clone(runtime.currentPhysicsRequirements) : null\n },\n ...(includeRelations ? { relations:runtime.sceneGraph?.list?.() || [] } : {}),\n ...(acceptanceEvidence?{verification:{acceptanceEvidence}}:{}),\n ...(cameraState?{camera:cameraState}:{})\n };\n }\n\n validate(scene) {\n if (!scene || typeof scene !== 'object') throw new Error('Scene must be an object');\n if (scene.schema !== SCENE_SCHEMA) throw new Error(`Unsupported scene schema: ${scene.schema || 'missing'}`);\n if (scene.schemaVersion !== SCENE_VERSION) throw new Error(`Unsupported scene version: ${scene.schemaVersion}`);\n if (!Array.isArray(scene.objects)) throw new Error('Scene objects must be an array');\n if (!Array.isArray(scene.assets)) throw new Error('Scene assets must be an array');\n if (scene.camera != null && (!isFiniteVec(scene.camera.position,3) || !isFiniteVec(scene.camera.target,3))) throw new Error('Scene camera requires finite position and target');\n if (scene.relations != null && !Array.isArray(scene.relations)) throw new Error('Scene relations must be an array');\n const worldRevision=scene.metadata?.worldRevision;\n if (worldRevision != null) {\n if (!worldRevision || typeof worldRevision !== 'object' || Array.isArray(worldRevision)) throw new Error('Scene worldRevision must be an object');\n if (!worldRevision.revision?.id) throw new Error('Scene worldRevision requires revision.id');\n if (!worldRevision.provenance?.source) throw new Error('Scene worldRevision requires provenance.source');\n }\n const configuration = scene.configuration;\n if (configuration != null) {\n if (typeof configuration !== 'object' || Array.isArray(configuration)) throw new Error('Invalid scene configuration');\n for (const key of ['behaviorBundle', 'physicsRequirements']) {\n const value = configuration[key];\n if (value != null && (typeof value !== 'object' || Array.isArray(value))) throw new Error(`Invalid scene ${key}`);\n if (value?.worldRevisionId && value.worldRevisionId !== worldRevision?.revision?.id) {\n throw new Error(`Scene ${key} revision mismatch`);\n }\n }\n const graph = configuration.behaviorBundle?.ruleGraph || [];\n if (!Array.isArray(graph) && (graph.schema !== 'agentscape.rule-graph' || graph.schemaVersion !== 1)) {\n throw new Error('Invalid scene rule graph');\n }\n compileRuleGraph(Array.isArray(graph) ? graph : graph.rules);\n }\n const acceptanceEvidence=scene.verification?.acceptanceEvidence;\n if (acceptanceEvidence != null) {\n if (acceptanceEvidence.schema !== 'agentscape.acceptance-evidence' || acceptanceEvidence.schemaVersion !== 1) throw new Error('Unsupported acceptance evidence');\n if (!Array.isArray(acceptanceEvidence.criteria) || !acceptanceEvidence.result || typeof acceptanceEvidence.result !== 'object') throw new Error('Invalid acceptance evidence payload');\n const revisionId=worldRevision?.revision?.id || null;\n if (revisionId && acceptanceEvidence.worldRevisionId && acceptanceEvidence.worldRevisionId !== revisionId) throw new Error(`Acceptance evidence revision mismatch: ${acceptanceEvidence.worldRevisionId} != ${revisionId}`);\n }\n // 先只收集并校验标识,后续 heldBy 引用需要完整的 id 集合。\n const objectIds = new Set();\n for (const object of scene.objects) {\n if (!object.id || !object.assetId) throw new Error('Scene object requires id and assetId');\n if (object.active != null && typeof object.active !== 'boolean') throw new Error('Invalid entity activation');\n if (object.simulation != null) {\n if(!thermalStateSchema.safeParse(object.simulation).success)\n throw new Error('Invalid entity thermal state');\n }\n if (object.articulation != null) {\n if (!Array.isArray(object.articulation) || object.articulation.length > 128) throw new Error('Invalid articulation poses');\n const names = new Set();\n for (const part of object.articulation) {\n if (!part || typeof part.partName !== 'string' || names.has(part.partName) || !isFiniteVec(part.position,3) || !isFiniteVec(part.quaternion,4)\n || Math.abs(Math.hypot(...part.quaternion)-1) > .001 || (part.motorTarget != null && !Number.isFinite(part.motorTarget))) throw new Error('Invalid articulation pose');\n names.add(part.partName);\n }\n }\n if (objectIds.has(object.id)) throw new Error(`Duplicate scene object id: ${object.id}`);\n objectIds.add(object.id);\n }\n const heldOwners = new Set();\n for (const object of scene.objects) {\n if (!isFiniteVec(object.transform?.position, 3)) throw new Error(`${object.id}: invalid position`);\n if (!isFiniteVec(object.transform?.quaternion, 4)) throw new Error(`${object.id}: invalid quaternion`);\n if (!isFiniteVec(object.transform?.scale, 3)) throw new Error(`${object.id}: invalid scale`);\n uniformScaleValue(object.transform.scale);\n const heldBy = object.state?.heldBy;\n if (heldBy) {\n if (!['human','agent'].includes(heldBy.kind)) throw new Error(`${object.id}: invalid heldBy.kind`);\n const ownerKey = heldBy.kind === 'human' ? 'human' : `agent:${heldBy.id}`;\n if (heldBy.kind === 'agent' && (!heldBy.id || !objectIds.has(heldBy.id))) throw new Error(`${object.id}: heldBy agent is missing`);\n if (heldOwners.has(ownerKey)) throw new Error(`${ownerKey}: multiple held objects are not supported`);\n heldOwners.add(ownerKey);\n }\n }\n return scene;\n }\n\n async restore(runtime, input) {\n const scene = this.validate(clone(input));\n runtime.rendering?.validateStyle?.(scene.metadata?.stylePack || null);\n const sceneEnvironment = scene.metadata?.environment;\n const runtimeEnvironment = runtime.environment?.id;\n if (sceneEnvironment && runtimeEnvironment && sceneEnvironment !== runtimeEnvironment) {\n throw new Error(`Scene environment mismatch: ${sceneEnvironment} != ${runtimeEnvironment}`);\n }\n\n // 先完成所有不会破坏当前世界的检查。\n for (const manifest of scene.assets) runtime.assetModule.assertCompatibleManifest(manifest);\n for (const item of scene.objects) {\n if (!runtime.assetModule.hasAsset(item.assetId)) throw new Error(`Scene references unknown asset: ${item.assetId}`);\n if(item.simulation){\n const profile=runtime.assetModule.getManifest(item.assetId).simulation;\n if(!profile)throw new Error(`Scene has thermal state without a thermal asset: ${item.id}`);\n validateThermalStateForProfile(profile,item.simulation);\n }\n }\n if(scene.metadata?.environmentState)runtime.environment?.validateSnapshot?.(scene.metadata.environmentState);\n\n // 预检已通过,从这里开始才会破坏当前世界。失败时恢复加载前的场景,而不是留下半个世界。\n const previous = typeof runtime.snapshot === 'function' ? runtime.snapshot() : null;\n const previousAuthority = captureWorldAuthority(runtime);\n const previousPhysics = runtime.physics?.captureState?.();\n const attachments = runtime.projectCapabilities?.captureAttachments?.() || [];\n if (!previous) {\n const applied = await this.applyScene(runtime, scene);\n runtime.projectCapabilities?.rebindAttachments?.(attachments);\n return applied;\n }\n try {\n const applied = await this.applyScene(runtime, scene);\n runtime.projectCapabilities?.rebindAttachments?.(attachments);\n return applied;\n } catch (error) {\n try {\n await this.applyScene(runtime, previous);\n if (previousPhysics) {\n runtime.physics.restoreState(previousPhysics);\n runtime.sceneGraph?.invalidate?.();\n }\n restoreWorldAuthority(runtime, previousAuthority);\n runtime.projectCapabilities?.rebindAttachments?.(attachments);\n } catch (rollbackError) {\n const failure = new AggregateError([error, rollbackError], 'Scene restore rollback failed', { cause:error });\n failure.code = 'SCENE_RESTORE_ROLLBACK_FAILED';\n failure.rollbackError = rollbackError;\n throw failure;\n }\n throw error;\n }\n }\n\n // 破坏性应用。调用方必须保证 scene 已经 validate 并通过全部预检。\n async applyScene(runtime, scene) {\n runtime.affordances?.cancel('SCENE_RESTORE');\n\n if (typeof runtime.physics?.resetWorld === 'function') {\n runtime.locomotion?.cancelAll?.();\n runtime.interactions?.cancelPending?.('SCENE_RESTORE');\n runtime.physics.resetWorld();\n if (runtime.environment?.colliders?.length) {\n runtime.physics.addEnvironment(runtime.environment.colliders,{id:runtime.environment.id});\n }\n const characterOptions = runtime.environment?.physics?.characterController\n || runtime.environment?.characterController\n || null;\n if (characterOptions && typeof runtime.physics.setCharacterControllerOptions === 'function') {\n runtime.physics.setCharacterControllerOptions(characterOptions);\n }\n }\n\n await runtime.sceneGraph.batch(async () => {\n await runtime.clearObjects({silent:true});\n for (const item of scene.objects) {\n await runtime.spawn(item.assetId, {\n id:item.id,\n position:item.transform.position,\n quaternion:item.transform.quaternion,\n scale:item.transform.scale,\n active: item.active !== false\n });\n const record = runtime.store.get(item.id);\n if(item.simulation)runtime.thermal.restore(item.id,item.simulation);\n record.state = clone(item.state || {});\n runtime.restoreObjectState(item.id, record.state);\n if (item.articulation?.length) {\n if (record.active === false) record.dormantArticulation = clone(item.articulation);\n else runtime.physics.restoreArticulationPose(item.id, item.articulation);\n }\n }\n runtime.interactions?.rebuildHeldOwnership?.();\n runtime.sceneGraph.changed();\n });\n\n if(scene.metadata?.environmentState) runtime.environment?.restore?.(scene.metadata.environmentState);\n runtime.navigation?.invalidate?.('scene-restored');\n if (scene.camera) runtime.rendering?.applyCameraState?.(scene.camera);\n await runtime.rendering?.restoreStyle?.(scene.metadata?.stylePack || null);\n runtime.currentWorldRevision=scene.metadata?.worldRevision ? clone(scene.metadata.worldRevision) : null;\n runtime.restoredAcceptanceEvidence=scene.verification?.acceptanceEvidence ? clone(scene.verification.acceptanceEvidence) : null;\n runtime.lastAcceptanceBundle=null;\n runtime.currentBehaviorBundle=scene.configuration?.behaviorBundle ? clone(scene.configuration.behaviorBundle) : null;\n runtime.currentPhysicsRequirements=scene.configuration?.physicsRequirements ? clone(scene.configuration.physicsRequirements) : null;\n runtime.interactionEvidence?.clear?.();\n runtime.loadRuleGraph?.(runtime.currentBehaviorBundle?.ruleGraph || []);\n runtime.events.emit('scene.restored', { objects: scene.objects.length, worldRevisionId:runtime.currentWorldRevision?.revision?.id || null, hasAcceptanceEvidence:Boolean(runtime.restoredAcceptanceEvidence) });\n return scene;\n }\n}\n"],"mappings":";;;AAAA,MAAM,SAAO;AAEb,MAAM,qCAAmB,IAAI,IAAI,CAAC,WAAW,CAAC;AAC9C,MAAM,SAAM,MAAG,OAAO,MAAI,WAAS,EAAE,KAAK,IAAE;AAC5C,MAAM,UAAO,MAAG,MAAI,QAAM,OAAO,MAAI,YAAU,OAAO,MAAI,YAAU,OAAO,MAAI;AAE/E,SAAgB,iBAAiB,QAAM,CAAC,GAAE;CACxC,IAAG,CAAC,MAAM,QAAQ,KAAK,GAAG,MAAM,IAAI,UAAU,wBAAwB;CACtE,MAAM,sBAAI,IAAI,IAAI;CAClB,MAAM,WAAS,MAAM,KAAK,MAAK,UAAQ;EACrC,IAAG,CAAC,QAAM,OAAO,SAAO,YAAU,MAAM,QAAQ,IAAI,GAAG,MAAM,IAAI,UAAU,QAAQ,MAAM,oBAAoB;EAC7G,MAAM,KAAG,MAAM,KAAK,EAAE,GAAE,QAAM,MAAM,KAAK,KAAK,GAAE,SAAO,KAAK;EAC5D,IAAG,CAAC,MAAI,IAAI,IAAI,EAAE,GAAG,MAAM,IAAI,UAAU,QAAQ,MAAM,qBAAqB;EAAG,IAAI,IAAI,EAAE;EACzF,IAAG,CAAC,OAAO,MAAM,IAAI,UAAU,QAAQ,MAAM,iBAAiB;EAC9D,IAAG,CAAC,UAAQ,OAAO,WAAS,YAAU,mBAAmB,IAAI,OAAO,IAAI,MAAI,OAAO,MAAM,IAAI,UAAU,QAAQ,MAAM,qBAAqB;EAC1I,MAAM,WAAS,MAAM,O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