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.
- package/README.md +23 -48
- package/dist/core.d.ts +68 -0
- package/dist/core.js +209 -0
- package/dist/core.js.map +1 -0
- package/dist/index.d.ts +10 -229
- package/dist/index.js +192 -15462
- package/dist/index.js.map +1 -1
- package/package.json +11 -40
- package/cli.mjs +0 -27
- package/dist/AssetCompiler-CDFiElji.js +0 -2451
- package/dist/AssetCompiler-CDFiElji.js.map +0 -1
- package/dist/AssetInputContracts-Dy8iU4eT.js +0 -228
- package/dist/AssetInputContracts-Dy8iU4eT.js.map +0 -1
- package/dist/AssetRecipe-DmFpzxr-.js +0 -55
- package/dist/AssetRecipe-DmFpzxr-.js.map +0 -1
- package/dist/BrowserCodeWorker.js +0 -53615
- package/dist/KinematicHypothesisScreen-D-z6qgMB.js +0 -242
- package/dist/KinematicHypothesisScreen-D-z6qgMB.js.map +0 -1
- package/dist/SceneSerializer-DPVOyeRk.js +0 -353
- package/dist/SceneSerializer-DPVOyeRk.js.map +0 -1
- package/dist/StylePack-DNrdLeGI.js +0 -6314
- package/dist/StylePack-DNrdLeGI.js.map +0 -1
- package/dist/WorldArchive-pSBIGxLa.js +0 -420
- package/dist/WorldArchive-pSBIGxLa.js.map +0 -1
- package/dist/WorldIO-wsDfZGM4.js +0 -150
- package/dist/WorldIO-wsDfZGM4.js.map +0 -1
- package/dist/blankWorld-CBWbwJGj.js +0 -76
- package/dist/blankWorld-CBWbwJGj.js.map +0 -1
- package/dist/disposeObject3D-BQ9TyVC_.js +0 -54
- package/dist/disposeObject3D-BQ9TyVC_.js.map +0 -1
- package/dist/environments-DgH66NqV.js +0 -4220
- package/dist/environments-DgH66NqV.js.map +0 -1
- package/dist/gltfIO-B87nJaat.js +0 -10
- package/dist/gltfIO-B87nJaat.js.map +0 -1
- package/dist/grandUrbanBlock-Ob9pN-CB.js +0 -516
- package/dist/grandUrbanBlock-Ob9pN-CB.js.map +0 -1
- package/dist/magicCabin-D64fD1E2.js +0 -11024
- package/dist/magicCabin-D64fD1E2.js.map +0 -1
- package/dist/mcp.d.ts +0 -2
- package/dist/mcp.js +0 -1
- package/dist/monumentHall-BKbs0UOQ.js +0 -404
- package/dist/monumentHall-BKbs0UOQ.js.map +0 -1
- package/dist/node.d.ts +0 -16
- package/dist/node.js +0 -25
- package/dist/ruinedCourtyard-BoZxHldu.js +0 -697
- package/dist/ruinedCourtyard-BoZxHldu.js.map +0 -1
- package/dist/runtime/application/AgentTools.js +0 -25
- package/dist/runtime/application/README.md +0 -14
- package/dist/runtime/application/buildTaskObservation.js +0 -117
- package/dist/runtime/application/code-execution/AuthoringSandboxEntry.js +0 -46
- package/dist/runtime/application/code-execution/BrowserCodeExecutor.js +0 -35
- package/dist/runtime/application/code-execution/BrowserCodeWorker.js +0 -17
- package/dist/runtime/application/code-execution/RemoteAuthoringDocument.js +0 -72
- package/dist/runtime/application/createSession.js +0 -66
- package/dist/runtime/application/createWorldAuthoringContext.js +0 -400
- package/dist/runtime/application/generation/GenerationOrchestrator.js +0 -629
- package/dist/runtime/application/generation/GenerationRuntime.js +0 -214
- package/dist/runtime/application/generation/PromptHybridWorldOrchestrator.js +0 -285
- package/dist/runtime/application/native-scene/CodeProject.js +0 -119
- package/dist/runtime/application/native-scene/CodeProjectModules.js +0 -128
- package/dist/runtime/application/native-scene/NativeEnvironmentGeometry.js +0 -62
- package/dist/runtime/application/native-scene/NativeOverlayCheckpoint.js +0 -127
- package/dist/runtime/application/native-scene/NativeRenderDiscovery.js +0 -51
- package/dist/runtime/application/native-scene/NativeSceneHost.js +0 -164
- package/dist/runtime/application/native-scene/NativeSceneOverlay.js +0 -116
- package/dist/runtime/application/native-scene/NativeThreeModule.js +0 -16
- package/dist/runtime/application/object-forge/SceneObjectForge.js +0 -232
- package/dist/runtime/application/programmatic-assets/ProgrammaticAssetBuilder.js +0 -54
- package/dist/runtime/application/programmatic-assets/ProgrammaticAssetContract.js +0 -22
- package/dist/runtime/application/programmatic-assets/ThreeCodeAsset.js +0 -40
- package/dist/runtime/application/scene/CapabilityResolver.js +0 -79
- package/dist/runtime/application/scene/RequestWindow.js +0 -54
- package/dist/runtime/application/scene/SceneAgentTools.js +0 -21
- package/dist/runtime/application/scene/SceneContracts.js +0 -45
- package/dist/runtime/application/scene/SceneEditService.js +0 -144
- package/dist/runtime/application/scene/SceneFacade.js +0 -267
- package/dist/runtime/application/scene/SceneInteractionAdapters.js +0 -40
- package/dist/runtime/application/scene/SceneJobController.js +0 -229
- package/dist/runtime/application/scene/ScenePackage.js +0 -162
- package/dist/runtime/application/scene/ScenePersistence.js +0 -50
- package/dist/runtime/application/scene/SceneProject.js +0 -95
- package/dist/runtime/application/scene/SceneSkillNames.js +0 -5
- package/dist/runtime/application/scene/StarterScene.js +0 -56
- package/dist/runtime/application/scene/WorldArchive.js +0 -87
- package/dist/runtime/application/scene/WorldDirectory.js +0 -20
- package/dist/runtime/application/scene/WorldDocument.js +0 -74
- package/dist/runtime/application/scene/WorldIO.js +0 -103
- package/dist/runtime/application/scene/WorldStorage.js +0 -137
- package/dist/runtime/application/skills/SkillRegistry.js +0 -163
- package/dist/runtime/application/skills/packs/acceptanceSkills.js +0 -32
- package/dist/runtime/application/skills/packs/affordanceSkills.js +0 -36
- package/dist/runtime/application/skills/packs/assetSkills.js +0 -46
- package/dist/runtime/application/skills/packs/authoringSkills.js +0 -16
- package/dist/runtime/application/skills/packs/batchSkills.js +0 -22
- package/dist/runtime/application/skills/packs/codeSkills.js +0 -106
- package/dist/runtime/application/skills/packs/generationSkills.js +0 -45
- package/dist/runtime/application/skills/packs/interactionSkills.js +0 -46
- package/dist/runtime/application/skills/packs/recoverySkills.js +0 -80
- package/dist/runtime/application/skills/packs/sceneSkills.js +0 -24
- package/dist/runtime/application/skills/packs/spatialSkills.js +0 -35
- package/dist/runtime/application/skills/packs/verificationSkills.js +0 -14
- package/dist/runtime/application/skills/packs/worldSkills.js +0 -45
- package/dist/runtime/application/skills/registerCoreSkills.js +0 -31
- package/dist/runtime/application/skills/skillPrimitives.js +0 -4
- package/dist/runtime/application/tasks/CabinetCupTask.js +0 -76
- package/dist/runtime/application/tasks.jsonl +0 -67
- package/dist/runtime/application/world-authoring/AuthoringAssetProducer.js +0 -42
- package/dist/runtime/application/world-authoring/AuthoringDiff.js +0 -149
- package/dist/runtime/application/world-authoring/AuthoringDocument.js +0 -825
- package/dist/runtime/application/world-authoring/AuthoringExecutionHost.js +0 -109
- package/dist/runtime/application/world-authoring/AuthoringIdentity.js +0 -17
- package/dist/runtime/application/world-authoring/AuthoringModelResolver.js +0 -29
- package/dist/runtime/application/world-authoring/AuthoringPatch.js +0 -118
- package/dist/runtime/application/world-authoring/AuthoringPromotionController.js +0 -334
- package/dist/runtime/application/world-authoring/AuthoringPromotionSource.js +0 -126
- package/dist/runtime/application/world-authoring/AuthoringRevisionHistory.js +0 -144
- package/dist/runtime/application/world-authoring/HeadlessImageExport.js +0 -174
- package/dist/runtime/application/world-authoring/ModelRef.js +0 -62
- package/dist/runtime/apps/mcp-server/AUTHORING.md +0 -71
- package/dist/runtime/apps/mcp-server/AuthoringSandboxEntry.js +0 -1
- package/dist/runtime/apps/mcp-server/AuthoringSandboxWorker.mjs +0 -30
- package/dist/runtime/apps/mcp-server/BuildEnvironment.js +0 -17
- package/dist/runtime/apps/mcp-server/CodeExecutor.js +0 -71
- package/dist/runtime/apps/mcp-server/DEPLOYMENT-PC2.md +0 -42
- package/dist/runtime/apps/mcp-server/DockerBuildRunner.js +0 -66
- package/dist/runtime/apps/mcp-server/FileAssetRepository.js +0 -159
- package/dist/runtime/apps/mcp-server/HeadlessAssetIO.js +0 -8
- package/dist/runtime/apps/mcp-server/HeadlessGLTFLoader.js +0 -47
- package/dist/runtime/apps/mcp-server/HeadlessWorldHost.js +0 -132
- package/dist/runtime/apps/mcp-server/IsolatedAuthoringExecutor.js +0 -6
- package/dist/runtime/apps/mcp-server/PROGRAMMATIC-ASSETS.md +0 -116
- package/dist/runtime/apps/mcp-server/ProgrammaticAssets.js +0 -60
- package/dist/runtime/apps/mcp-server/README.md +0 -150
- package/dist/runtime/apps/mcp-server/RemoteAuthoringDocument.js +0 -1
- package/dist/runtime/apps/mcp-server/SandboxBundle.js +0 -13
- package/dist/runtime/apps/mcp-server/SessionManager.js +0 -80
- package/dist/runtime/apps/mcp-server/StudioBridgeHttp.js +0 -58
- package/dist/runtime/apps/mcp-server/StudioLiveBridge.js +0 -190
- package/dist/runtime/apps/mcp-server/TrustedAuthoringWorker.mjs +0 -16
- package/dist/runtime/apps/mcp-server/VALIDATION.md +0 -45
- package/dist/runtime/apps/mcp-server/acceptance-evidence.json +0 -332
- package/dist/runtime/apps/mcp-server/errorDiagnostics.js +0 -32
- package/dist/runtime/apps/mcp-server/examples/code-house.js +0 -24
- package/dist/runtime/apps/mcp-server/examples/procedural-assets.js +0 -37
- package/dist/runtime/apps/mcp-server/main.mjs +0 -56
- package/dist/runtime/apps/mcp-server/registerTools.js +0 -215
- package/dist/runtime/apps/mcp-server/sandbox/run.mjs +0 -23
- package/dist/runtime/apps/mcp-server/security.js +0 -21
- package/dist/runtime/apps/mcp-server/tasks.jsonl +0 -9
- package/dist/runtime/apps/server/CapabilityAdapterRegistry.js +0 -157
- package/dist/runtime/apps/server/README.md +0 -7
- package/dist/runtime/apps/server/WorldDiskStorage.js +0 -51
- package/dist/runtime/apps/server/openai-compatible-agent-gateway.mjs +0 -278
- package/dist/runtime/apps/server/tasks.jsonl +0 -10
- package/dist/runtime/foundation/EventBus.js +0 -18
- package/dist/runtime/foundation/JsonGateway.js +0 -47
- package/dist/runtime/foundation/PolicyEngine.js +0 -21
- package/dist/runtime/foundation/README.md +0 -7
- package/dist/runtime/foundation/TraceRecorder.js +0 -76
- package/dist/runtime/foundation/errors.js +0 -8
- package/dist/runtime/foundation/simulation/SimulationProfile.js +0 -143
- package/dist/runtime/foundation/version.js +0 -2
- package/dist/runtime/modules/agent/README.md +0 -11
- package/dist/runtime/modules/agent/ToolCallingAgent.js +0 -19
- package/dist/runtime/modules/agent/bootstrapWorld.js +0 -10
- package/dist/runtime/modules/agent/buildRecoveryProposals.js +0 -533
- package/dist/runtime/modules/agent/execution/AgentExecutionRules.js +0 -127
- package/dist/runtime/modules/agent/execution/AgentRunResults.js +0 -55
- package/dist/runtime/modules/agent/execution/AgentRunSession.js +0 -390
- package/dist/runtime/modules/agent/execution/AgentToolInvoker.js +0 -39
- package/dist/runtime/modules/agent/gateway/HttpLLMGateway.js +0 -19
- package/dist/runtime/modules/agent/prompt/index.js +0 -46
- package/dist/runtime/modules/agent/tasks.jsonl +0 -94
- package/dist/runtime/modules/artifact/ArtifactContentGate.js +0 -144
- package/dist/runtime/modules/artifact/ArtifactDescriptor.js +0 -280
- package/dist/runtime/modules/artifact/ArtifactImporter.js +0 -185
- package/dist/runtime/modules/artifact/ArtifactModule.js +0 -111
- package/dist/runtime/modules/artifact/ArtifactRegistry.js +0 -197
- package/dist/runtime/modules/artifact/IncrementalSha256.js +0 -129
- package/dist/runtime/modules/artifact/MemoryArtifactByteStore.js +0 -115
- package/dist/runtime/modules/artifact/README.md +0 -7
- package/dist/runtime/modules/artifact/storage/IndexedDbArtifactStore.js +0 -67
- package/dist/runtime/modules/artifact/tasks.jsonl +0 -31
- package/dist/runtime/modules/asset/AssetModule.js +0 -399
- package/dist/runtime/modules/asset/README.md +0 -54
- package/dist/runtime/modules/asset/loading/AssetLoader.js +0 -157
- package/dist/runtime/modules/asset/loading/GltfAssetLoader.js +0 -61
- package/dist/runtime/modules/asset/loading/builtins/BuiltinAssets.js +0 -95
- package/dist/runtime/modules/asset/loading/builtins/HouseDoor.js +0 -33
- package/dist/runtime/modules/asset/loading/builtins/IndustrialCabinet.js +0 -103
- package/dist/runtime/modules/asset/model/AssetInputContracts.js +0 -95
- package/dist/runtime/modules/asset/model/AssetRef.js +0 -12
- package/dist/runtime/modules/asset/model/MechanicalAssetDraft.js +0 -172
- package/dist/runtime/modules/asset/model/admission.js +0 -117
- package/dist/runtime/modules/asset/model/errors.js +0 -6
- package/dist/runtime/modules/asset/model/parts.js +0 -27
- package/dist/runtime/modules/asset/model/resourceBudget.js +0 -10
- package/dist/runtime/modules/asset/model/schema.js +0 -150
- package/dist/runtime/modules/asset/persistence/AssetManifestStore.js +0 -78
- package/dist/runtime/modules/asset/persistence/CompiledAssetStore.js +0 -84
- package/dist/runtime/modules/asset/persistence/LocalAssetLibrary.js +0 -86
- package/dist/runtime/modules/asset/persistence/LocalAssetLibraryStore.js +0 -81
- package/dist/runtime/modules/asset/production/AssetProductionPipeline.js +0 -272
- package/dist/runtime/modules/asset/production/AssetRecipe.js +0 -32
- package/dist/runtime/modules/asset/production/adapters/EmbodiedGenAdapter.js +0 -45
- package/dist/runtime/modules/asset/production/adapters/EmbodiedGenBundleAdapter.js +0 -590
- package/dist/runtime/modules/asset/production/compiler/AssetCompiler.js +0 -173
- package/dist/runtime/modules/asset/production/compiler/evidence/AnimationMotionEvidence.js +0 -124
- package/dist/runtime/modules/asset/production/compiler/evidence/StaticPanelEvidence.js +0 -56
- package/dist/runtime/modules/asset/production/compiler/gltfIO.js +0 -6
- package/dist/runtime/modules/asset/production/compiler/partGeometry.js +0 -74
- package/dist/runtime/modules/asset/production/compiler/passes/ArticulatedCollisionPass.js +0 -63
- package/dist/runtime/modules/asset/production/compiler/passes/ArticulationCandidatePass.js +0 -48
- package/dist/runtime/modules/asset/production/compiler/passes/AuthoringIntentPass.js +0 -16
- package/dist/runtime/modules/asset/production/compiler/passes/ColliderFallbackPass.js +0 -30
- package/dist/runtime/modules/asset/production/compiler/passes/CompileQualityPass.js +0 -75
- package/dist/runtime/modules/asset/production/compiler/passes/ExplicitDefinitionPass.js +0 -20
- package/dist/runtime/modules/asset/production/compiler/passes/GLTFInspectPass.js +0 -34
- package/dist/runtime/modules/asset/production/compiler/passes/GeometryPass.js +0 -32
- package/dist/runtime/modules/asset/production/compiler/passes/JointFramePass.js +0 -116
- package/dist/runtime/modules/asset/production/compiler/passes/KinematicEvidencePass.js +0 -84
- package/dist/runtime/modules/asset/production/compiler/passes/ManifestPass.js +0 -63
- package/dist/runtime/modules/asset/production/compiler/passes/NormalizeTransformPass.js +0 -16
- package/dist/runtime/modules/asset/production/compiler/passes/OptimizeGLBPass.js +0 -23
- package/dist/runtime/modules/asset/production/compiler/passes/PartColliderPass.js +0 -50
- package/dist/runtime/modules/asset/production/compiler/passes/PartGeometryEnrichmentPass.js +0 -60
- package/dist/runtime/modules/asset/production/compiler/passes/PartProposalPass.js +0 -93
- package/dist/runtime/modules/asset/production/compiler/passes/RemoteEnrichmentPass.js +0 -32
- package/dist/runtime/modules/asset/production/compiler/passes/ResourceBudgetPass.js +0 -55
- package/dist/runtime/modules/asset/production/compiler/passes/SegmentMaterializePass.js +0 -203
- package/dist/runtime/modules/asset/production/compiler/passes/SegmentationEvidencePass.js +0 -43
- package/dist/runtime/modules/asset/production/compiler/passes/SemanticHeuristicPass.js +0 -33
- package/dist/runtime/modules/asset/production/compiler/passes/StructurePass.js +0 -60
- package/dist/runtime/modules/asset/production/compiler/providers/HttpCompilerProvider.js +0 -23
- package/dist/runtime/modules/asset/production/verification/KinematicHypothesisScreen.js +0 -198
- package/dist/runtime/modules/asset/registry/AssetCatalog.js +0 -72
- package/dist/runtime/modules/asset/registry/AssetRegistry.js +0 -51
- package/dist/runtime/modules/asset/registry/manifests/index.js +0 -173
- package/dist/runtime/modules/asset/tasks.jsonl +0 -87
- package/dist/runtime/modules/generation/README.md +0 -9
- package/dist/runtime/modules/generation/connector/ConnectorArtifactClient.js +0 -45
- package/dist/runtime/modules/generation/connector/ConnectorCapabilityAdapter.js +0 -169
- package/dist/runtime/modules/generation/connector/ConnectorClient.js +0 -192
- package/dist/runtime/modules/generation/connector/ConnectorJobClient.js +0 -167
- package/dist/runtime/modules/generation/connector/ConnectorJobEventClient.js +0 -179
- package/dist/runtime/modules/generation/connector/ConnectorSession.js +0 -202
- package/dist/runtime/modules/generation/jobs/GenerationJobProjection.js +0 -239
- package/dist/runtime/modules/generation/jobs/GenerationJobReconciler.js +0 -99
- package/dist/runtime/modules/generation/jobs/GenerationJobStore.js +0 -91
- package/dist/runtime/modules/generation/jobs/GenerationJobTransportOverlay.js +0 -50
- package/dist/runtime/modules/generation/providers/ProviderRegistry.js +0 -304
- package/dist/runtime/modules/generation/tasks.jsonl +0 -35
- package/dist/runtime/modules/navigation/NavigationBackend.js +0 -17
- package/dist/runtime/modules/navigation/RecastNavigationBackend.js +0 -245
- package/dist/runtime/modules/physics/JoltPhysicsBackend.js +0 -850
- package/dist/runtime/modules/physics/PhysicsApiSurface.js +0 -651
- package/dist/runtime/modules/physics/PhysicsBackend.js +0 -88
- package/dist/runtime/modules/physics/RapierPhysicsBackend.js +0 -410
- package/dist/runtime/modules/rendering/README.md +0 -7
- package/dist/runtime/modules/rendering/RendererProbe.js +0 -153
- package/dist/runtime/modules/rendering/WebGpuPostFxPipeline.js +0 -140
- package/dist/runtime/modules/rendering/createRenderer.js +0 -76
- package/dist/runtime/modules/rendering/disposeObject3D.js +0 -34
- package/dist/runtime/modules/rendering/loadGaussianSplatVisual.js +0 -74
- package/dist/runtime/modules/rendering/style/StylePack.js +0 -34
- package/dist/runtime/modules/rendering/style/StyleSystem.js +0 -173
- package/dist/runtime/modules/rendering/tasks.jsonl +0 -7
- package/dist/runtime/modules/world/README.md +0 -13
- package/dist/runtime/modules/world/build/WorldBuilder.js +0 -170
- package/dist/runtime/modules/world/compiler/PipelineEngine.js +0 -32
- package/dist/runtime/modules/world/compiler/WorldAdmission.js +0 -43
- package/dist/runtime/modules/world/compiler/WorldBehaviorCompiler.js +0 -68
- package/dist/runtime/modules/world/compiler/WorldCompilation.js +0 -157
- package/dist/runtime/modules/world/compiler/WorldComposer.js +0 -201
- package/dist/runtime/modules/world/compiler/WorldPhysicsAdmission.js +0 -76
- package/dist/runtime/modules/world/compiler/WorldRecompiler.js +0 -356
- package/dist/runtime/modules/world/compiler/WorldRetry.js +0 -75
- package/dist/runtime/modules/world/compiler/createWorldPipeline.js +0 -379
- package/dist/runtime/modules/world/content/blankWorld.js +0 -35
- package/dist/runtime/modules/world/content/environments.js +0 -84
- package/dist/runtime/modules/world/content/grandUrbanBlock.js +0 -189
- package/dist/runtime/modules/world/content/magic-cabin/README.md +0 -28
- package/dist/runtime/modules/world/content/magic-cabin/affordances.js +0 -64
- package/dist/runtime/modules/world/content/magic-cabin/cabinContents.js +0 -7078
- package/dist/runtime/modules/world/content/magic-cabin/lighting.js +0 -26
- package/dist/runtime/modules/world/content/magic-cabin/materials.js +0 -20
- package/dist/runtime/modules/world/content/magicCabin.js +0 -190
- package/dist/runtime/modules/world/content/monumentHall.js +0 -154
- package/dist/runtime/modules/world/content/ruinedCourtyard.js +0 -196
- package/dist/runtime/modules/world/content/suzhouGarden/README.md +0 -141
- package/dist/runtime/modules/world/content/suzhouGarden/index.js +0 -137
- package/dist/runtime/modules/world/content/suzhouGarden/src/arch.js +0 -491
- package/dist/runtime/modules/world/content/suzhouGarden/src/buildings.js +0 -670
- package/dist/runtime/modules/world/content/suzhouGarden/src/core.js +0 -578
- package/dist/runtime/modules/world/content/suzhouGarden/src/lod.js +0 -127
- package/dist/runtime/modules/world/content/suzhouGarden/src/main.js +0 -642
- package/dist/runtime/modules/world/content/suzhouGarden/src/nature.js +0 -650
- package/dist/runtime/modules/world/content/suzhouGarden/src/rockery.js +0 -280
- package/dist/runtime/modules/world/content/suzhouGarden/src/sky.js +0 -242
- package/dist/runtime/modules/world/content/suzhouGarden/src/water.js +0 -215
- package/dist/runtime/modules/world/content/woodlandWorkshop.js +0 -192
- package/dist/runtime/modules/world/content/yuanmingyuan/README.md +0 -36
- package/dist/runtime/modules/world/content/yuanmingyuan/arch.js +0 -351
- package/dist/runtime/modules/world/content/yuanmingyuan/buildings.js +0 -490
- package/dist/runtime/modules/world/content/yuanmingyuan/core.js +0 -505
- package/dist/runtime/modules/world/content/yuanmingyuan/index.js +0 -101
- package/dist/runtime/modules/world/content/yuanmingyuan/nature.js +0 -435
- package/dist/runtime/modules/world/content/yuanmingyuan/sky.js +0 -169
- package/dist/runtime/modules/world/content/yuanmingyuan/water.js +0 -245
- package/dist/runtime/modules/world/errors.js +0 -9
- package/dist/runtime/modules/world/generated/GeneratedWorldCoordinates.js +0 -50
- package/dist/runtime/modules/world/generated/GeneratedWorldLoader.js +0 -297
- package/dist/runtime/modules/world/runtime/CommandHistory.js +0 -80
- package/dist/runtime/modules/world/runtime/ObjectStore.js +0 -31
- package/dist/runtime/modules/world/runtime/ObjectTransform.js +0 -62
- package/dist/runtime/modules/world/runtime/ObservedEntity.js +0 -37
- package/dist/runtime/modules/world/runtime/ProjectCapabilities.js +0 -207
- package/dist/runtime/modules/world/runtime/SceneSerializer.js +0 -246
- package/dist/runtime/modules/world/runtime/WorldAuthority.js +0 -41
- package/dist/runtime/modules/world/runtime/WorldCollisionSignature.js +0 -14
- package/dist/runtime/modules/world/runtime/WorldCommands.js +0 -502
- package/dist/runtime/modules/world/runtime/WorldObservation.js +0 -71
- package/dist/runtime/modules/world/runtime/WorldQueries.js +0 -340
- package/dist/runtime/modules/world/runtime/WorldRecovery.js +0 -78
- package/dist/runtime/modules/world/runtime/WorldRuntime.js +0 -649
- package/dist/runtime/modules/world/runtime/affordance/ObjectAffordances.js +0 -107
- package/dist/runtime/modules/world/runtime/affordance/WorldAffordances.js +0 -130
- package/dist/runtime/modules/world/runtime/behavior/BehaviorCompiler.js +0 -79
- package/dist/runtime/modules/world/runtime/behavior/ProjectStateMachine.js +0 -195
- package/dist/runtime/modules/world/runtime/behavior/RuleGraph.js +0 -70
- package/dist/runtime/modules/world/runtime/behavior/RuleRuntime.js +0 -115
- package/dist/runtime/modules/world/runtime/graph/SceneGraph.js +0 -216
- package/dist/runtime/modules/world/runtime/interaction/ArticulationRuntime.js +0 -214
- package/dist/runtime/modules/world/runtime/interaction/CarryCapability.js +0 -65
- package/dist/runtime/modules/world/runtime/interaction/CarryRuntime.js +0 -222
- package/dist/runtime/modules/world/runtime/interaction/InteractionApproach.js +0 -130
- package/dist/runtime/modules/world/runtime/interaction/InteractionContract.js +0 -57
- package/dist/runtime/modules/world/runtime/interaction/RecoveryRuntime.js +0 -123
- package/dist/runtime/modules/world/runtime/interaction/SettleRuntime.js +0 -120
- package/dist/runtime/modules/world/runtime/semantic/SemanticWorldView.js +0 -102
- package/dist/runtime/modules/world/runtime/simulation/SimulationClock.js +0 -89
- package/dist/runtime/modules/world/runtime/simulation/SimulationSession.js +0 -99
- package/dist/runtime/modules/world/runtime/simulation/ThermalSystem.js +0 -269
- package/dist/runtime/modules/world/runtime/spatial/SpatialSnapshot.js +0 -56
- package/dist/runtime/modules/world/runtime/spatial/ThreeBvhRuntime.js +0 -36
- package/dist/runtime/modules/world/runtime/systems/InteractionSystem.js +0 -728
- package/dist/runtime/modules/world/runtime/systems/LocomotionSystem.js +0 -269
- package/dist/runtime/modules/world/runtime/systems/NavigationSystem.js +0 -469
- package/dist/runtime/modules/world/runtime/systems/PhysicsSystem.js +0 -1657
- package/dist/runtime/modules/world/runtime/systems/RenderingSystem.js +0 -457
- package/dist/runtime/modules/world/runtime/systems/SpatialSystem.js +0 -284
- package/dist/runtime/modules/world/spec/WorldIR.js +0 -165
- package/dist/runtime/modules/world/spec/WorldIRToolSchema.js +0 -86
- package/dist/runtime/modules/world/spec/WorldPlannerProposal.js +0 -51
- package/dist/runtime/modules/world/spec/WorldRevision.js +0 -231
- package/dist/runtime/modules/world/spec/WorldSpec.js +0 -86
- package/dist/runtime/modules/world/tasks.jsonl +0 -530
- package/dist/runtime/modules/world/verification/ArticulationVerifier.js +0 -254
- package/dist/runtime/modules/world/verification/Finding.js +0 -105
- package/dist/runtime/modules/world/verification/InteractionEvidence.js +0 -69
- package/dist/runtime/modules/world/verification/RepairEngine.js +0 -49
- package/dist/runtime/modules/world/verification/WorldAcceptance.js +0 -158
- package/dist/runtime/modules/world/verification/WorldValidator.js +0 -65
- package/dist/runtime/package-lock.json +0 -6245
- package/dist/runtime/package.json +0 -91
- package/dist/runtime/public/assets/cabinet.glb +0 -0
- package/dist/runtime/public/assets/grand-urban-block/clean_asphalt_diff_1k.jpg +0 -0
- package/dist/runtime/public/assets/grand-urban-block/clean_asphalt_nor_gl_1k.jpg +0 -0
- package/dist/runtime/public/assets/grand-urban-block/concrete_pavement_diff_1k.jpg +0 -0
- package/dist/runtime/public/assets/grand-urban-block/urban_street_01_1k.hdr +0 -0
- package/dist/runtime/public/assets/monument-hall/marble_diff_1k.jpg +0 -0
- package/dist/runtime/public/assets/monument-hall/marble_nor_gl_1k.jpg +0 -0
- package/dist/runtime/public/assets/monument-hall/marble_rough_1k.jpg +0 -0
- package/dist/runtime/public/assets/monument-hall/solitude_interior_1k.hdr +0 -0
- package/dist/runtime/public/assets/ruined-courtyard/courtyard_1k.hdr +0 -0
- package/dist/runtime/public/assets/ruined-courtyard/mossy_cobblestone_diff_1k.jpg +0 -0
- package/dist/runtime/public/assets/ruined-courtyard/mossy_cobblestone_nor_gl_1k.jpg +0 -0
- package/dist/runtime/public/assets/ruined-courtyard/mossy_sandstone_diff_1k.jpg +0 -0
- package/dist/schema-Dudvovhu.js +0 -364
- package/dist/schema-Dudvovhu.js.map +0 -1
- package/dist/suzhouGarden-BCx_JeV5.js +0 -6159
- package/dist/suzhouGarden-BCx_JeV5.js.map +0 -1
- package/dist/woodlandWorkshop-BGNWPNdK.js +0 -484
- package/dist/woodlandWorkshop-BGNWPNdK.js.map +0 -1
- package/dist/yuanmingyuan-DAIb1msO.js +0 -4962
- package/dist/yuanmingyuan-DAIb1msO.js.map +0 -1
|
@@ -1,94 +0,0 @@
|
|
|
1
|
-
{"id": "AGENT-026", "type": "test", "title": "冗余 JSON quoted actorId 自动 unwrap", "status": "DONE", "priority": "P1", "path": "agent", "depends": [], "files": ["modules/agent/ToolCallingAgent.js"], "criteria": ["\"agent_01\"→agent_01"]}
|
|
2
|
-
{"id": "AGENT-027", "type": "test", "title": "非字符串/非法 JSON quoted 值不误改", "status": "DONE", "priority": "P1", "path": "agent", "depends": [], "files": ["modules/agent/ToolCallingAgent.js"], "criteria": ["原值保持"]}
|
|
3
|
-
{"id": "AGENT-028", "type": "test", "title": "legacy agentId 映射到 actorId", "status": "DONE", "priority": "P1", "path": "agent", "depends": [], "files": ["modules/agent/ToolCallingAgent.js"], "criteria": ["agentId 删除"]}
|
|
4
|
-
{"id": "AGENT-029", "type": "test", "title": "approachAndPlace legacy targetId 映射 supportId", "status": "DONE", "priority": "P1", "path": "agent", "depends": [], "files": ["modules/agent/ToolCallingAgent.js"], "criteria": ["targetId 删除"]}
|
|
5
|
-
{"id": "AGENT-030", "type": "test", "title": "mutationIdentity object key order deterministic", "status": "DONE", "priority": "P1", "path": "agent", "depends": [], "files": ["modules/agent/ToolCallingAgent.js"], "criteria": ["同语义不同 key order identity 相同"]}
|
|
6
|
-
{"id": "AGENT-031", "type": "test", "title": "mutationIdentity 纳入 resolved partName", "status": "DONE", "priority": "P1", "path": "agent", "depends": [], "files": ["modules/agent/ToolCallingAgent.js"], "criteria": ["不同 part 不碰撞"]}
|
|
7
|
-
{"id": "AGENT-032", "type": "test", "title": "worldPlanIdentity 忽略 revision/provenance 只看语义", "status": "DONE", "priority": "P1", "path": "agent", "depends": [], "files": ["modules/agent/ToolCallingAgent.js"], "criteria": ["换 revision 重提交仍识别重复"]}
|
|
8
|
-
{"id": "AGENT-033", "type": "test", "title": "Agent 无 configured gateway fail-fast", "status": "DONE", "priority": "P1", "path": "agent", "depends": [], "files": ["modules/agent/ToolCallingAgent.js"], "criteria": ["AGENT_CAPABILITY_UNAVAILABLE"]}
|
|
9
|
-
{"id": "AGENT-034", "type": "test", "title": "每 planning round 开始都调用 listObjects", "status": "DONE", "priority": "P1", "path": "agent", "depends": [], "files": ["modules/agent/ToolCallingAgent.js"], "criteria": ["world change 后不是旧 cache"]}
|
|
10
|
-
{"id": "AGENT-035", "type": "test", "title": "mutation 后 context 只发 compact world index", "status": "DONE", "priority": "P1", "path": "agent", "depends": [], "files": ["modules/agent/ToolCallingAgent.js"], "criteria": ["不重复大 world payload"]}
|
|
11
|
-
{"id": "AGENT-036", "type": "test", "title": "无 mutation 时 context 可给完整当前 world", "status": "DONE", "priority": "P1", "path": "agent", "depends": [], "files": ["modules/agent/ToolCallingAgent.js"], "criteria": ["首轮可观察实体"]}
|
|
12
|
-
{"id": "AGENT-037", "type": "test", "title": "maxSteps 正确限制 planning round 数", "status": "DONE", "priority": "P1", "path": "agent", "depends": [], "files": ["modules/agent/ToolCallingAgent.js"], "criteria": ["超限 bounded termination"]}
|
|
13
|
-
{"id": "AGENT-038", "type": "test", "title": "gateway response 的 toolCalls 全部 normalize 后再执行", "status": "DONE", "priority": "P1", "path": "agent", "depends": ["AGENT-026"], "files": ["modules/agent/ToolCallingAgent.js"], "criteria": ["handler 收到 canonical args"]}
|
|
14
|
-
{"id": "AGENT-039", "type": "test", "title": "tool invocation throw 被编码为 TOOL_ERROR 并进入 outcome", "status": "DONE", "priority": "P1", "path": "agent", "depends": [], "files": ["modules/agent/ToolCallingAgent.js"], "criteria": ["loop 可继续/replan"]}
|
|
15
|
-
{"id": "AGENT-040", "type": "test", "title": "tool result undefined 规范化为 {ok:true}", "status": "DONE", "priority": "P1", "path": "agent", "depends": [], "files": ["modules/agent/ToolCallingAgent.js"], "criteria": ["JSON 序列化稳定"]}
|
|
16
|
-
{"id": "AGENT-041", "type": "test", "title": "同一 LLM response 中第一个 mutation 后后续 mutation 不执行", "status": "DONE", "priority": "P0", "path": "agent", "depends": [], "files": ["modules/agent/ToolCallingAgent.js"], "criteria": ["reason=REPLAN_REQUIRED_AFTER_WORLD_CHANGE"]}
|
|
17
|
-
{"id": "AGENT-042", "type": "test", "title": "mutation 后后续 read-only call 也按 barrier 策略跳过", "status": "DONE", "priority": "P0", "path": "agent", "depends": ["AGENT-041"], "files": ["modules/agent/ToolCallingAgent.js"], "criteria": ["fresh planning round required"]}
|
|
18
|
-
{"id": "AGENT-043", "type": "test", "title": "verified mutation 从 unresolved map 删除", "status": "DONE", "priority": "P0", "path": "agent", "depends": [], "files": ["modules/agent/ToolCallingAgent.js"], "criteria": ["unresolved count=0"]}
|
|
19
|
-
{"id": "AGENT-044", "type": "test", "title": "blocked/failed/unverified mutation 进入 unresolved map", "status": "DONE", "priority": "P0", "path": "agent", "depends": [], "files": ["modules/agent/ToolCallingAgent.js"], "criteria": ["identity+outcome 保留"]}
|
|
20
|
-
{"id": "AGENT-045", "type": "test", "title": "invocationFailed 不制造错误 unresolved identity", "status": "DONE", "priority": "P0", "path": "agent", "depends": [], "files": ["modules/agent/ToolCallingAgent.js"], "criteria": ["tool transport failure 与 world mutation failure 分离"]}
|
|
21
|
-
{"id": "AGENT-046", "type": "test", "title": "LLM 直接给最终文本但有 unresolved mutation → taskStatus=incomplete", "status": "DONE", "priority": "P0", "path": "agent", "depends": ["AGENT-044"], "files": ["modules/agent/ToolCallingAgent.js"], "criteria": ["不信模型“完成了”"]}
|
|
22
|
-
{"id": "AGENT-047", "type": "test", "title": "最后 mutation verified 且无 unresolved → completed", "status": "DONE", "priority": "P0", "path": "agent", "depends": ["AGENT-043"], "files": ["modules/agent/ToolCallingAgent.js"], "criteria": ["taskStatus=completed"]}
|
|
23
|
-
{"id": "AGENT-048", "type": "test", "title": "acceptance required 但缺失/未接受 → incomplete", "status": "READY", "priority": "P0", "path": "agent", "depends": ["VERIFICATION-014"], "files": ["modules/agent/ToolCallingAgent.js"], "criteria": ["final message 改为 acceptance incomplete"]}
|
|
24
|
-
{"id": "AGENT-049", "type": "test", "title": "no-mutation 任务 final 返回 taskStatus=no-mutation", "status": "DONE", "priority": "P0", "path": "agent", "depends": [], "files": ["modules/agent/ToolCallingAgent.js"], "criteria": ["read-only 问答不误称 world mutation complete"]}
|
|
25
|
-
{"id": "AGENT-050", "type": "test", "title": "planning limit + unresolved 返回 structured incomplete", "status": "DONE", "priority": "P1", "path": "agent", "depends": [], "files": ["modules/agent/ToolCallingAgent.js"], "criteria": ["termination=planning-limit"]}
|
|
26
|
-
{"id": "AGENT-051", "type": "test", "title": "planning limit + 无 unresolved 保持 explicit exceeded error", "status": "DONE", "priority": "P1", "path": "agent", "depends": [], "files": ["modules/agent/ToolCallingAgent.js"], "criteria": ["不混淆 incomplete mutation"]}
|
|
27
|
-
{"id": "AGENT-052", "type": "test", "title": "有 proposeWorldIR skill 时禁止直接 runWorldPipeline", "status": "DONE", "priority": "P0", "path": "agent", "depends": [], "files": ["modules/agent/ToolCallingAgent.js"], "criteria": ["WORLD_PIPELINE_PROPOSAL_REQUIRED"]}
|
|
28
|
-
{"id": "AGENT-053", "type": "test", "title": "proposeWorldIR 成功后保存 Runtime-issued revision ID", "status": "READY", "priority": "P0", "path": "agent", "depends": ["REVISION-001"], "files": ["modules/agent/ToolCallingAgent.js"], "criteria": ["issued set 可 gate 后续"]}
|
|
29
|
-
{"id": "AGENT-054", "type": "test", "title": "proposal 后强制新 planning round", "status": "READY", "priority": "P0", "path": "agent", "depends": ["AGENT-053"], "files": ["modules/agent/ToolCallingAgent.js"], "criteria": ["同 response 的 pipeline call 被跳过"]}
|
|
30
|
-
{"id": "AGENT-055", "type": "test", "title": "runWorldPipeline 只能使用 issued revision", "status": "READY", "priority": "P0", "path": "agent", "depends": ["AGENT-053"], "files": ["modules/agent/ToolCallingAgent.js"], "criteria": ["fabricated revision 被拒绝"]}
|
|
31
|
-
{"id": "AGENT-056", "type": "test", "title": "完全相同 semantic world plan 换 revision 重提仍被拒绝", "status": "DONE", "priority": "P0", "path": "agent", "depends": ["AGENT-032"], "files": ["modules/agent/ToolCallingAgent.js"], "criteria": ["WORLD_PIPELINE_PLAN_ALREADY_ATTEMPTED"]}
|
|
32
|
-
{"id": "AGENT-057", "type": "test", "title": "world rejection 建立 pending proposal lineage", "status": "READY", "priority": "P1", "path": "agent", "depends": ["WORLD-COMPILER-022"], "files": ["modules/agent/ToolCallingAgent.js"], "criteria": ["parentRevisionId/evidenceRefs 保存"]}
|
|
33
|
-
{"id": "AGENT-058", "type": "test", "title": "rejected pipeline 若有 revisionContext 建 pending bounded repair", "status": "READY", "priority": "P1", "path": "agent", "depends": ["WORLD-RECOMPILER-001"], "files": ["modules/agent/ToolCallingAgent.js"], "criteria": ["baseWorldIR/revisionContext 成对保存"]}
|
|
34
|
-
{"id": "AGENT-059", "type": "test", "title": "无 pending revision repair 时 proposeWorldRevision 被 gate", "status": "DONE", "priority": "P0", "path": "agent", "depends": [], "files": ["modules/agent/ToolCallingAgent.js"], "criteria": ["WORLD_REVISION_CONTEXT_REQUIRED"]}
|
|
35
|
-
{"id": "AGENT-060", "type": "test", "title": "bounded revision proposal 后保存 exact signature", "status": "DONE", "priority": "P0", "path": "agent", "depends": [], "files": ["modules/agent/ToolCallingAgent.js"], "criteria": ["nextRevisionId→signature map"]}
|
|
36
|
-
{"id": "AGENT-061", "type": "test", "title": "recompileWorldRevision 未先 propose 被拒绝", "status": "DONE", "priority": "P0", "path": "agent", "depends": [], "files": ["modules/agent/ToolCallingAgent.js"], "criteria": ["WORLD_REVISION_PROPOSAL_REQUIRED"]}
|
|
37
|
-
{"id": "AGENT-062", "type": "test", "title": "recompileWorldRevision proposal 被篡改时拒绝", "status": "DONE", "priority": "P0", "path": "agent", "depends": ["AGENT-060"], "files": ["modules/agent/ToolCallingAgent.js"], "criteria": ["WORLD_REVISION_PROPOSAL_TAMPERED"]}
|
|
38
|
-
{"id": "AGENT-063", "type": "test", "title": "verified recompile 清掉对应 base revision unresolved mutation", "status": "READY", "priority": "P1", "path": "agent", "depends": ["WORLD-RECOMPILER-007"], "files": ["modules/agent/ToolCallingAgent.js"], "criteria": ["old unresolved 删除"]}
|
|
39
|
-
{"id": "AGENT-064", "type": "test", "title": "verified world build 后冗余 read-only confirmation 被跳过", "status": "READY", "priority": "P1", "path": "agent", "depends": ["WORLD-COMPILER-024"], "files": ["modules/agent/ToolCallingAgent.js"], "criteria": ["WORLD_READY_REDUNDANT_READ"]}
|
|
40
|
-
{"id": "AGENT-065", "type": "test", "title": "verified world 后真正下一步 mutation 仍允许进入新 round", "status": "READY", "priority": "P1", "path": "agent", "depends": ["AGENT-064"], "files": ["modules/agent/ToolCallingAgent.js"], "criteria": ["不把 Agent 永久锁死"]}
|
|
41
|
-
{"id": "AGENT-066", "type": "test", "title": "recoveryOriginIdentity 只匹配同 actor/target/part 的 failed interact", "status": "DONE", "priority": "P1", "path": "agent", "depends": [], "files": ["modules/agent/ToolCallingAgent.js"], "criteria": ["不跨任务绑定"]}
|
|
42
|
-
{"id": "AGENT-067", "type": "test", "title": "recovery identity 补齐 origin partName", "status": "DONE", "priority": "P1", "path": "agent", "depends": [], "files": ["modules/agent/ToolCallingAgent.js"], "criteria": ["recovery ledger 粒度正确"]}
|
|
43
|
-
{"id": "AGENT-068", "type": "test", "title": "同一 recovery 对同一 origin verified 后不可重复执行", "status": "DONE", "priority": "P1", "path": "agent", "depends": [], "files": ["modules/agent/ToolCallingAgent.js"], "criteria": ["RECOVERY_ALREADY_APPLIED"]}
|
|
44
|
-
{"id": "AGENT-069", "type": "test", "title": "原 mutation 重试后开启新 recovery evidence epoch", "status": "DONE", "priority": "P1", "path": "agent", "depends": [], "files": ["modules/agent/ToolCallingAgent.js"], "criteria": ["applied recoveries 清除"]}
|
|
45
|
-
{"id": "AGENT-070", "type": "test", "title": "mutation 执行后 recoveryReadRounds 重置", "status": "DONE", "priority": "P1", "path": "agent", "depends": [], "files": ["modules/agent/ToolCallingAgent.js"], "criteria": ["read budget 新 epoch"]}
|
|
46
|
-
{"id": "AGENT-071", "type": "test", "title": "纯 read-only recovery round 每轮 +1", "status": "DONE", "priority": "P1", "path": "agent", "depends": [], "files": ["modules/agent/ToolCallingAgent.js"], "criteria": ["budget accounting 准确"]}
|
|
47
|
-
{"id": "AGENT-072", "type": "test", "title": "达 maxRecoveryReadRounds 后 read-only calls 全跳过", "status": "DONE", "priority": "P1", "path": "agent", "depends": [], "files": ["modules/agent/ToolCallingAgent.js"], "criteria": ["termination=recovery-observation-limit"]}
|
|
48
|
-
{"id": "AGENT-073", "type": "test", "title": "recovery observation limit 返回 unresolved snapshot", "status": "DONE", "priority": "P1", "path": "agent", "depends": [], "files": ["modules/agent/ToolCallingAgent.js"], "criteria": ["caller 可诊断"]}
|
|
49
|
-
{"id": "AGENT-074", "type": "test", "title": "auxiliary recovery 本身不替原 mutation 清 unresolved", "status": "DONE", "priority": "P1", "path": "agent", "depends": [], "files": ["modules/agent/ToolCallingAgent.js"], "criteria": ["必须 retry original"]}
|
|
50
|
-
{"id": "AGENT-075", "type": "test", "title": "auxiliary recovery failed 不加入 applied ledger", "status": "DONE", "priority": "P1", "path": "agent", "depends": [], "files": ["modules/agent/ToolCallingAgent.js"], "criteria": ["可另选 recovery"]}
|
|
51
|
-
{"id": "RECOVERY-001", "type": "test", "title": "非 STALL failure 返回 recovery-unavailable", "status": "DONE", "priority": "P1", "path": "agent.recovery", "depends": [], "files": ["modules/agent/buildRecoveryProposals.js"], "criteria": ["reason=NO_STALL_FAILURE"]}
|
|
52
|
-
{"id": "RECOVERY-002", "type": "test", "title": "无 contact blocker candidate 返回 unavailable", "status": "DONE", "priority": "P1", "path": "agent.recovery", "depends": ["INTERACTION-077"], "files": ["modules/agent/buildRecoveryProposals.js"], "criteria": ["reason=NO_CONTACT_BLOCKER_CANDIDATE"]}
|
|
53
|
-
{"id": "RECOVERY-003", "type": "test", "title": "environment blocker 永远 ineligible", "status": "DONE", "priority": "P1", "path": "agent.recovery", "depends": [], "files": ["modules/agent/buildRecoveryProposals.js"], "criteria": ["ENVIRONMENT_IMMOVABLE"]}
|
|
54
|
-
{"id": "RECOVERY-004", "type": "test", "title": "不存在 blocker object ineligible", "status": "DONE", "priority": "P1", "path": "agent.recovery", "depends": [], "files": ["modules/agent/buildRecoveryProposals.js"], "criteria": ["BLOCKER_OBJECT_UNAVAILABLE"]}
|
|
55
|
-
{"id": "RECOVERY-005", "type": "test", "title": "stale contact 必须 current sweep overlap 才继续", "status": "DONE", "priority": "P1", "path": "agent.recovery", "depends": [], "files": ["modules/agent/buildRecoveryProposals.js"], "criteria": ["无 persistence→CONTACT_EVIDENCE_STALE"]}
|
|
56
|
-
{"id": "RECOVERY-006", "type": "test", "title": "articulated blocker 缺 joint/targets ineligible", "status": "DONE", "priority": "P1", "path": "agent.recovery", "depends": [], "files": ["modules/agent/buildRecoveryProposals.js"], "criteria": ["ARTICULATED_PART_UNAVAILABLE"]}
|
|
57
|
-
{"id": "RECOVERY-007", "type": "test", "title": "blocker articulation state 未 verified 不执行恢复", "status": "DONE", "priority": "P1", "path": "agent.recovery", "depends": [], "files": ["modules/agent/buildRecoveryProposals.js"], "criteria": ["ARTICULATED_STATE_UNVERIFIED"]}
|
|
58
|
-
{"id": "RECOVERY-008", "type": "test", "title": "blocker articulation 正在 moving 不执行第二动作", "status": "DONE", "priority": "P1", "path": "agent.recovery", "depends": [], "files": ["modules/agent/buildRecoveryProposals.js"], "criteria": ["ARTICULATED_ACTION_PENDING"]}
|
|
59
|
-
{"id": "RECOVERY-009", "type": "test", "title": "无 alternate open/close action ineligible", "status": "DONE", "priority": "P1", "path": "agent.recovery", "depends": [], "files": ["modules/agent/buildRecoveryProposals.js"], "criteria": ["NO_ALTERNATE_ARTICULATED_ACTION"]}
|
|
60
|
-
{"id": "RECOVERY-010", "type": "test", "title": "Policy denied articulated recovery 保留 missing permissions", "status": "DONE", "priority": "P1", "path": "agent.recovery", "depends": ["AGENT-010"], "files": ["modules/agent/buildRecoveryProposals.js"], "criteria": ["status=denied"]}
|
|
61
|
-
{"id": "RECOVERY-011", "type": "test", "title": "单 alternate action 必须 findInteractionPose 成功", "status": "DONE", "priority": "P1", "path": "agent.recovery", "depends": ["INTERACTION-029"], "files": ["modules/agent/buildRecoveryProposals.js"], "criteria": ["no pose→ineligible"]}
|
|
62
|
-
{"id": "RECOVERY-012", "type": "test", "title": "world counterfactual 第三对象阻挡则 alternate action ineligible", "status": "DONE", "priority": "P1", "path": "agent.recovery", "depends": ["PHYSICS-162"], "files": ["modules/agent/buildRecoveryProposals.js"], "criteria": ["THIRD_OBJECT_COUNTERFACTUAL_BLOCKED"]}
|
|
63
|
-
{"id": "RECOVERY-013", "type": "test", "title": "多 alternate action 优先 physics counterfactual ranking", "status": "DONE", "priority": "P1", "path": "agent.recovery", "depends": ["PHYSICS-165"], "files": ["modules/agent/buildRecoveryProposals.js"], "criteria": ["排名 tuple 稳定"]}
|
|
64
|
-
{"id": "RECOVERY-014", "type": "test", "title": "physics baseline inconsistent 时回退 visual AABB ranking", "status": "DONE", "priority": "P1", "path": "agent.recovery", "depends": [], "files": ["modules/agent/buildRecoveryProposals.js"], "criteria": ["fallbackReason 明确"]}
|
|
65
|
-
{"id": "RECOVERY-015", "type": "test", "title": "counterfactual convergence unstable 时不信 physics ranking", "status": "DONE", "priority": "P1", "path": "agent.recovery", "depends": ["PHYSICS-168"], "files": ["modules/agent/buildRecoveryProposals.js"], "criteria": ["回退且 reason 稳定"]}
|
|
66
|
-
{"id": "RECOVERY-016", "type": "test", "title": "两 action ranking 完全相同返回 COUNTERFACTUAL_ACTION_TIE", "status": "DONE", "priority": "P1", "path": "agent.recovery", "depends": [], "files": ["modules/agent/buildRecoveryProposals.js"], "criteria": ["不任意选"]}
|
|
67
|
-
{"id": "RECOVERY-017", "type": "test", "title": "pickup blocker 必须 assertCarryable + pickupPlan.transfer.clear", "status": "DONE", "priority": "P1", "path": "agent.recovery", "depends": ["INTERACTION-051"], "files": ["modules/agent/buildRecoveryProposals.js"], "criteria": ["任一 fail→ineligible"]}
|
|
68
|
-
{"id": "RECOVERY-018", "type": "test", "title": "eligible proposals 先按 routeCost 再 stable blocker key", "status": "DONE", "priority": "P1", "path": "agent.recovery", "depends": [], "files": ["modules/agent/buildRecoveryProposals.js"], "criteria": ["deterministic order"]}
|
|
69
|
-
{"id": "RECOVERY-019", "type": "test", "title": "hands-full recovery-held blocker 时建议 cleanup", "status": "DONE", "priority": "P1", "path": "agent.recovery", "depends": ["INTERACTION-072"], "files": ["modules/agent/buildRecoveryProposals.js"], "criteria": ["cleanupRecommended provisional"]}
|
|
70
|
-
{"id": "RECOVERY-020", "type": "test", "title": "recovery proposal verification 永远要求 retry original post-condition", "status": "DONE", "priority": "P1", "path": "agent.recovery", "depends": [], "files": ["modules/agent/buildRecoveryProposals.js"], "criteria": ["不以 cleanup 本身等价原任务完成"]}
|
|
71
|
-
{"id": "GATEWAY-001", "type": "test", "title": "HttpLLMGateway 默认 timeout=30s", "status": "DONE", "priority": "P1", "path": "agent.gateway", "depends": [], "files": ["modules/agent/gateway/HttpLLMGateway.js"], "criteria": ["constructor contract fixed"]}
|
|
72
|
-
{"id": "GATEWAY-002", "type": "test", "title": "normalize response 缺 call id 生成稳定 fallback", "status": "DONE", "priority": "P1", "path": "agent.gateway", "depends": [], "files": ["modules/agent/gateway/HttpLLMGateway.js"], "criteria": ["call_0 等"]}
|
|
73
|
-
{"id": "GATEWAY-003", "type": "test", "title": "arguments/args 两种 gateway 字段归一", "status": "DONE", "priority": "P1", "path": "agent.gateway", "depends": [], "files": ["modules/agent/gateway/HttpLLMGateway.js"], "criteria": ["args object canonical"]}
|
|
74
|
-
{"id": "GATEWAY-004", "type": "test", "title": "toolCalls 为空且有 message → final=true", "status": "DONE", "priority": "P1", "path": "agent.gateway", "depends": [], "files": ["modules/agent/gateway/HttpLLMGateway.js"], "criteria": ["response semantic stable"]}
|
|
75
|
-
{"id": "GATEWAY-005", "type": "test", "title": "env loader 不覆盖已存在 process env", "status": "DONE", "priority": "P1", "path": "agent.gateway", "depends": [], "files": ["apps/server/openai-compatible-agent-gateway.mjs"], "criteria": ["explicit env wins"]}
|
|
76
|
-
{"id": "GATEWAY-006", "type": "test", "title": "env loader 忽略 comment/empty/invalid line", "status": "DONE", "priority": "P1", "path": "agent.gateway", "depends": [], "files": ["apps/server/openai-compatible-agent-gateway.mjs"], "criteria": ["parser stable"]}
|
|
77
|
-
{"id": "GATEWAY-007", "type": "test", "title": "model list trim+dedupe", "status": "DONE", "priority": "P1", "path": "agent.gateway", "depends": [], "files": ["apps/server/openai-compatible-agent-gateway.mjs"], "criteria": ["no duplicate fallback call"]}
|
|
78
|
-
{"id": "GATEWAY-008", "type": "test", "title": "空 model chain 拒绝", "status": "DONE", "priority": "P1", "path": "agent.gateway", "depends": [], "files": ["apps/server/openai-compatible-agent-gateway.mjs"], "criteria": ["clear error"]}
|
|
79
|
-
{"id": "GATEWAY-009", "type": "test", "title": "tools 转 OpenAI function schema 不丢 parameters", "status": "DONE", "priority": "P1", "path": "agent.gateway", "depends": [], "files": ["apps/server/openai-compatible-agent-gateway.mjs"], "criteria": ["strict schema preserved"]}
|
|
80
|
-
{"id": "GATEWAY-010", "type": "test", "title": "assistant toolCalls 转 OpenAI arguments JSON", "status": "DONE", "priority": "P1", "path": "agent.gateway", "depends": [], "files": ["apps/server/openai-compatible-agent-gateway.mjs"], "criteria": ["round-trip"]}
|
|
81
|
-
{"id": "GATEWAY-011", "type": "test", "title": "OpenAI invalid JSON tool arguments 拒绝", "status": "DONE", "priority": "P1", "path": "agent.gateway", "depends": [], "files": ["apps/server/openai-compatible-agent-gateway.mjs"], "criteria": ["不执行 malformed call"]}
|
|
82
|
-
{"id": "GATEWAY-012", "type": "test", "title": "context 插入 system message 在主 system 后", "status": "DONE", "priority": "P1", "path": "agent.gateway", "depends": [], "files": ["apps/server/openai-compatible-agent-gateway.mjs"], "criteria": ["prompt order fixed"]}
|
|
83
|
-
{"id": "GATEWAY-013", "type": "test", "title": "upstream temperature=0 + stream=false", "status": "DONE", "priority": "P1", "path": "agent.gateway", "depends": [], "files": ["apps/server/openai-compatible-agent-gateway.mjs"], "criteria": ["deterministic config fixed"]}
|
|
84
|
-
{"id": "GATEWAY-014", "type": "test", "title": "408/425/429/5xx 才切下一个 model", "status": "DONE", "priority": "P1", "path": "agent.gateway", "depends": [], "files": ["apps/server/openai-compatible-agent-gateway.mjs"], "criteria": ["retryable set fixed"]}
|
|
85
|
-
{"id": "GATEWAY-015", "type": "test", "title": "4xx 非 retryable 不切 model", "status": "DONE", "priority": "P1", "path": "agent.gateway", "depends": [], "files": ["apps/server/openai-compatible-agent-gateway.mjs"], "criteria": ["不放大错误调用"]}
|
|
86
|
-
{"id": "GATEWAY-016", "type": "test", "title": "fetch transport error 可切 fallback model", "status": "DONE", "priority": "P1", "path": "agent.gateway", "depends": [], "files": ["apps/server/openai-compatible-agent-gateway.mjs"], "criteria": ["chain continues bounded"]}
|
|
87
|
-
{"id": "GATEWAY-017", "type": "test", "title": "localhost/127.0.0.1/::1 origin 允许", "status": "DONE", "priority": "P1", "path": "agent.gateway", "depends": [], "files": ["apps/server/openai-compatible-agent-gateway.mjs"], "criteria": ["local Studio works"]}
|
|
88
|
-
{"id": "GATEWAY-018", "type": "test", "title": "任意公网 origin 默认拒绝", "status": "DONE", "priority": "P1", "path": "agent.gateway", "depends": [], "files": ["apps/server/openai-compatible-agent-gateway.mjs"], "criteria": ["403"]}
|
|
89
|
-
{"id": "GATEWAY-019", "type": "test", "title": "explicit allowedOrigins 精确匹配", "status": "DONE", "priority": "P1", "path": "agent.gateway", "depends": [], "files": ["apps/server/openai-compatible-agent-gateway.mjs"], "criteria": ["只允许配置 origin"]}
|
|
90
|
-
{"id": "GATEWAY-020", "type": "test", "title": "request >2MiB 在 JSON parse 前拒绝", "status": "DONE", "priority": "P1", "path": "agent.gateway", "depends": [], "files": ["apps/server/openai-compatible-agent-gateway.mjs"], "criteria": ["bounded memory"]}
|
|
91
|
-
{"id": "GATEWAY-021", "type": "test", "title": "/health 不返回 API key/base auth", "status": "DONE", "priority": "P1", "path": "agent.gateway", "depends": [], "files": ["apps/server/openai-compatible-agent-gateway.mjs"], "criteria": ["只 models/ok"]}
|
|
92
|
-
{"id": "GATEWAY-022", "type": "test", "title": "OPTIONS CORS 正确返回 204", "status": "DONE", "priority": "P1", "path": "agent.gateway", "depends": [], "files": ["apps/server/openai-compatible-agent-gateway.mjs"], "criteria": ["local browser preflight pass"]}
|
|
93
|
-
{"id": "GATEWAY-023", "type": "test", "title": "非 /agent POST 返回 404", "status": "DONE", "priority": "P1", "path": "agent.gateway", "depends": [], "files": ["apps/server/openai-compatible-agent-gateway.mjs"], "criteria": ["route surface 最小"]}
|
|
94
|
-
{"id": "GATEWAY-024", "type": "test", "title": "gateway bind 默认 127.0.0.1 而非 0.0.0.0", "status": "DONE", "priority": "P1", "path": "agent.gateway", "depends": [], "files": ["apps/server/openai-compatible-agent-gateway.mjs"], "criteria": ["local-only 默认安全"]}
|
|
@@ -1,144 +0,0 @@
|
|
|
1
|
-
import { ArtifactContractError } from './ArtifactDescriptor.js';
|
|
2
|
-
|
|
3
|
-
const ARCHIVE_MIMES=new Set(['application/zip','application/x-zip-compressed','application/x-tar','application/gzip']);
|
|
4
|
-
const FULL_BYTE_MIMES=new Set(['application/json','application/xml','text/xml','text/plain','model/obj']);
|
|
5
|
-
const decoder=()=>new TextDecoder('utf-8',{fatal:true});
|
|
6
|
-
|
|
7
|
-
const formatAllowed=(actual,declared)=>{
|
|
8
|
-
const value=String(declared||'').toLowerCase();
|
|
9
|
-
const allowed={
|
|
10
|
-
glb:new Set(['glb']),json:new Set(['json']),png:new Set(['png']),jpeg:new Set(['jpg','jpeg']),
|
|
11
|
-
webp:new Set(['webp']),ply:new Set(['ply']),spz:new Set(['spz']),xml:new Set(['xml','urdf']),text:new Set(['txt','text','obj']),obj:new Set(['obj'])
|
|
12
|
-
};
|
|
13
|
-
return allowed[actual]?.has(value) ?? false;
|
|
14
|
-
};
|
|
15
|
-
|
|
16
|
-
const fail=(code,message,details={})=>{ throw new ArtifactContractError(code,message,details); };
|
|
17
|
-
|
|
18
|
-
export function artifactContentNeedsFullBytes(mime) {
|
|
19
|
-
return FULL_BYTE_MIMES.has(String(mime||'').toLowerCase());
|
|
20
|
-
}
|
|
21
|
-
|
|
22
|
-
function requirePrefix(prefix,count,label) {
|
|
23
|
-
if (!(prefix instanceof Uint8Array) || prefix.byteLength<count) fail('ARTIFACT_STRUCTURE_INVALID',`${label} artifact is too short`);
|
|
24
|
-
}
|
|
25
|
-
|
|
26
|
-
function validateGlb(prefix,totalBytes) {
|
|
27
|
-
requirePrefix(prefix,20,'GLB');
|
|
28
|
-
if (prefix[0]!==0x67||prefix[1]!==0x6c||prefix[2]!==0x54||prefix[3]!==0x46) fail('ARTIFACT_MIME_MISMATCH','GLB magic does not match model/gltf-binary');
|
|
29
|
-
const view=new DataView(prefix.buffer,prefix.byteOffset,prefix.byteLength);
|
|
30
|
-
const version=view.getUint32(4,true);
|
|
31
|
-
const declaredLength=view.getUint32(8,true);
|
|
32
|
-
const firstChunkLength=view.getUint32(12,true);
|
|
33
|
-
const firstChunkType=view.getUint32(16,true);
|
|
34
|
-
if (version!==2) fail('ARTIFACT_STRUCTURE_INVALID','Only GLB version 2 is supported',{version});
|
|
35
|
-
if (declaredLength!==totalBytes) fail('ARTIFACT_STRUCTURE_INVALID','GLB header length does not match streamed artifact bytes',{declaredLength,totalBytes});
|
|
36
|
-
if (firstChunkType!==0x4e4f534a) fail('ARTIFACT_STRUCTURE_INVALID','GLB first chunk must be JSON');
|
|
37
|
-
if (firstChunkLength<4 || firstChunkLength%4!==0 || 20+firstChunkLength>totalBytes) {
|
|
38
|
-
fail('ARTIFACT_STRUCTURE_INVALID','GLB first JSON chunk length is invalid',{firstChunkLength,totalBytes});
|
|
39
|
-
}
|
|
40
|
-
const inspectEnd=Math.min(prefix.byteLength,20+firstChunkLength);
|
|
41
|
-
let firstJsonByte=null;
|
|
42
|
-
for (let i=20;i<inspectEnd;i++) {
|
|
43
|
-
if (![0x20,0x09,0x0a,0x0d].includes(prefix[i])) { firstJsonByte=prefix[i]; break; }
|
|
44
|
-
}
|
|
45
|
-
if (firstJsonByte!=null && firstJsonByte!==0x7b) {
|
|
46
|
-
fail('ARTIFACT_STRUCTURE_INVALID','GLB JSON chunk must begin with a JSON object');
|
|
47
|
-
}
|
|
48
|
-
return {mime:'model/gltf-binary',format:'glb'};
|
|
49
|
-
}
|
|
50
|
-
|
|
51
|
-
function validatePng(prefix) {
|
|
52
|
-
requirePrefix(prefix,8,'PNG');
|
|
53
|
-
const magic=[0x89,0x50,0x4e,0x47,0x0d,0x0a,0x1a,0x0a];
|
|
54
|
-
if (!magic.every((byte,index)=>prefix[index]===byte)) fail('ARTIFACT_MIME_MISMATCH','PNG signature mismatch');
|
|
55
|
-
return {mime:'image/png',format:'png'};
|
|
56
|
-
}
|
|
57
|
-
|
|
58
|
-
function validateJpeg(prefix) {
|
|
59
|
-
requirePrefix(prefix,3,'JPEG');
|
|
60
|
-
if (prefix[0]!==0xff||prefix[1]!==0xd8||prefix[2]!==0xff) fail('ARTIFACT_MIME_MISMATCH','JPEG signature mismatch');
|
|
61
|
-
return {mime:'image/jpeg',format:'jpeg'};
|
|
62
|
-
}
|
|
63
|
-
|
|
64
|
-
function validateWebp(prefix) {
|
|
65
|
-
requirePrefix(prefix,12,'WebP');
|
|
66
|
-
const text=String.fromCharCode(...prefix.subarray(0,12));
|
|
67
|
-
if (text.slice(0,4)!=='RIFF'||text.slice(8,12)!=='WEBP') fail('ARTIFACT_MIME_MISMATCH','WebP signature mismatch');
|
|
68
|
-
return {mime:'image/webp',format:'webp'};
|
|
69
|
-
}
|
|
70
|
-
|
|
71
|
-
function validatePly(prefix) {
|
|
72
|
-
requirePrefix(prefix,4,'PLY');
|
|
73
|
-
if (prefix[0]!==0x70||prefix[1]!==0x6c||prefix[2]!==0x79||![0x0a,0x0d].includes(prefix[3])) {
|
|
74
|
-
fail('ARTIFACT_MIME_MISMATCH','PLY signature mismatch');
|
|
75
|
-
}
|
|
76
|
-
return {mime:'model/ply',format:'ply'};
|
|
77
|
-
}
|
|
78
|
-
|
|
79
|
-
function validateSpz(prefix) {
|
|
80
|
-
requirePrefix(prefix,4,'SPZ');
|
|
81
|
-
const ngsp=prefix[0]===0x4e&&prefix[1]===0x47&&prefix[2]===0x53&&prefix[3]===0x50;
|
|
82
|
-
const legacyGzip=prefix[0]===0x1f&&prefix[1]===0x8b;
|
|
83
|
-
if (!ngsp&&!legacyGzip) fail('ARTIFACT_MIME_MISMATCH','SPZ signature mismatch');
|
|
84
|
-
return {mime:'model/spz',format:'spz'};
|
|
85
|
-
}
|
|
86
|
-
|
|
87
|
-
function decodeText(fullBytes,label) {
|
|
88
|
-
if (!(fullBytes instanceof Uint8Array)) fail('ARTIFACT_STRUCTURE_INVALID',`${label} validation requires full bounded bytes`);
|
|
89
|
-
let text;
|
|
90
|
-
try { text=decoder().decode(fullBytes); }
|
|
91
|
-
catch { fail('ARTIFACT_STRUCTURE_INVALID',`${label} artifact is not valid UTF-8`); }
|
|
92
|
-
if (text.includes('\0')) fail('ARTIFACT_STRUCTURE_INVALID',`${label} artifact contains NUL bytes`);
|
|
93
|
-
return text;
|
|
94
|
-
}
|
|
95
|
-
|
|
96
|
-
function validateJson(fullBytes,{maxJsonDepth,maxJsonNodes}) {
|
|
97
|
-
const text=decodeText(fullBytes,'JSON');
|
|
98
|
-
let value;
|
|
99
|
-
try { value=JSON.parse(text); }
|
|
100
|
-
catch { fail('ARTIFACT_STRUCTURE_INVALID','JSON artifact failed bounded parse'); }
|
|
101
|
-
const stack=[{value,depth:1}];
|
|
102
|
-
let nodes=0;
|
|
103
|
-
while (stack.length) {
|
|
104
|
-
const current=stack.pop();
|
|
105
|
-
nodes++;
|
|
106
|
-
if (nodes>maxJsonNodes) fail('ARTIFACT_STRUCTURE_LIMIT','JSON artifact exceeds maxJsonNodes',{maxJsonNodes});
|
|
107
|
-
if (current.depth>maxJsonDepth) fail('ARTIFACT_STRUCTURE_LIMIT','JSON artifact exceeds maxJsonDepth',{maxJsonDepth});
|
|
108
|
-
if (current.value && typeof current.value==='object') {
|
|
109
|
-
const children=Array.isArray(current.value)?current.value:Object.values(current.value);
|
|
110
|
-
for (const child of children) stack.push({value:child,depth:current.depth+1});
|
|
111
|
-
}
|
|
112
|
-
}
|
|
113
|
-
return {mime:'application/json',format:'json'};
|
|
114
|
-
}
|
|
115
|
-
|
|
116
|
-
function validateXml(fullBytes,mime) {
|
|
117
|
-
const text=decodeText(fullBytes,'XML').trimStart();
|
|
118
|
-
if (!text.startsWith('<')) fail('ARTIFACT_STRUCTURE_INVALID','XML artifact does not begin with markup');
|
|
119
|
-
return {mime,format:'xml'};
|
|
120
|
-
}
|
|
121
|
-
|
|
122
|
-
function validateText(fullBytes,mime) {
|
|
123
|
-
decodeText(fullBytes,'Text');
|
|
124
|
-
return {mime,format:mime==='model/obj'?'obj':'text'};
|
|
125
|
-
}
|
|
126
|
-
|
|
127
|
-
export function validateArtifactContent(descriptor,{prefix,totalBytes,fullBytes=null,maxJsonDepth=64,maxJsonNodes=100000}={}) {
|
|
128
|
-
const mime=String(descriptor?.mime||'').toLowerCase();
|
|
129
|
-
if (ARCHIVE_MIMES.has(mime)) fail('ARTIFACT_ARCHIVE_UNSUPPORTED','Archive artifacts are fail-closed until bounded bundle parsing is implemented',{mime});
|
|
130
|
-
let actual;
|
|
131
|
-
if (mime==='model/gltf-binary') actual=validateGlb(prefix,totalBytes);
|
|
132
|
-
else if (mime==='application/json') actual=validateJson(fullBytes,{maxJsonDepth,maxJsonNodes});
|
|
133
|
-
else if (mime==='image/png') actual=validatePng(prefix);
|
|
134
|
-
else if (mime==='image/jpeg') actual=validateJpeg(prefix);
|
|
135
|
-
else if (mime==='image/webp') actual=validateWebp(prefix);
|
|
136
|
-
else if (mime==='model/ply') actual=validatePly(prefix);
|
|
137
|
-
else if (mime==='model/spz') actual=validateSpz(prefix);
|
|
138
|
-
else if (mime==='application/xml'||mime==='text/xml') actual=validateXml(fullBytes,mime);
|
|
139
|
-
else if (mime==='text/plain'||mime==='model/obj') actual=validateText(fullBytes,mime);
|
|
140
|
-
else fail('ARTIFACT_MIME_UNSUPPORTED','Artifact MIME is not supported by the v1 integrity gate',{mime});
|
|
141
|
-
if (actual.mime!==mime) fail('ARTIFACT_MIME_MISMATCH','Detected artifact MIME does not match descriptor MIME',{expected:mime,actual:actual.mime});
|
|
142
|
-
if (!formatAllowed(actual.format,descriptor.format)) fail('ARTIFACT_FORMAT_MISMATCH','Detected artifact format does not match descriptor format',{expected:descriptor.format,actual:actual.format});
|
|
143
|
-
return actual;
|
|
144
|
-
}
|
|
@@ -1,280 +0,0 @@
|
|
|
1
|
-
const HASH_RE=/^sha256:[0-9a-f]{64}$/;
|
|
2
|
-
const SAFE_ID=/^[A-Za-z0-9_-]{1,160}$/;
|
|
3
|
-
const SAFE_SLUG=/^[a-z0-9][a-z0-9._-]{0,95}$/i;
|
|
4
|
-
const SAFE_SCHEMA_ID=/^[A-Za-z0-9][A-Za-z0-9._:-]{0,127}$/;
|
|
5
|
-
const MIME_RE=/^[a-z0-9!#$&^_.+-]+\/[a-z0-9!#$&^_.+-]+$/i;
|
|
6
|
-
const CONTROL_RE=/[\u0000-\u001f\u007f]/;
|
|
7
|
-
const UNSAFE_TEXT_RE=/https?:\/\/|Bearer\s+|(?:^|\s)(?:[A-Za-z]:\\|\/)[^\s]+/i;
|
|
8
|
-
const FORBIDDEN_KEY=/(authorization|api[-_]?key|access[-_]?token|refresh[-_]?token|secret|credential|signed[-_]?url|volume[-_]?path|file[-_]?path|(^|[_-])path($|[_-])|(^|[_-])url($|[_-])|traceback|stack|prompt|image[-_]?bytes|base64|remote[-_]?.*id|function[-_]?call[-_]?id)/i;
|
|
9
|
-
|
|
10
|
-
export const ARTIFACT_INTEGRITY_STATES=Object.freeze(['declared','verified','rejected']);
|
|
11
|
-
export const ARTIFACT_LOCATION_KINDS=Object.freeze(['connector','local-cache','compiled-store','legacy']);
|
|
12
|
-
export const ARTIFACT_LOCATION_SCOPES=Object.freeze(['session','job','project','application']);
|
|
13
|
-
export const ARTIFACT_LOCATION_STATES=Object.freeze(['available','unavailable','expired','evicted']);
|
|
14
|
-
export const ARTIFACT_RETENTION_CLASSES=Object.freeze(['ephemeral','session','project','favorite','persistent']);
|
|
15
|
-
export const ARTIFACT_LINEAGE_RELATIONS=Object.freeze(['derived_from','input','preview_of','compiled_from']);
|
|
16
|
-
export const ARTIFACT_LEASE_HOLDER_KINDS=Object.freeze(['job','project','viewer','transfer','favorite','application']);
|
|
17
|
-
|
|
18
|
-
const LOCATION_KIND_SET=new Set(ARTIFACT_LOCATION_KINDS);
|
|
19
|
-
const LOCATION_SCOPE_SET=new Set(ARTIFACT_LOCATION_SCOPES);
|
|
20
|
-
const LOCATION_STATE_SET=new Set(ARTIFACT_LOCATION_STATES);
|
|
21
|
-
const RETENTION_SET=new Set(ARTIFACT_RETENTION_CLASSES);
|
|
22
|
-
const LINEAGE_RELATION_SET=new Set(ARTIFACT_LINEAGE_RELATIONS);
|
|
23
|
-
|
|
24
|
-
const clone=(value)=>value == null ? value : structuredClone(value);
|
|
25
|
-
|
|
26
|
-
export class ArtifactContractError extends Error {
|
|
27
|
-
constructor(code,message,details={}) {
|
|
28
|
-
super(message);
|
|
29
|
-
this.name='ArtifactContractError';
|
|
30
|
-
this.code=code;
|
|
31
|
-
this.details=clone(details);
|
|
32
|
-
}
|
|
33
|
-
}
|
|
34
|
-
|
|
35
|
-
const requiredText=(value,field,max=200)=>{
|
|
36
|
-
const text=String(value ?? '').trim();
|
|
37
|
-
if (!text) throw new ArtifactContractError('ARTIFACT_DESCRIPTOR_INVALID',`Artifact descriptor requires ${field}`,{field});
|
|
38
|
-
if (text.length>max || CONTROL_RE.test(text)) throw new ArtifactContractError('ARTIFACT_DESCRIPTOR_INVALID',`Artifact descriptor has invalid ${field}`,{field});
|
|
39
|
-
return text;
|
|
40
|
-
};
|
|
41
|
-
const optionalText=(value,field,max=200)=>value==null||value===''?null:requiredText(value,field,max);
|
|
42
|
-
|
|
43
|
-
const safeUiText=(value,field,max=200)=>{
|
|
44
|
-
const text=requiredText(value,field,max);
|
|
45
|
-
if (UNSAFE_TEXT_RE.test(text)) throw new ArtifactContractError('ARTIFACT_FORBIDDEN_VALUE',`Artifact ${field} contains unsafe transport/path text`,{field});
|
|
46
|
-
return text;
|
|
47
|
-
};
|
|
48
|
-
const optionalSafeUiText=(value,field,max=200)=>value==null||value===''?null:safeUiText(value,field,max);
|
|
49
|
-
|
|
50
|
-
export function requireSafeArtifactId(value,field='id') {
|
|
51
|
-
const raw=String(value ?? '');
|
|
52
|
-
const id=raw.trim();
|
|
53
|
-
if (!id || raw!==id || id.length>160 || CONTROL_RE.test(id) || !SAFE_ID.test(id)) {
|
|
54
|
-
throw new ArtifactContractError('ARTIFACT_ID_INVALID','Artifact ID must be an opaque URL-safe identifier',{field});
|
|
55
|
-
}
|
|
56
|
-
return id;
|
|
57
|
-
}
|
|
58
|
-
|
|
59
|
-
export function normalizeArtifactHash(value,field='hash') {
|
|
60
|
-
const hash=requiredText(value,field,80);
|
|
61
|
-
if (!HASH_RE.test(hash)) throw new ArtifactContractError('ARTIFACT_HASH_INVALID','Artifact hash must be canonical sha256:<64 lowercase hex>',{field});
|
|
62
|
-
return hash;
|
|
63
|
-
}
|
|
64
|
-
|
|
65
|
-
function assertNoForbiddenFields(value,path='artifact') {
|
|
66
|
-
if (!value || typeof value!=='object') return;
|
|
67
|
-
if (Array.isArray(value)) {
|
|
68
|
-
value.forEach((item,index)=>assertNoForbiddenFields(item,`${path}[${index}]`));
|
|
69
|
-
return;
|
|
70
|
-
}
|
|
71
|
-
for (const [key,item] of Object.entries(value)) {
|
|
72
|
-
if (FORBIDDEN_KEY.test(key)) {
|
|
73
|
-
throw new ArtifactContractError('ARTIFACT_FORBIDDEN_FIELD','Artifact descriptor contains a forbidden trust-boundary field',{path:`${path}.${key}`});
|
|
74
|
-
}
|
|
75
|
-
assertNoForbiddenFields(item,`${path}.${key}`);
|
|
76
|
-
}
|
|
77
|
-
}
|
|
78
|
-
|
|
79
|
-
function normalizeTime(value,field,{required=false}={}) {
|
|
80
|
-
if (value==null||value==='') {
|
|
81
|
-
if (required) throw new ArtifactContractError('ARTIFACT_DESCRIPTOR_INVALID',`Artifact descriptor requires ${field}`,{field});
|
|
82
|
-
return null;
|
|
83
|
-
}
|
|
84
|
-
const time=Date.parse(String(value));
|
|
85
|
-
if (!Number.isFinite(time)) throw new ArtifactContractError('ARTIFACT_DESCRIPTOR_INVALID',`Artifact descriptor has invalid ${field}`,{field});
|
|
86
|
-
return new Date(time).toISOString();
|
|
87
|
-
}
|
|
88
|
-
|
|
89
|
-
function normalizeVersionedRef(value,field) {
|
|
90
|
-
if (value==null) return null;
|
|
91
|
-
if (!value || typeof value!=='object' || Array.isArray(value)) throw new ArtifactContractError('ARTIFACT_DESCRIPTOR_INVALID',`Artifact ${field} must be a versioned reference`);
|
|
92
|
-
return {
|
|
93
|
-
id:optionalText(value.id,`${field}.id`,120),
|
|
94
|
-
version:optionalText(value.version,`${field}.version`,80),
|
|
95
|
-
revision:optionalText(value.revision,`${field}.revision`,120)
|
|
96
|
-
};
|
|
97
|
-
}
|
|
98
|
-
|
|
99
|
-
function normalizeProducer(value={}) {
|
|
100
|
-
if (!value || typeof value!=='object' || Array.isArray(value)) throw new ArtifactContractError('ARTIFACT_DESCRIPTOR_INVALID','Artifact producer must be an object');
|
|
101
|
-
const provider=requiredText(value.provider,'producer.provider',120);
|
|
102
|
-
const operation=requiredText(value.operation,'producer.operation',180);
|
|
103
|
-
if (!operation.startsWith(`${provider}.`) || !/\.v\d+$/.test(operation)) {
|
|
104
|
-
throw new ArtifactContractError('ARTIFACT_DESCRIPTOR_INVALID','Artifact producer operation must be a stable provider-scoped operation ID',{provider,operation});
|
|
105
|
-
}
|
|
106
|
-
const attempt=Number(value.attempt ?? 1);
|
|
107
|
-
if (!Number.isSafeInteger(attempt)||attempt<1) throw new ArtifactContractError('ARTIFACT_DESCRIPTOR_INVALID','Artifact producer attempt must be a positive integer');
|
|
108
|
-
const stage=optionalText(value.stage,'producer.stage',100);
|
|
109
|
-
if (stage && !SAFE_SLUG.test(stage)) throw new ArtifactContractError('ARTIFACT_DESCRIPTOR_INVALID','Artifact producer stage must be a stable slug');
|
|
110
|
-
return {
|
|
111
|
-
jobId:requireSafeArtifactId(value.jobId,'producer.jobId'),
|
|
112
|
-
provider,
|
|
113
|
-
operation,
|
|
114
|
-
stage,
|
|
115
|
-
attempt,
|
|
116
|
-
revision:optionalText(value.revision,'producer.revision',120),
|
|
117
|
-
model:normalizeVersionedRef(value.model,'producer.model'),
|
|
118
|
-
workflow:normalizeVersionedRef(value.workflow,'producer.workflow')
|
|
119
|
-
};
|
|
120
|
-
}
|
|
121
|
-
|
|
122
|
-
function normalizeLineage(value={},selfId) {
|
|
123
|
-
if (value==null) return {parents:[]};
|
|
124
|
-
if (!value || typeof value!=='object' || Array.isArray(value)) throw new ArtifactContractError('ARTIFACT_DESCRIPTOR_INVALID','Artifact lineage must be an object');
|
|
125
|
-
const parents=Array.isArray(value.parents)?value.parents:[];
|
|
126
|
-
const seen=new Set();
|
|
127
|
-
const normalized=parents.map((parent)=>{
|
|
128
|
-
if (!parent || typeof parent!=='object' || Array.isArray(parent)) throw new ArtifactContractError('ARTIFACT_DESCRIPTOR_INVALID','Artifact lineage parent must be an object');
|
|
129
|
-
const artifactId=requireSafeArtifactId(parent.artifactId,'lineage.parents[].artifactId');
|
|
130
|
-
if (artifactId===selfId) throw new ArtifactContractError('ARTIFACT_LINEAGE_INVALID','Artifact cannot derive from itself',{artifactId});
|
|
131
|
-
const relation=requiredText(parent.relation,'lineage.parents[].relation',64);
|
|
132
|
-
if (!LINEAGE_RELATION_SET.has(relation)) throw new ArtifactContractError('ARTIFACT_LINEAGE_INVALID',`Unsupported artifact lineage relation: ${relation}`);
|
|
133
|
-
const key=`${artifactId}:${relation}`;
|
|
134
|
-
if (seen.has(key)) throw new ArtifactContractError('ARTIFACT_LINEAGE_INVALID','Duplicate artifact lineage edge',{artifactId,relation});
|
|
135
|
-
seen.add(key);
|
|
136
|
-
return {artifactId,hash:normalizeArtifactHash(parent.hash,'lineage.parents[].hash'),relation};
|
|
137
|
-
});
|
|
138
|
-
return {parents:normalized};
|
|
139
|
-
}
|
|
140
|
-
|
|
141
|
-
function normalizeAccess(value,locationKind,artifactId) {
|
|
142
|
-
if (value==null) return null;
|
|
143
|
-
if (!value || typeof value!=='object' || Array.isArray(value)) throw new ArtifactContractError('ARTIFACT_LOCATION_INVALID','Artifact location access must be an object');
|
|
144
|
-
const kind=requiredText(value.kind,'locations[].access.kind',80);
|
|
145
|
-
if (locationKind==='connector') {
|
|
146
|
-
if (kind!=='connector-artifact') throw new ArtifactContractError('ARTIFACT_LOCATION_INVALID','Connector location must use connector-artifact access');
|
|
147
|
-
const accessArtifactId=requireSafeArtifactId(value.artifactId,'locations[].access.artifactId');
|
|
148
|
-
if (accessArtifactId!==artifactId) throw new ArtifactContractError('ARTIFACT_LOCATION_INVALID','Connector access artifactId must match descriptor identity');
|
|
149
|
-
if (!value.connector || typeof value.connector!=='object' || Array.isArray(value.connector)) {
|
|
150
|
-
throw new ArtifactContractError('ARTIFACT_LOCATION_INVALID','Connector artifact access requires connector identity');
|
|
151
|
-
}
|
|
152
|
-
return {
|
|
153
|
-
kind,
|
|
154
|
-
artifactId:accessArtifactId,
|
|
155
|
-
connector:{
|
|
156
|
-
id:requireSafeArtifactId(value.connector.id,'locations[].access.connector.id'),
|
|
157
|
-
instance:requireSafeArtifactId(value.connector.instance,'locations[].access.connector.instance')
|
|
158
|
-
}
|
|
159
|
-
};
|
|
160
|
-
}
|
|
161
|
-
if (locationKind==='local-cache') {
|
|
162
|
-
if (kind!=='cache-key') throw new ArtifactContractError('ARTIFACT_LOCATION_INVALID','Local cache location must use cache-key access');
|
|
163
|
-
return {kind,key:requireSafeArtifactId(value.key,'locations[].access.key')};
|
|
164
|
-
}
|
|
165
|
-
if (locationKind==='compiled-store') {
|
|
166
|
-
if (kind!=='compiled-key') throw new ArtifactContractError('ARTIFACT_LOCATION_INVALID','Compiled location must use compiled-key access');
|
|
167
|
-
return {kind,key:requireSafeArtifactId(value.key,'locations[].access.key')};
|
|
168
|
-
}
|
|
169
|
-
if (value) throw new ArtifactContractError('ARTIFACT_LOCATION_INVALID','Legacy location access is intentionally opaque and unavailable to browser code');
|
|
170
|
-
return null;
|
|
171
|
-
}
|
|
172
|
-
|
|
173
|
-
export function normalizeArtifactLocation(value={},artifactId) {
|
|
174
|
-
assertNoForbiddenFields(value,'location');
|
|
175
|
-
if (!value || typeof value!=='object' || Array.isArray(value)) throw new ArtifactContractError('ARTIFACT_LOCATION_INVALID','Artifact location must be an object');
|
|
176
|
-
const kind=requiredText(value.kind,'locations[].kind',64);
|
|
177
|
-
const scope=requiredText(value.scope,'locations[].scope',64);
|
|
178
|
-
const state=requiredText(value.state,'locations[].state',64);
|
|
179
|
-
if (!LOCATION_KIND_SET.has(kind)) throw new ArtifactContractError('ARTIFACT_LOCATION_INVALID',`Unsupported artifact location kind: ${kind}`);
|
|
180
|
-
if (!LOCATION_SCOPE_SET.has(scope)) throw new ArtifactContractError('ARTIFACT_LOCATION_INVALID',`Unsupported artifact location scope: ${scope}`);
|
|
181
|
-
if (!LOCATION_STATE_SET.has(state)) throw new ArtifactContractError('ARTIFACT_LOCATION_INVALID',`Unsupported artifact location state: ${state}`);
|
|
182
|
-
const verifiedAt=normalizeTime(value.verifiedAt,'locations[].verifiedAt');
|
|
183
|
-
const expiresAt=normalizeTime(value.expiresAt,'locations[].expiresAt');
|
|
184
|
-
if (verifiedAt && expiresAt && Date.parse(expiresAt)<Date.parse(verifiedAt)) throw new ArtifactContractError('ARTIFACT_LOCATION_INVALID','Artifact location expires before it was verified');
|
|
185
|
-
const access=normalizeAccess(value.access,kind,artifactId);
|
|
186
|
-
if (state==='available' && kind!=='legacy' && !access) {
|
|
187
|
-
throw new ArtifactContractError('ARTIFACT_LOCATION_INVALID','Available artifact location requires a safe access handle',{kind});
|
|
188
|
-
}
|
|
189
|
-
return {
|
|
190
|
-
id:requireSafeArtifactId(value.id,'locations[].id'),
|
|
191
|
-
kind,
|
|
192
|
-
scope,
|
|
193
|
-
state,
|
|
194
|
-
verifiedAt,
|
|
195
|
-
expiresAt,
|
|
196
|
-
access
|
|
197
|
-
};
|
|
198
|
-
}
|
|
199
|
-
|
|
200
|
-
function normalizeRetention(value={}) {
|
|
201
|
-
if (value==null) value={};
|
|
202
|
-
if (!value || typeof value!=='object' || Array.isArray(value)) throw new ArtifactContractError('ARTIFACT_DESCRIPTOR_INVALID','Artifact retention must be an object');
|
|
203
|
-
const retentionClass=String(value.class || 'ephemeral');
|
|
204
|
-
if (!RETENTION_SET.has(retentionClass)) throw new ArtifactContractError('ARTIFACT_DESCRIPTOR_INVALID',`Unsupported artifact retention class: ${retentionClass}`);
|
|
205
|
-
return {
|
|
206
|
-
class:retentionClass,
|
|
207
|
-
expiresAt:normalizeTime(value.expiresAt,'retention.expiresAt')
|
|
208
|
-
};
|
|
209
|
-
}
|
|
210
|
-
|
|
211
|
-
function normalizeWarnings(value=[]) {
|
|
212
|
-
if (!Array.isArray(value)) throw new ArtifactContractError('ARTIFACT_DESCRIPTOR_INVALID','Artifact warnings must be an array');
|
|
213
|
-
return [...new Set(value.map((warning,index)=>safeUiText(warning,`warnings[${index}]`,240)))];
|
|
214
|
-
}
|
|
215
|
-
|
|
216
|
-
function normalizeSchema(value={}) {
|
|
217
|
-
if (!value || typeof value!=='object' || Array.isArray(value)) throw new ArtifactContractError('ARTIFACT_DESCRIPTOR_INVALID','Artifact schema must be an object');
|
|
218
|
-
const id=requiredText(value.id,'schema.id',128);
|
|
219
|
-
if (!SAFE_SCHEMA_ID.test(id)) throw new ArtifactContractError('ARTIFACT_DESCRIPTOR_INVALID','Artifact schema id is invalid');
|
|
220
|
-
return {id,version:requiredText(value.version,'schema.version',64)};
|
|
221
|
-
}
|
|
222
|
-
|
|
223
|
-
export function normalizeArtifactDescriptor(payload={}) {
|
|
224
|
-
if (!payload || typeof payload!=='object' || Array.isArray(payload)) throw new ArtifactContractError('ARTIFACT_DESCRIPTOR_INVALID','Artifact descriptor must be an object');
|
|
225
|
-
assertNoForbiddenFields(payload);
|
|
226
|
-
const id=requireSafeArtifactId(payload.id);
|
|
227
|
-
const role=requiredText(payload.role,'role',96);
|
|
228
|
-
const type=requiredText(payload.type,'type',96);
|
|
229
|
-
const format=requiredText(payload.format,'format',64);
|
|
230
|
-
if (!SAFE_SLUG.test(role)||!SAFE_SLUG.test(type)||!SAFE_SLUG.test(format)) throw new ArtifactContractError('ARTIFACT_DESCRIPTOR_INVALID','Artifact role/type/format must use stable slugs');
|
|
231
|
-
const mime=requiredText(payload.mime,'mime',120).toLowerCase();
|
|
232
|
-
if (!MIME_RE.test(mime)) throw new ArtifactContractError('ARTIFACT_DESCRIPTOR_INVALID','Artifact MIME is invalid');
|
|
233
|
-
const bytes=Number(payload.bytes);
|
|
234
|
-
if (!Number.isSafeInteger(bytes)||bytes<0) throw new ArtifactContractError('ARTIFACT_BYTES_INVALID','Artifact bytes must be a non-negative safe integer');
|
|
235
|
-
const createdAt=normalizeTime(payload.createdAt,'createdAt',{required:true});
|
|
236
|
-
const expiresAt=normalizeTime(payload.expiresAt,'expiresAt');
|
|
237
|
-
if (expiresAt && Date.parse(expiresAt)<Date.parse(createdAt)) throw new ArtifactContractError('ARTIFACT_DESCRIPTOR_INVALID','Artifact expires before it was created');
|
|
238
|
-
if (payload.integrity?.state && payload.integrity.state!=='declared') {
|
|
239
|
-
throw new ArtifactContractError('ARTIFACT_INTEGRITY_EVIDENCE_REQUIRED','Untrusted descriptor cannot self-promote integrity beyond declared');
|
|
240
|
-
}
|
|
241
|
-
const locations=Array.isArray(payload.locations)?payload.locations.map((location)=>normalizeArtifactLocation(location,id)):[];
|
|
242
|
-
const locationIds=new Set();
|
|
243
|
-
for (const location of locations) {
|
|
244
|
-
if (locationIds.has(location.id)) throw new ArtifactContractError('ARTIFACT_LOCATION_INVALID','Duplicate artifact location ID',{locationId:location.id});
|
|
245
|
-
locationIds.add(location.id);
|
|
246
|
-
}
|
|
247
|
-
return {
|
|
248
|
-
id,
|
|
249
|
-
role,
|
|
250
|
-
type,
|
|
251
|
-
schema:normalizeSchema(payload.schema),
|
|
252
|
-
displayName:optionalSafeUiText(payload.displayName,'displayName',160),
|
|
253
|
-
mime,
|
|
254
|
-
format,
|
|
255
|
-
bytes,
|
|
256
|
-
hash:normalizeArtifactHash(payload.hash),
|
|
257
|
-
producer:normalizeProducer(payload.producer),
|
|
258
|
-
lineage:normalizeLineage(payload.lineage,id),
|
|
259
|
-
createdAt,
|
|
260
|
-
expiresAt,
|
|
261
|
-
integrity:{state:'declared',verifiedAt:null,method:null,rejection:null},
|
|
262
|
-
warnings:normalizeWarnings(payload.warnings || []),
|
|
263
|
-
retention:(()=>{
|
|
264
|
-
const retention=normalizeRetention(payload.retention);
|
|
265
|
-
if (retention.expiresAt && Date.parse(retention.expiresAt)<Date.parse(createdAt)) {
|
|
266
|
-
throw new ArtifactContractError('ARTIFACT_DESCRIPTOR_INVALID','Artifact retention expires before artifact creation');
|
|
267
|
-
}
|
|
268
|
-
return retention;
|
|
269
|
-
})(),
|
|
270
|
-
locations
|
|
271
|
-
};
|
|
272
|
-
}
|
|
273
|
-
|
|
274
|
-
export function artifactImmutableSignature(descriptor) {
|
|
275
|
-
return JSON.stringify({
|
|
276
|
-
id:descriptor.id,role:descriptor.role,type:descriptor.type,schema:descriptor.schema,
|
|
277
|
-
mime:descriptor.mime,format:descriptor.format,bytes:descriptor.bytes,hash:descriptor.hash,
|
|
278
|
-
producer:descriptor.producer,lineage:descriptor.lineage,createdAt:descriptor.createdAt
|
|
279
|
-
});
|
|
280
|
-
}
|